From 9df82055f0dff7c242f889c5d776ad0cca2d5bc8 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Tue, 6 May 2008 11:45:23 +0000 Subject: - The Manhole: New and Enhanced is now (partially) playable - Implemented cmd_objectp - Changed how the script externals array is set up - Cleanup svn-id: r31895 --- engines/made/database.cpp | 5 +- engines/made/script.cpp | 60 ++++++----- engines/made/scriptfuncs.h | 10 +- engines/made/scriptfuncs_lgop2.cpp | 114 ++++++++++---------- engines/made/scriptfuncs_mhne.cpp | 124 +++++++++++----------- engines/made/scriptfuncs_rtz.cpp | 210 ++++++++++++++++++------------------- 6 files changed, 262 insertions(+), 261 deletions(-) diff --git a/engines/made/database.cpp b/engines/made/database.cpp index a7970a2e27..ea48fdedbe 100644 --- a/engines/made/database.cpp +++ b/engines/made/database.cpp @@ -256,8 +256,9 @@ void GameDatabase::loadVersion2(Common::SeekableReadStream &sourceS) { debug(2, "textOffs = %08X; textSize = %08X; objectCount = %d; varObjectCount = %d; gameStateSize = %d; objectsOffs = %08X; objectsSize = %d\n", textOffs, textSize, objectCount, varObjectCount, _gameStateSize, objectsOffs, objectsSize); - _gameState = new byte[_gameStateSize]; + _gameState = new byte[_gameStateSize + 2]; memset(_gameState, 0, _gameStateSize); + setVar(1, objectCount); sourceS.seek(textOffs); _gameText = new char[textSize]; @@ -271,8 +272,8 @@ void GameDatabase::loadVersion2(Common::SeekableReadStream &sourceS) { for (uint32 i = 0; i < objectCount; i++) { Object *obj = new Object(); int objSize = obj->loadVersion2(sourceS); - objSize = objSize % 2; // objects are aligned on 2-byte-boundaries, skip unused bytes + objSize = objSize % 2; sourceS.skip(objSize); _objects.push_back(obj); } diff --git a/engines/made/script.cpp b/engines/made/script.cpp index 74dc9e0d9f..86bd9f42e4 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -203,10 +203,10 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) { while (!_terminated) { byte opcode = readByte(); if (opcode >= 1 && opcode <= _commandsMax) { - debug(4, "opcode = %s\n", _commands[opcode - 1].desc); + debug(4, "[%04X:%04X] opcode = %s", _runningScriptObjectIndex, _codeIp - _codeBase, _commands[opcode - 1].desc); (this->*_commands[opcode - 1].proc)(); } else { - warning("ScriptInterpreter::runScript(%d) Unknown opcode %02X\n", _runningScriptObjectIndex, opcode); + warning("ScriptInterpreter::runScript(%d) Unknown opcode %02X", _runningScriptObjectIndex, opcode); } } @@ -219,7 +219,7 @@ byte ScriptInterpreter::readByte() { int16 ScriptInterpreter::readInt16() { int16 temp = (int16)READ_LE_UINT16(_codeIp); _codeIp += 2; - debug(4, "readInt16() value = %04X\n", temp); + debug(4, "readInt16() value = %04X", temp); return temp; } @@ -330,14 +330,14 @@ void ScriptInterpreter::cmd_gt() { void ScriptInterpreter::cmd_loadConstant() { int16 value = readInt16(); - debug(4, "value = %04X (%d)\n", value, value); + debug(4, "value = %04X (%d)", value, value); _stack.setTop(value); } void ScriptInterpreter::cmd_loadVariable() { int16 variable = readInt16(); int16 value = _vm->_dat->getVar(variable); - debug(4, "variable = %d; value = %d (%04X)\n", variable, value, value); fflush(stdout); + debug(4, "variable = %d; value = %d (%04X)", variable, value, value); _stack.setTop(value); } @@ -345,7 +345,7 @@ void ScriptInterpreter::cmd_getObjectProperty() { int16 propertyId = _stack.pop(); int16 objectIndex = _stack.top(); int16 value = _vm->_dat->getObjectProperty(objectIndex, propertyId); - debug(4, "value = %04X(%d)\n", value, value); + debug(4, "value = %04X(%d)", value, value); _stack.setTop(value); } @@ -359,7 +359,7 @@ void ScriptInterpreter::cmd_setObjectProperty() { void ScriptInterpreter::cmd_set() { int16 variable = readInt16(); - debug(4, "var(%d) = %04d (%d)\n", variable, _stack.top(), _stack.top()); + debug(4, "var(%d) = %04d (%d)", variable, _stack.top(), _stack.top()); _vm->_dat->setVar(variable, _stack.top()); } @@ -367,7 +367,7 @@ void ScriptInterpreter::cmd_print() { // TODO: This opcode was used for printing debug messages Object *obj = _vm->_dat->getObject(_stack.top()); const char *text = obj->getString(); - debug(4, "%s", text); fflush(stdout); + debug(4, "%s", text); _stack.setTop(0); } @@ -386,20 +386,20 @@ void ScriptInterpreter::cmd_vref() { int16 value = 0; int16 index = _stack.pop(); int16 objectIndex = _stack.top(); - debug(4, "index = %d; objectIndex = %d\n", index, objectIndex); fflush(stdout); + debug(4, "index = %d; objectIndex = %d", index, objectIndex); if (objectIndex > 0) { Object *obj = _vm->_dat->getObject(objectIndex); value = obj->getVectorItem(index); } _stack.setTop(value); - debug(4, "--> value = %d\n", value); fflush(stdout); + debug(4, "--> value = %d", value); } void ScriptInterpreter::cmd_vset() { int16 value = _stack.pop(); int16 index = _stack.pop(); int16 objectIndex = _stack.top(); - debug(4, "index = %d; objectIndex = %d; value = %d\n", index, objectIndex, value); fflush(stdout); + debug(4, "index = %d; objectIndex = %d; value = %d", index, objectIndex, value); if (objectIndex > 0) { Object *obj = _vm->_dat->getObject(objectIndex); obj->setVectorItem(index, value); @@ -432,11 +432,11 @@ void ScriptInterpreter::cmd_return() { byte argc = _stack.pop(); _stack.free(argc); _stack.setTop(funcResult); - debug(4, "LEAVE: stackPtr = %d; _localStackPos = %d\n\n\n", _stack.getStackPos(), _localStackPos); + debug(4, "LEAVE: stackPtr = %d; _localStackPos = %d\n", _stack.getStackPos(), _localStackPos); } void ScriptInterpreter::cmd_call() { - debug(4, "\n\n\nENTER: stackPtr = %d; _localStackPos = %d\n", _stack.getStackPos(), _localStackPos); + debug(4, "\nENTER: stackPtr = %d; _localStackPos = %d", _stack.getStackPos(), _localStackPos); byte argc = readByte(); _stack.push(argc); _stack.push(_codeIp - _codeBase); @@ -444,7 +444,7 @@ void ScriptInterpreter::cmd_call() { _stack.push(kScriptStackLimit - _localStackPos); _localStackPos = _stack.getStackPos(); _runningScriptObjectIndex = _stack.peek(_localStackPos + argc + 4); - debug(4, "argc = %d; _runningScriptObjectIndex = %04X\n", argc, _runningScriptObjectIndex); fflush(stdout); + debug(4, "argc = %d; _runningScriptObjectIndex = %04X", argc, _runningScriptObjectIndex); _codeBase = _vm->_dat->getObject(_runningScriptObjectIndex)->getData(); _codeIp = _codeBase; } @@ -480,31 +480,31 @@ void ScriptInterpreter::cmd_restore() { void ScriptInterpreter::cmd_arg() { int16 argIndex = readByte(); - debug(4, "argIndex = %d; value = %04X (%d)\n", argIndex, _stack.peek(_localStackPos + 4 + argIndex), _stack.peek(_localStackPos + 4 + argIndex)); + debug(4, "argIndex = %d; value = %04X (%d)", argIndex, _stack.peek(_localStackPos + 4 + argIndex), _stack.peek(_localStackPos + 4 + argIndex)); _stack.setTop(_stack.peek(_localStackPos + 4 + argIndex)); } void ScriptInterpreter::cmd_aset() { int16 argIndex = readByte(); - debug(4, "argIndex = %d; value = %d\n", argIndex, _stack.peek(_localStackPos + 4 + argIndex)); + debug(4, "argIndex = %d; value = %d", argIndex, _stack.peek(_localStackPos + 4 + argIndex)); _stack.poke(_localStackPos + 4 + argIndex, _stack.top()); } void ScriptInterpreter::cmd_tmp() { int16 tempIndex = readByte(); - debug(4, "tempIndex = %d; value = %d\n", tempIndex, _stack.peek(_localStackPos - tempIndex - 1)); + debug(4, "tempIndex = %d; value = %d", tempIndex, _stack.peek(_localStackPos - tempIndex - 1)); _stack.setTop(_stack.peek(_localStackPos - tempIndex - 1)); } void ScriptInterpreter::cmd_tset() { int16 tempIndex = readByte(); - debug(4, "tempIndex = %d; value = %d\n", tempIndex, _stack.top()); + debug(4, "tempIndex = %d; value = %d", tempIndex, _stack.top()); _stack.poke(_localStackPos - tempIndex - 1, _stack.top()); } void ScriptInterpreter::cmd_tspace() { int16 tempCount = readByte(); - debug(4, "tempCount = %d\n", tempCount); + debug(4, "tempCount = %d", tempCount); _stack.alloc(tempCount); } @@ -513,7 +513,11 @@ void ScriptInterpreter::cmd_class() { } void ScriptInterpreter::cmd_objectp() { - warning("Unimplemented command: cmd_objectp"); + Object *obj = _vm->_dat->getObject(_stack.top()); + if (obj->isObject()) + _stack.setTop(-1); + else + _stack.setTop(0); } void ScriptInterpreter::cmd_vectorp() { @@ -535,11 +539,11 @@ void ScriptInterpreter::cmd_randomize() { void ScriptInterpreter::cmd_send() { - debug(4, "\n\n\nENTER: stackPtr = %d; _localStackPos = %d\n", _stack.getStackPos(), _localStackPos); + debug(4, "\nENTER: stackPtr = %d; _localStackPos = %d", _stack.getStackPos(), _localStackPos); byte argc = readByte(); - debug(4, "argc = %d\n", argc); + debug(4, "argc = %d", argc); _stack.push(argc); _stack.push(_codeIp - _codeBase); @@ -550,7 +554,7 @@ void ScriptInterpreter::cmd_send() { int16 propertyId = _stack.peek(_localStackPos + argc + 2); int16 objectIndex = _stack.peek(_localStackPos + argc + 4); - debug(4, "objectIndex = %d (%04X); propertyId = %d(%04X)\n", objectIndex, objectIndex, propertyId, propertyId); fflush(stdout); + debug(4, "objectIndex = %d (%04X); propertyId = %d(%04X)", objectIndex, objectIndex, propertyId, propertyId); if (objectIndex != 0) { objectIndex = _vm->_dat->getObject(objectIndex)->getClass(); @@ -558,7 +562,7 @@ void ScriptInterpreter::cmd_send() { objectIndex = _stack.peek(_localStackPos + argc + 3); } - debug(4, "--> objectIndex = %d(%04X)\n", objectIndex, objectIndex); fflush(stdout); + debug(4, "--> objectIndex = %d(%04X)", objectIndex, objectIndex); if (objectIndex != 0) { _runningScriptObjectIndex = _vm->_dat->getObjectProperty(objectIndex, propertyId); @@ -583,13 +587,13 @@ void ScriptInterpreter::cmd_extend() { byte argc = readByte(); int16 *argv = _stack.getStackPtr(); - //debug(4, "func = %d (%s); argc = %d\n", func, extendFuncNames[func], argc); - debug(4, "func = %d; argc = %d\n", func, argc); + //debug(4, "func = %d (%s); argc = %d", func, extendFuncNames[func], argc); + debug(4, "func = %d; argc = %d", func, argc); for (int i = 0; i < argc; i++) - debug(4, "argv[%02d] = %04X (%d)\n", i, argv[i], argv[i]); + debug(4, "argv[%02d] = %04X (%d)", i, argv[i], argv[i]); int16 result = _functions->callFunction(func, argc, argv); - debug(4, "result = %04X (%d)\n", result, result); + debug(4, "result = %04X (%d)", result, result); _stack.free(argc); diff --git a/engines/made/scriptfuncs.h b/engines/made/scriptfuncs.h index 7e826a9f5e..77e4b12b2e 100644 --- a/engines/made/scriptfuncs.h +++ b/engines/made/scriptfuncs.h @@ -40,12 +40,16 @@ typedef Common::Functor2 ExternalFunc; class ScriptFunctions { public: ScriptFunctions(MadeEngine *vm) : _vm(vm) {} - virtual ~ScriptFunctions() {} + virtual ~ScriptFunctions() { + for (int i = 0; i < _externalFuncs.size(); ++i) + delete _externalFuncs[i]; + } int16 callFunction(uint16 index, int16 argc, int16 *argv) { if (index >= _externalFuncs.size()) { // TODO: ERROR! return 0; } + debug(4, "%s", _externalFuncNames[index]); return (*_externalFuncs[index])(argc, argv); } virtual void setupExternalsTable() = 0; @@ -55,13 +59,13 @@ protected: Audio::SoundHandle _voiceStreamHandle; Common::Array _externalFuncs; + Common::Array _externalFuncNames; }; class ScriptFunctionsLgop2 : public ScriptFunctions { public: ScriptFunctionsLgop2(MadeEngine *vm) : ScriptFunctions(vm) {} - ~ScriptFunctionsLgop2() {} void setupExternalsTable(); protected: @@ -122,7 +126,6 @@ protected: class ScriptFunctionsRtz : public ScriptFunctions { public: ScriptFunctionsRtz(MadeEngine *vm) : ScriptFunctions(vm) {} - ~ScriptFunctionsRtz() {} void setupExternalsTable(); protected: @@ -231,7 +234,6 @@ protected: class ScriptFunctionsMhne : public ScriptFunctions { public: ScriptFunctionsMhne(MadeEngine *vm) : ScriptFunctions(vm) {} - ~ScriptFunctionsMhne() {} void setupExternalsTable(); protected: diff --git a/engines/made/scriptfuncs_lgop2.cpp b/engines/made/scriptfuncs_lgop2.cpp index 579492a39e..2a78bd0e2c 100644 --- a/engines/made/scriptfuncs_lgop2.cpp +++ b/engines/made/scriptfuncs_lgop2.cpp @@ -43,66 +43,64 @@ namespace Made { /* ScriptFunctionsLgop2 */ typedef Common::Functor2Mem ExternalFuncLgop2; -#define External(x) ExternalFuncLgop2(this, &ScriptFunctionsLgop2::x) +#define External(x) \ + _externalFuncs.push_back(new ExternalFuncLgop2(this, &ScriptFunctionsLgop2::x)); \ + _externalFuncNames.push_back(#x); void ScriptFunctionsLgop2::setupExternalsTable() { - static const ExternalFuncLgop2 externalsTable[] = { - External(o1_SYSTEM), - External(o1_INITGRAF), - External(o1_RESTOREGRAF), - External(o1_DRAWPIC), - External(o1_CLS), - External(o1_SHOWPAGE), - External(o1_EVENT), - External(o1_EVENTX), - External(o1_EVENTY), - External(o1_EVENTKEY), - External(o1_VISUALFX), - External(o1_PLAYSND), - External(o1_PLAYMUS), - External(o1_STOPMUS), - External(o1_ISMUS), - External(o1_TEXTPOS), - External(o1_FLASH), - External(o1_PLAYNOTE), - External(o1_STOPNOTE), - External(o1_PLAYTELE), - External(o1_STOPTELE), - External(o1_HIDECURS), - External(o1_SHOWCURS), - External(o1_MUSICBEAT), - External(o1_SCREENLOCK), - External(o1_ADDSPRITE), - External(o1_FREEANIM), - External(o1_DRAWSPRITE), - External(o1_ERASESPRITES), - External(o1_UPDATESPRITES), - External(o1_GETTIMER), - External(o1_SETTIMER), - External(o1_RESETTIMER), - External(o1_ALLOCTIMER), - External(o1_FREETIMER), - External(o1_PALETTELOCK), - External(o1_FONT), - External(o1_DRAWTEXT), - External(o1_HOMETEXT), - External(o1_TEXTRECT), - External(o1_TEXTXY), - External(o1_DROPSHADOW), - External(o1_TEXTCOLOR), - External(o1_OUTLINE), - External(o1_LOADCURSOR), - External(o1_SETGROUND), - External(o1_RESTEXT), - External(o1_ADDMASK), - External(o1_SETMASK), - External(o1_ISSND), - External(o1_STOPSND), - External(o1_PLAYVOICE) - }; - - for (int i = 0; i < ARRAYSIZE(externalsTable); ++i) - _externalFuncs.push_back(&externalsTable[i]); + External(o1_SYSTEM); + External(o1_INITGRAF); + External(o1_RESTOREGRAF); + External(o1_DRAWPIC); + External(o1_CLS); + External(o1_SHOWPAGE); + External(o1_EVENT); + External(o1_EVENTX); + External(o1_EVENTY); + External(o1_EVENTKEY); + External(o1_VISUALFX); + External(o1_PLAYSND); + External(o1_PLAYMUS); + External(o1_STOPMUS); + External(o1_ISMUS); + External(o1_TEXTPOS); + External(o1_FLASH); + External(o1_PLAYNOTE); + External(o1_STOPNOTE); + External(o1_PLAYTELE); + External(o1_STOPTELE); + External(o1_HIDECURS); + External(o1_SHOWCURS); + External(o1_MUSICBEAT); + External(o1_SCREENLOCK); + External(o1_ADDSPRITE); + External(o1_FREEANIM); + External(o1_DRAWSPRITE); + External(o1_ERASESPRITES); + External(o1_UPDATESPRITES); + External(o1_GETTIMER); + External(o1_SETTIMER); + External(o1_RESETTIMER); + External(o1_ALLOCTIMER); + External(o1_FREETIMER); + External(o1_PALETTELOCK); + External(o1_FONT); + External(o1_DRAWTEXT); + External(o1_HOMETEXT); + External(o1_TEXTRECT); + External(o1_TEXTXY); + External(o1_DROPSHADOW); + External(o1_TEXTCOLOR); + External(o1_OUTLINE); + External(o1_LOADCURSOR); + External(o1_SETGROUND); + External(o1_RESTEXT); + External(o1_ADDMASK); + External(o1_SETMASK); + External(o1_ISSND); + External(o1_STOPSND); + External(o1_PLAYVOICE); + } #undef External diff --git a/engines/made/scriptfuncs_mhne.cpp b/engines/made/scriptfuncs_mhne.cpp index 65e9c6e070..4c942edec2 100644 --- a/engines/made/scriptfuncs_mhne.cpp +++ b/engines/made/scriptfuncs_mhne.cpp @@ -43,70 +43,68 @@ namespace Made { /* ScriptFunctionsMhne */ typedef Common::Functor2Mem ExternalFuncMhne; -#define External(x) ExternalFuncMhne(this, &ScriptFunctionsMhne::x) +#define External(x) \ + _externalFuncs.push_back(new ExternalFuncMhne(this, &ScriptFunctionsMhne::x)); \ + _externalFuncNames.push_back(#x); void ScriptFunctionsMhne::setupExternalsTable() { - static const ExternalFuncMhne externalsTable[] = { - External(o1_SYSTEM), - External(o1_INITGRAF), - External(o1_RESTOREGRAF), - External(o1_DRAWPIC), - External(o1_CLS), - External(o1_SHOWPAGE), - External(o1_EVENT), - External(o1_EVENTX), - External(o1_EVENTY), - External(o1_EVENTKEY), - External(o1_VISUALFX), - External(o1_PLAYSND), - External(o1_PLAYMUS), - External(o1_STOPMUS), - External(o1_ISMUS), - External(o1_TEXTPOS), - External(o1_FLASH), - External(o1_PLAYNOTE), - External(o1_STOPNOTE), - External(o1_PLAYTELE), - External(o1_STOPTELE), - External(o1_HIDECURS), - External(o1_SHOWCURS), - External(o1_MUSICBEAT), - External(o1_SCREENLOCK), - External(o1_ADDSPRITE), - External(o1_FREEANIM), - External(o1_DRAWSPRITE), - External(o1_ERASESPRITES), - External(o1_UPDATESPRITES), - External(o1_GETTIMER), - External(o1_SETTIMER), - External(o1_RESETTIMER), - External(o1_ALLOCTIMER), - External(o1_FREETIMER), - External(o1_PALETTELOCK), - External(o1_FONT), - External(o1_DRAWTEXT), - External(o1_HOMETEXT), - External(o1_TEXTRECT), - External(o1_TEXTXY), - External(o1_DROPSHADOW), - External(o1_TEXTCOLOR), - External(o1_OUTLINE), - External(o1_LOADCURSOR), - External(o1_SETGROUND), - External(o1_RESTEXT), - External(o1_ADDMASK), - External(o1_SETMASK), - External(o1_ISSND), - External(o1_STOPSND), - External(o1_PLAYVOICE), - External(o1_CDPLAY), - External(o1_STOPCD), - External(o1_CDSTATUS), - External(o1_CDTIME), - External(o1_CDPLAYSEG), - }; - - for (int i = 0; i < ARRAYSIZE(externalsTable); ++i) - _externalFuncs.push_back(&externalsTable[i]); + + External(o1_SYSTEM); + External(o1_INITGRAF); + External(o1_RESTOREGRAF); + External(o1_DRAWPIC); + External(o1_CLS); + External(o1_SHOWPAGE); + External(o1_EVENT); + External(o1_EVENTX); + External(o1_EVENTY); + External(o1_EVENTKEY); + External(o1_VISUALFX); + External(o1_PLAYSND); + External(o1_PLAYMUS); + External(o1_STOPMUS); + External(o1_ISMUS); + External(o1_TEXTPOS); + External(o1_FLASH); + External(o1_PLAYNOTE); + External(o1_STOPNOTE); + External(o1_PLAYTELE); + External(o1_STOPTELE); + External(o1_HIDECURS); + External(o1_SHOWCURS); + External(o1_MUSICBEAT); + External(o1_SCREENLOCK); + External(o1_ADDSPRITE); + External(o1_FREEANIM); + External(o1_DRAWSPRITE); + External(o1_ERASESPRITES); + External(o1_UPDATESPRITES); + External(o1_GETTIMER); + External(o1_SETTIMER); + External(o1_RESETTIMER); + External(o1_ALLOCTIMER); + External(o1_FREETIMER); + External(o1_PALETTELOCK); + External(o1_FONT); + External(o1_DRAWTEXT); + External(o1_HOMETEXT); + External(o1_TEXTRECT); + External(o1_TEXTXY); + External(o1_DROPSHADOW); + External(o1_TEXTCOLOR); + External(o1_OUTLINE); + External(o1_LOADCURSOR); + External(o1_SETGROUND); + External(o1_RESTEXT); + External(o1_ADDMASK); + External(o1_SETMASK); + External(o1_ISSND); + External(o1_STOPSND); + External(o1_PLAYVOICE); + External(o1_CDPLAY); + External(o1_STOPCD); + External(o1_CDSTATUS); + External(o1_CDTIME); + External(o1_CDPLAYSEG); } #undef External diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp index 1186a88de8..20f6df8918 100644 --- a/engines/made/scriptfuncs_rtz.cpp +++ b/engines/made/scriptfuncs_rtz.cpp @@ -43,113 +43,111 @@ namespace Made { /* ScriptFunctionsRtz */ typedef Common::Functor2Mem ExternalFuncRtz; -#define External(x) ExternalFuncRtz(this, &ScriptFunctionsRtz::x) +#define External(x) \ + _externalFuncs.push_back(new ExternalFuncRtz(this, &ScriptFunctionsRtz::x)); \ + _externalFuncNames.push_back(#x); void ScriptFunctionsRtz::setupExternalsTable() { - static const ExternalFuncRtz externalsTable[] = { - External(o1_SYSTEM), - External(o1_INITGRAF), - External(o1_RESTOREGRAF), - External(o1_DRAWPIC), - External(o1_CLS), - External(o1_SHOWPAGE), - External(o1_EVENT), - External(o1_EVENTX), - External(o1_EVENTY), - External(o1_EVENTKEY), - External(o1_VISUALFX), - External(o1_PLAYSND), - External(o1_PLAYMUS), - External(o1_STOPMUS), - External(o1_ISMUS), - External(o1_TEXTPOS), - External(o1_FLASH), - External(o1_PLAYNOTE), - External(o1_STOPNOTE), - External(o1_PLAYTELE), - External(o1_STOPTELE), - External(o1_HIDECURS), - External(o1_SHOWCURS), - External(o1_MUSICBEAT), - External(o1_SCREENLOCK), - External(o1_ADDSPRITE), - External(o1_FREEANIM), - External(o1_DRAWSPRITE), - External(o1_ERASESPRITES), - External(o1_UPDATESPRITES), - External(o1_GETTIMER), - External(o1_SETTIMER), - External(o1_RESETTIMER), - External(o1_ALLOCTIMER), - External(o1_FREETIMER), - External(o1_PALETTELOCK), - External(o1_FONT), - External(o1_DRAWTEXT), - External(o1_HOMETEXT), - External(o1_TEXTRECT), - External(o1_TEXTXY), - External(o1_DROPSHADOW), - External(o1_TEXTCOLOR), - External(o1_OUTLINE), - External(o1_LOADCURSOR), - External(o1_SETGROUND), - External(o1_RESTEXT), - External(o1_CLIPAREA), - External(o1_SETCLIP), - External(o1_ISSND), - External(o1_STOPSND), - External(o1_PLAYVOICE), - External(o1_CDPLAY), - External(o1_STOPCD), - External(o1_CDSTATUS), - External(o1_CDTIME), - External(o1_CDPLAYSEG), - External(o1_PRINTF), - External(o1_MONOCLS), - External(o1_SNDENERGY), - External(o1_CLEARTEXT), - External(o1_ANIMTEXT), - External(o1_TEXTWIDTH), - External(o1_PLAYMOVIE), - External(o1_LOADSND), - External(o1_LOADMUS), - External(o1_LOADPIC), - External(o1_MUSICVOL), - External(o1_RESTARTEVENTS), - External(o1_PLACESPRITE), - External(o1_PLACETEXT), - External(o1_DELETECHANNEL), - External(o1_CHANNELTYPE), - External(o1_SETSTATE), - External(o1_SETLOCATION), - External(o1_SETCONTENT), - External(o1_EXCLUDEAREA), - External(o1_SETEXCLUDE), - External(o1_GETSTATE), - External(o1_PLACEANIM), - External(o1_SETFRAME), - External(o1_GETFRAME), - External(o1_GETFRAMECOUNT), - External(o1_PICWIDTH), - External(o1_PICHEIGHT), - External(o1_SOUNDRATE), - External(o1_DRAWANIMPIC), - External(o1_LOADANIM), - External(o1_READTEXT), - External(o1_READMENU), - External(o1_DRAWMENU), - External(o1_MENUCOUNT), - External(o1_SAVEGAME), - External(o1_LOADGAME), - External(o1_GAMENAME), - External(o1_SHAKESCREEN), - External(o1_PLACEMENU), - External(o1_SETVOLUME), - External(o1_WHATSYNTH), - External(o1_SLOWSYSTEM) - }; - - for (int i = 0; i < ARRAYSIZE(externalsTable); ++i) - _externalFuncs.push_back(&externalsTable[i]); + + External(o1_SYSTEM); + External(o1_INITGRAF); + External(o1_RESTOREGRAF); + External(o1_DRAWPIC); + External(o1_CLS); + External(o1_SHOWPAGE); + External(o1_EVENT); + External(o1_EVENTX); + External(o1_EVENTY); + External(o1_EVENTKEY); + External(o1_VISUALFX); + External(o1_PLAYSND); + External(o1_PLAYMUS); + External(o1_STOPMUS); + External(o1_ISMUS); + External(o1_TEXTPOS); + External(o1_FLASH); + External(o1_PLAYNOTE); + External(o1_STOPNOTE); + External(o1_PLAYTELE); + External(o1_STOPTELE); + External(o1_HIDECURS); + External(o1_SHOWCURS); + External(o1_MUSICBEAT); + External(o1_SCREENLOCK); + External(o1_ADDSPRITE); + External(o1_FREEANIM); + External(o1_DRAWSPRITE); + External(o1_ERASESPRITES); + External(o1_UPDATESPRITES); + External(o1_GETTIMER); + External(o1_SETTIMER); + External(o1_RESETTIMER); + External(o1_ALLOCTIMER); + External(o1_FREETIMER); + External(o1_PALETTELOCK); + External(o1_FONT); + External(o1_DRAWTEXT); + External(o1_HOMETEXT); + External(o1_TEXTRECT); + External(o1_TEXTXY); + External(o1_DROPSHADOW); + External(o1_TEXTCOLOR); + External(o1_OUTLINE); + External(o1_LOADCURSOR); + External(o1_SETGROUND); + External(o1_RESTEXT); + External(o1_CLIPAREA); + External(o1_SETCLIP); + External(o1_ISSND); + External(o1_STOPSND); + External(o1_PLAYVOICE); + External(o1_CDPLAY); + External(o1_STOPCD); + External(o1_CDSTATUS); + External(o1_CDTIME); + External(o1_CDPLAYSEG); + External(o1_PRINTF); + External(o1_MONOCLS); + External(o1_SNDENERGY); + External(o1_CLEARTEXT); + External(o1_ANIMTEXT); + External(o1_TEXTWIDTH); + External(o1_PLAYMOVIE); + External(o1_LOADSND); + External(o1_LOADMUS); + External(o1_LOADPIC); + External(o1_MUSICVOL); + External(o1_RESTARTEVENTS); + External(o1_PLACESPRITE); + External(o1_PLACETEXT); + External(o1_DELETECHANNEL); + External(o1_CHANNELTYPE); + External(o1_SETSTATE); + External(o1_SETLOCATION); + External(o1_SETCONTENT); + External(o1_EXCLUDEAREA); + External(o1_SETEXCLUDE); + External(o1_GETSTATE); + External(o1_PLACEANIM); + External(o1_SETFRAME); + External(o1_GETFRAME); + External(o1_GETFRAMECOUNT); + External(o1_PICWIDTH); + External(o1_PICHEIGHT); + External(o1_SOUNDRATE); + External(o1_DRAWANIMPIC); + External(o1_LOADANIM); + External(o1_READTEXT); + External(o1_READMENU); + External(o1_DRAWMENU); + External(o1_MENUCOUNT); + External(o1_SAVEGAME); + External(o1_LOADGAME); + External(o1_GAMENAME); + External(o1_SHAKESCREEN); + External(o1_PLACEMENU); + External(o1_SETVOLUME); + External(o1_WHATSYNTH); + External(o1_SLOWSYSTEM); } #undef External -- cgit v1.2.3 From 7595f20e33ee709b486de887cacd5e4bdba7a67a Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 6 May 2008 15:08:48 +0000 Subject: Silencing two signess compiler warnings svn-id: r31897 --- engines/made/script.cpp | 2 +- engines/made/scriptfuncs.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/made/script.cpp b/engines/made/script.cpp index 86bd9f42e4..ba0b61d29b 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -203,7 +203,7 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) { while (!_terminated) { byte opcode = readByte(); if (opcode >= 1 && opcode <= _commandsMax) { - debug(4, "[%04X:%04X] opcode = %s", _runningScriptObjectIndex, _codeIp - _codeBase, _commands[opcode - 1].desc); + debug(4, "[%04X:%04X] opcode = %s", _runningScriptObjectIndex, (uint) (_codeIp - _codeBase), _commands[opcode - 1].desc); (this->*_commands[opcode - 1].proc)(); } else { warning("ScriptInterpreter::runScript(%d) Unknown opcode %02X", _runningScriptObjectIndex, opcode); diff --git a/engines/made/scriptfuncs.h b/engines/made/scriptfuncs.h index 77e4b12b2e..14645c6d1b 100644 --- a/engines/made/scriptfuncs.h +++ b/engines/made/scriptfuncs.h @@ -41,7 +41,7 @@ class ScriptFunctions { public: ScriptFunctions(MadeEngine *vm) : _vm(vm) {} virtual ~ScriptFunctions() { - for (int i = 0; i < _externalFuncs.size(); ++i) + for (uint i = 0; i < _externalFuncs.size(); ++i) delete _externalFuncs[i]; } int16 callFunction(uint16 index, int16 argc, int16 *argv) { -- cgit v1.2.3 From cc5215b4bb3db2f94883492f4d0334eebe2e3a39 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 6 May 2008 16:30:27 +0000 Subject: Updated the preprocessor directives for the SCUMM engine's MSVC project files svn-id: r31899 --- dists/msvc7/scumm.vcproj | 2 +- dists/msvc71/scumm.vcproj | 2 +- dists/msvc8/scumm.vcproj | 2 +- dists/msvc9/scumm.vcproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dists/msvc7/scumm.vcproj b/dists/msvc7/scumm.vcproj index 8264952066..05d710de3d 100644 --- a/dists/msvc7/scumm.vcproj +++ b/dists/msvc7/scumm.vcproj @@ -21,7 +21,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" MinimalRebuild="TRUE" ExceptionHandling="TRUE" BasicRuntimeChecks="3" diff --git a/dists/msvc71/scumm.vcproj b/dists/msvc71/scumm.vcproj index 26f8e7de58..1a733eb93a 100644 --- a/dists/msvc71/scumm.vcproj +++ b/dists/msvc71/scumm.vcproj @@ -21,7 +21,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" MinimalRebuild="TRUE" ExceptionHandling="TRUE" BasicRuntimeChecks="3" diff --git a/dists/msvc8/scumm.vcproj b/dists/msvc8/scumm.vcproj index e10f664c28..6ccfcaf5d3 100644 --- a/dists/msvc8/scumm.vcproj +++ b/dists/msvc8/scumm.vcproj @@ -42,7 +42,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702 /wd4996" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" MinimalRebuild="true" ExceptionHandling="1" BasicRuntimeChecks="3" diff --git a/dists/msvc9/scumm.vcproj b/dists/msvc9/scumm.vcproj index 4acecd4517..d76d28cc4f 100644 --- a/dists/msvc9/scumm.vcproj +++ b/dists/msvc9/scumm.vcproj @@ -43,7 +43,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702 /wd4996" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" MinimalRebuild="true" ExceptionHandling="1" BasicRuntimeChecks="3" -- cgit v1.2.3 From bce56298e69704b0f844ab71e8385a3b43b861b2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 6 May 2008 16:36:26 +0000 Subject: Also update the preprocessor definitions for the release version svn-id: r31900 --- dists/msvc7/scumm.vcproj | 2 +- dists/msvc71/scumm.vcproj | 2 +- dists/msvc8/scumm.vcproj | 2 +- dists/msvc9/scumm.vcproj | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dists/msvc7/scumm.vcproj b/dists/msvc7/scumm.vcproj index 05d710de3d..56f78692cc 100644 --- a/dists/msvc7/scumm.vcproj +++ b/dists/msvc7/scumm.vcproj @@ -65,7 +65,7 @@ InlineFunctionExpansion="1" OmitFramePointers="TRUE" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;NDEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" StringPooling="TRUE" ExceptionHandling="TRUE" RuntimeLibrary="0" diff --git a/dists/msvc71/scumm.vcproj b/dists/msvc71/scumm.vcproj index 1a733eb93a..661cc1fa19 100644 --- a/dists/msvc71/scumm.vcproj +++ b/dists/msvc71/scumm.vcproj @@ -71,7 +71,7 @@ InlineFunctionExpansion="1" OmitFramePointers="TRUE" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;NDEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" StringPooling="TRUE" ExceptionHandling="TRUE" RuntimeLibrary="0" diff --git a/dists/msvc8/scumm.vcproj b/dists/msvc8/scumm.vcproj index 6ccfcaf5d3..42a4ff6993 100644 --- a/dists/msvc8/scumm.vcproj +++ b/dists/msvc8/scumm.vcproj @@ -115,7 +115,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;NDEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" StringPooling="true" ExceptionHandling="1" RuntimeLibrary="0" diff --git a/dists/msvc9/scumm.vcproj b/dists/msvc9/scumm.vcproj index d76d28cc4f..230102db35 100644 --- a/dists/msvc9/scumm.vcproj +++ b/dists/msvc9/scumm.vcproj @@ -116,7 +116,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;NDEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" StringPooling="true" ExceptionHandling="1" RuntimeLibrary="0" -- cgit v1.2.3 From 2976f961fe09c33e350fd8c6b4ccaddad738bf16 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 6 May 2008 16:57:07 +0000 Subject: - Fixed some memory leaks in kyra3 - Fixed valgrind warnings in GUI_v2 code svn-id: r31902 --- engines/kyra/gui_v2.cpp | 2 ++ engines/kyra/kyra_hof.cpp | 2 -- engines/kyra/kyra_mr.cpp | 10 +++++++--- engines/kyra/kyra_v2.cpp | 1 + engines/kyra/scene_mr.cpp | 2 ++ 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp index d835c4f8d5..0a74d27a99 100644 --- a/engines/kyra/gui_v2.cpp +++ b/engines/kyra/gui_v2.cpp @@ -43,6 +43,8 @@ GUI_v2::GUI_v2(KyraEngine_v2 *vm) : GUI(vm), _vm(vm), _screen(vm->screen_v2()) { _scrollUpFunctor = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::scrollUpButton); _scrollDownFunctor = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::scrollDownButton); _sliderHandlerFunctor = BUTTON_FUNCTOR(GUI_v2, this, &GUI_v2::sliderHandler); + _savegameOffset = 0; + _isDeleteMenu = false; } Button *GUI_v2::addButtonToList(Button *list, Button *newButton) { diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index c25af91bec..9716c7edc1 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -780,8 +780,6 @@ void KyraEngine_HoF::cleanup() { delete [] _gfxBackUpRect; _gfxBackUpRect = 0; - delete [] _sceneList; _sceneList = 0; - for (int i = 0; i < ARRAYSIZE(_sceneAnimMovie); ++i) { delete _sceneAnimMovie[i]; _sceneAnimMovie[i] = 0; diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 61546fc2e7..9aa50637d0 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -140,6 +140,7 @@ KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngi _menuDirectlyToLoad = false; _optionsFile = 0; _actorFile = 0; + _chatAltFlag = false; } KyraEngine_MR::~KyraEngine_MR() { @@ -152,6 +153,7 @@ KyraEngine_MR::~KyraEngine_MR() { delete[] _cCodeFile; delete[] _scenesFile; delete[] _itemFile; + delete[] _actorFile; delete[] _gamePlayBuffer; delete[] _interface; delete[] _interfaceCommandLine; @@ -165,7 +167,6 @@ KyraEngine_MR::~KyraEngine_MR() { delete[] _gfxBackUpRect; delete[] _paletteOverlay; - delete[] _sceneList; for (ShapeMap::iterator i = _gameShapes.begin(); i != _gameShapes.end(); ++i) { delete[] i->_value; @@ -552,7 +553,6 @@ void KyraEngine_MR::startup() { _stringBuffer = new char[500]; //XXX musicUpdate(0); - _costPalBuffer = new uint8[864]; //XXX allocAnimObjects(1, 16, 50); @@ -672,7 +672,11 @@ void KyraEngine_MR::startup() { void KyraEngine_MR::loadCostPal() { debugC(9, kDebugLevelMain, "KyraEngine_MR::loadCostPal()"); - _costPalBuffer = _res->fileData("_COSTPAL.DAT", 0); + _res->exists("_COSTPAL.DAT", true); + uint32 size = 0; + _costPalBuffer = _res->fileData("_COSTPAL.DAT", &size); + assert(_costPalBuffer); + assert(size == 864); } void KyraEngine_MR::loadShadowShape() { diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 176f8e4e2f..422984490a 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -76,6 +76,7 @@ KyraEngine_v2::~KyraEngine_v2() { _gameShapes.clear(); delete[] _itemList; + delete[] _sceneList; _emc->unload(&_sceneScriptData); diff --git a/engines/kyra/scene_mr.cpp b/engines/kyra/scene_mr.cpp index 196c87424d..7da0dd9f75 100644 --- a/engines/kyra/scene_mr.cpp +++ b/engines/kyra/scene_mr.cpp @@ -430,6 +430,8 @@ void KyraEngine_MR::initSceneScript(int unk1) { _screen->_curPage = pageBackUp; musicUpdate(0); } + delete stream; + stream = 0; musicUpdate(0); strcpy(filename, scene.filename1); -- cgit v1.2.3 From 2ee01bf757ace2cf24835c34baa18ce6711bea54 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 6 May 2008 17:30:31 +0000 Subject: - Fixed valgrind warnings in HoF - Fixed memory leaks in HoF svn-id: r31903 --- engines/kyra/kyra_hof.cpp | 8 +++++++- engines/kyra/sequences_hof.cpp | 2 -- engines/kyra/staticres.cpp | 3 ++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 9716c7edc1..f400173cb0 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -140,6 +140,8 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn _menuDirectlyToLoad = false; _menu = 0; + _chatIsNote = false; + memset(&_npcScriptData, 0, sizeof(_npcScriptData)); } KyraEngine_HoF::~KyraEngine_HoF() { @@ -792,6 +794,8 @@ void KyraEngine_HoF::cleanup() { delete [] _buttonShapes[i]; _buttonShapes[i] = 0; } + + _emc->unload(&_npcScriptData); } #pragma mark - Localization @@ -1006,7 +1010,7 @@ void KyraEngine_HoF::loadMouseShapes() { _screen->loadBitmap("_MOUSE.CSH", 3, 3, 0); for (int i = 0; i <= 8; ++i) - addShapeToPool(_screen->makeShapeCopy(_screen->getCPagePtr(3), i), i); + addShapeToPool(_screen->getCPagePtr(3), i, i); } void KyraEngine_HoF::loadItemShapes() { @@ -1068,6 +1072,8 @@ void KyraEngine_HoF::runStartScript(int script, int unk1) { } void KyraEngine_HoF::loadNPCScript() { + _emc->unload(&_npcScriptData); + char filename[12]; strcpy(filename, "_NPC.EMC"); diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index 1c74f48990..050b00c878 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -2665,8 +2665,6 @@ void KyraEngine_HoF::seq_uninit() { if (_flags.isDemo && !_flags.isTalkie) _staticres->unloadId(k2SeqplayShapeAnimData); - _gameShapes.clear(); - delete _menu; _menu = 0; } diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 16d7ca4d9b..c9d81cc92a 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -831,7 +831,8 @@ void StaticResource::freeRawData(void *&ptr, int &size) { void StaticResource::freeStringTable(void *&ptr, int &size) { char **data = (char**)ptr; while (size--) - delete [] data[size]; + delete[] data[size]; + delete[] data; ptr = 0; size = 0; } -- cgit v1.2.3 From c396694f3b4378c26b1157fa069a60c21080cb08 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 6 May 2008 17:30:52 +0000 Subject: Added a temporary hack to get the engine plugins working under MSVC svn-id: r31904 --- base/plugins.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/plugins.h b/base/plugins.h index ca08a0c628..ec947ee6ad 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -106,6 +106,12 @@ public: #define PLUGIN_ENABLED_STATIC(ID) \ (defined(ENABLE_##ID) && !PLUGIN_ENABLED_DYNAMIC(ID)) +// HACK for MSVC +#if defined(_MSC_VER) + #undef PLUGIN_ENABLED_STATIC + #define PLUGIN_ENABLED_STATIC(ID) 1 +#endif + #define PLUGIN_ENABLED_DYNAMIC(ID) \ (defined(ENABLE_##ID) && (ENABLE_##ID == DYNAMIC_PLUGIN) && defined(DYNAMIC_MODULES)) -- cgit v1.2.3 From 3e7f66da896a740057f49b8526276794e064e954 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 6 May 2008 17:44:00 +0000 Subject: Cleanup. svn-id: r31905 --- engines/kyra/kyra_hof.cpp | 2 -- engines/kyra/kyra_mr.cpp | 4 ---- engines/kyra/kyra_v2.cpp | 3 +++ 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index f400173cb0..c97bea4c93 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -318,11 +318,9 @@ void KyraEngine_HoF::startup() { _screen->setShapePages(5, 3); - memset(&_mainCharacter, 0, sizeof(_mainCharacter)); _mainCharacter.height = 0x30; _mainCharacter.facing = 4; _mainCharacter.animFrame = 0x12; - memset(_mainCharacter.inventory, -1, sizeof(_mainCharacter.inventory)); memset(_sceneAnims, 0, sizeof(_sceneAnims)); for (int i = 0; i < ARRAYSIZE(_sceneAnimMovie); ++i) diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 9aa50637d0..c54a3278dd 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -71,13 +71,11 @@ KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngi _gfxBackUpRect = 0; _paletteOverlay = 0; _sceneList = 0; - memset(&_mainCharacter, 0, sizeof(_mainCharacter)); _mainCharacter.sceneId = 9; _mainCharacter.height = 0x4C; _mainCharacter.facing = 5; _mainCharacter.animFrame = 0x57; _mainCharacter.walkspeed = 5; - memset(_mainCharacter.inventory, -1, sizeof(_mainCharacter.inventory)); _text = 0; _commandLineY = 189; _inventoryState = false; @@ -539,8 +537,6 @@ void KyraEngine_MR::startup() { debugC(9, kDebugLevelMain, "KyraEngine_MR::startup()"); musicUpdate(0); - memset(_flagsTable, 0, sizeof(_flagsTable)); - _gamePlayBuffer = new uint8[64000]; musicUpdate(0); musicUpdate(0); diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 422984490a..c3d5b430b9 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -66,6 +66,9 @@ KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const Engi _debugger = 0; _screenBuffer = 0; + + memset(&_mainCharacter, 0, sizeof(_mainCharacter)); + memset(&_mainCharacter.inventory, -1, sizeof(_mainCharacter.inventory)); } KyraEngine_v2::~KyraEngine_v2() { -- cgit v1.2.3 From 11f891963bec97357b69e2e0f4b1639808becab3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 6 May 2008 20:50:27 +0000 Subject: Implemented Engine::getDebugger for KyraEngine. svn-id: r31906 --- engines/kyra/kyra.cpp | 7 +++++++ engines/kyra/kyra.h | 4 ++++ engines/kyra/kyra_v1.cpp | 2 -- engines/kyra/kyra_v1.h | 2 -- engines/kyra/kyra_v2.cpp | 2 -- engines/kyra/kyra_v2.h | 2 -- 6 files changed, 11 insertions(+), 8 deletions(-) diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp index 05d8b79a4e..e35e91731d 100644 --- a/engines/kyra/kyra.cpp +++ b/engines/kyra/kyra.cpp @@ -35,6 +35,7 @@ #include "kyra/text.h" #include "kyra/timer.h" #include "kyra/script.h" +#include "kyra/debugger.h" namespace Kyra { @@ -46,6 +47,7 @@ KyraEngine::KyraEngine(OSystem *system, const GameFlags &flags) _staticres = 0; _timer = 0; _emc = 0; + _debugger = 0; _gameSpeed = 60; _tickLength = (uint8)(1000.0 / _gameSpeed); @@ -78,6 +80,10 @@ KyraEngine::KyraEngine(OSystem *system, const GameFlags &flags) system->getEventManager()->registerRandomSource(_rnd, "kyra"); } +::GUI::Debugger *KyraEngine::getDebugger() { + return _debugger; +} + int KyraEngine::init() { registerDefaultSettings(); @@ -201,6 +207,7 @@ KyraEngine::~KyraEngine() { delete _text; delete _timer; delete _emc; + delete _debugger; } void KyraEngine::quitGame() { diff --git a/engines/kyra/kyra.h b/engines/kyra/kyra.h index 18a4a52fe2..66ecb2704c 100644 --- a/engines/kyra/kyra.h +++ b/engines/kyra/kyra.h @@ -97,6 +97,7 @@ class Movie; class TextDisplayer; class StaticResource; class TimerManager; +class Debugger; class KyraEngine : public Engine { friend class Debugger; @@ -106,6 +107,8 @@ public: KyraEngine(OSystem *system, const GameFlags &flags); virtual ~KyraEngine(); + ::GUI::Debugger *getDebugger(); + bool quit() const { return _quitFlag; } uint8 game() const { return _flags.gameID; } @@ -176,6 +179,7 @@ protected: StaticResource *_staticres; TimerManager *_timer; EMCInterpreter *_emc; + Debugger *_debugger; // config specific virtual void registerDefaultSettings(); diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index e9bb25fe5f..98514a3c37 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -77,7 +77,6 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags) _drinkAnimationTable = _brandonToWispTable = _magicAnimationTable = _brandonStoneTable = 0; _drinkAnimationTableSize = _brandonToWispTableSize = _magicAnimationTableSize = _brandonStoneTableSize = 0; memset(&_specialPalettes, 0, sizeof(_specialPalettes)); - _debugger = 0; _sprites = 0; _animator = 0; _seq = 0; @@ -113,7 +112,6 @@ KyraEngine_v1::~KyraEngine_v1() { Common::clearAllSpecialDebugLevels(); delete _screen; - delete _debugger; delete _sprites; delete _animator; delete _seq; diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 50791c3ade..801d3b9189 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -37,7 +37,6 @@ class Movie; class SoundDigital; class SeqPlayer; class Sprites; -class Debugger; class Animator_v1; class TextDisplayer; class KyraEngine_v1; @@ -480,7 +479,6 @@ protected: SeqPlayer *_seq; Sprites *_sprites; Screen_v1 *_screen; - Debugger *_debugger; EMCState _scriptMain; diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index c3d5b430b9..ccea7e08bb 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -64,7 +64,6 @@ KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const Engi memset(_hiddenItems, -1, sizeof(_hiddenItems)); - _debugger = 0; _screenBuffer = 0; memset(&_mainCharacter, 0, sizeof(_mainCharacter)); @@ -89,7 +88,6 @@ KyraEngine_v2::~KyraEngine_v2() { delete *i; _opcodesAnimation.clear(); - delete _debugger; delete[] _screenBuffer; } diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index f0d26ca011..b8b7c843dd 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -36,7 +36,6 @@ namespace Kyra { class Screen_v2; -class Debugger_v2; class KyraEngine_v2 : public KyraEngine { friend class Debugger_v2; @@ -63,7 +62,6 @@ public: const EngineDesc &engineDesc() const { return _desc; } protected: EngineDesc _desc; - Debugger_v2 *_debugger; // run bool _runFlag; -- cgit v1.2.3 From 5abc85bd0e4e0801e7774e0f3efffcc6213ae88e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 6 May 2008 20:55:33 +0000 Subject: Fixed possible crash in Debugger_v2 when using 'give'. svn-id: r31907 --- engines/kyra/debugger.cpp | 5 ++--- engines/kyra/kyra_hof.cpp | 5 ++++- engines/kyra/kyra_mr.cpp | 5 ++++- engines/kyra/kyra_v2.h | 3 +++ 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp index 51e4d17487..f90cf5a37b 100644 --- a/engines/kyra/debugger.cpp +++ b/engines/kyra/debugger.cpp @@ -421,9 +421,8 @@ bool Debugger_v2::cmd_giveItem(int argc, const char **argv) { if (argc == 2) { int item = atoi(argv[1]); - // Kyrandia 2 has only 178 items (-1 to 176), otherwise it will crash - if (item < -1 || item > 176) { - DebugPrintf("itemid must be any value between (including) -1 and 176\n"); + if (item < -1 || item > _vm->engineDesc().maxItemId) { + DebugPrintf("itemid must be any value between (including) -1 and %d\n", _vm->engineDesc().maxItemId); return true; } diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index c97bea4c93..693ae36d69 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -49,7 +49,10 @@ const KyraEngine_v2::EngineDesc KyraEngine_HoF::_hofEngineDesc = { 8, // Animation script specific - 33 + 33, + + // Item specific + 175 }; KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEngine_v2(system, flags, _hofEngineDesc), _updateFunctor(this, &KyraEngine_HoF::update) { diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index c54a3278dd..5e23813eb2 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -50,7 +50,10 @@ const KyraEngine_v2::EngineDesc KyraEngine_MR::_mrEngineDesc = { 9, // Animation script specific - 9 + 9, + + // Item specific + 71 }; KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngine_v2(system, flags, _mrEngineDesc) { diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index b8b7c843dd..639594e593 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -51,6 +51,9 @@ public: // Animation script specific const int animScriptFrameAdd; + + // Item specific + const int maxItemId; }; KyraEngine_v2(OSystem *system, const GameFlags &flags, const EngineDesc &desc); -- cgit v1.2.3 From 9be06ad9e82226bad6c70fc37dcc7db390ce3778 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 6 May 2008 21:56:16 +0000 Subject: Fixed text positioning in Woodruff, enabling "Use FOO on BAR" texts. svn-id: r31908 --- engines/gob/draw_v2.cpp | 38 +++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 8f7d5b325b..baca917877 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -246,22 +246,25 @@ void Draw_v2::printTotText(int16 id) { } if (_renderFlags & RENDERFLAG_FROMSPLIT) { - destY = _vm->_video->_splitStart; + destY = _vm->_video->_splitHeight1; spriteBottom = READ_LE_UINT16(ptr + 6) - READ_LE_UINT16(ptr + 2); + if (_renderFlags & RENDERFLAG_DOUBLECOORDS) spriteBottom *= 3; - spriteBottom += _vm->_video->_splitStart; + + spriteBottom += _vm->_video->_splitHeight1; + if (_renderFlags & RENDERFLAG_DOUBLECOORDS) { - spriteBottom += _backDeltaX; - destY += _backDeltaX; + spriteBottom += _backDeltaY; + destY += _backDeltaY; } } else { + destY = READ_LE_UINT16(ptr + 2); + spriteBottom = READ_LE_UINT16(ptr + 6); + if (_renderFlags & RENDERFLAG_DOUBLECOORDS) { - destY = READ_LE_UINT16(ptr + 2) * 2; - spriteBottom = READ_LE_UINT16(ptr + 6) * 2; - } else { - destY = READ_LE_UINT16(ptr + 2); - spriteBottom = READ_LE_UINT16(ptr + 6); + destY *= 2; + spriteBottom *= 2; } } @@ -629,8 +632,7 @@ void Draw_v2::spriteOperation(int16 operation) { _destSpriteX += _backDeltaX; _destSpriteY += _backDeltaY; if ((operation == DRAW_DRAWLINE) || - ((operation >= DRAW_DRAWBAR) && - (operation <= DRAW_FILLRECTABS))) { + ((operation >= DRAW_DRAWBAR) && (operation <= DRAW_FILLRECTABS))) { _spriteRight += _backDeltaX; _spriteBottom += _backDeltaY; } @@ -646,6 +648,20 @@ void Draw_v2::spriteOperation(int16 operation) { int16 destSurface = _destSurface; int16 sourceSurface = _sourceSurface; + if ((_destSpriteY >= _vm->_video->_splitHeight1) && + ((_destSurface == 20) || (_destSurface == 21))) { + + _destSpriteY = (_destSpriteY - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; + if ((operation == DRAW_DRAWLINE) || + ((operation >= DRAW_DRAWBAR) && (operation <= DRAW_FILLRECTABS))) + _spriteBottom = (_spriteBottom - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; + + } + + if ((_spriteTop >= _vm->_video->_splitHeight1) && (operation == DRAW_BLITSURF) && + ((_destSurface == 20) || (_destSurface == 21))) + _spriteTop = (_spriteTop - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; + adjustCoords(0, &_destSpriteX, &_destSpriteY); if ((operation != DRAW_LOADSPRITE) && (_needAdjust != 2)) { adjustCoords(0, &_spriteRight, &_spriteBottom); -- cgit v1.2.3 From 10b73b474f5618b91456db91f3e5e18a18fa0f97 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 6 May 2008 22:05:26 +0000 Subject: Fixed crash when qutting kyra2 main menu. svn-id: r31909 --- engines/kyra/kyra_hof.cpp | 14 ++++++-------- engines/kyra/kyra_hof.h | 2 -- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 693ae36d69..4ca695542c 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -56,7 +56,6 @@ const KyraEngine_v2::EngineDesc KyraEngine_HoF::_hofEngineDesc = { }; KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEngine_v2(system, flags, _hofEngineDesc), _updateFunctor(this, &KyraEngine_HoF::update) { - _mouseSHPBuf = 0; _screen = 0; _text = 0; @@ -151,7 +150,6 @@ KyraEngine_HoF::~KyraEngine_HoF() { cleanup(); seq_uninit(); - delete [] _mouseSHPBuf; delete _screen; delete _text; delete _gui; @@ -223,11 +221,14 @@ int KyraEngine_HoF::init() { if (_flags.isDemo && !_flags.isTalkie) return 0; - _mouseSHPBuf = _res->fileData("PWGMOUSE.SHP", 0); - assert(_mouseSHPBuf); + _res->exists("PWGMOUSE.SHP", true); + uint8 *shapes = _res->fileData("PWGMOUSE.SHP", 0); + assert(shapes); for (int i = 0; i < 2; i++) - addShapeToPool(_screen->getPtrToShape(_mouseSHPBuf, i), i); + addShapeToPool(shapes, i, i); + + delete[] shapes; _screen->setMouseCursor(0, 0, getShapePtr(0)); return 0; @@ -285,10 +286,7 @@ void KyraEngine_HoF::startup() { allocAnimObjects(1, 10, 30); _screen->_curPage = 0; - delete [] _mouseSHPBuf; - _mouseSHPBuf = 0; - _gameShapes.clear(); memset(_sceneShapeTable, 0, sizeof(_sceneShapeTable)); _gamePlayBuffer = new uint8[46080]; _unkBuf500Bytes = new uint8[500]; diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index 1e6c23331e..3a745fe502 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -291,8 +291,6 @@ protected: TextDisplayer_HoF *_text; TIMInterpreter *_tim; - uint8 *_mouseSHPBuf; - static const int8 _dosTrackMap[]; static const int _dosTrackMapSize; -- cgit v1.2.3 From 586046d871806dcee92a48eca585955e937af6f6 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 6 May 2008 22:09:27 +0000 Subject: Fail on invalid --enable/disable options svn-id: r31910 --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index d71501098a..2c2e81c4a7 100755 --- a/configure +++ b/configure @@ -374,7 +374,7 @@ engine_enable() { fi engine=`echo $eng | sed 's/-/_/g'` if test "$opt" = "static" -o "$opt" = "dynamic" -o "$opt" = "yes" ; then - if test "`get_engine_build ${engine}`" != "$opt" ; then + if test "`get_engine_name ${engine}`" != "" -a "`get_engine_build ${engine}`" != "$opt" ; then eval _engine_${engine}_build=$opt else option_error @@ -387,7 +387,7 @@ engine_enable() { # Disable the given engine engine_disable() { engine=`echo $1 | sed 's/-/_/g'` - if test "`get_engine_build $engine`" != "no" ; then + if test "`get_engine_name ${engine}`" != "" -a "`get_engine_build $engine`" != "no" ; then eval _engine_${engine}_build=no else option_error -- cgit v1.2.3 From 16abd33aeace5c830b085c32ac570f5ef0b828fc Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 6 May 2008 22:18:12 +0000 Subject: Mouse hotspots are now properly evaluated when the mouse is set to a position via the scripts. svn-id: r31911 --- engines/gob/draw_v2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index baca917877..88d30b8e8a 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -178,13 +178,13 @@ void Draw_v2::animateCursor(int16 cursor) { _vm->_util->delay(5); } } - } else + } else { blitCursor(); + _cursorX = newX; + _cursorY = newY; + } _showCursor &= ~1; - - _cursorX = newX; - _cursorY = newY; } void Draw_v2::printTotText(int16 id) { -- cgit v1.2.3 From cdc4f4baca25591eeb6815b82c3fcd6db779e650 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 6 May 2008 23:56:05 +0000 Subject: Added openembedded.org target names (patch #1959138) svn-id: r31912 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 2c2e81c4a7..ef22e60d9d 100755 --- a/configure +++ b/configure @@ -1061,7 +1061,7 @@ if test -n "$_host"; then type_2_byte='short' type_4_byte='int' ;; - arm-linux|arm-linux-gnueabi|arm-*-linux-gnueabi) + arm-linux|arm*-linux-gnueabi|arm-*-linux|*-angstrom-linux) echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes" DEFINES="$DEFINES -DUNIX -DUSE_ARM_SOUND_ASM -DUSE_ARM_SMUSH_ASM" #not true for all ARM systems, but the interesting ones are all LE. Most (if not all) BE arm devices don't have a screen -- cgit v1.2.3 From 0fe0f093c7266c9407b9c0e93f73865883c9af25 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Wed, 7 May 2008 00:35:55 +0000 Subject: Show the SCUMM engine options properly svn-id: r31913 --- configure | 53 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/configure b/configure index ef22e60d9d..134bec4c08 100755 --- a/configure +++ b/configure @@ -453,33 +453,38 @@ prepare_engine_build_strings() { get_engine_build_string() { engine_string="" engine_build=`get_engine_build $1` - if test $engine_build = no ; then - # The engine is disabled + show=no + + # Check if the current engine should be shown for the current status + if test $engine_build = $2 ; then + show=yes + else + # Test for disabled sub-engines if test $2 = no ; then - engine_string=`get_engine_name $1` - else - engine_string="" + for subeng in `get_engine_subengines $1` ; do + if test `get_engine_build $subeng` = no ; then + engine_build=no + show=yes + fi + done fi - else - # The engine is enabled, get the custom string + fi + + # Convert static/dynamic to yes to ease the check of subengines + if test $engine_build != no ; then + engine_build=yes + fi + + # The engine should be shown, build the string + if test $show = yes ; then build_string_func=get_${1}_build_string if ( type $build_string_func | grep function ) 2> /dev/null > /dev/null ; then - engine_string=`$build_string_func $1 $2` + engine_string=`$build_string_func $1 $engine_build` else - engine_string=`get_subengines_build_string $1 $2` + engine_string=`get_subengines_build_string $1 $engine_build` fi - if test $2 = no ; then - if test -n "$engine_string" ; then - engine_string="`get_engine_name $1` $engine_string" - fi - else - if test $2 = $engine_build ; then - engine_string="`get_engine_name $1` $engine_string" - else - engine_string="" - fi - fi + engine_string="`get_engine_name $1` $engine_string" fi echo $engine_string @@ -523,10 +528,12 @@ get_sword2_build_string() { } get_scumm_build_string() { - if test $2 != no ; then - base="[v0-v6 games]" + if test `get_engine_build $1` != no ; then + if test $2 != no ; then + base="[v0-v6 games]" + fi + get_subengines_build_string $1 $2 "$base" fi - get_subengines_build_string $1 $2 "$base" } # -- cgit v1.2.3 From f1514641ee8263503e59654fc46856364a96e144 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Wed, 7 May 2008 01:15:46 +0000 Subject: Reject invalid option combinations when enabling/disabling engines svn-id: r31914 --- configure | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/configure b/configure index 134bec4c08..ea627e4fd8 100755 --- a/configure +++ b/configure @@ -373,6 +373,13 @@ engine_enable() { opt=yes fi engine=`echo $eng | sed 's/-/_/g'` + + # Filter the parameter for the subengines + if test "`get_engine_sub ${engine}`" != "no" -a "$opt" != "yes" ; then + option_error + return + fi + if test "$opt" = "static" -o "$opt" = "dynamic" -o "$opt" = "yes" ; then if test "`get_engine_name ${engine}`" != "" -a "`get_engine_build ${engine}`" != "$opt" ; then eval _engine_${engine}_build=$opt @@ -386,6 +393,12 @@ engine_enable() { # Disable the given engine engine_disable() { + # Filter malformed options + if ( echo $1 | grep '=' ) 2> /dev/null > /dev/null ; then + option_error + return + fi + engine=`echo $1 | sed 's/-/_/g'` if test "`get_engine_name ${engine}`" != "" -a "`get_engine_build $engine`" != "no" ; then eval _engine_${engine}_build=no -- cgit v1.2.3 From 5681ae1e82ba2c125928ecbfbd937cb187c06aa4 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 7 May 2008 02:56:18 +0000 Subject: Draw order related fixes. This also (finally) fixes the Gob3 draw order glitch (for real, this time) svn-id: r31915 --- engines/gob/inter_v2.cpp | 2 +- engines/gob/mult.h | 4 +- engines/gob/mult_v2.cpp | 100 +++++++++++++++++++++++------------------------ engines/gob/scenery.cpp | 14 ++++--- engines/gob/scenery.h | 6 +-- 5 files changed, 64 insertions(+), 62 deletions(-) diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index be510df08a..2442e4dcf2 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -899,7 +899,7 @@ void Inter_v2::o2_initMult() { if (_terminate) return; - _vm->_mult->_orderArray = new uint8[_vm->_mult->_objCount]; + _vm->_mult->_orderArray = new int8[_vm->_mult->_objCount]; memset(_vm->_mult->_orderArray, 0, _vm->_mult->_objCount * sizeof(int8)); _vm->_mult->_objects = new Mult::Mult_Object[_vm->_mult->_objCount]; memset(_vm->_mult->_objects, 0, diff --git a/engines/gob/mult.h b/engines/gob/mult.h index c283191ec8..aaf2e2826c 100644 --- a/engines/gob/mult.h +++ b/engines/gob/mult.h @@ -40,7 +40,7 @@ public: uint8 layer; uint8 frame; int8 animType; - uint8 order; + int8 order; int8 isPaused; int8 isStatic; int8 maxTick; @@ -229,7 +229,7 @@ public: int16 *_renderData; Mult_Object **_renderObjs; - uint8 *_orderArray; + int8 *_orderArray; SurfaceDesc::Ptr _animSurf; int16 _animLeft; diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index 02211880ba..9045089632 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -526,14 +526,14 @@ void Mult_v2::playMultInit() { delete[] _animArrayData; _objects = new Mult_Object[_objCount]; - _orderArray = new uint8[_objCount]; + _orderArray = new int8[_objCount]; _renderObjs = new Mult_Object*[_objCount]; _animArrayX = new int32[_objCount]; _animArrayY = new int32[_objCount]; _animArrayData = new Mult_AnimData[_objCount]; memset(_objects, 0, _objCount * sizeof(Mult_Object)); - memset(_orderArray, 0, _objCount * sizeof(uint8)); + memset(_orderArray, 0, _objCount * sizeof(int8)); memset(_renderObjs, 0, _objCount * sizeof(Mult_Object *)); memset(_animArrayX, 0, _objCount * sizeof(int32)); memset(_animArrayY, 0, _objCount * sizeof(int32)); @@ -768,9 +768,9 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) { } void Mult_v2::animate() { - uint8 minOrder = 100; - uint8 maxOrder = 0; - uint8 *orderArray; + int8 minOrder = 100; + int8 maxOrder = 0; + int8 *orderArray; int orderArrayPos = 0; int8 animIndices[150]; int numAnims = 0; @@ -952,60 +952,58 @@ void Mult_v2::animate() { Mult_Object &animObj1 = *_renderObjs[orderArray[i]]; Mult_AnimData &animData1 = *(animObj1.pAnimData); - if (!animObj1.needRedraw && !animData1.isStatic) { - for (int j = 0; j < orderArrayPos; j++) { - Mult_Object &animObj2 = *_renderObjs[orderArray[j]]; + if (!animObj1.needRedraw) { - if (!animObj2.needRedraw) - continue; + if (!animData1.isStatic) { + for (int j = 0; j < orderArrayPos; j++) { + Mult_Object &animObj2 = *_renderObjs[orderArray[j]]; - if ((animObj1.newRight >= animObj2.newLeft) && - (animObj2.newRight >= animObj1.newLeft) && - (animObj1.newBottom >= animObj2.newTop) && - (animObj2.newBottom >= animObj1.newTop)) { + if (!animObj2.needRedraw) + continue; - _vm->_scenery->_toRedrawLeft = animObj2.newLeft; - _vm->_scenery->_toRedrawRight = animObj2.newRight; - _vm->_scenery->_toRedrawTop = animObj2.newTop; - _vm->_scenery->_toRedrawBottom = animObj2.newBottom; + if ((animObj1.newRight >= animObj2.newLeft) && + (animObj2.newRight >= animObj1.newLeft) && + (animObj1.newBottom >= animObj2.newTop) && + (animObj2.newBottom >= animObj1.newTop)) { - _vm->_scenery->updateAnim(animData1.layer, animData1.frame, - animData1.animation, 12, *animObj1.pPosX, *animObj1.pPosY, 1); - _vm->_scenery->updateStatic(animData1.order + 1); + _vm->_scenery->_toRedrawLeft = animObj2.newLeft; + _vm->_scenery->_toRedrawRight = animObj2.newRight; + _vm->_scenery->_toRedrawTop = animObj2.newTop; + _vm->_scenery->_toRedrawBottom = animObj2.newBottom; + + _vm->_scenery->updateAnim(animData1.layer, animData1.frame, + animData1.animation, 12, *animObj1.pPosX, *animObj1.pPosY, 1); + _vm->_scenery->updateStatic(animData1.order + 1); + } } } - } else if (!animData1.isStatic) { - _vm->_scenery->updateAnim(animData1.layer, animData1.frame, - animData1.animation, 10, *animObj1.pPosX, *animObj1.pPosY, 1); - - if (_vm->_scenery->_toRedrawLeft != -12345) { - if (_vm->_global->_pressedKeys[0x36]) { - _vm->_video->drawLine(_vm->_draw->_frontSurface, - _vm->_scenery->_toRedrawLeft, _vm->_scenery->_toRedrawTop, - _vm->_scenery->_toRedrawRight, _vm->_scenery->_toRedrawTop, 15); - _vm->_video->drawLine(_vm->_draw->_frontSurface, - _vm->_scenery->_toRedrawLeft, _vm->_scenery->_toRedrawBottom, - _vm->_scenery->_toRedrawRight, _vm->_scenery->_toRedrawBottom, 15); - _vm->_video->drawLine(_vm->_draw->_frontSurface, - _vm->_scenery->_toRedrawLeft, _vm->_scenery->_toRedrawTop, - _vm->_scenery->_toRedrawLeft, _vm->_scenery->_toRedrawBottom, 15); - _vm->_video->drawLine(_vm->_draw->_frontSurface, - _vm->_scenery->_toRedrawRight, _vm->_scenery->_toRedrawTop, - _vm->_scenery->_toRedrawRight, _vm->_scenery->_toRedrawBottom, 15); - } - animObj1.lastLeft = _vm->_scenery->_toRedrawLeft; - animObj1.lastRight = _vm->_scenery->_toRedrawRight; - animObj1.lastTop = _vm->_scenery->_toRedrawTop; - animObj1.lastBottom = _vm->_scenery->_toRedrawBottom; - } else - animObj1.lastLeft = -1; + } else { - _vm->_scenery->_toRedrawLeft = animObj1.newLeft; - _vm->_scenery->_toRedrawRight = animObj1.newRight; - _vm->_scenery->_toRedrawTop = animObj1.newTop; - _vm->_scenery->_toRedrawBottom = animObj1.newBottom; + + if (animData1.isStatic != 0) { + _vm->_scenery->_toRedrawLeft = animObj1.newLeft; + _vm->_scenery->_toRedrawRight = animObj1.newRight; + _vm->_scenery->_toRedrawTop = animObj1.newTop; + _vm->_scenery->_toRedrawBottom = animObj1.newBottom; + } else { + _vm->_scenery->updateAnim(animData1.layer, animData1.frame, + animData1.animation, 10, *animObj1.pPosX, *animObj1.pPosY, 1); + + if (_vm->_scenery->_toRedrawLeft != -12345) { + animObj1.lastLeft = _vm->_scenery->_toRedrawLeft; + animObj1.lastRight = _vm->_scenery->_toRedrawRight; + animObj1.lastTop = _vm->_scenery->_toRedrawTop; + animObj1.lastBottom = _vm->_scenery->_toRedrawBottom; + } else { + animObj1.lastLeft = -1; + } + + } + + _vm->_scenery->updateStatic(animData1.order + 1); + } - _vm->_scenery->updateStatic(animData1.order + 1); + } // Advance animations diff --git a/engines/gob/scenery.cpp b/engines/gob/scenery.cpp index 3f9ec9e6f2..62a4dbad2f 100644 --- a/engines/gob/scenery.cpp +++ b/engines/gob/scenery.cpp @@ -155,9 +155,9 @@ int16 Scenery::loadStatic(char search) { ptr->layers[i].planes = new StaticPlane[ptr->layers[i].planeCount]; for (int j = 0; j < ptr->layers[i].planeCount; ++j) { - ptr->layers[i].planes[j].pictIndex = layerData.readSByte(); - ptr->layers[i].planes[j].pieceIndex = layerData.readSByte(); - ptr->layers[i].planes[j].drawOrder = layerData.readSByte(); + ptr->layers[i].planes[j].pictIndex = layerData.readByte(); + ptr->layers[i].planes[j].pieceIndex = layerData.readByte(); + ptr->layers[i].planes[j].drawOrder = layerData.readByte(); ptr->layers[i].planes[j].destX = layerData.readSint16LE(); ptr->layers[i].planes[j].destY = layerData.readSint16LE(); ptr->layers[i].planes[j].transp = layerData.readSByte(); @@ -278,7 +278,7 @@ void Scenery::renderStatic(int16 scenery, int16 layer) { } planeCount = layerPtr->planeCount; - for (order = 0; order < 40; order++) { + for (order = 0; order < 100; order++) { for (plane = 0, planePtr = layerPtr->planes; plane < planeCount; plane++, planePtr++) { if (planePtr->drawOrder != order) @@ -330,7 +330,7 @@ void Scenery::updateStatic(int16 orderFrom, byte index, byte layer) { planeCount = layerPtr->planeCount; - for (order = orderFrom; order < 40; order++) { + for (order = orderFrom; order < 100; order++) { for (planePtr = layerPtr->planes, plane = 0; plane < planeCount; plane++, planePtr++) { if (planePtr->drawOrder != order) @@ -338,6 +338,10 @@ void Scenery::updateStatic(int16 orderFrom, byte index, byte layer) { pieceIndex = planePtr->pieceIndex; pictIndex = planePtr->pictIndex - 1; + + if ((pictIndex >= _staticPictCount[index]) || (!pictPtr[pictIndex])) + continue; + _vm->_draw->_destSpriteX = planePtr->destX; _vm->_draw->_destSpriteY = planePtr->destY; diff --git a/engines/gob/scenery.h b/engines/gob/scenery.h index a1a1304d4d..03ef84e16d 100644 --- a/engines/gob/scenery.h +++ b/engines/gob/scenery.h @@ -41,9 +41,9 @@ public: } PACKED_STRUCT; struct StaticPlane { - int8 pictIndex; - int8 pieceIndex; - int8 drawOrder; + uint8 pictIndex; + uint8 pieceIndex; + uint8 drawOrder; int16 destX; int16 destY; int8 transp; -- cgit v1.2.3 From 9d5eea2d2c3f79147b15fb7920cd6d5de8e15d44 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 7 May 2008 03:49:53 +0000 Subject: Sound in object videos works now, too svn-id: r31916 --- engines/gob/mult_v2.cpp | 5 +++++ engines/gob/videoplayer.cpp | 12 +++++++++++- engines/gob/videoplayer.h | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index 9045089632..5ff0612497 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -686,6 +686,11 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) { return; animLayer = _vm->_scenery->getAnimLayer(nAnim, nLayer); + } else { + if (animObj.videoSlot > 0) { + _vm->_video->retrace(); + _vm->_vidPlayer->slotWaitEndFrame(animObj.videoSlot - 1, true); + } } if (animData.animType == 4) { diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index e088646498..6b21c18676 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -334,7 +334,7 @@ int VideoPlayer::slotOpen(const char *videoFile, Type which) { } video->getVideo()->setVideoMemory(); - video->getVideo()->disableSound(); + video->getVideo()->enableSound(*_vm->_mixer); _videoSlots.push_back(video); @@ -388,6 +388,16 @@ void VideoPlayer::slotCopyPalette(int slot, int16 palStart, int16 palEnd) { copyPalette(*(_videoSlots[slot]->getVideo()), palStart, palEnd); } +void VideoPlayer::slotWaitEndFrame(int slot, bool onlySound) { + if ((slot < 0) || (((uint) slot) >= _videoSlots.size())) + return; + + CoktelVideo &video = *(_videoSlots[slot]->getVideo()); + + if (!onlySound || (video.getFeatures() & CoktelVideo::kFeaturesSound)) + video.waitEndFrame(); +} + bool VideoPlayer::slotIsOpen(int slot) const { if ((slot >= 0) && (((uint) slot) < _videoSlots.size())) return true; diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index fd3c68aa1a..a04a0dbc9d 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -68,6 +68,7 @@ public: uint16 left, uint16 top, uint16 width, uint16 height, uint16 x, uint16 y, uint16 pitch, int16 transp = -1); void slotCopyPalette(int slot, int16 palStart = -1, int16 palEnd = -1); + void slotWaitEndFrame(int slot, bool onlySound = false); bool slotIsOpen(int slot) const; -- cgit v1.2.3 From 202e4eb41072da9167430ec25a33153974c15bcf Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 7 May 2008 07:15:42 +0000 Subject: Added detection for RtZ CD version 1.0 (thanks to spookypeanut) svn-id: r31917 --- engines/made/detection.cpp | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp index 6da3189163..37eac1327b 100644 --- a/engines/made/detection.cpp +++ b/engines/made/detection.cpp @@ -74,7 +74,41 @@ namespace Made { static const MadeGameDescription gameDescriptions[] = { { - // Return to Zork - English CD version + // Return to Zork - English CD version 1.0 9/15/93 + // Patch #1953654 submitted by spookypeanut + { + "rtz", + "CD", + AD_ENTRY1("rtzcd.dat", "e95c38ded389e39cfbf87a8cb250b12e"), + Common::EN_ANY, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + GID_RTZ, + 0, + GF_CD, + 0, + }, + + { + // Return to Zork - English CD version 1.0 9/15/93 + // Patch #1953654 submitted by spookypeanut + { + "rtz", + "CD", + AD_ENTRY1("rtzcd.red", "cd8b62ece4677c438688c1de3f5379b9"), + Common::EN_ANY, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + GID_RTZ, + 0, + GF_CD, + 0, + }, + + { + // Return to Zork - English CD version 1.1 12/7/93 // NOTE: This detects the game via the rtzcd.dat which is inside rtzcd.red. // The entry below detects via rtzcd.red directly, which is the "official" way. { -- cgit v1.2.3 From 46f1e986883363cecc320135acd6a366b4fbd320 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 7 May 2008 08:19:36 +0000 Subject: Fixed RTZ 1.0 game flags and updated copyright svn-id: r31918 --- engines/made/detection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp index 37eac1327b..7f12a85611 100644 --- a/engines/made/detection.cpp +++ b/engines/made/detection.cpp @@ -103,7 +103,7 @@ static const MadeGameDescription gameDescriptions[] = { }, GID_RTZ, 0, - GF_CD, + GF_CD_COMPRESSED, 0, }, @@ -274,7 +274,7 @@ public: } virtual const char *getCopyright() const { - return "MADE Engine"; + return "MADE Engine (C) Activision"; } virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const; -- cgit v1.2.3 From 8f9cc2e1645e8878f7804ff47769490dc830858f Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 7 May 2008 08:25:13 +0000 Subject: Added patch #1956516: MADE: Fix Save File Names by clone2727 (with some modifications) svn-id: r31919 --- engines/made/made.cpp | 10 +++++++++- engines/made/made.h | 5 +++++ engines/made/scriptfuncs_rtz.cpp | 20 +++++++------------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 932f5ddcc4..0cf73d5dd0 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -107,6 +107,8 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng debug(1, "Music disabled."); } + _quit = false; + _soundRate = 8000; } @@ -157,6 +159,12 @@ void MadeEngine::freeTimer(int16 timerNum) { _timers[timerNum] = -1; } +Common::String MadeEngine::getSavegameFilename(int16 saveNum) { + char filename[256]; + snprintf(filename, 256, "%s.%03d", getTargetName().c_str(), saveNum); + return filename; +} + int MadeEngine::go() { for (int i = 0; i < ARRAYSIZE(_timers); i++) @@ -191,7 +199,7 @@ int MadeEngine::go() { error ("Unknown MADE game"); } - _eventMouseX = _eventMouseY = 0; + _eventKey = _eventMouseX = _eventMouseY = 0; _script->runScript(_dat->getMainCodeObjectIndex()); return 0; diff --git a/engines/made/made.h b/engines/made/made.h index b3a25b4e02..f6f7fefd83 100644 --- a/engines/made/made.h +++ b/engines/made/made.h @@ -102,6 +102,8 @@ public: ScriptInterpreter *_script; MusicPlayer *_music; + bool _quit; + int _eventMouseX, _eventMouseY; uint16 _eventKey; int _soundRate; @@ -118,6 +120,9 @@ public: int16 allocTimer(); void freeTimer(int16 timerNum); + const Common::String getTargetName() { return _targetName; } + Common::String getSavegameFilename(int16 saveNum); + }; } // End of namespace Made diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp index 20f6df8918..8f173dfa57 100644 --- a/engines/made/scriptfuncs_rtz.cpp +++ b/engines/made/scriptfuncs_rtz.cpp @@ -778,11 +778,9 @@ int16 ScriptFunctionsRtz::o1_SAVEGAME(int16 argc, int16 *argv) { Object *obj = _vm->_dat->getObject(descObjectIndex); const char *description = obj->getString(); - // TODO: Use better filename - char filename[256]; - snprintf(filename, 256, "rtz.%03d", saveNum); - - return _vm->_dat->savegame(filename, description, version); + Common::String filename = _vm->getSavegameFilename(saveNum); + + return _vm->_dat->savegame(filename.c_str(), description, version); } @@ -794,11 +792,9 @@ int16 ScriptFunctionsRtz::o1_LOADGAME(int16 argc, int16 *argv) { if (saveNum > 999) return 1; - // TODO: Use better filename - char filename[256]; - snprintf(filename, 256, "rtz.%03d", saveNum); + Common::String filename = _vm->getSavegameFilename(saveNum); - return _vm->_dat->loadgame(filename, version); + return _vm->_dat->loadgame(filename.c_str(), version); } @@ -812,13 +808,11 @@ int16 ScriptFunctionsRtz::o1_GAMENAME(int16 argc, int16 *argv) { if (saveNum > 999) return 1; - // TODO: Use better filename - char filename[256]; - snprintf(filename, 256, "rtz.%03d", saveNum); + Common::String filename = _vm->getSavegameFilename(saveNum); Object *obj = _vm->_dat->getObject(descObjectIndex); - if (_vm->_dat->getSavegameDescription(filename, description)) { + if (_vm->_dat->getSavegameDescription(filename.c_str(), description)) { obj->setString(description.c_str()); return 0; } else { -- cgit v1.2.3 From a3dbf43629b44c49156c33ff5b178ec8aaf93a03 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 7 May 2008 08:29:11 +0000 Subject: Fixed signed/unsigned issues with kFlagsAll svn-id: r31920 --- engines/parallaction/parallaction.cpp | 8 ++++---- engines/parallaction/parallaction.h | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index 649f21ae96..862379bd2e 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -737,19 +737,19 @@ void Parallaction::doLocationEnterTransition() { return; } -void Parallaction::setLocationFlags(uint32 flags) { +void Parallaction::setLocationFlags(int32 flags) { _localFlags[_currentLocationIndex] |= flags; } -void Parallaction::clearLocationFlags(uint32 flags) { +void Parallaction::clearLocationFlags(int32 flags) { _localFlags[_currentLocationIndex] &= ~flags; } -void Parallaction::toggleLocationFlags(uint32 flags) { +void Parallaction::toggleLocationFlags(int32 flags) { _localFlags[_currentLocationIndex] ^= flags; } -uint32 Parallaction::getLocationFlags() { +int32 Parallaction::getLocationFlags() { return _localFlags[_currentLocationIndex]; } diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 19ce437410..e19ffd0a34 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -362,10 +362,10 @@ public: Character _char; - void setLocationFlags(uint32 flags); - void clearLocationFlags(uint32 flags); - void toggleLocationFlags(uint32 flags); - uint32 getLocationFlags(); + void setLocationFlags(int32 flags); + void clearLocationFlags(int32 flags); + void toggleLocationFlags(int32 flags); + int32 getLocationFlags(); uint32 _localFlags[NUM_LOCATIONS]; char _locationNames[NUM_LOCATIONS][32]; -- cgit v1.2.3 From aff41a48b89173de8bb93e9ee9ae901f9578c0b5 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 7 May 2008 12:12:18 +0000 Subject: minor tweak to the GUI double click handling code svn-id: r31922 --- gui/newgui.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gui/newgui.cpp b/gui/newgui.cpp index 5e034b726c..0bf61d084f 100644 --- a/gui/newgui.cpp +++ b/gui/newgui.cpp @@ -219,6 +219,7 @@ void NewGui::runLoop() { Dialog *activeDialog = getTopDialog(); bool didSaveState = false; int button; + uint32 time; if (activeDialog == 0) return; @@ -252,7 +253,6 @@ void NewGui::runLoop() { _system->updateScreen(); Common::Event event; - uint32 time = _system->getMillis(); while (eventMan->pollEvent(event)) { if (activeDialog != getTopDialog() && event.type != Common::EVENT_QUIT && event.type != Common::EVENT_SCREEN_CHANGED) @@ -288,6 +288,7 @@ void NewGui::runLoop() { case Common::EVENT_LBUTTONDOWN: case Common::EVENT_RBUTTONDOWN: button = (event.type == Common::EVENT_LBUTTONDOWN ? 1 : 2); + time = _system->getMillis(); if (_lastClick.count && (time < _lastClick.time + kDoubleClickDelay) && ABS(_lastClick.x - event.mouse.x) < 3 && ABS(_lastClick.y - event.mouse.y) < 3) { -- cgit v1.2.3 From 6e61b02cb9c44fd07fe65d7901fe1e4ed765b0c5 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 7 May 2008 12:34:40 +0000 Subject: Silencing a compiler warning svn-id: r31923 --- engines/parallaction/parallaction.cpp | 2 +- engines/parallaction/parallaction.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index 862379bd2e..402738758a 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -741,7 +741,7 @@ void Parallaction::setLocationFlags(int32 flags) { _localFlags[_currentLocationIndex] |= flags; } -void Parallaction::clearLocationFlags(int32 flags) { +void Parallaction::clearLocationFlags(uint32 flags) { _localFlags[_currentLocationIndex] &= ~flags; } diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index e19ffd0a34..a818702f5d 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -363,7 +363,7 @@ public: Character _char; void setLocationFlags(int32 flags); - void clearLocationFlags(int32 flags); + void clearLocationFlags(uint32 flags); void toggleLocationFlags(int32 flags); int32 getLocationFlags(); -- cgit v1.2.3 From 3d3ad58e143d82103dce9f8ac7e816e9979131bc Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Wed, 7 May 2008 12:44:22 +0000 Subject: Reverting commit 31920, thus changing type of flags back to unsigned. If some compiler emits a warning about 0xFFFFFFFF not being an unsigned immediate, then we need to find out how to convince it without changing types of variables in the code. svn-id: r31924 --- engines/parallaction/parallaction.cpp | 6 +++--- engines/parallaction/parallaction.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index 402738758a..649f21ae96 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -737,7 +737,7 @@ void Parallaction::doLocationEnterTransition() { return; } -void Parallaction::setLocationFlags(int32 flags) { +void Parallaction::setLocationFlags(uint32 flags) { _localFlags[_currentLocationIndex] |= flags; } @@ -745,11 +745,11 @@ void Parallaction::clearLocationFlags(uint32 flags) { _localFlags[_currentLocationIndex] &= ~flags; } -void Parallaction::toggleLocationFlags(int32 flags) { +void Parallaction::toggleLocationFlags(uint32 flags) { _localFlags[_currentLocationIndex] ^= flags; } -int32 Parallaction::getLocationFlags() { +uint32 Parallaction::getLocationFlags() { return _localFlags[_currentLocationIndex]; } diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index a818702f5d..19ce437410 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -362,10 +362,10 @@ public: Character _char; - void setLocationFlags(int32 flags); + void setLocationFlags(uint32 flags); void clearLocationFlags(uint32 flags); - void toggleLocationFlags(int32 flags); - int32 getLocationFlags(); + void toggleLocationFlags(uint32 flags); + uint32 getLocationFlags(); uint32 _localFlags[NUM_LOCATIONS]; char _locationNames[NUM_LOCATIONS][32]; -- cgit v1.2.3 From 3d9ea59616cd6f559b8a6e25f56734972fb7badf Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 7 May 2008 14:20:37 +0000 Subject: Changed kyra to use delete[] instead of delete []. svn-id: r31925 --- engines/kyra/animator_v1.cpp | 6 ++--- engines/kyra/gui_hof.cpp | 4 ++-- engines/kyra/gui_v1.cpp | 2 +- engines/kyra/items_v2.cpp | 2 +- engines/kyra/kyra_hof.cpp | 42 ++++++++++++++++---------------- engines/kyra/kyra_mr.cpp | 4 ++-- engines/kyra/kyra_v1.cpp | 30 +++++++++++------------ engines/kyra/kyra_v2.cpp | 2 +- engines/kyra/scene.cpp | 20 ++++++++-------- engines/kyra/scene_hof.cpp | 2 +- engines/kyra/scene_mr.cpp | 4 ++-- engines/kyra/screen.cpp | 32 ++++++++++++------------- engines/kyra/screen_hof.cpp | 2 +- engines/kyra/screen_v1.cpp | 18 +++++++------- engines/kyra/script.cpp | 6 ++--- engines/kyra/script_tim.cpp | 4 ++-- engines/kyra/seqplayer.cpp | 8 +++---- engines/kyra/sequences_hof.cpp | 18 +++++++------- engines/kyra/sequences_mr.cpp | 2 +- engines/kyra/sequences_v1.cpp | 10 ++++---- engines/kyra/sound.cpp | 4 ++-- engines/kyra/sound_adlib.cpp | 6 ++--- engines/kyra/sound_digital.cpp | 10 ++++---- engines/kyra/sound_towns.cpp | 32 ++++++++++++------------- engines/kyra/sprites.cpp | 8 +++---- engines/kyra/staticres.cpp | 54 +++++++++++++++++++++--------------------- engines/kyra/text_hof.cpp | 2 +- engines/kyra/vqa.cpp | 14 +++++------ engines/kyra/wsamovie.cpp | 14 +++++------ 29 files changed, 181 insertions(+), 181 deletions(-) diff --git a/engines/kyra/animator_v1.cpp b/engines/kyra/animator_v1.cpp index ea56efd9fb..619c6c3d70 100644 --- a/engines/kyra/animator_v1.cpp +++ b/engines/kyra/animator_v1.cpp @@ -50,8 +50,8 @@ Animator_v1::Animator_v1(KyraEngine_v1 *vm, OSystem *system) { Animator_v1::~Animator_v1() { close(); - delete [] _actorBkgBackUp[0]; - delete [] _actorBkgBackUp[1]; + delete[] _actorBkgBackUp[0]; + delete[] _actorBkgBackUp[1]; } void Animator_v1::init(int actors_, int items_, int sprites_) { @@ -71,7 +71,7 @@ void Animator_v1::close() { debugC(9, kDebugLevelAnimator, "Animator_v1::close()"); if (_initOk) { _initOk = false; - delete [] _screenObjects; + delete[] _screenObjects; _screenObjects = _actors = _items = _sprites = _objectQueue = 0; } } diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp index d1fcaa4712..cc212d28fc 100644 --- a/engines/kyra/gui_hof.cpp +++ b/engines/kyra/gui_hof.cpp @@ -468,13 +468,13 @@ void KyraEngine_HoF::showBookPage() { if (leftPage) { bookDecodeText(leftPage); bookPrintText(2, leftPage, 20, leftPageY+20, 0x31); - delete [] leftPage; + delete[] leftPage; } if (rightPage) { bookDecodeText(rightPage); bookPrintText(2, rightPage, 176, rightPageY+20, 0x31); - delete [] rightPage; + delete[] rightPage; } _screen->showMouse(); } diff --git a/engines/kyra/gui_v1.cpp b/engines/kyra/gui_v1.cpp index e5a0c42281..2d2c4f1219 100644 --- a/engines/kyra/gui_v1.cpp +++ b/engines/kyra/gui_v1.cpp @@ -194,7 +194,7 @@ GUI_v1::GUI_v1(KyraEngine_v1 *vm, Screen_v1 *screen) : GUI(vm), _vm(vm), _screen } GUI_v1::~GUI_v1() { - delete [] _menu; + delete[] _menu; } int GUI_v1::processButtonList(Button *list, uint16 inputFlag) { diff --git a/engines/kyra/items_v2.cpp b/engines/kyra/items_v2.cpp index 78768c70ab..923bf876b1 100644 --- a/engines/kyra/items_v2.cpp +++ b/engines/kyra/items_v2.cpp @@ -30,7 +30,7 @@ namespace Kyra { void KyraEngine_v2::initItemList(int size) { debugC(9, kDebugLevelMain, "KyraEngine_v2::initItemList(%d)", size); - delete [] _itemList; + delete[] _itemList; _itemList = new Item[size]; assert(_itemList); diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 4ca695542c..7aa5f9373b 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -160,17 +160,17 @@ KyraEngine_HoF::~KyraEngine_HoF() { if (_sequenceSoundList) { for (int i = 0; i < _sequenceSoundListSize; i++) { if (_sequenceSoundList[i]) - delete [] _sequenceSoundList[i]; + delete[] _sequenceSoundList[i]; } - delete [] _sequenceSoundList; + delete[] _sequenceSoundList; _sequenceSoundList = NULL; } if (_dlgBuffer) - delete [] _dlgBuffer; + delete[] _dlgBuffer; for (int i = 0; i < 19; i++) - delete [] _conversationState[i]; - delete [] _conversationState; + delete[] _conversationState[i]; + delete[] _conversationState; for (Common::Array::iterator i = _timOpcodes.begin(); i != _timOpcodes.end(); ++i) delete *i; @@ -762,24 +762,24 @@ void KyraEngine_HoF::delay(uint32 amount, bool updateGame, bool isMainLoop) { } void KyraEngine_HoF::cleanup() { - delete [] _inventoryButtons; _inventoryButtons = 0; + delete[] _inventoryButtons; _inventoryButtons = 0; - delete [] _gamePlayBuffer; _gamePlayBuffer = 0; - delete [] _unkBuf500Bytes; _unkBuf500Bytes = 0; - delete [] _unkBuf200kByte; _unkBuf200kByte = 0; + delete[] _gamePlayBuffer; _gamePlayBuffer = 0; + delete[] _unkBuf500Bytes; _unkBuf500Bytes = 0; + delete[] _unkBuf200kByte; _unkBuf200kByte = 0; freeSceneShapePtrs(); if (_optionsBuffer != _cCodeBuffer) - delete [] _optionsBuffer; + delete[] _optionsBuffer; _optionsBuffer = 0; - delete [] _cCodeBuffer; _cCodeBuffer = 0; - delete [] _chapterBuffer; _chapterBuffer = 0; + delete[] _cCodeBuffer; _cCodeBuffer = 0; + delete[] _chapterBuffer; _chapterBuffer = 0; - delete [] _talkObjectList; _talkObjectList = 0; - delete [] _shapeDescTable; _shapeDescTable = 0; + delete[] _talkObjectList; _talkObjectList = 0; + delete[] _shapeDescTable; _shapeDescTable = 0; - delete [] _gfxBackUpRect; _gfxBackUpRect = 0; + delete[] _gfxBackUpRect; _gfxBackUpRect = 0; for (int i = 0; i < ARRAYSIZE(_sceneAnimMovie); ++i) { delete _sceneAnimMovie[i]; @@ -790,7 +790,7 @@ void KyraEngine_HoF::cleanup() { _wsaSlots[i] = 0; } for (int i = 0; i < ARRAYSIZE(_buttonShapes); ++i) { - delete [] _buttonShapes[i]; + delete[] _buttonShapes[i]; _buttonShapes[i] = 0; } @@ -804,7 +804,7 @@ void KyraEngine_HoF::loadCCodeBuffer(const char *file) { strcpy(tempString, file); changeFileExtension(tempString); - delete [] _cCodeBuffer; + delete[] _cCodeBuffer; _cCodeBuffer = _res->fileData(tempString, 0); } @@ -813,7 +813,7 @@ void KyraEngine_HoF::loadOptionsBuffer(const char *file) { strcpy(tempString, file); changeFileExtension(tempString); - delete [] _optionsBuffer; + delete[] _optionsBuffer; _optionsBuffer = _res->fileData(tempString, 0); } @@ -828,7 +828,7 @@ void KyraEngine_HoF::loadChapterBuffer(int chapter) { strcpy(tempString, chapterFilenames[chapter-1]); changeFileExtension(tempString); - delete [] _chapterBuffer; + delete[] _chapterBuffer; _chapterBuffer = _res->fileData(tempString, 0); _currentChapter = chapter; } @@ -1034,7 +1034,7 @@ void KyraEngine_HoF::loadCharacterShapes(int shapes) { uint8 *data = _res->fileData(file, 0); for (int i = 9; i <= 32; ++i) addShapeToPool(data, i, i-9); - delete [] data; + delete[] data; _characterShapeFile = shapes; } @@ -1385,7 +1385,7 @@ int KyraEngine_HoF::initAnimationShapes(uint8 *filedata) { void KyraEngine_HoF::uninitAnimationShapes(int count, uint8 *filedata) { for (int i = 0; i < count; ++i) remShapeFromPool(i+33); - delete [] filedata; + delete[] filedata; setNextIdleAnimTimer(); } diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 5e23813eb2..1ed347953d 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -533,7 +533,7 @@ void KyraEngine_MR::initMouseShapes() { assert(data); for (int i = 0; i <= 6; ++i) _gameShapes[i] = _screen->makeShapeCopy(data, i); - delete [] data; + delete[] data; } void KyraEngine_MR::startup() { @@ -728,7 +728,7 @@ void KyraEngine_MR::initItems() { memcpy(_itemBuffer1, itemsDat , 72); memcpy(_itemBuffer2, itemsDat+72, 144); - delete [] itemsDat; + delete[] itemsDat; _screen->_curPage = 0; } diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 98514a3c37..693ea74a35 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -116,28 +116,28 @@ KyraEngine_v1::~KyraEngine_v1() { delete _animator; delete _seq; - delete [] _characterList; + delete[] _characterList; - delete [] _movFacingTable; + delete[] _movFacingTable; - delete [] _gui->_scrollUpButton.data0ShapePtr; - delete [] _gui->_scrollUpButton.data1ShapePtr; - delete [] _gui->_scrollUpButton.data2ShapePtr; - delete [] _gui->_scrollDownButton.data0ShapePtr; - delete [] _gui->_scrollDownButton.data1ShapePtr; - delete [] _gui->_scrollDownButton.data2ShapePtr; + delete[] _gui->_scrollUpButton.data0ShapePtr; + delete[] _gui->_scrollUpButton.data1ShapePtr; + delete[] _gui->_scrollUpButton.data2ShapePtr; + delete[] _gui->_scrollDownButton.data0ShapePtr; + delete[] _gui->_scrollDownButton.data1ShapePtr; + delete[] _gui->_scrollDownButton.data2ShapePtr; - delete [] _buttonData; - delete [] _buttonDataListPtr; + delete[] _buttonData; + delete[] _buttonDataListPtr; delete _gui; - delete [] _itemBkgBackUp[0]; - delete [] _itemBkgBackUp[1]; + delete[] _itemBkgBackUp[0]; + delete[] _itemBkgBackUp[1]; for (int i = 0; i < ARRAYSIZE(_shapes); ++i) { if (_shapes[i] != 0) { - delete [] _shapes[i]; + delete[] _shapes[i]; for (int i2 = 0; i2 < ARRAYSIZE(_shapes); i2++) { if (_shapes[i2] == _shapes[i] && i2 != i) { _shapes[i2] = 0; @@ -148,7 +148,7 @@ KyraEngine_v1::~KyraEngine_v1() { } for (int i = 0; i < ARRAYSIZE(_sceneAnimTable); ++i) - delete [] _sceneAnimTable[i]; + delete[] _sceneAnimTable[i]; } int KyraEngine_v1::init() { @@ -623,7 +623,7 @@ void KyraEngine_v1::freeShapes123() { debugC(9, kDebugLevelMain, "KyraEngine_v1::freeShapes123()"); for (int i = 123; i <= 172; ++i) { - delete [] _shapes[i]; + delete[] _shapes[i]; _shapes[i] = 0; } } diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index ccea7e08bb..6c4adea88c 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -238,7 +238,7 @@ void KyraEngine_v2::addShapeToPool(uint8 *shpData, int index) { void KyraEngine_v2::remShapeFromPool(int idx) { ShapeMap::iterator iter = _gameShapes.find(idx); if (iter != _gameShapes.end()) { - delete [] iter->_value; + delete[] iter->_value; iter->_value = 0; } } diff --git a/engines/kyra/scene.cpp b/engines/kyra/scene.cpp index f3e41b2d39..9516da2dbd 100644 --- a/engines/kyra/scene.cpp +++ b/engines/kyra/scene.cpp @@ -60,8 +60,8 @@ int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int move if (lineIsPassable(curX, curY)) { if (lastUsedEntry == moveTableSize) { - delete [] pathTable1; - delete [] pathTable2; + delete[] pathTable1; + delete[] pathTable2; return 0x7D00; } // debug drawing @@ -104,8 +104,8 @@ int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int move tempValue = findSubPath(x, y, curX, curY, pathTable2, 0, 0x7D0); if (curX == toX && curY == toY) { if (temp == 0x7D00 && tempValue == 0x7D00) { - delete [] pathTable1; - delete [] pathTable2; + delete[] pathTable1; + delete[] pathTable2; return 0x7D00; } } @@ -116,16 +116,16 @@ int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int move if (temp < tempValue) { if (lastUsedEntry + temp > moveTableSize) { - delete [] pathTable1; - delete [] pathTable2; + delete[] pathTable1; + delete[] pathTable2; return 0x7D00; } memcpy(&moveTable[lastUsedEntry], pathTable1, temp*sizeof(int)); lastUsedEntry += temp; } else { if (lastUsedEntry + tempValue > moveTableSize) { - delete [] pathTable1; - delete [] pathTable2; + delete[] pathTable1; + delete[] pathTable2; return 0x7D00; } memcpy(&moveTable[lastUsedEntry], pathTable2, tempValue*sizeof(int)); @@ -137,8 +137,8 @@ int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int move break; } - delete [] pathTable1; - delete [] pathTable2; + delete[] pathTable1; + delete[] pathTable2; moveTable[lastUsedEntry] = 8; return lastUsedEntry; } diff --git a/engines/kyra/scene_hof.cpp b/engines/kyra/scene_hof.cpp index 3fc7947253..25613e2eb9 100644 --- a/engines/kyra/scene_hof.cpp +++ b/engines/kyra/scene_hof.cpp @@ -702,7 +702,7 @@ void KyraEngine_HoF::initSceneScreen(int unk1) { void KyraEngine_HoF::freeSceneShapePtrs() { debugC(9, kDebugLevelMain, "KyraEngine_HoF::freeSceneShapePtrs()"); for (int i = 0; i < ARRAYSIZE(_sceneShapeTable); ++i) - delete [] _sceneShapeTable[i]; + delete[] _sceneShapeTable[i]; memset(_sceneShapeTable, 0, sizeof(_sceneShapeTable)); } diff --git a/engines/kyra/scene_mr.cpp b/engines/kyra/scene_mr.cpp index 7da0dd9f75..03cc05cd34 100644 --- a/engines/kyra/scene_mr.cpp +++ b/engines/kyra/scene_mr.cpp @@ -311,7 +311,7 @@ void KyraEngine_MR::enterNewSceneUnk2(int unk1) { void KyraEngine_MR::unloadScene() { debugC(9, kDebugLevelMain, "KyraEngine_MR::unloadScene()"); - delete [] _sceneStrings; + delete[] _sceneStrings; _sceneStrings = 0; musicUpdate(0); _emc->unload(&_sceneScriptData); @@ -325,7 +325,7 @@ void KyraEngine_MR::unloadScene() { void KyraEngine_MR::freeSceneShapes() { debugC(9, kDebugLevelMain, "KyraEngine_MR::freeSceneShapes()"); for (uint i = 0; i < ARRAYSIZE(_sceneShapes); ++i) { - delete [] _sceneShapes[i]; + delete[] _sceneShapes[i]; _sceneShapes[i] = 0; } } diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 298483465e..0f3d3f0259 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -40,28 +40,28 @@ Screen::Screen(KyraEngine *vm, OSystem *system) Screen::~Screen() { for (int i = 0; i < SCREEN_OVLS_NUM; ++i) - delete [] _sjisOverlayPtrs[i]; + delete[] _sjisOverlayPtrs[i]; - delete [] _pagePtrs[0]; + delete[] _pagePtrs[0]; for (int f = 0; f < ARRAYSIZE(_fonts); ++f) { delete[] _fonts[f].fontData; _fonts[f].fontData = NULL; } - delete [] _sjisFontData; - delete [] _sjisTempPage; - delete [] _currentPalette; - delete [] _screenPalette; - delete [] _decodeShapeBuffer; - delete [] _animBlockPtr; + delete[] _sjisFontData; + delete[] _sjisTempPage; + delete[] _currentPalette; + delete[] _screenPalette; + delete[] _decodeShapeBuffer; + delete[] _animBlockPtr; if (_vm->gameFlags().platform != Common::kPlatformAmiga) { for (int i = 0; i < ARRAYSIZE(_palettes); ++i) - delete [] _palettes[i]; + delete[] _palettes[i]; } - delete [] _dirtyRects; + delete[] _dirtyRects; } bool Screen::init() { @@ -843,7 +843,7 @@ void Screen::drawLine(bool vertical, int x, int y, int length, int color) { void Screen::setAnimBlockPtr(int size) { debugC(9, kDebugLevelScreen, "Screen::setAnimBlockPtr(%d)", size); - delete [] _animBlockPtr; + delete[] _animBlockPtr; _animBlockPtr = new uint8[size]; assert(_animBlockPtr); memset(_animBlockPtr, 0, size); @@ -867,7 +867,7 @@ bool Screen::loadFont(FontId fontId, const char *filename) { error("fontId %d is invalid", fontId); if (fnt->fontData) - delete [] fnt->fontData; + delete[] fnt->fontData; uint32 sz = 0; uint8 *fontData = fnt->fontData = _vm->resource()->fileData(filename, &sz); @@ -2235,7 +2235,7 @@ uint8 *Screen::encodeShape(int x, int y, int w, int h, int flags) { uint8 *newShape2 = new uint8[shapeSize]; assert(newShape2); memcpy(newShape2, newShape, shapeSize); - delete [] newShape; + delete[] newShape; newShape = newShape2; } else { dst = shapePtrBackUp; @@ -2469,7 +2469,7 @@ void Screen::setMouseCursor(int x, int y, byte *shape) { copyRegionToBuffer(8, xOffset, 0, mouseWidth, mouseHeight, cursor); CursorMan.replaceCursor(cursor, mouseWidth, mouseHeight, x, y, 0); CursorMan.showMouse(true); - delete [] cursor; + delete[] cursor; // makes sure that the cursor is drawn // we do not use Screen::updateScreen here @@ -2694,7 +2694,7 @@ void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, uint8 * if (skip) srcData -= 4; - delete [] srcData; + delete[] srcData; } bool Screen::loadPalette(const char *filename, uint8 *palData) { @@ -2722,7 +2722,7 @@ bool Screen::loadPalette(const char *filename, uint8 *palData) { memcpy(palData, srcData, fileSize); } } - delete [] srcData; + delete[] srcData; return true; } diff --git a/engines/kyra/screen_hof.cpp b/engines/kyra/screen_hof.cpp index 9192626159..9a4237366b 100644 --- a/engines/kyra/screen_hof.cpp +++ b/engines/kyra/screen_hof.cpp @@ -37,7 +37,7 @@ Screen_HoF::Screen_HoF(KyraEngine_HoF *vm, OSystem *system) } Screen_HoF::~Screen_HoF() { - delete [] _wsaFrameAnimBuffer; + delete[] _wsaFrameAnimBuffer; } void Screen_HoF::setScreenDim(int dim) { diff --git a/engines/kyra/screen_v1.cpp b/engines/kyra/screen_v1.cpp index 9454418fd5..7af01358e5 100644 --- a/engines/kyra/screen_v1.cpp +++ b/engines/kyra/screen_v1.cpp @@ -36,20 +36,20 @@ Screen_v1::Screen_v1(KyraEngine_v1 *vm, OSystem *system) } Screen_v1::~Screen_v1() { - delete [] _bitBlitRects; + delete[] _bitBlitRects; for (int i = 0; i < ARRAYSIZE(_saveLoadPage); ++i) { - delete [] _saveLoadPage[i]; + delete[] _saveLoadPage[i]; _saveLoadPage[i] = 0; } for (int i = 0; i < ARRAYSIZE(_saveLoadPageOvl); ++i) { - delete [] _saveLoadPageOvl[i]; + delete[] _saveLoadPageOvl[i]; _saveLoadPageOvl[i] = 0; } - delete [] _unkPtr1; - delete [] _unkPtr2; + delete[] _unkPtr1; + delete[] _unkPtr2; } bool Screen_v1::init() { @@ -148,7 +148,7 @@ void Screen_v1::savePageToDisk(const char *file, int page) { void Screen_v1::loadPageFromDisk(const char *file, int page) { debugC(9, kDebugLevelScreen, "Screen_v1::loadPageFromDisk('%s', %d)", file, page); copyBlockToPage(page, 0, 0, SCREEN_W, SCREEN_H, _saveLoadPage[page/2]); - delete [] _saveLoadPage[page/2]; + delete[] _saveLoadPage[page/2]; if (_saveLoadPageOvl[page/2]) { uint8 *dstPage = getOverlayPtr(page); @@ -158,18 +158,18 @@ void Screen_v1::loadPageFromDisk(const char *file, int page) { } memcpy(dstPage, _saveLoadPageOvl[page/2], SCREEN_OVL_SJIS_SIZE); - delete [] _saveLoadPageOvl[page/2]; + delete[] _saveLoadPageOvl[page/2]; _saveLoadPageOvl[page/2] = 0; } _saveLoadPage[page/2] = 0; } void Screen_v1::deletePageFromDisk(int page) { debugC(9, kDebugLevelScreen, "Screen_v1::deletePageFromDisk(%d)", page); - delete [] _saveLoadPage[page/2]; + delete[] _saveLoadPage[page/2]; _saveLoadPage[page/2] = 0; if (_saveLoadPageOvl[page/2]) { - delete [] _saveLoadPageOvl[page/2]; + delete[] _saveLoadPageOvl[page/2]; _saveLoadPageOvl[page/2] = 0; } } diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp index e9dc34e581..e00ac6878d 100644 --- a/engines/kyra/script.cpp +++ b/engines/kyra/script.cpp @@ -139,9 +139,9 @@ void EMCInterpreter::unload(EMCData *data) { if (!data) return; - delete [] data->text; - delete [] data->ordr; - delete [] data->data; + delete[] data->text; + delete[] data->ordr; + delete[] data->data; data->text = 0; data->ordr = data->data = 0; diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp index 67e076cbf8..fa9d54e8be 100644 --- a/engines/kyra/script_tim.cpp +++ b/engines/kyra/script_tim.cpp @@ -128,8 +128,8 @@ void TIMInterpreter::unload(TIM *&tim) const { if (!tim) return; - delete [] tim->text; - delete [] tim->avtl; + delete[] tim->text; + delete[] tim->avtl; delete tim; tim = 0; } diff --git a/engines/kyra/seqplayer.cpp b/engines/kyra/seqplayer.cpp index ddd8beb5dc..9a670ce85f 100644 --- a/engines/kyra/seqplayer.cpp +++ b/engines/kyra/seqplayer.cpp @@ -110,7 +110,7 @@ void SeqPlayer::makeHandShapes() { } else { for (int i = 0; i < ARRAYSIZE(_handShapes); ++i) { if (_handShapes[i]) - delete [] _handShapes[i]; + delete[] _handShapes[i]; _handShapes[i] = setPanPages(3, i); assert(_handShapes[i]); } @@ -120,7 +120,7 @@ void SeqPlayer::makeHandShapes() { void SeqPlayer::freeHandShapes() { debugC(9, kDebugLevelSequence, "SeqPlayer::freeHandShapes()"); for (int i = 0; i < ARRAYSIZE(_handShapes); ++i) { - delete [] _handShapes[i]; + delete[] _handShapes[i]; _handShapes[i] = 0; } } @@ -262,7 +262,7 @@ void SeqPlayer::s1_loadPalette() { uint8 *srcData; srcData = _res->fileData(_vm->seqCOLTable()[colNum], &fileSize); memcpy(_screen->_currentPalette, srcData, fileSize); - delete [] srcData; + delete[] srcData; } } @@ -667,7 +667,7 @@ bool SeqPlayer::playSequence(const uint8 *seqData, bool skipSeq) { _screen->updateScreen(); } - delete [] _specialBuffer; + delete[] _specialBuffer; _specialBuffer = 0; return seqSkippedFlag; } diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index 050b00c878..49a5a7dc94 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -1535,7 +1535,7 @@ void KyraEngine_HoF::seq_finaleActorScreen() { seq_displayScrollText(dataPtr, &d, 2, 6, 5, 1, Screen::FID_GOLDFONT_FNT, Screen::FID_GOLDFONT_FNT, 0, talkieCreditsSpecial); delay(120); - delete [] dataPtr; + delete[] dataPtr; _staticres->unloadId(k2SeqplayCreditsSpecial); _sound->setSoundList(&_soundData[kMusicFinale]); _sound->loadSoundFile(0); @@ -2537,8 +2537,8 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int _abortIntroFlag= false; resetSkipFlag(); - delete [] tmp; - delete [] tmpStringTable; + delete[] tmp; + delete[] tmpStringTable; } void KyraEngine_HoF::seq_scrollPage() { @@ -2628,7 +2628,7 @@ void KyraEngine_HoF::seq_init() { uint32 outsize = READ_LE_UINT16(shp + 4); _animShapeFiledata = new uint8[outsize]; Screen::decodeFrame4(shp + 10, _animShapeFiledata, outsize); - delete [] shp; + delete[] shp; do { numShp++; @@ -2647,19 +2647,19 @@ void KyraEngine_HoF::seq_init() { } void KyraEngine_HoF::seq_uninit() { - delete [] _seqProcessedString; + delete[] _seqProcessedString; _seqProcessedString = NULL; - delete [] _activeWSA; + delete[] _activeWSA; _activeWSA = NULL; - delete [] _activeText; + delete[] _activeText; _activeText = NULL; delete _seqWsa; _seqWsa = NULL; - delete [] _animShapeFiledata; + delete[] _animShapeFiledata; _animShapeFiledata = 0; if (_flags.isDemo && !_flags.isTalkie) @@ -2770,7 +2770,7 @@ void KyraEngine_HoF::seq_makeBookAppear() { } closeInvWsa(); - delete [] rect; + delete[] rect; _invWsa.running = false; _screen->showMouse(); diff --git a/engines/kyra/sequences_mr.cpp b/engines/kyra/sequences_mr.cpp index 8c826e2048..f41ed9c2f3 100644 --- a/engines/kyra/sequences_mr.cpp +++ b/engines/kyra/sequences_mr.cpp @@ -241,7 +241,7 @@ void KyraEngine_MR::uninitAnimationShapes(int count, uint8 *filedata) { debugC(9, kDebugLevelAnimator, "KyraEngine_MR::uninitAnimationShapes(%d, %p)", count, (const void*)filedata); for (int i = 0; i < count; ++i) _gameShapes[9+i] = 0; - delete [] filedata; + delete[] filedata; setNextIdleAnimTimer(); } diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp index 01906d2529..75aa1b4518 100644 --- a/engines/kyra/sequences_v1.cpp +++ b/engines/kyra/sequences_v1.cpp @@ -1202,7 +1202,7 @@ void KyraEngine_v1::seq_playCredits() { _system->delayMillis(nextLoop - now); } - delete [] buffer; + delete[] buffer; _screen->fadeToBlack(); _screen->clearCurPage(); @@ -1682,13 +1682,13 @@ void KyraEngine_v1::setupPanPages() { int pageBackUp = _screen->_curPage; _screen->_curPage = 2; - delete [] _panPagesTable[19]; + delete[] _panPagesTable[19]; _panPagesTable[19] = _screen->encodeShape(0, 0, 16, 9, 0); assert(_panPagesTable[19]); int curX = 16; for (int i = 0; i < 19; ++i) { - delete [] _panPagesTable[i]; + delete[] _panPagesTable[i]; _panPagesTable[i] = _screen->encodeShape(curX, 0, 8, 5, 0); assert(_panPagesTable[i]); curX += 8; @@ -1697,7 +1697,7 @@ void KyraEngine_v1::setupPanPages() { _screen->_curPage = pageBackUp; } else { for (int i = 0; i <= 19; ++i) { - delete [] _panPagesTable[i]; + delete[] _panPagesTable[i]; _panPagesTable[i] = _seq->setPanPages(3, i); assert(_panPagesTable[i]); } @@ -1710,7 +1710,7 @@ void KyraEngine_v1::freePanPages() { delete _endSequenceBackUpRect; _endSequenceBackUpRect = 0; for (int i = 0; i <= 19; ++i) { - delete [] _panPagesTable[i]; + delete[] _panPagesTable[i]; _panPagesTable[i] = 0; } } diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index 887e9c7267..90cbd5e539 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -107,7 +107,7 @@ bool Sound::voicePlay(const char *file, bool isSfx) { _soundChannels[h].file = file; _mixer->playInputStream(isSfx ? Audio::Mixer::kSFXSoundType : Audio::Mixer::kSpeechSoundType, &_soundChannels[h].channelHandle, audioStream); - delete [] fileData; + delete[] fileData; fileSize = 0; return true; @@ -320,7 +320,7 @@ void SoundMidiPC::metaEvent(byte type, byte *data, uint16 length) { struct DeleterArray { void operator ()(byte *ptr) { - delete [] ptr; + delete[] ptr; } }; diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp index fa5a978665..b744579c98 100644 --- a/engines/kyra/sound_adlib.cpp +++ b/engines/kyra/sound_adlib.cpp @@ -507,7 +507,7 @@ int AdlibDriver::snd_deinitDriver(va_list &list) { int AdlibDriver::snd_setSoundData(va_list &list) { if (_soundData) { - delete [] _soundData; + delete[] _soundData; _soundData = 0; } _soundData = va_arg(list, uint8*); @@ -2232,7 +2232,7 @@ SoundAdlibPC::SoundAdlibPC(KyraEngine *vm, Audio::Mixer *mixer) SoundAdlibPC::~SoundAdlibPC() { delete _driver; - delete [] _soundDataPtr; + delete[] _soundDataPtr; } bool SoundAdlibPC::init() { @@ -2382,7 +2382,7 @@ void SoundAdlibPC::loadSoundFile(uint file) { memcpy(_soundDataPtr, p, soundDataSize*sizeof(uint8)); - delete [] file_data; + delete[] file_data; file_data = p = 0; file_size = 0; diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp index f8c6fbdb04..ab60c3e1f5 100644 --- a/engines/kyra/sound_digital.cpp +++ b/engines/kyra/sound_digital.cpp @@ -107,8 +107,8 @@ AUDStream::AUDStream(Common::SeekableReadStream *stream, bool loop) : _stream(st } AUDStream::~AUDStream() { - delete [] _outBuffer; - delete [] _inBuffer; + delete[] _outBuffer; + delete[] _inBuffer; delete _stream; } @@ -174,7 +174,7 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) { if (size == outSize) { if (outSize > _outBufferSize) { _outBufferSize = outSize; - delete [] _outBuffer; + delete[] _outBuffer; _outBuffer = new uint8[_outBufferSize]; assert(_outBuffer); } @@ -187,14 +187,14 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) { if (outSize > _outBufferSize) { _outBufferSize = outSize; - delete [] _outBuffer; + delete[] _outBuffer; _outBuffer = new uint8[_outBufferSize]; assert(_outBuffer); } if (size > _inBufferSize) { _inBufferSize = size; - delete [] _inBuffer; + delete[] _inBuffer; _inBuffer = new uint8[_inBufferSize]; assert(_inBuffer); } diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index 9ac865c157..d2ce48f452 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -599,18 +599,18 @@ SoundTowns_EuphonyDriver::~SoundTowns_EuphonyDriver() { MidiDriver_YM2612::removeLookupTables(); if (_fmInstruments) { - delete [] _fmInstruments; + delete[] _fmInstruments; _fmInstruments = 0; } if (_waveInstruments) { - delete [] _waveInstruments; + delete[] _waveInstruments; _waveInstruments = 0; } for (int i = 0; i < 10; i++) { if (_waveSounds[i]) { - delete [] _waveSounds[i]; + delete[] _waveSounds[i]; _waveSounds[i] = 0; } } @@ -709,14 +709,14 @@ void SoundTowns_EuphonyDriver::send(byte chan, uint32 b) { void SoundTowns_EuphonyDriver::loadFmInstruments(const byte *instr) { if (_fmInstruments) - delete [] _fmInstruments; + delete[] _fmInstruments; _fmInstruments = new uint8[0x1800]; memcpy(_fmInstruments, instr, 0x1800); } void SoundTowns_EuphonyDriver::loadWaveInstruments(const byte *instr) { if (_waveInstruments) - delete [] _waveInstruments; + delete[] _waveInstruments; _waveInstruments = new uint8[0x1000]; memcpy(_waveInstruments, instr, 0x1000); @@ -724,7 +724,7 @@ void SoundTowns_EuphonyDriver::loadWaveInstruments(const byte *instr) { for (uint8 i = 0; i < 10; i++) { if (_waveSounds[i]) - delete [] _waveSounds[i]; + delete[] _waveSounds[i]; uint32 numsamples = READ_LE_UINT32(pos + 0x0C); _waveSounds[i] = new int8[numsamples + 0x20]; memcpy(_waveSounds[i], pos, 0x20); @@ -1010,7 +1010,7 @@ SoundTowns_EuphonyTrackQueue * SoundTowns_EuphonyTrackQueue::reset() { void SoundTowns_EuphonyTrackQueue::loadDataToCurrentPosition(uint8 * trackdata, uint32 size, bool loop) { if (_trackData) - delete [] _trackData; + delete[] _trackData; _trackData = new uint8[0xC58A]; memset(_trackData, 0, 0xC58A); Screen::decodeFrame4(trackdata, _trackData, size); @@ -1051,13 +1051,13 @@ void SoundTowns_EuphonyTrackQueue::release() { _used = _fchan = _wchan = 0; if (_trackData) { - delete [] _trackData; + delete[] _trackData; _trackData = 0; } while (i) { if (i->_trackData) { - delete [] i->_trackData; + delete[] i->_trackData; i->_trackData = 0; } i = i->_next; @@ -1097,7 +1097,7 @@ SoundTowns::SoundTowns(KyraEngine *vm, Audio::Mixer *mixer) SoundTowns::~SoundTowns() { AudioCD.stop(); haltTrack(); - delete [] _sfxFileData; + delete[] _sfxFileData; Common::StackLock lock(_mutex); _driver->setTimerCallback(0, 0); @@ -1164,7 +1164,7 @@ void SoundTowns::loadSoundFile(uint file) { if (_sfxFileIndex == file) return; _sfxFileIndex = file; - delete [] _sfxFileData; + delete[] _sfxFileData; _sfxFileData = _vm->resource()->fileData(fileListEntry(file), 0); } @@ -1293,7 +1293,7 @@ bool SoundTowns::loadInstruments() { _driver->queue()->loadDataToCurrentPosition(twm + 0x0CA0, 0xC58A); _driver->loadWaveInstruments(_driver->queue()->trackData() + 8); - delete [] twm; + delete[] twm; _driver->queue()->release(); return true; @@ -1311,7 +1311,7 @@ void SoundTowns::playEuphonyTrack(uint32 offset, int loop) { _parser->property(MidiParser::mpAutoLoop, loop); _parser->loadMusic(twm + 0x4b70 + offset, 0xC58A); - delete [] twm; + delete[] twm; } void SoundTowns::onTimer(void * data) { @@ -1366,7 +1366,7 @@ SoundTowns_v2::~SoundTowns_v2() { /*if (_driver) delete _driver;*/ if (_twnTrackData) - delete [] _twnTrackData; + delete[] _twnTrackData; } bool SoundTowns_v2::init() { @@ -1416,7 +1416,7 @@ void SoundTowns_v2::playTrack(uint8 track) { char musicfile[13]; sprintf(musicfile, fileListEntry(0), track); if (_twnTrackData) - delete [] _twnTrackData; + delete[] _twnTrackData; _twnTrackData = _vm->resource()->fileData(musicfile, 0); //_driver->loadData(_twnTrackData); } @@ -1492,7 +1492,7 @@ bool SoundTowns_v2::voicePlay(const char *file, bool) { _soundChannels[h].file = file; _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_soundChannels[h].channelHandle, _currentSFX); - delete [] data; + delete[] data; return true; } diff --git a/engines/kyra/sprites.cpp b/engines/kyra/sprites.cpp index b54192abae..4177f4cd7b 100644 --- a/engines/kyra/sprites.cpp +++ b/engines/kyra/sprites.cpp @@ -52,11 +52,11 @@ Sprites::Sprites(KyraEngine_v1 *vm, OSystem *system) { } Sprites::~Sprites() { - delete [] _dat; + delete[] _dat; freeSceneShapes(); for (int i = 0; i < MAX_NUM_ANIMS; i++) { if (_anims[i].background) - delete [] _anims[i].background; + delete[] _anims[i].background; } } @@ -66,7 +66,7 @@ void Sprites::setupSceneAnims() { for (int i = 0; i < MAX_NUM_ANIMS; i++) { if (_anims[i].background) { - delete [] _anims[i].background; + delete[] _anims[i].background; _anims[i].background = 0; } @@ -515,7 +515,7 @@ void Sprites::loadDat(const char *filename, SceneExits &exits) { void Sprites::freeSceneShapes() { debugC(9, kDebugLevelSprites, "Sprites::freeSceneShapes()"); for (int i = 0; i < ARRAYSIZE(_sceneShapes); i++ ) { - delete [] _sceneShapes[i]; + delete[] _sceneShapes[i]; _sceneShapes[i] = 0; } } diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index c9d81cc92a..59a64e3aba 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -287,7 +287,7 @@ bool StaticResource::init() { } if (tempSize != 3*4) { - delete [] temp; + delete[] temp; warning("'%s' has illegal filesize %d", getFilename("INDEX"), tempSize); outputError(); return false; @@ -297,7 +297,7 @@ bool StaticResource::init() { uint32 gameID = READ_BE_UINT32((temp+4)); uint32 featuresValue = READ_BE_UINT32((temp+8)); - delete [] temp; + delete[] temp; temp = 0; if (version != RESFILE_VERSION) { @@ -545,7 +545,7 @@ bool StaticResource::loadStringTable(const char *filename, void *&ptr, int &size curPos += strLen+1; } - delete [] filePtr; + delete[] filePtr; ptr = output; return true; @@ -579,7 +579,7 @@ bool StaticResource::loadShapeTable(const char *filename, void *&ptr, int &size) loadTo[i].yOffset = *src++; } - delete [] filePtr; + delete[] filePtr; ptr = loadTo; return true; @@ -609,7 +609,7 @@ bool StaticResource::loadRoomTable(const char *filename, void *&ptr, int &size) memset(loadTo[i].needInit, 0, sizeof(loadTo[i].needInit)); } - delete [] filePtr; + delete[] filePtr; ptr = loadTo; return true; @@ -642,7 +642,7 @@ bool StaticResource::loadPaletteTable(const char *filename, void *&ptr, int &siz snprintf(name, 64, "%s%d.PAL", file, i); table[(start != 0) ? (i-start) : i] = (char*)getFile(name, size); if (!table[(start != 0) ? (i-start) : i]) { - delete [] table; + delete[] table; return false; } } @@ -743,7 +743,7 @@ bool StaticResource::loadHofSequenceData(const char *filename, void *&ptr, int & } } - delete [] filePtr; + delete[] filePtr; HofSeqData *loadTo = new HofSeqData; assert(loadTo); @@ -783,7 +783,7 @@ bool StaticResource::loadHofShapeAnimDataV1(const char *filename, void *&ptr, in loadTo[i].frames = tmp_f; } - delete [] filePtr; + delete[] filePtr; ptr = loadTo; return true; @@ -815,7 +815,7 @@ bool StaticResource::loadHofShapeAnimDataV2(const char *filename, void *&ptr, in loadTo[i].frames = tmp_f; } - delete [] filePtr; + delete[] filePtr; ptr = loadTo; return true; @@ -823,7 +823,7 @@ bool StaticResource::loadHofShapeAnimDataV2(const char *filename, void *&ptr, in void StaticResource::freeRawData(void *&ptr, int &size) { uint8 *data = (uint8*)ptr; - delete [] data; + delete[] data; ptr = 0; size = 0; } @@ -839,14 +839,14 @@ void StaticResource::freeStringTable(void *&ptr, int &size) { void StaticResource::freeShapeTable(void *&ptr, int &size) { Shape *data = (Shape*)ptr; - delete [] data; + delete[] data; ptr = 0; size = 0; } void StaticResource::freeRoomTable(void *&ptr, int &size) { Room *data = (Room*)ptr; - delete [] data; + delete[] data; ptr = 0; size = 0; } @@ -855,16 +855,16 @@ void StaticResource::freeHofSequenceData(void *&ptr, int &size) { HofSeqData *h = (HofSeqData*) ptr; for (int i = 0; i < h->numSeq; i++) { - delete [] h->seq[i].wsaFile; - delete [] h->seq[i].cpsFile; + delete[] h->seq[i].wsaFile; + delete[] h->seq[i].cpsFile; } - delete [] h->seq; + delete[] h->seq; for (int i = 0; i < h->numSeqn; i++) { - delete [] h->seqn[i].wsaFile; - delete [] h->seqn[i].wsaControl; + delete[] h->seqn[i].wsaFile; + delete[] h->seqn[i].wsaControl; } - delete [] h->seqn; + delete[] h->seqn; delete h; ptr = 0; @@ -874,8 +874,8 @@ void StaticResource::freeHofSequenceData(void *&ptr, int &size) { void StaticResource::freeHofShapeAnimDataV1(void *&ptr, int &size) { ItemAnimData_v1 *d= (ItemAnimData_v1*) ptr; for (int i = 0; i < size; i++) - delete [] d[i].frames; - delete [] d; + delete[] d[i].frames; + delete[] d; ptr = 0; size = 0; } @@ -883,8 +883,8 @@ void StaticResource::freeHofShapeAnimDataV1(void *&ptr, int &size) { void StaticResource::freeHofShapeAnimDataV2(void *&ptr, int &size) { ItemAnimData_v2 *d= (ItemAnimData_v2*) ptr; for (int i = 0; i < size; i++) - delete [] d[i].frames; - delete [] d; + delete[] d[i].frames; + delete[] d; ptr = 0; size = 0; } @@ -892,7 +892,7 @@ void StaticResource::freeHofShapeAnimDataV2(void *&ptr, int &size) { void StaticResource::freePaletteTable(void *&ptr, int &size) { uint8 **data = (uint8**)ptr; while (size--) - delete [] data[size]; + delete[] data[size]; ptr = 0; size = 0; } @@ -1367,7 +1367,7 @@ void GUI_v1::initStaticResource() { GUI_V1_BUTTON(_menuButtonData[4], 0x10, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0); GUI_V1_BUTTON(_menuButtonData[5], 0x11, 1, 1, 1, 0x487, 0, 0, 0, 0, 0, 0); - delete [] _menu; + delete[] _menu; _menu = new Menu[6]; assert(_menu); @@ -1429,8 +1429,8 @@ void GUI_v1::initStaticResource() { } void KyraEngine_v1::setupButtonData() { - delete [] _buttonData; - delete [] _buttonDataListPtr; + delete[] _buttonData; + delete[] _buttonDataListPtr; _buttonData = new Button[15]; assert(_buttonData); @@ -1612,7 +1612,7 @@ const int8 KyraEngine_HoF::_dosTrackMap[] = { const int KyraEngine_HoF::_dosTrackMapSize = ARRAYSIZE(KyraEngine_HoF::_dosTrackMap); void KyraEngine_HoF::initInventoryButtonList() { - delete [] _inventoryButtons; + delete[] _inventoryButtons; _inventoryButtons = new Button[15]; assert(_inventoryButtons); diff --git a/engines/kyra/text_hof.cpp b/engines/kyra/text_hof.cpp index dd1796dd02..3a0dab730c 100644 --- a/engines/kyra/text_hof.cpp +++ b/engines/kyra/text_hof.cpp @@ -452,7 +452,7 @@ void KyraEngine_HoF::updateDlgBuffer() { filename[11] = suffix[_lang]; if (_dlgBuffer) - delete [] _dlgBuffer; + delete[] _dlgBuffer; _dlgBuffer = _res->fileData(filename, 0); } diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp index db7cad941b..f4eadee4e2 100644 --- a/engines/kyra/vqa.cpp +++ b/engines/kyra/vqa.cpp @@ -69,7 +69,7 @@ void *VQAMovie::allocBuffer(int num, uint32 size) { * We could use realloc() here, but we don't actually need the * old contents of the buffer. */ - delete [] _buffers[num].data; + delete[] _buffers[num].data; _buffers[num].data = new uint8[size]; _buffers[num].size = size; } @@ -81,7 +81,7 @@ void *VQAMovie::allocBuffer(int num, uint32 size) { void VQAMovie::freeBuffers() { for (int i = 0; i < ARRAYSIZE(_buffers); i++) { - delete [] _buffers[i].data; + delete[] _buffers[i].data; _buffers[i].data = NULL; _buffers[i].size = 0; } @@ -356,11 +356,11 @@ bool VQAMovie::open(const char *filename) { void VQAMovie::close() { debugC(9, kDebugLevelMovie, "VQAMovie::close()"); if (_opened) { - delete [] _frameInfo; - delete [] _frame; - delete [] _codeBook; - delete [] _partialCodeBook; - delete [] _vectorPointers; + delete[] _frameInfo; + delete[] _frame; + delete[] _codeBook; + delete[] _partialCodeBook; + delete[] _vectorPointers; if (_vm->_mixer->isSoundHandleActive(_sound)) { _vm->_mixer->stopHandle(_sound); diff --git a/engines/kyra/wsamovie.cpp b/engines/kyra/wsamovie.cpp index 764327d701..5190f24ad6 100644 --- a/engines/kyra/wsamovie.cpp +++ b/engines/kyra/wsamovie.cpp @@ -117,7 +117,7 @@ int WSAMovieV1::open(const char *filename, int offscreenDecode, uint8 *palBuf) { if (firstFrame) Screen::decodeFrame4(_frameData, _deltaBuffer, _deltaBufferSize); - delete [] p; + delete[] p; _opened = true; return _numFrames; @@ -126,10 +126,10 @@ int WSAMovieV1::open(const char *filename, int offscreenDecode, uint8 *palBuf) { void WSAMovieV1::close() { debugC(9, kDebugLevelMovie, "WSAMovieV1::close()"); if (_opened) { - delete [] _deltaBuffer; - delete [] _offscreenBuffer; - delete [] _frameOffsTable; - delete [] _frameData; + delete[] _deltaBuffer; + delete[] _offscreenBuffer; + delete[] _frameOffsTable; + delete[] _frameData; _opened = false; } } @@ -230,7 +230,7 @@ int WSAMovieAmiga::open(const char *filename, int offscreenDecode, uint8 *palBuf void WSAMovieAmiga::close() { debugC(9, kDebugLevelMovie, "WSAMovieAmiga::close()"); if (_opened) { - delete [] _buffer; + delete[] _buffer; _buffer = 0; } WSAMovieV1::close(); @@ -423,7 +423,7 @@ int WSAMovieV2::open(const char *filename, int unk1, uint8 *palBuf) { if (firstFrame) Screen::decodeFrame4(_frameData, _deltaBuffer, _deltaBufferSize); - delete [] p; + delete[] p; _opened = true; return _numFrames; -- cgit v1.2.3 From f65e9a17c34daeaa93b7de99b639cddcc6997abe Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 7 May 2008 14:23:50 +0000 Subject: Changed the two instances of "delete []" into "delete[] " as well svn-id: r31926 --- engines/gob/goblin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/gob/goblin.cpp b/engines/gob/goblin.cpp index 64a2b15ef4..f97bd14fed 100644 --- a/engines/gob/goblin.cpp +++ b/engines/gob/goblin.cpp @@ -164,7 +164,7 @@ Goblin::~Goblin() { for (col = 0; col < 6; col++) if (_goblins[i]->realStateMach[state][col]) delete _goblins[i]->realStateMach[state][col]; - delete []_goblins[i]->realStateMach; + delete[] _goblins[i]->realStateMach; } delete _goblins[i]; } @@ -176,7 +176,7 @@ Goblin::~Goblin() { for (col = 0; col < 6; col++) if (_objects[i]->realStateMach[state][col]) delete _objects[i]->realStateMach[state][col]; - delete []_objects[i]->realStateMach; + delete[] _objects[i]->realStateMach; } delete _objects[i]; } -- cgit v1.2.3 From 600ab40bcab24d3c1c8d98d3fefefa6026f03382 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 7 May 2008 14:31:45 +0000 Subject: Changed all delete [] usages to delete[]. svn-id: r31927 --- backends/fs/amigaos4/amigaos4-fs.cpp | 10 +++++----- backends/midi/dmedia.cpp | 2 +- backends/platform/symbian/src/SymbianOS.cpp | 2 +- engines/agi/preagi_mickey.cpp | 8 ++++---- engines/agos/agos.cpp | 8 ++++---- engines/lure/res.cpp | 2 +- engines/lure/res_struct.cpp | 4 ++-- engines/scumm/dialogs.cpp | 4 ++-- engines/scumm/nut_renderer.cpp | 10 +++++----- engines/scumm/scumm.cpp | 6 +++--- engines/scumm/smush/channel.cpp | 6 +++--- engines/scumm/smush/codec37.cpp | 2 +- engines/scumm/smush/imuse_channel.cpp | 6 +++--- engines/scumm/smush/saud_channel.cpp | 2 +- engines/scumm/smush/smush_player.cpp | 4 ++-- engines/sword2/resman.cpp | 6 +++--- graphics/imageman.cpp | 2 +- gui/ListWidget.cpp | 2 +- gui/ThemeModern.cpp | 8 ++++---- gui/console.cpp | 2 +- gui/theme.cpp | 8 ++++---- sound/audiostream.cpp | 2 +- sound/softsynth/ym2612.cpp | 12 ++++++------ tools/create_kyradat/create_kyradat.cpp | 20 ++++++++++---------- tools/create_kyradat/pak.cpp | 2 +- 25 files changed, 70 insertions(+), 70 deletions(-) diff --git a/backends/fs/amigaos4/amigaos4-fs.cpp b/backends/fs/amigaos4/amigaos4-fs.cpp index 3f4ba18a30..5bf57ddf34 100644 --- a/backends/fs/amigaos4/amigaos4-fs.cpp +++ b/backends/fs/amigaos4/amigaos4-fs.cpp @@ -209,7 +209,7 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayNam if (IDOS->NameFromLock(pLock, (STRPTR)n, bufSize) != DOSFALSE) { _sPath = n; _sDisplayName = pDisplayName ? pDisplayName : IDOS->FilePart((STRPTR)n); - delete [] n; + delete[] n; break; } @@ -217,12 +217,12 @@ AmigaOSFilesystemNode::AmigaOSFilesystemNode(BPTR pLock, const char *pDisplayNam _bIsValid = false; debug(6, "IoErr() != ERROR_LINE_TOO_LONG"); LEAVE(); - delete [] n; + delete[] n; return; } bufSize *= 2; - delete [] n; + delete[] n; } _bIsValid = false; @@ -536,7 +536,7 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const { sprintf(buffer, "%s (%s)", volName, devName); - delete [] devName; + delete[] devName; AmigaOSFilesystemNode *entry = new AmigaOSFilesystemNode(volumeLock, buffer); if (entry) { @@ -554,7 +554,7 @@ AbstractFSList AmigaOSFilesystemNode::listVolumes() const { IDOS->UnLock(volumeLock); } - delete [] volName; + delete[] volName; } dosList = IDOS->NextDosEntry(dosList, LDF_VOLUMES); } diff --git a/backends/midi/dmedia.cpp b/backends/midi/dmedia.cpp index 6865f3e537..1904eaf647 100644 --- a/backends/midi/dmedia.cpp +++ b/backends/midi/dmedia.cpp @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * $URL:$ + * $URL$ * $Id: dmedia.cpp$ */ diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index 3e34025eab..dd34f8bf8f 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -142,7 +142,7 @@ void OSystem_SDL_Symbian::initBackend() { } OSystem_SDL_Symbian::~OSystem_SDL_Symbian() { - delete []_stereo_mix_buffer; + delete[]_stereo_mix_buffer; } int OSystem_SDL_Symbian::getDefaultGraphicsMode() const { diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp index 6944eee9f2..08f8969ca3 100644 --- a/engines/agi/preagi_mickey.cpp +++ b/engines/agi/preagi_mickey.cpp @@ -238,7 +238,7 @@ bool Mickey::checkMenu() { memcpy(buffer, &menu, sizeof(MSA_MENU)); getMenuSel(buffer, &iSel0, &iSel1); - delete [] buffer; + delete[] buffer; return parse(menu.cmd[iSel0].data[iSel1], menu.arg[iSel0].data[iSel1]); } @@ -645,7 +645,7 @@ void Mickey::playSound(ENUM_MSA_SOUND iSound) { case Common::EVENT_LBUTTONUP: case Common::EVENT_RBUTTONUP: case Common::EVENT_KEYDOWN: - delete [] buffer; + delete[] buffer; return; default: break; @@ -657,7 +657,7 @@ void Mickey::playSound(ENUM_MSA_SOUND iSound) { break; } - delete [] buffer; + delete[] buffer; } // Graphics @@ -893,7 +893,7 @@ void Mickey::drawLogo() { _vm->_picture->showPic(10, 10, w, h); - delete [] buffer; + delete[] buffer; } void Mickey::animate() { diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 015aff3458..a79b84843c 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -879,7 +879,7 @@ AGOSEngine::~AGOSEngine() { _midi.close(); for (uint i = 0; i < _itemHeap.size(); i++) { - delete [] _itemHeap[i]; + delete[] _itemHeap[i]; } _itemHeap.clear(); @@ -908,7 +908,7 @@ AGOSEngine::~AGOSEngine() { delete _dummyItem3; delete _dummyWindow; - delete [] _windowList; + delete[] _windowList; delete _debugger; delete _moviePlay; @@ -1017,7 +1017,7 @@ void AGOSEngine::shutdown() { _midi.close(); for (uint i = 0; i < _itemHeap.size(); i++) { - delete [] _itemHeap[i]; + delete[] _itemHeap[i]; } _itemHeap.clear(); @@ -1046,7 +1046,7 @@ void AGOSEngine::shutdown() { delete _dummyItem3; delete _dummyWindow; - delete [] _windowList; + delete[] _windowList; delete _debugger; delete _moviePlay; diff --git a/engines/lure/res.cpp b/engines/lure/res.cpp index ce35b50243..f2997d5d17 100644 --- a/engines/lure/res.cpp +++ b/engines/lure/res.cpp @@ -85,7 +85,7 @@ void Resources::freeData() { delete _talkDialogData; delete _messagesData; delete _cursors; - delete [] _charOffsets; + delete[] _charOffsets; } struct AnimRecordTemp { diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp index fcb6b874be..913505c8c9 100644 --- a/engines/lure/res_struct.cpp +++ b/engines/lure/res_struct.cpp @@ -1008,8 +1008,8 @@ RandomActionSet::RandomActionSet(uint16 *&offset) { } RandomActionSet::~RandomActionSet() { - delete [] _types; - delete [] _ids; + delete[] _types; + delete[] _ids; } RandomActionSet *RandomActionList::getRoom(uint16 roomNumber) { diff --git a/engines/scumm/dialogs.cpp b/engines/scumm/dialogs.cpp index 5b6c2bcf35..6d1cf1bbd8 100644 --- a/engines/scumm/dialogs.cpp +++ b/engines/scumm/dialogs.cpp @@ -692,8 +692,8 @@ void HelpDialog::displayKeyBindings() { _dsc[i]->setLabel(dscStr[i]); } - delete [] keyStr; - delete [] dscStr; + delete[] keyStr; + delete[] dscStr; } void HelpDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) { diff --git a/engines/scumm/nut_renderer.cpp b/engines/scumm/nut_renderer.cpp index 71182ca7a0..d56017c6f5 100644 --- a/engines/scumm/nut_renderer.cpp +++ b/engines/scumm/nut_renderer.cpp @@ -41,8 +41,8 @@ NutRenderer::NutRenderer(ScummEngine *vm, const char *filename) : } NutRenderer::~NutRenderer() { - delete [] _charBuffer; - delete [] _decodedData; + delete[] _charBuffer; + delete[] _decodedData; } void smush_decode_codec1(byte *dst, const byte *src, int left, int top, int width, int height, int pitch); @@ -254,14 +254,14 @@ void NutRenderer::loadFont(const char *filename) { offset += (dstPitch * _chars[l].height); } - delete [] _decodedData; + delete[] _decodedData; _decodedData = compressedData; _charBuffer = new byte[_maxCharSize]; } - delete [] dataSrc; - delete [] _paletteMap; + delete[] dataSrc; + delete[] _paletteMap; } int NutRenderer::getCharWidth(byte c) const { diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp index c99856b3a3..2f0593dca8 100644 --- a/engines/scumm/scumm.cpp +++ b/engines/scumm/scumm.cpp @@ -555,8 +555,8 @@ ScummEngine::~ScummEngine() { for (int i = 0; i < _numActors; ++i) delete _actors[i]; - delete [] _actors; - delete [] _sortedActors; + delete[] _actors; + delete[] _sortedActors; delete _2byteFontPtr; delete _charset; @@ -903,7 +903,7 @@ ScummEngine_v8::ScummEngine_v8(OSystem *syst, const DetectorResult &dr) } ScummEngine_v8::~ScummEngine_v8() { - delete [] _objectIDMap; + delete[] _objectIDMap; } #endif diff --git a/engines/scumm/smush/channel.cpp b/engines/scumm/smush/channel.cpp index 5b8cd3a853..836defd6fc 100644 --- a/engines/scumm/smush/channel.cpp +++ b/engines/scumm/smush/channel.cpp @@ -70,7 +70,7 @@ void SmushChannel::processBuffer() { _tbufferSize = 0; } if (_sbufferSize == 0) { - delete []_sbuffer; + delete[]_sbuffer; _sbuffer = 0; } } else { @@ -90,7 +90,7 @@ void SmushChannel::processBuffer() { if (!_sbuffer) error("smush channel failed to allocate memory"); memcpy(_sbuffer, _tbuffer + offset, _sbufferSize); - delete []_tbuffer; + delete[]_tbuffer; _tbuffer = 0; _tbufferSize = 0; } else { @@ -102,7 +102,7 @@ void SmushChannel::processBuffer() { error("smush channel failed to allocate memory"); memcpy(_tbuffer, old + offset, new_size); _tbufferSize = new_size; - delete []old; + delete[]old; } } } diff --git a/engines/scumm/smush/codec37.cpp b/engines/scumm/smush/codec37.cpp index 0c1db13a26..deabd25595 100644 --- a/engines/scumm/smush/codec37.cpp +++ b/engines/scumm/smush/codec37.cpp @@ -52,7 +52,7 @@ Codec37Decoder::Codec37Decoder(int width, int height) { Codec37Decoder::~Codec37Decoder() { if (_offsetTable) { - delete []_offsetTable; + delete[]_offsetTable; _offsetTable = 0; _tableLastPitch = -1; _tableLastIndex = -1; diff --git a/engines/scumm/smush/imuse_channel.cpp b/engines/scumm/smush/imuse_channel.cpp index 3a0efbc6b7..b4d261f4d1 100644 --- a/engines/scumm/smush/imuse_channel.cpp +++ b/engines/scumm/smush/imuse_channel.cpp @@ -83,7 +83,7 @@ bool ImuseChannel::appendData(Chunk &b, int32 size) { if (!_tbuffer) error("imuse_channel failed to allocate memory"); memcpy(_tbuffer, old, _tbufferSize); - delete []old; + delete[]old; b.read(_tbuffer + _tbufferSize, size); _tbufferSize += size; } else { @@ -155,7 +155,7 @@ void ImuseChannel::decode() { _tbuffer = new byte[new_size]; if (!_tbuffer) error("imuse_channel failed to allocate memory"); memcpy(_tbuffer, old, _tbufferSize); - delete []old; + delete[]old; memcpy(_tbuffer + _tbufferSize, _sbuffer + _sbufferSize - remaining_size, remaining_size); _tbufferSize += remaining_size; } @@ -180,7 +180,7 @@ void ImuseChannel::decode() { value = ((((v2 & 0xf0) << 4) | v3) << 4) - 0x8000; WRITE_BE_UINT16(decoded, value); decoded += 2; } - delete []_sbuffer; + delete[]_sbuffer; _sbuffer = (byte *)keep; _sbufferSize = new_size; } diff --git a/engines/scumm/smush/saud_channel.cpp b/engines/scumm/smush/saud_channel.cpp index 17296704ea..97f86fe5d9 100644 --- a/engines/scumm/smush/saud_channel.cpp +++ b/engines/scumm/smush/saud_channel.cpp @@ -135,7 +135,7 @@ bool SaudChannel::appendData(Chunk &b, int32 size) { if (!_tbuffer) error("saud_channel failed to allocate memory"); memcpy(_tbuffer, old, _tbufferSize); - delete []old; + delete[]old; b.read(_tbuffer + _tbufferSize, size); _tbufferSize += size; } else { diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index 906395c0ca..ec48a09196 100644 --- a/engines/scumm/smush/smush_player.cpp +++ b/engines/scumm/smush/smush_player.cpp @@ -86,7 +86,7 @@ public: } ~StringResource() { for (int32 i = 0; i < _nbStrings; i++) { - delete []_strings[i].string; + delete[]_strings[i].string; } } @@ -206,7 +206,7 @@ static StringResource *getStrings(ScummEngine *vm, const char *file, bool is_enc StringResource *sr = new StringResource; assert(sr); sr->init(filebuffer, length); - delete []filebuffer; + delete[]filebuffer; return sr; } diff --git a/engines/sword2/resman.cpp b/engines/sword2/resman.cpp index 88a1f6251a..d6b8025cda 100644 --- a/engines/sword2/resman.cpp +++ b/engines/sword2/resman.cpp @@ -191,7 +191,7 @@ bool ResourceManager::init() { if (cdInf[i].cd == 0 && !Common::File::exists((char *)cdInf[i].clusterName)) { _vm->GUIErrorMessage("Broken Sword 2: Cannot find " + Common::String((char *)cdInf[i].clusterName)); - delete [] cdInf; + delete[] cdInf; return false; } } @@ -205,7 +205,7 @@ bool ResourceManager::init() { } if (j == _totalClusters) { - delete [] cdInf; + delete[] cdInf; _vm->GUIErrorMessage(Common::String(_resFiles[i].fileName) + " is not in cd.inf"); return false; } @@ -213,7 +213,7 @@ bool ResourceManager::init() { _resFiles[i].cd = cdInf[j].cd; } - delete [] cdInf; + delete[] cdInf; debug(1, "%d resources in %d cluster files", _totalResFiles, _totalClusters); for (i = 0; i < _totalClusters; i++) diff --git a/graphics/imageman.cpp b/graphics/imageman.cpp index 6ab64e8bca..83ffc40c99 100644 --- a/graphics/imageman.cpp +++ b/graphics/imageman.cpp @@ -110,7 +110,7 @@ bool ImageManager::registerSurface(const Common::String &name, Surface *surf) { unzCloseCurrentFile(file->file); Common::MemoryReadStream stream(buffer, fileInfo.uncompressed_size); surf = ImageDecoder::loadFile(stream); - delete [] buffer; + delete[] buffer; if (!surf) return false; diff --git a/gui/ListWidget.cpp b/gui/ListWidget.cpp index c43a0f64d7..80898d06c8 100644 --- a/gui/ListWidget.cpp +++ b/gui/ListWidget.cpp @@ -495,7 +495,7 @@ void ListWidget::reflowLayout() { _entriesPerPage = (_h - _topPadding - _bottomPadding) / kLineHeight; - delete [] _textWidth; + delete[] _textWidth; _textWidth = new int[_entriesPerPage]; for (int i = 0; i < _entriesPerPage; i++) diff --git a/gui/ThemeModern.cpp b/gui/ThemeModern.cpp index 69595eb219..177171b40c 100644 --- a/gui/ThemeModern.cpp +++ b/gui/ThemeModern.cpp @@ -114,8 +114,8 @@ _forceRedraw(false), _lastUsedBitMask(0), _fonts(), _cursor(0), _imageHandles(), ThemeModern::~ThemeModern() { deleteFonts(); deinit(); - delete [] _images; - delete [] _cursor; + delete[] _images; + delete[] _cursor; _images = 0; for (int i = 0; i < kImageHandlesMax; ++i) { ImageMan.unregisterSurface(_imageHandles[i]); @@ -1470,7 +1470,7 @@ void ThemeModern::createCursor() { _system->colorToRGB(_colors[kColorTransparency], r, g, b); uint16 transparency = RGBToColor >(r, g, b); - delete [] _cursor; + delete[] _cursor; _cursor = new byte[_cursorWidth * _cursorHeight]; assert(_cursor); @@ -1502,7 +1502,7 @@ void ThemeModern::createCursor() { } _useCursor = true; - delete [] table; + delete[] table; } #pragma mark - diff --git a/gui/console.cpp b/gui/console.cpp index b57ccbdaa6..728724d76f 100644 --- a/gui/console.cpp +++ b/gui/console.cpp @@ -295,7 +295,7 @@ void ConsoleDialog::handleKeyDown(Common::KeyState state) { keepRunning = (*_callbackProc)(this, str, _callbackRefCon); // Get rid of the string buffer - delete [] str; + delete[] str; } print(PROMPT); diff --git a/gui/theme.cpp b/gui/theme.cpp index a044769bfd..c8501c4f91 100644 --- a/gui/theme.cpp +++ b/gui/theme.cpp @@ -82,7 +82,7 @@ const Graphics::Font *Theme::loadFont(const char *filename) { font = Graphics::NewFont::loadFromCache(stream); - delete [] buffer; + delete[] buffer; buffer = 0; } unzClose(zipFile); @@ -112,7 +112,7 @@ const Graphics::Font *Theme::loadFont(const char *filename) { font = Graphics::NewFont::loadFont(stream); - delete [] buffer; + delete[] buffer; buffer = 0; } unzClose(zipFile); @@ -175,7 +175,7 @@ bool Theme::loadConfigFile(const Common::String &stylefile) { unzClose(zipFile); return false; } - delete [] buffer; + delete[] buffer; buffer = 0; } else { unzClose(zipFile); @@ -225,7 +225,7 @@ bool Theme::themeConfigUseable(const Common::String &stylefile, const Common::St unzClose(zipFile); return false; } - delete [] buffer; + delete[] buffer; buffer = 0; } } else { diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp index 771baf351a..0fba6affdb 100644 --- a/sound/audiostream.cpp +++ b/sound/audiostream.cpp @@ -300,7 +300,7 @@ int AppendableMemoryStream::readBuffer(int16 assert(buf.start <= _pos && _pos <= buf.end); const int samplesLeftInCurBuffer = buf.end - _pos; if (samplesLeftInCurBuffer == 0) { - delete [] buf.start; + delete[] buf.start; _bufferQueue.erase(_bufferQueue.begin()); _pos = 0; continue; diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp index 57ad0f1c62..1e985aeb1c 100644 --- a/sound/softsynth/ym2612.cpp +++ b/sound/softsynth/ym2612.cpp @@ -742,12 +742,12 @@ void MidiDriver_YM2612::createLookupTables() { } void MidiDriver_YM2612::removeLookupTables() { - delete [] sintbl; - delete [] powtbl; - delete [] frequencyTable; - delete [] keycodeTable; - delete [] keyscaleTable; - delete [] attackOut; + delete[] sintbl; + delete[] powtbl; + delete[] frequencyTable; + delete[] keycodeTable; + delete[] keyscaleTable; + delete[] attackOut; sintbl = powtbl = frequencyTable = keycodeTable = keyscaleTable = attackOut = 0; } diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index 1e6b779c7d..8ca0f61edc 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -586,7 +586,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint while (ptr < endOffs) { if (ptr[1]) { error("invalid sequence data encountered"); - delete [] buffer; + delete[] buffer; return false; } @@ -743,7 +743,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint WRITE_BE_UINT16(finHeader, numSequences); WRITE_BE_UINT16(&finHeader[numSequences + 1], numNestedSequences); memcpy (finBuffer + finHeaderSize, buffer + headerSize, finBufferSize - finHeaderSize); - delete [] buffer; + delete[] buffer; finHeader = (uint16*) (finBuffer + ((numSequences + 2) * sizeof(uint16))); for (int i = 0; i < numNestedSequences; i++) { @@ -988,14 +988,14 @@ bool updateIndex(PAKFile &out, const Game *g) { memcpy(index, data, size); if (!updateIndex(index, kIndexSize, g)) { - delete [] index; + delete[] index; return false; } out.removeFile(filename); if (!out.addFile(filename, index, kIndexSize)) { fprintf(stderr, "ERROR: couldn't update %s file", filename); - delete [] index; + delete[] index; return false; } @@ -1049,7 +1049,7 @@ int main(int argc, char *argv[]) { if (fread(buffer, 1, size, input) != size) { warning("couldn't read from file '%s', skipping it", argv[i]); - delete [] buffer; + delete[] buffer; fclose(input); continue; } @@ -1058,13 +1058,13 @@ int main(int argc, char *argv[]) { const Game *g = findGame(buffer, size); if (!g) { warning("skipping unknown file '%s'", argv[i]); - delete [] buffer; + delete[] buffer; continue; } if (!hasNeededEntries(g, &out)) { warning("file '%s' is missing offset entries and thus can't be processed", argv[i]); - delete [] buffer; + delete[] buffer; continue; } @@ -1078,7 +1078,7 @@ int main(int argc, char *argv[]) { // We switch to the second language and continue extraction. if (!hasNeededEntries(++g, &out)) { warning("file '%s' is missing offset entries and thus can't be processed", argv[i]); - delete [] buffer; + delete[] buffer; continue; } if (!process(out, g, buffer, size)) @@ -1090,14 +1090,14 @@ int main(int argc, char *argv[]) { // We switch to the third language and continue extraction. if (!hasNeededEntries(++g, &out)) { warning("file '%s' is missing offset entries and thus can't be processed", argv[i]); - delete [] buffer; + delete[] buffer; continue; } if (!process(out, g, buffer, size)) fprintf(stderr, "ERROR: couldn't process file '%s'", argv[i]); } - delete [] buffer; + delete[] buffer; } if (!out.saveFile(argv[1])) diff --git a/tools/create_kyradat/pak.cpp b/tools/create_kyradat/pak.cpp index f3446df291..0187168c0f 100644 --- a/tools/create_kyradat/pak.cpp +++ b/tools/create_kyradat/pak.cpp @@ -78,7 +78,7 @@ bool PAKFile::loadFile(const char *file, const bool isAmiga) { startoffset = endoffset; } - delete [] buffer; + delete[] buffer; return true; } -- cgit v1.2.3 From 2d707af33825097e3fd0c001101d9a2691e9ff6f Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Wed, 7 May 2008 14:49:42 +0000 Subject: A (temporary?) fix for the signed/unsigned issues with enum CommandFlags usage. svn-id: r31928 --- engines/parallaction/objects.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engines/parallaction/objects.h b/engines/parallaction/objects.h index cfb78f941b..5b33799985 100644 --- a/engines/parallaction/objects.h +++ b/engines/parallaction/objects.h @@ -94,8 +94,6 @@ enum ZoneFlags { enum CommandFlags { - kFlagsAll = 0xFFFFFFFF, - kFlagsVisited = 1, kFlagsExit = 0x10000000, kFlagsEnter = 0x20000000, @@ -104,6 +102,12 @@ enum CommandFlags { // BRA specific kFlagsTestTrue = 2 }; +// This was moved here from inside the enum CommandFlags above because at +// least MSVC8 uses a signed int for representing enumerations and kFlagsAll +// uses an unsigned int value that can't be represented directly with a signed +// int (It's represented as -1 instead of 0xFFFFFFFF). Casting the enum values +// to unsigned ints when needed would've been another way to fix this. +const uint32 kFlagsAll = 0xFFFFFFFF; -- cgit v1.2.3 From 311e9165ed3b9442049e9e5e6b25c31d024f04ac Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 7 May 2008 15:09:10 +0000 Subject: Proper delete[] formatting (this time all occurences should've been changed...) svn-id: r31929 --- backends/platform/symbian/src/SymbianOS.cpp | 2 +- common/array.h | 8 ++++---- engines/scumm/smush/channel.cpp | 6 +++--- engines/scumm/smush/codec37.cpp | 2 +- engines/scumm/smush/imuse_channel.cpp | 6 +++--- engines/scumm/smush/saud_channel.cpp | 2 +- engines/scumm/smush/smush_player.cpp | 4 ++-- graphics/cursorman.h | 4 ++-- test/cxxtest/sample/CreatedTest.h | 2 +- test/cxxtest/sample/FixtureTest.h | 2 +- tools/create_kyradat/pak.h | 4 ++-- 11 files changed, 21 insertions(+), 21 deletions(-) diff --git a/backends/platform/symbian/src/SymbianOS.cpp b/backends/platform/symbian/src/SymbianOS.cpp index dd34f8bf8f..d3e92731db 100644 --- a/backends/platform/symbian/src/SymbianOS.cpp +++ b/backends/platform/symbian/src/SymbianOS.cpp @@ -142,7 +142,7 @@ void OSystem_SDL_Symbian::initBackend() { } OSystem_SDL_Symbian::~OSystem_SDL_Symbian() { - delete[]_stereo_mix_buffer; + delete[] _stereo_mix_buffer; } int OSystem_SDL_Symbian::getDefaultGraphicsMode() const { diff --git a/common/array.h b/common/array.h index 24a07b49bf..854ce5b91d 100644 --- a/common/array.h +++ b/common/array.h @@ -99,7 +99,7 @@ public: if (this == &array) return *this; - delete [] _data; + delete[] _data; _size = array._size; _capacity = _size + 32; _data = new T[_capacity]; @@ -113,7 +113,7 @@ public: } void clear() { - delete [] _data; + delete[] _data; _data = 0; _size = 0; _capacity = 0; @@ -151,7 +151,7 @@ public: if (old_data) { // Copy old data copy(old_data, old_data + _size, _data); - delete [] old_data; + delete[] old_data; } } @@ -166,7 +166,7 @@ public: // Copy old data int cnt = (_size < newSize ? _size : newSize); copy(old_data, old_data + cnt, _data); - delete [] old_data; + delete[] old_data; } _size = newSize; } diff --git a/engines/scumm/smush/channel.cpp b/engines/scumm/smush/channel.cpp index 836defd6fc..ccf67764e3 100644 --- a/engines/scumm/smush/channel.cpp +++ b/engines/scumm/smush/channel.cpp @@ -70,7 +70,7 @@ void SmushChannel::processBuffer() { _tbufferSize = 0; } if (_sbufferSize == 0) { - delete[]_sbuffer; + delete[] _sbuffer; _sbuffer = 0; } } else { @@ -90,7 +90,7 @@ void SmushChannel::processBuffer() { if (!_sbuffer) error("smush channel failed to allocate memory"); memcpy(_sbuffer, _tbuffer + offset, _sbufferSize); - delete[]_tbuffer; + delete[] _tbuffer; _tbuffer = 0; _tbufferSize = 0; } else { @@ -102,7 +102,7 @@ void SmushChannel::processBuffer() { error("smush channel failed to allocate memory"); memcpy(_tbuffer, old + offset, new_size); _tbufferSize = new_size; - delete[]old; + delete[] old; } } } diff --git a/engines/scumm/smush/codec37.cpp b/engines/scumm/smush/codec37.cpp index deabd25595..658d67c1b4 100644 --- a/engines/scumm/smush/codec37.cpp +++ b/engines/scumm/smush/codec37.cpp @@ -52,7 +52,7 @@ Codec37Decoder::Codec37Decoder(int width, int height) { Codec37Decoder::~Codec37Decoder() { if (_offsetTable) { - delete[]_offsetTable; + delete[] _offsetTable; _offsetTable = 0; _tableLastPitch = -1; _tableLastIndex = -1; diff --git a/engines/scumm/smush/imuse_channel.cpp b/engines/scumm/smush/imuse_channel.cpp index b4d261f4d1..822f32a896 100644 --- a/engines/scumm/smush/imuse_channel.cpp +++ b/engines/scumm/smush/imuse_channel.cpp @@ -83,7 +83,7 @@ bool ImuseChannel::appendData(Chunk &b, int32 size) { if (!_tbuffer) error("imuse_channel failed to allocate memory"); memcpy(_tbuffer, old, _tbufferSize); - delete[]old; + delete[] old; b.read(_tbuffer + _tbufferSize, size); _tbufferSize += size; } else { @@ -155,7 +155,7 @@ void ImuseChannel::decode() { _tbuffer = new byte[new_size]; if (!_tbuffer) error("imuse_channel failed to allocate memory"); memcpy(_tbuffer, old, _tbufferSize); - delete[]old; + delete[] old; memcpy(_tbuffer + _tbufferSize, _sbuffer + _sbufferSize - remaining_size, remaining_size); _tbufferSize += remaining_size; } @@ -180,7 +180,7 @@ void ImuseChannel::decode() { value = ((((v2 & 0xf0) << 4) | v3) << 4) - 0x8000; WRITE_BE_UINT16(decoded, value); decoded += 2; } - delete[]_sbuffer; + delete[] _sbuffer; _sbuffer = (byte *)keep; _sbufferSize = new_size; } diff --git a/engines/scumm/smush/saud_channel.cpp b/engines/scumm/smush/saud_channel.cpp index 97f86fe5d9..2fe34efe29 100644 --- a/engines/scumm/smush/saud_channel.cpp +++ b/engines/scumm/smush/saud_channel.cpp @@ -135,7 +135,7 @@ bool SaudChannel::appendData(Chunk &b, int32 size) { if (!_tbuffer) error("saud_channel failed to allocate memory"); memcpy(_tbuffer, old, _tbufferSize); - delete[]old; + delete[] old; b.read(_tbuffer + _tbufferSize, size); _tbufferSize += size; } else { diff --git a/engines/scumm/smush/smush_player.cpp b/engines/scumm/smush/smush_player.cpp index ec48a09196..494357a90c 100644 --- a/engines/scumm/smush/smush_player.cpp +++ b/engines/scumm/smush/smush_player.cpp @@ -86,7 +86,7 @@ public: } ~StringResource() { for (int32 i = 0; i < _nbStrings; i++) { - delete[]_strings[i].string; + delete[] _strings[i].string; } } @@ -206,7 +206,7 @@ static StringResource *getStrings(ScummEngine *vm, const char *file, bool is_enc StringResource *sr = new StringResource; assert(sr); sr->init(filebuffer, length); - delete[]filebuffer; + delete[] filebuffer; return sr; } diff --git a/graphics/cursorman.h b/graphics/cursorman.h index c15c65cb94..151038e118 100644 --- a/graphics/cursorman.h +++ b/graphics/cursorman.h @@ -152,7 +152,7 @@ private: } ~Cursor() { - delete [] _data; + delete[] _data; } }; @@ -180,7 +180,7 @@ private: } ~Palette() { - delete [] _data; + delete[] _data; } }; diff --git a/test/cxxtest/sample/CreatedTest.h b/test/cxxtest/sample/CreatedTest.h index 84e8ae8a4b..53a6821a21 100644 --- a/test/cxxtest/sample/CreatedTest.h +++ b/test/cxxtest/sample/CreatedTest.h @@ -16,7 +16,7 @@ class CreatedTest : public CxxTest::TestSuite char *_buffer; public: CreatedTest( unsigned size ) : _buffer( new char[size] ) {} - virtual ~CreatedTest() { delete [] _buffer; } + virtual ~CreatedTest() { delete[] _buffer; } static CreatedTest *createSuite() { return new CreatedTest( 16 ); } static void destroySuite( CreatedTest *suite ) { delete suite; } diff --git a/test/cxxtest/sample/FixtureTest.h b/test/cxxtest/sample/FixtureTest.h index 653c7a14ae..33a119f2bd 100644 --- a/test/cxxtest/sample/FixtureTest.h +++ b/test/cxxtest/sample/FixtureTest.h @@ -22,7 +22,7 @@ public: void tearDown() { - delete [] _buffer; + delete[] _buffer; } void test_strcpy() diff --git a/tools/create_kyradat/pak.h b/tools/create_kyradat/pak.h index 1634411f4c..a90b930fcc 100644 --- a/tools/create_kyradat/pak.h +++ b/tools/create_kyradat/pak.h @@ -53,8 +53,8 @@ public: struct FileList { FileList() : filename(0), size(0), data(0), next(0) {} ~FileList() { - delete [] filename; - delete [] data; + delete[] filename; + delete[] data; delete next; } -- cgit v1.2.3 From a7f5150228c405b2083cf9fd5da5d0890610f113 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 7 May 2008 17:28:38 +0000 Subject: - cmd_return now exits the game if it returns from the main function - Implemented cmd_exit - PmvPlayer now exits "more gracefully" when the application is closed while playing svn-id: r31930 --- engines/made/pmvplayer.cpp | 4 ++-- engines/made/script.cpp | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index 06dc4e5aed..b3f9915b92 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -188,8 +188,8 @@ void PmvPlayer::handleEvents() { _abort = true; break; case Common::EVENT_QUIT: - // TODO: Exit more gracefully - g_system->quit(); + _vm->_quit = true; + _abort = true; break; default: break; diff --git a/engines/made/script.cpp b/engines/made/script.cpp index ba0b61d29b..6e896d94be 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -192,7 +192,7 @@ ScriptInterpreter::~ScriptInterpreter() { void ScriptInterpreter::runScript(int16 scriptObjectIndex) { - _terminated = false; + _vm->_quit = false; _runningScriptObjectIndex = scriptObjectIndex; _localStackPos = _stack.getStackPos(); @@ -200,7 +200,7 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) { _codeBase = _vm->_dat->getObject(_runningScriptObjectIndex)->getData(); _codeIp = _codeBase; - while (!_terminated) { + while (!_vm->_quit) { byte opcode = readByte(); if (opcode >= 1 && opcode <= _commandsMax) { debug(4, "[%04X:%04X] opcode = %s", _runningScriptObjectIndex, (uint) (_codeIp - _codeBase), _commands[opcode - 1].desc); @@ -418,11 +418,17 @@ void ScriptInterpreter::cmd_vsize() { } void ScriptInterpreter::cmd_exit() { - warning("Unimplemented command: cmd_exit"); + _vm->_quit = true; } void ScriptInterpreter::cmd_return() { - // TODO: Check if returning from main function + + // Check if returning from main function + if (_localStackPos == kScriptStackSize) { + _vm->_quit = true; + return; + } + int16 funcResult = _stack.top(); _stack.setStackPos(_localStackPos); _localStackPos = kScriptStackLimit - _stack.pop(); -- cgit v1.2.3 From b6d2cf3553b118eca831c029fcc186eaec5ef799 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 7 May 2008 17:29:46 +0000 Subject: Implemented vertical/horizontal flipping of sprites. svn-id: r31931 --- engines/made/screen.cpp | 62 +++++++++++++++++++++++++++++++++---------------- engines/made/screen.h | 10 ++++---- 2 files changed, 47 insertions(+), 25 deletions(-) diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 74053e70a2..c88244a8a2 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -94,7 +94,7 @@ void Screen::clearScreen() { _needPalette = true; } -void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, const ClipInfo &clipInfo) { +void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 flipX, int16 flipY, const ClipInfo &clipInfo) { byte *source, *dest; int startX = 0; @@ -125,12 +125,34 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, const C source = (byte*)sourceSurface->getBasePtr(startX, startY); dest = (byte*)clipInfo.destSurface->getBasePtr(x, y); + int32 sourcePitch, linePtrAdd; + byte *linePtr; + + if (flipX) { + linePtrAdd = -1; + } else { + linePtrAdd = 1; + } + + if (flipY) { + sourcePitch = -sourceSurface->pitch; + source += (clipHeight - 1) * sourceSurface->pitch; + } else { + sourcePitch = sourceSurface->pitch; + } + for (int16 yc = 0; yc < clipHeight; yc++) { + if (flipX) { + linePtr = source + sourceSurface->w; + } else { + linePtr = source; + } for (int16 xc = 0; xc < clipWidth; xc++) { - if (source[xc]) - dest[xc] = source[xc]; + if (*linePtr) + dest[xc] = *linePtr; + linePtr += linePtrAdd; } - source += sourceSurface->pitch; + source += sourcePitch; dest += clipInfo.destSurface->pitch; } @@ -208,8 +230,8 @@ void Screen::drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask debug(2, "drawSpriteChannels() i = %d\n", i); if (((_channels[i].state & includeStateMask) == includeStateMask) && (_channels[i].state & excludeStateMask) == 0) { - uint16 flag1 = _channels[i].state & 0x10; - uint16 flag2 = _channels[i].state & 0x20; + int16 flipX = _channels[i].state & 0x10; + int16 flipY = _channels[i].state & 0x20; debug(2, "drawSpriteChannels() type = %d; index = %04X\n", _channels[i].type, _channels[i].index); @@ -217,15 +239,15 @@ void Screen::drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask case 1: // drawFlex if (_channels[i].state & 4) { - drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flag1, flag2, _clipArea); + drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flipX, flipY, _clipArea); } else if (_channels[i].state & 8) { for (int excludeIndex = 0; excludeIndex < 4; excludeIndex++) { if (_excludeClipAreaEnabled[excludeIndex]) { - drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flag1, flag2, _excludeClipArea[excludeIndex]); + drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flipX, flipY, _excludeClipArea[excludeIndex]); } } } else { - drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flag1, flag2, clipInfo); + drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flipX, flipY, clipInfo); } break; @@ -235,15 +257,15 @@ void Screen::drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask case 3: // drawAnimFrame if (_channels[i].state & 4) { - drawAnimFrame(_channels[i].index, _channels[i].x, _channels[i].y, _channels[i].frameNum, flag1, flag2, _clipArea); + drawAnimFrame(_channels[i].index, _channels[i].x, _channels[i].y, _channels[i].frameNum, flipX, flipY, _clipArea); } else if (_channels[i].state & 8) { for (int excludeIndex = 0; excludeIndex < 4; excludeIndex++) { if (_excludeClipAreaEnabled[excludeIndex]) { - drawAnimFrame(_channels[i].index, _channels[i].x, _channels[i].y, _channels[i].frameNum, flag1, flag2, _excludeClipArea[excludeIndex]); + drawAnimFrame(_channels[i].index, _channels[i].x, _channels[i].y, _channels[i].frameNum, flipX, flipY, _excludeClipArea[excludeIndex]); } } } else { - drawAnimFrame(_channels[i].index, _channels[i].x, _channels[i].y, _channels[i].frameNum, flag1, flag2, clipInfo); + drawAnimFrame(_channels[i].index, _channels[i].x, _channels[i].y, _channels[i].frameNum, flipX, flipY, clipInfo); } break; @@ -282,7 +304,7 @@ void Screen::clearChannels() { _channelsUsedCount = 0; } -uint16 Screen::drawFlex(uint16 flexIndex, int16 x, int16 y, uint16 flag1, uint16 flag2, const ClipInfo &clipInfo) { +uint16 Screen::drawFlex(uint16 flexIndex, int16 x, int16 y, int16 flipX, int16 flipY, const ClipInfo &clipInfo) { if (flexIndex == 0) return 0; @@ -290,7 +312,7 @@ uint16 Screen::drawFlex(uint16 flexIndex, int16 x, int16 y, uint16 flag1, uint16 PictureResource *flex = _vm->_res->getPicture(flexIndex); Graphics::Surface *sourceSurface = flex->getPicture(); - drawSurface(sourceSurface, x, y, clipInfo); + drawSurface(sourceSurface, x, y, flipX, flipY, clipInfo); // Palette is set in showPage if (flex->hasPalette() && !_paletteLock && _needPalette) { @@ -307,7 +329,7 @@ uint16 Screen::drawFlex(uint16 flexIndex, int16 x, int16 y, uint16 flag1, uint16 return 0; } -void Screen::drawAnimFrame(uint16 animIndex, int16 x, int16 y, int16 frameNum, uint16 flag1, uint16 flag2, const ClipInfo &clipInfo) { +void Screen::drawAnimFrame(uint16 animIndex, int16 x, int16 y, int16 frameNum, int16 flipX, int16 flipY, const ClipInfo &clipInfo) { if (frameNum < 0) return; @@ -315,18 +337,18 @@ void Screen::drawAnimFrame(uint16 animIndex, int16 x, int16 y, int16 frameNum, u AnimationResource *anim = _vm->_res->getAnimation(animIndex); Graphics::Surface *sourceSurface = anim->getFrame(frameNum); - drawSurface(sourceSurface, x, y, clipInfo); + drawSurface(sourceSurface, x, y, flipX, flipY, clipInfo); _vm->_res->freeResource(anim); } -uint16 Screen::drawPic(uint16 index, int16 x, int16 y, uint16 flag1, uint16 flag2) { - drawFlex(index, x, y, flag1, flag2, _clipInfo1); +uint16 Screen::drawPic(uint16 index, int16 x, int16 y, int16 flipX, int16 flipY) { + drawFlex(index, x, y, flipX, flipY, _clipInfo1); return 0; } -uint16 Screen::drawAnimPic(uint16 animIndex, int16 x, int16 y, int16 frameNum, uint16 flag1, uint16 flag2) { - drawAnimFrame(animIndex, x, y, frameNum, flag1, flag2, _clipInfo1); +uint16 Screen::drawAnimPic(uint16 animIndex, int16 x, int16 y, int16 frameNum, int16 flipX, int16 flipY) { + drawAnimFrame(animIndex, x, y, frameNum, flipX, flipY, _clipInfo1); return 0; } diff --git a/engines/made/screen.h b/engines/made/screen.h index 0ca28086f9..d267b84c30 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -62,7 +62,7 @@ public: void clearScreen(); - void drawSurface(Graphics::Surface *sourceSurface, int x, int y, const ClipInfo &clipInfo); + void drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 flipX, int16 flipY, const ClipInfo &clipInfo); void loadRGBPalette(byte *palRGB, int count = 256); void setRGBPalette(byte *palRGB, int start = 0, int count = 256); bool isPaletteLocked() { return _paletteLock; } @@ -110,11 +110,11 @@ public: void updateSprites(); void clearChannels(); - uint16 drawFlex(uint16 flexIndex, int16 x, int16 y, uint16 flag1, uint16 flag2, const ClipInfo &clipInfo); - void drawAnimFrame(uint16 animIndex, int16 x, int16 y, int16 frameNum, uint16 flag1, uint16 flag2, const ClipInfo &clipInfo); + uint16 drawFlex(uint16 flexIndex, int16 x, int16 y, int16 flipX, int16 flipY, const ClipInfo &clipInfo); + void drawAnimFrame(uint16 animIndex, int16 x, int16 y, int16 frameNum, int16 flipX, int16 flipY, const ClipInfo &clipInfo); - uint16 drawPic(uint16 index, int16 x, int16 y, uint16 flag1, uint16 flag2); - uint16 drawAnimPic(uint16 animIndex, int16 x, int16 y, int16 frameNum, uint16 flag1, uint16 flag2); + uint16 drawPic(uint16 index, int16 x, int16 y, int16 flipX, int16 flipY); + uint16 drawAnimPic(uint16 animIndex, int16 x, int16 y, int16 frameNum, int16 flipX, int16 flipY); void addSprite(uint16 spriteIndex); -- cgit v1.2.3 From b95db3529e57943ddf036550950642e584441a30 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 7 May 2008 17:57:19 +0000 Subject: Even more German fixes from Raziel svn-id: r31932 --- engines/drascula/texts.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/drascula/texts.cpp b/engines/drascula/texts.cpp index d4cde5b5fa..229852b9c7 100644 --- a/engines/drascula/texts.cpp +++ b/engines/drascula/texts.cpp @@ -251,7 +251,7 @@ const char *_text[][501] = { "OH, SURE...OF COURSE!", "WELL, THANKS VERY MUCH FOR YOUR HELP. I WON'T BOTHER YOU ANYMORE IF YOU PLEASE TELL ME WHERE THE DOOR IS...", "IT'S BECAUSE THE KNOCK MUST HAVE AFFECTED MY BRAIN...I CAN'T SEE A THING...", - "WELL...THAT DOESN'T MATTER. I ALWAYS CARRY AN SPARE ONE", + "WELL...THAT DOESN'T MATTER. I ALWAYS CARRY A SPARE ONE", "WOW, WHAT A HOT CHICK!! I DIDN'T NOTICE!, BUT OF COURSE, I WASN'T WEARING MY GLASSES", "HEY...", "AND ALL THIIIISSS???", @@ -263,11 +263,11 @@ const char *_text[][501] = { "WHAT?", "TO TELL YOU THE TRUTH...ON SECOND THOUGHTS...I DON'T REALLY THINK SO", "AND SO TELL ME YOU ERUDITE PHILOSOPHER, IS THERE ANY RELATIONSHIP CAUSE-AND-EFFECT BETWEEN SILLY AND BILLY?", - "OK, OK, FORGET IT. I DON'T EVEN KNOW WHU I SAID ANYTHING ABOUT IT", - "WHAT ARE YOU DONIG HERE PHILOSPOZING INSTEAD OF BEING EATING SOME PEOPLE", + "OK, OK, FORGET IT. I DON'T EVEN KNOW WHO I SAID ANYTHING ABOUT IT", + "WHAT ARE YOU DOING HERE PHILOSPOZING INSTEAD OF BEING EATING SOME PEOPLE", "HOW COME?", "HEY, COULD YOU SAY AGAIN ALL THAT ABOUT PRE-EVOLUTIONARY RELATIONSHIPS?", - "YES, MAN. ALL THAT STUFF YOU TOLD ME ABOUT NEFORE. I DIDN'D GET IT VERY WELL, YOU KNOW", + "YES, MAN. ALL THAT STUFF YOU TOLD ME ABOUT BEFORE. I DIDN'T GET IT VERY WELL, YOU KNOW", "NO, I'D RATHER NOT SAY ANYTHING, IN CASE HE GETS ANGRY OR SOMETHING...", "HELLO?", "YES, WHAT'S UP?", @@ -396,7 +396,7 @@ const char *_text[][501] = { "COOOMEE OONNN...", "WELL GOODBYE, I HAVE TO KILL A VAMPIRE", "", - "WHAT'S YOUR LANGUAGE, TRASILVANIAN?", + "WHAT'S YOUR LANGUAGE, TRANSILVANIAN?", "WHO IS UNCLE DESIDERIO?", "BUT, WHAT'S THE MATTER WITH THAT DRASCULA?", "WHO IS THAT GUY NAMED VON BRAUN?", @@ -1157,7 +1157,7 @@ const char *_text[][501] = { "NEIN, ER MUSS AN EINEM KueHLEN ORT GELAGERT WERDEN, FERN DER ZERSToeRERISCHEN KRAFT DER ATMOSPHaeRE", "KNOCHENTROCKEN, WIE MEIN CHEF!", "EIN SEHR SPITZER PFLOCK", - "GUTER SPITZER PFLOHOCK, HOLZ SO EDEL, TRANSILVAAANISCH!!!", + "GUTER SPITZER PFLOHOCK, HOLZ SO EDEL, TRANSSYLVAAANISCH!!!", "OH VERDAMMT, ICH MUSS MIR DIE NaeGEL SCHNEIDEN !", "DA DRINNEN LIEGT B.J., UND GUCK MAL WIE DIE TANTE AUSSIEHT !", "NIET UND NAGELFEST", -- cgit v1.2.3 From 37c04c28a8b9d3affc69db0161156f343fc8ab9f Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Wed, 7 May 2008 21:04:06 +0000 Subject: Fix invalid memory access bug in the library sequence (original static data seems to be bugged here) svn-id: r31933 --- engines/kyra/staticres.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 59a64e3aba..8ace7288f2 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -728,6 +728,11 @@ bool StaticResource::loadHofSequenceData(const char *filename, void *&ptr, int & if (ctrlOffs) { int num_c = *(filePtr + ctrlOffs); const uint16 *in_c = (uint16*) (filePtr + ctrlOffs + 1); + // safety check for library sequence which is supposed to have + // one frame more than control entries (seems to be a bug in + // the original code). This caused invalid memory access . + if (tmp_n[i].endFrame > num_c) + tmp_n[i].endFrame = num_c; FrameControl *tmp_f = new FrameControl[num_c]; for (int ii = 0; ii < num_c; ii++) { -- cgit v1.2.3 From a7320fb4dca157270c9cae0f14601bcb77710d94 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 7 May 2008 21:12:26 +0000 Subject: Implemented KyraEngine_MR::timerFleaDeath. svn-id: r31934 --- engines/kyra/timer_mr.cpp | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/engines/kyra/timer_mr.cpp b/engines/kyra/timer_mr.cpp index 53865ba0e3..37a910ccf2 100644 --- a/engines/kyra/timer_mr.cpp +++ b/engines/kyra/timer_mr.cpp @@ -64,7 +64,25 @@ void KyraEngine_MR::timerRunSceneScript7(int arg) { void KyraEngine_MR::timerFleaDeath(int arg) { debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_MR::timerFleaDeath(%d)", arg); - warning("STUB timerFleaDeath"); + _timer->setCountdown(4, 5400); + saveGame(getSavegameFilename(999), "SECOND CHANCE SAVE GAME"); + _screen->hideMouse(); + _timer->disable(4); + runAnimationScript("FLEADTH1.EMC", 0, 0, 1, 1); + runAnimationScript("FLEADTH2.EMC", 0, 0, 1, 0); + showBadConscience(); + delay(60, true); + const char *str1 = (const char *)getTableEntry(_cCodeFile, 130); + const char *str2 = (const char *)getTableEntry(_cCodeFile, 131); + if (str1 && str2) { + badConscienceChat(str1, 204, 130); + badConscienceChat(str2, 204, 131); + } + delay(60, true); + hideBadConscience(); + runAnimationScript("FLEADTH3.EMC", 0, 0, 0, 1); + _deathHandler = 9; + _screen->showMouse(); } void KyraEngine_MR::setWalkspeed(uint8 speed) { -- cgit v1.2.3 From 627d30d389299ee64f0105f08e8910206a1e9edb Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 7 May 2008 22:48:44 +0000 Subject: Fixed bug when starting new game from load menu. svn-id: r31935 --- engines/kyra/gui_mr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp index 8d27938aff..c1af41ded7 100644 --- a/engines/kyra/gui_mr.cpp +++ b/engines/kyra/gui_mr.cpp @@ -938,6 +938,7 @@ int GUI_MR::loadMenu(Button *caller) { } else if (_vm->_gameToLoad >= 0) { restorePage1(_vm->_screenBuffer); restorePalette(); + _vm->_menuDirectlyToLoad = false; _vm->loadGame(_vm->getSavegameFilename(_vm->_gameToLoad)); if (_vm->_gameToLoad == 0) { _restartGame = true; -- cgit v1.2.3 From 220d6ce82f478966db6a4760b2288750212880b9 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 8 May 2008 00:47:23 +0000 Subject: Restructured sound code svn-id: r31937 --- engines/gob/cdrom.cpp | 269 --------------------- engines/gob/cdrom.h | 64 ----- engines/gob/dataio.cpp | 1 - engines/gob/detection.cpp | 1 - engines/gob/draw.cpp | 1 - engines/gob/draw_v1.cpp | 5 +- engines/gob/draw_v2.cpp | 1 - engines/gob/driver_vga.cpp | 1 - engines/gob/game.cpp | 23 +- engines/gob/game.h | 10 - engines/gob/game_v1.cpp | 17 +- engines/gob/game_v2.cpp | 14 +- engines/gob/gob.cpp | 62 +++-- engines/gob/gob.h | 35 ++- engines/gob/goblin.cpp | 14 +- engines/gob/goblin.h | 2 +- engines/gob/goblin_v1.cpp | 13 +- engines/gob/goblin_v2.cpp | 1 - engines/gob/init.cpp | 16 +- engines/gob/init_v1.cpp | 1 - engines/gob/init_v2.cpp | 5 +- engines/gob/inter.cpp | 5 +- engines/gob/inter_bargon.cpp | 17 +- engines/gob/inter_v1.cpp | 78 +++--- engines/gob/inter_v2.cpp | 108 +++------ engines/gob/inter_v4.cpp | 15 +- engines/gob/map.cpp | 2 - engines/gob/map_v1.cpp | 7 +- engines/gob/map_v2.cpp | 1 - engines/gob/module.mk | 10 +- engines/gob/mult.cpp | 24 +- engines/gob/mult_v1.cpp | 1 - engines/gob/mult_v2.cpp | 1 - engines/gob/music.cpp | 483 ------------------------------------- engines/gob/music.h | 106 -------- engines/gob/parse.cpp | 1 - engines/gob/parse_v1.cpp | 1 - engines/gob/parse_v2.cpp | 1 - engines/gob/scenery.cpp | 1 - engines/gob/scenery_v1.cpp | 9 +- engines/gob/scenery_v2.cpp | 1 - engines/gob/sound.cpp | 374 ---------------------------- engines/gob/sound.h | 172 ------------- engines/gob/sound/adlib.cpp | 457 +++++++++++++++++++++++++++++++++++ engines/gob/sound/adlib.h | 108 +++++++++ engines/gob/sound/cdrom.cpp | 201 +++++++++++++++ engines/gob/sound/cdrom.h | 68 ++++++ engines/gob/sound/infogrames.cpp | 103 ++++++++ engines/gob/sound/infogrames.h | 60 +++++ engines/gob/sound/pcspeaker.cpp | 55 +++++ engines/gob/sound/pcspeaker.h | 52 ++++ engines/gob/sound/sound.cpp | 461 +++++++++++++++++++++++++++++++++++ engines/gob/sound/sound.h | 135 +++++++++++ engines/gob/sound/soundblaster.cpp | 260 ++++++++++++++++++++ engines/gob/sound/soundblaster.h | 116 +++++++++ engines/gob/sound/sounddesc.cpp | 116 +++++++++ engines/gob/sound/sounddesc.h | 85 +++++++ engines/gob/util.cpp | 5 +- engines/gob/video.cpp | 1 - engines/gob/video_v1.cpp | 1 - engines/gob/video_v2.cpp | 1 - 61 files changed, 2482 insertions(+), 1777 deletions(-) delete mode 100644 engines/gob/cdrom.cpp delete mode 100644 engines/gob/cdrom.h delete mode 100644 engines/gob/music.cpp delete mode 100644 engines/gob/music.h delete mode 100644 engines/gob/sound.cpp delete mode 100644 engines/gob/sound.h create mode 100644 engines/gob/sound/adlib.cpp create mode 100644 engines/gob/sound/adlib.h create mode 100644 engines/gob/sound/cdrom.cpp create mode 100644 engines/gob/sound/cdrom.h create mode 100644 engines/gob/sound/infogrames.cpp create mode 100644 engines/gob/sound/infogrames.h create mode 100644 engines/gob/sound/pcspeaker.cpp create mode 100644 engines/gob/sound/pcspeaker.h create mode 100644 engines/gob/sound/sound.cpp create mode 100644 engines/gob/sound/sound.h create mode 100644 engines/gob/sound/soundblaster.cpp create mode 100644 engines/gob/sound/soundblaster.h create mode 100644 engines/gob/sound/sounddesc.cpp create mode 100644 engines/gob/sound/sounddesc.h diff --git a/engines/gob/cdrom.cpp b/engines/gob/cdrom.cpp deleted file mode 100644 index c037d24bbe..0000000000 --- a/engines/gob/cdrom.cpp +++ /dev/null @@ -1,269 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - - -#include "common/endian.h" -#include "sound/audiocd.h" - -#include "gob/gob.h" -#include "gob/cdrom.h" -#include "gob/global.h" -#include "gob/util.h" -#include "gob/dataio.h" -#include "gob/game.h" - -namespace Gob { - -CDROM::CDROM(GobEngine *vm) : _vm(vm) { - _cdPlaying = false; - - _LICbuffer = 0; - for (int i = 0; i < 16; i++) - _curTrack[i] = 0; - _numTracks = 0; - _trackStop = 0; - _startTime = 0; -} - -void CDROM::readLIC(const char *fname) { - char tmp[80]; - int handle; - uint16 version, startChunk, pos; - - freeLICbuffer(); - - *_curTrack = 0; - - strncpy0(tmp, fname, 79); - - handle = _vm->_dataIO->openData(tmp); - - if (handle == -1) - return; - - _vm->_dataIO->closeData(handle); - - _vm->_dataIO->getUnpackedData(tmp); - - handle = _vm->_dataIO->openData(tmp); - DataStream *stream = _vm->_dataIO->openAsStream(handle, true); - - version = stream->readUint16LE(); - startChunk = stream->readUint16LE(); - _numTracks = stream->readUint16LE(); - - if (version != 3) - error("%s: Unknown version %d", fname, version); - - stream->seek(50); - - for (int i = 0; i < startChunk; i++) { - pos = stream->readUint16LE(); - - if (!pos) - break; - - stream->skip(pos); - } - - _LICbuffer = new byte[_numTracks * 22]; - stream->read(_LICbuffer, _numTracks * 22); - - delete stream; -} - -void CDROM::freeLICbuffer() { - delete[] _LICbuffer; - _LICbuffer = 0; -} - -void CDROM::playBgMusic() { - static const char *tracks[][2] = { - {"avt00.tot", "mine"}, - {"avt001.tot", "nuit"}, - {"avt002.tot", "campagne"}, - {"avt003.tot", "extsor1"}, - {"avt004.tot", "interieure"}, - {"avt005.tot", "zombie"}, - {"avt006.tot", "zombie"}, - {"avt007.tot", "campagne"}, - {"avt008.tot", "campagne"}, - {"avt009.tot", "extsor1"}, - {"avt010.tot", "extsor1"}, - {"avt011.tot", "interieure"}, - {"avt012.tot", "zombie"}, - {"avt014.tot", "nuit"}, - {"avt015.tot", "interieure"}, - {"avt016.tot", "statue"}, - {"avt017.tot", "zombie"}, - {"avt018.tot", "statue"}, - {"avt019.tot", "mine"}, - {"avt020.tot", "statue"}, - {"avt021.tot", "mine"}, - {"avt022.tot", "zombie"} - }; - - for (int i = 0; i < ARRAYSIZE(tracks); i++) - if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) { - startTrack(tracks[i][1]); - break; - } -} - -void CDROM::playMultMusic() { - static const char *tracks[][6] = { - {"avt005.tot", "fra1", "all1", "ang1", "esp1", "ita1"}, - {"avt006.tot", "fra2", "all2", "ang2", "esp2", "ita2"}, - {"avt012.tot", "fra3", "all3", "ang3", "esp3", "ita3"}, - {"avt016.tot", "fra4", "all4", "ang4", "esp4", "ita4"}, - {"avt019.tot", "fra5", "all5", "ang5", "esp5", "ita5"}, - {"avt022.tot", "fra6", "all6", "ang6", "esp6", "ita6"} - }; - - // Default to "ang?" for other languages (including EN_USA) - int language = _vm->_global->_language <= 4 ? _vm->_global->_language : 2; - for (int i = 0; i < ARRAYSIZE(tracks); i++) - if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) { - startTrack(tracks[i][language + 1]); - break; - } -} - -void CDROM::startTrack(const char *trackName) { - if (!_LICbuffer) - return; - - debugC(1, kDebugMusic, "CDROM::startTrack(%s)", trackName); - - byte *matchPtr = getTrackBuffer(trackName); - if (!matchPtr) { - warning("Track \"%s\" not found", trackName); - return; - } - - strncpy0(_curTrack, trackName, 15); - - stopPlaying(); - _curTrackBuffer = matchPtr; - - while (getTrackPos() >= 0); - - uint32 start = READ_LE_UINT32(matchPtr + 12); - uint32 end = READ_LE_UINT32(matchPtr + 16); - - play(start, end); - - _startTime = _vm->_util->getTimeKey(); - _trackStop = _startTime + (end - start + 1 + 150) * 40 / 3; -} - -void CDROM::play(uint32 from, uint32 to) { - // play from sector [from] to sector [to] - // - // format is HSG: - // HSG encodes frame information into a double word: - // minute multiplied by 4500, plus second multiplied by 75, - // plus frame, minus 150 - debugC(1, kDebugMusic, "CDROM::play(%d, %d)", from, to); - - AudioCD.play(1, 1, from, to - from + 1); - _cdPlaying = true; -} - -int32 CDROM::getTrackPos(const char *keyTrack) { - byte *keyBuffer = getTrackBuffer(keyTrack); - uint32 curPos = (_vm->_util->getTimeKey() - _startTime) * 3 / 40; - - if (_cdPlaying && (_vm->_util->getTimeKey() < _trackStop)) { - if (keyBuffer && _curTrackBuffer && (keyBuffer != _curTrackBuffer)) { - uint32 kStart = READ_LE_UINT32(keyBuffer + 12); - uint32 kEnd = READ_LE_UINT32(keyBuffer + 16); - uint32 cStart = READ_LE_UINT32(_curTrackBuffer + 12); - uint32 cEnd = READ_LE_UINT32(_curTrackBuffer + 16); - - if ((kStart >= cStart) && (kEnd <= cEnd)) { - if ((kStart - cStart) > curPos) - return -2; - if ((kEnd - cStart) < curPos) - return -1; - } - } - - return curPos; - } else - return -1; -} - -const char *CDROM::getCurTrack() { - return _curTrack; -} - -void CDROM::stopPlaying() { - stop(); - - while (getTrackPos() != -1); -} - -void CDROM::stop() { - debugC(1, kDebugMusic, "CDROM::stop()"); - - _curTrackBuffer = 0; - AudioCD.stop(); - _cdPlaying = false; -} - -void CDROM::testCD(int trySubst, const char *label) { - if (!trySubst) { - error("CDROM track substitution is not supported"); - return; - } - - _LICbuffer = 0; - _cdPlaying = false; - - // Original checked CD label here - // but will skip it as it will require OSystem extensions of direct - // CD secor reading -} - -byte *CDROM::getTrackBuffer(const char *trackName) { - if (!_LICbuffer || !trackName) - return 0; - - byte *matchPtr = 0; - byte *curPtr = _LICbuffer; - - for (int i = 0; i < _numTracks; i++) { - if (!scumm_stricmp((char *) curPtr, trackName)) { - matchPtr = curPtr; - break; - } - curPtr += 22; - } - - return matchPtr; -} - -} // End of namespace Gob diff --git a/engines/gob/cdrom.h b/engines/gob/cdrom.h deleted file mode 100644 index 25490de5dc..0000000000 --- a/engines/gob/cdrom.h +++ /dev/null @@ -1,64 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef GOB_CDROM_H -#define GOB_CDROM_H - -namespace Gob { - -class CDROM { -public: - bool _cdPlaying; - - void readLIC(const char *fname); - void freeLICbuffer(); - - void startTrack(const char *trackName); - void playBgMusic(); - void playMultMusic(); - void play(uint32 from, uint32 to); - int32 getTrackPos(const char *keyTrack = 0); - const char *getCurTrack(); - void stopPlaying(); - void stop(); - void testCD(int trySubst, const char *label); - - CDROM(GobEngine *vm); - -protected: - byte *_LICbuffer; - byte *_curTrackBuffer; - char _curTrack[16]; - uint16 _numTracks; - uint32 _trackStop; - uint32 _startTime; - GobEngine *_vm; - - byte *getTrackBuffer(const char *trackName); -}; - -} // End of namespace Gob - -#endif // GOB_CDROM_H diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp index 1fb43e96bb..dd5d30bd39 100644 --- a/engines/gob/dataio.cpp +++ b/engines/gob/dataio.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp index 7637605dcd..cbc9272e80 100644 --- a/engines/gob/detection.cpp +++ b/engines/gob/detection.cpp @@ -23,7 +23,6 @@ * */ - #include "base/plugins.h" #include "common/advancedDetector.h" diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index 2a4732954c..8a7de9bdaa 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" diff --git a/engines/gob/draw_v1.cpp b/engines/gob/draw_v1.cpp index 959a064b7d..9a78769d41 100644 --- a/engines/gob/draw_v1.cpp +++ b/engines/gob/draw_v1.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "graphics/cursorman.h" @@ -31,9 +30,9 @@ #include "gob/draw.h" #include "gob/global.h" #include "gob/util.h" -#include "gob/cdrom.h" #include "gob/game.h" #include "gob/scenery.h" +#include "gob/sound/sound.h" namespace Gob { @@ -170,7 +169,7 @@ void Draw_v1::printTotText(int16 id) { int16 spriteRight, spriteBottom; char buf[20]; - _vm->_cdrom->playMultMusic(); + _vm->_sound->cdPlayMultMusic(); if (!_vm->_game->_totTextData || !_vm->_game->_totTextData->dataPtr) return; diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 88d30b8e8a..8c429b1c1e 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "graphics/cursorman.h" diff --git a/engines/gob/driver_vga.cpp b/engines/gob/driver_vga.cpp index 08235f16e2..c4861ca146 100644 --- a/engines/gob/driver_vga.cpp +++ b/engines/gob/driver_vga.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "graphics/primitives.h" diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index 666f46fde1..9bdcae567d 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" @@ -35,7 +34,7 @@ #include "gob/parse.h" #include "gob/draw.h" #include "gob/mult.h" -#include "gob/music.h" +#include "gob/sound/sound.h" namespace Gob { @@ -60,9 +59,6 @@ Game::Game(GobEngine *vm) : _vm(vm) { _collStackElemSizes[i] = 0; } - _infIns = 0; - _infogrames = 0; - _curTotFile[0] = 0; _curExtFile[0] = 0; _totToLoad[0] = 0; @@ -105,10 +101,6 @@ Game::Game(GobEngine *vm) : _vm(vm) { } Game::~Game() { - delete _infIns; - - for (int i = 0; i < 60; i++) - _soundSamples[i].free(); } byte *Game::loadExtData(int16 itemId, int16 *pResWidth, @@ -295,16 +287,7 @@ void Game::freeSoundSlot(int16 slot) { if (slot == -1) slot = _vm->_parse->parseValExpr(); - if ((slot < 0) || (slot >= 60) || _soundSamples[slot].empty()) - return; - - SoundDesc &sample = _soundSamples[slot]; - - if (sample.getType() == SOUND_ADL) - if (_vm->_adlib && (_vm->_adlib->getIndex() == slot)) - _vm->_adlib->stopPlay(); - - _vm->_snd->freeSample(sample); + _vm->_sound->sampleFree(_vm->_sound->sampleGetBySlot(slot)); } void Game::evaluateScroll(int16 x, int16 y) { @@ -380,7 +363,7 @@ int16 Game::checkKeys(int16 *pMouseX, int16 *pMouseY, if ((_vm->_inter->_soundEndTimeKey != 0) && (_vm->_util->getTimeKey() >= _vm->_inter->_soundEndTimeKey)) { - _vm->_snd->stopSound(_vm->_inter->_soundStopVal); + _vm->_sound->blasterStop(_vm->_inter->_soundStopVal); _vm->_inter->_soundEndTimeKey = 0; } diff --git a/engines/gob/game.h b/engines/gob/game.h index 5cf5e1bea6..bca55cd4dc 100644 --- a/engines/gob/game.h +++ b/engines/gob/game.h @@ -26,10 +26,6 @@ #ifndef GOB_GAME_H #define GOB_GAME_H -#include "sound/mods/infogrames.h" - -#include "gob/sound.h" - namespace Gob { class Game { @@ -119,12 +115,6 @@ public: int16 _extHandle; - SoundDesc _soundSamples[60]; - - Audio::Infogrames::Instruments *_infIns; - Audio::Infogrames *_infogrames; - Audio::SoundHandle _infHandle; - char _totToLoad[20]; int32 _startTimeKey; diff --git a/engines/gob/game_v1.cpp b/engines/gob/game_v1.cpp index e9e37a027b..435decd9f2 100644 --- a/engines/gob/game_v1.cpp +++ b/engines/gob/game_v1.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "common/stream.h" @@ -32,15 +31,13 @@ #include "gob/global.h" #include "gob/util.h" #include "gob/dataio.h" -#include "gob/music.h" -#include "gob/cdrom.h" #include "gob/draw.h" #include "gob/inter.h" #include "gob/mult.h" #include "gob/video.h" #include "gob/parse.h" -#include "gob/sound.h" #include "gob/scenery.h" +#include "gob/sound/sound.h" namespace Gob { @@ -74,11 +71,11 @@ void Game_v1::playTot(int16 skipPlay) { _vm->_draw->_fontToSprite[i].height = -1; } - if (_vm->_platform == Common::kPlatformMacintosh) { - if (_vm->_adlib) - _vm->_adlib->stopPlay(); - } else - _vm->_cdrom->stopPlaying(); + if (_vm->getPlatform() == Common::kPlatformMacintosh) + _vm->_sound->adlibStop(); + else + _vm->_sound->cdStop(); + _vm->_draw->animateCursor(4); _vm->_inter->initControlVars(1); _vm->_mult->initAll(); @@ -229,7 +226,7 @@ void Game_v1::playTot(int16 skipPlay) { for (int i = 0; i < SPRITES_COUNT; i++) _vm->_draw->freeSprite(i); - _vm->_snd->stopSound(0); + _vm->_sound->blasterStop(0); for (int i = 0; i < 20; i++) freeSoundSlot(i); diff --git a/engines/gob/game_v2.cpp b/engines/gob/game_v2.cpp index 45542541e3..ff444f4a69 100644 --- a/engines/gob/game_v2.cpp +++ b/engines/gob/game_v2.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "common/stream.h" @@ -38,9 +37,9 @@ #include "gob/mult.h" #include "gob/parse.h" #include "gob/scenery.h" -#include "gob/sound.h" #include "gob/video.h" #include "gob/videoplayer.h" +#include "gob/sound/sound.h" namespace Gob { @@ -265,11 +264,14 @@ void Game_v2::playTot(int16 skipPlay) { if (skipPlay != -1) { _vm->_goblin->freeObjects(); - _vm->_snd->stopSound(0); + _vm->_sound->blasterStop(0); + + for (int i = 0; i < Sound::kSoundsCount; i++) { + SoundDesc *sound = _vm->_sound->sampleGetBySlot(i); - for (int i = 0; i < 60; i++) - if (_soundSamples[i].getType() == SOUND_SND) - _vm->_snd->freeSample(_soundSamples[i]); + if (sound && (sound->getType() == SOUND_SND)) + _vm->_sound->sampleFree(sound); + } } _vm->_vidPlayer->primaryClose(); diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 863665357b..951f331cbe 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "common/events.h" @@ -37,18 +36,16 @@ #include "gob/util.h" #include "gob/dataio.h" #include "gob/game.h" -#include "gob/sound.h" +#include "gob/sound/sound.h" #include "gob/init.h" #include "gob/inter.h" #include "gob/draw.h" -#include "gob/cdrom.h" #include "gob/goblin.h" #include "gob/map.h" #include "gob/mult.h" #include "gob/palanim.h" #include "gob/parse.h" #include "gob/scenery.h" -#include "gob/music.h" #include "gob/videoplayer.h" #include "gob/saveload.h" @@ -71,13 +68,12 @@ const Common::Language GobEngine::_gobToScummVMLang[] = { GobEngine::GobEngine(OSystem *syst) : Engine(syst) { _vm = this; - _snd = 0; _adlib = 0; _mult = 0; - _game = 0; _global = 0; _cdrom = 0; - _dataIO = 0; _goblin = 0; _vidPlayer = 0; - _init = 0; _inter = 0; _map = 0; - _palAnim = 0; _parse = 0; _scenery = 0; - _draw = 0; _util = 0; _video = 0; - _saveLoad = 0; + _sound = 0; _mult = 0; _game = 0; + _global = 0; _dataIO = 0; _goblin = 0; + _vidPlayer = 0; _init = 0; _inter = 0; + _map = 0; _palAnim = 0; _parse = 0; + _scenery = 0; _draw = 0; _util = 0; + _video = 0; _saveLoad = 0; // Setup mixer _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); @@ -118,6 +114,12 @@ void GobEngine::shutdown() { _quitRequested = true; } +const char *GobEngine::getLangDesc(int16 language) const { + if ((language < 0) || (language > 8)) + language = 2; + return Common::getLanguageDescription(_gobToScummVMLang[language]); +} + void GobEngine::validateLanguage() { if (_vm->_global->_languageWanted != _vm->_global->_language) { warning("Your game version doesn't support the requested language %s", @@ -140,6 +142,30 @@ void GobEngine::validateVideoMode(int16 videoMode) { error("Video mode 0x%X is not supported!", videoMode); } +Common::Platform GobEngine::getPlatform() const { + return _platform; +} + +GameType GobEngine::getGameType() const { + return _gameType; +} + +bool GobEngine::isCD() const { + return (_features & kFeaturesCD) != 0; +} + +bool GobEngine::isEGA() const { + return (_features & kFeaturesEGA) != 0; +} + +bool GobEngine::is640() const { + return (_features & kFeatures640) != 0; +} + +bool GobEngine::hasAdlib() const { + return (_features & kFeaturesAdlib) != 0; +} + int GobEngine::init() { if (!initGameParts()) { GUIErrorMessage("GobEngine::init(): Unknown version of game engine"); @@ -220,7 +246,8 @@ int GobEngine::init() { } bool GobEngine::initGameParts() { - _adlib = 0; + _noMusic = MidiDriver::parseMusicDriver(ConfMan.get("music_driver")) == MD_NULL; + _saveLoad = 0; _global = new Global(this); @@ -228,8 +255,7 @@ bool GobEngine::initGameParts() { _dataIO = new DataIO(this); _palAnim = new PalAnim(this); _vidPlayer = new VideoPlayer(this); - _cdrom = new CDROM(this); - _snd = new Snd(this); + _sound = new Sound(this); switch (_gameType) { case kGameTypeGob1: @@ -336,10 +362,6 @@ bool GobEngine::initGameParts() { break; } - _noMusic = MidiDriver::parseMusicDriver(ConfMan.get("music_driver")) == MD_NULL; - if (!_noMusic && hasAdlib()) - _adlib = new Adlib(this); - if (is640()) { _video->_surfWidth = _width = 640; _video->_surfHeight = _video->_splitHeight1 = _height = 480; @@ -360,12 +382,9 @@ bool GobEngine::initGameParts() { } void GobEngine::deinitGameParts() { - delete _snd; _snd = 0; - delete _adlib; _adlib = 0; delete _mult; _mult = 0; delete _game; _game = 0; delete _global; _global = 0; - delete _cdrom; _cdrom = 0; delete _dataIO; _dataIO = 0; delete _goblin; _goblin = 0; delete _vidPlayer; _vidPlayer = 0; @@ -379,6 +398,7 @@ void GobEngine::deinitGameParts() { delete _util; _util = 0; delete _video; _video = 0; delete _saveLoad; _saveLoad = 0; + delete _sound; _sound = 0; } } // End of namespace Gob diff --git a/engines/gob/gob.h b/engines/gob/gob.h index e23e917a7c..e1d75bd2a4 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -35,11 +35,10 @@ namespace Gob { class Game; -class Snd; +class Sound; class Video; class Global; class Draw; -class CDROM; class DataIO; class Goblin; class VideoPlayer; @@ -52,7 +51,6 @@ class Parse; class Scenery; class Util; class SaveLoad; -class Adlib; #define VARP(offs) (_vm->_global->_inter_variables + (offs)) #define WRITE_VARO_UINT32(offs, val) _vm->_global->writeVar(offs, (uint32) (val)) @@ -171,9 +169,13 @@ private: struct GOBGameDescription; class GobEngine : public Engine { -protected: +private: GobEngine *_vm; + GameType _gameType; + int32 _features; + Common::Platform _platform; + int go(); int init(); @@ -185,11 +187,7 @@ public: Common::RandomSource _rnd; - GameType _gameType; - int32 _features; Common::Language _language; - Common::Platform _platform; - uint16 _width; uint16 _height; uint8 _mode; @@ -204,10 +202,9 @@ public: Util *_util; DataIO *_dataIO; Game *_game; - Snd *_snd; + Sound *_sound; Video *_video; Draw *_draw; - CDROM *_cdrom; Goblin *_goblin; Init *_init; Map *_map; @@ -217,24 +214,20 @@ public: Scenery *_scenery; Inter *_inter; SaveLoad *_saveLoad; - Adlib *_adlib; VideoPlayer *_vidPlayer; void shutdown(); - const char *getLangDesc(int16 language) { - if ((language < 0) || (language > 8)) - language = 2; - return Common::getLanguageDescription(_gobToScummVMLang[language]); - } + const char *getLangDesc(int16 language) const; void validateLanguage(); void validateVideoMode(int16 videoMode); - GameType getGameType() { return _gameType; } - bool isCD() { return (_features & kFeaturesCD) != 0; } - bool isEGA() { return (_features & kFeaturesEGA) != 0; } - bool is640() { return (_features & kFeatures640) != 0; } - bool hasAdlib() { return (_features & kFeaturesAdlib) != 0; } + Common::Platform getPlatform() const; + GameType getGameType() const; + bool isCD() const; + bool isEGA() const; + bool is640() const; + bool hasAdlib() const; GobEngine(OSystem *syst); virtual ~GobEngine(); diff --git a/engines/gob/goblin.cpp b/engines/gob/goblin.cpp index f97bd14fed..d3857e2066 100644 --- a/engines/gob/goblin.cpp +++ b/engines/gob/goblin.cpp @@ -32,7 +32,7 @@ #include "gob/map.h" #include "gob/mult.h" #include "gob/scenery.h" -#include "gob/sound.h" +#include "gob/sound/sound.h" namespace Gob { @@ -255,8 +255,8 @@ void Goblin::sortByOrder(Util::List *list) { void Goblin::playSound(SoundDesc &snd, int16 repCount, int16 freq) { if (!snd.empty()) { - _vm->_snd->stopSound(0); - _vm->_snd->playSample(snd, repCount, freq); + _vm->_sound->blasterStop(0); + _vm->_sound->blasterPlay(&snd, repCount, freq); } } @@ -1216,7 +1216,7 @@ void Goblin::zeroObjects(void) { _objects[i] = 0; for (int i = 0; i < 16; i++) - _vm->_snd->freeSample(_soundData[i]); + _vm->_sound->sampleFree(&_soundData[i]); } void Goblin::freeAllObjects(void) { @@ -1717,12 +1717,12 @@ void Goblin::playSounds(Mult::Mult_Object *obj) { if (!speaker) { sndSlot = obj->goblinStates[animData->state][i].sndItem; - _vm->_snd->stopSound(0); + _vm->_sound->blasterStop(0); if (sndSlot < _soundSlotsCount) - _vm->_snd->playSample(_vm->_game->_soundSamples[_soundSlots[sndSlot] & 0x7FFF], + _vm->_sound->blasterPlay(_vm->_sound->sampleGetBySlot(_soundSlots[sndSlot] & 0x7FFF), repCount, frequency); } else - _vm->_snd->speakerOn(frequency, repCount * 10); + _vm->_sound->speakerOn(frequency, repCount * 10); } } diff --git a/engines/gob/goblin.h b/engines/gob/goblin.h index f7ac4aa549..3fd8a9f93b 100644 --- a/engines/gob/goblin.h +++ b/engines/gob/goblin.h @@ -27,8 +27,8 @@ #define GOB_GOBLIN_H #include "gob/util.h" -#include "gob/sound.h" #include "gob/mult.h" +#include "gob/sound/sounddesc.h" namespace Gob { diff --git a/engines/gob/goblin_v1.cpp b/engines/gob/goblin_v1.cpp index f7bdbf10a5..6ac086767b 100644 --- a/engines/gob/goblin_v1.cpp +++ b/engines/gob/goblin_v1.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" @@ -32,7 +31,7 @@ #include "gob/map.h" #include "gob/mult.h" #include "gob/scenery.h" -#include "gob/sound.h" +#include "gob/sound/sound.h" namespace Gob { @@ -48,7 +47,7 @@ void Goblin_v1::freeObjects(void) { int16 col; for (int i = 0; i < 16; i++) - _vm->_snd->freeSample(_soundData[i]); + _vm->_sound->sampleFree(&_soundData[i]); for (int i = 0; i < 4; i++) { if (_goblins[i] == 0) @@ -488,19 +487,19 @@ void Goblin_v1::moveAdvance(Mult::Mult_Object *obj, Gob_Object *gobDesc, if ((gobDesc->state >= 0) && (gobDesc->state < 10) && (gobDesc->stateMach == gobDesc->realStateMach) && ((gobDesc->curFrame == 3) || (gobDesc->curFrame == 6))) { - _vm->_snd->speakerOn(10 * _vm->_util->getRandom(3) + 50, 5); + _vm->_sound->speakerOn(10 * _vm->_util->getRandom(3) + 50, 5); } if ((_currentGoblin == 0) && (gobDesc->stateMach == gobDesc->realStateMach) && ((gobDesc->state == 10) || (gobDesc->state == 11)) && (gobDesc->curFrame == 9)) { - _vm->_snd->stopSound(0); + _vm->_sound->blasterStop(0); if (_itemIndInPocket != -1) - _vm->_snd->playSample(_soundData[14], 1, 9000); + _vm->_sound->blasterPlay(&_soundData[14], 1, 9000); else - _vm->_snd->playSample(_soundData[14], 1, 5000); + _vm->_sound->blasterPlay(&_soundData[14], 1, 5000); } if (_boreCounter++ == 120) { diff --git a/engines/gob/goblin_v2.cpp b/engines/gob/goblin_v2.cpp index c9e155ad08..93c4c74ecc 100644 --- a/engines/gob/goblin_v2.cpp +++ b/engines/gob/goblin_v2.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" diff --git a/engines/gob/init.cpp b/engines/gob/init.cpp index 4d184c53d3..b1e31b34c2 100644 --- a/engines/gob/init.cpp +++ b/engines/gob/init.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" @@ -31,13 +30,12 @@ #include "gob/global.h" #include "gob/util.h" #include "gob/dataio.h" -#include "gob/cdrom.h" #include "gob/draw.h" #include "gob/game.h" #include "gob/palanim.h" -#include "gob/sound.h" #include "gob/video.h" #include "gob/videoplayer.h" +#include "gob/sound/sound.h" namespace Gob { @@ -51,8 +49,8 @@ void Init::cleanup(void) { _vm->_video->freeDriver(); _vm->_global->_primarySurfDesc = 0; - _vm->_snd->speakerOff(); - _vm->_snd->stopSound(0); + _vm->_sound->speakerOff(); + _vm->_sound->blasterStop(0); _vm->_dataIO->closeDataFile(); } @@ -169,8 +167,8 @@ void Init::initGame(const char *totName) { strcpy(_vm->_game->_curTotFile, buffer); - _vm->_cdrom->testCD(1, "GOB"); - _vm->_cdrom->readLIC("gob.lic"); + _vm->_sound->cdTest(1, "GOB"); + _vm->_sound->cdLoadLIC("gob.lic"); // Search for a Coktel logo animation or image to display imdHandle = _vm->_dataIO->openData("coktel.imd"); @@ -213,8 +211,8 @@ void Init::initGame(const char *totName) { _vm->_game->start(); - _vm->_cdrom->stopPlaying(); - _vm->_cdrom->freeLICbuffer(); + _vm->_sound->cdStop(); + _vm->_sound->cdUnloadLIC(); delete[] _vm->_global->_inter_variables; delete[] _vm->_global->_inter_variablesSizes; diff --git a/engines/gob/init_v1.cpp b/engines/gob/init_v1.cpp index 8065c4dc8c..90456f927c 100644 --- a/engines/gob/init_v1.cpp +++ b/engines/gob/init_v1.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" diff --git a/engines/gob/init_v2.cpp b/engines/gob/init_v2.cpp index bb29f4e8fd..b468c15c25 100644 --- a/engines/gob/init_v2.cpp +++ b/engines/gob/init_v2.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" @@ -50,8 +49,8 @@ void Init_v2::initVideo() { _vm->_global->_inVM = 0; _vm->_global->_colorCount = 16; - if (((_vm->_platform == Common::kPlatformPC) || - (_vm->_platform == Common::kPlatformMacintosh)) && + if (((_vm->getPlatform() == Common::kPlatformPC) || + (_vm->getPlatform() == Common::kPlatformMacintosh)) && ((_vm->_global->_videoMode == 0x13) || (_vm->_global->_videoMode == 0x14))) _vm->_global->_colorCount = 256; diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp index de3ac4b1f5..dd3fdf3684 100644 --- a/engines/gob/inter.cpp +++ b/engines/gob/inter.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" @@ -34,7 +33,7 @@ #include "gob/game.h" #include "gob/parse.h" #include "gob/scenery.h" -#include "gob/sound.h" +#include "gob/sound/sound.h" #include // FIXME: for Inter::renewTimeInVars() @@ -154,7 +153,7 @@ void Inter::storeKey(int16 key) { WRITE_VAR(12, _vm->_util->getTimeKey() - _vm->_game->_startTimeKey); storeMouse(); - WRITE_VAR(1, _vm->_snd->_playingSound); + WRITE_VAR(1, _vm->_sound->blasterPlayingSound()); if (key == 0x4800) key = 0x0B; diff --git a/engines/gob/inter_bargon.cpp b/engines/gob/inter_bargon.cpp index 702950d539..d493fb00d3 100644 --- a/engines/gob/inter_bargon.cpp +++ b/engines/gob/inter_bargon.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" @@ -34,9 +33,9 @@ #include "gob/draw.h" #include "gob/game.h" #include "gob/palanim.h" -#include "gob/sound.h" #include "gob/video.h" #include "gob/videoplayer.h" +#include "gob/sound/sound.h" namespace Gob { @@ -768,9 +767,9 @@ void Inter_Bargon::oBargon_intro2(OpGobParams ¶ms) { return; for (i = 0; i < 4; i++) - _vm->_snd->loadSample(samples[i], sndFiles[i]); - _vm->_snd->playComposition(comp, 0, samples, 4); - _vm->_snd->waitEndPlay(true, false); + _vm->_sound->sampleLoad(&samples[i], sndFiles[i]); + _vm->_sound->blasterPlayComposition(comp, 0, samples, 4); + _vm->_sound->blasterWaitEndPlay(true, false); _vm->_palAnim->fade(0, 0, 0); _vm->_video->clearSurf(_vm->_draw->_frontSurface); } @@ -787,12 +786,12 @@ void Inter_Bargon::oBargon_intro3(OpGobParams ¶ms) { static const char *palFiles[] = {"2ou2.clt", "2ou3.clt", "2ou4.clt", "2ou5.clt"}; for (int i = 0; i < 2; i++) - _vm->_snd->loadSample(samples[i], sndFiles[i]); + _vm->_sound->sampleLoad(&samples[i], sndFiles[i]); for (int i = 0; i < 4; i++) palettes[i] = _vm->_dataIO->getData(palFiles[i]); palBak = _vm->_global->_pPaletteDesc->vgaPal; - _vm->_snd->playComposition(comp, 0, samples, 2); + _vm->_sound->blasterPlayComposition(comp, 0, samples, 2); for (int i = 0; i < 20; i++) { for (int j = 0; j < 4; j++) { _vm->_global->_pPaletteDesc->vgaPal = (Video::Color *) palettes[j]; @@ -801,7 +800,7 @@ void Inter_Bargon::oBargon_intro3(OpGobParams ¶ms) { } if ((_vm->_game->checkKeys(&mouseX, &mouseY, &buttons, 0) == 0x11B) || _vm->_quitRequested) { - _vm->_snd->stopSound(10); + _vm->_sound->blasterStop(10); _vm->_palAnim->fade(0, -2, 0); _vm->_video->clearSurf(_vm->_draw->_frontSurface); memset((char *) _vm->_draw->_vgaPalette, 0, 768); @@ -811,7 +810,7 @@ void Inter_Bargon::oBargon_intro3(OpGobParams ¶ms) { break; } } - _vm->_snd->waitEndPlay(false, false); + _vm->_sound->blasterWaitEndPlay(false, false); _vm->_global->_pPaletteDesc->vgaPal = palBak; for (int i = 0; i < 4; i++) diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index 9707a628b4..a809a44b40 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "common/file.h" @@ -32,8 +31,6 @@ #include "gob/global.h" #include "gob/util.h" #include "gob/dataio.h" -#include "gob/music.h" -#include "gob/cdrom.h" #include "gob/draw.h" #include "gob/game.h" #include "gob/goblin.h" @@ -43,8 +40,8 @@ #include "gob/palanim.h" #include "gob/parse.h" #include "gob/scenery.h" -#include "gob/sound.h" #include "gob/video.h" +#include "gob/sound/sound.h" namespace Gob { @@ -1071,12 +1068,8 @@ void Inter_v1::o1_loadCurLayer() { void Inter_v1::o1_playCDTrack() { evalExpr(0); - if (_vm->_platform == Common::kPlatformMacintosh) { - if (_vm->_adlib) - _vm->_adlib->playTrack(_vm->_global->_inter_resStr); - } else - // Used in gob1 CD - _vm->_cdrom->startTrack(_vm->_global->_inter_resStr); + _vm->_sound->adlibPlayBgMusic(); // Mac version + _vm->_sound->cdPlay(_vm->_global->_inter_resStr); // PC CD version } void Inter_v1::o1_getCDTrackPos() { @@ -1088,19 +1081,15 @@ void Inter_v1::o1_getCDTrackPos() { _vm->_util->longDelay(1); - int pos = _vm->_cdrom->getTrackPos(); + int pos = _vm->_sound->cdGetTrackPos(); if (pos == -1) pos = 32767; WRITE_VAR(5, pos); } void Inter_v1::o1_stopCD() { - if (_vm->_platform == Common::kPlatformMacintosh) { - if (_vm->_adlib) - _vm->_adlib->stopPlay(); - } else - // Used in gob1 CD - _vm->_cdrom->stopPlaying(); + _vm->_sound->adlibStop(); // Mac version + _vm->_sound->cdStop(); // PC CD version } void Inter_v1::o1_loadFontToSprite() { @@ -1685,7 +1674,7 @@ bool Inter_v1::o1_keyFunc(OpFuncParams ¶ms) { break; default: - _vm->_snd->speakerOnUpdate(cmd); + _vm->_sound->speakerOnUpdate(cmd); if (cmd < 20) { _vm->_util->delay(cmd); _noBusyWait = true; @@ -1759,12 +1748,12 @@ bool Inter_v1::o1_renewTimeInVars(OpFuncParams ¶ms) { } bool Inter_v1::o1_speakerOn(OpFuncParams ¶ms) { - _vm->_snd->speakerOn(_vm->_parse->parseValExpr(), -1); + _vm->_sound->speakerOn(_vm->_parse->parseValExpr(), -1); return false; } bool Inter_v1::o1_speakerOff(OpFuncParams ¶ms) { - _vm->_snd->speakerOff(); + _vm->_sound->speakerOff(); return false; } @@ -1978,10 +1967,10 @@ bool Inter_v1::o1_playSound(OpFuncParams ¶ms) { repCount = _vm->_parse->parseValExpr(); frequency = _vm->_parse->parseValExpr(); - SoundDesc &sample = _vm->_game->_soundSamples[index]; + SoundDesc *sample = _vm->_sound->sampleGetBySlot(index); _soundEndTimeKey = 0; - if (sample.empty()) + if (!sample || sample->empty()) return false; if (repCount < 0) { @@ -1991,31 +1980,28 @@ bool Inter_v1::o1_playSound(OpFuncParams ¶ms) { repCount = -repCount; _soundEndTimeKey = _vm->_util->getTimeKey(); - freq2 = frequency ? frequency : sample._frequency; + freq2 = frequency ? frequency : sample->_frequency; endRep = MAX(repCount - 1, 1); - _soundStopVal = sample.calcFadeOutLength(freq2); - _soundEndTimeKey += sample.calcLength(endRep, freq2, true); + _soundStopVal = sample->calcFadeOutLength(freq2); + _soundEndTimeKey += sample->calcLength(endRep, freq2, true); } - if (sample.getType() == SOUND_ADL) { - if (_vm->_adlib) { - _vm->_adlib->load(sample.getData(), sample.size(), index); - _vm->_adlib->setRepeating(repCount - 1); - _vm->_adlib->startPlay(); - } + if (sample->getType() == SOUND_ADL) { + _vm->_sound->adlibLoad(sample->getData(), sample->size(), index); + _vm->_sound->adlibSetRepeating(repCount - 1); + _vm->_sound->adlibPlay(); } else { - _vm->_snd->stopSound(0); - _vm->_snd->playSample(sample, repCount - 1, frequency); + _vm->_sound->blasterStop(0); + _vm->_sound->blasterPlay(sample, repCount - 1, frequency); } return false; } bool Inter_v1::o1_stopSound(OpFuncParams ¶ms) { - if (_vm->_adlib) - _vm->_adlib->stopPlay(); - _vm->_snd->stopSound(_vm->_parse->parseValExpr()); + _vm->_sound->adlibStop(); + _vm->_sound->blasterStop(_vm->_parse->parseValExpr()); _soundEndTimeKey = 0; return false; @@ -2032,7 +2018,7 @@ bool Inter_v1::o1_freeSoundSlot(OpFuncParams ¶ms) { } bool Inter_v1::o1_waitEndPlay(OpFuncParams ¶ms) { - _vm->_snd->waitEndPlay(); + _vm->_sound->blasterWaitEndPlay(); return false; } @@ -2046,7 +2032,7 @@ bool Inter_v1::o1_playComposition(OpFuncParams ¶ms) { for (int i = 0; i < 50; i++) composition[i] = (int16) VAR_OFFSET(dataVar + i * 4); - _vm->_snd->playComposition(composition, freqVal); + _vm->_sound->blasterPlayComposition(composition, freqVal); return false; } @@ -2803,11 +2789,9 @@ void Inter_v1::o1_animateObjects(OpGobParams ¶ms) { void Inter_v1::o1_drawObjects(OpGobParams ¶ms) { _vm->_goblin->drawObjects(); - if (_vm->_platform == Common::kPlatformMacintosh) { - if (_vm->_adlib) - _vm->_adlib->playBgMusic(); - } else if (_vm->_cdrom->getTrackPos() == -1) - _vm->_cdrom->playBgMusic(); + _vm->_sound->adlibPlayBgMusic(); // Mac version + if (_vm->_sound->cdGetTrackPos() == -1) + _vm->_sound->cdPlayBgMusic(); // PC CD version } void Inter_v1::o1_loadMap(OpGobParams ¶ms) { @@ -2993,9 +2977,11 @@ int16 Inter_v1::loadSound(int16 slot) { dataSize = (uint32) ((int32) totSize); } - if (dataPtr) - _vm->_game->_soundSamples[slot].load(SOUND_SND, source, - dataPtr, dataSize); + if (dataPtr) { + SoundDesc *sample = _vm->_sound->sampleGetBySlot(slot); + if (sample) + sample->load(SOUND_SND, source, dataPtr, dataSize); + } return 0; } diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 2442e4dcf2..36f33e6553 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "sound/mixer.h" #include "sound/mods/infogrames.h" @@ -33,8 +32,6 @@ #include "gob/global.h" #include "gob/util.h" #include "gob/dataio.h" -#include "gob/music.h" -#include "gob/cdrom.h" #include "gob/draw.h" #include "gob/game.h" #include "gob/goblin.h" @@ -42,10 +39,10 @@ #include "gob/mult.h" #include "gob/parse.h" #include "gob/scenery.h" -#include "gob/sound.h" #include "gob/video.h" #include "gob/saveload.h" #include "gob/videoplayer.h" +#include "gob/sound/sound.h" namespace Gob { @@ -1086,16 +1083,16 @@ void Inter_v2::o2_playCDTrack() { _vm->_draw->blitInvalidated(); evalExpr(0); - _vm->_cdrom->startTrack(_vm->_global->_inter_resStr); + _vm->_sound->cdPlay(_vm->_global->_inter_resStr); } void Inter_v2::o2_waitCDTrackEnd() { - while (_vm->_cdrom->getTrackPos() >= 0) + while (_vm->_sound->cdGetTrackPos() >= 0) _vm->_util->longDelay(1); } void Inter_v2::o2_stopCD() { - _vm->_cdrom->stopPlaying(); + _vm->_sound->cdStop(); } void Inter_v2::o2_readLIC() { @@ -1105,11 +1102,11 @@ void Inter_v2::o2_readLIC() { strncpy0(path, _vm->_global->_inter_resStr, 35); strcat(path, ".LIC"); - _vm->_cdrom->readLIC(path); + _vm->_sound->cdLoadLIC(path); } void Inter_v2::o2_freeLIC() { - _vm->_cdrom->freeLICbuffer(); + _vm->_sound->cdUnloadLIC(); } void Inter_v2::o2_getCDTrackPos() { @@ -1121,8 +1118,8 @@ void Inter_v2::o2_getCDTrackPos() { varPos = _vm->_parse->parseVarIndex(); varName = _vm->_parse->parseVarIndex(); - WRITE_VAR_OFFSET(varPos, _vm->_cdrom->getTrackPos(GET_VARO_STR(varName))); - WRITE_VARO_STR(varName, _vm->_cdrom->getCurTrack()); + WRITE_VAR_OFFSET(varPos, _vm->_sound->cdGetTrackPos(GET_VARO_STR(varName))); + WRITE_VARO_STR(varName, _vm->_sound->cdGetCurrentTrack()); } void Inter_v2::o2_loadFontToSprite() { @@ -1883,10 +1880,9 @@ bool Inter_v2::o2_stopSound(OpFuncParams ¶ms) { expr = _vm->_parse->parseValExpr(); if (expr < 0) { - if (_vm->_adlib) - _vm->_adlib->stopPlay(); + _vm->_sound->adlibStop(); } else - _vm->_snd->stopSound(expr); + _vm->_sound->blasterStop(expr); _soundEndTimeKey = 0; return false; @@ -2009,7 +2005,7 @@ bool Inter_v2::o2_readData(OpFuncParams ¶ms) { WRITE_VAR(59, stream->readUint32LE()); // The scripts in some versions divide through 256^3 then, // effectively doing a LE->BE conversion - if ((_vm->_platform != Common::kPlatformPC) && (VAR(59) < 256)) + if ((_vm->getPlatform() != Common::kPlatformPC) && (VAR(59) < 256)) WRITE_VAR(59, SWAP_BYTES_32(VAR(59))); } else retSize = stream->read(buf, size); @@ -2054,29 +2050,11 @@ void Inter_v2::o2_loadInfogramesIns(OpGobParams ¶ms) { varName = load16(); - if (_vm->_noMusic) - return; - strncpy0(fileName, GET_VAR_STR(varName), 15); strcat(fileName, ".INS"); - debugC(1, kDebugMusic, "Loading Infogrames instrument file \"%s\"", - fileName); - - if (_vm->_game->_infogrames) { - _vm->_mixer->stopHandle(_vm->_game->_infHandle); - delete _vm->_game->_infogrames; - _vm->_game->_infogrames = 0; - } + debugC(1, kDebugMusic, "Loading Infogrames instrument file \"%s\"", fileName); - if (_vm->_game->_infIns) - delete _vm->_game->_infIns; - - _vm->_game->_infIns = new Audio::Infogrames::Instruments; - if (!_vm->_game->_infIns->load(fileName)) { - warning("Couldn't load instruments file"); - delete _vm->_game->_infIns; - _vm->_game->_infIns = 0; - } + _vm->_sound->infogramesLoadInstruments(fileName); } void Inter_v2::o2_playInfogrames(OpGobParams ¶ms) { @@ -2085,58 +2063,24 @@ void Inter_v2::o2_playInfogrames(OpGobParams ¶ms) { varName = load16(); - if (_vm->_noMusic) - return; - strncpy0(fileName, GET_VAR_STR(varName), 15); strcat(fileName, ".DUM"); debugC(1, kDebugMusic, "Playing Infogrames music file \"%s\"", fileName); - if (!_vm->_game->_infIns) { - _vm->_game->_infIns = new Audio::Infogrames::Instruments; - - if (!_vm->_game->_infIns->load("i1.ins")) { - warning("Couldn't load instruments file"); - delete _vm->_game->_infIns; - _vm->_game->_infIns = 0; - } - } - - if (_vm->_game->_infIns) { - _vm->_mixer->stopHandle(_vm->_game->_infHandle); - delete _vm->_game->_infogrames; - _vm->_game->_infogrames = - new Audio::Infogrames(*_vm->_game->_infIns, true, - _vm->_mixer->getOutputRate(), - _vm->_mixer->getOutputRate() / 75); - - if (!_vm->_game->_infogrames->load(fileName)) { - warning("Couldn't load infogrames music"); - delete _vm->_game->_infogrames; - _vm->_game->_infogrames = 0; - } else - _vm->_mixer->playInputStream(Audio::Mixer::kMusicSoundType, - &_vm->_game->_infHandle, _vm->_game->_infogrames, - -1, 255, 0, false); - } + _vm->_sound->infogramesLoadSong(fileName); + _vm->_sound->infogramesPlay(); } void Inter_v2::o2_startInfogrames(OpGobParams ¶ms) { load16(); - if (_vm->_game->_infogrames && - !_vm->_mixer->isSoundHandleActive(_vm->_game->_infHandle)) { - _vm->_game->_infogrames->restart(); - _vm->_mixer->playInputStream(Audio::Mixer::kMusicSoundType, - &_vm->_game->_infHandle, _vm->_game->_infogrames, - -1, 255, 0, false); - } + _vm->_sound->infogramesPlay(); } void Inter_v2::o2_stopInfogrames(OpGobParams ¶ms) { load16(); - _vm->_mixer->stopHandle(_vm->_game->_infHandle); + _vm->_sound->infogramesStop(); } void Inter_v2::o2_handleGoblins(OpGobParams ¶ms) { @@ -2172,15 +2116,15 @@ int16 Inter_v2::loadSound(int16 search) { } else { id = load16(); - for (slot = 0; slot < 60; slot++) - if (_vm->_game->_soundSamples[slot].isId(id)) { + for (slot = 0; slot < Sound::kSoundsCount; slot++) + if (_vm->_sound->sampleGetBySlot(slot)->isId(id)) { slotIdMask = 0x8000; break; } - if (slot == 60) { - for (slot = 59; slot >= 0; slot--) { - if (_vm->_game->_soundSamples[slot].empty()) + if (slot == Sound::kSoundsCount) { + for (slot = (Sound::kSoundsCount - 1); slot >= 0; slot--) { + if (_vm->_sound->sampleGetBySlot(slot)->empty()) break; } @@ -2192,7 +2136,9 @@ int16 Inter_v2::loadSound(int16 search) { } } - _vm->_game->freeSoundSlot(slot); + SoundDesc *sample = _vm->_sound->sampleGetBySlot(slot); + + _vm->_sound->sampleFree(sample, true, slot); if (id == -1) { char sndfile[14]; @@ -2224,8 +2170,8 @@ int16 Inter_v2::loadSound(int16 search) { } if (dataPtr) { - _vm->_game->_soundSamples[slot].load(type, source, dataPtr, dataSize); - _vm->_game->_soundSamples[slot]._id = id; + sample->load(type, source, dataPtr, dataSize); + sample->_id = id; } return slot | slotIdMask; diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp index b24e54ffbd..6ed05af690 100644 --- a/engines/gob/inter_v4.cpp +++ b/engines/gob/inter_v4.cpp @@ -640,8 +640,9 @@ void Inter_v4::setupOpcodes() { } void Inter_v4::executeDrawOpcode(byte i) { - debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%X] (%s)", - i, i, getOpcodeDrawDesc(i)); + debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%X] (%s) - %s, %ld", + i, i, getOpcodeDrawDesc(i), + _vm->_game->_curTotFile, _vm->_global->_inter_execPtr - _vm->_game->_totFileData); OpcodeDrawProcV4 op = _opcodesDrawV4[i].proc; @@ -652,8 +653,9 @@ void Inter_v4::executeDrawOpcode(byte i) { } bool Inter_v4::executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms) { - debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%X.0x%X] (%s)", - i, j, i, j, getOpcodeFuncDesc(i, j)); + debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%X.0x%X] (%s) - %s, %ld", + i, j, i, j, getOpcodeFuncDesc(i, j), + _vm->_game->_curTotFile, _vm->_global->_inter_execPtr - _vm->_game->_totFileData); if ((i > 4) || (j > 15)) { warning("unimplemented opcodeFunc: %d.%d", i, j); @@ -671,8 +673,9 @@ bool Inter_v4::executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms) { } void Inter_v4::executeGoblinOpcode(int i, OpGobParams ¶ms) { - debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%X] (%s)", - i, i, getOpcodeGoblinDesc(i)); + debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%X] (%s) - %s, %ld", + i, i, getOpcodeGoblinDesc(i), + _vm->_game->_curTotFile, _vm->_global->_inter_execPtr - _vm->_game->_totFileData); OpcodeGoblinProcV4 op = NULL; diff --git a/engines/gob/map.cpp b/engines/gob/map.cpp index cd8f9e3758..75867aaa6c 100644 --- a/engines/gob/map.cpp +++ b/engines/gob/map.cpp @@ -23,8 +23,6 @@ * */ - - #include "gob/gob.h" #include "gob/map.h" #include "gob/goblin.h" diff --git a/engines/gob/map_v1.cpp b/engines/gob/map_v1.cpp index c4b68fad85..4ac99d2465 100644 --- a/engines/gob/map_v1.cpp +++ b/engines/gob/map_v1.cpp @@ -23,15 +23,14 @@ * */ - #include "common/stream.h" #include "gob/gob.h" #include "gob/map.h" #include "gob/dataio.h" #include "gob/goblin.h" -#include "gob/sound.h" #include "gob/mult.h" +#include "gob/sound/sound.h" namespace Gob { @@ -160,7 +159,7 @@ void Map_v1::loadSounds(Common::SeekableReadStream &data) { strcpy(sndNames[i], buf); } - _vm->_snd->loadSample(_vm->_goblin->_soundData[14], "diamant1.snd"); + _vm->_sound->sampleLoad(&_vm->_goblin->_soundData[14], "diamant1.snd"); for (int i = 0; i < count; i++) { handle = _vm->_dataIO->openData(sndNames[i]); @@ -168,7 +167,7 @@ void Map_v1::loadSounds(Common::SeekableReadStream &data) { continue; _vm->_dataIO->closeData(handle); - _vm->_snd->loadSample(_vm->_goblin->_soundData[i], sndNames[i]); + _vm->_sound->sampleLoad(&_vm->_goblin->_soundData[i], sndNames[i]); } } diff --git a/engines/gob/map_v2.cpp b/engines/gob/map_v2.cpp index 2c383f5bb2..668b4d2e97 100644 --- a/engines/gob/map_v2.cpp +++ b/engines/gob/map_v2.cpp @@ -23,7 +23,6 @@ * */ - #include "common/stream.h" #include "gob/gob.h" diff --git a/engines/gob/module.mk b/engines/gob/module.mk index aa2a235327..4ff9bdf920 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -1,7 +1,13 @@ MODULE := engines/gob MODULE_OBJS := \ - cdrom.o \ + sound/sound.o \ + sound/sounddesc.o \ + sound/pcspeaker.o \ + sound/adlib.o \ + sound/infogrames.o \ + sound/soundblaster.o \ + sound/cdrom.o \ dataio.o \ detection.o \ draw.o \ @@ -38,7 +44,6 @@ MODULE_OBJS := \ mult.o \ mult_v1.o \ mult_v2.o \ - music.o \ palanim.o \ parse.o \ parse_v1.o \ @@ -49,7 +54,6 @@ MODULE_OBJS := \ scenery.o \ scenery_v1.o \ scenery_v2.o \ - sound.o \ util.o \ video.o \ video_v1.o \ diff --git a/engines/gob/mult.cpp b/engines/gob/mult.cpp index 70b6d33136..bc9fe4dc11 100644 --- a/engines/gob/mult.cpp +++ b/engines/gob/mult.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" @@ -34,9 +33,9 @@ #include "gob/game.h" #include "gob/palanim.h" #include "gob/scenery.h" -#include "gob/sound.h" #include "gob/video.h" #include "gob/videoplayer.h" +#include "gob/sound/sound.h" namespace Gob { @@ -188,7 +187,7 @@ void Mult::playMult(int16 startFrame, int16 endFrame, char checkEscape, if (_frame >= endFrame) stopNoClear = true; - if (_vm->_snd->_playingSound) + if (_vm->_sound->blasterPlayingSound()) stop = false; _vm->_util->processInput(); @@ -225,8 +224,8 @@ void Mult::playMult(int16 startFrame, int16 endFrame, char checkEscape, _animDataAllocated = false; } - if (_vm->_snd->_playingSound) - _vm->_snd->stopSound(10); + if (_vm->_sound->blasterPlayingSound()) + _vm->_sound->blasterStop(10); WRITE_VAR(57, (uint32) -1); } else @@ -415,21 +414,24 @@ void Mult::doSoundAnim(bool &stop, int16 frame) { if (sndKey->cmd != -1) { if ((sndKey->cmd == 1) || (sndKey->cmd == 4)) { - SoundDesc &sample = _vm->_game->_soundSamples[sndKey->soundIndex]; + SoundDesc *sample = _vm->_sound->sampleGetBySlot(sndKey->soundIndex); - _vm->_snd->stopSound(0); - if (!sample.empty()) - _vm->_snd->playSample(sample, sndKey->repCount, + _vm->_sound->blasterStop(0); + if (sample && !sample->empty()) + _vm->_sound->blasterPlay(sample, sndKey->repCount, sndKey->freq, sndKey->fadeLength); } } else { - if (_vm->_snd->_playingSound) - _vm->_snd->stopSound(sndKey->fadeLength); + if (_vm->_sound->blasterPlayingSound()) + _vm->_sound->blasterStop(sndKey->fadeLength); } } } void Mult::clearObjectVideos() { + if (!_objects) + return; + for (int i = 0; i < _objCount; i++) if (_objects[i].videoSlot > 0) _vm->_vidPlayer->slotClose(_objects[i].videoSlot - 1); diff --git a/engines/gob/mult_v1.cpp b/engines/gob/mult_v1.cpp index 78071f1dd8..22683437e7 100644 --- a/engines/gob/mult_v1.cpp +++ b/engines/gob/mult_v1.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "common/stream.h" diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index 5ff0612497..3b561837ee 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "common/stream.h" diff --git a/engines/gob/music.cpp b/engines/gob/music.cpp deleted file mode 100644 index 7be046c02a..0000000000 --- a/engines/gob/music.cpp +++ /dev/null @@ -1,483 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/file.h" - -#include "common/endian.h" - -#include "gob/gob.h" -#include "gob/music.h" -#include "gob/game.h" -#include "gob/util.h" - -namespace Gob { - -const char *Adlib::_tracks[][2] = { - {"avt00.tot", "mine"}, - {"avt001.tot", "nuit"}, - {"avt002.tot", "campagne"}, - {"avt003.tot", "extsor1"}, - {"avt004.tot", "interieure"}, - {"avt005.tot", "zombie"}, - {"avt006.tot", "zombie"}, - {"avt007.tot", "campagne"}, - {"avt008.tot", "campagne"}, - {"avt009.tot", "extsor1"}, - {"avt010.tot", "extsor1"}, - {"avt011.tot", "interieure"}, - {"avt012.tot", "zombie"}, - {"avt014.tot", "nuit"}, - {"avt015.tot", "interieure"}, - {"avt016.tot", "statue"}, - {"avt017.tot", "zombie"}, - {"avt018.tot", "statue"}, - {"avt019.tot", "mine"}, - {"avt020.tot", "statue"}, - {"avt021.tot", "mine"}, - {"avt022.tot", "zombie"} -}; - -const char *Adlib::_trackFiles[] = { -// "musmac1.adl", // TODO: This track isn't played correctly at all yet - "musmac2.adl", - "musmac3.adl", - "musmac4.adl", - "musmac5.adl", - "musmac6.adl" -}; - -const unsigned char Adlib::_operators[] = {0, 1, 2, 8, 9, 10, 16, 17, 18}; -const unsigned char Adlib::_volRegNums[] = { - 3, 4, 5, - 11, 12, 13, - 19, 20, 21 -}; - -Adlib::Adlib(GobEngine *vm) : _vm(vm) { - int i; - - _index = -1; - _data = 0; - _playPos = 0; - _dataSize = 0; - _rate = _vm->_mixer->getOutputRate(); - _opl = makeAdlibOPL(_rate); - _first = true; - _ended = false; - _playing = false; - _needFree = false; - _repCount = -1; - _samplesTillPoll = 0; - - for (i = 0; i < 16; i ++) - _pollNotes[i] = 0; - setFreqs(); - - _vm->_mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_handle, - this, -1, 255, 0, false, true); -} - -Adlib::~Adlib() { - Common::StackLock slock(_mutex); - - _vm->_mixer->stopHandle(_handle); - OPLDestroy(_opl); - if (_data && _needFree) - delete[] _data; -} - -int Adlib::readBuffer(int16 *buffer, const int numSamples) { - Common::StackLock slock(_mutex); - int samples; - int render; - - if (!_playing || (numSamples < 0)) { - memset(buffer, 0, numSamples * sizeof(int16)); - return numSamples; - } - if (_first) { - memset(buffer, 0, numSamples * sizeof(int16)); - pollMusic(); - return numSamples; - } - - samples = numSamples; - while (samples && _playing) { - if (_samplesTillPoll) { - render = (samples > _samplesTillPoll) ? (_samplesTillPoll) : (samples); - samples -= render; - _samplesTillPoll -= render; - YM3812UpdateOne(_opl, buffer, render); - buffer += render; - } else { - pollMusic(); - if (_ended) { - memset(buffer, 0, samples * sizeof(int16)); - samples = 0; - } - } - } - - if (_ended) { - _first = true; - _ended = false; - _playPos = _data + 3 + (_data[1] + 1) * 0x38; - _samplesTillPoll = 0; - if (_repCount == -1) { - reset(); - setVoices(); - } else if (_repCount > 0) { - _repCount--; - reset(); - setVoices(); - } - else - _playing = false; - } - - return numSamples; -} - -void Adlib::writeOPL(byte reg, byte val) { - debugC(6, kDebugMusic, "writeOPL(%02X, %02X)", reg, val); - OPLWriteReg(_opl, reg, val); -} - -void Adlib::setFreqs() { - byte lin; - byte col; - long val = 0; - - // Run through the 11 channels - for (lin = 0; lin < 11; lin ++) { - _notes[lin] = 0; - _notCol[lin] = 0; - _notLin[lin] = 0; - _notOn[lin] = false; - } - - // Run through the 25 lines - for (lin = 0; lin < 25; lin ++) { - // Run through the 12 columns - for (col = 0; col < 12; col ++) { - if (!col) - val = (((0x2710L + lin * 0x18) * 0xCB78 / 0x3D090) << 0xE) * - 9 / 0x1B503; - _freqs[lin][col] = (short)((val + 4) >> 3); - val = val * 0x6A / 0x64; - } - } -} - -void Adlib::reset() { - _first = true; - OPLResetChip(_opl); - _samplesTillPoll = 0; - - setFreqs(); - // Set frequencies and octave to 0; notes off - for (int i = 0; i < 9; i++) { - writeOPL(0xA0 | i, 0); - writeOPL(0xB0 | i, 0); - writeOPL(0xE0 | _operators[i] , 0); - writeOPL(0xE0 | _operators[i] + 3, 0); - } - - // Authorize the control of the waveformes - writeOPL(0x01, 0x20); -} - -void Adlib::setVoices() { - // Definitions of the 9 instruments - for (int i = 0; i < 9; i++) - setVoice(i, i, true); -} - -void Adlib::setVoice(byte voice, byte instr, bool set) { - int i; - int j; - uint16 strct[27]; - byte channel; - byte *dataPtr; - - // i = 0 : 0 1 2 3 4 5 6 7 8 9 10 11 12 26 - // i = 1 : 13 14 15 16 17 18 19 20 21 22 23 24 25 27 - for (i = 0; i < 2; i++) { - dataPtr = _data + 3 + instr * 0x38 + i * 0x1A; - for (j = 0; j < 27; j++) { - strct[j] = READ_LE_UINT16(dataPtr); - dataPtr += 2; - } - channel = _operators[voice] + i * 3; - writeOPL(0xBD, 0x00); - writeOPL(0x08, 0x00); - writeOPL(0x40 | channel, ((strct[0] & 3) << 6) | (strct[8] & 0x3F)); - if (!i) - writeOPL(0xC0 | voice, - ((strct[2] & 7) << 1) | (1 - (strct[12] & 1))); - writeOPL(0x60 | channel, ((strct[3] & 0xF) << 4) | (strct[6] & 0xF)); - writeOPL(0x80 | channel, ((strct[4] & 0xF) << 4) | (strct[7] & 0xF)); - writeOPL(0x20 | channel, ((strct[9] & 1) << 7) | - ((strct[10] & 1) << 6) | ((strct[5] & 1) << 5) | - ((strct[11] & 1) << 4) | (strct[1] & 0xF)); - if (!i) - writeOPL(0xE0 | channel, (strct[26] & 3)); - else - writeOPL(0xE0 | channel, (strct[14] & 3)); - if (i && set) - writeOPL(0x40 | channel, 0); - } -} - -void Adlib::setKey(byte voice, byte note, bool on, bool spec) { - short freq = 0; - short octa = 0; - - // Instruction AX - if (spec) { - // 0x7F donne 0x16B; - // 7F - // << 7 = 3F80 - // + E000 = 11F80 - // & FFFF = 1F80 - // * 19 = 31380 - // / 2000 = 18 => Ligne 18h, colonne 0 => freq 16B - - // 0x3A donne 0x2AF; - // 3A - // << 7 = 1D00 - // + E000 = FD00 negatif - // * 19 = xB500 - // / 2000 = -2 => Ligne 17h, colonne -1 - - // 2E - // << 7 = 1700 - // + E000 = F700 negatif - // * 19 = x1F00 - // / 2000 = - short a; - short lin; - short col; - - a = (note << 7) + 0xE000; // Volontairement tronque - a = (short)((long)a * 25 / 0x2000); - if (a < 0) { - col = - ((24 - a) / 25); - lin = (-a % 25); - if (lin) - lin = 25 - lin; - } - else { - col = a / 25; - lin = a % 25; - } - - _notCol[voice] = col; - _notLin[voice] = lin; - note = _notes[voice]; - } - // Instructions 0X 9X 8X - else { - note -= 12; - _notOn[voice] = on; - } - - _notes[voice] = note; - note += _notCol[voice]; - note = MIN((byte) 0x5F, note); - octa = note / 12; - freq = _freqs[_notLin[voice]][note - octa * 12]; - - writeOPL(0xA0 + voice, freq & 0xFF); - writeOPL(0xB0 + voice, (freq >> 8) | (octa << 2) | 0x20 * on); - - if (!freq) - warning("Voice %d, note %02X unknown\n", voice, note); -} - -void Adlib::setVolume(byte voice, byte volume) { - volume = 0x3F - (volume * 0x7E + 0x7F) / 0xFE; - writeOPL(0x40 + _volRegNums[voice], volume); -} - -void Adlib::pollMusic() { - unsigned char instr; - byte channel; - byte note; - byte volume; - uint16 tempo; - - if ((_playPos > (_data + _dataSize)) && (_dataSize != 0xFFFFFFFF)) { - _ended = true; - return; - } - - // First tempo, we'll ignore it... - if (_first) { - tempo = *(_playPos++); - // Tempo on 2 bytes - if (tempo & 0x80) - tempo = ((tempo & 3) << 8) | *(_playPos++); - } - _first = false; - - // Instruction - instr = *(_playPos++); - channel = instr & 0x0F; - - switch (instr & 0xF0) { - // Note on + Volume - case 0x00: - note = *(_playPos++); - _pollNotes[channel] = note; - setVolume(channel, *(_playPos++)); - setKey(channel, note, true, false); - break; - // Note on - case 0x90: - note = *(_playPos++); - _pollNotes[channel] = note; - setKey(channel, note, true, false); - break; - // Last note off - case 0x80: - note = _pollNotes[channel]; - setKey(channel, note, false, false); - break; - // Frequency on/off - case 0xA0: - note = *(_playPos++); - setKey(channel, note, _notOn[channel], true); - break; - // Volume - case 0xB0: - volume = *(_playPos++); - setVolume(channel, volume); - break; - // Program change - case 0xC0: - setVoice(channel, *(_playPos++), false); - break; - // Special - case 0xF0: - switch (instr & 0x0F) { - case 0xF: // End instruction - _ended = true; - _samplesTillPoll = 0; - return; - default: - warning("Unknown special command in ADL, stopping playback: %X", - instr & 0x0F); - _repCount = 0; - _ended = true; - break; - } - break; - default: - warning("Unknown command in ADL, stopping playback: %X", - instr & 0xF0); - _repCount = 0; - _ended = true; - break; - } - - // Temporization - tempo = *(_playPos++); - // End tempo - if (tempo == 0xFF) { - _ended = true; - return; - } - // Tempo on 2 bytes - if (tempo & 0x80) - tempo = ((tempo & 3) << 8) | *(_playPos++); - if (!tempo) - tempo ++; - - _samplesTillPoll = tempo * (_rate / 1000); -} - -void Adlib::playBgMusic() { - for (int i = 0; i < ARRAYSIZE(_tracks); i++) - if (!scumm_stricmp(_vm->_game->_curTotFile, _tracks[i][0])) { - playTrack(_tracks[i][1]); - break; - } -} - -void Adlib::playTrack(const char *trackname) { - if (_playing) return; - - debugC(1, kDebugMusic, "Adlib::playTrack(%s)", trackname); - unload(); - load(_trackFiles[_vm->_util->getRandom(ARRAYSIZE(_trackFiles))]); - startPlay(); -} - -bool Adlib::load(const char *fileName) { - Common::File song; - - unload(); - song.open(fileName); - if (!song.isOpen()) - return false; - - _needFree = true; - _dataSize = song.size(); - _data = new byte[_dataSize]; - song.read(_data, _dataSize); - song.close(); - - reset(); - setVoices(); - _playPos = _data + 3 + (_data[1] + 1) * 0x38; - - return true; -} - -void Adlib::load(byte *data, uint32 size, int index) { - unload(); - _repCount = 0; - - _dataSize = size; - _data = data; - _index = index; - - reset(); - setVoices(); - _playPos = _data + 3 + (_data[1] + 1) * 0x38; -} - -void Adlib::unload() { - _playing = false; - _index = -1; - - if (_data && _needFree) - delete[] _data; - - _needFree = false; -} - -} // End of namespace Gob diff --git a/engines/gob/music.h b/engines/gob/music.h deleted file mode 100644 index 199ea515b0..0000000000 --- a/engines/gob/music.h +++ /dev/null @@ -1,106 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef GOB_MUSIC_H -#define GOB_MUSIC_H - -#include "common/mutex.h" -#include "sound/audiostream.h" -#include "sound/mixer.h" -#include "sound/fmopl.h" - -namespace Gob { - -class GobEngine; - -class Adlib : public Audio::AudioStream { -public: - Adlib(GobEngine *vm); - ~Adlib(); - - void lock() { _mutex.lock(); } - void unlock() { _mutex.unlock(); } - bool playing() const { return _playing; } - bool getRepeating() const { return _repCount != 0; } - void setRepeating (int32 repCount) { _repCount = repCount; } - int getIndex() const { return _index; } - void startPlay() { if (_data) _playing = true; } - void stopPlay() { - Common::StackLock slock(_mutex); - _playing = false; - } - void playTrack(const char *trackname); - void playBgMusic(); - bool load(const char *fileName); - void load(byte *data, uint32 size, int index = -1); - void unload(); - -// AudioStream API - int readBuffer(int16 *buffer, const int numSamples); - bool isStereo() const { return false; } - bool endOfData() const { return !_playing; } - bool endOfStream() const { return false; } - int getRate() const { return _rate; } - -protected: - static const char *_tracks[][2]; - static const char *_trackFiles[]; - static const unsigned char _operators[]; - static const unsigned char _volRegNums []; - Audio::SoundHandle _handle; - FM_OPL *_opl; - int _index; - byte *_data; - byte *_playPos; - uint32 _dataSize; - uint32 _rate; - short _freqs[25][12]; - byte _notes[11]; - byte _notCol[11]; - byte _notLin[11]; - bool _notOn[11]; - byte _pollNotes[16]; - int _samplesTillPoll; - int32 _repCount; - bool _playing; - bool _first; - bool _ended; - bool _needFree; - Common::Mutex _mutex; - GobEngine *_vm; - - void writeOPL(byte reg, byte val); - void setFreqs(); - void reset(); - void setVoices(); - void setVoice(byte voice, byte instr, bool set); - void setKey(byte voice, byte note, bool on, bool spec); - void setVolume(byte voice, byte volume); - void pollMusic(); -}; - -} // End of namespace Gob - -#endif // GOB_MUSIC_H diff --git a/engines/gob/parse.cpp b/engines/gob/parse.cpp index af12626c83..5d7cef0341 100644 --- a/engines/gob/parse.cpp +++ b/engines/gob/parse.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" diff --git a/engines/gob/parse_v1.cpp b/engines/gob/parse_v1.cpp index 2b84ac5cee..f18f63de4f 100644 --- a/engines/gob/parse_v1.cpp +++ b/engines/gob/parse_v1.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" diff --git a/engines/gob/parse_v2.cpp b/engines/gob/parse_v2.cpp index 65315c083a..463a3870ee 100644 --- a/engines/gob/parse_v2.cpp +++ b/engines/gob/parse_v2.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" diff --git a/engines/gob/scenery.cpp b/engines/gob/scenery.cpp index 62a4dbad2f..4dc1236ad6 100644 --- a/engines/gob/scenery.cpp +++ b/engines/gob/scenery.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "common/stream.h" diff --git a/engines/gob/scenery_v1.cpp b/engines/gob/scenery_v1.cpp index 5d3eb15a95..605b098693 100644 --- a/engines/gob/scenery_v1.cpp +++ b/engines/gob/scenery_v1.cpp @@ -23,13 +23,12 @@ * */ - #include "common/endian.h" #include "gob/gob.h" #include "gob/scenery.h" #include "gob/util.h" -#include "gob/cdrom.h" +#include "gob/sound/sound.h" namespace Gob { @@ -37,11 +36,11 @@ Scenery_v1::Scenery_v1(GobEngine *vm) : Scenery(vm) { } int16 Scenery_v1::loadAnim(char search) { - if (_vm->_cdrom->_cdPlaying) { - while (_vm->_cdrom->getTrackPos() != -1) + if (_vm->_sound->cdIsPlaying()) { + while (_vm->_sound->cdGetTrackPos() != -1) _vm->_util->longDelay(50); - _vm->_cdrom->_cdPlaying = false; + _vm->_sound->cdStop(); } return Scenery::loadAnim(search); diff --git a/engines/gob/scenery_v2.cpp b/engines/gob/scenery_v2.cpp index 6ed377af64..1a0de6f291 100644 --- a/engines/gob/scenery_v2.cpp +++ b/engines/gob/scenery_v2.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" diff --git a/engines/gob/sound.cpp b/engines/gob/sound.cpp deleted file mode 100644 index 6b227cfb0e..0000000000 --- a/engines/gob/sound.cpp +++ /dev/null @@ -1,374 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - - -#include "common/endian.h" - -#include "gob/gob.h" -#include "gob/sound.h" -#include "gob/global.h" -#include "gob/util.h" -#include "gob/dataio.h" -#include "gob/game.h" - -namespace Gob { - -void SoundDesc::set(SoundType type, SoundSource src, - byte *data, uint32 dSize) { - - free(); - - _type = type; - _source = src; - _data = _dataPtr = data; - _size = dSize; -} - -void SoundDesc::load(SoundType type, SoundSource src, - byte *data, uint32 dSize) { - - free(); - - _source = src; - switch (type) { - case SOUND_ADL: - loadADL(data, dSize); - break; - case SOUND_SND: - loadSND(data, dSize); - break; - } -} - -void SoundDesc::free() { - if (_source != SOUND_TOT) - delete[] _data; - _data = _dataPtr = 0; - _id = 0; -} - -void SoundDesc::convToSigned() { - if ((_type == SOUND_SND) && _data && _dataPtr) - for (uint32 i = 0; i < _size; i++) - _dataPtr[i] ^= 0x80; -} - -void SoundDesc::loadSND(byte *data, uint32 dSize) { - assert(dSize > 6); - - _type = SOUND_SND; - _data = data; - _dataPtr = data + 6; - _frequency = MAX((int16) READ_BE_UINT16(data + 4), (int16) 4700); - _flag = data[0] ? (data[0] & 0x7F) : 8; - data[0] = 0; - _size = MIN(READ_BE_UINT32(data), dSize - 6); -} - -void SoundDesc::loadADL(byte *data, uint32 dSize) { - _type = SOUND_ADL; - _data = _dataPtr = data; - _size = dSize; -} - -Snd::Snd(GobEngine *vm) : _vm(vm) { - _playingSound = 0; - _curSoundDesc = 0; - - _rate = _vm->_mixer->getOutputRate(); - _end = true; - _data = 0; - _length = 0; - _freq = 0; - _repCount = 0; - - _offset = 0; - _offsetFrac = 0; - _offsetInc = 0; - - _cur = 0; - _last = 0; - - _fade = false; - _fadeVol = 65536; - _fadeVolStep = 0; - _fadeSamples = 0; - _curFadeSamples = 0; - - _compositionSamples = 0; - _compositionSampleCount = 0; - _compositionPos = -1; - - _speakerStream = new Audio::PCSpeaker(_vm->_mixer->getOutputRate()); - - _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_handle, - this, -1, 255, 0, false, true); - _vm->_mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_speakerHandle, - _speakerStream, -1, 50, 0, false, true); -} - -Snd::~Snd() { - // stop permanent streams manually: - - // First the speaker stream - _vm->_mixer->stopHandle(_speakerHandle); - delete _speakerStream; - - // Next, this stream (class Snd is an AudioStream, too) - _vm->_mixer->stopHandle(_handle); -} - -void Snd::speakerOn(int16 frequency, int32 length) { - _speakerStream->play(Audio::PCSpeaker::kWaveFormSquare, frequency, length); -} - -void Snd::speakerOff() { - _speakerStream->stop(); -} - -void Snd::speakerOnUpdate(uint32 milis) { - if (_speakerStream->isPlaying()) - _speakerStream->stop(milis); -} - -void Snd::stopSound(int16 fadeLength, SoundDesc *sndDesc) { - Common::StackLock slock(_mutex); - - if (sndDesc && (sndDesc != _curSoundDesc)) - return; - - if (fadeLength <= 0) { - _data = 0; - _end = true; - _playingSound = 0; - _curSoundDesc = 0; - return; - } - - _fade = true; - _fadeVol = 65536; - _fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0)); - _fadeVolStep = MAX((int32) 1, (int32) (65536 / _fadeSamples)); - _curFadeSamples = 0; -} - -void Snd::setRepeating(int32 repCount) { - Common::StackLock slock(_mutex); - - _repCount = repCount; -} - -void Snd::waitEndPlay(bool interruptible, bool stopComp) { - if (stopComp) - _compositionPos = -1; - while (!_end && !_vm->_quitRequested) { - if (interruptible && (_vm->_util->checkKey() == 0x11B)) { - WRITE_VAR(57, -1); - return; - } - _vm->_util->longDelay(200); - } - stopSound(0); -} - -void Snd::stopComposition() { - if (_compositionPos != -1) { - stopSound(0); - _compositionPos = -1; - } -} - -void Snd::nextCompositionPos() { - int8 slot; - - while ((++_compositionPos < 50) && - ((slot = _composition[_compositionPos]) != -1)) { - if ((slot >= 0) && (slot < _compositionSampleCount)) { - SoundDesc &sample = _compositionSamples[slot]; - if (!sample.empty() && (sample.getType() == SOUND_SND)) { - setSample(sample, 1, 0, 0); - return; - } - } - if (_compositionPos == 49) - _compositionPos = -1; - } - _compositionPos = -1; -} - -void Snd::playComposition(int16 *composition, int16 freqVal, - SoundDesc *sndDescs, int8 sndCount) { - int i; - - waitEndPlay(); - stopComposition(); - - _compositionSamples = sndDescs ? sndDescs : _vm->_game->_soundSamples; - _compositionSampleCount = sndCount; - - i = -1; - do { - i++; - _composition[i] = composition[i]; - } while ((i < 50) && (composition[i] != -1)); - - _compositionPos = -1; - nextCompositionPos(); -} - -void Snd::setSample(SoundDesc &sndDesc, int16 repCount, int16 frequency, - int16 fadeLength) { - - if (frequency <= 0) - frequency = sndDesc._frequency; - - _curSoundDesc = &sndDesc; - sndDesc._repCount = repCount - 1; - sndDesc._frequency = frequency; - - _data = (int8 *) sndDesc.getData(); - _length = sndDesc.size(); - _freq = frequency; - - _repCount = repCount; - _end = false; - _playingSound = 1; - - _offset = 0; - _offsetFrac = 0; - _offsetInc = (_freq << FRAC_BITS) / _rate; - - _last = _cur; - _cur = _data[0]; - - _curFadeSamples = 0; - if (fadeLength == 0) { - _fade = false; - _fadeVol = 65536; - _fadeSamples = 0; - _fadeVolStep = 0; - } else { - _fade = true; - _fadeVol = 0; - _fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0)); - _fadeVolStep = - MAX((int32) 1, (int32) (65536 / _fadeSamples)); - } -} - -bool Snd::loadSample(SoundDesc &sndDesc, const char *fileName) { - byte *data; - uint32 size; - - data = (byte *) _vm->_dataIO->getData(fileName); - if (!data) - return false; - - size = _vm->_dataIO->getDataSize(fileName); - sndDesc.load(SOUND_SND, SOUND_FILE, data, size); - - return true; -} - -void Snd::freeSample(SoundDesc &sndDesc) { - stopSound(0, &sndDesc); - sndDesc.free(); -} - -void Snd::playSample(SoundDesc &sndDesc, int16 repCount, int16 frequency, - int16 fadeLength) { - Common::StackLock slock(_mutex); - - if (!_end) - return; - - setSample(sndDesc, repCount, frequency, fadeLength); -} - -void Snd::checkEndSample() { - if (_compositionPos != -1) - nextCompositionPos(); - else if ((_repCount == -1) || (--_repCount > 0)) { - _offset = 0; - _offsetFrac = 0; - _end = false; - _playingSound = 1; - } else { - _end = true; - _playingSound = 0; - } -} - -int Snd::readBuffer(int16 *buffer, const int numSamples) { - Common::StackLock slock(_mutex); - - for (int i = 0; i < numSamples; i++) { - if (!_data) - return i; - if (_end || (_offset >= _length)) - checkEndSample(); - if (_end) - return i; - - // Linear interpolation. See sound/rate.cpp - - int16 val = (_last + (((_cur - _last) * _offsetFrac + - FRAC_HALF) >> FRAC_BITS)) << 8; - *buffer++ = (val * _fadeVol) >> 16; - - _offsetFrac += _offsetInc; - - // Was there an integral change? - if (fracToInt(_offsetFrac) > 0) { - _last = _cur; - _cur = _data[_offset]; - _offset += fracToInt(_offsetFrac); - _offsetFrac &= FRAC_LO_MASK; - } - - if (_fade) { - - if (++_curFadeSamples >= _fadeSamples) { - if (_fadeVolStep > 0) { - _data = 0; - _end = true; - _playingSound = 0; - _compositionPos = -1; - _curSoundDesc = 0; - } else { - _fadeVol = 65536; - _fade = false; - } - } else - _fadeVol -= _fadeVolStep; - - if (_fadeVol < 0) - _fadeVol = 0; - - } - } - return numSamples; -} - -} // End of namespace Gob diff --git a/engines/gob/sound.h b/engines/gob/sound.h deleted file mode 100644 index 6780c201b5..0000000000 --- a/engines/gob/sound.h +++ /dev/null @@ -1,172 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef GOB_SOUND_H -#define GOB_SOUND_H - -#include "common/mutex.h" -#include "common/frac.h" -#include "sound/audiostream.h" -#include "sound/mixer.h" -#include "sound/softsynth/pcspk.h" - -namespace Gob { - -enum SoundType { - SOUND_SND, - SOUND_ADL -}; - -enum SoundSource { - SOUND_FILE, - SOUND_TOT, - SOUND_EXT -}; - -class SoundDesc { -public: - int16 _repCount; - int16 _frequency; - int16 _flag; - int16 _id; - - byte *getData() { return _dataPtr; } - uint32 size() { return _size; } - bool empty() { return !_dataPtr; } - bool isId(int16 id) { return _dataPtr && _id == id; } - SoundType getType() { return _type; } - - void set(SoundType type, SoundSource src, byte *data, uint32 dSize); - void load(SoundType type, SoundSource src, byte *data, uint32 dSize); - void free(); - void convToSigned(); - - // Which fade out length to use when the fade starts half-way through? - int16 calcFadeOutLength(int16 frequency) { - return (10 * (_size / 2)) / frequency; - } - uint32 calcLength(int16 repCount, int16 frequency, bool fade) { - uint32 fadeSize = fade ? _size / 2 : 0; - return ((_size * repCount - fadeSize) * 1000) / frequency; - } - - SoundDesc() : _data(0), _dataPtr(0), _size(0), _type(SOUND_SND), - _source(SOUND_FILE), _repCount(0), _frequency(0), - _flag(0), _id(0) {} - ~SoundDesc() { free(); } - -private: - byte *_data; - byte *_dataPtr; - uint32 _size; - - SoundType _type; - SoundSource _source; - - void loadSND(byte *data, uint32 dSize); - void loadADL(byte *data, uint32 dSize); -}; - -class Snd : public Audio::AudioStream { -public: - char _playingSound; - - Snd(GobEngine *vm); - ~Snd(); - - void speakerOn(int16 frequency, int32 length); - void speakerOff(); - void speakerOnUpdate(uint32 milis); - void stopSound(int16 fadeLength, SoundDesc *sndDesc = 0); - - bool loadSample(SoundDesc &sndDesc, const char *fileName); - void freeSample(SoundDesc &sndDesc); - void playSample(SoundDesc &sndDesc, int16 repCount, - int16 frequency, int16 fadeLength = 0); - - void playComposition(int16 *composition, int16 freqVal, - SoundDesc *sndDescs = 0, int8 sndCount = 60); - void stopComposition(); - void setRepeating(int32 repCount); - void waitEndPlay(bool interruptible = false, bool stopComp = true); - - static void convToSigned(byte *buffer, int length) { - while (length-- > 0) - *buffer++ ^= 0x80; - } - - int readBuffer(int16 *buffer, const int numSamples); - bool isStereo() const { return false; } - bool endOfData() const { return _end; } - bool endOfStream() const { return false; } - int getRate() const { return _rate; } - -protected: - Audio::PCSpeaker *_speakerStream; - Audio::SoundHandle _speakerHandle; - - Audio::SoundHandle *_activeHandle; - Audio::SoundHandle _compositionHandle; - - SoundDesc *_compositionSamples; - int8 _compositionSampleCount; - int16 _composition[50]; - int8 _compositionPos; - - Audio::SoundHandle _handle; - Common::Mutex _mutex; - SoundDesc *_curSoundDesc; - bool _end; - int8 *_data; - uint32 _length; - uint32 _rate; - int32 _freq; - int32 _repCount; - - uint32 _offset; - frac_t _offsetFrac; - frac_t _offsetInc; - - int16 _cur; - int16 _last; - - bool _fade; - int32 _fadeVol; - int32 _fadeVolStep; - uint8 _fadeLength; - uint32 _fadeSamples; - uint32 _curFadeSamples; - - GobEngine *_vm; - - void setSample(SoundDesc &sndDesc, int16 repCount, - int16 frequency, int16 fadeLength); - void checkEndSample(); - void nextCompositionPos(); -}; - -} // End of namespace Gob - -#endif // GOB_SOUND_H diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp new file mode 100644 index 0000000000..fb0d9d58c1 --- /dev/null +++ b/engines/gob/sound/adlib.cpp @@ -0,0 +1,457 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/file.h" +#include "common/endian.h" + +#include "gob/gob.h" +#include "gob/sound/adlib.h" + +namespace Gob { + +const unsigned char AdLib::_operators[] = {0, 1, 2, 8, 9, 10, 16, 17, 18}; +const unsigned char AdLib::_volRegNums[] = { + 3, 4, 5, + 11, 12, 13, + 19, 20, 21 +}; + +AdLib::AdLib(Audio::Mixer &mixer) : _mixer(&mixer) { + _index = -1; + _data = 0; + _playPos = 0; + _dataSize = 0; + + _rate = _mixer->getOutputRate(); + _opl = makeAdlibOPL(_rate); + + _first = true; + _ended = false; + _playing = false; + _needFree = false; + + _repCount = -1; + _samplesTillPoll = 0; + + for (int i = 0; i < 16; i ++) + _pollNotes[i] = 0; + setFreqs(); + + _mixer->playInputStream(Audio::Mixer::kMusicSoundType, &_handle, + this, -1, 255, 0, false, true); +} + +AdLib::~AdLib() { + Common::StackLock slock(_mutex); + + _mixer->stopHandle(_handle); + OPLDestroy(_opl); + if (_data && _needFree) + delete[] _data; +} + +int AdLib::readBuffer(int16 *buffer, const int numSamples) { + Common::StackLock slock(_mutex); + int samples; + int render; + + if (!_playing || (numSamples < 0)) { + memset(buffer, 0, numSamples * sizeof(int16)); + return numSamples; + } + if (_first) { + memset(buffer, 0, numSamples * sizeof(int16)); + pollMusic(); + return numSamples; + } + + samples = numSamples; + while (samples && _playing) { + if (_samplesTillPoll) { + render = (samples > _samplesTillPoll) ? (_samplesTillPoll) : (samples); + samples -= render; + _samplesTillPoll -= render; + YM3812UpdateOne(_opl, buffer, render); + buffer += render; + } else { + pollMusic(); + if (_ended) { + memset(buffer, 0, samples * sizeof(int16)); + samples = 0; + } + } + } + + if (_ended) { + _first = true; + _ended = false; + _playPos = _data + 3 + (_data[1] + 1) * 0x38; + _samplesTillPoll = 0; + if (_repCount == -1) { + reset(); + setVoices(); + } else if (_repCount > 0) { + _repCount--; + reset(); + setVoices(); + } + else + _playing = false; + } + + return numSamples; +} + +void AdLib::writeOPL(byte reg, byte val) { + debugC(6, kDebugMusic, "writeOPL(%02X, %02X)", reg, val); + OPLWriteReg(_opl, reg, val); +} + +void AdLib::setFreqs() { + byte lin; + byte col; + long val = 0; + + // Run through the 11 channels + for (lin = 0; lin < 11; lin ++) { + _notes[lin] = 0; + _notCol[lin] = 0; + _notLin[lin] = 0; + _notOn[lin] = false; + } + + // Run through the 25 lines + for (lin = 0; lin < 25; lin ++) { + // Run through the 12 columns + for (col = 0; col < 12; col ++) { + if (!col) + val = (((0x2710L + lin * 0x18) * 0xCB78 / 0x3D090) << 0xE) * + 9 / 0x1B503; + _freqs[lin][col] = (short)((val + 4) >> 3); + val = val * 0x6A / 0x64; + } + } +} + +void AdLib::reset() { + _first = true; + OPLResetChip(_opl); + _samplesTillPoll = 0; + + setFreqs(); + // Set frequencies and octave to 0; notes off + for (int i = 0; i < 9; i++) { + writeOPL(0xA0 | i, 0); + writeOPL(0xB0 | i, 0); + writeOPL(0xE0 | _operators[i] , 0); + writeOPL(0xE0 | _operators[i] + 3, 0); + } + + // Authorize the control of the waveformes + writeOPL(0x01, 0x20); +} + +void AdLib::setVoices() { + // Definitions of the 9 instruments + for (int i = 0; i < 9; i++) + setVoice(i, i, true); +} + +void AdLib::setVoice(byte voice, byte instr, bool set) { + int i; + int j; + uint16 strct[27]; + byte channel; + byte *dataPtr; + + // i = 0 : 0 1 2 3 4 5 6 7 8 9 10 11 12 26 + // i = 1 : 13 14 15 16 17 18 19 20 21 22 23 24 25 27 + for (i = 0; i < 2; i++) { + dataPtr = _data + 3 + instr * 0x38 + i * 0x1A; + for (j = 0; j < 27; j++) { + strct[j] = READ_LE_UINT16(dataPtr); + dataPtr += 2; + } + channel = _operators[voice] + i * 3; + writeOPL(0xBD, 0x00); + writeOPL(0x08, 0x00); + writeOPL(0x40 | channel, ((strct[0] & 3) << 6) | (strct[8] & 0x3F)); + if (!i) + writeOPL(0xC0 | voice, + ((strct[2] & 7) << 1) | (1 - (strct[12] & 1))); + writeOPL(0x60 | channel, ((strct[3] & 0xF) << 4) | (strct[6] & 0xF)); + writeOPL(0x80 | channel, ((strct[4] & 0xF) << 4) | (strct[7] & 0xF)); + writeOPL(0x20 | channel, ((strct[9] & 1) << 7) | + ((strct[10] & 1) << 6) | ((strct[5] & 1) << 5) | + ((strct[11] & 1) << 4) | (strct[1] & 0xF)); + if (!i) + writeOPL(0xE0 | channel, (strct[26] & 3)); + else + writeOPL(0xE0 | channel, (strct[14] & 3)); + if (i && set) + writeOPL(0x40 | channel, 0); + } +} + +void AdLib::setKey(byte voice, byte note, bool on, bool spec) { + short freq = 0; + short octa = 0; + + // Instruction AX + if (spec) { + // 0x7F donne 0x16B; + // 7F + // << 7 = 3F80 + // + E000 = 11F80 + // & FFFF = 1F80 + // * 19 = 31380 + // / 2000 = 18 => Ligne 18h, colonne 0 => freq 16B + + // 0x3A donne 0x2AF; + // 3A + // << 7 = 1D00 + // + E000 = FD00 negatif + // * 19 = xB500 + // / 2000 = -2 => Ligne 17h, colonne -1 + + // 2E + // << 7 = 1700 + // + E000 = F700 negatif + // * 19 = x1F00 + // / 2000 = + short a; + short lin; + short col; + + a = (note << 7) + 0xE000; // Volontairement tronque + a = (short)((long)a * 25 / 0x2000); + if (a < 0) { + col = - ((24 - a) / 25); + lin = (-a % 25); + if (lin) + lin = 25 - lin; + } + else { + col = a / 25; + lin = a % 25; + } + + _notCol[voice] = col; + _notLin[voice] = lin; + note = _notes[voice]; + } + // Instructions 0X 9X 8X + else { + note -= 12; + _notOn[voice] = on; + } + + _notes[voice] = note; + note += _notCol[voice]; + note = MIN((byte) 0x5F, note); + octa = note / 12; + freq = _freqs[_notLin[voice]][note - octa * 12]; + + writeOPL(0xA0 + voice, freq & 0xFF); + writeOPL(0xB0 + voice, (freq >> 8) | (octa << 2) | 0x20 * on); + + if (!freq) + warning("Voice %d, note %02X unknown\n", voice, note); +} + +void AdLib::setVolume(byte voice, byte volume) { + volume = 0x3F - (volume * 0x7E + 0x7F) / 0xFE; + writeOPL(0x40 + _volRegNums[voice], volume); +} + +void AdLib::pollMusic() { + unsigned char instr; + byte channel; + byte note; + byte volume; + uint16 tempo; + + if ((_playPos > (_data + _dataSize)) && (_dataSize != 0xFFFFFFFF)) { + _ended = true; + return; + } + + // First tempo, we'll ignore it... + if (_first) { + tempo = *(_playPos++); + // Tempo on 2 bytes + if (tempo & 0x80) + tempo = ((tempo & 3) << 8) | *(_playPos++); + } + _first = false; + + // Instruction + instr = *(_playPos++); + channel = instr & 0x0F; + + switch (instr & 0xF0) { + // Note on + Volume + case 0x00: + note = *(_playPos++); + _pollNotes[channel] = note; + setVolume(channel, *(_playPos++)); + setKey(channel, note, true, false); + break; + // Note on + case 0x90: + note = *(_playPos++); + _pollNotes[channel] = note; + setKey(channel, note, true, false); + break; + // Last note off + case 0x80: + note = _pollNotes[channel]; + setKey(channel, note, false, false); + break; + // Frequency on/off + case 0xA0: + note = *(_playPos++); + setKey(channel, note, _notOn[channel], true); + break; + // Volume + case 0xB0: + volume = *(_playPos++); + setVolume(channel, volume); + break; + // Program change + case 0xC0: + setVoice(channel, *(_playPos++), false); + break; + // Special + case 0xF0: + switch (instr & 0x0F) { + case 0xF: // End instruction + _ended = true; + _samplesTillPoll = 0; + return; + default: + warning("Unknown special command in ADL, stopping playback: %X", + instr & 0x0F); + _repCount = 0; + _ended = true; + break; + } + break; + default: + warning("Unknown command in ADL, stopping playback: %X", + instr & 0xF0); + _repCount = 0; + _ended = true; + break; + } + + // Temporization + tempo = *(_playPos++); + // End tempo + if (tempo == 0xFF) { + _ended = true; + return; + } + // Tempo on 2 bytes + if (tempo & 0x80) + tempo = ((tempo & 3) << 8) | *(_playPos++); + if (!tempo) + tempo ++; + + _samplesTillPoll = tempo * (_rate / 1000); +} + +bool AdLib::load(const char *fileName) { + Common::File song; + + unload(); + song.open(fileName); + if (!song.isOpen()) + return false; + + _needFree = true; + _dataSize = song.size(); + _data = new byte[_dataSize]; + song.read(_data, _dataSize); + song.close(); + + reset(); + setVoices(); + _playPos = _data + 3 + (_data[1] + 1) * 0x38; + + return true; +} + +bool AdLib::load(byte *data, uint32 size, int index) { + unload(); + _repCount = 0; + + _dataSize = size; + _data = data; + _index = index; + + reset(); + setVoices(); + _playPos = _data + 3 + (_data[1] + 1) * 0x38; + + return true; +} + +void AdLib::unload() { + _playing = false; + _index = -1; + + if (_data && _needFree) + delete[] _data; + + _needFree = false; +} + +bool AdLib::isPlaying() const { + return _playing; +} + +bool AdLib::getRepeating() const { + return _repCount != 0; +} + +void AdLib::setRepeating(int32 repCount) { + _repCount = repCount; +} + +int AdLib::getIndex() const { + return _index; +} + +void AdLib::startPlay() { + if (_data) _playing = true; +} + +void AdLib::stopPlay() { + Common::StackLock slock(_mutex); + _playing = false; +} + +} // End of namespace Gob diff --git a/engines/gob/sound/adlib.h b/engines/gob/sound/adlib.h new file mode 100644 index 0000000000..4cd83d5883 --- /dev/null +++ b/engines/gob/sound/adlib.h @@ -0,0 +1,108 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef GOB_SOUND_ADLIB_H +#define GOB_SOUND_ADLIB_H + +#include "common/mutex.h" +#include "sound/audiostream.h" +#include "sound/mixer.h" +#include "sound/fmopl.h" + +namespace Gob { + +class GobEngine; + +class AdLib : public Audio::AudioStream { +public: + AdLib(Audio::Mixer &mixer); + ~AdLib(); + + bool isPlaying() const; + int getIndex() const; + bool getRepeating() const; + + void setRepeating(int32 repCount); + + void startPlay(); + void stopPlay(); + + bool load(const char *fileName); + bool load(byte *data, uint32 size, int index = -1); + void unload(); + +// AudioStream API + int readBuffer(int16 *buffer, const int numSamples); + bool isStereo() const { return false; } + bool endOfData() const { return !_playing; } + bool endOfStream() const { return false; } + int getRate() const { return _rate; } + +protected: + static const unsigned char _operators[]; + static const unsigned char _volRegNums []; + + Audio::Mixer *_mixer; + Audio::SoundHandle _handle; + FM_OPL *_opl; + + Common::Mutex _mutex; + + uint32 _rate; + + byte *_data; + byte *_playPos; + uint32 _dataSize; + + short _freqs[25][12]; + byte _notes[11]; + byte _notCol[11]; + byte _notLin[11]; + bool _notOn[11]; + byte _pollNotes[16]; + + int _samplesTillPoll; + int32 _repCount; + + bool _playing; + bool _first; + bool _ended; + bool _needFree; + + int _index; + + void writeOPL(byte reg, byte val); + void setFreqs(); + void reset(); + void setVoices(); + void setVoice(byte voice, byte instr, bool set); + void setKey(byte voice, byte note, bool on, bool spec); + void setVolume(byte voice, byte volume); + void pollMusic(); +}; + +} // End of namespace Gob + +#endif // GOB_SOUND_ADLIB_H diff --git a/engines/gob/sound/cdrom.cpp b/engines/gob/sound/cdrom.cpp new file mode 100644 index 0000000000..f3bc70807e --- /dev/null +++ b/engines/gob/sound/cdrom.cpp @@ -0,0 +1,201 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/endian.h" +#include "common/util.h" +#include "sound/audiocd.h" + +#include "gob/gob.h" +#include "gob/sound/cdrom.h" + +namespace Gob { + +CDROM::CDROM() { + _cdPlaying = false; + + _LICbuffer = 0; + for (int i = 0; i < 16; i++) + _curTrack[i] = 0; + _numTracks = 0; + _trackStop = 0; + _startTime = 0; +} + +CDROM::~CDROM() { +} + +void CDROM::readLIC(DataStream &stream) { + uint16 version, startChunk, pos; + + freeLICBuffer(); + *_curTrack = 0; + + version = stream.readUint16LE(); + startChunk = stream.readUint16LE(); + _numTracks = stream.readUint16LE(); + + if (version != 3) + error("Unknown version %d while reading LIC", version); + + stream.seek(50); + + for (int i = 0; i < startChunk; i++) { + pos = stream.readUint16LE(); + + if (!pos) + break; + + stream.skip(pos); + } + + _LICbuffer = new byte[_numTracks * 22]; + stream.read(_LICbuffer, _numTracks * 22); +} + +void CDROM::freeLICBuffer() { + delete[] _LICbuffer; + _LICbuffer = 0; +} + +void CDROM::startTrack(const char *trackName) { + if (!_LICbuffer) + return; + + debugC(1, kDebugMusic, "CDROM::startTrack(%s)", trackName); + + byte *matchPtr = getTrackBuffer(trackName); + if (!matchPtr) { + warning("Track \"%s\" not found", trackName); + return; + } + + strncpy0(_curTrack, trackName, 15); + + stopPlaying(); + _curTrackBuffer = matchPtr; + + while (getTrackPos() >= 0); + + uint32 start = READ_LE_UINT32(matchPtr + 12); + uint32 end = READ_LE_UINT32(matchPtr + 16); + + play(start, end); + + _startTime = g_system->getMillis(); + _trackStop = _startTime + (end - start + 1 + 150) * 40 / 3; +} + +void CDROM::play(uint32 from, uint32 to) { + // play from sector [from] to sector [to] + // + // format is HSG: + // HSG encodes frame information into a double word: + // minute multiplied by 4500, plus second multiplied by 75, + // plus frame, minus 150 + debugC(1, kDebugMusic, "CDROM::play(%d, %d)", from, to); + + AudioCD.play(1, 1, from, to - from + 1); + _cdPlaying = true; +} + +bool CDROM::isPlaying() const { + return _cdPlaying; +} + +int32 CDROM::getTrackPos(const char *keyTrack) const { + byte *keyBuffer = getTrackBuffer(keyTrack); + uint32 curPos = (g_system->getMillis() - _startTime) * 3 / 40; + + if (_cdPlaying && (g_system->getMillis() < _trackStop)) { + if (keyBuffer && _curTrackBuffer && (keyBuffer != _curTrackBuffer)) { + uint32 kStart = READ_LE_UINT32(keyBuffer + 12); + uint32 kEnd = READ_LE_UINT32(keyBuffer + 16); + uint32 cStart = READ_LE_UINT32(_curTrackBuffer + 12); + uint32 cEnd = READ_LE_UINT32(_curTrackBuffer + 16); + + if ((kStart >= cStart) && (kEnd <= cEnd)) { + if ((kStart - cStart) > curPos) + return -2; + if ((kEnd - cStart) < curPos) + return -1; + } + } + + return curPos; + } else + return -1; +} + +const char *CDROM::getCurTrack() const { + return _curTrack; +} + +void CDROM::stopPlaying() { + stop(); + + while (getTrackPos() != -1); +} + +void CDROM::stop() { + debugC(1, kDebugMusic, "CDROM::stop()"); + + _curTrackBuffer = 0; + AudioCD.stop(); + _cdPlaying = false; +} + +void CDROM::testCD(int trySubst, const char *label) { + if (!trySubst) { + error("CDROM track substitution is not supported"); + return; + } + + _LICbuffer = 0; + _cdPlaying = false; + + // Original checked CD label here + // but will skip it as it will require OSystem extensions of direct + // CD secor reading +} + +byte *CDROM::getTrackBuffer(const char *trackName) const { + if (!_LICbuffer || !trackName) + return 0; + + byte *matchPtr = 0; + byte *curPtr = _LICbuffer; + + for (int i = 0; i < _numTracks; i++) { + if (!scumm_stricmp((char *) curPtr, trackName)) { + matchPtr = curPtr; + break; + } + curPtr += 22; + } + + return matchPtr; +} + +} // End of namespace Gob diff --git a/engines/gob/sound/cdrom.h b/engines/gob/sound/cdrom.h new file mode 100644 index 0000000000..201f7adb75 --- /dev/null +++ b/engines/gob/sound/cdrom.h @@ -0,0 +1,68 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef GOB_SOUND_CDROM_H +#define GOB_SOUND_CDROM_H + +#include "gob/dataio.h" + +namespace Gob { + +class CDROM { +public: + CDROM(); + ~CDROM(); + + void readLIC(DataStream &stream); + void freeLICBuffer(); + + void startTrack(const char *trackName); + void stopPlaying(); + + bool isPlaying() const; + + int32 getTrackPos(const char *keyTrack = 0) const; + const char *getCurTrack() const; + + void testCD(int trySubst, const char *label); + +protected: + byte *_LICbuffer; + byte *_curTrackBuffer; + char _curTrack[16]; + uint16 _numTracks; + uint32 _trackStop; + uint32 _startTime; + bool _cdPlaying; + + void play(uint32 from, uint32 to); + void stop(); + + byte *getTrackBuffer(const char *trackName) const; +}; + +} // End of namespace Gob + +#endif // GOB_SOUND_CDROM_H diff --git a/engines/gob/sound/infogrames.cpp b/engines/gob/sound/infogrames.cpp new file mode 100644 index 0000000000..0b46f3485c --- /dev/null +++ b/engines/gob/sound/infogrames.cpp @@ -0,0 +1,103 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "gob/sound/infogrames.h" + +namespace Gob { + +Infogrames::Infogrames(Audio::Mixer &mixer) : _mixer(&mixer) { + _instruments = 0; + _song = 0; +} + +Infogrames::~Infogrames() { + clearSong(); + clearInstruments(); +} + +bool Infogrames::loadInstruments(const char *fileName) { + clearSong(); + clearInstruments(); + + return loadInst(fileName); +} + +bool Infogrames::loadSong(const char *fileName) { + clearSong(); + + if (!_instruments) + if (!loadInst("i1.ins")) + return false; + + _song = new Audio::Infogrames(*_instruments, true, + _mixer->getOutputRate(), _mixer->getOutputRate() / 75); + + if (!_song->load(fileName)) { + warning("Couldn't load infogrames music"); + clearSong(); + return false; + } + + return true; +} + +void Infogrames::play() { + if (_song && !_mixer->isSoundHandleActive(_handle)) { + _song->restart(); + _mixer->playInputStream(Audio::Mixer::kMusicSoundType, + &_handle, _song, -1, 255, 0, false); + } +} + +void Infogrames::stop() { + _mixer->stopHandle(_handle); +} + +void Infogrames::clearInstruments() { + delete _instruments; + _instruments = 0; +} + +void Infogrames::clearSong() { + if (_song) { + _mixer->stopHandle(_handle); + + delete _song; + _song = 0; + } +} + +bool Infogrames::loadInst(const char *fileName) { + _instruments = new Audio::Infogrames::Instruments; + if (!_instruments->load(fileName)) { + warning("Couldn't load instruments file"); + clearInstruments(); + return false; + } + + return true; +} + +} // End of namespace Gob diff --git a/engines/gob/sound/infogrames.h b/engines/gob/sound/infogrames.h new file mode 100644 index 0000000000..4a20dceb22 --- /dev/null +++ b/engines/gob/sound/infogrames.h @@ -0,0 +1,60 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef GOB_SOUND_INFOGRAMES_H +#define GOB_SOUND_INFOGRAMES_H + +#include "sound/mixer.h" +#include "sound/mods/infogrames.h" + +namespace Gob { + +class Infogrames { +public: + Infogrames(Audio::Mixer &mixer); + ~Infogrames(); + + bool loadInstruments(const char *fileName); + bool loadSong(const char *fileName); + + void play(); + void stop(); + +private: + Audio::Mixer *_mixer; + + Audio::Infogrames::Instruments *_instruments; + Audio::Infogrames *_song; + Audio::SoundHandle _handle; + + void clearInstruments(); + void clearSong(); + + bool loadInst(const char *fileName); +}; + +} // End of namespace Gob + +#endif // GOB_SOUND_INFOGRAMES_H diff --git a/engines/gob/sound/pcspeaker.cpp b/engines/gob/sound/pcspeaker.cpp new file mode 100644 index 0000000000..0d1fc0a6db --- /dev/null +++ b/engines/gob/sound/pcspeaker.cpp @@ -0,0 +1,55 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "gob/sound/pcspeaker.h" + +namespace Gob { + +PCSpeaker::PCSpeaker(Audio::Mixer &mixer) : _mixer(&mixer) { + + _stream = new Audio::PCSpeaker(_mixer->getOutputRate()); + _mixer->playInputStream(Audio::Mixer::kSFXSoundType, + &_handle, _stream, -1, 50, 0, false, true); +} + +PCSpeaker::~PCSpeaker() { + _mixer->stopHandle(_handle); + delete _stream; +} + +void PCSpeaker::speakerOn(int16 frequency, int32 length) { + _stream->play(Audio::PCSpeaker::kWaveFormSquare, frequency, length); +} + +void PCSpeaker::speakerOff() { + _stream->stop(); +} + +void PCSpeaker::onUpdate(uint32 millis) { + if (_stream->isPlaying()) + _stream->stop(millis); +} + +} // End of namespace Gob diff --git a/engines/gob/sound/pcspeaker.h b/engines/gob/sound/pcspeaker.h new file mode 100644 index 0000000000..8c4fb08021 --- /dev/null +++ b/engines/gob/sound/pcspeaker.h @@ -0,0 +1,52 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef GOB_SOUND_PCSPEAKER_H +#define GOB_SOUND_PCSPEAKER_H + +#include "sound/mixer.h" +#include "sound/softsynth/pcspk.h" + +namespace Gob { + +class PCSpeaker { +public: + PCSpeaker(Audio::Mixer &mixer); + ~PCSpeaker(); + + void speakerOn(int16 frequency, int32 length = -1); + void speakerOff(); + void onUpdate(uint32 millis); + +private: + Audio::Mixer *_mixer; + + Audio::PCSpeaker *_stream; + Audio::SoundHandle _handle; +}; + +} // End of namespace Gob + +#endif // GOB_SOUND_PCSPEAKER_H diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp new file mode 100644 index 0000000000..5c375c260a --- /dev/null +++ b/engines/gob/sound/sound.cpp @@ -0,0 +1,461 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "gob/gob.h" +#include "gob/sound/sound.h" +#include "gob/global.h" +#include "gob/util.h" +#include "gob/dataio.h" +#include "gob/game.h" + +namespace Gob { + +Sound::Sound(GobEngine *vm) : _vm(vm) { + _pcspeaker = new PCSpeaker(*_vm->_mixer); + _blaster = new SoundBlaster(*_vm->_mixer); + + _adlib = 0; + _infogrames = 0; + _cdrom = 0; + + if (!_vm->_noMusic && _vm->hasAdlib()) + _adlib = new AdLib(*_vm->_mixer); + if (!_vm->_noMusic && (_vm->getPlatform() == Common::kPlatformAmiga)) + _infogrames = new Infogrames(*_vm->_mixer); + if (_vm->isCD()) + _cdrom = new CDROM; +} + +Sound::~Sound() { + delete _pcspeaker; + delete _blaster; + delete _adlib; + delete _infogrames; + + for (int i = 0; i < kSoundsCount; i++) + _sounds[i].free(); +} + +void Sound::convToSigned(byte *buffer, int length) { + while (length-- > 0) + *buffer++ ^= 0x80; +} + +SoundDesc *Sound::sampleGetBySlot(int slot) { + if ((slot < 0) || (slot >= kSoundsCount)) + return 0; + + return &_sounds[slot]; +} + +const SoundDesc *Sound::sampleGetBySlot(int slot) const { + if ((slot < 0) || (slot >= kSoundsCount)) + return 0; + + return &_sounds[slot]; +} + +int Sound::sampleGetNextFreeSlot() const { + for (int i = 0; i < kSoundsCount; i++) + if (_sounds[i].empty()) + return i; + + return -1; +} + +bool Sound::sampleLoad(SoundDesc *sndDesc, const char *fileName) { + if (!sndDesc) + return false; + + byte *data; + uint32 size; + + data = (byte *) _vm->_dataIO->getData(fileName); + if (!data) + return false; + + size = _vm->_dataIO->getDataSize(fileName); + sndDesc->load(SOUND_SND, SOUND_FILE, data, size); + + return true; +} + +void Sound::sampleFree(SoundDesc *sndDesc, bool noteAdlib, int index) { + if (!sndDesc || sndDesc->empty()) + return; + + if (sndDesc->getType() == SOUND_ADL) { + + if (_adlib && noteAdlib) + if ((index == -1) || (_adlib->getIndex() == index)) + _adlib->stopPlay(); + + } else { + + if (_blaster) + _blaster->stopSound(0, sndDesc); + + } + + sndDesc->free(); +} + +void Sound::speakerOn(int16 frequency, int32 length) { + if (!_pcspeaker) + return; + + _pcspeaker->speakerOn(frequency, length); +} + +void Sound::speakerOff() { + if (!_pcspeaker) + return; + + _pcspeaker->speakerOff(); +} + +void Sound::speakerOnUpdate(uint32 millis) { + if (!_pcspeaker) + return; + + _pcspeaker->onUpdate(millis); +} + +bool Sound::infogramesLoadInstruments(const char *fileName) { + if (!_infogrames) + return false; + + return _infogrames->loadInstruments(fileName); +} + +bool Sound::infogramesLoadSong(const char *fileName) { + if (!_infogrames) + return false; + + return _infogrames->loadSong(fileName); +} + +void Sound::infogramesPlay() { + if (!_infogrames) + return; + + _infogrames->play(); +} + +void Sound::infogramesStop() { + if (!_infogrames) + return; + + _infogrames->stop(); +} + +bool Sound::adlibLoad(const char *fileName) { + if (!_adlib) + return false; + + return _adlib->load(fileName); +} + +bool Sound::adlibLoad(byte *data, uint32 size, int index) { + if (!_adlib) + return false; + + return _adlib->load(data, size, index); +} + +void Sound::adlibUnload() { + if (!_adlib) + return; + + _adlib->unload(); +} + +void Sound::adlibPlayTrack(const char *trackname) { + if (!_adlib || _adlib->isPlaying()) + return; + + debugC(1, kDebugMusic, "Adlib::playTrack(%s)", trackname); + + _adlib->unload(); + _adlib->load(trackname); + _adlib->startPlay(); +} + +void Sound::adlibPlayBgMusic() { + if (!_adlib) + return; + + static const char *tracks[] = { +// "musmac1.adl", // TODO: This track isn't played correctly at all yet + "musmac2.adl", + "musmac3.adl", + "musmac4.adl", + "musmac5.adl", + "musmac6.adl" + }; + + int track = _vm->_util->getRandom(ARRAYSIZE(tracks)); + adlibPlayTrack(tracks[track]); +} + +void Sound::adlibPlay() { + if (!_adlib) + return; + + _adlib->startPlay(); +} + +void Sound::adlibStop() { + if (!_adlib) + return; + + _adlib->stopPlay(); +} + +bool Sound::adlibIsPlaying() const { + if (!_adlib) + return false; + + return _adlib->isPlaying(); +} + +int Sound::adlibGetIndex() const { + if (!_adlib) + return -1; + + return _adlib->getIndex(); +} + +bool Sound::adlibGetRepeating() const { + if (!_adlib) + return false; + + return _adlib->getRepeating(); +} + +void Sound::adlibSetRepeating(int32 repCount) { + if (!_adlib) + return; + + _adlib->setRepeating(repCount); +} + +void Sound::blasterPlay(SoundDesc *sndDesc, int16 repCount, + int16 frequency, int16 fadeLength) { + if (!_blaster || !sndDesc) + return; + + _blaster->playSample(*sndDesc, repCount, frequency, fadeLength); +} + +void Sound::blasterStop(int16 fadeLength, SoundDesc *sndDesc) { + if (!_blaster) + return; + + _blaster->stopSound(fadeLength, sndDesc); +} + +void Sound::blasterPlayComposition(int16 *composition, int16 freqVal, + SoundDesc *sndDescs, int8 sndCount) { + if (!_blaster) + return; + + blasterWaitEndPlay(); + _blaster->stopComposition(); + + if (!sndDescs) + sndDescs = _sounds; + + _blaster->playComposition(composition, freqVal, sndDescs, sndCount); +} + +void Sound::blasterStopComposition() { + if (!_blaster) + return; + + _blaster->stopComposition(); +} + +char Sound::blasterPlayingSound() const { + if (!_blaster) + return 0; + + return _blaster->getPlayingSound(); +} + +void Sound::blasterSetRepeating(int32 repCount) { + if (!_blaster) + return; + + _blaster->setRepeating(repCount); +} + +void Sound::blasterWaitEndPlay(bool interruptible, bool stopComp) { + if (!_blaster) + return; + + if (stopComp) + _blaster->endComposition(); + + while (_blaster->isPlaying() && !_vm->_quitRequested) { + if (interruptible && (_vm->_util->checkKey() == 0x11B)) { + WRITE_VAR(57, -1); + return; + } + _vm->_util->longDelay(200); + } + + _blaster->stopSound(0); +} + +void Sound::cdLoadLIC(const char *fname) { + if (!_cdrom) + return; + + int handle = _vm->_dataIO->openData(fname); + + if (handle == -1) + return; + + _vm->_dataIO->closeData(handle); + + _vm->_dataIO->getUnpackedData(fname); + + handle = _vm->_dataIO->openData(fname); + DataStream *stream = _vm->_dataIO->openAsStream(handle, true); + + _cdrom->readLIC(*stream); + + delete stream; +} + +void Sound::cdUnloadLIC() { + if (!_cdrom) + return; + + _cdrom->freeLICBuffer(); +} + +void Sound::cdPlayBgMusic() { + if (!_cdrom) + return; + + static const char *tracks[][2] = { + {"avt00.tot", "mine"}, + {"avt001.tot", "nuit"}, + {"avt002.tot", "campagne"}, + {"avt003.tot", "extsor1"}, + {"avt004.tot", "interieure"}, + {"avt005.tot", "zombie"}, + {"avt006.tot", "zombie"}, + {"avt007.tot", "campagne"}, + {"avt008.tot", "campagne"}, + {"avt009.tot", "extsor1"}, + {"avt010.tot", "extsor1"}, + {"avt011.tot", "interieure"}, + {"avt012.tot", "zombie"}, + {"avt014.tot", "nuit"}, + {"avt015.tot", "interieure"}, + {"avt016.tot", "statue"}, + {"avt017.tot", "zombie"}, + {"avt018.tot", "statue"}, + {"avt019.tot", "mine"}, + {"avt020.tot", "statue"}, + {"avt021.tot", "mine"}, + {"avt022.tot", "zombie"} + }; + + for (int i = 0; i < ARRAYSIZE(tracks); i++) + if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) { + _cdrom->startTrack(tracks[i][1]); + break; + } +} + +void Sound::cdPlayMultMusic() { + if (!_cdrom) + return; + + static const char *tracks[][6] = { + {"avt005.tot", "fra1", "all1", "ang1", "esp1", "ita1"}, + {"avt006.tot", "fra2", "all2", "ang2", "esp2", "ita2"}, + {"avt012.tot", "fra3", "all3", "ang3", "esp3", "ita3"}, + {"avt016.tot", "fra4", "all4", "ang4", "esp4", "ita4"}, + {"avt019.tot", "fra5", "all5", "ang5", "esp5", "ita5"}, + {"avt022.tot", "fra6", "all6", "ang6", "esp6", "ita6"} + }; + + // Default to "ang?" for other languages (including EN_USA) + int language = _vm->_global->_language <= 4 ? _vm->_global->_language : 2; + for (int i = 0; i < ARRAYSIZE(tracks); i++) + if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) { + _cdrom->startTrack(tracks[i][language + 1]); + break; + } +} + +void Sound::cdPlay(const char *trackName) { + if (!_cdrom) + return; + + _cdrom->startTrack(trackName); +} + +void Sound::cdStop() { + if (!_cdrom) + return; + + _cdrom->stopPlaying(); +} + +bool Sound::cdIsPlaying() const { + if (!_cdrom) + return false; + + return _cdrom->isPlaying(); +} + +int32 Sound::cdGetTrackPos(const char *keyTrack) const { + if (!_cdrom) + return -1; + + return _cdrom->getTrackPos(keyTrack); +} + +const char *Sound::cdGetCurrentTrack() const { + if (!_cdrom) + return ""; + + return _cdrom->getCurTrack(); +} + +void Sound::cdTest(int trySubst, const char *label) { + if (!_cdrom) + return; + + _cdrom->testCD(trySubst, label); +} + +} // End of namespace Gob diff --git a/engines/gob/sound/sound.h b/engines/gob/sound/sound.h new file mode 100644 index 0000000000..81b48688c4 --- /dev/null +++ b/engines/gob/sound/sound.h @@ -0,0 +1,135 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef GOB_SOUND_SOUND_H +#define GOB_SOUND_SOUND_H + +#include "gob/sound/sounddesc.h" +#include "gob/sound/pcspeaker.h" +#include "gob/sound/soundblaster.h" +#include "gob/sound/adlib.h" +#include "gob/sound/infogrames.h" +#include "gob/sound/cdrom.h" + +namespace Gob { + +class Sound { +public: + static const int kSoundsCount = 60; + + Sound(GobEngine *vm); + ~Sound(); + + static void convToSigned(byte *buffer, int length); + + // Samples + SoundDesc *sampleGetBySlot(int slot); + const SoundDesc *sampleGetBySlot(int slot) const; + int sampleGetNextFreeSlot() const; + + bool sampleLoad(SoundDesc *sndDesc, const char *fileName); + void sampleFree(SoundDesc *sndDesc, bool noteAdlib = false, int index = -1); + + + // SoundBlaster + void blasterPlay(SoundDesc *sndDesc, int16 repCount, + int16 frequency, int16 fadeLength = 0); + void blasterStop(int16 fadeLength, SoundDesc *sndDesc = 0); + + void blasterPlayComposition(int16 *composition, int16 freqVal, + SoundDesc *sndDescs = 0, int8 sndCount = kSoundsCount); + void blasterStopComposition(); + + char blasterPlayingSound() const; + + void blasterSetRepeating(int32 repCount); + void blasterWaitEndPlay(bool interruptible = false, bool stopComp = true); + + + // PCSpeaker + void speakerOn(int16 frequency, int32 length = -1); + void speakerOff(); + void speakerOnUpdate(uint32 millis); + + + // AdLib + bool adlibLoad(const char *fileName); + bool adlibLoad(byte *data, uint32 size, int index = -1); + void adlibUnload(); + + void adlibPlayTrack(const char *trackname); + void adlibPlayBgMusic(); + + void adlibPlay(); + void adlibStop(); + + bool adlibIsPlaying() const; + + int adlibGetIndex() const; + bool adlibGetRepeating() const; + + void adlibSetRepeating(int32 repCount); + + + // Infogrames + bool infogramesLoadInstruments(const char *fileName); + bool infogramesLoadSong(const char *fileName); + + void infogramesPlay(); + void infogramesStop(); + + + // CD-ROM + void cdLoadLIC(const char *fname); + void cdUnloadLIC(); + + void cdPlayBgMusic(); + void cdPlayMultMusic(); + + void cdPlay(const char *trackName); + void cdStop(); + + bool cdIsPlaying() const; + + int32 cdGetTrackPos(const char *keyTrack = 0) const; + const char *cdGetCurrentTrack() const; + + void cdTest(int trySubst, const char *label); + +private: + GobEngine *_vm; + + SoundDesc _sounds[kSoundsCount]; + + PCSpeaker *_pcspeaker; + SoundBlaster *_blaster; + AdLib *_adlib; + Infogrames *_infogrames; + CDROM *_cdrom; +}; + +} // End of namespace Gob + +#endif // GOB_SOUND_H diff --git a/engines/gob/sound/soundblaster.cpp b/engines/gob/sound/soundblaster.cpp new file mode 100644 index 0000000000..f5339404b4 --- /dev/null +++ b/engines/gob/sound/soundblaster.cpp @@ -0,0 +1,260 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "gob/sound/sound.h" + +namespace Gob { + +SoundBlaster::SoundBlaster(Audio::Mixer &mixer) : _mixer(&mixer) { + _playingSound = 0; + _curSoundDesc = 0; + + _rate = _mixer->getOutputRate(); + _end = true; + _data = 0; + _length = 0; + _freq = 0; + _repCount = 0; + + _offset = 0; + _offsetFrac = 0; + _offsetInc = 0; + + _cur = 0; + _last = 0; + + _fade = false; + _fadeVol = 65536; + _fadeVolStep = 0; + _fadeSamples = 0; + _curFadeSamples = 0; + + _compositionSamples = 0; + _compositionSampleCount = 0; + _compositionPos = -1; + + _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_handle, + this, -1, 255, 0, false, true); +} + +SoundBlaster::~SoundBlaster() { + _mixer->stopHandle(_handle); +} + +bool SoundBlaster::isPlaying() const { + return !_end; +} + +char SoundBlaster::getPlayingSound() const { + return _playingSound; +} + +void SoundBlaster::stopSound(int16 fadeLength, SoundDesc *sndDesc) { + Common::StackLock slock(_mutex); + + if (sndDesc && (sndDesc != _curSoundDesc)) + return; + + if (fadeLength <= 0) { + _data = 0; + _end = true; + _playingSound = 0; + _curSoundDesc = 0; + return; + } + + _fade = true; + _fadeVol = 65536; + _fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0)); + _fadeVolStep = MAX((int32) 1, (int32) (65536 / _fadeSamples)); + _curFadeSamples = 0; +} + +void SoundBlaster::setRepeating(int32 repCount) { + Common::StackLock slock(_mutex); + + _repCount = repCount; +} + +void SoundBlaster::stopComposition() { + if (_compositionPos != -1) { + stopSound(0); + _compositionPos = -1; + } +} + +void SoundBlaster::endComposition() { + _compositionPos = -1; +} + +void SoundBlaster::nextCompositionPos() { + int8 slot; + + while ((++_compositionPos < 50) && + ((slot = _composition[_compositionPos]) != -1)) { + if ((slot >= 0) && (slot < _compositionSampleCount)) { + SoundDesc &sample = _compositionSamples[slot]; + if (!sample.empty() && (sample.getType() == SOUND_SND)) { + setSample(sample, 1, 0, 0); + return; + } + } + if (_compositionPos == 49) + _compositionPos = -1; + } + _compositionPos = -1; +} + +void SoundBlaster::playComposition(int16 *composition, int16 freqVal, + SoundDesc *sndDescs, int8 sndCount) { + + _compositionSamples = sndDescs; + _compositionSampleCount = sndCount; + + int i = -1; + do { + i++; + _composition[i] = composition[i]; + } while ((i < 50) && (composition[i] != -1)); + + _compositionPos = -1; + nextCompositionPos(); +} + +void SoundBlaster::setSample(SoundDesc &sndDesc, int16 repCount, int16 frequency, + int16 fadeLength) { + + if (frequency <= 0) + frequency = sndDesc._frequency; + + _curSoundDesc = &sndDesc; + sndDesc._repCount = repCount - 1; + sndDesc._frequency = frequency; + + _data = (int8 *) sndDesc.getData(); + _length = sndDesc.size(); + _freq = frequency; + + _repCount = repCount; + _end = false; + _playingSound = 1; + + _offset = 0; + _offsetFrac = 0; + _offsetInc = (_freq << FRAC_BITS) / _rate; + + _last = _cur; + _cur = _data[0]; + + _curFadeSamples = 0; + if (fadeLength == 0) { + _fade = false; + _fadeVol = 65536; + _fadeSamples = 0; + _fadeVolStep = 0; + } else { + _fade = true; + _fadeVol = 0; + _fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0)); + _fadeVolStep = - MAX((int32) 1, (int32) (65536 / _fadeSamples)); + } +} + +void SoundBlaster::playSample(SoundDesc &sndDesc, int16 repCount, int16 frequency, + int16 fadeLength) { + Common::StackLock slock(_mutex); + + if (!_end) + return; + + setSample(sndDesc, repCount, frequency, fadeLength); +} + +void SoundBlaster::checkEndSample() { + if (_compositionPos != -1) + nextCompositionPos(); + else if ((_repCount == -1) || (--_repCount > 0)) { + _offset = 0; + _offsetFrac = 0; + _end = false; + _playingSound = 1; + } else { + _end = true; + _playingSound = 0; + } +} + +int SoundBlaster::readBuffer(int16 *buffer, const int numSamples) { + Common::StackLock slock(_mutex); + + for (int i = 0; i < numSamples; i++) { + if (!_data) + return i; + if (_end || (_offset >= _length)) + checkEndSample(); + if (_end) + return i; + + // Linear interpolation. See sound/rate.cpp + + int16 val = (_last + (((_cur - _last) * _offsetFrac + + FRAC_HALF) >> FRAC_BITS)) << 8; + *buffer++ = (val * _fadeVol) >> 16; + + _offsetFrac += _offsetInc; + + // Was there an integral change? + if (fracToInt(_offsetFrac) > 0) { + _last = _cur; + _cur = _data[_offset]; + _offset += fracToInt(_offsetFrac); + _offsetFrac &= FRAC_LO_MASK; + } + + if (_fade) { + + if (++_curFadeSamples >= _fadeSamples) { + if (_fadeVolStep > 0) { + _data = 0; + _end = true; + _playingSound = 0; + _compositionPos = -1; + _curSoundDesc = 0; + } else { + _fadeVol = 65536; + _fade = false; + } + } else + _fadeVol -= _fadeVolStep; + + if (_fadeVol < 0) + _fadeVol = 0; + + } + } + return numSamples; +} + +} // End of namespace Gob diff --git a/engines/gob/sound/soundblaster.h b/engines/gob/sound/soundblaster.h new file mode 100644 index 0000000000..575d4994be --- /dev/null +++ b/engines/gob/sound/soundblaster.h @@ -0,0 +1,116 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef GOB_SOUND_SOUNDBLASTER_H +#define GOB_SOUND_SOUNDBLASTER_H + +#include "common/mutex.h" +#include "common/frac.h" +#include "sound/audiostream.h" +#include "sound/mixer.h" +#include "sound/softsynth/pcspk.h" + +namespace Gob { + +class SoundBlaster : public Audio::AudioStream { +public: + char _playingSound; + + SoundBlaster(Audio::Mixer &mixer); + ~SoundBlaster(); + + bool loadSample(SoundDesc &sndDesc, const char *fileName); + void freeSample(SoundDesc &sndDesc); + + void playSample(SoundDesc &sndDesc, int16 repCount, + int16 frequency, int16 fadeLength = 0); + void stopSound(int16 fadeLength, SoundDesc *sndDesc = 0); + + void playComposition(int16 *composition, int16 freqVal, + SoundDesc *sndDescs = 0, int8 sndCount = 60); + void stopComposition(); + void endComposition(); + + bool isPlaying() const; + char getPlayingSound() const; + + void setRepeating(int32 repCount); + void waitEndPlay(bool interruptible = false, bool stopComp = true); + + static void convToSigned(byte *buffer, int length) { + while (length-- > 0) + *buffer++ ^= 0x80; + } + + int readBuffer(int16 *buffer, const int numSamples); + bool isStereo() const { return false; } + bool endOfData() const { return _end; } + bool endOfStream() const { return false; } + int getRate() const { return _rate; } + +protected: + Audio::Mixer *_mixer; + + Audio::SoundHandle *_activeHandle; + Audio::SoundHandle _compositionHandle; + + SoundDesc *_compositionSamples; + int8 _compositionSampleCount; + int16 _composition[50]; + int8 _compositionPos; + + Audio::SoundHandle _handle; + Common::Mutex _mutex; + SoundDesc *_curSoundDesc; + bool _end; + int8 *_data; + uint32 _length; + uint32 _rate; + int32 _freq; + int32 _repCount; + + uint32 _offset; + frac_t _offsetFrac; + frac_t _offsetInc; + + int16 _cur; + int16 _last; + + bool _fade; + int32 _fadeVol; + int32 _fadeVolStep; + uint8 _fadeLength; + uint32 _fadeSamples; + uint32 _curFadeSamples; + + void setSample(SoundDesc &sndDesc, int16 repCount, + int16 frequency, int16 fadeLength); + void checkEndSample(); + void nextCompositionPos(); +}; + +} // End of namespace Gob + +#endif // GOB_SOUND_SOUNDBLASTER_H diff --git a/engines/gob/sound/sounddesc.cpp b/engines/gob/sound/sounddesc.cpp new file mode 100644 index 0000000000..e0885d9faa --- /dev/null +++ b/engines/gob/sound/sounddesc.cpp @@ -0,0 +1,116 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/util.h" + +#include "gob/sound/sounddesc.h" + +namespace Gob { + +SoundDesc::SoundDesc() { + _data = _dataPtr = 0; + _size = 0; + + _type = SOUND_SND; + _source = SOUND_FILE; + + _repCount = 0; + _frequency = 0; + _flag = 0; + _id = 0; +} + +SoundDesc::~SoundDesc() { + free(); +} + +void SoundDesc::set(SoundType type, SoundSource src, + byte *data, uint32 dSize) { + + free(); + + _type = type; + _source = src; + _data = _dataPtr = data; + _size = dSize; +} + +void SoundDesc::load(SoundType type, SoundSource src, + byte *data, uint32 dSize) { + + free(); + + _source = src; + switch (type) { + case SOUND_ADL: + loadADL(data, dSize); + break; + case SOUND_SND: + loadSND(data, dSize); + break; + } +} + +void SoundDesc::free() { + if (_source != SOUND_TOT) + delete[] _data; + _data = _dataPtr = 0; + _id = 0; +} + +void SoundDesc::convToSigned() { + if ((_type == SOUND_SND) && _data && _dataPtr) + for (uint32 i = 0; i < _size; i++) + _dataPtr[i] ^= 0x80; +} + +int16 SoundDesc::calcFadeOutLength(int16 frequency) { + return (10 * (_size / 2)) / frequency; +} + +uint32 SoundDesc::calcLength(int16 repCount, int16 frequency, bool fade) { + uint32 fadeSize = fade ? _size / 2 : 0; + return ((_size * repCount - fadeSize) * 1000) / frequency; +} + +void SoundDesc::loadSND(byte *data, uint32 dSize) { + assert(dSize > 6); + + _type = SOUND_SND; + _data = data; + _dataPtr = data + 6; + _frequency = MAX((int16) READ_BE_UINT16(data + 4), (int16) 4700); + _flag = data[0] ? (data[0] & 0x7F) : 8; + data[0] = 0; + _size = MIN(READ_BE_UINT32(data), dSize - 6); +} + +void SoundDesc::loadADL(byte *data, uint32 dSize) { + _type = SOUND_ADL; + _data = _dataPtr = data; + _size = dSize; +} + +} // End of namespace Gob diff --git a/engines/gob/sound/sounddesc.h b/engines/gob/sound/sounddesc.h new file mode 100644 index 0000000000..ed4447254c --- /dev/null +++ b/engines/gob/sound/sounddesc.h @@ -0,0 +1,85 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef GOB_SOUND_SOUNDDESC_H +#define GOB_SOUND_SOUNDDESC_H + +#include "common/endian.h" + +namespace Gob { + +enum SoundType { + SOUND_SND, + SOUND_ADL +}; + +enum SoundSource { + SOUND_FILE, + SOUND_TOT, + SOUND_EXT +}; + +class SoundDesc { +public: + int16 _repCount; + int16 _frequency; + int16 _flag; + int16 _id; + + byte *getData() { return _dataPtr; } + + uint32 size() const { return _size; } + bool empty() const { return !_dataPtr; } + SoundType getType() const { return _type; } + + bool isId(int16 id) const { return _dataPtr && (_id == id); } + + void set(SoundType type, SoundSource src, byte *data, uint32 dSize); + void load(SoundType type, SoundSource src, byte *data, uint32 dSize); + void free(); + void convToSigned(); + + // Which fade out length to use when the fade starts half-way through? + int16 calcFadeOutLength(int16 frequency); + uint32 calcLength(int16 repCount, int16 frequency, bool fade); + + SoundDesc(); + ~SoundDesc(); + +private: + byte *_data; + byte *_dataPtr; + uint32 _size; + + SoundType _type; + SoundSource _source; + + void loadSND(byte *data, uint32 dSize); + void loadADL(byte *data, uint32 dSize); +}; + +} // End of namespace Gob + +#endif // GOB_SOUND_SOUNDDESC_H diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp index 8e573ddb1a..4987426fe0 100644 --- a/engines/gob/util.cpp +++ b/engines/gob/util.cpp @@ -23,7 +23,6 @@ * */ - #include "common/events.h" #include "gob/gob.h" @@ -32,8 +31,8 @@ #include "gob/dataio.h" #include "gob/draw.h" #include "gob/game.h" -#include "gob/sound.h" #include "gob/video.h" +#include "gob/sound/sound.h" namespace Gob { @@ -60,7 +59,7 @@ void Util::beep(int16 freq) { if (_vm->_global->_soundFlags == 0) return; - _vm->_snd->speakerOn(freq, 50); + _vm->_sound->speakerOn(freq, 50); } void Util::delay(uint16 msecs) { diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 9a004318b8..e1777681df 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "graphics/cursorman.h" diff --git a/engines/gob/video_v1.cpp b/engines/gob/video_v1.cpp index 4ed3b04bad..3c9627c041 100644 --- a/engines/gob/video_v1.cpp +++ b/engines/gob/video_v1.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" diff --git a/engines/gob/video_v2.cpp b/engines/gob/video_v2.cpp index 52b349ca67..ab0c7e52db 100644 --- a/engines/gob/video_v2.cpp +++ b/engines/gob/video_v2.cpp @@ -23,7 +23,6 @@ * */ - #include "common/endian.h" #include "gob/gob.h" -- cgit v1.2.3 From 0c827c8cebf3709e980bb90be32b004acda058b8 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 8 May 2008 01:27:36 +0000 Subject: Split off the actual mixing part of SoundBlaster svn-id: r31938 --- engines/gob/module.mk | 17 +-- engines/gob/sound/soundblaster.cpp | 164 +++-------------------------- engines/gob/sound/soundblaster.h | 59 ++--------- engines/gob/sound/soundmixer.cpp | 205 +++++++++++++++++++++++++++++++++++++ engines/gob/sound/soundmixer.h | 95 +++++++++++++++++ 5 files changed, 331 insertions(+), 209 deletions(-) create mode 100644 engines/gob/sound/soundmixer.cpp create mode 100644 engines/gob/sound/soundmixer.h diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 4ff9bdf920..9f407daee5 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -1,13 +1,6 @@ MODULE := engines/gob MODULE_OBJS := \ - sound/sound.o \ - sound/sounddesc.o \ - sound/pcspeaker.o \ - sound/adlib.o \ - sound/infogrames.o \ - sound/soundblaster.o \ - sound/cdrom.o \ dataio.o \ detection.o \ draw.o \ @@ -57,7 +50,15 @@ MODULE_OBJS := \ util.o \ video.o \ video_v1.o \ - video_v2.o + video_v2.o \ + sound/sound.o \ + sound/sounddesc.o \ + sound/pcspeaker.o \ + sound/adlib.o \ + sound/infogrames.o \ + sound/soundmixer.o \ + sound/soundblaster.o \ + sound/cdrom.o # This module can be built as a plugin ifeq ($(ENABLE_GOB), DYNAMIC_PLUGIN) diff --git a/engines/gob/sound/soundblaster.cpp b/engines/gob/sound/soundblaster.cpp index f5339404b4..bacb16a6d3 100644 --- a/engines/gob/sound/soundblaster.cpp +++ b/engines/gob/sound/soundblaster.cpp @@ -27,48 +27,20 @@ namespace Gob { -SoundBlaster::SoundBlaster(Audio::Mixer &mixer) : _mixer(&mixer) { - _playingSound = 0; +SoundBlaster::SoundBlaster(Audio::Mixer &mixer) : SoundMixer(mixer) { _curSoundDesc = 0; - _rate = _mixer->getOutputRate(); - _end = true; - _data = 0; - _length = 0; - _freq = 0; - _repCount = 0; - - _offset = 0; - _offsetFrac = 0; - _offsetInc = 0; - - _cur = 0; - _last = 0; - - _fade = false; - _fadeVol = 65536; - _fadeVolStep = 0; - _fadeSamples = 0; - _curFadeSamples = 0; - _compositionSamples = 0; _compositionSampleCount = 0; _compositionPos = -1; - - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_handle, - this, -1, 255, 0, false, true); } SoundBlaster::~SoundBlaster() { - _mixer->stopHandle(_handle); } -bool SoundBlaster::isPlaying() const { - return !_end; -} - -char SoundBlaster::getPlayingSound() const { - return _playingSound; +void SoundBlaster::playSample(SoundDesc &sndDesc, int16 repCount, + int16 frequency, int16 fadeLength) { + SoundMixer::play(sndDesc, repCount, frequency, fadeLength); } void SoundBlaster::stopSound(int16 fadeLength, SoundDesc *sndDesc) { @@ -77,25 +49,10 @@ void SoundBlaster::stopSound(int16 fadeLength, SoundDesc *sndDesc) { if (sndDesc && (sndDesc != _curSoundDesc)) return; - if (fadeLength <= 0) { - _data = 0; - _end = true; - _playingSound = 0; + if (fadeLength <= 0) _curSoundDesc = 0; - return; - } - - _fade = true; - _fadeVol = 65536; - _fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0)); - _fadeVolStep = MAX((int32) 1, (int32) (65536 / _fadeSamples)); - _curFadeSamples = 0; -} -void SoundBlaster::setRepeating(int32 repCount) { - Common::StackLock slock(_mutex); - - _repCount = repCount; + SoundMixer::stop(fadeLength); } void SoundBlaster::stopComposition() { @@ -146,115 +103,24 @@ void SoundBlaster::playComposition(int16 *composition, int16 freqVal, void SoundBlaster::setSample(SoundDesc &sndDesc, int16 repCount, int16 frequency, int16 fadeLength) { - if (frequency <= 0) - frequency = sndDesc._frequency; - _curSoundDesc = &sndDesc; - sndDesc._repCount = repCount - 1; - sndDesc._frequency = frequency; - - _data = (int8 *) sndDesc.getData(); - _length = sndDesc.size(); - _freq = frequency; - - _repCount = repCount; - _end = false; - _playingSound = 1; - - _offset = 0; - _offsetFrac = 0; - _offsetInc = (_freq << FRAC_BITS) / _rate; - - _last = _cur; - _cur = _data[0]; - - _curFadeSamples = 0; - if (fadeLength == 0) { - _fade = false; - _fadeVol = 65536; - _fadeSamples = 0; - _fadeVolStep = 0; - } else { - _fade = true; - _fadeVol = 0; - _fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0)); - _fadeVolStep = - MAX((int32) 1, (int32) (65536 / _fadeSamples)); - } -} - -void SoundBlaster::playSample(SoundDesc &sndDesc, int16 repCount, int16 frequency, - int16 fadeLength) { - Common::StackLock slock(_mutex); - - if (!_end) - return; - - setSample(sndDesc, repCount, frequency, fadeLength); + SoundMixer::setSample(sndDesc, repCount, frequency, fadeLength); } void SoundBlaster::checkEndSample() { if (_compositionPos != -1) nextCompositionPos(); - else if ((_repCount == -1) || (--_repCount > 0)) { - _offset = 0; - _offsetFrac = 0; - _end = false; - _playingSound = 1; - } else { - _end = true; - _playingSound = 0; - } + else + SoundMixer::checkEndSample(); } -int SoundBlaster::readBuffer(int16 *buffer, const int numSamples) { - Common::StackLock slock(_mutex); - - for (int i = 0; i < numSamples; i++) { - if (!_data) - return i; - if (_end || (_offset >= _length)) - checkEndSample(); - if (_end) - return i; - - // Linear interpolation. See sound/rate.cpp - - int16 val = (_last + (((_cur - _last) * _offsetFrac + - FRAC_HALF) >> FRAC_BITS)) << 8; - *buffer++ = (val * _fadeVol) >> 16; - - _offsetFrac += _offsetInc; - - // Was there an integral change? - if (fracToInt(_offsetFrac) > 0) { - _last = _cur; - _cur = _data[_offset]; - _offset += fracToInt(_offsetFrac); - _offsetFrac &= FRAC_LO_MASK; - } - - if (_fade) { - - if (++_curFadeSamples >= _fadeSamples) { - if (_fadeVolStep > 0) { - _data = 0; - _end = true; - _playingSound = 0; - _compositionPos = -1; - _curSoundDesc = 0; - } else { - _fadeVol = 65536; - _fade = false; - } - } else - _fadeVol -= _fadeVolStep; - - if (_fadeVol < 0) - _fadeVol = 0; - - } +void SoundBlaster::endFade() { + if (_fadeVolStep > 0) { + _compositionPos = -1; + _curSoundDesc = 0; } - return numSamples; + + SoundMixer::endFade(); } } // End of namespace Gob diff --git a/engines/gob/sound/soundblaster.h b/engines/gob/sound/soundblaster.h index 575d4994be..c57e4a443e 100644 --- a/engines/gob/sound/soundblaster.h +++ b/engines/gob/sound/soundblaster.h @@ -27,23 +27,18 @@ #define GOB_SOUND_SOUNDBLASTER_H #include "common/mutex.h" -#include "common/frac.h" -#include "sound/audiostream.h" #include "sound/mixer.h" -#include "sound/softsynth/pcspk.h" + +#include "gob/sound/sounddesc.h" +#include "gob/sound/soundmixer.h" namespace Gob { -class SoundBlaster : public Audio::AudioStream { +class SoundBlaster : public SoundMixer { public: - char _playingSound; - SoundBlaster(Audio::Mixer &mixer); ~SoundBlaster(); - bool loadSample(SoundDesc &sndDesc, const char *fileName); - void freeSample(SoundDesc &sndDesc); - void playSample(SoundDesc &sndDesc, int16 repCount, int16 frequency, int16 fadeLength = 0); void stopSound(int16 fadeLength, SoundDesc *sndDesc = 0); @@ -53,61 +48,21 @@ public: void stopComposition(); void endComposition(); - bool isPlaying() const; - char getPlayingSound() const; - - void setRepeating(int32 repCount); - void waitEndPlay(bool interruptible = false, bool stopComp = true); - - static void convToSigned(byte *buffer, int length) { - while (length-- > 0) - *buffer++ ^= 0x80; - } - - int readBuffer(int16 *buffer, const int numSamples); - bool isStereo() const { return false; } - bool endOfData() const { return _end; } - bool endOfStream() const { return false; } - int getRate() const { return _rate; } - protected: - Audio::Mixer *_mixer; - - Audio::SoundHandle *_activeHandle; - Audio::SoundHandle _compositionHandle; + Common::Mutex _mutex; SoundDesc *_compositionSamples; int8 _compositionSampleCount; int16 _composition[50]; int8 _compositionPos; - Audio::SoundHandle _handle; - Common::Mutex _mutex; SoundDesc *_curSoundDesc; - bool _end; - int8 *_data; - uint32 _length; - uint32 _rate; - int32 _freq; - int32 _repCount; - - uint32 _offset; - frac_t _offsetFrac; - frac_t _offsetInc; - - int16 _cur; - int16 _last; - - bool _fade; - int32 _fadeVol; - int32 _fadeVolStep; - uint8 _fadeLength; - uint32 _fadeSamples; - uint32 _curFadeSamples; void setSample(SoundDesc &sndDesc, int16 repCount, int16 frequency, int16 fadeLength); void checkEndSample(); + void endFade(); + void nextCompositionPos(); }; diff --git a/engines/gob/sound/soundmixer.cpp b/engines/gob/sound/soundmixer.cpp new file mode 100644 index 0000000000..f85073ad61 --- /dev/null +++ b/engines/gob/sound/soundmixer.cpp @@ -0,0 +1,205 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "gob/sound/soundmixer.h" + +namespace Gob { + +SoundMixer::SoundMixer(Audio::Mixer &mixer) : _mixer(&mixer) { + _playingSound = 0; + + _rate = _mixer->getOutputRate(); + _end = true; + _data = 0; + _length = 0; + _freq = 0; + _repCount = 0; + + _offset = 0; + _offsetFrac = 0; + _offsetInc = 0; + + _cur = 0; + _last = 0; + + _fade = false; + _fadeVol = 65536; + _fadeVolStep = 0; + _fadeSamples = 0; + _curFadeSamples = 0; + + _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_handle, + this, -1, 255, 0, false, true); +} + +SoundMixer::~SoundMixer() { + _mixer->stopHandle(_handle); +} + +bool SoundMixer::isPlaying() const { + return !_end; +} + +char SoundMixer::getPlayingSound() const { + return _playingSound; +} + +void SoundMixer::stop(int16 fadeLength) { + Common::StackLock slock(_mutex); + + if (fadeLength <= 0) { + _data = 0; + _end = true; + _playingSound = 0; + return; + } + + _fade = true; + _fadeVol = 65536; + _fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0)); + _fadeVolStep = MAX((int32) 1, (int32) (65536 / _fadeSamples)); + _curFadeSamples = 0; +} + +void SoundMixer::setRepeating(int32 repCount) { + Common::StackLock slock(_mutex); + + _repCount = repCount; +} + +void SoundMixer::setSample(SoundDesc &sndDesc, int16 repCount, int16 frequency, + int16 fadeLength) { + + if (frequency <= 0) + frequency = sndDesc._frequency; + + sndDesc._repCount = repCount - 1; + sndDesc._frequency = frequency; + + _data = (int8 *) sndDesc.getData(); + _length = sndDesc.size(); + _freq = frequency; + + _repCount = repCount; + _end = false; + _playingSound = 1; + + _offset = 0; + _offsetFrac = 0; + _offsetInc = (_freq << FRAC_BITS) / _rate; + + _last = _cur; + _cur = _data[0]; + + _curFadeSamples = 0; + if (fadeLength == 0) { + _fade = false; + _fadeVol = 65536; + _fadeSamples = 0; + _fadeVolStep = 0; + } else { + _fade = true; + _fadeVol = 0; + _fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0)); + _fadeVolStep = - MAX((int32) 1, (int32) (65536 / _fadeSamples)); + } +} + +void SoundMixer::play(SoundDesc &sndDesc, int16 repCount, int16 frequency, + int16 fadeLength) { + Common::StackLock slock(_mutex); + + if (!_end) + return; + + setSample(sndDesc, repCount, frequency, fadeLength); +} + +void SoundMixer::checkEndSample() { + if ((_repCount == -1) || (--_repCount > 0)) { + _offset = 0; + _offsetFrac = 0; + _end = false; + _playingSound = 1; + } else { + _end = true; + _playingSound = 0; + } +} + +int SoundMixer::readBuffer(int16 *buffer, const int numSamples) { + Common::StackLock slock(_mutex); + + for (int i = 0; i < numSamples; i++) { + if (!_data) + return i; + if (_end || (_offset >= _length)) + checkEndSample(); + if (_end) + return i; + + // Linear interpolation. See sound/rate.cpp + + int16 val = (_last + (((_cur - _last) * _offsetFrac + + FRAC_HALF) >> FRAC_BITS)) << 8; + *buffer++ = (val * _fadeVol) >> 16; + + _offsetFrac += _offsetInc; + + // Was there an integral change? + if (fracToInt(_offsetFrac) > 0) { + _last = _cur; + _cur = _data[_offset]; + _offset += fracToInt(_offsetFrac); + _offsetFrac &= FRAC_LO_MASK; + } + + if (_fade) { + + if (++_curFadeSamples >= _fadeSamples) + endFade(); + else + _fadeVol -= _fadeVolStep; + + if (_fadeVol < 0) + _fadeVol = 0; + + } + } + return numSamples; +} + +void SoundMixer::endFade() { + if (_fadeVolStep > 0) { + _data = 0; + _end = true; + _playingSound = 0; + } else { + _fadeVol = 65536; + _fade = false; + } +} + +} // End of namespace Gob diff --git a/engines/gob/sound/soundmixer.h b/engines/gob/sound/soundmixer.h new file mode 100644 index 0000000000..e22cd7b473 --- /dev/null +++ b/engines/gob/sound/soundmixer.h @@ -0,0 +1,95 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef GOB_SOUND_SOUNDMIXER_H +#define GOB_SOUND_SOUNDMIXER_H + +#include "common/mutex.h" +#include "common/frac.h" +#include "sound/audiostream.h" +#include "sound/mixer.h" + +#include "gob/sound/sounddesc.h" + +namespace Gob { + +class SoundMixer : public Audio::AudioStream { +public: + SoundMixer(Audio::Mixer &mixer); + ~SoundMixer(); + + virtual void play(SoundDesc &sndDesc, int16 repCount, + int16 frequency, int16 fadeLength = 0); + virtual void stop(int16 fadeLength); + + bool isPlaying() const; + char getPlayingSound() const; + + void setRepeating(int32 repCount); + + int readBuffer(int16 *buffer, const int numSamples); + bool isStereo() const { return false; } + bool endOfData() const { return _end; } + bool endOfStream() const { return false; } + int getRate() const { return _rate; } + +protected: + Audio::Mixer *_mixer; + + Audio::SoundHandle _handle; + Common::Mutex _mutex; + + bool _end; + int8 *_data; + uint32 _length; + uint32 _rate; + int32 _freq; + int32 _repCount; + + uint32 _offset; + frac_t _offsetFrac; + frac_t _offsetInc; + + int16 _cur; + int16 _last; + + bool _fade; + int32 _fadeVol; + int32 _fadeVolStep; + uint8 _fadeLength; + uint32 _fadeSamples; + uint32 _curFadeSamples; + + char _playingSound; + + virtual void setSample(SoundDesc &sndDesc, int16 repCount, + int16 frequency, int16 fadeLength); + virtual void checkEndSample(); + virtual void endFade(); +}; + +} // End of namespace Gob + +#endif // GOB_SOUND_SOUNDMIXER_H -- cgit v1.2.3 From e2e2af4ff5f66ffce70f8ac389112778eb9b142e Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Thu, 8 May 2008 02:46:12 +0000 Subject: Reverted commit 31928 by Buddha_, and defined kFlagsAll as 0xFFFFFFFFU in the enum, as suggested by Fingolfin. svn-id: r31939 --- engines/parallaction/objects.h | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/engines/parallaction/objects.h b/engines/parallaction/objects.h index 5b33799985..da9eaac95f 100644 --- a/engines/parallaction/objects.h +++ b/engines/parallaction/objects.h @@ -94,6 +94,8 @@ enum ZoneFlags { enum CommandFlags { + kFlagsAll = 0xFFFFFFFFU, + kFlagsVisited = 1, kFlagsExit = 0x10000000, kFlagsEnter = 0x20000000, @@ -102,13 +104,6 @@ enum CommandFlags { // BRA specific kFlagsTestTrue = 2 }; -// This was moved here from inside the enum CommandFlags above because at -// least MSVC8 uses a signed int for representing enumerations and kFlagsAll -// uses an unsigned int value that can't be represented directly with a signed -// int (It's represented as -1 instead of 0xFFFFFFFF). Casting the enum values -// to unsigned ints when needed would've been another way to fix this. -const uint32 kFlagsAll = 0xFFFFFFFF; - struct CommandData { -- cgit v1.2.3 From 500237d8ed505823d415969c58ee56ce30c3782f Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Thu, 8 May 2008 04:48:55 +0000 Subject: GCC says these are ints, not long ints. Adjust the format strings accordingly. svn-id: r31940 --- engines/gob/inter_v4.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp index 6ed05af690..e2b57797e0 100644 --- a/engines/gob/inter_v4.cpp +++ b/engines/gob/inter_v4.cpp @@ -640,7 +640,7 @@ void Inter_v4::setupOpcodes() { } void Inter_v4::executeDrawOpcode(byte i) { - debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%X] (%s) - %s, %ld", + debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%X] (%s) - %s, %d", i, i, getOpcodeDrawDesc(i), _vm->_game->_curTotFile, _vm->_global->_inter_execPtr - _vm->_game->_totFileData); @@ -653,7 +653,7 @@ void Inter_v4::executeDrawOpcode(byte i) { } bool Inter_v4::executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms) { - debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%X.0x%X] (%s) - %s, %ld", + debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%X.0x%X] (%s) - %s, %d", i, j, i, j, getOpcodeFuncDesc(i, j), _vm->_game->_curTotFile, _vm->_global->_inter_execPtr - _vm->_game->_totFileData); @@ -673,7 +673,7 @@ bool Inter_v4::executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms) { } void Inter_v4::executeGoblinOpcode(int i, OpGobParams ¶ms) { - debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%X] (%s) - %s, %ld", + debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%X] (%s) - %s, %d", i, i, getOpcodeGoblinDesc(i), _vm->_game->_curTotFile, _vm->_global->_inter_execPtr - _vm->_game->_totFileData); -- cgit v1.2.3 From 89e0c0b315702ce51c74c068adf294ad275287cc Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Thu, 8 May 2008 05:05:47 +0000 Subject: Since BASS treats speech separately from other sounds, let's use the speech_volume setting for that, as suggested on the forum. svn-id: r31941 --- engines/sky/sky.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/sky/sky.cpp b/engines/sky/sky.cpp index e53458e33a..d87ed06fef 100644 --- a/engines/sky/sky.cpp +++ b/engines/sky/sky.cpp @@ -435,6 +435,7 @@ int SkyEngine::init() { SkyEngine::_systemVars.systemFlags |= SF_MUS_OFF; } _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); _floppyIntro = ConfMan.getBool("alt_intro"); -- cgit v1.2.3 From 21d9742a3813782070a89a0363ce14601f935887 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Thu, 8 May 2008 08:17:06 +0000 Subject: Update Gob MSVC project files. svn-id: r31942 --- dists/msvc7/gob.vcproj | 50 ++++++++++++++++++++++++++++++-------- dists/msvc71/gob.vcproj | 50 ++++++++++++++++++++++++++++++-------- dists/msvc8/gob.vcproj | 64 +++++++++++++++++++++++++++++++++++++++---------- dists/msvc9/gob.vcproj | 64 +++++++++++++++++++++++++++++++++++++++---------- 4 files changed, 184 insertions(+), 44 deletions(-) diff --git a/dists/msvc7/gob.vcproj b/dists/msvc7/gob.vcproj index a8c856ce17..7e54a60771 100644 --- a/dists/msvc7/gob.vcproj +++ b/dists/msvc7/gob.vcproj @@ -97,10 +97,16 @@ + RelativePath="..\..\engines\gob\sound\adlib.cpp"> + RelativePath="..\..\engines\gob\sound\adlib.h"> + + + + @@ -180,6 +186,12 @@ + + + + @@ -243,12 +255,6 @@ - - - - @@ -267,6 +273,12 @@ + + + + @@ -292,10 +304,28 @@ RelativePath="..\..\engines\gob\scenery_v2.cpp"> + RelativePath="..\..\engines\gob\sound\sound.cpp"> + + + + + + + + + + + + + RelativePath="..\..\engines\gob\sound\soundmixer.h"> diff --git a/dists/msvc71/gob.vcproj b/dists/msvc71/gob.vcproj index ac8960b28c..b084ecf24c 100644 --- a/dists/msvc71/gob.vcproj +++ b/dists/msvc71/gob.vcproj @@ -111,10 +111,16 @@ + RelativePath="..\..\engines\gob\sound\adlib.cpp"> + RelativePath="..\..\engines\gob\sound\adlib.h"> + + + + @@ -194,6 +200,12 @@ + + + + @@ -257,12 +269,6 @@ - - - - @@ -281,6 +287,12 @@ + + + + @@ -306,10 +318,28 @@ RelativePath="..\..\engines\gob\scenery_v2.cpp"> + RelativePath="..\..\engines\gob\sound\sound.cpp"> + + + + + + + + + + + + + RelativePath="..\..\engines\gob\sound\soundmixer.h"> diff --git a/dists/msvc8/gob.vcproj b/dists/msvc8/gob.vcproj index 04858f540e..3a6f09cdfa 100644 --- a/dists/msvc8/gob.vcproj +++ b/dists/msvc8/gob.vcproj @@ -161,11 +161,19 @@ + + + + + + + + @@ -356,14 +372,6 @@ RelativePath="..\..\engines\gob\mult_v2.cpp" > - - - - @@ -388,6 +396,14 @@ RelativePath="..\..\engines\gob\parse_v2.cpp" > + + + + @@ -421,11 +437,35 @@ > + + + + + + + + + + + + + + + + + + + + @@ -357,14 +373,6 @@ RelativePath="..\..\engines\gob\mult_v2.cpp" > - - - - @@ -389,6 +397,14 @@ RelativePath="..\..\engines\gob\parse_v2.cpp" > + + + + @@ -422,11 +438,35 @@ > + + + + + + + + + + + + ports.mk svn-id: r31943 --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index b12ac83ce4..4da5c439cc 100644 --- a/README +++ b/README @@ -1793,7 +1793,7 @@ messages (see http://www.sysinternals.com/ntw2k/freeware/debugview.shtml). * To get a version you can run from Finder, type 'make bundle' which will create ScummVM.app (this only works out of the box if you installed SDL into /sw (as happens if you are using Fink). If you - have installed SDL in another way, you will have to edit the Makefile). + have installed SDL in another way, you will have to edit ports.mk). * For more information refer to: http://wiki.scummvm.org/index.php/Compiling_ScummVM/MacOS_X_Crosscompiling -- cgit v1.2.3 From b63ae7dee4ae461f204f23641360a6aef1c2c304 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Thu, 8 May 2008 11:17:38 +0000 Subject: Possibly fixed the sound stuttering in the PMV videos and added frame skipping based on the Gob engine's IMD/VMD player. svn-id: r31944 --- engines/made/pmvplayer.cpp | 33 ++++++++++++++++++++++++--------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index b3f9915b92..6058854354 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -54,8 +54,8 @@ void PmvPlayer::play(const char *filename) { _fd->skip(10); uint soundFreq = _fd->readUint16LE(); // FIXME: weird frequencies... (11127 or 22254) - //if (soundFreq == 11127) soundFreq = 11025; - //if (soundFreq == 22254) soundFreq = 22050; + if (soundFreq == 11127) soundFreq = 11025; + if (soundFreq == 22254) soundFreq = 22050; int unk; @@ -78,6 +78,8 @@ void PmvPlayer::play(const char *filename) { uint32 palSize = 0; byte *frameData, *audioData, *soundData, *palData, *imageData; bool firstTime = true; + + uint32 soundStartTime, skipFrames; uint32 frameNum; uint16 width, height, cmdOffs, pixelOffs, maskOffs, lineSize; @@ -89,6 +91,8 @@ void PmvPlayer::play(const char *filename) { while (!_abort && !_fd->eof()) { + int32 frameTime = _vm->_system->getMillis(); + readChunk(chunkType, chunkSize); if (_fd->eof()) @@ -104,7 +108,7 @@ void PmvPlayer::play(const char *filename) { if (chunkCount > 50) break; // FIXME: this is a hack - debug(2, "chunkCount = %d; chunkSize = %d\n", chunkCount, chunkSize); + debug(1, "chunkCount = %d; chunkSize = %d; total = %d\n", chunkCount, chunkSize, chunkCount * chunkSize); soundSize = chunkCount * chunkSize; soundData = new byte[soundSize]; @@ -117,6 +121,7 @@ void PmvPlayer::play(const char *filename) { palData = frameData + palChunkOfs - 8; palSize = READ_LE_UINT32(palData + 4); decompressPalette(palData + 8, _paletteRGB, palSize); + _vm->_screen->setRGBPalette(_paletteRGB); } // Handle video @@ -142,20 +147,30 @@ void PmvPlayer::play(const char *filename) { if (firstTime) { _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, _audioStream); + soundStartTime = g_system->getMillis(); + skipFrames = 0; firstTime = false; } - _vm->_screen->setRGBPalette(_paletteRGB); handleEvents(); updateScreen(); - frameCount++; - delete[] frameData; - while (_mixer->getSoundElapsedTime(_audioStreamHandle) < frameCount * frameDelay) { - _vm->_system->delayMillis(10); - } + if (skipFrames == 0) { + int32 waitTime = (frameCount * frameDelay) - + (g_system->getMillis() - soundStartTime) - (_vm->_system->getMillis() - frameTime); + + if (waitTime < 0) { + skipFrames = -waitTime / frameDelay; + warning("Video A/V sync broken, skipping %d frame(s)", skipFrames + 1); + } else if (waitTime > 0) + g_system->delayMillis(waitTime); + + } else + skipFrames--; + + frameCount++; } -- cgit v1.2.3 From 29c79704fa9a6512ae663daa79e83b466e66bce5 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 8 May 2008 11:24:39 +0000 Subject: Fixed warning on 64bit systems introduced with r31940. svn-id: r31945 --- engines/gob/inter_v4.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp index e2b57797e0..cbda4d6726 100644 --- a/engines/gob/inter_v4.cpp +++ b/engines/gob/inter_v4.cpp @@ -642,7 +642,7 @@ void Inter_v4::setupOpcodes() { void Inter_v4::executeDrawOpcode(byte i) { debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%X] (%s) - %s, %d", i, i, getOpcodeDrawDesc(i), - _vm->_game->_curTotFile, _vm->_global->_inter_execPtr - _vm->_game->_totFileData); + _vm->_game->_curTotFile, uint(_vm->_global->_inter_execPtr - _vm->_game->_totFileData)); OpcodeDrawProcV4 op = _opcodesDrawV4[i].proc; @@ -655,7 +655,7 @@ void Inter_v4::executeDrawOpcode(byte i) { bool Inter_v4::executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms) { debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%X.0x%X] (%s) - %s, %d", i, j, i, j, getOpcodeFuncDesc(i, j), - _vm->_game->_curTotFile, _vm->_global->_inter_execPtr - _vm->_game->_totFileData); + _vm->_game->_curTotFile, uint(_vm->_global->_inter_execPtr - _vm->_game->_totFileData)); if ((i > 4) || (j > 15)) { warning("unimplemented opcodeFunc: %d.%d", i, j); @@ -675,7 +675,7 @@ bool Inter_v4::executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms) { void Inter_v4::executeGoblinOpcode(int i, OpGobParams ¶ms) { debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%X] (%s) - %s, %d", i, i, getOpcodeGoblinDesc(i), - _vm->_game->_curTotFile, _vm->_global->_inter_execPtr - _vm->_game->_totFileData); + _vm->_game->_curTotFile, uint(_vm->_global->_inter_execPtr - _vm->_game->_totFileData)); OpcodeGoblinProcV4 op = NULL; -- cgit v1.2.3 From b4e943382097ebe6d0fc7a2eb9d89b644187a81d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 8 May 2008 12:20:08 +0000 Subject: Silenced MSVC warnings about uninitialized variables svn-id: r31946 --- engines/made/pmvplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index 6058854354..db56235a67 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -79,7 +79,7 @@ void PmvPlayer::play(const char *filename) { byte *frameData, *audioData, *soundData, *palData, *imageData; bool firstTime = true; - uint32 soundStartTime, skipFrames; + uint32 soundStartTime = 0, skipFrames = 0; uint32 frameNum; uint16 width, height, cmdOffs, pixelOffs, maskOffs, lineSize; -- cgit v1.2.3 From 4f108b76a3874a80e6c8a3b5c79c75d737e49ecb Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 8 May 2008 13:17:18 +0000 Subject: Reverted commit #31774 svn-id: r31947 --- engines/made/resource.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/made/resource.h b/engines/made/resource.h index be85561318..7dcae8f381 100644 --- a/engines/made/resource.h +++ b/engines/made/resource.h @@ -35,7 +35,7 @@ namespace Made { -const int kMaxResourceCacheCount = 200; +const int kMaxResourceCacheCount = 100; enum ResourceType { kResARCH = MKID_BE('ARCH'), -- cgit v1.2.3 From a9b4058ba9fd94de7bd293b0763d71f9f90f84bc Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 8 May 2008 13:23:02 +0000 Subject: Fixed some game crashes which occurred when ProjectReader::purgeCache() got called: - MIDI music data is marked to be deleted in o1_STOPMUS now, instead of o1_PLAYMUS. - Added a FIXME to Screen::setFont() - purgeCache crashes the game if the active font is deleted svn-id: r31948 --- engines/made/screen.cpp | 6 ++++-- engines/made/scriptfuncs.h | 4 +++- engines/made/scriptfuncs_lgop2.cpp | 10 ++++++---- engines/made/scriptfuncs_mhne.cpp | 10 ++++++---- engines/made/scriptfuncs_rtz.cpp | 10 ++++++---- 5 files changed, 25 insertions(+), 15 deletions(-) diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index c88244a8a2..f2888cada7 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -599,8 +599,10 @@ void Screen::flash(int flashCount) { void Screen::setFont(int16 fontNum) { if (fontNum == _currentFontNum) return; - if (_font) - _vm->_res->freeResource(_font); + // FIXME: this causes crashes when + // ProjectReader::purgeCache() is called + //if (_font) + // _vm->_res->freeResource(_font); _font = _vm->_res->getFont(fontNum); _currentFontNum = fontNum; } diff --git a/engines/made/scriptfuncs.h b/engines/made/scriptfuncs.h index 14645c6d1b..5f1a73d940 100644 --- a/engines/made/scriptfuncs.h +++ b/engines/made/scriptfuncs.h @@ -31,6 +31,8 @@ #include "common/func.h" #include "common/stream.h" +#include "made/resource.h" + namespace Made { class MadeEngine; @@ -60,7 +62,7 @@ protected: Common::Array _externalFuncs; Common::Array _externalFuncNames; - + GenericResource *_xmidiRes; }; class ScriptFunctionsLgop2 : public ScriptFunctions { diff --git a/engines/made/scriptfuncs_lgop2.cpp b/engines/made/scriptfuncs_lgop2.cpp index 2a78bd0e2c..d6589d791d 100644 --- a/engines/made/scriptfuncs_lgop2.cpp +++ b/engines/made/scriptfuncs_lgop2.cpp @@ -233,16 +233,18 @@ int16 ScriptFunctionsLgop2::o1_PLAYMUS(int16 argc, int16 *argv) { int16 musicNum = argv[0]; if (musicNum > 0) { - GenericResource *midi = _vm->_res->getMidi(musicNum); - _vm->_music->playSMF(midi); - _vm->_res->freeResource(midi); + _xmidiRes = _vm->_res->getXmidi(musicNum); + _vm->_music->playXMIDI(_xmidiRes); } */ return 0; } int16 ScriptFunctionsLgop2::o1_STOPMUS(int16 argc, int16 *argv) { - _vm->_music->stop(); + if (_vm->_music->isPlaying()) { + _vm->_music->stop(); + _vm->_res->freeResource(_xmidiRes); + } return 0; } diff --git a/engines/made/scriptfuncs_mhne.cpp b/engines/made/scriptfuncs_mhne.cpp index 4c942edec2..748bce3918 100644 --- a/engines/made/scriptfuncs_mhne.cpp +++ b/engines/made/scriptfuncs_mhne.cpp @@ -233,15 +233,17 @@ int16 ScriptFunctionsMhne::o1_PLAYSND(int16 argc, int16 *argv) { int16 ScriptFunctionsMhne::o1_PLAYMUS(int16 argc, int16 *argv) { int16 musicNum = argv[0]; if (musicNum > 0) { - GenericResource *xmidi = _vm->_res->getXmidi(musicNum); - _vm->_music->playXMIDI(xmidi); - _vm->_res->freeResource(xmidi); + _xmidiRes = _vm->_res->getXmidi(musicNum); + _vm->_music->playXMIDI(_xmidiRes); } return 0; } int16 ScriptFunctionsMhne::o1_STOPMUS(int16 argc, int16 *argv) { - _vm->_music->stop(); + if (_vm->_music->isPlaying()) { + _vm->_music->stop(); + _vm->_res->freeResource(_xmidiRes); + } return 0; } diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp index 8f173dfa57..0cf32d4753 100644 --- a/engines/made/scriptfuncs_rtz.cpp +++ b/engines/made/scriptfuncs_rtz.cpp @@ -276,15 +276,17 @@ int16 ScriptFunctionsRtz::o1_PLAYSND(int16 argc, int16 *argv) { int16 ScriptFunctionsRtz::o1_PLAYMUS(int16 argc, int16 *argv) { int16 musicNum = argv[0]; if (musicNum > 0) { - GenericResource *xmidi = _vm->_res->getXmidi(musicNum); - _vm->_music->playXMIDI(xmidi); - _vm->_res->freeResource(xmidi); + _xmidiRes = _vm->_res->getXmidi(musicNum); + _vm->_music->playXMIDI(_xmidiRes); } return 0; } int16 ScriptFunctionsRtz::o1_STOPMUS(int16 argc, int16 *argv) { - _vm->_music->stop(); + if (_vm->_music->isPlaying()) { + _vm->_music->stop(); + _vm->_res->freeResource(_xmidiRes); + } return 0; } -- cgit v1.2.3 From 18db41db506b1e18e050e8dded44dc8501b9bc8f Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 8 May 2008 15:51:02 +0000 Subject: Implemented the background "music" / atmospheric sounds in Woodruff svn-id: r31949 --- engines/gob/coktelvideo.cpp | 7 +++ engines/gob/coktelvideo.h | 5 ++ engines/gob/inter_v4.cpp | 13 ++-- engines/gob/module.mk | 3 +- engines/gob/sound/bgatmosphere.cpp | 126 +++++++++++++++++++++++++++++++++++++ engines/gob/sound/bgatmosphere.h | 75 ++++++++++++++++++++++ engines/gob/sound/sound.cpp | 64 ++++++++++++++++++- engines/gob/sound/sound.h | 14 ++++- engines/gob/sound/soundblaster.cpp | 2 +- engines/gob/videoplayer.cpp | 23 ++++++- engines/gob/videoplayer.h | 1 + 11 files changed, 324 insertions(+), 9 deletions(-) create mode 100644 engines/gob/sound/bgatmosphere.cpp create mode 100644 engines/gob/sound/bgatmosphere.h diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp index d508dc75f9..c3625574d0 100644 --- a/engines/gob/coktelvideo.cpp +++ b/engines/gob/coktelvideo.cpp @@ -270,6 +270,13 @@ void Imd::disableSound() { _mixer = 0; } +bool Imd::isSoundPlaying() const { + if (_audioStream && _mixer->isSoundHandleActive(_audioHandle)) + return true; + + return false; +} + void Imd::seekFrame(int32 frame, int16 whence, bool restart) { if (!_stream) // Nothing to do diff --git a/engines/gob/coktelvideo.h b/engines/gob/coktelvideo.h index 4f9543e8d0..581ac2ae81 100644 --- a/engines/gob/coktelvideo.h +++ b/engines/gob/coktelvideo.h @@ -139,6 +139,9 @@ public: /** Don't play sound or stop currently playing sound. */ virtual void disableSound() = 0; + /** Is sound currently playing? */ + virtual bool isSoundPlaying() const = 0; + /** Seek to a specific frame. * * @param frame The frame to which to seek. @@ -203,6 +206,8 @@ public: void enableSound(Audio::Mixer &mixer); void disableSound(); + bool isSoundPlaying() const; + void seekFrame(int32 frame, int16 whence = SEEK_SET, bool restart = false); State nextFrame(); diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp index cbda4d6726..76b11752e0 100644 --- a/engines/gob/inter_v4.cpp +++ b/engines/gob/inter_v4.cpp @@ -32,6 +32,7 @@ #include "gob/game.h" #include "gob/parse.h" #include "gob/videoplayer.h" +#include "gob/sound/sound.h" namespace Gob { @@ -742,7 +743,7 @@ void Inter_v4::o4_playVmdOrMusic() { if (lastFrame == -1) { close = true; } else if (lastFrame == -3) { - warning("Woodruff Stub: Video/Music command -3: Play background video %s, %d, %d, %d, %d", fileName, startFrame, x, y, VAR_OFFSET(7872)); +// warning("Woodruff Stub: Video/Music command -3: Play background video %s, %d, %d, %d, %d", fileName, startFrame, x, y, VAR_OFFSET(7872)); _vm->_mult->_objects[startFrame].pAnimData->animation = -startFrame - 1; @@ -766,16 +767,20 @@ void Inter_v4::o4_playVmdOrMusic() { warning("Woodruff Stub: Video/Music command -4: Play background video %s", fileName); return; } else if (lastFrame == -5) { - warning("Woodruff Stub: Video/Music command -5: Stop background music"); +// warning("Woodruff Stub: Video/Music command -5: Stop background music"); + _vm->_sound->bgStop(); return; } else if (lastFrame == -6) { - warning("Woodruff Stub: Video/Music command -6: Load background video %s", fileName); +// warning("Woodruff Stub: Video/Music command -6: Load background video %s", fileName); return; } else if (lastFrame == -8) { warning("Woodruff Stub: Video/Music command -8: Play background video %s", fileName); return; } else if (lastFrame == -9) { - warning("Woodruff Stub: Video/Music command -9: Play background music %s (%d-%d)", fileName, palEnd, palStart); +// warning("Woodruff Stub: Video/Music command -9: Play background music %s (%d-%d)", fileName, palEnd, palStart); + _vm->_sound->bgStop(); + _vm->_sound->bgSetPlayMode(BackgroundAtmosphere::kPlayModeRandom); + _vm->_sound->bgPlay(fileName, palStart); return; } else if (lastFrame < 0) { warning("Unknown Video/Music command: %d, %s", lastFrame, fileName); diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 9f407daee5..09664f15b4 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -58,7 +58,8 @@ MODULE_OBJS := \ sound/infogrames.o \ sound/soundmixer.o \ sound/soundblaster.o \ - sound/cdrom.o + sound/cdrom.o \ + sound/bgatmosphere.o # This module can be built as a plugin ifeq ($(ENABLE_GOB), DYNAMIC_PLUGIN) diff --git a/engines/gob/sound/bgatmosphere.cpp b/engines/gob/sound/bgatmosphere.cpp new file mode 100644 index 0000000000..3c61f4f76a --- /dev/null +++ b/engines/gob/sound/bgatmosphere.cpp @@ -0,0 +1,126 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/system.h" +#include "common/events.h" + +#include "gob/sound/bgatmosphere.h" + +namespace Gob { + +BackgroundAtmosphere::BackgroundAtmosphere(Audio::Mixer &mixer) : SoundMixer(mixer) { + _playMode = kPlayModeLinear; + _queuePos = -1; + _shaded = false; + + g_system->getEventManager()->registerRandomSource(_rnd, "gobBA"); +} + +BackgroundAtmosphere::~BackgroundAtmosphere() { + queueClear(); +} + +void BackgroundAtmosphere::play() { + Common::StackLock slock(_mutex); + + _queuePos = -1; + getNextQueuePos(); + + if (_queuePos == -1) + return; + + SoundMixer::play(*_queue[_queuePos], 1, 0); +} + +void BackgroundAtmosphere::stop() { + SoundMixer::stop(0); +} + +void BackgroundAtmosphere::setPlayMode(PlayMode mode) { + _playMode = mode; +} + +void BackgroundAtmosphere::queueSample(SoundDesc &sndDesc) { + Common::StackLock slock(_mutex); + + _queue.push_back(&sndDesc); +} + +void BackgroundAtmosphere::queueClear() { + Common::StackLock slock(_mutex); + + SoundMixer::stop(0); + for (uint i = 0; i < _queue.size(); i++) + delete _queue[i]; + + _queue.clear(); + _queuePos = -1; +} + +void BackgroundAtmosphere::checkEndSample() { + Common::StackLock slock(_mutex); + + getNextQueuePos(); + + if (_queuePos == -1) { + _end = true; + _playingSound = 0; + } else { + SoundMixer::setSample(*_queue[_queuePos], 1, 0, 0); + if (_shaded) + _fadeVol = 20000; + } +} + +void BackgroundAtmosphere::getNextQueuePos() { + if (_queue.size() == 0) { + _queuePos = -1; + return; + } + + switch (_playMode) { + + case kPlayModeLinear: + _queuePos = (_queuePos + 1) % _queue.size(); + break; + + case kPlayModeRandom: + _queuePos = _rnd.getRandomNumber(_queue.size() - 1); + break; + + } +} + +void BackgroundAtmosphere::shade() { + _shaded = true; + _fadeVol = 32768; +} + +void BackgroundAtmosphere::unshade() { + _shaded = false; + _fadeVol = 65536; +} + +} // End of namespace Gob diff --git a/engines/gob/sound/bgatmosphere.h b/engines/gob/sound/bgatmosphere.h new file mode 100644 index 0000000000..72b5614282 --- /dev/null +++ b/engines/gob/sound/bgatmosphere.h @@ -0,0 +1,75 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef GOB_SOUND_BGATMOSPHERE_H +#define GOB_SOUND_BGATMOSPHERE_H + +#include "sound/mixer.h" +#include "common/mutex.h" + +#include "gob/sound/sounddesc.h" +#include "gob/sound/soundmixer.h" + +namespace Gob { + +class BackgroundAtmosphere : private SoundMixer { +public: + enum PlayMode { + kPlayModeLinear, + kPlayModeRandom + }; + + BackgroundAtmosphere(Audio::Mixer &mixer); + ~BackgroundAtmosphere(); + + void play(); + void stop(); + + void setPlayMode(PlayMode mode); + + void queueSample(SoundDesc &sndDesc); + void queueClear(); + + void shade(); + void unshade(); + +private: + PlayMode _playMode; + + Common::Array _queue; + int _queuePos; + bool _shaded; + + Common::Mutex _mutex; + + Common::RandomSource _rnd; + + void checkEndSample(); + void getNextQueuePos(); +}; + +} // End of namespace Gob + +#endif // GOB_SOUND_BGATMOSPHERE_H diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 5c375c260a..63b74ca36f 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -39,6 +39,7 @@ Sound::Sound(GobEngine *vm) : _vm(vm) { _adlib = 0; _infogrames = 0; _cdrom = 0; + _bgatmos = 0; if (!_vm->_noMusic && _vm->hasAdlib()) _adlib = new AdLib(*_vm->_mixer); @@ -46,6 +47,8 @@ Sound::Sound(GobEngine *vm) : _vm(vm) { _infogrames = new Infogrames(*_vm->_mixer); if (_vm->isCD()) _cdrom = new CDROM; + if (_vm->getGameType() == kGameTypeWoodruff) + _bgatmos = new BackgroundAtmosphere(*_vm->_mixer); } Sound::~Sound() { @@ -85,10 +88,18 @@ int Sound::sampleGetNextFreeSlot() const { return -1; } -bool Sound::sampleLoad(SoundDesc *sndDesc, const char *fileName) { +bool Sound::sampleLoad(SoundDesc *sndDesc, const char *fileName, bool tryExist) { if (!sndDesc) return false; + int16 handle = _vm->_dataIO->openData(fileName); + if (handle < 0) { + warning("Can't open sample file \"%s\"", fileName); + return false; + } + + _vm->_dataIO->closeData(handle); + byte *data; uint32 size; @@ -458,4 +469,55 @@ void Sound::cdTest(int trySubst, const char *label) { _cdrom->testCD(trySubst, label); } +void Sound::bgPlay(const char *base, int count) { + if (!_bgatmos) + return; + + _bgatmos->stop(); + _bgatmos->queueClear(); + + int length = strlen(base) + 7; + char *fileName = new char[length]; + SoundDesc *sndDesc; + + for (int i = 1; i <= count; i++) { + snprintf(fileName, length, "%s%02d.SND", base, i); + + sndDesc = new SoundDesc; + if (sampleLoad(sndDesc, fileName)) + _bgatmos->queueSample(*sndDesc); + } + + _bgatmos->play(); +} + +void Sound::bgStop() { + if (!_bgatmos) + return; + + _bgatmos->stop(); + _bgatmos->queueClear(); +} + +void Sound::bgSetPlayMode(BackgroundAtmosphere::PlayMode mode) { + if (!_bgatmos) + return; + + _bgatmos->setPlayMode(mode); +} + +void Sound::bgShade() { + if (!_bgatmos) + return; + + _bgatmos->shade(); +} + +void Sound::bgUnshade() { + if (!_bgatmos) + return; + + _bgatmos->unshade(); +} + } // End of namespace Gob diff --git a/engines/gob/sound/sound.h b/engines/gob/sound/sound.h index 81b48688c4..b59510e4bb 100644 --- a/engines/gob/sound/sound.h +++ b/engines/gob/sound/sound.h @@ -32,6 +32,7 @@ #include "gob/sound/adlib.h" #include "gob/sound/infogrames.h" #include "gob/sound/cdrom.h" +#include "gob/sound/bgatmosphere.h" namespace Gob { @@ -49,7 +50,7 @@ public: const SoundDesc *sampleGetBySlot(int slot) const; int sampleGetNextFreeSlot() const; - bool sampleLoad(SoundDesc *sndDesc, const char *fileName); + bool sampleLoad(SoundDesc *sndDesc, const char *fileName, bool tryExist = true); void sampleFree(SoundDesc *sndDesc, bool noteAdlib = false, int index = -1); @@ -118,6 +119,16 @@ public: void cdTest(int trySubst, const char *label); + + // Background Atmosphere + void bgPlay(const char *base, int count); + void bgStop(); + + void bgSetPlayMode(BackgroundAtmosphere::PlayMode mode); + + void bgShade(); + void bgUnshade(); + private: GobEngine *_vm; @@ -128,6 +139,7 @@ private: AdLib *_adlib; Infogrames *_infogrames; CDROM *_cdrom; + BackgroundAtmosphere *_bgatmos; }; } // End of namespace Gob diff --git a/engines/gob/sound/soundblaster.cpp b/engines/gob/sound/soundblaster.cpp index bacb16a6d3..cfa11b6ff9 100644 --- a/engines/gob/sound/soundblaster.cpp +++ b/engines/gob/sound/soundblaster.cpp @@ -23,7 +23,7 @@ * */ -#include "gob/sound/sound.h" +#include "gob/sound/soundblaster.h" namespace Gob { diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index 6b21c18676..c435136b75 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -33,6 +33,7 @@ #include "gob/palanim.h" #include "gob/inter.h" #include "gob/map.h" +#include "gob/sound/sound.h" namespace Gob { @@ -289,6 +290,8 @@ void VideoPlayer::primaryPlay(int16 startFrame, int16 lastFrame, int16 breakKey, if (doPlay(startFrame, breakKey, palCmd, palStart, palEnd, palFrame, endFrame)) break; + evalBgShading(video); + if (fade) { _vm->_palAnim->fade(_vm->_global->_pPaletteDesc, -2, 0); fade = false; @@ -299,18 +302,27 @@ void VideoPlayer::primaryPlay(int16 startFrame, int16 lastFrame, int16 breakKey, startFrame++; } + evalBgShading(video); + if (reverseTo >= 0) { int16 toFrame = video.getFramesCount() - reverseTo; for (int i = video.getCurrentFrame(); i >= toFrame; i--) { video.seekFrame(i, SEEK_SET, true); - if (doPlay(i, breakKey, 0, 0, 0, 0, 0)) { + + bool b = doPlay(i, breakKey, 0, 0, 0, 0, 0); + evalBgShading(video); + + if (b) { _vm->_palAnim->fade(0, -2, 0); memset((char *) _vm->_draw->_vgaPalette, 0, 768); } + if (!_noCursorSwitch) video.waitEndFrame(); } } + + evalBgShading(video); } void VideoPlayer::primaryClose() { @@ -360,6 +372,8 @@ void VideoPlayer::slotPlay(int slot, int16 frame) { _videoSlots[slot]->nextFrame(); WRITE_VAR(11, frame); + + evalBgShading(video); } void VideoPlayer::slotClose(int slot) { @@ -598,4 +612,11 @@ void VideoPlayer::writeVideoInfo(const char *videoFile, int16 varX, int16 varY, } } +void VideoPlayer::evalBgShading(CoktelVideo &video) { + if (video.isSoundPlaying()) + _vm->_sound->bgShade(); + else + _vm->_sound->bgUnshade(); +} + } // End of namespace Gob diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index a04a0dbc9d..29531f7ce2 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -132,6 +132,7 @@ private: bool doPlay(int16 frame, int16 breakKey, uint16 palCmd, int16 palStart, int16 palEnd, int16 palFrame, int16 endFrame); + void evalBgShading(CoktelVideo &video); }; } // End of namespace Gob -- cgit v1.2.3 From cb9fd40a1b22072ed8d6d0c81e7cf76d4ea3e4ec Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 8 May 2008 16:15:14 +0000 Subject: Declaring BackgroundAtmosphere as kMusicSoundType svn-id: r31950 --- engines/gob/sound/bgatmosphere.cpp | 4 +++- engines/gob/sound/soundblaster.cpp | 2 +- engines/gob/sound/soundmixer.cpp | 5 ++--- engines/gob/sound/soundmixer.h | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/engines/gob/sound/bgatmosphere.cpp b/engines/gob/sound/bgatmosphere.cpp index 3c61f4f76a..f5a7fe0fdb 100644 --- a/engines/gob/sound/bgatmosphere.cpp +++ b/engines/gob/sound/bgatmosphere.cpp @@ -30,7 +30,9 @@ namespace Gob { -BackgroundAtmosphere::BackgroundAtmosphere(Audio::Mixer &mixer) : SoundMixer(mixer) { +BackgroundAtmosphere::BackgroundAtmosphere(Audio::Mixer &mixer) : + SoundMixer(mixer, Audio::Mixer::kMusicSoundType) { + _playMode = kPlayModeLinear; _queuePos = -1; _shaded = false; diff --git a/engines/gob/sound/soundblaster.cpp b/engines/gob/sound/soundblaster.cpp index cfa11b6ff9..eeedfaa3cb 100644 --- a/engines/gob/sound/soundblaster.cpp +++ b/engines/gob/sound/soundblaster.cpp @@ -27,7 +27,7 @@ namespace Gob { -SoundBlaster::SoundBlaster(Audio::Mixer &mixer) : SoundMixer(mixer) { +SoundBlaster::SoundBlaster(Audio::Mixer &mixer) : SoundMixer(mixer, Audio::Mixer::kSFXSoundType) { _curSoundDesc = 0; _compositionSamples = 0; diff --git a/engines/gob/sound/soundmixer.cpp b/engines/gob/sound/soundmixer.cpp index f85073ad61..1a287d782f 100644 --- a/engines/gob/sound/soundmixer.cpp +++ b/engines/gob/sound/soundmixer.cpp @@ -27,7 +27,7 @@ namespace Gob { -SoundMixer::SoundMixer(Audio::Mixer &mixer) : _mixer(&mixer) { +SoundMixer::SoundMixer(Audio::Mixer &mixer, Audio::Mixer::SoundType type) : _mixer(&mixer) { _playingSound = 0; _rate = _mixer->getOutputRate(); @@ -50,8 +50,7 @@ SoundMixer::SoundMixer(Audio::Mixer &mixer) : _mixer(&mixer) { _fadeSamples = 0; _curFadeSamples = 0; - _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_handle, - this, -1, 255, 0, false, true); + _mixer->playInputStream(type, &_handle, this, -1, 255, 0, false, true); } SoundMixer::~SoundMixer() { diff --git a/engines/gob/sound/soundmixer.h b/engines/gob/sound/soundmixer.h index e22cd7b473..5789885a99 100644 --- a/engines/gob/sound/soundmixer.h +++ b/engines/gob/sound/soundmixer.h @@ -37,7 +37,7 @@ namespace Gob { class SoundMixer : public Audio::AudioStream { public: - SoundMixer(Audio::Mixer &mixer); + SoundMixer(Audio::Mixer &mixer, Audio::Mixer::SoundType type = Audio::Mixer::kPlainSoundType); ~SoundMixer(); virtual void play(SoundDesc &sndDesc, int16 repCount, -- cgit v1.2.3 From cb34952e034df6869489ba261845c2c83d48d5bf Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 8 May 2008 18:11:43 +0000 Subject: Updated the MSVC project files for the gob engine svn-id: r31951 --- dists/msvc7/gob.vcproj | 105 +++++++++++++++++++----------------- dists/msvc71/gob.vcproj | 105 +++++++++++++++++++----------------- dists/msvc8/gob.vcproj | 140 ++++++++++++++++++++++++++---------------------- dists/msvc9/gob.vcproj | 140 ++++++++++++++++++++++++++---------------------- 4 files changed, 266 insertions(+), 224 deletions(-) diff --git a/dists/msvc7/gob.vcproj b/dists/msvc7/gob.vcproj index 7e54a60771..c466b2b243 100644 --- a/dists/msvc7/gob.vcproj +++ b/dists/msvc7/gob.vcproj @@ -96,18 +96,63 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -186,12 +231,6 @@ - - - - @@ -273,12 +312,6 @@ - - - - @@ -303,30 +336,6 @@ - - - - - - - - - - - - - - - - diff --git a/dists/msvc71/gob.vcproj b/dists/msvc71/gob.vcproj index b084ecf24c..cb897cb655 100644 --- a/dists/msvc71/gob.vcproj +++ b/dists/msvc71/gob.vcproj @@ -110,18 +110,63 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -200,12 +245,6 @@ - - - - @@ -287,12 +326,6 @@ - - - - @@ -317,30 +350,6 @@ - - - - - - - - - - - - - - - - diff --git a/dists/msvc8/gob.vcproj b/dists/msvc8/gob.vcproj index 3a6f09cdfa..560e265eec 100644 --- a/dists/msvc8/gob.vcproj +++ b/dists/msvc8/gob.vcproj @@ -160,22 +160,82 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -280,14 +340,6 @@ RelativePath="..\..\engines\gob\goblin_v4.cpp" > - - - - @@ -396,14 +448,6 @@ RelativePath="..\..\engines\gob\parse_v2.cpp" > - - - - @@ -436,38 +480,6 @@ RelativePath="..\..\engines\gob\scenery_v2.cpp" > - - - - - - - - - - - - - - - - diff --git a/dists/msvc9/gob.vcproj b/dists/msvc9/gob.vcproj index 56f4d3bbff..cb17c9f9d1 100644 --- a/dists/msvc9/gob.vcproj +++ b/dists/msvc9/gob.vcproj @@ -161,22 +161,82 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -281,14 +341,6 @@ RelativePath="..\..\engines\gob\goblin_v4.cpp" > - - - - @@ -397,14 +449,6 @@ RelativePath="..\..\engines\gob\parse_v2.cpp" > - - - - @@ -437,38 +481,6 @@ RelativePath="..\..\engines\gob\scenery_v2.cpp" > - - - - - - - - - - - - - - - - -- cgit v1.2.3 From b1a8067d64cafb5f89a790c4a82066cb31fcbc74 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 8 May 2008 18:39:13 +0000 Subject: Reordering game parts deinitialization, to avoid having one part's destructor access an already destroyed part svn-id: r31952 --- engines/gob/gob.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 951f331cbe..ed2fe0fc15 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -382,12 +382,12 @@ bool GobEngine::initGameParts() { } void GobEngine::deinitGameParts() { + delete _saveLoad; _saveLoad = 0; delete _mult; _mult = 0; + delete _vidPlayer; _vidPlayer = 0; delete _game; _game = 0; delete _global; _global = 0; - delete _dataIO; _dataIO = 0; delete _goblin; _goblin = 0; - delete _vidPlayer; _vidPlayer = 0; delete _init; _init = 0; delete _inter; _inter = 0; delete _map; _map = 0; @@ -397,8 +397,8 @@ void GobEngine::deinitGameParts() { delete _draw; _draw = 0; delete _util; _util = 0; delete _video; _video = 0; - delete _saveLoad; _saveLoad = 0; delete _sound; _sound = 0; + delete _dataIO; _dataIO = 0; } } // End of namespace Gob -- cgit v1.2.3 From e6d6281c891c75bd0dfe16b6f9c7fb71e862e5e0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 8 May 2008 20:33:28 +0000 Subject: o1_ADDSPRITE is not implemented yet, so throw a warning svn-id: r31954 --- engines/made/scriptfuncs_lgop2.cpp | 1 + engines/made/scriptfuncs_mhne.cpp | 1 + engines/made/scriptfuncs_rtz.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/engines/made/scriptfuncs_lgop2.cpp b/engines/made/scriptfuncs_lgop2.cpp index d6589d791d..e563e57cac 100644 --- a/engines/made/scriptfuncs_lgop2.cpp +++ b/engines/made/scriptfuncs_lgop2.cpp @@ -308,6 +308,7 @@ int16 ScriptFunctionsLgop2::o1_SCREENLOCK(int16 argc, int16 *argv) { } int16 ScriptFunctionsLgop2::o1_ADDSPRITE(int16 argc, int16 *argv) { + warning("Unimplemented opcode: o1_ADDSPRITE"); //_vm->_screen->drawSprite(argv[2], argv[1], argv[0]); return argv[2]; } diff --git a/engines/made/scriptfuncs_mhne.cpp b/engines/made/scriptfuncs_mhne.cpp index 748bce3918..f8e02365b0 100644 --- a/engines/made/scriptfuncs_mhne.cpp +++ b/engines/made/scriptfuncs_mhne.cpp @@ -307,6 +307,7 @@ int16 ScriptFunctionsMhne::o1_SCREENLOCK(int16 argc, int16 *argv) { } int16 ScriptFunctionsMhne::o1_ADDSPRITE(int16 argc, int16 *argv) { + warning("Unimplemented opcode: o1_ADDSPRITE"); //_vm->_screen->drawSprite(argv[2], argv[1], argv[0]); return argv[2]; } diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp index 0cf32d4753..20a3af164c 100644 --- a/engines/made/scriptfuncs_rtz.cpp +++ b/engines/made/scriptfuncs_rtz.cpp @@ -350,6 +350,7 @@ int16 ScriptFunctionsRtz::o1_SCREENLOCK(int16 argc, int16 *argv) { } int16 ScriptFunctionsRtz::o1_ADDSPRITE(int16 argc, int16 *argv) { + warning("Unimplemented opcode: o1_ADDSPRITE"); //_vm->_screen->drawSprite(argv[2], argv[1], argv[0]); return 0;//argv[2]; } -- cgit v1.2.3 From e0689193efa852a4391c9afcf7581238b1c4a0d9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 8 May 2008 20:55:39 +0000 Subject: Fixed bug in o3_updateConversations. svn-id: r31955 --- engines/kyra/script_mr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp index 8746ec83d7..68f9a7812f 100644 --- a/engines/kyra/script_mr.cpp +++ b/engines/kyra/script_mr.cpp @@ -551,7 +551,7 @@ int KyraEngine_MR::o3_updateConversations(EMCState *script) { convs[0] = 0; convs[1] = 4; convs[2] = 0; - convs[4] = 1; + convs[3] = 1; break; case 10: -- cgit v1.2.3 From b53fe83695318a4e5545185a4fe7e7daa77f2bed Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 8 May 2008 21:23:14 +0000 Subject: Silenced some g++ 4.3 warnings. svn-id: r31956 --- engines/kyra/screen.cpp | 2 +- engines/kyra/sequences_v1.cpp | 2 +- engines/kyra/sound.h | 2 +- engines/kyra/sprites.cpp | 2 +- engines/kyra/text_hof.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 0f3d3f0259..6a6141b5c0 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -1933,7 +1933,7 @@ void Screen::convertAmigaGfx(uint8 *data, int w, int h, bool offscreen) { for (int y = 0; y < h; ++y) { for (int x = 0; x < w; ++x) { int bytePos = x/8+y*40; - int bitPos = 7-x&7; + int bitPos = 7-(x&7); byte colorIndex = 0; colorIndex |= (((tmp[bytePos + 8000 * 0] & (1 << bitPos)) >> bitPos) & 0x1) << 0; diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp index 75aa1b4518..607def3583 100644 --- a/engines/kyra/sequences_v1.cpp +++ b/engines/kyra/sequences_v1.cpp @@ -176,7 +176,7 @@ void KyraEngine_v1::seq_introLogos() { _screen->setScreenPalette(_screen->_currentPalette); } - if (_seq->playSequence(_seq_KyrandiaLogo, _skipFlag) && !seq_skipSequence() || _quitFlag) { + if ((_seq->playSequence(_seq_KyrandiaLogo, _skipFlag) && !seq_skipSequence()) || _quitFlag) { _screen->fadeToBlack(); _screen->clearPage(0); return; diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h index 85648f6b7e..4efe6779bd 100644 --- a/engines/kyra/sound.h +++ b/engines/kyra/sound.h @@ -192,7 +192,7 @@ public: protected: const char *fileListEntry(int file) const { return (_soundDataList != 0 && file >= 0 && file < _soundDataList->_fileListLen) ? _soundDataList->_fileList[file] : ""; } const void *cdaData() const { return _soundDataList != 0 ? _soundDataList->_cdaTracks : 0; } - const int cdaTrackNum() const { return _soundDataList != 0 ? _soundDataList->_cdaNumTracks : 0; } + int cdaTrackNum() const { return _soundDataList != 0 ? _soundDataList->_cdaNumTracks : 0; } enum { kNumChannelHandles = 4 diff --git a/engines/kyra/sprites.cpp b/engines/kyra/sprites.cpp index 4177f4cd7b..0ba9f456bf 100644 --- a/engines/kyra/sprites.cpp +++ b/engines/kyra/sprites.cpp @@ -140,7 +140,7 @@ void Sprites::updateSceneAnims() { uint16 sound; for (int i = 0; i < MAX_NUM_ANIMS; i++) { - if (_anims[i].script == 0 || !_anims[i].play || _anims[i].nextRun != 0 && _anims[i].nextRun > currTime) + if (_anims[i].script == 0 || !_anims[i].play || (_anims[i].nextRun != 0 && _anims[i].nextRun > currTime)) continue; data = _anims[i].curPos; diff --git a/engines/kyra/text_hof.cpp b/engines/kyra/text_hof.cpp index 3a0dab730c..0d40827390 100644 --- a/engines/kyra/text_hof.cpp +++ b/engines/kyra/text_hof.cpp @@ -649,7 +649,7 @@ void KyraEngine_HoF::npcChatSequence(const char *str, int objectId, int vocHigh, } while (((textEnabled() && _chatEndTime > _system->getMillis()) || (speechEnabled() && snd_voiceIsPlaying())) && !(_quitFlag || skipFlag())) { - if (!speechEnabled() && chatAnimEndTime > _system->getMillis() || speechEnabled() && snd_voiceIsPlaying()) { + if ((!speechEnabled() && chatAnimEndTime > _system->getMillis()) || (speechEnabled() && snd_voiceIsPlaying())) { _tim->resetFinishedFlag(); while (!_tim->finished() && !skipFlag() && !_quitFlag) { if (_currentTalkSections.TLKTim) -- cgit v1.2.3 From bdadf34f16cc0f271151e6e7f0438bf5ed48df8d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Thu, 8 May 2008 22:10:34 +0000 Subject: Implemented opcode 66: o3_removeItemSlot. svn-id: r31957 --- engines/kyra/kyra_mr.h | 1 + engines/kyra/script_mr.cpp | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 3dba3ec8d9..588154ca3b 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -548,6 +548,7 @@ private: int o3_drawSceneShapeOnPage(EMCState *script); int o3_checkInRect(EMCState *script); int o3_updateConversations(EMCState *script); + int o3_removeItemSlot(EMCState *script); int o3_setSceneDim(EMCState *script); int o3_setSceneAnimPosAndFrame(EMCState *script); int o3_removeItemInstances(EMCState *script); diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp index 68f9a7812f..6cbe58c0c1 100644 --- a/engines/kyra/script_mr.cpp +++ b/engines/kyra/script_mr.cpp @@ -588,6 +588,13 @@ int KyraEngine_MR::o3_updateConversations(EMCState *script) { return 1; } +int KyraEngine_MR::o3_removeItemSlot(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_removeItemSlot(%p) (%d)", (const void *)script, stackPos(0)); + deleteItemAnimEntry(stackPos(0)); + _itemList[stackPos(0)].id = 0xFFFF; + return 1; +} + int KyraEngine_MR::o3_setSceneDim(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_setSceneDim(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); _sceneMinX = stackPos(0); @@ -1220,7 +1227,7 @@ void KyraEngine_MR::setupOpcodeTable() { // 0x40 Opcode(o3_checkInRect); Opcode(o3_updateConversations); - OpcodeUnImpl(); + Opcode(o3_removeItemSlot); Opcode(o3_dummy); // 0x44 Opcode(o3_dummy); -- cgit v1.2.3 From 1d025957caad81aef5504b8e505b835ce106cf1b Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Fri, 9 May 2008 01:35:43 +0000 Subject: Moved location parsing out of the engines, to LocationParser_ns and LocationParser_br. svn-id: r31958 --- engines/parallaction/callables_ns.cpp | 4 +- engines/parallaction/exec_ns.cpp | 2 +- engines/parallaction/parallaction.cpp | 3 - engines/parallaction/parallaction.h | 166 +------------ engines/parallaction/parallaction_br.cpp | 24 ++ engines/parallaction/parallaction_ns.cpp | 32 ++- engines/parallaction/parser.h | 203 +++++++++++++++ engines/parallaction/parser_br.cpp | 372 ++++++++++++++++++++-------- engines/parallaction/parser_ns.cpp | 411 +++++++++++++++++++------------ engines/parallaction/staticres.cpp | 265 +------------------- 10 files changed, 790 insertions(+), 692 deletions(-) diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp index c9a547d75b..d5defda8cf 100644 --- a/engines/parallaction/callables_ns.cpp +++ b/engines/parallaction/callables_ns.cpp @@ -422,8 +422,8 @@ void Parallaction_ns::_c_testResult(void *parm) { parseLocation("common"); uint id[2]; - id[0] = _gfx->createLabel(_menuFont, _slideText[0], 1); - id[1] = _gfx->createLabel(_menuFont, _slideText[1], 1); + id[0] = _gfx->createLabel(_menuFont, _location._slideText[0], 1); + id[1] = _gfx->createLabel(_menuFont, _location._slideText[1], 1); _gfx->showLabel(id[0], CENTER_LABEL_HORIZONTAL, 38); _gfx->showLabel(id[1], CENTER_LABEL_HORIZONTAL, 58); diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index 385e49b78d..b1889daa21 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -446,7 +446,7 @@ void Parallaction::runCommands(CommandList& list, ZonePtr z) { if ((cmd->_flagsOn & v8) != cmd->_flagsOn) continue; if ((cmd->_flagsOff & ~v8) != cmd->_flagsOff) continue; - debugC(3, kDebugExec, "runCommands[%i]: %s (on: %x, off: %x)", cmd->_id, _commandsNamesRes[cmd->_id-1], cmd->_flagsOn, cmd->_flagsOff); +// debugC(3, kDebugExec, "runCommands[%i]: %s (on: %x, off: %x)", cmd->_id, _commandsNamesRes[cmd->_id-1], cmd->_flagsOn, cmd->_flagsOff); _cmdRunCtxt.z = z; _cmdRunCtxt.cmd = cmd; diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index 649f21ae96..3907098b0f 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -89,13 +89,10 @@ Parallaction::Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gam Parallaction::~Parallaction() { delete _debugger; - delete _locationParser; delete _globalTable; delete _callableNames; delete _localFlagNames; - delete _zoneTypeNames; - delete _zoneFlagNames; freeLocation(); diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 19ce437410..b32278bfaa 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -151,7 +151,6 @@ extern char _password[8]; extern uint16 _score; extern uint16 _language; extern uint32 _engineFlags; -#define MAX_FORWARDS 50 extern char _saveData1[]; extern uint32 _commandFlags; extern const char *_dinoName; @@ -194,6 +193,7 @@ struct Location { // NS specific WalkNodeList _walkNodes; + char _slideText[2][MAX_TOKEN_LEN]; // BRA specific int _zeta0; @@ -247,10 +247,6 @@ public: -#define DECLARE_UNQUALIFIED_ZONE_PARSER(sig) void locZoneParse_##sig() -#define DECLARE_UNQUALIFIED_ANIM_PARSER(sig) void locAnimParse_##sig() -#define DECLARE_UNQUALIFIED_COMMAND_PARSER(sig) void cmdParse_##sig() -#define DECLARE_UNQUALIFIED_LOCATION_PARSER(sig) void locParse_##sig() #define DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(sig) void instParse_##sig() #define DECLARE_UNQUALIFIED_COMMAND_OPCODE(op) void cmdOp_##op() @@ -331,13 +327,9 @@ public: Table *_globalTable; Table *_objectsNames; - Table *_zoneTypeNames; - Table *_zoneFlagNames; Table *_callableNames; Table *_localFlagNames; - Parser *_locationParser; - public: int getGameType() const; uint32 getFeatures() const; @@ -472,9 +464,9 @@ public: void beep(); public: - const char **_zoneFlagNamesRes; - const char **_zoneTypeNamesRes; - const char **_commandsNamesRes; +// const char **_zoneFlagNamesRes; +// const char **_zoneTypeNamesRes; +// const char **_commandsNamesRes; const char **_callableNamesRes; const char **_instructionNamesRes; @@ -558,8 +550,11 @@ public: bool loadGame(); bool saveGame(); + void switchBackground(const char* background, const char* mask); private: + LocationParser_ns *_locationParser; + void initFonts(); void freeFonts(); void renameOldSavefiles(); @@ -586,6 +581,7 @@ private: void initResources(); void initCursors(); + void initParsers(); static byte _mouseArrow[256]; Frames *_mouseComposedArrow; @@ -600,7 +596,6 @@ private: ZonePtr _moveSarcZone0; ZonePtr _moveSarcZone1; uint16 num_foglie; - char _slideText[2][MAX_TOKEN_LEN]; int16 _introSarcData1; uint16 _introSarcData2; // sarcophagus stuff to be saved uint16 _introSarcData3; // sarcophagus stuff to be saved @@ -649,112 +644,9 @@ protected: void walk(); void drawAnimations(); - - // location parser - OpcodeSet _locationParsers; - OpcodeSet _locationZoneParsers; - OpcodeSet _locationAnimParsers; - OpcodeSet _commandParsers; - Table *_commandsNames; - Table *_locationStmt; - Table *_locationZoneStmt; - Table *_locationAnimStmt; - - struct LocationParserContext { - bool end; - - const char *filename; - Script *script; - ZonePtr z; - AnimationPtr a; - int nextToken; - CommandList *list; - bool endcommands; - CommandPtr cmd; - - // BRA specific - int numZones; - char *bgName; - char *maskName; - char *pathName; - } _locParseCtxt; - - void warning_unexpected(); - - DECLARE_UNQUALIFIED_LOCATION_PARSER(endlocation); - DECLARE_UNQUALIFIED_LOCATION_PARSER(location); - DECLARE_UNQUALIFIED_LOCATION_PARSER(disk); - DECLARE_UNQUALIFIED_LOCATION_PARSER(nodes); - DECLARE_UNQUALIFIED_LOCATION_PARSER(zone); - DECLARE_UNQUALIFIED_LOCATION_PARSER(animation); - DECLARE_UNQUALIFIED_LOCATION_PARSER(localflags); - DECLARE_UNQUALIFIED_LOCATION_PARSER(commands); - DECLARE_UNQUALIFIED_LOCATION_PARSER(acommands); - DECLARE_UNQUALIFIED_LOCATION_PARSER(flags); - DECLARE_UNQUALIFIED_LOCATION_PARSER(comment); - DECLARE_UNQUALIFIED_LOCATION_PARSER(endcomment); - DECLARE_UNQUALIFIED_LOCATION_PARSER(sound); - DECLARE_UNQUALIFIED_LOCATION_PARSER(music); - DECLARE_UNQUALIFIED_ZONE_PARSER(limits); - DECLARE_UNQUALIFIED_ZONE_PARSER(moveto); - DECLARE_UNQUALIFIED_ZONE_PARSER(type); - DECLARE_UNQUALIFIED_ZONE_PARSER(commands); - DECLARE_UNQUALIFIED_ZONE_PARSER(label); - DECLARE_UNQUALIFIED_ZONE_PARSER(flags); - DECLARE_UNQUALIFIED_ZONE_PARSER(endzone); - DECLARE_UNQUALIFIED_ZONE_PARSER(null); - DECLARE_UNQUALIFIED_ANIM_PARSER(script); - DECLARE_UNQUALIFIED_ANIM_PARSER(commands); - DECLARE_UNQUALIFIED_ANIM_PARSER(type); - DECLARE_UNQUALIFIED_ANIM_PARSER(label); - DECLARE_UNQUALIFIED_ANIM_PARSER(flags); - DECLARE_UNQUALIFIED_ANIM_PARSER(file); - DECLARE_UNQUALIFIED_ANIM_PARSER(position); - DECLARE_UNQUALIFIED_ANIM_PARSER(moveto); - DECLARE_UNQUALIFIED_ANIM_PARSER(endanimation); - DECLARE_UNQUALIFIED_COMMAND_PARSER(flags); - DECLARE_UNQUALIFIED_COMMAND_PARSER(animation); - DECLARE_UNQUALIFIED_COMMAND_PARSER(zone); - DECLARE_UNQUALIFIED_COMMAND_PARSER(location); - DECLARE_UNQUALIFIED_COMMAND_PARSER(drop); - DECLARE_UNQUALIFIED_COMMAND_PARSER(call); - DECLARE_UNQUALIFIED_COMMAND_PARSER(simple); - DECLARE_UNQUALIFIED_COMMAND_PARSER(move); - DECLARE_UNQUALIFIED_COMMAND_PARSER(endcommands); - - virtual void parseGetData(Script &script, ZonePtr z); - virtual void parseExamineData(Script &script, ZonePtr z); - virtual void parseDoorData(Script &script, ZonePtr z); - virtual void parseMergeData(Script &script, ZonePtr z); - virtual void parseHearData(Script &script, ZonePtr z); - virtual void parseSpeakData(Script &script, ZonePtr z); - void parseLocation(const char *filename); - char *parseComment(Script &script); - char *parseDialogueString(Script &script); - Dialogue *parseDialogue(Script &script); - void resolveDialogueForwards(Dialogue *dialogue, uint numQuestions, Table &forwards); - Answer *parseAnswer(Script &script); - Question *parseQuestion(Script &script); - - void parseZone(Script &script, ZoneList &list, char *name); - void parseZoneTypeBlock(Script &script, ZonePtr z); - void parseWalkNodes(Script& script, WalkNodeList &list); - void parseAnimation(Script &script, AnimationList &list, char *name); - void parseCommands(Script &script, CommandList&); - void parseCommandFlags(); - void saveCommandForward(const char *name, CommandPtr cmd); - void resolveCommandForwards(); - void createCommand(uint id); - void addCommand(); void initOpcodes(); - void initParsers(); - struct CommandForwardReference { - char name[20]; - CommandPtr cmd; - } _forwardedCommands[MAX_FORWARDS]; - uint _numForwardedCommands; // program parser OpcodeSet _instructionParsers; @@ -837,7 +729,6 @@ protected: uint16 guiSelectGame(); int guiGetSelectedBlock(const Common::Point &p); - void switchBackground(const char* background, const char* mask); void showSlide(const char *name); }; @@ -863,7 +754,6 @@ public: public: Table *_countersNames; - Table *_audioCommandsNames; const char **_audioCommandsNamesRes; int _part; @@ -881,6 +771,8 @@ public: uint32 _zoneFlags[NUM_LOCATIONS][NUM_ZONES]; private: + LocationParser_br *_locationParser; + void initResources(); void initFonts(); void freeFonts(); @@ -925,37 +817,6 @@ private: const Callable *_callables; - DECLARE_UNQUALIFIED_LOCATION_PARSER(location); - DECLARE_UNQUALIFIED_LOCATION_PARSER(zone); - DECLARE_UNQUALIFIED_LOCATION_PARSER(animation); - DECLARE_UNQUALIFIED_LOCATION_PARSER(localflags); - DECLARE_UNQUALIFIED_LOCATION_PARSER(flags); - DECLARE_UNQUALIFIED_LOCATION_PARSER(comment); - DECLARE_UNQUALIFIED_LOCATION_PARSER(endcomment); - DECLARE_UNQUALIFIED_LOCATION_PARSER(sound); - DECLARE_UNQUALIFIED_LOCATION_PARSER(music); - DECLARE_UNQUALIFIED_LOCATION_PARSER(redundant); - DECLARE_UNQUALIFIED_LOCATION_PARSER(ifchar); - DECLARE_UNQUALIFIED_LOCATION_PARSER(character); - DECLARE_UNQUALIFIED_LOCATION_PARSER(mask); - DECLARE_UNQUALIFIED_LOCATION_PARSER(path); - DECLARE_UNQUALIFIED_LOCATION_PARSER(escape); - DECLARE_UNQUALIFIED_LOCATION_PARSER(zeta); - DECLARE_UNQUALIFIED_LOCATION_PARSER(null); - DECLARE_UNQUALIFIED_COMMAND_PARSER(ifchar); - DECLARE_UNQUALIFIED_COMMAND_PARSER(endif); - DECLARE_UNQUALIFIED_COMMAND_PARSER(location); - DECLARE_UNQUALIFIED_COMMAND_PARSER(toggle); - DECLARE_UNQUALIFIED_COMMAND_PARSER(string); - DECLARE_UNQUALIFIED_COMMAND_PARSER(math); - DECLARE_UNQUALIFIED_COMMAND_PARSER(test); - DECLARE_UNQUALIFIED_COMMAND_PARSER(music); - DECLARE_UNQUALIFIED_COMMAND_PARSER(zeta); - DECLARE_UNQUALIFIED_COMMAND_PARSER(swap); - DECLARE_UNQUALIFIED_COMMAND_PARSER(give); - DECLARE_UNQUALIFIED_COMMAND_PARSER(text); - DECLARE_UNQUALIFIED_COMMAND_PARSER(unary); - void parseLocation(const char* name); DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(zone); @@ -1003,13 +864,6 @@ private: DECLARE_UNQUALIFIED_COMMAND_OPCODE(ret); DECLARE_UNQUALIFIED_COMMAND_OPCODE(onsave); DECLARE_UNQUALIFIED_COMMAND_OPCODE(offsave); - DECLARE_UNQUALIFIED_ZONE_PARSER(limits); - DECLARE_UNQUALIFIED_ZONE_PARSER(moveto); - DECLARE_UNQUALIFIED_ZONE_PARSER(type); - DECLARE_UNQUALIFIED_ANIM_PARSER(file); - DECLARE_UNQUALIFIED_ANIM_PARSER(position); - DECLARE_UNQUALIFIED_ANIM_PARSER(moveto); - DECLARE_UNQUALIFIED_ANIM_PARSER(endanimation); DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(on); DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(off); diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 29e9fe6d70..118fe195d0 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -233,6 +233,30 @@ void Parallaction_br::changeLocation(char *location) { _engineFlags &= ~kEngineChangeLocation; } + +// FIXME: Parallaction_br::parseLocation() is now a verbatim copy of the same routine from Parallaction_ns. +void Parallaction_br::parseLocation(const char *filename) { + debugC(1, kDebugParser, "parseLocation('%s')", filename); + + allocateLocationSlot(filename); + Script *script = _disk->loadLocation(filename); + + _locationParser->parse(script); + delete script; + + // this loads animation scripts + AnimationList::iterator it = _vm->_location._animations.begin(); + for ( ; it != _vm->_location._animations.end(); it++) { + if ((*it)->_scriptName) { + loadProgram(*it, (*it)->_scriptName); + } + } + + debugC(1, kDebugParser, "parseLocation('%s') done", filename); + return; +} + + void Parallaction_br::changeCharacter(const char *name) { } diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 7a476f7d24..071fa262a8 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -155,9 +155,7 @@ Parallaction_ns::~Parallaction_ns() { delete _mouseComposedArrow; - delete _commandsNames; delete _instructionNames; - delete _locationStmt; _location._animations.remove(_char._ani); @@ -315,7 +313,7 @@ void Parallaction_ns::changeLocation(char *location) { if (locname.hasSlide()) { showSlide(locname.slide()); - uint id = _gfx->createLabel(_menuFont, _slideText[0], 1); + uint id = _gfx->createLabel(_menuFont, _location._slideText[0], 1); _gfx->showLabel(id, CENTER_LABEL_HORIZONTAL, 14); waitUntilLeftClick(); _gfx->freeLabels(); @@ -367,6 +365,34 @@ void Parallaction_ns::changeLocation(char *location) { } +void Parallaction_ns::parseLocation(const char *filename) { + debugC(1, kDebugParser, "parseLocation('%s')", filename); + + allocateLocationSlot(filename); + Script *script = _disk->loadLocation(filename); + + // TODO: the following two lines are specific to Nippon Safes + // and should be moved into something like 'initializeParsing()' + _vm->_location._hasSound = false; + + _locationParser->parse(script); + + delete script; + + // this loads animation scripts + AnimationList::iterator it = _vm->_location._animations.begin(); + for ( ; it != _vm->_location._animations.end(); it++) { + if ((*it)->_scriptName) { + loadProgram(*it, (*it)->_scriptName); + } + } + + debugC(1, kDebugParser, "parseLocation('%s') done", filename); + return; +} + + + void Parallaction_ns::changeCharacter(const char *name) { debugC(1, kDebugExec, "changeCharacter(%s)", name); diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h index d29a6c7e73..a62d883ccc 100644 --- a/engines/parallaction/parser.h +++ b/engines/parallaction/parser.h @@ -28,6 +28,7 @@ #include "common/stream.h" #include "parallaction/objects.h" +#include "parallaction/walk.h" namespace Parallaction { @@ -112,8 +113,207 @@ protected: Script *_script; }; +#define DECLARE_UNQUALIFIED_ZONE_PARSER(sig) void locZoneParse_##sig() +#define DECLARE_UNQUALIFIED_ANIM_PARSER(sig) void locAnimParse_##sig() +#define DECLARE_UNQUALIFIED_COMMAND_PARSER(sig) void cmdParse_##sig() +#define DECLARE_UNQUALIFIED_LOCATION_PARSER(sig) void locParse_##sig() +#define MAX_FORWARDS 50 +class Parallaction_ns; +class Parallaction_br; + +class LocationParser_ns { + +protected: + Parallaction_ns* _vm; + Parser *parser; + + Table *_zoneTypeNames; + Table *_zoneFlagNames; + + // location parser + OpcodeSet _locationParsers; + OpcodeSet _locationZoneParsers; + OpcodeSet _locationAnimParsers; + OpcodeSet _commandParsers; + Table *_commandsNames; + Table *_locationStmt; + Table *_locationZoneStmt; + Table *_locationAnimStmt; + + struct LocationParserContext { + bool end; + + const char *filename; + Script *script; + ZonePtr z; + AnimationPtr a; + int nextToken; + CommandList *list; + bool endcommands; + CommandPtr cmd; + + // BRA specific + int numZones; + char *bgName; + char *maskName; + char *pathName; + } _locParseCtxt; + + void warning_unexpected(); + + DECLARE_UNQUALIFIED_LOCATION_PARSER(endlocation); + DECLARE_UNQUALIFIED_LOCATION_PARSER(location); + DECLARE_UNQUALIFIED_LOCATION_PARSER(disk); + DECLARE_UNQUALIFIED_LOCATION_PARSER(nodes); + DECLARE_UNQUALIFIED_LOCATION_PARSER(zone); + DECLARE_UNQUALIFIED_LOCATION_PARSER(animation); + DECLARE_UNQUALIFIED_LOCATION_PARSER(localflags); + DECLARE_UNQUALIFIED_LOCATION_PARSER(commands); + DECLARE_UNQUALIFIED_LOCATION_PARSER(acommands); + DECLARE_UNQUALIFIED_LOCATION_PARSER(flags); + DECLARE_UNQUALIFIED_LOCATION_PARSER(comment); + DECLARE_UNQUALIFIED_LOCATION_PARSER(endcomment); + DECLARE_UNQUALIFIED_LOCATION_PARSER(sound); + DECLARE_UNQUALIFIED_LOCATION_PARSER(music); + DECLARE_UNQUALIFIED_ZONE_PARSER(limits); + DECLARE_UNQUALIFIED_ZONE_PARSER(moveto); + DECLARE_UNQUALIFIED_ZONE_PARSER(type); + DECLARE_UNQUALIFIED_ZONE_PARSER(commands); + DECLARE_UNQUALIFIED_ZONE_PARSER(label); + DECLARE_UNQUALIFIED_ZONE_PARSER(flags); + DECLARE_UNQUALIFIED_ZONE_PARSER(endzone); + DECLARE_UNQUALIFIED_ZONE_PARSER(null); + DECLARE_UNQUALIFIED_ANIM_PARSER(script); + DECLARE_UNQUALIFIED_ANIM_PARSER(commands); + DECLARE_UNQUALIFIED_ANIM_PARSER(type); + DECLARE_UNQUALIFIED_ANIM_PARSER(label); + DECLARE_UNQUALIFIED_ANIM_PARSER(flags); + DECLARE_UNQUALIFIED_ANIM_PARSER(file); + DECLARE_UNQUALIFIED_ANIM_PARSER(position); + DECLARE_UNQUALIFIED_ANIM_PARSER(moveto); + DECLARE_UNQUALIFIED_ANIM_PARSER(endanimation); + DECLARE_UNQUALIFIED_COMMAND_PARSER(flags); + DECLARE_UNQUALIFIED_COMMAND_PARSER(animation); + DECLARE_UNQUALIFIED_COMMAND_PARSER(zone); + DECLARE_UNQUALIFIED_COMMAND_PARSER(location); + DECLARE_UNQUALIFIED_COMMAND_PARSER(drop); + DECLARE_UNQUALIFIED_COMMAND_PARSER(call); + DECLARE_UNQUALIFIED_COMMAND_PARSER(simple); + DECLARE_UNQUALIFIED_COMMAND_PARSER(move); + DECLARE_UNQUALIFIED_COMMAND_PARSER(endcommands); + + virtual void parseGetData(Script &script, ZonePtr z); + virtual void parseExamineData(Script &script, ZonePtr z); + virtual void parseDoorData(Script &script, ZonePtr z); + virtual void parseMergeData(Script &script, ZonePtr z); + virtual void parseHearData(Script &script, ZonePtr z); + virtual void parseSpeakData(Script &script, ZonePtr z); + + char *parseComment(Script &script); + char *parseDialogueString(Script &script); + Dialogue *parseDialogue(Script &script); + void resolveDialogueForwards(Dialogue *dialogue, uint numQuestions, Table &forwards); + Answer *parseAnswer(Script &script); + Question *parseQuestion(Script &script); + + void parseZone(Script &script, ZoneList &list, char *name); + void parseZoneTypeBlock(Script &script, ZonePtr z); + void parseWalkNodes(Script& script, WalkNodeList &list); + void parseAnimation(Script &script, AnimationList &list, char *name); + void parseCommands(Script &script, CommandList&); + void parseCommandFlags(); + void saveCommandForward(const char *name, CommandPtr cmd); + void resolveCommandForwards(); + void createCommand(uint id); + void addCommand(); + void initParsers(); + + struct CommandForwardReference { + char name[20]; + CommandPtr cmd; + } _forwardedCommands[MAX_FORWARDS]; + uint _numForwardedCommands; + + void init(); + +public: + LocationParser_ns(Parallaction_ns *vm) : _vm(vm) { + init(); + } + + virtual ~LocationParser_ns() { + delete _commandsNames; + delete _locationStmt; + delete _zoneTypeNames; + delete _zoneFlagNames; + } + + void parse(Script *script); + +}; + +class LocationParser_br : public LocationParser_ns { + +protected: + Table *_audioCommandsNames; + + Parallaction_br* _vm; + + DECLARE_UNQUALIFIED_LOCATION_PARSER(location); + DECLARE_UNQUALIFIED_LOCATION_PARSER(zone); + DECLARE_UNQUALIFIED_LOCATION_PARSER(animation); + DECLARE_UNQUALIFIED_LOCATION_PARSER(localflags); + DECLARE_UNQUALIFIED_LOCATION_PARSER(flags); + DECLARE_UNQUALIFIED_LOCATION_PARSER(comment); + DECLARE_UNQUALIFIED_LOCATION_PARSER(endcomment); + DECLARE_UNQUALIFIED_LOCATION_PARSER(sound); + DECLARE_UNQUALIFIED_LOCATION_PARSER(music); + DECLARE_UNQUALIFIED_LOCATION_PARSER(redundant); + DECLARE_UNQUALIFIED_LOCATION_PARSER(ifchar); + DECLARE_UNQUALIFIED_LOCATION_PARSER(character); + DECLARE_UNQUALIFIED_LOCATION_PARSER(mask); + DECLARE_UNQUALIFIED_LOCATION_PARSER(path); + DECLARE_UNQUALIFIED_LOCATION_PARSER(escape); + DECLARE_UNQUALIFIED_LOCATION_PARSER(zeta); + DECLARE_UNQUALIFIED_LOCATION_PARSER(null); + DECLARE_UNQUALIFIED_COMMAND_PARSER(ifchar); + DECLARE_UNQUALIFIED_COMMAND_PARSER(endif); + DECLARE_UNQUALIFIED_COMMAND_PARSER(location); + DECLARE_UNQUALIFIED_COMMAND_PARSER(toggle); + DECLARE_UNQUALIFIED_COMMAND_PARSER(string); + DECLARE_UNQUALIFIED_COMMAND_PARSER(math); + DECLARE_UNQUALIFIED_COMMAND_PARSER(test); + DECLARE_UNQUALIFIED_COMMAND_PARSER(music); + DECLARE_UNQUALIFIED_COMMAND_PARSER(zeta); + DECLARE_UNQUALIFIED_COMMAND_PARSER(swap); + DECLARE_UNQUALIFIED_COMMAND_PARSER(give); + DECLARE_UNQUALIFIED_COMMAND_PARSER(text); + DECLARE_UNQUALIFIED_COMMAND_PARSER(unary); + DECLARE_UNQUALIFIED_ZONE_PARSER(limits); + DECLARE_UNQUALIFIED_ZONE_PARSER(moveto); + DECLARE_UNQUALIFIED_ZONE_PARSER(type); + DECLARE_UNQUALIFIED_ANIM_PARSER(file); + DECLARE_UNQUALIFIED_ANIM_PARSER(position); + DECLARE_UNQUALIFIED_ANIM_PARSER(moveto); + DECLARE_UNQUALIFIED_ANIM_PARSER(endanimation); + + void init(); + +public: + LocationParser_br(Parallaction_br *vm) : LocationParser_ns((Parallaction_ns*)vm), _vm(vm) { + init(); + } + + virtual ~LocationParser_br() { + delete _commandsNames; + delete _locationStmt; + } + + void parse(Script *script); + +}; } // namespace Parallaction @@ -121,3 +321,6 @@ protected: #endif + + + diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp index 2544267382..612a53759b 100644 --- a/engines/parallaction/parser_br.cpp +++ b/engines/parallaction/parser_br.cpp @@ -104,17 +104,167 @@ namespace Parallaction { #define INST_ENDIF 30 #define INST_STOP 31 -#define DECLARE_ZONE_PARSER(sig) void Parallaction_br::locZoneParse_##sig() -#define DECLARE_ANIM_PARSER(sig) void Parallaction_br::locAnimParse_##sig() -#define DECLARE_COMMAND_PARSER(sig) void Parallaction_br::cmdParse_##sig() +const char *_zoneTypeNamesRes_br[] = { + "examine", + "door", + "get", + "merge", + "taste", + "hear", + "feel", + "speak", + "none", + "trap", + "you", + "command", + "path", + "box" +}; + +const char *_zoneFlagNamesRes_br[] = { + "closed", + "active", + "remove", + "acting", + "locked", + "fixed", + "noname", + "nomasked", + "looping", + "added", + "character", + "nowalk", + "yourself", + "scaled", + "selfuse" +}; + +const char *_commandsNamesRes_br[] = { + "set", + "clear", + "start", + "speak", + "get", + "location", + "open", + "close", + "on", + "off", + "call", + "toggle", + "drop", + "quit", + "move", + "stop", + "character", + "followme", + "onmouse", + "offmouse", + "add", + "leave", + "inc", + "dec", + "test", + "dummy", + "dummy", + "let", + "music", + "fix", + "unfix", + "zeta", + "scroll", + "swap", + "give", + "text", + "part", + "dummy", + "return", + "onsave", + "offsave", + "endcommands", + "ifchar", + "endif" +}; + + +const char *_audioCommandsNamesRes_br[] = { + "play", + "stop", + "pause", + "channel_level", + "fadein", + "fadeout", + "volume", + " ", + "faderate", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + "loop" +}; + +const char *_locationStmtRes_br[] = { + "character", + "endlocation", + "ifchar", + "endif", + "location", + "mask", + "path", + "disk", + "localflags", + "commands", + "escape", + "acommands", + "flags", + "comment", + "endcomment", + "zone", + "animation", + "zeta", + "music", + "sound" +}; + +const char *_locationZoneStmtRes_br[] = { + "endzone", + "limits", + "moveto", + "type", + "commands", + "label", + "flags" +}; + +const char *_locationAnimStmtRes_br[] = { + "endanimation", + "endzone", + "script", + "commands", + "type", + "label", + "flags", + "file", + "position", + "moveto" +}; + + +#define DECLARE_ZONE_PARSER(sig) void LocationParser_br::locZoneParse_##sig() +#define DECLARE_ANIM_PARSER(sig) void LocationParser_br::locAnimParse_##sig() +#define DECLARE_COMMAND_PARSER(sig) void LocationParser_br::cmdParse_##sig() #define DECLARE_INSTRUCTION_PARSER(sig) void Parallaction_br::instParse_##sig() -#define DECLARE_LOCATION_PARSER(sig) void Parallaction_br::locParse_##sig() +#define DECLARE_LOCATION_PARSER(sig) void LocationParser_br::locParse_##sig() DECLARE_LOCATION_PARSER(location) { debugC(7, kDebugParser, "LOCATION_PARSER(location) "); - strcpy(_location._name, _tokens[1]); + strcpy(_vm->_location._name, _tokens[1]); _locParseCtxt.bgName = strdup(_tokens[1]); bool flip = false; @@ -130,14 +280,14 @@ DECLARE_LOCATION_PARSER(location) { // TODO: handle background horizontal flip (via a context parameter) if (_tokens[nextToken][0] != '\0') { - _char._ani->_left = atoi(_tokens[nextToken]); + _vm->_char._ani->_left = atoi(_tokens[nextToken]); nextToken++; - _char._ani->_top = atoi(_tokens[nextToken]); + _vm->_char._ani->_top = atoi(_tokens[nextToken]); nextToken++; } if (_tokens[nextToken][0] != '\0') { - _char._ani->_frame = atoi(_tokens[nextToken]); + _vm->_char._ani->_frame = atoi(_tokens[nextToken]); } } @@ -146,14 +296,14 @@ DECLARE_LOCATION_PARSER(location) { DECLARE_LOCATION_PARSER(zone) { debugC(7, kDebugParser, "LOCATION_PARSER(zone) "); - parseZone(*_locParseCtxt.script, _location._zones, _tokens[1]); + parseZone(*_locParseCtxt.script, _vm->_location._zones, _tokens[1]); _locParseCtxt.z->_index = _locParseCtxt.numZones++; - if (getLocationFlags() & kFlagsVisited) { - _locParseCtxt.z->_flags = _zoneFlags[_currentLocationIndex][_locParseCtxt.z->_index]; + if (_vm->getLocationFlags() & kFlagsVisited) { + _locParseCtxt.z->_flags = _vm->_zoneFlags[_vm->_currentLocationIndex][_locParseCtxt.z->_index]; } else { - _zoneFlags[_currentLocationIndex][_locParseCtxt.z->_index] = _locParseCtxt.z->_flags; + _vm->_zoneFlags[_vm->_currentLocationIndex][_locParseCtxt.z->_index] = _locParseCtxt.z->_flags; } } @@ -162,14 +312,14 @@ DECLARE_LOCATION_PARSER(zone) { DECLARE_LOCATION_PARSER(animation) { debugC(7, kDebugParser, "LOCATION_PARSER(animation) "); - parseAnimation(*_locParseCtxt.script, _location._animations, _tokens[1]); + parseAnimation(*_locParseCtxt.script, _vm->_location._animations, _tokens[1]); _locParseCtxt.a->_index = _locParseCtxt.numZones++; - if (getLocationFlags() & kFlagsVisited) { - _locParseCtxt.a->_flags = _zoneFlags[_currentLocationIndex][_locParseCtxt.a->_index]; + if (_vm->getLocationFlags() & kFlagsVisited) { + _locParseCtxt.a->_flags = _vm->_zoneFlags[_vm->_currentLocationIndex][_locParseCtxt.a->_index]; } else { - _zoneFlags[_currentLocationIndex][_locParseCtxt.a->_index] = _locParseCtxt.a->_flags; + _vm->_zoneFlags[_vm->_currentLocationIndex][_locParseCtxt.a->_index] = _locParseCtxt.a->_flags; } } @@ -180,7 +330,7 @@ DECLARE_LOCATION_PARSER(localflags) { int _si = 1; while (_tokens[_si][0] != '\0') { - _localFlagNames->addData(_tokens[_si]); + _vm->_localFlagNames->addData(_tokens[_si]); _si++; } } @@ -189,14 +339,14 @@ DECLARE_LOCATION_PARSER(localflags) { DECLARE_LOCATION_PARSER(flags) { debugC(7, kDebugParser, "LOCATION_PARSER(flags) "); - if ((getLocationFlags() & kFlagsVisited) == 0) { + if ((_vm->getLocationFlags() & kFlagsVisited) == 0) { // only for 1st visit - clearLocationFlags(kFlagsAll); + _vm->clearLocationFlags(kFlagsAll); int _si = 1; do { - byte _al = _localFlagNames->lookup(_tokens[_si]); - setLocationFlags(1 << (_al - 1)); + byte _al = _vm->_localFlagNames->lookup(_tokens[_si]); + _vm->setLocationFlags(1 << (_al - 1)); _si++; if (scumm_stricmp(_tokens[_si], "|")) break; @@ -209,14 +359,14 @@ DECLARE_LOCATION_PARSER(flags) { DECLARE_LOCATION_PARSER(comment) { debugC(7, kDebugParser, "LOCATION_PARSER(comment) "); - _location._comment = parseComment(*_locParseCtxt.script); + _vm->_location._comment = parseComment(*_locParseCtxt.script); } DECLARE_LOCATION_PARSER(endcomment) { debugC(7, kDebugParser, "LOCATION_PARSER(endcomment) "); - _location._endComment = parseComment(*_locParseCtxt.script); + _vm->_location._endComment = parseComment(*_locParseCtxt.script); } @@ -265,9 +415,9 @@ DECLARE_LOCATION_PARSER(mask) { debugC(7, kDebugParser, "LOCATION_PARSER(mask) "); _locParseCtxt.maskName = strdup(_tokens[1]); - _gfx->_backgroundInfo.layers[0] = atoi(_tokens[2]); - _gfx->_backgroundInfo.layers[1] = atoi(_tokens[3]); - _gfx->_backgroundInfo.layers[2] = atoi(_tokens[4]); + _vm->_gfx->_backgroundInfo.layers[0] = atoi(_tokens[2]); + _vm->_gfx->_backgroundInfo.layers[1] = atoi(_tokens[3]); + _vm->_gfx->_backgroundInfo.layers[2] = atoi(_tokens[4]); } @@ -281,27 +431,27 @@ DECLARE_LOCATION_PARSER(path) { DECLARE_LOCATION_PARSER(escape) { debugC(7, kDebugParser, "LOCATION_PARSER(escape) "); - parseCommands(*_locParseCtxt.script, _location._escapeCommands); + parseCommands(*_locParseCtxt.script, _vm->_location._escapeCommands); } DECLARE_LOCATION_PARSER(zeta) { debugC(7, kDebugParser, "LOCATION_PARSER(zeta) "); - _location._zeta0 = atoi(_tokens[1]); - _location._zeta1 = atoi(_tokens[2]); + _vm->_location._zeta0 = atoi(_tokens[1]); + _vm->_location._zeta1 = atoi(_tokens[2]); if (_tokens[3][0] != '\0') { - _location._zeta2 = atoi(_tokens[1]); + _vm->_location._zeta2 = atoi(_tokens[1]); } else { - _location._zeta2 = 50; + _vm->_location._zeta2 = 50; } } DECLARE_COMMAND_PARSER(ifchar) { debugC(7, kDebugParser, "COMMAND_PARSER(ifchar) "); - if (!scumm_stricmp(_char.getName(), _tokens[1])) + if (!scumm_stricmp(_vm->_char.getName(), _tokens[1])) _locParseCtxt.script->skip("endif"); } @@ -316,7 +466,7 @@ DECLARE_COMMAND_PARSER(endif) { DECLARE_COMMAND_PARSER(location) { debugC(7, kDebugParser, "COMMAND_PARSER(location) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); _locParseCtxt.cmd->u._string = strdup(_tokens[1]); _locParseCtxt.nextToken++; @@ -345,7 +495,7 @@ DECLARE_COMMAND_PARSER(location) { DECLARE_COMMAND_PARSER(string) { debugC(7, kDebugParser, "COMMAND_PARSER(string) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); _locParseCtxt.cmd->u._string = strdup(_tokens[1]); _locParseCtxt.nextToken++; @@ -357,9 +507,9 @@ DECLARE_COMMAND_PARSER(string) { DECLARE_COMMAND_PARSER(math) { debugC(7, kDebugParser, "COMMAND_PARSER(math) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); - _locParseCtxt.cmd->u._lvalue = _countersNames->lookup(_tokens[1]); + _locParseCtxt.cmd->u._lvalue = _vm->_countersNames->lookup(_tokens[1]); _locParseCtxt.nextToken++; _locParseCtxt.cmd->u._rvalue = atoi(_tokens[2]); _locParseCtxt.nextToken++; @@ -372,9 +522,9 @@ DECLARE_COMMAND_PARSER(math) { DECLARE_COMMAND_PARSER(test) { debugC(7, kDebugParser, "COMMAND_PARSER(test) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); - uint counter = _countersNames->lookup(_tokens[1]); + uint counter = _vm->_countersNames->lookup(_tokens[1]); _locParseCtxt.nextToken++; if (counter == Table::notFound) { @@ -405,7 +555,7 @@ DECLARE_COMMAND_PARSER(test) { DECLARE_COMMAND_PARSER(music) { debugC(7, kDebugParser, "COMMAND_PARSER(music) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); _locParseCtxt.cmd->u._musicCommand = _audioCommandsNames->lookup(_tokens[1]); _locParseCtxt.nextToken++; @@ -423,7 +573,7 @@ DECLARE_COMMAND_PARSER(music) { DECLARE_COMMAND_PARSER(zeta) { debugC(7, kDebugParser, "COMMAND_PARSER(zeta) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); _locParseCtxt.cmd->u._zeta0 = atoi(_tokens[1]); _locParseCtxt.nextToken++; @@ -445,7 +595,7 @@ DECLARE_COMMAND_PARSER(zeta) { DECLARE_COMMAND_PARSER(give) { debugC(7, kDebugParser, "COMMAND_PARSER(give) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); _locParseCtxt.cmd->u._object = 4 + atoi(_tokens[1]); _locParseCtxt.nextToken++; @@ -471,7 +621,7 @@ DECLARE_COMMAND_PARSER(give) { DECLARE_COMMAND_PARSER(text) { debugC(7, kDebugParser, "COMMAND_PARSER(text) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); if (isdigit(_tokens[1][1])) { _locParseCtxt.cmd->u._zeta0 = atoi(_tokens[1]); @@ -497,7 +647,7 @@ DECLARE_COMMAND_PARSER(text) { DECLARE_COMMAND_PARSER(unary) { debugC(7, kDebugParser, "COMMAND_PARSER(unary) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); _locParseCtxt.cmd->u._rvalue = atoi(_tokens[1]); _locParseCtxt.nextToken++; @@ -512,7 +662,7 @@ DECLARE_ZONE_PARSER(limits) { if (isalpha(_tokens[1][1])) { _locParseCtxt.z->_flags |= kFlagsAnimLinked; - _locParseCtxt.z->_linkedAnim = findAnimation(_tokens[1]); + _locParseCtxt.z->_linkedAnim = _vm->findAnimation(_tokens[1]); _locParseCtxt.z->_linkedName = strdup(_tokens[1]); } else { _locParseCtxt.z->_left = atoi(_tokens[1]); @@ -536,7 +686,7 @@ DECLARE_ZONE_PARSER(type) { debugC(7, kDebugParser, "ZONE_PARSER(type) "); if (_tokens[2][0] != '\0') { - _locParseCtxt.z->_type = (4 + _objectsNames->lookup(_tokens[2])) << 16; + _locParseCtxt.z->_type = (4 + _vm->_objectsNames->lookup(_tokens[2])) << 16; } int16 _si = _zoneTypeNames->lookup(_tokens[1]); if (_si != Table::notFound) { @@ -548,14 +698,14 @@ DECLARE_ZONE_PARSER(type) { // } } - _locationParser->popTables(); + parser->popTables(); } DECLARE_ANIM_PARSER(file) { debugC(7, kDebugParser, "ANIM_PARSER(file) "); - _locParseCtxt.a->gfxobj = _gfx->loadAnim(_tokens[1]); + _locParseCtxt.a->gfxobj = _vm->_gfx->loadAnim(_tokens[1]); } @@ -592,7 +742,7 @@ DECLARE_ANIM_PARSER(endanimation) { _locParseCtxt.a->_flags |= 0x1000000; - _locationParser->popTables(); + parser->popTables(); } @@ -749,58 +899,31 @@ void Parallaction_br::parseRValue(ScriptVar &v, const char *str) { } -typedef OpcodeImpl OpcodeV2; -#define INSTRUCTION_PARSER(sig) OpcodeV2(this, &Parallaction_br::instParse_##sig) -#define ZONE_PARSER(sig) OpcodeV2(this, &Parallaction_br::locZoneParse_##sig) -#define ANIM_PARSER(sig) OpcodeV2(this, &Parallaction_br::locAnimParse_##sig) -#define LOCATION_PARSER(sig) OpcodeV2(this, &Parallaction_br::locParse_##sig) -#define COMMAND_PARSER(sig) OpcodeV2(this, &Parallaction_br::cmdParse_##sig) +typedef OpcodeImpl OpcodeV2; +#define ZONE_PARSER(sig) OpcodeV2(this, &LocationParser_br::locZoneParse_##sig) +#define ANIM_PARSER(sig) OpcodeV2(this, &LocationParser_br::locAnimParse_##sig) +#define LOCATION_PARSER(sig) OpcodeV2(this, &LocationParser_br::locParse_##sig) +#define COMMAND_PARSER(sig) OpcodeV2(this, &LocationParser_br::cmdParse_##sig) +#define WARNING_PARSER(sig) OpcodeV2(this, &LocationParser_br::warning_##sig) -#define WARNING_PARSER(sig) OpcodeV2(this, &Parallaction_br::warning_##sig) +typedef OpcodeImpl OpcodeV3; +#define INSTRUCTION_PARSER(sig) OpcodeV3(this, &Parallaction_br::instParse_##sig) -void Parallaction_br::initParsers() { - _locationParser = new Parser; +void LocationParser_br::init() { - static const OpcodeV2 op0[] = { - INSTRUCTION_PARSER(defLocal), // invalid opcode -> local definition - INSTRUCTION_PARSER(zone), // on - INSTRUCTION_PARSER(zone), // off - INSTRUCTION_PARSER(x), - INSTRUCTION_PARSER(y), - INSTRUCTION_PARSER(z), - INSTRUCTION_PARSER(f), - INSTRUCTION_PARSER(loop), - INSTRUCTION_PARSER(null), // endloop - INSTRUCTION_PARSER(null), // show - INSTRUCTION_PARSER(inc), - INSTRUCTION_PARSER(inc), // dec - INSTRUCTION_PARSER(set), - INSTRUCTION_PARSER(put), - INSTRUCTION_PARSER(call), - INSTRUCTION_PARSER(null), // wait - INSTRUCTION_PARSER(zone), // start - INSTRUCTION_PARSER(zone), // process - INSTRUCTION_PARSER(move), - INSTRUCTION_PARSER(color), - INSTRUCTION_PARSER(zone), // sound - INSTRUCTION_PARSER(mask), - INSTRUCTION_PARSER(print), - INSTRUCTION_PARSER(text), - INSTRUCTION_PARSER(inc), // mul - INSTRUCTION_PARSER(inc), // div - INSTRUCTION_PARSER(if_op), - INSTRUCTION_PARSER(null), - INSTRUCTION_PARSER(null), - INSTRUCTION_PARSER(endif), - INSTRUCTION_PARSER(zone), // stop - INSTRUCTION_PARSER(endscript) - }; + parser = new Parser; + + _zoneFlagNames = new Table(ARRAYSIZE(_zoneFlagNamesRes_br), _zoneFlagNamesRes_br); + _zoneTypeNames = new Table(ARRAYSIZE(_zoneTypeNamesRes_br), _zoneTypeNamesRes_br); + _commandsNames = new Table(ARRAYSIZE(_commandsNamesRes_br), _commandsNamesRes_br); + _audioCommandsNames = new Table(ARRAYSIZE(_audioCommandsNamesRes_br), _audioCommandsNamesRes_br); + _locationStmt = new Table(ARRAYSIZE(_locationStmtRes_br), _locationStmtRes_br); + _locationZoneStmt = new Table(ARRAYSIZE(_locationZoneStmtRes_br), _locationZoneStmtRes_br); + _locationAnimStmt = new Table(ARRAYSIZE(_locationAnimStmtRes_br), _locationAnimStmtRes_br); - uint i; - for (i = 0; i < ARRAYSIZE(op0); i++) - _instructionParsers.push_back(&op0[i]); + int i; static const OpcodeV2 op2[] = { WARNING_PARSER(unexpected), @@ -910,31 +1033,70 @@ void Parallaction_br::initParsers() { for (i = 0; i < ARRAYSIZE(op6); i++) _locationAnimParsers.push_back(&op6[i]); + } -void Parallaction_br::parseLocation(const char* filename) { +void Parallaction_br::initParsers() { + + _locationParser = new LocationParser_br(this); + + static const OpcodeV3 op0[] = { + INSTRUCTION_PARSER(defLocal), // invalid opcode -> local definition + INSTRUCTION_PARSER(zone), // on + INSTRUCTION_PARSER(zone), // off + INSTRUCTION_PARSER(x), + INSTRUCTION_PARSER(y), + INSTRUCTION_PARSER(z), + INSTRUCTION_PARSER(f), + INSTRUCTION_PARSER(loop), + INSTRUCTION_PARSER(null), // endloop + INSTRUCTION_PARSER(null), // show + INSTRUCTION_PARSER(inc), + INSTRUCTION_PARSER(inc), // dec + INSTRUCTION_PARSER(set), + INSTRUCTION_PARSER(put), + INSTRUCTION_PARSER(call), + INSTRUCTION_PARSER(null), // wait + INSTRUCTION_PARSER(zone), // start + INSTRUCTION_PARSER(zone), // process + INSTRUCTION_PARSER(move), + INSTRUCTION_PARSER(color), + INSTRUCTION_PARSER(zone), // sound + INSTRUCTION_PARSER(mask), + INSTRUCTION_PARSER(print), + INSTRUCTION_PARSER(text), + INSTRUCTION_PARSER(inc), // mul + INSTRUCTION_PARSER(inc), // div + INSTRUCTION_PARSER(if_op), + INSTRUCTION_PARSER(null), + INSTRUCTION_PARSER(null), + INSTRUCTION_PARSER(endif), + INSTRUCTION_PARSER(zone), // stop + INSTRUCTION_PARSER(endscript) + }; + + uint i; + for (i = 0; i < ARRAYSIZE(op0); i++) + _instructionParsers.push_back(&op0[i]); + +} + +void LocationParser_br::parse(Script *script) { _locParseCtxt.numZones = 0; _locParseCtxt.bgName = 0; _locParseCtxt.maskName = 0; _locParseCtxt.pathName = 0; - Super::parseLocation(filename); + LocationParser_ns::parse(script); - _gfx->setBackground(kBackgroundLocation, _locParseCtxt.bgName, _locParseCtxt.maskName, _locParseCtxt.pathName); - _pathBuffer = &_gfx->_backgroundInfo.path; + _vm->_gfx->setBackground(kBackgroundLocation, _locParseCtxt.bgName, _locParseCtxt.maskName, _locParseCtxt.pathName); + _vm->_pathBuffer = &_vm->_gfx->_backgroundInfo.path; free(_locParseCtxt.bgName); free(_locParseCtxt.maskName); free(_locParseCtxt.pathName); -// drawZones(); - - return; } - - - - } // namespace Parallaction diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index b8b36a0885..29c356b8af 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -67,14 +67,106 @@ namespace Parallaction { #define INST_END 19 -#define DECLARE_ZONE_PARSER(sig) void Parallaction_ns::locZoneParse_##sig() -#define DECLARE_ANIM_PARSER(sig) void Parallaction_ns::locAnimParse_##sig() -#define DECLARE_COMMAND_PARSER(sig) void Parallaction_ns::cmdParse_##sig() +const char *_zoneFlagNamesRes_ns[] = { + "closed", + "active", + "remove", + "acting", + "locked", + "fixed", + "noname", + "nomasked", + "looping", + "added", + "character", + "nowalk" +}; + +const char *_zoneTypeNamesRes_ns[] = { + "examine", + "door", + "get", + "merge", + "taste", + "hear", + "feel", + "speak", + "none", + "trap", + "yourself", + "Command" +}; + +const char *_commandsNamesRes_ns[] = { + "set", + "clear", + "start", + "speak", + "get", + "location", + "open", + "close", + "on", + "off", + "call", + "toggle", + "drop", + "quit", + "move", + "stop", + "endcommands", + "endzone" +}; + +const char *_locationStmtRes_ns[] = { + "endlocation", + "location", + "disk", + "nodes", + "zone", + "animation", + "localflags", + "commands", + "acommands", + "flags", + "comment", + "endcomment", + "sound", + "music" +}; + +const char *_locationZoneStmtRes_ns[] = { + "limits", + "moveto", + "type", + "commands", + "label", + "flags", + "endzone" +}; + +const char *_locationAnimStmtRes_ns[] = { + "script", + "commands", + "type", + "label", + "flags", + "file", + "position", + "moveto", + "endanimation" +}; + + +#define DECLARE_ZONE_PARSER(sig) void LocationParser_ns::locZoneParse_##sig() +#define DECLARE_ANIM_PARSER(sig) void LocationParser_ns::locAnimParse_##sig() +#define DECLARE_COMMAND_PARSER(sig) void LocationParser_ns::cmdParse_##sig() +#define DECLARE_LOCATION_PARSER(sig) void LocationParser_ns::locParse_##sig() + #define DECLARE_INSTRUCTION_PARSER(sig) void Parallaction_ns::instParse_##sig() -#define DECLARE_LOCATION_PARSER(sig) void Parallaction_ns::locParse_##sig() -void Parallaction_ns::warning_unexpected() { +void LocationParser_ns::warning_unexpected() { debugC(1, kDebugParser, "unexpected keyword '%s' in line %i", _tokens[0], _locParseCtxt.script->getLine()); } @@ -97,7 +189,7 @@ DECLARE_ANIM_PARSER(type) { debugC(7, kDebugParser, "ANIM_PARSER(type) "); if (_tokens[2][0] != '\0') { - _locParseCtxt.a->_type = ((4 + _objectsNames->lookup(_tokens[2])) << 16) & 0xFFFF0000; + _locParseCtxt.a->_type = ((4 + _vm->_objectsNames->lookup(_tokens[2])) << 16) & 0xFFFF0000; } int16 _si = _zoneTypeNames->lookup(_tokens[1]); if (_si != Table::notFound) { @@ -112,14 +204,14 @@ DECLARE_ANIM_PARSER(type) { _locParseCtxt.a->_flags |= 0x1000000; - _locationParser->popTables(); + parser->popTables(); } DECLARE_ANIM_PARSER(label) { debugC(7, kDebugParser, "ANIM_PARSER(label) "); - _locParseCtxt.a->_label = _gfx->renderFloatingLabel(_labelFont, _tokens[1]); + _locParseCtxt.a->_label = _vm->_gfx->renderFloatingLabel(_vm->_labelFont, _tokens[1]); } @@ -146,7 +238,7 @@ DECLARE_ANIM_PARSER(file) { strcat(vC8, "tras"); } } - _locParseCtxt.a->gfxobj = _gfx->loadAnim(vC8); + _locParseCtxt.a->gfxobj = _vm->_gfx->loadAnim(vC8); } @@ -176,10 +268,10 @@ DECLARE_ANIM_PARSER(endanimation) { _locParseCtxt.a->_flags |= 0x1000000; - _locationParser->popTables(); + parser->popTables(); } -void Parallaction_ns::parseAnimation(Script& script, AnimationList &list, char *name) { +void LocationParser_ns::parseAnimation(Script& script, AnimationList &list, char *name) { debugC(5, kDebugParser, "parseAnimation(name: %s)", name); AnimationPtr a(new Animation); @@ -191,7 +283,7 @@ void Parallaction_ns::parseAnimation(Script& script, AnimationList &list, char * _locParseCtxt.a = a; _locParseCtxt.script = &script; - _locationParser->pushTables(&_locationAnimParsers, _locationAnimStmt); + parser->pushTables(&_locationAnimParsers, _locationAnimStmt); } void Parallaction_ns::parseInstruction(ProgramPtr program) { @@ -239,7 +331,7 @@ void Parallaction_ns::loadProgram(AnimationPtr a, const char *filename) { delete script; - _location._programs.push_back(program); + _vm->_location._programs.push_back(program); debugC(1, kDebugParser, "loadProgram() done"); @@ -469,11 +561,11 @@ void Parallaction_ns::parseLValue(ScriptVar &v, const char *str) { DECLARE_COMMAND_PARSER(flags) { debugC(7, kDebugParser, "COMMAND_PARSER(flags) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); - if (_globalTable->lookup(_tokens[1]) == Table::notFound) { + if (_vm->_globalTable->lookup(_tokens[1]) == Table::notFound) { do { - char _al = _localFlagNames->lookup(_tokens[_locParseCtxt.nextToken]); + char _al = _vm->_localFlagNames->lookup(_tokens[_locParseCtxt.nextToken]); _locParseCtxt.nextToken++; _locParseCtxt.cmd->u._flags |= 1 << (_al - 1); } while (!scumm_stricmp(_tokens[_locParseCtxt.nextToken++], "|")); @@ -481,7 +573,7 @@ DECLARE_COMMAND_PARSER(flags) { } else { _locParseCtxt.cmd->u._flags |= kFlagsGlobal; do { - char _al = _globalTable->lookup(_tokens[1]); + char _al = _vm->_globalTable->lookup(_tokens[1]); _locParseCtxt.nextToken++; _locParseCtxt.cmd->u._flags |= 1 << (_al - 1); } while (!scumm_stricmp(_tokens[_locParseCtxt.nextToken++], "|")); @@ -496,9 +588,9 @@ DECLARE_COMMAND_PARSER(flags) { DECLARE_COMMAND_PARSER(zone) { debugC(7, kDebugParser, "COMMAND_PARSER(zone) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); - _locParseCtxt.cmd->u._zone = findZone(_tokens[_locParseCtxt.nextToken]); + _locParseCtxt.cmd->u._zone = _vm->findZone(_tokens[_locParseCtxt.nextToken]); if (!_locParseCtxt.cmd->u._zone) { saveCommandForward(_tokens[_locParseCtxt.nextToken], _locParseCtxt.cmd); } @@ -512,7 +604,7 @@ DECLARE_COMMAND_PARSER(zone) { DECLARE_COMMAND_PARSER(location) { debugC(7, kDebugParser, "COMMAND_PARSER(location) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); _locParseCtxt.cmd->u._string = strdup(_tokens[_locParseCtxt.nextToken]); _locParseCtxt.nextToken++; @@ -525,9 +617,9 @@ DECLARE_COMMAND_PARSER(location) { DECLARE_COMMAND_PARSER(drop) { debugC(7, kDebugParser, "COMMAND_PARSER(drop) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); - _locParseCtxt.cmd->u._object = 4 + _objectsNames->lookup(_tokens[_locParseCtxt.nextToken]); + _locParseCtxt.cmd->u._object = 4 + _vm->_objectsNames->lookup(_tokens[_locParseCtxt.nextToken]); _locParseCtxt.nextToken++; parseCommandFlags(); @@ -538,9 +630,9 @@ DECLARE_COMMAND_PARSER(drop) { DECLARE_COMMAND_PARSER(call) { debugC(7, kDebugParser, "COMMAND_PARSER(call) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); - _locParseCtxt.cmd->u._callable = _callableNames->lookup(_tokens[_locParseCtxt.nextToken]) - 1; + _locParseCtxt.cmd->u._callable = _vm->_callableNames->lookup(_tokens[_locParseCtxt.nextToken]) - 1; _locParseCtxt.nextToken++; parseCommandFlags(); @@ -551,7 +643,7 @@ DECLARE_COMMAND_PARSER(call) { DECLARE_COMMAND_PARSER(simple) { debugC(7, kDebugParser, "COMMAND_PARSER(simple) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); addCommand(); } @@ -559,7 +651,7 @@ DECLARE_COMMAND_PARSER(simple) { DECLARE_COMMAND_PARSER(move) { debugC(7, kDebugParser, "COMMAND_PARSER(move) "); - createCommand(_locationParser->_lookup); + createCommand(parser->_lookup); _locParseCtxt.cmd->u._move.x = atoi(_tokens[_locParseCtxt.nextToken]); _locParseCtxt.nextToken++; @@ -573,13 +665,13 @@ DECLARE_COMMAND_PARSER(move) { DECLARE_COMMAND_PARSER(endcommands) { debugC(7, kDebugParser, "COMMAND_PARSER(endcommands) "); - _locationParser->popTables(); + parser->popTables(); // temporary trick to handle dialogue commands _locParseCtxt.endcommands = true; } -void Parallaction_ns::parseCommandFlags() { +void LocationParser_ns::parseCommandFlags() { int _si = _locParseCtxt.nextToken; CommandPtr cmd = _locParseCtxt.cmd; @@ -595,11 +687,11 @@ void Parallaction_ns::parseCommandFlags() { cmd->_flagsOn |= kFlagsEnter; } else if (!scumm_strnicmp(_tokens[_si], "no", 2)) { - byte _al = _localFlagNames->lookup(&_tokens[_si][2]); + byte _al = _vm->_localFlagNames->lookup(&_tokens[_si][2]); assert(_al != Table::notFound); cmd->_flagsOff |= 1 << (_al - 1); } else { - byte _al = _localFlagNames->lookup(_tokens[_si]); + byte _al = _vm->_localFlagNames->lookup(_tokens[_si]); assert(_al != Table::notFound); cmd->_flagsOn |= 1 << (_al - 1); } @@ -622,11 +714,11 @@ void Parallaction_ns::parseCommandFlags() { cmd->_flagsOn |= kFlagsEnter; } else if (!scumm_strnicmp(_tokens[_si], "no", 2)) { - byte _al = _globalTable->lookup(&_tokens[_si][2]); + byte _al = _vm->_globalTable->lookup(&_tokens[_si][2]); assert(_al != Table::notFound); cmd->_flagsOff |= 1 << (_al - 1); } else { - byte _al = _globalTable->lookup(_tokens[_si]); + byte _al = _vm->_globalTable->lookup(_tokens[_si]); assert(_al != Table::notFound); cmd->_flagsOn |= 1 << (_al - 1); } @@ -641,11 +733,11 @@ void Parallaction_ns::parseCommandFlags() { } -void Parallaction_ns::addCommand() { +void LocationParser_ns::addCommand() { _locParseCtxt.list->push_front(_locParseCtxt.cmd); // NOTE: command lists are written backwards in scripts } -void Parallaction_ns::createCommand(uint id) { +void LocationParser_ns::createCommand(uint id) { _locParseCtxt.nextToken = 1; _locParseCtxt.cmd = CommandPtr(new Command); @@ -653,7 +745,7 @@ void Parallaction_ns::createCommand(uint id) { } -void Parallaction_ns::saveCommandForward(const char *name, CommandPtr cmd) { +void LocationParser_ns::saveCommandForward(const char *name, CommandPtr cmd) { assert(_numForwardedCommands < MAX_FORWARDS); strcpy(_forwardedCommands[_numForwardedCommands].name, name); @@ -662,9 +754,9 @@ void Parallaction_ns::saveCommandForward(const char *name, CommandPtr cmd) { _numForwardedCommands++; } -void Parallaction_ns::resolveCommandForwards() { +void LocationParser_ns::resolveCommandForwards() { for (uint i = 0; i < _numForwardedCommands; i++) { - _forwardedCommands[i].cmd->u._zone = findZone(_forwardedCommands[i].name); + _forwardedCommands[i].cmd->u._zone = _vm->findZone(_forwardedCommands[i].name); if (_forwardedCommands[i].cmd->u._zone == 0) { warning("Cannot find zone '%s' into current location script. This may be a bug in the original scripts.\n", _forwardedCommands[i].name); } @@ -672,17 +764,17 @@ void Parallaction_ns::resolveCommandForwards() { _numForwardedCommands = 0; } -void Parallaction_ns::parseCommands(Script &script, CommandList& list) { +void LocationParser_ns::parseCommands(Script &script, CommandList& list) { debugC(5, kDebugParser, "parseCommands()"); _locParseCtxt.list = &list; _locParseCtxt.endcommands = false; _locParseCtxt.script = &script; - _locationParser->pushTables(&_commandParsers, _commandsNames); + parser->pushTables(&_commandParsers, _commandsNames); } -Dialogue *Parallaction_ns::parseDialogue(Script &script) { +Dialogue *LocationParser_ns::parseDialogue(Script &script) { debugC(7, kDebugParser, "parseDialogue()"); uint16 numQuestions = 0; @@ -711,7 +803,7 @@ Dialogue *Parallaction_ns::parseDialogue(Script &script) { return dialogue; } -Question *Parallaction_ns::parseQuestion(Script &script) { +Question *LocationParser_ns::parseQuestion(Script &script) { Question *question = new Question; assert(question); @@ -732,7 +824,7 @@ Question *Parallaction_ns::parseQuestion(Script &script) { return question; } -Answer *Parallaction_ns::parseAnswer(Script &script) { +Answer *LocationParser_ns::parseAnswer(Script &script) { Answer *answer = new Answer; assert(answer); @@ -744,11 +836,11 @@ Answer *Parallaction_ns::parseAnswer(Script &script) { if (!scumm_stricmp(_tokens[1], "global")) { token = 2; - flagNames = _globalTable; + flagNames = _vm->_globalTable; answer->_yesFlags |= kFlagsGlobal; } else { token = 1; - flagNames = _localFlagNames; + flagNames = _vm->_localFlagNames; } do { @@ -779,7 +871,7 @@ Answer *Parallaction_ns::parseAnswer(Script &script) { parseCommands(script, answer->_commands); _locParseCtxt.endcommands = false; do { - _locationParser->parseStatement(); + parser->parseStatement(); } while (!_locParseCtxt.endcommands); script.readLineToken(true); @@ -788,7 +880,7 @@ Answer *Parallaction_ns::parseAnswer(Script &script) { return answer; } -void Parallaction_ns::resolveDialogueForwards(Dialogue *dialogue, uint numQuestions, Table &forwards) { +void LocationParser_ns::resolveDialogueForwards(Dialogue *dialogue, uint numQuestions, Table &forwards) { for (uint16 i = 0; i < numQuestions; i++) { Question *question = dialogue->_questions[i]; @@ -811,7 +903,7 @@ void Parallaction_ns::resolveDialogueForwards(Dialogue *dialogue, uint numQuesti } -char *Parallaction_ns::parseDialogueString(Script &script) { +char *LocationParser_ns::parseDialogueString(Script &script) { char vC8[200]; char *vD0 = NULL; @@ -851,16 +943,16 @@ DECLARE_LOCATION_PARSER(location) { mask++; } - strcpy(_location._name, _tokens[1]); - switchBackground(_location._name, mask); + strcpy(_vm->_location._name, _tokens[1]); + _vm->switchBackground(_vm->_location._name, mask); if (_tokens[2][0] != '\0') { - _char._ani->_left = atoi(_tokens[2]); - _char._ani->_top = atoi(_tokens[3]); + _vm->_char._ani->_left = atoi(_tokens[2]); + _vm->_char._ani->_top = atoi(_tokens[3]); } if (_tokens[4][0] != '\0') { - _char._ani->_frame = atoi(_tokens[4]); + _vm->_char._ani->_frame = atoi(_tokens[4]); } } @@ -868,28 +960,28 @@ DECLARE_LOCATION_PARSER(location) { DECLARE_LOCATION_PARSER(disk) { debugC(7, kDebugParser, "LOCATION_PARSER(disk) "); - _disk->selectArchive(_tokens[1]); + _vm->_disk->selectArchive(_tokens[1]); } DECLARE_LOCATION_PARSER(nodes) { debugC(7, kDebugParser, "LOCATION_PARSER(nodes) "); - parseWalkNodes(*_locParseCtxt.script, _location._walkNodes); + parseWalkNodes(*_locParseCtxt.script, _vm->_location._walkNodes); } DECLARE_LOCATION_PARSER(zone) { debugC(7, kDebugParser, "LOCATION_PARSER(zone) "); - parseZone(*_locParseCtxt.script, _location._zones, _tokens[1]); + parseZone(*_locParseCtxt.script, _vm->_location._zones, _tokens[1]); } DECLARE_LOCATION_PARSER(animation) { debugC(7, kDebugParser, "LOCATION_PARSER(animation) "); - parseAnimation(*_locParseCtxt.script, _location._animations, _tokens[1]); + parseAnimation(*_locParseCtxt.script, _vm->_location._animations, _tokens[1]); } @@ -898,7 +990,7 @@ DECLARE_LOCATION_PARSER(localflags) { int _si = 1; while (_tokens[_si][0] != '\0') { - _localFlagNames->addData(_tokens[_si]); + _vm->_localFlagNames->addData(_tokens[_si]); _si++; } } @@ -907,28 +999,28 @@ DECLARE_LOCATION_PARSER(localflags) { DECLARE_LOCATION_PARSER(commands) { debugC(7, kDebugParser, "LOCATION_PARSER(commands) "); - parseCommands(*_locParseCtxt.script, _location._commands); + parseCommands(*_locParseCtxt.script, _vm->_location._commands); } DECLARE_LOCATION_PARSER(acommands) { debugC(7, kDebugParser, "LOCATION_PARSER(acommands) "); - parseCommands(*_locParseCtxt.script, _location._aCommands); + parseCommands(*_locParseCtxt.script, _vm->_location._aCommands); } DECLARE_LOCATION_PARSER(flags) { debugC(7, kDebugParser, "LOCATION_PARSER(flags) "); - if ((getLocationFlags() & kFlagsVisited) == 0) { + if ((_vm->getLocationFlags() & kFlagsVisited) == 0) { // only for 1st visit - clearLocationFlags(kFlagsAll); + _vm->clearLocationFlags(kFlagsAll); int _si = 1; do { - byte _al = _localFlagNames->lookup(_tokens[_si]); - setLocationFlags(1 << (_al - 1)); + byte _al = _vm->_localFlagNames->lookup(_tokens[_si]); + _vm->setLocationFlags(1 << (_al - 1)); _si++; if (scumm_stricmp(_tokens[_si], "|")) break; @@ -941,23 +1033,23 @@ DECLARE_LOCATION_PARSER(flags) { DECLARE_LOCATION_PARSER(comment) { debugC(7, kDebugParser, "LOCATION_PARSER(comment) "); - _location._comment = parseComment(*_locParseCtxt.script); + _vm->_location._comment = parseComment(*_locParseCtxt.script); } DECLARE_LOCATION_PARSER(endcomment) { debugC(7, kDebugParser, "LOCATION_PARSER(endcomment) "); - _location._endComment = parseComment(*_locParseCtxt.script); + _vm->_location._endComment = parseComment(*_locParseCtxt.script); } DECLARE_LOCATION_PARSER(sound) { debugC(7, kDebugParser, "LOCATION_PARSER(sound) "); - if (getPlatform() == Common::kPlatformAmiga) { - strcpy(_location._soundFile, _tokens[1]); - _location._hasSound = true; + if (_vm->getPlatform() == Common::kPlatformAmiga) { + strcpy(_vm->_location._soundFile, _tokens[1]); + _vm->_location._hasSound = true; } } @@ -965,55 +1057,30 @@ DECLARE_LOCATION_PARSER(sound) { DECLARE_LOCATION_PARSER(music) { debugC(7, kDebugParser, "LOCATION_PARSER(music) "); - if (getPlatform() == Common::kPlatformAmiga) - _soundMan->setMusicFile(_tokens[1]); + if (_vm->getPlatform() == Common::kPlatformAmiga) + _vm->_soundMan->setMusicFile(_tokens[1]); } - -void Parallaction_ns::parseLocation(const char *filename) { - debugC(1, kDebugParser, "parseLocation('%s')", filename); - - allocateLocationSlot(filename); -// printf("got location slot #%i for %s\n", _currentLocationIndex, filename); +void LocationParser_ns::parse(Script *script) { _numForwardedCommands = 0; - Script *script = _disk->loadLocation(filename); - _locationParser->bind(script); - - // TODO: the following two lines are specific to Nippon Safes - // and should be moved into something like 'initializeParsing()' - _location._hasSound = false; - _locParseCtxt.end = false; _locParseCtxt.script = script; - _locParseCtxt.filename = filename; + _locParseCtxt.filename = 0;//filename; - _locationParser->pushTables(&_locationParsers, _locationStmt); + parser->bind(script); + parser->pushTables(&_locationParsers, _locationStmt); do { - _locationParser->parseStatement(); + parser->parseStatement(); } while (!_locParseCtxt.end); - _locationParser->popTables(); - _locationParser->unbind(); - - delete script; + parser->popTables(); + parser->unbind(); resolveCommandForwards(); - - // this loads animation scripts - AnimationList::iterator it = _location._animations.begin(); - for ( ; it != _location._animations.end(); it++) { - if ((*it)->_scriptName) { - loadProgram(*it, (*it)->_scriptName); - } - } - - debugC(1, kDebugParser, "parseLocation('%s') done", filename); - return; } - -void Parallaction_ns::parseWalkNodes(Script& script, WalkNodeList &list) { +void LocationParser_ns::parseWalkNodes(Script& script, WalkNodeList &list) { debugC(5, kDebugParser, "parseWalkNodes()"); script.readLineToken(true); @@ -1039,46 +1106,29 @@ void Parallaction_ns::parseWalkNodes(Script& script, WalkNodeList &list) { typedef OpcodeImpl OpcodeV1; #define INSTRUCTION_PARSER(sig) OpcodeV1(this, &Parallaction_ns::instParse_##sig) -#define ZONE_PARSER(sig) OpcodeV1(this, &Parallaction_ns::locZoneParse_##sig) -#define ANIM_PARSER(sig) OpcodeV1(this, &Parallaction_ns::locAnimParse_##sig) -#define LOCATION_PARSER(sig) OpcodeV1(this, &Parallaction_ns::locParse_##sig) -#define COMMAND_PARSER(sig) OpcodeV1(this, &Parallaction_ns::cmdParse_##sig) -#define WARNING_PARSER(sig) OpcodeV1(this, &Parallaction_br::warning_##sig) +typedef OpcodeImpl OpcodeV2; +#define ZONE_PARSER(sig) OpcodeV2(this, &LocationParser_ns::locZoneParse_##sig) +#define ANIM_PARSER(sig) OpcodeV2(this, &LocationParser_ns::locAnimParse_##sig) +#define LOCATION_PARSER(sig) OpcodeV2(this, &LocationParser_ns::locParse_##sig) +#define COMMAND_PARSER(sig) OpcodeV2(this, &LocationParser_ns::cmdParse_##sig) -void Parallaction_ns::initParsers() { +#define WARNING_PARSER(sig) OpcodeV2(this, &LocationParser_br::warning_##sig) - _locationParser = new Parser; +void LocationParser_ns::init() { - static const OpcodeV1 op0[] = { - INSTRUCTION_PARSER(defLocal), // invalid opcode -> local definition - INSTRUCTION_PARSER(animation), // on - INSTRUCTION_PARSER(animation), // off - INSTRUCTION_PARSER(x), - INSTRUCTION_PARSER(y), - INSTRUCTION_PARSER(z), - INSTRUCTION_PARSER(f), - INSTRUCTION_PARSER(loop), - INSTRUCTION_PARSER(null), // endloop - INSTRUCTION_PARSER(null), // show - INSTRUCTION_PARSER(inc), - INSTRUCTION_PARSER(inc), // dec - INSTRUCTION_PARSER(set), - INSTRUCTION_PARSER(put), - INSTRUCTION_PARSER(call), - INSTRUCTION_PARSER(null), // wait - INSTRUCTION_PARSER(animation), // start - INSTRUCTION_PARSER(sound), - INSTRUCTION_PARSER(move), - INSTRUCTION_PARSER(endscript) - }; + parser = new Parser; - uint i; - for (i = 0; i < ARRAYSIZE(op0); i++) - _instructionParsers.push_back(&op0[i]); + _zoneFlagNames = new Table(ARRAYSIZE(_zoneFlagNamesRes_ns), _zoneFlagNamesRes_ns); + _zoneTypeNames = new Table(ARRAYSIZE(_zoneTypeNamesRes_ns), _zoneTypeNamesRes_ns); + _commandsNames = new Table(ARRAYSIZE(_commandsNamesRes_ns), _commandsNamesRes_ns); + _locationStmt = new Table(ARRAYSIZE(_locationStmtRes_ns), _locationStmtRes_ns); + _locationZoneStmt = new Table(ARRAYSIZE(_locationZoneStmtRes_ns), _locationZoneStmtRes_ns); + _locationAnimStmt = new Table(ARRAYSIZE(_locationAnimStmtRes_ns), _locationAnimStmtRes_ns); + uint i; - static const OpcodeV1 op2[] = { + static const OpcodeV2 op2[] = { WARNING_PARSER(unexpected), COMMAND_PARSER(flags), // set COMMAND_PARSER(flags), // clear @@ -1104,7 +1154,7 @@ void Parallaction_ns::initParsers() { _commandParsers.push_back(&op2[i]); - static const OpcodeV1 op4[] = { + static const OpcodeV2 op4[] = { WARNING_PARSER(unexpected), LOCATION_PARSER(endlocation), LOCATION_PARSER(location), @@ -1125,7 +1175,7 @@ void Parallaction_ns::initParsers() { for (i = 0; i < ARRAYSIZE(op4); i++) _locationParsers.push_back(&op4[i]); - static const OpcodeV1 op5[] = { + static const OpcodeV2 op5[] = { WARNING_PARSER(unexpected), ZONE_PARSER(limits), ZONE_PARSER(moveto), @@ -1139,7 +1189,7 @@ void Parallaction_ns::initParsers() { for (i = 0; i < ARRAYSIZE(op5); i++) _locationZoneParsers.push_back(&op5[i]); - static const OpcodeV1 op6[] = { + static const OpcodeV2 op6[] = { WARNING_PARSER(unexpected), ANIM_PARSER(script), ANIM_PARSER(commands), @@ -1155,13 +1205,46 @@ void Parallaction_ns::initParsers() { for (i = 0; i < ARRAYSIZE(op6); i++) _locationAnimParsers.push_back(&op6[i]); + +} + +void Parallaction_ns::initParsers() { + + _locationParser = new LocationParser_ns(this); + + static const OpcodeV1 op0[] = { + INSTRUCTION_PARSER(defLocal), // invalid opcode -> local definition + INSTRUCTION_PARSER(animation), // on + INSTRUCTION_PARSER(animation), // off + INSTRUCTION_PARSER(x), + INSTRUCTION_PARSER(y), + INSTRUCTION_PARSER(z), + INSTRUCTION_PARSER(f), + INSTRUCTION_PARSER(loop), + INSTRUCTION_PARSER(null), // endloop + INSTRUCTION_PARSER(null), // show + INSTRUCTION_PARSER(inc), + INSTRUCTION_PARSER(inc), // dec + INSTRUCTION_PARSER(set), + INSTRUCTION_PARSER(put), + INSTRUCTION_PARSER(call), + INSTRUCTION_PARSER(null), // wait + INSTRUCTION_PARSER(animation), // start + INSTRUCTION_PARSER(sound), + INSTRUCTION_PARSER(move), + INSTRUCTION_PARSER(endscript) + }; + + for (uint i = 0; i < ARRAYSIZE(op0); i++) + _instructionParsers.push_back(&op0[i]); + } // // a comment can appear both at location and Zone levels // comments are displayed into rectangles on the screen // -char *Parallaction_ns::parseComment(Script &script) { +char *LocationParser_ns::parseComment(Script &script) { char _tmp_comment[1000] = "\0"; char *v194; @@ -1192,7 +1275,7 @@ DECLARE_ZONE_PARSER(null) { DECLARE_ZONE_PARSER(endzone) { debugC(7, kDebugParser, "ZONE_PARSER(endzone) "); - _locationParser->popTables(); + parser->popTables(); } DECLARE_ZONE_PARSER(limits) { @@ -1217,7 +1300,7 @@ DECLARE_ZONE_PARSER(type) { debugC(7, kDebugParser, "ZONE_PARSER(type) "); if (_tokens[2][0] != '\0') { - _locParseCtxt.z->_type = (4 + _objectsNames->lookup(_tokens[2])) << 16; + _locParseCtxt.z->_type = (4 + _vm->_objectsNames->lookup(_tokens[2])) << 16; } int16 _si = _zoneTypeNames->lookup(_tokens[1]); if (_si != Table::notFound) { @@ -1225,7 +1308,7 @@ DECLARE_ZONE_PARSER(type) { parseZoneTypeBlock(*_locParseCtxt.script, _locParseCtxt.z); } - _locationParser->popTables(); + parser->popTables(); } @@ -1240,7 +1323,7 @@ DECLARE_ZONE_PARSER(label) { debugC(7, kDebugParser, "ZONE_PARSER(label) "); // printf("label: %s", _tokens[1]); - _locParseCtxt.z->_label = _gfx->renderFloatingLabel(_labelFont, _tokens[1]); + _locParseCtxt.z->_label = _vm->_gfx->renderFloatingLabel(_vm->_labelFont, _tokens[1]); } @@ -1256,10 +1339,10 @@ DECLARE_ZONE_PARSER(flags) { } while (!scumm_stricmp(_tokens[_si++], "|")); } -void Parallaction_ns::parseZone(Script &script, ZoneList &list, char *name) { +void LocationParser_ns::parseZone(Script &script, ZoneList &list, char *name) { debugC(5, kDebugParser, "parseZone(name: %s)", name); - if (findZone(name)) { + if (_vm->findZone(name)) { script.skip("endzone"); return; } @@ -1273,7 +1356,7 @@ void Parallaction_ns::parseZone(Script &script, ZoneList &list, char *name) { list.push_front(z); - _locationParser->pushTables(&_locationZoneParsers, _locationZoneStmt); + parser->pushTables(&_locationZoneParsers, _locationZoneStmt); return; } @@ -1281,7 +1364,7 @@ void Parallaction_ns::parseZone(Script &script, ZoneList &list, char *name) { -void Parallaction_ns::parseGetData(Script &script, ZonePtr z) { +void LocationParser_ns::parseGetData(Script &script, ZonePtr z) { GetData *data = new GetData; @@ -1291,17 +1374,17 @@ void Parallaction_ns::parseGetData(Script &script, ZonePtr z) { bool visible = (z->_flags & kFlagsRemove) == 0; - GfxObj *obj = _gfx->loadGet(_tokens[1]); + GfxObj *obj = _vm->_gfx->loadGet(_tokens[1]); obj->frame = 0; obj->x = z->_left; obj->y = z->_top; - _gfx->showGfxObj(obj, visible); + _vm->_gfx->showGfxObj(obj, visible); data->gfxobj = obj; } if (!scumm_stricmp(_tokens[0], "icon")) { - data->_icon = 4 + _objectsNames->lookup(_tokens[1]); + data->_icon = 4 + _vm->_objectsNames->lookup(_tokens[1]); } script.readLineToken(true); @@ -1312,7 +1395,7 @@ void Parallaction_ns::parseGetData(Script &script, ZonePtr z) { } -void Parallaction_ns::parseExamineData(Script &script, ZonePtr z) { +void LocationParser_ns::parseExamineData(Script &script, ZonePtr z) { ExamineData *data = new ExamineData; @@ -1333,16 +1416,16 @@ void Parallaction_ns::parseExamineData(Script &script, ZonePtr z) { } -void Parallaction_ns::parseDoorData(Script &script, ZonePtr z) { +void LocationParser_ns::parseDoorData(Script &script, ZonePtr z) { DoorData *data = new DoorData; do { if (!scumm_stricmp(_tokens[0], "slidetext")) { - strcpy(_slideText[0], _tokens[1]); + strcpy(_vm->_location._slideText[0], _tokens[1]); // printf("%s\t", _slideText[0]); - strcpy(_slideText[1], _tokens[2]); + strcpy(_vm->_location._slideText[1], _tokens[2]); } if (!scumm_stricmp(_tokens[0], "location")) { @@ -1354,11 +1437,11 @@ void Parallaction_ns::parseDoorData(Script &script, ZonePtr z) { uint16 frame = (z->_flags & kFlagsClosed ? 0 : 1); - GfxObj *obj = _gfx->loadDoor(_tokens[1]); + GfxObj *obj = _vm->_gfx->loadDoor(_tokens[1]); obj->frame = frame; obj->x = z->_left; obj->y = z->_top; - _gfx->showGfxObj(obj, true); + _vm->_gfx->showGfxObj(obj, true); data->gfxobj = obj; } @@ -1377,20 +1460,20 @@ void Parallaction_ns::parseDoorData(Script &script, ZonePtr z) { } -void Parallaction_ns::parseMergeData(Script &script, ZonePtr z) { +void LocationParser_ns::parseMergeData(Script &script, ZonePtr z) { MergeData *data = new MergeData; do { if (!scumm_stricmp(_tokens[0], "obj1")) { - data->_obj1 = 4 + _objectsNames->lookup(_tokens[1]); + data->_obj1 = 4 + _vm->_objectsNames->lookup(_tokens[1]); } if (!scumm_stricmp(_tokens[0], "obj2")) { - data->_obj2 = 4 + _objectsNames->lookup(_tokens[1]); + data->_obj2 = 4 + _vm->_objectsNames->lookup(_tokens[1]); } if (!scumm_stricmp(_tokens[0], "newobj")) { - data->_obj3 = 4 + _objectsNames->lookup(_tokens[1]); + data->_obj3 = 4 + _vm->_objectsNames->lookup(_tokens[1]); } script.readLineToken(true); @@ -1400,7 +1483,7 @@ void Parallaction_ns::parseMergeData(Script &script, ZonePtr z) { } -void Parallaction_ns::parseHearData(Script &script, ZonePtr z) { +void LocationParser_ns::parseHearData(Script &script, ZonePtr z) { HearData *data = new HearData; @@ -1421,7 +1504,7 @@ void Parallaction_ns::parseHearData(Script &script, ZonePtr z) { } -void Parallaction_ns::parseSpeakData(Script &script, ZonePtr z) { +void LocationParser_ns::parseSpeakData(Script &script, ZonePtr z) { SpeakData *data = new SpeakData; @@ -1442,7 +1525,7 @@ void Parallaction_ns::parseSpeakData(Script &script, ZonePtr z) { } -void Parallaction_ns::parseZoneTypeBlock(Script &script, ZonePtr z) { +void LocationParser_ns::parseZoneTypeBlock(Script &script, ZonePtr z) { debugC(7, kDebugParser, "parseZoneTypeBlock(name: %s, type: %x)", z->_name, z->_type); switch (z->_type & 0xFFFF) { diff --git a/engines/parallaction/staticres.cpp b/engines/parallaction/staticres.cpp index 53d370a0a8..3c2051795d 100644 --- a/engines/parallaction/staticres.cpp +++ b/engines/parallaction/staticres.cpp @@ -216,58 +216,6 @@ byte _amigaTopazFont[2600] = { }; - -const char *_zoneFlagNamesRes_ns[] = { - "closed", - "active", - "remove", - "acting", - "locked", - "fixed", - "noname", - "nomasked", - "looping", - "added", - "character", - "nowalk" -}; - -const char *_zoneTypeNamesRes_ns[] = { - "examine", - "door", - "get", - "merge", - "taste", - "hear", - "feel", - "speak", - "none", - "trap", - "yourself", - "Command" -}; - -const char *_commandsNamesRes_ns[] = { - "set", - "clear", - "start", - "speak", - "get", - "location", - "open", - "close", - "on", - "off", - "call", - "toggle", - "drop", - "quit", - "move", - "stop", - "endcommands", - "endzone" -}; - const char *_instructionNamesRes_ns[] = { "on", "off", @@ -318,80 +266,6 @@ const char *_callableNamesRes_ns[] = { "TestResult" }; -const char *_locationStmtRes_ns[] = { - "endlocation", - "location", - "disk", - "nodes", - "zone", - "animation", - "localflags", - "commands", - "acommands", - "flags", - "comment", - "endcomment", - "sound", - "music" -}; - -const char *_locationZoneStmtRes_ns[] = { - "limits", - "moveto", - "type", - "commands", - "label", - "flags", - "endzone" -}; - -const char *_locationAnimStmtRes_ns[] = { - "script", - "commands", - "type", - "label", - "flags", - "file", - "position", - "moveto", - "endanimation" -}; - -const char *_zoneTypeNamesRes_br[] = { - "examine", - "door", - "get", - "merge", - "taste", - "hear", - "feel", - "speak", - "none", - "trap", - "you", - "command", - "path", - "box" -}; - -const char *_zoneFlagNamesRes_br[] = { - "closed", - "active", - "remove", - "acting", - "locked", - "fixed", - "noname", - "nomasked", - "looping", - "added", - "character", - "nowalk", - "yourself", - "scaled", - "selfuse" -}; - const char *_instructionNamesRes_br[] = { "on", "off", @@ -426,52 +300,6 @@ const char *_instructionNamesRes_br[] = { "endscript" }; -const char *_commandsNamesRes_br[] = { - "set", - "clear", - "start", - "speak", - "get", - "location", - "open", - "close", - "on", - "off", - "call", - "toggle", - "drop", - "quit", - "move", - "stop", - "character", - "followme", - "onmouse", - "offmouse", - "add", - "leave", - "inc", - "dec", - "test", - "dummy", - "dummy", - "let", - "music", - "fix", - "unfix", - "zeta", - "scroll", - "swap", - "give", - "text", - "part", - "dummy", - "return", - "onsave", - "offsave", - "endcommands", - "ifchar", - "endif" -}; const char *_callableNamesRes_br[] = { "blufade", @@ -482,72 +310,6 @@ const char *_callableNamesRes_br[] = { "password" }; -const char *_audioCommandsNamesRes_br[] = { - "play", - "stop", - "pause", - "channel_level", - "fadein", - "fadeout", - "volume", - " ", - "faderate", - " ", - " ", - " ", - " ", - " ", - " ", - " ", - "loop" -}; - -const char *_locationStmtRes_br[] = { - "character", - "endlocation", - "ifchar", - "endif", - "location", - "mask", - "path", - "disk", - "localflags", - "commands", - "escape", - "acommands", - "flags", - "comment", - "endcomment", - "zone", - "animation", - "zeta", - "music", - "sound" -}; - -const char *_locationZoneStmtRes_br[] = { - "endzone", - "limits", - "moveto", - "type", - "commands", - "label", - "flags" -}; - -const char *_locationAnimStmtRes_br[] = { - "endanimation", - "endzone", - "script", - "commands", - "type", - "label", - "flags", - "file", - "position", - "moveto" -}; - const char *_dinoName = "dino"; const char *_donnaName = "donna"; const char *_doughName = "dough"; @@ -629,20 +391,14 @@ const Parallaction_br::Callable Parallaction_br::_dosCallables[] = { void Parallaction_ns::initResources() { - _zoneFlagNamesRes = _zoneFlagNamesRes_ns; - _zoneTypeNamesRes = _zoneTypeNamesRes_ns; - _commandsNamesRes = _commandsNamesRes_ns; +// _zoneFlagNamesRes = _zoneFlagNamesRes_ns; +// _zoneTypeNamesRes = _zoneTypeNamesRes_ns; +// _commandsNamesRes = _commandsNamesRes_ns; _callableNamesRes = _callableNamesRes_ns; _instructionNamesRes = _instructionNamesRes_ns; _callableNames = new Table(ARRAYSIZE(_callableNamesRes_ns), _callableNamesRes_ns); _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes_ns), _instructionNamesRes_ns); - _zoneFlagNames = new Table(ARRAYSIZE(_zoneFlagNamesRes_ns), _zoneFlagNamesRes_ns); - _zoneTypeNames = new Table(ARRAYSIZE(_zoneTypeNamesRes_ns), _zoneTypeNamesRes_ns); - _commandsNames = new Table(ARRAYSIZE(_commandsNamesRes_ns), _commandsNamesRes_ns); - _locationStmt = new Table(ARRAYSIZE(_locationStmtRes_ns), _locationStmtRes_ns); - _locationZoneStmt = new Table(ARRAYSIZE(_locationZoneStmtRes_ns), _locationZoneStmtRes_ns); - _locationAnimStmt = new Table(ARRAYSIZE(_locationAnimStmtRes_ns), _locationAnimStmtRes_ns); _localFlagNames = new FixedTable(NUM_LOCATIONS, 1); _localFlagNames->addData("visited"); @@ -657,22 +413,15 @@ void Parallaction_ns::initResources() { void Parallaction_br::initResources() { - _zoneFlagNamesRes = _zoneFlagNamesRes_br; - _zoneTypeNamesRes = _zoneTypeNamesRes_br; - _commandsNamesRes = _commandsNamesRes_br; +// _zoneFlagNamesRes = _zoneFlagNamesRes_br; +// _zoneTypeNamesRes = _zoneTypeNamesRes_br; +// _commandsNamesRes = _commandsNamesRes_br; _callableNamesRes = _callableNamesRes_br; _instructionNamesRes = _instructionNamesRes_br; - _audioCommandsNamesRes = _audioCommandsNamesRes_br; +// _audioCommandsNamesRes = _audioCommandsNamesRes_br; _callableNames = new Table(ARRAYSIZE(_callableNamesRes_br), _callableNamesRes_br); _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes_br), _instructionNamesRes_br); - _zoneFlagNames = new Table(ARRAYSIZE(_zoneFlagNamesRes_br), _zoneFlagNamesRes_br); - _zoneTypeNames = new Table(ARRAYSIZE(_zoneTypeNamesRes_br), _zoneTypeNamesRes_br); - _commandsNames = new Table(ARRAYSIZE(_commandsNamesRes_br), _commandsNamesRes_br); - _audioCommandsNames = new Table(ARRAYSIZE(_audioCommandsNamesRes_br), _audioCommandsNamesRes_br); - _locationStmt = new Table(ARRAYSIZE(_locationStmtRes_br), _locationStmtRes_br); - _locationZoneStmt = new Table(ARRAYSIZE(_locationZoneStmtRes_br), _locationZoneStmtRes_br); - _locationAnimStmt = new Table(ARRAYSIZE(_locationAnimStmtRes_br), _locationAnimStmtRes_br); _localFlagNames = new FixedTable(NUM_LOCATIONS, 2); _localFlagNames->addData("visited"); -- cgit v1.2.3 From c7c8bb99eefa3b19bc25fa921cd93255489656c5 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Fri, 9 May 2008 01:42:25 +0000 Subject: Tiny cleanup to ease extraction of the program parser code. svn-id: r31959 --- engines/parallaction/exec_br.cpp | 2 +- engines/parallaction/exec_ns.cpp | 12 +----------- engines/parallaction/objects.cpp | 10 ++++++++++ engines/parallaction/objects.h | 2 ++ engines/parallaction/parallaction.h | 1 - 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp index e4859a8851..9484c99585 100644 --- a/engines/parallaction/exec_br.cpp +++ b/engines/parallaction/exec_br.cpp @@ -399,7 +399,7 @@ DECLARE_INSTRUCTION_OPCODE(inc) { } if (inst->_opA._flags & kParaLocal) { - wrapLocalVar(inst->_opA._local); + inst->_opA._local->wrap(); } } diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index b1889daa21..06969fd01d 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -107,7 +107,7 @@ DECLARE_INSTRUCTION_OPCODE(inc) { } if (inst->_opA._flags & kParaLocal) { - wrapLocalVar(inst->_opA._local); + inst->_opA._local->wrap(); } } @@ -189,16 +189,6 @@ DECLARE_INSTRUCTION_OPCODE(endscript) { -void Parallaction_ns::wrapLocalVar(LocalVariable *local) { - - if (local->_value >= local->_max) - local->_value = local->_min; - if (local->_value < local->_min) - local->_value = local->_max - 1; - - return; -} - DECLARE_COMMAND_OPCODE(invalid) { error("Can't execute invalid command '%i'", _cmdRunCtxt.cmd->_id); diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp index 0491c5c3c7..cac31911f4 100644 --- a/engines/parallaction/objects.cpp +++ b/engines/parallaction/objects.cpp @@ -116,6 +116,16 @@ int16 Program::addLocal(const char *name, int16 value, int16 min, int16 max) { return _numLocals++; } +void LocalVariable::wrap() { + + if (_value >= _max) + _value = _min; + if (_value < _min) + _value = _max - 1; + + return; +} + Zone::Zone() { diff --git a/engines/parallaction/objects.h b/engines/parallaction/objects.h index da9eaac95f..afa6cc5ed5 100644 --- a/engines/parallaction/objects.h +++ b/engines/parallaction/objects.h @@ -316,6 +316,8 @@ struct LocalVariable { _min = -10000; _max = 10000; } + + void wrap(); }; enum ParaFlags { diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index b32278bfaa..b3e93ee83f 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -683,7 +683,6 @@ protected: void loadProgram(AnimationPtr a, const char *filename); void parseLValue(ScriptVar &var, const char *str); virtual void parseRValue(ScriptVar &var, const char *str); - void wrapLocalVar(LocalVariable *local); DECLARE_UNQUALIFIED_COMMAND_OPCODE(invalid); DECLARE_UNQUALIFIED_COMMAND_OPCODE(set); -- cgit v1.2.3 From 420d376a9004a60c0443c74c07554506ad2344c6 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Fri, 9 May 2008 01:58:12 +0000 Subject: Added the option to specify the custom path for loading plugins svn-id: r31960 --- base/plugins.cpp | 14 +++++++++++++- gui/options.cpp | 35 +++++++++++++++++++++++++++++++++++ gui/options.h | 3 +++ gui/theme-config.cpp | 3 +++ gui/themes/classic080.ini | 3 +++ gui/themes/modern.ini | 3 +++ 6 files changed, 60 insertions(+), 1 deletion(-) diff --git a/base/plugins.cpp b/base/plugins.cpp index 9e2c2599ce..aa813297fc 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -26,6 +26,10 @@ #include "base/plugins.h" #include "common/util.h" +#ifdef DYNAMIC_MODULES +#include "common/config-manager.h" +#endif + int pluginTypeVersions[PLUGIN_TYPE_MAX] = { PLUGIN_TYPE_ENGINE_VERSION, }; @@ -168,13 +172,21 @@ PluginList FilePluginProvider::getPlugins() { // Prepare the list of directories to search Common::StringList pluginDirs; - // TODO: Add the user specified directory (via config file) + + // Add the default directories pluginDirs.push_back("."); pluginDirs.push_back("plugins"); // Add the provider's custom directories addCustomDirectories(pluginDirs); + // Add the user specified directory + Common::String pluginsPath(ConfMan.get("pluginspath")); + if (!pluginsPath.empty()) { + FilesystemNode dir(pluginsPath); + pluginDirs.push_back(dir.getPath()); + } + Common::StringList::const_iterator d; for (d = pluginDirs.begin(); d != pluginDirs.end(); d++) { // Load all plugins. diff --git a/gui/options.cpp b/gui/options.cpp index 7972ceebb2..d6f5306ce2 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -55,6 +55,7 @@ enum { kChooseSaveDirCmd = 'chos', kChooseThemeDirCmd = 'chth', kChooseExtraDirCmd = 'chex', + kChoosePluginsDirCmd = 'chpl', kChooseThemeCmd = 'chtf' }; @@ -706,6 +707,11 @@ GlobalOptionsDialog::GlobalOptionsDialog() new ButtonWidget(tab, "globaloptions_extrabutton", "Extra Path:", kChooseExtraDirCmd, 0); _extraPath = new StaticTextWidget(tab, "globaloptions_extrapath", "None"); + +#ifdef DYNAMIC_MODULES + new ButtonWidget(tab, "globaloptions_pluginsbutton", "Plugins Path:", kChoosePluginsDirCmd, 0); + _pluginsPath = new StaticTextWidget(tab, "globaloptions_pluginspath", "None"); +#endif #endif #ifdef SMALL_SCREEN_DEVICE @@ -772,6 +778,15 @@ void GlobalOptionsDialog::open() { } else { _extraPath->setLabel(extraPath); } + +#ifdef DYNAMIC_MODULES + Common::String pluginsPath(ConfMan.get("pluginspath", _domain)); + if (pluginsPath.empty() || !ConfMan.hasKey("pluginspath", _domain)) { + _pluginsPath->setLabel("None"); + } else { + _pluginsPath->setLabel(pluginsPath); + } +#endif #endif // Misc Tab @@ -801,6 +816,14 @@ void GlobalOptionsDialog::close() { else ConfMan.removeKey("extrapath", _domain); +#ifdef DYNAMIC_MODULES + String pluginsPath(_pluginsPath->getLabel()); + if (!pluginsPath.empty() && (pluginsPath != "None")) + ConfMan.set("pluginspath", pluginsPath, _domain); + else + ConfMan.removeKey("pluginspath", _domain); +#endif + ConfMan.setInt("autosave_period", _autosavePeriodPopUp->getSelectedTag(), _domain); } OptionsDialog::close(); @@ -844,6 +867,18 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3 } break; } +#ifdef DYNAMIC_MODULES + case kChoosePluginsDirCmd: { + BrowserDialog browser("Select directory for plugins", true); + if (browser.runModal() > 0) { + // User made his choice... + FilesystemNode dir(browser.getResult()); + _pluginsPath->setLabel(dir.getPath()); + draw(); + } + break; + } +#endif case kChooseSoundFontCmd: { BrowserDialog browser("Select SoundFont", false); if (browser.runModal() > 0) { diff --git a/gui/options.h b/gui/options.h index 6f0fccf3cb..8f4496c753 100644 --- a/gui/options.h +++ b/gui/options.h @@ -158,6 +158,9 @@ protected: StaticTextWidget *_savePath; StaticTextWidget *_themePath; StaticTextWidget *_extraPath; +#ifdef DYNAMIC_MODULES + StaticTextWidget *_pluginsPath; +#endif // // Misc controls diff --git a/gui/theme-config.cpp b/gui/theme-config.cpp index e6d8026edb..47f60d3d7b 100644 --- a/gui/theme-config.cpp +++ b/gui/theme-config.cpp @@ -215,6 +215,9 @@ const char *Theme::_defaultConfigINI = "globaloptions_themebutton=10 yoffset (buttonWidth + 5) buttonHeight\n" "globaloptions_themepath=(prev.x2 + 20) (yoffset + glOff) (parent.w - (prev.w + 20) - 15) kLineHeight\n" "yoffset=(yoffset + buttonHeight + 4)\n" +"globaloptions_pluginsbutton=10 yoffset (buttonWidth + 5) buttonHeight\n" +"globaloptions_pluginspath=(prev.x2 + 20) (yoffset + glOff) (parent.w - (prev.w + 20) - 15) kLineHeight\n" +"yoffset=(yoffset + buttonHeight + 4)\n" "globaloptions_keysbutton=10 yoffset (buttonWidth + 5) buttonHeight\n" "\n" "# Misc options\n" diff --git a/gui/themes/classic080.ini b/gui/themes/classic080.ini index 23d91b701e..b5c911bada 100644 --- a/gui/themes/classic080.ini +++ b/gui/themes/classic080.ini @@ -134,6 +134,9 @@ yoffset=(yoffset + buttonHeight + 4) globaloptions_themebutton=10 yoffset (buttonWidth + 5) buttonHeight globaloptions_themepath=(prev.x2 + 20) (yoffset + glOff) (parent.w - (prev.w + 20) - 15) kLineHeight yoffset=(yoffset + buttonHeight + 4) +globaloptions_pluginsbutton=10 yoffset (buttonWidth + 5) buttonHeight +globaloptions_pluginspath=(prev.x2 + 20) (yoffset + glOff) (parent.w - (prev.w + 20) - 15) kLineHeight +yoffset=(yoffset + buttonHeight + 4) globaloptions_keysbutton=10 yoffset (buttonWidth + 5) buttonHeight # Misc options diff --git a/gui/themes/modern.ini b/gui/themes/modern.ini index b5929511b0..87ef0bcbb9 100644 --- a/gui/themes/modern.ini +++ b/gui/themes/modern.ini @@ -295,6 +295,9 @@ yoffset=(yoffset + buttonHeight + ySeparation) globaloptions_themebutton=xBorder yoffset buttonWidth buttonHeight globaloptions_themepath=(prev.x2 + xSeparation) (yoffset + glOff) (parent.w - self.x - xBorder) kLineHeight yoffset=(yoffset + buttonHeight + ySeparation) +globaloptions_pluginsbutton=xBorder yoffset buttonWidth buttonHeight +globaloptions_pluginspath=(prev.x2 + xSeparation) (yoffset + glOff) (parent.w - self.x - xBorder) kLineHeight +yoffset=(yoffset + buttonHeight + ySeparation) globaloptions_keysbutton=xBorder yoffset buttonWidth buttonHeight # Misc options -- cgit v1.2.3 From 55e4b05b185622194d644f5b27490e33cda8c483 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Fri, 9 May 2008 07:22:22 +0000 Subject: - Fixed a bug which sometimes caused crashes when ProjectReader::purgeCache() was called - Some cleanup svn-id: r31961 --- engines/made/resource.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp index 7151f2424a..8c9125127a 100644 --- a/engines/made/resource.cpp +++ b/engines/made/resource.cpp @@ -372,7 +372,7 @@ bool ProjectReader::loadResource(ResourceSlot *slot, byte *&buffer, uint32 &size if (slot && slot->size > 0) { size = slot->size - 62; buffer = new byte[size]; - debug(2, "ProjectReader::loadResource() %08X\n", slot->offs + 62); fflush(stdout); + debug(2, "ProjectReader::loadResource() %08X", slot->offs + 62); _fd->seek(slot->offs + 62); _fd->read(buffer, size); return true; @@ -384,8 +384,7 @@ bool ProjectReader::loadResource(ResourceSlot *slot, byte *&buffer, uint32 &size ResourceSlot *ProjectReader::getResourceSlot(uint32 resType, uint index) { ResourceSlots *slots = _resSlots[resType]; if (index >= 1 && index < slots->size()) { - ResourceSlot *slot = &slots->operator[](index); - return slot; + return &slots->operator[](index); } else { return NULL; } @@ -398,22 +397,20 @@ Resource *ProjectReader::getResourceFromCache(ResourceSlot *slot) { } void ProjectReader::addResourceToCache(ResourceSlot *slot, Resource *res) { - if (_cacheCount >= kMaxResourceCacheCount) { + if (_cacheCount >= kMaxResourceCacheCount) purgeCache(); - } slot->res = res; - slot->refCount = 0; + slot->refCount = 1; _cacheCount++; } void ProjectReader::tossResourceFromCache(ResourceSlot *slot) { - if (slot->res) { + if (slot->res) slot->refCount--; - } } void ProjectReader::purgeCache() { - printf("ProjectReader::purgeCache()\n"); + debug(2, "ProjectReader::purgeCache()"); for (ResMap::const_iterator resTypeIter = _resSlots.begin(); resTypeIter != _resSlots.end(); ++resTypeIter) { ResourceSlots *slots = (*resTypeIter)._value; for (ResourceSlots::iterator slotIter = slots->begin(); slotIter != slots->end(); ++slotIter) { -- cgit v1.2.3 From b222d0c5390b052fadeb6eec67e425e354a8401c Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Fri, 9 May 2008 10:56:03 +0000 Subject: Added workaround for o1_SNDENERGY svn-id: r31962 --- engines/made/scriptfuncs_rtz.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp index 20a3af164c..2cf0e3bc03 100644 --- a/engines/made/scriptfuncs_rtz.cpp +++ b/engines/made/scriptfuncs_rtz.cpp @@ -552,9 +552,9 @@ int16 ScriptFunctionsRtz::o1_SNDENERGY(int16 argc, int16 *argv) { // This is called while in-game voices are played // Not sure what it's used for // -> It's used to animate mouths when NPCs are talking - // Commented out to reduce spam - //warning("Unimplemented opcode: o1_SNDENERGY"); - return 0; + // FIXME: This is a workaround for the "sound energy" problem + // At least the characters move their lips when talking now + return _vm->_rnd->getRandomNumber(5); } int16 ScriptFunctionsRtz::o1_CLEARTEXT(int16 argc, int16 *argv) { -- cgit v1.2.3 From 601f0efdd48139657096b5262c482c1bfc4bd470 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 9 May 2008 12:23:19 +0000 Subject: Removed now obsolete FIXME svn-id: r31964 --- engines/made/screen.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index f2888cada7..c88244a8a2 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -599,10 +599,8 @@ void Screen::flash(int flashCount) { void Screen::setFont(int16 fontNum) { if (fontNum == _currentFontNum) return; - // FIXME: this causes crashes when - // ProjectReader::purgeCache() is called - //if (_font) - // _vm->_res->freeResource(_font); + if (_font) + _vm->_res->freeResource(_font); _font = _vm->_res->getFont(fontNum); _currentFontNum = fontNum; } -- cgit v1.2.3 From a83d79bafd5b4e15d4e4fbfbed35ab2ea878dc12 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 9 May 2008 13:33:31 +0000 Subject: Fixed typos. svn-id: r31965 --- engines/kyra/sound.h | 16 ++++++++-------- engines/kyra/sound_adlib.cpp | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h index 4efe6779bd..58681d45ef 100644 --- a/engines/kyra/sound.h +++ b/engines/kyra/sound.h @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * LPGL License + * LGPL License * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -61,7 +61,7 @@ namespace Kyra { /** * Analog audio output device API for Kyrandia games. - * It countains functionallity to play music tracks, + * It contains functionality to play music tracks, * sound effects and voices. */ class Sound { @@ -92,7 +92,7 @@ public: virtual void process() {} /** - * Updates internal volume settings according to ConfigManager + * Updates internal volume settings according to ConfigManager. */ virtual void updateVolumeSettings() {} @@ -105,7 +105,7 @@ public: virtual void setSoundList(const AudioDataStruct *list) { _soundDataList = list; } /** - * Checks if a given sound file is present + * Checks if a given sound file is present. * * @param track track number * @return true if available, false otherwise @@ -126,19 +126,19 @@ public: virtual void playTrack(uint8 track) = 0; /** - * Stop playback of the current track + * Stop playback of the current track. */ virtual void haltTrack() = 0; /** - * Plays the specified sound effect + * Plays the specified sound effect. * * @param track sound effect id */ virtual void playSoundEffect(uint8 track) = 0; /** - * Checks if the sound driver plays any sound + * Checks if the sound driver plays any sound. * * @return true if playing, false otherwise */ @@ -535,7 +535,7 @@ public: void stopSound(int channel); /** - * Stops playback of all sounds + * Stops playback of all sounds. */ void stopAllSounds(); diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp index b744579c98..e227d1fc46 100644 --- a/engines/kyra/sound_adlib.cpp +++ b/engines/kyra/sound_adlib.cpp @@ -18,7 +18,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - * LPGL License + * LGPL License * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public -- cgit v1.2.3 From 3f3ba85bf1d0dec2e4b62b4f843e94ec6e3597f2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 9 May 2008 15:49:38 +0000 Subject: Exit more gracefully when a quit event is triggered svn-id: r31966 --- engines/made/scriptfuncs_lgop2.cpp | 3 +-- engines/made/scriptfuncs_mhne.cpp | 3 +-- engines/made/scriptfuncs_rtz.cpp | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/engines/made/scriptfuncs_lgop2.cpp b/engines/made/scriptfuncs_lgop2.cpp index e563e57cac..cd861da81f 100644 --- a/engines/made/scriptfuncs_lgop2.cpp +++ b/engines/made/scriptfuncs_lgop2.cpp @@ -174,8 +174,7 @@ int16 ScriptFunctionsLgop2::o1_EVENT(int16 argc, int16 *argv) { break; case Common::EVENT_QUIT: - // TODO: Exit more gracefully. - g_system->quit(); + _vm->_quit = true; break; default: diff --git a/engines/made/scriptfuncs_mhne.cpp b/engines/made/scriptfuncs_mhne.cpp index f8e02365b0..bfec0a883d 100644 --- a/engines/made/scriptfuncs_mhne.cpp +++ b/engines/made/scriptfuncs_mhne.cpp @@ -179,8 +179,7 @@ int16 ScriptFunctionsMhne::o1_EVENT(int16 argc, int16 *argv) { break; case Common::EVENT_QUIT: - // TODO: Exit more gracefully. - g_system->quit(); + _vm->_quit = true; break; default: diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp index 2cf0e3bc03..7dd8246df0 100644 --- a/engines/made/scriptfuncs_rtz.cpp +++ b/engines/made/scriptfuncs_rtz.cpp @@ -222,8 +222,7 @@ int16 ScriptFunctionsRtz::o1_EVENT(int16 argc, int16 *argv) { break; case Common::EVENT_QUIT: - // TODO: Exit more gracefully. - g_system->quit(); + _vm->_quit = true; break; default: -- cgit v1.2.3 From 10826a29d2f9ae9b05f8663c742f0ebe7682cef3 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 9 May 2008 16:09:46 +0000 Subject: Removed debug output svn-id: r31967 --- engines/made/database.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/made/database.cpp b/engines/made/database.cpp index ea48fdedbe..4862d4706d 100644 --- a/engines/made/database.cpp +++ b/engines/made/database.cpp @@ -343,7 +343,7 @@ bool GameDatabase::getSavegameDescription(const char *filename, Common::String & in->read(desc, 64); description = desc; - printf("description = %s\n", description.c_str()); fflush(stdout); + //printf("description = %s\n", description.c_str()); fflush(stdout); delete in; -- cgit v1.2.3 From e0b9dec7666887f252a4a6af9d9b44a71f9a6275 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 9 May 2008 16:11:01 +0000 Subject: Implemented o1_CLIPAREA svn-id: r31968 --- engines/made/screen.h | 8 ++++++++ engines/made/scriptfuncs_rtz.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/engines/made/screen.h b/engines/made/screen.h index d267b84c30..d46ad254f0 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -70,6 +70,14 @@ public: void setPaletteLock(bool lock) { _paletteLock = lock; } void setVisualEffectNum(int visualEffectNum) { _visualEffectNum = visualEffectNum; } void setClip(uint16 clip) { _clip = clip; } + + void setClipArea(uint16 x1, uint16 y1, uint16 x2, uint16 y2) { + _clipArea.x = x1; + _clipArea.y = y1; + _clipArea.w = ABS(x2 - x1); + _clipArea.h = ABS(y2 - y1); + } + void setExclude(uint16 exclude) { _exclude = exclude; } void setGround(uint16 ground) { _ground = ground; } void setTextColor(int16 color) { _textColor = color; } diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp index 7dd8246df0..df2a0af527 100644 --- a/engines/made/scriptfuncs_rtz.cpp +++ b/engines/made/scriptfuncs_rtz.cpp @@ -477,7 +477,7 @@ int16 ScriptFunctionsRtz::o1_RESTEXT(int16 argc, int16 *argv) { } int16 ScriptFunctionsRtz::o1_CLIPAREA(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_CLIPAREA"); + _vm->_screen->setClipArea(argv[3], argv[2], argv[1], argv[0]); return 0; } -- cgit v1.2.3 From 271ce258232e6cf17ac8e6a6b845623d39274aae Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 9 May 2008 19:29:17 +0000 Subject: The backspace key is now working svn-id: r31969 --- engines/made/scriptfuncs_lgop2.cpp | 4 ++++ engines/made/scriptfuncs_mhne.cpp | 4 ++++ engines/made/scriptfuncs_rtz.cpp | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/engines/made/scriptfuncs_lgop2.cpp b/engines/made/scriptfuncs_lgop2.cpp index cd861da81f..70f265a17d 100644 --- a/engines/made/scriptfuncs_lgop2.cpp +++ b/engines/made/scriptfuncs_lgop2.cpp @@ -170,6 +170,10 @@ int16 ScriptFunctionsLgop2::o1_EVENT(int16 argc, int16 *argv) { case Common::EVENT_KEYDOWN: _vm->_eventKey = event.kbd.ascii; + // For unknown reasons, the game accepts ASCII code + // 9 as backspace + if (_vm->_eventKey == Common::KEYCODE_BACKSPACE) + _vm->_eventKey = 9; eventNum = 5; break; diff --git a/engines/made/scriptfuncs_mhne.cpp b/engines/made/scriptfuncs_mhne.cpp index bfec0a883d..95a857bf73 100644 --- a/engines/made/scriptfuncs_mhne.cpp +++ b/engines/made/scriptfuncs_mhne.cpp @@ -175,6 +175,10 @@ int16 ScriptFunctionsMhne::o1_EVENT(int16 argc, int16 *argv) { case Common::EVENT_KEYDOWN: _vm->_eventKey = event.kbd.ascii; + // For unknown reasons, the game accepts ASCII code + // 9 as backspace + if (_vm->_eventKey == Common::KEYCODE_BACKSPACE) + _vm->_eventKey = 9; eventNum = 5; break; diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp index df2a0af527..4c55fe5182 100644 --- a/engines/made/scriptfuncs_rtz.cpp +++ b/engines/made/scriptfuncs_rtz.cpp @@ -218,6 +218,10 @@ int16 ScriptFunctionsRtz::o1_EVENT(int16 argc, int16 *argv) { case Common::EVENT_KEYDOWN: _vm->_eventKey = event.kbd.ascii; + // For unknown reasons, the game accepts ASCII code + // 9 as backspace + if (_vm->_eventKey == Common::KEYCODE_BACKSPACE) + _vm->_eventKey = 9; eventNum = 5; break; -- cgit v1.2.3 From 61a3b1bd138d04296b8d6322bd998a87bca56589 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 9 May 2008 20:41:12 +0000 Subject: Since some parts of ScummVM code are under LGPL, add full text of this license to the distribution. svn-id: r31970 --- COPYING.LGPL | 504 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 504 insertions(+) create mode 100644 COPYING.LGPL diff --git a/COPYING.LGPL b/COPYING.LGPL new file mode 100644 index 0000000000..00b4fedfe7 --- /dev/null +++ b/COPYING.LGPL @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + -- cgit v1.2.3 From 6979458e26a3f8226aa46adcf0bea76ae8797eb0 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sat, 10 May 2008 11:11:03 +0000 Subject: Extracted script parsing code to its own class. svn-id: r31972 --- engines/parallaction/debug.cpp | 10 +-- engines/parallaction/exec_ns.cpp | 3 +- engines/parallaction/parallaction.h | 53 ++------------- engines/parallaction/parallaction_br.cpp | 3 +- engines/parallaction/parallaction_ns.cpp | 5 +- engines/parallaction/parser.cpp | 1 - engines/parallaction/parser.h | 92 +++++++++++++++++++++++++- engines/parallaction/parser_br.cpp | 61 ++++++++++++++--- engines/parallaction/parser_ns.cpp | 108 +++++++++++++++++++++++-------- engines/parallaction/staticres.cpp | 62 +----------------- 10 files changed, 239 insertions(+), 159 deletions(-) diff --git a/engines/parallaction/debug.cpp b/engines/parallaction/debug.cpp index 4f281998e2..3c90a76f61 100644 --- a/engines/parallaction/debug.cpp +++ b/engines/parallaction/debug.cpp @@ -226,14 +226,14 @@ bool Debugger::Cmd_Programs(int argc, const char** argv) { int i = 1; - DebugPrintf("+---+--------------------+----------+\n" - "| # | bound animation | status |\n" - "+---+--------------------+----------+\n"); + DebugPrintf("+---+--------------------+--------+----------+\n" + "| # | bound animation | size | status |\n" + "+---+--------------------+--------+----------+\n"); for ( ; b != e; b++, i++) { ProgramPtr p = *b; - DebugPrintf("|%3i|%-20s|%-10s|\n", i, p->_anim->_name, status[p->_status] ); + DebugPrintf("|%3i|%-20s|%8i|%-10s|\n", i, p->_anim->_name, p->_instructions.size(), status[p->_status] ); } - DebugPrintf("+---+--------------------+---------+\n"); + DebugPrintf("+---+--------------------+--------+----------+\n"); return true; } diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index 06969fd01d..9ed56827b5 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -361,7 +361,6 @@ void Parallaction_ns::runScripts() { debugC(9, kDebugExec, "runScripts"); - static uint16 modCounter = 0; for (ProgramList::iterator it = _location._programs.begin(); it != _location._programs.end(); it++) { @@ -379,7 +378,7 @@ void Parallaction_ns::runScripts() { (*it)->_status = kProgramRunning; - debugC(9, kDebugExec, "Animation: %s, instruction: %s", a->_name, _instructionNamesRes[(*inst)->_index - 1]); + debugC(9, kDebugExec, "Animation: %s, instruction: %i", a->_name, (*inst)->_index); //_instructionNamesRes[(*inst)->_index - 1]); _instRunCtxt.inst = inst; _instRunCtxt.anim = AnimationPtr(a); diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index b3e93ee83f..367ee93f80 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -247,8 +247,6 @@ public: -#define DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(sig) void instParse_##sig() - #define DECLARE_UNQUALIFIED_COMMAND_OPCODE(op) void cmdOp_##op() #define DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(op) void instOp_##op() @@ -554,6 +552,7 @@ public: private: LocationParser_ns *_locationParser; + ProgramParser_ns *_programParser; void initFonts(); void freeFonts(); @@ -645,44 +644,9 @@ protected: void drawAnimations(); void parseLocation(const char *filename); - void initOpcodes(); - - - // program parser - OpcodeSet _instructionParsers; - Table *_instructionNames; - - struct { - bool end; - AnimationPtr a; - InstructionPtr inst; - LocalVariable *locals; - ProgramPtr program; - - // BRA specific - InstructionPtr openIf; - } _instParseCtxt; - - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(defLocal); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(animation); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(loop); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(x); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(y); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(z); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(f); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(inc); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(set); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(move); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(put); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(call); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(sound); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(null); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(endscript); - - void parseInstruction(ProgramPtr program); void loadProgram(AnimationPtr a, const char *filename); - void parseLValue(ScriptVar &var, const char *str); - virtual void parseRValue(ScriptVar &var, const char *str); + + void initOpcodes(); DECLARE_UNQUALIFIED_COMMAND_OPCODE(invalid); DECLARE_UNQUALIFIED_COMMAND_OPCODE(set); @@ -771,6 +735,7 @@ public: private: LocationParser_br *_locationParser; + ProgramParser_br *_programParser; void initResources(); void initFonts(); @@ -818,16 +783,6 @@ private: void parseLocation(const char* name); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(zone); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(color); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(mask); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(print); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(text); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(if_op); - DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(endif); - - virtual void parseRValue(ScriptVar &var, const char *str); - DECLARE_UNQUALIFIED_COMMAND_OPCODE(location); DECLARE_UNQUALIFIED_COMMAND_OPCODE(open); DECLARE_UNQUALIFIED_COMMAND_OPCODE(close); diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 118fe195d0..779a7f72b1 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -72,7 +72,8 @@ int Parallaction_br::init() { initFonts(); initCursors(); initOpcodes(); - initParsers(); + _locationParser = new LocationParser_br(this); + _programParser = new ProgramParser_br(this); _part = -1; diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 071fa262a8..197f99d723 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -135,7 +135,8 @@ int Parallaction_ns::init() { initFonts(); initCursors(); initOpcodes(); - initParsers(); + _locationParser = new LocationParser_ns(this); + _programParser = new ProgramParser_ns(this); _introSarcData1 = 0; _introSarcData2 = 1; @@ -155,8 +156,6 @@ Parallaction_ns::~Parallaction_ns() { delete _mouseComposedArrow; - delete _instructionNames; - _location._animations.remove(_char._ani); } diff --git a/engines/parallaction/parser.cpp b/engines/parallaction/parser.cpp index 665da16636..542a35b7f8 100644 --- a/engines/parallaction/parser.cpp +++ b/engines/parallaction/parser.cpp @@ -234,7 +234,6 @@ void Parser::popTables() { void Parser::parseStatement() { assert(_currentOpcodes != 0); - _script->readLineToken(true); _lookup = _currentStatements->lookup(_tokens[0]); debugC(9, kDebugParser, "parseStatement: %s (lookup = %i)", _tokens[0], _lookup); diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h index a62d883ccc..de0a56ddfc 100644 --- a/engines/parallaction/parser.h +++ b/engines/parallaction/parser.h @@ -117,6 +117,7 @@ protected: #define DECLARE_UNQUALIFIED_ANIM_PARSER(sig) void locAnimParse_##sig() #define DECLARE_UNQUALIFIED_COMMAND_PARSER(sig) void cmdParse_##sig() #define DECLARE_UNQUALIFIED_LOCATION_PARSER(sig) void locParse_##sig() +#define DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(sig) void instParse_##sig() #define MAX_FORWARDS 50 @@ -228,7 +229,6 @@ protected: void resolveCommandForwards(); void createCommand(uint id); void addCommand(); - void initParsers(); struct CommandForwardReference { char name[20]; @@ -316,6 +316,95 @@ public: }; + +class ProgramParser_ns { + +protected: + Parser *parser; + Parallaction_ns *_vm; + + Script *script; + ProgramPtr program; + + // program parser + OpcodeSet _instructionParsers; + Table *_instructionNames; + + struct { + bool end; + AnimationPtr a; + InstructionPtr inst; + LocalVariable *locals; + ProgramPtr program; + + // BRA specific + InstructionPtr openIf; + } _instParseCtxt; + + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(defLocal); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(animation); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(loop); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(x); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(y); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(z); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(f); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(inc); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(set); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(move); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(put); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(call); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(sound); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(null); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(endscript); + + void parseInstruction(); + void parseLValue(ScriptVar &var, const char *str); + virtual void parseRValue(ScriptVar &var, const char *str); + + void init(); + +public: + ProgramParser_ns(Parallaction_ns *vm) : _vm(vm) { + init(); + } + + virtual ~ProgramParser_ns() { + delete _instructionNames; + } + + void parse(Script *script, ProgramPtr program); + +}; + + +class ProgramParser_br : public ProgramParser_ns { + +protected: + Parallaction_br *_vm; + + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(zone); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(color); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(mask); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(print); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(text); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(if_op); + DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(endif); + + virtual void parseRValue(ScriptVar &var, const char *str); + + void init(); + +public: + ProgramParser_br(Parallaction_br *vm) : ProgramParser_ns((Parallaction_ns*)vm), _vm(vm) { + init(); + } + + virtual ~ProgramParser_br() { + delete _instructionNames; + } + +}; + } // namespace Parallaction #endif @@ -324,3 +413,4 @@ public: + diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp index 612a53759b..3d5cdc795a 100644 --- a/engines/parallaction/parser_br.cpp +++ b/engines/parallaction/parser_br.cpp @@ -253,13 +253,48 @@ const char *_locationAnimStmtRes_br[] = { "moveto" }; +const char *_instructionNamesRes_br[] = { + "on", + "off", + "x", + "y", + "z", + "f", + "loop", + "endloop", + "show", + "inc", + "dec", + "set", + "put", + "call", + "wait", + "start", + "process", + "move", + "color", + "sound", + "mask", + "print", + "text", + "mul", + "div", + "if", + "dummy", + "dummy", + "endif", + "stop", + "endscript" +}; + #define DECLARE_ZONE_PARSER(sig) void LocationParser_br::locZoneParse_##sig() #define DECLARE_ANIM_PARSER(sig) void LocationParser_br::locAnimParse_##sig() #define DECLARE_COMMAND_PARSER(sig) void LocationParser_br::cmdParse_##sig() -#define DECLARE_INSTRUCTION_PARSER(sig) void Parallaction_br::instParse_##sig() #define DECLARE_LOCATION_PARSER(sig) void LocationParser_br::locParse_##sig() +#define DECLARE_INSTRUCTION_PARSER(sig) void ProgramParser_br::instParse_##sig() + DECLARE_LOCATION_PARSER(location) { debugC(7, kDebugParser, "LOCATION_PARSER(location) "); @@ -757,7 +792,8 @@ DECLARE_ANIM_PARSER(endanimation) { DECLARE_INSTRUCTION_PARSER(zone) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(zone) "); - _instParseCtxt.inst->_z = findZone(_tokens[1]); + _instParseCtxt.inst->_z = _vm->findZone(_tokens[1]); + _instParseCtxt.inst->_index = parser->_lookup; } @@ -771,6 +807,7 @@ DECLARE_INSTRUCTION_PARSER(color) { _instParseCtxt.inst->_colors[0] = atoi(_tokens[2]); _instParseCtxt.inst->_colors[1] = atoi(_tokens[3]); _instParseCtxt.inst->_colors[2] = atoi(_tokens[4]); + _instParseCtxt.inst->_index = parser->_lookup; } @@ -782,6 +819,7 @@ DECLARE_INSTRUCTION_PARSER(mask) { parseRValue(_instParseCtxt.inst->_opA, _tokens[1]); parseRValue(_instParseCtxt.inst->_opB, _tokens[2]); parseRValue(_instParseCtxt.inst->_opC, _tokens[3]); + _instParseCtxt.inst->_index = parser->_lookup; } @@ -790,6 +828,7 @@ DECLARE_INSTRUCTION_PARSER(print) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(print) "); parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); + _instParseCtxt.inst->_index = parser->_lookup; } @@ -812,6 +851,7 @@ DECLARE_INSTRUCTION_PARSER(text) { if (_tokens[_si][0] != '\0' && scumm_stricmp("flags", _tokens[_si])) { _instParseCtxt.inst->_text2 = strdup(_tokens[_si]); } + _instParseCtxt.inst->_index = parser->_lookup; } @@ -850,10 +890,11 @@ DECLARE_INSTRUCTION_PARSER(endif) { // _instParseCtxt.openIf->_endif = _instParseCtxt.inst; _instParseCtxt.openIf = nullInstructionPtr; + _instParseCtxt.inst->_index = parser->_lookup; } -void Parallaction_br::parseRValue(ScriptVar &v, const char *str) { +void ProgramParser_br::parseRValue(ScriptVar &v, const char *str) { if (isdigit(str[0]) || str[0] == '-') { v.setImmediate(atoi(str)); @@ -868,7 +909,7 @@ void Parallaction_br::parseRValue(ScriptVar &v, const char *str) { AnimationPtr a; if (str[1] == '.') { - a = findAnimation(&str[2]); + a = _vm->findAnimation(&str[2]); if (!a) { error("unknown animation '%s' in script", &str[2]); } @@ -894,7 +935,7 @@ void Parallaction_br::parseRValue(ScriptVar &v, const char *str) { v.setRandom(atoi(&str[1])); } else if (str[0] == 'L') { - v.setField(&_lipSyncVal); + v.setField(&_vm->_lipSyncVal); } } @@ -906,8 +947,8 @@ typedef OpcodeImpl OpcodeV2; #define COMMAND_PARSER(sig) OpcodeV2(this, &LocationParser_br::cmdParse_##sig) #define WARNING_PARSER(sig) OpcodeV2(this, &LocationParser_br::warning_##sig) -typedef OpcodeImpl OpcodeV3; -#define INSTRUCTION_PARSER(sig) OpcodeV3(this, &Parallaction_br::instParse_##sig) +typedef OpcodeImpl OpcodeV3; +#define INSTRUCTION_PARSER(sig) OpcodeV3(this, &ProgramParser_br::instParse_##sig) void LocationParser_br::init() { @@ -1036,9 +1077,11 @@ void LocationParser_br::init() { } -void Parallaction_br::initParsers() { +void ProgramParser_br::init() { + + parser = new Parser; - _locationParser = new LocationParser_br(this); + _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes_br), _instructionNamesRes_br); static const OpcodeV3 op0[] = { INSTRUCTION_PARSER(defLocal), // invalid opcode -> local definition diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index 29c356b8af..492d605a38 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -157,13 +157,35 @@ const char *_locationAnimStmtRes_ns[] = { "endanimation" }; +const char *_instructionNamesRes_ns[] = { + "on", + "off", + "x", + "y", + "z", + "f", + "loop", + "endloop", + "show", + "inc", + "dec", + "set", + "put", + "call", + "wait", + "start", + "sound", + "move", + "endscript" +}; + #define DECLARE_ZONE_PARSER(sig) void LocationParser_ns::locZoneParse_##sig() #define DECLARE_ANIM_PARSER(sig) void LocationParser_ns::locAnimParse_##sig() #define DECLARE_COMMAND_PARSER(sig) void LocationParser_ns::cmdParse_##sig() #define DECLARE_LOCATION_PARSER(sig) void LocationParser_ns::locParse_##sig() -#define DECLARE_INSTRUCTION_PARSER(sig) void Parallaction_ns::instParse_##sig() +#define DECLARE_INSTRUCTION_PARSER(sig) void ProgramParser_ns::instParse_##sig() void LocationParser_ns::warning_unexpected() { @@ -286,49 +308,62 @@ void LocationParser_ns::parseAnimation(Script& script, AnimationList &list, char parser->pushTables(&_locationAnimParsers, _locationAnimStmt); } -void Parallaction_ns::parseInstruction(ProgramPtr program) { +void ProgramParser_ns::parseInstruction() { InstructionPtr inst(new Instruction); + script->readLineToken(true); + if (_tokens[0][1] == '.') { _tokens[0][1] = '\0'; - _instParseCtxt.a = findAnimation(&_tokens[0][2]); + _instParseCtxt.a = _vm->findAnimation(&_tokens[0][2]); } else if (_tokens[1][1] == '.') { _tokens[1][1] = '\0'; - _instParseCtxt.a = findAnimation(&_tokens[1][2]); + _instParseCtxt.a = _vm->findAnimation(&_tokens[1][2]); } else _instParseCtxt.a = program->_anim; - inst->_index = _instructionNames->lookup(_tokens[0]); _instParseCtxt.inst = inst; - _instParseCtxt.locals = program->_locals; - (*(_instructionParsers[inst->_index]))(); + parser->parseStatement(); program->_instructions.push_back(inst); return; } -void Parallaction_ns::loadProgram(AnimationPtr a, const char *filename) { - debugC(1, kDebugParser, "loadProgram(Animation: %s, script: %s)", a->_name, filename); +void ProgramParser_ns::parse(Script *script, ProgramPtr program) { - Script *script = _disk->loadScript(filename); - ProgramPtr program(new Program); - program->_anim = a; + this->script = script; + this->program = program; _instParseCtxt.openIf = nullInstructionPtr; _instParseCtxt.end = false; _instParseCtxt.program = program; + _instParseCtxt.locals = program->_locals; + parser->bind(script); + parser->pushTables(&_instructionParsers, _instructionNames); do { - script->readLineToken(); - parseInstruction(program); + parseInstruction(); } while (!_instParseCtxt.end); + parser->popTables(); + parser->unbind(); program->_ip = program->_instructions.begin(); +} + +void Parallaction_ns::loadProgram(AnimationPtr a, const char *filename) { + debugC(1, kDebugParser, "loadProgram(Animation: %s, script: %s)", a->_name, filename); + + Script *script = _disk->loadScript(filename); + ProgramPtr program(new Program); + program->_anim = a; + + _programParser->parse(script, program); + delete script; _vm->_location._programs.push_back(program); @@ -344,8 +379,10 @@ DECLARE_INSTRUCTION_PARSER(animation) { if (!scumm_stricmp(_tokens[1], _instParseCtxt.a->_name)) { _instParseCtxt.inst->_a = _instParseCtxt.a; } else { - _instParseCtxt.inst->_a = findAnimation(_tokens[1]); + _instParseCtxt.inst->_a = _vm->findAnimation(_tokens[1]); } + + _instParseCtxt.inst->_index = parser->_lookup; } @@ -353,6 +390,7 @@ DECLARE_INSTRUCTION_PARSER(loop) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(loop) "); parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); + _instParseCtxt.inst->_index = parser->_lookup; } @@ -361,6 +399,7 @@ DECLARE_INSTRUCTION_PARSER(x) { parseLValue(_instParseCtxt.inst->_opA, "X"); parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); + _instParseCtxt.inst->_index = parser->_lookup; } @@ -369,6 +408,7 @@ DECLARE_INSTRUCTION_PARSER(y) { parseLValue(_instParseCtxt.inst->_opA, "Y"); parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); + _instParseCtxt.inst->_index = parser->_lookup; } @@ -377,6 +417,7 @@ DECLARE_INSTRUCTION_PARSER(z) { parseLValue(_instParseCtxt.inst->_opA, "Z"); parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); + _instParseCtxt.inst->_index = parser->_lookup; } @@ -385,6 +426,7 @@ DECLARE_INSTRUCTION_PARSER(f) { parseLValue(_instParseCtxt.inst->_opA, "F"); parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); + _instParseCtxt.inst->_index = parser->_lookup; } @@ -397,6 +439,7 @@ DECLARE_INSTRUCTION_PARSER(inc) { if (!scumm_stricmp(_tokens[3], "mod")) { _instParseCtxt.inst->_flags |= kInstMod; } + _instParseCtxt.inst->_index = parser->_lookup; } @@ -414,6 +457,7 @@ DECLARE_INSTRUCTION_PARSER(set) { parseLValue(_instParseCtxt.inst->_opA, _tokens[1]); parseRValue(_instParseCtxt.inst->_opB, _tokens[2]); + _instParseCtxt.inst->_index = parser->_lookup; } @@ -422,6 +466,7 @@ DECLARE_INSTRUCTION_PARSER(move) { parseRValue(_instParseCtxt.inst->_opA, _tokens[1]); parseRValue(_instParseCtxt.inst->_opB, _tokens[2]); + _instParseCtxt.inst->_index = parser->_lookup; } @@ -431,7 +476,7 @@ DECLARE_INSTRUCTION_PARSER(put) { if (!scumm_stricmp(_tokens[1], _instParseCtxt.a->_name)) { _instParseCtxt.inst->_a = _instParseCtxt.a; } else { - _instParseCtxt.inst->_a = findAnimation(_tokens[1]); + _instParseCtxt.inst->_a = _vm->findAnimation(_tokens[1]); } parseRValue(_instParseCtxt.inst->_opA, _tokens[2]); @@ -439,30 +484,32 @@ DECLARE_INSTRUCTION_PARSER(put) { if (!scumm_stricmp(_tokens[4], "masked")) { _instParseCtxt.inst->_flags |= kInstMaskedPut; } + _instParseCtxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(call) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(call) "); - int index = _callableNames->lookup(_tokens[1]); + int index = _vm->_callableNames->lookup(_tokens[1]); if (index == Table::notFound) error("unknown callable '%s'", _tokens[1]); _instParseCtxt.inst->_immediate = index - 1; + _instParseCtxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(sound) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(sound) "); - _instParseCtxt.inst->_z = findZone(_tokens[1]); + _instParseCtxt.inst->_z = _vm->findZone(_tokens[1]); + _instParseCtxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(null) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(null) "); - - + _instParseCtxt.inst->_index = parser->_lookup; } @@ -488,11 +535,12 @@ DECLARE_INSTRUCTION_PARSER(endscript) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(endscript) "); _instParseCtxt.end = true; + _instParseCtxt.inst->_index = parser->_lookup; } -void Parallaction_ns::parseRValue(ScriptVar &v, const char *str) { +void ProgramParser_ns::parseRValue(ScriptVar &v, const char *str) { if (isdigit(str[0]) || str[0] == '-') { v.setImmediate(atoi(str)); @@ -507,7 +555,7 @@ void Parallaction_ns::parseRValue(ScriptVar &v, const char *str) { AnimationPtr a; if (str[1] == '.') { - a = findAnimation(&str[2]); + a = _vm->findAnimation(&str[2]); } else { a = _instParseCtxt.a; } @@ -527,7 +575,7 @@ void Parallaction_ns::parseRValue(ScriptVar &v, const char *str) { } -void Parallaction_ns::parseLValue(ScriptVar &v, const char *str) { +void ProgramParser_ns::parseLValue(ScriptVar &v, const char *str) { int index = _instParseCtxt.program->findLocal(str); if (index != -1) { @@ -537,7 +585,7 @@ void Parallaction_ns::parseLValue(ScriptVar &v, const char *str) { AnimationPtr a; if (str[1] == '.') { - a = findAnimation(&str[2]); + a = _vm->findAnimation(&str[2]); } else { a = _instParseCtxt.a; } @@ -871,6 +919,7 @@ Answer *LocationParser_ns::parseAnswer(Script &script) { parseCommands(script, answer->_commands); _locParseCtxt.endcommands = false; do { + script.readLineToken(true); parser->parseStatement(); } while (!_locParseCtxt.endcommands); @@ -1072,6 +1121,7 @@ void LocationParser_ns::parse(Script *script) { parser->bind(script); parser->pushTables(&_locationParsers, _locationStmt); do { + script->readLineToken(true); parser->parseStatement(); } while (!_locParseCtxt.end); parser->popTables(); @@ -1104,8 +1154,8 @@ void LocationParser_ns::parseWalkNodes(Script& script, WalkNodeList &list) { return; } -typedef OpcodeImpl OpcodeV1; -#define INSTRUCTION_PARSER(sig) OpcodeV1(this, &Parallaction_ns::instParse_##sig) +typedef OpcodeImpl OpcodeV1; +#define INSTRUCTION_PARSER(sig) OpcodeV1(this, &ProgramParser_ns::instParse_##sig) typedef OpcodeImpl OpcodeV2; #define ZONE_PARSER(sig) OpcodeV2(this, &LocationParser_ns::locZoneParse_##sig) @@ -1208,9 +1258,11 @@ void LocationParser_ns::init() { } -void Parallaction_ns::initParsers() { +void ProgramParser_ns::init() { + + parser = new Parser; - _locationParser = new LocationParser_ns(this); + _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes_ns), _instructionNamesRes_ns); static const OpcodeV1 op0[] = { INSTRUCTION_PARSER(defLocal), // invalid opcode -> local definition diff --git a/engines/parallaction/staticres.cpp b/engines/parallaction/staticres.cpp index 3c2051795d..18021db9a1 100644 --- a/engines/parallaction/staticres.cpp +++ b/engines/parallaction/staticres.cpp @@ -216,28 +216,6 @@ byte _amigaTopazFont[2600] = { }; -const char *_instructionNamesRes_ns[] = { - "on", - "off", - "x", - "y", - "z", - "f", - "loop", - "endloop", - "show", - "inc", - "dec", - "set", - "put", - "call", - "wait", - "start", - "sound", - "move", - "endscript" -}; - const char *_callableNamesRes_ns[] = { "Projector", "HBOff", @@ -266,40 +244,6 @@ const char *_callableNamesRes_ns[] = { "TestResult" }; -const char *_instructionNamesRes_br[] = { - "on", - "off", - "x", - "y", - "z", - "f", - "loop", - "endloop", - "show", - "inc", - "dec", - "set", - "put", - "call", - "wait", - "start", - "process", - "move", - "color", - "sound", - "mask", - "print", - "text", - "mul", - "div", - "if", - "dummy", - "dummy", - "endif", - "stop", - "endscript" -}; - const char *_callableNamesRes_br[] = { "blufade", @@ -395,10 +339,9 @@ void Parallaction_ns::initResources() { // _zoneTypeNamesRes = _zoneTypeNamesRes_ns; // _commandsNamesRes = _commandsNamesRes_ns; _callableNamesRes = _callableNamesRes_ns; - _instructionNamesRes = _instructionNamesRes_ns; +// _instructionNamesRes = _instructionNamesRes_ns; _callableNames = new Table(ARRAYSIZE(_callableNamesRes_ns), _callableNamesRes_ns); - _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes_ns), _instructionNamesRes_ns); _localFlagNames = new FixedTable(NUM_LOCATIONS, 1); _localFlagNames->addData("visited"); @@ -417,11 +360,10 @@ void Parallaction_br::initResources() { // _zoneTypeNamesRes = _zoneTypeNamesRes_br; // _commandsNamesRes = _commandsNamesRes_br; _callableNamesRes = _callableNamesRes_br; - _instructionNamesRes = _instructionNamesRes_br; +// _instructionNamesRes = _instructionNamesRes_br; // _audioCommandsNamesRes = _audioCommandsNamesRes_br; _callableNames = new Table(ARRAYSIZE(_callableNamesRes_br), _callableNamesRes_br); - _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes_br), _instructionNamesRes_br); _localFlagNames = new FixedTable(NUM_LOCATIONS, 2); _localFlagNames->addData("visited"); -- cgit v1.2.3 From 8bbf257525c9b96a4a69cddd668907a0b2657b0d Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 10 May 2008 14:12:48 +0000 Subject: implement item animations for MR svn-id: r31973 --- engines/kyra/animator_mr.cpp | 55 ++++++++++++++++++++++++++++++++++++ engines/kyra/kyra_hof.h | 18 ------------ engines/kyra/kyra_mr.cpp | 8 ++++-- engines/kyra/kyra_mr.h | 15 ++++++++++ engines/kyra/kyra_v2.h | 17 +++++++++++ engines/kyra/staticres.cpp | 67 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 160 insertions(+), 20 deletions(-) diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp index ab3d347549..feea7c905b 100644 --- a/engines/kyra/animator_mr.cpp +++ b/engines/kyra/animator_mr.cpp @@ -196,6 +196,61 @@ void KyraEngine_MR::refreshAnimObjects(int force) { } } +void KyraEngine_MR::updateItemAnimations() { + bool nextFrame = false; + + if (_itemAnimData[0].itemIndex == -1) + return; + + const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem]; + ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem]; + + if (++_nextAnimItem == 10) { + _nextAnimItem = 0; + return; + } + + uint32 ctime = _system->getMillis(); + if (ctime < a->nextFrame) + return; + + uint16 shpIdx = s->frames[a->currentFrame].index + 248; + if ((s->itemIndex == _handItemSet || s->itemIndex == _itemInHand) && (!_mouseState && _screen->isMouseVisible())) { + nextFrame = true; + _screen->setMouseCursor(12, 19, getShapePtr(shpIdx)); + } + + if (_inventoryState) { + for (int i = 0; i < 10; i++) { + if (s->itemIndex == _mainCharacter.inventory[i]) { + nextFrame = true; + _screen->drawShape(2, getShapePtr(422 + i), 9, 0, 0, 0); + _screen->drawShape(2, getShapePtr(shpIdx), 9, 0, 0, 0); + _screen->hideMouse(); + _screen->copyRegion(9, 0, _inventoryX[i], _inventoryY[i], 24, 20, 2, 0, Screen::CR_NO_P_CHECK); + _screen->showMouse(); + } + } + } + + _screen->updateScreen(); + + for (int i = 17; i < 66; i++) { + AnimObj *animObject = &_animObjects[i]; + if (animObject->shapeIndex2 == s->itemIndex + 248) { + animObject->shapePtr = getShapePtr(shpIdx); + animObject->shapeIndex1 = shpIdx; + animObject->needRefresh = 1; + nextFrame = true; + } + } + + if (nextFrame) { + a->nextFrame = _system->getMillis() + (s->frames[a->currentFrame].delay * _tickLength); + a->currentFrame = ++a->currentFrame % s->numFrames; + } +} + void KyraEngine_MR::updateCharacterAnim(int charId) { debugC(9, kDebugLevelAnimator, "KyraEngine_MR::updateCharacterAnim(%d)", charId); diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index 3a745fe502..f537bf57d3 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -105,11 +105,6 @@ struct TIM; typedef int (KyraEngine_HoF::*SeqProc)(WSAMovieV2*, int, int, int); -struct FrameControl { - uint16 index; - uint16 delay; -}; - struct ActiveWSA { int16 flags; WSAMovieV2 *movie; @@ -179,17 +174,6 @@ struct ItemAnimData_v1 { const uint16 *frames; }; -struct ItemAnimData_v2 { - int16 itemIndex; - uint8 numFrames; - const FrameControl *frames; -}; - -struct ActiveItemAnim { - uint16 currentFrame; - uint32 nextFrame; -}; - class KyraEngine_HoF : public KyraEngine_v2 { friend class Debugger_HoF; friend class TextDisplayer_HoF; @@ -327,8 +311,6 @@ protected: void dinoRide(); - int _mouseState; - void handleInput(int x, int y); bool handleInputUnkSub(int x, int y); diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 1ed347953d..d2987d314f 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -79,6 +79,8 @@ KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngi _mainCharacter.facing = 5; _mainCharacter.animFrame = 0x57; _mainCharacter.walkspeed = 5; + memset(_activeItemAnim, 0, sizeof(_activeItemAnim)); + _nextAnimItem = 0; _text = 0; _commandLineY = 189; _inventoryState = false; @@ -1125,7 +1127,7 @@ void KyraEngine_MR::update() { updateMouse(); updateSpecialSceneScripts(); updateCommandLine(); - //XXX + updateItemAnimations(); musicUpdate(0); _screen->updateScreen(); @@ -1137,7 +1139,7 @@ void KyraEngine_MR::updateWithText() { musicUpdate(0); updateMouse(); - //XXX + updateItemAnimations(); updateSpecialSceneScripts(); updateCommandLine(); musicUpdate(0); @@ -1265,9 +1267,11 @@ void KyraEngine_MR::updateMouse() { } if (type != 0 && type != _handItemSet && !hasItemCollision) { + _mouseState = _handItemSet = type; _handItemSet = type; _screen->setMouseCursor(offsetX, offsetY, _gameShapes[shape]); } else if (type == 0 && _handItemSet != _itemInHand && mouse.x > 8 && mouse.x < 311 && mouse.y < 171 && mouse.y > 8) { + _mouseState = 0; setItemMouseCursor(); } else if (mouse.y > 187 && _handItemSet > -4 && type == 0 && !_inventoryState) { showInventory(); diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 588154ca3b..6faadf8197 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -194,6 +194,7 @@ private: void refreshAnimObjects(int force); bool _loadingState; + void updateItemAnimations(); void updateCharacterAnim(int charId); void updateSceneAnim(int anim, int newFrame); @@ -209,6 +210,20 @@ private: bool _nextIdleType; void showIdleAnim(); + static const FrameControl _itemAnimFrames0[]; + static const FrameControl _itemAnimFrames1[]; + static const FrameControl _itemAnimFrames2[]; + static const FrameControl _itemAnimFrames3[]; + static const FrameControl _itemAnimFrames4[]; + static const FrameControl _itemAnimFrames5[]; + static const FrameControl _itemAnimFrames6[]; + static const FrameControl _itemAnimFrames7[]; + static const FrameControl _itemAnimFrames8[]; + static const FrameControl _itemAnimFrames9[]; + static const ItemAnimData_v2 _itemAnimData[10]; + ActiveItemAnim _activeItemAnim[10]; + int _nextAnimItem; + // interface uint8 *_interface; uint8 *_interfaceCommandLine; diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index 639594e593..e64e51ae37 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -35,6 +35,22 @@ namespace Kyra { +struct FrameControl { + uint16 index; + uint16 delay; +}; + +struct ItemAnimData_v2 { + int16 itemIndex; + uint8 numFrames; + const FrameControl *frames; +}; + +struct ActiveItemAnim { + uint16 currentFrame; + uint32 nextFrame; +}; + class Screen_v2; class KyraEngine_v2 : public KyraEngine { @@ -85,6 +101,7 @@ protected: void removeInputTop(); int _mouseX, _mouseY; + int _mouseState; struct Event { Common::Event event; diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 8ace7288f2..051d4d9025 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -28,6 +28,7 @@ #include "common/md5.h" #include "kyra/kyra.h" #include "kyra/kyra_v1.h" +#include "kyra/kyra_v2.h" #include "kyra/kyra_hof.h" #include "kyra/kyra_mr.h" #include "kyra/screen.h" @@ -2028,6 +2029,72 @@ const KyraEngine_MR::ShapeDesc KyraEngine_MR::_shapeDescs[] = { const int KyraEngine_MR::_shapeDescsSize = ARRAYSIZE(KyraEngine_MR::_shapeDescs); +const FrameControl KyraEngine_MR::_itemAnimFrames0[] = { + { 0x03, 0x19 }, { 0x48, 0x1E }, { 0x49, 0x1E } +}; + +const FrameControl KyraEngine_MR::_itemAnimFrames1[] = { + { 0x3A, 0x0B }, { 0x4B, 0x0B }, { 0x4C, 0x0B }, { 0x4D, 0x0B }, + { 0x4E, 0x0B }, { 0x4F, 0x0B }, { 0x50, 0x0B } +}; + +const FrameControl KyraEngine_MR::_itemAnimFrames2[] = { + { 0x14, 0x0F }, { 0x51, 0x0F }, { 0x52, 0x0F }, { 0x53, 0x0F } +}; + +const FrameControl KyraEngine_MR::_itemAnimFrames3[] = { + { 0x13, 0x14 }, { 0x54, 0x14 }, { 0x55, 0x14 }, { 0x56, 0x14 } +}; + +const FrameControl KyraEngine_MR::_itemAnimFrames4[] = { + { 0x15, 0x10 }, { 0x57, 0x12 }, { 0x58, 0x10 }, { 0x59, 0x11 }, + { 0x5A, 0x10 }, { 0x5B, 0x11 }, { 0x5C, 0x10 } +}; + +const FrameControl KyraEngine_MR::_itemAnimFrames5[] = { + { 0x09, 0x1E }, { 0x5D, 0x1E }, { 0x5E, 0x1E }, { 0x5D, 0x1E } +}; + +const FrameControl KyraEngine_MR::_itemAnimFrames6[] = { + { 0x39, 0x21 }, { 0x5F, 0x20 }, { 0x60, 0x1E }, { 0x61, 0x20 }, + { 0x62, 0x21 }, { 0x63, 0x1E }, { 0x64, 0x22 } +}; + +const FrameControl KyraEngine_MR::_itemAnimFrames7[] = { + { 0x40, 0x0C }, { 0x6C, 0x10 }, { 0x6B, 0x10 }, { 0x6A, 0x0F }, + { 0x69, 0x0F }, { 0x68, 0x0F }, { 0x67, 0x0F }, { 0x66, 0x0F }, + { 0x65, 0x0F }, { 0x66, 0x11 }, { 0x67, 0x12 }, { 0x68, 0x10 }, + { 0x69, 0x0F }, { 0x6A, 0x10 }, { 0x6B, 0x0F }, { 0x6C, 0x10 }, + { 0x6B, 0x0F }, { 0x6A, 0x10 }, { 0x6B, 0x0F }, { 0x6C, 0x10 }, + { 0x6B, 0x0F }, { 0x6A, 0x10 }, { 0x69, 0x0F }, { 0x68, 0x10 }, + { 0x67, 0x12 }, { 0x66, 0x11 }, { 0x65, 0xC8 }, { 0x66, 0x11 }, + { 0x67, 0x12 }, { 0x68, 0x10 }, { 0x69, 0x0F }, { 0x6A, 0x10 }, + { 0x6B, 0x0F }, { 0x6C, 0x10 } +}; + +const FrameControl KyraEngine_MR::_itemAnimFrames8[] = { + { 0x2B, 0x19 }, { 0x8E, 0x16 }, { 0x8F, 0x14 }, + { 0x90, 0x16 }, { 0x91, 0x50 } +}; + +const FrameControl KyraEngine_MR::_itemAnimFrames9[] = { + { 0x3B, 0x258}, { 0x92, 0x0A }, { 0x93, 0x0A }, { 0x94, 0x0A }, + { 0x93, 0x0A }, { 0x92, 0x0A } +}; + +const ItemAnimData_v2 KyraEngine_MR::_itemAnimData[10] = { + { 0x03, 0x03, _itemAnimFrames0 }, + { 0x3a, 0x07, _itemAnimFrames1 }, + { 0x14, 0x04, _itemAnimFrames2 }, + { 0x13, 0x04, _itemAnimFrames3 }, + { 0x15, 0x07, _itemAnimFrames4 }, + { 0x09, 0x04, _itemAnimFrames5 }, + { 0x39, 0x07, _itemAnimFrames6 }, + { 0x40, 0x22, _itemAnimFrames7 }, + { 0x2B, 0x05, _itemAnimFrames8 }, + { 0x3B, 0x06, _itemAnimFrames9 } +}; + const uint8 KyraEngine_MR::_characterFrameTable[] = { 0x36, 0x35, 0x35, 0x33, 0x32, 0x32, 0x34, 0x34 }; -- cgit v1.2.3 From 870a330c66cdd2f6ae5ca973fcdce802b3f8c48e Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 10 May 2008 15:31:11 +0000 Subject: (hopefully) fix bug in last commit svn-id: r31975 --- engines/kyra/animator_mr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp index feea7c905b..3498573a90 100644 --- a/engines/kyra/animator_mr.cpp +++ b/engines/kyra/animator_mr.cpp @@ -215,7 +215,7 @@ void KyraEngine_MR::updateItemAnimations() { return; uint16 shpIdx = s->frames[a->currentFrame].index + 248; - if ((s->itemIndex == _handItemSet || s->itemIndex == _itemInHand) && (!_mouseState && _screen->isMouseVisible())) { + if ((/*s->itemIndex == _handItemSet || */s->itemIndex == _itemInHand) && (!_mouseState && _screen->isMouseVisible())) { nextFrame = true; _screen->setMouseCursor(12, 19, getShapePtr(shpIdx)); } -- cgit v1.2.3 From 95a85a8984bbd9e6fe9a84d1fa83f1bf1652dc46 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 10 May 2008 17:41:34 +0000 Subject: Simplification in updateItemAnimations in KyraEngine_HoF and KyraEngine_MR. svn-id: r31976 --- engines/kyra/animator_hof.cpp | 2 +- engines/kyra/animator_mr.cpp | 5 +++-- engines/kyra/kyra_hof.cpp | 3 +-- engines/kyra/kyra_mr.cpp | 2 -- engines/kyra/kyra_v2.h | 1 - 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp index 9314f8604e..f9fe281179 100644 --- a/engines/kyra/animator_hof.cpp +++ b/engines/kyra/animator_hof.cpp @@ -139,7 +139,7 @@ void KyraEngine_HoF::updateItemAnimations() { return; uint16 shpIdx = s->frames[a->currentFrame].index + 64; - if ((s->itemIndex == _handItemSet || s->itemIndex == _itemInHand) && (!_mouseState && _screen->isMouseVisible())) { + if (s->itemIndex == _handItemSet && s->itemIndex == _itemInHand && _screen->isMouseVisible()) { nextFrame = true; _screen->setMouseCursor(8, 15, getShapePtr(shpIdx)); } diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp index 3498573a90..2b67d4922e 100644 --- a/engines/kyra/animator_mr.cpp +++ b/engines/kyra/animator_mr.cpp @@ -197,6 +197,7 @@ void KyraEngine_MR::refreshAnimObjects(int force) { } void KyraEngine_MR::updateItemAnimations() { + debugC(9, kDebugLevelAnimator, "KyraEngine_MR::updateItemAnimations()"); bool nextFrame = false; if (_itemAnimData[0].itemIndex == -1) @@ -215,7 +216,7 @@ void KyraEngine_MR::updateItemAnimations() { return; uint16 shpIdx = s->frames[a->currentFrame].index + 248; - if ((/*s->itemIndex == _handItemSet || */s->itemIndex == _itemInHand) && (!_mouseState && _screen->isMouseVisible())) { + if (s->itemIndex == _handItemSet && s->itemIndex == _itemInHand && _screen->isMouseVisible()) { nextFrame = true; _screen->setMouseCursor(12, 19, getShapePtr(shpIdx)); } @@ -240,7 +241,7 @@ void KyraEngine_MR::updateItemAnimations() { if (animObject->shapeIndex2 == s->itemIndex + 248) { animObject->shapePtr = getShapePtr(shpIdx); animObject->shapeIndex1 = shpIdx; - animObject->needRefresh = 1; + animObject->needRefresh = true; nextFrame = true; } } diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 7aa5f9373b..cd4ed72ae3 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -724,7 +724,7 @@ void KyraEngine_HoF::updateMouse() { } if (type != 0 && _handItemSet != type && _screen->isMouseVisible()) { - _mouseState = _handItemSet = type; + _handItemSet = type; _screen->hideMouse(); _screen->setMouseCursor(xOffset, yOffset, getShapePtr(shapeIndex)); _screen->showMouse(); @@ -732,7 +732,6 @@ void KyraEngine_HoF::updateMouse() { if (type == 0 && _handItemSet != _itemInHand && _screen->isMouseVisible()) { if ((mouse.y > 145) || (mouse.x > 6 && mouse.x < 312 && mouse.y > 6 && mouse.y < 135)) { - _mouseState = 0; _handItemSet = _itemInHand; _screen->hideMouse(); if (_itemInHand == -1) diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index d2987d314f..481a3d124f 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -1267,11 +1267,9 @@ void KyraEngine_MR::updateMouse() { } if (type != 0 && type != _handItemSet && !hasItemCollision) { - _mouseState = _handItemSet = type; _handItemSet = type; _screen->setMouseCursor(offsetX, offsetY, _gameShapes[shape]); } else if (type == 0 && _handItemSet != _itemInHand && mouse.x > 8 && mouse.x < 311 && mouse.y < 171 && mouse.y > 8) { - _mouseState = 0; setItemMouseCursor(); } else if (mouse.y > 187 && _handItemSet > -4 && type == 0 && !_inventoryState) { showInventory(); diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index e64e51ae37..ca6569a56c 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -101,7 +101,6 @@ protected: void removeInputTop(); int _mouseX, _mouseY; - int _mouseState; struct Event { Common::Event event; -- cgit v1.2.3 From 3ee96f2fe30b705cff38e6955f209d98e9f2938c Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 10 May 2008 17:51:57 +0000 Subject: fix missing animation for golden neck ring svn-id: r31977 --- engines/kyra/animator_mr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp index 2b67d4922e..5952f8df5a 100644 --- a/engines/kyra/animator_mr.cpp +++ b/engines/kyra/animator_mr.cpp @@ -206,7 +206,7 @@ void KyraEngine_MR::updateItemAnimations() { const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem]; ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem]; - if (++_nextAnimItem == 10) { + if (++_nextAnimItem == 11) { _nextAnimItem = 0; return; } -- cgit v1.2.3 From 6b51580bb1d819497a6ee898da240cbba693e0b3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 10 May 2008 18:14:57 +0000 Subject: Consume less cpu time when Zanthia/Malcolm are walking. svn-id: r31978 --- engines/kyra/scene_hof.cpp | 2 ++ engines/kyra/scene_mr.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/kyra/scene_hof.cpp b/engines/kyra/scene_hof.cpp index 25613e2eb9..b072a76e66 100644 --- a/engines/kyra/scene_hof.cpp +++ b/engines/kyra/scene_hof.cpp @@ -322,6 +322,8 @@ int KyraEngine_HoF::trySceneChange(int *moveTable, int unk1, int updateChar) { refreshAnimObjectsIfNeed(); updateType = -1; } + + delay(10); } if (updateChar) diff --git a/engines/kyra/scene_mr.cpp b/engines/kyra/scene_mr.cpp index 03cc05cd34..16b5f1fd4d 100644 --- a/engines/kyra/scene_mr.cpp +++ b/engines/kyra/scene_mr.cpp @@ -693,7 +693,7 @@ int KyraEngine_MR::trySceneChange(int *moveTable, int unk1, int updateChar) { if (ret) ++moveTable; - update(); + delay(10, true); } if (updateChar) -- cgit v1.2.3 From 8d6048a9fad199277e84b6e07a61316a5f540622 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 10 May 2008 18:23:11 +0000 Subject: - Added small delay to GUI_v2::getInput - Prevent kyra3 background music from stopping while menu is open svn-id: r31979 --- engines/kyra/gui_mr.cpp | 5 +++++ engines/kyra/gui_mr.h | 2 ++ engines/kyra/gui_v2.cpp | 2 ++ engines/kyra/gui_v2.h | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp index c1af41ded7..1e89e50072 100644 --- a/engines/kyra/gui_mr.cpp +++ b/engines/kyra/gui_mr.cpp @@ -704,6 +704,11 @@ void GUI_MR::flagButtonDisable(Button *button) { } } +void GUI_MR::getInput() { + _vm->musicUpdate(0); + GUI_v2::getInput(); +} + const char *GUI_MR::getMenuTitle(const Menu &menu) { if (!menu.menuNameId) return 0; diff --git a/engines/kyra/gui_mr.h b/engines/kyra/gui_mr.h index d73b21b73b..d60c2f62d9 100644 --- a/engines/kyra/gui_mr.h +++ b/engines/kyra/gui_mr.h @@ -48,6 +48,8 @@ public: int optionsButton(Button *button); private: + void getInput(); + const char *getMenuTitle(const Menu &menu); const char *getMenuItemTitle(const MenuItem &menuItem); const char *getMenuItemLabel(const MenuItem &menuItem); diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp index 0a74d27a99..5ffc4d555c 100644 --- a/engines/kyra/gui_v2.cpp +++ b/engines/kyra/gui_v2.cpp @@ -409,6 +409,8 @@ void GUI_v2::getInput() { _isOptionsMenu = false; _isDeleteMenu = false; } + + delay(10); } void GUI_v2::renewHighlight(Menu &menu) { diff --git a/engines/kyra/gui_v2.h b/engines/kyra/gui_v2.h index 4e94b58742..55b7ee6d9a 100644 --- a/engines/kyra/gui_v2.h +++ b/engines/kyra/gui_v2.h @@ -125,7 +125,7 @@ protected: virtual uint8 textFieldColor2() const = 0; virtual uint8 textFieldColor3() const = 0; protected: - void getInput(); + virtual void getInput(); Button _menuButtons[7]; Button _scrollUpButton; -- cgit v1.2.3 From 9b2c63550f7ff9da4b777ce0ab573ac493dff5fb Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 10 May 2008 18:30:20 +0000 Subject: Implemented opcode 106: o2_playFireflyScore. svn-id: r31980 --- engines/kyra/gui_v2.cpp | 2 +- engines/kyra/kyra_hof.h | 1 + engines/kyra/script_hof.cpp | 12 +++++++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp index 5ffc4d555c..300f9f116d 100644 --- a/engines/kyra/gui_v2.cpp +++ b/engines/kyra/gui_v2.cpp @@ -410,7 +410,7 @@ void GUI_v2::getInput() { _isDeleteMenu = false; } - delay(10); + _vm->delay(10); } void GUI_v2::renewHighlight(Menu &menu) { diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index f537bf57d3..f34c0d6d3a 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -750,6 +750,7 @@ protected: int o2_setRunFlag(EMCState *script); int o2_showLetter(EMCState *script); int o2_fillRect(EMCState *script); + int o2_playFireflyScore(EMCState *script); int o2_encodeShape(EMCState *script); int o2_defineSceneAnim(EMCState *script); int o2_updateSceneAnim(EMCState *script); diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index ff28e08960..14f8faad5f 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -862,6 +862,16 @@ int KyraEngine_HoF::o2_fillRect(EMCState *script) { return 0; } +int KyraEngine_HoF::o2_playFireflyScore(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_playFireflyScore(%p) ()", (const void *)script); + if (_sound->getSfxType() == Sound::kAdlib || _sound->getSfxType() == Sound::kMidiMT32 || _sound->getSfxType() == Sound::kMidiGM) { + snd_playWanderScoreViaMap(86, 1); + return 1; + } else { + return 0; + } +} + int KyraEngine_HoF::o2_encodeShape(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_encodeShape(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); @@ -1623,7 +1633,7 @@ void KyraEngine_HoF::setupOpcodeTable() { // 0x68 OpcodeUnImpl(); OpcodeUnImpl(); - OpcodeUnImpl(); + Opcode(o2_playFireflyScore); Opcode(o2_waitForConfirmationClick); // 0x6c Opcode(o2_encodeShape); -- cgit v1.2.3 From a00df8dff1effc72a7b4bb03e88baf214308a39e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 10 May 2008 18:39:03 +0000 Subject: Renamed opcode 163: o2_getBoolFromStack to o2_midiSoundFadeout and updated implementation. svn-id: r31981 --- engines/kyra/kyra_hof.h | 2 +- engines/kyra/script_hof.cpp | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index f34c0d6d3a..93e1246b7d 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -786,7 +786,7 @@ protected: int o2_updateTwoSceneAnims(EMCState *script); int o2_getRainbowRoomData(EMCState *script); int o2_drawSceneShapeEx(EMCState *script); - int o2_getBoolFromStack(EMCState *script); + int o2_midiSoundFadeout(EMCState *script); int o2_getSfxDriver(EMCState *script); int o2_getVocSupport(EMCState *script); int o2_getMusicDriver(EMCState *script); diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index 14f8faad5f..4525d71548 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -1335,9 +1335,20 @@ int KyraEngine_HoF::o2_drawSceneShapeEx(EMCState *script) { return 0; } -int KyraEngine_HoF::o2_getBoolFromStack(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_getBoolFromStack(%p) ()", (const void *)script); - return stackPos(0) ? 1 : 0; +int KyraEngine_HoF::o2_midiSoundFadeout(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_midiSoundFadeout(%p) ()", (const void *)script); + if (!stackPos(0)) { + if ((_sound->getMusicType() == Sound::kMidiMT32 || _sound->getMusicType() == Sound::kMidiGM) && + (_sound->getSfxType() == Sound::kMidiMT32 || _sound->getSfxType() == Sound::kMidiGM)) { + _sound->beginFadeOut(); + delay(2000, true); + _lastMusicCommand = -1; + } else { + return 0; + } + } + + return 1; } int KyraEngine_HoF::o2_getSfxDriver(EMCState *script) { @@ -1704,7 +1715,7 @@ void KyraEngine_HoF::setupOpcodeTable() { Opcode(o2_updateTwoSceneAnims); Opcode(o2_getRainbowRoomData); Opcode(o2_drawSceneShapeEx); - Opcode(o2_getBoolFromStack); + Opcode(o2_midiSoundFadeout); // 0xa4 Opcode(o2_getSfxDriver); Opcode(o2_getVocSupport); -- cgit v1.2.3 From f930fff0d12c55e63140f45f4aee2c933f59aa63 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 10 May 2008 18:56:00 +0000 Subject: Set _quitFlag when receiving quit event in kyra2/kyra3 main menu. svn-id: r31984 --- engines/kyra/gui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index d2e02671c9..8ce513d77c 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -467,8 +467,10 @@ int MainMenu::handle(int dim) { _system->delayMillis(10); } - if (_quitFlag) + if (_quitFlag) { + _vm->quitGame(); command = -1; + } _screen->copyRegion(backUpX, backUpY, backUpX, backUpY, backUpWidth, backUpHeight, 3, 0); _screen->_charWidth = charWidthBackUp; -- cgit v1.2.3 From 7c7e9b831fc8b250942170bc12cd9c54602ded48 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 10 May 2008 19:20:38 +0000 Subject: Implemented pausing of timers, this should fix some minor glitches. svn-id: r31985 --- engines/kyra/gui_hof.cpp | 2 ++ engines/kyra/gui_mr.cpp | 2 ++ engines/kyra/gui_v1.cpp | 3 +++ engines/kyra/timer.cpp | 49 +++++++++++++++++++++++++++++++++++++----------- engines/kyra/timer.h | 15 ++++++++++++++- 5 files changed, 59 insertions(+), 12 deletions(-) diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp index cc212d28fc..2c333df937 100644 --- a/engines/kyra/gui_hof.cpp +++ b/engines/kyra/gui_hof.cpp @@ -666,6 +666,8 @@ int KyraEngine_HoF::cauldronButton(Button *button) { #pragma mark - int GUI_HoF::optionsButton(Button *button) { + PauseTimer pause(*_vm->_timer); + _restartGame = false; _reloadTemporarySave = false; diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp index 1e89e50072..a7fc742b6f 100644 --- a/engines/kyra/gui_mr.cpp +++ b/engines/kyra/gui_mr.cpp @@ -789,6 +789,8 @@ int GUI_MR::quitGame(Button *caller) { } int GUI_MR::optionsButton(Button *button) { + PauseTimer pause(*_vm->_timer); + _vm->musicUpdate(0); _screen->hideMouse(); diff --git a/engines/kyra/gui_v1.cpp b/engines/kyra/gui_v1.cpp index 2d2c4f1219..0c66064409 100644 --- a/engines/kyra/gui_v1.cpp +++ b/engines/kyra/gui_v1.cpp @@ -30,6 +30,7 @@ #include "kyra/animator_v1.h" #include "kyra/sound.h" #include "kyra/gui_v1.h" +#include "kyra/timer.h" #include "common/config-manager.h" #include "common/savefile.h" @@ -406,6 +407,8 @@ void GUI_v1::setGUILabels() { } int GUI_v1::buttonMenuCallback(Button *caller) { + PauseTimer pause(*_vm->_timer); + _displayMenu = true; assert(_vm->_guiStrings); diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp index 1f25f88c97..d9668afa98 100644 --- a/engines/kyra/timer.cpp +++ b/engines/kyra/timer.cpp @@ -62,10 +62,32 @@ struct TimerEqual : public Common::UnaryFunction { }; } // end of anonymous namespace +void TimerManager::pause(bool pause) { + if (pause) { + ++_isPaused; + + if (_isPaused == 1) { + _isPaused = true; + _pauseStart = _system->getMillis(); + } + } else if (!pause && _isPaused > 0) { + --_isPaused; + + if (_isPaused == 0) { + const uint32 pausedTime = _system->getMillis() - _pauseStart; + _nextRun += pausedTime; + + for (Iterator pos = _timers.begin(); pos != _timers.end(); ++pos) { + pos->lastUpdate += pausedTime; + pos->nextRun += pausedTime; + } + } + } +} + void TimerManager::reset() { - for (Iterator pos = _timers.begin(); pos != _timers.end(); ++pos) { + for (Iterator pos = _timers.begin(); pos != _timers.end(); ++pos) delete pos->func; - } _timers.clear(); } @@ -93,7 +115,7 @@ void TimerManager::addTimer(uint8 id, TimerFunc *func, int countdown, bool enabl void TimerManager::update() { debugC(9, kDebugLevelTimer, "TimerManager::update()"); - if (_system->getMillis() < _nextRun) + if (_system->getMillis() < _nextRun || _isPaused) return; _nextRun += 99999; @@ -121,8 +143,10 @@ void TimerManager::update() { void TimerManager::resync() { debugC(9, kDebugLevelTimer, "TimerManager::resync()"); + const uint32 curTime = _isPaused ? _pauseStart : _system->getMillis(); + _nextRun = 0; // force rerun - Common::for_each(_timers.begin(), _timers.end(), TimerResync(_vm, _system->getMillis())); + Common::for_each(_timers.begin(), _timers.end(), TimerResync(_vm, curTime)); } void TimerManager::resetNextRun() { @@ -225,7 +249,9 @@ void TimerManager::disable(uint8 id) { } void TimerManager::loadDataFromFile(Common::SeekableReadStream &file, int version) { - debugC(9, kDebugLevelTimer, "TimerManager::loadDataFromFile(%p, %d)", (const void*)&file, version); + debugC(9, kDebugLevelTimer, "TimerManager::loadDataFromFile(%p, %d)", (const void *)&file, version); + + const uint32 loadTime = _isPaused ? _pauseStart : _system->getMillis(); if (version <= 7) { _nextRun = 0; @@ -240,12 +266,11 @@ void TimerManager::loadDataFromFile(Common::SeekableReadStream &file, int versio timer->countdown = countdown; if (nextRun) { - timer->nextRun = nextRun + _system->getMillis(); + timer->nextRun = nextRun + loadTime; timer->lastUpdate = timer->nextRun - countdown * _vm->tickLength(); } else { - uint32 curTime = _system->getMillis(); - timer->nextRun = curTime; - timer->lastUpdate = curTime - countdown * _vm->tickLength(); + timer->nextRun = loadTime; + timer->lastUpdate = loadTime - countdown * _vm->tickLength(); } } else { warning("Loading timer data for non existing timer %d", i); @@ -272,14 +297,16 @@ void TimerManager::loadDataFromFile(Common::SeekableReadStream &file, int versio } void TimerManager::saveDataToFile(Common::WriteStream &file) const { - debugC(9, kDebugLevelTimer, "TimerManager::saveDataToFile(%p)", (const void*)&file); + debugC(9, kDebugLevelTimer, "TimerManager::saveDataToFile(%p)", (const void *)&file); + + const uint32 saveTime = _isPaused ? _pauseStart : _system->getMillis(); file.writeByte(count()); for (CIterator pos = _timers.begin(); pos != _timers.end(); ++pos) { file.writeByte(pos->id); file.writeByte(pos->enabled); file.writeSint32BE(pos->countdown); - file.writeSint32BE(pos->lastUpdate - _system->getMillis()); + file.writeSint32BE(pos->lastUpdate - saveTime); } } diff --git a/engines/kyra/timer.h b/engines/kyra/timer.h index 0991f0a1b1..f668a88015 100644 --- a/engines/kyra/timer.h +++ b/engines/kyra/timer.h @@ -49,9 +49,11 @@ struct TimerEntry { class TimerManager { public: - TimerManager(KyraEngine *vm, OSystem *sys) : _vm(vm), _system(sys), _timers(), _nextRun(0) {} + TimerManager(KyraEngine *vm, OSystem *sys) : _vm(vm), _system(sys), _timers(), _nextRun(0), _isPaused(0), _pauseStart(0) {} ~TimerManager() { reset(); } + void pause(bool pause); + void reset(); void addTimer(uint8 id, TimerFunc *func, int countdown, bool enabled); @@ -82,10 +84,21 @@ private: Common::List _timers; uint32 _nextRun; + uint _isPaused; + uint32 _pauseStart; + typedef Common::List::iterator Iterator; typedef Common::List::const_iterator CIterator; }; +class PauseTimer { +public: + PauseTimer(TimerManager &timer) : _timer(timer) { _timer.pause(true); } + ~PauseTimer() { _timer.pause(false); } +private: + TimerManager &_timer; +}; + } // end of namespace Kyra #endif -- cgit v1.2.3 From 5082419fe9957ca144904fe2cdb3e86ff7b36e1f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 10 May 2008 19:29:13 +0000 Subject: Fixed bug in Screen_v2::makeShapeCopy. svn-id: r31986 --- engines/kyra/kyra_v2.cpp | 2 -- engines/kyra/screen_v2.cpp | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 6c4adea88c..597f81d843 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -225,14 +225,12 @@ void KyraEngine_v2::addShapeToPool(const uint8 *data, int realIndex, int shape) debugC(9, kDebugLevelMain, "KyraEngine_v2::addShapeToPool(%p, %d, %d)", data, realIndex, shape); remShapeFromPool(realIndex); _gameShapes[realIndex] = screen_v2()->makeShapeCopy(data, shape); - assert(_gameShapes[realIndex]); } void KyraEngine_v2::addShapeToPool(uint8 *shpData, int index) { debugC(9, kDebugLevelMain, "KyraEngine_v2::addShapeToPool(%p, %d)", shpData, index); remShapeFromPool(index); _gameShapes[index] = shpData; - assert(_gameShapes[index]); } void KyraEngine_v2::remShapeFromPool(int idx) { diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp index 704296c534..564282fb3f 100644 --- a/engines/kyra/screen_v2.cpp +++ b/engines/kyra/screen_v2.cpp @@ -290,6 +290,9 @@ uint8 *Screen_v2::makeShapeCopy(const uint8 *src, int index) { debugC(9, kDebugLevelScreen, "Screen_v2::makeShapeCopy(%p, %d)", (const void *)src, index); const uint8 *shape = getPtrToShape(src, index); + if (!shape) + return 0; + int size = getShapeSize(shape); uint8 *copy = new uint8[size]; -- cgit v1.2.3 From d21d9858fd33a56983eb89b662db2b27fead3ce5 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 10 May 2008 19:41:26 +0000 Subject: - Cleaned up main menu quit handling - Moved KyraEngine_HoF delay implementation to KyraEngine_v2 svn-id: r31987 --- engines/kyra/gui.cpp | 9 +++------ engines/kyra/gui.h | 2 -- engines/kyra/kyra_hof.cpp | 17 ----------------- engines/kyra/kyra_hof.h | 3 --- engines/kyra/kyra_mr.cpp | 15 ++------------- engines/kyra/kyra_mr.h | 2 -- engines/kyra/kyra_v2.cpp | 19 +++++++++++++++++++ engines/kyra/kyra_v2.h | 2 ++ 8 files changed, 26 insertions(+), 43 deletions(-) diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index 8ce513d77c..1296717467 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -382,7 +382,7 @@ bool MainMenu::getInput() { while (_system->getEventManager()->pollEvent(event)) { switch (event.type) { case Common::EVENT_QUIT: - _quitFlag = true; + _vm->quitGame(); break; case Common::EVENT_LBUTTONUP: return true; @@ -396,7 +396,6 @@ bool MainMenu::getInput() { int MainMenu::handle(int dim) { debugC(9, kDebugLevelMain, "MainMenu::handle(%d)", dim); int command = -1; - _quitFlag = false; uint8 colorMap[16]; memset(colorMap, 0, sizeof(colorMap)); @@ -436,7 +435,7 @@ int MainMenu::handle(int dim) { Common::Rect menuRect(x + 16, y + 4, x + width - 16, y + 4 + fh * 4); - while (!_quitFlag) { + while (!_vm->quit()) { updateAnimation(); bool mousePressed = getInput(); @@ -467,10 +466,8 @@ int MainMenu::handle(int dim) { _system->delayMillis(10); } - if (_quitFlag) { - _vm->quitGame(); + if (_vm->quit()) command = -1; - } _screen->copyRegion(backUpX, backUpY, backUpX, backUpY, backUpWidth, backUpHeight, 3, 0); _screen->_charWidth = charWidthBackUp; diff --git a/engines/kyra/gui.h b/engines/kyra/gui.h index a04ac20de3..4e59f0ca78 100644 --- a/engines/kyra/gui.h +++ b/engines/kyra/gui.h @@ -222,8 +222,6 @@ private: Screen *_screen; OSystem *_system; - bool _quitFlag; - StaticData _static; struct AnimIntern { int curFrame; diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index cd4ed72ae3..ebe39ee02c 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -743,23 +743,6 @@ void KyraEngine_HoF::updateMouse() { } } -void KyraEngine_HoF::delay(uint32 amount, bool updateGame, bool isMainLoop) { - uint32 start = _system->getMillis(); - do { - if (updateGame) { - if (_chatText) - updateWithText(); - else - update(); - } else { - updateInput(); - } - - if (amount > 0) - _system->delayMillis(amount > 10 ? 10 : amount); - } while (!skipFlag() && _system->getMillis() < start + amount && !_quitFlag); -} - void KyraEngine_HoF::cleanup() { delete[] _inventoryButtons; _inventoryButtons = 0; diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index 93e1246b7d..5ee13eb261 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -655,9 +655,6 @@ protected: void setWalkspeed(uint8 speed); - // delay - void delay(uint32 millis, bool updateGame = false, bool isMainLoop = false); - // ingame static sequence handling void seq_makeBookOrCauldronAppear(int type); void seq_makeBookAppear(); diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 481a3d124f..be788f5a64 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -276,6 +276,8 @@ int KyraEngine_MR::go() { delayUntil(nextRun); } + _eventList.clear(); + switch (_menu->handle(3)) { case 2: _menuDirectlyToLoad = true; @@ -1276,19 +1278,6 @@ void KyraEngine_MR::updateMouse() { } } -void KyraEngine_MR::delay(uint32 millis, bool doUpdate, bool isMainLoop) { - debugC(9, kDebugLevelMain, "KyraEngine_MR::delay(%d, %d, %d)", millis, doUpdate, isMainLoop); - uint32 endTime = _system->getMillis() + millis; - while (endTime > _system->getMillis()) { - if (doUpdate) { - //XXX - update(); - } - - _system->delayMillis(10); - } -} - #pragma mark - void KyraEngine_MR::makeCharFacingMouse() { diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 6faadf8197..306438ac1b 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -98,8 +98,6 @@ private: void updateWithText(); void updateMouse(); - void delay(uint32 millis, bool update = false, bool isMainLoop = false); - // sound specific private: void playMenuAudioFile(); diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 597f81d843..a2911dec84 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -91,6 +91,25 @@ KyraEngine_v2::~KyraEngine_v2() { delete[] _screenBuffer; } +void KyraEngine_v2::delay(uint32 amount, bool updateGame, bool isMainLoop) { + debugC(9, kDebugLevelMain, "KyraEngine_v2::delay(%u, %d, %d)", amount, updateGame, isMainLoop); + + uint32 start = _system->getMillis(); + do { + if (updateGame) { + if (_chatText) + updateWithText(); + else + update(); + } else { + updateInput(); + } + + if (amount > 0) + _system->delayMillis(amount > 10 ? 10 : amount); + } while (!skipFlag() && _system->getMillis() < start + amount && !_quitFlag); +} + int KyraEngine_v2::checkInput(Button *buttonList, bool mainLoop) { debugC(9, kDebugLevelMain, "KyraEngine_v2::checkInput(%p, %d)", (const void*)buttonList, mainLoop); updateInput(); diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index ca6569a56c..3b7aac91ba 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -78,6 +78,8 @@ public: virtual Screen_v2 *screen_v2() const = 0; virtual GUI *gui_v2() const = 0; + void delay(uint32 time, bool update = false, bool isMainLoop = false); + const EngineDesc &engineDesc() const { return _desc; } protected: EngineDesc _desc; -- cgit v1.2.3 From b2defd0eac9401ffeea91ef0154650e108ffc179 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 10 May 2008 19:57:49 +0000 Subject: Fixed warning. svn-id: r31988 --- engines/kyra/timer.cpp | 6 +++--- engines/kyra/timer.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp index d9668afa98..b20d9510cc 100644 --- a/engines/kyra/timer.cpp +++ b/engines/kyra/timer.cpp @@ -62,15 +62,15 @@ struct TimerEqual : public Common::UnaryFunction { }; } // end of anonymous namespace -void TimerManager::pause(bool pause) { - if (pause) { +void TimerManager::pause(bool p) { + if (p) { ++_isPaused; if (_isPaused == 1) { _isPaused = true; _pauseStart = _system->getMillis(); } - } else if (!pause && _isPaused > 0) { + } else if (!p && _isPaused > 0) { --_isPaused; if (_isPaused == 0) { diff --git a/engines/kyra/timer.h b/engines/kyra/timer.h index f668a88015..264590845e 100644 --- a/engines/kyra/timer.h +++ b/engines/kyra/timer.h @@ -52,7 +52,7 @@ public: TimerManager(KyraEngine *vm, OSystem *sys) : _vm(vm), _system(sys), _timers(), _nextRun(0), _isPaused(0), _pauseStart(0) {} ~TimerManager() { reset(); } - void pause(bool pause); + void pause(bool p); void reset(); -- cgit v1.2.3 From 257aaa3ced14645d4410a272e89cafb7282836ac Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 10 May 2008 20:59:43 +0000 Subject: Restructured saving/loading and added a stub for Woodruff svn-id: r31989 --- engines/gob/gob.cpp | 3 +- engines/gob/gob.h | 5 +- engines/gob/inter_v2.cpp | 31 +- engines/gob/module.mk | 1 + engines/gob/saveload.cpp | 724 ++++++++++++++++++++++++++------------------ engines/gob/saveload.h | 364 ++++++++++++++++------ engines/gob/saveload_v2.cpp | 403 ++++++++++++++---------- engines/gob/saveload_v3.cpp | 677 +++++++++++++++++++++++++---------------- engines/gob/saveload_v4.cpp | 80 +++++ engines/gob/video.h | 7 +- 10 files changed, 1460 insertions(+), 835 deletions(-) create mode 100644 engines/gob/saveload_v4.cpp diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index ed2fe0fc15..41f268eba2 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -89,6 +89,7 @@ GobEngine::GobEngine(OSystem *syst) : Engine(syst) { Common::addSpecialDebugLevel(kDebugParser, "Parser", "Parser debug level"); Common::addSpecialDebugLevel(kDebugGameFlow, "Gameflow", "Gameflow debug level"); Common::addSpecialDebugLevel(kDebugFileIO, "FileIO", "File Input/Output debug level"); + Common::addSpecialDebugLevel(kDebugSaveLoad, "SaveLoad", "Saving/Loading debug level"); Common::addSpecialDebugLevel(kDebugGraphics, "Graphics", "Graphics debug level"); Common::addSpecialDebugLevel(kDebugCollisions, "Collisions", "Collisions debug level"); @@ -353,7 +354,7 @@ bool GobEngine::initGameParts() { _map = new Map_v4(this); _goblin = new Goblin_v4(this); _scenery = new Scenery_v2(this); - _saveLoad = new SaveLoad_v3(this, _targetName.c_str()); + _saveLoad = new SaveLoad_v4(this, _targetName.c_str()); break; default: diff --git a/engines/gob/gob.h b/engines/gob/gob.h index e1d75bd2a4..0a82bceed5 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -104,8 +104,9 @@ enum { kDebugParser = 1 << 4, kDebugGameFlow = 1 << 5, kDebugFileIO = 1 << 6, - kDebugGraphics = 1 << 7, - kDebugCollisions = 1 << 8 + kDebugSaveLoad = 1 << 7, + kDebugGraphics = 1 << 8, + kDebugCollisions = 1 << 9 }; inline char *strncpy0(char *dest, const char *src, size_t n) { diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 36f33e6553..6f261e9822 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1911,7 +1911,7 @@ bool Inter_v2::o2_checkData(OpFuncParams ¶ms) { int16 handle; int16 varOff; int32 size; - SaveType type; + SaveLoad::SaveMode mode; evalExpr(0); varOff = _vm->_parse->parseVarIndex(); @@ -1919,8 +1919,8 @@ bool Inter_v2::o2_checkData(OpFuncParams ¶ms) { size = -1; handle = 1; - type = _vm->_saveLoad->getSaveType(_vm->_global->_inter_resStr); - if (type == kSaveNone) { + mode = _vm->_saveLoad->getSaveMode(_vm->_global->_inter_resStr); + if (mode == SaveLoad::kSaveModeNone) { handle = _vm->_dataIO->openData(_vm->_global->_inter_resStr); if (handle >= 0) { @@ -1928,8 +1928,8 @@ bool Inter_v2::o2_checkData(OpFuncParams ¶ms) { size = _vm->_dataIO->getDataSize(_vm->_global->_inter_resStr); } else warning("File \"%s\" not found", _vm->_global->_inter_resStr); - } else - size = _vm->_saveLoad->getSize(type); + } else if (mode == SaveLoad::kSaveModeSave) + size = _vm->_saveLoad->getSize(_vm->_global->_inter_resStr); if (size == -1) handle = -1; @@ -1950,7 +1950,7 @@ bool Inter_v2::o2_readData(OpFuncParams ¶ms) { int16 dataVar; int16 handle; byte *buf; - SaveType type; + SaveLoad::SaveMode mode; evalExpr(0); dataVar = _vm->_parse->parseVarIndex(); @@ -1962,13 +1962,14 @@ bool Inter_v2::o2_readData(OpFuncParams ¶ms) { debugC(2, kDebugFileIO, "Read from file \"%s\" (%d, %d bytes at %d)", _vm->_global->_inter_resStr, dataVar, size, offset); - type = _vm->_saveLoad->getSaveType(_vm->_global->_inter_resStr); - if (type != kSaveNone) { + mode = _vm->_saveLoad->getSaveMode(_vm->_global->_inter_resStr); + if (mode == SaveLoad::kSaveModeSave) { WRITE_VAR(1, 1); - if (_vm->_saveLoad->load(type, dataVar, size, offset)) + if (_vm->_saveLoad->load(_vm->_global->_inter_resStr, dataVar, size, offset)) WRITE_VAR(1, 0); return false; - } + } else if (mode == SaveLoad::kSaveModeIgnore) + return false; if (size < 0) { warning("Attempted to read a raw sprite from file \"%s\"", @@ -2021,7 +2022,7 @@ bool Inter_v2::o2_writeData(OpFuncParams ¶ms) { int32 offset; int32 size; int16 dataVar; - SaveType type; + SaveLoad::SaveMode mode; evalExpr(0); dataVar = _vm->_parse->parseVarIndex(); @@ -2034,11 +2035,11 @@ bool Inter_v2::o2_writeData(OpFuncParams ¶ms) { WRITE_VAR(1, 1); - type = _vm->_saveLoad->getSaveType(_vm->_global->_inter_resStr); - if (type != kSaveNone) { - if (_vm->_saveLoad->save(type, dataVar, size, offset)) + mode = _vm->_saveLoad->getSaveMode(_vm->_global->_inter_resStr); + if (mode == SaveLoad::kSaveModeSave) { + if (_vm->_saveLoad->save(_vm->_global->_inter_resStr, dataVar, size, offset)) WRITE_VAR(1, 0); - } else + } else if (mode == SaveLoad::kSaveModeNone) warning("Attempted to write to file \"%s\"", _vm->_global->_inter_resStr); return false; diff --git a/engines/gob/module.mk b/engines/gob/module.mk index 09664f15b4..c95391cedc 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -44,6 +44,7 @@ MODULE_OBJS := \ saveload.o \ saveload_v2.o \ saveload_v3.o \ + saveload_v4.o \ scenery.o \ scenery_v1.o \ scenery_v2.o \ diff --git a/engines/gob/saveload.cpp b/engines/gob/saveload.cpp index 717bc143a6..e0854151a0 100644 --- a/engines/gob/saveload.cpp +++ b/engines/gob/saveload.cpp @@ -24,456 +24,493 @@ */ #include "common/endian.h" -#include "common/file.h" +#include "common/savefile.h" #include "gob/gob.h" #include "gob/saveload.h" -#include "gob/global.h" #include "gob/draw.h" -#include "gob/video.h" namespace Gob { -SaveLoad::SaveLoad(GobEngine *vm, const char *targetName) : _vm(vm) { - _curSlot = -1; +TempSprite::TempSprite() { + _sprite = 0; + _width = _height = 0; + _size = -1; + memset(_palette, 0, 768); +} - _stagesCount = 0; - _buffer = 0; +TempSprite::~TempSprite() { + delete[] _sprite; +} - _tempSprite = 0; - memset(_tempPal, 0, 768); - _tempSpriteSize = -1; +int TempSprite::getSpriteIndex(int32 size) const { + if (size < -1000) + size += 1000; - _saveFiles = new char*[5]; + return -size - 1; +} - assert(_saveFiles); +bool TempSprite::getSpritePalette(int32 size) const { + return size < -1000; +} - _saveFiles[0] = new char[strlen(targetName) + 5]; - _saveFiles[1] = 0; - _saveFiles[2] = new char[strlen(targetName) + 5]; - _saveFiles[3] = _saveFiles[0]; - _saveFiles[4] = 0; +bool TempSprite::getProperties(int16 dataVar, int32 size, int32 offset, + int &index, bool &palette) const { - assert(_saveFiles[0] && _saveFiles[2]); + if (size >= 0) { + warning("Invalid index (%d)", size); + return false; + } - sprintf(_saveFiles[0], "%s.s00", targetName); - sprintf(_saveFiles[2], "%s.blo", targetName); -} + index = getSpriteIndex(size); + palette = getSpritePalette(size); -SaveLoad::~SaveLoad() { - if (_buffer) { - for (int i = 0; i < _stagesCount; i++) - delete[] _buffer[i]; - delete[] _buffer; + if ((index < 0) || (index >= SPRITES_COUNT)) { + warning("Index out of range (%d)", index); + return false; } - delete _tempSprite; + return true; +} - delete[] _saveFiles[0]; - delete[] _saveFiles[2]; - delete[] _saveFiles; +int32 TempSprite::getSize() const { + return _size; } -const char *SaveLoad::setCurSlot(int slot) { - static char *slotBase = _saveFiles[0] + strlen(_saveFiles[0]) - 2; +bool TempSprite::saveSprite(const SurfaceDesc &surfDesc) { + delete[] _sprite; - if (_curSlot != slot) { - _curSlot = slot; + _width = surfDesc.getWidth(); + _height = surfDesc.getHeight(); + _size = _width * _height; + _sprite = new byte[_size]; - if (_curSlot >= 0) - snprintf(slotBase, 3, "%02d", slot); - } + memcpy(_sprite, surfDesc.getVidMem(), _size); - return _saveFiles[0]; + return true; } -uint32 SaveLoad::read(Common::ReadStream &in, byte *buf, - byte *sizes, uint32 count) { - uint32 nRead; +bool TempSprite::savePalette(const Video::Color *palette) { + memcpy((byte *) _palette, (byte *) palette, 768); + return true; +} - nRead = in.read(buf, count); - if (nRead != count) { - warning("Can't read data: requested %d, got %d", count, nRead); - return 0; +bool TempSprite::loadSprite(SurfaceDesc &surfDesc) { + if (!_sprite) { + warning("No sprite saved"); + return false; } - nRead = in.read(sizes, count); - if (nRead != count) { - warning("Can't read data sizes: requested %d, got %d", count, nRead); - return 0; + if (_size != (surfDesc.getWidth() * surfDesc.getHeight())) { + warning("Dimensions don't match (%dx%d - %dx%d", + _width, _height, surfDesc.getWidth(), surfDesc.getHeight()); + return false; } - return count; + memcpy(surfDesc.getVidMem(), _sprite, _size); + + return true; } -uint32 SaveLoad::write(Common::WriteStream &out, byte *buf, - byte *sizes, uint32 count) { - uint32 written; +bool TempSprite::loadPalette(Video::Color *palette) { + memcpy((byte *) palette, (byte *) _palette, 768); + return true; +} - written = out.write(buf, count); - if (written != count) { - warning("Can't write data: requested %d, wrote %d", count, written); - return 0; +bool TempSprite::toBuffer(byte *buffer, int32 size, bool palette) const { + + int32 haveSize = _size + (palette ? 768 : 0); + if (size != haveSize) { + warning("Sizes don't match (%d != %d)", size, haveSize); + return false; } - written = out.write(sizes, count); - if (written != count) { - warning("Can't write data: requested %d, wrote %d", count, written); - return 0; + if (palette) { + memcpy(buffer, (byte *) _palette, 768); + buffer += 768; } - return count; + memcpy(buffer, _sprite, _size); + + return true; } -bool SaveLoad::loadDataEndian(Common::ReadStream &in, - int16 dataVar, uint32 size) { +bool TempSprite::fromBuffer(const byte *buffer, int32 size, bool palette) { + if (palette) { + memcpy((byte *) _palette, buffer, 768); + buffer += 768; + size -= 768; + } - bool retVal = false; + _size = size; - byte *varBuf = new byte[size]; - byte *sizeBuf = new byte[size]; + delete[] _sprite; + _sprite = new byte[_size]; - assert(varBuf && sizeBuf); + memcpy(_sprite, buffer, _size); - if (read(in, varBuf, sizeBuf, size) == size) { - if (fromEndian(varBuf, sizeBuf, size)) { - memcpy(_vm->_global->_inter_variables + dataVar, varBuf, size); - memcpy(_vm->_global->_inter_variablesSizes + dataVar, sizeBuf, size); - retVal = true; - } - } + return true; +} - delete[] varBuf; - delete[] sizeBuf; - return retVal; +PlainSave::PlainSave() { } -bool SaveLoad::saveDataEndian(Common::WriteStream &out, - int16 dataVar, uint32 size) { +PlainSave::~PlainSave() { +} - bool retVal = false; +bool PlainSave::save(int16 dataVar, int32 size, int32 offset, const char *name, + const byte *variables, const byte *variableSizes) const { - byte *varBuf = new byte[size]; - byte *sizeBuf = new byte[size]; + if ((size <= 0) || (offset != 0)) { + warning("Invalid size (%d) or offset (%d)", size, offset); + return false; + } - assert(varBuf && sizeBuf); + Common::SaveFileManager *saveMan = g_system->getSavefileManager(); + Common::OutSaveFile *out = saveMan->openForSaving(name); - memcpy(varBuf, _vm->_global->_inter_variables + dataVar, size); - memcpy(sizeBuf, _vm->_global->_inter_variablesSizes + dataVar, size); + if (!out) { + warning("Can't open file \"%s\" for writing", name); + return false; + } - if (toEndian(varBuf, sizeBuf, size)) - if (write(out, varBuf, sizeBuf, size) == size) - retVal = true; + bool retVal; + retVal = SaveLoad::saveDataEndian(*out, dataVar, size, variables, variableSizes); - delete[] varBuf; - delete[] sizeBuf; + out->finalize(); + if (out->ioFailed()) { + warning("Can't write to file \"%s\"", name); + retVal = false; + } + delete out; return retVal; } -int32 SaveLoad::getSize(SaveType type) { - switch (type) { - case kSaveNone: - return -1; - break; - - case kSaveGame: - return getSizeGame(); - break; +bool PlainSave::load(int16 dataVar, int32 size, int32 offset, const char *name, + byte *variables, byte *variableSizes) const { - case kSaveTempSprite: - return getSizeTempSprite(); - break; - - case kSaveNotes: - return getSizeNotes(); - break; + if ((size <= 0) || (offset != 0)) { + warning("Invalid size (%d) or offset (%d)", size, offset); + return false; + } - case kSaveScreenshot: - return getSizeScreenshot(); - break; + Common::SaveFileManager *saveMan = g_system->getSavefileManager(); + Common::InSaveFile *in = saveMan->openForLoading(name); - case kSaveIgnore: - return -1; - break; + if (!in) { + warning("Can't open file \"%s\" for reading", name); + return false; } - return -1; + bool retVal = SaveLoad::loadDataEndian(*in, dataVar, size, variables, variableSizes); + delete in; + return retVal; } -bool SaveLoad::load(SaveType type, int16 dataVar, int32 size, int32 offset) { - switch (type) { - case kSaveNone: - return false; - break; - - case kSaveGame: - return loadGame(dataVar, size, offset); - break; - case kSaveTempSprite: - return loadTempSprite(dataVar, size, offset); - break; +StagedSave::StagedSave() { + _mode = kModeNone; + _name = 0; + _loaded = false; +} - case kSaveNotes: - return loadNotes(dataVar, size, offset); - break; +StagedSave::~StagedSave() { + clear(); +} - case kSaveScreenshot: - return loadScreenshot(dataVar, size, offset); - break; +void StagedSave::addStage(int32 size, bool endianed) { + int32 offset = 0; - case kSaveIgnore: - return true; - break; - } + if (!_stages.empty()) + offset = _stages[_stages.size() - 1].offset + + _stages[_stages.size() - 1].size; - return false; + Stage stage(size, offset, endianed); + _stages.push_back(stage); } -bool SaveLoad::save(SaveType type, int16 dataVar, int32 size, int32 offset) { - switch (type) { - case kSaveNone: - return false; - break; +int StagedSave::findStage(int16 dataVar, int32 size, int32 offset) const { + for (uint i = 0; i < _stages.size(); i++) + if ((_stages[i].size == size) && + (_stages[i].offset == offset)) + return i; + + return -1; +} - case kSaveGame: - return saveGame(dataVar, size, offset); - break; +bool StagedSave::allSaved() const { + for (uint i = 0; i < _stages.size(); i++) + if (!_stages[i].bufVar) + return false; - case kSaveTempSprite: - return saveTempSprite(dataVar, size, offset); - break; + return true; +} - case kSaveNotes: - return saveNotes(dataVar, size, offset); - break; +uint32 StagedSave::getSize() const { + uint32 size = 0; - case kSaveScreenshot: - return saveScreenshot(dataVar, size, offset); - break; + for (uint i = 0; i < _stages.size(); i++) { + if (_stages[i].endianed) + size += 2 * _stages[i].size; + else + size += _stages[i].size; + } + + return size; +} - case kSaveIgnore: - return true; - break; +void StagedSave::clear() { + for (uint i = 0; i < _stages.size(); i++) { + delete[] _stages[i].bufVar; + delete[] _stages[i].bufVarSizes; + _stages[i].bufVar = 0; + _stages[i].bufVarSizes = 0; } - return false; + delete[] _name; + _name = 0; + + _mode = kModeNone; + _loaded = false; } -int32 SaveLoad::getSizeTempSprite() { - return _tempSpriteSize; +void StagedSave::assertMode(Mode mode, const char *name) { + if ((_mode != mode) || ((name[0] != '\0') && strcmp(_name, name))) { + clear(); + _mode = mode; + _name = new char[strlen(name) + 1]; + strcpy(_name, name); + } } -bool SaveLoad::loadTempSprite(int16 dataVar, int32 size, int32 offset) { - int index; - bool readPal; +bool StagedSave::save(int16 dataVar, int32 size, int32 offset, const char *name, + const byte *variables, const byte *variableSizes) { - if (size >= 0) { - warning("Invalid attempt at loading from the temporary sprite"); + if ((dataVar < 0) || (size <= 0) || (offset < 0)) { + warning("Invalid dataVar (%d), size (%d) or offset (%d)", dataVar, size, offset); return false; } - index = getSpriteIndex(size); - readPal = getSpritePalette(size); + int stage = findStage(dataVar, size, offset); + if (stage == -1) { + warning("Invalid saving procedure"); + return false; + } - if ((index < 0) || (index >= SPRITES_COUNT)) { - warning("Index out of range while loading from the temporary " - "sprite (%d)", index); + if (!variables || (_stages[stage].endianed && !variableSizes)) { + warning("Missing data"); return false; } - return loadTempSprite(index, readPal); -} + assertMode(kModeSave, name); -bool SaveLoad::saveTempSprite(int16 dataVar, int32 size, int32 offset) { - int index; - bool readPal; + _stages[stage].bufVar = new byte[size]; + memcpy(_stages[stage].bufVar, variables + dataVar, size); - if (size >= 0) { - warning("Invalid attempt at saving to the temporary sprite"); - return false; + if (_stages[stage].endianed) { + _stages[stage].bufVarSizes = new byte[size]; + memcpy(_stages[stage].bufVarSizes, variableSizes + dataVar, size); } - index = getSpriteIndex(size); - readPal = getSpritePalette(size); - - if ((index < 0) || (index >= SPRITES_COUNT)) { - warning("Index out of range while saving to the temporary sprite (%d)", - index); - return false; + if (allSaved()) { + bool result = write(); + clear(); + return result; } - return saveTempSprite(index, readPal); + return true; } -bool SaveLoad::loadTempSprite(uint32 index, bool palette) { - SurfaceDesc *sprite; +bool StagedSave::load(int16 dataVar, int32 size, int32 offset, const char *name, + byte *variables, byte *variableSizes) { - if (palette) { - memcpy((char *) _vm->_global->_pPaletteDesc->vgaPal, - (char *) _tempPal, 768); - _vm->_video->setFullPalette(_vm->_global->_pPaletteDesc); - } - - sprite = _vm->_draw->_spritesArray[index]; - - if (!sprite) { - warning("Couldn't load from the temporary sprite: " - "No such sprite %d", index); + if ((dataVar < 0) || (size <= 0) || (offset < 0)) { + warning("Invalid dataVar (%d), size (%d) or offset (%d)", dataVar, size, offset); return false; } - if ((sprite->getWidth() != _tempSprite->getWidth()) || - (sprite->getHeight() != _tempSprite->getHeight())) { - warning("Resolution doesn't match while loading from the " - "temporary sprite (%d: %dx%d vs. %dx%d)", index, - sprite->getWidth(), sprite->getHeight(), - _tempSprite->getWidth(), _tempSprite->getHeight()); + int stage = findStage(dataVar, size, offset); + if (stage == -1) { + warning("Invalid loading procedure"); return false; } - _vm->_video->drawSprite(_tempSprite, sprite, 0, 0, - sprite->getWidth() - 1, sprite->getHeight() - 1, 0, 0, 0); + assertMode(kModeLoad, name); - if (index == 21) { - _vm->_draw->forceBlit(); - _vm->_video->retrace(); + if (!_loaded) { + if (!read()) { + clear(); + return false; + } } + if (variables) + memcpy(variables + dataVar, _stages[stage].bufVar, size); + if (_stages[stage].endianed && variableSizes) + memcpy(variableSizes + dataVar, _stages[stage].bufVarSizes, size); + return true; } -bool SaveLoad::saveTempSprite(uint32 index, bool palette) { - SurfaceDesc *sprite = _vm->_draw->_spritesArray[index]; +bool StagedSave::write() const { + Common::SaveFileManager *saveMan = g_system->getSavefileManager(); + Common::OutSaveFile *out = saveMan->openForSaving(_name); - if (!sprite) { - warning("Couldn't save to the temporary sprite: " - "No such sprite %d", index); + if (!out) { + warning("Can't open file \"%s\" for writing", _name); return false; } - delete _tempSprite; - _tempSprite = _vm->_video->initSurfDesc(_vm->_global->_videoMode, - sprite->getWidth(), sprite->getHeight(), 0); + bool result = true; + for (uint i = 0; (i < _stages.size()) && result; i++) { + if (!_stages[i].endianed) { - _vm->_video->drawSprite(sprite, _tempSprite, 0, 0, - sprite->getWidth() - 1, sprite->getHeight() - 1, 0, 0, 0); + uint32 written = out->write(_stages[i].bufVar, _stages[i].size); - _tempSpriteSize = _vm->_draw->getSpriteRectSize(index); + result = (written == ((uint32) _stages[i].size)); + if (!result) + warning("Can't write data: requested %d, wrote %d", _stages[i].size, written); - if (palette) { - memcpy((char *) _tempPal, - (char *) _vm->_global->_pPaletteDesc->vgaPal, 768); - _tempSpriteSize += 768; + } else + result = SaveLoad::saveDataEndian(*out, 0, _stages[i].size, + _stages[i].bufVar, _stages[i].bufVarSizes); } - return true; + if (result) { + out->finalize(); + if (out->ioFailed()) { + warning("Can't write to file \"%s\"", _name); + result = false; + } + } + + delete out; + return result; } -bool SaveLoad::loadSprite(Common::ReadStream &in, int32 size) { - SurfaceDesc *sprite; - byte *buf; - int nRead; - int index; - bool readPal; +bool StagedSave::read() { + Common::SaveFileManager *saveMan = g_system->getSavefileManager(); + Common::InSaveFile *in = saveMan->openForLoading(_name); - if (size >= 0) { - warning("Invalid attempt at loading a sprite"); + if (!in) { + warning("Can't open file \"%s\" for reading", _name); return false; } - index = getSpriteIndex(size); - readPal = getSpritePalette(size); - - if ((index < 0) || (index >= SPRITES_COUNT)) { - warning("Index out of range while loading a sprite (%d)", - index); + uint32 saveSize = getSize(); + if (in->size() != saveSize) { + warning("Wrong size (%d != %d)", in->size(), saveSize); return false; } - size = _vm->_draw->getSpriteRectSize(index); - sprite = _vm->_draw->_spritesArray[index]; + bool result = true; + for (uint i = 0; ((i < _stages.size()) && result); i++) { + _stages[i].bufVar = new byte[_stages[i].size]; - if (!sprite) { - warning("Couldn't load sprite: No such sprite %d", index); - return false; - } + if (!_stages[i].endianed) { - buf = new byte[MAX(768, size)]; - assert(buf); + uint32 nRead = in->read(_stages[i].bufVar, _stages[i].size); - if (readPal) { - nRead = in.read(buf, 768); - if (nRead != 768) { - warning("Couldn't read a palette: requested 768, got %d", nRead); - delete[] buf; - return false; - } + result = (nRead == ((uint32) _stages[i].size)); + if (!result) + warning("Can't read data: requested %d, got %d", _stages[i].size, nRead); - memcpy((char *) _vm->_global->_pPaletteDesc->vgaPal, - (char *) buf, 768); - _vm->_video->setFullPalette(_vm->_global->_pPaletteDesc); - } + } else { + _stages[i].bufVarSizes = new byte[_stages[i].size]; - nRead = in.read(buf, size); - if (nRead != size) { - warning("Couldn't read sprite data: requested %d, got %d", size, nRead); - delete[] buf; - return false; + result = SaveLoad::loadDataEndian(*in, 0, _stages[i].size, + _stages[i].bufVar, _stages[i].bufVarSizes); + } } - memcpy((char *) sprite->getVidMem(), buf, size); + if (result) + _loaded = true; - delete[] buf; - return true; + delete in; + return result; } -bool SaveLoad::saveSprite(Common::WriteStream &out, int32 size) { - SurfaceDesc *sprite; - int written; - int index; - bool readPal; - if (size >= 0) { - warning("Invalid attempt at saving a sprite"); - return false; - } +SaveLoad::SaveLoad(GobEngine *vm, const char *targetName) : _vm(vm) { - index = getSpriteIndex(size); - readPal = getSpritePalette(size); + _targetName = new char[strlen(targetName) + 1]; + strcpy(_targetName, targetName); +} - if ((index < 0) || (index >= SPRITES_COUNT)) { - warning("Index out of range while saving a sprite (%d)", - index); - return false; - } +SaveLoad::~SaveLoad() { + delete[] _targetName; +} + +int32 SaveLoad::getSize(const char *fileName) { + int type; + + type = getSaveType(stripPath(fileName)); + if (type == -1) + return -1; + + debugC(3, kDebugSaveLoad, "Requested size of save file \"%s\" (type %d)", + fileName, type); + + return getSizeVersioned(type); +} - size = _vm->_draw->getSpriteRectSize(index); - sprite = _vm->_draw->_spritesArray[index]; +bool SaveLoad::load(const char *fileName, int16 dataVar, int32 size, int32 offset) { + int type; - if (!sprite) { - warning("Couldn't save sprite: No such sprite %d", index); + type = getSaveType(stripPath(fileName)); + if (type == -1) return false; - } - if (readPal) { - written = out.write((char *) _vm->_global->_pPaletteDesc->vgaPal, 768); - if (written != 768) { - warning("Couldn't write a palette: requested 768, wrote %d", written); - return false; - } - } + debugC(3, kDebugSaveLoad, "Requested loading of save file \"%s\" (type %d) - %d, %d, %d", + fileName, type, dataVar, size, offset); - written = out.write((char *) sprite->getVidMem(), size); - if (written != size) { - warning("Couldn't write a sprite: requested %d, wrote %d", - size, written); + return loadVersioned(type, dataVar, size, offset); +} + +bool SaveLoad::save(const char *fileName, int16 dataVar, int32 size, int32 offset) { + int type; + + type = getSaveType(stripPath(fileName)); + if (type == -1) return false; - } - return true; + debugC(3, kDebugSaveLoad, "Requested saving of save file \"%s\" (type %d) - %d, %d, %d", + fileName, type, dataVar, size, offset); + + return saveVersioned(type, dataVar, size, offset); +} + +const char *SaveLoad::stripPath(const char *fileName) { + const char *backSlash; + if ((backSlash = strrchr(fileName, '\\'))) + return backSlash + 1; + + return fileName; +} + +char *SaveLoad::setCurrentSlot(char *destName, int slot) { + char *slotBase = destName + strlen(destName) - 2; + + snprintf(slotBase, 3, "%02d", slot); + + return destName; +} + +void SaveLoad::buildIndex(byte *buffer, char *name, int n, int32 size, int32 offset) { + Common::SaveFileManager *saveMan = g_system->getSavefileManager(); + Common::InSaveFile *in; + + for (int i = 0; i < n; i++, buffer += size) { + in = saveMan->openForLoading(setCurrentSlot(name, i)); + if (in) { + in->seek(offset); + in->read(buffer, size); + delete in; + } else + memset(buffer, 0, size); + } } bool SaveLoad::fromEndian(byte *buf, const byte *sizes, uint32 count) { @@ -514,4 +551,89 @@ bool SaveLoad::toEndian(byte *buf, const byte *sizes, uint32 count) { return true; } +uint32 SaveLoad::read(Common::ReadStream &in, + byte *buf, byte *sizes, uint32 count) { + uint32 nRead; + + nRead = in.read(buf, count); + if (nRead != count) { + warning("Can't read data: requested %d, got %d", count, nRead); + return 0; + } + + nRead = in.read(sizes, count); + if (nRead != count) { + warning("Can't read data sizes: requested %d, got %d", count, nRead); + return 0; + } + + return count; +} + +uint32 SaveLoad::write(Common::WriteStream &out, + const byte *buf, const byte *sizes, uint32 count) { + uint32 written; + + written = out.write(buf, count); + if (written != count) { + warning("Can't write data: requested %d, wrote %d", count, written); + return 0; + } + + written = out.write(sizes, count); + if (written != count) { + warning("Can't write data: requested %d, wrote %d", count, written); + return 0; + } + + return count; +} + +bool SaveLoad::loadDataEndian(Common::ReadStream &in, + int16 dataVar, uint32 size, byte *variables, byte *variableSizes) { + + bool retVal = false; + + byte *varBuf = new byte[size]; + byte *sizeBuf = new byte[size]; + + assert(varBuf && sizeBuf); + + if (read(in, varBuf, sizeBuf, size) == size) { + if (fromEndian(varBuf, sizeBuf, size)) { + memcpy(variables + dataVar, varBuf, size); + memcpy(variableSizes + dataVar, sizeBuf, size); + retVal = true; + } + } + + delete[] varBuf; + delete[] sizeBuf; + + return retVal; +} + +bool SaveLoad::saveDataEndian(Common::WriteStream &out, + int16 dataVar, uint32 size, const byte *variables, const byte *variableSizes) { + + bool retVal = false; + + byte *varBuf = new byte[size]; + byte *sizeBuf = new byte[size]; + + assert(varBuf && sizeBuf); + + memcpy(varBuf, variables + dataVar, size); + memcpy(sizeBuf, variableSizes + dataVar, size); + + if (toEndian(varBuf, sizeBuf, size)) + if (write(out, varBuf, sizeBuf, size) == size) + retVal = true; + + delete[] varBuf; + delete[] sizeBuf; + + return retVal; +} + } // End of namespace Gob diff --git a/engines/gob/saveload.h b/engines/gob/saveload.h index bf1e4c01a8..9b032cc73f 100644 --- a/engines/gob/saveload.h +++ b/engines/gob/saveload.h @@ -26,143 +26,317 @@ #ifndef GOB_SAVELOAD_H #define GOB_SAVELOAD_H +#include "common/array.h" #include "common/stream.h" #include "gob/video.h" namespace Gob { -enum SaveType { - kSaveNone = -1, - kSaveGame, - kSaveTempSprite, - kSaveNotes, - kSaveScreenshot, - kSaveIgnore +class TempSprite { +public: + TempSprite(); + ~TempSprite(); + + bool getProperties(int16 dataVar, int32 size, int32 offset, + int &index, bool &palette) const; + + int32 getSize() const; + + bool saveSprite(const SurfaceDesc &surfDesc); + bool savePalette(const Video::Color *palette); + bool loadSprite(SurfaceDesc &surfDesc); + bool loadPalette(Video::Color *palette); + + bool toBuffer(byte *buffer, int32 size, bool palette) const; + bool fromBuffer(const byte *buffer, int32 size, bool palette); + +private: + byte *_sprite; + int16 _width; + int16 _height; + int32 _size; + Video::Color _palette[256]; + + int getSpriteIndex(int32 size) const; + bool getSpritePalette(int32 size) const; }; -class SaveLoad { +class PlainSave { +public: + PlainSave(); + ~PlainSave(); + + bool save(int16 dataVar, int32 size, int32 offset, const char *name, + const byte *variables, const byte *variableSizes) const; + bool load(int16 dataVar, int32 size, int32 offset, const char *name, + byte *variables, byte *variableSizes) const; +}; + +class StagedSave { public: - int32 getSize(SaveType type); - bool load(SaveType type, int16 dataVar, int32 size, int32 offset); - bool save(SaveType type, int16 dataVar, int32 size, int32 offset); + StagedSave(); + ~StagedSave(); + + void addStage(int32 size, bool endianed = true); + + bool save(int16 dataVar, int32 size, int32 offset, const char *name, + const byte *variables, const byte *variableSizes); + bool load(int16 dataVar, int32 size, int32 offset, const char *name, + byte *variables, byte *variableSizes); + +private: + struct Stage { + byte *bufVar; + byte *bufVarSizes; + int32 size; + int32 offset; + bool endianed; + + Stage(int32 s = 0, int32 off = 0, bool end = true) : + bufVar(0), bufVarSizes(0), size(s), offset(off), endianed(end) {} + }; + + enum Mode { + kModeNone, + kModeSave, + kModeLoad + }; + + Common::Array _stages; + enum Mode _mode; + char *_name; + + bool _loaded; - virtual SaveType getSaveType(const char *fileName) = 0; + int findStage(int16 dataVar, int32 size, int32 offset) const; + bool allSaved() const; + + uint32 getSize() const; + + void clear(); + void assertMode(Mode mode, const char *name); + + bool write() const; + bool read(); +}; + +class SaveLoad { +public: + enum SaveMode { + kSaveModeNone, + kSaveModeIgnore, + kSaveModeSave + }; SaveLoad(GobEngine *vm, const char *targetName); virtual ~SaveLoad(); -protected: - int _curSlot; - char **_saveFiles; + virtual SaveMode getSaveMode(const char *fileName) = 0; + + int32 getSize(const char *fileName); + bool load(const char *fileName, int16 dataVar, int32 size, int32 offset); + bool save(const char *fileName, int16 dataVar, int32 size, int32 offset); + + char *setCurrentSlot(char *destName, int slot); + void buildIndex(byte *buffer, char *name, int n, int32 size, int32 offset = 0); - int _stagesCount; - byte **_buffer; + static const char *stripPath(const char *fileName); - // While using the notepad or changing the font, the original executable - // temporarily dumps Draw::_backSurface to a file. Since that's not really - // a nice thing to do, we work around it. - SurfaceDesc *_tempSprite; - Video::Color _tempPal[256]; - int32 _tempSpriteSize; + static bool fromEndian(byte *buf, const byte *sizes, uint32 count); + static bool toEndian(byte *buf, const byte *sizes, uint32 count); + static uint32 read(Common::ReadStream &in, + byte *buf, byte *sizes, uint32 count); + static uint32 write(Common::WriteStream &out, + const byte *buf, const byte *sizes, uint32 count); + static bool loadDataEndian(Common::ReadStream &in, + int16 dataVar, uint32 size, byte *variables, byte *variableSizes); + static bool saveDataEndian(Common::WriteStream &out, + int16 dataVar, uint32 size, const byte *variables, const byte *variableSizes); + +protected: GobEngine *_vm; - int getSpriteIndex(int32 size) { - if (size < -1000) - size += 1000; - - return -size - 1; - } - bool getSpritePalette(int32 size) { - return size < -1000; - } - - const char *setCurSlot(int slot); - bool fromEndian(byte *buf, const byte *sizes, uint32 count); - bool toEndian(byte *buf, const byte *sizes, uint32 count); - uint32 read(Common::ReadStream &in, byte *buf, - byte *sizes, uint32 count); - uint32 write(Common::WriteStream &out, byte *buf, - byte *sizes, uint32 count); - - bool loadDataEndian(Common::ReadStream &in, int16 dataVar, uint32 size); - bool saveDataEndian(Common::WriteStream &out, int16 dataVar, uint32 size); - - bool loadTempSprite(uint32 index, bool palette); - bool saveTempSprite(uint32 index, bool palette); - bool loadSprite(Common::ReadStream &in, int32 size); - bool saveSprite(Common::WriteStream &out, int32 size); - - int32 getSizeTempSprite(); - bool loadTempSprite(int16 dataVar, int32 size, int32 offset); - bool saveTempSprite(int16 dataVar, int32 size, int32 offset); - - virtual uint32 getSaveGameSize() = 0; - - virtual int32 getSizeGame() = 0; - virtual int32 getSizeNotes() = 0; - virtual int32 getSizeScreenshot() = 0; - virtual bool loadGame(int16 dataVar, int32 size, int32 offset) = 0; - virtual bool loadNotes(int16 dataVar, int32 size, int32 offset) = 0; - virtual bool loadScreenshot(int16 dataVar, int32 size, int32 offset) = 0; - virtual bool saveGame(int16 dataVar, int32 size, int32 offset) = 0; - virtual bool saveNotes(int16 dataVar, int32 size, int32 offset) = 0; - virtual bool saveScreenshot(int16 dataVar, int32 size, int32 offset) = 0; + char *_targetName; + + virtual int getSaveType(const char *fileName) = 0; + + virtual int32 getSizeVersioned(int type) = 0; + virtual bool loadVersioned(int type, int16 dataVar, int32 size, int32 offset) = 0; + virtual bool saveVersioned(int type, int16 dataVar, int32 size, int32 offset) = 0; }; class SaveLoad_v2 : public SaveLoad { public: - virtual SaveType getSaveType(const char *fileName); + enum SaveType { + kSaveGame, + kSaveTempSprite, + kSaveNotes + }; SaveLoad_v2(GobEngine *vm, const char *targetName); - virtual ~SaveLoad_v2() {} + virtual ~SaveLoad_v2(); + + virtual SaveMode getSaveMode(const char *fileName); protected: - virtual uint32 getSaveGameSize(); - - virtual int32 getSizeGame(); - virtual int32 getSizeNotes(); - virtual int32 getSizeScreenshot(); - virtual bool loadGame(int16 dataVar, int32 size, int32 offset); - virtual bool loadNotes(int16 dataVar, int32 size, int32 offset); - virtual bool loadScreenshot(int16 dataVar, int32 size, int32 offset); - virtual bool saveGame(int16 dataVar, int32 size, int32 offset); - virtual bool saveNotes(int16 dataVar, int32 size, int32 offset); - virtual bool saveScreenshot(int16 dataVar, int32 size, int32 offset); - - void initBuffer(); + struct SaveFile { + const char *sourceName; + char *destName; + SaveMode mode; + SaveType type; + }; + + static SaveFile _saveFiles[]; + + int32 _varSize; + + TempSprite _tmpSprite; + PlainSave _notes; + StagedSave _save; + + byte _indexBuffer[600]; + bool _hasIndex; + + virtual int getSaveType(const char *fileName); + + virtual int32 getSizeVersioned(int type); + virtual bool loadVersioned(int type, int16 dataVar, int32 size, int32 offset); + virtual bool saveVersioned(int type, int16 dataVar, int32 size, int32 offset); + + int getSlot(int32 offset) const; + int getSlotRemainder(int32 offset) const; + + int32 getSizeGame(SaveFile &saveFile); + int32 getSizeTempSprite(SaveFile &saveFile); + int32 getSizeNotes(SaveFile &saveFile); + + bool loadGame(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool loadTempSprite(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool loadNotes(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + + bool saveGame(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool saveTempSprite(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool saveNotes(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + + void assertInited(); }; -class SaveLoad_v3 : public SaveLoad_v2 { -public: - virtual SaveType getSaveType(const char *fileName); +enum SaveType { + kSaveNone = -1, + kSaveGame, + kSaveTempSprite, + kSaveNotes, + kSaveScreenshot, + kSaveIgnore +}; - SaveLoad_v3(GobEngine *vm, const char *targetName, uint32 screenshotSize = 19968, +class SaveLoad_v3 : public SaveLoad { +public: + enum SaveType { + kSaveNone, + kSaveGame, + kSaveTempSprite, + kSaveNotes, + kSaveScreenshot + }; + + SaveLoad_v3(GobEngine *vm, const char *targetName, + uint32 screenshotSize = 19968, int32 indexOffset = 40, int32 screenshotOffset = 80); - virtual ~SaveLoad_v3() {} + virtual ~SaveLoad_v3(); + + virtual SaveMode getSaveMode(const char *fileName); protected: + struct SaveFile { + const char *sourceName; + char *destName; + SaveMode mode; + SaveType type; + int slot; + }; + bool _useScreenshots; bool _firstSizeGame; - int8 _saveSlot; uint32 _screenshotSize; int32 _indexOffset; int32 _screenshotOffset; - virtual uint32 getSaveGameSize(); + static SaveFile _saveFiles[]; + + int32 _varSize; + + TempSprite _screenshot; + TempSprite _tmpSprite; + PlainSave _notes; + StagedSave _save; + + byte _propBuffer[1000]; + byte _indexBuffer[1200]; + bool _hasIndex; + + virtual int getSaveType(const char *fileName); + + virtual int32 getSizeVersioned(int type); + virtual bool loadVersioned(int type, int16 dataVar, int32 size, int32 offset); + virtual bool saveVersioned(int type, int16 dataVar, int32 size, int32 offset); + + int getSlot(int32 offset) const; + int getSlotRemainder(int32 offset) const; + + int32 getSizeGame(SaveFile &saveFile); + int32 getSizeTempSprite(SaveFile &saveFile); + int32 getSizeNotes(SaveFile &saveFile); + int32 getSizeScreenshot(SaveFile &saveFile); + + bool loadGame(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool loadTempSprite(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool loadNotes(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool loadScreenshot(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + + bool saveGame(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool saveTempSprite(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool saveNotes(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool saveScreenshot(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + + void assertInited(); + + void buildScreenshotIndex(byte *buffer, char *name, int n); +}; + +class SaveLoad_v4 : public SaveLoad { +public: + enum SaveType { + kSaveNone + }; + + SaveLoad_v4(GobEngine *vm, const char *targetName); + virtual ~SaveLoad_v4(); + + virtual SaveMode getSaveMode(const char *fileName); + +protected: + struct SaveFile { + const char *sourceName; + char *destName; + SaveMode mode; + SaveType type; + }; + + static SaveFile _saveFiles[]; + + int32 _varSize; + + virtual int getSaveType(const char *fileName); - virtual int32 getSizeGame(); - virtual int32 getSizeScreenshot(); - virtual bool loadGame(int16 dataVar, int32 size, int32 offset); - virtual bool loadScreenshot(int16 dataVar, int32 size, int32 offset); - virtual bool saveGame(int16 dataVar, int32 size, int32 offset); - virtual bool saveNotes(int16 dataVar, int32 size, int32 offset); - virtual bool saveScreenshot(int16 dataVar, int32 size, int32 offset); + virtual int32 getSizeVersioned(int type); + virtual bool loadVersioned(int type, int16 dataVar, int32 size, int32 offset); + virtual bool saveVersioned(int type, int16 dataVar, int32 size, int32 offset); - bool saveGame(int32 screenshotSize); - void initBuffer(); + void assertInited(); }; } // End of namespace Gob diff --git a/engines/gob/saveload_v2.cpp b/engines/gob/saveload_v2.cpp index ab7211b216..2754646198 100644 --- a/engines/gob/saveload_v2.cpp +++ b/engines/gob/saveload_v2.cpp @@ -24,273 +24,346 @@ */ #include "common/endian.h" -#include "common/file.h" +#include "common/savefile.h" #include "gob/gob.h" #include "gob/saveload.h" #include "gob/global.h" #include "gob/game.h" +#include "gob/draw.h" namespace Gob { +SaveLoad_v2::SaveFile SaveLoad_v2::_saveFiles[] = { + { "cat.inf", 0, kSaveModeSave, kSaveGame}, + { "cat.cat", 0, kSaveModeSave, kSaveGame}, + { "save.inf", 0, kSaveModeSave, kSaveTempSprite}, + { "bloc.inf", 0, kSaveModeSave, kSaveNotes} +}; + SaveLoad_v2::SaveLoad_v2(GobEngine *vm, const char *targetName) : - SaveLoad(vm, targetName) { + SaveLoad(vm, targetName) { + + _saveFiles[0].destName = new char[strlen(targetName) + 5]; + _saveFiles[1].destName = _saveFiles[0].destName; + _saveFiles[2].destName = 0; + _saveFiles[3].destName = new char[strlen(targetName) + 5]; - _stagesCount = 1; + sprintf(_saveFiles[0].destName, "%s.s00", targetName); + sprintf(_saveFiles[3].destName, "%s.blo", targetName); + + _varSize = 0; + _hasIndex = false; } -SaveType SaveLoad_v2::getSaveType(const char *fileName) { - const char *backSlash; - if ((backSlash = strrchr(fileName, '\\'))) - fileName = backSlash + 1; - - if (!scumm_stricmp(fileName, "cat.inf")) - return kSaveGame; - if (!scumm_stricmp(fileName, "cat.cat")) - return kSaveGame; - if (!scumm_stricmp(fileName, "save.inf")) - return kSaveTempSprite; - if (!scumm_stricmp(fileName, "bloc.inf")) - return kSaveNotes; - - return kSaveNone; +SaveLoad_v2::~SaveLoad_v2() { + delete[] _saveFiles[0].destName; + delete[] _saveFiles[3].destName; } -uint32 SaveLoad_v2::getSaveGameSize() { - return 80 + (READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4) * 2; +SaveLoad::SaveMode SaveLoad_v2::getSaveMode(const char *fileName) { + for (int i = 0; i < ARRAYSIZE(_saveFiles); i++) + if (!scumm_stricmp(fileName, _saveFiles[i].sourceName)) + return _saveFiles[i].mode; + + return kSaveModeNone; } -int32 SaveLoad_v2::getSizeNotes() { - Common::SaveFileManager *saveMan = g_system->getSavefileManager(); - Common::InSaveFile *in; - int32 size = -1; +int SaveLoad_v2::getSaveType(const char *fileName) { + for (int i = 0; i < ARRAYSIZE(_saveFiles); i++) + if (!scumm_stricmp(fileName, _saveFiles[i].sourceName)) + return i; - in = saveMan->openForLoading(_saveFiles[(int) kSaveNotes]); - if (in) { - size = in->size(); - delete in; + return -1; +} + +int32 SaveLoad_v2::getSizeVersioned(int type) { + assertInited(); + + switch (_saveFiles[type].type) { + case kSaveGame: + return getSizeGame(_saveFiles[type]); + case kSaveTempSprite: + return getSizeTempSprite(_saveFiles[type]); + case kSaveNotes: + return getSizeNotes(_saveFiles[type]); } - return size; + return -1; } -int32 SaveLoad_v2::getSizeGame() { +bool SaveLoad_v2::loadVersioned(int type, int16 dataVar, int32 size, int32 offset) { + assertInited(); + + switch (_saveFiles[type].type) { + case kSaveGame: + if (loadGame(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While loading from slot %d", getSlot(offset)); + break; + + case kSaveTempSprite: + if(loadTempSprite(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While loading the temporary sprite"); + break; + + case kSaveNotes: + if (loadNotes(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While loading the notes"); + break; + } + + return false; +} + +bool SaveLoad_v2::saveVersioned(int type, int16 dataVar, int32 size, int32 offset) { + assertInited(); + + switch (_saveFiles[type].type) { + case kSaveGame: + if (saveGame(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While saving to slot %d", getSlot(offset)); + break; + + case kSaveTempSprite: + if(saveTempSprite(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While saving the temporary sprite"); + break; + + case kSaveNotes: + if (saveNotes(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While saving the notes"); + break; + } + + return false; +} + +int SaveLoad_v2::getSlot(int32 offset) const { + return ((offset - 600) / _varSize); +} + +int SaveLoad_v2::getSlotRemainder(int32 offset) const { + return ((offset - 600) % _varSize); +} + +int32 SaveLoad_v2::getSizeGame(SaveFile &saveFile) { Common::SaveFileManager *saveMan = g_system->getSavefileManager(); Common::InSaveFile *in; for (int i = 14; i >= 0; i--) { - in = saveMan->openForLoading(setCurSlot(i)); + in = saveMan->openForLoading(setCurrentSlot(saveFile.destName, i)); if (in) { delete in; - return (i + 1) * READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * - 4 + 600; + return (i + 1) * _varSize + 600; } } return -1; } -int32 SaveLoad_v2::getSizeScreenshot() { - return -1; +int32 SaveLoad_v2::getSizeTempSprite(SaveFile &saveFile) { + return _tmpSprite.getSize(); } -bool SaveLoad_v2::loadGame(int16 dataVar, int32 size, int32 offset) { +int32 SaveLoad_v2::getSizeNotes(SaveFile &saveFile) { Common::SaveFileManager *saveMan = g_system->getSavefileManager(); Common::InSaveFile *in; - int32 varSize = READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4; + int32 size = -1; + + in = saveMan->openForLoading(saveFile.destName); + if (in) { + size = in->size(); + delete in; + } + + return size; +} + +bool SaveLoad_v2::loadGame(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { if (size == 0) { dataVar = 0; - size = varSize; + size = _varSize; } - int slot = (offset - 600) / varSize; - int slotR = (offset - 600) % varSize; - - if ((offset == 0) && (size == 600)) { + if (offset == 0) { + debugC(3, kDebugSaveLoad, "Loading save index"); - byte *varBuf = _vm->_global->_inter_variables + dataVar; - for (int i = 0; i < 15; i++, varBuf += 40) { - in = saveMan->openForLoading(setCurSlot(i)); - if (in) { - in->read(varBuf, 40); - delete in; - } else - memset(varBuf, 0, 40); + if (size != 600) { + warning("Requested index has wrong size (%d)", size); + return false; } + + SaveLoad::buildIndex(_vm->_global->_inter_variables + dataVar, + saveFile.destName, 15, 40); memset(_vm->_global->_inter_variablesSizes + dataVar, 0, 600); - return true; - } else if ((offset > 0) && (slot < 15) && - (slotR == 0) && (size == varSize)) { + } else { + int slot = getSlot(offset); + int slotRem = getSlotRemainder(offset); + + debugC(2, kDebugSaveLoad, "Loading from slot %d", slot); - in = saveMan->openForLoading(setCurSlot(slot)); - if (!in) { - warning("Can't open file for slot %d", slot); + SaveLoad::setCurrentSlot(saveFile.destName, slot); + + if ((slot >= 15) || (slotRem != 0)) { + warning("Invalid loading procedure (%d, %d, %d, %d, %d)", + dataVar, size, offset, slot, slotRem); return false; } - uint32 sGameSize = getSaveGameSize(); - uint32 fSize = in->size(); - if (fSize != sGameSize) { - warning("Can't load from slot %d: Wrong size (%d, %d)", slot, - fSize, sGameSize); - delete in; + if (!_save.load(dataVar, size, 40, saveFile.destName, + _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes)) return false; - } + } - in->seek(80); - if (loadDataEndian(*in, dataVar, size)) { - delete in; - debugC(1, kDebugFileIO, "Loading from slot %d", slot); - return true; - } - delete in; + return true; +} - } else - warning("Invalid loading procedure (%d, %d, %d, %d)", - offset, size, slot, slotR); +bool SaveLoad_v2::loadTempSprite(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { - return false; -} + debugC(3, kDebugSaveLoad, "Loading from the temporary sprite"); -bool SaveLoad_v2::loadNotes(int16 dataVar, int32 size, int32 offset) { - bool retVal; + int index; + bool palette; - if ((size <= 0) || (offset != 0)) { - warning("Invalid attempt at loading the notes (%d, %d)", size, offset); + if (!_tmpSprite.getProperties(dataVar, size, offset, index, palette)) return false; - } - - Common::SaveFileManager *saveMan = g_system->getSavefileManager(); - char *sName = _saveFiles[(int) kSaveNotes]; - Common::InSaveFile *in = saveMan->openForLoading(sName); - if (!in) { - warning("Can't open file \"%s\" for reading", sName); + if (!_tmpSprite.loadSprite(*_vm->_draw->_spritesArray[index])) return false; + + if (palette) { + if (!_tmpSprite.loadPalette(_vm->_global->_pPaletteDesc->vgaPal)) + return false; + + _vm->_video->setFullPalette(_vm->_global->_pPaletteDesc); } - retVal = loadDataEndian(*in, dataVar, size); - delete in; - return retVal; -} + if (index == 21) { + _vm->_draw->forceBlit(); + _vm->_video->retrace(); + } -bool SaveLoad_v2::loadScreenshot(int16 dataVar, int32 size, int32 offset) { - return false; + return true; } -bool SaveLoad_v2::saveGame(int16 dataVar, int32 size, int32 offset) { - int32 varSize = READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4; +bool SaveLoad_v2::loadNotes(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { + + debugC(2, kDebugSaveLoad, "Loading the notes"); + + return _notes.load(dataVar, size, offset, saveFile.destName, + _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes); +} - initBuffer(); +bool SaveLoad_v2::saveGame(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { if (size == 0) { dataVar = 0; - size = varSize; + size = _varSize; } - int slot = (offset - 600) / varSize; - int slotR = (offset - 600) % varSize; + if (offset == 0) { + debugC(3, kDebugSaveLoad, "Saving save index"); - if ((offset == 0) && (size == 600)) { + if (size != 600) { + warning("Requested index has wrong size (%d)", size); + return false; + } - delete[] _buffer[0]; - _buffer[0] = new byte[1200]; - assert(_buffer[0]); + memcpy(_indexBuffer, _vm->_global->_inter_variables + dataVar, 600); + _hasIndex = true; - memcpy(_buffer[0], _vm->_global->_inter_variables + dataVar, 600); - memset(_buffer[0] + 600, 0, 600); + } else { + int slot = getSlot(offset); + int slotRem = getSlotRemainder(offset); - return true; + debugC(2, kDebugSaveLoad, "Saving to slot %d", slot); - } else if ((offset > 0) && (slot < 15) && - (slotR == 0) && (size == varSize)) { + SaveLoad::setCurrentSlot(saveFile.destName, slot); - if (!_buffer[0]) { - warning("Tried to save without writing the index first"); + if ((slot >= 15) || (slotRem != 0)) { + warning("Invalid saving procedure (%d, %d, %d, %d, %d)", + dataVar, size, offset, slot, slotRem); return false; } - Common::SaveFileManager *saveMan = g_system->getSavefileManager(); - Common::OutSaveFile *out; - - out = saveMan->openForSaving(setCurSlot(slot)); - if (!out) { - warning("Can't open file for slot %d for writing", slot); - delete[] _buffer[0]; - _buffer[0] = 0; + if (!_hasIndex) { + warning("No index written yet"); return false; } - bool retVal = false; + _hasIndex = false; - if (out->write(_buffer[0] + slot * 40, 40) == 40) - if (out->write(_buffer[0] + 600 + slot * 40, 40) == 40) - if (saveDataEndian(*out, dataVar, size)) { - out->finalize(); - if (!out->ioFailed()) - retVal = true; - } - - if (!retVal) - warning("Can't save to slot %d", slot); - else - debugC(1, kDebugFileIO, "Saved to slot %d", slot); - - delete[] _buffer[0]; - _buffer[0] = 0; - delete out; + byte sizes[40]; + memset(sizes, 0, 40); + if(!_save.save(0, 40, 0, saveFile.destName, _indexBuffer + (slot * 40), sizes)) + return false; - return retVal; + if (!_save.save(dataVar, size, 40, saveFile.destName, + _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes)) + return false; - } else - warning("Invalid saving procedure (%d, %d, %d, %d)", - offset, size, slot, slotR); + } - return false; + return true; } -bool SaveLoad_v2::saveNotes(int16 dataVar, int32 size, int32 offset) { - bool retVal; +bool SaveLoad_v2::saveTempSprite(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { - if ((size <= 0) || (offset != 0)) { - warning("Invalid attempt at saving the notes (%d, %d)", size, offset); - return false; - } + debugC(3, kDebugSaveLoad, "Saving to the temporary sprite"); - Common::SaveFileManager *saveMan = g_system->getSavefileManager(); - char *sName = _saveFiles[(int) kSaveNotes]; + int index; + bool palette; - Common::OutSaveFile *out = saveMan->openForSaving(sName); - if (!out) { - warning("Can't open file \"%s\" for writing", sName); + if (!_tmpSprite.getProperties(dataVar, size, offset, index, palette)) return false; - } - retVal = saveDataEndian(*out, dataVar, size); + if (!_tmpSprite.saveSprite(*_vm->_draw->_spritesArray[index])) + return false; - out->finalize(); - if (out->ioFailed()) { - warning("Can't save notes"); - retVal = false; - } + if (palette) + if (!_tmpSprite.savePalette(_vm->_global->_pPaletteDesc->vgaPal)) + return false; - delete out; - return retVal; + return true; } -bool SaveLoad_v2::saveScreenshot(int16 dataVar, int32 size, int32 offset) { +bool SaveLoad_v2::saveNotes(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { + + debugC(2, kDebugSaveLoad, "Saving the notes"); + + return _notes.save(dataVar, size, offset, saveFile.destName, + _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes); return false; } -void SaveLoad_v2::initBuffer() { - if (_buffer) +void SaveLoad_v2::assertInited() { + if (_varSize > 0) return; - _buffer = new byte*[_stagesCount]; - assert(_buffer); - _buffer[0] = 0; + _varSize = READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4; + + _save.addStage(40); + _save.addStage(_varSize); } } // End of namespace Gob diff --git a/engines/gob/saveload_v3.cpp b/engines/gob/saveload_v3.cpp index 4a4036fded..ae8d160eb2 100644 --- a/engines/gob/saveload_v3.cpp +++ b/engines/gob/saveload_v3.cpp @@ -24,62 +24,178 @@ */ #include "common/endian.h" -#include "common/file.h" +#include "common/savefile.h" #include "gob/gob.h" #include "gob/saveload.h" #include "gob/global.h" #include "gob/game.h" +#include "gob/draw.h" namespace Gob { +SaveLoad_v3::SaveFile SaveLoad_v3::_saveFiles[] = { + { "cat.inf", 0, kSaveModeSave, kSaveGame, -1}, + { "ima.inf", 0, kSaveModeSave, kSaveScreenshot, -1}, + { "intro.$$$", 0, kSaveModeSave, kSaveTempSprite, -1}, + { "bloc.inf", 0, kSaveModeSave, kSaveNotes, -1}, + { "prot", 0, kSaveModeIgnore, kSaveNone, -1}, + { "config", 0, kSaveModeIgnore, kSaveNone, -1}, +}; + SaveLoad_v3::SaveLoad_v3(GobEngine *vm, const char *targetName, uint32 screenshotSize, int32 indexOffset, int32 screenshotOffset) : - SaveLoad_v2(vm, targetName) { + SaveLoad(vm, targetName) { _screenshotSize = screenshotSize; _indexOffset = indexOffset; _screenshotOffset = screenshotOffset; - _saveSlot = -1; - _stagesCount = 3; - _useScreenshots = false; _firstSizeGame = true; + + _saveFiles[0].destName = new char[strlen(targetName) + 5]; + _saveFiles[1].destName = _saveFiles[0].destName; + _saveFiles[2].destName = 0; + _saveFiles[3].destName = new char[strlen(targetName) + 5]; + _saveFiles[4].destName = 0; + _saveFiles[5].destName = 0; + + sprintf(_saveFiles[0].destName, "%s.s00", targetName); + sprintf(_saveFiles[3].destName, "%s.blo", targetName); + + _varSize = 0; + _hasIndex = false; + memset(_propBuffer, 0, 1000); } -SaveType SaveLoad_v3::getSaveType(const char *fileName) { - const char *backSlash; - if ((backSlash = strrchr(fileName, '\\'))) - fileName = backSlash + 1; - - if (!scumm_stricmp(fileName, "cat.inf")) - return kSaveGame; - if (!scumm_stricmp(fileName, "ima.inf")) - return kSaveScreenshot; - if (!scumm_stricmp(fileName, "intro.$$$")) - return kSaveTempSprite; - if (!scumm_stricmp(fileName, "bloc.inf")) - return kSaveNotes; - if (!scumm_stricmp(fileName, "prot")) - return kSaveIgnore; - if (!scumm_stricmp(fileName, "config")) - return kSaveIgnore; - - return kSaveNone; +SaveLoad_v3::~SaveLoad_v3() { + delete[] _saveFiles[0].destName; + delete[] _saveFiles[3].destName; } -uint32 SaveLoad_v3::getSaveGameSize() { - uint32 size; +SaveLoad::SaveMode SaveLoad_v3::getSaveMode(const char *fileName) { + for (int i = 0; i < ARRAYSIZE(_saveFiles); i++) + if (!scumm_stricmp(fileName, _saveFiles[i].sourceName)) + return _saveFiles[i].mode; - size = 1040 + (READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4) * 2; - if (_useScreenshots) - size += _screenshotSize; + return kSaveModeNone; +} - return size; +int SaveLoad_v3::getSaveType(const char *fileName) { + for (int i = 0; i < ARRAYSIZE(_saveFiles); i++) + if (!scumm_stricmp(fileName, _saveFiles[i].sourceName)) + return i; + + return -1; +} + +int32 SaveLoad_v3::getSizeVersioned(int type) { + assertInited(); + + switch (_saveFiles[type].type) { + case kSaveGame: + return getSizeGame(_saveFiles[type]); + case kSaveTempSprite: + return getSizeTempSprite(_saveFiles[type]); + case kSaveNotes: + return getSizeNotes(_saveFiles[type]); + case kSaveScreenshot: + return getSizeScreenshot(_saveFiles[type]); + default: + break; + } + + return -1; +} + +bool SaveLoad_v3::loadVersioned(int type, int16 dataVar, int32 size, int32 offset) { + assertInited(); + + switch (_saveFiles[type].type) { + case kSaveGame: + if (loadGame(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While loading from slot %d", getSlot(offset)); + break; + + case kSaveTempSprite: + if(loadTempSprite(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While loading the temporary sprite"); + break; + + case kSaveNotes: + if (loadNotes(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While loading the notes"); + break; + + case kSaveScreenshot: + if (loadScreenshot(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While loading a screenshot"); + break; + + default: + break; + } + + return false; +} + +bool SaveLoad_v3::saveVersioned(int type, int16 dataVar, int32 size, int32 offset) { + assertInited(); + + switch (_saveFiles[type].type) { + case kSaveGame: + if (saveGame(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While saving to slot %d", getSlot(offset)); + break; + + case kSaveTempSprite: + if(saveTempSprite(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While saving the temporary sprite"); + break; + + case kSaveNotes: + if (saveNotes(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While saving the notes"); + break; + + case kSaveScreenshot: + if (saveScreenshot(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While saving a screenshot"); + break; + + default: + break; + } + + return false; +} + +int SaveLoad_v3::getSlot(int32 offset) const { + return ((offset - 1700) / _varSize); } -int32 SaveLoad_v3::getSizeGame() { +int SaveLoad_v3::getSlotRemainder(int32 offset) const { + return ((offset - 1700) % _varSize); +} + +int32 SaveLoad_v3::getSizeGame(SaveFile &saveFile) { if (_firstSizeGame) { _firstSizeGame = false; return -1; @@ -89,358 +205,413 @@ int32 SaveLoad_v3::getSizeGame() { Common::InSaveFile *in; int32 size = -1; - int slot = _curSlot; + int slot = saveFile.slot; for (int i = 29; i >= 0; i--) { - in = saveMan->openForLoading(setCurSlot(i)); + in = saveMan->openForLoading(setCurrentSlot(saveFile.destName, i)); if (in) { delete in; - size = (i + 1) * READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * - 4 + 1700; + size = (i + 1) * _varSize + 1700; break; } } - setCurSlot(slot); + setCurrentSlot(saveFile.destName, slot); return size; } -int32 SaveLoad_v3::getSizeScreenshot() { +int32 SaveLoad_v3::getSizeTempSprite(SaveFile &saveFile) { + return _tmpSprite.getSize(); +} + +int32 SaveLoad_v3::getSizeNotes(SaveFile &saveFile) { Common::SaveFileManager *saveMan = g_system->getSavefileManager(); Common::InSaveFile *in; int32 size = -1; - _useScreenshots = true; - int slot = _curSlot; + in = saveMan->openForLoading(saveFile.destName); + if (in) { + size = in->size(); + delete in; + } + + return size; +} + +int32 SaveLoad_v3::getSizeScreenshot(SaveFile &saveFile) { + if (!_useScreenshots) { + _useScreenshots = true; + _save.addStage(_screenshotSize, false); + } + + Common::SaveFileManager *saveMan = g_system->getSavefileManager(); + Common::InSaveFile *in; + int32 size = -1; + + int slot = saveFile.slot; for (int i = 29; i >= 0; i--) { - in = saveMan->openForLoading(setCurSlot(i)); + in = saveMan->openForLoading(setCurrentSlot(saveFile.destName, i)); if (in) { delete in; size = (i + 1) * _screenshotSize + _screenshotOffset; break; } } - setCurSlot(slot); + setCurrentSlot(saveFile.destName, slot); return size; } -bool SaveLoad_v3::loadGame(int16 dataVar, int32 size, int32 offset) { - int32 varSize = READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4; - Common::SaveFileManager *saveMan = g_system->getSavefileManager(); - Common::InSaveFile *in; +bool SaveLoad_v3::loadGame(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { - int slot = (offset - 1700) / varSize; - int slotR = (offset - 1700) % varSize; + if (size == 0) { + dataVar = 0; + size = _varSize; + } - initBuffer(); + if (offset < 500) { + debugC(3, kDebugSaveLoad, "Loading global properties"); - if ((size > 0) && (offset < 500) && ((size + offset) <= 500)) { + if ((size + offset) > 500) { + warning("Wrong global properties list size (%d, %d)", size, offset); + return false; + } memcpy(_vm->_global->_inter_variables + dataVar, - _buffer[0] + offset, size); + _propBuffer + offset, size); memcpy(_vm->_global->_inter_variablesSizes + dataVar, - _buffer[0] + offset + 500, size); - return true; + _propBuffer + offset + 500, size); - } else if ((size == 1200) && (offset == 500)) { + } else if (offset == 500) { + debugC(3, kDebugSaveLoad, "Loading save index"); - memset(_buffer[1], 0, 1200); - - slot = _curSlot; - for (int i = 0; i < 30; i++) { - in = saveMan->openForLoading(setCurSlot(i)); - if (in) { - in->seek(1000); - in->read(_buffer[1] + i * 40, 40); - delete in; - } + if (size != 1200) { + warning("Requested index has wrong size (%d)", size); + return false; } - setCurSlot(slot); - memcpy(_vm->_global->_inter_variables + dataVar, _buffer[1], 1200); + int slot = saveFile.slot; + + SaveLoad::buildIndex(_vm->_global->_inter_variables + dataVar, + saveFile.destName, 30, 40, 1000); memset(_vm->_global->_inter_variablesSizes + dataVar, 0, 1200); - return true; - } else if ((offset > 0) && (slot < 30) && - (slotR == 0) && (size == 0)) { + setCurrentSlot(saveFile.destName, slot); + + } else { + saveFile.slot = getSlot(offset); + int slotRem = getSlotRemainder(offset); - in = saveMan->openForLoading(setCurSlot(slot)); - if (!in) { - warning("Can't open file for slot %d", slot); + debugC(2, kDebugSaveLoad, "Loading from slot %d", saveFile.slot); + + SaveLoad::setCurrentSlot(saveFile.destName, saveFile.slot); + + if ((saveFile.slot < 0) || (saveFile.slot >= 30) || (slotRem != 0)) { + warning("Invalid loading procedure (%d, %d, %d, %d, %d)", + dataVar, size, offset, saveFile.slot, slotRem); return false; } - uint32 sGameSize = getSaveGameSize(); - uint32 fSize = in->size(); - if (fSize != sGameSize) { - warning("Can't load from slot %d: Wrong size (%d, %d)", slot, - fSize, sGameSize); - delete in; + if (!_save.load(dataVar, size, 540, saveFile.destName, + _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes)) return false; - } + } - byte varBuf[500], sizeBuf[500]; - if (read(*in, varBuf, sizeBuf, 500) == 500) { - if (fromEndian(varBuf, sizeBuf, 500)) { - memcpy(_buffer[0], varBuf, 500); - memcpy(_buffer[0] + 500, sizeBuf, 500); - in->seek(1040); - if (loadDataEndian(*in, 0, varSize)) { - delete in; - debugC(1, kDebugFileIO, "Loading from slot %d", slot); - return true; - } - } - } - delete in; + return true; +} - } else - warning("Invalid loading procedure (%d, %d, %d, %d)", - offset, size, slot, slotR); +bool SaveLoad_v3::loadTempSprite(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { - return false; + debugC(3, kDebugSaveLoad, "Loading from the temporary sprite"); + + int index; + bool palette; + + if (!_tmpSprite.getProperties(dataVar, size, offset, index, palette)) + return false; + + if (!_tmpSprite.loadSprite(*_vm->_draw->_spritesArray[index])) + return false; + + if (palette) { + if (!_tmpSprite.loadPalette(_vm->_global->_pPaletteDesc->vgaPal)) + return false; + + _vm->_video->setFullPalette(_vm->_global->_pPaletteDesc); + } + + if (index == 21) { + _vm->_draw->forceBlit(); + _vm->_video->retrace(); + } + + return true; } -bool SaveLoad_v3::loadScreenshot(int16 dataVar, int32 size, int32 offset) { - Common::SaveFileManager *saveMan = g_system->getSavefileManager(); - Common::InSaveFile *in; +bool SaveLoad_v3::loadNotes(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { - int slot = (offset - _screenshotOffset) / _screenshotSize; - int slotR = (offset - _screenshotOffset) % _screenshotSize; + debugC(2, kDebugSaveLoad, "Loading the notes"); - _useScreenshots = true; - if ((size == 40) && (offset == _indexOffset)) { - char buf[40]; + return _notes.load(dataVar, size, offset, saveFile.destName, + _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes); +} - memset(buf, 0, 40); +bool SaveLoad_v3::loadScreenshot(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { - slot = _curSlot; - for (int i = 0; i < 30; i++) { - in = saveMan->openForLoading(setCurSlot(i)); - if (in) { - delete in; - buf[i] = 1; - } + debugC(3, kDebugSaveLoad, "Loading a screenshot"); + + if (!_useScreenshots) { + _useScreenshots = true; + _save.addStage(_screenshotSize, false); + } + + if (offset == _indexOffset) { + if (size != 40) { + warning("Requested index has wrong size (%d)", size); + return false; } - setCurSlot(slot); - memcpy(_vm->_global->_inter_variables + dataVar, buf, 40); + byte buffer[40]; + memset(buffer, 0, 40); + + int slot = saveFile.slot; + buildScreenshotIndex(buffer, saveFile.destName, 30); + setCurrentSlot(saveFile.destName, slot); + + memcpy(_vm->_global->_inter_variables + dataVar, buffer, 40); memset(_vm->_global->_inter_variablesSizes + dataVar, 0, 40); - return true; - } else if ((offset > 0) && (slot < 30) && - (slotR == 0) && (size < 0)) { + } else { + saveFile.slot = (offset - _screenshotOffset) / _screenshotSize; + int slotRem = (offset - _screenshotOffset) % _screenshotSize; - int32 varSize = READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4; + SaveLoad::setCurrentSlot(saveFile.destName, saveFile.slot); - in = saveMan->openForLoading(setCurSlot(slot)); - if (!in) { - warning("Can't open file for slot %d", slot); + if ((saveFile.slot < 0) || (saveFile.slot >= 30) || (slotRem != 0)) { + warning("Invalid loading procedure (%d, %d, %d, %d, %d)", + dataVar, size, offset, saveFile.slot, slotRem); return false; } - uint32 sGameSize = getSaveGameSize(); - uint32 fSize = in->size(); - if (fSize != sGameSize) { - warning("Can't load screenshot from slot %d: Wrong size (%d, %d)", - slot, fSize, sGameSize); - delete in; + byte *buffer = new byte[_screenshotSize]; + + if (!_save.load(0, _screenshotSize, _varSize + 540, saveFile.destName, buffer, 0)) { + delete[] buffer; return false; } - in->seek(1040 + varSize * 2); + int index; + bool palette; - bool success = loadSprite(*in, size); - delete in; - return success; + if (!_screenshot.getProperties(dataVar, size, offset, index, palette)) { + delete[] buffer; + return false; + } - } else - warning("Invalid attempt at loading a screenshot (%d, %d, %d, %d)", - offset, size, slot, slotR); + if (!_screenshot.fromBuffer(buffer, _screenshotSize, palette)) { + delete[] buffer; + return false; + } - return false; + if (!_screenshot.loadSprite(*_vm->_draw->_spritesArray[index])) { + delete[] buffer; + return false; + } + + if (palette) { + if (!_screenshot.loadPalette(_vm->_global->_pPaletteDesc->vgaPal)) { + delete[] buffer; + return false; + } + _vm->_video->setFullPalette(_vm->_global->_pPaletteDesc); + } + + delete[] buffer; + } + + return true; } -bool SaveLoad_v3::saveGame(int16 dataVar, int32 size, int32 offset) { - int32 varSize = READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4; +bool SaveLoad_v3::saveGame(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { - int slot = (offset - 1700) / varSize; - int slotR = (offset - 1700) % varSize; + if (size == 0) { + dataVar = 0; + size = _varSize; + } - initBuffer(); + if (offset < 500) { + debugC(3, kDebugSaveLoad, "Loading global properties"); - if ((size > 0) && (offset < 500) && ((size + offset) <= 500)) { + if ((size + offset) > 500) { + warning("Wrong global properties list size (%d, %d)", size, offset); + return false; + } - memcpy(_buffer[0] + offset, + memcpy(_propBuffer + offset, _vm->_global->_inter_variables + dataVar, size); - memcpy(_buffer[0] + offset + 500, + memcpy(_propBuffer + offset + 500, _vm->_global->_inter_variablesSizes + dataVar, size); - return true; - - } else if ((size > 0) && (offset >= 500) && (offset < 1700) && - ((size + offset) <= 1700)) { + } else if (offset == 500) { + debugC(3, kDebugSaveLoad, "Saving save index"); - memcpy(_buffer[1] + offset - 500, - _vm->_global->_inter_variables + dataVar, size); + if (size != 1200) { + warning("Requested index has wrong size (%d)", size); + return false; + } - return true; + memcpy(_indexBuffer, _vm->_global->_inter_variables + dataVar, size); + _hasIndex = true; - } else if ((offset > 0) && (slot < 30) && - (slotR == 0) && (size == 0)) { + } else { + saveFile.slot = getSlot(offset); + int slotRem = getSlotRemainder(offset); - _saveSlot = -1; + debugC(2, kDebugSaveLoad, "Saving to slot %d", saveFile.slot); - delete _buffer[2]; - _buffer[2] = new byte[varSize * 2]; - assert(_buffer[2]); + SaveLoad::setCurrentSlot(saveFile.destName, saveFile.slot); - memcpy(_buffer[2], _vm->_global->_inter_variables, varSize); - memcpy(_buffer[2] + varSize, - _vm->_global->_inter_variablesSizes, varSize); + if ((saveFile.slot < 0) || (saveFile.slot >= 30) || (slotRem != 0)) { + warning("Invalid saving procedure (%d, %d, %d, %d, %d)", + dataVar, size, offset, saveFile.slot, slotRem); + return false; + } - if (!toEndian(_buffer[2], _buffer[2] + varSize, varSize)) { - delete _buffer[2]; - _buffer[2] = 0; + if (!_hasIndex) { + warning("No index written yet"); return false; } - _saveSlot = slot; + _hasIndex = false; - if (!_useScreenshots) - return saveGame(0); + if(!_save.save(0, 500, 0, saveFile.destName, _propBuffer, _propBuffer + 500)) + return false; - return true; + if(!_save.save(0, 40, 500, saveFile.destName, _indexBuffer + (saveFile.slot * 40), 0)) + return false; - } else - warning("Invalid saving procedure (%d, %d, %d, %d)", - offset, size, slot, slotR); + if (!_save.save(dataVar, size, 540, saveFile.destName, + _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes)) + return false; - return false; -} + } -bool SaveLoad_v3::saveNotes(int16 dataVar, int32 size, int32 offset) { - return SaveLoad_v2::saveNotes(dataVar, size - 160, offset); + return true; } -bool SaveLoad_v3::saveScreenshot(int16 dataVar, int32 size, int32 offset) { - int slot = (offset - _screenshotOffset) / _screenshotSize; - int slotR = (offset - _screenshotOffset) % _screenshotSize; +bool SaveLoad_v3::saveTempSprite(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { - _useScreenshots = true; + debugC(3, kDebugSaveLoad, "Saving to the temporary sprite"); - if ((offset < _screenshotOffset) && (size > 0)) { + int index; + bool palette; - return true; + if (!_tmpSprite.getProperties(dataVar, size, offset, index, palette)) + return false; - } else if ((offset > 0) && (slot < 30) && - (slotR == 0) && (size < 0)) { + if (!_tmpSprite.saveSprite(*_vm->_draw->_spritesArray[index])) + return false; + + if (palette) + if (!_tmpSprite.savePalette(_vm->_global->_pPaletteDesc->vgaPal)) + return false; + + return true; +} - return saveGame(size); +bool SaveLoad_v3::saveNotes(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { - } else - warning("Invalid attempt at saving a screenshot (%d, %d, %d, %d)", - offset, size, slot, slotR); + debugC(2, kDebugSaveLoad, "Saving the notes"); + return _notes.save(dataVar, size - 160, offset, saveFile.destName, + _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes); return false; } -bool SaveLoad_v3::saveGame(int32 screenshotSize) { - int8 slot = _saveSlot; - - _saveSlot = -1; +bool SaveLoad_v3::saveScreenshot(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { - initBuffer(); + debugC(3, kDebugSaveLoad, "Saving a screenshot"); - if ((slot < 0) || (slot > 29)) { - warning("Can't save to slot %d: Out of range", slot); - delete[] _buffer[2]; - _buffer[2] = 0; - return false; + if (!_useScreenshots) { + _useScreenshots = true; + _save.addStage(_screenshotSize, false); } - if (!_buffer[2]) { - warning("Can't save to slot %d: No data", slot); - return false; - } + if (offset >= _screenshotOffset) { - Common::SaveFileManager *saveMan = g_system->getSavefileManager(); - Common::OutSaveFile *out; + saveFile.slot = (offset - _screenshotOffset) / _screenshotSize; + int slotRem = (offset - _screenshotOffset) % _screenshotSize; - out = saveMan->openForSaving(setCurSlot(slot)); - if (!out) { - warning("Can't open file for slot %d for writing", slot); - delete[] _buffer[2]; - _buffer[2] = 0; - return false; - } + setCurrentSlot(saveFile.destName, saveFile.slot); + + if ((saveFile.slot < 0) || (saveFile.slot >= 30) || (slotRem != 0)) { + warning("Invalid saving procedure (%d, %d, %d, %d, %d)", + dataVar, size, offset, saveFile.slot, slotRem); + return false; + } - int32 varSize = READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4; - byte varBuf[500], sizeBuf[500]; + int index; + bool palette; - memcpy(varBuf, _buffer[0], 500); - memcpy(sizeBuf, _buffer[0] + 500, 500); + if (!_screenshot.getProperties(dataVar, size, offset, index, palette)) + return false; - bool retVal = false; - if (toEndian(varBuf, sizeBuf, 500)) - if (write(*out, varBuf, sizeBuf, 500) == 500) - if (out->write(_buffer[1] + slot * 40, 40) == 40) - if (out->write(_buffer[2], varSize * 2) == ((uint32) (varSize * 2))) { - out->flush(); - if (!out->ioFailed()) - retVal = true; - } + if (!_screenshot.saveSprite(*_vm->_draw->_spritesArray[index])) + return false; - delete[] _buffer[2]; - _buffer[2] = 0; + if (palette) + if (!_screenshot.savePalette(_vm->_global->_pPaletteDesc->vgaPal)) + return false; - if (!retVal) { - warning("Can't save to slot %d", slot); - delete out; - return false; - } + + byte *buffer = new byte[_screenshotSize]; - if (_useScreenshots) { - if (screenshotSize >= 0) { - warning("Can't save to slot %d: Screenshot expected", slot); - delete out; + if (!_screenshot.toBuffer(buffer, _screenshotSize, palette)) { + delete[] buffer; return false; } - if (!saveSprite(*out, screenshotSize)) { - delete out; + if (!_save.save(0, _screenshotSize, _varSize + 540, saveFile.destName, buffer, 0)) { + delete[] buffer; return false; } - } - out->finalize(); - if (out->ioFailed()) { - warning("Can't save to slot %d", slot); - delete out; - return false; + delete[] buffer; } - debugC(1, kDebugFileIO, "Saved to slot %d", slot); - delete out; return true; } -void SaveLoad_v3::initBuffer() { - if (_buffer) +void SaveLoad_v3::assertInited() { + if (_varSize > 0) return; - _buffer = new byte*[_stagesCount]; - - assert(_buffer); + _varSize = READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4; - _buffer[0] = new byte[1000]; - _buffer[1] = new byte[1200]; - _buffer[2] = 0; + _save.addStage(500); + _save.addStage(40, false); + _save.addStage(_varSize); +} - assert(_buffer[0] && _buffer[1]); +void SaveLoad_v3::buildScreenshotIndex(byte *buffer, char *name, int n) { + Common::SaveFileManager *saveMan = g_system->getSavefileManager(); + Common::InSaveFile *in; - memset(_buffer[0], 0, 1000); - memset(_buffer[1], 0, 1200); + memset(buffer, 0, n); + for (int i = 0; i < n; i++) { + in = saveMan->openForLoading(setCurrentSlot(name, i)); + if (in) { + delete in; + buffer[i] = 1; + } + } } } // End of namespace Gob diff --git a/engines/gob/saveload_v4.cpp b/engines/gob/saveload_v4.cpp new file mode 100644 index 0000000000..2235b4834e --- /dev/null +++ b/engines/gob/saveload_v4.cpp @@ -0,0 +1,80 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/endian.h" + +#include "gob/gob.h" +#include "gob/saveload.h" +#include "gob/game.h" + +namespace Gob { + +SaveLoad_v4::SaveFile SaveLoad_v4::_saveFiles[] = { + { "", 0, kSaveModeNone, kSaveNone } +}; + +SaveLoad_v4::SaveLoad_v4(GobEngine *vm, const char *targetName) : + SaveLoad(vm, targetName) { + + _varSize = 0; +} + +SaveLoad_v4::~SaveLoad_v4() { +} + +SaveLoad::SaveMode SaveLoad_v4::getSaveMode(const char *fileName) { + return kSaveModeNone; +} + +int SaveLoad_v4::getSaveType(const char *fileName) { + return -1; +} + +int32 SaveLoad_v4::getSizeVersioned(int type) { + assertInited(); + + return -1; +} + +bool SaveLoad_v4::loadVersioned(int type, int16 dataVar, int32 size, int32 offset) { + assertInited(); + + return false; +} + +bool SaveLoad_v4::saveVersioned(int type, int16 dataVar, int32 size, int32 offset) { + assertInited(); + + return false; +} + +void SaveLoad_v4::assertInited() { + if (_varSize > 0) + return; + + _varSize = READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4; +} + +} // End of namespace Gob diff --git a/engines/gob/video.h b/engines/gob/video.h index 4a585d8857..1ab513205b 100644 --- a/engines/gob/video.h +++ b/engines/gob/video.h @@ -37,10 +37,11 @@ class SurfaceDesc : public ReferenceCounter { public: int16 _vidMode; - int16 getWidth() { return _width; } - int16 getHeight() { return _height; } + int16 getWidth() const { return _width; } + int16 getHeight() const { return _height; } byte *getVidMem() { return _vidMem; } - bool hasOwnVidMem() { return _ownVidMem; } + const byte *getVidMem() const { return _vidMem; } + bool hasOwnVidMem() const { return _ownVidMem; } void setVidMem(byte *vidMem); void resize(int16 width, int16 height); -- cgit v1.2.3 From d696ed6ea26172396badc9d8a10b2d4d05d5d8e4 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Sun, 11 May 2008 02:10:05 +0000 Subject: Added the MidiPlugin interface (first step towards the MIDI plugins) svn-id: r31993 --- backends/midi/alsa.cpp | 77 ++++++++++++++++++++++++++++++++++++++++++--- backends/midi/camd.cpp | 34 +++++++++++++++++--- backends/midi/coreaudio.cpp | 28 +++++++++++++++-- backends/midi/coremidi.cpp | 28 +++++++++++++++-- backends/midi/dmedia.cpp | 30 ++++++++++++++++-- backends/midi/midiplugin.h | 62 ++++++++++++++++++++++++++++++++++++ backends/midi/quicktime.cpp | 31 +++++++++++++++--- backends/midi/seq.cpp | 30 ++++++++++++++++-- backends/midi/timidity.cpp | 30 ++++++++++++++++-- backends/midi/windows.cpp | 31 +++++++++++++++--- backends/midi/ypa1.cpp | 30 ++++++++++++++++-- backends/midi/zodiac.cpp | 30 ++++++++++++++++-- sound/mididrv.cpp | 22 ++++++------- sound/mididrv.h | 22 ++++++------- 14 files changed, 427 insertions(+), 58 deletions(-) create mode 100644 backends/midi/midiplugin.h diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp index 174bb73f65..3139fadf24 100644 --- a/backends/midi/alsa.cpp +++ b/backends/midi/alsa.cpp @@ -26,10 +26,10 @@ #if defined(UNIX) && defined(USE_ALSA) -#include "sound/mpu401.h" - -#include "common/util.h" +#include "backends/midi/midiplugin.h" #include "common/config-manager.h" +#include "common/util.h" +#include "sound/mpu401.h" #include @@ -238,8 +238,75 @@ void MidiDriver_ALSA::send_event(int do_flush) { snd_seq_flush_output(seq_handle); } -MidiDriver *MidiDriver_ALSA_create() { - return new MidiDriver_ALSA(); + +// Plugin interface + +class AlsaMidiPlugin : public MidiPlugin { +public: + virtual const char *getName() const { + return "ALSA"; + } + + virtual Common::StringList getDevices() const; + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +#define perm_ok(pinfo,bits) ((snd_seq_port_info_get_capability(pinfo) & (bits)) == (bits)) + +static int check_permission(snd_seq_port_info_t *pinfo) +{ + if (perm_ok(pinfo, SND_SEQ_PORT_CAP_WRITE|SND_SEQ_PORT_CAP_SUBS_WRITE)) { + if (!(snd_seq_port_info_get_capability(pinfo) & SND_SEQ_PORT_CAP_NO_EXPORT)) + return 1; + } + return 0; +} + +Common::StringList AlsaMidiPlugin::getDevices() const { + Common::StringList devices; + + snd_seq_t *seq; + if (snd_seq_open(&seq, "default", SND_SEQ_OPEN_DUPLEX, 0) < 0) + return devices; // can't open sequencer + + snd_seq_client_info_t *cinfo; + snd_seq_client_info_alloca(&cinfo); + snd_seq_port_info_t *pinfo; + snd_seq_port_info_alloca(&pinfo); + snd_seq_client_info_set_client(cinfo, -1); + while (snd_seq_query_next_client(seq, cinfo) >= 0) { + bool found_valid_port = false; + + /* reset query info */ + snd_seq_port_info_set_client(pinfo, snd_seq_client_info_get_client(cinfo)); + snd_seq_port_info_set_port(pinfo, -1); + while (!found_valid_port && snd_seq_query_next_port(seq, pinfo) >= 0) { + if (check_permission(pinfo)) { + found_valid_port = true; + devices.push_back(snd_seq_client_info_get_name(cinfo)); + //snd_seq_client_info_get_client(cinfo) : snd_seq_port_info_get_port(pinfo) + } + } + } + snd_seq_close(seq); + + return devices; +} + +PluginError AlsaMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_ALSA(); + + return kNoError; +} + +MidiDriver *MidiDriver_ALSA_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + AlsaMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } #endif diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp index 25dc00bf63..11459af4f3 100644 --- a/backends/midi/camd.cpp +++ b/backends/midi/camd.cpp @@ -26,9 +26,10 @@ #if defined(__amigaos4__) -#include "sound/mpu401.h" -#include "common/util.h" +#include "backends/midi/midiplugin.h" #include "common/endian.h" +#include "common/util.h" +#include "sound/mpu401.h" #include #include @@ -162,8 +163,33 @@ void MidiDriver_CAMD::closeAll() { _isOpen = false; } -MidiDriver *MidiDriver_CAMD_create() { - return new MidiDriver_CAMD(); + +// Plugin interface + +class CamdMidiPlugin : public MidiPlugin { +public: + virtual const char *getName() const { + return "CAMD"; + } + + //virtual Common::StringList getDevices() const; + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError CamdMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_CAMD(); + + return kNoError; +} + +MidiDriver *MidiDriver_CAMD_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + CamdMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } #endif diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp index c338678036..1ff4a56a6b 100644 --- a/backends/midi/coreaudio.cpp +++ b/backends/midi/coreaudio.cpp @@ -24,6 +24,7 @@ #ifdef MACOSX +#include "backends/midi/midiplugin.h" #include "common/config-manager.h" #include "common/util.h" #include "sound/mpu401.h" @@ -192,8 +193,31 @@ void MidiDriver_CORE::sysEx(const byte *msg, uint16 length) { MusicDeviceSysEx(_synth, buf, length+2); } -MidiDriver *MidiDriver_CORE_create() { - return new MidiDriver_CORE(); + +// Plugin interface + +class CoreAudioMidiPlugin : public MidiPlugin { +public: + virtual const char *getName() const { + return "CoreAudio"; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError CoreAudioMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_CORE(); + + return kNoError; +} + +MidiDriver *MidiDriver_CORE_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + CoreAudioMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } #endif // MACOSX diff --git a/backends/midi/coremidi.cpp b/backends/midi/coremidi.cpp index 251b41a986..8df9ef79f4 100644 --- a/backends/midi/coremidi.cpp +++ b/backends/midi/coremidi.cpp @@ -24,6 +24,7 @@ #ifdef MACOSX +#include "backends/midi/midiplugin.h" #include "common/config-manager.h" #include "common/util.h" #include "sound/mpu401.h" @@ -175,8 +176,31 @@ void MidiDriver_CoreMIDI::sysEx(const byte *msg, uint16 length) { MIDISend(mOutPort, mDest, packetList); } -MidiDriver *MidiDriver_CoreMIDI_create() { - return new MidiDriver_CoreMIDI(); + +// Plugin interface + +class CoreMIDIMidiPlugin : public MidiPlugin { +public: + virtual const char *getName() const { + return "CoreMIDI"; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError CoreMIDIMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_CoreMIDI(); + + return kNoError; +} + +MidiDriver *MidiDriver_CoreMIDI_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + CoreMIDIMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } #endif // MACOSX diff --git a/backends/midi/dmedia.cpp b/backends/midi/dmedia.cpp index 1904eaf647..f67784be7e 100644 --- a/backends/midi/dmedia.cpp +++ b/backends/midi/dmedia.cpp @@ -29,9 +29,10 @@ #if defined(IRIX) +#include "backends/midi/midiplugin.h" #include "common/scummsys.h" -#include "sound/mpu401.h" #include "common/util.h" +#include "sound/mpu401.h" #include #include @@ -174,8 +175,31 @@ void MidiDriver_DMEDIA::sysEx (const byte *msg, uint16 length) { } } -MidiDriver *MidiDriver_DMEDIA_create() { - return new MidiDriver_DMEDIA(); + +// Plugin interface + +class DMediaMidiPlugin : public MidiPlugin { +public: + virtual const char *getName() const { + return "DMedia"; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError DMediaMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_DMEDIA(); + + return kNoError; +} + +MidiDriver *MidiDriver_DMEDIA_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + DMediaMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } #endif diff --git a/backends/midi/midiplugin.h b/backends/midi/midiplugin.h new file mode 100644 index 0000000000..0de14e8d55 --- /dev/null +++ b/backends/midi/midiplugin.h @@ -0,0 +1,62 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + */ + +#ifndef BACKENDS_MIDI_MIDIPLUGIN_H +#define BACKENDS_MIDI_MIDIPLUGIN_H + +#include "base/plugins.h" +#include "sound/mididrv.h" + +/** + * A MidiPlugin is essentially a factory for MidiDriver instances with the + * added ability of listing the available devices and their capabilities. + */ +class MidiPlugin : public PluginObject { +public: + virtual ~MidiPlugin() {} + + /** + * Returns a list of the available devices. The empty string means the + * default device. + */ + virtual Common::StringList getDevices() const { + Common::StringList dev; + dev.push_back(""); + return dev; + } + + /** + * Tries to instantiate an engine instance based on the settings of + * the currently active ConfMan target. That is, the MidiPlugin should + * query the ConfMan singleton for the device name, port, etc. + * + * @param mixer Pointer to the global Mixer object + * @param mididriver Pointer to a pointer which the MidiPlugin sets to + * the newly create MidiDriver, or 0 in case of an error + * @return a PluginError describing the error which occurred, or kNoError + */ + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const = 0; +}; + +#endif diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp index 3267bb3415..e22c99504b 100644 --- a/backends/midi/quicktime.cpp +++ b/backends/midi/quicktime.cpp @@ -24,10 +24,10 @@ #if defined(MACOSX) || defined(macintosh) - -#include "sound/mpu401.h" +#include "backends/midi/midiplugin.h" #include "common/endian.h" #include "common/util.h" +#include "sound/mpu401.h" #if defined(MACOSX) #include @@ -250,8 +250,31 @@ void MidiDriver_QT::dispose() } } -MidiDriver *MidiDriver_QT_create() { - return new MidiDriver_QT(); + +// Plugin interface + +class QuickTimeMidiPlugin : public MidiPlugin { +public: + virtual const char *getName() const { + return "QuickTime"; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError QuicktimeMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_QT(); + + return kNoError; +} + +MidiDriver *MidiDriver_QT_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + QuickTimeMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } #endif // MACOSX || macintosh diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp index 39c61dd85b..ec7f6b2f27 100644 --- a/backends/midi/seq.cpp +++ b/backends/midi/seq.cpp @@ -30,8 +30,9 @@ #if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__) -#include "sound/mpu401.h" +#include "backends/midi/midiplugin.h" #include "common/util.h" +#include "sound/mpu401.h" #include #include @@ -169,8 +170,31 @@ void MidiDriver_SEQ::sysEx (const byte *msg, uint16 length) { write (device, buf, position); } -MidiDriver *MidiDriver_SEQ_create() { - return new MidiDriver_SEQ(); + +// Plugin interface + +class SeqMidiPlugin : public MidiPlugin { +public: + virtual const char *getName() const { + return "SEQ"; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError SeqMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_SEQ(); + + return kNoError; +} + +MidiDriver *MidiDriver_SEQ_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + SeqMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } #endif diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp index 8b10cf07a4..8fc6fefd4d 100644 --- a/backends/midi/timidity.cpp +++ b/backends/midi/timidity.cpp @@ -36,8 +36,9 @@ #if defined (UNIX) -#include "sound/mpu401.h" +#include "backends/midi/midiplugin.h" #include "common/util.h" +#include "sound/mpu401.h" #include #include @@ -510,8 +511,31 @@ void MidiDriver_TIMIDITY::sysEx(const byte *msg, uint16 length) { timidity_write_data(buf, position); } -MidiDriver *MidiDriver_TIMIDITY_create() { - return new MidiDriver_TIMIDITY(); + +// Plugin interface + +class TimidityMidiPlugin : public MidiPlugin { +public: + virtual const char *getName() const { + return "TiMidity"; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError TimidityMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_TIMIDITY(); + + return kNoError; +} + +MidiDriver *MidiDriver_TIMIDITY_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + TimidityMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } #endif // defined (UNIX) diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp index db3ed50165..17a5e7be47 100644 --- a/backends/midi/windows.cpp +++ b/backends/midi/windows.cpp @@ -24,11 +24,11 @@ #if defined(WIN32) && !defined(_WIN32_WCE) +#include "backends/midi/midiplugin.h" +#include "sound/mpu401.h" #include #include -#include "sound/mpu401.h" -#include "common/util.h" //////////////////////////////////////// // @@ -141,8 +141,31 @@ void MidiDriver_WIN::check_error(MMRESULT result) { } } -MidiDriver *MidiDriver_WIN_create() { - return new MidiDriver_WIN(); + +// Plugin interface + +class WindowsMidiPlugin : public MidiPlugin { +public: + virtual const char *getName() const { + return "Windows MIDI"; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError WindowsMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_WIN(); + + return kNoError; +} + +MidiDriver *MidiDriver_WIN_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + WindowsMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } #endif diff --git a/backends/midi/ypa1.cpp b/backends/midi/ypa1.cpp index ca77de7300..3ea7d2170f 100644 --- a/backends/midi/ypa1.cpp +++ b/backends/midi/ypa1.cpp @@ -22,8 +22,9 @@ * $Id$ */ -#include "sound/mpu401.h" +#include "backends/midi/midiplugin.h" #include "common/util.h" +#include "sound/mpu401.h" #include "Pa1Lib.h" @@ -102,6 +103,29 @@ void MidiDriver_YamahaPa1::send(uint32 b) { } } -MidiDriver *MidiDriver_YamahaPa1_create() { - return new MidiDriver_YamahaPa1(); + +// Plugin interface + +class YamahaPa1MidiPlugin : public MidiPlugin { +public: + virtual const char *getName() const { + return "Yamaha Pa1"; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError YamahaPa1MidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_YamahaPa1(); + + return kNoError; +} + +MidiDriver *MidiDriver_YamahaPa1_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + YamahaPa1MidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } diff --git a/backends/midi/zodiac.cpp b/backends/midi/zodiac.cpp index b1c2aa61c7..55148b113b 100644 --- a/backends/midi/zodiac.cpp +++ b/backends/midi/zodiac.cpp @@ -22,8 +22,9 @@ * $Id$ */ -#include "sound/mpu401.h" +#include "backends/midi/midiplugin.h" #include "common/util.h" +#include "sound/mpu401.h" #ifndef DISABLE_TAPWAVE @@ -120,8 +121,31 @@ void MidiDriver_Zodiac::sysEx(const byte *msg, uint16 length) { TwMidiSysEx(_midiHandle, 0, (byte *)buf, length + 2); } -MidiDriver *MidiDriver_Zodiac_create() { - return new MidiDriver_Zodiac(); + +// Plugin interface + +class ZodiacMidiPlugin : public MidiPlugin { +public: + virtual const char *getName() const { + return "Tapwave Zodiac"; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError ZodiacMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_Zodiac(); + + return kNoError; +} + +MidiDriver *MidiDriver_Zodiac_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + ZodiacMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } #endif diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp index 53bc224180..52cf5d0e65 100644 --- a/sound/mididrv.cpp +++ b/sound/mididrv.cpp @@ -238,34 +238,34 @@ MidiDriver *MidiDriver::createMidi(int midiDriver) { #if defined(PALMOS_MODE) #if defined(COMPILE_CLIE) - case MD_YPA1: return MidiDriver_YamahaPa1_create(); + case MD_YPA1: return MidiDriver_YamahaPa1_create(g_system->getMixer()); #elif defined(COMPILE_ZODIAC) && (!defined(ENABLE_SCUMM) || !defined(PALMOS_ARM)) - case MD_ZODIAC: return MidiDriver_Zodiac_create(); + case MD_ZODIAC: return MidiDriver_Zodiac_create(g_system->getMixer()); #endif #endif #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) - case MD_WINDOWS: return MidiDriver_WIN_create(); + case MD_WINDOWS: return MidiDriver_WIN_create(g_system->getMixer()); #endif #if defined(UNIX) && !defined(__BEOS__) && !defined(MACOSX) && !defined(__MAEMO__) - case MD_SEQ: return MidiDriver_SEQ_create(); + case MD_SEQ: return MidiDriver_SEQ_create(g_system->getMixer()); #endif #if defined(UNIX) - case MD_TIMIDITY: return MidiDriver_TIMIDITY_create(); + case MD_TIMIDITY: return MidiDriver_TIMIDITY_create(g_system->getMixer()); #endif #if defined(IRIX) - case MD_DMEDIA: return MidiDriver_DMEDIA_create(); + case MD_DMEDIA: return MidiDriver_DMEDIA_create(g_system->getMixer()); #endif #if defined(MACOSX) - case MD_QTMUSIC: return MidiDriver_QT_create(); - case MD_COREAUDIO: return MidiDriver_CORE_create(); - case MD_COREMIDI: return MidiDriver_CoreMIDI_create(); + case MD_QTMUSIC: return MidiDriver_QT_create(g_system->getMixer()); + case MD_COREAUDIO: return MidiDriver_CORE_create(g_system->getMixer()); + case MD_COREMIDI: return MidiDriver_CoreMIDI_create(g_system->getMixer()); #endif #if defined(UNIX) && defined(USE_ALSA) - case MD_ALSA: return MidiDriver_ALSA_create(); + case MD_ALSA: return MidiDriver_ALSA_create(g_system->getMixer()); #endif #if defined(__amigaos4__) - case MD_CAMD: return MidiDriver_CAMD_create(); + case MD_CAMD: return MidiDriver_CAMD_create(g_system->getMixer()); #endif } diff --git a/sound/mididrv.h b/sound/mididrv.h index 38621530a4..e72e430747 100644 --- a/sound/mididrv.h +++ b/sound/mididrv.h @@ -273,16 +273,16 @@ public: // Factory functions, for faster compile extern MidiDriver *MidiDriver_NULL_create(); extern MidiDriver *MidiDriver_ADLIB_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_WIN_create(); -extern MidiDriver *MidiDriver_SEQ_create(); -extern MidiDriver *MidiDriver_TIMIDITY_create(); -extern MidiDriver *MidiDriver_QT_create(); -extern MidiDriver *MidiDriver_CORE_create(); -extern MidiDriver *MidiDriver_CoreMIDI_create(); +extern MidiDriver *MidiDriver_WIN_create(Audio::Mixer *mixer); +extern MidiDriver *MidiDriver_SEQ_create(Audio::Mixer *mixer); +extern MidiDriver *MidiDriver_TIMIDITY_create(Audio::Mixer *mixer); +extern MidiDriver *MidiDriver_QT_create(Audio::Mixer *mixer); +extern MidiDriver *MidiDriver_CORE_create(Audio::Mixer *mixer); +extern MidiDriver *MidiDriver_CoreMIDI_create(Audio::Mixer *mixer); extern MidiDriver *MidiDriver_ETUDE_create(); -extern MidiDriver *MidiDriver_ALSA_create(); -extern MidiDriver *MidiDriver_DMEDIA_create(); -extern MidiDriver *MidiDriver_CAMD_create(); +extern MidiDriver *MidiDriver_ALSA_create(Audio::Mixer *mixer); +extern MidiDriver *MidiDriver_DMEDIA_create(Audio::Mixer *mixer); +extern MidiDriver *MidiDriver_CAMD_create(Audio::Mixer *mixer); extern MidiDriver *MidiDriver_YM2612_create(Audio::Mixer *mixer); #ifdef USE_FLUIDSYNTH extern MidiDriver *MidiDriver_FluidSynth_create(Audio::Mixer *mixer); @@ -290,7 +290,7 @@ extern MidiDriver *MidiDriver_FluidSynth_create(Audio::Mixer *mixer); #ifdef USE_MT32EMU extern MidiDriver *MidiDriver_MT32_create(Audio::Mixer *mixer); #endif -extern MidiDriver *MidiDriver_YamahaPa1_create(); -extern MidiDriver *MidiDriver_Zodiac_create(); +extern MidiDriver *MidiDriver_YamahaPa1_create(Audio::Mixer *mixer); +extern MidiDriver *MidiDriver_Zodiac_create(Audio::Mixer *mixer); #endif -- cgit v1.2.3 From 02fbdd1f05bd86bfcefcbd15e94e4e770940d273 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Sun, 11 May 2008 02:37:41 +0000 Subject: Removed the remaining traces of the MorphOS ETUDE driver. svn-id: r31994 --- sound/mididrv.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sound/mididrv.h b/sound/mididrv.h index e72e430747..77b10518bc 100644 --- a/sound/mididrv.h +++ b/sound/mididrv.h @@ -64,9 +64,6 @@ enum MidiDriverType { MD_YPA1, MD_ZODIAC, - // MorphOS - MD_ETUDE, - // IRIX MD_DMEDIA, @@ -279,7 +276,6 @@ extern MidiDriver *MidiDriver_TIMIDITY_create(Audio::Mixer *mixer); extern MidiDriver *MidiDriver_QT_create(Audio::Mixer *mixer); extern MidiDriver *MidiDriver_CORE_create(Audio::Mixer *mixer); extern MidiDriver *MidiDriver_CoreMIDI_create(Audio::Mixer *mixer); -extern MidiDriver *MidiDriver_ETUDE_create(); extern MidiDriver *MidiDriver_ALSA_create(Audio::Mixer *mixer); extern MidiDriver *MidiDriver_DMEDIA_create(Audio::Mixer *mixer); extern MidiDriver *MidiDriver_CAMD_create(Audio::Mixer *mixer); -- cgit v1.2.3 From 04ba12b145beb26679ac92f5c804b8d7b827c446 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 11 May 2008 03:46:39 +0000 Subject: Add another English Windows version of Freddi Fish 1. svn-id: r31996 --- engines/scumm/detection_tables.h | 1 + engines/scumm/scumm-md5.h | 3 ++- tools/scumm-md5.txt | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 18d51e133d..49ac5a18eb 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -550,6 +550,7 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "freddi", "freddi", kGenHEPC, UNK_LANG, UNK, 0 }, { "freddi", "Freddi", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "freddi", "Freddi1", kGenHEPC, UNK_LANG, UNK, 0 }, { "freddi", "freddemo", kGenHEPC, UNK_LANG, UNK, 0 }, { "freddi", "Freddi Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "freddi", "Freddi Fish", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index ce78e0507a..084e57fee3 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Wed Apr 16 02:07:50 2008 + This file was generated by the md5table tool on Sun May 11 03:23:22 2008 DO NOT EDIT MANUALLY! */ @@ -388,6 +388,7 @@ static const MD5Table md5table[] = { { "a095e33061606d231ff37dca4c64c8ac", "pajama", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, { "a0a7dea72003933b8b3f8b99b9f7ddeb", "loom", "No Adlib", "EGA", -1, Common::EN_ANY, Common::kPlatformAtariST }, { "a194f15f51ee62badab74b9e7da97693", "baseball2001", "", "Demo", 20507, Common::EN_ANY, Common::kPlatformUnknown }, + { "a197a87ae77f3b3333f09a7a2c448fe2", "freddi", "HE 71", "", -1, Common::EN_ANY, Common::kPlatformWindows }, { "a28135a7ade38cc0208b04507c46efd1", "spyfox", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, { "a2bb6aa0537402c1b3c2ea899ccef64b", "lost", "HE 99", "Demo", 15540, Common::EN_ANY, Common::kPlatformWindows }, { "a3036878840720fbefa41e6965fa4a0a", "samnmax", "", "Floppy", -1, Common::EN_ANY, Common::kPlatformPC }, diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt index cc88b335a4..2e91635e78 100644 --- a/tools/scumm-md5.txt +++ b/tools/scumm-md5.txt @@ -447,6 +447,7 @@ fbpack Fatty Bear's Fun Pack freddi Freddi Fish 1: The Case of the Missing Kelp Seeds d4cccb5af88f3e77f370896e9ba8c5f9 -1 All Windows HE 71 - - sev c0039ad982999c92d0de81910d640fa0 -1 nl Windows HE 71 - - adutchguy + a197a87ae77f3b3333f09a7a2c448fe2 -1 en Windows HE 71 - - Jonathan e63a0b9249b5ca4cc4d3ac34305ae360 -1 nb Windows HE 71 - - Karl Ove Hufthammer 6d1baa1065ac5f7b210be8ebe4235e49 -1 nl Mac HE 73 - - daniel9 c782fbbe74a987c3df8ac73cd3e289ed -1 se Mac HE 73 - - Torbjörn Andersson -- cgit v1.2.3 From 33b50cff6586658130d4d799fd5ed076eb03ba91 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 11 May 2008 03:57:09 +0000 Subject: Update HE version for that English Windows version of Freddi Fish 1. svn-id: r31997 --- engines/scumm/scumm-md5.h | 4 ++-- tools/scumm-md5.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 084e57fee3..45abca111e 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Sun May 11 03:23:22 2008 + This file was generated by the md5table tool on Sun May 11 03:56:33 2008 DO NOT EDIT MANUALLY! */ @@ -388,7 +388,7 @@ static const MD5Table md5table[] = { { "a095e33061606d231ff37dca4c64c8ac", "pajama", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, { "a0a7dea72003933b8b3f8b99b9f7ddeb", "loom", "No Adlib", "EGA", -1, Common::EN_ANY, Common::kPlatformAtariST }, { "a194f15f51ee62badab74b9e7da97693", "baseball2001", "", "Demo", 20507, Common::EN_ANY, Common::kPlatformUnknown }, - { "a197a87ae77f3b3333f09a7a2c448fe2", "freddi", "HE 71", "", -1, Common::EN_ANY, Common::kPlatformWindows }, + { "a197a87ae77f3b3333f09a7a2c448fe2", "freddi", "HE 100", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows }, { "a28135a7ade38cc0208b04507c46efd1", "spyfox", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, { "a2bb6aa0537402c1b3c2ea899ccef64b", "lost", "HE 99", "Demo", 15540, Common::EN_ANY, Common::kPlatformWindows }, { "a3036878840720fbefa41e6965fa4a0a", "samnmax", "", "Floppy", -1, Common::EN_ANY, Common::kPlatformPC }, diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt index 2e91635e78..4c1c5d150d 100644 --- a/tools/scumm-md5.txt +++ b/tools/scumm-md5.txt @@ -447,7 +447,6 @@ fbpack Fatty Bear's Fun Pack freddi Freddi Fish 1: The Case of the Missing Kelp Seeds d4cccb5af88f3e77f370896e9ba8c5f9 -1 All Windows HE 71 - - sev c0039ad982999c92d0de81910d640fa0 -1 nl Windows HE 71 - - adutchguy - a197a87ae77f3b3333f09a7a2c448fe2 -1 en Windows HE 71 - - Jonathan e63a0b9249b5ca4cc4d3ac34305ae360 -1 nb Windows HE 71 - - Karl Ove Hufthammer 6d1baa1065ac5f7b210be8ebe4235e49 -1 nl Mac HE 73 - - daniel9 c782fbbe74a987c3df8ac73cd3e289ed -1 se Mac HE 73 - - Torbjörn Andersson @@ -458,6 +457,7 @@ freddi Freddi Fish 1: The Case of the Missing Kelp Seeds df047cc4792150f601290357566d36a6 -1 us All HE 90 Updated - khalek e44ea295a3f8fe4f41983080dab1e9ce -1 fr Mac HE 90 Updated - ThierryFR 746e88c172a5b7a1ae89ac0ee3ee681a -1 ru Windows HE 90 Updated - sev + a197a87ae77f3b3333f09a7a2c448fe2 -1 en Windows HE 100 Updated - Jonathan 084ed0fa98a6d1e9368d67fe9cfbd417 -1 en Windows HE 71 Demo - khalek c8aac5e3e701874e2fa4117896f9e1b1 -1 en Mac HE 73 Demo - khalek, sev -- cgit v1.2.3 From e4525090a02deedf0254f97b44265bb9bac4e8b0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 11 May 2008 08:36:53 +0000 Subject: - Move verbs to texts.cpp - Move yet another hardcoded string to texts.cpp - Add string numbers to texts.cpp - Fixed German texts svn-id: r31998 --- engines/drascula/drascula.cpp | 11 +- engines/drascula/rooms.cpp | 2 +- engines/drascula/texts.cpp | 912 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 917 insertions(+), 8 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 89bb6e530d..e0e1447937 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -122,6 +122,8 @@ int DrasculaEngine::go() { hay_que_load = 0; for (;;) { + int i; + VGA = (byte *)malloc(320 * 200); memset(VGA, 0, 64000); @@ -228,12 +230,9 @@ int DrasculaEngine::go() { decompressPic(dir_mesa, 1); } memset(nombre_icono, 0, sizeof(nombre_icono)); - strcpy(nombre_icono[1], "look"); - strcpy(nombre_icono[2], "take"); - strcpy(nombre_icono[3], "open"); - strcpy(nombre_icono[4], "close"); - strcpy(nombre_icono[5], "talk"); - strcpy(nombre_icono[6], "push"); + + for (i = 0; i < 6; i++) + strcpy(nombre_icono[i + 1], _textverbs[_lang][i]); paleta_hare(); if (!escoba()) { diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index ba2f0d56b8..938d6906ae 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -587,7 +587,7 @@ void DrasculaEngine::room_16(int fl) { pause(10); talk_sinc(_text[_lang][50], "50.als", "11111111111144432554433"); pause(3); - talk_baul("bla, bla, bla.", "d83.als"); + talk_baul(_text[_lang][83], "d83.als"); } else if (objeto_que_lleva == OPEN && fl == 183) { abre_puerta(19, NO_PUERTA); if (flags[20] == 0) { diff --git a/engines/drascula/texts.cpp b/engines/drascula/texts.cpp index 229852b9c7..a0ff44fa72 100644 --- a/engines/drascula/texts.cpp +++ b/engines/drascula/texts.cpp @@ -29,2942 +29,3560 @@ namespace Drascula { const char *_text[][501] = { { + // 0 "", "ITS THE SECOND BIGGEST DOOR I'VE SEEN IN MY LIFE", "NOT REALLY", "THE CHURCH IS ALL BOARDED UP, IT MUST HAVE BEEN ABANDONED SEVERAL YEARS AGO", "I HAVEN'T OPENED IT", + // 5 "WHAT SHOULD I DO, SHOULD I PULL IT OFF?", "HI THERE DOOR, I'M GOING TO MAKE YOU A DOOR-FRAME", "IT'S TOO MUCH FOR ME", "THERE'S A WINDOW STOPPING THE GAME FROM WORKING PROPERLY", "I CAN'T", + // 10 "YES, THAT'S DONE", "WHY?", "HI WINDOW, ARE YOU DOING ANYTHING TONIGHT?", "NOT WITHOUT PERMISSION FROM THE TOWN HALL", "IF ONLY THIS WINDOW WASN'T BOARDED UP...", + // 15 "YOO-HOO WINDOW!", "HI THERE", "LIKE MICROCHOF'S", "I CAN'T REACH", "IT'S ALRIGHT WHERE IT IS", + // 20 "", "ITS A COFFIN IN THE SHAPE OF A CROSS", "NO THANKS", "HI DEAD MAN. NO, DON'T GET UP FOR MY SAKE", "YES, JUST LIKE IN POLTERGEIST", + // 25 "", "", "I'LL BE BACK IN FIFTEEN MINUTES", "FORBIDDEN TO PUT UP POSTERS", "IT'S UNCLE EVARISTO'S TOMB", + // 30 "ITS LOCKED", "I'VE GOT ONE", "YOO HOO, UNCLE EVERISTO!", "THERE'S NO REPLY", "IT'S NOT WELL PARKED", + // 35 "IT'S A DOOR", "A DRAWER IN THE TABLE", "A SUSPICIOUS WARDROBE", "HI WARDROBE, HOW ARE YOU?", "", + // 40 "", "IT'S AN ANCIENT CANDELABRUM", "IT MUST HAVE BEEN HERE EVER SINCE YULE BRINNER HAD HAIR ON HIS HEAD", "NO, ITS A RELIC", "ITS A NICE ALTARPIECE", + // 45 "", "HA, HA, HA", "", "NO", "", + // 50 "HA, HE, HI, HO, HU, GREAT!", "", "", "", "I CAN'T SEE ANYTHING IN PARTICULAR", + // 55 "IT'S FERNAN, THE PLANT", "IT'S ONE OF THE FENCES SPIKES", "HEY! THERE'S A PACKET OF MATCHES UNDER HERE", "LOOK! A PACKET OF KLEENEX, AND ONE'S STILL UNUSED", "THERE ISN'T ANYTHING ELSE IN THE BUCKET", + // 60 "IT'S A BLIND MAN WHO CAN'T SEE", "", "", "", "", + // 65 "THAT'S A GREAT DEAL OF MONEY", "", "", "", "", + // 70 "", "", "", "", "", + // 75 "", "", "", "", "", + // 80 "", "", "", "", "", + // 85 "", "", "", "", "", + // 90 "", "", "", "", "", + // 95 "", "", "", "", "", + // 100 "THERE IS NOTHING SPECIAL ABOUT IT", "IT'S NOT UNUSUAL", "HEY, WHAT'S UP MAN?", "HI", "NOTHING NEW?", + // 105 "HOW IS THE FAMILY?", "THAT IS JUST LIKE YOU!", "BUT HOW DO I GET THAT?", "MY RELIGION DOES NOT ALLOW ME", "IT'D BE BETTER NOT", + // 110 "YEAH, SURE MAN!", "NO WAY", "IMPOSSIBLE", "THIS WILL NOT OPEN", "I CAN'T DO IT BY MYSELF", + // 115 "I COULD DO IT, BUT I JUST FEEL A LITTLE LAZY", "I DO NOT SEE THE REASON", "IT'S A QUITE NICE BRAIN", "AND SO BRAIN, WHAT ARE YOU UP TONIGHT?", "NO, IT MUST BE KEPT SOMEWHERE AWAY FROM THE MUTANT ACTION OF THE ATMOSPHERE", + // 120 "HE IS VERY STIFF, JUST LIKE MY BOSS", "A VERY SHARP STICK", "YOU FAITHFUL SHARP-PAINTED STICK, NOBLE TRANSILVAAANIAN OAK TREE", "DAMN, I HAVE TO CUT MY NAILS!", "B.J. IS IN THERE... SHE IS A REALLY HOT CHICK!", + // 125 "IT IS FIRMLY LOCKED", "\"SAVE AWAY LOCKS LTD.\"", "IT IS THE TYPICAL SKELETON YOU FIND IN THE DUNGEONS OF ALL THE GAMES", "IT IS COMMONLY USED TO COMMUNICATE ELECTRICITY TO THE MACHINES CONNECTED TO IT", "IT IS ABSOLUTELY HAND MADE BECAUSE THE JAPANESE MAKE THEM POCKET SIZE", + // 130 "I HAVE ONLY SEEN IN MY LIFE ANOTHER THING AS UGLY AS THIS ONE", "FORGET IT. I AM NOT GOING TO TELL HIM ANYTHING IN CASE HE GETS MAD", "IT SEEMS QUITE RATIONAL", "IT IS A PICTURE OF PLATO WRITING HIS LOST DIALOGUE", "I AM NOT ONE OF THOSE WHO TALKS TO POSTERS", + // 135 "THAT'S A VERY CUTE DESK", "IT IS A VAMPIRES HUNTER'S DIPLOMA OFFICIALLY APPROVED BY OXFORD UNIVERSITY", "IT'S A DARK NIGHT WITH FULL MOON", "IT SEEMS LIKE THESE SCREWS ARE NOT MUCH TWISTED", "DON'T LOOK NOW, BUT I THINK THAT A HIDDEN CAMERA IS FOCUSING ON ME", + // 140 "THAT'S A VERY MODERN STICK DETECTOR", "NO. THE LABORATORY IS ON THE SECOND FLOOR", "A NICE BEDSIDE TABLE", "IT'S A LOT OF MONEY THAT CAN'T BE MISSING IN ANY VALUABLE ADVENTURE", "IF I WERE A RICH MAN, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", + // 145 "THOSE ARE STRANGE LEAVES. THEY MUST HAVE BROUGHT THEM FROM SOUTH AMERICA OR AROUND THERE", "I DON'T THINK THEY WOULD ANSWER ME", "THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY GET ALL THE BEAUTY WITHIN IT", "I ONLY PRAY BEFORE I GO TO BED", "HEY, THIS PIKE SEEMS A LITTLE BIT LOOSE!", + // 150 "I HOPE YOU WON'T COMPLAIN ABOUT GETTING NO CLUES FROM ME", "IT'S A QUITE CONVENTIONAL PIKE", "THEY ARE CUTE, THOUGH THEY ARE COVERED WITH A LITTLE BIT OF SHIT", "NO, THEY WON'T HEAR ME. HA,HA,HA THIS IS GREAT!", "\"SLEEPING BEAUTY\" FROM CHAIKOSKY, OR CHOIFRUSKY, OR WHATEVER IT IS", + // 155 "VERY TEMPTING", "NO, I'M NOT ONE OF THOSE WHO PUT USED BUBBLE GUMS IN THEIR MOUTH", "THAT'S A VERY NICE SICKLE. I WONDER WHERE THE HAMMER MAY BE", "TOBACCO MANUFACTURERS WARN ABOUT HEALTH BEING SERIOUSLY DAMAGED BY SANITARY AUTHORITIES", "AN ABSOLUTELY NORMAL CANDLE, INCLUDING WAX AND EVERYTHING", + // 160 "THESE TWO SHINY COINS DO REALLY GLITTER!", "THIS SHINY COIN DOES REALLY GLITTER!", "WITH THIS I WILL BE IMMUNE AGAINST VAMPIRE'S BITES", "NO, IT'S IS NOT THE RIGHT MOMENT YET", "THERE IS A ONE THOUSAND BILL AND A COUPLE COINS", + // 165 "IT SAYS \"PLEASE, DO NOT THROW FOOD TO THE PIANIST\"", "OMELET, 200. FRIED FISH, 150, MAYONNAISE POTATOES, 225", "BEST BURGERS ON THIS SIDE OF THE DANUBE, ONLY FOR 325!", "THAT'S A NICE SKULL WITH A VERY PENETRATING LOOK, HA, HA, HA, HA, THAT WAS GOOD!", "HI SKULL, YOU REMIND ME OF UNCLE HAMLET", + // 170 "I HAVE THE HABIT OF NOT TOUCHING THINGS THAT HAVE BEEN ALIVE", "IT'S A BIN", "IT'S A BET FOR TONIGHT'S GAME", "I WONDER WHAT THERE IS BEHIND THAT", "HEY, THAT CURTAIN IS NOT MOVING!", + // 175 "MAN, THIS CASTLE IS REALLY GLOOMY", "I CAN'T, HE IS TOO FAR AWAY TO HEAR ME", "IT'S THE TYPICAL TRANSILVANIAN FOREST, WITH TREES", "MAN YOU REALLY SAY STUPID THINGS, AND THIS IS TOO DARK!", "GARCIA, CANDY STORE. SWEETS AND BUBBLE GUM", + // 180 "A VERY NICE DOOR", "IT'S CLOSED", "A COMPLETELY LOCKED BARREL", "", "AREN'T THESE BUGS REALLY CUTE?", + // 185 "BSSST, PUSSYCAT... LITTLE CAT", "THERE IS NO ANSWER", "THE MOON IS A SATELLITE THAT TURNS AROUND THE EARTH WITH A REVOLUTION PERIOD OF 28 DAYS", "HI, LOONY MOON", "IT'S TOTALLY BLOCKED UP WITH PLANKS", + // 190 "IT'S IMPOSSIBLE. NOT EVEN THAT TOUGH GUY FROM TV COULD OPEN THIS", "HEY! THE SHADOW OF THAT CYPRESS LOOKS PROLONGED TO ME!", "YOU, BARTENDER...!!", "I WOULD LIKE TO HAVE A ROOM PLEASE", "DO YOU KNOW WHERE I CAN FIND THE SO CALLED DRASCULA?", + // 195 "YES, SO WHAT?", "SO?", "IS...THAT RIGHT?", "GOOD QUESTION. NOW, LET ME TELL YOU MY STORY. LOOK...", "IT'S JUST FIVE MINUTES", + // 200 "I'M JOHN HACKER AND I REPRESENT A BRITISH PROPERTY COMPANY", "AS FAR AS I KNOW, COUNT DRASCULA WANTS TO BUY SOME PIECES OF LAND IN GIBRALTAR AND MY COMPANY SENT ME HERE TO NEGOTIATE THE SELLING", "I THINK I'M GOING BACK TO MY MUM'S TOMORROW FIRST THING IN THE MORNING", "BEAUTIFUL NIGHT, HUH?", "NO, NOTHING", + // 205 "YOU...PIANIST...!!!!", "BEAUTIFUL NIGHT", "AND IT'S NOT EVEN COLD OR ANYTHING", "ALL RIGHT, I'LL JUST LET YOU GO ON PLAYING", "WELL THEN", + // 210 "HI BOSS, HOW ARE YOU?", "AND HOW IS THE FAMILY?", "THIS IS QUITE GROOVY, HUH?", "I'D BETTER NOT SAY ANYTHING", "THERE IS NO PLACE LIKE HOME. THERE IS NO...WHAT?, BUT YOU ARE NOT AUNT EMMA. AS A MATTER OF FACT, I DON'T HAVE ANY AUNT EMMA!", + // 215 "YES, SO DOES MINE. YOU CAN CALL ME ANYTHING YOU WANT, BUT IF YOU CALL ME JHONNY, I'LL COME TO YOU LIKE A DOG", "AREN'T I JUST A FUNNY GUY, HUH?. BY THE WAY, WHERE AM I?", "YES", "SHOOT...!", "OH, SURE...OF COURSE!", + // 220 "WELL, THANKS VERY MUCH FOR YOUR HELP. I WON'T BOTHER YOU ANYMORE IF YOU PLEASE TELL ME WHERE THE DOOR IS...", "IT'S BECAUSE THE KNOCK MUST HAVE AFFECTED MY BRAIN...I CAN'T SEE A THING...", "WELL...THAT DOESN'T MATTER. I ALWAYS CARRY A SPARE ONE", "WOW, WHAT A HOT CHICK!! I DIDN'T NOTICE!, BUT OF COURSE, I WASN'T WEARING MY GLASSES", "HEY...", + // 225 "AND ALL THIIIISSS???", "DON'T WORRY B.J. HONEY, I'LL SAVE YOU FROM FALLING INTO HIS CLUTCHES...", "YOU REALLY GOT ME MAD MAN...", "AHHH A WEREWOLF!! DIE YOU DAMNED EVIL!", "YES, WELL...", + // 230 "YES, WELL...I THINK I'LL JUST GO ON MY WAY. EXCUSE ME", "WHAT?", "TO TELL YOU THE TRUTH...ON SECOND THOUGHTS...I DON'T REALLY THINK SO", "AND SO TELL ME YOU ERUDITE PHILOSOPHER, IS THERE ANY RELATIONSHIP CAUSE-AND-EFFECT BETWEEN SILLY AND BILLY?", "OK, OK, FORGET IT. I DON'T EVEN KNOW WHO I SAID ANYTHING ABOUT IT", + // 235 "WHAT ARE YOU DOING HERE PHILOSPOZING INSTEAD OF BEING EATING SOME PEOPLE", "HOW COME?", "HEY, COULD YOU SAY AGAIN ALL THAT ABOUT PRE-EVOLUTIONARY RELATIONSHIPS?", "YES, MAN. ALL THAT STUFF YOU TOLD ME ABOUT BEFORE. I DIDN'T GET IT VERY WELL, YOU KNOW", "NO, I'D RATHER NOT SAY ANYTHING, IN CASE HE GETS ANGRY OR SOMETHING...", + // 240 "HELLO?", "YES, WHAT'S UP?", "WELL, NOW THAT YOU MENTION IT, I'LL TELL YOU THAT...", "", "WELL, THANKS FOR CALLING. BY THE WAY, THIS IS NOT THE CASE, OF COURSE, BUT WHAT COULD HAPPEN IF A VAMPIRE GOT THE RECIPE BY ANY CHANCE?", + // 245 "WELL ANYWAY. LISTEN, DOESN'T THIS LOOK TO YOU LIKE A LOT OF CRAP TO END UP SOON WITH THE GAME?. WELL, MAYBE NOT", "IT'S EMPTY!", "WHY DID YOU TAKE MY ONLY LOVE, B.J., AWAY FROM ME?. LIFE HAS NO MEANING FOR WITHOUT HER", "HER BRAIN?\?!!", "TO TELL YOU THE TRUTH, I THINK I HAD JUST ENOUGH WITH YOUR OF YOUR LITTLE MONSTER", + // 250 "OH PLEASE, HOLLY VIRGIN, DON'T LET ANYTHING WORSE HAPPEN TO ME!!", "YOU ARE NOT GOING TO GET YOUR WAY. I'M SURE SUPERMAN WILL CAME AND RESCUE ME!", "WHAT A SHIT OF GAME IS THIS IN WHICH THE PROTAGONIST DIES!", "HEY, WAIT A SECOND!, WHAT ABOUT MY LAST WISH?", "HA. HA, I'M NOW IMMUNIZED AGAINST YOU DAMNED EVIL!. THIS CIGARETTE IS AN ANTI-VAMPIRE BREW THAT VON BRAUN GAVE TO ME", + // 255 "YES SURE, BUT YOU'LL NEVER GET ME TO GIVE YOU THE RECIPE", "APART FROM CREATING TORTURE, I CAN ALSO STAND IT.", "OH, NO PLEASE! I'LL TALK, BUT PLEASE, DON'T DO THAT TO ME!", "ALL RIGHT THEN. I TOLD YOU WHAT YOU WANTED TO KNOW. NOW SET B.J. AND ME FREE AND LEAVE US ALONE!", "WHAT ARE YOU DOING HERE B.J.?. WHERE IS DRASCULA?", + // 260 "WHAT A MEAN GUY!. JUST BECAUSE HE BELONGS TO THE NOBILITY HE THINKS HE IS ENTITLED TO SLEEP WITH ANYBODY HE FEELS LIKE", "DOWN WITH ARISTOCRATIC DESPOTISM!!", "POOR PEOPLE OF THE WORLD FOR EVER..!!", "AND AS I CAN SEE HE HAS CHAINED YOU UP WITH LOCKS AND ALL THAT STUFF, HUH?", "WELL, ALL RIGHT. DO YOU HAVE A HAIRPIN OVER THERE?", + // 265 "ALL RIGHT, OK, DON'T GET MAD. I'LL THINK ABOUT SOMETHING", "YOU...BARTENDER!!", "HOW IS THE GAME GOING?", "WHO?", "CAN'T YOU SEE DRASCULA IS HERE?", + // 270 "THEN, LET'S END UP WITH HIM, RIGHT?", "GIVE ME A SCOTCH ON THE ROCKS", "NOTHING, I JUST FORGOT WHAT I WAS GOING TO SAY...", "EITHER YOU GET ME A SCOTCH ON THE ROCKS OR I'LL PLAY THE PIANO UNTIL THE GAME IS OVER", "WHEN IS THE MATCH GOING TO BE OVER?", + // 275 "GOOD EVENING", "AND SO IGOR, HOW ARE YOU FEELING...A LITTLE HUMPED...?. HA, HA, HA, THAT WAS FUNNY!", "WHAT ARE YOU SUPPOSED TO BE DOING?", "WELL, NO", "THEN WEAR GLASSES", + // 280 "WHAT IS ALL THAT ABOUT THE SUPERNATURAL ORGY?", "OK, OK, STOP IT. I THINK I CAN GET THE PICTURE", "COULDN'T YOU TELL ME WHERE DRASCULA IS?", "OH...PLEASE...COME ON...!", "WHY NOT?", + // 285 "OH...BUT DIES HE SLEEP AT NIGHT?", "WELL, I HOPE YOU GET LUCKY", "I HAVE TO TALK TO HIM...", "YOOUUU...SKELETOOOONN..!!!", "GOOD HEAVENS!, IT'S A DEAD MAN TALKING!", + // 290 "TELL HOW DID YOU GET TO END UP HERE", "AND WHY WOULD DRASCULA WANT TO CREATE A MONSTER?", "WHAT'S YOUR NAME, MY SKELETON FRIEND?", "HEY, DON'T YOU WANT ANYTHING TO EAT?", "I BET YOUR STOMACH IS PRETTY EMPTY...HA, HA,HA!", + // 295 "THE THING IS THAT I DON'T FEEL LIKE TALKING RIGHT NOW", "I HOPE SOMEONE F...(WHISTLE) YOU...,AND YOUR F...(WHISTLE) SON OF (WHISTLE TWICE)", "I REALLY LOVED HER. I KNOW SHE WASN'T MUCH OF A WONDER, BUT NOBODY'S PERFECT, RIGHT?", "BESIDES. SHE REALLY HAD ONE OF THOSE GREAT BODIES THAT YOU NEVER FORGET...", "I'LL NEVER BE THE SAME AGAIN. I WILL SHUT MYSELF AWAY IN A MONASTERY, AND WILL LET MY LIFE JUST FLOW...", + // 300 "NOTHING WILL GET ME OUT OF THIS MYSTERY BECAUSE...", "WHOSE?. WHOSE?", "I WANT TO BECOME A PIRATE", "I WANT TO BECOME A PROGRAMMER", "TELL ME SOMETHING ABOUT PELAYO", + // 305 "I'LL JUST GO ON PLAYING, AND I'LL FORGET I SAW YOU", "WHOSE STUPID IDEA COULD THIS BE?", "IT'S LIKE MY GRANDMOTHER'S HANDBAG ", "JESUS, AREN'T I JUST REALLY COOL MAN...!", "THE MORE I SEE MYSELF, THE MORE I LOVE ME", + // 310 "HOW DO I LOCK MYSELF THEN?", "I'LL HAVE TO OPEN ME FIRST, RIGHT?", "I'M ALL RIGHT WHERE I AM", "I GOT ME", "HI, MYSELF!", + // 315 "I'LL WEAR THEM WHEN THE RIGHT TIME COMES", "I CAN'T SEE ANYTHING SPECIAL ABOUT IT", "IT'S ALL RIGHT WHERE IT IS", "AND WHAT FOR?", "I CAN'T", + // 320 "HI, YOU!", "IT'S UNCLE DESIDERIO'S PANTHEON!", "YOOUU...UNCLE DESIDERIOOOO!!", "NO, I DON'T WANT TO CUT MYSELF AGAIN", "AHHH,,,EXCUS....", + // 325 "JAMM. AHH...", "YES...WOF, WOF", "LOOK, THERE'S A PIECE OF BUBBLE GUM STUCK HERE", "THIS IS THE PORTABLILINE I GOT LAST CHRISTMAS", "IT'S VERY HIGH!", + // 330 "COME OUT TO THE BALCONY MY JULIET!!", "YOU ARE THE LIGHT THAT ILLUMINATES MY WAY!", "HEY, DOOR!, WHAT'S THE MATTER?", "YOOOUU, CIGARETTE SPENDING MACHINEEE!", "IT'S A CIGARETTE SPENDING MACHINE", + // 335 "I HAVE ANOTHER COIN INSIDE", "NO, I JUST DECIDED TO QUIT SMOKING AND DRINKING ALCOHOL", "I WILL DEVOTE MYSELF TO WOMEN FROM NO ON", "THIS IS A TRICK! NOTHING CAME OUT!", "AT LAST!", + // 340 "JUST A TRUNK", "HELLO TRUNK, YOUR NAME IS JUST LIKE MY COUSIN FRANK...", "I'VE FOUND B.J.'S HANDBAG!", "OH MY GOD! DON'T GET MY IMAGE REFLECTED! I'M A VAMPIRE!", "OH...JESUS, IT'S JUST A DRAWING!", + // 345 "LITTLE MIRROR, TELL ME, WHO IS THE MOST BEAUTIFUL IN THE WHOLE KINGDOM?", "HE WON'T OPEN", "ALL RIGHT. I GOT THE EAR-PLUGS ON", "IT'S A VAMPIRE'S HUNTER DIPLOMA, OFFICIALLY APPROVED BY OXFORD UNIVERSITY", "NOT YET. THERE ARE STILL SOME INGREDIENTS MISSING. IT'S NOT WORTH WAKING HIM UP", + // 350 "BUT I DON'T HAVE MONEY", "IT'S A BRITISH LAMP", "HELP ME OUT HERE BARTENDER!!", "A VAMPIRE CAME IN AND TOOK MY GIRLFRIEND AWAY!!", "BUT, AREN'T YOU GOING TO HELP ME!!??", + // 355 "DEAD?, WHAT DO YOU MEAN DEAD?", "AAHH....", "A VAMPIRE HAS KIDNAPPED THE GIRL IN ROOM 501", "BUT YOU HAVE TO HELP ME OUT!", "CAN'T YOU PLAY ONE FROM BLUR?", + // 360 "HOW CAN YOU STAY HERE ALL DAY PLAYING THE SAME SONG ALL THE TIME?", "AND THEN, HOW CAN YOU HEAR ME?", "PLEASE, LEND ME THE ERA-PLUGS", "COME ON, I'LL GIVE THEM BACK TO YOU RIGHT AWAY", "COOOMEE OONNN...", + // 365 "WELL GOODBYE, I HAVE TO KILL A VAMPIRE", "", "WHAT'S YOUR LANGUAGE, TRANSILVANIAN?", "WHO IS UNCLE DESIDERIO?", "BUT, WHAT'S THE MATTER WITH THAT DRASCULA?", + // 370 "WHO IS THAT GUY NAMED VON BRAUN?", "AND WHY DOESN'T HE DO IT?", "AND WHERE CAN I FIND VON BRAUN?", "WELL, THANKS AND GOODBYE. HOPE YOU SLEEP IT OFF JUST FINE", "WE'D BETTER CALL FIRST", + // 375 "ARE YOU PROFESSOR BRAUN?", "AND COULD YOU TELL ME WHERE I CA...?", "I DON'T BELIEVE HE IS GANIMEDES THE DWARF", "PROFESSOR!!", "PLEASE HELP ME!. THE LIFE OF MY GIRLFRIEND DEPENDS ON YOU!!", + // 380 "WELL, ALL RIGHT. I DON'T NEED YOUR HELP", "ALL RIGHT. I'M LEAVING", "DON'T DE AFRAID. WE WILL BEAT DRASCULA TOGETHER", "THEN WHY DON'T YOU HELP ME?", "I GOT THEM", + // 385 "YES, I GOT THEM!!", "ALL RIGHT", "AHH....YES", "I HAVE COME TO GET INTO THAT CABIN AGAIN", "I AM READY TO FACE YOUR TEST", + // 390 "ALL RIGHT OLD MAN. I CAME FOR MY MONEY", "NO, NOTHING. I WAS JUST LEAVING", "SORRY...", "DO YOU LIKE THIS BOOK?. IT HAS SOME SCORES FROM TCHAIKOWSKY", "HOW CAN I KILL A VAMPIRE?", + // 395 "HAS ANYBODY TOLD YOU THAT SLEEPING IN A BAD POSITION IS NOT GOOD FOR YOU?", "THAT'S WHAT MY MUM ALWAYS TELL ME", "WHY WOULDN'T DRASCULA KILL YOU?", "AND WHAT WAS IT?", "GREAT! YOU HAVE AN IMMUNIZING BREW", + // 400 "SO?", "ALL RIGHT", "CAN YOU REPEAT WHAT I NEED FOR THAT BREW", "WELL, I'LL RUSH OUT TO GET IT", "HEY, WHAT HAPPENED WITH THE PIANIST?", + // 405 "I HAVE ALL THE INGREDIENTS OF THAT BREW", "JUST A QUESTION. WHAT IS ALL THAT ABOUT THE ALUCSARD ETEREUM?", "HELLO, HELLO...", "AND WHERE IS THAT CAVERN?", "WHAT HAPPENS? DIDN'T YOU HAVE TO GO TO THE COURT?", + // 410 "...BUT... IF I MEET MORE VAMPIRES?", "IT'S A VAMPIRE THAT DOESN'T LET ME COME THROUGH", "HE LOOKS LIKE YODA, BUT A LITTLE TALLER", "HEY YODA, IF YOU JUST LET ME GO ON MY WAY, I'LL GIVE YOU A PENNY", "OK, OK, YOU GET MAD ABOUT NOTHING MAN", + // 415 "HAS ANYBODY TOLD YOU THAT YOU LOOK LIKE YODA?", "HI VAMPIRE, IT'S A BEAUTIFUL NIGHT, HUH?", "ARE YOU A VAMPIRE OR AN OIL PAINTING?", "I'D BETTER NOT SAY ANYTHING, IN CASE YOU GET MAD", "IT'S LOCKED", + // 420 "THE MAGPIE WOULD STICK OUT MY EYES IF I TRIED!", "OH MY GOD. IT'S LOCKED...THAT'S SCARY, HUH?", "THE HINGES ARE RUSTY", "THERE IS ONLY ONE CAN OF FLOUR IN THERE", "THAT TOOK AWAY THE RUST", + // 425 "I HAVE FOUND A PINE STICK", "I'LL TAKE THIS THICKER ONE", "WELL, I THINK I CAN GET RID OF THIS STUPID DISGUISE", "\"PASSAGE TO TOWERS CLOSED FOR REPAIRS. PLEASE USE MAIN ENTRANCE. SORRY FOR THE INCONVENIENCE\"", "...HE IS PALE, HE HAS FANGS AND WEARS A TOUPE\220 AND HE SURE IS DRASCULA!", + // 430 "IT'S B.J.! ARE YOU ALL RIGHT B.J.?", "YES, I KNOW SHE IS STUPID, BUT I'M SO LONELY", "YOU DON'T HAVE A KEY AROUND THERE, DO YOU?", "I BET YOU DON'T HAVE A PICKLOCK AROUND!", "GIVE ME A HAIRPIN, I'M GOING TO PLAY MCGYVER HERE!", + // 435 "DON'T GO ANYWHERE. I'LL BE RIGHT BACK", "SHOOT! IT'S BROKEN!", "OLEEEE! I EVEN SHAVED DUDE!", "YES, DARLING?", "HE'S NOT ARRIVED YET", + // 440 "THE PIANIST IS NOT HERE", "A TRANSYLVANIAN SCOTCH ON THE ROCKS", "I DON'T HAVE A ROOM YET", "IT LOOKS LIKE HE GOT STUCK IN THE BATH AND DECIDED TO RUN A BAR", "HE WAS DRUNK AS A SAILOR", + // 445 "THAT HAIR...REMINDS ME OF SOMEBODY", "IT'S A RAW-BONED SKELETON", "LOOK! THERE'S MIGUEL BOSE!", "HE'S ASLEEP. IT'D BE A SHAME WAKING HIM UP", "HE'S UGLIER THAN EMILIO DE PAZ", + // 450 "A PINE-WOODEN COFFIN", "HE IS GOING TO CUT ME IN LITTLE SLICES. JUST LIKE A SAUSAGE", "I DON'T LIKE PENDULAE. I'D RATHER PREFER ARTICHOKES", "I CAN'T MAKE IT. I'M HANDCUFFED", "IT'S OBVIOUSLY A SECRET DOOR", + // 455 "THEY IGNORE ME", "COME ON..!", "WHEN I READ THE SCRIPT IT WAS SUPPOSED TO MOVE, BUT THE BUDGET GOT CRAZY AND THEY COULDN'T AFFORD TO PAY THE GYM, SO THAT I NEVER GOT TOUGH. END OF STORY", "IT SEEMS A LITTLE LOOSE FROM THE WALL", "I DON'T THINK IS GOING TO HELP ME ANYWAY. IT'S TOO WET TO LIGHT IT", + // 460 "TO WEST WING? NO WAY! NOBODY KNOWS WHAT YOU CAN FIND THERE!!", "SHE'S GOT NICE TRANSILVANIAN REASONS", "", "IT'S A SHAME THERE ISN'T A ROASTED LAMB IN THERE", "LAST TIME I OPENED AN OVEN I BLEW UP THE HOUSE", + // 465 "THAT'S THE TRANSILVANIAN FOOTBALL BADGE", "WHAT FOR? TO PUT IT ON MY HEAD", "I DON'T THINK THESE TOWERS ARE THE OPENING KIND", "I DON'T WANT TO KNOW WHAT KIND OF FOOD IS IN THERE!", "IT LOOKS IMPRESSIONIST TO ME...", + // 470 "THE NIGHT IS FALLING OVER ALL OF US...THAT'S SCARY, ISN'T IT?", "IT'S STUCK!", "IT'S THE KING. YOU DIDN'T IMAGINE THAT, DID YOU!", "NO, I ALREADY HAVE ONE AT HOME TO FEED", "A SHELF WITH BOOKS AND SOME OTHER THINGS", + // 475 "BUT WHO CAN I CALL AT THIS TIME?", "\"HOW TO MAKE THE TAX RETURN FORMS\". HOW INTERESTING!", "I ALREADY HAVE ONE AT HOME. I THINK IT'S A WORLDWIDE BEST SELLER", "A COMPLETELY NORMAL KEY", "I THINK SHE IS NOT FROM AROUND HERE", + // 480 "HEY, THEY'RE FANG-LIKE FRENCH FRIES! I LOVE IT!", "I DON'T THINK THIS IS THE RIGHT TIME TO EAT THAT CRAP KNOWING THAT MY GIRLFRIEND HAS BEEN KIDNAPPED BY THE MOST EVIL PERSON EVER ON EARTH", "I'M HAVING A GREAT TIME KILLING VAMPIRES WITH THIS THING!", "LET'S SEE IF ANOTHER ONE COMES SOON!", "NO, IT HAS TO BE WITH A DIRTY AND STINKY VAMPIRE, JUST LIKE THE ONE I KILLED BEFORE", + // 485 "THIS IS THE ONE AND ONLY WIG ELVIS USED WHEN HE GOT BALD", "IT'S FLOUR, BUT DON'T ASK ME ANY COMMERCIAL NAMES", "MAYBE ANOTHER TIME, OK?", "THAT'S A GREAT AXE, IT'S A SHAME THERE IS NO VAMPIRE'S HEAD AROUND HERE, HUH?", "NO. I'M REALLY A GOOD PERSON", + // 490 "IT'S MARGARET'S THATCHER DEODORANT...HA, HA, HA...!!", "THAT'S A PRETTY CUTE CLOAK", "", "JUST LIKE ALL BRANCHES FROM ANY TREE IN THE WORLD, THERE IS NOTHING SPECIAL.", "HEY, THAT'S AMAZING! A ROPE WITHIN THIS TYPE OF ADVENTURE!", + // 495 "I WONDER WHAT WE COULD USE IT FOR...", "A ROPE TIED TO A BRANCH OR THE OTHER WAY AROUND, HOWEVER YOU WANT TO PUT IT...", "IT LOOKS LIKE THIS MAGPIE IS EVIL-MINDED", "FORGET IT, I'M NOT SAYING ANYTHING IN CASE HE GETS MAD", "SHE LOOKS DEAD, BUT SHE REALLY ISN'T, HUH?", + // 500 "NO ANIMAL WAS HARMED DURING THE PRODUCTION OF THIS GAME", }, { + // 0 "", "Es la segunda puerta mas grande que he visto en mi vida", "Bueno, no", "Esta sellada con tablones. La iglesia debe llevar abandonada varios a\244os", "Si no la he abierto", + // 5 "\250Que hago? \250La arranco?", "Hola puerta. Te voy a hacer un marco.", "Demasiado para mi.", "una ventana sellada con tablones.", "No puedo.", + // 10 "Ya lo esta.", "\250Y pa que?", "Hola ventana. \250Tienes algo que hacer esta noche?", "No sin el permiso de obras publicas", "\255eh! esa ventana tiene solo un tablon...", + // 15 "\255Eoooooo! \255Ventana!", "Hola tu.", "", "No alcanzo.", "Esta bien donde esta.", + // 20 "", "Es una tumba en forma de cruz.", "No gracias.", "Hola muerto. \250quieres gusanitos?", "Si hombre. Como en Poltergueist.", + // 25 "", "", "Vuelvo en quince minutos.", "Prohibido pegar carteles.", "", + // 30 "Esta cerrado con llave.", "Ya tengo uno.", "", "No contesta.", "No, esta bien aparcado.", + // 35 "Es una puerta.", "Un cajon de la mesa.", "Un sospechoso armario.", "Hola armario. \250Que tal?", "", + // 40 "", "Es un candelabro muy viejo.", "Debe de llevar aqui desde que Mazinguer-z era un tornillo.", "No. Es una reliquia.", "Es un bonito retablo.", + // 45 "", "Ji, ji, ji.", "", "No.", "", + // 50 "Ja, ja, ja. \255que bueno!", "", "", "", "No veo nada en especial.", + // 55 "Es Fernan, la planta.", "Es una de las picas de la verja.", "\255Eh! Aqui debajo hay una caja de cerillas.", "\255Mira! un paquete de clinex. \255Y hay uno sin usar!", "No hay nada mas en el cubo.", + // 60 "Es un ciego que no ve.", "", "", "", "", + // 65 "Es una cuantiosa cantidad de dinero.", "", "", "", "", + // 70 "", "", "", "", "", + // 75 "", "", "", "", "", + // 80 "", "", "", "", "", + // 85 "", "", "", "", "", + // 90 "", "", "", "", "", + // 95 "", "", "", "", "", + // 100 "NO TIENE NADA DE ESPECIAL", "NO ES NADA FUERA DE LO NORMAL", "\250QUE PASA TU?", "HOLA", "\250NADA NUEVO?", + // 105 "\250QUE TAL LA FAMILIA?", "\255QUE COSAS TIENES!", "\255PERO COMO VOY A COGER ESO!", "MI RELIGION ME LO PROHIBE", "MEJOR NO", + // 110 "\255SI HOMBRE!", "NI HABLAR DE ESO", "IMPOSIBLE", "ESTO NO SE ABRE", "YO SOLO NO PUEDO", + // 115 "SI QUISIERA PODRIA, PERO ES QUE ME DA PEREZA", "NO LE VEO MOTIVO APARENTE", "ES UN CEREBRO BASTANTE MAJO", "Y BIEN, CEREBRO \250QUE PIENSAS HACER ESTA NOCHE?", "NO, DEBE CONSERVARSE EN LUGAR CERRADO A LA ACCION MUTANTE DE LA ATMOSFERA", + // 120 "ES UN HUESO, COMO MI JEFE", "UNA ESTACA MUY AFILADA", "FIEL ESTACA PUNTIAGUDAAA, NOBLE ROBLE TRANSILVAAANOO", "\255VAYA, ME TENGO QUE CORTAR LAS U\245AS!", "\255AHI DENTRO ESTA B.J., Y HAY QUE VER COMO ESTA LA TIA!", + // 125 "ESTA CERRADA A CAL Y CANTO", "\"CANDADOS CAL Y CANTO S.A.\"", "ES EL TIPICO ESQUELETO QUE ESTA EN TODAS LAS MAZMORRAS DE TODOS LOS JUEGOS", "SE SUELE USAR PARA COMUNICAR CORRIENTE ELECTRICA A LOS APARATOS A EL ENCHUFADOS", "ES TOTALMENTE ARTESANAL, PORQUE LOS JAPONESES LOS HACEN DE BOLSILLO", + // 130 "SOLO HE VISTO EN MI VIDA OTRA COSA TAN FEA", "QUITA. NO LE DIGO NADA A VER SI SE VA A ENFADAR", "PARECE BASTANTE RACIONAL", "ES UNA FOTO DE PLATON ESCRIBIENDO SU DIALOGO PERDIDO", "NO SOY DE LOS QUE HABLAN CON POSTERS", + // 135 "UN ESCRITORIO MUY MONO", "ES UN DIPLOMA DE CAZA-CAZA-VAMPIROS HOMOLOGADO POR LA UNIVERSIDAD DE OXFORD", "ES NOCHE CERRADA CON LUNA LLENA", "PARECE QUE ESTOS TORNILLOS NO ESTAN MUY ENROSCADOS", "NO MIRES, PERO CREO QUE UNA CAMARA OCULTA ME ESTA ENFOCANDO", + // 140 "UN DETECTOR DE ESTACAS MUY MODERNO", "NO, EL LABORATORIO ESTA EN EL SEGUNDO PISO", "UNA BONITA MESILLA DE NOCHE", "ES UN MONTON DE DINERO QUE NO PUEDE FALTAR EN UNA AVENTURA QUE SE PRECIE", "SI YO FUERA RICO, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", + // 145 "SON UNAS EXTRA\245AS HOJAS. DEBEN DE HABERLAS TRAIDO DE SUDAMERICA, O POR AHI", "NO CREO QUE ME CONTESTARAN", "ES UN BONITO CRUCIFIJO DE MADERA. EL ICONO NO CAPTA TODA LA EXTENSION DE SU BELLEZA", "YO SOLO REZO ANTES DE ACOSTARME", "\255EH, PARECE QUE ESTA PICA ESTA UN POQUITO SUELTA!", + // 150 "PARA QUE LUEGO TE QUEJES DE QUE NO DOY PISTAS", "ES UNA PICA BASTANTE CONVENCIONAL", "SON MONOS, AUNQUE TIENEN UN POCO DE MIERDECILLA", "NO, NO ME OIRIAN. JI,JI,JI \255QUE BUENO!", "\"LA BELLA DURMIENTE DEL BOSQUE\" DE CHAIKOSKY, O CHOIFRUSKY, O COMO SE DIGA", + // 155 "MUY APETITOSO", "NO, YO NO SOY DE ESOS QUE SE METEN EN LA BOCA CHICLES USADOS", "UNA HOZ MUY MONA. ME PREGUNTO DONDE ESTARA EL MARTILLO", "\"LOS FABRICANTES DE TABACO ADVIERTEN QUE LAS AUTORIDADES SANITARIAS PERJUDICAN SERIAMENTE LA SALUD\"", "UNA VELA NORMAL Y CORRIENTE, CON CERA Y TODO", + // 160 "\255HAY QUE VER COMO BRILLAN ESTAS DOS BRILLANTES MONEDAS!", "\255HAY QUE VER COMO BRILLA ESTA BRILLANTE MONEDA!", "CON ESTO SERE INMUNE A LAS MORDEDURAS DE LOS VAMPIROS", "NO, TODAVIA NO ES EL MOMENTO", "HAY UN BILLETE DE MIL Y UN PAR DE MONEDAS", + // 165 "DICE \"SE RUEGA NO ECHAR COMIDA AL PIANISTA\"", "TORTILLA, 200. PESCAITOS FRITOS, 150, PATATAS ALIOLI, 225", "LAS MEJORES HAMBUERGUESAS A ESTE LADO DEL DANUBIO, POR SOLO 325", "ES UNA BONITA CALAVERA, CON UNA MIRADA MUY PENETRANTE. \255JI, JI, JI, QUE BUENO!", "HOLA CALAVERA, ME RECUERDAS AL TIO DE HAMLET", + // 170 "TENGO POR COSTUMBRE NO TOCAR COSAS QUE HAYAN ESTADO VIVAS", "ES UNA PAPELERA", "ES UNA PORRA PARA EL PARTIDO DE ESTA NOCHE", "ME PREGUNTO QUE HABRA DETRAS", "\255EH, ESTA CORTINA NO SE MUEVE!", + // 175 "HAY QUE VER, QUE TETRICO ES ESE CASTILLO, \250EH? ", "NO PUEDO, ESTA DEMASIADO LEJOS PARA OIRME", "ES UN TIPICO BOSQUE TRANSILVANO, CON ARBOLES ", "\255PERO QUE TONTERIAS DICES, CON LO OSCURO QUE ESTA!", "CONFITERIA GARCIA. PASTELES Y CHICLES.", + // 180 "UNA PUERTA MUY BONITA", "ESTA CERRADA", "UN BARRIL COMPLETAMENTE CERRADO", "", "\255QUE BICHOS MAS MONOS!", + // 185 "BSSST, BSSST, GATITO...", "NO CONTESTA", "LA LUNA ES UN SATELITE QUE GIRA ALREDEDOR DE LA TIERRA CON UN PERIODO DE REVOLUCION DE 28 DIAS", "HOLA, LUNA LUNERA CASCABELERA ", "ESTA TOTALMENTE TAPIADA CON TABLONES", + // 190 "IMPOSIBLE. ESTO NO LO ABRE NI EL MAYORDOMO DE LA TELE", "\255EH, PARECE QUE LA SOMBRA DE ESE CIPRES ES ALARGADA!", "\255EOOO, TABERNEROOO!", "QUISIERA UNA HABITACION ", "\250SABE DONDE PUEDO ENCONTRAR A UN TAL CONDE DRASCULA?", + // 195 "SI, \250QUE PASA? ", "\250Y ESO?", "\250DE... DE VERDAD?", "BUENA PREGUNTA, LE VOY A CONTAR MI HISTORIA, MIRE...", "SON SOLO CINCO MINUTOS", + // 200 "ME LLAMO JOHN HACKER, Y SOY REPRESENTANTE DE UNA INMOBILIARIA BRITANICA", "AL PARECER, EL CONDE DRASCULA QUIERE COMPRAR UNOS TERRENOS EN GIBRALTAR, Y ME HAN MANDADO A MI PARA NEGOCIAR LA VENTA", "PERO ME PARECE A MI QUE MA\245ANA TEMPRANITO ME VUELVO CON MI MAMA", "BONITA NOCHE \250VERDAD?", "NO, NADA", + // 205 "EOOOO, PIANISTA", "BONITA NOCHE", "Y ADEMAS NO HACE FRIO", "PUES NADA, TE DEJO QUE SIGAS TOCANDO", "PUES ESO", + // 210 "HOLA JEFE, \250QUE TAL?", "\250Y LA FAMILIA?", "HAY AMBIENTE AQUI \250EH?", "MEJOR NO DIGO NADA", "SE ESTA MEJOR EN CASA QUE EN NINGUN SITIO... SE ESTA MEJOR EN... \250EH? PERO SI USTED NO ES LA TIA ENMA. ES MAS. \255SI YO NO TENGO NINGUNA TIA ENMA!", + // 215 "SI, EL MIO TAMBIEN. USTED PUEDE LLAMARME COMO LE APETEZCA, AUNQUE SI ME LLAMA JOHNY, ACUDO COMO LOS PERROS", "SI, QUE GOLPES TENGO \250VERDAD? POR CIERTO, \250DONDE ESTOY?", "SI.", "CACHIS... ", "OH, SI. POR SUPUESTO", + // 220 "PUES MUCHAS GRACIAS POR PRESTARME TU AYUDA. NO TE MOLESTO MAS. SI ME DICES DONDE ESTA LA PUERTA, POR FAVOR... ", "PORQUE EL GOLPE ME HA DEBIDO AFECTAR AL CEREBRO Y NO VEO TRES EN UN BURRO ", "BAH, NO IMPORTA. SIEMPRE LLEVO DE REPUESTO", "\255GUAU, QUE TIA MAS BUENA! \255NO ME HABIA DADO CUENTA YO! CLARO, SIN LAS GAFAS", "OYE... ", + // 225 "\255\250 Y ESTOOOOOO?!", "\255NO TE PREOCUPES B.J., AMOR MIO! TE SALVARE DE LAS GARRAS DE ESE ", "ME HA TOCADO LAS NARICES, VAMOS.", "\255AHHH, UN HOMBRE LOBO! \255MUERE MALDITO!", "SI, ESTO...", + // 230 "SI, ESTO... CREO QUE SEGUIRE MI CAMINO. CON PERMISO... ", "\250QUE?", "PUES LA VERDAD, PENSANDOLO BIEN... CREO QUE NO", "DIME, OH ERUDITO FILOSOFO, \250EXISTE ALGUNA RELACION CAUSA-EFECTO ENTRE LA VELOCIDAD Y EL TOCINO?", "VALE, VALE, DEJALO. DE TODAS FORMAS, NO SE POR QUE HE DICHO ESO.", + // 235 "\250QUE HACES AQUI FILOSOFANDO, QUE NO TE ESTAS COMIENDO GENTE?", "\250Y ESO?", "OYE, PUEDES REPETIR ESO DE \"INCLINACIONES PRE-EVOLUTIVAS\"?", "SI HOMBRE. ESE ROLLO QUE ME HAS SOLTADO ANTES. ES QUE NO ME HE ENTERADO MUY BIEN...", "NO, MEJOR NO DIGO NADA, QUE COMO LE TOQUE LA VENA...", + // 240 "\250SI, DIGA?", "SI, \250QUE PASA? ", "AH, PUES AHORA QUE SACA EL TEMA LE DIRE QUE...", "", "POR CIERTO, \250QUE PASARIA SI UN VAMPIRO SE HICIERA CIRCUNSTANCIALMENTE CON LA RECETA... ", + // 245 "PUES NADA. OYE, \250A QUE ESTO PARECE UN PEGOTE PUESTO EN EL GUION PARA ACABAR PRONTO EL JUEGO? BUENO, A LO MEJOR NO", "\255ESTA VACIO!", "PORQUE ME ROBASTE MI AMOR, B.J. SIN ELLA LA VIDA PARA MI NO TIENE SENTIDO", "\255\250SU CEREBRO?!", "PUES NO ES POR NADA, PERO ME PARECE QUE ME HA CARGADO TU MONSTRUITO", + // 250 "\255VIRGENCITA, QUE ME QUEDE COMO ESTOY!", "\255NO TE SALDRAS CON LA TUYA. SEGURO QUE APARECE SUPERLOPEZ Y ME RESCATA!", "VAYA UNA MIERDA DE JUEGO EN EL QUE MUERE EL PROTAGONISTA ", "UN MOMENTO, \250QUE HAY DE MI ULTIMO DESEO?", "\255JA, JA! AHORA ESTOY INMUNIZADO CONTRA TI MALDITO DEMONIO. ESTE CIGARRILLO ES UNA POCION ANTIVAMPIRICA QUE ME DIO VON BRAUN ", + // 255 "SI, CLARO. PERO NUNCA CONSEGUIRAS QUE TE DIGA LA RECETA", "PUEDO SOPORTAR LA TORTURA, ADEMAS DE CREARLA ", "\255NO, POR FAVOR! \255HABLARE, PERO NO ME HAGA ESO!", "BUENO. YA TE HE DICHO LO QUE QUERIAS SABER. AHORA LIBERANOS A B.J. Y A MI Y DEJANOS EN PAZ", "\255B.J.! \250QUE HACES AQUI? \250DONDE ESTA DRASCULA?", + // 260 "\255QUE DESALMADO! SOLO PORQUE PERTENECE A LA NOBLEZA SE CREE QUE TIENE EL DERECHO DE PERNADA CON CUALQUIERA QUE SE LE ANTOJE ", "\255ABAJO LA ARISTOCRACIA CACIQUIL!", "\255ARRIBA LOS POBRES DEL MUUNDOOO....", "Y POR LO QUE VEO TE HA ENCADENADO CON CANDADO Y TODO", "BUENO, VALE. \250NO TENDRAS UNA HORQUILLA?", + // 265 "BUENO, BUENO. NO TE PONGAS ASI, YA SE ME OCURRIRA ALGO.", "EH, TABERNERO", "\250COMO VA EL PARTIDO?", "\250QUIEN?", "\250ES QUE NO VES QUE ESTA AQUI DRASCULA?", + // 270 "PUES VAMOS A ACABAR CON EL \250NO?", "PONME UN CUBATA...", "NADA. SE ME HA OLVIDADO LO QUE TE IBA A DECIR", "O\247ME\247PONES\247UN\247CUBATA\247O\247ME\247PONGO\247A\247TOCAR\247EL\247PIANO", "\250CUANTO QUEDA PARA QUE ACABE EL PARTIDO?", + // 275 "BUENAS NOCHES", "\250Y QUE TAL ANDAS IGOR? \250JOROBAO? \255JI,JI,JI, QUE BUENO! ", "\250QUE SE SUPONE QUE HACES?", "PUES NO", "PUES PONTE GAFAS", + // 280 "\250QUE ES ESO DE LA ORGIA SOBRENATURAL?", "VALE, VALE, NO SIGAS. YA ME HAGO UNA IDEA", "\250NO PODRIAS DECIRME DONDE ESTA DRASCULA? ", "ANDA, PORFAAA", "\250POR QUE NO?", + // 285 "AH, PERO \250DUERME POR LA NOCHE?", "BUENO, PUES QUE SE DE BIEN LA RENTA", "ES QUE TENGO QUE HABLAR CON EL", "\255EOOO, ESQUELETOOO! ", "\255CANASTOS! \255UN MUERTO QUE HABLA!", + // 290 "CUENTAME, \250COMO HAS VENIDO A PARAR AQUI?", "\250Y PARA QUE VA A QUERER DRASCULA CREAR UN MONSTRUO? ", "\250CUAL ES TU NOMBRE, AMIGO ESQUELETO?", "OYE, \250NO QUIERES QUE TE TRAIGA NADA DE COMER?", "DEBES TENER EL ESTOMAGO VACIO. \255JI, JI, JI!", + // 295 "LA VERDAD ES QUE NO ME APETECE HABLAR AHORA", "\255LA MADRE QUE...(PITIDO) ESPERO QUE TE...(PITIDO) Y QUE TE...(PITIDO) DOS VECES!", "YO LA QUERIA, DE VERDAD. VALE, DE ACUERDO QUE NO ERA UNA LUMBRERA, PERO NADIE ES PERFECTO \250NO? ", "ADEMAS, TENIA UN CUERPAZO QUE PARA QUE QUEREMOS MAS", "YA NO VOLVERE A SER EL MISMO. ME RECLUIRE EN UN MONASTERIO A DEJAR QUE MI VIDA SE ME ESCAPE POCO A POCO", + // 300 "NADA PODRA YA SACARME DE ESTA MISERIA PORQUE...", "\250DE QUIEN? \250DE QUIEN?", "QUIERO SER PIRATA", "QUIERO SER PROGRAMADOR ", "CONTADME ALGO SOBRE PELAYO", + // 305 "SEGUIRE JUGANDO Y OLVIDARE QUE OS HE VISTO ", "\255A QUIEN SE LE HABRA OCURRIDO ESTA IDIOTEZ!", "ES UN BOLSO COMO EL DE MI ABUELITA ", "\255PERO QUE BUENO QUE ESTOY!", "CUANTO MAS ME MIRO MAS ME GUSTO", + // 310 "\250Y LUEGO COMO ME CIERRO?", "TENDRE QUE ABRIRME PRIMERO \250NO?", "ESTOY BIEN DONDE ESTOY", "YA ME TENGO", "HOLA YO", + // 315 "ME LOS PONDRE CUANDO LA OCASION SEA OPORTUNA", "NO VEO NADA EN ESPECIAL", "ESTA BIEN DONDE ESTA", "\250Y PA QUE?", "NO PUEDO", + // 320 "HOLA TU", "ES EL PANTEON DEL TIO DESIDERIO", "\255EOOOO, TIO DESIDERIOOOO!", "NO. NO QUIERO CORTARME OTRA VEZ", "\255EJEM,JEM...!", + // 325 "\255YAMM, EMMM, JH!", "\255SI, COF,COF!", "ANDA, SI HAY UN CHICLE AQUI PEGADO", "ES EL MOVILANI QUE ME REGALARON EN NAVIDAD", "\255QUE ALTO ESTA!", + // 330 "\255SAL AL BALCON JULIETA!", "\255TU ERES LA LUZ QUE ILUMINA MI CAMINO!", "EH,PUERTA \250QUE PASSA?", "EOOO, MAQUINA DE TABACO DE TRANSILVANIAAA", "ES UNA MAQUINA EXPENDEDORA DE TABACO", + // 335 "TENGO OTRA MONEDA DENTRO", "NO. HE DECIDIDO DEJAR EL TABACO Y EL ALCOHOL ", "A PARTIR DE AHORA ME DEDICARE SOLO A LAS MUJERES ", "\255ESTO ES UN TIMO! NO HA SALIDO NADA", "\255POR FIN! ", + // 340 "PUES ESO, UN BAUL", "HOLA BAUL, TE LLAMAS COMO MI PRIMO QUE SE LLAMA RAUL.", "HE ENCONTRADO EL BOLSO DE B.J.", "DIOS MIO, NO ME REFLEJO \255SOY UN VAMPIRO!", "...AH, NO. ES QUE ES UN DIBUJO", + // 345 "ESPEJITO: \250QUIEN ES EL MAS BELLO DEL REINO?", "NO ME QUIERE ABRIR", "MUY BIEN. ME HE PUESTO LOS TAPONES", "ES UN DIPLOMA DE CAZA-VAMPIROS HOMOLOGADO POR LA UNIVERSIDAD DE CAMBRIDGE", "NO, AUN ME FALTAN INGREDIENTES, NO VALE LA PENA DESPERTARLE", + // 350 "ES QUE NO TENGO DINERO", "ES UNA LAMPARA BRITANICA", "\255TABERNERO! \255AYUDEME!", "HA APARECIDO UN VAMPIRO Y SE HA LLEVADO A MI NOVIA", "\255\250PERO NO VA USTED A AYUDARME?!", + // 355 "\250MUERTA? \250QUE ES LO QUE QUIERE DECIR?", "\255EJEM!", "\255UN VAMPIRO HA SECUESTRADO A LA CHICA DE LA 506!", "\255TIENES QUE AYUDARME!", "\250NO SABES TOCAR NINGUNA DE LOS INHUMANOS?", + // 360 "\250COMO TE AGUANTAS, TODO EL DIA TOCANDO LO MISMO?", "\250Y ENTONCES COMO ME OYES?", "DEJAME LOS TAPONES", "ANDA. SI TE LOS DEVUELVO ENSEGUIDA", "VENGAAAA...", + // 365 "ADIOS. TENGO QUE MATAR A UN VAMPIRO", "", "\250QUE HABLAS? \250EN TRANSILVANO?", "\250QUIEN ES EL TIO DESIDERIO?", "\250PERO QUE PASA CON ESE TAL DRASCULA?", + // 370 "\250QUIEN ES ESE TAL VON BRAUN?", "\250Y POR QUE NO LO HACE?", "\250Y DONDE PUEDO ENCONTRAR A VON BRAUN?", "PUES GRACIAS Y ADIOS, QUE LA DUERMAS BIEN", "SERA MEJOR LLAMAR PRIMERO", + // 375 "\250ES USTED EL PROFESOR VON BRAUN?", "\250Y NO ME PODRIA DECIR DONDE PUEDO...?", "NO ME CREO QUE SEA EL ENANO GANIMEDES", "\255PROFESOR!", "\255AYUDEME! \255LA VIDA DE MI AMADA DEPENDE DE USTED!", + // 380 "ESTA BIEN, NO NECESITO SU AYUDA", "DE ACUERDO. ME VOY", "NO TENGA MIEDO. JUNTOS VENCEREMOS A DRASCULA", "ENTONCES \250POR QUE NO ME AYUDA?", "YO LAS TENGO", + // 385 "\255SI LAS TENGO!", "DE ACUERDO", "...ER ...SI", "VENGO A METERME EN ESA CABINA DE NUEVO", "ESTOY PREPARADO PARA ENFRENTARME A SU PRUEBA", + // 390 "ESTA BIEN, VEJETE. HE VENIDO A POR MI DINERO", "NO, NADA. YA ME IBA", "PERDONA", "\250TE INTERESA ESTE LIBRO? TIENE PARTITURAS DE TCHAIKOWSKY", "\250COMO PUEDO MATAR A UN VAMPIRO?", + // 395 "\250NO TE HAN DICHO QUE ES MALO DORMIR EN MALA POSTURA?", "PUES ES LO QUE SIEMPRE ME DICE A MI MI MADRE", "\250POR QUE NO TE PUDO MATAR DRASCULA?", "\250Y QUE FUE?", "\255ESTUPENDO! \255TIENE USTED UNA POCION DE INMUNID...!", + // 400 "\250ENTONCES?", "MUY BIEN", "\250ME PUEDE REPETIR LO QUE NECESITO PARA ESA POCION?", "PUES PARTO RAUDO A BUSCARLO", "OIGA, \250QUE HA PASADO CON EL PIANISTA?", + // 405 "YA\247TENGO\247TODOS\247LOS\247INGREDIENTES\247DE\247ESA\247POCION", "UNA PREGUNTA: \250QUE ES ESO DE ALUCSARD ETEREUM?", "DIGA, DIGA... ", "\250Y DONDE ESTA ESA GRUTA?", "\250QUE PASA? \250NO TENIAIS JUZGADO?", + // 410 "...PERO ...\250Y SI ME ENCUENTRO A MAS VAMPIROS?", "ES UN VAMPIRO QUE NO ME DEJA PASAR", "SE PARECE A YODA, PERO MAS ALTO ", "EH, YODA. SI ME DEJAS PASAR TE DOY UN DURO", "BUENO VALE, QUE NO SE TE PUEDE DECIR NADA", + // 415 "HOLA VAMPIRO, BONITA NOCHE \250VERDAD?", "\250TE HAN DICHO ALGUNA VEZ QUE TE PARECES A YODA?", "\250ERES UN VAMPIRO O UNA PINTURA AL OLEO?", "MEJOR NO TE DIGO NADA, NO TE VAYAS A ENFADAR", "ESTA CERRADA CON LLAVE", + // 420 "\255LA URRACA ME PODRIA SACAR UN OJO SI LO INTENTO!", "\255ESTA CERRADA! \255DIOS MIO, QUE MIEDO!", "LAS BISAGRAS ESTAN OXIDADAS", "AQUI DENTRO SOLO HAY UN BOTE CON HARINA", "ESO HA QUITADO EL OXIDO", + // 425 "HE ENCONTRADO UNA ESTACA DE PINO", "COGERE ESTE QUE ES MAS GORDO", "BUENO, CREO QUE YA PUEDO DESHACERME DE ESTE ESTUPIDO DISFRAZ", "\"PASADIZO A LOS TORREONES CERRADO POR OBRAS. POR FAVOR, UTILICEN ENTRADA PRINCIPAL. DISCULPEN LAS MOLESTIAS\"", "...ES PALIDO, TIENE COLMILLOS, TIENE TUPE Y USA CAPA... \255SEGURO QUE ES DRASCULA!", + // 430 "\255ES B.J.! B.J. \250ESTAS BIEN?", "SI, YA LO SE QUE ES TONTA, PERO ES QUE ESTOY DE SOLO", "NO TENDRAS UNA LLAVE POR AHI, \250VERDAD? ", "\250A QUE NO TIENES UNA GANZUA?", "DAME UNA HORQUILLA. VOY A HACER COMO MCGYVER", + // 435 "NO TE MUEVAS QUE AHORA VUELVO", "\255CACHIS! \255SE ME HA ROTO!", "\255OLEEEE! \255Y ADEMAS ME HE AFEITADO, COLEGA!", "\250SI, CARI\245O?", "NO LLEGA", + // 440 "EL PIANISTA NO ESTA", "UN CUBATA TRANSILVANO", "AUN NO TENGO HABITACION", "PARECE QUE SE QUEDO ATASCADO EN LA BA\245ERA Y DECIDIO PONER UN BAR", "ESTA COMO UNA CUBA DE CUBA", + // 445 "ESE PELO... EL CASO ES QUE ME RECUERDA A ALGUIEN", "ES UN ESQUELETO HUESUDO", "\255MIRA! \255MIGUEL BOSE!", "ESTA DURMIENDO. SERIA UNA PENA DESPERTARLE", "ES MAS FEO QUE EMILIO DE PAZ ", + // 450 "UN ATAUD DE MADERA DE PINO", "ME VA A CORTAR EN RODAJITAS, COMO A UN SALCHICHON", "NO ME GUSTAN LOS PENDULOS. PREFIERO LAS ALCACHOFAS", "MIS MANOS ESTAN ESPOSADAS. NO VOY A PODER", "SALTA A LA VISTA QUE ES UNA PUERTA SECRETA", + // 455 "ME IGNORAN", "\255ANDA YA!", "EN EL GUION SE MOVIA, PERO EL JUEGO SE SALIO DE PRESUPUESTO Y NO PUDIERON PAGARME UN GIMNASIO PARA PONERME CACHAS, ASI QUE NADA", "PARECE QUE ESTA UN POCO SUELTA DE LA PARED", "NO CREO QUE ME VAYA A SERVIR DE NADA. ESTA DEMASIADO HUMEDA PARA ENCENDERLA", + // 460 "\250AL ALA OESTE? \255NI LOCO! \255A SABER QUE HABRA ALLI!", "TIENE BONITOS MOTIVOS TRANSILVANOS ", "", "QUE PENA QUE AHI DENTRO NO HAYA UN CORDERITO ASANDOSE ", "LA ULTIMA VEZ QUE ABRI UN HORNO LA CASA SALTO POR LOS AIRES", + // 465 "ES EL ESCUDO DEL EQUIPO DE FUTBOL DE TRANSILVANIA", "\250Y PARA QUE? \250PARA PONERMELA EN LA CABEZA?", "NO CREO QUE ESTOS CAJONES SEAN DE LOS QUE SE ABREN", "\255NO QUIERO SABER LA COMIDA QUE HABRA AHI DENTRO!", "ME DA LA IMPRESION DE QUE ES IMPRESIONISTA", + // 470 "LA NOCHE SE APODERA DE TODOS... QUE MIEDO \250NO?", "ESTA ATRANCADA", "ES EL REY \250ES QUE NO TE LO HABIAS IMAGINADO?", "NO, YA TENGO UNO EN MI CASA, AL QUE LE DOY DE COMER Y TODO", "UNA ESTANTERIA CON LIBROS Y OTRAS COSAS ", + // 475 "\250Y A QUIEN LLAMO A ESTAS HORAS?", "\"COMO HACER LA DECLARACION DE LA RENTA\" \255QUE INTERESANTE!", "YA TENGO UNO EN MI CASA. CREO QUE ES UN BEST-SELLER MUNDIAL ", "UNA LLAVE COMPLETAMENTE NORMAL", "ME PARECE A MI QUE ESTA NO ES DE AQUI", + // 480 "\255EH, SON PATATAS FRITAS CON FORMA DE COLMILLO! ME ENCANTA", "NO CREO QUE SEA EL MEJOR MOMENTO DE PONERSE A COMER CHUCHERIAS, CON MI NOVIA EN MANOS DEL SER MAS MALVADO QUE HA PARIDO MADRE", "\255QUE BIEN ME LO ESTOY PASANDO CARGANDOME VAMPIROS CON ESTO!", "A VER SI APARECE OTRO PRONTO", "NO, TIENE QUE SER CON UN VAMPIRO SUCIO Y MALOLIENTE COMO EL QUE ME CARGUE ANTES", + // 485 "ES LA AUTENTICA PELUCA QUE USO ELVIS CUANDO SE QUEDO CALVO", "ES HARINA, PERO NO PUEDO DECIR MARCAS", "QUIZA EN OTRO MOMENTO \250VALE?", "ES UN HACHA MAGNIFICA, QUE PENA QUE NO HAYA POR AQUI CERCA NINGUNA CABEZA DE VAMPIRO", "NO. EN EL FONDO SOY BUENA PERSONA", + // 490 "ES EL DESODORANTE DE LA TACHER \255JI,JI,JI!", "ES UNA CAPA BASTANTE MONA", "", "COMO TODAS LAS RAMAS DE TODOS LOS ARBOLES DE TODO EL MUNDO, O SEA, SIN NADA DE PARTICULAR", "\255OH, INCREIBLE! \255UNA CUERDA EN UNA AVENTURA GRAFICA!", + // 495 "ME PREGUNTO PARA QUE SERVIRA...", "UNA CUERDA ATADA A UNA RAMA O UNA RAMA ATADA A UNA CUERDA, SEGUN SE MIRE", "PARECE QUE ESTA URRACA TIENE MUY MALAS INTENCIONES", "QUITA, YO NO LA DIGO NADA, A VER SI SE VA A ENFADAR", "PARECE QUE ESTA MUERTA, PERO ES MENTIRA \250EH?", + // 500 "NINGUN ANIMAL DA\245ADO EN LA PRODUCCION DE ESTE JUEGO", }, { + // 0 "", "Das ist die zweitgroesste Tuer, die ich je gesehen habe !", "Ok, stimmt nicht ganz....", "Sie haben Bretter davorgenagelt. Die Kirche scheint seit Jahren leer zu stehen", "Aber ich habe sie doch nicht aufgemacht!", + // 5 "Soll ich sie aufbrechen ?", "Hallo Tuer! Ich verpasse Dir jetzt mal einen Rahmen!", "Zuviel fuer mich !", "ein zugenageltes Fenster", "Ich schaff\357es nicht!", + // 10 "Schon geschafft!", "Und wozu?", "Hallo Fenster. Hast Du heute abend schon was vor?", "Nicht ohne Genehmigung der Staedtischen Baubehoerde", "hey! Das Fenster da hat nur EIN Brett...", + // 15 "Heyhooo! Fenster!", "Hallo Du", "", "Ich komme nicht dran!", "Gut so ! ", + // 20 "", "Es ist ein Grabstein in Form eines Kreuzes.", "Nein, danke", "Hallo Toter. Willst Du ein paar Wuermchen?", "Klar Mann ! Wie in Poltergeist.", + // 25 "", "", "Bin in einer Viertelstunde zurueck!", "Plakate ankleben verboten", "", + // 30 "Sie ist abgeschlossen.", "Ich habe schon eins.", "", "Keine Reaktion !", "Nein, da steht es gut !", + // 35 "Es ist eine Tuer", "Eine Schublade vom Tisch", "Ein verdaechtiger Schrank", "Hallo Schrank. Alles klar?", "", + // 40 "", "Ein uralter Kerzenstaender", "Der stammt wohl noch aus der Zeit als meine Ururururoma in den Kindergarten ging ", "Nein, eine Reliquie aus vergangenen Zeiten", "Es ist ein huebsches Altarbild", + // 45 "", "Hi,hi,hi", "", "Nein.", "", + // 50 "Ha,ha,ha! klasse!", "", "", "", "Ich sehe nichts besonderes", + // 55 "Freddy, die Topfblume", "Eine Spitze aus dem Jaegerzaun", "Ej! Hier unten liegt eine Streichholzschachtel!", "Guck mal! Eine Packung Tempos! Und eins sogar ungebraucht!", "Sonst ist nichts mehr im Eimer", + // 60 "Ein Blinder der nichts sieht", "", "", "", "", + // 65 "Ein Wahnsinnsbatzen Geld.", "", "", "", "", + // 70 "", "", "", "", "", + // 75 "", "", "", "", "", + // 80 "", "", "", "", "", + // 85 "", "", "", "", "", + // 90 "", "", "", "", "", + // 95 "", "", "", "", "", + // 100 "SIEHT NICHT UNGEWoeHNLICH AUS", "SIEHT NICHT AUSSERGEWoeHNLICH AUS", "EJ DU, WAS IST LOS?", "HALLO", "NICHTS NEUES?", + // 105 "WIE GEHTS DER FAMILIE?", "WAS DU FueR SACHEN HAST !", "ABER WIE SOLLTE ICH DAS AUFHEBEN ?", "MEINE RELIGION VERBIETET MIR DAS", "BESSER NICHT", + // 110 "KLAR MANN!", "DU SPINNST WOHL !", "UNMoeGLICH", "GEHT NICHT AUF !", "ALLEINE SCHAFFE ICH DAS NICHT", + // 115 "WENN ICH WOLLTE, KoeNNTE ICH, ABER ICH HABE KEINE LUST", "ICH WueSSTE NICHT WARUM", "EIN SCHaeDEL, DER GUT DRAUF IST", "UND? SCHON WAS VOR HEUTE ABEND, SCHaeDEL?", "NEIN, ER MUSS AN EINEM KueHLEN ORT GELAGERT WERDEN, FERN DER ZERSToeRERISCHEN KRAFT DER ATMOSPHaeRE", + // 120 "KNOCHENTROCKEN, WIE MEIN CHEF!", "EIN SEHR SPITZER PFLOCK", "GUTER SPITZER PFLOHOCK, HOLZ SO EDEL, TRANSSYLVAAANISCH!!!", "OH VERDAMMT, ICH MUSS MIR DIE NaeGEL SCHNEIDEN !", "DA DRINNEN LIEGT B.J., UND GUCK MAL WIE DIE TANTE AUSSIEHT !", + // 125 "NIET UND NAGELFEST", " \"NIET & NAGEL GmbH & Co. KG\"", "DAS TYPISCHE SKELETT IM TYPISCHEN VERLIESS EINES TYPISCHEN SPIELS", "WIRD NORMALERWEISE ZUR STROMVERSORGUNG ALLER EINGESToePSELTEN GERaeTE VERWENDET", "TOTALES KUNSTHANDWERK, WEIL SIE DANK DEN JAPANERN KLEINE MINIATUREN SIND", + // 130 "ES GIBT NUR EINS, WAS GENAUSO HaeSSLICH IST", "HAU AB. ICH SAG IHM GAR NICHTS. MAL GUCKEN OB ER AUSFLIPPT", "SCHEINT ZIEMLICH VERNueNFTIG ZU SEIN", "EIN FOTO VON PLATON WIE ER SEINEN VERLORENEN DIALOG SCHREIBT", "SEH ICH SO AUS ALS OB ICH MIT POSTERN REDE ? !", + // 135 "EIN HueBSCHER SCHREIBTISCH", "EIN VON DER UNIVERSITaeT ZU OXFORD AUSGESTELLTES VAMPIR-JaeGER-JaeGER-DIPLOM", "VOLLMOND IN FINSTERSTER NACHT", "DIESE SCHRAUBEN SCHEINEN ZIEMLICH FEST ZU SITZEN", "GUCK JETZT NICHT HIN, ABER ICH GLAUBE HIER GIBT ES EINE VERSTECKTE KAMERA", + // 140 "EIN ULTRAMODERNER PFLOCK-DETEKTOR", "NEIN, DAS LABOR IST IM ZWEITEN STOCK", "EIN HueBSCHES NACHTTISCHCHEN ", "EIN BATZEN GELD DER BEI EINEM WIRKLICH GUTEN ABENTEUER NICHT FEHLEN DARF", "WENN ICH REICH WaeRE, SCHUBIDUBISCHUBIDUBUDU ", + // 145 "KOMISCHE BLaeTTER, DIE WERDEN SIE WOHL AUS SueDAMERIKA ODER SO MITGEBRACHT HABEN .", "ICH GLAUBE NICHT, DASS SIE ANTWORTEN WERDEN", "EIN SCHoeNES HOLZKRUZIFIX. DEM HELDEN SIND DIE AUSMASSE SEI-NER SCHoeNHEIT NICHT GANZ KLAR.", "ICH BETE NUR VOR DEM ZU-BETT-GEHEN", "EJ, ICH GLAUBE, DIE SPITZE HIER IST EIN BISSCHEN LOSE !", + // 150 "UND NACHHER BESCHWERST DU DICH, ICH HaeTTE DIR KEINEN WINK GEGEBEN !", "EINE STINKNORMALE ZAUNSPITZE", "NIEDLICH, OBWOHL SIE EIN BISSCHEN VERDRECKT SIND", "SIE WERDEN MICH NICHT HoeREN, HI,HI,HI, SUPERGUT !", "DIE SCHoeNE SCHLAFENDE AUS DEM WALDE VON TSCHAIKOWSKY ODER TSCHESLOFSKY ODER WIE DER HEISST.", + // 155 "SEHR APPETITLICH", "NEIN, SEHE ICH SO AUS, ALS WueRDE ICH BENUTZTE KAUGUMMIS KAUEN ?", "EINE NIEDLICHE SICHEL. ICH WueSSTE NUR GERNE WO DER HAMMER IST.", "DER GESUNDHEITSMINISTER WARNT : RAUCHEN GEFaeHRDET IHRE GESUNDHEIT", "EINE GANZ NORMALE KERZE, MIT WACHS UND ALLEM DRUM UND DRAN", + // 160 "MAN MUSS ECHT MAL GESEHEN HABEN WIE DIESE 2 GLaeNZENDEN MueNZEN GLaeNZEN", "MAN MUSS ECHT GESEHEN HABEN WIE DIESE GLaeNZENDE MueNZE GLaeNZT !", "DAMIT WERDE ICH GEGEN VAMPIRBISSE IMMUN SEIN.", "NEIN,ES IST NOCH NICHT SO WEIT", "EIN TAUSENDER UND EIN BISSCHEN KLEINGELD", + // 165 "DA STEHT\"DEN KLAVIERSPIELER BITTE NICHT MIT LEBENSMITTELN BEWERFEN", "CURRYWURST 3.80. POMMES FRITES 2.30., FRIKADELLEN 1.50", "DIE BESTEN HAMBURGER DIESSEITS DER DONAU FueR NUR 3.80 DM", "EIN SCHoeNER TOTENKOPF MIT EINEM ZIEMLICH DURCHDRINGENDEN BLICK, HI, HI, SUPERGUT !", "HALLO TOTENKOPF, DU ERINNERST MICH AN HAMLETS ONKEL !", + // 170 "ICH HABE DIE ANGEWOHNHEIT, NICHTS ANZUFASSEN, WAS MAL LEBENDIG GEWESEN IST", "EIN PAPIERKORB", "SIE WETTEN, WIE DAS SPIEL HEUTE ABEND AUSGEHT", "WAS SICH WOHL DAHINTER VERBERGEN MAG", "EJ, DIESER VORHANG BEWEGT SICH NICHT !", + // 175 "GANZ SCHoeN GRUSELIG, DAS SCHLOSS DA, WAS ?", "ICH SCHAFFS NICHT, ER IST ZU WEIT WEG, UM MICH ZU HoeREN", "EIN TYPISCH TRANSSYLVANISCHER WALD, MIT BaeUMEN UND SO", "RED KEINEN BLoeDSINN, ES IST DOCH STOCKDUNKEL!", "KONDITOREI MueLLER. GEBaeCK UND KAUGUMMIS", + // 180 "EINE SEHR SCHoeNE TueR", "GESCHLOSSEN", "EINE TOTAL GESCHLOSSENE TONNE", "", "WAS FueR SueSSE VIECHER !", + // 185 "PSSS,PSSS,PSSS,MIETZCHEN...", "KEINE REAKTION", "DER MOND IST EIN SATELLIT DER DIE ERDE IN EINER UMLAUFGESCHWINDIGKEIT VON 28 TAGEN UMKREIST.", "HALLO MOND DU KREISRUNDES MONDGESICHT", "TOTAL MIT BRETTERN ZUGENAGELT", + // 190 "NICHTS ZU MACHEN. HIER KOMMT NOCH NICHT MAL ARNOLD S. MIT DER KREISSaeGE DURCH", "SCHEINT SO, ALS HaeTTE DIE TANNE DA EINEN ueBERDIMENSIONALEN SCHATTEN !", "HEHOO, WIRT !", "SIND NOCH ZIMMER FREI ?", "KoeNNEN SIE MIR SAGEN WO ICH EINEN GEWISSEN GRAF DRASCULA FINDE ?", + // 195 "JA, WAS GIBTS ?", "UND WIESO ?", "WW...WIRKLICH ?", "GUTE FRAGE, ICH WERDE IHNEN MAL MEINE STORY ERZaeHLEN, ALSO...", "NUR FueNF MINUTEN !", + // 200 "ICH HEISSE HEINZ HACKER UND BIN VERTRETER EINER NORDDEUTSCHEN IMMOBILIENFIRMA", "SO WIES AUSSIEHT WILL GRAF DRASCULA EINIGE HEKTAR LAND AUF HELGOLAND KAUFEN UND ICH BIN HIER UM ueBER DIE PREISE ZU VERHANDELN", "MMMMH, ICH GLAUBE DASS ICH MORGEN FRueH MIT MEINER MAMI ZURueCKKOMME", "WAS FueR EINE NACHT, NICHT WAHR ?", "NICHTS, SCHON GUT", + // 205 "HEEHOOO, KLAVIERSPIELER", "WAS FueR EINE NACHT", "UND ES IST AUCH GAR NICHT SO KALT", "NUN GUT, ICH LASS DICH JETZT MAL IN RUHE WEITERSPIELEN", "GENAU", + // 210 "HALLO CHEF, ALLES KLAR ?", "UND DIE FAMILIE ?", "HIER IST MaeCHTIG WAS LOS, WAS ?", "ICH HALTE BESSER MEINEN MUND", "ZU HAUSE IST ES IMMER NOCH AM SCHoeNSTEN...ZU HAUSE IST ES IMMER....Hae ? ABER SIE SIND DOCH NICHT TANTA ENMA. WO ICH DOCH GAR KEINE TANTE EMMA HABE !", + // 215 "JA, MEINER AUCH. SIE KoeNNEN MICH NENNEN WIE SIE WOLLEN, ICH HoeRE SELBST AUF HEINZCHEN WIE AUF KOMMANDO.", "JA, ICH HAB GANZ SCHoeNE BEULEN, WAS ? ueBRIGENS, WO BIN ICH ?", "JA", "VERDAMMT.....", "JA, KLAR, SELBSTVERSTaeNDLICH !", + // 220 "DANN ALSO VIELEN DANk FueR DEINE HILFE. ICH WERDE DICH NICHT WEITER BELaeSTIGEN. WENN DU MIR BITTE NOCH SAGEN WueRDEST, WO DIE TueR IST.... ", "WEIL DIE BEULE WOHL MEIN GEHIRN ANGEGRIFFEN HAT UND ICH EINFACH ueBERHAUPT NICHTS SEHE", "PAH, MACHT NICHTS. ICH HABE IMMER ERSATZ DABEI", "WOW, WAS FueR EIN SCHARFES WEIB ! OHNE BRILLE HABE ICH DAS GAR NICHT BEMERKT !", "EJ, DU....", + // 225 "UND WAS IST DAAAAAS ? !", "MACH DIR KEINE SORGEN, BJ, MEINE GELIEBTE !ICH WERDE DICH AUS SEINEN KLAUEN BEFREIEN", "ACH KOMM, ER HAT MICH AUF DIE PALME GEBRACHT", "UUAAA, EIN WERWOLF ! KREPIER, DU MONSTER !", "JA, DAS.... ", + // 230 "JA, DAS.... ICH GLAUB, ICH GEH DANN MAL WEITER, MIT VERLAUB...", "WAS?", "WENN ICHS MIR RECHT ueBERLEGE, UM EHRLICH ZU SEIN, ICH GLAUBE NEIN ", "SAG MIR OH GEBILDETER PHILOSOPH, GIBT ES IRGENDEINEN KAUSALZUSAMMENHANG ZWISCHEN DER LICHTGESCHWINDIGKEIT und SCHINKENSPECK", "OKAY,OKAY,VERGISS ES. ICH WEISS JEDENFALLS NICHT, WARUM ICH DAS GESAGT HABE", + // 235 "WAS PHILOSOPHIERST DU HIER HERUM, WO DU DOCH MENSCHEN FRESSEN MueSSTEST!", "HaeH", "EJ, KANNST DU DAS MIT DEN PRaeHISTORISCHEN NEIGUNGEN NOCHMAL ERKLaeREN ?", "JA, MANN. DER KRAM MIT DEM DU MIR EBEN GEKOMMEN BIST. ICH HAB DAS NaeMLICH NICHT GANZ KAPIERT....", "ICH HALTE BESSER MEINEN MUND, WEIL SOBALD ER BLUT RIECHT...", + // 240 "JA, BITTE ?", "JA, WAS GIBTS ?", "ACH, WO SIES GERADE ERWaeHNEN,....", "", "ueBRIGENS, WAS WueRDE EIGENTLICH PASSIEREN, WENN DAS REZEPT ZUFaeLLIG IN DIE HaeNDE EINES VAMPIRS GERATEN WueRDE...", + // 245 "NA WAS SOLLS. HoeR MAL, KOMMT DIR DAS NICHT AUCH WIE EIN DaeMLICHER KLEINER TRICK VOR, UM DAS SPIEL SCHNELL ZU BEENDEN ? NAJA, VIELLEICHT AUCH NICHT", "LEER !", "WEIL DU MIR B.J., MEINE GELIEBTE, GERAUBT HAST. OHNE SIE HAT MEIN LEBEN KEINEN SINN.", "SEIN GEHIRN ?", "OCH, NUR SO! ICH GLAUBE DASS ICH GENUG VON DEM KLEINEN MONSTERCHEN HABE", + // 250 "SueSSE KLEINE JUNGFRAU, ICH BLEIB SO WIE ICH BIN !", "DAMIT KOMMST DU NICHT DURCH.. GLEICH KOMMT POPEYE UND HOLT MICH HIER RAUS !", "WAS FueR EIN SCHEISS-SPIEL, BEI DEM DEM DER HELD STERBEN MUSS", "HALT ! WAS IST MIT MEINEM LETZTEN WUNSCH ?", "HAR,HAR ! JETZT BIN ICH IMMUN GEGEN DEIN VERFLUCHTES UNGEHEUER. DAS HIER IST EINE ANTI-VAMPIR-ZIGARETTE,DIE MIR VON BRAUN GEGEBEN HAT.", + // 255 "JA, KLAR. ABER ICH WERDE DIR BESTIMMT NICHT DAS REZEPT VERRATEN", "MIT FOLTER KOMM ICH GUT KLAR, ICH DENK MIR SOGAR WELCHE AUS", "NEIN, BITTE NICHT ! ICH SAG ALLES, ABER TUN SIE MIR DAS NICHT AN !", "O.K. ICH HAB DIR ALLES ERZaeHLT. JETZT HOL B.J. UND MICH ENDLICH HIER RAUS UND LASS UNS IN RUHE", "B.J. !WAS MACHST DU HIER ?WO IST DRASCULA ?", + // 260 "WAS FueR EIN MIESER TYP ! NUR WEIL ER BLAUES BLUT HAT, MueSSEN IHM NOCH LANGE NICHT ALLE JUNGFRAUEN DIESER ERDE ZU FueSSEN LIEGEN", "NIEDER MIT DEM BONZEN-ADEL !", "SOLIDARITaeT MIT ALLEN ARMEN DIESER WELT... !", "UND WIES AUSSIEHT HAT ER DICH NACH ALLEN REGELN DER KUNST ANGEKETTET", "O.K. DU HAST NICHT ZUFaeLLIG EINE HAARSPANGE ?", + // 265 "NANANA. STELL DICH NICHT SO AN . MIR FaeLLT SCHON WAS EIN.", "HE, WIRT", "WER GEWINNT ?", "WER ?", "SIEHST DU DENN NICHT, DASS HIER DRASCULA IST ?", + // 270 "NA, DANN LASS IHN UNS ALLE MACHEN, ODER ?", "GIB MIR EINEN GIN-TONIC", "SCHON GUT. ICH HAB VERGESSEN, WAS ICH DIR SAGEN WOLLTE", "GIB\247MIR\247SOFORT\247EINEN\247GIN\247TONIC\247ODER\247ICH\247SPIEL\247KLAVIER", "WIELANGE DAUERT DAS SPIEL NOCH ?", + // 275 "GUTE NACHT", "UND WIE KOMMST DU VORAN, IGOR ? SCHLEPPEND ? HI,HI,HI, KLASSE !", "WAS SOLL DAS SEIN, WAS DU DA MACHST?", "NEIN", "DANN ZIEH DIE BRILLE AUF", + // 280 "WAS SOLL DAS MIT DER ueBERNATueRLICHEN ORGIE ?", "O.K. ES REICHT. ICH KANN ES MIR SCHON VORSTELLEN", "KoeNNTEST DU MIR NICHT ZUFaeLLIG SAGEN, WO DRASCULA IST ?", "ACH KOMM, BITTE, BITTE!", "WARUM NICHT ?", + // 285 "ACH :NACHTS SCHLaeFT ER ?", "NA, HOFFENTLICH KLAPPT DAS MIT DER EINKOMMENSERKLaeRUNG", "ICH MUSS NaeMLICH MIT IHM REDEN", "HEYHOO, GERIPPE !", "VERDAMMT ! EIN SPRECHENDER TOTER !", + // 290 "ERaeHL MAL WIESO HAST DU HIER ANGEHALTEN ?", "UND WOZU SOLLTE DRASCULA EIN MONSTER SCHAFFEN WOLLEN ?", "WIE HEISST DU, LIEBES GERIPPE ?", "EJ, SOLL ICH DIR NICHT VIELLEICHT WAS ZU ESSEN BRINGEN ?", "DU HAST DOCH BESTIMMT EINEN LEEREN MAGEN, HI,HI,HI !", + // 295 "ICH HABE GERADE EINFACH KEINEN BOCK, ZU REDEN", "FI........(BIEP) DICH DOCH IN DEIN BEFI.......(BIEP) KNIE, DU ALTER WI......(BIEP) !", "ICH HABE SIE WIRKLICH GELIEBT, NAJA, GUT, SIe WAR WIRKLICH NICHT DIE HELLSTE VON OSRAM, ABER NOBODY IS PERFECT, STIMMTS ?", "HEY SIE HATTE EINE WAHNSINNSFIGUR, UND WAS WILLST DU MEHR", "NICHTS WIRD MEHR WIE VORHER SEIN. ICH WERDE INS KLOSTER GEHEN UND ELENDIGLICH DAHINSIECHEN.", + // 300 "HIER KANN MICH NICHTS UND NIEMAND MEHR RAUSHOLEN, WEIL...", "VON WEM ? VON WEM ?", "ICH MoeCHTE PIRAT WERDEN !", "ICH MoeCHTE PROGRAMMIERER WERDEN !", "ERZaeHL MIR ETWAS ueBER SIEGFRIED UND DIE NIBELUNGEN", + // 305 "ICH HAB EUCH NIE GESEHEN UND SPIEL JETZT EINFACH WEITER", "WER HAT SICH DENN DIESEN SCHWACHSINN EINFALLEN LASSEN ?", "EINE HANDTASCHE, WIE SIE MEINE OMI HAT", "OH MANN, WIE GUT ICH AUSSEHE ! ", "ICH KoeNNTE MICH GLATT IN MICH VERLIEBEN !", + // 310 "UND WIE SOLL ICH MICH ABSCHLIESSEN ?", "ICH WERDE MICH WOHL ERSTMAL AUFSCHLIESSEN MueSSEN, WAS ?", "HIER STEH ICH GUT", "HAB MICH SCHON", "HALLO ICH", + // 315 "BEI PASSENDER GELEGENHEIT WERDE ICH SIE MIR MAL REINTUN", "ICH SEHE NICHTS BESONDERES", "GUT SO", "UND WIESOOO ?", "ICH KANN NICHT", + // 320 "HALLO DU DA", "DIE GRUFT VON ONKEL DESIDERIUS", "HAAALLO, ONKEL DESIDEERIUUS !", "NEIN, ICH WILL MICH NICHT SCHON WIEDER SCHNEIDEN", "aeHEM,MMM... !", + // 325 "MMMM, LECKER,UaeaeHH !", "JA, HUST,HUST !", "HEY, GUCK MAL, HIER KLEBT EIN KAUGUMMI", "DAS SUPERHANDILY DAS ICH ZU WEIHNACHTEN BEKOMMEN HABE", "GANZ SCHoeN HOCH", + // 330 "TRITT AUF DEN BALKON, JULIA !", "DU BIST DER STERN AN MEINEM FIRMAMENT !", "EJ, TueR, WAS ISS LOSS ?", "HEYHOO, TRANSSYLVANISCHES ZIGARRETTENAUTOMaeTCHEN !", "EIN ZIGARRETTENSPENDERMASCHINCHEN", + // 335 "ICH HAB DA NOCHNE MueNZE DRIN", "NEIN, ICH RAUCHE UND TRINKE NICHT MEHR", "VON JETZT AN WERDE ICH MICH NUR NOCH DEN FRAUEN WIDMEN", "BETRUG ! ES IST GAR NICHTS RAUSGEKOMMEN !", "ENDLICH !", + // 340 "EINE TRUHE, WEITER NICHTS", "HALLO TRUHE, DU HEISST WIE MEINE TANTE TRUDE", "ICH HABE DIE TASCHE VON B.J. GEFUNDEN", "MEIN GOTT, ICH SEH MICH NICHT IM SPIEGEL, ICH BIN EIN VAMPIR !", "....ACH, NEE. ES IST NUR EIN GEMaeLDE", + // 345 "SPIEGLEIN, SPIEGLEIN AN DER WAND, WER IST DER SCHoeNSTE Im GANZEN LAND ?", "ER MACHT MIR NICHT AUF", "GUT. ICH HABE DIE OHRENSToePSEL DRIN", "EIN VON DER UNIVERSITaeT ZU CAMBRIDGE AUSGESTELLTES VAMPIR-JaeGER DIPLOM.", "NEIN, MIR FEHLEN NOCH EINIGE ZUTATEN, ES LOHNT SICH NICHT, IHN ZU WECKEN !", + // 350 "ICH HABE NaeMLICH KEIN GELD", "EINE NORDDEUTSCHE LAMPE", "WIRT! HELFEN SIE MIR !", "DA STAND PLoeTZLICH EIN VAMPIR UND HAT MEINE FREUNDIN MITGENOMMEN.", "ABER WOLLEN SIE MIR DENN NICHT HELFEN ?", + // 355 "TOT? WAS WOLLEN SIE DAMIT SAGEN ?", "aeHEM !", "EIN VAMPIR HAT DAS MaeDEL VON 506 ENTFueHRT !", "DU MUSST MIR HELFEN !", "KANNST DU KEIN BEERDIGUNGSLIED SPIELEN ?", + // 360 "WIE HaeLST DU DAS BLOSS AUS : JEDEN TAG DIE GLEICHEN LIEDER", "AHA, UND WIE HoeRST DU MICH DANN ?", "GIB MIR DIE OHRENSToePSEL", "ACH KOMM, ICH GEB SIE DIR AUCH SOFORT WIEDER", "ACH KOOOOMMM !", + // 365 "AUF WIEDERSEHEN. ICH MUSS EINEN VAMPIR ToeTEN", "", "REDEST DU AUF TRANSSYLVANISCH ODER WAS ?", "WER IST ONKEL DESIDERIUS ?", "WAS SOLL LOS SEIN MIT DIESEM GRAF DRASCULA ?", + // 370 "WER IST DIESER VON BRAUN ?", "UND WARUM MACHT ER ES NICHT ?", " UND WO KANN ICH VON BRAUN FINDEN ?", "ALSO DANKE UND AUF WIEDERSEHEN, SCHLAF SCHoeN", "WIR SOLLTeN BESSER VORHER KLINGELN", + // 375 "SIND SIE PROFESSOR VON BRAUN ?", "UND SIE KoeNNTEN MIR NICHT VERRATEN, WO..... ?", "ICH NEHM IHM NICHT AB, DASS ER HELGE SCHNEIDER IST", "PROFESSOR!", "HELFEN SIE MIR !ES GEHT UM DAS LEBEN MEINER GELIEBTEN !", + // 380 "SCHON GUT, ICH BRAUCHE IHRE HILFE NICHT", "OK. ICH GEHE !", "KEINE ANGST. GEMEINSAM BESIEGEN WIR DRASCULA", "UND WARUM HELFEN SIE MIR DANN NICHT ?", "ICH HABE SIE", + // 385 "ABER ICH HABE SIE DOCH !", "EINVERSTANDEN", "...aeHM,...JA", "ICH GEHE DIREKT NOCHMAL INS AQUARIUM", "ICH BIN SO WEIT, MICH IHREM TEST ZU STELLEN", + // 390 "SCHON GUT, ALTERCHEN. ZAHLTAG !", "SCHON GUT. ICH WOLLTE SOWIESO GERADE GEHEN", "TSCHULDIGE", "WIE FINDEST DU DIESES BUCH? KLAVIERSTueCKE VON TSCHAIKOWSKY", "WIE BRINGT MAN EINEN VAMPIR UM ?", + // 395 "HAT MAN DIR NICHT GESAGT WIE MAN SICH BETTET SO LIEGT MAN ?", "GENAU DAS SAGT MEINE MUTTER IMMER ZU MIR", "WARUM KONNTE DICH DRASCULA NICHT ERLEDIGEN ?", "UND WAS DANN ?", "SUPER ! DA HABEN SIE EIN IMMUNITaeTSMISCH.... !", + // 400 "ALSO ?", "SEHR GUT", "KoeNNEN SIE NOCHMAL WIEDERHOLEN WAS ICH FueR DIESE MISCHUNG BRAUCHE ?", "DANN SATTEL ICH MAL DIE HueHNER UND BESORG ES", "ENTSCHULDIGUNG, WO IST DER KLAVIERSPIELER ?", + // 405 "ICH\247HAB\247SCHON\247ALLE\247ZUTATEN\247FueR\247DIE\247MISCHUNG", "EINE FRAGE : WAS SOLL DAS HEISSEN : REIPERK ALUCSARD?", "SAGEN SIE SCHON...", "UND WO SOLL DIESE GROTTE SEIN ?", "WAS IST ? GABS BEI EUCH KEINE HEXENPROZESSE ?", + // 410 "...ABER WENN ICH NOCH MEHR VAMPIREN BEGEGNE ?", "EIN VAMPIR, DER MICH NICHT DURCHLaeSST", "ER SIEHT WIE AUS WIE JODA, NUR VIEL GRoeSSER", "EJ, JODA. WENN DU MICH DURCHLaeSST, GEB ICH DIR ne mark", "NA GUT, DIR KANN MAL WOHL NICHTS ERZaeHLEN", + // 415 "HALLO, VAMPIR, WAS FueR EINE NACHT, WAS ?", "HAT MAN DIR SCHON MAL GESAGT, DASS DU AUSSIEHST WIE JODA ?", "BIST DU EIN VAMPIR ODER EIN oeLGEMaeLDE ?", "ICH HALT BESSER MEINEN MUND, SONST REGST DU DICH NOCH AUF", "ABGESCHLOSSEN", + // 420 "DIE ELSTER KoeNNTE MIR EIN AUGE RAUSREISSEN, WENN ICHS VERSUCHE !", "ZU !MEIN GOTT, WIE UNHEIMLICH !", "DIE SCHARNIERE SIND ZUGEROSTET", "HIER IST NUR EIN PaeCKCHEN MEHL", "DAS HAT DEN ROST ENTFERNT", + // 425 "ICH HABE EINEN PFLOCK AUS FICHTENHOLZ GEFUNDEN", "ICH NEHM DAS HIER, DAS IST SCHoeN DICK !", "NA, ICH GLAUBE ICH KANN MICH JETZT MAL AUS DIESER DaeMLICHEN VERKLEIDUNG SCHaeLEN", "EINGaeNGE ZU DEN SEITENFLueGELN WEGEN BAUARBEITEN GESPERRT. BENUTZEN SIE BITTE DEN HAUPTEINGANG", "...ER IST BLASS, HAT KOMISCHE ZaeHNE, TRaeGT EIN TOUPET UND EINEN UMHANG...DAS MUSS DRASCULA SEIN !", + // 430 " ES IST B.J. ! B.J. ALLES O.K ?", "ICH WEISS SCHON DASS SIE DUMM IST, ABER ICH BIN SO EINSAM", "DU HAST BESTIMMT KEINEN SCHLueSSEL, STIMMTS ?", "ICH WETTE, DU HAST KEINEN DIETRICH", "GIB MIR DIE HAARSPANGE. ICH MACHS WIE MCGYVER", + // 435 "BEWEG DICH NICHT, ICH BIN SOFORT ZURueCK", "VERDAMMT! ER IST MIR ABGEBROCHEN !", "HEYJEYJEY !UND ICH HAB MICH AUCH RASIERT, ALTER !", "JA, SCHATZ ?", "ES REICHT NICHT", + // 440 "DER KLAVIERSPIELER IST NICHT DA", "EIN TRANSSYLVANISCHER GIN-TONIC", "ICH HABE IMMER NOCH KEIN ZIMMER", "ES SCHEINT DASS ER IN DER BADEWANNE HaeNGENGEBLIEBEN IST UND DANN EINE KNEIPE AUFGEMACHT HAT", "ER IST VOLL WIE EIN RUSSE", + // 445 "DIESES HAAR.... TJA,ES ERINNERT MICH AN JEMANDEN", "ES IST EIN KNoeCHRIGES GERIPPE", "GUCK MAL ! BRAD PITT!", "ER SCHLaeFT. ES WaeRE WIRKLICH SCHADE, IHN ZU WECKEN", "ER IST HaeSSLICHER ALS DIDI HALLERVORDEN", + // 450 "EIN SARG AUS FICHTENHOLZ", "ER WIRD MICH IN LECKERE KLEINE SCHEIBCHEN SCHNEIDEN", "ICH STEH NICHT SO AUF PENDEL. ICH FIND OHRFEIGEN BESSER", "ICH KANN NICHT. ICH HAB HANDSCHELLEN AN", "DAS SIEHT DOCH JEDER, DASS DAS EINE GEHEIMTueR IST", + // 455 "SIE IGNORIEREN MICH", "ACH KOMM !", "LAUT DREHBUCH BEWEGE ich mich, ABER das Spiel war so teuer, dass nichts mehr FueR EIN FITNESS-STUDIO ueBRIG war, also habe ich auch keinen strammen arsch.", "SCHEINT SO, ALS OB ER EIN BISSCHEN LOSE AN DER WAND HaeNGT", "ICH GLAUBE KAUM, DASS SIE MIR NueTZEN WIRD. SIE IST VIEL ZU FEUCHT, UM SIE ANZUZueNDEN", + // 460 "ZUM WESTFLueGEL ?ICH BIN DOCH NICHT BLoeD !WER WEISS WAS MICH DA ERWARTET !", "MIT HueBSCHEN TRANSSYLVANISCHEN MOTIVEN", "", "WIE SCHADE, DASS DAS DA KEIN LECKERER LAMMBRATEN DRIN IST.", "ALS ICH BEIM LETZTEN MAL IN EINEN OFEN GEGUCKT HABE, IST DAS HAUS IN DIE LUFT GEFLOGEN", + // 465 "DAS IST DAS WAPPEN DER TRANSSYLVANISCHEN FUSSBALLMANNSCHAFT", "UND WOZU? SOLL ICH MIR DAS ANS KNIE BINDEN ?", "DIESE SORTE SCHUBLADE LaeSST SICH NICHT oeFFNEN", "ICH MoeCHTE ECHT NICHT WISSEN, WAS ES DA DRIN ZU ESSEN GIBT!", "DAS WIRKT ZIEMLICH IMPRESSIONISTISCH AUF MICH", + // 470 "DIE NACHT VERSCHLUCKT ALLES... WIE UNHEIMLICH, WAS?", "SIE KLEMMT", "DER KoeNIG HAST DU DIR DAS NICHT DENKEN KoeNNEN?", "NEIN, ICH HAB SCHON EINEN ZU HAUSE, DEN ICH FueTTERE UND SO", "EIN REGAL MIT BueCHERN UND ANDEREN SACHEN", + // 475 "UND WEN SOLL ICH UM DIESE UHRZEIT NOCH ANRUFEN?", "\"EINKOMMENSERKLaeRUNG LEICHT GEMACHT\" WIE INTERESSANT!", "ICH HAB SCHON EINS ZU HAUSE.ICH GLAUBE DAS IST WELTWEIT EIN BESTSELLER", "EIN TOTAL NORMALER SCHLueSSEL", "ICH GLAUBE, DER GEHoeRT HIER NICHT HIN", + // 480 "HEY, DIE FRITTEN SEHEN AUS WIE ECKZaeHNE! ICH BIN HIN UND WEG", "das ist wohl echt nicht DER moment, RUMZUNASCHEN, WENN MEINE FREUNDIN IN DEN KLAUEN DER fiesesten ausgeburt der Welt ist.", "WAS FueR EINE RIESENGAUDI DAS MACHT, DAMIT VAMPIRE FERTIGZUMACHEN!", "MAL GUCKEN, OB NOCH EINER AUFTAUCHT", "NEIN, ES MUSS MIT NOCH SO EINEM DRECKIGEN, STINKENDEN UND NERVIGEN VAMPIR WIE VORHIN SEIN", + // 485 "DAS IST DIE ORIGINALPERueCKE VON ELIVS ALS ER SCHON EINE GLATZE HATTE", "MEHL, ABER ICH KANN JETZT KEINE MARKEN NENNEN", "VIELLEICHT EIN ANDERES MAL, OK?", "EINE WUNDERSCHoeNE AXT. ZU SCHADE, DASS GERADE KEIN VAMPIRKOPF IN DER NaeHE IST", "NEIN, IM GRUNDE BIN ICH EIN NETTER MENSCH", + // 490 "DAS IST DAS DEO VON MAGGIE THATCHER, HIHIHI!", "EIN ZIEMLICH HueBSCHER UMHANG", "", "WIE JEDER BELIEBIGE AST EINES BELIEBIGEN BAUMES AN JEDEM BELIEBIGEN ORT IN DER WELT, NICHTS BESONDERES ALSO", "\"UNGLAUBLICH\" EIN SEIL IN EINEM VIDEOSPIEL!", + // 495 "WOZU DAS WOHL NOCH GUT SEIN WIRD...", "EIN SEIL AN EINEM AST ODER EIN AST AN EINEM SEIL, JE NACHDEM WIE MAN DAS SO BETRACHTET", "ES SCHEINT, DAS DIESE ELSTER WAS ueBLES IM SCHILDE FueHRT", "ZISCH AB, ICH SAG IHR NICHTS, MAL SEHEN OB SIE AUSFLIPPT", "SIEHT SO AUS ALS WaeRE SIE TOT, ABER STIMMT NICHT,NE?", + // 500 "FueR DIESES SPIEL WURDEN KEINE TIERE MISSHANDELT ODER GEToeTET", }, { + // 0 "", "C'EST LA DEUXI\212ME PORTE PLUS GRANDE QUE J'AI VUE DANS MA VIE.", "ENFIN, PAS AUTANT QUE \207A.", "ELLE EST BOUCH\202E AVEC DES GROSSES PLANCHES. L'\202GLISE EST PEUT-\210TRE ABANDONN\202E DEPUIS QUELQUES ANN\202ES.", "MAIS JE NE L'AI PAS OUVERTE.", + // 5 "QU'EST-CE QUE JE FAIS? JE L'ARRACHE?", "BONJOUR, PORTE. JE VAIS T'ENCADRER.", "C'EST TROP POUR MOI.", "UNE FEN\210TRE BOUCH\202E AUX GROSSES PLANCHES.", "JE N'ARRIVE PAS.", + // 10 "\200A Y EST.", "ET POURQUOI?", "SALUT, FEN\210TRE! AS-TU QUELQUE CHOSE \205 FAIRE CE SOIR?", "PAS SANS LE PERMIS DE TRAVAUX PUBLIQUES.", "H\202! CETTE FEN\210TRE A SEULEMENT UNE GROSSE PLANCHE...", + // 15 "OH\202! OH\202!-FEN\210TRE!", "BONJOUR, TOI.", "", "JE N'ARRIVE PAS.", "C'EST BIEN O\227 ELLE EST.", + // 20 "", "C'EST UNE TOMBE EN FORME DE CROIX.", "NON, MERCI.", "BONJOUR, LE D\202FUNT: VEUX-TU DES VERMISSEAUX?", "MAIS OUI. COMME EN POLTERGUEIST.", + // 25 "", "", "JE REVIENS EN QUINZE MINUTES.", "D\202FENSE D'AFFICHER.", "", + // 30 "C'EST FERM\202 \205 CL\202.", "J'EN AI D\202J\205 UN.", "", "IL NE R\202POND PAS.", "MAIS NON, C'EST BIEN GAR\202.", + // 35 "C'EST UNE PORTE.", "UN TIROIR DE LA TABLE.", "UNE ARMOIRE SUSPECTE.", "BONJOUR, L'ARMOIRE. \200A VA?", "", + // 40 "", "C'EST UN CAND\202LABRE TR\212S VIEUX.", "IL DOIT \210TRE L\205 D\212S QUE MAZINGUER-Z \202TAIT UNE VIS.", "NON, C'EST UNE RELIQUE.", "C'EST UN JOLI R\202TABLE.", + // 45 "", "HI! HI! HI!", "", "NON.", "", + // 50 "HA! HA! HA! -QUE C'EST BON!", "", "", "", "JE NE VOIS RIEN DE SP\202CIAL.", + // 55 "C'EST FERNAN, LA PLANTE.", "C'EST UNE DES PIQUES DE LA GRILLE.", "H\202! L\205-DESSOUS IL Y A UNE BO\214TE D'ALLUMETTES.", "REGARDE! UN PAQUET DE CLINEX. -ET IL Y A UN TOUT NEUF!", "IL N'Y A RIEN DE PLUS DANS LE SEAU.", + // 60 "C'EST UN AVEUGLE QUI VE VOIT PAS.", "", "", "", "", + // 65 "C'EST UNE GROSSE SOMME D'ARGENT.", "", "", "", "", + // 70 "", "", "", "", "", + // 75 "", "", "", "", "", + // 80 "", "", "", "", "", + // 85 "", "", "", "", "", + // 90 "", "", "", "", "", + // 95 "", "", "", "", "", + // 100 "ELLE N'A RIEN DE SP\220CIAL", "CELA N'A RIEN D'EXTRAORDINAIRE", "QU'EST-CE QU'IL Y A?", "BONJOUR!", "RIEN DE NOUVEAU?", + // 105 "LA FAMILLE, \200A VA?", "-QUELLES CHOSES TU AS!", "MAIS, COMME JE VAIS PRENDRE CELA!", "MA RELIGION ME L'INTERDIT", "CE N'EST PAS MIEUX", + // 110 "BIEN S\352R, MON VIEUX!", "ON NE PARLE PLUS DE CELA", "IMPOSSIBLE", "CELA NE S'OUVRE PAS", "JE NE PEUX PAS TOUT SEUL", + // 115 "SI JE VOULAIS, J' ARRIVERAIS, MAIS \200A ME DONNE DE LA PARESSE", "JE N'Y VOIT PAS UNE RAISON APPARENTE", "C'EST UN CERVEAU ASSEZ BIEN", "ET BIEN CERVEAU, QUE PENSES-TU FAIRE CE SOIR?", "NON, ON DOIT LE GARDER DANS UN ENDROIT \267 L'ABRI DES MUTATIONS DE L'ATMOSPH\324RE", + // 120 "C'EST UN DUR, COMME MON CHEF", "C'EST UN PIEU TR\324S AIGUIS\220", "FID\324LE PIEU POINTUUU, NOBLE CH\322NE TRANSYLVAAAN", "TIENS! JE DOIS COUPER MES ONGLES!", "B.J. EST L\267-DEDANS. ET QUELLE EST MIGNONE CETTE NANA!", + // 125 "ELLE EST FERM\220E TR\324S SOLIDEMENT", "\"CADENAS SOLIDES S.A.\"", "C'EST LE TYPIQUE SQUELETTE QU'ON TROUVE DANS LES GE\342LES DE TOUS LES JEUX", "ON L' EMPLOIE NORMALEMENT POUR INDUIR DU COURANT \220LECTRIQUE AUX APPAREILS QU'Y SONT RACCORD\220S", "C'EST ABSOLUMENT ARTISANAL, CAR LES JAPONAIS LES FONT MAINTENANT DE POCHE", + // 130 "J'AI SEULEMENT VU DANS MA VIE UNE CHOSE SI MOCHE", "LAISSE. JE NE LUI DIS RIEN POUR S'IL SE F\266CHE", "IL SEMBLE ASSEZ RATIONNEL", "C'EST UNE PHOTO DE PLATON EN TRAIN D'\220CRIRE SON DIALOGUE PERDU", "JE NE SUIS PAS DE CEUX QUI PARLENT AUX POSTERS", + // 135 "UN BUREAU ASSEZ MIGNON", "C'EST UN DIPL\342ME DE CHASSE-CHASSE-VAMPIRES HOMOLOGU\220 PAR L'UNIVERSIT\220 D'OXFORD", "C'EST UNE NUIT NOIRE AU PLEINE LUNE", "IL PARA\327T QUE CES VIS NE SONT PAS TR\324S ENFONC\220ES", "N'Y REGARDES PAS, MAIS JE CROIS QU'UNE CAM\220RA OCCULTE ME VISE", + // 140 "UN D\220TECTEUR DE PIEUX ASSEZ MODERNE", "NON, LE LABORATOIRE EST AU DEUXI\324ME \220TAGE", "UNE JOLIE TABLE DE NUIT", "C'EST UN TAS D'ARGENT QUI NE PEUT PAS MANQUER DANS UNE AVENTURE DIGNE DE TEL NOM", "SI J'\220TAIS RICHE. DUBIDOUDUBIDOUDUBIDOUDUBIDOU", + // 145 "CE SONT DES FEUILLES BIZARRES. ON A D\352 LES AMENER DE L'AM\220RIQUE DU SUD OU PAR L\267", "JE NE PENSE PAS QU'ILS VONT ME R\220PONDRE", "C'EST UN JOLI CRUCIFIX EN BOIS. L'IC\342NE N'ARRIVE PAS \267 SAISIR TOUT LA SPLENDEUR DE SA BEAUT\220", "JE PRIE SEULEMENT AVANT DE ME COUCHER", "H\220!, IL PARA\327T QUE CETTE PIQUE S'EST UN PETIT PEU D\220CROCH\220E", + // 150 "TU NE POURRAS TE PLAIGNER APR\324S DU PEU DE PISTES QUE JE TE DONNE", "C'EST UNE PIQUE ASSEZ CONVENTIONNELLE", "ILS SONT MIGNONS, MAIS UN PEU SALES", "NON, NON, ILS NE ME \220COUTERAIENT PAS. HI, HI, HI -QUE C'EST BON!", "\"LA BELLE DORMANTE DU BOIS\" DE TCHA\330KOVSKI, OU TCHA\330FROSKI, OU N'IMPORTE COMMENT DIT-ON ", + // 155 "TR\324S APP\220TISSANT", "JE NE SUIS PAS DE CEUX QUI SUCCENT DES CHEWING-GUMS D\220J\267 M\266CH\220S", "UNE FAUCILLE TR\324S MIGNONE. jE ME DEMANDE O\353 SERA LE MARTEAU?", "\"LES FABRICANTS DE TABAC AVERTISSENT QUE LES AUTORIT\220S SANITAIRES SONT S\220RIEUSEMENT NUISIBLES POUR LA SANT\220 \"", "UNE BOUGIE COURANTE ET NORMALE ET AVEC DE LA CIRE M\322ME", + // 160 "IL FAUT VOIR COMME ELLES LUISENT CES DEUX RUTILANTES MONNAIES!", "IL FAUT VOIR COMME ELLE LUIT CETTE RUTILANTE MONNAIE!", "AVEC \200A JE SERAI IMMUNIS\220 CONTRE LES MORSURES DES VAMPIRES", "NON, CE N'EST PAS ENCORE LE MOMENT", "IL Y A UN BILLET DE MILLE ET DEUX SOUS", + // 165 "ON DIT\"VOUS \322TES PRI\220S DE NE PAS DONNER \267 MANGER AU PIANISTE\"", "L'OMELETTE, 200. DES PETITS POISSONS FRITS, 150, DES POMMES A\330OLI, 225", "LES MEILLEURES HAMBURGERS DE CE C\342T\220 DU DANUBE, SEULEMENT 325", "C'EST UNE JOLIE T\322TE DE MORT AU REGARD TR\324S PER\200ANT -HI, HI, HI, QUE C'EST BON!", "BONJOUR T\322TE DE MORT, TU ME RAPPELLES L'ONCLE HAMLET", + // 170 "J'AI LA HABITUDE DE NE PAS TOUCHER AUX CHOSES QUI ONT V\220CU AUTREFOIS", "C'EST UNE POUBELLE", "C'EST UNE MASSUE POUR LE MATCH DE CE SOIR", "JE ME DEMANDE CE QU'IL AURA DERRI\324RE", "H\220, CE RIDEAU NE BOUGE PAS!", + // 175 "TIENS, QUEL CH\266TEAU SI SOMBRE, H\220? ", "JE NE PEUX PAS, IL EST TROP LOIN POUR M'ENTENDRE", "C'EST UNE TYPIQUE FOR\322T TRANSYLVANE, AVEC DES ARBRES", "MAIS TU NE DIS QUE DES B\322TISES, C'EST UN LIEU OBSCUR!", "CONFISERIE GARCIA, G\266TEAUX ET CHEWING-GUMS.", + // 180 "UNE PORTE TR\324S JOLIE", "ELLE EST FERM\220E", "UN TONNEAU COMPL\324TEMENT FERM\220", "", "QUELLES BESTIOLES SI MIGNONES!", + // 185 "BSSST, BSSST, PETIT CHAT...", "IL NE R\220POND PAS", "LA LUNE EST UN SATELLITE TOURNANT AUTOUR DE LA TERRE AVEC UNE P\220RIODE DE ROTATION DE 28 JOURS", "SALUT, LUNE!, LUN\220E ET \220TOURDIE ", "ELLE EST COMPL\324TEMENT BOUCH\220E AVEC DES GROSSES PLANCHES", + // 190 "C'EST IMPOSSIBLE, CECI NE L'OUVRE PAS NI LE MAJORDOME DE LA T\220L\220", "H\220, IL PARA\327T QUE L'OMBRE DE CE CYPR\324S-LA EST ALLONG\220E", "OH\220! H\342TELIEEER!", "JE VOUDRAIS UNE CHAMBRE", "SAVEZ-VOUS O\353 EST QUE JE PEUX TROUVER UN TEL COMTE DRASCULA?", + // 195 "OUI, QU'EST-CE QU'IL Y A? ", "ET \200A?", "EN... EN V\220RIT\220?", "UNE BONNE QUESTION, JE VAIS VOUS RACONTER MON HISTOIRE, TIENS...", "JE N'AI QUE POUR CINQ MINUTES", + // 200 "JE M'APPELLE JOHN HACKER ET SUIS LE REPR\220SENTANT D'UNE INMOBILI\324RE BRITANNIQUE", "IL PARA\327T QUE LE COMTE DRASCULA VEUT ACHETER DES TERRAINS \267 GIBRALTAR ET ON M'A ENVOY\220 POUR N\220GOCIER L'AFFAIRE", "MAIS JE PENSE QUE DEMAIN DE BONNE HEURE JE RETOURNE AVEC MA MAMAN", "UNE BELLE NUIT, N'EST-CE PAS?", "NON, RIEN", + // 205 "OH\220! PIANISTE!", "UNE BELLE NUIT", "ET EN PLUS, IL NE FAIT PAS FROID", "EH BIEN, RIEN. CONTINUE \267 JOUER", "C'EST \200A", + // 210 "BONJOUR CHEF, \200A VA?", "ET LA FAMILLE?", "IL Y A DE L'AMBIANCE ICI, H\220?", "TANT MIEUX SI JE NE DIS RIEN", "ON EST MIEUX CHEZ-SOI QU'AILLEURS... ON EST MIEUX DANS... H\220? MAIS VOUS N'\322TES PAS TANTE EMMA. MIEUX ENCORE. -SI JE N'AI PAS AUCUNE TANTE EMMA!", + // 215 "OUI, LE MIEN AUSSI. VOUS POUVEZ M'APPELLER COMME VOUS VOULEZ, MAIS SI VOUS M'APPELLEZ JOHNY, JE VIENS COMME LES CHIENS", "OUI, QUELS COUPS QUE J'AI, N'EST-CE PAS? EN FAIT, O\353 SUIS-JE?", "OUI", "A\330E!, A\330E!...", "OH, OUI! BIEN S\352R", + // 220 "EH BIEN! MERCI BEAUCOUP POUR TON AIDE. JE NE TE D\220RANGE PLUS SI TU ME DIS O\353 SE TROUVE LA PORTE, S'IL TE PLA\327T...", "CAR LE COUP A D\352 ME TOUCHER LA CERVELLE ET JE N'Y VOIS GOUTTE", "BAH!, \200A FAIT RIEN. J'AI TOUJOURS UNE DE R\220CHANGE", "OUAH, QUELLE BELLE FEMME! -JE NE M'AVAIS PAS RENDU COMPTE! BIEN S\352R, SANS LES LUNETTES...", "\220COUTE...", + // 225 "ET \200AAAAAA?!", "NE T'EN FAIS PAS B. J., MON AMOUR! JE VAIS TE SAUVER DES GRIFFES DE CELUI-L\267 ", "IL ME CASSE LE NEZ, TIENS!", "AHHH, UN HOMME-LOUP! MEURS MAUDIT!", "OUI, C'EST CELA...", + // 230 "OUI, C'EST CELA... JE CROIS QUE JE VAIS SUIVRE MON CHEMIN. PARDON.. ", "QUOI?", "EH BIEN, EN V\220RIT\220, BIEN PENS\220... JE NE CROIS PAS", "DIS -MOI, OH! \220RUDITE PHILOSOPHE! Y A-T-IL UNE R\220LATION CAUSE-EFFET ENTRE LA VITESSE ET LE LARD?", "\200A VA, \200A VA, ABANDONNE. EN TOUT CAS, JE NE SAIS PAS POURQUOI JE L'AI DIT.", + // 235 "QU'EST-CE QUE TU FAIS ICI EN TRAIN DE PHILOSOPHER AU LIEU DE MANGER DU MONDE?", "QU'EST-CE QUE C'EST QUE \200A?", "\220COUTE, PEX-TU R\220P\220TER CETTE PHRASE DES \"INCLINATIONS PR\220-\220VOLUTIVES\"?", "BIEN S\352R, MON VIEUX. CETTE HISTOITE QUE TU M'AS LACH\220E AVANT. CE QUE JE N'AI PAS BIEN COMPRIS...", "NON, LE MIEUX SERA DE NE RIEN DIRE. CAR SI JE LE TOUCHE LA VEINE.....", + // 240 "OUI, QUE SE PASSE-T-IL?", "OUI, QU'EST-CE QU'IL Y A? ", "EH BIEN, MAINTENANT QU'IL ABORDE LE SUJET JE LUI DIRAI QUE...", "", "EN FAIT, QU'ARRIVERAIT-IL SI UN VAMPIRE SE POURVOYAIT DE LA FORMULE PAR HASARD... ", + // 245 "EH BIEN, RIEN. \220COUTE, CECI NE TE SEMBLE PAS UN RAVAUDAGE QU'ON A MIS EN SC\324NE POUR EN FINIR T\342T AVEC LE JEU? BON, PEUT-\322TRE PAS", "C'EST VIDE!", "POURQUOI TU M'AS VOL\220 MON AMOUR. B.J. SI ELLE N'EST PAS L\267, LA VIE N'AS PAS DE SENS POUR MOI", "SON CERVEAU?!", "CE N'EST POUR RIEN, MAIS JE CROIS QUE TON PETIT MONSTRE M'A F\266CH\220", + // 250 "MA VIERGE, QUE JE RESTE TEL QUE JE SUIS!", "TU N'AURAS PAS LE DERNIER MOT. C'EST S\352R QUE MAINTENANT APPARA\327T SUPER-LOPEZ ET ME LIB\324RE!", "QUELLE MERDE DE JEU DONT MEURT LE PROTAGONISTE!", "UN INSTANT, QU'Y A-T-IL DE MON DERNIER D\220SIR?", "HA! HA! MAINTENANT JE SUIS IMMUNIS\220 CONTRE TOI, D\220MON MAUDIT. CETTE CIGARETTE EST UNE POTION ANTI-VAMPIRES QUI M'A DONN\220 VON BRAUN ", + // 255 "OUI, C'EST S\352R, MAIS TU N'OBTIENDRAS JAMAIS DE MOI LA FORMULE", "JE PEUX SUPPORTER LA TORTURE, ET ENCORE LA CR\220ER ", "NON, S'IL VOUS PLA\327T, JE PARLERAI, MAIS NE ME FAITES PAS \200A!", "EH BIEN. JE T'AI D\220J\267 DIT CE QUE TU VOULAIS SAVOIR. MAINTENANT D\220LIVRE-NOUS, B.J. ET MOI, ET FICHEZ-NOUS LA PAIX", "B.J.! QU'EST-CE QUE TU FAIS L\267? DRASCULA, O\353 EST-IL?", + // 260 "QU'IL EST M\220CHANT! C'EST SEULEMENT PAR-CE QU'IL APPARTIENT \267 LA NOBLESSE QU'IL CROIT POUVOIR EXERCER LE DROIT DE GAMBADE AVEC N'IMPORTE QUI", "\267 BAS L'ARISTOCRATIE ARBITRAIRE!", "DEBOUT LES PAUVRES DU MOOONDE....!", "ET D'APR\324S CE QUE JE VOIS ON T'A ENCHA\327N\220 AVEC CADENAS ET TOUT", "BON, \200A VA. N'AURAS-TU PAS UNE \220PINGLE?", + // 265 "BON, BON, NE T'EN FAIS PAS COMME \200A. JE PENSERAI \267 QUELQUE CHOSE.", "H\220! TAVERNIER!", "COMMENT VA LE MATCH?", "QUI EST-CE?", "NE VOIS-TU PAS QUE DRASCULA EST ICI?", + // 270 "ALORS, ON VA FINIR AVEC LUI, NON?", "SERS -MOI UN COUP...", "RIEN. J'AI OUBLI\220 CE QUE J'ALLAIS TE DIRE", "OU\207BIEN\207TU\207ME\207SERS\207UN\207COUP\207OU\207JE\207ME\207METS\207\267\207JOUER\207DU\207PIANO", "COMBIEN IL RESTE POUR QUE LE MATCH FINISSE?", + // 275 "BON SOIR", "COMME VAS-TU, IGOR? BOSSU? -HI! HI! HI! QUE C'EST BON! ", "QU'EST-CE QU'ON SUPPOSE QUE TU FAIS?", "EH BIEN, NON!", "ALORS, METS-TOI DES LUNETTES", + // 280 "QU'EST QUE C'EST QU'UNE ORGIE SURNATURELLE?", "\200A VA, \200A VA, ARR\322TE-TOI. JE ME FAIS D\220J\267 UNE ID\220E", "NE POURRAIS-TU PAS ME DIRE O\353 SE TROUVE DRASCULA? ", "ALLONS, S'IL TE PLA\327T", "POURQUOI PAS?", + // 285 "AH! MAIS IL DORME PENDANT LA NUIT?", "EH BIEN! QUE LA RENTE SE DONNE BIEN", "CE QUE JE DOIS LUI PARLER", "OH\220! SQUELEEETTE! ", "SAPRISTI! -UN SQUELETTE QUI PARLE!", + // 290 "RACONTE-MOI, COMMENT EST-TU VENU JUSQU'ICI?", "ET POUR QUELLE RAISON VOUDRAIT DRASCULA CR\220ER UN MONSTRE? ", "COMMENT T'APPELLES-TU, AMI SQUELETTE?", "\220COUTE, VEUX-TU QUE JE T'APPORTE QUELQUE CHOSE \267 MANGER?", "TU DOIS AVOIR L'ESTOMAC VIDE. -HI! HI! HI!", + // 295 "VRAIMENT JE N'AI PAS ENVIE DE PARLER MAINTENANT", "MON DIEU! (SIFFLEMENT) J'ESP\324RE QUE...(SIFFLEMENT) ET QUE...(SIFFLEMENT) DEUX FOIS!", "J'AI L'AIM\220E VRAIMENT. \200A VA, JE SUIS D'ACCORD, IL N'\220TAIT PAS UN G\220NIE, MAIS PERSONNE EST PARFAIT, N'EST-CE PAS? ", "DE PLUS, ELLE AVAIT UNE FIGURE \220POUSTOUFLANTE ", "JE NE SERAI PLUS LE M\322ME. JE VAIS M'ENFERMER DANS UN MONAST\324RE POUR VOIR FUIR MA VIE LENTEMENT", + // 300 "RIEN NE POURRA M'EN SORTIR D\220J\267 DE CETTE MIS\324RE PARCE QUE...", "DE QUI? DE QUI?", "JE VEUX \322TRE UN PIRATE", "JE VEUX \322TRE PROGRAMMEUR", "RACONTEZ-MOI QUELQUE CHOSE SUR PELAYO", + // 305 "JE CONTINUERAI \267 JOUER ET J'OUBLIERAI QUE VOUS AI VU ", "QUI AURA PENS\220 \267 CETTE B\322TISE?", "C'EST UN SAC COMME CELUI DE MA GRANDE-M\324RE", "MAIS QUE JE SUIS BEAU!", "PLUS JE ME REGARDE PLUS JE ME PLAIS", + // 310 "ET APR\324S COMMENT JE ME FERME?", "IL FAUDRA QUE M'OUVRE D'ABORD, NON?", "JE SUIS BIEN O\353 JE SUIS", "JE M'AI D\220J\267", "SALUT, MOI!", + // 315 "JE VAIS ME LES METTRE \267 TEMPS", "JE NE VOIS RIEN DE SP\220CIAL", "C'EST BIEN O\353 IL EST", "ET POURQUOI FAIRE?", "JE NE PEUX PAS", + // 320 "SALUT, TOI!", "C'EST LE PANTH\220ON DE L'ONCLE D\220SIR\220", "OH\220! ONCLE D\220SIR\220\220\220\220!", "NON, JE NE VEUX PAS ME COUPER ENCORE UNE FOIS", "HEM! HEM!...!", + // 325 "YAMM, HEMMM, JH!", "OUI, COF,COF!", "TIENS, IL Y A ICI UN CHEWING-GUM COLL\220", "C'EST LE MOVILANI, LE CADEAU QUI M'ONT DONN\220 POUR NO\323L", "QUE C'EST HAUT!", + // 330 "SORS DANS LE BALCON JULIETTE!", "TU EST LA LUMI\324RE QUI \220CLAIRE MON CHEMIN!", "H\220, PORTE! QU'EST-CE QU'IL Y A?", "OH\220! MACHINE \267 TABAC DE TRANSYLVANIIIE", "C'EST UNE MACHINE \267 D\220BIT DE TABAC", + // 335 "J'AI UNE AUTRE MONNAIE L\267 -DEDANS", "NON, J'AI D\220CID\220 ABANDONNER LE TABAC ET L'ALCOOL", "D\324S MAINTENANT JE VAIS ME CONSACRER SEULEMENT AUX FEMMES", "C'EST UN VOL! RIEN EST SORTI!", "ENFIN! ", + // 340 "C'EST \200A, UN BAHUT", "SALUT, BAHUT! TU T'APPELLES COMME MON COUSIN, QUI S'APPELLE RAUL", "J'AI TROUV\220 LE SAC DE B.J..", "MON DIEU! JE N'Y ME VOIS PAS -SUIS UN VAMPIRE!", "...AH, NON! CE N'EST QU'UN DESSIN!", + // 345 "PETIT MIROIR: \"C'EST QUI LE PLUS BEAU DU ROYAUME?\"", "IL NE VEUT PAS M'OUVRIR", "TR\324S BIEN. J'AI MIS LES TAMPONS", "C'EST UN DIPL\342ME DE CHASSE-VAMPIRES HOMOLOGU\220 PAR L'UNIVERSIT\220 DE CAMBRIDGE", "NON, IL ME FAUT ENCORE D'INGR\220DIENTS, PAS LA PEINE DE LUI REVEILLER", + // 350 "C'EST QUE JE SUIS FAUCH\220", "C'EST UNE LAMPE BRITANNIQUE", "TAVERNIER! -AIDEZ-MOI!", "UN VAMPIRE EST APPARU ET IL A ENLEV\220 MA FIANC\220E", "MAIS, N'ALLEZ VOUS PAS M'AIDER?!", + // 355 "MORTE? QUE VOULEZ-VOUS DIRE?", "HEM!", "UN VAMPIRE A S\220QUESTR\220E LA FILLE DE LA 506!", "IL FAUT QUE TU M'AIDES!", "TU NE SAIS PAS JOUER AUCUNE PI\324CE DES INHUMAINS?", + // 360 "COMMENT TU TE SUPPORTES TOUT LE JOUR EN JOUANT LA M\322ME CHOSE?", "ET ALORS, POURQUOI TU M'\220COUTES?", "PR\322TE-MOI LES TAMPONS", "ALLONS! JE VAIS TE LES REDONNER TOUT DE SUITE", "ALLOOONSSS..." + // 365 "AU REVOIR. JE DOIS TUER UN VAMPIRE", "", "EN QUOI TU PARLES! EN TRANSYLVAN?", "C'EST QUI L'ONCLE D\220SIR\220?", "MAIS QU'EST-CE QU'IL Y A AVEC CE DRASCULA-L\267?", + // 370 "QUI EST-CE CE VON BRAUN-L\267?", "ET POURQUOI IL NE LE FAIT PAS?", "ET O\353 PEUX-JE TROUVER VON BRAUN?", "EH BIEN, MERCI ET AU REVOIR. QUE TU LA DORMES BIEN", "IL VAUDRA MIEUX SONNER D'ABORD", + // 375 "LE PROFESSEUR VON BRAUN, C'EST VOUS?", "ET NE POUVEZ-VOUS PAS M'INDIQUER O\353 JE PEUX...?", "JE NE CROIS PAS QU'IL SOIT LE NAIN GANYM\324DE", "PROFESSEUR!", "AIDEZ-MOI! -LA VIE DE MA BIEN AIM\220E DEPENDE DE VOUS!", + // 380 "\200A VA, JE N'AI PAS BESOIN DE VOTRE AIDE", "D'ACCORD. JE M'EN VAIS", "N'AIES PAS PEUR. NOUS ALLONS VAINCRE DRASCULA ENSEMBLE", "ALORS, POURQUOI NE M'AIDEZ VOUS PAS?", "JE LES AI", + // 385 "OUI, JE LES AI!", "D'ACCORD", "...ER ...OUI", "JE VIENS POUR RENTRER DANS CETTE CABINE", "SUIS PR\322T \267 CONFRONTER VOTRE \220PREUVE", + // 390 "\200A VA, VIEUX RIDICULE. JE SUIS VENU CHERCHER MON ARGENT", "NON, RIEN. JE M'EN ALLAIS D\220J\267", "PARDONNE-MOI", "CE LIVRE T'INT\220RESSE? AVEZ-VOUS DES PARTITIONS DE TCHA\330KOVSKY?", "COMMENT PEUX-JE TUER UN VAMPIRE?", + // 395 "ON NE T'A JAMAIS DIT QUE C'EST MAUVAIS DORMIR DANS UNE MAUVAISE POSTURE?", "EH BIEN, C'EST \200A QUE MA M\324RE ME DIT TOUJOURS", "POURQUOI DRASCULA N'A PU JAMAIS TE TUER?", "ET QU'EST-CE QUE S'EST PASS\220?", "C'EST SUPER! -AVEZ-VOUS UNE POTION D'IMMUNIT...!", + // 400 "ALORS?", "TR\324S BIEN", "POUVEZ-VOUS ME R\220P\220TER CE DONT J'AI BESOIN POUR CETTE POTION?", "EH BIEN! JE PARS RAPIDE LE CHERCHER", "\220COUTEZ, QU'EST-CE QUE C'EST PASSE\220 AVEC LE PIANISTE?", + // 405 "J'AI\207D\220J\267\207TOUS\207LES\207INGR\220DIENTS\207DE\207CETTE\207POTION", "UNE QUESTION: QU'EST.CE QUE C'EST CELA D' ALUCSARD ETEREUM?", "PARLEZ, PARLEZ... ", "ET C'EST O\353 CETTE GROTTE?", "QU'EST-CE QU'IL Y A? N'AVIEZ VOUS PAS UN TRIBUNAL?", + // 410 "...MAIS ...ET SI JE TROUVE ENCORE DES VAMPIRES?", "C'EST UN VAMPIRE QUI M'EMP\322CHE L'ENTR\220E", "IL RESSEMBLE \267 YODA, MAIS C'EST UN PEU PLUS GRAND", "H\220, YODA! SI TU ME LAISSES PASSER JE TE DONNE UNE MONNAIE", "BON, \200A VA. ON NE PEUT RIEN TE DIRE", + // 415 "H\220, VAMPIRE! BELLE NUIT, N'EST-CE PAS?", "ON T'A D\220J\267 DIT QUE TU RESSEMBLES \267 YODA?", "ES-TU UN VAMPIRE OU UNE PEINTURE \267 L'HUILE?", "IL VAUX MIEUX NE RIEN TE DIRE, POUR SI TU TE F\266CHES", "C'EST FERM\220E \267 CL\220", + // 420 "LA PIE POURRAIT M'ARRACHER UN OEIL SI J'EN ESSAIE!", "C'EST FERM\220E! -MON DIEU, QUELLE PEUR!", "LES GONDS SONT OXYD\220S", "L\267-DEDANS IL Y A SEULEMENT UN POT AVEC DE LA FARINE", "CECI A ENLEV\220 L'OXYDE", + // 425 "J'AI TROUV\220 UN PIEU DE PIN", "JE PRENDRAI CELUI-CI QUI EST PLUS GROS", "BON, JE CROIS QUE JE PEUX ME D\220BARRASSER MAINTENANT DE CE STUPIDE D\220GUISSEMENT", "LE PASSAGE AUX DONJONS EST FERM\220 \267 CAUSE DES TRAVAUX. VOUS \322TES PRI\220S D'UTILISER L'ENTR\220E PRINCIPALE. EXCUSEZ LES ENNUIES", "...IL EST P\266LE. AVEC DE GROSSES DENTS. IL A UN TOUPET ET UTILISE UNE CAPE... -C'EST S\352REMENT DRASCULA!", + // 430 "C'EST B.J.! B.J. TU EST BIEN?", "OUI, JE SAIS QU'ELLE EST B\322TE, MAIS JE SUIS SEUL", "N'AURAS-TU PAS UNE CL\220 PAR L\267, N'EST-CE PAS?", "N'AURAS-TU PAS UN ROSSIGNOL, PAR HASARD?", "DONNE-MOI UNE \220PINGLE. JE VAIS FAIRE COMME MCGYVER", + // 435 "NE BOUGES PAS, JE REVIENS TOUT DE SUITE", "ZUT! -S'EST CASS\220E!", "OL\220\220\220! ET EN PLUS JE ME SUIS RAS\220, COLL\324GUE!", "OUI, MON AMOUR?", "IL N'ARRIVE PAS", + // 440 "LE PIANISTE N'EST PAS L\267", "UN COKTAIL TRANSYLVAN", "JE N'AI PAS UNE CHAMBRE", "SELON PARA\327T, IL EST REST\220 COINC\220 DANS LA BAIGNOIRE ET D\220CIDA ALORS D'OUVRIR UN BAR ", "IL EST SO\352L COME UNE CUVE DE CUBA", + // 445 "CE CHEVEU... LE CAS CE QU'IL ME RAPPELLE QUELQU'UN", "C'EST UN SQUELETTE OSSEUX", "REGARDE! MIGUEL BOS\220!", "IL DORME. CE SERAIT DOMMAGE LE R\220VEILLER", "IL EST PLUS MOCHE QU'\220MILE DE PAZ", + // 450 "UN CERCUEIL EN BOIS DE PIN", "IL VA ME COUPER EN PETITES TRANCHES, COMME UN SAUCISSON", "JE N'AIME PAS LES PENDULES. JE PR\220F\324RE LES ARTICHAUTS", "MES MAINS SONT EMMENOTT\220ES. JE N'ARRIVERAI PAS", "IL SAUTE AUX YEUX QUE C'EST UNE PORTE SECR\324TE", + // 455 "ILS M'IGNORENT", "C'EST BIEN!", "DANS LE SCRIPT IL BOUGEAIT, MAIS LE JEU A SURPASS\220 LE BUDGET ET ON N'A PAS PU ME PAYER UN GYMNASE POUR ME METTRE EN FORME. DONC, POINT DU TOUT", "ELLE PARA\327T UN PEU D\220TACH\220E DU MUR", "JE NE CROIS PAS POUVOIR M'EN SERVIR. ELLE TROP HUMIDE POUR L'ALLUMER", + // 460 "\267 L'AILE OUEST? -M\322ME PAS EN FOU ACHEV\220! -VA SAVOIR QU'AURAIT-IL L\267-BASI!", "IL Y A DE JOLIS MOTIFS TRANSYLVANS", "", "QUEL DOMMAGE NE PAS AVOIR TROUV\220 L\267-DEDANS UN PETIT AGNEAU EN TRAIN DE SE R\342TIR!", "LA DERNI\324RE FOIS QUE J'AI OUVERT UN FOURNEAU LA MAISON A VOL\220 EN \220CLATS", + // 465 "C'EST L'ENSEIGNE DE L'\220QUIPE DE FOOT-BALL DE LA TRANSYLVANIE", "ET POURQUOI FAIRE? POUR ME LA METTRE \267 LA T\322TE?", "JE NE CROIS PAS QUE CES TIROIRS SOIENT DE CEUX QUI S'OUVRENT", "JE NE VEUX PAS SAVOIR LA NOURRITURE QU'IL Y AURA L\267-DEDANS!", "J'AI L'IMPRESSION QUE C'EST DE L'IMPRESSIONNISME", + // 470 "LA NUIT S'EMPARE DE NOUS TOUS... QUELLE PEUR, N'EST-CE PAS?", "ELLE EST BOUCH\220E", "C'EST LE ROI. NE L'AVAIT-TU PAS IMAGIN\220?", "NON, J'EN AI D\220J\267 UN CHEZ MOI ET JE LUI DONNE \267 MANGER EN PLUS", "UN PLACARD AVEC DES LIVRES ET D'AUTRES CHOSES", + // 475 "ET QUI J'APPELLE \267 CES HEURES-L\267?", "\"COMMENT FAIRE LA D\220CLARATION D'IMP\342TS\" COMME C'EST INT\220RESSANT!", "J'AI D\324J\267 UN CHEZ MOI. JE CROIS QUE C'EST UN BEST-SELLER MONDIAL", "UNE CL\220 COMPL\324TEMENT NORMALE", "IL ME SEMBLE QUE CELLE-CI N'EST PAS D'ICI", + // 480 "H\220! CE SONT DES FRITES SOUS FORME DE DENT CANINE! \200A ME PLA\327T", "JE NE CROIS PAS QU'IL SOIT LE MEILLEUR MOMENT POUR MANGER DES GOURMANDISES, AVEC MA FIANC\220E AUX MAINS DE L'\322TRE LE PLUS MAUVAIS QU'UNE M\324RE A PU ACCOUCH\220", "COMME JE SUIS BIEN EN TUANT DES VAMPIRES AVEC CELA!", "VOYONS SI APPARA\327T T\342T UN AUTRE", "NON, IL FAUT QU'IL SOIT AVEC UN SALE ET PUANT VAMPIRE, COMME CELUI QUI J'AI TU\220 AVANT", + // 485 "C'EST L'AUTHENTIQUE PERRUQUE QU'ELVIS AVAIT UTILIS\220E QUAND IL EST DEVENU CHAUVE", "C'EST DE LA FARINE, MAIS JE NE PEUX PAS DIRE DES MARQUES", "PEUT-\322TRE DANS UN AUTRE MOMENT, D'ACCORD?", "C'EST UNE HACHE MAGNIFIQUE, DOMMAGE DE NE PAS POUVOIR SE PAYER AUCUNE T\322TE DE VAMPIRE PAR L\267", "NON. JE SUIS UNE BONNE PERSONNE AU FOND", + // 490 "C'EST LE D\220ODORANT DE LA THACHER-HI!HI!HI!", "C'EST UNE CAPE ASSEZ MIGNONE", "", "TOUT COMME LES BRANCHES DE TOUS LES ARBRES DU MONDE, C'EST-\267-DIRE SANS RIEN DE PARTICULIER", "OH! C'EST INCROYABLE! -UNE CORDE DANS UNE AVENTURE DESSIN\220E!", + // 495 "JE ME DEMANDE \267 QUOI SERVIRA-T-ELLE...?", "UNE CORDE ATTACH\220E \267 UNE BRANCE OU UNE BRANCHE ACROCH\220E \267 UNE CORDE, \200A D\220PEND DU POINT DE VUE", "IL PARA\327T QUE CETTE PIE \267 DE TR\324S MAUVAISES INTENTIONS", "TAIS-TOI! JE NE LA DIS RIEN, POUR SI ELLE SE F\266CHE", "ELLE SEMBLE MORTE, MAIS C'EST UNE MENSONGE", + // 500 "IL N'Y A AUCUN ANIMAL ABiM\220 DANS LA PRODUCTION DE CE JEU", }, { + // 0 "", "\220 la seconda porta pi\243 grande che ho vista nella mia vita", "Forse.., no", "\202 chiusa con tabelle. La chiesa deve essere abbandonata da tanti anni fa.", "Ma se non la ho aperta", + // 5 "Che faccio? La tolgo?", "Ciao porta. Vado a farti una cornice", "Troppo per me", "una finestra chiusa con tabelle", "Non ce la faccio", + // 10 "Eccolo", "E per che?", "Ciao finestra. Hai qualcosa da fare stasera?", "No senza il permesso del Ministero dei Lavori Pubblici", "-eh! quella finestra ha soltanto una tabella..", + // 15 "-Eooooo! -Finestra!", "Tu, ciao", "", "Non ce la faccio", "Va bene dov'\202 ", + // 20 "", "\220 una tomba in forma di croce", "Non grazie", "Ciao morto. Vuoi delle patatine a forma di vermi?", "Si. Come in Poltergueist.", + // 25 "", "", "Torno in quindici minuti", "Vietato affigere manifesti", "", + // 30 "\220 chiuso con la chiave", "Ne ho gi\240 uno.", "", "Non risponde.", "No, \202 ben parcheggiato.", + // 35 "\220 una porta.", "Un casseto del tavolino.", "Un sospettoso armadio.", "Ciao armadio. Come va?.", "", + // 40 "", "\220 un candelabro molto vecchio.", "Deve essere qu\241 da che Mazinguer-Z era una vite.", "No.\220 una reliquia.", "\220 una bella pala.", + // 45 "", "Hi, hi, hi", "", "No.", "", + // 50 "Ha,ha,ha . - che buono!", "", "", "", "Non vedo niente di speciale.", + // 55 "Ferdinan, la pianta.", "\220 una degli spunzoni della cancellata.", "-Eh! Qu\241 sotto c'\202 una scatola di cerini", "-Guarda! un pacco di fazzoletti. -E c'\202 ne uno senza utilizzare!.", "Non c'\202 niente di pi\243 nel secchio.", + // 60 "\220 un cieco che non vede", "", "", "", "", + // 65 "\220 una abbondante quantit\240 di soldi", "", "", "", "", + // 70 "", "", "", "", "", + // 75 "", "", "", "", "", + // 80 "", "", "", "", "", + // 85 "", "", "", "", "", + // 90 "", "", "", "", "", + // 95 "", "", "", "", "", + // 100 "NON HA NULLA DI SPECIALE", "NON \324 MICA SPECIALE", "TU! CHE C'\324 ?", "CIAO", "NIENTE NUOVO?", + // 105 "-COME VA LA FAMIGLIA?", "- MA CHE STAI A DIRE?", "-MA COME VADO A PRENDERE QUELLA COSA!", "\324 VIETATO DALLA MIA RELIGIONE", "MEGLIO DI NO", + // 110 "-COME NO!", "NEANCHE PARLARNE", "IMPOSSIBILE", "QUESTO NON SI APRE", "IO SOLO NON CE LA FACCIO", + // 115 "SE VORREI POTREI, MA MI FA PIGRIZIA", "NON TROVO UNA BUONA RAGIONE", "\324 UN CERVELLO ABBASTANZA CARINO", "ALLORA, CERVELLO, CHE NE PENSI DI FARE STASERA?", "NO, DEVE CONSERVARSI IN UN POSTO CHIUSO ALLA AZIONE MUTANTE DELLA ATMOSFERA", + // 120 "\324 COS\336 DURO, COME IL MIO CAPO", "UNA TALEA MOLTO AFFILATA", "FEDELE TALEA AFFILATAAA, NOBILE ROVERE TRANSILVANOOO", "-INSOMMA, DEVO TAGLIARMI LE UNGHIE!", "-LA, DENTRO, C'\324 B.J,E MAMMA MIA, CHE FIGA!", + // 125 "\324 CHIUSA SOTTO LUCCHETTO E CATENACCIO", "\"LUCCHETTO E CATENACCIO S.A\"", "\324 IL TIPICO SCHELETRO CHE C'\324 IN TUTTE LE CARCERE DI TUTTI I VIDEO-GIOCHI", "SI UTILIZA PER DARE ELETRICIT\267 AGLI APARATTI COLLEGATI A LUI", "\324 TOTALMEN11TE ARTIGIANO, PERCHE I GIAPONESSI LI FANNO TASCABILI", + // 130 "NELLA MIA VITA, HO VISTO SOLTANTO UNA VOLTA UNA COSA COS\336 BRUTTA", "SMETILLA. NON DICO NULLA PER SE SI ARRABBIA", "SEMBRA ABBASTANZA RAZIONALE", "\324 UNA FOTO DI PLATONE SCRIVENDO IL SUO DISCORSO PERSO", "NON SONO DI QUELLI CHE PARLANO CON POSTERS", + // 135 "UNA SCRIVANIA MOLTO CARINA", "\324 UN DIPLOMA DI CACCIA-CACCIA-VAMPIRI OMOLOGATO DALLA UNIVERSIT\267 DI OXFORD", "\324 NOTTE BUIA CON LUNA PIENA", "SEMBRA CHE QUESTE VITI NON SONO MOLTO AVVITATE", "NON GUARDARE, MA CREDO CHE UNA TELECAMERA NASCOSTA MI ST\267 REGISTRANDO", + // 140 "UN DETETTORE DI TALEE MOLTO MODERNO", "NO, IL LABORATORIO SI TROVA NEL SECONDO PIANO", "UN BEL TAVOLINO", "\324 UN SACCO DI SOLDI CHE NON PUO MANCARE IN UNA AVVENTURA CHE SIA COS\336 IMPORTANTE", "IF I WERE A RICHMAN, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", + // 145 "SONO DELLE STRANE FOGLIE. DEVONO AVERLE PORTATE DALLA SUDAMERICA", "NON CREDO CHE SIA RISPOSTO", "\324 UN BEL CROCIFISSO DI LEGNO. LA ICONA NON RIFLESSA TUTTA LA SUA BELLEZA", "IO SOLO PREGO PRIMA DI ANDARMENE AL LETTO", "-EH, SEMBRA CHE QUESTO SPUNZONE \324 UN PO ALLENTATO!", + // 150 "E POI TI LAMENTI PERCHE NON TI DO SUGGERIMENTI", "\324 UNO SPUNZONI ABBASTANZA CONVENZIONALE", "SONO CARINI, SEBBENE HANNO PARECHIO POLVERE", "NO, NON MI SENTIRANO; HI,HI,HI -CHE BUONO!", "\"LA BELLA ADDORMENTATA DEL BOSCO\" DI CIAIKOSKY, O CIOIFRUSKY, O COME SI DICA", + // 155 "MOLTO APPETITOSA", "NO, IO NON SONO DI QUELLI CHE SI METTONO IN BOCCA GOMME USATE", "UNA FALCE MOLTO CARINA. MI DOMANDO DOVE CI SAR\265 IL MARTELLO", "\"I FABBRICANTI DI TABACCO AVVERTONO CHE IL TABACCO NUOCE GRAVEMENTE LA SALUTE\"", "UNA CANDELA NORMALE, ANZI CON CERA", + // 160 "MAMMA MIA COME BRILLANO QUESTE DUE BRILLANTI MONETE", "MAMMA MIA COME BRILLA QUESTA BRILLANTE MONETA", "CON QUESTO SAR\220 IMMUNE AI MORSI DEI VAMPIRI", "NO, ANCORA NON \220 IL MOMENTO", "C'E UN BIGLIETTO DI DIECIMILA E UN PAIO DI MONETE", + // 165 "DICE \"SI PREGA DI NON BUTTARE CIBO AL PIANISTA\"", "OMELETTA, 3.000 .PESCI FRITI, 2.000,PATATINE, 2.500", "LE MIGLIORI HAMBURGUER A QUESTA PARTE DEL DANUBIO, SOLTANTO PER 4.000", "UN BEL TESCHIO, CON UNO SGUARDO MOLTO PENETRANTE. HI,HI,HI, CHE BUONO!", "CIAO TESCHIO, MI RICORDI AL ZIO DI HAMLET", + // 170 "HO L'ABITUDINE DI NON TOCCARE COSE CHE SIANO STATE VIVE", "UN CESTINO", "UN TOTOCALCIO PER LA PARTITA DI STASERA", "MI DOMANDO CHE CI SAR\265 DIETRO", "-EH, QUESTA TENDE NON SI MUOVE!", + // 175 "MADONNA, CHE TETRO \220 QUESTO CASTELLO.", "NON CE LA FACCIO, \220 TROPPO LONTANO PER SENTIRMI", "UN TIPICO BOSCO TRANSILVANO, CON GLI ALBERI", "-MA CHE SCIOCHEZZE DICI, \220 MOLTO BUIO", "PASTICCERIA ROSSI. DOLCI E GOMME", + // 180 "UNA PORTA MOLTO BELLA", "\220 CHIUSA", "UN FUSTO COMPLETAMENTE CHIUSO", "", "CHE ANIMALETTI COS\326 BELLI!", + // 185 "BSSSSSS,BSSSS, GATINO..", "NON RISPONDE", "LA LUNA \220 UN SATELLITE CHE GIRA INTORNO LA TERRA CON UN PERIODO DI RIVOLUZIONE DI 28 GIORNI", "CIAO, LUNA LUNETTA", "\220 TOTALMENTE CHIUSA CON TABELLE", + // 190 "IMPOSSIBILE. QUESTO, NON LO APRE N\220 HOUDINI", ".EH, SEMBRA CHE L'OMBRA DEL CIPRESSE \220 ALUNGATA", "-EOOO, BARISTA", "VORREI UNA CAMERA", "SA DOVE POSSO TROVARE A UNO CHE SI FA CHIAMARE CONDE DRASCULA", + // 195 "SI, PER CHE?", "COME MAI?", "DA.....DAVVERO?", "BUONA DOMANDA, GLI RACONTER\220 LA MIA STORIA, SENTA..", "SONO SOLTANTO CINQUE MINUTI", + // 200 "MI CHIAMO JOHN HACKER, E SONO RAPPRESENTANTE DI UNA IMMOBILIARIE BRITANICA", "MI HANNO DETTO CHE IL CONDE DRASCULA VUOLE COMPRARE DEI TERRENI A GIBRALTAR, E SONO QU\326 PER NEGOZIARE LA VENDITA", "MA CREDO IO CHE DOMANI PRESTO TORNO CON LA MAMMA", "BELLA NOTTE, VERO?", "NO, NIENTE", + // 205 "EOOOO, PIANISTA", "BELLA NOTTE", "ANZI, NON FA FREDDO", "ALLORA... TI LASCIO CONTINUARE A SUONARE", "VA BENE", + // 210 "CIAO CAPO, COME VA?", "E LA FAMIGLIA?", "C'\220 GENTE QU\326, EH?", "MEGLIO NON DICO NULLA", "SI ST\265 MEGLIO A CASA CHE A NESSUN POSTO... -EH? MA SE LEI NON \220 LA ZIA EMMA. ANZI. SE IO NON HO NESSUNA ZIA EMMA.", + // 215 "SI, IL MIO ANCHE. LEI PUO CHIAMARMI COME GLI PARA, MA SE MI CHIAMA JOHNY, VENGO SUBITO COME I CANI", "SI, CHE SPIRITOSO SONO, VERO? MAA.. DOVE MI TROVO?", "SI.", "MANAGIA..", "OH, SI. COME NO", + // 220 "ALLORA GRAZIE MILE PER DARMI IL TUO AIUTO. NON TI DISTURBO PI\351 . SE MI DICI DOV'\220 LA PORTA, PER FAVORE...", "PERCHE LA BOTTA HA DOVUTO DAGNARMI IL CERVELLO E NON VEDO UNA MADONNA", "NON FA NIENTE. SEMPRE NE PORTO ALTRI IN PI\351 ", "-UFFA, CHE FIGA!- NON MI ERA ACCORTO, CERTO, SENZA GLI OCCHIALI", "SENTI..", + // 225 "COME MAI...?!", "NON TI PREOCUPARE B.J., AMORE MIO! TI LIBERER\220 DA QUEL TIZIO", "MI HA FATTO ARRABBIARE", ".AHHH, IL LUPO- MANNARO! -MUORE MALDITO!", "BENE, CREDO...", + // 230 "BENE, CREDO CHE PROSSIGUER\220 LA MIA STRADA. PERMESSOO..", "-COME?", "LA VERIT\267, PENSANDOCI MEGLIO, CREDO DI NO", "DIMI, OH ERUDITO FILOSOFO, C'\324 QUALCUNA RELAZIONE CAUSA-EFETTO TRA LA VELOCIT\267 E LA PANCETA?", "VA BENE, SMETTILA. COMUNQUE NON SO PERCHE HO DETTO QUESTO", + // 235 "COSA FAI QU\336 FILOSOFANDO, CHE NON STAI MANGIANDO GENTE?", "COME MAI?", "SENTI, PUOI RIPETERE QUELLO DI \"INCLINAZIONI PRE-EVOLUTIVE\"?", "SI SI, QUELLA STORIA CHE MI HAI RACCONTATO PRIMA. PERCHE NON HO CAPITO MOLTO BENE.", "NO, MEGLIO NON DICO NULLA, NON VOGLIO METTERE IL COLTELLO NELLA PIAGA...", + // 240 "SI, MI DICA?", "SI, CHE SUCCEDE?", "AH, ADESSO CHE CITA IL SOGGETTO GLI DIR\343 CHE...", "", "AH.., COSA SUCCEDEREBBE SE UN VAMPIRO PRENDEREBBE LA RICETA..", + // 245 "NIENTE. SENTI, QUESTO SEMBRA UN POSTICCIO MESSO SUL COPIONE PER FINIRE PRESTO IL VIDEO-GIOCO?. BENE, FORSE, NO", "\324 VUOTO!", "PERCHE HAI RUBATO IL MIO AMORE, B.J., SENZA LEI LA MIA VITA NON HA SENSO", "-IL SUO CERVELLO?!", "NO NIENTE, MA CREDO CHE ALLA FINE IL TUO PICCOLINO MOSTRO MI HA FATTO ARRABBIARE", + // 250 "SANTA MADONNA AIUTAMI!", "NON TE LA CAVEREI. SICURO CHE APPARISCE SUPERMAN E MI LIBERA!", "CHE SCHIFFO DI VIDEO-GIOCO NEL CUI MUORE IL PROTAGONISTA", "UN ATTIMO, COSA SUCCEDE COL MIO ULTIMO DESIDERIO?", "-HA,HA! ORA SONO IMMUNIZZATO CONTRO TE, MALEDETTO DEMONIO. QUESTA SIGARETTA \324 UNA POZIONE ANTI-VAMPIRI CHE MI HA DATTO VON BRAUN", + // 255 "SI CERTO. MA NON RIUSCIRAI MAI A FARMI DIRTI LA RICETA", "POSSO SOPPORTARE LA TORTURA, ANZI CREARLA", "-NO, PER FAVORE!- PARLER\220, MA NON FARMI QUESTO!", "BENE, TI HO GI\267 DETTO QUELLO CHE VOLEVI SAPERE. ORA LIBERA B.J. E ME, E LASCIACI PERDERE", "-B.J-.! COSA FAI QU\336? DOV'\324 DRASCULA?", + // 260 "CHE PERVERSO! SOLTANTO PERCH'\324 NOBILE PENSA CHE HA IL DIRITTO SU TUTTI QUANTI", "ABASSO LA ARISTOCRAZIA!", "FORZA I POVERI DEL MONDOOO...", "E QUELLO CHE VEDO \324 CHE TI HA INCATENATO ANZI CON LUCCHETTO", "O.K., NON AVRAI UNA FONCINA?", + // 265 "BENE BENE, NON PRENDERTELA COS\336, CI PENSER\220 IO", "EH, BARISTA", "COME VA LA PARTITA?", "CHI?", "MA NON VEDI CHE DRASCULA \324 QU\336?", + // 270 "ANDIAMO A UCCIDERLO", "SERVIMI UN DRINK..", "NIENTE. HO DIMENTICATO COSA VOLEVO DIRTI", "O\247MI\247SERVI\247UN\247DRINK\247O\247MI\247METTO\247A\247SUONARE\247IL\247PIANOFORTE", "QUANTO MANCA PER LA FINE DELLA PARTITA?", + // 275 "BUONA SERA", "COME VA IGOR? VAI CON LA GOBBA? -HI,HI,HI,CHE BUONO!", "CHE STAI FACENDO?", "NO", "ALLORA METTITI GLI OCCHIALI", + // 280 "COSA \324 QUELLA DELLA ORGIA SOPRANNATURALE?", "VA BENE, NON COTINUARE, MI FACCIO IDEA", "NON POTREI DIRMI DOV'\324 DRASCULA?", "DAIII, PER FAVORE", "PER CHE NO?", + // 285 "AH, MA DORME DI NOTTE?", "BENE, ALLORA IN BOCCA IL LUPO CON I REDDITI", "DEVO PROPRIO PARLARE CON LUI", "EOOOO, SCHELETROOO!", "OH DIO! UN MORTO CHE PARLA!", + // 290 "RACCONTAMI. COME MAI SEI VENUTO QU\336?", "E PER CHE DRASCULA VUOLE CREARE UN MOSTRO?", "COME TI CHIAMI, AMICO SCHELETRO?", "SENTI, NON VUOI QUALCOSA DA MANGIARE?", "DEVI AVERE LO STOMACO VUOTO .- HI,HI,HI!", + // 295 "LA VERIT\267 \324 CHE NON MI VA DI PARLARE ADESSO", "VANFFAN ( BIP ) FIGLIO DI .......( BIIP ).. VAI A FARE....( BIIIP )", "IO LA AMAVO DAVVERO. O.K., SONO D'ACCCORDO CHE NON ERA MOLTO INTELLIGENTE, MA NESSUNO \324 PERFETTO, NO?", "ANZI, AVEVA UN CORPO DA PAURA", "ORMAI NON SAR\343 PI\353 QUELLO DI PRIMA .MI RICHIUDER\343 IN UN MONASTERO, E LASCIER\343 LA MIA VITA PERDERE", + // 300 "NIENTE POTR\267 FARMI USCIRE DI QUESTA MISERIA PERCHE...", "DI CHI? DI CHI?", "VOGLIO ESSERE PIRATA", "VOGLIO ESSERE PROGRAMMATORE", "RACCONTAMI QUALCOSA SU GARIBALDI", + // 305 "CONTINUER\343 A GIOCARE E DIMENTICHER\343 CHE VI HO VISTI", "MA CHI AVR\267 PENSATO QUESTA SCIOCHEZZA!", "\324 UNA BORSA COME QUELLA DI MIA NONNA", "MA CHE FIGO SONO!", "PI\353 MI VEDO PI\353 MI PIACCIO", + // 310 "E POI COME MI CHIUDO?", "PRIMA DEVO APRIRMI, VERO?", "ST\343 BENE DOVE SONO", "MI HO GI\267 PRESSO", "CIAO IO", + // 315 "ME GLI INDOSSER\343 QUANDO SIA LA OCCASIONE OPORTUNA", "NON VEDO NIENTE DI SPECIALE", "\324 BENE DOV'\324", "E PER CHE?", "NON CE LA FACCIO", + // 320 "CIAO TU", "\324 IL SEPOLCRO DELLO ZIO PEPPINO", "EOOOO, ZIO PEPPINOOOO!", "NO.NON VOGLIO TAGLIARMI UN' ALTRA VOLTA", "-EHEM,EHEM..!", + // 325 "GNAMM, EMMM,!", "-SI, COF, COF!", "GUARDA, C'\324 UNA GOMMA QU\336 ATTACATA", "\324 IL TELEFONINO CHE MI HANNO REGALATO A NATALE", "COM'\324 ALTO", + // 330 "ESCI AL BALCONE GIULIETTA!", "TU SEI LA LUCE CHE ILLUMINA LA MIA VITA!", "EH, PORTA, CHE C'\324?", "EOOOO, SPENDITRICE DI TABACCO DI TRANSILVANIAAA", "\324 UNA SPENDITRICE DI TABACCO", + // 335 "HO UN'ALTRA MONETA DENTRO", "NO. HO DECISSO SMETTERE DI FUMARE E DI BERE", "DA OGGI SAR\343 SOLTANTO PER LE DONNE", "QUESTO \324 UNA TRUFFA! NON \324 USCITO NULLA", "ALLA FINE!", + // 340 "CHE TI HO DETTO?, UN BAULE", "CIAO BAULE, TI CHIAMI COME MIO CUGINO CHE SI CHIAMA RAUL..E", "HO TROVATO LA BORSA DI B.J.", "MIO DIO, NON MI RIFLETTO, SONO UN VAMPIRO!", "...AH, NO, \324 UN DISEGNO", + // 345 "SPECCHIO DELLE MIE BRAME: CHI \220 ILPI\351 BELLO DEL REAME?", "NON VUOLE APRIRMI", "MOLTO BENE. MI HO MESSO I TAPPI", "\324 UN DIPLOMA DI CACCIA-VAMPIRI OMOLOGATO DALLA UNVERSIT\267 DI CAMBRIDGE", "NO. MANCANO ANCORA GLI INGREDIENTI, NON MERITA LA PENA CHE SIA SVEGLIATO", + // 350 "NON HO SOLDI", "\324 UNA LAMPADA BRITANICA", "BARISTA! AIUTAMI!", "HA COMPARITO UN VAMPIRO ED HA PRESSO LA MIA FIDANZATA", "MA NON MI AIUTER\267", + // 355 "MORTA? CHE VUOLE DIRE?", "- EHEM!", "UN VAMPIRO HA SEQUESTRATO LA RAGAZZA DELLA 506!", "DEVI AIUTARMI!", "NON SAI SUONARE NESSUNA DI \"ELIO E LE STORIE TESSE\"", + // 360 "COME TI SOPPORTI, SUONANDO SEMPRE LO STESSO?", "ALLORA COME MI SENTI?", "PRESTAMI I TAPPI", "DAI, TE LI RESTITUISCO SUBITO", "DAIIII...", + // 365 "CIAO. DEVO UCCIDERE UN VAMPIRO", "", "COSA DICI? IN TRANSILVANO?", "CHI \324 LO ZIO PEPPINO?", "MA CHE SUCCEDE CON DRASCULA?", + // 370 "CHI \324 VON BRAUN?", "E PER CHE NON LO FA?", "E DOVE POSSO TROVARE VON BRAUN?", "GRAZIE E CIAO, SOGNI D'ORO", "SAR\267 MEGLIO BUSSARE PRIMA", + // 375 "\324 LEI IL PROFESSORE VON BRAUN?", "E MI POTREBBE DIRE DOVE POSSO ...?", "NON CREDO SIA IL NANNO GANIMEDI", "-PROFESSORE!", "AIUTAMI! LA VITA DEL MIO AMORE DIPENDE DI LEI!", + // 380 "VA BENE, NON HO BISOGNO DEL SUO AIUTO", "O.K. ME NE VADO", "NON AVERE PAURA. INSIEME VINCEREMO DRASCULA", "ALLORA PER CHE NON MI AIUTA?", "IO CE LE HO", + // 385 "SI CE LE HO", "D'ACCORDO", "...EHH...SI", "VENGO A RIENTRARE A QUESTA CABINA", "SONO PRONTO PER FARE LA PROVA", + // 390 "VA BENE, VECCHIETO. SONO VENUTO PER IL MIO SOLDI", "NO, NIENTE. ME NE GI\267 ANDAVO", "SCUSA", "TI \324 INTERESANTE QUESTO LIBRO? HA PARTITURE DI TCIAKOWSKY", "COME POSSO UCCIDERE UN VAMPIRO?", + // 395 "NON TI HANNO DETTO CHE NON \324 BUONO DORMIRE IN CATTIVA POSIZIONE?", "\324 QUELLO CHE SEMPRE DICE MIA MADRE", "PER CHE DRASCULA NON FU RIUSCITO A UCCIDERTI?", "E COSA FU?", "BENISSIMO! HA LEI LA POZIONE DI IMMUNIT\267...!", + // 400 "ALLORA", "MOLTO BENE", "MI PUO RIPETERE COSA BISOGNO PER QUELLA POZIONE?", "VADO VIA VELOCE A TROVARLO", "SENTA, COSA \324 SUCCESO CON IL PIANISTA?", + // 405 "HO GI\267 TUTTI GLI INGREDIENTI DI QUESTA POZIONE", "UNA DOMANDA: COSA \324 QUELLA DI ALUCSARD ETEREUM?", "DICA, DICA..", "E DOV'\324 QUELLA GROTTA?", "CHE C'\324? NON AVETE TRIBUNALE?", + // 410 "...MA ...E SE TROVO PI\353 VAMPIRI?", "\324 UN VAMPIRO CHE NON MI FA PASSARE", "SI ASSOMIGLIA A YODA, MA PI\353 ALTO", "EH, YODA. SE MI FAI PASSARE TI DAR\343 CENTO LIRE", "BENE, O.K., NON POSSO DIRTI NULLA", + // 415 "CIAO VAMPIRO, BELLA NOTTE, VERO?", "TI HANNO DETTO QUALCHE VOLTA CHE TI ASSOMIGLII A YODA?", "SEI UN VAMPIRO O UN DIPINTO ALL'OLEO?", "MEGLIO NON DIRTI NIENTE, PERCHE POI TI ARRABBII", "\324 CHIUSA CON LA CHIAVE", + // 420 "SE PROVO, LA GAZZA MI POTREI CAVARE UN OCCHIO", "\324 CHIUSA! DIO MIO, CHE PAURA!", "LE CERNIERE SONO OSSIDATE", "LA DENTRO C'\324 SOLTANTO UN BARATOLO DI FARINA", "QUESTO HA TOLTO L'OSSIDO", + // 425 "HO TROVATO UNA TALEA DI LEGNO DI PINO", "PRENDER\343 QUESTO CH'\220 PI\353 GROSSO", "BENE, CREDO DI POTERE TOGLIERMI QUESTO STUPIDO COSTUME", "\"CORRIDOIO AI TORRIONI CHIUSO PER LAVORI IN CORSO. PER FAVORE, PER LA PORTA PRINCIPALE. SCUSATE PER IL DISTURBO\"", "..\324 PALLIDO, HA DENTI CANINI, HA CIUFFO E UTILIZA MANTELLO...- SICURO CH'\324 DRASCULA!", + // 430 "B.J., B.J., STAI BENE?", "SI, SO CH'\324 SCEMA MA MI SENTO SOLISSIMO", "NON AVRAI UNA CHIAVE PER CASO, VERO?", "- E SICURO CHE NON HAI UN GRIMALDELLO?", "DAMI UNA FONCINA. VADO A FARE COME MCGYVER", + // 435 "NON MUOVERTI, TORNO SUBITO", "- MANAGIA!- SI \324 ROTTA!", "OLE, ANCHE MI HO FATTO LA BARBA!", "SI, CARO?", "NON ARRIVA", + // 440 "IL PIANISTA NON C'\324", "UN DRINK TRANSILVANO", "ANCORA NON HO CAMERA", "SEMBRA CHE FU RISUCCHIATO NELLO SCARICO DELLA VASCA E HA DECISO APRIRE UN BAR", "\324 UBRIACO PERSO", + // 445 "QUESTI CAPELLI.... CREDO CHE MI FANNO RICORDARE A QUALCUNO", "\324 UNO SCHELETRO OSSUTO", "GUARDA! MIGUEL BOSE!", "\324 ADDORMENTATO. SAREBBE UN PECCATO SVEGLIARGLI", "\324 PI\353 BRUTTO CHE BEGNINI", + // 450 "UN FERETRO DI LEGNO DI PINO", "MI TAGLIER\267 A FETTINI, COME UN SALSICCIOTTO", "NON MI PIACCIONO I PENDOLI. PREFERISCO LE CARCIOFE", "LE MIE MANI SONO LEGATE. NON CE LA FAR\343", "\324 OVVIO CH'\324 UNA PORTA SEGRETA", + // 455 "MI IGNORANO", "-DAIII!", "NEL PRIMO COPIONE SI MUOVEVA, MA IL VIDEO-GIOCO \220 USCITO DAL BUDGET E NON HANNO POTUTO PAGARMI UNA PALESTRA E NON SONO GONFFIATO", "SEMBRA CH'\324 UN P\343 ALLENTATA DAL MURO", "NON CREDO CHE MI SIA UTILE. \324 TROPPO UMIDA PER ACCENDERLA.", + // 460 "AL LATO OVEST? -N\324 PAZZO, CHI SA CHE CI SAR\267 LI!", "HA DEI BELLI DISEGNI TRANSILVANI", "", "CHE PENA CHE NON CI SIA DENTRO UN AGNELLINO ARRROSTANDOSI", "LA ULTIMA VOLTA CHE APRII UN FORNO, LA CASA SALT\220 PER ARIA", + // 465 "LO SCUDO DELLA SCUADRA DI CALCIO DI TRANSILVANIA", "E PER CHE? PER INDOSARLA SULLA TESTA?", "NON CREDO CHE I CASSETI SIANO DI QUELLI CHE SI APPRONO", "NON VOGLIO SAPERE IL CIBO CHE CI SAR\267 LA DENTRO!", "HO L'IMPRESSIONE CH'\324 IMPRESSIONISTA", + // 470 "LA NOTTE SI IMPADRONA DI TUTTI QUANTI... CHE PAURA?", "\324 OSTACOLATA", "\324 IL RE, NON LO AVEVI IMAGINATO?", "NO, NE UNO A CASA, ANZI GLI DO DA MANGIARE", "UNA SCAFFALATURA CON LIBRI ED ALTRE COSE", + // 475 "E A CHI CHIAMO A QUESTE ORE?", "\"COME FARE LA DECLARAZIONE DI REDDITI\"- CHE INTERESSANTE!", "NE HO UNO A CASA, CREDO CH'\324 UN BEST-SELLER MONDIALE", "UNA CHIAVE COMPLETAMENTE NORMALE", "MI SA QHE QUESTA NON \220 DI QU\336", + // 480 "EH, SONO PATATINE FRITE A FORMA DI DENTI CANINI ! MI AFASCINA", "NON CREDO CHE SIA IL MOMENTO MIGLIORE PER METTERSI A MANGIARE DOLCI, L'ESSERE PI\353 CATTIVO DEL MONDO ha nelle sue mani la mia fidanzzata", "COME MI ST\343 DIVERTENDO UCCIDENDO VAMPIRI CON QUESTO!", "VEDIAMO SE APPARISCE UN ALTRO PRESTO", "NO, DEVE ESSERE CON UN VAMPIRO SPORCO E SCHIFFOSO COME QUELLO DI PRIMA", + // 485 "\324 L'AUTENTICA PARRUCA CHE UTILIZZ\343 ELVIS QUANDO DIVENT\343 PELATO", "\220 FARINA MA NON POSSO DIRE MARCHE", "FORSE IN UN ALTRO MOMENTO. OK?", "\220 UNA ASCIA BUONISSIMA, CHE PENA CHE NON CI SIA QU\336 VICINO NESSUNA TESTA DI VAMPIRO", "NO. NEL FONDO SONO UNA BRAVISSIMA PERSONA", + // 490 "\324 IL DEODORANTE DELLA TACHER -HI,HI,HI!", "\324 UN MANTELLO ABBASTANZA CARINO", "", "COME TUTTI I RAMI DI TUTTI GLI ALBERI DEL MONDO, CIO\324 MICA SPEZIALE", "OH, INCREDIBILE!- UNA CORDA IN UNA AVVENTURA GRAFICA!", + // 495 "MI DOMANDO A CHE SERVE...", "UNA CORDA LEGATA A UNA BRANCA, O UNA BRANCA LEGATA A UNA CORDA, DIPENDE COME SI GUARDI", "SEMBRA CHE QUESTA GAZZA HA CATIVE INTENZIONI", "DAI.., NON LA DICO NULLA CHE POI SI ARRABBIA", "SEMBRA ESSERE MORTA, MA NON \220 VERO - EH?", + // 500 "NESSUN ANIMALE \220 STATO MALTRATO DURANTE LE RIPRESE DI QUESTO VIDEO-GIOCO", }, }; -const char *_textd[][79] = { +const char *_textd[][84] = { { + // 0 "", "HEY IGOR, HOW IS EVERYTHING GOING?", "IT'S ALWAYS THE SAME STORY EVERYTIME THERE'S A GOOD GAME ON THE SATELLITE! ANYWAY, WE'LL GO WATCH IT IN THE BAR, AS USUAL", "IGOR LISTEN CAREFULLY MAN, WE ARE GOING TO START WITH PHASE NUMBER ONE OF MY PLAN TO CONQUER THE WORLD", "FIRST WE'LL CAPTURE ONE OF THE LIGHTNINGS AND WE'LL DEMAGNETIZE IT WITH OUR INDIFIBULATOR. THE ELECTRICITY WILL COME THROUGH TO MY MONSTER AND HE'LL GET ALIVE!", + // 5 "IF EVERYTHING WORKS OUT ALL RIGHT, THIS WILL BE THE BEGINNING OF A GREAT ARMY THAT WILL CONQUER THE WORLD FOR ME. HA, HA", "THE MONSTERS WILL DESTROY ALL THE ARMY'S WEAPONS IN THE WORLD, MEANWHILE, WE'LL BE SAFE IN THE PIECES OF LAND I BOUGHT IN GIBRALTAR", "WE'LL SET UP A COUP. GOVERNMENTS ALL OVER THE WORLD WILL BE UNCOVERED AND THEIR COUNTRIES WILL SURRENDER TO ME!", "I'LL BECOME THE FIRST BAD GUY IN HISTORY TO MAKE IT ! HA, HA!", "I'M NOT TALKING TO YOU, IDIOT! I'M JUST GIVING YOU THE PLOT. ALL RIGHT, EVERYTHING READY?", + // 10 "THE TIME HAS COME! TURN ON THE ALKALINE BATTERIES' SWITCH", "DAMNED IT! WHAT WENT WRONG?", "ARE YOU SURE YOU CHECKED IT ALL AND THERE WAS NOTHING MISSING? YOU'VE BEEN LATELY MESSING AROUND WITH THAT STUFF ABOUT TAXES AND I DON'T KNOW MAN...", "YOU STUPID THING! YOU FORGOT TO CONNECT THE INDIFIBULATOR. THE SCREWS HAVE PROBABLY MAGNETIZED AND HIS BRAIN BURNT", "YOU ARE DEAD, YOU ARE DEAD...WAIT TILL I GET YOU!", + // 15 "SHUT UP! I'LL GET ANOTHER BRAIN TOMORROW AND THEN WE WILL REPEAT THE EXPERIMENT", "THIS TIME I'LL GET A WOMAN'S BRAIN. SHINY AND NOT USED YET...HA, HA, HA, GOODIE ONE!", "SO WHAT? I'M THE BAD GUY, RIGHT? SO I CAN BE AS FULL OF MACHISMO AS I WANT, ALL RIGHT? AND IF YOU SAY SOMETHING AGAIN I'LL TURN YOUR HUMP BACK TO FRONT!", "HA, HA, HA. YOU FELL TOOO!! NOW YOU ARE GOING TO PAY FOR DARING TO FIGHT AGAINST ME! IGOR, TAKE HIM TO THE PENDULUM OF DEATH!", "AND SO, TELL ME, YOU STUPID HUMAN. HOW COME YOU WANT TO DESTROY ME?", + // 20 "THAT'S BEAUTIFUL!. IF IT WASN'T BECAUSE IT MAKES ME LAUGH, I WOULD CRY", "OUR GIRLFRIEND'S BRAIN TO HELP ME CONQUERING THE WORLD", "YES, SURE! I'LL TAKE IT FROM HER AND GIVE IT TO MY FRUSKYNSTEIN. THE WORLD WILL BE MINE WITH IT, HA, HA", "WHAT!? YOU'RE DEAD, MAN! I'M GOING TO...YOU REALLY GOT ME ANGRY MAN...COME ON, PREPARE TO DIE!", "HA, HA, HA. NOT EVEN IN YOUR WILDEST DREAMS!", + // 25 "YES, ISN'T IT? HA, HA", "ALL RIGHT, ALL RIGHT. BUT DO IT QUICKLY, OK?", "PUT THAT CIGARETTE OUT NOW! I CAN'T STAND YOU ANYMORE!", "AND SO, DOES THAT BREW HAVE THE OPPOSITE EFFECT?", "WELL, WE'LL SEE THAT", + // 30 "OK, LET'S SEE IT. IGOR, BRING ME THE CD \"SCRATCHING YOUR NAILS ALL OVER THE BLACKBOARD\"", "NO WAY. THE GIRL STAYS WITH ME. YOU RE STAYING THERE UNTIL THE PENDULUM CUTS YOU INTO THIN SLICES. HA, HA, HA", "MAN I'M I JUST BAD... COME ON IGOR, LET'S MAKE THE BREW AND CONQUER THE WORLD", "WHAT HAPPENS NOW?", "YES, WHAT?...OH, DAMNED, THE GAME!", + // 35 "I FORGOT ABOUT THAT. GET THE GIRL AND LET'S GO AND WATCH IT. WE CAN CONQUER THE WORLD LATER", "THANKS MAN, I WAS THIRSTY", "OH, THE CRUCIFIX!!...THE CRUCIFIX...!", "I DIDN'T NOTICE ABOUT THAT BEAUTIFUL CRUCIFIX!", "LEAVE ME ALONE!, I'M WATCHING THE GAME", + // 40 "", "", "", "", "", + // 45 "", "", "", "", "", + // 50 "", "", "", "", "", + // 55 "", "HI BLIND MAN. HOW IT'S GOING?", "HOW DO YOU KNOW I'M A FOREIGNER?", "YOU LOOK BLIND. YOU'RE WEARING DARK GLASSES LIKE STEVIE WONDER", "LOOK, I'M SORRY, I DIDN'T KNOW YOU COULD SEE", + // 60 "BUT HAVEN'T YOU JUST TOLD ME YOU WEREN'T BLIND", "BUT IF YOU CAN'T SEE", "OOOOKAY. SORRY. IN THAT CASE, HI THERE SIGHTLESS PERSON", "I'M JOHN HACKER. YOU MUST BE ONE OF THOSE CHARACTERS WHO WILL HELP ME OUT IN EXCHANGE FOR AN OBJECT. AREN'T YOU? EH? AREN'T YOU?", "UUUUM, EXCUSE ME FOR ASKING BLIN... SIGHTLESS PERSON! BUT WHAT SORT OF JOB IS THAT, TO GIVE SICKLES IN EXCHANGE FOR MONEY WHILE YOU PLAY THE ACCORDION?", + // 65 "AH YES, I SUPPOSE THAT'S TRUE. GOODBYE SIGHTLESS PERSON... BLIND MAN", "HERE IS THE LARGE AMOUNT OF MONEY YOU ASKED ME FOR", "YOU BETTER HAVE HAD", "HI THERE FOREIGNER", "AND HOW DO YOU KNOW I'M BLIND?", + // 70 "AND I'M NOT KIDDING YOU BUT YOUR'S ARE LIKE WOODY ALLEN'S", "NO, I CAN'T SEE", "AND I'M NOT", "OH OF COURSE. JUST COS I CAN'T SEE, YOU ACCUSE ME OF BEING BLIND", "HI THERE FOREIGNER! WHAT ARE YOU DOING IN TRANSYLVANIA?", + // 75 "THAT'S RIGHT, FOREIGNER. IN EXCHANGE FOR A LARGE SUM OF MONEY I'LL GIVE YOU A SICKLE FOR WHEN YOU MIGHT NEED IT", "SHHHH, I'M A SICKLES TRADER, THAT'S WHY I HAVE TO HIDE", "BECAUSE YOU TOLD ME BEFORE, DIDN'T YOU?", "THANKS FOREIGNER. HERE'S THE SICKLE IN EXCHANGE. YOU'LL FIND IT REALLY USEFUL LATER ON, HONESTLY", + "", + // 80 + "", + "", + "", + "bla, bla, bla." }, { + // 0 "", "\250COMO VA TODO, IGOR?", "\255SIEMPRE QUE HAY UN BUEN PARTIDO EN LA PARABOLICA PASA LO MISMO! EN FIN, IREMOS A VERLO AL BAR COMO DE COSTUMBRE", "AHORA IGOR, ATIENDE. VAMOS A REALIZAR LA FASE 1 DE MI PLAN PARA CONQUISTAR EL MUNDO", "PRIMERO CAPTAREMOS UNO DE LOS RAYOS DE LA TORMENTA Y LO DESMAGNETIZAREMOS CON NUESTRO INDIFIBULADOR. LA ELECTRICIDAD PASARA A MI MONSTRUO \255Y LE DARA VIDA! ", + // 5 "SI TODO SALE BIEN ESTE NO SERA MAS QUE EL PRIMERO DE UN INMENSO EJERCITO QUE CONQUISTARA EL MUNDO PARA MI, JA, JA, JA", "LOS MONSTRUOS DESTRUIRAN TODAS LAS ARMAS DE TODOS LOS EJERCITOS DEL MUNDO, MIENTRAS NOSOTROS NOS REFUGIAMOS EN UNOS TERRENOS QUE HE COMPRADO EN GIBRALTAR", "ENTONCES, DAREMOS UN GOLPE DE ESTADO, LOS GOBIERNOS DEL MUNDO NO TENDRAN CON QUE PROTEGERSE, Y PONDRAN SUS PAISES A MIS PIES", "\255SERE EL PRIMER MALO EN LA HISTORIA QUE LO CONSIGA! \255JUA, JUA, JUA!", "\255A TI NADA, IDIOTA! ESTOY EXPONIENDO LA TRAMA. BIEN \250ESTA TODO LISTO?", + // 10 "\255LLEGO EL MOMENTO, ENTONCES! \255DALE AL INTERRUPTOR DE LAS PILAS ALCALINAS! ", "\255MALDITA SEA! \250QUE ES LO QUE HA PODIDO FALLAR?", "\250SEGURO QUE LO REVISASTE BIEN Y NO FALTABA NADA? ULTIMAMENTE ESTAS CON ESO DE LA RENTA QUE NO VES UN PIJO A DOS METROS", "\255IDIOTA, NO HABIAS CONECTADO EL INDIFIBULADOR! LOS TORNILLOS SE HABRAN MAGNETIZADO Y SE LE HABRA QUEMADO EL CEREBRO", "ESTAS MUERTO, ESTAS MUERTO, COMO TE COJA...", + // 15 "\255A CALLAR! MA\245ANA IRE A POR OTRO CEREBRO Y REPETIREMOS EL EXPERIMENTO ", "NO. ESTA VEZ TRAERE UNO DE MUJER, PARA QUE ESTE NUEVECITO Y SIN ESTRENAR. JA, JA, JA, QUE MALISIMA DE CHISTA", "\250Y QUE? YO SOY EL MALO Y SOY TODO LO MACHISTA QUE QUIERA \250ENTENDIDO? Y COMO ME VUELVAS A RECHISTAR TE TRAGAS LA CHEPA ", "JA, JA, JA. OTRO QUE HA CAIDO. AHORA VAS A PAGAR TU OSADIA DE QUERER ACABAR CONMIGO. \255IGOR, AL PENDULO DE LA MUERTE!", "DIME, HUMANO ESTUPIDO, \250COMO ES QUE TE HA DADO POR QUERER DESTRUIRME? ", + // 20 "\255QUE BONITO!, ME PONDRIA A LLORAR SI NO FUERA PORQUE ME HACE GRACIA", "A TU NOVIA LA NECESITO PARA QUE ME AYUDE CON SU CEREBRO A CONQUISTAR EL MUNDO", "\255SI, JA! SE LO QUITARE Y SE LO PONDRE A MI FRUSKYNSTEIN, Y CON EL DOMINARE EL MUNDO, JA, JA, JA", "\255\250QUE?! \255ESTAS MUERTO, ESTAS MUERTO! TE VOY A... ME HAS TOCADO LAS NARICES, VAMOS. \255PREPARATE A SER MATADO!", "JA, JA, JA. QUE TE CREES TU ESO", + // 25 "SI, \250VERDAD? JA, JA, JA ", "AH, ESTA BIEN, PUEDES FUMARTE EL ULTIMO CIGARRILLO, PERO DEPRISITA", "APAGA YA ESE CIGARRILLO, ME TIENES HARTO YA", "Y DIME, \250ESA POCION TIENE EL EFECTO CONTRARIO?", "ESO YA LO VEREMOS...", + // 30 "BUENO, A VER SI ES VERDAD. IGOR, TRAE EL COMPACT DISC DE U\245AS ARRASCANDO UNA PIZARRA", "ESO NI SO\245ARLO. LA CHICA SE QUEDA CONMIGO, Y TU TE QUEDAS AHI HASTA QUE EL PENDULO TE CORTE EL RODAJITAS. JA, JA, JA", "PERO QUE MALO QUE SOY, VAMOS IGOR, VAMOS A PREPARAR LA POCION Y CONQUISTAR EL MUNDO", "\250QUE PASA AHORA?", "SI, \250QUE PASA?... \255ANDA, EL PARTIDO!", + // 35 "SE ME HABIA OLVIDADO. COGE A LA CHICA Y VAMONOS A VERLE. YA CONQUISTARE EL MUNDO DESPUES", "GRACIAS MACHO, TENIA SED", "\255ArgH! \255ESE CRUCIFIJO! \255ESE CRUCIFIJO!...", "QUE BONITO ES ESE CRUCIFIJO, NO ME HABIA YO FIJADO", "DEJAME, QUE ESTOY VIENDO EL FUTBOL", + // 40 "", "", "", "", "", + // 45 "", "", "", "", "", + // 50 "", "", "", "", "", + // 55 "", "Hola ciego. \250Que tal?", "\250Como sabes que soy extranjero?", "Pareces un ciego. Tienes gafas como serafin zubiri, hablas mirando al frente como Stevie Wonder...", "Bueno, perdona. No sabia que vieses.", + // 60 "\250Pero no me acabas de decir que no eres ciego?", "\255Pero si no ves!", "Vaaaale. Perdona. En ese caso: Hola invidente.", "Soy John Hacker, y estoy jugando al Drascula. Tu debes ser el tipico personaje que me ayudara a cambio de un objeto. \250A que si? \250Eh? \250A que si?", "Em... Perdona que te pregunte cieg..\255Invidente!. Pero... \250Que clase de profesion es la tuya, de dar hoces a cambio de dinero, mientras tocas el acordeon?", + // 65 "Ah, si. Es verdad. Adios invidente...(ciego)", "Ahi tienes la cuantiosa cantidad de dinero que me pediste.", "Mas te vale.", "Hola extranjero.", "Y tu... \250Como sabes que soy ciego?", + // 70 "Y tu hablas como el hijo de Bill Cosby y no me meto contigo.", "No, si no veo.", "Y no lo soy.", "\255Oh, claro! Como no veo se me tacha de ciego \250no?", "\255Hola Extranjero! y \250que haces en Transilvania?", + // 75 "Correcto extranjero. A cambio de una cuantiosa suma de dinero, te dare una hoz, para cuando te haga falta.", "Shhhhhh. Soy traficante de hoces, tengo que disimular.", "Porque me lo has dicho antes \250no?", "Gracias extranjero. Aqui tienes tu hoz a cambio. Un objeto que te sera muy util algo mas adelante... de verdad.", + "", + // 80 + "", + "", + "", + "\244a, \244a, \244a. que bueno, que bueno." }, { + // 0 "", "WIE GEHTS, WIE STEHTS, IGOR ?", "IMMER WENN auf kabel EIN GUTES SPIEL KOMMT, PASSIERT DAS GLEICHE. NAJA, DANN GUCKEN WIR ES UNS EBEN WIE IMMER IN DER KNEIPE AN", "JETZT PASS AUF, IGOR. WIR WERDEN JETZT PHASE 1 MEINES WELTEROBERUNGSPLANS STARTEN.", "Pah, einige GEWITTERBLITZE, die wir MIT dem VIBROXATOR ENTMAGNETISIEREN. und der strom wird meinem MONSTERCHEN leben einhauchen.", + // 5 "WENN ALLES KLAPPT WIRD ER DER ERSTE SOLDAT EINER RIESIGEN ARMEE SEIN, DIE DIE WELT FueR MICH EROBERN WIRD, HARHARHAR", "DIE MONSTER WERDEN ALLE WAFFEN IN DER GANZEN WELT VERNICHTEN WaeHREND WIR UNS AUF UNSERE LaeNDEREIEN ZURueCKZIEHEN, DIE ICH UNS AUF HELGOLAND GEKAUFT HABE.", "DANN WERDEN WIR EINEN STAATSSTREICH MACHEN UND DIE REGIERUNGEN DIESER WELT WERDEN AUFGEBEN UND SICH MIR ZU FueSSEN WERFEN", "ICH WERDE DER ERSTE BoeSE IN DER GESCHICHTE SEIN, DER DAS SCHAFFT, HUAHUAHUA !", "GAR NICHTS, IDIOT ! ICH ERZaeHLE DIE HANDLUNG .O.K . IST ALLES FERTIG ?", + // 10 "ES IST ALSO SOWEIT !DRueCK AUF DEN SCHALTER MIT DEN ALKALI-BATTERIEN !", "VERFLIXT NOCHMAL ! WAS IST DA SCHIEFGELAUFEN ?", "BIST DU SICHER, DASS DU ALLES GECHECKT HAST ? SEIT NEUESTEM DENKST DU NUR NOCH AN DEINE EINKOMMENSERKLaeRUNG UND KRIEGST NICHTS MEHR MIT", "DU IDIOT !DU HAST DEN VIBROXITOR NICHT EINGESCHALTET !JETZT SIND DIE SCHRAUBEN MAGNETISIERT UND IHM WIRD WOHL DAS GEHIRN VERBRANNT SEIN", "DU BIST EIN TOTER MANN, NA WARTE, WENN ICH DICH KRIEGE...", + // 15 "HALT DIE KLAPPE !MORGEN HOLE ICH EIN NEUES HIRN UND WIR WIEDERHOLEN DAS EXPERIMENT", "NEIN, DIESMAL BESORG ICH EIN FRAUENHIRN, DASS NOCH GANZ FRISCH UND UNBENUTZT IST, HAR,HAR,HAR, SUPERJOKE !", "NA UND ? ICH BIN DER BoeSE UND DER SUPER-MACHO ODER WAS ? UND WENN DU MIR NOCHMAL WIDERSPRICHST KANNST DU DEINEN BUCKEL SCHLUCKEN", "HARHARHAR,SCHON WIEDER EINER. DU WARST SO DREIST, MICH UMBRINGEN ZU WOLLEN. DAS WIRST DU JETZT BueSSEN. IGOR! ZUM TODESPENDEL MIT IHM !", "SAG MAL DU DUMMES MENSCHLEIN, WIESO WOLLTEST DU MICH ZERSToeREN ?", + // 20 "ACH WIE SueSS !ICH KoeNNTE GLATT ANFANGEN ZU HEULEN, WENN ES NICHT SO LUSTIG WaeRE", "DEINE FREUNDIN BRAUCHE ICH NOCH, DAMIT SIE MIR MIT IHREM HIRN DABEI HILFT, DIE WELT ZU EROBERN", "JA, HA !ICH WERDE ES RAUSREISSEN UND ES FRUNKSFENSTEIN GEBEN UND DANN WERDE ICH DIE WELT EROBERN,HARHARHAR", "WAS ? !DU BIST EIN TOTER MANN! ICH WERDE DICH... DU HAST MICH VERaePPELT,GANZ KLAR . MACH DEIN TESTAMENT!", "HARHARHAR, GLAUB DU DAS MAL ", + // 25 "JA, WIRKLICH ? HARHARHAR", "JA, SCHON GUT, RAUCH DIR NOCH EINE LETZTE ZIGARETTE, ABER RUCKZUCK", "MACH MAL DIE ZIGARETTE AUS. MIR IST SCHON SCHLECHT", "UND SAG MAL, DIESE MISCHUNG HAT DIE GEGENWIRKUNG ?", "DAS WERDEN WIR JA MAL SEHEN...", + // 30 "NA, MAL GUCKEN OB DAS STIMMT, IGOR., BRING MAL DIE CD MIT DEN DEM SOUND VON kratzenden FINGERNaeGELN AUF EINER SCHULTAFEL", "NICHT IM TRAUM. DAS MaeDCHEN BLEIBT BEI MIR UND DU BLEIBST WO DU BIST, BIS DICH DAS PENDEL IN LECKERE SCHEIBCHEN SCHNEIDET, HARHAR", "WIE BoeSE ICH DOCH BIN. KOMM IGOR, WIR BEREITEN DIE MISCHUNG ZU UND EROBERN DANN DIE WELT", "WAS IST DENN JETZT WIEDER LOS ?", "JA, WAS IST LOS ?...VERDAMMT, DAS SPIEL !", + // 35 "DAS HAB ICH GLATT VERGESSEN. NIMM DAS MaeDCHEN UND LASS UNS DAS SPIEL ANGUCKEN GEHEN . DIE WELT EROBERN WIR DANACH.", "DANKE, ALTER, ICH HATTE DURST", "ARGHH! DAS KRUZIFIX DA ! DAS KRUZIFIX !", "WIE SCHoeN DAS KRUZIFIX DA IST, HAB ICH GAR NICHT BEMERKT", "LASS MICH, ICH GUCK DOCH GERADE FUSSBALL", + // 40 "", "", "", "", "", + // 45 "", "", "", "", "", + // 50 "", "", "", "", "", + // 55 "", "Hallo Blinder. Wie gehts?", "Woher weisst Du, dass ich nicht von hier bin ?", "Du siehst wie ein Blinder aus . Du guckst beim Sprechen immer gerade aus, und dann diese Stevie-Wonder-Brille....", "O.k,entschuldige. Ich dachte, du kannst nichts sehen", + // 60 "Aber hast Du mir nicht gerade gesagt, dass Du NICHT blind bist?", "Ich denke, Du siehst nichts ?", "Okaaay,okaay! Tut mir leid. Also wenn das so ist: Sehkranker ", "Ich bin Heinz Hacker und spiele Drascula . Du bist bestimmt derjenige, der mir hilft und dafuer irgendwas haben will. Stimmts? Hae? Hab ich recht!?", "aeh....Entschuldige die Frage, Blind-Sehkranker!Aber...Was hast Du fuer einen komischen Beruf, dass Du Sicheln verkaufst und dabei Akkordeon spielst!", + // 65 "Ach, klar, stimmt. Auf Wiedersehen Sehkranker...(Blinder)", "Hier hast Du den Wahnsinnsbatzen Geld, um den Du mich gebeten hast", "Das ist auch besser so!", "Hallo Fremder!", "Und Du...Woher willst Du wissen, dass ich blind bin?", + // 70 "Und Du bist der Sohn von Bill Cosby und ich werde mich nicht mit Dir anlegen", "Nein, ich seh doch nichts!", "Und ich bin es nicht", "Na super! Nur weil ich nichts sehe bin ich direkt ein Blinder, oder was?", "Hallo Fremder! Und was machst Du in Transylvanien?", + // 75 "Richtig, Fremder. Gegen einen Wahnsinnsbatzen Geld bekommst Du von mir eine Sichel damit Du eine hast, wenn Du eine brauchst.", "Psssssst. Ich bin Sichel-Dealer, ich muss unentdeckt bleiben ", "Warum hast Du mir das nicht vorher gesagt ?", "Danke, Fremder. Hier hast du dafuer Deine Sichel. Sie wird Dir nachher noch nuetzlich sein...glaub mir !", + "", + // 80 + "", + "", + "", + "bla, bla, bla." }, { + // 0 "", "COMMENT VA TOUT, IGOR?", "C'EST TOUJOURS LA M\322ME CHOSE QUAND IL Y A UN BON MATCH \267 LA PARABOLIQUE! ENFIN, ALLONS LE VOIR AU BAR, COMME D'HABITUDE", "MAINTENANT, COUTE IGOR. NOUS ALLONS RALISER LA PHASE 1 DE MON PLAN POUR CONQURIR LE MONDE", "D'ABORD, ON SAISIRA L'UNE DES FOUDRES DE L'ORAGE ET ON LA DMAGNTISERAIT AVEC l'INDIFUBULATEUR. LA COURANTE PASSERA DANS MON MONSTRE ET LUI DONNERA LA VIE!", + // 5 "SI TOUT VA BIEN CELUI-L\267 NE SERA QUE LE PREMIER D'UNE IMMENSE ARME QUE CONQURRA LE MONDE POUR MOI, HA! HA! HA! ", "LES MONSTRES VONT ANANTIR TOUTES LES ARMES DE TOUTES LES ARMES DU MONDE, TANDIS QUE NOUS NOUS RFUGIONS DANS LES TERRAINS QUE J'AI ACHET \267 GIBRALTAR", "ALORS, ON DONNERA UN COUP D'TAT. LES GOUVERNEMENTS DU MONDE N'AURONT PAS DE PROTECTION ET SES PAYS SERONT \267 MES PIEDS", "JE SERAI LE PREMIER MALIN DE L'HISTOIRE \267 Y AVOIR RUSSI! -HOUA! HOUA! HOUA!", "POUR TOI RIEN, IDIOT! JE PRSENTE LA TRAME. BIEN, TOUT EST PR\322T? ", + // 10 "LE MOMENT EST ARRIV\220, ALORS! -APPUIE DONC SUR L'INTERRUPTEUR DES BATTERIES ALCALINES! ", "H\220LAS! QU'EST-CE QUE N'A PAS MARCH\220?", "C'EST S\352R QUE TU L'AS BIEN R\220VIS\220 ET IL NE MANQUAIT RIEN? DERNI\324REMENT AVEC CETTE HISTOIRE DE LA RENTE TU N'Y VOIS GOUTTE", "IDIOT! TU N'AVAIS PAS CONNECT\220 L'INFIBULATEUR! LES VIS SE SERONT MAGN\220TIS\220ES ET SA CERVELLE AURA BR\352L\220E", "TU ES MORT, TU ES MORT, SI JE T'ATTRAPE...", + // 15 "TAIS-TOI! DEMAIN J'AURAI UNE AUTRE CERVELLE ET ON FERA L'ESSAI \267 NOUVEAU", "NON, CETTE FOIS J'APPORTERAI UNE DE FEMME POUR QU'ELLE SOIT TOUTE NEUVE ET DE PREMI\324RE MAIN. HA! HA! HA! QUE MALIN DE XISTE", "ET QUOI? JE SUIS LE MALIN ET TOUT LE SEXISTE QUE JE D\220SIRE, C'EST ENTENDU? SI TU ME R\220PLIQUES ENCORE JE TE FAIS ENGLOUTIR TA BOSSE", "HA! HA! HA!. UN AUTRE QUI S'EST LAISS\220 PRENDRE. MAINTENANT TU PAIERAS CHER TON AUDACE DE VOULOIR EN FINIR AVEC MOI. -IGOR, AU PENDULE DE LA MORT!", "DIS-MOI, HUMAIN STUPIDE, POURQUOI TU AS PENS\220 ME D\220TRUIRE? ", + // 20 "QUE C'EST BEAU! JE SANGLOTERAIS SI CE N'ETAIT PAS DR\342LE", "J'AI BESOIN DE TA FIANC\220E POUR QU'ELLE M'AIDE \267 CONQU\220RIR LE MONDE AVEC SA CERVELLE", "OUI, HA! JE LA LUI ARRACHERAI ET L'INSTALLERAI SUR MON FRUSKYNSTEIN, ET AVEC LUI JE VAIS MA\327TRISER LE MONDE, HA! HA! HA!", "QUOI?! -TU ES MORT, TU ES MORT! JE VAIS TE... TU M'AS CASS\220 LE NEZ, ALLONS, -APPR\322TE-TOI \267 \322TRE TU\220!", "HA! HA! HA! C'EST-CE QUE TU CROIS", + // 25 "OUI, N'EST-CE PAS? HA! HA! HA!", "AH, C'EST BIEN! TU PEUX FUMER LA DERNI\324RE CIGARETTE, MAIS D\220P\322CHE-TOI!", "\220TEINS D\220J\267 CETTE CIGARETTE, J'EN A RAS LE BOL!", "ET DIS-MOIS, CETTE POTION, A-T-ELLE L'EFFET CONTRAIRE?", "ON VERRA \200A...", + // 30 "EH BIEN, ON VERRA SI C'EST VRAI. IGOR, APPORTE LE COMPACT DISC D'ONGLES GRATTANT UN TABLEAU", "N'Y PENSES PAS. LA FILLE RESTE AVEC MOI, ET TOI TU RESTERAS L\267 JUSQU'\267 QUE LA PENDULE TE COUPE EN PETITES TRANCHES. HA! HA! HA!", "MAIS QUE JE SUIS MALIN. ON Y VA, IGOR, ALLONS PR\220PARER LA POTION ET CONQU\220RIR LE MONDE", "QU'Y A-T-IL MAINTENANT?", "OUI, QU'Y A-T-IL?... -TIENS, LE MATCH!", + // 35 "JE L'AVAIS OUBLI\220. PRENDS LA FILLE ET ALLONS LE VOIR. J'IRAI CONQU\220RIR LE MONDE PLUS TARD", "MERCI MON VIEUX, J'AVAIS SOIF", "ArgH! CE CRUCIFIX! -CE CRUCIFIX!...", "C'EST BEAU CE CRUCIFIX, JE NE M'AVAIS PAS RENDU COMPTE", "FICHE-MOI LA PAIX! JE REGARDE LE FOOT-BALL", + // 40 "", "", "", "", "", + // 45 "", "", "", "", "", + // 50 "", "", "", "", "", + // 55 "", "BONJOUR, L'AVEUGLE. A VA?", "POURQUOI TU SAIS QUE JE SUIS UN TRANGER?", "TU PARAT UN AVEUGLE. TU AS DES LUNETTES COMME SERAFIN ZUBIRI ET TU PARLES EN REGARDANT DEVANT TOI, COMME STEVIE WONDER...", "BON, EXCUSE-MOI. JE NE SAVAIS PAS QUE TU PUISSES VOIR.", + // 60 "MAIS, TU NE VIENS PAS DE ME DIRE QUE TU N'EST PAS AVEUGLE?", "MAIS TU NE VOIS PAS!", "A VA, A VA.... PARDONNE-MOI. DANS CE CAS-L: BONJOUR AVEUGLE.", "JE SUIS JOHN HACQUER ET JE JOUE AU DRASCULA. TU ES SREMENT LE TYPIQUE PERSONNAGE QUI VA M'AIDER EN TROC D'UN OBJET. D'ACCORD? H? D'ACCORD?", "EUH... AVEUGLE, UNE QUESTION! MAIS... QUEL GENRE DE MTIER C'EST LE TIEN? CELUI D'CHANGER DE FAUCILLES CONTRE DE L'ARGENT EN JOUANT DE L'ACCORDON?", + // 65 "AH, OUI! C'EST VRAI. AU REVOIR AVEUGLE...", "VOIL LA GROSSE SOMME D'ARGENT QUE TU M'AS DEMANDE.", "IL TE VAUX MIEUX.", "BONJOUR, TRANGER!", "ET TOI... COMMENT TU SAIS QUE JE SUIS UN AVEUGLE?", + // 70 "ET TOI TU PARLES COMME LE FILS DE BILL COSBY ET MOI, JE NE T'EMBTE PAS.", "NON, SI JE NE VOIS PAS.", "ET MOI, JE NE LE SUIS PAS.", "OH, BIEN SR! COMME JE NE VOIS PAS ON ME TCHE D'AVEUGLE, N'EST-CE PAS", "BONJOUR, TRANGER! ET QU'EST-CE QUE TU FAIS EN TRANSYLVANIE?", + // 75 "C'EST CORRECT, TRANGER. POUR UNE GROSSE SOMME D'ARGENT, JE TE DONNERAI UNE FAUCILLE, POUR QUAND TU EN AURAS BESOIN.", "CHUT! JE SUIS UN TRAFICANT DE FAUCILLES, JE DOIS ME CACHER.", "PARCE QUE TU ME L'AS DIT AVANT, N'EST-CE PAS?", "MERCI TRANGER. VOIL TA FAUCILLE EN CHANGE. UNE CHOSE QUI SERA TRS PRATIQUE POUR TOI, PLUS TARD... VRAIMENT.", + "", + // 80 + "", + "", + "", + "bla, bla, bla." }, { + // 0 "", "COME VA, IGOR?", "-SEMPRE CHE C' UNA BUONA PARTITA SUCCEDE LO STESSO! BENE, ANDREMO A GUARDARLA AL BAR, COME SEMPRE", "ADESSO IGOR, ASCOLTA. ANDIAMO A REALIZZARE LA FASE 1 DEL MIO PROGETTO PER CONQUISTARE IL MONDO", "ATTRARREMO UN FULMINo DELLA TEMPESTA E LO DISMAGNETIZZAREMO CON L'INDIFIBULATORE. LA ELETTRICIT\265 ANDR\265 AL MIO MOSTRO E, GLI DAR\265 VITA!", + // 5 "SE TUTTO VA BENE QUESTO SAR\265 SOLTANTO IL PRIMO DI UN'IMMENSO ESERCITO CHE CONQUISTAR\265 IL MONDO PER ME, HA,HA,HA", "I MOSTRI DISTRUGGERANNO TUTTE LE ARME DI TUTTI GLI ESERCITI DEL MONDO, MENTRE NOI CI RIFURGIAREMO nei miei terreni A GIBRALTAR", "POI, FAREMO UN GOLPE, E I GOVERNI DEL MONDO NON AVRANNO PER DIFENDERSI, E AVR\220 LE LORO NAZIONI SOTTO I MIEI PIEDI", "SAR\220 IL PRIMO CATTIVO DELLA STORIA CHE RIESCA!", "A TE NIENTE, SCIOCCO! ST\220 SPORRENDO LA TRAMA. BENE, TUTTO A POSTO?", + // 10 "-\220 IL MOMENTO! -PREMI L'INTERRUTTORE DELLE BATTERIE ALCALINE!", "- PORCA MISERIA! -CHE COSA NON \220 ANDATA BENE?", "SEI SICURO DI AVERLO CONTROLLATO BENE? E NO MANCABA NIENTE? ULTIMAMENTE PER I REDDITI NON VEDI UNA MADONNA", "IMBECILE!, NON HAI CONETTATO L'INDIFIBULATORE! LE VITI SARANO MAGNETIZZATE E ADESSO AVR\265 IL CERVELLO BRUCIATO", "SEI MORTO, SEI MORTO, COME TI PRENDA..", + // 15 "STAI ZITTO! DOMANI CERCHER\220 UN ALTRO CERVELLO E RIPETEREMO L'ESPERIMENTO", "NO. QUESTA VOLTA NE PORTER\220 UNO DI DONNA, COS\326 SAR\265 NUOVISSIMO, MAI UTILIZZATO. HA, HA HA, CHE BARZELLETA FALLITA", "E? SONO IL CATTIVO DELLA STORIA, E SONO MASCHILISTA SE VOGLIO, CAPITO? E NON LAMENTARTI UNA ALTRA VOLTA PERCHE MANGERAI LA TUA GOBBA", "HA,HA,HA. UN ALTRO PRESSO. ADESSO PAGHERAI MOLTO CARO QUESTA OFFESA, LA TUA INTENZIONE DI FINIRE CON ME. -IGOR, AL PENDOLO DELLA MORTE!", "DIMI, STUPIDO UMANO, COME MAI HAI PENSATO A DISTRUGGERMI?", + // 20 "-CHE BELLO!, MI METTEREI A PIANGERE SE NON FOSSE PERCHE MI FA RIDERE", "HO BISOGNO DELLA TUA RAGAZZA, IL SUO CERVELLO MI AIUTER\265 A CONQUISTARE IL MONDO", "-SI, HA ! VADO A TOGLIARSILO PER METTEGLIELO AL MIO FRUSKYNSTEIN, E CON LUI DOMINER\220 IL MONDO, HA,HA,HA", "CHE?! - SEI MORTO, SEI MORTO! TI VADO A...MI HAI FATTO ARRABBIARE. SEI PRONTO PER MORIRE?", "HA,HA,HA. TU CREDI?", + // 25 "SI, VERO? HA,HA,HA", "VA BENE, PUOI FUMARE LA ULTIMA SIGARETTA, MA SBRIGATI", "SONO STUFFO, BUTTA GI\265 LA SIGARETTA!", "E DIMI, QUELLA POZIONE HA L'EFFETTO INVERSO?", "QUELLO SI VEDR\265 ..", + // 30 "BENE, SAR\265 VERO?. IGOR, DAMI IL COMPACT DISC DI UNGHIE GRAFFIANDO UNA LAVAGNA", "NEANCHE SOGNARLO. LA RAGAZZA RIMANE CON ME, E TU RIMANI LI FINO CHE IL PENDOLO TI TAGLII IN FETTE. HA,HA,HA", "MA COME SONO CATTIVO, ANDIAMO IGOR, ANDIAMO A FARE LA POZIONE, ANDIAMO A CONQUISTARE IL MONDO", "ADESSO CHE SUCCEDE?", "SI, CHE C'E?....LA PARTITA!", + // 35 "L'AVEVO DIMENTICATA. PRENDI LA RAGAZZA E ANDIAMO A GUARDARE IL CALCIO. CONQUISTER\220 IL MONDO DOPO", "GRAZIE AMICO, AVEVO SETE", "-ARGH! -QUEL CROCIFISSO! -QUEL CROCIFISSO!...", "QUE BELLO \220 QUEL CROCIFISSO, NON MI ERO ACCORTO", "LASCIAMI, ST\220 GUARDANDO LA PARTITA", + // 40 "", "", "", "", "", + // 45 "", "", "", "", "", + // 50 "", "", "", "", "", + // 55 "", "Ciao cieco. Come va?.", "Come sai che sono straniero.", "Sembri un cieco. Hai gli occhiali come il cieco di Sorrento, parli guardando all'infinito come Stevie Wonder..", "Bene, scusa. Non sapevo che non vedessi", + // 60 "Ma non mi hai appena detto che non sei cieco?.", "- Ma se non vedi!.", "Beeeene. Scusa. Allora: Ciao : non vedente", "Sono John Hacker, st giocando al Drascula. Tu devi proprio essere il tipico personaggio che mi aiuter in cambio di un oggeto. Vero...?", "Ma... Scusa ciec..- non vedente! .Ma.. . che tipo di mestiere il tuo, di dare falci per soldi, mentre suoni la fisarmonica?.", + // 65 "Ah, si. \324 vero. Ciao non vedente....(cieco)", "Ecco la abbondante quantit di soldi che mi avevi chiesto.", "Mi raccomando", "Ciao straniero.", "E tu... Come sai che sono cieco?", + // 70 "E tu parli come il figlio di Bill Cosby e non ti offendo.", "No, se non vedo.", "E non lo sono.", "-Oh, certo!. Come non vedo mi chiamano cieco, no?.", "-Ciao Straniero! e cosa fai in Transilvania?", + // 75 "Corretto straniero. Per una abbondante quantit di soldi, ti dar in cambio una falce, per quando ne avrai bisogno.", "Shhhhhh. Sono trafficante di falci, devo proprio dissimulare.", "Perche mi lo hai detto prima, no?", "Grazie straniero. Ecco la tua falce. Un oggeto che ti sar molto utile pi avanti...... davvero.", + "", + // 80 + "", + "", + "", + "bla, bla, bla." }, }; const char *_textb[][15] = { { + // 0 "", "I'M HERE, DRINKING", "THEY ARE ALL DEAD, THANKS. BURPP...", "YES, SURE...", "SHE FEELS ATTRACTED TO UNCLE DESIDERIO", + // 5 "EVEN BETTER, UNCLE DESIDERIO'S DEAD BODY", "MY UNCLE. HE WENT TO CASTLE AND NEVER CAME BACK", "WELL, HE CAME BACK JUST A LITTLE. IF ONLY VON BRAUN HADN'T SCREWED THINGS UP MY UNCLE WOULD BE DRINKING WITH US NOW", "NOTHING...", "WELL, YES !. THAT MEAN MAN HAS TERRIFIED US ALL", + // 10 "FROM TIME TO TIME HE COMES DOWN TO THE VILLAGE AND TAKES SOMEONE WITH HIM.", "A LITTLE WHILE AFTER WE JUST A FEW FOUND BODY PARTS. I THINK HE IS DEALING WITH ORGANS OR SOMETHING LIKE THAT", "THE ONLY PERSON IN THE VILLAGE WHO KNOWS HOW TO END UP WITH DRASCULA IS A CULTIVATED PERSON", @@ -2972,16 +3590,19 @@ const char *_textb[][15] = { "HE IS THE ONLY ONE WHO COULD HELP US WITH DRASCULA, AND HE DOESN'T WANT TO HEAR ABOUT US. HOW DO YOU LIKE THAT?", }, { + // 0 "", "AQUI, BEBIENDO", "MUERTOS TODOS. GRACIAS. BURRP ", "SI, NO VEAS... ", "ESTA POR EL TIO DESIDERIO", + // 5 "Y ESTA OTRA, POR EL CADAVER DEL TIO DESIDERIO", "MI TIO. FUE AL CASTILLO Y NO VOLVIO", "BUENO, VOLVIO PERO POCO. SI EL VON BRAUN NO HUBIESE METIDO LA PATA MI TIO ESTARIA AQUI BEBIENDO", "NADA... ", "\255BUENO, SI! ESE DESALMADO NOS TIENE ATEMORIZADOS A TODOS", + // 10 "DE VEZ EN CUANDO BAJA AL PUEBLO Y SE LLEVA A ALGUIEN", "POCO DESPUES SOLO ENCONTRAMOS UNOS POCOS RESTOS. CREO QUE ESTA TRAFICANDO CON ORGANOS, O ALGO ASI", "EL UNICO DEL PUEBLO QUE SSABE COMO ACABAR CON DRASCULA TIENE ESTUDIOS", @@ -2989,16 +3610,19 @@ const char *_textb[][15] = { "ES EL UNICO QUE PODRIA AYUDARNOS A ACABAR CON DRASCULA, Y NO QUIERE SABER NADA DE NOSOTROS. \250QUE TE PARECE A TI?", }, { + // 0 "", "HIER, BEI EINEM GUTEN TROPFEN", "ALLE TOT. VIELEN DANK. RueLPS !", "YO, STIMMT...", "DIE HIER IST FueR ONKEL DESIDERIUS", + // 5 "UND DIESE HIER FueR DIE LEICHE VON ONKEL DESIDERIUS", "MEIN ONKEL. ER GING ZUM SCHLOSS UND KAM NICHT ZURueCK", "NAJA, ER KAM NUR IN RESTEN ZURueCK. WENN VON BRAUN SICH NICHT VERTAN HaeTTE, WueRDE ER JETZT MIT UNS EINEN HEBEN", "NICHTS...", "JA STIMMT! DIESER SCHURKE JAGT UNS ALLEN EINE RIESENANGST EIN", + // 10 "AB UND ZU GEHT ER RUNTER INS DORF UND HOLT SICH JEMANDEN", "KURZ DANACH HABEN WIR NUR NOCH RESTE GEFUNDEN, ICH GLAUBE ER HANDELT MIT ORGANEN ODER SO", "DER EINZIGE, DER MIT DRASCULA FERTIGWERDEN KANN, WAR AN DER UNI ", @@ -3006,16 +3630,19 @@ const char *_textb[][15] = { " ER IST DER EINZIGE, DER DRASCULA ERLEDIGEN KoeNNTE UND WILL NICHTS VON UNS WISSEN. WAS HaeLST DU DAVON ?", }, { + // 0 "", "ICI, EN BUVANT", "TOUS MORTS. MERCI. BOURRP", "OUI, VRAIMENT...", "CELLE-CI POUR L'ONCLE DSIR", + // 5 "ET CELLE-L\267 POUR LE CADAVRE D'ONCLE DSIR", "MON ONCLE EST ALL AU CH\266TEAU ET N'EST PAS ENCORE REVENU", "BON, IL EST REVENU MAIS POUR PEU DE TEMPS. SI VON BRAUN N'AURAIT FAIT UN IMPAIR, MON ONCLE DSIR SERAIT ICI EN BUVANT", "RIEN... ", "EH OUI! CE MALIN NOUS A INTIMIDS \267 TOUS", + // 10 "DE FOIS IL DESCEND SUR LE VILLAGE ET ENLEVE QUELQU'UN", "UN PEU PLUS TARD ON NE TROUVE QUE QUELQUES RESTES. JE PENSE QU'IL FAIT DU TRAFIQUE D'ORGANES, OU QUELQUE CHOSE PAREILLE", "LE SEUL DU VILLAGE QUI SAIT COMMENT FINIR AVEC DRASCULA IL A DES \220TUDES", @@ -3023,16 +3650,19 @@ const char *_textb[][15] = { "C'EST LE SEUL QUI POURRAIT NOUS AIDER \267 FINIR AVEC DRASCULA ET LUI NE VEUX RIEN SAVOIR DE NOUS. QU'EN PENSES-TUI?", }, { + // 0 "", "QU\326, BEVENDO", "MORTI TUTTI. GRAZIE. BURRP", "SII, CERTO, SICURO..", "QUESTA PER IL ZIO PEPPINO", + // 5 "E QUEST'ALTRA, PER IL CADAVERE DEL ZIO PEPPINO", "MIO ZIO. FU ANDATO AL CASTELLO, E NON MAI TORNATO", "EEEHH, TORN\220, MA PER POCO TEMPO. SE IL VON BRAUN NON AVESSE SBAGLIATO, MIO ZIO SAREBBE QU\326 BEVENDO", "NIENTE..", "EEH,SI! QUEL MALVAGIO CI HA INTIMORATI", + // 10 "A VOLTE SCENDE AL PAESE E QUANDO SE NE VA SI PORTA QUALCUNO", "UN P\220 DOPO SOLTANTO TROVIAMO QUALQUE RESTO. CREDO CHE TRAFFICA ORGANI O QUALCOSA DEL GENERE", "L'UNICO DEL PAESE CHE SA COME FINIRE CON DRASCULA \220 UNO CHE HA STUDIATO", @@ -3043,155 +3673,185 @@ const char *_textb[][15] = { const char *_textbj[][29] = { { + // 0 "", "ARE YOU ALL RIGHT? HEY, COME ON, WAKE UP! CAN YOU HEAR ME? ARE YOU DEAD?", "NO, MY NAME IS BILLIE JEAN, BUT YOU CAN CALL ME B.J. IT'S SHORTER", "HA, HA...! THAT WAS A GOOD ONE!", "WELL, JHONNY. YOU SEE, I WAS HERE JUST READY TO GO TO BED WHEN I HEARD THIS STRONG NOISE DOWN THE CORRIDOR", + // 5 "I DIDN'T PAY ATTENTION AT FIRST, BUT AFTER ABOUT TWO HOURS OR SO I COULDN'T SLEEP AND WENT OUT FOR A WALK", "AS I OPENED THE DOOR I WAS SHOCKED TO FIND YOU THERE, LYING ON THE FLOOR. I THOUGHT YOU WERE DEAD, I SWEAR... HA, HA, SILLY BILLY", "I WAS GOING TO GIVE YOU THE KISS OF LIFE BUT IT WASN'T NECESSARY BECAUSE YOU STARTED TO TALK", "YOU SAID SOMETHING ABOUT A SCARECROW. I WAS VERY SCARED, YOU KNOW. IT'S A REAL SHOCK WHEN A DEAD PERSON STARTS TALKING RIGHT?", "ISN'T THAT RIGHT? WELL, THEN I MANAGED TO BRING YOU TO MY ROOM THE BEST WAY I COULD. I PUT YOU IN BED... AND THAT'S ALL... HA, HA, HA...", + // 10 "OH, NO...! IT WASN'T THE HIT, HA, HA. I JUST STEEPED ON YOUR GLASSES BY ACCIDENT", "YOU REALLY LOOK GOOD WITH THOSE GLASSES. I KNOW HE'S NOT FERNANDO LANCHA, BUT I FIND HIM ATTRACTIVE...", "YES, YES, I DO... COME ON, HOLD ME AND KISS ME TIGHT", "OH JHONNY, HONEY, THANKS GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND THEN HE'S GONE DOWNSTAIRS TO SEE THE FOOTBALL GAME", "YES, IT'S TRUE. PLEASE, SET ME FREE", + // 15 "NO, I'M SORRY. I USED THEM ALL IN THE TOWER WHEN I WAS TRYING TO LIBERATE WHILE YOU LET ME DOWN", "JOHNNY, IS THAT YOU? OH, GOD, GREAT! I KNEW YOU'D COME!", "YOU DON'T EVEN KNOW HOW MUCH THAT EVIL DRASCULA HAS MADE ME SUFFER", "FIRSTLY HE BROUGHT ME FLYING OVER HER AND THEN PUT ME IN THIS DISGUSTING ROOM WITHOUT EVEN A MIRROR OR ANYTHING", "I'M TELLING YOU! AND THE WORSE PART IS THAT HE DIDN'T EVEN APOLOGIZE, NOT EVEN ONCE", + // 20 "JHONNY HONEY, WHERE ARE YOU?", "I'M READY TO LEAVE DEAR", "WAIT, I'M GOING TO TAKE A LOOK... NO DARLING, I'M SORRY", "THERE YOU GO...", "\"DEAR JOHNNY\"", + // 25 "I'LL NEVER FORGET YOU BUT I'VE REALIZED THAT THIS JUST COULDN'T WORK OUT RIGHT. TO BE HONEST, I'LL TELL YOU THAT THERE IS ANOTHER MAN. HE'S TALLER, STRONGER", "AND HE HAS ALSO RESCUED ME FROM DRASCULA. HE HAS ASKED ME TO MARRY HIM, AND I HAVE ACCEPTED", "BYE JHONNY. PLEASE DON'T TRY TO FIND SOME KIND OF EXPLANATION. YOU KNOW LOVE IS BLIND AND HAS ITS OWN WAYS", "I HOPE THERE WON'T BE HARD FEELINGS BETWEEN US. REMEMBER THAT I STILL LOVE YOU, BUT ONLY AS A FRIEND", }, { + // 0 "", "\250ESTA USTED BIEN? OIGA, DESPIERTE. \250ME OYE? \250ESTA USTED MUERTO?", "NO, MI NOMBRE ES BILLIE JEAN, PERO PUEDES LLAMARME B.J. ES MAS CORTO", "\255JI, JI! \255QUE BUENO!", "PUES VERAS JOHNY, YO ESTABA AQUI, DISPUESTA A ACOSTARME, CUANDO OI UN FUERTE GOLPE EN EL PASILLO", + // 5 "AL PRINCIPIO NO LE DI MUCHA IMPORTANCIA, PERO A LAS DOS HORAS MAS O MENOS DESCUBRI QUE NO PODIA DORMIR Y DECIDI SALIR A DAR UN PASEO", "Y CUAL NO SERIA MI SORPRESA CUANDO ABRI LA PUERTA Y TE ENCONTRE AHI, EN EL SUELO TIRADO. TE LO JURO QUE PENSE QUE HABIAS MUERTO, JE, JE, TONTA DE MI", "TE FUI A HACER EL BOCA A BOCA, PERO NO FUE NECESARIO PORQUE EMPEZASTE A HABLAR", "DECIAS NO SE QUE DE UN ESPANTAPAJAROS. YO ME LLEVE UN SUSTO MUY GORDO, PORQUE CUANDO UN MUERTO SE PONE A HABLAR ES UNA IMPRESION MUY FUERTE, \250NO CREES?", "\250VERDAD QUE SI? BUENO, PUES COMO PUDE, CARGUE CONTIGO Y TE TRAJE A MI HABITACION. TE PUSE SOBRE LA CAMA... Y ESO ES TODO. JI, JI,JI", + // 10 "OH, NO HA SIDO EL GOLPE, JI, JI. ES QUE SIN QUERER PISE TUS GAFAS", "\255HAY QUE VER QUE BIEN LE SIENTAN LAS GAFAS! YA SE QUE NO ES FERNANDO LANCHA, PERO TIENE UN NO SE QUE QUE QUE SE YO", "SI, SI, QUIERO... VAMOS, ABRAZAME FUERTE, BESAME MUCHO...", "OH JOHNY, CARI\245O, MENOS MAL QUE HAS VENIDO. ESE DESALMADO DE DRASCULA ME HA ATADO A LA CAMA Y LUEGO SE HA IDO ABAJO A VER EL PARTIDO", "SI, ES VERDAD. LIBERAME ", + // 15 "NO, LO SIENTO. GASTE TODAS EN LA MAZMORRA INTENTANDO LIBERARME MIENTRAS TU ME DEJABAS TIRADA", "JOHNY \250ERES TU? \255QUE ALEGRIA! \255SABIA QUE VENDRIAS!", "NO SABES CUANTO ME HA HECHO SUFRIR ESE DESALMADO DE DRASCULA", "PRIMERO ME TRAJO VOLANDO HASTA AQUI Y LUEGO ME ENCERRO EN ESTE CUARTUCHO, SIN ESPEJO NI NADA", "COMO LO OYES. Y LO PEOR ES QUE NO PIDIO PERDON NI UNA SOLA VEZ", + // 20 "JOHNY, QUERIDO. \250DONDE ESTAS?", "ESTOY LISTA PARA QUE ME SAQUES DE AQUI", "ESPERA QUE VOY A MIRAR... NO CARI\245O, LO SIENTO", "TOMA...", "\"QUERIDO JOHNY:", + // 25 "NUNCA PODRE OLVIDARTE, PERO ME HE DADO CUENTA DE QUE LO NUESTRO NO FUNCIONARIA. VOY A SER SINCERA CONTIGO: HAY OTRO HOMBRE; MAS ALTO, MAS FUERTE...", "Y ADEMAS ME HA RESCATADO DE LAS MANOS DE DRASCULA. ME HA PEDIDO EN MATRIMONIO, Y YO HE ACEPTADO", "ADIOS, JOHNY. NO INTENTES DARLE UNA EXPLICACION, PORQUE EL AMOR ES CIEGO Y NO ATIENDE A RAZONES", "ESPERO QUE NO ME GUARDES RENCOR, Y RECUERDA QUE TE SIGO QUERIENDO, AUNQUE SOLO COMO AMIGO\"", }, { + // 0 "", "HALLO, ALLES KLAR ?HEY, WACHEN SIE AUF. HoeREN SIE MICH ? SIND SIE TOT ?", "NEIN, ICH HEISSE BILLIE JEAN., ABER DU KANNST MICH B.J. NENNEN, DAS IST KueRZER", "HI,HI! SUPERGUT !", "JA STELL DIR VOR, HEINZ, ICH WOLLTE MICH HIER GERADE HINLEGEN, ALS ICH EINEN LAUTEN KNALL IM FLUR HoeRTE", + // 5 "ANFANGS HAB ICH NICHT SO DRAUF GEACHTET, ABER NACHDEM ICH 2 STUNDEN LANG NICHT SCHLAFEN KONNTE, GING ICH RUNTER, UM SPAZIERENZUGEHEN", "ICH WAR NATueRLICH BAFF, ALS ICH DICH VOR der tuer LIEGEN SAH. ICH HABE ECHT GEDACHT,DASS DU TOT BIST, HEHE, WIE bloed" "ICH WOLLTE GERADE MUND-ZU-MUND BEATMUNG MACHEN, ABER DANN FINGST DU JA AN ZU REDEN", "DU FASELTEST WAS VON NER VOGELSCHEUCHE UND ICH Hatte ganz schoen schiss,WEIL sprechende tote schon echt UNHEIMLICH sind?", "NICHT WAHR ?NAJA,ICH HABE DICH DANN AUFGEHOBEN UND IN MEIN ZIMMER GETRAGEN UND AUF MEIN BETT GELEGT.... WEITER NICHTS. HI,HI,HI", + // 10 "ACH NEIN, ES WAR NICHT DIE BEULE, HIHI, ICH BIN VERSEHENTLICH AUF DEINE BRILLE GETRETEN ", "MAN MUSS SICH ECHT MAL ANGUCKEN, WIE GUT IHM DIE BRILLE STEHT. ER IST ZWAR NICHT DER MARTINI-MANN, ABER ER HAT WAS WEISS ICH WAS", "JA, JA, ICH WILL. KOMM NIMM MICH UND KueSS MICH...", "OH HEINZ, LIEBLING, GUT DASS DU DA BIST. DIESER WueSTLING VON DRASCULA HAT MICH ANS BETT GEFESSELT UND IST DANN RUNTER UM SICH DAS SPIEL ANZUSEHEN", "JA, WIRKLICH. BEFREIE MICH", + // 15 "NEIN, TUT MIR LEID. ICH HAB ALLE BEIM VERSUCH, AUS DEM VERLIES AUSZUBRECHEN, AUFGEBRAUCHT", "HEINZ, BIST DU ES ? WIE TOLL ! ICH WUSSTE, DASS DU KOMMEN WueRDEST !", "DU AHNST JA NICHT, WIE SEHR ICH WEGEN DIESEM UNGEHEUER VON DRASCULA GELITTEN HABE", "ZUERST IST ER MIT MIR HIERHER GEFLOGEN UND DANN HAT ER MICH IN DIESES LOCH GESPERRT, OHNE SPIEGEL UND GAR NICHTS", "WIE ICHS GESAGT HABE. DAS SCHLIMMSTE IST,DASS ER SICH KEIN EINZIGES MAL ENTSCHULDIGT HAT.", + // 20 "HEINZ, GELIEBTER, WO BIST DU ?", "ICH BIN BEREIT, VON DIR GERETTET ZU WERDEN", "WARTE, ICH GUCK MAL...NEIN, SCHATZ, TUT MIR LEID", "HIER NIMM...", "LIEBER HEINZ !", + // 25 "ICH WERDE DICH NIE VERGESSEN, aber das mit uns funktioniert nicht.ICH gebs zu : ES GIBT EINEN ANDERN. GRoeSSER,STaeRKER...", "UND AUSSERDEM HAT ER MICH AUS DRASCULAS KLAUEN BEFREIT UND UM MEINE HAND ANGEHALTEN,UND ICH HABE JA GESAGT", "LEB WOHL,HEINZ. VERSUCH NICHT EINE ERKLaeRUNG ZU FINDEN, DENN DIE LIEBE IST BLIND UND KENNT KEINE VERNUNFT", "DU BIST MIR HOFFENTLICH NICHT BoeSE. DENK IMMER DARAN DASS ICH DICH IMMER NOCH LIEBE, WENN AUCH NUR ALS FREUND", }, { + // 0 "", "VOUS ALLEZ BIEN? ALLEZ, REVEILLEZ-VOUS! VOUS M'ENTENDEZ? VOUS \322TES MORT?", "NON, MON NOM EST BILLIE JEAN, MAIS TU PEUX M'APPELLER B.J., C'EST PLUS COURT", "HI! HI! -C'EST BON!", "EN VRIT JOHNY, J'TAIS L\267, PR\322TE \267 ME COUCHER, ET J'AI ENTENDU UN FORT COUP DANS LE COULOIR", + // 5 "AU DBUT JE N'Y AI PAS DONN D'IMPORTANCE, MAIS APR\324S JE ME SUIS RENDUE COMPTE QUE NE POUVAIS PAS M'ENDORMIR ET SUIS SORTIE FAIRE UNE PROMENADE", "ET \267 MON GRAN TONNEMENT, QUAND J'AI OUVERT LA PORTE, JE T'AI TROUV L\267, PAR TERRE. J'TAIS SUR LE POINT DE PENSER QUE TU AVAIS MORT, HE!, QUE JE SUIS B\322TE!", "J'ALLAIS TE FAIRE LE BOUCHE-\267-BOUCHE MAIS IL N'A T PAS NCESSAIRE PUISQUE TU AS COMMENC \267 PARLER", "TU DISAIS \267 SAVOIR QUOI D'UN POUVANTAIL. CELA M'A FAIT UNE GRANDE PEUR, PARCE QUE QUAND UN MORT SE MET \267 PARLER L'IMPRESSION EST TR\324S FORTE, NE CROIS-TU PAS?", "C'EST VRAI, NON? ENFIN. JE ME SUIS DBROUILLE POUR TE PRENDRE SUR MOI, T'EMMENER DANS MA CHAMBRE ET T'INSTALLER SUR LE LIT... ET VOIL\267 TOUT. HI! HI! HI!", + // 10 "HO! CE N'EST PAS \267 CAUSE DU COUP, HI! HI! CE QUE J'AI MARCHE SUR TES LUNETTES PAR ACCIDENT", "\220VIDEMMENT LES LUNETTES LUI FONT DU BIEN! JE SAIS BIEN QUIL N'EST PAS FERNANDO LANCHA, MAIS IL A UN AIR QU'ALLEZ DONC SAVOIR", "OUI, OUI, JE VEUX... VAS-Y, EMBRASSE-MOI FORT, EMBRASSE-MOI BEAUCOUP...", "OH,JOHNY!, MON AMOUR! HEUREUSEMENT QUE TU ES VENU. CE M\220CHANT DRASCULA M'A ATTACH\220 AU LIT ET APR\324S IL EST PARTI EN BAS VOIR LE MATCH", "OUI, C'EST VRAI, LIB\324RE-MOI", + // 15 "NON, SUIS D\220SOL\220E. JE LES AI TOUTES UTILIS\220ES, DANS LE CACHOT, EN T\266CHANT DE ME LIB\220RER ALORS QUE TOI TU M'ABANDONNAIS", "JOHNY, C'EST TOI? -QUELLE JOIE! -JE SAVAIS QUE TU VIENDRAIS!", "TU NE PEUX PAS SAVOIR COMBIEN M'A FAIT SOUFFRIR CE M\220CHANT DRASCULA", "D'ABORD IL M'EMMEN\220 EN VOLANT JUSQU'ICI ET APR\324S IL M'ENFERM\220E DANS CE TAUDIS, SANS MIROIR NI RIEN D'AUTRE", "COMME TU L'ENTENDS. ET LE PIRE C'EST QUIL NE M'A PAS DEMAND\220 PARDON N'UNE SEULE FOIS ", + // 20 "JOHNY, MON CH\220RI, O\353 EST-CE QUE TU ES?", "JE SUIS PR\322TE POUR QUE TU M'EN SORTES D'ICI", "ATTEND, JE VAIS REGARDER... NON CH\220RI, JE REGRETTE", "TIENS...", "\"CHER JOHNY", + // 25 "JAMAIS JE T'OUBLIERAI, MAIS JE ME SUIS APER\200UE QUE NOTRE AFFAIRE NE POUVAIT PAS MARCHER. JE VAIS \322TRE SINC\324RE AVEC TOI: IL Y A UN AUTRE HOMME, PLUS GRAND...", "ET ENCORE IL M'A LIB\220R\220 DES MAINS DE DRASCULA. IL M'A DEMAND\220 EN MARIAGE, ET MOI J'AI ACCEPT\220", "AU REVOIR, JOHNY. N'Y CHERCHES PAS UNE EXPLICATION, L'AMOUR EST AVEUGLE ET N'\220COUTE PAS DES RAISONS", "J'ESP\324RE QUE TU SERAS SANS RANCUNE, ET N'OUBLIES PAS QUE JE T'AIME ENCORE, MAIS EN AMI SEULEMENT\"", }, { + // 0 "", "ST\265 BENE? SENTA, PUO SENTIRMI? SI \220 MORTO?", "NO, IL MIO NOME BILLIE JEAN, MA PUOI CHIAMARMI B.J. PI \351 BREVE", "HI,HI!- CHE BUONO!", "NON SO JOHNY, ERO QU\326, STAVO PER ADDORMENTARMI, QUANDO HO SENTITO UN FORTE RUMORE NEL CORRIDOIO", + // 5 "PRIMA NON GLI HO DATTO IMPORTANZA, MA DUE ORE DOPO HO SCOPERTO CHE NON RIUSCIVO A ADDORMENTARMI E SONO uscita A FARE QUATTRO PASSI", "E FIGURATI LA SORPRESA QUANDO HO APERTO LA PORTA E TI HO TROVATO PER TERRA. TI GIURO, HO PENSATO CH'ERI MORTO..., MA COME SONO SCIOCCA", "VOLEVO FARTI IL BOCCA A BOCCA, MA NON C'ERA BISOGNO PERCHE SUBITO HAI COMINCIATO A PARLARE", "HAI DETTO NON SO CHE DI UN SPAVENTAPASSERI. CHE COLPO.....!, PERCHE QUANDO UN MORTO SI METTE A PARLARE FA UN COLPO GRANDISSIMO!", "VERO DI SI? NON SO COME SONO RIUSCITA, TI HO TRASPORTATO ALLA MIA CAMERA, TI HO MESSO SUL MIO LETTO E.... NIENTE PI\351 .", + // 10 "NO, NON \220 STATA LA BOTTA, HI, HI. \220 PERCHE ... HO PESTATO I TUOI OCCHIALI", "MAMMA MIA MA COM'\220 BELLO CON GLI OCCHIALI! SO CHE NON \220 FERNANDO LANCHA, MA HA QUALCOSA CHE MI PIACE MOLTISSIMO", "SI,SI, VOGLIO... ABBRACIAMI FORTE, BACIAMI MOLTO..", "OH JOHNY, CARO, MENO MALE CHE SEI VENUTO. QUEL MALVAGIO, DRASCULA, MI HA LEGATO AL LETTO E POI SE NE \220 ANDATO A GUARDARE LA PARTITA", "SI, \220 VERO, LIBERAMI", + // 15 "NO, MI DISPIACE. HO UTILIZZATO TUTTE IN CARCERE PROBANDO LIBERARMI QUANDO TU MI AVEVI LASCIATA", "JOHNY, SEI TU? - BENISSIMO. LO SAPEVO ", "NON TI FIGURI QUANTO MI HA FATTO SOFFRIRE DRASCULA", "PRIMA MI HA PORTATO VOLANDO FINO QUA E POI MI HA RICHIUSA IN QUESTA CAMERACCIA CHE NON HA N\220 UNO SPECCHIO", "COME HAI SENTITO. E LO PEGLIORE: N\220 UNA VOLTA SI \220 SCUSATO", + // 20 "JOHNY, CARO. DOVE SEI?", "SONO PRONTA, FAMI USCIRE DA QU\326 ", "ASPETTA, VADO A GUARDARE... NO CARO, MI DISPIACE", "PRENDI..", "\"CARO JOHNY:", + // 25 "MAI POTR\220 DIMENTICARTI, MA NON SAREMO MAI FELICI INSIEME. SAR\220 SINCERA CON TE : C'\220 NE UN ALTRO; PI\351 ALTO, PI\351 FORTE..", "ANZI MI HA LIBERATO DA DRASCULA. MI HA CHIESTO LA MANO E HO DETTO DI SI", "ADIO JOHNY. NON CERCARE UNA SPIEGAZIONE, PERCHE L'AMORE \220 CIECO.", @@ -3202,130 +3862,155 @@ const char *_textbj[][29] = { const char *_texte[][24] = { { + // 0 "", "YOU... HEY YOU!", "DON'T GIVE ME THAT CRAP ABOUT A DEAD BODY OK?", "I'M ALIVE. IT'S JUST THAT I'M STARVING", "WELL, YOU SEE. I WAS THE DRUNKARD OF THE VILLAGE, JUST KEEPING UP WITH THE FAMILY TRADITION, YOU KNOW? ONE NIGHT DRASCULA KIDNAPPED ME TO TAKE MY ORGANS AWAY", + // 5 "SINCE ALCOHOL STILL KEEPS ME QUITE YOUNG, I'M HERE LIKE A SCRAP YARD. EVERYTIME HE NEEDS SOMETHING FOR THE MONSTER HE IS MAKING, HE COMES AND TAKES IT FROM ME", "IT HURT AT FIRST, BUT I DON'T CARE ANYMORE", "I DON'T KNOW. I GUESS IT'S HIS GRADUATE PROJECT", "I'M DESIDERIO, AND I CAN HELP YOU IN ANYTHING YOU NEED", "THE TRUTH IS THAT I DON'T REALLY FEEL LIKE IT, BUT THANKS VERY MUCH ANYWAY SIR", + // 10 "YEAH, IT'S YOU", "WHY DO ALL ADVENTURE GAMES END UP WITH A SUNRISE OR A SUNSET?", "DO ALL THESE NAMES BELONG TO THE CREATORS OF THE GAME?", "AREN'T THEY ASHAMED TO BE SEEN BY EVERYBODY?", "JESUS, THAT EMILIO DE PAZ IS EVERYWHERE!!", + // 15 "REALLY?", "YES", "WELL, DON'T MAKE A FUSS ABOUT IT", "HEY WEREWOLF, BY THE WAY...", "DIDN'T YOU FALL OFF A WINDOW AND GOT BADLY HURT", + // 20 "IF AT LEAST IT WASN'T ALWAYS THE SAME ONES...", "HE'S BEEN OUT FOUR TIMES ALREADY", "I'D LIKE TO BE A MODEL", "ALL RIGHT, AND WHAT ARE YOU GOING TO DO?", }, { + // 0 "", "EO, USTED", "\255QUE MUERTO NI OCHO CUARTOS!", "ESTOY VIVO, LO QUE PASA ES QUE YO PASO HAMBRE, \250SABE USTED? ", "PUES VERA, SE\245OR. YO ERA EL BORRACHO DEL PUEBLO, DIGNO SUCESOR DE UNA FAMILIA DE ILUSTRES BORRACHUZOS, Y UNA NOCHE DRASCULA ME SECUESTRO PARA ROBARME LOS ORGANOS", + // 5 "RESULTA QUE COMO ME CONSERVO EN ALCOHOL, ME TIENE AQUI EN PLAN DESSGUACE. CADA VEZ QUE NECESITA ALGO PARA EL MONSTRUO QUE ESTA CREANDO VIENE Y ME LO COGE", "AL PRINCIPIO ME DOLIA, NO CREA, PERO YA ME DA IGUAL", "NO SE, SERA SU PROYECTO DE FIN DE CARRERA", "MI NOMBRE ES DESIDERIO, PARA SERVIRLE A USTED", "PUES LA VERDAD ES QUE NO TENGO MUCHA GANA, PERO MUCHAS GRACIAS DE TODAS MANERAS, SE\245OR", + // 10 "SI, TU MISMO", "\250POR QUE TODOS LOS JUEGOS DE AVENTURAS TERMINAN CON UN AMANECER O UNA PUESTA DE SOL? ", "\250Y TODOS ESTOS NOMBRES SON DE LOS QUE HAN HECHO EL JUEGO?", "\250Y NO LES DA VERG\232ENZA SALIR Y QUE LOS VEA TODO EL MUNDO?", "JOLIN, NO HACE MAS QUE SALIR \"EMILIO DE PAZ\" ", + // 15 "\250DE VERDAD?", "SI", "PUES NO ES PARA TANTO", "POR CIERTO HOMBRE LOBO...", "... \250NO CAISTE POR UNA VENTANA Y TE HICISTE POLVO?", + // 20 "SI AL MENOS NO FUESEN SIEMPRE LOS MISMOS", "ESE YA HA SALIDO CUATRO VECES", "ME GUSTARIA SER MODELO", "YA, \250Y TU QUE VAS A HACER?", }, { + // 0 "", "EJ, SIE DAA", "DU BIST WOHL BESOFFEN ODER WAS ? !", "ICH BIN LEBENDIG, ABER ICH HABE HUNGER, WISSEN SIE ?", "TJA,ICH WAR DER DORFSaeUFER, STOLZER abkomme EINER DORFSaeUFERsippe UND EINES NACHTS holte mich DRASCULA, UM MIR DIE ORGANE ZU KLAUEN", + // 5 "WEIL ICH MICH IN ALKOHOL gut HALTE BIN ICH SEIN ERSATZTEILLAGER. IMMER WENN ER WAS FueR SEIN MONSTERCHEN BRAUCHT, BEDIENT ER SICH BEI MIR", "AM ANFANG TAT DAS HoeLLISCH WEH, ABER JETZT MERK ICH SCHON NICHTS MEHR", "KEINE AHNUNG, ES WIRD WOHL SEINE DIPLOMARBEIT SEIN", "ICH HEISSE DESIDERIUS UND STEHE ZU IHREN DIENSTEN", "NAJA, EIGENTLICH HABE ICH KEINE GROSSE LUST ABER VIELEN DANK JEDENFALLS, MEIN HERR", + // 10 "JA,NUR ZU", "WARUM HoeREN ALLE SPIELE MIT SONNENAUFGANG ODER SONNENUNTERGANG AUF ?", "UND SIE HABEN DIE NAMEN VON DEN MACHERN DIESES SPIELS BENUTZT ?", "UND SIE SCHaeMEN SICH NICHT SICH ALLER WELT ZU OFFENBAREN ?", "SCHEIBENKLEISTER. SCHON WIEDER DER PROGRAMMIERER", + // 15 "WIRKLICH ?", "JA", "SO SCHLIMM IST ES AUCH WIEDER NICHT", "APROPOS WERWOLF....", "....BIST DU NICHT AUS EINEM FENSTER GEFALLEN UND ZU STAUB GEWORDEN ?", + // 20 "WENN ES WENIGSTENS NICHT IMMER DIESELBEN WaeREN", "DER IST SCHON 4 MAL AUFGETAUCHT", "ICH WaeRE GERN FOTOMODELL", "KLAR, UND WAS WILLST DU SPaeTER MAL MACHEN ?", }, { + // 0 "", "OH\220! VOUS!", "QUEL MORT NI QUELLE HISTOIRE!", "JE SUIS VIVANT. C'EST QUE J'AI FAIM, VOUS SAVEZ? ", "J'TAIS L'IVROGNE DU VILLAGE, LE DIGNE REPRSENTANT D'UN FAMILLE D'ILLUSTRES SO\352LARDS, ET DRASCULA M'A SQUESTR UNE NUIT POUR ME VOLER LES ORGANES", + // 5 "COMME JE ME CONSERVE EN ALCOOL, IL ME TIENS ICI EN PLAN DBALLAGE. \267 CHAQUE FOIS QU'IL A BESOIN DE QUELQUE CHOSE POUR SON MONSTRE, IL LE PRENDRE", "AU DBUT A ME FAISAIT MAL, MAIS JE M'EN FICHE DJ\267", "JE NE SAIS PAS, MAIS CE SERA SON PROJET FIN D'TUDES", "MON NOM EST DSIR, POUR VOUS SERVIR", "VRAIMENT JE N'AI PAS UNE ENVIE FOLLE, MAIS MERCI QUAND M\322ME, MONSIEUR", + // 10 "OUI, TOI M\322ME", "POURQUOI TOUS LES JEUX D'AVENTURES FINISSENT AVEC UNE AUBE OU UN COUCHER DU SOLEIL? ", "ET VOIL\267 LES NOMS DE TOUS QUI ON FAIT LE JEU?", "ET N'ONT-ILS PAS LA HONTE DE SE MONTRER ET QUE TOUT LE MONDE LES VOIT?", "AH ZUT! IL NE FAIT QUE SORTIR \"EMILIO DE PAZ\" ", + // 15 "C'EST VRAI", "OUI", "EH BIEN, IL NE FAUT PAS EXAG\220RER", "EN FAIT HOMME-LOUP...", "...N'EST-TU PAS TOMB\220 D'UNE FEN\322TRE EN TE BR\220SILLANT?", + // 20 "SI DU MOINS N'\220TAIENT PAS TOUJOURS LES M\322MES...", "CELUI-L\267 EST D\220J\267 SORTI QUATRE FOIS", "J'AIMERAIS \322TRE MANNEQUIN", "PARFAITEMENT. ET TOI, QUE VAS-TU FAIRE?", }, { + // 0 "", "EO, LEI", "MA CHE DICI!", "SONO VIVO, MA HO SEMPRE MOLTA FAME, SA LEI?", "IO ERO IL BEONE DEL PAESE, DEGNO SUCCESSORE DI UNA FAMIGLIA DI ILLUSTRI BEONI, E UNA NOTTE DRASCULA MI SEQUESTR\220 PER RUBARMI GLI ORGANI", + // 5 "mi utilizza COME UNO SCASSO, OGNI VOLTA CHE HA BISOGNO DI QUALCOSA PER IL MOSTRO CHE ST\265 CREANDO VIENE QUA E MI LO toglia", "AL INIZIO MI FACEVA MALE, MA ORA NON FA NIENTE", "NON SO, SAR\265 LA SUA TESINA DI FINE DI LAUREA", "IL MIO NOME PEPPINO, PER SERVIRGLI", "LA VERIT\265 CHE NON HO MOLTA VOGLIA, COMUNQUE GRAZIE MILE, SIGNORE", + // 10 "SI, PROPRIO TU", "PER CHE TUTTI I VIDEO-GIOCHI D' AVVENTURE FINISCONO CON UN'ALBEGGIARE O UN TRAMONTO?", "E TUTTI QUESTI NOMI SONO DI CHI HANNO FATTO IL GIOCO?", "E NON SI VERGOGNANO DI USCIRE ED ESSERE VISTI DA TUTTI QUANTI?", "UFFA, SOLTANTO ESCI \"EMILIO DE PAZ\"", + // 15 "DAVVERO?", "SI", "NON \220 PER METTERSI COS\326 ", "CERTO LUPO-MANNARO..", "... MA NON SEI CADUTO DA UNA FINESTRA E TI HAI FATTO MALE?", + // 20 "SE PER UNA VOLTA NON FOSSENO SEMPRE GLI STESSI", "QUELLO \220 GIA USCITO QUATRO VOLTE", "MI PIACEREBBE ESSERE TOP MODEL", @@ -3336,176 +4021,211 @@ const char *_texte[][24] = { const char *_texti[][33] = { { + // 0 "", "MASTER, I THINK THIS IS NOT WORKING", "I AM POSITIVE, MASTER", "I'M SORRY MASTER", "ARE YOU GOING TO BRING HERE ANOTHER CRAZY SCIENTIST? I'LL TELL YOU THAT THE LABORATORY IS ALREADY PACKED UP, AND BESIDES, THEY'RE ALL OUT OF DATE", + // 5 "HUSH MASTER, THE FEMINIST COULD HEAR YOU", "DAMNED IT!", "I DIDN'T EXPECT YOU SO SOON, MASTER", "QUITE BAD MASTER. THERE MUST BE SOME PROBLEMS WITH THE SATELLITE AND I JUST CAN'T RECEIVE ANYTHING. BESIDES THERE ARE SOME INTERFERENCES BECAUSE OF THE STORM", "WHAT DO I KNOW, MASTER?", + // 10 "YES, MY MASTER", "MASTER", "DO YOU KNOW WHAT TIME IS IT?", "WHAT? OH, THAT SCARED ME!. YOU ARE THE \"NIGHT-CLEANING GUY\", RIGHT?", "I'M IGOR, THE VALET. YOU CAN START WITH THE BALL ROOM. THERE'S BEEN A SUPER NATURAL ORGY YESTERDAY AND IT LOOKS LIKE SHIT", + // 15 "IF YOU NEED ANYTHING, JUST BUY IT", "IT'S THE TAX RETURN APPLICATION FORM, CAN'T YOU SEE IT?", "NEITHER DO I. FIRST OF ALL THE NUMBERS ARE VERY SMALL AND ALSO I CAN'T SEE MUCH AT THIS DISTANCE.", "NO WAY! THEY MAKE ME LOOK UGLY", "OH, WELL. IT'S JUST LIKE A CRAZY PARTY THAT THE MASTER ORGANIZES WITH HIS FRIENDS EACH TIME SOME IDIOT COMES ALONG TRYING TO KILL HIM", + // 20 "THEY TAKE HIS EYES OUT. THEN, POUR SOME LEMON JUICE SO THAT IT ITCHES TO DEATH, AND THEN...", "NO", "WHAT DO YOU MEAN WHY NOT? DO YOU KNOW WHAT TIME IT IS?", "YES, IT'S WINTER", "SEE YOU LATER", + // 25 "DON'T EVEN THINK ABOUT IT!", "WELL, THAT'S ENOUGH FOR TODAY. I'M GOING TO HAVE SUPPER", "MAN, I ALWAYS FORGET TO LOCK IT, RIGHT?", "THE HELL WITH IT!", "WHAT? OH, YOU SCARED ME MASTER, I THOUGHT YOU WERE ASLEEP", + // 30 "OH, BY THE WAY, I TOOK THE LIVING-ROOM KEYS SO THAT YOU CAN WATCH THE EARLY MORNING CARTOONS WITHOUT WAKING ME UP", "YOU'VE GOT ANOTHER COLD MASTER? DAMN IT! I TOLD YOU TO GET SOME HEATING IN HERE...", "ALL RIGHT, JUST TAKE YOUR ASPIRIN AND GO TO BED TO SWEAT FOR A WHILE. GOOD NIGHT", }, { + // 0 "", "MAESTRO, CREO QUE ESTO NO RULA", "ESTOY SEGURISIMO, MAESTRO...", "LO SIENTO, MAESTRO", "\250VA A TRAER OTRO DE CIENTIFICO LOCO? LE ADVIERTO QUE TENEMOS EL LABORATORIO LLENO Y ESTAN TODOS CADUCADOS", + // 5 "CALLE, MAESTRO, QUE COMO LE OIGAN LAS FEMINISTAS", "HAY QUE JOROBARSE", "\255MAESTRO! \255NO LE ESPERABA TAN PRONTO!", "MAL MAESTRO, DEBE HABER PROBLEMAS CON EL SATELITE Y NO CONSIGO SINTONIZAR LA IMAGEN. ADEMAS LA TORMENTA PRODUCE INTERFERENCIAS", "\250Y A MI QUE ME CUENTA, MAESTRO?", + // 10 "SI, MAESTRO", "MAESTRO", "\250SABE LA HORA QUE ES?", "\250EH? \255AH, QUE SUSTO ME HAS DADO! TU ERES EL DE \"LIMPIEZA NOCTURNA\"\250NO?", "YO SOY IGOR, EL MAYORDOMO. PUEDES EMPEZAR POR EL SALON DE BAILE. AYER HUBO ORGIA SOBRENATURAL Y ESTA HECHO UNA MIERDA", + // 15 "SI NECESITAS ALGO, LO COMPRAS", "LA DECLARACION DE LA RENTA \250ES QUE NO LO VES?", "PUES YO TAMPOCO, PORQUE ENTRE QUE LOS NUMEROS SON MUY CHICOS, Y YO QUE NO VEO BIEN DE LEJOS...", "\255NI HABLAR! ME HACEN PARECER FEO", "BAH, ES UN FESTORRO QUE SE MONTA EL MAESTRO CON SUS COLEGAS CADA VEZ QUE LLEGA ALGUN IMBECIL QUERIENDO ACABAR CON EL", + // 20 "PRIMERO LE SACAN LOS OJOS; LUEGO LE ECHAN ZUMO DE LIMON PARA QUE LE ESCUEZA; DESPUES...", "NO", "\250COMO QUE POR QUE NO? \250TU HAS VISTO LA HORA QUE ES?", "EN INVIERNO, SI", "HASTA LUEGO", + // 25 "\255NI SE TE OCURRA!", "BUENO, POR HOY YA VALE. ME VOY A CENAR", "\255Y QUE SIEMPRE SE ME OLVIDA CERRAR CON LLAVE!", "\255HAY QUE JOROBARSE!", "\250EH? \255AH! QUE SUSTO ME HA DADO, MAESTRO. CREIA QUE ESTABA DURMIENDO", + // 30 "AH, POR CIERTO, TOME LAS LLAVES DE LA SALA DE ESTAR Y ASI NO ME MOLESTA MA\245ANA TEMPRANO SI QUIERE VER LOS DIBUJOS", "\250QUE, YA SE HA RESFRIADO OTRA VEZ, MAESTRO? HAY QUE JOROBARSE. SI SE LO TENGO DICHO, QUE PONGA CALEFACCION... ", "BUENO, TOMESE UNA PASTILLA DE ACIDOACETIL SALICILICO Y HALA, A SUDAR. BUENAS NOCHES", }, { + // 0 "", "MEISTER, ICH GLAUBE, DAS KLAPPT NICHT", "ICH BIN ABSOLUT SICHER, MEISTER....", "TUT MIR LEID, MEISTER", "NOCH SO EINEN VERRueCKTEN WISSENSCHAFTLER ? ABER DAS LABOR IST DOCH VOLL MIT IHNEN UND ALLE SIND ueBER DEM VERFALLSDATUM", + // 5 "SEIEN SIE STILL MEISTER. WENN DAS DIE FEMINISTINNEN HoeREN", "GRueNSPAN UND ENTENDRECK", "MEISTER! ICH HABE SIE NOCH GAR NICHT ERWARTET !", "SCHLECHT, MEISTER. ES GIBT WOHL PROBLEME MIT DER SCHueSSEL UND ICH BEKOMME DAS BILD EINFACH NICHT KLAR. UND DANN DAS GEWITTER !", "UND WIESO ERZaeHLEN SIE MIR DAS, MEISTER ?", + // 10 "JA, MEISTER", "MEISTER", "WISSEN SIE, WIEVIEL UHR ES IST ?", "Hae ?OH, DU HAST MICH GANZ SCHoeN ERSCHRECKT. BIST DU VON \"BLITZ UND BLANK BEI MONDESSCHEIN\"", "ICH BIN IGOR, DER HAUSVERWALTER.DU KANNST MIT DEM WOHNZIMMER ANFANGEN. GESTERN HATTEN WIR EINE ueBERNATueRLICHE ORGIE UND ES SIEHT AUS WIE im SAUSTALL", + // 15 "KAUF ALLES WAS DU BRAUCHST !", "DIE STEUERERKLaeRUNG.SIEHST DU DAS NICHT ?", "ICH AUCH NICHT, WEIL DIE ZAHLEN SCHON MAL SEHR KLEIN SIND UND ICH DOCH kurzsichtig bin....", "VON WEGEN ! SIE MACHEN MICH HaeSSLICH", "PAH, DAS IST EINE RIESENFETE DIE DER MEISTER JEDESMAL DANN ABZIEHT, WENN IRGENDSOEIN IDIOT KOMMT, DER IHN ERLEDIGEN WILL", + // 20 " ZUERST REISSEN SIE IHM DIE AUGEN AUS DANACH GIESSEN SIE ZITRONENSAFT DRueBER DAMIT ES SCHoeN BRENNT UND DANN...", "NEIN", "WIE WARUM NICHT ? WEISST DU WIEVIEL UHR ES IST ?", "im WINTER JA", "TSCHueSS", + // 25 "WAG ES BLOOOSS NICHT !", "GUT, FueR HEUTE REICHTS, DAS ABENDESSEN RUFT", "IMMER VERGESSE ICH ZUZUSCHLIESSEN !", "VERDAMMTER MIST NOCHMAL !", "HaeH ?AH !SIE HABEN MICH GANZ SCHoeN ERSCHRECKT, MEISTER. ICH DACHTE SIE SCHLAFEN", + // 30 "ACH,ueBRIGENS, ICH HABE DIE WOHNZIMMERSCHLueSSEL GENOMMEN. SO NERVEN SIE MICH MORGEN FRueH NICHT MIT IHREN ZEICHENTRICKSERIEN", "ACH, SIE HABEN SICH SCHON WIEDER ERKaeLTET, MEISTER ? ICH HAB JA IMMER SCHON GESAGT, SIE SOLLEN DIE HEIZUNG ANMACHEN...", "NAJA, SCHLUCKEN SIE EINE SALICILACETYLSaeURE-TABLETTE UND AB INS BETT ZUM SCHWITZEN. GUTE NACHT", }, { + // 0 "", "MA\327TRE, JE CROIS QUE \200A NE ROULE PAS", "J'EN SUIS TR\324S S\352R, MA\327TRE...", "JE LE REGRETTE, MA\327TRE", "IL APPORTERA UN AUTRE DE SCIENTIFIQUE FOU? JE VOUS PRVIENS QUE LE LABORATOIRE EN EST PLEIN ET TOUS SONT PRIMS", + // 5 "TAISEZ-VOUS, MA\327TRE, SI LES FMINISTES VOUS COUTENT...", "CE QU'IL FAUT SUPPORTER!", "MA\327TRE! -JE NE VOUS ATTENDAIT PAS SI T\342T!", "A VA MAL MA\327TRE. IL DOIT AVOIR DES PROBL\324MES AVEC LE SATELLITE ET JE NE RUSSIT PAS \267 SINTONISER L'IMAGE. ET ENCORE L'ORAGE PRODUIT DES INTERFRENCES.", "CANCANS QUE TOUT CELA, MA\327TRE!", + // 10 "OUI, MA\327TRE", "MA\327TRE", "QUELLE HEURE IL EST?", "H\220? -AH! TU M'AS FAIT PEUR! TU EST CELUI DU \"NETTOYAGE DE NUIT\", NON?", "JE SUIS IGOR, LE MAJORDOME. TU PEUX COMMENCER PAR LE SALON DE BAL. HIER IL Y A EU UNE ORGIE SURNATURELLE ET C'EST UNE SALOPERIE", + // 15 "SI TU AS BESOIN DE QUELQUE CHOSE, ACHETE-EN!", "LA D\220CLARATION D'IMP\342TS, NE LE VOIS-TU PAS?", "EH BIEN, MOI NON PLUS, CAR \267 CAUSE DE SI PETITS NUM\220ROS ET MA DIFFICULT\220 POUR BIEN VOIR DE LOIN...", "ON N'EN PARLE PLUS! ILS ME FONT PARA\327TRE LAID", "BAH! C'EST UNE BELLE F\322TE QUE LE MA\327TRE ORGANISE AVEC SES COLL\324GUES \267 CHAQUE FOIS QU'UN IMB\220CILE ARRIVE ET VEUT FINIR AVEC LUI", + // 20 "D'ABORD ON LUI ARRACHE LES YEUX; APR\324S, ON LUI VERSE DE JUS DE CITRON POUR QUE \200A LUI CUISE; APR\324S...", "NON", "POURQUOI PAS? TU AS VU L'HEURE QU'IL EST?", "EN HIVER, OUI", "AU REVOIR", + // 25 "N'Y PENSES M\322ME PAS!", "BON, \200A VA POUR AUJOURD'HUI. JE VAIS D\327NER", "J'OUBLIE TOUJOURS FERMER \267 CL\220, H\220LAS!", "QUEL ENNUI!", "H\220? -VOUS M'AVEZ FAIT PEUR, MA\327TRE. JE PENSAIS QUE VOUS DORMIEZ", + // 30 "H\220, MA\327TRE! PRENEZ LES CL\220S DE LA SALLE DE S\220JOUR, AINSI DONC SI VOUS VOULEZ VOIR LES DESSINS ANIM\220S DEMAIN DE BONNE HEURE NE ME D\220RANGEREZ PAS", "QUOI? VOUS VOUS \322TES ENRHUM\220 ENCORE UNE FOIS, MA\327TRE? QUELLE CONTRARI\220T\220! JE VOUS AI D\220J\267 DIT D'Y METTRE LE CHAUFFAGE... ", "BON, AVALEZ UN COMPRIM\220 D'ACIDEAC\220TYL SALICYLIQUE ET ALLEZ TRANSPIRER! BONNE NUIT!", }, { + // 0 "", "MAESTRO, CREDO CHE QUESTO NON VA", "SICURISSIMO, MAESTRO", "SCUSI, MAESTRO", "VA A PORTARE UN ALTRO SCIENTIFICO PAZZO? GLI AVVERTO CHE IL LABORATORIO PIENO E NE ABBIAMO TUTTI SCADUTI", + // 5 "ZITTO, MAESTRO, FIGURASI SE LE SENTONO LE FEMMINISTE", "ACCIDENTI!", "-MAESTRO! NON LE ASPETTAVO COS\326 PRESTO!", "MALE MAESTRO, DEVONO CI ESSERE PROBLEMI CON IL SATELLITE E NON RIESCO A SINTONIZZARE L'IMMAGINE. ANZI LA TEMPESTA CAUSA INTERFERENZE", "CHE NE SO, MAESTRO", + // 10 "SI, MAESTROl", "MAESTRO", "SA CHE ORE SONO?", "EH? -AH, CHE COLPO! TU SEI QUELLO DI \"PULIZIA NOTTURNA\" NO?", "IO SONO IGOR, IL MAGGIORDOMO. PUOI COMINCIARE NEL SALOTTO DI BALLO, IERI C'ERA ORGIA SOPRANATURALE ED \220 PIENO DI MERDA", + // 15 "SE HAI BISOGNO DI QUALCOSA, COMPRALA", "LA DECLARAZIONE DI REDDITI, NON VEDI?", "NEANCH'IO, I NUMERI SONO PICCOLISSIMI E ANZI, IO NON VEDO BENE DA LONTANO", "NEANCHE PARLARNE, MI FANNO SEMBRARE BRUTTO", "\220 UNA FESTA CHE FA IL MAESTRO PER I SUOI AMICI OGNI VOLTA CHE ARRIVA QUALCHE IMBECILE CHE VUOLE FINIRE CON LUI", + // 20 "PRIMA, GLI TOGLIANO GLI OCCHI; POI GLI VERSANO SUCCO DI LIMONE, DOPO IL BRUCIORE.......", "NO", "COME CHE PER CHE NO? MA TU HAI VISTO CHE ORE SONO?", "IN INVERNO, SI", "ARRIVEDERCI", + // 25 "N\324 PENSARCI", "BENE, BASTA PER OGGI. VADO A CENARE", "E CHE SEMPRE DIMENTICO CHIUDERE CON LA CHIAVE", "ACCIDENTI!", "EH? -AH! CHE COLPO, MAESTRO, PENSAVO STAVA DURMENDO", + // 30 "ORA MI RICORDO, PRENDA LE CHIAVI DEL SOGGIORNO, COS\326 DOMANI MATTINA NON MI DISTURBA SE VUOLE GUARDARE I CARTONI ANIMATI", "HA PRESSO FREDDO UN'ALTRA VOLTA, MAESTRO? SEMPRE GLI DICO CHE METTA IL RISCALDAMENTO", "PRENDA UNA ASPIRINA ED A SUDARE. BUONA NOTTE", @@ -3515,171 +4235,206 @@ const char *_texti[][33] = { const char *_textl[][32] = { { + // 0 "", "ARE YOU GOING TO LET OURSELVES BE GUIDED BY PRIMITIVE INSTINCTS JUST BECAUSE WE BELONG TO DIFFERENT RACES AND THE SOCIAL SITUATION IS TELLING US TO DO SO?", "AREN'T WE TIED BY SENSE WHICH IS THE MOST POWERFUL WEAPON AS WELL AS THE MOST PRECIOUS GIFT?", "OH, IF WE ALL LET OUR THOUGHTS GUIDE OUR WAY IN LIFE WITHOUT LEAVING SOME ROOM FOR FEELINGS WHICH LET OUR PRE-EVOLUTIVE INSTINCTS COME OUT!", "ANSWER ME, EPHEMERAL CREATURE. WOULDN'T WE ALL BE HAPPIER WITH THOSE EMOTIONAL BOUNDINGS?", + // 5 "YOU ARE NOT GETTING THROUGH", "THIS IS A VERY CLEAR EXAMPLE, YOU SEE?: YOU WANT TO GET THROUGH AND GO AHEAD WITH YOUR ADVENTURE, AND I WON'T LET YOU DO THAT", "WILL THAT BE A CONTROVERSIAL POINT BETWEEN US THAT HAVE JUST MET?", "WELL THEN", "WELL, THAT DEPENDS ON WHAT WE TAKE A RELATIONSHIP FOR. SOME AUTHORS DEFEND...", + // 10 "PUKE! HUNTING AS A WAY TO SURVIVE IS AN INCOMPATIBLE ARCHAIC THING FOR A SUPERIOR BEING LIKE ME. BESIDES, I'VE BECOME A VEGETARIAN", "IT JUST HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO BETHINK AND GET TO THE ABOVE MENTIONED THOUGHT", "IT TOOK ME A LONG TIME TO QUIT OLD HABITS BUT AT LEAST MY IRASCIBLE SOUL BIT UP THE CONCUPISCIBLE ONE, AND EVER SINCE, I'VE NEVER EATEN MEAT AGAIN", "NOT EVEN THE PLEASURE OF SUCKING UP THE BONE, FEELING THE TASTE OF THE SKIN AND THAT SWEET TASTE OF MARROW...THAT JUST TAKES YOU TO HEAVENLY PLACES", "IT DOESN'T REALLY GET TO ME AT ALL", + // 15 "WHAT?", "I DON'T KNOW WHAT YOU'RE TALKING ABOUT, YOU EPHEMERAL CREATURE", "I'M NOT INTERESTED", "I DON'T KNOW ABOUT THE OTHER GAMES, BUT WE COULD USE THIS BEAUTIFUL SCREEN", "", + // 20 "I'D CARE...", "NO. IT'S JUST THE SON, THE FATHER, THE GRANDFATHER AND A FRIEND, WHO ARE CALLED LIKE THAT", "BUT, IT IS GOING TO LOOK LIKE THE GAME WAS MADE BY FIVE PEOPLE", "THESE ARE PROMISING GUYS", "THAT'S A GOOD ONE! A GOOD ONE!", + // 25 "PLEASE, CALL ME CONSTANTINO", "IT WASN'T ME MAN. IT WAS \"EL COYOTE\", MY TWIN", "JESUS, THESE ARE REALLY LONG CREDIT TITLES", "I STOPPED COUNTING A LONG TIME AGO", "WHAT WILL BECOME OF YOU NOW, DESIDERIO?", + // 30 "BUT, YOU SHOULD LOSE SOME WEIGHT", "I'LL JUST RETIRE TO THE TIBET AND THINK ABOUT THE MEANING OF LIFE", }, { + // 0 "", "UN MOMENTO. \250SOLO PORQUE PERTENECEMOS A RAZAS DISTINTAS Y LA SOCIEDAD DICE QUE SEREMOS ENEMIGOS VAMOS A DEJARNOS LLEVAR POR NUESTROS MAS PRIMITIVOS INSTINTOS?", "\250ACASO NO NOS UNE LA RAZON, ELARMA MAS PODEROSA Y, A LA VEZ, EL DON MAS PRECIADO QUE TENEMOS?", "\255AH, SI EL ENTENDIMIENTO GUIARA NUESTROS PASOS POR LA VIDA SIN DEJAR SITIO A LOS SENTIMIENTOS, QUE AFLORAN NUESTRAS INCLINACIONES PRE-EVOLUTIVAS!", "\250NO CREES QUE SERIAMOS MAS DICHOSOS SIN ESAS ATADURAS EMOCIONALES? CONTESTA EFIMERA CRIATURA", + // 5 "NO PASAS", "\250VES? ESTE ES UN CLARO EJEMPLO: TU QUIERES PASAR Y CONTINUAR TU AVENTURA Y YO NO PUEDO PERMITIRLO", "\250HA DE SER ESE MOTIVO SUFICIENTE DE CONFLICTO ENTRE NOSOTROS, QUE NO NOS CONOCEMOS DE NADA?", "PUES ESO", "BUENO, ESO DEPENDE DE LO QUE ENTENDAMOS POR RELACION. ALGUNOS AUTORES DEFIENDEN...", + // 10 "AGGG. LA CAZA COMO MEDIO DE SUBSISTENCIA ES UNA ACTIVIDAD ARCAICA INCOMPATIBLE CON UNA NATURALEZA SUPERIOR COMO LA MIA. Y ADEMAS ME HE VUELTO VEGETARIANO", "RESULTA QUE ESTABA COMIENDOME A UN TIO Y ME PUSE A REFLEXIONAR. LLEGUE A LA CONCLUSION ANTES MECIONADA", "ME COSTO MUCHO DEJAR LOS HABITOS DESDE TANTO TIEMPO ADQUIRIDOS, PERO POR FIN MI ALMA IRASCIBLE VENCIO A LA CONCUPISCIBLE Y NO HE VUELTO A PROBAR LA CARNE", "NI SIQUIERA EL PLACER QUE SUPONE UN HUESO, CON EL JUGO DE LA PIEL ENTRE SUS POROS Y ESE SABOR QUE TE TRANSPORTA A LUGARES REMOTOS PARADISIACOS...", "NI SIQUIERA ME AFECTA. PARA NADA, DE VERDAD", + // 15 "\250EL QUE?", "NO SE DE QUE ME HABLAS, EFIMERA CRIATURA", "NO ME INTERESA", "LOS DEMAS JUEGOS, NO SE, PERO ESTE PARA APROVECHAR ESTA PANTALLA TAN BONITA", "", + // 20 "A MI SI ME DARIA", "NO, ES QUE SON EL ABUELO, EL PADRE, EL HIJO, Y UN AMIGO QUE SE LLAMA ASI", "NO, PERO ES QUE SI NO VA A PARECER QUE HAN HECHO EL JUEGO ENTRE CINCO", "ESTOS CHICOS PROMETEN", "\255ESE ES BUENO, ESE ES BUENO!", + // 25 "LLAMAME CONSTANTINO", "NO ERA YO, HOMBRE. ERA MI DOBLE, EL COYOTE", "VAYA, QUE CREDITOS MAS LARGOS", "YO YA PERDI LA CUENTA", "BUENO DESIDERIO, \250Y QUE VA A SER DE TI AHORA?", + // 30 "PERO TENDRIAS QUE ADELGAZAR", "ME RETIRARE AL TIBEL A REFLEXIONAR SOBRE EL SENTIDO DE LA VIDA", }, { + // 0 "", "MOMENT mal. NUR WEIL WIR UNTERSCHIEDLICHER HERKUNFT SIND UNd eigentlich feinde sein muessten mueSSEN WIR UNS DOCH Nicht wie die primaten auffuehren!", "VERBINDET UNS ETWA NICHT DIE VERNUNFT, GEFaeHRLICHSTE WAFFE UND ZUGLEICH GRoeSSTE GABE, DIE WIR HABEN ?", "AH, WENN NUR DAS GEGENSEITIGE VERSTaeNDNIS die gefuehle besiegen koennte,DIE DIE WURZEL UNSERER PRaeHISTORISCHEN NEIGUNGEN SIND!", "GLAUBST DU NICHT, DASS WIR OHNE DIESE GEFueHLSFESSELN GLueCKLICHER WaeREN ? ANTWORTE, DU EINTAGSFLIEGE", + // 5 "DU KOMMST NICHT DURCH", "SIEHST DU ? DU WILLST HIER DURCH UND MIT DEM ABENTEUER WEITERMACHEN UND ICH KANN DAS NICHT ZULASSEN", "MUSS DENN DIE TATSACHE, DASS WIR UNS NICHT KENNEN, ANLASS ZUM STREIT SEIN?", "GENAU", "NAJA. KOMMT DARAUF AN, WAS WIR UNTER BEZIEHUNG VERSTEHEN. EINIGE VERTRETEN JA DEN STANDPUNKT, DASS....", + // 10 "ARRGH.nur zu jagen, um zu ueberleben ist mir zu primitiv.UND AUSSERDEM BIN ICH SEIT KURZEM VEGETARIER", "ES GING LOS,ALS ICH MIR GERADE EINEN TYPEN EINVERLEIBTE UND ANFING NACHZUDENKEN UND ZUM EBENERWaeHNTEN SCHLUSS KAM", "ES war hart, DIE ALTEN laster ABZULEGEN, ABER seit MEINE FLEISCHESLUST MEINEn JaeHZORN besiegt hat HABE ICH KEIN FLEISCH MEHR GEGESSEN:", "NICHT MAL DIE GAUMENFREUDE EINES KNOCHENS, MIT DEM SAFT DER HAUT IN DEN POREN UND DIESEm GESCHMACK DER DICH INS REICH DER SINNE ENTFueHRT...", "ES MACHT MIR ueBERHAUPT NICHTS AUS, WIRKLICH", + // 15 "WAS JETZT ?", "ICH WEISS NICHT, WOVON DU REDEST, DU EINTAGSFLIEGE", "DAS INTERESSIERT MICH NICHT", "ANDERE SPIELE, ACH ICH WEISS NICHT, ABER DAS HIER HAT SO EINE NETTE GRAFIK", "ICH HaeTTE SCHON LUST..", + // 20 "NEIN, SO HEISSEN DER OPA, DER VATER, DER SOHN UND EIN FREUND.", "NEIN, ABER WENN NICHT, SIEHT ES SO AUS ALS WaeRE DAS SPIEL VON FueNF LEUTEN GEMACHT WORDEN", "DIESE JUNGS SIND VIELVERSPRECHEND !", "DER IST GUT, SUPERKLASSE !", "NENN MICH KONSTANTIN", + // 25 "MANN, DAS WAR NICHT ICH, SONDERN MEIN DOUBLE, DER KOYOTE", "WOW, WAS FueR EINE LANGE DANKESLISTE", "ICH HAB SCHON DEN ueBERBLICK VERLOREN", "O.K. DESIDERIO, UND WAS WIRD JETZT AUS DIR WERDEN ?", "ABER DANN MueSSTEST DU ABNEHMEN", + // 30 "ICH WERDE NACH TIBET AUSWANDERN UND ueBER DEN SINN DES LEBENS NACHDENKEN", }, { + // 0 "", "c'est parce qu'on APPARTIENT \267 DES RACES DIFF\220RENTES ET QUE LA SOCI\220T\220 NOUS CONFRONTE, QUE NOUS ALLONS AGIR PAR NOS PLUS M\220PRISABLES INSTINCTS?", "NE SOMMES-NOUS PAR HASARD ACCROCHS PAR LA RAISON, L'ARME LA PLUS PUISSANTE, ET AUSSI LE DON LE PLUS PRCIEUX QUE NOUS AVONS?", "AH!, SI LA RAISON GUIDAIT NOS PAS DANS LA VIE SANS Y ENTRA\327NER LES SENTIMENTS, QUI FONT JAILLIR NOS INCLINAISONS PR-VOLUTIVES!", "NE CROIS-TU PAS QUE NOUS SERIONS PLUS HEREUX SANS CES ATTACHEMENTS-L\267? RPONDS-MOI, CRATURE PHM\324RE ", + // 5 "TU NE PASSES PAS", "TU VOIS? C'EST UN EXEMPLE CLAIR: TOI, TU VEUX PASSER ET POURSUIVRE TON AVENTURE ET MOI, JE NE PEUX PAS LE TOLRER", "CELA DOIT \322TRE UNE RAISON SUFFISANTE DE CONFLIT ENTRE NOUS DEUX, QUI NE NOUS CONNAISSONS DE RIEN?", "C'EST CELA", "EH BIEN, CELA DPEND DE CE QU'ON ENTEND PAR RLATION. D'APR\324S QUELQUES AUTEURS...", + // 10 "LA CHASSE COMME MOYEN DE SUBSISTANCE EST UNE ACTIVIT\220 ARCHA\330QUE, INCOMPATIBLE AVEC ma NATURE SUP\220RIEURE . ET DE PLUS JE SUIS DEVENU V\220G\220TARIEN", "IL S'EN SUIT QU'EN TRAIN DE D\220VORER UN TYPE, JE ME SUIS MIS \267 R\220FL\220CHIR. ALORS, SUIS ARRIV\220 \267 LA CONCLUSION MENTIONN\220 CI-DESSUS", "ABANDONNER CES HABITUDES M'EST REVENU CHER, MAIS \267 LA FIN MON \266ME IRASCIBLE a vancue MON \266ME CONCUPISCIBLE, ET D\324S LORS JE N'AI GO\352T\220 \267 LA VIANDE", "M\322ME PAS LE PLAISIR DE CROQUER UN OS, AVEC LE SUC DE LA PEAU ENTRE SES PORES ET sa SAVEUR QUI TE TRANSPORTE VERS DES LIEUX TR\324S LONTAINS, PARADISIAQUES...", "CECI NE M'AFFECTE PAS M\322ME, ABSOLUMENT PAS, C'EST VRAI", + // 15 "QUOI?", "JE NE SAIS PAS DE QUOI TU M'EN PARLES, CR\220ATURE \220PH\220M\324RE", "CELA NE ME REGARDE PAS", "LES AUTRES JEUX, JE NE SAIS PAS; MAIS CELUI-CI OUI, POUR EN PROFITER DE CET \220CRAN SI JOLI", "", + // 20 "MOI, JE NE M'EN FICHERAI PAS", "NON, C'EST QU'ILS SONT LE GRAND-P\324RE, LE P\324RE, LE FILS, ET UN AMI QUI S'APPELLE COMME \200A", "NON, MAIS SI NON, IL VA PARA\327TRE QU'ON A FAIT LE JEU ENTRE CINQ", "CES GAR\200ONS ONT DU FUTUR", "CELUI-L\267 EST BON! CELUI-L\267 EST BON!", + // 25 "APPELLE-MOI CONSTANTIN", "CE N'\220TAIT PAS MOI, MON VIEUX. C'\220TAIT MON DOUBLE, LE COYOTE", "TIENS! QUELS CR\220DITS SI LONGS", "J'AI D\220J\267 PERDU LES COMPTES", "EH BIEN, D\220SID\324RE, QUE T'ARRIVERA-T-IL MAINTENANT?", + // 30 "MAIS TU DEVRAIS MAIGRIR", "JE VAIS ME RETIRER AU TIBEL POUR Y R\220FL\220CHIR SUR LE SENS DE LA VIE", }, { + // 0 "", "UN ATTIMO. PERCHE SIAMO DI DIVERSE RAZZE E LA SOCIET\265 DICA CHE SIAMO NEMICI, ANDIAMO A LASCIARCI DOMINARE PER I PI\351 PRIMITIVI ISTINTI?", "MA NON SIAMO UNITI DALLA RAGIONE, DALLA ARMA PI\351 PODEROSA E ANCHE PER IL DONO PI\351 PREZIOSO CHE ABBIAMO?", "SE IL GIUDIZIO GUIDASSE I NOSTRI PASSI NELLA VITA SENZA LASCIARE POSTO AI SENTIMENTI, CHE MOSTRANO LE NOSTRE INCLINAZIONI PRE-EVOLUTIVI!", "NON CREDI CHE SAREMMO PI\351 BEATI SENZA QUESTO LEGAME EMOZIONALE? RISPONDE EFFIMERA CREATURA", + // 5 "NON PASSI", "VEDI? QUESTO UN CHIARO ESEMPIO: TU VUOI PASSARE E PROSEGUIRE LA TUA AVVENTURA ED IO NON POSSO PERMETTERLO", "MA DEVE ESSERE CAUSA DI CONFRONTO QUANDO ANCORA NON CI CONOSCIAMO?", "CHE TI HO DETTO?", "BOH, DIPENDE DI CHE CAPIAMO COME RELAZIONE. CI SONO AUTORI CHE DIFENDONO...", + // 10 "LA CACCIA COME FORMA DI SUSSISTENZA \220 UNA ATTIVIT\265 ARCAICA, INCOMPATIBILE CON UNA NATURA SUPERIORE COM'\220 LA MIA: ADESSO SONO VEGETARIANO", "TEMPO FA, STAVO MANGIANDO UN TIZIO QUANDO MI SONO MESSO A RIFLETTERE. FU QUANDO LA CONCLUSIONE DI PRIMA ARRIV\220 ", "FU DIFFICILE LASCIARE LE MIE VECCHIE ABITUDINI, MA LA MIA ANIMA IRASCIBILE HA VINTO LA CONCUPISCIBILE E NON MANGIO PI\351 DELLA CARNE", "NEPPURE IL PIACERE CHE FA UN OSSO, COL SUCCO DELLA PELLE E QUEL SAPORE CHE TI PORTA A POSTI LONTANI E PARADISIACI...", "NEMMENO MI TOCCA DA VICINO, DAVVERO", + // 15 "CHE COSA?", "NON SO SU CHE MI PARLI, EFFIMERA CREATURA", "NON MI INTERESA", "GLI ALTRI VIDEO-GIOCHI, NON SO, MA QUESTO \220 PER APPROFITTARE QUESTO BELLO SCHERMO", "", + // 20 "IO SI ME VERGOGNAREI", "NO, SONO IL NONNO, IL PADRE, IL FIGLIO, E UN AMICO CHE SI CHIAMA COS\326 ", "NO, MA SE NON \220 COS\326, SEMBRAR\265 CHE HANNO FATTO IL VIDEO-GIOCO IN CINQUE", "BRAVI RAGAZZI", "-QUELLO \220 BUONO, QUELLO \220 BUONO!", + // 25 "CHIAMAMI COSTANTINO", "NON ERO IO, DAI,. ERA IL MIO CONTROFIGURA, IL COYOTE", "INSOMMA, MOLTI TITOLI DI CODA", "IO NON SO GI\265 QUANTI", "ALLORA PEPPINO, CHE VAI FARE ADESSO?", + // 30 "MA DOVRESTI DIMAGRIRE", "MI APPARTER\220 AL TIBET A RIFLETTERE SUL SENSO DELLA VITA", }, @@ -3687,21 +4442,25 @@ const char *_textl[][32] = { const char *_textp[][20] = { { + // 0 "", "HI", "YES SIR. IT'S BEAUTIFUL", "NO, NO. HE WON'T DO IT", "ALL RIGHT THEN", + // 5 "REALLY?", "SO?", "I'M SORRY. THE PIANIST UNION TRADE DOESN'T ALLOW ME TO SAVE GIRLS FROM VAMPIRES' CLUTCHES", "IF SHE HAD BEEN KIDNAPPED BY THE WEREWOLF...", "I CAN ONLY PLAY THIS SONG", + // 10 "I'M A CONSERVATOIRE PIANIST AND THE BARTENDER WON'T BUY MORE SCORES FOR ME", "OH GOD, I REALLY LOVE CLASSIC MUSIC!", "IT'S BECAUSE I'M WEARING EAR-PLUGS", "IT'S BECAUSE I CAN LIP-READ", "NOOO", + // 15 "NO! I'M NOT TAKING THIS ANY LONGER!", "NO WAYYYYY!", "WHAT? OF COURSE I'M INTERESTED", @@ -3709,21 +4468,25 @@ const char *_textp[][20] = { "I GUESS YOU CAN KEEP MY EAR-PLUGS", }, { + // 0 "", "HOLA", "BONITA. SI SE\245OR", "NO QUE NO LO HACE", "PUES VALE", + // 5 "\250SI?", "\250Y?", "LO SIENTO. EL SINDICATO DE PIANISTAS NO ME PERMITE RESCATAR CHICAS DE LAS GARRAS DE LOS VAMPIROS", "SI LA HUBIERA RAPTADO UN HOMBRE LOBO...", "NO PUEDO TOCAR MAS QUE ESTA CANCION", + // 10 "ES QUE SOY PIANISTA DE CONSERVATORIO Y EL TABERNERO NO COMPRA MAS PARTITURAS", "\255CON LO QUE A MI ME GUSTA LA MUSICA CLASICA!", "PORQUE LLEVO TAPONES EN LOS OIDOS", "PORQUE LEO LOS LABIOS", "NOOO", + // 15 "\255QUE NO! \255QUE NO ME AGUANTO!", "\255QUE NOOOOOO!", "\250QUE? CLARO QUE ME INTERESA", @@ -3731,21 +4494,25 @@ const char *_textp[][20] = { "SUPONGO QUE TE PUEDES QUEDAR CON MIS TAPONES", }, { + // 0 "", "HALLO", "JAWOLL, SEHR SCHoeN", "NEIN, ER TUT ES EINFACH NICHT", "NA GUT, OK.", + // 5 "JA ?", "UND ?", "TUT MIR LEID. DIE KLAVIERSPIELERGEWERKSCHAFT ERLAUBT ES MIR NICHT, MaeDCHEN AUS DEN KLAUEN VON VAMPIREN ZU BEFREIEN", "WENN SIE WERWOLF ENTFueHRT HaeTTE.....", "ICH KANN NUR DIESES EINE LIED", + // 10 "ICH HABE AM KONSERVATORIUM KLAVIER GESPIELT UND DER WIRT WILL MEINE PARTITueDEN NICHT KAUFEN", "WO MIR DOCH KLASSISCHE MUSIK SO GUT GEFaeLLT !", "WEIL ICH OHRENSToePSEL IN DEN OHREN HABE", "WEIL ICH VON DEN LIPPEN LESEN KANN", "NEEEIN", + // 15 "NEEIEN! ICH KANN MICH NICHT BEHERRSCHEN !", "NEIN,NEIN,UND NOCHMAL NEIN !", "WIE BITTE ? KLAR BIN ICH INTERESSIERT", @@ -3753,21 +4520,25 @@ const char *_textp[][20] = { "ICH GLAUBE, DU KANNST MEINE OHRENSToePSEL BEHALTEN", }, { + // 0 "", "BONJOUR!", "JOLIE, OUI M'SIEUR", "NON, QU'ELLE NE LE FAIT PAS", "D'ACCORD, A VA", + // 5 "OUI?", "ET QUOI?", "SUIS DSOL. LE SYNDICAT DE PIANISTES NE ME PERMET PAS DE LIBRER LES FILLES DES GRIFFES DE VAMPIRES", "SI ELLE AVAIT T RAPTE PAR UN HOMME-LOUP...", "JE NE PEUX PAS JOUER DAVANTAGE CETTE CHANSON", + // 10 "JE SUIS LE PIANISTE DU CONSERVATOIRE ET LE TAVERNIER N'ACH\324TE PAS MES PARTITIONS", "ET MOI QUI AIME BEAUCOUP LA MUSIQUE CLASSIQUE!", "PARCE QUE J'AI DES TAMPONS \267 L'OU\330E", "PARCE QUE JE LIS LES LEVRES", "NOOON!", + // 15 "QUE NON! QUE JE NE PEUX PAS ME RETENIR DAVANTAGE!", "QUE NOOOOOON!", "QUOI? BIEN S\352R QUE \200A M'INT\220RESSE", @@ -3775,21 +4546,25 @@ const char *_textp[][20] = { "TU PEUX GARDER MES TAMPONS, JE SUPPOSE", }, { + // 0 "", "CIAO", "BELLA, MOLTO BELLA", "NO, CHE NON LO FA", "VA BENE", + // 5 "-SI?", "E?", "MI DISPIACE. IL SINDACATODI PIANISTI NON MI DA PERMESSO PER LIBERARE RAGAZZE DALLE MANI DI VAMPIRI", "SE LA AVESSE SEQUESTRATA IL LUPO-MANNARO...", "SOLTANTO POSSO SUONARE QUESTA CANZONE", + // 10 "\324 PERCHE SONO PIANISTA DI CONSERVATORIO E IL TABERNERO NON COMPRA PI\353 PARTITURE", "PECCATO.....MI PIACE MOLTISSIMO LA MUSICA CLASSICA!", "PERCHE MI HO MESSO TAPPI NEGLI ORECCHII", "PERCHE SO LEGGERE LE LABRA", "NOOO", + // 15 "NO!, NON MI SOPPOROTO!", "HO DETTO DI NOOO!", "COSA? SI, SI MI INTERESA, COME NO", @@ -3801,26 +4576,31 @@ const char *_textp[][20] = { const char *_textt[][25] = { { + // 0 "", "WHAT HAPPENS, WHAT'S THE MATTER?", "OK. ROOM 512. UPSTAIRS. THE KEY IS ON THE DOOR", "COUNT DRASCULA!!?", "NO, NOTHING. THAT GUY HAS A BAD REPUTATION OVER HERE", + // 5 "WELL, THERE ARE ALL KINDS OF STORIES GOING AROUND ABOUT HIM, SOME SAY HE IS A VAMPIRE WHO KIDNAPS PEOPLE TO SUCK UP THEIR BLOOD", "HOWEVER, SOME OTHERS SAY THAT HE IS JUST AN ORGAN-DEALER AND THAT IS THE REASON WHY THERE ARE BODY PARTS ALL OVER THE PLACE", "BUT OF COURSE, THOSE ARE JUST RUMORS. HE'S PROBABLY BOTH THINGS. BY THE WAY, WHY DO YOU WANT TO MEET HIM?", "NO, FORGET IT. I'M REALLY BUSY...", "WELL, OK. BUT JUST BECAUSE I WANT TO DO IT, NOT BECAUSE YOU TELL ME TO", + // 10 "THEY'RE WINNING", "LEAVE ME ALONE, ALL RIGHT?", "OF COURSE. I'M NOT BLIND", "THE TRADITION IN THIS VILLAGE IS TO FORGET ALL HARD FEELINGS WHENEVER THERE IS A GAME, SO AS TO CHEER UP THE LOCAL TEAM", "AND PLEASE, SHUT UP FOR GOD'S SAKE. I CAN'T HEAR ANYTHING!", + // 15 "COME ON, LEAVE ME ALONE AND DON'T BOTHER ME ANYMORE", "IT HAS JUST STARTED! AND SHUT UP!", "OK, OK, I THOUGHT SOMETHING WAS GOING ON", "IT DOESN'T MATTER, ANYWAY. SHE'LL PROBABLY BE DEAD BY NOW", "HE JUST STARTED PLAYING CLASSIC MUSIC, AND I COULDN'T STAND IT", + // 20 "SINCE I'M PAYING HIM FOR PLAYING WHATEVER I WISH, I JUST FIRED HIM", "AND THEN, HE GOT FRESH WITH ME. JESUS!, HE LOOKED SO NICE AND INNOCENT...WHAT A HYPOCRITE!", "BY THE WAY, BE CAREFUL BECAUSE I JUST WAXED THE FLOOR", @@ -3828,26 +4608,31 @@ const char *_textt[][25] = { "OH, COME ON! TAKE IT!", }, { + // 0 "", "\250QUE PASA, QUE PASA?", "DE ACUERDO. HABITACION 512. SUBIENDO POR LAS ESCALERAS. LA LLAVE ESTA EN LA PUERTA", "\255\250 EL CONDE DRASCULA ?!", "NO, NADA. ESE TIPO TIENE MALA FAMA POR AQUI", + // 5 "BUENO, CORREN VARIOS RUMORES SOBRE EL. ALGUNOS DICEN QUE ES UN VAMPIRO Y VA SECUESTRANDO GENTE PARA CHUPARLES LA SANGRE", "CLARO, QUE OTROS OPINAN QUE SOLO ES UN TRAFICANTE DE ORGANOS, Y POR ESO APARECE GENTE DESCUARTIZADA POR LOS ALREDEDORES", "POR SUPUESTO SON SOLO RUMORES. LO MAS PROBABLE ES QUE SEA LAS DOS COSAS. POR CIERTO, \250PARA QUE QUIERE USTED VER A ESE TIPO?", "NO DEJELO, QUE ES QUE TENGO MUCHO QUE HACER...", "BUENO VALE, PERO PORQUE QUIERO YO, NO PORQUE LO DIGAS TU", + // 10 "VAN GANANDO", "DEJAME EN PAZ, \250VALE?", "PUES CLARO, NO SOY CIEGO", "ES TRADICION EN EL PUEBLO QUE CUANDO HAY PARTIDO SE OLVIDAN RENCORES PARA ANIMAR A LA SELECCION", "Y CALLATE YA DE UNA VEZ, QUE NO ME DEJAS OIR", + // 15 "ANDA, DEJAME EN PAZ Y NO MOLESTES", "\255ACABA DE EMPEZAR! \255Y CALLATE!", "AH, BUENO. CREIA QUE PASABA ALGO", "NO, SI ES IGUAL. A ESTAS HORAS YA ESTARA MUERTA", "ES QUE SE PUSO A TOCAR MUSICA CLASICA Y YO NO LA AGUANTO", + // 20 "Y COMO YO LE PAGO PARA QUE TOQUE LO QUE YO QUIERO, PUES LE HE ECHADO", "Y ENCIMA SE ME PUSO CHULO... \255Y PARECIA UNA MOSQUITA MUERTA!", "...POR CIERTO, TENGA CUIDADO. EL SUELO ESTA RECIEN ENCERADO", @@ -3855,26 +4640,31 @@ const char *_textt[][25] = { "\255VENGA, ANDA! TOMA.", }, { + // 0 "", "WAS ZUM TEUFEL IST LOS ?", "O.K. ZIMMER 512. DIE TREPPE HOCH. DIE SCHLueSSEL STECKEN SCHON", " GRAF DRASCULA ? !", "NEIN, DER TYP HAT HIER EINEN SCHLECHTEN RUF", + // 5 "NAJA, ES GIBT MEHRERE GERueCHTE ueBER IHN. EINIGE BEHAUPTEN, DASS ER LEUTE ENTFueHRT UND IHNEN DAS BLUT AUSSAUGT", "KLAR, ANDERE GLAUBEN, DASS ER EIN ORGANHaeNDLER IST UND DESHALB TAUCHEN ueBERALL AM WALDRAND ZERSTueCKELTE LEICHEN AUF", "NATueRLICH SIND DAS ALLES NUR GERueCHTE. HoeCHSTWAHRSCHEINLICH STIMMEN SIE ABER. ACH, UND WAS WOLLEN SIE VON IHM ?", "NEIN, VERGESSEN SIES. ICH HABE NaeMLICH ZU TUN...", "O.K. ABER WEIL ICH DAS WILL UND NICHT WEIL DU DAS SAGST", + // 10 "SIE GEWINNEN", "LASS MICH IN RUHE, OK ?", "KLAR, ICH BIN DOCH NICHT BLIND", "ES IST EIN ALTER BRAUCH IM DORF, DASS MAN BEI EINEM SPIEL ALTE ZWISTE VERGISST, UM DIE MANNSCHAFT ANZUFEUERN", "UND HALT ENDLICH DEINEN MUND, ICH WILL ZUHoeREN", + // 15 "MANN, LASS MICH IN RUHE UND NERV MICH NICHT", "ES FaeNGT GERADE AN ! STILL JETZT !", "ACH SO, ICH DACHTE ES IST IRGENDWAS LOS", "NEIN, IST DOCH EGAL. JETZT WIRD SIE EH SCHON TOT SEIN", "ER HAT KLASSIK GESPIELT UND ICH HALTE DAS NICHT AUS", + // 20 "UND WEIL ICH ES BIN, DER IHN DAFueR BEZAHLT, DASS ER SPIELT, WAS ICH WILL, HABE ICH IHN ENTLASSEN", "UND DANN KAM ER MIR AUCH NOCH SCHRaeG... UND WAS FueR EINE PAPPNASE ER DOCH IST !", "...ACH JA, UND PASSEN SIE AUF. DER BODEN IST FRISCH GEBOHNERT", @@ -3882,26 +4672,31 @@ const char *_textt[][25] = { "LOS, HAU REIN, GIBS IHM", }, { + // 0 "", "QU'EST-CE QU'IL Y A, QU'Y A-T-IL?", "D'ACCORD. CHAMBRE 512. PAR LES ESCALIERS. LA CL EST SUR LA PORTE", "LE COMTE DRASCULA?!", "NON, RIEN, CE TYPE A UNE MAUVAISE RPUTATION PAR ICI", + // 5 "EH BIEN, IL Y A DES RUMEURS QUI COURENT SUR LUI. CERTAINS DISENT QUE C'EST UN VAMPIRE ET QU'IL ENLEVE DU MONDE POUR SUCER LEUR SANG ", "MAIS D'AUTRES PENSENT QU'IL EST SEULEMENT UN TRAFICANT D'ORGANES, ET C'EST POUR CELA QUE DES PERSONNES DPECES SONT APPARUES DANS LES ALENTOURS", "CERTAINEMENT IL NE S'AGIT QUE DES BRUITS QUI COURENT. S\352REMENT IL AURA LES DEUX MTIERS. MAIS, POURQUOI VOULEZ-VOUS VOIR CE TYPE?", "OH, NON! OUBLIEZ CELA, J'AI BEAUCOUP \267 FAIRE.", "BON, A VA. MAIS PARCE QUE JE VEUX ET NON PARCE QUE TU LE DIS", + // 10 "ILS GAGNENT", "FICHE-MOI LA PAIX, D'ACCORD?", "C'EST S\352R, JE NE SUIS PAS UN AVUGLE", "SELON LA TRADITION DU VILLAGE, QUAND IL Y A UN MATCH ON OUBLIE LES RANCUNES, POUR ALLER ENCOURAGER LA S\220LECTION", "ET FERME-LA D'UNE FOIS!, JE NE PEUX PAS ENTENDRE", + // 15 "ALLEZ, VA-T'-EN ET NE D\220RANGES PAS!", "\200A VIENT DE COMMENCER! -ET TAIS-TOI!", "AH, BON! JE PENSAIS QU'IL SE PASSAIT QUELQUE CHOSE", "NON, C'EST \220GAL. \267 CES HEURES-CI ELLE SERA D\220J\267 MORTE", "LE FAIT EST QU'ELLE A COMMENC\220 JOUER DE LA MUSIQUE CLASSIQUE ET QUE JE NE SUPPORTE PAS CELA", + // 20 "ET MAINTENANT QUE JE LUI AI MIS DEHORS, COMMENT JE LUI PAIE POUR QU'IL JOUE CE QUE JE VEUX", "ET ENCORE IL S'EST MONTR\220 ARROGANT... -ET DIRE QU'IL PARAISSAIT UNE SAINTE-NITOUCHE!", "...FAITES ATTENTION, ON VIENT DE CIRER LE PARQUET", @@ -3909,26 +4704,31 @@ const char *_textt[][25] = { "OH L\267 L\267! TIENS!", }, { + // 0 "", "CHE SUCCEDE, CHE SUCCEDE?", "D'ACCORDO. CAMERA 512. DEVE SALIRE LE SCALE. LA CHIAVE \324 NELLA PORTA", "IL CONDE DRASCULA?", "NO, NIENTE. QUEL TIZIO HA MALA REPUTAZIONE QU\336", + // 5 "SE DICONO MOLTE COSE SU LUI. COME CH'\324 UN VAMPIRO E SEQUESTRA GENTE PER BERE LA SUA SANGUE", "ALTRI DICONO CHE SOLO \324 UN TRAFFICANTE DI ORGANI, PER QUELLO TROVIAMO GENTE SQUARTATA FUORI LE MURA", "SONO SOLTANTO CHIACCHIERE. FORSE SIA LE DUE COSE. MA, PERCHE VUOLE TROVARE QUEL TIZIO?", "NO, HO MOLTO DA FARE..", "VA BENE, MA PERCHE VOGLIO IO, NON PERCHE L'ABBIA DETTO TU", + // 10 "ADESSO VINCONO", "LASCIAMI IN PACE, O.K.?", "CERTO, NON SONO CIECO", "C'\324 LA TRADIZIONE NEL PAESE DI DIMENTICARE I RANCORI QUANDO C'\324 PARTITA DI CALCIO; PER ANIMARE LA SELEZIONE", "TI HO DETTO DI STARE ZITTO, NON RIESCO A SENTIRE", + // 15 "LASCIAMI IN PACE E NON MI DISTURBARE", "\324 APPENA COMINCIATO, ZITTO!", "AH, BENE. HO PENSATO CHE SUCCEDEVA QUALCOSA", "NO, NON FA NIENTE. ADESSO SICURO CH'\324 GI\267 MORTA", "SI \324 MESSO A SUONARE MUSICA CLASSICA ED IO LA ODIO", + // 20 "\324 COME FACCIO PER SENTIRE QUELLO CHE VOGLIO SE L'HO LICENZIATO", "E ORA SI METTE BULLO...-E SEMBRAVA PROPRIO SCEMO!", "...SENTA! FACCIA ATTENZIONE. IL PAVIMENTO \324 APPENA INCERATO", @@ -3940,325 +4740,391 @@ const char *_textt[][25] = { const char *_textvb[][63] = { { + // 0 "", "WHO THE HELL IS CALLING AT THIS TIME?", "OH, ..OH, NO, NO....I'M...GANIMEDES THE DWARF. PROFESSOR VON BRAUN DOESN'T LIVE HERE ANYMORE", "NO, I DON'T KNOW WHERE IT IS !!", "GET OUT!!", + // 5 "IT'S TOO LATE NOW, YOU IDIOT!! IT ALWAYS IS", "I COULDN'T AGREE MORE", "ME, SCARED?", "LISTEN HERE, DUDE. YOU'RE RIGHT NOW TALKING TO THE ONLY PERSON WHO KNOWS THE SECRET TO FIGHT AGAINST THE VAMPIRE", "YOU NEED TO HAVE SPECIAL SKILLS TO FIGHT AGAINST A VAMPIRE. NOT EVERYBODY CAN DO IT", + // 10 "YOU DON'T HAVE THEM", "I'M SURE YOU WOULDN'T BET ALL YOUR MONEY ON IT, HUH?", "WELL, ALL RIGHT, COME ON IN", "IF YOU REALLY MEAN TO FACE DRASCULA, YOU'VE GOT TO BE ABLE TO TAKE ALL TYPES OF CREAKING AND VAMPIRE-LIKE NOISES", "IS THAT CLEAR?", + // 15 "OK, WAIT A MINUTE", "STAND IN THE CENTER OF THE ROOM, PLEASE", "WHERE DID I PUT THAT RECORD CALLED \"NAILS SCRATCHING THE BLACKBOARD\"?", "ALL RIGHT. LET'S GET TO IT", "YOU ARE USELESS. YOU SEE...?, JUST LIKE THE REST!!", + // 20 "JUST GIVE ME NOW THE MONEY YOU LOST AND GET OUT OF HERE", "AND DON'T COME BACK UNTIL YOU ARE ABSOLUTELY READY", "WHAT DO YOU WANT NOW?", "I HAVE TO ADMIT IT. YOU REALLY GOT WHAT IT TAKES TO FIGHT AGAINST THE VAMPIRES", "HEY, TAKE YOUR MONEY. I ADMIT IT WHEN I MAKE A MISTAKE...", + // 25 "LEAVE ME ALONE NOW, I WANT TO GET SOME SLEEP", "WHENEVER YOU ARE READY TO FIGHT AGAINST THE VAMPIRES, JUST COME BACK AND I'LL HELP YOU OUT", "OH, THAT'S EASY. JUST USING THE LIGHT OF ONE CRUCIFIX IS ENOUGH TO DESTROY HIM", "YOU HAVE TO BE EXTRA CAREFUL WITH DRASCULA, HIS FRISISNOTICS POWERS HAVE MADE OF HIM THE MOST POWERFUL VAMPIRE", "YOU'D BE LOST IF IT WASN'T FOR THEY...", + // 30 "...BREW!", "YEAH, YOU'RE RIGHT! I MIGHT HAVE SOME PROBLEMS WITH MY BACK IN THE FUTURE IF I KEEP ON SLEEPING THIS WAY", "I UNDERSTAND HE WAS A BETTER OPPONENT THAN ME, BUT YOU HAVE TO ADMIT THAT THE DISCOVERY I MADE ABOUT ANTI-VAMPIRE TECHNIQUES WAS WHAT ACTUALLY PROTECTED ME", "I'VE FOUND THIS IMMUNIZING BREW THAT KEEPS YOU SAFE FROM ANY VAMPIRES' BITE OR AGAINST HIS FRISISNOTICS POWERS", "NO, NO, EXCUSE ME. I HAD IT ONCE BUT IT'S VERY DANGEROUS TO HAVE A BREW OF THAT TYPE. CAN YOU IMAGINE WHAT COULD HAPPEN IF A VAMPIRE GOT IT?", + // 35 "HE'D BE IMMUNIZED AGAINST GARLIC, THE SUNSHINE LIGHT... SO I HAD TO GET RID OF WHAT I DIN'T USE BY THE SCIENTIFIC METHOD OF THROWING IT IN THE LAVATORY", "DON'T WORRY, I REMEMBER EXACTLY HOW TO MAKE THAT BREW", "I NEED GARLIC, BUT I ALREADY HAVE THEM. HOWEVER YOU'LL HAVE TO GET ME SOME WAX, BUBBLE GUM AND CIGARETTE PAPER OR PERHAPS A NAPKING OR SOMETHING ALIKE", "OH...AND OF COURSE THE MOST IMPORTANT INGREDIENT. LEAVES FROM A VERY STRANGE PLANT CALLED FERNAN", "IT'S A CLIMBING PLANT WHICH LEAVES HAVE MAGIC POWERS IF THEY'RE CUT WITH A GOLDEN SICKLE", + // 40 "SO THAT AS SOON AS YOU HAVE THESE FIVE THINGS, JUST COME HERE AND I'LL MAKE THE BREW", "YOU'LL BE READY THEN TO FIGHT AGAINST DRASCULA", "REMEMBER: WAX, NICOTINE, A PIECE OF BUBBLE GUM, A PAPER AND SOME FERNAN'S LEAVES CUT WITH A GOLDEN SICKLE", "I TOLD YOU! IT WAS JUST BECAUSE OF THE BREW!", "OH, ALL RIGHT. I'M GOING TO MAKE MYSELF A...THE BREW. JUST A MOMENT, OK?", + // 45 "IT'S A PROTECTING SPELL AGAINST VAMPIRES", "I PUT IT THERE IN ORDER TO PRETEND THAT THE SKETCHER DIDN'T FORGET TO DRAW THE WINDOW YOU CAN SEE FROM OUTSIDE", "ALL RIGHT, THE FIRST THING YOU MUST KNOW IS THE WAY TO DRASCULA'S CASTLE", "THERE IS A CAVERN THAT GETS YOU STRAIGHT FROM THE CASTLE. IGOR, THE CRAZY ELVIS' FUN, TAKES IT TO GET TO THE VILLAGE EACH MORNING", "BE CAREFUL THOUGH, THERE IS A VAMPIRE ALWAYS WATCHING OVER IT. YOU'LL HAVE TO GET RID OF HIM", + // 50 "THERE IS AN OLD WELL RIGHT BY THE CEMETERY CHURCH", "IT WAS USED A LONG TIME AGO FOR WITCHCRAFT TRIALS", "THEY THREW THE WITCHES IN THE WELL. IF THEY DROWNED THEY WERE REAL WITCHES. IF THEY DIDN'T, THEY WEREN'T", "WE THREW ONE ONCE AND SHE DIDN'T DROWN, I GUESS SHE WASN'T A WITCH", "ANYWAY. THERE IS YOUR BREW. HOWEVER, I ONLY GOT TO MAKE ENOUGH JUST FOR ONE PERSON", + // 55 "YOU'D BETTER SMOKE IT RIGHT BEFORE YOU FIGHT AGAINST DRASCULA", "COME ON, RUN!", "OH, JUST EXCUSES...!", "ARE YOU JOHN HACKER? I'M DOCTOR VON BRAUN", "LISTEN TO ME, THIS IS VERY IMPORTANT. IT'S ABOUT THE BREW", + // 60 "SHUT UP AND LET ME TALK. I JUST FOUND THIS BOOK ABOUT ANTI-VAMPIRE BREWS WARNING AGAINST MIXING THE JOINT WITH ANY ALCOHOLIC DRINK BEFORE YOU", "ALCOHOL REACTS WHEN MIXED WITH BREW, SO THAT IT CANCELS OUT ITS EFFECTS JUST IN A FEW SECONDS", "I'M SORRY, BUT I HAVE TO HANG UP RIGHT NOW. THE POLICE IS LOOKING FOR ME, THEY THINK I'M A PUSHER. STUPIDS!. ANYWAY, BYE AND GOOD LUCK SAVING THE WORLD!", }, { + // 0 "", "\250QUIEN DIABLOS LLAMA A ESTAS HORAS?", "EH... NO, NO. YO SOY EL ENANO GANIMEDES... EL PROFESOR VON BRAUN YA... YA NO VIVE AQUI", "\255NO, NO SE DONDE ESTA!", "\255QUE TE VAYAS! ", + // 5 "IMBECIL. YA ES DEMASIADO TARDE, SIEMPRE LO ES", "ESTOY TOTALMENTE DE ACUERDO", "\250YO MIEDO?", "ENTERATE CHAVAL: ESTAS HABLANDO CON EL UNICO QUE CONOCE EL SECRETO PARA ENFRENTARSE A LOS VAMPIROS", "NO TODO EL MUNDO ES CAPAZ DE LUCHAR CON UN VAMPIRO. HAY QUE TENER UNAS CUALIDADES ESPECIALES", + // 10 "NO LAS TIENES", "\250TE APUESTAS TODO TU DINERO A QUE NO?", "ESTA BIEN. PASA", "SI DE VERDAD ERES CAPAZ DE ENFRENTARTE A DRASCULA, DEBER PODER SOPORTAR TODOS LOS RUIDOS CHIRRIANTES Y VAMPIRICOS", "\250QUEDA CLARO?", + // 15 "DE ACUERDO. ESPERA UN MOMENTO", "POR FAVOR, PONTE EN EL CENTRO DE LA HABITACION", "VEAMOS. \250DONDE HE PUESTO EL DISCO ESTE DE \"U\245AS ARRASCANDO UNA PIZARRA\"?", "MUY BIEN. VAMOS ALLA", "\250VES? ERES UN INUTIL, COMO TODOS LOS DEMAS", + // 20 "AHORA DAME EL DINERO QUE HAS PERDIDO Y VETE DE AQUI", "Y NO VUELVAS HASTA QUE NO ESTES PREPARADO DEL TODO", "\250Y QUE ES LO QUE QUIERES TU AHORA?", "HE DE RECONOCERLO... TIENES APTITUDES PARA LUCHAR CON LOS VAMPIROS", "POR CIERTO, TOMA TU DINERO. SE CUANDO ME HE EQUIVOCADO", + // 25 "AHORA VETE, QUE QUIERO DORMIR UN POCO", "CUANDO ESTES DISPUESTO A ENFRENTARTE A ALGUN VAMPIRO, VUELVE Y TE AYUDARE EN LO QUE PUEDA", "OH, ESO ES FACIL. LA LUZ DEL SOL O UN CRUCIFIJO Y LE HACES POLVO", "CON EL QUE DEBES PONER ESPECIAL CUIDADO ES CON DRASCULA. SUS PODERES FRISISHNOSTICOS LE HACEN EL MAS PODEROSO DE LOS VAMPIROS", "ESTARIAS PERDIDO A NO SER POR LA...", + // 30 "...\255POCION!", "OH, CLARO. TIENES RAZON, SI SIGO DURMIENDO ASI A LO MEJOR TENGO PROBLEMAS DE COLUMNA CUANDO SEA VIEJO", "BUENO, ADMITO QUE RESULTO MEJOR ADVERSARIO QUE YO, PERO MI PRINCIPAL HALLAZGO EN EL ESTUDIO DE TECNICAS ANTI-VAMPIROS FUE LO QUE ME CUBRIO LAS ESPALDAS", "DESCUBRI UNA POCION DE INMUNIDAD. TE HACE INVULNERABLE ANTE CUALQUIER MORDEDURA DE VAMPIRO, O A SUS PODERES FRSISSHNOTICOS", "NO, PERDONA LA TUVE EN SU DIA, PERO UNA POCION DE ESAS CARACTERISTICAS ES PELIGROSA. IMAGINATE SI CAYERA EN MANOS DE UN VAMPIRO", + // 35 "LE HARIA INMUNE A LOS AJOS, A LA LUZ DEL SOL... ASI QUE TUVE QUE DESHACERME DE LO QUE NO USE POR EL CIENTIFICO METODO DE TIRARLO A LA TAZA DEL WATER", "TRANQUILO, ME ACUERDO PERFECTAMENTE DE COMO PREPARAR ESA POCION ", "NECESITO AJOS, QUE DE ESO YA TENGO, PERO ME TENDRAS QUE CONSEGUIR ALGO DE CERA, NICOTINA, UN CHICLE, Y UN PAPEL DE FUMAR, O UNA SERVILLETA, O ALGO PARECIDO", "\255AH! Y POR SUPUESTO, EL INGREDIENTE PRINCIPAL: UNAS HOJAS DE UNA EXTRA\245A PLANTA LLAMADA FERNAN", "SE TRATA DE UNA PLANTA ENREDADERA CUYAS HOJAS PROPORCIONAN PODERES MAGICOS SI SE CORTAN CON UNA HOZ DE ORO", + // 40 "PUES YA SABES, EN CUANTO TENGAS ESAS CINCO COSAS ME LAS TRAES Y TE PREPARARE LA POCION", "DESPUES ESTARAS LISTO PARA LUCHAR CON DRASCULA", "RECUERDA: CERA, NICOTINA, UN CHICLE, UN PAPEL Y UNAS HOJAS DE FERNAN, LA PLANTA, CORTADAS CON UNA HOZ DE ORO", "\255YA TE LO HE DICHO! FUE TODO GRACIAS A LA POCION", "AH, MUY BIEN. VOY ENTONCES A PREPARARME EL PO... LA POCION. SOLO TARDO UN MOMENTO", + // 45 "ES UN SORTILEGIO DE PROTECCION CONTRA VAMPIROS", "LO PUSE PARA DISIMULAR QUE EL DIBUJANTE SE OLVIDO DE PONER LA VENTANA QUE SE VE DESDE FUERA", "BUENO, LO PRIMERO QUE DEBES SABER ES COMO SE VA AL CASTILLO DRASCULA", "HAY UNA GRUTA QUE LLEVA DIRECTAMENTE AL CASTILLO Y QUE ESE LOCO FAN DE ELVIS, IGOR, USA PARA BAJAR AL PUEBLO POR LAS MA\245ANAS", "PERO TEN CUIDADO, SIEMPRE ESTA PROTEGIDA POR UN VAMPIRO. TENDRAS QUE LIBRARTE DE EL", + // 50 "HAY UN VIEJO POZO AL LADO DE LA CAPILLA DEL CEMENTERIO", "SE USABA ANTIGUAMENTE PARA JUZGAR CASOS DE BRUJERIA", "SE TIRABA A LAS BRUJAS AL POZO. SI SE HUNDIAN ERAN BRUJAS. SI NO, NO", "UNA VEZ TIRAMOS A UNA Y NO SE HUNDIO, ASI QUE NO SERIA BRUJA", "A LO QUE VAMOS: TOMA TU POCION, PERO SOLO ME HA DADO PARA UNO", + // 55 "LO MEJOR ES QUE TE LO FUMES JUSTO ANTES DE ENFRENTARTE A DRASCULA", "CORRE", "\255EXCUSAS!", "\250JOHN HACKER? SOY EL DOCTOR VON BRAUN", "ESCUCHEME, ES MUY IMPORTANTE. ES SOBRE LA POCION", + // 60 "ME HE ENCONTRADO UN LIBRO SOBRE POCIONES Y DICE QUE NO DEBE USTED BEBER ALCOHOL UNA VEZ SE HAYA FUMADO LA POCION", "EL ALCOHOL INGERIDO REACCIONA CON LAS SUSTANCIAS DE LA POCION Y ANULA SUS EFECTOS EN DECIMAS DE SEGUNDO", "TENGO QUE COLGAR. LA POLICIA ME BUSCA. DICEN QUE TRAFICO CON DROGAS \255IGNORANTES! BUENO, ADIOS Y SUERTE SALVANDO AL MUNDO", }, { + // 0 + "", "WER ZUM TEUFEL KLINGELT UM DIESE UHRZEIT ?", "aeH......NEIN, NEIN. ICH BIN HELGE SCHNEIDER...HERR PROFESSOR VON BRAUN ...aeH...WOHNT HIER NICHT MEHR", "NEIN, ICH WEISS NICHT WO ER IST !", "NUN GEH SCHON !", + // 5 "TROTTEL. ES IST SCHON ZU SPaeT, WIE IMMER", "ICH BIN ABSOLUT EINVERSTANDEN", "ICH UND DIE HOSEN VOLL ?", "DAMIT DAS KLAR IST, KURZER : DU SPRICHST GERADE MIT DEM EINZIGEN DER DAS GEHEIMREZEPT GEGEN VAMPIRE HAT", "NICHT JEDER KANN GEGEN EINEN VAMPIR ANTRETEN.MAN MUSS EIN PAAR GANZ BESONDERE EIGENSCHAFTEN BESITZEN", + // 10 "DU HAST SIE NICHT", "WETTEN NICHT ? 100.000 MARK, DASS NICHT !", "SCHON GUT, KOMM REIN", "WENN DU DICH DRACULA WIRKLICH STELLEN WILLST WIRST DU ALLE DIESE VAMPIRTYPISCHEN SAUG-UND QUIETSCHGERaeUSCHE ERTRAGEN MueSSEN", "IST DAS KLAR ?", + // 15 "O.K. WARTE MAL EINEN MOMENT", "STELL DICH BITTE MAL IN DIE MITTE DES ZIMMERS", "GUCKEN WIR MAL. WO IST DIESE PLATTE MIT\"FINGERNaeGEL KRATZEN AN DER TAFEL ENTLANG\" ?", "SEHR GUT, GEHEN WIR DA HIN", "SIEHST DU, DU BIST GENAUSO UNFaeHIG WIE ALLE ANDEREN !", + // 20 "JETZT GIB MIR DAS GELD,UM DAS WIR GEWETTET HABEN UND KOMM HER", "UND KOMM ERST DANN WIEDER, WENN DU 100%IG VORBEREITET BIST", "UND WAS WILLST DU JETZT ?", "ICH MUSS ZUGEBEN, DASS DU DAS NoeTIGE TALENT ZUR VAMPIRJAGD HAST", "ueBRIGENS, HIER IST DEIN GELD. ICH HABE MICH GEIRRT", + // 25 "UND JETZT GEH, ICH MoeCHTE MICH HINLEGEN", "KOMM ZURueCK,WENN DU SO WEIT BIST, DICH EINEM VAMPIR GEGENueBERZUSTELLEN UND ICH WERDE DIR HELFEN", "ACH, DAS IST GANZ EINFACH. EIN SONNENSTRAHL ODER EIN KRUZIFIX UND ER WIRD ZU STAUB", "AM MEISTEN AUFPASSEN MUSST DU BEI DRASCULA..WEGEN SEINEN TRANSHYPNITISCHEN FaeHIGKEITEN IST ER DER GEFaeHRLICHSTE UNTER DEN VAMPIREN", "DU WaeRST VERLOREN, ES SEI DENN DU HaeTTEST...", + // 30 "....DIE MISCHUNG! ", "JA, STIMMT, DU HAST RECHT. WENN ICH WEITERHIN SO LIEGE WERDE ICH IM HOHEN ALTER WOHL RueCKENPROBLEME HABEN", "NAJA, ICH GEBE ZU DASS ER der bessere von uns war, ABER DIE WICHTIGSTE ERKENNTNIS IN MEINEM ANTI-VAMPIR-STUDIUM WAR, MIR EINEN BODYGUARD ZUZULEGEN", "ICH HABE EINE IMMUNITaeTSMISCHUNG GEFUNDEN. MIT DER KANN DIR KEIN EINZIGER VAMPIRBISS ETWAS ANHABEN, UND AUCH NICHT SEINE TRANSHYPNISIE.", "NEIN, TUT MIR LEID, ICH HATTE SIE damals, ABER EINE MISCHUNG DIESER KONSISTENZ IST SEHR GEFaeHRLICH, UND STELL DIR MAL VOR, ES GERaeT IN VAMPIRHaeNDE", + // 35 "DAS WueRDE IHN IMMUN GEGEN KNOBLAUCH UND SONNENLICHT GEMACHT HABEN, DIE RESTE, DIE ICH NICHT MEHR FueR WISSENSCHAFTLICHE ZWECKE BRAUCHTE, landeten im klo", "NUR DIE RUHE, ICH HABE DAS REZEPT KOMPLETT IM KOPF ", "ICH BRAUCHE KNOBLAUCH,AH, HAB ICH SCHON, ABER DANN MUSST DU NOCH WACHS BESORGEN, NIKOTIN, KAUGUMMI UND EIN BLaeTTCHEN ODER EINE SERVIETTE ODER SO WAS", "ACH KLAR ! UND DIE WICHTIGSTE ZUTAT : EIN PAAR BLaeTTER EINER SELTSAMEN PFLANZE DIE FREDDY HEISST", "ES HANDELT SICH UM EINE TOPFBLUME DEREN BLaeTTER ZAUBERKRaeFTE HABEN, WENN MAN SIE MIT EINER GOLDSICHEL ABSCHNEIDET", + // 40 "ALSO, DU WEISST SCHON, SOBALD DU MIR DIESE FueNF ZUTATEN GEBRACHT HAST, BEREITE ICH DIR DIE MISCHUNG ZU", "DANACH BIST DU FueR DEN KAMPF GEGEN DRASCULA GERueSTET", "DENK DRAN : WACHS, NIKOTIN, EIN KAUGUMMI, EIN BLaeTTCHEN UND EIN PAAR BLaeTTER VON FREDDY, MIT EINER GOLDSICHEL ABGESCHNITTEN", "HAB ICH DIR DOCH SCHON GESAGT ! NUR DANK DER MISCHUNG", "OK. ALLES KLAR. ICH FANG DANN MAL AN EINEN ZU BAUEN...aeH VORZUBEREITEN. DAUERT AUCH NICHT LANGE", + // 45 "DAS IST EINE ZAUBERFORMEL, DIE VOR VAMPIREN SCHueTZT", "DAS WAR ICH, DAMIT MAN NICHT MERKT, DASS DER ZEICHNER VERGESSEN HAT DAS FENSTER VON VORHIN ZU ZEICHNEN", "ALSO, ZUERST MUSST DU WISSEN WIE MAN ZUM SCHLOSS VON DRASCULA KOMMT.", "ES GIBT EINE GROTTE, DIE DIREKT ZUM SCHLOSS FueHRT, UND DURCH DIE IGOR, DIESER BEKLOPPTE ELVIS-FAN MORGENS IMMER ZUM DORF RUNTER GEHT", "ABER PASS AUF, SIE WIRD PERMANENT VON EINEM VAMPIR BEWACHT, DEN DU ERSTMAL LOSWERDEN MUSST", + // 50 "ES GIBT DA EINEN ALTEN BRUNNEN BEI DER FRIEDHOFSKAPELLE", "FRueHER WURDE ER FueR HEXENPROZESSE BENUTZT", "MAN WARF DIE HEXEN IN DEN BRUNNEN. WENN SIE UNTERGINGEN WAREN SIE HEXEN, WENN NICHT, DANN NICHT", "EINMAL WARFEN WIR EINE RUNTER, DIE NICHT UNTERGING, ALSO WAR SIE KEINE HEXE", "WENN WIR LOSGEHEN, NIMMST DU DEINE MISCHUNG, ABER WIR HABEN NUR FueR EINE PERSON", + // 55 "AM BESTEN RAUCHST DU IHN DIR KURZ BEVOR DU DRACULA GEGENueBERSTEHST", "LAUF !", "BILLIGE AUSREDEN !", "HEINZ HACKER ? ICH BIN DOKTOR VON BRAUN", "HoeREN SIE ZU, ES IST SEHR WICHTIG. ES GEHT UM DIE MISCHUNG", + // 60 "ICH HABE EIN BUCH ueBER MISCHUNGEN GEFUNDEN UND DA STEHT DASS MAN KEINEN ALKOHOL TRINKEN DARF, SOBALD MAN DIE MISCHUNG GERAUCHT HAT", "DER ALKOHOL REAGIERT IM MAGEN MIT DEN SUBSTANZEN DER MISCHUNG UND VERNICHTET IHRE WIRKUNG BINNEN WENIGER MILLISEKUNDEN", "ICH MUSS AUFLEGEN. DIE POLIZEI IST HINTER MIR HER. DIE IDIOTEN HALTEN MICH FueR EINEN DROGEN-DEALER !ALSO, TSCHueSS UND VIEL GLueCK !", }, { + // 0 "", "QUI DIABLE APPELLE \267 CETTE HEURE-CI?", "H... NON, NON. JE SUIS LE NAIN GANYM\324DE... LE PROFESSEUR VON BRAUN... N'HABITE DJ\267 L\267", "NON, JE NE SAIS PAS O\353 IL EST!", "VA-T'-EN!", + // 5 "IMBCIL! C'EST DJ\267 TROP TARD! C'EST TOUJOURS TROP TARD!", "JE SUIS TOUT-\267-FAIT CONFORME", "MOI PEUR?", "RENSEIGNE-TOI, MON GARS: TU PARLES AVEC LE SEUL QUI CONNA\327T LE SECRET POUR CONFRONTER LES VAMPIRES", "TOUT LE MONDE N'EST PAS CAPABLE DE LUTTER AVEC UN VAMPIRE. IL FAUT DES QUALITS SPCIALES", + // 10 "TU NE LES A PAS", "EST-CE QUE TU PARIE TOUT L'ARGENT QUE TU AS \267 QUE C'EST NON?", "\200A VA, ENTRE", "SI EN V\220RIT\220 TU TE SENS CAPABLE DE CONFRONTER DRASCULA, IL FAUDRA QUE TU SUPPORTES TOUS LES BRUITS GRIN\200ANTS ET SU\200ANTS", "C'EST CLAIR?", + // 15 "D'ACCORD. ATTENDS UN INSTANT", "METS-TOI AU MILIEU DE LA CHAMBRE, S'IL TE PLA\327T", "VOYONS! O\353 EST-CE QUE J'AI MIS LE DISQUE \"ONGLES GRATTANT UN TABLEAU\"?", "TR\324S BIEN. ON Y VA", "TU VOIS? TU ES UN INCAPABLE, COMME TOUS LES AUTRES", + // 20 "MAINTENANT DONNE-MOI L'ARGENT QUE TU AS PERDU ET VA-T'-EN", "ET N'Y REVIENS \267 MOINS QUE TU SOIS COMPL\324TEMENT EN FORME", "ET QUE VEUX-TU MAINTENANT?", "JE DOIS LE RECONNA\327TRE... TU AS DES APTITUDES POUR LUTTER CONTRE LES VAMPIRES", "EN FAIT, TIENS TON ARGENT. JE SAIS RECONNA\327TRE MES ERREURS", + // 25 "MAINTENANT VA-T'-EN, JE VEUX DORMIR UN PEU ", "QUAND TU SOIS PR\322T \267 TE CONFRONTER AVEC UN VAMPIRE, REVIENS ET TU POURRAS COMPTER SUR MOI", "OH! C'EST FACIL. AVEC LA LUMI\324RE DU SOLEIL OU UN CRUCIFIX TU LE R\220DUIT EN CENDRES", "MAIS TU DOIS FAIRE SP\220CIALE ATTENTION AVEC DRASCULA. GR\266CE \267 SES POUVOIRS FRISYSHNOSTIQUES C'EST LE PLUS PUISSANT DES VAMPIRES", "JE SERAIS PERDU SI CE N'EST PAS POUR LA...", + // 30 "...POTION!", "OH, BIEN S\352R. TU AS RAISON, SI JE CONTINUE \267 DORMIR COMME \200\265, J'AURAI DES PROBL\324MES DE COLONNE DANS MA VIEILLESSE", "bon, J'ACCEPTE QU'IL A \220T\220 MEILLEURE ADVERSAIRE QUE MOI, MAIS JE ME SUIS GARD\220 LE DOS GR\266CE \267 MA BONNE TROUVAILLE DANS L'\220TUDE DE TECHNIQUES ANTI-VAMPIRES", "J'AI D\220COUVERT UNE POTION IMMUNOLOGIQUE QUI TE FAIT INVULN\220RABLE CONTRE N'IMPORTE QUELLE MORSURE DE VAMPIRE OU SES POUVOIRS FRSYSSHNOTIQUES", "NON, EXCUSES-MOI. JE L'AI EUE, MAIS UNE POTION DE CES CARACT\220RISTIQUES EST DANGEREUSE. IMAGINE TOI SI ELLE TOMBAIT DANS LES MAINS D'UN VAMPIRE", + // 35 "IL DEVIENDRAIT IMMUNIS\220 AUX AILS, \267 LA LUMI\324RE DU SOLEIL. DONC, J'AI D\352 M'EN D\220BARRASSER DES EXC\220DENTS PAR LA SCIENTIFIQUE M\220THODE DE LES JETER AUX \220GOUTS", "RESTE TRANQUILLE, JE ME SOUVIENS PARFAITEMENT DE LA PR\220PARATION DE CETTE POTION", "il me faut D'AIL, MAIS J'EN AI D\220J\267. IL FAUDRA UN PEU DE CIRE, DE LA NICOTINE, UN CHEWING-GUM ET UN PAPIER \267 CIGARETTES, OU QUELQUE CHOSE PAREILLE", "AH! ET CERTAINEMENT, L'INGR\220DIANT PRINCIPAL: LES FEUILLES D'UNE \220TRANGE PLANTE APPEL\220E FERNAN", "IL S'AGIT D'UNE PLANTE GRIMPANTE DONT LES FEUILLES FOURNISSENT DES POUVOIRS MAGIQUES SI ON LES COUPE AVEC UNE FAUCILLE EN OR", + // 40 "TU LE SAIS D\220J\267. D\324S QUE TU AURAS CES CINQ TRUCS APPORTE-LES-MOI ET JE TE PR\220PARERAI LA POTION", "APR\324S TU SERAS PR\322T POUR LUTTER CONTRE DRASCULA", "RAPPELLE-TOI: DE LA CIRE, DE LA NICOTINE, UN CHEWING-GUM, UN PAPIER ET LES FEUILLES DE FERNAN, LA PLANTE, COUP\220ES AVEC UNE FAUCILLE EN OR", "JE TE L'AI D\220J\267 DIT! TOUT A \220T\220 GR\266CE \267 LA POTION", "AH! TR\324S BIEN! ALORS, JE VAIS ME PR\220PARER LE PO... LA POTION. JE N'AI QUE POUR UN MOMENT", + // 45 "C'EST UN SORTIL\324GE DE PROTECTION CONTRE-VAMPIRES", "JE L'AI MIS POUR DISSIMULER, LE DESSINATEUR AYANT OUBLI\220 D'Y METTRE LA FEN\322TRE QU'ON VOIT DU DEHORS", "EH BIEN, CE QUE TU DOIS SAVOIR D'ABORD C'EST LA FA\200ON D'ALLER AU CH\266TEAU DE DRASCULA", "IL Y A UNE GROTTE QUI M\324NE DIRECTEMENT AU CH\266TEAU ET QU'IGOR, CE FOU FAN D'ELVIS, EN UTILISE POUR SE RENDRE AU VILLAGE LE MATIN", "MAIS FAIT ATTENTION, ELLE TOUJOURS GARD\220E PAR UN VAMPIRE. TU DEVRAS T'EN D\220BARRASSER", + // 50 "IL Y A UN VIEUX PUITS \267 C\342T\220 DE LA CHAPELLE DU CIMETI\324RE", "ON L'UTILISAIT JADIS POUR JUGER DES AFFAIRES DE SORCELLERIE", "ON JETAIT LES SORCI\324RES AU PUITS. SI ELLES COULAIENT, ON \220TAIT S\352R; AUTREMENT, PAS", "UNE FOIS ON A JET\220 UNE ET ELLE N'AS PAS COUL\220, DONC ELLE NE SERAIT PAS UNE SORCI\324RE", "MAINTENANT GARDE \267 LA QUESTION QUI NOUS INT\220RESSE: TIENS TA POTION, MAIS ON NE M'A PAS DONN\220 QUE POUR UN SEULEMENT.", + // 55 "IL VAUDRA MIEUX QUE TU LA FUMES JUSTE AVANT DE CONFRONTER DRASCULA", "COURS!", "DES EXCUSES!", "JHON HACKER? SUIS LE DOCTEUR VON BRAUN", "\220COUTEZ-MOI. C'EST TR\324S IMPORTANT. C'EST SUR LA POTION", + // 60 "DANS UN LIVRE QUE J'AI TROUV\220 SUR LES POTIONS, IL DIT QUE VOUS NE DEVEZ PAS BOIR DE L'ALCOOL APR\324S AVOIR FUM\220 LA POTION ", "L'ALCOOL AVAL\220 R\220AGIT AVEC LES INGR\220DIENTS DE LA POTION ET ANNULE SES EFFETS EN DIXI\324MES DE SECONDE", "JE DOIS RACCROCHER. SUIS CHERCH\220 PAR LA POLICE. ILS DISENT QUE JE TRAFIQUE EN DROGUES -IGNORANTS! AU REVOIR ET BONNE CHANCE EN SAUVANT LE MONDE", }, { + // 0 "", "MA CHI BUSSA A QUESTE ORE?", "EH...NO,NO. IO SONO IL NANNO GANIMEDI....IL PROFESSORE VON BRAUN NON ABITA QU\336 PI\353", "NO, NON SO DOV'\324!", "HO DETTO VIA!", + // 5 "IMBECILE. ORMAI TROPPO TARDE, SEMRE TARDE", "SONO COMPLETAMENTE D'ACCORDO", "IO, PAURA?", "ASCOLTA BENE RAGAZZO: STAI PARLANDO CON L'UNICA PERSONA CHE CONOSCE IL SEGRETO PER VINCERE AI VAMPIRI", "NON TUTTI QUANTI POSSONO LOTTARE CON UN VAMPIRO. SI DEVONO AVERE DELLE CARATTERISTICHE SPEZIALI", + // 10 "NO CE LE HAI", "SICURO CHE NON SCOMMETI TUTTO IL TUO SOLDI!", "VA BENE . AVANTI", "SE DAVVERO SEI PRONTO PER LOTTARE CONTRO DRASCULA, DEVI POTERE SOPPORTARE TUTTI I RUMORI STRIDENTI E VAMPIRICI", "TUTTO CHIARO?", + // 15 "D'ACCORDO. ASPETTA UN ATTIMO", "PER FAVORE, METTETI NEL CENTRO DELLA CAMERA", "DOV'\324 HO MESSO IL COMPACT DISC DI \"UNGHIE GRAFFIANDO UNA LAVAGNA\"", "MOLTO BENE, ANDIAMO", "VEDI? SEI UN INUTILE, COME TUTTI GLI ALTRI", + // 20 "ORA DAMI IL SOLDI CHE HAI PERSO, E VIA", "E NON TORNARE FINO CHE NON SIA COMPLETAMENTE PRONTO", "E COSA VUOI TU ADESSO?", "DEVO AMMETTERLO... HAI LA STOFFA DI LOTTATORE PER VINCERE DRASCULA", "EH..! PRENDI IL TUO SOLDI. SO QUANDO HO SBAGLIATO", + // 25 "ADESSO VATENE, VOGLIO DORMIRE UN P\343", "QUANDO SIA DISPOSTO A UCCIDERE QUALCHE VAMPIRO, TORNA E TI AIUTER\343 ", "QUELLO \324 FACILE. LA LUCE DEL SOLE O UN CROCIFISSO, E L'HAI SCHISCCIATO", "CON CHI DEVI FARE MOLTA ATTENZIONE \324 CON DRASCULA. I SUOI POTERI FRISISHNOSTICI GLI FANNO IL PI\353 FORTE DEI VAMPIRI", "NON POTREI FARE NULLA SE NON FOSSE PER LA .....", + // 30 "...POZIONE!", "CERTO. HAI RAGIONE, SE CONTINUO DORMENDO COS\336 FORSE AVR\343 PROBLEMI DI SCHIENA QUANDO SIA VECCHIO", "BENE, \324 VERO CHE FU MEGLIO LOTTATORE DI ME, MA IL MIO STUDIO SU TECNICHE ANTI-VAMPIRI GLI AIUT\343 MOLTISSIMO", "HO SCOPERTO UNA POZIONE DI IMMUNUT\267 . TI FA INVULNERABILE AI MORSI DI VAMPIRI, O AI SUOI POTERI FRISISHNOTICI", "NO, SCUSA, CE L'EBBI MOLTO TEMPO FA, MA UNA POZIONE COM'ERA LA MIA \324 PERICOLOSA. FIGURATI SE LA AVESSE UN VAMPIRO", + // 35 "GLI FAREBBE IMMUNE AGLI AGLII, ALLA LUCE DEL SOLE.... PER QUELLO L'HO SCARICATA NEL CESO", "TRANQUILLO, MI RICORDO BENISSIMO DI COME RIFARLA", "BISOGNO AGLII, CHE NE HO QU\326, DOVRAI PORTARMI UN P\220 DI CERA, NICOTINA, UNA GOMMA, E UNA CARTINA O UN TOVAGLIOLO, O QUALCOSA DEL GENERE", "-AH! E COME NO, L'INGREDIENTE PRINCIPALE: DELLE FOGLIE DI UNA STRANA PIANTA CHIAMATA FERDINAN", "\324 UNA PIANTA CONVOLVOLO, LE SUE FOGLIE PROPORZIONANO POTERI MAGICI SE SONO TAGLIATE DA UNA FALCE D'ORO", + // 40 "ALLORA, PORTAMI QUESTE CINQUE COSE E FAR\343 PER TE LA POZIONE", "DOPO SAREI PRONTO PER UCCIDERE DRASCULA", "RICORDA: CERA, NICOTINA, UNA GOMMA, UNA CARTINA E FOGLIE DI FERDINAN, LA PIANTA, TAGLIATE DA UNA FALCE D'ORO", "TI L'HO GI\267 DETTO! FU TUTTO GRAZIE ALLA POZIONE", "AH, MOLTO BENE. DUNQUE VADO A FARE LA CAN......LA POZIONE. SAR\267 UN ATTIMINO", + // 45 "\324 SOLTANTO UN SORTILEGIO DI PROTEZIONE CONTRO VAMPIRI", "L'HO MESSO PER DISSIMULARE CHE IL DISEGNATORE HA DIMENTICATO METTERE LA FINESTRA CHE SI VEDE DA FUORI", "BENE, PRIMA DEVI SAPERE COME ARRIVARE AL CASTELLO DRASCULA", "C'\324 UNAGROTTA CHE VA AL CASTELLO E CHE UTILIZZA QUEL MATTO FAN DI ELVIS, IGOR, PER SCENDERE AL PAESE TUTTE LA MATTINE", "MA FA ATTENZIONE, SEMPRE \220 PROTETTA DA UN VAMPIRO. DOVRAI LIBERARTI DI LUI", + // 50 "C'\220 UN VECCHIO POZZO ACCANTO ALLA CAPELLA DEL CIMITERO", "SI UTILIZZAVA MOLTO TEMPO FA PER GIUDICARE CASI DI STREGONERIA", "SI BUTTAVANO DENTRO ALLE STREGE. SE SI AFFONDAVANO ERANO STREGHE. SE NO, NO", "UNA VOLTA BUTTAMMO UNA E GALLEGGI\220, DUNQUE NON SAREBBE UNA STREGA", "ORA BEVE LA POZIONE. PECCATO CI SIA SOLTANTO PER UNO", + // 55 "SAR\265 MEGLIO FUMARLO PROPRIO PRIMA DELLA LOTTA CONTRO DRASCULA", "CORRI1", "SCUSE!", "JOHN HACKER? SONO IL DOTTORE VON BRAUN", "SENTA, \220 MOLTO IMPORTANTE, \220 SULLA POZIONE", + // 60 "HO TROVATO UN LIBRO SU POZIONI E DICE CHE NON SI DEVE BERE ALCOL DOPO AVERE FUMATO LA POZIONE", "L'ALCOL BEVUTO FA REAZIONE CON LE SOSTANZE DELLA POZIONE E ANNULLA I SUOI EFFETTI IN DECIME DI SECONDO", "DEVO RIATTACARE. LA POLIZIA MI CERCA. DICONO CHE TRAFFICO DROGHE -IGNORANTI! BENE, ALLORA ADIO E IN BOCA IL LUPO", @@ -4307,6 +5173,27 @@ const char *_texthis[][5] = { "When he thought he was ready, he came up to the castle and had a very violent encounter with Drascula.", "Nobody knows exactly what happened there. Although Von Braun lost, Drascula could not kill him.", "Von Braun felt humiliated by his defect, run away from the castle and has never dared to face Drascula ever again.", +}, + "", + "", + "", + "", + "" +{ +}, +{ + "", + "", + "", + "", + "" +}, +{ + "", + "", + "", + "", + "" }, { "", @@ -4315,11 +5202,32 @@ const char *_texthis[][5] = { "", "" }, +}; + + +const char *_textverbs[][6] = { +{ + "look", + "take", + "open", + "close", + "talk", + "push", +}, +{ + "mirar", + "cogar", + "abrir", + "cerrar", + "hablar", + "mover", +}, { "", "", "", "", + "", "" }, { @@ -4327,6 +5235,7 @@ const char *_texthis[][5] = { "", "", "", + "", "" }, { @@ -4334,6 +5243,7 @@ const char *_texthis[][5] = { "", "", "", + "", "" }, }; -- cgit v1.2.3 From 1320ab610be469e5c2cf2eaf2a16531d646de2ba Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 11 May 2008 08:55:16 +0000 Subject: Cleanup of parsing code. svn-id: r31999 --- engines/parallaction/parser.cpp | 13 +- engines/parallaction/parser.h | 52 +++-- engines/parallaction/parser_br.cpp | 278 ++++++++++++------------- engines/parallaction/parser_ns.cpp | 404 ++++++++++++++++++------------------- 4 files changed, 363 insertions(+), 384 deletions(-) diff --git a/engines/parallaction/parser.cpp b/engines/parallaction/parser.cpp index 542a35b7f8..f9de6eb4af 100644 --- a/engines/parallaction/parser.cpp +++ b/engines/parallaction/parser.cpp @@ -213,7 +213,9 @@ uint16 Script::readLineToken(bool errorOnEOF) { void Parser::reset() { _currentOpcodes = 0; _currentStatements = 0; - _script = 0; + + _statements.clear(); + _opcodes.clear(); } void Parser::pushTables(OpcodeSet *opcodes, Table *statements) { @@ -241,14 +243,5 @@ void Parser::parseStatement() { (*(*_currentOpcodes)[_lookup])(); } -void Parser::bind(Script *script) { - reset(); - _script = script; -} - -void Parser::unbind() { - reset(); -} - } // namespace Parallaction diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h index de0a56ddfc..1af8cafc38 100644 --- a/engines/parallaction/parser.h +++ b/engines/parallaction/parser.h @@ -101,16 +101,11 @@ public: OpcodeSet *_currentOpcodes; Table *_currentStatements; - void bind(Script *script); - void unbind(); + void reset(); void pushTables(OpcodeSet *opcodes, Table* statements); void popTables(); void parseStatement(); -protected: - void reset(); - - Script *_script; }; #define DECLARE_UNQUALIFIED_ZONE_PARSER(sig) void locZoneParse_##sig() @@ -128,6 +123,7 @@ class LocationParser_ns { protected: Parallaction_ns* _vm; + Script *script; Parser *parser; Table *_zoneTypeNames; @@ -143,11 +139,10 @@ protected: Table *_locationZoneStmt; Table *_locationAnimStmt; - struct LocationParserContext { + struct ParserContext { bool end; const char *filename; - Script *script; ZonePtr z; AnimationPtr a; int nextToken; @@ -160,7 +155,7 @@ protected: char *bgName; char *maskName; char *pathName; - } _locParseCtxt; + } ctxt; void warning_unexpected(); @@ -205,25 +200,25 @@ protected: DECLARE_UNQUALIFIED_COMMAND_PARSER(move); DECLARE_UNQUALIFIED_COMMAND_PARSER(endcommands); - virtual void parseGetData(Script &script, ZonePtr z); - virtual void parseExamineData(Script &script, ZonePtr z); - virtual void parseDoorData(Script &script, ZonePtr z); - virtual void parseMergeData(Script &script, ZonePtr z); - virtual void parseHearData(Script &script, ZonePtr z); - virtual void parseSpeakData(Script &script, ZonePtr z); + virtual void parseGetData(ZonePtr z); + virtual void parseExamineData(ZonePtr z); + virtual void parseDoorData(ZonePtr z); + virtual void parseMergeData(ZonePtr z); + virtual void parseHearData(ZonePtr z); + virtual void parseSpeakData(ZonePtr z); - char *parseComment(Script &script); - char *parseDialogueString(Script &script); - Dialogue *parseDialogue(Script &script); + char *parseComment(); + char *parseDialogueString(); + Dialogue *parseDialogue(); void resolveDialogueForwards(Dialogue *dialogue, uint numQuestions, Table &forwards); - Answer *parseAnswer(Script &script); - Question *parseQuestion(Script &script); - - void parseZone(Script &script, ZoneList &list, char *name); - void parseZoneTypeBlock(Script &script, ZonePtr z); - void parseWalkNodes(Script& script, WalkNodeList &list); - void parseAnimation(Script &script, AnimationList &list, char *name); - void parseCommands(Script &script, CommandList&); + Answer *parseAnswer(); + Question *parseQuestion(); + + void parseZone(ZoneList &list, char *name); + void parseZoneTypeBlock(ZonePtr z); + void parseWalkNodes(WalkNodeList &list); + void parseAnimation(AnimationList &list, char *name); + void parseCommands(CommandList&); void parseCommandFlags(); void saveCommandForward(const char *name, CommandPtr cmd); void resolveCommandForwards(); @@ -330,16 +325,15 @@ protected: OpcodeSet _instructionParsers; Table *_instructionNames; - struct { + struct ParserContext { bool end; AnimationPtr a; InstructionPtr inst; LocalVariable *locals; - ProgramPtr program; // BRA specific InstructionPtr openIf; - } _instParseCtxt; + } ctxt; DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(defLocal); DECLARE_UNQUALIFIED_INSTRUCTION_PARSER(animation); diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp index 3d5cdc795a..74c7d79e1f 100644 --- a/engines/parallaction/parser_br.cpp +++ b/engines/parallaction/parser_br.cpp @@ -300,7 +300,7 @@ DECLARE_LOCATION_PARSER(location) { debugC(7, kDebugParser, "LOCATION_PARSER(location) "); strcpy(_vm->_location._name, _tokens[1]); - _locParseCtxt.bgName = strdup(_tokens[1]); + ctxt.bgName = strdup(_tokens[1]); bool flip = false; int nextToken; @@ -331,14 +331,14 @@ DECLARE_LOCATION_PARSER(location) { DECLARE_LOCATION_PARSER(zone) { debugC(7, kDebugParser, "LOCATION_PARSER(zone) "); - parseZone(*_locParseCtxt.script, _vm->_location._zones, _tokens[1]); + parseZone(_vm->_location._zones, _tokens[1]); - _locParseCtxt.z->_index = _locParseCtxt.numZones++; + ctxt.z->_index = ctxt.numZones++; if (_vm->getLocationFlags() & kFlagsVisited) { - _locParseCtxt.z->_flags = _vm->_zoneFlags[_vm->_currentLocationIndex][_locParseCtxt.z->_index]; + ctxt.z->_flags = _vm->_zoneFlags[_vm->_currentLocationIndex][ctxt.z->_index]; } else { - _vm->_zoneFlags[_vm->_currentLocationIndex][_locParseCtxt.z->_index] = _locParseCtxt.z->_flags; + _vm->_zoneFlags[_vm->_currentLocationIndex][ctxt.z->_index] = ctxt.z->_flags; } } @@ -347,14 +347,14 @@ DECLARE_LOCATION_PARSER(zone) { DECLARE_LOCATION_PARSER(animation) { debugC(7, kDebugParser, "LOCATION_PARSER(animation) "); - parseAnimation(*_locParseCtxt.script, _vm->_location._animations, _tokens[1]); + parseAnimation(_vm->_location._animations, _tokens[1]); - _locParseCtxt.a->_index = _locParseCtxt.numZones++; + ctxt.a->_index = ctxt.numZones++; if (_vm->getLocationFlags() & kFlagsVisited) { - _locParseCtxt.a->_flags = _vm->_zoneFlags[_vm->_currentLocationIndex][_locParseCtxt.a->_index]; + ctxt.a->_flags = _vm->_zoneFlags[_vm->_currentLocationIndex][ctxt.a->_index]; } else { - _vm->_zoneFlags[_vm->_currentLocationIndex][_locParseCtxt.a->_index] = _locParseCtxt.a->_flags; + _vm->_zoneFlags[_vm->_currentLocationIndex][ctxt.a->_index] = ctxt.a->_flags; } } @@ -394,14 +394,14 @@ DECLARE_LOCATION_PARSER(flags) { DECLARE_LOCATION_PARSER(comment) { debugC(7, kDebugParser, "LOCATION_PARSER(comment) "); - _vm->_location._comment = parseComment(*_locParseCtxt.script); + _vm->_location._comment = parseComment(); } DECLARE_LOCATION_PARSER(endcomment) { debugC(7, kDebugParser, "LOCATION_PARSER(endcomment) "); - _vm->_location._endComment = parseComment(*_locParseCtxt.script); + _vm->_location._endComment = parseComment(); } @@ -421,7 +421,7 @@ DECLARE_LOCATION_PARSER(music) { DECLARE_LOCATION_PARSER(redundant) { debugC(7, kDebugParser, "LOCATION_PARSER(redundant) "); - warning("redundant '%s' line found in script '%s'", _tokens[0], _locParseCtxt.filename); + warning("redundant '%s' line found in script '%s'", _tokens[0], ctxt.filename); } @@ -435,7 +435,7 @@ DECLARE_LOCATION_PARSER(character) { DECLARE_LOCATION_PARSER(ifchar) { debugC(7, kDebugParser, "LOCATION_PARSER(ifchar) "); - _locParseCtxt.script->skip("ENDIF"); + script->skip("ENDIF"); } @@ -449,7 +449,7 @@ DECLARE_LOCATION_PARSER(null) { DECLARE_LOCATION_PARSER(mask) { debugC(7, kDebugParser, "LOCATION_PARSER(mask) "); - _locParseCtxt.maskName = strdup(_tokens[1]); + ctxt.maskName = strdup(_tokens[1]); _vm->_gfx->_backgroundInfo.layers[0] = atoi(_tokens[2]); _vm->_gfx->_backgroundInfo.layers[1] = atoi(_tokens[3]); _vm->_gfx->_backgroundInfo.layers[2] = atoi(_tokens[4]); @@ -459,14 +459,14 @@ DECLARE_LOCATION_PARSER(mask) { DECLARE_LOCATION_PARSER(path) { debugC(7, kDebugParser, "LOCATION_PARSER(path) "); - _locParseCtxt.pathName = strdup(_tokens[1]); + ctxt.pathName = strdup(_tokens[1]); } DECLARE_LOCATION_PARSER(escape) { debugC(7, kDebugParser, "LOCATION_PARSER(escape) "); - parseCommands(*_locParseCtxt.script, _vm->_location._escapeCommands); + parseCommands(_vm->_location._escapeCommands); } @@ -487,7 +487,7 @@ DECLARE_COMMAND_PARSER(ifchar) { debugC(7, kDebugParser, "COMMAND_PARSER(ifchar) "); if (!scumm_stricmp(_vm->_char.getName(), _tokens[1])) - _locParseCtxt.script->skip("endif"); + script->skip("endif"); } @@ -503,22 +503,22 @@ DECLARE_COMMAND_PARSER(location) { createCommand(parser->_lookup); - _locParseCtxt.cmd->u._string = strdup(_tokens[1]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._string = strdup(_tokens[1]); + ctxt.nextToken++; - if (_tokens[_locParseCtxt.nextToken][0] != '\0') { - if (isdigit(_tokens[_locParseCtxt.nextToken][0]) || _tokens[_locParseCtxt.nextToken][0] == '-') { - _locParseCtxt.cmd->u._startPos.x = atoi(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; - _locParseCtxt.cmd->u._startPos.y = atoi(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; + if (_tokens[ctxt.nextToken][0] != '\0') { + if (isdigit(_tokens[ctxt.nextToken][0]) || _tokens[ctxt.nextToken][0] == '-') { + ctxt.cmd->u._startPos.x = atoi(_tokens[ctxt.nextToken]); + ctxt.nextToken++; + ctxt.cmd->u._startPos.y = atoi(_tokens[ctxt.nextToken]); + ctxt.nextToken++; } - if (isdigit(_tokens[_locParseCtxt.nextToken][0]) || _tokens[_locParseCtxt.nextToken][0] == '-') { - _locParseCtxt.cmd->u._startPos2.x = atoi(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; - _locParseCtxt.cmd->u._startPos2.y = atoi(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; + if (isdigit(_tokens[ctxt.nextToken][0]) || _tokens[ctxt.nextToken][0] == '-') { + ctxt.cmd->u._startPos2.x = atoi(_tokens[ctxt.nextToken]); + ctxt.nextToken++; + ctxt.cmd->u._startPos2.y = atoi(_tokens[ctxt.nextToken]); + ctxt.nextToken++; } } @@ -532,8 +532,8 @@ DECLARE_COMMAND_PARSER(string) { createCommand(parser->_lookup); - _locParseCtxt.cmd->u._string = strdup(_tokens[1]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._string = strdup(_tokens[1]); + ctxt.nextToken++; parseCommandFlags(); addCommand(); @@ -544,10 +544,10 @@ DECLARE_COMMAND_PARSER(math) { createCommand(parser->_lookup); - _locParseCtxt.cmd->u._lvalue = _vm->_countersNames->lookup(_tokens[1]); - _locParseCtxt.nextToken++; - _locParseCtxt.cmd->u._rvalue = atoi(_tokens[2]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._lvalue = _vm->_countersNames->lookup(_tokens[1]); + ctxt.nextToken++; + ctxt.cmd->u._rvalue = atoi(_tokens[2]); + ctxt.nextToken++; parseCommandFlags(); addCommand(); @@ -560,26 +560,26 @@ DECLARE_COMMAND_PARSER(test) { createCommand(parser->_lookup); uint counter = _vm->_countersNames->lookup(_tokens[1]); - _locParseCtxt.nextToken++; + ctxt.nextToken++; if (counter == Table::notFound) { if (!scumm_stricmp("SFX", _tokens[1])) { - _locParseCtxt.cmd->_id = CMD_TEST_SFX; + ctxt.cmd->_id = CMD_TEST_SFX; } else { error("unknown counter '%s' in test opcode", _tokens[1]); } } else { - _locParseCtxt.cmd->u._lvalue = counter; - _locParseCtxt.cmd->u._rvalue = atoi(_tokens[3]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._lvalue = counter; + ctxt.cmd->u._rvalue = atoi(_tokens[3]); + ctxt.nextToken++; if (_tokens[2][0] == '>') { - _locParseCtxt.cmd->_id = CMD_TEST_GT; + ctxt.cmd->_id = CMD_TEST_GT; } else if (_tokens[2][0] == '<') { - _locParseCtxt.cmd->_id = CMD_TEST_LT; + ctxt.cmd->_id = CMD_TEST_LT; } - _locParseCtxt.nextToken++; + ctxt.nextToken++; } parseCommandFlags(); @@ -592,12 +592,12 @@ DECLARE_COMMAND_PARSER(music) { createCommand(parser->_lookup); - _locParseCtxt.cmd->u._musicCommand = _audioCommandsNames->lookup(_tokens[1]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._musicCommand = _audioCommandsNames->lookup(_tokens[1]); + ctxt.nextToken++; if (_tokens[2][0] != '\0' && scumm_stricmp("flags", _tokens[2]) && scumm_stricmp("gflags", _tokens[2])) { - _locParseCtxt.cmd->u._musicParm = atoi(_tokens[2]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._musicParm = atoi(_tokens[2]); + ctxt.nextToken++; } parseCommandFlags(); @@ -610,16 +610,16 @@ DECLARE_COMMAND_PARSER(zeta) { createCommand(parser->_lookup); - _locParseCtxt.cmd->u._zeta0 = atoi(_tokens[1]); - _locParseCtxt.nextToken++; - _locParseCtxt.cmd->u._zeta1 = atoi(_tokens[2]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._zeta0 = atoi(_tokens[1]); + ctxt.nextToken++; + ctxt.cmd->u._zeta1 = atoi(_tokens[2]); + ctxt.nextToken++; if (_tokens[3][0] != '\0') { - _locParseCtxt.cmd->u._zeta2 = atoi(_tokens[3]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._zeta2 = atoi(_tokens[3]); + ctxt.nextToken++; } else { - _locParseCtxt.cmd->u._zeta2 = 50; + ctxt.cmd->u._zeta2 = 50; } parseCommandFlags(); @@ -632,21 +632,21 @@ DECLARE_COMMAND_PARSER(give) { createCommand(parser->_lookup); - _locParseCtxt.cmd->u._object = 4 + atoi(_tokens[1]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._object = 4 + atoi(_tokens[1]); + ctxt.nextToken++; if (!scumm_stricmp("dino", _tokens[2])) { - _locParseCtxt.cmd->u._characterId = 1; + ctxt.cmd->u._characterId = 1; } else if (!scumm_stricmp("doug", _tokens[2])) { - _locParseCtxt.cmd->u._characterId = 2; + ctxt.cmd->u._characterId = 2; } else if (!scumm_stricmp("donna", _tokens[2])) { - _locParseCtxt.cmd->u._characterId = 3; + ctxt.cmd->u._characterId = 3; } else error("unknown recipient '%s' in give command", _tokens[2]); - _locParseCtxt.nextToken++; + ctxt.nextToken++; parseCommandFlags(); addCommand(); @@ -659,18 +659,18 @@ DECLARE_COMMAND_PARSER(text) { createCommand(parser->_lookup); if (isdigit(_tokens[1][1])) { - _locParseCtxt.cmd->u._zeta0 = atoi(_tokens[1]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._zeta0 = atoi(_tokens[1]); + ctxt.nextToken++; } else { - _locParseCtxt.cmd->u._zeta0 = -1; + ctxt.cmd->u._zeta0 = -1; } - _locParseCtxt.cmd->u._string = strdup(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._string = strdup(_tokens[ctxt.nextToken]); + ctxt.nextToken++; - if (_tokens[_locParseCtxt.nextToken][0] != '\0' && scumm_stricmp("flags", _tokens[_locParseCtxt.nextToken])) { - _locParseCtxt.cmd->u._string2 = strdup(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; + if (_tokens[ctxt.nextToken][0] != '\0' && scumm_stricmp("flags", _tokens[ctxt.nextToken])) { + ctxt.cmd->u._string2 = strdup(_tokens[ctxt.nextToken]); + ctxt.nextToken++; } @@ -684,8 +684,8 @@ DECLARE_COMMAND_PARSER(unary) { createCommand(parser->_lookup); - _locParseCtxt.cmd->u._rvalue = atoi(_tokens[1]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._rvalue = atoi(_tokens[1]); + ctxt.nextToken++; parseCommandFlags(); addCommand(); @@ -696,14 +696,14 @@ DECLARE_ZONE_PARSER(limits) { debugC(7, kDebugParser, "ZONE_PARSER(limits) "); if (isalpha(_tokens[1][1])) { - _locParseCtxt.z->_flags |= kFlagsAnimLinked; - _locParseCtxt.z->_linkedAnim = _vm->findAnimation(_tokens[1]); - _locParseCtxt.z->_linkedName = strdup(_tokens[1]); + ctxt.z->_flags |= kFlagsAnimLinked; + ctxt.z->_linkedAnim = _vm->findAnimation(_tokens[1]); + ctxt.z->_linkedName = strdup(_tokens[1]); } else { - _locParseCtxt.z->_left = atoi(_tokens[1]); - _locParseCtxt.z->_top = atoi(_tokens[2]); - _locParseCtxt.z->_right = atoi(_tokens[3]); - _locParseCtxt.z->_bottom = atoi(_tokens[4]); + ctxt.z->_left = atoi(_tokens[1]); + ctxt.z->_top = atoi(_tokens[2]); + ctxt.z->_right = atoi(_tokens[3]); + ctxt.z->_bottom = atoi(_tokens[4]); } } @@ -711,9 +711,9 @@ DECLARE_ZONE_PARSER(limits) { DECLARE_ZONE_PARSER(moveto) { debugC(7, kDebugParser, "ZONE_PARSER(moveto) "); - _locParseCtxt.z->_moveTo.x = atoi(_tokens[1]); - _locParseCtxt.z->_moveTo.y = atoi(_tokens[2]); -// _locParseCtxt.z->_moveTo.z = atoi(_tokens[3]); + ctxt.z->_moveTo.x = atoi(_tokens[1]); + ctxt.z->_moveTo.y = atoi(_tokens[2]); +// ctxt.z->_moveTo.z = atoi(_tokens[3]); } @@ -721,14 +721,14 @@ DECLARE_ZONE_PARSER(type) { debugC(7, kDebugParser, "ZONE_PARSER(type) "); if (_tokens[2][0] != '\0') { - _locParseCtxt.z->_type = (4 + _vm->_objectsNames->lookup(_tokens[2])) << 16; + ctxt.z->_type = (4 + _vm->_objectsNames->lookup(_tokens[2])) << 16; } int16 _si = _zoneTypeNames->lookup(_tokens[1]); if (_si != Table::notFound) { - _locParseCtxt.z->_type |= 1 << (_si - 1); - parseZoneTypeBlock(*_locParseCtxt.script, _locParseCtxt.z); + ctxt.z->_type |= 1 << (_si - 1); + parseZoneTypeBlock(ctxt.z); -// if (_locParseCtxt.z->_type & kZoneHear) { +// if (ctxt.z->_type & kZoneHear) { // _soundMan->sfxCommand(START...); // } } @@ -740,26 +740,26 @@ DECLARE_ZONE_PARSER(type) { DECLARE_ANIM_PARSER(file) { debugC(7, kDebugParser, "ANIM_PARSER(file) "); - _locParseCtxt.a->gfxobj = _vm->_gfx->loadAnim(_tokens[1]); + ctxt.a->gfxobj = _vm->_gfx->loadAnim(_tokens[1]); } DECLARE_ANIM_PARSER(position) { debugC(7, kDebugParser, "ANIM_PARSER(position) "); - _locParseCtxt.a->_left = atoi(_tokens[1]); - _locParseCtxt.a->_top = atoi(_tokens[2]); - _locParseCtxt.a->_z = atoi(_tokens[3]); - _locParseCtxt.a->_frame = atoi(_tokens[4]); + ctxt.a->_left = atoi(_tokens[1]); + ctxt.a->_top = atoi(_tokens[2]); + ctxt.a->_z = atoi(_tokens[3]); + ctxt.a->_frame = atoi(_tokens[4]); } DECLARE_ANIM_PARSER(moveto) { debugC(7, kDebugParser, "ANIM_PARSER(moveto) "); - _locParseCtxt.a->_moveTo.x = atoi(_tokens[1]); - _locParseCtxt.a->_moveTo.y = atoi(_tokens[2]); -// _locParseCtxt.a->_moveTo.z = atoi(_tokens[3]); + ctxt.a->_moveTo.x = atoi(_tokens[1]); + ctxt.a->_moveTo.y = atoi(_tokens[2]); +// ctxt.a->_moveTo.z = atoi(_tokens[3]); } @@ -767,15 +767,15 @@ DECLARE_ANIM_PARSER(endanimation) { debugC(7, kDebugParser, "ANIM_PARSER(endanimation) "); - if (_locParseCtxt.a->gfxobj) { - _locParseCtxt.a->_right = _locParseCtxt.a->width(); - _locParseCtxt.a->_bottom = _locParseCtxt.a->height(); + if (ctxt.a->gfxobj) { + ctxt.a->_right = ctxt.a->width(); + ctxt.a->_bottom = ctxt.a->height(); } - _locParseCtxt.a->_oldPos.x = -1000; - _locParseCtxt.a->_oldPos.y = -1000; + ctxt.a->_oldPos.x = -1000; + ctxt.a->_oldPos.y = -1000; - _locParseCtxt.a->_flags |= 0x1000000; + ctxt.a->_flags |= 0x1000000; parser->popTables(); } @@ -792,8 +792,8 @@ DECLARE_ANIM_PARSER(endanimation) { DECLARE_INSTRUCTION_PARSER(zone) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(zone) "); - _instParseCtxt.inst->_z = _vm->findZone(_tokens[1]); - _instParseCtxt.inst->_index = parser->_lookup; + ctxt.inst->_z = _vm->findZone(_tokens[1]); + ctxt.inst->_index = parser->_lookup; } @@ -802,12 +802,12 @@ DECLARE_INSTRUCTION_PARSER(color) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(color) "); - parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); + parseRValue(ctxt.inst->_opB, _tokens[1]); - _instParseCtxt.inst->_colors[0] = atoi(_tokens[2]); - _instParseCtxt.inst->_colors[1] = atoi(_tokens[3]); - _instParseCtxt.inst->_colors[2] = atoi(_tokens[4]); - _instParseCtxt.inst->_index = parser->_lookup; + ctxt.inst->_colors[0] = atoi(_tokens[2]); + ctxt.inst->_colors[1] = atoi(_tokens[3]); + ctxt.inst->_colors[2] = atoi(_tokens[4]); + ctxt.inst->_index = parser->_lookup; } @@ -816,10 +816,10 @@ DECLARE_INSTRUCTION_PARSER(mask) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(mask) "); - parseRValue(_instParseCtxt.inst->_opA, _tokens[1]); - parseRValue(_instParseCtxt.inst->_opB, _tokens[2]); - parseRValue(_instParseCtxt.inst->_opC, _tokens[3]); - _instParseCtxt.inst->_index = parser->_lookup; + parseRValue(ctxt.inst->_opA, _tokens[1]); + parseRValue(ctxt.inst->_opB, _tokens[2]); + parseRValue(ctxt.inst->_opC, _tokens[3]); + ctxt.inst->_index = parser->_lookup; } @@ -827,8 +827,8 @@ DECLARE_INSTRUCTION_PARSER(mask) { DECLARE_INSTRUCTION_PARSER(print) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(print) "); - parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); - _instParseCtxt.inst->_index = parser->_lookup; + parseRValue(ctxt.inst->_opB, _tokens[1]); + ctxt.inst->_index = parser->_lookup; } @@ -839,19 +839,19 @@ DECLARE_INSTRUCTION_PARSER(text) { int _si = 1; if (isdigit(_tokens[1][1])) { - _instParseCtxt.inst->_y = atoi(_tokens[1]); + ctxt.inst->_y = atoi(_tokens[1]); _si = 2; } else { - _instParseCtxt.inst->_y = -1; + ctxt.inst->_y = -1; } - _instParseCtxt.inst->_text = strdup(_tokens[_si]); + ctxt.inst->_text = strdup(_tokens[_si]); _si++; if (_tokens[_si][0] != '\0' && scumm_stricmp("flags", _tokens[_si])) { - _instParseCtxt.inst->_text2 = strdup(_tokens[_si]); + ctxt.inst->_text2 = strdup(_tokens[_si]); } - _instParseCtxt.inst->_index = parser->_lookup; + ctxt.inst->_index = parser->_lookup; } @@ -860,24 +860,24 @@ DECLARE_INSTRUCTION_PARSER(if_op) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(if_op) "); - if (_instParseCtxt.openIf) + if (ctxt.openIf) error("cannot nest 'if' blocks"); - parseLValue(_instParseCtxt.inst->_opA, _tokens[1]); - parseRValue(_instParseCtxt.inst->_opB, _tokens[3]); + parseLValue(ctxt.inst->_opA, _tokens[1]); + parseRValue(ctxt.inst->_opB, _tokens[3]); if (_tokens[2][0] == '=') { - _instParseCtxt.inst->_index = INST_IFEQ; + ctxt.inst->_index = INST_IFEQ; } else if (_tokens[2][0] == '>') { - _instParseCtxt.inst->_index = INST_IFGT; + ctxt.inst->_index = INST_IFGT; } else if (_tokens[2][0] == '<') { - _instParseCtxt.inst->_index = INST_IFLT; + ctxt.inst->_index = INST_IFLT; } else error("unknown test operator '%s' in if-clause", _tokens[2]); - _instParseCtxt.openIf = _instParseCtxt.inst; + ctxt.openIf = ctxt.inst; } @@ -885,12 +885,12 @@ DECLARE_INSTRUCTION_PARSER(if_op) { DECLARE_INSTRUCTION_PARSER(endif) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(endif) "); - if (!_instParseCtxt.openIf) + if (!ctxt.openIf) error("unexpected 'endif'"); -// _instParseCtxt.openIf->_endif = _instParseCtxt.inst; - _instParseCtxt.openIf = nullInstructionPtr; - _instParseCtxt.inst->_index = parser->_lookup; +// ctxt.openIf->_endif = ctxt.inst; + ctxt.openIf = nullInstructionPtr; + ctxt.inst->_index = parser->_lookup; } @@ -901,9 +901,9 @@ void ProgramParser_br::parseRValue(ScriptVar &v, const char *str) { return; } - int index = _instParseCtxt.program->findLocal(str); + int index = program->findLocal(str); if (index != -1) { - v.setLocal(&_instParseCtxt.locals[index]); + v.setLocal(&ctxt.locals[index]); return; } @@ -914,7 +914,7 @@ void ProgramParser_br::parseRValue(ScriptVar &v, const char *str) { error("unknown animation '%s' in script", &str[2]); } } else - a = AnimationPtr(_instParseCtxt.a); + a = AnimationPtr(ctxt.a); if (str[0] == 'X') { v.setField(&a->_left); @@ -1126,19 +1126,19 @@ void ProgramParser_br::init() { void LocationParser_br::parse(Script *script) { - _locParseCtxt.numZones = 0; - _locParseCtxt.bgName = 0; - _locParseCtxt.maskName = 0; - _locParseCtxt.pathName = 0; + ctxt.numZones = 0; + ctxt.bgName = 0; + ctxt.maskName = 0; + ctxt.pathName = 0; LocationParser_ns::parse(script); - _vm->_gfx->setBackground(kBackgroundLocation, _locParseCtxt.bgName, _locParseCtxt.maskName, _locParseCtxt.pathName); + _vm->_gfx->setBackground(kBackgroundLocation, ctxt.bgName, ctxt.maskName, ctxt.pathName); _vm->_pathBuffer = &_vm->_gfx->_backgroundInfo.path; - free(_locParseCtxt.bgName); - free(_locParseCtxt.maskName); - free(_locParseCtxt.pathName); + free(ctxt.bgName); + free(ctxt.maskName); + free(ctxt.pathName); } diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index 492d605a38..ba8b2c87e0 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -189,21 +189,21 @@ const char *_instructionNamesRes_ns[] = { void LocationParser_ns::warning_unexpected() { - debugC(1, kDebugParser, "unexpected keyword '%s' in line %i", _tokens[0], _locParseCtxt.script->getLine()); + debugC(1, kDebugParser, "unexpected keyword '%s' in line %i", _tokens[0], script->getLine()); } DECLARE_ANIM_PARSER(script) { debugC(7, kDebugParser, "ANIM_PARSER(script) "); - _locParseCtxt.a->_scriptName = strdup(_tokens[1]); + ctxt.a->_scriptName = strdup(_tokens[1]); } DECLARE_ANIM_PARSER(commands) { debugC(7, kDebugParser, "ANIM_PARSER(commands) "); - parseCommands(*_locParseCtxt.script, _locParseCtxt.a->_commands); + parseCommands(ctxt.a->_commands); } @@ -211,20 +211,20 @@ DECLARE_ANIM_PARSER(type) { debugC(7, kDebugParser, "ANIM_PARSER(type) "); if (_tokens[2][0] != '\0') { - _locParseCtxt.a->_type = ((4 + _vm->_objectsNames->lookup(_tokens[2])) << 16) & 0xFFFF0000; + ctxt.a->_type = ((4 + _vm->_objectsNames->lookup(_tokens[2])) << 16) & 0xFFFF0000; } int16 _si = _zoneTypeNames->lookup(_tokens[1]); if (_si != Table::notFound) { - _locParseCtxt.a->_type |= 1 << (_si-1); - if (((_locParseCtxt.a->_type & 0xFFFF) != kZoneNone) && ((_locParseCtxt.a->_type & 0xFFFF) != kZoneCommand)) { - parseZoneTypeBlock(*_locParseCtxt.script, _locParseCtxt.a); + ctxt.a->_type |= 1 << (_si-1); + if (((ctxt.a->_type & 0xFFFF) != kZoneNone) && ((ctxt.a->_type & 0xFFFF) != kZoneCommand)) { + parseZoneTypeBlock(ctxt.a); } } - _locParseCtxt.a->_oldPos.x = -1000; - _locParseCtxt.a->_oldPos.y = -1000; + ctxt.a->_oldPos.x = -1000; + ctxt.a->_oldPos.y = -1000; - _locParseCtxt.a->_flags |= 0x1000000; + ctxt.a->_flags |= 0x1000000; parser->popTables(); } @@ -233,7 +233,7 @@ DECLARE_ANIM_PARSER(type) { DECLARE_ANIM_PARSER(label) { debugC(7, kDebugParser, "ANIM_PARSER(label) "); - _locParseCtxt.a->_label = _vm->_gfx->renderFloatingLabel(_vm->_labelFont, _tokens[1]); + ctxt.a->_label = _vm->_gfx->renderFloatingLabel(_vm->_labelFont, _tokens[1]); } @@ -245,7 +245,7 @@ DECLARE_ANIM_PARSER(flags) { do { byte _al = _zoneFlagNames->lookup(_tokens[_si]); _si++; - _locParseCtxt.a->_flags |= 1 << (_al - 1); + ctxt.a->_flags |= 1 << (_al - 1); } while (!scumm_stricmp(_tokens[_si++], "|")); } @@ -260,24 +260,24 @@ DECLARE_ANIM_PARSER(file) { strcat(vC8, "tras"); } } - _locParseCtxt.a->gfxobj = _vm->_gfx->loadAnim(vC8); + ctxt.a->gfxobj = _vm->_gfx->loadAnim(vC8); } DECLARE_ANIM_PARSER(position) { debugC(7, kDebugParser, "ANIM_PARSER(position) "); - _locParseCtxt.a->_left = atoi(_tokens[1]); - _locParseCtxt.a->_top = atoi(_tokens[2]); - _locParseCtxt.a->_z = atoi(_tokens[3]); + ctxt.a->_left = atoi(_tokens[1]); + ctxt.a->_top = atoi(_tokens[2]); + ctxt.a->_z = atoi(_tokens[3]); } DECLARE_ANIM_PARSER(moveto) { debugC(7, kDebugParser, "ANIM_PARSER(moveto) "); - _locParseCtxt.a->_moveTo.x = atoi(_tokens[1]); - _locParseCtxt.a->_moveTo.y = atoi(_tokens[2]); + ctxt.a->_moveTo.x = atoi(_tokens[1]); + ctxt.a->_moveTo.y = atoi(_tokens[2]); } @@ -285,15 +285,15 @@ DECLARE_ANIM_PARSER(endanimation) { debugC(7, kDebugParser, "ANIM_PARSER(endanimation) "); - _locParseCtxt.a->_oldPos.x = -1000; - _locParseCtxt.a->_oldPos.y = -1000; + ctxt.a->_oldPos.x = -1000; + ctxt.a->_oldPos.y = -1000; - _locParseCtxt.a->_flags |= 0x1000000; + ctxt.a->_flags |= 0x1000000; parser->popTables(); } -void LocationParser_ns::parseAnimation(Script& script, AnimationList &list, char *name) { +void LocationParser_ns::parseAnimation(AnimationList &list, char *name) { debugC(5, kDebugParser, "parseAnimation(name: %s)", name); AnimationPtr a(new Animation); @@ -302,9 +302,7 @@ void LocationParser_ns::parseAnimation(Script& script, AnimationList &list, char list.push_front(AnimationPtr(a)); - _locParseCtxt.a = a; - _locParseCtxt.script = &script; - + ctxt.a = a; parser->pushTables(&_locationAnimParsers, _locationAnimStmt); } @@ -316,15 +314,15 @@ void ProgramParser_ns::parseInstruction() { if (_tokens[0][1] == '.') { _tokens[0][1] = '\0'; - _instParseCtxt.a = _vm->findAnimation(&_tokens[0][2]); + ctxt.a = _vm->findAnimation(&_tokens[0][2]); } else if (_tokens[1][1] == '.') { _tokens[1][1] = '\0'; - _instParseCtxt.a = _vm->findAnimation(&_tokens[1][2]); + ctxt.a = _vm->findAnimation(&_tokens[1][2]); } else - _instParseCtxt.a = program->_anim; + ctxt.a = program->_anim; - _instParseCtxt.inst = inst; + ctxt.inst = inst; parser->parseStatement(); @@ -338,21 +336,18 @@ void ProgramParser_ns::parse(Script *script, ProgramPtr program) { this->script = script; this->program = program; - _instParseCtxt.openIf = nullInstructionPtr; - _instParseCtxt.end = false; - _instParseCtxt.program = program; - _instParseCtxt.locals = program->_locals; + ctxt.openIf = nullInstructionPtr; + ctxt.end = false; + ctxt.locals = program->_locals; - parser->bind(script); + parser->reset(); parser->pushTables(&_instructionParsers, _instructionNames); do { parseInstruction(); - } while (!_instParseCtxt.end); + } while (!ctxt.end); parser->popTables(); - parser->unbind(); program->_ip = program->_instructions.begin(); - } void Parallaction_ns::loadProgram(AnimationPtr a, const char *filename) { @@ -376,70 +371,70 @@ void Parallaction_ns::loadProgram(AnimationPtr a, const char *filename) { DECLARE_INSTRUCTION_PARSER(animation) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(animation) "); - if (!scumm_stricmp(_tokens[1], _instParseCtxt.a->_name)) { - _instParseCtxt.inst->_a = _instParseCtxt.a; + if (!scumm_stricmp(_tokens[1], ctxt.a->_name)) { + ctxt.inst->_a = ctxt.a; } else { - _instParseCtxt.inst->_a = _vm->findAnimation(_tokens[1]); + ctxt.inst->_a = _vm->findAnimation(_tokens[1]); } - _instParseCtxt.inst->_index = parser->_lookup; + ctxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(loop) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(loop) "); - parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); - _instParseCtxt.inst->_index = parser->_lookup; + parseRValue(ctxt.inst->_opB, _tokens[1]); + ctxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(x) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(x) "); - parseLValue(_instParseCtxt.inst->_opA, "X"); - parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); - _instParseCtxt.inst->_index = parser->_lookup; + parseLValue(ctxt.inst->_opA, "X"); + parseRValue(ctxt.inst->_opB, _tokens[1]); + ctxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(y) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(y) "); - parseLValue(_instParseCtxt.inst->_opA, "Y"); - parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); - _instParseCtxt.inst->_index = parser->_lookup; + parseLValue(ctxt.inst->_opA, "Y"); + parseRValue(ctxt.inst->_opB, _tokens[1]); + ctxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(z) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(z) "); - parseLValue(_instParseCtxt.inst->_opA, "Z"); - parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); - _instParseCtxt.inst->_index = parser->_lookup; + parseLValue(ctxt.inst->_opA, "Z"); + parseRValue(ctxt.inst->_opB, _tokens[1]); + ctxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(f) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(f) "); - parseLValue(_instParseCtxt.inst->_opA, "F"); - parseRValue(_instParseCtxt.inst->_opB, _tokens[1]); - _instParseCtxt.inst->_index = parser->_lookup; + parseLValue(ctxt.inst->_opA, "F"); + parseRValue(ctxt.inst->_opB, _tokens[1]); + ctxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(inc) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(inc) "); - parseLValue(_instParseCtxt.inst->_opA, _tokens[1]); - parseRValue(_instParseCtxt.inst->_opB, _tokens[2]); + parseLValue(ctxt.inst->_opA, _tokens[1]); + parseRValue(ctxt.inst->_opB, _tokens[2]); if (!scumm_stricmp(_tokens[3], "mod")) { - _instParseCtxt.inst->_flags |= kInstMod; + ctxt.inst->_flags |= kInstMod; } - _instParseCtxt.inst->_index = parser->_lookup; + ctxt.inst->_index = parser->_lookup; } @@ -451,40 +446,40 @@ DECLARE_INSTRUCTION_PARSER(set) { // script was commented out on Dos version. This workaround enables the engine // to dynamically add a local variable when it is encountered the first time in // the script, so should fix any other occurrence as well. - if (_instParseCtxt.program->findLocal(_tokens[1]) == -1) { - _instParseCtxt.program->addLocal(_tokens[1]); + if (program->findLocal(_tokens[1]) == -1) { + program->addLocal(_tokens[1]); } - parseLValue(_instParseCtxt.inst->_opA, _tokens[1]); - parseRValue(_instParseCtxt.inst->_opB, _tokens[2]); - _instParseCtxt.inst->_index = parser->_lookup; + parseLValue(ctxt.inst->_opA, _tokens[1]); + parseRValue(ctxt.inst->_opB, _tokens[2]); + ctxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(move) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(move) "); - parseRValue(_instParseCtxt.inst->_opA, _tokens[1]); - parseRValue(_instParseCtxt.inst->_opB, _tokens[2]); - _instParseCtxt.inst->_index = parser->_lookup; + parseRValue(ctxt.inst->_opA, _tokens[1]); + parseRValue(ctxt.inst->_opB, _tokens[2]); + ctxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(put) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(put) "); - if (!scumm_stricmp(_tokens[1], _instParseCtxt.a->_name)) { - _instParseCtxt.inst->_a = _instParseCtxt.a; + if (!scumm_stricmp(_tokens[1], ctxt.a->_name)) { + ctxt.inst->_a = ctxt.a; } else { - _instParseCtxt.inst->_a = _vm->findAnimation(_tokens[1]); + ctxt.inst->_a = _vm->findAnimation(_tokens[1]); } - parseRValue(_instParseCtxt.inst->_opA, _tokens[2]); - parseRValue(_instParseCtxt.inst->_opB, _tokens[3]); + parseRValue(ctxt.inst->_opA, _tokens[2]); + parseRValue(ctxt.inst->_opB, _tokens[3]); if (!scumm_stricmp(_tokens[4], "masked")) { - _instParseCtxt.inst->_flags |= kInstMaskedPut; + ctxt.inst->_flags |= kInstMaskedPut; } - _instParseCtxt.inst->_index = parser->_lookup; + ctxt.inst->_index = parser->_lookup; } @@ -494,22 +489,22 @@ DECLARE_INSTRUCTION_PARSER(call) { int index = _vm->_callableNames->lookup(_tokens[1]); if (index == Table::notFound) error("unknown callable '%s'", _tokens[1]); - _instParseCtxt.inst->_immediate = index - 1; - _instParseCtxt.inst->_index = parser->_lookup; + ctxt.inst->_immediate = index - 1; + ctxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(sound) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(sound) "); - _instParseCtxt.inst->_z = _vm->findZone(_tokens[1]); - _instParseCtxt.inst->_index = parser->_lookup; + ctxt.inst->_z = _vm->findZone(_tokens[1]); + ctxt.inst->_index = parser->_lookup; } DECLARE_INSTRUCTION_PARSER(null) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(null) "); - _instParseCtxt.inst->_index = parser->_lookup; + ctxt.inst->_index = parser->_lookup; } @@ -520,22 +515,22 @@ DECLARE_INSTRUCTION_PARSER(defLocal) { int16 index; if (_tokens[3][0] != '\0') { - index = _instParseCtxt.program->addLocal(_tokens[0], val, atoi(_tokens[3]), atoi(_tokens[4])); + index = program->addLocal(_tokens[0], val, atoi(_tokens[3]), atoi(_tokens[4])); } else { - index = _instParseCtxt.program->addLocal(_tokens[0], val); + index = program->addLocal(_tokens[0], val); } - _instParseCtxt.inst->_opA.setLocal(&_instParseCtxt.locals[index]); - _instParseCtxt.inst->_opB.setImmediate(_instParseCtxt.locals[index]._value); + ctxt.inst->_opA.setLocal(&ctxt.locals[index]); + ctxt.inst->_opB.setImmediate(ctxt.locals[index]._value); - _instParseCtxt.inst->_index = INST_SET; + ctxt.inst->_index = INST_SET; } DECLARE_INSTRUCTION_PARSER(endscript) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(endscript) "); - _instParseCtxt.end = true; - _instParseCtxt.inst->_index = parser->_lookup; + ctxt.end = true; + ctxt.inst->_index = parser->_lookup; } @@ -547,9 +542,9 @@ void ProgramParser_ns::parseRValue(ScriptVar &v, const char *str) { return; } - int index = _instParseCtxt.program->findLocal(str); + int index = program->findLocal(str); if (index != -1) { - v.setLocal(&_instParseCtxt.locals[index]); + v.setLocal(&ctxt.locals[index]); return; } @@ -557,7 +552,7 @@ void ProgramParser_ns::parseRValue(ScriptVar &v, const char *str) { if (str[1] == '.') { a = _vm->findAnimation(&str[2]); } else { - a = _instParseCtxt.a; + a = ctxt.a; } if (str[0] == 'X') { @@ -577,9 +572,9 @@ void ProgramParser_ns::parseRValue(ScriptVar &v, const char *str) { void ProgramParser_ns::parseLValue(ScriptVar &v, const char *str) { - int index = _instParseCtxt.program->findLocal(str); + int index = program->findLocal(str); if (index != -1) { - v.setLocal(&_instParseCtxt.locals[index]); + v.setLocal(&ctxt.locals[index]); return; } @@ -587,7 +582,7 @@ void ProgramParser_ns::parseLValue(ScriptVar &v, const char *str) { if (str[1] == '.') { a = _vm->findAnimation(&str[2]); } else { - a = _instParseCtxt.a; + a = ctxt.a; } if (str[0] == 'X') { @@ -613,19 +608,19 @@ DECLARE_COMMAND_PARSER(flags) { if (_vm->_globalTable->lookup(_tokens[1]) == Table::notFound) { do { - char _al = _vm->_localFlagNames->lookup(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; - _locParseCtxt.cmd->u._flags |= 1 << (_al - 1); - } while (!scumm_stricmp(_tokens[_locParseCtxt.nextToken++], "|")); - _locParseCtxt.nextToken--; + char _al = _vm->_localFlagNames->lookup(_tokens[ctxt.nextToken]); + ctxt.nextToken++; + ctxt.cmd->u._flags |= 1 << (_al - 1); + } while (!scumm_stricmp(_tokens[ctxt.nextToken++], "|")); + ctxt.nextToken--; } else { - _locParseCtxt.cmd->u._flags |= kFlagsGlobal; + ctxt.cmd->u._flags |= kFlagsGlobal; do { char _al = _vm->_globalTable->lookup(_tokens[1]); - _locParseCtxt.nextToken++; - _locParseCtxt.cmd->u._flags |= 1 << (_al - 1); - } while (!scumm_stricmp(_tokens[_locParseCtxt.nextToken++], "|")); - _locParseCtxt.nextToken--; + ctxt.nextToken++; + ctxt.cmd->u._flags |= 1 << (_al - 1); + } while (!scumm_stricmp(_tokens[ctxt.nextToken++], "|")); + ctxt.nextToken--; } parseCommandFlags(); @@ -638,11 +633,11 @@ DECLARE_COMMAND_PARSER(zone) { createCommand(parser->_lookup); - _locParseCtxt.cmd->u._zone = _vm->findZone(_tokens[_locParseCtxt.nextToken]); - if (!_locParseCtxt.cmd->u._zone) { - saveCommandForward(_tokens[_locParseCtxt.nextToken], _locParseCtxt.cmd); + ctxt.cmd->u._zone = _vm->findZone(_tokens[ctxt.nextToken]); + if (!ctxt.cmd->u._zone) { + saveCommandForward(_tokens[ctxt.nextToken], ctxt.cmd); } - _locParseCtxt.nextToken++; + ctxt.nextToken++; parseCommandFlags(); addCommand(); @@ -654,8 +649,8 @@ DECLARE_COMMAND_PARSER(location) { createCommand(parser->_lookup); - _locParseCtxt.cmd->u._string = strdup(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._string = strdup(_tokens[ctxt.nextToken]); + ctxt.nextToken++; parseCommandFlags(); addCommand(); @@ -667,8 +662,8 @@ DECLARE_COMMAND_PARSER(drop) { createCommand(parser->_lookup); - _locParseCtxt.cmd->u._object = 4 + _vm->_objectsNames->lookup(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._object = 4 + _vm->_objectsNames->lookup(_tokens[ctxt.nextToken]); + ctxt.nextToken++; parseCommandFlags(); addCommand(); @@ -680,8 +675,8 @@ DECLARE_COMMAND_PARSER(call) { createCommand(parser->_lookup); - _locParseCtxt.cmd->u._callable = _vm->_callableNames->lookup(_tokens[_locParseCtxt.nextToken]) - 1; - _locParseCtxt.nextToken++; + ctxt.cmd->u._callable = _vm->_callableNames->lookup(_tokens[ctxt.nextToken]) - 1; + ctxt.nextToken++; parseCommandFlags(); addCommand(); @@ -701,10 +696,10 @@ DECLARE_COMMAND_PARSER(move) { createCommand(parser->_lookup); - _locParseCtxt.cmd->u._move.x = atoi(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; - _locParseCtxt.cmd->u._move.y = atoi(_tokens[_locParseCtxt.nextToken]); - _locParseCtxt.nextToken++; + ctxt.cmd->u._move.x = atoi(_tokens[ctxt.nextToken]); + ctxt.nextToken++; + ctxt.cmd->u._move.y = atoi(_tokens[ctxt.nextToken]); + ctxt.nextToken++; parseCommandFlags(); addCommand(); @@ -716,13 +711,13 @@ DECLARE_COMMAND_PARSER(endcommands) { parser->popTables(); // temporary trick to handle dialogue commands - _locParseCtxt.endcommands = true; + ctxt.endcommands = true; } void LocationParser_ns::parseCommandFlags() { - int _si = _locParseCtxt.nextToken; - CommandPtr cmd = _locParseCtxt.cmd; + int _si = ctxt.nextToken; + CommandPtr cmd = ctxt.cmd; if (!scumm_stricmp(_tokens[_si], "flags")) { _si++; @@ -777,19 +772,19 @@ void LocationParser_ns::parseCommandFlags() { } - _si = _locParseCtxt.nextToken; + _si = ctxt.nextToken; } void LocationParser_ns::addCommand() { - _locParseCtxt.list->push_front(_locParseCtxt.cmd); // NOTE: command lists are written backwards in scripts + ctxt.list->push_front(ctxt.cmd); // NOTE: command lists are written backwards in scripts } void LocationParser_ns::createCommand(uint id) { - _locParseCtxt.nextToken = 1; - _locParseCtxt.cmd = CommandPtr(new Command); - _locParseCtxt.cmd->_id = id; + ctxt.nextToken = 1; + ctxt.cmd = CommandPtr(new Command); + ctxt.cmd->_id = id; } @@ -812,17 +807,16 @@ void LocationParser_ns::resolveCommandForwards() { _numForwardedCommands = 0; } -void LocationParser_ns::parseCommands(Script &script, CommandList& list) { +void LocationParser_ns::parseCommands(CommandList& list) { debugC(5, kDebugParser, "parseCommands()"); - _locParseCtxt.list = &list; - _locParseCtxt.endcommands = false; - _locParseCtxt.script = &script; + ctxt.list = &list; + ctxt.endcommands = false; parser->pushTables(&_commandParsers, _commandsNames); } -Dialogue *LocationParser_ns::parseDialogue(Script &script) { +Dialogue *LocationParser_ns::parseDialogue() { debugC(7, kDebugParser, "parseDialogue()"); uint16 numQuestions = 0; @@ -832,16 +826,16 @@ Dialogue *LocationParser_ns::parseDialogue(Script &script) { Table forwards(20); - script.readLineToken(true); + script->readLineToken(true); while (scumm_stricmp(_tokens[0], "enddialogue")) { if (scumm_stricmp(_tokens[0], "Question")) continue; forwards.addData(_tokens[1]); - dialogue->_questions[numQuestions++] = parseQuestion(script); + dialogue->_questions[numQuestions++] = parseQuestion(); - script.readLineToken(true); + script->readLineToken(true); } resolveDialogueForwards(dialogue, numQuestions, forwards); @@ -851,28 +845,28 @@ Dialogue *LocationParser_ns::parseDialogue(Script &script) { return dialogue; } -Question *LocationParser_ns::parseQuestion(Script &script) { +Question *LocationParser_ns::parseQuestion() { Question *question = new Question; assert(question); - question->_text = parseDialogueString(script); + question->_text = parseDialogueString(); - script.readLineToken(true); + script->readLineToken(true); question->_mood = atoi(_tokens[0]); uint16 numAnswers = 0; - script.readLineToken(true); + script->readLineToken(true); while (scumm_stricmp(_tokens[0], "endquestion")) { // parse answers - question->_answers[numAnswers] = parseAnswer(script); + question->_answers[numAnswers] = parseAnswer(); numAnswers++; } return question; } -Answer *LocationParser_ns::parseAnswer(Script &script) { +Answer *LocationParser_ns::parseAnswer() { Answer *answer = new Answer; assert(answer); @@ -907,23 +901,23 @@ Answer *LocationParser_ns::parseAnswer(Script &script) { } - answer->_text = parseDialogueString(script); + answer->_text = parseDialogueString(); - script.readLineToken(true); + script->readLineToken(true); answer->_mood = atoi(_tokens[0]); - answer->_following._name = parseDialogueString(script); + answer->_following._name = parseDialogueString(); - script.readLineToken(true); + script->readLineToken(true); if (!scumm_stricmp(_tokens[0], "commands")) { - parseCommands(script, answer->_commands); - _locParseCtxt.endcommands = false; + parseCommands(answer->_commands); + ctxt.endcommands = false; do { - script.readLineToken(true); + script->readLineToken(true); parser->parseStatement(); - } while (!_locParseCtxt.endcommands); + } while (!ctxt.endcommands); - script.readLineToken(true); + script->readLineToken(true); } return answer; @@ -952,13 +946,13 @@ void LocationParser_ns::resolveDialogueForwards(Dialogue *dialogue, uint numQues } -char *LocationParser_ns::parseDialogueString(Script &script) { +char *LocationParser_ns::parseDialogueString() { char vC8[200]; char *vD0 = NULL; do { - vD0 = script.readLine(vC8, 200); + vD0 = script->readLine(vC8, 200); if (vD0 == 0) return NULL; vD0 = Common::ltrim(vD0); @@ -974,7 +968,7 @@ char *LocationParser_ns::parseDialogueString(Script &script) { DECLARE_LOCATION_PARSER(endlocation) { debugC(7, kDebugParser, "LOCATION_PARSER(endlocation) "); - _locParseCtxt.end = true; + ctxt.end = true; } @@ -1016,21 +1010,21 @@ DECLARE_LOCATION_PARSER(disk) { DECLARE_LOCATION_PARSER(nodes) { debugC(7, kDebugParser, "LOCATION_PARSER(nodes) "); - parseWalkNodes(*_locParseCtxt.script, _vm->_location._walkNodes); + parseWalkNodes(_vm->_location._walkNodes); } DECLARE_LOCATION_PARSER(zone) { debugC(7, kDebugParser, "LOCATION_PARSER(zone) "); - parseZone(*_locParseCtxt.script, _vm->_location._zones, _tokens[1]); + parseZone(_vm->_location._zones, _tokens[1]); } DECLARE_LOCATION_PARSER(animation) { debugC(7, kDebugParser, "LOCATION_PARSER(animation) "); - parseAnimation(*_locParseCtxt.script, _vm->_location._animations, _tokens[1]); + parseAnimation(_vm->_location._animations, _tokens[1]); } @@ -1048,14 +1042,14 @@ DECLARE_LOCATION_PARSER(localflags) { DECLARE_LOCATION_PARSER(commands) { debugC(7, kDebugParser, "LOCATION_PARSER(commands) "); - parseCommands(*_locParseCtxt.script, _vm->_location._commands); + parseCommands(_vm->_location._commands); } DECLARE_LOCATION_PARSER(acommands) { debugC(7, kDebugParser, "LOCATION_PARSER(acommands) "); - parseCommands(*_locParseCtxt.script, _vm->_location._aCommands); + parseCommands(_vm->_location._aCommands); } @@ -1082,14 +1076,14 @@ DECLARE_LOCATION_PARSER(flags) { DECLARE_LOCATION_PARSER(comment) { debugC(7, kDebugParser, "LOCATION_PARSER(comment) "); - _vm->_location._comment = parseComment(*_locParseCtxt.script); + _vm->_location._comment = parseComment(); } DECLARE_LOCATION_PARSER(endcomment) { debugC(7, kDebugParser, "LOCATION_PARSER(endcomment) "); - _vm->_location._endComment = parseComment(*_locParseCtxt.script); + _vm->_location._endComment = parseComment(); } @@ -1114,26 +1108,25 @@ void LocationParser_ns::parse(Script *script) { _numForwardedCommands = 0; - _locParseCtxt.end = false; - _locParseCtxt.script = script; - _locParseCtxt.filename = 0;//filename; + ctxt.end = false; + this->script = script; + ctxt.filename = 0;//filename; - parser->bind(script); + parser->reset(); parser->pushTables(&_locationParsers, _locationStmt); do { script->readLineToken(true); parser->parseStatement(); - } while (!_locParseCtxt.end); + } while (!ctxt.end); parser->popTables(); - parser->unbind(); resolveCommandForwards(); } -void LocationParser_ns::parseWalkNodes(Script& script, WalkNodeList &list) { +void LocationParser_ns::parseWalkNodes(WalkNodeList &list) { debugC(5, kDebugParser, "parseWalkNodes()"); - script.readLineToken(true); + script->readLineToken(true); while (scumm_stricmp(_tokens[0], "ENDNODES")) { if (!scumm_stricmp(_tokens[0], "COORD")) { @@ -1146,7 +1139,7 @@ void LocationParser_ns::parseWalkNodes(Script& script, WalkNodeList &list) { list.push_front(v4); } - script.readLineToken(true); + script->readLineToken(true); } debugC(5, kDebugParser, "parseWalkNodes() done"); @@ -1296,14 +1289,14 @@ void ProgramParser_ns::init() { // a comment can appear both at location and Zone levels // comments are displayed into rectangles on the screen // -char *LocationParser_ns::parseComment(Script &script) { +char *LocationParser_ns::parseComment() { char _tmp_comment[1000] = "\0"; char *v194; do { char v190[400]; - v194 = script.readLine(v190, 400); + v194 = script->readLine(v190, 400); v194[strlen(v194)-1] = '\0'; if (!scumm_stricmp(v194, "endtext")) @@ -1333,18 +1326,18 @@ DECLARE_ZONE_PARSER(endzone) { DECLARE_ZONE_PARSER(limits) { debugC(7, kDebugParser, "ZONE_PARSER(limits) "); - _locParseCtxt.z->_left = atoi(_tokens[1]); - _locParseCtxt.z->_top = atoi(_tokens[2]); - _locParseCtxt.z->_right = atoi(_tokens[3]); - _locParseCtxt.z->_bottom = atoi(_tokens[4]); + ctxt.z->_left = atoi(_tokens[1]); + ctxt.z->_top = atoi(_tokens[2]); + ctxt.z->_right = atoi(_tokens[3]); + ctxt.z->_bottom = atoi(_tokens[4]); } DECLARE_ZONE_PARSER(moveto) { debugC(7, kDebugParser, "ZONE_PARSER(moveto) "); - _locParseCtxt.z->_moveTo.x = atoi(_tokens[1]); - _locParseCtxt.z->_moveTo.y = atoi(_tokens[2]); + ctxt.z->_moveTo.x = atoi(_tokens[1]); + ctxt.z->_moveTo.y = atoi(_tokens[2]); } @@ -1352,12 +1345,12 @@ DECLARE_ZONE_PARSER(type) { debugC(7, kDebugParser, "ZONE_PARSER(type) "); if (_tokens[2][0] != '\0') { - _locParseCtxt.z->_type = (4 + _vm->_objectsNames->lookup(_tokens[2])) << 16; + ctxt.z->_type = (4 + _vm->_objectsNames->lookup(_tokens[2])) << 16; } int16 _si = _zoneTypeNames->lookup(_tokens[1]); if (_si != Table::notFound) { - _locParseCtxt.z->_type |= 1 << (_si - 1); - parseZoneTypeBlock(*_locParseCtxt.script, _locParseCtxt.z); + ctxt.z->_type |= 1 << (_si - 1); + parseZoneTypeBlock(ctxt.z); } parser->popTables(); @@ -1367,7 +1360,7 @@ DECLARE_ZONE_PARSER(type) { DECLARE_ZONE_PARSER(commands) { debugC(7, kDebugParser, "ZONE_PARSER(commands) "); - parseCommands(*_locParseCtxt.script, _locParseCtxt.z->_commands); + parseCommands(ctxt.z->_commands); } @@ -1375,7 +1368,7 @@ DECLARE_ZONE_PARSER(label) { debugC(7, kDebugParser, "ZONE_PARSER(label) "); // printf("label: %s", _tokens[1]); - _locParseCtxt.z->_label = _vm->_gfx->renderFloatingLabel(_vm->_labelFont, _tokens[1]); + ctxt.z->_label = _vm->_gfx->renderFloatingLabel(_vm->_labelFont, _tokens[1]); } @@ -1387,15 +1380,15 @@ DECLARE_ZONE_PARSER(flags) { do { char _al = _zoneFlagNames->lookup(_tokens[_si]); _si++; - _locParseCtxt.z->_flags |= 1 << (_al - 1); + ctxt.z->_flags |= 1 << (_al - 1); } while (!scumm_stricmp(_tokens[_si++], "|")); } -void LocationParser_ns::parseZone(Script &script, ZoneList &list, char *name) { +void LocationParser_ns::parseZone(ZoneList &list, char *name) { debugC(5, kDebugParser, "parseZone(name: %s)", name); if (_vm->findZone(name)) { - script.skip("endzone"); + script->skip("endzone"); return; } @@ -1403,8 +1396,7 @@ void LocationParser_ns::parseZone(Script &script, ZoneList &list, char *name) { strncpy(z->_name, name, ZONENAME_LENGTH); - _locParseCtxt.z = z; - _locParseCtxt.script = &script; + ctxt.z = z; list.push_front(z); @@ -1416,7 +1408,7 @@ void LocationParser_ns::parseZone(Script &script, ZoneList &list, char *name) { -void LocationParser_ns::parseGetData(Script &script, ZonePtr z) { +void LocationParser_ns::parseGetData(ZonePtr z) { GetData *data = new GetData; @@ -1439,7 +1431,7 @@ void LocationParser_ns::parseGetData(Script &script, ZonePtr z) { data->_icon = 4 + _vm->_objectsNames->lookup(_tokens[1]); } - script.readLineToken(true); + script->readLineToken(true); } while (scumm_stricmp(_tokens[0], "endzone")); z->u.get = data; @@ -1447,7 +1439,7 @@ void LocationParser_ns::parseGetData(Script &script, ZonePtr z) { } -void LocationParser_ns::parseExamineData(Script &script, ZonePtr z) { +void LocationParser_ns::parseExamineData(ZonePtr z) { ExamineData *data = new ExamineData; @@ -1457,10 +1449,10 @@ void LocationParser_ns::parseExamineData(Script &script, ZonePtr z) { data->_filename = strdup(_tokens[1]); } if (!scumm_stricmp(_tokens[0], "desc")) { - data->_description = parseComment(script); + data->_description = parseComment(); } - script.readLineToken(true); + script->readLineToken(true); } while (scumm_stricmp(_tokens[0], "endzone")); z->u.examine = data; @@ -1468,7 +1460,7 @@ void LocationParser_ns::parseExamineData(Script &script, ZonePtr z) { } -void LocationParser_ns::parseDoorData(Script &script, ZonePtr z) { +void LocationParser_ns::parseDoorData(ZonePtr z) { DoorData *data = new DoorData; @@ -1504,7 +1496,7 @@ void LocationParser_ns::parseDoorData(Script &script, ZonePtr z) { data->_startFrame = atoi(_tokens[3]); } - script.readLineToken(true); + script->readLineToken(true); } while (scumm_stricmp(_tokens[0], "endzone")); z->u.door = data; @@ -1512,7 +1504,7 @@ void LocationParser_ns::parseDoorData(Script &script, ZonePtr z) { } -void LocationParser_ns::parseMergeData(Script &script, ZonePtr z) { +void LocationParser_ns::parseMergeData(ZonePtr z) { MergeData *data = new MergeData; @@ -1528,14 +1520,14 @@ void LocationParser_ns::parseMergeData(Script &script, ZonePtr z) { data->_obj3 = 4 + _vm->_objectsNames->lookup(_tokens[1]); } - script.readLineToken(true); + script->readLineToken(true); } while (scumm_stricmp(_tokens[0], "endzone")); z->u.merge = data; } -void LocationParser_ns::parseHearData(Script &script, ZonePtr z) { +void LocationParser_ns::parseHearData(ZonePtr z) { HearData *data = new HearData; @@ -1549,14 +1541,14 @@ void LocationParser_ns::parseHearData(Script &script, ZonePtr z) { data->_freq = atoi(_tokens[1]); } - script.readLineToken(true); + script->readLineToken(true); } while (scumm_stricmp(_tokens[0], "endzone")); z->u.hear = data; } -void LocationParser_ns::parseSpeakData(Script &script, ZonePtr z) { +void LocationParser_ns::parseSpeakData(ZonePtr z) { SpeakData *data = new SpeakData; @@ -1566,10 +1558,10 @@ void LocationParser_ns::parseSpeakData(Script &script, ZonePtr z) { strcpy(data->_name, _tokens[1]); } if (!scumm_stricmp(_tokens[0], "Dialogue")) { - data->_dialogue = parseDialogue(script); + data->_dialogue = parseDialogue(); } - script.readLineToken(true); + script->readLineToken(true); } while (scumm_stricmp(_tokens[0], "endzone")); z->u.speak = data; @@ -1577,37 +1569,37 @@ void LocationParser_ns::parseSpeakData(Script &script, ZonePtr z) { } -void LocationParser_ns::parseZoneTypeBlock(Script &script, ZonePtr z) { +void LocationParser_ns::parseZoneTypeBlock(ZonePtr z) { debugC(7, kDebugParser, "parseZoneTypeBlock(name: %s, type: %x)", z->_name, z->_type); switch (z->_type & 0xFFFF) { case kZoneExamine: // examine Zone alloc - parseExamineData(script, z); + parseExamineData(z); break; case kZoneDoor: // door Zone alloc - parseDoorData(script, z); + parseDoorData(z); break; case kZoneGet: // get Zone alloc - parseGetData(script, z); + parseGetData(z); break; case kZoneMerge: // merge Zone alloc - parseMergeData(script, z); + parseMergeData(z); break; case kZoneHear: // hear Zone alloc - parseHearData(script, z); + parseHearData(z); break; case kZoneSpeak: // speak Zone alloc - parseSpeakData(script, z); + parseSpeakData(z); break; default: // eats up 'ENDZONE' line for unprocessed zone types - script.readLineToken(true); + script->readLineToken(true); break; } -- cgit v1.2.3 From 81b75d9238c558234004cf7ef2da687d022e4433 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 11 May 2008 09:20:19 +0000 Subject: Add more verbs. They're not translated in the original, so it would be best if someone would do it. svn-id: r32000 --- engines/drascula/texts.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/engines/drascula/texts.cpp b/engines/drascula/texts.cpp index a0ff44fa72..91a2eecc4e 100644 --- a/engines/drascula/texts.cpp +++ b/engines/drascula/texts.cpp @@ -5223,28 +5223,28 @@ const char *_textverbs[][6] = { "mover", }, { - "", - "", - "", - "", - "", - "" + "look", // TODO Translate it + "take", + "open", + "close", + "talk", + "push", }, { - "", - "", - "", - "", - "", - "" + "look", // TODO Translate it + "take", + "open", + "close", + "talk", + "push", }, { - "", - "", - "", - "", - "", - "" + "look", // TODO Translate it + "take", + "open", + "close", + "talk", + "push", }, }; -- cgit v1.2.3 From 7926d4dc8a84715ebf5d34a0b0a63570522aab28 Mon Sep 17 00:00:00 2001 From: PaweÅ‚ KoÅ‚odziejski Date: Sun, 11 May 2008 09:44:01 +0000 Subject: remove dead code svn-id: r32001 --- engines/drascula/animation.cpp | 3 -- engines/drascula/drascula.cpp | 13 -------- engines/drascula/drascula.h | 1 - engines/drascula/talk.cpp | 74 ------------------------------------------ 4 files changed, 91 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 8ae6a18b3a..e7205fe984 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -401,8 +401,6 @@ void DrasculaEngine::talk_dr_grande(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(ROJO); if (hay_sb == 1) { @@ -439,7 +437,6 @@ bucless: if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index e0e1447937..9353d8fe4e 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -502,7 +502,6 @@ bool DrasculaEngine::escoba() { if (num_ejec == 1) { agarra_objeto(28); - buffer_teclado(); if (hay_que_load == 0) animation_1_1(); @@ -524,7 +523,6 @@ bool DrasculaEngine::escoba() { } } else if (num_ejec == 2) { suma_objeto(28); - buffer_teclado(); sentido_hare = 3; obj_saliendo = 162; if (hay_que_load == 0) @@ -543,7 +541,6 @@ bool DrasculaEngine::escoba() { suma_objeto(20); suma_objeto(19); flags[1] = 1; - buffer_teclado(); sentido_hare = 1; obj_saliendo = 99; if (hay_que_load == 0) @@ -558,7 +555,6 @@ bool DrasculaEngine::escoba() { suma_objeto(9); suma_objeto(20); suma_objeto(22); - buffer_teclado(); obj_saliendo = 100; if (hay_que_load == 0) { carga_escoba("21.ald"); @@ -580,7 +576,6 @@ bool DrasculaEngine::escoba() { suma_objeto(15); suma_objeto(17); suma_objeto(20); - buffer_teclado(); sentido_hare = 1; obj_saliendo = 100; if (hay_que_load == 0) { @@ -594,7 +589,6 @@ bool DrasculaEngine::escoba() { suma_objeto(28); suma_objeto(9); - buffer_teclado(); sentido_hare = 1; obj_saliendo = 104; if (hay_que_load == 0) { @@ -890,8 +884,6 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { strcpy(para_codificar, nom_fich); strcpy(datos_actuales, nom_fich); - buffer_teclado(); - ald = new Common::File; ald->open(nom_fich); if (!ald->isOpen()) { @@ -1608,7 +1600,6 @@ bool DrasculaEngine::saves() { clearRoom(); loadPic(num_room); decompressPic(dir_dibujo1, MEDIA); - buffer_teclado(); hay_seleccion = 0; return true; @@ -3205,7 +3196,6 @@ void DrasculaEngine::introduce_nombre() { char select2[23]; strcpy(select2, " "); for (;;) { - buffer_teclado(); select2[v] = '-'; copyBackground(115, 14, 115, 14, 176, 9, dir_dibujo1, dir_zona_pantalla); print_abc(select2, 117, 15); @@ -4522,8 +4512,6 @@ void DrasculaEngine::grr() { int longitud; longitud = 30; - buffer_teclado(); - color_abc(VERDE_OSCURO); if (hay_sb == 1) { @@ -4549,7 +4537,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index e1043561d3..2d9adf8cf3 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -483,7 +483,6 @@ public: void hipo_sin_nadie(int contador); void abre_puerta(int nflag, int n_puerta); void mapa(); - void buffer_teclado() { } void animation_1_1(); void animation_2_1(); void animation_1_2(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 3dea8c21a1..3ba57652ce 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -41,8 +41,6 @@ void DrasculaEngine::talk_igor_dch(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(BLANCO); if (hay_sb == 1) { @@ -84,7 +82,6 @@ bucless: term_int = 1; if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -116,8 +113,6 @@ void DrasculaEngine::talk_dr_izq(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(ROJO); if (hay_sb == 1) { @@ -164,7 +159,6 @@ bucless: term_int = 1; if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -197,8 +191,6 @@ void DrasculaEngine::talk_dr_dch(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(ROJO); if (hay_sb == 1) { @@ -244,7 +236,6 @@ bucless: term_int = 1; if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -314,7 +305,6 @@ bucless: term_int = 1; if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -346,8 +336,6 @@ void DrasculaEngine::talk_igor_frente(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(BLANCO); if (hay_sb == 1) { @@ -391,7 +379,6 @@ bucless: term_int = 1; if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -430,8 +417,6 @@ void DrasculaEngine::talk_tabernero(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(MARRON); if (hay_sb == 1) { @@ -475,7 +460,6 @@ bucless: byte key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -505,8 +489,6 @@ void DrasculaEngine::talk_bj(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(BLANCO); if (hay_sb == 1) { @@ -556,7 +538,6 @@ bucless: term_int = 1; if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -609,9 +590,6 @@ void DrasculaEngine::talk(const char *dicho, const char *filename) { suma_1_pixel = 0; } - if (num_ejec == 2) - buffer_teclado(); - if (num_ejec == 4) { if (strcmp(num_room, "24.alg") || flags[29] == 0) { color_abc(AMARILLO); @@ -707,7 +685,6 @@ bucless: term_int = 1; if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -741,8 +718,6 @@ void DrasculaEngine::talk_pianista(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(BLANCO); if (hay_sb == 1) { @@ -779,7 +754,6 @@ bucless: byte key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -824,8 +798,6 @@ bebiendo: goto bebiendo; } - buffer_teclado(); - color_abc(VERDE_OSCURO); if (hay_sb == 1) { @@ -861,7 +833,6 @@ bucless: byte key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -906,8 +877,6 @@ void DrasculaEngine::talk_vb(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(VON_BRAUN); if (hay_sb == 1) { @@ -947,7 +916,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -977,8 +945,6 @@ void DrasculaEngine::talk_vbpuerta(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(VON_BRAUN); if (hay_sb == 1) { @@ -1002,7 +968,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1030,8 +995,6 @@ void DrasculaEngine::talk_ciego(const char *dicho, const char *filename, const c int longitud; longitud = strlen(dicho); - buffer_teclado(); - color_abc(VON_BRAUN); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); @@ -1109,7 +1072,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1134,8 +1096,6 @@ void DrasculaEngine::talk_hacker(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1224,7 +1184,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1255,8 +1214,6 @@ void DrasculaEngine::talk_mus(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(BLANCO); if (hay_sb == 1) { @@ -1292,7 +1249,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1329,8 +1285,6 @@ void DrasculaEngine::talk_pen(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(AMARILLO); if (hay_sb == 1) { @@ -1366,7 +1320,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1401,8 +1354,6 @@ void DrasculaEngine::talk_pen2(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(AMARILLO); if (hay_sb == 1) { @@ -1438,7 +1389,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1471,8 +1421,6 @@ void DrasculaEngine::talk_taber2(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(MARRON); if (hay_sb == 1) { @@ -1508,7 +1456,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1539,8 +1486,6 @@ void DrasculaEngine::talk_bj_cama(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(BLANCO); if (hay_sb == 1) { @@ -1577,7 +1522,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1608,8 +1552,6 @@ void DrasculaEngine::talk_htel(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(AMARILLO); if (hay_sb == 1) { @@ -1648,7 +1590,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1675,8 +1616,6 @@ void DrasculaEngine::talk_sinc(const char *dicho, const char *filename, const ch int longitud; longitud = strlen(dicho); - buffer_teclado(); - color_abc(AMARILLO); if (num_ejec == 1) { @@ -1775,7 +1714,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1806,8 +1744,6 @@ void DrasculaEngine::talk_baul(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - cara_antes = flags[19]; color_abc(MARRON); @@ -1843,7 +1779,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1872,8 +1807,6 @@ void DrasculaEngine::talk_igorpuerta(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(BLANCO); if (hay_sb == 1){ @@ -1897,7 +1830,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1928,8 +1860,6 @@ void DrasculaEngine::talk_igor_sentado(const char *dicho, const char *filename) tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(BLANCO); if (hay_sb == 1) { @@ -1965,7 +1895,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1) { if (LookForFree() != 0) goto bucless; @@ -1996,8 +1925,6 @@ void DrasculaEngine::talk_igor_peluca(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - buffer_teclado(); - color_abc(BLANCO); if (hay_sb == 1){ @@ -2033,7 +1960,6 @@ bucless: int key = getscan(); if (key != 0) ctvd_stop(); - buffer_teclado(); if (hay_sb == 1){ if (LookForFree() != 0) goto bucless; -- cgit v1.2.3 From 0e80f6ed7be1acc750f2ddd3ab79d79b62464447 Mon Sep 17 00:00:00 2001 From: PaweÅ‚ KoÅ‚odziejski Date: Sun, 11 May 2008 09:46:50 +0000 Subject: asigna_memoria -> allocMemory svn-id: r32002 --- engines/drascula/drascula.cpp | 4 ++-- engines/drascula/drascula.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 9353d8fe4e..a81b865c3a 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -160,7 +160,7 @@ int DrasculaEngine::go() { ald = NULL; sku = NULL; - asigna_memoria(); + allocMemory(); hay_sb = 1; con_voces = 0; @@ -260,7 +260,7 @@ void DrasculaEngine::salir_al_dos(int r) { free(VGA); } -void DrasculaEngine::asigna_memoria() { +void DrasculaEngine::allocMemory() { dir_zona_pantalla = (byte *)malloc(64000); assert(dir_zona_pantalla); dir_dibujo1 = (byte *)malloc(64000); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 2d9adf8cf3..18eed1c3bc 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -353,7 +353,7 @@ public: Audio::SoundHandle _soundHandle; - void asigna_memoria(); + void allocMemory(); void libera_memoria(); void salir_al_dos(int r); -- cgit v1.2.3 From 6d6846fb1a1f84c518e3f856ca276166e6ac3cb7 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Sun, 11 May 2008 09:48:46 +0000 Subject: Fix compilation svn-id: r32003 --- engines/drascula/drascula.h | 3 ++- engines/drascula/texts.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 18eed1c3bc..1a0378fca0 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -824,7 +824,7 @@ private: }; extern const char *_text[][501]; -extern const char *_textd[][79]; +extern const char *_textd[][84]; extern const char *_textb[][15]; extern const char *_textbj[][29]; extern const char *_texte[][24]; @@ -835,6 +835,7 @@ extern const char *_textt[][25]; extern const char *_textvb[][63]; extern const char *_textsys[][4]; extern const char *_texthis[][5]; +extern const char *_textverbs[][6]; } // End of namespace Drascula diff --git a/engines/drascula/texts.cpp b/engines/drascula/texts.cpp index 91a2eecc4e..141af25f96 100644 --- a/engines/drascula/texts.cpp +++ b/engines/drascula/texts.cpp @@ -5174,12 +5174,12 @@ const char *_texthis[][5] = { "Nobody knows exactly what happened there. Although Von Braun lost, Drascula could not kill him.", "Von Braun felt humiliated by his defect, run away from the castle and has never dared to face Drascula ever again.", }, +{ "", "", "", "", "" -{ }, { "", -- cgit v1.2.3 From 098d9c81a16b777c998e1828df2444c51ad24d3c Mon Sep 17 00:00:00 2001 From: PaweÅ‚ KoÅ‚odziejski Date: Sun, 11 May 2008 09:51:30 +0000 Subject: libera_memoria -> freeMemory update_events -> updateEvents svn-id: r32004 --- engines/drascula/drascula.cpp | 14 +++++++------- engines/drascula/drascula.h | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index a81b865c3a..cba0e8ddb6 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -256,7 +256,7 @@ void DrasculaEngine::salir_al_dos(int r) { Negro(); MusicFadeout(); stopmusic(); - libera_memoria(); + freeMemory(); free(VGA); } @@ -279,7 +279,7 @@ void DrasculaEngine::allocMemory() { assert(dir_hare_frente); } -void DrasculaEngine::libera_memoria() { +void DrasculaEngine::freeMemory() { free(dir_zona_pantalla); free(dir_dibujo1); free(dir_hare_fondo); @@ -1244,11 +1244,11 @@ void DrasculaEngine::comprueba_objetos() { } void DrasculaEngine::espera_soltar() { - update_events(); + updateEvents(); } void DrasculaEngine::MirarRaton() { - update_events(); + updateEvents(); } void DrasculaEngine::elige_en_barra() { @@ -1347,12 +1347,12 @@ bool DrasculaEngine::comprueba2() { } Common::KeyCode DrasculaEngine::getscan() { - update_events(); + updateEvents(); return _keyPressed.keycode; } -void DrasculaEngine::update_events() { +void DrasculaEngine::updateEvents() { Common::Event event; Common::EventManager *eventMan = _system->getEventManager(); @@ -4247,7 +4247,7 @@ void DrasculaEngine::MusicFadeout() { _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, vol); if (vol == 0) break; - update_events(); + updateEvents(); _system->updateScreen(); _system->delayMillis(50); } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 1a0378fca0..0281753cea 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -349,12 +349,12 @@ public: uint32 getFeatures() const; uint16 getVersion() const; Common::Platform getPlatform() const; - void update_events(); + void updateEvents(); Audio::SoundHandle _soundHandle; void allocMemory(); - void libera_memoria(); + void freeMemory(); void salir_al_dos(int r); void loadPic(const char *); -- cgit v1.2.3 From 68f45add74c645d84da4a670b5079d73f480777d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 11 May 2008 10:03:03 +0000 Subject: Italian verbs thanks to glorifindel svn-id: r32005 --- engines/drascula/texts.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/drascula/texts.cpp b/engines/drascula/texts.cpp index 141af25f96..1bc2514375 100644 --- a/engines/drascula/texts.cpp +++ b/engines/drascula/texts.cpp @@ -5239,12 +5239,12 @@ const char *_textverbs[][6] = { "push", }, { - "look", // TODO Translate it - "take", - "open", - "close", - "talk", - "push", + "esamina", + "prendi", + "apri", + "chiudi", + "parla", + "premi", }, }; -- cgit v1.2.3 From d176a32f2e13e2f2f4b272a1be48e71c30bbd8be Mon Sep 17 00:00:00 2001 From: PaweÅ‚ KoÅ‚odziejski Date: Sun, 11 May 2008 10:03:06 +0000 Subject: salir_al_dos -> releaseGame stopmusic -> stopMusic music_status -> musicStatus playmusic -> playMusic svn-id: r32006 --- engines/drascula/animation.cpp | 64 +++++++++++++++++++++--------------------- engines/drascula/drascula.cpp | 44 ++++++++++++++--------------- engines/drascula/drascula.h | 8 +++--- engines/drascula/talk.cpp | 36 ++++++++++++------------ 4 files changed, 76 insertions(+), 76 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index e7205fe984..b936e8c129 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -35,7 +35,7 @@ void DrasculaEngine::animation_1_1() { int pos_pixel[6]; while (term_int == 0) { - playmusic(29); + playMusic(29); fliplay("logoddm.bin", 9); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; @@ -46,7 +46,7 @@ void DrasculaEngine::animation_1_1() { delay(340); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - playmusic(26); + playMusic(26); delay(500); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; @@ -110,7 +110,7 @@ void DrasculaEngine::animation_1_1() { loadPic("aux104.alg"); decompressPic(dir_dibujo2, 1); - playmusic(4); + playMusic(4); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; delay(400); @@ -253,7 +253,7 @@ void DrasculaEngine::animation_1_1() { loadPic("100.alg"); decompressPic(dir_dibujo1, MEDIA); MusicFadeout(); - stopmusic(); + stopMusic(); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; talk_igor_dch(_texti[_lang][9], "I9.als"); @@ -265,7 +265,7 @@ void DrasculaEngine::animation_1_1() { talk_igor_dch(_texti[_lang][10], "I10.als"); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - playmusic(11); + playMusic(11); talk_dr_izq(_textd[_lang][10], "d10.als"); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; @@ -288,7 +288,7 @@ void DrasculaEngine::animation_1_1() { fin_sound_corte(); clearRoom(); Negro(); - playmusic(23); + playMusic(23); FundeDelNegro(0); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; @@ -375,7 +375,7 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); - playmusic(2); + playMusic(2); pause(5); fliplay("intro.bin", 12); term_int = 1; @@ -488,7 +488,7 @@ void DrasculaEngine::animation_2_1() { break; clearRoom(); - stopmusic(); + stopMusic(); corta_musica = 1; memset(dir_zona_pantalla, 0, 64000); color_solo = BLANCO; @@ -575,7 +575,7 @@ void DrasculaEngine::animation_2_1() { talk(_text[_lang][222], "222.als"); anima("gaf.bin", 15); anima("bjb.bin", 14); - playmusic(9); + playMusic(9); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; loadPic("97.alg"); @@ -624,7 +624,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; anima("bes.bin", 16); - playmusic(11); + playMusic(11); anima("rap.bin", 16); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; @@ -708,7 +708,7 @@ void DrasculaEngine::animation_4_1() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - stopmusic(); + stopMusic(); flags[11] = 1; talk_pianista(_textp[_lang][1], "p1.als"); @@ -823,7 +823,7 @@ void DrasculaEngine::animation_3_2() { } void DrasculaEngine::animation_4_2() { - stopmusic(); + stopMusic(); flags[9] = 1; pause(12); @@ -879,7 +879,7 @@ void DrasculaEngine::animation_4_2() { clearRoom(); - playmusic(musica_room); + playMusic(musica_room); loadPic("9.alg"); decompressPic(dir_dibujo1, MEDIA); loadPic("aux9.alg"); @@ -978,7 +978,7 @@ void DrasculaEngine::animation_16_2() { clearRoom(); - playmusic(32); + playMusic(32); int key = getscan(); if (key != 0) goto asco; @@ -1082,9 +1082,9 @@ asco: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); FundeDelNegro(0); if (musica_room != 0) - playmusic(musica_room); + playMusic(musica_room); else - stopmusic(); + stopMusic(); } void DrasculaEngine::animation_17_2() { @@ -1456,9 +1456,9 @@ void DrasculaEngine::animation_1_3() { void DrasculaEngine::animation_2_3() { flags[0] = 1; - playmusic(13); + playMusic(13); animation_3_3(); - playmusic(13); + playMusic(13); animation_4_3(); flags[1] = 1; updateRoom(); @@ -2017,7 +2017,7 @@ void DrasculaEngine::animation_12_5() { int color, componente; char fundido; - playmusic(26); + playMusic(26); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(27); @@ -2140,7 +2140,7 @@ void DrasculaEngine::animation_13_5() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(15); - playmusic(18); + playMusic(18); for (;;) { updateRoom(); @@ -2353,7 +2353,7 @@ void DrasculaEngine::animation_9_6() { int v_cd; anima("fin.bin", 14); - playmusic(13); + playMusic(13); flags[5] = 1; anima("drf.bin", 16); FundeAlNegro(0); @@ -2375,7 +2375,7 @@ void DrasculaEngine::animation_9_6() { sentido_hare = 2; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - playmusic(9); + playMusic(9); clearRoom(); loadPic("nota.alg"); decompressPic(dir_dibujo1, COMPLETA); @@ -2410,17 +2410,17 @@ void DrasculaEngine::animation_9_6() { talk(_text[_lang][301], "301.als"); v_cd = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16; v_cd = v_cd + 4; - playmusic(17); + playMusic(17); FundeAlNegro(1); clearRoom(); fliplay("qpc.bin", 1); MusicFadeout(); - stopmusic(); + stopMusic(); clearRoom(); _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, v_cd * 16); - playmusic(3); + playMusic(3); fliplay("crd.bin", 1); - stopmusic(); + stopMusic(); } void DrasculaEngine::animation_10_6() { @@ -2505,7 +2505,7 @@ void DrasculaEngine::animation_12_2() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - stopmusic(); + stopMusic(); flags[11] = 1; talk_pianista(_textp[_lang][5], "P5.als"); @@ -2539,7 +2539,7 @@ void DrasculaEngine::animation_26_2() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - stopmusic(); + stopMusic(); flags[11] = 1; talk_pianista(_textp[_lang][5], "P5.als"); @@ -3163,7 +3163,7 @@ void DrasculaEngine::animation_5_2() { } void DrasculaEngine::animation_6_2() { - stopmusic(); + stopMusic(); flags[9] = 1; clearRoom(); @@ -3198,7 +3198,7 @@ void DrasculaEngine::animation_6_2() { clearRoom(); - playmusic(musica_room); + playMusic(musica_room); loadPic("9.alg"); decompressPic(dir_dibujo1, MEDIA); loadPic("aux9.alg"); @@ -3215,7 +3215,7 @@ void DrasculaEngine::animation_6_2() { } void DrasculaEngine::animation_33_2() { - stopmusic(); + stopMusic(); flags[9] = 1; pause(12); @@ -3254,7 +3254,7 @@ void DrasculaEngine::animation_33_2() { clearRoom(); - playmusic(musica_room); + playMusic(musica_room); loadPic("9.alg"); decompressPic(dir_dibujo1, MEDIA); loadPic("aux9.alg"); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index cba0e8ddb6..c19b67609b 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -236,10 +236,10 @@ int DrasculaEngine::go() { paleta_hare(); if (!escoba()) { - salir_al_dos(0); + releaseGame(); break; } - salir_al_dos(0); + releaseGame(); if (num_ejec == 6) break; @@ -249,13 +249,13 @@ int DrasculaEngine::go() { return 0; } -void DrasculaEngine::salir_al_dos(int r) { +void DrasculaEngine::releaseGame() { if (hay_sb == 1) ctvd_end(); clearRoom(); Negro(); MusicFadeout(); - stopmusic(); + stopMusic(); freeMemory(); free(VGA); } @@ -626,11 +626,11 @@ bucles: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); if (num_ejec == 2) { - if (music_status() == 0 && musica_room != 0) - playmusic(musica_room); + if (musicStatus() == 0 && musica_room != 0) + playMusic(musica_room); } else { - if (music_status() == 0) - playmusic(musica_room); + if (musicStatus() == 0) + playMusic(musica_room); } MirarRaton(); @@ -1116,12 +1116,12 @@ martini: musica_room = 0; if (musica_antes != musica_room && musica_room != 0) - playmusic(musica_room); + playMusic(musica_room); if (musica_room == 0) - stopmusic(); + stopMusic(); } else { if (musica_antes != musica_room && musica_room != 0) - playmusic(musica_room); + playMusic(musica_room); } if (num_ejec == 2) { @@ -1384,7 +1384,7 @@ void DrasculaEngine::updateEvents() { break; case Common::EVENT_QUIT: // TODO - salir_al_dos(0); + releaseGame(); exit(0); break; default: @@ -1770,7 +1770,7 @@ bool DrasculaEngine::confirma_salir() { } if (key == Common::KEYCODE_ESCAPE) { - stopmusic(); + stopMusic(); return false; } @@ -2159,16 +2159,16 @@ void DrasculaEngine::fin_sound() { } } -void DrasculaEngine::playmusic(int p) { +void DrasculaEngine::playMusic(int p) { AudioCD.stop(); AudioCD.play(p - 1, 1, 0, 0); } -void DrasculaEngine::stopmusic() { +void DrasculaEngine::stopMusic() { AudioCD.stop(); } -int DrasculaEngine::music_status() { +int DrasculaEngine::musicStatus() { return AudioCD.isPlaying(); } @@ -3869,14 +3869,14 @@ bucle_opc: updateRoom(); if (num_ejec == 1 || num_ejec == 4 || num_ejec == 6) { - if (music_status() == 0 && flags[11] == 0) - playmusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0) + playMusic(musica_room); } else if (num_ejec == 2) { - if (music_status() == 0 && flags[11] == 0 && musica_room != 0) - playmusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0 && musica_room != 0) + playMusic(musica_room); } else if (num_ejec == 3 || num_ejec == 5) { - if (music_status() == 0) - playmusic(musica_room); + if (musicStatus() == 0) + playMusic(musica_room); } MirarRaton(); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 0281753cea..bb7f94ca78 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -355,7 +355,7 @@ public: void allocMemory(); void freeMemory(); - void salir_al_dos(int r); + void releaseGame(); void loadPic(const char *); void decompressPic(byte *dir_escritura, int plt); @@ -616,9 +616,9 @@ public: void talk(const char *, const char *); void talk_sinc(const char *, const char *, const char *); void cierra_puerta(int nflag, int n_puerta); - void playmusic(int p); - void stopmusic(); - int music_status(); + void playMusic(int p); + void stopMusic(); + int musicStatus(); void updateRoom(); bool carga_partida(const char *); void puertas_cerradas(int); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 3ba57652ce..4fb1d351d0 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -433,11 +433,11 @@ void DrasculaEngine::talk_tabernero(const char *dicho, const char *filename) { bucless: if (num_ejec == 1) { - if (music_status() == 0) - playmusic(musica_room); + if (musicStatus() == 0) + playMusic(musica_room); } else if (num_ejec == 2) { - if (music_status() == 0 && flags[11] == 0 && musica_room != 0) - playmusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0 && musica_room != 0) + playMusic(musica_room); } cara = _rnd->getRandomNumber(8); @@ -701,8 +701,8 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); if (num_ejec == 1) { - if (music_status() == 0 && flags[11] == 0 && corta_musica == 0) - playmusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0 && corta_musica == 0) + playMusic(musica_room); } } @@ -855,11 +855,11 @@ bucless: } if (num_ejec == 1) { - if (music_status() == 0 && flags[11] == 0) - playmusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0) + playMusic(musica_room); } else if (num_ejec == 2) { - if (music_status() == 0 && flags[11] == 0 && musica_room != 0) - playmusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0 && musica_room != 0) + playMusic(musica_room); } } @@ -930,8 +930,8 @@ bucless: updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - if (music_status() == 0 && flags[11] == 0 && musica_room != 0) - playmusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0 && musica_room != 0) + playMusic(musica_room); } void DrasculaEngine::talk_vbpuerta(const char *dicho, const char *filename) { @@ -982,8 +982,8 @@ bucless: updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - if (music_status() == 0 && flags[11] == 0 && musica_room != 0) - playmusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0 && musica_room != 0) + playMusic(musica_room); } void DrasculaEngine::talk_ciego(const char *dicho, const char *filename, const char *sincronia) { @@ -1726,10 +1726,10 @@ bucless: goto bucless; } - if (num_ejec == 1 && music_status() == 0 && flags[11] == 0) - playmusic(musica_room); - if (num_ejec == 2 && music_status() == 0 && flags[11] == 0 && musica_room != 0) - playmusic(musica_room); + if (num_ejec == 1 && musicStatus() == 0 && flags[11] == 0) + playMusic(musica_room); + if (num_ejec == 2 && musicStatus() == 0 && flags[11] == 0 && musica_room != 0) + playMusic(musica_room); } void DrasculaEngine::talk_baul(const char *dicho, const char *filename) { -- cgit v1.2.3 From 8e7994ada8c86f2add740d5c27ee67088ded916e Mon Sep 17 00:00:00 2001 From: PaweÅ‚ KoÅ‚odziejski Date: Sun, 11 May 2008 10:28:25 +0000 Subject: NUM_BANDERAS -> NUM_FLAGS ANCHOBJ -> OBJWIDTH ALTOBJ -> OBJHEIGHT ANCHO_LETRAS -> CHAR_WIDTH X_GUION -> X_HYPHEN X_GUION -> X_HYPHEN_OPC X_ABRE_PARENTESIS -> X_BRACKET_OPEN X_ABRE_PARENTESIS_OPC -> X_BRACKET_OPEN_OPC X_CIERRA_PARENTESIS -> X_BRACKET_CLOSE X_CIERRA_PARENTESIS_OPC -> X_BRACKET_CLOSE_OPC svn-id: r32007 --- engines/drascula/drascula.cpp | 68 +++++++++++++++++++++---------------------- engines/drascula/drascula.h | 28 +++++++++--------- engines/drascula/talk.cpp | 20 ++++++------- 3 files changed, 58 insertions(+), 58 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index c19b67609b..ea1e36f8a5 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -488,7 +488,7 @@ bool DrasculaEngine::escoba() { for (n = 1; n < 43; n++) objetos_que_tengo[n] = 0; - for (n = 0; n < NUM_BANDERAS; n++) + for (n = 0; n < NUM_FLAGS; n++) flags[n] = 0; if (num_ejec == 2) { @@ -791,7 +791,7 @@ void DrasculaEngine::elige_objeto(int objeto) { if (lleva_objeto == 1 && menu_scr == 0) suma_objeto(objeto_que_lleva); } - copyBackground(x1d_menu[objeto], y1d_menu[objeto], 0, 0, ANCHOBJ,ALTOBJ, dir_hare_fondo, dir_dibujo3); + copyBackground(x1d_menu[objeto], y1d_menu[objeto], 0, 0, OBJWIDTH,OBJHEIGHT, dir_hare_fondo, dir_dibujo3); lleva_objeto = 1; objeto_que_lleva = objeto; } @@ -824,7 +824,7 @@ void DrasculaEngine::sin_verbo() { if (lleva_objeto == 1) suma_objeto(objeto_que_lleva); } - copyBackground(0, c, 0, 0, ANCHOBJ,ALTOBJ, dir_hare_fondo, dir_dibujo3); + copyBackground(0, c, 0, 0, OBJWIDTH,OBJHEIGHT, dir_hare_fondo, dir_dibujo3); lleva_objeto = 0; hay_nombre = 0; @@ -1032,7 +1032,7 @@ martini: loadPic(num_room); decompressPic(dir_dibujo1, MEDIA); - copyBackground(0, 171, 0, 0, ANCHOBJ, ALTOBJ, dir_hare_fondo, dir_dibujo3); + copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_dibujo3); color_hare(); if (nivel_osc != 0) @@ -1205,8 +1205,8 @@ void DrasculaEngine::mueve_cursor() { pos_cursor[1] = 0; pos_cursor[2] = x_raton - 20; pos_cursor[3] = y_raton - 17; - pos_cursor[4] = ANCHOBJ; - pos_cursor[5] = ALTOBJ; + pos_cursor[4] = OBJWIDTH; + pos_cursor[5] = OBJHEIGHT; copyRectClip(pos_cursor, dir_dibujo3, dir_zona_pantalla); } @@ -1406,7 +1406,7 @@ void DrasculaEngine::elige_verbo(int verbo) { suma_objeto(objeto_que_lleva); } - copyBackground(ANCHOBJ * verbo, c, 0, 0, ANCHOBJ, ALTOBJ, dir_hare_fondo, dir_dibujo3); + copyBackground(OBJWIDTH * verbo, c, 0, 0, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_dibujo3); lleva_objeto = 1; objeto_que_lleva = verbo; @@ -1674,7 +1674,7 @@ void DrasculaEngine::print_abc(const char *dicho, int x_pantalla, int y_pantalla else if (c == ',') x_de_letra = X_COMA; else if (c == '-') - x_de_letra = X_GUION; + x_de_letra = X_HYPHEN; else if (c == '?') x_de_letra = X_CIERRA_INTERROGACION; else if (c == 0xa8) @@ -1704,9 +1704,9 @@ void DrasculaEngine::print_abc(const char *dicho, int x_pantalla, int y_pantalla else if (c == '/') x_de_letra = X_BARRA; else if (c == '(') - x_de_letra = X_ABRE_PARENTESIS; + x_de_letra = X_BRACKET_OPEN; else if (c == ')') - x_de_letra = X_CIERRA_PARENTESIS; + x_de_letra = X_BRACKET_CLOSE; else if (c == '*') x_de_letra = X_ASTERISCO; else if (c == '+') @@ -1737,15 +1737,15 @@ void DrasculaEngine::print_abc(const char *dicho, int x_pantalla, int y_pantalla pos_texto[1] = y_de_letra; pos_texto[2] = x_pantalla; pos_texto[3] = y_pantalla; - pos_texto[4] = ANCHO_LETRAS; - pos_texto[5] = ALTO_LETRAS; + pos_texto[4] = CHAR_WIDTH; + pos_texto[5] = CHAR_HEIGHT; copyRectClip(pos_texto, dir_texto, dir_zona_pantalla); - x_pantalla = x_pantalla + ANCHO_LETRAS; + x_pantalla = x_pantalla + CHAR_WIDTH; if (x_pantalla > 317) { x_pantalla = 0; - y_pantalla = y_pantalla + ALTO_LETRAS + 2; + y_pantalla = y_pantalla + CHAR_HEIGHT + 2; } } } @@ -1916,7 +1916,7 @@ void DrasculaEngine::centra_texto(const char *mensaje, int x_texto, int y_texto) if (ya == 1) x_texto1 = 315 - x_texto; - x_texto2 = (strlen(m1) / 2) * ANCHO_LETRAS; + x_texto2 = (strlen(m1) / 2) * CHAR_WIDTH; tut: strcpy(bb, m1); @@ -1931,7 +1931,7 @@ tut: strcpy(m2, m3); }; - x_texto2 = (strlen(m1) / 2) * ANCHO_LETRAS; + x_texto2 = (strlen(m1) / 2) * CHAR_WIDTH; if (x_texto1 < x_texto2) goto tut; strcpy(mb[conta_f], m1); @@ -1949,12 +1949,12 @@ tut: imprimir: - fil = y_texto - (((conta_f + 3) * ALTO_LETRAS)); + fil = y_texto - (((conta_f + 3) * CHAR_HEIGHT)); for (h = 0; h < conta_f + 1; h++) { x_texto3 = strlen(mb[h]) / 2; - print_abc(mb[h], ((x_texto) - x_texto3 * ANCHO_LETRAS) - 1, fil); - fil = fil + ALTO_LETRAS + 2; + print_abc(mb[h], ((x_texto) - x_texto3 * CHAR_WIDTH) - 1, fil); + fil = fil + CHAR_HEIGHT + 2; } } @@ -2210,7 +2210,7 @@ bool DrasculaEngine::carga_partida(const char *nom_game) { objetos_que_tengo[l] = sav->readSint32LE(); } - for (l = 0; l < NUM_BANDERAS; l++) { + for (l = 0; l < NUM_FLAGS; l++) { flags[l] = sav->readSint32LE(); } @@ -2548,13 +2548,13 @@ void DrasculaEngine::menu_sin_volcar() { if (h != 0) { if (num_ejec == 6) copyBackground(x_pol[n], y_pol[n], x_obj[n], y_obj[n], - ANCHOBJ, ALTOBJ, dir_mesa, dir_zona_pantalla); + OBJWIDTH, OBJHEIGHT, dir_mesa, dir_zona_pantalla); else copyBackground(x_pol[n], y_pol[n], x_obj[n], y_obj[n], - ANCHOBJ, ALTOBJ, dir_hare_frente, dir_zona_pantalla); + OBJWIDTH, OBJHEIGHT, dir_hare_frente, dir_zona_pantalla); } copyRect(x1d_menu[h], y1d_menu[h], x_obj[n], y_obj[n], - ANCHOBJ, ALTOBJ, dir_hare_fondo, dir_zona_pantalla); + OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_zona_pantalla); } if (x < 7) @@ -2567,8 +2567,8 @@ void DrasculaEngine::barra_menu() { for (n = 0; n < 7; n++) { if (x_raton > x_barra[n] && x_raton < x_barra[n + 1]) sobre_verbo = 0; - copyRect(ANCHOBJ * n, ALTOBJ * sobre_verbo, x_barra[n], 2, - ANCHOBJ, ALTOBJ, dir_hare_fondo, dir_zona_pantalla); + copyRect(OBJWIDTH * n, OBJHEIGHT * sobre_verbo, x_barra[n], 2, + OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_zona_pantalla); sobre_verbo = 1; } } @@ -3672,7 +3672,7 @@ void DrasculaEngine::graba_partida(char nom_game[]) { out->writeSint32LE(objetos_que_tengo[l]); } - for (l = 0; l < NUM_BANDERAS; l++) { + for (l = 0; l < NUM_FLAGS; l++) { out->writeSint32LE(flags[l]); } @@ -3737,7 +3737,7 @@ int DrasculaEngine::sobre_que_objeto() { for (n = 1; n < 43; n++) { if (x_raton > x_obj[n] && y_raton > y_obj[n] - && x_raton < x_obj[n] + ANCHOBJ && y_raton < y_obj[n] + ALTOBJ) + && x_raton < x_obj[n] + OBJWIDTH && y_raton < y_obj[n] + OBJHEIGHT) break; } @@ -4056,7 +4056,7 @@ void DrasculaEngine::print_abc_opc(const char *dicho, int x_pantalla, int y_pant else if (c == ',') x_de_letra = X_COMA_OPC; else if (c == '-') - x_de_letra = X_GUION_OPC; + x_de_letra = X_HYPHEN_OPC; else if (c == '?') x_de_letra = X_CIERRA_INTERROGACION_OPC; else if (c == 0xa8) @@ -4086,9 +4086,9 @@ void DrasculaEngine::print_abc_opc(const char *dicho, int x_pantalla, int y_pant else if (c == '/') x_de_letra = X_BARRA_OPC; else if (c == '(') - x_de_letra = X_ABRE_PARENTESIS_OPC; + x_de_letra = X_BRACKET_OPEN_OPC; else if (c == ')') - x_de_letra = X_CIERRA_PARENTESIS_OPC; + x_de_letra = X_BRACKET_CLOSE_OPC; else if (c == '*') x_de_letra = X_ASTERISCO_OPC; else if (c == '+') @@ -4119,12 +4119,12 @@ void DrasculaEngine::print_abc_opc(const char *dicho, int x_pantalla, int y_pant pos_texto[1] = y_de_letra; pos_texto[2] = x_pantalla; pos_texto[3] = y_pantalla; - pos_texto[4] = ANCHO_LETRAS_OPC; - pos_texto[5] = ALTO_LETRAS_OPC; + pos_texto[4] = CHAR_WIDTH_OPC; + pos_texto[5] = CHAR_HEIGHT_OPC; copyRectClip(pos_texto, dir_hare_fondo, dir_zona_pantalla); - x_pantalla = x_pantalla + ANCHO_LETRAS_OPC; + x_pantalla = x_pantalla + CHAR_WIDTH_OPC; } } @@ -4566,7 +4566,7 @@ void DrasculaEngine::activa_pendulo() { loadPic("an_p3.alg"); decompressPic(dir_hare_frente, 1); - copyBackground(0, 171, 0, 0, ANCHOBJ, ALTOBJ, dir_hare_fondo, dir_dibujo3); + copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_dibujo3); conta_ciego_vez = vez(); } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index bb7f94ca78..075137111b 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -51,7 +51,7 @@ enum DrasculaGameFeatures { struct DrasculaGameDescription; #define NUM_SAVES 10 -#define NUM_BANDERAS 50 +#define NUM_FLAGS 50 #define ESC 0x01 #define F1 0x3B #define F2 0x3C @@ -72,8 +72,8 @@ struct DrasculaGameDescription; #define FINALSOUND 8 #define FINDRV 9 #define DIF_MASK 55 -#define ANCHOBJ 40 -#define ALTOBJ 25 +#define OBJWIDTH 40 +#define OBJHEIGHT 25 #define X_OBJ1 5 #define Y_OBJ1 10 @@ -164,8 +164,8 @@ struct DrasculaGameDescription; #define DIF_MASK_HARE 72 #define DIF_MASK_ABC 22 -#define ANCHO_LETRAS 8 -#define ALTO_LETRAS 6 +#define CHAR_WIDTH 8 +#define CHAR_HEIGHT 6 #define Y_ABC 158 #define Y_SIGNOS 169 @@ -200,7 +200,7 @@ struct DrasculaGameDescription; #define X_Z 240 #define X_PUNTO 6 #define X_COMA 15 -#define X_GUION 24 +#define X_HYPHEN 24 #define X_CIERRA_INTERROGACION 33 #define X_ABRE_INTERROGACION 42 #define X_COMILLAS 51 @@ -214,8 +214,8 @@ struct DrasculaGameDescription; #define X_DOS_PUNTOS 123 #define X_AND 132 #define X_BARRA 141 -#define X_ABRE_PARENTESIS 150 -#define X_CIERRA_PARENTESIS 159 +#define X_BRACKET_OPEN 150 +#define X_BRACKET_CLOSE 159 #define X_ASTERISCO 168 #define X_MAS 177 #define X_N1 186 @@ -248,8 +248,8 @@ struct DrasculaGameDescription; #define ANCHO_PERSONAJE 43 #define PIES_HARE 12 -#define ANCHO_LETRAS_OPC 6 -#define ALTO_LETRAS_OPC 5 +#define CHAR_WIDTH_OPC 6 +#define CHAR_HEIGHT_OPC 5 #define Y_ABC_OPC_1 6 #define Y_SIGNOS_OPC_1 15 #define Y_ABC_OPC_2 31 @@ -286,7 +286,7 @@ struct DrasculaGameDescription; #define ESPACIO_OPC 199 #define X_PUNTO_OPC 10 #define X_COMA_OPC 17 -#define X_GUION_OPC 24 +#define X_HYPHEN_OPC 24 #define X_CIERRA_INTERROGACION_OPC 31 #define X_ABRE_INTERROGACION_OPC 38 #define X_COMILLAS_OPC 45 @@ -300,8 +300,8 @@ struct DrasculaGameDescription; #define X_DOS_PUNTOS_OPC 101 #define X_AND_OPC 108 #define X_BARRA_OPC 115 -#define X_ABRE_PARENTESIS_OPC 122 -#define X_CIERRA_PARENTESIS_OPC 129 +#define X_BRACKET_OPEN_OPC 122 +#define X_BRACKET_CLOSE_OPC 129 #define X_ASTERISCO_OPC 136 #define X_MAS_OPC 143 #define X_N1_OPC 150 @@ -424,7 +424,7 @@ public: int c_mirar; int c_poder; - int flags[NUM_BANDERAS]; + int flags[NUM_FLAGS]; int frame_y; int hare_x, hare_y, hare_se_mueve, direccion_hare, sentido_hare, num_frame, hare_se_ve; diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 4fb1d351d0..d0ae9de7ac 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -616,9 +616,9 @@ bucless: updateRefresh_pre(); if (num_ejec == 2) - copyBackground(hare_x, hare_y, ANCHOBJ + 1, 0, ancho_hare, alto_talk - 1, dir_zona_pantalla, dir_dibujo3); + copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, dir_zona_pantalla, dir_dibujo3); else - copyBackground(hare_x, hare_y, ANCHOBJ + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), + copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), dir_zona_pantalla, dir_dibujo3); @@ -626,9 +626,9 @@ bucless: if (num_ejec == 2) { if (!strcmp(fondo_y_menu, "99.alg") || !strcmp(fondo_y_menu, "994.alg")) - copyBackground(ANCHOBJ + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, dir_dibujo3, dir_zona_pantalla); + copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, dir_dibujo3, dir_zona_pantalla); } else { - copyBackground(ANCHOBJ + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), + copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), dir_dibujo3, dir_zona_pantalla); } @@ -890,7 +890,7 @@ void DrasculaEngine::talk_vb(const char *dicho, const char *filename) { ctvd_output(sku); } - copyBackground(vb_x + 5, 64, ANCHOBJ + 1, 0, 25, 27, dir_dibujo1, dir_dibujo3); + copyBackground(vb_x + 5, 64, OBJWIDTH + 1, 0, 25, 27, dir_dibujo1, dir_dibujo3); bucless: @@ -901,7 +901,7 @@ bucless: pon_hare(); pon_vb(); - copyBackground(ANCHOBJ + 1, 0, vb_x + 5, 64, 25, 27, dir_dibujo3, dir_zona_pantalla); + copyBackground(OBJWIDTH + 1, 0, vb_x + 5, 64, 25, 27, dir_dibujo3, dir_zona_pantalla); copyRect(x_talk[cara], 34, vb_x + 5, 64, 25, 27, dir_hare_frente, dir_zona_pantalla); updateRefresh(); } @@ -1659,16 +1659,16 @@ bucless: updateRefresh_pre(); if (num_ejec == 2) - copyBackground(hare_x, hare_y, ANCHOBJ + 1, 0, ancho_hare, alto_talk - 1, dir_zona_pantalla, dir_dibujo3); + copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, dir_zona_pantalla, dir_dibujo3); else - copyBackground(hare_x, hare_y, ANCHOBJ + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), + copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), dir_zona_pantalla, dir_dibujo3); pon_hare(); if (num_ejec == 2) { if (alto_hare != 56) - copyBackground(ANCHOBJ + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, dir_dibujo3, dir_zona_pantalla); + copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, dir_dibujo3, dir_zona_pantalla); } else - copyBackground(ANCHOBJ + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), + copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), dir_dibujo3, dir_zona_pantalla); if (sentido_hare == 0) { -- cgit v1.2.3 From 686b7a80de0e28badc08bfeae27978ee2bf5b0bf Mon Sep 17 00:00:00 2001 From: PaweÅ‚ KoÅ‚odziejski Date: Sun, 11 May 2008 10:36:48 +0000 Subject: X_PUNTO -> X_DOT X_PUNTO_OPC -> X_DOT_OPC X_MAYOR_QUE -> X_GREATER_THAN X_MENOR_QUE -> X_LESSER_THAN X_MAYOR_QUE_OPC -> X_GREATER_THAN_OPC X_MENOR_QUE_OPC -> X_LESSER_THAN_OPC X_POR_CIENTO -> X_PERCENT X_POR_CIENTO_OPC -> X_PERCENT_OPC X_MAS -> X_PLUS X_MAS_OPC -> X_PLUS_OPC svn-id: r32008 --- engines/drascula/drascula.cpp | 20 ++++++++++---------- engines/drascula/drascula.h | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index ea1e36f8a5..a4ee64ae09 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1670,7 +1670,7 @@ void DrasculaEngine::print_abc(const char *dicho, int x_pantalla, int y_pantalla else { y_de_letra = Y_SIGNOS; if (c == '.') - x_de_letra = X_PUNTO; + x_de_letra = X_DOT; else if (c == ',') x_de_letra = X_COMA; else if (c == '-') @@ -1690,13 +1690,13 @@ void DrasculaEngine::print_abc(const char *dicho, int x_pantalla, int y_pantalla else if (c == ';') x_de_letra = X_PUNTO_Y_COMA; else if (c == '>') - x_de_letra = X_MAYOR_QUE; + x_de_letra = X_GREATER_THAN; else if (c == '<') - x_de_letra = X_MENOR_QUE; + x_de_letra = X_LESSER_THAN; else if (c == '$') x_de_letra = X_DOLAR; else if (c == '%') - x_de_letra = X_POR_CIENTO; + x_de_letra = X_PERCENT; else if (c == ':') x_de_letra = X_DOS_PUNTOS; else if (c == '&') @@ -1710,7 +1710,7 @@ void DrasculaEngine::print_abc(const char *dicho, int x_pantalla, int y_pantalla else if (c == '*') x_de_letra = X_ASTERISCO; else if (c == '+') - x_de_letra = X_MAS; + x_de_letra = X_PLUS; else if (c == '1') x_de_letra = X_N1; else if (c == '2') @@ -4052,7 +4052,7 @@ void DrasculaEngine::print_abc_opc(const char *dicho, int x_pantalla, int y_pant else { y_de_letra = y_de_signos; if (c == '.') - x_de_letra = X_PUNTO_OPC; + x_de_letra = X_DOT_OPC; else if (c == ',') x_de_letra = X_COMA_OPC; else if (c == '-') @@ -4072,13 +4072,13 @@ void DrasculaEngine::print_abc_opc(const char *dicho, int x_pantalla, int y_pant else if (c == ';') x_de_letra = X_PUNTO_Y_COMA_OPC; else if (c == '>') - x_de_letra = X_MAYOR_QUE_OPC; + x_de_letra = X_GREATER_THAN_OPC; else if (c == '<') - x_de_letra = X_MENOR_QUE_OPC; + x_de_letra = X_LESSER_THAN_OPC; else if (c == '$') x_de_letra = X_DOLAR_OPC; else if (c == '%') - x_de_letra = X_POR_CIENTO_OPC; + x_de_letra = X_PERCENT_OPC; else if (c == ':') x_de_letra = X_DOS_PUNTOS_OPC; else if (c == '&') @@ -4092,7 +4092,7 @@ void DrasculaEngine::print_abc_opc(const char *dicho, int x_pantalla, int y_pant else if (c == '*') x_de_letra = X_ASTERISCO_OPC; else if (c == '+') - x_de_letra = X_MAS_OPC; + x_de_letra = X_PLUS_OPC; else if (c == '1') x_de_letra = X_N1_OPC; else if (c == '2') diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 075137111b..771db51095 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -198,7 +198,7 @@ struct DrasculaGameDescription; #define X_X 222 #define X_Y 231 #define X_Z 240 -#define X_PUNTO 6 +#define X_DOT 6 #define X_COMA 15 #define X_HYPHEN 24 #define X_CIERRA_INTERROGACION 33 @@ -207,17 +207,17 @@ struct DrasculaGameDescription; #define X_CIERRA_EXCLAMACION 60 #define X_ABRE_EXCLAMACION 69 #define X_PUNTO_Y_COMA 78 -#define X_MAYOR_QUE 87 -#define X_MENOR_QUE 96 +#define X_GREATER_THAN 87 +#define X_LESSER_THAN 96 #define X_DOLAR 105 -#define X_POR_CIENTO 114 +#define X_PERCENT 114 #define X_DOS_PUNTOS 123 #define X_AND 132 #define X_BARRA 141 #define X_BRACKET_OPEN 150 #define X_BRACKET_CLOSE 159 #define X_ASTERISCO 168 -#define X_MAS 177 +#define X_PLUS 177 #define X_N1 186 #define X_N2 195 #define X_N3 204 @@ -284,7 +284,7 @@ struct DrasculaGameDescription; #define X_Y_OPC 185 #define X_Z_OPC 192 #define ESPACIO_OPC 199 -#define X_PUNTO_OPC 10 +#define X_DOT_OPC 10 #define X_COMA_OPC 17 #define X_HYPHEN_OPC 24 #define X_CIERRA_INTERROGACION_OPC 31 @@ -293,17 +293,17 @@ struct DrasculaGameDescription; #define X_CIERRA_EXCLAMACION_OPC 52 #define X_ABRE_EXCLAMACION_OPC 59 #define X_PUNTO_Y_COMA_OPC 66 -#define X_MAYOR_QUE_OPC 73 -#define X_MENOR_QUE_OPC 80 +#define X_GREATER_THAN_OPC 73 +#define X_LESSER_THAN_OPC 80 #define X_DOLAR_OPC 87 -#define X_POR_CIENTO_OPC 94 +#define X_PERCENT_OPC 94 #define X_DOS_PUNTOS_OPC 101 #define X_AND_OPC 108 #define X_BARRA_OPC 115 #define X_BRACKET_OPEN_OPC 122 #define X_BRACKET_CLOSE_OPC 129 #define X_ASTERISCO_OPC 136 -#define X_MAS_OPC 143 +#define X_PLUS_OPC 143 #define X_N1_OPC 150 #define X_N2_OPC 157 #define X_N3_OPC 164 -- cgit v1.2.3 From d7fc8fd7befd0cc845d9a8ad5b287b10edbd8f08 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 11 May 2008 10:48:22 +0000 Subject: Use less CPU when reading the spell book. svn-id: r32009 --- engines/kyra/gui_hof.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp index 2c333df937..74701f109e 100644 --- a/engines/kyra/gui_hof.cpp +++ b/engines/kyra/gui_hof.cpp @@ -515,6 +515,7 @@ void KyraEngine_HoF::bookLoop() { _screen->updateScreen(); _screen->showMouse(); } + _system->delayMillis(10); } _screen->clearPage(2); } -- cgit v1.2.3 From d6fafb4ad1b5446f9c10a768f9b3cfeab90b9171 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 11 May 2008 10:52:58 +0000 Subject: Fixed compilation under windows svn-id: r32010 --- backends/midi/windows.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp index 17a5e7be47..4107c575ba 100644 --- a/backends/midi/windows.cpp +++ b/backends/midi/windows.cpp @@ -24,10 +24,13 @@ #if defined(WIN32) && !defined(_WIN32_WCE) +#include +// winnt.h defines ARRAYSIZE, but we want our own one... +#undef ARRAYSIZE + #include "backends/midi/midiplugin.h" #include "sound/mpu401.h" -#include #include //////////////////////////////////////// -- cgit v1.2.3 From 1b25ec5c8e17589982bd117a9510268f025158fb Mon Sep 17 00:00:00 2001 From: PaweÅ‚ KoÅ‚odziejski Date: Sun, 11 May 2008 10:53:59 +0000 Subject: ESPACIO -> SPACE AZUL_OSCURO -> DARK_BLUE VERDE_CLARO -> LIGHT_GREEN VERDE_OSCURO -> DARK_GREEN AMARILLO -> YELLOW NARANJA -> ORANGE ROJO -> RED MARRON -> MAROON MORADO -> PURPLE BLANCO -> WHITE ROSA -> PINK ALTO_PERSONAJE -> CHARACTER_HEIGHT ANCHO_PERSONAJE -> CHARACTER_WIDTH NO_PUERTA -> NO_DOOR COMPLETA -> FULL MEDIA -> HALF svn-id: r32011 --- engines/drascula/animation.cpp | 18 ++++----- engines/drascula/drascula.cpp | 84 +++++++++++++++++++++--------------------- engines/drascula/drascula.h | 30 +++++++-------- engines/drascula/rooms.cpp | 4 +- engines/drascula/talk.cpp | 48 ++++++++++++------------ engines/drascula/texts.cpp | 6 +-- 6 files changed, 95 insertions(+), 95 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index b936e8c129..1cacfab453 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -64,7 +64,7 @@ void DrasculaEngine::animation_1_1() { delay(900); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - color_abc(ROJO); + color_abc(RED); centra_texto("Transilvanya, 1993 d.c.", 160, 100); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) @@ -205,7 +205,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); - color_solo = ROJO; + color_solo = RED; loadPic("plan1.alg"); decompressPic(dir_zona_pantalla, MEDIA); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -401,7 +401,7 @@ void DrasculaEngine::talk_dr_grande(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(ROJO); + color_abc(RED); if (hay_sb == 1) { sku = new Common::File; @@ -491,7 +491,7 @@ void DrasculaEngine::animation_2_1() { stopMusic(); corta_musica = 1; memset(dir_zona_pantalla, 0, 64000); - color_solo = BLANCO; + color_solo = WHITE; pause(80); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) @@ -509,7 +509,7 @@ void DrasculaEngine::animation_2_1() { FundeDelNegro(1); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - color_solo = AMARILLO; + color_solo = YELLOW; talk_solo(_text[_lang][214], "214.als"); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; @@ -594,7 +594,7 @@ void DrasculaEngine::animation_2_1() { talk_solo(_text[_lang][223], "223.als"); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - color_solo = BLANCO; + color_solo = WHITE; updateRoom(); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; @@ -983,7 +983,7 @@ void DrasculaEngine::animation_16_2() { if (key != 0) goto asco; - color_abc(VERDE_OSCURO); + color_abc(DARK_GREEN); loadPic("his1.alg"); decompressPic(dir_dibujo1, MEDIA); @@ -2379,7 +2379,7 @@ void DrasculaEngine::animation_9_6() { clearRoom(); loadPic("nota.alg"); decompressPic(dir_dibujo1, COMPLETA); - color_abc(BLANCO); + color_abc(WHITE); talk_solo(_textbj[_lang][24], "bj24.als"); talk_solo(_textbj[_lang][25], "bj25.als"); talk_solo(_textbj[_lang][26], "bj26.als"); @@ -2400,7 +2400,7 @@ void DrasculaEngine::animation_9_6() { updateRoom(); copyBackground(0, 0, 0, 0, 320, 200, dir_zona_pantalla, dir_dibujo1); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - color_abc(VERDE_CLARO); + color_abc(LIGHT_GREEN); talk_solo("GOOOOOOOOOOOOOOOL", "s15.als"); loadPic("nota2.alg"); decompressPic(dir_dibujo1, 1); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index a4ee64ae09..7ae715546c 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -135,7 +135,7 @@ int DrasculaEngine::go() { rompo = 0; rompo2 = 0; anda_a_objeto = 0; paso_x = PASO_HARE_X; paso_y = PASO_HARE_Y; - alto_hare = ALTO_PERSONAJE; ancho_hare = ANCHO_PERSONAJE; alto_pies = PIES_HARE; + alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; alto_pies = PIES_HARE; alto_talk = ALTO_TALK_HARE; ancho_talk = ANCHO_TALK_HARE; hay_respuesta = 0; conta_ciego_vez = 0; @@ -480,7 +480,7 @@ bool DrasculaEngine::escoba() { if (num_ejec != 2) { int soc = 0; for (n = 0; n < 6; n++) { - soc = soc + ANCHO_PERSONAJE; + soc = soc + CHARACTER_WIDTH; frame_x[n] = soc; } } @@ -1000,8 +1000,8 @@ martini: if (martin == 0) { paso_x = PASO_HARE_X; paso_y = PASO_HARE_Y; - alto_hare = ALTO_PERSONAJE; - ancho_hare = ANCHO_PERSONAJE; + alto_hare = CHARACTER_HEIGHT; + ancho_hare = CHARACTER_WIDTH; alto_pies = PIES_HARE; loadPic("97.alg"); decompressPic(dir_hare_dch, 1); @@ -1046,7 +1046,7 @@ martini: cambio_de_color = -1; if (num_ejec == 2) - color_abc(VERDE_CLARO); + color_abc(LIGHT_GREEN); if (num_ejec != 2) { for (l = 0; l <= suelo_y1; l++) @@ -1079,12 +1079,12 @@ martini: if (hare_x == -1) { hare_x = x_alakeva[obj_salir]; hare_y = y_alakeva[obj_salir]; - alto_hare = (ALTO_PERSONAJE * factor_red[hare_y]) / 100; - ancho_hare = (ANCHO_PERSONAJE * factor_red[hare_y]) / 100; + alto_hare = (CHARACTER_HEIGHT * factor_red[hare_y]) / 100; + ancho_hare = (CHARACTER_WIDTH * factor_red[hare_y]) / 100; hare_y = hare_y - alto_hare; } else { - alto_hare = (ALTO_PERSONAJE * factor_red[hare_y]) / 100; - ancho_hare = (ANCHO_PERSONAJE * factor_red[hare_y]) / 100; + alto_hare = (CHARACTER_HEIGHT * factor_red[hare_y]) / 100; + ancho_hare = (CHARACTER_WIDTH * factor_red[hare_y]) / 100; } hare_se_mueve = 0; } @@ -1190,10 +1190,10 @@ void DrasculaEngine::mueve_cursor() { updateRefresh(); if (!strcmp(texto_nombre, "hacker") && hay_nombre == 1) { - if (_color != ROJO && menu_scr == 0) - color_abc(ROJO); - } else if (menu_scr == 0 && _color != VERDE_CLARO) - color_abc(VERDE_CLARO); + if (_color != RED && menu_scr == 0) + color_abc(RED); + } else if (menu_scr == 0 && _color != LIGHT_GREEN) + color_abc(LIGHT_GREEN); if (hay_nombre == 1 && menu_scr == 0) centra_texto(texto_nombre, x_raton, y_raton); if (menu_scr == 1) @@ -1503,7 +1503,7 @@ bool DrasculaEngine::saves() { loadPic("savescr.alg"); decompressPic(dir_dibujo1, MEDIA); - color_abc(VERDE_CLARO); + color_abc(LIGHT_GREEN); for (;;) { y = 27; @@ -1666,7 +1666,7 @@ void DrasculaEngine::print_abc(const char *dicho, int x_pantalla, int y_pantalla else if (c == 'Z') x_de_letra = X_Z; else if (c == 0xa7 || c == ' ') - x_de_letra = ESPACIO; + x_de_letra = SPACE; else { y_de_letra = Y_SIGNOS; if (c == '.') @@ -1680,7 +1680,7 @@ void DrasculaEngine::print_abc(const char *dicho, int x_pantalla, int y_pantalla else if (c == 0xa8) x_de_letra = X_ABRE_INTERROGACION; // else if (c == '\'') // FIXME -// x_de_letra = ESPACIO; // space for now +// x_de_letra = SPACE; // space for now else if (c == '"') x_de_letra = X_COMILLAS; else if (c == '!') @@ -1757,7 +1757,7 @@ void DrasculaEngine::delay(int ms) { bool DrasculaEngine::confirma_salir() { byte key; - color_abc(ROJO); + color_abc(RED); updateRoom(); centra_texto(_textsys[_lang][1], 160, 87); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -2461,8 +2461,8 @@ void DrasculaEngine::pon_hare() { pos_hare[4] = ancho_hare; pos_hare[5] = alto_hare; } else { - pos_hare[4] = ANCHO_PERSONAJE; - pos_hare[5] = ALTO_PERSONAJE; + pos_hare[4] = CHARACTER_WIDTH; + pos_hare[5] = CHARACTER_HEIGHT; } if (sentido_hare == 0) { @@ -2500,8 +2500,8 @@ void DrasculaEngine::pon_hare() { pos_hare[4] = ancho_hare; pos_hare[5] = alto_hare; } else { - pos_hare[4] = ANCHO_PERSONAJE; - pos_hare[5] = ALTO_PERSONAJE; + pos_hare[4] = CHARACTER_WIDTH; + pos_hare[5] = CHARACTER_HEIGHT; } if (sentido_hare == 0) { pos_hare[1] = 0; @@ -3862,7 +3862,7 @@ void DrasculaEngine::conversa(const char *nom_fich) { // TODO code here should limit y position for mouse in dialog menu, // but we can't implement this due lack backend functionality // from 1(top) to 31 - color_abc(VERDE_CLARO); + color_abc(LIGHT_GREEN); bucle_opc: @@ -3882,22 +3882,22 @@ bucle_opc: MirarRaton(); if (y_raton > 0 && y_raton < 9) { - if (usado1 == 1 && _color != BLANCO) - color_abc(BLANCO); - else if (usado1 == 0 && _color != VERDE_CLARO) - color_abc(VERDE_CLARO); + if (usado1 == 1 && _color != WHITE) + color_abc(WHITE); + else if (usado1 == 0 && _color != LIGHT_GREEN) + color_abc(LIGHT_GREEN); } else if (y_raton > 8 && y_raton < 17) { - if (usado2 == 1 && _color != BLANCO) - color_abc(BLANCO); - else if (usado2 == 0 && _color != VERDE_CLARO) - color_abc(VERDE_CLARO); + if (usado2 == 1 && _color != WHITE) + color_abc(WHITE); + else if (usado2 == 0 && _color != LIGHT_GREEN) + color_abc(LIGHT_GREEN); } else if (y_raton > 16 && y_raton < 25) { - if (usado3 == 1 && _color != BLANCO) - color_abc(BLANCO); - else if (usado3 == 0 && _color != VERDE_CLARO) - color_abc(VERDE_CLARO); - } else if (_color != VERDE_CLARO) - color_abc(VERDE_CLARO); + if (usado3 == 1 && _color != WHITE) + color_abc(WHITE); + else if (usado3 == 0 && _color != LIGHT_GREEN) + color_abc(LIGHT_GREEN); + } else if (_color != LIGHT_GREEN) + color_abc(LIGHT_GREEN); if (y_raton > 0 && y_raton < 9) juego1 = 2; @@ -3947,7 +3947,7 @@ bucle_opc: if (boton_izq == 1) { delay(100); - color_abc(VERDE_CLARO); + color_abc(LIGHT_GREEN); } if (usado1 == 0) @@ -4048,7 +4048,7 @@ void DrasculaEngine::print_abc_opc(const char *dicho, int x_pantalla, int y_pant else if (c == 'Z') x_de_letra = X_Z_OPC; else if (c == ' ') - x_de_letra = ESPACIO_OPC; + x_de_letra = SPACE_OPC; else { y_de_letra = y_de_signos; if (c == '.') @@ -4062,7 +4062,7 @@ void DrasculaEngine::print_abc_opc(const char *dicho, int x_pantalla, int y_pant else if (c == 0xa8) x_de_letra = X_ABRE_INTERROGACION_OPC; // else if (c == '\'') // FIXME -// x_de_letra = ESPACIO; // space for now +// x_de_letra = SPACE; // space for now else if (c == '"') x_de_letra = X_COMILLAS_OPC; else if (c == '!') @@ -4482,7 +4482,7 @@ void DrasculaEngine::abre_puerta(int nflag, int n_puerta) { flags[nflag] = 1; } - if (n_puerta != NO_PUERTA) + if (n_puerta != NO_DOOR) puertas_cerradas(n_puerta); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -4512,7 +4512,7 @@ void DrasculaEngine::grr() { int longitud; longitud = 30; - color_abc(VERDE_OSCURO); + color_abc(DARK_GREEN); if (hay_sb == 1) { sku = new Common::File; @@ -4575,7 +4575,7 @@ void DrasculaEngine::cierra_puerta(int nflag, int n_puerta) { if (flags[nflag] == 1) { comienza_sound("s4.als"); flags[nflag] = 0; - if (n_puerta != NO_PUERTA) + if (n_puerta != NO_DOOR) puertas_cerradas(n_puerta); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 771db51095..a805206874 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -228,24 +228,24 @@ struct DrasculaGameDescription; #define X_N8 249 #define X_N9 258 #define X_N0 267 -#define ESPACIO 250 +#define SPACE 250 #define ALTO_TALK_HARE 25 #define ANCHO_TALK_HARE 23 #define VON_BRAUN 1 -#define AZUL_OSCURO 2 -#define VERDE_CLARO 3 -#define VERDE_OSCURO 4 -#define AMARILLO 5 -#define NARANJA 6 -#define ROJO 7 -#define MARRON 8 -#define MORADO 9 -#define BLANCO 10 -#define ROSA 11 +#define DARK_BLUE 2 +#define LIGHT_GREEN 3 +#define DARK_GREEN 4 +#define YELLOW 5 +#define ORANGE 6 +#define RED 7 +#define MAROON 8 +#define PURPLE 9 +#define WHITE 10 +#define PINK 11 #define PASO_HARE_X 8 #define PASO_HARE_Y 3 -#define ALTO_PERSONAJE 70 -#define ANCHO_PERSONAJE 43 +#define CHARACTER_HEIGHT 70 +#define CHARACTER_WIDTH 43 #define PIES_HARE 12 #define CHAR_WIDTH_OPC 6 @@ -283,7 +283,7 @@ struct DrasculaGameDescription; #define X_X_OPC 178 #define X_Y_OPC 185 #define X_Z_OPC 192 -#define ESPACIO_OPC 199 +#define SPACE_OPC 199 #define X_DOT_OPC 10 #define X_COMA_OPC 17 #define X_HYPHEN_OPC 24 @@ -314,7 +314,7 @@ struct DrasculaGameDescription; #define X_N8_OPC 199 #define X_N9_OPC 206 #define X_N0_OPC 213 -#define NO_PUERTA 99 +#define NO_DOOR 99 #define INIT_FRAME 0 #define CMP_RLE 1 diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 938d6906ae..bc6e3aca35 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -589,7 +589,7 @@ void DrasculaEngine::room_16(int fl) { pause(3); talk_baul(_text[_lang][83], "d83.als"); } else if (objeto_que_lleva == OPEN && fl == 183) { - abre_puerta(19, NO_PUERTA); + abre_puerta(19, NO_DOOR); if (flags[20] == 0) { flags[20] = 1; sentido_hare = 3; @@ -599,7 +599,7 @@ void DrasculaEngine::room_16(int fl) { agarra_objeto(22); } } else if (objeto_que_lleva == CLOSE && fl == 183) - cierra_puerta(19, NO_PUERTA); + cierra_puerta(19, NO_DOOR); else if (objeto_que_lleva == LOOK && fl == 185) talk(_text[_lang][37], "37.als"); else if (objeto_que_lleva == PICK && fl == 185) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index d0ae9de7ac..2053085e34 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -41,7 +41,7 @@ void DrasculaEngine::talk_igor_dch(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(BLANCO); + color_abc(WHITE); if (hay_sb == 1) { sku = new Common::File; @@ -113,7 +113,7 @@ void DrasculaEngine::talk_dr_izq(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(ROJO); + color_abc(RED); if (hay_sb == 1) { sku = new Common::File; @@ -191,7 +191,7 @@ void DrasculaEngine::talk_dr_dch(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(ROJO); + color_abc(RED); if (hay_sb == 1) { sku = new Common::File; @@ -272,7 +272,7 @@ void DrasculaEngine::talk_solo(const char *dicho, const char *filename) { if (num_ejec == 1) color_abc(color_solo); else if (num_ejec == 4) - color_abc(ROJO); + color_abc(RED); if (hay_sb == 1) { sku = new Common::File; @@ -336,7 +336,7 @@ void DrasculaEngine::talk_igor_frente(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(BLANCO); + color_abc(WHITE); if (hay_sb == 1) { sku = new Common::File; @@ -417,7 +417,7 @@ void DrasculaEngine::talk_tabernero(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(MARRON); + color_abc(MAROON); if (hay_sb == 1) { sku = new Common::File; @@ -489,7 +489,7 @@ void DrasculaEngine::talk_bj(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(BLANCO); + color_abc(WHITE); if (hay_sb == 1) { sku = new Common::File; @@ -592,10 +592,10 @@ void DrasculaEngine::talk(const char *dicho, const char *filename) { if (num_ejec == 4) { if (strcmp(num_room, "24.alg") || flags[29] == 0) { - color_abc(AMARILLO); + color_abc(YELLOW); } } else { - color_abc(AMARILLO); + color_abc(YELLOW); } if (hay_sb == 1) { sku = new Common::File; @@ -718,7 +718,7 @@ void DrasculaEngine::talk_pianista(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(BLANCO); + color_abc(WHITE); if (hay_sb == 1) { sku = new Common::File; @@ -798,7 +798,7 @@ bebiendo: goto bebiendo; } - color_abc(VERDE_OSCURO); + color_abc(DARK_GREEN); if (hay_sb == 1) { sku = new Common::File; @@ -1099,7 +1099,7 @@ void DrasculaEngine::talk_hacker(const char *dicho, const char *filename) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - color_abc(AMARILLO); + color_abc(YELLOW); if (hay_sb == 1) { sku = new Common::File; @@ -1149,7 +1149,7 @@ void DrasculaEngine::talk_lobo(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(ROJO); + color_abc(RED); if (hay_sb == 1) { sku = new Common::File; @@ -1214,7 +1214,7 @@ void DrasculaEngine::talk_mus(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(BLANCO); + color_abc(WHITE); if (hay_sb == 1) { sku = new Common::File; @@ -1285,7 +1285,7 @@ void DrasculaEngine::talk_pen(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(AMARILLO); + color_abc(YELLOW); if (hay_sb == 1) { sku = new Common::File; @@ -1354,7 +1354,7 @@ void DrasculaEngine::talk_pen2(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(AMARILLO); + color_abc(YELLOW); if (hay_sb == 1) { sku = new Common::File; @@ -1421,7 +1421,7 @@ void DrasculaEngine::talk_taber2(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(MARRON); + color_abc(MAROON); if (hay_sb == 1) { sku = new Common::File; @@ -1486,7 +1486,7 @@ void DrasculaEngine::talk_bj_cama(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(BLANCO); + color_abc(WHITE); if (hay_sb == 1) { sku = new Common::File; @@ -1552,7 +1552,7 @@ void DrasculaEngine::talk_htel(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(AMARILLO); + color_abc(YELLOW); if (hay_sb == 1) { sku = new Common::File; @@ -1616,7 +1616,7 @@ void DrasculaEngine::talk_sinc(const char *dicho, const char *filename, const ch int longitud; longitud = strlen(dicho); - color_abc(AMARILLO); + color_abc(YELLOW); if (num_ejec == 1) { if (factor_red[hare_y + alto_hare] == 100) @@ -1746,7 +1746,7 @@ void DrasculaEngine::talk_baul(const char *dicho, const char *filename) { cara_antes = flags[19]; - color_abc(MARRON); + color_abc(MAROON); if (hay_sb == 1) { sku = new Common::File; @@ -1807,7 +1807,7 @@ void DrasculaEngine::talk_igorpuerta(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(BLANCO); + color_abc(WHITE); if (hay_sb == 1){ sku = new Common::File; @@ -1860,7 +1860,7 @@ void DrasculaEngine::talk_igor_sentado(const char *dicho, const char *filename) tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(BLANCO); + color_abc(WHITE); if (hay_sb == 1) { sku = new Common::File; @@ -1925,7 +1925,7 @@ void DrasculaEngine::talk_igor_peluca(const char *dicho, const char *filename) { tiempou = (unsigned int)tiempol / 2; _rnd->setSeed(tiempou); - color_abc(BLANCO); + color_abc(WHITE); if (hay_sb == 1){ sku = new Common::File; diff --git a/engines/drascula/texts.cpp b/engines/drascula/texts.cpp index 1bc2514375..fc748c8b38 100644 --- a/engines/drascula/texts.cpp +++ b/engines/drascula/texts.cpp @@ -4279,7 +4279,7 @@ const char *_textl[][32] = { // 0 "", "UN MOMENTO. \250SOLO PORQUE PERTENECEMOS A RAZAS DISTINTAS Y LA SOCIEDAD DICE QUE SEREMOS ENEMIGOS VAMOS A DEJARNOS LLEVAR POR NUESTROS MAS PRIMITIVOS INSTINTOS?", - "\250ACASO NO NOS UNE LA RAZON, ELARMA MAS PODEROSA Y, A LA VEZ, EL DON MAS PRECIADO QUE TENEMOS?", + "\250ACASO NO NOS UNE LA RAZON, ELARMA MAS PODEPINK Y, A LA VEZ, EL DON MAS PRECIADO QUE TENEMOS?", "\255AH, SI EL ENTENDIMIENTO GUIARA NUESTROS PASOS POR LA VIDA SIN DEJAR SITIO A LOS SENTIMIENTOS, QUE AFLORAN NUESTRAS INCLINACIONES PRE-EVOLUTIVAS!", "\250NO CREES QUE SERIAMOS MAS DICHOSOS SIN ESAS ATADURAS EMOCIONALES? CONTESTA EFIMERA CRIATURA", // 5 @@ -4401,7 +4401,7 @@ const char *_textl[][32] = { // 0 "", "UN ATTIMO. PERCHE SIAMO DI DIVERSE RAZZE E LA SOCIET\265 DICA CHE SIAMO NEMICI, ANDIAMO A LASCIARCI DOMINARE PER I PI\351 PRIMITIVI ISTINTI?", - "MA NON SIAMO UNITI DALLA RAGIONE, DALLA ARMA PI\351 PODEROSA E ANCHE PER IL DONO PI\351 PREZIOSO CHE ABBIAMO?", + "MA NON SIAMO UNITI DALLA RAGIONE, DALLA ARMA PI\351 PODEPINK E ANCHE PER IL DONO PI\351 PREZIOSO CHE ABBIAMO?", "SE IL GIUDIZIO GUIDASSE I NOSTRI PASSI NELLA VITA SENZA LASCIARE POSTO AI SENTIMENTI, CHE MOSTRANO LE NOSTRE INCLINAZIONI PRE-EVOLUTIVI!", "NON CREDI CHE SAREMMO PI\351 BEATI SENZA QUESTO LEGAME EMOZIONALE? RISPONDE EFFIMERA CREATURA", // 5 @@ -4859,7 +4859,7 @@ const char *_textvb[][63] = { "OH, CLARO. TIENES RAZON, SI SIGO DURMIENDO ASI A LO MEJOR TENGO PROBLEMAS DE COLUMNA CUANDO SEA VIEJO", "BUENO, ADMITO QUE RESULTO MEJOR ADVERSARIO QUE YO, PERO MI PRINCIPAL HALLAZGO EN EL ESTUDIO DE TECNICAS ANTI-VAMPIROS FUE LO QUE ME CUBRIO LAS ESPALDAS", "DESCUBRI UNA POCION DE INMUNIDAD. TE HACE INVULNERABLE ANTE CUALQUIER MORDEDURA DE VAMPIRO, O A SUS PODERES FRSISSHNOTICOS", - "NO, PERDONA LA TUVE EN SU DIA, PERO UNA POCION DE ESAS CARACTERISTICAS ES PELIGROSA. IMAGINATE SI CAYERA EN MANOS DE UN VAMPIRO", + "NO, PERDONA LA TUVE EN SU DIA, PERO UNA POCION DE ESAS CARACTERISTICAS ES PELIGPINK. IMAGINATE SI CAYERA EN MANOS DE UN VAMPIRO", // 35 "LE HARIA INMUNE A LOS AJOS, A LA LUZ DEL SOL... ASI QUE TUVE QUE DESHACERME DE LO QUE NO USE POR EL CIENTIFICO METODO DE TIRARLO A LA TAZA DEL WATER", "TRANQUILO, ME ACUERDO PERFECTAMENTE DE COMO PREPARAR ESA POCION ", -- cgit v1.2.3 From 986f26feaed1ca7e632788b42f3838362c986a55 Mon Sep 17 00:00:00 2001 From: PaweÅ‚ KoÅ‚odziejski Date: Sun, 11 May 2008 10:59:08 +0000 Subject: ops svn-id: r32012 --- engines/drascula/texts.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/drascula/texts.cpp b/engines/drascula/texts.cpp index fc748c8b38..1bc2514375 100644 --- a/engines/drascula/texts.cpp +++ b/engines/drascula/texts.cpp @@ -4279,7 +4279,7 @@ const char *_textl[][32] = { // 0 "", "UN MOMENTO. \250SOLO PORQUE PERTENECEMOS A RAZAS DISTINTAS Y LA SOCIEDAD DICE QUE SEREMOS ENEMIGOS VAMOS A DEJARNOS LLEVAR POR NUESTROS MAS PRIMITIVOS INSTINTOS?", - "\250ACASO NO NOS UNE LA RAZON, ELARMA MAS PODEPINK Y, A LA VEZ, EL DON MAS PRECIADO QUE TENEMOS?", + "\250ACASO NO NOS UNE LA RAZON, ELARMA MAS PODEROSA Y, A LA VEZ, EL DON MAS PRECIADO QUE TENEMOS?", "\255AH, SI EL ENTENDIMIENTO GUIARA NUESTROS PASOS POR LA VIDA SIN DEJAR SITIO A LOS SENTIMIENTOS, QUE AFLORAN NUESTRAS INCLINACIONES PRE-EVOLUTIVAS!", "\250NO CREES QUE SERIAMOS MAS DICHOSOS SIN ESAS ATADURAS EMOCIONALES? CONTESTA EFIMERA CRIATURA", // 5 @@ -4401,7 +4401,7 @@ const char *_textl[][32] = { // 0 "", "UN ATTIMO. PERCHE SIAMO DI DIVERSE RAZZE E LA SOCIET\265 DICA CHE SIAMO NEMICI, ANDIAMO A LASCIARCI DOMINARE PER I PI\351 PRIMITIVI ISTINTI?", - "MA NON SIAMO UNITI DALLA RAGIONE, DALLA ARMA PI\351 PODEPINK E ANCHE PER IL DONO PI\351 PREZIOSO CHE ABBIAMO?", + "MA NON SIAMO UNITI DALLA RAGIONE, DALLA ARMA PI\351 PODEROSA E ANCHE PER IL DONO PI\351 PREZIOSO CHE ABBIAMO?", "SE IL GIUDIZIO GUIDASSE I NOSTRI PASSI NELLA VITA SENZA LASCIARE POSTO AI SENTIMENTI, CHE MOSTRANO LE NOSTRE INCLINAZIONI PRE-EVOLUTIVI!", "NON CREDI CHE SAREMMO PI\351 BEATI SENZA QUESTO LEGAME EMOZIONALE? RISPONDE EFFIMERA CREATURA", // 5 @@ -4859,7 +4859,7 @@ const char *_textvb[][63] = { "OH, CLARO. TIENES RAZON, SI SIGO DURMIENDO ASI A LO MEJOR TENGO PROBLEMAS DE COLUMNA CUANDO SEA VIEJO", "BUENO, ADMITO QUE RESULTO MEJOR ADVERSARIO QUE YO, PERO MI PRINCIPAL HALLAZGO EN EL ESTUDIO DE TECNICAS ANTI-VAMPIROS FUE LO QUE ME CUBRIO LAS ESPALDAS", "DESCUBRI UNA POCION DE INMUNIDAD. TE HACE INVULNERABLE ANTE CUALQUIER MORDEDURA DE VAMPIRO, O A SUS PODERES FRSISSHNOTICOS", - "NO, PERDONA LA TUVE EN SU DIA, PERO UNA POCION DE ESAS CARACTERISTICAS ES PELIGPINK. IMAGINATE SI CAYERA EN MANOS DE UN VAMPIRO", + "NO, PERDONA LA TUVE EN SU DIA, PERO UNA POCION DE ESAS CARACTERISTICAS ES PELIGROSA. IMAGINATE SI CAYERA EN MANOS DE UN VAMPIRO", // 35 "LE HARIA INMUNE A LOS AJOS, A LA LUZ DEL SOL... ASI QUE TUVE QUE DESHACERME DE LO QUE NO USE POR EL CIENTIFICO METODO DE TIRARLO A LA TAZA DEL WATER", "TRANQUILO, ME ACUERDO PERFECTAMENTE DE COMO PREPARAR ESA POCION ", -- cgit v1.2.3 From 4cd801e26bcc7313388c80ead6a32d0b4b93a1e8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 11 May 2008 11:11:24 +0000 Subject: - Move remaining texts to texts.cpp - Specify differences for Spanish version svn-id: r32013 --- engines/drascula/animation.cpp | 86 +++++++++++++++++++++++++--------- engines/drascula/drascula.cpp | 2 +- engines/drascula/drascula.h | 12 +++++ engines/drascula/texts.cpp | 103 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 179 insertions(+), 24 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 1cacfab453..40ef8cdddb 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -847,30 +847,30 @@ void DrasculaEngine::animation_4_2() { pause(10); - talk_ciego(_textd[_lang][68], "d68.als", "44472225500022227555544444664447222550002222755554444466"); + talk_ciego(_textd[_lang][68], "d68.als", _textd1[_lang][68 - TEXTD_START]); pause(5); talk_hacker(_textd[_lang][57], "d57.als"); pause(6); - talk_ciego(_textd[_lang][69],"d69.als","444722255000222275555444446655033336666664464402256555005504450005446"); + talk_ciego(_textd[_lang][69],"d69.als", _textd1[_lang][69 - TEXTD_START]); pause(4); talk_hacker(_textd[_lang][58],"d58.als"); - talk_ciego(_textd[_lang][70],"d70.als", "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046"); + talk_ciego(_textd[_lang][70],"d70.als", _textd1[_lang][70 - TEXTD_START]); delay(14); talk_hacker(_textd[_lang][59],"d59.als"); - talk_ciego(_textd[_lang][71],"d71.als", "550330227556444744446660004446655544444722255000222275555444446644444"); + talk_ciego(_textd[_lang][71],"d71.als", _textd1[_lang][71 - TEXTD_START]); talk_hacker(_textd[_lang][60],"d60.als"); - talk_ciego(_textd[_lang][72],"d72.als", "55033022755644455550444744400044504447222550002222755554444466000"); + talk_ciego(_textd[_lang][72],"d72.als", _textd1[_lang][72 - TEXTD_START]); talk_hacker(_textd[_lang][61],"d61.als"); - talk_ciego(_textd[_lang][73],"d73.als", "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446"); + talk_ciego(_textd[_lang][73],"d73.als", _textd1[_lang][73 - TEXTD_START]); talk_hacker(_textd[_lang][62],"d62.als"); - talk_ciego(_textd[_lang][74],"d74.als", "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666"); + talk_ciego(_textd[_lang][74],"d74.als", _textd1[_lang][74 - TEXTD_START]); talk_hacker(_textd[_lang][63],"d63.als"); - talk_ciego(_textd[_lang][75],"d75.als", "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555"); + talk_ciego(_textd[_lang][75],"d75.als", _textd1[_lang][75 - TEXTD_START]); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); _system->delayMillis(1); talk_hacker(_textd[_lang][64], "d64.als"); - talk_ciego(_textd[_lang][76], "d76.als", "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444"); + talk_ciego(_textd[_lang][76], "d76.als", _textd1[_lang][76 - TEXTD_START]); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -978,23 +978,43 @@ void DrasculaEngine::animation_16_2() { clearRoom(); - playMusic(32); + if (_lang == kSpanish) + playMusic(30); + else + playMusic(32); + int key = getscan(); if (key != 0) goto asco; - color_abc(DARK_GREEN); + if (_lang != kSpanish) + color_abc(DARK_GREEN); loadPic("his1.alg"); decompressPic(dir_dibujo1, MEDIA); + + if (_lang == kSpanish) + Negro(); + copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - centra_texto(_texthis[_lang][1], 180, 180); + + if (_lang != kSpanish) + centra_texto(_texthis[_lang][1], 180, 180); + updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + + if (_lang == kSpanish) + FundeDelNegro(1); + key = getscan(); if (key != 0) goto asco; - _system->delayMillis(4); + if (_lang == kSpanish) + _system->delayMillis(3); + else + _system->delayMillis(4); + key = getscan(); if (key != 0) goto asco; @@ -1008,13 +1028,20 @@ void DrasculaEngine::animation_16_2() { loadPic("his2.alg"); decompressPic(dir_dibujo1, MEDIA); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - centra_texto(_texthis[_lang][2], 180, 180); + + if (_lang != kSpanish) + centra_texto(_texthis[_lang][2], 180, 180); + updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); key = getscan(); if (key != 0) goto asco; - _system->delayMillis(4); + if (_lang == kSpanish) + _system->delayMillis(3); + else + _system->delayMillis(4); + key = getscan(); if (key != 0) goto asco; @@ -1028,13 +1055,20 @@ void DrasculaEngine::animation_16_2() { loadPic("his3.alg"); decompressPic(dir_dibujo1, MEDIA); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - centra_texto(_texthis[_lang][3], 180, 180); + + if (_lang != kSpanish) + centra_texto(_texthis[_lang][3], 180, 180); + updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); key = getscan(); if (key != 0) goto asco; - _system->delayMillis(4); + if (_lang == kSpanish) + _system->delayMillis(3); + else + _system->delayMillis(4); + key = getscan(); if (key != 0) goto asco; @@ -1048,13 +1082,20 @@ void DrasculaEngine::animation_16_2() { decompressPic(dir_dibujo3, 1); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo3, dir_zona_pantalla); - centra_texto(_texthis[_lang][1], 180, 180); + + if (_lang != kSpanish) + centra_texto(_texthis[_lang][1], 180, 180); + updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); key = getscan(); if (key != 0) goto asco; - _system->delayMillis(4); + if (_lang == kSpanish) + _system->delayMillis(2); + else + _system->delayMillis(4); + key = getscan(); if (key != 0) goto asco; @@ -3186,8 +3227,7 @@ void DrasculaEngine::animation_6_2() { if (flags[4] == 1) talk_hacker(_textd[_lang][66], "d66.als"); pause(6); - talk_ciego(_textd[_lang][78], "d78.als", - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777"); + talk_ciego(_textd[_lang][78], "d78.als", _textd1[_lang][78 - TEXTD_START]); pause(4); talk_hacker(_textd[_lang][67], "d67.als"); @@ -3239,12 +3279,12 @@ void DrasculaEngine::animation_33_2() { pause(10); - talk_ciego(_textd[_lang][68], "d68.als", "44472225500022227555544444472225500022227555544444664466"); + talk_ciego(_textd[_lang][68], "d68.als", _textd1[_lang][68 - TEXTD_START]); pause(5); talk_hacker(_textd[_lang][57], "d57.als"); pause(6); _system->delayMillis(1000); - talk_ciego(_textd[_lang][77], "d77.als", "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444"); + talk_ciego(_textd[_lang][77], "d77.als", _textd1[_lang][77 - TEXTD_START]); talk_hacker(_textd[_lang][65], "d65.als"); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 7ae715546c..7199173473 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -4318,7 +4318,7 @@ void DrasculaEngine::actualiza_datos() { if (!strcmp(num_room, "22.alg") && flags[27] == 1) visible[3] = 0; if (!strcmp(num_room, "26.alg") && flags[21] == 0) - strcpy(nombre_obj[2], "HUNCHBACKED"); + strcpy(nombre_obj[2], _textmisc[_lang][0]); if (!strcmp(num_room, "26.alg") && flags[18] == 1) visible[2] = 0; if (!strcmp(num_room, "26.alg") && flags[12] == 1) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index a805206874..eff9734bd8 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -48,6 +48,16 @@ namespace Drascula { enum DrasculaGameFeatures { }; +enum Languages { + kEnglish = 0, + kSpanish = 1, + kGerman = 2, + kFrench = 3, + kItalian = 4 +}; + +#define TEXTD_START 68 + struct DrasculaGameDescription; #define NUM_SAVES 10 @@ -836,6 +846,8 @@ extern const char *_textvb[][63]; extern const char *_textsys[][4]; extern const char *_texthis[][5]; extern const char *_textverbs[][6]; +extern const char *_textmisc[][1]; +extern const char *_textd1[][11]; } // End of namespace Drascula diff --git a/engines/drascula/texts.cpp b/engines/drascula/texts.cpp index 1bc2514375..6389097c1d 100644 --- a/engines/drascula/texts.cpp +++ b/engines/drascula/texts.cpp @@ -5205,6 +5205,91 @@ const char *_texthis[][5] = { }; +const char *_textd1[][11] = { +{ + // 68 + "44472225500022227555544444664447222550002222755554444466", + "444722255000222275555444446655033336666664464402256555005504450005446", + // 70 + "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", + "550330227556444744446660004446655544444722255000222275555444446644444", + "55033022755644455550444744400044504447222550002222755554444466000", + "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", + "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", + // 75 + "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", +}, +{ + // 68 + "4447222550002222755554444466", + "55033336666664464402256555005504450005446", + // 70 + "550333226220044644550044755665500440006655556666655044744656550446470046", + "74444666000444665554444444", + "5555044474440004450000", + "4444722744446664464404446554440055655022227500544446044444446", + "4447222550002222755444446666055522275550005550022200222000222666", + // 75 + "4444777444455550022220555044444446666622526644475533223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555000444555033022755644446666005204402266222003332222774440446665555005550335544444", + "5666500444555033022755555000444444444444444444444444444444" + "00222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", +}, +{ + // 68 + "44472225500022227555544444664447222550002222755554444466", + "444722255000222275555444446655033336666664464402256555005504450005446", + // 70 + "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", + "550330227556444744446660004446655544444722255000222275555444446644444", + "55033022755644455550444744400044504447222550002222755554444466000", + "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", + "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", + // 75 + "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", +}, +{ + // 68 + "44472225500022227555544444664447222550002222755554444466", + "444722255000222275555444446655033336666664464402256555005504450005446", + // 70 + "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", + "550330227556444744446660004446655544444722255000222275555444446644444", + "55033022755644455550444744400044504447222550002222755554444466000", + "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", + "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", + // 75 + "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", +}, +{ + // 68 + "44472225500022227555544444664447222550002222755554444466", + "444722255000222275555444446655033336666664464402256555005504450005446", + // 70 + "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", + "550330227556444744446660004446655544444722255000222275555444446644444", + "55033022755644455550444744400044504447222550002222755554444466000", + "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", + "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", + // 75 + "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", +}, + +}; + + const char *_textverbs[][6] = { { "look", @@ -5249,4 +5334,22 @@ const char *_textverbs[][6] = { }; +const char *_textmisc[][1] = { +{ + "HUNCHBACKED", +}, +{ + "jorobado", +}, +{ + "HUNCHBACKED", +}, +{ + "HUNCHBACKED", +}, +{ + "HUNCHBACKED", +}, +}; + } // End of namespace Drascula -- cgit v1.2.3 From 7da27cf28cb48fce13ebff907743f78dd6e75bc0 Mon Sep 17 00:00:00 2001 From: Paweł Kołodziejski Date: Sun, 11 May 2008 11:20:40 +0000 Subject: asigna_rgb -> setRGB ActualizaPaleta -> updatePalette elige_objeto -> chooseObject datos_actuales -> currentData nombre_obj -> objName nombre_icono -> iconName agarra_objeto -> pickObject abre_puerta -> openDoor con_voces -> with_voices carga_pcx -> loadPCX graba_partida -> saveGame sin_verbo -> withoutVerb actualiza_datos -> updateData svn-id: r32014 --- engines/drascula/animation.cpp | 48 +++++++-------- engines/drascula/drascula.cpp | 105 ++++++++++++++++---------------- engines/drascula/drascula.h | 27 ++++----- engines/drascula/rooms.cpp | 132 ++++++++++++++++++++--------------------- engines/drascula/talk.cpp | 54 ++++++++--------- 5 files changed, 180 insertions(+), 186 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 40ef8cdddb..ea949d4bd2 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -424,7 +424,7 @@ bucless: if (l == 7) l = 0; - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 191, 69); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -890,7 +890,7 @@ void DrasculaEngine::animation_4_2() { decompressPic(dir_hare_dch, 1); loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); - sin_verbo(); + withoutVerb(); flags[9] = 0; flags[4] = 1; @@ -1155,7 +1155,7 @@ void DrasculaEngine::animation_20_2() { talk_vbpuerta(_textvb[_lang][12], "VB12.als"); flags[18] = 0; flags[14] = 1; - abre_puerta(15, 1); + openDoor(15, 1); sal_de_la_habitacion(1); animation_23_2(); sal_de_la_habitacion(0); @@ -1315,7 +1315,7 @@ void DrasculaEngine::animation_25_2() { void DrasculaEngine::animation_27_2() { flags[22] = 1; - sin_verbo(); + withoutVerb(); resta_objeto(23); suma_objeto(11); @@ -1413,7 +1413,7 @@ void DrasculaEngine::animation_31_2() { flags[38] = 0; flags[36] = 1; - sin_verbo(); + withoutVerb(); resta_objeto(8); resta_objeto(13); resta_objeto(15); @@ -1891,7 +1891,7 @@ void DrasculaEngine::animation_2_5() { void DrasculaEngine::animation_3_5() { talk_bj(_textbj[_lang][23], "BJ23.als"); - agarra_objeto(10); + pickObject(10); rompo_y_salgo = 1; } @@ -1924,7 +1924,7 @@ void DrasculaEngine::animation_5_5(){ int vuela_x[] = {1, 63, 125, 187, 249}; int pixel_x = hare_x - 53, pixel_y = hare_y - 9; - sin_verbo(); + withoutVerb(); resta_objeto(8); lleva_al_hare(hare_x - 19, hare_y + alto_hare); @@ -1955,7 +1955,7 @@ void DrasculaEngine::animation_5_5(){ } flags[6] = 1; - actualiza_datos(); + updateData(); pause(12); loadPic("96.alg"); @@ -2024,14 +2024,14 @@ void DrasculaEngine::animation_8_5() { void DrasculaEngine::animation_9_5() { flags[4] = 1; talk(_text[_lang][401], "401.als"); - sin_verbo(); + withoutVerb(); resta_objeto(15); } void DrasculaEngine::animation_10_5() { flags[3] = 1; talk(_text[_lang][401], "401.als"); - sin_verbo(); + withoutVerb(); resta_objeto(12); } @@ -2133,7 +2133,7 @@ void DrasculaEngine::animation_12_5() { anima("frel.bin", 16); clearRoom(); hare_claro(); - ActualizaPaleta(); + updatePalette(); flags[1] = 1; @@ -2156,7 +2156,7 @@ void DrasculaEngine::animation_12_5() { hare_se_mueve = 0; hare_x = -1; obj_saliendo = 104; - sin_verbo(); + withoutVerb(); carga_escoba("57.ald"); } @@ -2360,7 +2360,7 @@ void DrasculaEngine::animation_5_6() { void DrasculaEngine::animation_6_6() { anima("rct.bin", 11); clearRoom(); - sin_verbo(); + withoutVerb(); resta_objeto(20); loadPic("96.alg"); decompressPic(dir_hare_frente, 1); @@ -2373,7 +2373,7 @@ void DrasculaEngine::animation_6_6() { rompo = 1; obj_saliendo = 104; hare_x = -1; - sin_verbo(); + withoutVerb(); carga_escoba("58.ald"); hare_se_ve = 1; sentido_hare = 1; @@ -2387,7 +2387,7 @@ void DrasculaEngine::animation_6_6() { void DrasculaEngine::animation_7_6() { flags[8] = 1; - actualiza_datos(); + updateData(); } void DrasculaEngine::animation_9_6() { @@ -2505,7 +2505,7 @@ void DrasculaEngine::animation_15_6() { void DrasculaEngine::animation_18_6() { flags[6] = 1; - sin_verbo(); + withoutVerb(); resta_objeto(21); anima("beb.bin", 10); } @@ -2620,7 +2620,7 @@ void DrasculaEngine::animation_26_2() { pause(3); } - agarra_objeto(11); + pickObject(11); resta_objeto(12); flags[11] = 0; @@ -3200,7 +3200,7 @@ void DrasculaEngine::animation_5_2() { flags[8] = 1; hare_x = hare_x - 4; talk_sinc(_text[_lang][46], "46.als", "4442444244244"); - sin_verbo(); + withoutVerb(); } void DrasculaEngine::animation_6_2() { @@ -3249,7 +3249,7 @@ void DrasculaEngine::animation_6_2() { decompressPic(dir_hare_dch, 1); loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); - sin_verbo(); + withoutVerb(); flags[9] = 0; } @@ -3305,7 +3305,7 @@ void DrasculaEngine::animation_33_2() { decompressPic(dir_hare_dch, 1); loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); - sin_verbo(); + withoutVerb(); flags[33] = 1; flags[9] = 0; @@ -3313,7 +3313,7 @@ void DrasculaEngine::animation_33_2() { void DrasculaEngine::animation_1_4() { if (flags[21] == 0) { - strcpy(nombre_obj[2], "igor"); + strcpy(objName[2], "igor"); talk(_text[_lang][275], "275.als"); updateRefresh_pre(); @@ -3383,7 +3383,7 @@ void DrasculaEngine::animation_5_4(){ hare_y = 82; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - abre_puerta(2, 0); + openDoor(2, 0); loadPic("auxigor.alg"); decompressPic(dir_hare_frente, 1); x_igor = 100; @@ -3427,7 +3427,7 @@ void DrasculaEngine::animation_6_4() { decompressPic(dir_dibujo3, 1); loadPic(num_room); decompressPic(dir_dibujo1, MEDIA); - sin_verbo(); + withoutVerb(); updateRoom(); } @@ -3447,7 +3447,7 @@ void DrasculaEngine::animation_8_4() { loadPic("96.alg"); decompressPic(dir_hare_frente, 1); - abre_puerta(7, 2); + openDoor(7, 2); } void DrasculaEngine::animation_9_4() { diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 7199173473..d16debbc21 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -163,7 +163,7 @@ int DrasculaEngine::go() { allocMemory(); hay_sb = 1; - con_voces = 0; + withVoices = 0; hay_seleccion = 0; if (num_ejec != 6) { @@ -229,10 +229,10 @@ int DrasculaEngine::go() { loadPic("95.alg"); decompressPic(dir_mesa, 1); } - memset(nombre_icono, 0, sizeof(nombre_icono)); + memset(iconName, 0, sizeof(iconName)); for (i = 0; i < 6; i++) - strcpy(nombre_icono[i + 1], _textverbs[_lang][i]); + strcpy(iconName[i + 1], _textverbs[_lang][i]); paleta_hare(); if (!escoba()) { @@ -326,9 +326,7 @@ void DrasculaEngine::loadPic(const char *NamePcc) { void DrasculaEngine::decompressPic(byte *dir_escritura, int plt) { memcpy(dir_escritura, Buffer_pcx, 64000); free(Buffer_pcx); - asigna_rgb((byte *)cPal, plt); - if (plt > 1) - funde_rgb(plt); + setRGB((byte *)cPal, plt); } void DrasculaEngine::paleta_hare() { @@ -337,7 +335,6 @@ void DrasculaEngine::paleta_hare() { for (color = 235; color < 253; color++) for (componente = 0; componente < 3; componente++) palHare[color][componente] = palJuego[color][componente]; - } void DrasculaEngine::hare_oscuro() { @@ -347,10 +344,10 @@ void DrasculaEngine::hare_oscuro() { for (componente = 0; componente < 3; componente++) palJuego[color][componente] = palHareOscuro[color][componente]; - ActualizaPaleta(); + updatePalette(); } -void DrasculaEngine::asigna_rgb(byte *dir_lectura, int plt) { +void DrasculaEngine::setRGB(byte *dir_lectura, int plt) { int x, cnt = 0; for (x = 0; x < plt; x++) { @@ -358,11 +355,9 @@ void DrasculaEngine::asigna_rgb(byte *dir_lectura, int plt) { palJuego[x][1] = dir_lectura[cnt++] / 4; palJuego[x][2] = dir_lectura[cnt++] / 4; } - ActualizaPaleta(); + updatePalette(); } -void DrasculaEngine::funde_rgb(int plt) {} - void DrasculaEngine::Negro() { int color, componente; DacPalette256 palNegra; @@ -378,7 +373,7 @@ void DrasculaEngine::Negro() { setvgapalette256((byte *)&palNegra); } -void DrasculaEngine::ActualizaPaleta() { +void DrasculaEngine::updatePalette() { setvgapalette256((byte *)&palJuego); } @@ -501,12 +496,12 @@ bool DrasculaEngine::escoba() { objetos_que_tengo[n] = n; if (num_ejec == 1) { - agarra_objeto(28); + pickObject(28); if (hay_que_load == 0) animation_1_1(); - sin_verbo(); + withoutVerb(); loadPic("2aux62.alg"); decompressPic(dir_dibujo2, 1); sentido_hare = 1; @@ -667,7 +662,7 @@ bucles: decompressPic(dir_hare_fondo, 1); menu_scr = 1; espera_soltar(); - sin_verbo(); + withoutVerb(); if (num_ejec != 3) cont_sv = 0; } @@ -729,18 +724,18 @@ bucles: if (num_ejec != 3) cont_sv = 0; } else if (key == Common::KEYCODE_F8) { - sin_verbo(); + withoutVerb(); if (num_ejec != 3) cont_sv = 0; } else if (key == Common::KEYCODE_v) { - con_voces = 1; + withVoices = 1; print_abc(_textsys[_lang][2], 96, 86); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); delay(1410); if (num_ejec != 3) cont_sv = 0; } else if (key == Common::KEYCODE_t) { - con_voces = 0; + withVoices = 0; print_abc(_textsys[_lang][3], 94, 86); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); delay(1460); @@ -765,7 +760,7 @@ bucles: goto bucles; } -void DrasculaEngine::agarra_objeto(int objeto) { +void DrasculaEngine::pickObject(int objeto) { if (num_ejec == 6) loadPic("iconsp.alg"); else if (num_ejec == 4) @@ -775,7 +770,7 @@ void DrasculaEngine::agarra_objeto(int objeto) { else loadPic("icons.alg"); decompressPic(dir_hare_fondo, 1); - elige_objeto(objeto); + chooseObject(objeto); if (num_ejec == 2) loadPic(fondo_y_menu); else @@ -783,7 +778,7 @@ void DrasculaEngine::agarra_objeto(int objeto) { decompressPic(dir_hare_fondo, 1); } -void DrasculaEngine::elige_objeto(int objeto) { +void DrasculaEngine::chooseObject(int objeto) { if (num_ejec == 5) { if (lleva_objeto == 1 && menu_scr == 0 && objeto_que_lleva != 16) suma_objeto(objeto_que_lleva); @@ -813,7 +808,7 @@ int DrasculaEngine::resta_objeto(int osj) { return 1; } -void DrasculaEngine::sin_verbo() { +void DrasculaEngine::withoutVerb() { int c = 171; if (menu_scr == 1) c = 0; @@ -841,8 +836,8 @@ bool DrasculaEngine::para_cargar(char nom_game[]) { delete ald; ald = NULL; } - carga_escoba(datos_actuales); - sin_verbo(); + carga_escoba(currentData); + withoutVerb(); return true; } @@ -882,7 +877,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { hay_nombre = 0; strcpy(para_codificar, nom_fich); - strcpy(datos_actuales, nom_fich); + strcpy(currentData, nom_fich); ald = new Common::File; ald->open(nom_fich); @@ -944,7 +939,7 @@ martini: getLine(ald, buffer, size); sscanf(buffer, "%d", &num_obj[l]); getLine(ald, buffer, size); - sscanf(buffer, "%s", nombre_obj[l]); + sscanf(buffer, "%s", objName[l]); getLine(ald, buffer, size); sscanf(buffer, "%d", &x1[l]); getLine(ald, buffer, size); @@ -1100,7 +1095,7 @@ martini: if (num_ejec == 5) hare_se_ve = 1; - actualiza_datos(); + updateData(); if (num_ejec == 1) espuerta[7] = 0; @@ -1217,7 +1212,7 @@ void DrasculaEngine::comprueba_objetos() { if (x_raton > x1[l] && y_raton > y1[l] && x_raton < x2[l] && y_raton < y2[l] && visible[l] == 1 && espuerta[l] == 0) { - strcpy(texto_nombre, nombre_obj[l]); + strcpy(texto_nombre, objName[l]); hay_nombre = 1; veo = 1; } @@ -1259,7 +1254,7 @@ void DrasculaEngine::elige_en_barra() { num_verbo = n; if (num_verbo < 1) - sin_verbo(); + withoutVerb(); else elige_verbo(num_verbo); } @@ -1991,7 +1986,7 @@ void DrasculaEngine::anima(const char *animation, int FPS) { AuxBuffOrg = (byte *)malloc(Leng); FileIn.read(AuxBuffOrg, Leng); FileIn.read(cPal, 768); - carga_pcx(AuxBuffOrg); + loadPCX(AuxBuffOrg); free(AuxBuffOrg); memcpy(VGA, AuxBuffDes, 64000); _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); @@ -2004,7 +1999,7 @@ void DrasculaEngine::anima(const char *animation, int FPS) { AuxBuffOrg = (byte *)malloc(Leng); FileIn.read(AuxBuffOrg, Leng); FileIn.read(cPal, 768); - carga_pcx(AuxBuffOrg); + loadPCX(AuxBuffOrg); free(AuxBuffOrg); for (j = 0;j < 64000; j++) { VGA[j] = AuxBuffLast[j] = AuxBuffDes[j] ^ AuxBuffLast[j]; @@ -2201,7 +2196,7 @@ bool DrasculaEngine::carga_partida(const char *nom_game) { hay_que_load = 1; return false; } - sav->read(datos_actuales, 20); + sav->read(currentData, 20); hare_x = sav->readSint32LE(); hare_y = sav->readSint32LE(); sentido_hare = sav->readSint32LE(); @@ -2317,7 +2312,7 @@ void DrasculaEngine::color_hare() { palJuego[color][componente] = palHare[color][componente]; } } - ActualizaPaleta(); + updatePalette(); } void DrasculaEngine::funde_hare(int oscuridad) { @@ -2331,7 +2326,7 @@ void DrasculaEngine::funde_hare(int oscuridad) { } } - ActualizaPaleta(); + updatePalette(); } void DrasculaEngine::paleta_hare_claro() { @@ -2360,7 +2355,7 @@ void DrasculaEngine::hare_claro() { palJuego[color][componente] = palHareClaro[color][componente]; } - ActualizaPaleta(); + updatePalette(); } void DrasculaEngine::empieza_andar() { @@ -2540,7 +2535,7 @@ void DrasculaEngine::menu_sin_volcar() { char texto_icono[13]; x = sobre_que_objeto(); - strcpy(texto_icono, nombre_icono[x]); + strcpy(texto_icono, iconName[x]); for (n = 1; n < 43; n++) { h = objetos_que_tengo[n]; @@ -2590,7 +2585,7 @@ void DrasculaEngine::saca_objeto() { espera_soltar(); if (lleva_objeto == 1) - elige_objeto(h); + chooseObject(h); } bool DrasculaEngine::sal_de_la_habitacion(int l) { @@ -2768,7 +2763,7 @@ usando_verbos: } espera_soltar(); if (lleva_objeto == 0) - sin_verbo(); + withoutVerb(); return false; } @@ -2789,7 +2784,7 @@ bool DrasculaEngine::banderas(int fl) { || (objeto_que_lleva == OPEN && fl == 22 && flags[23] == 0)) { talk(_text[_lang][164], "164.als"); flags[23] = 1; - sin_verbo(); + withoutVerb(); suma_objeto(7); suma_objeto(18); } else if (objeto_que_lleva == LOOK && fl == 22 && flags[23] == 1) @@ -2883,8 +2878,8 @@ bool DrasculaEngine::banderas(int fl) { hay_respuesta = 0; } else if (num_ejec == 4) { if ((objeto_que_lleva == 18 && fl == 19) || (objeto_que_lleva == 19 && fl == 18)) { - sin_verbo(); - elige_objeto(21); + withoutVerb(); + chooseObject(21); resta_objeto(18); resta_objeto(19); } else if ((objeto_que_lleva == 14 && fl == 19) || (objeto_que_lleva == 19 && fl == 14)) @@ -3307,7 +3302,7 @@ void DrasculaEngine::introduce_nombre() { } void DrasculaEngine::para_grabar(char nom_game[]) { - graba_partida(nom_game); + saveGame(nom_game); comienza_sound("99.als"); fin_sound(); } @@ -3496,7 +3491,7 @@ void DrasculaEngine::WaitFrameSSN() { LastFrame = LastFrame + GlobalSpeed; } -byte *DrasculaEngine::carga_pcx(byte *NamePcc) { +byte *DrasculaEngine::loadPCX(byte *NamePcc) { signed int con = 0; unsigned int X = 0; unsigned int fExit = 0; @@ -3655,7 +3650,7 @@ void DrasculaEngine::cuadrante_4() { } } -void DrasculaEngine::graba_partida(char nom_game[]) { +void DrasculaEngine::saveGame(char nom_game[]) { Common::OutSaveFile *out; int l; @@ -3663,7 +3658,7 @@ void DrasculaEngine::graba_partida(char nom_game[]) { error("no puedo abrir el archivo"); } out->writeSint32LE(num_ejec); - out->write(datos_actuales, 20); + out->write(currentData, 20); out->writeSint32LE(hare_x); out->writeSint32LE(hare_y); out->writeSint32LE(sentido_hare); @@ -3785,7 +3780,7 @@ void DrasculaEngine::conversa(const char *nom_fich) { strcpy(para_codificar, nom_fich); if (num_ejec == 5) - sin_verbo(); + withoutVerb(); ald = new Common::File; ald->open(nom_fich); @@ -3974,7 +3969,7 @@ bucle_opc: loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); if (num_ejec != 5) - sin_verbo(); + withoutVerb(); } void DrasculaEngine::print_abc_opc(const char *dicho, int x_pantalla, int y_pantalla, int juego) { @@ -4285,7 +4280,7 @@ int DrasculaEngine::LookForFree() { return _mixer->isSoundHandleActive(_soundHandle); } -void DrasculaEngine::actualiza_datos() { +void DrasculaEngine::updateData() { if (num_ejec == 1) { // nothing } else if (num_ejec == 2) { @@ -4318,7 +4313,7 @@ void DrasculaEngine::actualiza_datos() { if (!strcmp(num_room, "22.alg") && flags[27] == 1) visible[3] = 0; if (!strcmp(num_room, "26.alg") && flags[21] == 0) - strcpy(nombre_obj[2], _textmisc[_lang][0]); + strcpy(objName[2], _textmisc[_lang][0]); if (!strcmp(num_room, "26.alg") && flags[18] == 1) visible[2] = 0; if (!strcmp(num_room, "26.alg") && flags[12] == 1) @@ -4470,7 +4465,7 @@ comienza: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::abre_puerta(int nflag, int n_puerta) { +void DrasculaEngine::openDoor(int nflag, int n_puerta) { if (flags[nflag] == 0) { if (num_ejec == 1 /*|| num_ejec == 4*/) { if (nflag != 7) { @@ -4487,7 +4482,7 @@ void DrasculaEngine::abre_puerta(int nflag, int n_puerta) { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); fin_sound(); - sin_verbo(); + withoutVerb(); } } @@ -4498,7 +4493,7 @@ void DrasculaEngine::mapa() { if (x_raton > x1[l] && y_raton > y1[l] && x_raton < x2[l] && y_raton < y2[l] && visible[l] == 1) { - strcpy(texto_nombre, nombre_obj[l]); + strcpy(texto_nombre, objName[l]); hay_nombre = 1; veo = 1; } @@ -4528,7 +4523,7 @@ void DrasculaEngine::grr() { updateRoom(); copyBackground(253, 110, 150, 65, 20, 30, dir_dibujo3, dir_zona_pantalla); - if (con_voces == 0) + if (withVoices == 0) centra_texto(".groaaarrrrgghhh!", 153, 65); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -4580,7 +4575,7 @@ void DrasculaEngine::cierra_puerta(int nflag, int n_puerta) { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); fin_sound(); - sin_verbo(); + withoutVerb(); } } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index eff9734bd8..a61d7df9ab 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -372,10 +372,9 @@ public: typedef char DacPalette256[256][3]; - void asigna_rgb(byte *dir_lectura, int plt); - void funde_rgb(int plt); + void setRGB(byte *dir_lectura, int plt); void paleta_hare(); - void ActualizaPaleta(); + void updatePalette(); void setvgapalette256(byte *PalBuf); void copyBackground(int xorg, int yorg, int xdes, int ydes, int Ancho, int Alto, byte *Origen, byte *Destino); @@ -411,12 +410,12 @@ public: int hay_sb; int nivel_osc, musica_antes, musica_room; char num_room[20], roomDisk[20]; - char datos_actuales[20]; + char currentData[20]; int objs_room; char fondo_y_menu[20]; - char nombre_obj[30][20]; - char nombre_icono[44][13]; + char objName[30][20]; + char iconName[44][13]; int num_obj[40], visible[40], espuerta[40]; int sitiobj_x[40], sitiobj_y[40], sentidobj[40]; @@ -425,7 +424,7 @@ public: int x_alakeva[40], y_alakeva[40], sentido_alkeva[40], alapuertakeva[40]; int x1[40], y1[40], x2[40], y2[40]; int lleva_objeto, objeto_que_lleva; - int con_voces; + int withVoices; int menu_bar, menu_scr, hay_nombre; char texto_nombre[20]; int frame_ciego; @@ -485,13 +484,13 @@ public: void talk_vbpuerta(const char *dicho, const char *filename); void talk_ciego(const char *, const char *, const char *); void talk_hacker(const char *, const char *); - void agarra_objeto(int); + void pickObject(int); void anda_parriba(); void anda_pabajo(); void pon_vb(); void lleva_vb(int punto_x); void hipo_sin_nadie(int contador); - void abre_puerta(int nflag, int n_puerta); + void openDoor(int nflag, int n_puerta); void mapa(); void animation_1_1(); void animation_2_1(); @@ -574,7 +573,7 @@ public: void hare_oscuro(); - void sin_verbo(); + void withoutVerb(); bool para_cargar(char[]); void carga_escoba(const char *); void clearRoom(); @@ -594,7 +593,7 @@ public: void delay(int ms); bool confirma_salir(); void salva_pantallas(); - void elige_objeto(int objeto); + void chooseObject(int objeto); void suma_objeto(int); int resta_objeto(int osj); void fliplay(const char *filefli, int vel); @@ -638,7 +637,7 @@ public: void paleta_hare_claro(); void paleta_hare_oscuro(); void hare_claro(); - void actualiza_datos(); + void updateData(); void empieza_andar(); void updateRefresh(); void updateRefresh_pre(); @@ -682,7 +681,7 @@ public: int frame_pen; int flag_tv; - byte *carga_pcx(byte *NamePcc); + byte *loadPCX(byte *NamePcc); void set_dac(byte *dac); void WaitForNext(int FPS); int vez(); @@ -695,7 +694,7 @@ public: void update_62(); void update_62_pre(); void update_63(); - void graba_partida(char[]); + void saveGame(char[]); void aumenta_num_frame(); int sobre_que_objeto(); bool comprueba_banderas_menu(); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index bc6e3aca35..b7e58103ea 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -264,7 +264,7 @@ void DrasculaEngine::room_3(int fl) { updateRefresh(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(4); - agarra_objeto(10); + pickObject(10); flags[3] = 1; visible[8] = 0; } else if (objeto_que_lleva == LOOK && fl == 166) @@ -273,7 +273,7 @@ void DrasculaEngine::room_3(int fl) { talk(_text[_lang][7], "7.als"); else if (objeto_que_lleva == 14 && fl == 166 && flags[37] == 0) { animation_7_2(); - agarra_objeto(8); + pickObject(8); } else if (objeto_que_lleva == 14 && fl == 166 && flags[37] == 1) talk(_text[_lang][323], "323.als"); else if (objeto_que_lleva == LOOK && fl == 211) @@ -288,7 +288,7 @@ void DrasculaEngine::room_3(int fl) { void DrasculaEngine::room_4(int fl) { if (objeto_que_lleva == MOVE && fl == 189 && flags[34] == 0) { talk(_text[_lang][327], "327.als"); - agarra_objeto(13); + pickObject(13); flags[34] = 1; if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; @@ -342,7 +342,7 @@ void DrasculaEngine::room_6(int fl){ else if (objeto_que_lleva == LOOK && fl == 138) talk(_text[_lang][35], "35.als"); else if (objeto_que_lleva == OPEN && fl == 138) - abre_puerta(0, 1); + openDoor(0, 1); else if (objeto_que_lleva == CLOSE && fl == 138) cierra_puerta(0, 1); else if (objeto_que_lleva == TALK && fl == 138) @@ -400,7 +400,7 @@ void DrasculaEngine::room_6(int fl){ copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, dir_dibujo3, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(19); - agarra_objeto(9); + pickObject(9); visible[4] = 0; flags[10] = 1; } else if (objeto_que_lleva == OPEN && fl == 140) @@ -415,7 +415,7 @@ void DrasculaEngine::room_7(int fl){ else if (objeto_que_lleva == LOOK && fl == 164) talk(_text[_lang][35], "35.als" ); else if (objeto_que_lleva == PICK && fl == 190) { - agarra_objeto(17); + pickObject(17); flags[35] = 1; visible[3] = 0; if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) @@ -427,7 +427,7 @@ void DrasculaEngine::room_7(int fl){ void DrasculaEngine::room_8(int fl) { if (objeto_que_lleva == LOOK && fl == 147 && flags[7] == 0) { talk(_text[_lang][58], "58.als"); - agarra_objeto(15); + pickObject(15); flags[7] = 1; if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; @@ -451,7 +451,7 @@ void DrasculaEngine::room_9(int fl){ else if (objeto_que_lleva == 7 && fl == 51) { animation_6_2(); resta_objeto(7); - agarra_objeto(14);} + pickObject(14);} else hay_respuesta = 0; } @@ -472,7 +472,7 @@ void DrasculaEngine::room_12(int fl){ else if (objeto_que_lleva == TALK && fl == 156) talk(_text[_lang][50], "50.als"); else if (objeto_que_lleva == OPEN && fl == 156) - abre_puerta(16, 4); + openDoor(16, 4); else if (objeto_que_lleva == CLOSE && fl == 156) cierra_puerta(16, 4); else @@ -484,7 +484,7 @@ bool DrasculaEngine::room_13(int fl) { talk(_text[_lang][411], "411.als"); sentido_hare = 3; talk(_text[_lang][412], "412.als"); - strcpy(nombre_obj[1], "yoda"); + strcpy(objName[1], "yoda"); } else if (objeto_que_lleva == TALK && fl == 51) conversa("op_7.cal"); else if (objeto_que_lleva == 19 && fl == 51) @@ -551,12 +551,12 @@ void DrasculaEngine::room_15(int fl) { fin_sound(); talk(_text[_lang][338], "338.als"); flags[27] = 0; - agarra_objeto(19); + pickObject(19); resta_objeto(18); } else if (objeto_que_lleva == MOVE && fl == 188 && flags[27] == 0) { animation_34_2(); talk(_text[_lang][339], "339.als"); - agarra_objeto(16); + pickObject(16); flags[26] = 1; flags[27] = 1; if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) @@ -577,7 +577,7 @@ void DrasculaEngine::room_16(int fl) { if (objeto_que_lleva == TALK && fl == 163) talk(_text[_lang][6], "6.als"); else if (objeto_que_lleva == OPEN && fl == 163) - abre_puerta(17, 0); + openDoor(17, 0); else if (objeto_que_lleva == CLOSE && fl == 163) cierra_puerta(17, 0); else if (objeto_que_lleva == LOOK && fl == 183) @@ -589,14 +589,14 @@ void DrasculaEngine::room_16(int fl) { pause(3); talk_baul(_text[_lang][83], "d83.als"); } else if (objeto_que_lleva == OPEN && fl == 183) { - abre_puerta(19, NO_DOOR); + openDoor(19, NO_DOOR); if (flags[20] == 0) { flags[20] = 1; sentido_hare = 3; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk(_text[_lang][342], "342.als"); - agarra_objeto(22); + pickObject(22); } } else if (objeto_que_lleva == CLOSE && fl == 183) cierra_puerta(19, NO_DOOR); @@ -632,13 +632,13 @@ void DrasculaEngine::room_17(int fl) { else if (objeto_que_lleva == OPEN && fl == 177 && flags[14] == 0 && flags[18] == 0) animation_22_2(); else if (objeto_que_lleva == OPEN && fl == 177 && flags[14] == 1) - abre_puerta(15, 1); + openDoor(15, 1); else if (objeto_que_lleva == CLOSE && fl == 177 && flags[14] == 1) cierra_puerta(15, 1); else if (objeto_que_lleva == 11 && fl == 50 && flags[22] == 0) { talk(_text[_lang][347], "347.als"); flags[29] = 1; - agarra_objeto(23); + pickObject(23); resta_objeto(11); } else hay_respuesta = 0; @@ -658,7 +658,7 @@ void DrasculaEngine::room_18(int fl) { updateRefresh(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(4); - agarra_objeto(12); + pickObject(12); visible[2] = 0; flags[28] = 1; } else if (objeto_que_lleva == LOOK && fl == 182) @@ -695,7 +695,7 @@ void DrasculaEngine::room_18(int fl) { pause(6); talk(_text[_lang][347], "347.als"); flags[29] = 1; - agarra_objeto(23); + pickObject(23); resta_objeto(11); } else hay_respuesta = 0; @@ -712,17 +712,17 @@ bool DrasculaEngine::room_21(int fl) { if (objeto_que_lleva == OPEN && fl == 101 && flags[28] == 0) talk(_text[_lang][419], "419.als"); else if (objeto_que_lleva == OPEN && fl == 101 && flags[28] == 1) - abre_puerta(0, 1); + openDoor(0, 1); else if (objeto_que_lleva == CLOSE && fl == 101) cierra_puerta(0, 1); else if(objeto_que_lleva == PICK && fl == 141) { - agarra_objeto(19); + pickObject(19); visible[2] = 0; flags[10] = 1; } else if(objeto_que_lleva == 7 && fl == 101) { flags[28] = 1; - abre_puerta(0, 1); - sin_verbo(); + openDoor(0, 1); + withoutVerb(); } else if (objeto_que_lleva == 21 && fl == 179) { animation_9_4(); return true; @@ -736,7 +736,7 @@ void DrasculaEngine::room_22(int fl) { if (objeto_que_lleva == PICK && fl == 140) talk(_text[_lang][7], "7.als"); else if (objeto_que_lleva == 11 && fl == 140) { - agarra_objeto(18); + pickObject(18); visible[1] = 0; flags[24] = 1; } else if (objeto_que_lleva == 22 && fl == 52) { @@ -745,9 +745,9 @@ void DrasculaEngine::room_22(int fl) { comienza_sound("s1.als"); hipo(14); fin_sound(); - sin_verbo(); + withoutVerb(); resta_objeto(22); - actualiza_datos(); + updateData(); sentido_hare = 3; talk(_text[_lang][499], "499.als"); talk(_text[_lang][500], "500.als"); @@ -758,7 +758,7 @@ void DrasculaEngine::room_22(int fl) { else if (objeto_que_lleva == PICK && fl == 180 && flags[26] == 0) talk(_text[_lang][420], "420.als"); else if (objeto_que_lleva == PICK && fl == 180 && flags[26] == 1) { - agarra_objeto(7); + pickObject(7); visible[3] = 0; flags[27] = 1; } else @@ -767,17 +767,17 @@ void DrasculaEngine::room_22(int fl) { void DrasculaEngine::room_23(int fl) { if (objeto_que_lleva == OPEN && fl == 103) { - abre_puerta(0, 0); - actualiza_datos(); + openDoor(0, 0); + updateData(); } else if(objeto_que_lleva == CLOSE && fl == 103) { cierra_puerta(0, 0); - actualiza_datos(); + updateData(); } else if(objeto_que_lleva == OPEN && fl == 104) - abre_puerta(1, 1); + openDoor(1, 1); else if(objeto_que_lleva == CLOSE && fl == 104) cierra_puerta(1, 1); else if(objeto_que_lleva == PICK && fl == 142) { - agarra_objeto(8); + pickObject(8); visible[2] = 0; flags[11] = 1; if (flags[22] == 1 && flags[14] == 1) @@ -790,11 +790,11 @@ void DrasculaEngine::room_23(int fl) { void DrasculaEngine::room_24(int fl) { if (objeto_que_lleva == OPEN && fl == 105) - abre_puerta(1, 0); + openDoor(1, 0); else if (objeto_que_lleva == CLOSE && fl == 105) cierra_puerta(1, 0); else if (objeto_que_lleva == OPEN && fl == 106) - abre_puerta(2, 1); + openDoor(2, 1); else if (objeto_que_lleva == CLOSE && fl == 106) cierra_puerta(2, 1); else if (objeto_que_lleva == LOOK && fl == 151) @@ -805,7 +805,7 @@ void DrasculaEngine::room_24(int fl) { void DrasculaEngine::room_26(int fl) { if (objeto_que_lleva == OPEN && fl == 107 && flags[30] == 0) - abre_puerta(2, 0); + openDoor(2, 0); else if (objeto_que_lleva == OPEN && fl == 107 && flags[30] == 1) talk(_text[_lang][421], "421.als"); else if (objeto_que_lleva == CLOSE && fl == 107) @@ -820,7 +820,7 @@ void DrasculaEngine::room_26(int fl) { animation_5_4(); else if (objeto_que_lleva == PICK && fl == 143 && flags[18] == 1) { lleva_al_hare(260, 180); - agarra_objeto(10); + pickObject(10); visible[1] = 0; flags[12] = 1; cierra_puerta(2, 0); @@ -860,17 +860,17 @@ void DrasculaEngine::room_26(int fl) { void DrasculaEngine::room_27(int fl) { if (objeto_que_lleva == OPEN && fl == 110) - abre_puerta(6, 1); + openDoor(6, 1); else if (objeto_que_lleva == CLOSE && fl == 110) cierra_puerta(6, 1); else if (objeto_que_lleva == OPEN && fl == 116 && flags[23] == 0) talk(_text[_lang][419], "419.als"); else if (objeto_que_lleva == OPEN && fl == 116 && flags[23] == 1) - abre_puerta(5, 3); + openDoor(5, 3); else if (objeto_que_lleva == 17 && fl == 116) { flags[23] = 1; - abre_puerta(5,3); - sin_verbo(); + openDoor(5,3); + withoutVerb(); } else if (objeto_que_lleva == LOOK && fl == 175) talk(_text[_lang][429], "429.als"); else if (fl == 150) @@ -881,7 +881,7 @@ void DrasculaEngine::room_27(int fl) { void DrasculaEngine::room_29(int fl) { if (objeto_que_lleva == OPEN && fl == 114) - abre_puerta(4, 1); + openDoor(4, 1); else if (objeto_que_lleva == CLOSE && fl == 114) cierra_puerta(4, 1); else if (objeto_que_lleva == LOOK && fl == 152) @@ -900,18 +900,18 @@ void DrasculaEngine::room_29(int fl) { void DrasculaEngine::room_30(int fl) { if (objeto_que_lleva == OPEN && fl == 115) - abre_puerta(4, 0); + openDoor(4, 0); else if (objeto_que_lleva == CLOSE && fl == 115) cierra_puerta(4, 0); else if (objeto_que_lleva == OPEN && fl == 144 && flags[19] == 0) talk(_text[_lang][422], "422.als"); else if (objeto_que_lleva == OPEN && fl == 144 && flags[19] == 1 && flags[22] == 1) - abre_puerta(16, 1); + openDoor(16, 1); else if (objeto_que_lleva == OPEN && fl == 144 && flags[19] == 1 && flags[22] == 0) { - abre_puerta(16, 1); + openDoor(16, 1); talk(_text[_lang][423], "423.als"); flags[22] = 1; - agarra_objeto(12); + pickObject(12); if (flags[11] == 1 && flags[14] == 1) flags[18] = 1; if (flags[18] == 1) @@ -931,11 +931,11 @@ void DrasculaEngine::room_30(int fl) { void DrasculaEngine::room_31(int fl) { if (objeto_que_lleva == PICK && fl == 145) { - agarra_objeto(11); + pickObject(11); visible[1] = 0; flags[13] = 1; } else if (objeto_que_lleva == OPEN && fl == 117) - abre_puerta(5, 0); + openDoor(5, 0); else if (objeto_que_lleva == CLOSE && fl == 117) cierra_puerta(5, 0); else if (objeto_que_lleva == LOOK && fl == 161) @@ -954,12 +954,12 @@ void DrasculaEngine::room_34(int fl) { else if (objeto_que_lleva == PICK && fl == 146) talk(_text[_lang][459], "459.als"); else if (objeto_que_lleva == OPEN && fl == 120 && flags[25] == 1) - abre_puerta(8, 2); + openDoor(8, 2); else if (objeto_que_lleva == OPEN && fl == 120 && flags[25] == 0) { - abre_puerta(8, 2); + openDoor(8, 2); sentido_hare = 3; talk(_text[_lang][425], "425.als"); - agarra_objeto(14); + pickObject(14); flags[25] = 1; } else if (objeto_que_lleva == CLOSE && fl == 120) cierra_puerta(8, 2); @@ -969,7 +969,7 @@ void DrasculaEngine::room_34(int fl) { void DrasculaEngine::room_35(int fl) { if (objeto_que_lleva == PICK && fl == 148) { - agarra_objeto(16); + pickObject(16); visible[2] = 0; flags[14] = 1; if (flags[11] == 1 && flags[22] == 1) @@ -978,13 +978,13 @@ void DrasculaEngine::room_35(int fl) { animation_6_4(); } else if (objeto_que_lleva == PICK && fl == 147) { talk(_text[_lang][426], "426.als"); - agarra_objeto(15); + pickObject(15); visible[1] = 0; flags[15] = 1; flags[17] = 1; - actualiza_datos(); + updateData(); } else if (objeto_que_lleva == PICK && fl == 149) { - agarra_objeto(13); + pickObject(13); visible[3] = 0; flags[17] = 0; } else @@ -1019,7 +1019,7 @@ void DrasculaEngine::room_49(int fl){ void DrasculaEngine::room_53(int fl) { if (objeto_que_lleva == PICK && fl == 120) { - agarra_objeto(16); + pickObject(16); visible[3] = 0; } else if (objeto_que_lleva == LOOK && fl == 121) talk(_text[_lang][128], "128.als"); @@ -1037,11 +1037,11 @@ void DrasculaEngine::room_53(int fl) { animation_9_5(); else if (objeto_que_lleva == 16 && fl == 121) { flags[2] = 1; - sin_verbo(); - actualiza_datos(); + withoutVerb(); + updateData(); } else if (objeto_que_lleva == 16) { talk(_text[_lang][439], "439.als"); - sin_verbo(); + withoutVerb(); visible[3] = 1; } else hay_respuesta = 0; @@ -1068,10 +1068,10 @@ void DrasculaEngine::room_54(int fl) { } else if (objeto_que_lleva == TALK && fl == 53 && flags[14] == 1) talk(_text[_lang][109], "109.als"); else if (objeto_que_lleva == PICK && fl == 9999 && flags[13] == 0) { - agarra_objeto(8); + pickObject(8); flags[13] = 1; talk_mus(_texte[_lang][10], "e10.als"); - actualiza_datos(); + updateData(); } else if (objeto_que_lleva == OPEN && fl == 119) talk(_text[_lang][125], "125.als"); else if (objeto_que_lleva == LOOK && fl == 119) @@ -1079,7 +1079,7 @@ void DrasculaEngine::room_54(int fl) { else if (objeto_que_lleva == 10 && fl == 119) { pause(4); talk(_text[_lang][436], "436.als"); - sin_verbo(); + withoutVerb(); resta_objeto(10); } else hay_respuesta = 0; @@ -1087,9 +1087,9 @@ void DrasculaEngine::room_54(int fl) { void DrasculaEngine::room_55(int fl) { if (objeto_que_lleva == PICK && fl == 122) { - agarra_objeto(12); + pickObject(12); flags[8] = 1; - actualiza_datos(); + updateData(); } else if (objeto_que_lleva == LOOK && fl == 122) talk(_text[_lang][138], "138.als"); else if (objeto_que_lleva == LOOK && fl == 204) @@ -1197,7 +1197,7 @@ void DrasculaEngine::room_59(int fl) { decompressPic(dir_dibujo1, MEDIA); sentido_hare = 3; talk(_text[_lang][245], "245.als"); - sin_verbo(); + withoutVerb(); flags[11] = 1; } } else @@ -1213,7 +1213,7 @@ bool DrasculaEngine::room_60(int fl) { talk(_text[_lang][266], "266.als"); talk_taber2(_textt[_lang][1], "t1.als"); conversa("op_12.cal"); - sin_verbo(); + withoutVerb(); objeto_que_lleva = 0; } else if (objeto_que_lleva == TALK && fl == 115) talk(_text[_lang][455], "455.als"); @@ -1301,7 +1301,7 @@ void DrasculaEngine::room_pendulo(int fl) { else if (objeto_que_lleva == LOOK && fl == 101) talk (_text[_lang][123], "123.als"); else if (objeto_que_lleva == PICK && fl == 101) - agarra_objeto(20); + pickObject(20); else if (objeto_que_lleva == 20 && fl == 100) animation_6_6(); else if (objeto_que_lleva == PICK || objeto_que_lleva == OPEN) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 2053085e34..c128c073f5 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -70,7 +70,7 @@ bucless: updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, x_igor + 26, y_igor); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -147,7 +147,7 @@ bucless: updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, x_dr + 19, y_dr); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -224,7 +224,7 @@ bucless: updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, x_dr + 19, y_dr); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -290,7 +290,7 @@ void DrasculaEngine::talk_solo(const char *dicho, const char *filename) { bucless: - if (con_voces == 0) { + if (withVoices == 0) { if (num_ejec == 1) centra_texto(dicho, 156, 90); else if (num_ejec == 6) @@ -367,7 +367,7 @@ bucless: updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, x_igor + 26, y_igor); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -450,7 +450,7 @@ bucless: pon_hare(); updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 132, 45); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -518,7 +518,7 @@ bucless: pon_hare(); updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, x_bj + 7, y_bj); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -527,7 +527,7 @@ bucless: } else { updateRoom(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 93, 80); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -673,7 +673,7 @@ bucless: updateRefresh(); } - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, hare_x, hare_y); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -744,7 +744,7 @@ bucless: pon_hare(); updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 221, 128); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -823,7 +823,7 @@ bucless: pon_hare(); updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 181, 54); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -906,7 +906,7 @@ bucless: updateRefresh(); } - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, vb_x, 66); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -961,7 +961,7 @@ void DrasculaEngine::talk_vbpuerta(const char *dicho, const char *filename) { bucless: updateRoom(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 150, 80); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1062,7 +1062,7 @@ bucless: copyRectClip( pos_ciego, num_cara, dir_zona_pantalla); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 310, 71); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1113,7 +1113,7 @@ void DrasculaEngine::talk_hacker(const char *dicho, const char *filename) { } bucless: - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 156, 170); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1174,7 +1174,7 @@ bucless: pon_hare(); updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 203, 78); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1239,7 +1239,7 @@ bucless: pon_hare(); updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 197, 64); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1310,7 +1310,7 @@ bucless: updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 160, 105); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1379,7 +1379,7 @@ bucless: updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 195, 107); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1446,7 +1446,7 @@ bucless: pon_hare(); updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 132, 45); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1512,7 +1512,7 @@ bucless: pon_hare(); updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 104, 102); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1581,7 +1581,7 @@ bucless: copyBackground(x_talk[cara], 1, 45, 24, 92, 108, (byte *)num_cara, dir_zona_pantalla); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 90, 50); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1703,7 +1703,7 @@ bucless: updateRefresh(); } - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, hare_x, hare_y); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1769,7 +1769,7 @@ bucless: flags[19] = cara; updateRoom(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 263, 69); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1823,7 +1823,7 @@ void DrasculaEngine::talk_igorpuerta(const char *dicho, const char *filename) { bucless: updateRoom(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 87, 66); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1885,7 +1885,7 @@ bucless: pon_hare(); updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 221, 102); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1950,7 +1950,7 @@ bucless: pon_hare(); updateRefresh(); - if (con_voces == 0) + if (withVoices == 0) centra_texto(dicho, 221, 102); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); -- cgit v1.2.3 From 35cc3a3d19f7a4c7c9f202f749a27eb1573cfad9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 11 May 2008 11:35:12 +0000 Subject: Committed slightly modified patch #1961830 "KYRA: Scroll wheel support for Kyra 2 and 3". svn-id: r32016 --- engines/kyra/gui.cpp | 7 ++----- engines/kyra/gui.h | 5 +++-- engines/kyra/gui_v1.cpp | 26 +++++++++++++------------- engines/kyra/gui_v1.h | 5 +++-- engines/kyra/gui_v2.cpp | 10 ++++++++-- engines/kyra/gui_v2.h | 5 +++-- engines/kyra/kyra_v1.cpp | 2 +- engines/kyra/kyra_v2.cpp | 13 ++++++++++++- engines/kyra/script_v1.cpp | 2 +- 9 files changed, 46 insertions(+), 29 deletions(-) diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index 1296717467..407be7a73a 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -36,7 +36,6 @@ namespace Kyra { GUI::GUI(KyraEngine *kyra) : _vm(kyra), _screen(kyra->screen()), _text(kyra->text()) { _menuButtonList = 0; - _haveScrollButtons = false; _redrawButtonFunctor = BUTTON_FUNCTOR(GUI, this, &GUI::redrawButtonCallback); _redrawShadedButtonFunctor = BUTTON_FUNCTOR(GUI, this, &GUI::redrawShadedButtonCallback); @@ -148,13 +147,12 @@ void GUI::initMenu(Menu &menu) { } if (menu.scrollUpButtonX != -1) { - _haveScrollButtons = true; - Button *scrollUpButton = getScrollUpButton(); scrollUpButton->x = menu.scrollUpButtonX + menu.x; scrollUpButton->y = menu.scrollUpButtonY + menu.y; scrollUpButton->buttonCallback = getScrollUpButtonHandler(); scrollUpButton->nextButton = 0; + scrollUpButton->mouseWheel = -1; _menuButtonList = addButtonToList(_menuButtonList, scrollUpButton); updateMenuButton(scrollUpButton); @@ -164,11 +162,10 @@ void GUI::initMenu(Menu &menu) { scrollDownButton->y = menu.scrollDownButtonY + menu.y; scrollDownButton->buttonCallback = getScrollDownButtonHandler(); scrollDownButton->nextButton = 0; + scrollDownButton->mouseWheel = 1; _menuButtonList = addButtonToList(_menuButtonList, scrollDownButton); updateMenuButton(scrollDownButton); - } else { - _haveScrollButtons = false; } _screen->showMouse(); diff --git a/engines/kyra/gui.h b/engines/kyra/gui.h index 4e59f0ca78..8023cc4810 100644 --- a/engines/kyra/gui.h +++ b/engines/kyra/gui.h @@ -75,6 +75,8 @@ struct Button { uint16 flags2; + int8 mouseWheel; + Callback buttonCallback; }; @@ -140,7 +142,7 @@ public: virtual Button *addButtonToList(Button *list, Button *newButton); virtual void processButton(Button *button) = 0; - virtual int processButtonList(Button *buttonList, uint16 inputFlags) = 0; + virtual int processButtonList(Button *buttonList, uint16 inputFlags, int8 mouseWheel) = 0; virtual int redrawShadedButtonCallback(Button *button); virtual int redrawButtonCallback(Button *button); @@ -157,7 +159,6 @@ protected: TextDisplayer *_text; Button *_menuButtonList; - bool _haveScrollButtons; bool _displayMenu; bool _displaySubMenu; bool _cancelSubMenu; diff --git a/engines/kyra/gui_v1.cpp b/engines/kyra/gui_v1.cpp index 0c66064409..fab5db0a01 100644 --- a/engines/kyra/gui_v1.cpp +++ b/engines/kyra/gui_v1.cpp @@ -198,19 +198,19 @@ GUI_v1::~GUI_v1() { delete[] _menu; } -int GUI_v1::processButtonList(Button *list, uint16 inputFlag) { - if (_haveScrollButtons) { - if (_mouseWheel < 0) - scrollUp(&_scrollUpButton); - else if (_mouseWheel > 0) - scrollDown(&_scrollDownButton); - } +int GUI_v1::processButtonList(Button *list, uint16 inputFlag, int8 mouseWheel) { while (list) { if (list->flags & 8) { list = list->nextButton; continue; } + if (mouseWheel && list->mouseWheel == mouseWheel && list->buttonCallback) { + if ((*list->buttonCallback.get())(list)) { + break; + } + } + int x = list->x; int y = list->y; assert(_screen->getScreenDim(list->dimTableIndex) != 0); @@ -460,7 +460,7 @@ int GUI_v1::buttonMenuCallback(Button *caller) { while (_displayMenu && !_vm->_quitFlag) { Common::Point mouse = _vm->getMousePos(); processHighlights(_menu[_toplevelMenu], mouse.x, mouse.y); - processButtonList(_menuButtonList, 0); + processButtonList(_menuButtonList, 0, 0); getInput(); } @@ -584,7 +584,7 @@ int GUI_v1::saveGameMenu(Button *button) { getInput(); Common::Point mouse = _vm->getMousePos(); processHighlights(_menu[2], mouse.x, mouse.y); - processButtonList(_menuButtonList, 0); + processButtonList(_menuButtonList, 0, _mouseWheel); } _screen->loadPageFromDisk("SEENPAGE.TMP", 0); @@ -633,7 +633,7 @@ int GUI_v1::loadGameMenu(Button *button) { getInput(); Common::Point mouse = _vm->getMousePos(); processHighlights(_menu[2], mouse.x, mouse.y); - processButtonList(_menuButtonList, 0); + processButtonList(_menuButtonList, 0, _mouseWheel); } _screen->loadPageFromDisk("SEENPAGE.TMP", 0); @@ -722,7 +722,7 @@ int GUI_v1::saveGame(Button *button) { updateSavegameString(); Common::Point mouse = _vm->getMousePos(); processHighlights(_menu[3], mouse.x, mouse.y); - processButtonList(_menuButtonList, 0); + processButtonList(_menuButtonList, 0, 0); } if (_cancelSubMenu) { @@ -797,7 +797,7 @@ bool GUI_v1::quitConfirm(const char *str) { getInput(); Common::Point mouse = _vm->getMousePos(); processHighlights(_menu[1], mouse.x, mouse.y); - processButtonList(_menuButtonList, 0); + processButtonList(_menuButtonList, 0, 0); } _screen->loadPageFromDisk("SEENPAGE.TMP", 0); @@ -863,7 +863,7 @@ int GUI_v1::gameControlsMenu(Button *button) { getInput(); Common::Point mouse = _vm->getMousePos(); processHighlights(_menu[5], mouse.x, mouse.y); - processButtonList(_menuButtonList, 0); + processButtonList(_menuButtonList, 0, 0); } _screen->loadPageFromDisk("SEENPAGE.TMP", 0); diff --git a/engines/kyra/gui_v1.h b/engines/kyra/gui_v1.h index 5f6d438689..65ccad6eeb 100644 --- a/engines/kyra/gui_v1.h +++ b/engines/kyra/gui_v1.h @@ -44,7 +44,8 @@ namespace Kyra { button.y = h; \ button.width = i; \ button.height = j; \ - button.flags2 = k + button.flags2 = k; \ + button.mouseWheel = 0 #define GUI_V1_MENU(menu, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \ menu.x = a; \ @@ -93,7 +94,7 @@ public: ~GUI_v1(); void processButton(Button *button); - int processButtonList(Button *buttonList, uint16 inputFlags); + int processButtonList(Button *buttonList, uint16 inputFlags, int8 mouseWheel); int buttonMenuCallback(Button *caller); private: diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp index 300f9f116d..6ee6b1e4a5 100644 --- a/engines/kyra/gui_v2.cpp +++ b/engines/kyra/gui_v2.cpp @@ -140,7 +140,7 @@ void GUI_v2::processButton(Button *button) { _screen->updateScreen(); } -int GUI_v2::processButtonList(Button *buttonList, uint16 inputFlag) { +int GUI_v2::processButtonList(Button *buttonList, uint16 inputFlag, int8 mouseWheel) { static uint16 flagsModifier = 0; if (!buttonList) @@ -236,6 +236,12 @@ int GUI_v2::processButtonList(Button *buttonList, uint16 inputFlag) { } bool unk1 = false; + + if (mouseWheel && buttonList->mouseWheel == mouseWheel) { + progress = true; + unk1 = true; + } + if (!progress) buttonList->flags2 &= ~6; @@ -848,7 +854,7 @@ void GUI_v2::checkTextfieldInput() { } } - processButtonList(_menuButtonList, keys | 0x8000); + processButtonList(_menuButtonList, keys | 0x8000, 0); } void GUI_v2::drawTextfieldBlock(int x, int y, uint8 c) { diff --git a/engines/kyra/gui_v2.h b/engines/kyra/gui_v2.h index 55b7ee6d9a..378a3cd815 100644 --- a/engines/kyra/gui_v2.h +++ b/engines/kyra/gui_v2.h @@ -51,7 +51,8 @@ namespace Kyra { button.data1Val3 = q; \ button.data2Val2 = r; \ button.data2Val3 = s; \ - button.flags2 = t; + button.flags2 = t; \ + button.mouseWheel = 0 #define GUI_V2_MENU(menu, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \ menu.x = a; \ @@ -103,7 +104,7 @@ public: Button *addButtonToList(Button *list, Button *newButton); void processButton(Button *button); - int processButtonList(Button *button, uint16 inputFlag); + int processButtonList(Button *button, uint16 inputFlag, int8 mouseWheel); protected: void updateButton(Button *button); diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 693ea74a35..2504719ef5 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -430,7 +430,7 @@ void KyraEngine_v1::mainLoop() { _screen->showMouse(); - _gui->processButtonList(_buttonList, 0); + _gui->processButtonList(_buttonList, 0, 0); updateMousePointer(); _timer->update(); updateTextFade(); diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index a2911dec84..1e1a30dec8 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -115,6 +115,7 @@ int KyraEngine_v2::checkInput(Button *buttonList, bool mainLoop) { updateInput(); int keys = 0; + int8 mouseWheel = 0; while (_eventList.size()) { Common::Event event = *_eventList.begin(); @@ -156,6 +157,14 @@ int KyraEngine_v2::checkInput(Button *buttonList, bool mainLoop) { breakLoop = true; } break; + case Common::EVENT_WHEELUP: + mouseWheel = -1; + break; + + case Common::EVENT_WHEELDOWN: + mouseWheel = 1; + break; + default: break; } @@ -169,7 +178,7 @@ int KyraEngine_v2::checkInput(Button *buttonList, bool mainLoop) { _eventList.erase(_eventList.begin()); } - return gui_v2()->processButtonList(buttonList, keys | 0x8000); + return gui_v2()->processButtonList(buttonList, keys | 0x8000, mouseWheel); } void KyraEngine_v2::updateInput() { @@ -199,6 +208,8 @@ void KyraEngine_v2::updateInput() { // fall through case Common::EVENT_LBUTTONUP: + case Common::EVENT_WHEELUP: + case Common::EVENT_WHEELDOWN: _eventList.push_back(event); break; diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index a258482802..6eb02c7511 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -1378,7 +1378,7 @@ int KyraEngine_v1::o1_waitForConfirmationMouseClick(EMCState *script) { delay(10); } // } - _gui->processButtonList(_buttonList, 0); + _gui->processButtonList(_buttonList, 0, 0); _skipFlag = false; Common::Point mouse = getMousePos(); script->regs[1] = mouse.x; -- cgit v1.2.3 From 583e2573ab6858d27161f2cef40df1e912d0adfa Mon Sep 17 00:00:00 2001 From: Paweł Kołodziejski Date: Sun, 11 May 2008 12:47:26 +0000 Subject: Negro -> Black Destino -> dest Origen -> src Alto -> height Ancho -> width Buffer -> buffer contador -> counter dicho -> said musica_antes -> previousMusic musica_room -> roomMusic cerca -> near lejos -> far paso -> step espuerta -> isDoor svn-id: r32017 --- engines/drascula/animation.cpp | 38 ++--- engines/drascula/drascula.cpp | 374 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 54 +++--- engines/drascula/talk.cpp | 194 ++++++++++----------- 4 files changed, 330 insertions(+), 330 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index ea949d4bd2..c8c9005265 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -56,7 +56,7 @@ void DrasculaEngine::animation_1_1() { clearRoom(); loadPic("cielo.alg"); decompressPic(dir_zona_pantalla, 256); - Negro(); + black(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); FundeDelNegro(2); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) @@ -287,7 +287,7 @@ void DrasculaEngine::animation_1_1() { break; fin_sound_corte(); clearRoom(); - Negro(); + black(); playMusic(23); FundeDelNegro(0); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) @@ -387,7 +387,7 @@ void DrasculaEngine::animation_1_1() { decompressPic(dir_hare_fondo, 1); } -void DrasculaEngine::talk_dr_grande(const char *dicho, const char *filename) { +void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { int tiempou; long tiempol; int x_talk[4] = {47, 93, 139, 185}; @@ -395,7 +395,7 @@ void DrasculaEngine::talk_dr_grande(const char *dicho, const char *filename) { int l = 0; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -425,7 +425,7 @@ bucless: l = 0; if (withVoices == 0) - centra_texto(dicho, 191, 69); + centra_texto(said, 191, 69); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -504,7 +504,7 @@ void DrasculaEngine::animation_2_1() { decompressPic(dir_zona_pantalla, MEDIA); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - Negro(); + black(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); FundeDelNegro(1); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) @@ -879,7 +879,7 @@ void DrasculaEngine::animation_4_2() { clearRoom(); - playMusic(musica_room); + playMusic(roomMusic); loadPic("9.alg"); decompressPic(dir_dibujo1, MEDIA); loadPic("aux9.alg"); @@ -994,7 +994,7 @@ void DrasculaEngine::animation_16_2() { decompressPic(dir_dibujo1, MEDIA); if (_lang == kSpanish) - Negro(); + black(); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); @@ -1118,12 +1118,12 @@ asco: decompressPic(dir_dibujo3, 1); loadPic(num_room); decompressPic(dir_dibujo1, MEDIA); - Negro(); + black(); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); FundeDelNegro(0); - if (musica_room != 0) - playMusic(musica_room); + if (roomMusic != 0) + playMusic(roomMusic); else stopMusic(); } @@ -1833,7 +1833,7 @@ void DrasculaEngine::animation_4_4() { } void DrasculaEngine::animation_7_4() { - Negro(); + black(); talk(_text[_lang][427], "427.als"); FundeDelNegro(1); resta_objeto(8); @@ -2149,7 +2149,7 @@ void DrasculaEngine::animation_12_5() { lleva_al_hare(-14, 175); rompo = 1; - musica_antes = musica_room; + previousMusic = roomMusic; hare_se_ve = 1; clearRoom(); sentido_hare = 1; @@ -2282,7 +2282,7 @@ void DrasculaEngine::animation_1_6() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); delay(930); clearRoom(); - Negro(); + black(); hare_se_ve = 0; flags[0] = 0; updateRoom(); @@ -2298,7 +2298,7 @@ void DrasculaEngine::animation_1_6() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); delay(900); clearRoom(); - Negro(); + black(); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); FundeDelNegro(1); @@ -2405,7 +2405,7 @@ void DrasculaEngine::animation_9_6() { strcpy(num_room, "nada.alg"); loadPic("nota2.alg"); decompressPic(dir_dibujo1, MEDIA); - Negro(); + black(); sentido_hare = 1; hare_x -= 21; updateRoom(); @@ -2627,7 +2627,7 @@ void DrasculaEngine::animation_26_2() { flags[39] = 1; loadPic("974.alg"); decompressPic(dir_hare_dch, 1); - musica_room = 16; + roomMusic = 16; } void DrasculaEngine::animation_11_2() { @@ -3238,7 +3238,7 @@ void DrasculaEngine::animation_6_2() { clearRoom(); - playMusic(musica_room); + playMusic(roomMusic); loadPic("9.alg"); decompressPic(dir_dibujo1, MEDIA); loadPic("aux9.alg"); @@ -3294,7 +3294,7 @@ void DrasculaEngine::animation_33_2() { clearRoom(); - playMusic(musica_room); + playMusic(roomMusic); loadPic("9.alg"); decompressPic(dir_dibujo1, MEDIA); loadPic("aux9.alg"); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index d16debbc21..cfb4e0940e 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -134,7 +134,7 @@ int DrasculaEngine::go() { comprueba_flags = 1; rompo = 0; rompo2 = 0; anda_a_objeto = 0; - paso_x = PASO_HARE_X; paso_y = PASO_HARE_Y; + step_x = PASO_HARE_X; step_y = PASO_HARE_Y; alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; alto_pies = PIES_HARE; alto_talk = ALTO_TALK_HARE; ancho_talk = ANCHO_TALK_HARE; hay_respuesta = 0; @@ -253,7 +253,7 @@ void DrasculaEngine::releaseGame() { if (hay_sb == 1) ctvd_end(); clearRoom(); - Negro(); + black(); MusicFadeout(); stopMusic(); freeMemory(); @@ -358,7 +358,7 @@ void DrasculaEngine::setRGB(byte *dir_lectura, int plt) { updatePalette(); } -void DrasculaEngine::Negro() { +void DrasculaEngine::black() { int color, componente; DacPalette256 palNegra; @@ -391,74 +391,74 @@ void DrasculaEngine::setvgapalette256(byte *PalBuf) { _system->updateScreen(); } -void DrasculaEngine::copyBackground(int xorg, int yorg, int xdes, int ydes, int Ancho, - int Alto, byte *Origen, byte *Destino) { +void DrasculaEngine::copyBackground(int xorg, int yorg, int xdes, int ydes, int width, + int height, byte *src, byte *dest) { int x; - Destino += xdes + ydes * 320; - Origen += xorg + yorg * 320; - for (x = 0; x < Alto; x++) { - memcpy(Destino, Origen, Ancho); - Destino += 320; - Origen += 320; + dest += xdes + ydes * 320; + src += xorg + yorg * 320; + for (x = 0; x < height; x++) { + memcpy(dest, src, width); + dest += 320; + src += 320; } } -void DrasculaEngine::copyRect(int xorg, int yorg, int xdes, int ydes, int Ancho, - int Alto, byte *Origen, byte *Destino) { +void DrasculaEngine::copyRect(int xorg, int yorg, int xdes, int ydes, int width, + int height, byte *src, byte *dest) { int y, x; - Destino += xdes + ydes * 320; - Origen += xorg + yorg * 320; + dest += xdes + ydes * 320; + src += xorg + yorg * 320; - for (y = 0; y < Alto; y++) - for (x = 0; x < Ancho; x++) - if (Origen[x + y * 320] != 255) - Destino[x + y * 320] = Origen[x + y * 320]; + for (y = 0; y < height; y++) + for (x = 0; x < width; x++) + if (src[x + y * 320] != 255) + dest[x + y * 320] = src[x + y * 320]; } -void DrasculaEngine::copyRectClip(int *Array, byte *Origen, byte *Destino) { +void DrasculaEngine::copyRectClip(int *Array, byte *src, byte *dest) { int y, x; int xorg = Array[0]; int yorg = Array[1]; int xdes = Array[2]; int ydes = Array[3]; - int Ancho = Array[4]; - int Alto = Array[5]; + int width = Array[4]; + int height = Array[5]; if (ydes < 0) { yorg += -ydes; - Alto += ydes; + height += ydes; ydes = 0; } if (xdes < 0) { xorg += -xdes; - Ancho += xdes; + width += xdes; xdes = 0; } - if ((xdes + Ancho) > 319) - Ancho -= (xdes + Ancho) - 320; - if ((ydes + Alto) > 199) - Alto -= (ydes + Alto) - 200; + if ((xdes + width) > 319) + width -= (xdes + width) - 320; + if ((ydes + height) > 199) + height -= (ydes + height) - 200; - Destino += xdes + ydes * 320; - Origen += xorg + yorg * 320; + dest += xdes + ydes * 320; + src += xorg + yorg * 320; - for (y = 0; y < Alto; y++) - for (x = 0; x < Ancho; x++) - if (Origen[x + y * 320] != 255) - Destino[x + y * 320] = Origen[x + y * 320]; + for (y = 0; y < height; y++) + for (x = 0; x < width; x++) + if (src[x + y * 320] != 255) + dest[x + y * 320] = src[x + y * 320]; } -void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int Ancho, int Alto, byte *Buffer) { +void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *buffer) { int x; byte *ptr = VGA; ptr += xdes + ydes * 320; - Buffer += xorg + yorg * 320; - for (x = 0; x < Alto; x++) { - memcpy(ptr, Buffer, Ancho); + buffer += xorg + yorg * 320; + for (x = 0; x < height; x++) { + memcpy(ptr, buffer, width); ptr += 320; - Buffer += 320; + buffer += 320; } _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); @@ -470,7 +470,7 @@ bool DrasculaEngine::escoba() { dir_texto = dir_mesa; - musica_antes = -1; + previousMusic = -1; if (num_ejec != 2) { int soc = 0; @@ -600,8 +600,8 @@ bool DrasculaEngine::escoba() { bucles: if (hare_se_mueve == 0) { - paso_x = PASO_HARE_X; - paso_y = PASO_HARE_Y; + step_x = PASO_HARE_X; + step_y = PASO_HARE_Y; } if (hare_se_mueve == 0 && anda_a_objeto == 1) { sentido_hare = sentido_final; @@ -621,11 +621,11 @@ bucles: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); if (num_ejec == 2) { - if (musicStatus() == 0 && musica_room != 0) - playMusic(musica_room); + if (musicStatus() == 0 && roomMusic != 0) + playMusic(roomMusic); } else { if (musicStatus() == 0) - playMusic(musica_room); + playMusic(roomMusic); } MirarRaton(); @@ -826,7 +826,7 @@ void DrasculaEngine::withoutVerb() { } bool DrasculaEngine::para_cargar(char nom_game[]) { - musica_antes = musica_room; + previousMusic = roomMusic; menu_scr = 0; if (num_ejec != 1) clearRoom(); @@ -890,7 +890,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { strcat(num_room, ".alg"); getLine(ald, buffer, size); - sscanf(buffer, "%d", &musica_room); + sscanf(buffer, "%d", &roomMusic); getLine(ald, buffer, size); sscanf(buffer, "%s", roomDisk); getLine(ald, buffer, size); @@ -907,9 +907,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { getLine(ald, buffer, size); sscanf(buffer, "%d",&alto_pies); getLine(ald, buffer, size); - sscanf(buffer, "%d",&paso_x); + sscanf(buffer, "%d",&step_x); getLine(ald, buffer, size); - sscanf(buffer, "%d",&paso_y); + sscanf(buffer, "%d",&step_y); getLine(ald, buffer, size); sscanf(buffer, "%s",pant1); @@ -957,8 +957,8 @@ martini: getLine(ald, buffer, size); sscanf(buffer, "%d", &visible[l]); getLine(ald, buffer, size); - sscanf(buffer, "%d", &espuerta[l]); - if (espuerta[l] != 0) { + sscanf(buffer, "%d", &isDoor[l]); + if (isDoor[l] != 0) { getLine(ald, buffer, size); sscanf(buffer, "%s", alapantallakeva[l]); getLine(ald, buffer, size); @@ -984,17 +984,17 @@ martini: if (num_ejec != 2) { getLine(ald, buffer, size); - sscanf(buffer, "%d", &lejos); + sscanf(buffer, "%d", &far); getLine(ald, buffer, size); - sscanf(buffer, "%d", &cerca); + sscanf(buffer, "%d", &near); } delete ald; ald = NULL; if (num_ejec == 2) { if (martin == 0) { - paso_x = PASO_HARE_X; - paso_y = PASO_HARE_Y; + step_x = PASO_HARE_X; + step_y = PASO_HARE_Y; alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; alto_pies = PIES_HARE; @@ -1045,27 +1045,27 @@ martini: if (num_ejec != 2) { for (l = 0; l <= suelo_y1; l++) - factor_red[l] = lejos; + factor_red[l] = far; for (l = suelo_y1; l <= 201; l++) - factor_red[l] = cerca; + factor_red[l] = near; - chiquez = (float)(cerca - lejos) / (float)(suelo_y2 - suelo_y1); + chiquez = (float)(near - far) / (float)(suelo_y2 - suelo_y1); for (l = suelo_y1; l <= suelo_y2; l++) { - factor_red[l] = (int)(lejos + pequegnez); + factor_red[l] = (int)(far + pequegnez); pequegnez = pequegnez + chiquez; } } if (!strcmp(num_room, "24.alg")) { for (l = suelo_y1 - 1; l > 74; l--) { - factor_red[l] = (int)(lejos - pequegnez); + factor_red[l] = (int)(far - pequegnez); pequegnez = pequegnez + chiquez; } } if (num_ejec == 5 && !strcmp(num_room, "54.alg")) { for (l = suelo_y1 - 1; l > 84; l--) { - factor_red[l] = (int)(lejos - pequegnez); + factor_red[l] = (int)(far - pequegnez); pequegnez = pequegnez + chiquez; } } @@ -1098,25 +1098,25 @@ martini: updateData(); if (num_ejec == 1) - espuerta[7] = 0; + isDoor[7] = 0; if (num_ejec == 2) { if (!strcmp(num_room, "14.alg") && flags[39] == 1) - musica_room = 16; + roomMusic = 16; else if (!strcmp(num_room, "15.alg") && flags[39] == 1) - musica_room = 16; + roomMusic = 16; if (!strcmp(num_room, "14.alg") && flags[5] == 1) - musica_room = 0; + roomMusic = 0; else if (!strcmp(num_room, "15.alg") && flags[5] == 1) - musica_room = 0; + roomMusic = 0; - if (musica_antes != musica_room && musica_room != 0) - playMusic(musica_room); - if (musica_room == 0) + if (previousMusic != roomMusic && roomMusic != 0) + playMusic(roomMusic); + if (roomMusic == 0) stopMusic(); } else { - if (musica_antes != musica_room && musica_room != 0) - playMusic(musica_room); + if (previousMusic != roomMusic && roomMusic != 0) + playMusic(roomMusic); } if (num_ejec == 2) { @@ -1211,7 +1211,7 @@ void DrasculaEngine::comprueba_objetos() { for (l = 0; l < objs_room; l++) { if (x_raton > x1[l] && y_raton > y1[l] && x_raton < x2[l] && y_raton < y2[l] - && visible[l] == 1 && espuerta[l] == 0) { + && visible[l] == 1 && isDoor[l] == 0) { strcpy(texto_nombre, objName[l]); hay_nombre = 1; veo = 1; @@ -1600,14 +1600,14 @@ bool DrasculaEngine::saves() { return true; } -void DrasculaEngine::print_abc(const char *dicho, int x_pantalla, int y_pantalla) { +void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) { int pos_texto[8]; int y_de_letra = 0, x_de_letra = 0, h, longitud; - longitud = strlen(dicho); + longitud = strlen(said); for (h = 0; h < longitud; h++) { y_de_letra = Y_ABC; - int c = toupper(dicho[h]); + int c = toupper(said[h]); if (c == 'A') x_de_letra = X_A; else if (c == 'B') @@ -2107,13 +2107,13 @@ void DrasculaEngine::pon_bj() { copyRectClip(pos_bj, dir_dibujo3, dir_zona_pantalla); } -void DrasculaEngine::hipo(int contador) { +void DrasculaEngine::hipo(int counter) { int y = 0, sentido = 0; if (num_ejec == 3) y = -1; comienza: - contador--; + counter--; updateRoom(); if (num_ejec == 3) @@ -2137,7 +2137,7 @@ comienza: if (y == 0) sentido = 0; } - if (contador > 0) + if (counter > 0) goto comienza; updateRoom(); @@ -2221,86 +2221,86 @@ void DrasculaEngine::puertas_cerradas(int l) { return; else if (num_ejec == 2) { if (num_obj[l] == 138 && flags[0] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 138 && flags[0] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 136 && flags[8] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 136 && flags[8] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 156 && flags[16] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 156 && flags[16] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 163 && flags[17] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 163 && flags[17] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 177 && flags[15] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 177 && flags[15] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 175 && flags[40] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 175 && flags[40] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 173 && flags[36] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 173 && flags[36] == 1) - espuerta[l] = 1; + isDoor[l] = 1; } else if (num_ejec == 4) { if (num_obj[l] == 101 && flags[0] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 101 && flags[0] == 1 && flags[28] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 103 && flags[0] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 103 && flags[0] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 104 && flags[1] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 104 && flags[1] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 105 && flags[1] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 105 && flags[1] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 106 && flags[2] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 106 && flags[2] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 107 && flags[2] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 107 && flags[2] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 110 && flags[6] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 110 && flags[6] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 114 && flags[4] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 114 && flags[4] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 115 && flags[4] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 115 && flags[4] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 116 && flags[5] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 116 && flags[5] == 1 && flags[23] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 117 && flags[5] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 117 && flags[5] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 120 && flags[8] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 120 && flags[8] == 1) - espuerta[l] = 1; + isDoor[l] = 1; else if (num_obj[l] == 122 && flags[7] == 0) - espuerta[l] = 0; + isDoor[l] = 0; else if (num_obj[l] == 122 && flags[7] == 1) - espuerta[l] = 1; + isDoor[l] = 1; } } @@ -2361,8 +2361,8 @@ void DrasculaEngine::hare_claro() { void DrasculaEngine::empieza_andar() { hare_se_mueve = 1; - paso_x = PASO_HARE_X; - paso_y = PASO_HARE_Y; + step_x = PASO_HARE_X; + step_y = PASO_HARE_Y; if (num_ejec == 2) { if ((sitio_x < hare_x) && (sitio_y <= (hare_y + alto_hare))) @@ -2396,48 +2396,48 @@ void DrasculaEngine::pon_hare() { int pos_hare[6]; int r; - if (hare_se_mueve == 1 && paso_x == PASO_HARE_X) { - for (r = 0; r < paso_x; r++) { + if (hare_se_mueve == 1 && step_x == PASO_HARE_X) { + for (r = 0; r < step_x; r++) { if (num_ejec != 2) { if (sentido_hare == 0 && sitio_x - r == hare_x + ancho_hare / 2) { hare_se_mueve = 0; - paso_x = PASO_HARE_X; - paso_y = PASO_HARE_Y; + step_x = PASO_HARE_X; + step_y = PASO_HARE_Y; } if (sentido_hare == 1 && sitio_x + r == hare_x + ancho_hare / 2) { hare_se_mueve = 0; - paso_x = PASO_HARE_X; - paso_y = PASO_HARE_Y; + step_x = PASO_HARE_X; + step_y = PASO_HARE_Y; hare_x = sitio_x - ancho_hare / 2; hare_y = sitio_y - alto_hare; } } else if (num_ejec == 2) { if (sentido_hare == 0 && sitio_x - r == hare_x) { hare_se_mueve = 0; - paso_x = PASO_HARE_X; - paso_y = PASO_HARE_Y; + step_x = PASO_HARE_X; + step_y = PASO_HARE_Y; } if (sentido_hare == 1 && sitio_x + r == hare_x + ancho_hare) { hare_se_mueve = 0; - paso_x = PASO_HARE_X; - paso_y = PASO_HARE_Y; + step_x = PASO_HARE_X; + step_y = PASO_HARE_Y; hare_x = sitio_x - ancho_hare + 4; hare_y = sitio_y - alto_hare; } } } } - if (hare_se_mueve == 1 && paso_y == PASO_HARE_Y) { - for (r = 0; r < paso_y; r++) { + if (hare_se_mueve == 1 && step_y == PASO_HARE_Y) { + for (r = 0; r < step_y; r++) { if (sentido_hare == 2 && sitio_y - r == hare_y + alto_hare) { hare_se_mueve = 0; - paso_x = PASO_HARE_X; - paso_y = PASO_HARE_Y; + step_x = PASO_HARE_X; + step_y = PASO_HARE_Y; } if (sentido_hare == 3 && sitio_y + r == hare_y + alto_hare) { hare_se_mueve = 0; - paso_x = PASO_HARE_X; - paso_y = PASO_HARE_Y; + step_x = PASO_HARE_X; + step_y = PASO_HARE_Y; } } } @@ -2596,7 +2596,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { talk(_text[_lang][442], "442.als"); else { puertas_cerradas(l); - if (espuerta[l] != 0) { + if (isDoor[l] != 0) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); @@ -2605,7 +2605,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { sentido_hare = sentido_alkeva[l]; obj_saliendo = alapuertakeva[l]; rompo = 1; - musica_antes = musica_room; + previousMusic = roomMusic; if (num_obj[l] == 105) { animation_2_1(); @@ -2620,13 +2620,13 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { } } else if (num_ejec == 2) { puertas_cerradas(l); - if (espuerta[l] != 0) { + if (isDoor[l] != 0) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; obj_saliendo = alapuertakeva[l]; rompo = 1; - musica_antes = musica_room; + previousMusic = roomMusic; if (num_obj[l] == 136) animation_2_2(); if (num_obj[l] == 124) @@ -2653,7 +2653,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { } } else if (num_ejec == 3) { puertas_cerradas(l); - if (espuerta[l] != 0 && visible[l] == 1) { + if (isDoor[l] != 0 && visible[l] == 1) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); @@ -2662,7 +2662,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { sentido_hare = sentido_alkeva[l]; obj_saliendo = alapuertakeva[l]; rompo = 1; - musica_antes = musica_room; + previousMusic = roomMusic; clearRoom(); strcpy(salgo, alapantallakeva[l]); strcat(salgo, ".ald"); @@ -2671,7 +2671,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { } } else if (num_ejec == 4) { puertas_cerradas(l); - if (espuerta[l] != 0) { + if (isDoor[l] != 0) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); @@ -2680,7 +2680,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { sentido_hare = sentido_alkeva[l]; obj_saliendo = alapuertakeva[l]; rompo = 1; - musica_antes = musica_room; + previousMusic = roomMusic; if (num_obj[l] == 108) lleva_al_hare(171, 78); @@ -2692,7 +2692,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { } } else if (num_ejec == 5) { puertas_cerradas(l); - if (espuerta[l] != 0 && visible[l] == 1) { + if (isDoor[l] != 0 && visible[l] == 1) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); @@ -2701,7 +2701,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { sentido_hare = sentido_alkeva[l]; obj_saliendo = alapuertakeva[l]; rompo = 1; - musica_antes = musica_room; + previousMusic = roomMusic; hare_se_ve = 1; clearRoom(); strcpy(salgo, alapantallakeva[l]); @@ -2711,7 +2711,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { } } else if (num_ejec == 6) { puertas_cerradas(l); - if (espuerta[l] != 0) { + if (isDoor[l] != 0) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); @@ -2720,7 +2720,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { sentido_hare = sentido_alkeva[l]; obj_saliendo = alapuertakeva[l]; rompo = 1; - musica_antes = musica_room; + previousMusic = roomMusic; clearRoom(); strcpy(salgo, alapantallakeva[l]); strcat(salgo, ".ald"); @@ -3579,11 +3579,11 @@ void DrasculaEngine::cuadrante_1() { if (distancia_x < distancia_y) { direccion_hare = 0; sentido_hare = 2; - paso_x = (int)(distancia_x / (distancia_y / PASO_HARE_Y)); + step_x = (int)(distancia_x / (distancia_y / PASO_HARE_Y)); } else { direccion_hare = 7; sentido_hare = 0; - paso_y = (int)(distancia_y / (distancia_x / PASO_HARE_X)); + step_y = (int)(distancia_y / (distancia_x / PASO_HARE_X)); } } @@ -3600,11 +3600,11 @@ void DrasculaEngine::cuadrante_2() { if (distancia_x < distancia_y) { direccion_hare = 1; sentido_hare = 2; - paso_x = (int)(distancia_x / (distancia_y / PASO_HARE_Y)); + step_x = (int)(distancia_x / (distancia_y / PASO_HARE_Y)); } else { direccion_hare = 2; sentido_hare = 1; - paso_y = (int)(distancia_y / (distancia_x / PASO_HARE_X)); + step_y = (int)(distancia_y / (distancia_x / PASO_HARE_X)); } } @@ -3621,11 +3621,11 @@ void DrasculaEngine::cuadrante_3() { if (distancia_x < distancia_y) { direccion_hare = 5; sentido_hare = 3; - paso_x = (int)(distancia_x / (distancia_y / PASO_HARE_Y)); + step_x = (int)(distancia_x / (distancia_y / PASO_HARE_Y)); } else { direccion_hare = 6; sentido_hare = 0; - paso_y = (int)(distancia_y / (distancia_x / PASO_HARE_X)); + step_y = (int)(distancia_y / (distancia_x / PASO_HARE_X)); } } @@ -3642,11 +3642,11 @@ void DrasculaEngine::cuadrante_4() { if (distancia_x < distancia_y) { direccion_hare = 4; sentido_hare = 3; - paso_x = (int)(distancia_x / (distancia_y / PASO_HARE_Y)); + step_x = (int)(distancia_x / (distancia_y / PASO_HARE_Y)); } else { direccion_hare = 3; sentido_hare = 1; - paso_y = (int)(distancia_y / (distancia_x / PASO_HARE_X)); + step_y = (int)(distancia_y / (distancia_x / PASO_HARE_X)); } } @@ -3691,29 +3691,29 @@ void DrasculaEngine::aumenta_num_frame() { num_frame = 0; if (direccion_hare == 0) { - hare_x = hare_x - paso_x; - hare_y = hare_y - paso_y; + hare_x = hare_x - step_x; + hare_y = hare_y - step_y; } else if (direccion_hare == 7) { - hare_x = hare_x - paso_x; - hare_y = hare_y - paso_y; + hare_x = hare_x - step_x; + hare_y = hare_y - step_y; } else if (direccion_hare == 1) { - hare_x = hare_x + paso_x; - hare_y = hare_y - paso_y; + hare_x = hare_x + step_x; + hare_y = hare_y - step_y; } else if (direccion_hare == 2) { - hare_x = hare_x + paso_x; - hare_y = hare_y - paso_y; + hare_x = hare_x + step_x; + hare_y = hare_y - step_y; } else if (direccion_hare == 3) { - hare_x = hare_x + paso_x; - hare_y = hare_y + paso_y; + hare_x = hare_x + step_x; + hare_y = hare_y + step_y; } else if (direccion_hare == 4) { - hare_x = hare_x + paso_x; - hare_y = hare_y + paso_y; + hare_x = hare_x + step_x; + hare_y = hare_y + step_y; } else if (direccion_hare == 5) { - hare_x = hare_x - paso_x; - hare_y = hare_y + paso_y; + hare_x = hare_x - step_x; + hare_y = hare_y + step_y; } else if (direccion_hare == 6) { - hare_x = hare_x - paso_x; - hare_y = hare_y + paso_y; + hare_x = hare_x - step_x; + hare_y = hare_y + step_y; } } @@ -3865,13 +3865,13 @@ bucle_opc: if (num_ejec == 1 || num_ejec == 4 || num_ejec == 6) { if (musicStatus() == 0 && flags[11] == 0) - playMusic(musica_room); + playMusic(roomMusic); } else if (num_ejec == 2) { - if (musicStatus() == 0 && flags[11] == 0 && musica_room != 0) - playMusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) + playMusic(roomMusic); } else if (num_ejec == 3 || num_ejec == 5) { if (musicStatus() == 0) - playMusic(musica_room); + playMusic(roomMusic); } MirarRaton(); @@ -3972,10 +3972,10 @@ bucle_opc: withoutVerb(); } -void DrasculaEngine::print_abc_opc(const char *dicho, int x_pantalla, int y_pantalla, int juego) { +void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_pantalla, int juego) { int pos_texto[6]; int y_de_signos, y_de_letra, x_de_letra = 0, h, longitud; - longitud = strlen(dicho); + longitud = strlen(said); for (h = 0; h < longitud; h++) { if (juego == 1) { @@ -3989,7 +3989,7 @@ void DrasculaEngine::print_abc_opc(const char *dicho, int x_pantalla, int y_pant y_de_signos = Y_SIGNOS_OPC_2; } - int c = toupper(dicho[h]); + int c = toupper(said[h]); if (c == 'A') x_de_letra = X_A_OPC; else if (c == 'B') @@ -4341,11 +4341,11 @@ void DrasculaEngine::updateData() { visible[1] = 0; } else if (num_ejec == 6) { if ((!strcmp(num_room, "58.alg")) && flags[8] == 0) - espuerta[1] = 0; + isDoor[1] = 0; if ((!strcmp(num_room, "58.alg")) && flags[8] == 1) - espuerta[1] = 1; + isDoor[1] = 1; if (!strcmp(num_room, "59.alg")) - espuerta[1] = 0; + isDoor[1] = 0; if (!strcmp(num_room, "60.alg")) { sentido_dr = 0; x_dr = 155; @@ -4357,13 +4357,13 @@ void DrasculaEngine::updateData() { void DrasculaEngine::anda_pabajo() { direccion_hare = 4; sentido_hare = 3; - paso_x = 0; + step_x = 0; } void DrasculaEngine::anda_parriba() { direccion_hare = 0; sentido_hare = 2; - paso_x = 0; + step_x = 0; } void DrasculaEngine::pon_vb() { @@ -4428,13 +4428,13 @@ void DrasculaEngine::lleva_vb(int punto_x) { vb_se_mueve = 0; } -void DrasculaEngine::hipo_sin_nadie(int contador){ +void DrasculaEngine::hipo_sin_nadie(int counter){ int y = 0, sentido = 0; if (num_ejec == 3) y = -1; comienza: - contador--; + counter--; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); if (num_ejec == 3) @@ -4458,7 +4458,7 @@ comienza: if (y == 0) sentido = 0; } - if (contador > 0) + if (counter > 0) goto comienza; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index a61d7df9ab..55be93203a 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -376,12 +376,12 @@ public: void paleta_hare(); void updatePalette(); void setvgapalette256(byte *PalBuf); - void copyBackground(int xorg, int yorg, int xdes, int ydes, int Ancho, - int Alto, byte *Origen, byte *Destino); - void copyRect(int xorg, int yorg, int xdes, int ydes, int Ancho, - int Alto, byte *Origen, byte *Destino); - void copyRectClip(int *Array, byte *Origen, byte *Destino); - void updateScreen(int xorg, int yorg, int xdes, int ydes, int Ancho, int Alto, byte *Buffer); + void copyBackground(int xorg, int yorg, int xdes, int ydes, int width, + int height, byte *src, byte *dest); + void copyRect(int xorg, int yorg, int xdes, int ydes, int width, + int height, byte *src, byte *dest); + void copyRectClip(int *Array, byte *src, byte *dest); + void updateScreen(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *buffer); DacPalette256 palJuego; DacPalette256 palHare; @@ -408,7 +408,7 @@ public: Common::File *ald, *sku; int hay_sb; - int nivel_osc, musica_antes, musica_room; + int nivel_osc, previousMusic, roomMusic; char num_room[20], roomDisk[20]; char currentData[20]; int objs_room; @@ -417,7 +417,7 @@ public: char objName[30][20]; char iconName[44][13]; - int num_obj[40], visible[40], espuerta[40]; + int num_obj[40], visible[40], isDoor[40]; int sitiobj_x[40], sitiobj_y[40], sentidobj[40]; int objetos_que_tengo[43]; char alapantallakeva[40][20]; @@ -439,11 +439,11 @@ public: int hare_x, hare_y, hare_se_mueve, direccion_hare, sentido_hare, num_frame, hare_se_ve; int sitio_x, sitio_y, comprueba_flags; int rompo, rompo2; - int paso_x, paso_y; + int step_x, step_y; int alto_hare, ancho_hare, alto_pies; int alto_talk, ancho_talk; int suelo_x1, suelo_y1, suelo_x2, suelo_y2; - int cerca, lejos; + int near, far; int sentido_final, anda_a_objeto; int obj_saliendo; int diff_vez, conta_vez; @@ -479,9 +479,9 @@ public: int boton_dch; bool escoba(); - void Negro(); + void black(); void talk_vb(const char *, const char *); - void talk_vbpuerta(const char *dicho, const char *filename); + void talk_vbpuerta(const char *said, const char *filename); void talk_ciego(const char *, const char *, const char *); void talk_hacker(const char *, const char *); void pickObject(int); @@ -489,7 +489,7 @@ public: void anda_pabajo(); void pon_vb(); void lleva_vb(int punto_x); - void hipo_sin_nadie(int contador); + void hipo_sin_nadie(int counter); void openDoor(int nflag, int n_puerta); void mapa(); void animation_1_1(); @@ -606,22 +606,22 @@ public: void fin_sound_corte(); void FundeAlNegro(int VelocidadDeFundido); void pause(int); - void talk_dr_grande(const char *dicho, const char *filename); + void talk_dr_grande(const char *said, const char *filename); void pon_igor(); void pon_bj(); void pon_dr(); - void talk_igor_dch(const char *dicho, const char *filename); - void talk_dr_dch(const char *dicho, const char *filename); - void talk_dr_izq(const char *dicho, const char *filename); + void talk_igor_dch(const char *said, const char *filename); + void talk_dr_dch(const char *said, const char *filename); + void talk_dr_izq(const char *said, const char *filename); void talk_solo(const char *, const char *); void talk_igor_frente(const char *, const char *); - void talk_tabernero(const char *dicho, const char *filename); - void talk_igorpuerta(const char *dicho, const char *filename); - void talk_igor_peluca(const char *dicho, const char *filename); + void talk_tabernero(const char *said, const char *filename); + void talk_igorpuerta(const char *said, const char *filename); + void talk_igor_peluca(const char *said, const char *filename); void hipo(int); void fin_sound(); void talk_bj(const char *, const char *); - void talk_baul(const char *dicho, const char *filename); + void talk_baul(const char *said, const char *filename); void talk(const char *, const char *); void talk_sinc(const char *, const char *, const char *); void cierra_puerta(int nflag, int n_puerta); @@ -732,8 +732,8 @@ public: void conversa(const char *); void print_abc_opc(const char *, int, int, int); void responde(int); - void talk_borracho(const char *dicho, const char *filename); - void talk_pianista(const char *dicho, const char *filename); + void talk_borracho(const char *said, const char *filename); + void talk_pianista(const char *said, const char *filename); void MusicFadeout(); void ctvd_end(); @@ -791,8 +791,8 @@ public: void update_50(); void update_57(); void talk_igor_sentado(const char *, const char *); - void talk_lobo(const char *dicho, const char *filename); - void talk_mus(const char *dicho, const char *filename); + void talk_lobo(const char *said, const char *filename); + void talk_mus(const char *said, const char *filename); void room_58(int); void room_59(int); bool room_60(int); @@ -825,8 +825,8 @@ public: void talk_pen(const char *, const char *); void talk_pen2(const char *, const char *); void talk_taber2(const char *, const char *); - void talk_bj_cama(const char *dicho, const char * filename); - void talk_htel(const char *dicho, const char *filename); + void talk_bj_cama(const char *said, const char * filename); + void talk_htel(const char *said, const char *filename); private: int _lang; diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index c128c073f5..62f44c31d3 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -27,7 +27,7 @@ namespace Drascula { -void DrasculaEngine::talk_igor_dch(const char *dicho, const char *filename) { +void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { int tiempou; long tiempol; @@ -35,7 +35,7 @@ void DrasculaEngine::talk_igor_dch(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -71,7 +71,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, x_igor + 26, y_igor); + centra_texto(said, x_igor + 26, y_igor); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -99,7 +99,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_dr_izq(const char *dicho, const char *filename) { +void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { int tiempou; long tiempol; @@ -107,7 +107,7 @@ void DrasculaEngine::talk_dr_izq(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -148,7 +148,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, x_dr + 19, y_dr); + centra_texto(said, x_dr + 19, y_dr); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -177,7 +177,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_dr_dch(const char *dicho, const char *filename) { +void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { int tiempou; long tiempol; @@ -185,7 +185,7 @@ void DrasculaEngine::talk_dr_dch(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -225,7 +225,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, x_dr + 19, y_dr); + centra_texto(said, x_dr + 19, y_dr); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -258,12 +258,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_solo(const char *dicho, const char *filename) { +void DrasculaEngine::talk_solo(const char *said, const char *filename) { int tiempou; long tiempol; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -292,11 +292,11 @@ bucless: if (withVoices == 0) { if (num_ejec == 1) - centra_texto(dicho, 156, 90); + centra_texto(said, 156, 90); else if (num_ejec == 6) - centra_texto(dicho, 213, 72); + centra_texto(said, 213, 72); else if (num_ejec == 5) - centra_texto(dicho, 173, 92); + centra_texto(said, 173, 92); } updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -322,7 +322,7 @@ bucless: } } -void DrasculaEngine::talk_igor_frente(const char *dicho, const char *filename) { +void DrasculaEngine::talk_igor_frente(const char *said, const char *filename) { int tiempou; long tiempol; @@ -330,7 +330,7 @@ void DrasculaEngine::talk_igor_frente(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -368,7 +368,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, x_igor + 26, y_igor); + centra_texto(said, x_igor + 26, y_igor); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -403,7 +403,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_tabernero(const char *dicho, const char *filename) { +void DrasculaEngine::talk_tabernero(const char *said, const char *filename) { int tiempou; long tiempol; @@ -411,7 +411,7 @@ void DrasculaEngine::talk_tabernero(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -434,10 +434,10 @@ bucless: if (num_ejec == 1) { if (musicStatus() == 0) - playMusic(musica_room); + playMusic(roomMusic); } else if (num_ejec == 2) { - if (musicStatus() == 0 && flags[11] == 0 && musica_room != 0) - playMusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) + playMusic(roomMusic); } cara = _rnd->getRandomNumber(8); @@ -451,7 +451,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, 132, 45); + centra_texto(said, 132, 45); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -475,7 +475,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_bj(const char *dicho, const char *filename) { +void DrasculaEngine::talk_bj(const char *said, const char *filename) { int tiempou; long tiempol; @@ -483,7 +483,7 @@ void DrasculaEngine::talk_bj(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -519,7 +519,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, x_bj + 7, y_bj); + centra_texto(said, x_bj + 7, y_bj); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -528,7 +528,7 @@ bucless: updateRoom(); if (withVoices == 0) - centra_texto(dicho, 93, 80); + centra_texto(said, 93, 80); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } @@ -554,7 +554,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk(const char *dicho, const char *filename) { +void DrasculaEngine::talk(const char *said, const char *filename) { int tiempou; long tiempol; @@ -568,15 +568,15 @@ void DrasculaEngine::talk(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); if (num_ejec == 6) { if (flags[0] == 0 && (!strcmp(num_room, "102.alg"))) { - talk_pen(dicho, filename); + talk_pen(said, filename); return; } if (flags[0] == 0 && (!strcmp(num_room, "58.alg"))) { - talk_pen2(dicho, filename); + talk_pen2(said, filename); return; } } @@ -674,7 +674,7 @@ bucless: } if (withVoices == 0) - centra_texto(dicho, hare_x, hare_y); + centra_texto(said, hare_x, hare_y); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -702,17 +702,17 @@ bucless: if (num_ejec == 1) { if (musicStatus() == 0 && flags[11] == 0 && corta_musica == 0) - playMusic(musica_room); + playMusic(roomMusic); } } -void DrasculaEngine::talk_pianista(const char *dicho, const char *filename) { +void DrasculaEngine::talk_pianista(const char *said, const char *filename) { int tiempou; long tiempol; int x_talk[4] = { 97, 145, 193, 241 }; int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -745,7 +745,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, 221, 128); + centra_texto(said, 221, 128); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -770,14 +770,14 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_borracho(const char *dicho, const char *filename) { +void DrasculaEngine::talk_borracho(const char *said, const char *filename) { int tiempou; long tiempol; int x_talk[8] = { 1, 21, 41, 61, 81, 101, 121, 141 }; int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -824,7 +824,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, 181, 54); + centra_texto(said, 181, 54); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -856,14 +856,14 @@ bucless: if (num_ejec == 1) { if (musicStatus() == 0 && flags[11] == 0) - playMusic(musica_room); + playMusic(roomMusic); } else if (num_ejec == 2) { - if (musicStatus() == 0 && flags[11] == 0 && musica_room != 0) - playMusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) + playMusic(roomMusic); } } -void DrasculaEngine::talk_vb(const char *dicho, const char *filename) { +void DrasculaEngine::talk_vb(const char *said, const char *filename) { int tiempou; long tiempol; @@ -871,7 +871,7 @@ void DrasculaEngine::talk_vb(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -907,7 +907,7 @@ bucless: } if (withVoices == 0) - centra_texto(dicho, vb_x, 66); + centra_texto(said, vb_x, 66); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -930,16 +930,16 @@ bucless: updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - if (musicStatus() == 0 && flags[11] == 0 && musica_room != 0) - playMusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) + playMusic(roomMusic); } -void DrasculaEngine::talk_vbpuerta(const char *dicho, const char *filename) { +void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) { int tiempou; long tiempol; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -962,7 +962,7 @@ bucless: updateRoom(); if (withVoices == 0) - centra_texto(dicho, 150, 80); + centra_texto(said, 150, 80); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); int key = getscan(); @@ -982,18 +982,18 @@ bucless: updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - if (musicStatus() == 0 && flags[11] == 0 && musica_room != 0) - playMusic(musica_room); + if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) + playMusic(roomMusic); } -void DrasculaEngine::talk_ciego(const char *dicho, const char *filename, const char *sincronia) { +void DrasculaEngine::talk_ciego(const char *said, const char *filename, const char *sincronia) { byte *num_cara; int p = 0; int pos_ciego[6]; int cara = 0; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); color_abc(VON_BRAUN); @@ -1063,7 +1063,7 @@ bucless: copyRectClip( pos_ciego, num_cara, dir_zona_pantalla); if (withVoices == 0) - centra_texto(dicho, 310, 71); + centra_texto(said, 310, 71); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(2); @@ -1085,12 +1085,12 @@ bucless: } } -void DrasculaEngine::talk_hacker(const char *dicho, const char *filename) { +void DrasculaEngine::talk_hacker(const char *said, const char *filename) { int tiempou; long tiempol; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -1114,7 +1114,7 @@ void DrasculaEngine::talk_hacker(const char *dicho, const char *filename) { bucless: if (withVoices == 0) - centra_texto(dicho, 156, 170); + centra_texto(said, 156, 170); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); int key = getscan(); @@ -1135,7 +1135,7 @@ bucless: key = 0; } -void DrasculaEngine::talk_lobo(const char *dicho, const char *filename) { +void DrasculaEngine::talk_lobo(const char *said, const char *filename) { int tiempou; long tiempol; @@ -1143,7 +1143,7 @@ void DrasculaEngine::talk_lobo(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -1175,7 +1175,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, 203, 78); + centra_texto(said, 203, 78); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1200,7 +1200,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_mus(const char *dicho, const char *filename) { +void DrasculaEngine::talk_mus(const char *said, const char *filename) { int tiempou; long tiempol; @@ -1208,7 +1208,7 @@ void DrasculaEngine::talk_mus(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -1240,7 +1240,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, 197, 64); + centra_texto(said, 197, 64); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1265,7 +1265,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_pen(const char *dicho, const char *filename) { +void DrasculaEngine::talk_pen(const char *said, const char *filename) { int tiempou; long tiempol; @@ -1273,7 +1273,7 @@ void DrasculaEngine::talk_pen(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); flags[1] = 1; @@ -1311,7 +1311,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, 160, 105); + centra_texto(said, 160, 105); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1338,7 +1338,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_pen2(const char *dicho, const char *filename) { +void DrasculaEngine::talk_pen2(const char *said, const char *filename) { int tiempou; long tiempol; @@ -1346,7 +1346,7 @@ void DrasculaEngine::talk_pen2(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); flags[1] = 1; @@ -1380,7 +1380,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, 195, 107); + centra_texto(said, 195, 107); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1407,7 +1407,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_taber2(const char *dicho, const char *filename) { +void DrasculaEngine::talk_taber2(const char *said, const char *filename) { int tiempou; long tiempol; @@ -1415,7 +1415,7 @@ void DrasculaEngine::talk_taber2(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -1447,7 +1447,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, 132, 45); + centra_texto(said, 132, 45); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1472,7 +1472,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_bj_cama(const char *dicho, const char *filename) { +void DrasculaEngine::talk_bj_cama(const char *said, const char *filename) { int tiempou; long tiempol; @@ -1480,7 +1480,7 @@ void DrasculaEngine::talk_bj_cama(const char *dicho, const char *filename) { int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -1513,7 +1513,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, 104, 102); + centra_texto(said, 104, 102); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1537,7 +1537,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_htel(const char *dicho, const char *filename) { +void DrasculaEngine::talk_htel(const char *said, const char *filename) { int tiempou; long tiempol; char *num_cara; @@ -1546,7 +1546,7 @@ void DrasculaEngine::talk_htel(const char *dicho, const char *filename) { int cara, pantalla; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -1582,7 +1582,7 @@ bucless: copyBackground(x_talk[cara], 1, 45, 24, 92, 108, (byte *)num_cara, dir_zona_pantalla); if (withVoices == 0) - centra_texto(dicho, 90, 50); + centra_texto(said, 90, 50); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); @@ -1606,7 +1606,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_sinc(const char *dicho, const char *filename, const char *sincronia) { +void DrasculaEngine::talk_sinc(const char *said, const char *filename, const char *sincronia) { int suma_1_pixel = 1; int y_mask_talk = 170; int x_talk_dch[6] = {1, 25, 49, 73, 97, 121}; @@ -1614,7 +1614,7 @@ void DrasculaEngine::talk_sinc(const char *dicho, const char *filename, const ch int p, cara = 0; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); color_abc(YELLOW); @@ -1704,7 +1704,7 @@ bucless: } if (withVoices == 0) - centra_texto(dicho, hare_x, hare_y); + centra_texto(said, hare_x, hare_y); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1727,18 +1727,18 @@ bucless: } if (num_ejec == 1 && musicStatus() == 0 && flags[11] == 0) - playMusic(musica_room); - if (num_ejec == 2 && musicStatus() == 0 && flags[11] == 0 && musica_room != 0) - playMusic(musica_room); + playMusic(roomMusic); + if (num_ejec == 2 && musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) + playMusic(roomMusic); } -void DrasculaEngine::talk_baul(const char *dicho, const char *filename) { +void DrasculaEngine::talk_baul(const char *said, const char *filename) { int tiempou; long tiempol; int cara = 0, cara_antes; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -1770,7 +1770,7 @@ bucless: updateRoom(); if (withVoices == 0) - centra_texto(dicho, 263, 69); + centra_texto(said, 263, 69); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1796,12 +1796,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_igorpuerta(const char *dicho, const char *filename) { +void DrasculaEngine::talk_igorpuerta(const char *said, const char *filename) { int tiempou; long tiempol; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -1824,7 +1824,7 @@ bucless: updateRoom(); if (withVoices == 0) - centra_texto(dicho, 87, 66); + centra_texto(said, 87, 66); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); int key = getscan(); @@ -1846,7 +1846,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_igor_sentado(const char *dicho, const char *filename) { +void DrasculaEngine::talk_igor_sentado(const char *said, const char *filename) { int tiempou; long tiempol; @@ -1854,7 +1854,7 @@ void DrasculaEngine::talk_igor_sentado(const char *dicho, const char *filename) int cara; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -1886,7 +1886,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, 221, 102); + centra_texto(said, 221, 102); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1911,7 +1911,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_igor_peluca(const char *dicho, const char *filename) { +void DrasculaEngine::talk_igor_peluca(const char *said, const char *filename) { int tiempou; long tiempol; @@ -1919,7 +1919,7 @@ void DrasculaEngine::talk_igor_peluca(const char *dicho, const char *filename) { int cara = 0; int longitud; - longitud = strlen(dicho); + longitud = strlen(said); tiempol = _system->getMillis(); tiempou = (unsigned int)tiempol / 2; @@ -1951,7 +1951,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(dicho, 221, 102); + centra_texto(said, 221, 102); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); -- cgit v1.2.3 From 47e4cf17bbf25f8a09eb83ad3289a7c2e1f033db Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Sun, 11 May 2008 12:56:18 +0000 Subject: Update MSVC project files. svn-id: r32018 --- dists/msvc7/gob.vcproj | 3 +++ dists/msvc7/scummvm.vcproj | 3 +++ dists/msvc71/gob.vcproj | 3 +++ dists/msvc71/scummvm.vcproj | 3 +++ dists/msvc8/gob.vcproj | 4 ++++ dists/msvc8/scummvm.vcproj | 4 ++++ dists/msvc9/gob.vcproj | 4 ++++ dists/msvc9/scummvm.vcproj | 4 ++++ 8 files changed, 28 insertions(+) diff --git a/dists/msvc7/gob.vcproj b/dists/msvc7/gob.vcproj index c466b2b243..9f38585b8e 100644 --- a/dists/msvc7/gob.vcproj +++ b/dists/msvc7/gob.vcproj @@ -324,6 +324,9 @@ + + diff --git a/dists/msvc7/scummvm.vcproj b/dists/msvc7/scummvm.vcproj index f39a682cd9..ee10120e92 100644 --- a/dists/msvc7/scummvm.vcproj +++ b/dists/msvc7/scummvm.vcproj @@ -678,6 +678,9 @@ + + diff --git a/dists/msvc71/gob.vcproj b/dists/msvc71/gob.vcproj index cb897cb655..cdd6c4dc75 100644 --- a/dists/msvc71/gob.vcproj +++ b/dists/msvc71/gob.vcproj @@ -338,6 +338,9 @@ + + diff --git a/dists/msvc71/scummvm.vcproj b/dists/msvc71/scummvm.vcproj index 5cab91dd7f..08632490cc 100644 --- a/dists/msvc71/scummvm.vcproj +++ b/dists/msvc71/scummvm.vcproj @@ -692,6 +692,9 @@ + + diff --git a/dists/msvc8/gob.vcproj b/dists/msvc8/gob.vcproj index 560e265eec..62f7756c8a 100644 --- a/dists/msvc8/gob.vcproj +++ b/dists/msvc8/gob.vcproj @@ -464,6 +464,10 @@ RelativePath="..\..\engines\gob\saveload_v3.cpp" > + + diff --git a/dists/msvc8/scummvm.vcproj b/dists/msvc8/scummvm.vcproj index 40c455eb8a..af1c902889 100644 --- a/dists/msvc8/scummvm.vcproj +++ b/dists/msvc8/scummvm.vcproj @@ -938,6 +938,10 @@ + + diff --git a/dists/msvc9/gob.vcproj b/dists/msvc9/gob.vcproj index cb17c9f9d1..60cb8ddbc3 100644 --- a/dists/msvc9/gob.vcproj +++ b/dists/msvc9/gob.vcproj @@ -465,6 +465,10 @@ RelativePath="..\..\engines\gob\saveload_v3.cpp" > + + diff --git a/dists/msvc9/scummvm.vcproj b/dists/msvc9/scummvm.vcproj index afeafc3dd3..2fbe232089 100644 --- a/dists/msvc9/scummvm.vcproj +++ b/dists/msvc9/scummvm.vcproj @@ -943,6 +943,10 @@ + + -- cgit v1.2.3 From 5f9c53344666cb4010665123d2badf7557018a3c Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sun, 11 May 2008 12:58:54 +0000 Subject: stop music playback when skipping (parts of) the HOF intro svn-id: r32019 --- engines/kyra/sequences_hof.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index 49a5a7dc94..bed94b2ae0 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -284,6 +284,9 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { seq_sequenceCommand(cseq.finalCommand); seq_resetAllTextEntries(); + if (_abortIntroFlag || skipFlag()) + _sound->haltTrack(); + if (_flags.isDemo && !_flags.isTalkie) { if (seqNum == kSequenceDemoFisher) { _abortIntroFlag = false; -- cgit v1.2.3 From 57dfdbc6c865bfc804fd93b813982b9ca41931e4 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 11 May 2008 13:11:01 +0000 Subject: Added a sanity check to getFrame() svn-id: r32020 --- engines/made/resource.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/engines/made/resource.h b/engines/made/resource.h index 7dcae8f381..cb6e0b65f4 100644 --- a/engines/made/resource.h +++ b/engines/made/resource.h @@ -81,7 +81,14 @@ public: ~AnimationResource(); void load(byte *source, int size); int getCount() const { return _frames.size(); } - Graphics::Surface *getFrame(int index) const { return _frames[index]; } + Graphics::Surface *getFrame(int index) const { + if ((uint)index < _frames.size()) { + return _frames[index]; + } else { + warning("getFrame: Tried to obtain invalid frame %i, array has %i frames", index, _frames.size()); + return _frames[_frames.size() - 1]; + } + } uint16 getFlags() const { return _flags; } int16 getWidth() const { return _width; } int16 getHeight() const { return _height; } -- cgit v1.2.3 From 4932660f13b08aa30a88d53c1948c1df190201b7 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 11 May 2008 15:24:25 +0000 Subject: - Implemented kyra3 album (page switch animation not yet implemented) - Implemented opcode 25: o3_showAlbum svn-id: r32022 --- engines/kyra/gui_mr.cpp | 447 +++++++++++++++++++++++++++++++++++++++++++++ engines/kyra/kyra_mr.cpp | 13 ++ engines/kyra/kyra_mr.h | 55 ++++++ engines/kyra/script_mr.cpp | 8 +- engines/kyra/staticres.cpp | 10 + engines/kyra/text_mr.cpp | 133 ++++++++++++++ 6 files changed, 665 insertions(+), 1 deletion(-) diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp index a7fc742b6f..0408c68317 100644 --- a/engines/kyra/gui_mr.cpp +++ b/engines/kyra/gui_mr.cpp @@ -559,6 +559,7 @@ int KyraEngine_MR::buttonInventory(Button *button) { } int KyraEngine_MR::buttonMoodChange(Button *button) { + debugC(9, kDebugLevelMain, "KyraEngine_MR::buttonMoodChange(%p)", (const void*)button); if (queryGameFlag(0x219)) { snd_playSoundEffect(0x0D, 0xC8); return 0; @@ -626,6 +627,7 @@ int KyraEngine_MR::buttonMoodChange(Button *button) { } int KyraEngine_MR::buttonShowScore(Button *button) { + debugC(9, kDebugLevelMain, "KyraEngine_MR::buttonShowScore(%p)", (const void*)button); strcpy(_stringBuffer, (const char*)getTableEntry(_cCodeFile, 18)); char *buffer = _stringBuffer; @@ -649,6 +651,7 @@ int KyraEngine_MR::buttonShowScore(Button *button) { } int KyraEngine_MR::buttonJesterStaff(Button *button) { + debugC(9, kDebugLevelMain, "KyraEngine_MR::buttonJesterStaff(%p)", (const void*)button); makeCharFacingMouse(); if (_itemInHand == 27) { _screen->hideMouse(); @@ -679,6 +682,450 @@ int KyraEngine_MR::buttonJesterStaff(Button *button) { return 0; } +void KyraEngine_MR::showAlbum() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::showAlbum()"); + if (!_screen->isMouseVisible() || queryGameFlag(4) || _handItemSet != -1) + return; + + if (!loadLanguageFile("ALBUM.", _album.file)) + error("Couldn't load ALBUM"); + + if (!queryGameFlag(0x8B)) + _album.wsa->open("ALBMGNTH.WSA", 1, 0); + _album.backUpRect = new uint8[3100]; + assert(_album.backUpRect); + _album.backUpPage = new uint8[64000]; + assert(_album.backUpPage); + _album.nextPage = _album.curPage; + + _screen->copyRegionToBuffer(0, 0, 0, 320, 200, _screenBuffer); + _screen->copyRegionToBuffer(4, 0, 0, 320, 200, _album.backUpPage); + + memcpy(_screen->getPalette(1), _screen->getPalette(0), 768); + _screen->fadeToBlack(9); + + int itemInHand = _itemInHand; + removeHandItem(); + + _res->loadFileToBuf("ALBUM.COL", _screen->getPalette(0), 768); + loadAlbumPage(); + loadAlbumPageWSA(); + + if (_album.leftPage.wsa->opened()) { + _album.leftPage.wsa->setX(_albumWSAX[_album.nextPage+0]); + _album.leftPage.wsa->setY(_albumWSAY[_album.nextPage+0]); + _album.leftPage.wsa->setDrawPage(2); + + _album.leftPage.wsa->displayFrame(_album.leftPage.curFrame, 0x4000); + } + if (_album.rightPage.wsa->opened()) { + _album.rightPage.wsa->setX(_albumWSAX[_album.nextPage+1]); + _album.rightPage.wsa->setY(_albumWSAY[_album.nextPage+1]); + _album.rightPage.wsa->setDrawPage(2); + + _album.rightPage.wsa->displayFrame(_album.rightPage.curFrame, 0x4000); + } + + printAlbumPageText(); + _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); + _screen->fadePalette(_screen->getPalette(0), 9); + + processAlbum(); + + _screen->fadeToBlack(9); + _album.wsa->close(); + + setHandItem(itemInHand); + updateMouse(); + + restorePage3(); + _screen->copyBlockToPage(0, 0, 0, 320, 200, _screenBuffer); + _screen->copyBlockToPage(4, 0, 0, 320, 200, _album.backUpPage); + delete[] _album.backUpPage; + _album.backUpPage = 0; + + memcpy(_screen->getPalette(0), _screen->getPalette(1), 768); + _screen->fadePalette(_screen->getPalette(0), 9); + delete[] _album.file; + _album.file = 0; + + _eventList.clear(); +} + +void KyraEngine_MR::loadAlbumPage() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::loadAlbumPage()"); + + char filename[16]; + int num = _album.curPage / 2; + + if (num == 0) { + strcpy(filename, "ALBUM0.CPS"); + } else if (num >= 1 && num <= 6) { + --num; + num %= 2; + snprintf(filename, 16, "ALBUM%d.CPS", num+1); + } else { + strcpy(filename, "ALBUM3.CPS"); + } + + _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 4, Screen::CR_NO_P_CHECK); + _screen->loadBitmap(filename, 3, 3, 0); +} + +void KyraEngine_MR::loadAlbumPageWSA() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::loadAlbumPageWSA()"); + char filename[16]; + + _album.leftPage.curFrame = 0; + _album.leftPage.maxFrame = 0; + _album.leftPage.wsa->close(); + + _album.rightPage.curFrame = 0; + _album.rightPage.maxFrame = 0; + _album.rightPage.wsa->close(); + + if (_album.curPage) { + snprintf(filename, 16, "PAGE%x.WSA", _album.curPage); + _album.leftPage.wsa->open(filename, 1, 0); + _album.leftPage.maxFrame = _album.leftPage.wsa->frames()-1; + } + + if (_album.curPage != 14) { + snprintf(filename, 16, "PAGE%x.WSA", _album.curPage+1); + _album.rightPage.wsa->open(filename, 1, 0); + _album.rightPage.maxFrame = _album.leftPage.wsa->frames()-1; + } +} + +void KyraEngine_MR::printAlbumPageText() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::printAlbumPageText()"); + + static const uint8 posY[] = { + 0x41, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5A, 0x5A, + 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x5A, 0x3C + }; + + const int leftY = posY[_album.curPage]; + const int rightY = posY[_album.curPage+1]; + + for (int i = 0; i < 5; ++i) { + const char *str = (const char *)getTableEntry(_album.file, _album.curPage*5+i); + int y = i * 10 + leftY + 20; + printAlbumText(2, str, 20, y, 10); + } + + for (int i = 0; i < 5; ++i) { + const char *str = (const char *)getTableEntry(_album.file, (_album.curPage+1)*5+i); + int y = i * 10 + rightY + 20; + printAlbumText(2, str, 176, y, 10); + } + + albumBackUpRect(); +} + +void KyraEngine_MR::printAlbumText(int page, const char *str, int x, int y, uint8 c0) { + debugC(9, kDebugLevelMain, "KyraEngine_MR::printAlbumText(%d, '%s', %d, %d, %d)", page, str, x, y, c0); + int oldPage = _screen->_curPage; + _screen->_curPage = page; + + static const uint8 colorMap[] = { 0, 0x87, 0xA3, 0 }; + _screen->setTextColor(colorMap, 0, 3); + + Screen::FontId oldFont = _screen->setFont(Screen::FID_BOOKFONT_FNT); + _screen->_charWidth = -2; + + _screen->printText(str, x, y, c0, 0); + + _screen->_charWidth = 0; + _screen->setFont(oldFont); + _screen->_curPage = oldPage; +} + +void KyraEngine_MR::processAlbum() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::processAlbum()"); + Button albumButtons[5]; + + GUI_V2_BUTTON(albumButtons[0], 36, 0, 0, 1, 1, 1, 0x4487, 0, 130, 190, 10, 10, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0); + albumButtons[0].buttonCallback = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::albumPrevPage); + GUI_V2_BUTTON(albumButtons[1], 37, 0, 0, 1, 1, 1, 0x4487, 0, 177, 190, 10, 10, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0); + albumButtons[1].buttonCallback = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::albumNextPage); + GUI_V2_BUTTON(albumButtons[2], 38, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 320, 8, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0); + albumButtons[2].buttonCallback = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::albumClose); + GUI_V2_BUTTON(albumButtons[3], 39, 0, 0, 1, 1, 1, 0x4487, 0, 8, 8, 144, 180, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0); + albumButtons[3].buttonCallback = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::albumPrevPage); + GUI_V2_BUTTON(albumButtons[4], 40, 0, 0, 1, 1, 1, 0x4487, 0, 170, 8, 142, 180, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0); + albumButtons[4].buttonCallback = BUTTON_FUNCTOR(KyraEngine_MR, this, &KyraEngine_MR::albumNextPage); + + Button *buttonList = 0; + for (int i = 0; i < 5; ++i) + buttonList = _gui->addButtonToList(buttonList, &albumButtons[i]); + + _album.leftPage.timer = _album.rightPage.timer = _system->getMillis(); + albumNewPage(); + _album.running = true; + + while (_album.running && !_quitFlag) { + updateInput(); + checkInput(buttonList); + removeInputTop(); + + musicUpdate(0); + + if (_album.curPage != _album.nextPage) { + int oldPage = _album.curPage; + _album.curPage = _album.nextPage; + + _album.leftPage.wsa->close(); + _album.rightPage.wsa->close(); + + loadAlbumPage(); + loadAlbumPageWSA(); + + if (_album.leftPage.wsa->opened()) { + _album.leftPage.wsa->setX(_albumWSAX[_album.nextPage+0]); + _album.leftPage.wsa->setY(_albumWSAY[_album.nextPage+0]); + _album.leftPage.wsa->setDrawPage(2); + + _album.leftPage.wsa->displayFrame(_album.leftPage.curFrame, 0x4000); + } + if (_album.rightPage.wsa->opened()) { + _album.rightPage.wsa->setX(_albumWSAX[_album.nextPage+1]); + _album.rightPage.wsa->setY(_albumWSAY[_album.nextPage+1]); + _album.rightPage.wsa->setDrawPage(2); + + _album.rightPage.wsa->displayFrame(_album.rightPage.curFrame, 0x4000); + } + + printAlbumPageText(); + + snd_playSoundEffect(0x85, 0x80); + albumSwitchPages(oldPage, _album.nextPage, 4); + + _album.leftPage.timer = _album.rightPage.timer = 0; + albumNewPage(); + + _eventList.clear(); + } + + albumUpdateAnims(); + _system->delayMillis(10); + } + + _album.leftPage.wsa->close(); + _album.rightPage.wsa->close(); +} + +void KyraEngine_MR::albumNewPage() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumNewPage()"); + int page = _album.nextPage / 2; + if (!queryGameFlag(0x84+page)) { + albumAnim1(); + delayWithTicks(8); + + int id = _album.curPage / 2 + 100; + albumChat((const char *)getTableEntry(_album.file, id), 205, id); + + if (id == 107) { + _screen->copyRegion(76, 100, 76, 100, 244, 100, 2, 0, Screen::CR_NO_P_CHECK); + albumChat((const char *)getTableEntry(_album.file, 108), 205, 108); + _screen->copyRegion(76, 100, 76, 100, 244, 100, 2, 0, Screen::CR_NO_P_CHECK); + albumChat((const char *)getTableEntry(_album.file, 109), 205, 109); + } + + delayWithTicks(5); + albumAnim2(); + + setGameFlag(0x84+page); + _album.isPage14 = (_album.nextPage == 14); + } +} + +void KyraEngine_MR::albumUpdateAnims() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumUpdateAnims()"); + if (_album.nextPage == 14 && !_album.isPage14) + return; + + uint32 nextRun = 0; + + nextRun = _album.leftPage.timer + 5 * _tickLength; + if (nextRun < _system->getMillis() && _album.leftPage.wsa->opened()) { + _album.leftPage.wsa->setX(_albumWSAX[_album.nextPage+0]); + _album.leftPage.wsa->setY(_albumWSAY[_album.nextPage+0]); + _album.leftPage.wsa->setDrawPage(2); + + _album.leftPage.wsa->displayFrame(_album.leftPage.curFrame, 0x4000); + _screen->copyRegion(40, 17, 40, 17, 87, 73, 2, 0, Screen::CR_NO_P_CHECK); + + ++_album.leftPage.curFrame; + _album.leftPage.timer = _system->getMillis(); + + if (_album.leftPage.curFrame > _album.leftPage.maxFrame) { + _album.leftPage.curFrame = 0; + if (_album.nextPage == 14) { + _album.isPage14 = false; + _album.leftPage.timer += 100000 * _tickLength; + } else { + _album.leftPage.timer += 180 * _tickLength; + } + } + } + + nextRun = _album.rightPage.timer + 5 * _tickLength; + if (nextRun < _system->getMillis() && _album.rightPage.wsa->opened()) { + _album.rightPage.wsa->setX(_albumWSAX[_album.nextPage+1]); + _album.rightPage.wsa->setY(_albumWSAY[_album.nextPage+1]); + _album.rightPage.wsa->setDrawPage(2); + + _album.rightPage.wsa->displayFrame(_album.rightPage.curFrame, 0x4000); + _screen->copyRegion(194, 20, 194, 20, 85, 69, 2, 0, Screen::CR_NO_P_CHECK); + + ++_album.rightPage.curFrame; + _album.rightPage.timer = _system->getMillis(); + + if (_album.rightPage.curFrame > _album.rightPage.maxFrame) { + _album.rightPage.curFrame = 0; + _album.rightPage.timer += 180 * _tickLength; + } + } + + _screen->updateScreen(); +} + +void KyraEngine_MR::albumAnim1() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumAnim1()"); + _album.wsa->setX(-100); + _album.wsa->setY(90); + _album.wsa->setDrawPage(2); + + for (int i = 6; i >= 3; --i) { + albumRestoreRect(); + _album.wsa->displayFrame(i, 0x4000); + albumUpdateRect(); + delayWithTicks(1); + } + + albumRestoreRect(); + _album.wsa->displayFrame(14, 0x4000); + albumUpdateRect(); + delayWithTicks(1); +} + +void KyraEngine_MR::albumAnim2() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumAnim2()"); + _album.wsa->setX(-100); + _album.wsa->setY(90); + _album.wsa->setDrawPage(2); + + for (int i = 3; i <= 6; ++i) { + albumRestoreRect(); + _album.wsa->displayFrame(i, 0x4000); + albumUpdateRect(); + delayWithTicks(1); + } + + albumRestoreRect(); + _screen->copyRegion(0, 100, 0, 100, 320, 100, 2, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); +} + +void KyraEngine_MR::albumBackUpRect() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumBackUpRect()"); + _screen->copyRegionToBuffer(2, 0, 146, 62, 50, _album.backUpRect); +} + +void KyraEngine_MR::albumRestoreRect() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumRestoreRect()"); + _screen->copyBlockToPage(2, 0, 146, 62, 50, _album.backUpRect); +} + +void KyraEngine_MR::albumUpdateRect() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumUpdateRect()"); + _screen->copyRegion(0, 146, 0, 146, 62, 50, 2, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); +} + +void KyraEngine_MR::albumSwitchPages(int oldPage, int newPage, int unk) { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumSwitchPages()"); + if (newPage > oldPage) { + //XXX + + _screen->copyRegion(260, 7, 260, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); + delayWithTicks(1); + + //XXX + + _screen->copyRegion(210, 7, 210, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); + delayWithTicks(1); + + _screen->copyRegion(160, 7, 160, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); + delayWithTicks(1); + + //XXX + delayWithTicks(1); + + //XXX + delayWithTicks(1); + + _screen->copyRegion(10, 7, 10, 7, 150, 186, 2, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); + } else { + //XXX + + _screen->copyRegion(10, 7, 10, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); + delayWithTicks(1); + + //XXX + + _screen->copyRegion(60, 7, 60, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); + delayWithTicks(1); + + _screen->copyRegion(110, 7, 110, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); + delayWithTicks(1); + + //XXX + delayWithTicks(1); + + //XXX + delayWithTicks(1); + + _screen->copyRegion(160, 7, 160, 7, 150, 186, 2, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); + } +} + +int KyraEngine_MR::albumNextPage(Button *caller) { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumNextPage(%p)", (const void *)caller); + _album.nextPage = _album.curPage + 2; + if (_album.nextPage >= 16) { + _album.nextPage -= 2; + _album.running = false; + } + return 0; +} + +int KyraEngine_MR::albumPrevPage(Button *caller) { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumPrevPage(%p)", (const void *)caller); + _album.nextPage = _album.curPage - 2; + if (_album.nextPage < 0) { + _album.nextPage = 0; + _album.running = false; + } + return 0; +} + +int KyraEngine_MR::albumClose(Button *caller) { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumClose(%p)", (const void *)caller); + _album.running = false; + return 0; +} + #pragma mark - GUI_MR::GUI_MR(KyraEngine_MR *vm) : GUI_v2(vm), _vm(vm), _screen(vm->_screen) { diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index be788f5a64..c89e4eae89 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -144,6 +144,8 @@ KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngi _optionsFile = 0; _actorFile = 0; _chatAltFlag = false; + _albumChatActive = false; + memset(&_album, 0, sizeof(_album)); } KyraEngine_MR::~KyraEngine_MR() { @@ -191,6 +193,10 @@ KyraEngine_MR::~KyraEngine_MR() { delete[] _mainButtonData; delete _gui; delete[] _optionsFile; + + delete _album.wsa; + delete _album.leftPage.wsa; + delete _album.rightPage.wsa; } int KyraEngine_MR::init() { @@ -542,6 +548,13 @@ void KyraEngine_MR::initMouseShapes() { void KyraEngine_MR::startup() { debugC(9, kDebugLevelMain, "KyraEngine_MR::startup()"); + + _album.wsa = new WSAMovieV2(this, _screen); + assert(_album.wsa); + _album.leftPage.wsa = new WSAMovieV2(this, _screen); + assert(_album.leftPage.wsa); + _album.rightPage.wsa = new WSAMovieV2(this, _screen); + assert(_album.rightPage.wsa); musicUpdate(0); _gamePlayBuffer = new uint8[64000]; diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 306438ac1b..2921ab7abc 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -428,6 +428,11 @@ private: void goodConscienceChat(const char *str, int vocHigh, int vocLow); void goodConscienceChatWaitToFinish(); + bool _albumChatActive; + void albumChat(const char *str, int vocHigh, int vocLow); + void albumChatInit(const char *str, int object, int vocHigh, int vocLow); + void albumChatWaitToFinish(); + void malcolmSceneStartupChat(); byte _newSceneDlgState[40]; @@ -524,6 +529,55 @@ private: void eelScript(); + // Album + struct Album { + uint8 *backUpPage; + uint8 *file; + WSAMovieV2 *wsa; + uint8 *backUpRect; + + struct PageMovie { + WSAMovieV2 *wsa; + int curFrame; + int maxFrame; + uint32 timer; + }; + + PageMovie leftPage, rightPage; + + int curPage, nextPage; + bool running; + bool isPage14; + } _album; + + static const int8 _albumWSAX[]; + static const int8 _albumWSAY[]; + + void showAlbum(); + + void loadAlbumPage(); + void loadAlbumPageWSA(); + + void printAlbumPageText(); + void printAlbumText(int page, const char *str, int x, int y, uint8 c0); + + void processAlbum(); + + void albumNewPage(); + void albumUpdateAnims(); + void albumAnim1(); + void albumAnim2(); + + void albumBackUpRect(); + void albumRestoreRect(); + void albumUpdateRect(); + + void albumSwitchPages(int oldPage, int newPage, int unk); + + int albumNextPage(Button *caller); + int albumPrevPage(Button *caller); + int albumClose(Button *caller); + // save/load void saveGame(const char *fileName, const char *saveName); void loadGame(const char *fileName); @@ -540,6 +594,7 @@ private: int o3_setCharacterAnimFrameFromFacing(EMCState *script); int o3_showBadConscience(EMCState *script); int o3_hideBadConscience(EMCState *script); + int o3_showAlbum(EMCState *script); int o3_setInventorySlot(EMCState *script); int o3_getInventorySlot(EMCState *script); int o3_addItemToInventory(EMCState *script); diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp index 6cbe58c0c1..0142a06b7d 100644 --- a/engines/kyra/script_mr.cpp +++ b/engines/kyra/script_mr.cpp @@ -134,6 +134,12 @@ int KyraEngine_MR::o3_hideBadConscience(EMCState *script) { return 0; } +int KyraEngine_MR::o3_showAlbum(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_showAlbum(%p) ()", (const void *)script); + showAlbum(); + return 0; +} + int KyraEngine_MR::o3_setInventorySlot(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_setInventorySlot(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); const int slot = MAX(0, MIN(10, stackPos(0))); @@ -1176,7 +1182,7 @@ void KyraEngine_MR::setupOpcodeTable() { Opcode(o3_hideBadConscience); // 0x18 OpcodeUnImpl(); - OpcodeUnImpl(); + Opcode(o3_showAlbum); Opcode(o3_setInventorySlot); Opcode(o3_getInventorySlot); // 0x1c diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 051d4d9025..85a822cccf 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -2665,5 +2665,15 @@ void GUI_MR::initStaticData() { _deathMenu.item[i].enabled = false; } +const int8 KyraEngine_MR::_albumWSAX[] = { + 0, 77, -50, 99, -61, 82, -58, 85, + -64, 80, -63, 88, -63, 88, -64, 0 +}; + +const int8 KyraEngine_MR::_albumWSAY[] = { + 0, -1, 3, 0, -1, 0, -2, 0, + -1, -2, 2, 2, -6, -6, -6, 0 +}; + } // End of namespace Kyra diff --git a/engines/kyra/text_mr.cpp b/engines/kyra/text_mr.cpp index 35f91c1ccc..70c24106f9 100644 --- a/engines/kyra/text_mr.cpp +++ b/engines/kyra/text_mr.cpp @@ -131,6 +131,12 @@ int TextDisplayer_MR::dropCRIntoString(char *str, int minOffs, int maxOffs) { void TextDisplayer_MR::printText(const char *str, int x, int y, uint8 c0, uint8 c1, uint8 c2, Screen::FontId font) { debugC(9, kDebugLevelMain, "TextDisplayer_MR::printText('%s', %d, %d, %d, %d, %d)", str, x, y, c0, c1, c2); + if (_vm->_albumChatActive) { + c0 = 0xEE; + c1 = 0xE3; + c2 = 0x00; + } + uint8 colorMap[] = { 0, 255, 240, 240 }; colorMap[3] = c1; _screen->setTextColor(colorMap, 0, 3); @@ -496,6 +502,133 @@ void KyraEngine_MR::goodConscienceChatWaitToFinish() { } } +void KyraEngine_MR::albumChat(const char *str, int vocHigh, int vocLow) { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumChat('%s', %d, %d)", str, vocHigh, vocLow); + + _talkObjectList[1].x = 190; + _talkObjectList[1].y = 188; + + _chatVocHigh = _chatVocLow = -1; + _albumChatActive = true; + albumChatInit(str, 1, vocHigh, vocLow); + _albumChatActive = false; + + _chatText = str; + _chatObject = 1; + _screen->hideMouse(); + albumChatWaitToFinish(); + _screen->showMouse(); + + _chatText = 0; + _chatObject = -1; +} + +void KyraEngine_MR::albumChatInit(const char *str, int object, int vocHigh, int vocLow) { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumChatInit('%s', %d, %d, %d)", str, object, vocHigh, vocLow); + Common::String realString; + + while (*str) { + if (str[0] == '\\' && str[1] == 'r') { + realString += '\r'; + ++str; + } else { + realString += *str; + } + + ++str; + } + + str = realString.c_str(); + + str = _text->preprocessString(str); + int lineNum = _text->buildMessageSubstrings(str); + + int xPos = 0, yPos = 0; + + if (!object) { + int scale = getScale(_mainCharacter.x1, _mainCharacter.y1); + yPos = _mainCharacter.y1 - ((_mainCharacter.height * scale) >> 8) - 8; + xPos = _mainCharacter.x1; + } else { + yPos = _talkObjectList[object].y; + xPos = _talkObjectList[object].x; + } + + yPos -= lineNum * 10; + yPos = MAX(yPos, 0); + _text->_talkMessageY = yPos; + _text->_talkMessageH = lineNum*10; + + int width = _text->getWidestLineWidth(lineNum); + _text->calcWidestLineBounds(xPos, yPos, width, xPos); + _text->_talkCoords.x = xPos; + _text->_talkCoords.w = width + 2; + + _screen->hideMouse(); + + if (textEnabled()) { + objectChatPrintText(str, object); + _chatEndTime = _system->getMillis() + chatCalcDuration(str) * _tickLength; + } else { + _chatEndTime = _system->getMillis(); + } + + if (speechEnabled()) { + _chatVocHigh = vocHigh; + _chatVocLow = vocLow; + } else { + _chatVocHigh = _chatVocLow = -1; + } + + _screen->showMouse(); +} + +void KyraEngine_MR::albumChatWaitToFinish() { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumChatWaitToFinish()"); + if (_chatVocHigh) { + playVoice(_chatVocHigh, _chatVocLow); + _chatVocHigh = _chatVocLow = -1; + } + + bool running = true; + const uint32 endTime = _chatEndTime; + resetSkipFlag(); + + uint32 nextFrame = 0; + int frame = 12; + while (running && !_quitFlag) { + if (nextFrame < _system->getMillis()) { + ++frame; + if (frame > 22) + frame = 13; + + _album.wsa->setX(-100); + _album.wsa->setY(90); + _album.wsa->setDrawPage(2); + + _album.wsa->displayFrame(frame, 0x4000); + albumUpdateRect(); + + nextFrame = _system->getMillis() + _rnd.getRandomNumberRng(4, 8) * _tickLength; + } + + if (_album.nextPage != 14) + albumUpdateAnims(); + else + _screen->updateScreen(); + + const uint32 curTime = _system->getMillis(); + if ((textEnabled() && !speechEnabled() && curTime > endTime) || (speechEnabled() && !snd_voiceIsPlaying()) || skipFlag()) { + snd_stopVoice(); + resetSkipFlag(); + nextFrame = curTime; + running = false; + } + + delay(10); + } +} + void KyraEngine_MR::malcolmSceneStartupChat() { debugC(9, kDebugLevelMain, "KyraEngine_MR::malcolmSceneStartupChat()"); -- cgit v1.2.3 From 35d01db1aa02db8554772d88354786e291387499 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 11 May 2008 15:57:50 +0000 Subject: Implemented page switch animation in kyra3 album. svn-id: r32023 --- engines/kyra/gui_mr.cpp | 31 ++++++----- engines/kyra/kyra_mr.h | 2 +- engines/kyra/screen_hof.cpp | 129 ++------------------------------------------ engines/kyra/screen_hof.h | 5 -- engines/kyra/screen_v2.cpp | 125 ++++++++++++++++++++++++++++++++++++++++++ engines/kyra/screen_v2.h | 8 ++- engines/kyra/text_mr.cpp | 1 + 7 files changed, 156 insertions(+), 145 deletions(-) diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp index 0408c68317..fda9b089ea 100644 --- a/engines/kyra/gui_mr.cpp +++ b/engines/kyra/gui_mr.cpp @@ -742,11 +742,14 @@ void KyraEngine_MR::showAlbum() { restorePage3(); _screen->copyBlockToPage(0, 0, 0, 320, 200, _screenBuffer); _screen->copyBlockToPage(4, 0, 0, 320, 200, _album.backUpPage); - delete[] _album.backUpPage; - _album.backUpPage = 0; memcpy(_screen->getPalette(0), _screen->getPalette(1), 768); _screen->fadePalette(_screen->getPalette(0), 9); + + delete[] _album.backUpRect; + _album.backUpRect = 0; + delete[] _album.backUpPage; + _album.backUpPage = 0; delete[] _album.file; _album.file = 0; @@ -1045,16 +1048,16 @@ void KyraEngine_MR::albumUpdateRect() { _screen->updateScreen(); } -void KyraEngine_MR::albumSwitchPages(int oldPage, int newPage, int unk) { - debugC(9, kDebugLevelMain, "KyraEngine_MR::albumSwitchPages()"); +void KyraEngine_MR::albumSwitchPages(int oldPage, int newPage, int srcPage) { + debugC(9, kDebugLevelMain, "KyraEngine_MR::albumSwitchPages(%d, %d, %d)", oldPage, newPage, srcPage); if (newPage > oldPage) { - //XXX + _screen->wsaFrameAnimationStep(0xA0, 0x07, 0xA0, 0x07, 0x96, 0xBA, 0x64, 0xBA, srcPage, 0, 2); _screen->copyRegion(260, 7, 260, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK); _screen->updateScreen(); delayWithTicks(1); - //XXX + _screen->wsaFrameAnimationStep(0xA0, 0x07, 0xA0, 0x07, 0x96, 0xBA, 0x32, 0xBA, srcPage, 0, 2); _screen->copyRegion(210, 7, 210, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK); _screen->updateScreen(); @@ -1064,22 +1067,24 @@ void KyraEngine_MR::albumSwitchPages(int oldPage, int newPage, int unk) { _screen->updateScreen(); delayWithTicks(1); - //XXX + _screen->wsaFrameAnimationStep(0x10, 0x07, 0x6E, 0x07, 0x96, 0xBA, 0x32, 0xBA, 2, 0, 2); + _screen->updateScreen(); delayWithTicks(1); - //XXX + _screen->wsaFrameAnimationStep(0x10, 0x07, 0x3C, 0x07, 0x96, 0xBA, 0x64, 0xBA, 2, 0, 2); + _screen->updateScreen(); delayWithTicks(1); _screen->copyRegion(10, 7, 10, 7, 150, 186, 2, 0, Screen::CR_NO_P_CHECK); _screen->updateScreen(); } else { - //XXX + _screen->wsaFrameAnimationStep(0x0A, 0x07, 0x3C, 0x07, 0x96, 0xBA, 0x64, 0xBA, srcPage, 0, 2); _screen->copyRegion(10, 7, 10, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK); _screen->updateScreen(); delayWithTicks(1); - //XXX + _screen->wsaFrameAnimationStep(0x0A, 0x07, 0x6E, 0x07, 0x96, 0xBA, 0x32, 0xBA, srcPage, 0, 2); _screen->copyRegion(60, 7, 60, 7, 50, 186, 2, 0, Screen::CR_NO_P_CHECK); _screen->updateScreen(); @@ -1089,10 +1094,12 @@ void KyraEngine_MR::albumSwitchPages(int oldPage, int newPage, int unk) { _screen->updateScreen(); delayWithTicks(1); - //XXX + _screen->wsaFrameAnimationStep(0xA0, 0x07, 0xA0, 0x07, 0x96, 0xBA, 0x32, 0xBA, 2, 0, 2); + _screen->updateScreen(); delayWithTicks(1); - //XXX + _screen->wsaFrameAnimationStep(0xA0, 0x07, 0xA0, 0x07, 0x96, 0xBA, 0x64, 0xBA, 2, 0, 2); + _screen->updateScreen(); delayWithTicks(1); _screen->copyRegion(160, 7, 160, 7, 150, 186, 2, 0, Screen::CR_NO_P_CHECK); diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 2921ab7abc..29a1f6b044 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -572,7 +572,7 @@ private: void albumRestoreRect(); void albumUpdateRect(); - void albumSwitchPages(int oldPage, int newPage, int unk); + void albumSwitchPages(int oldPage, int newPage, int srcPage); int albumNextPage(Button *caller); int albumPrevPage(Button *caller); diff --git a/engines/kyra/screen_hof.cpp b/engines/kyra/screen_hof.cpp index 9a4237366b..2378c870a8 100644 --- a/engines/kyra/screen_hof.cpp +++ b/engines/kyra/screen_hof.cpp @@ -31,13 +31,7 @@ namespace Kyra { Screen_HoF::Screen_HoF(KyraEngine_HoF *vm, OSystem *system) - : Screen_v2(vm, system) { - _vm = vm; - _wsaFrameAnimBuffer = new uint8[1024]; -} - -Screen_HoF::~Screen_HoF() { - delete[] _wsaFrameAnimBuffer; + : Screen_v2(vm, system), _vm(vm) { } void Screen_HoF::setScreenDim(int dim) { @@ -74,80 +68,10 @@ void Screen_HoF::generateGrayOverlay(const uint8 *srcPal, uint8 *grayOverlay, in grayOverlay[i] = findLeastDifferentColor(tmpPal + 3 * i, srcPal, lastColor); } -void Screen_HoF::wsaFrameAnimationStep(int x1, int y1, int x2, int y2, - int w1, int h1, int w2, int h2, int srcPage, int dstPage, int dim) { - - if (!(w1 || h1 || w2 || h2)) - return; - - ScreenDim cdm = _screenDimTable[dim]; - cdm.sx <<= 3; - cdm.w <<= 3; - - int na = 0, nb = 0, nc = w2; - - if (!calcBounds(cdm.w, cdm.h, x2, y2, w2, h2, na, nb, nc)) - return; - - const uint8 *src = getPagePtr(srcPage) + y1 * 320; - uint8 *dst = getPagePtr(dstPage) + (y2 + cdm.sy) * 320; - - int u = -1; - - do { - int t = (nb * h1) / h2; - if (t != u) { - u = t; - const uint8 *s = src + (x1 + t) * 320; - uint8 *dt = (uint8*) _wsaFrameAnimBuffer; - - t = w2 - w1; - if (!t) { - memcpy(dt, s, w2); - } else if (t > 0) { - if (w1 == 1) { - memset(dt, *s, w2); - } else { - t = ((((((w2 - w1 + 1) & 0xffff) << 8) / w1) + 0x100) & 0xffff) << 8; - int bp = 0; - for (int i = 0; i < w1; i++) { - int cnt = (t >> 16); - bp += (t & 0xffff); - if (bp > 0xffff) { - bp -= 0xffff; - cnt++; - } - memset(dt, *s++, cnt); - dt += cnt; - } - } - } else { - if (w2 == 1) { - *dt = *s; - } else { - t = (((((w1 - w2) & 0xffff) << 8) / w2) & 0xffff) << 8; - int bp = 0; - for (int i = 0; i < w2; i++) { - *dt++ = *s++; - bp += (t & 0xffff); - if (bp > 0xffff) { - bp -= 0xffff; - s++; - } - s += (t >> 16); - } - } - } - } - memcpy(dst + x2 + cdm.sx, _wsaFrameAnimBuffer + na, w2); - dst += 320; - } while (++nb < h2); -} - void Screen_HoF::cmpFadeFrameStep(int srcPage, int srcW, int srcH, int srcX, int srcY, int dstPage, int dstW, int dstH, int dstX, int dstY, int cmpW, int cmpH, int cmpPage) { - if (!(cmpW || cmpH )) + if (!cmpW || !cmpH) return; int r1, r2, r3, r4, r5, r6; @@ -192,8 +116,7 @@ void Screen_HoF::copyPageMemory(int srcPage, int srcPos, int dstPage, int dstPos memcpy(dst, src, numBytes); } - -void Screen_HoF::copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int dstX,int dstY, int dstW, int dstH, const ScreenDim *dim, bool flag) { +void Screen_HoF::copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int dstX, int dstY, int dstW, int dstH, const ScreenDim *dim, bool flag) { int x0 = dim->sx << 3; int y0 = dim->sy; int w0 = dim->w << 3; @@ -229,51 +152,5 @@ void Screen_HoF::copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int } } -bool Screen_HoF::calcBounds(int w0, int h0, int &x1, int &y1, int &w1, int &h1, int &x2, int &y2, int &w2) { - x2 = 0; - y2 = 0; - w2 = w1; - - int t = x1 + w1; - if (t < 1) { - w1 = h1 = -1; - } else { - if (t <= x1) { - x2 = w1 - t; - w1 = t; - x1 = 0; - } - t = w0 - x1; - if (t < 1) { - w1 = h1 = -1; - } else { - if (t <= w1) { - w1 = t; - } - w2 -= w1; - t = h1 + y1; - if (t < 1) { - w1 = h1 = -1; - } else { - if (t <= y1) { - y2 = h1 - t; - h1 = t; - y1 = 0; - } - t = h0 - y1; - if (t < 1) { - w1 = h1 = -1; - } else { - if (t <= h1) { - h1 = t; - } - } - } - } - } - - return (w1 == -1) ? false : true; -} - } // end of namespace Kyra diff --git a/engines/kyra/screen_hof.h b/engines/kyra/screen_hof.h index a6df749538..088e8b7f55 100644 --- a/engines/kyra/screen_hof.h +++ b/engines/kyra/screen_hof.h @@ -36,15 +36,12 @@ class Screen_HoF : public Screen_v2 { friend class Debugger_v2; public: Screen_HoF(KyraEngine_HoF *vm, OSystem *system); - ~Screen_HoF(); void setScreenDim(int dim); const ScreenDim *getScreenDim(int dim); // sequence player void generateGrayOverlay(const uint8 *srcPal, uint8 *grayOverlay, int factor, int addR, int addG, int addB, int lastColor, bool flag); - bool calcBounds(int w0, int h0, int &x1, int &y1, int &w1, int &h1, int &x2, int &y2, int &w2); - void wsaFrameAnimationStep(int x1, int y1, int x2, int y2, int w1, int h1, int w2, int h2, int srcPage, int dstPage, int dim); void cmpFadeFrameStep(int srcPage, int srcW, int srcH, int srcX, int srcY, int dstPage, int dstW, int dstH, int dstX, int dstY, int cmpW, int cmpH, int cmpPage); void copyPageMemory(int srcPage, int srcPos, int dstPage, int dstPos, int numBytes); void copyRegionEx(int srcPage, int srcW, int srcH, int dstPage, int dstX,int dstY, int dstW, int dstH, const ScreenDim *d, bool flag = false); @@ -53,8 +50,6 @@ private: static const ScreenDim _screenDimTable[]; static const int _screenDimTableCount; - - uint8 *_wsaFrameAnimBuffer; }; } // End of namespace Kyra diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp index 564282fb3f..13186b0167 100644 --- a/engines/kyra/screen_v2.cpp +++ b/engines/kyra/screen_v2.cpp @@ -29,6 +29,15 @@ namespace Kyra { +Screen_v2::Screen_v2(KyraEngine *vm, OSystem *system) : Screen(vm, system), _wsaFrameAnimBuffer(0) { + _wsaFrameAnimBuffer = new uint8[1024]; + assert(_wsaFrameAnimBuffer); +} + +Screen_v2::~Screen_v2() { + delete[] _wsaFrameAnimBuffer; +} + uint8 *Screen_v2::generateOverlay(const uint8 *palette, uint8 *buffer, int startColor, uint16 factor) { if (!palette || !buffer) return buffer; @@ -336,5 +345,121 @@ void Screen_v2::setTextColorMap(const uint8 *cmap) { setTextColor(cmap, 0, 15); } +void Screen_v2::wsaFrameAnimationStep(int x1, int y1, int x2, int y2, + int w1, int h1, int w2, int h2, int srcPage, int dstPage, int dim) { + + if (!(w1 || h1 || w2 || h2)) + return; + + ScreenDim cdm = *getScreenDim(dim); + cdm.sx <<= 3; + cdm.w <<= 3; + + int na = 0, nb = 0, nc = w2; + + if (!calcBounds(cdm.w, cdm.h, x2, y2, w2, h2, na, nb, nc)) + return; + + const uint8 *src = getPagePtr(srcPage) + y1 * 320; + uint8 *dst = getPagePtr(dstPage) + (y2 + cdm.sy) * 320; + + int u = -1; + + do { + int t = (nb * h1) / h2; + if (t != u) { + u = t; + const uint8 *s = src + (x1 + t) * 320; + uint8 *dt = (uint8 *)_wsaFrameAnimBuffer; + + t = w2 - w1; + if (!t) { + memcpy(dt, s, w2); + } else if (t > 0) { + if (w1 == 1) { + memset(dt, *s, w2); + } else { + t = ((((((w2 - w1 + 1) & 0xffff) << 8) / w1) + 0x100) & 0xffff) << 8; + int bp = 0; + for (int i = 0; i < w1; i++) { + int cnt = (t >> 16); + bp += (t & 0xffff); + if (bp > 0xffff) { + bp -= 0xffff; + cnt++; + } + memset(dt, *s++, cnt); + dt += cnt; + } + } + } else { + if (w2 == 1) { + *dt = *s; + } else { + t = (((((w1 - w2) & 0xffff) << 8) / w2) & 0xffff) << 8; + int bp = 0; + for (int i = 0; i < w2; i++) { + *dt++ = *s++; + bp += (t & 0xffff); + if (bp > 0xffff) { + bp -= 0xffff; + s++; + } + s += (t >> 16); + } + } + } + } + memcpy(dst + x2 + cdm.sx, _wsaFrameAnimBuffer + na, w2); + dst += 320; + } while (++nb < h2); +} + +bool Screen_v2::calcBounds(int w0, int h0, int &x1, int &y1, int &w1, int &h1, int &x2, int &y2, int &w2) { + x2 = 0; + y2 = 0; + w2 = w1; + + int t = x1 + w1; + if (t < 1) { + w1 = h1 = -1; + } else { + if (t <= x1) { + x2 = w1 - t; + w1 = t; + x1 = 0; + } + t = w0 - x1; + if (t < 1) { + w1 = h1 = -1; + } else { + if (t <= w1) { + w1 = t; + } + w2 -= w1; + t = h1 + y1; + if (t < 1) { + w1 = h1 = -1; + } else { + if (t <= y1) { + y2 = h1 - t; + h1 = t; + y1 = 0; + } + t = h0 - y1; + if (t < 1) { + w1 = h1 = -1; + } else { + if (t <= h1) { + h1 = t; + } + } + } + } + } + + return (w1 == -1) ? false : true; +} + } // end of namespace Kyra diff --git a/engines/kyra/screen_v2.h b/engines/kyra/screen_v2.h index 5679dadf39..caec6af992 100644 --- a/engines/kyra/screen_v2.h +++ b/engines/kyra/screen_v2.h @@ -33,7 +33,8 @@ namespace Kyra { class Screen_v2 : public Screen { public: - Screen_v2(KyraEngine *vm, OSystem *system) : Screen(vm, system) {} + Screen_v2(KyraEngine *vm, OSystem *system); + ~Screen_v2(); // screen page handling void copyWsaRect(int x, int y, int w, int h, int dimState, int plotFunc, const uint8 *src, @@ -57,13 +58,18 @@ public: // rect handling int getRectSize(int w, int h); + bool calcBounds(int w0, int h0, int &x1, int &y1, int &w1, int &h1, int &x2, int &y2, int &w2); // text display void setTextColorMap(const uint8 *cmap); // layer handling virtual int getLayer(int x, int y); + + // special WSA handling + void wsaFrameAnimationStep(int x1, int y1, int x2, int y2, int w1, int h1, int w2, int h2, int srcPage, int dstPage, int dim); protected: + uint8 *_wsaFrameAnimBuffer; }; } // end of namespace Kyra diff --git a/engines/kyra/text_mr.cpp b/engines/kyra/text_mr.cpp index 70c24106f9..13b37fa77a 100644 --- a/engines/kyra/text_mr.cpp +++ b/engines/kyra/text_mr.cpp @@ -606,6 +606,7 @@ void KyraEngine_MR::albumChatWaitToFinish() { _album.wsa->setY(90); _album.wsa->setDrawPage(2); + albumRestoreRect(); _album.wsa->displayFrame(frame, 0x4000); albumUpdateRect(); -- cgit v1.2.3 From 61a105c9ba05ccff6be46a7b5c8a77192aa0c87e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 11 May 2008 16:48:54 +0000 Subject: Updated pathfinder debug output. svn-id: r32024 --- engines/kyra/scene.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/kyra/scene.cpp b/engines/kyra/scene.cpp index 9516da2dbd..e96a44cb2e 100644 --- a/engines/kyra/scene.cpp +++ b/engines/kyra/scene.cpp @@ -68,7 +68,7 @@ int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int move /*if (curX >= 0 && curY >= 0 && curX < 320 && curY < 200) { screen()->setPagePixel(0, curX, curY, 11); screen()->updateScreen(); - //waitTicks(5); + delayWithTicks(5); }*/ moveTable[lastUsedEntry++] = newFacing; x = curX; @@ -84,7 +84,7 @@ int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int move /*if (curX >= 0 && curY >= 0 && curX < 320 && curY < 200) { screen()->setPagePixel(0, curX, curY, 8); screen()->updateScreen(); - //waitTicks(5); + delayWithTicks(5); }*/ if (!lineIsPassable(curX, curY)) { @@ -183,7 +183,7 @@ int KyraEngine::findSubPath(int x, int y, int toX, int toY, int *moveTable, int /*if (xpos1 >= 0 && ypos1 >= 0 && xpos1 < 320 && ypos1 < 200) { screen()->setPagePixel(0, xpos1, ypos1, unkTable[start]); screen()->updateScreen(); - //waitTicks(5); + delayWithTicks(5); }*/ if (newFacing & 1) { int temp = xpos1 + addPosTableX[newFacing + start * 8]; -- cgit v1.2.3 From a6ccfa4f096da1fa29f3bb40aa328f2052b14302 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 11 May 2008 16:56:19 +0000 Subject: Added saving of current album page of kyra3 like the original did. svn-id: r32025 --- engines/kyra/saveload.cpp | 2 +- engines/kyra/saveload_mr.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp index fa3266685f..60548fcc33 100644 --- a/engines/kyra/saveload.cpp +++ b/engines/kyra/saveload.cpp @@ -29,7 +29,7 @@ #include "kyra/kyra.h" -#define CURRENT_SAVE_VERSION 11 +#define CURRENT_SAVE_VERSION 12 #define GF_FLOPPY (1 << 0) #define GF_TALKIE (1 << 1) diff --git a/engines/kyra/saveload_mr.cpp b/engines/kyra/saveload_mr.cpp index 8b727862a5..1e91121635 100644 --- a/engines/kyra/saveload_mr.cpp +++ b/engines/kyra/saveload_mr.cpp @@ -49,7 +49,7 @@ void KyraEngine_MR::saveGame(const char *fileName, const char *saveName) { out->writeSint16BE(_lastMusicCommand); out->writeByte(_currentChapter); out->writeByte(_characterShapeFile); - //XXX + out->writeByte(_album.curPage); out->writeSint16BE(_score); out->writeSint16BE(_scoreMax); out->writeByte(_malcolmsMood); @@ -158,7 +158,8 @@ void KyraEngine_MR::loadGame(const char *fileName) { _lastMusicCommand = in.readSint16(); _currentChapter = in.readByte(); _characterShapeFile = in.readByte(); - //XXX + if (header.version >= 12 || header.originalSave) + _album.curPage = in.readByte(); _score = in.readSint16(); _scoreMax = in.readSint16(); _malcolmsMood = in.readByte(); -- cgit v1.2.3 From 825e3b5136c55e8e9e07dcf3300e9b1f46ced0b0 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 11 May 2008 17:20:23 +0000 Subject: - Added support for original kyra3 save files - Added TalkObject::sceneId in savegames svn-id: r32027 --- engines/kyra/saveload.cpp | 7 +++- engines/kyra/saveload_mr.cpp | 94 +++++++++++++++++++++++++++++++++++++------- 2 files changed, 85 insertions(+), 16 deletions(-) diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp index 60548fcc33..590d40f2e3 100644 --- a/engines/kyra/saveload.cpp +++ b/engines/kyra/saveload.cpp @@ -29,7 +29,7 @@ #include "kyra/kyra.h" -#define CURRENT_SAVE_VERSION 12 +#define CURRENT_SAVE_VERSION 13 #define GF_FLOPPY (1 << 0) #define GF_TALKIE (1 << 1) @@ -70,6 +70,11 @@ KyraEngine::kReadSaveHeaderError KyraEngine::readSaveHeader(Common::InSaveFile * header.description = descriptionBuffer; header.gameID = GI_KYRA2; break; + } else if (type == MKID_BE('MBL4') && header.version == 102) { + saveOk = true; + header.description = descriptionBuffer; + header.gameID = GI_KYRA3; + break; } } diff --git a/engines/kyra/saveload_mr.cpp b/engines/kyra/saveload_mr.cpp index 1e91121635..51efc33723 100644 --- a/engines/kyra/saveload_mr.cpp +++ b/engines/kyra/saveload_mr.cpp @@ -53,11 +53,12 @@ void KyraEngine_MR::saveGame(const char *fileName, const char *saveName) { out->writeSint16BE(_score); out->writeSint16BE(_scoreMax); out->writeByte(_malcolmsMood); - out->write(_conversationState, sizeof(_conversationState)); - out->write(_newSceneDlgState, sizeof(_newSceneDlgState)); + for (int i = 0; i < 30; ++i) + out->write(_conversationState[i], 30); + out->write(_newSceneDlgState, 40); for (int i = 0; i < 100; ++i) out->writeUint16BE(_hiddenItems[i]); - out->write(_scoreFlagTable, sizeof(_scoreFlagTable)); + out->write(_scoreFlagTable, 26); out->writeUint16BE(_mainCharacter.sceneId); out->writeSint16BE(_mainCharacter.dlgIndex); @@ -88,6 +89,7 @@ void KyraEngine_MR::saveGame(const char *fileName, const char *saveName) { out->writeSint16BE(_talkObjectList[i].x); out->writeSint16BE(_talkObjectList[i].y); out->writeByte(_talkObjectList[i].color); + out->writeByte(_talkObjectList[i].sceneId); } for (int i = 0; i < 98; ++i) { @@ -129,6 +131,9 @@ void KyraEngine_MR::loadGame(const char *fileName) { return; } + if (header.originalSave) + warning("Trying to load savegame from original interpreter, while this is possible, it is not officially supported"); + if (_inventoryState) { updateCharacterAnim(0); restorePage3(); @@ -148,33 +153,58 @@ void KyraEngine_MR::loadGame(const char *fileName) { _screen->hideMouse(); - _timer->loadDataFromFile(in, header.version); + if (!header.originalSave) { + _timer->loadDataFromFile(in, header.version); - uint32 flagsSize = in.readUint32BE(); - assert(flagsSize <= sizeof(_flagsTable)); - in.read(_flagsTable, flagsSize); + uint32 flagsSize = in.readUint32BE(); + assert(flagsSize <= sizeof(_flagsTable)); + in.read(_flagsTable, flagsSize); + } - // usually we have to save the flag set by opcode 10 here _lastMusicCommand = in.readSint16(); _currentChapter = in.readByte(); _characterShapeFile = in.readByte(); + if (header.version >= 12 || header.originalSave) _album.curPage = in.readByte(); + if (header.originalSave) + in.readByte(); + _score = in.readSint16(); _scoreMax = in.readSint16(); _malcolmsMood = in.readByte(); - in.read(_conversationState, sizeof(_conversationState)); - in.read(_newSceneDlgState, sizeof(_newSceneDlgState)); + + if (header.originalSave) + in.seek(8, SEEK_CUR); + + for (int i = 0; i < 30; ++i) + in.read(_conversationState[i], 30); + + if (!header.originalSave) { + in.read(_newSceneDlgState, 40); + } else { + for (int i = 0; i < 40; ++i) + _newSceneDlgState[i] = in.readUint16(); + } + for (int i = 0; i < 100; ++i) _hiddenItems[i] = in.readUint16(); - in.read(_scoreFlagTable, sizeof(_scoreFlagTable)); + + if (header.originalSave) + in.read(_flagsTable, 69); + in.read(_scoreFlagTable, 26); _mainCharacter.sceneId = in.readUint16(); _mainCharacter.dlgIndex = in.readSint16(); _mainCharacter.height = in.readByte(); _mainCharacter.facing = in.readByte(); _mainCharacter.animFrame = in.readUint16(); - _mainCharacter.walkspeed = in.readByte(); + if (!header.originalSave) { + _mainCharacter.walkspeed = in.readByte(); + } else { + in.seek(2, SEEK_CUR); + _mainCharacter.walkspeed = in.readUint32(); + } for (int i = 0; i < 10; ++i) _mainCharacter.inventory[i] = in.readUint16(); _mainCharacter.x1 = in.readSint16(); @@ -189,7 +219,7 @@ void KyraEngine_MR::loadGame(const char *fileName) { _itemList[i].sceneId = in.readUint16(); _itemList[i].x = in.readSint16(); _itemList[i].y = in.readSint16(); - if (header.version <= 9) + if (header.version <= 9 || header.originalSave) in.readUint16(); } @@ -200,11 +230,25 @@ void KyraEngine_MR::loadGame(const char *fileName) { _talkObjectList[i].x = in.readSint16(); _talkObjectList[i].y = in.readSint16(); _talkObjectList[i].color = in.readByte(); + if (header.version >= 13 || header.originalSave) + _talkObjectList[i].sceneId = in.readByte(); } for (int i = 0; i < 98; ++i) { - in.read(_sceneList[i].filename1, 10); - in.read(_sceneList[i].filename2, 10); + if (!header.originalSave) { + in.read(_sceneList[i].filename1, 10); + } else { + in.read(_sceneList[i].filename1, 9); + _sceneList[i].filename1[9] = 0; + } + + if (!header.originalSave) { + in.read(_sceneList[i].filename2, 10); + } else { + in.read(_sceneList[i].filename2, 9); + _sceneList[i].filename2[9] = 0; + } + _sceneList[i].exit1 = in.readUint16(); _sceneList[i].exit2 = in.readUint16(); _sceneList[i].exit3 = in.readUint16(); @@ -214,6 +258,26 @@ void KyraEngine_MR::loadGame(const char *fileName) { } _itemInHand = in.readSint16(); + + if (header.originalSave) { + uint32 currentTime = _system->getMillis(); + + for (int i = 0; i < 6; ++i) + _timer->setDelay(i, in.readSint32LE()); + + for (int i = 0; i < 6; ++i) { + if (in.readUint16LE()) + _timer->enable(i); + else + _timer->disable(i); + } + + for (int i = 0; i < 6; ++i) + _timer->setNextRun(i, currentTime + (in.readUint32LE() * _tickLength)); + + _timer->resetNextRun(); + } + _sceneExit1 = in.readUint16(); _sceneExit2 = in.readUint16(); _sceneExit3 = in.readUint16(); -- cgit v1.2.3 From 4b21c2958ddf3cf1e69f427c715406d76712bed1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 11 May 2008 17:50:13 +0000 Subject: Implemented helium mode support for Kyra3. svn-id: r32028 --- engines/kyra/gui_mr.cpp | 17 ++++++++++++++--- engines/kyra/gui_mr.h | 1 + engines/kyra/kyra_mr.cpp | 4 ++++ engines/kyra/kyra_mr.h | 2 ++ engines/kyra/sound.h | 5 +++-- engines/kyra/sound_digital.cpp | 7 ++++++- engines/kyra/staticres.cpp | 1 + 7 files changed, 31 insertions(+), 6 deletions(-) diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp index fda9b089ea..74f6451e28 100644 --- a/engines/kyra/gui_mr.cpp +++ b/engines/kyra/gui_mr.cpp @@ -1539,15 +1539,26 @@ int GUI_MR::toggleSkipSupport(Button *caller) { return 0; } +int GUI_MR::toggleHeliumMode(Button *caller) { + updateMenuButton(caller); + _vm->_configHelium ^= 1; + if (_vm->_configHelium) + _audioOptions.item[3].itemId = 18; + else + _audioOptions.item[3].itemId = 17; + renewHighlight(_audioOptions); + return 0; +} + int GUI_MR::audioOptions(Button *caller) { updateMenuButton(caller); restorePage1(_vm->_screenBuffer); backUpPage1(_vm->_screenBuffer); - //if (_configHelium) - // _audioOptions.item[3].itemId = 18; - //else + if (_vm->_configHelium) + _audioOptions.item[3].itemId = 18; + else _audioOptions.item[3].itemId = 17; initMenu(_audioOptions); diff --git a/engines/kyra/gui_mr.h b/engines/kyra/gui_mr.h index d60c2f62d9..5bd3569031 100644 --- a/engines/kyra/gui_mr.h +++ b/engines/kyra/gui_mr.h @@ -79,6 +79,7 @@ private: int changeLanguage(Button *caller); int toggleStudioSFX(Button *caller); int toggleSkipSupport(Button *caller); + int toggleHeliumMode(Button *caller); KyraEngine_MR *_vm; Screen_MR *_screen; diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index c89e4eae89..2168000dc9 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -146,6 +146,7 @@ KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngi _chatAltFlag = false; _albumChatActive = false; memset(&_album, 0, sizeof(_album)); + _configHelium = false; } KyraEngine_MR::~KyraEngine_MR() { @@ -1515,6 +1516,7 @@ void KyraEngine_MR::registerDefaultSettings() { ConfMan.registerDefault("walkspeed", 5); ConfMan.registerDefault("studio_audience", true); ConfMan.registerDefault("skip_support", true); + ConfMan.registerDefault("helium_mode", false); } void KyraEngine_MR::writeSettings() { @@ -1538,6 +1540,7 @@ void KyraEngine_MR::writeSettings() { ConfMan.setBool("studio_audience", _configStudio); ConfMan.setBool("skip_support", _configSkip); + ConfMan.setBool("helium_mode", _configHelium); KyraEngine::writeSettings(); } @@ -1548,6 +1551,7 @@ void KyraEngine_MR::readSettings() { _configStudio = ConfMan.getBool("studio_audience"); _configSkip = ConfMan.getBool("skip_support"); + _configHelium = ConfMan.getBool("helium_mode"); } } // end of namespace Kyra diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 29a1f6b044..a50fbfd440 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -55,6 +55,7 @@ public: GUI_v2 *gui_v2() const { return _gui; } SoundDigital *soundDigital() { return _soundDigital; } int language() const { return _lang; } + bool heliumMode() const { return _configHelium; } int go(); @@ -66,6 +67,7 @@ private: // config bool _configStudio; bool _configSkip; + bool _configHelium; void registerDefaultSettings(); void writeSettings(); diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h index 58681d45ef..e1ae29cba3 100644 --- a/engines/kyra/sound.h +++ b/engines/kyra/sound.h @@ -491,6 +491,7 @@ private: // Digital Audio class AUDStream; +class KyraEngine_MR; /** * Digital audio output device. @@ -499,7 +500,7 @@ class AUDStream; */ class SoundDigital { public: - SoundDigital(KyraEngine *vm, Audio::Mixer *mixer); + SoundDigital(KyraEngine_MR *vm, Audio::Mixer *mixer); ~SoundDigital(); bool init() { return true; } @@ -548,7 +549,7 @@ public: */ void beginFadeOut(int channel, int ticks); private: - KyraEngine *_vm; + KyraEngine_MR *_vm; Audio::Mixer *_mixer; struct Sound { diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp index ab60c3e1f5..bac7d67129 100644 --- a/engines/kyra/sound_digital.cpp +++ b/engines/kyra/sound_digital.cpp @@ -25,6 +25,7 @@ #include "kyra/sound.h" #include "kyra/resource.h" +#include "kyra/kyra_mr.h" #include "sound/audiostream.h" @@ -45,6 +46,7 @@ public: bool isStereo() const { return false; } bool endOfData() const { return _endOfData; } + void setRate(int newRate) { _rate = newRate; } int getRate() const { return _rate; } void beginFadeIn(uint32 millis); @@ -319,7 +321,7 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) { #pragma mark - -SoundDigital::SoundDigital(KyraEngine *vm, Audio::Mixer *mixer) : _vm(vm), _mixer(mixer), _sounds() { +SoundDigital::SoundDigital(KyraEngine_MR *vm, Audio::Mixer *mixer) : _vm(vm), _mixer(mixer), _sounds() { for (uint i = 0; i < ARRAYSIZE(_sounds); ++i) _sounds[i].stream = 0; } @@ -384,6 +386,9 @@ int SoundDigital::playSound(const char *filename, uint8 priority, Audio::Mixer:: if (volume > 255) volume = 255; volume = (volume * Audio::Mixer::kMaxChannelVolume) / 255; + + if (type == Audio::Mixer::kSpeechSoundType && _vm->heliumMode()) + use->stream->setRate(32765); _mixer->playInputStream(type, &use->handle, use->stream, -1, volume); diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 85a822cccf..b81a5838ce 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -2596,6 +2596,7 @@ void GUI_MR::initStaticData() { GUI_V2_MENU_ITEM(_audioOptions.item[1], 0, 0, 160, 47, 116, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 24, 8, 49, 0x0000); GUI_V2_MENU_ITEM(_audioOptions.item[2], 0, 0, 160, 64, 116, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 39, 8, 66, 0x0000); GUI_V2_MENU_ITEM(_audioOptions.item[3], 1, 0, 152, 81, 116, 15, 0xFA, 0xFF, 5, 0xD0, 0xD1, 0xCF, -1, 47, 8, 83, 0x0000); + _audioOptions.item[3].callback = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::toggleHeliumMode); GUI_V2_MENU_ITEM(_audioOptions.item[4], 1, 16, -1, 110, 92, 15, 0xFA, 0xFF, -1, 0xD0, 0xD1, 0xCF, -1, 0, 0, 0, 0x0000); _audioOptions.item[4].callback = clickQuitOptionsFunctor; for (int i = 5; i < 7; ++i) -- cgit v1.2.3 From c5498a69bfaee74e2b5b046b36512c8a5d4785f9 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 11 May 2008 18:55:40 +0000 Subject: Implemented temp buffer saving/loading ("SAVE.TMP") in Woodruff. Objects you take from or leave in screens are remembered correctly now. svn-id: r32030 --- engines/gob/saveload.cpp | 109 ++++++++++++++++++++++++++++++++++++++++++++ engines/gob/saveload.h | 35 +++++++++++++- engines/gob/saveload_v2.cpp | 2 + engines/gob/saveload_v3.cpp | 2 + engines/gob/saveload_v4.cpp | 66 ++++++++++++++++++++++++++- 5 files changed, 212 insertions(+), 2 deletions(-) diff --git a/engines/gob/saveload.cpp b/engines/gob/saveload.cpp index e0854151a0..50f41db47e 100644 --- a/engines/gob/saveload.cpp +++ b/engines/gob/saveload.cpp @@ -433,6 +433,115 @@ bool StagedSave::read() { } +PagedBuffer::PagedBuffer(uint32 pageSize) { + + _size = 0; + _pageSize = pageSize; +} + +PagedBuffer::~PagedBuffer() { + clear(); +} + +bool PagedBuffer::empty() const { + return _pages.empty(); +} + +uint32 PagedBuffer::getSize() const { + return _size; +} + +void PagedBuffer::clear() { + for (uint i = 0; i < _pages.size(); i++) + delete[] _pages[i]; + _pages.clear(); + _size = 0; +} + +bool PagedBuffer::write(const byte *buffer, uint32 size, uint32 offset) { + grow(size, offset); + + uint page = offset / _pageSize; + while (size > 0) { + if (!_pages[page]) + _pages[page] = new byte[_pageSize]; + + uint32 pStart = offset % _pageSize; + uint32 n = MIN(size, _pageSize - pStart); + + memcpy(_pages[page] + pStart, buffer, n); + + buffer += n; + offset += n; + size -= n; + page++; + } + + return true; +} + +bool PagedBuffer::read(byte *buffer, uint32 size, uint32 offset) const { + uint page = offset / _pageSize; + + while (size > 0) { + if (offset >= _size) { + memset(buffer, 0, size); + break; + } + + uint32 pStart = offset % _pageSize; + uint32 n = MIN(MIN(size, _pageSize - pStart), _size - offset); + + if (_pages[page]) + memcpy(buffer, _pages[page] + pStart, n); + else + memset(buffer, 0, n); + + buffer += n; + offset += n; + size -= n; + page++; + } + + return true; +} + +uint32 PagedBuffer::writeToStream(Common::WriteStream &out) const { + for (uint i = 0; i < _pages.size(); i++) { + if (!_pages[i]) { + for (uint32 j = 0; j < _pageSize; j++) + out.writeByte(0); + } else + out.write(_pages[i], _pageSize); + } + + return _size; +} + +uint32 PagedBuffer::readFromStream(Common::ReadStream &in) { + clear(); + + while (!in.eos()) { + byte *buffer = new byte[_pageSize]; + + _size += in.read(buffer, _pageSize); + + _pages.push_back(buffer); + } + + return _size; +} + +void PagedBuffer::grow(uint32 size, uint32 offset) { + uint32 eSize = offset + size; + + while (_size < eSize) { + _pages.push_back(0); + _size += MIN(_pageSize, eSize - _size); + } +} + + SaveLoad::SaveLoad(GobEngine *vm, const char *targetName) : _vm(vm) { _targetName = new char[strlen(targetName) + 1]; diff --git a/engines/gob/saveload.h b/engines/gob/saveload.h index 9b032cc73f..d13bd2c15f 100644 --- a/engines/gob/saveload.h +++ b/engines/gob/saveload.h @@ -121,6 +121,30 @@ private: bool read(); }; +class PagedBuffer { +public: + PagedBuffer(uint32 pageSize = 1024); + ~PagedBuffer(); + + bool empty() const; + uint32 getSize() const; + + void clear(); + + bool write(const byte *buffer, uint32 size, uint32 offset); + bool read(byte *buffer, uint32 size, uint32 offset) const; + + uint32 writeToStream(Common::WriteStream &out) const; + uint32 readFromStream(Common::ReadStream &in); + +private: + uint32 _size; + uint32 _pageSize; + Common::Array _pages; + + void grow(uint32 size, uint32 offset); +}; + class SaveLoad { public: enum SaveMode { @@ -310,7 +334,8 @@ protected: class SaveLoad_v4 : public SaveLoad { public: enum SaveType { - kSaveNone + kSaveNone, + kSaveTempBuffer }; SaveLoad_v4(GobEngine *vm, const char *targetName); @@ -330,12 +355,20 @@ protected: int32 _varSize; + PagedBuffer _tmpBuffer; + virtual int getSaveType(const char *fileName); virtual int32 getSizeVersioned(int type); virtual bool loadVersioned(int type, int16 dataVar, int32 size, int32 offset); virtual bool saveVersioned(int type, int16 dataVar, int32 size, int32 offset); + int32 getSizeTempBuffer(SaveFile &saveFile); + + bool loadTempBuffer(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + + bool saveTempBuffer(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + void assertInited(); }; diff --git a/engines/gob/saveload_v2.cpp b/engines/gob/saveload_v2.cpp index 2754646198..153b6dc2cd 100644 --- a/engines/gob/saveload_v2.cpp +++ b/engines/gob/saveload_v2.cpp @@ -62,6 +62,8 @@ SaveLoad_v2::~SaveLoad_v2() { } SaveLoad::SaveMode SaveLoad_v2::getSaveMode(const char *fileName) { + fileName = stripPath(fileName); + for (int i = 0; i < ARRAYSIZE(_saveFiles); i++) if (!scumm_stricmp(fileName, _saveFiles[i].sourceName)) return _saveFiles[i].mode; diff --git a/engines/gob/saveload_v3.cpp b/engines/gob/saveload_v3.cpp index ae8d160eb2..d8eadd5677 100644 --- a/engines/gob/saveload_v3.cpp +++ b/engines/gob/saveload_v3.cpp @@ -75,6 +75,8 @@ SaveLoad_v3::~SaveLoad_v3() { } SaveLoad::SaveMode SaveLoad_v3::getSaveMode(const char *fileName) { + fileName = stripPath(fileName); + for (int i = 0; i < ARRAYSIZE(_saveFiles); i++) if (!scumm_stricmp(fileName, _saveFiles[i].sourceName)) return _saveFiles[i].mode; diff --git a/engines/gob/saveload_v4.cpp b/engines/gob/saveload_v4.cpp index 2235b4834e..75e44cc1bc 100644 --- a/engines/gob/saveload_v4.cpp +++ b/engines/gob/saveload_v4.cpp @@ -27,12 +27,13 @@ #include "gob/gob.h" #include "gob/saveload.h" +#include "gob/global.h" #include "gob/game.h" namespace Gob { SaveLoad_v4::SaveFile SaveLoad_v4::_saveFiles[] = { - { "", 0, kSaveModeNone, kSaveNone } + { "save.tmp", 0, kSaveModeSave, kSaveTempBuffer } }; SaveLoad_v4::SaveLoad_v4(GobEngine *vm, const char *targetName) : @@ -45,31 +46,94 @@ SaveLoad_v4::~SaveLoad_v4() { } SaveLoad::SaveMode SaveLoad_v4::getSaveMode(const char *fileName) { + fileName = stripPath(fileName); + + for (int i = 0; i < ARRAYSIZE(_saveFiles); i++) + if (!scumm_stricmp(fileName, _saveFiles[i].sourceName)) + return _saveFiles[i].mode; + return kSaveModeNone; } int SaveLoad_v4::getSaveType(const char *fileName) { + for (int i = 0; i < ARRAYSIZE(_saveFiles); i++) + if (!scumm_stricmp(fileName, _saveFiles[i].sourceName)) + return i; + return -1; } int32 SaveLoad_v4::getSizeVersioned(int type) { assertInited(); + switch (_saveFiles[type].type) { + case kSaveTempBuffer: + return getSizeTempBuffer(_saveFiles[type]); + default: + break; + } + return -1; } bool SaveLoad_v4::loadVersioned(int type, int16 dataVar, int32 size, int32 offset) { assertInited(); + switch (_saveFiles[type].type) { + case kSaveTempBuffer: + if (loadTempBuffer(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While loading from the tempBuffer"); + break; + + default: + break; + } + return false; } bool SaveLoad_v4::saveVersioned(int type, int16 dataVar, int32 size, int32 offset) { assertInited(); + switch (_saveFiles[type].type) { + case kSaveTempBuffer: + if (saveTempBuffer(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While saving to the tempBuffer"); + break; + + default: + break; + } + return false; } +int32 SaveLoad_v4::getSizeTempBuffer(SaveFile &saveFile) { + return _tmpBuffer.getSize(); +} + +bool SaveLoad_v4::loadTempBuffer(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { + + debugC(3, kDebugSaveLoad, "Loading from the temporary buffer (%d, %d, %d)", + dataVar, size, offset); + + return _tmpBuffer.read(_vm->_global->_inter_variables + dataVar, size, offset); +} + +bool SaveLoad_v4::saveTempBuffer(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { + + debugC(3, kDebugSaveLoad, "Saving to the temporary buffer (%d, %d, %d)", + dataVar, size, offset); + + return _tmpBuffer.write(_vm->_global->_inter_variables + dataVar, size, offset); +} + void SaveLoad_v4::assertInited() { if (_varSize > 0) return; -- cgit v1.2.3 From 85abe0be12a1cd412b9bbe6b231175a6c59e4bd2 Mon Sep 17 00:00:00 2001 From: Paweł Kołodziejski Date: Sun, 11 May 2008 20:05:09 +0000 Subject: more translations svn-id: r32034 --- engines/drascula/animation.cpp | 76 +++++++++++++++++++++--------------------- engines/drascula/drascula.cpp | 60 ++++++++++++++++----------------- engines/drascula/drascula.h | 13 +++----- engines/drascula/rooms.cpp | 6 ++-- 4 files changed, 76 insertions(+), 79 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index c8c9005265..7c0d167299 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -102,9 +102,9 @@ void DrasculaEngine::animation_1_1() { clearRoom(); loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETA); + decompressPic(dir_hare_frente, COMPLETE_PAL); loadPic("103.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); loadPic("104.alg"); decompressPic(dir_dibujo3, 1); loadPic("aux104.alg"); @@ -169,7 +169,7 @@ void DrasculaEngine::animation_1_1() { clearRoom(); loadPic("100.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); loadPic("auxigor.alg"); decompressPic(dir_hare_frente, 1); loadPic("auxdr.alg"); @@ -207,14 +207,14 @@ void DrasculaEngine::animation_1_1() { clearRoom(); color_solo = RED; loadPic("plan1.alg"); - decompressPic(dir_zona_pantalla, MEDIA); + decompressPic(dir_zona_pantalla, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(10); talk_solo(_textd[_lang][4],"d4.als"); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; loadPic("plan1.alg"); - decompressPic(dir_zona_pantalla, MEDIA); + decompressPic(dir_zona_pantalla, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk_solo(_textd[_lang][5], "d5.als"); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) @@ -224,7 +224,7 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); loadPic("plan2.alg"); - decompressPic(dir_zona_pantalla, MEDIA); + decompressPic(dir_zona_pantalla, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(20); talk_solo(_textd[_lang][6], "d6.als"); @@ -235,7 +235,7 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); loadPic("plan3.alg"); - decompressPic(dir_zona_pantalla, MEDIA); + decompressPic(dir_zona_pantalla, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(20); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) @@ -244,14 +244,14 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; loadPic("plan3.alg"); - decompressPic(dir_zona_pantalla, MEDIA); + decompressPic(dir_zona_pantalla, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk_solo(_textd[_lang][8], "d8.als"); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); loadPic("100.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); MusicFadeout(); stopMusic(); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) @@ -382,7 +382,7 @@ void DrasculaEngine::animation_1_1() { } clearRoom(); loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETA); + decompressPic(dir_hare_frente, COMPLETE_PAL); loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); } @@ -501,7 +501,7 @@ void DrasculaEngine::animation_2_1() { break; clearRoom(); loadPic("bj.alg"); - decompressPic(dir_zona_pantalla, MEDIA); + decompressPic(dir_zona_pantalla, HALF_PAL); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; black(); @@ -516,7 +516,7 @@ void DrasculaEngine::animation_2_1() { clearRoom(); loadPic("16.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; loadPic("auxbj.alg"); @@ -832,7 +832,7 @@ void DrasculaEngine::animation_4_2() { clearRoom(); loadPic("ciego1.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); loadPic("ciego2.alg"); decompressPic(dir_dibujo3, 1); loadPic("ciego3.alg"); @@ -881,7 +881,7 @@ void DrasculaEngine::animation_4_2() { playMusic(roomMusic); loadPic("9.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); loadPic("aux9.alg"); decompressPic(dir_dibujo3, 1); loadPic("96.alg"); @@ -991,7 +991,7 @@ void DrasculaEngine::animation_16_2() { color_abc(DARK_GREEN); loadPic("his1.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); if (_lang == kSpanish) black(); @@ -1026,7 +1026,7 @@ void DrasculaEngine::animation_16_2() { clearRoom(); loadPic("his2.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); if (_lang != kSpanish) @@ -1053,7 +1053,7 @@ void DrasculaEngine::animation_16_2() { clearRoom(); loadPic("his3.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); if (_lang != kSpanish) @@ -1077,7 +1077,7 @@ void DrasculaEngine::animation_16_2() { clearRoom(); loadPic("his4_1.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); loadPic("his4_2.alg"); decompressPic(dir_dibujo3, 1); @@ -1117,7 +1117,7 @@ asco: loadPic(roomDisk); decompressPic(dir_dibujo3, 1); loadPic(num_room); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); black(); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1779,7 +1779,7 @@ void DrasculaEngine::animation_6_3() { void DrasculaEngine::animation_rayo() { loadPic("anr_1.alg"); - decompressPic(dir_hare_frente, MEDIA); + decompressPic(dir_hare_frente, HALF_PAL); loadPic("anr_2.alg"); decompressPic(dir_hare_dch, 1); loadPic("anr_3.alg"); @@ -1966,7 +1966,7 @@ void DrasculaEngine::animation_5_5(){ updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); loadPic("101.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); loadPic("3an5_3.alg"); decompressPic(dir_hare_fondo, 1); loadPic("3an5_4.alg"); @@ -1997,7 +1997,7 @@ void DrasculaEngine::animation_5_5(){ clearRoom(); loadPic("49.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); } void DrasculaEngine::animation_6_5() { @@ -2101,11 +2101,11 @@ void DrasculaEngine::animation_12_5() { for (frame = 0; frame < 8; frame++) { if (frame == 2 || frame == 4 || frame == 8 || frame==10) - setvgapalette256((byte *)&palFondo1); + setPalette((byte *)&palFondo1); else if (frame == 1 || frame == 5 || frame == 7 || frame == 9) - setvgapalette256((byte *)&palFondo2); + setPalette((byte *)&palFondo2); else - setvgapalette256((byte *)&palFondo3); + setPalette((byte *)&palFondo3); pause(4); updateRoom(); @@ -2118,11 +2118,11 @@ void DrasculaEngine::animation_12_5() { for (frame = 0; frame < 15; frame++) { if (frame == 2 || frame == 4 || frame == 7 || frame == 9) - setvgapalette256((byte *)&palFondo1); + setPalette((byte *)&palFondo1); else if (frame == 1 || frame == 5) - setvgapalette256((byte *)&palJuego); + setPalette((byte *)&palJuego); else - setvgapalette256((byte *)&palFondo2); + setPalette((byte *)&palFondo2); pause(4); updateRoom(); @@ -2404,7 +2404,7 @@ void DrasculaEngine::animation_9_6() { carga_escoba("59.ald"); strcpy(num_room, "nada.alg"); loadPic("nota2.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); black(); sentido_hare = 1; hare_x -= 21; @@ -2419,7 +2419,7 @@ void DrasculaEngine::animation_9_6() { playMusic(9); clearRoom(); loadPic("nota.alg"); - decompressPic(dir_dibujo1, COMPLETA); + decompressPic(dir_dibujo1, COMPLETE_PAL); color_abc(WHITE); talk_solo(_textbj[_lang][24], "bj24.als"); talk_solo(_textbj[_lang][25], "bj25.als"); @@ -2429,9 +2429,9 @@ void DrasculaEngine::animation_9_6() { sentido_hare = 3; clearRoom(); loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETA); + decompressPic(dir_hare_frente, COMPLETE_PAL); loadPic("nota2.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); talk(_text[_lang][296], "296.als"); talk(_text[_lang][297], "297.als"); talk(_text[_lang][298], "298.als"); @@ -3209,7 +3209,7 @@ void DrasculaEngine::animation_6_2() { clearRoom(); loadPic("ciego1.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); loadPic("ciego2.alg"); decompressPic(dir_dibujo3, 1); loadPic("ciego3.alg"); @@ -3240,7 +3240,7 @@ void DrasculaEngine::animation_6_2() { playMusic(roomMusic); loadPic("9.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); loadPic("aux9.alg"); decompressPic(dir_dibujo3, 1); loadPic("96.alg"); @@ -3264,7 +3264,7 @@ void DrasculaEngine::animation_33_2() { clearRoom(); loadPic("ciego1.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); loadPic("ciego2.alg"); decompressPic(dir_dibujo3, 1); loadPic("ciego3.alg"); @@ -3296,7 +3296,7 @@ void DrasculaEngine::animation_33_2() { playMusic(roomMusic); loadPic("9.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); loadPic("aux9.alg"); decompressPic(dir_dibujo3, 1); loadPic("96.alg"); @@ -3406,7 +3406,7 @@ void DrasculaEngine::animation_6_4() { strcpy(num_room, "26.alg"); clearRoom(); loadPic("26.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); loadPic("aux26.alg"); decompressPic(dir_dibujo3, 1); loadPic("auxigor.alg"); @@ -3426,7 +3426,7 @@ void DrasculaEngine::animation_6_4() { loadPic(roomDisk); decompressPic(dir_dibujo3, 1); loadPic(num_room); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); withoutVerb(); updateRoom(); } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index cfb4e0940e..d6b1904689 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -173,19 +173,19 @@ int DrasculaEngine::go() { if (num_ejec == 1) { loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETA); + decompressPic(dir_hare_frente, COMPLETE_PAL); loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); loadPic("97.alg"); decompressPic(dir_hare_dch, 1); } else if (num_ejec == 2) { loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETA); + decompressPic(dir_hare_frente, COMPLETE_PAL); loadPic("pts.alg"); decompressPic(dir_dibujo2, 1); } else if (num_ejec == 3) { loadPic("aux13.alg"); - decompressPic(dir_dibujo1, COMPLETA); + decompressPic(dir_dibujo1, COMPLETE_PAL); loadPic("96.alg"); decompressPic(dir_hare_frente, 1); loadPic("97.alg"); @@ -194,7 +194,7 @@ int DrasculaEngine::go() { decompressPic(dir_hare_fondo, 1); } else if (num_ejec == 4) { loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETA); + decompressPic(dir_hare_frente, COMPLETE_PAL); if (hay_que_load == 0) animation_rayo(); loadPic("96.alg"); @@ -206,7 +206,7 @@ int DrasculaEngine::go() { decompressPic(dir_hare_dch, 1); } else if (num_ejec == 5) { loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETA); + decompressPic(dir_hare_frente, COMPLETE_PAL); loadPic("97.alg"); decompressPic(dir_hare_dch, 1); loadPic("99.alg"); @@ -220,7 +220,7 @@ int DrasculaEngine::go() { dir_pendulo = dir_dibujo3; loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETA); + decompressPic(dir_hare_frente, COMPLETE_PAL); loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); loadPic("97.alg"); @@ -370,14 +370,14 @@ void DrasculaEngine::black() { palNegra[254][1] = 0x3F; palNegra[254][2] = 0x15; - setvgapalette256((byte *)&palNegra); + setPalette((byte *)&palNegra); } void DrasculaEngine::updatePalette() { - setvgapalette256((byte *)&palJuego); + setPalette((byte *)&palJuego); } -void DrasculaEngine::setvgapalette256(byte *PalBuf) { +void DrasculaEngine::setPalette(byte *PalBuf) { byte pal[256 * 4]; int i; @@ -640,7 +640,7 @@ bucles: else loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); - setvgapalette256((byte *)&palJuego); + setPalette((byte *)&palJuego); menu_scr = 0; espera_soltar(); if (num_ejec != 3) @@ -933,9 +933,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { martini: getLine(ald, buffer, size); - sscanf(buffer, "%d", &objs_room); + sscanf(buffer, "%d", &numRoomObjs); - for (l = 0; l < objs_room; l++) { + for (l = 0; l < numRoomObjs; l++) { getLine(ald, buffer, size); sscanf(buffer, "%d", &num_obj[l]); getLine(ald, buffer, size); @@ -1009,7 +1009,7 @@ martini: } } - for (l = 0; l < objs_room; l++) { + for (l = 0; l < numRoomObjs; l++) { if (num_obj[l] == obj_saliendo) obj_salir = l; } @@ -1025,7 +1025,7 @@ martini: decompressPic(dir_dibujo3, 1); loadPic(num_room); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_dibujo3); @@ -1208,7 +1208,7 @@ void DrasculaEngine::mueve_cursor() { void DrasculaEngine::comprueba_objetos() { int l, veo = 0; - for (l = 0; l < objs_room; l++) { + for (l = 0; l < numRoomObjs; l++) { if (x_raton > x1[l] && y_raton > y1[l] && x_raton < x2[l] && y_raton < y2[l] && visible[l] == 1 && isDoor[l] == 0) { @@ -1265,7 +1265,7 @@ bool DrasculaEngine::comprueba1() { if (menu_scr == 1) saca_objeto(); else { - for (l = 0; l < objs_room; l++) { + for (l = 0; l < numRoomObjs; l++) { if (x_raton >= x1[l] && y_raton >= y1[l] && x_raton <= x2[l] && y_raton <= y2[l] && rompo == 0) { if (sal_de_la_habitacion(l)) @@ -1279,7 +1279,7 @@ bool DrasculaEngine::comprueba1() { && x_raton < hare_x + ancho_hare && y_raton < hare_y + alto_hare) rompo = 1; - for (l = 0; l < objs_room; l++) { + for (l = 0; l < numRoomObjs; l++) { if (x_raton > x1[l] && y_raton > y1[l] && x_raton < x2[l] && y_raton < y2[l] && rompo == 0) { sitio_x = sitiobj_x[l]; @@ -1323,7 +1323,7 @@ bool DrasculaEngine::comprueba2() { if (banderas(50)) return true; } else { - for (l = 0; l < objs_room; l++) { + for (l = 0; l < numRoomObjs; l++) { if (x_raton > x1[l] && y_raton > y1[l] && x_raton < x2[l] && y_raton < y2[l] && visible[l] == 1) { sentido_final = sentidobj[l]; @@ -1496,7 +1496,7 @@ bool DrasculaEngine::saves() { delete sav; loadPic("savescr.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); color_abc(LIGHT_GREEN); @@ -1594,7 +1594,7 @@ bool DrasculaEngine::saves() { clearRoom(); loadPic(num_room); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); hay_seleccion = 0; return true; @@ -1782,7 +1782,7 @@ void DrasculaEngine::salva_pantallas() { clearRoom(); loadPic("sv.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); //TODO inicio_ghost(); //TODO carga_ghost(); @@ -1802,7 +1802,7 @@ void DrasculaEngine::salva_pantallas() { } //TODO fin_ghost(); loadPic(num_room); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); } void DrasculaEngine::fliplay(const char *filefli, int vel) { @@ -1828,7 +1828,7 @@ void DrasculaEngine::FundeDelNegro(int VelocidadDeFundido) { } pause(VelocidadDeFundido); - setvgapalette256((byte *)&palFundido); + setPalette((byte *)&palFundido); } } @@ -1877,7 +1877,7 @@ void DrasculaEngine::color_abc(int cl) { palJuego[254][2] = 100; }; - setvgapalette256((byte *)&palJuego); + setPalette((byte *)&palJuego); } char DrasculaEngine::LimitaVGA(char valor) { @@ -2042,7 +2042,7 @@ void DrasculaEngine::FundeAlNegro(int VelocidadDeFundido) { } pause(VelocidadDeFundido); - setvgapalette256((byte *)&palFundido); + setPalette((byte *)&palFundido); } } @@ -3332,7 +3332,7 @@ int DrasculaEngine::PlayFrameSSN() { mSesion += 1; } switch (CHUNK) { - case SET_PALET: + case SET_PAL: if (!UsingMem) _Sesion->read(dacSSN, 768); else { @@ -3440,7 +3440,7 @@ byte *DrasculaEngine::TryInMem(Common::File *Sesion) { } void DrasculaEngine::set_dacSSN(byte *PalBuf) { - setvgapalette256((byte *)PalBuf); + setPalette((byte *)PalBuf); } void DrasculaEngine::Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght) { @@ -3518,7 +3518,7 @@ byte *DrasculaEngine::loadPCX(byte *NamePcc) { } void DrasculaEngine::set_dac(byte *dac) { - setvgapalette256((byte *)dac); + setPalette((byte *)dac); } void DrasculaEngine::WaitForNext(int FPS) { @@ -4489,7 +4489,7 @@ void DrasculaEngine::openDoor(int nflag, int n_puerta) { void DrasculaEngine::mapa() { int l, veo = 0; - for (l = 0; l < objs_room; l++) { + for (l = 0; l < numRoomObjs; l++) { if (x_raton > x1[l] && y_raton > y1[l] && x_raton < x2[l] && y_raton < y2[l] && visible[l] == 1) { @@ -4553,7 +4553,7 @@ void DrasculaEngine::activa_pendulo() { hare_se_ve = 0; strcpy(num_room, "102.alg"); loadPic("102.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); loadPic("an_p1.alg"); decompressPic(dir_dibujo3, 1); loadPic("an_p2.alg"); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 55be93203a..5cbc1fd403 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -78,9 +78,6 @@ struct DrasculaGameDescription; #define CLOSE 4 #define TALK 5 #define MOVE 6 -#define INICISOUND 6 -#define FINALSOUND 8 -#define FINDRV 9 #define DIF_MASK 55 #define OBJWIDTH 40 #define OBJHEIGHT 25 @@ -330,12 +327,12 @@ struct DrasculaGameDescription; #define CMP_RLE 1 #define CMP_OFF 2 #define END_ANIM 3 -#define SET_PALET 4 +#define SET_PAL 4 #define MOUSE_KEY 5 #define EMPTY_FRAME 6 -#define COMPLETA 256 -#define MEDIA 128 +#define COMPLETE_PAL 256 +#define HALF_PAL 128 class DrasculaEngine : public ::Engine { int _gameId; @@ -375,7 +372,7 @@ public: void setRGB(byte *dir_lectura, int plt); void paleta_hare(); void updatePalette(); - void setvgapalette256(byte *PalBuf); + void setPalette(byte *PalBuf); void copyBackground(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *src, byte *dest); void copyRect(int xorg, int yorg, int xdes, int ydes, int width, @@ -411,7 +408,7 @@ public: int nivel_osc, previousMusic, roomMusic; char num_room[20], roomDisk[20]; char currentData[20]; - int objs_room; + int numRoomObjs; char fondo_y_menu[20]; char objName[30][20]; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index b7e58103ea..7f6fa8f8b3 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1163,7 +1163,7 @@ void DrasculaEngine::room_59(int fl) { hare_se_ve = 1; clearRoom(); loadPic("tlef0.alg"); - decompressPic(dir_dibujo1, COMPLETA); + decompressPic(dir_dibujo1, COMPLETE_PAL); loadPic("tlef1.alg"); decompressPic(dir_dibujo3, 1); loadPic("tlef2.alg"); @@ -1190,11 +1190,11 @@ void DrasculaEngine::room_59(int fl) { loadPic("aux59.alg"); decompressPic(dir_dibujo3, 1); loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETA); + decompressPic(dir_hare_frente, COMPLETE_PAL); loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); loadPic("59.alg"); - decompressPic(dir_dibujo1, MEDIA); + decompressPic(dir_dibujo1, HALF_PAL); sentido_hare = 3; talk(_text[_lang][245], "245.als"); withoutVerb(); -- cgit v1.2.3 From 1d018f6046a590e55c6e1fc884124a9346819586 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 11 May 2008 21:09:16 +0000 Subject: Formatting. svn-id: r32037 --- engines/kyra/screen.cpp | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 6a6141b5c0..568befac1e 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -307,14 +307,16 @@ const uint8 *Screen::getCPagePtr(int pageNum) const { uint8 *Screen::getPageRect(int pageNum, int x, int y, int w, int h) { debugC(9, kDebugLevelScreen, "Screen::getPageRect(%d, %d, %d, %d, %d)", pageNum, x, y, w, h); assert(pageNum < SCREEN_PAGE_NUM); - if (pageNum == 0 || pageNum == 1) addDirtyRect(x, y, w, h); + if (pageNum == 0 || pageNum == 1) + addDirtyRect(x, y, w, h); return _pagePtrs[pageNum] + y * SCREEN_W + x; } void Screen::clearPage(int pageNum) { debugC(9, kDebugLevelScreen, "Screen::clearPage(%d)", pageNum); assert(pageNum < SCREEN_PAGE_NUM); - if (pageNum == 0 || pageNum == 1) _forceFullUpdate = true; + if (pageNum == 0 || pageNum == 1) + _forceFullUpdate = true; memset(getPagePtr(pageNum), 0, SCREEN_PAGE_SIZE); clearOverlayPage(pageNum); } @@ -329,7 +331,8 @@ int Screen::setCurPage(int pageNum) { void Screen::clearCurPage() { debugC(9, kDebugLevelScreen, "Screen::clearCurPage()"); - if (_curPage == 0 || _curPage == 1) _forceFullUpdate = true; + if (_curPage == 0 || _curPage == 1) + _forceFullUpdate = true; memset(getPagePtr(_curPage), 0, SCREEN_PAGE_SIZE); clearOverlayPage(_curPage); } @@ -478,7 +481,7 @@ void Screen::copyToPage0(int y, int h, uint8 page, uint8 *seqBuf) { } addDirtyRect(0, y, SCREEN_W, h); // This would remove the text in the end sequence of - // the FM-Towns version. + // the (Kyrandia 1) FM-Towns version. // Since this method is just used for the Seqplayer // this shouldn't be a problem anywhere else, so it's // safe to disable the call here. @@ -576,7 +579,8 @@ void Screen::copyPage(uint8 srcPage, uint8 dstPage) { memcpy(dst, src, SCREEN_W * SCREEN_H); copyOverlayRegion(0, 0, 0, 0, SCREEN_W, SCREEN_H, srcPage, dstPage); - if (dstPage == 0 || dstPage == 1) _forceFullUpdate = true; + if (dstPage == 0 || dstPage == 1) + _forceFullUpdate = true; } void Screen::copyBlockToPage(int pageNum, int x, int y, int w, int h, const uint8 *src) { @@ -873,7 +877,7 @@ bool Screen::loadFont(FontId fontId, const char *filename) { uint8 *fontData = fnt->fontData = _vm->resource()->fileData(filename, &sz); if (!fontData || !sz) - error("couldn't load font file '%s'", filename); + error("Couldn't load font file '%s'", filename); uint16 fontSig = READ_LE_UINT16(fontData + 2); @@ -934,15 +938,14 @@ int Screen::getTextWidth(const char *str) const { if (c == 0) { break; } else if (c == '\r') { - if (curLineLen > maxLineLen) { + if (curLineLen > maxLineLen) maxLineLen = curLineLen; - } else { + else curLineLen = 0; - } } else { - if (c <= 0x7F || !_useSJIS) + if (c <= 0x7F || !_useSJIS) { curLineLen += getCharWidth(c); - else { + } else { c = READ_LE_UINT16(str - 1); ++str; curLineLen += getCharWidth(c); @@ -1894,11 +1897,10 @@ void Screen::wrapped_decodeFrameDelta(uint8 *dst, const uint8 *src) { void Screen::decodeFrameDeltaPage(uint8 *dst, const uint8 *src, int pitch, bool noXor) { debugC(9, kDebugLevelScreen, "Screen::decodeFrameDeltaPage(%p, %p, %d, %d)", (const void *)dst, (const void *)src, pitch, noXor); - if (noXor) { + if (noXor) wrapped_decodeFrameDeltaPage(dst, src, pitch); - } else { + else wrapped_decodeFrameDeltaPage(dst, src, pitch); - } } void Screen::convertAmigaGfx(uint8 *data, int w, int h, bool offscreen) { -- cgit v1.2.3 From d123c67174df225addabec714f9d267b1688d5ee Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 11 May 2008 21:28:51 +0000 Subject: Fix QuickTime MIDI driver compilation svn-id: r32038 --- backends/midi/quicktime.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp index e22c99504b..1e0e76ee1a 100644 --- a/backends/midi/quicktime.cpp +++ b/backends/midi/quicktime.cpp @@ -262,7 +262,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError QuicktimeMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError QuickTimeMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_QT(); return kNoError; -- cgit v1.2.3 From 9390c4021a7df308fc67873c89550e462d74d4f7 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 11 May 2008 22:08:18 +0000 Subject: Implemented saving/loading in Woodruff. Should work, although it tries to save and load sprites (which we ignore currently, doesn't seem to have any impact). svn-id: r32040 --- engines/gob/saveload.h | 14 ++++ engines/gob/saveload_v4.cpp | 194 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 208 insertions(+) diff --git a/engines/gob/saveload.h b/engines/gob/saveload.h index d13bd2c15f..9581b43a6c 100644 --- a/engines/gob/saveload.h +++ b/engines/gob/saveload.h @@ -335,9 +335,12 @@ class SaveLoad_v4 : public SaveLoad { public: enum SaveType { kSaveNone, + kSaveGame, kSaveTempBuffer }; + bool _firstSizeGame; + SaveLoad_v4(GobEngine *vm, const char *targetName); virtual ~SaveLoad_v4(); @@ -356,6 +359,11 @@ protected: int32 _varSize; PagedBuffer _tmpBuffer; + StagedSave _save; + + byte _propBuffer[1000]; + byte _indexBuffer[1200]; + bool _hasIndex; virtual int getSaveType(const char *fileName); @@ -363,10 +371,16 @@ protected: virtual bool loadVersioned(int type, int16 dataVar, int32 size, int32 offset); virtual bool saveVersioned(int type, int16 dataVar, int32 size, int32 offset); + int getSlot(int32 offset) const; + int getSlotRemainder(int32 offset) const; + + int32 getSizeGame(SaveFile &saveFile); int32 getSizeTempBuffer(SaveFile &saveFile); + bool loadGame(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); bool loadTempBuffer(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool saveGame(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); bool saveTempBuffer(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); void assertInited(); diff --git a/engines/gob/saveload_v4.cpp b/engines/gob/saveload_v4.cpp index 75e44cc1bc..a770f03c00 100644 --- a/engines/gob/saveload_v4.cpp +++ b/engines/gob/saveload_v4.cpp @@ -33,16 +33,27 @@ namespace Gob { SaveLoad_v4::SaveFile SaveLoad_v4::_saveFiles[] = { + { "cat.inf", 0, kSaveModeSave, kSaveGame }, { "save.tmp", 0, kSaveModeSave, kSaveTempBuffer } }; SaveLoad_v4::SaveLoad_v4(GobEngine *vm, const char *targetName) : SaveLoad(vm, targetName) { + _firstSizeGame = true; + + _saveFiles[0].destName = new char[strlen(targetName) + 5]; + _saveFiles[1].destName = 0; + + sprintf(_saveFiles[0].destName, "%s.s00", targetName); + _varSize = 0; + _hasIndex = false; + memset(_propBuffer, 0, 1000); } SaveLoad_v4::~SaveLoad_v4() { + delete[] _saveFiles[0].destName; } SaveLoad::SaveMode SaveLoad_v4::getSaveMode(const char *fileName) { @@ -67,6 +78,8 @@ int32 SaveLoad_v4::getSizeVersioned(int type) { assertInited(); switch (_saveFiles[type].type) { + case kSaveGame: + return getSizeGame(_saveFiles[type]); case kSaveTempBuffer: return getSizeTempBuffer(_saveFiles[type]); default: @@ -80,6 +93,13 @@ bool SaveLoad_v4::loadVersioned(int type, int16 dataVar, int32 size, int32 offse assertInited(); switch (_saveFiles[type].type) { + case kSaveGame: + if (loadGame(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While loading from slot %d", getSlot(offset)); + break; + case kSaveTempBuffer: if (loadTempBuffer(_saveFiles[type], dataVar, size, offset)) return true; @@ -98,6 +118,13 @@ bool SaveLoad_v4::saveVersioned(int type, int16 dataVar, int32 size, int32 offse assertInited(); switch (_saveFiles[type].type) { + case kSaveGame: + if (saveGame(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While saving to slot %d", getSlot(offset)); + break; + case kSaveTempBuffer: if (saveTempBuffer(_saveFiles[type], dataVar, size, offset)) return true; @@ -112,25 +139,188 @@ bool SaveLoad_v4::saveVersioned(int type, int16 dataVar, int32 size, int32 offse return false; } +int SaveLoad_v4::getSlot(int32 offset) const { + return ((offset - 1700) / _varSize); +} + +int SaveLoad_v4::getSlotRemainder(int32 offset) const { + return ((offset - 1700) % _varSize); +} + +int32 SaveLoad_v4::getSizeGame(SaveFile &saveFile) { + if (_firstSizeGame) { + _firstSizeGame = false; + return -1; + } + + Common::SaveFileManager *saveMan = g_system->getSavefileManager(); + Common::InSaveFile *in; + int32 size = -1; + + for (int i = 29; i >= 0; i--) { + in = saveMan->openForLoading(setCurrentSlot(saveFile.destName, i)); + if (in) { + delete in; + size = (i + 1) * _varSize + 1700; + break; + } + } + + return size; +} + int32 SaveLoad_v4::getSizeTempBuffer(SaveFile &saveFile) { return _tmpBuffer.getSize(); } +bool SaveLoad_v4::loadGame(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { + + if (size == 0) { + dataVar = 0; + size = _varSize; + } + + if (offset < 500) { + debugC(3, kDebugSaveLoad, "Loading global properties"); + + if ((size + offset) > 500) { + warning("Wrong global properties list size (%d, %d)", size, offset); + return false; + } + + memcpy(_vm->_global->_inter_variables + dataVar, + _propBuffer + offset, size); + memcpy(_vm->_global->_inter_variablesSizes + dataVar, + _propBuffer + offset + 500, size); + + } else if (offset == 500) { + debugC(3, kDebugSaveLoad, "Loading save index"); + + if (size != 1200) { + warning("Requested index has wrong size (%d)", size); + return false; + } + + SaveLoad::buildIndex(_vm->_global->_inter_variables + dataVar, + saveFile.destName, 30, 40, 1000); + memset(_vm->_global->_inter_variablesSizes + dataVar, 0, 1200); + + } else { + int slot = getSlot(offset); + int slotRem = getSlotRemainder(offset); + + debugC(2, kDebugSaveLoad, "Loading from slot %d", slot); + + SaveLoad::setCurrentSlot(saveFile.destName, slot); + + if ((slot < 0) || (slot >= 30) || (slotRem != 0)) { + warning("Invalid loading procedure (%d, %d, %d, %d, %d)", + dataVar, size, offset, slot, slotRem); + return false; + } + + if (!_save.load(dataVar, size, 540, saveFile.destName, + _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes)) + return false; + } + + return true; +} + bool SaveLoad_v4::loadTempBuffer(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset) { debugC(3, kDebugSaveLoad, "Loading from the temporary buffer (%d, %d, %d)", dataVar, size, offset); + if (size < 0) { + warning("Woodruff stub: Read screenshot"); + return false; + } + return _tmpBuffer.read(_vm->_global->_inter_variables + dataVar, size, offset); } +bool SaveLoad_v4::saveGame(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { + + if (size == 0) { + dataVar = 0; + size = _varSize; + } + + if (offset < 500) { + debugC(3, kDebugSaveLoad, "Loading global properties"); + + if ((size + offset) > 500) { + warning("Wrong global properties list size (%d, %d)", size, offset); + return false; + } + + memcpy(_propBuffer + offset, + _vm->_global->_inter_variables + dataVar, size); + memcpy(_propBuffer + offset + 500, + _vm->_global->_inter_variablesSizes + dataVar, size); + + } else if (offset == 500) { + debugC(3, kDebugSaveLoad, "Saving save index"); + + if (size != 1200) { + warning("Requested index has wrong size (%d)", size); + return false; + } + + memcpy(_indexBuffer, _vm->_global->_inter_variables + dataVar, size); + _hasIndex = true; + + } else { + int slot = getSlot(offset); + int slotRem = getSlotRemainder(offset); + + debugC(2, kDebugSaveLoad, "Saving to slot %d", slot); + + SaveLoad::setCurrentSlot(saveFile.destName, slot); + + if ((slot < 0) || (slot >= 30) || (slotRem != 0)) { + warning("Invalid saving procedure (%d, %d, %d, %d, %d)", + dataVar, size, offset, slot, slotRem); + return false; + } + + if (!_hasIndex) { + warning("No index written yet"); + return false; + } + + _hasIndex = false; + + if(!_save.save(0, 500, 0, saveFile.destName, _propBuffer, _propBuffer + 500)) + return false; + + if(!_save.save(0, 40, 500, saveFile.destName, _indexBuffer + (slot * 40), 0)) + return false; + + if (!_save.save(dataVar, size, 540, saveFile.destName, + _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes)) + return false; + + } + + return true; +} + bool SaveLoad_v4::saveTempBuffer(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset) { debugC(3, kDebugSaveLoad, "Saving to the temporary buffer (%d, %d, %d)", dataVar, size, offset); + if (size < 0) { + warning("Woodruff stub: Write screenshot"); + return false; + } + return _tmpBuffer.write(_vm->_global->_inter_variables + dataVar, size, offset); } @@ -139,6 +329,10 @@ void SaveLoad_v4::assertInited() { return; _varSize = READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4; + + _save.addStage(500); + _save.addStage(40, false); + _save.addStage(_varSize); } } // End of namespace Gob -- cgit v1.2.3 From 6e3c92e2392eb429723e23a4c782e0c1a7037b18 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 11 May 2008 22:08:32 +0000 Subject: Renamed some parallaction member vars to have a leading underscore (besides being part of our code formatting conventions, this fixes various name clash warnings) svn-id: r32041 --- engines/parallaction/parser.h | 10 +-- engines/parallaction/parser_br.cpp | 44 +++++------ engines/parallaction/parser_ns.cpp | 148 ++++++++++++++++++------------------- 3 files changed, 101 insertions(+), 101 deletions(-) diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h index 1af8cafc38..d600f9eb9d 100644 --- a/engines/parallaction/parser.h +++ b/engines/parallaction/parser.h @@ -123,8 +123,8 @@ class LocationParser_ns { protected: Parallaction_ns* _vm; - Script *script; - Parser *parser; + Script *_script; + Parser *_parser; Table *_zoneTypeNames; Table *_zoneFlagNames; @@ -315,11 +315,11 @@ public: class ProgramParser_ns { protected: - Parser *parser; + Parser *_parser; Parallaction_ns *_vm; - Script *script; - ProgramPtr program; + Script *_script; + ProgramPtr _program; // program parser OpcodeSet _instructionParsers; diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp index 74c7d79e1f..d9dd2ef5c8 100644 --- a/engines/parallaction/parser_br.cpp +++ b/engines/parallaction/parser_br.cpp @@ -435,7 +435,7 @@ DECLARE_LOCATION_PARSER(character) { DECLARE_LOCATION_PARSER(ifchar) { debugC(7, kDebugParser, "LOCATION_PARSER(ifchar) "); - script->skip("ENDIF"); + _script->skip("ENDIF"); } @@ -487,7 +487,7 @@ DECLARE_COMMAND_PARSER(ifchar) { debugC(7, kDebugParser, "COMMAND_PARSER(ifchar) "); if (!scumm_stricmp(_vm->_char.getName(), _tokens[1])) - script->skip("endif"); + _script->skip("endif"); } @@ -501,7 +501,7 @@ DECLARE_COMMAND_PARSER(endif) { DECLARE_COMMAND_PARSER(location) { debugC(7, kDebugParser, "COMMAND_PARSER(location) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); ctxt.cmd->u._string = strdup(_tokens[1]); ctxt.nextToken++; @@ -530,7 +530,7 @@ DECLARE_COMMAND_PARSER(location) { DECLARE_COMMAND_PARSER(string) { debugC(7, kDebugParser, "COMMAND_PARSER(string) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); ctxt.cmd->u._string = strdup(_tokens[1]); ctxt.nextToken++; @@ -542,7 +542,7 @@ DECLARE_COMMAND_PARSER(string) { DECLARE_COMMAND_PARSER(math) { debugC(7, kDebugParser, "COMMAND_PARSER(math) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); ctxt.cmd->u._lvalue = _vm->_countersNames->lookup(_tokens[1]); ctxt.nextToken++; @@ -557,7 +557,7 @@ DECLARE_COMMAND_PARSER(math) { DECLARE_COMMAND_PARSER(test) { debugC(7, kDebugParser, "COMMAND_PARSER(test) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); uint counter = _vm->_countersNames->lookup(_tokens[1]); ctxt.nextToken++; @@ -590,7 +590,7 @@ DECLARE_COMMAND_PARSER(test) { DECLARE_COMMAND_PARSER(music) { debugC(7, kDebugParser, "COMMAND_PARSER(music) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); ctxt.cmd->u._musicCommand = _audioCommandsNames->lookup(_tokens[1]); ctxt.nextToken++; @@ -608,7 +608,7 @@ DECLARE_COMMAND_PARSER(music) { DECLARE_COMMAND_PARSER(zeta) { debugC(7, kDebugParser, "COMMAND_PARSER(zeta) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); ctxt.cmd->u._zeta0 = atoi(_tokens[1]); ctxt.nextToken++; @@ -630,7 +630,7 @@ DECLARE_COMMAND_PARSER(zeta) { DECLARE_COMMAND_PARSER(give) { debugC(7, kDebugParser, "COMMAND_PARSER(give) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); ctxt.cmd->u._object = 4 + atoi(_tokens[1]); ctxt.nextToken++; @@ -656,7 +656,7 @@ DECLARE_COMMAND_PARSER(give) { DECLARE_COMMAND_PARSER(text) { debugC(7, kDebugParser, "COMMAND_PARSER(text) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); if (isdigit(_tokens[1][1])) { ctxt.cmd->u._zeta0 = atoi(_tokens[1]); @@ -682,7 +682,7 @@ DECLARE_COMMAND_PARSER(text) { DECLARE_COMMAND_PARSER(unary) { debugC(7, kDebugParser, "COMMAND_PARSER(unary) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); ctxt.cmd->u._rvalue = atoi(_tokens[1]); ctxt.nextToken++; @@ -733,7 +733,7 @@ DECLARE_ZONE_PARSER(type) { // } } - parser->popTables(); + _parser->popTables(); } @@ -777,7 +777,7 @@ DECLARE_ANIM_PARSER(endanimation) { ctxt.a->_flags |= 0x1000000; - parser->popTables(); + _parser->popTables(); } @@ -793,7 +793,7 @@ DECLARE_INSTRUCTION_PARSER(zone) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(zone) "); ctxt.inst->_z = _vm->findZone(_tokens[1]); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -807,7 +807,7 @@ DECLARE_INSTRUCTION_PARSER(color) { ctxt.inst->_colors[0] = atoi(_tokens[2]); ctxt.inst->_colors[1] = atoi(_tokens[3]); ctxt.inst->_colors[2] = atoi(_tokens[4]); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -819,7 +819,7 @@ DECLARE_INSTRUCTION_PARSER(mask) { parseRValue(ctxt.inst->_opA, _tokens[1]); parseRValue(ctxt.inst->_opB, _tokens[2]); parseRValue(ctxt.inst->_opC, _tokens[3]); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -828,7 +828,7 @@ DECLARE_INSTRUCTION_PARSER(print) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(print) "); parseRValue(ctxt.inst->_opB, _tokens[1]); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -851,7 +851,7 @@ DECLARE_INSTRUCTION_PARSER(text) { if (_tokens[_si][0] != '\0' && scumm_stricmp("flags", _tokens[_si])) { ctxt.inst->_text2 = strdup(_tokens[_si]); } - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -890,7 +890,7 @@ DECLARE_INSTRUCTION_PARSER(endif) { // ctxt.openIf->_endif = ctxt.inst; ctxt.openIf = nullInstructionPtr; - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -901,7 +901,7 @@ void ProgramParser_br::parseRValue(ScriptVar &v, const char *str) { return; } - int index = program->findLocal(str); + int index = _program->findLocal(str); if (index != -1) { v.setLocal(&ctxt.locals[index]); return; @@ -953,7 +953,7 @@ typedef OpcodeImpl OpcodeV3; void LocationParser_br::init() { - parser = new Parser; + _parser = new Parser; _zoneFlagNames = new Table(ARRAYSIZE(_zoneFlagNamesRes_br), _zoneFlagNamesRes_br); _zoneTypeNames = new Table(ARRAYSIZE(_zoneTypeNamesRes_br), _zoneTypeNamesRes_br); @@ -1079,7 +1079,7 @@ void LocationParser_br::init() { void ProgramParser_br::init() { - parser = new Parser; + _parser = new Parser; _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes_br), _instructionNamesRes_br); diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index ba8b2c87e0..4966d46ad3 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -189,7 +189,7 @@ const char *_instructionNamesRes_ns[] = { void LocationParser_ns::warning_unexpected() { - debugC(1, kDebugParser, "unexpected keyword '%s' in line %i", _tokens[0], script->getLine()); + debugC(1, kDebugParser, "unexpected keyword '%s' in line %i", _tokens[0], _script->getLine()); } @@ -226,7 +226,7 @@ DECLARE_ANIM_PARSER(type) { ctxt.a->_flags |= 0x1000000; - parser->popTables(); + _parser->popTables(); } @@ -290,7 +290,7 @@ DECLARE_ANIM_PARSER(endanimation) { ctxt.a->_flags |= 0x1000000; - parser->popTables(); + _parser->popTables(); } void LocationParser_ns::parseAnimation(AnimationList &list, char *name) { @@ -303,14 +303,14 @@ void LocationParser_ns::parseAnimation(AnimationList &list, char *name) { list.push_front(AnimationPtr(a)); ctxt.a = a; - parser->pushTables(&_locationAnimParsers, _locationAnimStmt); + _parser->pushTables(&_locationAnimParsers, _locationAnimStmt); } void ProgramParser_ns::parseInstruction() { InstructionPtr inst(new Instruction); - script->readLineToken(true); + _script->readLineToken(true); if (_tokens[0][1] == '.') { _tokens[0][1] = '\0'; @@ -320,32 +320,32 @@ void ProgramParser_ns::parseInstruction() { _tokens[1][1] = '\0'; ctxt.a = _vm->findAnimation(&_tokens[1][2]); } else - ctxt.a = program->_anim; + ctxt.a = _program->_anim; ctxt.inst = inst; - parser->parseStatement(); + _parser->parseStatement(); - program->_instructions.push_back(inst); + _program->_instructions.push_back(inst); return; } void ProgramParser_ns::parse(Script *script, ProgramPtr program) { - this->script = script; - this->program = program; + _script = script; + _program = program; ctxt.openIf = nullInstructionPtr; ctxt.end = false; ctxt.locals = program->_locals; - parser->reset(); - parser->pushTables(&_instructionParsers, _instructionNames); + _parser->reset(); + _parser->pushTables(&_instructionParsers, _instructionNames); do { parseInstruction(); } while (!ctxt.end); - parser->popTables(); + _parser->popTables(); program->_ip = program->_instructions.begin(); } @@ -377,7 +377,7 @@ DECLARE_INSTRUCTION_PARSER(animation) { ctxt.inst->_a = _vm->findAnimation(_tokens[1]); } - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -385,7 +385,7 @@ DECLARE_INSTRUCTION_PARSER(loop) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(loop) "); parseRValue(ctxt.inst->_opB, _tokens[1]); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -394,7 +394,7 @@ DECLARE_INSTRUCTION_PARSER(x) { parseLValue(ctxt.inst->_opA, "X"); parseRValue(ctxt.inst->_opB, _tokens[1]); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -403,7 +403,7 @@ DECLARE_INSTRUCTION_PARSER(y) { parseLValue(ctxt.inst->_opA, "Y"); parseRValue(ctxt.inst->_opB, _tokens[1]); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -412,7 +412,7 @@ DECLARE_INSTRUCTION_PARSER(z) { parseLValue(ctxt.inst->_opA, "Z"); parseRValue(ctxt.inst->_opB, _tokens[1]); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -421,7 +421,7 @@ DECLARE_INSTRUCTION_PARSER(f) { parseLValue(ctxt.inst->_opA, "F"); parseRValue(ctxt.inst->_opB, _tokens[1]); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -434,7 +434,7 @@ DECLARE_INSTRUCTION_PARSER(inc) { if (!scumm_stricmp(_tokens[3], "mod")) { ctxt.inst->_flags |= kInstMod; } - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -446,13 +446,13 @@ DECLARE_INSTRUCTION_PARSER(set) { // script was commented out on Dos version. This workaround enables the engine // to dynamically add a local variable when it is encountered the first time in // the script, so should fix any other occurrence as well. - if (program->findLocal(_tokens[1]) == -1) { - program->addLocal(_tokens[1]); + if (_program->findLocal(_tokens[1]) == -1) { + _program->addLocal(_tokens[1]); } parseLValue(ctxt.inst->_opA, _tokens[1]); parseRValue(ctxt.inst->_opB, _tokens[2]); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -461,7 +461,7 @@ DECLARE_INSTRUCTION_PARSER(move) { parseRValue(ctxt.inst->_opA, _tokens[1]); parseRValue(ctxt.inst->_opB, _tokens[2]); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -479,7 +479,7 @@ DECLARE_INSTRUCTION_PARSER(put) { if (!scumm_stricmp(_tokens[4], "masked")) { ctxt.inst->_flags |= kInstMaskedPut; } - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -490,7 +490,7 @@ DECLARE_INSTRUCTION_PARSER(call) { if (index == Table::notFound) error("unknown callable '%s'", _tokens[1]); ctxt.inst->_immediate = index - 1; - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -498,13 +498,13 @@ DECLARE_INSTRUCTION_PARSER(sound) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(sound) "); ctxt.inst->_z = _vm->findZone(_tokens[1]); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } DECLARE_INSTRUCTION_PARSER(null) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(null) "); - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -515,9 +515,9 @@ DECLARE_INSTRUCTION_PARSER(defLocal) { int16 index; if (_tokens[3][0] != '\0') { - index = program->addLocal(_tokens[0], val, atoi(_tokens[3]), atoi(_tokens[4])); + index = _program->addLocal(_tokens[0], val, atoi(_tokens[3]), atoi(_tokens[4])); } else { - index = program->addLocal(_tokens[0], val); + index = _program->addLocal(_tokens[0], val); } ctxt.inst->_opA.setLocal(&ctxt.locals[index]); @@ -530,7 +530,7 @@ DECLARE_INSTRUCTION_PARSER(endscript) { debugC(7, kDebugParser, "INSTRUCTION_PARSER(endscript) "); ctxt.end = true; - ctxt.inst->_index = parser->_lookup; + ctxt.inst->_index = _parser->_lookup; } @@ -542,7 +542,7 @@ void ProgramParser_ns::parseRValue(ScriptVar &v, const char *str) { return; } - int index = program->findLocal(str); + int index = _program->findLocal(str); if (index != -1) { v.setLocal(&ctxt.locals[index]); return; @@ -572,7 +572,7 @@ void ProgramParser_ns::parseRValue(ScriptVar &v, const char *str) { void ProgramParser_ns::parseLValue(ScriptVar &v, const char *str) { - int index = program->findLocal(str); + int index = _program->findLocal(str); if (index != -1) { v.setLocal(&ctxt.locals[index]); return; @@ -604,7 +604,7 @@ void ProgramParser_ns::parseLValue(ScriptVar &v, const char *str) { DECLARE_COMMAND_PARSER(flags) { debugC(7, kDebugParser, "COMMAND_PARSER(flags) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); if (_vm->_globalTable->lookup(_tokens[1]) == Table::notFound) { do { @@ -631,7 +631,7 @@ DECLARE_COMMAND_PARSER(flags) { DECLARE_COMMAND_PARSER(zone) { debugC(7, kDebugParser, "COMMAND_PARSER(zone) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); ctxt.cmd->u._zone = _vm->findZone(_tokens[ctxt.nextToken]); if (!ctxt.cmd->u._zone) { @@ -647,7 +647,7 @@ DECLARE_COMMAND_PARSER(zone) { DECLARE_COMMAND_PARSER(location) { debugC(7, kDebugParser, "COMMAND_PARSER(location) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); ctxt.cmd->u._string = strdup(_tokens[ctxt.nextToken]); ctxt.nextToken++; @@ -660,7 +660,7 @@ DECLARE_COMMAND_PARSER(location) { DECLARE_COMMAND_PARSER(drop) { debugC(7, kDebugParser, "COMMAND_PARSER(drop) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); ctxt.cmd->u._object = 4 + _vm->_objectsNames->lookup(_tokens[ctxt.nextToken]); ctxt.nextToken++; @@ -673,7 +673,7 @@ DECLARE_COMMAND_PARSER(drop) { DECLARE_COMMAND_PARSER(call) { debugC(7, kDebugParser, "COMMAND_PARSER(call) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); ctxt.cmd->u._callable = _vm->_callableNames->lookup(_tokens[ctxt.nextToken]) - 1; ctxt.nextToken++; @@ -686,7 +686,7 @@ DECLARE_COMMAND_PARSER(call) { DECLARE_COMMAND_PARSER(simple) { debugC(7, kDebugParser, "COMMAND_PARSER(simple) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); addCommand(); } @@ -694,7 +694,7 @@ DECLARE_COMMAND_PARSER(simple) { DECLARE_COMMAND_PARSER(move) { debugC(7, kDebugParser, "COMMAND_PARSER(move) "); - createCommand(parser->_lookup); + createCommand(_parser->_lookup); ctxt.cmd->u._move.x = atoi(_tokens[ctxt.nextToken]); ctxt.nextToken++; @@ -708,7 +708,7 @@ DECLARE_COMMAND_PARSER(move) { DECLARE_COMMAND_PARSER(endcommands) { debugC(7, kDebugParser, "COMMAND_PARSER(endcommands) "); - parser->popTables(); + _parser->popTables(); // temporary trick to handle dialogue commands ctxt.endcommands = true; @@ -813,7 +813,7 @@ void LocationParser_ns::parseCommands(CommandList& list) { ctxt.list = &list; ctxt.endcommands = false; - parser->pushTables(&_commandParsers, _commandsNames); + _parser->pushTables(&_commandParsers, _commandsNames); } Dialogue *LocationParser_ns::parseDialogue() { @@ -826,7 +826,7 @@ Dialogue *LocationParser_ns::parseDialogue() { Table forwards(20); - script->readLineToken(true); + _script->readLineToken(true); while (scumm_stricmp(_tokens[0], "enddialogue")) { if (scumm_stricmp(_tokens[0], "Question")) continue; @@ -835,7 +835,7 @@ Dialogue *LocationParser_ns::parseDialogue() { dialogue->_questions[numQuestions++] = parseQuestion(); - script->readLineToken(true); + _script->readLineToken(true); } resolveDialogueForwards(dialogue, numQuestions, forwards); @@ -852,12 +852,12 @@ Question *LocationParser_ns::parseQuestion() { question->_text = parseDialogueString(); - script->readLineToken(true); + _script->readLineToken(true); question->_mood = atoi(_tokens[0]); uint16 numAnswers = 0; - script->readLineToken(true); + _script->readLineToken(true); while (scumm_stricmp(_tokens[0], "endquestion")) { // parse answers question->_answers[numAnswers] = parseAnswer(); numAnswers++; @@ -903,21 +903,21 @@ Answer *LocationParser_ns::parseAnswer() { answer->_text = parseDialogueString(); - script->readLineToken(true); + _script->readLineToken(true); answer->_mood = atoi(_tokens[0]); answer->_following._name = parseDialogueString(); - script->readLineToken(true); + _script->readLineToken(true); if (!scumm_stricmp(_tokens[0], "commands")) { parseCommands(answer->_commands); ctxt.endcommands = false; do { - script->readLineToken(true); - parser->parseStatement(); + _script->readLineToken(true); + _parser->parseStatement(); } while (!ctxt.endcommands); - script->readLineToken(true); + _script->readLineToken(true); } return answer; @@ -952,7 +952,7 @@ char *LocationParser_ns::parseDialogueString() { char *vD0 = NULL; do { - vD0 = script->readLine(vC8, 200); + vD0 = _script->readLine(vC8, 200); if (vD0 == 0) return NULL; vD0 = Common::ltrim(vD0); @@ -1109,16 +1109,16 @@ void LocationParser_ns::parse(Script *script) { _numForwardedCommands = 0; ctxt.end = false; - this->script = script; + _script = script; ctxt.filename = 0;//filename; - parser->reset(); - parser->pushTables(&_locationParsers, _locationStmt); + _parser->reset(); + _parser->pushTables(&_locationParsers, _locationStmt); do { - script->readLineToken(true); - parser->parseStatement(); + _script->readLineToken(true); + _parser->parseStatement(); } while (!ctxt.end); - parser->popTables(); + _parser->popTables(); resolveCommandForwards(); } @@ -1126,7 +1126,7 @@ void LocationParser_ns::parse(Script *script) { void LocationParser_ns::parseWalkNodes(WalkNodeList &list) { debugC(5, kDebugParser, "parseWalkNodes()"); - script->readLineToken(true); + _script->readLineToken(true); while (scumm_stricmp(_tokens[0], "ENDNODES")) { if (!scumm_stricmp(_tokens[0], "COORD")) { @@ -1139,7 +1139,7 @@ void LocationParser_ns::parseWalkNodes(WalkNodeList &list) { list.push_front(v4); } - script->readLineToken(true); + _script->readLineToken(true); } debugC(5, kDebugParser, "parseWalkNodes() done"); @@ -1160,7 +1160,7 @@ typedef OpcodeImpl OpcodeV2; void LocationParser_ns::init() { - parser = new Parser; + _parser = new Parser; _zoneFlagNames = new Table(ARRAYSIZE(_zoneFlagNamesRes_ns), _zoneFlagNamesRes_ns); _zoneTypeNames = new Table(ARRAYSIZE(_zoneTypeNamesRes_ns), _zoneTypeNamesRes_ns); @@ -1253,7 +1253,7 @@ void LocationParser_ns::init() { void ProgramParser_ns::init() { - parser = new Parser; + _parser = new Parser; _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes_ns), _instructionNamesRes_ns); @@ -1296,7 +1296,7 @@ char *LocationParser_ns::parseComment() { do { char v190[400]; - v194 = script->readLine(v190, 400); + v194 = _script->readLine(v190, 400); v194[strlen(v194)-1] = '\0'; if (!scumm_stricmp(v194, "endtext")) @@ -1320,7 +1320,7 @@ DECLARE_ZONE_PARSER(null) { DECLARE_ZONE_PARSER(endzone) { debugC(7, kDebugParser, "ZONE_PARSER(endzone) "); - parser->popTables(); + _parser->popTables(); } DECLARE_ZONE_PARSER(limits) { @@ -1353,7 +1353,7 @@ DECLARE_ZONE_PARSER(type) { parseZoneTypeBlock(ctxt.z); } - parser->popTables(); + _parser->popTables(); } @@ -1388,7 +1388,7 @@ void LocationParser_ns::parseZone(ZoneList &list, char *name) { debugC(5, kDebugParser, "parseZone(name: %s)", name); if (_vm->findZone(name)) { - script->skip("endzone"); + _script->skip("endzone"); return; } @@ -1400,7 +1400,7 @@ void LocationParser_ns::parseZone(ZoneList &list, char *name) { list.push_front(z); - parser->pushTables(&_locationZoneParsers, _locationZoneStmt); + _parser->pushTables(&_locationZoneParsers, _locationZoneStmt); return; } @@ -1431,7 +1431,7 @@ void LocationParser_ns::parseGetData(ZonePtr z) { data->_icon = 4 + _vm->_objectsNames->lookup(_tokens[1]); } - script->readLineToken(true); + _script->readLineToken(true); } while (scumm_stricmp(_tokens[0], "endzone")); z->u.get = data; @@ -1452,7 +1452,7 @@ void LocationParser_ns::parseExamineData(ZonePtr z) { data->_description = parseComment(); } - script->readLineToken(true); + _script->readLineToken(true); } while (scumm_stricmp(_tokens[0], "endzone")); z->u.examine = data; @@ -1496,7 +1496,7 @@ void LocationParser_ns::parseDoorData(ZonePtr z) { data->_startFrame = atoi(_tokens[3]); } - script->readLineToken(true); + _script->readLineToken(true); } while (scumm_stricmp(_tokens[0], "endzone")); z->u.door = data; @@ -1520,7 +1520,7 @@ void LocationParser_ns::parseMergeData(ZonePtr z) { data->_obj3 = 4 + _vm->_objectsNames->lookup(_tokens[1]); } - script->readLineToken(true); + _script->readLineToken(true); } while (scumm_stricmp(_tokens[0], "endzone")); z->u.merge = data; @@ -1541,7 +1541,7 @@ void LocationParser_ns::parseHearData(ZonePtr z) { data->_freq = atoi(_tokens[1]); } - script->readLineToken(true); + _script->readLineToken(true); } while (scumm_stricmp(_tokens[0], "endzone")); z->u.hear = data; @@ -1561,7 +1561,7 @@ void LocationParser_ns::parseSpeakData(ZonePtr z) { data->_dialogue = parseDialogue(); } - script->readLineToken(true); + _script->readLineToken(true); } while (scumm_stricmp(_tokens[0], "endzone")); z->u.speak = data; @@ -1599,7 +1599,7 @@ void LocationParser_ns::parseZoneTypeBlock(ZonePtr z) { default: // eats up 'ENDZONE' line for unprocessed zone types - script->readLineToken(true); + _script->readLineToken(true); break; } -- cgit v1.2.3 From 6e0c56996662dec6ccd9e724161e55562b728d8b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 11 May 2008 22:32:37 +0000 Subject: Consisteny fixes: - Renamed classes *_v1 -> *_LoK - Renamed files *_v1.* -> *_lok.* - Renamed WSAMovieV1 -> WSAMovie_v1 - Renamed WSAMovieV2 -> WSAMovie_v2 svn-id: r32042 --- engines/kyra/animator_lok.cpp | 691 ++++++++++++++ engines/kyra/animator_lok.h | 132 +++ engines/kyra/animator_v1.cpp | 691 -------------- engines/kyra/animator_v1.h | 132 --- engines/kyra/debugger.cpp | 22 +- engines/kyra/debugger.h | 10 +- engines/kyra/detection.cpp | 4 +- engines/kyra/gui_hof.cpp | 2 +- engines/kyra/gui_lok.cpp | 1115 ++++++++++++++++++++++ engines/kyra/gui_lok.h | 177 ++++ engines/kyra/gui_v1.cpp | 1115 ---------------------- engines/kyra/gui_v1.h | 177 ---- engines/kyra/items_lok.cpp | 944 +++++++++++++++++++ engines/kyra/items_v1.cpp | 944 ------------------- engines/kyra/kyra_hof.cpp | 6 +- engines/kyra/kyra_hof.h | 106 +-- engines/kyra/kyra_lok.cpp | 1044 +++++++++++++++++++++ engines/kyra/kyra_lok.h | 819 ++++++++++++++++ engines/kyra/kyra_mr.cpp | 12 +- engines/kyra/kyra_mr.h | 10 +- engines/kyra/kyra_v1.cpp | 1044 --------------------- engines/kyra/kyra_v1.h | 819 ---------------- engines/kyra/kyra_v2.h | 2 +- engines/kyra/module.mk | 24 +- engines/kyra/saveload_lok.cpp | 300 ++++++ engines/kyra/saveload_v1.cpp | 300 ------ engines/kyra/scene_hof.cpp | 2 +- engines/kyra/scene_lok.cpp | 1284 +++++++++++++++++++++++++ engines/kyra/scene_v1.cpp | 1284 ------------------------- engines/kyra/screen_lok.cpp | 243 +++++ engines/kyra/screen_lok.h | 77 ++ engines/kyra/screen_v1.cpp | 243 ----- engines/kyra/screen_v1.h | 77 -- engines/kyra/script_lok.cpp | 2031 ++++++++++++++++++++++++++++++++++++++++ engines/kyra/script_v1.cpp | 2031 ---------------------------------------- engines/kyra/seqplayer.cpp | 2 +- engines/kyra/seqplayer.h | 6 +- engines/kyra/sequences_hof.cpp | 90 +- engines/kyra/sequences_lok.cpp | 1884 +++++++++++++++++++++++++++++++++++++ engines/kyra/sequences_v1.cpp | 1884 ------------------------------------- engines/kyra/sound_lok.cpp | 83 ++ engines/kyra/sound_v1.cpp | 83 -- engines/kyra/sprites.cpp | 8 +- engines/kyra/sprites.h | 8 +- engines/kyra/staticres.cpp | 90 +- engines/kyra/text_lok.cpp | 399 ++++++++ engines/kyra/text_v1.cpp | 399 -------- engines/kyra/timer_lok.cpp | 180 ++++ engines/kyra/timer_v1.cpp | 180 ---- engines/kyra/wsamovie.cpp | 36 +- engines/kyra/wsamovie.h | 12 +- 51 files changed, 11629 insertions(+), 11629 deletions(-) create mode 100644 engines/kyra/animator_lok.cpp create mode 100644 engines/kyra/animator_lok.h delete mode 100644 engines/kyra/animator_v1.cpp delete mode 100644 engines/kyra/animator_v1.h create mode 100644 engines/kyra/gui_lok.cpp create mode 100644 engines/kyra/gui_lok.h delete mode 100644 engines/kyra/gui_v1.cpp delete mode 100644 engines/kyra/gui_v1.h create mode 100644 engines/kyra/items_lok.cpp delete mode 100644 engines/kyra/items_v1.cpp create mode 100644 engines/kyra/kyra_lok.cpp create mode 100644 engines/kyra/kyra_lok.h delete mode 100644 engines/kyra/kyra_v1.cpp delete mode 100644 engines/kyra/kyra_v1.h create mode 100644 engines/kyra/saveload_lok.cpp delete mode 100644 engines/kyra/saveload_v1.cpp create mode 100644 engines/kyra/scene_lok.cpp delete mode 100644 engines/kyra/scene_v1.cpp create mode 100644 engines/kyra/screen_lok.cpp create mode 100644 engines/kyra/screen_lok.h delete mode 100644 engines/kyra/screen_v1.cpp delete mode 100644 engines/kyra/screen_v1.h create mode 100644 engines/kyra/script_lok.cpp delete mode 100644 engines/kyra/script_v1.cpp create mode 100644 engines/kyra/sequences_lok.cpp delete mode 100644 engines/kyra/sequences_v1.cpp create mode 100644 engines/kyra/sound_lok.cpp delete mode 100644 engines/kyra/sound_v1.cpp create mode 100644 engines/kyra/text_lok.cpp delete mode 100644 engines/kyra/text_v1.cpp create mode 100644 engines/kyra/timer_lok.cpp delete mode 100644 engines/kyra/timer_v1.cpp diff --git a/engines/kyra/animator_lok.cpp b/engines/kyra/animator_lok.cpp new file mode 100644 index 0000000000..1baa78b203 --- /dev/null +++ b/engines/kyra/animator_lok.cpp @@ -0,0 +1,691 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/endian.h" + +#include "kyra/kyra_lok.h" +#include "kyra/screen.h" +#include "kyra/animator_lok.h" +#include "kyra/sprites.h" + +#include "common/system.h" + +namespace Kyra { +Animator_LoK::Animator_LoK(KyraEngine_LoK *vm, OSystem *system) { + _vm = vm; + _screen = vm->screen(); + _initOk = false; + _updateScreen = false; + _system = system; + _screenObjects = _actors = _items = _sprites = _objectQueue = 0; + _noDrawShapesFlag = 0; + + _actorBkgBackUp[0] = new uint8[_screen->getRectSize(8, 69)]; + memset(_actorBkgBackUp[0], 0, _screen->getRectSize(8, 69)); + _actorBkgBackUp[1] = new uint8[_screen->getRectSize(8, 69)]; + memset(_actorBkgBackUp[1], 0, _screen->getRectSize(8, 69)); +} + +Animator_LoK::~Animator_LoK() { + close(); + delete[] _actorBkgBackUp[0]; + delete[] _actorBkgBackUp[1]; +} + +void Animator_LoK::init(int actors_, int items_, int sprites_) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::init(%d, %d, %d)", actors_, items_, sprites_); + _screenObjects = new AnimObject[actors_ + items_ + sprites_]; + assert(_screenObjects); + memset(_screenObjects, 0, sizeof(AnimObject) * (actors_ + items_ + sprites_)); + _actors = _screenObjects; + _sprites = &_screenObjects[actors_]; + _items = &_screenObjects[actors_ + items_]; + _brandonDrawFrame = 113; + + _initOk = true; +} + +void Animator_LoK::close() { + debugC(9, kDebugLevelAnimator, "Animator_LoK::close()"); + if (_initOk) { + _initOk = false; + delete[] _screenObjects; + _screenObjects = _actors = _items = _sprites = _objectQueue = 0; + } +} + +void Animator_LoK::initAnimStateList() { + AnimObject *animStates = _screenObjects; + animStates[0].index = 0; + animStates[0].active = 1; + animStates[0].flags = 0x800; + animStates[0].background = _actorBkgBackUp[0]; + animStates[0].rectSize = _screen->getRectSize(4, 48); + animStates[0].width = 4; + animStates[0].height = 48; + animStates[0].width2 = 4; + animStates[0].height2 = 3; + + for (int i = 1; i <= 4; ++i) { + animStates[i].index = i; + animStates[i].active = 0; + animStates[i].flags = 0x800; + animStates[i].background = _actorBkgBackUp[1]; + animStates[i].rectSize = _screen->getRectSize(4, 64); + animStates[i].width = 4; + animStates[i].height = 48; + animStates[i].width2 = 4; + animStates[i].height2 = 3; + } + + for (int i = 5; i < 16; ++i) { + animStates[i].index = i; + animStates[i].active = 0; + animStates[i].flags = 0; + } + + for (int i = 16; i < 28; ++i) { + animStates[i].index = i; + animStates[i].flags = 0; + animStates[i].background = _vm->_shapes[345+i]; + animStates[i].rectSize = _screen->getRectSize(3, 24); + animStates[i].width = 3; + animStates[i].height = 16; + animStates[i].width2 = 0; + animStates[i].height2 = 0; + } +} + +void Animator_LoK::preserveAllBackgrounds() { + debugC(9, kDebugLevelAnimator, "Animator_LoK::preserveAllBackgrounds()"); + uint8 curPage = _screen->_curPage; + _screen->_curPage = 2; + + AnimObject *curObject = _objectQueue; + while (curObject) { + if (curObject->active && !curObject->disable) { + preserveOrRestoreBackground(curObject, false); + curObject->bkgdChangeFlag = 0; + } + curObject = curObject->nextAnimObject; + } + _screen->_curPage = curPage; +} + +void Animator_LoK::flagAllObjectsForBkgdChange() { + debugC(9, kDebugLevelAnimator, "Animator_LoK::flagAllObjectsForBkgdChange()"); + AnimObject *curObject = _objectQueue; + while (curObject) { + curObject->bkgdChangeFlag = 1; + curObject = curObject->nextAnimObject; + } +} + +void Animator_LoK::flagAllObjectsForRefresh() { + debugC(9, kDebugLevelAnimator, "Animator_LoK::flagAllObjectsForRefresh()"); + AnimObject *curObject = _objectQueue; + while (curObject) { + curObject->refreshFlag = 1; + curObject = curObject->nextAnimObject; + } +} + +void Animator_LoK::restoreAllObjectBackgrounds() { + debugC(9, kDebugLevelAnimator, "Animator_LoK::restoreAllObjectBackground()"); + AnimObject *curObject = _objectQueue; + _screen->_curPage = 2; + + while (curObject) { + if (curObject->active && !curObject->disable) { + preserveOrRestoreBackground(curObject, true); + curObject->x2 = curObject->x1; + curObject->y2 = curObject->y1; + } + curObject = curObject->nextAnimObject; + } + + _screen->_curPage = 0; +} + +void Animator_LoK::preserveAnyChangedBackgrounds() { + debugC(9, kDebugLevelAnimator, "Animator_LoK::preserveAnyChangedBackgrounds()"); + AnimObject *curObject = _objectQueue; + _screen->_curPage = 2; + + while (curObject) { + if (curObject->active && !curObject->disable && curObject->bkgdChangeFlag) { + preserveOrRestoreBackground(curObject, false); + curObject->bkgdChangeFlag = 0; + } + curObject = curObject->nextAnimObject; + } + + _screen->_curPage = 0; +} + +void Animator_LoK::preserveOrRestoreBackground(AnimObject *obj, bool restore) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::preserveOrRestoreBackground(%p, %d)", (const void *)obj, restore); + int x = 0, y = 0, width = obj->width, height = obj->height; + + if (restore) { + x = obj->x2 >> 3; + y = obj->y2; + } else { + x = obj->x1 >> 3; + y = obj->y1; + } + + if (x < 0) + x = 0; + if (y < 0) + y = 0; + + int temp; + + temp = x + width; + if (temp >= 39) + x = 39 - width; + temp = y + height; + if (temp >= 136) + y = 136 - height; + + if (restore) + _screen->copyBlockToPage(_screen->_curPage, x << 3, y, width << 3, height, obj->background); + else + _screen->copyRegionToBuffer(_screen->_curPage, x << 3, y, width << 3, height, obj->background); +} + +void Animator_LoK::prepDrawAllObjects() { + debugC(9, kDebugLevelAnimator, "Animator_LoK::prepDrawAllObjects()"); + AnimObject *curObject = _objectQueue; + int drawPage = 2; + int flagUnk1 = 0, flagUnk2 = 0, flagUnk3 = 0; + if (_noDrawShapesFlag) + return; + if (_vm->_brandonStatusBit & 0x20) + flagUnk1 = 0x200; + if (_vm->_brandonStatusBit & 0x40) + flagUnk2 = 0x4000; + + while (curObject) { + if (curObject->active) { + int xpos = curObject->x1; + int ypos = curObject->y1; + + int drawLayer = 0; + if (!(curObject->flags & 0x800)) + drawLayer = 7; + else if (curObject->disable) + drawLayer = 0; + else + drawLayer = _vm->_sprites->getDrawLayer(curObject->drawY); + + // talking head functionallity + if (_vm->_talkingCharNum != -1 && (_vm->_currentCharacter->currentAnimFrame != 88 || curObject->index != 0)) { + const int16 baseAnimFrameTable1[] = { 0x11, 0x35, 0x59, 0x00, 0x00, 0x00 }; + const int16 baseAnimFrameTable2[] = { 0x15, 0x39, 0x5D, 0x00, 0x00, 0x00 }; + const int8 xOffsetTable1[] = { 2, 4, 0, 5, 2, 0, 0, 0 }; + const int8 xOffsetTable2[] = { 6, 4, 8, 3, 6, 0, 0, 0 }; + const int8 yOffsetTable1[] = { 0, 8, 1, 1, 0, 0, 0, 0 }; + const int8 yOffsetTable2[] = { 0, 8, 1, 1, 0, 0, 0, 0 }; + if (curObject->index == 0 || curObject->index <= 4) { + int shapesIndex = 0; + if (curObject->index == _vm->_charSayUnk3) { + shapesIndex = _vm->_currHeadShape + baseAnimFrameTable1[curObject->index]; + } else { + shapesIndex = baseAnimFrameTable2[curObject->index]; + int temp2 = 0; + if (curObject->index == 2) { + if (_vm->_characterList[2].sceneId == 77 || _vm->_characterList[2].sceneId == 86) + temp2 = 1; + else + temp2 = 0; + } else { + temp2 = 1; + } + + if (!temp2) + shapesIndex = -1; + } + + xpos = curObject->x1; + ypos = curObject->y1; + + int tempX = 0, tempY = 0; + if (curObject->flags & 0x1) { + tempX = (xOffsetTable1[curObject->index] * _brandonScaleX) >> 8; + tempY = yOffsetTable1[curObject->index]; + } else { + tempX = (xOffsetTable2[curObject->index] * _brandonScaleX) >> 8; + tempY = yOffsetTable2[curObject->index]; + } + tempY = (tempY * _brandonScaleY) >> 8; + xpos += tempX; + ypos += tempY; + + if (_vm->_scaleMode && _brandonScaleX != 256) + ++xpos; + + if (curObject->index == 0 && shapesIndex != -1) { + if (!(_vm->_brandonStatusBit & 2)) { + flagUnk3 = 0x100; + if ((flagUnk1 & 0x200) || (flagUnk2 & 0x4000)) + flagUnk3 = 0; + + int tempFlags = 0; + if (flagUnk3 & 0x100) { + tempFlags = curObject->flags & 1; + tempFlags |= 0x800 | flagUnk1 | 0x100; + } + + if (!(flagUnk3 & 0x100) && (flagUnk2 & 0x4000)) { + tempFlags = curObject->flags & 1; + tempFlags |= 0x900 | flagUnk1 | 0x4000; + _screen->drawShape(drawPage, _vm->_shapes[shapesIndex], xpos, ypos, 2, tempFlags | 4, _vm->_brandonPoisonFlagsGFX, int(1), int(_vm->_brandonInvFlag), drawLayer, _brandonScaleX, _brandonScaleY); + } else { + if (!(flagUnk2 & 0x4000)) { + tempFlags = curObject->flags & 1; + tempFlags |= 0x900 | flagUnk1; + } + + _screen->drawShape(drawPage, _vm->_shapes[shapesIndex], xpos, ypos, 2, tempFlags | 4, _vm->_brandonPoisonFlagsGFX, int(1), drawLayer, _brandonScaleX, _brandonScaleY); + } + } + } else { + if (shapesIndex != -1) { + int tempFlags = 0; + if (curObject->flags & 1) + tempFlags = 1; + _screen->drawShape(drawPage, _vm->_shapes[shapesIndex], xpos, ypos, 2, tempFlags | 0x800, drawLayer); + } + } + } + } + + xpos = curObject->x1; + ypos = curObject->y1; + + curObject->flags |= 0x800; + if (curObject->index == 0) { + flagUnk3 = 0x100; + + if (flagUnk1 & 0x200 || flagUnk2 & 0x4000) + flagUnk3 = 0; + + if (_vm->_brandonStatusBit & 2) + curObject->flags &= 0xFFFFFFFE; + + if (!_vm->_scaleMode) { + if (flagUnk3 & 0x100) + _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x100, (uint8*)_vm->_brandonPoisonFlagsGFX, int(1), drawLayer); + else if (flagUnk2 & 0x4000) + _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x4000, int(_vm->_brandonInvFlag), drawLayer); + else + _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1, drawLayer); + } else { + if (flagUnk3 & 0x100) + _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x104, (uint8*)_vm->_brandonPoisonFlagsGFX, int(1), drawLayer, _brandonScaleX, _brandonScaleY); + else if (flagUnk2 & 0x4000) + _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x4004, int(_vm->_brandonInvFlag), drawLayer, _brandonScaleX, _brandonScaleY); + else + _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x4, drawLayer, _brandonScaleX, _brandonScaleY); + } + } else { + if (curObject->index >= 16 && curObject->index <= 27) + _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | 4, drawLayer, (int)_vm->_scaleTable[curObject->drawY], (int)_vm->_scaleTable[curObject->drawY]); + else + _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags, drawLayer); + } + } + curObject = curObject->nextAnimObject; + } +} + +void Animator_LoK::copyChangedObjectsForward(int refreshFlag) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::copyChangedObjectsForward(%d)", refreshFlag); + + for (AnimObject *curObject = _objectQueue; curObject; curObject = curObject->nextAnimObject) { + if (curObject->active) { + if (curObject->refreshFlag || refreshFlag) { + int xpos = 0, ypos = 0, width = 0, height = 0; + xpos = (curObject->x1>>3) - (curObject->width2>>3) - 1; + ypos = curObject->y1 - curObject->height2; + width = curObject->width + (curObject->width2>>3) + 2; + height = curObject->height + curObject->height2*2; + + if (xpos < 1) + xpos = 1; + else if (xpos > 39) + continue; + + if (xpos + width > 39) + width = 39 - xpos; + + if (ypos < 8) + ypos = 8; + else if (ypos > 136) + continue; + + if (ypos + height > 136) + height = 136 - ypos; + + _screen->copyRegion(xpos << 3, ypos, xpos << 3, ypos, width << 3, height, 2, 0); + curObject->refreshFlag = 0; + _updateScreen = true; + } + } + } + + if (_updateScreen) { + _screen->updateScreen(); + _updateScreen = false; + } +} + +void Animator_LoK::updateAllObjectShapes() { + debugC(9, kDebugLevelAnimator, "Animator_LoK::updateAllObjectShapes()"); + restoreAllObjectBackgrounds(); + preserveAnyChangedBackgrounds(); + prepDrawAllObjects(); + copyChangedObjectsForward(0); +} + +void Animator_LoK::animRemoveGameItem(int index) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::animRemoveGameItem(%d)", index); + restoreAllObjectBackgrounds(); + + AnimObject *animObj = &_items[index]; + animObj->sceneAnimPtr = 0; + animObj->animFrameNumber = -1; + animObj->refreshFlag = 1; + animObj->bkgdChangeFlag = 1; + updateAllObjectShapes(); + animObj->active = 0; + + objectRemoveQueue(_objectQueue, animObj); +} + +void Animator_LoK::animAddGameItem(int index, uint16 sceneId) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::animRemoveGameItem(%d, %d)", index, sceneId); + restoreAllObjectBackgrounds(); + assert(sceneId < _vm->_roomTableSize); + Room *currentRoom = &_vm->_roomTable[sceneId]; + AnimObject *animObj = &_items[index]; + animObj->active = 1; + animObj->refreshFlag = 1; + animObj->bkgdChangeFlag = 1; + animObj->drawY = currentRoom->itemsYPos[index]; + animObj->sceneAnimPtr = _vm->_shapes[216+currentRoom->itemsTable[index]]; + animObj->animFrameNumber = -1; + animObj->x1 = currentRoom->itemsXPos[index]; + animObj->y1 = currentRoom->itemsYPos[index]; + animObj->x1 -= fetchAnimWidth(animObj->sceneAnimPtr, _vm->_scaleTable[animObj->drawY]) >> 1; + animObj->y1 -= fetchAnimHeight(animObj->sceneAnimPtr, _vm->_scaleTable[animObj->drawY]); + animObj->x2 = animObj->x1; + animObj->y2 = animObj->y1; + animObj->width2 = 0; + animObj->height2 = 0; + _objectQueue = objectQueue(_objectQueue, animObj); + preserveAnyChangedBackgrounds(); + animObj->refreshFlag = 1; + animObj->bkgdChangeFlag = 1; +} + +void Animator_LoK::animAddNPC(int character) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::animAddNPC(%d)", character); + restoreAllObjectBackgrounds(); + AnimObject *animObj = &_actors[character]; + const Character *ch = &_vm->_characterList[character]; + + animObj->active = 1; + animObj->refreshFlag = 1; + animObj->bkgdChangeFlag = 1; + animObj->drawY = ch->y1; + animObj->sceneAnimPtr = _vm->_shapes[ch->currentAnimFrame]; + animObj->x1 = animObj->x2 = ch->x1 + _vm->_defaultShapeTable[ch->currentAnimFrame-7].xOffset; + animObj->y1 = animObj->y2 = ch->y1 + _vm->_defaultShapeTable[ch->currentAnimFrame-7].yOffset; + + if (ch->facing >= 1 && ch->facing <= 3) + animObj->flags |= 1; + else if (ch->facing >= 5 && ch->facing <= 7) + animObj->flags &= 0xFFFFFFFE; + + _objectQueue = objectQueue(_objectQueue, animObj); + preserveAnyChangedBackgrounds(); + animObj->refreshFlag = 1; + animObj->bkgdChangeFlag = 1; +} + +Animator_LoK::AnimObject *Animator_LoK::objectRemoveQueue(AnimObject *queue, AnimObject *rem) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::objectRemoveQueue(%p, %p)", (const void *)queue, (const void *)rem); + AnimObject *cur = queue; + AnimObject *prev = queue; + + while (cur != rem && cur) { + AnimObject *temp = cur->nextAnimObject; + if (!temp) + break; + prev = cur; + cur = temp; + } + + if (cur == queue) { + if (!cur) + return 0; + return cur->nextAnimObject; + } + + if (!cur->nextAnimObject) { + if (cur == rem) { + if (!prev) + return 0; + else + prev->nextAnimObject = 0; + } + } else { + if (cur == rem) + prev->nextAnimObject = rem->nextAnimObject; + } + + return queue; +} + +Animator_LoK::AnimObject *Animator_LoK::objectAddHead(AnimObject *queue, AnimObject *head) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::objectAddHead(%p, %p)", (const void *)queue, (const void *)head); + head->nextAnimObject = queue; + return head; +} + +Animator_LoK::AnimObject *Animator_LoK::objectQueue(AnimObject *queue, AnimObject *add) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::objectQueue(%p, %p)", (const void *)queue, (const void *)add); + if (add->drawY <= queue->drawY || !queue) { + add->nextAnimObject = queue; + return add; + } + AnimObject *cur = queue; + AnimObject *prev = queue; + while (add->drawY > cur->drawY) { + AnimObject *temp = cur->nextAnimObject; + if (!temp) + break; + prev = cur; + cur = temp; + } + + if (add->drawY <= cur->drawY) { + prev->nextAnimObject = add; + add->nextAnimObject = cur; + } else { + cur->nextAnimObject = add; + add->nextAnimObject = 0; + } + return queue; +} + +void Animator_LoK::addObjectToQueue(AnimObject *object) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::addObjectToQueue(%p)", (const void *)object); + if (!_objectQueue) + _objectQueue = objectAddHead(0, object); + else + _objectQueue = objectQueue(_objectQueue, object); +} + +void Animator_LoK::refreshObject(AnimObject *object) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::refreshObject(%p)", (const void *)object); + _objectQueue = objectRemoveQueue(_objectQueue, object); + if (_objectQueue) + _objectQueue = objectQueue(_objectQueue, object); + else + _objectQueue = objectAddHead(0, object); +} + +void Animator_LoK::makeBrandonFaceMouse() { + debugC(9, kDebugLevelAnimator, "Animator_LoK::makeBrandonFaceMouse()"); + Common::Point mouse = _vm->getMousePos(); + if (mouse.x >= _vm->_currentCharacter->x1) + _vm->_currentCharacter->facing = 3; + else + _vm->_currentCharacter->facing = 5; + animRefreshNPC(0); + updateAllObjectShapes(); +} + +int16 Animator_LoK::fetchAnimWidth(const uint8 *shape, int16 mult) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::fetchAnimWidth(%p, %d)", (const void *)shape, mult); + if (_vm->gameFlags().useAltShapeHeader) + shape += 2; + return (((int16)READ_LE_UINT16((shape+3))) * mult) >> 8; +} + +int16 Animator_LoK::fetchAnimHeight(const uint8 *shape, int16 mult) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::fetchAnimHeight(%p, %d)", (const void *)shape, mult); + if (_vm->gameFlags().useAltShapeHeader) + shape += 2; + return (int16)(((int8)*(shape+2)) * mult) >> 8; +} + +void Animator_LoK::setBrandonAnimSeqSize(int width, int height) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::setBrandonAnimSeqSize(%d, %d)", width, height); + restoreAllObjectBackgrounds(); + _brandonAnimSeqSizeWidth = _actors[0].width; + _brandonAnimSeqSizeHeight = _actors[0].height; + _actors[0].width = width + 1; + _actors[0].height = height; + preserveAllBackgrounds(); +} + +void Animator_LoK::resetBrandonAnimSeqSize() { + debugC(9, kDebugLevelAnimator, "Animator_LoK::resetBrandonAnimSeqSize()"); + restoreAllObjectBackgrounds(); + _actors[0].width = _brandonAnimSeqSizeWidth; + _actors[0].height = _brandonAnimSeqSizeHeight; + preserveAllBackgrounds(); +} + +void Animator_LoK::animRefreshNPC(int character) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::animRefreshNPC(%d)", character); + AnimObject *animObj = &_actors[character]; + Character *ch = &_vm->characterList()[character]; + + animObj->refreshFlag = 1; + animObj->bkgdChangeFlag = 1; + int facing = ch->facing; + if (facing >= 1 && facing <= 3) + animObj->flags |= 1; + else if (facing >= 5 && facing <= 7) + animObj->flags &= 0xFFFFFFFE; + + animObj->drawY = ch->y1; + animObj->sceneAnimPtr = _vm->shapes()[ch->currentAnimFrame]; + animObj->animFrameNumber = ch->currentAnimFrame; + if (character == 0) { + if (_vm->brandonStatus() & 10) { + animObj->animFrameNumber = 88; + ch->currentAnimFrame = 88; + } + if (_vm->brandonStatus() & 2) { + animObj->animFrameNumber = _brandonDrawFrame; + ch->currentAnimFrame = _brandonDrawFrame; + animObj->sceneAnimPtr = _vm->shapes()[_brandonDrawFrame]; + if (_vm->_brandonStatusBit0x02Flag) { + ++_brandonDrawFrame; + // TODO: check this + if (_brandonDrawFrame >= 122) { + _brandonDrawFrame = 113; + _vm->_brandonStatusBit0x02Flag = 0; + } + } + } + } + + int xOffset = _vm->_defaultShapeTable[ch->currentAnimFrame-7].xOffset; + int yOffset = _vm->_defaultShapeTable[ch->currentAnimFrame-7].yOffset; + + if (_vm->_scaleMode) { + animObj->x1 = ch->x1; + animObj->y1 = ch->y1; + + int newScale = _vm->_scaleTable[ch->y1]; + _brandonScaleX = newScale; + _brandonScaleY = newScale; + + animObj->x1 += (_brandonScaleX * xOffset) >> 8; + animObj->y1 += (_brandonScaleY * yOffset) >> 8; + } else { + animObj->x1 = ch->x1 + xOffset; + animObj->y1 = ch->y1 + yOffset; + } + animObj->width2 = 4; + animObj->height2 = 3; + + refreshObject(animObj); +} + +void Animator_LoK::setCharacterDefaultFrame(int character) { + debugC(9, kDebugLevelAnimator, "Animator_LoK::setCharacterDefaultFrame()"); + static uint16 initFrameTable[] = { + 7, 41, 77, 0, 0 + }; + assert(character < ARRAYSIZE(initFrameTable)); + Character *edit = &_vm->characterList()[character]; + edit->sceneId = 0xFFFF; + edit->facing = 0; + edit->currentAnimFrame = initFrameTable[character]; + // edit->unk6 = 1; +} + +void Animator_LoK::setCharactersHeight() { + debugC(9, kDebugLevelAnimator, "Animator_LoK::setCharactersHeight()"); + static int8 initHeightTable[] = { + 48, 40, 48, 47, 56, + 44, 42, 47, 38, 35, + 40 + }; + for (int i = 0; i < 11; ++i) + _vm->characterList()[i].height = initHeightTable[i]; +} + +} // end of namespace Kyra + diff --git a/engines/kyra/animator_lok.h b/engines/kyra/animator_lok.h new file mode 100644 index 0000000000..c7d564e0c6 --- /dev/null +++ b/engines/kyra/animator_lok.h @@ -0,0 +1,132 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef KYRA_ANIMATOR_V1_H +#define KYRA_ANIMATOR_V1_H + +namespace Kyra { +class KyraEngine_LoK; +class Screen; + +class Animator_LoK { +public: + struct AnimObject { + uint8 index; + uint32 active; + uint32 refreshFlag; + uint32 bkgdChangeFlag; + bool disable; + uint32 flags; + int16 drawY; + uint8 *sceneAnimPtr; + int16 animFrameNumber; + uint8 *background; + uint16 rectSize; + int16 x1, y1; + int16 x2, y2; + uint16 width; + uint16 height; + uint16 width2; + uint16 height2; + AnimObject *nextAnimObject; + }; + + Animator_LoK(KyraEngine_LoK *vm, OSystem *system); + virtual ~Animator_LoK(); + + operator bool() const { return _initOk; } + + void init(int actors, int items, int sprites); + void close(); + + AnimObject *objects() { return _screenObjects; } + AnimObject *actors() { return _actors; } + AnimObject *items() { return _items; } + AnimObject *sprites() { return _sprites; } + + void initAnimStateList(); + void preserveAllBackgrounds(); + void flagAllObjectsForBkgdChange(); + void flagAllObjectsForRefresh(); + void restoreAllObjectBackgrounds(); + void preserveAnyChangedBackgrounds(); + virtual void prepDrawAllObjects(); + void copyChangedObjectsForward(int refreshFlag); + + void updateAllObjectShapes(); + void animRemoveGameItem(int index); + void animAddGameItem(int index, uint16 sceneId); + void animAddNPC(int character); + void animRefreshNPC(int character); + + void clearQueue() { _objectQueue = 0; } + void addObjectToQueue(AnimObject *object); + void refreshObject(AnimObject *object); + + void makeBrandonFaceMouse(); + void setBrandonAnimSeqSize(int width, int height); + void resetBrandonAnimSeqSize(); + void setCharacterDefaultFrame(int character); + void setCharactersHeight(); + + int16 fetchAnimWidth(const uint8 *shape, int16 mult); + int16 fetchAnimHeight(const uint8 *shape, int16 mult); + + int _noDrawShapesFlag; + bool _updateScreen; + uint16 _brandonDrawFrame; + int _brandonScaleX; + int _brandonScaleY; + +protected: + KyraEngine_LoK *_vm; + Screen *_screen; + OSystem *_system; + bool _initOk; + + AnimObject *_screenObjects; + + AnimObject *_actors; + AnimObject *_items; + AnimObject *_sprites; + + uint8 *_actorBkgBackUp[2]; + + AnimObject *objectRemoveQueue(AnimObject *queue, AnimObject *rem); + AnimObject *objectAddHead(AnimObject *queue, AnimObject *head); + AnimObject *objectQueue(AnimObject *queue, AnimObject *add); + + void preserveOrRestoreBackground(AnimObject *obj, bool restore); + + AnimObject *_objectQueue; + + int _brandonAnimSeqSizeWidth; + int _brandonAnimSeqSizeHeight; + +}; +} // end of namespace Kyra + +#endif + diff --git a/engines/kyra/animator_v1.cpp b/engines/kyra/animator_v1.cpp deleted file mode 100644 index 619c6c3d70..0000000000 --- a/engines/kyra/animator_v1.cpp +++ /dev/null @@ -1,691 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/endian.h" - -#include "kyra/kyra_v1.h" -#include "kyra/screen.h" -#include "kyra/animator_v1.h" -#include "kyra/sprites.h" - -#include "common/system.h" - -namespace Kyra { -Animator_v1::Animator_v1(KyraEngine_v1 *vm, OSystem *system) { - _vm = vm; - _screen = vm->screen(); - _initOk = false; - _updateScreen = false; - _system = system; - _screenObjects = _actors = _items = _sprites = _objectQueue = 0; - _noDrawShapesFlag = 0; - - _actorBkgBackUp[0] = new uint8[_screen->getRectSize(8, 69)]; - memset(_actorBkgBackUp[0], 0, _screen->getRectSize(8, 69)); - _actorBkgBackUp[1] = new uint8[_screen->getRectSize(8, 69)]; - memset(_actorBkgBackUp[1], 0, _screen->getRectSize(8, 69)); -} - -Animator_v1::~Animator_v1() { - close(); - delete[] _actorBkgBackUp[0]; - delete[] _actorBkgBackUp[1]; -} - -void Animator_v1::init(int actors_, int items_, int sprites_) { - debugC(9, kDebugLevelAnimator, "Animator_v1::init(%d, %d, %d)", actors_, items_, sprites_); - _screenObjects = new AnimObject[actors_ + items_ + sprites_]; - assert(_screenObjects); - memset(_screenObjects, 0, sizeof(AnimObject) * (actors_ + items_ + sprites_)); - _actors = _screenObjects; - _sprites = &_screenObjects[actors_]; - _items = &_screenObjects[actors_ + items_]; - _brandonDrawFrame = 113; - - _initOk = true; -} - -void Animator_v1::close() { - debugC(9, kDebugLevelAnimator, "Animator_v1::close()"); - if (_initOk) { - _initOk = false; - delete[] _screenObjects; - _screenObjects = _actors = _items = _sprites = _objectQueue = 0; - } -} - -void Animator_v1::initAnimStateList() { - AnimObject *animStates = _screenObjects; - animStates[0].index = 0; - animStates[0].active = 1; - animStates[0].flags = 0x800; - animStates[0].background = _actorBkgBackUp[0]; - animStates[0].rectSize = _screen->getRectSize(4, 48); - animStates[0].width = 4; - animStates[0].height = 48; - animStates[0].width2 = 4; - animStates[0].height2 = 3; - - for (int i = 1; i <= 4; ++i) { - animStates[i].index = i; - animStates[i].active = 0; - animStates[i].flags = 0x800; - animStates[i].background = _actorBkgBackUp[1]; - animStates[i].rectSize = _screen->getRectSize(4, 64); - animStates[i].width = 4; - animStates[i].height = 48; - animStates[i].width2 = 4; - animStates[i].height2 = 3; - } - - for (int i = 5; i < 16; ++i) { - animStates[i].index = i; - animStates[i].active = 0; - animStates[i].flags = 0; - } - - for (int i = 16; i < 28; ++i) { - animStates[i].index = i; - animStates[i].flags = 0; - animStates[i].background = _vm->_shapes[345+i]; - animStates[i].rectSize = _screen->getRectSize(3, 24); - animStates[i].width = 3; - animStates[i].height = 16; - animStates[i].width2 = 0; - animStates[i].height2 = 0; - } -} - -void Animator_v1::preserveAllBackgrounds() { - debugC(9, kDebugLevelAnimator, "Animator_v1::preserveAllBackgrounds()"); - uint8 curPage = _screen->_curPage; - _screen->_curPage = 2; - - AnimObject *curObject = _objectQueue; - while (curObject) { - if (curObject->active && !curObject->disable) { - preserveOrRestoreBackground(curObject, false); - curObject->bkgdChangeFlag = 0; - } - curObject = curObject->nextAnimObject; - } - _screen->_curPage = curPage; -} - -void Animator_v1::flagAllObjectsForBkgdChange() { - debugC(9, kDebugLevelAnimator, "Animator_v1::flagAllObjectsForBkgdChange()"); - AnimObject *curObject = _objectQueue; - while (curObject) { - curObject->bkgdChangeFlag = 1; - curObject = curObject->nextAnimObject; - } -} - -void Animator_v1::flagAllObjectsForRefresh() { - debugC(9, kDebugLevelAnimator, "Animator_v1::flagAllObjectsForRefresh()"); - AnimObject *curObject = _objectQueue; - while (curObject) { - curObject->refreshFlag = 1; - curObject = curObject->nextAnimObject; - } -} - -void Animator_v1::restoreAllObjectBackgrounds() { - debugC(9, kDebugLevelAnimator, "Animator_v1::restoreAllObjectBackground()"); - AnimObject *curObject = _objectQueue; - _screen->_curPage = 2; - - while (curObject) { - if (curObject->active && !curObject->disable) { - preserveOrRestoreBackground(curObject, true); - curObject->x2 = curObject->x1; - curObject->y2 = curObject->y1; - } - curObject = curObject->nextAnimObject; - } - - _screen->_curPage = 0; -} - -void Animator_v1::preserveAnyChangedBackgrounds() { - debugC(9, kDebugLevelAnimator, "Animator_v1::preserveAnyChangedBackgrounds()"); - AnimObject *curObject = _objectQueue; - _screen->_curPage = 2; - - while (curObject) { - if (curObject->active && !curObject->disable && curObject->bkgdChangeFlag) { - preserveOrRestoreBackground(curObject, false); - curObject->bkgdChangeFlag = 0; - } - curObject = curObject->nextAnimObject; - } - - _screen->_curPage = 0; -} - -void Animator_v1::preserveOrRestoreBackground(AnimObject *obj, bool restore) { - debugC(9, kDebugLevelAnimator, "Animator_v1::preserveOrRestoreBackground(%p, %d)", (const void *)obj, restore); - int x = 0, y = 0, width = obj->width, height = obj->height; - - if (restore) { - x = obj->x2 >> 3; - y = obj->y2; - } else { - x = obj->x1 >> 3; - y = obj->y1; - } - - if (x < 0) - x = 0; - if (y < 0) - y = 0; - - int temp; - - temp = x + width; - if (temp >= 39) - x = 39 - width; - temp = y + height; - if (temp >= 136) - y = 136 - height; - - if (restore) - _screen->copyBlockToPage(_screen->_curPage, x << 3, y, width << 3, height, obj->background); - else - _screen->copyRegionToBuffer(_screen->_curPage, x << 3, y, width << 3, height, obj->background); -} - -void Animator_v1::prepDrawAllObjects() { - debugC(9, kDebugLevelAnimator, "Animator_v1::prepDrawAllObjects()"); - AnimObject *curObject = _objectQueue; - int drawPage = 2; - int flagUnk1 = 0, flagUnk2 = 0, flagUnk3 = 0; - if (_noDrawShapesFlag) - return; - if (_vm->_brandonStatusBit & 0x20) - flagUnk1 = 0x200; - if (_vm->_brandonStatusBit & 0x40) - flagUnk2 = 0x4000; - - while (curObject) { - if (curObject->active) { - int xpos = curObject->x1; - int ypos = curObject->y1; - - int drawLayer = 0; - if (!(curObject->flags & 0x800)) - drawLayer = 7; - else if (curObject->disable) - drawLayer = 0; - else - drawLayer = _vm->_sprites->getDrawLayer(curObject->drawY); - - // talking head functionallity - if (_vm->_talkingCharNum != -1 && (_vm->_currentCharacter->currentAnimFrame != 88 || curObject->index != 0)) { - const int16 baseAnimFrameTable1[] = { 0x11, 0x35, 0x59, 0x00, 0x00, 0x00 }; - const int16 baseAnimFrameTable2[] = { 0x15, 0x39, 0x5D, 0x00, 0x00, 0x00 }; - const int8 xOffsetTable1[] = { 2, 4, 0, 5, 2, 0, 0, 0 }; - const int8 xOffsetTable2[] = { 6, 4, 8, 3, 6, 0, 0, 0 }; - const int8 yOffsetTable1[] = { 0, 8, 1, 1, 0, 0, 0, 0 }; - const int8 yOffsetTable2[] = { 0, 8, 1, 1, 0, 0, 0, 0 }; - if (curObject->index == 0 || curObject->index <= 4) { - int shapesIndex = 0; - if (curObject->index == _vm->_charSayUnk3) { - shapesIndex = _vm->_currHeadShape + baseAnimFrameTable1[curObject->index]; - } else { - shapesIndex = baseAnimFrameTable2[curObject->index]; - int temp2 = 0; - if (curObject->index == 2) { - if (_vm->_characterList[2].sceneId == 77 || _vm->_characterList[2].sceneId == 86) - temp2 = 1; - else - temp2 = 0; - } else { - temp2 = 1; - } - - if (!temp2) - shapesIndex = -1; - } - - xpos = curObject->x1; - ypos = curObject->y1; - - int tempX = 0, tempY = 0; - if (curObject->flags & 0x1) { - tempX = (xOffsetTable1[curObject->index] * _brandonScaleX) >> 8; - tempY = yOffsetTable1[curObject->index]; - } else { - tempX = (xOffsetTable2[curObject->index] * _brandonScaleX) >> 8; - tempY = yOffsetTable2[curObject->index]; - } - tempY = (tempY * _brandonScaleY) >> 8; - xpos += tempX; - ypos += tempY; - - if (_vm->_scaleMode && _brandonScaleX != 256) - ++xpos; - - if (curObject->index == 0 && shapesIndex != -1) { - if (!(_vm->_brandonStatusBit & 2)) { - flagUnk3 = 0x100; - if ((flagUnk1 & 0x200) || (flagUnk2 & 0x4000)) - flagUnk3 = 0; - - int tempFlags = 0; - if (flagUnk3 & 0x100) { - tempFlags = curObject->flags & 1; - tempFlags |= 0x800 | flagUnk1 | 0x100; - } - - if (!(flagUnk3 & 0x100) && (flagUnk2 & 0x4000)) { - tempFlags = curObject->flags & 1; - tempFlags |= 0x900 | flagUnk1 | 0x4000; - _screen->drawShape(drawPage, _vm->_shapes[shapesIndex], xpos, ypos, 2, tempFlags | 4, _vm->_brandonPoisonFlagsGFX, int(1), int(_vm->_brandonInvFlag), drawLayer, _brandonScaleX, _brandonScaleY); - } else { - if (!(flagUnk2 & 0x4000)) { - tempFlags = curObject->flags & 1; - tempFlags |= 0x900 | flagUnk1; - } - - _screen->drawShape(drawPage, _vm->_shapes[shapesIndex], xpos, ypos, 2, tempFlags | 4, _vm->_brandonPoisonFlagsGFX, int(1), drawLayer, _brandonScaleX, _brandonScaleY); - } - } - } else { - if (shapesIndex != -1) { - int tempFlags = 0; - if (curObject->flags & 1) - tempFlags = 1; - _screen->drawShape(drawPage, _vm->_shapes[shapesIndex], xpos, ypos, 2, tempFlags | 0x800, drawLayer); - } - } - } - } - - xpos = curObject->x1; - ypos = curObject->y1; - - curObject->flags |= 0x800; - if (curObject->index == 0) { - flagUnk3 = 0x100; - - if (flagUnk1 & 0x200 || flagUnk2 & 0x4000) - flagUnk3 = 0; - - if (_vm->_brandonStatusBit & 2) - curObject->flags &= 0xFFFFFFFE; - - if (!_vm->_scaleMode) { - if (flagUnk3 & 0x100) - _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x100, (uint8*)_vm->_brandonPoisonFlagsGFX, int(1), drawLayer); - else if (flagUnk2 & 0x4000) - _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x4000, int(_vm->_brandonInvFlag), drawLayer); - else - _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1, drawLayer); - } else { - if (flagUnk3 & 0x100) - _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x104, (uint8*)_vm->_brandonPoisonFlagsGFX, int(1), drawLayer, _brandonScaleX, _brandonScaleY); - else if (flagUnk2 & 0x4000) - _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x4004, int(_vm->_brandonInvFlag), drawLayer, _brandonScaleX, _brandonScaleY); - else - _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | flagUnk1 | 0x4, drawLayer, _brandonScaleX, _brandonScaleY); - } - } else { - if (curObject->index >= 16 && curObject->index <= 27) - _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags | 4, drawLayer, (int)_vm->_scaleTable[curObject->drawY], (int)_vm->_scaleTable[curObject->drawY]); - else - _screen->drawShape(drawPage, curObject->sceneAnimPtr, xpos, ypos, 2, curObject->flags, drawLayer); - } - } - curObject = curObject->nextAnimObject; - } -} - -void Animator_v1::copyChangedObjectsForward(int refreshFlag) { - debugC(9, kDebugLevelAnimator, "Animator_v1::copyChangedObjectsForward(%d)", refreshFlag); - - for (AnimObject *curObject = _objectQueue; curObject; curObject = curObject->nextAnimObject) { - if (curObject->active) { - if (curObject->refreshFlag || refreshFlag) { - int xpos = 0, ypos = 0, width = 0, height = 0; - xpos = (curObject->x1>>3) - (curObject->width2>>3) - 1; - ypos = curObject->y1 - curObject->height2; - width = curObject->width + (curObject->width2>>3) + 2; - height = curObject->height + curObject->height2*2; - - if (xpos < 1) - xpos = 1; - else if (xpos > 39) - continue; - - if (xpos + width > 39) - width = 39 - xpos; - - if (ypos < 8) - ypos = 8; - else if (ypos > 136) - continue; - - if (ypos + height > 136) - height = 136 - ypos; - - _screen->copyRegion(xpos << 3, ypos, xpos << 3, ypos, width << 3, height, 2, 0); - curObject->refreshFlag = 0; - _updateScreen = true; - } - } - } - - if (_updateScreen) { - _screen->updateScreen(); - _updateScreen = false; - } -} - -void Animator_v1::updateAllObjectShapes() { - debugC(9, kDebugLevelAnimator, "Animator_v1::updateAllObjectShapes()"); - restoreAllObjectBackgrounds(); - preserveAnyChangedBackgrounds(); - prepDrawAllObjects(); - copyChangedObjectsForward(0); -} - -void Animator_v1::animRemoveGameItem(int index) { - debugC(9, kDebugLevelAnimator, "Animator_v1::animRemoveGameItem(%d)", index); - restoreAllObjectBackgrounds(); - - AnimObject *animObj = &_items[index]; - animObj->sceneAnimPtr = 0; - animObj->animFrameNumber = -1; - animObj->refreshFlag = 1; - animObj->bkgdChangeFlag = 1; - updateAllObjectShapes(); - animObj->active = 0; - - objectRemoveQueue(_objectQueue, animObj); -} - -void Animator_v1::animAddGameItem(int index, uint16 sceneId) { - debugC(9, kDebugLevelAnimator, "Animator_v1::animRemoveGameItem(%d, %d)", index, sceneId); - restoreAllObjectBackgrounds(); - assert(sceneId < _vm->_roomTableSize); - Room *currentRoom = &_vm->_roomTable[sceneId]; - AnimObject *animObj = &_items[index]; - animObj->active = 1; - animObj->refreshFlag = 1; - animObj->bkgdChangeFlag = 1; - animObj->drawY = currentRoom->itemsYPos[index]; - animObj->sceneAnimPtr = _vm->_shapes[216+currentRoom->itemsTable[index]]; - animObj->animFrameNumber = -1; - animObj->x1 = currentRoom->itemsXPos[index]; - animObj->y1 = currentRoom->itemsYPos[index]; - animObj->x1 -= fetchAnimWidth(animObj->sceneAnimPtr, _vm->_scaleTable[animObj->drawY]) >> 1; - animObj->y1 -= fetchAnimHeight(animObj->sceneAnimPtr, _vm->_scaleTable[animObj->drawY]); - animObj->x2 = animObj->x1; - animObj->y2 = animObj->y1; - animObj->width2 = 0; - animObj->height2 = 0; - _objectQueue = objectQueue(_objectQueue, animObj); - preserveAnyChangedBackgrounds(); - animObj->refreshFlag = 1; - animObj->bkgdChangeFlag = 1; -} - -void Animator_v1::animAddNPC(int character) { - debugC(9, kDebugLevelAnimator, "Animator_v1::animAddNPC(%d)", character); - restoreAllObjectBackgrounds(); - AnimObject *animObj = &_actors[character]; - const Character *ch = &_vm->_characterList[character]; - - animObj->active = 1; - animObj->refreshFlag = 1; - animObj->bkgdChangeFlag = 1; - animObj->drawY = ch->y1; - animObj->sceneAnimPtr = _vm->_shapes[ch->currentAnimFrame]; - animObj->x1 = animObj->x2 = ch->x1 + _vm->_defaultShapeTable[ch->currentAnimFrame-7].xOffset; - animObj->y1 = animObj->y2 = ch->y1 + _vm->_defaultShapeTable[ch->currentAnimFrame-7].yOffset; - - if (ch->facing >= 1 && ch->facing <= 3) - animObj->flags |= 1; - else if (ch->facing >= 5 && ch->facing <= 7) - animObj->flags &= 0xFFFFFFFE; - - _objectQueue = objectQueue(_objectQueue, animObj); - preserveAnyChangedBackgrounds(); - animObj->refreshFlag = 1; - animObj->bkgdChangeFlag = 1; -} - -Animator_v1::AnimObject *Animator_v1::objectRemoveQueue(AnimObject *queue, AnimObject *rem) { - debugC(9, kDebugLevelAnimator, "Animator_v1::objectRemoveQueue(%p, %p)", (const void *)queue, (const void *)rem); - AnimObject *cur = queue; - AnimObject *prev = queue; - - while (cur != rem && cur) { - AnimObject *temp = cur->nextAnimObject; - if (!temp) - break; - prev = cur; - cur = temp; - } - - if (cur == queue) { - if (!cur) - return 0; - return cur->nextAnimObject; - } - - if (!cur->nextAnimObject) { - if (cur == rem) { - if (!prev) - return 0; - else - prev->nextAnimObject = 0; - } - } else { - if (cur == rem) - prev->nextAnimObject = rem->nextAnimObject; - } - - return queue; -} - -Animator_v1::AnimObject *Animator_v1::objectAddHead(AnimObject *queue, AnimObject *head) { - debugC(9, kDebugLevelAnimator, "Animator_v1::objectAddHead(%p, %p)", (const void *)queue, (const void *)head); - head->nextAnimObject = queue; - return head; -} - -Animator_v1::AnimObject *Animator_v1::objectQueue(AnimObject *queue, AnimObject *add) { - debugC(9, kDebugLevelAnimator, "Animator_v1::objectQueue(%p, %p)", (const void *)queue, (const void *)add); - if (add->drawY <= queue->drawY || !queue) { - add->nextAnimObject = queue; - return add; - } - AnimObject *cur = queue; - AnimObject *prev = queue; - while (add->drawY > cur->drawY) { - AnimObject *temp = cur->nextAnimObject; - if (!temp) - break; - prev = cur; - cur = temp; - } - - if (add->drawY <= cur->drawY) { - prev->nextAnimObject = add; - add->nextAnimObject = cur; - } else { - cur->nextAnimObject = add; - add->nextAnimObject = 0; - } - return queue; -} - -void Animator_v1::addObjectToQueue(AnimObject *object) { - debugC(9, kDebugLevelAnimator, "Animator_v1::addObjectToQueue(%p)", (const void *)object); - if (!_objectQueue) - _objectQueue = objectAddHead(0, object); - else - _objectQueue = objectQueue(_objectQueue, object); -} - -void Animator_v1::refreshObject(AnimObject *object) { - debugC(9, kDebugLevelAnimator, "Animator_v1::refreshObject(%p)", (const void *)object); - _objectQueue = objectRemoveQueue(_objectQueue, object); - if (_objectQueue) - _objectQueue = objectQueue(_objectQueue, object); - else - _objectQueue = objectAddHead(0, object); -} - -void Animator_v1::makeBrandonFaceMouse() { - debugC(9, kDebugLevelAnimator, "Animator_v1::makeBrandonFaceMouse()"); - Common::Point mouse = _vm->getMousePos(); - if (mouse.x >= _vm->_currentCharacter->x1) - _vm->_currentCharacter->facing = 3; - else - _vm->_currentCharacter->facing = 5; - animRefreshNPC(0); - updateAllObjectShapes(); -} - -int16 Animator_v1::fetchAnimWidth(const uint8 *shape, int16 mult) { - debugC(9, kDebugLevelAnimator, "Animator_v1::fetchAnimWidth(%p, %d)", (const void *)shape, mult); - if (_vm->gameFlags().useAltShapeHeader) - shape += 2; - return (((int16)READ_LE_UINT16((shape+3))) * mult) >> 8; -} - -int16 Animator_v1::fetchAnimHeight(const uint8 *shape, int16 mult) { - debugC(9, kDebugLevelAnimator, "Animator_v1::fetchAnimHeight(%p, %d)", (const void *)shape, mult); - if (_vm->gameFlags().useAltShapeHeader) - shape += 2; - return (int16)(((int8)*(shape+2)) * mult) >> 8; -} - -void Animator_v1::setBrandonAnimSeqSize(int width, int height) { - debugC(9, kDebugLevelAnimator, "Animator_v1::setBrandonAnimSeqSize(%d, %d)", width, height); - restoreAllObjectBackgrounds(); - _brandonAnimSeqSizeWidth = _actors[0].width; - _brandonAnimSeqSizeHeight = _actors[0].height; - _actors[0].width = width + 1; - _actors[0].height = height; - preserveAllBackgrounds(); -} - -void Animator_v1::resetBrandonAnimSeqSize() { - debugC(9, kDebugLevelAnimator, "Animator_v1::resetBrandonAnimSeqSize()"); - restoreAllObjectBackgrounds(); - _actors[0].width = _brandonAnimSeqSizeWidth; - _actors[0].height = _brandonAnimSeqSizeHeight; - preserveAllBackgrounds(); -} - -void Animator_v1::animRefreshNPC(int character) { - debugC(9, kDebugLevelAnimator, "Animator_v1::animRefreshNPC(%d)", character); - AnimObject *animObj = &_actors[character]; - Character *ch = &_vm->characterList()[character]; - - animObj->refreshFlag = 1; - animObj->bkgdChangeFlag = 1; - int facing = ch->facing; - if (facing >= 1 && facing <= 3) - animObj->flags |= 1; - else if (facing >= 5 && facing <= 7) - animObj->flags &= 0xFFFFFFFE; - - animObj->drawY = ch->y1; - animObj->sceneAnimPtr = _vm->shapes()[ch->currentAnimFrame]; - animObj->animFrameNumber = ch->currentAnimFrame; - if (character == 0) { - if (_vm->brandonStatus() & 10) { - animObj->animFrameNumber = 88; - ch->currentAnimFrame = 88; - } - if (_vm->brandonStatus() & 2) { - animObj->animFrameNumber = _brandonDrawFrame; - ch->currentAnimFrame = _brandonDrawFrame; - animObj->sceneAnimPtr = _vm->shapes()[_brandonDrawFrame]; - if (_vm->_brandonStatusBit0x02Flag) { - ++_brandonDrawFrame; - // TODO: check this - if (_brandonDrawFrame >= 122) { - _brandonDrawFrame = 113; - _vm->_brandonStatusBit0x02Flag = 0; - } - } - } - } - - int xOffset = _vm->_defaultShapeTable[ch->currentAnimFrame-7].xOffset; - int yOffset = _vm->_defaultShapeTable[ch->currentAnimFrame-7].yOffset; - - if (_vm->_scaleMode) { - animObj->x1 = ch->x1; - animObj->y1 = ch->y1; - - int newScale = _vm->_scaleTable[ch->y1]; - _brandonScaleX = newScale; - _brandonScaleY = newScale; - - animObj->x1 += (_brandonScaleX * xOffset) >> 8; - animObj->y1 += (_brandonScaleY * yOffset) >> 8; - } else { - animObj->x1 = ch->x1 + xOffset; - animObj->y1 = ch->y1 + yOffset; - } - animObj->width2 = 4; - animObj->height2 = 3; - - refreshObject(animObj); -} - -void Animator_v1::setCharacterDefaultFrame(int character) { - debugC(9, kDebugLevelAnimator, "Animator_v1::setCharacterDefaultFrame()"); - static uint16 initFrameTable[] = { - 7, 41, 77, 0, 0 - }; - assert(character < ARRAYSIZE(initFrameTable)); - Character *edit = &_vm->characterList()[character]; - edit->sceneId = 0xFFFF; - edit->facing = 0; - edit->currentAnimFrame = initFrameTable[character]; - // edit->unk6 = 1; -} - -void Animator_v1::setCharactersHeight() { - debugC(9, kDebugLevelAnimator, "Animator_v1::setCharactersHeight()"); - static int8 initHeightTable[] = { - 48, 40, 48, 47, 56, - 44, 42, 47, 38, 35, - 40 - }; - for (int i = 0; i < 11; ++i) - _vm->characterList()[i].height = initHeightTable[i]; -} - -} // end of namespace Kyra - diff --git a/engines/kyra/animator_v1.h b/engines/kyra/animator_v1.h deleted file mode 100644 index 3ae0b23da4..0000000000 --- a/engines/kyra/animator_v1.h +++ /dev/null @@ -1,132 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef KYRA_ANIMATOR_V1_H -#define KYRA_ANIMATOR_V1_H - -namespace Kyra { -class KyraEngine_v1; -class Screen; - -class Animator_v1 { -public: - struct AnimObject { - uint8 index; - uint32 active; - uint32 refreshFlag; - uint32 bkgdChangeFlag; - bool disable; - uint32 flags; - int16 drawY; - uint8 *sceneAnimPtr; - int16 animFrameNumber; - uint8 *background; - uint16 rectSize; - int16 x1, y1; - int16 x2, y2; - uint16 width; - uint16 height; - uint16 width2; - uint16 height2; - AnimObject *nextAnimObject; - }; - - Animator_v1(KyraEngine_v1 *vm, OSystem *system); - virtual ~Animator_v1(); - - operator bool() const { return _initOk; } - - void init(int actors, int items, int sprites); - void close(); - - AnimObject *objects() { return _screenObjects; } - AnimObject *actors() { return _actors; } - AnimObject *items() { return _items; } - AnimObject *sprites() { return _sprites; } - - void initAnimStateList(); - void preserveAllBackgrounds(); - void flagAllObjectsForBkgdChange(); - void flagAllObjectsForRefresh(); - void restoreAllObjectBackgrounds(); - void preserveAnyChangedBackgrounds(); - virtual void prepDrawAllObjects(); - void copyChangedObjectsForward(int refreshFlag); - - void updateAllObjectShapes(); - void animRemoveGameItem(int index); - void animAddGameItem(int index, uint16 sceneId); - void animAddNPC(int character); - void animRefreshNPC(int character); - - void clearQueue() { _objectQueue = 0; } - void addObjectToQueue(AnimObject *object); - void refreshObject(AnimObject *object); - - void makeBrandonFaceMouse(); - void setBrandonAnimSeqSize(int width, int height); - void resetBrandonAnimSeqSize(); - void setCharacterDefaultFrame(int character); - void setCharactersHeight(); - - int16 fetchAnimWidth(const uint8 *shape, int16 mult); - int16 fetchAnimHeight(const uint8 *shape, int16 mult); - - int _noDrawShapesFlag; - bool _updateScreen; - uint16 _brandonDrawFrame; - int _brandonScaleX; - int _brandonScaleY; - -protected: - KyraEngine_v1 *_vm; - Screen *_screen; - OSystem *_system; - bool _initOk; - - AnimObject *_screenObjects; - - AnimObject *_actors; - AnimObject *_items; - AnimObject *_sprites; - - uint8 *_actorBkgBackUp[2]; - - AnimObject *objectRemoveQueue(AnimObject *queue, AnimObject *rem); - AnimObject *objectAddHead(AnimObject *queue, AnimObject *head); - AnimObject *objectQueue(AnimObject *queue, AnimObject *add); - - void preserveOrRestoreBackground(AnimObject *obj, bool restore); - - AnimObject *_objectQueue; - - int _brandonAnimSeqSizeWidth; - int _brandonAnimSeqSizeHeight; - -}; -} // end of namespace Kyra - -#endif - diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp index f90cf5a37b..932f5aa7dd 100644 --- a/engines/kyra/debugger.cpp +++ b/engines/kyra/debugger.cpp @@ -27,7 +27,7 @@ #include "common/config-manager.h" #include "common/system.h" #include "kyra/debugger.h" -#include "kyra/kyra_v1.h" +#include "kyra/kyra_lok.h" #include "kyra/kyra_v2.h" #include "kyra/kyra_hof.h" #include "kyra/screen.h" @@ -190,22 +190,22 @@ bool Debugger::cmd_setTimerCountdown(int argc, const char **argv) { #pragma mark - -Debugger_v1::Debugger_v1(KyraEngine_v1 *vm) +Debugger_LoK::Debugger_LoK(KyraEngine_LoK *vm) : Debugger(vm), _vm(vm) { - DCmd_Register("rooms", WRAP_METHOD(Debugger_v1, cmd_listRooms)); - DCmd_Register("give", WRAP_METHOD(Debugger_v1, cmd_giveItem)); - DCmd_Register("birthstones", WRAP_METHOD(Debugger_v1, cmd_listBirthstones)); + DCmd_Register("rooms", WRAP_METHOD(Debugger_LoK, cmd_listRooms)); + DCmd_Register("give", WRAP_METHOD(Debugger_LoK, cmd_giveItem)); + DCmd_Register("birthstones", WRAP_METHOD(Debugger_LoK, cmd_listBirthstones)); } -void Debugger_v1::preEnter() { +void Debugger_LoK::preEnter() { //_vm->midi.pause(1); } -void Debugger_v1::postEnter() { +void Debugger_LoK::postEnter() { //_vm->midi.pause(0); } -bool Debugger_v1::cmd_enterRoom(int argc, const char **argv) { +bool Debugger_LoK::cmd_enterRoom(int argc, const char **argv) { uint direction = 0; if (argc > 1) { int room = atoi(argv[1]); @@ -244,7 +244,7 @@ bool Debugger_v1::cmd_enterRoom(int argc, const char **argv) { return true; } -bool Debugger_v1::cmd_listRooms(int argc, const char **argv) { +bool Debugger_LoK::cmd_listRooms(int argc, const char **argv) { for (int i = 0; i < _vm->_roomTableSize; i++) { DebugPrintf("%-3i: %-10s", i, _vm->_roomFilenameTable[_vm->_roomTable[i].nameIndex]); if (!(i % 8)) @@ -255,7 +255,7 @@ bool Debugger_v1::cmd_listRooms(int argc, const char **argv) { return true; } -bool Debugger_v1::cmd_giveItem(int argc, const char **argv) { +bool Debugger_LoK::cmd_giveItem(int argc, const char **argv) { if (argc == 2) { int item = atoi(argv[1]); @@ -274,7 +274,7 @@ bool Debugger_v1::cmd_giveItem(int argc, const char **argv) { return true; } -bool Debugger_v1::cmd_listBirthstones(int argc, const char **argv) { +bool Debugger_LoK::cmd_listBirthstones(int argc, const char **argv) { DebugPrintf("Needed Birthstone gems:\n"); for (int i = 0; i < ARRAYSIZE(_vm->_birthstoneGemTable); ++i) DebugPrintf("%-2d '%s'\n", _vm->_birthstoneGemTable[i], _vm->_itemList[_vm->_birthstoneGemTable[i]]); diff --git a/engines/kyra/debugger.h b/engines/kyra/debugger.h index ab5657bbde..7b1d870daa 100644 --- a/engines/kyra/debugger.h +++ b/engines/kyra/debugger.h @@ -31,7 +31,7 @@ namespace Kyra { class KyraEngine; -class KyraEngine_v1; +class KyraEngine_LoK; class KyraEngine_v2; class KyraEngine_HoF; @@ -54,13 +54,13 @@ protected: bool cmd_setTimerCountdown(int argc, const char **argv); }; -class Debugger_v1 : public Debugger { +class Debugger_LoK : public Debugger { public: - Debugger_v1(KyraEngine_v1 *vm); - virtual ~Debugger_v1() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ + Debugger_LoK(KyraEngine_LoK *vm); + virtual ~Debugger_LoK() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ protected: - KyraEngine_v1 *_vm; + KyraEngine_LoK *_vm; virtual void preEnter(); virtual void postEnter(); diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index b921314e68..2b272fd7d7 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -23,7 +23,7 @@ */ #include "kyra/kyra.h" -#include "kyra/kyra_v1.h" +#include "kyra/kyra_lok.h" #include "kyra/kyra_hof.h" #include "kyra/kyra_mr.h" @@ -506,7 +506,7 @@ bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common switch (flags.gameID) { case Kyra::GI_KYRA1: - *engine = new Kyra::KyraEngine_v1(syst, flags); + *engine = new Kyra::KyraEngine_LoK(syst, flags); break; case Kyra::GI_KYRA2: *engine = new Kyra::KyraEngine_HoF(syst, flags); diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp index 74701f109e..12e4065ec6 100644 --- a/engines/kyra/gui_hof.cpp +++ b/engines/kyra/gui_hof.cpp @@ -271,7 +271,7 @@ void KyraEngine_HoF::redrawInventory(int page) { } void KyraEngine_HoF::scrollInventoryWheel() { - WSAMovieV2 movie(this, _screen); + WSAMovie_v2 movie(this, _screen); movie.open("INVWHEEL.WSA", 0, 0); int frames = movie.opened() ? movie.frames() : 6; memcpy(_screenBuffer, _screen->getCPagePtr(2), 64000); diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp new file mode 100644 index 0000000000..844574c5be --- /dev/null +++ b/engines/kyra/gui_lok.cpp @@ -0,0 +1,1115 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "kyra/kyra_lok.h" +#include "kyra/screen.h" +#include "kyra/script.h" +#include "kyra/text.h" +#include "kyra/animator_lok.h" +#include "kyra/sound.h" +#include "kyra/gui_lok.h" +#include "kyra/timer.h" + +#include "common/config-manager.h" +#include "common/savefile.h" +#include "common/events.h" +#include "common/system.h" + +namespace Kyra { + +void KyraEngine_LoK::initMainButtonList() { + _buttonList = &_buttonData[0]; + for (int i = 0; _buttonDataListPtr[i]; ++i) + _buttonList = _gui->addButtonToList(_buttonList, _buttonDataListPtr[i]); +} + +int KyraEngine_LoK::buttonInventoryCallback(Button *caller) { + int itemOffset = caller->index - 2; + uint8 inventoryItem = _currentCharacter->inventoryItems[itemOffset]; + if (_itemInHand == -1) { + if (inventoryItem == 0xFF) { + snd_playSoundEffect(0x36); + return 0; + } else { + _screen->hideMouse(); + _screen->fillRect(_itemPosX[itemOffset], _itemPosY[itemOffset], _itemPosX[itemOffset] + 15, _itemPosY[itemOffset] + 15, 12); + snd_playSoundEffect(0x35); + setMouseItem(inventoryItem); + updateSentenceCommand(_itemList[inventoryItem], _takenList[0], 179); + _itemInHand = inventoryItem; + _screen->showMouse(); + _currentCharacter->inventoryItems[itemOffset] = 0xFF; + } + } else { + if (inventoryItem != 0xFF) { + snd_playSoundEffect(0x35); + _screen->hideMouse(); + _screen->fillRect(_itemPosX[itemOffset], _itemPosY[itemOffset], _itemPosX[itemOffset] + 15, _itemPosY[itemOffset] + 15, 12); + _screen->drawShape(0, _shapes[216+_itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0); + setMouseItem(inventoryItem); + updateSentenceCommand(_itemList[inventoryItem], _takenList[1], 179); + _screen->showMouse(); + _currentCharacter->inventoryItems[itemOffset] = _itemInHand; + _itemInHand = inventoryItem; + } else { + snd_playSoundEffect(0x32); + _screen->hideMouse(); + _screen->drawShape(0, _shapes[216+_itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0); + _screen->setMouseCursor(1, 1, _shapes[0]); + updateSentenceCommand(_itemList[_itemInHand], _placedList[0], 179); + _screen->showMouse(); + _currentCharacter->inventoryItems[itemOffset] = _itemInHand; + _itemInHand = -1; + } + } + _screen->updateScreen(); + // XXX clearKyrandiaButtonIO + return 0; +} + +int KyraEngine_LoK::buttonAmuletCallback(Button *caller) { + if (!(_deathHandler & 8)) + return 1; + int jewel = caller->index - 0x14; + if (_currentCharacter->sceneId == 210) { + if (_beadStateVar == 4 || _beadStateVar == 6) + return 1; + } + if (!queryGameFlag(0x2D)) + return 1; + if (_itemInHand != -1) { + assert(_putDownFirst); + characterSays(2000, _putDownFirst[0], 0, -2); + return 1; + } + if (queryGameFlag(0xF1)) { + assert(_waitForAmulet); + characterSays(2001, _waitForAmulet[0], 0, -2); + return 1; + } + if (!queryGameFlag(0x55+jewel)) { + assert(_blackJewel); + _animator->makeBrandonFaceMouse(); + drawJewelPress(jewel, 1); + characterSays(2002, _blackJewel[0], 0, -2); + return 1; + } + drawJewelPress(jewel, 0); + drawJewelsFadeOutStart(); + drawJewelsFadeOutEnd(jewel); + + _emc->init(&_scriptClick, &_scriptClickData); + _scriptClick.regs[3] = 0; + _scriptClick.regs[6] = jewel; + _emc->start(&_scriptClick, 4); + + while (_emc->isValid(&_scriptClick)) + _emc->run(&_scriptClick); + + if (_scriptClick.regs[3]) + return 1; + + _unkAmuletVar = 1; + switch (jewel-1) { + case 0: + if (_brandonStatusBit & 1) { + seq_brandonHealing2(); + } else if (_brandonStatusBit == 0) { + seq_brandonHealing(); + assert(_healingTip); + characterSays(2003, _healingTip[0], 0, -2); + } + break; + + case 1: + seq_makeBrandonInv(); + break; + + case 2: + if (_brandonStatusBit & 1) { + assert(_wispJewelStrings); + characterSays(2004, _wispJewelStrings[0], 0, -2); + } else { + if (_brandonStatusBit & 2) { + // XXX + seq_makeBrandonNormal2(); + // XXX + } else { + // do not check for item in hand again as in the original since some strings are missing + // in the cd version + if (_currentCharacter->sceneId >= 109 && _currentCharacter->sceneId <= 198) { + snd_playWanderScoreViaMap(1, 0); + seq_makeBrandonWisp(); + snd_playWanderScoreViaMap(17, 0); + } else { + seq_makeBrandonWisp(); + } + setGameFlag(0x9E); + } + } + break; + + case 3: + seq_dispelMagicAnimation(); + assert(_magicJewelString); + characterSays(2007, _magicJewelString[0], 0, -2); + break; + + default: + break; + } + _unkAmuletVar = 0; + // XXX clearKyrandiaButtonIO (!used before every return in this function!) + return 1; +} + +#pragma mark - + +GUI_LoK::GUI_LoK(KyraEngine_LoK *vm, Screen_LoK *screen) : GUI(vm), _vm(vm), _screen(screen) { + _menu = 0; + initStaticResource(); + _scrollUpFunctor = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::scrollUp); + _scrollDownFunctor = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::scrollDown); +} + +GUI_LoK::~GUI_LoK() { + delete[] _menu; +} + +int GUI_LoK::processButtonList(Button *list, uint16 inputFlag, int8 mouseWheel) { + while (list) { + if (list->flags & 8) { + list = list->nextButton; + continue; + } + + if (mouseWheel && list->mouseWheel == mouseWheel && list->buttonCallback) { + if ((*list->buttonCallback.get())(list)) { + break; + } + } + + int x = list->x; + int y = list->y; + assert(_screen->getScreenDim(list->dimTableIndex) != 0); + if (x < 0) { + x += _screen->getScreenDim(list->dimTableIndex)->w << 3; + } + x += _screen->getScreenDim(list->dimTableIndex)->sx << 3; + + if (y < 0) { + y += _screen->getScreenDim(list->dimTableIndex)->h; + } + y += _screen->getScreenDim(list->dimTableIndex)->sy; + + Common::Point mouse = _vm->getMousePos(); + if (mouse.x >= x && mouse.y >= y && x + list->width >= mouse.x && y + list->height >= mouse.y) { + int processMouseClick = 0; + if (list->flags & 0x400) { + if (_vm->_mousePressFlag) { + if (!(list->flags2 & 1)) { + list->flags2 |= 1; + list->flags2 |= 4; + processButton(list); + _screen->updateScreen(); + } + } else { + if (list->flags2 & 1) { + list->flags2 &= 0xFFFE; + processButton(list); + processMouseClick = 1; + } + } + } else if (_vm->_mousePressFlag) { + processMouseClick = 1; + } + + if (processMouseClick) { + if (list->buttonCallback) { + if ((*list->buttonCallback.get())(list)) { + break; + } + } + } + } else { + if (list->flags2 & 1) { + list->flags2 &= 0xFFFE; + processButton(list); + } + if (list->flags2 & 4) { + list->flags2 &= 0xFFFB; + processButton(list); + _screen->updateScreen(); + } + list = list->nextButton; + continue; + } + + list = list->nextButton; + } + return 0; +} + +void GUI_LoK::processButton(Button *button) { + if (!button) + return; + + int processType = 0; + const uint8 *shape = 0; + Button::Callback callback; + + int flags = (button->flags2 & 5); + if (flags == 1) { + processType = button->data2Val1; + if (processType == 1) + shape = button->data2ShapePtr; + else if (processType == 4) + callback = button->data2Callback; + } else if (flags == 4 || flags == 5) { + processType = button->data1Val1; + if (processType == 1) + shape = button->data1ShapePtr; + else if (processType == 4) + callback = button->data1Callback; + } else { + processType = button->data0Val1; + if (processType == 1) + shape = button->data0ShapePtr; + else if (processType == 4) + callback = button->data0Callback; + } + + int x = button->x; + int y = button->y; + assert(_screen->getScreenDim(button->dimTableIndex) != 0); + if (x < 0) + x += _screen->getScreenDim(button->dimTableIndex)->w << 3; + + if (y < 0) + y += _screen->getScreenDim(button->dimTableIndex)->h; + + if (processType == 1 && shape) + _screen->drawShape(_screen->_curPage, shape, x, y, button->dimTableIndex, 0x10); + else if (processType == 4 && callback) + (*callback.get())(button); +} + +void GUI_LoK::setGUILabels() { + int offset = 0; + int offsetOptions = 0; + int offsetMainMenu = 0; + int offsetOn = 0; + + int walkspeedGarbageOffset = 36; + int menuLabelGarbageOffset = 0; + + if (_vm->gameFlags().isTalkie) { + if (_vm->gameFlags().lang == Common::EN_ANY) + offset = 52; + else if (_vm->gameFlags().lang == Common::DE_DEU) + offset = 30; + else if (_vm->gameFlags().lang == Common::FR_FRA || _vm->gameFlags().lang == Common::IT_ITA) + offset = 6; + offsetOn = offsetMainMenu = offsetOptions = offset; + walkspeedGarbageOffset = 48; + } else if (_vm->gameFlags().lang == Common::ES_ESP) { + offsetOn = offsetMainMenu = offsetOptions = offset = -4; + menuLabelGarbageOffset = 72; + } else if (_vm->gameFlags().lang == Common::DE_DEU) { + offset = offsetMainMenu = offsetOn = offsetOptions = 24; + } else if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98) { + offset = 1; + offsetOptions = 10; + offsetOn = 0; + walkspeedGarbageOffset = 0; + } + + assert(offset + 27 < _vm->_guiStringsSize); + + // The Legend of Kyrandia + _menu[0].menuNameString = _vm->_guiStrings[0]; + // Load a Game + _menu[0].item[0].itemString = _vm->_guiStrings[1]; + // Save a Game + _menu[0].item[1].itemString = _vm->_guiStrings[2]; + // Game controls + _menu[0].item[2].itemString = _vm->_guiStrings[3]; + // Quit playing + _menu[0].item[3].itemString = _vm->_guiStrings[4]; + // Resume game + _menu[0].item[4].itemString = _vm->_guiStrings[5]; + + // Cancel + _menu[2].item[5].itemString = _vm->_guiStrings[10]; + + // Enter a description of your saved game: + _menu[3].menuNameString = _vm->_guiStrings[11]; + // Save + _menu[3].item[0].itemString = _vm->_guiStrings[12]; + // Cancel + _menu[3].item[1].itemString = _vm->_guiStrings[10]; + + // Rest in peace, Brandon + _menu[4].menuNameString = _vm->_guiStrings[13]; + // Load a game + _menu[4].item[0].itemString = _vm->_guiStrings[1]; + // Quit playing + _menu[4].item[1].itemString = _vm->_guiStrings[4]; + + // Game Controls + _menu[5].menuNameString = _vm->_guiStrings[6]; + // Yes + _menu[1].item[0].itemString = _vm->_guiStrings[22 + offset]; + // No + _menu[1].item[1].itemString = _vm->_guiStrings[23 + offset]; + + // Music is + _menu[5].item[0].labelString = _vm->_guiStrings[26 + offsetOptions]; + // Sounds are + _menu[5].item[1].labelString = _vm->_guiStrings[27 + offsetOptions]; + // Walk speed + _menu[5].item[2].labelString = &_vm->_guiStrings[24 + offsetOptions][walkspeedGarbageOffset]; + // Text speed + _menu[5].item[4].labelString = _vm->_guiStrings[25 + offsetOptions]; + // Main Menu + _menu[5].item[5].itemString = &_vm->_guiStrings[19 + offsetMainMenu][menuLabelGarbageOffset]; + + if (_vm->gameFlags().isTalkie) + // Text & Voice + _voiceTextString = _vm->_guiStrings[28 + offset]; + + _textSpeedString = _vm->_guiStrings[25 + offsetOptions]; + _onString = _vm->_guiStrings[20 + offsetOn]; + _offString = _vm->_guiStrings[21 + offset]; + _onCDString = _vm->_guiStrings[21]; +} + +int GUI_LoK::buttonMenuCallback(Button *caller) { + PauseTimer pause(*_vm->_timer); + + _displayMenu = true; + + assert(_vm->_guiStrings); + assert(_vm->_configStrings); + + /* + for (int i = 0; i < _vm->_guiStringsSize; i++) + debug("GUI string %i: %s", i, _vm->_guiStrings[i]); + + for (int i = 0; i < _vm->_configStringsSize; i++) + debug("Config string %i: %s", i, _vm->_configStrings[i]); + */ + + setGUILabels(); + if (_vm->_currentCharacter->sceneId == 210 && _vm->_deathHandler == 0xFF) { + _vm->snd_playSoundEffect(0x36); + return 0; + } + // XXX + _screen->setPaletteIndex(0xFE, 60, 60, 0); + for (int i = 0; i < 6; i++) { + _menuButtonData[i].data0Val1 = _menuButtonData[i].data1Val1 = _menuButtonData[i].data2Val1 = 4; + _menuButtonData[i].data0Callback = _redrawShadedButtonFunctor; + _menuButtonData[i].data1Callback = _redrawButtonFunctor; + _menuButtonData[i].data2Callback = _redrawButtonFunctor; + } + + _screen->savePageToDisk("SEENPAGE.TMP", 0); + fadePalette(); + + for (int i = 0; i < 5; i++) + initMenuLayout(_menu[i]); + + _menuRestoreScreen = true; + _keyPressed.reset(); + _vm->_mousePressFlag = false; + + _toplevelMenu = 0; + if (_vm->_menuDirectlyToLoad) { + loadGameMenu(0); + } else { + if (!caller) + _toplevelMenu = 4; + + initMenu(_menu[_toplevelMenu]); + updateAllMenuButtons(); + } + + while (_displayMenu && !_vm->_quitFlag) { + Common::Point mouse = _vm->getMousePos(); + processHighlights(_menu[_toplevelMenu], mouse.x, mouse.y); + processButtonList(_menuButtonList, 0, 0); + getInput(); + } + + if (_menuRestoreScreen) { + restorePalette(); + _screen->loadPageFromDisk("SEENPAGE.TMP", 0); + _vm->_animator->_updateScreen = true; + } else { + _screen->deletePageFromDisk(0); + } + + return 0; +} + +void GUI_LoK::getInput() { + Common::Event event; + static uint32 lastScreenUpdate = 0; + uint32 now = _vm->_system->getMillis(); + + _mouseWheel = 0; + while (_vm->_eventMan->pollEvent(event)) { + switch (event.type) { + case Common::EVENT_QUIT: + _vm->quitGame(); + break; + case Common::EVENT_LBUTTONDOWN: + _vm->_mousePressFlag = true; + break; + case Common::EVENT_LBUTTONUP: + _vm->_mousePressFlag = false; + break; + case Common::EVENT_MOUSEMOVE: + _vm->_system->updateScreen(); + lastScreenUpdate = now; + break; + case Common::EVENT_WHEELUP: + _mouseWheel = -1; + break; + case Common::EVENT_WHEELDOWN: + _mouseWheel = 1; + break; + case Common::EVENT_KEYDOWN: + _keyPressed = event.kbd; + break; + default: + break; + } + } + + if (now - lastScreenUpdate > 50) { + _vm->_system->updateScreen(); + lastScreenUpdate = now; + } + + _vm->_system->delayMillis(3); +} + +int GUI_LoK::resumeGame(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::resumeGame()"); + updateMenuButton(button); + _displayMenu = false; + + return 0; +} + +void GUI_LoK::setupSavegames(Menu &menu, int num) { + Common::InSaveFile *in; + static char savenames[5][31]; + uint8 startSlot; + assert(num <= 5); + + if (_savegameOffset == 0) { + menu.item[0].itemString = _specialSavegameString; + menu.item[0].enabled = 1; + menu.item[0].saveSlot = 0; + startSlot = 1; + } else { + startSlot = 0; + } + + for (int i = startSlot; i < num; ++i) + menu.item[i].enabled = 0; + + KyraEngine::SaveHeader header; + for (int i = startSlot; i < num && uint(_savegameOffset + i) < _saveSlots.size(); i++) { + if ((in = _vm->openSaveForReading(_vm->getSavegameFilename(_saveSlots[i + _savegameOffset]), header))) { + strncpy(savenames[i], header.description.c_str(), 31); + menu.item[i].itemString = savenames[i]; + menu.item[i].enabled = 1; + menu.item[i].saveSlot = _saveSlots[i + _savegameOffset]; + delete in; + } + } +} + +int GUI_LoK::saveGameMenu(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::saveGameMenu()"); + updateSaveList(); + + updateMenuButton(button); + _menu[2].item[5].enabled = true; + + _screen->loadPageFromDisk("SEENPAGE.TMP", 0); + _screen->savePageToDisk("SEENPAGE.TMP", 0); + + _menu[2].menuNameString = _vm->_guiStrings[8]; // Select a position to save to: + _specialSavegameString = _vm->_guiStrings[9]; // [ EMPTY SLOT ] + for (int i = 0; i < 5; i++) + _menu[2].item[i].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::saveGame); + + _savegameOffset = 0; + setupSavegames(_menu[2], 5); + + initMenu(_menu[2]); + updateAllMenuButtons(); + + _displaySubMenu = true; + _cancelSubMenu = false; + + while (_displaySubMenu && !_vm->_quitFlag) { + getInput(); + Common::Point mouse = _vm->getMousePos(); + processHighlights(_menu[2], mouse.x, mouse.y); + processButtonList(_menuButtonList, 0, _mouseWheel); + } + + _screen->loadPageFromDisk("SEENPAGE.TMP", 0); + _screen->savePageToDisk("SEENPAGE.TMP", 0); + + if (_cancelSubMenu) { + initMenu(_menu[0]); + updateAllMenuButtons(); + } else { + _displayMenu = false; + } + return 0; +} + +int GUI_LoK::loadGameMenu(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::loadGameMenu()"); + updateSaveList(); + + if (_vm->_menuDirectlyToLoad) { + _menu[2].item[5].enabled = false; + } else { + updateMenuButton(button); + _menu[2].item[5].enabled = true; + } + + _screen->loadPageFromDisk("SEENPAGE.TMP", 0); + _screen->savePageToDisk("SEENPAGE.TMP", 0); + + _specialSavegameString = _vm->_newGameString[0]; //[ START A NEW GAME ] + _menu[2].menuNameString = _vm->_guiStrings[7]; // Which game would you like to reload? + for (int i = 0; i < 5; i++) + _menu[2].item[i].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::loadGame); + + _savegameOffset = 0; + setupSavegames(_menu[2], 5); + + initMenu(_menu[2]); + updateAllMenuButtons(); + + _displaySubMenu = true; + _cancelSubMenu = false; + + _vm->_gameToLoad = -1; + + while (_displaySubMenu && !_vm->_quitFlag) { + getInput(); + Common::Point mouse = _vm->getMousePos(); + processHighlights(_menu[2], mouse.x, mouse.y); + processButtonList(_menuButtonList, 0, _mouseWheel); + } + + _screen->loadPageFromDisk("SEENPAGE.TMP", 0); + _screen->savePageToDisk("SEENPAGE.TMP", 0); + + if (_cancelSubMenu) { + initMenu(_menu[_toplevelMenu]); + updateAllMenuButtons(); + } else { + restorePalette(); + if (_vm->_gameToLoad != -1) + _vm->loadGame(_vm->getSavegameFilename(_vm->_gameToLoad)); + _displayMenu = false; + _menuRestoreScreen = false; + } + return 0; +} + +void GUI_LoK::redrawTextfield() { + _screen->fillRect(38, 91, 287, 102, 250); + _text->printText(_savegameName, 38, 92, 253, 0, 0); + + _screen->_charWidth = -2; + int width = _screen->getTextWidth(_savegameName); + _screen->fillRect(39 + width, 93, 45 + width, 100, 254); + _screen->_charWidth = 0; + + _screen->updateScreen(); +} + +void GUI_LoK::updateSavegameString() { + int length; + + if (_keyPressed.keycode) { + length = strlen(_savegameName); + + if (_keyPressed.ascii > 31 && _keyPressed.ascii < 127) { + if (length < 31) { + _savegameName[length] = _keyPressed.ascii; + _savegameName[length+1] = 0; + redrawTextfield(); + } + } else if (_keyPressed.keycode == Common::KEYCODE_BACKSPACE || + _keyPressed.keycode == Common::KEYCODE_DELETE) { + if (length > 0) { + _savegameName[length-1] = 0; + redrawTextfield(); + } + } else if (_keyPressed.keycode == Common::KEYCODE_RETURN || + _keyPressed.keycode == Common::KEYCODE_KP_ENTER) { + _displaySubMenu = false; + } + } + + _keyPressed.reset(); +} + +int GUI_LoK::saveGame(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::saveGame()"); + updateMenuButton(button); + _vm->_gameToLoad = _menu[2].item[button->index-0xC].saveSlot; + + _screen->loadPageFromDisk("SEENPAGE.TMP", 0); + _screen->savePageToDisk("SEENPAGE.TMP", 0); + + initMenu(_menu[3]); + updateAllMenuButtons(); + + _displaySubMenu = true; + _cancelSubMenu = false; + + if (_savegameOffset == 0 && _vm->_gameToLoad == 0) { + _savegameName[0] = 0; + } else { + for (int i = 0; i < 5; i++) { + if (_menu[2].item[i].saveSlot == _vm->_gameToLoad) { + strncpy(_savegameName, _menu[2].item[i].itemString, 31); + break; + } + } + } + redrawTextfield(); + + while (_displaySubMenu && !_vm->_quitFlag) { + getInput(); + updateSavegameString(); + Common::Point mouse = _vm->getMousePos(); + processHighlights(_menu[3], mouse.x, mouse.y); + processButtonList(_menuButtonList, 0, 0); + } + + if (_cancelSubMenu) { + _displaySubMenu = true; + _cancelSubMenu = false; + initMenu(_menu[2]); + updateAllMenuButtons(); + } else { + if (_savegameOffset == 0 && _vm->_gameToLoad == 0) + _vm->_gameToLoad = getNextSavegameSlot(); + if (_vm->_gameToLoad > 0) + _vm->saveGame(_vm->getSavegameFilename(_vm->_gameToLoad), _savegameName); + } + + return 0; +} + +int GUI_LoK::savegameConfirm(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::savegameConfirm()"); + updateMenuButton(button); + _displaySubMenu = false; + + return 0; +} + +int GUI_LoK::loadGame(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::loadGame()"); + updateMenuButton(button); + _displaySubMenu = false; + _vm->_gameToLoad = _menu[2].item[button->index-0xC].saveSlot; + + return 0; +} + +int GUI_LoK::cancelSubMenu(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::cancelSubMenu()"); + updateMenuButton(button); + _displaySubMenu = false; + _cancelSubMenu = true; + + return 0; +} + +int GUI_LoK::quitPlaying(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::quitPlaying()"); + updateMenuButton(button); + + if (quitConfirm(_vm->_guiStrings[14])) { // Are you sure you want to quit playing? + _vm->quitGame(); + } else { + initMenu(_menu[_toplevelMenu]); + updateAllMenuButtons(); + } + + return 0; +} + +bool GUI_LoK::quitConfirm(const char *str) { + debugC(9, kDebugLevelGUI, "GUI_LoK::quitConfirm()"); + + _screen->loadPageFromDisk("SEENPAGE.TMP", 0); + _screen->savePageToDisk("SEENPAGE.TMP", 0); + + _menu[1].menuNameString = str; + initMenuLayout(_menu[1]); + initMenu(_menu[1]); + + _displaySubMenu = true; + _cancelSubMenu = true; + + while (_displaySubMenu && !_vm->_quitFlag) { + getInput(); + Common::Point mouse = _vm->getMousePos(); + processHighlights(_menu[1], mouse.x, mouse.y); + processButtonList(_menuButtonList, 0, 0); + } + + _screen->loadPageFromDisk("SEENPAGE.TMP", 0); + _screen->savePageToDisk("SEENPAGE.TMP", 0); + + return !_cancelSubMenu; +} + +int GUI_LoK::quitConfirmYes(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::quitConfirmYes()"); + updateMenuButton(button); + _displaySubMenu = false; + _cancelSubMenu = false; + + return 0; +} + +int GUI_LoK::quitConfirmNo(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::quitConfirmNo()"); + updateMenuButton(button); + _displaySubMenu = false; + _cancelSubMenu = true; + + return 0; +} + +int GUI_LoK::gameControlsMenu(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::gameControlsMenu()"); + + _vm->readSettings(); + + _screen->loadPageFromDisk("SEENPAGE.TMP", 0); + _screen->savePageToDisk("SEENPAGE.TMP", 0); + + if (_vm->gameFlags().isTalkie) { + //_menu[5].width = 230; + + for (int i = 0; i < 5; i++) { + //_menu[5].item[i].labelX = 24; + //_menu[5].item[i].x = 115; + //_menu[5].item[i].width = 94; + } + + _menu[5].item[3].labelString = _voiceTextString; //"Voice / Text " + _menu[5].item[3].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeVoice); + + } else { + //_menu[5].height = 136; + //_menu[5].item[5].y = 110; + _menu[5].item[4].enabled = 0; + _menu[5].item[3].labelString = _textSpeedString; // "Text speed " + _menu[5].item[3].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeText); + } + + setupControls(_menu[5]); + + updateAllMenuButtons(); + + _displaySubMenu = true; + _cancelSubMenu = false; + + while (_displaySubMenu && !_vm->_quitFlag) { + getInput(); + Common::Point mouse = _vm->getMousePos(); + processHighlights(_menu[5], mouse.x, mouse.y); + processButtonList(_menuButtonList, 0, 0); + } + + _screen->loadPageFromDisk("SEENPAGE.TMP", 0); + _screen->savePageToDisk("SEENPAGE.TMP", 0); + + if (_cancelSubMenu) { + initMenu(_menu[_toplevelMenu]); + updateAllMenuButtons(); + } + return 0; +} + +void GUI_LoK::setupControls(Menu &menu) { + debugC(9, kDebugLevelGUI, "GUI_LoK::setupControls()"); + + switch (_vm->_configMusic) { + case 0: + menu.item[0].itemString = _offString; //"Off" + break; + case 1: + menu.item[0].itemString = _onString; //"On" + break; + case 2: + menu.item[0].itemString = _onCDString; //"On + CD" + break; + } + + if (_vm->_configSounds) + menu.item[1].itemString = _onString; //"On" + else + menu.item[1].itemString = _offString; //"Off" + + + switch (_vm->_configWalkspeed) { + case 0: + menu.item[2].itemString = _vm->_configStrings[0]; //"Slowest" + break; + case 1: + menu.item[2].itemString = _vm->_configStrings[1]; //"Slow" + break; + case 2: + menu.item[2].itemString = _vm->_configStrings[2]; //"Normal" + break; + case 3: + menu.item[2].itemString = _vm->_configStrings[3]; //"Fast" + break; + case 4: + menu.item[2].itemString = _vm->_configStrings[4]; //"Fastest" + break; + default: + menu.item[2].itemString = "ERROR"; + break; + } + + int textControl = 3; + int clickableOffset = 8; + if (_vm->gameFlags().isTalkie) { + textControl = 4; + clickableOffset = 11; + + if (_vm->_configVoice == 0) { + menu.item[4].enabled = 1; + menu.item[4].labelString = _textSpeedString; + } else { + menu.item[4].enabled = 0; + menu.item[4].labelString = 0; + } + + switch (_vm->_configVoice) { + case 0: + menu.item[3].itemString = _vm->_configStrings[5]; //"Text only" + break; + case 1: + menu.item[3].itemString = _vm->_configStrings[6]; //"Voice only" + break; + case 2: + menu.item[3].itemString = _vm->_configStrings[7]; //"Voice & Text" + break; + default: + menu.item[3].itemString = "ERROR"; + break; + } + } else { + menu.item[4].enabled = 0; + menu.item[4].labelString = 0; + } + + switch (_vm->_configTextspeed) { + case 0: + menu.item[textControl].itemString = _vm->_configStrings[1]; //"Slow" + break; + case 1: + menu.item[textControl].itemString = _vm->_configStrings[2]; //"Normal" + break; + case 2: + menu.item[textControl].itemString = _vm->_configStrings[3]; //"Fast" + break; + case 3: + menu.item[textControl].itemString = _vm->_configStrings[clickableOffset]; //"Clickable" + break; + default: + menu.item[textControl].itemString = "ERROR"; + break; + } + + initMenuLayout(menu); + initMenu(menu); +} + +int GUI_LoK::controlsChangeMusic(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::controlsChangeMusic()"); + updateMenuButton(button); + + _vm->_configMusic = ++_vm->_configMusic % ((_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98) ? 3 : 2); + setupControls(_menu[5]); + return 0; +} + +int GUI_LoK::controlsChangeSounds(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::controlsChangeSounds()"); + updateMenuButton(button); + + _vm->_configSounds = !_vm->_configSounds; + setupControls(_menu[5]); + return 0; +} + +int GUI_LoK::controlsChangeWalk(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::controlsChangeWalk()"); + updateMenuButton(button); + + _vm->_configWalkspeed = ++_vm->_configWalkspeed % 5; + _vm->setWalkspeed(_vm->_configWalkspeed); + setupControls(_menu[5]); + return 0; +} + +int GUI_LoK::controlsChangeText(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::controlsChangeText()"); + updateMenuButton(button); + + _vm->_configTextspeed = ++_vm->_configTextspeed % 4; + setupControls(_menu[5]); + return 0; +} + +int GUI_LoK::controlsChangeVoice(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::controlsChangeVoice()"); + updateMenuButton(button); + + _vm->_configVoice = ++_vm->_configVoice % 3; + setupControls(_menu[5]); + return 0; +} + +int GUI_LoK::controlsApply(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::controlsApply()"); + _vm->writeSettings(); + return cancelSubMenu(button); +} + +int GUI_LoK::scrollUp(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::scrollUp()"); + updateMenuButton(button); + + if (_savegameOffset > 0) { + _savegameOffset--; + setupSavegames(_menu[2], 5); + initMenu(_menu[2]); + } + return 0; +} + +int GUI_LoK::scrollDown(Button *button) { + debugC(9, kDebugLevelGUI, "GUI_LoK::scrollDown()"); + updateMenuButton(button); + + _savegameOffset++; + if (uint(_savegameOffset + 5) >= _saveSlots.size()) + _savegameOffset = MAX(_saveSlots.size() - 5, 0); + setupSavegames(_menu[2], 5); + initMenu(_menu[2]); + + return 0; +} + +void GUI_LoK::fadePalette() { + if (_vm->gameFlags().platform == Common::kPlatformAmiga) + return; + + static int16 menuPalIndexes[] = {248, 249, 250, 251, 252, 253, 254, -1}; + int index = 0; + + memcpy(_screen->getPalette(2), _screen->_currentPalette, 768); + + for (int i = 0; i < 768; i++) + _screen->_currentPalette[i] >>= 1; + + while (menuPalIndexes[index] != -1) { + memcpy(&_screen->_currentPalette[menuPalIndexes[index]*3], &_screen->getPalette(2)[menuPalIndexes[index]*3], 3); + index++; + } + + _screen->fadePalette(_screen->_currentPalette, 2); +} + +void GUI_LoK::restorePalette() { + if (_vm->gameFlags().platform == Common::kPlatformAmiga) + return; + + memcpy(_screen->_currentPalette, _screen->getPalette(2), 768); + _screen->fadePalette(_screen->_currentPalette, 2); +} + +#pragma mark - + +void KyraEngine_LoK::drawAmulet() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::drawAmulet()"); + static const int16 amuletTable1[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x150, 0x155, 0x15A, 0x15F, 0x164, 0x145, -1}; + static const int16 amuletTable3[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x14F, 0x154, 0x159, 0x15E, 0x163, 0x144, -1}; + static const int16 amuletTable2[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x152, 0x157, 0x15C, 0x161, 0x166, 0x147, -1}; + static const int16 amuletTable4[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x151, 0x156, 0x15B, 0x160, 0x165, 0x146, -1}; + + resetGameFlag(0xF1); + _screen->hideMouse(); + + int i = 0; + while (amuletTable1[i] != -1) { + if (queryGameFlag(87)) + _screen->drawShape(0, _shapes[amuletTable1[i]], _amuletX[0], _amuletY[0], 0, 0); + + if (queryGameFlag(89)) + _screen->drawShape(0, _shapes[amuletTable2[i]], _amuletX[1], _amuletY[1], 0, 0); + + if (queryGameFlag(86)) + _screen->drawShape(0, _shapes[amuletTable3[i]], _amuletX[2], _amuletY[2], 0, 0); + + if (queryGameFlag(88)) + _screen->drawShape(0, _shapes[amuletTable4[i]], _amuletX[3], _amuletY[3], 0, 0); + + _screen->updateScreen(); + delayWithTicks(3); + i++; + } + _screen->showMouse(); +} + +} // end of namespace Kyra + diff --git a/engines/kyra/gui_lok.h b/engines/kyra/gui_lok.h new file mode 100644 index 0000000000..78284e5ec1 --- /dev/null +++ b/engines/kyra/gui_lok.h @@ -0,0 +1,177 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef KYRA_GUI_V1_H +#define KYRA_GUI_V1_H + +#include "kyra/gui.h" + +namespace Kyra { + +#define GUI_V1_BUTTON(button, a, b, c, d, e, f, g, h, i, j, k) \ + button.nextButton = 0; \ + button.index = a; \ + button.unk6 = button.unk8 = 0; \ + button.data0Val1 = b; \ + button.data1Val1 = c; \ + button.data2Val1 = d; \ + button.data0ShapePtr = button.data1ShapePtr = button.data2ShapePtr = 0; \ + button.flags = e; \ + button.dimTableIndex = f; \ + button.x = g; \ + button.y = h; \ + button.width = i; \ + button.height = j; \ + button.flags2 = k; \ + button.mouseWheel = 0 + +#define GUI_V1_MENU(menu, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \ + menu.x = a; \ + menu.y = b; \ + menu.width = c; \ + menu.height = d; \ + menu.bkgdColor = e; \ + menu.color1 = f; \ + menu.color2 = g; \ + menu.menuNameString = h; \ + menu.textColor = i; \ + menu.titleX = j; \ + menu.titleY = k; \ + menu.highlightedItem = l; \ + menu.numberOfItems = m; \ + menu.scrollUpButtonX = n; \ + menu.scrollUpButtonY = o; \ + menu.scrollDownButtonX = p; \ + menu.scrollDownButtonY = q + +#define GUI_V1_MENU_ITEM(item, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) \ + item.enabled = a; \ + item.itemString = d; \ + item.x = e; \ + item.y = g; \ + item.width = h; \ + item.height = i; \ + item.textColor = j; \ + item.highlightColor = k; \ + item.titleX = l; \ + item.bkgdColor = n; \ + item.color1 = o; \ + item.color2 = p; \ + item.saveSlot = q; \ + item.labelString = r; \ + item.labelX = s; \ + item.labelY = t; \ + item.unk1F = v + +class KyraEngine_LoK; + +class GUI_LoK : public GUI { + friend class KyraEngine_LoK; +public: + GUI_LoK(KyraEngine_LoK *vm, Screen_LoK *screen); + ~GUI_LoK(); + + void processButton(Button *button); + int processButtonList(Button *buttonList, uint16 inputFlags, int8 mouseWheel); + + int buttonMenuCallback(Button *caller); +private: + void initStaticResource(); + + Button _menuButtonData[6]; + Button _scrollUpButton; + Button _scrollDownButton; + Button *getButtonListData() { return _menuButtonData; } + Button *getScrollUpButton() { return &_scrollUpButton; } + Button *getScrollDownButton() { return &_scrollDownButton; } + + Menu *_menu; + + void setGUILabels(); + + void setupSavegames(Menu &menu, int num); + + int resumeGame(Button *button); + int loadGameMenu(Button *button); + int saveGameMenu(Button *button); + int gameControlsMenu(Button *button); + int quitPlaying(Button *button); + int quitConfirmYes(Button *button); + int quitConfirmNo(Button *button); + int loadGame(Button *button); + int saveGame(Button *button); + int savegameConfirm(Button *button); + int cancelSubMenu(Button *button); + int scrollUp(Button *button); + int scrollDown(Button *button); + int controlsChangeMusic(Button *button); + int controlsChangeSounds(Button *button); + int controlsChangeWalk(Button *button); + int controlsChangeText(Button *button); + int controlsChangeVoice(Button *button); + int controlsApply(Button *button); + + bool quitConfirm(const char *str); + void getInput(); + void updateSavegameString(); + void redrawTextfield(); + void fadePalette(); + void restorePalette(); + void setupControls(Menu &menu); + + uint8 defaultColor1() const { return 12; } + uint8 defaultColor2() const { return 248; } + + const char *getMenuTitle(const Menu &menu) { return menu.menuNameString; } + const char *getMenuItemTitle(const MenuItem &menuItem) { return menuItem.itemString; } + const char *getMenuItemLabel(const MenuItem &menuItem) { return menuItem.labelString; } + + KyraEngine_LoK *_vm; + Screen_LoK *_screen; + + bool _menuRestoreScreen; + uint8 _toplevelMenu; + int _savegameOffset; + char _savegameName[31]; + const char *_specialSavegameString; + Common::KeyState _keyPressed; + int8 _mouseWheel; + + Button::Callback _scrollUpFunctor; + Button::Callback _scrollDownFunctor; + Button::Callback getScrollUpButtonHandler() const { return _scrollUpFunctor; } + Button::Callback getScrollDownButtonHandler() const { return _scrollDownFunctor; } + + const char *_voiceTextString; + const char *_textSpeedString; + const char *_onString; + const char *_offString; + const char *_onCDString; +}; + +} // end of namespace Kyra + +#endif + diff --git a/engines/kyra/gui_v1.cpp b/engines/kyra/gui_v1.cpp deleted file mode 100644 index fab5db0a01..0000000000 --- a/engines/kyra/gui_v1.cpp +++ /dev/null @@ -1,1115 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "kyra/kyra_v1.h" -#include "kyra/screen.h" -#include "kyra/script.h" -#include "kyra/text.h" -#include "kyra/animator_v1.h" -#include "kyra/sound.h" -#include "kyra/gui_v1.h" -#include "kyra/timer.h" - -#include "common/config-manager.h" -#include "common/savefile.h" -#include "common/events.h" -#include "common/system.h" - -namespace Kyra { - -void KyraEngine_v1::initMainButtonList() { - _buttonList = &_buttonData[0]; - for (int i = 0; _buttonDataListPtr[i]; ++i) - _buttonList = _gui->addButtonToList(_buttonList, _buttonDataListPtr[i]); -} - -int KyraEngine_v1::buttonInventoryCallback(Button *caller) { - int itemOffset = caller->index - 2; - uint8 inventoryItem = _currentCharacter->inventoryItems[itemOffset]; - if (_itemInHand == -1) { - if (inventoryItem == 0xFF) { - snd_playSoundEffect(0x36); - return 0; - } else { - _screen->hideMouse(); - _screen->fillRect(_itemPosX[itemOffset], _itemPosY[itemOffset], _itemPosX[itemOffset] + 15, _itemPosY[itemOffset] + 15, 12); - snd_playSoundEffect(0x35); - setMouseItem(inventoryItem); - updateSentenceCommand(_itemList[inventoryItem], _takenList[0], 179); - _itemInHand = inventoryItem; - _screen->showMouse(); - _currentCharacter->inventoryItems[itemOffset] = 0xFF; - } - } else { - if (inventoryItem != 0xFF) { - snd_playSoundEffect(0x35); - _screen->hideMouse(); - _screen->fillRect(_itemPosX[itemOffset], _itemPosY[itemOffset], _itemPosX[itemOffset] + 15, _itemPosY[itemOffset] + 15, 12); - _screen->drawShape(0, _shapes[216+_itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0); - setMouseItem(inventoryItem); - updateSentenceCommand(_itemList[inventoryItem], _takenList[1], 179); - _screen->showMouse(); - _currentCharacter->inventoryItems[itemOffset] = _itemInHand; - _itemInHand = inventoryItem; - } else { - snd_playSoundEffect(0x32); - _screen->hideMouse(); - _screen->drawShape(0, _shapes[216+_itemInHand], _itemPosX[itemOffset], _itemPosY[itemOffset], 0, 0); - _screen->setMouseCursor(1, 1, _shapes[0]); - updateSentenceCommand(_itemList[_itemInHand], _placedList[0], 179); - _screen->showMouse(); - _currentCharacter->inventoryItems[itemOffset] = _itemInHand; - _itemInHand = -1; - } - } - _screen->updateScreen(); - // XXX clearKyrandiaButtonIO - return 0; -} - -int KyraEngine_v1::buttonAmuletCallback(Button *caller) { - if (!(_deathHandler & 8)) - return 1; - int jewel = caller->index - 0x14; - if (_currentCharacter->sceneId == 210) { - if (_beadStateVar == 4 || _beadStateVar == 6) - return 1; - } - if (!queryGameFlag(0x2D)) - return 1; - if (_itemInHand != -1) { - assert(_putDownFirst); - characterSays(2000, _putDownFirst[0], 0, -2); - return 1; - } - if (queryGameFlag(0xF1)) { - assert(_waitForAmulet); - characterSays(2001, _waitForAmulet[0], 0, -2); - return 1; - } - if (!queryGameFlag(0x55+jewel)) { - assert(_blackJewel); - _animator->makeBrandonFaceMouse(); - drawJewelPress(jewel, 1); - characterSays(2002, _blackJewel[0], 0, -2); - return 1; - } - drawJewelPress(jewel, 0); - drawJewelsFadeOutStart(); - drawJewelsFadeOutEnd(jewel); - - _emc->init(&_scriptClick, &_scriptClickData); - _scriptClick.regs[3] = 0; - _scriptClick.regs[6] = jewel; - _emc->start(&_scriptClick, 4); - - while (_emc->isValid(&_scriptClick)) - _emc->run(&_scriptClick); - - if (_scriptClick.regs[3]) - return 1; - - _unkAmuletVar = 1; - switch (jewel-1) { - case 0: - if (_brandonStatusBit & 1) { - seq_brandonHealing2(); - } else if (_brandonStatusBit == 0) { - seq_brandonHealing(); - assert(_healingTip); - characterSays(2003, _healingTip[0], 0, -2); - } - break; - - case 1: - seq_makeBrandonInv(); - break; - - case 2: - if (_brandonStatusBit & 1) { - assert(_wispJewelStrings); - characterSays(2004, _wispJewelStrings[0], 0, -2); - } else { - if (_brandonStatusBit & 2) { - // XXX - seq_makeBrandonNormal2(); - // XXX - } else { - // do not check for item in hand again as in the original since some strings are missing - // in the cd version - if (_currentCharacter->sceneId >= 109 && _currentCharacter->sceneId <= 198) { - snd_playWanderScoreViaMap(1, 0); - seq_makeBrandonWisp(); - snd_playWanderScoreViaMap(17, 0); - } else { - seq_makeBrandonWisp(); - } - setGameFlag(0x9E); - } - } - break; - - case 3: - seq_dispelMagicAnimation(); - assert(_magicJewelString); - characterSays(2007, _magicJewelString[0], 0, -2); - break; - - default: - break; - } - _unkAmuletVar = 0; - // XXX clearKyrandiaButtonIO (!used before every return in this function!) - return 1; -} - -#pragma mark - - -GUI_v1::GUI_v1(KyraEngine_v1 *vm, Screen_v1 *screen) : GUI(vm), _vm(vm), _screen(screen) { - _menu = 0; - initStaticResource(); - _scrollUpFunctor = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::scrollUp); - _scrollDownFunctor = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::scrollDown); -} - -GUI_v1::~GUI_v1() { - delete[] _menu; -} - -int GUI_v1::processButtonList(Button *list, uint16 inputFlag, int8 mouseWheel) { - while (list) { - if (list->flags & 8) { - list = list->nextButton; - continue; - } - - if (mouseWheel && list->mouseWheel == mouseWheel && list->buttonCallback) { - if ((*list->buttonCallback.get())(list)) { - break; - } - } - - int x = list->x; - int y = list->y; - assert(_screen->getScreenDim(list->dimTableIndex) != 0); - if (x < 0) { - x += _screen->getScreenDim(list->dimTableIndex)->w << 3; - } - x += _screen->getScreenDim(list->dimTableIndex)->sx << 3; - - if (y < 0) { - y += _screen->getScreenDim(list->dimTableIndex)->h; - } - y += _screen->getScreenDim(list->dimTableIndex)->sy; - - Common::Point mouse = _vm->getMousePos(); - if (mouse.x >= x && mouse.y >= y && x + list->width >= mouse.x && y + list->height >= mouse.y) { - int processMouseClick = 0; - if (list->flags & 0x400) { - if (_vm->_mousePressFlag) { - if (!(list->flags2 & 1)) { - list->flags2 |= 1; - list->flags2 |= 4; - processButton(list); - _screen->updateScreen(); - } - } else { - if (list->flags2 & 1) { - list->flags2 &= 0xFFFE; - processButton(list); - processMouseClick = 1; - } - } - } else if (_vm->_mousePressFlag) { - processMouseClick = 1; - } - - if (processMouseClick) { - if (list->buttonCallback) { - if ((*list->buttonCallback.get())(list)) { - break; - } - } - } - } else { - if (list->flags2 & 1) { - list->flags2 &= 0xFFFE; - processButton(list); - } - if (list->flags2 & 4) { - list->flags2 &= 0xFFFB; - processButton(list); - _screen->updateScreen(); - } - list = list->nextButton; - continue; - } - - list = list->nextButton; - } - return 0; -} - -void GUI_v1::processButton(Button *button) { - if (!button) - return; - - int processType = 0; - const uint8 *shape = 0; - Button::Callback callback; - - int flags = (button->flags2 & 5); - if (flags == 1) { - processType = button->data2Val1; - if (processType == 1) - shape = button->data2ShapePtr; - else if (processType == 4) - callback = button->data2Callback; - } else if (flags == 4 || flags == 5) { - processType = button->data1Val1; - if (processType == 1) - shape = button->data1ShapePtr; - else if (processType == 4) - callback = button->data1Callback; - } else { - processType = button->data0Val1; - if (processType == 1) - shape = button->data0ShapePtr; - else if (processType == 4) - callback = button->data0Callback; - } - - int x = button->x; - int y = button->y; - assert(_screen->getScreenDim(button->dimTableIndex) != 0); - if (x < 0) - x += _screen->getScreenDim(button->dimTableIndex)->w << 3; - - if (y < 0) - y += _screen->getScreenDim(button->dimTableIndex)->h; - - if (processType == 1 && shape) - _screen->drawShape(_screen->_curPage, shape, x, y, button->dimTableIndex, 0x10); - else if (processType == 4 && callback) - (*callback.get())(button); -} - -void GUI_v1::setGUILabels() { - int offset = 0; - int offsetOptions = 0; - int offsetMainMenu = 0; - int offsetOn = 0; - - int walkspeedGarbageOffset = 36; - int menuLabelGarbageOffset = 0; - - if (_vm->gameFlags().isTalkie) { - if (_vm->gameFlags().lang == Common::EN_ANY) - offset = 52; - else if (_vm->gameFlags().lang == Common::DE_DEU) - offset = 30; - else if (_vm->gameFlags().lang == Common::FR_FRA || _vm->gameFlags().lang == Common::IT_ITA) - offset = 6; - offsetOn = offsetMainMenu = offsetOptions = offset; - walkspeedGarbageOffset = 48; - } else if (_vm->gameFlags().lang == Common::ES_ESP) { - offsetOn = offsetMainMenu = offsetOptions = offset = -4; - menuLabelGarbageOffset = 72; - } else if (_vm->gameFlags().lang == Common::DE_DEU) { - offset = offsetMainMenu = offsetOn = offsetOptions = 24; - } else if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98) { - offset = 1; - offsetOptions = 10; - offsetOn = 0; - walkspeedGarbageOffset = 0; - } - - assert(offset + 27 < _vm->_guiStringsSize); - - // The Legend of Kyrandia - _menu[0].menuNameString = _vm->_guiStrings[0]; - // Load a Game - _menu[0].item[0].itemString = _vm->_guiStrings[1]; - // Save a Game - _menu[0].item[1].itemString = _vm->_guiStrings[2]; - // Game controls - _menu[0].item[2].itemString = _vm->_guiStrings[3]; - // Quit playing - _menu[0].item[3].itemString = _vm->_guiStrings[4]; - // Resume game - _menu[0].item[4].itemString = _vm->_guiStrings[5]; - - // Cancel - _menu[2].item[5].itemString = _vm->_guiStrings[10]; - - // Enter a description of your saved game: - _menu[3].menuNameString = _vm->_guiStrings[11]; - // Save - _menu[3].item[0].itemString = _vm->_guiStrings[12]; - // Cancel - _menu[3].item[1].itemString = _vm->_guiStrings[10]; - - // Rest in peace, Brandon - _menu[4].menuNameString = _vm->_guiStrings[13]; - // Load a game - _menu[4].item[0].itemString = _vm->_guiStrings[1]; - // Quit playing - _menu[4].item[1].itemString = _vm->_guiStrings[4]; - - // Game Controls - _menu[5].menuNameString = _vm->_guiStrings[6]; - // Yes - _menu[1].item[0].itemString = _vm->_guiStrings[22 + offset]; - // No - _menu[1].item[1].itemString = _vm->_guiStrings[23 + offset]; - - // Music is - _menu[5].item[0].labelString = _vm->_guiStrings[26 + offsetOptions]; - // Sounds are - _menu[5].item[1].labelString = _vm->_guiStrings[27 + offsetOptions]; - // Walk speed - _menu[5].item[2].labelString = &_vm->_guiStrings[24 + offsetOptions][walkspeedGarbageOffset]; - // Text speed - _menu[5].item[4].labelString = _vm->_guiStrings[25 + offsetOptions]; - // Main Menu - _menu[5].item[5].itemString = &_vm->_guiStrings[19 + offsetMainMenu][menuLabelGarbageOffset]; - - if (_vm->gameFlags().isTalkie) - // Text & Voice - _voiceTextString = _vm->_guiStrings[28 + offset]; - - _textSpeedString = _vm->_guiStrings[25 + offsetOptions]; - _onString = _vm->_guiStrings[20 + offsetOn]; - _offString = _vm->_guiStrings[21 + offset]; - _onCDString = _vm->_guiStrings[21]; -} - -int GUI_v1::buttonMenuCallback(Button *caller) { - PauseTimer pause(*_vm->_timer); - - _displayMenu = true; - - assert(_vm->_guiStrings); - assert(_vm->_configStrings); - - /* - for (int i = 0; i < _vm->_guiStringsSize; i++) - debug("GUI string %i: %s", i, _vm->_guiStrings[i]); - - for (int i = 0; i < _vm->_configStringsSize; i++) - debug("Config string %i: %s", i, _vm->_configStrings[i]); - */ - - setGUILabels(); - if (_vm->_currentCharacter->sceneId == 210 && _vm->_deathHandler == 0xFF) { - _vm->snd_playSoundEffect(0x36); - return 0; - } - // XXX - _screen->setPaletteIndex(0xFE, 60, 60, 0); - for (int i = 0; i < 6; i++) { - _menuButtonData[i].data0Val1 = _menuButtonData[i].data1Val1 = _menuButtonData[i].data2Val1 = 4; - _menuButtonData[i].data0Callback = _redrawShadedButtonFunctor; - _menuButtonData[i].data1Callback = _redrawButtonFunctor; - _menuButtonData[i].data2Callback = _redrawButtonFunctor; - } - - _screen->savePageToDisk("SEENPAGE.TMP", 0); - fadePalette(); - - for (int i = 0; i < 5; i++) - initMenuLayout(_menu[i]); - - _menuRestoreScreen = true; - _keyPressed.reset(); - _vm->_mousePressFlag = false; - - _toplevelMenu = 0; - if (_vm->_menuDirectlyToLoad) { - loadGameMenu(0); - } else { - if (!caller) - _toplevelMenu = 4; - - initMenu(_menu[_toplevelMenu]); - updateAllMenuButtons(); - } - - while (_displayMenu && !_vm->_quitFlag) { - Common::Point mouse = _vm->getMousePos(); - processHighlights(_menu[_toplevelMenu], mouse.x, mouse.y); - processButtonList(_menuButtonList, 0, 0); - getInput(); - } - - if (_menuRestoreScreen) { - restorePalette(); - _screen->loadPageFromDisk("SEENPAGE.TMP", 0); - _vm->_animator->_updateScreen = true; - } else { - _screen->deletePageFromDisk(0); - } - - return 0; -} - -void GUI_v1::getInput() { - Common::Event event; - static uint32 lastScreenUpdate = 0; - uint32 now = _vm->_system->getMillis(); - - _mouseWheel = 0; - while (_vm->_eventMan->pollEvent(event)) { - switch (event.type) { - case Common::EVENT_QUIT: - _vm->quitGame(); - break; - case Common::EVENT_LBUTTONDOWN: - _vm->_mousePressFlag = true; - break; - case Common::EVENT_LBUTTONUP: - _vm->_mousePressFlag = false; - break; - case Common::EVENT_MOUSEMOVE: - _vm->_system->updateScreen(); - lastScreenUpdate = now; - break; - case Common::EVENT_WHEELUP: - _mouseWheel = -1; - break; - case Common::EVENT_WHEELDOWN: - _mouseWheel = 1; - break; - case Common::EVENT_KEYDOWN: - _keyPressed = event.kbd; - break; - default: - break; - } - } - - if (now - lastScreenUpdate > 50) { - _vm->_system->updateScreen(); - lastScreenUpdate = now; - } - - _vm->_system->delayMillis(3); -} - -int GUI_v1::resumeGame(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::resumeGame()"); - updateMenuButton(button); - _displayMenu = false; - - return 0; -} - -void GUI_v1::setupSavegames(Menu &menu, int num) { - Common::InSaveFile *in; - static char savenames[5][31]; - uint8 startSlot; - assert(num <= 5); - - if (_savegameOffset == 0) { - menu.item[0].itemString = _specialSavegameString; - menu.item[0].enabled = 1; - menu.item[0].saveSlot = 0; - startSlot = 1; - } else { - startSlot = 0; - } - - for (int i = startSlot; i < num; ++i) - menu.item[i].enabled = 0; - - KyraEngine::SaveHeader header; - for (int i = startSlot; i < num && uint(_savegameOffset + i) < _saveSlots.size(); i++) { - if ((in = _vm->openSaveForReading(_vm->getSavegameFilename(_saveSlots[i + _savegameOffset]), header))) { - strncpy(savenames[i], header.description.c_str(), 31); - menu.item[i].itemString = savenames[i]; - menu.item[i].enabled = 1; - menu.item[i].saveSlot = _saveSlots[i + _savegameOffset]; - delete in; - } - } -} - -int GUI_v1::saveGameMenu(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::saveGameMenu()"); - updateSaveList(); - - updateMenuButton(button); - _menu[2].item[5].enabled = true; - - _screen->loadPageFromDisk("SEENPAGE.TMP", 0); - _screen->savePageToDisk("SEENPAGE.TMP", 0); - - _menu[2].menuNameString = _vm->_guiStrings[8]; // Select a position to save to: - _specialSavegameString = _vm->_guiStrings[9]; // [ EMPTY SLOT ] - for (int i = 0; i < 5; i++) - _menu[2].item[i].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::saveGame); - - _savegameOffset = 0; - setupSavegames(_menu[2], 5); - - initMenu(_menu[2]); - updateAllMenuButtons(); - - _displaySubMenu = true; - _cancelSubMenu = false; - - while (_displaySubMenu && !_vm->_quitFlag) { - getInput(); - Common::Point mouse = _vm->getMousePos(); - processHighlights(_menu[2], mouse.x, mouse.y); - processButtonList(_menuButtonList, 0, _mouseWheel); - } - - _screen->loadPageFromDisk("SEENPAGE.TMP", 0); - _screen->savePageToDisk("SEENPAGE.TMP", 0); - - if (_cancelSubMenu) { - initMenu(_menu[0]); - updateAllMenuButtons(); - } else { - _displayMenu = false; - } - return 0; -} - -int GUI_v1::loadGameMenu(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::loadGameMenu()"); - updateSaveList(); - - if (_vm->_menuDirectlyToLoad) { - _menu[2].item[5].enabled = false; - } else { - updateMenuButton(button); - _menu[2].item[5].enabled = true; - } - - _screen->loadPageFromDisk("SEENPAGE.TMP", 0); - _screen->savePageToDisk("SEENPAGE.TMP", 0); - - _specialSavegameString = _vm->_newGameString[0]; //[ START A NEW GAME ] - _menu[2].menuNameString = _vm->_guiStrings[7]; // Which game would you like to reload? - for (int i = 0; i < 5; i++) - _menu[2].item[i].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::loadGame); - - _savegameOffset = 0; - setupSavegames(_menu[2], 5); - - initMenu(_menu[2]); - updateAllMenuButtons(); - - _displaySubMenu = true; - _cancelSubMenu = false; - - _vm->_gameToLoad = -1; - - while (_displaySubMenu && !_vm->_quitFlag) { - getInput(); - Common::Point mouse = _vm->getMousePos(); - processHighlights(_menu[2], mouse.x, mouse.y); - processButtonList(_menuButtonList, 0, _mouseWheel); - } - - _screen->loadPageFromDisk("SEENPAGE.TMP", 0); - _screen->savePageToDisk("SEENPAGE.TMP", 0); - - if (_cancelSubMenu) { - initMenu(_menu[_toplevelMenu]); - updateAllMenuButtons(); - } else { - restorePalette(); - if (_vm->_gameToLoad != -1) - _vm->loadGame(_vm->getSavegameFilename(_vm->_gameToLoad)); - _displayMenu = false; - _menuRestoreScreen = false; - } - return 0; -} - -void GUI_v1::redrawTextfield() { - _screen->fillRect(38, 91, 287, 102, 250); - _text->printText(_savegameName, 38, 92, 253, 0, 0); - - _screen->_charWidth = -2; - int width = _screen->getTextWidth(_savegameName); - _screen->fillRect(39 + width, 93, 45 + width, 100, 254); - _screen->_charWidth = 0; - - _screen->updateScreen(); -} - -void GUI_v1::updateSavegameString() { - int length; - - if (_keyPressed.keycode) { - length = strlen(_savegameName); - - if (_keyPressed.ascii > 31 && _keyPressed.ascii < 127) { - if (length < 31) { - _savegameName[length] = _keyPressed.ascii; - _savegameName[length+1] = 0; - redrawTextfield(); - } - } else if (_keyPressed.keycode == Common::KEYCODE_BACKSPACE || - _keyPressed.keycode == Common::KEYCODE_DELETE) { - if (length > 0) { - _savegameName[length-1] = 0; - redrawTextfield(); - } - } else if (_keyPressed.keycode == Common::KEYCODE_RETURN || - _keyPressed.keycode == Common::KEYCODE_KP_ENTER) { - _displaySubMenu = false; - } - } - - _keyPressed.reset(); -} - -int GUI_v1::saveGame(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::saveGame()"); - updateMenuButton(button); - _vm->_gameToLoad = _menu[2].item[button->index-0xC].saveSlot; - - _screen->loadPageFromDisk("SEENPAGE.TMP", 0); - _screen->savePageToDisk("SEENPAGE.TMP", 0); - - initMenu(_menu[3]); - updateAllMenuButtons(); - - _displaySubMenu = true; - _cancelSubMenu = false; - - if (_savegameOffset == 0 && _vm->_gameToLoad == 0) { - _savegameName[0] = 0; - } else { - for (int i = 0; i < 5; i++) { - if (_menu[2].item[i].saveSlot == _vm->_gameToLoad) { - strncpy(_savegameName, _menu[2].item[i].itemString, 31); - break; - } - } - } - redrawTextfield(); - - while (_displaySubMenu && !_vm->_quitFlag) { - getInput(); - updateSavegameString(); - Common::Point mouse = _vm->getMousePos(); - processHighlights(_menu[3], mouse.x, mouse.y); - processButtonList(_menuButtonList, 0, 0); - } - - if (_cancelSubMenu) { - _displaySubMenu = true; - _cancelSubMenu = false; - initMenu(_menu[2]); - updateAllMenuButtons(); - } else { - if (_savegameOffset == 0 && _vm->_gameToLoad == 0) - _vm->_gameToLoad = getNextSavegameSlot(); - if (_vm->_gameToLoad > 0) - _vm->saveGame(_vm->getSavegameFilename(_vm->_gameToLoad), _savegameName); - } - - return 0; -} - -int GUI_v1::savegameConfirm(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::savegameConfirm()"); - updateMenuButton(button); - _displaySubMenu = false; - - return 0; -} - -int GUI_v1::loadGame(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::loadGame()"); - updateMenuButton(button); - _displaySubMenu = false; - _vm->_gameToLoad = _menu[2].item[button->index-0xC].saveSlot; - - return 0; -} - -int GUI_v1::cancelSubMenu(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::cancelSubMenu()"); - updateMenuButton(button); - _displaySubMenu = false; - _cancelSubMenu = true; - - return 0; -} - -int GUI_v1::quitPlaying(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::quitPlaying()"); - updateMenuButton(button); - - if (quitConfirm(_vm->_guiStrings[14])) { // Are you sure you want to quit playing? - _vm->quitGame(); - } else { - initMenu(_menu[_toplevelMenu]); - updateAllMenuButtons(); - } - - return 0; -} - -bool GUI_v1::quitConfirm(const char *str) { - debugC(9, kDebugLevelGUI, "GUI_v1::quitConfirm()"); - - _screen->loadPageFromDisk("SEENPAGE.TMP", 0); - _screen->savePageToDisk("SEENPAGE.TMP", 0); - - _menu[1].menuNameString = str; - initMenuLayout(_menu[1]); - initMenu(_menu[1]); - - _displaySubMenu = true; - _cancelSubMenu = true; - - while (_displaySubMenu && !_vm->_quitFlag) { - getInput(); - Common::Point mouse = _vm->getMousePos(); - processHighlights(_menu[1], mouse.x, mouse.y); - processButtonList(_menuButtonList, 0, 0); - } - - _screen->loadPageFromDisk("SEENPAGE.TMP", 0); - _screen->savePageToDisk("SEENPAGE.TMP", 0); - - return !_cancelSubMenu; -} - -int GUI_v1::quitConfirmYes(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::quitConfirmYes()"); - updateMenuButton(button); - _displaySubMenu = false; - _cancelSubMenu = false; - - return 0; -} - -int GUI_v1::quitConfirmNo(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::quitConfirmNo()"); - updateMenuButton(button); - _displaySubMenu = false; - _cancelSubMenu = true; - - return 0; -} - -int GUI_v1::gameControlsMenu(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::gameControlsMenu()"); - - _vm->readSettings(); - - _screen->loadPageFromDisk("SEENPAGE.TMP", 0); - _screen->savePageToDisk("SEENPAGE.TMP", 0); - - if (_vm->gameFlags().isTalkie) { - //_menu[5].width = 230; - - for (int i = 0; i < 5; i++) { - //_menu[5].item[i].labelX = 24; - //_menu[5].item[i].x = 115; - //_menu[5].item[i].width = 94; - } - - _menu[5].item[3].labelString = _voiceTextString; //"Voice / Text " - _menu[5].item[3].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::controlsChangeVoice); - - } else { - //_menu[5].height = 136; - //_menu[5].item[5].y = 110; - _menu[5].item[4].enabled = 0; - _menu[5].item[3].labelString = _textSpeedString; // "Text speed " - _menu[5].item[3].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::controlsChangeText); - } - - setupControls(_menu[5]); - - updateAllMenuButtons(); - - _displaySubMenu = true; - _cancelSubMenu = false; - - while (_displaySubMenu && !_vm->_quitFlag) { - getInput(); - Common::Point mouse = _vm->getMousePos(); - processHighlights(_menu[5], mouse.x, mouse.y); - processButtonList(_menuButtonList, 0, 0); - } - - _screen->loadPageFromDisk("SEENPAGE.TMP", 0); - _screen->savePageToDisk("SEENPAGE.TMP", 0); - - if (_cancelSubMenu) { - initMenu(_menu[_toplevelMenu]); - updateAllMenuButtons(); - } - return 0; -} - -void GUI_v1::setupControls(Menu &menu) { - debugC(9, kDebugLevelGUI, "GUI_v1::setupControls()"); - - switch (_vm->_configMusic) { - case 0: - menu.item[0].itemString = _offString; //"Off" - break; - case 1: - menu.item[0].itemString = _onString; //"On" - break; - case 2: - menu.item[0].itemString = _onCDString; //"On + CD" - break; - } - - if (_vm->_configSounds) - menu.item[1].itemString = _onString; //"On" - else - menu.item[1].itemString = _offString; //"Off" - - - switch (_vm->_configWalkspeed) { - case 0: - menu.item[2].itemString = _vm->_configStrings[0]; //"Slowest" - break; - case 1: - menu.item[2].itemString = _vm->_configStrings[1]; //"Slow" - break; - case 2: - menu.item[2].itemString = _vm->_configStrings[2]; //"Normal" - break; - case 3: - menu.item[2].itemString = _vm->_configStrings[3]; //"Fast" - break; - case 4: - menu.item[2].itemString = _vm->_configStrings[4]; //"Fastest" - break; - default: - menu.item[2].itemString = "ERROR"; - break; - } - - int textControl = 3; - int clickableOffset = 8; - if (_vm->gameFlags().isTalkie) { - textControl = 4; - clickableOffset = 11; - - if (_vm->_configVoice == 0) { - menu.item[4].enabled = 1; - menu.item[4].labelString = _textSpeedString; - } else { - menu.item[4].enabled = 0; - menu.item[4].labelString = 0; - } - - switch (_vm->_configVoice) { - case 0: - menu.item[3].itemString = _vm->_configStrings[5]; //"Text only" - break; - case 1: - menu.item[3].itemString = _vm->_configStrings[6]; //"Voice only" - break; - case 2: - menu.item[3].itemString = _vm->_configStrings[7]; //"Voice & Text" - break; - default: - menu.item[3].itemString = "ERROR"; - break; - } - } else { - menu.item[4].enabled = 0; - menu.item[4].labelString = 0; - } - - switch (_vm->_configTextspeed) { - case 0: - menu.item[textControl].itemString = _vm->_configStrings[1]; //"Slow" - break; - case 1: - menu.item[textControl].itemString = _vm->_configStrings[2]; //"Normal" - break; - case 2: - menu.item[textControl].itemString = _vm->_configStrings[3]; //"Fast" - break; - case 3: - menu.item[textControl].itemString = _vm->_configStrings[clickableOffset]; //"Clickable" - break; - default: - menu.item[textControl].itemString = "ERROR"; - break; - } - - initMenuLayout(menu); - initMenu(menu); -} - -int GUI_v1::controlsChangeMusic(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::controlsChangeMusic()"); - updateMenuButton(button); - - _vm->_configMusic = ++_vm->_configMusic % ((_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98) ? 3 : 2); - setupControls(_menu[5]); - return 0; -} - -int GUI_v1::controlsChangeSounds(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::controlsChangeSounds()"); - updateMenuButton(button); - - _vm->_configSounds = !_vm->_configSounds; - setupControls(_menu[5]); - return 0; -} - -int GUI_v1::controlsChangeWalk(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::controlsChangeWalk()"); - updateMenuButton(button); - - _vm->_configWalkspeed = ++_vm->_configWalkspeed % 5; - _vm->setWalkspeed(_vm->_configWalkspeed); - setupControls(_menu[5]); - return 0; -} - -int GUI_v1::controlsChangeText(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::controlsChangeText()"); - updateMenuButton(button); - - _vm->_configTextspeed = ++_vm->_configTextspeed % 4; - setupControls(_menu[5]); - return 0; -} - -int GUI_v1::controlsChangeVoice(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::controlsChangeVoice()"); - updateMenuButton(button); - - _vm->_configVoice = ++_vm->_configVoice % 3; - setupControls(_menu[5]); - return 0; -} - -int GUI_v1::controlsApply(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::controlsApply()"); - _vm->writeSettings(); - return cancelSubMenu(button); -} - -int GUI_v1::scrollUp(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::scrollUp()"); - updateMenuButton(button); - - if (_savegameOffset > 0) { - _savegameOffset--; - setupSavegames(_menu[2], 5); - initMenu(_menu[2]); - } - return 0; -} - -int GUI_v1::scrollDown(Button *button) { - debugC(9, kDebugLevelGUI, "GUI_v1::scrollDown()"); - updateMenuButton(button); - - _savegameOffset++; - if (uint(_savegameOffset + 5) >= _saveSlots.size()) - _savegameOffset = MAX(_saveSlots.size() - 5, 0); - setupSavegames(_menu[2], 5); - initMenu(_menu[2]); - - return 0; -} - -void GUI_v1::fadePalette() { - if (_vm->gameFlags().platform == Common::kPlatformAmiga) - return; - - static int16 menuPalIndexes[] = {248, 249, 250, 251, 252, 253, 254, -1}; - int index = 0; - - memcpy(_screen->getPalette(2), _screen->_currentPalette, 768); - - for (int i = 0; i < 768; i++) - _screen->_currentPalette[i] >>= 1; - - while (menuPalIndexes[index] != -1) { - memcpy(&_screen->_currentPalette[menuPalIndexes[index]*3], &_screen->getPalette(2)[menuPalIndexes[index]*3], 3); - index++; - } - - _screen->fadePalette(_screen->_currentPalette, 2); -} - -void GUI_v1::restorePalette() { - if (_vm->gameFlags().platform == Common::kPlatformAmiga) - return; - - memcpy(_screen->_currentPalette, _screen->getPalette(2), 768); - _screen->fadePalette(_screen->_currentPalette, 2); -} - -#pragma mark - - -void KyraEngine_v1::drawAmulet() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::drawAmulet()"); - static const int16 amuletTable1[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x150, 0x155, 0x15A, 0x15F, 0x164, 0x145, -1}; - static const int16 amuletTable3[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x14F, 0x154, 0x159, 0x15E, 0x163, 0x144, -1}; - static const int16 amuletTable2[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x152, 0x157, 0x15C, 0x161, 0x166, 0x147, -1}; - static const int16 amuletTable4[] = {0x167, 0x162, 0x15D, 0x158, 0x153, 0x151, 0x156, 0x15B, 0x160, 0x165, 0x146, -1}; - - resetGameFlag(0xF1); - _screen->hideMouse(); - - int i = 0; - while (amuletTable1[i] != -1) { - if (queryGameFlag(87)) - _screen->drawShape(0, _shapes[amuletTable1[i]], _amuletX[0], _amuletY[0], 0, 0); - - if (queryGameFlag(89)) - _screen->drawShape(0, _shapes[amuletTable2[i]], _amuletX[1], _amuletY[1], 0, 0); - - if (queryGameFlag(86)) - _screen->drawShape(0, _shapes[amuletTable3[i]], _amuletX[2], _amuletY[2], 0, 0); - - if (queryGameFlag(88)) - _screen->drawShape(0, _shapes[amuletTable4[i]], _amuletX[3], _amuletY[3], 0, 0); - - _screen->updateScreen(); - delayWithTicks(3); - i++; - } - _screen->showMouse(); -} - -} // end of namespace Kyra - diff --git a/engines/kyra/gui_v1.h b/engines/kyra/gui_v1.h deleted file mode 100644 index 65ccad6eeb..0000000000 --- a/engines/kyra/gui_v1.h +++ /dev/null @@ -1,177 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef KYRA_GUI_V1_H -#define KYRA_GUI_V1_H - -#include "kyra/gui.h" - -namespace Kyra { - -#define GUI_V1_BUTTON(button, a, b, c, d, e, f, g, h, i, j, k) \ - button.nextButton = 0; \ - button.index = a; \ - button.unk6 = button.unk8 = 0; \ - button.data0Val1 = b; \ - button.data1Val1 = c; \ - button.data2Val1 = d; \ - button.data0ShapePtr = button.data1ShapePtr = button.data2ShapePtr = 0; \ - button.flags = e; \ - button.dimTableIndex = f; \ - button.x = g; \ - button.y = h; \ - button.width = i; \ - button.height = j; \ - button.flags2 = k; \ - button.mouseWheel = 0 - -#define GUI_V1_MENU(menu, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \ - menu.x = a; \ - menu.y = b; \ - menu.width = c; \ - menu.height = d; \ - menu.bkgdColor = e; \ - menu.color1 = f; \ - menu.color2 = g; \ - menu.menuNameString = h; \ - menu.textColor = i; \ - menu.titleX = j; \ - menu.titleY = k; \ - menu.highlightedItem = l; \ - menu.numberOfItems = m; \ - menu.scrollUpButtonX = n; \ - menu.scrollUpButtonY = o; \ - menu.scrollDownButtonX = p; \ - menu.scrollDownButtonY = q - -#define GUI_V1_MENU_ITEM(item, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) \ - item.enabled = a; \ - item.itemString = d; \ - item.x = e; \ - item.y = g; \ - item.width = h; \ - item.height = i; \ - item.textColor = j; \ - item.highlightColor = k; \ - item.titleX = l; \ - item.bkgdColor = n; \ - item.color1 = o; \ - item.color2 = p; \ - item.saveSlot = q; \ - item.labelString = r; \ - item.labelX = s; \ - item.labelY = t; \ - item.unk1F = v - -class KyraEngine_v1; - -class GUI_v1 : public GUI { - friend class KyraEngine_v1; -public: - GUI_v1(KyraEngine_v1 *vm, Screen_v1 *screen); - ~GUI_v1(); - - void processButton(Button *button); - int processButtonList(Button *buttonList, uint16 inputFlags, int8 mouseWheel); - - int buttonMenuCallback(Button *caller); -private: - void initStaticResource(); - - Button _menuButtonData[6]; - Button _scrollUpButton; - Button _scrollDownButton; - Button *getButtonListData() { return _menuButtonData; } - Button *getScrollUpButton() { return &_scrollUpButton; } - Button *getScrollDownButton() { return &_scrollDownButton; } - - Menu *_menu; - - void setGUILabels(); - - void setupSavegames(Menu &menu, int num); - - int resumeGame(Button *button); - int loadGameMenu(Button *button); - int saveGameMenu(Button *button); - int gameControlsMenu(Button *button); - int quitPlaying(Button *button); - int quitConfirmYes(Button *button); - int quitConfirmNo(Button *button); - int loadGame(Button *button); - int saveGame(Button *button); - int savegameConfirm(Button *button); - int cancelSubMenu(Button *button); - int scrollUp(Button *button); - int scrollDown(Button *button); - int controlsChangeMusic(Button *button); - int controlsChangeSounds(Button *button); - int controlsChangeWalk(Button *button); - int controlsChangeText(Button *button); - int controlsChangeVoice(Button *button); - int controlsApply(Button *button); - - bool quitConfirm(const char *str); - void getInput(); - void updateSavegameString(); - void redrawTextfield(); - void fadePalette(); - void restorePalette(); - void setupControls(Menu &menu); - - uint8 defaultColor1() const { return 12; } - uint8 defaultColor2() const { return 248; } - - const char *getMenuTitle(const Menu &menu) { return menu.menuNameString; } - const char *getMenuItemTitle(const MenuItem &menuItem) { return menuItem.itemString; } - const char *getMenuItemLabel(const MenuItem &menuItem) { return menuItem.labelString; } - - KyraEngine_v1 *_vm; - Screen_v1 *_screen; - - bool _menuRestoreScreen; - uint8 _toplevelMenu; - int _savegameOffset; - char _savegameName[31]; - const char *_specialSavegameString; - Common::KeyState _keyPressed; - int8 _mouseWheel; - - Button::Callback _scrollUpFunctor; - Button::Callback _scrollDownFunctor; - Button::Callback getScrollUpButtonHandler() const { return _scrollUpFunctor; } - Button::Callback getScrollDownButtonHandler() const { return _scrollDownFunctor; } - - const char *_voiceTextString; - const char *_textSpeedString; - const char *_onString; - const char *_offString; - const char *_onCDString; -}; - -} // end of namespace Kyra - -#endif - diff --git a/engines/kyra/items_lok.cpp b/engines/kyra/items_lok.cpp new file mode 100644 index 0000000000..c468a6e197 --- /dev/null +++ b/engines/kyra/items_lok.cpp @@ -0,0 +1,944 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "kyra/kyra_lok.h" +#include "kyra/seqplayer.h" +#include "kyra/screen.h" +#include "kyra/resource.h" +#include "kyra/sound.h" +#include "kyra/sprites.h" +#include "kyra/wsamovie.h" +#include "kyra/animator_lok.h" +#include "kyra/text.h" + +#include "common/system.h" +#include "common/savefile.h" + +namespace Kyra { + +int KyraEngine_LoK::findDuplicateItemShape(int shape) { + static uint8 dupTable[] = { + 0x48, 0x46, 0x49, 0x47, 0x4a, 0x46, 0x4b, 0x47, + 0x4c, 0x46, 0x4d, 0x47, 0x5b, 0x5a, 0x5c, 0x5a, + 0x5d, 0x5a, 0x5e, 0x5a, 0xFF, 0xFF + }; + + int i = 0; + + while (dupTable[i] != 0xFF) { + if (dupTable[i] == shape) + return dupTable[i+1]; + i += 2; + } + return -1; +} + +void KyraEngine_LoK::addToNoDropRects(int x, int y, int w, int h) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::addToNoDropRects(%d, %d, %d, %d)", x, y, w, h); + for (int rect = 0; rect < 11; ++rect) { + if (_noDropRects[rect].x == -1) { + _noDropRects[rect].x = x; + _noDropRects[rect].y = y; + _noDropRects[rect].x2 = x + w - 1; + _noDropRects[rect].y2 = y + h - 1; + break; + } + } +} + +void KyraEngine_LoK::clearNoDropRects() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::clearNoDropRects()"); + memset(_noDropRects, -1, sizeof(_noDropRects)); +} + +byte KyraEngine_LoK::findFreeItemInScene(int scene) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::findFreeItemInScene(%d)", scene); + assert(scene < _roomTableSize); + Room *room = &_roomTable[scene]; + for (int i = 0; i < 12; ++i) { + if (room->itemsTable[i] == 0xFF) + return i; + } + return 0xFF; +} + +byte KyraEngine_LoK::findItemAtPos(int x, int y) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::findItemAtPos(%d, %d)", x, y); + assert(_currentCharacter->sceneId < _roomTableSize); + const uint8 *itemsTable = _roomTable[_currentCharacter->sceneId].itemsTable; + const uint16 *xposOffset = _roomTable[_currentCharacter->sceneId].itemsXPos; + const uint8 *yposOffset = _roomTable[_currentCharacter->sceneId].itemsYPos; + + int highestYPos = -1; + byte returnValue = 0xFF; + + for (int i = 0; i < 12; ++i) { + if (*itemsTable != 0xFF) { + int xpos = *xposOffset - 11; + int xpos2 = *xposOffset + 10; + if (x > xpos && x < xpos2) { + assert(*itemsTable < ARRAYSIZE(_itemTable)); + int itemHeight = _itemTable[*itemsTable].height; + int ypos = *yposOffset + 3; + int ypos2 = ypos - itemHeight - 3; + + if (y > ypos2 && ypos > y) { + if (highestYPos <= ypos) { + returnValue = i; + highestYPos = ypos; + } + } + } + } + ++xposOffset; + ++yposOffset; + ++itemsTable; + } + + return returnValue; +} + +void KyraEngine_LoK::placeItemInGenericMapScene(int item, int index) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::placeItemInGenericMapScene(%d, %d)", item, index); + static const uint16 itemMapSceneMinTable[] = { + 0x0000, 0x0011, 0x006D, 0x0025, 0x00C7, 0x0000 + }; + static const uint16 itemMapSceneMaxTable[] = { + 0x0010, 0x0024, 0x00C6, 0x006C, 0x00F5, 0x0000 + }; + + int minValue = itemMapSceneMinTable[index]; + int maxValue = itemMapSceneMaxTable[index]; + + while (true) { + int room = _rnd.getRandomNumberRng(minValue, maxValue); + assert(room < _roomTableSize); + int nameIndex = _roomTable[room].nameIndex; + bool placeItem = false; + + switch (nameIndex) { + case 0: case 1: case 2: case 3: + case 4: case 5: case 6: case 11: + case 12: case 16: case 17: case 20: + case 22: case 23: case 25: case 26: + case 27: case 31: case 33: case 34: + case 36: case 37: case 58: case 59: + case 60: case 61: case 83: case 84: + case 85: case 104: case 105: case 106: + placeItem = true; + break; + + case 51: + if (room != 46) + placeItem = true; + break; + + default: + break; + } + + if (placeItem) { + Room *roomPtr = &_roomTable[room]; + if (roomPtr->northExit == 0xFFFF && roomPtr->eastExit == 0xFFFF && roomPtr->southExit == 0xFFFF && roomPtr->westExit == 0xFFFF) + placeItem = false; + else if (_currentCharacter->sceneId == room) + placeItem = false; + } + + if (placeItem) { + if (!processItemDrop(room, item, -1, -1, 2, 0)) + continue; + break; + } + } +} + +void KyraEngine_LoK::createMouseItem(int item) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::createMouseItem(%d)", item); + _screen->hideMouse(); + setMouseItem(item); + _itemInHand = item; + _screen->showMouse(); +} + +void KyraEngine_LoK::destroyMouseItem() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::destroyMouseItem()"); + _screen->hideMouse(); + _screen->setMouseCursor(1, 1, _shapes[0]); + _itemInHand = -1; + _screen->showMouse(); +} + +void KyraEngine_LoK::setMouseItem(int item) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setMouseItem(%d)", item); + if (item == -1) + _screen->setMouseCursor(1, 1, _shapes[6]); + else + _screen->setMouseCursor(8, 15, _shapes[216+item]); +} + +void KyraEngine_LoK::wipeDownMouseItem(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::wipeDownMouseItem(%d, %d)", xpos, ypos); + if (_itemInHand == -1) + return; + xpos -= 8; + ypos -= 15; + _screen->hideMouse(); + backUpItemRect1(xpos, ypos); + int y = ypos; + int height = 16; + + while (height >= 0) { + restoreItemRect1(xpos, ypos); + _screen->setNewShapeHeight(_shapes[216+_itemInHand], height); + uint32 nextTime = _system->getMillis() + 1 * _tickLength; + _screen->drawShape(0, _shapes[216+_itemInHand], xpos, y, 0, 0); + _screen->updateScreen(); + y += 2; + height -= 2; + delayUntil(nextTime); + } + restoreItemRect1(xpos, ypos); + _screen->resetShapeHeight(_shapes[216+_itemInHand]); + destroyMouseItem(); + _screen->showMouse(); +} + +void KyraEngine_LoK::setupSceneItems() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setupSceneItems()"); + uint16 sceneId = _currentCharacter->sceneId; + assert(sceneId < _roomTableSize); + Room *currentRoom = &_roomTable[sceneId]; + for (int i = 0; i < 12; ++i) { + uint8 item = currentRoom->itemsTable[i]; + if (item == 0xFF || !currentRoom->needInit[i]) + continue; + + int xpos = 0; + int ypos = 0; + + if (currentRoom->itemsXPos[i] == 0xFFFF) { + xpos = currentRoom->itemsXPos[i] = _rnd.getRandomNumberRng(24, 296); + ypos = currentRoom->itemsYPos[i] = _rnd.getRandomNumberRng(_northExitHeight & 0xFF, 130); + } else { + xpos = currentRoom->itemsXPos[i]; + ypos = currentRoom->itemsYPos[i]; + } + + _lastProcessedItem = i; + + int stop = 0; + while (!stop) { + stop = processItemDrop(sceneId, item, xpos, ypos, 3, 0); + if (!stop) { + xpos = currentRoom->itemsXPos[i] = _rnd.getRandomNumberRng(24, 296); + ypos = currentRoom->itemsYPos[i] = _rnd.getRandomNumberRng(_northExitHeight & 0xFF, 130); + if (countItemsInScene(sceneId) >= 12) + break; + } else { + currentRoom->needInit[i] = 0; + } + } + } +} + +int KyraEngine_LoK::countItemsInScene(uint16 sceneId) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::countItemsInScene(%d)", sceneId); + assert(sceneId < _roomTableSize); + Room *currentRoom = &_roomTable[sceneId]; + + int items = 0; + + for (int i = 0; i < 12; ++i) { + if (currentRoom->itemsTable[i] != 0xFF) + ++items; + } + + return items; +} + +int KyraEngine_LoK::processItemDrop(uint16 sceneId, uint8 item, int x, int y, int unk1, int unk2) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::processItemDrop(%d, %d, %d, %d, %d, %d)", sceneId, item, x, y, unk1, unk2); + int freeItem = -1; + uint8 itemIndex = findItemAtPos(x, y); + if (unk1) + itemIndex = 0xFF; + + if (itemIndex != 0xFF) { + exchangeItemWithMouseItem(sceneId, itemIndex); + return 0; + } + + assert(sceneId < _roomTableSize); + Room *currentRoom = &_roomTable[sceneId]; + + if (unk1 != 3) { + for (int i = 0; i < 12; ++i) { + if (currentRoom->itemsTable[i] == 0xFF) { + freeItem = i; + break; + } + } + } else { + freeItem = _lastProcessedItem; + } + + if (freeItem == -1) + return 0; + + if (sceneId != _currentCharacter->sceneId) { + addItemToRoom(sceneId, item, freeItem, x, y); + return 1; + } + + int itemHeight = _itemTable[item].height; + _lastProcessedItemHeight = itemHeight; + + if (x == -1 && x == -1) { + x = _rnd.getRandomNumberRng(16, 304); + y = _rnd.getRandomNumberRng(_northExitHeight & 0xFF, 135); + } + + int xpos = x; + int ypos = y; + int destY = -1; + int destX = -1; + int running = 1; + + while (running) { + if ((_northExitHeight & 0xFF) <= ypos) { + bool running2 = true; + + if (_screen->getDrawLayer(xpos, ypos) > 1) { + if (((_northExitHeight >> 8) & 0xFF) != ypos) + running2 = false; + } + + if (_screen->getDrawLayer2(xpos, ypos, itemHeight) > 1) { + if (((_northExitHeight >> 8) & 0xFF) != ypos) + running2 = false; + } + + if (!isDropable(xpos, ypos)) { + if (((_northExitHeight >> 8) & 0xFF) != ypos) + running2 = false; + } + + int xpos2 = xpos; + int xpos3 = xpos; + + while (running2) { + if (isDropable(xpos2, ypos)) { + if (_screen->getDrawLayer2(xpos2, ypos, itemHeight) < 7) { + if (findItemAtPos(xpos2, ypos) == 0xFF) { + destX = xpos2; + destY = ypos; + running = 0; + running2 = false; + } + } + } + + if (isDropable(xpos3, ypos)) { + if (_screen->getDrawLayer2(xpos3, ypos, itemHeight) < 7) { + if (findItemAtPos(xpos3, ypos) == 0xFF) { + destX = xpos3; + destY = ypos; + running = 0; + running2 = false; + } + } + } + + if (!running2) + continue; + + xpos2 -= 2; + if (xpos2 < 16) + xpos2 = 16; + + xpos3 += 2; + if (xpos3 > 304) + xpos3 = 304; + + if (xpos2 > 16) + continue; + if (xpos3 < 304) + continue; + running2 = false; + } + } + + if (((_northExitHeight >> 8) & 0xFF) == ypos) { + running = 0; + destY -= _rnd.getRandomNumberRng(0, 3); + + if ((_northExitHeight & 0xFF) < destY) + continue; + + destY = (_northExitHeight & 0xFF) + 1; + continue; + } + ypos += 2; + if (((_northExitHeight >> 8) & 0xFF) >= ypos) + continue; + ypos = (_northExitHeight >> 8) & 0xFF; + } + + if (destX == -1 || destY == -1) + return 0; + + if (unk1 == 3) { + currentRoom->itemsXPos[freeItem] = destX; + currentRoom->itemsYPos[freeItem] = destY; + return 1; + } + + if (unk1 == 2) + itemSpecialFX(x, y, item); + + if (unk1 == 0) + destroyMouseItem(); + + itemDropDown(x, y, destX, destY, freeItem, item); + + if (unk1 == 0 && unk2 != 0) { + assert(_itemList && _droppedList); + updateSentenceCommand(_itemList[item], _droppedList[0], 179); + } + + return 1; +} + +void KyraEngine_LoK::exchangeItemWithMouseItem(uint16 sceneId, int itemIndex) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::exchangeItemWithMouseItem(%d, %d)", sceneId, itemIndex); + _screen->hideMouse(); + _animator->animRemoveGameItem(itemIndex); + assert(sceneId < _roomTableSize); + Room *currentRoom = &_roomTable[sceneId]; + + int item = currentRoom->itemsTable[itemIndex]; + currentRoom->itemsTable[itemIndex] = _itemInHand; + _itemInHand = item; + _animator->animAddGameItem(itemIndex, sceneId); + snd_playSoundEffect(53); + + setMouseItem(_itemInHand); + assert(_itemList && _takenList); + updateSentenceCommand(_itemList[_itemInHand], _takenList[1], 179); + _screen->showMouse(); + clickEventHandler2(); +} + +void KyraEngine_LoK::addItemToRoom(uint16 sceneId, uint8 item, int itemIndex, int x, int y) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::addItemToRoom(%d, %d, %d, %d, %d)", sceneId, item, itemIndex, x, y); + assert(sceneId < _roomTableSize); + Room *currentRoom = &_roomTable[sceneId]; + currentRoom->itemsTable[itemIndex] = item; + currentRoom->itemsXPos[itemIndex] = x; + currentRoom->itemsYPos[itemIndex] = y; + currentRoom->needInit[itemIndex] = 1; +} + +int KyraEngine_LoK::checkNoDropRects(int x, int y) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::checkNoDropRects(%d, %d)", x, y); + if (_lastProcessedItemHeight < 1 || _lastProcessedItemHeight > 16) + _lastProcessedItemHeight = 16; + if (_noDropRects[0].x == -1) + return 0; + + for (int i = 0; i < 11; ++i) { + if (_noDropRects[i].x == -1) + break; + + int xpos = _noDropRects[i].x; + int ypos = _noDropRects[i].y; + int xpos2 = _noDropRects[i].x2; + int ypos2 = _noDropRects[i].y2; + + if (xpos > x + 16) + continue; + if (xpos2 < x) + continue; + if (y < ypos) + continue; + if (ypos2 < y - _lastProcessedItemHeight) + continue; + return 1; + } + + return 0; +} + +int KyraEngine_LoK::isDropable(int x, int y) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::isDropable(%d, %d)", x, y); + x -= 8; + y -= 1; + + if (checkNoDropRects(x, y)) + return 0; + + for (int xpos = x; xpos < x + 16; ++xpos) { + if (_screen->getShapeFlag1(xpos, y) == 0) + return 0; + } + return 1; +} + +void KyraEngine_LoK::itemDropDown(int x, int y, int destX, int destY, byte freeItem, int item) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::itemDropDown(%d, %d, %d, %d, %d, %d)", x, y, destX, destY, freeItem, item); + assert(_currentCharacter->sceneId < _roomTableSize); + Room *currentRoom = &_roomTable[_currentCharacter->sceneId]; + if (x == destX && y == destY) { + currentRoom->itemsXPos[freeItem] = destX; + currentRoom->itemsYPos[freeItem] = destY; + currentRoom->itemsTable[freeItem] = item; + snd_playSoundEffect(0x32); + _animator->animAddGameItem(freeItem, _currentCharacter->sceneId); + return; + } + _screen->hideMouse(); + if (y <= destY) { + int tempY = y; + int addY = 2; + int drawX = x - 8; + int drawY = 0; + + backUpItemRect0(drawX, y - 16); + + while (tempY < destY) { + restoreItemRect0(drawX, tempY - 16); + tempY += addY; + if (tempY > destY) + tempY = destY; + ++addY; + drawY = tempY - 16; + backUpItemRect0(drawX, drawY); + uint32 nextTime = _system->getMillis() + 1 * _tickLength; + _screen->drawShape(0, _shapes[216+item], drawX, drawY, 0, 0); + _screen->updateScreen(); + delayUntil(nextTime); + } + + bool skip = false; + if (x == destX) { + if (destY - y <= 16) + skip = true; + } + + if (!skip) { + snd_playSoundEffect(0x47); + if (addY < 6) + addY = 6; + + int xDiff = (destX - x) << 4; + xDiff /= addY; + int startAddY = addY; + addY >>= 1; + if (destY - y <= 8) + addY >>= 1; + addY = -addY; + int unkX = x << 4; + while (--startAddY) { + drawX = (unkX >> 4) - 8; + drawY = tempY - 16; + restoreItemRect0(drawX, drawY); + tempY += addY; + unkX += xDiff; + if (tempY > destY) + tempY = destY; + ++addY; + drawX = (unkX >> 4) - 8; + drawY = tempY - 16; + backUpItemRect0(drawX, drawY); + uint32 nextTime = _system->getMillis() + 1 * _tickLength; + _screen->drawShape(0, _shapes[216+item], drawX, drawY, 0, 0); + _screen->updateScreen(); + delayUntil(nextTime); + } + restoreItemRect0(drawX, drawY); + } else { + restoreItemRect0(drawX, tempY - 16); + } + } + currentRoom->itemsXPos[freeItem] = destX; + currentRoom->itemsYPos[freeItem] = destY; + currentRoom->itemsTable[freeItem] = item; + snd_playSoundEffect(0x32); + _animator->animAddGameItem(freeItem, _currentCharacter->sceneId); + _screen->showMouse(); +} + +void KyraEngine_LoK::dropItem(int unk1, int item, int x, int y, int unk2) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::dropItem(%d, %d, %d, %d, %d)", unk1, item, x, y, unk2); + if (processItemDrop(_currentCharacter->sceneId, item, x, y, unk1, unk2)) + return; + snd_playSoundEffect(54); + assert(_noDropList); + if (12 == countItemsInScene(_currentCharacter->sceneId)) + drawSentenceCommand(_noDropList[0], 6); + else + drawSentenceCommand(_noDropList[1], 6); +} + +void KyraEngine_LoK::itemSpecialFX(int x, int y, int item) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::itemSpecialFX(%d, %d, %d)", x, y, item); + if (item == 41) + itemSpecialFX1(x, y, item); + else + itemSpecialFX2(x, y, item); +} + +void KyraEngine_LoK::itemSpecialFX1(int x, int y, int item) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::itemSpecialFX1(%d, %d, %d)", x, y, item); + uint8 *shape = _shapes[216+item]; + x -= 8; + int startY = y; + y -= 15; + _screen->hideMouse(); + backUpItemRect0(x, y); + for (int i = 1; i <= 16; ++i) { + _screen->setNewShapeHeight(shape, i); + --startY; + restoreItemRect0(x, y); + uint32 nextTime = _system->getMillis() + 1 * _tickLength; + _screen->drawShape(0, shape, x, startY, 0, 0); + _screen->updateScreen(); + delayUntil(nextTime); + } + restoreItemRect0(x, y); + _screen->showMouse(); +} + +void KyraEngine_LoK::itemSpecialFX2(int x, int y, int item) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::itemSpecialFX2(%d, %d, %d)", x, y, item); + x -= 8; + y -= 15; + int yAdd = (int8)(((16 - _itemTable[item].height) >> 1) & 0xFF); + backUpItemRect0(x, y); + if (item >= 80 && item <= 89) + snd_playSoundEffect(55); + + for (int i = 201; i <= 205; ++i) { + restoreItemRect0(x, y); + uint32 nextTime = _system->getMillis() + 3 * _tickLength; + _screen->drawShape(0, _shapes[i], x, y + yAdd, 0, 0); + _screen->updateScreen(); + delayUntil(nextTime); + } + + for (int i = 204; i >= 201; --i) { + restoreItemRect0(x, y); + uint32 nextTime = _system->getMillis() + 3 * _tickLength; + _screen->drawShape(0, _shapes[216+item], x, y, 0, 0); + _screen->drawShape(0, _shapes[i], x, y + yAdd, 0, 0); + _screen->updateScreen(); + delayUntil(nextTime); + } + restoreItemRect0(x, y); +} + +void KyraEngine_LoK::magicOutMouseItem(int animIndex, int itemPos) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::magicOutMouseItem(%d, %d)", animIndex, itemPos); + int videoPageBackUp = _screen->_curPage; + _screen->_curPage = 0; + int x = 0, y = 0; + if (itemPos == -1) { + Common::Point mouse = getMousePos(); + x = mouse.x - 12; + y = mouse.y - 18; + } else { + x = _itemPosX[itemPos] - 4; + y = _itemPosY[itemPos] - 3; + } + + if (_itemInHand == -1 && itemPos == -1) + return; + + int tableIndex = 0, loopStart = 0, maxLoops = 0; + if (animIndex == 0) { + tableIndex = _rnd.getRandomNumberRng(0, 5); + loopStart = 35; + maxLoops = 9; + } else if (animIndex == 1) { + tableIndex = _rnd.getRandomNumberRng(0, 11); + loopStart = 115; + maxLoops = 8; + } else if (animIndex == 2) { + tableIndex = 0; + loopStart = 124; + maxLoops = 4; + } else { + tableIndex = -1; + } + + if (animIndex == 2) + snd_playSoundEffect(0x5E); + else + snd_playSoundEffect(0x37); + _screen->hideMouse(); + backUpItemRect1(x, y); + + for (int shape = _magicMouseItemStartFrame[animIndex]; shape <= _magicMouseItemEndFrame[animIndex]; ++shape) { + restoreItemRect1(x, y); + uint32 nextTime = _system->getMillis() + 4 * _tickLength; + _screen->drawShape(0, _shapes[216+_itemInHand], x + 4, y + 3, 0, 0); + if (tableIndex == -1) + _screen->drawShape(0, _shapes[shape], x, y, 0, 0); + else + specialMouseItemFX(shape, x, y, animIndex, tableIndex, loopStart, maxLoops); + _screen->updateScreen(); + delayUntil(nextTime); + } + + if (itemPos != -1) { + restoreItemRect1(x, y); + _screen->fillRect(_itemPosX[itemPos], _itemPosY[itemPos], _itemPosX[itemPos] + 15, _itemPosY[itemPos] + 15, 12, 0); + backUpItemRect1(x, y); + } + + for (int shape = _magicMouseItemStartFrame2[animIndex]; shape <= _magicMouseItemEndFrame2[animIndex]; ++shape) { + restoreItemRect1(x, y); + uint32 nextTime = _system->getMillis() + 4 * _tickLength; + _screen->drawShape(0, _shapes[216+_itemInHand], x + 4, y + 3, 0, 0); + if (tableIndex == -1) + _screen->drawShape(0, _shapes[shape], x, y, 0, 0); + else + specialMouseItemFX(shape, x, y, animIndex, tableIndex, loopStart, maxLoops); + _screen->updateScreen(); + delayUntil(nextTime); + } + restoreItemRect1(x, y); + if (itemPos == -1) { + _screen->setMouseCursor(1, 1, _shapes[0]); + _itemInHand = -1; + } else { + _characterList[0].inventoryItems[itemPos] = 0xFF; + _screen->hideMouse(); + _screen->fillRect(_itemPosX[itemPos], _itemPosY[itemPos], _itemPosX[itemPos] + 15, _itemPosY[itemPos] + 15, 12, 0); + _screen->showMouse(); + } + _screen->showMouse(); + _screen->_curPage = videoPageBackUp; +} + +void KyraEngine_LoK::magicInMouseItem(int animIndex, int item, int itemPos) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::magicInMouseItem(%d, %d, %d)", animIndex, item, itemPos); + int videoPageBackUp = _screen->_curPage; + _screen->_curPage = 0; + int x = 0, y = 0; + if (itemPos == -1) { + Common::Point mouse = getMousePos(); + x = mouse.x - 12; + y = mouse.y - 18; + } else { + x = _itemPosX[itemPos] - 4; + y = _itemPosX[itemPos] - 3; + } + if (item < 0) + return; + + int tableIndex = -1, loopStart = 0, maxLoops = 0; + if (animIndex == 0) { + tableIndex = _rnd.getRandomNumberRng(0, 5); + loopStart = 35; + maxLoops = 9; + } else if (animIndex == 1) { + tableIndex = _rnd.getRandomNumberRng(0, 11); + loopStart = 115; + maxLoops = 8; + } else if (animIndex == 2) { + tableIndex = 0; + loopStart = 124; + maxLoops = 4; + } + + _screen->hideMouse(); + backUpItemRect1(x, y); + if (animIndex == 2) + snd_playSoundEffect(0x5E); + else + snd_playSoundEffect(0x37); + + for (int shape = _magicMouseItemStartFrame[animIndex]; shape <= _magicMouseItemEndFrame[animIndex]; ++shape) { + restoreItemRect1(x, y); + uint32 nextTime = _system->getMillis() + 4 * _tickLength; + if (tableIndex == -1) + _screen->drawShape(0, _shapes[shape], x, y, 0, 0); + else + specialMouseItemFX(shape, x, y, animIndex, tableIndex, loopStart, maxLoops); + _screen->updateScreen(); + delayUntil(nextTime); + } + + for (int shape = _magicMouseItemStartFrame2[animIndex]; shape <= _magicMouseItemEndFrame2[animIndex]; ++shape) { + restoreItemRect1(x, y); + uint32 nextTime = _system->getMillis() + 4 * _tickLength; + if (tableIndex == -1) + _screen->drawShape(0, _shapes[shape], x, y, 0, 0); + else + specialMouseItemFX(shape, x, y, animIndex, tableIndex, loopStart, maxLoops); + _screen->updateScreen(); + delayUntil(nextTime); + } + restoreItemRect1(x, y); + if (itemPos == -1) { + _screen->setMouseCursor(8, 15, _shapes[216+item]); + _itemInHand = item; + } else { + _characterList[0].inventoryItems[itemPos] = item; + _screen->hideMouse(); + _screen->drawShape(0, _shapes[216+item], _itemPosX[itemPos], _itemPosY[itemPos], 0, 0); + _screen->showMouse(); + } + _screen->showMouse(); + _screen->_curPage = videoPageBackUp; +} + +void KyraEngine_LoK::specialMouseItemFX(int shape, int x, int y, int animIndex, int tableIndex, int loopStart, int maxLoops) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::specialMouseItemFX(%d, %d, %d, %d, %d, %d, %d)", shape, x, y, animIndex, tableIndex, loopStart, maxLoops); + static const uint8 table1[] = { + 0x23, 0x45, 0x55, 0x72, 0x84, 0xCF, 0x00, 0x00 + }; + static const uint8 table2[] = { + 0x73, 0xB5, 0x80, 0x21, 0x13, 0x39, 0x45, 0x55, 0x62, 0xB4, 0xCF, 0xD8 + }; + static const uint8 table3[] = { + 0x7C, 0xD0, 0x74, 0x84, 0x87, 0x00, 0x00, 0x00 + }; + int tableValue = 0; + if (animIndex == 0) + tableValue = table1[tableIndex]; + else if (animIndex == 1) + tableValue = table2[tableIndex]; + else if (animIndex == 2) + tableValue = table3[tableIndex]; + else + return; + processSpecialMouseItemFX(shape, x, y, tableValue, loopStart, maxLoops); +} + +void KyraEngine_LoK::processSpecialMouseItemFX(int shape, int x, int y, int tableValue, int loopStart, int maxLoops) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::processSpecialMouseItemFX(%d, %d, %d, %d, %d, %d)", shape, x, y, tableValue, loopStart, maxLoops); + uint8 shapeColorTable[16]; + uint8 *shapePtr = _shapes[shape] + 10; + if (_flags.useAltShapeHeader) + shapePtr += 2; + + for (int i = 0; i < 16; ++i) + shapeColorTable[i] = shapePtr[i]; + + for (int i = loopStart; i < loopStart + maxLoops; ++i) { + for (int i2 = 0; i2 < 16; ++i2) { + if (shapePtr[i2] == i) + shapeColorTable[i2] = (i + tableValue) - loopStart; + } + } + _screen->drawShape(0, _shapes[shape], x, y, 0, 0x8000, shapeColorTable); +} + +void KyraEngine_LoK::updatePlayerItemsForScene() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::updatePlayerItemsForScene()"); + if (_itemInHand >= 29 && _itemInHand < 33) { + ++_itemInHand; + if (_itemInHand > 33) + _itemInHand = 33; + _screen->hideMouse(); + _screen->setMouseCursor(8, 15, _shapes[216+_itemInHand]); + _screen->showMouse(); + } + + bool redraw = false; + for (int i = 0; i < 10; ++i) { + uint8 item = _currentCharacter->inventoryItems[i]; + if (item >= 29 && item < 33) { + ++item; + if (item > 33) + item = 33; + _currentCharacter->inventoryItems[i] = item; + redraw = true; + } + } + + if (redraw) { + _screen->hideMouse(); + redrawInventory(0); + _screen->showMouse(); + } + + if (_itemInHand == 33) + magicOutMouseItem(2, -1); + + _screen->hideMouse(); + for (int i = 0; i < 10; ++i) { + uint8 item = _currentCharacter->inventoryItems[i]; + if (item == 33) + magicOutMouseItem(2, i); + } + _screen->showMouse(); +} + +void KyraEngine_LoK::redrawInventory(int page) { + int videoPageBackUp = _screen->_curPage; + _screen->_curPage = page; + _screen->hideMouse(); + for (int i = 0; i < 10; ++i) { + _screen->fillRect(_itemPosX[i], _itemPosY[i], _itemPosX[i] + 15, _itemPosY[i] + 15, 12, page); + if (_currentCharacter->inventoryItems[i] != 0xFF) { + uint8 item = _currentCharacter->inventoryItems[i]; + _screen->drawShape(page, _shapes[216+item], _itemPosX[i], _itemPosY[i], 0, 0); + } + } + _screen->showMouse(); + _screen->_curPage = videoPageBackUp; + _screen->updateScreen(); +} + +void KyraEngine_LoK::backUpItemRect0(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::backUpItemRect0(%d, %d)", xpos, ypos); + _screen->rectClip(xpos, ypos, 3<<3, 24); + _screen->copyRegionToBuffer(_screen->_curPage, xpos, ypos, 3<<3, 24, _itemBkgBackUp[0]); +} + +void KyraEngine_LoK::restoreItemRect0(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::restoreItemRect0(%d, %d)", xpos, ypos); + _screen->rectClip(xpos, ypos, 3<<3, 24); + _screen->copyBlockToPage(_screen->_curPage, xpos, ypos, 3<<3, 24, _itemBkgBackUp[0]); +} + +void KyraEngine_LoK::backUpItemRect1(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::backUpItemRect1(%d, %d)", xpos, ypos); + _screen->rectClip(xpos, ypos, 4<<3, 32); + _screen->copyRegionToBuffer(_screen->_curPage, xpos, ypos, 4<<3, 32, _itemBkgBackUp[1]); +} + +void KyraEngine_LoK::restoreItemRect1(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::restoreItemRect1(%d, %d)", xpos, ypos); + _screen->rectClip(xpos, ypos, 4<<3, 32); + _screen->copyBlockToPage(_screen->_curPage, xpos, ypos, 4<<3, 32, _itemBkgBackUp[1]); +} + +} // end of namespace Kyra + diff --git a/engines/kyra/items_v1.cpp b/engines/kyra/items_v1.cpp deleted file mode 100644 index ae3ba2821a..0000000000 --- a/engines/kyra/items_v1.cpp +++ /dev/null @@ -1,944 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "kyra/kyra_v1.h" -#include "kyra/seqplayer.h" -#include "kyra/screen.h" -#include "kyra/resource.h" -#include "kyra/sound.h" -#include "kyra/sprites.h" -#include "kyra/wsamovie.h" -#include "kyra/animator_v1.h" -#include "kyra/text.h" - -#include "common/system.h" -#include "common/savefile.h" - -namespace Kyra { - -int KyraEngine_v1::findDuplicateItemShape(int shape) { - static uint8 dupTable[] = { - 0x48, 0x46, 0x49, 0x47, 0x4a, 0x46, 0x4b, 0x47, - 0x4c, 0x46, 0x4d, 0x47, 0x5b, 0x5a, 0x5c, 0x5a, - 0x5d, 0x5a, 0x5e, 0x5a, 0xFF, 0xFF - }; - - int i = 0; - - while (dupTable[i] != 0xFF) { - if (dupTable[i] == shape) - return dupTable[i+1]; - i += 2; - } - return -1; -} - -void KyraEngine_v1::addToNoDropRects(int x, int y, int w, int h) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::addToNoDropRects(%d, %d, %d, %d)", x, y, w, h); - for (int rect = 0; rect < 11; ++rect) { - if (_noDropRects[rect].x == -1) { - _noDropRects[rect].x = x; - _noDropRects[rect].y = y; - _noDropRects[rect].x2 = x + w - 1; - _noDropRects[rect].y2 = y + h - 1; - break; - } - } -} - -void KyraEngine_v1::clearNoDropRects() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::clearNoDropRects()"); - memset(_noDropRects, -1, sizeof(_noDropRects)); -} - -byte KyraEngine_v1::findFreeItemInScene(int scene) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::findFreeItemInScene(%d)", scene); - assert(scene < _roomTableSize); - Room *room = &_roomTable[scene]; - for (int i = 0; i < 12; ++i) { - if (room->itemsTable[i] == 0xFF) - return i; - } - return 0xFF; -} - -byte KyraEngine_v1::findItemAtPos(int x, int y) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::findItemAtPos(%d, %d)", x, y); - assert(_currentCharacter->sceneId < _roomTableSize); - const uint8 *itemsTable = _roomTable[_currentCharacter->sceneId].itemsTable; - const uint16 *xposOffset = _roomTable[_currentCharacter->sceneId].itemsXPos; - const uint8 *yposOffset = _roomTable[_currentCharacter->sceneId].itemsYPos; - - int highestYPos = -1; - byte returnValue = 0xFF; - - for (int i = 0; i < 12; ++i) { - if (*itemsTable != 0xFF) { - int xpos = *xposOffset - 11; - int xpos2 = *xposOffset + 10; - if (x > xpos && x < xpos2) { - assert(*itemsTable < ARRAYSIZE(_itemTable)); - int itemHeight = _itemTable[*itemsTable].height; - int ypos = *yposOffset + 3; - int ypos2 = ypos - itemHeight - 3; - - if (y > ypos2 && ypos > y) { - if (highestYPos <= ypos) { - returnValue = i; - highestYPos = ypos; - } - } - } - } - ++xposOffset; - ++yposOffset; - ++itemsTable; - } - - return returnValue; -} - -void KyraEngine_v1::placeItemInGenericMapScene(int item, int index) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::placeItemInGenericMapScene(%d, %d)", item, index); - static const uint16 itemMapSceneMinTable[] = { - 0x0000, 0x0011, 0x006D, 0x0025, 0x00C7, 0x0000 - }; - static const uint16 itemMapSceneMaxTable[] = { - 0x0010, 0x0024, 0x00C6, 0x006C, 0x00F5, 0x0000 - }; - - int minValue = itemMapSceneMinTable[index]; - int maxValue = itemMapSceneMaxTable[index]; - - while (true) { - int room = _rnd.getRandomNumberRng(minValue, maxValue); - assert(room < _roomTableSize); - int nameIndex = _roomTable[room].nameIndex; - bool placeItem = false; - - switch (nameIndex) { - case 0: case 1: case 2: case 3: - case 4: case 5: case 6: case 11: - case 12: case 16: case 17: case 20: - case 22: case 23: case 25: case 26: - case 27: case 31: case 33: case 34: - case 36: case 37: case 58: case 59: - case 60: case 61: case 83: case 84: - case 85: case 104: case 105: case 106: - placeItem = true; - break; - - case 51: - if (room != 46) - placeItem = true; - break; - - default: - break; - } - - if (placeItem) { - Room *roomPtr = &_roomTable[room]; - if (roomPtr->northExit == 0xFFFF && roomPtr->eastExit == 0xFFFF && roomPtr->southExit == 0xFFFF && roomPtr->westExit == 0xFFFF) - placeItem = false; - else if (_currentCharacter->sceneId == room) - placeItem = false; - } - - if (placeItem) { - if (!processItemDrop(room, item, -1, -1, 2, 0)) - continue; - break; - } - } -} - -void KyraEngine_v1::createMouseItem(int item) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::createMouseItem(%d)", item); - _screen->hideMouse(); - setMouseItem(item); - _itemInHand = item; - _screen->showMouse(); -} - -void KyraEngine_v1::destroyMouseItem() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::destroyMouseItem()"); - _screen->hideMouse(); - _screen->setMouseCursor(1, 1, _shapes[0]); - _itemInHand = -1; - _screen->showMouse(); -} - -void KyraEngine_v1::setMouseItem(int item) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::setMouseItem(%d)", item); - if (item == -1) - _screen->setMouseCursor(1, 1, _shapes[6]); - else - _screen->setMouseCursor(8, 15, _shapes[216+item]); -} - -void KyraEngine_v1::wipeDownMouseItem(int xpos, int ypos) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::wipeDownMouseItem(%d, %d)", xpos, ypos); - if (_itemInHand == -1) - return; - xpos -= 8; - ypos -= 15; - _screen->hideMouse(); - backUpItemRect1(xpos, ypos); - int y = ypos; - int height = 16; - - while (height >= 0) { - restoreItemRect1(xpos, ypos); - _screen->setNewShapeHeight(_shapes[216+_itemInHand], height); - uint32 nextTime = _system->getMillis() + 1 * _tickLength; - _screen->drawShape(0, _shapes[216+_itemInHand], xpos, y, 0, 0); - _screen->updateScreen(); - y += 2; - height -= 2; - delayUntil(nextTime); - } - restoreItemRect1(xpos, ypos); - _screen->resetShapeHeight(_shapes[216+_itemInHand]); - destroyMouseItem(); - _screen->showMouse(); -} - -void KyraEngine_v1::setupSceneItems() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::setupSceneItems()"); - uint16 sceneId = _currentCharacter->sceneId; - assert(sceneId < _roomTableSize); - Room *currentRoom = &_roomTable[sceneId]; - for (int i = 0; i < 12; ++i) { - uint8 item = currentRoom->itemsTable[i]; - if (item == 0xFF || !currentRoom->needInit[i]) - continue; - - int xpos = 0; - int ypos = 0; - - if (currentRoom->itemsXPos[i] == 0xFFFF) { - xpos = currentRoom->itemsXPos[i] = _rnd.getRandomNumberRng(24, 296); - ypos = currentRoom->itemsYPos[i] = _rnd.getRandomNumberRng(_northExitHeight & 0xFF, 130); - } else { - xpos = currentRoom->itemsXPos[i]; - ypos = currentRoom->itemsYPos[i]; - } - - _lastProcessedItem = i; - - int stop = 0; - while (!stop) { - stop = processItemDrop(sceneId, item, xpos, ypos, 3, 0); - if (!stop) { - xpos = currentRoom->itemsXPos[i] = _rnd.getRandomNumberRng(24, 296); - ypos = currentRoom->itemsYPos[i] = _rnd.getRandomNumberRng(_northExitHeight & 0xFF, 130); - if (countItemsInScene(sceneId) >= 12) - break; - } else { - currentRoom->needInit[i] = 0; - } - } - } -} - -int KyraEngine_v1::countItemsInScene(uint16 sceneId) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::countItemsInScene(%d)", sceneId); - assert(sceneId < _roomTableSize); - Room *currentRoom = &_roomTable[sceneId]; - - int items = 0; - - for (int i = 0; i < 12; ++i) { - if (currentRoom->itemsTable[i] != 0xFF) - ++items; - } - - return items; -} - -int KyraEngine_v1::processItemDrop(uint16 sceneId, uint8 item, int x, int y, int unk1, int unk2) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::processItemDrop(%d, %d, %d, %d, %d, %d)", sceneId, item, x, y, unk1, unk2); - int freeItem = -1; - uint8 itemIndex = findItemAtPos(x, y); - if (unk1) - itemIndex = 0xFF; - - if (itemIndex != 0xFF) { - exchangeItemWithMouseItem(sceneId, itemIndex); - return 0; - } - - assert(sceneId < _roomTableSize); - Room *currentRoom = &_roomTable[sceneId]; - - if (unk1 != 3) { - for (int i = 0; i < 12; ++i) { - if (currentRoom->itemsTable[i] == 0xFF) { - freeItem = i; - break; - } - } - } else { - freeItem = _lastProcessedItem; - } - - if (freeItem == -1) - return 0; - - if (sceneId != _currentCharacter->sceneId) { - addItemToRoom(sceneId, item, freeItem, x, y); - return 1; - } - - int itemHeight = _itemTable[item].height; - _lastProcessedItemHeight = itemHeight; - - if (x == -1 && x == -1) { - x = _rnd.getRandomNumberRng(16, 304); - y = _rnd.getRandomNumberRng(_northExitHeight & 0xFF, 135); - } - - int xpos = x; - int ypos = y; - int destY = -1; - int destX = -1; - int running = 1; - - while (running) { - if ((_northExitHeight & 0xFF) <= ypos) { - bool running2 = true; - - if (_screen->getDrawLayer(xpos, ypos) > 1) { - if (((_northExitHeight >> 8) & 0xFF) != ypos) - running2 = false; - } - - if (_screen->getDrawLayer2(xpos, ypos, itemHeight) > 1) { - if (((_northExitHeight >> 8) & 0xFF) != ypos) - running2 = false; - } - - if (!isDropable(xpos, ypos)) { - if (((_northExitHeight >> 8) & 0xFF) != ypos) - running2 = false; - } - - int xpos2 = xpos; - int xpos3 = xpos; - - while (running2) { - if (isDropable(xpos2, ypos)) { - if (_screen->getDrawLayer2(xpos2, ypos, itemHeight) < 7) { - if (findItemAtPos(xpos2, ypos) == 0xFF) { - destX = xpos2; - destY = ypos; - running = 0; - running2 = false; - } - } - } - - if (isDropable(xpos3, ypos)) { - if (_screen->getDrawLayer2(xpos3, ypos, itemHeight) < 7) { - if (findItemAtPos(xpos3, ypos) == 0xFF) { - destX = xpos3; - destY = ypos; - running = 0; - running2 = false; - } - } - } - - if (!running2) - continue; - - xpos2 -= 2; - if (xpos2 < 16) - xpos2 = 16; - - xpos3 += 2; - if (xpos3 > 304) - xpos3 = 304; - - if (xpos2 > 16) - continue; - if (xpos3 < 304) - continue; - running2 = false; - } - } - - if (((_northExitHeight >> 8) & 0xFF) == ypos) { - running = 0; - destY -= _rnd.getRandomNumberRng(0, 3); - - if ((_northExitHeight & 0xFF) < destY) - continue; - - destY = (_northExitHeight & 0xFF) + 1; - continue; - } - ypos += 2; - if (((_northExitHeight >> 8) & 0xFF) >= ypos) - continue; - ypos = (_northExitHeight >> 8) & 0xFF; - } - - if (destX == -1 || destY == -1) - return 0; - - if (unk1 == 3) { - currentRoom->itemsXPos[freeItem] = destX; - currentRoom->itemsYPos[freeItem] = destY; - return 1; - } - - if (unk1 == 2) - itemSpecialFX(x, y, item); - - if (unk1 == 0) - destroyMouseItem(); - - itemDropDown(x, y, destX, destY, freeItem, item); - - if (unk1 == 0 && unk2 != 0) { - assert(_itemList && _droppedList); - updateSentenceCommand(_itemList[item], _droppedList[0], 179); - } - - return 1; -} - -void KyraEngine_v1::exchangeItemWithMouseItem(uint16 sceneId, int itemIndex) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::exchangeItemWithMouseItem(%d, %d)", sceneId, itemIndex); - _screen->hideMouse(); - _animator->animRemoveGameItem(itemIndex); - assert(sceneId < _roomTableSize); - Room *currentRoom = &_roomTable[sceneId]; - - int item = currentRoom->itemsTable[itemIndex]; - currentRoom->itemsTable[itemIndex] = _itemInHand; - _itemInHand = item; - _animator->animAddGameItem(itemIndex, sceneId); - snd_playSoundEffect(53); - - setMouseItem(_itemInHand); - assert(_itemList && _takenList); - updateSentenceCommand(_itemList[_itemInHand], _takenList[1], 179); - _screen->showMouse(); - clickEventHandler2(); -} - -void KyraEngine_v1::addItemToRoom(uint16 sceneId, uint8 item, int itemIndex, int x, int y) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::addItemToRoom(%d, %d, %d, %d, %d)", sceneId, item, itemIndex, x, y); - assert(sceneId < _roomTableSize); - Room *currentRoom = &_roomTable[sceneId]; - currentRoom->itemsTable[itemIndex] = item; - currentRoom->itemsXPos[itemIndex] = x; - currentRoom->itemsYPos[itemIndex] = y; - currentRoom->needInit[itemIndex] = 1; -} - -int KyraEngine_v1::checkNoDropRects(int x, int y) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::checkNoDropRects(%d, %d)", x, y); - if (_lastProcessedItemHeight < 1 || _lastProcessedItemHeight > 16) - _lastProcessedItemHeight = 16; - if (_noDropRects[0].x == -1) - return 0; - - for (int i = 0; i < 11; ++i) { - if (_noDropRects[i].x == -1) - break; - - int xpos = _noDropRects[i].x; - int ypos = _noDropRects[i].y; - int xpos2 = _noDropRects[i].x2; - int ypos2 = _noDropRects[i].y2; - - if (xpos > x + 16) - continue; - if (xpos2 < x) - continue; - if (y < ypos) - continue; - if (ypos2 < y - _lastProcessedItemHeight) - continue; - return 1; - } - - return 0; -} - -int KyraEngine_v1::isDropable(int x, int y) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::isDropable(%d, %d)", x, y); - x -= 8; - y -= 1; - - if (checkNoDropRects(x, y)) - return 0; - - for (int xpos = x; xpos < x + 16; ++xpos) { - if (_screen->getShapeFlag1(xpos, y) == 0) - return 0; - } - return 1; -} - -void KyraEngine_v1::itemDropDown(int x, int y, int destX, int destY, byte freeItem, int item) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::itemDropDown(%d, %d, %d, %d, %d, %d)", x, y, destX, destY, freeItem, item); - assert(_currentCharacter->sceneId < _roomTableSize); - Room *currentRoom = &_roomTable[_currentCharacter->sceneId]; - if (x == destX && y == destY) { - currentRoom->itemsXPos[freeItem] = destX; - currentRoom->itemsYPos[freeItem] = destY; - currentRoom->itemsTable[freeItem] = item; - snd_playSoundEffect(0x32); - _animator->animAddGameItem(freeItem, _currentCharacter->sceneId); - return; - } - _screen->hideMouse(); - if (y <= destY) { - int tempY = y; - int addY = 2; - int drawX = x - 8; - int drawY = 0; - - backUpItemRect0(drawX, y - 16); - - while (tempY < destY) { - restoreItemRect0(drawX, tempY - 16); - tempY += addY; - if (tempY > destY) - tempY = destY; - ++addY; - drawY = tempY - 16; - backUpItemRect0(drawX, drawY); - uint32 nextTime = _system->getMillis() + 1 * _tickLength; - _screen->drawShape(0, _shapes[216+item], drawX, drawY, 0, 0); - _screen->updateScreen(); - delayUntil(nextTime); - } - - bool skip = false; - if (x == destX) { - if (destY - y <= 16) - skip = true; - } - - if (!skip) { - snd_playSoundEffect(0x47); - if (addY < 6) - addY = 6; - - int xDiff = (destX - x) << 4; - xDiff /= addY; - int startAddY = addY; - addY >>= 1; - if (destY - y <= 8) - addY >>= 1; - addY = -addY; - int unkX = x << 4; - while (--startAddY) { - drawX = (unkX >> 4) - 8; - drawY = tempY - 16; - restoreItemRect0(drawX, drawY); - tempY += addY; - unkX += xDiff; - if (tempY > destY) - tempY = destY; - ++addY; - drawX = (unkX >> 4) - 8; - drawY = tempY - 16; - backUpItemRect0(drawX, drawY); - uint32 nextTime = _system->getMillis() + 1 * _tickLength; - _screen->drawShape(0, _shapes[216+item], drawX, drawY, 0, 0); - _screen->updateScreen(); - delayUntil(nextTime); - } - restoreItemRect0(drawX, drawY); - } else { - restoreItemRect0(drawX, tempY - 16); - } - } - currentRoom->itemsXPos[freeItem] = destX; - currentRoom->itemsYPos[freeItem] = destY; - currentRoom->itemsTable[freeItem] = item; - snd_playSoundEffect(0x32); - _animator->animAddGameItem(freeItem, _currentCharacter->sceneId); - _screen->showMouse(); -} - -void KyraEngine_v1::dropItem(int unk1, int item, int x, int y, int unk2) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::dropItem(%d, %d, %d, %d, %d)", unk1, item, x, y, unk2); - if (processItemDrop(_currentCharacter->sceneId, item, x, y, unk1, unk2)) - return; - snd_playSoundEffect(54); - assert(_noDropList); - if (12 == countItemsInScene(_currentCharacter->sceneId)) - drawSentenceCommand(_noDropList[0], 6); - else - drawSentenceCommand(_noDropList[1], 6); -} - -void KyraEngine_v1::itemSpecialFX(int x, int y, int item) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::itemSpecialFX(%d, %d, %d)", x, y, item); - if (item == 41) - itemSpecialFX1(x, y, item); - else - itemSpecialFX2(x, y, item); -} - -void KyraEngine_v1::itemSpecialFX1(int x, int y, int item) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::itemSpecialFX1(%d, %d, %d)", x, y, item); - uint8 *shape = _shapes[216+item]; - x -= 8; - int startY = y; - y -= 15; - _screen->hideMouse(); - backUpItemRect0(x, y); - for (int i = 1; i <= 16; ++i) { - _screen->setNewShapeHeight(shape, i); - --startY; - restoreItemRect0(x, y); - uint32 nextTime = _system->getMillis() + 1 * _tickLength; - _screen->drawShape(0, shape, x, startY, 0, 0); - _screen->updateScreen(); - delayUntil(nextTime); - } - restoreItemRect0(x, y); - _screen->showMouse(); -} - -void KyraEngine_v1::itemSpecialFX2(int x, int y, int item) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::itemSpecialFX2(%d, %d, %d)", x, y, item); - x -= 8; - y -= 15; - int yAdd = (int8)(((16 - _itemTable[item].height) >> 1) & 0xFF); - backUpItemRect0(x, y); - if (item >= 80 && item <= 89) - snd_playSoundEffect(55); - - for (int i = 201; i <= 205; ++i) { - restoreItemRect0(x, y); - uint32 nextTime = _system->getMillis() + 3 * _tickLength; - _screen->drawShape(0, _shapes[i], x, y + yAdd, 0, 0); - _screen->updateScreen(); - delayUntil(nextTime); - } - - for (int i = 204; i >= 201; --i) { - restoreItemRect0(x, y); - uint32 nextTime = _system->getMillis() + 3 * _tickLength; - _screen->drawShape(0, _shapes[216+item], x, y, 0, 0); - _screen->drawShape(0, _shapes[i], x, y + yAdd, 0, 0); - _screen->updateScreen(); - delayUntil(nextTime); - } - restoreItemRect0(x, y); -} - -void KyraEngine_v1::magicOutMouseItem(int animIndex, int itemPos) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::magicOutMouseItem(%d, %d)", animIndex, itemPos); - int videoPageBackUp = _screen->_curPage; - _screen->_curPage = 0; - int x = 0, y = 0; - if (itemPos == -1) { - Common::Point mouse = getMousePos(); - x = mouse.x - 12; - y = mouse.y - 18; - } else { - x = _itemPosX[itemPos] - 4; - y = _itemPosY[itemPos] - 3; - } - - if (_itemInHand == -1 && itemPos == -1) - return; - - int tableIndex = 0, loopStart = 0, maxLoops = 0; - if (animIndex == 0) { - tableIndex = _rnd.getRandomNumberRng(0, 5); - loopStart = 35; - maxLoops = 9; - } else if (animIndex == 1) { - tableIndex = _rnd.getRandomNumberRng(0, 11); - loopStart = 115; - maxLoops = 8; - } else if (animIndex == 2) { - tableIndex = 0; - loopStart = 124; - maxLoops = 4; - } else { - tableIndex = -1; - } - - if (animIndex == 2) - snd_playSoundEffect(0x5E); - else - snd_playSoundEffect(0x37); - _screen->hideMouse(); - backUpItemRect1(x, y); - - for (int shape = _magicMouseItemStartFrame[animIndex]; shape <= _magicMouseItemEndFrame[animIndex]; ++shape) { - restoreItemRect1(x, y); - uint32 nextTime = _system->getMillis() + 4 * _tickLength; - _screen->drawShape(0, _shapes[216+_itemInHand], x + 4, y + 3, 0, 0); - if (tableIndex == -1) - _screen->drawShape(0, _shapes[shape], x, y, 0, 0); - else - specialMouseItemFX(shape, x, y, animIndex, tableIndex, loopStart, maxLoops); - _screen->updateScreen(); - delayUntil(nextTime); - } - - if (itemPos != -1) { - restoreItemRect1(x, y); - _screen->fillRect(_itemPosX[itemPos], _itemPosY[itemPos], _itemPosX[itemPos] + 15, _itemPosY[itemPos] + 15, 12, 0); - backUpItemRect1(x, y); - } - - for (int shape = _magicMouseItemStartFrame2[animIndex]; shape <= _magicMouseItemEndFrame2[animIndex]; ++shape) { - restoreItemRect1(x, y); - uint32 nextTime = _system->getMillis() + 4 * _tickLength; - _screen->drawShape(0, _shapes[216+_itemInHand], x + 4, y + 3, 0, 0); - if (tableIndex == -1) - _screen->drawShape(0, _shapes[shape], x, y, 0, 0); - else - specialMouseItemFX(shape, x, y, animIndex, tableIndex, loopStart, maxLoops); - _screen->updateScreen(); - delayUntil(nextTime); - } - restoreItemRect1(x, y); - if (itemPos == -1) { - _screen->setMouseCursor(1, 1, _shapes[0]); - _itemInHand = -1; - } else { - _characterList[0].inventoryItems[itemPos] = 0xFF; - _screen->hideMouse(); - _screen->fillRect(_itemPosX[itemPos], _itemPosY[itemPos], _itemPosX[itemPos] + 15, _itemPosY[itemPos] + 15, 12, 0); - _screen->showMouse(); - } - _screen->showMouse(); - _screen->_curPage = videoPageBackUp; -} - -void KyraEngine_v1::magicInMouseItem(int animIndex, int item, int itemPos) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::magicInMouseItem(%d, %d, %d)", animIndex, item, itemPos); - int videoPageBackUp = _screen->_curPage; - _screen->_curPage = 0; - int x = 0, y = 0; - if (itemPos == -1) { - Common::Point mouse = getMousePos(); - x = mouse.x - 12; - y = mouse.y - 18; - } else { - x = _itemPosX[itemPos] - 4; - y = _itemPosX[itemPos] - 3; - } - if (item < 0) - return; - - int tableIndex = -1, loopStart = 0, maxLoops = 0; - if (animIndex == 0) { - tableIndex = _rnd.getRandomNumberRng(0, 5); - loopStart = 35; - maxLoops = 9; - } else if (animIndex == 1) { - tableIndex = _rnd.getRandomNumberRng(0, 11); - loopStart = 115; - maxLoops = 8; - } else if (animIndex == 2) { - tableIndex = 0; - loopStart = 124; - maxLoops = 4; - } - - _screen->hideMouse(); - backUpItemRect1(x, y); - if (animIndex == 2) - snd_playSoundEffect(0x5E); - else - snd_playSoundEffect(0x37); - - for (int shape = _magicMouseItemStartFrame[animIndex]; shape <= _magicMouseItemEndFrame[animIndex]; ++shape) { - restoreItemRect1(x, y); - uint32 nextTime = _system->getMillis() + 4 * _tickLength; - if (tableIndex == -1) - _screen->drawShape(0, _shapes[shape], x, y, 0, 0); - else - specialMouseItemFX(shape, x, y, animIndex, tableIndex, loopStart, maxLoops); - _screen->updateScreen(); - delayUntil(nextTime); - } - - for (int shape = _magicMouseItemStartFrame2[animIndex]; shape <= _magicMouseItemEndFrame2[animIndex]; ++shape) { - restoreItemRect1(x, y); - uint32 nextTime = _system->getMillis() + 4 * _tickLength; - if (tableIndex == -1) - _screen->drawShape(0, _shapes[shape], x, y, 0, 0); - else - specialMouseItemFX(shape, x, y, animIndex, tableIndex, loopStart, maxLoops); - _screen->updateScreen(); - delayUntil(nextTime); - } - restoreItemRect1(x, y); - if (itemPos == -1) { - _screen->setMouseCursor(8, 15, _shapes[216+item]); - _itemInHand = item; - } else { - _characterList[0].inventoryItems[itemPos] = item; - _screen->hideMouse(); - _screen->drawShape(0, _shapes[216+item], _itemPosX[itemPos], _itemPosY[itemPos], 0, 0); - _screen->showMouse(); - } - _screen->showMouse(); - _screen->_curPage = videoPageBackUp; -} - -void KyraEngine_v1::specialMouseItemFX(int shape, int x, int y, int animIndex, int tableIndex, int loopStart, int maxLoops) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::specialMouseItemFX(%d, %d, %d, %d, %d, %d, %d)", shape, x, y, animIndex, tableIndex, loopStart, maxLoops); - static const uint8 table1[] = { - 0x23, 0x45, 0x55, 0x72, 0x84, 0xCF, 0x00, 0x00 - }; - static const uint8 table2[] = { - 0x73, 0xB5, 0x80, 0x21, 0x13, 0x39, 0x45, 0x55, 0x62, 0xB4, 0xCF, 0xD8 - }; - static const uint8 table3[] = { - 0x7C, 0xD0, 0x74, 0x84, 0x87, 0x00, 0x00, 0x00 - }; - int tableValue = 0; - if (animIndex == 0) - tableValue = table1[tableIndex]; - else if (animIndex == 1) - tableValue = table2[tableIndex]; - else if (animIndex == 2) - tableValue = table3[tableIndex]; - else - return; - processSpecialMouseItemFX(shape, x, y, tableValue, loopStart, maxLoops); -} - -void KyraEngine_v1::processSpecialMouseItemFX(int shape, int x, int y, int tableValue, int loopStart, int maxLoops) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::processSpecialMouseItemFX(%d, %d, %d, %d, %d, %d)", shape, x, y, tableValue, loopStart, maxLoops); - uint8 shapeColorTable[16]; - uint8 *shapePtr = _shapes[shape] + 10; - if (_flags.useAltShapeHeader) - shapePtr += 2; - - for (int i = 0; i < 16; ++i) - shapeColorTable[i] = shapePtr[i]; - - for (int i = loopStart; i < loopStart + maxLoops; ++i) { - for (int i2 = 0; i2 < 16; ++i2) { - if (shapePtr[i2] == i) - shapeColorTable[i2] = (i + tableValue) - loopStart; - } - } - _screen->drawShape(0, _shapes[shape], x, y, 0, 0x8000, shapeColorTable); -} - -void KyraEngine_v1::updatePlayerItemsForScene() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::updatePlayerItemsForScene()"); - if (_itemInHand >= 29 && _itemInHand < 33) { - ++_itemInHand; - if (_itemInHand > 33) - _itemInHand = 33; - _screen->hideMouse(); - _screen->setMouseCursor(8, 15, _shapes[216+_itemInHand]); - _screen->showMouse(); - } - - bool redraw = false; - for (int i = 0; i < 10; ++i) { - uint8 item = _currentCharacter->inventoryItems[i]; - if (item >= 29 && item < 33) { - ++item; - if (item > 33) - item = 33; - _currentCharacter->inventoryItems[i] = item; - redraw = true; - } - } - - if (redraw) { - _screen->hideMouse(); - redrawInventory(0); - _screen->showMouse(); - } - - if (_itemInHand == 33) - magicOutMouseItem(2, -1); - - _screen->hideMouse(); - for (int i = 0; i < 10; ++i) { - uint8 item = _currentCharacter->inventoryItems[i]; - if (item == 33) - magicOutMouseItem(2, i); - } - _screen->showMouse(); -} - -void KyraEngine_v1::redrawInventory(int page) { - int videoPageBackUp = _screen->_curPage; - _screen->_curPage = page; - _screen->hideMouse(); - for (int i = 0; i < 10; ++i) { - _screen->fillRect(_itemPosX[i], _itemPosY[i], _itemPosX[i] + 15, _itemPosY[i] + 15, 12, page); - if (_currentCharacter->inventoryItems[i] != 0xFF) { - uint8 item = _currentCharacter->inventoryItems[i]; - _screen->drawShape(page, _shapes[216+item], _itemPosX[i], _itemPosY[i], 0, 0); - } - } - _screen->showMouse(); - _screen->_curPage = videoPageBackUp; - _screen->updateScreen(); -} - -void KyraEngine_v1::backUpItemRect0(int xpos, int ypos) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::backUpItemRect0(%d, %d)", xpos, ypos); - _screen->rectClip(xpos, ypos, 3<<3, 24); - _screen->copyRegionToBuffer(_screen->_curPage, xpos, ypos, 3<<3, 24, _itemBkgBackUp[0]); -} - -void KyraEngine_v1::restoreItemRect0(int xpos, int ypos) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::restoreItemRect0(%d, %d)", xpos, ypos); - _screen->rectClip(xpos, ypos, 3<<3, 24); - _screen->copyBlockToPage(_screen->_curPage, xpos, ypos, 3<<3, 24, _itemBkgBackUp[0]); -} - -void KyraEngine_v1::backUpItemRect1(int xpos, int ypos) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::backUpItemRect1(%d, %d)", xpos, ypos); - _screen->rectClip(xpos, ypos, 4<<3, 32); - _screen->copyRegionToBuffer(_screen->_curPage, xpos, ypos, 4<<3, 32, _itemBkgBackUp[1]); -} - -void KyraEngine_v1::restoreItemRect1(int xpos, int ypos) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::restoreItemRect1(%d, %d)", xpos, ypos); - _screen->rectClip(xpos, ypos, 4<<3, 32); - _screen->copyBlockToPage(_screen->_curPage, xpos, ypos, 4<<3, 32, _itemBkgBackUp[1]); -} - -} // end of namespace Kyra - diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index ebe39ee02c..5a2d36d612 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -325,10 +325,10 @@ void KyraEngine_HoF::startup() { memset(_sceneAnims, 0, sizeof(_sceneAnims)); for (int i = 0; i < ARRAYSIZE(_sceneAnimMovie); ++i) - _sceneAnimMovie[i] = new WSAMovieV2(this, _screen); + _sceneAnimMovie[i] = new WSAMovie_v2(this, _screen); memset(_wsaSlots, 0, sizeof(_wsaSlots)); for (int i = 0; i < ARRAYSIZE(_wsaSlots); ++i) - _wsaSlots[i] = new WSAMovieV2(this, _screen); + _wsaSlots[i] = new WSAMovie_v2(this, _screen); _screen->_curPage = 0; @@ -1537,7 +1537,7 @@ void KyraEngine_HoF::loadInvWsa(const char *filename, int run, int delayTime, in wsaFlags |= 2; if (!_invWsa.wsa) - _invWsa.wsa = new WSAMovieV2(this, _screen); + _invWsa.wsa = new WSAMovie_v2(this, _screen); if (!_invWsa.wsa->open(filename, wsaFlags, 0)) error("Couldn't open inventory WSA file '%s'", filename); diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index 5ee13eb261..8b03cbc019 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -97,17 +97,17 @@ enum kNestedSequencesDemo { kSequenceDemoDig }; -class WSAMovieV2; +class WSAMovie_v2; class KyraEngine_HoF; class TextDisplayer_HoF; struct TIM; -typedef int (KyraEngine_HoF::*SeqProc)(WSAMovieV2*, int, int, int); +typedef int (KyraEngine_HoF::*SeqProc)(WSAMovie_v2*, int, int, int); struct ActiveWSA { int16 flags; - WSAMovieV2 *movie; + WSAMovie_v2 *movie; uint16 startFrame; uint16 endFrame; uint16 frameDelay; @@ -193,52 +193,52 @@ protected: // intro/outro void seq_playSequences(int startSeq, int endSeq = -1); - int seq_introWestwood(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introTitle(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introOverview(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introLibrary(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introHand(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introPoint(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introZanfaun(WSAMovieV2 *wsaObj, int x, int y, int frm); - - int seq_introOver1(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introOver2(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introForest(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introDragon(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introDarm(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introLibrary2(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introMarco(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introHand1a(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introHand1b(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introHand1c(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introHand2(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_introHand3(WSAMovieV2 *wsaObj, int x, int y, int frm); - - int seq_finaleFunters(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_finaleFerb(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_finaleFish(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_finaleFheep(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_finaleFarmer(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_finaleFuards(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_finaleFirates(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_finaleFrash(WSAMovieV2 *wsaObj, int x, int y, int frm); - - int seq_finaleFiggle(WSAMovieV2 *wsaObj, int x, int y, int frm); - - int seq_demoVirgin(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_demoWestwood(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_demoTitle(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_demoHill(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_demoOuthome(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_demoWharf(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_demoDinob(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_demoFisher(WSAMovieV2 *wsaObj, int x, int y, int frm); - - int seq_demoWharf2(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_demoDinob2(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_demoWater(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_demoBail(WSAMovieV2 *wsaObj, int x, int y, int frm); - int seq_demoDig(WSAMovieV2 *wsaObj, int x, int y, int frm); + int seq_introWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introLibrary(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introHand(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introPoint(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introZanfaun(WSAMovie_v2 *wsaObj, int x, int y, int frm); + + int seq_introOver1(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introOver2(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introForest(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introDragon(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introDarm(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introLibrary2(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introMarco(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introHand1a(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introHand1b(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introHand1c(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introHand2(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_introHand3(WSAMovie_v2 *wsaObj, int x, int y, int frm); + + int seq_finaleFunters(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_finaleFerb(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_finaleFish(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_finaleFheep(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_finaleFarmer(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_finaleFirates(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_finaleFrash(WSAMovie_v2 *wsaObj, int x, int y, int frm); + + int seq_finaleFiggle(WSAMovie_v2 *wsaObj, int x, int y, int frm); + + int seq_demoVirgin(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_demoWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_demoTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_demoHill(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_demoOuthome(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_demoWharf(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_demoDinob(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_demoFisher(WSAMovie_v2 *wsaObj, int x, int y, int frm); + + int seq_demoWharf2(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_demoDinob2(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_demoWater(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_demoBail(WSAMovie_v2 *wsaObj, int x, int y, int frm); + int seq_demoDig(WSAMovie_v2 *wsaObj, int x, int y, int frm); void seq_sequenceCommand(int command); void seq_loadNestedSequence(int wsaNum, int seqNum); @@ -259,7 +259,7 @@ protected: char *seq_preprocessString(const char *str, int width); void seq_printCreditsString(uint16 strIndex, int x, int y, const uint8 *colorMap, uint8 textcolor); void seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, int textColor, int x, int y, int width, - WSAMovieV2 * wsa, int firstframe, int lastframe, int wsaXpos, int wsaYpos); + WSAMovie_v2 * wsa, int firstframe, int lastframe, int wsaXpos, int wsaYpos); void seq_finaleActorScreen(); void seq_displayScrollText(uint8 *data, const ScreenDim *d, int tempPage1, int tempPage2, int speed, int step, Screen::FontId fid1, Screen::FontId fid2, const uint8 *shapeData = 0, const char *const *specialData = 0); void seq_scrollPage(); @@ -330,7 +330,7 @@ protected: uint8 *_sceneShapeTable[50]; - WSAMovieV2 *_wsaSlots[10]; + WSAMovie_v2 *_wsaSlots[10]; void freeSceneShapePtrs(); @@ -667,7 +667,7 @@ protected: int delay; bool running; uint32 timer; - WSAMovieV2 *wsa; + WSAMovie_v2 *wsa; } _invWsa; // TODO: move inside KyraEngine_HoF::InventoryWsa? @@ -854,7 +854,7 @@ protected: static const uint8 _seqTextColorPresets[]; char *_seqProcessedString; - WSAMovieV2 *_seqWsa; + WSAMovie_v2 *_seqWsa; bool _abortIntroFlag; int _menuChoice; diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp new file mode 100644 index 0000000000..175a635157 --- /dev/null +++ b/engines/kyra/kyra_lok.cpp @@ -0,0 +1,1044 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "kyra/kyra_lok.h" + +#include "common/file.h" +#include "common/events.h" +#include "common/system.h" +#include "common/savefile.h" + +#include "gui/message.h" + +#include "kyra/resource.h" +#include "kyra/screen.h" +#include "kyra/script.h" +#include "kyra/seqplayer.h" +#include "kyra/sound.h" +#include "kyra/sprites.h" +#include "kyra/wsamovie.h" +#include "kyra/animator_lok.h" +#include "kyra/text.h" +#include "kyra/debugger.h" +#include "kyra/timer.h" + +namespace Kyra { + +KyraEngine_LoK::KyraEngine_LoK(OSystem *system, const GameFlags &flags) + : KyraEngine(system, flags) { + _skipFlag = false; + + _seq_Forest = _seq_KallakWriting = _seq_KyrandiaLogo = _seq_KallakMalcolm = + _seq_MalcolmTree = _seq_WestwoodLogo = _seq_Demo1 = _seq_Demo2 = _seq_Demo3 = + _seq_Demo4 = 0; + + _seq_WSATable = _seq_CPSTable = _seq_COLTable = _seq_textsTable = 0; + _seq_WSATable_Size = _seq_CPSTable_Size = _seq_COLTable_Size = _seq_textsTable_Size = 0; + + _roomFilenameTable = _characterImageTable = 0; + _roomFilenameTableSize = _characterImageTableSize = 0; + _itemList = _takenList = _placedList = _droppedList = _noDropList = 0; + _itemList_Size = _takenList_Size = _placedList_Size = _droppedList_Size = _noDropList_Size = 0; + _putDownFirst = _waitForAmulet = _blackJewel = _poisonGone = _healingTip = 0; + _putDownFirst_Size = _waitForAmulet_Size = _blackJewel_Size = _poisonGone_Size = _healingTip_Size = 0; + _thePoison = _fluteString = _wispJewelStrings = _magicJewelString = _flaskFull = _fullFlask = 0; + _thePoison_Size = _fluteString_Size = _wispJewelStrings_Size = 0; + _magicJewelString_Size = _flaskFull_Size = _fullFlask_Size = 0; + + _defaultShapeTable = 0; + _healingShapeTable = _healingShape2Table = 0; + _defaultShapeTableSize = _healingShapeTableSize = _healingShape2TableSize = 0; + _posionDeathShapeTable = _fluteAnimShapeTable = 0; + _posionDeathShapeTableSize = _fluteAnimShapeTableSize = 0; + _winterScrollTable = _winterScroll1Table = _winterScroll2Table = 0; + _winterScrollTableSize = _winterScroll1TableSize = _winterScroll2TableSize = 0; + _drinkAnimationTable = _brandonToWispTable = _magicAnimationTable = _brandonStoneTable = 0; + _drinkAnimationTableSize = _brandonToWispTableSize = _magicAnimationTableSize = _brandonStoneTableSize = 0; + memset(&_specialPalettes, 0, sizeof(_specialPalettes)); + _sprites = 0; + _animator = 0; + _seq = 0; + _characterList = 0; + _movFacingTable = 0; + _buttonData = 0; + _buttonDataListPtr = 0; + memset(_shapes, 0, sizeof(_shapes)); + memset(_movieObjects, 0, sizeof(_movieObjects)); + _finalA = _finalB = _finalC = 0; + _endSequenceBackUpRect = 0; + memset(_panPagesTable, 0, sizeof(_panPagesTable)); + memset(_sceneAnimTable, 0, sizeof(_sceneAnimTable)); + _currHeadShape = 0; + + memset(&_itemBkgBackUp, 0, sizeof(_itemBkgBackUp)); +} + +KyraEngine_LoK::~KyraEngine_LoK() { + for (int i = 0; i < ARRAYSIZE(_movieObjects); ++i) { + if (_movieObjects[i]) + _movieObjects[i]->close(); + delete _movieObjects[i]; + _movieObjects[i] = 0; + } + + closeFinalWsa(); + if (_emc) { + _emc->unload(&_npcScriptData); + _emc->unload(&_scriptClickData); + } + + Common::clearAllSpecialDebugLevels(); + + delete _screen; + delete _sprites; + delete _animator; + delete _seq; + + delete[] _characterList; + + delete[] _movFacingTable; + + delete[] _gui->_scrollUpButton.data0ShapePtr; + delete[] _gui->_scrollUpButton.data1ShapePtr; + delete[] _gui->_scrollUpButton.data2ShapePtr; + delete[] _gui->_scrollDownButton.data0ShapePtr; + delete[] _gui->_scrollDownButton.data1ShapePtr; + delete[] _gui->_scrollDownButton.data2ShapePtr; + + delete[] _buttonData; + delete[] _buttonDataListPtr; + + delete _gui; + + delete[] _itemBkgBackUp[0]; + delete[] _itemBkgBackUp[1]; + + for (int i = 0; i < ARRAYSIZE(_shapes); ++i) { + if (_shapes[i] != 0) { + delete[] _shapes[i]; + for (int i2 = 0; i2 < ARRAYSIZE(_shapes); i2++) { + if (_shapes[i2] == _shapes[i] && i2 != i) { + _shapes[i2] = 0; + } + } + _shapes[i] = 0; + } + } + + for (int i = 0; i < ARRAYSIZE(_sceneAnimTable); ++i) + delete[] _sceneAnimTable[i]; +} + +int KyraEngine_LoK::init() { + _screen = new Screen_LoK(this, _system); + assert(_screen); + _screen->setResolution(); + + KyraEngine::init(); + + _sprites = new Sprites(this, _system); + assert(_sprites); + _seq = new SeqPlayer(this, _system); + assert(_seq); + _animator = new Animator_LoK(this, _system); + assert(_animator); + _animator->init(5, 11, 12); + assert(*_animator); + _text = new TextDisplayer(this, screen()); + assert(_text); + _gui = new GUI_LoK(this, _screen); + assert(_gui); + + initStaticResource(); + + _sound->setSoundList(&_soundData[kMusicIntro]); + + _trackMap = _dosTrackMap; + _trackMapSize = _dosTrackMapSize; + + if (!_sound->init()) + error("Couldn't init sound"); + + _sound->loadSoundFile(0); + + setupButtonData(); + + _paletteChanged = 1; + _currentCharacter = 0; + _characterList = new Character[11]; + assert(_characterList); + memset(_characterList, 0, sizeof(Character)*11); + + for (int i = 0; i < 11; ++i) + memset(_characterList[i].inventoryItems, 0xFF, sizeof(_characterList[i].inventoryItems)); + + _characterList[0].sceneId = 5; + _characterList[0].height = 48; + _characterList[0].facing = 3; + _characterList[0].currentAnimFrame = 7; + + memset(&_npcScriptData, 0, sizeof(EMCData)); + memset(&_scriptClickData, 0, sizeof(EMCData)); + + memset(&_npcScript, 0, sizeof(EMCState)); + memset(&_scriptMain, 0, sizeof(EMCState)); + memset(&_scriptClick, 0, sizeof(EMCState)); + + _debugger = new Debugger_LoK(this); + assert(_debugger); + memset(_shapes, 0, sizeof(_shapes)); + + for (int i = 0; i < ARRAYSIZE(_movieObjects); ++i) + _movieObjects[i] = createWSAMovie(); + + memset(_flagsTable, 0, sizeof(_flagsTable)); + + _abortWalkFlag = false; + _abortWalkFlag2 = false; + _talkingCharNum = -1; + _charSayUnk3 = -1; + memset(_currSentenceColor, 0, 3); + _startSentencePalIndex = -1; + _fadeText = false; + + _cauldronState = 0; + _crystalState[0] = _crystalState[1] = -1; + + _brandonStatusBit = 0; + _brandonStatusBit0x02Flag = _brandonStatusBit0x20Flag = 10; + _brandonPosX = _brandonPosY = -1; + _deathHandler = 0xFF; + _poisonDeathCounter = 0; + + memset(_itemTable, 0, sizeof(_itemTable)); + memset(_exitList, 0xFFFF, sizeof(_exitList)); + _exitListPtr = 0; + _pathfinderFlag = _pathfinderFlag2 = 0; + _lastFindWayRet = 0; + _sceneChangeState = _loopFlag2 = 0; + + _movFacingTable = new int[150]; + assert(_movFacingTable); + _movFacingTable[0] = 8; + + _skipFlag = false; + + _marbleVaseItem = -1; + memset(_foyerItemTable, -1, sizeof(_foyerItemTable)); + _mouseState = _itemInHand = -1; + _handleInput = false; + + _currentRoom = 0xFFFF; + _scenePhasingFlag = 0; + _lastProcessedItem = 0; + _lastProcessedItemHeight = 16; + + _unkScreenVar1 = 1; + _unkScreenVar2 = 0; + _unkScreenVar3 = 0; + _unkAmuletVar = 0; + + _endSequenceNeedLoading = 1; + _malcolmFlag = 0; + _beadStateVar = 0; + _endSequenceSkipFlag = 0; + _unkEndSeqVar2 = 0; + _endSequenceBackUpRect = 0; + _unkEndSeqVar4 = 0; + _unkEndSeqVar5 = 0; + _lastDisplayedPanPage = 0; + memset(_panPagesTable, 0, sizeof(_panPagesTable)); + _finalA = _finalB = _finalC = 0; + memset(&_kyragemFadingState, 0, sizeof(_kyragemFadingState)); + _kyragemFadingState.gOffset = 0x13; + _kyragemFadingState.bOffset = 0x13; + + _mousePressFlag = false; + + _menuDirectlyToLoad = false; + + _lastMusicCommand = 0; + + return 0; +} + +int KyraEngine_LoK::go() { + if (_res->getFileSize("6.FNT")) + _screen->loadFont(Screen::FID_6_FNT, "6.FNT"); + _screen->loadFont(Screen::FID_8_FNT, "8FAT.FNT"); + _screen->setScreenDim(0); + + _abortIntroFlag = false; + + if (_flags.isDemo) { + seq_demo(); + } else { + setGameFlag(0xF3); + setGameFlag(0xFD); + if (_gameToLoad == -1) { + setGameFlag(0xEF); + seq_intro(); + if (_quitFlag) + return 0; + if (_skipIntroFlag && _abortIntroFlag) + resetGameFlag(0xEF); + } + startup(); + resetGameFlag(0xEF); + mainLoop(); + } + return 0; +} + + +void KyraEngine_LoK::startup() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::startup()"); + static const uint8 colorMap[] = { 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0 }; + _screen->setTextColorMap(colorMap); + _sound->setSoundList(&_soundData[kMusicIngame]); + _sound->loadSoundFile(0); +// _screen->setFont(Screen::FID_6_FNT); + _screen->setAnimBlockPtr(3750); + memset(_sceneAnimTable, 0, sizeof(_sceneAnimTable)); + loadMouseShapes(); + _currentCharacter = &_characterList[0]; + for (int i = 1; i < 5; ++i) + _animator->setCharacterDefaultFrame(i); + for (int i = 5; i <= 10; ++i) + setCharactersPositions(i); + _animator->setCharactersHeight(); + resetBrandonPoisonFlags(); + _screen->_curPage = 0; + // XXX + for (int i = 0; i < 12; ++i) { + int size = _screen->getRectSize(3, 24); + _shapes[361+i] = new byte[size]; + } + + _itemBkgBackUp[0] = new uint8[_screen->getRectSize(3, 24)]; + memset(_itemBkgBackUp[0], 0, _screen->getRectSize(3, 24)); + _itemBkgBackUp[1] = new uint8[_screen->getRectSize(4, 32)]; + memset(_itemBkgBackUp[1], 0, _screen->getRectSize(4, 32)); + + for (int i = 0; i < _roomTableSize; ++i) { + for (int item = 0; item < 12; ++item) { + _roomTable[i].itemsTable[item] = 0xFF; + _roomTable[i].itemsXPos[item] = 0xFFFF; + _roomTable[i].itemsYPos[item] = 0xFF; + _roomTable[i].needInit[item] = 0; + } + } + + loadCharacterShapes(); + loadSpecialEffectShapes(); + loadItems(); + loadButtonShapes(); + initMainButtonList(); + loadMainScreen(); + _screen->loadPalette("PALETTE.COL", _screen->_currentPalette); + + // XXX + _animator->initAnimStateList(); + setCharactersInDefaultScene(); + + if (!_emc->load("_STARTUP.EMC", &_npcScriptData, &_opcodes)) + error("Could not load \"_STARTUP.EMC\" script"); + _emc->init(&_scriptMain, &_npcScriptData); + + if (!_emc->start(&_scriptMain, 0)) + error("Could not start script function 0 of script \"_STARTUP.EMC\""); + + while (_emc->isValid(&_scriptMain)) + _emc->run(&_scriptMain); + + _emc->unload(&_npcScriptData); + + if (!_emc->load("_NPC.EMC", &_npcScriptData, &_opcodes)) + error("Could not load \"_NPC.EMC\" script"); + + snd_playTheme(1, -1); + if (_gameToLoad == -1) { + enterNewScene(_currentCharacter->sceneId, _currentCharacter->facing, 0, 0, 1); + if (_abortIntroFlag && _skipIntroFlag) { + _menuDirectlyToLoad = true; + _screen->setMouseCursor(1, 1, _shapes[0]); + _screen->showMouse(); + _gui->buttonMenuCallback(0); + _menuDirectlyToLoad = false; + } else + saveGame(getSavegameFilename(0), "New game"); + } else { + _screen->setFont(Screen::FID_8_FNT); + loadGame(getSavegameFilename(_gameToLoad)); + _gameToLoad = -1; + } +} + +void KyraEngine_LoK::mainLoop() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::mainLoop()"); + + while (!_quitFlag) { + int32 frameTime = (int32)_system->getMillis(); + _skipFlag = false; + + if (_currentCharacter->sceneId == 210) { + updateKyragemFading(); + if (seq_playEnd() && _deathHandler != 8) + break; + } + + if (_deathHandler != 0xFF) { + snd_playWanderScoreViaMap(0, 1); + snd_playSoundEffect(49); + _screen->hideMouse(); + _screen->setMouseCursor(1, 1, _shapes[0]); + destroyMouseItem(); + _screen->showMouse(); + _gui->buttonMenuCallback(0); + _deathHandler = 0xFF; + } + + if ((_brandonStatusBit & 2) && _brandonStatusBit0x02Flag) + _animator->animRefreshNPC(0); + + if ((_brandonStatusBit & 0x20) && _brandonStatusBit0x20Flag) { + _animator->animRefreshNPC(0); + _brandonStatusBit0x20Flag = 0; + } + + _screen->showMouse(); + + _gui->processButtonList(_buttonList, 0, 0); + updateMousePointer(); + _timer->update(); + updateTextFade(); + + _handleInput = true; + delay((frameTime + _gameSpeed) - _system->getMillis(), true, true); + _handleInput = false; + + _sound->process(); + } +} + +void KyraEngine_LoK::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) { + while (_system->getMillis() < timestamp && !_quitFlag) { + if (updateTimers) + _timer->update(); + + if (timestamp - _system->getMillis() >= 10) + delay(10, update, isMainLoop); + } +} + +void KyraEngine_LoK::delay(uint32 amount, bool update, bool isMainLoop) { + Common::Event event; + + uint32 start = _system->getMillis(); + do { + while (_eventMan->pollEvent(event)) { + switch (event.type) { + case Common::EVENT_KEYDOWN: + if (event.kbd.keycode >= '1' && event.kbd.keycode <= '9' && + (event.kbd.flags == Common::KBD_CTRL || event.kbd.flags == Common::KBD_ALT) && isMainLoop) { + const char *saveLoadSlot = getSavegameFilename(9 - (event.kbd.keycode - '0') + 990); + + if (event.kbd.flags == Common::KBD_CTRL) + loadGame(saveLoadSlot); + else { + char savegameName[14]; + sprintf(savegameName, "Quicksave %d", event.kbd.keycode - '0'); + saveGame(saveLoadSlot, savegameName); + } + } else if (event.kbd.flags == Common::KBD_CTRL) { + if (event.kbd.keycode == 'd') + _debugger->attach(); + else if (event.kbd.keycode == 'q') + _quitFlag = true; + } else if (event.kbd.keycode == '.') { + _skipFlag = true; + } else if (event.kbd.keycode == Common::KEYCODE_RETURN || event.kbd.keycode == Common::KEYCODE_SPACE || event.kbd.keycode == Common::KEYCODE_ESCAPE) { + _abortIntroFlag = true; + _skipFlag = true; + } + + break; + case Common::EVENT_MOUSEMOVE: + _animator->_updateScreen = true; + break; + case Common::EVENT_QUIT: + quitGame(); + break; + case Common::EVENT_LBUTTONDOWN: + _mousePressFlag = true; + break; + case Common::EVENT_LBUTTONUP: + _mousePressFlag = false; + + if (_abortWalkFlag2) + _abortWalkFlag = true; + + if (_handleInput) { + _handleInput = false; + processInput(); + _handleInput = true; + } else + _skipFlag = true; + + break; + default: + break; + } + } + + if (_debugger->isAttached()) + _debugger->onFrame(); + + if (update) { + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + updateTextFade(); + updateMousePointer(); + } + + if (_currentCharacter && _currentCharacter->sceneId == 210 && update) + updateKyragemFading(); + + if (_skipFlag && !_abortIntroFlag && !queryGameFlag(0xFE)) + _skipFlag = false; + + if (amount > 0 && !_skipFlag && !_quitFlag) + _system->delayMillis(10); + + if (_skipFlag) + _sound->voiceStop(); + } while (!_skipFlag && _system->getMillis() < start + amount && !_quitFlag); +} + +void KyraEngine_LoK::waitForEvent() { + bool finished = false; + Common::Event event; + + while (!finished && !_quitFlag) { + while (_eventMan->pollEvent(event)) { + switch (event.type) { + case Common::EVENT_KEYDOWN: + finished = true; + break; + case Common::EVENT_QUIT: + quitGame(); + break; + case Common::EVENT_LBUTTONDOWN: + finished = true; + _skipFlag = true; + break; + default: + break; + } + } + + if (_debugger->isAttached()) + _debugger->onFrame(); + + _system->delayMillis(10); + } +} + +void KyraEngine_LoK::delayWithTicks(int ticks) { + uint32 nextTime = _system->getMillis() + ticks * _tickLength; + + while (_system->getMillis() < nextTime) { + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + + if (_currentCharacter->sceneId == 210) { + updateKyragemFading(); + seq_playEnd(); + } + + if (_skipFlag) + break; + + if (nextTime - _system->getMillis() >= 10) + delay(10); + } +} + +#pragma mark - +#pragma mark - Animation/shape specific code +#pragma mark - + +void KyraEngine_LoK::setupShapes123(const Shape *shapeTable, int endShape, int flags) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setupShapes123(%p, %d, %d)", (const void *)shapeTable, endShape, flags); + + for (int i = 123; i <= 172; ++i) + _shapes[i] = 0; + + uint8 curImage = 0xFF; + int curPageBackUp = _screen->_curPage; + _screen->_curPage = 8; // we are using page 8 here in the original page 2 was backuped and then used for this stuff + int shapeFlags = 2; + if (flags) + shapeFlags = 3; + for (int i = 123; i < 123+endShape; ++i) { + uint8 newImage = shapeTable[i-123].imageIndex; + if (newImage != curImage && newImage != 0xFF) { + assert(_characterImageTable); + _screen->loadBitmap(_characterImageTable[newImage], 8, 8, 0); + curImage = newImage; + } + _shapes[i] = _screen->encodeShape(shapeTable[i-123].x<<3, shapeTable[i-123].y, shapeTable[i-123].w<<3, shapeTable[i-123].h, shapeFlags); + assert(i-7 < _defaultShapeTableSize); + _defaultShapeTable[i-7].xOffset = shapeTable[i-123].xOffset; + _defaultShapeTable[i-7].yOffset = shapeTable[i-123].yOffset; + _defaultShapeTable[i-7].w = shapeTable[i-123].w; + _defaultShapeTable[i-7].h = shapeTable[i-123].h; + } + _screen->_curPage = curPageBackUp; +} + +void KyraEngine_LoK::freeShapes123() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::freeShapes123()"); + + for (int i = 123; i <= 172; ++i) { + delete[] _shapes[i]; + _shapes[i] = 0; + } +} + +#pragma mark - +#pragma mark - Misc stuff +#pragma mark - + +Movie *KyraEngine_LoK::createWSAMovie() { + if (_flags.platform == Common::kPlatformAmiga) + return new WSAMovieAmiga(this); + + return new WSAMovie_v1(this); +} + +void KyraEngine_LoK::setBrandonPoisonFlags(int reset) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setBrandonPoisonFlags(%d)", reset); + _brandonStatusBit |= 1; + + if (reset) + _poisonDeathCounter = 0; + + for (int i = 0; i < 0x100; ++i) + _brandonPoisonFlagsGFX[i] = i; + + _brandonPoisonFlagsGFX[0x99] = 0x34; + _brandonPoisonFlagsGFX[0x9A] = 0x35; + _brandonPoisonFlagsGFX[0x9B] = 0x37; + _brandonPoisonFlagsGFX[0x9C] = 0x38; + _brandonPoisonFlagsGFX[0x9D] = 0x2B; +} + +void KyraEngine_LoK::resetBrandonPoisonFlags() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::resetBrandonPoisonFlags()"); + _brandonStatusBit = 0; + + for (int i = 0; i < 0x100; ++i) + _brandonPoisonFlagsGFX[i] = i; +} + +#pragma mark - +#pragma mark - Input +#pragma mark - + +void KyraEngine_LoK::processInput() { + Common::Point mouse = getMousePos(); + int xpos = mouse.x; + int ypos = mouse.y; + + debugC(9, kDebugLevelMain, "KyraEngine_LoK::processInput(%d, %d)", xpos, ypos); + _abortWalkFlag2 = false; + + if (processInputHelper(xpos, ypos)) + return; + + uint8 item = findItemAtPos(xpos, ypos); + if (item == 0xFF) { + _changedScene = false; + int handled = clickEventHandler(xpos, ypos); + if (_changedScene || handled) + return; + } + + // XXX _deathHandler specific + if (ypos <= 158) { + uint16 exit = 0xFFFF; + if (xpos < 12) { + exit = _walkBlockWest; + } else if (xpos >= 308) { + exit = _walkBlockEast; + } else if (ypos >= 136) { + exit = _walkBlockSouth; + } else if (ypos < 12) { + exit = _walkBlockNorth; + } + + if (exit != 0xFFFF) { + _abortWalkFlag2 = true; + handleSceneChange(xpos, ypos, 1, 1); + _abortWalkFlag2 = false; + return; + } else { + int script = checkForNPCScriptRun(xpos, ypos); + if (script >= 0) { + runNpcScript(script); + return; + } + if (_itemInHand != -1) { + if (ypos < 155) { + if (hasClickedOnExit(xpos, ypos)) { + _abortWalkFlag2 = true; + handleSceneChange(xpos, ypos, 1, 1); + _abortWalkFlag2 = false; + return; + } + dropItem(0, _itemInHand, xpos, ypos, 1); + } + } else { + if (ypos <= 155) { + _abortWalkFlag2 = true; + handleSceneChange(xpos, ypos, 1, 1); + _abortWalkFlag2 = false; + } + } + } + } +} + +int KyraEngine_LoK::processInputHelper(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::processInputHelper(%d, %d)", xpos, ypos); + uint8 item = findItemAtPos(xpos, ypos); + if (item != 0xFF) { + if (_itemInHand == -1) { + _screen->hideMouse(); + _animator->animRemoveGameItem(item); + snd_playSoundEffect(53); + assert(_currentCharacter->sceneId < _roomTableSize); + Room *currentRoom = &_roomTable[_currentCharacter->sceneId]; + int item2 = currentRoom->itemsTable[item]; + currentRoom->itemsTable[item] = 0xFF; + setMouseItem(item2); + assert(_itemList && _takenList); + updateSentenceCommand(_itemList[item2], _takenList[0], 179); + _itemInHand = item2; + _screen->showMouse(); + clickEventHandler2(); + return 1; + } else { + exchangeItemWithMouseItem(_currentCharacter->sceneId, item); + return 1; + } + } + return 0; +} + +int KyraEngine_LoK::clickEventHandler(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::clickEventHandler(%d, %d)", xpos, ypos); + _emc->init(&_scriptClick, &_scriptClickData); + _scriptClick.regs[1] = xpos; + _scriptClick.regs[2] = ypos; + _scriptClick.regs[3] = 0; + _scriptClick.regs[4] = _itemInHand; + _emc->start(&_scriptClick, 1); + + while (_emc->isValid(&_scriptClick)) + _emc->run(&_scriptClick); + + return _scriptClick.regs[3]; +} + +void KyraEngine_LoK::updateMousePointer(bool forceUpdate) { + int shape = 0; + + int newMouseState = 0; + int newX = 0; + int newY = 0; + Common::Point mouse = getMousePos(); + if (mouse.y <= 158) { + if (mouse.x >= 12) { + if (mouse.x >= 308) { + if (_walkBlockEast == 0xFFFF) { + newMouseState = -2; + } else { + newMouseState = -5; + shape = 3; + newX = 7; + newY = 5; + } + } else if (mouse.y >= 136) { + if (_walkBlockSouth == 0xFFFF) { + newMouseState = -2; + } else { + newMouseState = -4; + shape = 4; + newX = 5; + newY = 7; + } + } else if (mouse.y < 12) { + if (_walkBlockNorth == 0xFFFF) { + newMouseState = -2; + } else { + newMouseState = -6; + shape = 2; + newX = 5; + newY = 1; + } + } + } else { + if (_walkBlockWest == 0xFFFF) { + newMouseState = -2; + } else { + newMouseState = -3; + newX = 1; + newY = shape = 5; + } + } + } + + if (mouse.x >= _entranceMouseCursorTracks[0] && mouse.y >= _entranceMouseCursorTracks[1] + && mouse.x <= _entranceMouseCursorTracks[2] && mouse.y <= _entranceMouseCursorTracks[3]) { + switch (_entranceMouseCursorTracks[4]) { + case 0: + newMouseState = -6; + shape = 2; + newX = 5; + newY = 1; + break; + + case 2: + newMouseState = -5; + shape = 3; + newX = 7; + newY = 5; + break; + + case 4: + newMouseState = -4; + shape = 4; + newX = 5; + newY = 7; + break; + + case 6: + newMouseState = -3; + shape = 5; + newX = 1; + newY = 5; + break; + + default: + break; + } + } + + if (newMouseState == -2) { + shape = 6; + newX = 4; + newY = 4; + } + + if ((newMouseState && _mouseState != newMouseState) || (newMouseState && forceUpdate)) { + _mouseState = newMouseState; + _screen->hideMouse(); + _screen->setMouseCursor(newX, newY, _shapes[shape]); + _screen->showMouse(); + } + + if (!newMouseState) { + if (_mouseState != _itemInHand || forceUpdate) { + if (mouse.y > 158 || (mouse.x >= 12 && mouse.x < 308 && mouse.y < 136 && mouse.y >= 12) || forceUpdate) { + _mouseState = _itemInHand; + _screen->hideMouse(); + if (_itemInHand == -1) + _screen->setMouseCursor(1, 1, _shapes[0]); + else + _screen->setMouseCursor(8, 15, _shapes[216+_itemInHand]); + _screen->showMouse(); + } + } + } +} + +bool KyraEngine_LoK::hasClickedOnExit(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::hasClickedOnExit(%d, %d)", xpos, ypos); + if (xpos < 16 || xpos >= 304) + return true; + + if (ypos < 8) + return true; + + if (ypos < 136 || ypos > 155) + return false; + + return true; +} + +void KyraEngine_LoK::clickEventHandler2() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::clickEventHandler2()"); + + Common::Point mouse = getMousePos(); + + _emc->init(&_scriptClick, &_scriptClickData); + _scriptClick.regs[0] = _currentCharacter->sceneId; + _scriptClick.regs[1] = mouse.x; + _scriptClick.regs[2] = mouse.y; + _scriptClick.regs[4] = _itemInHand; + _emc->start(&_scriptClick, 6); + + while (_emc->isValid(&_scriptClick)) + _emc->run(&_scriptClick); +} + +int KyraEngine_LoK::checkForNPCScriptRun(int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::checkForNPCScriptRun(%d, %d)", xpos, ypos); + int returnValue = -1; + const Character *currentChar = _currentCharacter; + int charLeft = 0, charRight = 0, charTop = 0, charBottom = 0; + + int scaleFactor = _scaleTable[currentChar->y1]; + int addX = (((scaleFactor*8)*3)>>8)>>1; + int addY = ((scaleFactor*3)<<4)>>8; + + charLeft = currentChar->x1 - addX; + charRight = currentChar->x1 + addX; + charTop = currentChar->y1 - addY; + charBottom = currentChar->y1; + + if (xpos >= charLeft && charRight >= xpos && charTop <= ypos && charBottom >= ypos) + return 0; + + if (xpos > 304 || xpos < 16) + return -1; + + for (int i = 1; i < 5; ++i) { + currentChar = &_characterList[i]; + + if (currentChar->sceneId != _currentCharacter->sceneId) + continue; + + charLeft = currentChar->x1 - 12; + charRight = currentChar->x1 + 11; + charTop = currentChar->y1 - 48; + // if (!i) + // charBottom = currentChar->y2 - 16; + // else + charBottom = currentChar->y1; + + if (xpos < charLeft || xpos > charRight || ypos < charTop || charBottom < ypos) + continue; + + if (returnValue != -1) { + if (currentChar->y1 >= _characterList[returnValue].y1) + returnValue = i; + } else { + returnValue = i; + } + } + + return returnValue; +} + +void KyraEngine_LoK::runNpcScript(int func) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::runNpcScript(%d)", func); + _emc->init(&_npcScript, &_npcScriptData); + _emc->start(&_npcScript, func); + _npcScript.regs[0] = _currentCharacter->sceneId; + _npcScript.regs[4] = _itemInHand; + _npcScript.regs[5] = func; + + while (_emc->isValid(&_npcScript)) + _emc->run(&_npcScript); +} + +void KyraEngine_LoK::checkAmuletAnimFlags() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::checkSpecialAnimFlags()"); + + if (_brandonStatusBit & 2) { + seq_makeBrandonNormal2(); + _timer->setCountdown(19, 300); + } + + if (_brandonStatusBit & 0x20) { + seq_makeBrandonNormal(); + _timer->setCountdown(19, 300); + } +} + +#pragma mark - + +void KyraEngine_LoK::registerDefaultSettings() { + KyraEngine::registerDefaultSettings(); + + // Most settings already have sensible defaults. This one, however, is + // specific to the Kyra engine. + ConfMan.registerDefault("walkspeed", 2); +} + +void KyraEngine_LoK::readSettings() { + int talkspeed = ConfMan.getInt("talkspeed"); + + // The default talk speed is 60. This should be mapped to "Normal". + + if (talkspeed == 0) + _configTextspeed = 3; // Clickable + if (talkspeed <= 50) + _configTextspeed = 0; // Slow + else if (talkspeed <= 150) + _configTextspeed = 1; // Normal + else + _configTextspeed = 2; // Fast + + KyraEngine::readSettings(); +} + +void KyraEngine_LoK::writeSettings() { + int talkspeed; + + switch (_configTextspeed) { + case 0: // Slow + talkspeed = 1; + break; + case 1: // Normal + talkspeed = 60; + break; + case 2: // Fast + talkspeed = 255; + break; + default: // Clickable + talkspeed = 0; + break; + } + + ConfMan.setInt("talkspeed", talkspeed); + + KyraEngine::writeSettings(); +} + +} // end of namespace Kyra diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h new file mode 100644 index 0000000000..fe742a1da9 --- /dev/null +++ b/engines/kyra/kyra_lok.h @@ -0,0 +1,819 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef KYRA_KYRA_V1_H +#define KYRA_KYRA_V1_H + +#include "kyra/kyra.h" +#include "kyra/script.h" +#include "kyra/screen_lok.h" +#include "kyra/gui_lok.h" + +namespace Kyra { + +class Movie; +class SoundDigital; +class SeqPlayer; +class Sprites; +class Animator_LoK; +class TextDisplayer; +class KyraEngine_LoK; + +struct Character { + uint16 sceneId; + uint8 height; + uint8 facing; + uint16 currentAnimFrame; + uint8 inventoryItems[10]; + int16 x1, y1, x2, y2; +}; + +struct Shape { + uint8 imageIndex; + int8 xOffset, yOffset; + uint8 x, y, w, h; +}; + +struct Room { + uint8 nameIndex; + uint16 northExit; + uint16 eastExit; + uint16 southExit; + uint16 westExit; + uint8 itemsTable[12]; + uint16 itemsXPos[12]; + uint8 itemsYPos[12]; + uint8 needInit[12]; +}; + +struct Item { + uint8 unk1; + uint8 height; + uint8 unk2; + uint8 unk3; +}; + +struct SeqLoop { + const uint8 *ptr; + uint16 count; +}; + +struct SceneExits { + uint16 northXPos; + uint8 northYPos; + uint16 eastXPos; + uint8 eastYPos; + uint16 southXPos; + uint8 southYPos; + uint16 westXPos; + uint8 westYPos; +}; + +struct BeadState { + int16 x; + int16 y; + int16 width; + int16 height; + int16 dstX; + int16 dstY; + int16 width2; + int16 unk8; + int16 unk9; + int16 tableIndex; +}; + +class KyraEngine_LoK : public KyraEngine { + friend class MusicPlayer; + friend class Debugger_LoK; + friend class Animator_LoK; + friend class GUI_LoK; +public: + KyraEngine_LoK(OSystem *system, const GameFlags &flags); + ~KyraEngine_LoK(); + + Screen *screen() { return _screen; } + Animator_LoK *animator() { return _animator; } + virtual Movie *createWSAMovie(); + + uint8 **shapes() { return _shapes; } + Character *currentCharacter() { return _currentCharacter; } + Character *characterList() { return _characterList; } + uint16 brandonStatus() { return _brandonStatusBit; } + + // TODO: remove me with workaround in animator.cpp l209 + uint16 getScene() { return _currentRoom; } + + int _paletteChanged; + int16 _northExitHeight; + + typedef void (KyraEngine_LoK::*IntroProc)(); + + // static data access + const char * const*seqWSATable() { return _seq_WSATable; } + const char * const*seqCPSTable() { return _seq_CPSTable; } + const char * const*seqCOLTable() { return _seq_COLTable; } + const char * const*seqTextsTable() { return _seq_textsTable; } + + const uint8 * const*palTable1() { return &_specialPalettes[0]; } + const uint8 * const*palTable2() { return &_specialPalettes[29]; } + +protected: + virtual int go(); + virtual int init(); + +public: + // sequences + // -> misc + bool seq_skipSequence() const; +protected: + // -> demo + void seq_demo(); + + // -> intro + void seq_intro(); + void seq_introLogos(); + void seq_introStory(); + void seq_introMalcolmTree(); + void seq_introKallakWriting(); + void seq_introKallakMalcolm(); + + // -> ingame animations + void seq_createAmuletJewel(int jewel, int page, int noSound, int drawOnly); + void seq_brandonHealing(); + void seq_brandonHealing2(); + void seq_poisonDeathNow(int now); + void seq_poisonDeathNowAnim(); + void seq_playFluteAnimation(); + void seq_winterScroll1(); + void seq_winterScroll2(); + void seq_makeBrandonInv(); + void seq_makeBrandonNormal(); + void seq_makeBrandonNormal2(); + void seq_makeBrandonWisp(); + void seq_dispelMagicAnimation(); + void seq_fillFlaskWithWater(int item, int type); + void seq_playDrinkPotionAnim(int item, int unk2, int flags); + void seq_brandonToStone(); + + // -> end fight + int seq_playEnd(); + void seq_playEnding(); + + int handleMalcolmFlag(); + int handleBeadState(); + void initBeadState(int x, int y, int x2, int y2, int unk1, BeadState *ptr); + int processBead(int x, int y, int &x2, int &y2, BeadState *ptr); + + // -> credits + void seq_playCredits(); + +public: + // delay + void delayUntil(uint32 timestamp, bool updateGameTimers = false, bool update = false, bool isMainLoop = false); + void delay(uint32 millis, bool update = false, bool isMainLoop = false); + void delayWithTicks(int ticks); + void waitForEvent(); + + // TODO + void registerDefaultSettings(); + void readSettings(); + void writeSettings(); + + void snd_playSoundEffect(int track, int volume=0xFF); + void snd_playWanderScoreViaMap(int command, int restart); + virtual void snd_playVoiceFile(int id); + void snd_voiceWaitForFinish(bool ingame = true); + +protected: + void saveGame(const char *fileName, const char *saveName); + void loadGame(const char *fileName); + +protected: + // input + void processInput(); + int processInputHelper(int xpos, int ypos); + int clickEventHandler(int xpos, int ypos); + void clickEventHandler2(); + void updateMousePointer(bool forceUpdate = false); + bool hasClickedOnExit(int xpos, int ypos); + + bool _skipFlag; + bool skipFlag() const { return _skipFlag; } + void resetSkipFlag(bool removeEvent = true) { _skipFlag = false; } + + // scene + // -> init + void loadSceneMsc(); + void startSceneScript(int brandonAlive); + void setupSceneItems(); + void initSceneData(int facing, int unk1, int brandonAlive); + void initSceneObjectList(int brandonAlive); + void initSceneScreen(int brandonAlive); + void setupSceneResource(int sceneId); + + // -> process + void enterNewScene(int sceneId, int facing, int unk1, int unk2, int brandonAlive); + int handleSceneChange(int xpos, int ypos, int unk1, int frameReset); + int processSceneChange(int *table, int unk1, int frameReset); + int changeScene(int facing); + + // -> modification + void transcendScenes(int roomIndex, int roomName); + void setSceneFile(int roomIndex, int roomName); + + // -> pathfinder + int findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize); + bool lineIsPassable(int x, int y); + + // -> item handling + // --> misc + void addItemToRoom(uint16 sceneId, uint8 item, int itemIndex, int x, int y); + + // --> drop handling + void itemDropDown(int x, int y, int destX, int destY, byte freeItem, int item); + int processItemDrop(uint16 sceneId, uint8 item, int x, int y, int unk1, int unk2); + void dropItem(int unk1, int item, int x, int y, int unk2); + + // --> dropped item handling + int countItemsInScene(uint16 sceneId); + void exchangeItemWithMouseItem(uint16 sceneId, int itemIndex); + byte findFreeItemInScene(int scene); + byte findItemAtPos(int x, int y); + + // --> drop area handling + void addToNoDropRects(int x, int y, int w, int h); + void clearNoDropRects(); + int isDropable(int x, int y); + int checkNoDropRects(int x, int y); + + // --> player items handling + void updatePlayerItemsForScene(); + + // --> item GFX handling + void backUpItemRect0(int xpos, int ypos); + void restoreItemRect0(int xpos, int ypos); + void backUpItemRect1(int xpos, int ypos); + void restoreItemRect1(int xpos, int ypos); + + // items + // -> misc + void placeItemInGenericMapScene(int item, int index); + + // -> mouse item + void createMouseItem(int item); + void destroyMouseItem(); + void setMouseItem(int item); + + // -> graphics effects + void wipeDownMouseItem(int xpos, int ypos); + void itemSpecialFX(int x, int y, int item); + void itemSpecialFX1(int x, int y, int item); + void itemSpecialFX2(int x, int y, int item); + void magicOutMouseItem(int animIndex, int itemPos); + void magicInMouseItem(int animIndex, int item, int itemPos); + void specialMouseItemFX(int shape, int x, int y, int animIndex, int tableIndex, int loopStart, int maxLoops); + void processSpecialMouseItemFX(int shape, int x, int y, int tableValue, int loopStart, int maxLoops); + + // character + // -> movement + void moveCharacterToPos(int character, int facing, int xpos, int ypos); + void setCharacterPositionWithUpdate(int character); + int setCharacterPosition(int character, int *facingTable); + void setCharacterPositionHelper(int character, int *facingTable); + void setCharactersPositions(int character); + + // -> brandon + void setBrandonPoisonFlags(int reset); + void resetBrandonPoisonFlags(); + + // chat + // -> process + void characterSays(int vocFile, const char *chatStr, int8 charNum, int8 chatDuration); + void waitForChatToFinish(int vocFile, int16 chatDuration, const char *str, uint8 charNum); + + // -> initialization + int initCharacterChat(int8 charNum); + void backupChatPartnerAnimFrame(int8 charNum); + void restoreChatPartnerAnimFrame(int8 charNum); + int8 getChatPartnerNum(); + + // -> deinitialization + void endCharacterChat(int8 charNum, int16 arg_4); + + // graphics + // -> misc + int findDuplicateItemShape(int shape); + void updateKyragemFading(); + + // -> interface + void loadMainScreen(int page = 3); + void redrawInventory(int page); +public: + void drawSentenceCommand(const char *sentence, int unk1); + void updateSentenceCommand(const char *str1, const char *str2, int unk1); + void updateTextFade(); + +protected: + // -> amulet + void drawJewelPress(int jewel, int drawSpecial); + void drawJewelsFadeOutStart(); + void drawJewelsFadeOutEnd(int jewel); + + // -> shape handling + void setupShapes123(const Shape *shapeTable, int endShape, int flags); + void freeShapes123(); + + // misc (TODO) + void startup(); + void mainLoop(); + + int checkForNPCScriptRun(int xpos, int ypos); + void runNpcScript(int func); + + void loadMouseShapes(); + void loadCharacterShapes(); + void loadSpecialEffectShapes(); + void loadItems(); + void loadButtonShapes(); + void initMainButtonList(); + void setCharactersInDefaultScene(); + void setupPanPages(); + void freePanPages(); + void closeFinalWsa(); + + //void setTimer19(); + void setupTimers(); + void timerUpdateHeadAnims(int timerNum); + void timerSetFlags1(int timerNum); + void timerSetFlags2(int timerNum); + void timerSetFlags3(int timerNum); + void timerCheckAnimFlag1(int timerNum); + void timerCheckAnimFlag2(int timerNum); + void checkAmuletAnimFlags(); + void timerRedrawAmulet(int timerNum); + void timerFadeText(int timerNum); + void updateAnimFlag1(int timerNum); + void updateAnimFlag2(int timerNum); + void drawAmulet(); + void setTextFadeTimerCountdown(int16 countdown); + void setWalkspeed(uint8 newSpeed); + + int buttonInventoryCallback(Button *caller); + int buttonAmuletCallback(Button *caller); + + bool _skipIntroFlag; + bool _abortIntroFlag; + bool _menuDirectlyToLoad; + bool _abortWalkFlag; + bool _abortWalkFlag2; + bool _mousePressFlag; + uint8 *_itemBkgBackUp[2]; + uint8 *_shapes[373]; + int8 _itemInHand; + int _mouseState; + bool _handleInput; + bool _changedScene; + int _unkScreenVar1, _unkScreenVar2, _unkScreenVar3; + int _beadStateVar; + int _unkAmuletVar; + + int _malcolmFlag; + int _endSequenceSkipFlag; + int _endSequenceNeedLoading; + int _unkEndSeqVar2; + uint8 *_endSequenceBackUpRect; + int _unkEndSeqVar4; + int _unkEndSeqVar5; + int _lastDisplayedPanPage; + uint8 *_panPagesTable[20]; + Movie *_finalA, *_finalB, *_finalC; + + Movie *_movieObjects[10]; + + uint16 _entranceMouseCursorTracks[8]; + uint16 _walkBlockNorth; + uint16 _walkBlockEast; + uint16 _walkBlockSouth; + uint16 _walkBlockWest; + + int32 _scaleMode; + int16 _scaleTable[145]; + + Rect _noDropRects[11]; + + int8 _birthstoneGemTable[4]; + int8 _idolGemsTable[3]; + + int8 _marbleVaseItem; + int8 _foyerItemTable[3]; + + int8 _cauldronState; + int8 _crystalState[2]; + + uint16 _brandonStatusBit; + uint8 _brandonStatusBit0x02Flag; + uint8 _brandonStatusBit0x20Flag; + uint8 _brandonPoisonFlagsGFX[256]; + uint8 _deathHandler; + int16 _brandonInvFlag; + uint8 _poisonDeathCounter; + int _brandonPosX; + int _brandonPosY; + + uint16 _currentChatPartnerBackupFrame; + uint16 _currentCharAnimFrame; + + int8 *_sceneAnimTable[50]; + + Item _itemTable[145]; + int _lastProcessedItem; + int _lastProcessedItemHeight; + + int16 *_exitListPtr; + int16 _exitList[11]; + SceneExits _sceneExits; + uint16 _currentRoom; + int _scenePhasingFlag; + + int _sceneChangeState; + int _loopFlag2; + + int _pathfinderFlag; + int _pathfinderFlag2; + int _lastFindWayRet; + int *_movFacingTable; + + int8 _talkingCharNum; + int8 _charSayUnk2; + int8 _charSayUnk3; + int8 _currHeadShape; + uint8 _currSentenceColor[3]; + int8 _startSentencePalIndex; + bool _fadeText; + + uint8 _configTextspeed; + + Animator_LoK *_animator; + SeqPlayer *_seq; + Sprites *_sprites; + Screen_LoK *_screen; + + EMCState _scriptMain; + + EMCState _npcScript; + EMCData _npcScriptData; + + EMCState _scriptClick; + EMCData _scriptClickData; + + Character *_characterList; + Character *_currentCharacter; + + Button *_buttonList; + GUI_LoK *_gui; + + struct KyragemState { + uint16 nextOperation; + uint16 rOffset; + uint16 gOffset; + uint16 bOffset; + uint32 timerCount; + } _kyragemFadingState; + + static const int8 _dosTrackMap[]; + static const int _dosTrackMapSize; + + // TODO: get rid of all variables having pointers to the static resources if possible + // i.e. let them directly use the _staticres functions + void initStaticResource(); + + const uint8 *_seq_Forest; + const uint8 *_seq_KallakWriting; + const uint8 *_seq_KyrandiaLogo; + const uint8 *_seq_KallakMalcolm; + const uint8 *_seq_MalcolmTree; + const uint8 *_seq_WestwoodLogo; + const uint8 *_seq_Demo1; + const uint8 *_seq_Demo2; + const uint8 *_seq_Demo3; + const uint8 *_seq_Demo4; + const uint8 *_seq_Reunion; + + const char * const*_seq_WSATable; + const char * const*_seq_CPSTable; + const char * const*_seq_COLTable; + const char * const*_seq_textsTable; + + int _seq_WSATable_Size; + int _seq_CPSTable_Size; + int _seq_COLTable_Size; + int _seq_textsTable_Size; + + const char * const*_itemList; + const char * const*_takenList; + const char * const*_placedList; + const char * const*_droppedList; + const char * const*_noDropList; + const char * const*_putDownFirst; + const char * const*_waitForAmulet; + const char * const*_blackJewel; + const char * const*_poisonGone; + const char * const*_healingTip; + const char * const*_thePoison; + const char * const*_fluteString; + const char * const*_wispJewelStrings; + const char * const*_magicJewelString; + const char * const*_flaskFull; + const char * const*_fullFlask; + const char * const*_veryClever; + const char * const*_homeString; + const char * const*_newGameString; + + int _itemList_Size; + int _takenList_Size; + int _placedList_Size; + int _droppedList_Size; + int _noDropList_Size; + int _putDownFirst_Size; + int _waitForAmulet_Size; + int _blackJewel_Size; + int _poisonGone_Size; + int _healingTip_Size; + int _thePoison_Size; + int _fluteString_Size; + int _wispJewelStrings_Size; + int _magicJewelString_Size; + int _flaskFull_Size; + int _fullFlask_Size; + int _veryClever_Size; + int _homeString_Size; + int _newGameString_Size; + + const char * const*_characterImageTable; + int _characterImageTableSize; + + const char * const*_guiStrings; + int _guiStringsSize; + + const char * const*_configStrings; + int _configStringsSize; + + Shape *_defaultShapeTable; + int _defaultShapeTableSize; + + const Shape *_healingShapeTable; + int _healingShapeTableSize; + const Shape *_healingShape2Table; + int _healingShape2TableSize; + + const Shape *_posionDeathShapeTable; + int _posionDeathShapeTableSize; + + const Shape *_fluteAnimShapeTable; + int _fluteAnimShapeTableSize; + + const Shape *_winterScrollTable; + int _winterScrollTableSize; + const Shape *_winterScroll1Table; + int _winterScroll1TableSize; + const Shape *_winterScroll2Table; + int _winterScroll2TableSize; + + const Shape *_drinkAnimationTable; + int _drinkAnimationTableSize; + + const Shape *_brandonToWispTable; + int _brandonToWispTableSize; + + const Shape *_magicAnimationTable; + int _magicAnimationTableSize; + + const Shape *_brandonStoneTable; + int _brandonStoneTableSize; + + Room *_roomTable; + int _roomTableSize; + const char * const*_roomFilenameTable; + int _roomFilenameTableSize; + + const uint8 *_amuleteAnim; + + const uint8 * const*_specialPalettes; + + const char *const *_soundFiles; + int _soundFilesSize; + const char *const *_soundFilesIntro; + int _soundFilesIntroSize; + const int32 *_cdaTrackTable; + int _cdaTrackTableSize; + const AudioDataStruct * _soundData; + + static const int8 _charXPosTable[]; + static const int8 _charYPosTable[]; + + // positions of the inventory + static const uint16 _itemPosX[]; + static const uint8 _itemPosY[]; + + void setupButtonData(); + Button *_buttonData; + Button **_buttonDataListPtr; + + static const uint8 _magicMouseItemStartFrame[]; + static const uint8 _magicMouseItemEndFrame[]; + static const uint8 _magicMouseItemStartFrame2[]; + static const uint8 _magicMouseItemEndFrame2[]; + + static const uint16 _amuletX[]; + static const uint16 _amuletY[]; + static const uint16 _amuletX2[]; + static const uint16 _amuletY2[]; +protected: + void setupOpcodeTable(); + + // Opcodes + int o1_magicInMouseItem(EMCState *script); + int o1_characterSays(EMCState *script); + int o1_pauseTicks(EMCState *script); + int o1_drawSceneAnimShape(EMCState *script); + int o1_queryGameFlag(EMCState *script); + int o1_setGameFlag(EMCState *script); + int o1_resetGameFlag(EMCState *script); + int o1_runNPCScript(EMCState *script); + int o1_setSpecialExitList(EMCState *script); + int o1_blockInWalkableRegion(EMCState *script); + int o1_blockOutWalkableRegion(EMCState *script); + int o1_walkPlayerToPoint(EMCState *script); + int o1_dropItemInScene(EMCState *script); + int o1_drawAnimShapeIntoScene(EMCState *script); + int o1_createMouseItem(EMCState *script); + int o1_savePageToDisk(EMCState *script); + int o1_sceneAnimOn(EMCState *script); + int o1_sceneAnimOff(EMCState *script); + int o1_getElapsedSeconds(EMCState *script); + int o1_mouseIsPointer(EMCState *script); + int o1_destroyMouseItem(EMCState *script); + int o1_runSceneAnimUntilDone(EMCState *script); + int o1_fadeSpecialPalette(EMCState *script); + int o1_playAdlibSound(EMCState *script); + int o1_playAdlibScore(EMCState *script); + int o1_phaseInSameScene(EMCState *script); + int o1_setScenePhasingFlag(EMCState *script); + int o1_resetScenePhasingFlag(EMCState *script); + int o1_queryScenePhasingFlag(EMCState *script); + int o1_sceneToDirection(EMCState *script); + int o1_setBirthstoneGem(EMCState *script); + int o1_placeItemInGenericMapScene(EMCState *script); + int o1_setBrandonStatusBit(EMCState *script); + int o1_pauseSeconds(EMCState *script); + int o1_getCharactersLocation(EMCState *script); + int o1_runNPCSubscript(EMCState *script); + int o1_magicOutMouseItem(EMCState *script); + int o1_internalAnimOn(EMCState *script); + int o1_forceBrandonToNormal(EMCState *script); + int o1_poisonDeathNow(EMCState *script); + int o1_setScaleMode(EMCState *script); + int o1_openWSAFile(EMCState *script); + int o1_closeWSAFile(EMCState *script); + int o1_runWSAFromBeginningToEnd(EMCState *script); + int o1_displayWSAFrame(EMCState *script); + int o1_enterNewScene(EMCState *script); + int o1_setSpecialEnterXAndY(EMCState *script); + int o1_runWSAFrames(EMCState *script); + int o1_popBrandonIntoScene(EMCState *script); + int o1_restoreAllObjectBackgrounds(EMCState *script); + int o1_setCustomPaletteRange(EMCState *script); + int o1_loadPageFromDisk(EMCState *script); + int o1_customPrintTalkString(EMCState *script); + int o1_restoreCustomPrintBackground(EMCState *script); + int o1_hideMouse(EMCState *script); + int o1_showMouse(EMCState *script); + int o1_getCharacterX(EMCState *script); + int o1_getCharacterY(EMCState *script); + int o1_changeCharactersFacing(EMCState *script); + int o1_copyWSARegion(EMCState *script); + int o1_printText(EMCState *script); + int o1_random(EMCState *script); + int o1_loadSoundFile(EMCState *script); + int o1_displayWSAFrameOnHidPage(EMCState *script); + int o1_displayWSASequentialFrames(EMCState *script); + int o1_drawCharacterStanding(EMCState *script); + int o1_internalAnimOff(EMCState *script); + int o1_changeCharactersXAndY(EMCState *script); + int o1_clearSceneAnimatorBeacon(EMCState *script); + int o1_querySceneAnimatorBeacon(EMCState *script); + int o1_refreshSceneAnimator(EMCState *script); + int o1_placeItemInOffScene(EMCState *script); + int o1_wipeDownMouseItem(EMCState *script); + int o1_placeCharacterInOtherScene(EMCState *script); + int o1_getKey(EMCState *script); + int o1_specificItemInInventory(EMCState *script); + int o1_popMobileNPCIntoScene(EMCState *script); + int o1_mobileCharacterInScene(EMCState *script); + int o1_hideMobileCharacter(EMCState *script); + int o1_unhideMobileCharacter(EMCState *script); + int o1_setCharactersLocation(EMCState *script); + int o1_walkCharacterToPoint(EMCState *script); + int o1_specialEventDisplayBrynnsNote(EMCState *script); + int o1_specialEventRemoveBrynnsNote(EMCState *script); + int o1_setLogicPage(EMCState *script); + int o1_fatPrint(EMCState *script); + int o1_preserveAllObjectBackgrounds(EMCState *script); + int o1_updateSceneAnimations(EMCState *script); + int o1_sceneAnimationActive(EMCState *script); + int o1_setCharactersMovementDelay(EMCState *script); + int o1_getCharactersFacing(EMCState *script); + int o1_bkgdScrollSceneAndMasksRight(EMCState *script); + int o1_dispelMagicAnimation(EMCState *script); + int o1_findBrightestFireberry(EMCState *script); + int o1_setFireberryGlowPalette(EMCState *script); + int o1_setDeathHandlerFlag(EMCState *script); + int o1_drinkPotionAnimation(EMCState *script); + int o1_makeAmuletAppear(EMCState *script); + int o1_drawItemShapeIntoScene(EMCState *script); + int o1_setCharactersCurrentFrame(EMCState *script); + int o1_waitForConfirmationMouseClick(EMCState *script); + int o1_pageFlip(EMCState *script); + int o1_setSceneFile(EMCState *script); + int o1_getItemInMarbleVase(EMCState *script); + int o1_setItemInMarbleVase(EMCState *script); + int o1_addItemToInventory(EMCState *script); + int o1_intPrint(EMCState *script); + int o1_shakeScreen(EMCState *script); + int o1_createAmuletJewel(EMCState *script); + int o1_setSceneAnimCurrXY(EMCState *script); + int o1_poisonBrandonAndRemaps(EMCState *script); + int o1_fillFlaskWithWater(EMCState *script); + int o1_getCharactersMovementDelay(EMCState *script); + int o1_getBirthstoneGem(EMCState *script); + int o1_queryBrandonStatusBit(EMCState *script); + int o1_playFluteAnimation(EMCState *script); + int o1_playWinterScrollSequence(EMCState *script); + int o1_getIdolGem(EMCState *script); + int o1_setIdolGem(EMCState *script); + int o1_totalItemsInScene(EMCState *script); + int o1_restoreBrandonsMovementDelay(EMCState *script); + int o1_setMousePos(EMCState *script); + int o1_getMouseState(EMCState *script); + int o1_setEntranceMouseCursorTrack(EMCState *script); + int o1_itemAppearsOnGround(EMCState *script); + int o1_setNoDrawShapesFlag(EMCState *script); + int o1_fadeEntirePalette(EMCState *script); + int o1_itemOnGroundHere(EMCState *script); + int o1_queryCauldronState(EMCState *script); + int o1_setCauldronState(EMCState *script); + int o1_queryCrystalState(EMCState *script); + int o1_setCrystalState(EMCState *script); + int o1_setPaletteRange(EMCState *script); + int o1_shrinkBrandonDown(EMCState *script); + int o1_growBrandonUp(EMCState *script); + int o1_setBrandonScaleXAndY(EMCState *script); + int o1_resetScaleMode(EMCState *script); + int o1_getScaleDepthTableValue(EMCState *script); + int o1_setScaleDepthTableValue(EMCState *script); + int o1_message(EMCState *script); + int o1_checkClickOnNPC(EMCState *script); + int o1_getFoyerItem(EMCState *script); + int o1_setFoyerItem(EMCState *script); + int o1_setNoItemDropRegion(EMCState *script); + int o1_walkMalcolmOn(EMCState *script); + int o1_passiveProtection(EMCState *script); + int o1_setPlayingLoop(EMCState *script); + int o1_brandonToStoneSequence(EMCState *script); + int o1_brandonHealingSequence(EMCState *script); + int o1_protectCommandLine(EMCState *script); + int o1_pauseMusicSeconds(EMCState *script); + int o1_resetMaskRegion(EMCState *script); + int o1_setPaletteChangeFlag(EMCState *script); + int o1_fillRect(EMCState *script); + int o1_dummy(EMCState *script); + int o1_vocUnload(EMCState *script); + int o1_vocLoad(EMCState *script); +}; + +} // end of namespace Kyra + +#endif + diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 2168000dc9..6eca24fe98 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -325,7 +325,7 @@ int KyraEngine_MR::go() { } void KyraEngine_MR::initMainMenu() { - _menuAnim = new WSAMovieV2(this, _screen); + _menuAnim = new WSAMovie_v2(this, _screen); _menuAnim->open("REVENGE.WSA", 1, _screen->getPalette(0)); _menuAnim->setX(0); _menuAnim->setY(0); @@ -550,11 +550,11 @@ void KyraEngine_MR::initMouseShapes() { void KyraEngine_MR::startup() { debugC(9, kDebugLevelMain, "KyraEngine_MR::startup()"); - _album.wsa = new WSAMovieV2(this, _screen); + _album.wsa = new WSAMovie_v2(this, _screen); assert(_album.wsa); - _album.leftPage.wsa = new WSAMovieV2(this, _screen); + _album.leftPage.wsa = new WSAMovie_v2(this, _screen); assert(_album.leftPage.wsa); - _album.rightPage.wsa = new WSAMovieV2(this, _screen); + _album.rightPage.wsa = new WSAMovie_v2(this, _screen); assert(_album.rightPage.wsa); musicUpdate(0); @@ -607,7 +607,7 @@ void KyraEngine_MR::startup() { for (int i = 0; i < 16; ++i) { _sceneAnims[i].flags = 0; - _sceneAnimMovie[i] = new WSAMovieV2(this, _screen); + _sceneAnimMovie[i] = new WSAMovie_v2(this, _screen); assert(_sceneAnimMovie[i]); } @@ -664,7 +664,7 @@ void KyraEngine_MR::startup() { musicUpdate(0); runStartupScript(1, 0); _res->exists("MOODOMTR.WSA", true); - _invWsa = new WSAMovieV2(this, _screen); + _invWsa = new WSAMovie_v2(this, _screen); assert(_invWsa); _invWsa->open("MOODOMTR.WSA", 1, 0); _invWsaFrame = 6; diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index a50fbfd440..4e28d6a5c0 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -39,7 +39,7 @@ namespace Kyra { class SoundDigital; class Screen_MR; class MainMenu; -class WSAMovieV2; +class WSAMovie_v2; class TextDisplayer_MR; struct Button; @@ -157,7 +157,7 @@ private: void initMainMenu(); void uninitMainMenu(); - WSAMovieV2 *_menuAnim; + WSAMovie_v2 *_menuAnim; // timer void setupTimers(); @@ -262,7 +262,7 @@ private: void clearInventorySlot(int slot, int page); void drawInventorySlot(int page, int item, int slot); - WSAMovieV2 *_invWsa; + WSAMovie_v2 *_invWsa; int _invWsaFrame; // localization @@ -535,11 +535,11 @@ private: struct Album { uint8 *backUpPage; uint8 *file; - WSAMovieV2 *wsa; + WSAMovie_v2 *wsa; uint8 *backUpRect; struct PageMovie { - WSAMovieV2 *wsa; + WSAMovie_v2 *wsa; int curFrame; int maxFrame; uint32 timer; diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp deleted file mode 100644 index 2504719ef5..0000000000 --- a/engines/kyra/kyra_v1.cpp +++ /dev/null @@ -1,1044 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "kyra/kyra_v1.h" - -#include "common/file.h" -#include "common/events.h" -#include "common/system.h" -#include "common/savefile.h" - -#include "gui/message.h" - -#include "kyra/resource.h" -#include "kyra/screen.h" -#include "kyra/script.h" -#include "kyra/seqplayer.h" -#include "kyra/sound.h" -#include "kyra/sprites.h" -#include "kyra/wsamovie.h" -#include "kyra/animator_v1.h" -#include "kyra/text.h" -#include "kyra/debugger.h" -#include "kyra/timer.h" - -namespace Kyra { - -KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags) - : KyraEngine(system, flags) { - _skipFlag = false; - - _seq_Forest = _seq_KallakWriting = _seq_KyrandiaLogo = _seq_KallakMalcolm = - _seq_MalcolmTree = _seq_WestwoodLogo = _seq_Demo1 = _seq_Demo2 = _seq_Demo3 = - _seq_Demo4 = 0; - - _seq_WSATable = _seq_CPSTable = _seq_COLTable = _seq_textsTable = 0; - _seq_WSATable_Size = _seq_CPSTable_Size = _seq_COLTable_Size = _seq_textsTable_Size = 0; - - _roomFilenameTable = _characterImageTable = 0; - _roomFilenameTableSize = _characterImageTableSize = 0; - _itemList = _takenList = _placedList = _droppedList = _noDropList = 0; - _itemList_Size = _takenList_Size = _placedList_Size = _droppedList_Size = _noDropList_Size = 0; - _putDownFirst = _waitForAmulet = _blackJewel = _poisonGone = _healingTip = 0; - _putDownFirst_Size = _waitForAmulet_Size = _blackJewel_Size = _poisonGone_Size = _healingTip_Size = 0; - _thePoison = _fluteString = _wispJewelStrings = _magicJewelString = _flaskFull = _fullFlask = 0; - _thePoison_Size = _fluteString_Size = _wispJewelStrings_Size = 0; - _magicJewelString_Size = _flaskFull_Size = _fullFlask_Size = 0; - - _defaultShapeTable = 0; - _healingShapeTable = _healingShape2Table = 0; - _defaultShapeTableSize = _healingShapeTableSize = _healingShape2TableSize = 0; - _posionDeathShapeTable = _fluteAnimShapeTable = 0; - _posionDeathShapeTableSize = _fluteAnimShapeTableSize = 0; - _winterScrollTable = _winterScroll1Table = _winterScroll2Table = 0; - _winterScrollTableSize = _winterScroll1TableSize = _winterScroll2TableSize = 0; - _drinkAnimationTable = _brandonToWispTable = _magicAnimationTable = _brandonStoneTable = 0; - _drinkAnimationTableSize = _brandonToWispTableSize = _magicAnimationTableSize = _brandonStoneTableSize = 0; - memset(&_specialPalettes, 0, sizeof(_specialPalettes)); - _sprites = 0; - _animator = 0; - _seq = 0; - _characterList = 0; - _movFacingTable = 0; - _buttonData = 0; - _buttonDataListPtr = 0; - memset(_shapes, 0, sizeof(_shapes)); - memset(_movieObjects, 0, sizeof(_movieObjects)); - _finalA = _finalB = _finalC = 0; - _endSequenceBackUpRect = 0; - memset(_panPagesTable, 0, sizeof(_panPagesTable)); - memset(_sceneAnimTable, 0, sizeof(_sceneAnimTable)); - _currHeadShape = 0; - - memset(&_itemBkgBackUp, 0, sizeof(_itemBkgBackUp)); -} - -KyraEngine_v1::~KyraEngine_v1() { - for (int i = 0; i < ARRAYSIZE(_movieObjects); ++i) { - if (_movieObjects[i]) - _movieObjects[i]->close(); - delete _movieObjects[i]; - _movieObjects[i] = 0; - } - - closeFinalWsa(); - if (_emc) { - _emc->unload(&_npcScriptData); - _emc->unload(&_scriptClickData); - } - - Common::clearAllSpecialDebugLevels(); - - delete _screen; - delete _sprites; - delete _animator; - delete _seq; - - delete[] _characterList; - - delete[] _movFacingTable; - - delete[] _gui->_scrollUpButton.data0ShapePtr; - delete[] _gui->_scrollUpButton.data1ShapePtr; - delete[] _gui->_scrollUpButton.data2ShapePtr; - delete[] _gui->_scrollDownButton.data0ShapePtr; - delete[] _gui->_scrollDownButton.data1ShapePtr; - delete[] _gui->_scrollDownButton.data2ShapePtr; - - delete[] _buttonData; - delete[] _buttonDataListPtr; - - delete _gui; - - delete[] _itemBkgBackUp[0]; - delete[] _itemBkgBackUp[1]; - - for (int i = 0; i < ARRAYSIZE(_shapes); ++i) { - if (_shapes[i] != 0) { - delete[] _shapes[i]; - for (int i2 = 0; i2 < ARRAYSIZE(_shapes); i2++) { - if (_shapes[i2] == _shapes[i] && i2 != i) { - _shapes[i2] = 0; - } - } - _shapes[i] = 0; - } - } - - for (int i = 0; i < ARRAYSIZE(_sceneAnimTable); ++i) - delete[] _sceneAnimTable[i]; -} - -int KyraEngine_v1::init() { - _screen = new Screen_v1(this, _system); - assert(_screen); - _screen->setResolution(); - - KyraEngine::init(); - - _sprites = new Sprites(this, _system); - assert(_sprites); - _seq = new SeqPlayer(this, _system); - assert(_seq); - _animator = new Animator_v1(this, _system); - assert(_animator); - _animator->init(5, 11, 12); - assert(*_animator); - _text = new TextDisplayer(this, screen()); - assert(_text); - _gui = new GUI_v1(this, _screen); - assert(_gui); - - initStaticResource(); - - _sound->setSoundList(&_soundData[kMusicIntro]); - - _trackMap = _dosTrackMap; - _trackMapSize = _dosTrackMapSize; - - if (!_sound->init()) - error("Couldn't init sound"); - - _sound->loadSoundFile(0); - - setupButtonData(); - - _paletteChanged = 1; - _currentCharacter = 0; - _characterList = new Character[11]; - assert(_characterList); - memset(_characterList, 0, sizeof(Character)*11); - - for (int i = 0; i < 11; ++i) - memset(_characterList[i].inventoryItems, 0xFF, sizeof(_characterList[i].inventoryItems)); - - _characterList[0].sceneId = 5; - _characterList[0].height = 48; - _characterList[0].facing = 3; - _characterList[0].currentAnimFrame = 7; - - memset(&_npcScriptData, 0, sizeof(EMCData)); - memset(&_scriptClickData, 0, sizeof(EMCData)); - - memset(&_npcScript, 0, sizeof(EMCState)); - memset(&_scriptMain, 0, sizeof(EMCState)); - memset(&_scriptClick, 0, sizeof(EMCState)); - - _debugger = new Debugger_v1(this); - assert(_debugger); - memset(_shapes, 0, sizeof(_shapes)); - - for (int i = 0; i < ARRAYSIZE(_movieObjects); ++i) - _movieObjects[i] = createWSAMovie(); - - memset(_flagsTable, 0, sizeof(_flagsTable)); - - _abortWalkFlag = false; - _abortWalkFlag2 = false; - _talkingCharNum = -1; - _charSayUnk3 = -1; - memset(_currSentenceColor, 0, 3); - _startSentencePalIndex = -1; - _fadeText = false; - - _cauldronState = 0; - _crystalState[0] = _crystalState[1] = -1; - - _brandonStatusBit = 0; - _brandonStatusBit0x02Flag = _brandonStatusBit0x20Flag = 10; - _brandonPosX = _brandonPosY = -1; - _deathHandler = 0xFF; - _poisonDeathCounter = 0; - - memset(_itemTable, 0, sizeof(_itemTable)); - memset(_exitList, 0xFFFF, sizeof(_exitList)); - _exitListPtr = 0; - _pathfinderFlag = _pathfinderFlag2 = 0; - _lastFindWayRet = 0; - _sceneChangeState = _loopFlag2 = 0; - - _movFacingTable = new int[150]; - assert(_movFacingTable); - _movFacingTable[0] = 8; - - _skipFlag = false; - - _marbleVaseItem = -1; - memset(_foyerItemTable, -1, sizeof(_foyerItemTable)); - _mouseState = _itemInHand = -1; - _handleInput = false; - - _currentRoom = 0xFFFF; - _scenePhasingFlag = 0; - _lastProcessedItem = 0; - _lastProcessedItemHeight = 16; - - _unkScreenVar1 = 1; - _unkScreenVar2 = 0; - _unkScreenVar3 = 0; - _unkAmuletVar = 0; - - _endSequenceNeedLoading = 1; - _malcolmFlag = 0; - _beadStateVar = 0; - _endSequenceSkipFlag = 0; - _unkEndSeqVar2 = 0; - _endSequenceBackUpRect = 0; - _unkEndSeqVar4 = 0; - _unkEndSeqVar5 = 0; - _lastDisplayedPanPage = 0; - memset(_panPagesTable, 0, sizeof(_panPagesTable)); - _finalA = _finalB = _finalC = 0; - memset(&_kyragemFadingState, 0, sizeof(_kyragemFadingState)); - _kyragemFadingState.gOffset = 0x13; - _kyragemFadingState.bOffset = 0x13; - - _mousePressFlag = false; - - _menuDirectlyToLoad = false; - - _lastMusicCommand = 0; - - return 0; -} - -int KyraEngine_v1::go() { - if (_res->getFileSize("6.FNT")) - _screen->loadFont(Screen::FID_6_FNT, "6.FNT"); - _screen->loadFont(Screen::FID_8_FNT, "8FAT.FNT"); - _screen->setScreenDim(0); - - _abortIntroFlag = false; - - if (_flags.isDemo) { - seq_demo(); - } else { - setGameFlag(0xF3); - setGameFlag(0xFD); - if (_gameToLoad == -1) { - setGameFlag(0xEF); - seq_intro(); - if (_quitFlag) - return 0; - if (_skipIntroFlag && _abortIntroFlag) - resetGameFlag(0xEF); - } - startup(); - resetGameFlag(0xEF); - mainLoop(); - } - return 0; -} - - -void KyraEngine_v1::startup() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::startup()"); - static const uint8 colorMap[] = { 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0 }; - _screen->setTextColorMap(colorMap); - _sound->setSoundList(&_soundData[kMusicIngame]); - _sound->loadSoundFile(0); -// _screen->setFont(Screen::FID_6_FNT); - _screen->setAnimBlockPtr(3750); - memset(_sceneAnimTable, 0, sizeof(_sceneAnimTable)); - loadMouseShapes(); - _currentCharacter = &_characterList[0]; - for (int i = 1; i < 5; ++i) - _animator->setCharacterDefaultFrame(i); - for (int i = 5; i <= 10; ++i) - setCharactersPositions(i); - _animator->setCharactersHeight(); - resetBrandonPoisonFlags(); - _screen->_curPage = 0; - // XXX - for (int i = 0; i < 12; ++i) { - int size = _screen->getRectSize(3, 24); - _shapes[361+i] = new byte[size]; - } - - _itemBkgBackUp[0] = new uint8[_screen->getRectSize(3, 24)]; - memset(_itemBkgBackUp[0], 0, _screen->getRectSize(3, 24)); - _itemBkgBackUp[1] = new uint8[_screen->getRectSize(4, 32)]; - memset(_itemBkgBackUp[1], 0, _screen->getRectSize(4, 32)); - - for (int i = 0; i < _roomTableSize; ++i) { - for (int item = 0; item < 12; ++item) { - _roomTable[i].itemsTable[item] = 0xFF; - _roomTable[i].itemsXPos[item] = 0xFFFF; - _roomTable[i].itemsYPos[item] = 0xFF; - _roomTable[i].needInit[item] = 0; - } - } - - loadCharacterShapes(); - loadSpecialEffectShapes(); - loadItems(); - loadButtonShapes(); - initMainButtonList(); - loadMainScreen(); - _screen->loadPalette("PALETTE.COL", _screen->_currentPalette); - - // XXX - _animator->initAnimStateList(); - setCharactersInDefaultScene(); - - if (!_emc->load("_STARTUP.EMC", &_npcScriptData, &_opcodes)) - error("Could not load \"_STARTUP.EMC\" script"); - _emc->init(&_scriptMain, &_npcScriptData); - - if (!_emc->start(&_scriptMain, 0)) - error("Could not start script function 0 of script \"_STARTUP.EMC\""); - - while (_emc->isValid(&_scriptMain)) - _emc->run(&_scriptMain); - - _emc->unload(&_npcScriptData); - - if (!_emc->load("_NPC.EMC", &_npcScriptData, &_opcodes)) - error("Could not load \"_NPC.EMC\" script"); - - snd_playTheme(1, -1); - if (_gameToLoad == -1) { - enterNewScene(_currentCharacter->sceneId, _currentCharacter->facing, 0, 0, 1); - if (_abortIntroFlag && _skipIntroFlag) { - _menuDirectlyToLoad = true; - _screen->setMouseCursor(1, 1, _shapes[0]); - _screen->showMouse(); - _gui->buttonMenuCallback(0); - _menuDirectlyToLoad = false; - } else - saveGame(getSavegameFilename(0), "New game"); - } else { - _screen->setFont(Screen::FID_8_FNT); - loadGame(getSavegameFilename(_gameToLoad)); - _gameToLoad = -1; - } -} - -void KyraEngine_v1::mainLoop() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::mainLoop()"); - - while (!_quitFlag) { - int32 frameTime = (int32)_system->getMillis(); - _skipFlag = false; - - if (_currentCharacter->sceneId == 210) { - updateKyragemFading(); - if (seq_playEnd() && _deathHandler != 8) - break; - } - - if (_deathHandler != 0xFF) { - snd_playWanderScoreViaMap(0, 1); - snd_playSoundEffect(49); - _screen->hideMouse(); - _screen->setMouseCursor(1, 1, _shapes[0]); - destroyMouseItem(); - _screen->showMouse(); - _gui->buttonMenuCallback(0); - _deathHandler = 0xFF; - } - - if ((_brandonStatusBit & 2) && _brandonStatusBit0x02Flag) - _animator->animRefreshNPC(0); - - if ((_brandonStatusBit & 0x20) && _brandonStatusBit0x20Flag) { - _animator->animRefreshNPC(0); - _brandonStatusBit0x20Flag = 0; - } - - _screen->showMouse(); - - _gui->processButtonList(_buttonList, 0, 0); - updateMousePointer(); - _timer->update(); - updateTextFade(); - - _handleInput = true; - delay((frameTime + _gameSpeed) - _system->getMillis(), true, true); - _handleInput = false; - - _sound->process(); - } -} - -void KyraEngine_v1::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) { - while (_system->getMillis() < timestamp && !_quitFlag) { - if (updateTimers) - _timer->update(); - - if (timestamp - _system->getMillis() >= 10) - delay(10, update, isMainLoop); - } -} - -void KyraEngine_v1::delay(uint32 amount, bool update, bool isMainLoop) { - Common::Event event; - - uint32 start = _system->getMillis(); - do { - while (_eventMan->pollEvent(event)) { - switch (event.type) { - case Common::EVENT_KEYDOWN: - if (event.kbd.keycode >= '1' && event.kbd.keycode <= '9' && - (event.kbd.flags == Common::KBD_CTRL || event.kbd.flags == Common::KBD_ALT) && isMainLoop) { - const char *saveLoadSlot = getSavegameFilename(9 - (event.kbd.keycode - '0') + 990); - - if (event.kbd.flags == Common::KBD_CTRL) - loadGame(saveLoadSlot); - else { - char savegameName[14]; - sprintf(savegameName, "Quicksave %d", event.kbd.keycode - '0'); - saveGame(saveLoadSlot, savegameName); - } - } else if (event.kbd.flags == Common::KBD_CTRL) { - if (event.kbd.keycode == 'd') - _debugger->attach(); - else if (event.kbd.keycode == 'q') - _quitFlag = true; - } else if (event.kbd.keycode == '.') { - _skipFlag = true; - } else if (event.kbd.keycode == Common::KEYCODE_RETURN || event.kbd.keycode == Common::KEYCODE_SPACE || event.kbd.keycode == Common::KEYCODE_ESCAPE) { - _abortIntroFlag = true; - _skipFlag = true; - } - - break; - case Common::EVENT_MOUSEMOVE: - _animator->_updateScreen = true; - break; - case Common::EVENT_QUIT: - quitGame(); - break; - case Common::EVENT_LBUTTONDOWN: - _mousePressFlag = true; - break; - case Common::EVENT_LBUTTONUP: - _mousePressFlag = false; - - if (_abortWalkFlag2) - _abortWalkFlag = true; - - if (_handleInput) { - _handleInput = false; - processInput(); - _handleInput = true; - } else - _skipFlag = true; - - break; - default: - break; - } - } - - if (_debugger->isAttached()) - _debugger->onFrame(); - - if (update) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - updateTextFade(); - updateMousePointer(); - } - - if (_currentCharacter && _currentCharacter->sceneId == 210 && update) - updateKyragemFading(); - - if (_skipFlag && !_abortIntroFlag && !queryGameFlag(0xFE)) - _skipFlag = false; - - if (amount > 0 && !_skipFlag && !_quitFlag) - _system->delayMillis(10); - - if (_skipFlag) - _sound->voiceStop(); - } while (!_skipFlag && _system->getMillis() < start + amount && !_quitFlag); -} - -void KyraEngine_v1::waitForEvent() { - bool finished = false; - Common::Event event; - - while (!finished && !_quitFlag) { - while (_eventMan->pollEvent(event)) { - switch (event.type) { - case Common::EVENT_KEYDOWN: - finished = true; - break; - case Common::EVENT_QUIT: - quitGame(); - break; - case Common::EVENT_LBUTTONDOWN: - finished = true; - _skipFlag = true; - break; - default: - break; - } - } - - if (_debugger->isAttached()) - _debugger->onFrame(); - - _system->delayMillis(10); - } -} - -void KyraEngine_v1::delayWithTicks(int ticks) { - uint32 nextTime = _system->getMillis() + ticks * _tickLength; - - while (_system->getMillis() < nextTime) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - - if (_currentCharacter->sceneId == 210) { - updateKyragemFading(); - seq_playEnd(); - } - - if (_skipFlag) - break; - - if (nextTime - _system->getMillis() >= 10) - delay(10); - } -} - -#pragma mark - -#pragma mark - Animation/shape specific code -#pragma mark - - -void KyraEngine_v1::setupShapes123(const Shape *shapeTable, int endShape, int flags) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::setupShapes123(%p, %d, %d)", (const void *)shapeTable, endShape, flags); - - for (int i = 123; i <= 172; ++i) - _shapes[i] = 0; - - uint8 curImage = 0xFF; - int curPageBackUp = _screen->_curPage; - _screen->_curPage = 8; // we are using page 8 here in the original page 2 was backuped and then used for this stuff - int shapeFlags = 2; - if (flags) - shapeFlags = 3; - for (int i = 123; i < 123+endShape; ++i) { - uint8 newImage = shapeTable[i-123].imageIndex; - if (newImage != curImage && newImage != 0xFF) { - assert(_characterImageTable); - _screen->loadBitmap(_characterImageTable[newImage], 8, 8, 0); - curImage = newImage; - } - _shapes[i] = _screen->encodeShape(shapeTable[i-123].x<<3, shapeTable[i-123].y, shapeTable[i-123].w<<3, shapeTable[i-123].h, shapeFlags); - assert(i-7 < _defaultShapeTableSize); - _defaultShapeTable[i-7].xOffset = shapeTable[i-123].xOffset; - _defaultShapeTable[i-7].yOffset = shapeTable[i-123].yOffset; - _defaultShapeTable[i-7].w = shapeTable[i-123].w; - _defaultShapeTable[i-7].h = shapeTable[i-123].h; - } - _screen->_curPage = curPageBackUp; -} - -void KyraEngine_v1::freeShapes123() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::freeShapes123()"); - - for (int i = 123; i <= 172; ++i) { - delete[] _shapes[i]; - _shapes[i] = 0; - } -} - -#pragma mark - -#pragma mark - Misc stuff -#pragma mark - - -Movie *KyraEngine_v1::createWSAMovie() { - if (_flags.platform == Common::kPlatformAmiga) - return new WSAMovieAmiga(this); - - return new WSAMovieV1(this); -} - -void KyraEngine_v1::setBrandonPoisonFlags(int reset) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::setBrandonPoisonFlags(%d)", reset); - _brandonStatusBit |= 1; - - if (reset) - _poisonDeathCounter = 0; - - for (int i = 0; i < 0x100; ++i) - _brandonPoisonFlagsGFX[i] = i; - - _brandonPoisonFlagsGFX[0x99] = 0x34; - _brandonPoisonFlagsGFX[0x9A] = 0x35; - _brandonPoisonFlagsGFX[0x9B] = 0x37; - _brandonPoisonFlagsGFX[0x9C] = 0x38; - _brandonPoisonFlagsGFX[0x9D] = 0x2B; -} - -void KyraEngine_v1::resetBrandonPoisonFlags() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::resetBrandonPoisonFlags()"); - _brandonStatusBit = 0; - - for (int i = 0; i < 0x100; ++i) - _brandonPoisonFlagsGFX[i] = i; -} - -#pragma mark - -#pragma mark - Input -#pragma mark - - -void KyraEngine_v1::processInput() { - Common::Point mouse = getMousePos(); - int xpos = mouse.x; - int ypos = mouse.y; - - debugC(9, kDebugLevelMain, "KyraEngine_v1::processInput(%d, %d)", xpos, ypos); - _abortWalkFlag2 = false; - - if (processInputHelper(xpos, ypos)) - return; - - uint8 item = findItemAtPos(xpos, ypos); - if (item == 0xFF) { - _changedScene = false; - int handled = clickEventHandler(xpos, ypos); - if (_changedScene || handled) - return; - } - - // XXX _deathHandler specific - if (ypos <= 158) { - uint16 exit = 0xFFFF; - if (xpos < 12) { - exit = _walkBlockWest; - } else if (xpos >= 308) { - exit = _walkBlockEast; - } else if (ypos >= 136) { - exit = _walkBlockSouth; - } else if (ypos < 12) { - exit = _walkBlockNorth; - } - - if (exit != 0xFFFF) { - _abortWalkFlag2 = true; - handleSceneChange(xpos, ypos, 1, 1); - _abortWalkFlag2 = false; - return; - } else { - int script = checkForNPCScriptRun(xpos, ypos); - if (script >= 0) { - runNpcScript(script); - return; - } - if (_itemInHand != -1) { - if (ypos < 155) { - if (hasClickedOnExit(xpos, ypos)) { - _abortWalkFlag2 = true; - handleSceneChange(xpos, ypos, 1, 1); - _abortWalkFlag2 = false; - return; - } - dropItem(0, _itemInHand, xpos, ypos, 1); - } - } else { - if (ypos <= 155) { - _abortWalkFlag2 = true; - handleSceneChange(xpos, ypos, 1, 1); - _abortWalkFlag2 = false; - } - } - } - } -} - -int KyraEngine_v1::processInputHelper(int xpos, int ypos) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::processInputHelper(%d, %d)", xpos, ypos); - uint8 item = findItemAtPos(xpos, ypos); - if (item != 0xFF) { - if (_itemInHand == -1) { - _screen->hideMouse(); - _animator->animRemoveGameItem(item); - snd_playSoundEffect(53); - assert(_currentCharacter->sceneId < _roomTableSize); - Room *currentRoom = &_roomTable[_currentCharacter->sceneId]; - int item2 = currentRoom->itemsTable[item]; - currentRoom->itemsTable[item] = 0xFF; - setMouseItem(item2); - assert(_itemList && _takenList); - updateSentenceCommand(_itemList[item2], _takenList[0], 179); - _itemInHand = item2; - _screen->showMouse(); - clickEventHandler2(); - return 1; - } else { - exchangeItemWithMouseItem(_currentCharacter->sceneId, item); - return 1; - } - } - return 0; -} - -int KyraEngine_v1::clickEventHandler(int xpos, int ypos) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::clickEventHandler(%d, %d)", xpos, ypos); - _emc->init(&_scriptClick, &_scriptClickData); - _scriptClick.regs[1] = xpos; - _scriptClick.regs[2] = ypos; - _scriptClick.regs[3] = 0; - _scriptClick.regs[4] = _itemInHand; - _emc->start(&_scriptClick, 1); - - while (_emc->isValid(&_scriptClick)) - _emc->run(&_scriptClick); - - return _scriptClick.regs[3]; -} - -void KyraEngine_v1::updateMousePointer(bool forceUpdate) { - int shape = 0; - - int newMouseState = 0; - int newX = 0; - int newY = 0; - Common::Point mouse = getMousePos(); - if (mouse.y <= 158) { - if (mouse.x >= 12) { - if (mouse.x >= 308) { - if (_walkBlockEast == 0xFFFF) { - newMouseState = -2; - } else { - newMouseState = -5; - shape = 3; - newX = 7; - newY = 5; - } - } else if (mouse.y >= 136) { - if (_walkBlockSouth == 0xFFFF) { - newMouseState = -2; - } else { - newMouseState = -4; - shape = 4; - newX = 5; - newY = 7; - } - } else if (mouse.y < 12) { - if (_walkBlockNorth == 0xFFFF) { - newMouseState = -2; - } else { - newMouseState = -6; - shape = 2; - newX = 5; - newY = 1; - } - } - } else { - if (_walkBlockWest == 0xFFFF) { - newMouseState = -2; - } else { - newMouseState = -3; - newX = 1; - newY = shape = 5; - } - } - } - - if (mouse.x >= _entranceMouseCursorTracks[0] && mouse.y >= _entranceMouseCursorTracks[1] - && mouse.x <= _entranceMouseCursorTracks[2] && mouse.y <= _entranceMouseCursorTracks[3]) { - switch (_entranceMouseCursorTracks[4]) { - case 0: - newMouseState = -6; - shape = 2; - newX = 5; - newY = 1; - break; - - case 2: - newMouseState = -5; - shape = 3; - newX = 7; - newY = 5; - break; - - case 4: - newMouseState = -4; - shape = 4; - newX = 5; - newY = 7; - break; - - case 6: - newMouseState = -3; - shape = 5; - newX = 1; - newY = 5; - break; - - default: - break; - } - } - - if (newMouseState == -2) { - shape = 6; - newX = 4; - newY = 4; - } - - if ((newMouseState && _mouseState != newMouseState) || (newMouseState && forceUpdate)) { - _mouseState = newMouseState; - _screen->hideMouse(); - _screen->setMouseCursor(newX, newY, _shapes[shape]); - _screen->showMouse(); - } - - if (!newMouseState) { - if (_mouseState != _itemInHand || forceUpdate) { - if (mouse.y > 158 || (mouse.x >= 12 && mouse.x < 308 && mouse.y < 136 && mouse.y >= 12) || forceUpdate) { - _mouseState = _itemInHand; - _screen->hideMouse(); - if (_itemInHand == -1) - _screen->setMouseCursor(1, 1, _shapes[0]); - else - _screen->setMouseCursor(8, 15, _shapes[216+_itemInHand]); - _screen->showMouse(); - } - } - } -} - -bool KyraEngine_v1::hasClickedOnExit(int xpos, int ypos) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::hasClickedOnExit(%d, %d)", xpos, ypos); - if (xpos < 16 || xpos >= 304) - return true; - - if (ypos < 8) - return true; - - if (ypos < 136 || ypos > 155) - return false; - - return true; -} - -void KyraEngine_v1::clickEventHandler2() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::clickEventHandler2()"); - - Common::Point mouse = getMousePos(); - - _emc->init(&_scriptClick, &_scriptClickData); - _scriptClick.regs[0] = _currentCharacter->sceneId; - _scriptClick.regs[1] = mouse.x; - _scriptClick.regs[2] = mouse.y; - _scriptClick.regs[4] = _itemInHand; - _emc->start(&_scriptClick, 6); - - while (_emc->isValid(&_scriptClick)) - _emc->run(&_scriptClick); -} - -int KyraEngine_v1::checkForNPCScriptRun(int xpos, int ypos) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::checkForNPCScriptRun(%d, %d)", xpos, ypos); - int returnValue = -1; - const Character *currentChar = _currentCharacter; - int charLeft = 0, charRight = 0, charTop = 0, charBottom = 0; - - int scaleFactor = _scaleTable[currentChar->y1]; - int addX = (((scaleFactor*8)*3)>>8)>>1; - int addY = ((scaleFactor*3)<<4)>>8; - - charLeft = currentChar->x1 - addX; - charRight = currentChar->x1 + addX; - charTop = currentChar->y1 - addY; - charBottom = currentChar->y1; - - if (xpos >= charLeft && charRight >= xpos && charTop <= ypos && charBottom >= ypos) - return 0; - - if (xpos > 304 || xpos < 16) - return -1; - - for (int i = 1; i < 5; ++i) { - currentChar = &_characterList[i]; - - if (currentChar->sceneId != _currentCharacter->sceneId) - continue; - - charLeft = currentChar->x1 - 12; - charRight = currentChar->x1 + 11; - charTop = currentChar->y1 - 48; - // if (!i) - // charBottom = currentChar->y2 - 16; - // else - charBottom = currentChar->y1; - - if (xpos < charLeft || xpos > charRight || ypos < charTop || charBottom < ypos) - continue; - - if (returnValue != -1) { - if (currentChar->y1 >= _characterList[returnValue].y1) - returnValue = i; - } else { - returnValue = i; - } - } - - return returnValue; -} - -void KyraEngine_v1::runNpcScript(int func) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::runNpcScript(%d)", func); - _emc->init(&_npcScript, &_npcScriptData); - _emc->start(&_npcScript, func); - _npcScript.regs[0] = _currentCharacter->sceneId; - _npcScript.regs[4] = _itemInHand; - _npcScript.regs[5] = func; - - while (_emc->isValid(&_npcScript)) - _emc->run(&_npcScript); -} - -void KyraEngine_v1::checkAmuletAnimFlags() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::checkSpecialAnimFlags()"); - - if (_brandonStatusBit & 2) { - seq_makeBrandonNormal2(); - _timer->setCountdown(19, 300); - } - - if (_brandonStatusBit & 0x20) { - seq_makeBrandonNormal(); - _timer->setCountdown(19, 300); - } -} - -#pragma mark - - -void KyraEngine_v1::registerDefaultSettings() { - KyraEngine::registerDefaultSettings(); - - // Most settings already have sensible defaults. This one, however, is - // specific to the Kyra engine. - ConfMan.registerDefault("walkspeed", 2); -} - -void KyraEngine_v1::readSettings() { - int talkspeed = ConfMan.getInt("talkspeed"); - - // The default talk speed is 60. This should be mapped to "Normal". - - if (talkspeed == 0) - _configTextspeed = 3; // Clickable - if (talkspeed <= 50) - _configTextspeed = 0; // Slow - else if (talkspeed <= 150) - _configTextspeed = 1; // Normal - else - _configTextspeed = 2; // Fast - - KyraEngine::readSettings(); -} - -void KyraEngine_v1::writeSettings() { - int talkspeed; - - switch (_configTextspeed) { - case 0: // Slow - talkspeed = 1; - break; - case 1: // Normal - talkspeed = 60; - break; - case 2: // Fast - talkspeed = 255; - break; - default: // Clickable - talkspeed = 0; - break; - } - - ConfMan.setInt("talkspeed", talkspeed); - - KyraEngine::writeSettings(); -} - -} // end of namespace Kyra diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h deleted file mode 100644 index 801d3b9189..0000000000 --- a/engines/kyra/kyra_v1.h +++ /dev/null @@ -1,819 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef KYRA_KYRA_V1_H -#define KYRA_KYRA_V1_H - -#include "kyra/kyra.h" -#include "kyra/script.h" -#include "kyra/screen_v1.h" -#include "kyra/gui_v1.h" - -namespace Kyra { - -class Movie; -class SoundDigital; -class SeqPlayer; -class Sprites; -class Animator_v1; -class TextDisplayer; -class KyraEngine_v1; - -struct Character { - uint16 sceneId; - uint8 height; - uint8 facing; - uint16 currentAnimFrame; - uint8 inventoryItems[10]; - int16 x1, y1, x2, y2; -}; - -struct Shape { - uint8 imageIndex; - int8 xOffset, yOffset; - uint8 x, y, w, h; -}; - -struct Room { - uint8 nameIndex; - uint16 northExit; - uint16 eastExit; - uint16 southExit; - uint16 westExit; - uint8 itemsTable[12]; - uint16 itemsXPos[12]; - uint8 itemsYPos[12]; - uint8 needInit[12]; -}; - -struct Item { - uint8 unk1; - uint8 height; - uint8 unk2; - uint8 unk3; -}; - -struct SeqLoop { - const uint8 *ptr; - uint16 count; -}; - -struct SceneExits { - uint16 northXPos; - uint8 northYPos; - uint16 eastXPos; - uint8 eastYPos; - uint16 southXPos; - uint8 southYPos; - uint16 westXPos; - uint8 westYPos; -}; - -struct BeadState { - int16 x; - int16 y; - int16 width; - int16 height; - int16 dstX; - int16 dstY; - int16 width2; - int16 unk8; - int16 unk9; - int16 tableIndex; -}; - -class KyraEngine_v1 : public KyraEngine { - friend class MusicPlayer; - friend class Debugger_v1; - friend class Animator_v1; - friend class GUI_v1; -public: - KyraEngine_v1(OSystem *system, const GameFlags &flags); - ~KyraEngine_v1(); - - Screen *screen() { return _screen; } - Animator_v1 *animator() { return _animator; } - virtual Movie *createWSAMovie(); - - uint8 **shapes() { return _shapes; } - Character *currentCharacter() { return _currentCharacter; } - Character *characterList() { return _characterList; } - uint16 brandonStatus() { return _brandonStatusBit; } - - // TODO: remove me with workaround in animator.cpp l209 - uint16 getScene() { return _currentRoom; } - - int _paletteChanged; - int16 _northExitHeight; - - typedef void (KyraEngine_v1::*IntroProc)(); - - // static data access - const char * const*seqWSATable() { return _seq_WSATable; } - const char * const*seqCPSTable() { return _seq_CPSTable; } - const char * const*seqCOLTable() { return _seq_COLTable; } - const char * const*seqTextsTable() { return _seq_textsTable; } - - const uint8 * const*palTable1() { return &_specialPalettes[0]; } - const uint8 * const*palTable2() { return &_specialPalettes[29]; } - -protected: - virtual int go(); - virtual int init(); - -public: - // sequences - // -> misc - bool seq_skipSequence() const; -protected: - // -> demo - void seq_demo(); - - // -> intro - void seq_intro(); - void seq_introLogos(); - void seq_introStory(); - void seq_introMalcolmTree(); - void seq_introKallakWriting(); - void seq_introKallakMalcolm(); - - // -> ingame animations - void seq_createAmuletJewel(int jewel, int page, int noSound, int drawOnly); - void seq_brandonHealing(); - void seq_brandonHealing2(); - void seq_poisonDeathNow(int now); - void seq_poisonDeathNowAnim(); - void seq_playFluteAnimation(); - void seq_winterScroll1(); - void seq_winterScroll2(); - void seq_makeBrandonInv(); - void seq_makeBrandonNormal(); - void seq_makeBrandonNormal2(); - void seq_makeBrandonWisp(); - void seq_dispelMagicAnimation(); - void seq_fillFlaskWithWater(int item, int type); - void seq_playDrinkPotionAnim(int item, int unk2, int flags); - void seq_brandonToStone(); - - // -> end fight - int seq_playEnd(); - void seq_playEnding(); - - int handleMalcolmFlag(); - int handleBeadState(); - void initBeadState(int x, int y, int x2, int y2, int unk1, BeadState *ptr); - int processBead(int x, int y, int &x2, int &y2, BeadState *ptr); - - // -> credits - void seq_playCredits(); - -public: - // delay - void delayUntil(uint32 timestamp, bool updateGameTimers = false, bool update = false, bool isMainLoop = false); - void delay(uint32 millis, bool update = false, bool isMainLoop = false); - void delayWithTicks(int ticks); - void waitForEvent(); - - // TODO - void registerDefaultSettings(); - void readSettings(); - void writeSettings(); - - void snd_playSoundEffect(int track, int volume=0xFF); - void snd_playWanderScoreViaMap(int command, int restart); - virtual void snd_playVoiceFile(int id); - void snd_voiceWaitForFinish(bool ingame = true); - -protected: - void saveGame(const char *fileName, const char *saveName); - void loadGame(const char *fileName); - -protected: - // input - void processInput(); - int processInputHelper(int xpos, int ypos); - int clickEventHandler(int xpos, int ypos); - void clickEventHandler2(); - void updateMousePointer(bool forceUpdate = false); - bool hasClickedOnExit(int xpos, int ypos); - - bool _skipFlag; - bool skipFlag() const { return _skipFlag; } - void resetSkipFlag(bool removeEvent = true) { _skipFlag = false; } - - // scene - // -> init - void loadSceneMsc(); - void startSceneScript(int brandonAlive); - void setupSceneItems(); - void initSceneData(int facing, int unk1, int brandonAlive); - void initSceneObjectList(int brandonAlive); - void initSceneScreen(int brandonAlive); - void setupSceneResource(int sceneId); - - // -> process - void enterNewScene(int sceneId, int facing, int unk1, int unk2, int brandonAlive); - int handleSceneChange(int xpos, int ypos, int unk1, int frameReset); - int processSceneChange(int *table, int unk1, int frameReset); - int changeScene(int facing); - - // -> modification - void transcendScenes(int roomIndex, int roomName); - void setSceneFile(int roomIndex, int roomName); - - // -> pathfinder - int findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize); - bool lineIsPassable(int x, int y); - - // -> item handling - // --> misc - void addItemToRoom(uint16 sceneId, uint8 item, int itemIndex, int x, int y); - - // --> drop handling - void itemDropDown(int x, int y, int destX, int destY, byte freeItem, int item); - int processItemDrop(uint16 sceneId, uint8 item, int x, int y, int unk1, int unk2); - void dropItem(int unk1, int item, int x, int y, int unk2); - - // --> dropped item handling - int countItemsInScene(uint16 sceneId); - void exchangeItemWithMouseItem(uint16 sceneId, int itemIndex); - byte findFreeItemInScene(int scene); - byte findItemAtPos(int x, int y); - - // --> drop area handling - void addToNoDropRects(int x, int y, int w, int h); - void clearNoDropRects(); - int isDropable(int x, int y); - int checkNoDropRects(int x, int y); - - // --> player items handling - void updatePlayerItemsForScene(); - - // --> item GFX handling - void backUpItemRect0(int xpos, int ypos); - void restoreItemRect0(int xpos, int ypos); - void backUpItemRect1(int xpos, int ypos); - void restoreItemRect1(int xpos, int ypos); - - // items - // -> misc - void placeItemInGenericMapScene(int item, int index); - - // -> mouse item - void createMouseItem(int item); - void destroyMouseItem(); - void setMouseItem(int item); - - // -> graphics effects - void wipeDownMouseItem(int xpos, int ypos); - void itemSpecialFX(int x, int y, int item); - void itemSpecialFX1(int x, int y, int item); - void itemSpecialFX2(int x, int y, int item); - void magicOutMouseItem(int animIndex, int itemPos); - void magicInMouseItem(int animIndex, int item, int itemPos); - void specialMouseItemFX(int shape, int x, int y, int animIndex, int tableIndex, int loopStart, int maxLoops); - void processSpecialMouseItemFX(int shape, int x, int y, int tableValue, int loopStart, int maxLoops); - - // character - // -> movement - void moveCharacterToPos(int character, int facing, int xpos, int ypos); - void setCharacterPositionWithUpdate(int character); - int setCharacterPosition(int character, int *facingTable); - void setCharacterPositionHelper(int character, int *facingTable); - void setCharactersPositions(int character); - - // -> brandon - void setBrandonPoisonFlags(int reset); - void resetBrandonPoisonFlags(); - - // chat - // -> process - void characterSays(int vocFile, const char *chatStr, int8 charNum, int8 chatDuration); - void waitForChatToFinish(int vocFile, int16 chatDuration, const char *str, uint8 charNum); - - // -> initialization - int initCharacterChat(int8 charNum); - void backupChatPartnerAnimFrame(int8 charNum); - void restoreChatPartnerAnimFrame(int8 charNum); - int8 getChatPartnerNum(); - - // -> deinitialization - void endCharacterChat(int8 charNum, int16 arg_4); - - // graphics - // -> misc - int findDuplicateItemShape(int shape); - void updateKyragemFading(); - - // -> interface - void loadMainScreen(int page = 3); - void redrawInventory(int page); -public: - void drawSentenceCommand(const char *sentence, int unk1); - void updateSentenceCommand(const char *str1, const char *str2, int unk1); - void updateTextFade(); - -protected: - // -> amulet - void drawJewelPress(int jewel, int drawSpecial); - void drawJewelsFadeOutStart(); - void drawJewelsFadeOutEnd(int jewel); - - // -> shape handling - void setupShapes123(const Shape *shapeTable, int endShape, int flags); - void freeShapes123(); - - // misc (TODO) - void startup(); - void mainLoop(); - - int checkForNPCScriptRun(int xpos, int ypos); - void runNpcScript(int func); - - void loadMouseShapes(); - void loadCharacterShapes(); - void loadSpecialEffectShapes(); - void loadItems(); - void loadButtonShapes(); - void initMainButtonList(); - void setCharactersInDefaultScene(); - void setupPanPages(); - void freePanPages(); - void closeFinalWsa(); - - //void setTimer19(); - void setupTimers(); - void timerUpdateHeadAnims(int timerNum); - void timerSetFlags1(int timerNum); - void timerSetFlags2(int timerNum); - void timerSetFlags3(int timerNum); - void timerCheckAnimFlag1(int timerNum); - void timerCheckAnimFlag2(int timerNum); - void checkAmuletAnimFlags(); - void timerRedrawAmulet(int timerNum); - void timerFadeText(int timerNum); - void updateAnimFlag1(int timerNum); - void updateAnimFlag2(int timerNum); - void drawAmulet(); - void setTextFadeTimerCountdown(int16 countdown); - void setWalkspeed(uint8 newSpeed); - - int buttonInventoryCallback(Button *caller); - int buttonAmuletCallback(Button *caller); - - bool _skipIntroFlag; - bool _abortIntroFlag; - bool _menuDirectlyToLoad; - bool _abortWalkFlag; - bool _abortWalkFlag2; - bool _mousePressFlag; - uint8 *_itemBkgBackUp[2]; - uint8 *_shapes[373]; - int8 _itemInHand; - int _mouseState; - bool _handleInput; - bool _changedScene; - int _unkScreenVar1, _unkScreenVar2, _unkScreenVar3; - int _beadStateVar; - int _unkAmuletVar; - - int _malcolmFlag; - int _endSequenceSkipFlag; - int _endSequenceNeedLoading; - int _unkEndSeqVar2; - uint8 *_endSequenceBackUpRect; - int _unkEndSeqVar4; - int _unkEndSeqVar5; - int _lastDisplayedPanPage; - uint8 *_panPagesTable[20]; - Movie *_finalA, *_finalB, *_finalC; - - Movie *_movieObjects[10]; - - uint16 _entranceMouseCursorTracks[8]; - uint16 _walkBlockNorth; - uint16 _walkBlockEast; - uint16 _walkBlockSouth; - uint16 _walkBlockWest; - - int32 _scaleMode; - int16 _scaleTable[145]; - - Rect _noDropRects[11]; - - int8 _birthstoneGemTable[4]; - int8 _idolGemsTable[3]; - - int8 _marbleVaseItem; - int8 _foyerItemTable[3]; - - int8 _cauldronState; - int8 _crystalState[2]; - - uint16 _brandonStatusBit; - uint8 _brandonStatusBit0x02Flag; - uint8 _brandonStatusBit0x20Flag; - uint8 _brandonPoisonFlagsGFX[256]; - uint8 _deathHandler; - int16 _brandonInvFlag; - uint8 _poisonDeathCounter; - int _brandonPosX; - int _brandonPosY; - - uint16 _currentChatPartnerBackupFrame; - uint16 _currentCharAnimFrame; - - int8 *_sceneAnimTable[50]; - - Item _itemTable[145]; - int _lastProcessedItem; - int _lastProcessedItemHeight; - - int16 *_exitListPtr; - int16 _exitList[11]; - SceneExits _sceneExits; - uint16 _currentRoom; - int _scenePhasingFlag; - - int _sceneChangeState; - int _loopFlag2; - - int _pathfinderFlag; - int _pathfinderFlag2; - int _lastFindWayRet; - int *_movFacingTable; - - int8 _talkingCharNum; - int8 _charSayUnk2; - int8 _charSayUnk3; - int8 _currHeadShape; - uint8 _currSentenceColor[3]; - int8 _startSentencePalIndex; - bool _fadeText; - - uint8 _configTextspeed; - - Animator_v1 *_animator; - SeqPlayer *_seq; - Sprites *_sprites; - Screen_v1 *_screen; - - EMCState _scriptMain; - - EMCState _npcScript; - EMCData _npcScriptData; - - EMCState _scriptClick; - EMCData _scriptClickData; - - Character *_characterList; - Character *_currentCharacter; - - Button *_buttonList; - GUI_v1 *_gui; - - struct KyragemState { - uint16 nextOperation; - uint16 rOffset; - uint16 gOffset; - uint16 bOffset; - uint32 timerCount; - } _kyragemFadingState; - - static const int8 _dosTrackMap[]; - static const int _dosTrackMapSize; - - // TODO: get rid of all variables having pointers to the static resources if possible - // i.e. let them directly use the _staticres functions - void initStaticResource(); - - const uint8 *_seq_Forest; - const uint8 *_seq_KallakWriting; - const uint8 *_seq_KyrandiaLogo; - const uint8 *_seq_KallakMalcolm; - const uint8 *_seq_MalcolmTree; - const uint8 *_seq_WestwoodLogo; - const uint8 *_seq_Demo1; - const uint8 *_seq_Demo2; - const uint8 *_seq_Demo3; - const uint8 *_seq_Demo4; - const uint8 *_seq_Reunion; - - const char * const*_seq_WSATable; - const char * const*_seq_CPSTable; - const char * const*_seq_COLTable; - const char * const*_seq_textsTable; - - int _seq_WSATable_Size; - int _seq_CPSTable_Size; - int _seq_COLTable_Size; - int _seq_textsTable_Size; - - const char * const*_itemList; - const char * const*_takenList; - const char * const*_placedList; - const char * const*_droppedList; - const char * const*_noDropList; - const char * const*_putDownFirst; - const char * const*_waitForAmulet; - const char * const*_blackJewel; - const char * const*_poisonGone; - const char * const*_healingTip; - const char * const*_thePoison; - const char * const*_fluteString; - const char * const*_wispJewelStrings; - const char * const*_magicJewelString; - const char * const*_flaskFull; - const char * const*_fullFlask; - const char * const*_veryClever; - const char * const*_homeString; - const char * const*_newGameString; - - int _itemList_Size; - int _takenList_Size; - int _placedList_Size; - int _droppedList_Size; - int _noDropList_Size; - int _putDownFirst_Size; - int _waitForAmulet_Size; - int _blackJewel_Size; - int _poisonGone_Size; - int _healingTip_Size; - int _thePoison_Size; - int _fluteString_Size; - int _wispJewelStrings_Size; - int _magicJewelString_Size; - int _flaskFull_Size; - int _fullFlask_Size; - int _veryClever_Size; - int _homeString_Size; - int _newGameString_Size; - - const char * const*_characterImageTable; - int _characterImageTableSize; - - const char * const*_guiStrings; - int _guiStringsSize; - - const char * const*_configStrings; - int _configStringsSize; - - Shape *_defaultShapeTable; - int _defaultShapeTableSize; - - const Shape *_healingShapeTable; - int _healingShapeTableSize; - const Shape *_healingShape2Table; - int _healingShape2TableSize; - - const Shape *_posionDeathShapeTable; - int _posionDeathShapeTableSize; - - const Shape *_fluteAnimShapeTable; - int _fluteAnimShapeTableSize; - - const Shape *_winterScrollTable; - int _winterScrollTableSize; - const Shape *_winterScroll1Table; - int _winterScroll1TableSize; - const Shape *_winterScroll2Table; - int _winterScroll2TableSize; - - const Shape *_drinkAnimationTable; - int _drinkAnimationTableSize; - - const Shape *_brandonToWispTable; - int _brandonToWispTableSize; - - const Shape *_magicAnimationTable; - int _magicAnimationTableSize; - - const Shape *_brandonStoneTable; - int _brandonStoneTableSize; - - Room *_roomTable; - int _roomTableSize; - const char * const*_roomFilenameTable; - int _roomFilenameTableSize; - - const uint8 *_amuleteAnim; - - const uint8 * const*_specialPalettes; - - const char *const *_soundFiles; - int _soundFilesSize; - const char *const *_soundFilesIntro; - int _soundFilesIntroSize; - const int32 *_cdaTrackTable; - int _cdaTrackTableSize; - const AudioDataStruct * _soundData; - - static const int8 _charXPosTable[]; - static const int8 _charYPosTable[]; - - // positions of the inventory - static const uint16 _itemPosX[]; - static const uint8 _itemPosY[]; - - void setupButtonData(); - Button *_buttonData; - Button **_buttonDataListPtr; - - static const uint8 _magicMouseItemStartFrame[]; - static const uint8 _magicMouseItemEndFrame[]; - static const uint8 _magicMouseItemStartFrame2[]; - static const uint8 _magicMouseItemEndFrame2[]; - - static const uint16 _amuletX[]; - static const uint16 _amuletY[]; - static const uint16 _amuletX2[]; - static const uint16 _amuletY2[]; -protected: - void setupOpcodeTable(); - - // Opcodes - int o1_magicInMouseItem(EMCState *script); - int o1_characterSays(EMCState *script); - int o1_pauseTicks(EMCState *script); - int o1_drawSceneAnimShape(EMCState *script); - int o1_queryGameFlag(EMCState *script); - int o1_setGameFlag(EMCState *script); - int o1_resetGameFlag(EMCState *script); - int o1_runNPCScript(EMCState *script); - int o1_setSpecialExitList(EMCState *script); - int o1_blockInWalkableRegion(EMCState *script); - int o1_blockOutWalkableRegion(EMCState *script); - int o1_walkPlayerToPoint(EMCState *script); - int o1_dropItemInScene(EMCState *script); - int o1_drawAnimShapeIntoScene(EMCState *script); - int o1_createMouseItem(EMCState *script); - int o1_savePageToDisk(EMCState *script); - int o1_sceneAnimOn(EMCState *script); - int o1_sceneAnimOff(EMCState *script); - int o1_getElapsedSeconds(EMCState *script); - int o1_mouseIsPointer(EMCState *script); - int o1_destroyMouseItem(EMCState *script); - int o1_runSceneAnimUntilDone(EMCState *script); - int o1_fadeSpecialPalette(EMCState *script); - int o1_playAdlibSound(EMCState *script); - int o1_playAdlibScore(EMCState *script); - int o1_phaseInSameScene(EMCState *script); - int o1_setScenePhasingFlag(EMCState *script); - int o1_resetScenePhasingFlag(EMCState *script); - int o1_queryScenePhasingFlag(EMCState *script); - int o1_sceneToDirection(EMCState *script); - int o1_setBirthstoneGem(EMCState *script); - int o1_placeItemInGenericMapScene(EMCState *script); - int o1_setBrandonStatusBit(EMCState *script); - int o1_pauseSeconds(EMCState *script); - int o1_getCharactersLocation(EMCState *script); - int o1_runNPCSubscript(EMCState *script); - int o1_magicOutMouseItem(EMCState *script); - int o1_internalAnimOn(EMCState *script); - int o1_forceBrandonToNormal(EMCState *script); - int o1_poisonDeathNow(EMCState *script); - int o1_setScaleMode(EMCState *script); - int o1_openWSAFile(EMCState *script); - int o1_closeWSAFile(EMCState *script); - int o1_runWSAFromBeginningToEnd(EMCState *script); - int o1_displayWSAFrame(EMCState *script); - int o1_enterNewScene(EMCState *script); - int o1_setSpecialEnterXAndY(EMCState *script); - int o1_runWSAFrames(EMCState *script); - int o1_popBrandonIntoScene(EMCState *script); - int o1_restoreAllObjectBackgrounds(EMCState *script); - int o1_setCustomPaletteRange(EMCState *script); - int o1_loadPageFromDisk(EMCState *script); - int o1_customPrintTalkString(EMCState *script); - int o1_restoreCustomPrintBackground(EMCState *script); - int o1_hideMouse(EMCState *script); - int o1_showMouse(EMCState *script); - int o1_getCharacterX(EMCState *script); - int o1_getCharacterY(EMCState *script); - int o1_changeCharactersFacing(EMCState *script); - int o1_copyWSARegion(EMCState *script); - int o1_printText(EMCState *script); - int o1_random(EMCState *script); - int o1_loadSoundFile(EMCState *script); - int o1_displayWSAFrameOnHidPage(EMCState *script); - int o1_displayWSASequentialFrames(EMCState *script); - int o1_drawCharacterStanding(EMCState *script); - int o1_internalAnimOff(EMCState *script); - int o1_changeCharactersXAndY(EMCState *script); - int o1_clearSceneAnimatorBeacon(EMCState *script); - int o1_querySceneAnimatorBeacon(EMCState *script); - int o1_refreshSceneAnimator(EMCState *script); - int o1_placeItemInOffScene(EMCState *script); - int o1_wipeDownMouseItem(EMCState *script); - int o1_placeCharacterInOtherScene(EMCState *script); - int o1_getKey(EMCState *script); - int o1_specificItemInInventory(EMCState *script); - int o1_popMobileNPCIntoScene(EMCState *script); - int o1_mobileCharacterInScene(EMCState *script); - int o1_hideMobileCharacter(EMCState *script); - int o1_unhideMobileCharacter(EMCState *script); - int o1_setCharactersLocation(EMCState *script); - int o1_walkCharacterToPoint(EMCState *script); - int o1_specialEventDisplayBrynnsNote(EMCState *script); - int o1_specialEventRemoveBrynnsNote(EMCState *script); - int o1_setLogicPage(EMCState *script); - int o1_fatPrint(EMCState *script); - int o1_preserveAllObjectBackgrounds(EMCState *script); - int o1_updateSceneAnimations(EMCState *script); - int o1_sceneAnimationActive(EMCState *script); - int o1_setCharactersMovementDelay(EMCState *script); - int o1_getCharactersFacing(EMCState *script); - int o1_bkgdScrollSceneAndMasksRight(EMCState *script); - int o1_dispelMagicAnimation(EMCState *script); - int o1_findBrightestFireberry(EMCState *script); - int o1_setFireberryGlowPalette(EMCState *script); - int o1_setDeathHandlerFlag(EMCState *script); - int o1_drinkPotionAnimation(EMCState *script); - int o1_makeAmuletAppear(EMCState *script); - int o1_drawItemShapeIntoScene(EMCState *script); - int o1_setCharactersCurrentFrame(EMCState *script); - int o1_waitForConfirmationMouseClick(EMCState *script); - int o1_pageFlip(EMCState *script); - int o1_setSceneFile(EMCState *script); - int o1_getItemInMarbleVase(EMCState *script); - int o1_setItemInMarbleVase(EMCState *script); - int o1_addItemToInventory(EMCState *script); - int o1_intPrint(EMCState *script); - int o1_shakeScreen(EMCState *script); - int o1_createAmuletJewel(EMCState *script); - int o1_setSceneAnimCurrXY(EMCState *script); - int o1_poisonBrandonAndRemaps(EMCState *script); - int o1_fillFlaskWithWater(EMCState *script); - int o1_getCharactersMovementDelay(EMCState *script); - int o1_getBirthstoneGem(EMCState *script); - int o1_queryBrandonStatusBit(EMCState *script); - int o1_playFluteAnimation(EMCState *script); - int o1_playWinterScrollSequence(EMCState *script); - int o1_getIdolGem(EMCState *script); - int o1_setIdolGem(EMCState *script); - int o1_totalItemsInScene(EMCState *script); - int o1_restoreBrandonsMovementDelay(EMCState *script); - int o1_setMousePos(EMCState *script); - int o1_getMouseState(EMCState *script); - int o1_setEntranceMouseCursorTrack(EMCState *script); - int o1_itemAppearsOnGround(EMCState *script); - int o1_setNoDrawShapesFlag(EMCState *script); - int o1_fadeEntirePalette(EMCState *script); - int o1_itemOnGroundHere(EMCState *script); - int o1_queryCauldronState(EMCState *script); - int o1_setCauldronState(EMCState *script); - int o1_queryCrystalState(EMCState *script); - int o1_setCrystalState(EMCState *script); - int o1_setPaletteRange(EMCState *script); - int o1_shrinkBrandonDown(EMCState *script); - int o1_growBrandonUp(EMCState *script); - int o1_setBrandonScaleXAndY(EMCState *script); - int o1_resetScaleMode(EMCState *script); - int o1_getScaleDepthTableValue(EMCState *script); - int o1_setScaleDepthTableValue(EMCState *script); - int o1_message(EMCState *script); - int o1_checkClickOnNPC(EMCState *script); - int o1_getFoyerItem(EMCState *script); - int o1_setFoyerItem(EMCState *script); - int o1_setNoItemDropRegion(EMCState *script); - int o1_walkMalcolmOn(EMCState *script); - int o1_passiveProtection(EMCState *script); - int o1_setPlayingLoop(EMCState *script); - int o1_brandonToStoneSequence(EMCState *script); - int o1_brandonHealingSequence(EMCState *script); - int o1_protectCommandLine(EMCState *script); - int o1_pauseMusicSeconds(EMCState *script); - int o1_resetMaskRegion(EMCState *script); - int o1_setPaletteChangeFlag(EMCState *script); - int o1_fillRect(EMCState *script); - int o1_dummy(EMCState *script); - int o1_vocUnload(EMCState *script); - int o1_vocLoad(EMCState *script); -}; - -} // end of namespace Kyra - -#endif - diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index 3b7aac91ba..484e044ac7 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -230,7 +230,7 @@ protected: }; SceneAnim _sceneAnims[16]; - WSAMovieV2 *_sceneAnimMovie[16]; + WSAMovie_v2 *_sceneAnimMovie[16]; void freeSceneAnims(); diff --git a/engines/kyra/module.mk b/engines/kyra/module.mk index aec2778def..2a0e2adf41 100644 --- a/engines/kyra/module.mk +++ b/engines/kyra/module.mk @@ -1,49 +1,49 @@ MODULE := engines/kyra MODULE_OBJS := \ - animator_v1.o \ + animator_lok.o \ animator_v2.o \ animator_hof.o \ animator_mr.o \ debugger.o \ detection.o \ gui.o \ - gui_v1.o \ + gui_lok.o \ gui_v2.o \ gui_hof.o \ gui_mr.o \ - items_v1.o \ + items_lok.o \ items_v2.o \ items_hof.o \ items_mr.o \ kyra.o \ - kyra_v1.o \ + kyra_lok.o \ kyra_v2.o \ kyra_hof.o \ kyra_mr.o \ resource.o \ saveload.o \ - saveload_v1.o \ + saveload_lok.o \ saveload_hof.o \ saveload_mr.o \ scene.o \ - scene_v1.o \ + scene_lok.o \ scene_v2.o \ scene_hof.o \ scene_mr.o \ screen.o \ - screen_v1.o \ + screen_lok.o \ screen_v2.o \ screen_hof.o \ screen_mr.o \ - script_v1.o \ + script_lok.o \ script_v2.o \ script_hof.o \ script_mr.o \ script.o \ script_tim.o \ seqplayer.o \ - sequences_v1.o \ + sequences_lok.o \ sequences_v2.o \ sequences_hof.o \ sequences_mr.o \ @@ -51,15 +51,15 @@ MODULE_OBJS := \ sound_digital.o \ sound_towns.o \ sound.o \ - sound_v1.o \ + sound_lok.o \ sprites.o \ staticres.o \ text.o \ - text_v1.o \ + text_lok.o \ text_hof.o \ text_mr.o \ timer.o \ - timer_v1.o \ + timer_lok.o \ timer_hof.o \ timer_mr.o \ vqa.o \ diff --git a/engines/kyra/saveload_lok.cpp b/engines/kyra/saveload_lok.cpp new file mode 100644 index 0000000000..6f1fc484fd --- /dev/null +++ b/engines/kyra/saveload_lok.cpp @@ -0,0 +1,300 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/endian.h" +#include "common/savefile.h" +#include "common/system.h" + +#include "kyra/kyra_lok.h" +#include "kyra/animator_lok.h" +#include "kyra/screen.h" +#include "kyra/resource.h" +#include "kyra/sound.h" +#include "kyra/timer.h" + +namespace Kyra { +void KyraEngine_LoK::loadGame(const char *fileName) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::loadGame('%s')", fileName); + + SaveHeader header; + Common::InSaveFile *in = openSaveForReading(fileName, header); + if (!in) { + warning("Can't open file '%s', game not loadable", fileName); + return; + } + + if (header.originalSave) { + // no support for original savefile in Kyrandia 1 (yet) + delete in; + return; + } + + snd_playSoundEffect(0x0A); + snd_playWanderScoreViaMap(0, 1); + + // unload the current voice file should fix some problems with voices + if (_currentRoom != 0xFFFF && _flags.isTalkie) { + char file[32]; + assert(_currentRoom < _roomTableSize); + int tableId = _roomTable[_currentRoom].nameIndex; + assert(tableId < _roomFilenameTableSize); + strcpy(file, _roomFilenameTable[tableId]); + strcat(file, ".VRM"); + _res->unloadPakFile(file); + } + + int brandonX = 0, brandonY = 0; + for (int i = 0; i < 11; i++) { + _characterList[i].sceneId = in->readUint16BE(); + _characterList[i].height = in->readByte(); + _characterList[i].facing = in->readByte(); + _characterList[i].currentAnimFrame = in->readUint16BE(); + //_characterList[i].unk6 = in->readUint32BE(); + in->read(_characterList[i].inventoryItems, 10); + _characterList[i].x1 = in->readSint16BE(); + _characterList[i].y1 = in->readSint16BE(); + _characterList[i].x2 = in->readSint16BE(); + _characterList[i].y2 = in->readSint16BE(); + if (i == 0) { + brandonX = _characterList[i].x1; + brandonY = _characterList[i].y1; + } + //_characterList[i].field_20 = in->readUint16BE(); + //_characterList[i].field_23 = in->readUint16BE(); + } + + _marbleVaseItem = in->readSint16BE(); + _itemInHand = in->readByte(); + + for (int i = 0; i < 4; ++i) + _birthstoneGemTable[i] = in->readByte(); + for (int i = 0; i < 3; ++i) + _idolGemsTable[i] = in->readByte(); + for (int i = 0; i < 3; ++i) + _foyerItemTable[i] = in->readByte(); + _cauldronState = in->readByte(); + for (int i = 0; i < 2; ++i) + _crystalState[i] = in->readByte(); + + _brandonStatusBit = in->readUint16BE(); + _brandonStatusBit0x02Flag = in->readByte(); + _brandonStatusBit0x20Flag = in->readByte(); + in->read(_brandonPoisonFlagsGFX, 256); + _brandonInvFlag = in->readSint16BE(); + _poisonDeathCounter = in->readByte(); + _animator->_brandonDrawFrame = in->readUint16BE(); + + _timer->loadDataFromFile(*in, header.version); + + memset(_flagsTable, 0, sizeof(_flagsTable)); + uint32 flagsSize = in->readUint32BE(); + assert(flagsSize <= sizeof(_flagsTable)); + in->read(_flagsTable, flagsSize); + + for (int i = 0; i < _roomTableSize; ++i) { + for (int item = 0; item < 12; ++item) { + _roomTable[i].itemsTable[item] = 0xFF; + _roomTable[i].itemsXPos[item] = 0xFFFF; + _roomTable[i].itemsYPos[item] = 0xFF; + _roomTable[i].needInit[item] = 0; + } + } + + uint16 sceneId = 0; + + while (true) { + sceneId = in->readUint16BE(); + if (sceneId == 0xFFFF) + break; + assert(sceneId < _roomTableSize); + _roomTable[sceneId].nameIndex = in->readByte(); + + for (int i = 0; i < 12; i++) { + _roomTable[sceneId].itemsTable[i] = in->readByte(); + _roomTable[sceneId].itemsXPos[i] = in->readUint16BE(); + _roomTable[sceneId].itemsYPos[i] = in->readUint16BE(); + _roomTable[sceneId].needInit[i] = in->readByte(); + } + } + if (header.version >= 3) { + _lastMusicCommand = in->readSint16BE(); + if (_lastMusicCommand != -1) + snd_playWanderScoreViaMap(_lastMusicCommand, 1); + } + + // Version 4 stored settings in the savegame. As of version 5, they are + // handled by the config manager. + + if (header.version == 4) { + in->readByte(); // Text speed + in->readByte(); // Walk speed + in->readByte(); // Music + in->readByte(); // Sound + in->readByte(); // Voice + } + + if (header.version >= 7) { + _curSfxFile = in->readByte(); + + // In the first version when this entry was introduced, + // it wasn't made sure that _curSfxFile was initialized + // so if it's out of bounds we just set it to 0. + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { + if (_curSfxFile >= _soundData->_fileListLen || _curSfxFile < 0) + _curSfxFile = 0; + _sound->loadSoundFile(_curSfxFile); + } + } + + _screen->_disableScreen = true; + loadMainScreen(8); + + if (queryGameFlag(0x2D)) { + _screen->loadBitmap("AMULET3.CPS", 10, 10, 0); + if (!queryGameFlag(0xF1)) { + for (int i = 0x55; i <= 0x5A; ++i) { + if (queryGameFlag(i)) + seq_createAmuletJewel(i-0x55, 10, 1, 1); + } + } + _screen->copyRegion(0, 0, 0, 0, 320, 200, 10, 8); + _screen->copyRegion(0, 0, 0, 0, 320, 200, 8, 0); + } + + createMouseItem(_itemInHand); + _animator->setBrandonAnimSeqSize(3, 48); + redrawInventory(0); + _animator->_noDrawShapesFlag = 1; + enterNewScene(_currentCharacter->sceneId, _currentCharacter->facing, 0, 0, 1); + _animator->_noDrawShapesFlag = 0; + + _currentCharacter->x1 = brandonX; + _currentCharacter->y1 = brandonY; + _animator->animRefreshNPC(0); + _animator->restoreAllObjectBackgrounds(); + _animator->preserveAnyChangedBackgrounds(); + _animator->prepDrawAllObjects(); + _animator->copyChangedObjectsForward(0); + _screen->copyRegion(8, 8, 8, 8, 304, 128, 2, 0); + _screen->_disableScreen = false; + _screen->updateScreen(); + + _abortWalkFlag = true; + _abortWalkFlag2 = false; + _mousePressFlag = false; + setMousePos(brandonX, brandonY); + + if (in->ioFailed()) + error("Load failed ('%s', '%s').", fileName, header.description.c_str()); + else + debugC(1, kDebugLevelMain, "Loaded savegame '%s.'", header.description.c_str()); + + // We didn't explicitly set the walk speed, but it's saved as part of + // the _timers array, so we need to re-sync it with _configWalkspeed. + setWalkspeed(_configWalkspeed); + + delete in; +} + +void KyraEngine_LoK::saveGame(const char *fileName, const char *saveName) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::saveGame('%s', '%s')", fileName, saveName); + + if (_quitFlag) + return; + + Common::OutSaveFile *out = openSaveForWriting(fileName, saveName); + if (!out) + return; + + for (int i = 0; i < 11; i++) { + out->writeUint16BE(_characterList[i].sceneId); + out->writeByte(_characterList[i].height); + out->writeByte(_characterList[i].facing); + out->writeUint16BE(_characterList[i].currentAnimFrame); + //out->writeUint32BE(_characterList[i].unk6); + out->write(_characterList[i].inventoryItems, 10); + out->writeSint16BE(_characterList[i].x1); + out->writeSint16BE(_characterList[i].y1); + out->writeSint16BE(_characterList[i].x2); + out->writeSint16BE(_characterList[i].y2); + //out->writeUint16BE(_characterList[i].field_20); + //out->writeUint16BE(_characterList[i].field_23); + } + + out->writeSint16BE(_marbleVaseItem); + out->writeByte(_itemInHand); + + for (int i = 0; i < 4; ++i) + out->writeByte(_birthstoneGemTable[i]); + for (int i = 0; i < 3; ++i) + out->writeByte(_idolGemsTable[i]); + for (int i = 0; i < 3; ++i) + out->writeByte(_foyerItemTable[i]); + out->writeByte(_cauldronState); + for (int i = 0; i < 2; ++i) + out->writeByte(_crystalState[i]); + + out->writeUint16BE(_brandonStatusBit); + out->writeByte(_brandonStatusBit0x02Flag); + out->writeByte(_brandonStatusBit0x20Flag); + out->write(_brandonPoisonFlagsGFX, 256); + out->writeSint16BE(_brandonInvFlag); + out->writeByte(_poisonDeathCounter); + out->writeUint16BE(_animator->_brandonDrawFrame); + + _timer->saveDataToFile(*out); + + out->writeUint32BE(sizeof(_flagsTable)); + out->write(_flagsTable, sizeof(_flagsTable)); + + for (uint16 i = 0; i < _roomTableSize; i++) { + out->writeUint16BE(i); + out->writeByte(_roomTable[i].nameIndex); + for (int a = 0; a < 12; a++) { + out->writeByte(_roomTable[i].itemsTable[a]); + out->writeUint16BE(_roomTable[i].itemsXPos[a]); + out->writeUint16BE(_roomTable[i].itemsYPos[a]); + out->writeByte(_roomTable[i].needInit[a]); + } + } + // room table terminator + out->writeUint16BE(0xFFFF); + + out->writeSint16BE(_lastMusicCommand); + + out->writeByte(_curSfxFile); + + out->finalize(); + + // check for errors + if (out->ioFailed()) + warning("Can't write file '%s'. (Disk full?)", fileName); + else + debugC(1, kDebugLevelMain, "Saved game '%s.'", saveName); + + delete out; +} +} // end of namespace Kyra + diff --git a/engines/kyra/saveload_v1.cpp b/engines/kyra/saveload_v1.cpp deleted file mode 100644 index 7e871876a0..0000000000 --- a/engines/kyra/saveload_v1.cpp +++ /dev/null @@ -1,300 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/endian.h" -#include "common/savefile.h" -#include "common/system.h" - -#include "kyra/kyra_v1.h" -#include "kyra/animator_v1.h" -#include "kyra/screen.h" -#include "kyra/resource.h" -#include "kyra/sound.h" -#include "kyra/timer.h" - -namespace Kyra { -void KyraEngine_v1::loadGame(const char *fileName) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::loadGame('%s')", fileName); - - SaveHeader header; - Common::InSaveFile *in = openSaveForReading(fileName, header); - if (!in) { - warning("Can't open file '%s', game not loadable", fileName); - return; - } - - if (header.originalSave) { - // no support for original savefile in Kyrandia 1 (yet) - delete in; - return; - } - - snd_playSoundEffect(0x0A); - snd_playWanderScoreViaMap(0, 1); - - // unload the current voice file should fix some problems with voices - if (_currentRoom != 0xFFFF && _flags.isTalkie) { - char file[32]; - assert(_currentRoom < _roomTableSize); - int tableId = _roomTable[_currentRoom].nameIndex; - assert(tableId < _roomFilenameTableSize); - strcpy(file, _roomFilenameTable[tableId]); - strcat(file, ".VRM"); - _res->unloadPakFile(file); - } - - int brandonX = 0, brandonY = 0; - for (int i = 0; i < 11; i++) { - _characterList[i].sceneId = in->readUint16BE(); - _characterList[i].height = in->readByte(); - _characterList[i].facing = in->readByte(); - _characterList[i].currentAnimFrame = in->readUint16BE(); - //_characterList[i].unk6 = in->readUint32BE(); - in->read(_characterList[i].inventoryItems, 10); - _characterList[i].x1 = in->readSint16BE(); - _characterList[i].y1 = in->readSint16BE(); - _characterList[i].x2 = in->readSint16BE(); - _characterList[i].y2 = in->readSint16BE(); - if (i == 0) { - brandonX = _characterList[i].x1; - brandonY = _characterList[i].y1; - } - //_characterList[i].field_20 = in->readUint16BE(); - //_characterList[i].field_23 = in->readUint16BE(); - } - - _marbleVaseItem = in->readSint16BE(); - _itemInHand = in->readByte(); - - for (int i = 0; i < 4; ++i) - _birthstoneGemTable[i] = in->readByte(); - for (int i = 0; i < 3; ++i) - _idolGemsTable[i] = in->readByte(); - for (int i = 0; i < 3; ++i) - _foyerItemTable[i] = in->readByte(); - _cauldronState = in->readByte(); - for (int i = 0; i < 2; ++i) - _crystalState[i] = in->readByte(); - - _brandonStatusBit = in->readUint16BE(); - _brandonStatusBit0x02Flag = in->readByte(); - _brandonStatusBit0x20Flag = in->readByte(); - in->read(_brandonPoisonFlagsGFX, 256); - _brandonInvFlag = in->readSint16BE(); - _poisonDeathCounter = in->readByte(); - _animator->_brandonDrawFrame = in->readUint16BE(); - - _timer->loadDataFromFile(*in, header.version); - - memset(_flagsTable, 0, sizeof(_flagsTable)); - uint32 flagsSize = in->readUint32BE(); - assert(flagsSize <= sizeof(_flagsTable)); - in->read(_flagsTable, flagsSize); - - for (int i = 0; i < _roomTableSize; ++i) { - for (int item = 0; item < 12; ++item) { - _roomTable[i].itemsTable[item] = 0xFF; - _roomTable[i].itemsXPos[item] = 0xFFFF; - _roomTable[i].itemsYPos[item] = 0xFF; - _roomTable[i].needInit[item] = 0; - } - } - - uint16 sceneId = 0; - - while (true) { - sceneId = in->readUint16BE(); - if (sceneId == 0xFFFF) - break; - assert(sceneId < _roomTableSize); - _roomTable[sceneId].nameIndex = in->readByte(); - - for (int i = 0; i < 12; i++) { - _roomTable[sceneId].itemsTable[i] = in->readByte(); - _roomTable[sceneId].itemsXPos[i] = in->readUint16BE(); - _roomTable[sceneId].itemsYPos[i] = in->readUint16BE(); - _roomTable[sceneId].needInit[i] = in->readByte(); - } - } - if (header.version >= 3) { - _lastMusicCommand = in->readSint16BE(); - if (_lastMusicCommand != -1) - snd_playWanderScoreViaMap(_lastMusicCommand, 1); - } - - // Version 4 stored settings in the savegame. As of version 5, they are - // handled by the config manager. - - if (header.version == 4) { - in->readByte(); // Text speed - in->readByte(); // Walk speed - in->readByte(); // Music - in->readByte(); // Sound - in->readByte(); // Voice - } - - if (header.version >= 7) { - _curSfxFile = in->readByte(); - - // In the first version when this entry was introduced, - // it wasn't made sure that _curSfxFile was initialized - // so if it's out of bounds we just set it to 0. - if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { - if (_curSfxFile >= _soundData->_fileListLen || _curSfxFile < 0) - _curSfxFile = 0; - _sound->loadSoundFile(_curSfxFile); - } - } - - _screen->_disableScreen = true; - loadMainScreen(8); - - if (queryGameFlag(0x2D)) { - _screen->loadBitmap("AMULET3.CPS", 10, 10, 0); - if (!queryGameFlag(0xF1)) { - for (int i = 0x55; i <= 0x5A; ++i) { - if (queryGameFlag(i)) - seq_createAmuletJewel(i-0x55, 10, 1, 1); - } - } - _screen->copyRegion(0, 0, 0, 0, 320, 200, 10, 8); - _screen->copyRegion(0, 0, 0, 0, 320, 200, 8, 0); - } - - createMouseItem(_itemInHand); - _animator->setBrandonAnimSeqSize(3, 48); - redrawInventory(0); - _animator->_noDrawShapesFlag = 1; - enterNewScene(_currentCharacter->sceneId, _currentCharacter->facing, 0, 0, 1); - _animator->_noDrawShapesFlag = 0; - - _currentCharacter->x1 = brandonX; - _currentCharacter->y1 = brandonY; - _animator->animRefreshNPC(0); - _animator->restoreAllObjectBackgrounds(); - _animator->preserveAnyChangedBackgrounds(); - _animator->prepDrawAllObjects(); - _animator->copyChangedObjectsForward(0); - _screen->copyRegion(8, 8, 8, 8, 304, 128, 2, 0); - _screen->_disableScreen = false; - _screen->updateScreen(); - - _abortWalkFlag = true; - _abortWalkFlag2 = false; - _mousePressFlag = false; - setMousePos(brandonX, brandonY); - - if (in->ioFailed()) - error("Load failed ('%s', '%s').", fileName, header.description.c_str()); - else - debugC(1, kDebugLevelMain, "Loaded savegame '%s.'", header.description.c_str()); - - // We didn't explicitly set the walk speed, but it's saved as part of - // the _timers array, so we need to re-sync it with _configWalkspeed. - setWalkspeed(_configWalkspeed); - - delete in; -} - -void KyraEngine_v1::saveGame(const char *fileName, const char *saveName) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::saveGame('%s', '%s')", fileName, saveName); - - if (_quitFlag) - return; - - Common::OutSaveFile *out = openSaveForWriting(fileName, saveName); - if (!out) - return; - - for (int i = 0; i < 11; i++) { - out->writeUint16BE(_characterList[i].sceneId); - out->writeByte(_characterList[i].height); - out->writeByte(_characterList[i].facing); - out->writeUint16BE(_characterList[i].currentAnimFrame); - //out->writeUint32BE(_characterList[i].unk6); - out->write(_characterList[i].inventoryItems, 10); - out->writeSint16BE(_characterList[i].x1); - out->writeSint16BE(_characterList[i].y1); - out->writeSint16BE(_characterList[i].x2); - out->writeSint16BE(_characterList[i].y2); - //out->writeUint16BE(_characterList[i].field_20); - //out->writeUint16BE(_characterList[i].field_23); - } - - out->writeSint16BE(_marbleVaseItem); - out->writeByte(_itemInHand); - - for (int i = 0; i < 4; ++i) - out->writeByte(_birthstoneGemTable[i]); - for (int i = 0; i < 3; ++i) - out->writeByte(_idolGemsTable[i]); - for (int i = 0; i < 3; ++i) - out->writeByte(_foyerItemTable[i]); - out->writeByte(_cauldronState); - for (int i = 0; i < 2; ++i) - out->writeByte(_crystalState[i]); - - out->writeUint16BE(_brandonStatusBit); - out->writeByte(_brandonStatusBit0x02Flag); - out->writeByte(_brandonStatusBit0x20Flag); - out->write(_brandonPoisonFlagsGFX, 256); - out->writeSint16BE(_brandonInvFlag); - out->writeByte(_poisonDeathCounter); - out->writeUint16BE(_animator->_brandonDrawFrame); - - _timer->saveDataToFile(*out); - - out->writeUint32BE(sizeof(_flagsTable)); - out->write(_flagsTable, sizeof(_flagsTable)); - - for (uint16 i = 0; i < _roomTableSize; i++) { - out->writeUint16BE(i); - out->writeByte(_roomTable[i].nameIndex); - for (int a = 0; a < 12; a++) { - out->writeByte(_roomTable[i].itemsTable[a]); - out->writeUint16BE(_roomTable[i].itemsXPos[a]); - out->writeUint16BE(_roomTable[i].itemsYPos[a]); - out->writeByte(_roomTable[i].needInit[a]); - } - } - // room table terminator - out->writeUint16BE(0xFFFF); - - out->writeSint16BE(_lastMusicCommand); - - out->writeByte(_curSfxFile); - - out->finalize(); - - // check for errors - if (out->ioFailed()) - warning("Can't write file '%s'. (Disk full?)", fileName); - else - debugC(1, kDebugLevelMain, "Saved game '%s.'", saveName); - - delete out; -} -} // end of namespace Kyra - diff --git a/engines/kyra/scene_hof.cpp b/engines/kyra/scene_hof.cpp index b072a76e66..1882386b03 100644 --- a/engines/kyra/scene_hof.cpp +++ b/engines/kyra/scene_hof.cpp @@ -98,7 +98,7 @@ void KyraEngine_HoF::enterNewScene(uint16 newScene, int facing, int unk1, int un _emc->run(&_sceneScriptState); } - Common::for_each(_wsaSlots, _wsaSlots+ARRAYSIZE(_wsaSlots), Common::mem_fun(&WSAMovieV2::close)); + Common::for_each(_wsaSlots, _wsaSlots+ARRAYSIZE(_wsaSlots), Common::mem_fun(&WSAMovie_v2::close)); _specialExitCount = 0; memset(_specialExitTable, -1, sizeof(_specialExitTable)); diff --git a/engines/kyra/scene_lok.cpp b/engines/kyra/scene_lok.cpp new file mode 100644 index 0000000000..36535eba60 --- /dev/null +++ b/engines/kyra/scene_lok.cpp @@ -0,0 +1,1284 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "kyra/kyra_lok.h" +#include "kyra/seqplayer.h" +#include "kyra/screen.h" +#include "kyra/resource.h" +#include "kyra/sound.h" +#include "kyra/sprites.h" +#include "kyra/wsamovie.h" +#include "kyra/animator_lok.h" +#include "kyra/text.h" +#include "kyra/script.h" +#include "kyra/timer.h" + +#include "common/system.h" +#include "common/savefile.h" + +namespace Kyra { + +void KyraEngine_LoK::enterNewScene(int sceneId, int facing, int unk1, int unk2, int brandonAlive) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::enterNewScene(%d, %d, %d, %d, %d)", sceneId, facing, unk1, unk2, brandonAlive); + int unkVar1 = 1; + _screen->hideMouse(); + _handleInput = false; + _abortWalkFlag = false; + _abortWalkFlag2 = false; + + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { + int newSfxFile = -1; + if (_currentCharacter->sceneId == 7 && sceneId == 24) + newSfxFile = 2; + else if (_currentCharacter->sceneId == 25 && sceneId == 109) + newSfxFile = 3; + else if (_currentCharacter->sceneId == 120 && sceneId == 37) + newSfxFile = 4; + else if (_currentCharacter->sceneId == 52 && sceneId == 199) + newSfxFile = 5; + else if (_currentCharacter->sceneId == 37 && sceneId == 120) + newSfxFile = 3; + else if (_currentCharacter->sceneId == 109 && sceneId == 25) + newSfxFile = 2; + else if (_currentCharacter->sceneId == 24 && sceneId == 7) + newSfxFile = 1; + + if (newSfxFile != -1) { + _curSfxFile = newSfxFile; + _sound->loadSoundFile(_curSfxFile); + } + } + + switch (_currentCharacter->sceneId) { + case 1: + if (sceneId == 0) { + moveCharacterToPos(0, 0, _currentCharacter->x1, 84); + unkVar1 = 0; + } + break; + + case 3: + if (sceneId == 2) { + moveCharacterToPos(0, 6, 155, _currentCharacter->y1); + unkVar1 = 0; + } + break; + + case 26: + if (sceneId == 27) { + moveCharacterToPos(0, 6, 155, _currentCharacter->y1); + unkVar1 = 0; + } + break; + + case 44: + if (sceneId == 45) { + moveCharacterToPos(0, 2, 192, _currentCharacter->y1); + unkVar1 = 0; + } + break; + + default: + break; + } + + if (unkVar1 && unk1) { + int xpos = _currentCharacter->x1; + int ypos = _currentCharacter->y1; + switch (facing) { + case 0: + ypos = _currentCharacter->y1 - 6; + break; + + case 2: + xpos = 336; + break; + + case 4: + ypos = 143; + break; + + case 6: + xpos = -16; + break; + + default: + break; + } + + moveCharacterToPos(0, facing, xpos, ypos); + } + + for (int i = 0; i < ARRAYSIZE(_movieObjects); ++i) + _movieObjects[i]->close(); + + if (!brandonAlive) { + _emc->init(&_scriptClick, &_scriptClickData); + _emc->start(&_scriptClick, 5); + while (_emc->isValid(&_scriptClick)) + _emc->run(&_scriptClick); + } + + memset(_entranceMouseCursorTracks, 0xFFFF, sizeof(uint16)*4); + _currentCharacter->sceneId = sceneId; + + assert(sceneId < _roomTableSize); + assert(_roomTable[sceneId].nameIndex < _roomFilenameTableSize); + + Room *currentRoom = &_roomTable[sceneId]; + + setupSceneResource(sceneId); + + _currentRoom = sceneId; + + int tableId = _roomTable[sceneId].nameIndex; + char fileNameBuffer[32]; + strcpy(fileNameBuffer, _roomFilenameTable[tableId]); + strcat(fileNameBuffer, ".DAT"); + _sprites->loadDat(fileNameBuffer, _sceneExits); + _sprites->setupSceneAnims(); + _emc->unload(&_scriptClickData); + loadSceneMsc(); + + _walkBlockNorth = currentRoom->northExit; + _walkBlockEast = currentRoom->eastExit; + _walkBlockSouth = currentRoom->southExit; + _walkBlockWest = currentRoom->westExit; + + if (_walkBlockNorth == 0xFFFF) + _screen->blockOutRegion(0, 0, 320, (_northExitHeight & 0xFF)+3); + if (_walkBlockEast == 0xFFFF) + _screen->blockOutRegion(312, 0, 8, 139); + if (_walkBlockSouth == 0xFFFF) + _screen->blockOutRegion(0, 135, 320, 8); + if (_walkBlockWest == 0xFFFF) + _screen->blockOutRegion(0, 0, 8, 139); + + if (!brandonAlive) + updatePlayerItemsForScene(); + + startSceneScript(brandonAlive); + setupSceneItems(); + + initSceneData(facing, unk2, brandonAlive); + + _loopFlag2 = 0; + _screen->showMouse(); + if (!brandonAlive) + seq_poisonDeathNow(0); + updateMousePointer(true); + _changedScene = true; +} + +void KyraEngine_LoK::transcendScenes(int roomIndex, int roomName) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::transcendScenes(%d, %d)", roomIndex, roomName); + assert(roomIndex < _roomTableSize); + + if (_flags.isTalkie) { + char file[32]; + assert(roomIndex < _roomTableSize); + int tableId = _roomTable[roomIndex].nameIndex; + assert(tableId < _roomFilenameTableSize); + strcpy(file, _roomFilenameTable[tableId]); + strcat(file, ".VRM"); + _res->unloadPakFile(file); + } + + _roomTable[roomIndex].nameIndex = roomName; + _unkScreenVar2 = 1; + _unkScreenVar3 = 1; + _unkScreenVar1 = 0; + _brandonPosX = _currentCharacter->x1; + _brandonPosY = _currentCharacter->y1; + enterNewScene(roomIndex, _currentCharacter->facing, 0, 0, 0); + _unkScreenVar1 = 1; + _unkScreenVar2 = 0; + _unkScreenVar3 = 0; +} + +void KyraEngine_LoK::setSceneFile(int roomIndex, int roomName) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setSceneFile(%d, %d)", roomIndex, roomName); + assert(roomIndex < _roomTableSize); + _roomTable[roomIndex].nameIndex = roomName; +} + +void KyraEngine_LoK::moveCharacterToPos(int character, int facing, int xpos, int ypos) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::moveCharacterToPos(%d, %d, %d, %d)", character, facing, xpos, ypos); + Character *ch = &_characterList[character]; + ch->facing = facing; + _screen->hideMouse(); + xpos = (int16)(xpos & 0xFFFC); + ypos = (int16)(ypos & 0xFFFE); + _timer->disable(19); + _timer->disable(14); + _timer->disable(18); + uint32 nextFrame = 0; + + switch (facing) { + case 0: + while (ypos < ch->y1) { + nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis(); + setCharacterPositionWithUpdate(character); + delayUntil(nextFrame, true); + } + break; + + case 2: + while (ch->x1 < xpos) { + nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis(); + setCharacterPositionWithUpdate(character); + delayUntil(nextFrame, true); + } + break; + + case 4: + while (ypos > ch->y1) { + nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis(); + setCharacterPositionWithUpdate(character); + delayUntil(nextFrame, true); + } + break; + + case 6: + while (ch->x1 > xpos) { + nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis(); + setCharacterPositionWithUpdate(character); + delayUntil(nextFrame, true); + } + break; + + default: + break; + } + + _timer->enable(19); + _timer->enable(14); + _timer->enable(18); + _screen->showMouse(); +} + +void KyraEngine_LoK::setCharacterPositionWithUpdate(int character) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setCharacterPositionWithUpdate(%d)", character); + setCharacterPosition(character, 0); + _sprites->updateSceneAnims(); + _timer->update(); + _animator->updateAllObjectShapes(); + updateTextFade(); + + if (_currentCharacter->sceneId == 210) + updateKyragemFading(); +} + +int KyraEngine_LoK::setCharacterPosition(int character, int *facingTable) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setCharacterPosition(%d, %p)", character, (const void *)facingTable); + + if (character == 0) { + _currentCharacter->x1 += _charXPosTable[_currentCharacter->facing]; + _currentCharacter->y1 += _charYPosTable[_currentCharacter->facing]; + setCharacterPositionHelper(0, facingTable); + return 1; + } else { + _characterList[character].x1 += _charXPosTable[_characterList[character].facing]; + _characterList[character].y1 += _charYPosTable[_characterList[character].facing]; + if (_characterList[character].sceneId == _currentCharacter->sceneId) + setCharacterPositionHelper(character, 0); + } + return 0; +} + +void KyraEngine_LoK::setCharacterPositionHelper(int character, int *facingTable) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setCharacterPositionHelper(%d, %p)", character, (const void *)facingTable); + Character *ch = &_characterList[character]; + ++ch->currentAnimFrame; + int facing = ch->facing; + if (facingTable) { + if (*facingTable != *(facingTable - 1)) { + if (*(facingTable - 1) == *(facingTable + 1)) { + facing = getOppositeFacingDirection(*(facingTable - 1)); + *facingTable = *(facingTable - 1); + } + } + } + + static uint8 facingIsZero[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + static uint8 facingIsFour[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; + + if (facing == 0) { + ++facingIsZero[character]; + } else { + bool resetTables = false; + if (facing != 7) { + if (facing - 1 != 0) { + if (facing != 4) { + if (facing == 3 || facing == 5) { + if (facingIsFour[character] > 2) + facing = 4; + resetTables = true; + } + } else { + ++facingIsFour[character]; + } + } else { + if (facingIsZero[character] > 2) + facing = 0; + resetTables = true; + } + } else { + if (facingIsZero[character] > 2) + facing = 0; + resetTables = true; + } + + if (resetTables) { + facingIsZero[character] = 0; + facingIsFour[character] = 0; + } + } + + static const uint16 maxAnimationFrame[] = { + 0x000F, 0x0031, 0x0055, 0x0000, 0x0000, 0x0000, + 0x0008, 0x002A, 0x004E, 0x0000, 0x0000, 0x0000, + 0x0022, 0x0046, 0x006A, 0x0000, 0x0000, 0x0000, + 0x001D, 0x0041, 0x0065, 0x0000, 0x0000, 0x0000, + 0x001F, 0x0043, 0x0067, 0x0000, 0x0000, 0x0000, + 0x0028, 0x004C, 0x0070, 0x0000, 0x0000, 0x0000, + 0x0023, 0x0047, 0x006B, 0x0000, 0x0000, 0x0000 + }; + + if (facing == 0) { + if (maxAnimationFrame[36+character] > ch->currentAnimFrame) + ch->currentAnimFrame = maxAnimationFrame[36+character]; + if (maxAnimationFrame[30+character] < ch->currentAnimFrame) + ch->currentAnimFrame = maxAnimationFrame[36+character]; + } else if (facing == 4) { + if (maxAnimationFrame[18+character] > ch->currentAnimFrame) + ch->currentAnimFrame = maxAnimationFrame[18+character]; + if (maxAnimationFrame[12+character] < ch->currentAnimFrame) + ch->currentAnimFrame = maxAnimationFrame[18+character]; + } else { + if (maxAnimationFrame[18+character] < ch->currentAnimFrame) + ch->currentAnimFrame = maxAnimationFrame[30+character]; + if (maxAnimationFrame[character] == ch->currentAnimFrame) + ch->currentAnimFrame = maxAnimationFrame[6+character]; + if (maxAnimationFrame[character] < ch->currentAnimFrame) + ch->currentAnimFrame = maxAnimationFrame[6+character]+2; + } + + if (character == 0 && (_brandonStatusBit & 0x10)) + ch->currentAnimFrame = 88; + + _animator->animRefreshNPC(character); +} + +void KyraEngine_LoK::loadSceneMsc() { + assert(_currentCharacter->sceneId < _roomTableSize); + int tableId = _roomTable[_currentCharacter->sceneId].nameIndex; + assert(tableId < _roomFilenameTableSize); + char fileNameBuffer[32]; + strcpy(fileNameBuffer, _roomFilenameTable[tableId]); + strcat(fileNameBuffer, ".MSC"); + _screen->fillRect(0, 0, 319, 199, 0, 5); + _res->exists(fileNameBuffer, true); + _screen->loadBitmap(fileNameBuffer, 3, 5, 0); +} + +void KyraEngine_LoK::startSceneScript(int brandonAlive) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::startSceneScript(%d)", brandonAlive); + assert(_currentCharacter->sceneId < _roomTableSize); + int tableId = _roomTable[_currentCharacter->sceneId].nameIndex; + assert(tableId < _roomFilenameTableSize); + char fileNameBuffer[32]; + strcpy(fileNameBuffer, _roomFilenameTable[tableId]); + strcat(fileNameBuffer, ".CPS"); + _screen->clearPage(3); + _res->exists(fileNameBuffer, true); + // FIXME: check this hack for amiga version + _screen->loadBitmap(fileNameBuffer, 3, 3, (_flags.platform == Common::kPlatformAmiga ? _screen->getPalette(0) : 0)); + _sprites->loadSceneShapes(); + _exitListPtr = 0; + + _scaleMode = 1; + for (int i = 0; i < 145; ++i) + _scaleTable[i] = 256; + + clearNoDropRects(); + _emc->init(&_scriptClick, &_scriptClickData); + strcpy(fileNameBuffer, _roomFilenameTable[tableId]); + strcat(fileNameBuffer, ".EMC"); + _res->exists(fileNameBuffer, true); + _emc->unload(&_scriptClickData); + _emc->load(fileNameBuffer, &_scriptClickData, &_opcodes); + _emc->start(&_scriptClick, 0); + _scriptClick.regs[0] = _currentCharacter->sceneId; + _scriptClick.regs[7] = brandonAlive; + + while (_emc->isValid(&_scriptClick)) + _emc->run(&_scriptClick); +} + +void KyraEngine_LoK::initSceneData(int facing, int unk1, int brandonAlive) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::initSceneData(%d, %d, %d)", facing, unk1, brandonAlive); + + int16 xpos2 = 0; + int setFacing = 1; + + int16 xpos = 0, ypos = 0; + + if (_brandonPosX == -1 && _brandonPosY == -1) { + switch (facing + 1) { + case 0: + xpos = ypos = -1; + break; + + case 1: case 2: case 8: + xpos = _sceneExits.southXPos; + ypos = _sceneExits.southYPos; + break; + + case 3: + xpos = _sceneExits.westXPos; + ypos = _sceneExits.westYPos; + break; + + case 4: case 5: case 6: + xpos = _sceneExits.northXPos; + ypos = _sceneExits.northYPos; + break; + + case 7: + xpos = _sceneExits.eastXPos; + ypos = _sceneExits.eastYPos; + break; + + default: + break; + } + + if ((uint8)(_northExitHeight & 0xFF) + 2 >= ypos) + ypos = (_northExitHeight & 0xFF) + 4; + if (xpos >= 308) + xpos = 304; + if ((uint8)(_northExitHeight >> 8) - 2 <= ypos) + ypos = (_northExitHeight >> 8) - 4; + if (xpos <= 12) + xpos = 16; + } + + if (_brandonPosX > -1) + xpos = _brandonPosX; + if (_brandonPosY > -1) + ypos = _brandonPosY; + + int16 ypos2 = 0; + if (_brandonPosX > -1 && _brandonPosY > -1) { + switch (_currentCharacter->sceneId) { + case 1: + _currentCharacter->x1 = xpos; + _currentCharacter->x2 = xpos; + _currentCharacter->y1 = ypos; + _currentCharacter->y2 = ypos; + facing = 4; + xpos2 = 192; + ypos2 = 104; + setFacing = 0; + unk1 = 1; + break; + + case 3: + _currentCharacter->x1 = xpos; + _currentCharacter->x2 = xpos; + _currentCharacter->y1 = ypos; + _currentCharacter->y2 = ypos; + facing = 2; + xpos2 = 204; + ypos2 = 94; + setFacing = 0; + unk1 = 1; + break; + + case 26: + _currentCharacter->x1 = xpos; + _currentCharacter->x2 = xpos; + _currentCharacter->y1 = ypos; + _currentCharacter->y2 = ypos; + facing = 2; + xpos2 = 192; + ypos2 = 128; + setFacing = 0; + unk1 = 1; + break; + + case 44: + _currentCharacter->x1 = xpos; + _currentCharacter->x2 = xpos; + _currentCharacter->y1 = ypos; + _currentCharacter->y2 = ypos; + facing = 6; + xpos2 = 156; + ypos2 = 96; + setFacing = 0; + unk1 = 1; + break; + + case 37: + _currentCharacter->x1 = xpos; + _currentCharacter->x2 = xpos; + _currentCharacter->y1 = ypos; + _currentCharacter->y2 = ypos; + facing = 2; + xpos2 = 148; + ypos2 = 114; + setFacing = 0; + unk1 = 1; + break; + + default: + break; + } + } + + _brandonPosX = _brandonPosY = -1; + + if (unk1 && setFacing) { + ypos2 = ypos; + xpos2 = xpos; + switch (facing) { + case 0: + ypos = 142; + break; + + case 2: + xpos = -16; + break; + + case 4: + ypos = (uint8)(_northExitHeight & 0xFF) - 4; + break; + + case 6: + xpos = 336; + break; + + default: + break; + } + } + + xpos2 = (int16)(xpos2 & 0xFFFC); + ypos2 = (int16)(ypos2 & 0xFFFE); + xpos = (int16)(xpos & 0xFFFC); + ypos = (int16)(ypos & 0xFFFE); + _currentCharacter->facing = facing; + _currentCharacter->x1 = xpos; + _currentCharacter->x2 = xpos; + _currentCharacter->y1 = ypos; + _currentCharacter->y2 = ypos; + + initSceneObjectList(brandonAlive); + + if (unk1 && brandonAlive == 0) + moveCharacterToPos(0, facing, xpos2, ypos2); + + _scriptClick.regs[4] = _itemInHand; + _scriptClick.regs[7] = brandonAlive; + _emc->start(&_scriptClick, 3); + while (_emc->isValid(&_scriptClick)) + _emc->run(&_scriptClick); +} + +void KyraEngine_LoK::initSceneObjectList(int brandonAlive) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::initSceneObjectList(%d)", brandonAlive); + for (int i = 0; i < 28; ++i) + _animator->actors()[i].active = 0; + + int startAnimFrame = 0; + + Animator_LoK::AnimObject *curAnimState = _animator->actors(); + curAnimState->active = 1; + curAnimState->drawY = _currentCharacter->y1; + curAnimState->sceneAnimPtr = _shapes[_currentCharacter->currentAnimFrame]; + curAnimState->animFrameNumber = _currentCharacter->currentAnimFrame; + startAnimFrame = _currentCharacter->currentAnimFrame-7; + int xOffset = _defaultShapeTable[startAnimFrame].xOffset; + int yOffset = _defaultShapeTable[startAnimFrame].yOffset; + + if (_scaleMode) { + curAnimState->x1 = _currentCharacter->x1; + curAnimState->y1 = _currentCharacter->y1; + + _animator->_brandonScaleX = _scaleTable[_currentCharacter->y1]; + _animator->_brandonScaleY = _scaleTable[_currentCharacter->y1]; + + curAnimState->x1 += (_animator->_brandonScaleX * xOffset) >> 8; + curAnimState->y1 += (_animator->_brandonScaleY * yOffset) >> 8; + } else { + curAnimState->x1 = _currentCharacter->x1 + xOffset; + curAnimState->y1 = _currentCharacter->y1 + yOffset; + } + + curAnimState->x2 = curAnimState->x1; + curAnimState->y2 = curAnimState->y1; + curAnimState->refreshFlag = 1; + curAnimState->bkgdChangeFlag = 1; + _animator->clearQueue(); + _animator->addObjectToQueue(curAnimState); + + int listAdded = 0; + int addedObjects = 1; + + for (int i = 1; i < 5; ++i) { + Character *ch = &_characterList[i]; + curAnimState = &_animator->actors()[addedObjects]; + if (ch->sceneId != _currentCharacter->sceneId) { + curAnimState->active = 0; + curAnimState->refreshFlag = 0; + curAnimState->bkgdChangeFlag = 0; + ++addedObjects; + continue; + } + + curAnimState->drawY = ch->y1; + curAnimState->sceneAnimPtr = _shapes[ch->currentAnimFrame]; + curAnimState->animFrameNumber = ch->currentAnimFrame; + startAnimFrame = ch->currentAnimFrame-7; + xOffset = _defaultShapeTable[startAnimFrame].xOffset; + yOffset = _defaultShapeTable[startAnimFrame].yOffset; + if (_scaleMode) { + curAnimState->x1 = ch->x1; + curAnimState->y1 = ch->y1; + + _animator->_brandonScaleX = _scaleTable[ch->y1]; + _animator->_brandonScaleY = _scaleTable[ch->y1]; + + curAnimState->x1 += (_animator->_brandonScaleX * xOffset) >> 8; + curAnimState->y1 += (_animator->_brandonScaleY * yOffset) >> 8; + } else { + curAnimState->x1 = ch->x1 + xOffset; + curAnimState->y1 = ch->y1 + yOffset; + } + curAnimState->x2 = curAnimState->x1; + curAnimState->y2 = curAnimState->y1; + curAnimState->active = 1; + curAnimState->refreshFlag = 1; + curAnimState->bkgdChangeFlag = 1; + + if (ch->facing >= 1 && ch->facing <= 3) + curAnimState->flags |= 1; + else if (ch->facing >= 5 && ch->facing <= 7) + curAnimState->flags &= 0xFFFFFFFE; + + _animator->addObjectToQueue(curAnimState); + + ++addedObjects; + ++listAdded; + if (listAdded < 2) + i = 5; + } + + for (int i = 0; i < 11; ++i) { + curAnimState = &_animator->sprites()[i]; + + if (_sprites->_anims[i].play) { + curAnimState->active = 1; + curAnimState->refreshFlag = 1; + curAnimState->bkgdChangeFlag = 1; + } else { + curAnimState->active = 0; + curAnimState->refreshFlag = 0; + curAnimState->bkgdChangeFlag = 0; + } + curAnimState->height = _sprites->_anims[i].height; + curAnimState->height2 = _sprites->_anims[i].height2; + curAnimState->width = _sprites->_anims[i].width + 1; + curAnimState->width2 = _sprites->_anims[i].width2; + curAnimState->drawY = _sprites->_anims[i].drawY; + curAnimState->x1 = curAnimState->x2 = _sprites->_anims[i].x; + curAnimState->y1 = curAnimState->y2 = _sprites->_anims[i].y; + curAnimState->background = _sprites->_anims[i].background; + curAnimState->sceneAnimPtr = _sprites->_sceneShapes[_sprites->_anims[i].sprite]; + + curAnimState->disable = _sprites->_anims[i].disable; + + if (_sprites->_anims[i].unk2) + curAnimState->flags = 0x800; + else + curAnimState->flags = 0; + + if (_sprites->_anims[i].flipX) + curAnimState->flags |= 0x1; + + _animator->addObjectToQueue(curAnimState); + } + + for (int i = 0; i < 12; ++i) { + curAnimState = &_animator->items()[i]; + Room *curRoom = &_roomTable[_currentCharacter->sceneId]; + byte curItem = curRoom->itemsTable[i]; + if (curItem != 0xFF) { + curAnimState->drawY = curRoom->itemsYPos[i]; + curAnimState->sceneAnimPtr = _shapes[216+curItem]; + curAnimState->animFrameNumber = (int16)0xFFFF; + curAnimState->y1 = curRoom->itemsYPos[i]; + curAnimState->x1 = curRoom->itemsXPos[i]; + + curAnimState->x1 -= (_animator->fetchAnimWidth(curAnimState->sceneAnimPtr, _scaleTable[curAnimState->drawY])) >> 1; + curAnimState->y1 -= _animator->fetchAnimHeight(curAnimState->sceneAnimPtr, _scaleTable[curAnimState->drawY]); + + curAnimState->x2 = curAnimState->x1; + curAnimState->y2 = curAnimState->y1; + + curAnimState->active = 1; + curAnimState->refreshFlag = 1; + curAnimState->bkgdChangeFlag = 1; + + _animator->addObjectToQueue(curAnimState); + } else { + curAnimState->active = 0; + curAnimState->refreshFlag = 0; + curAnimState->bkgdChangeFlag = 0; + } + } + + _animator->preserveAnyChangedBackgrounds(); + curAnimState = _animator->actors(); + curAnimState->bkgdChangeFlag = 1; + curAnimState->refreshFlag = 1; + for (int i = 1; i < 28; ++i) { + curAnimState = &_animator->objects()[i]; + if (curAnimState->active) { + curAnimState->bkgdChangeFlag = 1; + curAnimState->refreshFlag = 1; + } + } + _animator->restoreAllObjectBackgrounds(); + _animator->preserveAnyChangedBackgrounds(); + _animator->prepDrawAllObjects(); + initSceneScreen(brandonAlive); + _animator->copyChangedObjectsForward(0); +} + +void KyraEngine_LoK::initSceneScreen(int brandonAlive) { + if (_flags.platform == Common::kPlatformAmiga) { + if (_unkScreenVar1 && !queryGameFlag(0xF0)) { + memset(_screen->getPalette(2), 0, 32*3); + if (_currentCharacter->sceneId != 117 || !queryGameFlag(0xB3)) + _screen->setScreenPalette(_screen->getPalette(2)); + } + + if (_unkScreenVar2 == 1) + _screen->shuffleScreen(8, 8, 304, 128, 2, 0, _unkScreenVar3, false); + else + _screen->copyRegion(8, 8, 8, 8, 304, 128, 2, 0); + + if (_unkScreenVar1 && !queryGameFlag(0xA0)) { + if (_currentCharacter->sceneId == 45 && _paletteChanged) + memcpy(_screen->getPalette(0) + 12*3, _screen->getPalette(4) + 12*3, 2); + + if (_currentCharacter->sceneId >= 229 && _currentCharacter->sceneId <= 245 && (_brandonStatusBit & 1)) + memcpy(_screen->getPalette(0), _screen->getPalette(0) + 320*3, 64); + + _screen->setScreenPalette(_screen->getPalette(0)); + } + } else { + if (_unkScreenVar1 && !queryGameFlag(0xA0)) { + for (int i = 0; i < 60; ++i) { + uint16 col = _screen->getPalette(0)[684+i]; + col += _screen->getPalette(1)[684+i] << 1; + col >>= 2; + _screen->getPalette(0)[684+i] = col; + } + _screen->setScreenPalette(_screen->getPalette(0)); + } + + if (_unkScreenVar2 == 1) + _screen->shuffleScreen(8, 8, 304, 128, 2, 0, _unkScreenVar3, false); + else + _screen->copyRegion(8, 8, 8, 8, 304, 128, 2, 0); + + if (_unkScreenVar1 && _paletteChanged) { + if (!queryGameFlag(0xA0)) { + memcpy(_screen->getPalette(0) + 684, _screen->getPalette(1) + 684, 60); + _screen->setScreenPalette(_screen->getPalette(0)); + } else { + memset(_screen->getPalette(0), 0, 768); + } + } + } + + if (!_emc->start(&_scriptClick, 2)) + error("Could not start script function 2 of scene script"); + + _scriptClick.regs[7] = brandonAlive; + + while (_emc->isValid(&_scriptClick)) + _emc->run(&_scriptClick); + + setTextFadeTimerCountdown(-1); + if (_currentCharacter->sceneId == 210) { + if (_itemInHand != -1) + magicOutMouseItem(2, -1); + + _screen->hideMouse(); + for (int i = 0; i < 10; ++i) { + if (_currentCharacter->inventoryItems[i] != 0xFF) + magicOutMouseItem(2, i); + } + _screen->showMouse(); + } +} + +int KyraEngine_LoK::handleSceneChange(int xpos, int ypos, int unk1, int frameReset) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::handleSceneChange(%d, %d, %d, %d)", xpos, ypos, unk1, frameReset); + if (queryGameFlag(0xEF)) + unk1 = 0; + + int sceneId = _currentCharacter->sceneId; + _pathfinderFlag = 0; + + if (xpos < 12) { + if (_roomTable[sceneId].westExit != 0xFFFF) { + xpos = 12; + ypos = _sceneExits.westYPos; + _pathfinderFlag = 7; + } + } else if (xpos >= 308) { + if (_roomTable[sceneId].eastExit != 0xFFFF) { + xpos = 307; + ypos = _sceneExits.eastYPos; + _pathfinderFlag = 13; + } + } + + if (ypos <= (_northExitHeight&0xFF)+2) { + if (_roomTable[sceneId].northExit != 0xFFFF) { + xpos = _sceneExits.northXPos; + ypos = _northExitHeight & 0xFF; + _pathfinderFlag = 14; + } + } else if (ypos >= 136) { + if (_roomTable[sceneId].southExit != 0xFFFF) { + xpos = _sceneExits.southXPos; + ypos = 136; + _pathfinderFlag = 11; + } + } + + int temp = xpos - _currentCharacter->x1; + if (ABS(temp) < 4) { + temp = ypos - _currentCharacter->y1; + if (ABS(temp) < 2) + return 0; + } + + int x = (int16)(_currentCharacter->x1 & 0xFFFC); + int y = (int16)(_currentCharacter->y1 & 0xFFFE); + xpos = (int16)(xpos & 0xFFFC); + ypos = (int16)(ypos & 0xFFFE); + + int ret = findWay(x, y, xpos, ypos, _movFacingTable, 150); + _pathfinderFlag = 0; + + if (ret >= _lastFindWayRet) + _lastFindWayRet = ret; + + if (ret == 0x7D00 || ret == 0) + return 0; + + return processSceneChange(_movFacingTable, unk1, frameReset); +} + +int KyraEngine_LoK::processSceneChange(int *table, int unk1, int frameReset) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::processSceneChange(%p, %d, %d)", (const void *)table, unk1, frameReset); + if (queryGameFlag(0xEF)) + unk1 = 0; + + int *tableStart = table; + _sceneChangeState = 0; + _loopFlag2 = 0; + bool running = true; + int returnValue = 0; + uint32 nextFrame = 0; + _abortWalkFlag = false; + _mousePressFlag = false; + + while (running) { + if (_abortWalkFlag) { + *table = 8; + _currentCharacter->currentAnimFrame = 7; + _animator->animRefreshNPC(0); + _animator->updateAllObjectShapes(); + processInput(); + return 0; + } + bool forceContinue = false; + switch (*table) { + case 0: case 1: case 2: + case 3: case 4: case 5: + case 6: case 7: + _currentCharacter->facing = getOppositeFacingDirection(*table); + break; + + case 8: + forceContinue = true; + running = false; + break; + + default: + ++table; + forceContinue = true; + break; + } + + returnValue = changeScene(_currentCharacter->facing); + if (returnValue) { + running = false; + _abortWalkFlag = false; + } + + if (unk1) { + if (_mousePressFlag) { + running = false; + _sceneChangeState = 1; + } + } + + if (forceContinue || !running) + continue; + + int temp = 0; + if (table == tableStart || table[1] == 8) + temp = setCharacterPosition(0, 0); + else + temp = setCharacterPosition(0, table); + + if (temp) + ++table; + + nextFrame = _timer->getDelay(5) * _tickLength + _system->getMillis(); + while (_system->getMillis() < nextFrame) { + _timer->update(); + + if (_currentCharacter->sceneId == 210) { + updateKyragemFading(); + if (seq_playEnd() || _beadStateVar == 4 || _beadStateVar == 5) { + *table = 8; + running = false; + break; + } + } + + if ((nextFrame - _system->getMillis()) >= 10) + delay(10, true); + } + } + + if (frameReset && !(_brandonStatusBit & 2)) + _currentCharacter->currentAnimFrame = 7; + + _animator->animRefreshNPC(0); + _animator->updateAllObjectShapes(); + return returnValue; +} + +int KyraEngine_LoK::changeScene(int facing) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::changeScene(%d)", facing); + if (queryGameFlag(0xEF)) { + if (_currentCharacter->sceneId == 5) + return 0; + } + + int xpos = _charXPosTable[facing] + _currentCharacter->x1; + int ypos = _charYPosTable[facing] + _currentCharacter->y1; + + if (xpos >= 12 && xpos <= 308) { + if (!lineIsPassable(xpos, ypos)) + return false; + } + + if (_exitListPtr) { + int16 *ptr = _exitListPtr; + // this loop should be only entered one time, seems to be some hack in the original + while (true) { + if (*ptr == -1) + break; + + if (*ptr > _currentCharacter->x1 || _currentCharacter->y1 < ptr[1] || _currentCharacter->x1 > ptr[2] || _currentCharacter->y1 > ptr[3]) { + ptr += 10; + break; + } + + _brandonPosX = ptr[6]; + _brandonPosY = ptr[7]; + uint16 sceneId = ptr[5]; + facing = ptr[4]; + int unk1 = ptr[8]; + int unk2 = ptr[9]; + + if (sceneId == 0xFFFF) { + switch (facing) { + case 0: + sceneId = _roomTable[_currentCharacter->sceneId].northExit; + break; + + case 2: + sceneId = _roomTable[_currentCharacter->sceneId].eastExit; + break; + + case 4: + sceneId = _roomTable[_currentCharacter->sceneId].southExit; + break; + + case 6: + sceneId = _roomTable[_currentCharacter->sceneId].westExit; + break; + + default: + break; + } + } + + _currentCharacter->facing = facing; + _animator->animRefreshNPC(0); + _animator->updateAllObjectShapes(); + enterNewScene(sceneId, facing, unk1, unk2, 0); + resetGameFlag(0xEE); + return 1; + } + } + + int returnValue = 0; + facing = 0; + + if ((_northExitHeight & 0xFF) + 2 >= ypos || (_northExitHeight & 0xFF) + 2 >= _currentCharacter->y1) { + facing = 0; + returnValue = 1; + } + + if (xpos >= 308 || (_currentCharacter->x1 + 4) >= 308) { + facing = 2; + returnValue = 1; + } + + if (((_northExitHeight >> 8) & 0xFF) - 2 < ypos || ((_northExitHeight >> 8) & 0xFF) - 2 < _currentCharacter->y1) { + facing = 4; + returnValue = 1; + } + + if (xpos <= 12 || _currentCharacter->y1 <= 12) { + facing = 6; + returnValue = 1; + } + + if (!returnValue) + return 0; + + uint16 sceneId = 0xFFFF; + switch (facing) { + case 0: + sceneId = _roomTable[_currentCharacter->sceneId].northExit; + break; + + case 2: + sceneId = _roomTable[_currentCharacter->sceneId].eastExit; + break; + + case 4: + sceneId = _roomTable[_currentCharacter->sceneId].southExit; + break; + + default: + sceneId = _roomTable[_currentCharacter->sceneId].westExit; + break; + } + + if (sceneId == 0xFFFF) + return 0; + + enterNewScene(sceneId, facing, 1, 1, 0); + return returnValue; +} + +void KyraEngine_LoK::setCharactersInDefaultScene() { + static const uint32 defaultSceneTable[][4] = { + { 0xFFFF, 0x0004, 0x0003, 0xFFFF }, + { 0xFFFF, 0x0022, 0xFFFF, 0x0000 }, + { 0xFFFF, 0x001D, 0x0021, 0xFFFF }, + { 0xFFFF, 0x0000, 0x0000, 0xFFFF } + }; + + for (int i = 1; i < 5; ++i) { + Character *cur = &_characterList[i]; + //cur->field_20 = 0; + + const uint32 *curTable = defaultSceneTable[i-1]; + cur->sceneId = curTable[0]; + + if (cur->sceneId == _currentCharacter->sceneId) + //++cur->field_20; + cur->sceneId = curTable[1/*cur->field_20*/]; + + //cur->field_23 = curTable[cur->field_20+1]; + } +} + +void KyraEngine_LoK::setCharactersPositions(int character) { + static uint16 initXPosTable[] = { + 0x3200, 0x0024, 0x2230, 0x2F00, 0x0020, 0x002B, + 0x00CA, 0x00F0, 0x0082, 0x00A2, 0x0042 + }; + static uint8 initYPosTable[] = { + 0x00, 0xA2, 0x00, 0x42, 0x00, + 0x67, 0x67, 0x60, 0x5A, 0x71, + 0x76 + }; + + assert(character < ARRAYSIZE(initXPosTable)); + Character *edit = &_characterList[character]; + edit->x1 = edit->x2 = initXPosTable[character]; + edit->y1 = edit->y2 = initYPosTable[character]; +} + +#pragma mark - +#pragma mark - Pathfinder +#pragma mark - + +int KyraEngine_LoK::findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::findWay(%d, %d, %d, %d, %p, %d)", x, y, toX, toY, (const void *)moveTable, moveTableSize); + int ret = KyraEngine::findWay(x, y, toX, toY, moveTable, moveTableSize); + if (ret == 0x7D00) + return 0; + return getMoveTableSize(moveTable); +} + +bool KyraEngine_LoK::lineIsPassable(int x, int y) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::lineIsPassable(%d, %d)", x, y); + if (queryGameFlag(0xEF)) { + if (_currentCharacter->sceneId == 5) + return true; + } + + if (_pathfinderFlag & 2) { + if (x >= 312) + return false; + } + + if (_pathfinderFlag & 4) { + if (y >= 136) + return false; + } + + if (_pathfinderFlag & 8) { + if (x < 8) + return false; + } + + if (_pathfinderFlag2) { + if (x <= 8 || x >= 312) + return true; + if (y < (_northExitHeight & 0xFF) || y > 135) + return true; + } + + if (y > 137) + return false; + + if (y < 0) + y = 0; + + int ypos = 8; + if (_scaleMode) { + ypos = (_scaleTable[y] >> 5) + 1; + if (8 < ypos) + ypos = 8; + } + + x -= (ypos >> 1); + + int xpos = x; + int xtemp = xpos + ypos - 1; + if (x < 0) + xpos = 0; + + if (xtemp > 319) + xtemp = 319; + + for (; xpos < xtemp; ++xpos) { + if (!_screen->getShapeFlag1(xpos, y)) + return false; + } + return true; +} + +#pragma mark - + +void KyraEngine_LoK::setupSceneResource(int sceneId) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setupSceneResource(%d)", sceneId); + if (!_flags.isTalkie) + return; + + if (_currentRoom != 0xFFFF) { + assert(_currentRoom < _roomTableSize); + int tableId = _roomTable[_currentRoom].nameIndex; + assert(tableId < _roomFilenameTableSize); + + // unload our old room + char file[64]; + strcpy(file, _roomFilenameTable[tableId]); + strcat(file, ".VRM"); + _res->unloadPakFile(file); + + strcpy(file, _roomFilenameTable[tableId]); + strcat(file, ".PAK"); + _res->unloadPakFile(file); + + strcpy(file, _roomFilenameTable[tableId]); + strcat(file, ".APK"); + _res->unloadPakFile(file); + } + + assert(sceneId < _roomTableSize); + int tableId = _roomTable[sceneId].nameIndex; + assert(tableId < _roomFilenameTableSize); + + // load our new room + char file[64]; + strcpy(file, _roomFilenameTable[tableId]); + strcat(file, ".VRM"); + if (_res->exists(file)) + _res->loadPakFile(file); + + strcpy(file, _roomFilenameTable[tableId]); + strcat(file, ".PAK"); + if (_res->exists(file)) + _res->loadPakFile(file); + + strcpy(file, _roomFilenameTable[tableId]); + strcat(file, ".APK"); + if (_res->exists(file)) + _res->loadPakFile(file); +} + +} // end of namespace Kyra + diff --git a/engines/kyra/scene_v1.cpp b/engines/kyra/scene_v1.cpp deleted file mode 100644 index c5d1de82a9..0000000000 --- a/engines/kyra/scene_v1.cpp +++ /dev/null @@ -1,1284 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "kyra/kyra_v1.h" -#include "kyra/seqplayer.h" -#include "kyra/screen.h" -#include "kyra/resource.h" -#include "kyra/sound.h" -#include "kyra/sprites.h" -#include "kyra/wsamovie.h" -#include "kyra/animator_v1.h" -#include "kyra/text.h" -#include "kyra/script.h" -#include "kyra/timer.h" - -#include "common/system.h" -#include "common/savefile.h" - -namespace Kyra { - -void KyraEngine_v1::enterNewScene(int sceneId, int facing, int unk1, int unk2, int brandonAlive) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::enterNewScene(%d, %d, %d, %d, %d)", sceneId, facing, unk1, unk2, brandonAlive); - int unkVar1 = 1; - _screen->hideMouse(); - _handleInput = false; - _abortWalkFlag = false; - _abortWalkFlag2 = false; - - if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { - int newSfxFile = -1; - if (_currentCharacter->sceneId == 7 && sceneId == 24) - newSfxFile = 2; - else if (_currentCharacter->sceneId == 25 && sceneId == 109) - newSfxFile = 3; - else if (_currentCharacter->sceneId == 120 && sceneId == 37) - newSfxFile = 4; - else if (_currentCharacter->sceneId == 52 && sceneId == 199) - newSfxFile = 5; - else if (_currentCharacter->sceneId == 37 && sceneId == 120) - newSfxFile = 3; - else if (_currentCharacter->sceneId == 109 && sceneId == 25) - newSfxFile = 2; - else if (_currentCharacter->sceneId == 24 && sceneId == 7) - newSfxFile = 1; - - if (newSfxFile != -1) { - _curSfxFile = newSfxFile; - _sound->loadSoundFile(_curSfxFile); - } - } - - switch (_currentCharacter->sceneId) { - case 1: - if (sceneId == 0) { - moveCharacterToPos(0, 0, _currentCharacter->x1, 84); - unkVar1 = 0; - } - break; - - case 3: - if (sceneId == 2) { - moveCharacterToPos(0, 6, 155, _currentCharacter->y1); - unkVar1 = 0; - } - break; - - case 26: - if (sceneId == 27) { - moveCharacterToPos(0, 6, 155, _currentCharacter->y1); - unkVar1 = 0; - } - break; - - case 44: - if (sceneId == 45) { - moveCharacterToPos(0, 2, 192, _currentCharacter->y1); - unkVar1 = 0; - } - break; - - default: - break; - } - - if (unkVar1 && unk1) { - int xpos = _currentCharacter->x1; - int ypos = _currentCharacter->y1; - switch (facing) { - case 0: - ypos = _currentCharacter->y1 - 6; - break; - - case 2: - xpos = 336; - break; - - case 4: - ypos = 143; - break; - - case 6: - xpos = -16; - break; - - default: - break; - } - - moveCharacterToPos(0, facing, xpos, ypos); - } - - for (int i = 0; i < ARRAYSIZE(_movieObjects); ++i) - _movieObjects[i]->close(); - - if (!brandonAlive) { - _emc->init(&_scriptClick, &_scriptClickData); - _emc->start(&_scriptClick, 5); - while (_emc->isValid(&_scriptClick)) - _emc->run(&_scriptClick); - } - - memset(_entranceMouseCursorTracks, 0xFFFF, sizeof(uint16)*4); - _currentCharacter->sceneId = sceneId; - - assert(sceneId < _roomTableSize); - assert(_roomTable[sceneId].nameIndex < _roomFilenameTableSize); - - Room *currentRoom = &_roomTable[sceneId]; - - setupSceneResource(sceneId); - - _currentRoom = sceneId; - - int tableId = _roomTable[sceneId].nameIndex; - char fileNameBuffer[32]; - strcpy(fileNameBuffer, _roomFilenameTable[tableId]); - strcat(fileNameBuffer, ".DAT"); - _sprites->loadDat(fileNameBuffer, _sceneExits); - _sprites->setupSceneAnims(); - _emc->unload(&_scriptClickData); - loadSceneMsc(); - - _walkBlockNorth = currentRoom->northExit; - _walkBlockEast = currentRoom->eastExit; - _walkBlockSouth = currentRoom->southExit; - _walkBlockWest = currentRoom->westExit; - - if (_walkBlockNorth == 0xFFFF) - _screen->blockOutRegion(0, 0, 320, (_northExitHeight & 0xFF)+3); - if (_walkBlockEast == 0xFFFF) - _screen->blockOutRegion(312, 0, 8, 139); - if (_walkBlockSouth == 0xFFFF) - _screen->blockOutRegion(0, 135, 320, 8); - if (_walkBlockWest == 0xFFFF) - _screen->blockOutRegion(0, 0, 8, 139); - - if (!brandonAlive) - updatePlayerItemsForScene(); - - startSceneScript(brandonAlive); - setupSceneItems(); - - initSceneData(facing, unk2, brandonAlive); - - _loopFlag2 = 0; - _screen->showMouse(); - if (!brandonAlive) - seq_poisonDeathNow(0); - updateMousePointer(true); - _changedScene = true; -} - -void KyraEngine_v1::transcendScenes(int roomIndex, int roomName) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::transcendScenes(%d, %d)", roomIndex, roomName); - assert(roomIndex < _roomTableSize); - - if (_flags.isTalkie) { - char file[32]; - assert(roomIndex < _roomTableSize); - int tableId = _roomTable[roomIndex].nameIndex; - assert(tableId < _roomFilenameTableSize); - strcpy(file, _roomFilenameTable[tableId]); - strcat(file, ".VRM"); - _res->unloadPakFile(file); - } - - _roomTable[roomIndex].nameIndex = roomName; - _unkScreenVar2 = 1; - _unkScreenVar3 = 1; - _unkScreenVar1 = 0; - _brandonPosX = _currentCharacter->x1; - _brandonPosY = _currentCharacter->y1; - enterNewScene(roomIndex, _currentCharacter->facing, 0, 0, 0); - _unkScreenVar1 = 1; - _unkScreenVar2 = 0; - _unkScreenVar3 = 0; -} - -void KyraEngine_v1::setSceneFile(int roomIndex, int roomName) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::setSceneFile(%d, %d)", roomIndex, roomName); - assert(roomIndex < _roomTableSize); - _roomTable[roomIndex].nameIndex = roomName; -} - -void KyraEngine_v1::moveCharacterToPos(int character, int facing, int xpos, int ypos) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::moveCharacterToPos(%d, %d, %d, %d)", character, facing, xpos, ypos); - Character *ch = &_characterList[character]; - ch->facing = facing; - _screen->hideMouse(); - xpos = (int16)(xpos & 0xFFFC); - ypos = (int16)(ypos & 0xFFFE); - _timer->disable(19); - _timer->disable(14); - _timer->disable(18); - uint32 nextFrame = 0; - - switch (facing) { - case 0: - while (ypos < ch->y1) { - nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis(); - setCharacterPositionWithUpdate(character); - delayUntil(nextFrame, true); - } - break; - - case 2: - while (ch->x1 < xpos) { - nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis(); - setCharacterPositionWithUpdate(character); - delayUntil(nextFrame, true); - } - break; - - case 4: - while (ypos > ch->y1) { - nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis(); - setCharacterPositionWithUpdate(character); - delayUntil(nextFrame, true); - } - break; - - case 6: - while (ch->x1 > xpos) { - nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis(); - setCharacterPositionWithUpdate(character); - delayUntil(nextFrame, true); - } - break; - - default: - break; - } - - _timer->enable(19); - _timer->enable(14); - _timer->enable(18); - _screen->showMouse(); -} - -void KyraEngine_v1::setCharacterPositionWithUpdate(int character) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::setCharacterPositionWithUpdate(%d)", character); - setCharacterPosition(character, 0); - _sprites->updateSceneAnims(); - _timer->update(); - _animator->updateAllObjectShapes(); - updateTextFade(); - - if (_currentCharacter->sceneId == 210) - updateKyragemFading(); -} - -int KyraEngine_v1::setCharacterPosition(int character, int *facingTable) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::setCharacterPosition(%d, %p)", character, (const void *)facingTable); - - if (character == 0) { - _currentCharacter->x1 += _charXPosTable[_currentCharacter->facing]; - _currentCharacter->y1 += _charYPosTable[_currentCharacter->facing]; - setCharacterPositionHelper(0, facingTable); - return 1; - } else { - _characterList[character].x1 += _charXPosTable[_characterList[character].facing]; - _characterList[character].y1 += _charYPosTable[_characterList[character].facing]; - if (_characterList[character].sceneId == _currentCharacter->sceneId) - setCharacterPositionHelper(character, 0); - } - return 0; -} - -void KyraEngine_v1::setCharacterPositionHelper(int character, int *facingTable) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::setCharacterPositionHelper(%d, %p)", character, (const void *)facingTable); - Character *ch = &_characterList[character]; - ++ch->currentAnimFrame; - int facing = ch->facing; - if (facingTable) { - if (*facingTable != *(facingTable - 1)) { - if (*(facingTable - 1) == *(facingTable + 1)) { - facing = getOppositeFacingDirection(*(facingTable - 1)); - *facingTable = *(facingTable - 1); - } - } - } - - static uint8 facingIsZero[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - static uint8 facingIsFour[8] = { 0, 0, 0, 0, 0, 0, 0, 0 }; - - if (facing == 0) { - ++facingIsZero[character]; - } else { - bool resetTables = false; - if (facing != 7) { - if (facing - 1 != 0) { - if (facing != 4) { - if (facing == 3 || facing == 5) { - if (facingIsFour[character] > 2) - facing = 4; - resetTables = true; - } - } else { - ++facingIsFour[character]; - } - } else { - if (facingIsZero[character] > 2) - facing = 0; - resetTables = true; - } - } else { - if (facingIsZero[character] > 2) - facing = 0; - resetTables = true; - } - - if (resetTables) { - facingIsZero[character] = 0; - facingIsFour[character] = 0; - } - } - - static const uint16 maxAnimationFrame[] = { - 0x000F, 0x0031, 0x0055, 0x0000, 0x0000, 0x0000, - 0x0008, 0x002A, 0x004E, 0x0000, 0x0000, 0x0000, - 0x0022, 0x0046, 0x006A, 0x0000, 0x0000, 0x0000, - 0x001D, 0x0041, 0x0065, 0x0000, 0x0000, 0x0000, - 0x001F, 0x0043, 0x0067, 0x0000, 0x0000, 0x0000, - 0x0028, 0x004C, 0x0070, 0x0000, 0x0000, 0x0000, - 0x0023, 0x0047, 0x006B, 0x0000, 0x0000, 0x0000 - }; - - if (facing == 0) { - if (maxAnimationFrame[36+character] > ch->currentAnimFrame) - ch->currentAnimFrame = maxAnimationFrame[36+character]; - if (maxAnimationFrame[30+character] < ch->currentAnimFrame) - ch->currentAnimFrame = maxAnimationFrame[36+character]; - } else if (facing == 4) { - if (maxAnimationFrame[18+character] > ch->currentAnimFrame) - ch->currentAnimFrame = maxAnimationFrame[18+character]; - if (maxAnimationFrame[12+character] < ch->currentAnimFrame) - ch->currentAnimFrame = maxAnimationFrame[18+character]; - } else { - if (maxAnimationFrame[18+character] < ch->currentAnimFrame) - ch->currentAnimFrame = maxAnimationFrame[30+character]; - if (maxAnimationFrame[character] == ch->currentAnimFrame) - ch->currentAnimFrame = maxAnimationFrame[6+character]; - if (maxAnimationFrame[character] < ch->currentAnimFrame) - ch->currentAnimFrame = maxAnimationFrame[6+character]+2; - } - - if (character == 0 && (_brandonStatusBit & 0x10)) - ch->currentAnimFrame = 88; - - _animator->animRefreshNPC(character); -} - -void KyraEngine_v1::loadSceneMsc() { - assert(_currentCharacter->sceneId < _roomTableSize); - int tableId = _roomTable[_currentCharacter->sceneId].nameIndex; - assert(tableId < _roomFilenameTableSize); - char fileNameBuffer[32]; - strcpy(fileNameBuffer, _roomFilenameTable[tableId]); - strcat(fileNameBuffer, ".MSC"); - _screen->fillRect(0, 0, 319, 199, 0, 5); - _res->exists(fileNameBuffer, true); - _screen->loadBitmap(fileNameBuffer, 3, 5, 0); -} - -void KyraEngine_v1::startSceneScript(int brandonAlive) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::startSceneScript(%d)", brandonAlive); - assert(_currentCharacter->sceneId < _roomTableSize); - int tableId = _roomTable[_currentCharacter->sceneId].nameIndex; - assert(tableId < _roomFilenameTableSize); - char fileNameBuffer[32]; - strcpy(fileNameBuffer, _roomFilenameTable[tableId]); - strcat(fileNameBuffer, ".CPS"); - _screen->clearPage(3); - _res->exists(fileNameBuffer, true); - // FIXME: check this hack for amiga version - _screen->loadBitmap(fileNameBuffer, 3, 3, (_flags.platform == Common::kPlatformAmiga ? _screen->getPalette(0) : 0)); - _sprites->loadSceneShapes(); - _exitListPtr = 0; - - _scaleMode = 1; - for (int i = 0; i < 145; ++i) - _scaleTable[i] = 256; - - clearNoDropRects(); - _emc->init(&_scriptClick, &_scriptClickData); - strcpy(fileNameBuffer, _roomFilenameTable[tableId]); - strcat(fileNameBuffer, ".EMC"); - _res->exists(fileNameBuffer, true); - _emc->unload(&_scriptClickData); - _emc->load(fileNameBuffer, &_scriptClickData, &_opcodes); - _emc->start(&_scriptClick, 0); - _scriptClick.regs[0] = _currentCharacter->sceneId; - _scriptClick.regs[7] = brandonAlive; - - while (_emc->isValid(&_scriptClick)) - _emc->run(&_scriptClick); -} - -void KyraEngine_v1::initSceneData(int facing, int unk1, int brandonAlive) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::initSceneData(%d, %d, %d)", facing, unk1, brandonAlive); - - int16 xpos2 = 0; - int setFacing = 1; - - int16 xpos = 0, ypos = 0; - - if (_brandonPosX == -1 && _brandonPosY == -1) { - switch (facing + 1) { - case 0: - xpos = ypos = -1; - break; - - case 1: case 2: case 8: - xpos = _sceneExits.southXPos; - ypos = _sceneExits.southYPos; - break; - - case 3: - xpos = _sceneExits.westXPos; - ypos = _sceneExits.westYPos; - break; - - case 4: case 5: case 6: - xpos = _sceneExits.northXPos; - ypos = _sceneExits.northYPos; - break; - - case 7: - xpos = _sceneExits.eastXPos; - ypos = _sceneExits.eastYPos; - break; - - default: - break; - } - - if ((uint8)(_northExitHeight & 0xFF) + 2 >= ypos) - ypos = (_northExitHeight & 0xFF) + 4; - if (xpos >= 308) - xpos = 304; - if ((uint8)(_northExitHeight >> 8) - 2 <= ypos) - ypos = (_northExitHeight >> 8) - 4; - if (xpos <= 12) - xpos = 16; - } - - if (_brandonPosX > -1) - xpos = _brandonPosX; - if (_brandonPosY > -1) - ypos = _brandonPosY; - - int16 ypos2 = 0; - if (_brandonPosX > -1 && _brandonPosY > -1) { - switch (_currentCharacter->sceneId) { - case 1: - _currentCharacter->x1 = xpos; - _currentCharacter->x2 = xpos; - _currentCharacter->y1 = ypos; - _currentCharacter->y2 = ypos; - facing = 4; - xpos2 = 192; - ypos2 = 104; - setFacing = 0; - unk1 = 1; - break; - - case 3: - _currentCharacter->x1 = xpos; - _currentCharacter->x2 = xpos; - _currentCharacter->y1 = ypos; - _currentCharacter->y2 = ypos; - facing = 2; - xpos2 = 204; - ypos2 = 94; - setFacing = 0; - unk1 = 1; - break; - - case 26: - _currentCharacter->x1 = xpos; - _currentCharacter->x2 = xpos; - _currentCharacter->y1 = ypos; - _currentCharacter->y2 = ypos; - facing = 2; - xpos2 = 192; - ypos2 = 128; - setFacing = 0; - unk1 = 1; - break; - - case 44: - _currentCharacter->x1 = xpos; - _currentCharacter->x2 = xpos; - _currentCharacter->y1 = ypos; - _currentCharacter->y2 = ypos; - facing = 6; - xpos2 = 156; - ypos2 = 96; - setFacing = 0; - unk1 = 1; - break; - - case 37: - _currentCharacter->x1 = xpos; - _currentCharacter->x2 = xpos; - _currentCharacter->y1 = ypos; - _currentCharacter->y2 = ypos; - facing = 2; - xpos2 = 148; - ypos2 = 114; - setFacing = 0; - unk1 = 1; - break; - - default: - break; - } - } - - _brandonPosX = _brandonPosY = -1; - - if (unk1 && setFacing) { - ypos2 = ypos; - xpos2 = xpos; - switch (facing) { - case 0: - ypos = 142; - break; - - case 2: - xpos = -16; - break; - - case 4: - ypos = (uint8)(_northExitHeight & 0xFF) - 4; - break; - - case 6: - xpos = 336; - break; - - default: - break; - } - } - - xpos2 = (int16)(xpos2 & 0xFFFC); - ypos2 = (int16)(ypos2 & 0xFFFE); - xpos = (int16)(xpos & 0xFFFC); - ypos = (int16)(ypos & 0xFFFE); - _currentCharacter->facing = facing; - _currentCharacter->x1 = xpos; - _currentCharacter->x2 = xpos; - _currentCharacter->y1 = ypos; - _currentCharacter->y2 = ypos; - - initSceneObjectList(brandonAlive); - - if (unk1 && brandonAlive == 0) - moveCharacterToPos(0, facing, xpos2, ypos2); - - _scriptClick.regs[4] = _itemInHand; - _scriptClick.regs[7] = brandonAlive; - _emc->start(&_scriptClick, 3); - while (_emc->isValid(&_scriptClick)) - _emc->run(&_scriptClick); -} - -void KyraEngine_v1::initSceneObjectList(int brandonAlive) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::initSceneObjectList(%d)", brandonAlive); - for (int i = 0; i < 28; ++i) - _animator->actors()[i].active = 0; - - int startAnimFrame = 0; - - Animator_v1::AnimObject *curAnimState = _animator->actors(); - curAnimState->active = 1; - curAnimState->drawY = _currentCharacter->y1; - curAnimState->sceneAnimPtr = _shapes[_currentCharacter->currentAnimFrame]; - curAnimState->animFrameNumber = _currentCharacter->currentAnimFrame; - startAnimFrame = _currentCharacter->currentAnimFrame-7; - int xOffset = _defaultShapeTable[startAnimFrame].xOffset; - int yOffset = _defaultShapeTable[startAnimFrame].yOffset; - - if (_scaleMode) { - curAnimState->x1 = _currentCharacter->x1; - curAnimState->y1 = _currentCharacter->y1; - - _animator->_brandonScaleX = _scaleTable[_currentCharacter->y1]; - _animator->_brandonScaleY = _scaleTable[_currentCharacter->y1]; - - curAnimState->x1 += (_animator->_brandonScaleX * xOffset) >> 8; - curAnimState->y1 += (_animator->_brandonScaleY * yOffset) >> 8; - } else { - curAnimState->x1 = _currentCharacter->x1 + xOffset; - curAnimState->y1 = _currentCharacter->y1 + yOffset; - } - - curAnimState->x2 = curAnimState->x1; - curAnimState->y2 = curAnimState->y1; - curAnimState->refreshFlag = 1; - curAnimState->bkgdChangeFlag = 1; - _animator->clearQueue(); - _animator->addObjectToQueue(curAnimState); - - int listAdded = 0; - int addedObjects = 1; - - for (int i = 1; i < 5; ++i) { - Character *ch = &_characterList[i]; - curAnimState = &_animator->actors()[addedObjects]; - if (ch->sceneId != _currentCharacter->sceneId) { - curAnimState->active = 0; - curAnimState->refreshFlag = 0; - curAnimState->bkgdChangeFlag = 0; - ++addedObjects; - continue; - } - - curAnimState->drawY = ch->y1; - curAnimState->sceneAnimPtr = _shapes[ch->currentAnimFrame]; - curAnimState->animFrameNumber = ch->currentAnimFrame; - startAnimFrame = ch->currentAnimFrame-7; - xOffset = _defaultShapeTable[startAnimFrame].xOffset; - yOffset = _defaultShapeTable[startAnimFrame].yOffset; - if (_scaleMode) { - curAnimState->x1 = ch->x1; - curAnimState->y1 = ch->y1; - - _animator->_brandonScaleX = _scaleTable[ch->y1]; - _animator->_brandonScaleY = _scaleTable[ch->y1]; - - curAnimState->x1 += (_animator->_brandonScaleX * xOffset) >> 8; - curAnimState->y1 += (_animator->_brandonScaleY * yOffset) >> 8; - } else { - curAnimState->x1 = ch->x1 + xOffset; - curAnimState->y1 = ch->y1 + yOffset; - } - curAnimState->x2 = curAnimState->x1; - curAnimState->y2 = curAnimState->y1; - curAnimState->active = 1; - curAnimState->refreshFlag = 1; - curAnimState->bkgdChangeFlag = 1; - - if (ch->facing >= 1 && ch->facing <= 3) - curAnimState->flags |= 1; - else if (ch->facing >= 5 && ch->facing <= 7) - curAnimState->flags &= 0xFFFFFFFE; - - _animator->addObjectToQueue(curAnimState); - - ++addedObjects; - ++listAdded; - if (listAdded < 2) - i = 5; - } - - for (int i = 0; i < 11; ++i) { - curAnimState = &_animator->sprites()[i]; - - if (_sprites->_anims[i].play) { - curAnimState->active = 1; - curAnimState->refreshFlag = 1; - curAnimState->bkgdChangeFlag = 1; - } else { - curAnimState->active = 0; - curAnimState->refreshFlag = 0; - curAnimState->bkgdChangeFlag = 0; - } - curAnimState->height = _sprites->_anims[i].height; - curAnimState->height2 = _sprites->_anims[i].height2; - curAnimState->width = _sprites->_anims[i].width + 1; - curAnimState->width2 = _sprites->_anims[i].width2; - curAnimState->drawY = _sprites->_anims[i].drawY; - curAnimState->x1 = curAnimState->x2 = _sprites->_anims[i].x; - curAnimState->y1 = curAnimState->y2 = _sprites->_anims[i].y; - curAnimState->background = _sprites->_anims[i].background; - curAnimState->sceneAnimPtr = _sprites->_sceneShapes[_sprites->_anims[i].sprite]; - - curAnimState->disable = _sprites->_anims[i].disable; - - if (_sprites->_anims[i].unk2) - curAnimState->flags = 0x800; - else - curAnimState->flags = 0; - - if (_sprites->_anims[i].flipX) - curAnimState->flags |= 0x1; - - _animator->addObjectToQueue(curAnimState); - } - - for (int i = 0; i < 12; ++i) { - curAnimState = &_animator->items()[i]; - Room *curRoom = &_roomTable[_currentCharacter->sceneId]; - byte curItem = curRoom->itemsTable[i]; - if (curItem != 0xFF) { - curAnimState->drawY = curRoom->itemsYPos[i]; - curAnimState->sceneAnimPtr = _shapes[216+curItem]; - curAnimState->animFrameNumber = (int16)0xFFFF; - curAnimState->y1 = curRoom->itemsYPos[i]; - curAnimState->x1 = curRoom->itemsXPos[i]; - - curAnimState->x1 -= (_animator->fetchAnimWidth(curAnimState->sceneAnimPtr, _scaleTable[curAnimState->drawY])) >> 1; - curAnimState->y1 -= _animator->fetchAnimHeight(curAnimState->sceneAnimPtr, _scaleTable[curAnimState->drawY]); - - curAnimState->x2 = curAnimState->x1; - curAnimState->y2 = curAnimState->y1; - - curAnimState->active = 1; - curAnimState->refreshFlag = 1; - curAnimState->bkgdChangeFlag = 1; - - _animator->addObjectToQueue(curAnimState); - } else { - curAnimState->active = 0; - curAnimState->refreshFlag = 0; - curAnimState->bkgdChangeFlag = 0; - } - } - - _animator->preserveAnyChangedBackgrounds(); - curAnimState = _animator->actors(); - curAnimState->bkgdChangeFlag = 1; - curAnimState->refreshFlag = 1; - for (int i = 1; i < 28; ++i) { - curAnimState = &_animator->objects()[i]; - if (curAnimState->active) { - curAnimState->bkgdChangeFlag = 1; - curAnimState->refreshFlag = 1; - } - } - _animator->restoreAllObjectBackgrounds(); - _animator->preserveAnyChangedBackgrounds(); - _animator->prepDrawAllObjects(); - initSceneScreen(brandonAlive); - _animator->copyChangedObjectsForward(0); -} - -void KyraEngine_v1::initSceneScreen(int brandonAlive) { - if (_flags.platform == Common::kPlatformAmiga) { - if (_unkScreenVar1 && !queryGameFlag(0xF0)) { - memset(_screen->getPalette(2), 0, 32*3); - if (_currentCharacter->sceneId != 117 || !queryGameFlag(0xB3)) - _screen->setScreenPalette(_screen->getPalette(2)); - } - - if (_unkScreenVar2 == 1) - _screen->shuffleScreen(8, 8, 304, 128, 2, 0, _unkScreenVar3, false); - else - _screen->copyRegion(8, 8, 8, 8, 304, 128, 2, 0); - - if (_unkScreenVar1 && !queryGameFlag(0xA0)) { - if (_currentCharacter->sceneId == 45 && _paletteChanged) - memcpy(_screen->getPalette(0) + 12*3, _screen->getPalette(4) + 12*3, 2); - - if (_currentCharacter->sceneId >= 229 && _currentCharacter->sceneId <= 245 && (_brandonStatusBit & 1)) - memcpy(_screen->getPalette(0), _screen->getPalette(0) + 320*3, 64); - - _screen->setScreenPalette(_screen->getPalette(0)); - } - } else { - if (_unkScreenVar1 && !queryGameFlag(0xA0)) { - for (int i = 0; i < 60; ++i) { - uint16 col = _screen->getPalette(0)[684+i]; - col += _screen->getPalette(1)[684+i] << 1; - col >>= 2; - _screen->getPalette(0)[684+i] = col; - } - _screen->setScreenPalette(_screen->getPalette(0)); - } - - if (_unkScreenVar2 == 1) - _screen->shuffleScreen(8, 8, 304, 128, 2, 0, _unkScreenVar3, false); - else - _screen->copyRegion(8, 8, 8, 8, 304, 128, 2, 0); - - if (_unkScreenVar1 && _paletteChanged) { - if (!queryGameFlag(0xA0)) { - memcpy(_screen->getPalette(0) + 684, _screen->getPalette(1) + 684, 60); - _screen->setScreenPalette(_screen->getPalette(0)); - } else { - memset(_screen->getPalette(0), 0, 768); - } - } - } - - if (!_emc->start(&_scriptClick, 2)) - error("Could not start script function 2 of scene script"); - - _scriptClick.regs[7] = brandonAlive; - - while (_emc->isValid(&_scriptClick)) - _emc->run(&_scriptClick); - - setTextFadeTimerCountdown(-1); - if (_currentCharacter->sceneId == 210) { - if (_itemInHand != -1) - magicOutMouseItem(2, -1); - - _screen->hideMouse(); - for (int i = 0; i < 10; ++i) { - if (_currentCharacter->inventoryItems[i] != 0xFF) - magicOutMouseItem(2, i); - } - _screen->showMouse(); - } -} - -int KyraEngine_v1::handleSceneChange(int xpos, int ypos, int unk1, int frameReset) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::handleSceneChange(%d, %d, %d, %d)", xpos, ypos, unk1, frameReset); - if (queryGameFlag(0xEF)) - unk1 = 0; - - int sceneId = _currentCharacter->sceneId; - _pathfinderFlag = 0; - - if (xpos < 12) { - if (_roomTable[sceneId].westExit != 0xFFFF) { - xpos = 12; - ypos = _sceneExits.westYPos; - _pathfinderFlag = 7; - } - } else if (xpos >= 308) { - if (_roomTable[sceneId].eastExit != 0xFFFF) { - xpos = 307; - ypos = _sceneExits.eastYPos; - _pathfinderFlag = 13; - } - } - - if (ypos <= (_northExitHeight&0xFF)+2) { - if (_roomTable[sceneId].northExit != 0xFFFF) { - xpos = _sceneExits.northXPos; - ypos = _northExitHeight & 0xFF; - _pathfinderFlag = 14; - } - } else if (ypos >= 136) { - if (_roomTable[sceneId].southExit != 0xFFFF) { - xpos = _sceneExits.southXPos; - ypos = 136; - _pathfinderFlag = 11; - } - } - - int temp = xpos - _currentCharacter->x1; - if (ABS(temp) < 4) { - temp = ypos - _currentCharacter->y1; - if (ABS(temp) < 2) - return 0; - } - - int x = (int16)(_currentCharacter->x1 & 0xFFFC); - int y = (int16)(_currentCharacter->y1 & 0xFFFE); - xpos = (int16)(xpos & 0xFFFC); - ypos = (int16)(ypos & 0xFFFE); - - int ret = findWay(x, y, xpos, ypos, _movFacingTable, 150); - _pathfinderFlag = 0; - - if (ret >= _lastFindWayRet) - _lastFindWayRet = ret; - - if (ret == 0x7D00 || ret == 0) - return 0; - - return processSceneChange(_movFacingTable, unk1, frameReset); -} - -int KyraEngine_v1::processSceneChange(int *table, int unk1, int frameReset) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::processSceneChange(%p, %d, %d)", (const void *)table, unk1, frameReset); - if (queryGameFlag(0xEF)) - unk1 = 0; - - int *tableStart = table; - _sceneChangeState = 0; - _loopFlag2 = 0; - bool running = true; - int returnValue = 0; - uint32 nextFrame = 0; - _abortWalkFlag = false; - _mousePressFlag = false; - - while (running) { - if (_abortWalkFlag) { - *table = 8; - _currentCharacter->currentAnimFrame = 7; - _animator->animRefreshNPC(0); - _animator->updateAllObjectShapes(); - processInput(); - return 0; - } - bool forceContinue = false; - switch (*table) { - case 0: case 1: case 2: - case 3: case 4: case 5: - case 6: case 7: - _currentCharacter->facing = getOppositeFacingDirection(*table); - break; - - case 8: - forceContinue = true; - running = false; - break; - - default: - ++table; - forceContinue = true; - break; - } - - returnValue = changeScene(_currentCharacter->facing); - if (returnValue) { - running = false; - _abortWalkFlag = false; - } - - if (unk1) { - if (_mousePressFlag) { - running = false; - _sceneChangeState = 1; - } - } - - if (forceContinue || !running) - continue; - - int temp = 0; - if (table == tableStart || table[1] == 8) - temp = setCharacterPosition(0, 0); - else - temp = setCharacterPosition(0, table); - - if (temp) - ++table; - - nextFrame = _timer->getDelay(5) * _tickLength + _system->getMillis(); - while (_system->getMillis() < nextFrame) { - _timer->update(); - - if (_currentCharacter->sceneId == 210) { - updateKyragemFading(); - if (seq_playEnd() || _beadStateVar == 4 || _beadStateVar == 5) { - *table = 8; - running = false; - break; - } - } - - if ((nextFrame - _system->getMillis()) >= 10) - delay(10, true); - } - } - - if (frameReset && !(_brandonStatusBit & 2)) - _currentCharacter->currentAnimFrame = 7; - - _animator->animRefreshNPC(0); - _animator->updateAllObjectShapes(); - return returnValue; -} - -int KyraEngine_v1::changeScene(int facing) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::changeScene(%d)", facing); - if (queryGameFlag(0xEF)) { - if (_currentCharacter->sceneId == 5) - return 0; - } - - int xpos = _charXPosTable[facing] + _currentCharacter->x1; - int ypos = _charYPosTable[facing] + _currentCharacter->y1; - - if (xpos >= 12 && xpos <= 308) { - if (!lineIsPassable(xpos, ypos)) - return false; - } - - if (_exitListPtr) { - int16 *ptr = _exitListPtr; - // this loop should be only entered one time, seems to be some hack in the original - while (true) { - if (*ptr == -1) - break; - - if (*ptr > _currentCharacter->x1 || _currentCharacter->y1 < ptr[1] || _currentCharacter->x1 > ptr[2] || _currentCharacter->y1 > ptr[3]) { - ptr += 10; - break; - } - - _brandonPosX = ptr[6]; - _brandonPosY = ptr[7]; - uint16 sceneId = ptr[5]; - facing = ptr[4]; - int unk1 = ptr[8]; - int unk2 = ptr[9]; - - if (sceneId == 0xFFFF) { - switch (facing) { - case 0: - sceneId = _roomTable[_currentCharacter->sceneId].northExit; - break; - - case 2: - sceneId = _roomTable[_currentCharacter->sceneId].eastExit; - break; - - case 4: - sceneId = _roomTable[_currentCharacter->sceneId].southExit; - break; - - case 6: - sceneId = _roomTable[_currentCharacter->sceneId].westExit; - break; - - default: - break; - } - } - - _currentCharacter->facing = facing; - _animator->animRefreshNPC(0); - _animator->updateAllObjectShapes(); - enterNewScene(sceneId, facing, unk1, unk2, 0); - resetGameFlag(0xEE); - return 1; - } - } - - int returnValue = 0; - facing = 0; - - if ((_northExitHeight & 0xFF) + 2 >= ypos || (_northExitHeight & 0xFF) + 2 >= _currentCharacter->y1) { - facing = 0; - returnValue = 1; - } - - if (xpos >= 308 || (_currentCharacter->x1 + 4) >= 308) { - facing = 2; - returnValue = 1; - } - - if (((_northExitHeight >> 8) & 0xFF) - 2 < ypos || ((_northExitHeight >> 8) & 0xFF) - 2 < _currentCharacter->y1) { - facing = 4; - returnValue = 1; - } - - if (xpos <= 12 || _currentCharacter->y1 <= 12) { - facing = 6; - returnValue = 1; - } - - if (!returnValue) - return 0; - - uint16 sceneId = 0xFFFF; - switch (facing) { - case 0: - sceneId = _roomTable[_currentCharacter->sceneId].northExit; - break; - - case 2: - sceneId = _roomTable[_currentCharacter->sceneId].eastExit; - break; - - case 4: - sceneId = _roomTable[_currentCharacter->sceneId].southExit; - break; - - default: - sceneId = _roomTable[_currentCharacter->sceneId].westExit; - break; - } - - if (sceneId == 0xFFFF) - return 0; - - enterNewScene(sceneId, facing, 1, 1, 0); - return returnValue; -} - -void KyraEngine_v1::setCharactersInDefaultScene() { - static const uint32 defaultSceneTable[][4] = { - { 0xFFFF, 0x0004, 0x0003, 0xFFFF }, - { 0xFFFF, 0x0022, 0xFFFF, 0x0000 }, - { 0xFFFF, 0x001D, 0x0021, 0xFFFF }, - { 0xFFFF, 0x0000, 0x0000, 0xFFFF } - }; - - for (int i = 1; i < 5; ++i) { - Character *cur = &_characterList[i]; - //cur->field_20 = 0; - - const uint32 *curTable = defaultSceneTable[i-1]; - cur->sceneId = curTable[0]; - - if (cur->sceneId == _currentCharacter->sceneId) - //++cur->field_20; - cur->sceneId = curTable[1/*cur->field_20*/]; - - //cur->field_23 = curTable[cur->field_20+1]; - } -} - -void KyraEngine_v1::setCharactersPositions(int character) { - static uint16 initXPosTable[] = { - 0x3200, 0x0024, 0x2230, 0x2F00, 0x0020, 0x002B, - 0x00CA, 0x00F0, 0x0082, 0x00A2, 0x0042 - }; - static uint8 initYPosTable[] = { - 0x00, 0xA2, 0x00, 0x42, 0x00, - 0x67, 0x67, 0x60, 0x5A, 0x71, - 0x76 - }; - - assert(character < ARRAYSIZE(initXPosTable)); - Character *edit = &_characterList[character]; - edit->x1 = edit->x2 = initXPosTable[character]; - edit->y1 = edit->y2 = initYPosTable[character]; -} - -#pragma mark - -#pragma mark - Pathfinder -#pragma mark - - -int KyraEngine_v1::findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::findWay(%d, %d, %d, %d, %p, %d)", x, y, toX, toY, (const void *)moveTable, moveTableSize); - int ret = KyraEngine::findWay(x, y, toX, toY, moveTable, moveTableSize); - if (ret == 0x7D00) - return 0; - return getMoveTableSize(moveTable); -} - -bool KyraEngine_v1::lineIsPassable(int x, int y) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::lineIsPassable(%d, %d)", x, y); - if (queryGameFlag(0xEF)) { - if (_currentCharacter->sceneId == 5) - return true; - } - - if (_pathfinderFlag & 2) { - if (x >= 312) - return false; - } - - if (_pathfinderFlag & 4) { - if (y >= 136) - return false; - } - - if (_pathfinderFlag & 8) { - if (x < 8) - return false; - } - - if (_pathfinderFlag2) { - if (x <= 8 || x >= 312) - return true; - if (y < (_northExitHeight & 0xFF) || y > 135) - return true; - } - - if (y > 137) - return false; - - if (y < 0) - y = 0; - - int ypos = 8; - if (_scaleMode) { - ypos = (_scaleTable[y] >> 5) + 1; - if (8 < ypos) - ypos = 8; - } - - x -= (ypos >> 1); - - int xpos = x; - int xtemp = xpos + ypos - 1; - if (x < 0) - xpos = 0; - - if (xtemp > 319) - xtemp = 319; - - for (; xpos < xtemp; ++xpos) { - if (!_screen->getShapeFlag1(xpos, y)) - return false; - } - return true; -} - -#pragma mark - - -void KyraEngine_v1::setupSceneResource(int sceneId) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::setupSceneResource(%d)", sceneId); - if (!_flags.isTalkie) - return; - - if (_currentRoom != 0xFFFF) { - assert(_currentRoom < _roomTableSize); - int tableId = _roomTable[_currentRoom].nameIndex; - assert(tableId < _roomFilenameTableSize); - - // unload our old room - char file[64]; - strcpy(file, _roomFilenameTable[tableId]); - strcat(file, ".VRM"); - _res->unloadPakFile(file); - - strcpy(file, _roomFilenameTable[tableId]); - strcat(file, ".PAK"); - _res->unloadPakFile(file); - - strcpy(file, _roomFilenameTable[tableId]); - strcat(file, ".APK"); - _res->unloadPakFile(file); - } - - assert(sceneId < _roomTableSize); - int tableId = _roomTable[sceneId].nameIndex; - assert(tableId < _roomFilenameTableSize); - - // load our new room - char file[64]; - strcpy(file, _roomFilenameTable[tableId]); - strcat(file, ".VRM"); - if (_res->exists(file)) - _res->loadPakFile(file); - - strcpy(file, _roomFilenameTable[tableId]); - strcat(file, ".PAK"); - if (_res->exists(file)) - _res->loadPakFile(file); - - strcpy(file, _roomFilenameTable[tableId]); - strcat(file, ".APK"); - if (_res->exists(file)) - _res->loadPakFile(file); -} - -} // end of namespace Kyra - diff --git a/engines/kyra/screen_lok.cpp b/engines/kyra/screen_lok.cpp new file mode 100644 index 0000000000..011c90dde9 --- /dev/null +++ b/engines/kyra/screen_lok.cpp @@ -0,0 +1,243 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "kyra/kyra_lok.h" +#include "kyra/screen_lok.h" + +namespace Kyra { + +#define BITBLIT_RECTS 10 + +Screen_LoK::Screen_LoK(KyraEngine_LoK *vm, OSystem *system) + : Screen(vm, system) { + _vm = vm; +} + +Screen_LoK::~Screen_LoK() { + delete[] _bitBlitRects; + + for (int i = 0; i < ARRAYSIZE(_saveLoadPage); ++i) { + delete[] _saveLoadPage[i]; + _saveLoadPage[i] = 0; + } + + for (int i = 0; i < ARRAYSIZE(_saveLoadPageOvl); ++i) { + delete[] _saveLoadPageOvl[i]; + _saveLoadPageOvl[i] = 0; + } + + delete[] _unkPtr1; + delete[] _unkPtr2; +} + +bool Screen_LoK::init() { + if (!Screen::init()) + return false; + + _bitBlitRects = new Rect[BITBLIT_RECTS]; + assert(_bitBlitRects); + memset(_bitBlitRects, 0, sizeof(Rect)*BITBLIT_RECTS); + _bitBlitNum = 0; + memset(_saveLoadPage, 0, sizeof(_saveLoadPage)); + memset(_saveLoadPageOvl, 0, sizeof(_saveLoadPageOvl)); + + _unkPtr1 = new uint8[getRectSize(1, 144)]; + assert(_unkPtr1); + memset(_unkPtr1, 0, getRectSize(1, 144)); + _unkPtr2 = new uint8[getRectSize(1, 144)]; + assert(_unkPtr2); + memset(_unkPtr2, 0, getRectSize(1, 144)); + + return true; +} + +void Screen_LoK::setScreenDim(int dim) { + debugC(9, kDebugLevelScreen, "Screen_LoK::setScreenDim(%d)", dim); + assert(dim < _screenDimTableCount); + _curDim = &_screenDimTable[dim]; +} + +const ScreenDim *Screen_LoK::getScreenDim(int dim) { + debugC(9, kDebugLevelScreen, "Screen_LoK::getScreenDim(%d)", dim); + assert(dim < _screenDimTableCount); + return &_screenDimTable[dim]; +} + +void Screen_LoK::fadeSpecialPalette(int palIndex, int startIndex, int size, int fadeTime) { + debugC(9, kDebugLevelScreen, "Screen_LoK::fadeSpecialPalette(%d, %d, %d, %d)", palIndex, startIndex, size, fadeTime); + + assert(_vm->palTable1()[palIndex]); + assert(_currentPalette); + uint8 tempPal[768]; + memcpy(tempPal, _currentPalette, 768); + memcpy(&tempPal[startIndex*3], _vm->palTable1()[palIndex], size*3); + fadePalette(tempPal, fadeTime*18); + memcpy(&_currentPalette[startIndex*3], &tempPal[startIndex*3], size*3); + setScreenPalette(_currentPalette); + _system->updateScreen(); +} + +void Screen_LoK::addBitBlitRect(int x, int y, int w, int h) { + debugC(9, kDebugLevelScreen, "Screen_LoK::addBitBlitRects(%d, %d, %d, %d)", x, y, w, h); + if (_bitBlitNum >= BITBLIT_RECTS) + error("too many bit blit rects"); + + _bitBlitRects[_bitBlitNum].x = x; + _bitBlitRects[_bitBlitNum].y = y; + _bitBlitRects[_bitBlitNum].x2 = w; + _bitBlitRects[_bitBlitNum].y2 = h; + ++_bitBlitNum; +} + +void Screen_LoK::bitBlitRects() { + debugC(9, kDebugLevelScreen, "Screen_LoK::bitBlitRects()"); + Rect *cur = _bitBlitRects; + while (_bitBlitNum) { + _bitBlitNum--; + copyRegion(cur->x, cur->y, cur->x, cur->y, cur->x2, cur->y2, 2, 0); + ++cur; + } +} + +void Screen_LoK::savePageToDisk(const char *file, int page) { + debugC(9, kDebugLevelScreen, "Screen_LoK::savePageToDisk('%s', %d)", file, page); + if (!_saveLoadPage[page/2]) { + _saveLoadPage[page/2] = new uint8[SCREEN_W * SCREEN_H]; + assert(_saveLoadPage[page/2]); + } + memcpy(_saveLoadPage[page/2], getPagePtr(page), SCREEN_W * SCREEN_H); + + if (_useOverlays) { + if (!_saveLoadPageOvl[page/2]) { + _saveLoadPageOvl[page/2] = new uint8[SCREEN_OVL_SJIS_SIZE]; + assert(_saveLoadPageOvl[page/2]); + } + + uint8 *srcPage = getOverlayPtr(page); + if (!srcPage) { + warning("trying to save unsupported overlay page %d", page); + return; + } + + memcpy(_saveLoadPageOvl[page/2], srcPage, SCREEN_OVL_SJIS_SIZE); + } +} + +void Screen_LoK::loadPageFromDisk(const char *file, int page) { + debugC(9, kDebugLevelScreen, "Screen_LoK::loadPageFromDisk('%s', %d)", file, page); + copyBlockToPage(page, 0, 0, SCREEN_W, SCREEN_H, _saveLoadPage[page/2]); + delete[] _saveLoadPage[page/2]; + + if (_saveLoadPageOvl[page/2]) { + uint8 *dstPage = getOverlayPtr(page); + if (!dstPage) { + warning("trying to restore unsupported overlay page %d", page); + return; + } + + memcpy(dstPage, _saveLoadPageOvl[page/2], SCREEN_OVL_SJIS_SIZE); + delete[] _saveLoadPageOvl[page/2]; + _saveLoadPageOvl[page/2] = 0; + } _saveLoadPage[page/2] = 0; +} + +void Screen_LoK::deletePageFromDisk(int page) { + debugC(9, kDebugLevelScreen, "Screen_LoK::deletePageFromDisk(%d)", page); + delete[] _saveLoadPage[page/2]; + _saveLoadPage[page/2] = 0; + + if (_saveLoadPageOvl[page/2]) { + delete[] _saveLoadPageOvl[page/2]; + _saveLoadPageOvl[page/2] = 0; + } +} + +void Screen_LoK::copyBackgroundBlock(int x, int page, int flag) { + debugC(9, kDebugLevelScreen, "Screen_LoK::copyBackgroundBlock(%d, %d, %d)", x, page, flag); + + if (x < 1) + return; + + int height = 128; + if (flag) + height += 8; + if (!(x & 1)) + ++x; + if (x == 19) + x = 17; + + uint8 *ptr1 = _unkPtr1; + uint8 *ptr2 = _unkPtr2; + int oldVideoPage = _curPage; + _curPage = page; + + int curX = x; + hideMouse(); + copyRegionToBuffer(_curPage, 8, 8, 8, height, ptr2); + for (int i = 0; i < 19; ++i) { + int tempX = curX + 1; + copyRegionToBuffer(_curPage, tempX<<3, 8, 8, height, ptr1); + copyBlockToPage(_curPage, tempX<<3, 8, 8, height, ptr2); + int newXPos = curX + x; + if (newXPos > 37) + newXPos = newXPos % 38; + + tempX = newXPos + 1; + copyRegionToBuffer(_curPage, tempX<<3, 8, 8, height, ptr2); + copyBlockToPage(_curPage, tempX<<3, 8, 8, height, ptr1); + curX += x*2; + if (curX > 37) { + curX = curX % 38; + } + } + showMouse(); + _curPage = oldVideoPage; +} + +void Screen_LoK::copyBackgroundBlock2(int x) { + debugC(9, kDebugLevelScreen, "Screen_LoK::copyBackgroundBlock2(%d)", x); + copyBackgroundBlock(x, 4, 1); +} + +void Screen_LoK::setTextColorMap(const uint8 *cmap) { + debugC(9, kDebugLevelScreen, "Screen_LoK::setTextColorMap(%p)", (const void *)cmap); + setTextColor(cmap, 0, 11); +} + +int Screen_LoK::getRectSize(int x, int y) { + if (x < 1) + x = 1; + else if (x > 40) + x = 40; + + if (y < 1) + y = 1; + else if (y > 200) + y = 200; + + return ((x*y) << 3); +} + +} // end of namespace Kyra diff --git a/engines/kyra/screen_lok.h b/engines/kyra/screen_lok.h new file mode 100644 index 0000000000..74df23a543 --- /dev/null +++ b/engines/kyra/screen_lok.h @@ -0,0 +1,77 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef KYRA_SCREEN_LOK_H +#define KYRA_SCREEN_LOK_H + +#include "kyra/screen.h" + +namespace Kyra { + +class KyraEngine_LoK; + +class Screen_LoK : public Screen { +public: + Screen_LoK(KyraEngine_LoK *vm, OSystem *system); + virtual ~Screen_LoK(); + + bool init(); + + int getRectSize(int w, int h); + + void setScreenDim(int dim); + const ScreenDim *getScreenDim(int dim); + + void setTextColorMap(const uint8 *cmap); + + void fadeSpecialPalette(int palIndex, int startIndex, int size, int fadeTime); + + void savePageToDisk(const char *file, int page); + void loadPageFromDisk(const char *file, int page); + void deletePageFromDisk(int page); + + void copyBackgroundBlock(int x, int page, int flag); + void copyBackgroundBlock2(int x); + + void addBitBlitRect(int x, int y, int w, int h); + void bitBlitRects(); + +protected: + KyraEngine_LoK *_vm; + + static const ScreenDim _screenDimTable[]; + static const int _screenDimTableCount; + + Rect *_bitBlitRects; + int _bitBlitNum; + uint8 *_unkPtr1, *_unkPtr2; + + uint8 *_saveLoadPage[8]; + uint8 *_saveLoadPageOvl[8]; +}; + +} // end of namespace Kyra + +#endif diff --git a/engines/kyra/screen_v1.cpp b/engines/kyra/screen_v1.cpp deleted file mode 100644 index 7af01358e5..0000000000 --- a/engines/kyra/screen_v1.cpp +++ /dev/null @@ -1,243 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "kyra/kyra_v1.h" -#include "kyra/screen_v1.h" - -namespace Kyra { - -#define BITBLIT_RECTS 10 - -Screen_v1::Screen_v1(KyraEngine_v1 *vm, OSystem *system) - : Screen(vm, system) { - _vm = vm; -} - -Screen_v1::~Screen_v1() { - delete[] _bitBlitRects; - - for (int i = 0; i < ARRAYSIZE(_saveLoadPage); ++i) { - delete[] _saveLoadPage[i]; - _saveLoadPage[i] = 0; - } - - for (int i = 0; i < ARRAYSIZE(_saveLoadPageOvl); ++i) { - delete[] _saveLoadPageOvl[i]; - _saveLoadPageOvl[i] = 0; - } - - delete[] _unkPtr1; - delete[] _unkPtr2; -} - -bool Screen_v1::init() { - if (!Screen::init()) - return false; - - _bitBlitRects = new Rect[BITBLIT_RECTS]; - assert(_bitBlitRects); - memset(_bitBlitRects, 0, sizeof(Rect)*BITBLIT_RECTS); - _bitBlitNum = 0; - memset(_saveLoadPage, 0, sizeof(_saveLoadPage)); - memset(_saveLoadPageOvl, 0, sizeof(_saveLoadPageOvl)); - - _unkPtr1 = new uint8[getRectSize(1, 144)]; - assert(_unkPtr1); - memset(_unkPtr1, 0, getRectSize(1, 144)); - _unkPtr2 = new uint8[getRectSize(1, 144)]; - assert(_unkPtr2); - memset(_unkPtr2, 0, getRectSize(1, 144)); - - return true; -} - -void Screen_v1::setScreenDim(int dim) { - debugC(9, kDebugLevelScreen, "Screen_v1::setScreenDim(%d)", dim); - assert(dim < _screenDimTableCount); - _curDim = &_screenDimTable[dim]; -} - -const ScreenDim *Screen_v1::getScreenDim(int dim) { - debugC(9, kDebugLevelScreen, "Screen_v1::getScreenDim(%d)", dim); - assert(dim < _screenDimTableCount); - return &_screenDimTable[dim]; -} - -void Screen_v1::fadeSpecialPalette(int palIndex, int startIndex, int size, int fadeTime) { - debugC(9, kDebugLevelScreen, "Screen_v1::fadeSpecialPalette(%d, %d, %d, %d)", palIndex, startIndex, size, fadeTime); - - assert(_vm->palTable1()[palIndex]); - assert(_currentPalette); - uint8 tempPal[768]; - memcpy(tempPal, _currentPalette, 768); - memcpy(&tempPal[startIndex*3], _vm->palTable1()[palIndex], size*3); - fadePalette(tempPal, fadeTime*18); - memcpy(&_currentPalette[startIndex*3], &tempPal[startIndex*3], size*3); - setScreenPalette(_currentPalette); - _system->updateScreen(); -} - -void Screen_v1::addBitBlitRect(int x, int y, int w, int h) { - debugC(9, kDebugLevelScreen, "Screen_v1::addBitBlitRects(%d, %d, %d, %d)", x, y, w, h); - if (_bitBlitNum >= BITBLIT_RECTS) - error("too many bit blit rects"); - - _bitBlitRects[_bitBlitNum].x = x; - _bitBlitRects[_bitBlitNum].y = y; - _bitBlitRects[_bitBlitNum].x2 = w; - _bitBlitRects[_bitBlitNum].y2 = h; - ++_bitBlitNum; -} - -void Screen_v1::bitBlitRects() { - debugC(9, kDebugLevelScreen, "Screen_v1::bitBlitRects()"); - Rect *cur = _bitBlitRects; - while (_bitBlitNum) { - _bitBlitNum--; - copyRegion(cur->x, cur->y, cur->x, cur->y, cur->x2, cur->y2, 2, 0); - ++cur; - } -} - -void Screen_v1::savePageToDisk(const char *file, int page) { - debugC(9, kDebugLevelScreen, "Screen_v1::savePageToDisk('%s', %d)", file, page); - if (!_saveLoadPage[page/2]) { - _saveLoadPage[page/2] = new uint8[SCREEN_W * SCREEN_H]; - assert(_saveLoadPage[page/2]); - } - memcpy(_saveLoadPage[page/2], getPagePtr(page), SCREEN_W * SCREEN_H); - - if (_useOverlays) { - if (!_saveLoadPageOvl[page/2]) { - _saveLoadPageOvl[page/2] = new uint8[SCREEN_OVL_SJIS_SIZE]; - assert(_saveLoadPageOvl[page/2]); - } - - uint8 *srcPage = getOverlayPtr(page); - if (!srcPage) { - warning("trying to save unsupported overlay page %d", page); - return; - } - - memcpy(_saveLoadPageOvl[page/2], srcPage, SCREEN_OVL_SJIS_SIZE); - } -} - -void Screen_v1::loadPageFromDisk(const char *file, int page) { - debugC(9, kDebugLevelScreen, "Screen_v1::loadPageFromDisk('%s', %d)", file, page); - copyBlockToPage(page, 0, 0, SCREEN_W, SCREEN_H, _saveLoadPage[page/2]); - delete[] _saveLoadPage[page/2]; - - if (_saveLoadPageOvl[page/2]) { - uint8 *dstPage = getOverlayPtr(page); - if (!dstPage) { - warning("trying to restore unsupported overlay page %d", page); - return; - } - - memcpy(dstPage, _saveLoadPageOvl[page/2], SCREEN_OVL_SJIS_SIZE); - delete[] _saveLoadPageOvl[page/2]; - _saveLoadPageOvl[page/2] = 0; - } _saveLoadPage[page/2] = 0; -} - -void Screen_v1::deletePageFromDisk(int page) { - debugC(9, kDebugLevelScreen, "Screen_v1::deletePageFromDisk(%d)", page); - delete[] _saveLoadPage[page/2]; - _saveLoadPage[page/2] = 0; - - if (_saveLoadPageOvl[page/2]) { - delete[] _saveLoadPageOvl[page/2]; - _saveLoadPageOvl[page/2] = 0; - } -} - -void Screen_v1::copyBackgroundBlock(int x, int page, int flag) { - debugC(9, kDebugLevelScreen, "Screen_v1::copyBackgroundBlock(%d, %d, %d)", x, page, flag); - - if (x < 1) - return; - - int height = 128; - if (flag) - height += 8; - if (!(x & 1)) - ++x; - if (x == 19) - x = 17; - - uint8 *ptr1 = _unkPtr1; - uint8 *ptr2 = _unkPtr2; - int oldVideoPage = _curPage; - _curPage = page; - - int curX = x; - hideMouse(); - copyRegionToBuffer(_curPage, 8, 8, 8, height, ptr2); - for (int i = 0; i < 19; ++i) { - int tempX = curX + 1; - copyRegionToBuffer(_curPage, tempX<<3, 8, 8, height, ptr1); - copyBlockToPage(_curPage, tempX<<3, 8, 8, height, ptr2); - int newXPos = curX + x; - if (newXPos > 37) - newXPos = newXPos % 38; - - tempX = newXPos + 1; - copyRegionToBuffer(_curPage, tempX<<3, 8, 8, height, ptr2); - copyBlockToPage(_curPage, tempX<<3, 8, 8, height, ptr1); - curX += x*2; - if (curX > 37) { - curX = curX % 38; - } - } - showMouse(); - _curPage = oldVideoPage; -} - -void Screen_v1::copyBackgroundBlock2(int x) { - debugC(9, kDebugLevelScreen, "Screen_v1::copyBackgroundBlock2(%d)", x); - copyBackgroundBlock(x, 4, 1); -} - -void Screen_v1::setTextColorMap(const uint8 *cmap) { - debugC(9, kDebugLevelScreen, "Screen_v1::setTextColorMap(%p)", (const void *)cmap); - setTextColor(cmap, 0, 11); -} - -int Screen_v1::getRectSize(int x, int y) { - if (x < 1) - x = 1; - else if (x > 40) - x = 40; - - if (y < 1) - y = 1; - else if (y > 200) - y = 200; - - return ((x*y) << 3); -} - -} // end of namespace Kyra diff --git a/engines/kyra/screen_v1.h b/engines/kyra/screen_v1.h deleted file mode 100644 index 10219ae6b5..0000000000 --- a/engines/kyra/screen_v1.h +++ /dev/null @@ -1,77 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef KYRA_SCREEN_V1_H -#define KYRA_SCREEN_V1_H - -#include "kyra/screen.h" - -namespace Kyra { - -class KyraEngine_v1; - -class Screen_v1 : public Screen { -public: - Screen_v1(KyraEngine_v1 *vm, OSystem *system); - virtual ~Screen_v1(); - - bool init(); - - int getRectSize(int w, int h); - - void setScreenDim(int dim); - const ScreenDim *getScreenDim(int dim); - - void setTextColorMap(const uint8 *cmap); - - void fadeSpecialPalette(int palIndex, int startIndex, int size, int fadeTime); - - void savePageToDisk(const char *file, int page); - void loadPageFromDisk(const char *file, int page); - void deletePageFromDisk(int page); - - void copyBackgroundBlock(int x, int page, int flag); - void copyBackgroundBlock2(int x); - - void addBitBlitRect(int x, int y, int w, int h); - void bitBlitRects(); - -protected: - KyraEngine_v1 *_vm; - - static const ScreenDim _screenDimTable[]; - static const int _screenDimTableCount; - - Rect *_bitBlitRects; - int _bitBlitNum; - uint8 *_unkPtr1, *_unkPtr2; - - uint8 *_saveLoadPage[8]; - uint8 *_saveLoadPageOvl[8]; -}; - -} // end of namespace Kyra - -#endif diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp new file mode 100644 index 0000000000..3f578d9e0f --- /dev/null +++ b/engines/kyra/script_lok.cpp @@ -0,0 +1,2031 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + + +#include "common/endian.h" +#include "common/system.h" + +#include "kyra/kyra_lok.h" +#include "kyra/script.h" +#include "kyra/screen.h" +#include "kyra/sprites.h" +#include "kyra/wsamovie.h" +#include "kyra/animator_lok.h" +#include "kyra/text.h" +#include "kyra/timer.h" + +namespace Kyra { +int KyraEngine_LoK::o1_magicInMouseItem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_magicInMouseItem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + magicInMouseItem(stackPos(0), stackPos(1), -1); + return 0; +} + +int KyraEngine_LoK::o1_characterSays(EMCState *script) { + _skipFlag = false; + if (_flags.isTalkie) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_characterSays(%p) (%d, '%s', %d, %d)", (const void *)script, stackPos(0), stackPosString(1), stackPos(2), stackPos(3)); + characterSays(stackPos(0), stackPosString(1), stackPos(2), stackPos(3)); + } else { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_characterSays(%p) ('%s', %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2)); + const char *string = stackPosString(0); + + if ((_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) && _flags.lang == Common::JA_JPN) { + static const uint8 townsString1[] = { + 0x83, 0x75, 0x83, 0x89, 0x83, 0x93, 0x83, 0x83, 0x93, 0x81, + 0x41, 0x82, 0xDC, 0x82, 0xBD, 0x97, 0x88, 0x82, 0xBD, 0x82, + 0xCC, 0x82, 0xA9, 0x81, 0x48, 0x00, 0x00, 0x00 + }; + static const uint8 townsString2[] = { + 0x83, 0x75, 0x83, 0x89, 0x83, 0x93, 0x83, 0x5C, 0x83, 0x93, + 0x81, 0x41, 0x82, 0xDC, 0x82, 0xBD, 0x97, 0x88, 0x82, 0xBD, + 0x82, 0xCC, 0x82, 0xA9, 0x81, 0x48, 0x00, 0x00 + }; + + if (strncmp((const char *)townsString1, string, sizeof(townsString1)) == 0) + string = (const char *)townsString2; + } + + characterSays(-1, string, stackPos(1), stackPos(2)); + } + + return 0; +} + +int KyraEngine_LoK::o1_pauseTicks(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_pauseTicks(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + if (stackPos(1)) { + warning("STUB: special o1_pauseTicks"); + // delete this after correct implementing + delayWithTicks(stackPos(0)); + } else { + delayWithTicks(stackPos(0)); + } + return 0; +} + +int KyraEngine_LoK::o1_drawSceneAnimShape(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_drawSceneAnimShape(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); + _screen->drawShape(stackPos(4), _sprites->_sceneShapes[stackPos(0)], stackPos(1), stackPos(2), 0, (stackPos(3) != 0) ? 1 : 0); + return 0; +} + +int KyraEngine_LoK::o1_queryGameFlag(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_queryGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); + return queryGameFlag(stackPos(0)); +} + +int KyraEngine_LoK::o1_setGameFlag(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); + return setGameFlag(stackPos(0)); +} + +int KyraEngine_LoK::o1_resetGameFlag(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_resetGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); + return resetGameFlag(stackPos(0)); +} + +int KyraEngine_LoK::o1_runNPCScript(EMCState *script) { + warning("STUB: o1_runNPCScript"); + return 0; +} + +int KyraEngine_LoK::o1_setSpecialExitList(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setSpecialExitList(%p) (%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7), stackPos(8), stackPos(9)); + + for (int i = 0; i < 10; ++i) + _exitList[i] = stackPos(i); + _exitListPtr = _exitList; + + return 0; +} + +int KyraEngine_LoK::o1_blockInWalkableRegion(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_blockInWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + _screen->blockInRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); + return 0; +} + +int KyraEngine_LoK::o1_blockOutWalkableRegion(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_blockOutWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + _screen->blockOutRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); + return 0; +} + +int KyraEngine_LoK::o1_walkPlayerToPoint(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_walkPlayerToPoint(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + + int normalTimers = stackPos(2); + if (!normalTimers) { + _timer->disable(19); + _timer->disable(14); + _timer->disable(18); + } + + int reinitScript = handleSceneChange(stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + + if (!normalTimers) { + _timer->enable(19); + _timer->enable(14); + _timer->enable(18); + } + + if (reinitScript) + _emc->init(script, script->dataPtr); + + if (_sceneChangeState) { + _sceneChangeState = 0; + return 1; + } + return 0; +} + +int KyraEngine_LoK::o1_dropItemInScene(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_dropItemInScene(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); + int item = stackPos(0); + int xpos = stackPos(1); + int ypos = stackPos(2); + + byte freeItem = findFreeItemInScene(_currentCharacter->sceneId); + if (freeItem != 0xFF) { + int sceneId = _currentCharacter->sceneId; + Room *room = &_roomTable[sceneId]; + room->itemsXPos[freeItem] = xpos; + room->itemsYPos[freeItem] = ypos; + room->itemsTable[freeItem] = item; + + _animator->animAddGameItem(freeItem, sceneId); + _animator->updateAllObjectShapes(); + } else { + if (item == 43) + placeItemInGenericMapScene(item, 0); + else + placeItemInGenericMapScene(item, 1); + } + return 0; +} + +int KyraEngine_LoK::o1_drawAnimShapeIntoScene(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_drawAnimShapeIntoScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + _screen->hideMouse(); + _animator->restoreAllObjectBackgrounds(); + int shape = stackPos(0); + int xpos = stackPos(1); + int ypos = stackPos(2); + int flags = (stackPos(3) != 0) ? 1 : 0; + _screen->drawShape(2, _sprites->_sceneShapes[shape], xpos, ypos, 0, flags); + _screen->drawShape(0, _sprites->_sceneShapes[shape], xpos, ypos, 0, flags); + _animator->flagAllObjectsForBkgdChange(); + _animator->preserveAnyChangedBackgrounds(); + _animator->flagAllObjectsForRefresh(); + _animator->updateAllObjectShapes(); + _screen->showMouse(); + return 0; +} + +int KyraEngine_LoK::o1_createMouseItem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_createMouseItem(%p) (%d)", (const void *)script, stackPos(0)); + createMouseItem(stackPos(0)); + return 0; +} + +int KyraEngine_LoK::o1_savePageToDisk(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_savePageToDisk(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); + _screen->savePageToDisk(stackPosString(0), stackPos(1)); + return 0; +} + +int KyraEngine_LoK::o1_sceneAnimOn(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_sceneAnimOn(%p) (%d)", (const void *)script, stackPos(0)); + _sprites->_anims[stackPos(0)].play = true; + return 0; +} + +int KyraEngine_LoK::o1_sceneAnimOff(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_sceneAnimOff(%p) (%d)", (const void *)script, stackPos(0)); + _sprites->_anims[stackPos(0)].play = false; + return 0; +} + +int KyraEngine_LoK::o1_getElapsedSeconds(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getElapsedSeconds(%p) ()", (const void *)script); + return _system->getMillis() / 1000; +} + +int KyraEngine_LoK::o1_mouseIsPointer(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_mouseIsPointer(%p) ()", (const void *)script); + if (_itemInHand == -1) + return 1; + return 0; +} + +int KyraEngine_LoK::o1_destroyMouseItem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_destroyMouseItem(%p) ()", (const void *)script); + destroyMouseItem(); + return 0; +} + +int KyraEngine_LoK::o1_runSceneAnimUntilDone(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_runSceneAnimUntilDone(%p) (%d)", (const void *)script, stackPos(0)); + _screen->hideMouse(); + _animator->restoreAllObjectBackgrounds(); + _sprites->_anims[stackPos(0)].play = true; + _animator->sprites()[stackPos(0)].active = 1; + _animator->flagAllObjectsForBkgdChange(); + _animator->preserveAnyChangedBackgrounds(); + while (_sprites->_anims[stackPos(0)].play) { + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + delay(10); + } + _animator->restoreAllObjectBackgrounds(); + _screen->showMouse(); + return 0; +} + +int KyraEngine_LoK::o1_fadeSpecialPalette(EMCState *script) { + if (_flags.platform == Common::kPlatformAmiga) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_fadeSpecialPalette(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); + if (_currentCharacter->sceneId != 45) { + if (stackPos(0) == 13) { + memcpy(_screen->getPalette(0), _screen->getPalette(0) + 384*3, 32*3); + _screen->setScreenPalette(_screen->getPalette(0)); + } + } else { + warning("KyraEngine_LoK::o1_fadeSpecialPalette not implemented"); + } + } else { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_fadeSpecialPalette(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + _screen->fadeSpecialPalette(stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + } + return 0; +} + +int KyraEngine_LoK::o1_playAdlibSound(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_playAdlibSound(%p) (%d)", (const void *)script, stackPos(0)); + snd_playSoundEffect(stackPos(0)); + return 0; +} + +int KyraEngine_LoK::o1_playAdlibScore(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_playAdlibScore(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + snd_playWanderScoreViaMap(stackPos(0), stackPos(1)); + return 0; +} + +int KyraEngine_LoK::o1_phaseInSameScene(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_phaseInSameScene(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + transcendScenes(stackPos(0), stackPos(1)); + return 0; +} + +int KyraEngine_LoK::o1_setScenePhasingFlag(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setScenePhasingFlag(%p) ()", (const void *)script); + _scenePhasingFlag = 1; + return 1; +} + +int KyraEngine_LoK::o1_resetScenePhasingFlag(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_resetScenePhasingFlag(%p) ()", (const void *)script); + _scenePhasingFlag = 0; + return 0; +} + +int KyraEngine_LoK::o1_queryScenePhasingFlag(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_queryScenePhasingFlag(%p) ()", (const void *)script); + return _scenePhasingFlag; +} + +int KyraEngine_LoK::o1_sceneToDirection(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_sceneToDirection(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + assert(stackPos(0) < _roomTableSize); + Room *curRoom = &_roomTable[stackPos(0)]; + uint16 returnValue = 0xFFFF; + switch (stackPos(1)) { + case 0: + returnValue = curRoom->northExit; + break; + + case 2: + returnValue = curRoom->eastExit; + break; + + case 4: + returnValue = curRoom->southExit; + break; + + case 6: + returnValue = curRoom->westExit; + break; + + default: + break; + } + if (returnValue == 0xFFFF) + return -1; + return returnValue; +} + +int KyraEngine_LoK::o1_setBirthstoneGem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setBirthstoneGem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + int index = stackPos(0); + if (index < 4 && index >= 0) { + _birthstoneGemTable[index] = stackPos(1); + return 1; + } + return 0; +} + +int KyraEngine_LoK::o1_placeItemInGenericMapScene(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_placeItemInGenericMapScene(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + placeItemInGenericMapScene(stackPos(0), stackPos(1)); + return 0; +} + +int KyraEngine_LoK::o1_setBrandonStatusBit(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setBrandonStatusBit(%p) (%d)", (const void *)script, stackPos(0)); + _brandonStatusBit |= stackPos(0); + return 0; +} + +int KyraEngine_LoK::o1_pauseSeconds(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_pauseSeconds(%p) (%d)", (const void *)script, stackPos(0)); + if (stackPos(0) > 0 && !_skipFlag) + delay(stackPos(0)*1000, true); + _skipFlag = false; + return 0; +} + +int KyraEngine_LoK::o1_getCharactersLocation(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getCharactersLocation(%p) (%d)", (const void *)script, stackPos(0)); + return _characterList[stackPos(0)].sceneId; +} + +int KyraEngine_LoK::o1_runNPCSubscript(EMCState *script) { + warning("STUB: o1_runNPCSubscript"); + return 0; +} + +int KyraEngine_LoK::o1_magicOutMouseItem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_magicOutMouseItem(%p) (%d)", (const void *)script, stackPos(0)); + magicOutMouseItem(stackPos(0), -1); + return 0; +} + +int KyraEngine_LoK::o1_internalAnimOn(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_internalAnimOn(%p) (%d)", (const void *)script, stackPos(0)); + _animator->sprites()[stackPos(0)].active = 1; + return 0; +} + +int KyraEngine_LoK::o1_forceBrandonToNormal(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_forceBrandonToNormal(%p) ()", (const void *)script); + checkAmuletAnimFlags(); + return 0; +} + +int KyraEngine_LoK::o1_poisonDeathNow(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_poisonDeathNow(%p) ()", (const void *)script); + seq_poisonDeathNow(1); + return 0; +} + +int KyraEngine_LoK::o1_setScaleMode(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setScaleMode(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + int len = stackPos(0); + int setValue1 = stackPos(1); + int start2 = stackPos(2); + int setValue2 = stackPos(3); + for (int i = 0; i < len; ++i) + _scaleTable[i] = setValue1; + int temp = setValue2 - setValue1; + int temp2 = start2 - len; + for (int i = len, offset = 0; i < start2; ++i, ++offset) + _scaleTable[i] = (offset * temp) / temp2 + setValue1; + for (int i = start2; i < 145; ++i) + _scaleTable[i] = setValue2; + _scaleMode = 1; + return _scaleMode; +} + +int KyraEngine_LoK::o1_openWSAFile(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_openWSAFile(%p) ('%s', %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3)); + + const char *filename = stackPosString(0); + int wsaIndex = stackPos(1); + + _movieObjects[wsaIndex]->open(filename, (stackPos(3) != 0) ? 1 : 0, 0); + assert(_movieObjects[wsaIndex]->opened()); + + return 0; +} + +int KyraEngine_LoK::o1_closeWSAFile(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_closeWSAFile(%p) (%d)", (const void *)script, stackPos(0)); + + int wsaIndex = stackPos(0); + if (_movieObjects[wsaIndex]) + _movieObjects[wsaIndex]->close(); + + return 0; +} + +int KyraEngine_LoK::o1_runWSAFromBeginningToEnd(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_runWSAFromBeginningToEnd(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); + + _screen->hideMouse(); + + bool running = true; + + int xpos = stackPos(0); + int ypos = stackPos(1); + int waitTime = stackPos(2); + int wsaIndex = stackPos(3); + int worldUpdate = stackPos(4); + int wsaFrame = 0; + + _movieObjects[wsaIndex]->setX(xpos); + _movieObjects[wsaIndex]->setY(ypos); + _movieObjects[wsaIndex]->setDrawPage(0); + while (running) { + _movieObjects[wsaIndex]->displayFrame(wsaFrame++); + _animator->_updateScreen = true; + if (wsaFrame >= _movieObjects[wsaIndex]->frames()) + running = false; + + uint32 continueTime = waitTime * _tickLength + _system->getMillis(); + while (_system->getMillis() < continueTime) { + if (worldUpdate) { + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + } else { + _screen->updateScreen(); + } + if (continueTime - _system->getMillis() >= 10) + delay(10); + } + } + + _screen->showMouse(); + + return 0; +} + +int KyraEngine_LoK::o1_displayWSAFrame(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_displayWSAFrame(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); + int frame = stackPos(0); + int xpos = stackPos(1); + int ypos = stackPos(2); + int waitTime = stackPos(3); + int wsaIndex = stackPos(4); + _screen->hideMouse(); + _movieObjects[wsaIndex]->setX(xpos); + _movieObjects[wsaIndex]->setY(ypos); + _movieObjects[wsaIndex]->setDrawPage(0); + _movieObjects[wsaIndex]->displayFrame(frame); + _animator->_updateScreen = true; + uint32 continueTime = waitTime * _tickLength + _system->getMillis(); + while (_system->getMillis() < continueTime) { + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + if (_skipFlag) + break; + + if (continueTime - _system->getMillis() >= 10) + delay(10); + } + _screen->showMouse(); + return 0; +} + +int KyraEngine_LoK::o1_enterNewScene(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_enterNewScene(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); + enterNewScene(stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); + return 0; +} + +int KyraEngine_LoK::o1_setSpecialEnterXAndY(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setSpecialEnterXAndY(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + _brandonPosX = stackPos(0); + _brandonPosY = stackPos(1); + if (_brandonPosX + 1 == 0 && _brandonPosY + 1 == 0) + _currentCharacter->currentAnimFrame = 88; + return 0; +} + +int KyraEngine_LoK::o1_runWSAFrames(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_runWSAFrames(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + int xpos = stackPos(0); + int ypos = stackPos(1); + int delayTime = stackPos(2); + int startFrame = stackPos(3); + int endFrame = stackPos(4); + int wsaIndex = stackPos(5); + _screen->hideMouse(); + _movieObjects[wsaIndex]->setX(xpos); + _movieObjects[wsaIndex]->setY(ypos); + _movieObjects[wsaIndex]->setDrawPage(0); + for (; startFrame <= endFrame; ++startFrame) { + uint32 nextRun = _system->getMillis() + delayTime * _tickLength; + _movieObjects[wsaIndex]->displayFrame(startFrame); + _animator->_updateScreen = true; + while (_system->getMillis() < nextRun) { + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + if (nextRun - _system->getMillis() >= 10) + delay(10); + } + } + _screen->showMouse(); + return 0; +} + +int KyraEngine_LoK::o1_popBrandonIntoScene(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_popBrandonIntoScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + int changeScaleMode = stackPos(3); + int xpos = (int16)(stackPos(0) & 0xFFFC); + int ypos = (int16)(stackPos(1) & 0xFFFE); + int facing = stackPos(2); + _currentCharacter->x1 = _currentCharacter->x2 = xpos; + _currentCharacter->y1 = _currentCharacter->y2 = ypos; + _currentCharacter->facing = facing; + _currentCharacter->currentAnimFrame = 7; + int xOffset = _defaultShapeTable[0].xOffset; + int yOffset = _defaultShapeTable[0].yOffset; + int width = _defaultShapeTable[0].w << 3; + int height = _defaultShapeTable[0].h; + Animator_LoK::AnimObject *curAnim = _animator->actors(); + + if (changeScaleMode) { + curAnim->x1 = _currentCharacter->x1; + curAnim->y1 = _currentCharacter->y1; + _animator->_brandonScaleY = _scaleTable[_currentCharacter->y1]; + _animator->_brandonScaleX = _animator->_brandonScaleY; + + int animWidth = _animator->fetchAnimWidth(curAnim->sceneAnimPtr, _animator->_brandonScaleX) >> 1; + int animHeight = _animator->fetchAnimHeight(curAnim->sceneAnimPtr, _animator->_brandonScaleY); + + animWidth = (xOffset * animWidth) / width; + animHeight = (yOffset * animHeight) / height; + + curAnim->x2 = curAnim->x1 += animWidth; + curAnim->y2 = curAnim->y1 += animHeight; + } else { + curAnim->x2 = curAnim->x1 = _currentCharacter->x1 + xOffset; + curAnim->y2 = curAnim->y1 = _currentCharacter->y1 + yOffset; + } + + int scaleModeBackup = _scaleMode; + if (changeScaleMode) + _scaleMode = 1; + + _animator->animRefreshNPC(0); + _animator->preserveAllBackgrounds(); + _animator->prepDrawAllObjects(); + _animator->copyChangedObjectsForward(0); + + _scaleMode = scaleModeBackup; + + return 0; +} + +int KyraEngine_LoK::o1_restoreAllObjectBackgrounds(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_restoreAllObjectBackgrounds(%p) (%d)", (const void *)script, stackPos(0)); + int disable = stackPos(0); + int activeBackup = 0; + if (disable) { + activeBackup = _animator->actors()->active; + _animator->actors()->active = 0; + } + _animator->restoreAllObjectBackgrounds(); + if (disable) + _animator->actors()->active = activeBackup; + return 0; +} + +int KyraEngine_LoK::o1_setCustomPaletteRange(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCustomPaletteRange(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); + memcpy(_screen->getPalette(1) + stackPos(1)*3, _specialPalettes[stackPos(0)], stackPos(2)*3); + return 0; +} + +int KyraEngine_LoK::o1_loadPageFromDisk(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_loadPageFromDisk(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); + _screen->loadPageFromDisk(stackPosString(0), stackPos(1)); + _animator->_updateScreen = true; + return 0; +} + +int KyraEngine_LoK::o1_customPrintTalkString(EMCState *script) { + if (_flags.isTalkie) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_customPrintTalkString(%p) (%d, '%s', %d, %d, %d)", (const void *)script, stackPos(0), stackPosString(1), stackPos(2), stackPos(3), stackPos(4) & 0xFF); + + if (speechEnabled()) { + snd_voiceWaitForFinish(); + snd_playVoiceFile(stackPos(0)); + } + + _skipFlag = false; + if (textEnabled()) + _text->printTalkTextMessage(stackPosString(1), stackPos(2), stackPos(3), stackPos(4) & 0xFF, 0, 2); + } else { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_customPrintTalkString(%p) ('%s', %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF); + _skipFlag = false; + _text->printTalkTextMessage(stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF, 0, 2); + } + _screen->updateScreen(); + return 0; +} + +int KyraEngine_LoK::o1_restoreCustomPrintBackground(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_restoreCustomPrintBackground(%p) ()", (const void *)script); + _text->restoreTalkTextMessageBkgd(2, 0); + return 0; +} + +int KyraEngine_LoK::o1_hideMouse(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_hideMouse(%p) ()", (const void *)script); + _screen->hideMouse(); + return 0; +} + +int KyraEngine_LoK::o1_showMouse(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_showMouse(%p) ()", (const void *)script); + _screen->showMouse(); + return 0; +} + +int KyraEngine_LoK::o1_getCharacterX(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getCharacterX(%p) (%d)", (const void *)script, stackPos(0)); + return _characterList[stackPos(0)].x1; +} + +int KyraEngine_LoK::o1_getCharacterY(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getCharacterY(%p) (%d)", (const void *)script, stackPos(0)); + return _characterList[stackPos(0)].y1; +} + +int KyraEngine_LoK::o1_changeCharactersFacing(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_changeCharactersFacing(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); + int character = stackPos(0); + int facing = stackPos(1); + int newAnimFrame = stackPos(2); + + _animator->restoreAllObjectBackgrounds(); + if (newAnimFrame != -1) + _characterList[character].currentAnimFrame = newAnimFrame; + _characterList[character].facing = facing; + _animator->animRefreshNPC(character); + _animator->preserveAllBackgrounds(); + _animator->prepDrawAllObjects(); + _animator->copyChangedObjectsForward(0); + + return 0; +} + +int KyraEngine_LoK::o1_copyWSARegion(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_copyWSARegion(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + int xpos = stackPos(0); + int ypos = stackPos(1); + int width = stackPos(2); + int height = stackPos(3); + int srcPage = stackPos(4); + int dstPage = stackPos(5); + _screen->copyRegion(xpos, ypos, xpos, ypos, width, height, srcPage, dstPage); + _animator->_updateScreen = true; + return 0; +} + +int KyraEngine_LoK::o1_printText(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_printText(%p) ('%s', %d, %d, 0x%X, 0x%X)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); + if (_flags.lang == Common::JA_JPN && stackPos(3) == 7) + _screen->printText(stackPosString(0), stackPos(1), stackPos(2), 0, 0x80); + else + _screen->printText(stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); + _screen->updateScreen(); + return 0; +} + +int KyraEngine_LoK::o1_random(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_random(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + assert(stackPos(0) < stackPos(1)); + return _rnd.getRandomNumberRng(stackPos(0), stackPos(1)); +} + +int KyraEngine_LoK::o1_loadSoundFile(EMCState *script) { + warning("STUB: o1_loadSoundFile"); + return 0; +} + +int KyraEngine_LoK::o1_displayWSAFrameOnHidPage(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_displayWSAFrameOnHidPage(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); + int frame = stackPos(0); + int xpos = stackPos(1); + int ypos = stackPos(2); + int waitTime = stackPos(3); + int wsaIndex = stackPos(4); + + _screen->hideMouse(); + uint32 continueTime = waitTime * _tickLength + _system->getMillis(); + _movieObjects[wsaIndex]->setX(xpos); + _movieObjects[wsaIndex]->setY(ypos); + _movieObjects[wsaIndex]->setDrawPage(2); + _movieObjects[wsaIndex]->displayFrame(frame); + _animator->_updateScreen = true; + while (_system->getMillis() < continueTime) { + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + if (_skipFlag) + break; + + if (continueTime - _system->getMillis() >= 10) + delay(10); + } + _screen->showMouse(); + + return 0; +} + +int KyraEngine_LoK::o1_displayWSASequentialFrames(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_displayWSASequentialFrames(%p) (%d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6)); + int startFrame = stackPos(0); + int endFrame = stackPos(1); + int xpos = stackPos(2); + int ypos = stackPos(3); + int waitTime = stackPos(4); + int wsaIndex = stackPos(5); + int maxTime = stackPos(6); + if (maxTime - 1 <= 0) + maxTime = 1; + + _movieObjects[wsaIndex]->setX(xpos); + _movieObjects[wsaIndex]->setY(ypos); + _movieObjects[wsaIndex]->setDrawPage(0); + + // Workaround for bug #1498221 "KYRA1: Glitches when meeting Zanthia" + // the original didn't do a forced screen update after displaying a wsa frame + // while we have to do it, which make brandon disappear for a short moment, + // what shouldn't happen. So we're not updating the screen for this special + // case too. + if (startFrame == 18 && endFrame == 18 && _currentRoom == 45) { + _movieObjects[wsaIndex]->displayFrame(18); + delay(waitTime * _tickLength); + return 0; + } + + int curTime = 0; + _screen->hideMouse(); + while (curTime < maxTime) { + if (endFrame >= startFrame) { + int frame = startFrame; + while (endFrame >= frame) { + uint32 continueTime = waitTime * _tickLength + _system->getMillis(); + _movieObjects[wsaIndex]->displayFrame(frame); + _animator->_updateScreen = true; + while (_system->getMillis() < continueTime) { + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + if (_skipFlag) + break; + + if (continueTime - _system->getMillis() >= 10) + delay(10); + } + ++frame; + } + } else { + int frame = startFrame; + while (endFrame <= frame) { + uint32 continueTime = waitTime * _tickLength + _system->getMillis(); + _movieObjects[wsaIndex]->displayFrame(frame); + _animator->_updateScreen = true; + while (_system->getMillis() < continueTime) { + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + if (_skipFlag) + break; + + if (continueTime - _system->getMillis() >= 10) + delay(10); + } + --frame; + } + } + + if (_skipFlag) + break; + else + ++curTime; + } + _screen->showMouse(); + + return 0; +} + +int KyraEngine_LoK::o1_drawCharacterStanding(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_drawCharacterStanding(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + int character = stackPos(0); + int animFrame = stackPos(1); + int newFacing = stackPos(2); + int updateShapes = stackPos(3); + _characterList[character].currentAnimFrame = animFrame; + if (newFacing != -1) + _characterList[character].facing = newFacing; + _animator->animRefreshNPC(character); + if (updateShapes) + _animator->updateAllObjectShapes(); + return 0; +} + +int KyraEngine_LoK::o1_internalAnimOff(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_internalAnimOff(%p) (%d)", (const void *)script, stackPos(0)); + _animator->sprites()[stackPos(0)].active = 0; + return 0; +} + +int KyraEngine_LoK::o1_changeCharactersXAndY(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_changeCharactersXAndY(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); + Character *ch = &_characterList[stackPos(0)]; + int16 x = stackPos(1); + int16 y = stackPos(2); + if (x != -1 && y != -1) { + x &= 0xFFFC; + y &= 0xFFFE; + } + _animator->restoreAllObjectBackgrounds(); + ch->x1 = ch->x2 = x; + ch->y1 = ch->y2 = y; + _animator->preserveAllBackgrounds(); + return 0; +} + +int KyraEngine_LoK::o1_clearSceneAnimatorBeacon(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_clearSceneAnimatorBeacon(%p) ()", (const void *)script); + _sprites->_sceneAnimatorBeaconFlag = 0; + return 0; +} + +int KyraEngine_LoK::o1_querySceneAnimatorBeacon(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_querySceneAnimatorBeacon(%p) ()", (const void *)script); + return _sprites->_sceneAnimatorBeaconFlag; +} + +int KyraEngine_LoK::o1_refreshSceneAnimator(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_refreshSceneAnimator(%p) ()", (const void *)script); + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + return 0; +} + +int KyraEngine_LoK::o1_placeItemInOffScene(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_placeItemInOffScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + int item = stackPos(0); + int xpos = stackPos(1); + int ypos = stackPos(2); + int sceneId = stackPos(3); + + byte freeItem = findFreeItemInScene(sceneId); + if (freeItem != 0xFF) { + assert(sceneId < _roomTableSize); + Room *room = &_roomTable[sceneId]; + + room->itemsTable[freeItem] = item; + room->itemsXPos[freeItem] = xpos; + room->itemsYPos[freeItem] = ypos; + } + return 0; +} + +int KyraEngine_LoK::o1_wipeDownMouseItem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_wipeDownMouseItem(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); + _screen->hideMouse(); + wipeDownMouseItem(stackPos(1), stackPos(2)); + destroyMouseItem(); + _screen->showMouse(); + return 0; +} + +int KyraEngine_LoK::o1_placeCharacterInOtherScene(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_placeCharacterInOtherScene(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + int id = stackPos(0); + int sceneId = stackPos(1); + int xpos = (int16)(stackPos(2) & 0xFFFC); + int ypos = (int16)(stackPos(3) & 0xFFFE); + int facing = stackPos(4); + int animFrame = stackPos(5); + + _characterList[id].sceneId = sceneId; + _characterList[id].x1 = _characterList[id].x2 = xpos; + _characterList[id].y1 = _characterList[id].y2 = ypos; + _characterList[id].facing = facing; + _characterList[id].currentAnimFrame = animFrame; + return 0; +} + +int KyraEngine_LoK::o1_getKey(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getKey(%p) ()", (const void *)script); + waitForEvent(); + return 0; +} + +int KyraEngine_LoK::o1_specificItemInInventory(EMCState *script) { + warning("STUB: o1_specificItemInInventory"); + return 0; +} + +int KyraEngine_LoK::o1_popMobileNPCIntoScene(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_popMobileNPCIntoScene(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), (int16)(stackPos(4) & 0xFFFC), (int8)(stackPos(5) & 0xFE)); + int character = stackPos(0); + int sceneId = stackPos(1); + int animFrame = stackPos(2); + int facing = stackPos(3); + int16 xpos = (int16)(stackPos(4) & 0xFFFC); + int8 ypos = (int16)(stackPos(5) & 0xFFFE); + Character *curChar = &_characterList[character]; + + curChar->sceneId = sceneId; + curChar->currentAnimFrame = animFrame; + curChar->facing = facing; + curChar->x1 = curChar->x2 = xpos; + curChar->y1 = curChar->y2 = ypos; + + _animator->animAddNPC(character); + _animator->updateAllObjectShapes(); + return 0; +} + +int KyraEngine_LoK::o1_mobileCharacterInScene(EMCState *script) { + warning("STUB: o1_mobileCharacterInScene"); + return 0; +} + +int KyraEngine_LoK::o1_hideMobileCharacter(EMCState *script) { + warning("STUB: o1_hideMobileCharacter"); + return 0; +} + +int KyraEngine_LoK::o1_unhideMobileCharacter(EMCState *script) { + warning("STUB: o1_unhideMobileCharacter"); + return 0; +} + +int KyraEngine_LoK::o1_setCharactersLocation(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCharactersLocation(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + Character *ch = &_characterList[stackPos(0)]; + Animator_LoK::AnimObject *animObj = &_animator->actors()[stackPos(0)]; + int newScene = stackPos(1); + if (_currentCharacter->sceneId == ch->sceneId) { + if (_currentCharacter->sceneId != newScene) + animObj->active = 0; + } else if (_currentCharacter->sceneId == newScene) { + if (_currentCharacter->sceneId != ch->sceneId) + animObj->active = 1; + } + + ch->sceneId = stackPos(1); + return 0; +} + +int KyraEngine_LoK::o1_walkCharacterToPoint(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_walkCharacterToPoint(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); + int character = stackPos(0); + int toX = stackPos(1); + int toY = stackPos(2); + _pathfinderFlag2 = 1; + uint32 nextFrame; + int findWayReturn = findWay(_characterList[character].x1, _characterList[character].y1, toX, toY, _movFacingTable, 150); + _pathfinderFlag2 = 0; + + if (_lastFindWayRet < findWayReturn) + _lastFindWayRet = findWayReturn; + if (findWayReturn == 0x7D00 || findWayReturn == 0) + return 0; + + int *curPos = _movFacingTable; + bool running = true; + while (running) { + bool forceContinue = false; + switch (*curPos) { + case 0: + _characterList[character].facing = 2; + break; + + case 1: + _characterList[character].facing = 1; + break; + + case 2: + _characterList[character].facing = 0; + break; + + case 3: + _characterList[character].facing = 7; + break; + + case 4: + _characterList[character].facing = 6; + break; + + case 5: + _characterList[character].facing = 5; + break; + + case 6: + _characterList[character].facing = 4; + break; + + case 7: + _characterList[character].facing = 3; + break; + + case 8: + running = 0; + break; + + default: + ++curPos; + forceContinue = true; + break; + } + + if (forceContinue || !running) + continue; + + setCharacterPosition(character, 0); + ++curPos; + + nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis(); + while (_system->getMillis() < nextFrame) { + _sprites->updateSceneAnims(); + updateMousePointer(); + _timer->update(); + _animator->updateAllObjectShapes(); + updateTextFade(); + if ((nextFrame - _system->getMillis()) >= 10) + delay(10); + } + } + return 0; +} + +int KyraEngine_LoK::o1_specialEventDisplayBrynnsNote(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_specialEventDisplayBrynnsNote(%p) ()", (const void *)script); + _screen->hideMouse(); + _screen->savePageToDisk("HIDPAGE.TMP", 2); + _screen->savePageToDisk("SEENPAGE.TMP", 0); + if (_flags.isTalkie) { + if (_flags.lang == Common::EN_ANY || _flags.lang == Common::IT_ITA) + _screen->loadBitmap("NOTEENG.CPS", 3, 3, 0); + else if (_flags.lang == Common::FR_FRA) + _screen->loadBitmap("NOTEFRE.CPS", 3, 3, 0); + else if (_flags.lang == Common::DE_DEU) + _screen->loadBitmap("NOTEGER.CPS", 3, 3, 0); + } else { + _screen->loadBitmap("NOTE.CPS", 3, 3, 0); + } + _screen->copyRegion(63, 8, 63, 8, 194, 128, 2, 0); + _screen->updateScreen(); + _screen->showMouse(); + _screen->setFont(Screen::FID_6_FNT); + return 0; +} + +int KyraEngine_LoK::o1_specialEventRemoveBrynnsNote(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_specialEventRemoveBrynnsNote(%p) ()", (const void *)script); + _screen->hideMouse(); + _screen->loadPageFromDisk("SEENPAGE.TMP", 0); + _screen->loadPageFromDisk("HIDPAGE.TMP", 2); + _screen->updateScreen(); + _screen->showMouse(); + _screen->setFont(Screen::FID_8_FNT); + return 0; +} + +int KyraEngine_LoK::o1_setLogicPage(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setLogicPage(%p) (%d)", (const void *)script, stackPos(0)); + _screen->_curPage = stackPos(0); + return stackPos(0); +} + +int KyraEngine_LoK::o1_fatPrint(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_fatPrint(%p) ('%s', %d, %d, %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + + // Workaround for bug #1582672 ("KYRA1: Text crippled and drawn wrong") + // I'm not sure how the original handles this, since it seems to call + // printText also, maybe it fails somewhere inside... + // TODO: fix the reason for this workaround + if (_currentRoom == 117) + return 0; + _text->printText(stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + return 0; +} + +int KyraEngine_LoK::o1_preserveAllObjectBackgrounds(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_preserveAllObjectBackgrounds(%p) ()", (const void *)script); + _animator->preserveAllBackgrounds(); + return 0; +} + +int KyraEngine_LoK::o1_updateSceneAnimations(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_updateSceneAnimations(%p) (%d)", (const void *)script, stackPos(0)); + int times = stackPos(0); + while (times--) { + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + } + return 0; +} + +int KyraEngine_LoK::o1_sceneAnimationActive(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_sceneAnimationActive(%p) (%d)", (const void *)script, stackPos(0)); + return _sprites->_anims[stackPos(0)].play; +} + +int KyraEngine_LoK::o1_setCharactersMovementDelay(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCharactersMovementDelay(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + _timer->setDelay(stackPos(0)+5, stackPos(1)); + return 0; +} + +int KyraEngine_LoK::o1_getCharactersFacing(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getCharactersFacing(%p) (%d)", (const void *)script, stackPos(0)); + return _characterList[stackPos(0)].facing; +} + +int KyraEngine_LoK::o1_bkgdScrollSceneAndMasksRight(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_bkgdScrollSceneAndMasksRight(%p) (%d)", (const void *)script, stackPos(0)); + _screen->copyBackgroundBlock(stackPos(0), 2, 0); + _screen->copyBackgroundBlock2(stackPos(0)); + // update the whole screen + _screen->copyRegion(7, 7, 7, 7, 305, 129, 3, 0); + // Don't do a screen update here, see bug #1910180 "KYRA1: Screen 'flash'" + // it would cause to draw the screen with a wrong palette and thus look + // strange for the user. Since this opcode should be just called on scene + // initialization anyway, there should be no problem with not updating the + // screen right now. + return 0; +} + +int KyraEngine_LoK::o1_dispelMagicAnimation(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_dispelMagicAnimation(%p) ()", (const void *)script); + seq_dispelMagicAnimation(); + return 0; +} + +int KyraEngine_LoK::o1_findBrightestFireberry(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_findBrightestFireberry(%p) ()", (const void *)script); + if (_currentCharacter->sceneId >= 187 && _currentCharacter->sceneId <= 198) + return 29; + + if (_currentCharacter->sceneId == 133 || _currentCharacter->sceneId == 137 || + _currentCharacter->sceneId == 165 || _currentCharacter->sceneId == 173) + return 29; + + if (_itemInHand == 28) + return 28; + + int brightestFireberry = 107; + if (_itemInHand >= 29 && _itemInHand <= 33) + brightestFireberry = _itemInHand; + for (int i = 0; i < 10; ++i) { + uint8 item = _currentCharacter->inventoryItems[i]; + if (item == 0xFF) + continue; + if (item == 28) + return 28; + if (item >= 29 && item <= 33) { + if (item < brightestFireberry) + brightestFireberry = item; + } + } + assert(_currentCharacter->sceneId < _roomTableSize); + Room *curRoom = &_roomTable[_currentCharacter->sceneId]; + for (int i = 0; i < 12; ++i) { + uint8 item = curRoom->itemsTable[i]; + if (item == 0xFF) + continue; + if (item == 28) + return 28; + if (item >= 29 && item <= 33) { + if (item < brightestFireberry) + brightestFireberry = item; + } + } + if (brightestFireberry == 107) + return -1; + return brightestFireberry; +} + +int KyraEngine_LoK::o1_setFireberryGlowPalette(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setFireberryGlowPalette(%p) (%d)", (const void *)script, stackPos(0)); + int palIndex = 0; + switch (stackPos(0)) { + case 0x1E: + palIndex = 9; + break; + + case 0x1F: + palIndex = 10; + break; + + case 0x20: + palIndex = 11; + break; + + case 0x21: + case -1: + palIndex = 12; + break; + + default: + palIndex = 8; + break; + } + if (_brandonStatusBit & 2) { + if (_currentCharacter->sceneId != 133 && _currentCharacter->sceneId != 137 && + _currentCharacter->sceneId != 165 && _currentCharacter->sceneId != 173 && + (_currentCharacter->sceneId < 187 || _currentCharacter->sceneId > 198)) { + palIndex = 14; + } + } + const uint8 *palette = _specialPalettes[palIndex]; + memcpy(_screen->getPalette(1) + 684, palette, 44); + return 0; +} + +int KyraEngine_LoK::o1_setDeathHandlerFlag(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setDeathHandlerFlag(%p) (%d)", (const void *)script, stackPos(0)); + _deathHandler = stackPos(0); + return 0; +} + +int KyraEngine_LoK::o1_drinkPotionAnimation(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_drinkPotionAnimation(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); + seq_playDrinkPotionAnim(stackPos(0), stackPos(1), stackPos(2)); + return 0; +} + +int KyraEngine_LoK::o1_makeAmuletAppear(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_makeAmuletAppear(%p) ()", (const void *)script); + WSAMovie_v1 amulet(this); + amulet.open("AMULET.WSA", 1, 0); + amulet.setX(224); + amulet.setY(152); + amulet.setDrawPage(0); + if (amulet.opened()) { + assert(_amuleteAnim); + _screen->hideMouse(); + snd_playSoundEffect(0x70); + uint32 nextTime = 0; + for (int i = 0; _amuleteAnim[i] != 0xFF; ++i) { + nextTime = _system->getMillis() + 5 * _tickLength; + + uint8 code = _amuleteAnim[i]; + if (code == 3 || code == 7) + snd_playSoundEffect(0x71); + + if (code == 5) + snd_playSoundEffect(0x72); + + if (code == 14) + snd_playSoundEffect(0x73); + + amulet.displayFrame(code); + _animator->_updateScreen = true; + + while (_system->getMillis() < nextTime) { + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + if (nextTime - _system->getMillis() >= 10) + delay(10); + } + } + _screen->showMouse(); + } + setGameFlag(0x2D); + return 0; +} + +int KyraEngine_LoK::o1_drawItemShapeIntoScene(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_drawItemShapeIntoScene(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); + int item = stackPos(0); + int x = stackPos(1); + int y = stackPos(2); + int flags = stackPos(3); + int onlyHidPage = stackPos(4); + + if (flags) + flags = 1; + + if (onlyHidPage) { + _screen->drawShape(2, _shapes[216+item], x, y, 0, flags); + } else { + _screen->hideMouse(); + _animator->restoreAllObjectBackgrounds(); + _screen->drawShape(2, _shapes[216+item], x, y, 0, flags); + _screen->drawShape(0, _shapes[216+item], x, y, 0, flags); + _animator->flagAllObjectsForBkgdChange(); + _animator->preserveAnyChangedBackgrounds(); + _animator->flagAllObjectsForRefresh(); + _animator->updateAllObjectShapes(); + _screen->showMouse(); + } + return 0; +} + +int KyraEngine_LoK::o1_setCharactersCurrentFrame(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCharactersCurrentFrame(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + _characterList[stackPos(0)].currentAnimFrame = stackPos(1); + return 0; +} + +int KyraEngine_LoK::o1_waitForConfirmationMouseClick(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_waitForConfirmationMouseClick(%p) ()", (const void *)script); + // if (mouseEnabled) { + while (!_mousePressFlag) { + updateMousePointer(); + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + delay(10); + } + + while (_mousePressFlag) { + updateMousePointer(); + _sprites->updateSceneAnims(); + _animator->updateAllObjectShapes(); + delay(10); + } + // } + _gui->processButtonList(_buttonList, 0, 0); + _skipFlag = false; + Common::Point mouse = getMousePos(); + script->regs[1] = mouse.x; + script->regs[2] = mouse.y; + return 0; +} + +int KyraEngine_LoK::o1_pageFlip(EMCState *script) { + warning("STUB: o1_pageFlip"); + return 0; +} + +int KyraEngine_LoK::o1_setSceneFile(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setSceneFile(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + setSceneFile(stackPos(0), stackPos(1)); + return 0; +} + +int KyraEngine_LoK::o1_getItemInMarbleVase(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getItemInMarbleVase(%p) ()", (const void *)script); + return _marbleVaseItem; +} + +int KyraEngine_LoK::o1_setItemInMarbleVase(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setItemInMarbleVase(%p) (%d)", (const void *)script, stackPos(0)); + _marbleVaseItem = stackPos(0); + return 0; +} + +int KyraEngine_LoK::o1_addItemToInventory(EMCState *script) { + warning("STUB: o1_addItemToInventory"); + return 0; +} + +int KyraEngine_LoK::o1_intPrint(EMCState *script) { + warning("STUB: o1_intPrint"); + return 0; +} + +int KyraEngine_LoK::o1_shakeScreen(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_shakeScreen(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + int waitTicks = stackPos(1); + int times = stackPos(0); + + for (int i = 0; i < times; ++i) { + _screen->shakeScreen(1); + delay(waitTicks * _tickLength); + } + + return 0; +} + +int KyraEngine_LoK::o1_createAmuletJewel(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_createAmuletJewel(%p) (%d)", (const void *)script, stackPos(0)); + seq_createAmuletJewel(stackPos(0), 0, 0, 0); + return 0; +} + +int KyraEngine_LoK::o1_setSceneAnimCurrXY(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setSceneAnimCurrXY(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); + _sprites->_anims[stackPos(0)].x = stackPos(1); + _sprites->_anims[stackPos(0)].y = stackPos(2); + return 0; +} + +int KyraEngine_LoK::o1_poisonBrandonAndRemaps(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_poisonBrandonAndRemaps(%p) ()", (const void *)script); + setBrandonPoisonFlags(1); + return 0; +} + +int KyraEngine_LoK::o1_fillFlaskWithWater(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_fillFlaskWithWater(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + seq_fillFlaskWithWater(stackPos(0), stackPos(1)); + return 0; +} + +int KyraEngine_LoK::o1_getCharactersMovementDelay(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getCharactersMovementDelay(%p) (%d)", (const void *)script, stackPos(0)); + return _timer->getDelay(stackPos(0)+5); +} + +int KyraEngine_LoK::o1_getBirthstoneGem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getBirthstoneGem(%p) (%d)", (const void *)script, stackPos(0)); + if (stackPos(0) < 4) + return _birthstoneGemTable[stackPos(0)]; + return 0; +} + +int KyraEngine_LoK::o1_queryBrandonStatusBit(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_queryBrandonStatusBit(%p) (%d)", (const void *)script, stackPos(0)); + if (_brandonStatusBit & stackPos(0)) + return 1; + return 0; +} + +int KyraEngine_LoK::o1_playFluteAnimation(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_playFluteAnimation(%p) ()", (const void *)script); + seq_playFluteAnimation(); + return 0; +} + +int KyraEngine_LoK::o1_playWinterScrollSequence(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_playWinterScrollSequence(%p) (%d)", (const void *)script, stackPos(0)); + if (!stackPos(0)) + seq_winterScroll2(); + else + seq_winterScroll1(); + return 0; +} + +int KyraEngine_LoK::o1_getIdolGem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getIdolGem(%p) (%d)", (const void *)script, stackPos(0)); + return _idolGemsTable[stackPos(0)]; +} + +int KyraEngine_LoK::o1_setIdolGem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setIdolGem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + _idolGemsTable[stackPos(0)] = stackPos(1); + return 0; +} + +int KyraEngine_LoK::o1_totalItemsInScene(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_totalItemsInScene(%p) (%d)", (const void *)script, stackPos(0)); + return countItemsInScene(stackPos(0)); +} + +int KyraEngine_LoK::o1_restoreBrandonsMovementDelay(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_restoreBrandonsMovementDelay(%p) ()", (const void *)script); + setWalkspeed(_configWalkspeed); + return 0; +} + +int KyraEngine_LoK::o1_setMousePos(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setMousePos(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + _system->warpMouse(stackPos(0), stackPos(1)); + return 0; +} + +int KyraEngine_LoK::o1_getMouseState(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getMouseState(%p) ()", (const void *)script); + return _mouseState; +} + +int KyraEngine_LoK::o1_setEntranceMouseCursorTrack(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setEntranceMouseCursorTrack(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); + _entranceMouseCursorTracks[0] = stackPos(0); + _entranceMouseCursorTracks[1] = stackPos(1); + _entranceMouseCursorTracks[2] = stackPos(0) + stackPos(2) - 1; + _entranceMouseCursorTracks[3] = stackPos(1) + stackPos(3) - 1; + _entranceMouseCursorTracks[4] = stackPos(4); + return 0; +} + +int KyraEngine_LoK::o1_itemAppearsOnGround(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_itemAppearsOnGround(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); + processItemDrop(_currentCharacter->sceneId, stackPos(0), stackPos(1), stackPos(2), 2, 0); + return 0; +} + +int KyraEngine_LoK::o1_setNoDrawShapesFlag(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setNoDrawShapesFlag(%p) (%d)", (const void *)script, stackPos(0)); + _animator->_noDrawShapesFlag = stackPos(0); + return 0; +} + +int KyraEngine_LoK::o1_fadeEntirePalette(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_fadeEntirePalette(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + int cmd = stackPos(0); + uint8 *fadePal = 0; + + if (_flags.platform == Common::kPlatformAmiga) { + if (cmd == 0) { + fadePal = _screen->getPalette(2); + memset(fadePal, 0, 32*3); + memcpy(_screen->getPalette(4), _screen->getPalette(0), 32*3); + } else if (cmd == 1) { + fadePal = _screen->getPalette(0); + memcpy(_screen->getPalette(0), _screen->getPalette(4), 32*3); + } else if (cmd == 2) { + fadePal = _screen->getPalette(0); + memset(_screen->getPalette(2), 0, 32*3); + } + } else { + if (cmd == 0) { + fadePal = _screen->getPalette(2); + uint8 *screenPal = _screen->getPalette(0); + uint8 *backUpPal = _screen->getPalette(3); + + memcpy(backUpPal, screenPal, sizeof(uint8)*768); + memset(fadePal, 0, sizeof(uint8)*768); + } else if (cmd == 1) { + //fadePal = _screen->getPalette(3); + warning("unimplemented o1_fadeEntirePalette function"); + return 0; + } else if (cmd == 2) { + memset(_screen->getPalette(2), 0, 768); + memcpy(_screen->getPalette(0), _screen->getPalette(1), 768); + fadePal = _screen->getPalette(0); + } + } + + _screen->fadePalette(fadePal, stackPos(1)); + return 0; +} + +int KyraEngine_LoK::o1_itemOnGroundHere(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_itemOnGroundHere(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + assert(stackPos(0) < _roomTableSize); + Room *curRoom = &_roomTable[stackPos(0)]; + for (int i = 0; i < 12; ++i) { + if (curRoom->itemsTable[i] == stackPos(1)) + return 1; + } + return 0; +} + +int KyraEngine_LoK::o1_queryCauldronState(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_queryCauldronState(%p) ()", (const void *)script); + return _cauldronState; +} + +int KyraEngine_LoK::o1_setCauldronState(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCauldronState(%p) (%d)", (const void *)script, stackPos(0)); + _cauldronState = stackPos(0); + return _cauldronState; +} + +int KyraEngine_LoK::o1_queryCrystalState(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_queryCrystalState(%p) (%d)", (const void *)script, stackPos(0)); + if (!stackPos(0)) + return _crystalState[0]; + else if (stackPos(0) == 1) + return _crystalState[1]; + return -1; +} + +int KyraEngine_LoK::o1_setCrystalState(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCrystalState(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + if (!stackPos(0)) + _crystalState[0] = stackPos(1); + else if (stackPos(0) == 1) + _crystalState[1] = stackPos(1); + return stackPos(1); +} + +int KyraEngine_LoK::o1_setPaletteRange(EMCState *script) { + warning("STUB: o1_setPaletteRange"); + return 0; +} + +int KyraEngine_LoK::o1_shrinkBrandonDown(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_shrinkBrandonDown(%p) (%d)", (const void *)script, stackPos(0)); + int delayTime = stackPos(0); + checkAmuletAnimFlags(); + int scaleValue = _scaleTable[_currentCharacter->y1]; + int scale = 0; + + if (_scaleMode) + scale = scaleValue; + else + scale = 256; + + int scaleModeBackUp = _scaleMode; + _scaleMode = 1; + int scaleEnd = scale >> 1; + for (; scaleEnd <= scale; --scale) { + _scaleTable[_currentCharacter->y1] = scale; + _animator->animRefreshNPC(0); + delayWithTicks(1); + } + delayWithTicks(delayTime); // XXX + _scaleTable[_currentCharacter->y1] = scaleValue; + _scaleMode = scaleModeBackUp; + return 0; +} + +int KyraEngine_LoK::o1_growBrandonUp(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_growBrandonUp(%p) ()", (const void *)script); + int scaleValue = _scaleTable[_currentCharacter->y1]; + int scale = 0; + if (_scaleMode) + scale = scaleValue; + else + scale = 256; + + int scaleModeBackUp = _scaleMode; + _scaleMode = 1; + for (int curScale = scale >> 1; curScale <= scale; ++curScale) { + _scaleTable[_currentCharacter->y1] = curScale; + _animator->animRefreshNPC(0); + delayWithTicks(1); + } + _scaleTable[_currentCharacter->y1] = scaleValue; + _scaleMode = scaleModeBackUp; + return 0; +} + +int KyraEngine_LoK::o1_setBrandonScaleXAndY(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setBrandonScaleXAndY(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + _animator->_brandonScaleX = stackPos(0); + _animator->_brandonScaleY = stackPos(1); + return 0; +} + +int KyraEngine_LoK::o1_resetScaleMode(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_resetScaleMode(%p) ()", (const void *)script); + _scaleMode = 0; + return 0; +} + +int KyraEngine_LoK::o1_getScaleDepthTableValue(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getScaleDepthTableValue(%p) (%d)", (const void *)script, stackPos(0)); + assert(stackPos(0) < ARRAYSIZE(_scaleTable)); + return _scaleTable[stackPos(0)]; +} + +int KyraEngine_LoK::o1_setScaleDepthTableValue(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setScaleDepthTableValue(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + assert(stackPos(0) < ARRAYSIZE(_scaleTable)); + _scaleTable[stackPos(0)] = stackPos(1); + return stackPos(1); +} + +int KyraEngine_LoK::o1_message(EMCState *script) { + if (_flags.isTalkie) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_message(%p) (%d, '%s', %d)", (const void *)script, stackPos(0), stackPosString(1), stackPos(2)); + drawSentenceCommand(stackPosString(1), stackPos(2)); + } else { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_message(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); + drawSentenceCommand(stackPosString(0), stackPos(1)); + } + + return 0; +} + +int KyraEngine_LoK::o1_checkClickOnNPC(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_checkClickOnNPC(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + return checkForNPCScriptRun(stackPos(0), stackPos(1)); +} + +int KyraEngine_LoK::o1_getFoyerItem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getFoyerItem(%p) (%d)", (const void *)script, stackPos(0)); + assert(stackPos(0) < ARRAYSIZE(_foyerItemTable)); + return _foyerItemTable[stackPos(0)]; +} + +int KyraEngine_LoK::o1_setFoyerItem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setFoyerItem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + assert(stackPos(0) < ARRAYSIZE(_foyerItemTable)); + _foyerItemTable[stackPos(0)] = stackPos(1); + return stackPos(1); +} + +int KyraEngine_LoK::o1_setNoItemDropRegion(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setNoItemDropRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + addToNoDropRects(stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + return 0; +} + +int KyraEngine_LoK::o1_walkMalcolmOn(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_walkMalcolmOn(%p) ()", (const void *)script); + if (!_malcolmFlag) + _malcolmFlag = 1; + return 0; +} + +int KyraEngine_LoK::o1_passiveProtection(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_passiveProtection(%p) ()", (const void *)script); + return 1; +} + +int KyraEngine_LoK::o1_setPlayingLoop(EMCState *script) { + warning("STUB: o1_setPlayingLoop"); + return 0; +} + +int KyraEngine_LoK::o1_brandonToStoneSequence(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_brandonToStoneSequence(%p) ()", (const void *)script); + seq_brandonToStone(); + return 0; +} + +int KyraEngine_LoK::o1_brandonHealingSequence(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_brandonHealingSequence(%p) ()", (const void *)script); + seq_brandonHealing(); + return 0; +} + +int KyraEngine_LoK::o1_protectCommandLine(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_protectCommandLine(%p) (%d)", (const void *)script, stackPos(0)); + return stackPos(0); +} + +int KyraEngine_LoK::o1_pauseMusicSeconds(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_pauseMusicSeconds(%p) ()", (const void *)script); + // if music disabled + // return + o1_pauseSeconds(script); + return 0; +} + +int KyraEngine_LoK::o1_resetMaskRegion(EMCState *script) { + warning("STUB: o1_resetMaskRegion"); + return 0; +} + +int KyraEngine_LoK::o1_setPaletteChangeFlag(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setPaletteChangeFlag(%p) (%d)", (const void *)script, stackPos(0)); + _paletteChanged = stackPos(0); + return _paletteChanged; +} + +int KyraEngine_LoK::o1_fillRect(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_fillRect(%p) (%d, %d, %d, %d, %d, 0x%X)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + int videoPageBackup = _screen->_curPage; + _screen->_curPage = stackPos(0); + _screen->fillRect(stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + _screen->_curPage = videoPageBackup; + return 0; +} + +int KyraEngine_LoK::o1_vocUnload(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_vocUnload(%p) ()", (const void *)script); + // this should unload all voc files (not needed) + return 0; +} + +int KyraEngine_LoK::o1_vocLoad(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_vocLoad(%p) (%d)", (const void *)script, stackPos(0)); + // this should load the specified voc file (not needed) + return 0; +} + +int KyraEngine_LoK::o1_dummy(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_dummy(%p) ()", (const void *)script); + return 0; +} + +#pragma mark - + +typedef Common::Functor1Mem OpcodeV1; +#define SetOpcodeTable(x) table = &x; +#define Opcode(x) table->push_back(new OpcodeV1(this, &KyraEngine_LoK::x)) +void KyraEngine_LoK::setupOpcodeTable() { + Common::Array *table = 0; + + SetOpcodeTable(_opcodes); + // 0x00 + Opcode(o1_magicInMouseItem); + Opcode(o1_characterSays); + Opcode(o1_pauseTicks); + Opcode(o1_drawSceneAnimShape); + // 0x04 + Opcode(o1_queryGameFlag); + Opcode(o1_setGameFlag); + Opcode(o1_resetGameFlag); + Opcode(o1_runNPCScript); + // 0x08 + Opcode(o1_setSpecialExitList); + Opcode(o1_blockInWalkableRegion); + Opcode(o1_blockOutWalkableRegion); + Opcode(o1_walkPlayerToPoint); + // 0x0c + Opcode(o1_dropItemInScene); + Opcode(o1_drawAnimShapeIntoScene); + Opcode(o1_createMouseItem); + Opcode(o1_savePageToDisk); + // 0x10 + Opcode(o1_sceneAnimOn); + Opcode(o1_sceneAnimOff); + Opcode(o1_getElapsedSeconds); + Opcode(o1_mouseIsPointer); + // 0x14 + Opcode(o1_destroyMouseItem); + Opcode(o1_runSceneAnimUntilDone); + Opcode(o1_fadeSpecialPalette); + Opcode(o1_playAdlibSound); + // 0x18 + Opcode(o1_playAdlibScore); + Opcode(o1_phaseInSameScene); + Opcode(o1_setScenePhasingFlag); + Opcode(o1_resetScenePhasingFlag); + // 0x1c + Opcode(o1_queryScenePhasingFlag); + Opcode(o1_sceneToDirection); + Opcode(o1_setBirthstoneGem); + Opcode(o1_placeItemInGenericMapScene); + // 0x20 + Opcode(o1_setBrandonStatusBit); + Opcode(o1_pauseSeconds); + Opcode(o1_getCharactersLocation); + Opcode(o1_runNPCSubscript); + // 0x24 + Opcode(o1_magicOutMouseItem); + Opcode(o1_internalAnimOn); + Opcode(o1_forceBrandonToNormal); + Opcode(o1_poisonDeathNow); + // 0x28 + Opcode(o1_setScaleMode); + Opcode(o1_openWSAFile); + Opcode(o1_closeWSAFile); + Opcode(o1_runWSAFromBeginningToEnd); + // 0x2c + Opcode(o1_displayWSAFrame); + Opcode(o1_enterNewScene); + Opcode(o1_setSpecialEnterXAndY); + Opcode(o1_runWSAFrames); + // 0x30 + Opcode(o1_popBrandonIntoScene); + Opcode(o1_restoreAllObjectBackgrounds); + Opcode(o1_setCustomPaletteRange); + Opcode(o1_loadPageFromDisk); + // 0x34 + Opcode(o1_customPrintTalkString); + Opcode(o1_restoreCustomPrintBackground); + Opcode(o1_hideMouse); + Opcode(o1_showMouse); + // 0x38 + Opcode(o1_getCharacterX); + Opcode(o1_getCharacterY); + Opcode(o1_changeCharactersFacing); + Opcode(o1_copyWSARegion); + // 0x3c + Opcode(o1_printText); + Opcode(o1_random); + Opcode(o1_loadSoundFile); + Opcode(o1_displayWSAFrameOnHidPage); + // 0x40 + Opcode(o1_displayWSASequentialFrames); + Opcode(o1_drawCharacterStanding); + Opcode(o1_internalAnimOff); + Opcode(o1_changeCharactersXAndY); + // 0x44 + Opcode(o1_clearSceneAnimatorBeacon); + Opcode(o1_querySceneAnimatorBeacon); + Opcode(o1_refreshSceneAnimator); + Opcode(o1_placeItemInOffScene); + // 0x48 + Opcode(o1_wipeDownMouseItem); + Opcode(o1_placeCharacterInOtherScene); + Opcode(o1_getKey); + Opcode(o1_specificItemInInventory); + // 0x4c + Opcode(o1_popMobileNPCIntoScene); + Opcode(o1_mobileCharacterInScene); + Opcode(o1_hideMobileCharacter); + Opcode(o1_unhideMobileCharacter); + // 0x50 + Opcode(o1_setCharactersLocation); + Opcode(o1_walkCharacterToPoint); + Opcode(o1_specialEventDisplayBrynnsNote); + Opcode(o1_specialEventRemoveBrynnsNote); + // 0x54 + Opcode(o1_setLogicPage); + Opcode(o1_fatPrint); + Opcode(o1_preserveAllObjectBackgrounds); + Opcode(o1_updateSceneAnimations); + // 0x58 + Opcode(o1_sceneAnimationActive); + Opcode(o1_setCharactersMovementDelay); + Opcode(o1_getCharactersFacing); + Opcode(o1_bkgdScrollSceneAndMasksRight); + // 0x5c + Opcode(o1_dispelMagicAnimation); + Opcode(o1_findBrightestFireberry); + Opcode(o1_setFireberryGlowPalette); + Opcode(o1_setDeathHandlerFlag); + // 0x60 + Opcode(o1_drinkPotionAnimation); + Opcode(o1_makeAmuletAppear); + Opcode(o1_drawItemShapeIntoScene); + Opcode(o1_setCharactersCurrentFrame); + // 0x64 + Opcode(o1_waitForConfirmationMouseClick); + Opcode(o1_pageFlip); + Opcode(o1_setSceneFile); + Opcode(o1_getItemInMarbleVase); + // 0x68 + Opcode(o1_setItemInMarbleVase); + Opcode(o1_addItemToInventory); + Opcode(o1_intPrint); + Opcode(o1_shakeScreen); + // 0x6c + Opcode(o1_createAmuletJewel); + Opcode(o1_setSceneAnimCurrXY); + Opcode(o1_poisonBrandonAndRemaps); + Opcode(o1_fillFlaskWithWater); + // 0x70 + Opcode(o1_getCharactersMovementDelay); + Opcode(o1_getBirthstoneGem); + Opcode(o1_queryBrandonStatusBit); + Opcode(o1_playFluteAnimation); + // 0x74 + Opcode(o1_playWinterScrollSequence); + Opcode(o1_getIdolGem); + Opcode(o1_setIdolGem); + Opcode(o1_totalItemsInScene); + // 0x78 + Opcode(o1_restoreBrandonsMovementDelay); + Opcode(o1_setMousePos); + Opcode(o1_getMouseState); + Opcode(o1_setEntranceMouseCursorTrack); + // 0x7c + Opcode(o1_itemAppearsOnGround); + Opcode(o1_setNoDrawShapesFlag); + Opcode(o1_fadeEntirePalette); + Opcode(o1_itemOnGroundHere); + // 0x80 + Opcode(o1_queryCauldronState); + Opcode(o1_setCauldronState); + Opcode(o1_queryCrystalState); + Opcode(o1_setCrystalState); + // 0x84 + Opcode(o1_setPaletteRange); + Opcode(o1_shrinkBrandonDown); + Opcode(o1_growBrandonUp); + Opcode(o1_setBrandonScaleXAndY); + // 0x88 + Opcode(o1_resetScaleMode); + Opcode(o1_getScaleDepthTableValue); + Opcode(o1_setScaleDepthTableValue); + Opcode(o1_message); + // 0x8c + Opcode(o1_checkClickOnNPC); + Opcode(o1_getFoyerItem); + Opcode(o1_setFoyerItem); + Opcode(o1_setNoItemDropRegion); + // 0x90 + Opcode(o1_walkMalcolmOn); + Opcode(o1_passiveProtection); + Opcode(o1_setPlayingLoop); + Opcode(o1_brandonToStoneSequence); + // 0x94 + Opcode(o1_brandonHealingSequence); + Opcode(o1_protectCommandLine); + Opcode(o1_pauseMusicSeconds); + Opcode(o1_resetMaskRegion); + // 0x98 + Opcode(o1_setPaletteChangeFlag); + Opcode(o1_fillRect); + Opcode(o1_vocUnload); + Opcode(o1_vocLoad); + // 0x9c + Opcode(o1_dummy); +} +#undef Opcode + +} // end of namespace Kyra + diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp deleted file mode 100644 index 6eb02c7511..0000000000 --- a/engines/kyra/script_v1.cpp +++ /dev/null @@ -1,2031 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - - -#include "common/endian.h" -#include "common/system.h" - -#include "kyra/kyra_v1.h" -#include "kyra/script.h" -#include "kyra/screen.h" -#include "kyra/sprites.h" -#include "kyra/wsamovie.h" -#include "kyra/animator_v1.h" -#include "kyra/text.h" -#include "kyra/timer.h" - -namespace Kyra { -int KyraEngine_v1::o1_magicInMouseItem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_magicInMouseItem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - magicInMouseItem(stackPos(0), stackPos(1), -1); - return 0; -} - -int KyraEngine_v1::o1_characterSays(EMCState *script) { - _skipFlag = false; - if (_flags.isTalkie) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_characterSays(%p) (%d, '%s', %d, %d)", (const void *)script, stackPos(0), stackPosString(1), stackPos(2), stackPos(3)); - characterSays(stackPos(0), stackPosString(1), stackPos(2), stackPos(3)); - } else { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_characterSays(%p) ('%s', %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2)); - const char *string = stackPosString(0); - - if ((_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) && _flags.lang == Common::JA_JPN) { - static const uint8 townsString1[] = { - 0x83, 0x75, 0x83, 0x89, 0x83, 0x93, 0x83, 0x83, 0x93, 0x81, - 0x41, 0x82, 0xDC, 0x82, 0xBD, 0x97, 0x88, 0x82, 0xBD, 0x82, - 0xCC, 0x82, 0xA9, 0x81, 0x48, 0x00, 0x00, 0x00 - }; - static const uint8 townsString2[] = { - 0x83, 0x75, 0x83, 0x89, 0x83, 0x93, 0x83, 0x5C, 0x83, 0x93, - 0x81, 0x41, 0x82, 0xDC, 0x82, 0xBD, 0x97, 0x88, 0x82, 0xBD, - 0x82, 0xCC, 0x82, 0xA9, 0x81, 0x48, 0x00, 0x00 - }; - - if (strncmp((const char *)townsString1, string, sizeof(townsString1)) == 0) - string = (const char *)townsString2; - } - - characterSays(-1, string, stackPos(1), stackPos(2)); - } - - return 0; -} - -int KyraEngine_v1::o1_pauseTicks(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_pauseTicks(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - if (stackPos(1)) { - warning("STUB: special o1_pauseTicks"); - // delete this after correct implementing - delayWithTicks(stackPos(0)); - } else { - delayWithTicks(stackPos(0)); - } - return 0; -} - -int KyraEngine_v1::o1_drawSceneAnimShape(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_drawSceneAnimShape(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); - _screen->drawShape(stackPos(4), _sprites->_sceneShapes[stackPos(0)], stackPos(1), stackPos(2), 0, (stackPos(3) != 0) ? 1 : 0); - return 0; -} - -int KyraEngine_v1::o1_queryGameFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_queryGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); - return queryGameFlag(stackPos(0)); -} - -int KyraEngine_v1::o1_setGameFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); - return setGameFlag(stackPos(0)); -} - -int KyraEngine_v1::o1_resetGameFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_resetGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); - return resetGameFlag(stackPos(0)); -} - -int KyraEngine_v1::o1_runNPCScript(EMCState *script) { - warning("STUB: o1_runNPCScript"); - return 0; -} - -int KyraEngine_v1::o1_setSpecialExitList(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setSpecialExitList(%p) (%d, %d, %d, %d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7), stackPos(8), stackPos(9)); - - for (int i = 0; i < 10; ++i) - _exitList[i] = stackPos(i); - _exitListPtr = _exitList; - - return 0; -} - -int KyraEngine_v1::o1_blockInWalkableRegion(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_blockInWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - _screen->blockInRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); - return 0; -} - -int KyraEngine_v1::o1_blockOutWalkableRegion(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_blockOutWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - _screen->blockOutRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); - return 0; -} - -int KyraEngine_v1::o1_walkPlayerToPoint(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_walkPlayerToPoint(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - - int normalTimers = stackPos(2); - if (!normalTimers) { - _timer->disable(19); - _timer->disable(14); - _timer->disable(18); - } - - int reinitScript = handleSceneChange(stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - - if (!normalTimers) { - _timer->enable(19); - _timer->enable(14); - _timer->enable(18); - } - - if (reinitScript) - _emc->init(script, script->dataPtr); - - if (_sceneChangeState) { - _sceneChangeState = 0; - return 1; - } - return 0; -} - -int KyraEngine_v1::o1_dropItemInScene(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_dropItemInScene(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); - int item = stackPos(0); - int xpos = stackPos(1); - int ypos = stackPos(2); - - byte freeItem = findFreeItemInScene(_currentCharacter->sceneId); - if (freeItem != 0xFF) { - int sceneId = _currentCharacter->sceneId; - Room *room = &_roomTable[sceneId]; - room->itemsXPos[freeItem] = xpos; - room->itemsYPos[freeItem] = ypos; - room->itemsTable[freeItem] = item; - - _animator->animAddGameItem(freeItem, sceneId); - _animator->updateAllObjectShapes(); - } else { - if (item == 43) - placeItemInGenericMapScene(item, 0); - else - placeItemInGenericMapScene(item, 1); - } - return 0; -} - -int KyraEngine_v1::o1_drawAnimShapeIntoScene(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_drawAnimShapeIntoScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - _screen->hideMouse(); - _animator->restoreAllObjectBackgrounds(); - int shape = stackPos(0); - int xpos = stackPos(1); - int ypos = stackPos(2); - int flags = (stackPos(3) != 0) ? 1 : 0; - _screen->drawShape(2, _sprites->_sceneShapes[shape], xpos, ypos, 0, flags); - _screen->drawShape(0, _sprites->_sceneShapes[shape], xpos, ypos, 0, flags); - _animator->flagAllObjectsForBkgdChange(); - _animator->preserveAnyChangedBackgrounds(); - _animator->flagAllObjectsForRefresh(); - _animator->updateAllObjectShapes(); - _screen->showMouse(); - return 0; -} - -int KyraEngine_v1::o1_createMouseItem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_createMouseItem(%p) (%d)", (const void *)script, stackPos(0)); - createMouseItem(stackPos(0)); - return 0; -} - -int KyraEngine_v1::o1_savePageToDisk(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_savePageToDisk(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); - _screen->savePageToDisk(stackPosString(0), stackPos(1)); - return 0; -} - -int KyraEngine_v1::o1_sceneAnimOn(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_sceneAnimOn(%p) (%d)", (const void *)script, stackPos(0)); - _sprites->_anims[stackPos(0)].play = true; - return 0; -} - -int KyraEngine_v1::o1_sceneAnimOff(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_sceneAnimOff(%p) (%d)", (const void *)script, stackPos(0)); - _sprites->_anims[stackPos(0)].play = false; - return 0; -} - -int KyraEngine_v1::o1_getElapsedSeconds(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getElapsedSeconds(%p) ()", (const void *)script); - return _system->getMillis() / 1000; -} - -int KyraEngine_v1::o1_mouseIsPointer(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_mouseIsPointer(%p) ()", (const void *)script); - if (_itemInHand == -1) - return 1; - return 0; -} - -int KyraEngine_v1::o1_destroyMouseItem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_destroyMouseItem(%p) ()", (const void *)script); - destroyMouseItem(); - return 0; -} - -int KyraEngine_v1::o1_runSceneAnimUntilDone(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_runSceneAnimUntilDone(%p) (%d)", (const void *)script, stackPos(0)); - _screen->hideMouse(); - _animator->restoreAllObjectBackgrounds(); - _sprites->_anims[stackPos(0)].play = true; - _animator->sprites()[stackPos(0)].active = 1; - _animator->flagAllObjectsForBkgdChange(); - _animator->preserveAnyChangedBackgrounds(); - while (_sprites->_anims[stackPos(0)].play) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - delay(10); - } - _animator->restoreAllObjectBackgrounds(); - _screen->showMouse(); - return 0; -} - -int KyraEngine_v1::o1_fadeSpecialPalette(EMCState *script) { - if (_flags.platform == Common::kPlatformAmiga) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_fadeSpecialPalette(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); - if (_currentCharacter->sceneId != 45) { - if (stackPos(0) == 13) { - memcpy(_screen->getPalette(0), _screen->getPalette(0) + 384*3, 32*3); - _screen->setScreenPalette(_screen->getPalette(0)); - } - } else { - warning("KyraEngine_v1::o1_fadeSpecialPalette not implemented"); - } - } else { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_fadeSpecialPalette(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - _screen->fadeSpecialPalette(stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - } - return 0; -} - -int KyraEngine_v1::o1_playAdlibSound(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_playAdlibSound(%p) (%d)", (const void *)script, stackPos(0)); - snd_playSoundEffect(stackPos(0)); - return 0; -} - -int KyraEngine_v1::o1_playAdlibScore(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_playAdlibScore(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - snd_playWanderScoreViaMap(stackPos(0), stackPos(1)); - return 0; -} - -int KyraEngine_v1::o1_phaseInSameScene(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_phaseInSameScene(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - transcendScenes(stackPos(0), stackPos(1)); - return 0; -} - -int KyraEngine_v1::o1_setScenePhasingFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setScenePhasingFlag(%p) ()", (const void *)script); - _scenePhasingFlag = 1; - return 1; -} - -int KyraEngine_v1::o1_resetScenePhasingFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_resetScenePhasingFlag(%p) ()", (const void *)script); - _scenePhasingFlag = 0; - return 0; -} - -int KyraEngine_v1::o1_queryScenePhasingFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_queryScenePhasingFlag(%p) ()", (const void *)script); - return _scenePhasingFlag; -} - -int KyraEngine_v1::o1_sceneToDirection(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_sceneToDirection(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - assert(stackPos(0) < _roomTableSize); - Room *curRoom = &_roomTable[stackPos(0)]; - uint16 returnValue = 0xFFFF; - switch (stackPos(1)) { - case 0: - returnValue = curRoom->northExit; - break; - - case 2: - returnValue = curRoom->eastExit; - break; - - case 4: - returnValue = curRoom->southExit; - break; - - case 6: - returnValue = curRoom->westExit; - break; - - default: - break; - } - if (returnValue == 0xFFFF) - return -1; - return returnValue; -} - -int KyraEngine_v1::o1_setBirthstoneGem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setBirthstoneGem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - int index = stackPos(0); - if (index < 4 && index >= 0) { - _birthstoneGemTable[index] = stackPos(1); - return 1; - } - return 0; -} - -int KyraEngine_v1::o1_placeItemInGenericMapScene(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_placeItemInGenericMapScene(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - placeItemInGenericMapScene(stackPos(0), stackPos(1)); - return 0; -} - -int KyraEngine_v1::o1_setBrandonStatusBit(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setBrandonStatusBit(%p) (%d)", (const void *)script, stackPos(0)); - _brandonStatusBit |= stackPos(0); - return 0; -} - -int KyraEngine_v1::o1_pauseSeconds(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_pauseSeconds(%p) (%d)", (const void *)script, stackPos(0)); - if (stackPos(0) > 0 && !_skipFlag) - delay(stackPos(0)*1000, true); - _skipFlag = false; - return 0; -} - -int KyraEngine_v1::o1_getCharactersLocation(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getCharactersLocation(%p) (%d)", (const void *)script, stackPos(0)); - return _characterList[stackPos(0)].sceneId; -} - -int KyraEngine_v1::o1_runNPCSubscript(EMCState *script) { - warning("STUB: o1_runNPCSubscript"); - return 0; -} - -int KyraEngine_v1::o1_magicOutMouseItem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_magicOutMouseItem(%p) (%d)", (const void *)script, stackPos(0)); - magicOutMouseItem(stackPos(0), -1); - return 0; -} - -int KyraEngine_v1::o1_internalAnimOn(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_internalAnimOn(%p) (%d)", (const void *)script, stackPos(0)); - _animator->sprites()[stackPos(0)].active = 1; - return 0; -} - -int KyraEngine_v1::o1_forceBrandonToNormal(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_forceBrandonToNormal(%p) ()", (const void *)script); - checkAmuletAnimFlags(); - return 0; -} - -int KyraEngine_v1::o1_poisonDeathNow(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_poisonDeathNow(%p) ()", (const void *)script); - seq_poisonDeathNow(1); - return 0; -} - -int KyraEngine_v1::o1_setScaleMode(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setScaleMode(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - int len = stackPos(0); - int setValue1 = stackPos(1); - int start2 = stackPos(2); - int setValue2 = stackPos(3); - for (int i = 0; i < len; ++i) - _scaleTable[i] = setValue1; - int temp = setValue2 - setValue1; - int temp2 = start2 - len; - for (int i = len, offset = 0; i < start2; ++i, ++offset) - _scaleTable[i] = (offset * temp) / temp2 + setValue1; - for (int i = start2; i < 145; ++i) - _scaleTable[i] = setValue2; - _scaleMode = 1; - return _scaleMode; -} - -int KyraEngine_v1::o1_openWSAFile(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_openWSAFile(%p) ('%s', %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3)); - - const char *filename = stackPosString(0); - int wsaIndex = stackPos(1); - - _movieObjects[wsaIndex]->open(filename, (stackPos(3) != 0) ? 1 : 0, 0); - assert(_movieObjects[wsaIndex]->opened()); - - return 0; -} - -int KyraEngine_v1::o1_closeWSAFile(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_closeWSAFile(%p) (%d)", (const void *)script, stackPos(0)); - - int wsaIndex = stackPos(0); - if (_movieObjects[wsaIndex]) - _movieObjects[wsaIndex]->close(); - - return 0; -} - -int KyraEngine_v1::o1_runWSAFromBeginningToEnd(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_runWSAFromBeginningToEnd(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); - - _screen->hideMouse(); - - bool running = true; - - int xpos = stackPos(0); - int ypos = stackPos(1); - int waitTime = stackPos(2); - int wsaIndex = stackPos(3); - int worldUpdate = stackPos(4); - int wsaFrame = 0; - - _movieObjects[wsaIndex]->setX(xpos); - _movieObjects[wsaIndex]->setY(ypos); - _movieObjects[wsaIndex]->setDrawPage(0); - while (running) { - _movieObjects[wsaIndex]->displayFrame(wsaFrame++); - _animator->_updateScreen = true; - if (wsaFrame >= _movieObjects[wsaIndex]->frames()) - running = false; - - uint32 continueTime = waitTime * _tickLength + _system->getMillis(); - while (_system->getMillis() < continueTime) { - if (worldUpdate) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - } else { - _screen->updateScreen(); - } - if (continueTime - _system->getMillis() >= 10) - delay(10); - } - } - - _screen->showMouse(); - - return 0; -} - -int KyraEngine_v1::o1_displayWSAFrame(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_displayWSAFrame(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); - int frame = stackPos(0); - int xpos = stackPos(1); - int ypos = stackPos(2); - int waitTime = stackPos(3); - int wsaIndex = stackPos(4); - _screen->hideMouse(); - _movieObjects[wsaIndex]->setX(xpos); - _movieObjects[wsaIndex]->setY(ypos); - _movieObjects[wsaIndex]->setDrawPage(0); - _movieObjects[wsaIndex]->displayFrame(frame); - _animator->_updateScreen = true; - uint32 continueTime = waitTime * _tickLength + _system->getMillis(); - while (_system->getMillis() < continueTime) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - if (_skipFlag) - break; - - if (continueTime - _system->getMillis() >= 10) - delay(10); - } - _screen->showMouse(); - return 0; -} - -int KyraEngine_v1::o1_enterNewScene(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_enterNewScene(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); - enterNewScene(stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); - return 0; -} - -int KyraEngine_v1::o1_setSpecialEnterXAndY(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setSpecialEnterXAndY(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - _brandonPosX = stackPos(0); - _brandonPosY = stackPos(1); - if (_brandonPosX + 1 == 0 && _brandonPosY + 1 == 0) - _currentCharacter->currentAnimFrame = 88; - return 0; -} - -int KyraEngine_v1::o1_runWSAFrames(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_runWSAFrames(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - int xpos = stackPos(0); - int ypos = stackPos(1); - int delayTime = stackPos(2); - int startFrame = stackPos(3); - int endFrame = stackPos(4); - int wsaIndex = stackPos(5); - _screen->hideMouse(); - _movieObjects[wsaIndex]->setX(xpos); - _movieObjects[wsaIndex]->setY(ypos); - _movieObjects[wsaIndex]->setDrawPage(0); - for (; startFrame <= endFrame; ++startFrame) { - uint32 nextRun = _system->getMillis() + delayTime * _tickLength; - _movieObjects[wsaIndex]->displayFrame(startFrame); - _animator->_updateScreen = true; - while (_system->getMillis() < nextRun) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - if (nextRun - _system->getMillis() >= 10) - delay(10); - } - } - _screen->showMouse(); - return 0; -} - -int KyraEngine_v1::o1_popBrandonIntoScene(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_popBrandonIntoScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - int changeScaleMode = stackPos(3); - int xpos = (int16)(stackPos(0) & 0xFFFC); - int ypos = (int16)(stackPos(1) & 0xFFFE); - int facing = stackPos(2); - _currentCharacter->x1 = _currentCharacter->x2 = xpos; - _currentCharacter->y1 = _currentCharacter->y2 = ypos; - _currentCharacter->facing = facing; - _currentCharacter->currentAnimFrame = 7; - int xOffset = _defaultShapeTable[0].xOffset; - int yOffset = _defaultShapeTable[0].yOffset; - int width = _defaultShapeTable[0].w << 3; - int height = _defaultShapeTable[0].h; - Animator_v1::AnimObject *curAnim = _animator->actors(); - - if (changeScaleMode) { - curAnim->x1 = _currentCharacter->x1; - curAnim->y1 = _currentCharacter->y1; - _animator->_brandonScaleY = _scaleTable[_currentCharacter->y1]; - _animator->_brandonScaleX = _animator->_brandonScaleY; - - int animWidth = _animator->fetchAnimWidth(curAnim->sceneAnimPtr, _animator->_brandonScaleX) >> 1; - int animHeight = _animator->fetchAnimHeight(curAnim->sceneAnimPtr, _animator->_brandonScaleY); - - animWidth = (xOffset * animWidth) / width; - animHeight = (yOffset * animHeight) / height; - - curAnim->x2 = curAnim->x1 += animWidth; - curAnim->y2 = curAnim->y1 += animHeight; - } else { - curAnim->x2 = curAnim->x1 = _currentCharacter->x1 + xOffset; - curAnim->y2 = curAnim->y1 = _currentCharacter->y1 + yOffset; - } - - int scaleModeBackup = _scaleMode; - if (changeScaleMode) - _scaleMode = 1; - - _animator->animRefreshNPC(0); - _animator->preserveAllBackgrounds(); - _animator->prepDrawAllObjects(); - _animator->copyChangedObjectsForward(0); - - _scaleMode = scaleModeBackup; - - return 0; -} - -int KyraEngine_v1::o1_restoreAllObjectBackgrounds(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_restoreAllObjectBackgrounds(%p) (%d)", (const void *)script, stackPos(0)); - int disable = stackPos(0); - int activeBackup = 0; - if (disable) { - activeBackup = _animator->actors()->active; - _animator->actors()->active = 0; - } - _animator->restoreAllObjectBackgrounds(); - if (disable) - _animator->actors()->active = activeBackup; - return 0; -} - -int KyraEngine_v1::o1_setCustomPaletteRange(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setCustomPaletteRange(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); - memcpy(_screen->getPalette(1) + stackPos(1)*3, _specialPalettes[stackPos(0)], stackPos(2)*3); - return 0; -} - -int KyraEngine_v1::o1_loadPageFromDisk(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_loadPageFromDisk(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); - _screen->loadPageFromDisk(stackPosString(0), stackPos(1)); - _animator->_updateScreen = true; - return 0; -} - -int KyraEngine_v1::o1_customPrintTalkString(EMCState *script) { - if (_flags.isTalkie) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_customPrintTalkString(%p) (%d, '%s', %d, %d, %d)", (const void *)script, stackPos(0), stackPosString(1), stackPos(2), stackPos(3), stackPos(4) & 0xFF); - - if (speechEnabled()) { - snd_voiceWaitForFinish(); - snd_playVoiceFile(stackPos(0)); - } - - _skipFlag = false; - if (textEnabled()) - _text->printTalkTextMessage(stackPosString(1), stackPos(2), stackPos(3), stackPos(4) & 0xFF, 0, 2); - } else { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_customPrintTalkString(%p) ('%s', %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF); - _skipFlag = false; - _text->printTalkTextMessage(stackPosString(0), stackPos(1), stackPos(2), stackPos(3) & 0xFF, 0, 2); - } - _screen->updateScreen(); - return 0; -} - -int KyraEngine_v1::o1_restoreCustomPrintBackground(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_restoreCustomPrintBackground(%p) ()", (const void *)script); - _text->restoreTalkTextMessageBkgd(2, 0); - return 0; -} - -int KyraEngine_v1::o1_hideMouse(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_hideMouse(%p) ()", (const void *)script); - _screen->hideMouse(); - return 0; -} - -int KyraEngine_v1::o1_showMouse(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_showMouse(%p) ()", (const void *)script); - _screen->showMouse(); - return 0; -} - -int KyraEngine_v1::o1_getCharacterX(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getCharacterX(%p) (%d)", (const void *)script, stackPos(0)); - return _characterList[stackPos(0)].x1; -} - -int KyraEngine_v1::o1_getCharacterY(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getCharacterY(%p) (%d)", (const void *)script, stackPos(0)); - return _characterList[stackPos(0)].y1; -} - -int KyraEngine_v1::o1_changeCharactersFacing(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_changeCharactersFacing(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); - int character = stackPos(0); - int facing = stackPos(1); - int newAnimFrame = stackPos(2); - - _animator->restoreAllObjectBackgrounds(); - if (newAnimFrame != -1) - _characterList[character].currentAnimFrame = newAnimFrame; - _characterList[character].facing = facing; - _animator->animRefreshNPC(character); - _animator->preserveAllBackgrounds(); - _animator->prepDrawAllObjects(); - _animator->copyChangedObjectsForward(0); - - return 0; -} - -int KyraEngine_v1::o1_copyWSARegion(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_copyWSARegion(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - int xpos = stackPos(0); - int ypos = stackPos(1); - int width = stackPos(2); - int height = stackPos(3); - int srcPage = stackPos(4); - int dstPage = stackPos(5); - _screen->copyRegion(xpos, ypos, xpos, ypos, width, height, srcPage, dstPage); - _animator->_updateScreen = true; - return 0; -} - -int KyraEngine_v1::o1_printText(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_printText(%p) ('%s', %d, %d, 0x%X, 0x%X)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); - if (_flags.lang == Common::JA_JPN && stackPos(3) == 7) - _screen->printText(stackPosString(0), stackPos(1), stackPos(2), 0, 0x80); - else - _screen->printText(stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); - _screen->updateScreen(); - return 0; -} - -int KyraEngine_v1::o1_random(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_random(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - assert(stackPos(0) < stackPos(1)); - return _rnd.getRandomNumberRng(stackPos(0), stackPos(1)); -} - -int KyraEngine_v1::o1_loadSoundFile(EMCState *script) { - warning("STUB: o1_loadSoundFile"); - return 0; -} - -int KyraEngine_v1::o1_displayWSAFrameOnHidPage(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_displayWSAFrameOnHidPage(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); - int frame = stackPos(0); - int xpos = stackPos(1); - int ypos = stackPos(2); - int waitTime = stackPos(3); - int wsaIndex = stackPos(4); - - _screen->hideMouse(); - uint32 continueTime = waitTime * _tickLength + _system->getMillis(); - _movieObjects[wsaIndex]->setX(xpos); - _movieObjects[wsaIndex]->setY(ypos); - _movieObjects[wsaIndex]->setDrawPage(2); - _movieObjects[wsaIndex]->displayFrame(frame); - _animator->_updateScreen = true; - while (_system->getMillis() < continueTime) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - if (_skipFlag) - break; - - if (continueTime - _system->getMillis() >= 10) - delay(10); - } - _screen->showMouse(); - - return 0; -} - -int KyraEngine_v1::o1_displayWSASequentialFrames(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_displayWSASequentialFrames(%p) (%d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6)); - int startFrame = stackPos(0); - int endFrame = stackPos(1); - int xpos = stackPos(2); - int ypos = stackPos(3); - int waitTime = stackPos(4); - int wsaIndex = stackPos(5); - int maxTime = stackPos(6); - if (maxTime - 1 <= 0) - maxTime = 1; - - _movieObjects[wsaIndex]->setX(xpos); - _movieObjects[wsaIndex]->setY(ypos); - _movieObjects[wsaIndex]->setDrawPage(0); - - // Workaround for bug #1498221 "KYRA1: Glitches when meeting Zanthia" - // the original didn't do a forced screen update after displaying a wsa frame - // while we have to do it, which make brandon disappear for a short moment, - // what shouldn't happen. So we're not updating the screen for this special - // case too. - if (startFrame == 18 && endFrame == 18 && _currentRoom == 45) { - _movieObjects[wsaIndex]->displayFrame(18); - delay(waitTime * _tickLength); - return 0; - } - - int curTime = 0; - _screen->hideMouse(); - while (curTime < maxTime) { - if (endFrame >= startFrame) { - int frame = startFrame; - while (endFrame >= frame) { - uint32 continueTime = waitTime * _tickLength + _system->getMillis(); - _movieObjects[wsaIndex]->displayFrame(frame); - _animator->_updateScreen = true; - while (_system->getMillis() < continueTime) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - if (_skipFlag) - break; - - if (continueTime - _system->getMillis() >= 10) - delay(10); - } - ++frame; - } - } else { - int frame = startFrame; - while (endFrame <= frame) { - uint32 continueTime = waitTime * _tickLength + _system->getMillis(); - _movieObjects[wsaIndex]->displayFrame(frame); - _animator->_updateScreen = true; - while (_system->getMillis() < continueTime) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - if (_skipFlag) - break; - - if (continueTime - _system->getMillis() >= 10) - delay(10); - } - --frame; - } - } - - if (_skipFlag) - break; - else - ++curTime; - } - _screen->showMouse(); - - return 0; -} - -int KyraEngine_v1::o1_drawCharacterStanding(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_drawCharacterStanding(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - int character = stackPos(0); - int animFrame = stackPos(1); - int newFacing = stackPos(2); - int updateShapes = stackPos(3); - _characterList[character].currentAnimFrame = animFrame; - if (newFacing != -1) - _characterList[character].facing = newFacing; - _animator->animRefreshNPC(character); - if (updateShapes) - _animator->updateAllObjectShapes(); - return 0; -} - -int KyraEngine_v1::o1_internalAnimOff(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_internalAnimOff(%p) (%d)", (const void *)script, stackPos(0)); - _animator->sprites()[stackPos(0)].active = 0; - return 0; -} - -int KyraEngine_v1::o1_changeCharactersXAndY(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_changeCharactersXAndY(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); - Character *ch = &_characterList[stackPos(0)]; - int16 x = stackPos(1); - int16 y = stackPos(2); - if (x != -1 && y != -1) { - x &= 0xFFFC; - y &= 0xFFFE; - } - _animator->restoreAllObjectBackgrounds(); - ch->x1 = ch->x2 = x; - ch->y1 = ch->y2 = y; - _animator->preserveAllBackgrounds(); - return 0; -} - -int KyraEngine_v1::o1_clearSceneAnimatorBeacon(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_clearSceneAnimatorBeacon(%p) ()", (const void *)script); - _sprites->_sceneAnimatorBeaconFlag = 0; - return 0; -} - -int KyraEngine_v1::o1_querySceneAnimatorBeacon(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_querySceneAnimatorBeacon(%p) ()", (const void *)script); - return _sprites->_sceneAnimatorBeaconFlag; -} - -int KyraEngine_v1::o1_refreshSceneAnimator(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_refreshSceneAnimator(%p) ()", (const void *)script); - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - return 0; -} - -int KyraEngine_v1::o1_placeItemInOffScene(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_placeItemInOffScene(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - int item = stackPos(0); - int xpos = stackPos(1); - int ypos = stackPos(2); - int sceneId = stackPos(3); - - byte freeItem = findFreeItemInScene(sceneId); - if (freeItem != 0xFF) { - assert(sceneId < _roomTableSize); - Room *room = &_roomTable[sceneId]; - - room->itemsTable[freeItem] = item; - room->itemsXPos[freeItem] = xpos; - room->itemsYPos[freeItem] = ypos; - } - return 0; -} - -int KyraEngine_v1::o1_wipeDownMouseItem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_wipeDownMouseItem(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); - _screen->hideMouse(); - wipeDownMouseItem(stackPos(1), stackPos(2)); - destroyMouseItem(); - _screen->showMouse(); - return 0; -} - -int KyraEngine_v1::o1_placeCharacterInOtherScene(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_placeCharacterInOtherScene(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - int id = stackPos(0); - int sceneId = stackPos(1); - int xpos = (int16)(stackPos(2) & 0xFFFC); - int ypos = (int16)(stackPos(3) & 0xFFFE); - int facing = stackPos(4); - int animFrame = stackPos(5); - - _characterList[id].sceneId = sceneId; - _characterList[id].x1 = _characterList[id].x2 = xpos; - _characterList[id].y1 = _characterList[id].y2 = ypos; - _characterList[id].facing = facing; - _characterList[id].currentAnimFrame = animFrame; - return 0; -} - -int KyraEngine_v1::o1_getKey(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getKey(%p) ()", (const void *)script); - waitForEvent(); - return 0; -} - -int KyraEngine_v1::o1_specificItemInInventory(EMCState *script) { - warning("STUB: o1_specificItemInInventory"); - return 0; -} - -int KyraEngine_v1::o1_popMobileNPCIntoScene(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_popMobileNPCIntoScene(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), (int16)(stackPos(4) & 0xFFFC), (int8)(stackPos(5) & 0xFE)); - int character = stackPos(0); - int sceneId = stackPos(1); - int animFrame = stackPos(2); - int facing = stackPos(3); - int16 xpos = (int16)(stackPos(4) & 0xFFFC); - int8 ypos = (int16)(stackPos(5) & 0xFFFE); - Character *curChar = &_characterList[character]; - - curChar->sceneId = sceneId; - curChar->currentAnimFrame = animFrame; - curChar->facing = facing; - curChar->x1 = curChar->x2 = xpos; - curChar->y1 = curChar->y2 = ypos; - - _animator->animAddNPC(character); - _animator->updateAllObjectShapes(); - return 0; -} - -int KyraEngine_v1::o1_mobileCharacterInScene(EMCState *script) { - warning("STUB: o1_mobileCharacterInScene"); - return 0; -} - -int KyraEngine_v1::o1_hideMobileCharacter(EMCState *script) { - warning("STUB: o1_hideMobileCharacter"); - return 0; -} - -int KyraEngine_v1::o1_unhideMobileCharacter(EMCState *script) { - warning("STUB: o1_unhideMobileCharacter"); - return 0; -} - -int KyraEngine_v1::o1_setCharactersLocation(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setCharactersLocation(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - Character *ch = &_characterList[stackPos(0)]; - Animator_v1::AnimObject *animObj = &_animator->actors()[stackPos(0)]; - int newScene = stackPos(1); - if (_currentCharacter->sceneId == ch->sceneId) { - if (_currentCharacter->sceneId != newScene) - animObj->active = 0; - } else if (_currentCharacter->sceneId == newScene) { - if (_currentCharacter->sceneId != ch->sceneId) - animObj->active = 1; - } - - ch->sceneId = stackPos(1); - return 0; -} - -int KyraEngine_v1::o1_walkCharacterToPoint(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_walkCharacterToPoint(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); - int character = stackPos(0); - int toX = stackPos(1); - int toY = stackPos(2); - _pathfinderFlag2 = 1; - uint32 nextFrame; - int findWayReturn = findWay(_characterList[character].x1, _characterList[character].y1, toX, toY, _movFacingTable, 150); - _pathfinderFlag2 = 0; - - if (_lastFindWayRet < findWayReturn) - _lastFindWayRet = findWayReturn; - if (findWayReturn == 0x7D00 || findWayReturn == 0) - return 0; - - int *curPos = _movFacingTable; - bool running = true; - while (running) { - bool forceContinue = false; - switch (*curPos) { - case 0: - _characterList[character].facing = 2; - break; - - case 1: - _characterList[character].facing = 1; - break; - - case 2: - _characterList[character].facing = 0; - break; - - case 3: - _characterList[character].facing = 7; - break; - - case 4: - _characterList[character].facing = 6; - break; - - case 5: - _characterList[character].facing = 5; - break; - - case 6: - _characterList[character].facing = 4; - break; - - case 7: - _characterList[character].facing = 3; - break; - - case 8: - running = 0; - break; - - default: - ++curPos; - forceContinue = true; - break; - } - - if (forceContinue || !running) - continue; - - setCharacterPosition(character, 0); - ++curPos; - - nextFrame = _timer->getDelay(5 + character) * _tickLength + _system->getMillis(); - while (_system->getMillis() < nextFrame) { - _sprites->updateSceneAnims(); - updateMousePointer(); - _timer->update(); - _animator->updateAllObjectShapes(); - updateTextFade(); - if ((nextFrame - _system->getMillis()) >= 10) - delay(10); - } - } - return 0; -} - -int KyraEngine_v1::o1_specialEventDisplayBrynnsNote(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_specialEventDisplayBrynnsNote(%p) ()", (const void *)script); - _screen->hideMouse(); - _screen->savePageToDisk("HIDPAGE.TMP", 2); - _screen->savePageToDisk("SEENPAGE.TMP", 0); - if (_flags.isTalkie) { - if (_flags.lang == Common::EN_ANY || _flags.lang == Common::IT_ITA) - _screen->loadBitmap("NOTEENG.CPS", 3, 3, 0); - else if (_flags.lang == Common::FR_FRA) - _screen->loadBitmap("NOTEFRE.CPS", 3, 3, 0); - else if (_flags.lang == Common::DE_DEU) - _screen->loadBitmap("NOTEGER.CPS", 3, 3, 0); - } else { - _screen->loadBitmap("NOTE.CPS", 3, 3, 0); - } - _screen->copyRegion(63, 8, 63, 8, 194, 128, 2, 0); - _screen->updateScreen(); - _screen->showMouse(); - _screen->setFont(Screen::FID_6_FNT); - return 0; -} - -int KyraEngine_v1::o1_specialEventRemoveBrynnsNote(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_specialEventRemoveBrynnsNote(%p) ()", (const void *)script); - _screen->hideMouse(); - _screen->loadPageFromDisk("SEENPAGE.TMP", 0); - _screen->loadPageFromDisk("HIDPAGE.TMP", 2); - _screen->updateScreen(); - _screen->showMouse(); - _screen->setFont(Screen::FID_8_FNT); - return 0; -} - -int KyraEngine_v1::o1_setLogicPage(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setLogicPage(%p) (%d)", (const void *)script, stackPos(0)); - _screen->_curPage = stackPos(0); - return stackPos(0); -} - -int KyraEngine_v1::o1_fatPrint(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_fatPrint(%p) ('%s', %d, %d, %d, %d, %d)", (const void *)script, stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - - // Workaround for bug #1582672 ("KYRA1: Text crippled and drawn wrong") - // I'm not sure how the original handles this, since it seems to call - // printText also, maybe it fails somewhere inside... - // TODO: fix the reason for this workaround - if (_currentRoom == 117) - return 0; - _text->printText(stackPosString(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - return 0; -} - -int KyraEngine_v1::o1_preserveAllObjectBackgrounds(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_preserveAllObjectBackgrounds(%p) ()", (const void *)script); - _animator->preserveAllBackgrounds(); - return 0; -} - -int KyraEngine_v1::o1_updateSceneAnimations(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_updateSceneAnimations(%p) (%d)", (const void *)script, stackPos(0)); - int times = stackPos(0); - while (times--) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - } - return 0; -} - -int KyraEngine_v1::o1_sceneAnimationActive(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_sceneAnimationActive(%p) (%d)", (const void *)script, stackPos(0)); - return _sprites->_anims[stackPos(0)].play; -} - -int KyraEngine_v1::o1_setCharactersMovementDelay(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setCharactersMovementDelay(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - _timer->setDelay(stackPos(0)+5, stackPos(1)); - return 0; -} - -int KyraEngine_v1::o1_getCharactersFacing(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getCharactersFacing(%p) (%d)", (const void *)script, stackPos(0)); - return _characterList[stackPos(0)].facing; -} - -int KyraEngine_v1::o1_bkgdScrollSceneAndMasksRight(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_bkgdScrollSceneAndMasksRight(%p) (%d)", (const void *)script, stackPos(0)); - _screen->copyBackgroundBlock(stackPos(0), 2, 0); - _screen->copyBackgroundBlock2(stackPos(0)); - // update the whole screen - _screen->copyRegion(7, 7, 7, 7, 305, 129, 3, 0); - // Don't do a screen update here, see bug #1910180 "KYRA1: Screen 'flash'" - // it would cause to draw the screen with a wrong palette and thus look - // strange for the user. Since this opcode should be just called on scene - // initialization anyway, there should be no problem with not updating the - // screen right now. - return 0; -} - -int KyraEngine_v1::o1_dispelMagicAnimation(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_dispelMagicAnimation(%p) ()", (const void *)script); - seq_dispelMagicAnimation(); - return 0; -} - -int KyraEngine_v1::o1_findBrightestFireberry(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_findBrightestFireberry(%p) ()", (const void *)script); - if (_currentCharacter->sceneId >= 187 && _currentCharacter->sceneId <= 198) - return 29; - - if (_currentCharacter->sceneId == 133 || _currentCharacter->sceneId == 137 || - _currentCharacter->sceneId == 165 || _currentCharacter->sceneId == 173) - return 29; - - if (_itemInHand == 28) - return 28; - - int brightestFireberry = 107; - if (_itemInHand >= 29 && _itemInHand <= 33) - brightestFireberry = _itemInHand; - for (int i = 0; i < 10; ++i) { - uint8 item = _currentCharacter->inventoryItems[i]; - if (item == 0xFF) - continue; - if (item == 28) - return 28; - if (item >= 29 && item <= 33) { - if (item < brightestFireberry) - brightestFireberry = item; - } - } - assert(_currentCharacter->sceneId < _roomTableSize); - Room *curRoom = &_roomTable[_currentCharacter->sceneId]; - for (int i = 0; i < 12; ++i) { - uint8 item = curRoom->itemsTable[i]; - if (item == 0xFF) - continue; - if (item == 28) - return 28; - if (item >= 29 && item <= 33) { - if (item < brightestFireberry) - brightestFireberry = item; - } - } - if (brightestFireberry == 107) - return -1; - return brightestFireberry; -} - -int KyraEngine_v1::o1_setFireberryGlowPalette(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setFireberryGlowPalette(%p) (%d)", (const void *)script, stackPos(0)); - int palIndex = 0; - switch (stackPos(0)) { - case 0x1E: - palIndex = 9; - break; - - case 0x1F: - palIndex = 10; - break; - - case 0x20: - palIndex = 11; - break; - - case 0x21: - case -1: - palIndex = 12; - break; - - default: - palIndex = 8; - break; - } - if (_brandonStatusBit & 2) { - if (_currentCharacter->sceneId != 133 && _currentCharacter->sceneId != 137 && - _currentCharacter->sceneId != 165 && _currentCharacter->sceneId != 173 && - (_currentCharacter->sceneId < 187 || _currentCharacter->sceneId > 198)) { - palIndex = 14; - } - } - const uint8 *palette = _specialPalettes[palIndex]; - memcpy(_screen->getPalette(1) + 684, palette, 44); - return 0; -} - -int KyraEngine_v1::o1_setDeathHandlerFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setDeathHandlerFlag(%p) (%d)", (const void *)script, stackPos(0)); - _deathHandler = stackPos(0); - return 0; -} - -int KyraEngine_v1::o1_drinkPotionAnimation(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_drinkPotionAnimation(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); - seq_playDrinkPotionAnim(stackPos(0), stackPos(1), stackPos(2)); - return 0; -} - -int KyraEngine_v1::o1_makeAmuletAppear(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_makeAmuletAppear(%p) ()", (const void *)script); - WSAMovieV1 amulet(this); - amulet.open("AMULET.WSA", 1, 0); - amulet.setX(224); - amulet.setY(152); - amulet.setDrawPage(0); - if (amulet.opened()) { - assert(_amuleteAnim); - _screen->hideMouse(); - snd_playSoundEffect(0x70); - uint32 nextTime = 0; - for (int i = 0; _amuleteAnim[i] != 0xFF; ++i) { - nextTime = _system->getMillis() + 5 * _tickLength; - - uint8 code = _amuleteAnim[i]; - if (code == 3 || code == 7) - snd_playSoundEffect(0x71); - - if (code == 5) - snd_playSoundEffect(0x72); - - if (code == 14) - snd_playSoundEffect(0x73); - - amulet.displayFrame(code); - _animator->_updateScreen = true; - - while (_system->getMillis() < nextTime) { - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - if (nextTime - _system->getMillis() >= 10) - delay(10); - } - } - _screen->showMouse(); - } - setGameFlag(0x2D); - return 0; -} - -int KyraEngine_v1::o1_drawItemShapeIntoScene(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_drawItemShapeIntoScene(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); - int item = stackPos(0); - int x = stackPos(1); - int y = stackPos(2); - int flags = stackPos(3); - int onlyHidPage = stackPos(4); - - if (flags) - flags = 1; - - if (onlyHidPage) { - _screen->drawShape(2, _shapes[216+item], x, y, 0, flags); - } else { - _screen->hideMouse(); - _animator->restoreAllObjectBackgrounds(); - _screen->drawShape(2, _shapes[216+item], x, y, 0, flags); - _screen->drawShape(0, _shapes[216+item], x, y, 0, flags); - _animator->flagAllObjectsForBkgdChange(); - _animator->preserveAnyChangedBackgrounds(); - _animator->flagAllObjectsForRefresh(); - _animator->updateAllObjectShapes(); - _screen->showMouse(); - } - return 0; -} - -int KyraEngine_v1::o1_setCharactersCurrentFrame(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setCharactersCurrentFrame(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - _characterList[stackPos(0)].currentAnimFrame = stackPos(1); - return 0; -} - -int KyraEngine_v1::o1_waitForConfirmationMouseClick(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_waitForConfirmationMouseClick(%p) ()", (const void *)script); - // if (mouseEnabled) { - while (!_mousePressFlag) { - updateMousePointer(); - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - delay(10); - } - - while (_mousePressFlag) { - updateMousePointer(); - _sprites->updateSceneAnims(); - _animator->updateAllObjectShapes(); - delay(10); - } - // } - _gui->processButtonList(_buttonList, 0, 0); - _skipFlag = false; - Common::Point mouse = getMousePos(); - script->regs[1] = mouse.x; - script->regs[2] = mouse.y; - return 0; -} - -int KyraEngine_v1::o1_pageFlip(EMCState *script) { - warning("STUB: o1_pageFlip"); - return 0; -} - -int KyraEngine_v1::o1_setSceneFile(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setSceneFile(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - setSceneFile(stackPos(0), stackPos(1)); - return 0; -} - -int KyraEngine_v1::o1_getItemInMarbleVase(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getItemInMarbleVase(%p) ()", (const void *)script); - return _marbleVaseItem; -} - -int KyraEngine_v1::o1_setItemInMarbleVase(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setItemInMarbleVase(%p) (%d)", (const void *)script, stackPos(0)); - _marbleVaseItem = stackPos(0); - return 0; -} - -int KyraEngine_v1::o1_addItemToInventory(EMCState *script) { - warning("STUB: o1_addItemToInventory"); - return 0; -} - -int KyraEngine_v1::o1_intPrint(EMCState *script) { - warning("STUB: o1_intPrint"); - return 0; -} - -int KyraEngine_v1::o1_shakeScreen(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_shakeScreen(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - int waitTicks = stackPos(1); - int times = stackPos(0); - - for (int i = 0; i < times; ++i) { - _screen->shakeScreen(1); - delay(waitTicks * _tickLength); - } - - return 0; -} - -int KyraEngine_v1::o1_createAmuletJewel(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_createAmuletJewel(%p) (%d)", (const void *)script, stackPos(0)); - seq_createAmuletJewel(stackPos(0), 0, 0, 0); - return 0; -} - -int KyraEngine_v1::o1_setSceneAnimCurrXY(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setSceneAnimCurrXY(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); - _sprites->_anims[stackPos(0)].x = stackPos(1); - _sprites->_anims[stackPos(0)].y = stackPos(2); - return 0; -} - -int KyraEngine_v1::o1_poisonBrandonAndRemaps(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_poisonBrandonAndRemaps(%p) ()", (const void *)script); - setBrandonPoisonFlags(1); - return 0; -} - -int KyraEngine_v1::o1_fillFlaskWithWater(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_fillFlaskWithWater(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - seq_fillFlaskWithWater(stackPos(0), stackPos(1)); - return 0; -} - -int KyraEngine_v1::o1_getCharactersMovementDelay(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getCharactersMovementDelay(%p) (%d)", (const void *)script, stackPos(0)); - return _timer->getDelay(stackPos(0)+5); -} - -int KyraEngine_v1::o1_getBirthstoneGem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getBirthstoneGem(%p) (%d)", (const void *)script, stackPos(0)); - if (stackPos(0) < 4) - return _birthstoneGemTable[stackPos(0)]; - return 0; -} - -int KyraEngine_v1::o1_queryBrandonStatusBit(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_queryBrandonStatusBit(%p) (%d)", (const void *)script, stackPos(0)); - if (_brandonStatusBit & stackPos(0)) - return 1; - return 0; -} - -int KyraEngine_v1::o1_playFluteAnimation(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_playFluteAnimation(%p) ()", (const void *)script); - seq_playFluteAnimation(); - return 0; -} - -int KyraEngine_v1::o1_playWinterScrollSequence(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_playWinterScrollSequence(%p) (%d)", (const void *)script, stackPos(0)); - if (!stackPos(0)) - seq_winterScroll2(); - else - seq_winterScroll1(); - return 0; -} - -int KyraEngine_v1::o1_getIdolGem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getIdolGem(%p) (%d)", (const void *)script, stackPos(0)); - return _idolGemsTable[stackPos(0)]; -} - -int KyraEngine_v1::o1_setIdolGem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setIdolGem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - _idolGemsTable[stackPos(0)] = stackPos(1); - return 0; -} - -int KyraEngine_v1::o1_totalItemsInScene(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_totalItemsInScene(%p) (%d)", (const void *)script, stackPos(0)); - return countItemsInScene(stackPos(0)); -} - -int KyraEngine_v1::o1_restoreBrandonsMovementDelay(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_restoreBrandonsMovementDelay(%p) ()", (const void *)script); - setWalkspeed(_configWalkspeed); - return 0; -} - -int KyraEngine_v1::o1_setMousePos(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setMousePos(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - _system->warpMouse(stackPos(0), stackPos(1)); - return 0; -} - -int KyraEngine_v1::o1_getMouseState(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getMouseState(%p) ()", (const void *)script); - return _mouseState; -} - -int KyraEngine_v1::o1_setEntranceMouseCursorTrack(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setEntranceMouseCursorTrack(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); - _entranceMouseCursorTracks[0] = stackPos(0); - _entranceMouseCursorTracks[1] = stackPos(1); - _entranceMouseCursorTracks[2] = stackPos(0) + stackPos(2) - 1; - _entranceMouseCursorTracks[3] = stackPos(1) + stackPos(3) - 1; - _entranceMouseCursorTracks[4] = stackPos(4); - return 0; -} - -int KyraEngine_v1::o1_itemAppearsOnGround(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_itemAppearsOnGround(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); - processItemDrop(_currentCharacter->sceneId, stackPos(0), stackPos(1), stackPos(2), 2, 0); - return 0; -} - -int KyraEngine_v1::o1_setNoDrawShapesFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setNoDrawShapesFlag(%p) (%d)", (const void *)script, stackPos(0)); - _animator->_noDrawShapesFlag = stackPos(0); - return 0; -} - -int KyraEngine_v1::o1_fadeEntirePalette(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_fadeEntirePalette(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - int cmd = stackPos(0); - uint8 *fadePal = 0; - - if (_flags.platform == Common::kPlatformAmiga) { - if (cmd == 0) { - fadePal = _screen->getPalette(2); - memset(fadePal, 0, 32*3); - memcpy(_screen->getPalette(4), _screen->getPalette(0), 32*3); - } else if (cmd == 1) { - fadePal = _screen->getPalette(0); - memcpy(_screen->getPalette(0), _screen->getPalette(4), 32*3); - } else if (cmd == 2) { - fadePal = _screen->getPalette(0); - memset(_screen->getPalette(2), 0, 32*3); - } - } else { - if (cmd == 0) { - fadePal = _screen->getPalette(2); - uint8 *screenPal = _screen->getPalette(0); - uint8 *backUpPal = _screen->getPalette(3); - - memcpy(backUpPal, screenPal, sizeof(uint8)*768); - memset(fadePal, 0, sizeof(uint8)*768); - } else if (cmd == 1) { - //fadePal = _screen->getPalette(3); - warning("unimplemented o1_fadeEntirePalette function"); - return 0; - } else if (cmd == 2) { - memset(_screen->getPalette(2), 0, 768); - memcpy(_screen->getPalette(0), _screen->getPalette(1), 768); - fadePal = _screen->getPalette(0); - } - } - - _screen->fadePalette(fadePal, stackPos(1)); - return 0; -} - -int KyraEngine_v1::o1_itemOnGroundHere(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_itemOnGroundHere(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - assert(stackPos(0) < _roomTableSize); - Room *curRoom = &_roomTable[stackPos(0)]; - for (int i = 0; i < 12; ++i) { - if (curRoom->itemsTable[i] == stackPos(1)) - return 1; - } - return 0; -} - -int KyraEngine_v1::o1_queryCauldronState(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_queryCauldronState(%p) ()", (const void *)script); - return _cauldronState; -} - -int KyraEngine_v1::o1_setCauldronState(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setCauldronState(%p) (%d)", (const void *)script, stackPos(0)); - _cauldronState = stackPos(0); - return _cauldronState; -} - -int KyraEngine_v1::o1_queryCrystalState(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_queryCrystalState(%p) (%d)", (const void *)script, stackPos(0)); - if (!stackPos(0)) - return _crystalState[0]; - else if (stackPos(0) == 1) - return _crystalState[1]; - return -1; -} - -int KyraEngine_v1::o1_setCrystalState(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setCrystalState(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - if (!stackPos(0)) - _crystalState[0] = stackPos(1); - else if (stackPos(0) == 1) - _crystalState[1] = stackPos(1); - return stackPos(1); -} - -int KyraEngine_v1::o1_setPaletteRange(EMCState *script) { - warning("STUB: o1_setPaletteRange"); - return 0; -} - -int KyraEngine_v1::o1_shrinkBrandonDown(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_shrinkBrandonDown(%p) (%d)", (const void *)script, stackPos(0)); - int delayTime = stackPos(0); - checkAmuletAnimFlags(); - int scaleValue = _scaleTable[_currentCharacter->y1]; - int scale = 0; - - if (_scaleMode) - scale = scaleValue; - else - scale = 256; - - int scaleModeBackUp = _scaleMode; - _scaleMode = 1; - int scaleEnd = scale >> 1; - for (; scaleEnd <= scale; --scale) { - _scaleTable[_currentCharacter->y1] = scale; - _animator->animRefreshNPC(0); - delayWithTicks(1); - } - delayWithTicks(delayTime); // XXX - _scaleTable[_currentCharacter->y1] = scaleValue; - _scaleMode = scaleModeBackUp; - return 0; -} - -int KyraEngine_v1::o1_growBrandonUp(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_growBrandonUp(%p) ()", (const void *)script); - int scaleValue = _scaleTable[_currentCharacter->y1]; - int scale = 0; - if (_scaleMode) - scale = scaleValue; - else - scale = 256; - - int scaleModeBackUp = _scaleMode; - _scaleMode = 1; - for (int curScale = scale >> 1; curScale <= scale; ++curScale) { - _scaleTable[_currentCharacter->y1] = curScale; - _animator->animRefreshNPC(0); - delayWithTicks(1); - } - _scaleTable[_currentCharacter->y1] = scaleValue; - _scaleMode = scaleModeBackUp; - return 0; -} - -int KyraEngine_v1::o1_setBrandonScaleXAndY(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setBrandonScaleXAndY(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - _animator->_brandonScaleX = stackPos(0); - _animator->_brandonScaleY = stackPos(1); - return 0; -} - -int KyraEngine_v1::o1_resetScaleMode(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_resetScaleMode(%p) ()", (const void *)script); - _scaleMode = 0; - return 0; -} - -int KyraEngine_v1::o1_getScaleDepthTableValue(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getScaleDepthTableValue(%p) (%d)", (const void *)script, stackPos(0)); - assert(stackPos(0) < ARRAYSIZE(_scaleTable)); - return _scaleTable[stackPos(0)]; -} - -int KyraEngine_v1::o1_setScaleDepthTableValue(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setScaleDepthTableValue(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - assert(stackPos(0) < ARRAYSIZE(_scaleTable)); - _scaleTable[stackPos(0)] = stackPos(1); - return stackPos(1); -} - -int KyraEngine_v1::o1_message(EMCState *script) { - if (_flags.isTalkie) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_message(%p) (%d, '%s', %d)", (const void *)script, stackPos(0), stackPosString(1), stackPos(2)); - drawSentenceCommand(stackPosString(1), stackPos(2)); - } else { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_message(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); - drawSentenceCommand(stackPosString(0), stackPos(1)); - } - - return 0; -} - -int KyraEngine_v1::o1_checkClickOnNPC(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_checkClickOnNPC(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - return checkForNPCScriptRun(stackPos(0), stackPos(1)); -} - -int KyraEngine_v1::o1_getFoyerItem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getFoyerItem(%p) (%d)", (const void *)script, stackPos(0)); - assert(stackPos(0) < ARRAYSIZE(_foyerItemTable)); - return _foyerItemTable[stackPos(0)]; -} - -int KyraEngine_v1::o1_setFoyerItem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setFoyerItem(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - assert(stackPos(0) < ARRAYSIZE(_foyerItemTable)); - _foyerItemTable[stackPos(0)] = stackPos(1); - return stackPos(1); -} - -int KyraEngine_v1::o1_setNoItemDropRegion(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setNoItemDropRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - addToNoDropRects(stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - return 0; -} - -int KyraEngine_v1::o1_walkMalcolmOn(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_walkMalcolmOn(%p) ()", (const void *)script); - if (!_malcolmFlag) - _malcolmFlag = 1; - return 0; -} - -int KyraEngine_v1::o1_passiveProtection(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_passiveProtection(%p) ()", (const void *)script); - return 1; -} - -int KyraEngine_v1::o1_setPlayingLoop(EMCState *script) { - warning("STUB: o1_setPlayingLoop"); - return 0; -} - -int KyraEngine_v1::o1_brandonToStoneSequence(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_brandonToStoneSequence(%p) ()", (const void *)script); - seq_brandonToStone(); - return 0; -} - -int KyraEngine_v1::o1_brandonHealingSequence(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_brandonHealingSequence(%p) ()", (const void *)script); - seq_brandonHealing(); - return 0; -} - -int KyraEngine_v1::o1_protectCommandLine(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_protectCommandLine(%p) (%d)", (const void *)script, stackPos(0)); - return stackPos(0); -} - -int KyraEngine_v1::o1_pauseMusicSeconds(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_pauseMusicSeconds(%p) ()", (const void *)script); - // if music disabled - // return - o1_pauseSeconds(script); - return 0; -} - -int KyraEngine_v1::o1_resetMaskRegion(EMCState *script) { - warning("STUB: o1_resetMaskRegion"); - return 0; -} - -int KyraEngine_v1::o1_setPaletteChangeFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setPaletteChangeFlag(%p) (%d)", (const void *)script, stackPos(0)); - _paletteChanged = stackPos(0); - return _paletteChanged; -} - -int KyraEngine_v1::o1_fillRect(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_fillRect(%p) (%d, %d, %d, %d, %d, 0x%X)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - int videoPageBackup = _screen->_curPage; - _screen->_curPage = stackPos(0); - _screen->fillRect(stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - _screen->_curPage = videoPageBackup; - return 0; -} - -int KyraEngine_v1::o1_vocUnload(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_vocUnload(%p) ()", (const void *)script); - // this should unload all voc files (not needed) - return 0; -} - -int KyraEngine_v1::o1_vocLoad(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_vocLoad(%p) (%d)", (const void *)script, stackPos(0)); - // this should load the specified voc file (not needed) - return 0; -} - -int KyraEngine_v1::o1_dummy(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_dummy(%p) ()", (const void *)script); - return 0; -} - -#pragma mark - - -typedef Common::Functor1Mem OpcodeV1; -#define SetOpcodeTable(x) table = &x; -#define Opcode(x) table->push_back(new OpcodeV1(this, &KyraEngine_v1::x)) -void KyraEngine_v1::setupOpcodeTable() { - Common::Array *table = 0; - - SetOpcodeTable(_opcodes); - // 0x00 - Opcode(o1_magicInMouseItem); - Opcode(o1_characterSays); - Opcode(o1_pauseTicks); - Opcode(o1_drawSceneAnimShape); - // 0x04 - Opcode(o1_queryGameFlag); - Opcode(o1_setGameFlag); - Opcode(o1_resetGameFlag); - Opcode(o1_runNPCScript); - // 0x08 - Opcode(o1_setSpecialExitList); - Opcode(o1_blockInWalkableRegion); - Opcode(o1_blockOutWalkableRegion); - Opcode(o1_walkPlayerToPoint); - // 0x0c - Opcode(o1_dropItemInScene); - Opcode(o1_drawAnimShapeIntoScene); - Opcode(o1_createMouseItem); - Opcode(o1_savePageToDisk); - // 0x10 - Opcode(o1_sceneAnimOn); - Opcode(o1_sceneAnimOff); - Opcode(o1_getElapsedSeconds); - Opcode(o1_mouseIsPointer); - // 0x14 - Opcode(o1_destroyMouseItem); - Opcode(o1_runSceneAnimUntilDone); - Opcode(o1_fadeSpecialPalette); - Opcode(o1_playAdlibSound); - // 0x18 - Opcode(o1_playAdlibScore); - Opcode(o1_phaseInSameScene); - Opcode(o1_setScenePhasingFlag); - Opcode(o1_resetScenePhasingFlag); - // 0x1c - Opcode(o1_queryScenePhasingFlag); - Opcode(o1_sceneToDirection); - Opcode(o1_setBirthstoneGem); - Opcode(o1_placeItemInGenericMapScene); - // 0x20 - Opcode(o1_setBrandonStatusBit); - Opcode(o1_pauseSeconds); - Opcode(o1_getCharactersLocation); - Opcode(o1_runNPCSubscript); - // 0x24 - Opcode(o1_magicOutMouseItem); - Opcode(o1_internalAnimOn); - Opcode(o1_forceBrandonToNormal); - Opcode(o1_poisonDeathNow); - // 0x28 - Opcode(o1_setScaleMode); - Opcode(o1_openWSAFile); - Opcode(o1_closeWSAFile); - Opcode(o1_runWSAFromBeginningToEnd); - // 0x2c - Opcode(o1_displayWSAFrame); - Opcode(o1_enterNewScene); - Opcode(o1_setSpecialEnterXAndY); - Opcode(o1_runWSAFrames); - // 0x30 - Opcode(o1_popBrandonIntoScene); - Opcode(o1_restoreAllObjectBackgrounds); - Opcode(o1_setCustomPaletteRange); - Opcode(o1_loadPageFromDisk); - // 0x34 - Opcode(o1_customPrintTalkString); - Opcode(o1_restoreCustomPrintBackground); - Opcode(o1_hideMouse); - Opcode(o1_showMouse); - // 0x38 - Opcode(o1_getCharacterX); - Opcode(o1_getCharacterY); - Opcode(o1_changeCharactersFacing); - Opcode(o1_copyWSARegion); - // 0x3c - Opcode(o1_printText); - Opcode(o1_random); - Opcode(o1_loadSoundFile); - Opcode(o1_displayWSAFrameOnHidPage); - // 0x40 - Opcode(o1_displayWSASequentialFrames); - Opcode(o1_drawCharacterStanding); - Opcode(o1_internalAnimOff); - Opcode(o1_changeCharactersXAndY); - // 0x44 - Opcode(o1_clearSceneAnimatorBeacon); - Opcode(o1_querySceneAnimatorBeacon); - Opcode(o1_refreshSceneAnimator); - Opcode(o1_placeItemInOffScene); - // 0x48 - Opcode(o1_wipeDownMouseItem); - Opcode(o1_placeCharacterInOtherScene); - Opcode(o1_getKey); - Opcode(o1_specificItemInInventory); - // 0x4c - Opcode(o1_popMobileNPCIntoScene); - Opcode(o1_mobileCharacterInScene); - Opcode(o1_hideMobileCharacter); - Opcode(o1_unhideMobileCharacter); - // 0x50 - Opcode(o1_setCharactersLocation); - Opcode(o1_walkCharacterToPoint); - Opcode(o1_specialEventDisplayBrynnsNote); - Opcode(o1_specialEventRemoveBrynnsNote); - // 0x54 - Opcode(o1_setLogicPage); - Opcode(o1_fatPrint); - Opcode(o1_preserveAllObjectBackgrounds); - Opcode(o1_updateSceneAnimations); - // 0x58 - Opcode(o1_sceneAnimationActive); - Opcode(o1_setCharactersMovementDelay); - Opcode(o1_getCharactersFacing); - Opcode(o1_bkgdScrollSceneAndMasksRight); - // 0x5c - Opcode(o1_dispelMagicAnimation); - Opcode(o1_findBrightestFireberry); - Opcode(o1_setFireberryGlowPalette); - Opcode(o1_setDeathHandlerFlag); - // 0x60 - Opcode(o1_drinkPotionAnimation); - Opcode(o1_makeAmuletAppear); - Opcode(o1_drawItemShapeIntoScene); - Opcode(o1_setCharactersCurrentFrame); - // 0x64 - Opcode(o1_waitForConfirmationMouseClick); - Opcode(o1_pageFlip); - Opcode(o1_setSceneFile); - Opcode(o1_getItemInMarbleVase); - // 0x68 - Opcode(o1_setItemInMarbleVase); - Opcode(o1_addItemToInventory); - Opcode(o1_intPrint); - Opcode(o1_shakeScreen); - // 0x6c - Opcode(o1_createAmuletJewel); - Opcode(o1_setSceneAnimCurrXY); - Opcode(o1_poisonBrandonAndRemaps); - Opcode(o1_fillFlaskWithWater); - // 0x70 - Opcode(o1_getCharactersMovementDelay); - Opcode(o1_getBirthstoneGem); - Opcode(o1_queryBrandonStatusBit); - Opcode(o1_playFluteAnimation); - // 0x74 - Opcode(o1_playWinterScrollSequence); - Opcode(o1_getIdolGem); - Opcode(o1_setIdolGem); - Opcode(o1_totalItemsInScene); - // 0x78 - Opcode(o1_restoreBrandonsMovementDelay); - Opcode(o1_setMousePos); - Opcode(o1_getMouseState); - Opcode(o1_setEntranceMouseCursorTrack); - // 0x7c - Opcode(o1_itemAppearsOnGround); - Opcode(o1_setNoDrawShapesFlag); - Opcode(o1_fadeEntirePalette); - Opcode(o1_itemOnGroundHere); - // 0x80 - Opcode(o1_queryCauldronState); - Opcode(o1_setCauldronState); - Opcode(o1_queryCrystalState); - Opcode(o1_setCrystalState); - // 0x84 - Opcode(o1_setPaletteRange); - Opcode(o1_shrinkBrandonDown); - Opcode(o1_growBrandonUp); - Opcode(o1_setBrandonScaleXAndY); - // 0x88 - Opcode(o1_resetScaleMode); - Opcode(o1_getScaleDepthTableValue); - Opcode(o1_setScaleDepthTableValue); - Opcode(o1_message); - // 0x8c - Opcode(o1_checkClickOnNPC); - Opcode(o1_getFoyerItem); - Opcode(o1_setFoyerItem); - Opcode(o1_setNoItemDropRegion); - // 0x90 - Opcode(o1_walkMalcolmOn); - Opcode(o1_passiveProtection); - Opcode(o1_setPlayingLoop); - Opcode(o1_brandonToStoneSequence); - // 0x94 - Opcode(o1_brandonHealingSequence); - Opcode(o1_protectCommandLine); - Opcode(o1_pauseMusicSeconds); - Opcode(o1_resetMaskRegion); - // 0x98 - Opcode(o1_setPaletteChangeFlag); - Opcode(o1_fillRect); - Opcode(o1_vocUnload); - Opcode(o1_vocLoad); - // 0x9c - Opcode(o1_dummy); -} -#undef Opcode - -} // end of namespace Kyra - diff --git a/engines/kyra/seqplayer.cpp b/engines/kyra/seqplayer.cpp index 9a670ce85f..73d69ef10c 100644 --- a/engines/kyra/seqplayer.cpp +++ b/engines/kyra/seqplayer.cpp @@ -40,7 +40,7 @@ namespace Kyra { -SeqPlayer::SeqPlayer(KyraEngine_v1 *vm, OSystem *system) { +SeqPlayer::SeqPlayer(KyraEngine_LoK *vm, OSystem *system) { _vm = vm; _system = system; diff --git a/engines/kyra/seqplayer.h b/engines/kyra/seqplayer.h index ce7f4648df..7e1b06d955 100644 --- a/engines/kyra/seqplayer.h +++ b/engines/kyra/seqplayer.h @@ -26,13 +26,13 @@ #ifndef KYRA_SEQPLAYER_H #define KYRA_SEQPLAYER_H -#include "kyra/kyra_v1.h" +#include "kyra/kyra_lok.h" namespace Kyra { class SeqPlayer { public: - SeqPlayer(KyraEngine_v1 *vm, OSystem *system); + SeqPlayer(KyraEngine_LoK *vm, OSystem *system); ~SeqPlayer(); void setCopyViewOffs(bool offs) { @@ -46,7 +46,7 @@ public: uint8 *setPanPages(int pageNum, int shape); protected: - KyraEngine_v1 *_vm; + KyraEngine_LoK *_vm; OSystem *_system; Screen *_screen; Sound *_sound; diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index bed94b2ae0..fc0959f444 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -333,7 +333,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { seq_uninit(); } -int KyraEngine_HoF::seq_introWestwood(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm) { debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_introWestwood(%p, %i, %i, %i)", (const void*)wsaObj, x, y, frm); if (frm == -2) { @@ -346,7 +346,7 @@ int KyraEngine_HoF::seq_introWestwood(WSAMovieV2 *wsaObj, int x, int y, int frm) return 0; } -int KyraEngine_HoF::seq_introTitle(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm) { debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_introTitle(%p, %i, %i, %i)", (const void*)wsaObj, x, y, frm); if (frm == 1) { @@ -368,7 +368,7 @@ int KyraEngine_HoF::seq_introTitle(WSAMovieV2 *wsaObj, int x, int y, int frm) { return 0; } -int KyraEngine_HoF::seq_introOverview(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm) { debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_introOverview(%p, %i, %i, %i)", (const void*)wsaObj, x, y, frm); uint8 *tmpPal = &(_screen->getPalette(3)[0x101]); @@ -468,7 +468,7 @@ int KyraEngine_HoF::seq_introOverview(WSAMovieV2 *wsaObj, int x, int y, int frm) return 0; } -int KyraEngine_HoF::seq_introLibrary(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introLibrary(WSAMovie_v2 *wsaObj, int x, int y, int frm) { debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_introLibrary(%p, %i, %i, %i)", (const void*)wsaObj, x, y, frm); switch (_seqFrameCounter) { @@ -544,7 +544,7 @@ int KyraEngine_HoF::seq_introLibrary(WSAMovieV2 *wsaObj, int x, int y, int frm) } -int KyraEngine_HoF::seq_introHand(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introHand(WSAMovie_v2 *wsaObj, int x, int y, int frm) { debugC(9, kDebugLevelMain, "KyraEngine_HoF::seq_introHand(%p, %i, %i, %i)", (const void*)wsaObj, x, y, frm); switch (_seqFrameCounter) { @@ -628,7 +628,7 @@ int KyraEngine_HoF::seq_introHand(WSAMovieV2 *wsaObj, int x, int y, int frm) { return 0; } -int KyraEngine_HoF::seq_introPoint(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introPoint(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (frm == -2) { seq_waitForTextsTimeout(); _seqEndTime = 0; @@ -661,7 +661,7 @@ int KyraEngine_HoF::seq_introPoint(WSAMovieV2 *wsaObj, int x, int y, int frm) { return 0; } -int KyraEngine_HoF::seq_introZanfaun(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introZanfaun(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (frm == -2) { seq_waitForTextsTimeout(); _seqEndTime = 0; @@ -750,7 +750,7 @@ int KyraEngine_HoF::seq_introZanfaun(WSAMovieV2 *wsaObj, int x, int y, int frm) return 0; } -int KyraEngine_HoF::seq_introOver1(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introOver1(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (frm == 2) seq_waitForTextsTimeout(); else if (frm == 3) @@ -759,13 +759,13 @@ int KyraEngine_HoF::seq_introOver1(WSAMovieV2 *wsaObj, int x, int y, int frm) { } -int KyraEngine_HoF::seq_introOver2(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introOver2(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (frm == 1) seq_playTalkText(12); return frm; } -int KyraEngine_HoF::seq_introForest(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introForest(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (frm == 11) seq_waitForTextsTimeout(); else if (frm == 12) @@ -774,7 +774,7 @@ int KyraEngine_HoF::seq_introForest(WSAMovieV2 *wsaObj, int x, int y, int frm) { return frm; } -int KyraEngine_HoF::seq_introDragon(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introDragon(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (frm == 11) seq_waitForTextsTimeout(); else if (frm == 3) @@ -782,17 +782,17 @@ int KyraEngine_HoF::seq_introDragon(WSAMovieV2 *wsaObj, int x, int y, int frm) { return frm; } -int KyraEngine_HoF::seq_introDarm(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introDarm(WSAMovie_v2 *wsaObj, int x, int y, int frm) { //NULLSUB (at least in fm-towns version) return frm; } -int KyraEngine_HoF::seq_introLibrary2(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introLibrary2(WSAMovie_v2 *wsaObj, int x, int y, int frm) { //NULLSUB (at least in fm-towns version) return frm; } -int KyraEngine_HoF::seq_introMarco(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introMarco(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (frm == 36) { seq_waitForTextsTimeout(); _seqEndTime = 0; @@ -800,34 +800,34 @@ int KyraEngine_HoF::seq_introMarco(WSAMovieV2 *wsaObj, int x, int y, int frm) { return frm; } -int KyraEngine_HoF::seq_introHand1a(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introHand1a(WSAMovie_v2 *wsaObj, int x, int y, int frm) { //NULLSUB (at least in fm-towns version) return frm; } -int KyraEngine_HoF::seq_introHand1b(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introHand1b(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (frm == 15) frm = 12; return frm; } -int KyraEngine_HoF::seq_introHand1c(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introHand1c(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (frm == 8) frm = 4; return frm; } -int KyraEngine_HoF::seq_introHand2(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introHand2(WSAMovie_v2 *wsaObj, int x, int y, int frm) { //NULLSUB (at least in fm-towns version) return frm; } -int KyraEngine_HoF::seq_introHand3(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_introHand3(WSAMovie_v2 *wsaObj, int x, int y, int frm) { //NULLSUB (at least in fm-towns version) return frm; } -int KyraEngine_HoF::seq_finaleFunters(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_finaleFunters(WSAMovie_v2 *wsaObj, int x, int y, int frm) { uint32 endtime = 0; int chatX = 0; int chatY = 0; @@ -911,7 +911,7 @@ int KyraEngine_HoF::seq_finaleFunters(WSAMovieV2 *wsaObj, int x, int y, int frm) return 0; } -int KyraEngine_HoF::seq_finaleFerb(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_finaleFerb(WSAMovie_v2 *wsaObj, int x, int y, int frm) { uint32 endtime = 0; int chatX = 0; int chatY = 0; @@ -995,7 +995,7 @@ int KyraEngine_HoF::seq_finaleFerb(WSAMovieV2 *wsaObj, int x, int y, int frm) { return 0; } -int KyraEngine_HoF::seq_finaleFish(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_finaleFish(WSAMovie_v2 *wsaObj, int x, int y, int frm) { uint32 endtime = 0; int chatX = 0; int chatY = 0; @@ -1072,7 +1072,7 @@ int KyraEngine_HoF::seq_finaleFish(WSAMovieV2 *wsaObj, int x, int y, int frm) { return 0; } -int KyraEngine_HoF::seq_finaleFheep(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_finaleFheep(WSAMovie_v2 *wsaObj, int x, int y, int frm) { uint32 endtime = 0; int chatX = 0; int chatY = 0; @@ -1154,7 +1154,7 @@ int KyraEngine_HoF::seq_finaleFheep(WSAMovieV2 *wsaObj, int x, int y, int frm) { return 0; } -int KyraEngine_HoF::seq_finaleFarmer(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_finaleFarmer(WSAMovie_v2 *wsaObj, int x, int y, int frm) { uint32 endtime = 0; int chatX = 0; int chatY = 0; @@ -1224,7 +1224,7 @@ int KyraEngine_HoF::seq_finaleFarmer(WSAMovieV2 *wsaObj, int x, int y, int frm) return 0; } -int KyraEngine_HoF::seq_finaleFuards(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm) { uint32 endtime = 0; int chatX = 0; int chatY = 0; @@ -1324,7 +1324,7 @@ int KyraEngine_HoF::seq_finaleFuards(WSAMovieV2 *wsaObj, int x, int y, int frm) return 0; } -int KyraEngine_HoF::seq_finaleFirates(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_finaleFirates(WSAMovie_v2 *wsaObj, int x, int y, int frm) { uint32 endtime = 0; int chatX = 0; int chatY = 0; @@ -1416,7 +1416,7 @@ int KyraEngine_HoF::seq_finaleFirates(WSAMovieV2 *wsaObj, int x, int y, int frm) return 0; } -int KyraEngine_HoF::seq_finaleFrash(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_finaleFrash(WSAMovie_v2 *wsaObj, int x, int y, int frm) { int tmp = 0; switch (frm) { @@ -1544,7 +1544,7 @@ void KyraEngine_HoF::seq_finaleActorScreen() { _sound->loadSoundFile(0); } -int KyraEngine_HoF::seq_finaleFiggle(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_finaleFiggle(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (_seqFrameCounter == 10) _seqEndTime = 0; if (_seqFrameCounter == 10 || _seqFrameCounter == 5 || _seqFrameCounter == 7) @@ -1554,18 +1554,18 @@ int KyraEngine_HoF::seq_finaleFiggle(WSAMovieV2 *wsaObj, int x, int y, int frm) return frm; } -int KyraEngine_HoF::seq_demoVirgin(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoVirgin(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (!frm) delay(50 * _tickLength); return 0; } -int KyraEngine_HoF::seq_demoWestwood(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoWestwood(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (!frm) _sound->playTrack(2); return 0; } -int KyraEngine_HoF::seq_demoTitle(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoTitle(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (!frm) { _sound->playTrack(3); } else if (frm == 25) { @@ -1576,7 +1576,7 @@ int KyraEngine_HoF::seq_demoTitle(WSAMovieV2 *wsaObj, int x, int y, int frm) { return 0; } -int KyraEngine_HoF::seq_demoHill(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoHill(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (!frm) { _sound->playTrack(4); } else if (frm == 25) { @@ -1596,7 +1596,7 @@ int KyraEngine_HoF::seq_demoHill(WSAMovieV2 *wsaObj, int x, int y, int frm) { return 0; } -int KyraEngine_HoF::seq_demoOuthome(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoOuthome(WSAMovie_v2 *wsaObj, int x, int y, int frm) { switch (frm) { case 12: seq_playTalkText(4); @@ -1637,7 +1637,7 @@ int KyraEngine_HoF::seq_demoOuthome(WSAMovieV2 *wsaObj, int x, int y, int frm) { return 0; } -int KyraEngine_HoF::seq_demoWharf(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoWharf(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (!_seqFrameCounter) seq_loadNestedSequence(0, kSequenceDemoWharf2); @@ -1678,7 +1678,7 @@ int KyraEngine_HoF::seq_demoWharf(WSAMovieV2 *wsaObj, int x, int y, int frm) { return 0; } -int KyraEngine_HoF::seq_demoDinob(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoDinob(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (frm == 0) { if (!(_seqFrameCounter/8)) { seq_loadNestedSequence(0, kSequenceDemoDinob2); @@ -1699,7 +1699,7 @@ int KyraEngine_HoF::seq_demoDinob(WSAMovieV2 *wsaObj, int x, int y, int frm) { return 0; } -int KyraEngine_HoF::seq_demoFisher(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoFisher(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (((_system->getMillis() - _seqStartTime) / (5 * _tickLength)) > 0) { _seqStartTime = _system->getMillis(); if (!_seqFrameCounter) { @@ -1741,14 +1741,14 @@ int KyraEngine_HoF::seq_demoFisher(WSAMovieV2 *wsaObj, int x, int y, int frm) { return 0; } -int KyraEngine_HoF::seq_demoWharf2(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoWharf2(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (frm == 69) _seqWsaCurrentFrame = 8; return frm; } -int KyraEngine_HoF::seq_demoDinob2(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoDinob2(WSAMovie_v2 *wsaObj, int x, int y, int frm) { switch (frm) { case 19: seq_playTalkText(13); @@ -1778,17 +1778,17 @@ int KyraEngine_HoF::seq_demoDinob2(WSAMovieV2 *wsaObj, int x, int y, int frm) { return frm; } -int KyraEngine_HoF::seq_demoWater(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoWater(WSAMovie_v2 *wsaObj, int x, int y, int frm) { if (frm == 1) seq_playTalkText(11); return frm; } -int KyraEngine_HoF::seq_demoBail(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoBail(WSAMovie_v2 *wsaObj, int x, int y, int frm) { return frm; } -int KyraEngine_HoF::seq_demoDig(WSAMovieV2 *wsaObj, int x, int y, int frm) { +int KyraEngine_HoF::seq_demoDig(WSAMovie_v2 *wsaObj, int x, int y, int frm) { return frm; } @@ -2048,7 +2048,7 @@ void KyraEngine_HoF::seq_loadNestedSequence(int wsaNum, int seqNum) { NestedSequence s = _sequences->seqn[seqNum]; if (!_activeWSA[wsaNum].movie) { - _activeWSA[wsaNum].movie = new WSAMovieV2(this, _screen); + _activeWSA[wsaNum].movie = new WSAMovie_v2(this, _screen); assert(_activeWSA[wsaNum].movie); } @@ -2328,7 +2328,7 @@ void KyraEngine_HoF::seq_printCreditsString(uint16 strIndex, int x, int y, const _seqTextColor[0] = seqTextColor0; } -void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, int textColor, int x, int y, int width, WSAMovieV2 *wsa, int firstframe, int lastframe, int wsaXpos, int wsaYpos) { +void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, int textColor, int x, int y, int width, WSAMovie_v2 *wsa, int firstframe, int lastframe, int wsaXpos, int wsaYpos) { int dur = int(strlen(_sequenceStrings[strIndex])) * (_flags.isTalkie ? 7 : 15); int entry = textEnabled() ? seq_setTextEntry(strIndex, x, y, dur, width) : strIndex; _activeText[entry].textcolor = textColor; @@ -2574,7 +2574,7 @@ void KyraEngine_HoF::seq_scrollPage() { } void KyraEngine_HoF::seq_showStarcraftLogo() { - WSAMovieV2 *ci = new WSAMovieV2(this, _screen); + WSAMovie_v2 *ci = new WSAMovie_v2(this, _screen); assert(ci); _screen->clearPage(2); _res->loadPakFile("INTROGEN.PAK"); @@ -2616,7 +2616,7 @@ void KyraEngine_HoF::seq_showStarcraftLogo() { void KyraEngine_HoF::seq_init() { _seqProcessedString = new char[200]; - _seqWsa = new WSAMovieV2(this, _screen); + _seqWsa = new WSAMovie_v2(this, _screen); _activeWSA = new ActiveWSA[8]; _activeText = new ActiveText[10]; diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp new file mode 100644 index 0000000000..904eae9d48 --- /dev/null +++ b/engines/kyra/sequences_lok.cpp @@ -0,0 +1,1884 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "kyra/kyra_lok.h" +#include "kyra/seqplayer.h" +#include "kyra/screen_lok.h" +#include "kyra/resource.h" +#include "kyra/sound.h" +#include "kyra/sprites.h" +#include "kyra/wsamovie.h" +#include "kyra/animator_lok.h" +#include "kyra/text.h" +#include "kyra/timer.h" + +#include "common/events.h" +#include "common/system.h" +#include "common/savefile.h" + +namespace Kyra { + +void KyraEngine_LoK::seq_demo() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_demo()"); + + snd_playTheme(0, 2); + + _screen->loadBitmap("START.CPS", 7, 7, _screen->_currentPalette); + _screen->copyRegion(0, 0, 0, 0, 320, 200, 6, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); + _screen->fadeFromBlack(); + delay(60 * _tickLength); + _screen->fadeToBlack(); + + _screen->clearPage(0); + _screen->loadBitmap("TOP.CPS", 7, 7, NULL); + _screen->loadBitmap("BOTTOM.CPS", 5, 5, _screen->_currentPalette); + _screen->copyRegion(0, 91, 0, 8, 320, 103, 6, 0); + _screen->copyRegion(0, 0, 0, 111, 320, 64, 6, 0); + _screen->updateScreen(); + _screen->fadeFromBlack(); + + _seq->playSequence(_seq_WestwoodLogo, true); + delay(60 * _tickLength); + _seq->playSequence(_seq_KyrandiaLogo, true); + + _screen->fadeToBlack(); + _screen->clearPage(2); + _screen->clearPage(0); + + _seq->playSequence(_seq_Demo1, true); + + _screen->clearPage(0); + _seq->playSequence(_seq_Demo2, true); + + _screen->clearPage(0); + _seq->playSequence(_seq_Demo3, true); + + _screen->clearPage(0); + _seq->playSequence(_seq_Demo4, true); + + _screen->clearPage(0); + _screen->loadBitmap("FINAL.CPS", 7, 7, _screen->_currentPalette); + _screen->_curPage = 0; + _screen->copyRegion(0, 0, 0, 0, 320, 200, 6, 0); + _screen->updateScreen(); + _screen->fadeFromBlack(); + delay(60 * _tickLength); + _screen->fadeToBlack(); + _sound->haltTrack(); +} + +void KyraEngine_LoK::seq_intro() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_intro()"); + + if (_flags.isTalkie) + _res->loadPakFile("INTRO.VRM"); + + static const IntroProc introProcTable[] = { + &KyraEngine_LoK::seq_introLogos, + &KyraEngine_LoK::seq_introStory, + &KyraEngine_LoK::seq_introMalcolmTree, + &KyraEngine_LoK::seq_introKallakWriting, + &KyraEngine_LoK::seq_introKallakMalcolm + }; + + Common::InSaveFile *in; + if ((in = _saveFileMan->openForLoading(getSavegameFilename(0)))) { + delete in; + _skipIntroFlag = true; + } else + _skipIntroFlag = false; + + _seq->setCopyViewOffs(true); + _screen->setFont(Screen::FID_8_FNT); + if (_flags.platform != Common::kPlatformFMTowns && _flags.platform != Common::kPlatformPC98) + snd_playTheme(0, 2); + _text->setTalkCoords(144); + + for (int i = 0; i < ARRAYSIZE(introProcTable) && !seq_skipSequence(); ++i) + (this->*introProcTable[i])(); + + _text->setTalkCoords(136); + delay(30 * _tickLength); + _seq->setCopyViewOffs(false); + _sound->haltTrack(); + _sound->voiceStop(); + + if (_flags.isTalkie) + _res->unloadPakFile("INTRO.VRM"); +} + +void KyraEngine_LoK::seq_introLogos() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_introLogos()"); + + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { + _screen->loadBitmap("LOGO.CPS", 3, 3, _screen->_currentPalette); + _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0); + _screen->updateScreen(); + _screen->fadeFromBlack(); + delay(90 * _tickLength); + _screen->fadeToBlack(); + if (!_abortIntroFlag) + snd_playWanderScoreViaMap(57, 0); + } + + _screen->clearPage(0); + + if (_flags.platform == Common::kPlatformAmiga) { + _screen->loadPalette("INTRO.PAL", _screen->_currentPalette); + _screen->loadBitmap("BOTTOM.CPS", 3, 5, 0); + _screen->loadBitmap("TOP.CPS", 3, 3, 0); + _screen->copyRegion(0, 0, 0, 111, 320, 64, 2, 0); + _screen->copyRegion(0, 91, 0, 8, 320, 109, 2, 0); + _screen->copyRegion(0, 0, 0, 0, 320, 190, 0, 2); + } else { + _screen->loadBitmap("TOP.CPS", 7, 7, 0); + _screen->loadBitmap("BOTTOM.CPS", 5, 5, _screen->_currentPalette); + _screen->copyRegion(0, 91, 0, 8, 320, 103, 6, 0); + _screen->copyRegion(0, 0, 0, 111, 320, 64, 6, 0); + } + + _screen->_curPage = 0; + _screen->updateScreen(); + _screen->fadeFromBlack(); + + if (_seq->playSequence(_seq_WestwoodLogo, _skipFlag) || _quitFlag) { + _screen->fadeToBlack(); + _screen->clearPage(0); + return; + } + delay(60 * _tickLength); + + if (_flags.platform == Common::kPlatformAmiga) { + memcpy(_screen->_currentPalette, _screen->_currentPalette + 3*32, 3*32); + _screen->setScreenPalette(_screen->_currentPalette); + } + + if ((_seq->playSequence(_seq_KyrandiaLogo, _skipFlag) && !seq_skipSequence()) || _quitFlag) { + _screen->fadeToBlack(); + _screen->clearPage(0); + return; + } + _screen->fillRect(0, 179, 319, 199, 0); + + if (_quitFlag) + return; + + if (_flags.platform == Common::kPlatformAmiga) { + memcpy(_screen->_currentPalette, _screen->_currentPalette + 3*64, 3*32); + _screen->fadeToBlack(); + _screen->copyRegion(0, 0, 0, 0, 320, 200, 4, 0); + _screen->fadeFromBlack(); + } else { + _screen->copyRegion(0, 91, 0, 8, 320, 104, 6, 2); + _screen->copyRegion(0, 0, 0, 112, 320, 64, 6, 2); + + uint32 start = _system->getMillis(); + bool doneFlag = false; + int oldDistance = 0; + + do { + uint32 now = _system->getMillis(); + + // The smallest y2 we ever draw the screen for is 65. + int distance = (now - start) / _tickLength; + if (distance > 112) { + distance = 112; + doneFlag = true; + } + + if (distance > oldDistance) { + int y1 = 8 + distance; + int h1 = 168 - distance; + int y2 = 176 - distance; + int h2 = distance; + + _screen->copyRegion(0, y1, 0, 8, 320, h1, 2, 0); + if (h2 > 0) + _screen->copyRegion(0, 64, 0, y2, 320, h2, 4, 0); + _screen->updateScreen(); + } + + oldDistance = distance; + delay(10); + } while (!doneFlag && !_quitFlag && !_abortIntroFlag); + } + + if (_quitFlag) + return; + + _seq->playSequence(_seq_Forest, true); +} + +void KyraEngine_LoK::seq_introStory() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_introStory()"); + _screen->clearPage(3); + _screen->clearPage(0); + + // HACK: The Italian fan translation uses an special text screen here + // so we show it even when text is disabled + if (!textEnabled() && speechEnabled() && _flags.lang != Common::IT_ITA) + return; + + if (_flags.lang == Common::EN_ANY && !_flags.isTalkie && (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformAmiga)) + _screen->loadBitmap("TEXT.CPS", 3, 3, _screen->_currentPalette); + else if (_flags.lang == Common::EN_ANY || _flags.lang == Common::JA_JPN) + _screen->loadBitmap("TEXT_ENG.CPS", 3, 3, _screen->_currentPalette); + else if (_flags.lang == Common::DE_DEU) + _screen->loadBitmap("TEXT_GER.CPS", 3, 3, _screen->_currentPalette); + else if (_flags.lang == Common::FR_FRA) + _screen->loadBitmap("TEXT_FRE.CPS", 3, 3, _screen->_currentPalette); + else if (_flags.lang == Common::ES_ESP) + _screen->loadBitmap("TEXT_SPA.CPS", 3, 3, _screen->_currentPalette); + else if (_flags.lang == Common::IT_ITA && !_flags.isTalkie) + _screen->loadBitmap("TEXT_ITA.CPS", 3, 3, _screen->_currentPalette); + else if (_flags.lang == Common::IT_ITA && _flags.isTalkie) + _screen->loadBitmap("TEXT_ENG.CPS", 3, 3, _screen->_currentPalette); + else + warning("no story graphics file found"); + _screen->setScreenPalette(_screen->_currentPalette); + _screen->copyRegion(0, 0, 0, 0, 320, 200, 3, 0); + + if (_flags.lang == Common::JA_JPN) { + const int x1 = (Screen::SCREEN_W - _screen->getTextWidth(_seq_textsTable[18])) / 2; + const int x2 = (Screen::SCREEN_W - _screen->getTextWidth(_seq_textsTable[19])) / 2; + const int y1 = 175; + const int y2 = 184; + + uint8 colorMap[] = { 0, 15, 12, 12 }; + _screen->setTextColor(colorMap, 0, 3); + + _screen->printText(_seq_textsTable[18], x1, y1, 5, 8); + _screen->printText(_seq_textsTable[19], x2, y2, 5, 8); + } + + _screen->updateScreen(); + //debugC(0, kDebugLevelMain, "skipFlag %i, %i", _skipFlag, _tickLength); + delay(360 * _tickLength); +} + +void KyraEngine_LoK::seq_introMalcolmTree() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_introMalcolmTree()"); + _screen->_curPage = 0; + _screen->clearPage(3); + _seq->playSequence(_seq_MalcolmTree, true); +} + +void KyraEngine_LoK::seq_introKallakWriting() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_introKallakWriting()"); + _seq->makeHandShapes(); + _screen->setAnimBlockPtr(5060); + _screen->_charWidth = -2; + _screen->clearPage(3); + _seq->playSequence(_seq_KallakWriting, true); +} + +void KyraEngine_LoK::seq_introKallakMalcolm() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_introKallakMalcolm()"); + _screen->clearPage(3); + _seq->playSequence(_seq_KallakMalcolm, true); +} + +void KyraEngine_LoK::seq_createAmuletJewel(int jewel, int page, int noSound, int drawOnly) { + debugC(9, kDebugLevelMain, "seq_createAmuletJewel(%d, %d, %d, %d)", jewel, page, noSound, drawOnly); + static const uint16 specialJewelTable[] = { + 0x167, 0x162, 0x15D, 0x158, 0x153, 0xFFFF + }; + static const uint16 specialJewelTable1[] = { + 0x14F, 0x154, 0x159, 0x15E, 0x163, 0xFFFF + }; + static const uint16 specialJewelTable2[] = { + 0x150, 0x155, 0x15A, 0x15F, 0x164, 0xFFFF + }; + static const uint16 specialJewelTable3[] = { + 0x151, 0x156, 0x15B, 0x160, 0x165, 0xFFFF + }; + static const uint16 specialJewelTable4[] = { + 0x152, 0x157, 0x15C, 0x161, 0x166, 0xFFFF + }; + if (!noSound) + snd_playSoundEffect(0x5F); + _screen->hideMouse(); + if (!drawOnly) { + for (int i = 0; specialJewelTable[i] != 0xFFFF; ++i) { + _screen->drawShape(page, _shapes[specialJewelTable[i]], _amuletX2[jewel], _amuletY2[jewel], 0, 0); + _screen->updateScreen(); + delayWithTicks(3); + } + + const uint16 *opcodes = 0; + switch (jewel - 1) { + case 0: + opcodes = specialJewelTable1; + break; + + case 1: + opcodes = specialJewelTable2; + break; + + case 2: + opcodes = specialJewelTable3; + break; + + case 3: + opcodes = specialJewelTable4; + break; + } + + if (opcodes) { + for (int i = 0; opcodes[i] != 0xFFFF; ++i) { + _screen->drawShape(page, _shapes[opcodes[i]], _amuletX2[jewel], _amuletY2[jewel], 0, 0); + _screen->updateScreen(); + delayWithTicks(3); + } + } + } + _screen->drawShape(page, _shapes[323+jewel], _amuletX2[jewel], _amuletY2[jewel], 0, 0); + _screen->updateScreen(); + _screen->showMouse(); + setGameFlag(0x55+jewel); +} + +void KyraEngine_LoK::seq_brandonHealing() { + debugC(9, kDebugLevelMain, "seq_brandonHealing()"); + if (!(_deathHandler & 8)) + return; + if (_currentCharacter->sceneId == 210) { + if (_beadStateVar == 4 || _beadStateVar == 6) + return; + } + _screen->hideMouse(); + checkAmuletAnimFlags(); + assert(_healingShapeTable); + setupShapes123(_healingShapeTable, 22, 0); + _animator->setBrandonAnimSeqSize(3, 48); + snd_playSoundEffect(0x53); + for (int i = 123; i <= 144; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + for (int i = 125; i >= 123; --i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + _animator->resetBrandonAnimSeqSize(); + _currentCharacter->currentAnimFrame = 7; + _animator->animRefreshNPC(0); + freeShapes123(); + _screen->showMouse(); +} + +void KyraEngine_LoK::seq_brandonHealing2() { + debugC(9, kDebugLevelMain, "seq_brandonHealing2()"); + _screen->hideMouse(); + checkAmuletAnimFlags(); + assert(_healingShape2Table); + setupShapes123(_healingShape2Table, 30, 0); + resetBrandonPoisonFlags(); + _animator->setBrandonAnimSeqSize(3, 48); + snd_playSoundEffect(0x50); + for (int i = 123; i <= 152; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + _animator->resetBrandonAnimSeqSize(); + _currentCharacter->currentAnimFrame = 7; + _animator->animRefreshNPC(0); + freeShapes123(); + _screen->showMouse(); + assert(_poisonGone); + characterSays(2010, _poisonGone[0], 0, -2); + characterSays(2011, _poisonGone[1], 0, -2); +} + +void KyraEngine_LoK::seq_poisonDeathNow(int now) { + debugC(9, kDebugLevelMain, "seq_poisonDeathNow(%d)", now); + if (!(_brandonStatusBit & 1)) + return; + ++_poisonDeathCounter; + if (now) + _poisonDeathCounter = 2; + if (_poisonDeathCounter >= 2) { + snd_playWanderScoreViaMap(1, 1); + assert(_thePoison); + characterSays(7000, _thePoison[0], 0, -2); + characterSays(7001, _thePoison[1], 0, -2); + seq_poisonDeathNowAnim(); + _deathHandler = 3; + } else { + assert(_thePoison); + characterSays(7002, _thePoison[2], 0, -2); + characterSays(7004, _thePoison[3], 0, -2); + } +} + +void KyraEngine_LoK::seq_poisonDeathNowAnim() { + debugC(9, kDebugLevelMain, "seq_poisonDeathNowAnim()"); + _screen->hideMouse(); + checkAmuletAnimFlags(); + assert(_posionDeathShapeTable); + setupShapes123(_posionDeathShapeTable, 20, 0); + _animator->setBrandonAnimSeqSize(8, 48); + + _currentCharacter->currentAnimFrame = 124; + _animator->animRefreshNPC(0); + delayWithTicks(30); + + _currentCharacter->currentAnimFrame = 123; + _animator->animRefreshNPC(0); + delayWithTicks(30); + + for (int i = 125; i <= 139; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + + delayWithTicks(60); + + for (int i = 140; i <= 142; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + + delayWithTicks(60); + + _animator->resetBrandonAnimSeqSize(); + freeShapes123(); + _animator->restoreAllObjectBackgrounds(); + _currentCharacter->x1 = _currentCharacter->x2 = -1; + _currentCharacter->y1 = _currentCharacter->y2 = -1; + _animator->preserveAllBackgrounds(); + _screen->showMouse(); +} + +void KyraEngine_LoK::seq_playFluteAnimation() { + debugC(9, kDebugLevelMain, "seq_playFluteAnimation()"); + _screen->hideMouse(); + checkAmuletAnimFlags(); + setupShapes123(_fluteAnimShapeTable, 36, 0); + _animator->setBrandonAnimSeqSize(3, 75); + for (int i = 123; i <= 130; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(2); + } + + int delayTime = 0, soundType = 0; + if (queryGameFlag(0x85)) { + snd_playSoundEffect(0x63); + delayTime = 9; + soundType = 3; + } else if (!queryGameFlag(0x86)) { + snd_playSoundEffect(0x61); + delayTime = 2; + soundType = 1; + setGameFlag(0x86); + } else { + snd_playSoundEffect(0x62); + delayTime = 2; + soundType = 2; + } + + for (int i = 131; i <= 158; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(delayTime); + } + + for (int i = 126; i >= 123; --i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(delayTime); + } + _animator->resetBrandonAnimSeqSize(); + _currentCharacter->currentAnimFrame = 7; + _animator->animRefreshNPC(0); + freeShapes123(); + _screen->showMouse(); + + if (soundType == 1) { + assert(_fluteString); + characterSays(1000, _fluteString[0], 0, -2); + } else if (soundType == 2) { + assert(_fluteString); + characterSays(1001, _fluteString[1], 0, -2); + } +} + +void KyraEngine_LoK::seq_winterScroll1() { + debugC(9, kDebugLevelMain, "seq_winterScroll1()"); + _screen->hideMouse(); + checkAmuletAnimFlags(); + assert(_winterScrollTable); + assert(_winterScroll1Table); + assert(_winterScroll2Table); + setupShapes123(_winterScrollTable, 7, 0); + _animator->setBrandonAnimSeqSize(5, 66); + + for (int i = 123; i <= 129; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + + freeShapes123(); + snd_playSoundEffect(0x20); + + uint8 numFrames, midpoint; + if (_flags.isTalkie) { + numFrames = 18; + midpoint = 136; + } else { + numFrames = 35; + midpoint = 147; + } + setupShapes123(_winterScroll1Table, numFrames, 0); + for (int i = 123; i < midpoint; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + + if (_currentCharacter->sceneId == 41 && !queryGameFlag(0xA2)) { + snd_playSoundEffect(0x20); + _sprites->_anims[0].play = false; + _animator->sprites()[0].active = 0; + _sprites->_anims[1].play = true; + _animator->sprites()[1].active = 1; + setGameFlag(0xA2); + } + + for (int i = midpoint; i < 123 + numFrames; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + + if (_currentCharacter->sceneId == 117 && !queryGameFlag(0xB3)) { + for (int i = 0; i <= 7; ++i) { + _sprites->_anims[i].play = false; + _animator->sprites()[i].active = 0; + } + uint8 tmpPal[768]; + memcpy(tmpPal, _screen->_currentPalette, 768); + memcpy(&tmpPal[684], palTable2()[0], 60); + _screen->fadePalette(tmpPal, 72); + memcpy(&_screen->_currentPalette[684], palTable2()[0], 60); + _screen->setScreenPalette(_screen->_currentPalette); + setGameFlag(0xB3); + } else { + delayWithTicks(120); + } + + freeShapes123(); + setupShapes123(_winterScroll2Table, 4, 0); + + for (int i = 123; i <= 126; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + + _animator->resetBrandonAnimSeqSize(); + _currentCharacter->currentAnimFrame = 7; + _animator->animRefreshNPC(0); + freeShapes123(); + _screen->showMouse(); +} + +void KyraEngine_LoK::seq_winterScroll2() { + debugC(9, kDebugLevelMain, "seq_winterScroll2()"); + _screen->hideMouse(); + checkAmuletAnimFlags(); + assert(_winterScrollTable); + setupShapes123(_winterScrollTable, 7, 0); + _animator->setBrandonAnimSeqSize(5, 66); + + for (int i = 123; i <= 128; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + + delayWithTicks(120); + + for (int i = 127; i >= 123; --i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + + _animator->resetBrandonAnimSeqSize(); + _currentCharacter->currentAnimFrame = 7; + _animator->animRefreshNPC(0); + freeShapes123(); + _screen->showMouse(); +} + +void KyraEngine_LoK::seq_makeBrandonInv() { + debugC(9, kDebugLevelMain, "seq_makeBrandonInv()"); + if (_deathHandler == 8) + return; + + if (_currentCharacter->sceneId == 210) { + if (_beadStateVar == 4 || _beadStateVar == 6) + return; + } + + _screen->hideMouse(); + checkAmuletAnimFlags(); + _brandonStatusBit |= 0x20; + _timer->setCountdown(18, 2700); + _brandonStatusBit |= 0x40; + snd_playSoundEffect(0x77); + _brandonInvFlag = 0; + while (_brandonInvFlag <= 0x100) { + _animator->animRefreshNPC(0); + delayWithTicks(10); + _brandonInvFlag += 0x10; + } + _brandonStatusBit &= 0xFFBF; + _screen->showMouse(); +} + +void KyraEngine_LoK::seq_makeBrandonNormal() { + debugC(9, kDebugLevelMain, "seq_makeBrandonNormal()"); + _screen->hideMouse(); + _brandonStatusBit |= 0x40; + snd_playSoundEffect(0x77); + _brandonInvFlag = 0x100; + while (_brandonInvFlag >= 0) { + _animator->animRefreshNPC(0); + delayWithTicks(10); + _brandonInvFlag -= 0x10; + } + _brandonInvFlag = 0; + _brandonStatusBit &= 0xFF9F; + _screen->showMouse(); +} + +void KyraEngine_LoK::seq_makeBrandonNormal2() { + debugC(9, kDebugLevelMain, "seq_makeBrandonNormal2()"); + _screen->hideMouse(); + assert(_brandonToWispTable); + setupShapes123(_brandonToWispTable, 26, 0); + _animator->setBrandonAnimSeqSize(5, 48); + _brandonStatusBit &= 0xFFFD; + snd_playSoundEffect(0x6C); + for (int i = 138; i >= 123; --i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + _animator->setBrandonAnimSeqSize(4, 48); + _currentCharacter->currentAnimFrame = 7; + _animator->animRefreshNPC(0); + + if (_currentCharacter->sceneId >= 229 && _currentCharacter->sceneId <= 245) + _screen->fadeSpecialPalette(31, 234, 13, 4); + else if (_currentCharacter->sceneId >= 118 && _currentCharacter->sceneId <= 186) + _screen->fadeSpecialPalette(14, 228, 15, 4); + + freeShapes123(); + _screen->showMouse(); +} + +void KyraEngine_LoK::seq_makeBrandonWisp() { + debugC(9, kDebugLevelMain, "seq_makeBrandonWisp()"); + if (_deathHandler == 8) + return; + + if (_currentCharacter->sceneId == 210) { + if (_beadStateVar == 4 || _beadStateVar == 6) + return; + } + _screen->hideMouse(); + checkAmuletAnimFlags(); + assert(_brandonToWispTable); + setupShapes123(_brandonToWispTable, 26, 0); + _animator->setBrandonAnimSeqSize(5, 48); + snd_playSoundEffect(0x6C); + for (int i = 123; i <= 138; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + _brandonStatusBit |= 2; + + if (_currentCharacter->sceneId >= 109 && _currentCharacter->sceneId <= 198) + _timer->setCountdown(14, 18000); + else + _timer->setCountdown(14, 7200); + + _animator->_brandonDrawFrame = 113; + _brandonStatusBit0x02Flag = 1; + _currentCharacter->currentAnimFrame = 113; + _animator->animRefreshNPC(0); + _animator->updateAllObjectShapes(); + + if (_currentCharacter->sceneId >= 229 && _currentCharacter->sceneId <= 245) + _screen->fadeSpecialPalette(30, 234, 13, 4); + else if (_currentCharacter->sceneId >= 118 && _currentCharacter->sceneId <= 186) + _screen->fadeSpecialPalette(14, 228, 15, 4); + + freeShapes123(); + _screen->showMouse(); +} + +void KyraEngine_LoK::seq_dispelMagicAnimation() { + debugC(9, kDebugLevelMain, "seq_dispelMagicAnimation()"); + if (_deathHandler == 8) + return; + if (_currentCharacter->sceneId == 210) { + if (_beadStateVar == 4 || _beadStateVar == 6) + return; + } + _screen->hideMouse(); + if (_currentCharacter->sceneId == 210 && _currentCharacter->sceneId < 160) + _currentCharacter->facing = 3; + if (_malcolmFlag == 7 && _beadStateVar == 3) { + _beadStateVar = 6; + _unkEndSeqVar5 = 2; + _malcolmFlag = 10; + } + checkAmuletAnimFlags(); + setGameFlag(0xEE); + assert(_magicAnimationTable); + setupShapes123(_magicAnimationTable, 5, 0); + _animator->setBrandonAnimSeqSize(8, 49); + snd_playSoundEffect(0x15); + for (int i = 123; i <= 127; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + + delayWithTicks(120); + + for (int i = 127; i >= 123; --i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(10); + } + _animator->resetBrandonAnimSeqSize(); + _currentCharacter->currentAnimFrame = 7; + _animator->animRefreshNPC(0); + freeShapes123(); + _screen->showMouse(); +} + +void KyraEngine_LoK::seq_fillFlaskWithWater(int item, int type) { + debugC(9, kDebugLevelMain, "seq_fillFlaskWithWater(%d, %d)", item, type); + int newItem = -1; + static const uint8 flaskTable1[] = { 0x46, 0x48, 0x4A, 0x4C }; + static const uint8 flaskTable2[] = { 0x47, 0x49, 0x4B, 0x4D }; + + if (item >= 60 && item <= 77) { + assert(_flaskFull); + characterSays(8006, _flaskFull[0], 0, -2); + } else if (item == 78) { + assert(type >= 0 && type < ARRAYSIZE(flaskTable1)); + newItem = flaskTable1[type]; + } else if (item == 79) { + assert(type >= 0 && type < ARRAYSIZE(flaskTable2)); + newItem = flaskTable2[type]; + } + + if (newItem == -1) + return; + + _screen->hideMouse(); + setMouseItem(newItem); + _screen->showMouse(); + _itemInHand = newItem; + assert(_fullFlask); + assert(type < _fullFlask_Size && type >= 0); + static const uint16 voiceEntries[] = { + 0x1F40, 0x1F41, 0x1F42, 0x1F45 + }; + assert(type < ARRAYSIZE(voiceEntries)); + characterSays(voiceEntries[type], _fullFlask[type], 0, -2); +} + +void KyraEngine_LoK::seq_playDrinkPotionAnim(int item, int unk2, int flags) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_playDrinkPotionAnim(%d, %d, %d)", item, unk2, flags); + uint8 red, green, blue; + + switch (item) { + case 60: + case 61: + red = 63; + green = blue = 6; + break; + case 62: + case 63: + red = green = 0; + blue = 67; + break; + case 64: + case 65: + red = 84; + green = 78; + blue = 14; + break; + case 66: + red = blue = 0; + green = 48; + break; + case 67: + red = 100; + green = 48; + blue = 23; + break; + case 68: + red = 73; + green = 0; + blue = 89; + break; + case 69: + red = green = 73; + blue = 86; + break; + default: + red = 33; + green = 66; + blue = 100; + break; + } + red = (uint8)((double)red * 0.63); + green = (uint8)((double)green * 0.63); + blue = (uint8)((double)blue * 0.63); + + _screen->setPaletteIndex(0xFE, red, green, blue); + + _screen->hideMouse(); + checkAmuletAnimFlags(); + _currentCharacter->facing = 5; + _animator->animRefreshNPC(0); + assert(_drinkAnimationTable); + setupShapes123(_drinkAnimationTable, 9, flags); + _animator->setBrandonAnimSeqSize(5, 54); + + for (int i = 123; i <= 131; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(5); + } + snd_playSoundEffect(0x34); + for (int i = 0; i < 2; ++i) { + _currentCharacter->currentAnimFrame = 130; + _animator->animRefreshNPC(0); + delayWithTicks(7); + _currentCharacter->currentAnimFrame = 131; + _animator->animRefreshNPC(0); + delayWithTicks(7); + } + + if (unk2) { + // XXX + } + + for (int i = 131; i >= 123; --i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(5); + } + + _animator->resetBrandonAnimSeqSize(); + _currentCharacter->currentAnimFrame = 7; + _animator->animRefreshNPC(0); + freeShapes123(); + _screen->setPaletteIndex(0xFE, 30, 30, 30); + _screen->showMouse(); +} + +int KyraEngine_LoK::seq_playEnd() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_playEnd()"); + if (_endSequenceSkipFlag) + return 0; + + if (_deathHandler == 8) + return 0; + + _screen->_curPage = 2; + if (_endSequenceNeedLoading) { + snd_playWanderScoreViaMap(50, 1); + setupPanPages(); + _finalA = new WSAMovie_v1(this); + assert(_finalA); + _finalA->open("finala.wsa", 1, 0); + _finalB = new WSAMovie_v1(this); + assert(_finalB); + _finalB->open("finalb.wsa", 1, 0); + _finalC = new WSAMovie_v1(this); + assert(_finalC); + _endSequenceNeedLoading = 0; + _finalC->open("finalc.wsa", 1, 0); + _screen->_curPage = 0; + _beadStateVar = 0; + _malcolmFlag = 0; + _unkEndSeqVar2 = _system->getMillis() + 600 * _tickLength; + _screen->copyRegion(312, 0, 312, 0, 8, 136, 0, 2); + } + + // TODO: better handling. This timer shouldn't count when the menu is open or something. + if (_unkEndSeqVar2 != -1) { + if (_system->getMillis() > (uint32)_unkEndSeqVar2) { + _unkEndSeqVar2 = -1; + if (!_malcolmFlag) + _malcolmFlag = 1; + } + } + + if (handleMalcolmFlag()) { + _beadStateVar = 0; + _malcolmFlag = 12; + handleMalcolmFlag(); + handleBeadState(); + closeFinalWsa(); + if (_deathHandler == 8) { + _screen->_curPage = 0; + checkAmuletAnimFlags(); + seq_brandonToStone(); + delay(60 * _tickLength); + return 1; + } else { + _endSequenceSkipFlag = 1; + if (_text->printed()) + _text->restoreTalkTextMessageBkgd(2, 0); + _screen->_curPage = 0; + _screen->hideMouse(); + _screen->fadeSpecialPalette(32, 228, 20, 60); + delay(60 * _tickLength); + _screen->loadBitmap("GEMHEAL.CPS", 3, 3, _screen->_currentPalette); + _screen->setScreenPalette(_screen->_currentPalette); + _screen->shuffleScreen(8, 8, 304, 128, 2, 0, 1, 0); + uint32 nextTime = _system->getMillis() + 120 * _tickLength; + _finalA = new WSAMovie_v1(this); + assert(_finalA); + _finalA->open("finald.wsa", 1, 0); + _finalA->setX(8); _finalA->setY(8); + _finalA->setDrawPage(0); + delayUntil(nextTime); + snd_playSoundEffect(0x40); + for (int i = 0; i < 22; ++i) { + delayUntil(nextTime); + if (i == 4) + snd_playSoundEffect(0x3E); + else if (i == 20) + snd_playSoundEffect(0x0E); + nextTime = _system->getMillis() + 8 * _tickLength; + _finalA->displayFrame(i); + _screen->updateScreen(); + } + delete _finalA; + _finalA = 0; + seq_playEnding(); + return 1; + } + } else { + handleBeadState(); + _screen->bitBlitRects(); + _screen->updateScreen(); + _screen->_curPage = 0; + } + return 0; +} + +void KyraEngine_LoK::seq_brandonToStone() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_brandonToStone()"); + _screen->hideMouse(); + assert(_brandonStoneTable); + setupShapes123(_brandonStoneTable, 14, 0); + _animator->setBrandonAnimSeqSize(5, 51); + for (int i = 123; i <= 136; ++i) { + _currentCharacter->currentAnimFrame = i; + _animator->animRefreshNPC(0); + delayWithTicks(8); + } + _animator->resetBrandonAnimSeqSize(); + freeShapes123(); + _screen->showMouse(); +} + +void KyraEngine_LoK::seq_playEnding() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_playEnding()"); + if (_quitFlag) + return; + _screen->hideMouse(); + _screen->_curPage = 0; + _screen->fadeToBlack(); + _screen->loadBitmap("REUNION.CPS", 3, 3, _screen->_currentPalette); + _screen->copyRegion(8, 8, 8, 8, 304, 128, 2, 0); + _screen->_curPage = 0; + // XXX + assert(_homeString); + drawSentenceCommand(_homeString[0], 179); + + memset(_screen->getPalette(2), 0, sizeof(uint8)*768); + _screen->setScreenPalette(_screen->getPalette(2)); + + _seq->playSequence(_seq_Reunion, false); + _screen->fadeToBlack(); + + _screen->showMouse(); + seq_playCredits(); +} + +void KyraEngine_LoK::seq_playCredits() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_playCredits()"); + static const uint8 colorMap[] = { 0, 0, 0xC, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + static const char stringTerms[] = { 0x5, 0xd, 0x0}; + static const int numStrings = 250; + + struct { + int16 x, y; + uint8 code; + uint8 unk1; + Screen::FontId font; + uint8 *str; + } strings[numStrings]; + + memset(strings, 0, sizeof(strings)); + + _screen->hideMouse(); + if (!_flags.isTalkie) { + _screen->loadFont(Screen::FID_CRED6_FNT, "CREDIT6.FNT"); + _screen->loadFont(Screen::FID_CRED8_FNT, "CREDIT8.FNT"); + } else + _screen->setFont(Screen::FID_8_FNT); + + _screen->loadBitmap("CHALET.CPS", 4, 4, _screen->_currentPalette); + + _screen->setCurPage(0); + _screen->clearCurPage(); + _screen->setTextColorMap(colorMap); + _screen->_charWidth = -1; + + // we only need this for the fm-towns version + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) + snd_playWanderScoreViaMap(53, 1); + + uint8 *buffer = 0; + uint32 size = 0; + + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { + int sizeTmp = 0; + const uint8 *bufferTmp = _staticres->loadRawData(kCreditsStrings, sizeTmp); + buffer = new uint8[sizeTmp]; + assert(buffer); + memcpy(buffer, bufferTmp, sizeTmp); + size = sizeTmp; + _staticres->unloadId(kCreditsStrings); + } else { + buffer = _res->fileData("CREDITS.TXT", &size); + assert(buffer); + } + + uint8 *nextString = buffer; + uint8 *currentString = buffer; + int currentY = 200; + + for (int i = 0; i < numStrings; i++) { + if (*nextString == 0) + break; + + currentString = nextString; + nextString = (uint8 *)strpbrk((const char *)currentString, stringTerms); + if (!nextString) + nextString = (uint8 *)strchr((const char *)currentString, 0); + + strings[i].code = nextString[0]; + *nextString = 0; + if (strings[i].code != 0) + nextString++; + + if (*currentString == 3 || *currentString == 4) { + strings[i].unk1 = *currentString; + currentString++; + } + + if (*currentString == 1) { + currentString++; + if (!_flags.isTalkie) + _screen->setFont(Screen::FID_CRED6_FNT); + } else { + if (*currentString == 2) + currentString++; + if (!_flags.isTalkie) + _screen->setFont(Screen::FID_CRED8_FNT); + } + strings[i].font = _screen->_currentFont; + + if (strings[i].unk1 == 3) + strings[i].x = 157 - _screen->getTextWidth((const char *)currentString); + else if (strings[i].unk1 == 4) + strings[i].x = 161; + else + strings[i].x = (320 - _screen->getTextWidth((const char *)currentString)) / 2 + 1; + + strings[i].y = currentY; + if (strings[i].code != 5) + currentY += 10; + + strings[i].str = currentString; + } + + _screen->setCurPage(2); + + memset(_screen->getPalette(2), 0, sizeof(uint8)*768); + _screen->setScreenPalette(_screen->getPalette(2)); + _screen->copyRegion(8, 32, 8, 32, 312, 128, 4, 0, Screen::CR_NO_P_CHECK); + _screen->fadePalette(_screen->_currentPalette, 0x5A); + + Common::Event event; + bool finished = false; + int bottom = 201; + while (!finished) { + uint32 startLoop = _system->getMillis(); + if (bottom > 175) { + _screen->copyRegion(8, 32, 8, 32, 312, 128, 4, 2, Screen::CR_NO_P_CHECK); + bottom = 0; + + for (int i = 0; i < numStrings; i++) { + if (strings[i].y < 200 && strings[i].y > 0) { + if (strings[i].font != _screen->_currentFont) + _screen->setFont(strings[i].font); + _screen->printText((const char *)strings[i].str, strings[i].x, strings[i].y, 15, 0); + } + strings[i].y--; + if (strings[i].y > bottom) + bottom = strings[i].y; + } + _screen->copyRegion(8, 32, 8, 32, 312, 128, 2, 0, Screen::CR_NO_P_CHECK); + _screen->updateScreen(); + } + + while (_eventMan->pollEvent(event)) { + switch (event.type) { + case Common::EVENT_KEYDOWN: + finished = true; + break; + case Common::EVENT_QUIT: + quitGame(); + finished = true; + break; + default: + break; + } + } + + uint32 now = _system->getMillis(); + uint32 nextLoop = startLoop + _tickLength * 5; + + if (nextLoop > now) + _system->delayMillis(nextLoop - now); + } + + delete[] buffer; + + _screen->fadeToBlack(); + _screen->clearCurPage(); + _screen->showMouse(); +} + +bool KyraEngine_LoK::seq_skipSequence() const { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::seq_skipSequence()"); + return _quitFlag || _abortIntroFlag; +} + +int KyraEngine_LoK::handleMalcolmFlag() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::handleMalcolmFlag()"); + static uint16 frame = 0; + static uint32 timer1 = 0; + static uint32 timer2 = 0; + + switch (_malcolmFlag) { + case 1: + frame = 0; + _malcolmFlag = 2; + timer2 = 0; + + // Fall through to the next case + + case 2: + if (_system->getMillis() >= timer2) { + _finalA->setX(8); + _finalA->setY(46); + _finalA->setDrawPage(0); + _finalA->displayFrame(frame); + _screen->updateScreen(); + timer2 = _system->getMillis() + 8 * _tickLength; + ++frame; + if (frame > 13) { + _malcolmFlag = 3; + timer1 = _system->getMillis() + 180 * _tickLength; + } + } + break; + + case 3: + if (_system->getMillis() < timer1) { + if (_system->getMillis() >= timer2) { + frame = _rnd.getRandomNumberRng(14, 17); + _finalA->setX(8); + _finalA->setY(46); + _finalA->setDrawPage(0); + _finalA->displayFrame(frame); + _screen->updateScreen(); + timer2 = _system->getMillis() + 8 * _tickLength; + } + } else { + _malcolmFlag = 4; + frame = 18; + } + break; + + case 4: + if (_system->getMillis() >= timer2) { + _finalA->setX(8); + _finalA->setY(46); + _finalA->setDrawPage(0); + _finalA->displayFrame(frame); + _screen->updateScreen(); + timer2 = _system->getMillis() + 8 * _tickLength; + ++frame; + if (frame > 25) { + frame = 26; + _malcolmFlag = 5; + _beadStateVar = 1; + } + } + break; + + case 5: + if (_system->getMillis() >= timer2) { + _finalA->setX(8); + _finalA->setY(46); + _finalA->setDrawPage(0); + _finalA->displayFrame(frame); + _screen->updateScreen(); + timer2 = _system->getMillis() + 8 * _tickLength; + ++frame; + if (frame > 31) { + frame = 32; + _malcolmFlag = 6; + } + } + break; + + case 6: + if (_unkEndSeqVar4) { + if (frame <= 33 && _system->getMillis() >= timer2) { + _finalA->setX(8); + _finalA->setY(46); + _finalA->setDrawPage(0); + _finalA->displayFrame(frame); + _screen->updateScreen(); + timer2 = _system->getMillis() + 8 * _tickLength; + ++frame; + if (frame > 33) { + _malcolmFlag = 7; + frame = 32; + _unkEndSeqVar5 = 0; + } + } + } + break; + + case 7: + if (_unkEndSeqVar5 == 1) { + _malcolmFlag = 8; + frame = 34; + } else if (_unkEndSeqVar5 == 2) { + _malcolmFlag = 3; + timer1 = _system->getMillis() + 180 * _tickLength; + } + break; + + case 8: + if (_system->getMillis() >= timer2) { + _finalA->setX(8); + _finalA->setY(46); + _finalA->setDrawPage(0); + _finalA->displayFrame(frame); + _screen->updateScreen(); + timer2 = _system->getMillis() + 8 * _tickLength; + ++frame; + if (frame > 37) { + _malcolmFlag = 0; + _deathHandler = 8; + return 1; + } + } + break; + + case 9: + snd_playSoundEffect(12); + snd_playSoundEffect(12); + _finalC->setX(16); + _finalC->setY(50); + _finalC->setDrawPage(0); + for (int i = 0; i < 18; ++i) { + timer2 = _system->getMillis() + 4 * _tickLength; + _finalC->displayFrame(i); + _screen->updateScreen(); + delayUntil(timer2); + } + snd_playWanderScoreViaMap(51, 1); + delay(60 * _tickLength); + _malcolmFlag = 0; + return 1; + + case 10: + if (!_beadStateVar) { + handleBeadState(); + _screen->bitBlitRects(); + assert(_veryClever); + _text->printTalkTextMessage(_veryClever[0], 60, 31, 5, 0, 2); + timer2 = _system->getMillis() + 180 * _tickLength; + _malcolmFlag = 11; + } + break; + + case 11: + if (_system->getMillis() >= timer2) { + _text->restoreTalkTextMessageBkgd(2, 0); + _malcolmFlag = 3; + timer1 = _system->getMillis() + 180 * _tickLength; + } + break; + + default: + break; + } + + return 0; +} + +int KyraEngine_LoK::handleBeadState() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::handleBeadState()"); + static uint32 timer1 = 0; + static uint32 timer2 = 0; + static BeadState beadState1 = { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + static BeadState beadState2 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; + + static const int table1[] = { + -1, -2, -4, -5, -6, -7, -6, -5, + -4, -2, -1, 0, 1, 2, 4, 5, + 6, 7, 6, 5, 4, 2, 1, 0, 0 + }; + static const int table2[] = { + 0, 0, 1, 1, 2, 2, 3, 3, + 4, 4, 5, 5, 5, 5, 4, 4, + 3, 3, 2, 2, 1, 1, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0 + }; + + switch (_beadStateVar) { + case 0: + if (beadState1.x != -1 && _endSequenceBackUpRect) { + _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); + _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); + } + + beadState1.x = -1; + beadState1.tableIndex = 0; + timer1 = 0; + timer2 = 0; + _lastDisplayedPanPage = 0; + return 1; + + case 1: + if (beadState1.x != -1) { + if (_endSequenceBackUpRect) { + _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); + _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); + } + beadState1.x = -1; + beadState1.tableIndex = 0; + } + _beadStateVar = 2; + break; + + case 2: + if (_system->getMillis() >= timer1) { + int x = 0, y = 0; + timer1 = _system->getMillis() + 4 * _tickLength; + if (beadState1.x == -1) { + assert(_panPagesTable); + beadState1.width2 = _animator->fetchAnimWidth(_panPagesTable[19], 256); + beadState1.width = ((beadState1.width2 + 7) >> 3) + 1; + beadState1.height = _animator->fetchAnimHeight(_panPagesTable[19], 256); + if (!_endSequenceBackUpRect) { + _endSequenceBackUpRect = new uint8[(beadState1.width * beadState1.height) << 3]; + assert(_endSequenceBackUpRect); + memset(_endSequenceBackUpRect, 0, ((beadState1.width * beadState1.height) << 3) * sizeof(uint8)); + } + x = beadState1.x = 60; + y = beadState1.y = 40; + initBeadState(x, y, x, 25, 8, &beadState2); + } else { + if (processBead(beadState1.x, beadState1.y, x, y, &beadState2)) { + _beadStateVar = 3; + timer2 = _system->getMillis() + 240 * _tickLength; + _unkEndSeqVar4 = 0; + beadState1.dstX = beadState1.x; + beadState1.dstY = beadState1.y; + return 0; + } else { + _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); + _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); + beadState1.x = x; + beadState1.y = y; + } + } + + _screen->copyCurPageBlock(x >> 3, y, beadState1.width, beadState1.height, _endSequenceBackUpRect); + _screen->drawShape(2, _panPagesTable[_lastDisplayedPanPage++], x, y, 0, 0); + + if (_lastDisplayedPanPage > 17) + _lastDisplayedPanPage = 0; + + _screen->addBitBlitRect(x, y, beadState1.width2, beadState1.height); + } + break; + + case 3: + if (_system->getMillis() >= timer1) { + timer1 = _system->getMillis() + 4 * _tickLength; + _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); + _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); + + beadState1.x = beadState1.dstX + table1[beadState1.tableIndex]; + beadState1.y = beadState1.dstY + table2[beadState1.tableIndex]; + _screen->copyCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); + + _screen->drawShape(2, _panPagesTable[_lastDisplayedPanPage++], beadState1.x, beadState1.y, 0, 0); + if (_lastDisplayedPanPage >= 17) + _lastDisplayedPanPage = 0; + + _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); + + ++beadState1.tableIndex; + if (beadState1.tableIndex > 24) + beadState1.tableIndex = 0; + _unkEndSeqVar4 = 1; + if (_system->getMillis() > timer2 && _malcolmFlag == 7 && !_unkAmuletVar && !_text->printed()) { + snd_playSoundEffect(0x0B); + if (_currentCharacter->x1 > 233 && _currentCharacter->x1 < 305 && _currentCharacter->y1 > 85 && _currentCharacter->y1 < 105 && + (_brandonStatusBit & 0x20)) { + beadState1.unk8 = 290; + beadState1.unk9 = 40; + _beadStateVar = 5; + } else { + _beadStateVar = 4; + beadState1.unk8 = _currentCharacter->x1 - 4; + beadState1.unk9 = _currentCharacter->y1 - 30; + } + + if (_text->printed()) + _text->restoreTalkTextMessageBkgd(2, 0); + + initBeadState(beadState1.x, beadState1.y, beadState1.unk8, beadState1.unk9, 12, &beadState2); + _lastDisplayedPanPage = 18; + } + } + break; + + case 4: + if (_system->getMillis() >= timer1) { + int x = 0, y = 0; + timer1 = _system->getMillis() + _tickLength; + if (processBead(beadState1.x, beadState1.y, x, y, &beadState2)) { + if (_brandonStatusBit & 20) { + _unkEndSeqVar5 = 2; + _beadStateVar = 6; + } else { + snd_playWanderScoreViaMap(52, 1); + snd_playSoundEffect(0x0C); + _unkEndSeqVar5 = 1; + _beadStateVar = 0; + } + } else { + _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); + _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); + beadState1.x = x; + beadState1.y = y; + _screen->copyCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); + _screen->drawShape(2, _panPagesTable[_lastDisplayedPanPage++], x, y, 0, 0); + if (_lastDisplayedPanPage > 17) { + _lastDisplayedPanPage = 0; + } + _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); + } + } + break; + + case 5: + if (_system->getMillis() >= timer1) { + timer1 = _system->getMillis() + _tickLength; + int x = 0, y = 0; + if (processBead(beadState1.x, beadState1.y, x, y, &beadState2)) { + if (beadState2.dstX == 290) { + _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); + uint32 nextRun = 0; + _finalB->setX(224); + _finalB->setY(8); + _finalB->setDrawPage(0); + for (int i = 0; i < 8; ++i) { + nextRun = _system->getMillis() + _tickLength; + _finalB->displayFrame(i); + _screen->updateScreen(); + delayUntil(nextRun); + } + snd_playSoundEffect(0x0D); + for (int i = 7; i >= 0; --i) { + nextRun = _system->getMillis() + _tickLength; + _finalB->displayFrame(i); + _screen->updateScreen(); + delayUntil(nextRun); + } + initBeadState(beadState1.x, beadState1.y, 63, 60, 12, &beadState2); + } else { + _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); + _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); + beadState1.x = -1; + beadState1.tableIndex = 0; + _beadStateVar = 0; + _malcolmFlag = 9; + } + } else { + _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); + _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); + beadState1.x = x; + beadState1.y = y; + _screen->copyCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); + _screen->drawShape(2, _panPagesTable[_lastDisplayedPanPage++], x, y, 0, 0); + if (_lastDisplayedPanPage > 17) + _lastDisplayedPanPage = 0; + _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); + } + } + break; + + case 6: + _screen->drawShape(2, _panPagesTable[19], beadState1.x, beadState1.y, 0, 0); + _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); + _beadStateVar = 0; + break; + + default: + break; + } + return 0; +} + +void KyraEngine_LoK::initBeadState(int x, int y, int x2, int y2, int unk, BeadState *ptr) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::initBeadState(%d, %d, %d, %d, %d, %p)", x, y, x2, y2, unk, (const void *)ptr); + ptr->unk9 = unk; + int xDiff = x2 - x; + int yDiff = y2 - y; + int unk1 = 0, unk2 = 0; + if (xDiff > 0) + unk1 = 1; + else if (xDiff == 0) + unk1 = 0; + else + unk1 = -1; + + + if (yDiff > 0) + unk2 = 1; + else if (yDiff == 0) + unk2 = 0; + else + unk2 = -1; + + xDiff = ABS(xDiff); + yDiff = ABS(yDiff); + + ptr->y = 0; + ptr->x = 0; + ptr->width = xDiff; + ptr->height = yDiff; + ptr->dstX = x2; + ptr->dstY = y2; + ptr->width2 = unk1; + ptr->unk8 = unk2; +} + +int KyraEngine_LoK::processBead(int x, int y, int &x2, int &y2, BeadState *ptr) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::processBead(%d, %d, %p, %p, %p)", x, y, (const void *)&x2, (const void *)&y2, (const void *)ptr); + if (x == ptr->dstX && y == ptr->dstY) + return 1; + + int xPos = x, yPos = y; + if (ptr->width >= ptr->height) { + for (int i = 0; i < ptr->unk9; ++i) { + ptr->y += ptr->height; + if (ptr->y >= ptr->width) { + ptr->y -= ptr->width; + yPos += ptr->unk8; + } + xPos += ptr->width2; + } + } else { + for (int i = 0; i < ptr->unk9; ++i) { + ptr->x += ptr->width; + if (ptr->x >= ptr->height) { + ptr->x -= ptr->height; + xPos += ptr->width2; + } + yPos += ptr->unk8; + } + } + + int temp = ABS(x - ptr->dstX); + if (ptr->unk9 > temp) + xPos = ptr->dstX; + temp = ABS(y - ptr->dstY); + if (ptr->unk9 > temp) + yPos = ptr->dstY; + x2 = xPos; + y2 = yPos; + return 0; +} + +void KyraEngine_LoK::setupPanPages() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setupPanPages()"); + _screen->savePageToDisk("BKGD.PG", 2); + _screen->loadBitmap("BEAD.CPS", 3, 3, 0); + if (_flags.platform == Common::kPlatformMacintosh || _flags.platform == Common::kPlatformAmiga) { + int pageBackUp = _screen->_curPage; + _screen->_curPage = 2; + + delete[] _panPagesTable[19]; + _panPagesTable[19] = _screen->encodeShape(0, 0, 16, 9, 0); + assert(_panPagesTable[19]); + + int curX = 16; + for (int i = 0; i < 19; ++i) { + delete[] _panPagesTable[i]; + _panPagesTable[i] = _screen->encodeShape(curX, 0, 8, 5, 0); + assert(_panPagesTable[i]); + curX += 8; + } + + _screen->_curPage = pageBackUp; + } else { + for (int i = 0; i <= 19; ++i) { + delete[] _panPagesTable[i]; + _panPagesTable[i] = _seq->setPanPages(3, i); + assert(_panPagesTable[i]); + } + } + _screen->loadPageFromDisk("BKGD.PG", 2); +} + +void KyraEngine_LoK::freePanPages() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::freePanPages()"); + delete _endSequenceBackUpRect; + _endSequenceBackUpRect = 0; + for (int i = 0; i <= 19; ++i) { + delete[] _panPagesTable[i]; + _panPagesTable[i] = 0; + } +} + +void KyraEngine_LoK::closeFinalWsa() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::closeFinalWsa()"); + delete _finalA; + _finalA = 0; + delete _finalB; + _finalB = 0; + delete _finalC; + _finalC = 0; + freePanPages(); + _endSequenceNeedLoading = 1; +} + +void KyraEngine_LoK::updateKyragemFading() { + static const uint8 kyraGemPalette[0x28] = { + 0x3F, 0x3B, 0x38, 0x34, 0x32, 0x2F, 0x2C, 0x29, 0x25, 0x22, + 0x1F, 0x1C, 0x19, 0x16, 0x12, 0x0F, 0x0C, 0x0A, 0x06, 0x03, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }; + + if (_system->getMillis() < _kyragemFadingState.timerCount) + return; + + _kyragemFadingState.timerCount = _system->getMillis() + 4 * _tickLength; + int palPos = 684; + for (int i = 0; i < 20; ++i) { + _screen->_currentPalette[palPos++] = kyraGemPalette[i + _kyragemFadingState.rOffset]; + _screen->_currentPalette[palPos++] = kyraGemPalette[i + _kyragemFadingState.gOffset]; + _screen->_currentPalette[palPos++] = kyraGemPalette[i + _kyragemFadingState.bOffset]; + } + _screen->setScreenPalette(_screen->_currentPalette); + _animator->_updateScreen = true; + switch (_kyragemFadingState.nextOperation) { + case 0: + --_kyragemFadingState.bOffset; + if (_kyragemFadingState.bOffset >= 1) + return; + _kyragemFadingState.nextOperation = 1; + break; + + case 1: + ++_kyragemFadingState.rOffset; + if (_kyragemFadingState.rOffset < 19) + return; + _kyragemFadingState.nextOperation = 2; + break; + + case 2: + --_kyragemFadingState.gOffset; + if (_kyragemFadingState.gOffset >= 1) + return; + _kyragemFadingState.nextOperation = 3; + break; + + case 3: + ++_kyragemFadingState.bOffset; + if (_kyragemFadingState.bOffset < 19) + return; + _kyragemFadingState.nextOperation = 4; + break; + + case 4: + --_kyragemFadingState.rOffset; + if (_kyragemFadingState.rOffset >= 1) + return; + _kyragemFadingState.nextOperation = 5; + break; + + case 5: + ++_kyragemFadingState.gOffset; + if (_kyragemFadingState.gOffset < 19) + return; + _kyragemFadingState.nextOperation = 0; + break; + + default: + break; + } + + _kyragemFadingState.timerCount = _system->getMillis() + 120 * _tickLength; +} + +void KyraEngine_LoK::drawJewelPress(int jewel, int drawSpecial) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::drawJewelPress(%d, %d)", jewel, drawSpecial); + _screen->hideMouse(); + int shape = 0; + + if (drawSpecial) + shape = 0x14E; + else + shape = jewel + 0x149; + + snd_playSoundEffect(0x45); + _screen->drawShape(0, _shapes[shape], _amuletX2[jewel], _amuletY2[jewel], 0, 0); + _screen->updateScreen(); + delayWithTicks(2); + + if (drawSpecial) + shape = 0x148; + else + shape = jewel + 0x143; + + _screen->drawShape(0, _shapes[shape], _amuletX2[jewel], _amuletY2[jewel], 0, 0); + _screen->updateScreen(); + _screen->showMouse(); +} + +void KyraEngine_LoK::drawJewelsFadeOutStart() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::drawJewelsFadeOutStart()"); + static const uint16 jewelTable1[] = { 0x164, 0x15F, 0x15A, 0x155, 0x150, 0xFFFF }; + static const uint16 jewelTable2[] = { 0x163, 0x15E, 0x159, 0x154, 0x14F, 0xFFFF }; + static const uint16 jewelTable3[] = { 0x166, 0x160, 0x15C, 0x157, 0x152, 0xFFFF }; + static const uint16 jewelTable4[] = { 0x165, 0x161, 0x15B, 0x156, 0x151, 0xFFFF }; + for (int i = 0; jewelTable1[i] != 0xFFFF; ++i) { + if (queryGameFlag(0x57)) + _screen->drawShape(0, _shapes[jewelTable1[i]], _amuletX2[2], _amuletY2[2], 0, 0); + if (queryGameFlag(0x59)) + _screen->drawShape(0, _shapes[jewelTable3[i]], _amuletX2[4], _amuletY2[4], 0, 0); + if (queryGameFlag(0x56)) + _screen->drawShape(0, _shapes[jewelTable2[i]], _amuletX2[1], _amuletY2[1], 0, 0); + if (queryGameFlag(0x58)) + _screen->drawShape(0, _shapes[jewelTable4[i]], _amuletX2[3], _amuletY2[3], 0, 0); + _screen->updateScreen(); + delayWithTicks(3); + } +} + +void KyraEngine_LoK::drawJewelsFadeOutEnd(int jewel) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::drawJewelsFadeOutEnd(%d)", jewel); + static const uint16 jewelTable[] = { 0x153, 0x158, 0x15D, 0x162, 0x148, 0xFFFF }; + int newDelay = 0; + + switch (jewel - 1) { + case 2: + if (_currentCharacter->sceneId >= 109 && _currentCharacter->sceneId <= 198) + newDelay = 18900; + else + newDelay = 8100; + break; + + default: + newDelay = 3600; + break; + } + + setGameFlag(0xF1); + _timer->setCountdown(19, newDelay); + _screen->hideMouse(); + for (int i = 0; jewelTable[i] != 0xFFFF; ++i) { + uint16 shape = jewelTable[i]; + if (queryGameFlag(0x57)) + _screen->drawShape(0, _shapes[shape], _amuletX2[2], _amuletY2[2], 0, 0); + if (queryGameFlag(0x59)) + _screen->drawShape(0, _shapes[shape], _amuletX2[4], _amuletY2[4], 0, 0); + if (queryGameFlag(0x56)) + _screen->drawShape(0, _shapes[shape], _amuletX2[1], _amuletY2[1], 0, 0); + if (queryGameFlag(0x58)) + _screen->drawShape(0, _shapes[shape], _amuletX2[3], _amuletY2[3], 0, 0); + + _screen->updateScreen(); + delayWithTicks(3); + } + _screen->showMouse(); +} + +} // end of namespace Kyra + diff --git a/engines/kyra/sequences_v1.cpp b/engines/kyra/sequences_v1.cpp deleted file mode 100644 index 607def3583..0000000000 --- a/engines/kyra/sequences_v1.cpp +++ /dev/null @@ -1,1884 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "kyra/kyra.h" -#include "kyra/seqplayer.h" -#include "kyra/screen_v1.h" -#include "kyra/resource.h" -#include "kyra/sound.h" -#include "kyra/sprites.h" -#include "kyra/wsamovie.h" -#include "kyra/animator_v1.h" -#include "kyra/text.h" -#include "kyra/timer.h" - -#include "common/events.h" -#include "common/system.h" -#include "common/savefile.h" - -namespace Kyra { - -void KyraEngine_v1::seq_demo() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_demo()"); - - snd_playTheme(0, 2); - - _screen->loadBitmap("START.CPS", 7, 7, _screen->_currentPalette); - _screen->copyRegion(0, 0, 0, 0, 320, 200, 6, 0, Screen::CR_NO_P_CHECK); - _screen->updateScreen(); - _screen->fadeFromBlack(); - delay(60 * _tickLength); - _screen->fadeToBlack(); - - _screen->clearPage(0); - _screen->loadBitmap("TOP.CPS", 7, 7, NULL); - _screen->loadBitmap("BOTTOM.CPS", 5, 5, _screen->_currentPalette); - _screen->copyRegion(0, 91, 0, 8, 320, 103, 6, 0); - _screen->copyRegion(0, 0, 0, 111, 320, 64, 6, 0); - _screen->updateScreen(); - _screen->fadeFromBlack(); - - _seq->playSequence(_seq_WestwoodLogo, true); - delay(60 * _tickLength); - _seq->playSequence(_seq_KyrandiaLogo, true); - - _screen->fadeToBlack(); - _screen->clearPage(2); - _screen->clearPage(0); - - _seq->playSequence(_seq_Demo1, true); - - _screen->clearPage(0); - _seq->playSequence(_seq_Demo2, true); - - _screen->clearPage(0); - _seq->playSequence(_seq_Demo3, true); - - _screen->clearPage(0); - _seq->playSequence(_seq_Demo4, true); - - _screen->clearPage(0); - _screen->loadBitmap("FINAL.CPS", 7, 7, _screen->_currentPalette); - _screen->_curPage = 0; - _screen->copyRegion(0, 0, 0, 0, 320, 200, 6, 0); - _screen->updateScreen(); - _screen->fadeFromBlack(); - delay(60 * _tickLength); - _screen->fadeToBlack(); - _sound->haltTrack(); -} - -void KyraEngine_v1::seq_intro() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_intro()"); - - if (_flags.isTalkie) - _res->loadPakFile("INTRO.VRM"); - - static const IntroProc introProcTable[] = { - &KyraEngine_v1::seq_introLogos, - &KyraEngine_v1::seq_introStory, - &KyraEngine_v1::seq_introMalcolmTree, - &KyraEngine_v1::seq_introKallakWriting, - &KyraEngine_v1::seq_introKallakMalcolm - }; - - Common::InSaveFile *in; - if ((in = _saveFileMan->openForLoading(getSavegameFilename(0)))) { - delete in; - _skipIntroFlag = true; - } else - _skipIntroFlag = false; - - _seq->setCopyViewOffs(true); - _screen->setFont(Screen::FID_8_FNT); - if (_flags.platform != Common::kPlatformFMTowns && _flags.platform != Common::kPlatformPC98) - snd_playTheme(0, 2); - _text->setTalkCoords(144); - - for (int i = 0; i < ARRAYSIZE(introProcTable) && !seq_skipSequence(); ++i) - (this->*introProcTable[i])(); - - _text->setTalkCoords(136); - delay(30 * _tickLength); - _seq->setCopyViewOffs(false); - _sound->haltTrack(); - _sound->voiceStop(); - - if (_flags.isTalkie) - _res->unloadPakFile("INTRO.VRM"); -} - -void KyraEngine_v1::seq_introLogos() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_introLogos()"); - - if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { - _screen->loadBitmap("LOGO.CPS", 3, 3, _screen->_currentPalette); - _screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0); - _screen->updateScreen(); - _screen->fadeFromBlack(); - delay(90 * _tickLength); - _screen->fadeToBlack(); - if (!_abortIntroFlag) - snd_playWanderScoreViaMap(57, 0); - } - - _screen->clearPage(0); - - if (_flags.platform == Common::kPlatformAmiga) { - _screen->loadPalette("INTRO.PAL", _screen->_currentPalette); - _screen->loadBitmap("BOTTOM.CPS", 3, 5, 0); - _screen->loadBitmap("TOP.CPS", 3, 3, 0); - _screen->copyRegion(0, 0, 0, 111, 320, 64, 2, 0); - _screen->copyRegion(0, 91, 0, 8, 320, 109, 2, 0); - _screen->copyRegion(0, 0, 0, 0, 320, 190, 0, 2); - } else { - _screen->loadBitmap("TOP.CPS", 7, 7, 0); - _screen->loadBitmap("BOTTOM.CPS", 5, 5, _screen->_currentPalette); - _screen->copyRegion(0, 91, 0, 8, 320, 103, 6, 0); - _screen->copyRegion(0, 0, 0, 111, 320, 64, 6, 0); - } - - _screen->_curPage = 0; - _screen->updateScreen(); - _screen->fadeFromBlack(); - - if (_seq->playSequence(_seq_WestwoodLogo, _skipFlag) || _quitFlag) { - _screen->fadeToBlack(); - _screen->clearPage(0); - return; - } - delay(60 * _tickLength); - - if (_flags.platform == Common::kPlatformAmiga) { - memcpy(_screen->_currentPalette, _screen->_currentPalette + 3*32, 3*32); - _screen->setScreenPalette(_screen->_currentPalette); - } - - if ((_seq->playSequence(_seq_KyrandiaLogo, _skipFlag) && !seq_skipSequence()) || _quitFlag) { - _screen->fadeToBlack(); - _screen->clearPage(0); - return; - } - _screen->fillRect(0, 179, 319, 199, 0); - - if (_quitFlag) - return; - - if (_flags.platform == Common::kPlatformAmiga) { - memcpy(_screen->_currentPalette, _screen->_currentPalette + 3*64, 3*32); - _screen->fadeToBlack(); - _screen->copyRegion(0, 0, 0, 0, 320, 200, 4, 0); - _screen->fadeFromBlack(); - } else { - _screen->copyRegion(0, 91, 0, 8, 320, 104, 6, 2); - _screen->copyRegion(0, 0, 0, 112, 320, 64, 6, 2); - - uint32 start = _system->getMillis(); - bool doneFlag = false; - int oldDistance = 0; - - do { - uint32 now = _system->getMillis(); - - // The smallest y2 we ever draw the screen for is 65. - int distance = (now - start) / _tickLength; - if (distance > 112) { - distance = 112; - doneFlag = true; - } - - if (distance > oldDistance) { - int y1 = 8 + distance; - int h1 = 168 - distance; - int y2 = 176 - distance; - int h2 = distance; - - _screen->copyRegion(0, y1, 0, 8, 320, h1, 2, 0); - if (h2 > 0) - _screen->copyRegion(0, 64, 0, y2, 320, h2, 4, 0); - _screen->updateScreen(); - } - - oldDistance = distance; - delay(10); - } while (!doneFlag && !_quitFlag && !_abortIntroFlag); - } - - if (_quitFlag) - return; - - _seq->playSequence(_seq_Forest, true); -} - -void KyraEngine_v1::seq_introStory() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_introStory()"); - _screen->clearPage(3); - _screen->clearPage(0); - - // HACK: The Italian fan translation uses an special text screen here - // so we show it even when text is disabled - if (!textEnabled() && speechEnabled() && _flags.lang != Common::IT_ITA) - return; - - if (_flags.lang == Common::EN_ANY && !_flags.isTalkie && (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformAmiga)) - _screen->loadBitmap("TEXT.CPS", 3, 3, _screen->_currentPalette); - else if (_flags.lang == Common::EN_ANY || _flags.lang == Common::JA_JPN) - _screen->loadBitmap("TEXT_ENG.CPS", 3, 3, _screen->_currentPalette); - else if (_flags.lang == Common::DE_DEU) - _screen->loadBitmap("TEXT_GER.CPS", 3, 3, _screen->_currentPalette); - else if (_flags.lang == Common::FR_FRA) - _screen->loadBitmap("TEXT_FRE.CPS", 3, 3, _screen->_currentPalette); - else if (_flags.lang == Common::ES_ESP) - _screen->loadBitmap("TEXT_SPA.CPS", 3, 3, _screen->_currentPalette); - else if (_flags.lang == Common::IT_ITA && !_flags.isTalkie) - _screen->loadBitmap("TEXT_ITA.CPS", 3, 3, _screen->_currentPalette); - else if (_flags.lang == Common::IT_ITA && _flags.isTalkie) - _screen->loadBitmap("TEXT_ENG.CPS", 3, 3, _screen->_currentPalette); - else - warning("no story graphics file found"); - _screen->setScreenPalette(_screen->_currentPalette); - _screen->copyRegion(0, 0, 0, 0, 320, 200, 3, 0); - - if (_flags.lang == Common::JA_JPN) { - const int x1 = (Screen::SCREEN_W - _screen->getTextWidth(_seq_textsTable[18])) / 2; - const int x2 = (Screen::SCREEN_W - _screen->getTextWidth(_seq_textsTable[19])) / 2; - const int y1 = 175; - const int y2 = 184; - - uint8 colorMap[] = { 0, 15, 12, 12 }; - _screen->setTextColor(colorMap, 0, 3); - - _screen->printText(_seq_textsTable[18], x1, y1, 5, 8); - _screen->printText(_seq_textsTable[19], x2, y2, 5, 8); - } - - _screen->updateScreen(); - //debugC(0, kDebugLevelMain, "skipFlag %i, %i", _skipFlag, _tickLength); - delay(360 * _tickLength); -} - -void KyraEngine_v1::seq_introMalcolmTree() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_introMalcolmTree()"); - _screen->_curPage = 0; - _screen->clearPage(3); - _seq->playSequence(_seq_MalcolmTree, true); -} - -void KyraEngine_v1::seq_introKallakWriting() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_introKallakWriting()"); - _seq->makeHandShapes(); - _screen->setAnimBlockPtr(5060); - _screen->_charWidth = -2; - _screen->clearPage(3); - _seq->playSequence(_seq_KallakWriting, true); -} - -void KyraEngine_v1::seq_introKallakMalcolm() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_introKallakMalcolm()"); - _screen->clearPage(3); - _seq->playSequence(_seq_KallakMalcolm, true); -} - -void KyraEngine_v1::seq_createAmuletJewel(int jewel, int page, int noSound, int drawOnly) { - debugC(9, kDebugLevelMain, "seq_createAmuletJewel(%d, %d, %d, %d)", jewel, page, noSound, drawOnly); - static const uint16 specialJewelTable[] = { - 0x167, 0x162, 0x15D, 0x158, 0x153, 0xFFFF - }; - static const uint16 specialJewelTable1[] = { - 0x14F, 0x154, 0x159, 0x15E, 0x163, 0xFFFF - }; - static const uint16 specialJewelTable2[] = { - 0x150, 0x155, 0x15A, 0x15F, 0x164, 0xFFFF - }; - static const uint16 specialJewelTable3[] = { - 0x151, 0x156, 0x15B, 0x160, 0x165, 0xFFFF - }; - static const uint16 specialJewelTable4[] = { - 0x152, 0x157, 0x15C, 0x161, 0x166, 0xFFFF - }; - if (!noSound) - snd_playSoundEffect(0x5F); - _screen->hideMouse(); - if (!drawOnly) { - for (int i = 0; specialJewelTable[i] != 0xFFFF; ++i) { - _screen->drawShape(page, _shapes[specialJewelTable[i]], _amuletX2[jewel], _amuletY2[jewel], 0, 0); - _screen->updateScreen(); - delayWithTicks(3); - } - - const uint16 *opcodes = 0; - switch (jewel - 1) { - case 0: - opcodes = specialJewelTable1; - break; - - case 1: - opcodes = specialJewelTable2; - break; - - case 2: - opcodes = specialJewelTable3; - break; - - case 3: - opcodes = specialJewelTable4; - break; - } - - if (opcodes) { - for (int i = 0; opcodes[i] != 0xFFFF; ++i) { - _screen->drawShape(page, _shapes[opcodes[i]], _amuletX2[jewel], _amuletY2[jewel], 0, 0); - _screen->updateScreen(); - delayWithTicks(3); - } - } - } - _screen->drawShape(page, _shapes[323+jewel], _amuletX2[jewel], _amuletY2[jewel], 0, 0); - _screen->updateScreen(); - _screen->showMouse(); - setGameFlag(0x55+jewel); -} - -void KyraEngine_v1::seq_brandonHealing() { - debugC(9, kDebugLevelMain, "seq_brandonHealing()"); - if (!(_deathHandler & 8)) - return; - if (_currentCharacter->sceneId == 210) { - if (_beadStateVar == 4 || _beadStateVar == 6) - return; - } - _screen->hideMouse(); - checkAmuletAnimFlags(); - assert(_healingShapeTable); - setupShapes123(_healingShapeTable, 22, 0); - _animator->setBrandonAnimSeqSize(3, 48); - snd_playSoundEffect(0x53); - for (int i = 123; i <= 144; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - for (int i = 125; i >= 123; --i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - _animator->resetBrandonAnimSeqSize(); - _currentCharacter->currentAnimFrame = 7; - _animator->animRefreshNPC(0); - freeShapes123(); - _screen->showMouse(); -} - -void KyraEngine_v1::seq_brandonHealing2() { - debugC(9, kDebugLevelMain, "seq_brandonHealing2()"); - _screen->hideMouse(); - checkAmuletAnimFlags(); - assert(_healingShape2Table); - setupShapes123(_healingShape2Table, 30, 0); - resetBrandonPoisonFlags(); - _animator->setBrandonAnimSeqSize(3, 48); - snd_playSoundEffect(0x50); - for (int i = 123; i <= 152; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - _animator->resetBrandonAnimSeqSize(); - _currentCharacter->currentAnimFrame = 7; - _animator->animRefreshNPC(0); - freeShapes123(); - _screen->showMouse(); - assert(_poisonGone); - characterSays(2010, _poisonGone[0], 0, -2); - characterSays(2011, _poisonGone[1], 0, -2); -} - -void KyraEngine_v1::seq_poisonDeathNow(int now) { - debugC(9, kDebugLevelMain, "seq_poisonDeathNow(%d)", now); - if (!(_brandonStatusBit & 1)) - return; - ++_poisonDeathCounter; - if (now) - _poisonDeathCounter = 2; - if (_poisonDeathCounter >= 2) { - snd_playWanderScoreViaMap(1, 1); - assert(_thePoison); - characterSays(7000, _thePoison[0], 0, -2); - characterSays(7001, _thePoison[1], 0, -2); - seq_poisonDeathNowAnim(); - _deathHandler = 3; - } else { - assert(_thePoison); - characterSays(7002, _thePoison[2], 0, -2); - characterSays(7004, _thePoison[3], 0, -2); - } -} - -void KyraEngine_v1::seq_poisonDeathNowAnim() { - debugC(9, kDebugLevelMain, "seq_poisonDeathNowAnim()"); - _screen->hideMouse(); - checkAmuletAnimFlags(); - assert(_posionDeathShapeTable); - setupShapes123(_posionDeathShapeTable, 20, 0); - _animator->setBrandonAnimSeqSize(8, 48); - - _currentCharacter->currentAnimFrame = 124; - _animator->animRefreshNPC(0); - delayWithTicks(30); - - _currentCharacter->currentAnimFrame = 123; - _animator->animRefreshNPC(0); - delayWithTicks(30); - - for (int i = 125; i <= 139; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - - delayWithTicks(60); - - for (int i = 140; i <= 142; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - - delayWithTicks(60); - - _animator->resetBrandonAnimSeqSize(); - freeShapes123(); - _animator->restoreAllObjectBackgrounds(); - _currentCharacter->x1 = _currentCharacter->x2 = -1; - _currentCharacter->y1 = _currentCharacter->y2 = -1; - _animator->preserveAllBackgrounds(); - _screen->showMouse(); -} - -void KyraEngine_v1::seq_playFluteAnimation() { - debugC(9, kDebugLevelMain, "seq_playFluteAnimation()"); - _screen->hideMouse(); - checkAmuletAnimFlags(); - setupShapes123(_fluteAnimShapeTable, 36, 0); - _animator->setBrandonAnimSeqSize(3, 75); - for (int i = 123; i <= 130; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(2); - } - - int delayTime = 0, soundType = 0; - if (queryGameFlag(0x85)) { - snd_playSoundEffect(0x63); - delayTime = 9; - soundType = 3; - } else if (!queryGameFlag(0x86)) { - snd_playSoundEffect(0x61); - delayTime = 2; - soundType = 1; - setGameFlag(0x86); - } else { - snd_playSoundEffect(0x62); - delayTime = 2; - soundType = 2; - } - - for (int i = 131; i <= 158; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(delayTime); - } - - for (int i = 126; i >= 123; --i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(delayTime); - } - _animator->resetBrandonAnimSeqSize(); - _currentCharacter->currentAnimFrame = 7; - _animator->animRefreshNPC(0); - freeShapes123(); - _screen->showMouse(); - - if (soundType == 1) { - assert(_fluteString); - characterSays(1000, _fluteString[0], 0, -2); - } else if (soundType == 2) { - assert(_fluteString); - characterSays(1001, _fluteString[1], 0, -2); - } -} - -void KyraEngine_v1::seq_winterScroll1() { - debugC(9, kDebugLevelMain, "seq_winterScroll1()"); - _screen->hideMouse(); - checkAmuletAnimFlags(); - assert(_winterScrollTable); - assert(_winterScroll1Table); - assert(_winterScroll2Table); - setupShapes123(_winterScrollTable, 7, 0); - _animator->setBrandonAnimSeqSize(5, 66); - - for (int i = 123; i <= 129; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - - freeShapes123(); - snd_playSoundEffect(0x20); - - uint8 numFrames, midpoint; - if (_flags.isTalkie) { - numFrames = 18; - midpoint = 136; - } else { - numFrames = 35; - midpoint = 147; - } - setupShapes123(_winterScroll1Table, numFrames, 0); - for (int i = 123; i < midpoint; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - - if (_currentCharacter->sceneId == 41 && !queryGameFlag(0xA2)) { - snd_playSoundEffect(0x20); - _sprites->_anims[0].play = false; - _animator->sprites()[0].active = 0; - _sprites->_anims[1].play = true; - _animator->sprites()[1].active = 1; - setGameFlag(0xA2); - } - - for (int i = midpoint; i < 123 + numFrames; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - - if (_currentCharacter->sceneId == 117 && !queryGameFlag(0xB3)) { - for (int i = 0; i <= 7; ++i) { - _sprites->_anims[i].play = false; - _animator->sprites()[i].active = 0; - } - uint8 tmpPal[768]; - memcpy(tmpPal, _screen->_currentPalette, 768); - memcpy(&tmpPal[684], palTable2()[0], 60); - _screen->fadePalette(tmpPal, 72); - memcpy(&_screen->_currentPalette[684], palTable2()[0], 60); - _screen->setScreenPalette(_screen->_currentPalette); - setGameFlag(0xB3); - } else { - delayWithTicks(120); - } - - freeShapes123(); - setupShapes123(_winterScroll2Table, 4, 0); - - for (int i = 123; i <= 126; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - - _animator->resetBrandonAnimSeqSize(); - _currentCharacter->currentAnimFrame = 7; - _animator->animRefreshNPC(0); - freeShapes123(); - _screen->showMouse(); -} - -void KyraEngine_v1::seq_winterScroll2() { - debugC(9, kDebugLevelMain, "seq_winterScroll2()"); - _screen->hideMouse(); - checkAmuletAnimFlags(); - assert(_winterScrollTable); - setupShapes123(_winterScrollTable, 7, 0); - _animator->setBrandonAnimSeqSize(5, 66); - - for (int i = 123; i <= 128; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - - delayWithTicks(120); - - for (int i = 127; i >= 123; --i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - - _animator->resetBrandonAnimSeqSize(); - _currentCharacter->currentAnimFrame = 7; - _animator->animRefreshNPC(0); - freeShapes123(); - _screen->showMouse(); -} - -void KyraEngine_v1::seq_makeBrandonInv() { - debugC(9, kDebugLevelMain, "seq_makeBrandonInv()"); - if (_deathHandler == 8) - return; - - if (_currentCharacter->sceneId == 210) { - if (_beadStateVar == 4 || _beadStateVar == 6) - return; - } - - _screen->hideMouse(); - checkAmuletAnimFlags(); - _brandonStatusBit |= 0x20; - _timer->setCountdown(18, 2700); - _brandonStatusBit |= 0x40; - snd_playSoundEffect(0x77); - _brandonInvFlag = 0; - while (_brandonInvFlag <= 0x100) { - _animator->animRefreshNPC(0); - delayWithTicks(10); - _brandonInvFlag += 0x10; - } - _brandonStatusBit &= 0xFFBF; - _screen->showMouse(); -} - -void KyraEngine_v1::seq_makeBrandonNormal() { - debugC(9, kDebugLevelMain, "seq_makeBrandonNormal()"); - _screen->hideMouse(); - _brandonStatusBit |= 0x40; - snd_playSoundEffect(0x77); - _brandonInvFlag = 0x100; - while (_brandonInvFlag >= 0) { - _animator->animRefreshNPC(0); - delayWithTicks(10); - _brandonInvFlag -= 0x10; - } - _brandonInvFlag = 0; - _brandonStatusBit &= 0xFF9F; - _screen->showMouse(); -} - -void KyraEngine_v1::seq_makeBrandonNormal2() { - debugC(9, kDebugLevelMain, "seq_makeBrandonNormal2()"); - _screen->hideMouse(); - assert(_brandonToWispTable); - setupShapes123(_brandonToWispTable, 26, 0); - _animator->setBrandonAnimSeqSize(5, 48); - _brandonStatusBit &= 0xFFFD; - snd_playSoundEffect(0x6C); - for (int i = 138; i >= 123; --i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - _animator->setBrandonAnimSeqSize(4, 48); - _currentCharacter->currentAnimFrame = 7; - _animator->animRefreshNPC(0); - - if (_currentCharacter->sceneId >= 229 && _currentCharacter->sceneId <= 245) - _screen->fadeSpecialPalette(31, 234, 13, 4); - else if (_currentCharacter->sceneId >= 118 && _currentCharacter->sceneId <= 186) - _screen->fadeSpecialPalette(14, 228, 15, 4); - - freeShapes123(); - _screen->showMouse(); -} - -void KyraEngine_v1::seq_makeBrandonWisp() { - debugC(9, kDebugLevelMain, "seq_makeBrandonWisp()"); - if (_deathHandler == 8) - return; - - if (_currentCharacter->sceneId == 210) { - if (_beadStateVar == 4 || _beadStateVar == 6) - return; - } - _screen->hideMouse(); - checkAmuletAnimFlags(); - assert(_brandonToWispTable); - setupShapes123(_brandonToWispTable, 26, 0); - _animator->setBrandonAnimSeqSize(5, 48); - snd_playSoundEffect(0x6C); - for (int i = 123; i <= 138; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - _brandonStatusBit |= 2; - - if (_currentCharacter->sceneId >= 109 && _currentCharacter->sceneId <= 198) - _timer->setCountdown(14, 18000); - else - _timer->setCountdown(14, 7200); - - _animator->_brandonDrawFrame = 113; - _brandonStatusBit0x02Flag = 1; - _currentCharacter->currentAnimFrame = 113; - _animator->animRefreshNPC(0); - _animator->updateAllObjectShapes(); - - if (_currentCharacter->sceneId >= 229 && _currentCharacter->sceneId <= 245) - _screen->fadeSpecialPalette(30, 234, 13, 4); - else if (_currentCharacter->sceneId >= 118 && _currentCharacter->sceneId <= 186) - _screen->fadeSpecialPalette(14, 228, 15, 4); - - freeShapes123(); - _screen->showMouse(); -} - -void KyraEngine_v1::seq_dispelMagicAnimation() { - debugC(9, kDebugLevelMain, "seq_dispelMagicAnimation()"); - if (_deathHandler == 8) - return; - if (_currentCharacter->sceneId == 210) { - if (_beadStateVar == 4 || _beadStateVar == 6) - return; - } - _screen->hideMouse(); - if (_currentCharacter->sceneId == 210 && _currentCharacter->sceneId < 160) - _currentCharacter->facing = 3; - if (_malcolmFlag == 7 && _beadStateVar == 3) { - _beadStateVar = 6; - _unkEndSeqVar5 = 2; - _malcolmFlag = 10; - } - checkAmuletAnimFlags(); - setGameFlag(0xEE); - assert(_magicAnimationTable); - setupShapes123(_magicAnimationTable, 5, 0); - _animator->setBrandonAnimSeqSize(8, 49); - snd_playSoundEffect(0x15); - for (int i = 123; i <= 127; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - - delayWithTicks(120); - - for (int i = 127; i >= 123; --i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(10); - } - _animator->resetBrandonAnimSeqSize(); - _currentCharacter->currentAnimFrame = 7; - _animator->animRefreshNPC(0); - freeShapes123(); - _screen->showMouse(); -} - -void KyraEngine_v1::seq_fillFlaskWithWater(int item, int type) { - debugC(9, kDebugLevelMain, "seq_fillFlaskWithWater(%d, %d)", item, type); - int newItem = -1; - static const uint8 flaskTable1[] = { 0x46, 0x48, 0x4A, 0x4C }; - static const uint8 flaskTable2[] = { 0x47, 0x49, 0x4B, 0x4D }; - - if (item >= 60 && item <= 77) { - assert(_flaskFull); - characterSays(8006, _flaskFull[0], 0, -2); - } else if (item == 78) { - assert(type >= 0 && type < ARRAYSIZE(flaskTable1)); - newItem = flaskTable1[type]; - } else if (item == 79) { - assert(type >= 0 && type < ARRAYSIZE(flaskTable2)); - newItem = flaskTable2[type]; - } - - if (newItem == -1) - return; - - _screen->hideMouse(); - setMouseItem(newItem); - _screen->showMouse(); - _itemInHand = newItem; - assert(_fullFlask); - assert(type < _fullFlask_Size && type >= 0); - static const uint16 voiceEntries[] = { - 0x1F40, 0x1F41, 0x1F42, 0x1F45 - }; - assert(type < ARRAYSIZE(voiceEntries)); - characterSays(voiceEntries[type], _fullFlask[type], 0, -2); -} - -void KyraEngine_v1::seq_playDrinkPotionAnim(int item, int unk2, int flags) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_playDrinkPotionAnim(%d, %d, %d)", item, unk2, flags); - uint8 red, green, blue; - - switch (item) { - case 60: - case 61: - red = 63; - green = blue = 6; - break; - case 62: - case 63: - red = green = 0; - blue = 67; - break; - case 64: - case 65: - red = 84; - green = 78; - blue = 14; - break; - case 66: - red = blue = 0; - green = 48; - break; - case 67: - red = 100; - green = 48; - blue = 23; - break; - case 68: - red = 73; - green = 0; - blue = 89; - break; - case 69: - red = green = 73; - blue = 86; - break; - default: - red = 33; - green = 66; - blue = 100; - break; - } - red = (uint8)((double)red * 0.63); - green = (uint8)((double)green * 0.63); - blue = (uint8)((double)blue * 0.63); - - _screen->setPaletteIndex(0xFE, red, green, blue); - - _screen->hideMouse(); - checkAmuletAnimFlags(); - _currentCharacter->facing = 5; - _animator->animRefreshNPC(0); - assert(_drinkAnimationTable); - setupShapes123(_drinkAnimationTable, 9, flags); - _animator->setBrandonAnimSeqSize(5, 54); - - for (int i = 123; i <= 131; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(5); - } - snd_playSoundEffect(0x34); - for (int i = 0; i < 2; ++i) { - _currentCharacter->currentAnimFrame = 130; - _animator->animRefreshNPC(0); - delayWithTicks(7); - _currentCharacter->currentAnimFrame = 131; - _animator->animRefreshNPC(0); - delayWithTicks(7); - } - - if (unk2) { - // XXX - } - - for (int i = 131; i >= 123; --i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(5); - } - - _animator->resetBrandonAnimSeqSize(); - _currentCharacter->currentAnimFrame = 7; - _animator->animRefreshNPC(0); - freeShapes123(); - _screen->setPaletteIndex(0xFE, 30, 30, 30); - _screen->showMouse(); -} - -int KyraEngine_v1::seq_playEnd() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_playEnd()"); - if (_endSequenceSkipFlag) - return 0; - - if (_deathHandler == 8) - return 0; - - _screen->_curPage = 2; - if (_endSequenceNeedLoading) { - snd_playWanderScoreViaMap(50, 1); - setupPanPages(); - _finalA = new WSAMovieV1(this); - assert(_finalA); - _finalA->open("finala.wsa", 1, 0); - _finalB = new WSAMovieV1(this); - assert(_finalB); - _finalB->open("finalb.wsa", 1, 0); - _finalC = new WSAMovieV1(this); - assert(_finalC); - _endSequenceNeedLoading = 0; - _finalC->open("finalc.wsa", 1, 0); - _screen->_curPage = 0; - _beadStateVar = 0; - _malcolmFlag = 0; - _unkEndSeqVar2 = _system->getMillis() + 600 * _tickLength; - _screen->copyRegion(312, 0, 312, 0, 8, 136, 0, 2); - } - - // TODO: better handling. This timer shouldn't count when the menu is open or something. - if (_unkEndSeqVar2 != -1) { - if (_system->getMillis() > (uint32)_unkEndSeqVar2) { - _unkEndSeqVar2 = -1; - if (!_malcolmFlag) - _malcolmFlag = 1; - } - } - - if (handleMalcolmFlag()) { - _beadStateVar = 0; - _malcolmFlag = 12; - handleMalcolmFlag(); - handleBeadState(); - closeFinalWsa(); - if (_deathHandler == 8) { - _screen->_curPage = 0; - checkAmuletAnimFlags(); - seq_brandonToStone(); - delay(60 * _tickLength); - return 1; - } else { - _endSequenceSkipFlag = 1; - if (_text->printed()) - _text->restoreTalkTextMessageBkgd(2, 0); - _screen->_curPage = 0; - _screen->hideMouse(); - _screen->fadeSpecialPalette(32, 228, 20, 60); - delay(60 * _tickLength); - _screen->loadBitmap("GEMHEAL.CPS", 3, 3, _screen->_currentPalette); - _screen->setScreenPalette(_screen->_currentPalette); - _screen->shuffleScreen(8, 8, 304, 128, 2, 0, 1, 0); - uint32 nextTime = _system->getMillis() + 120 * _tickLength; - _finalA = new WSAMovieV1(this); - assert(_finalA); - _finalA->open("finald.wsa", 1, 0); - _finalA->setX(8); _finalA->setY(8); - _finalA->setDrawPage(0); - delayUntil(nextTime); - snd_playSoundEffect(0x40); - for (int i = 0; i < 22; ++i) { - delayUntil(nextTime); - if (i == 4) - snd_playSoundEffect(0x3E); - else if (i == 20) - snd_playSoundEffect(0x0E); - nextTime = _system->getMillis() + 8 * _tickLength; - _finalA->displayFrame(i); - _screen->updateScreen(); - } - delete _finalA; - _finalA = 0; - seq_playEnding(); - return 1; - } - } else { - handleBeadState(); - _screen->bitBlitRects(); - _screen->updateScreen(); - _screen->_curPage = 0; - } - return 0; -} - -void KyraEngine_v1::seq_brandonToStone() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_brandonToStone()"); - _screen->hideMouse(); - assert(_brandonStoneTable); - setupShapes123(_brandonStoneTable, 14, 0); - _animator->setBrandonAnimSeqSize(5, 51); - for (int i = 123; i <= 136; ++i) { - _currentCharacter->currentAnimFrame = i; - _animator->animRefreshNPC(0); - delayWithTicks(8); - } - _animator->resetBrandonAnimSeqSize(); - freeShapes123(); - _screen->showMouse(); -} - -void KyraEngine_v1::seq_playEnding() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_playEnding()"); - if (_quitFlag) - return; - _screen->hideMouse(); - _screen->_curPage = 0; - _screen->fadeToBlack(); - _screen->loadBitmap("REUNION.CPS", 3, 3, _screen->_currentPalette); - _screen->copyRegion(8, 8, 8, 8, 304, 128, 2, 0); - _screen->_curPage = 0; - // XXX - assert(_homeString); - drawSentenceCommand(_homeString[0], 179); - - memset(_screen->getPalette(2), 0, sizeof(uint8)*768); - _screen->setScreenPalette(_screen->getPalette(2)); - - _seq->playSequence(_seq_Reunion, false); - _screen->fadeToBlack(); - - _screen->showMouse(); - seq_playCredits(); -} - -void KyraEngine_v1::seq_playCredits() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_playCredits()"); - static const uint8 colorMap[] = { 0, 0, 0xC, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - static const char stringTerms[] = { 0x5, 0xd, 0x0}; - static const int numStrings = 250; - - struct { - int16 x, y; - uint8 code; - uint8 unk1; - Screen::FontId font; - uint8 *str; - } strings[numStrings]; - - memset(strings, 0, sizeof(strings)); - - _screen->hideMouse(); - if (!_flags.isTalkie) { - _screen->loadFont(Screen::FID_CRED6_FNT, "CREDIT6.FNT"); - _screen->loadFont(Screen::FID_CRED8_FNT, "CREDIT8.FNT"); - } else - _screen->setFont(Screen::FID_8_FNT); - - _screen->loadBitmap("CHALET.CPS", 4, 4, _screen->_currentPalette); - - _screen->setCurPage(0); - _screen->clearCurPage(); - _screen->setTextColorMap(colorMap); - _screen->_charWidth = -1; - - // we only need this for the fm-towns version - if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) - snd_playWanderScoreViaMap(53, 1); - - uint8 *buffer = 0; - uint32 size = 0; - - if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { - int sizeTmp = 0; - const uint8 *bufferTmp = _staticres->loadRawData(kCreditsStrings, sizeTmp); - buffer = new uint8[sizeTmp]; - assert(buffer); - memcpy(buffer, bufferTmp, sizeTmp); - size = sizeTmp; - _staticres->unloadId(kCreditsStrings); - } else { - buffer = _res->fileData("CREDITS.TXT", &size); - assert(buffer); - } - - uint8 *nextString = buffer; - uint8 *currentString = buffer; - int currentY = 200; - - for (int i = 0; i < numStrings; i++) { - if (*nextString == 0) - break; - - currentString = nextString; - nextString = (uint8 *)strpbrk((const char *)currentString, stringTerms); - if (!nextString) - nextString = (uint8 *)strchr((const char *)currentString, 0); - - strings[i].code = nextString[0]; - *nextString = 0; - if (strings[i].code != 0) - nextString++; - - if (*currentString == 3 || *currentString == 4) { - strings[i].unk1 = *currentString; - currentString++; - } - - if (*currentString == 1) { - currentString++; - if (!_flags.isTalkie) - _screen->setFont(Screen::FID_CRED6_FNT); - } else { - if (*currentString == 2) - currentString++; - if (!_flags.isTalkie) - _screen->setFont(Screen::FID_CRED8_FNT); - } - strings[i].font = _screen->_currentFont; - - if (strings[i].unk1 == 3) - strings[i].x = 157 - _screen->getTextWidth((const char *)currentString); - else if (strings[i].unk1 == 4) - strings[i].x = 161; - else - strings[i].x = (320 - _screen->getTextWidth((const char *)currentString)) / 2 + 1; - - strings[i].y = currentY; - if (strings[i].code != 5) - currentY += 10; - - strings[i].str = currentString; - } - - _screen->setCurPage(2); - - memset(_screen->getPalette(2), 0, sizeof(uint8)*768); - _screen->setScreenPalette(_screen->getPalette(2)); - _screen->copyRegion(8, 32, 8, 32, 312, 128, 4, 0, Screen::CR_NO_P_CHECK); - _screen->fadePalette(_screen->_currentPalette, 0x5A); - - Common::Event event; - bool finished = false; - int bottom = 201; - while (!finished) { - uint32 startLoop = _system->getMillis(); - if (bottom > 175) { - _screen->copyRegion(8, 32, 8, 32, 312, 128, 4, 2, Screen::CR_NO_P_CHECK); - bottom = 0; - - for (int i = 0; i < numStrings; i++) { - if (strings[i].y < 200 && strings[i].y > 0) { - if (strings[i].font != _screen->_currentFont) - _screen->setFont(strings[i].font); - _screen->printText((const char *)strings[i].str, strings[i].x, strings[i].y, 15, 0); - } - strings[i].y--; - if (strings[i].y > bottom) - bottom = strings[i].y; - } - _screen->copyRegion(8, 32, 8, 32, 312, 128, 2, 0, Screen::CR_NO_P_CHECK); - _screen->updateScreen(); - } - - while (_eventMan->pollEvent(event)) { - switch (event.type) { - case Common::EVENT_KEYDOWN: - finished = true; - break; - case Common::EVENT_QUIT: - quitGame(); - finished = true; - break; - default: - break; - } - } - - uint32 now = _system->getMillis(); - uint32 nextLoop = startLoop + _tickLength * 5; - - if (nextLoop > now) - _system->delayMillis(nextLoop - now); - } - - delete[] buffer; - - _screen->fadeToBlack(); - _screen->clearCurPage(); - _screen->showMouse(); -} - -bool KyraEngine_v1::seq_skipSequence() const { - debugC(9, kDebugLevelMain, "KyraEngine_v1::seq_skipSequence()"); - return _quitFlag || _abortIntroFlag; -} - -int KyraEngine_v1::handleMalcolmFlag() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::handleMalcolmFlag()"); - static uint16 frame = 0; - static uint32 timer1 = 0; - static uint32 timer2 = 0; - - switch (_malcolmFlag) { - case 1: - frame = 0; - _malcolmFlag = 2; - timer2 = 0; - - // Fall through to the next case - - case 2: - if (_system->getMillis() >= timer2) { - _finalA->setX(8); - _finalA->setY(46); - _finalA->setDrawPage(0); - _finalA->displayFrame(frame); - _screen->updateScreen(); - timer2 = _system->getMillis() + 8 * _tickLength; - ++frame; - if (frame > 13) { - _malcolmFlag = 3; - timer1 = _system->getMillis() + 180 * _tickLength; - } - } - break; - - case 3: - if (_system->getMillis() < timer1) { - if (_system->getMillis() >= timer2) { - frame = _rnd.getRandomNumberRng(14, 17); - _finalA->setX(8); - _finalA->setY(46); - _finalA->setDrawPage(0); - _finalA->displayFrame(frame); - _screen->updateScreen(); - timer2 = _system->getMillis() + 8 * _tickLength; - } - } else { - _malcolmFlag = 4; - frame = 18; - } - break; - - case 4: - if (_system->getMillis() >= timer2) { - _finalA->setX(8); - _finalA->setY(46); - _finalA->setDrawPage(0); - _finalA->displayFrame(frame); - _screen->updateScreen(); - timer2 = _system->getMillis() + 8 * _tickLength; - ++frame; - if (frame > 25) { - frame = 26; - _malcolmFlag = 5; - _beadStateVar = 1; - } - } - break; - - case 5: - if (_system->getMillis() >= timer2) { - _finalA->setX(8); - _finalA->setY(46); - _finalA->setDrawPage(0); - _finalA->displayFrame(frame); - _screen->updateScreen(); - timer2 = _system->getMillis() + 8 * _tickLength; - ++frame; - if (frame > 31) { - frame = 32; - _malcolmFlag = 6; - } - } - break; - - case 6: - if (_unkEndSeqVar4) { - if (frame <= 33 && _system->getMillis() >= timer2) { - _finalA->setX(8); - _finalA->setY(46); - _finalA->setDrawPage(0); - _finalA->displayFrame(frame); - _screen->updateScreen(); - timer2 = _system->getMillis() + 8 * _tickLength; - ++frame; - if (frame > 33) { - _malcolmFlag = 7; - frame = 32; - _unkEndSeqVar5 = 0; - } - } - } - break; - - case 7: - if (_unkEndSeqVar5 == 1) { - _malcolmFlag = 8; - frame = 34; - } else if (_unkEndSeqVar5 == 2) { - _malcolmFlag = 3; - timer1 = _system->getMillis() + 180 * _tickLength; - } - break; - - case 8: - if (_system->getMillis() >= timer2) { - _finalA->setX(8); - _finalA->setY(46); - _finalA->setDrawPage(0); - _finalA->displayFrame(frame); - _screen->updateScreen(); - timer2 = _system->getMillis() + 8 * _tickLength; - ++frame; - if (frame > 37) { - _malcolmFlag = 0; - _deathHandler = 8; - return 1; - } - } - break; - - case 9: - snd_playSoundEffect(12); - snd_playSoundEffect(12); - _finalC->setX(16); - _finalC->setY(50); - _finalC->setDrawPage(0); - for (int i = 0; i < 18; ++i) { - timer2 = _system->getMillis() + 4 * _tickLength; - _finalC->displayFrame(i); - _screen->updateScreen(); - delayUntil(timer2); - } - snd_playWanderScoreViaMap(51, 1); - delay(60 * _tickLength); - _malcolmFlag = 0; - return 1; - - case 10: - if (!_beadStateVar) { - handleBeadState(); - _screen->bitBlitRects(); - assert(_veryClever); - _text->printTalkTextMessage(_veryClever[0], 60, 31, 5, 0, 2); - timer2 = _system->getMillis() + 180 * _tickLength; - _malcolmFlag = 11; - } - break; - - case 11: - if (_system->getMillis() >= timer2) { - _text->restoreTalkTextMessageBkgd(2, 0); - _malcolmFlag = 3; - timer1 = _system->getMillis() + 180 * _tickLength; - } - break; - - default: - break; - } - - return 0; -} - -int KyraEngine_v1::handleBeadState() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::handleBeadState()"); - static uint32 timer1 = 0; - static uint32 timer2 = 0; - static BeadState beadState1 = { -1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - static BeadState beadState2 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; - - static const int table1[] = { - -1, -2, -4, -5, -6, -7, -6, -5, - -4, -2, -1, 0, 1, 2, 4, 5, - 6, 7, 6, 5, 4, 2, 1, 0, 0 - }; - static const int table2[] = { - 0, 0, 1, 1, 2, 2, 3, 3, - 4, 4, 5, 5, 5, 5, 4, 4, - 3, 3, 2, 2, 1, 1, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0 - }; - - switch (_beadStateVar) { - case 0: - if (beadState1.x != -1 && _endSequenceBackUpRect) { - _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); - _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); - } - - beadState1.x = -1; - beadState1.tableIndex = 0; - timer1 = 0; - timer2 = 0; - _lastDisplayedPanPage = 0; - return 1; - - case 1: - if (beadState1.x != -1) { - if (_endSequenceBackUpRect) { - _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); - _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); - } - beadState1.x = -1; - beadState1.tableIndex = 0; - } - _beadStateVar = 2; - break; - - case 2: - if (_system->getMillis() >= timer1) { - int x = 0, y = 0; - timer1 = _system->getMillis() + 4 * _tickLength; - if (beadState1.x == -1) { - assert(_panPagesTable); - beadState1.width2 = _animator->fetchAnimWidth(_panPagesTable[19], 256); - beadState1.width = ((beadState1.width2 + 7) >> 3) + 1; - beadState1.height = _animator->fetchAnimHeight(_panPagesTable[19], 256); - if (!_endSequenceBackUpRect) { - _endSequenceBackUpRect = new uint8[(beadState1.width * beadState1.height) << 3]; - assert(_endSequenceBackUpRect); - memset(_endSequenceBackUpRect, 0, ((beadState1.width * beadState1.height) << 3) * sizeof(uint8)); - } - x = beadState1.x = 60; - y = beadState1.y = 40; - initBeadState(x, y, x, 25, 8, &beadState2); - } else { - if (processBead(beadState1.x, beadState1.y, x, y, &beadState2)) { - _beadStateVar = 3; - timer2 = _system->getMillis() + 240 * _tickLength; - _unkEndSeqVar4 = 0; - beadState1.dstX = beadState1.x; - beadState1.dstY = beadState1.y; - return 0; - } else { - _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); - _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); - beadState1.x = x; - beadState1.y = y; - } - } - - _screen->copyCurPageBlock(x >> 3, y, beadState1.width, beadState1.height, _endSequenceBackUpRect); - _screen->drawShape(2, _panPagesTable[_lastDisplayedPanPage++], x, y, 0, 0); - - if (_lastDisplayedPanPage > 17) - _lastDisplayedPanPage = 0; - - _screen->addBitBlitRect(x, y, beadState1.width2, beadState1.height); - } - break; - - case 3: - if (_system->getMillis() >= timer1) { - timer1 = _system->getMillis() + 4 * _tickLength; - _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); - _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); - - beadState1.x = beadState1.dstX + table1[beadState1.tableIndex]; - beadState1.y = beadState1.dstY + table2[beadState1.tableIndex]; - _screen->copyCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); - - _screen->drawShape(2, _panPagesTable[_lastDisplayedPanPage++], beadState1.x, beadState1.y, 0, 0); - if (_lastDisplayedPanPage >= 17) - _lastDisplayedPanPage = 0; - - _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); - - ++beadState1.tableIndex; - if (beadState1.tableIndex > 24) - beadState1.tableIndex = 0; - _unkEndSeqVar4 = 1; - if (_system->getMillis() > timer2 && _malcolmFlag == 7 && !_unkAmuletVar && !_text->printed()) { - snd_playSoundEffect(0x0B); - if (_currentCharacter->x1 > 233 && _currentCharacter->x1 < 305 && _currentCharacter->y1 > 85 && _currentCharacter->y1 < 105 && - (_brandonStatusBit & 0x20)) { - beadState1.unk8 = 290; - beadState1.unk9 = 40; - _beadStateVar = 5; - } else { - _beadStateVar = 4; - beadState1.unk8 = _currentCharacter->x1 - 4; - beadState1.unk9 = _currentCharacter->y1 - 30; - } - - if (_text->printed()) - _text->restoreTalkTextMessageBkgd(2, 0); - - initBeadState(beadState1.x, beadState1.y, beadState1.unk8, beadState1.unk9, 12, &beadState2); - _lastDisplayedPanPage = 18; - } - } - break; - - case 4: - if (_system->getMillis() >= timer1) { - int x = 0, y = 0; - timer1 = _system->getMillis() + _tickLength; - if (processBead(beadState1.x, beadState1.y, x, y, &beadState2)) { - if (_brandonStatusBit & 20) { - _unkEndSeqVar5 = 2; - _beadStateVar = 6; - } else { - snd_playWanderScoreViaMap(52, 1); - snd_playSoundEffect(0x0C); - _unkEndSeqVar5 = 1; - _beadStateVar = 0; - } - } else { - _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); - _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); - beadState1.x = x; - beadState1.y = y; - _screen->copyCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); - _screen->drawShape(2, _panPagesTable[_lastDisplayedPanPage++], x, y, 0, 0); - if (_lastDisplayedPanPage > 17) { - _lastDisplayedPanPage = 0; - } - _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); - } - } - break; - - case 5: - if (_system->getMillis() >= timer1) { - timer1 = _system->getMillis() + _tickLength; - int x = 0, y = 0; - if (processBead(beadState1.x, beadState1.y, x, y, &beadState2)) { - if (beadState2.dstX == 290) { - _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); - uint32 nextRun = 0; - _finalB->setX(224); - _finalB->setY(8); - _finalB->setDrawPage(0); - for (int i = 0; i < 8; ++i) { - nextRun = _system->getMillis() + _tickLength; - _finalB->displayFrame(i); - _screen->updateScreen(); - delayUntil(nextRun); - } - snd_playSoundEffect(0x0D); - for (int i = 7; i >= 0; --i) { - nextRun = _system->getMillis() + _tickLength; - _finalB->displayFrame(i); - _screen->updateScreen(); - delayUntil(nextRun); - } - initBeadState(beadState1.x, beadState1.y, 63, 60, 12, &beadState2); - } else { - _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); - _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); - beadState1.x = -1; - beadState1.tableIndex = 0; - _beadStateVar = 0; - _malcolmFlag = 9; - } - } else { - _screen->copyFromCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); - _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); - beadState1.x = x; - beadState1.y = y; - _screen->copyCurPageBlock(beadState1.x >> 3, beadState1.y, beadState1.width, beadState1.height, _endSequenceBackUpRect); - _screen->drawShape(2, _panPagesTable[_lastDisplayedPanPage++], x, y, 0, 0); - if (_lastDisplayedPanPage > 17) - _lastDisplayedPanPage = 0; - _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); - } - } - break; - - case 6: - _screen->drawShape(2, _panPagesTable[19], beadState1.x, beadState1.y, 0, 0); - _screen->addBitBlitRect(beadState1.x, beadState1.y, beadState1.width2, beadState1.height); - _beadStateVar = 0; - break; - - default: - break; - } - return 0; -} - -void KyraEngine_v1::initBeadState(int x, int y, int x2, int y2, int unk, BeadState *ptr) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::initBeadState(%d, %d, %d, %d, %d, %p)", x, y, x2, y2, unk, (const void *)ptr); - ptr->unk9 = unk; - int xDiff = x2 - x; - int yDiff = y2 - y; - int unk1 = 0, unk2 = 0; - if (xDiff > 0) - unk1 = 1; - else if (xDiff == 0) - unk1 = 0; - else - unk1 = -1; - - - if (yDiff > 0) - unk2 = 1; - else if (yDiff == 0) - unk2 = 0; - else - unk2 = -1; - - xDiff = ABS(xDiff); - yDiff = ABS(yDiff); - - ptr->y = 0; - ptr->x = 0; - ptr->width = xDiff; - ptr->height = yDiff; - ptr->dstX = x2; - ptr->dstY = y2; - ptr->width2 = unk1; - ptr->unk8 = unk2; -} - -int KyraEngine_v1::processBead(int x, int y, int &x2, int &y2, BeadState *ptr) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::processBead(%d, %d, %p, %p, %p)", x, y, (const void *)&x2, (const void *)&y2, (const void *)ptr); - if (x == ptr->dstX && y == ptr->dstY) - return 1; - - int xPos = x, yPos = y; - if (ptr->width >= ptr->height) { - for (int i = 0; i < ptr->unk9; ++i) { - ptr->y += ptr->height; - if (ptr->y >= ptr->width) { - ptr->y -= ptr->width; - yPos += ptr->unk8; - } - xPos += ptr->width2; - } - } else { - for (int i = 0; i < ptr->unk9; ++i) { - ptr->x += ptr->width; - if (ptr->x >= ptr->height) { - ptr->x -= ptr->height; - xPos += ptr->width2; - } - yPos += ptr->unk8; - } - } - - int temp = ABS(x - ptr->dstX); - if (ptr->unk9 > temp) - xPos = ptr->dstX; - temp = ABS(y - ptr->dstY); - if (ptr->unk9 > temp) - yPos = ptr->dstY; - x2 = xPos; - y2 = yPos; - return 0; -} - -void KyraEngine_v1::setupPanPages() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::setupPanPages()"); - _screen->savePageToDisk("BKGD.PG", 2); - _screen->loadBitmap("BEAD.CPS", 3, 3, 0); - if (_flags.platform == Common::kPlatformMacintosh || _flags.platform == Common::kPlatformAmiga) { - int pageBackUp = _screen->_curPage; - _screen->_curPage = 2; - - delete[] _panPagesTable[19]; - _panPagesTable[19] = _screen->encodeShape(0, 0, 16, 9, 0); - assert(_panPagesTable[19]); - - int curX = 16; - for (int i = 0; i < 19; ++i) { - delete[] _panPagesTable[i]; - _panPagesTable[i] = _screen->encodeShape(curX, 0, 8, 5, 0); - assert(_panPagesTable[i]); - curX += 8; - } - - _screen->_curPage = pageBackUp; - } else { - for (int i = 0; i <= 19; ++i) { - delete[] _panPagesTable[i]; - _panPagesTable[i] = _seq->setPanPages(3, i); - assert(_panPagesTable[i]); - } - } - _screen->loadPageFromDisk("BKGD.PG", 2); -} - -void KyraEngine_v1::freePanPages() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::freePanPages()"); - delete _endSequenceBackUpRect; - _endSequenceBackUpRect = 0; - for (int i = 0; i <= 19; ++i) { - delete[] _panPagesTable[i]; - _panPagesTable[i] = 0; - } -} - -void KyraEngine_v1::closeFinalWsa() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::closeFinalWsa()"); - delete _finalA; - _finalA = 0; - delete _finalB; - _finalB = 0; - delete _finalC; - _finalC = 0; - freePanPages(); - _endSequenceNeedLoading = 1; -} - -void KyraEngine_v1::updateKyragemFading() { - static const uint8 kyraGemPalette[0x28] = { - 0x3F, 0x3B, 0x38, 0x34, 0x32, 0x2F, 0x2C, 0x29, 0x25, 0x22, - 0x1F, 0x1C, 0x19, 0x16, 0x12, 0x0F, 0x0C, 0x0A, 0x06, 0x03, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 - }; - - if (_system->getMillis() < _kyragemFadingState.timerCount) - return; - - _kyragemFadingState.timerCount = _system->getMillis() + 4 * _tickLength; - int palPos = 684; - for (int i = 0; i < 20; ++i) { - _screen->_currentPalette[palPos++] = kyraGemPalette[i + _kyragemFadingState.rOffset]; - _screen->_currentPalette[palPos++] = kyraGemPalette[i + _kyragemFadingState.gOffset]; - _screen->_currentPalette[palPos++] = kyraGemPalette[i + _kyragemFadingState.bOffset]; - } - _screen->setScreenPalette(_screen->_currentPalette); - _animator->_updateScreen = true; - switch (_kyragemFadingState.nextOperation) { - case 0: - --_kyragemFadingState.bOffset; - if (_kyragemFadingState.bOffset >= 1) - return; - _kyragemFadingState.nextOperation = 1; - break; - - case 1: - ++_kyragemFadingState.rOffset; - if (_kyragemFadingState.rOffset < 19) - return; - _kyragemFadingState.nextOperation = 2; - break; - - case 2: - --_kyragemFadingState.gOffset; - if (_kyragemFadingState.gOffset >= 1) - return; - _kyragemFadingState.nextOperation = 3; - break; - - case 3: - ++_kyragemFadingState.bOffset; - if (_kyragemFadingState.bOffset < 19) - return; - _kyragemFadingState.nextOperation = 4; - break; - - case 4: - --_kyragemFadingState.rOffset; - if (_kyragemFadingState.rOffset >= 1) - return; - _kyragemFadingState.nextOperation = 5; - break; - - case 5: - ++_kyragemFadingState.gOffset; - if (_kyragemFadingState.gOffset < 19) - return; - _kyragemFadingState.nextOperation = 0; - break; - - default: - break; - } - - _kyragemFadingState.timerCount = _system->getMillis() + 120 * _tickLength; -} - -void KyraEngine_v1::drawJewelPress(int jewel, int drawSpecial) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::drawJewelPress(%d, %d)", jewel, drawSpecial); - _screen->hideMouse(); - int shape = 0; - - if (drawSpecial) - shape = 0x14E; - else - shape = jewel + 0x149; - - snd_playSoundEffect(0x45); - _screen->drawShape(0, _shapes[shape], _amuletX2[jewel], _amuletY2[jewel], 0, 0); - _screen->updateScreen(); - delayWithTicks(2); - - if (drawSpecial) - shape = 0x148; - else - shape = jewel + 0x143; - - _screen->drawShape(0, _shapes[shape], _amuletX2[jewel], _amuletY2[jewel], 0, 0); - _screen->updateScreen(); - _screen->showMouse(); -} - -void KyraEngine_v1::drawJewelsFadeOutStart() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::drawJewelsFadeOutStart()"); - static const uint16 jewelTable1[] = { 0x164, 0x15F, 0x15A, 0x155, 0x150, 0xFFFF }; - static const uint16 jewelTable2[] = { 0x163, 0x15E, 0x159, 0x154, 0x14F, 0xFFFF }; - static const uint16 jewelTable3[] = { 0x166, 0x160, 0x15C, 0x157, 0x152, 0xFFFF }; - static const uint16 jewelTable4[] = { 0x165, 0x161, 0x15B, 0x156, 0x151, 0xFFFF }; - for (int i = 0; jewelTable1[i] != 0xFFFF; ++i) { - if (queryGameFlag(0x57)) - _screen->drawShape(0, _shapes[jewelTable1[i]], _amuletX2[2], _amuletY2[2], 0, 0); - if (queryGameFlag(0x59)) - _screen->drawShape(0, _shapes[jewelTable3[i]], _amuletX2[4], _amuletY2[4], 0, 0); - if (queryGameFlag(0x56)) - _screen->drawShape(0, _shapes[jewelTable2[i]], _amuletX2[1], _amuletY2[1], 0, 0); - if (queryGameFlag(0x58)) - _screen->drawShape(0, _shapes[jewelTable4[i]], _amuletX2[3], _amuletY2[3], 0, 0); - _screen->updateScreen(); - delayWithTicks(3); - } -} - -void KyraEngine_v1::drawJewelsFadeOutEnd(int jewel) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::drawJewelsFadeOutEnd(%d)", jewel); - static const uint16 jewelTable[] = { 0x153, 0x158, 0x15D, 0x162, 0x148, 0xFFFF }; - int newDelay = 0; - - switch (jewel - 1) { - case 2: - if (_currentCharacter->sceneId >= 109 && _currentCharacter->sceneId <= 198) - newDelay = 18900; - else - newDelay = 8100; - break; - - default: - newDelay = 3600; - break; - } - - setGameFlag(0xF1); - _timer->setCountdown(19, newDelay); - _screen->hideMouse(); - for (int i = 0; jewelTable[i] != 0xFFFF; ++i) { - uint16 shape = jewelTable[i]; - if (queryGameFlag(0x57)) - _screen->drawShape(0, _shapes[shape], _amuletX2[2], _amuletY2[2], 0, 0); - if (queryGameFlag(0x59)) - _screen->drawShape(0, _shapes[shape], _amuletX2[4], _amuletY2[4], 0, 0); - if (queryGameFlag(0x56)) - _screen->drawShape(0, _shapes[shape], _amuletX2[1], _amuletY2[1], 0, 0); - if (queryGameFlag(0x58)) - _screen->drawShape(0, _shapes[shape], _amuletX2[3], _amuletY2[3], 0, 0); - - _screen->updateScreen(); - delayWithTicks(3); - } - _screen->showMouse(); -} - -} // end of namespace Kyra - diff --git a/engines/kyra/sound_lok.cpp b/engines/kyra/sound_lok.cpp new file mode 100644 index 0000000000..398ac085c4 --- /dev/null +++ b/engines/kyra/sound_lok.cpp @@ -0,0 +1,83 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "kyra/sound.h" +#include "kyra/kyra_lok.h" + +namespace Kyra { + +void KyraEngine_LoK::snd_playSoundEffect(int track, int volume) { + debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_LoK::snd_playSoundEffect(%d, %d)", track, volume); + if ((_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) && track == 49) { + snd_playWanderScoreViaMap(56, 1); + return; + } + + KyraEngine::snd_playSoundEffect(track); +} + +void KyraEngine_LoK::snd_playWanderScoreViaMap(int command, int restart) { + debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_LoK::snd_playWanderScoreViaMap(%d, %d)", command, restart); + if (restart) + _lastMusicCommand = -1; + + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { + if (command == 1) { + _sound->beginFadeOut(); + } else if (command >= 35 && command <= 38) { + snd_playSoundEffect(command-20); + } else if (command >= 2) { + if (_lastMusicCommand != command) { + // the original does -2 here we handle this inside _sound->playTrack() + _sound->playTrack(command); + } + } else { + _sound->haltTrack(); + } + } else { + KyraEngine::snd_playWanderScoreViaMap(command, restart); + } +} + +void KyraEngine_LoK::snd_playVoiceFile(int id) { + debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_LoK::snd_playVoiceFile(%d)", id); + char vocFile[9]; + assert(id >= 0 && id < 9999); + sprintf(vocFile, "%03d", id); + _speechFile = vocFile; + _sound->voicePlay(vocFile); +} + +void KyraEngine_LoK::snd_voiceWaitForFinish(bool ingame) { + debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_LoK::snd_voiceWaitForFinish(%d)", ingame); + while (_sound->voiceIsPlaying() && !_skipFlag) { + if (ingame) + delay(10, true); + else + _system->delayMillis(10); + } +} + +} // end of namespace Kyra diff --git a/engines/kyra/sound_v1.cpp b/engines/kyra/sound_v1.cpp deleted file mode 100644 index 8293eb7508..0000000000 --- a/engines/kyra/sound_v1.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "kyra/sound.h" -#include "kyra/kyra_v1.h" - -namespace Kyra { - -void KyraEngine_v1::snd_playSoundEffect(int track, int volume) { - debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_playSoundEffect(%d, %d)", track, volume); - if ((_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) && track == 49) { - snd_playWanderScoreViaMap(56, 1); - return; - } - - KyraEngine::snd_playSoundEffect(track); -} - -void KyraEngine_v1::snd_playWanderScoreViaMap(int command, int restart) { - debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_playWanderScoreViaMap(%d, %d)", command, restart); - if (restart) - _lastMusicCommand = -1; - - if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { - if (command == 1) { - _sound->beginFadeOut(); - } else if (command >= 35 && command <= 38) { - snd_playSoundEffect(command-20); - } else if (command >= 2) { - if (_lastMusicCommand != command) { - // the original does -2 here we handle this inside _sound->playTrack() - _sound->playTrack(command); - } - } else { - _sound->haltTrack(); - } - } else { - KyraEngine::snd_playWanderScoreViaMap(command, restart); - } -} - -void KyraEngine_v1::snd_playVoiceFile(int id) { - debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_playVoiceFile(%d)", id); - char vocFile[9]; - assert(id >= 0 && id < 9999); - sprintf(vocFile, "%03d", id); - _speechFile = vocFile; - _sound->voicePlay(vocFile); -} - -void KyraEngine_v1::snd_voiceWaitForFinish(bool ingame) { - debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_voiceWaitForFinish(%d)", ingame); - while (_sound->voiceIsPlaying() && !_skipFlag) { - if (ingame) - delay(10, true); - else - _system->delayMillis(10); - } -} - -} // end of namespace Kyra diff --git a/engines/kyra/sprites.cpp b/engines/kyra/sprites.cpp index 0ba9f456bf..34c2986f25 100644 --- a/engines/kyra/sprites.cpp +++ b/engines/kyra/sprites.cpp @@ -30,14 +30,14 @@ #include "common/system.h" #include "common/events.h" #include "kyra/screen.h" -#include "kyra/kyra_v1.h" +#include "kyra/kyra_lok.h" #include "kyra/sprites.h" #include "kyra/resource.h" -#include "kyra/animator_v1.h" +#include "kyra/animator_lok.h" namespace Kyra { -Sprites::Sprites(KyraEngine_v1 *vm, OSystem *system) { +Sprites::Sprites(KyraEngine_LoK *vm, OSystem *system) { _vm = vm; _res = vm->resource(); _screen = vm->screen(); @@ -554,7 +554,7 @@ void Sprites::loadSceneShapes() { void Sprites::refreshSceneAnimObject(uint8 animNum, uint8 shapeNum, uint16 x, uint16 y, bool flipX, bool unkFlag) { debugC(9, kDebugLevelSprites, "Sprites::refreshSceneAnimObject(%i, %i, %i, %i, %i, %i", animNum, shapeNum, x, y, flipX, unkFlag); - Animator_v1::AnimObject &anim = _vm->animator()->sprites()[animNum]; + Animator_LoK::AnimObject &anim = _vm->animator()->sprites()[animNum]; anim.refreshFlag = 1; anim.bkgdChangeFlag = 1; diff --git a/engines/kyra/sprites.h b/engines/kyra/sprites.h index 3304458fda..212bfc7428 100644 --- a/engines/kyra/sprites.h +++ b/engines/kyra/sprites.h @@ -26,7 +26,7 @@ #ifndef KYRA_SPRITES_H #define KYRA_SPRITES_H -#include "kyra/kyra_v1.h" +#include "kyra/kyra_lok.h" namespace Kyra { @@ -63,11 +63,11 @@ struct Anim { bool disable; }; -class KyraEngine_v1; +class KyraEngine_LoK; class Sprites { public: - Sprites(KyraEngine_v1 *vm, OSystem *system); + Sprites(KyraEngine_LoK *vm, OSystem *system); ~Sprites(); void updateSceneAnims(); @@ -86,7 +86,7 @@ public: protected: void freeSceneShapes(); - KyraEngine_v1 *_vm; + KyraEngine_LoK *_vm; Resource *_res; OSystem *_system; Screen *_screen; diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index b81a5838ce..dbe181b84f 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -27,16 +27,16 @@ #include "common/endian.h" #include "common/md5.h" #include "kyra/kyra.h" -#include "kyra/kyra_v1.h" +#include "kyra/kyra_lok.h" #include "kyra/kyra_v2.h" #include "kyra/kyra_hof.h" #include "kyra/kyra_mr.h" #include "kyra/screen.h" -#include "kyra/screen_v1.h" +#include "kyra/screen_lok.h" #include "kyra/screen_hof.h" #include "kyra/screen_mr.h" #include "kyra/resource.h" -#include "kyra/gui_v1.h" +#include "kyra/gui_lok.h" #include "kyra/gui_hof.h" #include "kyra/gui_mr.h" @@ -932,7 +932,7 @@ uint8 *StaticResource::getFile(const char *name, int &size) { #pragma mark - -void KyraEngine_v1::initStaticResource() { +void KyraEngine_LoK::initStaticResource() { int temp = 0; _seq_Forest = _staticres->loadRawData(kForestSeq, temp); _seq_KallakWriting = _staticres->loadRawData(kKallakWritingSeq, temp); @@ -1041,7 +1041,7 @@ void KyraEngine_v1::initStaticResource() { _soundData = (_flags.platform == Common::kPlatformPC) ? soundData_PC : soundData_TOWNS; } -void KyraEngine_v1::loadMouseShapes() { +void KyraEngine_LoK::loadMouseShapes() { _screen->loadBitmap("MOUSE.CPS", 3, 3, 0); _screen->_curPage = 2; _shapes[0] = _screen->encodeShape(0, 0, 8, 10, 0); @@ -1057,7 +1057,7 @@ void KyraEngine_v1::loadMouseShapes() { _screen->setShapePages(5, 3); } -void KyraEngine_v1::loadCharacterShapes() { +void KyraEngine_LoK::loadCharacterShapes() { int curImage = 0xFF; int videoPage = _screen->_curPage; _screen->_curPage = 2; @@ -1078,7 +1078,7 @@ void KyraEngine_v1::loadCharacterShapes() { _screen->_curPage = videoPage; } -void KyraEngine_v1::loadSpecialEffectShapes() { +void KyraEngine_LoK::loadSpecialEffectShapes() { _screen->loadBitmap("EFFECTS.CPS", 3, 3, 0); _screen->_curPage = 2; @@ -1096,7 +1096,7 @@ void KyraEngine_v1::loadSpecialEffectShapes() { _shapes[currShape] = _screen->encodeShape((currShape-201) * 16, 106, 16, 16, 1); } -void KyraEngine_v1::loadItems() { +void KyraEngine_LoK::loadItems() { int shape; _screen->loadBitmap("JEWELS3.CPS", 3, 3, 0); @@ -1150,7 +1150,7 @@ void KyraEngine_v1::loadItems() { delete[] fileData; } -void KyraEngine_v1::loadButtonShapes() { +void KyraEngine_LoK::loadButtonShapes() { _screen->loadBitmap("BUTTONS2.CPS", 3, 3, 0); _screen->_curPage = 2; _gui->_scrollUpButton.data0ShapePtr = _screen->encodeShape(0, 0, 24, 14, 1); @@ -1162,7 +1162,7 @@ void KyraEngine_v1::loadButtonShapes() { _screen->_curPage = 0; } -void KyraEngine_v1::loadMainScreen(int page) { +void KyraEngine_LoK::loadMainScreen(int page) { _screen->clearPage(page); if (_flags.lang == Common::EN_ANY && !_flags.isTalkie && (_flags.platform == Common::kPlatformPC || _flags.platform == Common::kPlatformAmiga)) @@ -1296,7 +1296,7 @@ void KyraEngine_HoF::initStaticResource() { _callbackN = (_flags.isDemo && !_flags.isTalkie) ? hofDemoNestedSequenceCallbacks : hofNestedSequenceCallbacks; } -const ScreenDim Screen_v1::_screenDimTable[] = { +const ScreenDim Screen_LoK::_screenDimTable[] = { { 0x00, 0x00, 0x28, 0xC8, 0x0F, 0x0C, 0x00, 0x00 }, { 0x08, 0x48, 0x18, 0x38, 0x0F, 0x0C, 0x00, 0x00 }, { 0x01, 0x08, 0x26, 0x80, 0x0F, 0x0C, 0x00, 0x00 }, @@ -1310,7 +1310,7 @@ const ScreenDim Screen_v1::_screenDimTable[] = { { 0x03, 0x28, 0x22, 0x46, 0x0F, 0x0D, 0x00, 0x00 } }; -const int Screen_v1::_screenDimTableCount = ARRAYSIZE(Screen_v1::_screenDimTable); +const int Screen_LoK::_screenDimTableCount = ARRAYSIZE(Screen_LoK::_screenDimTable); const ScreenDim Screen_HoF::_screenDimTable[] = { { 0x00, 0x00, 0x28, 0xC8, 0xC7, 0xCF, 0x00, 0x00 }, @@ -1346,23 +1346,23 @@ const int8 KyraEngine::_addYPosTable[] = { 0, -2, -2, -2, 0, 2, 2, 2 }; -const int8 KyraEngine_v1::_charXPosTable[] = { +const int8 KyraEngine_LoK::_charXPosTable[] = { 0, 4, 4, 4, 0, -4, -4, -4 }; -const int8 KyraEngine_v1::_charYPosTable[] = { +const int8 KyraEngine_LoK::_charYPosTable[] = { -2, -2, 0, 2, 2, 2, 0, -2 }; -const uint16 KyraEngine_v1::_itemPosX[] = { +const uint16 KyraEngine_LoK::_itemPosX[] = { 95, 115, 135, 155, 175, 95, 115, 135, 155, 175 }; -const uint8 KyraEngine_v1::_itemPosY[] = { +const uint8 KyraEngine_LoK::_itemPosY[] = { 160, 160, 160, 160, 160, 181, 181, 181, 181, 181 }; -void GUI_v1::initStaticResource() { +void GUI_LoK::initStaticResource() { GUI_V1_BUTTON(_scrollUpButton, 0x12, 1, 1, 1, 0x483, 0, 0, 0, 0x18, 0x0f, 0); GUI_V1_BUTTON(_scrollDownButton, 0x13, 1, 1, 1, 0x483, 0, 0, 0, 0x18, 0x0f, 0); @@ -1377,9 +1377,9 @@ void GUI_v1::initStaticResource() { _menu = new Menu[6]; assert(_menu); - Button::Callback quitPlayingFunctor = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::quitPlaying); - Button::Callback loadGameMenuFunctor = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::loadGameMenu); - Button::Callback cancelSubMenuFunctor = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::cancelSubMenu); + Button::Callback quitPlayingFunctor = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::quitPlaying); + Button::Callback loadGameMenuFunctor = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::loadGameMenu); + Button::Callback cancelSubMenuFunctor = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::cancelSubMenu); GUI_V1_MENU(_menu[0], -1, -1, 0x100, 0x8B, 248, 249, 250, 0, 251, -1, 8, 0, 5, -1, -1, -1, -1); GUI_V1_MENU_ITEM(_menu[0].item[0], 1, 0, 0, 0, -1, -1, 0x1E, 0xDC, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0); @@ -1388,16 +1388,16 @@ void GUI_v1::initStaticResource() { GUI_V1_MENU_ITEM(_menu[0].item[3], 1, 0, 0, 0, -1, -1, 0x51, 0xDC, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0); GUI_V1_MENU_ITEM(_menu[0].item[4], 1, 0, 0, 0, -1, 0, 0x6E, 0xDC, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0); _menu[0].item[0].callback = loadGameMenuFunctor; - _menu[0].item[1].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::saveGameMenu); - _menu[0].item[2].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::gameControlsMenu); + _menu[0].item[1].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::saveGameMenu); + _menu[0].item[2].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::gameControlsMenu); _menu[0].item[3].callback = quitPlayingFunctor; - _menu[0].item[4].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::resumeGame); + _menu[0].item[4].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::resumeGame); GUI_V1_MENU(_menu[1], -1, -1, 0x140, 0x38, 248, 249, 250, 0, 254,-1, 8, 0, 2, -1, -1, -1, -1); GUI_V1_MENU_ITEM(_menu[1].item[0], 1, 0, 0, 0, 0x18, 0, 0x1E, 0x48, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0); GUI_V1_MENU_ITEM(_menu[1].item[1], 1, 0, 0, 0, 0xD8, 0, 0x1E, 0x48, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0); - _menu[1].item[0].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::quitConfirmYes); - _menu[1].item[1].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::quitConfirmNo); + _menu[1].item[0].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::quitConfirmYes); + _menu[1].item[1].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::quitConfirmNo); GUI_V1_MENU(_menu[2], -1, -1, 0x120, 0xA0, 248, 249, 250, 0, 251, -1, 8, 0, 6, 132, 22, 132, 124); GUI_V1_MENU_ITEM(_menu[2].item[0], 1, 0, 0, 0, -1, 255, 0x27, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0); @@ -1411,7 +1411,7 @@ void GUI_v1::initStaticResource() { GUI_V1_MENU(_menu[3], -1, -1, 288, 67, 248, 249, 250, 0, 251, -1, 8, 0, 2, -1, -1, -1, -1); GUI_V1_MENU_ITEM(_menu[3].item[0], 1, 0, 0, 0, 24, 0, 44, 85, 15, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0); GUI_V1_MENU_ITEM(_menu[3].item[1], 1, 0, 0, 0, 179, 0, 44, 85, 15, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0); - _menu[3].item[0].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::savegameConfirm); + _menu[3].item[0].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::savegameConfirm); _menu[3].item[1].callback = cancelSubMenuFunctor; GUI_V1_MENU(_menu[4], -1, -1, 0xD0, 0x4C, 248, 249, 250, 0, 251, -1, 8, 0, 2, -1, -1, -1, -1); @@ -1427,14 +1427,14 @@ void GUI_v1::initStaticResource() { GUI_V1_MENU_ITEM(_menu[5].item[3], 1, 0, 0, 0, 0xA5, 0, 0x51, 0x80, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0x10, 0x53, 0, 0); GUI_V1_MENU_ITEM(_menu[5].item[4], 1, 0, 0, 0, 0xA5, 0, 0x62, 0x80, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0x10, 0x65, 0, 0); GUI_V1_MENU_ITEM(_menu[5].item[5], 1, 0, 0, 0, -1, 0, 0x7F, 0x6C, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, -0, 0, 0, 0, 0); - _menu[5].item[0].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::controlsChangeMusic); - _menu[5].item[1].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::controlsChangeSounds); - _menu[5].item[2].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::controlsChangeWalk); - _menu[5].item[4].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::controlsChangeText); - _menu[5].item[5].callback = BUTTON_FUNCTOR(GUI_v1, this, &GUI_v1::controlsApply); + _menu[5].item[0].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeMusic); + _menu[5].item[1].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeSounds); + _menu[5].item[2].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeWalk); + _menu[5].item[4].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsChangeText); + _menu[5].item[5].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::controlsApply); } -void KyraEngine_v1::setupButtonData() { +void KyraEngine_LoK::setupButtonData() { delete[] _buttonData; delete[] _buttonDataListPtr; @@ -1444,9 +1444,9 @@ void KyraEngine_v1::setupButtonData() { assert(_buttonDataListPtr); GUI_V1_BUTTON(_buttonData[1], 0x01, 1, 1, 1, 0x0487, 0, 0x009, 0xA4, 0x36, 0x1E, 0); - _buttonData[1].buttonCallback = BUTTON_FUNCTOR(GUI_v1, _gui, &GUI_v1::buttonMenuCallback); + _buttonData[1].buttonCallback = BUTTON_FUNCTOR(GUI_LoK, _gui, &GUI_LoK::buttonMenuCallback); - Button::Callback inventoryFunctor = BUTTON_FUNCTOR(KyraEngine_v1, this, &KyraEngine_v1::buttonInventoryCallback); + Button::Callback inventoryFunctor = BUTTON_FUNCTOR(KyraEngine_LoK, this, &KyraEngine_LoK::buttonInventoryCallback); for (int i = 2; i <= 10; ++i) _buttonData[i].buttonCallback = inventoryFunctor; _buttonData[0].buttonCallback = inventoryFunctor; @@ -1461,7 +1461,7 @@ void KyraEngine_v1::setupButtonData() { GUI_V1_BUTTON(_buttonData[9], 0x0A, 0, 0, 0, 0x0400, 0, 0x099, 0xB3, 0x13, 0x14, 0); GUI_V1_BUTTON(_buttonData[10], 0x0B, 0, 0, 0, 0x0400, 0, 0x0AD, 0xB3, 0x13, 0x14, 0); - Button::Callback amuletFunctor = BUTTON_FUNCTOR(KyraEngine_v1, this, &KyraEngine_v1::buttonAmuletCallback); + Button::Callback amuletFunctor = BUTTON_FUNCTOR(KyraEngine_LoK, this, &KyraEngine_LoK::buttonAmuletCallback); GUI_V1_BUTTON(_buttonData[11], 0x15, 1, 1, 1, 0x0487, 0, 0x0FD, 0x9C, 0x1A, 0x12, 0); GUI_V1_BUTTON(_buttonData[12], 0x16, 1, 1, 1, 0x0487, 0, 0x0E7, 0xAA, 0x1A, 0x12, 0); GUI_V1_BUTTON(_buttonData[13], 0x17, 1, 1, 1, 0x0487, 0, 0x0FD, 0xB5, 0x1A, 0x12, 0); @@ -1474,29 +1474,29 @@ void KyraEngine_v1::setupButtonData() { _buttonDataListPtr[14] = 0; } -const uint8 KyraEngine_v1::_magicMouseItemStartFrame[] = { +const uint8 KyraEngine_LoK::_magicMouseItemStartFrame[] = { 0xAD, 0xB7, 0xBE, 0x00 }; -const uint8 KyraEngine_v1::_magicMouseItemEndFrame[] = { +const uint8 KyraEngine_LoK::_magicMouseItemEndFrame[] = { 0xB1, 0xB9, 0xC2, 0x00 }; -const uint8 KyraEngine_v1::_magicMouseItemStartFrame2[] = { +const uint8 KyraEngine_LoK::_magicMouseItemStartFrame2[] = { 0xB2, 0xBA, 0xC3, 0x00 }; -const uint8 KyraEngine_v1::_magicMouseItemEndFrame2[] = { +const uint8 KyraEngine_LoK::_magicMouseItemEndFrame2[] = { 0xB6, 0xBD, 0xC8, 0x00 }; -const uint16 KyraEngine_v1::_amuletX[] = { 231, 275, 253, 253 }; -const uint16 KyraEngine_v1::_amuletY[] = { 170, 170, 159, 181 }; +const uint16 KyraEngine_LoK::_amuletX[] = { 231, 275, 253, 253 }; +const uint16 KyraEngine_LoK::_amuletY[] = { 170, 170, 159, 181 }; -const uint16 KyraEngine_v1::_amuletX2[] = { 0x000, 0x0FD, 0x0E7, 0x0FD, 0x113, 0x000 }; -const uint16 KyraEngine_v1::_amuletY2[] = { 0x000, 0x09F, 0x0AA, 0x0B5, 0x0AA, 0x000 }; +const uint16 KyraEngine_LoK::_amuletX2[] = { 0x000, 0x0FD, 0x0E7, 0x0FD, 0x113, 0x000 }; +const uint16 KyraEngine_LoK::_amuletY2[] = { 0x000, 0x09F, 0x0AA, 0x0B5, 0x0AA, 0x000 }; -const int8 KyraEngine_v1::_dosTrackMap[] = { +const int8 KyraEngine_LoK::_dosTrackMap[] = { -1, 0, -1, 1, 0, 3, 0, 2, 0, 4, 1, 2, 1, 3, 1, 4, 1, 92, 1, 6, 1, 7, 2, 2, @@ -1513,7 +1513,7 @@ const int8 KyraEngine_v1::_dosTrackMap[] = { 8, 4, 8, 5, 6, 11, 5, 11 }; -const int KyraEngine_v1::_dosTrackMapSize = ARRAYSIZE(KyraEngine_v1::_dosTrackMap); +const int KyraEngine_LoK::_dosTrackMapSize = ARRAYSIZE(KyraEngine_LoK::_dosTrackMap); // kyra engine v2 static data diff --git a/engines/kyra/text_lok.cpp b/engines/kyra/text_lok.cpp new file mode 100644 index 0000000000..ccca079e32 --- /dev/null +++ b/engines/kyra/text_lok.cpp @@ -0,0 +1,399 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "kyra/kyra_lok.h" +#include "kyra/screen_lok.h" +#include "kyra/text.h" +#include "kyra/animator_lok.h" +#include "kyra/sprites.h" +#include "kyra/timer.h" + +namespace Kyra { + +void KyraEngine_LoK::waitForChatToFinish(int vocFile, int16 chatDuration, const char *chatStr, uint8 charNum) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::waitForChatToFinish(%i, %s, %i)", chatDuration, chatStr, charNum); + bool hasUpdatedNPCs = false; + bool runLoop = true; + bool drawText = textEnabled(); + uint8 currPage; + Common::Event event; + + //while (towns_isEscKeyPressed() ) + //towns_getKey(); + + uint32 timeToEnd = strlen(chatStr) * 8 * _tickLength + _system->getMillis(); + + if (_configVoice == 0 && chatDuration != -1) { + switch (_configTextspeed) { + case 0: + chatDuration *= 2; + break; + case 2: + chatDuration /= 4; + break; + case 3: + chatDuration = -1; + break; + } + } + + if (chatDuration != -1) + chatDuration *= _tickLength; + + if (vocFile != -1) { + snd_voiceWaitForFinish(); + snd_playVoiceFile(vocFile); + } + + _timer->disable(14); + _timer->disable(18); + _timer->disable(19); + + uint32 timeAtStart = _system->getMillis(); + uint32 loopStart; + while (runLoop) { + loopStart = _system->getMillis(); + if (_currentCharacter->sceneId == 210) + if (seq_playEnd()) + break; + + if (_system->getMillis() > timeToEnd && !hasUpdatedNPCs) { + hasUpdatedNPCs = true; + _timer->disable(15); + _currHeadShape = 4; + _animator->animRefreshNPC(0); + _animator->animRefreshNPC(_talkingCharNum); + + if (_charSayUnk2 != -1) { + _animator->sprites()[_charSayUnk2].active = 0; + _sprites->_anims[_charSayUnk2].play = false; + _charSayUnk2 = -1; + } + } + + _timer->update(); + _sprites->updateSceneAnims(); + _animator->restoreAllObjectBackgrounds(); + _animator->preserveAnyChangedBackgrounds(); + _animator->prepDrawAllObjects(); + + if (drawText) { + currPage = _screen->_curPage; + _screen->_curPage = 2; + _text->printCharacterText(chatStr, charNum, _characterList[charNum].x1); + _animator->_updateScreen = true; + _screen->_curPage = currPage; + } + + _animator->copyChangedObjectsForward(0); + updateTextFade(); + + if (((chatDuration < (int16)(_system->getMillis() - timeAtStart)) && chatDuration != -1 && drawText) || (!drawText && !snd_voiceIsPlaying())) + break; + + uint32 nextTime = loopStart + _tickLength; + + while (_system->getMillis() < nextTime) { + while (_eventMan->pollEvent(event)) { + switch (event.type) { + case Common::EVENT_KEYDOWN: + if (event.kbd.keycode == '.') + _skipFlag = true; + break; + case Common::EVENT_QUIT: + quitGame(); + runLoop = false; + break; + case Common::EVENT_LBUTTONDOWN: + runLoop = false; + break; + default: + break; + } + } + + if (nextTime - _system->getMillis() >= 10) { + _system->delayMillis(10); + _system->updateScreen(); + } + } + + if (_skipFlag) + runLoop = false; + } + + if (_skipFlag) + snd_stopVoice(); + + _timer->enable(14); + _timer->enable(15); + _timer->enable(18); + _timer->enable(19); + //clearKyrandiaButtonIO(); +} + +void KyraEngine_LoK::endCharacterChat(int8 charNum, int16 convoInitialized) { + _charSayUnk3 = -1; + + if (charNum > 4 && charNum < 11) { + //TODO: weird _game_inventory stuff here + //warning("STUB: endCharacterChat() for high charnums"); + } + + if (convoInitialized != 0) { + _talkingCharNum = -1; + if (_currentCharacter->currentAnimFrame != 88) + _currentCharacter->currentAnimFrame = 7; + _animator->animRefreshNPC(0); + _animator->updateAllObjectShapes(); + } +} + +void KyraEngine_LoK::restoreChatPartnerAnimFrame(int8 charNum) { + _talkingCharNum = -1; + + if (charNum > 0 && charNum < 5) { + _characterList[charNum].currentAnimFrame = _currentChatPartnerBackupFrame; + _animator->animRefreshNPC(charNum); + } + + if (_currentCharacter->currentAnimFrame != 88) + _currentCharacter->currentAnimFrame = 7; + + _animator->animRefreshNPC(0); + _animator->updateAllObjectShapes(); +} + +void KyraEngine_LoK::backupChatPartnerAnimFrame(int8 charNum) { + _talkingCharNum = 0; + + if (charNum < 5 && charNum > 0) + _currentChatPartnerBackupFrame = _characterList[charNum].currentAnimFrame; + + if (_currentCharacter->currentAnimFrame != 88) { + _currentCharacter->currentAnimFrame = 16; + if (_scaleMode != 0) + _currentCharacter->currentAnimFrame = 7; + } + + _animator->animRefreshNPC(0); + _animator->updateAllObjectShapes(); +} + +int8 KyraEngine_LoK::getChatPartnerNum() { + uint8 sceneTable[] = {0x2, 0x5, 0x2D, 0x7, 0x1B, 0x8, 0x22, 0x9, 0x30, 0x0A}; + int pos = 0; + int partner = -1; + + for (int i = 1; i < 6; i++) { + if (_currentCharacter->sceneId == sceneTable[pos]) { + partner = sceneTable[pos+1]; + break; + } + pos += 2; + } + + for (int i = 1; i < 5; i++) { + if (_characterList[i].sceneId == _currentCharacter->sceneId) { + partner = i; + break; + } + } + return partner; +} + +int KyraEngine_LoK::initCharacterChat(int8 charNum) { + int returnValue = 0; + + if (_talkingCharNum == -1) { + returnValue = 1; + _talkingCharNum = 0; + + if (_currentCharacter->currentAnimFrame != 88) { + _currentCharacter->currentAnimFrame = 16; + if (_scaleMode != 0) + _currentCharacter->currentAnimFrame = 7; + } + + _animator->animRefreshNPC(0); + _animator->updateAllObjectShapes(); + } + + _charSayUnk2 = -1; + _animator->flagAllObjectsForBkgdChange(); + _animator->restoreAllObjectBackgrounds(); + + if (charNum > 4 && charNum < 11) { + // TODO: Fill in weird _game_inventory stuff here + //warning("STUB: initCharacterChat() for high charnums"); + } + + _animator->flagAllObjectsForRefresh(); + _animator->flagAllObjectsForBkgdChange(); + _animator->preserveAnyChangedBackgrounds(); + _charSayUnk3 = charNum; + + return returnValue; +} + +void KyraEngine_LoK::characterSays(int vocFile, const char *chatStr, int8 charNum, int8 chatDuration) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::characterSays('%s', %i, %d)", chatStr, charNum, chatDuration); + uint8 startAnimFrames[] = { 0x10, 0x32, 0x56, 0x0, 0x0, 0x0 }; + + uint16 chatTicks; + int16 convoInitialized; + int8 chatPartnerNum; + + if (_currentCharacter->sceneId == 210) + return; + + convoInitialized = initCharacterChat(charNum); + chatPartnerNum = getChatPartnerNum(); + + if (chatPartnerNum >= 0 && chatPartnerNum < 5) + backupChatPartnerAnimFrame(chatPartnerNum); + + if (charNum < 5) { + _characterList[charNum].currentAnimFrame = startAnimFrames[charNum]; + _charSayUnk3 = charNum; + _talkingCharNum = charNum; + _animator->animRefreshNPC(charNum); + } + + char *processedString = _text->preprocessString(chatStr); + int lineNum = _text->buildMessageSubstrings(processedString); + + int16 yPos = _characterList[charNum].y1; + yPos -= ((_scaleTable[yPos] * _characterList[charNum].height) >> 8); + yPos -= 8; + yPos -= lineNum * 10; + + if (yPos < 11) + yPos = 11; + + if (yPos > 100) + yPos = 100; + + _text->_talkMessageY = yPos; + _text->_talkMessageH = lineNum * 10; + + if (textEnabled()) { + _animator->restoreAllObjectBackgrounds(); + + _screen->copyRegion(12, _text->_talkMessageY, 12, 136, 296, _text->_talkMessageH, 2, 2); + _screen->hideMouse(); + + _text->printCharacterText(processedString, charNum, _characterList[charNum].x1); + _screen->showMouse(); + } + + if (chatDuration == -2) + chatTicks = strlen(processedString) * 9; + else + chatTicks = chatDuration; + + if (!speechEnabled()) + vocFile = -1; + waitForChatToFinish(vocFile, chatTicks, chatStr, charNum); + + if (textEnabled()) { + _animator->restoreAllObjectBackgrounds(); + + _screen->copyRegion(12, 136, 12, _text->_talkMessageY, 296, _text->_talkMessageH, 2, 2); + _animator->preserveAllBackgrounds(); + _animator->prepDrawAllObjects(); + _screen->hideMouse(); + + _screen->copyRegion(12, _text->_talkMessageY, 12, _text->_talkMessageY, 296, _text->_talkMessageH, 2, 0); + _screen->showMouse(); + _animator->flagAllObjectsForRefresh(); + _animator->copyChangedObjectsForward(0); + } + + if (chatPartnerNum != -1 && chatPartnerNum < 5) + restoreChatPartnerAnimFrame(chatPartnerNum); + + endCharacterChat(charNum, convoInitialized); +} + +void KyraEngine_LoK::drawSentenceCommand(const char *sentence, int color) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::drawSentenceCommand('%s', %i)", sentence, color); + _screen->hideMouse(); + _screen->fillRect(8, 143, 311, 152, 12); + + if (_startSentencePalIndex != color || _fadeText != false) { + _currSentenceColor[0] = _screen->_currentPalette[765] = _screen->_currentPalette[color*3]; + _currSentenceColor[1] = _screen->_currentPalette[766] = _screen->_currentPalette[color*3+1]; + _currSentenceColor[2] = _screen->_currentPalette[767] = _screen->_currentPalette[color*3+2]; + + _screen->setScreenPalette(_screen->_currentPalette); + _startSentencePalIndex = 0; + } + + _text->printText(sentence, 8, 143, 0xFF, 12, 0); + _screen->showMouse(); + setTextFadeTimerCountdown(15); + _fadeText = false; +} + +void KyraEngine_LoK::updateSentenceCommand(const char *str1, const char *str2, int color) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::updateSentenceCommand('%s', '%s', %i)", str1, str2, color); + char sentenceCommand[500]; + strncpy(sentenceCommand, str1, 500); + if (str2) + strncat(sentenceCommand, str2, 500 - strlen(sentenceCommand)); + + drawSentenceCommand(sentenceCommand, color); + _screen->updateScreen(); +} + +void KyraEngine_LoK::updateTextFade() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::updateTextFade()"); + if (!_fadeText) + return; + + bool finished = false; + for (int i = 0; i < 3; i++) { + if (_currSentenceColor[i] > 4) + _currSentenceColor[i] -= 4; + else + if (_currSentenceColor[i]) { + _currSentenceColor[i] = 0; + finished = true; + } + } + + _screen->_currentPalette[765] = _currSentenceColor[0]; + _screen->_currentPalette[766] = _currSentenceColor[1]; + _screen->_currentPalette[767] = _currSentenceColor[2]; + _screen->setScreenPalette(_screen->_currentPalette); + + if (finished) { + _fadeText = false; + _startSentencePalIndex = -1; + } +} + +} // end of namespace Kyra diff --git a/engines/kyra/text_v1.cpp b/engines/kyra/text_v1.cpp deleted file mode 100644 index 5534992c6a..0000000000 --- a/engines/kyra/text_v1.cpp +++ /dev/null @@ -1,399 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "kyra/kyra_v1.h" -#include "kyra/screen_v1.h" -#include "kyra/text.h" -#include "kyra/animator_v1.h" -#include "kyra/sprites.h" -#include "kyra/timer.h" - -namespace Kyra { - -void KyraEngine_v1::waitForChatToFinish(int vocFile, int16 chatDuration, const char *chatStr, uint8 charNum) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::waitForChatToFinish(%i, %s, %i)", chatDuration, chatStr, charNum); - bool hasUpdatedNPCs = false; - bool runLoop = true; - bool drawText = textEnabled(); - uint8 currPage; - Common::Event event; - - //while (towns_isEscKeyPressed() ) - //towns_getKey(); - - uint32 timeToEnd = strlen(chatStr) * 8 * _tickLength + _system->getMillis(); - - if (_configVoice == 0 && chatDuration != -1) { - switch (_configTextspeed) { - case 0: - chatDuration *= 2; - break; - case 2: - chatDuration /= 4; - break; - case 3: - chatDuration = -1; - break; - } - } - - if (chatDuration != -1) - chatDuration *= _tickLength; - - if (vocFile != -1) { - snd_voiceWaitForFinish(); - snd_playVoiceFile(vocFile); - } - - _timer->disable(14); - _timer->disable(18); - _timer->disable(19); - - uint32 timeAtStart = _system->getMillis(); - uint32 loopStart; - while (runLoop) { - loopStart = _system->getMillis(); - if (_currentCharacter->sceneId == 210) - if (seq_playEnd()) - break; - - if (_system->getMillis() > timeToEnd && !hasUpdatedNPCs) { - hasUpdatedNPCs = true; - _timer->disable(15); - _currHeadShape = 4; - _animator->animRefreshNPC(0); - _animator->animRefreshNPC(_talkingCharNum); - - if (_charSayUnk2 != -1) { - _animator->sprites()[_charSayUnk2].active = 0; - _sprites->_anims[_charSayUnk2].play = false; - _charSayUnk2 = -1; - } - } - - _timer->update(); - _sprites->updateSceneAnims(); - _animator->restoreAllObjectBackgrounds(); - _animator->preserveAnyChangedBackgrounds(); - _animator->prepDrawAllObjects(); - - if (drawText) { - currPage = _screen->_curPage; - _screen->_curPage = 2; - _text->printCharacterText(chatStr, charNum, _characterList[charNum].x1); - _animator->_updateScreen = true; - _screen->_curPage = currPage; - } - - _animator->copyChangedObjectsForward(0); - updateTextFade(); - - if (((chatDuration < (int16)(_system->getMillis() - timeAtStart)) && chatDuration != -1 && drawText) || (!drawText && !snd_voiceIsPlaying())) - break; - - uint32 nextTime = loopStart + _tickLength; - - while (_system->getMillis() < nextTime) { - while (_eventMan->pollEvent(event)) { - switch (event.type) { - case Common::EVENT_KEYDOWN: - if (event.kbd.keycode == '.') - _skipFlag = true; - break; - case Common::EVENT_QUIT: - quitGame(); - runLoop = false; - break; - case Common::EVENT_LBUTTONDOWN: - runLoop = false; - break; - default: - break; - } - } - - if (nextTime - _system->getMillis() >= 10) { - _system->delayMillis(10); - _system->updateScreen(); - } - } - - if (_skipFlag) - runLoop = false; - } - - if (_skipFlag) - snd_stopVoice(); - - _timer->enable(14); - _timer->enable(15); - _timer->enable(18); - _timer->enable(19); - //clearKyrandiaButtonIO(); -} - -void KyraEngine_v1::endCharacterChat(int8 charNum, int16 convoInitialized) { - _charSayUnk3 = -1; - - if (charNum > 4 && charNum < 11) { - //TODO: weird _game_inventory stuff here - //warning("STUB: endCharacterChat() for high charnums"); - } - - if (convoInitialized != 0) { - _talkingCharNum = -1; - if (_currentCharacter->currentAnimFrame != 88) - _currentCharacter->currentAnimFrame = 7; - _animator->animRefreshNPC(0); - _animator->updateAllObjectShapes(); - } -} - -void KyraEngine_v1::restoreChatPartnerAnimFrame(int8 charNum) { - _talkingCharNum = -1; - - if (charNum > 0 && charNum < 5) { - _characterList[charNum].currentAnimFrame = _currentChatPartnerBackupFrame; - _animator->animRefreshNPC(charNum); - } - - if (_currentCharacter->currentAnimFrame != 88) - _currentCharacter->currentAnimFrame = 7; - - _animator->animRefreshNPC(0); - _animator->updateAllObjectShapes(); -} - -void KyraEngine_v1::backupChatPartnerAnimFrame(int8 charNum) { - _talkingCharNum = 0; - - if (charNum < 5 && charNum > 0) - _currentChatPartnerBackupFrame = _characterList[charNum].currentAnimFrame; - - if (_currentCharacter->currentAnimFrame != 88) { - _currentCharacter->currentAnimFrame = 16; - if (_scaleMode != 0) - _currentCharacter->currentAnimFrame = 7; - } - - _animator->animRefreshNPC(0); - _animator->updateAllObjectShapes(); -} - -int8 KyraEngine_v1::getChatPartnerNum() { - uint8 sceneTable[] = {0x2, 0x5, 0x2D, 0x7, 0x1B, 0x8, 0x22, 0x9, 0x30, 0x0A}; - int pos = 0; - int partner = -1; - - for (int i = 1; i < 6; i++) { - if (_currentCharacter->sceneId == sceneTable[pos]) { - partner = sceneTable[pos+1]; - break; - } - pos += 2; - } - - for (int i = 1; i < 5; i++) { - if (_characterList[i].sceneId == _currentCharacter->sceneId) { - partner = i; - break; - } - } - return partner; -} - -int KyraEngine_v1::initCharacterChat(int8 charNum) { - int returnValue = 0; - - if (_talkingCharNum == -1) { - returnValue = 1; - _talkingCharNum = 0; - - if (_currentCharacter->currentAnimFrame != 88) { - _currentCharacter->currentAnimFrame = 16; - if (_scaleMode != 0) - _currentCharacter->currentAnimFrame = 7; - } - - _animator->animRefreshNPC(0); - _animator->updateAllObjectShapes(); - } - - _charSayUnk2 = -1; - _animator->flagAllObjectsForBkgdChange(); - _animator->restoreAllObjectBackgrounds(); - - if (charNum > 4 && charNum < 11) { - // TODO: Fill in weird _game_inventory stuff here - //warning("STUB: initCharacterChat() for high charnums"); - } - - _animator->flagAllObjectsForRefresh(); - _animator->flagAllObjectsForBkgdChange(); - _animator->preserveAnyChangedBackgrounds(); - _charSayUnk3 = charNum; - - return returnValue; -} - -void KyraEngine_v1::characterSays(int vocFile, const char *chatStr, int8 charNum, int8 chatDuration) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::characterSays('%s', %i, %d)", chatStr, charNum, chatDuration); - uint8 startAnimFrames[] = { 0x10, 0x32, 0x56, 0x0, 0x0, 0x0 }; - - uint16 chatTicks; - int16 convoInitialized; - int8 chatPartnerNum; - - if (_currentCharacter->sceneId == 210) - return; - - convoInitialized = initCharacterChat(charNum); - chatPartnerNum = getChatPartnerNum(); - - if (chatPartnerNum >= 0 && chatPartnerNum < 5) - backupChatPartnerAnimFrame(chatPartnerNum); - - if (charNum < 5) { - _characterList[charNum].currentAnimFrame = startAnimFrames[charNum]; - _charSayUnk3 = charNum; - _talkingCharNum = charNum; - _animator->animRefreshNPC(charNum); - } - - char *processedString = _text->preprocessString(chatStr); - int lineNum = _text->buildMessageSubstrings(processedString); - - int16 yPos = _characterList[charNum].y1; - yPos -= ((_scaleTable[yPos] * _characterList[charNum].height) >> 8); - yPos -= 8; - yPos -= lineNum * 10; - - if (yPos < 11) - yPos = 11; - - if (yPos > 100) - yPos = 100; - - _text->_talkMessageY = yPos; - _text->_talkMessageH = lineNum * 10; - - if (textEnabled()) { - _animator->restoreAllObjectBackgrounds(); - - _screen->copyRegion(12, _text->_talkMessageY, 12, 136, 296, _text->_talkMessageH, 2, 2); - _screen->hideMouse(); - - _text->printCharacterText(processedString, charNum, _characterList[charNum].x1); - _screen->showMouse(); - } - - if (chatDuration == -2) - chatTicks = strlen(processedString) * 9; - else - chatTicks = chatDuration; - - if (!speechEnabled()) - vocFile = -1; - waitForChatToFinish(vocFile, chatTicks, chatStr, charNum); - - if (textEnabled()) { - _animator->restoreAllObjectBackgrounds(); - - _screen->copyRegion(12, 136, 12, _text->_talkMessageY, 296, _text->_talkMessageH, 2, 2); - _animator->preserveAllBackgrounds(); - _animator->prepDrawAllObjects(); - _screen->hideMouse(); - - _screen->copyRegion(12, _text->_talkMessageY, 12, _text->_talkMessageY, 296, _text->_talkMessageH, 2, 0); - _screen->showMouse(); - _animator->flagAllObjectsForRefresh(); - _animator->copyChangedObjectsForward(0); - } - - if (chatPartnerNum != -1 && chatPartnerNum < 5) - restoreChatPartnerAnimFrame(chatPartnerNum); - - endCharacterChat(charNum, convoInitialized); -} - -void KyraEngine_v1::drawSentenceCommand(const char *sentence, int color) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::drawSentenceCommand('%s', %i)", sentence, color); - _screen->hideMouse(); - _screen->fillRect(8, 143, 311, 152, 12); - - if (_startSentencePalIndex != color || _fadeText != false) { - _currSentenceColor[0] = _screen->_currentPalette[765] = _screen->_currentPalette[color*3]; - _currSentenceColor[1] = _screen->_currentPalette[766] = _screen->_currentPalette[color*3+1]; - _currSentenceColor[2] = _screen->_currentPalette[767] = _screen->_currentPalette[color*3+2]; - - _screen->setScreenPalette(_screen->_currentPalette); - _startSentencePalIndex = 0; - } - - _text->printText(sentence, 8, 143, 0xFF, 12, 0); - _screen->showMouse(); - setTextFadeTimerCountdown(15); - _fadeText = false; -} - -void KyraEngine_v1::updateSentenceCommand(const char *str1, const char *str2, int color) { - debugC(9, kDebugLevelMain, "KyraEngine_v1::updateSentenceCommand('%s', '%s', %i)", str1, str2, color); - char sentenceCommand[500]; - strncpy(sentenceCommand, str1, 500); - if (str2) - strncat(sentenceCommand, str2, 500 - strlen(sentenceCommand)); - - drawSentenceCommand(sentenceCommand, color); - _screen->updateScreen(); -} - -void KyraEngine_v1::updateTextFade() { - debugC(9, kDebugLevelMain, "KyraEngine_v1::updateTextFade()"); - if (!_fadeText) - return; - - bool finished = false; - for (int i = 0; i < 3; i++) { - if (_currSentenceColor[i] > 4) - _currSentenceColor[i] -= 4; - else - if (_currSentenceColor[i]) { - _currSentenceColor[i] = 0; - finished = true; - } - } - - _screen->_currentPalette[765] = _currSentenceColor[0]; - _screen->_currentPalette[766] = _currSentenceColor[1]; - _screen->_currentPalette[767] = _currSentenceColor[2]; - _screen->setScreenPalette(_screen->_currentPalette); - - if (finished) { - _fadeText = false; - _startSentencePalIndex = -1; - } -} - -} // end of namespace Kyra diff --git a/engines/kyra/timer_lok.cpp b/engines/kyra/timer_lok.cpp new file mode 100644 index 0000000000..91081a36b3 --- /dev/null +++ b/engines/kyra/timer_lok.cpp @@ -0,0 +1,180 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "kyra/kyra.h" +#include "kyra/kyra_lok.h" +#include "kyra/screen.h" +#include "kyra/animator_lok.h" +#include "kyra/timer.h" + +#include "common/system.h" + +namespace Kyra { + +#define TimerV1(x) new Common::Functor1Mem(this, &KyraEngine_LoK::x) + +void KyraEngine_LoK::setupTimers() { + debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::setupTimers()"); + + for (int i = 0; i <= 4; ++i) + _timer->addTimer(i, 0, -1, 1); + + _timer->addTimer(5, 0, 5, 1); + _timer->addTimer(6, 0, 7, 1); + _timer->addTimer(7, 0, 8, 1); + _timer->addTimer(8, 0, 9, 1); + _timer->addTimer(9, 0, 7, 1); + + for (int i = 10; i <= 13; ++i) + _timer->addTimer(i, 0, 420, 1); + + _timer->addTimer(14, TimerV1(timerCheckAnimFlag2), 600, 1); + _timer->addTimer(15, TimerV1(timerUpdateHeadAnims), 11, 1); + _timer->addTimer(16, TimerV1(timerSetFlags1), 7200, 1); + _timer->addTimer(17, 0 /*sub_15120*/, 7200, 1); + _timer->addTimer(18, TimerV1(timerCheckAnimFlag1), 600, 1); + _timer->addTimer(19, TimerV1(timerRedrawAmulet), 600, 1); + + _timer->addTimer(20, 0, 7200, 1); + _timer->addTimer(21, 0/*sub_1517C*/, 18000, 1); + _timer->addTimer(22, 0, 7200, 1); + + for (int i = 23; i <= 27; ++i) + _timer->addTimer(i, 0, 10800, 1); + + _timer->addTimer(28, 0, 21600, 1); + _timer->addTimer(29, 0, 7200, 1); + _timer->addTimer(30, 0, 10800, 1); + + _timer->addTimer(31, TimerV1(timerFadeText), -1, 1); + _timer->addTimer(32, TimerV1(updateAnimFlag1), 9, 1); + _timer->addTimer(33, TimerV1(updateAnimFlag2), 3, 1); +} + +void KyraEngine_LoK::timerUpdateHeadAnims(int timerNum) { + debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerUpdateHeadAnims(%i)", timerNum); + static int8 currentFrame = 0; + static const int8 frameTable[] = {4, 5, 4, 5, 4, 5, 0, 1, 4, 5, + 4, 4, 6, 4, 8, 1, 9, 4, -1}; + + if (_talkingCharNum < 0) + return; + + _currHeadShape = frameTable[currentFrame]; + currentFrame++; + + if (frameTable[currentFrame] == -1) + currentFrame = 0; + + _animator->animRefreshNPC(0); + _animator->animRefreshNPC(_talkingCharNum); +} + +void KyraEngine_LoK::timerSetFlags1(int timerNum) { + debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerSetFlags(%i)", timerNum); + if (_currentCharacter->sceneId == 0x1C) + return; + + int rndNr = _rnd.getRandomNumberRng(0, 3); + + for (int i = 0; i < 4; i++) { + if (!queryGameFlag(rndNr + 17)) { + setGameFlag(rndNr + 17); + break; + } else { + rndNr++; + if (rndNr > 3) + rndNr = 0; + } + } +} + +void KyraEngine_LoK::timerFadeText(int timerNum) { + debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerFadeText(%i)", timerNum); + _fadeText = true; +} + +void KyraEngine_LoK::updateAnimFlag1(int timerNum) { + debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::updateAnimFlag1(%d)", timerNum); + if (_brandonStatusBit & 2) { + _brandonStatusBit0x02Flag = 1; + } +} + +void KyraEngine_LoK::updateAnimFlag2(int timerNum) { + debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::updateAnimFlag2(%d)", timerNum); + if (_brandonStatusBit & 0x20) { + _brandonStatusBit0x20Flag = 1; + } +} + +void KyraEngine_LoK::setTextFadeTimerCountdown(int16 countdown) { + debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::setTextFadeTimerCountdown(%i)", countdown); + if (countdown == -1) + countdown = 32000; + + _timer->setCountdown(31, countdown*60); +} + +void KyraEngine_LoK::timerSetFlags2(int timerNum) { + debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerSetFlags2(%i)", timerNum); + if (!((uint32*)(_flagsTable+0x2D))[timerNum]) + ((uint32*)(_flagsTable+0x2D))[timerNum] = 1; +} + +void KyraEngine_LoK::timerCheckAnimFlag1(int timerNum) { + debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerCheckAnimFlag1(%i)", timerNum); + if (_brandonStatusBit & 0x20) { + checkAmuletAnimFlags(); + _timer->setCountdown(18, -1); + } +} + +void KyraEngine_LoK::timerCheckAnimFlag2(int timerNum) { + debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerCheckAnimFlag2(%i)", timerNum); + if (_brandonStatusBit & 0x2) { + checkAmuletAnimFlags(); + _timer->setCountdown(14, -1); + } +} + +void KyraEngine_LoK::timerRedrawAmulet(int timerNum) { + debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::timerRedrawAmulet(%i)", timerNum); + if (queryGameFlag(0xF1)) { + drawAmulet(); + _timer->setCountdown(19, -1); + } +} + +void KyraEngine_LoK::setWalkspeed(uint8 newSpeed) { + debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_LoK::setWalkspeed(%i)", newSpeed); + static const uint8 speeds[] = { 11, 9, 6, 5, 3 }; + + assert(newSpeed < ARRAYSIZE(speeds)); + _timer->setDelay(5, speeds[newSpeed]); +} + +} // end of namespace Kyra + diff --git a/engines/kyra/timer_v1.cpp b/engines/kyra/timer_v1.cpp deleted file mode 100644 index f5e7c52ba1..0000000000 --- a/engines/kyra/timer_v1.cpp +++ /dev/null @@ -1,180 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "kyra/kyra.h" -#include "kyra/kyra_v1.h" -#include "kyra/screen.h" -#include "kyra/animator_v1.h" -#include "kyra/timer.h" - -#include "common/system.h" - -namespace Kyra { - -#define TimerV1(x) new Common::Functor1Mem(this, &KyraEngine_v1::x) - -void KyraEngine_v1::setupTimers() { - debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::setupTimers()"); - - for (int i = 0; i <= 4; ++i) - _timer->addTimer(i, 0, -1, 1); - - _timer->addTimer(5, 0, 5, 1); - _timer->addTimer(6, 0, 7, 1); - _timer->addTimer(7, 0, 8, 1); - _timer->addTimer(8, 0, 9, 1); - _timer->addTimer(9, 0, 7, 1); - - for (int i = 10; i <= 13; ++i) - _timer->addTimer(i, 0, 420, 1); - - _timer->addTimer(14, TimerV1(timerCheckAnimFlag2), 600, 1); - _timer->addTimer(15, TimerV1(timerUpdateHeadAnims), 11, 1); - _timer->addTimer(16, TimerV1(timerSetFlags1), 7200, 1); - _timer->addTimer(17, 0 /*sub_15120*/, 7200, 1); - _timer->addTimer(18, TimerV1(timerCheckAnimFlag1), 600, 1); - _timer->addTimer(19, TimerV1(timerRedrawAmulet), 600, 1); - - _timer->addTimer(20, 0, 7200, 1); - _timer->addTimer(21, 0/*sub_1517C*/, 18000, 1); - _timer->addTimer(22, 0, 7200, 1); - - for (int i = 23; i <= 27; ++i) - _timer->addTimer(i, 0, 10800, 1); - - _timer->addTimer(28, 0, 21600, 1); - _timer->addTimer(29, 0, 7200, 1); - _timer->addTimer(30, 0, 10800, 1); - - _timer->addTimer(31, TimerV1(timerFadeText), -1, 1); - _timer->addTimer(32, TimerV1(updateAnimFlag1), 9, 1); - _timer->addTimer(33, TimerV1(updateAnimFlag2), 3, 1); -} - -void KyraEngine_v1::timerUpdateHeadAnims(int timerNum) { - debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::timerUpdateHeadAnims(%i)", timerNum); - static int8 currentFrame = 0; - static const int8 frameTable[] = {4, 5, 4, 5, 4, 5, 0, 1, 4, 5, - 4, 4, 6, 4, 8, 1, 9, 4, -1}; - - if (_talkingCharNum < 0) - return; - - _currHeadShape = frameTable[currentFrame]; - currentFrame++; - - if (frameTable[currentFrame] == -1) - currentFrame = 0; - - _animator->animRefreshNPC(0); - _animator->animRefreshNPC(_talkingCharNum); -} - -void KyraEngine_v1::timerSetFlags1(int timerNum) { - debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::timerSetFlags(%i)", timerNum); - if (_currentCharacter->sceneId == 0x1C) - return; - - int rndNr = _rnd.getRandomNumberRng(0, 3); - - for (int i = 0; i < 4; i++) { - if (!queryGameFlag(rndNr + 17)) { - setGameFlag(rndNr + 17); - break; - } else { - rndNr++; - if (rndNr > 3) - rndNr = 0; - } - } -} - -void KyraEngine_v1::timerFadeText(int timerNum) { - debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::timerFadeText(%i)", timerNum); - _fadeText = true; -} - -void KyraEngine_v1::updateAnimFlag1(int timerNum) { - debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::updateAnimFlag1(%d)", timerNum); - if (_brandonStatusBit & 2) { - _brandonStatusBit0x02Flag = 1; - } -} - -void KyraEngine_v1::updateAnimFlag2(int timerNum) { - debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::updateAnimFlag2(%d)", timerNum); - if (_brandonStatusBit & 0x20) { - _brandonStatusBit0x20Flag = 1; - } -} - -void KyraEngine_v1::setTextFadeTimerCountdown(int16 countdown) { - debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::setTextFadeTimerCountdown(%i)", countdown); - if (countdown == -1) - countdown = 32000; - - _timer->setCountdown(31, countdown*60); -} - -void KyraEngine_v1::timerSetFlags2(int timerNum) { - debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::timerSetFlags2(%i)", timerNum); - if (!((uint32*)(_flagsTable+0x2D))[timerNum]) - ((uint32*)(_flagsTable+0x2D))[timerNum] = 1; -} - -void KyraEngine_v1::timerCheckAnimFlag1(int timerNum) { - debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::timerCheckAnimFlag1(%i)", timerNum); - if (_brandonStatusBit & 0x20) { - checkAmuletAnimFlags(); - _timer->setCountdown(18, -1); - } -} - -void KyraEngine_v1::timerCheckAnimFlag2(int timerNum) { - debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::timerCheckAnimFlag2(%i)", timerNum); - if (_brandonStatusBit & 0x2) { - checkAmuletAnimFlags(); - _timer->setCountdown(14, -1); - } -} - -void KyraEngine_v1::timerRedrawAmulet(int timerNum) { - debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::timerRedrawAmulet(%i)", timerNum); - if (queryGameFlag(0xF1)) { - drawAmulet(); - _timer->setCountdown(19, -1); - } -} - -void KyraEngine_v1::setWalkspeed(uint8 newSpeed) { - debugC(9, kDebugLevelMain | kDebugLevelTimer, "KyraEngine_v1::setWalkspeed(%i)", newSpeed); - static const uint8 speeds[] = { 11, 9, 6, 5, 3 }; - - assert(newSpeed < ARRAYSIZE(speeds)); - _timer->setDelay(5, speeds[newSpeed]); -} - -} // end of namespace Kyra - diff --git a/engines/kyra/wsamovie.cpp b/engines/kyra/wsamovie.cpp index 5190f24ad6..42159478dd 100644 --- a/engines/kyra/wsamovie.cpp +++ b/engines/kyra/wsamovie.cpp @@ -35,11 +35,11 @@ #include "kyra/resource.h" namespace Kyra { -WSAMovieV1::WSAMovieV1(KyraEngine *vm) : Movie(vm) {} -WSAMovieV1::~WSAMovieV1() { close(); } +WSAMovie_v1::WSAMovie_v1(KyraEngine *vm) : Movie(vm) {} +WSAMovie_v1::~WSAMovie_v1() { close(); } -int WSAMovieV1::open(const char *filename, int offscreenDecode, uint8 *palBuf) { - debugC(9, kDebugLevelMovie, "WSAMovieV1::open('%s', %d, %p)", filename, offscreenDecode, (const void *)palBuf); +int WSAMovie_v1::open(const char *filename, int offscreenDecode, uint8 *palBuf) { + debugC(9, kDebugLevelMovie, "WSAMovie_v1::open('%s', %d, %p)", filename, offscreenDecode, (const void *)palBuf); close(); uint32 flags = 0; @@ -123,8 +123,8 @@ int WSAMovieV1::open(const char *filename, int offscreenDecode, uint8 *palBuf) { return _numFrames; } -void WSAMovieV1::close() { - debugC(9, kDebugLevelMovie, "WSAMovieV1::close()"); +void WSAMovie_v1::close() { + debugC(9, kDebugLevelMovie, "WSAMovie_v1::close()"); if (_opened) { delete[] _deltaBuffer; delete[] _offscreenBuffer; @@ -134,8 +134,8 @@ void WSAMovieV1::close() { } } -void WSAMovieV1::displayFrame(int frameNum, ...) { - debugC(9, kDebugLevelMovie, "WSAMovieV1::displayFrame(%d, ...)", frameNum); +void WSAMovie_v1::displayFrame(int frameNum, ...) { + debugC(9, kDebugLevelMovie, "WSAMovie_v1::displayFrame(%d, ...)", frameNum); if (frameNum >= _numFrames || !_opened) return; @@ -198,8 +198,8 @@ void WSAMovieV1::displayFrame(int frameNum, ...) { _vm->screen()->copyBlockToPage(_drawPage, _x, _y, _width, _height, _offscreenBuffer); } -void WSAMovieV1::processFrame(int frameNum, uint8 *dst) { - debugC(9, kDebugLevelMovie, "WSAMovieV1::processFrame(%d, %p)", frameNum, (const void *)dst); +void WSAMovie_v1::processFrame(int frameNum, uint8 *dst) { + debugC(9, kDebugLevelMovie, "WSAMovie_v1::processFrame(%d, %p)", frameNum, (const void *)dst); if (!_opened) return; assert(frameNum <= _numFrames); @@ -213,11 +213,11 @@ void WSAMovieV1::processFrame(int frameNum, uint8 *dst) { #pragma mark - -WSAMovieAmiga::WSAMovieAmiga(KyraEngine *vm) : WSAMovieV1(vm), _buffer(0) {} +WSAMovieAmiga::WSAMovieAmiga(KyraEngine *vm) : WSAMovie_v1(vm), _buffer(0) {} int WSAMovieAmiga::open(const char *filename, int offscreenDecode, uint8 *palBuf) { debugC(9, kDebugLevelMovie, "WSAMovieAmiga::open('%s', %d, %p)", filename, offscreenDecode, (const void *)palBuf); - int res = WSAMovieV1::open(filename, offscreenDecode, palBuf); + int res = WSAMovie_v1::open(filename, offscreenDecode, palBuf); if (!res) return 0; @@ -233,7 +233,7 @@ void WSAMovieAmiga::close() { delete[] _buffer; _buffer = 0; } - WSAMovieV1::close(); + WSAMovie_v1::close(); } void WSAMovieAmiga::displayFrame(int frameNum, ...) { @@ -342,10 +342,10 @@ void WSAMovieAmiga::processFrame(int frameNum, uint8 *dst) { #pragma mark - -WSAMovieV2::WSAMovieV2(KyraEngine *vm, Screen_v2 *screen) : WSAMovieV1(vm), _screen(screen), _xAdd(0), _yAdd(0) {} +WSAMovie_v2::WSAMovie_v2(KyraEngine *vm, Screen_v2 *screen) : WSAMovie_v1(vm), _screen(screen), _xAdd(0), _yAdd(0) {} -int WSAMovieV2::open(const char *filename, int unk1, uint8 *palBuf) { - debugC(9, kDebugLevelMovie, "WSAMovieV2::open('%s', %d, %p)", filename, unk1, (const void *)palBuf); +int WSAMovie_v2::open(const char *filename, int unk1, uint8 *palBuf) { + debugC(9, kDebugLevelMovie, "WSAMovie_v2::open('%s', %d, %p)", filename, unk1, (const void *)palBuf); close(); uint32 flags = 0; @@ -429,8 +429,8 @@ int WSAMovieV2::open(const char *filename, int unk1, uint8 *palBuf) { return _numFrames; } -void WSAMovieV2::displayFrame(int frameNum, ...) { - debugC(9, kDebugLevelMovie, "WSAMovieV2::displayFrame(%d, ...)", frameNum); +void WSAMovie_v2::displayFrame(int frameNum, ...) { + debugC(9, kDebugLevelMovie, "WSAMovie_v2::displayFrame(%d, ...)", frameNum); if (frameNum >= _numFrames || frameNum < 0 || !_opened) return; diff --git a/engines/kyra/wsamovie.h b/engines/kyra/wsamovie.h index d1f3465c07..cc3a188eea 100644 --- a/engines/kyra/wsamovie.h +++ b/engines/kyra/wsamovie.h @@ -60,10 +60,10 @@ protected: int _drawPage; }; -class WSAMovieV1 : public Movie { +class WSAMovie_v1 : public Movie { public: - WSAMovieV1(KyraEngine *vm); - virtual ~WSAMovieV1(); + WSAMovie_v1(KyraEngine *vm); + virtual ~WSAMovie_v1(); virtual int open(const char *filename, int offscreen, uint8 *palette); virtual void close(); @@ -94,7 +94,7 @@ protected: uint8 *_frameData; }; -class WSAMovieAmiga : public WSAMovieV1 { +class WSAMovieAmiga : public WSAMovie_v1 { public: WSAMovieAmiga(KyraEngine *vm); int open(const char *filename, int offscreen, uint8 *palette); @@ -107,9 +107,9 @@ private: uint8 *_buffer; }; -class WSAMovieV2 : public WSAMovieV1 { +class WSAMovie_v2 : public WSAMovie_v1 { public: - WSAMovieV2(KyraEngine *vm, Screen_v2 *scren); + WSAMovie_v2(KyraEngine *vm, Screen_v2 *scren); int open(const char *filename, int unk1, uint8 *palette); -- cgit v1.2.3 From ea301f9c7bbf02e0fc67fbc1447aac5a489db70b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 11 May 2008 22:45:12 +0000 Subject: Updated kyra MSVC project files svn-id: r32043 --- dists/msvc7/kyra.vcproj | 66 +++++++++++++++++++++++----------------------- dists/msvc71/kyra.vcproj | 66 +++++++++++++++++++++++----------------------- dists/msvc8/kyra.vcproj | 68 ++++++++++++++++++++++++------------------------ dists/msvc9/kyra.vcproj | 68 ++++++++++++++++++++++++------------------------ 4 files changed, 134 insertions(+), 134 deletions(-) diff --git a/dists/msvc7/kyra.vcproj b/dists/msvc7/kyra.vcproj index decc992b81..fba2a4e4f8 100644 --- a/dists/msvc7/kyra.vcproj +++ b/dists/msvc7/kyra.vcproj @@ -100,13 +100,13 @@ RelativePath="..\..\engines\kyra\animator_hof.cpp"> + RelativePath="..\..\engines\kyra\animator_lok.cpp"> + RelativePath="..\..\engines\kyra\animator_lok.h"> + RelativePath="..\..\engines\kyra\animator_mr.cpp"> @@ -133,16 +133,16 @@ RelativePath="..\..\engines\kyra\gui_hof.h"> + RelativePath="..\..\engines\kyra\gui_lok.cpp"> + RelativePath="..\..\engines\kyra\gui_lok.h"> + RelativePath="..\..\engines\kyra\gui_mr.cpp"> + RelativePath="..\..\engines\kyra\gui_mr.h"> @@ -154,10 +154,10 @@ RelativePath="..\..\engines\kyra\items_hof.cpp"> + RelativePath="..\..\engines\kyra\items_lok.cpp"> + RelativePath="..\..\engines\kyra\items_mr.cpp"> @@ -175,16 +175,16 @@ RelativePath="..\..\engines\kyra\kyra_hof.h"> + RelativePath="..\..\engines\kyra\kyra_lok.cpp"> + RelativePath="..\..\engines\kyra\kyra_lok.h"> + RelativePath="..\..\engines\kyra\kyra_mr.cpp"> + RelativePath="..\..\engines\kyra\kyra_mr.h"> @@ -205,10 +205,10 @@ RelativePath="..\..\engines\kyra\saveload_hof.cpp"> + RelativePath="..\..\engines\kyra\saveload_lok.cpp"> + RelativePath="..\..\engines\kyra\saveload_mr.cpp"> @@ -217,10 +217,10 @@ RelativePath="..\..\engines\kyra\scene_hof.cpp"> + RelativePath="..\..\engines\kyra\scene_lok.cpp"> + RelativePath="..\..\engines\kyra\scene_mr.cpp"> @@ -238,16 +238,16 @@ RelativePath="..\..\engines\kyra\screen_hof.h"> + RelativePath="..\..\engines\kyra\screen_lok.cpp"> + RelativePath="..\..\engines\kyra\screen_lok.h"> + RelativePath="..\..\engines\kyra\screen_mr.cpp"> + RelativePath="..\..\engines\kyra\screen_mr.h"> @@ -264,6 +264,9 @@ + + @@ -273,9 +276,6 @@ - - @@ -289,10 +289,10 @@ RelativePath="..\..\engines\kyra\sequences_hof.cpp"> + RelativePath="..\..\engines\kyra\sequences_lok.cpp"> + RelativePath="..\..\engines\kyra\sequences_mr.cpp"> @@ -310,10 +310,10 @@ RelativePath="..\..\engines\kyra\sound_digital.cpp"> + RelativePath="..\..\engines\kyra\sound_lok.cpp"> + RelativePath="..\..\engines\kyra\sound_towns.cpp"> @@ -337,13 +337,13 @@ RelativePath="..\..\engines\kyra\text_hof.h"> + RelativePath="..\..\engines\kyra\text_lok.cpp"> + RelativePath="..\..\engines\kyra\text_mr.cpp"> + RelativePath="..\..\engines\kyra\text_mr.h"> @@ -355,10 +355,10 @@ RelativePath="..\..\engines\kyra\timer_hof.cpp"> + RelativePath="..\..\engines\kyra\timer_lok.cpp"> + RelativePath="..\..\engines\kyra\timer_mr.cpp"> diff --git a/dists/msvc71/kyra.vcproj b/dists/msvc71/kyra.vcproj index 3992223f50..4c9cdb855b 100644 --- a/dists/msvc71/kyra.vcproj +++ b/dists/msvc71/kyra.vcproj @@ -114,13 +114,13 @@ RelativePath="..\..\engines\kyra\animator_hof.cpp"> + RelativePath="..\..\engines\kyra\animator_lok.cpp"> + RelativePath="..\..\engines\kyra\animator_lok.h"> + RelativePath="..\..\engines\kyra\animator_mr.cpp"> @@ -147,16 +147,16 @@ RelativePath="..\..\engines\kyra\gui_hof.h"> + RelativePath="..\..\engines\kyra\gui_lok.cpp"> + RelativePath="..\..\engines\kyra\gui_lok.h"> + RelativePath="..\..\engines\kyra\gui_mr.cpp"> + RelativePath="..\..\engines\kyra\gui_mr.h"> @@ -168,10 +168,10 @@ RelativePath="..\..\engines\kyra\items_hof.cpp"> + RelativePath="..\..\engines\kyra\items_lok.cpp"> + RelativePath="..\..\engines\kyra\items_mr.cpp"> @@ -189,16 +189,16 @@ RelativePath="..\..\engines\kyra\kyra_hof.h"> + RelativePath="..\..\engines\kyra\kyra_lok.cpp"> + RelativePath="..\..\engines\kyra\kyra_lok.h"> + RelativePath="..\..\engines\kyra\kyra_mr.cpp"> + RelativePath="..\..\engines\kyra\kyra_mr.h"> @@ -219,10 +219,10 @@ RelativePath="..\..\engines\kyra\saveload_hof.cpp"> + RelativePath="..\..\engines\kyra\saveload_lok.cpp"> + RelativePath="..\..\engines\kyra\saveload_mr.cpp"> @@ -231,10 +231,10 @@ RelativePath="..\..\engines\kyra\scene_hof.cpp"> + RelativePath="..\..\engines\kyra\scene_lok.cpp"> + RelativePath="..\..\engines\kyra\scene_mr.cpp"> @@ -252,16 +252,16 @@ RelativePath="..\..\engines\kyra\screen_hof.h"> + RelativePath="..\..\engines\kyra\screen_lok.cpp"> + RelativePath="..\..\engines\kyra\screen_lok.h"> + RelativePath="..\..\engines\kyra\screen_mr.cpp"> + RelativePath="..\..\engines\kyra\screen_mr.h"> @@ -278,6 +278,9 @@ + + @@ -287,9 +290,6 @@ - - @@ -303,10 +303,10 @@ RelativePath="..\..\engines\kyra\sequences_hof.cpp"> + RelativePath="..\..\engines\kyra\sequences_lok.cpp"> + RelativePath="..\..\engines\kyra\sequences_mr.cpp"> @@ -324,10 +324,10 @@ RelativePath="..\..\engines\kyra\sound_digital.cpp"> + RelativePath="..\..\engines\kyra\sound_lok.cpp"> + RelativePath="..\..\engines\kyra\sound_towns.cpp"> @@ -351,13 +351,13 @@ RelativePath="..\..\engines\kyra\text_hof.h"> + RelativePath="..\..\engines\kyra\text_lok.cpp"> + RelativePath="..\..\engines\kyra\text_mr.cpp"> + RelativePath="..\..\engines\kyra\text_mr.h"> @@ -369,10 +369,10 @@ RelativePath="..\..\engines\kyra\timer_hof.cpp"> + RelativePath="..\..\engines\kyra\timer_lok.cpp"> + RelativePath="..\..\engines\kyra\timer_mr.cpp"> diff --git a/dists/msvc8/kyra.vcproj b/dists/msvc8/kyra.vcproj index d173914b59..766b95c9e3 100644 --- a/dists/msvc8/kyra.vcproj +++ b/dists/msvc8/kyra.vcproj @@ -165,15 +165,15 @@ > kyra_v1.* - scene.cpp -> scene_v1.cpp svn-id: r32044 --- engines/kyra/debugger.cpp | 2 +- engines/kyra/debugger.h | 6 +- engines/kyra/detection.cpp | 6 +- engines/kyra/gui.cpp | 4 +- engines/kyra/gui.h | 10 +- engines/kyra/gui_hof.cpp | 18 +- engines/kyra/gui_lok.cpp | 2 +- engines/kyra/gui_mr.cpp | 10 +- engines/kyra/gui_v2.cpp | 2 +- engines/kyra/kyra.cpp | 400 ----------------------------------------- engines/kyra/kyra.h | 272 ---------------------------- engines/kyra/kyra_hof.cpp | 12 +- engines/kyra/kyra_lok.cpp | 10 +- engines/kyra/kyra_lok.h | 8 +- engines/kyra/kyra_mr.cpp | 12 +- engines/kyra/kyra_v1.cpp | 400 +++++++++++++++++++++++++++++++++++++++++ engines/kyra/kyra_v1.h | 272 ++++++++++++++++++++++++++++ engines/kyra/kyra_v2.cpp | 2 +- engines/kyra/kyra_v2.h | 4 +- engines/kyra/module.mk | 4 +- engines/kyra/resource.cpp | 2 +- engines/kyra/resource.h | 10 +- engines/kyra/saveload.cpp | 18 +- engines/kyra/scene.cpp | 383 --------------------------------------- engines/kyra/scene_lok.cpp | 2 +- engines/kyra/scene_v1.cpp | 383 +++++++++++++++++++++++++++++++++++++++ engines/kyra/scene_v2.cpp | 2 +- engines/kyra/screen.cpp | 6 +- engines/kyra/screen.h | 6 +- engines/kyra/screen_v2.cpp | 2 +- engines/kyra/screen_v2.h | 2 +- engines/kyra/script.cpp | 4 +- engines/kyra/script.h | 7 +- engines/kyra/script_tim.cpp | 2 +- engines/kyra/script_tim.h | 6 +- engines/kyra/sequences_hof.cpp | 2 +- engines/kyra/sound.cpp | 24 +-- engines/kyra/sound.h | 16 +- engines/kyra/sound_adlib.cpp | 2 +- engines/kyra/sound_lok.cpp | 4 +- engines/kyra/sound_towns.cpp | 4 +- engines/kyra/staticres.cpp | 6 +- engines/kyra/text.cpp | 4 +- engines/kyra/text.h | 6 +- engines/kyra/timer.cpp | 4 +- engines/kyra/timer.h | 6 +- engines/kyra/timer_lok.cpp | 2 +- engines/kyra/vqa.cpp | 2 +- engines/kyra/vqa.h | 6 +- engines/kyra/wsamovie.cpp | 8 +- engines/kyra/wsamovie.h | 12 +- 51 files changed, 1200 insertions(+), 1199 deletions(-) delete mode 100644 engines/kyra/kyra.cpp delete mode 100644 engines/kyra/kyra.h create mode 100644 engines/kyra/kyra_v1.cpp create mode 100644 engines/kyra/kyra_v1.h delete mode 100644 engines/kyra/scene.cpp create mode 100644 engines/kyra/scene_v1.cpp diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp index 932f5aa7dd..0d170dbf05 100644 --- a/engines/kyra/debugger.cpp +++ b/engines/kyra/debugger.cpp @@ -36,7 +36,7 @@ namespace Kyra { -Debugger::Debugger(KyraEngine *vm) +Debugger::Debugger(KyraEngine_v1 *vm) : ::GUI::Debugger() { _vm = vm; diff --git a/engines/kyra/debugger.h b/engines/kyra/debugger.h index 7b1d870daa..7cdfa26e93 100644 --- a/engines/kyra/debugger.h +++ b/engines/kyra/debugger.h @@ -30,18 +30,18 @@ namespace Kyra { -class KyraEngine; +class KyraEngine_v1; class KyraEngine_LoK; class KyraEngine_v2; class KyraEngine_HoF; class Debugger : public ::GUI::Debugger { public: - Debugger(KyraEngine *vm); + Debugger(KyraEngine_v1 *vm); virtual ~Debugger() {} // we need this for __SYMBIAN32__ archaic gcc/UIQ protected: - KyraEngine *_vm; + KyraEngine_v1 *_vm; bool cmd_setScreenDebug(int argc, const char **argv); bool cmd_loadPalette(int argc, const char **argv); diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index 2b272fd7d7..6a11ca9a34 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/kyra_lok.h" #include "kyra/kyra_hof.h" #include "kyra/kyra_mr.h" @@ -524,7 +524,7 @@ bool KyraMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common SaveStateList KyraMetaEngine::listSaves(const char *target) const { Common::SaveFileManager *saveFileMan = g_system->getSavefileManager(); - Kyra::KyraEngine::SaveHeader header; + Kyra::KyraEngine_v1::SaveHeader header; Common::String pattern = target; pattern += ".???"; @@ -540,7 +540,7 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const { if (slotNum >= 0 && slotNum <= 999) { Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str()); if (in) { - if (Kyra::KyraEngine::readSaveHeader(in, header) == Kyra::KyraEngine::kRSHENoError) + if (Kyra::KyraEngine_v1::readSaveHeader(in, header) == Kyra::KyraEngine_v1::kRSHENoError) saveList.push_back(SaveStateDescriptor(slotNum, header.description, *file)); delete in; } diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp index 407be7a73a..96ea233025 100644 --- a/engines/kyra/gui.cpp +++ b/engines/kyra/gui.cpp @@ -33,7 +33,7 @@ namespace Kyra { -GUI::GUI(KyraEngine *kyra) +GUI::GUI(KyraEngine_v1 *kyra) : _vm(kyra), _screen(kyra->screen()), _text(kyra->text()) { _menuButtonList = 0; @@ -339,7 +339,7 @@ int GUI::getNextSavegameSlot() { #pragma mark - -MainMenu::MainMenu(KyraEngine *vm) : _vm(vm), _screen(0) { +MainMenu::MainMenu(KyraEngine_v1 *vm) : _vm(vm), _screen(0) { _screen = _vm->screen(); _nextUpdate = 0; _system = g_system; diff --git a/engines/kyra/gui.h b/engines/kyra/gui.h index 8023cc4810..1361bdb399 100644 --- a/engines/kyra/gui.h +++ b/engines/kyra/gui.h @@ -26,7 +26,7 @@ #ifndef KYRA_GUI_H #define KYRA_GUI_H -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "common/ptr.h" #include "common/array.h" @@ -135,7 +135,7 @@ class TextDisplayer; class GUI { public: - GUI(KyraEngine *vm); + GUI(KyraEngine_v1 *vm); virtual ~GUI() {} // button specific @@ -154,7 +154,7 @@ public: void processHighlights(Menu &menu, int mouseX, int mouseY); protected: - KyraEngine *_vm; + KyraEngine_v1 *_vm; Screen *_screen; TextDisplayer *_text; @@ -196,7 +196,7 @@ class Movie; class MainMenu { public: - MainMenu(KyraEngine *vm); + MainMenu(KyraEngine_v1 *vm); virtual ~MainMenu() {} struct Animation { @@ -219,7 +219,7 @@ public: void init(StaticData data, Animation anim); int handle(int dim); private: - KyraEngine *_vm; + KyraEngine_v1 *_vm; Screen *_screen; OSystem *_system; diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp index 12e4065ec6..d60b353de3 100644 --- a/engines/kyra/gui_hof.cpp +++ b/engines/kyra/gui_hof.cpp @@ -23,7 +23,7 @@ * */ -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/kyra_hof.h" #include "kyra/screen.h" #include "kyra/wsamovie.h" @@ -827,10 +827,10 @@ void GUI_HoF::drawSliderBar(int slider, const uint8 *shape) { int position = 0; if (_vm->gameFlags().isTalkie) { - position = _vm->getVolume(KyraEngine::kVolumeEntry(slider)); + position = _vm->getVolume(KyraEngine_v1::kVolumeEntry(slider)); } else { if (slider < 2) - position = _vm->getVolume(KyraEngine::kVolumeEntry(slider)); + position = _vm->getVolume(KyraEngine_v1::kVolumeEntry(slider)); else if (slider == 2) position = (_vm->_configWalkspeed == 3) ? 97 : 2; else if (slider == 3) @@ -900,7 +900,7 @@ int GUI_HoF::audioOptions(Button *caller) { restorePage1(_vm->_screenBuffer); backUpPage1(_vm->_screenBuffer); - if (speechEnabled && !_vm->textEnabled() && (!_vm->speechEnabled() || _vm->getVolume(KyraEngine::kVolumeSpeech) == 2)) { + if (speechEnabled && !_vm->textEnabled() && (!_vm->speechEnabled() || _vm->getVolume(KyraEngine_v1::kVolumeSpeech) == 2)) { _vm->_configVoice = 0; choiceDialog(0x1D, 0); } @@ -978,7 +978,7 @@ int GUI_HoF::gameOptionsTalkie(Button *caller) { if (textEnabled && !_vm->textEnabled() && !_vm->speechEnabled()) { _vm->_configVoice = 1; - _vm->setVolume(KyraEngine::kVolumeSpeech, 75); + _vm->setVolume(KyraEngine_v1::kVolumeSpeech, 75); choiceDialog(0x1E, 0); } @@ -1054,10 +1054,10 @@ int GUI_HoF::sliderHandler(Button *caller) { int oldVolume = 0; if (_vm->gameFlags().isTalkie) { - oldVolume = _vm->getVolume(KyraEngine::kVolumeEntry(button)); + oldVolume = _vm->getVolume(KyraEngine_v1::kVolumeEntry(button)); } else { if (button < 2) - oldVolume = _vm->getVolume(KyraEngine::kVolumeEntry(button)); + oldVolume = _vm->getVolume(KyraEngine_v1::kVolumeEntry(button)); else if (button == 2) oldVolume = (_vm->_configWalkspeed == 3) ? 97 : 2; else if (button == 3) @@ -1092,7 +1092,7 @@ int GUI_HoF::sliderHandler(Button *caller) { _vm->_configVoice = 1; } - _vm->setVolume(KyraEngine::kVolumeEntry(button), newVolume); + _vm->setVolume(KyraEngine_v1::kVolumeEntry(button), newVolume); switch (button) { case 0: @@ -1112,7 +1112,7 @@ int GUI_HoF::sliderHandler(Button *caller) { } } else { if (button < 2) { - _vm->setVolume(KyraEngine::kVolumeEntry(button), newVolume); + _vm->setVolume(KyraEngine_v1::kVolumeEntry(button), newVolume); if (button == 0) lastMusicCommand = _vm->_lastMusicCommand; else diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp index 844574c5be..feacde683c 100644 --- a/engines/kyra/gui_lok.cpp +++ b/engines/kyra/gui_lok.cpp @@ -544,7 +544,7 @@ void GUI_LoK::setupSavegames(Menu &menu, int num) { for (int i = startSlot; i < num; ++i) menu.item[i].enabled = 0; - KyraEngine::SaveHeader header; + KyraEngine_v1::SaveHeader header; for (int i = startSlot; i < num && uint(_savegameOffset + i) < _saveSlots.size(); i++) { if ((in = _vm->openSaveForReading(_vm->getSavegameFilename(_saveSlots[i + _savegameOffset]), header))) { strncpy(savenames[i], header.description.c_str(), 31); diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp index 74f6451e28..d0a39df0b2 100644 --- a/engines/kyra/gui_mr.cpp +++ b/engines/kyra/gui_mr.cpp @@ -1444,7 +1444,7 @@ int GUI_MR::gameOptions(Button *caller) { if (textEnabled && !_vm->textEnabled() && !_vm->speechEnabled()) { _vm->_configVoice = 1; - _vm->setVolume(KyraEngine::kVolumeSpeech, 75); + _vm->setVolume(KyraEngine_v1::kVolumeSpeech, 75); choiceDialog(0x1E, 0); } @@ -1597,7 +1597,7 @@ int GUI_MR::audioOptions(Button *caller) { restorePage1(_vm->_screenBuffer); backUpPage1(_vm->_screenBuffer); - if (speechEnabled && !_vm->textEnabled() && (!_vm->speechEnabled() || _vm->getVolume(KyraEngine::kVolumeSpeech) == 2)) { + if (speechEnabled && !_vm->textEnabled() && (!_vm->speechEnabled() || _vm->getVolume(KyraEngine_v1::kVolumeSpeech) == 2)) { _vm->_configVoice = 0; choiceDialog(0x1D, 0); } @@ -1620,7 +1620,7 @@ int GUI_MR::sliderHandler(Button *caller) { assert(button >= 0 && button <= 3); - int oldVolume = _vm->getVolume(KyraEngine::kVolumeEntry(button)); + int oldVolume = _vm->getVolume(KyraEngine_v1::kVolumeEntry(button)); int newVolume = oldVolume; if (caller->index >= 24 && caller->index <= 27) @@ -1648,7 +1648,7 @@ int GUI_MR::sliderHandler(Button *caller) { _vm->_configVoice = 1; } - _vm->setVolume(KyraEngine::kVolumeEntry(button), newVolume); + _vm->setVolume(KyraEngine_v1::kVolumeEntry(button), newVolume); switch (button) { case 0: @@ -1685,7 +1685,7 @@ void GUI_MR::drawSliderBar(int slider, const uint8 *shape) { int x = menuX + _sliderBarsPosition[slider*2+0] + 10; int y = menuY + _sliderBarsPosition[slider*2+1]; - int position = _vm->getVolume(KyraEngine::kVolumeEntry(slider)); + int position = _vm->getVolume(KyraEngine_v1::kVolumeEntry(slider)); position = MAX(2, position); position = MIN(97, position); diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp index 6ee6b1e4a5..2819c4f077 100644 --- a/engines/kyra/gui_v2.cpp +++ b/engines/kyra/gui_v2.cpp @@ -451,7 +451,7 @@ void GUI_v2::setupSavegameNames(Menu &menu, int num) { if (_isSaveMenu && _savegameOffset == 0) startSlot = 1; - KyraEngine::SaveHeader header; + KyraEngine_v1::SaveHeader header; Common::InSaveFile *in; for (int i = startSlot; i < num && uint(_savegameOffset + i) < _saveSlots.size(); ++i) { if ((in = _vm->openSaveForReading(_vm->getSavegameFilename(_saveSlots[i + _savegameOffset]), header)) != 0) { diff --git a/engines/kyra/kyra.cpp b/engines/kyra/kyra.cpp deleted file mode 100644 index e35e91731d..0000000000 --- a/engines/kyra/kyra.cpp +++ /dev/null @@ -1,400 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/config-manager.h" - -#include "sound/mididrv.h" -#include "sound/mixer.h" - -#include "kyra/kyra.h" -#include "kyra/sound.h" -#include "kyra/resource.h" -#include "kyra/screen.h" -#include "kyra/text.h" -#include "kyra/timer.h" -#include "kyra/script.h" -#include "kyra/debugger.h" - -namespace Kyra { - -KyraEngine::KyraEngine(OSystem *system, const GameFlags &flags) - : Engine(system), _flags(flags) { - _res = 0; - _sound = 0; - _text = 0; - _staticres = 0; - _timer = 0; - _emc = 0; - _debugger = 0; - - _gameSpeed = 60; - _tickLength = (uint8)(1000.0 / _gameSpeed); - - _quitFlag = false; - - _speechFile = ""; - _trackMap = 0; - _trackMapSize = 0; - _lastMusicCommand = -1; - _curSfxFile = _curMusicTheme = -1; - - _gameToLoad = -1; - - memset(_flagsTable, 0, sizeof(_flagsTable)); - - // sets up all engine specific debug levels - Common::addSpecialDebugLevel(kDebugLevelScriptFuncs, "ScriptFuncs", "Script function debug level"); - Common::addSpecialDebugLevel(kDebugLevelScript, "Script", "Script interpreter debug level"); - Common::addSpecialDebugLevel(kDebugLevelSprites, "Sprites", "Sprite debug level"); - Common::addSpecialDebugLevel(kDebugLevelScreen, "Screen", "Screen debug level"); - Common::addSpecialDebugLevel(kDebugLevelSound, "Sound", "Sound debug level"); - Common::addSpecialDebugLevel(kDebugLevelAnimator, "Animator", "Animator debug level"); - Common::addSpecialDebugLevel(kDebugLevelMain, "Main", "Generic debug level"); - Common::addSpecialDebugLevel(kDebugLevelGUI, "GUI", "GUI debug level"); - Common::addSpecialDebugLevel(kDebugLevelSequence, "Sequence", "Sequence debug level"); - Common::addSpecialDebugLevel(kDebugLevelMovie, "Movie", "Movie debug level"); - Common::addSpecialDebugLevel(kDebugLevelTimer, "Timer", "Timer debug level"); - - system->getEventManager()->registerRandomSource(_rnd, "kyra"); -} - -::GUI::Debugger *KyraEngine::getDebugger() { - return _debugger; -} - -int KyraEngine::init() { - registerDefaultSettings(); - - // Setup mixer - _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); - _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); - _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); - - if (!_flags.useDigSound) { - // We prefer AdLib over native MIDI, since our AdLib playback code is much - // more mature than our MIDI player. For example we are missing MT-32 support - // and it seems our MIDI playback code has threading issues (see bug #1506583 - // "KYRA1: Crash on exceeded polyphony" for more information). - int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB/* | MDT_PREFER_MIDI*/); - - if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { - // TODO: currently we don't support the PC98 sound data, - // but since it has the FM-Towns data files, we just use the - // FM-Towns driver - if (_flags.gameID == GI_KYRA1) - _sound = new SoundTowns(this, _mixer); - else - _sound = new SoundTowns_v2(this, _mixer); - } else if (midiDriver == MD_ADLIB) { - _sound = new SoundAdlibPC(this, _mixer); - assert(_sound); - } else { - bool native_mt32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32")); - - MidiDriver *driver = MidiDriver::createMidi(midiDriver); - assert(driver); - if (native_mt32) - driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE); - - SoundMidiPC *soundMidiPc = new SoundMidiPC(this, _mixer, driver); - _sound = soundMidiPc; - assert(_sound); - soundMidiPc->hasNativeMT32(native_mt32); - - // Unlike some SCUMM games, it's not that the MIDI sounds are - // missing. It's just that at least at the time of writing they - // are decidedly inferior to the Adlib ones. - if (ConfMan.getBool("multi_midi")) { - SoundAdlibPC *adlib = new SoundAdlibPC(this, _mixer); - assert(adlib); - - _sound = new MixedSoundDriver(this, _mixer, soundMidiPc, adlib); - assert(_sound); - } - } - } - - if (_sound) - _sound->updateVolumeSettings(); - - _res = new Resource(this); - assert(_res); - _res->reset(); - _staticres = new StaticResource(this); - assert(_staticres); - if (!_staticres->init()) - error("_staticres->init() failed"); - if (!screen()->init()) - error("screen()->init() failed"); - _timer = new TimerManager(this, _system); - assert(_timer); - setupTimers(); - _emc = new EMCInterpreter(this); - assert(_emc); - - setupOpcodeTable(); - readSettings(); - - if (ConfMan.hasKey("save_slot")) { - _gameToLoad = ConfMan.getInt("save_slot"); - if (!saveFileLoadable(_gameToLoad)) - _gameToLoad = -1; - } - - _lang = 0; - Common::Language lang = Common::parseLanguage(ConfMan.get("language")); - - if (_flags.gameID == GI_KYRA2 || _flags.gameID == GI_KYRA3) { - switch (lang) { - case Common::EN_ANY: - case Common::EN_USA: - case Common::EN_GRB: - _lang = 0; - break; - - case Common::FR_FRA: - _lang = 1; - break; - - case Common::DE_DEU: - _lang = 2; - break; - - case Common::JA_JPN: - _lang = 3; - break; - - default: - warning("unsupported language, switching back to English"); - _lang = 0; - break; - } - } - - return 0; -} - -KyraEngine::~KyraEngine() { - for (Common::Array::iterator i = _opcodes.begin(); i != _opcodes.end(); ++i) - delete *i; - _opcodes.clear(); - - delete _res; - delete _staticres; - delete _sound; - delete _text; - delete _timer; - delete _emc; - delete _debugger; -} - -void KyraEngine::quitGame() { - debugC(9, kDebugLevelMain, "KyraEngine::quitGame()"); - _quitFlag = true; - // Nothing to do here -} - -Common::Point KyraEngine::getMousePos() const { - Common::Point mouse = _eventMan->getMousePos(); - - if (_flags.useHiResOverlay) { - mouse.x >>= 1; - mouse.y >>= 1; - } - - return mouse; -} - -void KyraEngine::setMousePos(int x, int y) { - if (_flags.useHiResOverlay) { - x <<= 1; - y <<= 1; - } - _system->warpMouse(x, y); -} - -int KyraEngine::setGameFlag(int flag) { - _flagsTable[flag >> 3] |= (1 << (flag & 7)); - return 1; -} - -int KyraEngine::queryGameFlag(int flag) const { - return ((_flagsTable[flag >> 3] >> (flag & 7)) & 1); -} - -int KyraEngine::resetGameFlag(int flag) { - _flagsTable[flag >> 3] &= ~(1 << (flag & 7)); - return 0; -} - -void KyraEngine::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) { - while (_system->getMillis() < timestamp && !_quitFlag) { - if (timestamp - _system->getMillis() >= 10) - delay(10, update, isMainLoop); - } -} - -void KyraEngine::delay(uint32 amount, bool update, bool isMainLoop) { - _system->delayMillis(amount); -} - -void KyraEngine::delayWithTicks(int ticks) { - delay(ticks * _tickLength); -} - -void KyraEngine::registerDefaultSettings() { - if (_flags.gameID != GI_KYRA3) - ConfMan.registerDefault("cdaudio", (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)); -} - -void KyraEngine::readSettings() { - _configWalkspeed = ConfMan.getInt("walkspeed"); - _configMusic = 0; - - if (!ConfMan.getBool("music_mute")) { - _configMusic = 1; - if (_flags.gameID != GI_KYRA3 && ConfMan.getBool("cdaudio") && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) - _configMusic = 2; - } - _configSounds = ConfMan.getBool("sfx_mute") ? 0 : 1; - - if (_sound) { - _sound->enableMusic(_configMusic); - _sound->enableSFX(_configSounds); - } - - bool speechMute = ConfMan.getBool("speech_mute"); - bool subtitles = ConfMan.getBool("subtitles"); - - if (!speechMute && subtitles) - _configVoice = 2; // Voice & Text - else if (!speechMute && !subtitles) - _configVoice = 1; // Voice only - else - _configVoice = 0; // Text only - - setWalkspeed(_configWalkspeed); -} - -void KyraEngine::writeSettings() { - bool speechMute, subtitles; - - ConfMan.setInt("walkspeed", _configWalkspeed); - ConfMan.setBool("music_mute", _configMusic == 0); - if (_flags.gameID != GI_KYRA3) - ConfMan.setBool("cdaudio", _configMusic == 2); - ConfMan.setBool("sfx_mute", _configSounds == 0); - - switch (_configVoice) { - case 0: // Text only - speechMute = true; - subtitles = true; - break; - case 1: // Voice only - speechMute = false; - subtitles = false; - break; - default: // Voice & Text - speechMute = false; - subtitles = true; - break; - } - - if (_sound) { - if (!_configMusic) - _sound->beginFadeOut(); - _sound->enableMusic(_configMusic); - _sound->enableSFX(_configSounds); - } - - ConfMan.setBool("speech_mute", speechMute); - ConfMan.setBool("subtitles", subtitles); - - ConfMan.flushToDisk(); -} - -bool KyraEngine::speechEnabled() { - return _flags.isTalkie && (_configVoice == 1 || _configVoice == 2); -} - -bool KyraEngine::textEnabled() { - return !_flags.isTalkie || (_configVoice == 0 || _configVoice == 2); -} - -inline int convertValueToMixer(int value) { - value -= 2; - return (value * Audio::Mixer::kMaxMixerVolume) / 95; -} - -inline int convertValueFromMixer(int value) { - return (value * 95) / Audio::Mixer::kMaxMixerVolume + 2; -} - -void KyraEngine::setVolume(kVolumeEntry vol, uint8 value) { - switch (vol) { - case kVolumeMusic: - ConfMan.setInt("music_volume", convertValueToMixer(value)); - break; - - case kVolumeSfx: - ConfMan.setInt("sfx_volume", convertValueToMixer(value)); - break; - - case kVolumeSpeech: - ConfMan.setInt("speech_volume", convertValueToMixer(value)); - break; - } - - // Resetup mixer - _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); - _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); - _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); - if (_sound) - _sound->updateVolumeSettings(); -} - -uint8 KyraEngine::getVolume(kVolumeEntry vol) { - switch (vol) { - case kVolumeMusic: - return convertValueFromMixer(ConfMan.getInt("music_volume")); - break; - - case kVolumeSfx: - return convertValueFromMixer(ConfMan.getInt("sfx_volume")); - break; - - case kVolumeSpeech: - if (speechEnabled()) - return convertValueFromMixer(ConfMan.getInt("speech_volume")); - else - return 2; - break; - } - - return 2; -} - -} // End of namespace Kyra - diff --git a/engines/kyra/kyra.h b/engines/kyra/kyra.h deleted file mode 100644 index 66ecb2704c..0000000000 --- a/engines/kyra/kyra.h +++ /dev/null @@ -1,272 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef KYRA_KYRA_H -#define KYRA_KYRA_H - -#include "engines/engine.h" - -#include "common/array.h" -#include "common/events.h" - -#include "kyra/script.h" - -namespace Common { -class InSaveFile; -class OutSaveFile; -} // end of namespace Common - -class KyraMetaEngine; - -namespace Kyra { - -struct GameFlags { - Common::Language lang; - Common::Platform platform; - - bool isDemo : 1; - bool useAltShapeHeader : 1; // alternative shape header (uses 2 bytes more, those are unused though) - bool isTalkie : 1; - bool useHiResOverlay : 1; - bool useDigSound : 1; - - byte gameID; -}; - -enum { - GI_KYRA1 = 0, - GI_KYRA2 = 1, - GI_KYRA3 = 2 -}; - -struct AudioDataStruct { - const char * const *_fileList; - const int _fileListLen; - const void * const _cdaTracks; - const int _cdaNumTracks; -}; - -// TODO: this is just the start of makeing the debug output of the kyra engine a bit more useable -// in the future we maybe merge some flags and/or create new ones -enum kDebugLevels { - kDebugLevelScriptFuncs = 1 << 0, // prints debug output of o#_* functions - kDebugLevelScript = 1 << 1, // prints debug output of "EMCInterpreter" functions - kDebugLevelSprites = 1 << 2, // prints debug output of "Sprites" functions - kDebugLevelScreen = 1 << 3, // prints debug output of "Screen" functions - kDebugLevelSound = 1 << 4, // prints debug output of "Sound" functions - kDebugLevelAnimator = 1 << 5, // prints debug output of "ScreenAnimator" functions - kDebugLevelMain = 1 << 6, // prints debug output of common "KyraEngine(_v#)" functions && "TextDisplayer" functions - kDebugLevelGUI = 1 << 7, // prints debug output of "KyraEngine*" gui functions - kDebugLevelSequence = 1 << 8, // prints debug output of "SeqPlayer" functions - kDebugLevelMovie = 1 << 9, // prints debug output of movie specific funtions - kDebugLevelTimer = 1 << 10 // prints debug output of "TimerManager" functions -}; - -enum kMusicDataID { - kMusicIntro = 0, - kMusicIngame, - kMusicFinale -}; - -class Screen; -class Resource; -class Sound; -class Movie; -class TextDisplayer; -class StaticResource; -class TimerManager; -class Debugger; - -class KyraEngine : public Engine { -friend class Debugger; -friend class ::KyraMetaEngine; -friend class GUI; -public: - KyraEngine(OSystem *system, const GameFlags &flags); - virtual ~KyraEngine(); - - ::GUI::Debugger *getDebugger(); - - bool quit() const { return _quitFlag; } - - uint8 game() const { return _flags.gameID; } - const GameFlags &gameFlags() const { return _flags; } - - // access to Kyra specific functionallity - Resource *resource() { return _res; } - virtual Screen *screen() = 0; - virtual TextDisplayer *text() { return _text; } - Sound *sound() { return _sound; } - StaticResource *staticres() { return _staticres; } - TimerManager *timer() { return _timer; } - - uint32 tickLength() const { return _tickLength; } - - Common::RandomSource _rnd; - - // input - void setMousePos(int x, int y); - Common::Point getMousePos() const; - - // config specific - bool speechEnabled(); - bool textEnabled(); - - enum kVolumeEntry { - kVolumeMusic = 0, - kVolumeSfx = 1, - kVolumeSpeech = 2 - }; - - // volume reaches from 2 to 97 - void setVolume(kVolumeEntry vol, uint8 value); - uint8 getVolume(kVolumeEntry vol); - - // quit handling - virtual void quitGame(); - - // game flag handling - int setGameFlag(int flag); - int queryGameFlag(int flag) const; - int resetGameFlag(int flag); - - // sound - virtual void snd_playTheme(int file, int track); - virtual void snd_playSoundEffect(int id, int volume=0xFF); - virtual void snd_playWanderScoreViaMap(int command, int restart); - virtual void snd_playVoiceFile(int id) = 0; - virtual bool snd_voiceIsPlaying(); - virtual void snd_stopVoice(); - - // delay functionallity - virtual void delayUntil(uint32 timestamp, bool updateGameTimers = false, bool update = false, bool isMainLoop = false); - virtual void delay(uint32 millis, bool update = false, bool isMainLoop = false); - virtual void delayWithTicks(int ticks); - -protected: - virtual int go() = 0; - virtual int init(); - - // quit Handling - bool _quitFlag; - - // intern - Resource *_res; - Sound *_sound; - TextDisplayer *_text; - StaticResource *_staticres; - TimerManager *_timer; - EMCInterpreter *_emc; - Debugger *_debugger; - - // config specific - virtual void registerDefaultSettings(); - virtual void readSettings(); - virtual void writeSettings(); - - uint8 _configWalkspeed; - - int _configMusic; - bool _configSounds; - uint8 _configVoice; - - // game speed - virtual bool skipFlag() const = 0; - virtual void resetSkipFlag(bool removeEvent = true) = 0; - - uint16 _tickLength; - uint16 _gameSpeed; - - // timer - virtual void setupTimers() = 0; - - virtual void setWalkspeed(uint8 speed) = 0; - - // detection - GameFlags _flags; - int _lang; - - // opcode - virtual void setupOpcodeTable() = 0; - Common::Array _opcodes; - - // game flags - uint8 _flagsTable[100]; // TODO: check this value - - // sound - Common::String _speechFile; - - int _curMusicTheme; - int _curSfxFile; - int16 _lastMusicCommand; - - const int8 *_trackMap; - int _trackMapSize; - - // pathfinder - virtual int findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize); - int findSubPath(int x, int y, int toX, int toY, int *moveTable, int start, int end); - int getFacingFromPointToPoint(int x, int y, int toX, int toY); - int getOppositeFacingDirection(int dir); - void changePosTowardsFacing(int &x, int &y, int facing); - int getMoveTableSize(int *moveTable); - virtual bool lineIsPassable(int x, int y) = 0; - - static const int8 _addXPosTable[]; - static const int8 _addYPosTable[]; - - // save/load - int _gameToLoad; - - const char *getSavegameFilename(int num); - bool saveFileLoadable(int slot); - - struct SaveHeader { - Common::String description; - uint32 version; - byte gameID; - uint32 flags; - - bool originalSave; // savegame from original interpreter - bool oldHeader; // old scummvm save header - }; - - enum kReadSaveHeaderError { - kRSHENoError = 0, - kRSHEInvalidType = 1, - kRSHEInvalidVersion = 2, - kRSHEIoError = 3 - }; - - static kReadSaveHeaderError readSaveHeader(Common::InSaveFile *file, SaveHeader &header); - - Common::InSaveFile *openSaveForReading(const char *filename, SaveHeader &header); - Common::OutSaveFile *openSaveForWriting(const char *filename, const char *saveName) const; -}; - -} // End of namespace Kyra - -#endif - diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 5a2d36d612..f1b74a7bdb 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -23,7 +23,7 @@ * */ -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/kyra_hof.h" #include "kyra/screen.h" #include "kyra/resource.h" @@ -182,7 +182,7 @@ int KyraEngine_HoF::init() { assert(_screen); _screen->setResolution(); - KyraEngine::init(); + KyraEngine_v1::init(); initStaticResource(); _debugger = new Debugger_HoF(this); @@ -1526,7 +1526,7 @@ void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) { else if (_flags.platform == Common::kPlatformPC) // TODO ?? Maybe there is a way to let users select whether they want // voc, midi or adl sfx (even though it makes no sense to choose anything but voc). - KyraEngine::snd_playSoundEffect(track); + KyraEngine_v1::snd_playSoundEffect(track); } #pragma mark - @@ -1954,7 +1954,7 @@ void KyraEngine_HoF::playTim(const char *filename) { #pragma mark - void KyraEngine_HoF::registerDefaultSettings() { - KyraEngine::registerDefaultSettings(); + KyraEngine_v1::registerDefaultSettings(); // Most settings already have sensible defaults. This one, however, is // specific to the Kyra engine. @@ -1985,13 +1985,13 @@ void KyraEngine_HoF::writeSettings() { ConfMan.set("language", Common::getLanguageCode(_flags.lang)); - KyraEngine::writeSettings(); + KyraEngine_v1::writeSettings(); } void KyraEngine_HoF::readSettings() { int talkspeed = ConfMan.getInt("talkspeed"); _configTextspeed = (talkspeed*95)/255 + 2; - KyraEngine::readSettings(); + KyraEngine_v1::readSettings(); } } // end of namespace Kyra diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp index 175a635157..6ab2db5492 100644 --- a/engines/kyra/kyra_lok.cpp +++ b/engines/kyra/kyra_lok.cpp @@ -47,7 +47,7 @@ namespace Kyra { KyraEngine_LoK::KyraEngine_LoK(OSystem *system, const GameFlags &flags) - : KyraEngine(system, flags) { + : KyraEngine_v1(system, flags) { _skipFlag = false; _seq_Forest = _seq_KallakWriting = _seq_KyrandiaLogo = _seq_KallakMalcolm = @@ -156,7 +156,7 @@ int KyraEngine_LoK::init() { assert(_screen); _screen->setResolution(); - KyraEngine::init(); + KyraEngine_v1::init(); _sprites = new Sprites(this, _system); assert(_sprites); @@ -994,7 +994,7 @@ void KyraEngine_LoK::checkAmuletAnimFlags() { #pragma mark - void KyraEngine_LoK::registerDefaultSettings() { - KyraEngine::registerDefaultSettings(); + KyraEngine_v1::registerDefaultSettings(); // Most settings already have sensible defaults. This one, however, is // specific to the Kyra engine. @@ -1015,7 +1015,7 @@ void KyraEngine_LoK::readSettings() { else _configTextspeed = 2; // Fast - KyraEngine::readSettings(); + KyraEngine_v1::readSettings(); } void KyraEngine_LoK::writeSettings() { @@ -1038,7 +1038,7 @@ void KyraEngine_LoK::writeSettings() { ConfMan.setInt("talkspeed", talkspeed); - KyraEngine::writeSettings(); + KyraEngine_v1::writeSettings(); } } // end of namespace Kyra diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index fe742a1da9..eed2f71ab0 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -23,10 +23,10 @@ * */ -#ifndef KYRA_KYRA_V1_H -#define KYRA_KYRA_V1_H +#ifndef KYRA_KYRA_LOK_H +#define KYRA_KYRA_LOK_H -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/script.h" #include "kyra/screen_lok.h" #include "kyra/gui_lok.h" @@ -104,7 +104,7 @@ struct BeadState { int16 tableIndex; }; -class KyraEngine_LoK : public KyraEngine { +class KyraEngine_LoK : public KyraEngine_v1 { friend class MusicPlayer; friend class Debugger_LoK; friend class Animator_LoK; diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 6eca24fe98..f53192d68a 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -23,7 +23,7 @@ * */ -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/kyra_mr.h" #include "kyra/screen_mr.h" #include "kyra/wsamovie.h" @@ -205,7 +205,7 @@ int KyraEngine_MR::init() { assert(_screen); _screen->setResolution(); - KyraEngine::init(); + KyraEngine_v1::init(); _debugger = new Debugger_v2(this); assert(_debugger); @@ -214,7 +214,7 @@ int KyraEngine_MR::init() { assert(_soundDigital); if (!_soundDigital->init()) error("_soundDigital->init() failed"); - KyraEngine::_text = _text = new TextDisplayer_MR(this, _screen); + KyraEngine_v1::_text = _text = new TextDisplayer_MR(this, _screen); assert(_text); _gui = new GUI_MR(this); assert(_gui); @@ -1509,7 +1509,7 @@ void KyraEngine_MR::resetSkipFlag(bool removeEvent) { void KyraEngine_MR::registerDefaultSettings() { debugC(9, kDebugLevelMain, "KyraEngine_MR::registerDefaultSettings()"); - KyraEngine::registerDefaultSettings(); + KyraEngine_v1::registerDefaultSettings(); // Most settings already have sensible defaults. This one, however, is // specific to the Kyra engine. @@ -1542,12 +1542,12 @@ void KyraEngine_MR::writeSettings() { ConfMan.setBool("skip_support", _configSkip); ConfMan.setBool("helium_mode", _configHelium); - KyraEngine::writeSettings(); + KyraEngine_v1::writeSettings(); } void KyraEngine_MR::readSettings() { debugC(9, kDebugLevelMain, "KyraEngine_MR::readSettings()"); - KyraEngine::readSettings(); + KyraEngine_v1::readSettings(); _configStudio = ConfMan.getBool("studio_audience"); _configSkip = ConfMan.getBool("skip_support"); diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp new file mode 100644 index 0000000000..8109ab0e26 --- /dev/null +++ b/engines/kyra/kyra_v1.cpp @@ -0,0 +1,400 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/config-manager.h" + +#include "sound/mididrv.h" +#include "sound/mixer.h" + +#include "kyra/kyra_v1.h" +#include "kyra/sound.h" +#include "kyra/resource.h" +#include "kyra/screen.h" +#include "kyra/text.h" +#include "kyra/timer.h" +#include "kyra/script.h" +#include "kyra/debugger.h" + +namespace Kyra { + +KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags) + : Engine(system), _flags(flags) { + _res = 0; + _sound = 0; + _text = 0; + _staticres = 0; + _timer = 0; + _emc = 0; + _debugger = 0; + + _gameSpeed = 60; + _tickLength = (uint8)(1000.0 / _gameSpeed); + + _quitFlag = false; + + _speechFile = ""; + _trackMap = 0; + _trackMapSize = 0; + _lastMusicCommand = -1; + _curSfxFile = _curMusicTheme = -1; + + _gameToLoad = -1; + + memset(_flagsTable, 0, sizeof(_flagsTable)); + + // sets up all engine specific debug levels + Common::addSpecialDebugLevel(kDebugLevelScriptFuncs, "ScriptFuncs", "Script function debug level"); + Common::addSpecialDebugLevel(kDebugLevelScript, "Script", "Script interpreter debug level"); + Common::addSpecialDebugLevel(kDebugLevelSprites, "Sprites", "Sprite debug level"); + Common::addSpecialDebugLevel(kDebugLevelScreen, "Screen", "Screen debug level"); + Common::addSpecialDebugLevel(kDebugLevelSound, "Sound", "Sound debug level"); + Common::addSpecialDebugLevel(kDebugLevelAnimator, "Animator", "Animator debug level"); + Common::addSpecialDebugLevel(kDebugLevelMain, "Main", "Generic debug level"); + Common::addSpecialDebugLevel(kDebugLevelGUI, "GUI", "GUI debug level"); + Common::addSpecialDebugLevel(kDebugLevelSequence, "Sequence", "Sequence debug level"); + Common::addSpecialDebugLevel(kDebugLevelMovie, "Movie", "Movie debug level"); + Common::addSpecialDebugLevel(kDebugLevelTimer, "Timer", "Timer debug level"); + + system->getEventManager()->registerRandomSource(_rnd, "kyra"); +} + +::GUI::Debugger *KyraEngine_v1::getDebugger() { + return _debugger; +} + +int KyraEngine_v1::init() { + registerDefaultSettings(); + + // Setup mixer + _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); + + if (!_flags.useDigSound) { + // We prefer AdLib over native MIDI, since our AdLib playback code is much + // more mature than our MIDI player. For example we are missing MT-32 support + // and it seems our MIDI playback code has threading issues (see bug #1506583 + // "KYRA1: Crash on exceeded polyphony" for more information). + int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB/* | MDT_PREFER_MIDI*/); + + if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { + // TODO: currently we don't support the PC98 sound data, + // but since it has the FM-Towns data files, we just use the + // FM-Towns driver + if (_flags.gameID == GI_KYRA1) + _sound = new SoundTowns(this, _mixer); + else + _sound = new SoundTowns_v2(this, _mixer); + } else if (midiDriver == MD_ADLIB) { + _sound = new SoundAdlibPC(this, _mixer); + assert(_sound); + } else { + bool native_mt32 = ((midiDriver == MD_MT32) || ConfMan.getBool("native_mt32")); + + MidiDriver *driver = MidiDriver::createMidi(midiDriver); + assert(driver); + if (native_mt32) + driver->property(MidiDriver::PROP_CHANNEL_MASK, 0x03FE); + + SoundMidiPC *soundMidiPc = new SoundMidiPC(this, _mixer, driver); + _sound = soundMidiPc; + assert(_sound); + soundMidiPc->hasNativeMT32(native_mt32); + + // Unlike some SCUMM games, it's not that the MIDI sounds are + // missing. It's just that at least at the time of writing they + // are decidedly inferior to the Adlib ones. + if (ConfMan.getBool("multi_midi")) { + SoundAdlibPC *adlib = new SoundAdlibPC(this, _mixer); + assert(adlib); + + _sound = new MixedSoundDriver(this, _mixer, soundMidiPc, adlib); + assert(_sound); + } + } + } + + if (_sound) + _sound->updateVolumeSettings(); + + _res = new Resource(this); + assert(_res); + _res->reset(); + _staticres = new StaticResource(this); + assert(_staticres); + if (!_staticres->init()) + error("_staticres->init() failed"); + if (!screen()->init()) + error("screen()->init() failed"); + _timer = new TimerManager(this, _system); + assert(_timer); + setupTimers(); + _emc = new EMCInterpreter(this); + assert(_emc); + + setupOpcodeTable(); + readSettings(); + + if (ConfMan.hasKey("save_slot")) { + _gameToLoad = ConfMan.getInt("save_slot"); + if (!saveFileLoadable(_gameToLoad)) + _gameToLoad = -1; + } + + _lang = 0; + Common::Language lang = Common::parseLanguage(ConfMan.get("language")); + + if (_flags.gameID == GI_KYRA2 || _flags.gameID == GI_KYRA3) { + switch (lang) { + case Common::EN_ANY: + case Common::EN_USA: + case Common::EN_GRB: + _lang = 0; + break; + + case Common::FR_FRA: + _lang = 1; + break; + + case Common::DE_DEU: + _lang = 2; + break; + + case Common::JA_JPN: + _lang = 3; + break; + + default: + warning("unsupported language, switching back to English"); + _lang = 0; + break; + } + } + + return 0; +} + +KyraEngine_v1::~KyraEngine_v1() { + for (Common::Array::iterator i = _opcodes.begin(); i != _opcodes.end(); ++i) + delete *i; + _opcodes.clear(); + + delete _res; + delete _staticres; + delete _sound; + delete _text; + delete _timer; + delete _emc; + delete _debugger; +} + +void KyraEngine_v1::quitGame() { + debugC(9, kDebugLevelMain, "KyraEngine_v1::quitGame()"); + _quitFlag = true; + // Nothing to do here +} + +Common::Point KyraEngine_v1::getMousePos() const { + Common::Point mouse = _eventMan->getMousePos(); + + if (_flags.useHiResOverlay) { + mouse.x >>= 1; + mouse.y >>= 1; + } + + return mouse; +} + +void KyraEngine_v1::setMousePos(int x, int y) { + if (_flags.useHiResOverlay) { + x <<= 1; + y <<= 1; + } + _system->warpMouse(x, y); +} + +int KyraEngine_v1::setGameFlag(int flag) { + _flagsTable[flag >> 3] |= (1 << (flag & 7)); + return 1; +} + +int KyraEngine_v1::queryGameFlag(int flag) const { + return ((_flagsTable[flag >> 3] >> (flag & 7)) & 1); +} + +int KyraEngine_v1::resetGameFlag(int flag) { + _flagsTable[flag >> 3] &= ~(1 << (flag & 7)); + return 0; +} + +void KyraEngine_v1::delayUntil(uint32 timestamp, bool updateTimers, bool update, bool isMainLoop) { + while (_system->getMillis() < timestamp && !_quitFlag) { + if (timestamp - _system->getMillis() >= 10) + delay(10, update, isMainLoop); + } +} + +void KyraEngine_v1::delay(uint32 amount, bool update, bool isMainLoop) { + _system->delayMillis(amount); +} + +void KyraEngine_v1::delayWithTicks(int ticks) { + delay(ticks * _tickLength); +} + +void KyraEngine_v1::registerDefaultSettings() { + if (_flags.gameID != GI_KYRA3) + ConfMan.registerDefault("cdaudio", (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)); +} + +void KyraEngine_v1::readSettings() { + _configWalkspeed = ConfMan.getInt("walkspeed"); + _configMusic = 0; + + if (!ConfMan.getBool("music_mute")) { + _configMusic = 1; + if (_flags.gameID != GI_KYRA3 && ConfMan.getBool("cdaudio") && (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)) + _configMusic = 2; + } + _configSounds = ConfMan.getBool("sfx_mute") ? 0 : 1; + + if (_sound) { + _sound->enableMusic(_configMusic); + _sound->enableSFX(_configSounds); + } + + bool speechMute = ConfMan.getBool("speech_mute"); + bool subtitles = ConfMan.getBool("subtitles"); + + if (!speechMute && subtitles) + _configVoice = 2; // Voice & Text + else if (!speechMute && !subtitles) + _configVoice = 1; // Voice only + else + _configVoice = 0; // Text only + + setWalkspeed(_configWalkspeed); +} + +void KyraEngine_v1::writeSettings() { + bool speechMute, subtitles; + + ConfMan.setInt("walkspeed", _configWalkspeed); + ConfMan.setBool("music_mute", _configMusic == 0); + if (_flags.gameID != GI_KYRA3) + ConfMan.setBool("cdaudio", _configMusic == 2); + ConfMan.setBool("sfx_mute", _configSounds == 0); + + switch (_configVoice) { + case 0: // Text only + speechMute = true; + subtitles = true; + break; + case 1: // Voice only + speechMute = false; + subtitles = false; + break; + default: // Voice & Text + speechMute = false; + subtitles = true; + break; + } + + if (_sound) { + if (!_configMusic) + _sound->beginFadeOut(); + _sound->enableMusic(_configMusic); + _sound->enableSFX(_configSounds); + } + + ConfMan.setBool("speech_mute", speechMute); + ConfMan.setBool("subtitles", subtitles); + + ConfMan.flushToDisk(); +} + +bool KyraEngine_v1::speechEnabled() { + return _flags.isTalkie && (_configVoice == 1 || _configVoice == 2); +} + +bool KyraEngine_v1::textEnabled() { + return !_flags.isTalkie || (_configVoice == 0 || _configVoice == 2); +} + +inline int convertValueToMixer(int value) { + value -= 2; + return (value * Audio::Mixer::kMaxMixerVolume) / 95; +} + +inline int convertValueFromMixer(int value) { + return (value * 95) / Audio::Mixer::kMaxMixerVolume + 2; +} + +void KyraEngine_v1::setVolume(kVolumeEntry vol, uint8 value) { + switch (vol) { + case kVolumeMusic: + ConfMan.setInt("music_volume", convertValueToMixer(value)); + break; + + case kVolumeSfx: + ConfMan.setInt("sfx_volume", convertValueToMixer(value)); + break; + + case kVolumeSpeech: + ConfMan.setInt("speech_volume", convertValueToMixer(value)); + break; + } + + // Resetup mixer + _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); + _mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, ConfMan.getInt("speech_volume")); + if (_sound) + _sound->updateVolumeSettings(); +} + +uint8 KyraEngine_v1::getVolume(kVolumeEntry vol) { + switch (vol) { + case kVolumeMusic: + return convertValueFromMixer(ConfMan.getInt("music_volume")); + break; + + case kVolumeSfx: + return convertValueFromMixer(ConfMan.getInt("sfx_volume")); + break; + + case kVolumeSpeech: + if (speechEnabled()) + return convertValueFromMixer(ConfMan.getInt("speech_volume")); + else + return 2; + break; + } + + return 2; +} + +} // End of namespace Kyra + diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h new file mode 100644 index 0000000000..076c6bbd54 --- /dev/null +++ b/engines/kyra/kyra_v1.h @@ -0,0 +1,272 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef KYRA_KYRA_V1_H +#define KYRA_KYRA_V1_H + +#include "engines/engine.h" + +#include "common/array.h" +#include "common/events.h" + +#include "kyra/script.h" + +namespace Common { +class InSaveFile; +class OutSaveFile; +} // end of namespace Common + +class KyraMetaEngine; + +namespace Kyra { + +struct GameFlags { + Common::Language lang; + Common::Platform platform; + + bool isDemo : 1; + bool useAltShapeHeader : 1; // alternative shape header (uses 2 bytes more, those are unused though) + bool isTalkie : 1; + bool useHiResOverlay : 1; + bool useDigSound : 1; + + byte gameID; +}; + +enum { + GI_KYRA1 = 0, + GI_KYRA2 = 1, + GI_KYRA3 = 2 +}; + +struct AudioDataStruct { + const char * const *_fileList; + const int _fileListLen; + const void * const _cdaTracks; + const int _cdaNumTracks; +}; + +// TODO: this is just the start of makeing the debug output of the kyra engine a bit more useable +// in the future we maybe merge some flags and/or create new ones +enum kDebugLevels { + kDebugLevelScriptFuncs = 1 << 0, // prints debug output of o#_* functions + kDebugLevelScript = 1 << 1, // prints debug output of "EMCInterpreter" functions + kDebugLevelSprites = 1 << 2, // prints debug output of "Sprites" functions + kDebugLevelScreen = 1 << 3, // prints debug output of "Screen" functions + kDebugLevelSound = 1 << 4, // prints debug output of "Sound" functions + kDebugLevelAnimator = 1 << 5, // prints debug output of "ScreenAnimator" functions + kDebugLevelMain = 1 << 6, // prints debug output of common "KyraEngine(_v#)" functions && "TextDisplayer" functions + kDebugLevelGUI = 1 << 7, // prints debug output of "KyraEngine*" gui functions + kDebugLevelSequence = 1 << 8, // prints debug output of "SeqPlayer" functions + kDebugLevelMovie = 1 << 9, // prints debug output of movie specific funtions + kDebugLevelTimer = 1 << 10 // prints debug output of "TimerManager" functions +}; + +enum kMusicDataID { + kMusicIntro = 0, + kMusicIngame, + kMusicFinale +}; + +class Screen; +class Resource; +class Sound; +class Movie; +class TextDisplayer; +class StaticResource; +class TimerManager; +class Debugger; + +class KyraEngine_v1 : public Engine { +friend class Debugger; +friend class ::KyraMetaEngine; +friend class GUI; +public: + KyraEngine_v1(OSystem *system, const GameFlags &flags); + virtual ~KyraEngine_v1(); + + ::GUI::Debugger *getDebugger(); + + bool quit() const { return _quitFlag; } + + uint8 game() const { return _flags.gameID; } + const GameFlags &gameFlags() const { return _flags; } + + // access to Kyra specific functionallity + Resource *resource() { return _res; } + virtual Screen *screen() = 0; + virtual TextDisplayer *text() { return _text; } + Sound *sound() { return _sound; } + StaticResource *staticres() { return _staticres; } + TimerManager *timer() { return _timer; } + + uint32 tickLength() const { return _tickLength; } + + Common::RandomSource _rnd; + + // input + void setMousePos(int x, int y); + Common::Point getMousePos() const; + + // config specific + bool speechEnabled(); + bool textEnabled(); + + enum kVolumeEntry { + kVolumeMusic = 0, + kVolumeSfx = 1, + kVolumeSpeech = 2 + }; + + // volume reaches from 2 to 97 + void setVolume(kVolumeEntry vol, uint8 value); + uint8 getVolume(kVolumeEntry vol); + + // quit handling + virtual void quitGame(); + + // game flag handling + int setGameFlag(int flag); + int queryGameFlag(int flag) const; + int resetGameFlag(int flag); + + // sound + virtual void snd_playTheme(int file, int track); + virtual void snd_playSoundEffect(int id, int volume=0xFF); + virtual void snd_playWanderScoreViaMap(int command, int restart); + virtual void snd_playVoiceFile(int id) = 0; + virtual bool snd_voiceIsPlaying(); + virtual void snd_stopVoice(); + + // delay functionallity + virtual void delayUntil(uint32 timestamp, bool updateGameTimers = false, bool update = false, bool isMainLoop = false); + virtual void delay(uint32 millis, bool update = false, bool isMainLoop = false); + virtual void delayWithTicks(int ticks); + +protected: + virtual int go() = 0; + virtual int init(); + + // quit Handling + bool _quitFlag; + + // intern + Resource *_res; + Sound *_sound; + TextDisplayer *_text; + StaticResource *_staticres; + TimerManager *_timer; + EMCInterpreter *_emc; + Debugger *_debugger; + + // config specific + virtual void registerDefaultSettings(); + virtual void readSettings(); + virtual void writeSettings(); + + uint8 _configWalkspeed; + + int _configMusic; + bool _configSounds; + uint8 _configVoice; + + // game speed + virtual bool skipFlag() const = 0; + virtual void resetSkipFlag(bool removeEvent = true) = 0; + + uint16 _tickLength; + uint16 _gameSpeed; + + // timer + virtual void setupTimers() = 0; + + virtual void setWalkspeed(uint8 speed) = 0; + + // detection + GameFlags _flags; + int _lang; + + // opcode + virtual void setupOpcodeTable() = 0; + Common::Array _opcodes; + + // game flags + uint8 _flagsTable[100]; // TODO: check this value + + // sound + Common::String _speechFile; + + int _curMusicTheme; + int _curSfxFile; + int16 _lastMusicCommand; + + const int8 *_trackMap; + int _trackMapSize; + + // pathfinder + virtual int findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize); + int findSubPath(int x, int y, int toX, int toY, int *moveTable, int start, int end); + int getFacingFromPointToPoint(int x, int y, int toX, int toY); + int getOppositeFacingDirection(int dir); + void changePosTowardsFacing(int &x, int &y, int facing); + int getMoveTableSize(int *moveTable); + virtual bool lineIsPassable(int x, int y) = 0; + + static const int8 _addXPosTable[]; + static const int8 _addYPosTable[]; + + // save/load + int _gameToLoad; + + const char *getSavegameFilename(int num); + bool saveFileLoadable(int slot); + + struct SaveHeader { + Common::String description; + uint32 version; + byte gameID; + uint32 flags; + + bool originalSave; // savegame from original interpreter + bool oldHeader; // old scummvm save header + }; + + enum kReadSaveHeaderError { + kRSHENoError = 0, + kRSHEInvalidType = 1, + kRSHEInvalidVersion = 2, + kRSHEIoError = 3 + }; + + static kReadSaveHeaderError readSaveHeader(Common::InSaveFile *file, SaveHeader &header); + + Common::InSaveFile *openSaveForReading(const char *filename, SaveHeader &header); + Common::OutSaveFile *openSaveForWriting(const char *filename, const char *saveName) const; +}; + +} // End of namespace Kyra + +#endif + diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 1e1a30dec8..b2c44981ec 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -29,7 +29,7 @@ namespace Kyra { -KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const EngineDesc &desc) : KyraEngine(system, flags), _desc(desc) { +KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const EngineDesc &desc) : KyraEngine_v1(system, flags), _desc(desc) { memset(&_sceneAnims, 0, sizeof(_sceneAnims)); memset(&_sceneAnimMovie, 0, sizeof(_sceneAnimMovie)); diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index 484e044ac7..f487799744 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -26,7 +26,7 @@ #ifndef KYRA_KYRA_V2_H #define KYRA_KYRA_V2_H -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/gui.h" #include "kyra/wsamovie.h" @@ -53,7 +53,7 @@ struct ActiveItemAnim { class Screen_v2; -class KyraEngine_v2 : public KyraEngine { +class KyraEngine_v2 : public KyraEngine_v1 { friend class Debugger_v2; friend class GUI_v2; public: diff --git a/engines/kyra/module.mk b/engines/kyra/module.mk index 2a0e2adf41..b027459613 100644 --- a/engines/kyra/module.mk +++ b/engines/kyra/module.mk @@ -16,7 +16,7 @@ MODULE_OBJS := \ items_v2.o \ items_hof.o \ items_mr.o \ - kyra.o \ + kyra_v1.o \ kyra_lok.o \ kyra_v2.o \ kyra_hof.o \ @@ -26,7 +26,7 @@ MODULE_OBJS := \ saveload_lok.o \ saveload_hof.o \ saveload_mr.o \ - scene.o \ + scene_v1.o \ scene_lok.o \ scene_v2.o \ scene_hof.o \ diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index b2564221fc..58756ca430 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -36,7 +36,7 @@ namespace Kyra { -Resource::Resource(KyraEngine *vm) : _loaders(), _map(), _vm(vm) { +Resource::Resource(KyraEngine_v1 *vm) : _loaders(), _map(), _vm(vm) { initializeLoaders(); } diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index f414cacee8..843b0b423d 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -36,7 +36,7 @@ #include "common/stream.h" #include "common/ptr.h" -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/kyra_hof.h" namespace Kyra { @@ -88,7 +88,7 @@ protected: class Resource { public: - Resource(KyraEngine *vm); + Resource(KyraEngine_v1 *vm); ~Resource(); bool reset(); @@ -122,7 +122,7 @@ protected: LoaderList _loaders; ResFileMap _map; - KyraEngine *_vm; + KyraEngine_v1 *_vm; }; // TODO?: maybe prefix all things here with 'kKyra1' instead of 'k' @@ -239,7 +239,7 @@ class StaticResource { public: static const Common::String staticDataFilename() { return "kyra.dat"; } - StaticResource(KyraEngine *vm) : _vm(vm), _resList(), _fileLoader(0), _builtIn(0), _filenameTable(0) {} + StaticResource(KyraEngine_v1 *vm) : _vm(vm), _resList(), _fileLoader(0), _builtIn(0), _filenameTable(0) {} ~StaticResource() { deinit(); } static bool checkKyraDat(); @@ -265,7 +265,7 @@ public: private: void outputError(); - KyraEngine *_vm; + KyraEngine_v1 *_vm; struct FilenameTable; struct ResData; diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp index 590d40f2e3..22f934ba69 100644 --- a/engines/kyra/saveload.cpp +++ b/engines/kyra/saveload.cpp @@ -27,7 +27,7 @@ #include "common/savefile.h" #include "common/system.h" -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #define CURRENT_SAVE_VERSION 13 @@ -37,7 +37,7 @@ namespace Kyra { -KyraEngine::kReadSaveHeaderError KyraEngine::readSaveHeader(Common::InSaveFile *in, SaveHeader &header) { +KyraEngine_v1::kReadSaveHeaderError KyraEngine_v1::readSaveHeader(Common::InSaveFile *in, SaveHeader &header) { uint32 type = in->readUint32BE(); header.originalSave = false; header.oldHeader = false; @@ -108,14 +108,14 @@ KyraEngine::kReadSaveHeaderError KyraEngine::readSaveHeader(Common::InSaveFile * return (in->ioFailed() ? kRSHEIoError : kRSHENoError); } -Common::InSaveFile *KyraEngine::openSaveForReading(const char *filename, SaveHeader &header) { - debugC(9, kDebugLevelMain, "KyraEngine::openSaveForReading('%s', -)", filename); +Common::InSaveFile *KyraEngine_v1::openSaveForReading(const char *filename, SaveHeader &header) { + debugC(9, kDebugLevelMain, "KyraEngine_v1::openSaveForReading('%s', -)", filename); Common::InSaveFile *in = 0; if (!(in = _saveFileMan->openForLoading(filename))) return 0; - kReadSaveHeaderError errorCode = KyraEngine::readSaveHeader(in, header); + kReadSaveHeaderError errorCode = KyraEngine_v1::readSaveHeader(in, header); if (errorCode != kRSHENoError) { if (errorCode == kRSHEInvalidType) warning("No ScummVM Kyra engine savefile header."); @@ -159,8 +159,8 @@ Common::InSaveFile *KyraEngine::openSaveForReading(const char *filename, SaveHea return in; } -Common::OutSaveFile *KyraEngine::openSaveForWriting(const char *filename, const char *saveName) const { - debugC(9, kDebugLevelMain, "KyraEngine::openSaveForWriting('%s', '%s')", filename, saveName); +Common::OutSaveFile *KyraEngine_v1::openSaveForWriting(const char *filename, const char *saveName) const { + debugC(9, kDebugLevelMain, "KyraEngine_v1::openSaveForWriting('%s', '%s')", filename, saveName); if (_quitFlag) return 0; @@ -191,7 +191,7 @@ Common::OutSaveFile *KyraEngine::openSaveForWriting(const char *filename, const return out; } -const char *KyraEngine::getSavegameFilename(int num) { +const char *KyraEngine_v1::getSavegameFilename(int num) { static Common::String filename; assert(num >= 0 && num <= 999); @@ -204,7 +204,7 @@ const char *KyraEngine::getSavegameFilename(int num) { return filename.c_str(); } -bool KyraEngine::saveFileLoadable(int slot) { +bool KyraEngine_v1::saveFileLoadable(int slot) { if (slot < 0 || slot > 999) return false; diff --git a/engines/kyra/scene.cpp b/engines/kyra/scene.cpp deleted file mode 100644 index e96a44cb2e..0000000000 --- a/engines/kyra/scene.cpp +++ /dev/null @@ -1,383 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "kyra/kyra.h" -#include "kyra/screen.h" - -namespace Kyra { - -int KyraEngine::findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize) { - debugC(9, kDebugLevelMain, "KyraEngine::findWay(%d, %d, %d, %d, %p, %d)", x, y, toX, toY, (const void *)moveTable, moveTableSize); - x &= 0xFFFC; toX &= 0xFFFC; - y &= 0xFFFE; toY &= 0xFFFE; - x = (int16)x; y = (int16)y; toX = (int16)toX; toY = (int16)toY; - - if (x == toY && y == toY) { - moveTable[0] = 8; - return 0; - } - - int curX = x; - int curY = y; - int tempValue = 0; - int lastUsedEntry = 0; - int *pathTable1 = new int[0x7D0]; - int *pathTable2 = new int[0x7D0]; - assert(pathTable1 && pathTable2); - - while (true) { - int newFacing = getFacingFromPointToPoint(x, y, toX, toY); - changePosTowardsFacing(curX, curY, newFacing); - - if (curX == toX && curY == toY) { - if (!lineIsPassable(curX, curY)) - break; - moveTable[lastUsedEntry++] = newFacing; - break; - } - - if (lineIsPassable(curX, curY)) { - if (lastUsedEntry == moveTableSize) { - delete[] pathTable1; - delete[] pathTable2; - return 0x7D00; - } - // debug drawing - /*if (curX >= 0 && curY >= 0 && curX < 320 && curY < 200) { - screen()->setPagePixel(0, curX, curY, 11); - screen()->updateScreen(); - delayWithTicks(5); - }*/ - moveTable[lastUsedEntry++] = newFacing; - x = curX; - y = curY; - continue; - } - - int temp = 0; - while (true) { - newFacing = getFacingFromPointToPoint(curX, curY, toX, toY); - changePosTowardsFacing(curX, curY, newFacing); - // debug drawing - /*if (curX >= 0 && curY >= 0 && curX < 320 && curY < 200) { - screen()->setPagePixel(0, curX, curY, 8); - screen()->updateScreen(); - delayWithTicks(5); - }*/ - - if (!lineIsPassable(curX, curY)) { - if (curX != toX || curY != toY) - continue; - } - - if (curX == toX && curY == toY) { - if (!lineIsPassable(curX, curY)) { - tempValue = 0; - temp = 0; - break; - } - } - - temp = findSubPath(x, y, curX, curY, pathTable1, 1, 0x7D0); - tempValue = findSubPath(x, y, curX, curY, pathTable2, 0, 0x7D0); - if (curX == toX && curY == toY) { - if (temp == 0x7D00 && tempValue == 0x7D00) { - delete[] pathTable1; - delete[] pathTable2; - return 0x7D00; - } - } - - if (temp != 0x7D00 || tempValue != 0x7D00) - break; - } - - if (temp < tempValue) { - if (lastUsedEntry + temp > moveTableSize) { - delete[] pathTable1; - delete[] pathTable2; - return 0x7D00; - } - memcpy(&moveTable[lastUsedEntry], pathTable1, temp*sizeof(int)); - lastUsedEntry += temp; - } else { - if (lastUsedEntry + tempValue > moveTableSize) { - delete[] pathTable1; - delete[] pathTable2; - return 0x7D00; - } - memcpy(&moveTable[lastUsedEntry], pathTable2, tempValue*sizeof(int)); - lastUsedEntry += tempValue; - } - x = curX; - y = curY; - if (curX == toX && curY == toY) - break; - } - - delete[] pathTable1; - delete[] pathTable2; - moveTable[lastUsedEntry] = 8; - return lastUsedEntry; -} - -int KyraEngine::findSubPath(int x, int y, int toX, int toY, int *moveTable, int start, int end) { - debugC(9, kDebugLevelMain, "KyraEngine::findSubPath(%d, %d, %d, %d, %p, %d, %d)", x, y, toX, toY, (const void *)moveTable, start, end); - // only used for debug specific code - //static uint16 unkTable[] = { 8, 5 }; - static const int8 facingTable1[] = { 7, 0, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 0 }; - static const int8 facingTable2[] = { -1, 0, -1, 2, -1, 4, -1, 6, -1, 2, -1, 4, -1, 6, -1, 0 }; - static const int8 facingTable3[] = { 2, 4, 4, 6, 6, 0, 0, 2, 6, 6, 0, 0, 2, 2, 4, 4 }; - static const int8 addPosTableX[] = { -1, 0, -1, 4, -1, 0, -1, -4, -1, -4, -1, 0, -1, 4, -1, 0 }; - static const int8 addPosTableY[] = { -1, 2, -1, 0, -1, -2, -1, 0, -1, 0, -1, 2, -1, 0, -1, -2 }; - - // debug specific - /*++unkTable[start]; - while (screen()->getPalette(0)[unkTable[start]] != 0x0F) { - ++unkTable[start]; - }*/ - - int xpos1 = x, xpos2 = x; - int ypos1 = y, ypos2 = y; - int newFacing = getFacingFromPointToPoint(x, y, toX, toY); - int position = 0; - - while (position != end) { - int newFacing2 = newFacing; - while (true) { - changePosTowardsFacing(xpos1, ypos1, facingTable1[start*8 + newFacing2]); - if (!lineIsPassable(xpos1, ypos1)) { - if (facingTable1[start*8 + newFacing2] == newFacing) - return 0x7D00; - newFacing2 = facingTable1[start*8 + newFacing2]; - xpos1 = x; - ypos1 = y; - continue; - } - newFacing = facingTable1[start*8 + newFacing2]; - break; - } - // debug drawing - /*if (xpos1 >= 0 && ypos1 >= 0 && xpos1 < 320 && ypos1 < 200) { - screen()->setPagePixel(0, xpos1, ypos1, unkTable[start]); - screen()->updateScreen(); - delayWithTicks(5); - }*/ - if (newFacing & 1) { - int temp = xpos1 + addPosTableX[newFacing + start * 8]; - if (toX == temp) { - temp = ypos1 + addPosTableY[newFacing + start * 8]; - if (toY == temp) { - moveTable[position++] = facingTable2[newFacing + start * 8]; - return position; - } - } - } - - moveTable[position++] = newFacing; - x = xpos1; - y = ypos1; - - if (x == toX && y == toY) - return position; - - if (xpos1 == xpos2 && ypos1 == ypos2) - break; - - newFacing = facingTable3[start*8 + newFacing]; - } - - return 0x7D00; -} - -int KyraEngine::getFacingFromPointToPoint(int x, int y, int toX, int toY) { - debugC(9, kDebugLevelMain, "KyraEngine::getFacingFromPointToPoint(%d, %d, %d, %d)", x, y, toX, toY); - static const int facingTable[] = { - 1, 0, 1, 2, 3, 4, 3, 2, 7, 0, 7, 6, 5, 4, 5, 6 - }; - - int facingEntry = 0; - int ydiff = y - toY; - if (ydiff < 0) { - ++facingEntry; - ydiff = -ydiff; - } - facingEntry <<= 1; - - int xdiff = toX - x; - if (xdiff < 0) { - ++facingEntry; - xdiff = -xdiff; - } - - if (xdiff >= ydiff) { - int temp = ydiff; - ydiff = xdiff; - xdiff = temp; - - facingEntry <<= 1; - } else { - facingEntry <<= 1; - facingEntry += 1; - } - int temp = (ydiff + 1) >> 1; - - if (xdiff < temp) { - facingEntry <<= 1; - facingEntry += 1; - } else { - facingEntry <<= 1; - } - - assert(facingEntry < ARRAYSIZE(facingTable)); - return facingTable[facingEntry]; -} - - -int KyraEngine::getOppositeFacingDirection(int dir) { - debugC(9, kDebugLevelMain, "KyraEngine::getOppositeFacingDirection(%d)", dir); - switch (dir) { - case 0: - return 2; - case 1: - return 1; - case 3: - return 7; - case 4: - return 6; - case 5: - return 5; - case 6: - return 4; - case 7: - return 3; - default: - break; - } - return 0; -} - -void KyraEngine::changePosTowardsFacing(int &x, int &y, int facing) { - debugC(9, kDebugLevelMain, "KyraEngine::changePosTowardsFacing(%d, %d, %d)", x, y, facing); - x += _addXPosTable[facing]; - y += _addYPosTable[facing]; -} - -int KyraEngine::getMoveTableSize(int *moveTable) { - debugC(9, kDebugLevelMain, "KyraEngine::getMoveTableSize(%p)", (const void *)moveTable); - int retValue = 0; - if (moveTable[0] == 8) - return 0; - - static const int facingTable[] = { - 4, 5, 6, 7, 0, 1, 2, 3 - }; - static const int unkTable[] = { - -1, -1, 1, 2, -1, 6, 7, -1, - -1, -1, -1, -1, 2, -1, 0, -1, - 1, -1, -1, -1, 3, 4, -1, 0, - 2, -1, -1, -1, -1, -1, 4, -1, - -1, 2, 3, -1, -1, -1, 5, 6, - 6, -1, 4, -1, -1, -1, -1, -1, - 7, 0, -1, 4, 5, -1, -1, -1, - -1, -1, 0, -1, 6, -1, -1, -1 - }; - - int *oldPosition = moveTable; - int *tempPosition = moveTable; - int *curPosition = moveTable + 1; - retValue = 1; - - while (*curPosition != 8) { - if (*oldPosition == facingTable[*curPosition]) { - retValue -= 2; - *oldPosition = 9; - *curPosition = 9; - - while (tempPosition != moveTable) { - --tempPosition; - if (*tempPosition != 9) - break; - } - - if (tempPosition == moveTable && *tempPosition == 9) { - while (*tempPosition != 8 && *tempPosition == 9) - ++tempPosition; - - if (*tempPosition == 8) - return 0; - } - - oldPosition = tempPosition; - curPosition = oldPosition+1; - - while (*curPosition != 8 && *curPosition == 9) - ++curPosition; - - continue; - } - - if (unkTable[*curPosition+((*oldPosition)*8)] != -1) { - --retValue; - *oldPosition = unkTable[*curPosition+((*oldPosition)*8)]; - *curPosition = 9; - - if (tempPosition != oldPosition) { - curPosition = oldPosition; - oldPosition = tempPosition; - while (true) { - if (tempPosition == moveTable) - break; - - --tempPosition; - if (*tempPosition != 9) - break; - - } - } else { - while (true) { - ++curPosition; - if (*curPosition != 9) - break; - } - } - continue; - } - - tempPosition = oldPosition; - oldPosition = curPosition; - ++retValue; - - while (true) { - ++curPosition; - if (*curPosition != 9) - break; - } - } - - return retValue; -} - -} // end of namespace Kyra diff --git a/engines/kyra/scene_lok.cpp b/engines/kyra/scene_lok.cpp index 36535eba60..085332b525 100644 --- a/engines/kyra/scene_lok.cpp +++ b/engines/kyra/scene_lok.cpp @@ -1166,7 +1166,7 @@ void KyraEngine_LoK::setCharactersPositions(int character) { int KyraEngine_LoK::findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize) { debugC(9, kDebugLevelMain, "KyraEngine_LoK::findWay(%d, %d, %d, %d, %p, %d)", x, y, toX, toY, (const void *)moveTable, moveTableSize); - int ret = KyraEngine::findWay(x, y, toX, toY, moveTable, moveTableSize); + int ret = KyraEngine_v1::findWay(x, y, toX, toY, moveTable, moveTableSize); if (ret == 0x7D00) return 0; return getMoveTableSize(moveTable); diff --git a/engines/kyra/scene_v1.cpp b/engines/kyra/scene_v1.cpp new file mode 100644 index 0000000000..65171ad831 --- /dev/null +++ b/engines/kyra/scene_v1.cpp @@ -0,0 +1,383 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "kyra/kyra_v1.h" +#include "kyra/screen.h" + +namespace Kyra { + +int KyraEngine_v1::findWay(int x, int y, int toX, int toY, int *moveTable, int moveTableSize) { + debugC(9, kDebugLevelMain, "KyraEngine_v1::findWay(%d, %d, %d, %d, %p, %d)", x, y, toX, toY, (const void *)moveTable, moveTableSize); + x &= 0xFFFC; toX &= 0xFFFC; + y &= 0xFFFE; toY &= 0xFFFE; + x = (int16)x; y = (int16)y; toX = (int16)toX; toY = (int16)toY; + + if (x == toY && y == toY) { + moveTable[0] = 8; + return 0; + } + + int curX = x; + int curY = y; + int tempValue = 0; + int lastUsedEntry = 0; + int *pathTable1 = new int[0x7D0]; + int *pathTable2 = new int[0x7D0]; + assert(pathTable1 && pathTable2); + + while (true) { + int newFacing = getFacingFromPointToPoint(x, y, toX, toY); + changePosTowardsFacing(curX, curY, newFacing); + + if (curX == toX && curY == toY) { + if (!lineIsPassable(curX, curY)) + break; + moveTable[lastUsedEntry++] = newFacing; + break; + } + + if (lineIsPassable(curX, curY)) { + if (lastUsedEntry == moveTableSize) { + delete[] pathTable1; + delete[] pathTable2; + return 0x7D00; + } + // debug drawing + /*if (curX >= 0 && curY >= 0 && curX < 320 && curY < 200) { + screen()->setPagePixel(0, curX, curY, 11); + screen()->updateScreen(); + delayWithTicks(5); + }*/ + moveTable[lastUsedEntry++] = newFacing; + x = curX; + y = curY; + continue; + } + + int temp = 0; + while (true) { + newFacing = getFacingFromPointToPoint(curX, curY, toX, toY); + changePosTowardsFacing(curX, curY, newFacing); + // debug drawing + /*if (curX >= 0 && curY >= 0 && curX < 320 && curY < 200) { + screen()->setPagePixel(0, curX, curY, 8); + screen()->updateScreen(); + delayWithTicks(5); + }*/ + + if (!lineIsPassable(curX, curY)) { + if (curX != toX || curY != toY) + continue; + } + + if (curX == toX && curY == toY) { + if (!lineIsPassable(curX, curY)) { + tempValue = 0; + temp = 0; + break; + } + } + + temp = findSubPath(x, y, curX, curY, pathTable1, 1, 0x7D0); + tempValue = findSubPath(x, y, curX, curY, pathTable2, 0, 0x7D0); + if (curX == toX && curY == toY) { + if (temp == 0x7D00 && tempValue == 0x7D00) { + delete[] pathTable1; + delete[] pathTable2; + return 0x7D00; + } + } + + if (temp != 0x7D00 || tempValue != 0x7D00) + break; + } + + if (temp < tempValue) { + if (lastUsedEntry + temp > moveTableSize) { + delete[] pathTable1; + delete[] pathTable2; + return 0x7D00; + } + memcpy(&moveTable[lastUsedEntry], pathTable1, temp*sizeof(int)); + lastUsedEntry += temp; + } else { + if (lastUsedEntry + tempValue > moveTableSize) { + delete[] pathTable1; + delete[] pathTable2; + return 0x7D00; + } + memcpy(&moveTable[lastUsedEntry], pathTable2, tempValue*sizeof(int)); + lastUsedEntry += tempValue; + } + x = curX; + y = curY; + if (curX == toX && curY == toY) + break; + } + + delete[] pathTable1; + delete[] pathTable2; + moveTable[lastUsedEntry] = 8; + return lastUsedEntry; +} + +int KyraEngine_v1::findSubPath(int x, int y, int toX, int toY, int *moveTable, int start, int end) { + debugC(9, kDebugLevelMain, "KyraEngine_v1::findSubPath(%d, %d, %d, %d, %p, %d, %d)", x, y, toX, toY, (const void *)moveTable, start, end); + // only used for debug specific code + //static uint16 unkTable[] = { 8, 5 }; + static const int8 facingTable1[] = { 7, 0, 1, 2, 3, 4, 5, 6, 1, 2, 3, 4, 5, 6, 7, 0 }; + static const int8 facingTable2[] = { -1, 0, -1, 2, -1, 4, -1, 6, -1, 2, -1, 4, -1, 6, -1, 0 }; + static const int8 facingTable3[] = { 2, 4, 4, 6, 6, 0, 0, 2, 6, 6, 0, 0, 2, 2, 4, 4 }; + static const int8 addPosTableX[] = { -1, 0, -1, 4, -1, 0, -1, -4, -1, -4, -1, 0, -1, 4, -1, 0 }; + static const int8 addPosTableY[] = { -1, 2, -1, 0, -1, -2, -1, 0, -1, 0, -1, 2, -1, 0, -1, -2 }; + + // debug specific + /*++unkTable[start]; + while (screen()->getPalette(0)[unkTable[start]] != 0x0F) { + ++unkTable[start]; + }*/ + + int xpos1 = x, xpos2 = x; + int ypos1 = y, ypos2 = y; + int newFacing = getFacingFromPointToPoint(x, y, toX, toY); + int position = 0; + + while (position != end) { + int newFacing2 = newFacing; + while (true) { + changePosTowardsFacing(xpos1, ypos1, facingTable1[start*8 + newFacing2]); + if (!lineIsPassable(xpos1, ypos1)) { + if (facingTable1[start*8 + newFacing2] == newFacing) + return 0x7D00; + newFacing2 = facingTable1[start*8 + newFacing2]; + xpos1 = x; + ypos1 = y; + continue; + } + newFacing = facingTable1[start*8 + newFacing2]; + break; + } + // debug drawing + /*if (xpos1 >= 0 && ypos1 >= 0 && xpos1 < 320 && ypos1 < 200) { + screen()->setPagePixel(0, xpos1, ypos1, unkTable[start]); + screen()->updateScreen(); + delayWithTicks(5); + }*/ + if (newFacing & 1) { + int temp = xpos1 + addPosTableX[newFacing + start * 8]; + if (toX == temp) { + temp = ypos1 + addPosTableY[newFacing + start * 8]; + if (toY == temp) { + moveTable[position++] = facingTable2[newFacing + start * 8]; + return position; + } + } + } + + moveTable[position++] = newFacing; + x = xpos1; + y = ypos1; + + if (x == toX && y == toY) + return position; + + if (xpos1 == xpos2 && ypos1 == ypos2) + break; + + newFacing = facingTable3[start*8 + newFacing]; + } + + return 0x7D00; +} + +int KyraEngine_v1::getFacingFromPointToPoint(int x, int y, int toX, int toY) { + debugC(9, kDebugLevelMain, "KyraEngine_v1::getFacingFromPointToPoint(%d, %d, %d, %d)", x, y, toX, toY); + static const int facingTable[] = { + 1, 0, 1, 2, 3, 4, 3, 2, 7, 0, 7, 6, 5, 4, 5, 6 + }; + + int facingEntry = 0; + int ydiff = y - toY; + if (ydiff < 0) { + ++facingEntry; + ydiff = -ydiff; + } + facingEntry <<= 1; + + int xdiff = toX - x; + if (xdiff < 0) { + ++facingEntry; + xdiff = -xdiff; + } + + if (xdiff >= ydiff) { + int temp = ydiff; + ydiff = xdiff; + xdiff = temp; + + facingEntry <<= 1; + } else { + facingEntry <<= 1; + facingEntry += 1; + } + int temp = (ydiff + 1) >> 1; + + if (xdiff < temp) { + facingEntry <<= 1; + facingEntry += 1; + } else { + facingEntry <<= 1; + } + + assert(facingEntry < ARRAYSIZE(facingTable)); + return facingTable[facingEntry]; +} + + +int KyraEngine_v1::getOppositeFacingDirection(int dir) { + debugC(9, kDebugLevelMain, "KyraEngine_v1::getOppositeFacingDirection(%d)", dir); + switch (dir) { + case 0: + return 2; + case 1: + return 1; + case 3: + return 7; + case 4: + return 6; + case 5: + return 5; + case 6: + return 4; + case 7: + return 3; + default: + break; + } + return 0; +} + +void KyraEngine_v1::changePosTowardsFacing(int &x, int &y, int facing) { + debugC(9, kDebugLevelMain, "KyraEngine_v1::changePosTowardsFacing(%d, %d, %d)", x, y, facing); + x += _addXPosTable[facing]; + y += _addYPosTable[facing]; +} + +int KyraEngine_v1::getMoveTableSize(int *moveTable) { + debugC(9, kDebugLevelMain, "KyraEngine_v1::getMoveTableSize(%p)", (const void *)moveTable); + int retValue = 0; + if (moveTable[0] == 8) + return 0; + + static const int facingTable[] = { + 4, 5, 6, 7, 0, 1, 2, 3 + }; + static const int unkTable[] = { + -1, -1, 1, 2, -1, 6, 7, -1, + -1, -1, -1, -1, 2, -1, 0, -1, + 1, -1, -1, -1, 3, 4, -1, 0, + 2, -1, -1, -1, -1, -1, 4, -1, + -1, 2, 3, -1, -1, -1, 5, 6, + 6, -1, 4, -1, -1, -1, -1, -1, + 7, 0, -1, 4, 5, -1, -1, -1, + -1, -1, 0, -1, 6, -1, -1, -1 + }; + + int *oldPosition = moveTable; + int *tempPosition = moveTable; + int *curPosition = moveTable + 1; + retValue = 1; + + while (*curPosition != 8) { + if (*oldPosition == facingTable[*curPosition]) { + retValue -= 2; + *oldPosition = 9; + *curPosition = 9; + + while (tempPosition != moveTable) { + --tempPosition; + if (*tempPosition != 9) + break; + } + + if (tempPosition == moveTable && *tempPosition == 9) { + while (*tempPosition != 8 && *tempPosition == 9) + ++tempPosition; + + if (*tempPosition == 8) + return 0; + } + + oldPosition = tempPosition; + curPosition = oldPosition+1; + + while (*curPosition != 8 && *curPosition == 9) + ++curPosition; + + continue; + } + + if (unkTable[*curPosition+((*oldPosition)*8)] != -1) { + --retValue; + *oldPosition = unkTable[*curPosition+((*oldPosition)*8)]; + *curPosition = 9; + + if (tempPosition != oldPosition) { + curPosition = oldPosition; + oldPosition = tempPosition; + while (true) { + if (tempPosition == moveTable) + break; + + --tempPosition; + if (*tempPosition != 9) + break; + + } + } else { + while (true) { + ++curPosition; + if (*curPosition != 9) + break; + } + } + continue; + } + + tempPosition = oldPosition; + oldPosition = curPosition; + ++retValue; + + while (true) { + ++curPosition; + if (*curPosition != 9) + break; + } + } + + return retValue; +} + +} // end of namespace Kyra diff --git a/engines/kyra/scene_v2.cpp b/engines/kyra/scene_v2.cpp index 5d811bcf44..7072cfc9a5 100644 --- a/engines/kyra/scene_v2.cpp +++ b/engines/kyra/scene_v2.cpp @@ -90,7 +90,7 @@ int KyraEngine_v2::findWay(int x, int y, int toX, int toY, int *moveTable, int m debugC(9, kDebugLevelMain, "KyraEngine_v2::findWay(%d, %d, %d, %d, %p, %d)", x, y, toX, toY, (const void *)moveTable, moveTableSize); x &= ~3; toX &= ~3; y &= ~1; toY &= ~1; - int size = KyraEngine::findWay(x, y, toX, toY, moveTable, moveTableSize); + int size = KyraEngine_v1::findWay(x, y, toX, toY, moveTable, moveTableSize); static bool usePostProcess = false; if (size && !usePostProcess) { usePostProcess = true; diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 568befac1e..6e250f292a 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -28,12 +28,12 @@ #include "common/system.h" #include "graphics/cursorman.h" #include "kyra/screen.h" -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/resource.h" namespace Kyra { -Screen::Screen(KyraEngine *vm, OSystem *system) +Screen::Screen(KyraEngine_v1 *vm, OSystem *system) : _system(system), _vm(vm), _sjisInvisibleColor(0) { _debugEnabled = false; } @@ -2644,7 +2644,7 @@ void Screen::shakeScreen(int times) { } void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *palData, bool skip) { - debugC(9, kDebugLevelScreen, "KyraEngine::loadBitmap('%s', %d, %d, %p, %d)", filename, tempPage, dstPage, (void *)palData, skip); + debugC(9, kDebugLevelScreen, "KyraEngine_v1::loadBitmap('%s', %d, %d, %p, %d)", filename, tempPage, dstPage, (void *)palData, skip); uint32 fileSize; uint8 *srcData = _vm->resource()->fileData(filename, &fileSize); diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h index bf23747daf..f8c85a2bac 100644 --- a/engines/kyra/screen.h +++ b/engines/kyra/screen.h @@ -35,7 +35,7 @@ namespace Kyra { typedef Common::Functor0 UpdateFunctor; -class KyraEngine; +class KyraEngine_v1; struct Rect { int x, y; @@ -96,7 +96,7 @@ public: FID_NUM }; - Screen(KyraEngine *vm, OSystem *system); + Screen(KyraEngine_v1 *vm, OSystem *system); virtual ~Screen(); // init @@ -301,7 +301,7 @@ protected: void addDirtyRect(int x, int y, int w, int h); OSystem *_system; - KyraEngine *_vm; + KyraEngine_v1 *_vm; // shape int drawShapeMarginNoScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt); diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp index 13186b0167..e26ef87bad 100644 --- a/engines/kyra/screen_v2.cpp +++ b/engines/kyra/screen_v2.cpp @@ -29,7 +29,7 @@ namespace Kyra { -Screen_v2::Screen_v2(KyraEngine *vm, OSystem *system) : Screen(vm, system), _wsaFrameAnimBuffer(0) { +Screen_v2::Screen_v2(KyraEngine_v1 *vm, OSystem *system) : Screen(vm, system), _wsaFrameAnimBuffer(0) { _wsaFrameAnimBuffer = new uint8[1024]; assert(_wsaFrameAnimBuffer); } diff --git a/engines/kyra/screen_v2.h b/engines/kyra/screen_v2.h index caec6af992..f624228445 100644 --- a/engines/kyra/screen_v2.h +++ b/engines/kyra/screen_v2.h @@ -33,7 +33,7 @@ namespace Kyra { class Screen_v2 : public Screen { public: - Screen_v2(KyraEngine *vm, OSystem *system); + Screen_v2(KyraEngine_v1 *vm, OSystem *system); ~Screen_v2(); // screen page handling diff --git a/engines/kyra/script.cpp b/engines/kyra/script.cpp index e00ac6878d..ef3e259cfa 100644 --- a/engines/kyra/script.cpp +++ b/engines/kyra/script.cpp @@ -28,12 +28,12 @@ #include "common/stream.h" #include "common/util.h" #include "common/system.h" -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/resource.h" #include "kyra/script.h" namespace Kyra { -EMCInterpreter::EMCInterpreter(KyraEngine *vm) : _vm(vm) { +EMCInterpreter::EMCInterpreter(KyraEngine_v1 *vm) : _vm(vm) { #define COMMAND(x) { &EMCInterpreter::x, #x } static CommandEntry commandProcs[] = { // 0x00 diff --git a/engines/kyra/script.h b/engines/kyra/script.h index df86ec79c3..de52093f66 100644 --- a/engines/kyra/script.h +++ b/engines/kyra/script.h @@ -27,6 +27,7 @@ #define KYRA_SCRIPT_H #include "common/stream.h" +#include "common/array.h" #include "common/func.h" namespace Kyra { @@ -63,7 +64,7 @@ struct EMCState { #define AVTL_CHUNK 0x4C545641 class Resource; -class KyraEngine; +class KyraEngine_v1; class ScriptFileParser { public: @@ -89,7 +90,7 @@ private: class EMCInterpreter { public: - EMCInterpreter(KyraEngine *vm); + EMCInterpreter(KyraEngine_v1 *vm); bool load(const char *filename, EMCData *data, const Common::Array *opcodes); void unload(EMCData *data); @@ -101,7 +102,7 @@ public: bool run(EMCState *script); protected: - KyraEngine *_vm; + KyraEngine_v1 *_vm; int16 _parameter; typedef void (EMCInterpreter::*CommandProc)(EMCState*); diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp index fa9d54e8be..66390047b4 100644 --- a/engines/kyra/script_tim.cpp +++ b/engines/kyra/script_tim.cpp @@ -31,7 +31,7 @@ namespace Kyra { -TIMInterpreter::TIMInterpreter(KyraEngine *vm, OSystem *system) : _vm(vm), _system(system), _currentTim(0) { +TIMInterpreter::TIMInterpreter(KyraEngine_v1 *vm, OSystem *system) : _vm(vm), _system(system), _currentTim(0) { #define COMMAND(x) { &TIMInterpreter::x, #x } #define COMMAND_UNIMPL() { 0, 0 } static CommandEntry commandProcs[] = { diff --git a/engines/kyra/script_tim.h b/engines/kyra/script_tim.h index 2ffbf89d65..957bffcc3c 100644 --- a/engines/kyra/script_tim.h +++ b/engines/kyra/script_tim.h @@ -26,7 +26,7 @@ #ifndef KYRA_SCRIPT_TIM_H #define KYRA_SCRIPT_TIM_H -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "common/array.h" #include "common/func.h" @@ -57,7 +57,7 @@ struct TIM { class TIMInterpreter { public: - TIMInterpreter(KyraEngine *vm, OSystem *system); + TIMInterpreter(KyraEngine_v1 *vm, OSystem *system); TIM *load(const char *filename, const Common::Array *opcodes); void unload(TIM *&tim) const; @@ -70,7 +70,7 @@ public: void play(const char *filename); private: - KyraEngine *_vm; + KyraEngine_v1 *_vm; OSystem *_system; TIM *_currentTim; diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index fc0959f444..d34014ef33 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -23,7 +23,7 @@ * */ -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/kyra_hof.h" #include "kyra/screen.h" #include "kyra/wsamovie.h" diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index 90cbd5e539..a8566a7309 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -40,7 +40,7 @@ namespace Kyra { -Sound::Sound(KyraEngine *vm, Audio::Mixer *mixer) +Sound::Sound(KyraEngine_v1 *vm, Audio::Mixer *mixer) : _vm(vm), _mixer(mixer), _soundChannels(), _musicEnabled(1), _sfxEnabled(true), _soundDataList(0) { } @@ -145,7 +145,7 @@ bool Sound::voiceIsPlaying(const char *file) { #pragma mark - -SoundMidiPC::SoundMidiPC(KyraEngine *vm, Audio::Mixer *mixer, MidiDriver *driver) : Sound(vm, mixer) { +SoundMidiPC::SoundMidiPC(KyraEngine_v1 *vm, Audio::Mixer *mixer, MidiDriver *driver) : Sound(vm, mixer) { _driver = driver; _passThrough = false; @@ -467,8 +467,8 @@ void SoundMidiPC::beginFadeOut() { #pragma mark - -void KyraEngine::snd_playTheme(int file, int track) { - debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine::snd_playTheme(%d, %d)", file, track); +void KyraEngine_v1::snd_playTheme(int file, int track) { + debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_playTheme(%d, %d)", file, track); if (_curMusicTheme == file) return; @@ -478,13 +478,13 @@ void KyraEngine::snd_playTheme(int file, int track) { _sound->playTrack(track); } -void KyraEngine::snd_playSoundEffect(int track, int volume) { - debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine::snd_playSoundEffect(%d, %d)", track, volume); +void KyraEngine_v1::snd_playSoundEffect(int track, int volume) { + debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_playSoundEffect(%d, %d)", track, volume); _sound->playSoundEffect(track); } -void KyraEngine::snd_playWanderScoreViaMap(int command, int restart) { - debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine::snd_playWanderScoreViaMap(%d, %d)", command, restart); +void KyraEngine_v1::snd_playWanderScoreViaMap(int command, int restart) { + debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_playWanderScoreViaMap(%d, %d)", command, restart); if (restart) _lastMusicCommand = -1; @@ -527,13 +527,13 @@ void KyraEngine::snd_playWanderScoreViaMap(int command, int restart) { _lastMusicCommand = command; } -void KyraEngine::snd_stopVoice() { - debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine::snd_stopVoice()"); +void KyraEngine_v1::snd_stopVoice() { + debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_stopVoice()"); _sound->voiceStop(_speechFile.empty() ? 0 : _speechFile.c_str()); } -bool KyraEngine::snd_voiceIsPlaying() { - debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine::snd_voiceIsPlaying()"); +bool KyraEngine_v1::snd_voiceIsPlaying() { + debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_voiceIsPlaying()"); return _sound->voiceIsPlaying(_speechFile.empty() ? 0 : _speechFile.c_str()); } diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h index e1ae29cba3..595619c7e9 100644 --- a/engines/kyra/sound.h +++ b/engines/kyra/sound.h @@ -42,7 +42,7 @@ #ifndef KYRA_SOUND_H #define KYRA_SOUND_H -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "common/scummsys.h" #include "common/file.h" @@ -66,7 +66,7 @@ namespace Kyra { */ class Sound { public: - Sound(KyraEngine *vm, Audio::Mixer *mixer); + Sound(KyraEngine_v1 *vm, Audio::Mixer *mixer); virtual ~Sound(); enum kType { @@ -209,7 +209,7 @@ protected: int _currentTheme; - KyraEngine *_vm; + KyraEngine_v1 *_vm; Audio::Mixer *_mixer; private: @@ -243,7 +243,7 @@ class AdlibDriver; */ class SoundAdlibPC : public Sound { public: - SoundAdlibPC(KyraEngine *vm, Audio::Mixer *mixer); + SoundAdlibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer); ~SoundAdlibPC(); kType getMusicType() const { return kAdlib; } @@ -298,7 +298,7 @@ private: */ class SoundMidiPC : public MidiDriver, public Sound { public: - SoundMidiPC(KyraEngine *vm, Audio::Mixer *mixer, MidiDriver *driver); + SoundMidiPC(KyraEngine_v1 *vm, Audio::Mixer *mixer, MidiDriver *driver); ~SoundMidiPC(); kType getMusicType() const { return isMT32() ? kMidiMT32 : kMidiGM; } @@ -378,7 +378,7 @@ private: class SoundTowns_EuphonyDriver; class SoundTowns : public MidiDriver, public Sound { public: - SoundTowns(KyraEngine *vm, Audio::Mixer *mixer); + SoundTowns(KyraEngine_v1 *vm, Audio::Mixer *mixer); ~SoundTowns(); kType getMusicType() const { return kTowns; } @@ -435,7 +435,7 @@ private: //class SoundTowns_v2_TwnDriver; class SoundTowns_v2 : public Sound { public: - SoundTowns_v2(KyraEngine *vm, Audio::Mixer *mixer); + SoundTowns_v2(KyraEngine_v1 *vm, Audio::Mixer *mixer); ~SoundTowns_v2(); kType getMusicType() const { return kTowns; } @@ -463,7 +463,7 @@ private: class MixedSoundDriver : public Sound { public: - MixedSoundDriver(KyraEngine *vm, Audio::Mixer *mixer, Sound *music, Sound *sfx) : Sound(vm, mixer), _music(music), _sfx(sfx) {} + MixedSoundDriver(KyraEngine_v1 *vm, Audio::Mixer *mixer, Sound *music, Sound *sfx) : Sound(vm, mixer), _music(music), _sfx(sfx) {} ~MixedSoundDriver() { delete _music; delete _sfx; } kType getMusicType() const { return _music->getMusicType(); } diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp index e227d1fc46..68a2f0be9c 100644 --- a/engines/kyra/sound_adlib.cpp +++ b/engines/kyra/sound_adlib.cpp @@ -2210,7 +2210,7 @@ const int SoundAdlibPC::_kyra1SoundTriggers[] = { const int SoundAdlibPC::_kyra1NumSoundTriggers = ARRAYSIZE(SoundAdlibPC::_kyra1SoundTriggers); -SoundAdlibPC::SoundAdlibPC(KyraEngine *vm, Audio::Mixer *mixer) +SoundAdlibPC::SoundAdlibPC(KyraEngine_v1 *vm, Audio::Mixer *mixer) : Sound(vm, mixer), _driver(0), _trackEntries(), _soundDataPtr(0) { memset(_trackEntries, 0, sizeof(_trackEntries)); _v2 = (_vm->gameFlags().gameID == GI_KYRA2); diff --git a/engines/kyra/sound_lok.cpp b/engines/kyra/sound_lok.cpp index 398ac085c4..728013cdaa 100644 --- a/engines/kyra/sound_lok.cpp +++ b/engines/kyra/sound_lok.cpp @@ -35,7 +35,7 @@ void KyraEngine_LoK::snd_playSoundEffect(int track, int volume) { return; } - KyraEngine::snd_playSoundEffect(track); + KyraEngine_v1::snd_playSoundEffect(track); } void KyraEngine_LoK::snd_playWanderScoreViaMap(int command, int restart) { @@ -57,7 +57,7 @@ void KyraEngine_LoK::snd_playWanderScoreViaMap(int command, int restart) { _sound->haltTrack(); } } else { - KyraEngine::snd_playWanderScoreViaMap(command, restart); + KyraEngine_v1::snd_playWanderScoreViaMap(command, restart); } } diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index d2ce48f452..3d8c7becae 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -1084,7 +1084,7 @@ void SoundTowns_EuphonyTrackQueue::initDriver() { _driver->send(0x79B0); } -SoundTowns::SoundTowns(KyraEngine *vm, Audio::Mixer *mixer) +SoundTowns::SoundTowns(KyraEngine_v1 *vm, Audio::Mixer *mixer) : Sound(vm, mixer), _lastTrack(-1), _currentSFX(0), _sfxFileData(0), _sfxFileIndex((uint)-1), _sfxWDTable(0), _sfxBTTable(0), _parser(0) { @@ -1357,7 +1357,7 @@ float SoundTowns::semitoneAndSampleRate_to_sampleStep(int8 semiTone, int8 semiTo // KYRA 2 -SoundTowns_v2::SoundTowns_v2(KyraEngine *vm, Audio::Mixer *mixer) +SoundTowns_v2::SoundTowns_v2(KyraEngine_v1 *vm, Audio::Mixer *mixer) : Sound(vm, mixer), _lastTrack(-1), _currentSFX(0), /*_driver(0),*/ _twnTrackData(0) { } diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index dbe181b84f..2ac960dc75 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -26,7 +26,7 @@ #include "common/endian.h" #include "common/md5.h" -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/kyra_lok.h" #include "kyra/kyra_v2.h" #include "kyra/kyra_hof.h" @@ -1338,11 +1338,11 @@ const ScreenDim Screen_MR::_screenDimTable[] = { const int Screen_MR::_screenDimTableCount = ARRAYSIZE(Screen_MR::_screenDimTable); -const int8 KyraEngine::_addXPosTable[] = { +const int8 KyraEngine_v1::_addXPosTable[] = { 4, 4, 0, -4, -4, -4, 0, 4 }; -const int8 KyraEngine::_addYPosTable[] = { +const int8 KyraEngine_v1::_addYPosTable[] = { 0, -2, -2, -2, 0, 2, 2, 2 }; diff --git a/engines/kyra/text.cpp b/engines/kyra/text.cpp index 980b762b23..931c5fe1c9 100644 --- a/engines/kyra/text.cpp +++ b/engines/kyra/text.cpp @@ -25,7 +25,7 @@ -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/screen.h" #include "kyra/text.h" @@ -35,7 +35,7 @@ namespace Kyra { -TextDisplayer::TextDisplayer(KyraEngine *vm, Screen *screen) { +TextDisplayer::TextDisplayer(KyraEngine_v1 *vm, Screen *screen) { _screen = screen; _vm = vm; diff --git a/engines/kyra/text.h b/engines/kyra/text.h index 5ae37e32ef..d45e5f9242 100644 --- a/engines/kyra/text.h +++ b/engines/kyra/text.h @@ -31,11 +31,11 @@ #include "kyra/screen.h" namespace Kyra { -class KyraEngine; +class KyraEngine_v1; class TextDisplayer { public: - TextDisplayer(KyraEngine *vm, Screen *screen); + TextDisplayer(KyraEngine_v1 *vm, Screen *screen); virtual ~TextDisplayer() {} int maxSubstringLen() const { return TALK_SUBSTRING_LEN; } @@ -60,7 +60,7 @@ public: bool printed() const { return _talkMessagePrinted; } protected: Screen *_screen; - KyraEngine *_vm; + KyraEngine_v1 *_vm; struct TalkCoords { uint16 y, x, w; diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp index b20d9510cc..777871d65a 100644 --- a/engines/kyra/timer.cpp +++ b/engines/kyra/timer.cpp @@ -23,7 +23,7 @@ * */ -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/timer.h" #include "common/func.h" @@ -34,7 +34,7 @@ namespace Kyra { namespace { struct TimerResync : public Common::UnaryFunction { uint32 _tickLength, _curTime; - TimerResync(KyraEngine *vm, uint32 curTime) : _tickLength(vm->tickLength()), _curTime(curTime) {} + TimerResync(KyraEngine_v1 *vm, uint32 curTime) : _tickLength(vm->tickLength()), _curTime(curTime) {} void operator()(TimerEntry &entry) const { if (entry.lastUpdate < 0) { diff --git a/engines/kyra/timer.h b/engines/kyra/timer.h index 264590845e..691bac3fb5 100644 --- a/engines/kyra/timer.h +++ b/engines/kyra/timer.h @@ -26,7 +26,7 @@ #ifndef KYRA_TIMER_H #define KYRA_TIMER_H -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "common/list.h" #include "common/stream.h" @@ -49,7 +49,7 @@ struct TimerEntry { class TimerManager { public: - TimerManager(KyraEngine *vm, OSystem *sys) : _vm(vm), _system(sys), _timers(), _nextRun(0), _isPaused(0), _pauseStart(0) {} + TimerManager(KyraEngine_v1 *vm, OSystem *sys) : _vm(vm), _system(sys), _timers(), _nextRun(0), _isPaused(0), _pauseStart(0) {} ~TimerManager() { reset(); } void pause(bool p); @@ -79,7 +79,7 @@ public: private: void resync(); - KyraEngine *_vm; + KyraEngine_v1 *_vm; OSystem *_system; Common::List _timers; uint32 _nextRun; diff --git a/engines/kyra/timer_lok.cpp b/engines/kyra/timer_lok.cpp index 91081a36b3..69b93b54c3 100644 --- a/engines/kyra/timer_lok.cpp +++ b/engines/kyra/timer_lok.cpp @@ -23,7 +23,7 @@ * */ -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/kyra_lok.h" #include "kyra/screen.h" #include "kyra/animator_lok.h" diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp index f4eadee4e2..cea52e911e 100644 --- a/engines/kyra/vqa.cpp +++ b/engines/kyra/vqa.cpp @@ -42,7 +42,7 @@ namespace Kyra { -VQAMovie::VQAMovie(KyraEngine *vm, OSystem *system) { +VQAMovie::VQAMovie(KyraEngine_v1 *vm, OSystem *system) { _system = system; _vm = vm; _opened = false; diff --git a/engines/kyra/vqa.h b/engines/kyra/vqa.h index 35f7d78004..f600f008b7 100644 --- a/engines/kyra/vqa.h +++ b/engines/kyra/vqa.h @@ -30,11 +30,11 @@ class OSystem; namespace Kyra { -class KyraEngine; +class KyraEngine_v1; class VQAMovie { public: - VQAMovie(KyraEngine *vm, OSystem *system); + VQAMovie(KyraEngine_v1 *vm, OSystem *system); ~VQAMovie(); bool opened() { return _opened; } @@ -54,7 +54,7 @@ public: protected: OSystem *_system; - KyraEngine *_vm; + KyraEngine_v1 *_vm; bool _opened; int _x, _y; diff --git a/engines/kyra/wsamovie.cpp b/engines/kyra/wsamovie.cpp index 42159478dd..110755c3ba 100644 --- a/engines/kyra/wsamovie.cpp +++ b/engines/kyra/wsamovie.cpp @@ -27,7 +27,7 @@ #include "common/endian.h" #include "common/system.h" -#include "kyra/kyra.h" +#include "kyra/kyra_v1.h" #include "kyra/kyra_v2.h" #include "kyra/screen.h" #include "kyra/screen_v2.h" @@ -35,7 +35,7 @@ #include "kyra/resource.h" namespace Kyra { -WSAMovie_v1::WSAMovie_v1(KyraEngine *vm) : Movie(vm) {} +WSAMovie_v1::WSAMovie_v1(KyraEngine_v1 *vm) : Movie(vm) {} WSAMovie_v1::~WSAMovie_v1() { close(); } int WSAMovie_v1::open(const char *filename, int offscreenDecode, uint8 *palBuf) { @@ -213,7 +213,7 @@ void WSAMovie_v1::processFrame(int frameNum, uint8 *dst) { #pragma mark - -WSAMovieAmiga::WSAMovieAmiga(KyraEngine *vm) : WSAMovie_v1(vm), _buffer(0) {} +WSAMovieAmiga::WSAMovieAmiga(KyraEngine_v1 *vm) : WSAMovie_v1(vm), _buffer(0) {} int WSAMovieAmiga::open(const char *filename, int offscreenDecode, uint8 *palBuf) { debugC(9, kDebugLevelMovie, "WSAMovieAmiga::open('%s', %d, %p)", filename, offscreenDecode, (const void *)palBuf); @@ -342,7 +342,7 @@ void WSAMovieAmiga::processFrame(int frameNum, uint8 *dst) { #pragma mark - -WSAMovie_v2::WSAMovie_v2(KyraEngine *vm, Screen_v2 *screen) : WSAMovie_v1(vm), _screen(screen), _xAdd(0), _yAdd(0) {} +WSAMovie_v2::WSAMovie_v2(KyraEngine_v1 *vm, Screen_v2 *screen) : WSAMovie_v1(vm), _screen(screen), _xAdd(0), _yAdd(0) {} int WSAMovie_v2::open(const char *filename, int unk1, uint8 *palBuf) { debugC(9, kDebugLevelMovie, "WSAMovie_v2::open('%s', %d, %p)", filename, unk1, (const void *)palBuf); diff --git a/engines/kyra/wsamovie.h b/engines/kyra/wsamovie.h index cc3a188eea..36cd75b1ab 100644 --- a/engines/kyra/wsamovie.h +++ b/engines/kyra/wsamovie.h @@ -32,12 +32,12 @@ class SoundHandle; } // end of namespace Audio namespace Kyra { -class KyraEngine; +class KyraEngine_v1; class Screen_v2; class Movie { public: - Movie(KyraEngine *vm) : _vm(vm), _opened(false), _x(-1), _y(-1), _drawPage(-1) {} + Movie(KyraEngine_v1 *vm) : _vm(vm), _opened(false), _x(-1), _y(-1), _drawPage(-1) {} virtual ~Movie() {} virtual bool opened() { return _opened; } @@ -53,7 +53,7 @@ public: virtual void setY(int y) { _y = y; } virtual void setDrawPage(int page) { _drawPage = page; } protected: - KyraEngine *_vm; + KyraEngine_v1 *_vm; bool _opened; int _x, _y; @@ -62,7 +62,7 @@ protected: class WSAMovie_v1 : public Movie { public: - WSAMovie_v1(KyraEngine *vm); + WSAMovie_v1(KyraEngine_v1 *vm); virtual ~WSAMovie_v1(); virtual int open(const char *filename, int offscreen, uint8 *palette); @@ -96,7 +96,7 @@ protected: class WSAMovieAmiga : public WSAMovie_v1 { public: - WSAMovieAmiga(KyraEngine *vm); + WSAMovieAmiga(KyraEngine_v1 *vm); int open(const char *filename, int offscreen, uint8 *palette); void close(); @@ -109,7 +109,7 @@ private: class WSAMovie_v2 : public WSAMovie_v1 { public: - WSAMovie_v2(KyraEngine *vm, Screen_v2 *scren); + WSAMovie_v2(KyraEngine_v1 *vm, Screen_v2 *scren); int open(const char *filename, int unk1, uint8 *palette); -- cgit v1.2.3 From 2c9968fe80c4ba78f895c9bac757dd6b1604ccce Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 12 May 2008 00:26:29 +0000 Subject: - Added an engine plugin manager and moved engine specific functionality into it - base/plugins.* reorganization svn-id: r32045 --- backends/platform/dc/selector.cpp | 4 +- backends/platform/wince/CELauncherDialog.cpp | 2 +- base/commandLine.cpp | 14 +-- base/game.cpp | 26 ------ base/game.h | 11 --- base/main.cpp | 12 +-- base/plugins.cpp | 95 +++++++++++++------- base/plugins.h | 124 ++++++++++++++++----------- gui/about.cpp | 4 +- gui/launcher.cpp | 7 +- gui/massadd.cpp | 3 +- 11 files changed, 160 insertions(+), 142 deletions(-) diff --git a/backends/platform/dc/selector.cpp b/backends/platform/dc/selector.cpp index 4bca47afb2..880fbc400f 100644 --- a/backends/platform/dc/selector.cpp +++ b/backends/platform/dc/selector.cpp @@ -151,8 +151,8 @@ static Game the_game; static void detectGames(FSList &files, GameList &candidates) { - const PluginList &plugins = PluginManager::instance().getPlugins(); - PluginList::const_iterator iter = plugins.begin(); + const EnginePluginList &plugins = EngineMan.getPlugins(); + EnginePluginList::const_iterator iter = plugins.begin(); for (iter = plugins.begin(); iter != plugins.end(); ++iter) { candidates.push_back((*iter)->detectGames(files)); } diff --git a/backends/platform/wince/CELauncherDialog.cpp b/backends/platform/wince/CELauncherDialog.cpp index 45e41e5e93..d474110f26 100644 --- a/backends/platform/wince/CELauncherDialog.cpp +++ b/backends/platform/wince/CELauncherDialog.cpp @@ -77,7 +77,7 @@ void CELauncherDialog::automaticScanDirectory(const FilesystemNode &node) { FSList files; node.getChildren(files, FilesystemNode::kListFilesOnly); // detect - GameList candidates(PluginManager::instance().detectGames(files)); + GameList candidates(EngineMan.detectGames(files)); // insert if (candidates.size() >= 1) { GameDescriptor result = candidates[0]; diff --git a/base/commandLine.cpp b/base/commandLine.cpp index a4c867edee..5b919a495c 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -559,8 +559,8 @@ static void listGames() { printf("Game ID Full Title \n" "-------------------- ------------------------------------------------------\n"); - const PluginList &plugins = PluginManager::instance().getPlugins(); - PluginList::const_iterator iter = plugins.begin(); + const EnginePluginList &plugins = EngineMan.getPlugins(); + EnginePluginList::const_iterator iter = plugins.begin(); for (iter = plugins.begin(); iter != plugins.end(); ++iter) { GameList list = (*iter)->getSupportedGames(); for (GameList::iterator v = list.begin(); v != list.end(); ++v) { @@ -586,7 +586,7 @@ static void listTargets() { // to find the proper desc. In fact, the platform probably should // be taken into account, too. Common::String gameid(name); - GameDescriptor g = Base::findGame(gameid); + GameDescriptor g = EngineMan.findGame(gameid); if (g.description().size() > 0) description = g.description(); } @@ -613,8 +613,8 @@ static void listSaves(const char *target) { gameid.toLowercase(); // Normalize it to lower case // Find the plugin that will handle the specified gameid - const Plugin *plugin = 0; - GameDescriptor game = Base::findGame(gameid, &plugin); + const EnginePlugin *plugin = 0; + GameDescriptor game = EngineMan.findGame(gameid, &plugin); if (!plugin) { error("Could not find any plugin to handle gameid '%s' (target '%s')", gameid.c_str(), target); @@ -667,7 +667,7 @@ static void runDetectorTest() { continue; } - GameList candidates(PluginManager::instance().detectGames(files)); + GameList candidates(EngineMan.detectGames(files)); bool gameidDiffers = false; GameList::iterator x; for (x = candidates.begin(); x != candidates.end(); ++x) { @@ -740,7 +740,7 @@ bool processSettings(Common::String &command, Common::StringMap &settings) { // domain (i.e. a target) matching this argument, or alternatively // whether there is a gameid matching that name. if (!command.empty()) { - GameDescriptor gd = Base::findGame(command); + GameDescriptor gd = EngineMan.findGame(command); if (ConfMan.hasGameDomain(command) || !gd.gameid().empty()) { bool idCameFromCommandLine = false; diff --git a/base/game.cpp b/base/game.cpp index a79cfddec9..9628543672 100644 --- a/base/game.cpp +++ b/base/game.cpp @@ -75,29 +75,3 @@ void SaveStateDescriptor::setThumbnail(Graphics::Surface *t) { } _thumbnail = t; } - - -namespace Base { - -// TODO: Find a better name & place for this function. -GameDescriptor findGame(const Common::String &gameName, const Plugin **plugin) { - // Find the GameDescriptor for this target - const PluginList &plugins = PluginManager::instance().getPlugins(); - GameDescriptor result; - - if (plugin) - *plugin = 0; - - PluginList::const_iterator iter = plugins.begin(); - for (iter = plugins.begin(); iter != plugins.end(); ++iter) { - result = (*iter)->findGame(gameName.c_str()); - if (!result.gameid().empty()) { - if (plugin) - *plugin = *iter; - break; - } - } - return result; -} - -} // End of namespace Base diff --git a/base/game.h b/base/game.h index 08d18247ef..18d7967388 100644 --- a/base/game.h +++ b/base/game.h @@ -179,15 +179,4 @@ public: /** List of savestates. */ typedef Common::Array SaveStateList; - -class Plugin; - -namespace Base { - -// TODO: Find a better name & place for this function. -GameDescriptor findGame(const Common::String &gameName, const Plugin **plugin = NULL); - -} // End of namespace Base - - #endif diff --git a/base/main.cpp b/base/main.cpp index 9129fcc7e1..80f77f89ab 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -77,8 +77,8 @@ static bool launcherDialog(OSystem &system) { return (dlg.runModal() != -1); } -static const Plugin *detectPlugin() { - const Plugin *plugin = 0; +static const EnginePlugin *detectPlugin() { + const EnginePlugin *plugin = 0; // Make sure the gameid is set in the config manager, and that it is lowercase. Common::String gameid(ConfMan.getActiveDomainName()); @@ -90,7 +90,7 @@ static const Plugin *detectPlugin() { // Query the plugins and find one that will handle the specified gameid printf("Looking for %s\n", gameid.c_str()); - GameDescriptor game = Base::findGame(gameid, &plugin); + GameDescriptor game = EngineMan.findGame(gameid, &plugin); if (plugin == 0) { printf("Failed game detection\n"); @@ -105,7 +105,7 @@ static const Plugin *detectPlugin() { } // TODO: specify the possible return values here -static int runGame(const Plugin *plugin, OSystem &system, const Common::String &edebuglevels) { +static int runGame(const EnginePlugin *plugin, OSystem &system, const Common::String &edebuglevels) { Common::String gameDataPath(ConfMan.get("path")); if (gameDataPath.empty()) { } else if (gameDataPath.lastChar() != '/' @@ -168,7 +168,7 @@ static int runGame(const Plugin *plugin, OSystem &system, const Common::String & // Set the window caption to the game name Common::String caption(ConfMan.get("description")); - Common::String desc = Base::findGame(ConfMan.get("gameid")).description(); + Common::String desc = EngineMan.findGame(ConfMan.get("gameid")).description(); if (caption.empty() && !desc.empty()) caption = desc; if (caption.empty()) @@ -298,7 +298,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) { // cleanly, so this is now enabled to encourage people to fix bits :) while (0 != ConfMan.getActiveDomain()) { // Try to find a plugin which feels responsible for the specified game. - const Plugin *plugin = detectPlugin(); + const EnginePlugin *plugin = detectPlugin(); if (plugin) { // Unload all plugins not needed for this game, // to save memory diff --git a/base/plugins.cpp b/base/plugins.cpp index aa813297fc..5eca8f394d 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -24,16 +24,21 @@ */ #include "base/plugins.h" -#include "common/util.h" #ifdef DYNAMIC_MODULES #include "common/config-manager.h" +#include "common/fs.h" #endif +// Plugin versioning + int pluginTypeVersions[PLUGIN_TYPE_MAX] = { PLUGIN_TYPE_ENGINE_VERSION, }; + +// Abstract plugins + PluginType Plugin::getType() const { return _type; } @@ -42,31 +47,6 @@ const char *Plugin::getName() const { return _pluginObject->getName(); } -const char *Plugin::getCopyright() const { - return ((MetaEngine*)_pluginObject)->getCopyright(); -} - -PluginError Plugin::createInstance(OSystem *syst, Engine **engine) const { - return ((MetaEngine*)_pluginObject)->createInstance(syst, engine); -} - -GameList Plugin::getSupportedGames() const { - return ((MetaEngine*)_pluginObject)->getSupportedGames(); -} - -GameDescriptor Plugin::findGame(const char *gameid) const { - return ((MetaEngine*)_pluginObject)->findGame(gameid); -} - -GameList Plugin::detectGames(const FSList &fslist) const { - return ((MetaEngine*)_pluginObject)->detectGames(fslist); -} - -SaveStateList Plugin::listSaves(const char *target) const { - return ((MetaEngine*)_pluginObject)->listSaves(target); -} - - class StaticPlugin : public Plugin { public: StaticPlugin(PluginObject *pluginobject, PluginType type) { @@ -315,15 +295,72 @@ bool PluginManager::tryLoadPlugin(Plugin *plugin) { } } -GameList PluginManager::detectGames(const FSList &fslist) const { + +// Engine plugins + +#include "engines/metaengine.h" + +const char *EnginePlugin::getCopyright() const { + return ((MetaEngine*)_pluginObject)->getCopyright(); +} + +PluginError EnginePlugin::createInstance(OSystem *syst, Engine **engine) const { + return ((MetaEngine*)_pluginObject)->createInstance(syst, engine); +} + +GameList EnginePlugin::getSupportedGames() const { + return ((MetaEngine*)_pluginObject)->getSupportedGames(); +} + +GameDescriptor EnginePlugin::findGame(const char *gameid) const { + return ((MetaEngine*)_pluginObject)->findGame(gameid); +} + +GameList EnginePlugin::detectGames(const FSList &fslist) const { + return ((MetaEngine*)_pluginObject)->detectGames(fslist); +} + +SaveStateList EnginePlugin::listSaves(const char *target) const { + return ((MetaEngine*)_pluginObject)->listSaves(target); +} + +DECLARE_SINGLETON(EngineManager); + +GameDescriptor EngineManager::findGame(const Common::String &gameName, const EnginePlugin **plugin) const { + // Find the GameDescriptor for this target + const EnginePluginList &plugins = getPlugins(); + GameDescriptor result; + + if (plugin) + *plugin = 0; + + EnginePluginList::const_iterator iter = plugins.begin(); + for (iter = plugins.begin(); iter != plugins.end(); ++iter) { + result = (*iter)->findGame(gameName.c_str()); + if (!result.gameid().empty()) { + if (plugin) + *plugin = *iter; + break; + } + } + return result; +} + +GameList EngineManager::detectGames(const FSList &fslist) const { GameList candidates; + const EnginePluginList &plugins = getPlugins(); + // Iterate over all known games and for each check if it might be // the game in the presented directory. - PluginList::const_iterator iter; - for (iter = _plugins.begin(); iter != _plugins.end(); ++iter) { + EnginePluginList::const_iterator iter; + for (iter = plugins.begin(); iter != plugins.end(); ++iter) { candidates.push_back((*iter)->detectGames(fslist)); } return candidates; } + +const EnginePluginList &EngineManager::getPlugins() const { + return (const EnginePluginList&)PluginManager::instance().getPlugins(); +} diff --git a/base/plugins.h b/base/plugins.h index ec947ee6ad..14ce2a3aa4 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -26,27 +26,12 @@ #ifndef BASE_PLUGINS_H #define BASE_PLUGINS_H -#include "common/array.h" #include "common/error.h" #include "common/list.h" #include "common/singleton.h" -#include "common/util.h" #include "base/game.h" -/** - * Abstract base class for the plugin objects which handle plugins - * instantiation. Subclasses for this may be used for engine plugins - * and other types of plugins. - */ -class PluginObject { -public: - virtual ~PluginObject() {} - - /** Returns the name of the plugin. */ - virtual const char *getName() const = 0; -}; - -#include "engines/metaengine.h" +// Plugin versioning // Global Plugin API version #define PLUGIN_VERSION 1 @@ -63,42 +48,8 @@ enum PluginType { extern int pluginTypeVersions[PLUGIN_TYPE_MAX]; -class Engine; -class FSList; -class OSystem; - -/** - * Abstract base class for the plugin system. - * Subclasses for this can be used to wrap both static and dynamic - * plugins. - */ -class Plugin { -protected: - PluginObject *_pluginObject; - PluginType _type; - -public: - Plugin() : _pluginObject(0) {} - virtual ~Plugin() { - //if (isLoaded()) - //unloadPlugin(); - } - -// virtual bool isLoaded() const = 0; // TODO - virtual bool loadPlugin() = 0; // TODO: Rename to load() ? - virtual void unloadPlugin() = 0; // TODO: Rename to unload() ? - - PluginType getType() const; - const char *getName() const; - const char *getCopyright() const; - - PluginError createInstance(OSystem *syst, Engine **engine) const; - GameList getSupportedGames() const; - GameDescriptor findGame(const char *gameid) const; - GameList detectGames(const FSList &fslist) const; - SaveStateList listSaves(const char *target) const; -}; +// Plugin linking #define STATIC_PLUGIN 1 #define DYNAMIC_PLUGIN 2 @@ -147,10 +98,49 @@ public: #endif // DYNAMIC_MODULES +// Abstract plugins + +/** + * Abstract base class for the plugin objects which handle plugins + * instantiation. Subclasses for this may be used for engine plugins + * and other types of plugins. + */ +class PluginObject { +public: + virtual ~PluginObject() {} + + /** Returns the name of the plugin. */ + virtual const char *getName() const = 0; +}; + +/** + * Abstract base class for the plugin system. + * Subclasses for this can be used to wrap both static and dynamic + * plugins. + */ +class Plugin { +protected: + PluginObject *_pluginObject; + PluginType _type; + +public: + Plugin() : _pluginObject(0) {} + virtual ~Plugin() { + //if (isLoaded()) + //unloadPlugin(); + } + +// virtual bool isLoaded() const = 0; // TODO + virtual bool loadPlugin() = 0; // TODO: Rename to load() ? + virtual void unloadPlugin() = 0; // TODO: Rename to unload() ? + + PluginType getType() const; + const char *getName() const; +}; + /** List of plugins. */ typedef Common::Array PluginList; - class PluginProvider { public: virtual ~PluginProvider() {} @@ -202,8 +192,38 @@ public: void unloadPluginsExcept(const Plugin *plugin); const PluginList &getPlugins() { return _plugins; } +}; + +// Engine plugins + +class Engine; +class FSList; +class OSystem; + +class EnginePlugin : public Plugin { +public: + const char *getCopyright() const; + PluginError createInstance(OSystem *syst, Engine **engine) const; + GameList getSupportedGames() const; + GameDescriptor findGame(const char *gameid) const; GameList detectGames(const FSList &fslist) const; + SaveStateList listSaves(const char *target) const; }; +typedef Common::Array EnginePluginList; + +class EngineManager : public Common::Singleton { +private: + friend class Common::Singleton; + +public: + GameDescriptor findGame(const Common::String &gameName, const EnginePlugin **plugin = NULL) const; + GameList detectGames(const FSList &fslist) const; + const EnginePluginList &getPlugins() const; +}; + +/** Shortcut for accessing the engine manager. */ +#define EngineMan EngineManager::instance() + #endif diff --git a/gui/about.cpp b/gui/about.cpp index c346d5ad87..b4d8cb0bf2 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -128,8 +128,8 @@ AboutDialog::AboutDialog() _lines.push_back(""); addLine("\\C\\c1""Available engines:"); - const PluginList &plugins = PluginManager::instance().getPlugins(); - PluginList::const_iterator iter = plugins.begin(); + const EnginePluginList &plugins = EngineMan.getPlugins(); + EnginePluginList::const_iterator iter = plugins.begin(); for (; iter != plugins.end(); ++iter) { Common::String str; str = "\\C"; diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 2be703a405..505ecf842b 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -23,7 +23,6 @@ */ #include "engines/engine.h" -#include "base/game.h" #include "base/plugins.h" #include "base/version.h" @@ -582,7 +581,7 @@ void LauncherDialog::updateListing() { if (gameid.empty()) gameid = iter->_key; if (description.empty()) { - GameDescriptor g = Base::findGame(gameid); + GameDescriptor g = EngineMan.findGame(gameid); if (g.contains("description")) description = g.description(); } @@ -659,7 +658,7 @@ void LauncherDialog::addGame() { // ...so let's determine a list of candidates, games that // could be contained in the specified directory. - GameList candidates(PluginManager::instance().detectGames(files)); + GameList candidates(EngineMan.detectGames(files)); int idx; if (candidates.empty()) { @@ -783,7 +782,7 @@ void LauncherDialog::editGame(int item) { String gameId(ConfMan.get("gameid", _domains[item])); if (gameId.empty()) gameId = _domains[item]; - EditGameDialog editDialog(_domains[item], Base::findGame(gameId).description()); + EditGameDialog editDialog(_domains[item], EngineMan.findGame(gameId).description()); if (editDialog.runModal() > 0) { // User pressed OK, so make changes permanent diff --git a/gui/massadd.cpp b/gui/massadd.cpp index 934957e80b..446285af2d 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -23,7 +23,6 @@ */ #include "engines/engine.h" -#include "base/game.h" #include "base/plugins.h" #include "common/events.h" @@ -132,7 +131,7 @@ void MassAddDialog::handleTickle() { } // Run the detector on the dir - GameList candidates(PluginManager::instance().detectGames(files)); + GameList candidates(EngineMan.detectGames(files)); // Just add all detected games / game variants. If we get more than one, // that either means the directory contains multiple games, or the detector -- cgit v1.2.3 From 9ba353b9d8f6c4336ca4b6001fe5f22b85a8fb81 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 12 May 2008 01:26:43 +0000 Subject: Keep separated arrays for each type of plugin svn-id: r32046 --- base/main.cpp | 4 ++-- base/plugins.cpp | 15 ++++++++------- base/plugins.h | 6 +++--- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/base/main.cpp b/base/main.cpp index 80f77f89ab..8b697e120d 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -302,7 +302,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) { if (plugin) { // Unload all plugins not needed for this game, // to save memory - PluginManager::instance().unloadPluginsExcept(plugin); + PluginManager::instance().unloadPluginsExcept(PLUGIN_TYPE_ENGINE, plugin); // Try to run the game int result = runGame(plugin, system, specialDebug); @@ -329,7 +329,7 @@ extern "C" int scummvm_main(int argc, char *argv[]) { launcherDialog(system); } - PluginManager::instance().unloadPluginsExcept(NULL); + PluginManager::instance().unloadPlugins(); PluginManager::destroy(); Common::ConfigManager::destroy(); GUI::NewGui::destroy(); diff --git a/base/plugins.cpp b/base/plugins.cpp index 5eca8f394d..d2bd9b398a 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -253,12 +253,13 @@ void PluginManager::loadPlugins() { } void PluginManager::unloadPlugins() { - unloadPluginsExcept(NULL); + for (int i = 0; i < PLUGIN_TYPE_MAX; i++) + unloadPluginsExcept((PluginType)i, NULL); } -void PluginManager::unloadPluginsExcept(const Plugin *plugin) { +void PluginManager::unloadPluginsExcept(PluginType type, const Plugin *plugin) { Plugin *found = NULL; - for (PluginList::iterator p = _plugins.begin(); p != _plugins.end(); ++p) { + for (PluginList::iterator p = _plugins[type].begin(); p != _plugins[type].end(); ++p) { if (*p == plugin) { found = *p; } else { @@ -266,9 +267,9 @@ void PluginManager::unloadPluginsExcept(const Plugin *plugin) { delete *p; } } - _plugins.clear(); + _plugins[type].clear(); if (found != NULL) { - _plugins.push_back(found); + _plugins[type].push_back(found); } } @@ -277,7 +278,7 @@ bool PluginManager::tryLoadPlugin(Plugin *plugin) { // Try to load the plugin if (plugin->loadPlugin()) { // If successful, add it to the list of known plugins and return. - _plugins.push_back(plugin); + _plugins[plugin->getType()].push_back(plugin); // TODO/FIXME: We should perform some additional checks here: // * Check for some kind of "API version" (possibly derived from the @@ -362,5 +363,5 @@ GameList EngineManager::detectGames(const FSList &fslist) const { } const EnginePluginList &EngineManager::getPlugins() const { - return (const EnginePluginList&)PluginManager::instance().getPlugins(); + return (const EnginePluginList&)PluginManager::instance().getPlugins(PLUGIN_TYPE_ENGINE); } diff --git a/base/plugins.h b/base/plugins.h index 14ce2a3aa4..3f2d19fd50 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -174,7 +174,7 @@ protected: class PluginManager : public Common::Singleton { typedef Common::List ProviderList; private: - PluginList _plugins; + PluginList _plugins[PLUGIN_TYPE_MAX]; ProviderList _providers; bool tryLoadPlugin(Plugin *plugin); @@ -189,9 +189,9 @@ public: void loadPlugins(); void unloadPlugins(); - void unloadPluginsExcept(const Plugin *plugin); + void unloadPluginsExcept(PluginType type, const Plugin *plugin); - const PluginList &getPlugins() { return _plugins; } + const PluginList &getPlugins(PluginType t) { return _plugins[t]; } }; -- cgit v1.2.3 From 3763c2799d48e7d4538cf47823c44d730834415d Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 12 May 2008 04:17:51 +0000 Subject: Renamed preprocessor constants to match file names. svn-id: r32047 --- engines/kyra/animator_lok.h | 4 ++-- engines/kyra/gui_lok.h | 4 ++-- engines/kyra/kyra_mr.h | 4 ++-- engines/kyra/text_hof.h | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/engines/kyra/animator_lok.h b/engines/kyra/animator_lok.h index c7d564e0c6..ba5882c710 100644 --- a/engines/kyra/animator_lok.h +++ b/engines/kyra/animator_lok.h @@ -23,8 +23,8 @@ * */ -#ifndef KYRA_ANIMATOR_V1_H -#define KYRA_ANIMATOR_V1_H +#ifndef KYRA_ANIMATOR_LOK_H +#define KYRA_ANIMATOR_LOK_H namespace Kyra { class KyraEngine_LoK; diff --git a/engines/kyra/gui_lok.h b/engines/kyra/gui_lok.h index 78284e5ec1..aa3bcdcc7f 100644 --- a/engines/kyra/gui_lok.h +++ b/engines/kyra/gui_lok.h @@ -23,8 +23,8 @@ * */ -#ifndef KYRA_GUI_V1_H -#define KYRA_GUI_V1_H +#ifndef KYRA_GUI_LOK_H +#define KYRA_GUI_LOK_H #include "kyra/gui.h" diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 4e28d6a5c0..5831759314 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -23,8 +23,8 @@ * */ -#ifndef KYRA_KYRA_V3_H -#define KYRA_KYRA_V3_H +#ifndef KYRA_KYRA_MR_H +#define KYRA_KYRA_MR_H #include "kyra/kyra_v2.h" #include "kyra/screen_mr.h" diff --git a/engines/kyra/text_hof.h b/engines/kyra/text_hof.h index ef1f481c19..3da6e081f0 100644 --- a/engines/kyra/text_hof.h +++ b/engines/kyra/text_hof.h @@ -23,8 +23,8 @@ * */ -#ifndef KYRA_TEXT_V2_H -#define KYRA_TEXT_V2_H +#ifndef KYRA_TEXT_HOF_H +#define KYRA_TEXT_HOF_H #include "kyra/text.h" -- cgit v1.2.3 From 4c5226002f5e0fcf8a4f706801e67dd7611de885 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 12 May 2008 04:29:41 +0000 Subject: Update HE version for that English Windows version of Freddi Fish 1. svn-id: r32048 --- engines/scumm/scumm-md5.h | 4 ++-- tools/scumm-md5.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 45abca111e..f0bc179c61 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Sun May 11 03:56:33 2008 + This file was generated by the md5table tool on Mon May 12 04:29:20 2008 DO NOT EDIT MANUALLY! */ @@ -388,7 +388,7 @@ static const MD5Table md5table[] = { { "a095e33061606d231ff37dca4c64c8ac", "pajama", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, { "a0a7dea72003933b8b3f8b99b9f7ddeb", "loom", "No Adlib", "EGA", -1, Common::EN_ANY, Common::kPlatformAtariST }, { "a194f15f51ee62badab74b9e7da97693", "baseball2001", "", "Demo", 20507, Common::EN_ANY, Common::kPlatformUnknown }, - { "a197a87ae77f3b3333f09a7a2c448fe2", "freddi", "HE 100", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows }, + { "a197a87ae77f3b3333f09a7a2c448fe2", "freddi", "HE 99", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows }, { "a28135a7ade38cc0208b04507c46efd1", "spyfox", "HE 99", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, { "a2bb6aa0537402c1b3c2ea899ccef64b", "lost", "HE 99", "Demo", 15540, Common::EN_ANY, Common::kPlatformWindows }, { "a3036878840720fbefa41e6965fa4a0a", "samnmax", "", "Floppy", -1, Common::EN_ANY, Common::kPlatformPC }, diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt index 4c1c5d150d..b4d7b8b680 100644 --- a/tools/scumm-md5.txt +++ b/tools/scumm-md5.txt @@ -457,7 +457,7 @@ freddi Freddi Fish 1: The Case of the Missing Kelp Seeds df047cc4792150f601290357566d36a6 -1 us All HE 90 Updated - khalek e44ea295a3f8fe4f41983080dab1e9ce -1 fr Mac HE 90 Updated - ThierryFR 746e88c172a5b7a1ae89ac0ee3ee681a -1 ru Windows HE 90 Updated - sev - a197a87ae77f3b3333f09a7a2c448fe2 -1 en Windows HE 100 Updated - Jonathan + a197a87ae77f3b3333f09a7a2c448fe2 -1 en Windows HE 99 Updated - Jonathan 084ed0fa98a6d1e9368d67fe9cfbd417 -1 en Windows HE 71 Demo - khalek c8aac5e3e701874e2fa4117896f9e1b1 -1 en Mac HE 73 Demo - khalek, sev -- cgit v1.2.3 From 65e41486f478dae996459e8e8b834be8c9b1e6a9 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 12 May 2008 04:33:30 +0000 Subject: Added do { ... } while (0) to the GUI_V* macros, so that they will work as expected if, for instance, someone writes "if (...) GUI_V1_MENU_ITEM( ... );" I don't expect anyone will want to write statements like that, but just to avoid nasty surprises... svn-id: r32049 --- engines/kyra/gui_lok.h | 104 +++++++++++++++++++++++-------------------- engines/kyra/gui_v2.h | 118 ++++++++++++++++++++++++++----------------------- 2 files changed, 117 insertions(+), 105 deletions(-) diff --git a/engines/kyra/gui_lok.h b/engines/kyra/gui_lok.h index aa3bcdcc7f..607ef0b605 100644 --- a/engines/kyra/gui_lok.h +++ b/engines/kyra/gui_lok.h @@ -31,59 +31,65 @@ namespace Kyra { #define GUI_V1_BUTTON(button, a, b, c, d, e, f, g, h, i, j, k) \ - button.nextButton = 0; \ - button.index = a; \ - button.unk6 = button.unk8 = 0; \ - button.data0Val1 = b; \ - button.data1Val1 = c; \ - button.data2Val1 = d; \ - button.data0ShapePtr = button.data1ShapePtr = button.data2ShapePtr = 0; \ - button.flags = e; \ - button.dimTableIndex = f; \ - button.x = g; \ - button.y = h; \ - button.width = i; \ - button.height = j; \ - button.flags2 = k; \ - button.mouseWheel = 0 + do { \ + button.nextButton = 0; \ + button.index = a; \ + button.unk6 = button.unk8 = 0; \ + button.data0Val1 = b; \ + button.data1Val1 = c; \ + button.data2Val1 = d; \ + button.data0ShapePtr = button.data1ShapePtr = button.data2ShapePtr = 0; \ + button.flags = e; \ + button.dimTableIndex = f; \ + button.x = g; \ + button.y = h; \ + button.width = i; \ + button.height = j; \ + button.flags2 = k; \ + button.mouseWheel = 0; \ + } while (0) #define GUI_V1_MENU(menu, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \ - menu.x = a; \ - menu.y = b; \ - menu.width = c; \ - menu.height = d; \ - menu.bkgdColor = e; \ - menu.color1 = f; \ - menu.color2 = g; \ - menu.menuNameString = h; \ - menu.textColor = i; \ - menu.titleX = j; \ - menu.titleY = k; \ - menu.highlightedItem = l; \ - menu.numberOfItems = m; \ - menu.scrollUpButtonX = n; \ - menu.scrollUpButtonY = o; \ - menu.scrollDownButtonX = p; \ - menu.scrollDownButtonY = q + do { \ + menu.x = a; \ + menu.y = b; \ + menu.width = c; \ + menu.height = d; \ + menu.bkgdColor = e; \ + menu.color1 = f; \ + menu.color2 = g; \ + menu.menuNameString = h; \ + menu.textColor = i; \ + menu.titleX = j; \ + menu.titleY = k; \ + menu.highlightedItem = l; \ + menu.numberOfItems = m; \ + menu.scrollUpButtonX = n; \ + menu.scrollUpButtonY = o; \ + menu.scrollDownButtonX = p; \ + menu.scrollDownButtonY = q; \ + } while (0) #define GUI_V1_MENU_ITEM(item, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v) \ - item.enabled = a; \ - item.itemString = d; \ - item.x = e; \ - item.y = g; \ - item.width = h; \ - item.height = i; \ - item.textColor = j; \ - item.highlightColor = k; \ - item.titleX = l; \ - item.bkgdColor = n; \ - item.color1 = o; \ - item.color2 = p; \ - item.saveSlot = q; \ - item.labelString = r; \ - item.labelX = s; \ - item.labelY = t; \ - item.unk1F = v + do { \ + item.enabled = a; \ + item.itemString = d; \ + item.x = e; \ + item.y = g; \ + item.width = h; \ + item.height = i; \ + item.textColor = j; \ + item.highlightColor = k; \ + item.titleX = l; \ + item.bkgdColor = n; \ + item.color1 = o; \ + item.color2 = p; \ + item.saveSlot = q; \ + item.labelString = r; \ + item.labelX = s; \ + item.labelY = t; \ + item.unk1F = v; \ + } while (0) class KyraEngine_LoK; diff --git a/engines/kyra/gui_v2.h b/engines/kyra/gui_v2.h index 378a3cd815..161752627b 100644 --- a/engines/kyra/gui_v2.h +++ b/engines/kyra/gui_v2.h @@ -31,66 +31,72 @@ namespace Kyra { #define GUI_V2_BUTTON(button, a, b, c, d, e, f, h, i, j, k, l, m, n, o, p, q, r, s, t) \ - button.nextButton = 0; \ - button.index = a; \ - button.unk6 = b; \ - button.unk8 = c; \ - button.data0Val1 = d; \ - button.data1Val1 = e; \ - button.data2Val1 = f; \ - button.flags = h; \ - button.data0ShapePtr = button.data1ShapePtr = button.data2ShapePtr = 0; \ - button.dimTableIndex = i; \ - button.x = j; \ - button.y = k; \ - button.width = l; \ - button.height = m; \ - button.data0Val2 = n; \ - button.data0Val3 = o; \ - button.data1Val2 = p; \ - button.data1Val3 = q; \ - button.data2Val2 = r; \ - button.data2Val3 = s; \ - button.flags2 = t; \ - button.mouseWheel = 0 + do { \ + button.nextButton = 0; \ + button.index = a; \ + button.unk6 = b; \ + button.unk8 = c; \ + button.data0Val1 = d; \ + button.data1Val1 = e; \ + button.data2Val1 = f; \ + button.flags = h; \ + button.data0ShapePtr = button.data1ShapePtr = button.data2ShapePtr = 0; \ + button.dimTableIndex = i; \ + button.x = j; \ + button.y = k; \ + button.width = l; \ + button.height = m; \ + button.data0Val2 = n; \ + button.data0Val3 = o; \ + button.data1Val2 = p; \ + button.data1Val3 = q; \ + button.data2Val2 = r; \ + button.data2Val3 = s; \ + button.flags2 = t; \ + button.mouseWheel = 0; \ + } while (0) #define GUI_V2_MENU(menu, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \ - menu.x = a; \ - menu.y = b; \ - menu.width = c; \ - menu.height = d; \ - menu.bkgdColor = e; \ - menu.color1 = f; \ - menu.color2 = g; \ - menu.menuNameId = h; \ - menu.textColor = i; \ - menu.titleX = j; \ - menu.titleY = k; \ - menu.highlightedItem = l; \ - menu.numberOfItems = m; \ - menu.scrollUpButtonX = n; \ - menu.scrollUpButtonY = o; \ - menu.scrollDownButtonX = p; \ - menu.scrollDownButtonY = q + do { \ + menu.x = a; \ + menu.y = b; \ + menu.width = c; \ + menu.height = d; \ + menu.bkgdColor = e; \ + menu.color1 = f; \ + menu.color2 = g; \ + menu.menuNameId = h; \ + menu.textColor = i; \ + menu.titleX = j; \ + menu.titleY = k; \ + menu.highlightedItem = l; \ + menu.numberOfItems = m; \ + menu.scrollUpButtonX = n; \ + menu.scrollUpButtonY = o; \ + menu.scrollDownButtonX = p; \ + menu.scrollDownButtonY = q; \ + } while (0) #define GUI_V2_MENU_ITEM(item, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q) \ - item.enabled = a; \ - item.itemId = b; \ - item.x = c; \ - item.y = d; \ - item.width = e; \ - item.height = f; \ - item.textColor = g; \ - item.highlightColor = h; \ - item.titleX = i; \ - item.bkgdColor = j; \ - item.color1 = k; \ - item.color2 = l; \ - item.saveSlot = m; \ - item.labelId = n; \ - item.labelX = o; \ - item.labelY = p; \ - item.unk1F = q + do { \ + item.enabled = a; \ + item.itemId = b; \ + item.x = c; \ + item.y = d; \ + item.width = e; \ + item.height = f; \ + item.textColor = g; \ + item.highlightColor = h; \ + item.titleX = i; \ + item.bkgdColor = j; \ + item.color1 = k; \ + item.color2 = l; \ + item.saveSlot = m; \ + item.labelId = n; \ + item.labelX = o; \ + item.labelY = p; \ + item.unk1F = q; \ + } while (0) class KyraEngine_v2; class Screen_v2; -- cgit v1.2.3 From 27b9887a30a035829a03f40800c5460e004c9d17 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 12 May 2008 08:49:55 +0000 Subject: Updated NEWS file for Malcolm's Revenge support svn-id: r32050 --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index ab83f09c3b..eee3a92e54 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see: 0.12.0 (????-??-??) New Games: - Added support for The Legend of Kyrandia: Book Two: Hand of Fate + - Added support for The Legend of Kyrandia: Book Three: Malcolm's Revenge - Added support for Lost in Time - Added support for the PC version of Waxworks - Added support for the Macintosh version of I Have no Mouth, and I -- cgit v1.2.3 From 9e39e7d7a2c62e175240a5a55017ee9c206d2cf0 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 12 May 2008 09:49:10 +0000 Subject: - Fixed timers, LGOP2 intro should now play correctly - Some cleanup in LGOP2 opcodes svn-id: r32051 --- engines/made/made.cpp | 16 +++++++++++----- engines/made/scriptfuncs_lgop2.cpp | 9 ++++++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 0cf73d5dd0..ccb4ad5e8d 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -134,21 +134,26 @@ int MadeEngine::init() { } int16 MadeEngine::getTimer(int16 timerNum) { - return (_system->getMillis() - _timers[timerNum]) / 60; + if (timerNum > 0 && timerNum <= ARRAYSIZE(_timers) && _timers[timerNum - 1] != -1) + return (_system->getMillis() - _timers[timerNum - 1]) / 60; + else + return 32000; } void MadeEngine::setTimer(int16 timerNum, int16 value) { - _timers[timerNum] = value * 60; + if (timerNum > 0 && timerNum <= ARRAYSIZE(_timers)) + _timers[timerNum - 1] = value * 60; } void MadeEngine::resetTimer(int16 timerNum) { - _timers[timerNum] = _system->getMillis(); + if (timerNum > 0 && timerNum <= ARRAYSIZE(_timers)) + _timers[timerNum - 1] = _system->getMillis(); } int16 MadeEngine::allocTimer() { for (int i = 0; i < ARRAYSIZE(_timers); i++) { if (_timers[i] == -1) { - resetTimer(i); + _timers[i] = _system->getMillis(); return i + 1; } } @@ -156,7 +161,8 @@ int16 MadeEngine::allocTimer() { } void MadeEngine::freeTimer(int16 timerNum) { - _timers[timerNum] = -1; + if (timerNum > 0 && timerNum <= ARRAYSIZE(_timers)) + _timers[timerNum - 1] = -1; } Common::String MadeEngine::getSavegameFilename(int16 saveNum) { diff --git a/engines/made/scriptfuncs_lgop2.cpp b/engines/made/scriptfuncs_lgop2.cpp index 70f265a17d..ef3c2dffc4 100644 --- a/engines/made/scriptfuncs_lgop2.cpp +++ b/engines/made/scriptfuncs_lgop2.cpp @@ -129,6 +129,7 @@ int16 ScriptFunctionsLgop2::o1_CLS(int16 argc, int16 *argv) { } int16 ScriptFunctionsLgop2::o1_SHOWPAGE(int16 argc, int16 *argv) { + _vm->_mixer->stopHandle(_audioStreamHandle); _vm->_screen->show(); return 0; } @@ -322,7 +323,8 @@ int16 ScriptFunctionsLgop2::o1_FREEANIM(int16 argc, int16 *argv) { } int16 ScriptFunctionsLgop2::o1_DRAWSPRITE(int16 argc, int16 *argv) { - return _vm->_screen->drawSprite(argv[2], argv[1], argv[0]); + _vm->_screen->drawSprite(argv[2], argv[1], argv[0]); + return 0; } int16 ScriptFunctionsLgop2::o1_ERASESPRITES(int16 argc, int16 *argv) { @@ -350,8 +352,7 @@ int16 ScriptFunctionsLgop2::o1_RESETTIMER(int16 argc, int16 *argv) { } int16 ScriptFunctionsLgop2::o1_ALLOCTIMER(int16 argc, int16 *argv) { - int16 timerNum = _vm->allocTimer(); - return timerNum; + return _vm->allocTimer(); } int16 ScriptFunctionsLgop2::o1_FREETIMER(int16 argc, int16 *argv) { @@ -439,6 +440,8 @@ int16 ScriptFunctionsLgop2::o1_RESTEXT(int16 argc, int16 *argv) { int16 ScriptFunctionsLgop2::o1_ADDMASK(int16 argc, int16 *argv) { warning("Unimplemented opcode: o1_ADDMASK"); + //PictureResource *flex = _vm->_res->getPicture(flexIndex); + //Graphics::Surface *sourceSurface = flex->getPicture(); return 0; } -- cgit v1.2.3 From e8e4c5dafbbc5161030485ddd4e8f077a96f00e2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 12 May 2008 11:43:40 +0000 Subject: Updated the MSVC project files of the kyra engine svn-id: r32052 --- dists/msvc7/kyra.vcproj | 18 +++++++++--------- dists/msvc71/kyra.vcproj | 18 +++++++++--------- dists/msvc8/kyra.vcproj | 24 ++++++++++++------------ dists/msvc9/kyra.vcproj | 24 ++++++++++++------------ 4 files changed, 42 insertions(+), 42 deletions(-) diff --git a/dists/msvc7/kyra.vcproj b/dists/msvc7/kyra.vcproj index fba2a4e4f8..3a0f50ba93 100644 --- a/dists/msvc7/kyra.vcproj +++ b/dists/msvc7/kyra.vcproj @@ -162,12 +162,6 @@ - - - - @@ -186,6 +180,12 @@ + + + + @@ -210,9 +210,6 @@ - - @@ -222,6 +219,9 @@ + + diff --git a/dists/msvc71/kyra.vcproj b/dists/msvc71/kyra.vcproj index 4c9cdb855b..eeeb44bd13 100644 --- a/dists/msvc71/kyra.vcproj +++ b/dists/msvc71/kyra.vcproj @@ -176,12 +176,6 @@ - - - - @@ -200,6 +194,12 @@ + + + + @@ -224,9 +224,6 @@ - - @@ -236,6 +233,9 @@ + + diff --git a/dists/msvc8/kyra.vcproj b/dists/msvc8/kyra.vcproj index 766b95c9e3..1ed9378e27 100644 --- a/dists/msvc8/kyra.vcproj +++ b/dists/msvc8/kyra.vcproj @@ -248,14 +248,6 @@ RelativePath="..\..\engines\kyra\items_v2.cpp" > - - - - @@ -280,6 +272,14 @@ RelativePath="..\..\engines\kyra\kyra_mr.h" > + + + + @@ -312,10 +312,6 @@ RelativePath="..\..\engines\kyra\saveload_mr.cpp" > - - @@ -328,6 +324,10 @@ RelativePath="..\..\engines\kyra\scene_mr.cpp" > + + diff --git a/dists/msvc9/kyra.vcproj b/dists/msvc9/kyra.vcproj index 0c2a2da4b9..2b4897ff76 100644 --- a/dists/msvc9/kyra.vcproj +++ b/dists/msvc9/kyra.vcproj @@ -249,14 +249,6 @@ RelativePath="..\..\engines\kyra\items_v2.cpp" > - - - - @@ -281,6 +273,14 @@ RelativePath="..\..\engines\kyra\kyra_mr.h" > + + + + @@ -313,10 +313,6 @@ RelativePath="..\..\engines\kyra\saveload_mr.cpp" > - - @@ -329,6 +325,10 @@ RelativePath="..\..\engines\kyra\scene_mr.cpp" > + + -- cgit v1.2.3 From 574af78acb793b23b22f3a47d201d4074387304e Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 12 May 2008 12:42:10 +0000 Subject: - Moved some opcodes to KyraEngine_v1 - Little variable renaming svn-id: r32053 --- engines/kyra/animator_hof.cpp | 2 +- engines/kyra/animator_mr.cpp | 2 +- engines/kyra/gui_hof.cpp | 8 ++-- engines/kyra/gui_mr.cpp | 8 ++-- engines/kyra/items_hof.cpp | 2 +- engines/kyra/items_lok.cpp | 12 +++--- engines/kyra/items_mr.cpp | 4 +- engines/kyra/items_v2.cpp | 2 +- engines/kyra/kyra_hof.cpp | 14 +++---- engines/kyra/kyra_lok.cpp | 4 +- engines/kyra/kyra_lok.h | 15 +------- engines/kyra/kyra_mr.cpp | 22 +++++------ engines/kyra/kyra_v1.cpp | 2 + engines/kyra/kyra_v1.h | 17 +++++++++ engines/kyra/kyra_v2.h | 11 ------ engines/kyra/saveload_lok.cpp | 2 +- engines/kyra/scene_mr.cpp | 2 +- engines/kyra/script_hof.cpp | 20 +++++----- engines/kyra/script_lok.cpp | 64 ++----------------------------- engines/kyra/script_mr.cpp | 26 ++++++------- engines/kyra/script_v1.cpp | 87 +++++++++++++++++++++++++++++++++++++++++++ engines/kyra/script_v2.cpp | 56 ---------------------------- 22 files changed, 177 insertions(+), 205 deletions(-) create mode 100644 engines/kyra/script_v1.cpp diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp index f9fe281179..1192145530 100644 --- a/engines/kyra/animator_hof.cpp +++ b/engines/kyra/animator_hof.cpp @@ -139,7 +139,7 @@ void KyraEngine_HoF::updateItemAnimations() { return; uint16 shpIdx = s->frames[a->currentFrame].index + 64; - if (s->itemIndex == _handItemSet && s->itemIndex == _itemInHand && _screen->isMouseVisible()) { + if (s->itemIndex == _mouseState && s->itemIndex == _itemInHand && _screen->isMouseVisible()) { nextFrame = true; _screen->setMouseCursor(8, 15, getShapePtr(shpIdx)); } diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp index 5952f8df5a..f04ca0345d 100644 --- a/engines/kyra/animator_mr.cpp +++ b/engines/kyra/animator_mr.cpp @@ -216,7 +216,7 @@ void KyraEngine_MR::updateItemAnimations() { return; uint16 shpIdx = s->frames[a->currentFrame].index + 248; - if (s->itemIndex == _handItemSet && s->itemIndex == _itemInHand && _screen->isMouseVisible()) { + if (s->itemIndex == _mouseState && s->itemIndex == _itemInHand && _screen->isMouseVisible()) { nextFrame = true; _screen->setMouseCursor(12, 19, getShapePtr(shpIdx)); } diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp index d60b353de3..d983bce0d7 100644 --- a/engines/kyra/gui_hof.cpp +++ b/engines/kyra/gui_hof.cpp @@ -348,7 +348,7 @@ int KyraEngine_HoF::bookButton(Button *button) { return 0; } - if (_handItemSet != -1) { + if (_mouseState != -1) { snd_playSoundEffect(0x0D); return 0; } @@ -601,7 +601,7 @@ int KyraEngine_HoF::cauldronButton(Button *button) { return 0; } - if (!_screen->isMouseVisible() || _handItemSet < -1) + if (!_screen->isMouseVisible() || _mouseState < -1) return 0; if (queryGameFlag(0xE4)) { @@ -681,8 +681,8 @@ int GUI_HoF::optionsButton(Button *button) { _vm->showMessage(0, 0xCF); - if (_vm->_handItemSet < -1) { - _vm->_handItemSet = -1; + if (_vm->_mouseState < -1) { + _vm->_mouseState = -1; _screen->hideMouse(); _screen->setMouseCursor(1, 1, _vm->getShapePtr(0)); _screen->showMouse(); diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp index d0a39df0b2..0384b3c138 100644 --- a/engines/kyra/gui_mr.cpp +++ b/engines/kyra/gui_mr.cpp @@ -194,7 +194,7 @@ void KyraEngine_MR::showInventory() { _screen->hideMouse(); if (_itemInHand < 0) { - _handItemSet = -1; + _mouseState = -1; _screen->setMouseCursor(0, 0, getShapePtr(0)); } @@ -684,7 +684,7 @@ int KyraEngine_MR::buttonJesterStaff(Button *button) { void KyraEngine_MR::showAlbum() { debugC(9, kDebugLevelMain, "KyraEngine_MR::showAlbum()"); - if (!_screen->isMouseVisible() || queryGameFlag(4) || _handItemSet != -1) + if (!_screen->isMouseVisible() || queryGameFlag(4) || _mouseState != -1) return; if (!loadLanguageFile("ALBUM.", _album.file)) @@ -1262,8 +1262,8 @@ int GUI_MR::optionsButton(Button *button) { _vm->showMessage(0, 0xF0, 0xF0); - if (_vm->_handItemSet < -1) { - _vm->_handItemSet = -1; + if (_vm->_mouseState < -1) { + _vm->_mouseState = -1; _screen->hideMouse(); _screen->setMouseCursor(1, 1, _vm->getShapePtr(0)); _screen->showMouse(); diff --git a/engines/kyra/items_hof.cpp b/engines/kyra/items_hof.cpp index da3062fe2c..4dfc73a5ad 100644 --- a/engines/kyra/items_hof.cpp +++ b/engines/kyra/items_hof.cpp @@ -83,7 +83,7 @@ void KyraEngine_HoF::updateWaterFlasks() { bool KyraEngine_HoF::dropItem(int unk1, uint16 item, int x, int y, int unk2) { debugC(9, kDebugLevelMain, "KyraEngine_HoF::dropItem(%d, %u, %d, %d, %d)", unk1, item, x, y, unk2); - if (_handItemSet <= -1) + if (_mouseState <= -1) return false; bool success = processItemDrop(_mainCharacter.sceneId, item, x, y, unk1, unk2); diff --git a/engines/kyra/items_lok.cpp b/engines/kyra/items_lok.cpp index c468a6e197..e86be25707 100644 --- a/engines/kyra/items_lok.cpp +++ b/engines/kyra/items_lok.cpp @@ -175,16 +175,16 @@ void KyraEngine_LoK::placeItemInGenericMapScene(int item, int index) { } } -void KyraEngine_LoK::createMouseItem(int item) { - debugC(9, kDebugLevelMain, "KyraEngine_LoK::createMouseItem(%d)", item); +void KyraEngine_LoK::setHandItem(uint16 item) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setHandItem(%d)", item); _screen->hideMouse(); setMouseItem(item); _itemInHand = item; _screen->showMouse(); } -void KyraEngine_LoK::destroyMouseItem() { - debugC(9, kDebugLevelMain, "KyraEngine_LoK::destroyMouseItem()"); +void KyraEngine_LoK::removeHandItem() { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::removeHandItem()"); _screen->hideMouse(); _screen->setMouseCursor(1, 1, _shapes[0]); _itemInHand = -1; @@ -222,7 +222,7 @@ void KyraEngine_LoK::wipeDownMouseItem(int xpos, int ypos) { } restoreItemRect1(xpos, ypos); _screen->resetShapeHeight(_shapes[216+_itemInHand]); - destroyMouseItem(); + removeHandItem(); _screen->showMouse(); } @@ -420,7 +420,7 @@ int KyraEngine_LoK::processItemDrop(uint16 sceneId, uint8 item, int x, int y, in itemSpecialFX(x, y, item); if (unk1 == 0) - destroyMouseItem(); + removeHandItem(); itemDropDown(x, y, destX, destY, freeItem, item); diff --git a/engines/kyra/items_mr.cpp b/engines/kyra/items_mr.cpp index 8ace9f8a3c..299c826e80 100644 --- a/engines/kyra/items_mr.cpp +++ b/engines/kyra/items_mr.cpp @@ -97,7 +97,7 @@ void KyraEngine_MR::setMouseCursor(uint16 item) { void KyraEngine_MR::setItemMouseCursor() { debugC(9, kDebugLevelMain, "KyraEngine_MR::setItemMouseCursor()"); - _handItemSet = _itemInHand; + _mouseState = _itemInHand; if (_itemInHand == -1) _screen->setMouseCursor(0, 0, _gameShapes[0]); else @@ -107,7 +107,7 @@ void KyraEngine_MR::setItemMouseCursor() { bool KyraEngine_MR::dropItem(int unk1, uint16 item, int x, int y, int unk2) { debugC(9, kDebugLevelMain, "KyraEngine_MR::dropItem(%d, %d, %d, %d, %d)", unk1, item, x, y, unk2); - if (_handItemSet <= -1) + if (_mouseState <= -1) return false; if (processItemDrop(_mainCharacter.sceneId, item, x, y, unk1, unk2)) diff --git a/engines/kyra/items_v2.cpp b/engines/kyra/items_v2.cpp index 923bf876b1..83f637b06f 100644 --- a/engines/kyra/items_v2.cpp +++ b/engines/kyra/items_v2.cpp @@ -112,7 +112,7 @@ void KyraEngine_v2::removeHandItem() { scr->hideMouse(); scr->setMouseCursor(0, 0, getShapePtr(0)); _itemInHand = -1; - _handItemSet = -1; + _mouseState = -1; scr->showMouse(); } diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index f1b74a7bdb..0bc5162e94 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -81,7 +81,7 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn _oldTalkFile = -1; _currentTalkFile = 0; _lastSfxTrack = -1; - _handItemSet = -1; + _mouseState = -1; _unkHandleSceneChangeFlag = false; _pathfinderFlag = 0; _mouseX = _mouseY = 0; @@ -449,7 +449,7 @@ void KyraEngine_HoF::runLoop() { update(); if (inputFlag == 198 || inputFlag == 199) { - _unk3 = _handItemSet; + _unk3 = _mouseState; handleInput(_mouseX, _mouseY); } @@ -568,7 +568,7 @@ bool KyraEngine_HoF::handleInputUnkSub(int x, int y) { if (y > 143 || _deathHandler > -1 || queryGameFlag(0x164)) return false; - if (_handItemSet <= -3 && findItem(_mainCharacter.sceneId, 13) >= 0) { + if (_mouseState <= -3 && findItem(_mainCharacter.sceneId, 13) >= 0) { updateCharFacing(); objectChat(getTableString(0xFC, _cCodeBuffer, 1), 0, 0x83, 0xFC); return true; @@ -723,16 +723,16 @@ void KyraEngine_HoF::updateMouse() { yOffset = 9; } - if (type != 0 && _handItemSet != type && _screen->isMouseVisible()) { - _handItemSet = type; + if (type != 0 && _mouseState != type && _screen->isMouseVisible()) { + _mouseState = type; _screen->hideMouse(); _screen->setMouseCursor(xOffset, yOffset, getShapePtr(shapeIndex)); _screen->showMouse(); } - if (type == 0 && _handItemSet != _itemInHand && _screen->isMouseVisible()) { + if (type == 0 && _mouseState != _itemInHand && _screen->isMouseVisible()) { if ((mouse.y > 145) || (mouse.x > 6 && mouse.x < 312 && mouse.y > 6 && mouse.y < 135)) { - _handItemSet = _itemInHand; + _mouseState = _itemInHand; _screen->hideMouse(); if (_itemInHand == -1) _screen->setMouseCursor(0, 0, getShapePtr(0)); diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp index 6ab2db5492..6636b8ba6d 100644 --- a/engines/kyra/kyra_lok.cpp +++ b/engines/kyra/kyra_lok.cpp @@ -247,7 +247,7 @@ int KyraEngine_LoK::init() { _marbleVaseItem = -1; memset(_foyerItemTable, -1, sizeof(_foyerItemTable)); - _mouseState = _itemInHand = -1; + _itemInHand = -1; _handleInput = false; _currentRoom = 0xFFFF; @@ -414,7 +414,7 @@ void KyraEngine_LoK::mainLoop() { snd_playSoundEffect(49); _screen->hideMouse(); _screen->setMouseCursor(1, 1, _shapes[0]); - destroyMouseItem(); + removeHandItem(); _screen->showMouse(); _gui->buttonMenuCallback(0); _deathHandler = 0xFF; diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index eed2f71ab0..cb63f8ef2f 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -282,8 +282,8 @@ protected: void placeItemInGenericMapScene(int item, int index); // -> mouse item - void createMouseItem(int item); - void destroyMouseItem(); + void setHandItem(uint16 item); + void removeHandItem(); void setMouseItem(int item); // -> graphics effects @@ -392,7 +392,6 @@ protected: uint8 *_itemBkgBackUp[2]; uint8 *_shapes[373]; int8 _itemInHand; - int _mouseState; bool _handleInput; bool _changedScene; int _unkScreenVar1, _unkScreenVar2, _unkScreenVar3; @@ -658,9 +657,6 @@ protected: int o1_characterSays(EMCState *script); int o1_pauseTicks(EMCState *script); int o1_drawSceneAnimShape(EMCState *script); - int o1_queryGameFlag(EMCState *script); - int o1_setGameFlag(EMCState *script); - int o1_resetGameFlag(EMCState *script); int o1_runNPCScript(EMCState *script); int o1_setSpecialExitList(EMCState *script); int o1_blockInWalkableRegion(EMCState *script); @@ -668,13 +664,11 @@ protected: int o1_walkPlayerToPoint(EMCState *script); int o1_dropItemInScene(EMCState *script); int o1_drawAnimShapeIntoScene(EMCState *script); - int o1_createMouseItem(EMCState *script); int o1_savePageToDisk(EMCState *script); int o1_sceneAnimOn(EMCState *script); int o1_sceneAnimOff(EMCState *script); int o1_getElapsedSeconds(EMCState *script); int o1_mouseIsPointer(EMCState *script); - int o1_destroyMouseItem(EMCState *script); int o1_runSceneAnimUntilDone(EMCState *script); int o1_fadeSpecialPalette(EMCState *script); int o1_playAdlibSound(EMCState *script); @@ -708,14 +702,11 @@ protected: int o1_loadPageFromDisk(EMCState *script); int o1_customPrintTalkString(EMCState *script); int o1_restoreCustomPrintBackground(EMCState *script); - int o1_hideMouse(EMCState *script); - int o1_showMouse(EMCState *script); int o1_getCharacterX(EMCState *script); int o1_getCharacterY(EMCState *script); int o1_changeCharactersFacing(EMCState *script); int o1_copyWSARegion(EMCState *script); int o1_printText(EMCState *script); - int o1_random(EMCState *script); int o1_loadSoundFile(EMCState *script); int o1_displayWSAFrameOnHidPage(EMCState *script); int o1_displayWSASequentialFrames(EMCState *script); @@ -775,8 +766,6 @@ protected: int o1_setIdolGem(EMCState *script); int o1_totalItemsInScene(EMCState *script); int o1_restoreBrandonsMovementDelay(EMCState *script); - int o1_setMousePos(EMCState *script); - int o1_getMouseState(EMCState *script); int o1_setEntranceMouseCursorTrack(EMCState *script); int o1_itemAppearsOnGround(EMCState *script); int o1_setNoDrawShapesFlag(EMCState *script); diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index f53192d68a..88f9b307a2 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -99,7 +99,7 @@ KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngi _unk5 = 0; _unkSceneScreenFlag1 = false; _noScriptEnter = true; - _itemInHand = _handItemSet = -1; + _itemInHand = _mouseState = -1; _unk3 = -1; _unk4 = 0; _loadingState = false; @@ -999,7 +999,7 @@ void KyraEngine_MR::runLoop() { _timer->update(); if (inputFlag == 198 || inputFlag == 199) { - _unk3 = _handItemSet; + _unk3 = _mouseState; Common::Point mouse = getMousePos(); handleInput(mouse.x, mouse.y); } @@ -1181,13 +1181,13 @@ void KyraEngine_MR::updateMouse() { if (mouse.y > 187) { bool setItemCursor = false; - if (_handItemSet == -6) { + if (_mouseState == -6) { if (mouse.x < 311) setItemCursor = true; - } else if (_handItemSet == -5) { + } else if (_mouseState == -5) { if (mouse.x < _sceneMinX || mouse.x > _sceneMaxX) setItemCursor = true; - } else if (_handItemSet == -4) { + } else if (_mouseState == -4) { if (mouse.x > 8) setItemCursor = true; } @@ -1204,8 +1204,8 @@ void KyraEngine_MR::updateMouse() { hideInventory(); } - if (hasItemCollision && _handItemSet < -1 && _itemInHand < 0) { - _handItemSet = -1; + if (hasItemCollision && _mouseState < -1 && _itemInHand < 0) { + _mouseState = -1; _itemInHand = -1; _screen->setMouseCursor(0, 0, _gameShapes[0]); } @@ -1282,12 +1282,12 @@ void KyraEngine_MR::updateMouse() { } } - if (type != 0 && type != _handItemSet && !hasItemCollision) { - _handItemSet = type; + if (type != 0 && type != _mouseState && !hasItemCollision) { + _mouseState = type; _screen->setMouseCursor(offsetX, offsetY, _gameShapes[shape]); - } else if (type == 0 && _handItemSet != _itemInHand && mouse.x > 8 && mouse.x < 311 && mouse.y < 171 && mouse.y > 8) { + } else if (type == 0 && _mouseState != _itemInHand && mouse.x > 8 && mouse.x < 311 && mouse.y < 171 && mouse.y > 8) { setItemMouseCursor(); - } else if (mouse.y > 187 && _handItemSet > -4 && type == 0 && !_inventoryState) { + } else if (mouse.y > 187 && _mouseState > -4 && type == 0 && !_inventoryState) { showInventory(); } } diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 8109ab0e26..76b68d5164 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -62,6 +62,8 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags) _gameToLoad = -1; + _mouseState = -1; + memset(_flagsTable, 0, sizeof(_flagsTable)); // sets up all engine specific debug levels diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 076c6bbd54..1b410d1907 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -212,6 +212,23 @@ protected: virtual void setupOpcodeTable() = 0; Common::Array _opcodes; + int o1_queryGameFlag(EMCState *script); + int o1_setGameFlag(EMCState *script); + int o1_resetGameFlag(EMCState *script); + int o1_getRand(EMCState *script); + int o1_hideMouse(EMCState *script); + int o1_showMouse(EMCState *script); + int o1_setMousePos(EMCState *script); + int o1_setHandItem(EMCState *script); + int o1_removeHandItem(EMCState *script); + int o1_getMouseState(EMCState *script); + + // items + int _mouseState; + + virtual void setHandItem(uint16 item) = 0; + virtual void removeHandItem() = 0; + // game flags uint8 _flagsTable[100]; // TODO: check this value diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index f487799744..44eb06ce57 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -318,7 +318,6 @@ protected: int _itemListSize; int _itemInHand; - int _handItemSet; int findFreeItem(); int countAllItems(); @@ -393,21 +392,11 @@ protected: int o2_moveCharacter(EMCState *script); int o2_checkForItem(EMCState *script); int o2_defineItem(EMCState *script); - int o2_queryGameFlag(EMCState *script); - int o2_resetGameFlag(EMCState *script); - int o2_setGameFlag(EMCState *script); - int o2_setHandItem(EMCState *script); - int o2_removeHandItem(EMCState *script); - int o2_handItemSet(EMCState *script); - int o2_hideMouse(EMCState *script); int o2_addSpecialExit(EMCState *script); - int o2_setMousePos(EMCState *script); - int o2_showMouse(EMCState *script); int o2_delay(EMCState *script); int o2_update(EMCState *script); int o2_getShapeFlag1(EMCState *script); int o2_playWanderScoreViaMap(EMCState *script); - int o2_getRand(EMCState *script); int o2_setDeathHandler(EMCState *script); int o2_waitForConfirmationClick(EMCState *script); int o2_randomSceneChat(EMCState *script); diff --git a/engines/kyra/saveload_lok.cpp b/engines/kyra/saveload_lok.cpp index 6f1fc484fd..8af73acc61 100644 --- a/engines/kyra/saveload_lok.cpp +++ b/engines/kyra/saveload_lok.cpp @@ -183,7 +183,7 @@ void KyraEngine_LoK::loadGame(const char *fileName) { _screen->copyRegion(0, 0, 0, 0, 320, 200, 8, 0); } - createMouseItem(_itemInHand); + setHandItem(_itemInHand); _animator->setBrandonAnimSeqSize(3, 48); redrawInventory(0); _animator->_noDrawShapesFlag = 1; diff --git a/engines/kyra/scene_mr.cpp b/engines/kyra/scene_mr.cpp index 16b5f1fd4d..e4a3a5c54e 100644 --- a/engines/kyra/scene_mr.cpp +++ b/engines/kyra/scene_mr.cpp @@ -182,7 +182,7 @@ void KyraEngine_MR::enterNewScene(uint16 sceneId, int facing, int unk1, int unk2 if (_itemInHand < 0) { _itemInHand = -1; - _handItemSet = -1; + _mouseState = -1; _screen->setMouseCursor(0, 0, _gameShapes[0]); } diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index 4525d71548..b6835ab044 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -1560,19 +1560,19 @@ void KyraEngine_HoF::setupOpcodeTable() { Opcode(o2_removeItemFromInventory); Opcode(o2_countItemInInventory); Opcode(o2_countItemsInScene); - Opcode(o2_queryGameFlag); + Opcode(o1_queryGameFlag); // 0x28 - Opcode(o2_resetGameFlag); - Opcode(o2_setGameFlag); - Opcode(o2_setHandItem); - Opcode(o2_removeHandItem); + Opcode(o1_resetGameFlag); + Opcode(o1_setGameFlag); + Opcode(o1_setHandItem); + Opcode(o1_removeHandItem); // 0x2c - Opcode(o2_handItemSet); - Opcode(o2_hideMouse); + Opcode(o1_getMouseState); + Opcode(o1_hideMouse); Opcode(o2_addSpecialExit); - Opcode(o2_setMousePos); + Opcode(o1_setMousePos); // 0x30 - Opcode(o2_showMouse); + Opcode(o1_showMouse); OpcodeUnImpl(); Opcode(o2_wipeDownMouseItem); Opcode(o2_getElapsedSecs); @@ -1632,7 +1632,7 @@ void KyraEngine_HoF::setupOpcodeTable() { Opcode(o2_setCauldronState); Opcode(o2_showItemString); // 0x60 - Opcode(o2_getRand); + Opcode(o1_getRand); Opcode(o2_isAnySoundPlaying); Opcode(o2_setDeathHandler); Opcode(o2_setDrawNoShapeFlag); diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index 3f578d9e0f..f944e59b4a 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -92,21 +92,6 @@ int KyraEngine_LoK::o1_drawSceneAnimShape(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_queryGameFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_queryGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); - return queryGameFlag(stackPos(0)); -} - -int KyraEngine_LoK::o1_setGameFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); - return setGameFlag(stackPos(0)); -} - -int KyraEngine_LoK::o1_resetGameFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_resetGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); - return resetGameFlag(stackPos(0)); -} - int KyraEngine_LoK::o1_runNPCScript(EMCState *script) { warning("STUB: o1_runNPCScript"); return 0; @@ -205,12 +190,6 @@ int KyraEngine_LoK::o1_drawAnimShapeIntoScene(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_createMouseItem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_createMouseItem(%p) (%d)", (const void *)script, stackPos(0)); - createMouseItem(stackPos(0)); - return 0; -} - int KyraEngine_LoK::o1_savePageToDisk(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_savePageToDisk(%p) ('%s', %d)", (const void *)script, stackPosString(0), stackPos(1)); _screen->savePageToDisk(stackPosString(0), stackPos(1)); @@ -241,12 +220,6 @@ int KyraEngine_LoK::o1_mouseIsPointer(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_destroyMouseItem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_destroyMouseItem(%p) ()", (const void *)script); - destroyMouseItem(); - return 0; -} - int KyraEngine_LoK::o1_runSceneAnimUntilDone(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_runSceneAnimUntilDone(%p) (%d)", (const void *)script, stackPos(0)); _screen->hideMouse(); @@ -665,18 +638,6 @@ int KyraEngine_LoK::o1_restoreCustomPrintBackground(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_hideMouse(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_hideMouse(%p) ()", (const void *)script); - _screen->hideMouse(); - return 0; -} - -int KyraEngine_LoK::o1_showMouse(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_showMouse(%p) ()", (const void *)script); - _screen->showMouse(); - return 0; -} - int KyraEngine_LoK::o1_getCharacterX(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getCharacterX(%p) (%d)", (const void *)script, stackPos(0)); return _characterList[stackPos(0)].x1; @@ -728,12 +689,6 @@ int KyraEngine_LoK::o1_printText(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_random(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_random(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - assert(stackPos(0) < stackPos(1)); - return _rnd.getRandomNumberRng(stackPos(0), stackPos(1)); -} - int KyraEngine_LoK::o1_loadSoundFile(EMCState *script) { warning("STUB: o1_loadSoundFile"); return 0; @@ -922,7 +877,7 @@ int KyraEngine_LoK::o1_wipeDownMouseItem(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_wipeDownMouseItem(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); _screen->hideMouse(); wipeDownMouseItem(stackPos(1), stackPos(2)); - destroyMouseItem(); + removeHandItem(); _screen->showMouse(); return 0; } @@ -1512,17 +1467,6 @@ int KyraEngine_LoK::o1_restoreBrandonsMovementDelay(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_setMousePos(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setMousePos(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - _system->warpMouse(stackPos(0), stackPos(1)); - return 0; -} - -int KyraEngine_LoK::o1_getMouseState(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getMouseState(%p) ()", (const void *)script); - return _mouseState; -} - int KyraEngine_LoK::o1_setEntranceMouseCursorTrack(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setEntranceMouseCursorTrack(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); _entranceMouseCursorTracks[0] = stackPos(0); @@ -1845,7 +1789,7 @@ void KyraEngine_LoK::setupOpcodeTable() { // 0x0c Opcode(o1_dropItemInScene); Opcode(o1_drawAnimShapeIntoScene); - Opcode(o1_createMouseItem); + Opcode(o1_setHandItem); Opcode(o1_savePageToDisk); // 0x10 Opcode(o1_sceneAnimOn); @@ -1853,7 +1797,7 @@ void KyraEngine_LoK::setupOpcodeTable() { Opcode(o1_getElapsedSeconds); Opcode(o1_mouseIsPointer); // 0x14 - Opcode(o1_destroyMouseItem); + Opcode(o1_removeHandItem); Opcode(o1_runSceneAnimUntilDone); Opcode(o1_fadeSpecialPalette); Opcode(o1_playAdlibSound); @@ -1904,7 +1848,7 @@ void KyraEngine_LoK::setupOpcodeTable() { Opcode(o1_copyWSARegion); // 0x3c Opcode(o1_printText); - Opcode(o1_random); + Opcode(o1_getRand); Opcode(o1_loadSoundFile); Opcode(o1_displayWSAFrameOnHidPage); // 0x40 diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp index 0142a06b7d..af0bde24c1 100644 --- a/engines/kyra/script_mr.cpp +++ b/engines/kyra/script_mr.cpp @@ -1199,19 +1199,19 @@ void KyraEngine_MR::setupOpcodeTable() { Opcode(o3_removeInventoryItemInstances); Opcode(o3_countInventoryItemInstances); Opcode(o3_npcChatSequence); - Opcode(o2_queryGameFlag); + Opcode(o1_queryGameFlag); // 0x28 - Opcode(o2_resetGameFlag); - Opcode(o2_setGameFlag); - Opcode(o2_setHandItem); - Opcode(o2_removeHandItem); + Opcode(o1_resetGameFlag); + Opcode(o1_setGameFlag); + Opcode(o1_setHandItem); + Opcode(o1_removeHandItem); // 0x2c - Opcode(o2_handItemSet); - Opcode(o2_hideMouse); + Opcode(o1_getMouseState); + Opcode(o1_hideMouse); Opcode(o2_addSpecialExit); - Opcode(o2_setMousePos); + Opcode(o1_setMousePos); // 0x30 - Opcode(o2_showMouse); + Opcode(o1_showMouse); Opcode(o3_badConscienceChat); Opcode(o3_wipeDownMouseItem); Opcode(o3_dummy); @@ -1271,7 +1271,7 @@ void KyraEngine_MR::setupOpcodeTable() { Opcode(o3_showSceneStringsMessage); OpcodeUnImpl(); // 0x60 - Opcode(o2_getRand); + Opcode(o1_getRand); Opcode(o3_dummy); Opcode(o2_setDeathHandler); Opcode(o3_showGoodConscience); @@ -1379,7 +1379,7 @@ void KyraEngine_MR::setupOpcodeTable() { Opcode(o3_dummy); // 0x0a Opcode(o2a_setResetFrame); - Opcode(o2_getRand); + Opcode(o1_getRand); Opcode(o3_getMalcolmShapes); Opcode(o3_dummy); @@ -1387,8 +1387,8 @@ void KyraEngine_MR::setupOpcodeTable() { // 0x00 Opcode(o3d_updateAnim); Opcode(o3d_delay); - Opcode(o2_getRand); - Opcode(o2_queryGameFlag); + Opcode(o1_getRand); + Opcode(o1_queryGameFlag); // 0x04 Opcode(o3_dummy); } diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp new file mode 100644 index 0000000000..150b736865 --- /dev/null +++ b/engines/kyra/script_v1.cpp @@ -0,0 +1,87 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "kyra/kyra_v1.h" + +namespace Kyra { + +int KyraEngine_v1::o1_queryGameFlag(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_queryGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); + return queryGameFlag(stackPos(0)); +} + +int KyraEngine_v1::o1_setGameFlag(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); + return setGameFlag(stackPos(0)); +} + +int KyraEngine_v1::o1_resetGameFlag(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_resetGameFlag(%p) (0x%X)", (const void *)script, stackPos(0)); + return resetGameFlag(stackPos(0)); +} + +int KyraEngine_v1::o1_getRand(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getRand(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + assert(stackPos(0) < stackPos(1)); + return _rnd.getRandomNumberRng(stackPos(0), stackPos(1)); +} + +int KyraEngine_v1::o1_hideMouse(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_hideMouse(%p) ()", (const void *)script); + _screen->hideMouse(); + return 0; +} + +int KyraEngine_v1::o1_showMouse(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_showMouse(%p) ()", (const void *)script); + _screen->showMouse(); + return 0; +} + +int KyraEngine_v1::o1_setMousePos(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setMousePos(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + _system->warpMouse(stackPos(0), stackPos(1)); + return 0; +} + +int KyraEngine_v1::o1_setHandItem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setHandItem(%p) (%d)", (const void *)script, stackPos(0)); + setHandItem(stackPos(0)); + return 0; +} + +int KyraEngine_v1::o1_removeHandItem(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_removeHandItem(%p) ()", (const void *)script); + removeHandItem(); + return 0; +} + +int KyraEngine_v1::o1_getMouseState(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_getMouseState(%p) ()", (const void *)script); + return _mouseState; +} + +} // end of namespace Kyra + diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp index fcfb34561f..8c412cd560 100644 --- a/engines/kyra/script_v2.cpp +++ b/engines/kyra/script_v2.cpp @@ -103,44 +103,6 @@ int KyraEngine_v2::o2_defineItem(EMCState *script) { return freeItem; } -int KyraEngine_v2::o2_queryGameFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_queryGameFlag(%p) (%d)", (const void *)script, stackPos(0)); - return queryGameFlag(stackPos(0)); -} - -int KyraEngine_v2::o2_resetGameFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_resetGameFlag(%p) (%d)", (const void *)script, stackPos(0)); - return resetGameFlag(stackPos(0)); -} - -int KyraEngine_v2::o2_setGameFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_setGameFlag(%p) (%d)", (const void *)script, stackPos(0)); - return setGameFlag(stackPos(0)); -} - -int KyraEngine_v2::o2_setHandItem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_setHandItem(%p) (%d)", (const void *)script, stackPos(0)); - setHandItem(stackPos(0)); - return 0; -} - -int KyraEngine_v2::o2_removeHandItem(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_removeHandItem(%p) ()", (const void *)script); - removeHandItem(); - return 0; -} - -int KyraEngine_v2::o2_handItemSet(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_handItemSet(%p) ()", (const void *)script); - return _handItemSet; -} - -int KyraEngine_v2::o2_hideMouse(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_hideMouse(%p) ()", (const void *)script); - screen()->hideMouse(); - return 0; -} - int KyraEngine_v2::o2_addSpecialExit(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_addSpecialExit(%p) (%d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4)); @@ -155,18 +117,6 @@ int KyraEngine_v2::o2_addSpecialExit(EMCState *script) { return 0; } -int KyraEngine_v2::o2_setMousePos(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_setMousePos(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - setMousePos(stackPos(0), stackPos(1)); - return 0; -} - -int KyraEngine_v2::o2_showMouse(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_showMouse(%p) ()", (const void *)script); - screen()->showMouse(); - return 0; -} - int KyraEngine_v2::o2_delay(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_delay(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); if (stackPos(1)) { @@ -212,12 +162,6 @@ int KyraEngine_v2::o2_playWanderScoreViaMap(EMCState *script) { return 0; } -int KyraEngine_v2::o2_getRand(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_getRand(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - assert(stackPos(0) < stackPos(1)); - return _rnd.getRandomNumberRng(stackPos(0), stackPos(1)); -} - int KyraEngine_v2::o2_setDeathHandler(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_setDeathHandler(%p) (%d)", (const void *)script, stackPos(0)); _deathHandler = stackPos(0); -- cgit v1.2.3 From 279987c181b5c5e6d6810c3f23a63eab5fb4c999 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 12 May 2008 12:43:52 +0000 Subject: Oops forgot to commit module.mk svn-id: r32054 --- engines/kyra/module.mk | 1 + engines/kyra/script_v1.cpp | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/kyra/module.mk b/engines/kyra/module.mk index b027459613..ebb63b4b4e 100644 --- a/engines/kyra/module.mk +++ b/engines/kyra/module.mk @@ -36,6 +36,7 @@ MODULE_OBJS := \ screen_v2.o \ screen_hof.o \ screen_mr.o \ + script_v1.o \ script_lok.o \ script_v2.o \ script_hof.o \ diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index 150b736865..40c82ff00a 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -24,6 +24,7 @@ */ #include "kyra/kyra_v1.h" +#include "kyra/screen.h" namespace Kyra { @@ -50,13 +51,13 @@ int KyraEngine_v1::o1_getRand(EMCState *script) { int KyraEngine_v1::o1_hideMouse(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_hideMouse(%p) ()", (const void *)script); - _screen->hideMouse(); + screen()->hideMouse(); return 0; } int KyraEngine_v1::o1_showMouse(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_showMouse(%p) ()", (const void *)script); - _screen->showMouse(); + screen()->showMouse(); return 0; } -- cgit v1.2.3 From 1a52c5283a982350702a68f7aa4b66100711f1c3 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 12 May 2008 12:57:42 +0000 Subject: - Yet more opcodes moved to KyraEngine_v1 - Renamed some opcodes inside KyraEngine_LoK svn-id: r32055 --- engines/kyra/gui_lok.cpp | 2 +- engines/kyra/kyra_lok.cpp | 5 ++--- engines/kyra/kyra_lok.h | 10 ++++------ engines/kyra/kyra_v1.cpp | 1 + engines/kyra/kyra_v1.h | 5 +++++ engines/kyra/kyra_v2.h | 3 --- engines/kyra/script_hof.cpp | 4 ++-- engines/kyra/script_lok.cpp | 40 ++++++++++++++-------------------------- engines/kyra/script_mr.cpp | 4 ++-- engines/kyra/script_v1.cpp | 12 ++++++++++++ engines/kyra/script_v2.cpp | 12 ------------ 11 files changed, 43 insertions(+), 55 deletions(-) diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp index feacde683c..2b823b1ae7 100644 --- a/engines/kyra/gui_lok.cpp +++ b/engines/kyra/gui_lok.cpp @@ -423,7 +423,7 @@ int GUI_LoK::buttonMenuCallback(Button *caller) { */ setGUILabels(); - if (_vm->_currentCharacter->sceneId == 210 && _vm->_deathHandler == 0xFF) { + if (_vm->_currentCharacter->sceneId == 210 && _vm->_deathHandler == -1) { _vm->snd_playSoundEffect(0x36); return 0; } diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp index 6636b8ba6d..0668cc7202 100644 --- a/engines/kyra/kyra_lok.cpp +++ b/engines/kyra/kyra_lok.cpp @@ -229,7 +229,6 @@ int KyraEngine_LoK::init() { _brandonStatusBit = 0; _brandonStatusBit0x02Flag = _brandonStatusBit0x20Flag = 10; _brandonPosX = _brandonPosY = -1; - _deathHandler = 0xFF; _poisonDeathCounter = 0; memset(_itemTable, 0, sizeof(_itemTable)); @@ -409,7 +408,7 @@ void KyraEngine_LoK::mainLoop() { break; } - if (_deathHandler != 0xFF) { + if (_deathHandler != -1) { snd_playWanderScoreViaMap(0, 1); snd_playSoundEffect(49); _screen->hideMouse(); @@ -417,7 +416,7 @@ void KyraEngine_LoK::mainLoop() { removeHandItem(); _screen->showMouse(); _gui->buttonMenuCallback(0); - _deathHandler = 0xFF; + _deathHandler = -1; } if ((_brandonStatusBit & 2) && _brandonStatusBit0x02Flag) diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index cb63f8ef2f..4e68a9da22 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -435,7 +435,6 @@ protected: uint8 _brandonStatusBit0x02Flag; uint8 _brandonStatusBit0x20Flag; uint8 _brandonPoisonFlagsGFX[256]; - uint8 _deathHandler; int16 _brandonInvFlag; uint8 _poisonDeathCounter; int _brandonPosX; @@ -671,8 +670,7 @@ protected: int o1_mouseIsPointer(EMCState *script); int o1_runSceneAnimUntilDone(EMCState *script); int o1_fadeSpecialPalette(EMCState *script); - int o1_playAdlibSound(EMCState *script); - int o1_playAdlibScore(EMCState *script); + int o1_playSoundEffect(EMCState *script); int o1_phaseInSameScene(EMCState *script); int o1_setScenePhasingFlag(EMCState *script); int o1_resetScenePhasingFlag(EMCState *script); @@ -682,7 +680,7 @@ protected: int o1_placeItemInGenericMapScene(EMCState *script); int o1_setBrandonStatusBit(EMCState *script); int o1_pauseSeconds(EMCState *script); - int o1_getCharactersLocation(EMCState *script); + int o1_getCharacterScene(EMCState *script); int o1_runNPCSubscript(EMCState *script); int o1_magicOutMouseItem(EMCState *script); int o1_internalAnimOn(EMCState *script); @@ -704,13 +702,13 @@ protected: int o1_restoreCustomPrintBackground(EMCState *script); int o1_getCharacterX(EMCState *script); int o1_getCharacterY(EMCState *script); - int o1_changeCharactersFacing(EMCState *script); + int o1_setCharacterFacing(EMCState *script); int o1_copyWSARegion(EMCState *script); int o1_printText(EMCState *script); int o1_loadSoundFile(EMCState *script); int o1_displayWSAFrameOnHidPage(EMCState *script); int o1_displayWSASequentialFrames(EMCState *script); - int o1_drawCharacterStanding(EMCState *script); + int o1_refreshCharacter(EMCState *script); int o1_internalAnimOff(EMCState *script); int o1_changeCharactersXAndY(EMCState *script); int o1_clearSceneAnimatorBeacon(EMCState *script); diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index 76b68d5164..a3d18f7713 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -63,6 +63,7 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags) _gameToLoad = -1; _mouseState = -1; + _deathHandler = -1; memset(_flagsTable, 0, sizeof(_flagsTable)); diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 1b410d1907..0a7bf40a12 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -199,6 +199,9 @@ protected: uint16 _tickLength; uint16 _gameSpeed; + // run + int8 _deathHandler; + // timer virtual void setupTimers() = 0; @@ -222,6 +225,8 @@ protected: int o1_setHandItem(EMCState *script); int o1_removeHandItem(EMCState *script); int o1_getMouseState(EMCState *script); + int o1_setDeathHandler(EMCState *script); + int o1_playWanderScoreViaMap(EMCState *script); // items int _mouseState; diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index 44eb06ce57..2f6d8a6185 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -87,7 +87,6 @@ protected: // run bool _runFlag; bool _showOutro; - int8 _deathHandler; virtual void update() = 0; virtual void updateWithText() = 0; @@ -396,8 +395,6 @@ protected: int o2_delay(EMCState *script); int o2_update(EMCState *script); int o2_getShapeFlag1(EMCState *script); - int o2_playWanderScoreViaMap(EMCState *script); - int o2_setDeathHandler(EMCState *script); int o2_waitForConfirmationClick(EMCState *script); int o2_randomSceneChat(EMCState *script); int o2_setDlgIndex(EMCState *script); diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index b6835ab044..00dcc1fe6a 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -1622,7 +1622,7 @@ void KyraEngine_HoF::setupOpcodeTable() { Opcode(o2_setZanthiaPos); Opcode(o2_loadMusicTrack); // 0x58 - Opcode(o2_playWanderScoreViaMap); + Opcode(o1_playWanderScoreViaMap); Opcode(o2_playSoundEffect); Opcode(o2_setSceneAnimPos); Opcode(o2_blockInRegion); @@ -1634,7 +1634,7 @@ void KyraEngine_HoF::setupOpcodeTable() { // 0x60 Opcode(o1_getRand); Opcode(o2_isAnySoundPlaying); - Opcode(o2_setDeathHandler); + Opcode(o1_setDeathHandler); Opcode(o2_setDrawNoShapeFlag); // 0x64 Opcode(o2_setRunFlag); diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index f944e59b4a..6016feff0f 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -256,18 +256,12 @@ int KyraEngine_LoK::o1_fadeSpecialPalette(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_playAdlibSound(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_playAdlibSound(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine_LoK::o1_playSoundEffect(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_playSoundEffect(%p) (%d)", (const void *)script, stackPos(0)); snd_playSoundEffect(stackPos(0)); return 0; } -int KyraEngine_LoK::o1_playAdlibScore(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_playAdlibScore(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - snd_playWanderScoreViaMap(stackPos(0), stackPos(1)); - return 0; -} - int KyraEngine_LoK::o1_phaseInSameScene(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_phaseInSameScene(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); transcendScenes(stackPos(0), stackPos(1)); @@ -351,8 +345,8 @@ int KyraEngine_LoK::o1_pauseSeconds(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_getCharactersLocation(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getCharactersLocation(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine_LoK::o1_getCharacterScene(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getCharacterScene(%p) (%d)", (const void *)script, stackPos(0)); return _characterList[stackPos(0)].sceneId; } @@ -648,8 +642,8 @@ int KyraEngine_LoK::o1_getCharacterY(EMCState *script) { return _characterList[stackPos(0)].y1; } -int KyraEngine_LoK::o1_changeCharactersFacing(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_changeCharactersFacing(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); +int KyraEngine_LoK::o1_setCharacterFacing(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCharacterFacing(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); int character = stackPos(0); int facing = stackPos(1); int newAnimFrame = stackPos(2); @@ -799,8 +793,8 @@ int KyraEngine_LoK::o1_displayWSASequentialFrames(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_drawCharacterStanding(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_drawCharacterStanding(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine_LoK::o1_refreshCharacter(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_refreshCharacter(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); int character = stackPos(0); int animFrame = stackPos(1); int newFacing = stackPos(2); @@ -1230,12 +1224,6 @@ int KyraEngine_LoK::o1_setFireberryGlowPalette(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_setDeathHandlerFlag(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setDeathHandlerFlag(%p) (%d)", (const void *)script, stackPos(0)); - _deathHandler = stackPos(0); - return 0; -} - int KyraEngine_LoK::o1_drinkPotionAnimation(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_drinkPotionAnimation(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); seq_playDrinkPotionAnim(stackPos(0), stackPos(1), stackPos(2)); @@ -1800,9 +1788,9 @@ void KyraEngine_LoK::setupOpcodeTable() { Opcode(o1_removeHandItem); Opcode(o1_runSceneAnimUntilDone); Opcode(o1_fadeSpecialPalette); - Opcode(o1_playAdlibSound); + Opcode(o1_playSoundEffect); // 0x18 - Opcode(o1_playAdlibScore); + Opcode(o1_playWanderScoreViaMap); Opcode(o1_phaseInSameScene); Opcode(o1_setScenePhasingFlag); Opcode(o1_resetScenePhasingFlag); @@ -1814,7 +1802,7 @@ void KyraEngine_LoK::setupOpcodeTable() { // 0x20 Opcode(o1_setBrandonStatusBit); Opcode(o1_pauseSeconds); - Opcode(o1_getCharactersLocation); + Opcode(o1_getCharacterScene); Opcode(o1_runNPCSubscript); // 0x24 Opcode(o1_magicOutMouseItem); @@ -1844,7 +1832,7 @@ void KyraEngine_LoK::setupOpcodeTable() { // 0x38 Opcode(o1_getCharacterX); Opcode(o1_getCharacterY); - Opcode(o1_changeCharactersFacing); + Opcode(o1_setCharacterFacing); Opcode(o1_copyWSARegion); // 0x3c Opcode(o1_printText); @@ -1853,7 +1841,7 @@ void KyraEngine_LoK::setupOpcodeTable() { Opcode(o1_displayWSAFrameOnHidPage); // 0x40 Opcode(o1_displayWSASequentialFrames); - Opcode(o1_drawCharacterStanding); + Opcode(o1_refreshCharacter); Opcode(o1_internalAnimOff); Opcode(o1_changeCharactersXAndY); // 0x44 @@ -1890,7 +1878,7 @@ void KyraEngine_LoK::setupOpcodeTable() { Opcode(o1_dispelMagicAnimation); Opcode(o1_findBrightestFireberry); Opcode(o1_setFireberryGlowPalette); - Opcode(o1_setDeathHandlerFlag); + Opcode(o1_setDeathHandler); // 0x60 Opcode(o1_drinkPotionAnimation); Opcode(o1_makeAmuletAppear); diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp index af0bde24c1..965a727071 100644 --- a/engines/kyra/script_mr.cpp +++ b/engines/kyra/script_mr.cpp @@ -1261,7 +1261,7 @@ void KyraEngine_MR::setupOpcodeTable() { Opcode(o3_setMalcolmPos); Opcode(o3_stopMusic); // 0x58 - Opcode(o2_playWanderScoreViaMap); + Opcode(o1_playWanderScoreViaMap); Opcode(o3_playSoundEffect); Opcode(o3_getScore); Opcode(o3_daggerWarning); @@ -1273,7 +1273,7 @@ void KyraEngine_MR::setupOpcodeTable() { // 0x60 Opcode(o1_getRand); Opcode(o3_dummy); - Opcode(o2_setDeathHandler); + Opcode(o1_setDeathHandler); Opcode(o3_showGoodConscience); // 0x64 Opcode(o3_goodConscienceChat); diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index 40c82ff00a..80678db32d 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -84,5 +84,17 @@ int KyraEngine_v1::o1_getMouseState(EMCState *script) { return _mouseState; } +int KyraEngine_v1::o1_setDeathHandler(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_setDeathHandler(%p) (%d)", (const void *)script, stackPos(0)); + _deathHandler = stackPos(0); + return 0; +} + +int KyraEngine_v1::o1_playWanderScoreViaMap(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_playWanderScoreViaMap(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); + snd_playWanderScoreViaMap(stackPos(0), stackPos(1)); + return 0; +} + } // end of namespace Kyra diff --git a/engines/kyra/script_v2.cpp b/engines/kyra/script_v2.cpp index 8c412cd560..2af4fda727 100644 --- a/engines/kyra/script_v2.cpp +++ b/engines/kyra/script_v2.cpp @@ -156,18 +156,6 @@ int KyraEngine_v2::o2_getShapeFlag1(EMCState *script) { return screen()->getShapeFlag1(stackPos(0), stackPos(1)); } -int KyraEngine_v2::o2_playWanderScoreViaMap(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_playWanderScoreViaMap(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); - snd_playWanderScoreViaMap(stackPos(0), stackPos(1)); - return 0; -} - -int KyraEngine_v2::o2_setDeathHandler(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_setDeathHandler(%p) (%d)", (const void *)script, stackPos(0)); - _deathHandler = stackPos(0); - return 0; -} - int KyraEngine_v2::o2_waitForConfirmationClick(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v2::o2_waitForConfirmationClick(%p) (%d)", (const void *)script, stackPos(0)); resetSkipFlag(); -- cgit v1.2.3 From 56d2603d4f712877901e0ded022445e0d8984abe Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 12 May 2008 13:11:42 +0000 Subject: - Some more opcodes moved to KyraEngine_v1 - Yet more naming consistency fixes svn-id: r32056 --- engines/kyra/kyra_hof.h | 5 ---- engines/kyra/kyra_lok.h | 14 ++++------- engines/kyra/kyra_mr.h | 2 +- engines/kyra/kyra_v1.h | 4 ++++ engines/kyra/script_hof.cpp | 36 +++++----------------------- engines/kyra/script_lok.cpp | 57 ++++++++++++--------------------------------- engines/kyra/script_mr.cpp | 6 ++--- engines/kyra/script_v1.cpp | 24 +++++++++++++++++++ 8 files changed, 58 insertions(+), 90 deletions(-) diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index 8b03cbc019..fe4b6390b7 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -709,7 +709,6 @@ protected: int o2_wipeDownMouseItem(EMCState *script); int o2_getElapsedSecs(EMCState *script); int o2_getTimerDelay(EMCState *script); - //int o2_playSoundEffect(EMCState *script); int o2_delaySecs(EMCState *script); int o2_setTimerDelay(EMCState *script); int o2_setScaleTableItem(EMCState *script); @@ -736,17 +735,13 @@ protected: int o2_setLayerFlag(EMCState *script); int o2_setZanthiaPos(EMCState *script); int o2_loadMusicTrack(EMCState *script); - int o2_playSoundEffect(EMCState *script); int o2_setSceneAnimPos(EMCState *script); - int o2_blockInRegion(EMCState *script); - int o2_blockOutRegion(EMCState *script); int o2_setCauldronState(EMCState *script); int o2_showItemString(EMCState *script); int o2_isAnySoundPlaying(EMCState *script); int o2_setDrawNoShapeFlag(EMCState *script); int o2_setRunFlag(EMCState *script); int o2_showLetter(EMCState *script); - int o2_fillRect(EMCState *script); int o2_playFireflyScore(EMCState *script); int o2_encodeShape(EMCState *script); int o2_defineSceneAnim(EMCState *script); diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index 4e68a9da22..05900ffe7b 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -658,8 +658,6 @@ protected: int o1_drawSceneAnimShape(EMCState *script); int o1_runNPCScript(EMCState *script); int o1_setSpecialExitList(EMCState *script); - int o1_blockInWalkableRegion(EMCState *script); - int o1_blockOutWalkableRegion(EMCState *script); int o1_walkPlayerToPoint(EMCState *script); int o1_dropItemInScene(EMCState *script); int o1_drawAnimShapeIntoScene(EMCState *script); @@ -670,7 +668,6 @@ protected: int o1_mouseIsPointer(EMCState *script); int o1_runSceneAnimUntilDone(EMCState *script); int o1_fadeSpecialPalette(EMCState *script); - int o1_playSoundEffect(EMCState *script); int o1_phaseInSameScene(EMCState *script); int o1_setScenePhasingFlag(EMCState *script); int o1_resetScenePhasingFlag(EMCState *script); @@ -723,7 +720,7 @@ protected: int o1_mobileCharacterInScene(EMCState *script); int o1_hideMobileCharacter(EMCState *script); int o1_unhideMobileCharacter(EMCState *script); - int o1_setCharactersLocation(EMCState *script); + int o1_setCharacterLocation(EMCState *script); int o1_walkCharacterToPoint(EMCState *script); int o1_specialEventDisplayBrynnsNote(EMCState *script); int o1_specialEventRemoveBrynnsNote(EMCState *script); @@ -732,8 +729,8 @@ protected: int o1_preserveAllObjectBackgrounds(EMCState *script); int o1_updateSceneAnimations(EMCState *script); int o1_sceneAnimationActive(EMCState *script); - int o1_setCharactersMovementDelay(EMCState *script); - int o1_getCharactersFacing(EMCState *script); + int o1_setCharacterMovementDelay(EMCState *script); + int o1_getCharacterFacing(EMCState *script); int o1_bkgdScrollSceneAndMasksRight(EMCState *script); int o1_dispelMagicAnimation(EMCState *script); int o1_findBrightestFireberry(EMCState *script); @@ -742,7 +739,7 @@ protected: int o1_drinkPotionAnimation(EMCState *script); int o1_makeAmuletAppear(EMCState *script); int o1_drawItemShapeIntoScene(EMCState *script); - int o1_setCharactersCurrentFrame(EMCState *script); + int o1_setCharacterCurrentFrame(EMCState *script); int o1_waitForConfirmationMouseClick(EMCState *script); int o1_pageFlip(EMCState *script); int o1_setSceneFile(EMCState *script); @@ -755,7 +752,7 @@ protected: int o1_setSceneAnimCurrXY(EMCState *script); int o1_poisonBrandonAndRemaps(EMCState *script); int o1_fillFlaskWithWater(EMCState *script); - int o1_getCharactersMovementDelay(EMCState *script); + int o1_getCharacterMovementDelay(EMCState *script); int o1_getBirthstoneGem(EMCState *script); int o1_queryBrandonStatusBit(EMCState *script); int o1_playFluteAnimation(EMCState *script); @@ -794,7 +791,6 @@ protected: int o1_pauseMusicSeconds(EMCState *script); int o1_resetMaskRegion(EMCState *script); int o1_setPaletteChangeFlag(EMCState *script); - int o1_fillRect(EMCState *script); int o1_dummy(EMCState *script); int o1_vocUnload(EMCState *script); int o1_vocLoad(EMCState *script); diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 5831759314..79ef7903e3 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -631,7 +631,7 @@ private: int o3_playSoundEffect(EMCState *script); int o3_getScore(EMCState *script); int o3_daggerWarning(EMCState *script); - int o3_blockOutRegion(EMCState *script); + int o3_blockOutWalkableRegion(EMCState *script); int o3_showSceneStringsMessage(EMCState *script); int o3_showGoodConscience(EMCState *script); int o3_goodConscienceChat(EMCState *script); diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 0a7bf40a12..81a6254c7f 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -227,6 +227,10 @@ protected: int o1_getMouseState(EMCState *script); int o1_setDeathHandler(EMCState *script); int o1_playWanderScoreViaMap(EMCState *script); + int o1_fillRect(EMCState *script); + int o1_blockInWalkableRegion(EMCState *script); + int o1_blockOutWalkableRegion(EMCState *script); + int o1_playSoundEffect(EMCState *script); // items int _mouseState; diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index 00dcc1fe6a..8ab6fb9424 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -723,12 +723,6 @@ int KyraEngine_HoF::o2_loadMusicTrack(EMCState *script) { return 0; } -int KyraEngine_HoF::o2_playSoundEffect(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_playSoundEffect(%p) (%d)", (const void *)script, stackPos(0)); - snd_playSoundEffect(stackPos(0)); - return 0; -} - int KyraEngine_HoF::o2_setSceneAnimPos(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_setSceneAnimPos(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2)); _sceneAnims[stackPos(0)].x = stackPos(1); @@ -736,18 +730,6 @@ int KyraEngine_HoF::o2_setSceneAnimPos(EMCState *script) { return 0; } -int KyraEngine_HoF::o2_blockInRegion(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_blockInRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - _screen->blockInRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); - return 0; -} - -int KyraEngine_HoF::o2_blockOutRegion(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_blockOutRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - _screen->blockOutRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); - return 0; -} - int KyraEngine_HoF::o2_setCauldronState(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_setCauldronState(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); setCauldronState(stackPos(0), stackPos(1) != 0); @@ -856,12 +838,6 @@ int KyraEngine_HoF::o2_showLetter(EMCState *script) { return 0; } -int KyraEngine_HoF::o2_fillRect(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - _screen->fillRect(stackPos(1), stackPos(2), stackPos(1)+stackPos(3), stackPos(2)+stackPos(4), stackPos(5), stackPos(0)); - return 0; -} - int KyraEngine_HoF::o2_playFireflyScore(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_playFireflyScore(%p) ()", (const void *)script); if (_sound->getSfxType() == Sound::kAdlib || _sound->getSfxType() == Sound::kMidiMT32 || _sound->getSfxType() == Sound::kMidiGM) { @@ -1578,7 +1554,7 @@ void KyraEngine_HoF::setupOpcodeTable() { Opcode(o2_getElapsedSecs); // 0x34 Opcode(o2_getTimerDelay); - Opcode(o2_playSoundEffect); + Opcode(o1_playSoundEffect); Opcode(o2_delaySecs); Opcode(o2_delay); // 0x38 @@ -1623,11 +1599,11 @@ void KyraEngine_HoF::setupOpcodeTable() { Opcode(o2_loadMusicTrack); // 0x58 Opcode(o1_playWanderScoreViaMap); - Opcode(o2_playSoundEffect); + Opcode(o1_playSoundEffect); Opcode(o2_setSceneAnimPos); - Opcode(o2_blockInRegion); + Opcode(o1_blockInWalkableRegion); // 0x5c - Opcode(o2_blockOutRegion); + Opcode(o1_blockOutWalkableRegion); OpcodeUnImpl(); Opcode(o2_setCauldronState); Opcode(o2_showItemString); @@ -1640,7 +1616,7 @@ void KyraEngine_HoF::setupOpcodeTable() { Opcode(o2_setRunFlag); Opcode(o2_showLetter); OpcodeUnImpl(); - Opcode(o2_fillRect); + Opcode(o1_fillRect); // 0x68 OpcodeUnImpl(); OpcodeUnImpl(); @@ -1737,7 +1713,7 @@ void KyraEngine_HoF::setupOpcodeTable() { // 0x00 Opcode(o2a_setAnimationShapes); Opcode(o2a_setCharacterFrame); - Opcode(o2_playSoundEffect); + Opcode(o1_playSoundEffect); Opcode(o2_fadeScenePal); // 0x04 _flags.isTalkie ? Opcode(o2a_setResetFrame) : Opcode(o2_dummy); diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index 6016feff0f..14fd2ca642 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -107,18 +107,6 @@ int KyraEngine_LoK::o1_setSpecialExitList(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_blockInWalkableRegion(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_blockInWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - _screen->blockInRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); - return 0; -} - -int KyraEngine_LoK::o1_blockOutWalkableRegion(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_blockOutWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); - _screen->blockOutRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); - return 0; -} - int KyraEngine_LoK::o1_walkPlayerToPoint(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_walkPlayerToPoint(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); @@ -256,12 +244,6 @@ int KyraEngine_LoK::o1_fadeSpecialPalette(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_playSoundEffect(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_playSoundEffect(%p) (%d)", (const void *)script, stackPos(0)); - snd_playSoundEffect(stackPos(0)); - return 0; -} - int KyraEngine_LoK::o1_phaseInSameScene(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_phaseInSameScene(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); transcendScenes(stackPos(0), stackPos(1)); @@ -940,8 +922,8 @@ int KyraEngine_LoK::o1_unhideMobileCharacter(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_setCharactersLocation(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCharactersLocation(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine_LoK::o1_setCharacterLocation(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCharacterLocation(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); Character *ch = &_characterList[stackPos(0)]; Animator_LoK::AnimObject *animObj = &_animator->actors()[stackPos(0)]; int newScene = stackPos(1); @@ -1112,14 +1094,14 @@ int KyraEngine_LoK::o1_sceneAnimationActive(EMCState *script) { return _sprites->_anims[stackPos(0)].play; } -int KyraEngine_LoK::o1_setCharactersMovementDelay(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCharactersMovementDelay(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine_LoK::o1_setCharacterMovementDelay(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCharacterMovementDelay(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); _timer->setDelay(stackPos(0)+5, stackPos(1)); return 0; } -int KyraEngine_LoK::o1_getCharactersFacing(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getCharactersFacing(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine_LoK::o1_getCharacterFacing(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getCharacterFacing(%p) (%d)", (const void *)script, stackPos(0)); return _characterList[stackPos(0)].facing; } @@ -1298,8 +1280,8 @@ int KyraEngine_LoK::o1_drawItemShapeIntoScene(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_setCharactersCurrentFrame(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCharactersCurrentFrame(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine_LoK::o1_setCharacterCurrentFrame(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_setCharacterCurrentFrame(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); _characterList[stackPos(0)].currentAnimFrame = stackPos(1); return 0; } @@ -1399,8 +1381,8 @@ int KyraEngine_LoK::o1_fillFlaskWithWater(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_getCharactersMovementDelay(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getCharactersMovementDelay(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine_LoK::o1_getCharacterMovementDelay(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_getCharacterMovementDelay(%p) (%d)", (const void *)script, stackPos(0)); return _timer->getDelay(stackPos(0)+5); } @@ -1724,15 +1706,6 @@ int KyraEngine_LoK::o1_setPaletteChangeFlag(EMCState *script) { return _paletteChanged; } -int KyraEngine_LoK::o1_fillRect(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_fillRect(%p) (%d, %d, %d, %d, %d, 0x%X)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - int videoPageBackup = _screen->_curPage; - _screen->_curPage = stackPos(0); - _screen->fillRect(stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - _screen->_curPage = videoPageBackup; - return 0; -} - int KyraEngine_LoK::o1_vocUnload(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_vocUnload(%p) ()", (const void *)script); // this should unload all voc files (not needed) @@ -1860,7 +1833,7 @@ void KyraEngine_LoK::setupOpcodeTable() { Opcode(o1_hideMobileCharacter); Opcode(o1_unhideMobileCharacter); // 0x50 - Opcode(o1_setCharactersLocation); + Opcode(o1_setCharacterLocation); Opcode(o1_walkCharacterToPoint); Opcode(o1_specialEventDisplayBrynnsNote); Opcode(o1_specialEventRemoveBrynnsNote); @@ -1871,8 +1844,8 @@ void KyraEngine_LoK::setupOpcodeTable() { Opcode(o1_updateSceneAnimations); // 0x58 Opcode(o1_sceneAnimationActive); - Opcode(o1_setCharactersMovementDelay); - Opcode(o1_getCharactersFacing); + Opcode(o1_setCharacterMovementDelay); + Opcode(o1_getCharacterFacing); Opcode(o1_bkgdScrollSceneAndMasksRight); // 0x5c Opcode(o1_dispelMagicAnimation); @@ -1883,7 +1856,7 @@ void KyraEngine_LoK::setupOpcodeTable() { Opcode(o1_drinkPotionAnimation); Opcode(o1_makeAmuletAppear); Opcode(o1_drawItemShapeIntoScene); - Opcode(o1_setCharactersCurrentFrame); + Opcode(o1_setCharacterCurrentFrame); // 0x64 Opcode(o1_waitForConfirmationMouseClick); Opcode(o1_pageFlip); @@ -1900,7 +1873,7 @@ void KyraEngine_LoK::setupOpcodeTable() { Opcode(o1_poisonBrandonAndRemaps); Opcode(o1_fillFlaskWithWater); // 0x70 - Opcode(o1_getCharactersMovementDelay); + Opcode(o1_getCharacterMovementDelay); Opcode(o1_getBirthstoneGem); Opcode(o1_queryBrandonStatusBit); Opcode(o1_playFluteAnimation); diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp index 965a727071..9a059ead2a 100644 --- a/engines/kyra/script_mr.cpp +++ b/engines/kyra/script_mr.cpp @@ -811,8 +811,8 @@ int KyraEngine_MR::o3_daggerWarning(EMCState *script) { return selection; } -int KyraEngine_MR::o3_blockOutRegion(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_blockOutRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); +int KyraEngine_MR::o3_blockOutWalkableRegion(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_blockOutWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); const int x1 = stackPos(0); int y1 = stackPos(1); const int x2 = stackPos(2); @@ -1266,7 +1266,7 @@ void KyraEngine_MR::setupOpcodeTable() { Opcode(o3_getScore); Opcode(o3_daggerWarning); // 0x5c - Opcode(o3_blockOutRegion); + Opcode(o3_blockOutWalkableRegion); Opcode(o3_dummy); Opcode(o3_showSceneStringsMessage); OpcodeUnImpl(); diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index 80678db32d..7881605b9e 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -96,5 +96,29 @@ int KyraEngine_v1::o1_playWanderScoreViaMap(EMCState *script) { return 0; } +int KyraEngine_v1::o1_fillRect(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + screen()->fillRect(stackPos(1), stackPos(2), stackPos(1)+stackPos(3), stackPos(2)+stackPos(4), stackPos(5), stackPos(0)); + return 0; +} + +int KyraEngine_v1::o1_blockInWalkableRegion(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_blockInWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + screen()->blockInRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); + return 0; +} + +int KyraEngine_v1::o1_blockOutWalkableRegion(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_blockOutWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); + screen()->blockOutRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); + return 0; +} + +int KyraEngine_v1::o1_playSoundEffect(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_playSoundEffect(%p) (%d)", (const void *)script, stackPos(0)); + snd_playSoundEffect(stackPos(0)); + return 0; +} + } // end of namespace Kyra -- cgit v1.2.3 From 4db0bd90465fe74252d8a35751856991b31f7788 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 12 May 2008 13:19:11 +0000 Subject: Two more KyraEngine_LoK opcodes renamed. svn-id: r32057 --- engines/kyra/kyra_lok.h | 4 ++-- engines/kyra/script_lok.cpp | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index 05900ffe7b..5e244e4925 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -654,7 +654,7 @@ protected: // Opcodes int o1_magicInMouseItem(EMCState *script); int o1_characterSays(EMCState *script); - int o1_pauseTicks(EMCState *script); + int o1_delay(EMCState *script); int o1_drawSceneAnimShape(EMCState *script); int o1_runNPCScript(EMCState *script); int o1_setSpecialExitList(EMCState *script); @@ -676,7 +676,7 @@ protected: int o1_setBirthstoneGem(EMCState *script); int o1_placeItemInGenericMapScene(EMCState *script); int o1_setBrandonStatusBit(EMCState *script); - int o1_pauseSeconds(EMCState *script); + int o1_delaySecs(EMCState *script); int o1_getCharacterScene(EMCState *script); int o1_runNPCSubscript(EMCState *script); int o1_magicOutMouseItem(EMCState *script); diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index 14fd2ca642..670c7282e3 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -74,10 +74,10 @@ int KyraEngine_LoK::o1_characterSays(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_pauseTicks(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_pauseTicks(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); +int KyraEngine_LoK::o1_delay(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_delay(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1)); if (stackPos(1)) { - warning("STUB: special o1_pauseTicks"); + warning("STUB: special o1_delay"); // delete this after correct implementing delayWithTicks(stackPos(0)); } else { @@ -319,8 +319,8 @@ int KyraEngine_LoK::o1_setBrandonStatusBit(EMCState *script) { return 0; } -int KyraEngine_LoK::o1_pauseSeconds(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_pauseSeconds(%p) (%d)", (const void *)script, stackPos(0)); +int KyraEngine_LoK::o1_delaySecs(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_delaySecs(%p) (%d)", (const void *)script, stackPos(0)); if (stackPos(0) > 0 && !_skipFlag) delay(stackPos(0)*1000, true); _skipFlag = false; @@ -1691,7 +1691,7 @@ int KyraEngine_LoK::o1_pauseMusicSeconds(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_pauseMusicSeconds(%p) ()", (const void *)script); // if music disabled // return - o1_pauseSeconds(script); + o1_delaySecs(script); return 0; } @@ -1735,7 +1735,7 @@ void KyraEngine_LoK::setupOpcodeTable() { // 0x00 Opcode(o1_magicInMouseItem); Opcode(o1_characterSays); - Opcode(o1_pauseTicks); + Opcode(o1_delay); Opcode(o1_drawSceneAnimShape); // 0x04 Opcode(o1_queryGameFlag); @@ -1774,7 +1774,7 @@ void KyraEngine_LoK::setupOpcodeTable() { Opcode(o1_placeItemInGenericMapScene); // 0x20 Opcode(o1_setBrandonStatusBit); - Opcode(o1_pauseSeconds); + Opcode(o1_delaySecs); Opcode(o1_getCharacterScene); Opcode(o1_runNPCSubscript); // 0x24 -- cgit v1.2.3 From 771854bdd93581b1d7898c7ff0abdfc54d67780a Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Mon, 12 May 2008 13:35:58 +0000 Subject: move some kyra 3 static resources to kyra.dat svn-id: r32058 --- dists/engine-data/kyra.dat | Bin 230864 -> 233702 bytes engines/kyra/kyra_mr.cpp | 5 +- engines/kyra/kyra_mr.h | 40 +-- engines/kyra/resource.cpp | 12 +- engines/kyra/resource.h | 17 +- engines/kyra/sequences_hof.cpp | 2 +- engines/kyra/staticres.cpp | 546 +++----------------------------- tools/create_kyradat/create_kyradat.cpp | 154 +++++++-- tools/create_kyradat/create_kyradat.h | 15 +- tools/create_kyradat/malcolm.h | 17 + tools/create_kyradat/misc.h | 14 + 11 files changed, 257 insertions(+), 565 deletions(-) create mode 100644 tools/create_kyradat/malcolm.h diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat index ddf13e1e5c..d551220095 100644 Binary files a/dists/engine-data/kyra.dat and b/dists/engine-data/kyra.dat differ diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 88f9b307a2..d68bb7e02f 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -206,6 +206,7 @@ int KyraEngine_MR::init() { _screen->setResolution(); KyraEngine_v1::init(); + initStaticResource(); _debugger = new Debugger_v2(this); assert(_debugger); @@ -420,7 +421,9 @@ void KyraEngine_MR::snd_playWanderScoreViaMap(int track, int force) { if (_musicSoundChannel == -1) { assert(track < _soundListSize && track >= 0); - _musicSoundChannel = _soundDigital->playSound(_soundList[track], 0xFF, Audio::Mixer::kMusicSoundType); + char file[13]; + sprintf(file, "%s.AUD", _soundList[track]); + _musicSoundChannel = _soundDigital->playSound(file, 0xFF, Audio::Mixer::kMusicSoundType); } _lastMusicCommand = track; diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 79ef7903e3..4ec02c7849 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -73,6 +73,8 @@ private: void writeSettings(); void readSettings(); + void initStaticResource(); + // -- Screen_MR *_screen; SoundDigital *_soundDigital; @@ -108,8 +110,8 @@ private: int _fadeOutMusicChannel; const char *_menuAudioFile; - static const char *_soundList[]; - static const int _soundListSize; + const char *const *_soundList; + int _soundListSize; void snd_playWanderScoreViaMap(int track, int force); void stopMusicTrack(); @@ -119,10 +121,10 @@ private: void snd_playSoundEffect(int item, int volume); - static const uint8 _sfxFileMap[]; - static const int _sfxFileMapSize; - static const char *_sfxFileList[]; - static const int _sfxFileListSize; + const uint8 *_sfxFileMap; + int _sfxFileMapSize; + const char *const *_sfxFileList; + int _sfxFileListSize; int _voiceSoundChannel; @@ -177,7 +179,8 @@ private: private: // main menu - static const char *_mainMenuStrings[]; + const char *const *_mainMenuStrings; + int _mainMenuStringsSize; // animator uint8 *_gamePlayBuffer; @@ -210,17 +213,7 @@ private: bool _nextIdleType; void showIdleAnim(); - static const FrameControl _itemAnimFrames0[]; - static const FrameControl _itemAnimFrames1[]; - static const FrameControl _itemAnimFrames2[]; - static const FrameControl _itemAnimFrames3[]; - static const FrameControl _itemAnimFrames4[]; - static const FrameControl _itemAnimFrames5[]; - static const FrameControl _itemAnimFrames6[]; - static const FrameControl _itemAnimFrames7[]; - static const FrameControl _itemAnimFrames8[]; - static const FrameControl _itemAnimFrames9[]; - static const ItemAnimData_v2 _itemAnimData[10]; + const ItemAnimData_v2 *_itemAnimData; ActiveItemAnim _activeItemAnim[10]; int _nextAnimItem; @@ -297,12 +290,12 @@ private: bool isDropable(int x, int y); - static const uint8 _itemMagicTable[]; + const uint8 *_itemMagicTable; bool itemListMagic(int handItem, int itemSlot); bool itemInventoryMagic(int handItem, int invSlot); - static const uint8 _itemStringMap[]; - static const uint _itemStringMapSize; + const uint8 *_itemStringMap; + int _itemStringMapSize; static const uint8 _itemStringPickUp[]; static const uint8 _itemStringDrop[]; static const uint8 _itemStringInv[]; @@ -523,8 +516,9 @@ private: int _score; int _scoreMax; - static const int8 _scoreTable[]; - static const int _scoreTableSize; + const uint8 *_scoreTable; + int _scoreTableSize; + int8 _scoreFlagTable[26]; bool updateScore(int scoreId, int strId); void scoreIncrease(int count, const char *str); diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 58756ca430..9d34c669a1 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -53,13 +53,11 @@ bool Resource::reset() { if (!dir.exists() || !dir.isDirectory()) error("invalid game path '%s'", dir.getPath().c_str()); - if (_vm->game() != GI_KYRA3) { - if (!loadPakFile(StaticResource::staticDataFilename()) || !StaticResource::checkKyraDat()) { - Common::String errorMessage = "You're missing the '" + StaticResource::staticDataFilename() + "' file or it got corrupted, (re)get it from the ScummVM website"; - ::GUI::MessageDialog errorMsg(errorMessage); - errorMsg.runModal(); - error(errorMessage.c_str()); - } + if (!loadPakFile(StaticResource::staticDataFilename()) || !StaticResource::checkKyraDat()) { + Common::String errorMessage = "You're missing the '" + StaticResource::staticDataFilename() + "' file or it got corrupted, (re)get it from the ScummVM website"; + ::GUI::MessageDialog errorMsg(errorMessage); + errorMsg.runModal(); + error(errorMessage.c_str()); } if (_vm->game() == GI_KYRA1) { diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index 843b0b423d..ca22ec53e4 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -229,6 +229,15 @@ enum kKyraResources { k2IngameShapeAnimData, k2IngameTlkDemoStrings, + k3MainMenuStrings, + k3MusicFiles, + k3ScoreTable, + k3SfxFiles, + k3SfxMap, + k3ItemAnimData, + k3ItemMagicTable, + k3ItemStringMap, + kMaxResIDs }; @@ -253,8 +262,8 @@ public: const Room *loadRoomTable(int id, int &entries); const uint8 * const*loadPaletteTable(int id, int &entries); const HofSeqData *loadHofSequenceData(int id, int &entries); - const ItemAnimData_v1 *loadHofShapeAnimDataV1(int id, int &entries); - const ItemAnimData_v2 *loadHofShapeAnimDataV2(int id, int &entries); + const ItemAnimData_v1 *loadShapeAnimData_v1(int id, int &entries); + const ItemAnimData_v2 *loadShapeAnimData_v2(int id, int &entries); // use '-1' to prefetch/unload all ids // prefetchId retruns false if only on of the resources @@ -284,8 +293,8 @@ private: bool loadRoomTable(const char *filename, void *&ptr, int &size); bool loadPaletteTable(const char *filename, void *&ptr, int &size); bool loadHofSequenceData(const char *filename, void *&ptr, int &size); - bool loadHofShapeAnimDataV1(const char *filename, void *&ptr, int &size); - bool loadHofShapeAnimDataV2(const char *filename, void *&ptr, int &size); + bool loadShapeAnimData_v1(const char *filename, void *&ptr, int &size); + bool loadShapeAnimData_v2(const char *filename, void *&ptr, int &size); void freeRawData(void *&ptr, int &size); void freeStringTable(void *&ptr, int &size); diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index d34014ef33..23b6da2314 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -2626,7 +2626,7 @@ void KyraEngine_HoF::seq_init() { int numShp = -1; if (_flags.isDemo && !_flags.isTalkie) { - _demoAnimData = _staticres->loadHofShapeAnimDataV1(k2SeqplayShapeAnimData, _itemAnimDataSize); + _demoAnimData = _staticres->loadShapeAnimData_v1(k2SeqplayShapeAnimData, _itemAnimDataSize); uint8 *shp = _res->fileData("icons.shp", 0); uint32 outsize = READ_LE_UINT16(shp + 4); _animShapeFiledata = new uint8[outsize]; diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 2ac960dc75..87585c27d2 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -44,7 +44,7 @@ namespace Kyra { -#define RESFILE_VERSION 24 +#define RESFILE_VERSION 25 bool StaticResource::checkKyraDat() { Common::File kyraDat; @@ -144,8 +144,8 @@ bool StaticResource::init() { { kPaletteTable, proc(loadPaletteTable), proc(freePaletteTable) }, { k2SeqData, proc(loadHofSequenceData), proc(freeHofSequenceData) }, - { k2ShpAnimDataV1, proc(loadHofShapeAnimDataV1), proc(freeHofShapeAnimDataV1) }, - { k2ShpAnimDataV2, proc(loadHofShapeAnimDataV2), proc(freeHofShapeAnimDataV2) }, + { k2ShpAnimDataV1, proc(loadShapeAnimData_v1), proc(freeHofShapeAnimDataV1) }, + { k2ShpAnimDataV2, proc(loadShapeAnimData_v2), proc(freeHofShapeAnimDataV2) }, { 0, 0, 0 } }; @@ -262,7 +262,20 @@ bool StaticResource::init() { { k2IngameTalkObjIndex, kRawData, "I_TALKOBJECTS.MAP" }, { k2IngameTimJpStrings, kStringList, "I_TIMJPSTR.TXT" }, { k2IngameShapeAnimData, k2ShpAnimDataV2, "I_INVANIM.SHP" }, - { k2IngameTlkDemoStrings, kLanguageList, "I_TLKDEMO.TXT." }, + { k2IngameTlkDemoStrings, kLanguageList, "I_TLKDEMO.TXT." }, + + { 0, 0, 0 } + }; + + static const FilenameTable kyra3StaticRes[] = { + { k3MainMenuStrings, kStringList, "MAINMENU.TXT" }, + { k3MusicFiles, kStringList, "SCORE.TRA" }, + { k3ScoreTable, kRawData, "SCORE.MAP" }, + { k3SfxFiles, kStringList, "SFXFILES.TRA" }, + { k3SfxMap, kRawData, "SFXINDEX.MAP" }, + { k3ItemAnimData, k2ShpAnimDataV2, "INVANIM.SHP" }, + { k3ItemMagicTable, kRawData, "ITEMMAGIC.MAP" }, + { k3ItemStringMap, kRawData, "ITEMSTRINGS.MAP" }, { 0, 0, 0 } }; @@ -274,7 +287,8 @@ bool StaticResource::init() { _builtIn = 0; _filenameTable = kyra2StaticRes; } else if (_vm->game() == GI_KYRA3) { - return true; + _builtIn = 0; + _filenameTable = kyra3StaticRes; } else { error("unknown game ID"); } @@ -367,11 +381,11 @@ const HofSeqData *StaticResource::loadHofSequenceData(int id, int &entries) { return (const HofSeqData*)getData(id, k2SeqData, entries); } -const ItemAnimData_v1 *StaticResource::loadHofShapeAnimDataV1(int id, int &entries) { +const ItemAnimData_v1 *StaticResource::loadShapeAnimData_v1(int id, int &entries) { return (const ItemAnimData_v1*)getData(id, k2ShpAnimDataV1, entries); } -const ItemAnimData_v2 *StaticResource::loadHofShapeAnimDataV2(int id, int &entries) { +const ItemAnimData_v2 *StaticResource::loadShapeAnimData_v2(int id, int &entries) { return (const ItemAnimData_v2*)getData(id, k2ShpAnimDataV2, entries); } @@ -729,11 +743,6 @@ bool StaticResource::loadHofSequenceData(const char *filename, void *&ptr, int & if (ctrlOffs) { int num_c = *(filePtr + ctrlOffs); const uint16 *in_c = (uint16*) (filePtr + ctrlOffs + 1); - // safety check for library sequence which is supposed to have - // one frame more than control entries (seems to be a bug in - // the original code). This caused invalid memory access . - if (tmp_n[i].endFrame > num_c) - tmp_n[i].endFrame = num_c; FrameControl *tmp_f = new FrameControl[num_c]; for (int ii = 0; ii < num_c; ii++) { @@ -764,7 +773,7 @@ bool StaticResource::loadHofSequenceData(const char *filename, void *&ptr, int & return true; } -bool StaticResource::loadHofShapeAnimDataV1(const char *filename, void *&ptr, int &size) { +bool StaticResource::loadShapeAnimData_v1(const char *filename, void *&ptr, int &size) { int filesize; uint8 *filePtr = getFile(filename, filesize); uint8 *src = filePtr; @@ -795,7 +804,7 @@ bool StaticResource::loadHofShapeAnimDataV1(const char *filename, void *&ptr, in return true; } -bool StaticResource::loadHofShapeAnimDataV2(const char *filename, void *&ptr, int &size) { +bool StaticResource::loadShapeAnimData_v2(const char *filename, void *&ptr, int &size) { int filesize; uint8 *filePtr = getFile(filename, filesize); uint8 *src = filePtr; @@ -910,8 +919,10 @@ const char *StaticResource::getFilename(const char *name) { if (_vm->gameFlags().gameID == GI_KYRA2) filename += ".K2"; + else if (_vm->gameFlags().gameID == GI_KYRA3) + filename += ".K3"; - if (_vm->gameFlags().isTalkie) + if (_vm->gameFlags().isTalkie && _vm->gameFlags().gameID != GI_KYRA3) filename += ".CD"; else if (_vm->gameFlags().isDemo) filename += ".DEM"; @@ -1202,7 +1213,7 @@ void KyraEngine_HoF::initStaticResource() { _cdaTrackTableFinale = _staticres->loadRawData(k2SeqplayFinaleCDA, _cdaTrackTableFinaleSize); _ingameTalkObjIndex = (const uint16*) _staticres->loadRawData(k2IngameTalkObjIndex, _ingameTalkObjIndexSize); _ingameTimJpStr = _staticres->loadStrings(k2IngameTimJpStrings, _ingameTimJpStrSize); - _itemAnimData = _staticres->loadHofShapeAnimDataV2(k2IngameShapeAnimData, _itemAnimDataSize); + _itemAnimData = _staticres->loadShapeAnimData_v2(k2IngameShapeAnimData, _itemAnimDataSize); // replace sequence talkie files with localized versions and cut off .voc // suffix from voc files so as to allow compression specific file extensions @@ -1296,6 +1307,18 @@ void KyraEngine_HoF::initStaticResource() { _callbackN = (_flags.isDemo && !_flags.isTalkie) ? hofDemoNestedSequenceCallbacks : hofNestedSequenceCallbacks; } +void KyraEngine_MR::initStaticResource() { + int tmp = 0; + _mainMenuStrings = _staticres->loadStrings(k3MainMenuStrings, _mainMenuStringsSize); + _soundList = _staticres->loadStrings(k3MusicFiles, _soundListSize); + _scoreTable = _staticres->loadRawData(k3ScoreTable, _scoreTableSize); + _sfxFileList = _staticres->loadStrings(k3SfxFiles, _sfxFileListSize); + _sfxFileMap = _staticres->loadRawData(k3SfxMap, _sfxFileMapSize); + _itemAnimData = _staticres->loadShapeAnimData_v2(k3ItemAnimData, tmp); + _itemMagicTable = _staticres->loadRawData(k3ItemMagicTable, tmp); + _itemStringMap = _staticres->loadRawData(k3ItemStringMap, _itemStringMapSize); +} + const ScreenDim Screen_LoK::_screenDimTable[] = { { 0x00, 0x00, 0x28, 0xC8, 0x0F, 0x0C, 0x00, 0x00 }, { 0x08, 0x48, 0x18, 0x38, 0x0F, 0x0C, 0x00, 0x00 }, @@ -1939,69 +1962,6 @@ const uint8 KyraEngine_HoF::_rainbowRoomData[] = { // kyra 3 static res -const char *KyraEngine_MR::_mainMenuStrings[] = { - "Start a new game", - "Introduction", - "Load a game", - "Exit the game", - "Nouvelle Partie", - "Introduction", - "Charger une partie", - "Quitter le jeu", - "Neues Spiel starten", - "Intro", - "Spielstand laden", - "Spiel beenden", - 0 -}; - -const char *KyraEngine_MR::_soundList[] = { - "ARREST1.AUD", - "BATH1.AUD", - "OCEAN1.AUD", - "CLOWN1.AUD", - "DARM2.AUD", - "FALL1M.AUD", - "FALL2.AUD", - "FISH1.AUD", - "FISHWNDR.AUD", - "HERMAN1.AUD", - "JAIL1.AUD", - "JUNGLE1.AUD", - "KATHY1.AUD", - "NICESINE.AUD", - "PEGASUS1.AUD", - "PIRATE1.AUD", - "PIRATE2.AUD", - "PIRATE3.AUD", - "POP3.AUD", - "PORT1.AUD", - "QUEEN1.AUD", - "RUINS1.AUD", - "SNAKES1.AUD", - "SPRING1.AUD", - "STATUE1.AUD", - "STATUE2.AUD", - "TITLE1.AUD", - "UNDER1.AUD", - "WALKCHP1.AUD", - "YANK1.AUD", - "ZAN2.AUD", - "GROOVE2.AUD", - "GROOVE3.AUD", - "KING1.AUD", - "KING2.AUD", - "GROOVE1.AUD", - "JAIL2.AUD", - "SPIRIT1.AUD", - "SPRING1A.AUD", - "POP1.AUD", - "POP2.AUD", - "SQUIRL1.AUD" -}; - -const int KyraEngine_MR::_soundListSize = ARRAYSIZE(KyraEngine_MR::_soundList); - const char *KyraEngine_MR::_languageExtension[] = { "TRE", "TRF", @@ -2029,386 +1989,10 @@ const KyraEngine_MR::ShapeDesc KyraEngine_MR::_shapeDescs[] = { const int KyraEngine_MR::_shapeDescsSize = ARRAYSIZE(KyraEngine_MR::_shapeDescs); -const FrameControl KyraEngine_MR::_itemAnimFrames0[] = { - { 0x03, 0x19 }, { 0x48, 0x1E }, { 0x49, 0x1E } -}; - -const FrameControl KyraEngine_MR::_itemAnimFrames1[] = { - { 0x3A, 0x0B }, { 0x4B, 0x0B }, { 0x4C, 0x0B }, { 0x4D, 0x0B }, - { 0x4E, 0x0B }, { 0x4F, 0x0B }, { 0x50, 0x0B } -}; - -const FrameControl KyraEngine_MR::_itemAnimFrames2[] = { - { 0x14, 0x0F }, { 0x51, 0x0F }, { 0x52, 0x0F }, { 0x53, 0x0F } -}; - -const FrameControl KyraEngine_MR::_itemAnimFrames3[] = { - { 0x13, 0x14 }, { 0x54, 0x14 }, { 0x55, 0x14 }, { 0x56, 0x14 } -}; - -const FrameControl KyraEngine_MR::_itemAnimFrames4[] = { - { 0x15, 0x10 }, { 0x57, 0x12 }, { 0x58, 0x10 }, { 0x59, 0x11 }, - { 0x5A, 0x10 }, { 0x5B, 0x11 }, { 0x5C, 0x10 } -}; - -const FrameControl KyraEngine_MR::_itemAnimFrames5[] = { - { 0x09, 0x1E }, { 0x5D, 0x1E }, { 0x5E, 0x1E }, { 0x5D, 0x1E } -}; - -const FrameControl KyraEngine_MR::_itemAnimFrames6[] = { - { 0x39, 0x21 }, { 0x5F, 0x20 }, { 0x60, 0x1E }, { 0x61, 0x20 }, - { 0x62, 0x21 }, { 0x63, 0x1E }, { 0x64, 0x22 } -}; - -const FrameControl KyraEngine_MR::_itemAnimFrames7[] = { - { 0x40, 0x0C }, { 0x6C, 0x10 }, { 0x6B, 0x10 }, { 0x6A, 0x0F }, - { 0x69, 0x0F }, { 0x68, 0x0F }, { 0x67, 0x0F }, { 0x66, 0x0F }, - { 0x65, 0x0F }, { 0x66, 0x11 }, { 0x67, 0x12 }, { 0x68, 0x10 }, - { 0x69, 0x0F }, { 0x6A, 0x10 }, { 0x6B, 0x0F }, { 0x6C, 0x10 }, - { 0x6B, 0x0F }, { 0x6A, 0x10 }, { 0x6B, 0x0F }, { 0x6C, 0x10 }, - { 0x6B, 0x0F }, { 0x6A, 0x10 }, { 0x69, 0x0F }, { 0x68, 0x10 }, - { 0x67, 0x12 }, { 0x66, 0x11 }, { 0x65, 0xC8 }, { 0x66, 0x11 }, - { 0x67, 0x12 }, { 0x68, 0x10 }, { 0x69, 0x0F }, { 0x6A, 0x10 }, - { 0x6B, 0x0F }, { 0x6C, 0x10 } -}; - -const FrameControl KyraEngine_MR::_itemAnimFrames8[] = { - { 0x2B, 0x19 }, { 0x8E, 0x16 }, { 0x8F, 0x14 }, - { 0x90, 0x16 }, { 0x91, 0x50 } -}; - -const FrameControl KyraEngine_MR::_itemAnimFrames9[] = { - { 0x3B, 0x258}, { 0x92, 0x0A }, { 0x93, 0x0A }, { 0x94, 0x0A }, - { 0x93, 0x0A }, { 0x92, 0x0A } -}; - -const ItemAnimData_v2 KyraEngine_MR::_itemAnimData[10] = { - { 0x03, 0x03, _itemAnimFrames0 }, - { 0x3a, 0x07, _itemAnimFrames1 }, - { 0x14, 0x04, _itemAnimFrames2 }, - { 0x13, 0x04, _itemAnimFrames3 }, - { 0x15, 0x07, _itemAnimFrames4 }, - { 0x09, 0x04, _itemAnimFrames5 }, - { 0x39, 0x07, _itemAnimFrames6 }, - { 0x40, 0x22, _itemAnimFrames7 }, - { 0x2B, 0x05, _itemAnimFrames8 }, - { 0x3B, 0x06, _itemAnimFrames9 } -}; - const uint8 KyraEngine_MR::_characterFrameTable[] = { 0x36, 0x35, 0x35, 0x33, 0x32, 0x32, 0x34, 0x34 }; -const uint8 KyraEngine_MR::_sfxFileMap[] = { - 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, - 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, - 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0x99, 0x00, - 0x46, 0x00, 0xA9, 0x00, 0x33, 0x00, 0x65, 0x00, - 0x9B, 0x00, 0x17, 0x00, 0xBB, 0x00, 0x64, 0x00, - 0x55, 0x00, 0xD5, 0x00, 0x66, 0x00, 0xB9, 0x00, - 0x9A, 0x00, 0xFF, 0x00, 0xCC, 0x00, 0x67, 0x00, - 0x2E, 0x00, 0xA1, 0x00, 0xD0, 0x00, 0x63, 0x00, - 0x89, 0x00, 0xBE, 0x00, 0x80, 0x00, 0x1D, 0x00, - 0x02, 0x00, 0x28, 0x00, 0x91, 0x00, 0x29, 0x00, - 0xCE, 0x00, 0x8F, 0x00, 0x49, 0x00, 0x2B, 0x00, - 0x2D, 0x00, 0x2C, 0x00, 0x3E, 0x00, 0x22, 0x00, - 0x80, 0x00, 0x9C, 0x00, 0x2E, 0x00, 0x04, 0x00, - 0x47, 0x00, 0xA8, 0x00, 0x51, 0x00, 0x52, 0x00, - 0x80, 0x00, 0x48, 0x00, 0x38, 0x0A, 0x0C, 0x00, - 0xD8, 0x00, 0xD1, 0x00, 0xD2, 0x00, 0xD3, 0x00, - 0xD1, 0x00, 0x6A, 0x00, 0x8A, 0x00, 0xC0, 0x00, - 0xC1, 0x00, 0xC2, 0x00, 0x9F, 0x00, 0xA3, 0x00, - 0x90, 0x00, 0xB6, 0x00, 0x37, 0x00, 0x71, 0x00, - 0x13, 0x00, 0x50, 0x00, 0x5A, 0x00, 0x6E, 0x00, - 0x70, 0x00, 0x11, 0x00, 0x16, 0x00, 0x14, 0x00, - 0x43, 0x00, 0xCD, 0x00, 0xAA, 0x00, 0x15, 0x00, - 0x83, 0x00, 0x19, 0x00, 0xB3, 0x00, 0x6F, 0x00, - 0x26, 0x00, 0xC8, 0x00, 0xA7, 0x00, 0x98, 0x00, - 0x87, 0x00, 0xC7, 0x00, 0xA2, 0x00, 0xB0, 0x00, - 0x12, 0x00, 0xD7, 0x00, 0x56, 0x00, 0x45, 0x00, - 0x4B, 0x00, 0xAF, 0x00, 0x3B, 0x00, 0x6C, 0x00, - 0x8E, 0x00, 0x39, 0x00, 0x38, 0x00, 0x92, 0x00, - 0x4B, 0x00, 0xD0, 0x00, 0x4A, 0x00, 0x9D, 0x00, - 0x7F, 0x00, 0x6D, 0x00, 0xFF, 0x00, 0xFF, 0x00, - 0x3D, 0x00, 0x72, 0x00, 0x40, 0x00, 0x66, 0x00, - 0x01, 0x00, 0xA5, 0x00, 0x00, 0x00, 0x3C, 0x00, - 0xAC, 0x00, 0x38, 0x00, 0x8B, 0x00, 0xDF, 0x00, - 0x0E, 0x00, 0x54, 0x00, 0xFF, 0x00, 0xFF, 0x00, - 0x94, 0x00, 0xAB, 0x00, 0x76, 0x00, 0x58, 0x00, - 0x6B, 0x00, 0x27, 0x00, 0xFF, 0x00, 0x77, 0x00, - 0xA6, 0x00, 0x63, 0x00, 0x9E, 0x00, 0xDE, 0x00, - 0x84, 0x00, 0x85, 0x00, 0x86, 0x00, 0x3F, 0x00, - 0xCC, 0x00, 0xCC, 0x00, 0xCC, 0x00, 0x93, 0x00, - 0x9D, 0x00, 0x75, 0x00, 0x75, 0x00, 0x75, 0x00, - 0x75, 0x00, 0x3A, 0x00, 0xFF, 0x00, 0xFF, 0x00, - 0xFF, 0x00, 0xAE, 0x00, 0x8C, 0x00, 0x20, 0x00, - 0xFF, 0x00, 0x32, 0x00, 0x32, 0x00, 0xFF, 0x00, - 0x4D, 0x00, 0xD9, 0x00, 0x88, 0x00, 0x4D, 0x00, - 0x4D, 0x00, 0x4D, 0x00, 0x4D, 0x00, 0xA0, 0x00, - 0x4C, 0x00, 0x8C, 0x00, 0x4C, 0x00, 0x4C, 0x00, - 0x8C, 0x00, 0x8C, 0x00, 0x5C, 0x00, 0x5D, 0x00, - 0x60, 0x00, 0x5F, 0x00, 0xC5, 0x00, 0xBF, 0x00, - 0xFF, 0x00, 0x4F, 0x00, 0x16, 0x00, 0x59, 0x00, - 0xFF, 0x00, 0x24, 0x00, 0xA4, 0x00, 0xCF, 0x00, - 0xFF, 0x00, 0x47, 0x00, 0x95, 0x00, 0x96, 0x00, - 0x7B, 0x00, 0xBD, 0x00, 0xFF, 0x00, 0x34, 0x00, - 0x35, 0x00, 0x36, 0x00, 0xDE, 0x00, 0xFF, 0x00, - 0x4B, 0x00, 0xD6, 0x00, 0xFF, 0x00, 0x61, 0x00, - 0x62, 0x00, 0xFF, 0x00, 0x78, 0x00, 0xFF, 0x00, - 0x44, 0x00, 0xB4, 0x00, 0xB5, 0x00, 0x42, 0x00, - 0x27, 0x00, 0xA2, 0x00, 0x27, 0x00, 0x5D, 0x00, - 0x7A, 0x00, 0x89, 0x00, 0x1A, 0x00, 0x0E, 0x00, - 0x82, 0x00, 0xFF, 0x00, 0x79, 0x00, 0x2A, 0x00, - 0x81, 0x00, 0xFF, 0x00, 0x74, 0x00, 0x4E, 0x00, - 0xB1, 0x00, 0x1B, 0x00, 0x2F, 0x00, 0xBA, 0x00, - 0xBB, 0x00, 0xBC, 0x00, 0xDA, 0x00, 0xDB, 0x00, - 0x18, 0x00, 0x5E, 0x00, 0x0D, 0x0A, 0x88, 0x00, - 0x1E, 0x00, 0x1F, 0x00, 0x20, 0x00, 0x21, 0x00, - 0x69, 0x00, 0x1C, 0x00, 0x7C, 0x00, 0x30, 0x00, - 0xC3, 0x00, 0xC4, 0x00, 0xAD, 0x00, 0x25, 0x00, - 0x53, 0x00, 0xB7, 0x00, 0xB8, 0x00, 0xDC, 0x00, - 0x8D, 0x00, 0xCB, 0x00, 0xD4, 0x00, 0xB2, 0x00, - 0xDD, 0x00, 0x57, 0x00, 0x41, 0x00, 0x10, 0x00, - 0x4C, 0x00, 0xC9, 0x00, 0xFF, 0x00, 0xFF, 0x00, - 0x7D, 0x00, 0x7E, 0x00, 0xCA, 0x00, 0x03, 0x00, - 0x04, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, - 0x08, 0x00, 0x09, 0x00, 0x0A, 0x00, 0x0B, 0x00, - 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, - 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, - 0x23, 0x00, 0x97, 0x00, 0x73, 0x00 -}; - -const int KyraEngine_MR::_sfxFileMapSize = ARRAYSIZE(KyraEngine_MR::_sfxFileMap); - -const char *KyraEngine_MR::_sfxFileList[] = { - "ALARM1", - "ARMOIRE1", - "ARROW1", - "AUDLAFF1", - "AUDLAFF2", - "AUDLAFF3", - "AUDLAFF4", - "AUDLAFF5", - "AUDLAFF6", - "AUDLAFF7", - "AUDLAFF8", - "AUDLAFF9", - "BARK22A", - "BEAM1", - "BEDSQK1", - "BEDSQK2", - "BIGCLOK1", - "BIGDOR2", - "BIRD4", - "BIRD122", - "BIRD222", - "BIRD322", - "BLAST22D", - "BLINK1", - "BOATMIX1", - "BODYFAL1", - "BOTLBLOW", - "BOUNCE3", - "BOUNCE5", - "BOW2", - "BUBL1", - "BUBL2", - "BUBL3", - "BUBL4", - "BUTTON1", - "BUTTON2", - "CANNON1", - "CASHREG1", - "CATHY1", - "CHAIN1", - "CHATTER1", - "CHATTER2", - "CHEESE1", - "CHICHIC2", - "CHIPLAF1", - "CHIPROR1", - "CLANG1", - "CLDOOR1", - "CLEAT1", - "CLOTHES1", - "COIN2", - "COUNTER1", - "CREAK1", - "CREAK2", - "CREAK3", - "CRIKT22A", - "CRMAD1", - "CRNORM1", - "CRUMBLE1", - "CRUNCH1", - "CRYSTAL1", - "DFLY1", - "DIAL1", - "DIGDIRT1", - "DIZZY1", - "DODO1", - "DOORBELL", - "DOORCL1", - "DOOROP1", - "DRIP1", - "DROPITM1", - "EAT22A", - "EATNUT1", - "ELEC1", - "EXPLODE2", - "FALL1", - "FALLM2", - "FALLM3", - "FESTRE1", - "FISHLAF2", - "FLAG22A", - "FLAG22B", - "FLAG22C", - "FLPOOF1", - "FOLDER1", - "FROG1", - "FROGJMP1", - "FSHBUBL1", - "FUNNEL1", - "FUSE1", - "GATE22A", - "GEM1", - "GEMFIRE1", - "GEMLIT1", - "GEMPUT1", - "GEMRAIN1", - "GEMWND1", - "GIRLLAF1", - "GIRLLAF2", - "GLASBRK1", - "GLOWY1", - "GOODK33", - "GROWTWIG", - "GUNTHER3", - "H2ODROP2", - "H2OFALL1", - "HAMMER1", - "HAYFALL2", - "HERMMAG1", - "HIPRES1", - "HITHED22", - "HOWL1", - "HUM1", - "HYPNO1", - "HYPNO2", - "IMPACT1", - "JOHAN1", - "JUNGAMB2", - "KISS1", - "KISS2", - "KNIFE", - "KNIFHIT1", - "KNIFSTAB", - "KNOCK", - "LAND1", - "LEVIBAB1", - "LEVIMAN1", - "LID", - "MACHMIX1", - "MALCFALL", - "MALCYAWN", - "MJUMP1", - "MOO1", - "MOO2", - "MOO3", - "MORPH1", - "MORPH2", - "MORPH3", - "MORPH4", - "MOTHS1", - "MSPLASH1", - "MTLSLAM1", - "MUDBATH1", - "NAIL1", - "NEIGH1", - "NETCATCH", - "NETMAL1", - "NETRIP1", - "OPDOOR1", - "OWL1", - "OWL2", - "PEDAL3", - "PEGWING1", - "PICKUP1", - "PLUCK3", - "POLGULP1", - "POOF1", - "PORTAL1", - "POURH2O1", - "PRIMOR1", - "PUMP1", - "PUNCTRE1", - "RATTLE1", - "REV2", - "RING", - "ROAR3", - "ROWBOAT1", - "RUCKUS1", - "RUMBLE1", - "SCOLD1", - "SCRATCH1", - "SHOVEL1", - "SHOWER2", - "SLOTPUL1", - "SNAKKILL", - "SNAP1", - "SNIFF1", - "SNIFF2", - "SNIFFM1", - "SNIP22B", - "SNORIN1", - "SNOROUT1", - "SNORT1", - "SPITBAL1", - "SPITBAL2", - "SPLASH1", - "SQUEAK1", - "SQUEAK2", - "SQUEAK3", - "STATUE", - "STAMPED1", - "STARS1", - "STONE1", - "STONE2", - "STONE3", - "STRETCH1", - "STRETCH2", - "SUNRISE1", - "SWALLOW1", - "SWALLOW2", - "SWAV22B", - "TELBEL1", - "TELBEL2", - "TENNIS1", - "THROW1", - "THUMP1", - "TOILET1", - "TRAPDOR1", - "TRICKLE", - "TROLGRNT", - "TROLYEL1", - "TROLYEL2", - "TUBEDOR1", - "TWIGSNAP", - "UMBRLA1", - "UNLOK22A", - "VACUUM", - "WAVELT1", - "WHIP1", - "WHIP2", - "WOODHIT1", - "YAWN1", - "ZING", - "ZIPPER1" -}; - -const int KyraEngine_MR::_sfxFileListSize = ARRAYSIZE(KyraEngine_MR::_sfxFileList); - const uint8 KyraEngine_MR::_badConscienceFrameTable[] = { 0x13, 0x13, 0x13, 0x18, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x10, 0x13, 0x13, 0x13, 0x13, @@ -2449,28 +2033,6 @@ const uint8 KyraEngine_MR::_trashItemList[] = { 0x39, 0x40, 0x3E, 0x3D, 0x3C, 0x3F, 0xFF }; -const uint8 KyraEngine_MR::_itemMagicTable[] = { - 0x06, 0x05, 0x07, 0xFE, 0x05, 0x06, 0x07, 0xFE, - 0x03, 0x00, 0x22, 0xFE, 0x00, 0x03, 0x22, 0xFE, - 0x10, 0x00, 0x20, 0x0F, 0x00, 0x10, 0x0F, 0x20, - 0x10, 0x22, 0x21, 0x0F, 0x22, 0x10, 0x0F, 0x21, - 0xFF, 0xFF, 0xFF, 0xFF -}; - -const uint8 KyraEngine_MR::_itemStringMap[] = { - 1, 0, 2, 0, 2, 2, 0, 0, - 2, 2, 2, 2, 2, 2, 2, 0, - 0, 0, 0, 0, 0, 0, 3, 1, - 2, 0, 2, 2, 0, 0, 0, 0, - 0, 0, 1, 2, 0, 2, 0, 2, - 0, 0, 2, 0, 0, 0, 0, 1, - 1, 0, 2, 2, 0, 0, 2, 0, - 0, 2, 0, 2, 2, 0, 0, 2, - 0, 0, 0, 0, 2, 0, 0, 2 -}; - -const uint KyraEngine_MR::_itemStringMapSize = ARRAYSIZE(KyraEngine_MR::_itemStringMap); - const uint8 KyraEngine_MR::_itemStringPickUp[] = { 0x4, 0x7, 0x0, 0xA }; @@ -2483,36 +2045,6 @@ const uint8 KyraEngine_MR::_itemStringInv[] = { 0x6, 0x9, 0x2, 0xC }; -const int8 KyraEngine_MR::_scoreTable[] = { - 10, 8, 5, 9, 10, 10, 7, 8, - 9, 9, 8, 8, 7, 8, 5, 9, - 6, 10, 7, 8, 5, 9, 6, 6, - 7, 8, 5, 9, 6, 8, 7, 8, - 5, 9, 6, 10, 7, 8, 5, 5, - 5, 7, 5, 7, 10, 5, 10, 5, - 5, 8, 6, 8, 7, 5, 5, 8, - 6, 9, 5, 7, 6, 5, 5, 7, - 7, 7, 6, 5, 8, 6, 10, 5, - 7, 5, 10, 5, 5, 5, 5, 7, - 5, 8, 9, 7, 7, 6, 10, 6, - 5, 10, 8, 5, 8, 6, 10, 5, - 5, 8, 8, 5, 7, 7, 7, 6, - 8, 9, 8, 8, 6, 5, 7, 6, - 5, 8, 15, 7, 9, 6, 6, 8, - 5, 8, 15, 15, 5, 15, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -const int KyraEngine_MR::_scoreTableSize = ARRAYSIZE(KyraEngine_MR::_scoreTable); - void KyraEngine_MR::initMainButtonList(bool disable) { if (!_mainButtonListInitialized) { _mainButtonData = new Button[14]; diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index 8ca0f61edc..0ee3da4143 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -31,7 +31,7 @@ #include "md5.h" enum { - kKyraDatVersion = 24, + kKyraDatVersion = 25, kIndexSize = 12 }; @@ -50,6 +50,8 @@ enum { #include "hof_cd.h" #include "hof_demo.h" +#include "malcolm.h" + const Game kyra1FanTranslations[] = { { kKyra1, IT_ITA, kTalkieVersion, "d0f1752098236083d81b9497bd2b6989", kyra1FreCD }, GAME_DUMMY_ENTRY @@ -63,6 +65,10 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint bool extractHofShapeAnimDataV1(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); bool extractHofShapeAnimDataV2(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); +bool extractStringsWoSuffix(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); +bool extractRaw16to8(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); +bool extractMrShapeAnimData(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); + int extractHofSeqData_checkString(const void *ptr, uint8 checkSize); int extractHofSeqData_isSequence(const void *ptr, const Game *g, uint32 maxCheckSize); int extractHofSeqData_isControl(const void *ptr, uint32 size); @@ -81,6 +87,10 @@ const ExtractType extractTypeTable[] = { { k2TypeShpDataV1, extractHofShapeAnimDataV1, createFilename }, { k2TypeShpDataV2, extractHofShapeAnimDataV2, createFilename }, + { k2TypeSoundList, extractStringsWoSuffix, createFilename }, + { k3TypeRaw16to8, extractRaw16to8, createFilename }, + { k3TypeShpData, extractMrShapeAnimData, createFilename }, + { -1, 0, 0} }; @@ -224,8 +234,19 @@ const ExtractFilename extractFilenames[] = { { k2IngameTalkObjIndex, kTypeRawData, "I_TALKOBJECTS.MAP" }, { k2IngameTimJpStrings, kTypeStringList, "I_TIMJPSTR.TXT" }, { k2IngameItemAnimData, k2TypeShpDataV2, "I_INVANIM.SHP" }, - { k2IngameTlkDemoStrings, kTypeLanguageList, "I_TLKDEMO.TXT" }, - + { k2IngameTlkDemoStrings, kTypeLanguageList, "I_TLKDEMO.TXT" }, + + + // MALCOLM'S REVENGE + { k3MainMenuStrings, kTypeStringList, "MAINMENU.TXT" }, + { k3MusicFiles, k2TypeSoundList, "SCORE.TRA" }, + { k3ScoreTable, kTypeRawData, "SCORE.MAP" }, + { k3SfxFiles, kTypeStringList, "SFXFILES.TRA" }, + { k3SfxMap, k3TypeRaw16to8, "SFXINDEX.MAP" }, + { k3ItemAnimData, k3TypeShpData, "INVANIM.SHP" }, + { k3ItemMagicTable, k3TypeRaw16to8, "ITEMMAGIC.MAP" }, + { k3ItemStringMap, kTypeRawData, "ITEMSTRINGS.MAP" }, + { -1, 0, 0 } }; @@ -637,6 +658,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint } else if (cycle == 1 && v != 1 && v != -2) { uint16 controlOffs = 0; + uint16 ctrSize = 0; if (v) { const byte *ctrStart = ptr; while (v && v != -2) { @@ -647,7 +669,7 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint if (v == -2) break; - uint16 ctrSize = (uint16)(ptr - ctrStart); + ctrSize = (uint16)(ptr - ctrStart); if (g->special != k2DemoVersion && extractHofSeqData_isControl(ctrStart, ctrSize)) { @@ -673,11 +695,20 @@ bool extractHofSeqData(PAKFile &out, const Game *g, const byte *data, const uint ptr += 14; output += 14; - for (int w = 0; w < 3; w++) { //startframe, endFrame, frameDelay - WRITE_BE_UINT16(output, READ_LE_UINT16(ptr)); - ptr += 2; - output += 2; - } + // startframe + WRITE_BE_UINT16(output, READ_LE_UINT16(ptr)); + ptr += 2; + output += 2; + + // endFrame + WRITE_BE_UINT16(output, (ctrSize && ((ctrSize >> 2) < READ_LE_UINT16(ptr))) ? (ctrSize >> 2) : READ_LE_UINT16(ptr)); + ptr += 2; + output += 2; + + // frameDelay + WRITE_BE_UINT16(output, READ_LE_UINT16(ptr)); + ptr += 2; + output += 2; ptr += 4; @@ -839,8 +870,8 @@ int extractHofSeqData_isControl(const void *ptr, uint32 size) { } bool extractHofShapeAnimDataV1(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch) { - int outsize = size + 1; - uint8 *buffer = new uint8[outsize]; + int outsize = 1; + uint8 *buffer = new uint8[size + 1]; const uint8 *src = data; uint8 *dst = buffer + 1; @@ -851,12 +882,13 @@ bool extractHofShapeAnimDataV1(PAKFile &out, const Game *g, const byte *data, co WRITE_BE_UINT16(dst, READ_LE_UINT16(src)); src += 4; dst += 2; - outsize -= 2; + outsize += 4; for (int j = 0; j < 20; j++) { WRITE_BE_UINT16(dst, READ_LE_UINT16(src)); src += 2; dst += 2; + outsize += 2; } }; @@ -867,11 +899,11 @@ bool extractHofShapeAnimDataV1(PAKFile &out, const Game *g, const byte *data, co } bool extractHofShapeAnimDataV2(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch) { - int outsize = size + 1; - uint8 *buffer = new uint8[outsize]; + int outsize = 1; + uint8 *buffer = new uint8[size + 1]; const uint8 *src = data; uint8 *dst = buffer + 1; - uint8 *fin = buffer + outsize; + const uint8 *fin = data + size; int count = 0; do { @@ -887,17 +919,98 @@ bool extractHofShapeAnimDataV2(PAKFile &out, const Game *g, const byte *data, co uint8 numFrames = *src; *dst++ = numFrames; src += 6; - outsize -= 5; + outsize += 3; for (int i = 0; i < (numFrames << 1); i++) { WRITE_BE_UINT16(dst, READ_LE_UINT16(src)); src += 2; dst += 2; + outsize += 2; } src += (48 - (numFrames << 2)); - } while (dst < fin); + } while (src < fin); + + *buffer = count; // number of items + + return out.addFile(filename, buffer, outsize); +} + +bool extractStringsWoSuffix(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch) { + int outsize = size + 4; + uint8 *buffer = new uint8[outsize]; + const uint8 *src = data; + uint8 *dst = buffer + 4; + const uint8 *fin = src + size; + int entries = 0; + + while (src < fin) { + while (!*src && src < fin) + src++; + while (*src && *src != '.' && src < fin) + *dst++ = *src++; + + *dst++ = '\0'; + entries++; + + if (*src == '.') { + while (*src && src < fin) + src++; + } + } + + WRITE_BE_UINT32(buffer, entries); + outsize = dst - buffer; + + return out.addFile(filename, buffer, outsize); +} + +bool extractRaw16to8(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch) { + int outsize = size >> 1; + uint8 *buffer = new uint8[outsize]; + const uint8 *src = data; + uint8 *dst = buffer; + + for (int i = 0; i < outsize; i++) { + *dst++ = *src++; + *src++; + } + + return out.addFile(filename, buffer, outsize); +} + +bool extractMrShapeAnimData(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch) { + int outsize = 1; + uint8 *buffer = new uint8[size + 1]; + const uint8 *src2 = data; + const uint8 *src1 = data + 324; + uint8 *dst = buffer + 1; + const uint8 *fin = data + size; + int count = 0; + + do { + if (READ_LE_UINT16(src1) == 0xffff) + break; + + count++; + + WRITE_BE_UINT16(dst, READ_LE_UINT16(src1)); + src1 += 2; + dst += 2; + + uint8 numFrames = *src1; + *dst++ = numFrames; + src1 += 10; + outsize += 3; + + for (int i = 0; i < (numFrames << 1); i++) { + WRITE_BE_UINT16(dst, READ_LE_UINT16(src2)); + src2 += 2; + dst += 2; + outsize += 2; + } + } while (src1 < fin); *buffer = count; // number of items @@ -925,7 +1038,7 @@ enum { uint32 getFeatures(const Game *g) { uint32 features = 0; - if (g->special == kTalkieVersion || g->special == k2CDFile1E || g->special == k2CDFile1F || g->special == k2CDFile1G || g->special == k2CDFile2E || g->special == k2CDFile2F || g->special == k2CDFile2G) + if (g->special == kTalkieVersion || g->special == k2CDFile1E || g->special == k2CDFile1F || g->special == k2CDFile1G || g->special == k2CDFile2E || g->special == k2CDFile2F || g->special == k2CDFile2G || g->game == kKyra3) features |= GF_TALKIE; else if (g->special == kDemoVersion || g->special == k2DemoVersion) features |= GF_DEMO; @@ -1203,6 +1316,8 @@ const Game *gameDescs[] = { kyra2TownsGames, kyra2Demos, + kyra3Games, + 0 }; @@ -1229,6 +1344,3 @@ const Game *findGame(const byte *buffer, const uint32 size) { printf("file is not supported (unknown md5 \"%s\")\n", md5str); return 0; } - - - diff --git a/tools/create_kyradat/create_kyradat.h b/tools/create_kyradat/create_kyradat.h index 5127f16b5d..79d7dd3001 100644 --- a/tools/create_kyradat/create_kyradat.h +++ b/tools/create_kyradat/create_kyradat.h @@ -164,6 +164,15 @@ enum kExtractID { k2IngameItemAnimData, k2IngameTlkDemoStrings, + k3MainMenuStrings, + k3MusicFiles, + k3ScoreTable, + k3SfxFiles, + k3SfxMap, + k3ItemAnimData, + k3ItemMagicTable, + k3ItemStringMap, + kMaxResIDs }; @@ -246,7 +255,11 @@ enum kExtractType { k2TypeSeqData, k2TypeShpDataV1, - k2TypeShpDataV2 + k2TypeShpDataV2, + k2TypeSoundList, + + k3TypeRaw16to8, + k3TypeShpData }; struct ExtractType { diff --git a/tools/create_kyradat/malcolm.h b/tools/create_kyradat/malcolm.h new file mode 100644 index 0000000000..253d6e7b1c --- /dev/null +++ b/tools/create_kyradat/malcolm.h @@ -0,0 +1,17 @@ +const ExtractEntry kyra3cd[] = { + { k3MainMenuStrings, 0x0002D932, 0x0002D9E2 }, + { k3MusicFiles, 0x0003062C, 0x00030801 }, + { k3ScoreTable, 0x0002E4D0, 0x0002E598 }, + { k3SfxFiles, 0x0002E84E, 0x0002F10D }, + { k3SfxMap, 0x0002A590, 0x0002AA50 }, + { k3ItemAnimData, 0x00031614, 0x000317DC }, + { k3ItemMagicTable, 0x0002FB2A, 0x0002FB72 }, + { k3ItemStringMap, 0x0002D07A, 0x0002D0C2 }, + { -1, 0, 0 } +}; + +const Game kyra3Games[] = { + { kKyra3, EN_ANY, -1, "bf68701eb591d0b72219f314c0d32688", kyra3cd }, + GAME_DUMMY_ENTRY +}; + diff --git a/tools/create_kyradat/misc.h b/tools/create_kyradat/misc.h index bd2421ebab..194624acba 100644 --- a/tools/create_kyradat/misc.h +++ b/tools/create_kyradat/misc.h @@ -460,6 +460,18 @@ const int kyra2TlkDemoNeed[] = { -1 }; +const int kyra3Need[] = { + k3MainMenuStrings, + k3MusicFiles, + k3ScoreTable, + k3SfxFiles, + k3SfxMap, + k3ItemAnimData, + k3ItemMagicTable, + k3ItemStringMap, + -1 +}; + const GameNeed gameNeedTable[] = { { kKyra1, -1, kyra1FloppyNeed }, { kKyra1, kTalkieVersion, kyra1CDNeed }, @@ -485,6 +497,8 @@ const GameNeed gameNeedTable[] = { { kKyra2, k2DemoVersionTlkF, kyra2TlkDemoNeed}, { kKyra2, k2DemoVersionTlkG, kyra2TlkDemoNeed}, + { kKyra3, -1, kyra3Need }, + { -1, -1, 0 } }; -- cgit v1.2.3 From 0b9a3f22083cb7ec61953c3c6905c4780e93619a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 12 May 2008 13:50:59 +0000 Subject: Added assert to snd_playSoundEffect. svn-id: r32060 --- engines/kyra/kyra_mr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index d68bb7e02f..9503420f82 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -479,6 +479,7 @@ void KyraEngine_MR::snd_playSoundEffect(int item, int volume) { debugC(9, kDebugLevelMain, "KyraEngine_MR::snd_playSoundEffect(%d, %d)", item, volume); if (_sfxFileMap[item*2+0] != 0xFF) { char filename[16]; + assert(_sfxFileMap[item*2+0] < _sfxFileListSize); snprintf(filename, 16, "%s.AUD", _sfxFileList[_sfxFileMap[item*2+0]]); uint8 priority = _sfxFileMap[item*2+1]; -- cgit v1.2.3 From bde4fa1e9b6478e6d3820692048bbd7b85e56f73 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Mon, 12 May 2008 14:22:27 +0000 Subject: fix for kyra 3 sfx (broken by last commit) svn-id: r32061 --- dists/engine-data/kyra.dat | Bin 233702 -> 232687 bytes engines/kyra/sound_towns.cpp | 8 +++++++- engines/kyra/staticres.cpp | 10 ++-------- tools/create_kyradat/create_kyradat.cpp | 32 +++++++++++++++++++++++++++++--- tools/create_kyradat/create_kyradat.h | 1 + 5 files changed, 39 insertions(+), 12 deletions(-) diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat index d551220095..7706b1a9dc 100644 Binary files a/dists/engine-data/kyra.dat and b/dists/engine-data/kyra.dat differ diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index 3d8c7becae..c591646628 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -1442,7 +1442,13 @@ bool SoundTowns_v2::voicePlay(const char *file, bool) { return false; } - uint8 * data = _vm->resource()->fileData(file, 0); + char filename [13]; + if (scumm_stricmp(file + strlen(file) - 4, ".PCM")) + sprintf(filename, "%s.PCM", file); + else + strcpy(filename, file); + + uint8 * data = _vm->resource()->fileData(filename, 0); uint8 * src = data; uint16 sfxRate = rates[READ_LE_UINT16(src)]; diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 87585c27d2..49b5b4dc49 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -44,7 +44,7 @@ namespace Kyra { -#define RESFILE_VERSION 25 +#define RESFILE_VERSION 26 bool StaticResource::checkKyraDat() { Common::File kyraDat; @@ -1215,8 +1215,7 @@ void KyraEngine_HoF::initStaticResource() { _ingameTimJpStr = _staticres->loadStrings(k2IngameTimJpStrings, _ingameTimJpStrSize); _itemAnimData = _staticres->loadShapeAnimData_v2(k2IngameShapeAnimData, _itemAnimDataSize); - // replace sequence talkie files with localized versions and cut off .voc - // suffix from voc files so as to allow compression specific file extensions + // replace sequence talkie files with localized versions const char* const* seqSoundList = _staticres->loadStrings(k2SeqplaySfxFiles, _sequenceSoundListSize); const char* const* tlkfiles = _staticres->loadStrings(k2SeqplayTlkFiles, tmpSize); char ** tmpSndLst = new char*[_sequenceSoundListSize]; @@ -1227,9 +1226,6 @@ void KyraEngine_HoF::initStaticResource() { tmpSndLst[i] = new char[len + 1]; tmpSndLst[i][0] = 0; - if (_flags.platform == Common::kPlatformPC) - len -= 4; - if (tlkfiles) { for (int ii = 0; ii < tmpSize; ii++) { if (!scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1])) @@ -1239,8 +1235,6 @@ void KyraEngine_HoF::initStaticResource() { if (tmpSndLst[i][0] == 0) strcpy(tmpSndLst[i], seqSoundList[i]); - - tmpSndLst[i][len] = 0; } tlkfiles = seqSoundList = 0; diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index 0ee3da4143..e49b5672b4 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -31,7 +31,7 @@ #include "md5.h" enum { - kKyraDatVersion = 25, + kKyraDatVersion = 26, kIndexSize = 12 }; @@ -66,6 +66,7 @@ bool extractHofShapeAnimDataV1(PAKFile &out, const Game *g, const byte *data, co bool extractHofShapeAnimDataV2(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); bool extractStringsWoSuffix(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); +bool extractPaddedStrings(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); bool extractRaw16to8(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); bool extractMrShapeAnimData(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch = 0); @@ -88,6 +89,7 @@ const ExtractType extractTypeTable[] = { { k2TypeShpDataV2, extractHofShapeAnimDataV2, createFilename }, { k2TypeSoundList, extractStringsWoSuffix, createFilename }, + { k2TypeSfxList, extractPaddedStrings, createFilename }, { k3TypeRaw16to8, extractRaw16to8, createFilename }, { k3TypeShpData, extractMrShapeAnimData, createFilename }, @@ -216,7 +218,7 @@ const ExtractFilename extractFilenames[] = { { k2SeqplayCredits, kTypeRawData, "S_CREDITS.TXT" }, { k2SeqplayCreditsSpecial, kTypeStringList, "S_CREDITS2.TXT" }, { k2SeqplayStrings, kTypeLanguageList, "S_STRINGS" }, - { k2SeqplaySfxFiles, kTypeStringList, "S_SFXFILES.TXT" }, + { k2SeqplaySfxFiles, k2TypeSoundList, "S_SFXFILES.TXT" }, { k2SeqplayTlkFiles, kTypeLanguageList, "S_TLKFILES" }, { k2SeqplaySeqData, k2TypeSeqData, "S_DATA.SEQ" }, { k2SeqplayIntroTracks, kTypeStringList, "S_INTRO.TRA" }, @@ -241,7 +243,7 @@ const ExtractFilename extractFilenames[] = { { k3MainMenuStrings, kTypeStringList, "MAINMENU.TXT" }, { k3MusicFiles, k2TypeSoundList, "SCORE.TRA" }, { k3ScoreTable, kTypeRawData, "SCORE.MAP" }, - { k3SfxFiles, kTypeStringList, "SFXFILES.TRA" }, + { k3SfxFiles, k2TypeSfxList, "SFXFILES.TRA" }, { k3SfxMap, k3TypeRaw16to8, "SFXINDEX.MAP" }, { k3ItemAnimData, k3TypeShpData, "INVANIM.SHP" }, { k3ItemMagicTable, k3TypeRaw16to8, "ITEMMAGIC.MAP" }, @@ -966,6 +968,30 @@ bool extractStringsWoSuffix(PAKFile &out, const Game *g, const byte *data, const return out.addFile(filename, buffer, outsize); } +bool extractPaddedStrings(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch) { + int outsize = size + 4; + uint8 *buffer = new uint8[outsize]; + const uint8 *src = data; + uint8 *dst = buffer + 4; + const uint8 *fin = src + size; + int entries = 0; + + while (src < fin) { + while (!*src && src < fin) + src++; + while (*src && src < fin) + *dst++ = *src++; + + *dst++ = '\0'; + entries++; + } + + WRITE_BE_UINT32(buffer, entries); + outsize = dst - buffer; + + return out.addFile(filename, buffer, outsize); +} + bool extractRaw16to8(PAKFile &out, const Game *g, const byte *data, const uint32 size, const char *filename, int fmtPatch) { int outsize = size >> 1; uint8 *buffer = new uint8[outsize]; diff --git a/tools/create_kyradat/create_kyradat.h b/tools/create_kyradat/create_kyradat.h index 79d7dd3001..62cfbc3374 100644 --- a/tools/create_kyradat/create_kyradat.h +++ b/tools/create_kyradat/create_kyradat.h @@ -257,6 +257,7 @@ enum kExtractType { k2TypeShpDataV1, k2TypeShpDataV2, k2TypeSoundList, + k2TypeSfxList, k3TypeRaw16to8, k3TypeShpData -- cgit v1.2.3 From 289f96d37c8a904a79229b9554961a3c5ae22bbc Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 12 May 2008 14:52:18 +0000 Subject: More naming consistency fixes (fixes old TODO). svn-id: r32062 --- engines/kyra/resource.h | 153 +++++++++++++------------ engines/kyra/sequences_lok.cpp | 4 +- engines/kyra/sound_towns.cpp | 4 +- engines/kyra/staticres.cpp | 252 ++++++++++++++++++++--------------------- 4 files changed, 206 insertions(+), 207 deletions(-) diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index ca22ec53e4..a8de21b5ca 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -125,86 +125,85 @@ protected: KyraEngine_v1 *_vm; }; -// TODO?: maybe prefix all things here with 'kKyra1' instead of 'k' enum kKyraResources { kLoadAll = -1, - kForestSeq, - kKallakWritingSeq, - kKyrandiaLogoSeq, - kKallakMalcolmSeq, - kMalcolmTreeSeq, - kWestwoodLogoSeq, - - kDemo1Seq, - kDemo2Seq, - kDemo3Seq, - kDemo4Seq, - - kAmuleteAnimSeq, - - kOutroReunionSeq, - - kIntroCPSStrings, - kIntroCOLStrings, - kIntroWSAStrings, - kIntroStrings, - - kOutroHomeString, - - kRoomFilenames, - kRoomList, - - kCharacterImageFilenames, - - kItemNames, - kTakenStrings, - kPlacedStrings, - kDroppedStrings, - kNoDropStrings, - - kPutDownString, - kWaitAmuletString, - kBlackJewelString, - kPoisonGoneString, - kHealingTipString, - kWispJewelStrings, - kMagicJewelStrings, - - kThePoisonStrings, - kFluteStrings, - - kFlaskFullString, - kFullFlaskString, - - kVeryCleverString, - kNewGameString, - - kDefaultShapes, - kHealing1Shapes, - kHealing2Shapes, - kPoisonDeathShapes, - kFluteShapes, - kWinter1Shapes, - kWinter2Shapes, - kWinter3Shapes, - kDrinkShapes, - kWispShapes, - kMagicAnimShapes, - kBranStoneShapes, - - kPaletteList, - - kGUIStrings, - kConfigStrings, - - kAudioTracks, - kAudioTracksIntro, - - kKyra1TownsSFXwdTable, - kKyra1TownsSFXbtTable, - kKyra1TownsCDATable, - kCreditsStrings, + k1ForestSeq, + k1KallakWritingSeq, + k1KyrandiaLogoSeq, + k1KallakMalcolmSeq, + k1MalcolmTreeSeq, + k1WestwoodLogoSeq, + + k1Demo1Seq, + k1Demo2Seq, + k1Demo3Seq, + k1Demo4Seq, + + k1AmuleteAnimSeq, + + k1OutroReunionSeq, + + k1IntroCPSStrings, + k1IntroCOLStrings, + k1IntroWSAStrings, + k1IntroStrings, + + k1OutroHomeString, + + k1RoomFilenames, + k1RoomList, + + k1CharacterImageFilenames, + + k1ItemNames, + k1TakenStrings, + k1PlacedStrings, + k1DroppedStrings, + k1NoDropStrings, + + k1PutDownString, + k1WaitAmuletString, + k1BlackJewelString, + k1PoisonGoneString, + k1HealingTipString, + k1WispJewelStrings, + k1MagicJewelStrings, + + k1ThePoisonStrings, + k1FluteStrings, + + k1FlaskFullString, + k1FullFlaskString, + + k1VeryCleverString, + k1NewGameString, + + k1DefaultShapes, + k1Healing1Shapes, + k1Healing2Shapes, + k1PoisonDeathShapes, + k1FluteShapes, + k1Winter1Shapes, + k1Winter2Shapes, + k1Winter3Shapes, + k1DrinkShapes, + k1WispShapes, + k1MagicAnimShapes, + k1BranStoneShapes, + + k1PaletteList, + + k1GUIStrings, + k1ConfigStrings, + + k1AudioTracks, + k1AudioTracksIntro, + + k1TownsSFXwdTable, + k1TownsSFXbtTable, + k1TownsCDATable, + k1CreditsStrings, k2SeqplayPakFiles, k2SeqplayCredits, diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp index 904eae9d48..b30568c7e2 100644 --- a/engines/kyra/sequences_lok.cpp +++ b/engines/kyra/sequences_lok.cpp @@ -1091,12 +1091,12 @@ void KyraEngine_LoK::seq_playCredits() { if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) { int sizeTmp = 0; - const uint8 *bufferTmp = _staticres->loadRawData(kCreditsStrings, sizeTmp); + const uint8 *bufferTmp = _staticres->loadRawData(k1CreditsStrings, sizeTmp); buffer = new uint8[sizeTmp]; assert(buffer); memcpy(buffer, bufferTmp, sizeTmp); size = sizeTmp; - _staticres->unloadId(kCreditsStrings); + _staticres->unloadId(k1CreditsStrings); } else { buffer = _res->fileData("CREDITS.TXT", &size); assert(buffer); diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index c591646628..9efdee6c2a 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -1109,8 +1109,8 @@ SoundTowns::~SoundTowns() { bool SoundTowns::init() { _vm->checkCD(); int unused = 0; - _sfxWDTable = _vm->staticres()->loadRawData(kKyra1TownsSFXwdTable, unused); - _sfxBTTable = _vm->staticres()->loadRawData(kKyra1TownsSFXbtTable, unused); + _sfxWDTable = _vm->staticres()->loadRawData(k1TownsSFXwdTable, unused); + _sfxBTTable = _vm->staticres()->loadRawData(k1TownsSFXbtTable, unused); return loadInstruments(); } diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 49b5b4dc49..a03fa82a39 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -155,85 +155,85 @@ bool StaticResource::init() { // Kyrandia 1 Filenames static const FilenameTable kyra1StaticRes[] = { // INTRO / OUTRO sequences - { kForestSeq, kRawData, "FOREST.SEQ" }, - { kKallakWritingSeq, kRawData, "KALLAK-WRITING.SEQ" }, - { kKyrandiaLogoSeq, kRawData, "KYRANDIA-LOGO.SEQ" }, - { kKallakMalcolmSeq, kRawData, "KALLAK-MALCOLM.SEQ" }, - { kMalcolmTreeSeq, kRawData, "MALCOLM-TREE.SEQ" }, - { kWestwoodLogoSeq, kRawData, "WESTWOOD-LOGO.SEQ" }, - { kDemo1Seq, kRawData, "DEMO1.SEQ" }, - { kDemo2Seq, kRawData, "DEMO2.SEQ" }, - { kDemo3Seq, kRawData, "DEMO3.SEQ" }, - { kDemo4Seq, kRawData, "DEMO4.SEQ" }, - { kOutroReunionSeq, kRawData, "REUNION.SEQ" }, + { k1ForestSeq, kRawData, "FOREST.SEQ" }, + { k1KallakWritingSeq, kRawData, "KALLAK-WRITING.SEQ" }, + { k1KyrandiaLogoSeq, kRawData, "KYRANDIA-LOGO.SEQ" }, + { k1KallakMalcolmSeq, kRawData, "KALLAK-MALCOLM.SEQ" }, + { k1MalcolmTreeSeq, kRawData, "MALCOLM-TREE.SEQ" }, + { k1WestwoodLogoSeq, kRawData, "WESTWOOD-LOGO.SEQ" }, + { k1Demo1Seq, kRawData, "DEMO1.SEQ" }, + { k1Demo2Seq, kRawData, "DEMO2.SEQ" }, + { k1Demo3Seq, kRawData, "DEMO3.SEQ" }, + { k1Demo4Seq, kRawData, "DEMO4.SEQ" }, + { k1OutroReunionSeq, kRawData, "REUNION.SEQ" }, // INTRO / OUTRO strings - { kIntroCPSStrings, kStringList, "INTRO-CPS.TXT" }, - { kIntroCOLStrings, kStringList, "INTRO-COL.TXT" }, - { kIntroWSAStrings, kStringList, "INTRO-WSA.TXT" }, - { kIntroStrings, kLanguageList, "INTRO-STRINGS." }, - { kOutroHomeString, kLanguageList, "HOME." }, + { k1IntroCPSStrings, kStringList, "INTRO-CPS.TXT" }, + { k1IntroCOLStrings, kStringList, "INTRO-COL.TXT" }, + { k1IntroWSAStrings, kStringList, "INTRO-WSA.TXT" }, + { k1IntroStrings, kLanguageList, "INTRO-STRINGS." }, + { k1OutroHomeString, kLanguageList, "HOME." }, // INGAME strings - { kItemNames, kLanguageList, "ITEMLIST." }, - { kTakenStrings, kLanguageList, "TAKEN." }, - { kPlacedStrings, kLanguageList, "PLACED." }, - { kDroppedStrings, kLanguageList, "DROPPED." }, - { kNoDropStrings, kLanguageList, "NODROP." }, - { kPutDownString, kLanguageList, "PUTDOWN." }, - { kWaitAmuletString, kLanguageList, "WAITAMUL." }, - { kBlackJewelString, kLanguageList, "BLACKJEWEL." }, - { kPoisonGoneString, kLanguageList, "POISONGONE." }, - { kHealingTipString, kLanguageList, "HEALINGTIP." }, - { kThePoisonStrings, kLanguageList, "THEPOISON." }, - { kFluteStrings, kLanguageList, "FLUTE." }, - { kWispJewelStrings, kLanguageList, "WISPJEWEL." }, - { kMagicJewelStrings, kLanguageList, "MAGICJEWEL." }, - { kFlaskFullString, kLanguageList, "FLASKFULL." }, - { kFullFlaskString, kLanguageList, "FULLFLASK." }, - { kVeryCleverString, kLanguageList, "VERYCLEVER." }, - { kNewGameString, kLanguageList, "NEWGAME." }, + { k1ItemNames, kLanguageList, "ITEMLIST." }, + { k1TakenStrings, kLanguageList, "TAKEN." }, + { k1PlacedStrings, kLanguageList, "PLACED." }, + { k1DroppedStrings, kLanguageList, "DROPPED." }, + { k1NoDropStrings, kLanguageList, "NODROP." }, + { k1PutDownString, kLanguageList, "PUTDOWN." }, + { k1WaitAmuletString, kLanguageList, "WAITAMUL." }, + { k1BlackJewelString, kLanguageList, "BLACKJEWEL." }, + { k1PoisonGoneString, kLanguageList, "POISONGONE." }, + { k1HealingTipString, kLanguageList, "HEALINGTIP." }, + { k1ThePoisonStrings, kLanguageList, "THEPOISON." }, + { k1FluteStrings, kLanguageList, "FLUTE." }, + { k1WispJewelStrings, kLanguageList, "WISPJEWEL." }, + { k1MagicJewelStrings, kLanguageList, "MAGICJEWEL." }, + { k1FlaskFullString, kLanguageList, "FLASKFULL." }, + { k1FullFlaskString, kLanguageList, "FULLFLASK." }, + { k1VeryCleverString, kLanguageList, "VERYCLEVER." }, + { k1NewGameString, kLanguageList, "NEWGAME." }, // GUI strings table - { kGUIStrings, kLanguageList, "GUISTRINGS." }, - { kConfigStrings, kLanguageList, "CONFIGSTRINGS." }, + { k1GUIStrings, kLanguageList, "GUISTRINGS." }, + { k1ConfigStrings, kLanguageList, "CONFIGSTRINGS." }, // ROOM table/filenames - { Kyra::kRoomList, StaticResource::kRoomList, "ROOM-TABLE.ROOM" }, - { kRoomFilenames, kStringList, "ROOM-FILENAMES.TXT" }, + { k1RoomList, kRoomList, "ROOM-TABLE.ROOM" }, + { k1RoomFilenames, kStringList, "ROOM-FILENAMES.TXT" }, // SHAPE tables - { kDefaultShapes, kShapeList, "SHAPES-DEFAULT.SHP" }, - { kHealing1Shapes, kShapeList, "HEALING.SHP" }, - { kHealing2Shapes, kShapeList, "HEALING2.SHP" }, - { kPoisonDeathShapes, kShapeList, "POISONDEATH.SHP" }, - { kFluteShapes, kShapeList, "FLUTE.SHP" }, - { kWinter1Shapes, kShapeList, "WINTER1.SHP" }, - { kWinter2Shapes, kShapeList, "WINTER2.SHP" }, - { kWinter3Shapes, kShapeList, "WINTER3.SHP" }, - { kDrinkShapes, kShapeList, "DRINK.SHP" }, - { kWispShapes, kShapeList, "WISP.SHP" }, - { kMagicAnimShapes, kShapeList, "MAGICANIM.SHP" }, - { kBranStoneShapes, kShapeList, "BRANSTONE.SHP" }, + { k1DefaultShapes, kShapeList, "SHAPES-DEFAULT.SHP" }, + { k1Healing1Shapes, kShapeList, "HEALING.SHP" }, + { k1Healing2Shapes, kShapeList, "HEALING2.SHP" }, + { k1PoisonDeathShapes, kShapeList, "POISONDEATH.SHP" }, + { k1FluteShapes, kShapeList, "FLUTE.SHP" }, + { k1Winter1Shapes, kShapeList, "WINTER1.SHP" }, + { k1Winter2Shapes, kShapeList, "WINTER2.SHP" }, + { k1Winter3Shapes, kShapeList, "WINTER3.SHP" }, + { k1DrinkShapes, kShapeList, "DRINK.SHP" }, + { k1WispShapes, kShapeList, "WISP.SHP" }, + { k1MagicAnimShapes, kShapeList, "MAGICANIM.SHP" }, + { k1BranStoneShapes, kShapeList, "BRANSTONE.SHP" }, // IMAGE filename table - { kCharacterImageFilenames, kStringList, "CHAR-IMAGE.TXT" }, + { k1CharacterImageFilenames, kStringList, "CHAR-IMAGE.TXT" }, // AMULET anim - { kAmuleteAnimSeq, kRawData, "AMULETEANIM.SEQ" }, + { k1AmuleteAnimSeq, kRawData, "AMULETEANIM.SEQ" }, // PALETTE table - { kPaletteList, kPaletteTable, "1 33 PALTABLE" }, + { k1PaletteList, kPaletteTable, "1 33 PALTABLE" }, // AUDIO files - { kAudioTracks, kStringList, "TRACKS.TXT" }, - { kAudioTracksIntro, kStringList, "TRACKSINT.TXT" }, + { k1AudioTracks, kStringList, "TRACKS.TXT" }, + { k1AudioTracksIntro, kStringList, "TRACKSINT.TXT" }, // FM-TOWNS specific - { kKyra1TownsSFXwdTable, kRawData, "SFXWDTABLE" }, - { kKyra1TownsSFXbtTable, kRawData, "SFXBTTABLE" }, - { kKyra1TownsCDATable, kRawData, "CDATABLE" }, - { kCreditsStrings, kRawData, "CREDITS" }, + { k1TownsSFXwdTable, kRawData, "SFXWDTABLE" }, + { k1TownsSFXbtTable, kRawData, "SFXBTTABLE" }, + { k1TownsCDATable, kRawData, "CDATABLE" }, + { k1CreditsStrings, kRawData, "CREDITS" }, { 0, 0, 0 } }; @@ -945,74 +945,74 @@ uint8 *StaticResource::getFile(const char *name, int &size) { void KyraEngine_LoK::initStaticResource() { int temp = 0; - _seq_Forest = _staticres->loadRawData(kForestSeq, temp); - _seq_KallakWriting = _staticres->loadRawData(kKallakWritingSeq, temp); - _seq_KyrandiaLogo = _staticres->loadRawData(kKyrandiaLogoSeq, temp); - _seq_KallakMalcolm = _staticres->loadRawData(kKallakMalcolmSeq, temp); - _seq_MalcolmTree = _staticres->loadRawData(kMalcolmTreeSeq, temp); - _seq_WestwoodLogo = _staticres->loadRawData(kWestwoodLogoSeq, temp); - _seq_Demo1 = _staticres->loadRawData(kDemo1Seq, temp); - _seq_Demo2 = _staticres->loadRawData(kDemo2Seq, temp); - _seq_Demo3 = _staticres->loadRawData(kDemo3Seq, temp); - _seq_Demo4 = _staticres->loadRawData(kDemo4Seq, temp); - _seq_Reunion = _staticres->loadRawData(kOutroReunionSeq, temp); - - _seq_WSATable = _staticres->loadStrings(kIntroWSAStrings, _seq_WSATable_Size); - _seq_CPSTable = _staticres->loadStrings(kIntroCPSStrings, _seq_CPSTable_Size); - _seq_COLTable = _staticres->loadStrings(kIntroCOLStrings, _seq_COLTable_Size); - _seq_textsTable = _staticres->loadStrings(kIntroStrings, _seq_textsTable_Size); - - _itemList = _staticres->loadStrings(kItemNames, _itemList_Size); - _takenList = _staticres->loadStrings(kTakenStrings, _takenList_Size); - _placedList = _staticres->loadStrings(kPlacedStrings, _placedList_Size); - _droppedList = _staticres->loadStrings(kDroppedStrings, _droppedList_Size); - _noDropList = _staticres->loadStrings(kNoDropStrings, _noDropList_Size); - _putDownFirst = _staticres->loadStrings(kPutDownString, _putDownFirst_Size); - _waitForAmulet = _staticres->loadStrings(kWaitAmuletString, _waitForAmulet_Size); - _blackJewel = _staticres->loadStrings(kBlackJewelString, _blackJewel_Size); - _poisonGone = _staticres->loadStrings(kPoisonGoneString, _poisonGone_Size); - _healingTip = _staticres->loadStrings(kHealingTipString, _healingTip_Size); - _thePoison = _staticres->loadStrings(kThePoisonStrings, _thePoison_Size); - _fluteString = _staticres->loadStrings(kFluteStrings, _fluteString_Size); - _wispJewelStrings = _staticres->loadStrings(kWispJewelStrings, _wispJewelStrings_Size); - _magicJewelString = _staticres->loadStrings(kMagicJewelStrings, _magicJewelString_Size); - _flaskFull = _staticres->loadStrings(kFlaskFullString, _flaskFull_Size); - _fullFlask = _staticres->loadStrings(kFullFlaskString, _fullFlask_Size); - _veryClever = _staticres->loadStrings(kVeryCleverString, _veryClever_Size); - _homeString = _staticres->loadStrings(kOutroHomeString, _homeString_Size); - _newGameString = _staticres->loadStrings(kNewGameString, _newGameString_Size); - - _healingShapeTable = _staticres->loadShapeTable(kHealing1Shapes, _healingShapeTableSize); - _healingShape2Table = _staticres->loadShapeTable(kHealing2Shapes, _healingShape2TableSize); - _posionDeathShapeTable = _staticres->loadShapeTable(kPoisonDeathShapes, _posionDeathShapeTableSize); - _fluteAnimShapeTable = _staticres->loadShapeTable(kFluteShapes, _fluteAnimShapeTableSize); - _winterScrollTable = _staticres->loadShapeTable(kWinter1Shapes, _winterScrollTableSize); - _winterScroll1Table = _staticres->loadShapeTable(kWinter2Shapes, _winterScroll1TableSize); - _winterScroll2Table = _staticres->loadShapeTable(kWinter3Shapes, _winterScroll2TableSize); - _drinkAnimationTable = _staticres->loadShapeTable(kDrinkShapes, _drinkAnimationTableSize); - _brandonToWispTable = _staticres->loadShapeTable(kWispShapes, _brandonToWispTableSize); - _magicAnimationTable = _staticres->loadShapeTable(kMagicAnimShapes, _magicAnimationTableSize); - _brandonStoneTable = _staticres->loadShapeTable(kBranStoneShapes, _brandonStoneTableSize); - - _characterImageTable = _staticres->loadStrings(kCharacterImageFilenames, _characterImageTableSize); - - _roomFilenameTable = _staticres->loadStrings(kRoomFilenames, _roomFilenameTableSize); - - _amuleteAnim = _staticres->loadRawData(kAmuleteAnimSeq, temp); - - _specialPalettes = _staticres->loadPaletteTable(kPaletteList, temp); - - _guiStrings = _staticres->loadStrings(kGUIStrings, _guiStringsSize); - _configStrings = _staticres->loadStrings(kConfigStrings, _configStringsSize); - - _soundFiles = _staticres->loadStrings(kAudioTracks, _soundFilesSize); - _soundFilesIntro = _staticres->loadStrings(kAudioTracksIntro, _soundFilesIntroSize); - _cdaTrackTable = (const int32*) _staticres->loadRawData(kKyra1TownsCDATable, _cdaTrackTableSize); + _seq_Forest = _staticres->loadRawData(k1ForestSeq, temp); + _seq_KallakWriting = _staticres->loadRawData(k1KallakWritingSeq, temp); + _seq_KyrandiaLogo = _staticres->loadRawData(k1KyrandiaLogoSeq, temp); + _seq_KallakMalcolm = _staticres->loadRawData(k1KallakMalcolmSeq, temp); + _seq_MalcolmTree = _staticres->loadRawData(k1MalcolmTreeSeq, temp); + _seq_WestwoodLogo = _staticres->loadRawData(k1WestwoodLogoSeq, temp); + _seq_Demo1 = _staticres->loadRawData(k1Demo1Seq, temp); + _seq_Demo2 = _staticres->loadRawData(k1Demo2Seq, temp); + _seq_Demo3 = _staticres->loadRawData(k1Demo3Seq, temp); + _seq_Demo4 = _staticres->loadRawData(k1Demo4Seq, temp); + _seq_Reunion = _staticres->loadRawData(k1OutroReunionSeq, temp); + + _seq_WSATable = _staticres->loadStrings(k1IntroWSAStrings, _seq_WSATable_Size); + _seq_CPSTable = _staticres->loadStrings(k1IntroCPSStrings, _seq_CPSTable_Size); + _seq_COLTable = _staticres->loadStrings(k1IntroCOLStrings, _seq_COLTable_Size); + _seq_textsTable = _staticres->loadStrings(k1IntroStrings, _seq_textsTable_Size); + + _itemList = _staticres->loadStrings(k1ItemNames, _itemList_Size); + _takenList = _staticres->loadStrings(k1TakenStrings, _takenList_Size); + _placedList = _staticres->loadStrings(k1PlacedStrings, _placedList_Size); + _droppedList = _staticres->loadStrings(k1DroppedStrings, _droppedList_Size); + _noDropList = _staticres->loadStrings(k1NoDropStrings, _noDropList_Size); + _putDownFirst = _staticres->loadStrings(k1PutDownString, _putDownFirst_Size); + _waitForAmulet = _staticres->loadStrings(k1WaitAmuletString, _waitForAmulet_Size); + _blackJewel = _staticres->loadStrings(k1BlackJewelString, _blackJewel_Size); + _poisonGone = _staticres->loadStrings(k1PoisonGoneString, _poisonGone_Size); + _healingTip = _staticres->loadStrings(k1HealingTipString, _healingTip_Size); + _thePoison = _staticres->loadStrings(k1ThePoisonStrings, _thePoison_Size); + _fluteString = _staticres->loadStrings(k1FluteStrings, _fluteString_Size); + _wispJewelStrings = _staticres->loadStrings(k1WispJewelStrings, _wispJewelStrings_Size); + _magicJewelString = _staticres->loadStrings(k1MagicJewelStrings, _magicJewelString_Size); + _flaskFull = _staticres->loadStrings(k1FlaskFullString, _flaskFull_Size); + _fullFlask = _staticres->loadStrings(k1FullFlaskString, _fullFlask_Size); + _veryClever = _staticres->loadStrings(k1VeryCleverString, _veryClever_Size); + _homeString = _staticres->loadStrings(k1OutroHomeString, _homeString_Size); + _newGameString = _staticres->loadStrings(k1NewGameString, _newGameString_Size); + + _healingShapeTable = _staticres->loadShapeTable(k1Healing1Shapes, _healingShapeTableSize); + _healingShape2Table = _staticres->loadShapeTable(k1Healing2Shapes, _healingShape2TableSize); + _posionDeathShapeTable = _staticres->loadShapeTable(k1PoisonDeathShapes, _posionDeathShapeTableSize); + _fluteAnimShapeTable = _staticres->loadShapeTable(k1FluteShapes, _fluteAnimShapeTableSize); + _winterScrollTable = _staticres->loadShapeTable(k1Winter1Shapes, _winterScrollTableSize); + _winterScroll1Table = _staticres->loadShapeTable(k1Winter2Shapes, _winterScroll1TableSize); + _winterScroll2Table = _staticres->loadShapeTable(k1Winter3Shapes, _winterScroll2TableSize); + _drinkAnimationTable = _staticres->loadShapeTable(k1DrinkShapes, _drinkAnimationTableSize); + _brandonToWispTable = _staticres->loadShapeTable(k1WispShapes, _brandonToWispTableSize); + _magicAnimationTable = _staticres->loadShapeTable(k1MagicAnimShapes, _magicAnimationTableSize); + _brandonStoneTable = _staticres->loadShapeTable(k1BranStoneShapes, _brandonStoneTableSize); + + _characterImageTable = _staticres->loadStrings(k1CharacterImageFilenames, _characterImageTableSize); + + _roomFilenameTable = _staticres->loadStrings(k1RoomFilenames, _roomFilenameTableSize); + + _amuleteAnim = _staticres->loadRawData(k1AmuleteAnimSeq, temp); + + _specialPalettes = _staticres->loadPaletteTable(k1PaletteList, temp); + + _guiStrings = _staticres->loadStrings(k1GUIStrings, _guiStringsSize); + _configStrings = _staticres->loadStrings(k1ConfigStrings, _configStringsSize); + + _soundFiles = _staticres->loadStrings(k1AudioTracks, _soundFilesSize); + _soundFilesIntro = _staticres->loadStrings(k1AudioTracksIntro, _soundFilesIntroSize); + _cdaTrackTable = (const int32*) _staticres->loadRawData(k1TownsCDATable, _cdaTrackTableSize); // copied static res // room list - const Room *tempRoomList = _staticres->loadRoomTable(kRoomList, _roomTableSize); + const Room *tempRoomList = _staticres->loadRoomTable(k1RoomList, _roomTableSize); if (_roomTableSize > 0) { _roomTable = new Room[_roomTableSize]; @@ -1021,11 +1021,11 @@ void KyraEngine_LoK::initStaticResource() { memcpy(_roomTable, tempRoomList, _roomTableSize*sizeof(Room)); tempRoomList = 0; - _staticres->unloadId(kRoomList); + _staticres->unloadId(k1RoomList); } // default shape table - const Shape *tempShapeTable = _staticres->loadShapeTable(kDefaultShapes, _defaultShapeTableSize); + const Shape *tempShapeTable = _staticres->loadShapeTable(k1DefaultShapes, _defaultShapeTableSize); if (_defaultShapeTableSize > 0) { _defaultShapeTable = new Shape[_defaultShapeTableSize]; @@ -1034,7 +1034,7 @@ void KyraEngine_LoK::initStaticResource() { memcpy(_defaultShapeTable, tempShapeTable, _defaultShapeTableSize*sizeof(Shape)); tempShapeTable = 0; - _staticres->unloadId(kDefaultShapes); + _staticres->unloadId(k1DefaultShapes); } // audio data tables -- cgit v1.2.3 From c3b1b9bf826c485c5bc00d3e12becfed385686bf Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 12 May 2008 16:10:13 +0000 Subject: Fixed timer resolution/conversion; now the vulture in the first scene of RtZ lands on the sign, and the thunder sound is in sync with the flash screen effect in the Infocom logo screen. svn-id: r32063 --- engines/made/made.cpp | 4 ++-- engines/made/made.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/made/made.cpp b/engines/made/made.cpp index ccb4ad5e8d..4ec857547b 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -135,14 +135,14 @@ int MadeEngine::init() { int16 MadeEngine::getTimer(int16 timerNum) { if (timerNum > 0 && timerNum <= ARRAYSIZE(_timers) && _timers[timerNum - 1] != -1) - return (_system->getMillis() - _timers[timerNum - 1]) / 60; + return (_system->getMillis() - _timers[timerNum - 1]) / kTimerResolution; else return 32000; } void MadeEngine::setTimer(int16 timerNum, int16 value) { if (timerNum > 0 && timerNum <= ARRAYSIZE(_timers)) - _timers[timerNum - 1] = value * 60; + _timers[timerNum - 1] = value * kTimerResolution; } void MadeEngine::resetTimer(int16 timerNum) { diff --git a/engines/made/made.h b/engines/made/made.h index f6f7fefd83..5491e8132f 100644 --- a/engines/made/made.h +++ b/engines/made/made.h @@ -60,6 +60,8 @@ enum MadeGameFeatures { GF_FLOPPY = 1 << 3 }; +const uint32 kTimerResolution = 40; + struct MadeGameDescription; class ProjectReader; -- cgit v1.2.3 From e27e54bd1f052958570fecddc2f341d57df3fde1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 12 May 2008 16:36:09 +0000 Subject: Updated kyra MSVC project files svn-id: r32064 --- dists/msvc7/kyra.vcproj | 3 +++ dists/msvc71/kyra.vcproj | 3 +++ dists/msvc8/kyra.vcproj | 4 ++++ dists/msvc9/kyra.vcproj | 4 ++++ 4 files changed, 14 insertions(+) diff --git a/dists/msvc7/kyra.vcproj b/dists/msvc7/kyra.vcproj index 3a0f50ba93..d547288d21 100644 --- a/dists/msvc7/kyra.vcproj +++ b/dists/msvc7/kyra.vcproj @@ -276,6 +276,9 @@ + + diff --git a/dists/msvc71/kyra.vcproj b/dists/msvc71/kyra.vcproj index eeeb44bd13..f37b1d85fc 100644 --- a/dists/msvc71/kyra.vcproj +++ b/dists/msvc71/kyra.vcproj @@ -290,6 +290,9 @@ + + diff --git a/dists/msvc8/kyra.vcproj b/dists/msvc8/kyra.vcproj index 1ed9378e27..c99abdc5bc 100644 --- a/dists/msvc8/kyra.vcproj +++ b/dists/msvc8/kyra.vcproj @@ -400,6 +400,10 @@ RelativePath="..\..\engines\kyra\script_tim.h" > + + diff --git a/dists/msvc9/kyra.vcproj b/dists/msvc9/kyra.vcproj index 2b4897ff76..f56a2733b5 100644 --- a/dists/msvc9/kyra.vcproj +++ b/dists/msvc9/kyra.vcproj @@ -401,6 +401,10 @@ RelativePath="..\..\engines\kyra\script_tim.h" > + + -- cgit v1.2.3 From de6e6408b6b393a8aac60a3e92e622a88fa925a8 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 12 May 2008 17:23:28 +0000 Subject: Fixed some valgrind warnings. svn-id: r32065 --- engines/kyra/kyra_mr.cpp | 3 ++- engines/kyra/screen.cpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 9503420f82..293804f4f0 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -147,6 +147,7 @@ KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngi _albumChatActive = false; memset(&_album, 0, sizeof(_album)); _configHelium = false; + _fadeOutMusicChannel = -1; } KyraEngine_MR::~KyraEngine_MR() { @@ -816,7 +817,7 @@ void KyraEngine_MR::loadCharacterShapes(int newShapes) { ShapeMap::iterator iter = _gameShapes.find(i); if (iter != _gameShapes.end()) { - delete iter->_value; + delete[] iter->_value; iter->_value = 0; } } diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 6e250f292a..8d18bc2e78 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -36,6 +36,7 @@ namespace Kyra { Screen::Screen(KyraEngine_v1 *vm, OSystem *system) : _system(system), _vm(vm), _sjisInvisibleColor(0) { _debugEnabled = false; + _maskMinY = _maskMaxY = -1; } Screen::~Screen() { -- cgit v1.2.3 From 11e65276747d26bc4f2b6b79e146f919b244bccd Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 12 May 2008 17:43:33 +0000 Subject: Implemented o1_ADDMASK and o1_SETMASK for LGOP2 svn-id: r32066 --- engines/made/screen.cpp | 69 +++++++++++++++++++++++++++++--------- engines/made/screen.h | 24 ++++++++----- engines/made/scriptfuncs_lgop2.cpp | 11 +++--- 3 files changed, 73 insertions(+), 31 deletions(-) diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index c88244a8a2..d9512af922 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -34,6 +34,7 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { _screen1 = new Graphics::Surface(); _screen1->create(320, 200, 1); + _screen2 = new Graphics::Surface(); _screen2->create(320, 200, 1); @@ -45,7 +46,16 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { _clipInfo1.destSurface = _screen1; _clipInfo2.destSurface = _screen2; _clipArea.destSurface = _screen2; - + + // FIXME: Screen mask is only needed in v2 games + _screenMask = new Graphics::Surface(); + _screenMask->create(320, 200, 1); + _maskDrawCtx.x = 0; + _maskDrawCtx.y = 0; + _maskDrawCtx.w = 320; + _maskDrawCtx.h = 200; + _maskDrawCtx.destSurface = _screenMask; + for (int i = 0; i <= 3; i++) _excludeClipAreaEnabled[i] = false; @@ -62,6 +72,7 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { _ground = 1; _clip = 0; _exclude = 0; + _mask = 0; _visualEffectNum = 0; @@ -86,17 +97,20 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { Screen::~Screen() { delete _screen1; delete _screen2; + delete _screenMask; } void Screen::clearScreen() { _screen1->fillRect(Common::Rect(0, 0, 320, 200), 0); _screen2->fillRect(Common::Rect(0, 0, 320, 200), 0); + _screenMask->fillRect(Common::Rect(0, 0, 320, 200), 0); + _mask = 0; _needPalette = true; } -void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 flipX, int16 flipY, const ClipInfo &clipInfo) { +void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 flipX, int16 flipY, int16 mask, const ClipInfo &clipInfo) { - byte *source, *dest; + byte *source, *dest, *maskp; int startX = 0; int startY = 0; int clipWidth = sourceSurface->w; @@ -124,6 +138,7 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f source = (byte*)sourceSurface->getBasePtr(startX, startY); dest = (byte*)clipInfo.destSurface->getBasePtr(x, y); + maskp = (byte*)_maskDrawCtx.destSurface->getBasePtr(x, y); int32 sourcePitch, linePtrAdd; byte *linePtr; @@ -148,12 +163,15 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f linePtr = source; } for (int16 xc = 0; xc < clipWidth; xc++) { - if (*linePtr) - dest[xc] = *linePtr; + if (*linePtr && (mask == 0 || maskp[xc] == 0)) { + if (*linePtr) + dest[xc] = *linePtr; + } linePtr += linePtrAdd; } source += sourcePitch; dest += clipInfo.destSurface->pitch; + maskp += _maskDrawCtx.destSurface->pitch; } } @@ -218,6 +236,12 @@ uint16 Screen::setChannelContent(uint16 channelIndex, uint16 index) { return updateChannel(channelIndex - 1) + 1; } +void Screen::setChannelUseMask(uint16 channelIndex) { + if (channelIndex < 1 || channelIndex >= 100) + return; + _channels[channelIndex - 1].mask = _mask; +} + void Screen::drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask, int16 excludeStateMask) { for (int i = 0; i <= 3; i++) @@ -239,15 +263,15 @@ void Screen::drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask case 1: // drawFlex if (_channels[i].state & 4) { - drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flipX, flipY, _clipArea); + drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flipX, flipY, _channels[i].mask, _clipArea); } else if (_channels[i].state & 8) { for (int excludeIndex = 0; excludeIndex < 4; excludeIndex++) { if (_excludeClipAreaEnabled[excludeIndex]) { - drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flipX, flipY, _excludeClipArea[excludeIndex]); + drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flipX, flipY, _channels[i].mask, _excludeClipArea[excludeIndex]); } } } else { - drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flipX, flipY, clipInfo); + drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flipX, flipY, _channels[i].mask, clipInfo); } break; @@ -300,11 +324,12 @@ void Screen::clearChannels() { for (uint16 i = 0; i < ARRAYSIZE(_channels); i++) { _channels[i].type = 0; _channels[i].index = 0; + _channels[i].mask = 0; } _channelsUsedCount = 0; } -uint16 Screen::drawFlex(uint16 flexIndex, int16 x, int16 y, int16 flipX, int16 flipY, const ClipInfo &clipInfo) { +uint16 Screen::drawFlex(uint16 flexIndex, int16 x, int16 y, int16 flipX, int16 flipY, int16 mask, const ClipInfo &clipInfo) { if (flexIndex == 0) return 0; @@ -312,7 +337,7 @@ uint16 Screen::drawFlex(uint16 flexIndex, int16 x, int16 y, int16 flipX, int16 f PictureResource *flex = _vm->_res->getPicture(flexIndex); Graphics::Surface *sourceSurface = flex->getPicture(); - drawSurface(sourceSurface, x, y, flipX, flipY, clipInfo); + drawSurface(sourceSurface, x, y, flipX, flipY, mask, clipInfo); // Palette is set in showPage if (flex->hasPalette() && !_paletteLock && _needPalette) { @@ -337,13 +362,18 @@ void Screen::drawAnimFrame(uint16 animIndex, int16 x, int16 y, int16 frameNum, i AnimationResource *anim = _vm->_res->getAnimation(animIndex); Graphics::Surface *sourceSurface = anim->getFrame(frameNum); - drawSurface(sourceSurface, x, y, flipX, flipY, clipInfo); + drawSurface(sourceSurface, x, y, flipX, flipY, 0, clipInfo); _vm->_res->freeResource(anim); } uint16 Screen::drawPic(uint16 index, int16 x, int16 y, int16 flipX, int16 flipY) { - drawFlex(index, x, y, flipX, flipY, _clipInfo1); + drawFlex(index, x, y, flipX, flipY, 0, _clipInfo1); + return 0; +} + +uint16 Screen::drawMask(uint16 index, int16 x, int16 y) { + drawFlex(index, x, y, 0, 0, 0, _maskDrawCtx); return 0; } @@ -354,7 +384,7 @@ uint16 Screen::drawAnimPic(uint16 animIndex, int16 x, int16 y, int16 frameNum, i void Screen::addSprite(uint16 spriteIndex) { bool oldScreenLock = _screenLock; - drawFlex(spriteIndex, 0, 0, 0, 0, _clipInfo1); + drawFlex(spriteIndex, 0, 0, 0, 0, 0, _clipInfo1); _screenLock = oldScreenLock; } @@ -566,11 +596,20 @@ void Screen::show() { memcpy(_screen2->pixels, _screen1->pixels, 64000); drawSpriteChannels(_clipInfo2, 1, 2); + if (_visualEffectNum != 0) { + warning("Unimplemented visual fx %d", _visualEffectNum); + } + // TODO: Implement visual effects (palette fading etc.) + if (!_paletteLock) setRGBPalette(_palette, 0, _paletteColorCount); _vm->_system->copyRectToScreen((const byte*)_screen2->pixels, _screen2->pitch, 0, 0, _screen2->w, _screen2->h); + + _vm->_system->updateScreen(); + + _visualEffectNum = 0; if (!_paletteInitialized) { memcpy(_newPalette, _palette, _paletteColorCount * 3); @@ -589,10 +628,10 @@ void Screen::flash(int flashCount) { while (flashCount--) { setRGBPalette(_fxPalette, 0, _paletteColorCount); _vm->_system->updateScreen(); - _vm->_system->delayMillis(30); + _vm->_system->delayMillis(20); setRGBPalette(_palette, 0, _paletteColorCount); _vm->_system->updateScreen(); - _vm->_system->delayMillis(30); + _vm->_system->delayMillis(20); } } diff --git a/engines/made/screen.h b/engines/made/screen.h index d46ad254f0..e1a92a9583 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -46,6 +46,7 @@ struct SpriteChannel { uint16 fontNum; int16 textColor, outlineColor; int16 frameNum; + int16 mask; }; struct ClipInfo { @@ -62,14 +63,14 @@ public: void clearScreen(); - void drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 flipX, int16 flipY, const ClipInfo &clipInfo); + void drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 flipX, int16 flipY, int16 mask, const ClipInfo &clipInfo); + void loadRGBPalette(byte *palRGB, int count = 256); void setRGBPalette(byte *palRGB, int start = 0, int count = 256); bool isPaletteLocked() { return _paletteLock; } void setScreenLock(bool lock) { _screenLock = lock; } void setPaletteLock(bool lock) { _paletteLock = lock; } void setVisualEffectNum(int visualEffectNum) { _visualEffectNum = visualEffectNum; } - void setClip(uint16 clip) { _clip = clip; } void setClipArea(uint16 x1, uint16 y1, uint16 x2, uint16 y2) { _clipArea.x = x1; @@ -78,8 +79,11 @@ public: _clipArea.h = ABS(y2 - y1); } - void setExclude(uint16 exclude) { _exclude = exclude; } - void setGround(uint16 ground) { _ground = ground; } + void setClip(int16 clip) { _clip = clip; } + void setExclude(int16 exclude) { _exclude = exclude; } + void setGround(int16 ground) { _ground = ground; } + void setMask(int16 mask) { _mask = mask; } + void setTextColor(int16 color) { _textColor = color; } void setTextRect(const Common::Rect &textRect) { @@ -114,14 +118,17 @@ public: void setChannelState(uint16 channelIndex, int16 state); uint16 setChannelLocation(uint16 channelIndex, int16 x, int16 y); uint16 setChannelContent(uint16 channelIndex, uint16 index); + void setChannelUseMask(uint16 channelIndex); void drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask, int16 excludeStateMask); void updateSprites(); void clearChannels(); - uint16 drawFlex(uint16 flexIndex, int16 x, int16 y, int16 flipX, int16 flipY, const ClipInfo &clipInfo); + uint16 drawFlex(uint16 flexIndex, int16 x, int16 y, int16 flipX, int16 flipY, int16 mask, const ClipInfo &clipInfo); void drawAnimFrame(uint16 animIndex, int16 x, int16 y, int16 frameNum, int16 flipX, int16 flipY, const ClipInfo &clipInfo); uint16 drawPic(uint16 index, int16 x, int16 y, int16 flipX, int16 flipY); + uint16 drawMask(uint16 index, int16 x, int16 y); + uint16 drawAnimPic(uint16 animIndex, int16 x, int16 y, int16 frameNum, int16 flipX, int16 flipY); void addSprite(uint16 spriteIndex); @@ -147,7 +154,6 @@ public: void printObjectText(int16 objectIndex, int16 x, int16 y, int16 fontNum, int16 textColor, int16 outlineColor, const ClipInfo &clipInfo); int16 getTextWidth(int16 fontNum, const char *text); - protected: MadeEngine *_vm; @@ -168,11 +174,11 @@ protected: FontResource *_font; ClipInfo _fontDrawCtx; - uint16 _clip, _exclude, _ground; + int16 _clip, _exclude, _ground, _mask; int _visualEffectNum; - Graphics::Surface *_screen1, *_screen2; - ClipInfo _clipArea, _clipInfo1, _clipInfo2; + Graphics::Surface *_screen1, *_screen2, *_screenMask; + ClipInfo _clipArea, _clipInfo1, _clipInfo2, _maskDrawCtx; ClipInfo _excludeClipArea[4]; bool _excludeClipAreaEnabled[4]; diff --git a/engines/made/scriptfuncs_lgop2.cpp b/engines/made/scriptfuncs_lgop2.cpp index ef3c2dffc4..14014873fa 100644 --- a/engines/made/scriptfuncs_lgop2.cpp +++ b/engines/made/scriptfuncs_lgop2.cpp @@ -312,8 +312,6 @@ int16 ScriptFunctionsLgop2::o1_SCREENLOCK(int16 argc, int16 *argv) { } int16 ScriptFunctionsLgop2::o1_ADDSPRITE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_ADDSPRITE"); - //_vm->_screen->drawSprite(argv[2], argv[1], argv[0]); return argv[2]; } @@ -323,7 +321,8 @@ int16 ScriptFunctionsLgop2::o1_FREEANIM(int16 argc, int16 *argv) { } int16 ScriptFunctionsLgop2::o1_DRAWSPRITE(int16 argc, int16 *argv) { - _vm->_screen->drawSprite(argv[2], argv[1], argv[0]); + int16 channel = _vm->_screen->drawSprite(argv[2], argv[1], argv[0]); + _vm->_screen->setChannelUseMask(channel); return 0; } @@ -439,14 +438,12 @@ int16 ScriptFunctionsLgop2::o1_RESTEXT(int16 argc, int16 *argv) { } int16 ScriptFunctionsLgop2::o1_ADDMASK(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_ADDMASK"); - //PictureResource *flex = _vm->_res->getPicture(flexIndex); - //Graphics::Surface *sourceSurface = flex->getPicture(); + _vm->_screen->drawMask(argv[2], argv[1], argv[0]); return 0; } int16 ScriptFunctionsLgop2::o1_SETMASK(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_SETMASK"); + _vm->_screen->setMask(argv[0]); return 0; } -- cgit v1.2.3 From 08c601ad9754b43da214218bfa0e6e5061cb30dd Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 12 May 2008 17:46:15 +0000 Subject: Yet another valgrind warning fixed. svn-id: r32067 --- engines/kyra/kyra_mr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 293804f4f0..c0c04cb370 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -148,6 +148,7 @@ KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngi memset(&_album, 0, sizeof(_album)); _configHelium = false; _fadeOutMusicChannel = -1; + memset(_scaleTable, 0, sizeof(_scaleTable)); } KyraEngine_MR::~KyraEngine_MR() { -- cgit v1.2.3 From 31a8d984a4b9ce4fc7906166fa8cbe91d52ee7b2 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 12 May 2008 17:48:56 +0000 Subject: Sanity checks in RtZ: o1_PLAYMUS and o1_STOPMUS svn-id: r32068 --- engines/made/scriptfuncs_rtz.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp index 4c55fe5182..424ec1cb5d 100644 --- a/engines/made/scriptfuncs_rtz.cpp +++ b/engines/made/scriptfuncs_rtz.cpp @@ -280,15 +280,17 @@ int16 ScriptFunctionsRtz::o1_PLAYMUS(int16 argc, int16 *argv) { int16 musicNum = argv[0]; if (musicNum > 0) { _xmidiRes = _vm->_res->getXmidi(musicNum); - _vm->_music->playXMIDI(_xmidiRes); + if (_xmidiRes) + _vm->_music->playXMIDI(_xmidiRes); } return 0; } int16 ScriptFunctionsRtz::o1_STOPMUS(int16 argc, int16 *argv) { - if (_vm->_music->isPlaying()) { + if (_vm->_music->isPlaying() && _xmidiRes) { _vm->_music->stop(); _vm->_res->freeResource(_xmidiRes); + _xmidiRes = NULL; } return 0; } -- cgit v1.2.3 From 13b60eeb32fa2ee42c2f38c940eb74ea8763e805 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 12 May 2008 19:29:14 +0000 Subject: Don't restart music while changing music volume in Hof and MR. svn-id: r32069 --- engines/kyra/gui_hof.cpp | 2 +- engines/kyra/gui_mr.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp index d983bce0d7..10f7f657a3 100644 --- a/engines/kyra/gui_hof.cpp +++ b/engines/kyra/gui_hof.cpp @@ -1129,7 +1129,7 @@ int GUI_HoF::sliderHandler(Button *caller) { if (playSoundEffect) _vm->snd_playSoundEffect(0x18); else if (lastMusicCommand >= 0) - _vm->snd_playWanderScoreViaMap(lastMusicCommand, 1); + _vm->snd_playWanderScoreViaMap(lastMusicCommand, 0); _screen->updateScreen(); return 0; diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp index 0384b3c138..6822b303c3 100644 --- a/engines/kyra/gui_mr.cpp +++ b/engines/kyra/gui_mr.cpp @@ -1673,7 +1673,7 @@ int GUI_MR::sliderHandler(Button *caller) { if (playSoundEffect) _vm->snd_playSoundEffect(0x18, 0xC8); else if (lastMusicCommand >= 0) - _vm->snd_playWanderScoreViaMap(lastMusicCommand, 1); + _vm->snd_playWanderScoreViaMap(lastMusicCommand, 0); _screen->updateScreen(); return 0; -- cgit v1.2.3 From 3e133f3a9fedbd597d88108853570dc08288cf26 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 12 May 2008 19:29:46 +0000 Subject: Fixed o1_DRAWTEXT in LGOP2 svn-id: r32070 --- engines/made/scriptfuncs_lgop2.cpp | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/engines/made/scriptfuncs_lgop2.cpp b/engines/made/scriptfuncs_lgop2.cpp index 14014873fa..73fbd7fb45 100644 --- a/engines/made/scriptfuncs_lgop2.cpp +++ b/engines/made/scriptfuncs_lgop2.cpp @@ -370,9 +370,32 @@ int16 ScriptFunctionsLgop2::o1_FONT(int16 argc, int16 *argv) { } int16 ScriptFunctionsLgop2::o1_DRAWTEXT(int16 argc, int16 *argv) { - // TODO: Needs vsprintf to get the correct text + const char *text = _vm->_dat->getString(argv[argc - 1]); - _vm->_screen->printText(text); + + char finalText[1024]; + switch (argc) { + case 1: + snprintf(finalText, 1024, "%s", text); + break; + case 2: + snprintf(finalText, 1024, text, argv[0]); + break; + case 3: + snprintf(finalText, 1024, text, argv[1], argv[0]); + break; + case 4: + snprintf(finalText, 1024, text, argv[2], argv[1], argv[0]); + break; + case 5: + snprintf(finalText, 1024, text, argv[3], argv[2], argv[1], argv[0]); + break; + default: + finalText[0] = '\0'; + break; + } + + _vm->_screen->printText(finalText); return 0; } -- cgit v1.2.3 From 9b911cadcdcc897a9e92cf1967d1b7fccf5f27dd Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 12 May 2008 20:14:07 +0000 Subject: Fixed printTextEx segment fault bug. svn-id: r32071 --- engines/made/screen.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index d9512af922..ac683f90ca 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -604,6 +604,7 @@ void Screen::show() { if (!_paletteLock) setRGBPalette(_palette, 0, _paletteColorCount); + _vm->_system->copyRectToScreen((const byte*)_screen2->pixels, _screen2->pitch, 0, 0, _screen2->w, _screen2->h); @@ -649,7 +650,7 @@ void Screen::printChar(uint c, int16 x, int16 y, byte color) { if (!_font) return; - int height = _font->getHeight(); + uint width = 8, height = _font->getHeight(); byte *charData = _font->getChar(c); if (!charData) @@ -657,10 +658,10 @@ void Screen::printChar(uint c, int16 x, int16 y, byte color) { byte p; byte *dest = (byte*)_fontDrawCtx.destSurface->getBasePtr(x, y); - + for (int16 yc = 0; yc < height; yc++) { p = charData[yc]; - for (int16 xc = 0; xc < 8; xc++) { + for (int16 xc = 0; xc < width; xc++) { if (p & 0x80) dest[xc] = color; p <<= 1; @@ -751,7 +752,7 @@ void Screen::printText(const char *text) { } void Screen::printTextEx(const char *text, int16 x, int16 y, int16 fontNum, int16 textColor, int16 outlineColor, const ClipInfo &clipInfo) { - if (*text == 0 || x == 0 || y == 0) + if (*text == 0 || x < 0 || y < 0) return; int16 oldFontNum = _currentFontNum; -- cgit v1.2.3 From f833cf4c610dc84ae7edb091cf1672e7d895412f Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 12 May 2008 20:17:54 +0000 Subject: Muting "comparing signed and unsigned values" compiler warning svn-id: r32072 --- engines/made/screen.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index ac683f90ca..371a0e4acd 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -659,9 +659,9 @@ void Screen::printChar(uint c, int16 x, int16 y, byte color) { byte p; byte *dest = (byte*)_fontDrawCtx.destSurface->getBasePtr(x, y); - for (int16 yc = 0; yc < height; yc++) { + for (uint16 yc = 0; yc < height; yc++) { p = charData[yc]; - for (int16 xc = 0; xc < width; xc++) { + for (uint16 xc = 0; xc < width; xc++) { if (p & 0x80) dest[xc] = color; p <<= 1; -- cgit v1.2.3 From 51352c71c5d72400973827d4db09fdbc56ebcefc Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 12 May 2008 21:03:26 +0000 Subject: Proper fix for savestates. Thanks to next_ghost svn-id: r32073 --- engines/cine/anim.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp index 8a14f677c3..6edc714da7 100644 --- a/engines/cine/anim.cpp +++ b/engines/cine/anim.cpp @@ -380,8 +380,8 @@ void AnimData::save(Common::OutSaveFile &fHandle) const { fHandle.writeUint16BE(_var1); fHandle.writeUint16BE(_bpp); fHandle.writeUint16BE(_height); - fHandle.writeUint32BE(0); // _data - fHandle.writeUint32BE(0); // _mask + fHandle.writeUint32BE(_data != NULL); // _data + fHandle.writeUint32BE(_mask != NULL); // _mask fHandle.writeUint16BE(_fileIdx); fHandle.writeUint16BE(_frameIdx); fHandle.write(_name, sizeof(_name)); -- cgit v1.2.3 From f54036b6a45ca172512d409439ccbab8ef87433d Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 12 May 2008 21:47:38 +0000 Subject: Implemented o1_EXCLUDEAREA for RtZ svn-id: r32074 --- engines/made/screen.cpp | 66 +++++++++++++++++++++++++++++++++++----- engines/made/screen.h | 3 ++ engines/made/scriptfuncs_rtz.cpp | 7 +++-- 3 files changed, 66 insertions(+), 10 deletions(-) diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 371a0e4acd..1ec57db313 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -108,6 +108,56 @@ void Screen::clearScreen() { _needPalette = true; } +void Screen::setExcludeArea(uint16 x1, uint16 y1, uint16 x2, uint16 y2) { + + _excludeClipAreaEnabled[0] = false; + _excludeClipAreaEnabled[1] = false; + _excludeClipAreaEnabled[2] = false; + _excludeClipAreaEnabled[3] = false; + + if (x1 == 0 && y1 == 0 && x2 == 0 && y2 == 0) { + _excludeClipArea[0].x = 0; + _excludeClipArea[0].y = 0; + _excludeClipArea[0].w = 320; + _excludeClipArea[0].h = 200; + _excludeClipAreaEnabled[0] = true; + return; + } + + if (y1 > 0 && y2 > 0) { + _excludeClipArea[0].x = 0; + _excludeClipArea[0].y = 0; + _excludeClipArea[0].w = 320; + _excludeClipArea[0].h = y1; + _excludeClipAreaEnabled[0] = true; + } + + if (y1 < 200 && y2 < 200) { + _excludeClipArea[1].x = 0; + _excludeClipArea[1].y = y2; + _excludeClipArea[1].w = 320; + _excludeClipArea[1].h = 200 - y2; + _excludeClipAreaEnabled[1] = true; + } + + if (x1 > 0 && x2 > 0) { + _excludeClipArea[2].x = 0; + _excludeClipArea[2].y = y1; + _excludeClipArea[2].w = x1; + _excludeClipArea[2].h = y2 - y1; + _excludeClipAreaEnabled[2] = true; + } + + if (x1 < 320 && x2 < 320) { + _excludeClipArea[3].x = x2; + _excludeClipArea[3].y = y1; + _excludeClipArea[3].w = 320 - x2; + _excludeClipArea[3].h = y2 - y1; + _excludeClipAreaEnabled[3] = true; + } + +} + void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 flipX, int16 flipY, int16 mask, const ClipInfo &clipInfo) { byte *source, *dest, *maskp; @@ -116,16 +166,16 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f int clipWidth = sourceSurface->w; int clipHeight = sourceSurface->h; - if (x < 0) { - startX = -x; + if (x < clipInfo.x) { + startX = clipInfo.x - x; clipWidth -= startX; - x = 0; + x = clipInfo.x; } - if (y < 0) { - startY = -y; + if (y < clipInfo.y) { + startY = clipInfo.y - y; clipHeight -= startY; - y = 0; + y = clipInfo.y; } if (x + clipWidth > clipInfo.x + clipInfo.w) { @@ -659,9 +709,9 @@ void Screen::printChar(uint c, int16 x, int16 y, byte color) { byte p; byte *dest = (byte*)_fontDrawCtx.destSurface->getBasePtr(x, y); - for (uint16 yc = 0; yc < height; yc++) { + for (uint yc = 0; yc < height; yc++) { p = charData[yc]; - for (uint16 xc = 0; xc < width; xc++) { + for (uint xc = 0; xc < width; xc++) { if (p & 0x80) dest[xc] = color; p <<= 1; diff --git a/engines/made/screen.h b/engines/made/screen.h index e1a92a9583..e549e86eee 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -79,6 +79,8 @@ public: _clipArea.h = ABS(y2 - y1); } + void setExcludeArea(uint16 x1, uint16 y1, uint16 x2, uint16 y2); + void setClip(int16 clip) { _clip = clip; } void setExclude(int16 exclude) { _exclude = exclude; } void setGround(int16 ground) { _ground = ground; } @@ -185,6 +187,7 @@ protected: uint16 _channelsUsedCount; SpriteChannel _channels[100]; + }; } // End of namespace Made diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp index 424ec1cb5d..cbfe9ce5b3 100644 --- a/engines/made/scriptfuncs_rtz.cpp +++ b/engines/made/scriptfuncs_rtz.cpp @@ -658,7 +658,7 @@ int16 ScriptFunctionsRtz::o1_SETCONTENT(int16 argc, int16 *argv) { } int16 ScriptFunctionsRtz::o1_EXCLUDEAREA(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_EXCLUDEAREA"); + _vm->_screen->setExcludeArea(argv[3], argv[2], argv[1], argv[0]); return 0; } @@ -857,7 +857,10 @@ int16 ScriptFunctionsRtz::o1_WHATSYNTH(int16 argc, int16 *argv) { } int16 ScriptFunctionsRtz::o1_SLOWSYSTEM(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_SLOWSYSTEM"); + //warning("Unimplemented opcode: o1_SLOWSYSTEM"); + // NOTE: In the original engine this value is set via a command-line parameter + // I don't think it's needed here + // One could maybe think about returning 1 here on actually slower systems. return 0; } -- cgit v1.2.3 From c630fbde6a26f196c66c929faead8cc3403d0c99 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Mon, 12 May 2008 21:52:44 +0000 Subject: fix valgrind warning and some cleanup svn-id: r32075 --- dists/engine-data/kyra.dat | Bin 232687 -> 231823 bytes engines/kyra/sequences_hof.cpp | 4 +++- engines/kyra/sound_towns.cpp | 5 +---- engines/kyra/staticres.cpp | 10 ++++++---- tools/create_kyradat/create_kyradat.cpp | 7 ++++--- tools/create_kyradat/create_kyradat.h | 2 ++ tools/create_kyradat/hof_towns.h | 2 +- tools/create_kyradat/misc.h | 2 +- 8 files changed, 18 insertions(+), 14 deletions(-) diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat index 7706b1a9dc..c1504ebba8 100644 Binary files a/dists/engine-data/kyra.dat and b/dists/engine-data/kyra.dat differ diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index 23b6da2314..3e9f6030ac 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -284,8 +284,10 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { seq_sequenceCommand(cseq.finalCommand); seq_resetAllTextEntries(); - if (_abortIntroFlag || skipFlag()) + if (_abortIntroFlag || skipFlag()) { _sound->haltTrack(); + _sound->voiceStop(); + } if (_flags.isDemo && !_flags.isTalkie) { if (seqNum == kSequenceDemoFisher) { diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index 9efdee6c2a..513f523194 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -1443,10 +1443,7 @@ bool SoundTowns_v2::voicePlay(const char *file, bool) { } char filename [13]; - if (scumm_stricmp(file + strlen(file) - 4, ".PCM")) - sprintf(filename, "%s.PCM", file); - else - strcpy(filename, file); + sprintf(filename, "%s.PCM", file); uint8 * data = _vm->resource()->fileData(filename, 0); uint8 * src = data; diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index a03fa82a39..3904ae550f 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -44,7 +44,7 @@ namespace Kyra { -#define RESFILE_VERSION 26 +#define RESFILE_VERSION 27 bool StaticResource::checkKyraDat() { Common::File kyraDat; @@ -1226,10 +1226,12 @@ void KyraEngine_HoF::initStaticResource() { tmpSndLst[i] = new char[len + 1]; tmpSndLst[i][0] = 0; - if (tlkfiles) { + if (tlkfiles && strlen(seqSoundList[i])) { for (int ii = 0; ii < tmpSize; ii++) { - if (!scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1])) - strcpy(tmpSndLst[i], tlkfiles[ii]); + if (strlen(seqSoundList[i])) { + if (!scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1])) + strcpy(tmpSndLst[i], tlkfiles[ii]); + } } } diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index e49b5672b4..abd1d54570 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -31,7 +31,7 @@ #include "md5.h" enum { - kKyraDatVersion = 26, + kKyraDatVersion = 27, kIndexSize = 12 }; @@ -87,8 +87,8 @@ const ExtractType extractTypeTable[] = { { k2TypeSeqData, extractHofSeqData, createFilename }, { k2TypeShpDataV1, extractHofShapeAnimDataV1, createFilename }, { k2TypeShpDataV2, extractHofShapeAnimDataV2, createFilename }, - { k2TypeSoundList, extractStringsWoSuffix, createFilename }, + { k2TypeLangSoundList, extractStringsWoSuffix, createLangFilename }, { k2TypeSfxList, extractPaddedStrings, createFilename }, { k3TypeRaw16to8, extractRaw16to8, createFilename }, { k3TypeShpData, extractMrShapeAnimData, createFilename }, @@ -219,7 +219,7 @@ const ExtractFilename extractFilenames[] = { { k2SeqplayCreditsSpecial, kTypeStringList, "S_CREDITS2.TXT" }, { k2SeqplayStrings, kTypeLanguageList, "S_STRINGS" }, { k2SeqplaySfxFiles, k2TypeSoundList, "S_SFXFILES.TXT" }, - { k2SeqplayTlkFiles, kTypeLanguageList, "S_TLKFILES" }, + { k2SeqplayTlkFiles, k2TypeLangSoundList, "S_TLKFILES" }, { k2SeqplaySeqData, k2TypeSeqData, "S_DATA.SEQ" }, { k2SeqplayIntroTracks, kTypeStringList, "S_INTRO.TRA" }, { k2SeqplayFinaleTracks, kTypeStringList, "S_FINALE.TRA" }, @@ -230,6 +230,7 @@ const ExtractFilename extractFilenames[] = { // Ingame { k2IngamePakFiles, kTypeStringList, "I_PAKFILES.TXT" }, { k2IngameSfxFiles, kTypeStringList, "I_SFXFILES.TRA" }, + { k2IngameSfxFilesTns, k2TypeSoundList, "I_SFXFILES.TRA" }, { k2IngameSfxIndex, kTypeRawData, "I_SFXINDEX.MAP" }, { k2IngameTracks, kTypeStringList, "I_TRACKS.TRA" }, { k2IngameCDA, kTypeRawData, "I_TRACKS.CDA" }, diff --git a/tools/create_kyradat/create_kyradat.h b/tools/create_kyradat/create_kyradat.h index 62cfbc3374..c8bcb7d583 100644 --- a/tools/create_kyradat/create_kyradat.h +++ b/tools/create_kyradat/create_kyradat.h @@ -156,6 +156,7 @@ enum kExtractID { k2IngamePakFiles, k2IngameSfxFiles, + k2IngameSfxFilesTns, k2IngameSfxIndex, k2IngameTracks, k2IngameCDA, @@ -257,6 +258,7 @@ enum kExtractType { k2TypeShpDataV1, k2TypeShpDataV2, k2TypeSoundList, + k2TypeLangSoundList, k2TypeSfxList, k3TypeRaw16to8, diff --git a/tools/create_kyradat/hof_towns.h b/tools/create_kyradat/hof_towns.h index bff2b35673..f2dd82d431 100644 --- a/tools/create_kyradat/hof_towns.h +++ b/tools/create_kyradat/hof_towns.h @@ -15,7 +15,7 @@ const ExtractEntry kyra2File1FMTownsJ[] = { const ExtractEntry kyra2File2FMTownsE[] = { { k2IngamePakFiles, 0x00000540, 0x0000065C }, - { k2IngameSfxFiles, 0x00003E3C, 0x000047A3 }, + { k2IngameSfxFilesTns, 0x00003E3C, 0x000047A3 }, { k2IngameSfxIndex, 0x00013980, 0x00013CD8 }, { k2IngameCDA, 0x0001808C, 0x000181BC }, { k2IngameTalkObjIndex, 0x000199B6, 0x00019A30 }, diff --git a/tools/create_kyradat/misc.h b/tools/create_kyradat/misc.h index 194624acba..1e1cd29cc9 100644 --- a/tools/create_kyradat/misc.h +++ b/tools/create_kyradat/misc.h @@ -433,7 +433,7 @@ const int kyra2TownsFile1JapNeed[] = { const int kyra2TownsFile2EngNeed[] = { k2IngamePakFiles, - k2IngameSfxFiles, + k2IngameSfxFilesTns, k2IngameSfxIndex, k2IngameCDA, k2IngameTalkObjIndex, -- cgit v1.2.3 From 6b5709be142f48a124d86e6af80ff31a4c404fc7 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Mon, 12 May 2008 22:13:33 +0000 Subject: remove useless double check on sound list entries svn-id: r32076 --- engines/kyra/staticres.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 3904ae550f..36703aafba 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -1226,12 +1226,10 @@ void KyraEngine_HoF::initStaticResource() { tmpSndLst[i] = new char[len + 1]; tmpSndLst[i][0] = 0; - if (tlkfiles && strlen(seqSoundList[i])) { + if (tlkfiles && len > 1) { for (int ii = 0; ii < tmpSize; ii++) { - if (strlen(seqSoundList[i])) { - if (!scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1])) + if (!scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1])) strcpy(tmpSndLst[i], tlkfiles[ii]); - } } } -- cgit v1.2.3 From 16ac1bcebf790effb6dc87636bfbdfce12f1a01b Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 12 May 2008 22:28:52 +0000 Subject: Changed clipping rectangles to use Common::Rect (thanks to [md5]/thebluegr) svn-id: r32077 --- engines/made/screen.cpp | 61 +++++++++++++++---------------------------------- engines/made/screen.h | 10 ++++---- 2 files changed, 23 insertions(+), 48 deletions(-) diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 1ec57db313..974dc4b132 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -38,10 +38,8 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { _screen2 = new Graphics::Surface(); _screen2->create(320, 200, 1); - _clipInfo1.x = _clipInfo2.x = 0; - _clipInfo1.y = _clipInfo2.y = 0; - _clipInfo1.w = _clipInfo2.w = 320; - _clipInfo1.h = _clipInfo2.h = 200; + _clipInfo1.clipRect = Common::Rect(320, 200); + _clipInfo2.clipRect = Common::Rect(320, 200); _clipInfo1.destSurface = _screen1; _clipInfo2.destSurface = _screen2; @@ -50,10 +48,7 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { // FIXME: Screen mask is only needed in v2 games _screenMask = new Graphics::Surface(); _screenMask->create(320, 200, 1); - _maskDrawCtx.x = 0; - _maskDrawCtx.y = 0; - _maskDrawCtx.w = 320; - _maskDrawCtx.h = 200; + _maskDrawCtx.clipRect = Common::Rect(320, 200); _maskDrawCtx.destSurface = _screenMask; for (int i = 0; i <= 3; i++) @@ -85,10 +80,7 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { _textRect.bottom = 200; _font = NULL; _currentFontNum = 0; - _fontDrawCtx.x = 0; - _fontDrawCtx.y = 0; - _fontDrawCtx.w = 320; - _fontDrawCtx.h = 200; + _fontDrawCtx.clipRect = Common::Rect(320, 200); _fontDrawCtx.destSurface = _screen1; clearChannels(); @@ -116,43 +108,28 @@ void Screen::setExcludeArea(uint16 x1, uint16 y1, uint16 x2, uint16 y2) { _excludeClipAreaEnabled[3] = false; if (x1 == 0 && y1 == 0 && x2 == 0 && y2 == 0) { - _excludeClipArea[0].x = 0; - _excludeClipArea[0].y = 0; - _excludeClipArea[0].w = 320; - _excludeClipArea[0].h = 200; + _excludeClipArea[0].clipRect = Common::Rect(320, 200); _excludeClipAreaEnabled[0] = true; return; } if (y1 > 0 && y2 > 0) { - _excludeClipArea[0].x = 0; - _excludeClipArea[0].y = 0; - _excludeClipArea[0].w = 320; - _excludeClipArea[0].h = y1; + _excludeClipArea[0].clipRect = Common::Rect(320, y1); _excludeClipAreaEnabled[0] = true; } if (y1 < 200 && y2 < 200) { - _excludeClipArea[1].x = 0; - _excludeClipArea[1].y = y2; - _excludeClipArea[1].w = 320; - _excludeClipArea[1].h = 200 - y2; + _excludeClipArea[1].clipRect = Common::Rect(0, y2, 320, 200); _excludeClipAreaEnabled[1] = true; } if (x1 > 0 && x2 > 0) { - _excludeClipArea[2].x = 0; - _excludeClipArea[2].y = y1; - _excludeClipArea[2].w = x1; - _excludeClipArea[2].h = y2 - y1; + _excludeClipArea[2].clipRect = Common::Rect(0, y1, x1, y2); _excludeClipAreaEnabled[2] = true; } if (x1 < 320 && x2 < 320) { - _excludeClipArea[3].x = x2; - _excludeClipArea[3].y = y1; - _excludeClipArea[3].w = 320 - x2; - _excludeClipArea[3].h = y2 - y1; + _excludeClipArea[3].clipRect = Common::Rect(x2, y1, 320, y2); _excludeClipAreaEnabled[3] = true; } @@ -166,24 +143,24 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f int clipWidth = sourceSurface->w; int clipHeight = sourceSurface->h; - if (x < clipInfo.x) { - startX = clipInfo.x - x; + if (x < clipInfo.clipRect.left) { + startX = clipInfo.clipRect.left - x; clipWidth -= startX; - x = clipInfo.x; + x = clipInfo.clipRect.left; } - if (y < clipInfo.y) { - startY = clipInfo.y - y; + if (y < clipInfo.clipRect.top) { + startY = clipInfo.clipRect.top - y; clipHeight -= startY; - y = clipInfo.y; + y = clipInfo.clipRect.top; } - if (x + clipWidth > clipInfo.x + clipInfo.w) { - clipWidth = clipInfo.x + clipInfo.w - x; + if (x + clipWidth > clipInfo.clipRect.right) { + clipWidth = clipInfo.clipRect.right - x; } - if (y + clipHeight > clipInfo.y + clipInfo.h) { - clipHeight = clipInfo.y + clipInfo.h - y; + if (y + clipHeight > clipInfo.clipRect.bottom) { + clipHeight = clipInfo.clipRect.bottom - y; } source = (byte*)sourceSurface->getBasePtr(startX, startY); diff --git a/engines/made/screen.h b/engines/made/screen.h index e549e86eee..beacd0dfa5 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -28,6 +28,7 @@ #include "common/endian.h" #include "common/util.h" +#include "common/rect.h" #include "graphics/surface.h" @@ -50,7 +51,7 @@ struct SpriteChannel { }; struct ClipInfo { - uint16 x, y, w, h; + Common::Rect clipRect; Graphics::Surface *destSurface; }; @@ -72,11 +73,8 @@ public: void setPaletteLock(bool lock) { _paletteLock = lock; } void setVisualEffectNum(int visualEffectNum) { _visualEffectNum = visualEffectNum; } - void setClipArea(uint16 x1, uint16 y1, uint16 x2, uint16 y2) { - _clipArea.x = x1; - _clipArea.y = y1; - _clipArea.w = ABS(x2 - x1); - _clipArea.h = ABS(y2 - y1); + void setClipArea(uint16 x1, uint16 y1, uint16 x2, uint16 y2) { + _clipArea.clipRect = Common::Rect(x1, y1, x2, y2); } void setExcludeArea(uint16 x1, uint16 y1, uint16 x2, uint16 y2); -- cgit v1.2.3 From e99c9048a8feb8f8bf5cf4406eff23ddc0b945ee Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 12 May 2008 22:37:21 +0000 Subject: Formatting. svn-id: r32078 --- engines/kyra/staticres.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 36703aafba..7ba19e9966 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -1679,19 +1679,15 @@ void GUI_HoF::initStaticData() { GUI_V2_BUTTON(_scrollUpButton, 0x17, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x18, 0x0F, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0); GUI_V2_BUTTON(_scrollDownButton, 0x18, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x18, 0x0F, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0); - for (int i = 0; i < 4; ++i) { + for (int i = 0; i < 4; ++i) GUI_V2_BUTTON(_sliderButtons[0][i], 0x18+i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x0A, 0x0E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0); - } - for (int i = 0; i < 4; ++i) { + for (int i = 0; i < 4; ++i) GUI_V2_BUTTON(_sliderButtons[1][i], 0x1C+i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x0A, 0x0E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0); - } - for (int i = 0; i < 4; ++i) { + for (int i = 0; i < 4; ++i) GUI_V2_BUTTON(_sliderButtons[2][i], 0x20+i, 0, 0, 0, 0, 0, 0x2200, 0, 0, 0, 0x6E, 0x0E, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0); - } - for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i) { + for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i) GUI_V2_BUTTON(_menuButtons[i], 0x10+i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0, 0, 0xC7, 0xCF, 0xC7, 0xCF, 0xC7, 0xCF, 0); - } Button::Callback clickLoadSlotFunctor = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::clickLoadSlot); Button::Callback clickSaveSlotFunctor = BUTTON_FUNCTOR(GUI_HoF, this, &GUI_HoF::clickSaveSlot); @@ -2082,19 +2078,15 @@ void GUI_MR::initStaticData() { GUI_V2_BUTTON(_scrollUpButton, 22, 0, 0, 4, 4, 4, 0x4487, 0, 0, 0, 0x18, 0x0F, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0); GUI_V2_BUTTON(_scrollDownButton, 23, 0, 0, 4, 4, 4, 0x4487, 0, 0, 0, 0x18, 0x0F, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0); - for (int i = 0; i < 4; ++i) { + for (int i = 0; i < 4; ++i) GUI_V2_BUTTON(_sliderButtons[0][i], 0x18+i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x0A, 0x0E, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0); - } - for (int i = 0; i < 4; ++i) { + for (int i = 0; i < 4; ++i) GUI_V2_BUTTON(_sliderButtons[1][i], 0x1C+i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0x0A, 0x0E, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0); - } - for (int i = 0; i < 4; ++i) { + for (int i = 0; i < 4; ++i) GUI_V2_BUTTON(_sliderButtons[2][i], 0x20+i, 0, 0, 0, 0, 0, 0x2200, 0, 0, 0, 0x6E, 0x0E, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0); - } - for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i) { + for (uint i = 0; i < ARRAYSIZE(_menuButtons); ++i) GUI_V2_BUTTON(_menuButtons[i], 0x0F+i, 0, 0, 1, 1, 1, 0x4487, 0, 0, 0, 0, 0, 0xFF, 0xF0, 0xFF, 0xF0, 0xFF, 0xF0, 0); - } Button::Callback clickLoadSlotFunctor = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::clickLoadSlot); Button::Callback clickSaveSlotFunctor = BUTTON_FUNCTOR(GUI_MR, this, &GUI_MR::clickSaveSlot); -- cgit v1.2.3 From 83987b0cfdebd7fee6d2d20a70089abb6f9ddc63 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 13 May 2008 04:54:58 +0000 Subject: Implemented/Fixed saving/loading in Woodruff -- this time for real. svn-id: r32079 --- engines/gob/saveload.h | 15 ++-- engines/gob/saveload_v4.cpp | 168 ++++++++++++++++++++++++++++++++++++-------- 2 files changed, 148 insertions(+), 35 deletions(-) diff --git a/engines/gob/saveload.h b/engines/gob/saveload.h index 9581b43a6c..6c5ffe3bbe 100644 --- a/engines/gob/saveload.h +++ b/engines/gob/saveload.h @@ -335,8 +335,9 @@ class SaveLoad_v4 : public SaveLoad { public: enum SaveType { kSaveNone, + kSaveScreenProps, kSaveGame, - kSaveTempBuffer + kSaveGameScreenProps }; bool _firstSizeGame; @@ -358,13 +359,14 @@ protected: int32 _varSize; - PagedBuffer _tmpBuffer; StagedSave _save; byte _propBuffer[1000]; byte _indexBuffer[1200]; bool _hasIndex; + byte *_screenProps; + virtual int getSaveType(const char *fileName); virtual int32 getSizeVersioned(int type); @@ -374,14 +376,17 @@ protected: int getSlot(int32 offset) const; int getSlotRemainder(int32 offset) const; + int32 getSizeScreenProps(SaveFile &saveFile); int32 getSizeGame(SaveFile &saveFile); - int32 getSizeTempBuffer(SaveFile &saveFile); + int32 getSizeGameScreenProps(SaveFile &saveFile); + bool loadScreenProps(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); bool loadGame(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); - bool loadTempBuffer(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool loadGameScreenProps(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool saveScreenProps(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); bool saveGame(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); - bool saveTempBuffer(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); + bool saveGameScreenProps(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset); void assertInited(); }; diff --git a/engines/gob/saveload_v4.cpp b/engines/gob/saveload_v4.cpp index a770f03c00..9b46bb26ac 100644 --- a/engines/gob/saveload_v4.cpp +++ b/engines/gob/saveload_v4.cpp @@ -33,8 +33,18 @@ namespace Gob { SaveLoad_v4::SaveFile SaveLoad_v4::_saveFiles[] = { - { "cat.inf", 0, kSaveModeSave, kSaveGame }, - { "save.tmp", 0, kSaveModeSave, kSaveTempBuffer } + { "save.tmp", 0, kSaveModeSave, kSaveScreenProps }, + { "cat.inf", 0, kSaveModeSave, kSaveGame }, + { "save0.tmp", 0, kSaveModeSave, kSaveGameScreenProps }, + { "save1.tmp", 0, kSaveModeSave, kSaveGameScreenProps }, + { "save2.tmp", 0, kSaveModeSave, kSaveGameScreenProps }, + { "save3.tmp", 0, kSaveModeSave, kSaveGameScreenProps }, + { "save4.tmp", 0, kSaveModeSave, kSaveGameScreenProps }, + { "save5.tmp", 0, kSaveModeSave, kSaveGameScreenProps }, + { "save6.tmp", 0, kSaveModeSave, kSaveGameScreenProps }, + { "save7.tmp", 0, kSaveModeSave, kSaveGameScreenProps }, + { "save8.tmp", 0, kSaveModeSave, kSaveGameScreenProps }, + { "save9.tmp", 0, kSaveModeSave, kSaveGameScreenProps } }; SaveLoad_v4::SaveLoad_v4(GobEngine *vm, const char *targetName) : @@ -42,18 +52,32 @@ SaveLoad_v4::SaveLoad_v4(GobEngine *vm, const char *targetName) : _firstSizeGame = true; - _saveFiles[0].destName = new char[strlen(targetName) + 5]; - _saveFiles[1].destName = 0; - - sprintf(_saveFiles[0].destName, "%s.s00", targetName); + _saveFiles[0].destName = 0; + _saveFiles[1].destName = new char[strlen(targetName) + 5]; + _saveFiles[2].destName = _saveFiles[1].destName; + _saveFiles[3].destName = _saveFiles[1].destName; + _saveFiles[4].destName = _saveFiles[1].destName; + _saveFiles[5].destName = _saveFiles[1].destName; + _saveFiles[6].destName = _saveFiles[1].destName; + _saveFiles[7].destName = _saveFiles[1].destName; + _saveFiles[8].destName = _saveFiles[1].destName; + _saveFiles[9].destName = _saveFiles[1].destName; + _saveFiles[10].destName = _saveFiles[1].destName; + _saveFiles[11].destName = _saveFiles[1].destName; + + sprintf(_saveFiles[1].destName, "%s.s00", targetName); _varSize = 0; _hasIndex = false; memset(_propBuffer, 0, 1000); + + _screenProps = new byte[512000]; + memset(_screenProps, 0, 512000); } SaveLoad_v4::~SaveLoad_v4() { - delete[] _saveFiles[0].destName; + delete[] _screenProps; + delete[] _saveFiles[1].destName; } SaveLoad::SaveMode SaveLoad_v4::getSaveMode(const char *fileName) { @@ -78,10 +102,12 @@ int32 SaveLoad_v4::getSizeVersioned(int type) { assertInited(); switch (_saveFiles[type].type) { + case kSaveScreenProps: + return getSizeScreenProps(_saveFiles[type]); case kSaveGame: return getSizeGame(_saveFiles[type]); - case kSaveTempBuffer: - return getSizeTempBuffer(_saveFiles[type]); + case kSaveGameScreenProps: + return getSizeGameScreenProps(_saveFiles[type]); default: break; } @@ -93,6 +119,13 @@ bool SaveLoad_v4::loadVersioned(int type, int16 dataVar, int32 size, int32 offse assertInited(); switch (_saveFiles[type].type) { + case kSaveScreenProps: + if (loadScreenProps(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While loading screen properties"); + break; + case kSaveGame: if (loadGame(_saveFiles[type], dataVar, size, offset)) return true; @@ -100,11 +133,11 @@ bool SaveLoad_v4::loadVersioned(int type, int16 dataVar, int32 size, int32 offse warning("While loading from slot %d", getSlot(offset)); break; - case kSaveTempBuffer: - if (loadTempBuffer(_saveFiles[type], dataVar, size, offset)) + case kSaveGameScreenProps: + if (loadGameScreenProps(_saveFiles[type], dataVar, size, offset)) return true; - warning("While loading from the tempBuffer"); + warning("While loading screen properties from slot %d", getSlot(offset)); break; default: @@ -118,6 +151,13 @@ bool SaveLoad_v4::saveVersioned(int type, int16 dataVar, int32 size, int32 offse assertInited(); switch (_saveFiles[type].type) { + case kSaveScreenProps: + if (saveScreenProps(_saveFiles[type], dataVar, size, offset)) + return true; + + warning("While saving screen properties"); + break; + case kSaveGame: if (saveGame(_saveFiles[type], dataVar, size, offset)) return true; @@ -125,11 +165,11 @@ bool SaveLoad_v4::saveVersioned(int type, int16 dataVar, int32 size, int32 offse warning("While saving to slot %d", getSlot(offset)); break; - case kSaveTempBuffer: - if (saveTempBuffer(_saveFiles[type], dataVar, size, offset)) + case kSaveGameScreenProps: + if (saveGameScreenProps(_saveFiles[type], dataVar, size, offset)) return true; - warning("While saving to the tempBuffer"); + warning("While saving screen properties to slot %d", getSlot(offset)); break; default: @@ -147,6 +187,10 @@ int SaveLoad_v4::getSlotRemainder(int32 offset) const { return ((offset - 1700) % _varSize); } +int32 SaveLoad_v4::getSizeScreenProps(SaveFile &saveFile) { + return 256000; +} + int32 SaveLoad_v4::getSizeGame(SaveFile &saveFile) { if (_firstSizeGame) { _firstSizeGame = false; @@ -169,8 +213,44 @@ int32 SaveLoad_v4::getSizeGame(SaveFile &saveFile) { return size; } -int32 SaveLoad_v4::getSizeTempBuffer(SaveFile &saveFile) { - return _tmpBuffer.getSize(); +int32 SaveLoad_v4::getSizeGameScreenProps(SaveFile &saveFile) { + return -1; + + Common::SaveFileManager *saveMan = g_system->getSavefileManager(); + Common::InSaveFile *in; + + setCurrentSlot(saveFile.destName, saveFile.sourceName[4] - '0'); + in = saveMan->openForLoading(saveFile.destName); + + if (!in) + return -1; + + int32 size = in->size(); + + delete in; + + return size; +} + +bool SaveLoad_v4::loadScreenProps(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { + + // Using a sprite as a buffer + if (size <= 0) + return true; + + if ((offset < 0) || (size + offset) > 256000) { + warning("Invalid size (%d) or offset (%d)", size, offset); + return false; + } + + debugC(3, kDebugSaveLoad, "Loading screen properties (%d, %d, %d)", + dataVar, size, offset); + + memcpy(_vm->_global->_inter_variables + dataVar, _screenProps + offset, size); + memcpy(_vm->_global->_inter_variablesSizes + dataVar, _screenProps + 256000 + offset, size); + + return true; } bool SaveLoad_v4::loadGame(SaveFile &saveFile, @@ -228,18 +308,42 @@ bool SaveLoad_v4::loadGame(SaveFile &saveFile, return true; } -bool SaveLoad_v4::loadTempBuffer(SaveFile &saveFile, +bool SaveLoad_v4::loadGameScreenProps(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset) { - debugC(3, kDebugSaveLoad, "Loading from the temporary buffer (%d, %d, %d)", - dataVar, size, offset); + if (size != -5) { + warning("Invalid loading procedure (%d, %d, %d)", dataVar, size, offset); + return false; + } + + setCurrentSlot(saveFile.destName, saveFile.sourceName[4] - '0'); + + if (!_save.load(0, 256000, _varSize + 540, saveFile.destName, + _screenProps, _screenProps + 256000)) + return false; + + return true; +} + +bool SaveLoad_v4::saveScreenProps(SaveFile &saveFile, + int16 dataVar, int32 size, int32 offset) { + + // Using a sprite as a buffer + if (size <= 0) + return true; - if (size < 0) { - warning("Woodruff stub: Read screenshot"); + if ((offset < 0) || (size + offset) > 256000) { + warning("Invalid size (%d) or offset (%d)", size, offset); return false; } - return _tmpBuffer.read(_vm->_global->_inter_variables + dataVar, size, offset); + debugC(3, kDebugSaveLoad, "Saving screen properties (%d, %d, %d)", + dataVar, size, offset); + + memcpy(_screenProps + offset, _vm->_global->_inter_variables + dataVar, size); + memcpy(_screenProps + 256000 + offset, _vm->_global->_inter_variablesSizes + dataVar, size); + + return true; } bool SaveLoad_v4::saveGame(SaveFile &saveFile, @@ -310,18 +414,21 @@ bool SaveLoad_v4::saveGame(SaveFile &saveFile, return true; } -bool SaveLoad_v4::saveTempBuffer(SaveFile &saveFile, +bool SaveLoad_v4::saveGameScreenProps(SaveFile &saveFile, int16 dataVar, int32 size, int32 offset) { - debugC(3, kDebugSaveLoad, "Saving to the temporary buffer (%d, %d, %d)", - dataVar, size, offset); - - if (size < 0) { - warning("Woodruff stub: Write screenshot"); + if (size != -5) { + warning("Invalid saving procedure (%d, %d, %d)", dataVar, size, offset); return false; } - return _tmpBuffer.write(_vm->_global->_inter_variables + dataVar, size, offset); + setCurrentSlot(saveFile.destName, saveFile.sourceName[4] - '0'); + + if (!_save.save(0, 256000, _varSize + 540, saveFile.destName, + _screenProps, _screenProps + 256000)) + return false; + + return true; } void SaveLoad_v4::assertInited() { @@ -333,6 +440,7 @@ void SaveLoad_v4::assertInited() { _save.addStage(500); _save.addStage(40, false); _save.addStage(_varSize); + _save.addStage(256000); } } // End of namespace Gob -- cgit v1.2.3 From f03a27747c73d2c493e81f975e6c2e913268b78c Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Tue, 13 May 2008 08:19:15 +0000 Subject: Hide the mouse cursor while a movie plays. svn-id: r32080 --- engines/made/scriptfuncs_rtz.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp index cbfe9ce5b3..c11edb93a2 100644 --- a/engines/made/scriptfuncs_rtz.cpp +++ b/engines/made/scriptfuncs_rtz.cpp @@ -584,7 +584,9 @@ int16 ScriptFunctionsRtz::o1_TEXTWIDTH(int16 argc, int16 *argv) { int16 ScriptFunctionsRtz::o1_PLAYMOVIE(int16 argc, int16 *argv) { const char *movieName = _vm->_dat->getObject(argv[1])->getString(); + _vm->_system->showMouse(false); _vm->_pmvPlayer->play(movieName); + _vm->_system->showMouse(true); return 0; } -- cgit v1.2.3 From 3db45cc0c85967059744a987cc86c01631984a69 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Tue, 13 May 2008 08:21:28 +0000 Subject: Implemented savegame saving/loading for LGOP2. svn-id: r32081 --- engines/made/database.cpp | 123 +++++++++++++++++++++++++++++++++------------- engines/made/database.h | 7 +++ engines/made/script.cpp | 19 ++++--- 3 files changed, 109 insertions(+), 40 deletions(-) diff --git a/engines/made/database.cpp b/engines/made/database.cpp index 4862d4706d..f7fce52b21 100644 --- a/engines/made/database.cpp +++ b/engines/made/database.cpp @@ -39,7 +39,7 @@ namespace Made { < 0x7FFE object */ -Object::Object() { +Object::Object() : _objData(NULL), _freeData(false) { } Object::~Object() { @@ -48,23 +48,38 @@ Object::~Object() { } int Object::loadVersion2(Common::SeekableReadStream &source) { + + if (_freeData && _objData) + delete[] _objData; + _freeData = true; - uint16 type = source.readUint16LE(); + + byte header[4]; + source.read(header, 4); + + uint16 type = READ_LE_UINT16(header); if (type == 0x7FFF) { - _objSize = source.readUint16LE(); + _objSize = READ_LE_UINT16(header + 2); } else if (type == 0x7FFE) { - _objSize = source.readUint16LE() * 2; + _objSize = READ_LE_UINT16(header + 2) * 2; } else if (type < 0x7FFE) { - byte count1 = source.readByte(); - byte count2 = source.readByte(); + byte count1 = header[2]; + byte count2 = header[3]; _objSize = (count1 + count2) * 2; } - source.seek(-4, SEEK_CUR); _objSize += 6; _objData = new byte[_objSize]; WRITE_LE_UINT16(_objData, 1); - source.read(_objData + 2, _objSize - 2); + memcpy(_objData + 2, header, 4); + source.read(_objData + 6, _objSize - 6); + return _objSize - 2; + +} + +int Object::saveVersion2(Common::WriteStream &dest) { + dest.write(_objData + 2, _objSize - 2); + return 0; } int Object::loadVersion3(Common::SeekableReadStream &source) { @@ -273,8 +288,7 @@ void GameDatabase::loadVersion2(Common::SeekableReadStream &sourceS) { Object *obj = new Object(); int objSize = obj->loadVersion2(sourceS); // objects are aligned on 2-byte-boundaries, skip unused bytes - objSize = objSize % 2; - sourceS.skip(objSize); + sourceS.skip(objSize % 2); _objects.push_back(obj); } @@ -312,14 +326,14 @@ void GameDatabase::loadVersion3(Common::SeekableReadStream &sourceS) { // Constant objects are loaded from disk, while variable objects exist // in the _gameState buffer. - debug(2, "obj(%04X) ofs = %08X\n", i, objectOffsets[i]); + //debug(2, "obj(%04X) ofs = %08X\n", i, objectOffsets[i]); if (objectOffsets[i] & 1) { - debug(2, "-> const %08X\n", objectsOffs + objectOffsets[i] - 1); + //debug(2, "-> const %08X\n", objectsOffs + objectOffsets[i] - 1); sourceS.seek(objectsOffs + objectOffsets[i] - 1); obj->loadVersion3(sourceS); } else { - debug(2, "-> var\n"); + //debug(2, "-> var\n"); obj->loadVersion3(_gameState + objectOffsets[i]); } _objects.push_back(obj); @@ -343,8 +357,6 @@ bool GameDatabase::getSavegameDescription(const char *filename, Common::String & in->read(desc, 64); description = desc; - //printf("description = %s\n", description.c_str()); fflush(stdout); - delete in; return true; @@ -354,50 +366,93 @@ bool GameDatabase::getSavegameDescription(const char *filename, Common::String & int16 GameDatabase::savegame(const char *filename, const char *description, int16 version) { Common::OutSaveFile *out; + int16 result = 0; if (!(out = g_system->getSavefileManager()->openForSaving(filename))) { warning("Can't create file '%s', game not saved", filename); return 6; } - uint32 size = 4 + 4 + 2 + _gameStateSize; - char desc[64]; - - strncpy(desc, description, 64); - - out->writeUint32BE(MKID_BE('SGAM')); - out->writeUint32LE(size); - out->writeUint16LE(version); - out->write(desc, 64); - out->write(_gameState, _gameStateSize); + switch (_vm->_engineVersion) { + case 2: + result = savegameV2(out, description, version); + break; + case 3: + result = savegameV3(out, description, version); + break; + default: + error("GameDatabase::savegame() Unknown engine version"); + } delete out; - return 0; + return result; } int16 GameDatabase::loadgame(const char *filename, int16 version) { Common::InSaveFile *in; + int16 result = 0; if (!(in = g_system->getSavefileManager()->openForLoading(filename))) { warning("Can't open file '%s', game not loaded", filename); return 1; } - //uint32 expectedSize = 4 + 4 + 2 + _gameStateSize; + switch (_vm->_engineVersion) { + case 2: + result = loadgameV2(in, version); + break; + case 3: + result = loadgameV3(in, version); + break; + default: + error("GameDatabase::loadgame() Unknown engine version"); + } + + delete in; + + return result; + +} + +int16 GameDatabase::savegameV2(Common::OutSaveFile *out, const char *description, int16 version) { + // Variable 0 is not saved + out->write(_gameState + 2, _gameStateSize - 2); + for (uint i = 0; i < _objects.size(); i++) + _objects[i]->saveVersion2(*out); + return 0; +} + +int16 GameDatabase::loadgameV2(Common::InSaveFile *in, int16 version) { + // Variable 0 is not loaded + in->read(_gameState + 2, _gameStateSize - 2); + for (uint i = 0; i < _objects.size(); i++) + _objects[i]->loadVersion2(*in); + return 0; +} + +int16 GameDatabase::savegameV3(Common::OutSaveFile *out, const char *description, int16 version) { + uint32 size = 4 + 4 + 2 + _gameStateSize; + char desc[64]; + strncpy(desc, description, 64); + out->writeUint32BE(MKID_BE('SGAM')); + out->writeUint32LE(size); + out->writeUint16LE(version); + out->write(desc, 64); + out->write(_gameState, _gameStateSize); + return 0; +} +int16 GameDatabase::loadgameV3(Common::InSaveFile *in, int16 version) { + //uint32 expectedSize = 4 + 4 + 2 + _gameStateSize; in->skip(4); // TODO: Verify marker 'SGAM' in->skip(4); // TODO: Verify size in->skip(2); // TODO: Verify version in->skip(64); // skip savegame description in->read(_gameState, _gameStateSize); - - delete in; - return 0; - } int16 GameDatabase::getVar(int16 index) { @@ -431,7 +486,7 @@ int16 *GameDatabase::getObjectPropertyPtrV2(int16 objectIndex, int16 propertyId, // Now check in the object hierarchy of the given object int16 parentObjectIndex = obj->getClass(); if (parentObjectIndex == 0) { - //debug(2, "! NULL(np)\n"); + debug(2, "GameDatabase::getObjectPropertyPtrV2() NULL(1)"); return NULL; } @@ -470,7 +525,7 @@ int16 *GameDatabase::getObjectPropertyPtrV2(int16 objectIndex, int16 propertyId, } - //debug(2, "! NULL(nf)\n"); + debug(2, "GameDatabase::getObjectPropertyPtrV2() NULL(2)"); return NULL; } @@ -597,7 +652,7 @@ int16 GameDatabase::setObjectProperty(int16 objectIndex, int16 propertyId, int16 if (propertyFlag == 1) { WRITE_LE_UINT16(property, value); } else { - debug(2, "GameDatabase::setObjectProperty(%04X, %04X, %04X) Trying to set constant property\n", + warning("GameDatabase::setObjectProperty(%04X, %04X, %04X) Trying to set constant property\n", objectIndex, propertyId, value); } return value; diff --git a/engines/made/database.h b/engines/made/database.h index b92bd8f2dd..50e37d6936 100644 --- a/engines/made/database.h +++ b/engines/made/database.h @@ -41,7 +41,10 @@ class Object { public: Object(); ~Object(); + int loadVersion2(Common::SeekableReadStream &source); + int saveVersion2(Common::WriteStream &dest); + int loadVersion3(Common::SeekableReadStream &source); int loadVersion3(byte *source); @@ -118,6 +121,10 @@ protected: void load(Common::SeekableReadStream &sourceS); void loadVersion2(Common::SeekableReadStream &sourceS); void loadVersion3(Common::SeekableReadStream &sourceS); + int16 savegameV2(Common::OutSaveFile *out, const char *description, int16 version); + int16 loadgameV2(Common::InSaveFile *in, int16 version); + int16 savegameV3(Common::OutSaveFile *out, const char *description, int16 version); + int16 loadgameV3(Common::InSaveFile *in, int16 version); }; } // End of namespace Made diff --git a/engines/made/script.cpp b/engines/made/script.cpp index 6e896d94be..ad1411281c 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -476,12 +476,19 @@ void ScriptInterpreter::cmd_yorn() { } void ScriptInterpreter::cmd_save() { - warning("Unimplemented command: cmd_save"); - _stack.setTop(0); + int16 result = 0; + int16 stringOfs = _stack.top(); + const char *filename = _vm->_dat->getString(stringOfs); + result = _vm->_dat->savegame(filename, "", 0); + _stack.setTop(result); } void ScriptInterpreter::cmd_restore() { - warning("Unimplemented command: cmd_restore"); + int16 result = 0; + int16 stringOfs = _stack.top(); + const char *filename = _vm->_dat->getString(stringOfs); + result = _vm->_dat->loadgame(filename, 0); + _stack.setTop(result); } void ScriptInterpreter::cmd_arg() { @@ -594,12 +601,12 @@ void ScriptInterpreter::cmd_extend() { int16 *argv = _stack.getStackPtr(); //debug(4, "func = %d (%s); argc = %d", func, extendFuncNames[func], argc); - debug(4, "func = %d; argc = %d", func, argc); + debug(2, "func = %d; argc = %d", func, argc); for (int i = 0; i < argc; i++) - debug(4, "argv[%02d] = %04X (%d)", i, argv[i], argv[i]); + debug(2, "argv[%02d] = %04X (%d)", i, argv[i], argv[i]); int16 result = _functions->callFunction(func, argc, argv); - debug(4, "result = %04X (%d)", result, result); + debug(2, "result = %04X (%d)", result, result); _stack.free(argc); -- cgit v1.2.3 From fe58f0ee4b9d91f4ed349bafb16d2a8d6fb59faa Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 13 May 2008 09:30:23 +0000 Subject: - Added operator-> to Plugin subclasses so they don't have to reimplement the PluginObject subclass interfaces (thanks to Fingolfin for suggesting it) - Added the PluginSubclass template to help creating Plugin subclasses svn-id: r32082 --- base/commandLine.cpp | 10 +++++----- base/main.cpp | 3 ++- base/plugins.cpp | 40 ++++++++-------------------------------- base/plugins.h | 28 ++++++++++++++-------------- gui/about.cpp | 8 ++++---- 5 files changed, 33 insertions(+), 56 deletions(-) diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 5b919a495c..d2f286cc4a 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -23,7 +23,7 @@ * */ -#include "engines/engine.h" +#include "engines/metaengine.h" #include "base/commandLine.h" #include "base/plugins.h" #include "base/version.h" @@ -559,10 +559,10 @@ static void listGames() { printf("Game ID Full Title \n" "-------------------- ------------------------------------------------------\n"); - const EnginePluginList &plugins = EngineMan.getPlugins(); - EnginePluginList::const_iterator iter = plugins.begin(); + const EnginePlugin::list &plugins = EngineMan.getPlugins(); + EnginePlugin::list::const_iterator iter = plugins.begin(); for (iter = plugins.begin(); iter != plugins.end(); ++iter) { - GameList list = (*iter)->getSupportedGames(); + GameList list = (**iter)->getSupportedGames(); for (GameList::iterator v = list.begin(); v != list.end(); ++v) { printf("%-20s %s\n", v->gameid().c_str(), v->description().c_str()); } @@ -622,7 +622,7 @@ static void listSaves(const char *target) { } // Query the plugin for a list of savegames - SaveStateList saveList = plugin->listSaves(target); + SaveStateList saveList = (*plugin)->listSaves(target); // TODO: Include more info about the target (desc, engine name, ...) ??? printf("Saves for target '%s':\n", target); diff --git a/base/main.cpp b/base/main.cpp index 8b697e120d..c36c506d7f 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -32,6 +32,7 @@ */ #include "engines/engine.h" +#include "engines/metaengine.h" #include "base/commandLine.h" #include "base/plugins.h" #include "base/version.h" @@ -138,7 +139,7 @@ static int runGame(const EnginePlugin *plugin, OSystem &system, const Common::St // Create the game engine Engine *engine = 0; - PluginError err = plugin->createInstance(&system, &engine); + PluginError err = (*plugin)->createInstance(&system, &engine); if (!engine || err != kNoError) { // TODO: Show an error dialog or so? // TODO: Also take 'err' into consideration... diff --git a/base/plugins.cpp b/base/plugins.cpp index d2bd9b398a..d4153f17d3 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -301,43 +301,19 @@ bool PluginManager::tryLoadPlugin(Plugin *plugin) { #include "engines/metaengine.h" -const char *EnginePlugin::getCopyright() const { - return ((MetaEngine*)_pluginObject)->getCopyright(); -} - -PluginError EnginePlugin::createInstance(OSystem *syst, Engine **engine) const { - return ((MetaEngine*)_pluginObject)->createInstance(syst, engine); -} - -GameList EnginePlugin::getSupportedGames() const { - return ((MetaEngine*)_pluginObject)->getSupportedGames(); -} - -GameDescriptor EnginePlugin::findGame(const char *gameid) const { - return ((MetaEngine*)_pluginObject)->findGame(gameid); -} - -GameList EnginePlugin::detectGames(const FSList &fslist) const { - return ((MetaEngine*)_pluginObject)->detectGames(fslist); -} - -SaveStateList EnginePlugin::listSaves(const char *target) const { - return ((MetaEngine*)_pluginObject)->listSaves(target); -} - DECLARE_SINGLETON(EngineManager); GameDescriptor EngineManager::findGame(const Common::String &gameName, const EnginePlugin **plugin) const { // Find the GameDescriptor for this target - const EnginePluginList &plugins = getPlugins(); + const EnginePlugin::list &plugins = getPlugins(); GameDescriptor result; if (plugin) *plugin = 0; - EnginePluginList::const_iterator iter = plugins.begin(); + EnginePlugin::list::const_iterator iter = plugins.begin(); for (iter = plugins.begin(); iter != plugins.end(); ++iter) { - result = (*iter)->findGame(gameName.c_str()); + result = (**iter)->findGame(gameName.c_str()); if (!result.gameid().empty()) { if (plugin) *plugin = *iter; @@ -350,18 +326,18 @@ GameDescriptor EngineManager::findGame(const Common::String &gameName, const Eng GameList EngineManager::detectGames(const FSList &fslist) const { GameList candidates; - const EnginePluginList &plugins = getPlugins(); + const EnginePlugin::list &plugins = getPlugins(); // Iterate over all known games and for each check if it might be // the game in the presented directory. - EnginePluginList::const_iterator iter; + EnginePlugin::list::const_iterator iter; for (iter = plugins.begin(); iter != plugins.end(); ++iter) { - candidates.push_back((*iter)->detectGames(fslist)); + candidates.push_back((**iter)->detectGames(fslist)); } return candidates; } -const EnginePluginList &EngineManager::getPlugins() const { - return (const EnginePluginList&)PluginManager::instance().getPlugins(PLUGIN_TYPE_ENGINE); +const EnginePlugin::list &EngineManager::getPlugins() const { + return (const EnginePlugin::list&)PluginManager::instance().getPlugins(PLUGIN_TYPE_ENGINE); } diff --git a/base/plugins.h b/base/plugins.h index 3f2d19fd50..858c8d9106 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -141,6 +141,17 @@ public: /** List of plugins. */ typedef Common::Array PluginList; +/** Template to help defining Plugin subclasses */ +template +class PluginSubclass : public Plugin { +public: + PO_t *operator->() const { + return (PO_t *)_pluginObject; + } + + typedef Common::Array list; +}; + class PluginProvider { public: virtual ~PluginProvider() {} @@ -197,21 +208,10 @@ public: // Engine plugins -class Engine; class FSList; -class OSystem; - -class EnginePlugin : public Plugin { -public: - const char *getCopyright() const; - PluginError createInstance(OSystem *syst, Engine **engine) const; - GameList getSupportedGames() const; - GameDescriptor findGame(const char *gameid) const; - GameList detectGames(const FSList &fslist) const; - SaveStateList listSaves(const char *target) const; -}; +class MetaEngine; -typedef Common::Array EnginePluginList; +typedef PluginSubclass EnginePlugin; class EngineManager : public Common::Singleton { private: @@ -220,7 +220,7 @@ private: public: GameDescriptor findGame(const Common::String &gameName, const EnginePlugin **plugin = NULL) const; GameList detectGames(const FSList &fslist) const; - const EnginePluginList &getPlugins() const; + const EnginePlugin::list &getPlugins() const; }; /** Shortcut for accessing the engine manager. */ diff --git a/gui/about.cpp b/gui/about.cpp index b4d8cb0bf2..2afaae9a97 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "engines/engine.h" +#include "engines/metaengine.h" #include "base/plugins.h" #include "base/version.h" #include "common/events.h" @@ -128,8 +128,8 @@ AboutDialog::AboutDialog() _lines.push_back(""); addLine("\\C\\c1""Available engines:"); - const EnginePluginList &plugins = EngineMan.getPlugins(); - EnginePluginList::const_iterator iter = plugins.begin(); + const EnginePlugin::list &plugins = EngineMan.getPlugins(); + EnginePlugin::list::const_iterator iter = plugins.begin(); for (; iter != plugins.end(); ++iter) { Common::String str; str = "\\C"; @@ -137,7 +137,7 @@ AboutDialog::AboutDialog() addLine(str.c_str()); str = "\\C\\c2"; - str += (**iter).getCopyright(); + str += (**iter)->getCopyright(); addLine(str.c_str()); //addLine(""); -- cgit v1.2.3 From 2bb39e591f4184f0ae8102c8f547586bf95d2b50 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 13 May 2008 10:41:32 +0000 Subject: Moved the engine plugin code to engines/metaengine.h; added/clarified/corrected various Doxygen comments for the plugin system svn-id: r32083 --- base/plugins.h | 77 ++++++++++++++++++++++++++++++---------------------- engines/metaengine.h | 21 ++++++++++++++ gui/launcher.cpp | 3 +- gui/massadd.cpp | 3 +- 4 files changed, 67 insertions(+), 37 deletions(-) diff --git a/base/plugins.h b/base/plugins.h index 858c8d9106..b1236eeeb1 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -33,7 +33,7 @@ // Plugin versioning -// Global Plugin API version +/** Global Plugin API version */ #define PLUGIN_VERSION 1 enum PluginType { @@ -67,14 +67,14 @@ extern int pluginTypeVersions[PLUGIN_TYPE_MAX]; (defined(ENABLE_##ID) && (ENABLE_##ID == DYNAMIC_PLUGIN) && defined(DYNAMIC_MODULES)) /** - * REGISTER_PLUGIN is a convenience macro meant to ease writing - * the plugin interface for our modules. In particular, using it - * makes it possible to compile the very same code in a module - * both as a static and a dynamic plugin. + * REGISTER_PLUGIN_STATIC is a convenience macro which is used to declare + * the plugin interface for static plugins. Code (such as game engines) + * which needs to implement a static plugin can simply invoke this macro + * with a plugin ID, plugin type and PluginObject subclass, and the correct + * wrapper code will be inserted. * - * @todo add some means to query the plugin API version etc. + * @see REGISTER_PLUGIN_DYNAMIC */ - #define REGISTER_PLUGIN_STATIC(ID,TYPE,PLUGINCLASS) \ PluginType g_##ID##_type = TYPE; \ PluginObject *g_##ID##_getObject() { \ @@ -84,6 +84,15 @@ extern int pluginTypeVersions[PLUGIN_TYPE_MAX]; #ifdef DYNAMIC_MODULES +/** + * REGISTER_PLUGIN_DYNAMIC is a convenience macro which is used to declare + * the plugin interface for dynamically loadable plugins. Code (such as game engines) + * which needs to implement a dynamic plugin can simply invoke this macro + * with a plugin ID, plugin type and PluginObject subclass, and the correct + * wrapper code will be inserted. + * + * @see REGISTER_PLUGIN_STATIC + */ #define REGISTER_PLUGIN_DYNAMIC(ID,TYPE,PLUGINCLASS) \ extern "C" { \ PLUGIN_EXPORT int32 PLUGIN_getVersion() { return PLUGIN_VERSION; } \ @@ -138,10 +147,14 @@ public: const char *getName() const; }; -/** List of plugins. */ +/** List of Plugin instances. */ typedef Common::Array PluginList; -/** Template to help defining Plugin subclasses */ +/** + * Convenience template to make it easier defining normal Plugin + * subclasses. Namely, the PluginSubclass will manage PluginObjects + * of a type specified via the PO_t template parameter. + */ template class PluginSubclass : public Plugin { public: @@ -152,24 +165,43 @@ public: typedef Common::Array list; }; +/** + * Abstract base class for Plugin factories. Subclasses of this + * are responsible for creating plugin objects, e.g. by loading + * loadable modules from storage media; by creating "fake" plugins + * from static code; or whatever other means. + */ class PluginProvider { public: virtual ~PluginProvider() {} /** * Return a list of Plugin objects. The caller is responsible for actually - * loading/unloading them (by invoking the appropriate methods). + * loading/unloading them (by invoking the appropriate Plugin methods). * Furthermore, the caller is responsible for deleting these objects * eventually. */ virtual PluginList getPlugins() = 0; }; +/** + * Abstract base class for Plugin factories which load binary code from files. + * Subclasses only have to implement the createPlugin() method, and optionally + * can overload the other protected methods to achieve custom behavior. + */ class FilePluginProvider : public PluginProvider { public: virtual PluginList getPlugins(); protected: + /** + * Create a Plugin instance from a loadable code module with the specified name. + * Subclasses of FilePluginProvider have to at least overload this method. + * If the file is not found, or does not contain loadable code, 0 is returned instead. + * + * @param filename the name of the loadable code module + * @return a pointer to a Plugin instance, or 0 if an error occured. + */ virtual Plugin* createPlugin(const Common::String &filename) const = 0; virtual const char* getPrefix() const; @@ -179,8 +211,8 @@ protected: }; /** - * Instances of this class manage all plugins, including loading them, - * making wrapper objects of class Plugin available, and unloading them. + * Singleton class which manages all plugins, including loading them, + * managing all Plugin class instances, and unloading them. */ class PluginManager : public Common::Singleton { typedef Common::List ProviderList; @@ -205,25 +237,4 @@ public: const PluginList &getPlugins(PluginType t) { return _plugins[t]; } }; - -// Engine plugins - -class FSList; -class MetaEngine; - -typedef PluginSubclass EnginePlugin; - -class EngineManager : public Common::Singleton { -private: - friend class Common::Singleton; - -public: - GameDescriptor findGame(const Common::String &gameName, const EnginePlugin **plugin = NULL) const; - GameList detectGames(const FSList &fslist) const; - const EnginePlugin::list &getPlugins() const; -}; - -/** Shortcut for accessing the engine manager. */ -#define EngineMan EngineManager::instance() - #endif diff --git a/engines/metaengine.h b/engines/metaengine.h index 5db791a1b7..c5fb006faa 100644 --- a/engines/metaengine.h +++ b/engines/metaengine.h @@ -93,4 +93,25 @@ public: } }; + +// Engine plugins + +typedef PluginSubclass EnginePlugin; + +/** + * Singleton class which manages all Engine plugins. + */ +class EngineManager : public Common::Singleton { +private: + friend class Common::Singleton; + +public: + GameDescriptor findGame(const Common::String &gameName, const EnginePlugin **plugin = NULL) const; + GameList detectGames(const FSList &fslist) const; + const EnginePlugin::list &getPlugins() const; +}; + +/** Convenience shortcut for accessing the engine manager. */ +#define EngineMan EngineManager::instance() + #endif diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 505ecf842b..92867562ad 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -22,8 +22,7 @@ * $Id$ */ -#include "engines/engine.h" -#include "base/plugins.h" +#include "engines/metaengine.h" #include "base/version.h" #include "common/config-manager.h" diff --git a/gui/massadd.cpp b/gui/massadd.cpp index 446285af2d..b39b51f1fb 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -22,8 +22,7 @@ * $Id$ */ -#include "engines/engine.h" -#include "base/plugins.h" +#include "engines/metaengine.h" #include "common/events.h" #include "gui/launcher.h" // For addGameToConf() -- cgit v1.2.3 From f7a682edf9c2c9a50cba9b869f447a9781def64b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 13 May 2008 11:00:25 +0000 Subject: Some more Doxygen comments, as well as some FIXMEs/TODOs svn-id: r32084 --- base/plugins.h | 48 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/base/plugins.h b/base/plugins.h index b1236eeeb1..8c0158a912 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -31,6 +31,28 @@ #include "common/singleton.h" #include "base/game.h" + +/** + * @page pagePlugins An overview of the ScummVM plugin system + * This is a brief overview of how plugins (dynamically loadable code modules) + * work in ScummVM. We will explain how to write plugins, how they work internally, + * and sketch how porters can add support for them in their ports. + * + * \section secPluginImpl Implementing a plugin + * TODO + * + * \section secPluginUse Using plugins + * TODO + * + * \section secPluginInternals How plugins work internally + * TODO + * + * \section secPluginBackend How to add support for dynamic plugins to a port + * TODO + */ + + + // Plugin versioning /** Global Plugin API version */ @@ -113,6 +135,8 @@ extern int pluginTypeVersions[PLUGIN_TYPE_MAX]; * Abstract base class for the plugin objects which handle plugins * instantiation. Subclasses for this may be used for engine plugins * and other types of plugins. + * + * FIXME: This class needs better documentation, esp. how it differs from class Plugin */ class PluginObject { public: @@ -126,6 +150,8 @@ public: * Abstract base class for the plugin system. * Subclasses for this can be used to wrap both static and dynamic * plugins. + * + * FIXME: This class needs better documentation, esp. how it differs from class PluginObject */ class Plugin { protected: @@ -180,6 +206,8 @@ public: * loading/unloading them (by invoking the appropriate Plugin methods). * Furthermore, the caller is responsible for deleting these objects * eventually. + * + * @return a list of Plugin instances */ virtual PluginList getPlugins() = 0; }; @@ -191,6 +219,15 @@ public: */ class FilePluginProvider : public PluginProvider { public: + /** + * Return a list of Plugin objects loaded via createPlugin from disk. + * For this, a list of directories is searched for plugin objects: + * The current dir and its "plugins" subdirectory (if present), a list + * of custom search dirs (see addCustomDirectories) and finally the + * directory specified via the "pluginspath" config variable (if any). + * + * @return a list of Plugin instances + */ virtual PluginList getPlugins(); protected: @@ -200,13 +237,22 @@ protected: * If the file is not found, or does not contain loadable code, 0 is returned instead. * * @param filename the name of the loadable code module - * @return a pointer to a Plugin instance, or 0 if an error occured. + * @return a pointer to a Plugin instance, or 0 if an error occurred. + * + * FIXME: Instead of using getPrefix & getSuffix, how about adding a + * isPluginFilename() class, so that more flexible checks can be performed? */ virtual Plugin* createPlugin(const Common::String &filename) const = 0; virtual const char* getPrefix() const; virtual const char* getSuffix() const; + /** + * Optionally add to the list of directories to be searched for + * plugins by getPlugins(). + * + * FIXME: This should be using FSNodes, not strings! + */ virtual void addCustomDirectories(Common::StringList &dirs) const; }; -- cgit v1.2.3 From a392bc4b0e860429ec8ba7a79bc6ed4eab8f0335 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 13 May 2008 13:24:49 +0000 Subject: Taken care of FilePluginProvider's FIXMEs svn-id: r32085 --- backends/plugins/dc/dc-provider.cpp | 10 ++++++- backends/plugins/dc/dc-provider.h | 3 +- backends/plugins/win32/win32-provider.cpp | 8 +++++ backends/plugins/win32/win32-provider.h | 3 +- base/plugins.cpp | 49 ++++++++++++++----------------- base/plugins.h | 25 +++++++++++----- 6 files changed, 59 insertions(+), 39 deletions(-) diff --git a/backends/plugins/dc/dc-provider.cpp b/backends/plugins/dc/dc-provider.cpp index 1cae4bbd32..9b150c8db4 100644 --- a/backends/plugins/dc/dc-provider.cpp +++ b/backends/plugins/dc/dc-provider.cpp @@ -83,9 +83,17 @@ public: }; -Plugin* SDLPluginProvider::createPlugin(const Common::String &filename) const { +Plugin* DCPluginProvider::createPlugin(const Common::String &filename) const { return new DCPlugin(filename); } +bool DCPluginProvider::isPluginFilename(const Common::String &filename) const { + // Check the plugin suffix + if (!filename.hasSuffix(".PLG")) + return false; + + return true; +} + #endif // defined(DYNAMIC_MODULES) && defined(__DC__) diff --git a/backends/plugins/dc/dc-provider.h b/backends/plugins/dc/dc-provider.h index 1b96f55d4d..f413061828 100644 --- a/backends/plugins/dc/dc-provider.h +++ b/backends/plugins/dc/dc-provider.h @@ -34,8 +34,7 @@ class DCPluginProvider : public FilePluginProvider { protected: Plugin* createPlugin(const Common::String &filename) const; - virtual const char* getPrefix() const { return ""; } - virtual const char* getSuffix() const { return ".PLG"; } + bool isPluginFilename(const Common::String &filename) const; virtual void addCustomDirectories(Common::StringList &dirs) const { dirs.push_back("/"); diff --git a/backends/plugins/win32/win32-provider.cpp b/backends/plugins/win32/win32-provider.cpp index 0592638140..64636d8096 100644 --- a/backends/plugins/win32/win32-provider.cpp +++ b/backends/plugins/win32/win32-provider.cpp @@ -107,5 +107,13 @@ Plugin* Win32PluginProvider::createPlugin(const Common::String &filename) const return new Win32Plugin(filename); } +bool Win32PluginProvider::isPluginFilename(const Common::String &filename) const { + // Check the plugin suffix + if (!filename.hasSuffix(".dll")) + return false; + + return true; +} + #endif // defined(DYNAMIC_MODULES) && defined(_WIN32) diff --git a/backends/plugins/win32/win32-provider.h b/backends/plugins/win32/win32-provider.h index e4b0be7395..4ddc8b7500 100644 --- a/backends/plugins/win32/win32-provider.h +++ b/backends/plugins/win32/win32-provider.h @@ -34,8 +34,7 @@ class Win32PluginProvider : public FilePluginProvider { protected: Plugin* createPlugin(const Common::String &filename) const; - virtual const char* getPrefix() const { return ""; } - virtual const char* getSuffix() const { return ".dll"; } + bool isPluginFilename(const Common::String &filename) const; virtual void addCustomDirectories(Common::StringList &dirs) const {} }; diff --git a/base/plugins.cpp b/base/plugins.cpp index d4153f17d3..c39b877eb8 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -27,7 +27,6 @@ #ifdef DYNAMIC_MODULES #include "common/config-manager.h" -#include "common/fs.h" #endif // Plugin versioning @@ -151,38 +150,34 @@ PluginList FilePluginProvider::getPlugins() { PluginList pl; // Prepare the list of directories to search - Common::StringList pluginDirs; + FSList pluginDirs; // Add the default directories - pluginDirs.push_back("."); - pluginDirs.push_back("plugins"); + pluginDirs.push_back(FilesystemNode(".")); + pluginDirs.push_back(FilesystemNode("plugins")); // Add the provider's custom directories addCustomDirectories(pluginDirs); // Add the user specified directory Common::String pluginsPath(ConfMan.get("pluginspath")); - if (!pluginsPath.empty()) { - FilesystemNode dir(pluginsPath); - pluginDirs.push_back(dir.getPath()); - } + if (!pluginsPath.empty()) + pluginDirs.push_back(FilesystemNode(pluginsPath)); - Common::StringList::const_iterator d; - for (d = pluginDirs.begin(); d != pluginDirs.end(); d++) { + FSList::const_iterator dir; + for (dir = pluginDirs.begin(); dir != pluginDirs.end(); dir++) { // Load all plugins. // Scan for all plugins in this directory - FilesystemNode dir(*d); FSList files; - if (!dir.getChildren(files, FilesystemNode::kListFilesOnly)) { - debug(1, "Couldn't open plugin directory '%s'", d->c_str()); + if (!dir->getChildren(files, FilesystemNode::kListFilesOnly)) { + debug(1, "Couldn't open plugin directory '%s'", dir->getPath().c_str()); continue; } else { - debug(1, "Reading plugins from plugin directory '%s'", d->c_str()); + debug(1, "Reading plugins from plugin directory '%s'", dir->getPath().c_str()); } for (FSList::const_iterator i = files.begin(); i != files.end(); ++i) { - Common::String name(i->getName()); - if (name.hasPrefix(getPrefix()) && name.hasSuffix(getSuffix())) { + if (isPluginFilename(i->getName())) { pl.push_back(createPlugin(i->getPath())); } } @@ -191,25 +186,25 @@ PluginList FilePluginProvider::getPlugins() { return pl; } -const char* FilePluginProvider::getPrefix() const { +bool FilePluginProvider::isPluginFilename(const Common::String &filename) const { #ifdef PLUGIN_PREFIX - return PLUGIN_PREFIX; -#else - return ""; + // Check the plugin prefix + if (!filename.hasPrefix(PLUGIN_PREFIX)) + return false; #endif -} -const char* FilePluginProvider::getSuffix() const { #ifdef PLUGIN_SUFFIX - return PLUGIN_SUFFIX; -#else - return ""; + // Check the plugin suffix + if (!filename.hasSuffix(PLUGIN_SUFFIX)) + return false; #endif + + return true; } -void FilePluginProvider::addCustomDirectories(Common::StringList &dirs) const { +void FilePluginProvider::addCustomDirectories(FSList &dirs) const { #ifdef PLUGIN_DIRECTORY - dirs.push_back(PLUGIN_DIRECTORY); + dirs.push_back(FilesystemNode(PLUGIN_DIRECTORY)); #endif } diff --git a/base/plugins.h b/base/plugins.h index 8c0158a912..92b317498f 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -31,6 +31,9 @@ #include "common/singleton.h" #include "base/game.h" +#ifdef DYNAMIC_MODULES +#include "common/fs.h" +#endif /** * @page pagePlugins An overview of the ScummVM plugin system @@ -212,6 +215,8 @@ public: virtual PluginList getPlugins() = 0; }; +#ifdef DYNAMIC_MODULES + /** * Abstract base class for Plugin factories which load binary code from files. * Subclasses only have to implement the createPlugin() method, and optionally @@ -238,24 +243,30 @@ protected: * * @param filename the name of the loadable code module * @return a pointer to a Plugin instance, or 0 if an error occurred. - * - * FIXME: Instead of using getPrefix & getSuffix, how about adding a - * isPluginFilename() class, so that more flexible checks can be performed? */ virtual Plugin* createPlugin(const Common::String &filename) const = 0; - virtual const char* getPrefix() const; - virtual const char* getSuffix() const; + /** + * Check if the supplied filename corresponds to a loadable plugin file in + * the current platform. + * + * @param filename the name of the file to check + * @return true if the filename corresponds to a plugin, false otherwise + */ + virtual bool isPluginFilename(const Common::String &filename) const; /** * Optionally add to the list of directories to be searched for * plugins by getPlugins(). * - * FIXME: This should be using FSNodes, not strings! + * @param dirs the reference to the list of directories to be used when + * searching for plugins. */ - virtual void addCustomDirectories(Common::StringList &dirs) const; + virtual void addCustomDirectories(FSList &dirs) const; }; +#endif // DYNAMIC_MODULES + /** * Singleton class which manages all plugins, including loading them, * managing all Plugin class instances, and unloading them. -- cgit v1.2.3 From 317b382757459e5ccd6ed336e4161f32387307b8 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 13 May 2008 15:40:29 +0000 Subject: Fixing a segfault when quitting while an object video with sound plays svn-id: r32086 --- engines/gob/gob.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 41f268eba2..5871151d6e 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -97,10 +97,11 @@ GobEngine::GobEngine(OSystem *syst) : Engine(syst) { } GobEngine::~GobEngine() { + deinitGameParts(); + // Stop all mixer streams (except for the permanent ones). _vm->_mixer->stopAll(); - deinitGameParts(); delete[] _startTot; delete[] _startTot0; } -- cgit v1.2.3 From 85d28316ac2d513df8609ef7a39cc26a179f1078 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 13 May 2008 15:52:01 +0000 Subject: Implemented support for object videos with more than 256 frames, this fixes a lockup when entering the bar svn-id: r32087 --- engines/gob/mult_v2.cpp | 17 +++++++++++++---- engines/gob/scenery.cpp | 13 +++++++++++-- 2 files changed, 24 insertions(+), 6 deletions(-) diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index 3b561837ee..8a299649c7 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -697,7 +697,7 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) { animData.frame = 0; animData.isPaused = 1; if (animData.animation < 0) - warning("TODO: AnimType 4, animation: %d", animData.animation); + warning("Woodruff Stub: AnimType 4, animation: %d", animData.animation); return; } @@ -705,9 +705,8 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) { animData.animType = 11; if (animData.animType == 11) { - if (animData.isBusy != 0) { - warning("TODO: AnimType 11"); - } + if (animData.isBusy != 0) + warning("Woodruff Stub: AnimType 11"); return; } @@ -754,6 +753,11 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) { case 5: animData.isStatic = 1; animData.frame = 0; + if ((animData.animation < 0) && (animObj.videoSlot > 0)) { + _vm->_vidPlayer->slotClose(animObj.videoSlot - 1); + animObj.videoSlot = 0; + } + break; case 6: @@ -767,7 +771,12 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) { } } break; + + case 10: + warning("Woodruff Stub: AnimType 10"); + break; } + animData.newCycle = 1; } diff --git a/engines/gob/scenery.cpp b/engines/gob/scenery.cpp index 4dc1236ad6..25df5b7e71 100644 --- a/engines/gob/scenery.cpp +++ b/engines/gob/scenery.cpp @@ -632,8 +632,17 @@ void Scenery::updateAnim(int16 layer, int16 frame, int16 animation, int16 flags, frame = _vm->_vidPlayer->getFramesCount(obj.videoSlot - 1) - 1; // Seek to frame - while (_vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) <= frame) - _vm->_vidPlayer->slotPlay(obj.videoSlot - 1); + if (_vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) < 256) { + while (_vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) <= frame) + _vm->_vidPlayer->slotPlay(obj.videoSlot - 1); + } else { + int16 curFrame = _vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1); + uint8 frameWrap = curFrame / 256; + frame = (frame + 1) % 256; + + while (_vm->_vidPlayer->getCurrentFrame(obj.videoSlot - 1) < (frameWrap * 256 + frame)) + _vm->_vidPlayer->slotPlay(obj.videoSlot - 1); + } destX = 0; destY = 0; -- cgit v1.2.3 From 3c119e17cbbaf4183a387a761e55c8e753589d6a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 13 May 2008 16:12:37 +0000 Subject: Added a sanity check to o1_LOADCURSOR to prevent LGoP2 from crashing when the save/load menu is opened during character selection svn-id: r32089 --- engines/made/scriptfuncs_lgop2.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/made/scriptfuncs_lgop2.cpp b/engines/made/scriptfuncs_lgop2.cpp index 73fbd7fb45..d90e6546d7 100644 --- a/engines/made/scriptfuncs_lgop2.cpp +++ b/engines/made/scriptfuncs_lgop2.cpp @@ -443,6 +443,9 @@ int16 ScriptFunctionsLgop2::o1_OUTLINE(int16 argc, int16 *argv) { int16 ScriptFunctionsLgop2::o1_LOADCURSOR(int16 argc, int16 *argv) { PictureResource *flex = _vm->_res->getPicture(argv[2]); + if (!flex) + return 0; + Graphics::Surface *surf = flex->getPicture(); CursorMan.replaceCursor((const byte *)surf->pixels, surf->w, surf->h, argv[1], argv[0], 0); CursorMan.showMouse(true); -- cgit v1.2.3 From 72dc3ecc55a3f2173ed12d86ae7413c2b627eca0 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 13 May 2008 18:43:26 +0000 Subject: Fixing the crash when entering the virtual trip tower in Woodruff svn-id: r32090 --- engines/gob/video.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index e1777681df..3034a38079 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -178,8 +178,8 @@ void Video::retrace(bool mouse) { int screenOffset = _scrollOffsetY * _surfWidth + _scrollOffsetX; int screenX = _screenDeltaX; int screenY = _screenDeltaY; - int screenWidth = _vm->_width; - int screenHeight = _splitHeight1; + int screenWidth = MIN(_surfWidth, _vm->_width); + int screenHeight = MIN(_splitHeight1, _vm->_height - _splitHeight2 - _screenDeltaY); g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + screenOffset, _surfWidth, screenX, screenY, screenWidth, screenHeight); @@ -188,7 +188,7 @@ void Video::retrace(bool mouse) { screenOffset = _splitStart * _surfWidth; screenX = 0; screenY = _vm->_height - _splitHeight2; - screenWidth = _vm->_width; + screenWidth = MIN(_surfWidth, _vm->_width); screenHeight = _splitHeight2; g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + screenOffset, -- cgit v1.2.3 From eef0a317a2d4068554ca3ff55c29411227ab1542 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 13 May 2008 19:53:14 +0000 Subject: Added a warning when all chunk slots are full, as that's still a problem in Woodruff (some videos aren't closed correctly yet). svn-id: r32091 --- engines/gob/dataio.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp index dd5d30bd39..8ae11b8755 100644 --- a/engines/gob/dataio.cpp +++ b/engines/gob/dataio.cpp @@ -232,8 +232,10 @@ int16 DataIO::getChunk(const char *chunkName) { if (_chunkPos[file * MAX_SLOT_COUNT + slot] == -1) break; - if (slot == MAX_SLOT_COUNT) + if (slot == MAX_SLOT_COUNT) { + warning("Chunk slots full"); return -1; + } dataDesc = _dataFiles[file]; for (int16 chunk = 0; chunk < _numDataChunks[file]; chunk++, dataDesc++) { -- cgit v1.2.3 From 6f14d881389099348084b19c2ed0261df6b422bf Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 13 May 2008 21:17:46 +0000 Subject: More descriptive error message when encountering invalid font data. svn-id: r32092 --- engines/kyra/screen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp index 8d18bc2e78..f00c47ceea 100644 --- a/engines/kyra/screen.cpp +++ b/engines/kyra/screen.cpp @@ -883,7 +883,7 @@ bool Screen::loadFont(FontId fontId, const char *filename) { uint16 fontSig = READ_LE_UINT16(fontData + 2); if (fontSig != 0x500) - error("Invalid font data (file '%s')", filename); + error("Invalid font data (file '%s', fontSig: %.04X)", filename, fontSig); fnt->charWidthTable = fontData + READ_LE_UINT16(fontData + 8); fnt->charSizeOffset = READ_LE_UINT16(fontData + 4); -- cgit v1.2.3 From 231ef79de22b0ca1836c33fd8d54b7b5cb9970e3 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Tue, 13 May 2008 21:39:18 +0000 Subject: fix engine destructor for non interactive hof demo svn-id: r32093 --- engines/kyra/kyra_v2.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index b2c44981ec..7b720259cc 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -71,11 +71,13 @@ KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const Engi } KyraEngine_v2::~KyraEngine_v2() { - for (ShapeMap::iterator i = _gameShapes.begin(); i != _gameShapes.end(); ++i) { - delete[] i->_value; - i->_value = 0; + if (!(_flags.isDemo && !_flags.isTalkie)) { + for (ShapeMap::iterator i = _gameShapes.begin(); i != _gameShapes.end(); ++i) { + delete[] i->_value; + i->_value = 0; + } + _gameShapes.clear(); } - _gameShapes.clear(); delete[] _itemList; delete[] _sceneList; -- cgit v1.2.3 From cfd1fa6973b65942b476ca8fb746a617cb5851c0 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 13 May 2008 23:22:31 +0000 Subject: Some fixes for vertical scrolling in Woodruff svn-id: r32095 --- engines/gob/draw_v2.cpp | 24 +++++++++++++++++------- engines/gob/inter_v2.cpp | 23 +++++++++++++---------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 8c429b1c1e..1195e35e93 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -245,13 +245,20 @@ void Draw_v2::printTotText(int16 id) { } if (_renderFlags & RENDERFLAG_FROMSPLIT) { - destY = _vm->_video->_splitHeight1; + int16 start; + + if (_vm->_video->_splitHeight1 < _vm->_height) + start = _vm->_video->_splitHeight1; + else + start = _vm->_video->_splitStart; + + destY = start; spriteBottom = READ_LE_UINT16(ptr + 6) - READ_LE_UINT16(ptr + 2); if (_renderFlags & RENDERFLAG_DOUBLECOORDS) spriteBottom *= 3; - spriteBottom += _vm->_video->_splitHeight1; + spriteBottom += start; if (_renderFlags & RENDERFLAG_DOUBLECOORDS) { spriteBottom += _backDeltaY; @@ -650,16 +657,19 @@ void Draw_v2::spriteOperation(int16 operation) { if ((_destSpriteY >= _vm->_video->_splitHeight1) && ((_destSurface == 20) || (_destSurface == 21))) { - _destSpriteY = (_destSpriteY - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; - if ((operation == DRAW_DRAWLINE) || - ((operation >= DRAW_DRAWBAR) && (operation <= DRAW_FILLRECTABS))) - _spriteBottom = (_spriteBottom - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; + if (_vm->_video->_splitHeight1 < _vm->_height) { + _destSpriteY = (_destSpriteY - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; + if ((operation == DRAW_DRAWLINE) || + ((operation >= DRAW_DRAWBAR) && (operation <= DRAW_FILLRECTABS))) + _spriteBottom = (_spriteBottom - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; + } } if ((_spriteTop >= _vm->_video->_splitHeight1) && (operation == DRAW_BLITSURF) && ((_destSurface == 20) || (_destSurface == 21))) - _spriteTop = (_spriteTop - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; + if (_vm->_video->_splitHeight1 < _vm->_height) + _spriteTop = (_spriteTop - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; adjustCoords(0, &_destSpriteX, &_destSpriteY); if ((operation != DRAW_LOADSPRITE) && (_needAdjust != 2)) { diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 6f261e9822..493efa8438 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1444,19 +1444,22 @@ void Inter_v2::o2_initScreen() { int16 screenHeight = _vm->_video->_surfHeight; - _vm->_video->_surfHeight += offY; + if (screenHeight < _vm->_height) { + _vm->_video->_surfHeight += offY; + _vm->_video->_splitStart = screenHeight; + } else + _vm->_video->_splitStart = screenHeight - offY; - _vm->_video->_splitHeight1 = MIN(_vm->_height, screenHeight - offY); - _vm->_video->_splitHeight2 = offY; - _vm->_video->_splitStart = screenHeight; + _vm->_video->_splitHeight1 = MIN(_vm->_height, screenHeight - offY); + _vm->_video->_splitHeight2 = offY; - if ((_vm->_video->_surfHeight + offY) < _vm->_height) - _vm->_video->_screenDeltaY = (_vm->_height - (screenHeight + offY)) / 2; - else - _vm->_video->_screenDeltaY = 0; + if ((_vm->_video->_surfHeight + offY) < _vm->_height) + _vm->_video->_screenDeltaY = (_vm->_height - (screenHeight + offY)) / 2; + else + _vm->_video->_screenDeltaY = 0; - _vm->_global->_mouseMaxY = (screenHeight + _vm->_video->_screenDeltaY) - offY - 1; - _vm->_global->_mouseMinY = _vm->_video->_screenDeltaY; + _vm->_global->_mouseMaxY = (screenHeight + _vm->_video->_screenDeltaY) - offY - 1; + _vm->_global->_mouseMinY = _vm->_video->_screenDeltaY; } else { _vm->_video->_splitHeight1 = MIN(_vm->_height, _vm->_video->_surfHeight - offY); -- cgit v1.2.3 From 6a9429613b5b82e7b52e47b420505fe6fcbd08e0 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 14 May 2008 03:35:06 +0000 Subject: Added the animation speed workaround for the sheriff animation as well. (See bug #1926838, "HoF: Animation plays too fast".) svn-id: r32096 --- engines/kyra/script_hof.cpp | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index 8ab6fb9424..111d980a52 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -896,14 +896,23 @@ int KyraEngine_HoF::o2_updateSceneAnim(EMCState *script) { // Raziel^. // // We know currently of some different animations where this happens. - // - Where Marco is dangling from the flesh-eating plant (see bug #1923638 "HoF: Marco missing animation frames"). - // - After giving the ticket to the captain. He would move very fast (barely noticeable) onto the ship - // without this delay. - // - The scene after giving the sandwitch to the guards in the city. (see bug #1926838 "HoF: Animation plays too fast") - // This scene script calls o2_delay though, but since this updates the scene animation scripts again there is no delay - // for the animation. - if ((stackPos(0) == 2 && _mainCharacter.sceneId == 3) || (stackPos(0) == 3 && _mainCharacter.sceneId == 33) || - ((stackPos(0) == 1 || stackPos(0) == 2) && _mainCharacter.sceneId == 19)) + // - Where Marco is dangling from the flesh-eating plant (see bug + // #1923638 "HoF: Marco missing animation frames"). + // - After giving the ticket to the captain. He would move very fast + // (barely noticeable) onto the ship without this delay. + // - The scene after giving the sandwitch to the guards in the city. + // (see bug #1926838 "HoF: Animation plays too fast") + // This scene script calls o2_delay though, but since this updates + // the scene animation scripts again there is no delay for the + // animation. + // - When the sheriff enters the jail, either to lock you up or to throw + // away the key. (see bug #1926838 "HoF: Animation plays too fast"). + // Adding the workaround for the first case also fixes the second, + // even though stackPos(0) is different then. + if ((stackPos(0) == 2 && _mainCharacter.sceneId == 3) || + (stackPos(0) == 3 && _mainCharacter.sceneId == 33) || + ((stackPos(0) == 1 || stackPos(0) == 2) && _mainCharacter.sceneId == 19) || + (stackPos(0) = 1 && _mainCharacter.sceneId == 27)) _sceneSpecialScriptsTimer[_lastProcessedSceneScript] = _system->getMillis() + _tickLength * 6; _specialSceneScriptRunFlag = false; -- cgit v1.2.3 From d942fd42bb06c621a53eca06f40cb0fcffa54ea8 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Wed, 14 May 2008 05:47:29 +0000 Subject: Moved midiplugin.h to sound/ since it will be used for more than just the native MIDI drivers. svn-id: r32097 --- backends/midi/alsa.cpp | 4 +-- backends/midi/camd.cpp | 4 +-- backends/midi/coreaudio.cpp | 4 +-- backends/midi/coremidi.cpp | 4 +-- backends/midi/dmedia.cpp | 4 +-- backends/midi/midiplugin.h | 62 --------------------------------------------- backends/midi/quicktime.cpp | 4 +-- backends/midi/seq.cpp | 4 +-- backends/midi/timidity.cpp | 4 +-- backends/midi/windows.cpp | 4 +-- backends/midi/ypa1.cpp | 4 +-- backends/midi/zodiac.cpp | 4 +-- dists/msvc7/scummvm.vcproj | 2 +- dists/msvc71/scummvm.vcproj | 2 +- dists/msvc8/scummvm.vcproj | 2 +- dists/msvc9/scummvm.vcproj | 2 +- sound/midiplugin.h | 62 +++++++++++++++++++++++++++++++++++++++++++++ 17 files changed, 88 insertions(+), 88 deletions(-) delete mode 100644 backends/midi/midiplugin.h create mode 100644 sound/midiplugin.h diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp index 3139fadf24..fc43925643 100644 --- a/backends/midi/alsa.cpp +++ b/backends/midi/alsa.cpp @@ -26,9 +26,9 @@ #if defined(UNIX) && defined(USE_ALSA) -#include "backends/midi/midiplugin.h" #include "common/config-manager.h" #include "common/util.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #include @@ -241,7 +241,7 @@ void MidiDriver_ALSA::send_event(int do_flush) { // Plugin interface -class AlsaMidiPlugin : public MidiPlugin { +class AlsaMidiPlugin : public MidiPluginObject { public: virtual const char *getName() const { return "ALSA"; diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp index 11459af4f3..2b5ea0e065 100644 --- a/backends/midi/camd.cpp +++ b/backends/midi/camd.cpp @@ -26,9 +26,9 @@ #if defined(__amigaos4__) -#include "backends/midi/midiplugin.h" #include "common/endian.h" #include "common/util.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #include @@ -166,7 +166,7 @@ void MidiDriver_CAMD::closeAll() { // Plugin interface -class CamdMidiPlugin : public MidiPlugin { +class CamdMidiPlugin : public MidiPluginObject { public: virtual const char *getName() const { return "CAMD"; diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp index 1ff4a56a6b..0e8409b3d8 100644 --- a/backends/midi/coreaudio.cpp +++ b/backends/midi/coreaudio.cpp @@ -24,9 +24,9 @@ #ifdef MACOSX -#include "backends/midi/midiplugin.h" #include "common/config-manager.h" #include "common/util.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #include @@ -196,7 +196,7 @@ void MidiDriver_CORE::sysEx(const byte *msg, uint16 length) { // Plugin interface -class CoreAudioMidiPlugin : public MidiPlugin { +class CoreAudioMidiPlugin : public MidiPluginObject { public: virtual const char *getName() const { return "CoreAudio"; diff --git a/backends/midi/coremidi.cpp b/backends/midi/coremidi.cpp index 8df9ef79f4..b16e2a91af 100644 --- a/backends/midi/coremidi.cpp +++ b/backends/midi/coremidi.cpp @@ -24,9 +24,9 @@ #ifdef MACOSX -#include "backends/midi/midiplugin.h" #include "common/config-manager.h" #include "common/util.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #include @@ -179,7 +179,7 @@ void MidiDriver_CoreMIDI::sysEx(const byte *msg, uint16 length) { // Plugin interface -class CoreMIDIMidiPlugin : public MidiPlugin { +class CoreMIDIMidiPlugin : public MidiPluginObject { public: virtual const char *getName() const { return "CoreMIDI"; diff --git a/backends/midi/dmedia.cpp b/backends/midi/dmedia.cpp index f67784be7e..0891af4ecb 100644 --- a/backends/midi/dmedia.cpp +++ b/backends/midi/dmedia.cpp @@ -29,9 +29,9 @@ #if defined(IRIX) -#include "backends/midi/midiplugin.h" #include "common/scummsys.h" #include "common/util.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #include @@ -178,7 +178,7 @@ void MidiDriver_DMEDIA::sysEx (const byte *msg, uint16 length) { // Plugin interface -class DMediaMidiPlugin : public MidiPlugin { +class DMediaMidiPlugin : public MidiPluginObject { public: virtual const char *getName() const { return "DMedia"; diff --git a/backends/midi/midiplugin.h b/backends/midi/midiplugin.h deleted file mode 100644 index 0de14e8d55..0000000000 --- a/backends/midi/midiplugin.h +++ /dev/null @@ -1,62 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - */ - -#ifndef BACKENDS_MIDI_MIDIPLUGIN_H -#define BACKENDS_MIDI_MIDIPLUGIN_H - -#include "base/plugins.h" -#include "sound/mididrv.h" - -/** - * A MidiPlugin is essentially a factory for MidiDriver instances with the - * added ability of listing the available devices and their capabilities. - */ -class MidiPlugin : public PluginObject { -public: - virtual ~MidiPlugin() {} - - /** - * Returns a list of the available devices. The empty string means the - * default device. - */ - virtual Common::StringList getDevices() const { - Common::StringList dev; - dev.push_back(""); - return dev; - } - - /** - * Tries to instantiate an engine instance based on the settings of - * the currently active ConfMan target. That is, the MidiPlugin should - * query the ConfMan singleton for the device name, port, etc. - * - * @param mixer Pointer to the global Mixer object - * @param mididriver Pointer to a pointer which the MidiPlugin sets to - * the newly create MidiDriver, or 0 in case of an error - * @return a PluginError describing the error which occurred, or kNoError - */ - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const = 0; -}; - -#endif diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp index 1e0e76ee1a..592d86c76b 100644 --- a/backends/midi/quicktime.cpp +++ b/backends/midi/quicktime.cpp @@ -24,9 +24,9 @@ #if defined(MACOSX) || defined(macintosh) -#include "backends/midi/midiplugin.h" #include "common/endian.h" #include "common/util.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #if defined(MACOSX) @@ -253,7 +253,7 @@ void MidiDriver_QT::dispose() // Plugin interface -class QuickTimeMidiPlugin : public MidiPlugin { +class QuickTimeMidiPlugin : public MidiPluginObject { public: virtual const char *getName() const { return "QuickTime"; diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp index ec7f6b2f27..23baf60ea4 100644 --- a/backends/midi/seq.cpp +++ b/backends/midi/seq.cpp @@ -30,8 +30,8 @@ #if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__) -#include "backends/midi/midiplugin.h" #include "common/util.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #include @@ -173,7 +173,7 @@ void MidiDriver_SEQ::sysEx (const byte *msg, uint16 length) { // Plugin interface -class SeqMidiPlugin : public MidiPlugin { +class SeqMidiPlugin : public MidiPluginObject { public: virtual const char *getName() const { return "SEQ"; diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp index 8fc6fefd4d..f146900a12 100644 --- a/backends/midi/timidity.cpp +++ b/backends/midi/timidity.cpp @@ -36,8 +36,8 @@ #if defined (UNIX) -#include "backends/midi/midiplugin.h" #include "common/util.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #include @@ -514,7 +514,7 @@ void MidiDriver_TIMIDITY::sysEx(const byte *msg, uint16 length) { // Plugin interface -class TimidityMidiPlugin : public MidiPlugin { +class TimidityMidiPlugin : public MidiPluginObject { public: virtual const char *getName() const { return "TiMidity"; diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp index 4107c575ba..8c1d3bd9ed 100644 --- a/backends/midi/windows.cpp +++ b/backends/midi/windows.cpp @@ -28,7 +28,7 @@ // winnt.h defines ARRAYSIZE, but we want our own one... #undef ARRAYSIZE -#include "backends/midi/midiplugin.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #include @@ -147,7 +147,7 @@ void MidiDriver_WIN::check_error(MMRESULT result) { // Plugin interface -class WindowsMidiPlugin : public MidiPlugin { +class WindowsMidiPlugin : public MidiPluginObject { public: virtual const char *getName() const { return "Windows MIDI"; diff --git a/backends/midi/ypa1.cpp b/backends/midi/ypa1.cpp index 3ea7d2170f..416215424e 100644 --- a/backends/midi/ypa1.cpp +++ b/backends/midi/ypa1.cpp @@ -22,8 +22,8 @@ * $Id$ */ -#include "backends/midi/midiplugin.h" #include "common/util.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #include "Pa1Lib.h" @@ -106,7 +106,7 @@ void MidiDriver_YamahaPa1::send(uint32 b) { // Plugin interface -class YamahaPa1MidiPlugin : public MidiPlugin { +class YamahaPa1MidiPlugin : public MidiPluginObject { public: virtual const char *getName() const { return "Yamaha Pa1"; diff --git a/backends/midi/zodiac.cpp b/backends/midi/zodiac.cpp index 55148b113b..0cc848f1d5 100644 --- a/backends/midi/zodiac.cpp +++ b/backends/midi/zodiac.cpp @@ -22,8 +22,8 @@ * $Id$ */ -#include "backends/midi/midiplugin.h" #include "common/util.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #ifndef DISABLE_TAPWAVE @@ -124,7 +124,7 @@ void MidiDriver_Zodiac::sysEx(const byte *msg, uint16 length) { // Plugin interface -class ZodiacMidiPlugin : public MidiPlugin { +class ZodiacMidiPlugin : public MidiPluginObject { public: virtual const char *getName() const { return "Tapwave Zodiac"; diff --git a/dists/msvc7/scummvm.vcproj b/dists/msvc7/scummvm.vcproj index ee10120e92..d6fd1765d9 100644 --- a/dists/msvc7/scummvm.vcproj +++ b/dists/msvc7/scummvm.vcproj @@ -679,7 +679,7 @@ + RelativePath="..\..\sound\midiplugin.h"> diff --git a/dists/msvc71/scummvm.vcproj b/dists/msvc71/scummvm.vcproj index 08632490cc..dcd7b4658f 100644 --- a/dists/msvc71/scummvm.vcproj +++ b/dists/msvc71/scummvm.vcproj @@ -693,7 +693,7 @@ + RelativePath="..\..\sound\midiplugin.h"> diff --git a/dists/msvc8/scummvm.vcproj b/dists/msvc8/scummvm.vcproj index af1c902889..5bdc9b0909 100644 --- a/dists/msvc8/scummvm.vcproj +++ b/dists/msvc8/scummvm.vcproj @@ -939,7 +939,7 @@ Name="midi" > getTimerManager(); tm->handler(); return t; @@ -183,8 +182,7 @@ void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) { } -void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) -{ +void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { // consolePrintf("Copy rect %d, %d %d, %d ", x, y, w, h); if (w <= 1) return; @@ -229,8 +227,7 @@ void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int } -void OSystem_DS::updateScreen() -{ +void OSystem_DS::updateScreen() { if (_frameBufferExists) { @@ -253,30 +250,25 @@ void OSystem_DS::setShakePos(int shakeOffset) { DS::setShakePos(shakeOffset); } -void OSystem_DS::showOverlay () -{ +void OSystem_DS::showOverlay () { // consolePrintf("showovl\n"); DS::displayMode16Bit(); } -void OSystem_DS::hideOverlay () -{ +void OSystem_DS::hideOverlay () { DS::displayMode8Bit(); } -void OSystem_DS::clearOverlay () -{ +void OSystem_DS::clearOverlay () { memset((u16 *) DS::get16BitBackBuffer(), 0, 512 * 256 * 2); // consolePrintf("clearovl\n"); } -void OSystem_DS::grabOverlay (OverlayColor *buf, int pitch) -{ +void OSystem_DS::grabOverlay (OverlayColor *buf, int pitch) { // consolePrintf("grabovl\n"); } -void OSystem_DS::copyRectToOverlay (const OverlayColor *buf, int pitch, int x, int y, int w, int h) -{ +void OSystem_DS::copyRectToOverlay (const OverlayColor *buf, int pitch, int x, int y, int w, int h) { u16* bg = (u16 *) DS::get16BitBackBuffer(); u16* src = (u16 *) buf; @@ -313,27 +305,23 @@ void OSystem_DS::copyRectToOverlay (const OverlayColor *buf, int pitch, int x, i } -int16 OSystem_DS::getOverlayHeight() -{ +int16 OSystem_DS::getOverlayHeight() { // consolePrintf("getovlheight\n"); return getHeight(); } -int16 OSystem_DS::getOverlayWidth() -{ +int16 OSystem_DS::getOverlayWidth() { // consolePrintf("getovlwid\n"); return getWidth(); } -bool OSystem_DS::showMouse(bool visible) -{ +bool OSystem_DS::showMouse(bool visible) { DS::setShowCursor(visible); return true; } -void OSystem_DS::warpMouse(int x, int y) -{ +void OSystem_DS::warpMouse(int x, int y) { } void OSystem_DS::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int targetCursorScale) { @@ -344,8 +332,7 @@ void OSystem_DS::addEvent(Common::Event& e) { eventQueue[queuePos++] = e; } -bool OSystem_DS::pollEvent(Common::Event &event) -{ +bool OSystem_DS::pollEvent(Common::Event &event) { if (lastPenFrame != DS::getMillis()) { @@ -398,13 +385,11 @@ bool OSystem_DS::pollEvent(Common::Event &event) return false; } -uint32 OSystem_DS::getMillis() -{ +uint32 OSystem_DS::getMillis() { return DS::getMillis(); } -void OSystem_DS::delayMillis(uint msecs) -{ +void OSystem_DS::delayMillis(uint msecs) { int st = getMillis(); DS::addEventsToQueue(); DS::CD::update(); @@ -424,25 +409,20 @@ void OSystem_DS::getTimeAndDate(struct tm &t) const { t = *localtime(&curTime); } -OSystem::MutexRef OSystem_DS::createMutex(void) -{ +OSystem::MutexRef OSystem_DS::createMutex(void) { return NULL; } -void OSystem_DS::lockMutex(MutexRef mutex) -{ +void OSystem_DS::lockMutex(MutexRef mutex) { } -void OSystem_DS::unlockMutex(MutexRef mutex) -{ +void OSystem_DS::unlockMutex(MutexRef mutex) { } -void OSystem_DS::deleteMutex(MutexRef mutex) -{ +void OSystem_DS::deleteMutex(MutexRef mutex) { } -void OSystem_DS::clearSoundCallback() -{ +void OSystem_DS::clearSoundCallback() { consolePrintf("Clearing sound callback"); // DS::setSoundProc(NULL, NULL); } @@ -452,23 +432,19 @@ int OSystem_DS::getOutputSampleRate() const return DS::getSoundFrequency(); } -bool OSystem_DS::openCD(int drive) -{ +bool OSystem_DS::openCD(int drive) { return DS::CD::checkCD(); } -bool OSystem_DS::pollCD() -{ +bool OSystem_DS::pollCD() { return DS::CD::isPlaying(); } -void OSystem_DS::playCD(int track, int num_loops, int start_frame, int duration) -{ +void OSystem_DS::playCD(int track, int num_loops, int start_frame, int duration) { DS::CD::playTrack(track, num_loops, start_frame, duration); } -void OSystem_DS::stopCD() -{ +void OSystem_DS::stopCD() { DS::CD::stopTrack(); } @@ -476,8 +452,7 @@ void OSystem_DS::updateCD() { } -void OSystem_DS::quit() -{ +void OSystem_DS::quit() { /* consolePrintf("Soft resetting..."); IPC->reset = 1; REG_IE = 0; @@ -486,16 +461,13 @@ void OSystem_DS::quit() swiSoftReset();*/ } -void OSystem_DS::setWindowCaption(const char *caption) -{ +void OSystem_DS::setWindowCaption(const char *caption) { } -void OSystem_DS::displayMessageOnOSD(const char *msg) -{ +void OSystem_DS::displayMessageOnOSD(const char *msg) { } -Common::SaveFileManager* OSystem_DS::getSavefileManager() -{ +Common::SaveFileManager* OSystem_DS::getSavefileManager() { bool forceSram; if (ConfMan.hasKey("forcesramsave", "ds")) { -- cgit v1.2.3 From c3bdf1c75f688d1825f0f304a964d227ea94f201 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 14 May 2008 07:17:27 +0000 Subject: Removed obsolete file svn-id: r32101 --- engines/made/scriptfuncs.cpp | 866 ------------------------------------------- 1 file changed, 866 deletions(-) delete mode 100644 engines/made/scriptfuncs.cpp diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp deleted file mode 100644 index 7fc61ee410..0000000000 --- a/engines/made/scriptfuncs.cpp +++ /dev/null @@ -1,866 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/endian.h" -#include "common/util.h" -#include "common/events.h" - -#include "graphics/cursorman.h" - -#include "made/made.h" -#include "made/resource.h" -#include "made/database.h" -#include "made/screen.h" -#include "made/script.h" -#include "made/pmvplayer.h" -#include "made/scriptfuncs.h" -#include "made/music.h" - -namespace Made { - -int16 ScriptFunctions::callFunction(uint16 index, int16 argc, int16 *argv) { - if (index >= _externalFuncs.size()) { - // TODO: ERROR! - return 0; - } - - fflush(stdout); - //g_system->delayMillis(2000); - - return (*_externalFuncs[index])(argc, argv); -} - -typedef Common::Functor2Mem ExternalFuncRtz; -#define External(x) ExternalFuncRtz(this, &ScriptFunctionsRtz::x) -void ScriptFunctionsRtz::setupExternalsTable() { - static const ExternalFuncRtz externalsTable[] = { - External(o1_SYSTEM), - External(o1_INITGRAF), - External(o1_RESTOREGRAF), - External(o1_DRAWPIC), - External(o1_CLS), - External(o1_SHOWPAGE), - External(o1_EVENT), - External(o1_EVENTX), - External(o1_EVENTY), - External(o1_EVENTKEY), - External(o1_VISUALFX), - External(o1_PLAYSND), - External(o1_PLAYMUS), - External(o1_STOPMUS), - External(o1_ISMUS), - External(o1_TEXTPOS), - External(o1_FLASH), - External(o1_PLAYNOTE), - External(o1_STOPNOTE), - External(o1_PLAYTELE), - External(o1_STOPTELE), - External(o1_HIDECURS), - External(o1_SHOWCURS), - External(o1_MUSICBEAT), - External(o1_SCREENLOCK), - External(o1_ADDSPRITE), - External(o1_FREEANIM), - External(o1_DRAWSPRITE), - External(o1_ERASESPRITES), - External(o1_UPDATESPRITES), - External(o1_GETTIMER), - External(o1_SETTIMER), - External(o1_RESETTIMER), - External(o1_ALLOCTIMER), - External(o1_FREETIMER), - External(o1_PALETTELOCK), - External(o1_FONT), - External(o1_DRAWTEXT), - External(o1_HOMETEXT), - External(o1_TEXTRECT), - External(o1_TEXTXY), - External(o1_DROPSHADOW), - External(o1_TEXTCOLOR), - External(o1_OUTLINE), - External(o1_LOADCURSOR), - External(o1_SETGROUND), - External(o1_RESTEXT), - External(o1_CLIPAREA), - External(o1_SETCLIP), - External(o1_ISSND), - External(o1_STOPSND), - External(o1_PLAYVOICE), - External(o1_CDPLAY), - External(o1_STOPCD), - External(o1_CDSTATUS), - External(o1_CDTIME), - External(o1_CDPLAYSEG), - External(o1_PRINTF), - External(o1_MONOCLS), - External(o1_SNDENERGY), - External(o1_CLEARTEXT), - External(o1_ANIMTEXT), - External(o1_TEXTWIDTH), - External(o1_PLAYMOVIE), - External(o1_LOADSND), - External(o1_LOADMUS), - External(o1_LOADPIC), - External(o1_MUSICVOL), - External(o1_RESTARTEVENTS), - External(o1_PLACESPRITE), - External(o1_PLACETEXT), - External(o1_DELETECHANNEL), - External(o1_CHANNELTYPE), - External(o1_SETSTATE), - External(o1_SETLOCATION), - External(o1_SETCONTENT), - External(o1_EXCLUDEAREA), - External(o1_SETEXCLUDE), - External(o1_GETSTATE), - External(o1_PLACEANIM), - External(o1_SETFRAME), - External(o1_GETFRAME), - External(o1_GETFRAMECOUNT), - External(o1_PICWIDTH), - External(o1_PICHEIGHT), - External(o1_SOUNDRATE), - External(o1_DRAWANIMPIC), - External(o1_LOADANIM), - External(o1_READTEXT), - External(o1_READMENU), - External(o1_DRAWMENU), - External(o1_MENUCOUNT), - External(o1_SAVEGAME), - External(o1_LOADGAME), - External(o1_GAMENAME), - External(o1_SHAKESCREEN), - External(o1_PLACEMENU), - External(o1_SETVOLUME), - External(o1_WHATSYNTH), - External(o1_SLOWSYSTEM) - }; - - for (int i = 0; i < ARRAYSIZE(externalsTable); ++i) - _externalFuncs.push_back(&externalsTable[i]); - -} -#undef External - -int16 ScriptFunctionsRtz::o1_SYSTEM(int16 argc, int16 *argv) { - // This opcode is empty. - return 0; -} - -int16 ScriptFunctionsRtz::o1_INITGRAF(int16 argc, int16 *argv) { - // This opcode is empty. - return 0; -} - -int16 ScriptFunctionsRtz::o1_RESTOREGRAF(int16 argc, int16 *argv) { - // This opcode is empty. - return 0; -} - -int16 ScriptFunctionsRtz::o1_DRAWPIC(int16 argc, int16 *argv) { - return _vm->_screen->drawPic(argv[4], argv[3], argv[2], argv[1], argv[0]); -} - -int16 ScriptFunctionsRtz::o1_CLS(int16 argc, int16 *argv) { - _vm->_screen->clearScreen(); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SHOWPAGE(int16 argc, int16 *argv) { - _vm->_screen->show(); - return 0; -} - -int16 ScriptFunctionsRtz::o1_EVENT(int16 argc, int16 *argv) { - - Common::Event event; - Common::EventManager *eventMan = g_system->getEventManager(); - - int16 eventNum = 0; - - if (eventMan->pollEvent(event)) { - switch (event.type) { - - case Common::EVENT_MOUSEMOVE: - _vm->_eventMouseX = event.mouse.x; - _vm->_eventMouseY = event.mouse.y; - break; - - case Common::EVENT_LBUTTONDOWN: - eventNum = 1; - break; - - case Common::EVENT_RBUTTONDOWN: - eventNum = 3; - break; - - case Common::EVENT_KEYDOWN: - _vm->_eventKey = event.kbd.ascii; - eventNum = 5; - break; - - case Common::EVENT_QUIT: - // TODO: Exit more gracefully. - g_system->quit(); - break; - - default: - break; - - } - } - - _vm->_system->updateScreen(); - - return eventNum; -} - -int16 ScriptFunctionsRtz::o1_EVENTX(int16 argc, int16 *argv) { - return _vm->_eventMouseX; -} - -int16 ScriptFunctionsRtz::o1_EVENTY(int16 argc, int16 *argv) { - return _vm->_eventMouseY; -} - -int16 ScriptFunctionsRtz::o1_EVENTKEY(int16 argc, int16 *argv) { - return _vm->_eventKey; -} - -int16 ScriptFunctionsRtz::o1_VISUALFX(int16 argc, int16 *argv) { - _vm->_screen->setVisualEffectNum(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLAYSND(int16 argc, int16 *argv) { - int soundNum = argv[0]; - bool loop = false; - - if (argc > 1) { - soundNum = argv[1]; - loop = (argv[0] == 1); - } - - if (soundNum > 0) { - if (!_vm->_mixer->isSoundHandleActive(_audioStreamHandle)) { - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, - _vm->_res->getSound(soundNum)->getAudioStream(_vm->_soundRate, loop)); - } - } - - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLAYMUS(int16 argc, int16 *argv) { - int16 musicNum = argv[0]; - if (musicNum > 0) { - XmidiResource *xmidi = _vm->_res->getXmidi(musicNum); - _vm->_music->play(xmidi); - _vm->_res->freeResource(xmidi); - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_STOPMUS(int16 argc, int16 *argv) { - _vm->_music->stop(); - return 0; -} - -int16 ScriptFunctionsRtz::o1_ISMUS(int16 argc, int16 *argv) { - if (_vm->_music->isPlaying()) - return 1; - else - return 0; -} - -int16 ScriptFunctionsRtz::o1_TEXTPOS(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_TEXTPOS"); - // This seems to be some kind of low-level opcode. - // The original engine calls int 10h to set the VGA cursor position. - return 0; -} - -int16 ScriptFunctionsRtz::o1_FLASH(int16 argc, int16 *argv) { - _vm->_screen->flash(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLAYNOTE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_PLAYNOTE"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_STOPNOTE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_STOPNOTE"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLAYTELE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_PLAYTELE"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_STOPTELE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_STOPTELE"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_HIDECURS(int16 argc, int16 *argv) { - _vm->_system->showMouse(false); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SHOWCURS(int16 argc, int16 *argv) { - _vm->_system->showMouse(true); - return 0; -} - -int16 ScriptFunctionsRtz::o1_MUSICBEAT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_MUSICBEAT"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SCREENLOCK(int16 argc, int16 *argv) { - _vm->_screen->setScreenLock(argv[0] != 0); - return 0; -} - -int16 ScriptFunctionsRtz::o1_ADDSPRITE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_ADDSPRITE"); - //_vm->_screen->addSprite(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_FREEANIM(int16 argc, int16 *argv) { - _vm->_screen->clearChannels(); - return 0; -} - -int16 ScriptFunctionsRtz::o1_DRAWSPRITE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_DRAWSPRITE"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_ERASESPRITES(int16 argc, int16 *argv) { - _vm->_screen->clearChannels(); - return 0; -} - -int16 ScriptFunctionsRtz::o1_UPDATESPRITES(int16 argc, int16 *argv) { - _vm->_screen->updateSprites(); - return 0; -} - -int16 ScriptFunctionsRtz::o1_GETTIMER(int16 argc, int16 *argv) { - return _vm->getTimer(argv[0]); -} - -int16 ScriptFunctionsRtz::o1_SETTIMER(int16 argc, int16 *argv) { - _vm->setTimer(argv[1], argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_RESETTIMER(int16 argc, int16 *argv) { - _vm->resetTimer(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_ALLOCTIMER(int16 argc, int16 *argv) { - int16 timerNum = _vm->allocTimer(); - return timerNum; -} - -int16 ScriptFunctionsRtz::o1_FREETIMER(int16 argc, int16 *argv) { - _vm->freeTimer(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PALETTELOCK(int16 argc, int16 *argv) { - _vm->_screen->setPaletteLock(argv[0] != 0); - return 0; -} - -int16 ScriptFunctionsRtz::o1_FONT(int16 argc, int16 *argv) { - _vm->_screen->setFont(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_DRAWTEXT(int16 argc, int16 *argv) { - Object *obj = _vm->_dat->getObject(argv[argc - 1]); - const char *text = obj->getString(); - _vm->_screen->printText(text); - return 0; -} - -int16 ScriptFunctionsRtz::o1_HOMETEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_HOMETEXT"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_TEXTRECT(int16 argc, int16 *argv) { - int16 x1 = CLIP(argv[4], 1, 318); - int16 y1 = CLIP(argv[3], 1, 198); - int16 x2 = CLIP(argv[2], 1, 318); - int16 y2 = CLIP(argv[1], 1, 198); - //int16 textValue = argv[0]; - // TODO: textValue - _vm->_screen->setTextRect(Common::Rect(x1, y1, x2, y2)); - return 0; -} - -int16 ScriptFunctionsRtz::o1_TEXTXY(int16 argc, int16 *argv) { - int16 x = CLIP(argv[1], 1, 318); - int16 y = CLIP(argv[0], 1, 198); - _vm->_screen->setTextXY(x, y); - return 0; -} - -int16 ScriptFunctionsRtz::o1_DROPSHADOW(int16 argc, int16 *argv) { - // if the drop shadow color is -1, then text drop shadow is disabled - // when font drop shadow is enabled, outline is disabled - _vm->_screen->setDropShadowColor(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_TEXTCOLOR(int16 argc, int16 *argv) { - _vm->_screen->setTextColor(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_OUTLINE(int16 argc, int16 *argv) { - // if the outline color is -1, then text outline is disabled - // when font outline is enabled, drop shadow is disabled - _vm->_screen->setOutlineColor(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_LOADCURSOR(int16 argc, int16 *argv) { - PictureResource *flex = _vm->_res->getPicture(argv[2]); - Graphics::Surface *surf = flex->getPicture(); - CursorMan.replaceCursor((const byte *)surf->pixels, surf->w, surf->h, argv[1], argv[0], 0); - CursorMan.showMouse(true); - _vm->_res->freeResource(flex); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SETGROUND(int16 argc, int16 *argv) { - _vm->_screen->setGround(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_RESTEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_RESTEXT"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_CLIPAREA(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_CLIPAREA"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SETCLIP(int16 argc, int16 *argv) { - _vm->_screen->setClip(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_ISSND(int16 argc, int16 *argv) { - if (_vm->_mixer->isSoundHandleActive(_audioStreamHandle)) - return 1; - else - return 0; -} - -int16 ScriptFunctionsRtz::o1_STOPSND(int16 argc, int16 *argv) { - _vm->_mixer->stopHandle(_audioStreamHandle); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLAYVOICE(int16 argc, int16 *argv) { - if (argv[0] > 0) { - if (!_vm->_mixer->isSoundHandleActive(_voiceStreamHandle)) { - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_voiceStreamHandle, - _vm->_res->getSound(argv[0])->getAudioStream(_vm->_soundRate, false)); - } - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_CDPLAY(int16 argc, int16 *argv) { - // This one is called loads of times, so it has been commented out to reduce spam - //warning("Unimplemented opcode: o1_CDPLAY"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_STOPCD(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_STOPCD"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_CDSTATUS(int16 argc, int16 *argv) { - // This one is called loads of times, so it has been commented out to reduce spam - //warning("Unimplemented opcode: o1_CDSTATUS"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_CDTIME(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_CDTIME"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_CDPLAYSEG(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_CDPLAYSEG"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PRINTF(int16 argc, int16 *argv) { - Object *obj = _vm->_dat->getObject(argv[argc - 1]); - const char *text = obj->getString(); - debug(4, "--> text = %s", text); - return 0; -} - -int16 ScriptFunctionsRtz::o1_MONOCLS(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_MONOCLS"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SNDENERGY(int16 argc, int16 *argv) { - // This is called while in-game voices are played - // Not sure what it's used for - // -> It's used to animate mouths when NPCs are talking - // Commented out to reduce spam - //warning("Unimplemented opcode: o1_SNDENERGY"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_CLEARTEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_CLEARTEXT"); - return 1; -} - -int16 ScriptFunctionsRtz::o1_ANIMTEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_ANIMTEXT"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_TEXTWIDTH(int16 argc, int16 *argv) { - int16 width = 0; - if (argv[1] > 0) { - Object *obj = _vm->_dat->getObject(argv[1]); - const char *text = obj->getString(); - width = _vm->_screen->getTextWidth(argv[0], text); - } - return width; -} - -int16 ScriptFunctionsRtz::o1_PLAYMOVIE(int16 argc, int16 *argv) { - const char *movieName = _vm->_dat->getObject(argv[1])->getString(); - _vm->_pmvPlayer->play(movieName); - return 0; -} - -int16 ScriptFunctionsRtz::o1_LOADSND(int16 argc, int16 *argv) { - SoundResource *sound = _vm->_res->getSound(argv[0]); - if (sound) { - _vm->_res->freeResource(sound); - return 1; - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_LOADMUS(int16 argc, int16 *argv) { - XmidiResource *xmidi = _vm->_res->getXmidi(argv[0]); - if (xmidi) { - _vm->_res->freeResource(xmidi); - return 1; - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_LOADPIC(int16 argc, int16 *argv) { - PictureResource *flex = _vm->_res->getPicture(argv[0]); - if (flex) { - _vm->_res->freeResource(flex); - return 1; - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_MUSICVOL(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_MUSICVOL"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_RESTARTEVENTS(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_RESTARTEVENTS"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLACESPRITE(int16 argc, int16 *argv) { - return _vm->_screen->placeSprite(argv[3], argv[2], argv[1], argv[0]); -} - -int16 ScriptFunctionsRtz::o1_PLACETEXT(int16 argc, int16 *argv) { - return _vm->_screen->placeText(argv[6], argv[5], argv[4], argv[3], argv[2], argv[1], argv[0]); -} - -int16 ScriptFunctionsRtz::o1_DELETECHANNEL(int16 argc, int16 *argv) { - _vm->_screen->deleteChannel(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_CHANNELTYPE(int16 argc, int16 *argv) { - return _vm->_screen->getChannelType(argv[0]); -} - -int16 ScriptFunctionsRtz::o1_SETSTATE(int16 argc, int16 *argv) { - _vm->_screen->setChannelState(argv[1], argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SETLOCATION(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_SETLOCATION"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SETCONTENT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_SETCONTENT"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_EXCLUDEAREA(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_EXCLUDEAREA"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SETEXCLUDE(int16 argc, int16 *argv) { - _vm->_screen->setExclude(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_GETSTATE(int16 argc, int16 *argv) { - return _vm->_screen->getChannelState(argv[0]); -} - -int16 ScriptFunctionsRtz::o1_PLACEANIM(int16 argc, int16 *argv) { - return _vm->_screen->placeAnim(argv[4], argv[3], argv[2], argv[1], argv[0]); -} - -int16 ScriptFunctionsRtz::o1_SETFRAME(int16 argc, int16 *argv) { - _vm->_screen->setAnimFrame(argv[1], argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_GETFRAME(int16 argc, int16 *argv) { - return _vm->_screen->getAnimFrame(argv[0]); -} - -int16 ScriptFunctionsRtz::o1_GETFRAMECOUNT(int16 argc, int16 *argv) { - debug(4, "anim = %04X\n", argv[0]); - int16 frameCount = _vm->_screen->getAnimFrameCount(argv[0]); - debug(4, "frameCount = %04X\n", frameCount); - return frameCount; -} - -int16 ScriptFunctionsRtz::o1_PICWIDTH(int16 argc, int16 *argv) { - int16 width = 0; - PictureResource *flex = _vm->_res->getPicture(argv[0]); - if (flex) { - width = flex->getPicture()->w; - _vm->_res->freeResource(flex); - } - return width; -} - -int16 ScriptFunctionsRtz::o1_PICHEIGHT(int16 argc, int16 *argv) { - int16 height = 0; - PictureResource *flex = _vm->_res->getPicture(argv[0]); - if (flex) { - height = flex->getPicture()->h; - _vm->_res->freeResource(flex); - } - return height; -} - -int16 ScriptFunctionsRtz::o1_SOUNDRATE(int16 argc, int16 *argv) { - _vm->_soundRate = argv[0]; - return 1; -} - -int16 ScriptFunctionsRtz::o1_DRAWANIMPIC(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_DRAWANIMPIC"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_LOADANIM(int16 argc, int16 *argv) { - AnimationResource *anim = _vm->_res->getAnimation(argv[0]); - if (anim) { - _vm->_res->freeResource(anim); - return 1; - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_READTEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_READTEXT"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_READMENU(int16 argc, int16 *argv) { - 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, "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 length; -} - -int16 ScriptFunctionsRtz::o1_DRAWMENU(int16 argc, int16 *argv) { - int16 menuIndex = argv[1]; - int16 textIndex = argv[0]; - MenuResource *menu = _vm->_res->getMenu(menuIndex); - if (menu) { - const char *text = menu->getString(textIndex); - if (text) - _vm->_screen->printText(text); - _vm->_res->freeResource(menu); - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_MENUCOUNT(int16 argc, int16 *argv) { - int16 menuIndex = argv[0]; - int16 count = 0; - MenuResource *menu = _vm->_res->getMenu(menuIndex); - if (menu) { - count = menu->getCount(); - _vm->_res->freeResource(menu); - } - return count; -} - -int16 ScriptFunctionsRtz::o1_SAVEGAME(int16 argc, int16 *argv) { - - int16 saveNum = argv[2]; - int16 descObjectIndex = argv[1]; - int16 version = argv[0]; - - if (saveNum > 999) - return 6; - - Object *obj = _vm->_dat->getObject(descObjectIndex); - const char *description = obj->getString(); - - // TODO: Use better filename - char filename[256]; - snprintf(filename, 256, "rtz.%03d", saveNum); - - return _vm->_dat->savegame(filename, description, version); - -} - -int16 ScriptFunctionsRtz::o1_LOADGAME(int16 argc, int16 *argv) { - - int16 saveNum = argv[1]; - int16 version = argv[0]; - - if (saveNum > 999) - return 1; - - // TODO: Use better filename - char filename[256]; - snprintf(filename, 256, "rtz.%03d", saveNum); - - return _vm->_dat->loadgame(filename, version); - -} - -int16 ScriptFunctionsRtz::o1_GAMENAME(int16 argc, int16 *argv) { - - int16 descObjectIndex = argv[2]; - int16 saveNum = argv[1]; - /*int16 version = argv[0];*/ - Common::String description; - - if (saveNum > 999) - return 1; - - // TODO: Use better filename - char filename[256]; - snprintf(filename, 256, "rtz.%03d", saveNum); - - Object *obj = _vm->_dat->getObject(descObjectIndex); - - if (_vm->_dat->getSavegameDescription(filename, description)) { - obj->setString(description.c_str()); - return 0; - } else { - obj->setString(""); - return 1; - } - -} - -int16 ScriptFunctionsRtz::o1_SHAKESCREEN(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_SHAKESCREEN"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLACEMENU(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_PLACEMENU"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SETVOLUME(int16 argc, int16 *argv) { - _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, argv[0] * 25); - _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, argv[0] * 25); - return 0; -} - -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; -} - -int16 ScriptFunctionsRtz::o1_SLOWSYSTEM(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_SLOWSYSTEM"); - return 0; -} - -} // End of namespace Made -- cgit v1.2.3 From ec0e836925152b219f4f27030819059b5aa52856 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 14 May 2008 07:27:31 +0000 Subject: Added a FIXME regarding commit #32096 svn-id: r32102 --- engines/kyra/script_hof.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index 111d980a52..7d1f41273d 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -909,6 +909,10 @@ int KyraEngine_HoF::o2_updateSceneAnim(EMCState *script) { // away the key. (see bug #1926838 "HoF: Animation plays too fast"). // Adding the workaround for the first case also fixes the second, // even though stackPos(0) is different then. + + // FIXME: Shouldn't the check for scene 27 be stackPos(0) == 1? Or is the change to + // stackPos(0) intentional here? + if ((stackPos(0) == 2 && _mainCharacter.sceneId == 3) || (stackPos(0) == 3 && _mainCharacter.sceneId == 33) || ((stackPos(0) == 1 || stackPos(0) == 2) && _mainCharacter.sceneId == 19) || -- cgit v1.2.3 From 97855800b6592cf9c9bc2b010c13cdd07575f5e2 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Wed, 14 May 2008 09:43:41 +0000 Subject: Oops, I definitely meant for that to be '==', not '='. I guess this is what it should look like, but I can't actually test (or even compile) it right now. svn-id: r32103 --- engines/kyra/script_hof.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index 7d1f41273d..e481aedb07 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -907,17 +907,13 @@ int KyraEngine_HoF::o2_updateSceneAnim(EMCState *script) { // animation. // - When the sheriff enters the jail, either to lock you up or to throw // away the key. (see bug #1926838 "HoF: Animation plays too fast"). - // Adding the workaround for the first case also fixes the second, - // even though stackPos(0) is different then. - - // FIXME: Shouldn't the check for scene 27 be stackPos(0) == 1? Or is the change to - // stackPos(0) intentional here? if ((stackPos(0) == 2 && _mainCharacter.sceneId == 3) || (stackPos(0) == 3 && _mainCharacter.sceneId == 33) || ((stackPos(0) == 1 || stackPos(0) == 2) && _mainCharacter.sceneId == 19) || - (stackPos(0) = 1 && _mainCharacter.sceneId == 27)) + ((stackPos(0) == 1 || stackPos(0) == 2) && _mainCharacter.sceneId == 27)) { _sceneSpecialScriptsTimer[_lastProcessedSceneScript] = _system->getMillis() + _tickLength * 6; + } _specialSceneScriptRunFlag = false; return 0; -- cgit v1.2.3 From 0ec51de2721d7b670c997b7a3d1bc53f432d6e6b Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 14 May 2008 09:54:15 +0000 Subject: - Added some visual effects (palette fading etc.) - Moved Screen::getAnimFrameCount directly into o1_GETFRAMECOUNT - Renamed variables/cleanup svn-id: r32104 --- engines/made/module.mk | 1 + engines/made/screen.cpp | 134 ++++++++++----------- engines/made/screen.h | 24 ++-- engines/made/screenfx.cpp | 254 +++++++++++++++++++++++++++++++++++++++ engines/made/screenfx.h | 63 ++++++++++ engines/made/scriptfuncs_rtz.cpp | 8 +- 6 files changed, 408 insertions(+), 76 deletions(-) create mode 100644 engines/made/screenfx.cpp create mode 100644 engines/made/screenfx.h diff --git a/engines/made/module.mk b/engines/made/module.mk index 164e1bfba4..8d38192af7 100644 --- a/engines/made/module.mk +++ b/engines/made/module.mk @@ -10,6 +10,7 @@ MODULE_OBJS = \ redreader.o \ resource.o \ screen.o \ + screenfx.o \ script.o \ scriptfuncs_lgop2.o \ scriptfuncs_mhne.o \ diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 974dc4b132..563e059309 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -32,18 +32,18 @@ namespace Made { Screen::Screen(MadeEngine *vm) : _vm(vm) { - _screen1 = new Graphics::Surface(); - _screen1->create(320, 200, 1); + _backgroundScreen = new Graphics::Surface(); + _backgroundScreen->create(320, 200, 1); - _screen2 = new Graphics::Surface(); - _screen2->create(320, 200, 1); + _workScreen = new Graphics::Surface(); + _workScreen->create(320, 200, 1); - _clipInfo1.clipRect = Common::Rect(320, 200); - _clipInfo2.clipRect = Common::Rect(320, 200); + _backgroundScreenDrawCtx.clipRect = Common::Rect(320, 200); + _workScreenDrawCtx.clipRect = Common::Rect(320, 200); - _clipInfo1.destSurface = _screen1; - _clipInfo2.destSurface = _screen2; - _clipArea.destSurface = _screen2; + _backgroundScreenDrawCtx.destSurface = _backgroundScreen; + _workScreenDrawCtx.destSurface = _workScreen; + _clipArea.destSurface = _workScreen; // FIXME: Screen mask is only needed in v2 games _screenMask = new Graphics::Surface(); @@ -70,6 +70,7 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { _mask = 0; _visualEffectNum = 0; + _fx = new ScreenEffects(this); _textX = 0; _textY = 0; @@ -81,20 +82,21 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { _font = NULL; _currentFontNum = 0; _fontDrawCtx.clipRect = Common::Rect(320, 200); - _fontDrawCtx.destSurface = _screen1; + _fontDrawCtx.destSurface = _backgroundScreen; clearChannels(); } Screen::~Screen() { - delete _screen1; - delete _screen2; + delete _backgroundScreen; + delete _workScreen; delete _screenMask; + delete _fx; } void Screen::clearScreen() { - _screen1->fillRect(Common::Rect(0, 0, 320, 200), 0); - _screen2->fillRect(Common::Rect(0, 0, 320, 200), 0); + _backgroundScreen->fillRect(Common::Rect(0, 0, 320, 200), 0); + _workScreen->fillRect(Common::Rect(0, 0, 320, 200), 0); _screenMask->fillRect(Common::Rect(0, 0, 320, 200), 0); _mask = 0; _needPalette = true; @@ -269,6 +271,20 @@ void Screen::setChannelUseMask(uint16 channelIndex) { _channels[channelIndex - 1].mask = _mask; } +void Screen::setChannelOffsets(uint16 channelIndex, int16 xofs, int16 yofs) { + if (channelIndex < 1 || channelIndex >= 100) + return; + _channels[channelIndex - 1].xofs = xofs; + _channels[channelIndex - 1].yofs = yofs; +} + +void Screen::getChannelOffsets(uint16 channelIndex, int16 &xofs, int16 &yofs) { + if (channelIndex < 1 || channelIndex >= 100) + return; + xofs = _channels[channelIndex - 1].xofs; + yofs = _channels[channelIndex - 1].yofs; +} + void Screen::drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask, int16 excludeStateMask) { for (int i = 0; i <= 3; i++) @@ -301,7 +317,7 @@ void Screen::drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask drawFlex(_channels[i].index, _channels[i].x, _channels[i].y, flipX, flipY, _channels[i].mask, clipInfo); } break; - + case 2: // drawObjectText printObjectText(_channels[i].index, _channels[i].x, _channels[i].y, _channels[i].fontNum, _channels[i].textColor, _channels[i].outlineColor, clipInfo); break; @@ -338,12 +354,12 @@ void Screen::drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask void Screen::updateSprites() { // TODO: This needs some more work, dirty rectangles are currently not used - memcpy(_screen2->pixels, _screen1->pixels, 64000); + memcpy(_workScreen->pixels, _backgroundScreen->pixels, 64000); - drawSpriteChannels(_clipInfo1, 3, 0); - drawSpriteChannels(_clipInfo2, 1, 2); + drawSpriteChannels(_backgroundScreenDrawCtx, 3, 0); + drawSpriteChannels(_workScreenDrawCtx, 1, 2); - _vm->_system->copyRectToScreen((const byte*)_screen2->pixels, _screen2->pitch, 0, 0, _screen2->w, _screen2->h); + _vm->_system->copyRectToScreen((const byte*)_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); } @@ -395,7 +411,7 @@ void Screen::drawAnimFrame(uint16 animIndex, int16 x, int16 y, int16 frameNum, i } uint16 Screen::drawPic(uint16 index, int16 x, int16 y, int16 flipX, int16 flipY) { - drawFlex(index, x, y, flipX, flipY, 0, _clipInfo1); + drawFlex(index, x, y, flipX, flipY, 0, _backgroundScreenDrawCtx); return 0; } @@ -405,13 +421,13 @@ uint16 Screen::drawMask(uint16 index, int16 x, int16 y) { } uint16 Screen::drawAnimPic(uint16 animIndex, int16 x, int16 y, int16 frameNum, int16 flipX, int16 flipY) { - drawAnimFrame(animIndex, x, y, frameNum, flipX, flipY, _clipInfo1); + drawAnimFrame(animIndex, x, y, frameNum, flipX, flipY, _backgroundScreenDrawCtx); return 0; } void Screen::addSprite(uint16 spriteIndex) { bool oldScreenLock = _screenLock; - drawFlex(spriteIndex, 0, 0, 0, 0, 0, _clipInfo1); + drawFlex(spriteIndex, 0, 0, 0, 0, 0, _backgroundScreenDrawCtx); _screenLock = oldScreenLock; } @@ -458,8 +474,10 @@ uint16 Screen::placeSprite(uint16 channelIndex, uint16 flexIndex, int16 x, int16 _channels[channelIndex].y1 = y1; _channels[channelIndex].x2 = x2; _channels[channelIndex].y2 = y2; - _channels[channelIndex].area = (x2 - x2) * (y2 - y1); - + _channels[channelIndex].area = (x2 - x1) * (y2 - y1); + _channels[channelIndex].xofs = 0; + _channels[channelIndex].yofs = 0; + if (_channelsUsedCount <= channelIndex) _channelsUsedCount = channelIndex + 1; @@ -511,7 +529,7 @@ uint16 Screen::placeAnim(uint16 channelIndex, uint16 animIndex, int16 x, int16 y _channels[channelIndex].y1 = y1; _channels[channelIndex].x2 = x2; _channels[channelIndex].y2 = y2; - _channels[channelIndex].area = (x2 - x2) * (y2 - y1); + _channels[channelIndex].area = (x2 - x1) * (y2 - y1); if (_channelsUsedCount <= channelIndex) _channelsUsedCount = channelIndex + 1; @@ -541,17 +559,6 @@ int16 Screen::getAnimFrame(uint16 channelIndex) { return _channels[channelIndex - 1].frameNum; } -int16 Screen::getAnimFrameCount(uint16 animIndex) { - int16 frameCount = 0; - AnimationResource *anim = _vm->_res->getAnimation(animIndex); - if (anim) { - frameCount = anim->getCount(); - _vm->_res->freeResource(anim); - } - return frameCount; -} - - uint16 Screen::placeText(uint16 channelIndex, uint16 textObjectIndex, int16 x, int16 y, uint16 fontNum, int16 textColor, int16 outlineColor) { if (channelIndex < 1 || channelIndex >= 100 || textObjectIndex == 0 || fontNum == 0) @@ -604,7 +611,7 @@ uint16 Screen::placeText(uint16 channelIndex, uint16 textObjectIndex, int16 x, i _channels[channelIndex].y1 = y1; _channels[channelIndex].x2 = x2; _channels[channelIndex].y2 = y2; - _channels[channelIndex].area = (x2 - x2) * (y2 - y1); + _channels[channelIndex].area = (x2 - x1) * (y2 - y1); if (_channelsUsedCount <= channelIndex) _channelsUsedCount = channelIndex + 1; @@ -615,29 +622,18 @@ uint16 Screen::placeText(uint16 channelIndex, uint16 textObjectIndex, int16 x, i void Screen::show() { // TODO - + if (_screenLock) return; - drawSpriteChannels(_clipInfo1, 3, 0); - memcpy(_screen2->pixels, _screen1->pixels, 64000); - drawSpriteChannels(_clipInfo2, 1, 2); + drawSpriteChannels(_backgroundScreenDrawCtx, 3, 0); + memcpy(_workScreen->pixels, _backgroundScreen->pixels, 64000); + drawSpriteChannels(_workScreenDrawCtx, 1, 2); - if (_visualEffectNum != 0) { - warning("Unimplemented visual fx %d", _visualEffectNum); - } - - // TODO: Implement visual effects (palette fading etc.) - - if (!_paletteLock) - setRGBPalette(_palette, 0, _paletteColorCount); + _fx->run(_visualEffectNum, _workScreen, _palette, _newPalette, _paletteColorCount); + _visualEffectNum = 0; - _vm->_system->copyRectToScreen((const byte*)_screen2->pixels, _screen2->pitch, 0, 0, _screen2->w, _screen2->h); - - _vm->_system->updateScreen(); - - _visualEffectNum = 0; if (!_paletteInitialized) { memcpy(_newPalette, _palette, _paletteColorCount * 3); @@ -648,19 +644,7 @@ void Screen::show() { } void Screen::flash(int flashCount) { - int palSize = _paletteColorCount * 3; - if (flashCount < 1) - flashCount = 1; - for (int i = 0; i < palSize; i++) - _fxPalette[i] = CLIP(255 - _palette[i], 0, 255); - while (flashCount--) { - setRGBPalette(_fxPalette, 0, _paletteColorCount); - _vm->_system->updateScreen(); - _vm->_system->delayMillis(20); - setRGBPalette(_palette, 0, _paletteColorCount); - _vm->_system->updateScreen(); - _vm->_system->delayMillis(20); - } + _fx->flash(flashCount, _palette, _paletteColorCount); } void Screen::setFont(int16 fontNum) { @@ -817,5 +801,21 @@ int16 Screen::getTextWidth(int16 fontNum, const char *text) { return _font->getTextWidth(text); } +Graphics::Surface *Screen::lockScreen() { + return _vm->_system->lockScreen(); +} + +void Screen::unlockScreen() { + _vm->_system->unlockScreen(); +} + +void Screen::showWorkScreen() { + _vm->_system->copyRectToScreen((const byte*)_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); +} + +void Screen::updateScreenAndWait(int delay) { + _vm->_system->updateScreen(); + _vm->_system->delayMillis(delay); +} } // End of namespace Made diff --git a/engines/made/screen.h b/engines/made/screen.h index beacd0dfa5..910096cacd 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -33,6 +33,7 @@ #include "graphics/surface.h" #include "made/resource.h" +#include "made/screenfx.h" namespace Made { @@ -41,7 +42,7 @@ struct SpriteChannel { int16 state; int16 needRefresh; uint16 index; - int16 x, y; + int16 x, y, xofs, yofs; int16 x1, y1, x2, y2; uint32 area; uint16 fontNum; @@ -69,8 +70,8 @@ public: void loadRGBPalette(byte *palRGB, int count = 256); void setRGBPalette(byte *palRGB, int start = 0, int count = 256); bool isPaletteLocked() { return _paletteLock; } - void setScreenLock(bool lock) { _screenLock = lock; } void setPaletteLock(bool lock) { _paletteLock = lock; } + void setScreenLock(bool lock) { _screenLock = lock; } void setVisualEffectNum(int visualEffectNum) { _visualEffectNum = visualEffectNum; } void setClipArea(uint16 x1, uint16 y1, uint16 x2, uint16 y2) { @@ -119,6 +120,8 @@ public: uint16 setChannelLocation(uint16 channelIndex, int16 x, int16 y); uint16 setChannelContent(uint16 channelIndex, uint16 index); void setChannelUseMask(uint16 channelIndex); + void setChannelOffsets(uint16 channelIndex, int16 xofs, int16 yofs); + void getChannelOffsets(uint16 channelIndex, int16 &xofs, int16 &yofs); void drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask, int16 excludeStateMask); void updateSprites(); void clearChannels(); @@ -139,14 +142,12 @@ public: uint16 placeAnim(uint16 channelIndex, uint16 animIndex, int16 x, int16 y, int16 frameNum); int16 setAnimFrame(uint16 channelIndex, int16 frameNum); int16 getAnimFrame(uint16 channelIndex); - // TODO: Move to script function - int16 getAnimFrameCount(uint16 animIndex); uint16 placeText(uint16 channelIndex, uint16 textObjectIndex, int16 x, int16 y, uint16 fontNum, int16 textColor, int16 outlineColor); void show(); void flash(int count); - + void setFont(int16 fontNum); void printChar(uint c, int16 x, int16 y, byte color); void printText(const char *text); @@ -154,14 +155,21 @@ public: void printObjectText(int16 objectIndex, int16 x, int16 y, int16 fontNum, int16 textColor, int16 outlineColor, const ClipInfo &clipInfo); int16 getTextWidth(int16 fontNum, const char *text); + // Interface functions for the screen effects class + Graphics::Surface *lockScreen(); + void unlockScreen(); + void showWorkScreen(); + void updateScreenAndWait(int delay); + protected: MadeEngine *_vm; + ScreenEffects *_fx; bool _screenLock; bool _paletteLock; byte _screenPalette[256 * 4]; - byte _palette[768], _newPalette[768], _fxPalette[768]; + byte _palette[768], _newPalette[768]; int _paletteColorCount, _oldPaletteColorCount; bool _paletteInitialized, _needPalette; int16 _textColor; @@ -177,8 +185,8 @@ protected: int16 _clip, _exclude, _ground, _mask; int _visualEffectNum; - Graphics::Surface *_screen1, *_screen2, *_screenMask; - ClipInfo _clipArea, _clipInfo1, _clipInfo2, _maskDrawCtx; + Graphics::Surface *_backgroundScreen, *_workScreen, *_screenMask; + ClipInfo _clipArea, _backgroundScreenDrawCtx, _workScreenDrawCtx, _maskDrawCtx; ClipInfo _excludeClipArea[4]; bool _excludeClipAreaEnabled[4]; diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp new file mode 100644 index 0000000000..feea365615 --- /dev/null +++ b/engines/made/screenfx.cpp @@ -0,0 +1,254 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "made/made.h" +#include "made/screen.h" +#include "made/screenfx.h" + +namespace Made { + +const byte ScreenEffects::vfxOffsTable[64] = { + 5, 2, 6, 1, 4, 7, 3, 0, + 7, 4, 0, 3, 6, 1, 5, 2, + 2, 5, 1, 6, 3, 0, 4, 7, + 0, 3, 7, 4, 1, 6, 2, 5, + 4, 0, 2, 5, 7, 3, 1, 6, + 1, 6, 4, 0, 2, 5, 7, 3, + 6, 1, 3, 7, 5, 2, 0, 4, + 3, 7, 5, 2, 0, 4, 6, 1 +}; + +const byte ScreenEffects::vfxOffsIndexTable[8] = { + 6, 7, 2, 3, 4, 5, 0, 1 +}; + + +ScreenEffects::ScreenEffects(Screen *screen) : _screen(screen) { + vfxOffsTablePtr = &vfxOffsTable[6 * 8]; + vfxX1 = 0; + vfxY1 = 0; + vfxWidth = 0; + vfxHeight = 0; +} + +void ScreenEffects::run(int16 effectNum, Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { + + // TODO: Put effect functions into an array + // TODO: Implement more visual effects + + switch (effectNum) { + + case 0: + vfx00(surface, palette, newPalette, colorCount); + break; + + case 9: + vfx09(surface, palette, newPalette, colorCount); + break; + + case 14: + vfx14(surface, palette, newPalette, colorCount); + break; + + case 17: + vfx17(surface, palette, newPalette, colorCount); + break; + + default: + vfx00(surface, palette, newPalette, colorCount); + warning("Unimplemented visual effect %d", effectNum); + + } + +} + +void ScreenEffects::flash(int flashCount, byte *palette, int colorCount) { + int palSize = colorCount * 3; + if (flashCount < 1) + flashCount = 1; + for (int i = 0; i < palSize; i++) + _fxPalette[i] = CLIP(255 - palette[i], 0, 255); + while (flashCount--) { + _screen->setRGBPalette(_fxPalette, 0, colorCount); + _screen->updateScreenAndWait(20); + _screen->setRGBPalette(palette, 0, colorCount); + _screen->updateScreenAndWait(20); + } +} + +void ScreenEffects::setPalette(byte *palette) { + if (!_screen->isPaletteLocked()) { + _screen->setRGBPalette(palette, 0, 256); + } +} + +void ScreenEffects::setBlendedPalette(byte *palette, byte *newPalette, int colorCount, int16 value, int16 maxValue) { + if (!_screen->isPaletteLocked()) { + int32 mulValue = (value * 64) / maxValue; + for (int i = 0; i < colorCount * 3; i++) + _fxPalette[i] = newPalette[i] - (newPalette[i] - palette[i]) * mulValue / 64; + _screen->setRGBPalette(_fxPalette, 0, 256); + } +} + +void ScreenEffects::copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2) { + + // TODO: Clean up + + byte *src, *dst; + + x1 = CLIP(x1, 0, 320); + y1 = CLIP(y1, 0, 200); + x2 = CLIP(x2, 0, 320); + y2 = CLIP(y2, 0, 200); + + x2 -= x1; + y2 -= y1; + vfxX1 = x1 & 0x0E; + x1 += 16; + x1 = x1 & 0xFFF0; + x2 += vfxX1; + x2 -= 15; + if (x2 < 0) + x2 = 0; + vfxWidth = x2 & 0x0E; + x2 = x2 & 0xFFF0; + + vfxY1 = y1 & 7; + + byte *source = (byte*)surface->getBasePtr(x1, y1); + + Graphics::Surface *vgaScreen = _screen->lockScreen(); + byte *dest = (byte*)vgaScreen->getBasePtr(x1, y1); + + int16 addX = x2 / 16; + + while (y2-- > 0) { + + int16 addVal = vfxOffsTablePtr[vfxY1] * 2; + int16 w = 0; + vfxY1 = (vfxY1 + 1) & 7; + + src = source + addVal; + dst = dest + addVal; + + if (addVal < vfxX1) { + if (addVal < vfxWidth) + w = 1; + else + w = 0; + } else { + src -= 16; + dst -= 16; + if (addVal < vfxWidth) + w = 2; + else + w = 1; + } + + w += addX; + + while (w-- > 0) { + *dst++ = *src++; + *dst++ = *src++; + src += 14; + dst += 14; + } + + source += 320; + dest += 320; + + } + + vfxHeight = (vfxHeight + 1) & 7; + vfxOffsTablePtr = &vfxOffsTable[vfxOffsIndexTable[vfxHeight] * 8]; + + _screen->unlockScreen(); + +} + +void ScreenEffects::vfx00(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { + setPalette(palette); + _screen->showWorkScreen(); +} + +void ScreenEffects::vfx09(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { + for (int i = 0; i < 8; i++) { + copyRect(surface, 0, 0, 320, 200); + for (int j = 0; j < 4; j++) { + setBlendedPalette(palette, newPalette, colorCount, i * 4 + j, 32); + _screen->updateScreenAndWait(25); + } + } + setPalette(palette); +} + +void ScreenEffects::vfx14(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { + int16 x = 8, y = 5; + for (int i = 0; i < 27; i++) { + copyRect(surface, 160 - x, 100 - y, 160 + x, 100 + y); + x += 8; + y += 5; + setBlendedPalette(palette, newPalette, colorCount, i, 27); + _screen->updateScreenAndWait(25); + } + setPalette(palette); +} + +void ScreenEffects::vfx17(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { + + byte tempPalette[768]; + + bool savedPaletteLock = _screen->isPaletteLocked(); + _screen->setPaletteLock(false); + + memcpy(tempPalette, palette, 768); + + // Fade out to black + memset(palette, 0, 768); + for (int i = 0; i < 50; i++) { + setBlendedPalette(palette, newPalette, colorCount, i, 50); + _screen->updateScreenAndWait(25); + } + _screen->setRGBPalette(palette, 0, colorCount); + + memcpy(palette, tempPalette, 768); + + _screen->showWorkScreen(); + + // Fade from black to palette + memset(newPalette, 0, 768); + for (int i = 0; i < 50; i++) { + setBlendedPalette(palette, newPalette, colorCount, i, 50); + _screen->updateScreenAndWait(25); + } + _screen->setRGBPalette(palette, 0, colorCount); + + _screen->setPaletteLock(savedPaletteLock); + +} + + +} // End of namespace Made diff --git a/engines/made/screenfx.h b/engines/made/screenfx.h new file mode 100644 index 0000000000..e1f877b42e --- /dev/null +++ b/engines/made/screenfx.h @@ -0,0 +1,63 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef MADE_SCREENFX_H +#define MADE_SCREENFX_H + +#include "common/endian.h" +#include "common/util.h" +#include "common/rect.h" + +#include "graphics/surface.h" + +#include "made/made.h" +#include "made/screen.h" + +namespace Made { + +class ScreenEffects { +public: + ScreenEffects(Screen *screen); + void run(int16 effectNum, Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); + void flash(int count, byte *palette, int colorCount); +private: + Screen *_screen; + byte _fxPalette[768]; + static const byte vfxOffsTable[64]; + static const byte vfxOffsIndexTable[8]; + const byte *vfxOffsTablePtr; + int16 vfxX1, vfxY1, vfxWidth, vfxHeight; + void setPalette(byte *palette); + void setBlendedPalette(byte *palette, byte *newPalette, int colorCount, int16 value, int16 maxValue); + void copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2); + void vfx00(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); + void vfx09(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); + void vfx14(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); + void vfx17(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); +}; + +} // End of namespace Made + +#endif /* MADE_H */ diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp index c11edb93a2..3536dc3c76 100644 --- a/engines/made/scriptfuncs_rtz.cpp +++ b/engines/made/scriptfuncs_rtz.cpp @@ -687,7 +687,13 @@ int16 ScriptFunctionsRtz::o1_GETFRAME(int16 argc, int16 *argv) { } int16 ScriptFunctionsRtz::o1_GETFRAMECOUNT(int16 argc, int16 *argv) { - return _vm->_screen->getAnimFrameCount(argv[0]); + int16 frameCount = 0; + AnimationResource *anim = _vm->_res->getAnimation(argv[0]); + if (anim) { + frameCount = anim->getCount(); + _vm->_res->freeResource(anim); + } + return frameCount; } int16 ScriptFunctionsRtz::o1_PICWIDTH(int16 argc, int16 *argv) { -- cgit v1.2.3 From 4a0b936495dfc17a4c22b9261c0c02b862454b77 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 14 May 2008 11:19:31 +0000 Subject: Merged the three ScriptFunctionsXXX classes into ScriptFunctions svn-id: r32105 --- engines/made/script.cpp | 10 +- engines/made/scriptfuncs.cpp | 945 +++++++++++++++++++++++++++++++++++++++++++ engines/made/scriptfuncs.h | 345 +++++----------- 3 files changed, 1053 insertions(+), 247 deletions(-) create mode 100644 engines/made/scriptfuncs.cpp diff --git a/engines/made/script.cpp b/engines/made/script.cpp index ad1411281c..8b5a48cdd7 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -172,15 +172,7 @@ ScriptInterpreter::ScriptInterpreter(MadeEngine *vm) : _vm(vm) { _commands = commandProcs; _commandsMax = ARRAYSIZE(commandProcs) + 1; - if (_vm->getGameID() == GID_RTZ) - _functions = new ScriptFunctionsRtz(_vm); - else if (_vm->getGameID() == GID_LGOP2) - _functions = new ScriptFunctionsLgop2(_vm); - else if (_vm->getGameID() == GID_MANHOLE) - _functions = new ScriptFunctionsMhne(_vm); - else - error("Unsupported GameID"); - + _functions = new ScriptFunctions(_vm); _functions->setupExternalsTable(); #undef COMMAND diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp new file mode 100644 index 0000000000..61d2382bde --- /dev/null +++ b/engines/made/scriptfuncs.cpp @@ -0,0 +1,945 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/endian.h" +#include "common/util.h" +#include "common/events.h" + +#include "graphics/cursorman.h" + +#include "made/made.h" +#include "made/resource.h" +#include "made/database.h" +#include "made/screen.h" +#include "made/script.h" +#include "made/pmvplayer.h" +#include "made/scriptfuncs.h" +#include "made/music.h" + +namespace Made { + +typedef Common::Functor2Mem ExternalScriptFunc; +#define External(x) \ + _externalFuncs.push_back(new ExternalScriptFunc(this, &ScriptFunctions::x)); \ + _externalFuncNames.push_back(#x); +void ScriptFunctions::setupExternalsTable() { + + External(sfSystemCall); + External(sfInitGraf); + External(sfRestoreGraf); + External(sfDrawPicture); + External(sfClearScreen); + External(sfShowPage); + External(sfPollEvent); + External(sfGetMouseX); + External(sfGetMouseY); + External(sfGetKey); + External(sfSetVisualEffect); + External(sfPlaySound); + External(sfPlayMusic); + External(sfStopMusic); + External(sfIsMusicPlaying); + External(sfSetTextPos); + External(sfFlashScreen); + External(sfPlayNote); + External(sfStopNote); + External(sfPlayTele); + External(sfStopTele); + External(sfHideMouseCursor); + External(sfShowMouseCursor); + External(sfGetMusicBeat); + External(sfSetScreenLock); + External(sfAddSprite); + External(sfFreeAnim); + External(sfDrawSprite); + External(sfEraseSprites); + External(sfUpdateSprites); + External(sfGetTimer); + External(sfSetTimer); + External(sfResetTimer); + External(sfAllocTimer); + External(sfFreeTimer); + External(sfSetPaletteLock); + External(sfSetFont); + External(sfDrawText); + External(sfHomeText); + External(sfSetTextRect); + External(sfSetTextXY); + External(sfSetFontDropShadow); + External(sfSetFontColor); + External(sfSetFontOutline); + External(sfLoadMouseCursor); + External(sfSetSpriteGround); + External(sfLoadResText); + + if (_vm->getGameID() == GID_MANHOLE || _vm->getGameID() == GID_LGOP2) { + External(sfAddScreenMask); + External(sfSetSpriteMask); + } else if (_vm->getGameID() == GID_RTZ) { + External(sfSetClipArea); + External(sfSetSpriteClip); + } + + External(sfSoundPlaying); + External(sfStopSound); + External(sfPlayVoice); + + if (_vm->getGameID() == GID_MANHOLE || _vm->getGameID() == GID_RTZ) { + External(sfPlayCd); + External(sfStopCd); + External(sfGetCdStatus); + External(sfGetCdTime); + External(sfPlayCdSegment); + } + + if (_vm->getGameID() == GID_RTZ) { + External(sfPrintf); + External(sfClearMono); + External(sfGetSoundEnergy); + External(sfClearText); + External(sfAnimText); + External(sfGetTextWidth); + External(sfPlayMovie); + External(sfLoadSound); + External(sfLoadMusic); + External(sfLoadPicture); + External(sfSetMusicVolume); + External(sfRestartEvents); + External(sfPlaceSprite); + External(sfPlaceText); + External(sfDeleteChannel); + External(sfGetChannelType); + External(sfSetChannelState); + External(sfSetChannelLocation); + External(sfSetChannelContent); + External(sfSetExcludeArea); + External(sfSetSpriteExclude); + External(sfGetChannelState); + External(sfPlaceAnim); + External(sfSetAnimFrame); + External(sfGetAnimFrame); + External(sfGetAnimFrameCount); + External(sfGetPictureWidth); + External(sfGetPictureHeight); + External(sfSetSoundRate); + External(sfDrawAnimPic); + External(sfLoadAnim); + External(sfReadText); + External(sfReadMenu); + External(sfDrawMenu); + External(sfGetMenuCount); + External(sfSaveGame); + External(sfLoadGame); + External(sfGetGameDescription); + External(sfShakeScreen); + External(sfPlaceMenu); + External(sfSetSoundVolume); + External(sfGetSynthType); + External(sfIsSlowSystem); + } + +} +#undef External + +int16 ScriptFunctions::sfSystemCall(int16 argc, int16 *argv) { + // This opcode is empty. + return 0; +} + +int16 ScriptFunctions::sfInitGraf(int16 argc, int16 *argv) { + // This opcode is empty. + return 0; +} + +int16 ScriptFunctions::sfRestoreGraf(int16 argc, int16 *argv) { + // This opcode is empty. + return 0; +} + +int16 ScriptFunctions::sfDrawPicture(int16 argc, int16 *argv) { + return _vm->_screen->drawPic(argv[4], argv[3], argv[2], argv[1], argv[0]); +} + +int16 ScriptFunctions::sfClearScreen(int16 argc, int16 *argv) { + _vm->_screen->clearScreen(); + return 0; +} + +int16 ScriptFunctions::sfShowPage(int16 argc, int16 *argv) { + _vm->_mixer->stopHandle(_audioStreamHandle); + _vm->_screen->show(); + return 0; +} + +int16 ScriptFunctions::sfPollEvent(int16 argc, int16 *argv) { + + Common::Event event; + Common::EventManager *eventMan = g_system->getEventManager(); + + int16 eventNum = 0; + + if (eventMan->pollEvent(event)) { + switch (event.type) { + + case Common::EVENT_MOUSEMOVE: + _vm->_eventMouseX = event.mouse.x; + _vm->_eventMouseY = event.mouse.y; + break; + + case Common::EVENT_LBUTTONDOWN: + eventNum = 1; + break; + + /* + case Common::EVENT_LBUTTONUP: + eventNum = 2; // TODO: Is this correct? + break; + */ + + case Common::EVENT_RBUTTONDOWN: + eventNum = 3; + break; + + /* + case Common::EVENT_RBUTTONUP: + eventNum = 4; // TODO: Is this correct? + break; + */ + + case Common::EVENT_KEYDOWN: + _vm->_eventKey = event.kbd.ascii; + // For unknown reasons, the game accepts ASCII code + // 9 as backspace + if (_vm->_eventKey == Common::KEYCODE_BACKSPACE) + _vm->_eventKey = 9; + eventNum = 5; + break; + + case Common::EVENT_QUIT: + _vm->_quit = true; + break; + + default: + break; + + } + } + + _vm->_system->updateScreen(); + + return eventNum; +} + +int16 ScriptFunctions::sfGetMouseX(int16 argc, int16 *argv) { + return _vm->_eventMouseX; +} + +int16 ScriptFunctions::sfGetMouseY(int16 argc, int16 *argv) { + return _vm->_eventMouseY; +} + +int16 ScriptFunctions::sfGetKey(int16 argc, int16 *argv) { + return _vm->_eventKey; +} + +int16 ScriptFunctions::sfSetVisualEffect(int16 argc, int16 *argv) { + _vm->_screen->setVisualEffectNum(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfPlaySound(int16 argc, int16 *argv) { + int soundNum = argv[0]; + bool loop = false; + + if (argc > 1) { + soundNum = argv[1]; + loop = (argv[0] == 1); + } + + if (soundNum > 0) { + if (!_vm->_mixer->isSoundHandleActive(_audioStreamHandle)) { + _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, + _vm->_res->getSound(soundNum)->getAudioStream(_vm->_soundRate, loop)); + } + } + + return 0; +} + +int16 ScriptFunctions::sfPlayMusic(int16 argc, int16 *argv) { + // TODO: Music in LGOP2 and Manhole isn't supported yet + if (_vm->getGameID() == GID_RTZ) { + int16 musicNum = argv[0]; + if (musicNum > 0) { + _musicRes = _vm->_res->getXmidi(musicNum); + if (_musicRes) + _vm->_music->playXMIDI(_musicRes); + } + } + return 0; +} + +int16 ScriptFunctions::sfStopMusic(int16 argc, int16 *argv) { + if (_vm->_music->isPlaying() && _musicRes) { + _vm->_music->stop(); + _vm->_res->freeResource(_musicRes); + _musicRes = NULL; + } + return 0; +} + +int16 ScriptFunctions::sfIsMusicPlaying(int16 argc, int16 *argv) { + if (_vm->_music->isPlaying()) + return 1; + else + return 0; +} + +int16 ScriptFunctions::sfSetTextPos(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfSetTextPos"); + // This seems to be some kind of low-level opcode. + // The original engine calls int 10h to set the VGA cursor position. + return 0; +} + +int16 ScriptFunctions::sfFlashScreen(int16 argc, int16 *argv) { + _vm->_screen->flash(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfPlayNote(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfPlayNote"); + return 0; +} + +int16 ScriptFunctions::sfStopNote(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfStopNote"); + return 0; +} + +int16 ScriptFunctions::sfPlayTele(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfPlayTele"); + return 0; +} + +int16 ScriptFunctions::sfStopTele(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfStopTele"); + return 0; +} + +int16 ScriptFunctions::sfHideMouseCursor(int16 argc, int16 *argv) { + _vm->_system->showMouse(false); + return 0; +} + +int16 ScriptFunctions::sfShowMouseCursor(int16 argc, int16 *argv) { + _vm->_system->showMouse(true); + return 0; +} + +int16 ScriptFunctions::sfGetMusicBeat(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfGetMusicBeat"); + return 0; +} + +int16 ScriptFunctions::sfSetScreenLock(int16 argc, int16 *argv) { + _vm->_screen->setScreenLock(argv[0] != 0); + return 0; +} + +int16 ScriptFunctions::sfAddSprite(int16 argc, int16 *argv) { + if (_vm->getGameID() == GID_RTZ) { + warning("Unimplemented opcode: sfAddSprite"); + return 0; + } if (_vm->getGameID() == GID_LGOP2 || _vm->getGameID() == GID_MANHOLE) { + return argv[2]; + } else { + return 0; + } +} + +int16 ScriptFunctions::sfFreeAnim(int16 argc, int16 *argv) { + _vm->_screen->clearChannels(); + return 0; +} + +int16 ScriptFunctions::sfDrawSprite(int16 argc, int16 *argv) { + if (_vm->getGameID() == GID_RTZ) { + return _vm->_screen->drawSprite(argv[2], argv[1], argv[0]); + } if (_vm->getGameID() == GID_LGOP2 || _vm->getGameID() == GID_MANHOLE) { + int16 channel = _vm->_screen->drawSprite(argv[2], argv[1], argv[0]); + _vm->_screen->setChannelUseMask(channel); + return 0; + } else { + return 0; + } +} + +int16 ScriptFunctions::sfEraseSprites(int16 argc, int16 *argv) { + _vm->_screen->clearChannels(); + return 0; +} + +int16 ScriptFunctions::sfUpdateSprites(int16 argc, int16 *argv) { + _vm->_screen->updateSprites(); + return 0; +} + +int16 ScriptFunctions::sfGetTimer(int16 argc, int16 *argv) { + return _vm->getTimer(argv[0]); +} + +int16 ScriptFunctions::sfSetTimer(int16 argc, int16 *argv) { + _vm->setTimer(argv[1], argv[0]); + return 0; +} + +int16 ScriptFunctions::sfResetTimer(int16 argc, int16 *argv) { + _vm->resetTimer(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfAllocTimer(int16 argc, int16 *argv) { + return _vm->allocTimer(); +} + +int16 ScriptFunctions::sfFreeTimer(int16 argc, int16 *argv) { + _vm->freeTimer(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfSetPaletteLock(int16 argc, int16 *argv) { + _vm->_screen->setPaletteLock(argv[0] != 0); + return 0; +} + +int16 ScriptFunctions::sfSetFont(int16 argc, int16 *argv) { + _vm->_screen->setFont(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfDrawText(int16 argc, int16 *argv) { + + const char *text = NULL; + + if (_vm->getGameID() == GID_RTZ) { + Object *obj = _vm->_dat->getObject(argv[argc - 1]); + text = obj->getString(); + } if (_vm->getGameID() == GID_LGOP2 || _vm->getGameID() == GID_MANHOLE) { + text = _vm->_dat->getString(argv[argc - 1]); + } + + if (text) { + char finalText[1024]; + switch (argc) { + case 1: + snprintf(finalText, 1024, "%s", text); + break; + case 2: + snprintf(finalText, 1024, text, argv[0]); + break; + case 3: + snprintf(finalText, 1024, text, argv[1], argv[0]); + break; + case 4: + snprintf(finalText, 1024, text, argv[2], argv[1], argv[0]); + break; + case 5: + snprintf(finalText, 1024, text, argv[3], argv[2], argv[1], argv[0]); + break; + default: + finalText[0] = '\0'; + break; + } + _vm->_screen->printText(finalText); + } + + return 0; +} + +int16 ScriptFunctions::sfHomeText(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfHomeText"); + return 0; +} + +int16 ScriptFunctions::sfSetTextRect(int16 argc, int16 *argv) { + int16 x1 = CLIP(argv[4], 1, 318); + int16 y1 = CLIP(argv[3], 1, 198); + int16 x2 = CLIP(argv[2], 1, 318); + int16 y2 = CLIP(argv[1], 1, 198); + //int16 textValue = argv[0]; + // TODO: textValue + _vm->_screen->setTextRect(Common::Rect(x1, y1, x2, y2)); + return 0; +} + +int16 ScriptFunctions::sfSetTextXY(int16 argc, int16 *argv) { + int16 x = CLIP(argv[1], 1, 318); + int16 y = CLIP(argv[0], 1, 198); + _vm->_screen->setTextXY(x, y); + return 0; +} + +int16 ScriptFunctions::sfSetFontDropShadow(int16 argc, int16 *argv) { + // if the drop shadow color is -1, then text drop shadow is disabled + // when font drop shadow is enabled, outline is disabled + _vm->_screen->setDropShadowColor(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfSetFontColor(int16 argc, int16 *argv) { + _vm->_screen->setTextColor(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfSetFontOutline(int16 argc, int16 *argv) { + // if the outline color is -1, then text outline is disabled + // when font outline is enabled, drop shadow is disabled + _vm->_screen->setOutlineColor(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfLoadMouseCursor(int16 argc, int16 *argv) { + PictureResource *flex = _vm->_res->getPicture(argv[2]); + if (flex) { + Graphics::Surface *surf = flex->getPicture(); + CursorMan.replaceCursor((const byte *)surf->pixels, surf->w, surf->h, argv[1], argv[0], 0); + CursorMan.showMouse(true); + _vm->_res->freeResource(flex); + } + return 0; +} + +int16 ScriptFunctions::sfSetSpriteGround(int16 argc, int16 *argv) { + _vm->_screen->setGround(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfLoadResText(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfLoadResText"); + return 0; +} + +int16 ScriptFunctions::sfSetClipArea(int16 argc, int16 *argv) { + _vm->_screen->setClipArea(argv[3], argv[2], argv[1], argv[0]); + return 0; +} + +int16 ScriptFunctions::sfSetSpriteClip(int16 argc, int16 *argv) { + _vm->_screen->setClip(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfAddScreenMask(int16 argc, int16 *argv) { + _vm->_screen->drawMask(argv[2], argv[1], argv[0]); + return 0; +} + +int16 ScriptFunctions::sfSetSpriteMask(int16 argc, int16 *argv) { + _vm->_screen->setMask(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfSoundPlaying(int16 argc, int16 *argv) { + if (_vm->_mixer->isSoundHandleActive(_audioStreamHandle)) + return 1; + else + return 0; +} + +int16 ScriptFunctions::sfStopSound(int16 argc, int16 *argv) { + _vm->_mixer->stopHandle(_audioStreamHandle); + return 0; +} + +int16 ScriptFunctions::sfPlayVoice(int16 argc, int16 *argv) { + if (argv[0] > 0) { + _vm->_mixer->stopHandle(_audioStreamHandle); + _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, + _vm->_res->getSound(argv[0])->getAudioStream(_vm->_soundRate, false)); + } + return 0; +} + +int16 ScriptFunctions::sfPlayCd(int16 argc, int16 *argv) { + // This one is called loads of times, so it has been commented out to reduce spam + //warning("Unimplemented opcode: sfPlayCd"); + return 0; +} + +int16 ScriptFunctions::sfStopCd(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfStopCd"); + return 0; +} + +int16 ScriptFunctions::sfGetCdStatus(int16 argc, int16 *argv) { + // This one is called loads of times, so it has been commented out to reduce spam + //warning("Unimplemented opcode: sfGetCdStatus"); + return 0; +} + +int16 ScriptFunctions::sfGetCdTime(int16 argc, int16 *argv) { + // This one is called loads of times, so it has been commented out to reduce spam + //warning("Unimplemented opcode: sfGetCdTime"); + return 0; +} + +int16 ScriptFunctions::sfPlayCdSegment(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfPlayCdSegment"); + return 0; +} + +int16 ScriptFunctions::sfPrintf(int16 argc, int16 *argv) { + Object *obj = _vm->_dat->getObject(argv[argc - 1]); + const char *text = obj->getString(); + debug(4, "--> text = %s", text); + return 0; +} + +int16 ScriptFunctions::sfClearMono(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfClearMono"); + return 0; +} + +int16 ScriptFunctions::sfGetSoundEnergy(int16 argc, int16 *argv) { + // This is called while in-game voices are played + // Not sure what it's used for + // -> It's used to animate mouths when NPCs are talking + // FIXME: This is a workaround for the "sound energy" problem + // At least the characters move their lips when talking now + return _vm->_rnd->getRandomNumber(5); +} + +int16 ScriptFunctions::sfClearText(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfClearText"); + return 1; +} + +int16 ScriptFunctions::sfAnimText(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfAnimText"); + return 0; +} + +int16 ScriptFunctions::sfGetTextWidth(int16 argc, int16 *argv) { + int16 width = 0; + if (argv[1] > 0) { + Object *obj = _vm->_dat->getObject(argv[1]); + const char *text = obj->getString(); + width = _vm->_screen->getTextWidth(argv[0], text); + } + return width; +} + +int16 ScriptFunctions::sfPlayMovie(int16 argc, int16 *argv) { + const char *movieName = _vm->_dat->getObject(argv[1])->getString(); + _vm->_system->showMouse(false); + _vm->_pmvPlayer->play(movieName); + _vm->_system->showMouse(true); + return 0; +} + +int16 ScriptFunctions::sfLoadSound(int16 argc, int16 *argv) { + SoundResource *sound = _vm->_res->getSound(argv[0]); + if (sound) { + _vm->_res->freeResource(sound); + return 1; + } + return 0; +} + +int16 ScriptFunctions::sfLoadMusic(int16 argc, int16 *argv) { + GenericResource *xmidi = _vm->_res->getXmidi(argv[0]); + if (xmidi) { + _vm->_res->freeResource(xmidi); + return 1; + } + return 0; +} + +int16 ScriptFunctions::sfLoadPicture(int16 argc, int16 *argv) { + PictureResource *flex = _vm->_res->getPicture(argv[0]); + if (flex) { + _vm->_res->freeResource(flex); + return 1; + } + return 0; +} + +int16 ScriptFunctions::sfSetMusicVolume(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfSetMusicVolume"); + return 0; +} + +int16 ScriptFunctions::sfRestartEvents(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfRestartEvents"); + return 0; +} + +int16 ScriptFunctions::sfPlaceSprite(int16 argc, int16 *argv) { + return _vm->_screen->placeSprite(argv[3], argv[2], argv[1], argv[0]); +} + +int16 ScriptFunctions::sfPlaceText(int16 argc, int16 *argv) { + return _vm->_screen->placeText(argv[6], argv[5], argv[4], argv[3], argv[2], argv[1], argv[0]); +} + +int16 ScriptFunctions::sfDeleteChannel(int16 argc, int16 *argv) { + _vm->_screen->deleteChannel(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfGetChannelType(int16 argc, int16 *argv) { + return _vm->_screen->getChannelType(argv[0]); +} + +int16 ScriptFunctions::sfSetChannelState(int16 argc, int16 *argv) { + _vm->_screen->setChannelState(argv[1], argv[0]); + return 0; +} + +int16 ScriptFunctions::sfSetChannelLocation(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfSetChannelLocation"); + return 0; +} + +int16 ScriptFunctions::sfSetChannelContent(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfSetChannelContent"); + return 0; +} + +int16 ScriptFunctions::sfSetExcludeArea(int16 argc, int16 *argv) { + _vm->_screen->setExcludeArea(argv[3], argv[2], argv[1], argv[0]); + return 0; +} + +int16 ScriptFunctions::sfSetSpriteExclude(int16 argc, int16 *argv) { + _vm->_screen->setExclude(argv[0]); + return 0; +} + +int16 ScriptFunctions::sfGetChannelState(int16 argc, int16 *argv) { + return _vm->_screen->getChannelState(argv[0]); +} + +int16 ScriptFunctions::sfPlaceAnim(int16 argc, int16 *argv) { + return _vm->_screen->placeAnim(argv[4], argv[3], argv[2], argv[1], argv[0]); +} + +int16 ScriptFunctions::sfSetAnimFrame(int16 argc, int16 *argv) { + _vm->_screen->setAnimFrame(argv[1], argv[0]); + return 0; +} + +int16 ScriptFunctions::sfGetAnimFrame(int16 argc, int16 *argv) { + return _vm->_screen->getAnimFrame(argv[0]); +} + +int16 ScriptFunctions::sfGetAnimFrameCount(int16 argc, int16 *argv) { + int16 frameCount = 0; + AnimationResource *anim = _vm->_res->getAnimation(argv[0]); + if (anim) { + frameCount = anim->getCount(); + _vm->_res->freeResource(anim); + } + return frameCount; +} + +int16 ScriptFunctions::sfGetPictureWidth(int16 argc, int16 *argv) { + int16 width = 0; + PictureResource *flex = _vm->_res->getPicture(argv[0]); + if (flex) { + width = flex->getPicture()->w; + _vm->_res->freeResource(flex); + } + return width; +} + +int16 ScriptFunctions::sfGetPictureHeight(int16 argc, int16 *argv) { + int16 height = 0; + PictureResource *flex = _vm->_res->getPicture(argv[0]); + if (flex) { + height = flex->getPicture()->h; + _vm->_res->freeResource(flex); + } + return height; +} + +int16 ScriptFunctions::sfSetSoundRate(int16 argc, int16 *argv) { + _vm->_soundRate = argv[0]; + return 1; +} + +int16 ScriptFunctions::sfDrawAnimPic(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfDrawAnimPic"); + return 0; +} + +int16 ScriptFunctions::sfLoadAnim(int16 argc, int16 *argv) { + AnimationResource *anim = _vm->_res->getAnimation(argv[0]); + if (anim) { + _vm->_res->freeResource(anim); + return 1; + } + return 0; +} + +int16 ScriptFunctions::sfReadText(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfReadText"); + return 0; +} + +int16 ScriptFunctions::sfReadMenu(int16 argc, int16 *argv) { + 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, "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 length; +} + +int16 ScriptFunctions::sfDrawMenu(int16 argc, int16 *argv) { + int16 menuIndex = argv[1]; + int16 textIndex = argv[0]; + MenuResource *menu = _vm->_res->getMenu(menuIndex); + if (menu) { + const char *text = menu->getString(textIndex); + if (text) + _vm->_screen->printText(text); + _vm->_res->freeResource(menu); + } + return 0; +} + +int16 ScriptFunctions::sfGetMenuCount(int16 argc, int16 *argv) { + int16 menuIndex = argv[0]; + int16 count = 0; + MenuResource *menu = _vm->_res->getMenu(menuIndex); + if (menu) { + count = menu->getCount(); + _vm->_res->freeResource(menu); + } + return count; +} + +int16 ScriptFunctions::sfSaveGame(int16 argc, int16 *argv) { + + int16 saveNum = argv[2]; + int16 descObjectIndex = argv[1]; + int16 version = argv[0]; + + if (saveNum > 999) + return 6; + + Object *obj = _vm->_dat->getObject(descObjectIndex); + const char *description = obj->getString(); + + Common::String filename = _vm->getSavegameFilename(saveNum); + + return _vm->_dat->savegame(filename.c_str(), description, version); + +} + +int16 ScriptFunctions::sfLoadGame(int16 argc, int16 *argv) { + + int16 saveNum = argv[1]; + int16 version = argv[0]; + + if (saveNum > 999) + return 1; + + Common::String filename = _vm->getSavegameFilename(saveNum); + + return _vm->_dat->loadgame(filename.c_str(), version); + +} + +int16 ScriptFunctions::sfGetGameDescription(int16 argc, int16 *argv) { + + int16 descObjectIndex = argv[2]; + int16 saveNum = argv[1]; + /*int16 version = argv[0];*/ + Common::String description; + + if (saveNum > 999) + return 1; + + Common::String filename = _vm->getSavegameFilename(saveNum); + + Object *obj = _vm->_dat->getObject(descObjectIndex); + + if (_vm->_dat->getSavegameDescription(filename.c_str(), description)) { + obj->setString(description.c_str()); + return 0; + } else { + obj->setString(""); + return 1; + } + +} + +int16 ScriptFunctions::sfShakeScreen(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfShakeScreen"); + return 0; +} + +int16 ScriptFunctions::sfPlaceMenu(int16 argc, int16 *argv) { + warning("Unimplemented opcode: sfPlaceMenu"); + return 0; +} + +int16 ScriptFunctions::sfSetSoundVolume(int16 argc, int16 *argv) { + _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, argv[0] * 25); + _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, argv[0] * 25); + return 0; +} + +int16 ScriptFunctions::sfGetSynthType(int16 argc, int16 *argv) { + // 0 = Default + // 1 = PCSPKR + // 2 = SBFM/ADLIB + // 3 = ADLIBG + // 4 = MT32MPU + warning("Unimplemented opcode: sfGetSynthType"); + return 0; +} + +int16 ScriptFunctions::sfIsSlowSystem(int16 argc, int16 *argv) { + //warning("Unimplemented opcode: sfIsSlowSystem"); + // NOTE: In the original engine this value is set via a command-line parameter + // I don't think it's needed here + // One could maybe think about returning 1 here on actually slower systems. + return 0; +} + +} // End of namespace Made diff --git a/engines/made/scriptfuncs.h b/engines/made/scriptfuncs.h index 5f1a73d940..052856065e 100644 --- a/engines/made/scriptfuncs.h +++ b/engines/made/scriptfuncs.h @@ -47,14 +47,12 @@ public: delete _externalFuncs[i]; } int16 callFunction(uint16 index, int16 argc, int16 *argv) { - if (index >= _externalFuncs.size()) { - // TODO: ERROR! - return 0; - } + if (index >= _externalFuncs.size()) + error("ScriptFunctions::callFunction() Invalid function index %d", index); debug(4, "%s", _externalFuncNames[index]); return (*_externalFuncs[index])(argc, argv); } - virtual void setupExternalsTable() = 0; + void setupExternalsTable(); protected: MadeEngine *_vm; Audio::SoundHandle _audioStreamHandle; @@ -62,240 +60,111 @@ protected: Common::Array _externalFuncs; Common::Array _externalFuncNames; - GenericResource *_xmidiRes; -}; - -class ScriptFunctionsLgop2 : public ScriptFunctions { -public: - ScriptFunctionsLgop2(MadeEngine *vm) : ScriptFunctions(vm) {} - void setupExternalsTable(); -protected: - - int16 o1_SYSTEM(int16 argc, int16 *argv); - int16 o1_INITGRAF(int16 argc, int16 *argv); - int16 o1_RESTOREGRAF(int16 argc, int16 *argv); - int16 o1_DRAWPIC(int16 argc, int16 *argv); - int16 o1_CLS(int16 argc, int16 *argv); - int16 o1_SHOWPAGE(int16 argc, int16 *argv); - int16 o1_EVENT(int16 argc, int16 *argv); - int16 o1_EVENTX(int16 argc, int16 *argv); - int16 o1_EVENTY(int16 argc, int16 *argv); - int16 o1_EVENTKEY(int16 argc, int16 *argv); - int16 o1_VISUALFX(int16 argc, int16 *argv); - int16 o1_PLAYSND(int16 argc, int16 *argv); - int16 o1_PLAYMUS(int16 argc, int16 *argv); - int16 o1_STOPMUS(int16 argc, int16 *argv); - int16 o1_ISMUS(int16 argc, int16 *argv); - int16 o1_TEXTPOS(int16 argc, int16 *argv); - int16 o1_FLASH(int16 argc, int16 *argv); - int16 o1_PLAYNOTE(int16 argc, int16 *argv); - int16 o1_STOPNOTE(int16 argc, int16 *argv); - int16 o1_PLAYTELE(int16 argc, int16 *argv); - int16 o1_STOPTELE(int16 argc, int16 *argv); - int16 o1_HIDECURS(int16 argc, int16 *argv); - int16 o1_SHOWCURS(int16 argc, int16 *argv); - int16 o1_MUSICBEAT(int16 argc, int16 *argv); - int16 o1_SCREENLOCK(int16 argc, int16 *argv); - int16 o1_ADDSPRITE(int16 argc, int16 *argv); - int16 o1_FREEANIM(int16 argc, int16 *argv); - int16 o1_DRAWSPRITE(int16 argc, int16 *argv); - int16 o1_ERASESPRITES(int16 argc, int16 *argv); - int16 o1_UPDATESPRITES(int16 argc, int16 *argv); - int16 o1_GETTIMER(int16 argc, int16 *argv); - int16 o1_SETTIMER(int16 argc, int16 *argv); - int16 o1_RESETTIMER(int16 argc, int16 *argv); - int16 o1_ALLOCTIMER(int16 argc, int16 *argv); - int16 o1_FREETIMER(int16 argc, int16 *argv); - int16 o1_PALETTELOCK(int16 argc, int16 *argv); - int16 o1_FONT(int16 argc, int16 *argv); - int16 o1_DRAWTEXT(int16 argc, int16 *argv); - int16 o1_HOMETEXT(int16 argc, int16 *argv); - int16 o1_TEXTRECT(int16 argc, int16 *argv); - int16 o1_TEXTXY(int16 argc, int16 *argv); - int16 o1_DROPSHADOW(int16 argc, int16 *argv); - int16 o1_TEXTCOLOR(int16 argc, int16 *argv); - int16 o1_OUTLINE(int16 argc, int16 *argv); - int16 o1_LOADCURSOR(int16 argc, int16 *argv); - int16 o1_SETGROUND(int16 argc, int16 *argv); - int16 o1_RESTEXT(int16 argc, int16 *argv); - int16 o1_ADDMASK(int16 argc, int16 *argv); - int16 o1_SETMASK(int16 argc, int16 *argv); - int16 o1_ISSND(int16 argc, int16 *argv); - int16 o1_STOPSND(int16 argc, int16 *argv); - int16 o1_PLAYVOICE(int16 argc, int16 *argv); -}; - -class ScriptFunctionsRtz : public ScriptFunctions { -public: - ScriptFunctionsRtz(MadeEngine *vm) : ScriptFunctions(vm) {} - void setupExternalsTable(); -protected: - - int16 o1_SYSTEM(int16 argc, int16 *argv); - int16 o1_INITGRAF(int16 argc, int16 *argv); - int16 o1_RESTOREGRAF(int16 argc, int16 *argv); - int16 o1_DRAWPIC(int16 argc, int16 *argv); - int16 o1_CLS(int16 argc, int16 *argv); - int16 o1_SHOWPAGE(int16 argc, int16 *argv); - int16 o1_EVENT(int16 argc, int16 *argv); - int16 o1_EVENTX(int16 argc, int16 *argv); - int16 o1_EVENTY(int16 argc, int16 *argv); - int16 o1_EVENTKEY(int16 argc, int16 *argv); - int16 o1_VISUALFX(int16 argc, int16 *argv); - int16 o1_PLAYSND(int16 argc, int16 *argv); - int16 o1_PLAYMUS(int16 argc, int16 *argv); - int16 o1_STOPMUS(int16 argc, int16 *argv); - int16 o1_ISMUS(int16 argc, int16 *argv); - int16 o1_TEXTPOS(int16 argc, int16 *argv); - int16 o1_FLASH(int16 argc, int16 *argv); - int16 o1_PLAYNOTE(int16 argc, int16 *argv); - int16 o1_STOPNOTE(int16 argc, int16 *argv); - int16 o1_PLAYTELE(int16 argc, int16 *argv); - int16 o1_STOPTELE(int16 argc, int16 *argv); - int16 o1_HIDECURS(int16 argc, int16 *argv); - int16 o1_SHOWCURS(int16 argc, int16 *argv); - int16 o1_MUSICBEAT(int16 argc, int16 *argv); - int16 o1_SCREENLOCK(int16 argc, int16 *argv); - int16 o1_ADDSPRITE(int16 argc, int16 *argv); - int16 o1_FREEANIM(int16 argc, int16 *argv); - int16 o1_DRAWSPRITE(int16 argc, int16 *argv); - int16 o1_ERASESPRITES(int16 argc, int16 *argv); - int16 o1_UPDATESPRITES(int16 argc, int16 *argv); - int16 o1_GETTIMER(int16 argc, int16 *argv); - int16 o1_SETTIMER(int16 argc, int16 *argv); - int16 o1_RESETTIMER(int16 argc, int16 *argv); - int16 o1_ALLOCTIMER(int16 argc, int16 *argv); - int16 o1_FREETIMER(int16 argc, int16 *argv); - int16 o1_PALETTELOCK(int16 argc, int16 *argv); - int16 o1_FONT(int16 argc, int16 *argv); - int16 o1_DRAWTEXT(int16 argc, int16 *argv); - int16 o1_HOMETEXT(int16 argc, int16 *argv); - int16 o1_TEXTRECT(int16 argc, int16 *argv); - int16 o1_TEXTXY(int16 argc, int16 *argv); - int16 o1_DROPSHADOW(int16 argc, int16 *argv); - int16 o1_TEXTCOLOR(int16 argc, int16 *argv); - int16 o1_OUTLINE(int16 argc, int16 *argv); - int16 o1_LOADCURSOR(int16 argc, int16 *argv); - int16 o1_SETGROUND(int16 argc, int16 *argv); - int16 o1_RESTEXT(int16 argc, int16 *argv); - int16 o1_CLIPAREA(int16 argc, int16 *argv); - int16 o1_SETCLIP(int16 argc, int16 *argv); - int16 o1_ISSND(int16 argc, int16 *argv); - int16 o1_STOPSND(int16 argc, int16 *argv); - int16 o1_PLAYVOICE(int16 argc, int16 *argv); - int16 o1_CDPLAY(int16 argc, int16 *argv); - int16 o1_STOPCD(int16 argc, int16 *argv); - int16 o1_CDSTATUS(int16 argc, int16 *argv); - int16 o1_CDTIME(int16 argc, int16 *argv); - int16 o1_CDPLAYSEG(int16 argc, int16 *argv); - int16 o1_PRINTF(int16 argc, int16 *argv); - int16 o1_MONOCLS(int16 argc, int16 *argv); - int16 o1_SNDENERGY(int16 argc, int16 *argv); - int16 o1_CLEARTEXT(int16 argc, int16 *argv); - int16 o1_ANIMTEXT(int16 argc, int16 *argv); - int16 o1_TEXTWIDTH(int16 argc, int16 *argv); - int16 o1_PLAYMOVIE(int16 argc, int16 *argv); - int16 o1_LOADSND(int16 argc, int16 *argv); - int16 o1_LOADMUS(int16 argc, int16 *argv); - int16 o1_LOADPIC(int16 argc, int16 *argv); - int16 o1_MUSICVOL(int16 argc, int16 *argv); - int16 o1_RESTARTEVENTS(int16 argc, int16 *argv); - int16 o1_PLACESPRITE(int16 argc, int16 *argv); - int16 o1_PLACETEXT(int16 argc, int16 *argv); - int16 o1_DELETECHANNEL(int16 argc, int16 *argv); - int16 o1_CHANNELTYPE(int16 argc, int16 *argv); - int16 o1_SETSTATE(int16 argc, int16 *argv); - int16 o1_SETLOCATION(int16 argc, int16 *argv); - int16 o1_SETCONTENT(int16 argc, int16 *argv); - int16 o1_EXCLUDEAREA(int16 argc, int16 *argv); - int16 o1_SETEXCLUDE(int16 argc, int16 *argv); - int16 o1_GETSTATE(int16 argc, int16 *argv); - int16 o1_PLACEANIM(int16 argc, int16 *argv); - int16 o1_SETFRAME(int16 argc, int16 *argv); - int16 o1_GETFRAME(int16 argc, int16 *argv); - int16 o1_GETFRAMECOUNT(int16 argc, int16 *argv); - int16 o1_PICWIDTH(int16 argc, int16 *argv); - int16 o1_PICHEIGHT(int16 argc, int16 *argv); - int16 o1_SOUNDRATE(int16 argc, int16 *argv); - int16 o1_DRAWANIMPIC(int16 argc, int16 *argv); - int16 o1_LOADANIM(int16 argc, int16 *argv); - int16 o1_READTEXT(int16 argc, int16 *argv); - int16 o1_READMENU(int16 argc, int16 *argv); - int16 o1_DRAWMENU(int16 argc, int16 *argv); - int16 o1_MENUCOUNT(int16 argc, int16 *argv); - int16 o1_SAVEGAME(int16 argc, int16 *argv); - int16 o1_LOADGAME(int16 argc, int16 *argv); - int16 o1_GAMENAME(int16 argc, int16 *argv); - int16 o1_SHAKESCREEN(int16 argc, int16 *argv); - int16 o1_PLACEMENU(int16 argc, int16 *argv); - int16 o1_SETVOLUME(int16 argc, int16 *argv); - int16 o1_WHATSYNTH(int16 argc, int16 *argv); - int16 o1_SLOWSYSTEM(int16 argc, int16 *argv); -}; - -class ScriptFunctionsMhne : public ScriptFunctions { -public: - ScriptFunctionsMhne(MadeEngine *vm) : ScriptFunctions(vm) {} - void setupExternalsTable(); -protected: + GenericResource *_musicRes; + + int16 sfSystemCall(int16 argc, int16 *argv); + int16 sfInitGraf(int16 argc, int16 *argv); + int16 sfRestoreGraf(int16 argc, int16 *argv); + int16 sfDrawPicture(int16 argc, int16 *argv); + int16 sfClearScreen(int16 argc, int16 *argv); + int16 sfShowPage(int16 argc, int16 *argv); + int16 sfPollEvent(int16 argc, int16 *argv); + int16 sfGetMouseX(int16 argc, int16 *argv); + int16 sfGetMouseY(int16 argc, int16 *argv); + int16 sfGetKey(int16 argc, int16 *argv); + int16 sfSetVisualEffect(int16 argc, int16 *argv); + int16 sfPlaySound(int16 argc, int16 *argv); + int16 sfPlayMusic(int16 argc, int16 *argv); + int16 sfStopMusic(int16 argc, int16 *argv); + int16 sfIsMusicPlaying(int16 argc, int16 *argv); + int16 sfSetTextPos(int16 argc, int16 *argv); + int16 sfFlashScreen(int16 argc, int16 *argv); + int16 sfPlayNote(int16 argc, int16 *argv); + int16 sfStopNote(int16 argc, int16 *argv); + int16 sfPlayTele(int16 argc, int16 *argv); + int16 sfStopTele(int16 argc, int16 *argv); + int16 sfHideMouseCursor(int16 argc, int16 *argv); + int16 sfShowMouseCursor(int16 argc, int16 *argv); + int16 sfGetMusicBeat(int16 argc, int16 *argv); + int16 sfSetScreenLock(int16 argc, int16 *argv); + int16 sfAddSprite(int16 argc, int16 *argv); + int16 sfFreeAnim(int16 argc, int16 *argv); + int16 sfDrawSprite(int16 argc, int16 *argv); + int16 sfEraseSprites(int16 argc, int16 *argv); + int16 sfUpdateSprites(int16 argc, int16 *argv); + int16 sfGetTimer(int16 argc, int16 *argv); + int16 sfSetTimer(int16 argc, int16 *argv); + int16 sfResetTimer(int16 argc, int16 *argv); + int16 sfAllocTimer(int16 argc, int16 *argv); + int16 sfFreeTimer(int16 argc, int16 *argv); + int16 sfSetPaletteLock(int16 argc, int16 *argv); + int16 sfSetFont(int16 argc, int16 *argv); + int16 sfDrawText(int16 argc, int16 *argv); + int16 sfHomeText(int16 argc, int16 *argv); + int16 sfSetTextRect(int16 argc, int16 *argv); + int16 sfSetTextXY(int16 argc, int16 *argv); + int16 sfSetFontDropShadow(int16 argc, int16 *argv); + int16 sfSetFontColor(int16 argc, int16 *argv); + int16 sfSetFontOutline(int16 argc, int16 *argv); + int16 sfLoadMouseCursor(int16 argc, int16 *argv); + int16 sfSetSpriteGround(int16 argc, int16 *argv); + int16 sfLoadResText(int16 argc, int16 *argv); + int16 sfSetClipArea(int16 argc, int16 *argv); + int16 sfSetSpriteClip(int16 argc, int16 *argv); + int16 sfAddScreenMask(int16 argc, int16 *argv); + int16 sfSetSpriteMask(int16 argc, int16 *argv); + int16 sfSoundPlaying(int16 argc, int16 *argv); + int16 sfStopSound(int16 argc, int16 *argv); + int16 sfPlayVoice(int16 argc, int16 *argv); + int16 sfPlayCd(int16 argc, int16 *argv); + int16 sfStopCd(int16 argc, int16 *argv); + int16 sfGetCdStatus(int16 argc, int16 *argv); + int16 sfGetCdTime(int16 argc, int16 *argv); + int16 sfPlayCdSegment(int16 argc, int16 *argv); + int16 sfPrintf(int16 argc, int16 *argv); + int16 sfClearMono(int16 argc, int16 *argv); + int16 sfGetSoundEnergy(int16 argc, int16 *argv); + int16 sfClearText(int16 argc, int16 *argv); + int16 sfAnimText(int16 argc, int16 *argv); + int16 sfGetTextWidth(int16 argc, int16 *argv); + int16 sfPlayMovie(int16 argc, int16 *argv); + int16 sfLoadSound(int16 argc, int16 *argv); + int16 sfLoadMusic(int16 argc, int16 *argv); + int16 sfLoadPicture(int16 argc, int16 *argv); + int16 sfSetMusicVolume(int16 argc, int16 *argv); + int16 sfRestartEvents(int16 argc, int16 *argv); + int16 sfPlaceSprite(int16 argc, int16 *argv); + int16 sfPlaceText(int16 argc, int16 *argv); + int16 sfDeleteChannel(int16 argc, int16 *argv); + int16 sfGetChannelType(int16 argc, int16 *argv); + int16 sfSetChannelState(int16 argc, int16 *argv); + int16 sfSetChannelLocation(int16 argc, int16 *argv); + int16 sfSetChannelContent(int16 argc, int16 *argv); + int16 sfSetExcludeArea(int16 argc, int16 *argv); + int16 sfSetSpriteExclude(int16 argc, int16 *argv); + int16 sfGetChannelState(int16 argc, int16 *argv); + int16 sfPlaceAnim(int16 argc, int16 *argv); + int16 sfSetAnimFrame(int16 argc, int16 *argv); + int16 sfGetAnimFrame(int16 argc, int16 *argv); + int16 sfGetAnimFrameCount(int16 argc, int16 *argv); + int16 sfGetPictureWidth(int16 argc, int16 *argv); + int16 sfGetPictureHeight(int16 argc, int16 *argv); + int16 sfSetSoundRate(int16 argc, int16 *argv); + int16 sfDrawAnimPic(int16 argc, int16 *argv); + int16 sfLoadAnim(int16 argc, int16 *argv); + int16 sfReadText(int16 argc, int16 *argv); + int16 sfReadMenu(int16 argc, int16 *argv); + int16 sfDrawMenu(int16 argc, int16 *argv); + int16 sfGetMenuCount(int16 argc, int16 *argv); + int16 sfSaveGame(int16 argc, int16 *argv); + int16 sfLoadGame(int16 argc, int16 *argv); + int16 sfGetGameDescription(int16 argc, int16 *argv); + int16 sfShakeScreen(int16 argc, int16 *argv); + int16 sfPlaceMenu(int16 argc, int16 *argv); + int16 sfSetSoundVolume(int16 argc, int16 *argv); + int16 sfGetSynthType(int16 argc, int16 *argv); + int16 sfIsSlowSystem(int16 argc, int16 *argv); - int16 o1_SYSTEM(int16 argc, int16 *argv); - int16 o1_INITGRAF(int16 argc, int16 *argv); - int16 o1_RESTOREGRAF(int16 argc, int16 *argv); - int16 o1_DRAWPIC(int16 argc, int16 *argv); - int16 o1_CLS(int16 argc, int16 *argv); - int16 o1_SHOWPAGE(int16 argc, int16 *argv); - int16 o1_EVENT(int16 argc, int16 *argv); - int16 o1_EVENTX(int16 argc, int16 *argv); - int16 o1_EVENTY(int16 argc, int16 *argv); - int16 o1_EVENTKEY(int16 argc, int16 *argv); - int16 o1_VISUALFX(int16 argc, int16 *argv); - int16 o1_PLAYSND(int16 argc, int16 *argv); - int16 o1_PLAYMUS(int16 argc, int16 *argv); - int16 o1_STOPMUS(int16 argc, int16 *argv); - int16 o1_ISMUS(int16 argc, int16 *argv); - int16 o1_TEXTPOS(int16 argc, int16 *argv); - int16 o1_FLASH(int16 argc, int16 *argv); - int16 o1_PLAYNOTE(int16 argc, int16 *argv); - int16 o1_STOPNOTE(int16 argc, int16 *argv); - int16 o1_PLAYTELE(int16 argc, int16 *argv); - int16 o1_STOPTELE(int16 argc, int16 *argv); - int16 o1_HIDECURS(int16 argc, int16 *argv); - int16 o1_SHOWCURS(int16 argc, int16 *argv); - int16 o1_MUSICBEAT(int16 argc, int16 *argv); - int16 o1_SCREENLOCK(int16 argc, int16 *argv); - int16 o1_ADDSPRITE(int16 argc, int16 *argv); - int16 o1_FREEANIM(int16 argc, int16 *argv); - int16 o1_DRAWSPRITE(int16 argc, int16 *argv); - int16 o1_ERASESPRITES(int16 argc, int16 *argv); - int16 o1_UPDATESPRITES(int16 argc, int16 *argv); - int16 o1_GETTIMER(int16 argc, int16 *argv); - int16 o1_SETTIMER(int16 argc, int16 *argv); - int16 o1_RESETTIMER(int16 argc, int16 *argv); - int16 o1_ALLOCTIMER(int16 argc, int16 *argv); - int16 o1_FREETIMER(int16 argc, int16 *argv); - int16 o1_PALETTELOCK(int16 argc, int16 *argv); - int16 o1_FONT(int16 argc, int16 *argv); - int16 o1_DRAWTEXT(int16 argc, int16 *argv); - int16 o1_HOMETEXT(int16 argc, int16 *argv); - int16 o1_TEXTRECT(int16 argc, int16 *argv); - int16 o1_TEXTXY(int16 argc, int16 *argv); - int16 o1_DROPSHADOW(int16 argc, int16 *argv); - int16 o1_TEXTCOLOR(int16 argc, int16 *argv); - int16 o1_OUTLINE(int16 argc, int16 *argv); - int16 o1_LOADCURSOR(int16 argc, int16 *argv); - int16 o1_SETGROUND(int16 argc, int16 *argv); - int16 o1_RESTEXT(int16 argc, int16 *argv); - int16 o1_ADDMASK(int16 argc, int16 *argv); - int16 o1_SETMASK(int16 argc, int16 *argv); - int16 o1_ISSND(int16 argc, int16 *argv); - int16 o1_STOPSND(int16 argc, int16 *argv); - int16 o1_PLAYVOICE(int16 argc, int16 *argv); - int16 o1_CDPLAY(int16 argc, int16 *argv); - int16 o1_STOPCD(int16 argc, int16 *argv); - int16 o1_CDSTATUS(int16 argc, int16 *argv); - int16 o1_CDTIME(int16 argc, int16 *argv); - int16 o1_CDPLAYSEG(int16 argc, int16 *argv); }; } // End of namespace Made -- cgit v1.2.3 From a896272b1f626ac1e10596bdc5ffb03995ab6b84 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 14 May 2008 11:21:09 +0000 Subject: Deleting obsolete files svn-id: r32106 --- engines/made/scriptfuncs_lgop2.cpp | 497 --------------------- engines/made/scriptfuncs_mhne.cpp | 498 --------------------- engines/made/scriptfuncs_rtz.cpp | 875 ------------------------------------- 3 files changed, 1870 deletions(-) delete mode 100644 engines/made/scriptfuncs_lgop2.cpp delete mode 100644 engines/made/scriptfuncs_mhne.cpp delete mode 100644 engines/made/scriptfuncs_rtz.cpp diff --git a/engines/made/scriptfuncs_lgop2.cpp b/engines/made/scriptfuncs_lgop2.cpp deleted file mode 100644 index d90e6546d7..0000000000 --- a/engines/made/scriptfuncs_lgop2.cpp +++ /dev/null @@ -1,497 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/endian.h" -#include "common/util.h" -#include "common/events.h" - -#include "graphics/cursorman.h" - -#include "made/made.h" -#include "made/resource.h" -#include "made/database.h" -#include "made/screen.h" -#include "made/script.h" -#include "made/pmvplayer.h" -#include "made/scriptfuncs.h" -#include "made/music.h" - -namespace Made { - -/* ScriptFunctionsLgop2 */ - -typedef Common::Functor2Mem ExternalFuncLgop2; -#define External(x) \ - _externalFuncs.push_back(new ExternalFuncLgop2(this, &ScriptFunctionsLgop2::x)); \ - _externalFuncNames.push_back(#x); -void ScriptFunctionsLgop2::setupExternalsTable() { - - External(o1_SYSTEM); - External(o1_INITGRAF); - External(o1_RESTOREGRAF); - External(o1_DRAWPIC); - External(o1_CLS); - External(o1_SHOWPAGE); - External(o1_EVENT); - External(o1_EVENTX); - External(o1_EVENTY); - External(o1_EVENTKEY); - External(o1_VISUALFX); - External(o1_PLAYSND); - External(o1_PLAYMUS); - External(o1_STOPMUS); - External(o1_ISMUS); - External(o1_TEXTPOS); - External(o1_FLASH); - External(o1_PLAYNOTE); - External(o1_STOPNOTE); - External(o1_PLAYTELE); - External(o1_STOPTELE); - External(o1_HIDECURS); - External(o1_SHOWCURS); - External(o1_MUSICBEAT); - External(o1_SCREENLOCK); - External(o1_ADDSPRITE); - External(o1_FREEANIM); - External(o1_DRAWSPRITE); - External(o1_ERASESPRITES); - External(o1_UPDATESPRITES); - External(o1_GETTIMER); - External(o1_SETTIMER); - External(o1_RESETTIMER); - External(o1_ALLOCTIMER); - External(o1_FREETIMER); - External(o1_PALETTELOCK); - External(o1_FONT); - External(o1_DRAWTEXT); - External(o1_HOMETEXT); - External(o1_TEXTRECT); - External(o1_TEXTXY); - External(o1_DROPSHADOW); - External(o1_TEXTCOLOR); - External(o1_OUTLINE); - External(o1_LOADCURSOR); - External(o1_SETGROUND); - External(o1_RESTEXT); - External(o1_ADDMASK); - External(o1_SETMASK); - External(o1_ISSND); - External(o1_STOPSND); - External(o1_PLAYVOICE); - -} -#undef External - -int16 ScriptFunctionsLgop2::o1_SYSTEM(int16 argc, int16 *argv) { - // This opcode is empty. - return 0; -} - -int16 ScriptFunctionsLgop2::o1_INITGRAF(int16 argc, int16 *argv) { - // This opcode is empty. - return 0; -} - -int16 ScriptFunctionsLgop2::o1_RESTOREGRAF(int16 argc, int16 *argv) { - // This opcode is empty. - return 0; -} - -int16 ScriptFunctionsLgop2::o1_DRAWPIC(int16 argc, int16 *argv) { - return _vm->_screen->drawPic(argv[4], argv[3], argv[2], argv[1], argv[0]); -} - -int16 ScriptFunctionsLgop2::o1_CLS(int16 argc, int16 *argv) { - _vm->_screen->clearScreen(); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_SHOWPAGE(int16 argc, int16 *argv) { - _vm->_mixer->stopHandle(_audioStreamHandle); - _vm->_screen->show(); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_EVENT(int16 argc, int16 *argv) { - - Common::Event event; - Common::EventManager *eventMan = g_system->getEventManager(); - - int16 eventNum = 0; - - if (eventMan->pollEvent(event)) { - switch (event.type) { - - case Common::EVENT_MOUSEMOVE: - _vm->_eventMouseX = event.mouse.x; - _vm->_eventMouseY = event.mouse.y; - break; - - case Common::EVENT_LBUTTONDOWN: - eventNum = 1; - break; - - /* - case Common::EVENT_LBUTTONUP: - eventNum = 2; // TODO: Is this correct? - break; - */ - - case Common::EVENT_RBUTTONDOWN: - eventNum = 3; - break; - - /* - case Common::EVENT_RBUTTONUP: - eventNum = 4; // TODO: Is this correct? - break; - */ - - case Common::EVENT_KEYDOWN: - _vm->_eventKey = event.kbd.ascii; - // For unknown reasons, the game accepts ASCII code - // 9 as backspace - if (_vm->_eventKey == Common::KEYCODE_BACKSPACE) - _vm->_eventKey = 9; - eventNum = 5; - break; - - case Common::EVENT_QUIT: - _vm->_quit = true; - break; - - default: - break; - - } - } - - _vm->_system->updateScreen(); - - return eventNum; -} - -int16 ScriptFunctionsLgop2::o1_EVENTX(int16 argc, int16 *argv) { - return _vm->_eventMouseX; -} - -int16 ScriptFunctionsLgop2::o1_EVENTY(int16 argc, int16 *argv) { - return _vm->_eventMouseY; -} - -int16 ScriptFunctionsLgop2::o1_EVENTKEY(int16 argc, int16 *argv) { - return _vm->_eventKey; -} - -int16 ScriptFunctionsLgop2::o1_VISUALFX(int16 argc, int16 *argv) { - _vm->_screen->setVisualEffectNum(argv[0]); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_PLAYSND(int16 argc, int16 *argv) { - int soundNum = argv[0]; - bool loop = false; - - if (argc > 1) { - soundNum = argv[1]; - loop = (argv[0] == 1); - } - - if (soundNum > 0) { - if (!_vm->_mixer->isSoundHandleActive(_audioStreamHandle)) { - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, - _vm->_res->getSound(soundNum)->getAudioStream(_vm->_soundRate, loop)); - } - } - - return 0; -} - -int16 ScriptFunctionsLgop2::o1_PLAYMUS(int16 argc, int16 *argv) { - /* - - Disabled for now since MIDI player doesn't support all commands - which results in strange behavior. - - int16 musicNum = argv[0]; - if (musicNum > 0) { - _xmidiRes = _vm->_res->getXmidi(musicNum); - _vm->_music->playXMIDI(_xmidiRes); - } - */ - return 0; -} - -int16 ScriptFunctionsLgop2::o1_STOPMUS(int16 argc, int16 *argv) { - if (_vm->_music->isPlaying()) { - _vm->_music->stop(); - _vm->_res->freeResource(_xmidiRes); - } - return 0; -} - -int16 ScriptFunctionsLgop2::o1_ISMUS(int16 argc, int16 *argv) { - if (_vm->_music->isPlaying()) - return 1; - else - return 0; -} - -int16 ScriptFunctionsLgop2::o1_TEXTPOS(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_TEXTPOS"); - // This seems to be some kind of low-level opcode. - // The original engine calls int 10h to set the VGA cursor position. - return 0; -} - -int16 ScriptFunctionsLgop2::o1_FLASH(int16 argc, int16 *argv) { - _vm->_screen->flash(argv[0]); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_PLAYNOTE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_PLAYNOTE"); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_STOPNOTE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_STOPNOTE"); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_PLAYTELE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_PLAYTELE"); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_STOPTELE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_STOPTELE"); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_HIDECURS(int16 argc, int16 *argv) { - _vm->_system->showMouse(false); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_SHOWCURS(int16 argc, int16 *argv) { - _vm->_system->showMouse(true); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_MUSICBEAT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_MUSICBEAT"); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_SCREENLOCK(int16 argc, int16 *argv) { - _vm->_screen->setScreenLock(argv[0] != 0); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_ADDSPRITE(int16 argc, int16 *argv) { - return argv[2]; -} - -int16 ScriptFunctionsLgop2::o1_FREEANIM(int16 argc, int16 *argv) { - _vm->_screen->clearChannels(); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_DRAWSPRITE(int16 argc, int16 *argv) { - int16 channel = _vm->_screen->drawSprite(argv[2], argv[1], argv[0]); - _vm->_screen->setChannelUseMask(channel); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_ERASESPRITES(int16 argc, int16 *argv) { - _vm->_screen->clearChannels(); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_UPDATESPRITES(int16 argc, int16 *argv) { - _vm->_screen->updateSprites(); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_GETTIMER(int16 argc, int16 *argv) { - return _vm->getTimer(argv[0]); -} - -int16 ScriptFunctionsLgop2::o1_SETTIMER(int16 argc, int16 *argv) { - _vm->setTimer(argv[1], argv[0]); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_RESETTIMER(int16 argc, int16 *argv) { - _vm->resetTimer(argv[0]); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_ALLOCTIMER(int16 argc, int16 *argv) { - return _vm->allocTimer(); -} - -int16 ScriptFunctionsLgop2::o1_FREETIMER(int16 argc, int16 *argv) { - _vm->freeTimer(argv[0]); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_PALETTELOCK(int16 argc, int16 *argv) { - _vm->_screen->setPaletteLock(argv[0] != 0); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_FONT(int16 argc, int16 *argv) { - _vm->_screen->setFont(argv[0]); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_DRAWTEXT(int16 argc, int16 *argv) { - - const char *text = _vm->_dat->getString(argv[argc - 1]); - - char finalText[1024]; - switch (argc) { - case 1: - snprintf(finalText, 1024, "%s", text); - break; - case 2: - snprintf(finalText, 1024, text, argv[0]); - break; - case 3: - snprintf(finalText, 1024, text, argv[1], argv[0]); - break; - case 4: - snprintf(finalText, 1024, text, argv[2], argv[1], argv[0]); - break; - case 5: - snprintf(finalText, 1024, text, argv[3], argv[2], argv[1], argv[0]); - break; - default: - finalText[0] = '\0'; - break; - } - - _vm->_screen->printText(finalText); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_HOMETEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_HOMETEXT"); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_TEXTRECT(int16 argc, int16 *argv) { - int16 x1 = CLIP(argv[4], 1, 318); - int16 y1 = CLIP(argv[3], 1, 198); - int16 x2 = CLIP(argv[2], 1, 318); - int16 y2 = CLIP(argv[1], 1, 198); - //int16 textValue = argv[0]; - // TODO: textValue - _vm->_screen->setTextRect(Common::Rect(x1, y1, x2, y2)); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_TEXTXY(int16 argc, int16 *argv) { - int16 x = CLIP(argv[1], 1, 318); - int16 y = CLIP(argv[0], 1, 198); - _vm->_screen->setTextXY(x, y); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_DROPSHADOW(int16 argc, int16 *argv) { - // if the drop shadow color is -1, then text drop shadow is disabled - // when font drop shadow is enabled, outline is disabled - _vm->_screen->setDropShadowColor(argv[0]); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_TEXTCOLOR(int16 argc, int16 *argv) { - _vm->_screen->setTextColor(argv[0]); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_OUTLINE(int16 argc, int16 *argv) { - // if the outline color is -1, then text outline is disabled - // when font outline is enabled, drop shadow is disabled - _vm->_screen->setOutlineColor(argv[0]); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_LOADCURSOR(int16 argc, int16 *argv) { - PictureResource *flex = _vm->_res->getPicture(argv[2]); - if (!flex) - return 0; - - Graphics::Surface *surf = flex->getPicture(); - CursorMan.replaceCursor((const byte *)surf->pixels, surf->w, surf->h, argv[1], argv[0], 0); - CursorMan.showMouse(true); - _vm->_res->freeResource(flex); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_SETGROUND(int16 argc, int16 *argv) { - _vm->_screen->setGround(argv[0]); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_RESTEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_RESTEXT"); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_ADDMASK(int16 argc, int16 *argv) { - _vm->_screen->drawMask(argv[2], argv[1], argv[0]); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_SETMASK(int16 argc, int16 *argv) { - _vm->_screen->setMask(argv[0]); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_ISSND(int16 argc, int16 *argv) { - if (_vm->_mixer->isSoundHandleActive(_audioStreamHandle)) - return 1; - else - return 0; -} - -int16 ScriptFunctionsLgop2::o1_STOPSND(int16 argc, int16 *argv) { - _vm->_mixer->stopHandle(_audioStreamHandle); - return 0; -} - -int16 ScriptFunctionsLgop2::o1_PLAYVOICE(int16 argc, int16 *argv) { - if (argv[0] > 0) { - _vm->_mixer->stopHandle(_audioStreamHandle); - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, - _vm->_res->getSound(argv[0])->getAudioStream(_vm->_soundRate, false)); - } - return 0; -} - -} // End of namespace Made diff --git a/engines/made/scriptfuncs_mhne.cpp b/engines/made/scriptfuncs_mhne.cpp deleted file mode 100644 index 95a857bf73..0000000000 --- a/engines/made/scriptfuncs_mhne.cpp +++ /dev/null @@ -1,498 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/endian.h" -#include "common/util.h" -#include "common/events.h" - -#include "graphics/cursorman.h" - -#include "made/made.h" -#include "made/resource.h" -#include "made/database.h" -#include "made/screen.h" -#include "made/script.h" -#include "made/pmvplayer.h" -#include "made/scriptfuncs.h" -#include "made/music.h" - -namespace Made { - -/* ScriptFunctionsMhne */ - -typedef Common::Functor2Mem ExternalFuncMhne; -#define External(x) \ - _externalFuncs.push_back(new ExternalFuncMhne(this, &ScriptFunctionsMhne::x)); \ - _externalFuncNames.push_back(#x); -void ScriptFunctionsMhne::setupExternalsTable() { - - External(o1_SYSTEM); - External(o1_INITGRAF); - External(o1_RESTOREGRAF); - External(o1_DRAWPIC); - External(o1_CLS); - External(o1_SHOWPAGE); - External(o1_EVENT); - External(o1_EVENTX); - External(o1_EVENTY); - External(o1_EVENTKEY); - External(o1_VISUALFX); - External(o1_PLAYSND); - External(o1_PLAYMUS); - External(o1_STOPMUS); - External(o1_ISMUS); - External(o1_TEXTPOS); - External(o1_FLASH); - External(o1_PLAYNOTE); - External(o1_STOPNOTE); - External(o1_PLAYTELE); - External(o1_STOPTELE); - External(o1_HIDECURS); - External(o1_SHOWCURS); - External(o1_MUSICBEAT); - External(o1_SCREENLOCK); - External(o1_ADDSPRITE); - External(o1_FREEANIM); - External(o1_DRAWSPRITE); - External(o1_ERASESPRITES); - External(o1_UPDATESPRITES); - External(o1_GETTIMER); - External(o1_SETTIMER); - External(o1_RESETTIMER); - External(o1_ALLOCTIMER); - External(o1_FREETIMER); - External(o1_PALETTELOCK); - External(o1_FONT); - External(o1_DRAWTEXT); - External(o1_HOMETEXT); - External(o1_TEXTRECT); - External(o1_TEXTXY); - External(o1_DROPSHADOW); - External(o1_TEXTCOLOR); - External(o1_OUTLINE); - External(o1_LOADCURSOR); - External(o1_SETGROUND); - External(o1_RESTEXT); - External(o1_ADDMASK); - External(o1_SETMASK); - External(o1_ISSND); - External(o1_STOPSND); - External(o1_PLAYVOICE); - External(o1_CDPLAY); - External(o1_STOPCD); - External(o1_CDSTATUS); - External(o1_CDTIME); - External(o1_CDPLAYSEG); - -} -#undef External - -int16 ScriptFunctionsMhne::o1_SYSTEM(int16 argc, int16 *argv) { - // This opcode is empty. - return 0; -} - -int16 ScriptFunctionsMhne::o1_INITGRAF(int16 argc, int16 *argv) { - // This opcode is empty. - return 0; -} - -int16 ScriptFunctionsMhne::o1_RESTOREGRAF(int16 argc, int16 *argv) { - // This opcode is empty. - return 0; -} - -int16 ScriptFunctionsMhne::o1_DRAWPIC(int16 argc, int16 *argv) { - return _vm->_screen->drawPic(argv[4], argv[3], argv[2], argv[1], argv[0]); -} - -int16 ScriptFunctionsMhne::o1_CLS(int16 argc, int16 *argv) { - _vm->_screen->clearScreen(); - return 0; -} - -int16 ScriptFunctionsMhne::o1_SHOWPAGE(int16 argc, int16 *argv) { - _vm->_screen->show(); - return 0; -} - -int16 ScriptFunctionsMhne::o1_EVENT(int16 argc, int16 *argv) { - - Common::Event event; - Common::EventManager *eventMan = g_system->getEventManager(); - - int16 eventNum = 0; - - if (eventMan->pollEvent(event)) { - switch (event.type) { - - case Common::EVENT_MOUSEMOVE: - _vm->_eventMouseX = event.mouse.x; - _vm->_eventMouseY = event.mouse.y; - break; - - case Common::EVENT_LBUTTONDOWN: - eventNum = 1; - break; - - /* - case Common::EVENT_LBUTTONUP: - eventNum = 2; // TODO: Is this correct? - break; - */ - - case Common::EVENT_RBUTTONDOWN: - eventNum = 3; - break; - - /* - case Common::EVENT_RBUTTONUP: - eventNum = 4; // TODO: Is this correct? - break; - */ - - case Common::EVENT_KEYDOWN: - _vm->_eventKey = event.kbd.ascii; - // For unknown reasons, the game accepts ASCII code - // 9 as backspace - if (_vm->_eventKey == Common::KEYCODE_BACKSPACE) - _vm->_eventKey = 9; - eventNum = 5; - break; - - case Common::EVENT_QUIT: - _vm->_quit = true; - break; - - default: - break; - - } - } - - _vm->_system->updateScreen(); - - return eventNum; -} - -int16 ScriptFunctionsMhne::o1_EVENTX(int16 argc, int16 *argv) { - return _vm->_eventMouseX; -} - -int16 ScriptFunctionsMhne::o1_EVENTY(int16 argc, int16 *argv) { - return _vm->_eventMouseY; -} - -int16 ScriptFunctionsMhne::o1_EVENTKEY(int16 argc, int16 *argv) { - return _vm->_eventKey; -} - -int16 ScriptFunctionsMhne::o1_VISUALFX(int16 argc, int16 *argv) { - _vm->_screen->setVisualEffectNum(argv[0]); - return 0; -} - -int16 ScriptFunctionsMhne::o1_PLAYSND(int16 argc, int16 *argv) { - int soundNum = argv[0]; - bool loop = false; - - if (argc > 1) { - soundNum = argv[1]; - loop = (argv[0] == 1); - } - - if (soundNum > 0) { - if (!_vm->_mixer->isSoundHandleActive(_audioStreamHandle)) { - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, - _vm->_res->getSound(soundNum)->getAudioStream(_vm->_soundRate, loop)); - } - } - - return 0; -} - -int16 ScriptFunctionsMhne::o1_PLAYMUS(int16 argc, int16 *argv) { - int16 musicNum = argv[0]; - if (musicNum > 0) { - _xmidiRes = _vm->_res->getXmidi(musicNum); - _vm->_music->playXMIDI(_xmidiRes); - } - return 0; -} - -int16 ScriptFunctionsMhne::o1_STOPMUS(int16 argc, int16 *argv) { - if (_vm->_music->isPlaying()) { - _vm->_music->stop(); - _vm->_res->freeResource(_xmidiRes); - } - return 0; -} - -int16 ScriptFunctionsMhne::o1_ISMUS(int16 argc, int16 *argv) { - if (_vm->_music->isPlaying()) - return 1; - else - return 0; -} - -int16 ScriptFunctionsMhne::o1_TEXTPOS(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_TEXTPOS"); - // This seems to be some kind of low-level opcode. - // The original engine calls int 10h to set the VGA cursor position. - return 0; -} - -int16 ScriptFunctionsMhne::o1_FLASH(int16 argc, int16 *argv) { - _vm->_screen->flash(argv[0]); - return 0; -} - -int16 ScriptFunctionsMhne::o1_PLAYNOTE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_PLAYNOTE"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_STOPNOTE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_STOPNOTE"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_PLAYTELE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_PLAYTELE"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_STOPTELE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_STOPTELE"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_HIDECURS(int16 argc, int16 *argv) { - _vm->_system->showMouse(false); - return 0; -} - -int16 ScriptFunctionsMhne::o1_SHOWCURS(int16 argc, int16 *argv) { - _vm->_system->showMouse(true); - return 0; -} - -int16 ScriptFunctionsMhne::o1_MUSICBEAT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_MUSICBEAT"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_SCREENLOCK(int16 argc, int16 *argv) { - _vm->_screen->setScreenLock(argv[0] != 0); - return 0; -} - -int16 ScriptFunctionsMhne::o1_ADDSPRITE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_ADDSPRITE"); - //_vm->_screen->drawSprite(argv[2], argv[1], argv[0]); - return argv[2]; -} - -int16 ScriptFunctionsMhne::o1_FREEANIM(int16 argc, int16 *argv) { - _vm->_screen->clearChannels(); - return 0; -} - -int16 ScriptFunctionsMhne::o1_DRAWSPRITE(int16 argc, int16 *argv) { - return _vm->_screen->drawSprite(argv[2], argv[1], argv[0]); -} - -int16 ScriptFunctionsMhne::o1_ERASESPRITES(int16 argc, int16 *argv) { - _vm->_screen->clearChannels(); - return 0; -} - -int16 ScriptFunctionsMhne::o1_UPDATESPRITES(int16 argc, int16 *argv) { - _vm->_screen->updateSprites(); - return 0; -} - -int16 ScriptFunctionsMhne::o1_GETTIMER(int16 argc, int16 *argv) { - return _vm->getTimer(argv[0]); -} - -int16 ScriptFunctionsMhne::o1_SETTIMER(int16 argc, int16 *argv) { - _vm->setTimer(argv[1], argv[0]); - return 0; -} - -int16 ScriptFunctionsMhne::o1_RESETTIMER(int16 argc, int16 *argv) { - _vm->resetTimer(argv[0]); - return 0; -} - -int16 ScriptFunctionsMhne::o1_ALLOCTIMER(int16 argc, int16 *argv) { - int16 timerNum = _vm->allocTimer(); - return timerNum; -} - -int16 ScriptFunctionsMhne::o1_FREETIMER(int16 argc, int16 *argv) { - _vm->freeTimer(argv[0]); - return 0; -} - -int16 ScriptFunctionsMhne::o1_PALETTELOCK(int16 argc, int16 *argv) { - _vm->_screen->setPaletteLock(argv[0] != 0); - return 0; -} - -int16 ScriptFunctionsMhne::o1_FONT(int16 argc, int16 *argv) { - _vm->_screen->setFont(argv[0]); - return 0; -} - -int16 ScriptFunctionsMhne::o1_DRAWTEXT(int16 argc, int16 *argv) { - Object *obj = _vm->_dat->getObject(argv[argc - 1]); - const char *text = obj->getString(); - _vm->_screen->printText(text); - return 0; -} - -int16 ScriptFunctionsMhne::o1_HOMETEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_HOMETEXT"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_TEXTRECT(int16 argc, int16 *argv) { - int16 x1 = CLIP(argv[4], 1, 318); - int16 y1 = CLIP(argv[3], 1, 198); - int16 x2 = CLIP(argv[2], 1, 318); - int16 y2 = CLIP(argv[1], 1, 198); - //int16 textValue = argv[0]; - // TODO: textValue - _vm->_screen->setTextRect(Common::Rect(x1, y1, x2, y2)); - return 0; -} - -int16 ScriptFunctionsMhne::o1_TEXTXY(int16 argc, int16 *argv) { - int16 x = CLIP(argv[1], 1, 318); - int16 y = CLIP(argv[0], 1, 198); - _vm->_screen->setTextXY(x, y); - return 0; -} - -int16 ScriptFunctionsMhne::o1_DROPSHADOW(int16 argc, int16 *argv) { - // if the drop shadow color is -1, then text drop shadow is disabled - // when font drop shadow is enabled, outline is disabled - _vm->_screen->setDropShadowColor(argv[0]); - return 0; -} - -int16 ScriptFunctionsMhne::o1_TEXTCOLOR(int16 argc, int16 *argv) { - _vm->_screen->setTextColor(argv[0]); - return 0; -} - -int16 ScriptFunctionsMhne::o1_OUTLINE(int16 argc, int16 *argv) { - // if the outline color is -1, then text outline is disabled - // when font outline is enabled, drop shadow is disabled - _vm->_screen->setOutlineColor(argv[0]); - return 0; -} - -int16 ScriptFunctionsMhne::o1_LOADCURSOR(int16 argc, int16 *argv) { - PictureResource *flex = _vm->_res->getPicture(argv[2]); - Graphics::Surface *surf = flex->getPicture(); - CursorMan.replaceCursor((const byte *)surf->pixels, surf->w, surf->h, argv[1], argv[0], 0); - CursorMan.showMouse(true); - _vm->_res->freeResource(flex); - return 0; -} - -int16 ScriptFunctionsMhne::o1_SETGROUND(int16 argc, int16 *argv) { - _vm->_screen->setGround(argv[0]); - return 0; -} - -int16 ScriptFunctionsMhne::o1_RESTEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_RESTEXT"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_ADDMASK(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_ADDMASK"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_SETMASK(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_SETMASK"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_ISSND(int16 argc, int16 *argv) { - if (_vm->_mixer->isSoundHandleActive(_audioStreamHandle)) - return 1; - else - return 0; -} - -int16 ScriptFunctionsMhne::o1_STOPSND(int16 argc, int16 *argv) { - _vm->_mixer->stopHandle(_audioStreamHandle); - return 0; -} - -int16 ScriptFunctionsMhne::o1_PLAYVOICE(int16 argc, int16 *argv) { - if (argv[0] > 0) { - _vm->_mixer->stopHandle(_audioStreamHandle); - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, - _vm->_res->getSound(argv[0])->getAudioStream(_vm->_soundRate, false)); - } - return 0; -} - -int16 ScriptFunctionsMhne::o1_CDPLAY(int16 argc, int16 *argv) { - // This one is called loads of times, so it has been commented out to reduce spam - //warning("Unimplemented opcode: o1_CDPLAY"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_STOPCD(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_STOPCD"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_CDSTATUS(int16 argc, int16 *argv) { - // This one is called loads of times, so it has been commented out to reduce spam - //warning("Unimplemented opcode: o1_CDSTATUS"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_CDTIME(int16 argc, int16 *argv) { - // This one is called loads of times, so it has been commented out to reduce spam - //warning("Unimplemented opcode: o1_CDTIME"); - return 0; -} - -int16 ScriptFunctionsMhne::o1_CDPLAYSEG(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_CDPLAYSEG"); - return 0; -} - -} // End of namespace Made diff --git a/engines/made/scriptfuncs_rtz.cpp b/engines/made/scriptfuncs_rtz.cpp deleted file mode 100644 index 3536dc3c76..0000000000 --- a/engines/made/scriptfuncs_rtz.cpp +++ /dev/null @@ -1,875 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/endian.h" -#include "common/util.h" -#include "common/events.h" - -#include "graphics/cursorman.h" - -#include "made/made.h" -#include "made/resource.h" -#include "made/database.h" -#include "made/screen.h" -#include "made/script.h" -#include "made/pmvplayer.h" -#include "made/scriptfuncs.h" -#include "made/music.h" - -namespace Made { - -/* ScriptFunctionsRtz */ - -typedef Common::Functor2Mem ExternalFuncRtz; -#define External(x) \ - _externalFuncs.push_back(new ExternalFuncRtz(this, &ScriptFunctionsRtz::x)); \ - _externalFuncNames.push_back(#x); -void ScriptFunctionsRtz::setupExternalsTable() { - - External(o1_SYSTEM); - External(o1_INITGRAF); - External(o1_RESTOREGRAF); - External(o1_DRAWPIC); - External(o1_CLS); - External(o1_SHOWPAGE); - External(o1_EVENT); - External(o1_EVENTX); - External(o1_EVENTY); - External(o1_EVENTKEY); - External(o1_VISUALFX); - External(o1_PLAYSND); - External(o1_PLAYMUS); - External(o1_STOPMUS); - External(o1_ISMUS); - External(o1_TEXTPOS); - External(o1_FLASH); - External(o1_PLAYNOTE); - External(o1_STOPNOTE); - External(o1_PLAYTELE); - External(o1_STOPTELE); - External(o1_HIDECURS); - External(o1_SHOWCURS); - External(o1_MUSICBEAT); - External(o1_SCREENLOCK); - External(o1_ADDSPRITE); - External(o1_FREEANIM); - External(o1_DRAWSPRITE); - External(o1_ERASESPRITES); - External(o1_UPDATESPRITES); - External(o1_GETTIMER); - External(o1_SETTIMER); - External(o1_RESETTIMER); - External(o1_ALLOCTIMER); - External(o1_FREETIMER); - External(o1_PALETTELOCK); - External(o1_FONT); - External(o1_DRAWTEXT); - External(o1_HOMETEXT); - External(o1_TEXTRECT); - External(o1_TEXTXY); - External(o1_DROPSHADOW); - External(o1_TEXTCOLOR); - External(o1_OUTLINE); - External(o1_LOADCURSOR); - External(o1_SETGROUND); - External(o1_RESTEXT); - External(o1_CLIPAREA); - External(o1_SETCLIP); - External(o1_ISSND); - External(o1_STOPSND); - External(o1_PLAYVOICE); - External(o1_CDPLAY); - External(o1_STOPCD); - External(o1_CDSTATUS); - External(o1_CDTIME); - External(o1_CDPLAYSEG); - External(o1_PRINTF); - External(o1_MONOCLS); - External(o1_SNDENERGY); - External(o1_CLEARTEXT); - External(o1_ANIMTEXT); - External(o1_TEXTWIDTH); - External(o1_PLAYMOVIE); - External(o1_LOADSND); - External(o1_LOADMUS); - External(o1_LOADPIC); - External(o1_MUSICVOL); - External(o1_RESTARTEVENTS); - External(o1_PLACESPRITE); - External(o1_PLACETEXT); - External(o1_DELETECHANNEL); - External(o1_CHANNELTYPE); - External(o1_SETSTATE); - External(o1_SETLOCATION); - External(o1_SETCONTENT); - External(o1_EXCLUDEAREA); - External(o1_SETEXCLUDE); - External(o1_GETSTATE); - External(o1_PLACEANIM); - External(o1_SETFRAME); - External(o1_GETFRAME); - External(o1_GETFRAMECOUNT); - External(o1_PICWIDTH); - External(o1_PICHEIGHT); - External(o1_SOUNDRATE); - External(o1_DRAWANIMPIC); - External(o1_LOADANIM); - External(o1_READTEXT); - External(o1_READMENU); - External(o1_DRAWMENU); - External(o1_MENUCOUNT); - External(o1_SAVEGAME); - External(o1_LOADGAME); - External(o1_GAMENAME); - External(o1_SHAKESCREEN); - External(o1_PLACEMENU); - External(o1_SETVOLUME); - External(o1_WHATSYNTH); - External(o1_SLOWSYSTEM); - -} -#undef External - -int16 ScriptFunctionsRtz::o1_SYSTEM(int16 argc, int16 *argv) { - // This opcode is empty. - return 0; -} - -int16 ScriptFunctionsRtz::o1_INITGRAF(int16 argc, int16 *argv) { - // This opcode is empty. - return 0; -} - -int16 ScriptFunctionsRtz::o1_RESTOREGRAF(int16 argc, int16 *argv) { - // This opcode is empty. - return 0; -} - -int16 ScriptFunctionsRtz::o1_DRAWPIC(int16 argc, int16 *argv) { - return _vm->_screen->drawPic(argv[4], argv[3], argv[2], argv[1], argv[0]); -} - -int16 ScriptFunctionsRtz::o1_CLS(int16 argc, int16 *argv) { - _vm->_screen->clearScreen(); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SHOWPAGE(int16 argc, int16 *argv) { - _vm->_screen->show(); - return 0; -} - -int16 ScriptFunctionsRtz::o1_EVENT(int16 argc, int16 *argv) { - - Common::Event event; - Common::EventManager *eventMan = g_system->getEventManager(); - - int16 eventNum = 0; - - if (eventMan->pollEvent(event)) { - switch (event.type) { - - case Common::EVENT_MOUSEMOVE: - _vm->_eventMouseX = event.mouse.x; - _vm->_eventMouseY = event.mouse.y; - break; - - case Common::EVENT_LBUTTONDOWN: - eventNum = 1; - break; - - /* - case Common::EVENT_LBUTTONUP: - eventNum = 2; // TODO: Is this correct? - break; - */ - - case Common::EVENT_RBUTTONDOWN: - eventNum = 3; - break; - - /* - case Common::EVENT_RBUTTONUP: - eventNum = 4; // TODO: Is this correct? - break; - */ - - case Common::EVENT_KEYDOWN: - _vm->_eventKey = event.kbd.ascii; - // For unknown reasons, the game accepts ASCII code - // 9 as backspace - if (_vm->_eventKey == Common::KEYCODE_BACKSPACE) - _vm->_eventKey = 9; - eventNum = 5; - break; - - case Common::EVENT_QUIT: - _vm->_quit = true; - break; - - default: - break; - - } - } - - _vm->_system->updateScreen(); - - return eventNum; -} - -int16 ScriptFunctionsRtz::o1_EVENTX(int16 argc, int16 *argv) { - return _vm->_eventMouseX; -} - -int16 ScriptFunctionsRtz::o1_EVENTY(int16 argc, int16 *argv) { - return _vm->_eventMouseY; -} - -int16 ScriptFunctionsRtz::o1_EVENTKEY(int16 argc, int16 *argv) { - return _vm->_eventKey; -} - -int16 ScriptFunctionsRtz::o1_VISUALFX(int16 argc, int16 *argv) { - _vm->_screen->setVisualEffectNum(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLAYSND(int16 argc, int16 *argv) { - int soundNum = argv[0]; - bool loop = false; - - if (argc > 1) { - soundNum = argv[1]; - loop = (argv[0] == 1); - } - - if (soundNum > 0) { - if (!_vm->_mixer->isSoundHandleActive(_audioStreamHandle)) { - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, - _vm->_res->getSound(soundNum)->getAudioStream(_vm->_soundRate, loop)); - } - } - - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLAYMUS(int16 argc, int16 *argv) { - int16 musicNum = argv[0]; - if (musicNum > 0) { - _xmidiRes = _vm->_res->getXmidi(musicNum); - if (_xmidiRes) - _vm->_music->playXMIDI(_xmidiRes); - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_STOPMUS(int16 argc, int16 *argv) { - if (_vm->_music->isPlaying() && _xmidiRes) { - _vm->_music->stop(); - _vm->_res->freeResource(_xmidiRes); - _xmidiRes = NULL; - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_ISMUS(int16 argc, int16 *argv) { - if (_vm->_music->isPlaying()) - return 1; - else - return 0; -} - -int16 ScriptFunctionsRtz::o1_TEXTPOS(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_TEXTPOS"); - // This seems to be some kind of low-level opcode. - // The original engine calls int 10h to set the VGA cursor position. - return 0; -} - -int16 ScriptFunctionsRtz::o1_FLASH(int16 argc, int16 *argv) { - _vm->_screen->flash(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLAYNOTE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_PLAYNOTE"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_STOPNOTE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_STOPNOTE"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLAYTELE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_PLAYTELE"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_STOPTELE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_STOPTELE"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_HIDECURS(int16 argc, int16 *argv) { - _vm->_system->showMouse(false); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SHOWCURS(int16 argc, int16 *argv) { - _vm->_system->showMouse(true); - return 0; -} - -int16 ScriptFunctionsRtz::o1_MUSICBEAT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_MUSICBEAT"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SCREENLOCK(int16 argc, int16 *argv) { - _vm->_screen->setScreenLock(argv[0] != 0); - return 0; -} - -int16 ScriptFunctionsRtz::o1_ADDSPRITE(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_ADDSPRITE"); - //_vm->_screen->drawSprite(argv[2], argv[1], argv[0]); - return 0;//argv[2]; -} - -int16 ScriptFunctionsRtz::o1_FREEANIM(int16 argc, int16 *argv) { - _vm->_screen->clearChannels(); - return 0; -} - -int16 ScriptFunctionsRtz::o1_DRAWSPRITE(int16 argc, int16 *argv) { - return _vm->_screen->drawSprite(argv[2], argv[1], argv[0]); -} - -int16 ScriptFunctionsRtz::o1_ERASESPRITES(int16 argc, int16 *argv) { - _vm->_screen->clearChannels(); - return 0; -} - -int16 ScriptFunctionsRtz::o1_UPDATESPRITES(int16 argc, int16 *argv) { - _vm->_screen->updateSprites(); - return 0; -} - -int16 ScriptFunctionsRtz::o1_GETTIMER(int16 argc, int16 *argv) { - return _vm->getTimer(argv[0]); -} - -int16 ScriptFunctionsRtz::o1_SETTIMER(int16 argc, int16 *argv) { - _vm->setTimer(argv[1], argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_RESETTIMER(int16 argc, int16 *argv) { - _vm->resetTimer(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_ALLOCTIMER(int16 argc, int16 *argv) { - int16 timerNum = _vm->allocTimer(); - return timerNum; -} - -int16 ScriptFunctionsRtz::o1_FREETIMER(int16 argc, int16 *argv) { - _vm->freeTimer(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PALETTELOCK(int16 argc, int16 *argv) { - _vm->_screen->setPaletteLock(argv[0] != 0); - return 0; -} - -int16 ScriptFunctionsRtz::o1_FONT(int16 argc, int16 *argv) { - _vm->_screen->setFont(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_DRAWTEXT(int16 argc, int16 *argv) { - // TODO: Needs vsprintf to get the correct text - Object *obj = _vm->_dat->getObject(argv[argc - 1]); - const char *text = obj->getString(); - _vm->_screen->printText(text); - return 0; -} - -int16 ScriptFunctionsRtz::o1_HOMETEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_HOMETEXT"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_TEXTRECT(int16 argc, int16 *argv) { - int16 x1 = CLIP(argv[4], 1, 318); - int16 y1 = CLIP(argv[3], 1, 198); - int16 x2 = CLIP(argv[2], 1, 318); - int16 y2 = CLIP(argv[1], 1, 198); - //int16 textValue = argv[0]; - // TODO: textValue - _vm->_screen->setTextRect(Common::Rect(x1, y1, x2, y2)); - return 0; -} - -int16 ScriptFunctionsRtz::o1_TEXTXY(int16 argc, int16 *argv) { - int16 x = CLIP(argv[1], 1, 318); - int16 y = CLIP(argv[0], 1, 198); - _vm->_screen->setTextXY(x, y); - return 0; -} - -int16 ScriptFunctionsRtz::o1_DROPSHADOW(int16 argc, int16 *argv) { - // if the drop shadow color is -1, then text drop shadow is disabled - // when font drop shadow is enabled, outline is disabled - _vm->_screen->setDropShadowColor(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_TEXTCOLOR(int16 argc, int16 *argv) { - _vm->_screen->setTextColor(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_OUTLINE(int16 argc, int16 *argv) { - // if the outline color is -1, then text outline is disabled - // when font outline is enabled, drop shadow is disabled - _vm->_screen->setOutlineColor(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_LOADCURSOR(int16 argc, int16 *argv) { - PictureResource *flex = _vm->_res->getPicture(argv[2]); - Graphics::Surface *surf = flex->getPicture(); - CursorMan.replaceCursor((const byte *)surf->pixels, surf->w, surf->h, argv[1], argv[0], 0); - CursorMan.showMouse(true); - _vm->_res->freeResource(flex); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SETGROUND(int16 argc, int16 *argv) { - _vm->_screen->setGround(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_RESTEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_RESTEXT"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_CLIPAREA(int16 argc, int16 *argv) { - _vm->_screen->setClipArea(argv[3], argv[2], argv[1], argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SETCLIP(int16 argc, int16 *argv) { - _vm->_screen->setClip(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_ISSND(int16 argc, int16 *argv) { - if (_vm->_mixer->isSoundHandleActive(_audioStreamHandle)) - return 1; - else - return 0; -} - -int16 ScriptFunctionsRtz::o1_STOPSND(int16 argc, int16 *argv) { - _vm->_mixer->stopHandle(_audioStreamHandle); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLAYVOICE(int16 argc, int16 *argv) { - if (argv[0] > 0) { - _vm->_mixer->stopHandle(_audioStreamHandle); - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, - _vm->_res->getSound(argv[0])->getAudioStream(_vm->_soundRate, false)); - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_CDPLAY(int16 argc, int16 *argv) { - // This one is called loads of times, so it has been commented out to reduce spam - //warning("Unimplemented opcode: o1_CDPLAY"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_STOPCD(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_STOPCD"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_CDSTATUS(int16 argc, int16 *argv) { - // This one is called loads of times, so it has been commented out to reduce spam - //warning("Unimplemented opcode: o1_CDSTATUS"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_CDTIME(int16 argc, int16 *argv) { - // This one is called loads of times, so it has been commented out to reduce spam - //warning("Unimplemented opcode: o1_CDTIME"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_CDPLAYSEG(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_CDPLAYSEG"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PRINTF(int16 argc, int16 *argv) { - Object *obj = _vm->_dat->getObject(argv[argc - 1]); - const char *text = obj->getString(); - debug(4, "--> text = %s", text); - return 0; -} - -int16 ScriptFunctionsRtz::o1_MONOCLS(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_MONOCLS"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SNDENERGY(int16 argc, int16 *argv) { - // This is called while in-game voices are played - // Not sure what it's used for - // -> It's used to animate mouths when NPCs are talking - // FIXME: This is a workaround for the "sound energy" problem - // At least the characters move their lips when talking now - return _vm->_rnd->getRandomNumber(5); -} - -int16 ScriptFunctionsRtz::o1_CLEARTEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_CLEARTEXT"); - return 1; -} - -int16 ScriptFunctionsRtz::o1_ANIMTEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_ANIMTEXT"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_TEXTWIDTH(int16 argc, int16 *argv) { - int16 width = 0; - if (argv[1] > 0) { - Object *obj = _vm->_dat->getObject(argv[1]); - const char *text = obj->getString(); - width = _vm->_screen->getTextWidth(argv[0], text); - } - return width; -} - -int16 ScriptFunctionsRtz::o1_PLAYMOVIE(int16 argc, int16 *argv) { - const char *movieName = _vm->_dat->getObject(argv[1])->getString(); - _vm->_system->showMouse(false); - _vm->_pmvPlayer->play(movieName); - _vm->_system->showMouse(true); - return 0; -} - -int16 ScriptFunctionsRtz::o1_LOADSND(int16 argc, int16 *argv) { - SoundResource *sound = _vm->_res->getSound(argv[0]); - if (sound) { - _vm->_res->freeResource(sound); - return 1; - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_LOADMUS(int16 argc, int16 *argv) { - GenericResource *xmidi = _vm->_res->getXmidi(argv[0]); - if (xmidi) { - _vm->_res->freeResource(xmidi); - return 1; - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_LOADPIC(int16 argc, int16 *argv) { - PictureResource *flex = _vm->_res->getPicture(argv[0]); - if (flex) { - _vm->_res->freeResource(flex); - return 1; - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_MUSICVOL(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_MUSICVOL"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_RESTARTEVENTS(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_RESTARTEVENTS"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLACESPRITE(int16 argc, int16 *argv) { - return _vm->_screen->placeSprite(argv[3], argv[2], argv[1], argv[0]); -} - -int16 ScriptFunctionsRtz::o1_PLACETEXT(int16 argc, int16 *argv) { - return _vm->_screen->placeText(argv[6], argv[5], argv[4], argv[3], argv[2], argv[1], argv[0]); -} - -int16 ScriptFunctionsRtz::o1_DELETECHANNEL(int16 argc, int16 *argv) { - _vm->_screen->deleteChannel(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_CHANNELTYPE(int16 argc, int16 *argv) { - return _vm->_screen->getChannelType(argv[0]); -} - -int16 ScriptFunctionsRtz::o1_SETSTATE(int16 argc, int16 *argv) { - _vm->_screen->setChannelState(argv[1], argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SETLOCATION(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_SETLOCATION"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SETCONTENT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_SETCONTENT"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_EXCLUDEAREA(int16 argc, int16 *argv) { - _vm->_screen->setExcludeArea(argv[3], argv[2], argv[1], argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SETEXCLUDE(int16 argc, int16 *argv) { - _vm->_screen->setExclude(argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_GETSTATE(int16 argc, int16 *argv) { - return _vm->_screen->getChannelState(argv[0]); -} - -int16 ScriptFunctionsRtz::o1_PLACEANIM(int16 argc, int16 *argv) { - return _vm->_screen->placeAnim(argv[4], argv[3], argv[2], argv[1], argv[0]); -} - -int16 ScriptFunctionsRtz::o1_SETFRAME(int16 argc, int16 *argv) { - _vm->_screen->setAnimFrame(argv[1], argv[0]); - return 0; -} - -int16 ScriptFunctionsRtz::o1_GETFRAME(int16 argc, int16 *argv) { - return _vm->_screen->getAnimFrame(argv[0]); -} - -int16 ScriptFunctionsRtz::o1_GETFRAMECOUNT(int16 argc, int16 *argv) { - int16 frameCount = 0; - AnimationResource *anim = _vm->_res->getAnimation(argv[0]); - if (anim) { - frameCount = anim->getCount(); - _vm->_res->freeResource(anim); - } - return frameCount; -} - -int16 ScriptFunctionsRtz::o1_PICWIDTH(int16 argc, int16 *argv) { - int16 width = 0; - PictureResource *flex = _vm->_res->getPicture(argv[0]); - if (flex) { - width = flex->getPicture()->w; - _vm->_res->freeResource(flex); - } - return width; -} - -int16 ScriptFunctionsRtz::o1_PICHEIGHT(int16 argc, int16 *argv) { - int16 height = 0; - PictureResource *flex = _vm->_res->getPicture(argv[0]); - if (flex) { - height = flex->getPicture()->h; - _vm->_res->freeResource(flex); - } - return height; -} - -int16 ScriptFunctionsRtz::o1_SOUNDRATE(int16 argc, int16 *argv) { - _vm->_soundRate = argv[0]; - return 1; -} - -int16 ScriptFunctionsRtz::o1_DRAWANIMPIC(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_DRAWANIMPIC"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_LOADANIM(int16 argc, int16 *argv) { - AnimationResource *anim = _vm->_res->getAnimation(argv[0]); - if (anim) { - _vm->_res->freeResource(anim); - return 1; - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_READTEXT(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_READTEXT"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_READMENU(int16 argc, int16 *argv) { - 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, "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 length; -} - -int16 ScriptFunctionsRtz::o1_DRAWMENU(int16 argc, int16 *argv) { - int16 menuIndex = argv[1]; - int16 textIndex = argv[0]; - MenuResource *menu = _vm->_res->getMenu(menuIndex); - if (menu) { - const char *text = menu->getString(textIndex); - if (text) - _vm->_screen->printText(text); - _vm->_res->freeResource(menu); - } - return 0; -} - -int16 ScriptFunctionsRtz::o1_MENUCOUNT(int16 argc, int16 *argv) { - int16 menuIndex = argv[0]; - int16 count = 0; - MenuResource *menu = _vm->_res->getMenu(menuIndex); - if (menu) { - count = menu->getCount(); - _vm->_res->freeResource(menu); - } - return count; -} - -int16 ScriptFunctionsRtz::o1_SAVEGAME(int16 argc, int16 *argv) { - - int16 saveNum = argv[2]; - int16 descObjectIndex = argv[1]; - int16 version = argv[0]; - - if (saveNum > 999) - return 6; - - Object *obj = _vm->_dat->getObject(descObjectIndex); - const char *description = obj->getString(); - - Common::String filename = _vm->getSavegameFilename(saveNum); - - return _vm->_dat->savegame(filename.c_str(), description, version); - -} - -int16 ScriptFunctionsRtz::o1_LOADGAME(int16 argc, int16 *argv) { - - int16 saveNum = argv[1]; - int16 version = argv[0]; - - if (saveNum > 999) - return 1; - - Common::String filename = _vm->getSavegameFilename(saveNum); - - return _vm->_dat->loadgame(filename.c_str(), version); - -} - -int16 ScriptFunctionsRtz::o1_GAMENAME(int16 argc, int16 *argv) { - - int16 descObjectIndex = argv[2]; - int16 saveNum = argv[1]; - /*int16 version = argv[0];*/ - Common::String description; - - if (saveNum > 999) - return 1; - - Common::String filename = _vm->getSavegameFilename(saveNum); - - Object *obj = _vm->_dat->getObject(descObjectIndex); - - if (_vm->_dat->getSavegameDescription(filename.c_str(), description)) { - obj->setString(description.c_str()); - return 0; - } else { - obj->setString(""); - return 1; - } - -} - -int16 ScriptFunctionsRtz::o1_SHAKESCREEN(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_SHAKESCREEN"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_PLACEMENU(int16 argc, int16 *argv) { - warning("Unimplemented opcode: o1_PLACEMENU"); - return 0; -} - -int16 ScriptFunctionsRtz::o1_SETVOLUME(int16 argc, int16 *argv) { - _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, argv[0] * 25); - _vm->_mixer->setVolumeForSoundType(Audio::Mixer::kSpeechSoundType, argv[0] * 25); - return 0; -} - -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; -} - -int16 ScriptFunctionsRtz::o1_SLOWSYSTEM(int16 argc, int16 *argv) { - //warning("Unimplemented opcode: o1_SLOWSYSTEM"); - // NOTE: In the original engine this value is set via a command-line parameter - // I don't think it's needed here - // One could maybe think about returning 1 here on actually slower systems. - return 0; -} - -} // End of namespace Made -- cgit v1.2.3 From 6c1cee1a1d4767e7b0c812b400637b2ffa20c848 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 14 May 2008 11:21:33 +0000 Subject: Forgot the makefile, sorry svn-id: r32107 --- engines/made/module.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engines/made/module.mk b/engines/made/module.mk index 8d38192af7..b3d004aa4c 100644 --- a/engines/made/module.mk +++ b/engines/made/module.mk @@ -12,9 +12,7 @@ MODULE_OBJS = \ screen.o \ screenfx.o \ script.o \ - scriptfuncs_lgop2.o \ - scriptfuncs_mhne.o \ - scriptfuncs_rtz.o \ + scriptfuncs.o \ sound.o -- cgit v1.2.3 From 5f4b66e85ec6eeeee0d310287738234d2d55add4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 14 May 2008 11:58:25 +0000 Subject: Typo svn-id: r32108 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index ea627e4fd8..35db11f6aa 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #!/bin/sh # -# configue -- custom configure script for ScummVM. +# configure -- custom configure script for ScummVM. # # ScummVM is the legal property of its developers, whose names # are too numerous to list here. Please refer to the COPYRIGHT -- cgit v1.2.3 From f63a2b39e77129c9e964a74d3cd13c5f285df01b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 14 May 2008 12:26:33 +0000 Subject: Add a pause when the script ends svn-id: r32109 --- dists/msvc8_to_msvc7_71.bat | 1 + 1 file changed, 1 insertion(+) diff --git a/dists/msvc8_to_msvc7_71.bat b/dists/msvc8_to_msvc7_71.bat index 11be21e1dd..71d04f68a3 100644 --- a/dists/msvc8_to_msvc7_71.bat +++ b/dists/msvc8_to_msvc7_71.bat @@ -101,3 +101,4 @@ echo Place rpl.exe from the bin folder inside the archive in the folder where echo this batch file resides :the_end +pause -- cgit v1.2.3 From b4a8f498eefb6606397c39d68e4c33413944d4ed Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 14 May 2008 12:27:23 +0000 Subject: Updated the MSVC project files of the MADE engine svn-id: r32110 --- dists/msvc7/made.vcproj | 12 +++--------- dists/msvc71/made.vcproj | 12 +++--------- dists/msvc8/made.vcproj | 14 +++----------- dists/msvc9/made.vcproj | 14 +++----------- 4 files changed, 12 insertions(+), 40 deletions(-) diff --git a/dists/msvc7/made.vcproj b/dists/msvc7/made.vcproj index 6f4caa8154..f765eb8a94 100644 --- a/dists/msvc7/made.vcproj +++ b/dists/msvc7/made.vcproj @@ -1,4 +1,4 @@ - + - - + RelativePath="..\..\engines\made\scriptfuncs.cpp"> - - + RelativePath="..\..\engines\made\scriptfuncs.h"> diff --git a/dists/msvc71/made.vcproj b/dists/msvc71/made.vcproj index 1ddc1ce245..158fb5e277 100644 --- a/dists/msvc71/made.vcproj +++ b/dists/msvc71/made.vcproj @@ -1,4 +1,4 @@ - + - - + RelativePath="..\..\engines\made\scriptfuncs.cpp"> - - + RelativePath="..\..\engines\made\scriptfuncs.h"> diff --git a/dists/msvc8/made.vcproj b/dists/msvc8/made.vcproj index 7f7ec6e454..c2c226ff75 100644 --- a/dists/msvc8/made.vcproj +++ b/dists/msvc8/made.vcproj @@ -1,4 +1,4 @@ - + - - - - + - - - - + + + + diff --git a/dists/msvc71/made.vcproj b/dists/msvc71/made.vcproj index 158fb5e277..5d0dd621e8 100644 --- a/dists/msvc71/made.vcproj +++ b/dists/msvc71/made.vcproj @@ -161,6 +161,12 @@ + + + + diff --git a/dists/msvc8/made.vcproj b/dists/msvc8/made.vcproj index c2c226ff75..b3c309b334 100644 --- a/dists/msvc8/made.vcproj +++ b/dists/msvc8/made.vcproj @@ -228,6 +228,14 @@ RelativePath="..\..\engines\made\screen.h" > + + + + diff --git a/dists/msvc9/made.vcproj b/dists/msvc9/made.vcproj index ebb3323bc2..a96ae262cb 100644 --- a/dists/msvc9/made.vcproj +++ b/dists/msvc9/made.vcproj @@ -229,6 +229,14 @@ RelativePath="..\..\engines\made\screen.h" > + + + + -- cgit v1.2.3 From 7fd9e149f9cf88d58762a656d0d806ae185bc914 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 14 May 2008 13:52:24 +0000 Subject: Possibly fixed bug #1963700 "KYRA2: Nonresponsive clicks". svn-id: r32112 --- engines/kyra/sequences_v2.cpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/engines/kyra/sequences_v2.cpp b/engines/kyra/sequences_v2.cpp index aef510a616..5d4b826ec2 100644 --- a/engines/kyra/sequences_v2.cpp +++ b/engines/kyra/sequences_v2.cpp @@ -102,17 +102,13 @@ void KyraEngine_v2::processAnimationScript(int allowSkip, int resetChar) { uint32 delayEnd = _system->getMillis() + _animDelayTime * _tickLength; - while ((!skipFlag() || !allowSkip) && _system->getMillis() < delayEnd) { - if (_chatText) - updateWithText(); - else - update(); + while ((!skipFlag() || !allowSkip) && _system->getMillis() < delayEnd) + delay(10, true); - delay(10); - } - - if (skipFlag()) + if (skipFlag()) { resetSkipFlag(); + break; + } } if (resetChar) { -- cgit v1.2.3 From 0bd8493e7cb75ff8cfc0d768da884af3b48b3f98 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 14 May 2008 13:57:22 +0000 Subject: Formatting. svn-id: r32113 --- engines/kyra/script_hof.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index e481aedb07..d2b6b08183 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -909,11 +909,10 @@ int KyraEngine_HoF::o2_updateSceneAnim(EMCState *script) { // away the key. (see bug #1926838 "HoF: Animation plays too fast"). if ((stackPos(0) == 2 && _mainCharacter.sceneId == 3) || - (stackPos(0) == 3 && _mainCharacter.sceneId == 33) || - ((stackPos(0) == 1 || stackPos(0) == 2) && _mainCharacter.sceneId == 19) || - ((stackPos(0) == 1 || stackPos(0) == 2) && _mainCharacter.sceneId == 27)) { + (stackPos(0) == 3 && _mainCharacter.sceneId == 33) || + ((stackPos(0) == 1 || stackPos(0) == 2) && _mainCharacter.sceneId == 19) || + ((stackPos(0) == 1 || stackPos(0) == 2) && _mainCharacter.sceneId == 27)) _sceneSpecialScriptsTimer[_lastProcessedSceneScript] = _system->getMillis() + _tickLength * 6; - } _specialSceneScriptRunFlag = false; return 0; -- cgit v1.2.3 From 05a45b17b8cd88387a58dc61dd91ff128ff7d24d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 14 May 2008 14:07:56 +0000 Subject: Just allow animation scripts marked as skipable to be skipped. svn-id: r32114 --- engines/kyra/sequences_v2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/kyra/sequences_v2.cpp b/engines/kyra/sequences_v2.cpp index 5d4b826ec2..cc4b8528a4 100644 --- a/engines/kyra/sequences_v2.cpp +++ b/engines/kyra/sequences_v2.cpp @@ -107,7 +107,8 @@ void KyraEngine_v2::processAnimationScript(int allowSkip, int resetChar) { if (skipFlag()) { resetSkipFlag(); - break; + if (allowSkip) + break; } } -- cgit v1.2.3 From 40ff1537a9a428753b0d2fe2c3716372818d8207 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Wed, 14 May 2008 14:34:01 +0000 Subject: - Moved input code to its own class. - Slightly simplified inventory highlight code thanks to changes in input code. svn-id: r32115 --- engines/parallaction/callables_ns.cpp | 20 +- engines/parallaction/dialogue.cpp | 16 +- engines/parallaction/exec_br.cpp | 6 +- engines/parallaction/exec_ns.cpp | 3 +- engines/parallaction/graphics.cpp | 5 +- engines/parallaction/gui_br.cpp | 15 +- engines/parallaction/gui_ns.cpp | 44 ++- engines/parallaction/input.cpp | 349 +++++++++++++++++++++++ engines/parallaction/input.h | 114 ++++++++ engines/parallaction/inventory.cpp | 23 +- engines/parallaction/parallaction.cpp | 462 +++++-------------------------- engines/parallaction/parallaction.h | 68 +---- engines/parallaction/parallaction_br.cpp | 3 +- engines/parallaction/parallaction_ns.cpp | 11 +- 14 files changed, 640 insertions(+), 499 deletions(-) create mode 100644 engines/parallaction/input.cpp create mode 100644 engines/parallaction/input.h diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp index d5defda8cf..402f69c99d 100644 --- a/engines/parallaction/callables_ns.cpp +++ b/engines/parallaction/callables_ns.cpp @@ -30,6 +30,7 @@ #include "graphics/primitives.h" // for Graphics::drawLine +#include "parallaction/input.h" #include "parallaction/parallaction.h" #include "parallaction/sound.h" @@ -303,14 +304,14 @@ void Parallaction_ns::_c_trasformata(void *parm) { } void Parallaction_ns::_c_offMouse(void *parm) { - showCursor(false); + _input->showCursor(false); _engineFlags |= kEngineBlockInput; return; } void Parallaction_ns::_c_onMouse(void *parm) { _engineFlags &= ~kEngineBlockInput; - showCursor(true); + _input->showCursor(true); return; } @@ -339,7 +340,7 @@ void Parallaction_ns::_c_endComment(void *param) { g_system->delayMillis(20); } - waitUntilLeftClick(); + _input->waitUntilLeftClick(); _gfx->freeBalloons(); return; @@ -395,7 +396,7 @@ void Parallaction_ns::_c_finito(void *parm) { _gfx->showLabel(id[1], CENTER_LABEL_HORIZONTAL, 100); _gfx->showLabel(id[2], CENTER_LABEL_HORIZONTAL, 130); _gfx->showLabel(id[3], CENTER_LABEL_HORIZONTAL, 160); - waitUntilLeftClick(); + _input->waitUntilLeftClick(); _gfx->freeLabels(); @@ -467,6 +468,7 @@ void Parallaction_ns::_c_endIntro(void *parm) { debugC(1, kDebugExec, "endIntro()"); + uint32 event; uint id[2]; for (uint16 _si = 0; _si < 6; _si++) { id[0] = _gfx->createLabel(_menuFont, _credits[_si]._role, 1); @@ -478,9 +480,9 @@ void Parallaction_ns::_c_endIntro(void *parm) { _gfx->updateScreen(); for (uint16 v2 = 0; v2 < 100; v2++) { - _mouseButtons = kMouseNone; - readInput(); - if (_mouseButtons == kMouseLeftUp) + _input->readInput(); + event = _input->getLastButtonEvent(); + if (event == kMouseLeftUp) break; waitTime( 1 ); @@ -497,7 +499,7 @@ void Parallaction_ns::_c_endIntro(void *parm) { id[0] = _gfx->createLabel(_menuFont, "CLICK MOUSE BUTTON TO START", 1); _gfx->showLabel(id[0], CENTER_LABEL_HORIZONTAL, 80); - waitUntilLeftClick(); + _input->waitUntilLeftClick(); _gfx->freeLabels(); @@ -507,7 +509,7 @@ void Parallaction_ns::_c_endIntro(void *parm) { cleanupGame(); } else { - waitUntilLeftClick(); + _input->waitUntilLeftClick(); } return; diff --git a/engines/parallaction/dialogue.cpp b/engines/parallaction/dialogue.cpp index 2e3ecb590f..70db637699 100644 --- a/engines/parallaction/dialogue.cpp +++ b/engines/parallaction/dialogue.cpp @@ -24,6 +24,8 @@ */ #include "common/events.h" + +#include "parallaction/input.h" #include "parallaction/parallaction.h" @@ -195,7 +197,7 @@ void DialogueManager::displayQuestion() { _vm->_gfx->setItemFrame(id, _q->_mood & 0xF); _vm->_gfx->updateScreen(); - waitUntilLeftClick(); + _vm->_input->waitUntilLeftClick(); _vm->_gfx->hideDialogueStuff(); return; @@ -254,7 +256,7 @@ int16 DialogueManager::selectAnswer() { if (numAvailableAnswers == 1) { _vm->_gfx->setBalloonText(0, _q->_answers[0]->_text, 0); - waitUntilLeftClick(); + _vm->_input->waitUntilLeftClick(); _vm->_gfx->hideDialogueStuff(); return 0; } @@ -262,10 +264,14 @@ int16 DialogueManager::selectAnswer() { int oldSelection = -1; int selection; + uint32 event; + Common::Point p; while (true) { - _vm->readInput(); - selection = _vm->_gfx->hitTestDialogueBalloon(_vm->_mousePos.x, _vm->_mousePos.y); + _vm->_input->readInput(); + _vm->_input->getCursorPos(p); + event = _vm->_input->getLastButtonEvent(); + selection = _vm->_gfx->hitTestDialogueBalloon(p.x, p.y); if (selection != oldSelection) { if (oldSelection != -1) { @@ -278,7 +284,7 @@ int16 DialogueManager::selectAnswer() { } } - if ((selection != -1) && (_mouseButtons == kMouseLeftUp)) { + if ((selection != -1) && (event == kMouseLeftUp)) { break; } diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp index 9484c99585..07ed3f5d78 100644 --- a/engines/parallaction/exec_br.cpp +++ b/engines/parallaction/exec_br.cpp @@ -23,7 +23,7 @@ * */ - +#include "parallaction/input.h" #include "parallaction/parallaction.h" namespace Parallaction { @@ -184,12 +184,12 @@ DECLARE_COMMAND_OPCODE(followme) { DECLARE_COMMAND_OPCODE(onmouse) { - showCursor(true); + _input->showCursor(true); } DECLARE_COMMAND_OPCODE(offmouse) { - showCursor(false); + _input->showCursor(false); } diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index 9ed56827b5..68ae91c73e 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -23,6 +23,7 @@ * */ +#include "parallaction/input.h" #include "parallaction/parallaction.h" #include "parallaction/sound.h" @@ -480,7 +481,7 @@ void Parallaction::displayComment(ExamineData *data) { _gfx->setItemFrame(id, 0); } - _inputMode = kInputModeComment; + _input->_inputMode = Input::kInputModeComment; } diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index f92a58cdb0..9110731a04 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -27,6 +27,7 @@ #include "common/file.h" #include "graphics/primitives.h" +#include "parallaction/input.h" #include "parallaction/parallaction.h" @@ -781,9 +782,9 @@ void Gfx::updateFloatingLabel() { int16 _si, _di; Common::Point cursor; - _vm->getCursorPos(cursor); + _vm->_input->getCursorPos(cursor); - if (_vm->_activeItem._id != 0) { + if (_vm->_input->_activeItem._id != 0) { _si = cursor.x + 16 - _floatingLabel->_cnv.w/2; _di = cursor.y + 34; } else { diff --git a/engines/parallaction/gui_br.cpp b/engines/parallaction/gui_br.cpp index 8ce559e644..c515299a34 100644 --- a/engines/parallaction/gui_br.cpp +++ b/engines/parallaction/gui_br.cpp @@ -25,6 +25,8 @@ #include "common/system.h" + +#include "parallaction/input.h" #include "parallaction/parallaction.h" namespace Parallaction { @@ -164,15 +166,20 @@ int Parallaction_br::guiShowMenu() { setMousePointer(0); + uint32 event; + Common::Point p; while (true) { - if ((_mouseButtons == kMouseLeftUp) && selectedItem >= 0) + _input->readInput(); + + event = _input->getLastButtonEvent(); + if ((event == kMouseLeftUp) && selectedItem >= 0) break; - readInput(); + _input->getCursorPos(p); - if ((_mousePos.x > MENUITEMS_X) && (_mousePos.x < (MENUITEMS_X+MENUITEM_WIDTH)) && (_mousePos.y > MENUITEMS_Y)) { - selectedItem = (_mousePos.y - MENUITEMS_Y) / MENUITEM_HEIGHT; + if ((p.x > MENUITEMS_X) && (p.x < (MENUITEMS_X+MENUITEM_WIDTH)) && (p.y > MENUITEMS_Y)) { + selectedItem = (p.y - MENUITEMS_Y) / MENUITEM_HEIGHT; if (!(selectedItem < availItems)) selectedItem = -1; diff --git a/engines/parallaction/gui_ns.cpp b/engines/parallaction/gui_ns.cpp index fec5695413..91cc77e823 100644 --- a/engines/parallaction/gui_ns.cpp +++ b/engines/parallaction/gui_ns.cpp @@ -25,6 +25,7 @@ #include "common/system.h" +#include "parallaction/input.h" #include "parallaction/parallaction.h" #include "parallaction/sound.h" @@ -206,20 +207,22 @@ int Parallaction_ns::guiNewGame() { _gfx->showLabel(id[2], CENTER_LABEL_HORIZONTAL, 100); _gfx->showLabel(id[3], CENTER_LABEL_HORIZONTAL, 120); - showCursor(false); + _input->showCursor(false); _gfx->updateScreen(); - _mouseButtons = kMouseNone; + _input->waitForButtonEvent(kMouseLeftUp | kMouseRightUp); + uint32 event = _input->getLastButtonEvent(); +/* do { - readInput(); + _input->readInput(); } while (_mouseButtons != kMouseLeftUp && _mouseButtons != kMouseRightUp); - - showCursor(true); +*/ + _input->showCursor(true); _gfx->freeLabels(); - if (_mouseButtons != kMouseRightUp) { + if (event != kMouseRightUp) { return START_INTRO; } @@ -267,11 +270,14 @@ uint16 Parallaction_ns::guiChooseLanguage() { setArrowCursor(); + Common::Point p; + int selection = -1; while (selection == -1) { - waitUntilLeftClick(); + _input->waitUntilLeftClick(); + _input->getCursorPos(p); for (uint16 i = 0; i < 4; i++) { - if (blocks[i].contains(_mousePos)) { + if (blocks[i].contains(p)) { selection = i; break; } @@ -299,12 +305,18 @@ uint16 Parallaction_ns::guiSelectGame() { id0 = _gfx->createLabel(_introFont, loadGameMsg[_language], 1); id1 = _gfx->createLabel(_introFont, newGameMsg[_language], 1); - _mouseButtons = kMouseNone; - while (_mouseButtons != kMouseLeftUp) { + Common::Point p; + + _input->readInput(); + uint32 event = _input->getLastButtonEvent(); - readInput(); + while (event != kMouseLeftUp) { - _si = (_mousePos.x > 160) ? 1 : 0; + _input->readInput(); + _input->getCursorPos(p); + event = _input->getLastButtonEvent(); + + _si = (p.x > 160) ? 1 : 0; if (_si != _di) { if (_si != 0) { @@ -409,6 +421,8 @@ int Parallaction_ns::guiSelectCharacter() { Graphics::Surface block; block.create(BLOCK_WIDTH, BLOCK_HEIGHT, 1); + Common::Point p; + while (true) { points[0] = 0; @@ -422,8 +436,10 @@ int Parallaction_ns::guiSelectCharacter() { _di = 0; while (_di < PASSWORD_LEN) { - waitUntilLeftClick(); - int _si = guiGetSelectedBlock(_mousePos); + _input->waitUntilLeftClick(); + _input->getCursorPos(p); + + int _si = guiGetSelectedBlock(p); if (_si != -1) { _gfx->grabBackground(codeTrueBlocks[_si], block); diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp new file mode 100644 index 0000000000..dc26debba7 --- /dev/null +++ b/engines/parallaction/input.cpp @@ -0,0 +1,349 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/events.h" + +#include "parallaction/input.h" +#include "parallaction/parallaction.h" +#include "parallaction/debug.h" + +namespace Parallaction { + +// FIXME: the engine has 3 event loops. The following routine hosts the main one, +// and it's called from 8 different places in the code. There exist 2 more specialised +// loops which could possibly be merged into this one with some effort in changing +// caller code, i.e. adding condition checks. +// +uint16 Input::readInput() { + + Common::Event e; + uint16 KeyDown = 0; + + _mouseButtons = kMouseNone; + + Common::EventManager *eventMan = _vm->_system->getEventManager(); + while (eventMan->pollEvent(e)) { + + switch (e.type) { + case Common::EVENT_KEYDOWN: + if (e.kbd.flags == Common::KBD_CTRL && e.kbd.keycode == 'd') + _vm->_debugger->attach(); + if (_vm->getFeatures() & GF_DEMO) break; + if (e.kbd.keycode == Common::KEYCODE_l) KeyDown = kEvLoadGame; + if (e.kbd.keycode == Common::KEYCODE_s) KeyDown = kEvSaveGame; + break; + + case Common::EVENT_LBUTTONDOWN: + _mouseButtons = kMouseLeftDown; + _mousePos = e.mouse; + break; + + case Common::EVENT_LBUTTONUP: + _mouseButtons = kMouseLeftUp; + _mousePos = e.mouse; + break; + + case Common::EVENT_RBUTTONDOWN: + _mouseButtons = kMouseRightDown; + _mousePos = e.mouse; + break; + + case Common::EVENT_RBUTTONUP: + _mouseButtons = kMouseRightUp; + _mousePos = e.mouse; + break; + + case Common::EVENT_MOUSEMOVE: + _mousePos = e.mouse; + break; + + case Common::EVENT_QUIT: + // TODO: don't quit() here, just have caller routines to check + // on kEngineQuit and exit gracefully to allow the engine to shut down + _engineFlags |= kEngineQuit; + g_system->quit(); + break; + + default: + break; + + } + + } + + if (_vm->_debugger->isAttached()) + _vm->_debugger->onFrame(); + + return KeyDown; + +} + +// FIXME: see comment for readInput() +void Input::waitForButtonEvent(uint32 buttonEventMask) { + + if (buttonEventMask == kMouseNone) { + _mouseButtons = kMouseNone; // don't wait on nothing + return; + } + + do { + readInput(); + g_system->delayMillis(30); + } while ((_mouseButtons & buttonEventMask) == 0); + +} + +// FIXME: see comment for readInput() +void Input::waitUntilLeftClick() { + + do { + readInput(); + _vm->_gfx->updateScreen(); + g_system->delayMillis(30); + } while (_mouseButtons != kMouseLeftUp); + + return; +} + +void Parallaction::runGame() { + + InputData *data = _input->updateInput(); + if (data->_event != kEvNone) { + processInput(data); + } + + runPendingZones(); + + if (_engineFlags & kEngineChangeLocation) { + changeLocation(_location._name); + } + + + _gfx->beginFrame(); + + if (_input->_inputMode == Input::kInputModeGame) { + runScripts(); + walk(); + drawAnimations(); + } + + // change this to endFrame? + updateView(); + +} + +void Input::updateGameInput() { + + int16 keyDown = readInput(); + + debugC(3, kDebugInput, "translateInput: input flags (%i, %i, %i, %i)", + !_mouseHidden, + (_engineFlags & kEngineBlockInput) == 0, + (_engineFlags & kEngineWalking) == 0, + (_engineFlags & kEngineChangeLocation) == 0 + ); + + if ((_mouseHidden) || + (_engineFlags & kEngineBlockInput) || + (_engineFlags & kEngineWalking) || + (_engineFlags & kEngineChangeLocation)) { + + return; + } + + if (keyDown == kEvQuitGame) { + _inputData._event = kEvQuitGame; + } else + if (keyDown == kEvSaveGame) { + _inputData._event = kEvSaveGame; + } else + if (keyDown == kEvLoadGame) { + _inputData._event = kEvLoadGame; + } else { + _inputData._mousePos = _mousePos; + _inputData._event = kEvNone; + if (!translateGameInput()) { + translateInventoryInput(); + } + } + +} + +void Input::updateCommentInput() { + waitUntilLeftClick(); + + _vm->_gfx->hideDialogueStuff(); + _vm->_gfx->setHalfbriteMode(false); + + _inputMode = kInputModeGame; +} + +InputData* Input::updateInput() { + + _inputData._event = kEvNone; + + switch (_inputMode) { + case kInputModeComment: + updateCommentInput(); + break; + + case kInputModeGame: + updateGameInput(); + break; + } + + return &_inputData; +} + +bool Input::translateGameInput() { + + if ((_engineFlags & kEnginePauseJobs) || (_engineFlags & kEngineInventory)) { + return false; + } + + if (_actionAfterWalk) { + // if walking is over, then take programmed action + _inputData._event = kEvAction; + _actionAfterWalk = false; + return true; + } + + if (_mouseButtons == kMouseRightDown) { + // right button down shows inventory + + if (_vm->hitZone(kZoneYou, _mousePos.x, _mousePos.y) && (_activeItem._id != 0)) { + _activeItem._index = (_activeItem._id >> 16) & 0xFFFF; + _engineFlags |= kEngineDragging; + } + + _inputData._event = kEvOpenInventory; + _transCurrentHoverItem = -1; + return true; + } + + // test if mouse is hovering on an interactive zone for the currently selected inventory item + ZonePtr z = _vm->hitZone(_activeItem._id, _mousePos.x, _mousePos.y); + + if (((_mouseButtons == kMouseLeftUp) && (_activeItem._id == 0) && ((_engineFlags & kEngineWalking) == 0)) && ((!z) || ((z->_type & 0xFFFF) != kZoneCommand))) { + _inputData._event = kEvWalk; + return true; + } + + if ((z != _hoverZone) && (_hoverZone)) { + _hoverZone = nullZonePtr; + _inputData._event = kEvExitZone; + return true; + } + + if (!z) { + _inputData._event = kEvNone; + return true; + } + + if ((!_hoverZone) && ((z->_flags & kFlagsNoName) == 0)) { + _hoverZone = z; + _inputData._event = kEvEnterZone; + _inputData._label = z->_label; + return true; + } + + if ((_mouseButtons == kMouseLeftUp) && ((_activeItem._id != 0) || ((z->_type & 0xFFFF) == kZoneCommand))) { + + _inputData._zone = z; + if (z->_flags & kFlagsNoWalk) { + // character doesn't need to walk to take specified action + _inputData._event = kEvAction; + + } else { + // action delayed: if Zone defined a moveto position the character is programmed to move there, + // else it will move to the mouse position + _inputData._event = kEvWalk; + _actionAfterWalk = true; + if (z->_moveTo.y != 0) { + _inputData._mousePos = z->_moveTo; + } + } + + _vm->beep(); + _vm->setArrowCursor(); + return true; + } + + return true; + +} + +bool Input::translateInventoryInput() { + + if ((_engineFlags & kEngineInventory) == 0) { + return false; + } + + // in inventory + int16 _si = _vm->getHoverInventoryItem(_mousePos.x, _mousePos.y); + + if (_mouseButtons == kMouseRightUp) { + // right up hides inventory + + _inputData._event = kEvCloseInventory; + _inputData._inventoryIndex = _vm->getHoverInventoryItem(_mousePos.x, _mousePos.y); + _vm->highlightInventoryItem(-1); // disable + + if ((_engineFlags & kEngineDragging) == 0) { + return true; + } + + _engineFlags &= ~kEngineDragging; + ZonePtr z = _vm->hitZone(kZoneMerge, _activeItem._index, _vm->getInventoryItemIndex(_inputData._inventoryIndex)); + + if (z) { + _vm->dropItem(z->u.merge->_obj1); + _vm->dropItem(z->u.merge->_obj2); + _vm->addInventoryItem(z->u.merge->_obj3); + _vm->runCommands(z->_commands); + } + + return true; + } + + if (_si == _transCurrentHoverItem) { + _inputData._event = kEvNone; + return true; + } + + _transCurrentHoverItem = _si; + _inputData._event = kEvHoverInventory; + _inputData._inventoryIndex = _si; + return true; + +} + +void Input::showCursor(bool visible) { + _mouseHidden = !visible; + _vm->_system->showMouse(visible); +} + + +} // namespace Parallaction diff --git a/engines/parallaction/input.h b/engines/parallaction/input.h new file mode 100644 index 0000000000..411bb2d2cc --- /dev/null +++ b/engines/parallaction/input.h @@ -0,0 +1,114 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef PARALLACTION_INPUT_H +#define PARALLACTION_INPUT_H + +#include "parallaction/objects.h" +#include "parallaction/inventory.h" + +namespace Parallaction { + +enum { + kMouseNone = 0, + kMouseLeftUp = 1, + kMouseLeftDown = 2, + kMouseRightUp = 4, + kMouseRightDown = 8 +}; + +struct InputData { + uint16 _event; + Common::Point _mousePos; + int16 _inventoryIndex; + ZonePtr _zone; + Label* _label; +}; + +class Input { + void updateGameInput(); + void updateCommentInput(); + + // input-only + InputData _inputData; + bool _actionAfterWalk; // actived when the character needs to move before taking an action + // these two could/should be merged as they carry on the same duty in two member functions, + // respectively processInput and translateInput + int16 _transCurrentHoverItem; + + InputData *translateInput(); + bool translateGameInput(); + bool translateInventoryInput(); + + Parallaction *_vm; + + Common::Point _mousePos; + uint16 _mouseButtons; + + bool _mouseHidden; + +public: + enum { + kInputModeGame = 0, + kInputModeComment = 1 + }; + + + Input(Parallaction *vm) : _vm(vm) { + _transCurrentHoverItem = 0; + _actionAfterWalk = false; // actived when the character needs to move before taking an action + _mouseHidden = false; + _activeItem._index = 0; + _activeItem._id = 0; + _mouseButtons = 0; + } + + virtual ~Input() { } + + + void showCursor(bool visible); + void getCursorPos(Common::Point& p) { + p = _mousePos; + } + + int _inputMode; + ZonePtr _hoverZone; + InventoryItem _activeItem; + + uint16 readInput(); + InputData* updateInput(); + void waitUntilLeftClick(); + void waitForButtonEvent(uint32 buttonEventMask); + uint32 getLastButtonEvent() { return _mouseButtons; } + + void Input::stopHovering() { + _hoverZone = nullZonePtr; + } + +}; + +} // namespace Parallaction + +#endif diff --git a/engines/parallaction/inventory.cpp b/engines/parallaction/inventory.cpp index 05202809a9..58848196d7 100644 --- a/engines/parallaction/inventory.cpp +++ b/engines/parallaction/inventory.cpp @@ -23,7 +23,7 @@ * */ - +#include "parallaction/input.h" #include "parallaction/parallaction.h" @@ -52,8 +52,18 @@ int16 Parallaction::getHoverInventoryItem(int16 x, int16 y) { return _inventoryRenderer->hitTest(Common::Point(x,y)); } -void Parallaction::highlightInventoryItem(ItemPosition pos, byte color) { - _inventoryRenderer->highlightItem(pos, color); +void Parallaction::highlightInventoryItem(ItemPosition pos) { + static ItemPosition lastHighlightedPos = -1; + + if (lastHighlightedPos != -1) { + _inventoryRenderer->highlightItem(lastHighlightedPos, 12); + } + + if (pos != -1) { + _inventoryRenderer->highlightItem(pos, 19); + } + + lastHighlightedPos = pos; } int Parallaction::addInventoryItem(ItemName item) { @@ -125,8 +135,11 @@ void InventoryRenderer::showInventory() { uint16 lines = getNumLines(); - _pos.x = CLIP(_vm->_mousePos.x - (INVENTORY_WIDTH / 2), 0, (int)(_vm->_screenWidth - INVENTORY_WIDTH)); - _pos.y = CLIP(_vm->_mousePos.y - 2 - (lines * INVENTORYITEM_HEIGHT), 0, (int)(_vm->_screenHeight - lines * INVENTORYITEM_HEIGHT)); + Common::Point p; + _vm->_input->getCursorPos(p); + + _pos.x = CLIP(p.x - (INVENTORY_WIDTH / 2), 0, (int)(_vm->_screenWidth - INVENTORY_WIDTH)); + _pos.y = CLIP(p.y - 2 - (lines * INVENTORYITEM_HEIGHT), 0, (int)(_vm->_screenHeight - lines * INVENTORYITEM_HEIGHT)); refresh(); } diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index 3907098b0f..eb766661c3 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -31,6 +31,8 @@ #include "sound/mididrv.h" #include "sound/mixer.h" + +#include "parallaction/input.h" #include "parallaction/parallaction.h" #include "parallaction/debug.h" #include "parallaction/sound.h" @@ -44,9 +46,6 @@ Parallaction *_vm = NULL; // public stuff -uint16 _mouseButtons = 0; - - char _saveData1[30] = { '\0' }; uint16 _language = 0; uint32 _engineFlags = 0; @@ -67,8 +66,6 @@ Parallaction::Parallaction(OSystem *syst, const PARALLACTIONGameDescription *gam // FIXME _vm = this; - _mouseHidden = false; - Common::File::addDefaultDirectory( _gameDataPath ); Common::addSpecialDebugLevel(kDebugDialogue, "dialogue", "Dialogues debug level"); @@ -111,11 +108,6 @@ int Parallaction::init() { _objectsNames = NULL; _globalTable = NULL; _location._hasSound = false; - _transCurrentHoverItem = 0; - _actionAfterWalk = false; // actived when the character needs to move before taking an action - _activeItem._index = 0; - _activeItem._id = 0; - _procCurrentHoverItem = -1; _baseTime = 0; _numLocations = 0; _location._startPosition.x = -1000; @@ -134,6 +126,8 @@ int Parallaction::init() { initInventory(); // needs to be pushed into subclass + _input = new Input(this); + _gfx = new Gfx(this); _debugger = new Debugger(this); @@ -147,111 +141,6 @@ int Parallaction::init() { -// FIXME: the engine has 3 event loops. The following routine hosts the main one, -// and it's called from 8 different places in the code. There exist 2 more specialised -// loops which could possibly be merged into this one with some effort in changing -// caller code, i.e. adding condition checks. -// -uint16 Parallaction::readInput() { - - Common::Event e; - uint16 KeyDown = 0; - - _mouseButtons = kMouseNone; - - Common::EventManager *eventMan = _system->getEventManager(); - while (eventMan->pollEvent(e)) { - - switch (e.type) { - case Common::EVENT_KEYDOWN: - if (e.kbd.flags == Common::KBD_CTRL && e.kbd.keycode == 'd') - _debugger->attach(); - if (getFeatures() & GF_DEMO) break; - if (e.kbd.keycode == Common::KEYCODE_l) KeyDown = kEvLoadGame; - if (e.kbd.keycode == Common::KEYCODE_s) KeyDown = kEvSaveGame; - break; - - case Common::EVENT_LBUTTONDOWN: - _mouseButtons = kMouseLeftDown; - _mousePos = e.mouse; - break; - - case Common::EVENT_LBUTTONUP: - _mouseButtons = kMouseLeftUp; - _mousePos = e.mouse; - break; - - case Common::EVENT_RBUTTONDOWN: - _mouseButtons = kMouseRightDown; - _mousePos = e.mouse; - break; - - case Common::EVENT_RBUTTONUP: - _mouseButtons = kMouseRightUp; - _mousePos = e.mouse; - break; - - case Common::EVENT_MOUSEMOVE: - _mousePos = e.mouse; - break; - - case Common::EVENT_QUIT: - // TODO: don't quit() here, just have caller routines to check - // on kEngineQuit and exit gracefully to allow the engine to shut down - _engineFlags |= kEngineQuit; - g_system->quit(); - break; - - default: - break; - - } - - } - - if (_debugger->isAttached()) - _debugger->onFrame(); - - return KeyDown; - -} - -// FIXME: see comment for readInput() -void waitUntilLeftClick() { - - do { - _vm->readInput(); - _vm->_gfx->updateScreen(); - g_system->delayMillis(30); - } while (_mouseButtons != kMouseLeftUp); - - return; -} - -void Parallaction::runGame() { - - updateInput(); - - runPendingZones(); - - if (_engineFlags & kEngineChangeLocation) { - changeLocation(_location._name); - } - - - _gfx->beginFrame(); - - if (_inputMode == kInputModeGame) { - runScripts(); - walk(); - drawAnimations(); - } - - // change this to endFrame? - updateView(); - -} - void Parallaction::updateView() { if ((_engineFlags & kEnginePauseJobs) && (_engineFlags & kEngineInventory) == 0) { @@ -264,271 +153,6 @@ void Parallaction::updateView() { } -void Parallaction::processInput(InputData *data) { - - switch (data->_event) { - case kEvEnterZone: - debugC(2, kDebugInput, "processInput: kEvEnterZone"); - _gfx->setFloatingLabel(data->_label); - break; - - case kEvExitZone: - debugC(2, kDebugInput, "processInput: kEvExitZone"); - _gfx->setFloatingLabel(0); - break; - - case kEvAction: - debugC(2, kDebugInput, "processInput: kEvAction"); - _procCurrentHoverItem = -1; - _hoverZone = nullZonePtr; - pauseJobs(); - runZone(data->_zone); - resumeJobs(); - break; - - case kEvOpenInventory: - _procCurrentHoverItem = -1; - _hoverZone = nullZonePtr; - _gfx->setFloatingLabel(0); - if (hitZone(kZoneYou, _mousePos.x, _mousePos.y) == 0) { - setArrowCursor(); - } - pauseJobs(); - openInventory(); - break; - - case kEvCloseInventory: // closes inventory and possibly select item - closeInventory(); - setInventoryCursor(data->_inventoryIndex); - resumeJobs(); - break; - - case kEvHoverInventory: - highlightInventoryItem(_procCurrentHoverItem, 12); // disable - highlightInventoryItem(data->_inventoryIndex, 19); // enable - _procCurrentHoverItem = data->_inventoryIndex; - break; - - case kEvWalk: - debugC(2, kDebugInput, "processInput: kEvWalk"); - _hoverZone = nullZonePtr; - setArrowCursor(); - _char.scheduleWalk(data->_mousePos.x, data->_mousePos.y); - break; - - case kEvQuitGame: - _engineFlags |= kEngineQuit; - break; - - case kEvSaveGame: - _hoverZone = nullZonePtr; - saveGame(); - setArrowCursor(); - break; - - case kEvLoadGame: - _hoverZone = nullZonePtr; - loadGame(); - setArrowCursor(); - break; - - } - - return; -} - - - - - -void Parallaction::updateGameInput() { - - int16 keyDown = readInput(); - - debugC(3, kDebugInput, "translateInput: input flags (%i, %i, %i, %i)", - !_mouseHidden, - (_engineFlags & kEngineBlockInput) == 0, - (_engineFlags & kEngineWalking) == 0, - (_engineFlags & kEngineChangeLocation) == 0 - ); - - if ((_mouseHidden) || - (_engineFlags & kEngineBlockInput) || - (_engineFlags & kEngineWalking) || - (_engineFlags & kEngineChangeLocation)) { - - return; - } - - if (keyDown == kEvQuitGame) { - _input._event = kEvQuitGame; - } else - if (keyDown == kEvSaveGame) { - _input._event = kEvSaveGame; - } else - if (keyDown == kEvLoadGame) { - _input._event = kEvLoadGame; - } else { - _input._mousePos = _mousePos; - _input._event = kEvNone; - if (!translateGameInput()) { - translateInventoryInput(); - } - } - - if (_input._event != kEvNone) - processInput(&_input); - -} - -void Parallaction::updateCommentInput() { - waitUntilLeftClick(); - - _gfx->hideDialogueStuff(); - _gfx->setHalfbriteMode(false); - - _inputMode = kInputModeGame; -} - -void Parallaction::updateInput() { - - switch (_inputMode) { - case kInputModeComment: - updateCommentInput(); - break; - - case kInputModeGame: - updateGameInput(); - break; - } - - return; -} - -bool Parallaction::translateGameInput() { - - if ((_engineFlags & kEnginePauseJobs) || (_engineFlags & kEngineInventory)) { - return false; - } - - if (_actionAfterWalk) { - // if walking is over, then take programmed action - _input._event = kEvAction; - _actionAfterWalk = false; - return true; - } - - if (_mouseButtons == kMouseRightDown) { - // right button down shows inventory - - if (hitZone(kZoneYou, _mousePos.x, _mousePos.y) && (_activeItem._id != 0)) { - _activeItem._index = (_activeItem._id >> 16) & 0xFFFF; - _engineFlags |= kEngineDragging; - } - - _input._event = kEvOpenInventory; - _transCurrentHoverItem = -1; - return true; - } - - // test if mouse is hovering on an interactive zone for the currently selected inventory item - ZonePtr z = hitZone(_activeItem._id, _mousePos.x, _mousePos.y); - - if (((_mouseButtons == kMouseLeftUp) && (_activeItem._id == 0) && ((_engineFlags & kEngineWalking) == 0)) && ((!z) || ((z->_type & 0xFFFF) != kZoneCommand))) { - _input._event = kEvWalk; - return true; - } - - if ((z != _hoverZone) && (_hoverZone)) { - _hoverZone = nullZonePtr; - _input._event = kEvExitZone; - return true; - } - - if (!z) { - _input._event = kEvNone; - return true; - } - - if ((!_hoverZone) && ((z->_flags & kFlagsNoName) == 0)) { - _hoverZone = z; - _input._event = kEvEnterZone; - _input._label = z->_label; - return true; - } - - if ((_mouseButtons == kMouseLeftUp) && ((_activeItem._id != 0) || ((z->_type & 0xFFFF) == kZoneCommand))) { - - _input._zone = z; - if (z->_flags & kFlagsNoWalk) { - // character doesn't need to walk to take specified action - _input._event = kEvAction; - - } else { - // action delayed: if Zone defined a moveto position the character is programmed to move there, - // else it will move to the mouse position - _input._event = kEvWalk; - _actionAfterWalk = true; - if (z->_moveTo.y != 0) { - _input._mousePos = z->_moveTo; - } - } - - beep(); - setArrowCursor(); - return true; - } - - return true; - -} - -bool Parallaction::translateInventoryInput() { - - if ((_engineFlags & kEngineInventory) == 0) { - return false; - } - - // in inventory - int16 _si = getHoverInventoryItem(_mousePos.x, _mousePos.y); - - if (_mouseButtons == kMouseRightUp) { - // right up hides inventory - - _input._event = kEvCloseInventory; - _input._inventoryIndex = getHoverInventoryItem(_mousePos.x, _mousePos.y); - highlightInventoryItem(_transCurrentHoverItem, 12); // disable - - if ((_engineFlags & kEngineDragging) == 0) { - return true; - } - - _engineFlags &= ~kEngineDragging; - ZonePtr z = hitZone(kZoneMerge, _activeItem._index, getInventoryItemIndex(_input._inventoryIndex)); - - if (z) { - dropItem(z->u.merge->_obj1); - dropItem(z->u.merge->_obj2); - addInventoryItem(z->u.merge->_obj3); - runCommands(z->_commands); - } - - return true; - } - - if (_si == _transCurrentHoverItem) { - _input._event = kEvNone; - return true; - } - - _transCurrentHoverItem = _si; - _input._event = kEvHoverInventory; - _input._inventoryIndex = _si; - return true; - -} - - uint32 Parallaction::getElapsedTime() { return g_system->getMillis() - _baseTime; } @@ -553,13 +177,6 @@ void Parallaction::waitTime(uint32 t) { } -void Parallaction::showCursor(bool visible) { - _mouseHidden = !visible; - g_system->showMouse(visible); -} - - - void Parallaction::freeCharacter() { debugC(1, kDebugExec, "freeCharacter()"); @@ -684,6 +301,75 @@ void Parallaction::showLocationComment(const char *text, bool end) { } +void Parallaction::processInput(InputData *data) { + + switch (data->_event) { + case kEvEnterZone: + debugC(2, kDebugInput, "processInput: kEvEnterZone"); + _gfx->setFloatingLabel(data->_label); + break; + + case kEvExitZone: + debugC(2, kDebugInput, "processInput: kEvExitZone"); + _gfx->setFloatingLabel(0); + break; + + case kEvAction: + debugC(2, kDebugInput, "processInput: kEvAction"); + _input->stopHovering(); + pauseJobs(); + runZone(data->_zone); + resumeJobs(); + break; + + case kEvOpenInventory: + _input->stopHovering(); + _gfx->setFloatingLabel(0); + if (hitZone(kZoneYou, data->_mousePos.x, data->_mousePos.y) == 0) { + setArrowCursor(); + } + pauseJobs(); + openInventory(); + break; + + case kEvCloseInventory: // closes inventory and possibly select item + closeInventory(); + setInventoryCursor(data->_inventoryIndex); + resumeJobs(); + break; + + case kEvHoverInventory: + highlightInventoryItem(data->_inventoryIndex); // enable + break; + + case kEvWalk: + debugC(2, kDebugInput, "processInput: kEvWalk"); + _input->stopHovering(); + setArrowCursor(); + _char.scheduleWalk(data->_mousePos.x, data->_mousePos.y); + break; + + case kEvQuitGame: + _engineFlags |= kEngineQuit; + break; + + case kEvSaveGame: + _input->stopHovering(); + saveGame(); + setArrowCursor(); + break; + + case kEvLoadGame: + _input->stopHovering(); + loadGame(); + setArrowCursor(); + break; + + } + + return; +} + @@ -716,7 +402,7 @@ void Parallaction::doLocationEnterTransition() { _gfx->updateScreen(); showLocationComment(_location._comment, false); - waitUntilLeftClick(); + _input->waitUntilLeftClick(); _gfx->freeBalloons(); // fades maximum intensity palette towards approximation of main palette diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 367ee93f80..4a14201164 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -33,6 +33,7 @@ #include "engines/engine.h" +#include "parallaction/input.h" #include "parallaction/inventory.h" #include "parallaction/parser.h" #include "parallaction/objects.h" @@ -96,14 +97,6 @@ enum { kPriority21 = 21 }; -enum { - kMouseNone = 0, - kMouseLeftUp = 1, - kMouseLeftDown = 2, - kMouseRightUp = 3, - kMouseRightDown = 4 -}; - enum EngineFlags { kEngineQuit = (1 << 0), kEnginePauseJobs = (1 << 1), @@ -163,7 +156,6 @@ extern const char *_minidoughName; extern const char *_minidrkiName; -void waitUntilLeftClick(); @@ -171,7 +163,7 @@ void waitUntilLeftClick(); class Debugger; class Gfx; class SoundMan; - +class Input; struct Location { @@ -246,7 +238,6 @@ public: - #define DECLARE_UNQUALIFIED_COMMAND_OPCODE(op) void cmdOp_##op() #define DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(op) void instOp_##op() @@ -266,21 +257,10 @@ public: virtual bool loadGame() = 0; virtual bool saveGame() = 0; - uint16 readInput(); - void updateInput(); + Input *_input; void waitTime(uint32 t); - enum { - kInputModeGame = 0, - kInputModeComment = 1 - }; - - int _inputMode; - - void updateGameInput(); - void updateCommentInput(); - OpcodeSet _commandOpcodes; struct ParallactionStruct1 { @@ -298,8 +278,7 @@ public: bool suspend; } _instRunCtxt; - - void showCursor(bool visible); + void processInput(InputData* data); void pauseJobs(); void resumeJobs(); @@ -363,13 +342,6 @@ public: uint16 _numLocations; Location _location; - InventoryItem _activeItem; - - Common::Point _mousePos; - void getCursorPos(Common::Point& p) { - p = _mousePos; - } - ZonePtr _activeZone; @@ -380,38 +352,16 @@ public: Common::RandomSource _rnd; -protected: // data - Debugger *_debugger; - struct InputData { - uint16 _event; - Common::Point _mousePos; - int16 _inventoryIndex; - ZonePtr _zone; - Label* _label; - }; - - bool _mouseHidden; - - // input-only - InputData _input; - bool _actionAfterWalk; // actived when the character needs to move before taking an action - - // these two could/should be merged as they carry on the same duty in two member functions, - // respectively processInput and translateInput - int16 _procCurrentHoverItem; - int16 _transCurrentHoverItem; +protected: // data uint32 _baseTime; char _characterName1[50]; // only used in changeCharacter Common::String _saveFileName; - ZonePtr _hoverZone; - - protected: // members bool detectGame(void); @@ -421,12 +371,6 @@ protected: // members uint32 getElapsedTime(); void resetTimer(); - InputData *translateInput(); - bool translateGameInput(); - bool translateInventoryInput(); - void processInput(InputData*); - - void scheduleLocationSwitch(const char *location); void doLocationEnterTransition(); virtual void changeLocation(char *location) = 0; @@ -468,7 +412,7 @@ public: const char **_callableNamesRes; const char **_instructionNamesRes; - void highlightInventoryItem(ItemPosition pos, byte color); + void highlightInventoryItem(ItemPosition pos); int16 getHoverInventoryItem(int16 x, int16 y); int addInventoryItem(ItemName item); int addInventoryItem(ItemName item, uint32 value); diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 779a7f72b1..f07d201ae9 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -27,6 +27,7 @@ #include "common/util.h" #include "parallaction/parallaction.h" +#include "parallaction/input.h" #include "parallaction/sound.h" namespace Parallaction { @@ -108,7 +109,7 @@ int Parallaction_br::go() { // initCharacter(); - _inputMode = kInputModeGame; + _input->_inputMode = Input::kInputModeGame; while ((_engineFlags & (kEngineReturn | kEngineQuit)) == 0) { runGame(); } diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 197f99d723..81141454b6 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -28,6 +28,7 @@ #include "common/config-manager.h" #include "parallaction/parallaction.h" +#include "parallaction/input.h" #include "parallaction/sound.h" @@ -191,7 +192,7 @@ void Parallaction_ns::setArrowCursor() { // this stuff is needed to avoid artifacts with labels and selected items when switching cursors _gfx->setFloatingLabel(0); - _activeItem._id = 0; + _input->_activeItem._id = 0; _system->setMouseCursor(_mouseArrow, MOUSEARROW_WIDTH, MOUSEARROW_HEIGHT, 0, 0, 0); _system->showMouse(true); @@ -207,7 +208,7 @@ void Parallaction_ns::setInventoryCursor(int pos) { if (item->_index == 0) return; - _activeItem._id = item->_id; + _input->_activeItem._id = item->_id; byte *v8 = _mouseComposedArrow->getData(0); @@ -243,7 +244,7 @@ int Parallaction_ns::go() { changeLocation(_location._name); - _inputMode = kInputModeGame; + _input->_inputMode = Input::kInputModeGame; while ((_engineFlags & kEngineQuit) == 0) { runGame(); } @@ -298,7 +299,7 @@ void Parallaction_ns::changeLocation(char *location) { _gfx->setFloatingLabel(0); _gfx->freeLabels(); - _hoverZone = nullZonePtr; + _input->_hoverZone = nullZonePtr; if (_engineFlags & kEngineBlockInput) { setArrowCursor(); } @@ -314,7 +315,7 @@ void Parallaction_ns::changeLocation(char *location) { showSlide(locname.slide()); uint id = _gfx->createLabel(_menuFont, _location._slideText[0], 1); _gfx->showLabel(id, CENTER_LABEL_HORIZONTAL, 14); - waitUntilLeftClick(); + _input->waitUntilLeftClick(); _gfx->freeLabels(); freeBackground(); } -- cgit v1.2.3 From e2d58f4885352744c88892e93fe2cdd33ecfa1b0 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Wed, 14 May 2008 14:34:42 +0000 Subject: Oops. Forgot to update module.mk. svn-id: r32116 --- engines/parallaction/module.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/parallaction/module.mk b/engines/parallaction/module.mk index c7e7af14bf..2478b4b2e1 100644 --- a/engines/parallaction/module.mk +++ b/engines/parallaction/module.mk @@ -15,6 +15,7 @@ MODULE_OBJS := \ graphics.o \ gui_br.o \ gui_ns.o \ + input.o \ inventory.o \ objects.o \ parallaction.o \ -- cgit v1.2.3 From eb6c809d2b3ccf238fa5efbf45b6cd2b00a82cd9 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Wed, 14 May 2008 14:56:29 +0000 Subject: - Added more information (ID and capabilities) to the MIDI drivers - Added the MidiPlugin interface to the remaining MIDI drivers - Added an initial MidiManager to handle the MIDI plugins (just static plugins by now) svn-id: r32117 --- backends/midi/alsa.cpp | 14 +++++++++++ backends/midi/camd.cpp | 14 +++++++++++ backends/midi/coreaudio.cpp | 14 +++++++++++ backends/midi/coremidi.cpp | 14 +++++++++++ backends/midi/dmedia.cpp | 14 +++++++++++ backends/midi/quicktime.cpp | 14 +++++++++++ backends/midi/seq.cpp | 14 +++++++++++ backends/midi/timidity.cpp | 14 +++++++++++ backends/midi/windows.cpp | 14 +++++++++++ backends/midi/ypa1.cpp | 14 +++++++++++ backends/midi/zodiac.cpp | 14 +++++++++++ base/plugins.cpp | 56 ++++++++++++++++++++++++++++++++++++++++++ base/plugins.h | 2 ++ sound/mididrv.cpp | 2 +- sound/mididrv.h | 2 +- sound/midiplugin.h | 31 +++++++++++++++++++++++ sound/null.cpp | 44 ++++++++++++++++++++++++++++++--- sound/softsynth/adlib.cpp | 46 +++++++++++++++++++++++++++++++--- sound/softsynth/fluidsynth.cpp | 46 +++++++++++++++++++++++++++++++--- sound/softsynth/mt32.cpp | 45 ++++++++++++++++++++++++++++----- sound/softsynth/ym2612.cpp | 43 +++++++++++++++++++++++++++----- 21 files changed, 446 insertions(+), 25 deletions(-) diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp index fc43925643..6b0e424d68 100644 --- a/backends/midi/alsa.cpp +++ b/backends/midi/alsa.cpp @@ -247,6 +247,14 @@ public: return "ALSA"; } + virtual const char *getId() const { + return "alsa"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + virtual Common::StringList getDevices() const; virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; @@ -309,4 +317,10 @@ MidiDriver *MidiDriver_ALSA_create(Audio::Mixer *mixer) { return mididriver; } +//#if PLUGIN_ENABLED_DYNAMIC(ALSA) + //REGISTER_PLUGIN_DYNAMIC(ALSA, PLUGIN_TYPE_MIDI, AlsaMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(ALSA, PLUGIN_TYPE_MIDI, AlsaMidiPlugin); +//#endif + #endif diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp index 2b5ea0e065..6aa79eb260 100644 --- a/backends/midi/camd.cpp +++ b/backends/midi/camd.cpp @@ -172,6 +172,14 @@ public: return "CAMD"; } + virtual const char *getId() const { + return "camd"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + //virtual Common::StringList getDevices() const; virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; @@ -192,4 +200,10 @@ MidiDriver *MidiDriver_CAMD_create(Audio::Mixer *mixer) { return mididriver; } +//#if PLUGIN_ENABLED_DYNAMIC(CAMD) + //REGISTER_PLUGIN_DYNAMIC(CAMD, PLUGIN_TYPE_MIDI, CamdMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(CAMD, PLUGIN_TYPE_MIDI, CamdMidiPlugin); +//#endif + #endif diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp index 0e8409b3d8..8e00c24a1f 100644 --- a/backends/midi/coreaudio.cpp +++ b/backends/midi/coreaudio.cpp @@ -202,6 +202,14 @@ public: return "CoreAudio"; } + virtual const char *getId() const { + return "core"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; @@ -220,4 +228,10 @@ MidiDriver *MidiDriver_CORE_create(Audio::Mixer *mixer) { return mididriver; } +//#if PLUGIN_ENABLED_DYNAMIC(COREAUDIO) + //REGISTER_PLUGIN_DYNAMIC(COREAUDIO, PLUGIN_TYPE_MIDI, CoreAudioMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(COREAUDIO, PLUGIN_TYPE_MIDI, CoreAudioMidiPlugin); +//#endif + #endif // MACOSX diff --git a/backends/midi/coremidi.cpp b/backends/midi/coremidi.cpp index b16e2a91af..efbdaad4e4 100644 --- a/backends/midi/coremidi.cpp +++ b/backends/midi/coremidi.cpp @@ -185,6 +185,14 @@ public: return "CoreMIDI"; } + virtual const char *getId() const { + return "coremidi"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; @@ -203,4 +211,10 @@ MidiDriver *MidiDriver_CoreMIDI_create(Audio::Mixer *mixer) { return mididriver; } +//#if PLUGIN_ENABLED_DYNAMIC(COREMIDI) + //REGISTER_PLUGIN_DYNAMIC(COREMIDI, PLUGIN_TYPE_MIDI, CoreMIDIMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(COREMIDI, PLUGIN_TYPE_MIDI, CoreMIDIMidiPlugin); +//#endif + #endif // MACOSX diff --git a/backends/midi/dmedia.cpp b/backends/midi/dmedia.cpp index 0891af4ecb..885081e3e0 100644 --- a/backends/midi/dmedia.cpp +++ b/backends/midi/dmedia.cpp @@ -184,6 +184,14 @@ public: return "DMedia"; } + virtual const char *getId() const { + return "dmedia"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; @@ -202,4 +210,10 @@ MidiDriver *MidiDriver_DMEDIA_create(Audio::Mixer *mixer) { return mididriver; } +//#if PLUGIN_ENABLED_DYNAMIC(DMEDIA) + //REGISTER_PLUGIN_DYNAMIC(DMEDIA, PLUGIN_TYPE_MIDI, DMediaMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(DMEDIA, PLUGIN_TYPE_MIDI, DMediaMidiPlugin); +//#endif + #endif diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp index 592d86c76b..950dfa632c 100644 --- a/backends/midi/quicktime.cpp +++ b/backends/midi/quicktime.cpp @@ -259,6 +259,14 @@ public: return "QuickTime"; } + virtual const char *getId() const { + return "qt"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; @@ -277,4 +285,10 @@ MidiDriver *MidiDriver_QT_create(Audio::Mixer *mixer) { return mididriver; } +//#if PLUGIN_ENABLED_DYNAMIC(QT) + //REGISTER_PLUGIN_DYNAMIC(QT, PLUGIN_TYPE_MIDI, QuickTimeMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(QT, PLUGIN_TYPE_MIDI, QuickTimeMidiPlugin); +//#endif + #endif // MACOSX || macintosh diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp index 23baf60ea4..07dfc25142 100644 --- a/backends/midi/seq.cpp +++ b/backends/midi/seq.cpp @@ -179,6 +179,14 @@ public: return "SEQ"; } + virtual const char *getId() const { + return "seq"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; @@ -197,4 +205,10 @@ MidiDriver *MidiDriver_SEQ_create(Audio::Mixer *mixer) { return mididriver; } +//#if PLUGIN_ENABLED_DYNAMIC(SEQ) + //REGISTER_PLUGIN_DYNAMIC(SEQ, PLUGIN_TYPE_MIDI, SeqMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(SEQ, PLUGIN_TYPE_MIDI, SeqMidiPlugin); +//#endif + #endif diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp index f146900a12..842fb358bf 100644 --- a/backends/midi/timidity.cpp +++ b/backends/midi/timidity.cpp @@ -520,6 +520,14 @@ public: return "TiMidity"; } + virtual const char *getId() const { + return "timidity"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; @@ -538,4 +546,10 @@ MidiDriver *MidiDriver_TIMIDITY_create(Audio::Mixer *mixer) { return mididriver; } +//#if PLUGIN_ENABLED_DYNAMIC(TIMIDITY) + //REGISTER_PLUGIN_DYNAMIC(TIMIDITY, PLUGIN_TYPE_MIDI, TimidityMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(TIMIDITY, PLUGIN_TYPE_MIDI, TimidityMidiPlugin); +//#endif + #endif // defined (UNIX) diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp index 8c1d3bd9ed..083f0eaf96 100644 --- a/backends/midi/windows.cpp +++ b/backends/midi/windows.cpp @@ -153,6 +153,14 @@ public: return "Windows MIDI"; } + virtual const char *getId() const { + return "windows"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; @@ -171,4 +179,10 @@ MidiDriver *MidiDriver_WIN_create(Audio::Mixer *mixer) { return mididriver; } +//#if PLUGIN_ENABLED_DYNAMIC(WINDOWS) + //REGISTER_PLUGIN_DYNAMIC(WINDOWS, PLUGIN_TYPE_MIDI, WindowsMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(WINDOWS, PLUGIN_TYPE_MIDI, WindowsMidiPlugin); +//#endif + #endif diff --git a/backends/midi/ypa1.cpp b/backends/midi/ypa1.cpp index 416215424e..37d90d45b0 100644 --- a/backends/midi/ypa1.cpp +++ b/backends/midi/ypa1.cpp @@ -112,6 +112,14 @@ public: return "Yamaha Pa1"; } + virtual const char *getId() const { + return "ypa1"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; @@ -129,3 +137,9 @@ MidiDriver *MidiDriver_YamahaPa1_create(Audio::Mixer *mixer) { return mididriver; } + +//#if PLUGIN_ENABLED_DYNAMIC(YPA1) + //REGISTER_PLUGIN_DYNAMIC(YPA1, PLUGIN_TYPE_MIDI, YamahaPa1MidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(YPA1, PLUGIN_TYPE_MIDI, YamahaPa1MidiPlugin); +//#endif diff --git a/backends/midi/zodiac.cpp b/backends/midi/zodiac.cpp index 0cc848f1d5..f27c042de8 100644 --- a/backends/midi/zodiac.cpp +++ b/backends/midi/zodiac.cpp @@ -130,6 +130,14 @@ public: return "Tapwave Zodiac"; } + virtual const char *getId() const { + return "zodiac"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; @@ -148,4 +156,10 @@ MidiDriver *MidiDriver_Zodiac_create(Audio::Mixer *mixer) { return mididriver; } +//#if PLUGIN_ENABLED_DYNAMIC(ZODIAC) + //REGISTER_PLUGIN_DYNAMIC(ZODIAC, PLUGIN_TYPE_MIDI, ZodiacMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(ZODIAC, PLUGIN_TYPE_MIDI, ZodiacMidiPlugin); +//#endif + #endif diff --git a/base/plugins.cpp b/base/plugins.cpp index c39b877eb8..7dae94e006 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -33,6 +33,7 @@ int pluginTypeVersions[PLUGIN_TYPE_MAX] = { PLUGIN_TYPE_ENGINE_VERSION, + PLUGIN_TYPE_MIDI_VERSION, }; @@ -82,6 +83,7 @@ public: // "Loader" for the static plugins. // Iterate over all registered (static) plugins and load them. + // Engine plugins #if PLUGIN_ENABLED_STATIC(SCUMM) LINK_PLUGIN(SCUMM) #endif @@ -140,6 +142,49 @@ public: LINK_PLUGIN(TOUCHE) #endif + // MIDI plugins + // TODO: Use defines to disable or enable each MIDI driver as a + // static/dynamic plugin, like it's done for the engines + LINK_PLUGIN(NULL) + #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) + LINK_PLUGIN(WINDOWS) + #endif + #if defined(UNIX) && defined(USE_ALSA) + LINK_PLUGIN(ALSA) + #endif + #if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__) + LINK_PLUGIN(SEQ) + #endif + #if defined(IRIX) + LINK_PLUGIN(DMEDIA) + #endif + #if defined(__amigaos4__) + LINK_PLUGIN(CAMD) + #endif + #if defined(MACOSX) + LINK_PLUGIN(COREAUDIO) + LINK_PLUGIN(COREMIDI) + LINK_PLUGIN(QUICKTIME) + #endif + #if defined(PALMOS_MODE) + # if defined(COMPILE_CLIE) + LINK_PLUGIN(YPA1) + # elif defined(COMPILE_ZODIAC) && (!defined(ENABLE_SCUMM) || !defined(PALMOS_ARM)) + LINK_PLUGIN(ZODIAC) + # endif + #endif + #ifdef USE_FLUIDSYNTH + LINK_PLUGIN(FLUIDSYNTH) + #endif + #ifdef USE_MT32EMU + LINK_PLUGIN(MT32) + #endif + LINK_PLUGIN(ADLIB) + LINK_PLUGIN(TOWNS) + #if defined (UNIX) + LINK_PLUGIN(TIMIDITY) + #endif + return pl; } }; @@ -336,3 +381,14 @@ GameList EngineManager::detectGames(const FSList &fslist) const { const EnginePlugin::list &EngineManager::getPlugins() const { return (const EnginePlugin::list&)PluginManager::instance().getPlugins(PLUGIN_TYPE_ENGINE); } + + +// MIDI plugins + +#include "sound/midiplugin.h" + +DECLARE_SINGLETON(MidiManager); + +const MidiPlugin::list &MidiManager::getPlugins() const { + return (const MidiPlugin::list&)PluginManager::instance().getPlugins(PLUGIN_TYPE_MIDI); +} diff --git a/base/plugins.h b/base/plugins.h index 92b317498f..b64334074c 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -63,6 +63,7 @@ enum PluginType { PLUGIN_TYPE_ENGINE = 0, + PLUGIN_TYPE_MIDI, PLUGIN_TYPE_MAX }; @@ -70,6 +71,7 @@ enum PluginType { // TODO: Make the engine API version depend on ScummVM's version // because of the backlinking #define PLUGIN_TYPE_ENGINE_VERSION 1 +#define PLUGIN_TYPE_MIDI_VERSION 1 extern int pluginTypeVersions[PLUGIN_TYPE_MAX]; diff --git a/sound/mididrv.cpp b/sound/mididrv.cpp index 52cf5d0e65..358d42d751 100644 --- a/sound/mididrv.cpp +++ b/sound/mididrv.cpp @@ -216,7 +216,7 @@ int MidiDriver::detectMusicDriver(int flags) { MidiDriver *MidiDriver::createMidi(int midiDriver) { switch (midiDriver) { - case MD_NULL: return MidiDriver_NULL_create(); + case MD_NULL: return MidiDriver_NULL_create(g_system->getMixer()); case MD_ADLIB: return MidiDriver_ADLIB_create(g_system->getMixer()); diff --git a/sound/mididrv.h b/sound/mididrv.h index 77b10518bc..12513268a8 100644 --- a/sound/mididrv.h +++ b/sound/mididrv.h @@ -268,7 +268,7 @@ public: // Factory functions, for faster compile -extern MidiDriver *MidiDriver_NULL_create(); +extern MidiDriver *MidiDriver_NULL_create(Audio::Mixer *mixer); extern MidiDriver *MidiDriver_ADLIB_create(Audio::Mixer *mixer); extern MidiDriver *MidiDriver_WIN_create(Audio::Mixer *mixer); extern MidiDriver *MidiDriver_SEQ_create(Audio::Mixer *mixer); diff --git a/sound/midiplugin.h b/sound/midiplugin.h index f36aa2c822..c3b407a142 100644 --- a/sound/midiplugin.h +++ b/sound/midiplugin.h @@ -36,6 +36,18 @@ class MidiPluginObject : public PluginObject { public: virtual ~MidiPluginObject() {} + /** + * Returns a unique string identifier which will be used to save the + * selected MIDI driver to the config file. + */ + virtual const char *getId() const = 0; + + /** + * Returns the type kind of music supported by this driver, as specified + * by the MidiDriverFlags enum. + */ + virtual int getCapabilities() const = 0; + /** * Returns a list of the available devices. The empty string means the * default device. @@ -59,4 +71,23 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const = 0; }; + +// MIDI plugins + +typedef PluginSubclass MidiPlugin; + +/** + * Singleton class which manages all MIDI plugins. + */ +class MidiManager : public Common::Singleton { +private: + friend class Common::Singleton; + +public: + const MidiPlugin::list &getPlugins() const; +}; + +/** Convenience shortcut for accessing the MIDI manager. */ +#define MidiMan MidiManager::instance() + #endif diff --git a/sound/null.cpp b/sound/null.cpp index 49c57052f9..9bb3a76344 100644 --- a/sound/null.cpp +++ b/sound/null.cpp @@ -22,6 +22,7 @@ * $Id$ */ +#include "sound/midiplugin.h" #include "sound/mpu401.h" /* NULL driver */ @@ -31,12 +32,49 @@ public: void send(uint32 b) { } }; -MidiDriver *MidiDriver_NULL_create() { - return new MidiDriver_NULL(); + +// Plugin interface + +class NullMidiPlugin : public MidiPluginObject { +public: + virtual const char *getName() const { + return "No music"; + } + + virtual const char *getId() const { + return "null"; + } + + virtual int getCapabilities() const { + return MDT_MIDI | MDT_PCSPK | MDT_ADLIB | MDT_TOWNS; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError NullMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_NULL(); + + return kNoError; +} + +MidiDriver *MidiDriver_NULL_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + NullMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } #ifdef DISABLE_ADLIB MidiDriver *MidiDriver_ADLIB_create(Audio::Mixer *mixer) { - return new MidiDriver_NULL(); + return MidiDriver_NULL_create(mixer); } #endif + +//#if PLUGIN_ENABLED_DYNAMIC(NULL) + //REGISTER_PLUGIN_DYNAMIC(NULL, PLUGIN_TYPE_MIDI, NullMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(NULL, PLUGIN_TYPE_MIDI, NullMidiPlugin); +//#endif diff --git a/sound/softsynth/adlib.cpp b/sound/softsynth/adlib.cpp index 1cf4c2b179..3936843f52 100644 --- a/sound/softsynth/adlib.cpp +++ b/sound/softsynth/adlib.cpp @@ -25,6 +25,7 @@ #include "sound/softsynth/emumidi.h" #include "common/util.h" #include "sound/fmopl.h" +#include "sound/midiplugin.h" #ifdef DEBUG_ADLIB static int tick; @@ -970,10 +971,6 @@ MidiChannel *MidiDriver_ADLIB::allocateChannel() { return NULL; } -MidiDriver *MidiDriver_ADLIB_create(Audio::Mixer *mixer) { - return new MidiDriver_ADLIB(mixer); -} - // All the code brought over from IMuseAdlib void MidiDriver_ADLIB::adlib_write(byte port, byte value) { @@ -1517,3 +1514,44 @@ void MidiDriver_ADLIB::adlib_note_on(int chan, byte note, int mod) { curnote_table[chan] = code; adlib_playnote(chan, (int16) channel_table_2[chan] + code); } + + +// Plugin interface + +class AdlibMidiPlugin : public MidiPluginObject { +public: + virtual const char *getName() const { + return "AdLib Emulator"; + } + + virtual const char *getId() const { + return "adlib"; + } + + virtual int getCapabilities() const { + return MDT_ADLIB; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError AdlibMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_ADLIB(mixer); + + return kNoError; +} + +MidiDriver *MidiDriver_ADLIB_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + AdlibMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; +} + +//#if PLUGIN_ENABLED_DYNAMIC(ADLIB) + //REGISTER_PLUGIN_DYNAMIC(ADLIB, PLUGIN_TYPE_MIDI, AdlibMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(ADLIB, PLUGIN_TYPE_MIDI, AdlibMidiPlugin); +//#endif diff --git a/sound/softsynth/fluidsynth.cpp b/sound/softsynth/fluidsynth.cpp index 4a61cd023b..ae89a8df8a 100644 --- a/sound/softsynth/fluidsynth.cpp +++ b/sound/softsynth/fluidsynth.cpp @@ -27,6 +27,7 @@ #ifdef USE_FLUIDSYNTH #include "common/config-manager.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #include "sound/softsynth/emumidi.h" @@ -211,12 +212,49 @@ MidiChannel *MidiDriver_FluidSynth::getPercussionChannel() { return &_midiChannels[9]; } -MidiDriver *MidiDriver_FluidSynth_create(Audio::Mixer *mixer) { - return new MidiDriver_FluidSynth(mixer); -} - void MidiDriver_FluidSynth::generateSamples(int16 *data, int len) { fluid_synth_write_s16(_synth, len, data, 0, 2, data, 1, 2); } + +// Plugin interface + +class FluidSynthMidiPlugin : public MidiPluginObject { +public: + virtual const char *getName() const { + return "FluidSynth"; + } + + virtual const char *getId() const { + return "fluidsynth"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError FluidSynthMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_FluidSynth(mixer); + + return kNoError; +} + +MidiDriver *MidiDriver_FluidSynth_create(Audio::Mixer *mixer) { + MidiDriver *mididriver; + + FluidSynthMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; +} + +//#if PLUGIN_ENABLED_DYNAMIC(FLUIDSYNTH) + //REGISTER_PLUGIN_DYNAMIC(FLUIDSYNTH, PLUGIN_TYPE_MIDI, FluidSynthMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(FLUIDSYNTH, PLUGIN_TYPE_MIDI, FluidSynthMidiPlugin); +//#endif + #endif diff --git a/sound/softsynth/mt32.cpp b/sound/softsynth/mt32.cpp index 706db826af..2c9c4f24be 100644 --- a/sound/softsynth/mt32.cpp +++ b/sound/softsynth/mt32.cpp @@ -29,6 +29,7 @@ #include "sound/softsynth/mt32/mt32emu.h" #include "sound/softsynth/emumidi.h" +#include "sound/midiplugin.h" #include "sound/mpu401.h" #include "common/config-manager.h" @@ -479,17 +480,49 @@ void MidiDriver_ThreadedMT32::onTimer() { } #endif -//////////////////////////////////////// -// -// MidiDriver_MT32 factory -// -//////////////////////////////////////// + +// Plugin interface + +class MT32MidiPlugin : public MidiPluginObject { +public: + virtual const char *getName() const { + return "MT-32 Emulator"; + } + + virtual const char *getId() const { + return "mt32"; + } + + virtual int getCapabilities() const { + return MDT_MIDI; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError MT32MidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_MT32(mixer); + + return kNoError; +} MidiDriver *MidiDriver_MT32_create(Audio::Mixer *mixer) { // HACK: It will stay here until engine plugin loader overhaul if (ConfMan.hasKey("extrapath")) Common::File::addDefaultDirectory(ConfMan.get("extrapath")); - return new MidiDriver_MT32(mixer); + + MidiDriver *mididriver; + + MT32MidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } +//#if PLUGIN_ENABLED_DYNAMIC(MT32) + //REGISTER_PLUGIN_DYNAMIC(MT32, PLUGIN_TYPE_MIDI, MT32MidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(MT32, PLUGIN_TYPE_MIDI, MT32MidiPlugin); +//#endif + #endif diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp index 1e985aeb1c..3fcc2c3fc4 100644 --- a/sound/softsynth/ym2612.cpp +++ b/sound/softsynth/ym2612.cpp @@ -26,6 +26,7 @@ #include "sound/softsynth/ym2612.h" #include "common/util.h" +#include "sound/midiplugin.h" //////////////////////////////////////// // @@ -751,13 +752,43 @@ void MidiDriver_YM2612::removeLookupTables() { sintbl = powtbl = frequencyTable = keycodeTable = keyscaleTable = attackOut = 0; } -//////////////////////////////////////// -// -// MidiDriver_YM2612 factory -// -//////////////////////////////////////// + +// Plugin interface + +class TownsMidiPlugin : public MidiPluginObject { +public: + virtual const char *getName() const { + return "FM Towns Emulator"; + } + + virtual const char *getId() const { + return "towns"; + } + + virtual int getCapabilities() const { + return MDT_TOWNS; + } + + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; +}; + +PluginError TownsMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { + *mididriver = new MidiDriver_YM2612(mixer); + + return kNoError; +} MidiDriver *MidiDriver_YM2612_create(Audio::Mixer *mixer) { - return new MidiDriver_YM2612(mixer); + MidiDriver *mididriver; + + TownsMidiPlugin p; + p.createInstance(mixer, &mididriver); + + return mididriver; } +//#if PLUGIN_ENABLED_DYNAMIC(TOWNS) + //REGISTER_PLUGIN_DYNAMIC(TOWNS, PLUGIN_TYPE_MIDI, TownsMidiPlugin); +//#else + REGISTER_PLUGIN_STATIC(TOWNS, PLUGIN_TYPE_MIDI, TownsMidiPlugin); +//#endif -- cgit v1.2.3 From 78b599bc26496bcd8279bd6bc46cc2abcaf462d8 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 14 May 2008 15:27:28 +0000 Subject: Fix compilation svn-id: r32118 --- engines/parallaction/input.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/parallaction/input.h b/engines/parallaction/input.h index 411bb2d2cc..3d072384a2 100644 --- a/engines/parallaction/input.h +++ b/engines/parallaction/input.h @@ -103,7 +103,7 @@ public: void waitForButtonEvent(uint32 buttonEventMask); uint32 getLastButtonEvent() { return _mouseButtons; } - void Input::stopHovering() { + void stopHovering() { _hoverZone = nullZonePtr; } -- cgit v1.2.3 From f80dfa14a4938484f2b4e9604254d49718f6203c Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Wed, 14 May 2008 16:12:26 +0000 Subject: Update MSVC project files. svn-id: r32119 --- dists/msvc7/parallaction.vcproj | 6 ++++++ dists/msvc7/scummvm.vcproj | 6 +++--- dists/msvc71/parallaction.vcproj | 6 ++++++ dists/msvc71/scummvm.vcproj | 6 +++--- dists/msvc8/parallaction.vcproj | 8 ++++++++ dists/msvc8/scummvm.vcproj | 8 ++++---- dists/msvc9/parallaction.vcproj | 8 ++++++++ dists/msvc9/scummvm.vcproj | 8 ++++---- 8 files changed, 42 insertions(+), 14 deletions(-) diff --git a/dists/msvc7/parallaction.vcproj b/dists/msvc7/parallaction.vcproj index 0d802e5667..79ac169995 100644 --- a/dists/msvc7/parallaction.vcproj +++ b/dists/msvc7/parallaction.vcproj @@ -147,6 +147,12 @@ + + + + diff --git a/dists/msvc7/scummvm.vcproj b/dists/msvc7/scummvm.vcproj index d6fd1765d9..55358a2cc6 100644 --- a/dists/msvc7/scummvm.vcproj +++ b/dists/msvc7/scummvm.vcproj @@ -385,6 +385,9 @@ + + @@ -678,9 +681,6 @@ - - diff --git a/dists/msvc71/parallaction.vcproj b/dists/msvc71/parallaction.vcproj index 0d5369d54e..440e7123e8 100644 --- a/dists/msvc71/parallaction.vcproj +++ b/dists/msvc71/parallaction.vcproj @@ -161,6 +161,12 @@ + + + + diff --git a/dists/msvc71/scummvm.vcproj b/dists/msvc71/scummvm.vcproj index dcd7b4658f..5e1100b788 100644 --- a/dists/msvc71/scummvm.vcproj +++ b/dists/msvc71/scummvm.vcproj @@ -399,6 +399,9 @@ + + @@ -692,9 +695,6 @@ - - diff --git a/dists/msvc8/parallaction.vcproj b/dists/msvc8/parallaction.vcproj index 0e2b0a761a..21a6d3bab3 100644 --- a/dists/msvc8/parallaction.vcproj +++ b/dists/msvc8/parallaction.vcproj @@ -228,6 +228,14 @@ RelativePath="..\..\engines\parallaction\gui_ns.cpp" > + + + + diff --git a/dists/msvc8/scummvm.vcproj b/dists/msvc8/scummvm.vcproj index 5bdc9b0909..db5c10efd3 100644 --- a/dists/msvc8/scummvm.vcproj +++ b/dists/msvc8/scummvm.vcproj @@ -550,6 +550,10 @@ RelativePath="..\..\sound\midiparser_xmidi.cpp" > + + @@ -938,10 +942,6 @@ - - diff --git a/dists/msvc9/parallaction.vcproj b/dists/msvc9/parallaction.vcproj index 5eebf23e7e..bdc93860f9 100644 --- a/dists/msvc9/parallaction.vcproj +++ b/dists/msvc9/parallaction.vcproj @@ -229,6 +229,14 @@ RelativePath="..\..\engines\parallaction\gui_ns.cpp" > + + + + diff --git a/dists/msvc9/scummvm.vcproj b/dists/msvc9/scummvm.vcproj index d3e767c7b0..0de6bdc616 100644 --- a/dists/msvc9/scummvm.vcproj +++ b/dists/msvc9/scummvm.vcproj @@ -555,6 +555,10 @@ RelativePath="..\..\sound\midiparser_xmidi.cpp" > + + @@ -943,10 +947,6 @@ - - -- cgit v1.2.3 From c834bbba0698a8d7671c1bfc16ce8b3d65eab85a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 14 May 2008 16:59:34 +0000 Subject: Changed kyra3 detection entries, now there are special entries for non installed version checking for WESTWOOD.001 and special entries for installed version checking for AUD.PAK. svn-id: r32120 --- engines/kyra/detection.cpp | 68 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 3 deletions(-) diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index 6a11ca9a34..3c4c87e12b 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -401,11 +401,65 @@ const KYRAGameDescription adGameDescs[] = { KYRA2_TOWNS_SJIS_FLAGS }, + // Kyra3 + + // non installed version + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "WESTWOOD.001", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::EN_ANY, + Common::kPlatformPC, + Common::ADGF_DROPLANGUAGE + }, + KYRA3_CD_FLAGS + }, { { "kyra3", 0, - AD_ENTRY1("ONETIME.PAK", "3833ff312757b8e6147f464cca0a6587"), + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "WESTWOOD.001", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::DE_DEU, + Common::kPlatformPC, + Common::ADGF_DROPLANGUAGE + }, + KYRA3_CD_FLAGS + }, + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "WESTWOOD.001", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, + Common::FR_FRA, + Common::kPlatformPC, + Common::ADGF_DROPLANGUAGE + }, + KYRA3_CD_FLAGS + }, + + // installed version + { + { + "kyra3", + 0, + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, Common::EN_ANY, Common::kPlatformPC, Common::ADGF_DROPLANGUAGE @@ -416,7 +470,11 @@ const KYRAGameDescription adGameDescs[] = { { "kyra3", 0, - AD_ENTRY1("ONETIME.PAK", "3833ff312757b8e6147f464cca0a6587"), + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, Common::DE_DEU, Common::kPlatformPC, Common::ADGF_DROPLANGUAGE @@ -427,7 +485,11 @@ const KYRAGameDescription adGameDescs[] = { { "kyra3", 0, - AD_ENTRY1("ONETIME.PAK", "3833ff312757b8e6147f464cca0a6587"), + { + { "ONETIME.PAK", 0, "3833ff312757b8e6147f464cca0a6587", -1 }, + { "AUD.PAK", 0, 0, -1 }, + { 0, 0, 0, 0 } + }, Common::FR_FRA, Common::kPlatformPC, Common::ADGF_DROPLANGUAGE -- cgit v1.2.3 From b35941c3c2da0b1c184390ee601689cedebdb32c Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Wed, 14 May 2008 17:26:05 +0000 Subject: Added plugin priority so there's just one plugin that provides a module functionality. svn-id: r32121 --- base/plugins.cpp | 30 ++++++++++++++++++++---------- base/plugins.h | 7 +++---- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/base/plugins.cpp b/base/plugins.cpp index 7dae94e006..ac8e498469 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -317,16 +317,26 @@ bool PluginManager::tryLoadPlugin(Plugin *plugin) { assert(plugin); // Try to load the plugin if (plugin->loadPlugin()) { - // If successful, add it to the list of known plugins and return. - _plugins[plugin->getType()].push_back(plugin); - - // TODO/FIXME: We should perform some additional checks here: - // * Check for some kind of "API version" (possibly derived from the - // SVN tree revision?) - // * If two plugins provide the same engine, we should only load one. - // To detect this situation, we could just compare the plugin name. - // To handle it, simply prefer modules loaded earlier to those coming. - // Or vice versa... to be determined... :-) + // The plugin is valid, see if it provides the same module as an + // already loaded one and should replace it. + bool found = false; + + PluginList::iterator pl = _plugins[plugin->getType()].begin(); + while (!found && pl != _plugins[plugin->getType()].end()) { + if (!strcmp(plugin->getName(), (*pl)->getName())) { + // Found a duplicated module. Replace the old one. + found = true; + delete *pl; + *pl = plugin; + debug(1, "Replaced the duplicated plugin: '%s'", plugin->getName()); + } + pl++; + } + + if (!found) { + // If it provides a new module, just add it to the list of known plugins. + _plugins[plugin->getType()].push_back(plugin); + } return true; } else { diff --git a/base/plugins.h b/base/plugins.h index b64334074c..d03a240922 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -27,9 +27,8 @@ #define BASE_PLUGINS_H #include "common/error.h" -#include "common/list.h" #include "common/singleton.h" -#include "base/game.h" +#include "common/util.h" #ifdef DYNAMIC_MODULES #include "common/fs.h" @@ -69,7 +68,7 @@ enum PluginType { }; // TODO: Make the engine API version depend on ScummVM's version -// because of the backlinking +// because of the backlinking (posibly from the SVN revision) #define PLUGIN_TYPE_ENGINE_VERSION 1 #define PLUGIN_TYPE_MIDI_VERSION 1 @@ -274,7 +273,7 @@ protected: * managing all Plugin class instances, and unloading them. */ class PluginManager : public Common::Singleton { - typedef Common::List ProviderList; + typedef Common::Array ProviderList; private: PluginList _plugins[PLUGIN_TYPE_MAX]; ProviderList _providers; -- cgit v1.2.3 From e8763e2ac23f1b19bb277961d226e8aced39f7e1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 14 May 2008 19:42:02 +0000 Subject: Fixed menu background loading in Riddle of Master Lu svn-id: r32122 --- engines/m4/m4.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- cgit v1.2.3 From e279d9693a1541f4595e73a5b646869890634922 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 14 May 2008 20:12:58 +0000 Subject: Some comments to opcodes sfGetMusicBeat and sfSetTextRect svn-id: r32123 --- engines/made/scriptfuncs.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index 61d2382bde..2819f127ef 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -360,7 +360,9 @@ int16 ScriptFunctions::sfShowMouseCursor(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfGetMusicBeat(int16 argc, int16 *argv) { - warning("Unimplemented opcode: sfGetMusicBeat"); + // This is called loads of times in the intro of the floppy version + // of RtZ. Not sure what it does. Commented out to reduce spam + //warning("Unimplemented opcode: sfGetMusicBeat"); return 0; } @@ -485,6 +487,7 @@ int16 ScriptFunctions::sfHomeText(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfSetTextRect(int16 argc, int16 *argv) { + // Used in the save/load screens of RtZ, and perhaps other places as well int16 x1 = CLIP(argv[4], 1, 318); int16 y1 = CLIP(argv[3], 1, 198); int16 x2 = CLIP(argv[2], 1, 318); -- cgit v1.2.3 From d35600db724f717619da0ecadeaad5a20ca4f009 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 14 May 2008 20:24:22 +0000 Subject: Added Return to Zork German CD version 1.2 Updated comment about *.red and *.dat svn-id: r32124 --- engines/made/detection.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp index 7f12a85611..a68f46cfad 100644 --- a/engines/made/detection.cpp +++ b/engines/made/detection.cpp @@ -74,6 +74,10 @@ namespace Made { static const MadeGameDescription gameDescriptions[] = { { + // NOTE: Return to Zork entries with *.dat are used to detect the game via rtzcd.dat, + // which is packed inside rtzcd.red. Entries with *.red refer to the packed file + // directly, which is the "official" way. + // Return to Zork - English CD version 1.0 9/15/93 // Patch #1953654 submitted by spookypeanut { @@ -109,8 +113,6 @@ static const MadeGameDescription gameDescriptions[] = { { // Return to Zork - English CD version 1.1 12/7/93 - // NOTE: This detects the game via the rtzcd.dat which is inside rtzcd.red. - // The entry below detects via rtzcd.red directly, which is the "official" way. { "rtz", "CD", @@ -157,6 +159,23 @@ static const MadeGameDescription gameDescriptions[] = { 0, }, + { + // Return to Zork - German CD version 1.2 4/18/95 + // (same as the English 1.2 version) + // Supplied by Dark-Star in the ScummVM forums + { + "rtz", + "CD", + AD_ENTRY1("rtzcd.red", "946997d8b0aa6cb4e848bad02a1fc3d2"), + Common::DE_DEU, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + GID_RTZ, + 0, + GF_CD_COMPRESSED, + 0, + }, { // Return to Zork - English floppy version -- cgit v1.2.3 From f1b099cb0c8f594e5875a47c3a1357c1d2355814 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 14 May 2008 21:10:41 +0000 Subject: Added entries for the unpacked (*.dat) English and German CD versions of RtZ 1.2 svn-id: r32126 --- engines/made/detection.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp index a68f46cfad..d25a0685d7 100644 --- a/engines/made/detection.cpp +++ b/engines/made/detection.cpp @@ -143,6 +143,23 @@ static const MadeGameDescription gameDescriptions[] = { 0, }, + { + // Return to Zork - English CD version 1.2 9/29/94 + // Supplied by Dark-Star in the ScummVM forums + { + "rtz", + "CD", + AD_ENTRY1("rtzcd.dat", "9d740378da2d16e83d0d0efff01bf83a"), + Common::EN_ANY, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + GID_RTZ, + 0, + GF_CD, + 0, + }, + { // Return to Zork - English CD version 1.2 9/29/94 { @@ -159,6 +176,24 @@ static const MadeGameDescription gameDescriptions[] = { 0, }, + { + // Return to Zork - German CD version 1.2 9/29/94 + // (same as the English 1.2 version) + // Supplied by Dark-Star in the ScummVM forums + { + "rtz", + "CD", + AD_ENTRY1("rtzcd.dat", "9d740378da2d16e83d0d0efff01bf83a"), + Common::DE_DEU, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + GID_RTZ, + 0, + GF_CD, + 0, + }, + { // Return to Zork - German CD version 1.2 4/18/95 // (same as the English 1.2 version) -- cgit v1.2.3 From ebe1009335f369185ed4d836d4fc9d525824009f Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 14 May 2008 21:28:55 +0000 Subject: Fixed QuickTime MIDI plugin svn-id: r32127 --- backends/midi/quicktime.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp index 950dfa632c..b9b5ba93c4 100644 --- a/backends/midi/quicktime.cpp +++ b/backends/midi/quicktime.cpp @@ -285,10 +285,10 @@ MidiDriver *MidiDriver_QT_create(Audio::Mixer *mixer) { return mididriver; } -//#if PLUGIN_ENABLED_DYNAMIC(QT) - //REGISTER_PLUGIN_DYNAMIC(QT, PLUGIN_TYPE_MIDI, QuickTimeMidiPlugin); +//#if PLUGIN_ENABLED_DYNAMIC(QUICKTIME) + //REGISTER_PLUGIN_DYNAMIC(QUICKTIME, PLUGIN_TYPE_MIDI, QuickTimeMidiPlugin); //#else - REGISTER_PLUGIN_STATIC(QT, PLUGIN_TYPE_MIDI, QuickTimeMidiPlugin); + REGISTER_PLUGIN_STATIC(QUICKTIME, PLUGIN_TYPE_MIDI, QuickTimeMidiPlugin); //#endif #endif // MACOSX || macintosh -- cgit v1.2.3 From f481821eeb6c757a1300d62c8a762e86e5a2213b Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Wed, 14 May 2008 21:52:52 +0000 Subject: fix regression in KyraEngine_LoK::setMouseItem svn-id: r32128 --- engines/kyra/items_lok.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/items_lok.cpp b/engines/kyra/items_lok.cpp index e86be25707..5d9a4d5ae5 100644 --- a/engines/kyra/items_lok.cpp +++ b/engines/kyra/items_lok.cpp @@ -193,7 +193,7 @@ void KyraEngine_LoK::removeHandItem() { void KyraEngine_LoK::setMouseItem(int item) { debugC(9, kDebugLevelMain, "KyraEngine_LoK::setMouseItem(%d)", item); - if (item == -1) + if (item == 0xFFFF) _screen->setMouseCursor(1, 1, _shapes[6]); else _screen->setMouseCursor(8, 15, _shapes[216+item]); -- cgit v1.2.3 From aac4786bbe6be0618266eb4f24ed2171523b268e Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 14 May 2008 23:58:26 +0000 Subject: This should fix the video not closing / chunk slot clogging bug (Yeah, I'm apparently stupid *g*) svn-id: r32131 --- engines/gob/videoplayer.cpp | 35 +++++++++++++++++++++++++---------- engines/gob/videoplayer.h | 2 ++ 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index c435136b75..f421646ee2 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -348,15 +348,30 @@ int VideoPlayer::slotOpen(const char *videoFile, Type which) { video->getVideo()->setVideoMemory(); video->getVideo()->enableSound(*_vm->_mixer); - _videoSlots.push_back(video); + int slot = getNextFreeSlot(); + + _videoSlots[slot] = video; WRITE_VAR(7, video->getVideo()->getFramesCount()); - return _videoSlots.size() - 1; + return slot; +} + +int VideoPlayer::getNextFreeSlot() { + uint slot; + + for (slot = 0; slot < _videoSlots.size(); slot++) + if (!_videoSlots[slot]) + break; + + if (slot == _videoSlots.size()) + _videoSlots.push_back(0); + + return slot; } void VideoPlayer::slotPlay(int slot, int16 frame) { - if ((slot < 0) || (((uint) slot) >= _videoSlots.size())) + if ((slot < 0) || (((uint) slot) >= _videoSlots.size()) || !_videoSlots[slot]) return; CoktelVideo &video = *(_videoSlots[slot]->getVideo()); @@ -377,18 +392,18 @@ void VideoPlayer::slotPlay(int slot, int16 frame) { } void VideoPlayer::slotClose(int slot) { - if ((slot < 0) || (((uint) slot) >= _videoSlots.size())) + if ((slot < 0) || (((uint) slot) >= _videoSlots.size()) || !_videoSlots[slot]) return; delete _videoSlots[slot]; - _videoSlots.remove_at(slot); + _videoSlots[slot] = 0; } void VideoPlayer::slotCopyFrame(int slot, byte *dest, uint16 left, uint16 top, uint16 width, uint16 height, uint16 x, uint16 y, uint16 pitch, int16 transp) { - if ((slot < 0) || (((uint) slot) >= _videoSlots.size())) + if ((slot < 0) || (((uint) slot) >= _videoSlots.size()) || !_videoSlots[slot]) return; _videoSlots[slot]->getVideo()->copyCurrentFrame(dest, @@ -396,14 +411,14 @@ void VideoPlayer::slotCopyFrame(int slot, byte *dest, } void VideoPlayer::slotCopyPalette(int slot, int16 palStart, int16 palEnd) { - if ((slot < 0) || (((uint) slot) >= _videoSlots.size())) + if ((slot < 0) || (((uint) slot) >= _videoSlots.size()) || !_videoSlots[slot]) return; copyPalette(*(_videoSlots[slot]->getVideo()), palStart, palEnd); } void VideoPlayer::slotWaitEndFrame(int slot, bool onlySound) { - if ((slot < 0) || (((uint) slot) >= _videoSlots.size())) + if ((slot < 0) || (((uint) slot) >= _videoSlots.size()) || !_videoSlots[slot]) return; CoktelVideo &video = *(_videoSlots[slot]->getVideo()); @@ -413,7 +428,7 @@ void VideoPlayer::slotWaitEndFrame(int slot, bool onlySound) { } bool VideoPlayer::slotIsOpen(int slot) const { - if ((slot >= 0) && (((uint) slot) < _videoSlots.size())) + if ((slot >= 0) && (((uint) slot) < _videoSlots.size()) && _videoSlots[slot]) return true; return false; @@ -423,7 +438,7 @@ const VideoPlayer::Video *VideoPlayer::getVideoBySlot(int slot) const { if (slot < 0) { if (_primaryVideo->isOpen()) return _primaryVideo; - } else if (((uint) slot) < _videoSlots.size()) + } else if (((uint) slot) < _videoSlots.size() && _videoSlots[slot]) return _videoSlots[slot]; return 0; diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index 29531f7ce2..278045b9e5 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -128,6 +128,8 @@ private: const Video *getVideoBySlot(int slot = -1) const; + int getNextFreeSlot(); + void copyPalette(CoktelVideo &video, int16 palStart = -1, int16 palEnd = -1); bool doPlay(int16 frame, int16 breakKey, uint16 palCmd, int16 palStart, int16 palEnd, -- cgit v1.2.3 From e4c11fa635b11e221bd93c666ec34ea96c3ae423 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Thu, 15 May 2008 00:39:19 +0000 Subject: Add patch #1964159 - PUTTPUTT: Add Japanese 3DO Version. svn-id: r32133 --- engines/scumm/scumm-md5.h | 3 ++- tools/scumm-md5.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index f0bc179c61..4c956a237b 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Mon May 12 04:29:20 2008 + This file was generated by the md5table tool on Wed May 14 19:23:43 2008 DO NOT EDIT MANUALLY! */ @@ -428,6 +428,7 @@ static const MD5Table md5table[] = { { "bbadf7309c4a2c2763e4bbba3c3be634", "freddi3", "", "Demo", -1, Common::FR_FRA, Common::kPlatformUnknown }, { "bc4700bc0e12879f6d25d14d6be6cfdd", "spyfox2", "", "", -1, Common::DE_DEU, Common::kPlatformUnknown }, { "bd126753de619a495f9f22adc951c8d5", "monkey2", "", "", -1, Common::IT_ITA, Common::kPlatformPC }, + { "be2abe172f58db170de3a037daa1dd27", "puttputt", "HE 61", "", -1, Common::JA_JPN, Common::kPlatform3DO }, { "be39a5d4db60e8aa736b9086778cb45c", "spyozon", "", "", -1, Common::EN_GRB, Common::kPlatformWindows }, { "be83e882b44f2767bc08d4f766ebc347", "maniac", "V2", "V2", -1, Common::DE_DEU, Common::kPlatformAtariST }, { "bf8b52fdd9a69c67f34e8e9fec72661c", "farm", "HE 71", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows }, diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt index b4d7b8b680..95e6cd3f3f 100644 --- a/tools/scumm-md5.txt +++ b/tools/scumm-md5.txt @@ -679,6 +679,7 @@ puttcircus Putt-Putt Joins the Circus puttputt Putt-Putt Joins the Parade 0b3222aaa7efcf283eb621e0cefd26cc -1 ru DOS HE 60 - - sev 7e151c17adf624f1966c8fc5827c95e9 -1 en 3DO HE 61 - - khalek + be2abe172f58db170de3a037daa1dd27 -1 jp 3DO HE 61 - - clone2727 9708cf716ed8bcc9ff3fcfc69413b746 -1 en DOS HE 61 - - khalek e361a7058ed8e8ebb462663c0a3ae8d6 -1 hb DOS HE 61 - - sev 684732efb5799c0f78804c99d8de9aba -1 en Mac HE 61 - - khalek -- cgit v1.2.3 From 765f976008d2021cc53ce714cbec3e2160d5ef74 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Thu, 15 May 2008 01:18:26 +0000 Subject: * Cleanup of input code. * Removed old timer routines. svn-id: r32135 --- engines/parallaction/callables_ns.cpp | 10 +----- engines/parallaction/gui_ns.cpp | 6 +--- engines/parallaction/input.cpp | 49 ++++++++++-------------------- engines/parallaction/input.h | 4 +-- engines/parallaction/parallaction.cpp | 52 +++++++++++++++++--------------- engines/parallaction/parallaction.h | 4 --- engines/parallaction/parallaction_ns.cpp | 2 +- 7 files changed, 49 insertions(+), 78 deletions(-) diff --git a/engines/parallaction/callables_ns.cpp b/engines/parallaction/callables_ns.cpp index 402f69c99d..68e6a70ffb 100644 --- a/engines/parallaction/callables_ns.cpp +++ b/engines/parallaction/callables_ns.cpp @@ -468,7 +468,6 @@ void Parallaction_ns::_c_endIntro(void *parm) { debugC(1, kDebugExec, "endIntro()"); - uint32 event; uint id[2]; for (uint16 _si = 0; _si < 6; _si++) { id[0] = _gfx->createLabel(_menuFont, _credits[_si]._role, 1); @@ -479,14 +478,7 @@ void Parallaction_ns::_c_endIntro(void *parm) { _gfx->updateScreen(); - for (uint16 v2 = 0; v2 < 100; v2++) { - _input->readInput(); - event = _input->getLastButtonEvent(); - if (event == kMouseLeftUp) - break; - - waitTime( 1 ); - } + _input->waitForButtonEvent(kMouseLeftUp, 5500); _gfx->freeLabels(); } diff --git a/engines/parallaction/gui_ns.cpp b/engines/parallaction/gui_ns.cpp index 91cc77e823..1d4d44fa46 100644 --- a/engines/parallaction/gui_ns.cpp +++ b/engines/parallaction/gui_ns.cpp @@ -213,11 +213,7 @@ int Parallaction_ns::guiNewGame() { _input->waitForButtonEvent(kMouseLeftUp | kMouseRightUp); uint32 event = _input->getLastButtonEvent(); -/* - do { - _input->readInput(); - } while (_mouseButtons != kMouseLeftUp && _mouseButtons != kMouseRightUp); -*/ + _input->showCursor(true); _gfx->freeLabels(); diff --git a/engines/parallaction/input.cpp b/engines/parallaction/input.cpp index dc26debba7..28d0ad888d 100644 --- a/engines/parallaction/input.cpp +++ b/engines/parallaction/input.cpp @@ -83,7 +83,7 @@ uint16 Input::readInput() { // TODO: don't quit() here, just have caller routines to check // on kEngineQuit and exit gracefully to allow the engine to shut down _engineFlags |= kEngineQuit; - g_system->quit(); + _vm->_system->quit(); break; default: @@ -101,17 +101,26 @@ uint16 Input::readInput() { } // FIXME: see comment for readInput() -void Input::waitForButtonEvent(uint32 buttonEventMask) { +void Input::waitForButtonEvent(uint32 buttonEventMask, int32 timeout) { if (buttonEventMask == kMouseNone) { _mouseButtons = kMouseNone; // don't wait on nothing return; } - do { - readInput(); - g_system->delayMillis(30); - } while ((_mouseButtons & buttonEventMask) == 0); + const int32 LOOP_RESOLUTION = 30; + if (timeout <= 0) { + do { + readInput(); + _vm->_system->delayMillis(LOOP_RESOLUTION); + } while ((_mouseButtons & buttonEventMask) == 0); + } else { + do { + readInput(); + _vm->_system->delayMillis(LOOP_RESOLUTION); + timeout -= LOOP_RESOLUTION; + } while ((timeout > 0) && (_mouseButtons & buttonEventMask) == 0); + } } @@ -121,38 +130,12 @@ void Input::waitUntilLeftClick() { do { readInput(); _vm->_gfx->updateScreen(); - g_system->delayMillis(30); + _vm->_system->delayMillis(30); } while (_mouseButtons != kMouseLeftUp); return; } -void Parallaction::runGame() { - - InputData *data = _input->updateInput(); - if (data->_event != kEvNone) { - processInput(data); - } - - runPendingZones(); - - if (_engineFlags & kEngineChangeLocation) { - changeLocation(_location._name); - } - - - _gfx->beginFrame(); - - if (_input->_inputMode == Input::kInputModeGame) { - runScripts(); - walk(); - drawAnimations(); - } - - // change this to endFrame? - updateView(); - -} void Input::updateGameInput() { diff --git a/engines/parallaction/input.h b/engines/parallaction/input.h index 3d072384a2..46dbb08c4e 100644 --- a/engines/parallaction/input.h +++ b/engines/parallaction/input.h @@ -68,6 +68,7 @@ class Input { uint16 _mouseButtons; bool _mouseHidden; + ZonePtr _hoverZone; public: enum { @@ -94,13 +95,12 @@ public: } int _inputMode; - ZonePtr _hoverZone; InventoryItem _activeItem; uint16 readInput(); InputData* updateInput(); void waitUntilLeftClick(); - void waitForButtonEvent(uint32 buttonEventMask); + void waitForButtonEvent(uint32 buttonEventMask, int32 timeout = -1); uint32 getLastButtonEvent() { return _mouseButtons; } void stopHovering() { diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index eb766661c3..d66b1af1f1 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -153,29 +153,6 @@ void Parallaction::updateView() { } -uint32 Parallaction::getElapsedTime() { - return g_system->getMillis() - _baseTime; -} - -void Parallaction::resetTimer() { - _baseTime = g_system->getMillis(); - return; -} - - -void Parallaction::waitTime(uint32 t) { - - uint32 v4 = 0; - - while (v4 < t * (1000 / 18.2)) { - v4 = getElapsedTime(); - } - - resetTimer(); - - return; -} - void Parallaction::freeCharacter() { debugC(1, kDebugExec, "freeCharacter()"); @@ -370,6 +347,33 @@ void Parallaction::processInput(InputData *data) { return; } +void Parallaction::runGame() { + + InputData *data = _input->updateInput(); + if (data->_event != kEvNone) { + processInput(data); + } + + runPendingZones(); + + if (_engineFlags & kEngineChangeLocation) { + changeLocation(_location._name); + } + + + _gfx->beginFrame(); + + if (_input->_inputMode == Input::kInputModeGame) { + runScripts(); + walk(); + drawAnimations(); + } + + // change this to endFrame? + updateView(); + +} + @@ -409,8 +413,8 @@ void Parallaction::doLocationEnterTransition() { for (uint16 _si = 0; _si<6; _si++) { pal.fadeTo(_gfx->_palette, 4); _gfx->setPalette(pal); - waitTime( 1 ); _gfx->updateScreen(); + g_system->delayMillis(20); } _gfx->setPalette(_gfx->_palette); diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 4a14201164..f639185580 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -259,8 +259,6 @@ public: Input *_input; - void waitTime(uint32 t); - OpcodeSet _commandOpcodes; struct ParallactionStruct1 { @@ -368,8 +366,6 @@ protected: // members void initGlobals(); void runGame(); void updateView(); - uint32 getElapsedTime(); - void resetTimer(); void scheduleLocationSwitch(const char *location); void doLocationEnterTransition(); diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 81141454b6..8e0f83d46d 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -299,7 +299,7 @@ void Parallaction_ns::changeLocation(char *location) { _gfx->setFloatingLabel(0); _gfx->freeLabels(); - _input->_hoverZone = nullZonePtr; + _input->stopHovering(); if (_engineFlags & kEngineBlockInput) { setArrowCursor(); } -- cgit v1.2.3 From b619c6ce1904dd814781ca601e04a36d40a3cedd Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Thu, 15 May 2008 08:50:47 +0000 Subject: NDS: Protection against FastRam (ITCM) allocation failure svn-id: r32136 --- backends/platform/ds/arm9/source/dsmain.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index d11e4e6f75..55ec5004c4 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -2364,9 +2364,13 @@ u8 fastRamData[FAST_RAM_SIZE] ITCM_DATA; void* fastRamAlloc(int size) { // return malloc(size); - void* result = (void *) fastRamPointer; + void* result = fastRamPointer; fastRamPointer += size; - return (void *) (result); + if(fastRamPointer > fastRamData + FAST_RAM_SIZE) { + consolePrintf("FastRam (ITCM) allocation failed!\n"); + return NULL; + } + return result; } void fastRamReset() { -- cgit v1.2.3 From 732d440d19a34f3f46c07487f5d724459375e640 Mon Sep 17 00:00:00 2001 From: Bertrand Augereau Date: Thu, 15 May 2008 10:34:43 +0000 Subject: NDS: Rollback of the custom build target rule from .cpp.o to %.o: %.cpp svn-id: r32137 --- backends/platform/ds/arm9/makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index ea98402d4e..787e15a03b 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -330,7 +330,8 @@ endef ifndef HAVE_GCC3 # If you use GCC, disable the above and enable this for intelligent # dependency tracking. -.cpp.o: +#.cpp.o: +%.o: %.cpp $(MKDIR) $(*D)/$(DEPDIR) $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o @@ -342,7 +343,8 @@ else # rule can get you into a bad state if you Ctrl-C at the wrong moment. # Also, with this GCC inserts additional dummy rules for the involved headers, # which ensures a smooth compilation even if said headers become obsolete. -.cpp.o: +#.cpp.o: +%.o: %.cpp # echo !!!!!!!!!!!! $(notdir $<) # ifeq ( $(notdir $<), $(findstring $(notdir $<), $(OPTLIST)) ) # OPTFLAG=-O3 -- cgit v1.2.3 From 6206fb2a188b28db426cb85653e8c6bf00d1f1d3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 15 May 2008 11:36:56 +0000 Subject: Removed the default OSystem::getTimeAndDate() implementation svn-id: r32138 --- common/system.cpp | 10 ---------- common/system.h | 8 ++++++-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/common/system.cpp b/common/system.cpp index 8c9ca46da6..9334185d05 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -35,8 +35,6 @@ #include "gui/message.h" #include "sound/mixer.h" -#include - OSystem *g_system = 0; OSystem::OSystem() { @@ -124,14 +122,6 @@ void OSystem::clearScreen() { unlockScreen(); } -void OSystem::getTimeAndDate(struct tm &t) const { -#ifndef __PLAYSTATION2__ - // PS2SDK doesn't provide localtime, so this code doesn't compile - time_t curTime = time(0); - t = *localtime(&curTime); -#endif -} - /* * Include header files needed for the getFilesystemFactory() method. * diff --git a/common/system.h b/common/system.h index 7989cabfbd..d2844401b0 100644 --- a/common/system.h +++ b/common/system.h @@ -727,8 +727,12 @@ public: /** Delay/sleep for the specified amount of milliseconds. */ virtual void delayMillis(uint msecs) = 0; - /** Get the current time and date. Correspond to time()+localtime(). */ - virtual void getTimeAndDate(struct tm &t) const; + /** + * Get the current time and date, in the local timezone. + * Corresponds on many systems to the combination of time() + * and localtime(). + */ + virtual void getTimeAndDate(struct tm &t) const = 0; /** * Return the timer manager singleton. For more information, refer -- cgit v1.2.3 From defc030143487550057cac1fb617d31ce9ab1ab2 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 15 May 2008 11:40:38 +0000 Subject: Removed the GP32 port svn-id: r32139 --- backends/fs/gp32/gp32-fs-factory.cpp | 42 - backends/fs/gp32/gp32-fs-factory.h | 51 - backends/fs/gp32/gp32-fs.cpp | 256 -- backends/module.mk | 1 - backends/platform/gp32/Makefile | 187 - backends/platform/gp32/README.GP32 | 1 - backends/platform/gp32/debug-gdbstub-usb.cpp | 1927 ---------- backends/platform/gp32/fontdata.c | 284 -- backends/platform/gp32/gfx_splash.h | 4870 -------------------------- backends/platform/gp32/globals.h | 44 - backends/platform/gp32/gp32_launcher.cpp | 190 - backends/platform/gp32/gp32_launcher.h | 35 - backends/platform/gp32/gp32_main.cpp | 93 - backends/platform/gp32/gp32_osys.cpp | 792 ----- backends/platform/gp32/gp32_osys.h | 155 - backends/platform/gp32/gp32std.cpp | 336 -- backends/platform/gp32/gp32std.h | 61 - backends/platform/gp32/gp32std_file.cpp | 320 -- backends/platform/gp32/gp32std_file.h | 61 - backends/platform/gp32/gp32std_grap.cpp | 148 - backends/platform/gp32/gp32std_grap.h | 47 - backends/platform/gp32/gp32std_input.cpp | 210 -- backends/platform/gp32/gp32std_input.h | 53 - backends/platform/gp32/gp32std_memory.cpp | 318 -- backends/platform/gp32/gp32std_memory.h | 35 - backends/platform/gp32/gp32std_sound.cpp | 187 - backends/platform/gp32/gp32std_sound.h | 48 - backends/platform/gp32/gp_asmlib.s | 426 --- backends/platform/gp32/gp_clipped.c | 101 - backends/platform/gp32/gpmad/readme.txt | 1 - backends/platform/gp32/gptremor/readme.txt | 1 - backends/platform/gp32/memcpy.S | 498 --- backends/platform/gp32/minilzo/readme.txt | 1 - backends/platform/gp32/portdefs.h | 117 - backends/platform/gp32/scummvm.bmp | Bin 2104 -> 0 bytes backends/platform/gp32/startup.c | 122 - 36 files changed, 12019 deletions(-) delete mode 100644 backends/fs/gp32/gp32-fs-factory.cpp delete mode 100644 backends/fs/gp32/gp32-fs-factory.h delete mode 100644 backends/fs/gp32/gp32-fs.cpp delete mode 100644 backends/platform/gp32/Makefile delete mode 100644 backends/platform/gp32/README.GP32 delete mode 100644 backends/platform/gp32/debug-gdbstub-usb.cpp delete mode 100644 backends/platform/gp32/fontdata.c delete mode 100644 backends/platform/gp32/gfx_splash.h delete mode 100644 backends/platform/gp32/globals.h delete mode 100644 backends/platform/gp32/gp32_launcher.cpp delete mode 100644 backends/platform/gp32/gp32_launcher.h delete mode 100644 backends/platform/gp32/gp32_main.cpp delete mode 100644 backends/platform/gp32/gp32_osys.cpp delete mode 100644 backends/platform/gp32/gp32_osys.h delete mode 100644 backends/platform/gp32/gp32std.cpp delete mode 100644 backends/platform/gp32/gp32std.h delete mode 100644 backends/platform/gp32/gp32std_file.cpp delete mode 100644 backends/platform/gp32/gp32std_file.h delete mode 100644 backends/platform/gp32/gp32std_grap.cpp delete mode 100644 backends/platform/gp32/gp32std_grap.h delete mode 100644 backends/platform/gp32/gp32std_input.cpp delete mode 100644 backends/platform/gp32/gp32std_input.h delete mode 100644 backends/platform/gp32/gp32std_memory.cpp delete mode 100644 backends/platform/gp32/gp32std_memory.h delete mode 100644 backends/platform/gp32/gp32std_sound.cpp delete mode 100644 backends/platform/gp32/gp32std_sound.h delete mode 100644 backends/platform/gp32/gp_asmlib.s delete mode 100644 backends/platform/gp32/gp_clipped.c delete mode 100644 backends/platform/gp32/gpmad/readme.txt delete mode 100644 backends/platform/gp32/gptremor/readme.txt delete mode 100644 backends/platform/gp32/memcpy.S delete mode 100644 backends/platform/gp32/minilzo/readme.txt delete mode 100644 backends/platform/gp32/portdefs.h delete mode 100644 backends/platform/gp32/scummvm.bmp delete mode 100644 backends/platform/gp32/startup.c diff --git a/backends/fs/gp32/gp32-fs-factory.cpp b/backends/fs/gp32/gp32-fs-factory.cpp deleted file mode 100644 index 150c4f3236..0000000000 --- a/backends/fs/gp32/gp32-fs-factory.cpp +++ /dev/null @@ -1,42 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - */ - -#if defined(__GP32__) -#include "backends/fs/gp32/gp32-fs-factory.h" -#include "backends/fs/gp32/gp32-fs.cpp" - -DECLARE_SINGLETON(GP32FilesystemFactory); - -AbstractFilesystemNode *GP32FilesystemFactory::makeRootFileNode() const { - return new GP32FilesystemNode(); -} - -AbstractFilesystemNode *GP32FilesystemFactory::makeCurrentDirectoryFileNode() const { - return new GP32FilesystemNode(); -} - -AbstractFilesystemNode *GP32FilesystemFactory::makeFileNodePath(const String &path) const { - return new GP32FilesystemNode(path); -} -#endif diff --git a/backends/fs/gp32/gp32-fs-factory.h b/backends/fs/gp32/gp32-fs-factory.h deleted file mode 100644 index 7e6cb595ca..0000000000 --- a/backends/fs/gp32/gp32-fs-factory.h +++ /dev/null @@ -1,51 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - */ - -#ifndef GP32_FILESYSTEM_FACTORY_H -#define GP32_FILESYSTEM_FACTORY_H - -#include "common/singleton.h" -#include "backends/fs/fs-factory.h" - -/** - * Creates GP32FilesystemNode objects. - * - * Parts of this class are documented in the base interface class, FilesystemFactory. - */ -class GP32FilesystemFactory : public FilesystemFactory, public Common::Singleton { -public: - typedef Common::String String; - - virtual AbstractFilesystemNode *makeRootFileNode() const; - virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; - virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; - -protected: - GP32FilesystemFactory() {}; - -private: - friend class Common::Singleton; -}; - -#endif /*GP32_FILESYSTEM_FACTORY_H*/ diff --git a/backends/fs/gp32/gp32-fs.cpp b/backends/fs/gp32/gp32-fs.cpp deleted file mode 100644 index 06830c13f5..0000000000 --- a/backends/fs/gp32/gp32-fs.cpp +++ /dev/null @@ -1,256 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "backends/fs/abstract-fs.h" - -#define MAX_PATH_SIZE 256 - -/** - * Implementation of the ScummVM file system API. - * - * Parts of this class are documented in the base interface class, AbstractFilesystemNode. - */ -class GP32FilesystemNode : public AbstractFilesystemNode { -protected: - String _displayName; - String _path; - bool _isDirectory; - bool _isRoot; - -public: - /** - * Creates a GP32FilesystemNode with the root node as path. - */ - GP32FilesystemNode(); - - /** - * Creates a GP32FilesystemNode for a given path. - * - * @param path String with the path the new node should point to. - */ - GP32FilesystemNode(const String &path); - - virtual bool exists() const { return true; } //FIXME: this is just a stub - virtual String getDisplayName() const { return _displayName; } - virtual String getName() const { return _displayName; } - virtual String getPath() const { return _path; } - virtual bool isDirectory() const { return _isDirectory; } - // FIXME: isValid should return false if this Node can't be used! - // so client code can rely on the return value. - virtual bool isReadable() const { return true; } //FIXME: this is just a stub - virtual bool isWritable() const { return true; } //FIXME: this is just a stub - - virtual AbstractFilesystemNode *getChild(const String &n) const; - virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const; - virtual AbstractFilesystemNode *getParent() const; -}; - -const char gpRootPath[] = "gp:\\"; -//char gpCurrentPath[MAX_PATH_SIZE] = "gp:\\"; // must end with '\' - -/** - * Returns the last component of a given path. - * - * Examples: - * gp:\foo\bar.txt would return "\bar.txt" - * gp:\foo\bar\ would return "\bar\" - * - * @param str Path to obtain the last component from. - * @return Pointer to the first char of the last component inside str. - */ -const char *lastPathComponent(const Common::String &str) { - if(str.empty()) - return ""; - - const char *start = str.c_str(); - const char *cur = start + str.size() - 2; - - while (cur >= start && *cur != '\\') { - --cur; - } - - return cur + 1; -} - -/** - * FIXME: document this function. - * - * @param path - * @param convPath - */ -int gpMakePath(const char *path, char *convPath) { - // copy root or current directory - const char *p; - if ((*path == '/') || (*path == '\\')) { - path++; - p = gpRootPath; - while (*p) - *convPath++ = *p++; - }// else - // p = gpCurrentPath; - - //while (*p) - // *convPath++ = *p++; - - // add filenames/directories. remove "." & "..", replace "/" with "\" - do { - switch (*path) { - case 0: - case '/': - case '\\': - if (*(convPath - 1) == '\\') { - // already ends with '\' - } else if ((*(convPath - 2) == '\\') && (*(convPath - 1) == '.')) { - convPath--; // remove '.' and end with '\' - } else if ((*(convPath - 3) == '\\') && (*(convPath - 2) == '.') && (*(convPath - 1) == '.')) { - convPath -= 3; // remove "\.." - if (*(convPath - 1) == ':') - *convPath++ = '\\'; // "gp:" -> "gp:\" - else - while (*(convPath - 1) != '\\') - convPath--; // remove one directory and end with '\' - } else { - *convPath++ = '\\'; // just add '\' - } - break; - - default: - *convPath++ = *path; - break; - } - } while (*path++); - - *convPath = '\\'; - - // *--convPath = 0; // remove last '\' and null-terminate - *convPath = 0; // remove last '\' and null-terminate - - return 0; -} - -GP32FilesystemNode::GP32FilesystemNode() { - _isDirectory = true; - _isRoot = true; - _displayName = "GP32 Root"; - _path = "gp:\\"; -} - -GP32FilesystemNode::GP32FilesystemNode(const String &path) { - const char *dsplName = NULL, *pos = NULL; - char convPath[256]; - - gpMakePath(path.c_str(), convPath); - - _path = convPath; - pos = convPath; - - while (*pos) - if (*pos++ == '\\') - dsplName = pos; - - BP("FS: path name: %s", path.c_str()); - - if (strcmp(path.c_str(), "gp:\\") == 0) { - _isRoot = true; - _displayName = "GP32 Root"; - } else { - _isRoot = false; - _displayName = String(dsplName); - } - _isDirectory = true; -} - -AbstractFilesystemNode *GP32FilesystemNode::getChild(const String &n) const { - // FIXME: Pretty lame implementation! We do no error checking to speak - // of, do not check if this is a special node, etc. - assert(_isDirectory); - - String newPath(_path); - if (_path.lastChar() != '\\') - newPath += '\\'; - newPath += n; - - return new GP32FilesystemNode(newPath); -} - -bool GP32FilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const { - assert(_isDirectory); - - //TODO: honor the hidden flag - - GPDIRENTRY dirEntry; - GPFILEATTR attr; - GP32FilesystemNode entry; - uint32 read; - - if (mode == FilesystemNode::kListAll) - LP("listDir(kListAll)"); - else - LP("listDir(kListDirectoriesOnly)"); - - int startIdx = 0; // current file - String listDir(_path); - //listDir += "/"; - - while (GpDirEnumList(listDir.c_str(), startIdx++, 1, &dirEntry, &read) == SM_OK) { -da if (dirEntry.name[0] == '.') - continue; - - entry._displayName = dirEntry.name; - entry._path = _path; - entry._path += dirEntry.name; - entry._isRoot = false; - - GpFileAttr(entry._path.c_str(), &attr); - entry._isDirectory = attr.attr & (1 << 4); - - // Honor the chosen mode - if ((mode == FilesystemNode::kListFilesOnly && entry._isDirectory) || - (mode == FilesystemNode::kListDirectoriesOnly && !entry._isDirectory)) - continue; - - if (entry._isDirectory) - entry._path += "\\"; - myList.push_back(new GP32FilesystemNode(entry)); - } - - BP("Dir... %s", listDir.c_str()); - - return true; -} - -AbstractFilesystemNode *GP32FilesystemNode::getParent() const { - if (_isRoot) - return 0; - - const char *start = _path.c_str(); - const char *end = lastPathComponent(_path); - - GP32FilesystemNode *p = new GP32FilesystemNode(String(start, end - start)); - - NP("%s", p->_path.c_str()); - - return p; -} diff --git a/backends/module.mk b/backends/module.mk index e8ba303dea..187cc83ee9 100644 --- a/backends/module.mk +++ b/backends/module.mk @@ -3,7 +3,6 @@ MODULE := backends MODULE_OBJS := \ fs/amigaos4/amigaos4-fs-factory.o \ fs/ds/ds-fs-factory.o \ - fs/gp32/gp32-fs-factory.o \ fs/palmos/palmos-fs-factory.o \ fs/posix/posix-fs-factory.o \ fs/ps2/ps2-fs-factory.o \ diff --git a/backends/platform/gp32/Makefile b/backends/platform/gp32/Makefile deleted file mode 100644 index f7145bf860..0000000000 --- a/backends/platform/gp32/Makefile +++ /dev/null @@ -1,187 +0,0 @@ -CC := arm-elf-gcc -CXX := arm-elf-g++ -LD := arm-elf-g++ -AS := arm-elf-as -AR := arm-elf-ar cru -RANLIB := arm-elf-ranlib -RM := rm -f -MKDIR := mkdir -p -ECHO := echo -n -CAT := cat -RM := rm -f -# recursive version of RM -RM_REC := $(RM) -r -ZIP := zip -q -CP := cp -OBJCOPY := arm-elf-objcopy -FXETOOL := b2fxec - - -####################################################################### -# Default compilation parameters. Normally don't edit these # -####################################################################### - -CFLAGS = -marm -march=armv4t -mtune=arm920 -mapcs \ - -finline-functions \ - -fshort-enums \ - -mstructure-size-boundary=32 \ - -mno-thumb-interwork \ - -I$(GPSDK)/include \ - -g \ - -O2 \ - -fomit-frame-pointer -# -ffast-math \ -# -fshort-double - -CPPFLAGS:= $(CFLAGS) -CXXFLAGS:= $(CFLAGS) -DEFINES := -LDFLAGS := -INCLUDES:= -I. -Icommon -LIBS := -OBJS := - -# Turn on useful warnings -CXXFLAGS+= -Wall -pedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -CXXFLAGS+= -Wshadow -Wuninitialized -Wimplicit -Wundef -CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -CXXFLAGS+= -Wwrite-strings -fcheck-new -Wctor-dtor-privacy -Wnon-virtual-dtor - -# Stripped Build? (Smaller ELF, Minimal debug symbol information). -# You MUST comment this out with a # if you wish to debug your code. -STRIP_DEBUG = -Wl,--strip-debug - -# GPSDK (SDK, Includes and Startup Files) base dir -GPSDK = /usr/compat/gp32/share/sdk - -LDSPECS = -specs=gp32_gpsdk.specs - -LDFLAGS = $(STRIP_DEBUG) -Wl,-Map,$(MAPFILE) $(LDSPECS) -Wl,--no-warn-mismatch - -LIBS += -L$(GPSDK)/lib \ - -lgpmem -lgpos -lgpstdio -lgpstdlib -lgpsound -lgpgraphic -lgpfont \ - -lm -lc -lgcc - -INCLUDES += -Ibackends/platform/gp32 -Iengines -I$(GPSDK)/include - -MODULES += backends/platform/gp32 - -# Outputs -EXEEXT = .elf -MAPFILE = scummvm.map -BIN = scummvm.gxb -FXE = scummvm.fxe - -# Plugins hack -srcdir = ./ - -DEFINES = -D__GP32__ -DEFINES += -DNONSTANDARD_PORT - -# Disable new themes. GP32 has LOW memory! -DEFINES += -DDISABLE_FANCY_THEMES - -# Support libtremor. -#DEFINES += -DUSE_VORBIS -DUSE_TREMOR -DGP32_SDK -#INCLUDES += -Ibackends/platform/gp32/gptremor -#LIBS += -Lbackends/platform/gp32/gptremor -lgptremor - -# Support libmad. -#DEFINES += -DUSE_MAD -#INCLUDES += -Ibackends/platform/gp32/gpmad -#LIBS += -Lbackends/platform/gp32/gpmad -lgpmad - -# Support libminilzo. -DEFINES += -DUSE_MINILZO -INCLUDES += -Ibackends/platform/gp32/minilzo -LIBS += -Lbackends/platform/gp32/minilzo -lminilzo - -# Support for 8:3 save files names (The GP32 uses FAT12/16 (no vFAT) for the file system). -DEFINES += -DSHORT_SAVENAMES - -# Support for the unsigned sound mixer. -DEFINES += -DOUTPUT_UNSIGNED_AUDIO - -# Support for the GP32 (fmOPL derived) MIDI engine. -# - NOT fully implemented yet. -#DEFINES += -DUSE_GP32_FMOPL - - - -#GP32 Debug - Remove from Release builds -# This builds in the GP32 GDB USB Stub. Don't use it unless you know what your doing. -# You also need to remove ANY optemisation from the compiler flags. -#DEFINES += -DGP32_GDB -#OBJS += backends/platform/gp32/debug-gdbstub-usb.o - -# Standard librarys and optimization modules -OBJS += backends/platform/gp32/startup.o \ - backends/platform/gp32/memcpy.o \ - backends/platform/gp32/gp_asmlib.o \ - backends/platform/gp32/gp_clipped.o \ - backends/platform/gp32/fontdata.o - -# Custom GP32 std library -OBJS += backends/platform/gp32/gp32std.o \ - backends/platform/gp32/gp32std_file.o \ - backends/platform/gp32/gp32std_grap.o \ - backends/platform/gp32/gp32std_input.o \ - backends/platform/gp32/gp32std_memory.o \ - backends/platform/gp32/gp32std_sound.o \ - #backends/platform/gp32/dmaaudio_asm.o \ - #backends/platform/gp32/dmaaudio.o \ - -#Main ScummVM for the GP32 Backend -OBJS += backends/platform/gp32/gp32_main.o \ - backends/platform/gp32/gp32_launcher.o \ - backends/platform/gp32/gp32_osys.o \ - backends/fs/gp32/gp32-fs.o - -$(FXE): $(BIN) - $(FXETOOL) -f -a "The ScummVM Team" -t "ScummVM for the GP32" -b backends/platform/gp32/scummvm.bmp $< $@ - -$(BIN): scummvm$(EXEEXT) - $(OBJCOPY) -O binary $< $@ - -# Uncomment this to use GCC 3.x specific dependency tracking (recommended) -HAVE_GCC3 = 1 - -####################################################################### -# Control which modules are built - uncomment any to disable module # -####################################################################### - -DISABLE_SCALERS = 1 -DISABLE_HQ_SCALERS = 1 - -ENABLE_SCUMM = STATIC_PLUGIN - -# We can play The Dig with GP32 -- without any movies/musics/voices. But who would do that? -#ENABLE_SCUMM_7_8 = 1 -#ENABLE_HE = 1 - -ENABLE_AGOS = STATIC_PLUGIN -ENABLE_SKY = STATIC_PLUGIN -ENABLE_QUEEN = STATIC_PLUGIN -ENABLE_GOB = STATIC_PLUGIN -ENABLE_LURE = STATIC_PLUGIN -ENABLE_CINE = STATIC_PLUGIN -ENABLE_SAGA = STATIC_PLUGIN -ENABLE_KYRA = STATIC_PLUGIN -ENABLE_AGI = STATIC_PLUGIN - -# The engines below are not supported on the GP32 port so there is -# no point compiling support into the binary. -#ENABLE_SWORD1 = STATIC_PLUGIN -#ENABLE_SWORD2 = STATIC_PLUGIN - -####################################################################### -# Misc stuff - you should normally never have to edit this # -####################################################################### - -EXECUTABLE := scummvm$(EXEEXT) - -include Makefile.common - -dist: - $(RM) $(ZIPFILE) - $(ZIP) $(ZIPFILE) $(DISTFILES) diff --git a/backends/platform/gp32/README.GP32 b/backends/platform/gp32/README.GP32 deleted file mode 100644 index 15120c7303..0000000000 --- a/backends/platform/gp32/README.GP32 +++ /dev/null @@ -1 +0,0 @@ -TODO. :) diff --git a/backends/platform/gp32/debug-gdbstub-usb.cpp b/backends/platform/gp32/debug-gdbstub-usb.cpp deleted file mode 100644 index 76b7fad13b..0000000000 --- a/backends/platform/gp32/debug-gdbstub-usb.cpp +++ /dev/null @@ -1,1927 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -/* - * - * Basic GP32 USB GDB Debug Stub - Use with Multi-firmware that supports GDB - * Mithris kindly gave me the basic stub code. - * - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -//#define USE_PRINTF // If there is a Printf(const char *pFormat,...) implemented - -/////////////////////////////////////////////////////////////// -// Externs -extern int __text_start; -extern int __data_start; -extern int __bss_start; -#ifdef USE_PRINTF -extern void Printf(char *pFormat, ...); -#endif -/////////////////////////////////////////////////////////////// - -extern "C" { - int OpenUSB(); - void InstallISR(); -} - -struct g_Namedregisters { - unsigned int r0; - unsigned int r1; - unsigned int r2; - unsigned int r3; - unsigned int r4; - unsigned int r5; - unsigned int r6; - unsigned int r7; - unsigned int r8; - unsigned int r9; - unsigned int r10; - unsigned int r11; - unsigned int r12; - unsigned int sp; - unsigned int lr; - unsigned int pc; - unsigned int fps; - unsigned int fcpsr; -}; - -/////////////////////////////////////////////////////////////// -// Defines - - -#define _REG_R1 0 -#define _REG_R2 2 -#define _REG_R3 3 -#define _REG_R4 4 -#define _REG_R5 5 -#define _REG_R6 6 -#define _REG_R7 7 -#define _REG_R8 8 -#define _REG_R9 9 -#define _REG_R10 10 -#define _REG_R11 11 -#define _REG_R12 12 -#define _REG_FP 11 -#define _REG_IP 12 -#define _REG_SL 10 -#define _REG_SP 13 -#define _REG_LR 14 -#define _REG_PC 15 - -#define PACKET_SIZE 0x100 - -#define MODE_USER 0 -#define MODE_FIQ 1 -#define MODE_IRQ 2 -#define MODE_SUPERVISOR 3 -#define MODE_ABORT 4 -#define MODE_UNDEF 5 -#define MODE_SYSTEM 6 -#define MODE_DUNNO -1 - -/////////////////////////////////////////////////////////////// -// Global stuff - -// Register array. -int g_Registers[50] = {1, 2, 3, 4 ,5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, - 21, 22, 23, 24, 25, 26, 27, 28, 29, - 31, 32, 33, 34, 35, 36, 37, 38, 39, - 41, 42, 43, 44, 45, 46, 47, 48, 49}; - -// Register name strings, not used right now. -static char * arm_register_name_strings[] = -{"r0", "r1", "r2", "r3", /* 0 1 2 3 */ - "r4", "r5", "r6", "r7", /* 4 5 6 7 */ - "r8", "r9", "r10", "r11", /* 8 9 10 11 */ - "r12", "sp", "lr", "pc", /* 12 13 14 15 */ - "f0", "f1", "f2", "f3", /* 16 17 18 19 */ - "f4", "f5", "f6", "f7", /* 20 21 22 23 */ - "fps", "cpsr" }; /* 24 25 */ - - -// Some USB stuff -GPN_DESC g_CommDesc; -GPN_COMM g_Comm; -const char HexDigits[17] = "0123456789abcdef"; -char g_SendBuffer[256]; -char g_TempBuffer[256]; -char g_ReadBuffer[0x100]; -unsigned int g_CurrentCSPR = 0; -unsigned int g_SavedStepInstruction = 0; -unsigned int g_StepAddress = 0; -bool g_LastWasStep = false; -int g_iTrap = 0; -bool g_GDBConnected = false; -/////////////////////////////////////////////////////////////// - - -/////////////////////////////////////////////////////////////// -// Prototypes -void BreakPoint(); -int GetException(unsigned int CSPR); -unsigned int *GetNextInstruction(unsigned int *pAddr); -bool CondWillExecute(unsigned int uiCond, unsigned int CSPR); -unsigned int DecodeInstruction(unsigned int uiInstruction, unsigned int PC); - -/////////////////////////////////////////////////////////////// - - -/////////////////////////////////////////////////////////////// -// Code Begins here -/////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////// -// Open usb comms stuff -int OpenUSB() -{ - int iResult; - - g_CommDesc.port_kind = COMM_USB_D; - g_CommDesc.tr_mode = 1; - g_CommDesc.tr_buf_size = PACKET_SIZE; - g_CommDesc.sz_pkt = PACKET_SIZE; - g_CommDesc.isr_comm_ram = 0; - - - iResult = GpCommCreate(&g_CommDesc, &g_Comm); - return iResult; -} - -/////////////////////////////////////////////////////////////// -// No need for explanation -void CloseUSB() -{ - GpCommDelete(&g_CommDesc); -} - -/////////////////////////////////////////////////////////////// -// No need for explanation -int SendUSB(const void *pData, unsigned int uiSize) -{ - return g_Comm.comm_send((unsigned char *)pData, uiSize); -} - - -/////////////////////////////////////////////////////////////// -// No need for explanation -int RecvUSB(char *pBuffer, unsigned int uiSize) -{ - return g_Comm.comm_recv((unsigned char *)pBuffer, uiSize); -} - -/////////////////////////////////////////////////////////////// -// Waits for an acknowledge from the server -void WaitACK() -{ - bool bBreak = false; - int iResult; - - while (!bBreak) { - iResult = g_Comm.comm_recv((unsigned char *)g_SendBuffer, 0x100); - if (iResult > 0) { - bBreak = true; - } - } -} -/////////////////////////////////////////////////////////////// -// Formats and sends a command to the server, -// it also calculates checksum -void SendCommand(unsigned char *pCommand) -{ - int iOffset; - unsigned int iCheckSum; - - iOffset = 4; - g_SendBuffer[iOffset++] = '$'; - - iCheckSum = 0; - while (*pCommand != 0) { - g_SendBuffer[iOffset++] = *pCommand; - iCheckSum += *pCommand++; - } - - g_SendBuffer[iOffset++] = '#'; - iCheckSum = iCheckSum & 0xff; - g_SendBuffer[iOffset++] = HexDigits[(iCheckSum & 0xf0) >> 4]; - g_SendBuffer[iOffset++] = HexDigits[(iCheckSum & 0x0f)]; - g_SendBuffer[iOffset] = 0; - - (*(int *)&g_SendBuffer[0]) = (iOffset - 4); - SendUSB(g_SendBuffer, 0x100); - WaitACK(); -} - -/////////////////////////////////////////////////////////////// -// This function creates and sends a package which tells gdb that -// the last command was unsupported -void UnSupportedCommand() -{ - (*(int *)&g_SendBuffer[0]) = 4; - g_SendBuffer[4] = '$'; - g_SendBuffer[5] = '#'; - g_SendBuffer[6] = '0'; - g_SendBuffer[7] = '0'; - g_SendBuffer[8] = '0'; - SendUSB(g_SendBuffer, 0x100); - - WaitACK(); - -} - - -/////////////////////////////////////////////////////////////// -// This function is quite similar to the SendCommand above -// But it allows the user to set the package length. -// If the length of a package exceeds 256bytes including -// the protocol stuff and the package length you can split -// the packages by sending the package size * -1. -// The server will then merge all packages until a package -// with a length >0 is recieved. -void SendCommandSize(unsigned char *pCommand, int iSize) -{ - int iOffset; - unsigned int iCheckSum; - - iOffset = 4; - g_SendBuffer[iOffset++] = '$'; - - iCheckSum = 0; - while (*pCommand != 0) { - g_SendBuffer[iOffset++] = *pCommand; - iCheckSum += *pCommand++; - } - - g_SendBuffer[iOffset++] = '#'; - iCheckSum = iCheckSum & 0xff; - g_SendBuffer[iOffset++] = HexDigits[(iCheckSum & 0xf0) >> 4]; - g_SendBuffer[iOffset++] = HexDigits[(iCheckSum & 0x0f)]; - g_SendBuffer[iOffset] = 0; - - (*(int *)&g_SendBuffer[0]) = iSize; - SendUSB(g_SendBuffer, 0x100); - - WaitACK(); -} - - -/////////////////////////////////////////////////////////////// -// Writes a 32bit hexadeciman number in ascii to the string. -void HexToString(char *pString, int iNumber) -{ - pString[0] = HexDigits[(iNumber >> 28) & 0x0f]; - pString[1] = HexDigits[(iNumber >> 24) & 0x0f]; - pString[2] = HexDigits[(iNumber >> 20) & 0x0f]; - pString[3] = HexDigits[(iNumber >> 16) & 0x0f]; - pString[4] = HexDigits[(iNumber >> 12) & 0x0f]; - pString[5] = HexDigits[(iNumber >> 8) & 0x0f]; - pString[6] = HexDigits[(iNumber >> 4) & 0x0f]; - pString[7] = HexDigits[(iNumber) & 0x0f]; - -} - -/////////////////////////////////////////////////////////////// -// This does the same, but in a differend endian. -void HexToStringBW(char *pString, int iNumber) -{ - pString[6] = HexDigits[(iNumber >> 28) & 0x0f]; - pString[7] = HexDigits[(iNumber >> 24) & 0x0f]; - pString[4] = HexDigits[(iNumber >> 20) & 0x0f]; - pString[5] = HexDigits[(iNumber >> 16) & 0x0f]; - pString[2] = HexDigits[(iNumber >> 12) & 0x0f]; - pString[3] = HexDigits[(iNumber >> 8) & 0x0f]; - pString[0] = HexDigits[(iNumber >> 4) & 0x0f]; - pString[1] = HexDigits[(iNumber) & 0x0f]; - - pString[8] = 0; - -} - - -/////////////////////////////////////////////////////////////// -// equiv to strcat i imagine -void PrintToString(char *pString, char *pOtherString) -{ - while (*pOtherString != 0) { - *pString = *pOtherString; - *pString++; - *pOtherString++; - } -} - -/////////////////////////////////////////////////////////////// -// converts "ff" -> 0xff -unsigned char StringToByte(char *pString) -{ - unsigned char ucValue = 0; - - for (int i = 0; i < 2; i++) { - ucValue = ucValue << 4; - switch(pString[i]) { - case '0': - break; - case '1': - ucValue |= (0x01); - break; - case '2': - ucValue |= (0x02); - break; - case '3': - ucValue |= (0x03); - break; - case '4': - ucValue |= (0x04); - break; - case '5': - ucValue |= (0x05); - break; - case '6': - ucValue |= (0x06); - break; - case '7': - ucValue |= (0x07); - break; - case '8': - ucValue |= (0x08); - break; - case '9': - ucValue |= (0x09); - break; - case 'a': - ucValue |= (0x0a); - break; - case 'b': - ucValue |= (0x0b); - break; - case 'c': - ucValue |= (0x0c); - break; - case 'd': - ucValue |= (0x0d); - break; - case 'e': - ucValue |= (0x0e); - break; - case 'f': - ucValue |= (0x0f); - break; - - } - } - - return ucValue; -} - -/////////////////////////////////////////////////////////////// -// Sends a package with the program offsets to GDB -// Of some reason all offsets should be NULL. -void SendOffsets() -{ - char String[255]; - int a = 0;//(int)&__text_start; - int b = 0;//(int)&__data_start; - int c = 0;//(int)&__bss_start; - - PrintToString(String, "Text="); - HexToString(&String[5], a); - PrintToString(&String[5+8], ";Data="); - HexToString(&String[5+8+6], b); - PrintToString(&String[5+8+6+8], ";Bss="); - HexToString(&String[5+8+6+8+5], c); - String[5+8+6+8+5+8] = 0; - - SendCommand((unsigned char *)String); -} - -/////////////////////////////////////////////////////////////// -// This function dumps all registers to GDB -// It utilizes the SendCommandSize function to split the package. -void DumpRegisters() -{ - char Buffer[0x100]; - // Ugly hack so far. - - for (int i = 0; i < 21; i++) { - //g_Registers[i] = i; - HexToStringBW(&Buffer[i * 8], g_Registers[i]); - } - Buffer[21*8] = 0; - SendCommandSize((unsigned char *)Buffer, -1 * (21 * 8 + 4)); - for (int i = 0; i < 21; i++) { - //g_Registers[20 + i] = i; - HexToStringBW(&Buffer[i * 8], g_Registers[21 + i]); - } - Buffer[21*8] = 0; - - SendCommandSize((unsigned char *)Buffer, (21 * 8) + 4); -} - -/////////////////////////////////////////////////////////////// -// This function extracts an address from a string. -void *GetAddr(char *pBuffer) -{ - int iAddr; - int i = 0; - iAddr = 0; - - while (pBuffer[i] != ',') { - iAddr = iAddr << 4; - switch(pBuffer[i]) { - case '0': - //iAddr |= - break; - case '1': - iAddr |= (0x01); - break; - case '2': - iAddr |= (0x02); - break; - case '3': - iAddr |= (0x03); - break; - case '4': - iAddr |= (0x04); - break; - case '5': - iAddr |= (0x05); - break; - case '6': - iAddr |= (0x06); - break; - case '7': - iAddr |= (0x07); - break; - case '8': - iAddr |= (0x08); - break; - case '9': - iAddr |= (0x09); - break; - case 'a': - iAddr |= (0x0a); - break; - case 'b': - iAddr |= (0x0b); - break; - case 'c': - iAddr |= (0x0c); - break; - case 'd': - iAddr |= (0x0d); - break; - case 'e': - iAddr |= (0x0e); - break; - case 'f': - iAddr |= (0x0f); - break; - - } - i++; - } - return (void *)iAddr; -} -/////////////////////////////////////////////////////////////// -// This function does pretty much the same, but returns an int -// I know, some redundant code. -int GetBytes(char *pBuffer) -{ - int iBytes = 0; - int i = 0; - - - while ((pBuffer[i] != '#') && (pBuffer[i] != ':')) { - iBytes = iBytes << 4; - switch(pBuffer[i]) { - case '0': - //iAddr |= - break; - case '1': - iBytes |= 0x01; - break; - case '2': - iBytes |= 0x02; - break; - case '3': - iBytes |= 0x03; - break; - case '4': - iBytes |= 0x04; - break; - case '5': - iBytes |= 0x05; - break; - case '6': - iBytes |= 0x06; - break; - case '7': - iBytes |= 0x07; - break; - case '8': - iBytes |= 0x08; - break; - case '9': - iBytes |= 0x09; - break; - case 'a': - iBytes |= 0x0a; - break; - case 'b': - iBytes |= 0x0b; - break; - case 'c': - iBytes |= 0x0c; - break; - case 'd': - iBytes |= 0x0d; - break; - case 'e': - iBytes |= 0x0e; - break; - case 'f': - iBytes |= 0x0f; - break; - - } - - i++; - } - return iBytes; -} - -/////////////////////////////////////////////////////////////// -// This function reads memory and sends it back to GDB. -void SendMemory(void *pAddr, int iBytes) -{ - unsigned char *pData; - unsigned char iData; - int iBufferPos = 0; - int iBytesToSend; - char Byte; - int i; - - pData = (unsigned char *)pAddr; - - - do { - if (iBytes > 100) { - iBytesToSend = 100; - iBytes -= 100; - } else { - iBytesToSend = iBytes; - iBytes = 0; - } - iBufferPos = 0; - for (i = 0; i < iBytesToSend; i+=1) { - iData = *pData++; - g_TempBuffer[iBufferPos++] = HexDigits[(iData & 0xf0) >> 4]; - g_TempBuffer[iBufferPos++] = HexDigits[(iData & 0x0f)]; - - } - if (iBytes > 0) { - // This mean that we have not yet sent our last command. - g_TempBuffer[iBufferPos] = 0; - SendCommandSize((unsigned char *)g_TempBuffer, -1 * (i + 1 + 4)); - } - } while (iBytes > 0 ); - g_TempBuffer[iBufferPos] = 0; - SendCommand((unsigned char *)g_TempBuffer); -} - - - -/////////////////////////////////////////////////////////////// -// Does pretty much what it says. -void WriteMemory(void *pAddr, unsigned int uiBytes, char *pHexString) -{ - unsigned char *pData = ((unsigned char *)pAddr); - unsigned int uiOffset = 0; - unsigned char ucByte; - - //Printf("0x%x 0x%x", pAddr, uiBytes); - for (unsigned int i = 0; i < uiBytes ; i++) { - ucByte = StringToByte(&pHexString[uiOffset]); - //Printf("0x%x", ucByte); - *pData++ = ucByte; - uiOffset += 2; - } - /* - while (1); - unsigned int *piData = (unsigned int *)pAddr; - *piData = 0xe7ffdefe;//0xfedeffe7; - */ - -} - - -/////////////////////////////////////////////////////////////// -// Sends the required information about a trap -// TODO: correct numbers need to be placed there. -void SendBreakPoint() -{ - int iOffset = 0; - - g_TempBuffer[iOffset++] = 'T'; - g_TempBuffer[iOffset++] = '0'; - g_TempBuffer[iOffset++] = '5'; - g_TempBuffer[iOffset++] = '0'; - g_TempBuffer[iOffset++] = 'd'; - g_TempBuffer[iOffset++] = ':'; - HexToStringBW(&g_TempBuffer[iOffset], g_Registers[_REG_SP]); - iOffset += 8; - g_TempBuffer[iOffset++] = ';'; - g_TempBuffer[iOffset++] = '0'; - g_TempBuffer[iOffset++] = 'b'; - g_TempBuffer[iOffset++] = ':'; - HexToStringBW(&g_TempBuffer[iOffset], g_Registers[_REG_FP]); - iOffset += 8; - g_TempBuffer[iOffset++] = ';'; - g_TempBuffer[iOffset++] = '0'; - g_TempBuffer[iOffset++] = 'f'; - g_TempBuffer[iOffset++] = ':'; - HexToStringBW(&g_TempBuffer[iOffset], g_Registers[_REG_PC]); - iOffset += 8; - g_TempBuffer[iOffset++] = ';'; - g_TempBuffer[iOffset] = 0; - - SendCommand((unsigned char *)g_TempBuffer); - - - - -} - - -/////////////////////////////////////////////////////////////// -// Finds a character in a string and returns the offset. -int FindChar(char *pBuffer, char sign) -{ - int iRetVal = 0; - - while (*pBuffer != sign) { - iRetVal++; - *pBuffer++; - } - return iRetVal; -} - - -// Attibute naked. -/////////////////////////////////////////////////////////////// -// This is the ISR(Interrupt Service Routine) which handles -// All traps, it's basically a context switcher. -void ISR() __attribute__ ((naked)); -void ISR() -{ - // Lets snatch the registers! - - asm volatile(" \n" - " str r4, [%0, #0x10] \n" - " str r5, [%0, #0x14] \n" - " str r6, [%0, #0x18] \n" - " str r7, [%0, #0x1C] \n" - " str r8, [%0, #0x20] \n" - " str r9, [%0, #0x24] \n" - " str r10, [%0, #0x28] \n" - " str r11, [%0, #0x2C] \n" - " str r12, [%0, #0x30] \n" - - " str r14, [%0, #0x3C] \n" - - " @// skip 8 * 12byte(96bit) = 0x60 \n" - - " mov r4, %0 \n" - " ldmia sp!, {r0, r1, r2, r3} \n" - " str r0, [r4, #0x00] \n" - " str r1, [r4, #0x04] \n" - " str r2, [r4, #0x08] \n" - " str r3, [r4,#0x0C] \n" - - " mrs r1, SPSR \n" - " str r1, [r4, #0x48] \n" - " str r1, [r4,#0xA0] \n" - " str r1, [r4,#0xA4] \n" - - " mrs r1, CPSR \n" - " mov r2, r1 \n" - - - " @// Let us set the mode to supervisor so we can get r13 and r14 \n" - " bic r1, r1, #0x1f \n" - " orr r1, r1, #0x13 \n" - " msr CPSR_c, r1 \n" - " @// Just remember that we're in the supervisor stack aswell now \n" - " str r13, [r4,#0x34] \n" - " str r14, [r4,#0x38] \n" - " @// Lets move back to whatever mode we was in. \n" - " @// Make sure that IRQ's are turned on \n" - " bic r2, r2, #0x80 \n" - " msr CPSR_fsxc, r2 \n" - - - - - " \n" - : - : "r" (g_Registers) - : "%0", "r1", "r2", "r4"); - - - // Get Current CSPR and save LR - asm volatile(" \n" - " mrs r0, CPSR \n" - " str r0, [%0] \n" - - " str r14, [%1, #0x40] \n" - " str r0, [%1, #0x44] \n" - " str r13, [%1, #0x4C] \n" - " \n" - : - : "r" (&g_CurrentCSPR), "r" (g_Registers) - : "r0"); - - - switch(g_CurrentCSPR & 0x1f) { - case 0x10: // USER - g_iTrap = 0; - break; - case 0x11: // FIQ - g_iTrap = 1; - break; - case 0x12: // IRQ - g_iTrap = 2; - break; - case 0x13: // Supervisor - g_iTrap = 3; - break; - case 0x17: // Abort - g_iTrap = 4; - break; - case 0x1B: // Undefined/Breakpoint - // We cannot continue like this! - g_Registers[15] -= 4; - g_Registers[16] -= 4; - g_iTrap = 5; - break; - case 0x1F: // System - g_iTrap = 6; - break; - default: - g_iTrap = -1; - } - - - #ifdef USE_PRINTF - Printf("Trap@0x%x:%d", g_Registers[15], g_iTrap); - #endif - /* - switch (g_iTrap) { - case MODE_USER: - break; - case MODE_FIQ: - break; - case MODE_IRQ: - break; - case MODE_SUPERVISOR: - break; - case MODE_ABORT: - break; - case MODE_UNDEF: - break; - case MODE_SYSTEM: - break; - case MODE_DUNNO: - default: - while (1); - } - */ - SendBreakPoint(); - BreakPoint(); - - //Printf("0x%x 0x%x", g_Registers[15], g_Registers[16]); - // Okay, it's time to continue. - - - switch (g_iTrap) { - case MODE_USER: - //Printf("Dunno!!\n"); - break; - case MODE_FIQ: - //Printf("Dunno!!\n"); - break; - case MODE_IRQ: - //Printf("Dunno!!\n"); - break; - case MODE_SUPERVISOR: - //Printf("Dunno!!\n"); - break; - case MODE_ABORT: - asm volatile(" \n" - " mov r10, #0 \n" - " @Invalidate I&D cache \n" - " mcr p15, 0, r10, c7, c7 \n" - " @ restore the registers \n" - " ldr r1,[%0, #0x04] \n" - " ldr r2,[%0, #0x08] \n" - " ldr r4,[%0, #0x10] \n" - " ldr r5,[%0, #0x14] \n" - " ldr r6,[%0, #0x18] \n" - " ldr r7,[%0, #0x1C] \n" - " ldr r8,[%0, #0x20] \n" - " ldr r9,[%0, #0x24] \n" - " ldr r10,[%0, #0x28] \n" - " ldr r11,[%0, #0x2C] \n" - " ldr r12,[%0, #0x30] \n" - " ldr r14,[%0, #0x40] \n" - " ldr r0, [%0, #0x44] \n" - " msr CPSR_fsxc, r0 \n" - " ldr r0, [%0, #0x48] \n" - " msr SPSR_fsxc, r0 \n" - - " ldr r0,[%0, #0x00] \n" - " ldr r3,[%0, #0x0C] \n" - - " subs pc, lr, #0x04 \n" - - " \n" - : - :"r" (g_Registers) - :"r0"); - break; - case MODE_UNDEF: - // This will be the breakpoint i'm gonna test with. - asm volatile(" \n" - " mov r10, #0 \n" - " @Invalidate I&D cache \n" - " mcr p15, 0, r10, c7, c7 \n" - " @ restore the registers \n" - " ldr r1,[%0, #0x04] \n" - " ldr r2,[%0, #0x08] \n" - " ldr r4,[%0, #0x10] \n" - " ldr r5,[%0, #0x14] \n" - " ldr r6,[%0, #0x18] \n" - " ldr r7,[%0, #0x1C] \n" - " ldr r8,[%0, #0x20] \n" - " ldr r9,[%0, #0x24] \n" - " ldr r10,[%0, #0x28] \n" - " ldr r11,[%0, #0x2C] \n" - " ldr r12,[%0, #0x30] \n" - " ldr r14,[%0, #0x40] \n" - " ldr r0, [%0, #0x44] \n" - " msr CPSR_fsxc, r0 \n" - " ldr r0, [%0, #0x48] \n" - " msr SPSR_fsxc, r0 \n" - - " ldr r0,[%0, #0x00] \n" - " ldr r3,[%0, #0x0C] \n" - " @ The subbing has already been done! \n" - " @subs pc, lr, #0x04 \n" - " movs pc, lr \n" - " \n" - : - :"r" (g_Registers) - :"r0"); - - - break; - case MODE_SYSTEM: - //Printf("Dunno!!\n"); - break; - case MODE_DUNNO: - default: - //Printf("Dunno!!\n"); - while (1); - } - - - - -} - -/////////////////////////////////////////////////////////////// -// Returns which exception occured based on CSPR -int GetException(unsigned int CSPR) -{ - switch(CSPR & 0x1f) { - case 0x10: // USER - return 0; - case 0x11: // FIQ - return 1; - case 0x12: // IRQ - return 2; - case 0x13: // Supervisor - return 3; - case 0x17: // Abort - return 4; - case 0x1B: // Undefined/Breakpoint - return 5; - case 0x1F: // System - return 6; - default: - return -1; - } -} - - -/////////////////////////////////////////////////////////////// -// Installs the ISR address into the system RAM -void InstallISR() -{ - int *pPointer = (int *)(0x0c7ac040); - int *pPointer2 = (int *)(0x0c7ac018); - - void (*pISR)(); - - pISR = ISR; - - *pPointer = (int)pISR; - *pPointer2 = (int)pISR; - -} - -void DEBUG_Print(char *pFormat, ...) -{ - char Temp[0x100]; - va_list VaList; - int iLength; - int iOffset; - unsigned char MyChar; - - if (!g_GDBConnected) return; - - va_start(VaList , pFormat); - vsnprintf(Temp, 0x100, pFormat , VaList); - va_end(VaList); - - iLength = strlen(Temp); - if (iLength > 100) iLength = 100; - - g_TempBuffer[0] = 'O'; - iOffset = 1; - for (int i = 0; i < iLength; i++) { - MyChar = (unsigned char)Temp[i]; - g_TempBuffer[iOffset++] = HexDigits[(MyChar & 0xf0) >> 4]; - g_TempBuffer[iOffset++] = HexDigits[(MyChar & 0x0f)]; - } - g_TempBuffer[iOffset] = 0; - SendCommand((unsigned char *)g_TempBuffer); - -} - - -/////////////////////////////////////////////////////////////// -// The main thread when the GDB thread has control -void BreakPoint() -{ - unsigned int *pNextInstruction; - bool bBreakLoop = false; - int iResult; - int iMessageLength; - int iOffsetAdd; - int iNullVal = 0; - void *pAddr; - int iOffset; - int iBytes; - - - // Find out if we got here through a STEP command - if (g_LastWasStep) { - #ifdef USE_PRINTF - Printf("I:0x%x 0x%x", *((unsigned int *)(g_Registers[15] + 4)), *((unsigned int *)(g_Registers[15]))); - Printf("S: 0x%x", g_StepAddress); - #endif - if ((unsigned int)g_Registers[15] == g_StepAddress) { - // Yes it was, Lets restore the instruction. - *((unsigned int *)g_StepAddress) = g_SavedStepInstruction; - #ifdef USE_PRINTF - Printf("Restore: 0x%x", g_SavedStepInstruction); - #endif - } else { - while (1); - } - g_LastWasStep = false; - } - - - while (!bBreakLoop) { - iResult = RecvUSB(g_ReadBuffer, 0x100); - //Printf("%d\n", iResult); - - if (iResult > 0) { - // If we recieve a package we can assume that GDB is connected.. or smth..:D - g_GDBConnected = true; - // Well, we have recieved a package, lets print the contents. - iMessageLength = *(int *)&g_ReadBuffer[0]; - g_ReadBuffer[4 + iMessageLength] = 0; - //Printf("%s\n %d", &g_ReadBuffer[4], iMessageLength); - - // Let us also send an ACK '+' - (*(int *)&g_SendBuffer[0]) = 1; - g_SendBuffer[4] = '+'; - SendUSB((const void *)g_SendBuffer, 0x100); - WaitACK(); - - // I can see that i get a bunch of '+' and '-' in the messages.. lets remove them. - iOffsetAdd = 4; - while ((g_ReadBuffer[iOffsetAdd] == '+') || (g_ReadBuffer[iOffsetAdd] == '-')) iOffsetAdd++; - - // Check whether it's legimit command - if (g_ReadBuffer[iOffsetAdd] == '$') { - // Well it is! - switch(g_ReadBuffer[iOffsetAdd + 1]) { - case 'H': // Set thread, we're not having any threads.. so.. just return OK - SendCommand((unsigned char *)"OK"); - break; - case 'q': // Query, there are some queries, but GDB first asks for Offsets - switch(g_ReadBuffer[iOffsetAdd + 2]) { - case 'O': // Offsets - SendOffsets(); - break; - case 'C': - SendCommand((unsigned char *)"QC0000"); - //SendBreakPoint(); - break; - - } - break; - case '?': - // This will have to be modified later to send the correct signal. - SendBreakPoint(); - break; - case 'g': - DumpRegisters(); - break; - case 'm': - pAddr = GetAddr(&g_ReadBuffer[iOffsetAdd + 2]); - iOffset = FindChar(&g_ReadBuffer[iOffsetAdd + 2], ','); - iBytes = GetBytes(&g_ReadBuffer[iOffsetAdd + 2 + iOffset]); - SendMemory(pAddr, iBytes); - break; - case 'X': //Write memory binary, which we DON't support.. ofcourse. - UnSupportedCommand(); - break; - case 'P': // Write register - { - SendCommand((unsigned char *)"OK"); - - } - break; - case 'M': // Write memory not binary - { - pAddr = GetAddr(&g_ReadBuffer[iOffsetAdd + 2]); - iOffset = FindChar(&g_ReadBuffer[iOffsetAdd + 2], ','); - iBytes = GetBytes(&g_ReadBuffer[iOffsetAdd + 2 + iOffset]); - iOffset = FindChar(&g_ReadBuffer[iOffsetAdd + 2], ':'); - WriteMemory(pAddr, iBytes, &g_ReadBuffer[iOffsetAdd + 2 + iOffset + 1]); - SendCommand((unsigned char *)"OK"); - - } - break; - case 'c': // continue - { - return; - - } - break; - - case 's': // Stepping. - { - // Get the address of the next instruction. - pNextInstruction = GetNextInstruction((unsigned int *)g_Registers[15]); - - // Read whatsever there. - g_SavedStepInstruction = *pNextInstruction; - g_StepAddress = (unsigned int)pNextInstruction; - g_LastWasStep = true; - - //Printf("Curr: 0x%x", g_Registers[15]); - #ifdef USE_PRINTF - Printf("Next: 0x%x->0x%x", g_Registers[15], pNextInstruction); - #endif - //Printf("Trap: 0x%x", GetException((unsigned int)g_Registers[40])); - // Write a breakpoint instruction to the address. - *pNextInstruction = 0xe7ffdefe; - return; - - } - break; - case 'Z': // BreakPoint. - { - switch(g_ReadBuffer[iOffsetAdd + 2]) { - case '0': - // Software breakpoint, i think it's up to me to add, it, lets send OK for now. - UnSupportedCommand(); - break; - default: - // We only support software breakpoints for now, lets return unsupported. - // Actually we don't even support SW breakpoints now - UnSupportedCommand(); - break; - } - } - break; - - default: - UnSupportedCommand(); - break; - - } - } - - } - - } - -} - -/////////////////////////////////////////////////////////////// -// Tries to find the next instruction to be executed after a break -unsigned int *GetNextInstruction(unsigned int *pAddr) -{ - unsigned int uiInstruction = *pAddr; - unsigned int uiAndVal = 0; - unsigned int iNewPC = 0; - int iNewAddr = 0; - int iRegsbeforePC = 0; - unsigned int uiBaseRegister = 0; - unsigned int uiRegVal = 0; - unsigned int uiData = 0; - unsigned int uiCondMask = 0; - int iPCOffset = 0; - - unsigned int uiNewPC = DecodeInstruction(uiInstruction, (unsigned int)pAddr); - return (unsigned int *)uiNewPC; - - - // Set new PC to pAddr + 4, because we really hope that is the case...:D - iNewPC = (unsigned int)pAddr; - iNewPC += 4; // Next instruction (atleast in ARM mode, we don't support thumb yet) - - // Now it's a good point to find out if the instruction would be executed anyway. - uiCondMask = (uiInstruction & 0xf0000000) >> 28; - - if (CondWillExecute(uiCondMask, (unsigned int)g_Registers[18])) { - //Printf("Condition will execute"); - // Find out if it's a B or BL instruction. (This is the easy one) - if ((uiInstruction & 0xE000000 ) == 0xA000000) { - #ifdef USE_PRINTF - Printf("0x%x", uiInstruction); - #endif - // Okay, it's a branch instruction, lets get the address it's for - iNewAddr = uiInstruction & 0xffffff; - // We might need to sign extend this instruction. - if ((iNewAddr & 0x00800000) != 0) { - #ifdef USE_PRINTF - printf("Sign extending"); - #endif - //iNewAddr *= -1; - iNewAddr |= 0xff000000; - } - #ifdef USE_PRINTF - Printf("0x%x", iNewAddr); - #endif - iNewAddr *= 4; // Instruction size. - iNewPC = ((int)pAddr + iNewAddr + 8); - } - - // Well, it might be a ldm(ea)? - - if ((uiInstruction & 0xE000000) == 0x8000000) { - #ifdef USE_PRINTF - Printf("LDM"); - #endif - // this is a LDM/STM alright. - if ((uiInstruction & 0x100000) != 0) { - // This is a LDM instruction - // Lets see if the PC is ever loaded. - #ifdef USE_PRINTF - Printf("includes PC"); - #endif - if ((uiInstruction & 0x8000) != 0) { - // Well (damn the PC is loaded) - for (int i = 0; i < 15; i++) { - uiAndVal = 1 << i; - if ((uiInstruction & uiAndVal) != 0) iRegsbeforePC++; - } - #ifdef USE_PRINTF - Printf("%d regs", iRegsbeforePC); - #endif - /* - da = fa - ia = fd - db = ea - ib = ed - */ - // Lets find out which register is used as base for this operation. - uiBaseRegister = (uiInstruction & 0xF0000) >> 16; - uiRegVal = ((unsigned int *)g_Registers)[uiBaseRegister]; - // First, have a look at the U bit. - if ((uiInstruction & (1 << 23)) != 0) { - - // Transfer is made descending - // Which also means that the PC is closest to the base register i just found out. - // Lets check the P bit (If i'm supposed to increment before or after. - - iPCOffset = iRegsbeforePC * 4; - if (((uiInstruction) & (1 << 24)) != 0) iPCOffset += 4; - - } else { - // Transfer is done ascending - // Lets check the P bit (If i'm supposed to decrement before or after. - if (((uiInstruction) & (1 << 24)) != 0) iPCOffset = -4; - } - - - iNewPC = *(unsigned int *)((((int)uiRegVal) + iPCOffset) & ~0x03); - } - } - } - - // Check if it's a mov pc, Rn - - } - - return (unsigned int *)iNewPC; -} - -/////////////////////////////////////////////////////////////// -// Determines if uiCond will be true with this CSPR -bool CondWillExecute(unsigned int uiCond, unsigned int CSPR) -{ - - switch(uiCond) { - case 0: // EQ - // This is true if Z is set in CSPR - if ((CSPR & (1 << 30)) != 0) return true; - else return false; - case 1: // NE - // This should be true if Z is not set. - if ((CSPR & (1 << 30)) == 0) return true; - else return false; - case 2: // CS/HS - // this one should be true if C is set. - if ((CSPR & (1 << 29)) != 0) return true; - else return false; - case 3: // CC/LO - // this one should be true if C is clear. - if ((CSPR & (1 << 29)) == 0) return true; - else return false; - case 4: // MI - // this one should be true if N is set - if ((CSPR & (1 << 31)) != 0) return true; - else return false; - case 5: // PL - // this one should be true if N is clear. - if ((CSPR & (1 << 31)) == 0) return true; - else return false; - case 6: // VS - // this one should be true if V is set - if ((CSPR & (1 << 28)) != 0) return true; - else return false; - case 7: // VC - // this one should be true if V is clear. - if ((CSPR & (1 << 28)) == 0) return true; - else return false; - case 8: // HI - // This is true if C and Z is clear - if (((CSPR & (1 << 30)) == 0) && ((CSPR & (1 << 29)) == 0)) return true; - else return false; - case 9: // LS - // C clear OR Z set - if (((CSPR & (1 << 29)) == 0) || ((CSPR & (1 << 30)) != 0)) return true; - else return false; - case 10: // GE - // N set AND V set || N clear and V clear - if ((CSPR & (1 << 31)) == (CSPR & (1 << 28))) return true; - else return false; - case 11: // LT - // N != V - if ((CSPR & (1 << 31)) != (CSPR & (1 << 28))) return true; - else return false; - case 12: // GT - // Z == 0, N == V - if (((CSPR & (1 << 30)) == 0) && ((CSPR & (1 << 31)) == (CSPR & (1 << 28)))) return true; - else return false; - case 13: // LE - if (((CSPR & (1 << 30)) == 1) && ((CSPR & (1 << 31)) != (CSPR & (1 << 28)))) return true; - else return false; - case 14: // AL - return true; - default: - break; - } - - -} -// I got the idea for this layout from the singlestep.c (found in eCos) -// But i thought the code was a bit tricky to port, and i wanna learn more about this anyway so, i'll just do smth similar to that - - - -typedef struct -{ - unsigned Rm : 4; // Rm - unsigned resv2 : 1; // Reserved 2 (0) - unsigned shift : 2; // hmm.. dunno actually but probably (LSL, LSR, ASR, ROR ) - unsigned amount : 5; // Shift amount 0-31 - unsigned Rd : 4; // Rd - unsigned Rn : 4; // Rn - unsigned s : 1; // S-flag - unsigned opcode : 4; // Opcode (Mov etc) - unsigned resv1 : 3; // Reserved 1 (000) - unsigned cond : 4; // Condition - -} dpisr; // Data Processing Immediate Register Shift -#define DPISR_R1 0 -#define DPISR_R2 0 -// Example Rd, Rm, amount -typedef struct -{ - unsigned Rm : 4; // Rm - unsigned resv3 : 1; // Reserved 3 (1) - unsigned shift : 2; // (LSL, LSR, ASR, ROR ) - unsigned resv2 : 1; // Reserved 2 (0) - unsigned Rs : 4; // Rs - unsigned Rd : 4; // Rd - unsigned Rn : 4; // Rn - unsigned s : 1; // S-flag - unsigned opcode : 4; // Opcode - unsigned resv1 : 3; // Reserved 1 (000) - unsigned cond : 4; // Condition -} dprrs; // Data Processing Register Register Shift -#define DPRRS_R1 0 -#define DPRRS_R2 0 -#define DPRRS_R3 1 -// Example Rd, Rn, Rm Rs -// This intruction is unpredictable if R15 is one of the used registers anyway. -typedef struct -{ - unsigned immed : 8; // Immediate value - unsigned rotate : 4; // rotate - unsigned Rd : 4; // Rd - unsigned Rn : 4; // Rn - unsigned s : 1; // S-flag - unsigned opcode : 4; // Opcode - unsigned resv1 : 3; // Reserved 1 (001) - unsigned cond : 4; // Condition -} dpi; // Data processing immediate -// example add r0, r1, (ror , ) -#define DPI_R1 1 - -typedef struct -{ - unsigned immed : 12; // Immediate - unsigned Rd : 4; // Rd - unsigned Rn : 4; // Rn - unsigned L : 1; // L-bit (Load/Store)? - unsigned W : 1; // W-bit - unsigned B : 1; // B-bit - unsigned U : 1; // U-bit - unsigned p : 1; // P-bit - unsigned resv1 : 3; // Reserved 1 (010) - unsigned cond : 4; // Condition -} lsio; // Load/store immediate offset -// Example ldr Rd, [Rn, #] -#define LSIO_R1 2 - - -typedef struct -{ - unsigned Rm : 4; // Rm - unsigned resv2 : 1; // Reserved 2 (0) - unsigned shift : 2; // Shit type (LSL, LSR, ASR, ROR ) - unsigned amount : 5; // Shift amount (0-31) - unsigned Rd : 4; // Rd - unsigned Rn : 4; // Rn - unsigned L : 1; // L-bit (Load/Store)? - unsigned W : 1; // W-bit - unsigned B : 1; // B-bit - unsigned U : 1; // U-bit - unsigned p : 1; // P-bit - unsigned resv1 : 3; // Reserved 1 (011) - unsigned cond : 4; // Condition -} lsro; // Load/Store register offset -// Example ldr Rd, [Rn + Rm lsl 5] -#define LSRO_R1 3 -#define LSRO_R2 0 - - -typedef struct -{ - unsigned regs : 16; // Register mask - unsigned Rn : 4; // Rn - unsigned L : 1; // L-bit (Load/Store)? - unsigned W : 1; // W-bit - unsigned S : 1; // B-bit - unsigned U : 1; // U-bit - unsigned p : 1; // P-bit - - unsigned resv1 : 3; // Reserved 1 (100) - unsigned cond : 4; // Condition -} lsm; // Load store multiple -// Example: ldm r0, {r1, r2, r3} -#define LSM_R1 4 - -typedef struct -{ - unsigned offset : 24; // Branch offset - unsigned link : 1; // Link flag - unsigned resv1 : 3; // Reserved 1 (101) - unsigned cond : 4; // Condition -} bl; // Branch with link(optional) -#define BL_R1 5 - -typedef union { - dpisr DPISR; - dprrs DPRRS; - dpi DPI; - lsio LSIO; - lsro LSRO; - lsm LSM; - bl BL; - unsigned int uiInstruction; -} Instruction; - -/* -#define DPISR_R1 0 -#define DPISR_R2 0 - - -#define DPRRS_R1 0 -#define DPRRS_R2 0 -#define DPRRS_R3 1 - -#define DPI_R1 1 - -#define LSIO_R1 2 - -#define LSRO_R1 3 -#define LSRO_R2 0 - -#define LSM_R1 4 - -#define BL_R1 5 -*/ - -/* - * Data Processiong Opcode field values - */ -#define OPCODE_MOV 0xD -#define OPCODE_MVN 0xF -#define OPCODE_ADD 0x4 -#define OPCODE_ADC 0x5 -#define OPCODE_SUB 0x2 -#define OPCODE_SBC 0x6 -#define OPCODE_RSB 0x3 -#define OPCODE_RSC 0x7 -#define OPCODE_AND 0x0 -#define OPCODE_EOR 0x1 -#define OPCODE_ORR 0xC -#define OPCODE_BIC 0xE -#define OPCODE_CMP 0xA -#define OPCODE_CMN 0xB -#define OPCODE_TST 0x8 -#define OPCODE_TEQ 0x9 - -/* - * Shift field values - */ -#define SHIFT_LSL 0x0 -#define SHIFT_LSR 0x1 -#define SHIFT_ASR 0x2 -#define SHIFT_ROR 0x3 -#define SHIFT_RRX 0x3 /* Special case: ROR(0) implies RRX */ - - -unsigned int DecodeDPISR(dpisr Instr, unsigned int PC); -unsigned int DecodeDPRRS(dprrs Instr, unsigned int PC); -unsigned int DecodeDPI(dpi Instr, unsigned int PC); -unsigned int DecodeLSIO(lsio Instr, unsigned int PC); -unsigned int DecodeLSRO(lsro Instr, unsigned int PC); -unsigned int DecodeLSM(lsm Instr, unsigned int PC); -unsigned int DecodeBL(bl Instr, unsigned int PC); - - -/////////////////////////////////////////////////////////////// -// -unsigned int DecodeInstruction(unsigned int uiInstruction, unsigned int PC) -{ - Instruction myInstruction; - unsigned int uiCondMask; - - uiCondMask = (uiInstruction & 0xf0000000) >> 28; - - // This instruction can do whatever it wants, but if it doesn't execute we don't give a shit. - if (!CondWillExecute(uiCondMask, (unsigned int)g_Registers[18])) return PC + 4; - //Printf("CondWillExec"); - - myInstruction.uiInstruction = uiInstruction; - - // Start decoding.. phuu - - if ((myInstruction.DPISR.resv1 == DPISR_R1) && (myInstruction.DPISR.resv2 == DPISR_R2)) return DecodeDPISR(myInstruction.DPISR, PC); - else if ((myInstruction.DPRRS.resv1 == DPRRS_R1) && - (myInstruction.DPRRS.resv2 == DPRRS_R2) && - (myInstruction.DPRRS.resv3 == DPRRS_R3)) return DecodeDPRRS(myInstruction.DPRRS, PC); - else if ((myInstruction.DPI.resv1 == DPI_R1)) return DecodeDPI(myInstruction.DPI, PC); - else if ((myInstruction.LSIO.resv1 == LSIO_R1)) return DecodeLSIO(myInstruction.LSIO, PC); - - else if ((myInstruction.LSRO.resv1 == LSRO_R1) && - (myInstruction.LSRO.resv2 == LSRO_R2)) return DecodeLSRO(myInstruction.LSRO, PC); - else if (myInstruction.LSM.resv1 == LSM_R1) return DecodeLSM(myInstruction.LSM, PC); - else if (myInstruction.BL.resv1 == BL_R1) return DecodeBL(myInstruction.BL, PC); - - return 0; -} - -/////////////////////////////////////////////////////////////// -// -unsigned int LSL(unsigned int uiValue, unsigned int uiSteps) -{ - return uiValue << uiSteps; -} - -/////////////////////////////////////////////////////////////// -// -unsigned int LSR(unsigned int uiValue, unsigned int uiSteps) -{ - return uiValue >> uiSteps; -} - -/////////////////////////////////////////////////////////////// -// -// This one could be trickier since, i'm nor sure if a signed shift really is a signed shift. -unsigned int ASR(unsigned int uiValue, unsigned int uiSteps) -{ - unsigned int uiSignMask = 0; - - // Check if it's a negative number - if (uiValue & 0x80000000) { - // Yes, damn - uiSignMask = ((~0) << (32 - uiSteps)); - } - - return ((uiValue >> uiSteps) | uiSignMask); -} - -/////////////////////////////////////////////////////////////// -// -unsigned int ROR(unsigned int uiValue, unsigned int uiSteps) -{ - unsigned int uiRetval; - - while (uiSteps-- > 0) { - if (uiValue & 0x01) { - uiValue = (uiValue >> 1) | 0x80000000; - } else { - uiValue = uiValue >> 1; - } - } - return uiValue; -} - - -/////////////////////////////////////////////////////////////// -// -unsigned int Shift_Operand(unsigned int Rm, unsigned int amount, unsigned int shift) -{ - unsigned int uiRegisterValue; - - - - - uiRegisterValue = g_Registers[Rm]; - if (Rm == 0x0f) { - // Rm is PC, and PC is offseted by 8. - uiRegisterValue += 8; - } - - // Determine the shift mode. - //(LSL, LSR, ASR, ROR ) - switch (shift) { - case 0: // LSL - return LSL(uiRegisterValue, amount); - case 1: // LSR - return LSR(uiRegisterValue, amount); - case 2: // ASR - return ASR(uiRegisterValue, amount); - case 3: // ROR - return ROR(uiRegisterValue, amount); - default: - break; - } - return 0; -} - -/////////////////////////////////////////////////////////////// -// -// Example Rd, Rm, amount -unsigned int DecodeDPISR(dpisr Instr, unsigned int uiPC) -{ - unsigned int uiOperand = Shift_Operand(Instr.Rm, Instr.amount, Instr.shift); - unsigned int uiRnVal = g_Registers[Instr.Rn]; - - - - // Only do this i Pc is Rd - if (Instr.Rd != 0x0f) return uiPC + 4; - - // The actual value that PC contains when executing this instruction is the instruction address+8 - if (Instr.Rn == 0x0f) uiRnVal += 8; - - // Check what opcode it is! - switch (Instr.opcode) { - case OPCODE_MOV: - return uiOperand; - case OPCODE_MVN: - return ~uiOperand; - case OPCODE_ADD: - return uiRnVal + uiOperand; - case OPCODE_ADC: - return uiRnVal + uiOperand + (((g_Registers[18] & (1 << 29))) == 0?0:1); - case OPCODE_SUB: - return uiRnVal - uiOperand; - case OPCODE_SBC: - return uiRnVal - uiOperand - (((g_Registers[18] & (1 << 29))) == 0?1:0); - case OPCODE_RSB: - return uiOperand - uiRnVal; - case OPCODE_RSC: - return uiOperand - uiRnVal - (((g_Registers[18] & (1 << 29))) == 0?1:0); - case OPCODE_AND: - return (uiRnVal & uiOperand); - case OPCODE_EOR: - return (uiRnVal^uiOperand); - case OPCODE_ORR: - return (uiRnVal | uiOperand); - case OPCODE_BIC: - return (uiRnVal & ~uiOperand); - default: - return 0; - } -} - - -/////////////////////////////////////////////////////////////// -// -//dprrs; // Data Processing Register Register Shift -// Example Rd, Rn, Rm Rs -unsigned int DecodeDPRRS(dprrs Instr, unsigned int uiPC) -{ - unsigned int uiRmValue = g_Registers[Instr.Rm]; - unsigned int uiRsValue = g_Registers[Instr.Rs]; - unsigned int uiRnVal = g_Registers[Instr.Rn]; - if ((Instr.Rm = 0x0f)) uiRmValue += 8; - - - unsigned int uiOperand = Shift_Operand(uiRmValue, uiRsValue, Instr.shift); - - // Check if destination is PC - if (Instr.Rd != 0x0f) return uiPC + 4; - if ((Instr.Rn = 0x0f)) uiRnVal += 8; - - // Check what opcode it is! - switch (Instr.opcode) { - case OPCODE_MOV: - return uiOperand; - case OPCODE_MVN: - return ~uiOperand; - case OPCODE_ADD: - return uiRnVal + uiOperand; - case OPCODE_ADC: - return uiRnVal + uiOperand + (((g_Registers[18] & (1 << 29))) == 0?0:1); - case OPCODE_SUB: - return uiRnVal - uiOperand; - case OPCODE_SBC: - return uiRnVal - uiOperand - (((g_Registers[18] & (1 << 29))) == 0?1:0); - case OPCODE_RSB: - return uiOperand - uiRnVal; - case OPCODE_RSC: - return uiOperand - uiRnVal - (((g_Registers[18] & (1 << 29))) == 0?1:0); - case OPCODE_AND: - return (uiRnVal & uiOperand); - case OPCODE_EOR: - return (uiRnVal^uiOperand); - case OPCODE_ORR: - return (uiRnVal | uiOperand); - case OPCODE_BIC: - return (uiRnVal & ~uiOperand); - default: - return 0; - } - -} - -/////////////////////////////////////////////////////////////// -// -// dpi; // Data processing immediate -// example add r0, r1, (ror , ) -unsigned int DecodeDPI(dpi Instr, unsigned int uiPC) -{ - unsigned int uiOperand = (ROR(Instr.immed, Instr.rotate << 1)); - unsigned int uiRnVal = g_Registers[Instr.Rn]; - - // Check if PC is destination - if (Instr.Rd != 0x0f) return uiPC + 4; // Next instruction - if ((Instr.Rn = 0x0f)) uiRnVal += 8; - - // Check what opcode it is! - switch ((Instr.opcode)) { - case OPCODE_MOV: - return uiOperand; - case OPCODE_MVN: - return ~uiOperand; - case OPCODE_ADD: - return uiRnVal + uiOperand; - case OPCODE_ADC: - return uiRnVal + uiOperand + (((g_Registers[18] & (1 << 29))) == 0?0:1); - case OPCODE_SUB: - return uiRnVal - uiOperand; - case OPCODE_SBC: - return uiRnVal - uiOperand - (((g_Registers[18] & (1 << 29))) == 0?1:0); - case OPCODE_RSB: - return uiOperand - uiRnVal; - case OPCODE_RSC: - return uiOperand - uiRnVal - (((g_Registers[18] & (1 << 29))) == 0?1:0); - case OPCODE_AND: - return (uiRnVal & uiOperand); - case OPCODE_EOR: - return (uiRnVal^uiOperand); - case OPCODE_ORR: - return (uiRnVal | uiOperand); - case OPCODE_BIC: - return (uiRnVal & ~uiOperand); - default: - return 0; - } - -} - -/////////////////////////////////////////////////////////////// -// -// lsio; // Load/store immediate offset -// Example ldr Rd, [Rn, #] -unsigned int DecodeLSIO(lsio Instr, unsigned int uiPC) -{ - unsigned int uiRnValue = g_Registers[Instr.Rn]; - unsigned int uiMemValue; - - // Check if destination is PC - if (Instr.Rd != 0x0f) return uiPC + 4; - // Check if it's a LDR instruction - if (Instr.L != 1) return uiPC + 4; - - if (Instr.Rn == 0x0f) uiRnValue += 8; - - // Check if it's pre-indexed - if (Instr.p == 1){ - - if (Instr.U == 1) { - // Add offset - uiRnValue += Instr.immed; - } else { - // Sub offset - uiRnValue -= Instr.immed; - } - } - - uiMemValue = *(unsigned int *)(uiRnValue); - - return uiMemValue; - -} - -/////////////////////////////////////////////////////////////// -// -// lsro; // Load/Store register offset -// Example ldr Rd, [Rn + Rm lsl 5] -unsigned int DecodeLSRO(lsro Instr, unsigned int uiPC) -{ - unsigned int uiRnValue = g_Registers[Instr.Rn]; - unsigned int uiRmValue = g_Registers[Instr.Rm]; - unsigned int uiIndex; - unsigned int uiMemValue; - - if (Instr.Rm == 0x0f) uiRmValue += 8; - if (Instr.Rn == 0x0f) uiRnValue += 8; - - // Check if destination is PC and that it's LDR instruction - if ((Instr.Rd != 0x0f) || (Instr.L != 1)) return uiPC + 4; - - uiIndex = Shift_Operand(Instr.Rm, Instr.amount, Instr.shift); - - if (Instr.p == 1){ - - if (Instr.U == 1) { - // Add offset - uiRnValue += uiIndex; - } else { - // Sub offset - uiRnValue -= uiIndex; - } - } - - uiMemValue = *(unsigned int *)(uiRnValue); - - return uiMemValue; - - -} -/////////////////////////////////////////////////////////////// -// -// lsm; // Load store multiple -// Example: ldm r0, {r1, r2, r3} -unsigned int DecodeLSM(lsm Instr, unsigned int uiPC) -{ - unsigned int uiRnValue = g_Registers[Instr.Rn]; - unsigned int uiOffsetToPC = 0; - unsigned int uiMemValue; - - // Make sure PC is destination and it's Load instruction - if (((Instr.regs & (1 << 15)) == 0) || (Instr.L != 1)) return uiPC + 4; - - - // Check if U bit it set - if (Instr.U == 0) { - // This means that it's ascending - // Also means that the PC is closest to Rn - if (Instr.p == 1) { - // Pre decrement. - uiOffsetToPC -= 4; - } else { - uiOffsetToPC = 0; - } - } else { - // The stack is descending, that means that the PC is as far away as possible. - // Lets find out how many registers before it. - for (int i = 0; i < 15; i++) { - if ((Instr.regs & (1 << i)) != 0) uiOffsetToPC += 4; - } - - // If the P bit is set, it uses pre increment - if (Instr.p == 1) uiOffsetToPC += 4; - } - - // read from out calculated address. - uiMemValue = *(unsigned int *)((uiRnValue + uiOffsetToPC) & ~0x03); - - return uiMemValue; - -} - -/////////////////////////////////////////////////////////////// -// -// bl; // Branch with link(optional) -unsigned int DecodeBL(bl Instr, unsigned int uiPC) -{ - //Printf("Decode BL"); - unsigned int uiAddress; - - uiAddress = Instr.offset; - if (uiAddress & 0x00800000) { - uiAddress |= 0xff000000; - } - - uiAddress <<= 2; - uiAddress += 8; - - return uiPC + uiAddress; - -} diff --git a/backends/platform/gp32/fontdata.c b/backends/platform/gp32/fontdata.c deleted file mode 100644 index 56f778ce2c..0000000000 --- a/backends/platform/gp32/fontdata.c +++ /dev/null @@ -1,284 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -const unsigned char fontresEng1[] = -{ - 0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7E,0x81,0xA5,0x81,0x81,0xBD,0x81,0x7E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7E,0xFF,0xDB,0xFF,0xFF,0xC3,0xFF,0x7E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x36,0x7F,0x7F,0x7F,0x7F,0x3E,0x1C,0x08,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x08,0x1C,0x3E,0x7F,0x3E,0x1C,0x08,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x3C,0x3C,0x7E,0x66,0x7E,0x18,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x3C,0x3C,0x7E,0x7E,0x3C,0x18,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x18,0x3C,0x3C,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0xFF,0xFF,0xFF,0xFF,0xE7,0xC3,0xC3,0xE7,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x3C,0x66,0x42,0x42,0x66,0x3C,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0xFF,0xFF,0xFF,0xC3,0x99,0xBD,0xBD,0x99,0xC3,0xFF,0xFF,0xFF,0x00,0x00,0x00, - 0x00,0x00,0x00,0x0F,0x07,0x0D,0x19,0x3C,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x66,0x3C,0x18,0x7E,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x33,0x3C,0x33,0x30,0x70,0xF0,0x70,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7F,0x63,0x7F,0x63,0x63,0x67,0xE7,0xE6,0xC0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x18,0xDB,0x3C,0xE7,0x3C,0xDB,0x18,0x18,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x40,0x60,0x70,0x7C,0x7F,0x7C,0x70,0x60,0x40,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x01,0x03,0x07,0x1F,0x7F,0x1F,0x07,0x03,0x01,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x7E,0x3C,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x33,0x33,0x33,0x33,0x33,0x00,0x33,0x33,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7F,0xDB,0xDB,0xDB,0x7B,0x1B,0x1B,0x1B,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x3E,0x63,0x30,0x1C,0x36,0x63,0x63,0x36,0x1C,0x06,0x63,0x3E,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x7F,0x7F,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x7E,0x3C,0x18,0x7E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x3C,0x7E,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x7E,0x3C,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x0C,0x06,0x7F,0x06,0x0C,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x18,0x30,0x7F,0x30,0x18,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x60,0x60,0x7F,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x24,0x66,0xFF,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x08,0x1C,0x1C,0x3E,0x3E,0x7F,0x7F,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x7F,0x7F,0x3E,0x3E,0x1C,0x1C,0x08,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x18,0x3C,0x3C,0x3C,0x18,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x66,0x66,0x66,0x24,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x36,0x36,0x7F,0x36,0x36,0x7F,0x36,0x36,0x00,0x00,0x00,0x00,0x00, - 0x00,0x18,0x18,0x3C,0x66,0x60,0x3C,0x06,0x06,0x66,0x3C,0x18,0x18,0x00,0x00,0x00, - 0x00,0x00,0x00,0x61,0x63,0x06,0x0C,0x18,0x30,0x63,0x43,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x1C,0x36,0x36,0x1C,0x3B,0x6E,0x66,0x3B,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x30,0x30,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x0C,0x18,0x30,0x30,0x30,0x30,0x18,0x0C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x0C,0x06,0x06,0x06,0x06,0x0C,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x66,0x3C,0xFF,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x18,0x18,0x18,0xFF,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x18,0x30,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x01,0x03,0x06,0x0C,0x18,0x30,0x60,0x40,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x66,0x6E,0x76,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x38,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x66,0x06,0x0C,0x18,0x30,0x7E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x06,0x1C,0x06,0x06,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x0C,0x1C,0x3C,0x6C,0x6C,0x7E,0x0C,0x0C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7E,0x60,0x60,0x7C,0x06,0x06,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x60,0x60,0x7C,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7E,0x06,0x06,0x0C,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x66,0x3C,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x3E,0x06,0x06,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x18,0x18,0x30,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x06,0x0C,0x18,0x30,0x30,0x18,0x0C,0x06,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x60,0x30,0x18,0x0C,0x0C,0x18,0x30,0x60,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x06,0x0C,0x18,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x66,0x6E,0x6E,0x6E,0x60,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x3C,0x66,0x66,0x7E,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7C,0x66,0x66,0x7C,0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x60,0x60,0x60,0x60,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7C,0x66,0x66,0x66,0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7E,0x60,0x60,0x7C,0x60,0x60,0x60,0x7E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7E,0x60,0x60,0x7C,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x60,0x60,0x6E,0x66,0x66,0x3E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x66,0x66,0x66,0x7E,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x66,0x6C,0x78,0x70,0x78,0x6C,0x66,0x66,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x60,0x60,0x60,0x60,0x60,0x60,0x60,0x7E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x63,0x77,0x7F,0x6B,0x6B,0x63,0x63,0x63,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x66,0x66,0x76,0x7E,0x6E,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7C,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x66,0x66,0x3C,0x04,0x06,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7C,0x66,0x66,0x7C,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x60,0x3C,0x06,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7E,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x3C,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x63,0x63,0x63,0x63,0x6B,0x7F,0x77,0x63,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x66,0x66,0x3C,0x18,0x3C,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x66,0x66,0x66,0x3C,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7E,0x06,0x0C,0x18,0x30,0x60,0x60,0x7E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x30,0x30,0x30,0x30,0x30,0x30,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x40,0x60,0x30,0x18,0x0C,0x06,0x03,0x01,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x18,0x3C,0x66,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00, - 0x00,0x00,0x18,0x18,0x0C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x3C,0x06,0x3E,0x66,0x66,0x3E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x60,0x60,0x7C,0x66,0x66,0x66,0x66,0x7C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x60,0x60,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x06,0x06,0x3E,0x66,0x66,0x66,0x66,0x3E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x7E,0x60,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3C,0x66,0x60,0x78,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x3E,0x06,0x66,0x3C,0x00,0x00,0x00, - 0x00,0x00,0x00,0x60,0x60,0x7C,0x66,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x06,0x00,0x06,0x06,0x06,0x06,0x06,0x66,0x66,0x3C,0x00,0x00,0x00, - 0x00,0x00,0x00,0x60,0x60,0x66,0x6C,0x78,0x6C,0x66,0x66,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x77,0x7F,0x6B,0x6B,0x6B,0x6B,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x6C,0x7E,0x66,0x66,0x66,0x66,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x7C,0x66,0x66,0x66,0x7C,0x60,0x60,0x60,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x3E,0x66,0x66,0x66,0x3E,0x06,0x06,0x06,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x6E,0x78,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x38,0x0C,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x30,0x30,0x7C,0x30,0x30,0x30,0x36,0x1C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x3C,0x18,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x63,0x63,0x63,0x6B,0x7F,0x36,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x66,0x3C,0x18,0x18,0x3C,0x66,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x3E,0x06,0x66,0x3C,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x7E,0x0C,0x18,0x30,0x60,0x7E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x0E,0x18,0x18,0x18,0x70,0x18,0x18,0x18,0x0E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x18,0x18,0x18,0x00,0x18,0x18,0x18,0x18,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x70,0x18,0x18,0x18,0x0E,0x18,0x18,0x18,0x70,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3B,0x6E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x08,0x1C,0x36,0x63,0x63,0x7F,0x00,0x00,0x00,0x00,0x00, - 0x00,0x3C,0x66,0xC2,0xC0,0xC2,0x66,0x3C,0x18,0x0E,0x0C,0x78,0x00,0x00,0x00,0x00, - 0x00,0x00,0x66,0x00,0x00,0x66,0x66,0x66,0x66,0x66,0x66,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x06,0x0C,0x18,0x00,0x3E,0x63,0x7F,0x60,0x63,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x08,0x1C,0x36,0x00,0x3C,0x06,0x3E,0x66,0x66,0x3B,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x66,0x66,0x00,0x3C,0x06,0x3E,0x66,0x66,0x3B,0x00,0x00,0x00,0x00, - 0x00,0x00,0x30,0x18,0x0C,0x00,0x3C,0x06,0x3E,0x66,0x66,0x3B,0x00,0x00,0x00,0x00, - 0x00,0x00,0x1C,0x36,0x1C,0x00,0x3C,0x06,0x3E,0x66,0x66,0x3B,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x3C,0x66,0x60,0x66,0x3C,0x0C,0x06,0x3C,0x00,0x00,0x00, - 0x00,0x00,0x08,0x1C,0x36,0x00,0x3E,0x63,0x7F,0x60,0x63,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x66,0x66,0x00,0x3E,0x63,0x7F,0x60,0x63,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x30,0x18,0x0C,0x00,0x3E,0x63,0x7F,0x60,0x63,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x66,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00, - 0x00,0x00,0x18,0x3C,0x66,0x00,0x38,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00, - 0x00,0x00,0x60,0x30,0x18,0x00,0x38,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00, - 0x00,0x00,0x63,0x63,0x08,0x1C,0x36,0x63,0x63,0x7F,0x63,0x63,0x00,0x00,0x00,0x00, - 0x00,0x1C,0x36,0x1C,0x00,0x1C,0x36,0x63,0x63,0x7F,0x63,0x63,0x00,0x00,0x00,0x00, - 0x00,0x0C,0x18,0x30,0x00,0x7F,0x33,0x30,0x3E,0x30,0x33,0x7F,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x6E,0x3B,0x1B,0x7E,0xD8,0xDC,0x77,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x1F,0x36,0x66,0x66,0x7F,0x66,0x66,0x66,0x67,0x00,0x00,0x00,0x00, - 0x00,0x00,0x08,0x1C,0x36,0x00,0x3E,0x63,0x63,0x63,0x63,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x63,0x63,0x00,0x3E,0x63,0x63,0x63,0x63,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x30,0x18,0x0C,0x00,0x3E,0x63,0x63,0x63,0x63,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x18,0x3C,0x66,0x00,0x66,0x66,0x66,0x66,0x66,0x3B,0x00,0x00,0x00,0x00, - 0x00,0x00,0x30,0x18,0x0C,0x00,0x66,0x66,0x66,0x66,0x66,0x3B,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x63,0x63,0x00,0x63,0x63,0x63,0x63,0x3F,0x03,0x06,0x3C,0x00,0x00, - 0x00,0x00,0x63,0x63,0x1C,0x36,0x63,0x63,0x63,0x63,0x36,0x1C,0x00,0x00,0x00,0x00, - 0x00,0x00,0x63,0x63,0x00,0x63,0x63,0x63,0x63,0x63,0x63,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x18,0x18,0x7E,0xC3,0xC0,0xC0,0xC3,0x7E,0x18,0x18,0x00,0x00,0x00,0x00, - 0x00,0x00,0x1C,0x36,0x32,0x30,0x78,0x30,0x30,0x30,0x73,0x7E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0xC3,0x66,0x3C,0x18,0xFF,0x18,0xFF,0x18,0x18,0x00,0x00,0x00,0x00, - 0x00,0x00,0xFC,0x66,0x66,0x7C,0x62,0x66,0x6F,0x66,0x66,0xF3,0x00,0x00,0x00,0x00, - 0x00,0x00,0x0E,0x1B,0x18,0x18,0x18,0x7E,0x18,0x18,0x18,0x18,0xD8,0x70,0x00,0x00, - 0x00,0x00,0x0C,0x18,0x30,0x00,0x3C,0x06,0x3E,0x66,0x66,0x3B,0x00,0x00,0x00,0x00, - 0x00,0x00,0x0C,0x18,0x30,0x00,0x38,0x18,0x18,0x18,0x18,0x3C,0x00,0x00,0x00,0x00, - 0x00,0x00,0x0C,0x18,0x30,0x00,0x3E,0x63,0x63,0x63,0x63,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x0C,0x18,0x30,0x00,0x66,0x66,0x66,0x66,0x66,0x3B,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x3B,0x6E,0x00,0x6E,0x33,0x33,0x33,0x33,0x33,0x00,0x00,0x00,0x00, - 0x00,0x3B,0x6E,0x00,0x63,0x73,0x7B,0x7F,0x6F,0x67,0x63,0x63,0x00,0x00,0x00,0x00, - 0x00,0x00,0x3C,0x6C,0x6C,0x3E,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x38,0x6C,0x6C,0x38,0x00,0x7C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x30,0x63,0x63,0x3E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x03,0x03,0x03,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x60,0xE0,0x63,0x66,0x6C,0x18,0x30,0x6E,0xC3,0x06,0x0C,0x1F,0x00,0x00, - 0x00,0x00,0x60,0xE0,0x63,0x66,0x6C,0x18,0x33,0x67,0xCF,0x1F,0x03,0x03,0x00,0x00, - 0x00,0x00,0x00,0x18,0x18,0x00,0x18,0x18,0x3C,0x3C,0x3C,0x18,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x1B,0x36,0x6C,0x36,0x1B,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x6C,0x36,0x1B,0x36,0x6C,0x00,0x00,0x00,0x00,0x00,0x00, - 0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11,0x44,0x11, - 0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55,0xAA,0x55, - 0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD,0x77,0xDD, - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x36,0x36,0x36,0x36,0x36,0x36,0xF6,0x06,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x06,0xF6,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36,0x36,0x36,0xF6,0x06,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36,0x36,0x36,0xF7,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xF7,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36,0x36,0x36,0x37,0x30,0x37,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x36,0x36,0x36,0x36,0x36,0x36,0xF7,0x00,0xF7,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x18,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x18,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0xFF,0x36,0x36,0x36,0x36,0x36,0x36,0x36, - 0x18,0x18,0x18,0x18,0x18,0x18,0xFF,0x18,0xFF,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, - 0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0,0xF0, - 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F, - 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x3B,0x6E,0x6C,0x6C,0x6E,0x3B,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x3E,0x63,0x7E,0x63,0x63,0x7E,0x60,0x60,0x20,0x00,0x00, - 0x00,0x00,0x00,0x7F,0x63,0x63,0x60,0x60,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x7F,0x36,0x36,0x36,0x36,0x36,0x36,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7F,0x63,0x30,0x18,0x0C,0x18,0x30,0x63,0x7F,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0x6C,0x6C,0x6C,0x6C,0x38,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x33,0x33,0x33,0x33,0x3E,0x30,0x30,0x60,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x3F,0x6C,0x0C,0x0C,0x0C,0x0C,0x0C,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x7E,0x18,0x3C,0x66,0x66,0x66,0x3C,0x18,0x7E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x1C,0x36,0x63,0x63,0x7F,0x63,0x63,0x36,0x1C,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x1C,0x36,0x63,0x63,0x63,0x36,0x36,0x36,0x77,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x1E,0x30,0x18,0x0C,0x3E,0x66,0x66,0x66,0x3C,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0xDB,0xDB,0x7E,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x03,0x06,0x7E,0xDB,0xDB,0xF3,0x7E,0x60,0xC0,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x1C,0x30,0x60,0x60,0x7C,0x60,0x60,0x30,0x1C,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x3E,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x7F,0x00,0x00,0x7F,0x00,0x00,0x7F,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x18,0x18,0xFF,0x18,0x18,0x18,0x00,0xFF,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x30,0x18,0x0C,0x06,0x0C,0x18,0x30,0x00,0x7E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x0C,0x18,0x30,0x60,0x30,0x18,0x0C,0x00,0x7E,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x0E,0x1B,0x1B,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x00, - 0x00,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0xD8,0xD8,0x70,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x18,0x18,0x00,0x00,0xFF,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x3B,0x6E,0x00,0x3B,0x6E,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x38,0x6C,0x6C,0x38,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x0F,0x0C,0x0C,0x0C,0x0C,0x0C,0xEC,0x6C,0x3C,0x1C,0x00,0x00,0x00,0x00, - 0x00,0x00,0xD8,0x6C,0x6C,0x6C,0x6C,0x6C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x70,0xD8,0x30,0x60,0xC8,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x3E,0x3E,0x3E,0x3E,0x3E,0x3E,0x00,0x00,0x00,0x00,0x00, - 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, -}; diff --git a/backends/platform/gp32/gfx_splash.h b/backends/platform/gp32/gfx_splash.h deleted file mode 100644 index 6e1081ca6e..0000000000 --- a/backends/platform/gp32/gfx_splash.h +++ /dev/null @@ -1,4870 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -///////////////////////////////////////// -// -// Header file for GP32 -// -// convertion of gfx_splash.bmp file : -// Width = 320 -// Heigth = 240 -// GP32 Mode = 8 Bits per Pixel -// -// with GP32Converter coded by Edorul : -// http://www.ifrance.com/edorul/ -// edorul@free.fr -// -///////////////////////////////////////// - -#define gfx_splash_width 320 -#define gfx_splash_height 240 - -#define gfx_splash_palnb 256 - -#include - -GP_PALETTEENTRY gfx_splash_Pal[256] = { - 0x843, 0x88B, 0x1941, 0x110D, 0x2883, 0x30C9, 0x2945, 0x2109, 0x214D, 0x2989, 0x218F, 0x3149, 0x394D, 0x3989, 0x318D, 0x8D1, - 0x1153, 0x9D9, 0x2993, 0x29DB, 0x1A01, 0x3243, 0x3A4B, 0x3B01, 0x1A15, 0x125B, 0x3255, 0x329B, 0x3B17, 0x331D, 0x40C3, 0x4145, - 0x498B, 0x6987, 0x61C9, 0x49D1, 0x4285, 0x524D, 0x4B43, 0x530D, 0x6207, 0x624D, 0x6307, 0x6B4B, 0x4211, 0x4A55, 0x4A93, 0x4297, - 0x5251, 0x5255, 0x5293, 0x5295, 0x4ADB, 0x5313, 0x535D, 0x6AD3, 0x62D9, 0x7355, 0x6319, 0x6B5D, 0x6B9B, 0x639F, 0x7359, 0x735D, - 0x739B, 0x7B9F, 0x32E1, 0x3B63, 0x4AA3, 0x52E9, 0x4BA3, 0x53A9, 0x6BE3, 0x6BA9, 0x7BF1, 0x7C4D, 0x5C1F, 0x7417, 0x741B, 0x5C25, - 0x54AB, 0x552F, 0x6C65, 0x6CAB, 0x7D27, 0x752D, 0x54F1, 0x5D35, 0x5D79, 0x6CF1, 0x6D75, 0x6DB9, 0x7E35, 0x763B, 0x89CF, 0xB085, - 0xA909, 0xA98D, 0xB14B, 0xB1CF, 0x8207, 0x834F, 0x8A53, 0x8AD3, 0x8A95, 0x9253, 0x9295, 0x8395, 0x8359, 0x835D, 0x83D9, 0x83DD, - 0x9359, 0x93D9, 0x93DD, 0xAA11, 0xA2D7, 0xB253, 0xBA95, 0xA393, 0xAB19, 0xABDB, 0xA3DF, 0xB319, 0xB3DF, 0xC001, 0xC8C7, 0xD843, - 0xD885, 0xC909, 0xC18D, 0xD14B, 0xD9CF, 0xE001, 0xE8C7, 0xF801, 0xF885, 0xF14B, 0xD295, 0xCB19, 0xC39D, 0xDB19, 0xD3DF, 0xF295, - 0xE319, 0xEB9D, 0xF35B, 0xFBDF, 0x83E1, 0x8C4D, 0x8C15, 0x945D, 0x9D53, 0x951F, 0xAC57, 0xAC9D, 0xA595, 0xB55D, 0xD517, 0xCD5B, - 0xE59B, 0xD65B, 0xE69B, 0x8421, 0x8C65, 0x8CA3, 0x84E7, 0x9461, 0x9465, 0x9CA1, 0x94A5, 0x8CAB, 0x9D25, 0x8D6D, 0xA463, 0xA4E1, - 0xA4E5, 0xB421, 0xB4E1, 0xB4A5, 0xA4E9, 0xAD65, 0xA529, 0xAD6D, 0xADAB, 0xADAD, 0xB56B, 0xB56D, 0xB5AB, 0xB5AD, 0x94F3, 0x8DB3, - 0x8DF9, 0xADB5, 0xA5F9, 0x9E27, 0x962D, 0xB665, 0xB62D, 0xBF25, 0xB729, 0x9675, 0x8EBD, 0x9F37, 0x9F3D, 0xA675, 0xAEB9, 0xAF37, - 0xAF7D, 0xCC63, 0xC4E7, 0xD463, 0xD4E7, 0xC5A5, 0xC569, 0xC5E9, 0xC5ED, 0xD529, 0xDD6D, 0xD5E9, 0xD5EF, 0xF463, 0xE5E1, 0xEDAD, - 0xD5F1, 0xCE67, 0xCE2D, 0xCF65, 0xCF6B, 0xE623, 0xE6AB, 0xEFE5, 0xEF2F, 0xC631, 0xCE75, 0xCEB3, 0xCEB7, 0xDE31, 0xD675, 0xD6B3, - 0xDEB7, 0xD6F9, 0xDF35, 0xCFBD, 0xEEB3, 0xE6F9, 0xEF77, 0xE739, 0xEF7D, 0xEFBB, 0xEFFF, 0xFF79, 0xFFB9, 0xFFFF, 0x1, 0x1 - -}; - -unsigned char gfx_splash[76800] = { - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xE, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF6, 0x4E, 0xBC, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x33, 0xE, - 0xFD, 0xF9, 0x3A, 0xE, 0x33, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, - 0xF7, 0xF7, 0xF8, 0x99, 0x2, 0x15, 0x39, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF7, - 0xFD, 0x94, 0xE, 0xE, 0xE, 0x3A, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, - 0xE9, 0xE9, 0xEF, 0x99, 0x14, 0x17, 0x15, 0x99, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF0, - 0xE9, 0xE, 0xE, 0xB7, 0xF7, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, - 0xE9, 0xB8, 0xAC, 0x24, 0x15, 0x14, 0x17, 0x27, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF9, 0xF9, - 0xF0, 0x97, 0x27, 0x4D, 0xC6, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x3F, 0xE, - 0xE, 0xE, 0x3A, 0xFD, 0xF0, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF5, 0xE9, - 0xB8, 0x27, 0x15, 0x2, 0x2, 0x2, 0x17, 0x24, 0x35, 0xF9, 0xFD, 0xFD, 0xF8, 0xF0, 0xF0, 0xD8, - 0x2C, 0x0, 0x6, 0x2, 0x2, 0x16, 0x4D, 0xBC, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0x3A, - 0xE, 0x33, 0xF5, 0xFD, 0xE, 0x38, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xE9, 0xBD, - 0xAC, 0x15, 0x2, 0x15, 0x17, 0x15, 0x17, 0x26, 0x16, 0xF2, 0xFD, 0xF8, 0xF0, 0xE9, 0xBD, 0x4D, - 0x2, 0x14, 0x14, 0x14, 0x2, 0x2, 0x2, 0x2, 0x39, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xEA, 0xBD, 0xBD, - 0xAC, 0x24, 0x17, 0x17, 0x15, 0x26, 0x26, 0x26, 0x24, 0xF2, 0xF9, 0xF0, 0xE9, 0xBD, 0xB6, 0x16, - 0x24, 0x24, 0x15, 0x15, 0x15, 0x17, 0x24, 0x14, 0x2, 0x39, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, - 0xAC, 0x27, 0x17, 0x15, 0x15, 0x26, 0x26, 0x26, 0x24, 0xEB, 0xF7, 0xEE, 0xBD, 0xBD, 0xB6, 0x27, - 0x26, 0x26, 0x17, 0x15, 0x15, 0x24, 0x15, 0x14, 0x15, 0x2, 0x4E, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xB6, - 0x27, 0x24, 0x15, 0x15, 0x2, 0x24, 0x26, 0x26, 0x26, 0x27, 0xC6, 0xEE, 0xBD, 0xBD, 0xB8, 0x35, - 0x26, 0x26, 0x15, 0x14, 0x15, 0x15, 0x15, 0x2, 0x14, 0x17, 0x24, 0xB5, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x31, 0xA3, - 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xE9, 0xBD, 0xB6, - 0x27, 0x15, 0x15, 0x2, 0x2, 0x2, 0x14, 0x15, 0x17, 0x26, 0x27, 0xC6, 0xD8, 0xBD, 0xBD, 0x4D, - 0x15, 0x17, 0x17, 0x16, 0x35, 0x16, 0x14, 0x14, 0x15, 0x17, 0x15, 0x24, 0xB8, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xE, - 0xE, 0xE, 0x2C, 0x41, 0xB6, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xE9, 0xBD, 0xBD, - 0xAC, 0x27, 0x26, 0x2, 0x2, 0x0, 0x2, 0x26, 0x17, 0x26, 0x15, 0x4D, 0xD8, 0xBD, 0xBD, 0xAC, - 0x6, 0x15, 0x17, 0x27, 0xB6, 0xAA, 0x39, 0x6, 0x14, 0x17, 0x26, 0x26, 0x27, 0xEF, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB6, - 0x41, 0x2C, 0xE, 0xE, 0xE, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xF0, 0xE9, 0xBD, - 0xB8, 0xB5, 0x4E, 0x6, 0x15, 0x14, 0x2, 0x14, 0x26, 0x26, 0x17, 0x15, 0x4D, 0xAC, 0xBC, 0x39, - 0x2, 0x14, 0x17, 0x24, 0xB5, 0xBD, 0xB7, 0x40, 0x6, 0x24, 0x26, 0x26, 0x24, 0xAC, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF7, 0xBB, 0xA3, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF0, 0xE9, - 0xBD, 0xBD, 0xB8, 0x27, 0x17, 0x15, 0x14, 0x14, 0x15, 0x26, 0x26, 0x15, 0x2, 0x6, 0x27, 0x6, - 0x2, 0x2, 0x17, 0x24, 0xB5, 0xBD, 0xBD, 0xB6, 0x16, 0x15, 0x26, 0x17, 0x17, 0x4E, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF0, - 0xD8, 0xBD, 0xBD, 0x4E, 0x15, 0x17, 0x14, 0x14, 0x14, 0x17, 0x26, 0x17, 0x15, 0x14, 0x2, 0x2, - 0x2, 0x2, 0x15, 0x15, 0x4E, 0xBD, 0xBD, 0xBD, 0x6F, 0x15, 0x24, 0x14, 0x2, 0x27, 0xF6, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xA3, - 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, - 0xE9, 0xBD, 0xBD, 0xB6, 0x16, 0x14, 0x14, 0x14, 0x14, 0x15, 0x24, 0x26, 0x26, 0x24, 0x15, 0x15, - 0x15, 0x15, 0x15, 0x15, 0x39, 0xE9, 0xBD, 0xBD, 0xB4, 0x16, 0x24, 0x14, 0x2, 0x2, 0x35, 0xF9, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xE, - 0xE, 0xA3, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, - 0xEE, 0xBD, 0xBD, 0xBD, 0x4E, 0x2, 0x14, 0x15, 0x15, 0x15, 0x15, 0x17, 0x15, 0x14, 0x15, 0x17, - 0x17, 0x17, 0x17, 0x17, 0x39, 0xE9, 0xBD, 0xBD, 0xA9, 0x16, 0x17, 0x15, 0x15, 0x2, 0x6, 0xB8, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0x41, - 0xE, 0xE, 0xE, 0xA3, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF5, 0xE9, 0xBD, 0xBD, 0xB6, 0x25, 0x15, 0x15, 0x15, 0x15, 0x15, 0x14, 0x2, 0x2, 0x2, 0x15, - 0x15, 0x17, 0x17, 0x15, 0x4E, 0xE9, 0xBD, 0xBD, 0x39, 0x2, 0x17, 0x17, 0x17, 0x15, 0x15, 0x4E, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xE, 0xAA, 0x2C, 0xE, 0xE, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF8, 0xEE, 0xD8, 0xBD, 0xBD, 0xA5, 0x15, 0x15, 0x14, 0x14, 0x17, 0x15, 0x14, 0x14, 0x2, 0x2, - 0x2, 0x14, 0x15, 0x16, 0xBC, 0xE9, 0xAC, 0x4E, 0x27, 0x2, 0x14, 0x17, 0x26, 0x15, 0x15, 0x4E, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xE, 0xE9, 0xBD, 0x38, 0xE, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xB8, 0x4E, 0x6, 0x2, 0x14, 0x15, 0x15, 0x15, 0x14, 0x14, 0x2, - 0x2, 0x2, 0x14, 0x35, 0xD8, 0xA5, 0x16, 0x2, 0x2, 0x2, 0x14, 0x15, 0x15, 0x14, 0x2, 0x40, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xE, - 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF9, 0xF5, 0xE9, 0xBD, 0xBD, 0xB7, 0x4E, 0x9, 0x15, 0x14, 0x2, 0x0, 0x2, 0x2, 0x2, - 0x2, 0x15, 0x16, 0xB6, 0xB8, 0x27, 0x14, 0x17, 0x2, 0x14, 0x14, 0x15, 0x15, 0x15, 0x15, 0x27, - 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0x2C, - 0x33, 0x3A, 0x41, 0xA8, 0xAA, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF9, 0xF5, 0xEA, 0xD8, 0xBD, 0xB7, 0xAA, 0x35, 0x6, 0x2, 0x14, 0x14, 0x14, 0x15, - 0x15, 0x16, 0xA5, 0xB6, 0x2E, 0x6, 0x14, 0x17, 0x17, 0x15, 0x17, 0x17, 0x26, 0x26, 0x17, 0x27, - 0xF2, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF9, 0xF7, 0xF0, 0xE9, 0xD8, 0xBD, 0xBD, 0xA5, 0x35, 0x16, 0x16, 0x16, 0x16, - 0x3C, 0xB8, 0xBD, 0xB4, 0x9, 0x2, 0x2, 0x15, 0x17, 0x17, 0x26, 0x24, 0x15, 0x26, 0x15, 0x24, - 0xF2, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, - 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF7, 0xF0, 0xEA, 0xE9, 0xE9, 0xE9, 0xE9, 0xEB, 0xEB, 0xEB, - 0xEA, 0xD8, 0xBD, 0xB7, 0x35, 0x16, 0x2, 0x15, 0x24, 0x24, 0x26, 0x26, 0x15, 0x15, 0x17, 0x39, - 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xE, - 0xE, 0xE, 0x2C, 0x41, 0xB6, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF8, 0xF7, 0xF7, 0xF8, 0xF9, 0xFD, 0xFD, 0xF9, - 0xF5, 0xEA, 0xD8, 0xBD, 0xB6, 0xA9, 0x16, 0x15, 0x17, 0x17, 0x26, 0x26, 0x26, 0x26, 0x24, 0xC6, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xB6, - 0x41, 0xE, 0xE, 0xE, 0xE, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF9, 0xF7, 0xEA, 0xD8, 0xBD, 0xBD, 0xA5, 0x27, 0x27, 0x27, 0x17, 0x26, 0x26, 0x15, 0x99, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF9, 0xE, 0xF7, 0xBB, 0x41, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF2, 0xF2, 0xF2, 0xF2, - 0xF2, 0xEF, 0xE9, 0xE9, 0xEE, 0xE9, 0xD8, 0xB8, 0xBC, 0xBC, 0x4D, 0x24, 0x24, 0xB5, 0xF9, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xAA, - 0x31, 0xE, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF7, 0xE9, 0x99, 0x4D, 0x16, 0x6, 0x9, 0x6, - 0x6, 0x6, 0x15, 0x27, 0x40, 0xB6, 0xD8, 0xE9, 0xEE, 0xF5, 0xF5, 0xF2, 0xF6, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xE, - 0x31, 0x3F, 0x41, 0xF8, 0xF5, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF7, 0xF0, 0xB5, 0x39, 0x16, 0x2, 0x2, 0x2, 0x2, 0x14, 0x14, - 0x14, 0x14, 0x14, 0x2, 0x2, 0x2, 0x16, 0x4D, 0xEB, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xA8, - 0xF9, 0xF0, 0xE, 0xE, 0xE, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF9, 0xF7, 0xF0, 0xE9, 0x99, 0x15, 0x2, 0x2, 0x14, 0x15, 0x26, 0x26, 0x24, 0x15, - 0x15, 0x17, 0x26, 0x17, 0x15, 0x15, 0x15, 0x2, 0x16, 0xC5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xB6, 0xE, 0x2C, 0xBD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF9, 0xF5, 0xE9, 0xBD, 0x99, 0x15, 0x2, 0x2, 0x15, 0x17, 0x26, 0x26, 0x26, 0x26, 0x15, - 0x2, 0x14, 0x24, 0x15, 0x15, 0x15, 0x17, 0x17, 0x15, 0x24, 0xB5, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF9, 0xF5, 0xE9, 0xBD, 0x99, 0x15, 0x2, 0x14, 0x15, 0x2, 0x2, 0x15, 0x24, 0x26, 0x26, 0x24, - 0x15, 0x14, 0x15, 0x15, 0x14, 0x15, 0x17, 0x15, 0x15, 0x26, 0x15, 0x4D, 0xF9, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF7, 0xE9, 0xBD, 0xB6, 0x27, 0x2, 0x15, 0x26, 0x15, 0x2, 0x2, 0x2, 0x15, 0x15, 0x17, 0x24, - 0x24, 0x24, 0x17, 0x15, 0x15, 0x17, 0x15, 0x2, 0x15, 0x26, 0x26, 0x15, 0xBC, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x31, 0xA3, - 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, - 0xEE, 0xD8, 0xBD, 0x6F, 0x2, 0x2, 0x26, 0x26, 0x15, 0x24, 0x17, 0x14, 0x15, 0x15, 0x2, 0x15, - 0x24, 0x24, 0x17, 0x15, 0x24, 0x24, 0x15, 0x14, 0x15, 0x17, 0x14, 0x14, 0x16, 0xE9, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xE, - 0xE, 0xE, 0x2C, 0x41, 0xB6, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, - 0xE9, 0xBD, 0xBD, 0x2E, 0x0, 0x14, 0x26, 0x26, 0x15, 0x26, 0x17, 0x17, 0x17, 0x17, 0x15, 0x17, - 0x26, 0x26, 0x17, 0x15, 0x24, 0x15, 0x15, 0x14, 0x15, 0x14, 0x15, 0x26, 0x15, 0x2C, 0xF9, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB6, - 0x41, 0x2C, 0xE, 0xE, 0xE, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x2C, 0x38, 0xA3, 0xB4, 0xE9, 0xE, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, - 0xD8, 0xBD, 0xB6, 0x16, 0x0, 0x2, 0x24, 0x17, 0x2, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, - 0x17, 0x17, 0x17, 0x24, 0x24, 0x15, 0x15, 0x14, 0x15, 0x15, 0x17, 0x26, 0x15, 0x9, 0xF0, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF7, 0xBB, 0xA3, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xBD, 0xB4, 0xA3, 0xE, 0x2C, 0xB6, 0xFD, 0xFD, 0xFD, 0xF8, 0xEE, - 0xBD, 0xBD, 0xAC, 0x6, 0x0, 0x0, 0x2, 0x26, 0x26, 0x26, 0x17, 0x17, 0x17, 0x15, 0x15, 0x17, - 0x2, 0x14, 0x15, 0x15, 0x14, 0x2, 0x2, 0x14, 0x14, 0x26, 0x26, 0x26, 0x24, 0x6, 0xB8, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, - 0xBD, 0xBD, 0xAC, 0x6, 0x2, 0x14, 0x2, 0x14, 0x26, 0x26, 0x17, 0x17, 0x17, 0x15, 0x14, 0x17, - 0x2, 0x40, 0xAC, 0xAC, 0x4D, 0x16, 0x2, 0x15, 0x14, 0x24, 0x26, 0x26, 0x17, 0x15, 0x2E, 0xF9, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE9, 0x2C, 0xE, 0x31, 0xAA, 0xFD, 0xF9, 0xA8, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, - 0xBD, 0xBD, 0xAC, 0x6, 0x2, 0x15, 0x14, 0x14, 0x15, 0x26, 0x26, 0x15, 0x14, 0x15, 0x39, 0x27, - 0x4E, 0xD8, 0xD8, 0xBD, 0xBD, 0xAC, 0x27, 0x2, 0x0, 0x14, 0x26, 0x17, 0x17, 0x17, 0x15, 0xBC, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x2C, 0xE9, 0xFD, 0xF0, 0x3A, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, - 0xBD, 0xBD, 0xAC, 0x6, 0x2, 0x17, 0x15, 0x14, 0x14, 0x17, 0x24, 0x14, 0x2, 0xAC, 0xF9, 0xF6, - 0xF9, 0xF7, 0xF0, 0xE9, 0xBD, 0xBD, 0xB6, 0x40, 0x2, 0x2, 0x24, 0x14, 0x15, 0x17, 0x15, 0x4E, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE, 0xF9, 0xFD, 0xFD, 0xF9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, - 0xBD, 0xBD, 0xAA, 0x6, 0x2, 0x14, 0x14, 0x14, 0x14, 0x15, 0x14, 0x24, 0x27, 0xF9, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF8, 0xF0, 0xE9, 0xBD, 0xBD, 0xAC, 0x6, 0x2, 0x24, 0x14, 0x2, 0x14, 0x14, 0x2E, - 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF9, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xAA, 0x3A, 0xF0, 0xFD, 0xE9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, - 0xBD, 0xBD, 0xAC, 0x6, 0x2, 0x2, 0x14, 0x15, 0x15, 0x15, 0x15, 0x15, 0x4E, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xA9, 0x2, 0x14, 0x17, 0x15, 0x15, 0x14, 0x2, 0x16, - 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x2C, - 0x38, 0xB4, 0xF5, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x31, 0xE, 0x2C, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, - 0xBD, 0xBD, 0xB6, 0x16, 0x2, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x2C, 0xF9, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF7, 0xE9, 0xB8, 0xB6, 0xAC, 0x27, 0x2, 0x15, 0x26, 0x17, 0x17, 0x15, 0x15, 0x39, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x3A, 0xFD, - 0xF5, 0xAA, 0x33, 0xE, 0x2C, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xEA, - 0xBD, 0xBD, 0xB8, 0x27, 0x2, 0x15, 0x15, 0x15, 0x14, 0x15, 0x15, 0x15, 0x9, 0xF0, 0xF9, 0xF8, - 0xF7, 0xF7, 0x4E, 0x6, 0x6, 0x9, 0x16, 0x2, 0x15, 0x24, 0x15, 0x17, 0x26, 0x15, 0x15, 0x99, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x2C, 0x3A, 0xA3, 0xB6, 0xE9, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, - 0xD8, 0xBD, 0xBD, 0x35, 0x2, 0x2, 0x2, 0x2, 0x2, 0x15, 0x24, 0x2, 0x9, 0xEF, 0xF7, 0xE9, - 0xB8, 0xBC, 0x4E, 0x2, 0x14, 0x15, 0x15, 0x17, 0x17, 0x15, 0x17, 0x15, 0x15, 0x14, 0x6, 0xEB, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0x2C, - 0xE, 0x31, 0xAA, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF8, 0xE9, 0xB6, 0x3C, 0xE, 0x3A, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, - 0xE9, 0xBD, 0xBD, 0xAA, 0x6, 0x2, 0x14, 0x15, 0x6, 0x15, 0x14, 0x2, 0x2, 0xBD, 0xE9, 0x2E, - 0x2, 0x6, 0x15, 0x14, 0x14, 0x2, 0x17, 0x17, 0x17, 0x15, 0x15, 0x15, 0x15, 0x15, 0x16, 0xF2, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xE9, - 0xFD, 0xF0, 0x3A, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBD, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xEA, 0xBD, 0xBD, 0xB8, 0x4E, 0x6, 0x24, 0x6, 0x14, 0x15, 0x14, 0x2, 0x2, 0x4E, 0xB6, 0x6, - 0x15, 0x15, 0x14, 0x2, 0x2, 0x14, 0x17, 0x17, 0x17, 0x17, 0x15, 0x17, 0x17, 0x15, 0x4E, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF9, - 0xFD, 0xFD, 0xF9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, - 0xF5, 0xE9, 0xBD, 0xBD, 0xB8, 0x97, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x14, 0x39, 0xB6, 0x9, - 0x2, 0x2, 0x2, 0x2, 0x6, 0x2, 0x15, 0x17, 0x17, 0x17, 0x26, 0x26, 0x24, 0x16, 0xF2, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xAA, 0x3A, - 0xF0, 0xFD, 0xE9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF9, 0xF5, 0xE9, 0xBD, 0xBD, 0xB8, 0x4E, 0x15, 0x17, 0x17, 0x17, 0x17, 0x14, 0x3C, 0xD8, 0xB6, - 0x3C, 0x35, 0x35, 0x4E, 0xAA, 0x4E, 0x2, 0x15, 0x24, 0x24, 0x26, 0x26, 0x17, 0x4D, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0x31, 0xE, 0x2C, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF9, 0xF5, 0xE9, 0xD8, 0xBD, 0xB8, 0xA5, 0x16, 0x15, 0x17, 0x15, 0x27, 0xE9, 0xF5, 0xF7, - 0xF5, 0xAC, 0x6, 0x6, 0x97, 0x4E, 0x2, 0x24, 0x15, 0x17, 0x26, 0x26, 0x15, 0xBC, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF9, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF9, 0xF7, 0xEE, 0xE9, 0xD8, 0xE9, 0xC6, 0x99, 0x4E, 0x99, 0xF2, 0xF9, 0xFD, 0xFD, - 0xF9, 0xAC, 0x2, 0x15, 0x16, 0xAA, 0x35, 0x16, 0x27, 0x27, 0x24, 0x24, 0x4D, 0xF9, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x2C, 0x2C, 0x38, 0xB4, 0xF5, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xF5, 0xF0, 0xF5, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF2, 0x35, 0x16, 0x35, 0xD8, 0xD8, 0xBC, 0xEB, 0xF2, 0xF2, 0xF2, 0xF9, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x3A, 0xFD, 0xF5, 0xAA, 0x33, 0xE, 0x2C, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF8, 0xF7, 0xEB, 0x99, 0x4E, 0x4D, 0x4D, 0x4D, 0x4E, 0xAC, 0xEF, - 0xF6, 0xF9, 0xF5, 0xEB, 0xF0, 0xF7, 0xF7, 0xF7, 0xEF, 0xC6, 0xF2, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF9, 0xF7, 0xF0, 0xC6, 0x4D, 0x6, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x2, 0x6, - 0x16, 0x4D, 0x99, 0xEB, 0xEB, 0xEF, 0xF7, 0xEF, 0x35, 0x6, 0x24, 0x27, 0x97, 0xF6, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, - 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF7, 0xF0, 0xE9, 0xB5, 0x24, 0x2, 0x14, 0x17, 0x17, 0x26, 0x26, 0x17, 0x24, 0x15, 0x2, - 0x2, 0x2, 0x2, 0x6, 0x6, 0x16, 0x4D, 0x16, 0x2, 0x14, 0x26, 0x14, 0x14, 0x27, 0xEB, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB3, 0xD6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x3A, - 0x94, 0x2C, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x94, 0x31, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF7, 0xEE, 0xE9, 0xB8, 0x27, 0x2, 0x15, 0x26, 0x15, 0x15, 0x17, 0x26, 0x26, 0x26, 0x26, 0x15, - 0x2, 0x14, 0x15, 0x15, 0x2, 0x2, 0x2, 0x2, 0x14, 0x17, 0x26, 0x17, 0x15, 0x17, 0x4D, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF7, 0xF2, 0xF5, 0xFB, 0x67, 0x1E, 0x6C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xF9, - 0xFD, 0xFD, 0xA3, 0x94, 0x41, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB7, 0x94, 0x41, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, - 0xF0, 0xD8, 0xBD, 0x97, 0x2, 0x14, 0x26, 0x26, 0x15, 0x2, 0x14, 0x15, 0x24, 0x26, 0x26, 0x24, - 0x15, 0x14, 0x15, 0x14, 0x2, 0x14, 0x14, 0x15, 0x14, 0x17, 0x26, 0x15, 0x15, 0x14, 0x97, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF2, 0xEA, 0xBD, 0xEF, 0xDC, 0x66, 0x1E, 0x4, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xF5, - 0xFD, 0xFD, 0xFD, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xB6, 0xF5, 0xF9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, - 0xE9, 0xBD, 0xB6, 0x25, 0x2, 0x14, 0x15, 0x26, 0x26, 0x14, 0x14, 0x14, 0x15, 0x15, 0x17, 0x26, - 0x2A, 0x24, 0x17, 0x14, 0x14, 0x15, 0x24, 0x14, 0x15, 0x26, 0x26, 0x17, 0x15, 0x15, 0x4D, 0xF9, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF7, 0xEB, 0xBD, 0xB6, 0xD8, 0x37, 0x4, 0x1F, 0x1E, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xAA, 0x33, - 0xE9, 0xFD, 0xBD, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0xA3, 0x31, 0xE, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, - 0xD8, 0xBD, 0xAC, 0x6, 0x2, 0x15, 0x26, 0x26, 0x26, 0x24, 0x15, 0x14, 0x15, 0x14, 0x15, 0x24, - 0x26, 0x26, 0x17, 0x15, 0x24, 0x24, 0x15, 0x14, 0x15, 0x26, 0x26, 0x26, 0x15, 0x15, 0x24, 0xF2, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF6, 0xE9, 0xB4, 0xAA, 0xB6, 0x20, 0x4, 0x29, 0x1F, 0xED, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xF0, 0xB6, - 0x20, 0x20, 0x4, 0x20, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0x31, 0xE, 0x2C, 0xD8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, - 0xBD, 0xBD, 0xAC, 0x6, 0x0, 0x24, 0x26, 0x26, 0x26, 0x15, 0x17, 0x17, 0x17, 0x15, 0x15, 0x15, - 0x26, 0x26, 0x17, 0x15, 0x24, 0x15, 0x15, 0x14, 0x15, 0x17, 0x17, 0x26, 0x14, 0x2, 0x25, 0xF9, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF4, 0xD8, 0xAA, 0x94, 0xA8, 0x30, 0x4, 0x25, 0x1E, 0xD7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xE9, 0xEA, 0xB6, - 0x4, 0x1E, 0x1F, 0x30, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE9, 0x31, 0xE, 0x31, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, - 0xBD, 0xBD, 0xAC, 0x6, 0x0, 0x2, 0x24, 0x26, 0x26, 0x26, 0x17, 0x14, 0x16, 0x39, 0x4D, 0x35, - 0x16, 0x15, 0x17, 0x24, 0x24, 0x15, 0x15, 0x14, 0x14, 0x15, 0x15, 0x17, 0x15, 0x2, 0xD, 0xF5, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF5, 0xBD, 0xA3, 0x41, 0xA3, 0x20, 0x6, 0x29, 0x4, 0xAF, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xBD, 0xB4, 0xBA, 0xA7, - 0x4, 0x1E, 0x4, 0xB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0x31, - 0xE, 0x31, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x2C, 0xBD, 0xFD, 0xE, 0xA3, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, - 0xBD, 0xBD, 0xAC, 0x6, 0x2, 0x0, 0x2, 0x26, 0x26, 0x26, 0x17, 0x4D, 0xC6, 0xD8, 0xBD, 0xBD, - 0xAC, 0x27, 0x15, 0x17, 0x17, 0x14, 0x15, 0x14, 0x14, 0x26, 0x26, 0x26, 0x24, 0x2, 0x9, 0xF0, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF0, 0xBD, 0xA4, 0x41, 0x6F, 0xD, 0x6, 0x29, 0x4, 0x97, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xF7, 0xEA, 0xB6, 0x94, 0x94, 0xA7, - 0x1F, 0x20, 0x1F, 0x20, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xBD, - 0xFD, 0xE, 0xA3, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x2C, 0xF8, 0xFD, 0xE, 0xF9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, - 0xBD, 0xBD, 0x4D, 0x2, 0x14, 0x14, 0x2, 0x14, 0x26, 0x26, 0x15, 0x99, 0xF7, 0xF0, 0xE9, 0xBD, - 0xBD, 0xB8, 0x97, 0x24, 0x24, 0x15, 0x16, 0x2E, 0x2E, 0x24, 0x26, 0x26, 0x17, 0x2, 0x4E, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF0, 0xBD, 0x94, 0x3F, 0x41, 0xD, 0x6, 0x29, 0x1F, 0x71, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFC, 0xF6, 0xF6, 0xF6, 0xF4, 0xF6, 0xF6, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFC, 0xFB, - 0xFD, 0xFD, 0xF5, 0xF7, 0xFD, 0xF6, 0xF4, 0xF6, 0xFD, 0xF2, 0xF4, 0xF6, 0xF6, 0xF4, 0xE2, 0xB5, - 0xA9, 0x6F, 0xB0, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xBD, 0xAA, 0x6F, 0x41, 0x3A, - 0x1E, 0x25, 0x20, 0xD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xF8, - 0xFD, 0xE, 0xF9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xB6, 0x3A, 0xFD, 0xE, 0xF0, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, - 0xBD, 0xBD, 0x35, 0x2, 0x17, 0x15, 0x14, 0x14, 0x15, 0x26, 0x26, 0x27, 0xF2, 0xF8, 0xF5, 0xEE, - 0xE9, 0xE9, 0xE9, 0xC6, 0xC6, 0xBC, 0xB8, 0xBD, 0xBD, 0xB8, 0x39, 0x24, 0x15, 0x4D, 0xF6, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF0, 0xBC, 0x41, 0x3C, 0x3C, 0xD, 0x4, 0x25, 0x1F, 0x71, 0xD5, 0xB5, 0xA7, 0xB0, 0xBA, 0xD8, - 0xE9, 0xE9, 0xEB, 0xD8, 0xB0, 0x40, 0x30, 0xD, 0xD, 0x20, 0x20, 0x20, 0xD, 0x20, 0xD, 0x20, - 0x20, 0x1F, 0x6, 0x6, 0x4, 0x4, 0x4, 0x4, 0xD, 0xB, 0xB, 0x40, 0xF4, 0xFD, 0xF6, 0xE0, - 0xD8, 0x6F, 0xB, 0x32, 0xD8, 0xF6, 0xF6, 0xF4, 0xE0, 0xB5, 0x72, 0x38, 0x3E, 0x25, 0x1F, 0xAF, - 0xF7, 0xF0, 0xEF, 0xF4, 0xB5, 0x1F, 0xFE, 0x0, 0x0, 0x0, 0x4, 0x4, 0x4, 0x4, 0x4, 0x0, - 0x0, 0x0, 0xFE, 0x4, 0xB0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF5, 0xF0, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xD8, 0xA3, 0x41, 0x40, 0x30, - 0x1F, 0x6B, 0x37, 0xD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x3A, - 0xFD, 0xE, 0xF0, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0xFD, 0xE, 0x2C, 0xD8, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, - 0xBD, 0xBD, 0x2E, 0x2, 0x17, 0x17, 0x15, 0x14, 0x14, 0x17, 0x26, 0x14, 0x35, 0xF2, 0xF9, 0xF8, - 0xF7, 0xF7, 0xF8, 0xF9, 0xF8, 0xF7, 0xF0, 0xE9, 0xE9, 0xF0, 0xF2, 0xBC, 0xC6, 0xF9, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xEF, 0xBC, 0xA3, 0x3C, 0x38, 0xB, 0x4, 0x25, 0x28, 0x25, 0x1F, 0x0, 0xFE, 0x0, 0x0, 0x0, - 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x6, 0x6, 0x6, 0x4, 0x6, 0x4, 0x4, - 0x5, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x25, 0x6C, 0x97, 0x37, 0x4, - 0xFE, 0x0, 0xFE, 0x0, 0x0, 0x0, 0xD, 0x6E, 0x4, 0x0, 0x0, 0x0, 0x4, 0x4, 0x0, 0x39, - 0xE2, 0xE2, 0xD7, 0x72, 0x1F, 0x4, 0x1E, 0x1F, 0x1F, 0x20, 0x1F, 0x6, 0x6, 0x20, 0x20, 0x20, - 0x1F, 0x1F, 0x25, 0xB, 0x0, 0xB, 0x20, 0x4, 0xB, 0xB, 0x5, 0x5, 0x5, 0x4, 0x4, 0x4, - 0x5, 0x0, 0xFE, 0xFE, 0x0, 0x40, 0xFD, 0xFD, 0xFD, 0x40, 0xB0, 0xBA, 0x41, 0x3A, 0x32, 0x37, - 0x37, 0x97, 0x37, 0xB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0xFD, 0xE, 0x2C, 0xD8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, - 0xBD, 0xBD, 0x32, 0x0, 0x14, 0x14, 0x14, 0x14, 0x14, 0x15, 0x24, 0x26, 0x2, 0x27, 0xC6, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF7, 0xF7, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF0, 0xBD, 0xA3, 0x3A, 0x33, 0xB, 0x6, 0x29, 0x25, 0x4, 0x0, 0x4, 0x6, 0x20, 0x20, 0x20, - 0x25, 0x20, 0x20, 0x20, 0x6, 0x6, 0xD, 0x20, 0x20, 0x25, 0x25, 0x25, 0x20, 0x25, 0x20, 0x25, - 0x25, 0x20, 0x20, 0x20, 0x20, 0x20, 0x25, 0x20, 0x20, 0x37, 0x3E, 0x30, 0x6, 0x4, 0x4, 0x20, - 0x37, 0x25, 0x20, 0x25, 0x30, 0x20, 0x6, 0x0, 0x20, 0x25, 0x20, 0x20, 0x20, 0x25, 0x22, 0x1F, - 0x25, 0x39, 0x37, 0x1F, 0x4, 0x1F, 0x29, 0x1F, 0x1F, 0x20, 0x1F, 0x1E, 0x1F, 0x20, 0x20, 0x1F, - 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0xB, 0x6, 0x20, 0x20, 0x25, 0x30, 0x25, 0x20, 0x20, 0x37, 0x6C, - 0xA7, 0x6C, 0x3E, 0x72, 0x37, 0x25, 0x6F, 0x6C, 0x39, 0x0, 0x4, 0x4, 0x0, 0x0, 0x4, 0xB, - 0xFE, 0x0, 0x0, 0x6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0xE, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xD8, - 0xBD, 0xBD, 0x4E, 0x2, 0x2, 0x2, 0x2, 0x15, 0x14, 0x15, 0x15, 0x17, 0x14, 0x2, 0x6, 0x97, - 0xF2, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF0, 0xB7, 0x94, 0x3A, 0x33, 0xB, 0x4, 0x30, 0x25, 0x4, 0x6, 0x20, 0x6, 0x4, 0x4, 0x1E, - 0x6, 0x6, 0x6, 0x6, 0x4, 0x6, 0x6, 0x4, 0x4, 0x6, 0x1F, 0x1F, 0x4, 0x1F, 0x6, 0x4, - 0x1F, 0x4, 0x6, 0xB, 0x6, 0xB, 0xB, 0x5, 0x20, 0x4, 0x4, 0xB, 0x37, 0x37, 0x1F, 0x25, - 0x25, 0x1F, 0x6, 0x1F, 0x20, 0x20, 0x20, 0x6, 0x1F, 0x1F, 0x6, 0x1F, 0x20, 0x20, 0x25, 0x1F, - 0x1E, 0x1E, 0x4, 0x1E, 0x20, 0x1F, 0x1E, 0x1E, 0x1E, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, - 0x20, 0x20, 0x20, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x20, 0x20, 0x1F, 0x4, 0x1F, 0x25, 0x29, - 0x29, 0x4, 0x1F, 0x20, 0x37, 0x29, 0x0, 0x4, 0x4, 0x20, 0x20, 0xB, 0x5, 0x4, 0x4, 0x4, - 0x0, 0x4, 0x4, 0x4, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xF5, 0xBD, 0x2C, - 0xE, 0x31, 0xBD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, - 0xBD, 0xBD, 0xB6, 0x16, 0x2, 0x15, 0x17, 0x15, 0x14, 0x15, 0x15, 0x15, 0x2, 0x2, 0x2, 0x2, - 0x16, 0x99, 0xEF, 0xF2, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xE9, 0xB7, 0xA3, 0x3A, 0x31, 0x7, 0x4, 0x25, 0x32, 0x4, 0x0, 0xD, 0x6, 0x1F, 0x1F, 0x1F, - 0x1F, 0x1F, 0x1F, 0x1F, 0x1F, 0x25, 0x25, 0x1F, 0x6, 0x1F, 0x20, 0x20, 0x1F, 0x25, 0x1F, 0x1F, - 0x1F, 0x6, 0x1F, 0x20, 0x20, 0x20, 0x20, 0xD, 0x20, 0x6, 0x1F, 0x6, 0xB, 0x20, 0x4, 0xB, - 0x20, 0x6, 0x4, 0x1F, 0x20, 0x1F, 0x1F, 0x6, 0x6, 0x1F, 0x1F, 0x1F, 0x20, 0x20, 0x1F, 0x20, - 0x1F, 0x1F, 0x22, 0x1F, 0x1E, 0x1F, 0x20, 0x20, 0x20, 0x20, 0x25, 0x29, 0x29, 0x25, 0x20, 0x25, - 0x20, 0x1F, 0x1F, 0x20, 0x1F, 0x6, 0x6, 0x6, 0x4, 0x1F, 0x4, 0x0, 0x0, 0x6, 0x6, 0x6, - 0x6, 0x1F, 0x6, 0x4, 0x1F, 0x1F, 0x1F, 0x20, 0x1F, 0x1F, 0x20, 0xB, 0x5, 0x4, 0x4, 0x4, - 0xB, 0x37, 0x30, 0x4, 0xD7, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xF0, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xE, 0xE9, - 0xFD, 0xF0, 0x3C, 0xB4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xEE, - 0xD8, 0xBD, 0xB8, 0xA5, 0x16, 0x14, 0x15, 0x15, 0x14, 0x15, 0x17, 0x15, 0x14, 0x14, 0x2, 0x2, - 0x0, 0x2, 0x2, 0x6, 0x16, 0x4E, 0xEF, 0xFD, 0xEB, 0x40, 0xC6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xE2, 0xB0, 0x40, 0x30, 0xD, 0x0, 0x2, 0x16, 0xD, 0x4, 0x4, 0x1F, 0x20, 0x1F, 0x25, 0x25, - 0x25, 0x30, 0x25, 0x25, 0x25, 0x25, 0x29, 0x29, 0x67, 0x29, 0x29, 0x29, 0x29, 0x30, 0x20, 0xB, - 0x39, 0x6B, 0x37, 0x29, 0x25, 0x37, 0x39, 0x30, 0x20, 0x25, 0x25, 0x20, 0x6, 0x25, 0x1F, 0x1F, - 0x1F, 0x28, 0x22, 0x20, 0x1F, 0x1F, 0x1F, 0x1E, 0xB, 0x20, 0x25, 0x30, 0x20, 0x20, 0x1F, 0xD, - 0x6, 0x1F, 0x1F, 0x1F, 0x6, 0x1F, 0x25, 0x29, 0x39, 0x37, 0x39, 0x65, 0x29, 0x25, 0x39, 0x71, - 0x96, 0x71, 0x71, 0x71, 0x96, 0x96, 0x29, 0x70, 0x67, 0x70, 0x67, 0xB2, 0x6E, 0x37, 0x71, 0x29, - 0x22, 0x29, 0x29, 0x1F, 0x6, 0x1F, 0x1F, 0x1F, 0x29, 0x1F, 0x6, 0xD, 0x4, 0x4, 0x0, 0x0, - 0x6, 0x29, 0x1F, 0x1F, 0xF4, 0xF4, 0xD8, 0xEB, 0xB0, 0x6F, 0xA3, 0x94, 0x5, 0x4, 0xF4, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x3A, 0xB4, 0x3A, 0xF7, - 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xEE, 0xD8, 0xBD, 0xBD, 0xB4, 0x16, 0x2, 0x2, 0x2, 0x15, 0x24, 0x15, 0x15, 0x15, 0x14, 0x2, - 0x2, 0x2, 0x2, 0x2, 0x14, 0x2, 0x16, 0xB5, 0x39, 0x2, 0x15, 0xBC, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xFC, 0xD8, 0x72, 0xD6, 0x97, 0x39, 0x39, - 0x25, 0x25, 0x25, 0x20, 0xD, 0x0, 0x0, 0x16, 0x32, 0x25, 0x20, 0x25, 0x29, 0x25, 0x30, 0x32, - 0x30, 0xD, 0xB, 0x30, 0x25, 0x29, 0x29, 0x29, 0x29, 0x29, 0x22, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x25, 0x25, 0x20, 0x25, 0x37, 0x25, 0x20, 0x20, 0x39, 0x30, 0x25, 0x25, 0xD, 0x29, 0x29, 0x29, - 0x29, 0x29, 0x29, 0x25, 0x25, 0x25, 0x25, 0x30, 0x37, 0x37, 0x37, 0x37, 0x30, 0x37, 0x20, 0x6, - 0x25, 0x39, 0x37, 0x20, 0x25, 0x37, 0x37, 0x39, 0x37, 0x37, 0x6B, 0x71, 0x6B, 0x71, 0x9B, 0xAF, - 0xB5, 0xDB, 0x68, 0x4, 0x39, 0xE6, 0xDB, 0xDA, 0xE6, 0xE6, 0xDB, 0xE8, 0xD5, 0xE6, 0xE8, 0xE6, - 0xE6, 0xE6, 0xE2, 0xD7, 0xD7, 0xB5, 0x25, 0x6, 0xB5, 0xAE, 0x72, 0x72, 0x6F, 0xA7, 0x97, 0x71, - 0x9B, 0xB2, 0xB2, 0x7A, 0xD6, 0xB, 0x0, 0x32, 0x39, 0x2C, 0x16, 0xE, 0x4, 0x4, 0xED, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0x3A, 0xE, 0x31, - 0xBD, 0xF0, 0xAA, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF9, 0x94, 0xE, 0xE, 0x31, 0xAA, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF7, 0xEE, 0xD8, 0xBD, 0xBD, 0xA9, 0x6, 0x15, 0x2, 0x2, 0x14, 0x2, 0x2, 0x2, 0x14, 0x2, - 0x2, 0x14, 0x14, 0x15, 0x15, 0x15, 0x2, 0x27, 0x27, 0x14, 0x17, 0x4D, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xEA, 0xEE, 0x5, 0x1E, 0xB2, 0x71, 0xB2, 0xB2, - 0xAF, 0x6E, 0x6B, 0x71, 0x6E, 0x25, 0x35, 0xB5, 0xA9, 0x6E, 0x97, 0x97, 0x6E, 0x6C, 0x6F, 0x6C, - 0x30, 0xB, 0xD, 0xA7, 0x97, 0xAF, 0xAF, 0xAF, 0x7A, 0x71, 0x6B, 0x39, 0x39, 0x37, 0x39, 0x39, - 0x37, 0x37, 0x39, 0x39, 0x72, 0x3E, 0xB, 0x4, 0xD6, 0xAE, 0x6E, 0x97, 0x6E, 0x97, 0xB2, 0xB2, - 0xB5, 0xB5, 0xB2, 0xAF, 0xAF, 0xAF, 0xAF, 0xAF, 0xB0, 0xB0, 0xA7, 0x6C, 0x39, 0x39, 0x25, 0x6, - 0x37, 0x97, 0x97, 0x97, 0xB5, 0xE2, 0xE2, 0xED, 0xE2, 0xE2, 0xEF, 0xE6, 0xDB, 0xD5, 0xB5, 0xA9, - 0x35, 0x3E, 0xD, 0xFE, 0x6, 0x40, 0x39, 0x6C, 0xAF, 0xA9, 0xAF, 0xB5, 0x40, 0xAF, 0x6E, 0x97, - 0xA9, 0x6E, 0x39, 0x37, 0x32, 0x25, 0xFE, 0x0, 0x37, 0x37, 0x30, 0x20, 0xD, 0x20, 0x20, 0x20, - 0x6, 0x20, 0x29, 0x29, 0x37, 0x4, 0x0, 0x20, 0x20, 0x6, 0x9, 0x4, 0x0, 0xB, 0xEE, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xE9, - 0xA3, 0x33, 0xE, 0x41, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x41, 0xB6, 0xF9, 0xFD, 0xF8, 0xBD, 0x33, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xB6, 0x35, 0x15, 0x15, 0x14, 0x2, 0x2, 0x14, 0x15, 0x15, 0x15, - 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x14, 0x16, 0x99, 0x16, 0x17, 0x24, 0xB5, 0xF9, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xE9, 0xBD, 0xBB, 0x33, 0x4, 0x1E, 0x4, 0x4, 0x4, - 0x4, 0x0, 0x0, 0x4, 0x0, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, 0xB, - 0xB, 0x0, 0xFE, 0xD, 0x4, 0x6, 0x6, 0x6, 0x1F, 0x1F, 0x1E, 0x1E, 0x6, 0x4, 0x5, 0x5, - 0x4, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0xB, 0xB, 0x4, 0x1F, 0x1F, 0x6, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, - 0x0, 0x4, 0x0, 0x0, 0x0, 0x0, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x0, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x0, 0x1E, 0x4, 0x4, 0x4, 0xB, 0x4, 0xB, 0x4, 0x4, - 0x4, 0x4, 0x0, 0x0, 0x0, 0x4, 0x0, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, 0x4, 0x0, 0x0, - 0x0, 0x0, 0x4, 0x4, 0x4, 0x4, 0x0, 0x4, 0x4, 0x0, 0x0, 0xFE, 0x4, 0x3E, 0xFB, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF8, 0xBD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB7, 0x94, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF9, 0xF0, 0xE9, 0xBD, 0xBD, 0xB4, 0x32, 0x6, 0x15, 0x15, 0x14, 0x14, 0x15, 0x15, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x2, 0x14, 0x15, 0x16, 0x99, 0xB5, 0x99, 0x6, 0x15, 0x4D, 0xF9, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xD8, 0xB4, 0xAA, 0xAA, 0x3A, 0x30, 0x30, 0x30, 0x20, - 0xD, 0xB, 0x5, 0x0, 0x0, 0x0, 0x4, 0x5, 0x4, 0xFE, 0x4, 0xB, 0x6, 0xB, 0x5, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x5, 0x4, 0x5, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x5, - 0xD, 0xB, 0x6, 0x6, 0x7, 0x5, 0x5, 0xB, 0x5, 0x1F, 0x1E, 0x1F, 0x1F, 0x4, 0x1E, 0x1F, - 0x1F, 0x1F, 0x6, 0x6, 0x1F, 0x1F, 0x1F, 0x6, 0xB, 0x6, 0x1F, 0x1F, 0x4, 0x1E, 0x1E, 0x1F, - 0x1F, 0x1E, 0x1E, 0x1F, 0x1E, 0x4, 0x1E, 0x4, 0x1F, 0x1E, 0x1E, 0x1F, 0x1E, 0x1F, 0x1F, 0x1F, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x1E, 0x4, 0x1F, 0x4, 0x4, 0x4, 0x4, 0x1E, 0x4, - 0x4, 0x4, 0x1E, 0x1F, 0x4, 0x6, 0x6, 0x4, 0x6, 0x4, 0x4, 0x5, 0x4, 0x4, 0x0, 0x0, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x25, 0x20, 0x25, 0xD, 0xD, 0x6, 0xB, 0xB6, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, - 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0x3F, 0xFD, 0xFD, 0xF9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF7, 0xF0, 0xE9, 0xD8, 0xD8, 0xB8, 0xA5, 0x39, 0x35, 0x27, 0x16, 0x15, 0x9, 0x6, - 0x2, 0x14, 0x14, 0x14, 0x2, 0x15, 0x2, 0x14, 0x6, 0x35, 0x99, 0x24, 0x26, 0x24, 0xF2, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xE9, 0xB9, 0xB4, 0xA5, 0xAA, 0xB4, 0x94, 0x41, 0x33, - 0x33, 0x2C, 0xC, 0x0, 0x5, 0x0, 0x0, 0x23, 0x20, 0xD, 0x20, 0x20, 0xCC, 0xCC, 0xBF, 0xCB, - 0xE3, 0xC7, 0xC9, 0xCA, 0xCA, 0xCA, 0xC9, 0xC9, 0xC9, 0xC9, 0x5C, 0xBF, 0xF3, 0xCF, 0xCF, 0xCF, - 0xC4, 0x2F, 0xA, 0x1, 0x1, 0xE, 0x1A, 0x2F, 0x3A, 0x48, 0xA6, 0xAB, 0xAD, 0xC1, 0xC9, 0xCD, - 0xCD, 0xC1, 0xEC, 0x5A, 0xBF, 0xC9, 0xAD, 0xC9, 0xC9, 0xC9, 0xC9, 0xBF, 0xAD, 0xCB, 0xC9, 0xC9, - 0xC9, 0xCB, 0xCB, 0xCB, 0xCF, 0xCF, 0xCE, 0xCE, 0xCE, 0xAD, 0xCD, 0xCD, 0xCD, 0xCD, 0xC2, 0xC2, - 0xC2, 0xC2, 0xC2, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xD0, 0xCA, 0x5D, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x57, 0x58, 0x5A, 0x57, 0x57, 0x57, 0x57, 0x5A, 0x5A, 0x0, - 0x4, 0xB, 0xD, 0x4, 0x4, 0xA7, 0x6F, 0x6F, 0xA3, 0xB8, 0xE9, 0xEB, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, - 0x41, 0x2C, 0x2C, 0x41, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x38, 0xE9, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF8, 0xF7, 0xF0, 0xF0, 0xEE, 0xE9, 0xE9, 0xE9, 0xD8, 0xB8, 0xB6, 0xAC, 0xAC, - 0x4E, 0x35, 0x15, 0x14, 0x14, 0x15, 0x15, 0x15, 0x15, 0x16, 0xD7, 0x27, 0x15, 0x27, 0xF6, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xF0, 0xE9, 0xBD, 0xBD, 0xAA, 0xA5, 0xA3, 0x3B, 0x3A, - 0x31, 0x2E, 0xE, 0xFE, 0x0, 0x5, 0x5, 0x23, 0x30, 0x5, 0x20, 0x25, 0xC9, 0xC9, 0xC9, 0x55, - 0xC9, 0xE3, 0xC3, 0xCA, 0xCA, 0xCA, 0xC9, 0x5C, 0x5A, 0x56, 0x56, 0x56, 0x5C, 0xCE, 0xEC, 0x41, - 0x7, 0x7, 0x9, 0xE, 0x7, 0x12, 0x2D, 0x2F, 0x36, 0x52, 0xAD, 0xAD, 0xAD, 0xBF, 0xCD, 0xCD, - 0xCD, 0xC9, 0xEC, 0x59, 0xCD, 0xCD, 0xCD, 0xC9, 0xC9, 0xC9, 0xC9, 0xCE, 0xBF, 0x53, 0x55, 0x52, - 0x36, 0xAD, 0xCE, 0xCC, 0xCA, 0xCA, 0xCC, 0xCA, 0xCA, 0x55, 0xC9, 0xCB, 0xCB, 0xCC, 0xCC, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, - 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x58, 0x57, 0x57, 0x57, 0x57, 0x5A, 0x5A, 0x7, - 0xB, 0x20, 0x20, 0x4, 0x4, 0xB5, 0xA9, 0xB6, 0xBD, 0xE9, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF7, 0xBB, 0xFD, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE9, 0x2C, 0xA3, 0xE, 0xFD, 0xFD, 0xBD, 0x38, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF9, 0xF8, 0xF7, 0xF7, 0xF7, 0xF7, 0xF5, 0xF0, 0xE9, 0xD8, - 0xBD, 0xB8, 0xA5, 0x16, 0x6, 0x14, 0x15, 0x16, 0x39, 0xAC, 0xF7, 0xF2, 0xB5, 0xF2, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xF5, 0xEE, 0xEF, 0xD8, 0xAC, 0xA3, 0x3C, - 0x33, 0x2C, 0xE, 0x0, 0x0, 0x4, 0x4, 0x30, 0x30, 0x4, 0x4, 0x5, 0xC9, 0xC9, 0x5C, 0x55, - 0x52, 0x52, 0x53, 0x50, 0x4F, 0x4F, 0x4F, 0x5C, 0x5A, 0x56, 0x56, 0x46, 0x1A, 0x3, 0x1, 0x1, - 0x1, 0x1, 0x0, 0x1, 0x1, 0xA, 0x1A, 0x34, 0x3D, 0xAD, 0xAD, 0xAD, 0xAD, 0xCD, 0xCE, 0xCE, - 0xCD, 0xC9, 0xCD, 0x50, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCC, 0xD0, 0xCC, 0xCA, 0xBF, 0xBF, - 0xC0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0x5D, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, - 0x58, 0x5B, 0x58, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x57, 0x57, 0x57, 0x5A, 0x5A, 0x9, - 0xB, 0x25, 0x25, 0x4, 0x4, 0xEF, 0xD8, 0xE9, 0xEC, 0xF1, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, - 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB6, 0x3F, 0xFD, 0xFD, 0x2C, 0xEE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xEF, 0xEF, 0xF7, 0xF9, 0xFD, 0xFD, 0xFD, 0xF8, 0xF5, 0xEE, - 0xE9, 0xD8, 0xD8, 0xB8, 0x40, 0x35, 0x4E, 0x97, 0x4D, 0x4E, 0xBC, 0xF2, 0xF6, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xE9, 0xB6, 0x94, - 0x3A, 0x31, 0x2C, 0x0, 0x0, 0x4, 0x5, 0x37, 0x33, 0x0, 0x0, 0x0, 0x9, 0x1, 0x0, 0x7, - 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x1, 0x55, 0x5C, 0x56, 0x56, 0x46, 0x0, 0x0, 0x0, 0x1, - 0x1, 0x1, 0x0, 0x0, 0x1, 0x7, 0xA, 0x2F, 0x54, 0xAD, 0xAD, 0xC4, 0xCE, 0xD0, 0xD0, 0xD0, - 0xD0, 0xD0, 0xF1, 0x4F, 0xD0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x57, 0x57, 0x57, 0x5A, 0x5A, 0x7, - 0x6, 0x25, 0x30, 0xB, 0x4, 0xFD, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xB7, - 0x41, 0x2C, 0x2C, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB5, 0x6, 0x16, 0x35, 0x97, 0xEF, 0xF9, 0xF2, 0xEF, 0xEB, 0xC6, - 0xAC, 0x4D, 0x99, 0x35, 0x9, 0x16, 0x3C, 0x6, 0x2, 0x2, 0x2, 0x6, 0x16, 0x99, 0xF6, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xD8, 0xAA, - 0x3B, 0x33, 0x2C, 0x7, 0x0, 0x0, 0x4, 0x30, 0x30, 0x0, 0x0, 0x0, 0x9, 0x3, 0x1, 0x0, - 0x1, 0x0, 0x1, 0x1, 0x3, 0x1, 0x1, 0x53, 0xBF, 0x56, 0x56, 0x47, 0x1, 0x1, 0x1, 0x3, - 0x3, 0x3, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0xA, 0x1A, 0x2F, 0x2F, 0x2F, 0x2F, 0x3D, 0x3D, - 0xAD, 0xD0, 0xF1, 0x43, 0xD0, 0xD0, 0xC9, 0xBF, 0xBF, 0xCE, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCC, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x58, 0x57, 0x57, 0x5A, 0x5A, 0x7, - 0x4, 0x20, 0x20, 0x4, 0x6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xE9, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xAC, 0x15, 0x15, 0x15, 0x16, 0xAC, 0xAC, 0x16, 0x6, 0x16, 0x6, - 0x2, 0x2, 0x2, 0x2, 0x2, 0x0, 0x2, 0x14, 0x17, 0x17, 0x17, 0x2, 0x2, 0x2, 0x99, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xB6, - 0x41, 0x33, 0x31, 0xE, 0x7, 0x0, 0x4, 0x25, 0x25, 0x4, 0x0, 0x4, 0x12, 0x3, 0xA, 0x1, - 0x1, 0x0, 0x0, 0x1, 0x9, 0x1, 0x0, 0x4F, 0xC9, 0x56, 0x56, 0x50, 0x3, 0x1, 0x1, 0x1, - 0x1, 0x1, 0x1, 0x8, 0x7, 0x7, 0xA, 0x1A, 0x34, 0x34, 0x36, 0x48, 0x54, 0x53, 0xAB, 0xAD, - 0xAD, 0xAD, 0xA6, 0x1A, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0x54, 0x55, 0xAD, 0xBF, 0xBF, - 0xC9, 0xCC, 0xCC, 0xCA, 0xCA, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x57, 0x57, 0x57, 0x58, 0xB, - 0xB, 0x3E, 0x37, 0xB, 0x4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xA3, - 0xBD, 0xF8, 0xF9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x41, 0xE, 0x2C, 0x41, 0xB6, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEF, 0x35, 0x27, 0x4D, 0x4D, 0x27, 0x2, 0x14, 0x24, 0x15, 0x2, - 0x14, 0x15, 0x15, 0x17, 0x14, 0x2, 0x14, 0x17, 0x17, 0x17, 0x15, 0x14, 0x14, 0x15, 0x27, 0xF6, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB8, - 0x6F, 0x38, 0x33, 0xE, 0x7, 0x0, 0x4, 0x20, 0x1F, 0x4, 0x4, 0x4, 0x3, 0x3, 0x1, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x7, 0x0, 0x0, 0x4F, 0xC9, 0x56, 0x56, 0x59, 0xA, 0x3, 0x3, 0x3, - 0x1, 0x1, 0x0, 0x1, 0x7, 0xE, 0x2D, 0x2F, 0x3D, 0x54, 0xC4, 0xBF, 0xAD, 0xAD, 0xAD, 0xAD, - 0xAD, 0xBF, 0x36, 0x10, 0x55, 0xAD, 0xAD, 0xAD, 0xAD, 0x4C, 0x18, 0x10, 0x12, 0x36, 0x46, 0x46, - 0x4F, 0x53, 0x55, 0x5A, 0x5C, 0xC9, 0xC9, 0xCA, 0xCC, 0xCC, 0xCA, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, - 0x5D, 0x5D, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x57, 0x58, 0x58, 0xB, - 0xD, 0x3E, 0x33, 0xB, 0x4, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xB6, - 0x3F, 0xE, 0x2C, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF8, 0xBD, 0xA3, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF9, 0xF8, 0xF7, 0xF5, 0x99, 0x16, 0x6, 0x2, 0x2, 0x2, 0x17, 0x26, 0x26, 0x26, 0x15, - 0x2, 0x14, 0x24, 0x15, 0x14, 0x15, 0x17, 0x17, 0x17, 0x15, 0x17, 0x15, 0x15, 0x26, 0x24, 0xB5, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB7, - 0x6F, 0x38, 0x31, 0x7, 0x1, 0x0, 0x2, 0xD, 0x6, 0x4, 0x4, 0x4, 0x1A, 0xA, 0x1, 0x0, - 0xE, 0x1, 0x0, 0x1, 0x7, 0x0, 0x0, 0x46, 0xCD, 0x56, 0x56, 0x59, 0x10, 0x3, 0x1, 0x9, - 0x1, 0x3, 0x1, 0x0, 0x1, 0x1, 0x3, 0x1A, 0x1A, 0x36, 0x3D, 0x48, 0x3D, 0x3D, 0x48, 0x54, - 0x55, 0xBF, 0x4C, 0x3, 0x52, 0xBF, 0xAD, 0x1A, 0x1, 0x1, 0x1, 0x3, 0x1, 0x1, 0x1D, 0x47, - 0x47, 0x47, 0x47, 0x47, 0x46, 0x46, 0x46, 0x55, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0x5D, 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x57, 0x57, 0x58, 0x5A, 0x6, - 0x0, 0x4, 0x5, 0x4, 0xA7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xA3, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF9, 0xF5, 0xEE, 0xE9, 0xB8, 0x24, 0x15, 0x17, 0x15, 0x2, 0x14, 0x15, 0x24, 0x26, 0x26, 0x24, - 0x15, 0x14, 0x24, 0x15, 0x14, 0x15, 0x17, 0x15, 0x15, 0x17, 0x26, 0x17, 0x15, 0x26, 0x17, 0x99, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB7, - 0x6F, 0x38, 0x2C, 0x5, 0x0, 0x0, 0x2, 0xD, 0xD, 0x4, 0x4, 0x4, 0x3, 0xA, 0x1, 0x0, - 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1C, 0xC9, 0x51, 0x56, 0x59, 0x18, 0x3, 0x1, 0x3, - 0x3, 0x1, 0x3, 0x3, 0x3, 0x1A, 0x2F, 0x36, 0x36, 0x4C, 0x54, 0xAD, 0xAD, 0xBF, 0xC9, 0xC9, - 0xC9, 0xC9, 0x54, 0x3, 0x52, 0xC9, 0x34, 0x8, 0x52, 0x0, 0x0, 0x1, 0x3, 0x52, 0x52, 0xBF, - 0xC9, 0xCD, 0xCE, 0xCA, 0xCC, 0xD0, 0xD0, 0xD0, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0x5D, 0x5D, 0xCA, 0x5D, 0xCA, 0x5D, 0x5D, 0x5B, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x58, 0x58, 0x5A, 0x5A, 0x6, - 0x4, 0x0, 0x4, 0x4, 0xD, 0xED, 0xEF, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBB, 0xA8, 0xE, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF9, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF7, 0xEA, 0xD8, 0xBD, 0x4D, 0x15, 0x26, 0x26, 0x26, 0x14, 0x14, 0x14, 0x15, 0x15, 0x17, 0x26, - 0x2A, 0x24, 0x17, 0x15, 0x15, 0x17, 0x24, 0x15, 0x15, 0x26, 0x26, 0x17, 0x17, 0x26, 0x24, 0xC6, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xB6, - 0x41, 0x38, 0x30, 0x4, 0x4, 0x0, 0x0, 0xE, 0xD, 0x4, 0x4, 0x4, 0x3, 0x1, 0x1, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x3, 0x2F, 0xCE, 0x57, 0x57, 0x5A, 0x1D, 0xA, 0x3, 0x3, - 0x1, 0x3, 0x12, 0x2C, 0xA, 0xA, 0x2E, 0x3D, 0x4C, 0x4C, 0x52, 0xAD, 0xAD, 0xAD, 0xBF, 0xC9, - 0xC9, 0xAD, 0x19, 0x11, 0x11, 0x10, 0x1, 0x3, 0x10, 0x0, 0x0, 0x1, 0x10, 0x19, 0x19, 0x18, - 0x1C, 0xCE, 0xCE, 0xC9, 0xC9, 0xC9, 0xC9, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x58, 0x58, 0x57, 0x57, 0x57, 0x58, 0x5B, 0x5B, 0x6, - 0x4, 0x37, 0x37, 0x6, 0x4, 0x4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x41, 0xBD, 0xFD, 0xF0, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF5, 0xE9, 0xBD, 0xBD, 0x39, 0x15, 0x26, 0x26, 0x26, 0x15, 0x15, 0x15, 0x15, 0x14, 0x14, 0x15, - 0x26, 0x26, 0x17, 0x15, 0x24, 0x24, 0x15, 0x14, 0x15, 0x26, 0x26, 0x15, 0x14, 0x2, 0x4D, 0xF9, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xB6, - 0x41, 0x38, 0x30, 0x4, 0x4, 0x4, 0x0, 0xE, 0x20, 0x4, 0x4, 0x4, 0x3, 0x1, 0x1, 0x1, - 0x0, 0x1, 0x1, 0x1, 0x7, 0x1, 0x1, 0x1A, 0xCA, 0x57, 0x57, 0x51, 0x43, 0x3, 0x3, 0x3, - 0xA, 0xA, 0x3, 0x1A, 0xA, 0xA, 0x8, 0x36, 0x52, 0x4C, 0x4C, 0x52, 0x48, 0x4C, 0x4C, 0x4C, - 0x36, 0x1A, 0x11, 0x10, 0x35, 0x2B, 0x3, 0x3, 0x3, 0xFE, 0x0, 0x1, 0x18, 0x18, 0x19, 0x1B, - 0x1B, 0xCE, 0xCE, 0xCE, 0xD0, 0xD0, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x58, 0x57, 0x58, 0x57, 0x57, 0x58, 0x58, 0x58, 0x5B, 0x6, - 0x6, 0x37, 0x25, 0x1F, 0x4, 0x25, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0x41, 0xE, 0x2C, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF5, 0xE9, 0xD8, 0xBD, 0xA9, 0x35, 0x35, 0x27, 0x24, 0x15, 0x15, 0x15, 0x17, 0x17, 0x17, 0x17, - 0x26, 0x26, 0x15, 0x15, 0x24, 0x15, 0x15, 0x2, 0x15, 0x26, 0x15, 0x17, 0x15, 0x2, 0x4E, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xB4, - 0x41, 0x38, 0xE, 0x4, 0x4, 0x4, 0x4, 0x30, 0x25, 0x4, 0x4, 0x4, 0x3, 0x1, 0x1, 0x1, - 0x3, 0x1, 0x3, 0xF, 0xF, 0xF, 0x10, 0x10, 0xC9, 0x5A, 0x57, 0x57, 0x43, 0xF, 0xF, 0x10, - 0x10, 0x10, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x10, - 0xF, 0xF, 0x10, 0x3, 0x32, 0x16, 0x3, 0x3, 0x3, 0x0, 0x1, 0x3, 0x10, 0x18, 0x18, 0x46, - 0x18, 0xCE, 0xCE, 0xCD, 0xCE, 0xD0, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCC, - 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x58, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x1F, - 0x21, 0x71, 0x37, 0x25, 0x4, 0x20, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xEA, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF8, 0xF5, 0xF0, 0xF0, 0xE9, 0xD8, 0xBD, 0xBC, 0xAC, 0x27, 0x15, 0x17, 0x17, 0x15, 0x15, 0x24, - 0x15, 0x17, 0x17, 0x24, 0x24, 0x15, 0x15, 0x14, 0x15, 0x26, 0x26, 0x26, 0x15, 0x2, 0x94, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xB4, - 0x3B, 0x38, 0xE, 0x4, 0x4, 0x4, 0x0, 0x23, 0x20, 0x4, 0x4, 0x4, 0x1, 0x1, 0x0, 0x0, - 0x1, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x5C, 0x5A, 0x57, 0x5A, 0x46, 0x1, 0xF, 0xF, - 0x1, 0xF, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, - 0x1, 0xF, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x3, 0x10, 0x12, 0x10, 0x10, 0x12, 0x12, 0x55, - 0x12, 0x1D, 0x46, 0x43, 0x46, 0x4F, 0x46, 0x46, 0x46, 0x46, 0x4F, 0x4F, 0x4F, 0x50, 0x50, 0x51, - 0x55, 0x5C, 0xCA, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x1F, - 0x28, 0x71, 0x39, 0x20, 0x4, 0x6E, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x31, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xEA, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF9, 0xF9, 0xF7, 0xF0, 0xE9, 0xD8, 0xD8, 0xBC, 0xA5, 0x39, 0x35, 0x39, 0x4D, 0x4D, - 0x27, 0x2, 0x2, 0x17, 0x17, 0x14, 0x15, 0x14, 0x14, 0x17, 0x17, 0x24, 0x16, 0xB6, 0xF9, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xB4, - 0x3B, 0x38, 0x2C, 0x4, 0x4, 0x0, 0x0, 0x25, 0x20, 0x4, 0x4, 0x4, 0xF, 0xF, 0xF, 0xF, - 0x1, 0x0, 0xFE, 0x1, 0x13, 0x1B, 0x42, 0x43, 0x5C, 0x5C, 0x57, 0x57, 0x56, 0x47, 0x47, 0x47, - 0x1A, 0x0, 0x0, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, - 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1A, 0x53, 0x53, 0x55, 0xBF, 0xBF, - 0xA, 0x3, 0x10, 0xF, 0x3, 0x10, 0x3, 0xF, 0xF, 0x10, 0xF, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x1B, 0xCA, 0x5D, 0x5D, 0x5B, 0x5B, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x58, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x57, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x1E, - 0x28, 0xB2, 0x37, 0xD, 0x0, 0xD8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xE, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x31, 0xFD, 0xFD, 0xFD, 0x41, 0xFD, 0xFD, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF7, 0xF0, 0xF0, 0xF0, 0xEE, 0xE9, 0xE9, 0xBD, 0x4E, 0x9, - 0x2, 0x2, 0x15, 0x17, 0x17, 0x15, 0x15, 0x6, 0x9, 0x39, 0x97, 0x99, 0xF2, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xAA, - 0x3F, 0x33, 0x2C, 0x4, 0x4, 0x0, 0x0, 0x25, 0x20, 0x4, 0x4, 0x4, 0x10, 0xF, 0xF, 0x1, - 0x1, 0x1, 0x0, 0x1, 0x1B, 0x44, 0x46, 0x4F, 0x55, 0x5C, 0x57, 0x57, 0x56, 0x47, 0x47, 0x53, - 0x50, 0x19, 0x10, 0x10, 0xF, 0x10, 0x10, 0x10, 0x10, 0xF, 0x10, 0x10, 0x10, 0x10, 0x10, 0xF, - 0x0, 0x0, 0x0, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x53, 0xBF, 0xC9, 0xC9, 0xBF, - 0x1D, 0x46, 0x36, 0x1D, 0x1D, 0x1D, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, - 0x1B, 0x34, 0x55, 0xC0, 0x5D, 0x5B, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x1E, - 0x28, 0xD5, 0xA7, 0x4, 0xFE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x33, 0xE, - 0xFD, 0xF9, 0x3A, 0xE, 0x33, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF5, 0xAA, 0xFD, 0xBB, 0xE, 0xF0, 0xE9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF9, 0xF7, 0xF0, 0xE9, 0xD8, 0xAC, 0x15, 0x15, - 0x14, 0x14, 0x17, 0x17, 0x17, 0x24, 0x4D, 0xBC, 0xEB, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xAA, - 0x3F, 0x33, 0x2C, 0x7, 0x4, 0x0, 0x4, 0x25, 0x25, 0x4, 0x4, 0x1E, 0x1, 0x1, 0x1, 0x0, - 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x50, 0x5C, 0x51, 0x51, 0x56, 0x10, 0xF, 0xF, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xF, 0x10, 0xF, 0x10, 0x10, 0x10, 0x10, - 0x1, 0xF, 0xF, 0xF, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x12, 0xBF, 0xBF, 0xC9, 0xBF, - 0xAD, 0xBF, 0xBF, 0xBE, 0xBE, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xA4, 0xA6, 0x53, - 0xA4, 0x52, 0x2D, 0x3, 0x10, 0x10, 0x18, 0x1B, 0x19, 0x1B, 0x1D, 0x50, 0x5A, 0x5B, 0x5A, 0x5B, - 0x5A, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x4, - 0x28, 0xB5, 0x97, 0x4, 0x4, 0xED, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF7, - 0xFD, 0x94, 0xE, 0xE, 0xE, 0x3A, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xB4, 0xE, 0x31, 0xB6, 0xE, 0xE, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xC6, 0xAC, 0xF2, 0xFD, 0xFD, 0xF7, 0xEA, 0xBD, 0xBD, 0x4D, 0x15, 0x15, - 0x14, 0x2, 0x15, 0x17, 0x15, 0x27, 0xEF, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xA8, - 0x3C, 0x32, 0x2C, 0xB, 0x4, 0x0, 0x4, 0x25, 0x25, 0x4, 0x4, 0x1E, 0x0, 0x0, 0x0, 0x0, - 0x2B, 0x7, 0x2B, 0x0, 0x0, 0x0, 0x1, 0x1, 0x4F, 0x5C, 0x57, 0x51, 0x51, 0x1, 0x1, 0x1, - 0x1, 0x3, 0x3, 0x1, 0x1, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xF, 0x1, - 0x11, 0x19, 0x11, 0x11, 0x1, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x52, 0xAD, 0xBF, 0xBF, - 0x1C, 0x3, 0x3, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x1, 0x1, - 0x1, 0x1, 0xF, 0xF, 0x10, 0x10, 0x10, 0x3, 0x2E, 0x10, 0x10, 0x19, 0x19, 0x59, 0x5A, 0x5A, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x1E, - 0x28, 0xB5, 0x37, 0xD, 0x4, 0x37, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF0, - 0xE9, 0xE, 0xE, 0xB7, 0xF7, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, - 0xF7, 0xF5, 0xF5, 0xA9, 0x6, 0x2, 0x9, 0x40, 0xEB, 0xF2, 0xE9, 0xBD, 0xBD, 0xA5, 0x16, 0x15, - 0x17, 0x15, 0x15, 0x17, 0x15, 0x2, 0x27, 0xC6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xBD, 0xA8, - 0x3A, 0x32, 0xE, 0x6, 0x4, 0x0, 0x4, 0x30, 0x30, 0x4, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, - 0x4, 0x0, 0x0, 0xFE, 0xFE, 0xFE, 0x0, 0xFE, 0x43, 0x5C, 0x51, 0x51, 0x51, 0x1, 0x0, 0x0, - 0x0, 0x1, 0x0, 0x0, 0x0, 0x7, 0x2B, 0x7, 0x2B, 0x7, 0x4B, 0x9, 0x0, 0x0, 0x1, 0x1, - 0x18, 0x10, 0x10, 0x10, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1A, 0xBF, 0xBF, 0xBF, - 0x1B, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1, 0x1, - 0x0, 0x0, 0x7, 0x27, 0x1, 0x1, 0x1, 0x1, 0x96, 0x12, 0x11, 0x11, 0x19, 0x19, 0x34, 0x36, - 0x36, 0x43, 0x46, 0x46, 0x46, 0x5A, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5D, 0x6, - 0x28, 0xD5, 0x6E, 0xB, 0x4, 0x37, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x3F, 0xE, - 0xE, 0xE, 0x3A, 0xFD, 0xF0, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x2C, 0xB4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xEA, 0xE9, 0xD8, 0x25, 0x14, 0x2, 0x2, 0x2, 0x9, 0x4E, 0xC6, 0xD8, 0xBD, 0xB7, 0xA5, 0x35, - 0x15, 0x14, 0x17, 0x17, 0x15, 0x14, 0x2, 0x6, 0x4E, 0xF2, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, - 0x3A, 0x33, 0xD, 0x4, 0x4, 0x0, 0x0, 0x32, 0x29, 0x4, 0x4, 0x1E, 0x8, 0x7, 0x7, 0x1, - 0x1, 0x0, 0xFE, 0xFE, 0xFE, 0x0, 0x1, 0x1, 0x43, 0xC0, 0x51, 0x57, 0x51, 0x1A, 0x10, 0x3, - 0x10, 0x10, 0x10, 0x10, 0x3, 0x3, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x3, - 0x10, 0x10, 0x10, 0x10, 0x12, 0x1, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x36, 0xBF, 0xBF, - 0x1A, 0x1, 0x0, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x1, 0x1, 0x9, 0x16, 0x7, 0xD, - 0x0, 0x0, 0x7, 0x2B, 0x0, 0x0, 0x0, 0x0, 0x2B, 0x9, 0x3, 0x10, 0x19, 0x19, 0xBF, 0xBF, - 0xBF, 0xC0, 0xC0, 0xC0, 0x5A, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x4, - 0x28, 0xB2, 0x6B, 0x20, 0x4, 0x30, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0x3A, - 0xE, 0x33, 0xF5, 0xFD, 0xE, 0x38, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE, 0xB4, 0x41, 0xFD, 0xFD, 0xAA, 0x38, 0xEE, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, - 0xD8, 0xBD, 0xB6, 0x16, 0x2, 0x15, 0x17, 0x15, 0x2, 0x2, 0x16, 0x39, 0x35, 0x2E, 0x2, 0x2, - 0x14, 0x2, 0x14, 0x17, 0x17, 0x15, 0x15, 0x14, 0x2, 0x39, 0xEF, 0xF2, 0xF2, 0xF6, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, - 0x3A, 0x32, 0xB, 0x4, 0x4, 0x4, 0x2, 0x25, 0x29, 0x1F, 0x4, 0x6, 0x52, 0x52, 0xA6, 0x46, - 0x52, 0x36, 0x0, 0x0, 0xFE, 0x3, 0x46, 0x4F, 0x50, 0xCA, 0x57, 0x57, 0x56, 0x46, 0x46, 0x1D, - 0x43, 0x46, 0x43, 0x43, 0x43, 0x43, 0x1A, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x3, 0x10, - 0x10, 0x10, 0x10, 0x1B, 0x1B, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x46, 0x4F, - 0x18, 0x3, 0x10, 0x10, 0x10, 0x3, 0x3, 0x3, 0x3, 0x1, 0x1, 0x3, 0x3, 0x1, 0x1, 0x7, - 0x1, 0x0, 0x0, 0x7, 0x1, 0x1, 0x1, 0x1, 0x7, 0x1, 0x1, 0x1, 0x12, 0x19, 0x4F, 0x59, - 0x5A, 0x58, 0x5B, 0x58, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x6, - 0x29, 0x9D, 0x37, 0x25, 0x6, 0xA7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xE9, 0xA3, 0xFD, 0xFD, 0xD8, 0x2C, 0xFD, 0xFD, 0xFD, 0xF8, 0xEA, - 0xBD, 0xBD, 0xAC, 0x16, 0x15, 0x15, 0x15, 0x15, 0x14, 0x14, 0x14, 0x2, 0x0, 0x0, 0x2, 0x2, - 0x2, 0x2, 0x14, 0x15, 0x15, 0x15, 0x15, 0x17, 0x15, 0x2, 0x15, 0x6, 0x9, 0x16, 0xC6, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB7, 0xA3, - 0x3A, 0x2E, 0x5, 0x0, 0x4, 0x4, 0x0, 0xD, 0x20, 0x1F, 0x6, 0x4, 0xBF, 0xAB, 0xC4, 0x52, - 0x55, 0x55, 0x34, 0xF, 0x10, 0x10, 0x10, 0x10, 0x1B, 0xCC, 0x5A, 0x57, 0x57, 0x1B, 0x10, 0x11, - 0x18, 0x18, 0x19, 0x19, 0x19, 0x19, 0x18, 0x18, 0x18, 0x10, 0xF, 0x1, 0x1, 0x1, 0x4F, 0x53, - 0x53, 0x52, 0x52, 0x53, 0x1B, 0x3, 0x1, 0x1, 0x1, 0x10, 0x1A, 0x13, 0x18, 0x13, 0x18, 0x18, - 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x1B, 0x13, 0x13, 0x1A, 0x8, 0x8, 0x3, 0x8, 0x8, - 0x3, 0x3, 0x3, 0x3, 0x3, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x8, 0x12, 0x12, 0x18, - 0x1A, 0x46, 0x50, 0x50, 0x56, 0x57, 0x58, 0x57, 0x56, 0x4F, 0x4F, 0x5B, 0x5B, 0x5B, 0x5D, 0x6, - 0x29, 0xD5, 0x71, 0xB, 0xFE, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, - 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0x2C, 0xFD, 0xFD, 0xB6, 0xA8, 0xFD, 0xEE, 0xE, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, - 0xBD, 0xBD, 0xAC, 0x6, 0x14, 0x14, 0x2, 0x2, 0x2, 0x15, 0x24, 0x15, 0x15, 0x14, 0x2, 0x2, - 0x2, 0x2, 0x14, 0x15, 0x15, 0x17, 0x15, 0x17, 0x14, 0x2, 0x2, 0x15, 0x14, 0x2, 0x3C, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB6, 0xA3, - 0x33, 0x2C, 0x5, 0x4, 0x6, 0x4, 0xFE, 0x4, 0xB, 0x6, 0x4, 0x4, 0x54, 0x54, 0xAD, 0x54, - 0xC9, 0xC9, 0x4F, 0x46, 0x49, 0x53, 0x53, 0x53, 0x53, 0xCE, 0x5A, 0x57, 0x57, 0x50, 0x49, 0x47, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x3, 0x0, 0x0, 0x53, 0xC9, - 0xC9, 0xC9, 0xC9, 0x5C, 0x1B, 0x1, 0x1, 0x0, 0x0, 0x1, 0x36, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0xAD, 0x55, 0xAD, 0x55, 0xBF, 0xBF, - 0xAD, 0xAD, 0xAB, 0x55, 0xAD, 0xAD, 0xAD, 0x55, 0x53, 0x53, 0x53, 0x52, 0x3D, 0x34, 0x12, 0x48, - 0x46, 0x46, 0x36, 0x1D, 0x1B, 0x1B, 0x1B, 0x1A, 0x1A, 0x1B, 0x1D, 0x50, 0x5B, 0x5B, 0x5D, 0x5, - 0x29, 0xD6, 0x39, 0x1F, 0xFE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xE, - 0xE, 0xE, 0x2C, 0x41, 0xB6, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xE, 0x2C, 0xBD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, - 0xBD, 0xBD, 0xAC, 0x16, 0x15, 0x14, 0x9, 0x6, 0x6, 0x15, 0x14, 0x2, 0x2, 0x2, 0x14, 0x2, - 0x2, 0x15, 0x15, 0x15, 0x15, 0x15, 0x17, 0x17, 0x17, 0x2, 0x15, 0x15, 0x15, 0x15, 0x16, 0xF2, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xB6, 0x94, - 0x38, 0x31, 0xE, 0x5, 0x4, 0x4, 0xFE, 0xB, 0x20, 0x5, 0x4, 0x4, 0x0, 0xFE, 0x0, 0x0, - 0x1A, 0x55, 0x55, 0x55, 0xCE, 0xC2, 0xCE, 0xC2, 0xC2, 0xC9, 0x5C, 0x5A, 0x57, 0xC0, 0xC2, 0xC2, - 0xC1, 0xC2, 0xC2, 0xC2, 0xC2, 0xC2, 0xC2, 0xC2, 0xC2, 0xC2, 0xCE, 0xAB, 0x1, 0x0, 0x12, 0xBF, - 0xC9, 0xCD, 0xCE, 0xC9, 0x1B, 0x1, 0x0, 0x0, 0x0, 0x1, 0x8, 0xAB, 0xC1, 0xC1, 0xC2, 0xC2, - 0xC1, 0xC1, 0xC1, 0xC2, 0xC2, 0xC2, 0xEC, 0xEC, 0xC2, 0xEA, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xC9, - 0xCD, 0xCD, 0xBF, 0xC9, 0xBF, 0xBF, 0xBF, 0xBF, 0xC9, 0xC9, 0xC9, 0xCE, 0xCF, 0xF3, 0xCF, 0xBE, - 0xBE, 0xBE, 0xBE, 0xBE, 0xAB, 0xAB, 0x53, 0x53, 0x47, 0x47, 0x49, 0x53, 0x5B, 0x5B, 0x5D, 0xB, - 0x25, 0xD7, 0x71, 0x1F, 0xFE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xB6, - 0x41, 0x2C, 0xE, 0xE, 0xE, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xEA, - 0xD8, 0xE9, 0xBC, 0x27, 0x16, 0x4E, 0xAC, 0xA9, 0x16, 0x14, 0x2, 0x2, 0x14, 0x15, 0x15, 0x15, - 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x17, 0x17, 0x14, 0x15, 0x15, 0x17, 0x26, 0x26, 0x26, 0x99, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xB6, 0x94, - 0x33, 0x31, 0xE, 0xB, 0x4, 0x0, 0x20, 0xA7, 0x37, 0x5, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, - 0x1, 0x3, 0x55, 0xBF, 0xBF, 0xC2, 0xCD, 0xBF, 0xBF, 0x5C, 0x5C, 0x5A, 0x5A, 0x5C, 0xC9, 0x55, - 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xAD, 0xBF, 0x55, 0x12, 0x1, 0x0, 0x1, 0x1A, - 0xAD, 0x55, 0x55, 0xBF, 0x1B, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x12, 0x1B, 0x1B, 0x1B, 0x59, - 0xAD, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xBF, 0xC9, 0xCD, 0xBF, 0xCD, 0xC9, 0xCD, 0xCD, 0xCE, 0xCD, - 0xCD, 0xCD, 0xBF, 0xBF, 0xBF, 0xC9, 0xBF, 0xBF, 0xC9, 0xC9, 0xC9, 0xCD, 0xCF, 0xD0, 0xD0, 0xC2, - 0xC2, 0xC2, 0xCE, 0xCE, 0xC2, 0xCE, 0xCE, 0xC9, 0xBE, 0xBE, 0xBE, 0xC0, 0x5B, 0x5B, 0x5D, 0xC, - 0x1F, 0x9D, 0x96, 0x0, 0x4, 0xF2, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, - 0xFD, 0xFD, 0xE, 0xBB, 0x41, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF0, - 0xF0, 0xF0, 0xF5, 0xEB, 0xC6, 0xD8, 0xBD, 0xBD, 0xB6, 0x27, 0x14, 0x14, 0x14, 0x15, 0x15, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x2, 0x14, 0x24, 0x15, 0x15, 0x17, 0x26, 0x24, 0x26, 0x26, 0x26, 0x4E, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB6, 0x94, - 0x38, 0x31, 0x2C, 0x5, 0x4, 0x0, 0x30, 0xB0, 0x37, 0x4, 0x0, 0x4, 0x1A, 0x12, 0x12, 0x3, - 0x1, 0x1, 0x3, 0x1A, 0x4C, 0xC9, 0xCA, 0xCA, 0xC9, 0x5C, 0xC0, 0x5A, 0x5C, 0x5C, 0x5C, 0x55, - 0xBF, 0xBF, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x55, 0xBF, 0x5C, 0x43, 0x1, 0x0, 0x1, 0x3, - 0x12, 0x55, 0xC9, 0xC9, 0x1D, 0x18, 0x18, 0x18, 0x12, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x5A, - 0x36, 0x3D, 0x4C, 0x4C, 0x4F, 0x52, 0x52, 0x52, 0xA6, 0x54, 0xC9, 0xCD, 0xCD, 0xCD, 0xC9, 0xCD, - 0xCE, 0xCE, 0xBF, 0xC9, 0xC6, 0x9B, 0x9B, 0xB2, 0xAC, 0xC9, 0xCD, 0xCD, 0xCF, 0xD0, 0xD0, 0x5C, - 0x5B, 0x5D, 0x5D, 0x5B, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5A, 0xC0, 0x5B, 0x5D, 0x5B, 0x5D, 0xC, - 0x25, 0x9D, 0x6B, 0x4, 0x25, 0x97, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, - 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, - 0xF8, 0xF9, 0xFD, 0xFD, 0xF7, 0xF0, 0xE9, 0xE9, 0xE9, 0xBD, 0xA5, 0x4D, 0x97, 0xAC, 0x4E, 0x2E, - 0x9, 0x14, 0x14, 0x14, 0x2, 0x15, 0x15, 0x15, 0x15, 0x24, 0x26, 0x24, 0x26, 0x26, 0x17, 0x4E, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB8, 0xA3, - 0x38, 0x31, 0xE, 0x4, 0x6, 0x0, 0x30, 0x72, 0x25, 0x0, 0x0, 0x4, 0xCE, 0xC9, 0xCE, 0xCD, - 0x36, 0x1, 0x1, 0x12, 0x18, 0xBF, 0xC9, 0xC9, 0xC9, 0x5C, 0xC9, 0x5C, 0x5C, 0x5C, 0xC9, 0xAD, - 0xBF, 0xC9, 0xBF, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0xAD, 0xBF, 0xBF, 0xBF, 0x12, 0x0, 0x3, 0x1B, - 0x1, 0x8, 0x55, 0xC9, 0x1D, 0x18, 0x18, 0x18, 0x12, 0x12, 0x1A, 0x1A, 0x1A, 0x1A, 0x1B, 0x5A, - 0x1A, 0x1A, 0x2D, 0x1A, 0x2F, 0x34, 0x34, 0x34, 0x34, 0x4C, 0xC9, 0xCD, 0xC9, 0xC9, 0xC9, 0xC9, - 0xCD, 0xCE, 0xBF, 0xC9, 0xB4, 0x39, 0x39, 0x39, 0x48, 0xBF, 0xBF, 0xC9, 0xCF, 0xD0, 0xCC, 0x5B, - 0x5B, 0x5B, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0xC, - 0x37, 0xE6, 0x9B, 0x25, 0x29, 0x4, 0xED, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, - 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF7, 0xF5, 0xF5, 0xF7, 0xF5, 0xF0, 0xE9, 0xD8, 0xBD, 0xB8, - 0xAC, 0x39, 0x15, 0x14, 0x14, 0x15, 0x15, 0x15, 0x17, 0x26, 0x26, 0x26, 0x26, 0x26, 0x17, 0x99, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB7, 0xA3, - 0x38, 0x32, 0xE, 0x4, 0x4, 0x0, 0x37, 0x6C, 0x20, 0x4, 0x4, 0x4, 0xBF, 0xBF, 0xBF, 0xBF, - 0x55, 0x3, 0x18, 0xC9, 0xCC, 0x5A, 0xC9, 0xC9, 0xC9, 0x5C, 0xC9, 0x5C, 0x5A, 0x5C, 0x5C, 0xBF, - 0xBF, 0xC8, 0xC3, 0xC4, 0xC7, 0xAD, 0xE1, 0x9D, 0xAD, 0xBF, 0xAD, 0xBF, 0x4F, 0x1, 0x1, 0xBF, - 0x1A, 0x0, 0x8, 0xAD, 0x36, 0x1A, 0x1A, 0x1B, 0x1A, 0x1A, 0x34, 0x3C, 0x2F, 0x3A, 0x1D, 0x5A, - 0x4C, 0xC9, 0xC9, 0xC9, 0xC9, 0xCD, 0xCE, 0xCD, 0xCD, 0xC9, 0xCD, 0xCD, 0xC9, 0xC9, 0xC9, 0xC9, - 0xC9, 0xCD, 0xBF, 0xC9, 0xC9, 0xC9, 0xCD, 0xC9, 0xC9, 0xC9, 0xC9, 0xCE, 0xCF, 0xD0, 0xBF, 0x53, - 0x56, 0x59, 0x5A, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0xC, - 0x4, 0x6D, 0x25, 0x1F, 0x30, 0x0, 0xB5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xFD, - 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF7, 0xF0, 0xE9, 0xD8, - 0xBD, 0xB8, 0xAC, 0x35, 0x16, 0x14, 0x15, 0x17, 0x26, 0x26, 0x26, 0x26, 0x17, 0x26, 0x24, 0xEF, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, - 0x3A, 0x31, 0xE, 0x0, 0x4, 0x4, 0x39, 0x71, 0x29, 0x4, 0x0, 0x4, 0x55, 0xBF, 0xBF, 0x5C, - 0x5C, 0x1B, 0x1A, 0x53, 0xCE, 0x5A, 0xC9, 0xBF, 0xBF, 0xBF, 0xCE, 0x5C, 0x5A, 0x5C, 0xAD, 0xAD, - 0xBF, 0xAD, 0x55, 0xAD, 0xC3, 0x55, 0xC6, 0xC5, 0xAD, 0x55, 0xBF, 0xBF, 0xBF, 0xA, 0x1, 0x55, - 0xBF, 0x34, 0x1, 0xA, 0x55, 0xBF, 0xBF, 0xBF, 0xBF, 0xCD, 0xBF, 0xBF, 0xC9, 0xC9, 0xC9, 0x5A, - 0x52, 0xC9, 0xC9, 0xC9, 0xC9, 0xCD, 0xCD, 0xCD, 0xCD, 0xC9, 0xCE, 0xCE, 0xCD, 0xCD, 0xC9, 0xC9, - 0xC9, 0xCD, 0xBF, 0xC9, 0xE9, 0xC6, 0xB8, 0xC4, 0xC9, 0xC9, 0xC9, 0xCD, 0xCF, 0xD0, 0xAD, 0x52, - 0x53, 0x53, 0x55, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5, - 0x4, 0x0, 0xB, 0x6, 0x25, 0x4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0x2C, - 0x41, 0xBD, 0xF9, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF7, 0xF0, - 0xE9, 0xD8, 0xBD, 0xB7, 0xAA, 0x35, 0x16, 0x17, 0x17, 0x17, 0x15, 0x17, 0x17, 0x17, 0x4D, 0xF9, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xBB, - 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA8, - 0x3A, 0x33, 0xE, 0x0, 0x4, 0x4, 0x30, 0x39, 0x25, 0x6, 0x4, 0x4, 0x36, 0x36, 0x36, 0x46, - 0x46, 0x46, 0x53, 0xC9, 0xCE, 0x5A, 0x5C, 0xBF, 0xC9, 0xBF, 0xCE, 0x5A, 0x5A, 0x5C, 0x5C, 0xBF, - 0xC9, 0xC9, 0xC9, 0xC4, 0xAC, 0x54, 0xC3, 0xC3, 0xAD, 0x53, 0xBF, 0xBF, 0xBF, 0x34, 0x1, 0x52, - 0xC9, 0xBF, 0x36, 0x1, 0xA, 0x55, 0xBF, 0xBF, 0xBF, 0xC9, 0xAD, 0xBF, 0xBF, 0xBF, 0xBF, 0x59, - 0x52, 0xC9, 0xC9, 0xC9, 0xBF, 0xC9, 0xC9, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xC9, 0xBF, 0xAD, - 0xAD, 0xAD, 0xAD, 0xBF, 0x6B, 0x77, 0x65, 0x65, 0xBF, 0xC9, 0xCE, 0xCF, 0xF3, 0xF3, 0xCA, 0x5D, - 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x23, - 0x5, 0x25, 0x25, 0xB, 0x4, 0x39, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xE, - 0xE, 0xE, 0xE, 0x38, 0xB4, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, - 0xF7, 0xF0, 0xE9, 0xD8, 0xBD, 0xB8, 0xAC, 0x39, 0x24, 0x15, 0x17, 0x17, 0x17, 0x27, 0xF6, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xD8, 0xA3, - 0xE, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xAA, - 0x3A, 0x33, 0xE, 0x4, 0x4, 0x0, 0x20, 0x37, 0x1F, 0x1F, 0x4, 0x4, 0x52, 0x53, 0x54, 0x55, - 0x55, 0xAD, 0xAB, 0x4F, 0xC9, 0xC0, 0x55, 0xBF, 0xBF, 0xBF, 0xCE, 0x5C, 0x5A, 0x5C, 0x5C, 0xBF, - 0xBF, 0xBF, 0xBF, 0xC9, 0xC4, 0xAD, 0xC9, 0xAD, 0xBF, 0x54, 0xBF, 0xBF, 0xBF, 0x4F, 0x3, 0x46, - 0xBF, 0xC9, 0xBF, 0x36, 0x1, 0x3, 0x53, 0x55, 0x55, 0xBF, 0xAD, 0xBF, 0xBF, 0xBF, 0xBF, 0x59, - 0x4F, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xBF, 0xAD, 0xAD, 0xAD, 0x55, 0x55, 0xAD, 0xAD, 0xBF, 0xBF, - 0xBF, 0xC9, 0xBF, 0xBF, 0xAD, 0xAD, 0x55, 0xAD, 0xBF, 0xC9, 0xCB, 0xD0, 0xF3, 0xF3, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5, - 0x30, 0x97, 0x25, 0x20, 0x4, 0xB5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF9, - 0xBD, 0x41, 0xE, 0xE, 0xE, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xEF, 0xEF, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF9, 0xF7, 0xE9, 0xB6, 0xB8, 0xBD, 0x97, 0x27, 0x15, 0x24, 0x27, 0x4D, 0xF2, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0xB4, 0xF7, 0xD8, 0x33, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xAA, - 0x3C, 0x33, 0x2C, 0x5, 0x4, 0x0, 0x20, 0x39, 0x1F, 0x1F, 0x4, 0x4, 0x53, 0x53, 0x53, 0x53, - 0x53, 0x53, 0xBE, 0xC2, 0xC9, 0x5C, 0xBF, 0xBF, 0xAD, 0xBF, 0xCE, 0x5A, 0x5A, 0x5A, 0xBF, 0xAD, - 0xAD, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xAD, 0x55, 0x55, 0x55, 0x55, 0x36, 0x1, 0x34, - 0xCD, 0xBF, 0xBF, 0xC9, 0x52, 0x1, 0x3, 0x52, 0x55, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xC9, 0x59, - 0x52, 0xC9, 0xC9, 0xCD, 0xCD, 0xCD, 0xCD, 0xBF, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xBF, 0xC9, - 0xC9, 0xC9, 0xC0, 0xC9, 0xC9, 0xBF, 0xC0, 0xC9, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, 0x5B, 0x5D, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5A, 0x5A, 0x5A, 0x5A, 0x5B, 0x5B, 0x5, - 0x37, 0xB5, 0x29, 0x20, 0x6, 0x37, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE9, 0xA8, 0x31, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB5, 0x6, 0x16, 0x35, 0x99, 0xEF, 0xF9, 0xF2, 0xF2, 0xF2, 0xEB, - 0xB6, 0x97, 0xAC, 0x35, 0x6, 0x16, 0x39, 0x2, 0x2, 0x2, 0x2, 0x6, 0x16, 0x99, 0xF6, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, - 0xF9, 0xFD, 0xFD, 0xF8, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xAA, - 0x3C, 0x33, 0x2C, 0xD, 0x0, 0x0, 0x20, 0x39, 0x1F, 0x20, 0x4, 0x4, 0xBF, 0xC9, 0xC9, 0xC9, - 0xBF, 0xC9, 0xBF, 0xBF, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0xCE, 0x5C, 0x5C, 0x5A, 0x55, 0x46, - 0x4F, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x4F, 0x52, 0x52, 0x52, 0x52, 0x52, 0x12, 0x12, - 0xCD, 0xBF, 0xC9, 0xC9, 0xC9, 0x53, 0x3, 0x1A, 0x2F, 0x52, 0xAB, 0xBF, 0xBF, 0xBF, 0xC9, 0x55, - 0x52, 0xC9, 0xCD, 0xCD, 0xCD, 0xCD, 0xCB, 0xCD, 0xCF, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5A, 0x5B, 0x5A, 0x5B, 0x5B, 0x5D, 0xD, - 0x37, 0xD5, 0x6B, 0x20, 0x37, 0xFE, 0xEF, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB5, 0x15, 0x15, 0x6, 0x16, 0xAC, 0xAC, 0x24, 0x6, 0x16, 0x9, - 0x0, 0x0, 0x2, 0x2, 0x2, 0x2, 0x2, 0x14, 0x17, 0x26, 0x17, 0x2, 0x2, 0x2, 0x99, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0x3A, 0xEE, 0xFD, 0xE9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xAA, - 0x3C, 0x2E, 0x2C, 0x20, 0x0, 0x4, 0x20, 0x37, 0x20, 0x20, 0x4, 0x4, 0xD0, 0xC9, 0x36, 0x1A, - 0xA, 0x3, 0x1, 0x1, 0x3, 0x3, 0x3, 0x3, 0x3, 0x1A, 0xC9, 0x5A, 0x5C, 0x5A, 0x36, 0x34, - 0x34, 0x4F, 0x53, 0x59, 0x53, 0x53, 0x53, 0x53, 0x53, 0x52, 0x52, 0x52, 0x52, 0x52, 0x46, 0x3, - 0xCD, 0xBF, 0xC9, 0xC9, 0xCD, 0xC9, 0x34, 0x43, 0x52, 0xAD, 0xBF, 0xBF, 0xC9, 0xC9, 0xC9, 0x55, - 0x52, 0xC9, 0xCB, 0xCB, 0xCB, 0xCB, 0xCD, 0xCD, 0xCF, 0xCA, 0xCA, 0xCA, 0xCC, 0xCC, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5D, 0x5D, 0x5D, - 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x6, - 0x25, 0xD5, 0x71, 0xB, 0x30, 0xFE, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEF, 0x39, 0x27, 0x4D, 0x35, 0x16, 0x2, 0x14, 0x24, 0x24, 0x6, - 0x15, 0x14, 0x14, 0x15, 0x2, 0x2, 0x14, 0x15, 0x15, 0x17, 0x14, 0x2, 0x14, 0x15, 0x27, 0xF6, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xB6, 0x31, 0xE, 0x2C, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xA8, - 0x3C, 0x2E, 0xE, 0x20, 0x0, 0x0, 0xB, 0x37, 0x20, 0xB, 0x4, 0x0, 0xD0, 0x4C, 0x1A, 0x12, - 0xA, 0x8, 0x1A, 0xA, 0x12, 0x12, 0x1A, 0x8, 0x8, 0x1A, 0xBF, 0xC0, 0x5C, 0x5A, 0x36, 0x2F, - 0x2D, 0x2D, 0x2F, 0x36, 0x52, 0x55, 0x59, 0x59, 0x53, 0x53, 0x52, 0x52, 0x53, 0x54, 0x54, 0x1A, - 0xAD, 0xBF, 0xBF, 0xAD, 0xBF, 0xAD, 0x36, 0x4F, 0x55, 0xBF, 0xAD, 0xBF, 0xC4, 0x9D, 0xAD, 0x5A, - 0x52, 0xC9, 0xCD, 0xCB, 0xCB, 0xCF, 0xCB, 0xCD, 0xCE, 0xCA, 0xCA, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, - 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x2, - 0x1F, 0xE6, 0x97, 0xB, 0x4, 0x6E, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF9, 0xF8, 0xF7, 0xF5, 0x99, 0x16, 0x6, 0x6, 0x0, 0x2, 0x2, 0x15, 0x15, 0x17, 0x26, - 0x2A, 0x24, 0x17, 0x15, 0x15, 0x17, 0x24, 0x15, 0x15, 0x15, 0x17, 0x15, 0x15, 0x26, 0x15, 0xB5, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA8, - 0x3A, 0x32, 0x2C, 0x25, 0x0, 0x0, 0x5, 0x37, 0x20, 0xB, 0x4, 0x0, 0x36, 0x1A, 0x12, 0xA, - 0x12, 0x12, 0x8, 0xA, 0x12, 0x2D, 0x12, 0xA, 0x8, 0x2C, 0x55, 0xC9, 0xC0, 0x5C, 0x4C, 0x34, - 0x33, 0x38, 0x38, 0x3B, 0x48, 0x48, 0xA6, 0xAD, 0x55, 0x55, 0x55, 0x55, 0x53, 0x53, 0x53, 0x48, - 0x55, 0xCE, 0xCD, 0xCD, 0xCD, 0xCD, 0x54, 0x55, 0xBF, 0xC9, 0xBF, 0xBF, 0xBF, 0xA1, 0xC3, 0x55, - 0x2D, 0x2F, 0x36, 0x3D, 0x3D, 0x3D, 0x48, 0x3D, 0x3D, 0x46, 0x4F, 0x52, 0x52, 0x53, 0x53, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5A, 0x5B, 0x5B, 0x2, - 0x4, 0xDB, 0x39, 0xB, 0xFE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, - 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF9, 0xF5, 0xEE, 0xE9, 0xB8, 0x24, 0x15, 0x17, 0x26, 0x24, 0x17, 0x17, 0x15, 0x15, 0x15, 0x24, - 0x26, 0x26, 0x17, 0x15, 0x24, 0x24, 0x15, 0x14, 0x15, 0x17, 0x26, 0x26, 0x14, 0x15, 0x17, 0x24, - 0xE, 0x2C, 0x2C, 0xE, 0x94, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0x3A, 0xA3, 0xB6, 0xE9, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xBD, 0xA5, - 0x3A, 0x31, 0x25, 0x5, 0x4, 0x0, 0xD, 0x37, 0x20, 0x5, 0x4, 0x4, 0x1A, 0x1A, 0xA, 0x8, - 0x8, 0x3, 0x8, 0x3, 0x3, 0x3, 0xA, 0x2C, 0x12, 0x2D, 0x55, 0xC9, 0x5C, 0x5C, 0x52, 0x3B, - 0x3C, 0x33, 0x38, 0x3D, 0xA3, 0xA3, 0xA4, 0xAD, 0xAD, 0xBF, 0xBF, 0xAD, 0x55, 0x59, 0x55, 0x55, - 0x53, 0xC9, 0xCE, 0xCE, 0xCE, 0xCD, 0x54, 0xBF, 0xBF, 0xCF, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xAD, - 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xAB, 0xBF, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x6, - 0x1F, 0xE2, 0x6E, 0xB, 0xFE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xE, - 0xE, 0xE, 0x2C, 0x41, 0xB6, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF7, 0xEA, 0xD8, 0xBD, 0x3A, 0x15, 0x26, 0x26, 0x26, 0x26, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, - 0x26, 0x26, 0x17, 0x15, 0x24, 0x15, 0x15, 0x14, 0x15, 0x26, 0x26, 0x26, 0x15, 0x2, 0x15, 0x25, - 0x2C, 0x3A, 0xAA, 0x3A, 0x0, 0x94, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, - 0xE9, 0xB6, 0x3C, 0xE, 0x3A, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, - 0x3A, 0x30, 0xD, 0x0, 0x0, 0x0, 0xD, 0x39, 0x30, 0x1F, 0x0, 0x4, 0x2F, 0x1A, 0x12, 0x12, - 0x8, 0x8, 0x3, 0x3, 0xE, 0x2C, 0x33, 0x3C, 0x2F, 0x2F, 0x53, 0xCE, 0x5C, 0x5C, 0x52, 0x3A, - 0x2F, 0x3A, 0x48, 0xA6, 0xAD, 0xAD, 0xAD, 0xC4, 0xBF, 0xC9, 0xBF, 0xC4, 0xC4, 0xBF, 0xAD, 0xBF, - 0x59, 0x55, 0xCF, 0xCF, 0xCF, 0xCF, 0x54, 0xBF, 0xBF, 0xC9, 0xCF, 0xCD, 0xCD, 0xCD, 0xCF, 0xCE, - 0xBF, 0xC9, 0xCD, 0xCD, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5A, 0x5B, 0x5D, 0x6, - 0x6, 0xD7, 0x6E, 0x1F, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xB6, - 0x41, 0x2C, 0xE, 0xE, 0xE, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF5, 0xE9, 0xBD, 0xBD, 0x2E, 0x2, 0x24, 0x26, 0x26, 0x26, 0x17, 0x17, 0x15, 0x14, 0x14, 0x15, - 0x15, 0x17, 0x17, 0x24, 0x24, 0x15, 0x15, 0x14, 0x15, 0x26, 0x26, 0x15, 0x6, 0x0, 0xD, 0x2E, - 0x2C, 0x2C, 0x2C, 0x41, 0xA8, 0x0, 0x94, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xBD, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB7, 0xA3, - 0x3A, 0x31, 0xB, 0x0, 0x0, 0x0, 0xD, 0x37, 0x37, 0x1F, 0x0, 0x4, 0x1B, 0x1B, 0x1B, 0x18, - 0x12, 0x12, 0x8, 0x3, 0x3, 0x3, 0x8, 0x1A, 0x1A, 0x2C, 0x4F, 0xCE, 0x5A, 0x5A, 0x53, 0x2F, - 0x1A, 0x2F, 0x34, 0x48, 0x52, 0xA6, 0xA6, 0xAB, 0xAD, 0xAD, 0xAD, 0xA6, 0xA6, 0xA6, 0xA6, 0xAD, - 0xAD, 0xBF, 0xAD, 0xC4, 0xC4, 0xAD, 0x4C, 0x55, 0xC9, 0x5A, 0xC4, 0xC4, 0xC4, 0xC4, 0xC4, 0xCD, - 0x5A, 0xC9, 0xCE, 0xCE, 0xD0, 0xD0, 0xCD, 0xC9, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0xB, - 0x1F, 0xD7, 0x71, 0x6, 0x0, 0xED, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, - 0xFD, 0xFD, 0xE, 0xBB, 0x41, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF5, 0xE9, 0xD8, 0xBD, 0xA3, 0x2C, 0x32, 0x27, 0x24, 0x15, 0x15, 0x15, 0x15, 0x17, 0x17, 0x17, - 0x14, 0x15, 0x17, 0x26, 0x17, 0x14, 0x15, 0x14, 0x14, 0x17, 0x17, 0x26, 0x24, 0x2, 0xE, 0xE, - 0x2C, 0x2C, 0x2C, 0x2C, 0x31, 0x41, 0x31, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB8, 0xA3, - 0x3A, 0x32, 0xB, 0x0, 0x2, 0x0, 0xD, 0x37, 0x25, 0x6, 0x4, 0x4, 0x1B, 0x19, 0x19, 0x10, - 0x10, 0x10, 0x12, 0x12, 0x12, 0x12, 0x10, 0x10, 0xF, 0x10, 0x46, 0xCE, 0x5A, 0x5C, 0x53, 0x1A, - 0x18, 0x1A, 0x3B, 0x3B, 0x3B, 0x3D, 0xA5, 0x52, 0x48, 0x48, 0x52, 0xA4, 0x52, 0xA4, 0xA4, 0xA6, - 0xC4, 0xCD, 0xAD, 0xCD, 0xBF, 0xBF, 0x46, 0xBF, 0x4C, 0x5C, 0xC9, 0xC9, 0xC9, 0xC4, 0xC5, 0xC4, - 0x5A, 0xC9, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xD0, 0xD0, 0xCE, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0xCA, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5A, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x6, - 0x1F, 0xD7, 0x71, 0x6, 0x0, 0xA7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, - 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF8, 0xF5, 0xF0, 0xF0, 0xE9, 0xD8, 0xBB, 0xB6, 0x35, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, - 0x2, 0x14, 0x17, 0x17, 0x17, 0x15, 0x15, 0x15, 0x14, 0x24, 0x26, 0x26, 0x17, 0x14, 0x16, 0x41, - 0xAA, 0xA8, 0xA8, 0xA3, 0x33, 0xE, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0x41, 0xBB, 0xF7, 0xFD, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB6, 0x94, - 0x33, 0x2E, 0x6, 0x0, 0x2, 0x0, 0xD, 0x39, 0x29, 0x1F, 0x4, 0x4, 0x1C, 0x1A, 0x1D, 0x18, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x11, 0x1A, 0x2F, 0x10, 0x11, 0x1D, 0xD0, 0x5C, 0x5C, 0x55, 0x11, - 0x19, 0x19, 0x18, 0x3D, 0x48, 0x3D, 0x48, 0xA6, 0x55, 0xBF, 0xC9, 0xBF, 0xC4, 0xBF, 0xBF, 0xBF, - 0xBF, 0xC1, 0xC4, 0xC9, 0xBF, 0x55, 0x53, 0xBF, 0x4F, 0xBF, 0xBF, 0xC9, 0xC9, 0xC9, 0xAD, 0xBF, - 0xBF, 0x52, 0x52, 0x52, 0x53, 0x50, 0x53, 0x53, 0x55, 0x55, 0x55, 0x55, 0x50, 0x53, 0x5A, 0x5C, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x58, 0x5B, 0x5D, 0x4, - 0x4, 0xB5, 0x6B, 0x1F, 0x4, 0x3E, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, - 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x1, 0x7, - 0x7, 0x7, 0xE, 0x2C, 0x2C, 0x7, 0xE, 0x7, 0x0, 0x2C, 0x35, 0x16, 0x16, 0x16, 0x16, 0x15, - 0x2, 0x2, 0x2, 0x17, 0x17, 0x17, 0x15, 0x14, 0x2, 0x14, 0x15, 0x15, 0x15, 0x4D, 0x6F, 0x2C, - 0xE, 0xE, 0x2C, 0x31, 0xAA, 0x3A, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xBB, 0x41, 0x2C, 0x2C, 0x41, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xB6, 0x41, - 0x38, 0x2C, 0x6, 0x0, 0x2, 0x2, 0x25, 0x39, 0x29, 0x1E, 0x4, 0x4, 0x36, 0x1A, 0x55, 0x12, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x2E, 0x1A, 0x10, 0x10, 0x1B, 0xCE, 0x5C, 0x5C, 0x59, 0x18, - 0x19, 0x19, 0x19, 0x19, 0x3D, 0x48, 0x54, 0x54, 0x55, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0x54, 0xAD, - 0x55, 0x55, 0x55, 0xAD, 0x54, 0x3D, 0x59, 0xAD, 0x36, 0xAD, 0x53, 0x1B, 0x1B, 0x1B, 0x1D, 0x1A, - 0x19, 0x19, 0x1B, 0x19, 0x1B, 0x1B, 0x34, 0x53, 0xBF, 0xC2, 0xC0, 0xAB, 0xBF, 0xBF, 0xBF, 0xBF, - 0x5D, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5D, 0x6, - 0x4, 0xB2, 0x39, 0x1F, 0x4, 0x3E, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x7, 0x33, 0xAA, - 0x3C, 0x2C, 0x3A, 0x3C, 0x3A, 0x38, 0x41, 0x2C, 0xE, 0xE, 0xE, 0x31, 0x3F, 0xE, 0x9, 0x2, - 0x2, 0x0, 0x2, 0x17, 0x17, 0x17, 0x15, 0x2, 0x2, 0x6, 0x16, 0x16, 0x2E, 0x33, 0x33, 0x2C, - 0x2C, 0x2C, 0xE, 0x2C, 0x2C, 0xAA, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0xFD, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xB4, 0x41, - 0x38, 0x25, 0x6, 0x0, 0x4, 0x4, 0x25, 0x39, 0x29, 0x1E, 0x4, 0x1E, 0x1C, 0x36, 0x59, 0x12, - 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x1A, 0x1A, 0x18, 0x18, 0x10, 0xCE, 0xC0, 0x5A, 0x5A, 0x10, - 0x18, 0x19, 0x19, 0x19, 0x18, 0x19, 0x19, 0x19, 0x19, 0x11, 0x11, 0x19, 0x1A, 0x18, 0x1A, 0x1C, - 0x19, 0x19, 0x19, 0x42, 0x1D, 0x1B, 0x59, 0x12, 0x1A, 0x55, 0x53, 0x1A, 0x1A, 0x1A, 0x53, 0x36, - 0x46, 0x1B, 0x1B, 0x1C, 0x1C, 0x1B, 0x42, 0x4F, 0x5C, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5A, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0xD, - 0x1F, 0x9B, 0x37, 0x6, 0x4, 0x6F, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x38, 0xA3, 0x38, - 0x3F, 0xA3, 0x38, 0x2C, 0x33, 0x33, 0x2C, 0x2C, 0x2C, 0x2C, 0xE, 0xE, 0x3F, 0xE, 0x2, 0x15, - 0x17, 0x15, 0x15, 0x17, 0x17, 0x15, 0x9, 0x2E, 0x3A, 0x2C, 0x31, 0x33, 0x31, 0x31, 0x31, 0x2C, - 0x33, 0x38, 0x31, 0xE, 0x2C, 0x41, 0x31, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xE9, 0xB6, 0xA3, 0x38, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xAA, 0x3F, - 0x33, 0x25, 0x6, 0x4, 0x4, 0x0, 0x25, 0x6B, 0x29, 0x1E, 0x4, 0x1E, 0xC9, 0xC9, 0x55, 0xC9, - 0xCD, 0xC9, 0xCE, 0xD0, 0xC9, 0xC9, 0xCB, 0xCC, 0xCC, 0xCC, 0x53, 0xC9, 0xC9, 0x5A, 0x1C, 0x10, - 0x10, 0x18, 0x12, 0x10, 0x10, 0x12, 0x18, 0x18, 0x18, 0x18, 0x1B, 0x1A, 0x1A, 0x12, 0x12, 0x12, - 0x1A, 0x1B, 0x4F, 0x36, 0x36, 0x36, 0x53, 0x1B, 0xBF, 0x53, 0xBF, 0xAD, 0xBF, 0xBF, 0x55, 0xBF, - 0xC9, 0xBF, 0xBF, 0xBF, 0xBF, 0xC9, 0xAD, 0x52, 0x4F, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5D, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x6, - 0x6, 0x71, 0x29, 0x4, 0x4, 0xA9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xA3, - 0xE, 0xE, 0x33, 0xBD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0x2C, 0x2C, 0x3F, - 0x41, 0x33, 0x41, 0xAA, 0x2E, 0x16, 0x2C, 0x2C, 0xE, 0xE, 0xE, 0x38, 0x2C, 0x6, 0x14, 0x17, - 0x17, 0x17, 0x17, 0x17, 0x14, 0x15, 0x4E, 0x3A, 0x31, 0x2C, 0x2C, 0xB6, 0x3A, 0x2C, 0x2C, 0x31, - 0x33, 0x33, 0x38, 0xE, 0x2C, 0x3A, 0x33, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, - 0x33, 0xB6, 0xE9, 0xF5, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xA8, 0x3C, - 0x32, 0x25, 0x4, 0x0, 0x6, 0x0, 0x25, 0x37, 0x29, 0x1E, 0x1E, 0x1F, 0xCE, 0xC9, 0x55, 0xC9, - 0xC9, 0xC9, 0xC9, 0xCE, 0xC9, 0xC9, 0xCB, 0xCB, 0xCB, 0xCE, 0xCB, 0xBF, 0xCA, 0x46, 0x43, 0x1B, - 0x10, 0x10, 0x18, 0x18, 0x18, 0x18, 0x1A, 0x55, 0xC9, 0xC9, 0xCA, 0xC9, 0xC9, 0xCE, 0xCE, 0xC9, - 0xC9, 0xC0, 0xC9, 0xC9, 0xC9, 0x46, 0x50, 0x1B, 0xCD, 0xAD, 0x5C, 0xC9, 0xC9, 0xCD, 0x55, 0xC9, - 0xCB, 0xC9, 0xC9, 0xC9, 0xCD, 0xD0, 0xF3, 0xF3, 0xCD, 0xBF, 0xBE, 0xBF, 0xBF, 0xBF, 0xC0, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5A, 0x5B, 0x5B, 0x58, 0x5B, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x6, - 0x4, 0x37, 0x37, 0x1F, 0x4, 0xAF, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x41, 0xE, - 0xE, 0xE, 0xE, 0xE, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF7, 0xF5, 0xF5, 0xE, 0x2C, 0x33, 0x33, - 0xE, 0x3F, 0x3C, 0x25, 0x2, 0x2, 0x2, 0x9, 0x16, 0xE, 0x2C, 0x3F, 0x38, 0x9, 0x2, 0x14, - 0x15, 0x17, 0x17, 0x17, 0x15, 0x2, 0x16, 0x16, 0x2C, 0x2C, 0x2C, 0xB6, 0xE, 0xE, 0x2C, 0x2C, - 0x31, 0x33, 0x33, 0x2C, 0x33, 0xA3, 0x33, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xD8, - 0x33, 0x3A, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, 0x3A, - 0x2E, 0x25, 0x6, 0x0, 0x4, 0x0, 0x30, 0x67, 0x29, 0x1E, 0x1E, 0x1F, 0xC9, 0xC9, 0xA6, 0x9D, - 0x9F, 0x9F, 0xA1, 0xA1, 0xA2, 0xA1, 0xA2, 0xA1, 0xC4, 0xC9, 0xCB, 0xBF, 0xC9, 0x1A, 0x5A, 0x55, - 0x18, 0x19, 0x19, 0x19, 0x19, 0x19, 0x19, 0x1B, 0xC9, 0xCC, 0xCC, 0xCB, 0xCB, 0xC9, 0xCB, 0xCE, - 0xCE, 0xCE, 0xCD, 0xCB, 0xBF, 0x50, 0x55, 0x1B, 0xCD, 0xBF, 0x5C, 0xC9, 0xC9, 0xCD, 0x55, 0xC9, - 0xC9, 0xC9, 0xCD, 0xC9, 0xC9, 0xCF, 0xF3, 0xFA, 0xCD, 0x55, 0x55, 0x5C, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5D, 0x6, - 0x4, 0x3E, 0x37, 0x1F, 0x1E, 0xB2, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xAA, - 0xF9, 0xFD, 0xEA, 0x3F, 0xE, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF0, 0xE9, 0xE9, 0xE9, 0xE, 0x3A, 0x41, 0x41, - 0x2C, 0x2C, 0x2C, 0x16, 0x15, 0x15, 0x14, 0x2, 0x2, 0xD, 0x3C, 0x9, 0x2C, 0x3C, 0x2E, 0x6, - 0x2, 0x2, 0x15, 0x15, 0x15, 0x14, 0x2, 0x2, 0x16, 0x2C, 0x2C, 0xB4, 0x3A, 0x2C, 0x2C, 0x33, - 0x33, 0x31, 0x2C, 0x31, 0x33, 0x41, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xD8, 0x3A, 0x3A, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB7, 0x94, 0x38, - 0x2C, 0x20, 0xD, 0x0, 0x6, 0x0, 0x25, 0x37, 0x29, 0x1F, 0x1E, 0x1F, 0xC9, 0xCE, 0x52, 0x52, - 0x52, 0x52, 0x54, 0x52, 0x54, 0x54, 0x54, 0x55, 0xC9, 0xC9, 0xC9, 0xBF, 0x55, 0x43, 0x5B, 0x50, - 0x43, 0x19, 0x1B, 0x1B, 0x4D, 0x1B, 0x42, 0xAD, 0xCF, 0xD0, 0xD0, 0xD0, 0xD0, 0xC9, 0xCB, 0xCF, - 0xCB, 0xCF, 0xCE, 0xCE, 0x55, 0x59, 0xC9, 0x36, 0xBF, 0x55, 0xBF, 0xC9, 0xC4, 0xCD, 0x55, 0x55, - 0xAD, 0xBF, 0xC9, 0xC9, 0xCD, 0xF3, 0xFA, 0xFA, 0xD0, 0xCA, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0xCA, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x6, - 0x1F, 0x97, 0x37, 0x1F, 0x1E, 0xB2, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF5, 0xE9, 0xBD, 0xBD, 0xBD, 0xE, 0xA3, 0x33, 0xE, - 0x31, 0x3C, 0x2C, 0x2, 0x2, 0x14, 0x2, 0x2, 0x0, 0x2, 0x6, 0x9, 0x6, 0x9, 0x2, 0x0, - 0x0, 0x0, 0x2, 0x15, 0x15, 0x15, 0x17, 0x14, 0x2, 0x15, 0x2C, 0xE, 0x38, 0xA3, 0x3C, 0x31, - 0x2C, 0xE, 0x2C, 0x38, 0x33, 0x38, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE9, 0x3A, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB8, 0x94, 0x38, - 0x2C, 0x25, 0xD, 0x4, 0x6, 0x0, 0x4, 0x1F, 0x22, 0x1F, 0x1E, 0x1E, 0xBF, 0xCE, 0x54, 0x9D, - 0x9D, 0x9D, 0x9F, 0x9F, 0x9D, 0x9D, 0x9D, 0x9D, 0xC4, 0xCA, 0xC9, 0xBF, 0xAD, 0x50, 0x5A, 0x4F, - 0x1D, 0x1B, 0x1B, 0x1B, 0x36, 0x1B, 0xAD, 0xF3, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xCE, 0xCA, 0xC3, - 0xC9, 0xC9, 0xCB, 0xC9, 0x52, 0x5A, 0xC9, 0x4C, 0xC9, 0xBF, 0x5C, 0xCD, 0xC9, 0xCD, 0x53, 0x53, - 0xBF, 0xC9, 0xCB, 0xD0, 0xD0, 0xD0, 0xD0, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0xCA, 0x5D, 0xCA, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0xD, - 0x6, 0x25, 0xB, 0x6, 0x6, 0xAE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x33, 0x3C, - 0xF5, 0xFD, 0xFD, 0xFD, 0xEE, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xEE, 0xBD, 0xBD, 0xBB, 0xBB, 0xE, 0x33, 0x38, 0x3A, - 0x33, 0x2C, 0x2C, 0x6, 0x15, 0x15, 0x15, 0x15, 0x6, 0x14, 0x2, 0x0, 0x0, 0x0, 0x2, 0x2, - 0x0, 0x2, 0x15, 0x15, 0x15, 0x15, 0x15, 0x17, 0x14, 0x2, 0x14, 0x2, 0x2, 0x6, 0x35, 0xA8, - 0x3C, 0xE, 0x38, 0xB4, 0x41, 0x1, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xA3, - 0xE, 0xB4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB7, 0x94, 0x38, - 0x2C, 0x2C, 0xD, 0xB, 0x0, 0x0, 0x4, 0x4, 0x20, 0x1E, 0x4, 0x1E, 0x54, 0xCD, 0x53, 0xAD, - 0xAD, 0x55, 0xAD, 0xAD, 0xAD, 0xBF, 0xC9, 0xC9, 0xC9, 0xCA, 0xC9, 0xBF, 0xCE, 0x4F, 0x46, 0xBF, - 0x55, 0xBF, 0xC9, 0xC9, 0xCA, 0xCE, 0xF3, 0xF3, 0xF3, 0xCE, 0xCE, 0xCE, 0xCE, 0xC9, 0xC0, 0xCD, - 0xCD, 0xCD, 0xCD, 0xCD, 0x46, 0x5C, 0xC9, 0xBF, 0xCD, 0xBF, 0x5C, 0xC9, 0xC9, 0xCE, 0x55, 0xAD, - 0xBF, 0xBF, 0xC9, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0xD, - 0x4, 0x4, 0x4, 0x4, 0x1F, 0x6E, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xD8, 0xE, - 0x2C, 0xFD, 0xFD, 0xFD, 0xE, 0x38, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBB, 0xBB, 0x31, 0xA5, 0x31, 0x31, - 0x2C, 0x33, 0x32, 0x14, 0x26, 0x26, 0x26, 0x24, 0x15, 0x15, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, - 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x17, 0x14, 0x2, 0x14, 0x15, 0x15, 0x14, 0x16, 0xE, - 0x38, 0xAA, 0x94, 0x31, 0x0, 0x94, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, - 0xF7, 0x41, 0xF0, 0x31, 0xEE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, 0x3A, - 0x31, 0x2C, 0x20, 0x20, 0xFE, 0x0, 0x20, 0x25, 0x22, 0x1E, 0x1E, 0x1E, 0xC4, 0xCD, 0xBF, 0x96, - 0x9A, 0x9A, 0x9A, 0x9A, 0x9B, 0x9D, 0x99, 0x99, 0xAD, 0xCA, 0xCA, 0xBF, 0xCC, 0xCB, 0xD0, 0x5C, - 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xCE, 0xF3, 0xF3, 0xCD, 0xBF, 0xC9, 0xCD, 0xCD, 0xC9, 0x55, 0x53, - 0x4F, 0x52, 0x52, 0x52, 0x1D, 0x5A, 0x4F, 0x4F, 0xCE, 0xC9, 0x5C, 0xCD, 0xCE, 0xD0, 0x55, 0x53, - 0x55, 0x55, 0xBF, 0xBF, 0xBF, 0xBF, 0x5C, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0xCA, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0xB, - 0x1F, 0x20, 0xB, 0x6, 0x1F, 0x6E, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBD, - 0x3F, 0xFD, 0xFD, 0xFD, 0x38, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBB, 0xBB, 0xBB, 0xE, 0x33, 0xA3, 0x38, - 0xE, 0x0, 0xD, 0x15, 0x26, 0x15, 0x14, 0x2, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x14, - 0x14, 0x2, 0x14, 0x14, 0x2, 0x14, 0x24, 0x17, 0x15, 0x2, 0x15, 0x26, 0x26, 0x26, 0x15, 0x9, - 0x9, 0x7, 0x9, 0xE, 0x41, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x3F, - 0xE9, 0xD8, 0xF5, 0xE9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xA8, 0x3F, - 0x33, 0x2C, 0x20, 0xD, 0x0, 0x0, 0x37, 0x3E, 0x25, 0x1F, 0xB, 0x4, 0xC4, 0xCD, 0xBF, 0x55, - 0xCB, 0xCE, 0xD0, 0xCE, 0xCC, 0xCE, 0xCC, 0xCC, 0xCC, 0xCC, 0xCB, 0x5C, 0xD0, 0xC9, 0x5C, 0x5C, - 0xC9, 0xCA, 0xCB, 0xCD, 0xC9, 0xCD, 0xCD, 0xBF, 0xC9, 0xBF, 0xBF, 0xBF, 0xC9, 0xC9, 0xC9, 0xBF, - 0xC9, 0xC2, 0xC2, 0xC2, 0x46, 0xC0, 0xCE, 0xCE, 0xCE, 0xCD, 0xC9, 0xF3, 0xF3, 0xF3, 0xCE, 0xCE, - 0xCE, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0xB, - 0x1F, 0x29, 0x20, 0x1F, 0x1F, 0xAF, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBB, 0xBB, 0xBB, 0xE, 0x2C, 0xE, 0x31, - 0x38, 0xE, 0x6F, 0x16, 0x15, 0x35, 0x40, 0x3C, 0x16, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x14, - 0x14, 0x14, 0x14, 0x14, 0x2, 0x15, 0x15, 0x15, 0x15, 0x24, 0x24, 0x24, 0x26, 0x26, 0x26, 0x4D, - 0xE9, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, - 0xE, 0x41, 0xAA, 0xF7, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xAA, 0x41, - 0x33, 0x30, 0xD, 0x4, 0x7, 0xFE, 0x32, 0x37, 0x20, 0x5, 0x5, 0x4, 0xCF, 0xC4, 0xC9, 0x5C, - 0x55, 0xC9, 0xD0, 0xD0, 0xC9, 0xBF, 0x54, 0x53, 0x53, 0x52, 0x55, 0x53, 0xCE, 0x5C, 0x5A, 0x5C, - 0xC4, 0x52, 0x36, 0x36, 0x52, 0xBF, 0xBF, 0xC9, 0xC9, 0xC9, 0xC9, 0xCD, 0xCD, 0xD0, 0xD0, 0xD0, - 0xD0, 0xC9, 0xD0, 0xBF, 0x50, 0xCC, 0xF3, 0xD0, 0xD0, 0xD0, 0xC9, 0xD0, 0xD0, 0xD0, 0xCC, 0xCC, - 0xCC, 0xD0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x6, - 0x1F, 0x37, 0xB, 0x4, 0x4, 0xD5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBB, 0xBB, 0xBB, 0x2C, 0x3C, 0x2C, 0x2C, - 0xE, 0x7, 0xAA, 0xA5, 0xA3, 0x94, 0x94, 0x41, 0x40, 0x16, 0x15, 0x24, 0x15, 0x16, 0x15, 0x15, - 0x15, 0x15, 0x15, 0x15, 0x14, 0x15, 0x15, 0x15, 0x17, 0x26, 0x26, 0x26, 0x17, 0x26, 0x17, 0x39, - 0xEE, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, - 0xF7, 0xB4, 0x33, 0xE, 0xAA, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB8, 0x94, - 0x38, 0x31, 0xD, 0xD, 0x4, 0x4, 0x3E, 0x6B, 0x25, 0x4, 0x4, 0x4, 0xF3, 0xCD, 0xCE, 0x5C, - 0x5C, 0x5C, 0x5A, 0x55, 0x1A, 0x1A, 0x3, 0x3, 0x10, 0x1A, 0x36, 0x36, 0xC9, 0xC9, 0x5C, 0x5A, - 0x48, 0x36, 0x1C, 0x1C, 0x4C, 0x54, 0xBF, 0xCD, 0xCF, 0xD0, 0xD0, 0xD0, 0xD0, 0xF3, 0xF3, 0xF3, - 0xD0, 0xC9, 0xD0, 0x52, 0x5A, 0xCC, 0xD0, 0xD0, 0xD0, 0xD0, 0xC0, 0xD0, 0xD0, 0xCC, 0xCC, 0xCC, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x6, - 0x1F, 0x37, 0x6, 0xFE, 0x71, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x31, 0xA3, - 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xBD, 0xE, 0x41, 0xA8, 0x3C, - 0x2C, 0xE, 0xBB, 0xB7, 0xB6, 0xAA, 0xA5, 0xA3, 0xA3, 0xA3, 0x40, 0x35, 0x39, 0x40, 0x39, 0x16, - 0x15, 0x15, 0x15, 0x15, 0x15, 0x14, 0x15, 0x15, 0x17, 0x26, 0x26, 0x17, 0x17, 0x26, 0x17, 0x39, - 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, - 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB8, 0xA3, - 0x3B, 0x2C, 0xD, 0x20, 0x0, 0x0, 0x3E, 0x6E, 0x25, 0x4, 0x4, 0x4, 0xCE, 0xC9, 0xCE, 0xC9, - 0x5C, 0x5C, 0x5C, 0x4F, 0xA, 0x1A, 0x18, 0x12, 0x1A, 0x1B, 0x36, 0x36, 0xC9, 0xC9, 0x5C, 0x5A, - 0x46, 0x3D, 0x3D, 0x3D, 0x3D, 0x4C, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x55, 0xC9, 0xCD, - 0xCD, 0xBF, 0xCE, 0x46, 0x5A, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0x5C, 0xD0, 0xD0, 0xCC, 0xCC, 0xCC, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x6, - 0x1F, 0x37, 0x20, 0x20, 0xD5, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xE, - 0xE, 0xE, 0x2C, 0x41, 0xB6, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xBD, 0xE, 0x2C, 0x2C, 0x41, - 0xA3, 0x2C, 0xE9, 0xE9, 0xE9, 0xBD, 0xBD, 0xB7, 0xB7, 0xBD, 0xB7, 0xB6, 0xB4, 0xAA, 0xA8, 0xA3, - 0x4E, 0x35, 0x9, 0x6, 0x2, 0x14, 0x17, 0x17, 0x17, 0x17, 0x26, 0x26, 0x26, 0x26, 0x17, 0x99, - 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0x2C, 0x38, 0xB4, 0xF5, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB8, 0xA3, - 0x3A, 0x2C, 0x25, 0x25, 0x0, 0x0, 0x3E, 0x6E, 0x25, 0x1E, 0x4, 0x4, 0xC9, 0xC9, 0xC9, 0xD0, - 0x5C, 0x5C, 0x50, 0x1A, 0x3, 0xA, 0x12, 0x18, 0x1C, 0x1C, 0x36, 0x36, 0xBF, 0xC9, 0x5C, 0x5A, - 0x46, 0x3D, 0x4C, 0x48, 0x52, 0x52, 0x52, 0x52, 0x52, 0x54, 0x53, 0x55, 0x54, 0x55, 0xAD, 0x55, - 0xAD, 0xAD, 0xC1, 0x1D, 0x5A, 0xBF, 0xC9, 0xC9, 0xD0, 0xD0, 0x5C, 0xD0, 0xD0, 0xD0, 0xCC, 0xCC, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5D, 0x6, - 0x1F, 0x39, 0x20, 0x4, 0x6, 0x39, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB6, - 0x41, 0x2C, 0xE, 0xE, 0xE, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xE9, 0x2C, 0x31, 0x2C, 0x2C, - 0x2C, 0xE, 0xF7, 0xF7, 0xF7, 0xF7, 0xF5, 0xF5, 0xF5, 0xF7, 0xF5, 0xF0, 0xEE, 0xE9, 0xBD, 0xB7, - 0xB6, 0xB4, 0xA5, 0x35, 0x9, 0x6, 0x15, 0x17, 0x17, 0x17, 0x26, 0x26, 0x26, 0x26, 0x24, 0xEB, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x3A, - 0xFD, 0xF5, 0xAA, 0x33, 0xE, 0x2C, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xB6, 0x94, - 0x38, 0x2C, 0x25, 0x20, 0x0, 0x0, 0x6C, 0x39, 0x20, 0x1E, 0x4, 0x4, 0x52, 0x52, 0x52, 0x52, - 0x52, 0x36, 0x12, 0x3, 0xA, 0x3, 0x18, 0x12, 0x1A, 0x34, 0x36, 0x36, 0x55, 0xC9, 0x5C, 0x5A, - 0x46, 0x36, 0x3D, 0x48, 0x52, 0xAB, 0x55, 0xBF, 0xBF, 0xAD, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, - 0xAD, 0xAD, 0xBF, 0x1D, 0x5A, 0xBF, 0xC9, 0xBF, 0xCD, 0xC9, 0xBF, 0xCE, 0xCD, 0xCC, 0xCC, 0xCC, - 0xCC, 0xD0, 0xCE, 0xCE, 0xCE, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5D, - 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x6, - 0x1F, 0x6B, 0x25, 0x6, 0x0, 0x20, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF7, 0xBB, 0xA3, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xEE, 0x2C, 0xE, 0x2C, 0x2C, - 0x2C, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF7, 0xF0, - 0xE9, 0xD8, 0xBD, 0xB8, 0xAA, 0x35, 0x16, 0x15, 0x17, 0x17, 0x15, 0x15, 0x17, 0x26, 0x4D, 0xF9, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xB4, 0x41, - 0x33, 0x30, 0xD, 0x5, 0x4, 0x4, 0x6C, 0x39, 0x20, 0x1E, 0x4, 0x1E, 0xE, 0x7, 0x3, 0x1, - 0x3, 0x3, 0xA, 0xA, 0x1A, 0xA, 0x18, 0x1A, 0x1B, 0x34, 0x36, 0x36, 0x53, 0xC9, 0x5C, 0x5A, - 0x4F, 0x3D, 0x3D, 0x3D, 0x52, 0xA6, 0x54, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xBF, 0xAD, - 0xAD, 0xAD, 0xAB, 0x46, 0xBF, 0xBF, 0xBF, 0xBF, 0xAD, 0xAD, 0x55, 0xBF, 0xBF, 0xC9, 0xCE, 0xCE, - 0xCE, 0xC9, 0xCE, 0xCE, 0xCE, 0xC9, 0xC9, 0xC0, 0xC0, 0xC0, 0xC0, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, - 0x5D, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, - 0x5D, 0x5B, 0x5B, 0x5D, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x6, - 0x1F, 0x39, 0x20, 0x25, 0x1F, 0x39, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xF0, 0xE, 0x2C, 0x2C, 0x31, - 0x2C, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, - 0xF7, 0xF0, 0xE9, 0xD8, 0xBD, 0xBB, 0xAC, 0x39, 0x24, 0x15, 0x17, 0x17, 0x17, 0x27, 0xF6, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, - 0x31, 0xE, 0x31, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xAA, 0x3C, - 0x33, 0x25, 0x6, 0x4, 0x4, 0x4, 0x37, 0x37, 0x20, 0x1F, 0x4, 0x1E, 0x2C, 0x2C, 0x8, 0x3, - 0x3, 0x3, 0x3, 0x3, 0x3, 0xA, 0x1A, 0x1A, 0x2F, 0x36, 0x36, 0x34, 0x52, 0xC9, 0x5C, 0x59, - 0x34, 0x36, 0x3B, 0x3D, 0x36, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x3D, 0x52, 0xAB, 0xAD, 0xBF, 0x36, - 0x8, 0xAD, 0x3D, 0x50, 0xBF, 0xAD, 0xAD, 0xBF, 0xBF, 0xAD, 0x55, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, - 0xAD, 0xBF, 0xBF, 0xBF, 0xBF, 0xC9, 0xC2, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCA, 0xCA, 0xCA, 0x5D, - 0x5D, 0x5D, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, - 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x6, - 0x1F, 0x97, 0x25, 0x6, 0x6, 0x25, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xF0, 0xE, 0x2C, 0x2C, 0x2C, - 0x2C, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF9, 0xF7, 0xF0, 0xE9, 0xE9, 0xD8, 0xBD, 0xB8, 0x97, 0x4D, 0x4D, 0x99, 0xF6, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0xBD, 0xFD, 0xE, 0xA3, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA5, 0x3A, - 0x32, 0x25, 0x6, 0x4, 0xB, 0x4, 0x30, 0x25, 0x25, 0x1F, 0x4, 0x1E, 0x2C, 0x2F, 0xA, 0xA, - 0x3, 0xA, 0xA, 0x1A, 0x12, 0x12, 0x1A, 0x1A, 0x2F, 0x36, 0x2F, 0x34, 0x4F, 0xC9, 0x5C, 0x50, - 0x1A, 0x3B, 0x3D, 0x3D, 0x3D, 0x48, 0x54, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xAD, 0xBF, 0xA6, 0x1, - 0x8, 0x52, 0x2F, 0x56, 0xAD, 0xAD, 0xAD, 0xBF, 0xCD, 0xC1, 0xBF, 0xCD, 0xCD, 0xCD, 0xCD, 0xCE, - 0xCE, 0xCE, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xCE, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, - 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, - 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0xB, - 0x6, 0xB5, 0x6E, 0x6, 0x1F, 0x20, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xF0, 0xE, 0x31, 0x2C, 0x2C, - 0x3F, 0x7, 0x2C, 0xE, 0x2C, 0x2C, 0x2C, 0xE, 0xE, 0xE, 0xE, 0x2C, 0x2C, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF9, 0xF7, 0xF5, 0xF0, 0xF0, 0xF5, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0xF8, 0xFD, 0xE, 0xF9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, 0x3A, - 0x30, 0x25, 0x4, 0x4, 0x5, 0x4, 0x30, 0x30, 0x20, 0xB, 0x4, 0x4, 0x1A, 0xA, 0xA, 0x1A, - 0x1C, 0x36, 0x36, 0x36, 0x1A, 0x1A, 0xA, 0x3, 0x7, 0xA, 0xA, 0x2F, 0x3D, 0xCE, 0x5A, 0x1D, - 0x12, 0x3B, 0x3D, 0x3D, 0x48, 0x54, 0xAD, 0xBF, 0xBF, 0xAD, 0xAD, 0xAD, 0xBF, 0xAD, 0x1, 0x8, - 0x8, 0x36, 0x12, 0x57, 0xBF, 0xBF, 0xBF, 0xCD, 0xCD, 0xC1, 0x55, 0xCD, 0xCD, 0xCD, 0xCD, 0xCE, - 0xCE, 0xF3, 0xF3, 0xD0, 0xD0, 0xD0, 0xD0, 0xCE, 0xCA, 0xCA, 0x5D, 0xCA, 0xCA, 0xCA, 0x5D, 0xCA, - 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5D, 0x5B, 0x5D, 0x5B, 0x5D, 0x5D, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0xB, - 0x1E, 0xA7, 0x3E, 0x1F, 0x1F, 0x20, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xF0, 0xE, 0x2C, 0x2C, 0x3A, - 0xAA, 0xE, 0x33, 0xB6, 0x41, 0x3A, 0x3A, 0x31, 0x2C, 0x2C, 0x31, 0x33, 0x2C, 0x1, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0x3A, 0xFD, 0xE, 0xF0, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA5, 0x3A, - 0x32, 0x30, 0x5, 0x4, 0x5, 0x4, 0x25, 0x25, 0x20, 0x1F, 0x4, 0x4, 0x2F, 0x12, 0x12, 0x1A, - 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1C, 0x34, 0x2F, 0x1A, 0x12, 0x2F, 0x2D, 0x36, 0xCE, 0x5A, 0xA, - 0x8, 0x3B, 0x3D, 0x3D, 0x52, 0xAD, 0xAD, 0xAD, 0xAB, 0xA6, 0xA6, 0xA6, 0x52, 0x7, 0x3, 0x3, - 0x3, 0x7, 0x8, 0x43, 0x3D, 0x36, 0x36, 0x3D, 0x3D, 0x3D, 0x36, 0x34, 0x34, 0x34, 0x34, 0x36, - 0xCD, 0xC9, 0xCD, 0xCE, 0xD0, 0xCE, 0xCE, 0xCD, 0xCE, 0xCA, 0x5D, 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, - 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5B, 0x5D, 0x5D, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0xB, - 0x4, 0xAF, 0x39, 0xB, 0x4, 0x29, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF9, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xF0, 0x31, 0x41, 0x31, 0xA8, - 0x2C, 0x2C, 0xE, 0x3A, 0x3A, 0x38, 0x3A, 0x31, 0x2C, 0x2C, 0x31, 0x33, 0x38, 0x2C, 0x0, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xB6, 0xFD, 0xE, 0x2C, 0xD8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xAA, 0x3C, - 0x33, 0x2C, 0xB, 0x4, 0x4, 0x4, 0x30, 0x25, 0x20, 0xB, 0x0, 0x4, 0x1A, 0x1A, 0x1A, 0x12, - 0xA, 0x12, 0x1A, 0x36, 0x36, 0x34, 0x34, 0x2F, 0x1A, 0x1A, 0x1A, 0x2F, 0x2F, 0xCE, 0x50, 0x0, - 0x7, 0x3D, 0x3B, 0x3D, 0x48, 0x52, 0xAB, 0xA6, 0x3, 0xF, 0x1, 0x1, 0x12, 0x1D, 0x18, 0x3, - 0x0, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x0, 0x1, 0x0, 0xF, 0xF, 0xF, 0x10, 0x10, 0x19, - 0xBF, 0xCE, 0xCE, 0xD0, 0xD0, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0x5D, 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, - 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5D, 0x50, 0x51, 0x5A, 0x5B, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0xB, - 0x4, 0xB2, 0x6B, 0xD, 0x4, 0x97, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x2C, - 0x38, 0xB4, 0xF5, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xEE, 0x41, 0x1, 0xA5, 0x3A, - 0x2C, 0x2C, 0x2C, 0x33, 0x33, 0x33, 0x33, 0xE, 0x2C, 0x2C, 0x2C, 0x33, 0x38, 0x31, 0xE, 0x7, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xB4, 0x41, - 0x33, 0x2C, 0xE, 0x5, 0x4, 0x0, 0x30, 0x25, 0x20, 0xB, 0x0, 0x4, 0x2F, 0x1C, 0x1C, 0x1C, - 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x2F, 0x34, 0x2F, 0x34, 0x34, 0x34, 0x34, 0x2F, 0xC9, 0x43, 0x0, - 0x1, 0x3D, 0x36, 0x3A, 0x36, 0x3D, 0x48, 0xA, 0x1, 0x1, 0x0, 0xFE, 0x52, 0x55, 0x10, 0x0, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0xFE, 0x0, 0x0, 0x0, 0x1, 0xF, 0x10, 0x11, 0x43, - 0xBF, 0xD0, 0xD0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0x5D, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, - 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x4F, 0x0, 0x3, 0x10, 0x10, 0x10, 0x1B, 0x42, 0x43, 0x43, 0x5D, - 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0xB, - 0x4, 0xD5, 0x97, 0xB, 0x4, 0xE6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x3A, 0xFD, - 0xF5, 0xAA, 0x33, 0xE, 0x2C, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xEA, 0xF7, 0x94, 0x0, 0x2C, - 0x2C, 0x2C, 0xE, 0x2C, 0x31, 0x31, 0x2C, 0x2C, 0x2C, 0x31, 0x31, 0x31, 0x2C, 0x2C, 0x3C, 0x33, - 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xB6, 0x41, - 0x33, 0x2C, 0x2C, 0xB, 0x4, 0x0, 0x30, 0x25, 0x20, 0x5, 0x0, 0x4, 0xA, 0x3, 0x3, 0x1, - 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x1, - 0x1, 0xF, 0xF, 0xF, 0xF, 0x1, 0x0, 0x1, 0x0, 0xFE, 0xFE, 0x0, 0x52, 0x59, 0x1, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x1, 0x10, 0x42, - 0x36, 0x53, 0x54, 0x1B, 0x52, 0x19, 0x43, 0x1B, 0x1B, 0x1D, 0x1D, 0x43, 0x1D, 0x1D, 0x1B, 0x1D, - 0x1B, 0x1D, 0x1B, 0x1B, 0x1A, 0x1, 0x1, 0x3, 0x3, 0x1, 0x1, 0x1, 0x1, 0x3, 0x3, 0x5B, - 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0xB, - 0x1E, 0xD7, 0x97, 0x6, 0x4, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xE9, 0xEA, 0xEE, 0x3F, 0xE, - 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0x7, 0xA8, 0xA8, 0xB4, 0x41, 0x31, 0xB4, 0x38, - 0x7, 0x0, 0x9, 0xE, 0xE, 0xE, 0x31, 0xE, 0xE, 0xE, 0xE, 0x2C, 0x2C, 0xE, 0x2C, 0xE, - 0xE, 0x2C, 0x2C, 0xE, 0xE, 0xE, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB6, 0x94, - 0x38, 0x31, 0x2C, 0x5, 0x4, 0x4, 0x30, 0x37, 0x20, 0x5, 0x4, 0x4, 0x8, 0x10, 0x3, 0x1, - 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0xFE, 0x0, 0xFE, 0x0, 0x0, 0x0, - 0x1, 0x1, 0x1, 0xF, 0x1, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x1, 0x52, 0x50, 0x0, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xA, 0x1A, 0x1A, 0x1A, 0x12, 0x12, 0x1B, 0x1D, - 0xF, 0x10, 0x1, 0xF, 0x1, 0x10, 0x1, 0x1, 0xF, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, - 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x1, 0x34, 0x44, 0x44, 0x44, 0x44, 0x44, 0x46, 0x46, 0x50, - 0x50, 0x59, 0x56, 0x51, 0x57, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x6, - 0x1F, 0xDB, 0xA9, 0x4, 0x4, 0xFC, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0x2C, - 0xE, 0x31, 0xAA, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xD8, 0xE9, 0x3F, 0x0, 0x2C, 0x2C, 0x38, 0xA3, 0x33, 0x3F, - 0xA8, 0x31, 0xE, 0xE, 0xE, 0x41, 0x3F, 0x2C, 0x33, 0x31, 0x2C, 0x38, 0x38, 0x2C, 0x2C, 0x2C, - 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, - 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB8, 0x94, - 0x38, 0x31, 0xE, 0x4, 0x5, 0x4, 0x20, 0x30, 0x20, 0x6, 0x4, 0x4, 0x53, 0x53, 0x50, 0x47, - 0x49, 0x45, 0x1B, 0x1, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x3, 0x52, 0x46, 0x0, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x12, 0x53, 0x54, 0x54, 0xB9, 0xAD, 0x53, 0x1B, - 0x0, 0x0, 0x0, 0x1, 0x0, 0x1, 0x1, 0x0, 0x3, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0x0, 0xFE, 0x0, 0x0, 0x0, 0x12, 0x47, 0x49, 0x49, 0x49, 0x47, 0x49, 0x46, - 0x42, 0x44, 0x42, 0x42, 0x1B, 0x1D, 0x1B, 0x42, 0x1D, 0x50, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x6, - 0x1F, 0xDB, 0x97, 0x4, 0x4, 0xD5, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xE9, - 0xFD, 0xF0, 0x3A, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xEE, 0xD8, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xE9, 0x41, 0x0, 0x2C, 0x2C, 0x33, 0xAA, 0x7, - 0x7, 0x38, 0xA3, 0x38, 0x33, 0xA3, 0x2C, 0x33, 0x33, 0x31, 0x3A, 0xB4, 0xAA, 0x33, 0x31, 0x2C, - 0x2C, 0x33, 0x33, 0x33, 0x2C, 0x2C, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0x2C, 0x38, 0xB4, 0xF5, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB7, 0xA3, - 0x38, 0x31, 0xE, 0x0, 0x7, 0x4, 0xD, 0x25, 0x25, 0xB, 0x4, 0x4, 0xEC, 0xEC, 0xC2, 0xC1, - 0xC1, 0xC1, 0xC1, 0xC1, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xA, 0x52, 0x42, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x52, 0x54, 0xAD, 0xA1, 0x99, 0x53, 0x1A, - 0xFE, 0xFE, 0x0, 0x1, 0x0, 0x1, 0x0, 0x0, 0x1, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0xAB, 0xBE, 0xBE, 0xBE, 0xC1, 0xC2, - 0xC2, 0xC2, 0xCE, 0xCE, 0xC0, 0xC0, 0xC0, 0xC2, 0xC0, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x6, - 0x1F, 0xD5, 0x97, 0xB, 0x6, 0x6B, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF9, - 0xFD, 0xFD, 0xF9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xEA, 0xD8, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBB, 0xBB, 0xBD, 0xBD, 0xE9, 0x41, 0x0, 0x2C, 0xE, 0xAA, 0x7, - 0x7, 0xE, 0x2C, 0x41, 0xA3, 0x2C, 0x2C, 0x33, 0x33, 0x33, 0xAA, 0xAA, 0x94, 0x3A, 0xA3, 0x33, - 0x3F, 0x31, 0x33, 0x33, 0x2C, 0xE, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x3A, - 0xFD, 0xF5, 0xAA, 0x33, 0xE, 0x2C, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, - 0x38, 0x33, 0xE, 0x0, 0x4, 0x4, 0x20, 0x30, 0x29, 0x6, 0x4, 0x4, 0x48, 0x3D, 0x3D, 0x3D, - 0x3B, 0x3B, 0x3A, 0x3B, 0x7, 0x0, 0x1, 0x0, 0x1, 0x3, 0x8, 0xA, 0xA, 0x1, 0xFE, 0xFE, - 0x0, 0x12, 0x1A, 0x2D, 0x12, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x1A, 0x53, 0x1B, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x34, 0x54, 0xAD, 0xE1, 0xAD, 0x53, 0x44, - 0x1B, 0x7, 0x0, 0x3, 0x0, 0x1, 0x1, 0x0, 0x3, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, - 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0xBE, 0xC2, 0xC2, 0xC2, 0x5D, - 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5A, 0x6, - 0x6, 0xAF, 0x97, 0x20, 0x1F, 0x25, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xAA, 0x3A, - 0xF0, 0xFD, 0xE9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF7, 0xEE, 0xE9, 0xE9, 0xE9, 0xE9, 0xE9, 0xE9, - 0xE9, 0xE9, 0xE9, 0xBD, 0xBD, 0xBD, 0xBB, 0xBB, 0xBD, 0xBD, 0xE9, 0x3F, 0x0, 0x2C, 0x3A, 0x7, - 0x7, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0xE, 0x33, 0x3A, 0x38, 0x33, 0x38, 0x31, 0x94, 0x2C, 0x3A, - 0xB6, 0x33, 0x38, 0xA3, 0xA3, 0x2C, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xBD, 0xA8, - 0x3A, 0x33, 0x2C, 0x0, 0x4, 0x0, 0x30, 0x29, 0x25, 0x1E, 0x4, 0x4, 0x2F, 0x1A, 0xA, 0x3, - 0x3, 0xA, 0x3, 0x1, 0x3, 0xA, 0x1A, 0x12, 0x2F, 0x34, 0x34, 0x34, 0x36, 0xA, 0xFE, 0x0, - 0x0, 0x1A, 0x4C, 0x48, 0x2F, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x1B, 0x53, 0x10, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x1, 0x53, 0x55, 0xA6, 0x54, 0x53, 0x53, - 0xB9, 0xC9, 0xBF, 0x46, 0xBF, 0x43, 0x55, 0x59, 0x5A, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, - 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x50, 0x3, 0x1, 0x1, 0x0, 0x1, 0x36, 0xC2, 0xC2, 0xCE, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5A, 0x1F, - 0x1E, 0x71, 0x39, 0x25, 0x25, 0x6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0x31, 0xE, 0x2C, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, 0xF7, - 0xF7, 0xF7, 0xF5, 0xEE, 0xD8, 0xBD, 0xBD, 0xBB, 0xBB, 0xBD, 0xBD, 0xD8, 0x3A, 0xE, 0x2C, 0x9, - 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0x2C, 0x2C, - 0x31, 0x2C, 0x2C, 0xE, 0xE, 0x31, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, - 0x31, 0xE, 0x31, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xBD, 0xA8, - 0x3B, 0x33, 0x2C, 0x0, 0x4, 0x0, 0x20, 0x29, 0x25, 0x1F, 0x4, 0x4, 0xA, 0x3, 0x3, 0x3, - 0x1, 0x1, 0x1, 0x3, 0x7, 0x7, 0x7, 0x3, 0xA, 0xA, 0x3, 0xA, 0xA, 0x7, 0xFE, 0x0, - 0x0, 0x3, 0xA, 0x8, 0x7, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x1C, 0x53, 0x1, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x36, 0xAD, 0x9D, 0x54, 0x53, 0xA, - 0x4C, 0xCC, 0xCA, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, 0x50, 0x50, 0x50, 0x50, 0x56, 0x57, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x1F, - 0x1F, 0x71, 0x39, 0xD, 0x39, 0x4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF7, 0xF0, 0xD8, 0xBD, 0xBD, 0xBB, 0xBB, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xE9, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0xBD, 0xFD, 0xE, 0xA3, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xBD, 0xA8, - 0x3A, 0x33, 0x2C, 0x0, 0x4, 0x0, 0x4, 0x1F, 0x25, 0x20, 0x6, 0x4, 0x1, 0x0, 0x0, 0x0, - 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7, 0x2A, 0x16, 0x0, 0x0, 0x0, 0x1, 0x1, 0x0, 0x1, - 0x1, 0x1, 0x1, 0x1, 0xFE, 0xFE, 0xFE, 0x0, 0xFE, 0xFE, 0xFE, 0x36, 0x53, 0x1, 0xFE, 0xFE, - 0x24, 0x1F, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x3, 0x53, 0x55, 0xAD, 0x50, 0x1B, - 0x1A, 0x4F, 0x50, 0x50, 0x50, 0x53, 0x51, 0x50, 0x51, 0x51, 0x50, 0x50, 0x50, 0x50, 0x4F, 0x50, - 0x50, 0x50, 0x4F, 0x46, 0x46, 0x47, 0x46, 0x46, 0x42, 0x42, 0x42, 0x50, 0x5A, 0x5B, 0x58, 0x58, - 0x58, 0x58, 0x58, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x57, 0x58, 0x5A, 0x5B, 0x5B, 0x5B, 0x58, 0x6, - 0x4, 0x97, 0x3E, 0x6, 0x6B, 0xFE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xAA, 0x7, - 0x9, 0x7, 0x31, 0x1, 0x7, 0xE, 0x2C, 0x9, 0x7, 0x7, 0x7, 0x7, 0xE, 0x7, 0x7, 0x7, - 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x2C, 0x31, 0xE, 0x7, 0x7, 0x7, 0x7, 0x9, 0x9, - 0x7, 0x7, 0x7, 0x7, 0x0, 0xAA, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0xF8, 0xFD, 0xE, 0xF9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, - 0x3A, 0x32, 0xD, 0x0, 0x5, 0x0, 0x4, 0x6, 0x25, 0x20, 0x6, 0x4, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x2B, 0x95, 0xD, 0x0, 0x1, 0x0, 0x1, 0x1, 0x1, 0x1, - 0x0, 0x0, 0x0, 0x0, 0xFE, 0x0, 0xFE, 0x0, 0xFE, 0xFE, 0x0, 0x4F, 0x53, 0x0, 0xFE, 0xFE, - 0x2B, 0x2A, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x4C, 0x53, 0x54, 0x4F, 0xBF, - 0xB9, 0x3, 0x1, 0xF, 0xF, 0x10, 0x10, 0xF, 0x10, 0xF, 0xF, 0xF, 0x10, 0x10, 0x10, 0x10, - 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0xF, 0x10, 0x10, 0x10, 0x19, 0x43, 0x57, 0x58, - 0x58, 0x5A, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x6, - 0x29, 0xB2, 0x6E, 0x1F, 0x39, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x94, 0x0, 0xE, - 0xB4, 0x3A, 0x41, 0xE, 0x2C, 0x9, 0x7, 0x33, 0xB4, 0x41, 0x2C, 0x94, 0xB4, 0x3C, 0x33, 0x2C, - 0x2C, 0x2C, 0xE, 0x2C, 0x2C, 0x31, 0x38, 0xA8, 0xAA, 0x33, 0xB4, 0xE, 0x41, 0x33, 0x33, 0x33, - 0x3A, 0xE, 0x2C, 0x2C, 0xAA, 0x7, 0xAA, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0x3A, 0xFD, 0xE, 0xF0, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB8, 0xA3, - 0x3A, 0x2C, 0x7, 0x0, 0x5, 0x0, 0x25, 0x29, 0x25, 0x1F, 0x4, 0x4, 0x0, 0x0, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0x0, 0xFE, 0x2, 0x4B, 0x27, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0xFE, 0x0, - 0x1, 0x1, 0x1, 0x1, 0x0, 0xFE, 0xFE, 0x0, 0xFE, 0xFE, 0x0, 0x4F, 0x4F, 0x0, 0xFE, 0x0, - 0x95, 0x2B, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x3, 0x55, 0x55, 0x53, 0xA, - 0x1, 0xF, 0x1, 0xF, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xF, 0xF, 0xF, 0x3, - 0x1, 0x1, 0x1, 0x3, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xF, 0xF, 0x11, 0x11, 0x42, 0x50, - 0x47, 0x1A, 0x52, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x6, - 0x1F, 0x25, 0x6, 0x1F, 0x37, 0x1F, 0xED, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x0, 0x2C, 0xE, - 0xE, 0xA3, 0xA8, 0x3C, 0x41, 0xA8, 0x31, 0xE, 0xE, 0x3A, 0xAA, 0x41, 0x2C, 0x2C, 0xE, 0x2C, - 0x2C, 0xE, 0x2C, 0x33, 0x33, 0x33, 0x3C, 0x31, 0x38, 0x3C, 0x33, 0xE, 0xB6, 0x3F, 0x33, 0x3F, - 0xB7, 0x3F, 0x2C, 0x3F, 0x41, 0x31, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xB6, 0xFD, 0xE, 0x2C, 0xD8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xB6, 0x41, - 0x33, 0x2C, 0x6, 0x0, 0x5, 0x0, 0x39, 0x6E, 0x29, 0x1F, 0x4, 0x4, 0xFE, 0x6, 0x2A, 0x0, - 0x2A, 0x16, 0x1F, 0x2A, 0x0, 0x24, 0x4B, 0x7, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, - 0x1, 0x1, 0x1, 0x1, 0xFE, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x3, 0x53, 0x46, 0x0, 0xFE, 0x0, - 0x95, 0x25, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x4F, 0x55, 0x53, 0x3, - 0x1, 0x1, 0x1, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0xA, 0x4D, 0x2E, 0x0, 0x3C, 0x4D, 0xA, 0x35, 0x4D, 0x2E, 0x0, 0x1, 0x3, 0x18, 0x18, 0x12, - 0x44, 0x4A, 0xF1, 0x5A, 0x5B, 0x5B, 0x58, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x1F, - 0x1E, 0x6, 0x4, 0x1F, 0x37, 0x25, 0xB5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB7, 0x2C, - 0xE, 0x38, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x7, 0x31, 0x3F, - 0xA5, 0x2C, 0xE, 0xE, 0xE, 0x7, 0x3A, 0x3F, 0x9, 0xE, 0x2C, 0x2C, 0x2C, 0x31, 0x2C, 0x2C, - 0x2C, 0x2C, 0x2C, 0x31, 0x33, 0x31, 0x38, 0x2C, 0x2C, 0x31, 0x3C, 0x41, 0xAA, 0x2C, 0x31, 0x2C, - 0x2C, 0x3A, 0xAA, 0xAA, 0x2C, 0x2C, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xB6, 0x41, - 0x33, 0x2C, 0x6, 0x0, 0x5, 0x0, 0x39, 0x39, 0x29, 0x1F, 0x4, 0x1E, 0xFE, 0x27, 0x4B, 0x0, - 0x9, 0x7, 0x1, 0x7, 0x0, 0x1, 0x1, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, - 0x0, 0xFE, 0x0, 0x0, 0xFE, 0x0, 0xFE, 0x0, 0x0, 0xFE, 0x3, 0x52, 0x43, 0x0, 0xFE, 0x0, - 0x24, 0x6, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x1A, 0x55, 0x50, 0x3, - 0x0, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x0, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x18, 0x1B, - 0x59, 0x5D, 0x5B, 0x58, 0x50, 0x1D, 0x56, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x6, - 0x1F, 0x39, 0x25, 0x1F, 0x37, 0x29, 0xB5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF0, - 0xFD, 0xF0, 0x3A, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF7, 0xF7, 0xF7, 0x9, 0x3A, 0x33, - 0x33, 0x2C, 0x2C, 0x2C, 0x2C, 0xE, 0xE, 0x94, 0x2C, 0x7, 0xE, 0xE, 0x2C, 0x31, 0x2C, 0x2C, - 0x2C, 0xE, 0xE, 0x3C, 0x3C, 0x38, 0x33, 0xE, 0x2C, 0x2C, 0x2C, 0x41, 0x31, 0x2C, 0x2C, 0xE, - 0x2C, 0x31, 0xA3, 0x2C, 0x31, 0x2C, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xD8, - 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xB6, 0x41, - 0x3A, 0x2E, 0xB, 0x0, 0xB, 0x0, 0x37, 0x35, 0x25, 0x1F, 0x6, 0x1E, 0xFE, 0x2, 0x2, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0x0, 0xFE, 0x0, 0xFE, 0x0, 0x0, 0xFE, 0x12, 0x53, 0x1B, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x53, 0x4F, 0x3, - 0x0, 0xFE, 0x0, 0x0, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x10, 0x10, - 0x1, 0x3, 0x1B, 0x46, 0x3, 0x10, 0x43, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x6, - 0x4, 0x6E, 0x39, 0x4, 0x6B, 0x29, 0xB5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x31, 0xBD, - 0xFD, 0xFD, 0xF9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xF0, 0xE9, 0xE9, 0xE9, 0xE, 0x3F, 0x38, - 0x2C, 0x2C, 0x33, 0x33, 0x33, 0x2C, 0x2C, 0x33, 0x3A, 0x7, 0x7, 0x7, 0xE, 0x31, 0xA3, 0x31, - 0x2C, 0xE, 0xE, 0xAA, 0x33, 0x2C, 0x2C, 0x2C, 0x2C, 0x33, 0x33, 0x33, 0x33, 0x2C, 0xE, 0x2C, - 0x2C, 0xA3, 0x33, 0x2C, 0x2C, 0x2C, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x31, - 0xEA, 0xFD, 0x3C, 0xE, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB7, 0x94, - 0x38, 0x2E, 0xE, 0x0, 0xB, 0x4, 0x37, 0x37, 0x29, 0x1F, 0x4, 0x4, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x2B, 0x2A, 0x0, - 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFE, 0xFE, 0x1A, 0x55, 0x12, 0x0, 0x0, 0x0, - 0x0, 0x0, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1B, 0x53, 0x1B, - 0x1A, 0x1B, 0x1B, 0x1B, 0x34, 0x36, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x4F, 0x4F, 0x4F, 0x4F, - 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x46, 0x36, 0x36, 0x46, 0x36, 0x34, 0x34, 0x12, - 0x12, 0x34, 0x34, 0x34, 0x49, 0xBF, 0xC0, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x6, - 0x4, 0x6C, 0x37, 0x1E, 0x71, 0x37, 0xA7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0x33, - 0xFD, 0xFD, 0xF0, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF0, 0xE9, 0xBD, 0xBD, 0xBD, 0xE, 0xA3, 0x31, - 0x2C, 0x33, 0x38, 0x33, 0x38, 0x2C, 0x2C, 0x33, 0xA3, 0xE, 0x7, 0x7, 0x7, 0x3C, 0x31, 0xA8, - 0xA8, 0xE, 0x38, 0x33, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x33, 0x33, 0x38, 0x3A, 0x2C, 0x2C, 0x2C, - 0x41, 0xB7, 0xA3, 0x31, 0x2C, 0x38, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, - 0xFD, 0xBD, 0x38, 0xF7, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, - 0x3A, 0x31, 0x2C, 0x0, 0x6, 0x4, 0x37, 0x39, 0x37, 0x1F, 0x4, 0x4, 0x0, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x6, 0x4B, 0x25, 0xFE, - 0xFE, 0xFE, 0x0, 0x1, 0x1, 0xF, 0x1, 0xF, 0x0, 0x0, 0x1D, 0x55, 0xE, 0x2B, 0x25, 0x0, - 0x1, 0x1, 0x1, 0xF, 0x1, 0xF, 0xF, 0x10, 0x11, 0x11, 0x11, 0x19, 0x19, 0x19, 0x50, 0x5C, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCE, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, - 0xCC, 0xD0, 0xCC, 0xCC, 0xCE, 0xCC, 0xD0, 0xD0, 0xD0, 0xF3, 0xF3, 0xD0, 0xCC, 0xCC, 0xF3, 0xCF, - 0x52, 0xAB, 0xC1, 0xB9, 0xAB, 0xA3, 0x1A, 0x1A, 0x1B, 0x5A, 0x5B, 0x5B, 0x5D, 0x5B, 0x5D, 0x1F, - 0x4, 0x6E, 0x37, 0x1F, 0x9B, 0x39, 0x6B, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xE, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xBD, 0xBD, 0xBB, 0xBB, 0x2C, 0x3C, 0xE, - 0x2C, 0x33, 0x33, 0x33, 0x31, 0x31, 0x33, 0x94, 0xA3, 0xE, 0x2C, 0xE, 0xA3, 0x2C, 0x7, 0x0, - 0xE, 0x3F, 0xAA, 0x31, 0xE, 0x2C, 0x2C, 0x2C, 0xE, 0x38, 0x31, 0x3C, 0xAA, 0xA3, 0x33, 0x33, - 0xA3, 0xE, 0x3C, 0xAA, 0xA3, 0x38, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0xF0, 0x33, 0xEA, 0xF0, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xAA, - 0x3C, 0x33, 0x2C, 0x4, 0x4, 0x0, 0x39, 0x39, 0x29, 0x1E, 0x4, 0x4, 0x0, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x1, 0x1, 0x0, - 0x0, 0x0, 0x0, 0xF, 0xF, 0xF, 0x1, 0x1, 0x1, 0xFE, 0x1D, 0x55, 0x2E, 0x95, 0x25, 0x1, - 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0xF, 0xF, 0x10, 0x11, 0x11, 0x19, 0x42, 0x50, 0x5C, - 0xCA, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCE, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCB, 0xCB, - 0xCB, 0xCB, 0xCB, 0xCB, 0xCD, 0xCB, 0xCB, 0xD0, 0xD0, 0xD0, 0xD0, 0xF3, 0xD0, 0xD0, 0xF3, 0xD0, - 0xF3, 0xC4, 0x0, 0x0, 0x3, 0xBE, 0xBE, 0xBE, 0xBF, 0x5B, 0x5B, 0x5D, 0x5D, 0x5B, 0x5D, 0x1F, - 0x4, 0x97, 0x6B, 0x1E, 0x65, 0x0, 0x39, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xBD, 0xBB, 0xBB, 0xBB, 0xE, 0xA3, 0x38, - 0xE, 0x31, 0x38, 0x31, 0x2C, 0x33, 0x3A, 0x38, 0x3A, 0x31, 0x2C, 0x41, 0xA3, 0xE, 0xE, 0x7, - 0x7, 0x0, 0xE, 0xAA, 0xAA, 0x38, 0x2C, 0x2C, 0x2C, 0x31, 0x33, 0x31, 0x2C, 0x31, 0xA3, 0xB4, - 0x2C, 0x2C, 0x2C, 0x2C, 0x38, 0xAA, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBD, - 0xE, 0xA3, 0xFD, 0x2C, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xAA, - 0x3C, 0x33, 0x2C, 0x4, 0x4, 0x0, 0x39, 0x6B, 0x22, 0x1E, 0x4, 0x1E, 0x0, 0xFE, 0x0, 0xFE, - 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, - 0x1, 0x1, 0x1, 0xF, 0xF, 0xF, 0x3, 0x3, 0x3, 0x3, 0x43, 0x4F, 0xA, 0x12, 0x10, 0x12, - 0x12, 0x12, 0x12, 0x12, 0x18, 0x1A, 0x18, 0x10, 0x12, 0x18, 0x18, 0x19, 0x1B, 0x47, 0x1D, 0x1C, - 0x36, 0x4F, 0x5C, 0xCA, 0xCE, 0xCD, 0xCB, 0xCB, 0xC9, 0x5C, 0xC9, 0xC9, 0xCA, 0xCA, 0xCC, 0xCC, - 0xCB, 0xCB, 0xCB, 0xCB, 0xCD, 0xC9, 0xC9, 0xCB, 0xD0, 0xD0, 0xD0, 0xF3, 0xF3, 0xD0, 0xF3, 0xF3, - 0xF3, 0xD0, 0x12, 0x3, 0x3, 0x59, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5D, 0x5D, 0x5B, 0x5D, 0x6, - 0x4, 0x71, 0x65, 0x1E, 0x1F, 0xD7, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0x2C, - 0xE, 0x31, 0xAA, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xBD, 0xBB, 0xBB, 0xBB, 0x7, 0x31, 0x94, - 0xAA, 0x3A, 0x2C, 0x2C, 0x2C, 0x38, 0x41, 0x3A, 0x38, 0x33, 0x33, 0xAA, 0x2C, 0x2C, 0x2C, 0x2C, - 0x9, 0x7, 0x7, 0x0, 0x38, 0xB7, 0x31, 0x31, 0x2C, 0x2C, 0xE, 0x7, 0x7, 0x7, 0x2C, 0xE, - 0x7, 0x7, 0xE, 0xA3, 0x3A, 0xE, 0x9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, - 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xAA, - 0x3C, 0x33, 0x2C, 0x4, 0x6, 0x4, 0x6B, 0x6B, 0x29, 0x1E, 0x4, 0x1E, 0x0, 0xFE, 0xFE, 0x0, - 0x12, 0x1B, 0x42, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x13, 0x0, 0xFE, - 0xFE, 0x1, 0x47, 0x4F, 0x4F, 0x50, 0x50, 0x53, 0x46, 0x4F, 0x50, 0x4F, 0x4F, 0x50, 0x50, 0x53, - 0x53, 0x53, 0x55, 0x55, 0x55, 0xAD, 0x55, 0x55, 0x53, 0x55, 0x55, 0x55, 0xAD, 0x5C, 0x47, 0x44, - 0x34, 0x34, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x8, 0x8, 0x12, 0x12, 0x12, 0x46, 0xCC, - 0xCA, 0xCB, 0xCB, 0xCB, 0xCD, 0xBF, 0xBF, 0xC9, 0xCB, 0xCB, 0xD0, 0xD0, 0xD0, 0xF3, 0xF3, 0xF3, - 0xF3, 0xD0, 0x36, 0x36, 0x34, 0x1D, 0x43, 0x43, 0x43, 0x43, 0x43, 0x42, 0x42, 0x1D, 0x1D, 0x6, - 0x4, 0x6B, 0x6B, 0x1E, 0xFE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xE9, - 0xFD, 0xF0, 0x3A, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xBD, 0xBB, 0xBB, 0xBB, 0x7, 0x33, 0x2C, - 0x38, 0x41, 0xA8, 0x3A, 0x33, 0xB6, 0xA3, 0x3A, 0x31, 0x2C, 0x41, 0x33, 0x2C, 0x2C, 0x2C, 0x2C, - 0x2C, 0xE, 0xE, 0x9, 0x33, 0xA3, 0x31, 0x31, 0x38, 0xE, 0x0, 0xBB, 0xBB, 0xBB, 0xBB, 0xBD, - 0xD8, 0xF0, 0x2C, 0xB6, 0xA8, 0x3F, 0x1, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0x2C, 0x38, 0xB4, 0xF5, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xB4, - 0x3C, 0x33, 0x2C, 0x0, 0x6, 0x4, 0x6E, 0x6B, 0x29, 0x1E, 0x4, 0x4, 0xFE, 0xFE, 0xFE, 0x12, - 0xBE, 0xC2, 0xEC, 0xCE, 0xCE, 0xEC, 0xC2, 0xC2, 0xC2, 0xC2, 0xC2, 0xC2, 0xC1, 0xC1, 0xA4, 0x0, - 0xFE, 0x8, 0x53, 0x52, 0x53, 0x50, 0x50, 0x55, 0x4F, 0x4F, 0x52, 0x53, 0x53, 0x52, 0x4F, 0x50, - 0x52, 0x52, 0x52, 0x52, 0x53, 0x53, 0x53, 0x53, 0x53, 0xC4, 0xC4, 0x55, 0xAD, 0xC0, 0x55, 0xBE, - 0xBE, 0xC1, 0xC1, 0xC1, 0xBE, 0xBE, 0xC1, 0xC1, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xC1, 0xCC, - 0xCB, 0xCB, 0xCB, 0xCB, 0xCD, 0xBF, 0xAD, 0xBF, 0xC9, 0xCB, 0xD0, 0xD0, 0xD0, 0xF3, 0xF3, 0xF3, - 0xF3, 0xD0, 0x46, 0x46, 0x46, 0x1A, 0x3, 0xA, 0x12, 0x12, 0x12, 0x12, 0x12, 0x1A, 0x2D, 0x6, - 0x4, 0x7A, 0x39, 0x1F, 0x4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF9, - 0xFD, 0xFD, 0xF9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xBD, 0xBB, 0xBB, 0xBB, 0xE, 0xA3, 0xA3, - 0x38, 0x2C, 0x31, 0x94, 0xA5, 0x38, 0xE, 0xE, 0x2C, 0x41, 0x3F, 0x41, 0xA3, 0x2C, 0x2C, 0x2C, - 0x2C, 0x2C, 0x2C, 0x33, 0x41, 0x3A, 0x33, 0x31, 0x31, 0x1, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBD, - 0xD8, 0xF0, 0xE, 0xB4, 0x2C, 0xA3, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x3A, - 0xFD, 0xF5, 0xAA, 0x33, 0xE, 0x2C, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xAA, - 0x3C, 0x33, 0xE, 0x0, 0x6, 0x0, 0x6B, 0x6B, 0x29, 0x1E, 0x4, 0x1E, 0x0, 0xFE, 0xFE, 0x7, - 0xAB, 0xCD, 0xF1, 0x36, 0xA, 0x7, 0x3, 0x3, 0x3, 0x1, 0x1, 0x1, 0x1, 0x7, 0x7, 0x0, - 0xFE, 0x12, 0x53, 0x52, 0x50, 0x53, 0x53, 0x55, 0x4F, 0x52, 0x52, 0x53, 0x53, 0x50, 0x4F, 0x4F, - 0x4F, 0x52, 0x52, 0x52, 0x52, 0x52, 0x53, 0x53, 0x52, 0x9D, 0x9C, 0x52, 0xAD, 0xC0, 0xBF, 0xEC, - 0xF1, 0xCE, 0xD0, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCD, 0xBF, 0xCD, 0xCD, 0xCE, 0xCE, 0xCE, 0xCB, - 0xCB, 0xCB, 0xCB, 0xCB, 0xCD, 0xC9, 0xBF, 0xBF, 0xC9, 0xC9, 0xCB, 0xD0, 0xD0, 0xD0, 0xF3, 0xF3, - 0xF3, 0xF3, 0xCA, 0xC0, 0xC9, 0xBF, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0x6, - 0x4, 0x9B, 0x6B, 0x1F, 0x20, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xAA, 0x3A, - 0xF0, 0xFD, 0xE9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xBD, 0xBB, 0xBB, 0xBB, 0x0, 0x9, 0x31, - 0xA8, 0x38, 0xE, 0x2C, 0x2C, 0x2C, 0x2C, 0xE, 0x3A, 0x41, 0x3F, 0x2C, 0x33, 0x94, 0xA3, 0x2C, - 0x2C, 0xE, 0x2C, 0xB4, 0x33, 0x31, 0x31, 0x2C, 0x7, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBB, 0xBD, - 0xD8, 0xF0, 0x7, 0x2C, 0x38, 0x2C, 0x1, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA5, - 0x3A, 0x33, 0xE, 0x0, 0x6, 0x0, 0x39, 0x6E, 0x29, 0x1F, 0x4, 0x1E, 0xFE, 0xFE, 0xFE, 0xFE, - 0x0, 0x3, 0xA, 0x3, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0x1A, 0x52, 0x4F, 0x4F, 0x4F, 0x53, 0x53, 0x52, 0x52, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, 0x4F, - 0x52, 0x4F, 0x4F, 0x4F, 0x52, 0x52, 0x53, 0x53, 0x52, 0xE1, 0xC7, 0x52, 0x55, 0xC0, 0x50, 0x5C, - 0xCC, 0xCC, 0xCC, 0xCC, 0xD0, 0xD0, 0xCC, 0xCB, 0xC9, 0x52, 0x53, 0x55, 0xBF, 0xC9, 0xCB, 0xCB, - 0xCB, 0xCB, 0xCB, 0xCB, 0xCD, 0xCD, 0xCD, 0xC9, 0xCD, 0xC9, 0xC9, 0xCB, 0xD0, 0xD0, 0xF3, 0xF3, - 0xF3, 0xF3, 0xCA, 0xCA, 0xC0, 0xCD, 0xEC, 0xF1, 0xF1, 0xF1, 0xEC, 0xEC, 0xF1, 0xF1, 0xF1, 0xB, - 0x1E, 0x96, 0x65, 0x1F, 0x39, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0x31, 0xE, 0x2C, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xBD, 0xBB, 0xBB, 0xBB, 0xBB, 0x0, 0xE, - 0x31, 0xAA, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x31, 0xA8, 0x2C, 0x3C, 0x41, 0x3C, 0x41, 0x41, 0xA3, - 0x41, 0xE, 0x41, 0x41, 0xE, 0x2C, 0xE, 0x0, 0xE9, 0xE9, 0xE9, 0xE9, 0xD8, 0xBD, 0xBD, 0xBD, - 0xD8, 0xF0, 0x31, 0x41, 0xE, 0x7, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB7, 0xA3, - 0x38, 0x32, 0x6, 0x0, 0x4, 0x0, 0x39, 0x6B, 0x29, 0x1F, 0x4, 0x1E, 0x1, 0x18, 0x1D, 0x43, - 0x1D, 0x1D, 0x1D, 0x1D, 0x1B, 0x1B, 0x1D, 0x1D, 0x1B, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, 0x1A, - 0x1A, 0x36, 0x4F, 0x4F, 0x4F, 0x50, 0x53, 0x53, 0x52, 0x52, 0x53, 0x53, 0x53, 0x53, 0x53, 0x52, - 0x52, 0x53, 0x52, 0x52, 0x52, 0x52, 0x53, 0x53, 0x52, 0x52, 0x52, 0x53, 0x55, 0xC0, 0x50, 0xC9, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xBF, 0x52, 0x52, 0x53, 0x53, 0x55, 0xBF, 0xCB, - 0xCB, 0xCB, 0xCB, 0xCB, 0xCF, 0xCB, 0xCB, 0xCB, 0xCB, 0xC9, 0xC9, 0xCB, 0xD0, 0xF3, 0xF3, 0xF3, - 0xF3, 0xF3, 0xCA, 0xCA, 0xCA, 0xCE, 0xF1, 0xF1, 0xF1, 0xF1, 0xEC, 0xEC, 0xF1, 0xC2, 0x5D, 0xB, - 0x4, 0x96, 0x65, 0x20, 0x9B, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xBD, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0x9, - 0x9, 0x2C, 0xE, 0xE, 0xE, 0x9, 0x9, 0x2C, 0xE, 0xE, 0xE, 0x9, 0x2C, 0x2C, 0xE, 0x2C, - 0x2C, 0xE, 0x2C, 0xE, 0xE, 0xE, 0xE, 0xF7, 0xF7, 0xF7, 0xF7, 0xF5, 0xEE, 0xD8, 0xBD, 0xBD, - 0xD8, 0xF0, 0x7, 0x3F, 0xAA, 0x3A, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB6, 0x94, - 0x33, 0x30, 0x20, 0x4, 0x6, 0x0, 0x29, 0x39, 0x29, 0x1F, 0x4, 0x1E, 0xFE, 0xFE, 0x0, 0x3, - 0x1B, 0x46, 0x50, 0x55, 0x5C, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0x53, 0x4F, 0x4F, 0x53, 0x53, 0x55, 0x52, 0x53, 0x53, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, - 0x52, 0x52, 0x52, 0x53, 0x53, 0x52, 0x52, 0x52, 0x52, 0x52, 0x52, 0x53, 0x55, 0xC0, 0x50, 0xBF, - 0xC9, 0xCD, 0xCB, 0xCD, 0xC9, 0xCB, 0xC9, 0xC9, 0x55, 0x4F, 0x4F, 0x52, 0x53, 0x53, 0x55, 0xBF, - 0xCB, 0xCB, 0xCB, 0xCB, 0xCD, 0xCB, 0xCB, 0xCB, 0xCB, 0xC9, 0xBF, 0xCB, 0xCB, 0xD0, 0xF3, 0xF3, - 0xF3, 0xF3, 0xCA, 0xCA, 0xCA, 0xCE, 0xCA, 0xCA, 0x5D, 0x5B, 0x5A, 0x5B, 0x5B, 0x5B, 0x5D, 0xD, - 0x4, 0x97, 0x6B, 0x20, 0x6B, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, - 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xBD, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, - 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, - 0xBB, 0xBD, 0xBD, 0xE9, 0xF0, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF5, 0xE9, 0xBD, 0xBD, - 0xD8, 0xF0, 0x9, 0x7, 0xE, 0xA5, 0x31, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xB4, 0x41, - 0x33, 0x2C, 0x20, 0x4, 0x6, 0x4, 0x25, 0x6B, 0x29, 0x1F, 0x1E, 0x1E, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0xA, 0x1A, 0x1D, 0x46, 0x53, 0x55, 0x5A, 0x5C, 0xCA, 0xCA, - 0x5D, 0x53, 0x4F, 0x4F, 0x52, 0x53, 0x53, 0x53, 0x53, 0x53, 0x53, 0x53, 0x53, 0xE1, 0x9D, 0x52, - 0x4F, 0x52, 0x4F, 0x4F, 0x55, 0x52, 0x52, 0x52, 0x52, 0x52, 0x53, 0x53, 0x55, 0xC0, 0x46, 0x36, - 0x53, 0xC9, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xBF, 0x52, 0x52, 0x52, 0x52, 0x52, 0x55, 0xAD, - 0xBF, 0xC4, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xCD, 0xBF, 0xC9, 0xC9, 0xCB, 0xD0, 0xF3, 0xF3, - 0xF3, 0xF3, 0xCC, 0xCC, 0xCC, 0xD0, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0xE, - 0x4, 0x9B, 0x71, 0x25, 0x29, 0x37, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xB7, - 0x41, 0x2C, 0x2C, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xE9, 0xF0, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, - 0xD8, 0xF0, 0x7, 0x2C, 0x3A, 0x2C, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xAA, 0x3C, - 0x33, 0x2C, 0x20, 0x4, 0x4, 0x4, 0x25, 0x6B, 0x29, 0x1F, 0x1E, 0x1E, 0x0, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x1, 0x1A, 0x3D, 0x54, 0x55, 0x5D, 0x5D, - 0x5C, 0x53, 0x53, 0x53, 0x53, 0x55, 0x55, 0x53, 0x53, 0x53, 0x53, 0x53, 0x52, 0x4E, 0x3A, 0x52, - 0x52, 0x52, 0x52, 0x53, 0xAB, 0x52, 0x53, 0xAB, 0x53, 0x53, 0x53, 0x53, 0xAD, 0x5A, 0x49, 0x49, - 0x44, 0x36, 0x53, 0xCA, 0xCB, 0xCC, 0xCB, 0xCB, 0xBF, 0x55, 0x53, 0x52, 0x52, 0x52, 0x52, 0x55, - 0xAD, 0xEC, 0xA0, 0xA0, 0xA0, 0x9E, 0x9E, 0x9E, 0x9E, 0xA0, 0xA0, 0x9E, 0xC4, 0xD0, 0xF3, 0xF3, - 0xF3, 0xF3, 0xCC, 0xCC, 0xCC, 0xCE, 0x59, 0x51, 0x51, 0x50, 0x50, 0x56, 0x5B, 0x5B, 0x5D, 0xC, - 0xB, 0xB2, 0x71, 0x1F, 0x4, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xE9, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF0, 0xE9, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xE9, 0xF0, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, - 0xD8, 0xF0, 0x7, 0xB8, 0x41, 0x2C, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0x3A, 0x94, 0x2C, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xA8, 0x3C, - 0x33, 0x30, 0xD, 0x4, 0x5, 0x0, 0x25, 0x39, 0x29, 0x1F, 0x4, 0x1E, 0x0, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x8, 0x34, 0x52, 0x55, 0xCB, 0xD0, 0xD0, 0xD0, 0xC9, 0x5D, 0x5C, - 0x5C, 0x55, 0x55, 0x55, 0xAD, 0xBF, 0xBF, 0x52, 0x53, 0x53, 0x55, 0x55, 0x53, 0x55, 0x55, 0x53, - 0x53, 0x53, 0x55, 0x55, 0xAD, 0x52, 0x55, 0x53, 0x55, 0x55, 0x55, 0x55, 0xBF, 0xC0, 0x55, 0xC1, - 0xCD, 0xCE, 0xCE, 0xCC, 0xCB, 0xCB, 0xCB, 0xCB, 0xC9, 0xBF, 0xBF, 0x55, 0x53, 0x52, 0x52, 0x53, - 0x54, 0xE9, 0xB2, 0xD5, 0xE5, 0x9B, 0x9A, 0xAF, 0x9B, 0xD5, 0xE5, 0x6B, 0xC4, 0xD0, 0xF3, 0xF3, - 0xF3, 0xF3, 0xCC, 0xCC, 0xCC, 0xCD, 0x2D, 0x1A, 0x13, 0x13, 0x13, 0x1B, 0x5A, 0x5B, 0x5B, 0xB, - 0x20, 0xD5, 0x71, 0x6, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xA3, - 0xBD, 0xF8, 0xF9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF0, 0xEE, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, - 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, - 0xEE, 0xF5, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, - 0xD8, 0xF0, 0x0, 0xA3, 0x31, 0x2C, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0xF9, 0xFD, 0xFD, 0xA3, 0x94, 0x41, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xAA, 0x3C, - 0x33, 0x30, 0xB, 0x4, 0x5, 0x0, 0x20, 0x37, 0x29, 0x1F, 0x4, 0x1E, 0x0, 0x0, 0xFE, 0x0, - 0x0, 0x8, 0x36, 0xAD, 0xCF, 0xFA, 0xF3, 0xD0, 0xC9, 0xC9, 0xCB, 0xD0, 0xD0, 0xC9, 0x5C, 0x5D, - 0x5C, 0xCA, 0x4F, 0x7, 0x5B, 0x47, 0x1, 0x1A, 0x5D, 0x59, 0xA, 0x55, 0x5D, 0xC8, 0x9D, 0x5C, - 0x55, 0xBF, 0xF3, 0xD0, 0xCE, 0xBF, 0xC9, 0xBF, 0xBF, 0x5C, 0xC9, 0xC9, 0xCE, 0xC0, 0x59, 0xBF, - 0xC9, 0xCD, 0xC9, 0xC4, 0xC9, 0xCD, 0xCD, 0xCD, 0xAD, 0xCD, 0xCD, 0xCD, 0xC9, 0xBF, 0xAD, 0xAB, - 0xAD, 0xC6, 0x9B, 0xB2, 0xD5, 0x9D, 0x9A, 0x9B, 0xAF, 0xB5, 0xDE, 0x6B, 0xAD, 0xD0, 0xF3, 0xF3, - 0xF3, 0xF3, 0xCC, 0xCC, 0xCC, 0xCE, 0xC1, 0xC1, 0xC1, 0xC1, 0xC1, 0xC1, 0x5B, 0x5B, 0x5B, 0xB, - 0x20, 0xD5, 0x71, 0x6, 0x37, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xB6, - 0x3F, 0xE, 0x2C, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, - 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, - 0xF8, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, - 0xD8, 0xF0, 0x7, 0x2C, 0x2C, 0x2C, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0xF5, 0xFD, 0xFD, 0xFD, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xAA, 0x3F, - 0x33, 0x30, 0x6, 0x4, 0x5, 0x0, 0x20, 0x39, 0x25, 0x1F, 0x4, 0x1E, 0x7, 0x2F, 0x48, 0xB9, - 0xCE, 0xC9, 0xAD, 0xBF, 0xD0, 0xD0, 0xF3, 0xF3, 0xD0, 0xCB, 0xCB, 0xD0, 0xD0, 0xCB, 0x5C, 0x5D, - 0x5C, 0x5D, 0x46, 0x0, 0x51, 0x50, 0x0, 0x3, 0x5A, 0x5A, 0x0, 0x0, 0x53, 0xCF, 0xC8, 0x5C, - 0x55, 0xBF, 0xD0, 0xF3, 0xCE, 0xAD, 0xC9, 0xAD, 0x55, 0x55, 0xBF, 0xC9, 0xCE, 0xC0, 0x50, 0x54, - 0xC9, 0xCC, 0xF3, 0xF3, 0xF3, 0xF3, 0xF3, 0xCE, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC4, 0xC9, - 0xC9, 0xC6, 0x9B, 0xB2, 0xD5, 0x9F, 0x9A, 0x9B, 0xAF, 0xB5, 0xE5, 0x6B, 0xAD, 0xD0, 0xF3, 0xF3, - 0xF3, 0xF3, 0xCC, 0xCC, 0xD0, 0xCE, 0xC0, 0xCA, 0xC0, 0xC0, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0xB, - 0x25, 0xB5, 0x6E, 0x4, 0xDB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, - 0xD8, 0xF0, 0x31, 0xA8, 0x38, 0x2C, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xAA, - 0x33, 0xE9, 0xFD, 0xBD, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xB4, 0x41, - 0x33, 0x30, 0x5, 0x4, 0x5, 0x0, 0x20, 0x39, 0x25, 0x1F, 0x4, 0x1E, 0xFA, 0xFD, 0xFA, 0xFA, - 0xF3, 0xD0, 0xC9, 0xAD, 0xBF, 0xCB, 0xD0, 0xD0, 0xD0, 0xCC, 0xCA, 0xCA, 0x5C, 0x5D, 0x5C, 0x5D, - 0x5C, 0x4F, 0x1, 0x1, 0x50, 0x57, 0x0, 0x3, 0x5A, 0x5A, 0x1, 0x1, 0x10, 0xBF, 0xAD, 0x5C, - 0x55, 0xBF, 0xD0, 0xF3, 0xD0, 0xBF, 0xBF, 0xC9, 0x55, 0x55, 0x55, 0xBF, 0xCD, 0xC9, 0x46, 0x34, - 0x1A, 0x36, 0xC9, 0xF3, 0xF3, 0xF3, 0xF3, 0xD0, 0xCE, 0xCB, 0xC9, 0xC9, 0xC9, 0xCB, 0xC4, 0xCF, - 0xC4, 0xC6, 0x9B, 0xAF, 0xDE, 0x9D, 0x9A, 0x97, 0xAF, 0xAF, 0xE5, 0x6B, 0xAD, 0xD0, 0xF3, 0xF3, - 0xF3, 0xF3, 0xD0, 0xD0, 0xF3, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5A, 0x5B, 0x7, - 0x20, 0xAF, 0x6E, 0xFE, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x38, - 0xA3, 0xB4, 0xE9, 0xE, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, - 0xD8, 0xF0, 0x7, 0x38, 0xAA, 0xA8, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xB6, 0x31, 0xE, 0x2C, 0xD8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xB6, 0x41, - 0x33, 0x2C, 0x23, 0x4, 0x5, 0x0, 0x1F, 0x39, 0x29, 0x1F, 0x4, 0x1E, 0xFA, 0xFA, 0xFA, 0xFA, - 0xFA, 0xF3, 0xD0, 0xCF, 0xAD, 0x4C, 0x46, 0x50, 0x51, 0x5C, 0x5D, 0xCA, 0xCA, 0xCA, 0x5C, 0x5D, - 0xCA, 0x4F, 0x46, 0x1B, 0x50, 0x5B, 0x1, 0x0, 0x55, 0x5A, 0x1A, 0x1B, 0x50, 0x8, 0x7, 0x53, - 0x55, 0xBF, 0xCE, 0xD0, 0xF3, 0xC9, 0xBF, 0xC9, 0x55, 0x55, 0x55, 0x55, 0xC9, 0xC2, 0xAB, 0xC1, - 0xC1, 0xC1, 0xCE, 0xF3, 0xF3, 0xF3, 0xF3, 0xD0, 0xD0, 0xCB, 0xC9, 0xC9, 0xBF, 0xC9, 0xCB, 0xCB, - 0xC9, 0xC6, 0x9B, 0x9B, 0x9F, 0x9D, 0x9A, 0x97, 0xAF, 0xAF, 0xDE, 0x6B, 0x54, 0xD0, 0xF3, 0xFA, - 0xFA, 0xF3, 0xD0, 0xD0, 0xF1, 0x34, 0x46, 0x5D, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x5A, 0x12, - 0x31, 0xD5, 0x71, 0x0, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, - 0xBD, 0xB4, 0xA3, 0xE, 0x2C, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, - 0xD8, 0xF0, 0x7, 0x2C, 0x2C, 0xA3, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB8, 0xA3, - 0x3A, 0x31, 0x23, 0x4, 0x5, 0x0, 0xB, 0x37, 0x29, 0x20, 0x4, 0x1E, 0xFA, 0xFA, 0xF3, 0xFA, - 0xC6, 0x41, 0xE, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0xA, 0x1D, 0x50, 0x5C, 0x5C, 0x5C, - 0x5C, 0x5D, 0x5A, 0x34, 0x50, 0x5D, 0x3, 0x0, 0x51, 0x5C, 0x53, 0x47, 0x5B, 0x53, 0x5A, 0x55, - 0x55, 0x5C, 0xCE, 0xF3, 0xF3, 0xCC, 0xBF, 0xC9, 0x55, 0x55, 0x55, 0x55, 0xBF, 0xC2, 0x53, 0xC9, - 0xCE, 0xCC, 0xCC, 0xD0, 0xF3, 0xF3, 0xF3, 0xF3, 0xD0, 0xD0, 0xCE, 0xC9, 0xBF, 0xBF, 0xBF, 0xC9, - 0xC9, 0xC6, 0x9B, 0x9B, 0x9D, 0x9D, 0x9A, 0x6E, 0x97, 0xA9, 0xD5, 0x39, 0x54, 0xD0, 0xFA, 0xFA, - 0xFA, 0xF3, 0xD0, 0xD0, 0xCD, 0xC1, 0xC2, 0x5D, 0x5B, 0x5B, 0x58, 0x57, 0x58, 0x5A, 0x5A, 0x8, - 0xC, 0x25, 0x1F, 0x5, 0x25, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0x9, 0x9, - 0xE, 0xE, 0x9, 0x9, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x7, 0x9, 0xE, 0x9, 0x9, 0x7, 0x2C, - 0x31, 0xE, 0xE, 0x2C, 0x2C, 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, 0x31, 0x2C, 0xE, 0xE, 0x2C, - 0xE, 0xE, 0x7, 0x2C, 0x38, 0xA3, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0x41, 0xB6, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA5, - 0x3A, 0x33, 0xE, 0x4, 0x5, 0x0, 0x5, 0x30, 0x30, 0x20, 0x4, 0x4, 0xCF, 0xA6, 0x33, 0x0, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0xA, 0x36, 0x54, 0xAD, 0x5C, - 0xCA, 0x5D, 0x5C, 0x1, 0x1B, 0x5D, 0x12, 0x0, 0x52, 0x5C, 0xC9, 0x51, 0x5A, 0xA, 0x53, 0x55, - 0x55, 0x5C, 0xD0, 0xF3, 0xD0, 0xD0, 0x5C, 0xBF, 0xC9, 0xC9, 0xC9, 0xBF, 0xBF, 0xC9, 0x4F, 0xBF, - 0xD0, 0xCC, 0xCC, 0xCC, 0xD0, 0xF3, 0xF3, 0xD0, 0xF3, 0xF3, 0xCE, 0xC9, 0xCA, 0xC9, 0xBF, 0xBF, - 0xBF, 0xCD, 0x96, 0x9A, 0x9A, 0x9A, 0x9A, 0x9A, 0x77, 0x77, 0x9A, 0x71, 0x55, 0xD0, 0xFA, 0xFA, - 0xFA, 0xF3, 0xCA, 0xCE, 0x5D, 0x5B, 0x5B, 0x58, 0x5B, 0x58, 0x5B, 0x58, 0x58, 0x5A, 0x5A, 0x23, - 0x5, 0x1F, 0x4, 0xD, 0xFE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, - 0xBB, 0xF7, 0xFD, 0xFD, 0xF9, 0xA8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x7, 0x7, 0x0, - 0x7, 0x1, 0x0, 0x0, 0x38, 0x3A, 0x3A, 0x3A, 0x7, 0x0, 0x7, 0x7, 0x7, 0x7, 0x1, 0x7, - 0x3A, 0xE, 0x3A, 0x41, 0x33, 0xE, 0x2C, 0x31, 0x2C, 0xE, 0x2C, 0x2C, 0x41, 0xAA, 0x41, 0x31, - 0x2C, 0x2C, 0x2C, 0x2C, 0xAA, 0x31, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0xB7, 0xB4, 0x38, 0x2C, 0x41, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xBD, 0xA8, - 0x3A, 0x33, 0xE, 0x0, 0x4, 0x4, 0xB, 0x37, 0x30, 0x20, 0x4, 0x1E, 0x0, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x1, 0xA, 0x3A, 0xB4, 0xEC, 0xD0, 0xCB, 0xCB, 0xD0, 0xCF, 0x5C, - 0xCA, 0x5A, 0x1A, 0x3, 0x1A, 0x5D, 0x1D, 0x0, 0x4F, 0x5D, 0xCA, 0x5A, 0x56, 0x1, 0xF, 0x46, - 0x55, 0x5C, 0xD0, 0xF3, 0xF3, 0xF3, 0xC9, 0xBF, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xCD, 0x46, 0xA, - 0xA, 0x1C, 0xAD, 0x5C, 0xCB, 0xCE, 0xD0, 0xD0, 0xD0, 0xD0, 0xCD, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, - 0xBF, 0xC9, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xD0, 0xD0, 0xFA, 0xFA, - 0xFA, 0xEC, 0x4F, 0x4F, 0x46, 0x46, 0x47, 0x59, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x5A, 0x5A, 0xC, - 0x32, 0xB2, 0x29, 0x20, 0x6, 0xE2, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, - 0x41, 0x2C, 0x2C, 0x41, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0x2C, 0x1, - 0x7, 0x7, 0x7, 0x0, 0x7, 0x2C, 0xE, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x0, - 0x7, 0x7, 0x3F, 0x33, 0x0, 0x7, 0xE, 0xE, 0x2C, 0x2C, 0x2C, 0x3F, 0x94, 0x38, 0x3C, 0xA3, - 0x94, 0x31, 0xE, 0x94, 0x33, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBD, - 0xA3, 0xFD, 0xFD, 0xF9, 0xBD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA8, - 0x3B, 0x33, 0xD, 0x0, 0x4, 0x4, 0xB, 0x30, 0x30, 0x20, 0x4, 0x1E, 0xFE, 0xFE, 0xFE, 0x0, - 0x7, 0x2D, 0x94, 0xB6, 0xF0, 0xF8, 0xFA, 0xCF, 0xF3, 0xFA, 0xFA, 0xF3, 0xC9, 0xCB, 0xCF, 0x5C, - 0xCA, 0x5C, 0x52, 0x52, 0x4F, 0x5D, 0x46, 0x0, 0x46, 0xCA, 0x5C, 0x5C, 0x51, 0x56, 0x10, 0x1, - 0x1B, 0xBF, 0xD0, 0xD0, 0xD0, 0xD0, 0xC9, 0xC9, 0xAD, 0xC9, 0xC9, 0xC4, 0xC9, 0xCE, 0x55, 0xBE, - 0xC1, 0x48, 0x3A, 0x1, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x8, 0x1A, 0x55, 0x5C, 0xC9, 0xCB, 0xC9, 0xCB, 0xCE, 0xC9, 0xCC, 0xCA, 0xD0, 0xFA, 0xFA, - 0xFA, 0xF1, 0xBF, 0xBE, 0xBF, 0xC2, 0xC0, 0xC0, 0x5B, 0x58, 0x58, 0x57, 0x58, 0x57, 0x5A, 0xC, - 0xB, 0x9B, 0x37, 0xB, 0x25, 0x37, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0xE, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF7, 0xBB, 0xFD, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0x2C, 0x1, - 0x7, 0x7, 0x1, 0x7, 0x7, 0x7, 0x1, 0x1, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x1, - 0x7, 0x7, 0x1, 0x1, 0x7, 0x7, 0x7, 0x7, 0xE, 0xE, 0x38, 0xB4, 0x3A, 0xA3, 0xE, 0x31, - 0x3C, 0xA3, 0xAA, 0x41, 0x7, 0x94, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0x31, 0xBD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBB, 0xA3, - 0x3A, 0x32, 0xB, 0x0, 0x6, 0x0, 0x0, 0x5, 0x30, 0x25, 0x4, 0x1E, 0x1, 0x33, 0xA4, 0xE9, - 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFA, 0xFA, 0xF3, 0xF3, 0xD0, 0xF3, 0xFA, 0xF3, 0xF3, 0xF3, 0x5C, - 0xCA, 0xCA, 0xCA, 0x4F, 0x1C, 0x5D, 0x50, 0x0, 0x36, 0xF3, 0xCC, 0xCA, 0xC9, 0x59, 0x57, 0x43, - 0x3, 0x3, 0x46, 0x5C, 0x5C, 0xBF, 0x5C, 0x5C, 0x5C, 0xC9, 0xC9, 0xCD, 0xBF, 0xCE, 0xBF, 0x3B, - 0x2E, 0x7, 0x1, 0x0, 0x0, 0x0, 0xFE, 0x0, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0xFE, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x55, 0x55, 0x5C, 0xCA, 0x5C, 0xCA, 0xCA, 0xD0, 0xFA, 0xFA, - 0xF3, 0xC0, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x58, 0x5B, 0x58, 0x58, 0x57, 0x5A, 0xC, - 0x20, 0x9B, 0x6B, 0x25, 0x29, 0x20, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xF5, 0xBD, 0x2C, - 0xE, 0x31, 0xBD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xE, 0xE, 0x0, - 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0xE, 0xE, 0xE, 0xE, 0xE, 0x7, - 0x0, 0x7, 0x7, 0x7, 0x1, 0x7, 0x7, 0x7, 0x7, 0x7, 0x3C, 0x3F, 0xA5, 0x3A, 0xA3, 0xA3, - 0x33, 0x3C, 0x38, 0x2C, 0x2C, 0x0, 0x94, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xBB, 0x41, 0x2C, 0x2C, 0x41, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB7, 0xA3, - 0x38, 0x31, 0xB, 0x4, 0x4, 0x0, 0xFE, 0x5, 0x30, 0x25, 0x1E, 0x1E, 0xFA, 0xFA, 0xFA, 0xFD, - 0xFA, 0xFD, 0xFA, 0xFA, 0xFA, 0xFD, 0xFA, 0xFA, 0xF3, 0xF3, 0xD0, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCC, 0xCA, 0x46, 0x3, 0x3, 0x5D, 0x5B, 0xA, 0x1C, 0xF3, 0xF3, 0xD0, 0xCC, 0xCA, 0x55, 0x51, - 0x56, 0x10, 0xF, 0x1C, 0x5C, 0xBF, 0x5C, 0x5C, 0x5C, 0xC9, 0xCD, 0xAC, 0xBF, 0xCE, 0x5A, 0x3, - 0x7, 0x1, 0x7, 0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x1, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x1, 0x3, 0xBF, 0xC9, 0xCA, 0xCC, 0xD0, 0xF3, 0xCA, - 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x57, 0x57, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5A, 0x5A, 0xB, - 0x25, 0x9B, 0x37, 0x5, 0x1F, 0x20, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xE, 0xE9, - 0xFD, 0xF0, 0x3C, 0xB4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xF0, 0xEA, 0xEA, 0xEA, 0xEA, 0xE, 0x7, 0x7, - 0x7, 0x7, 0x7, 0xE, 0xE, 0xE, 0xE, 0x9, 0xE, 0x7, 0xE, 0xE, 0xE, 0xE, 0xE, 0xE, - 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0xE, 0xE, 0x2C, 0x2C, 0xE, - 0x2C, 0x31, 0x7, 0x2C, 0x2C, 0x2C, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB8, 0x94, - 0x3A, 0x32, 0xB, 0x0, 0x4, 0x4, 0xB, 0x38, 0x25, 0x25, 0x4, 0x1E, 0xD0, 0xF3, 0xFA, 0xFA, - 0xFA, 0xFA, 0xFA, 0xF7, 0xC6, 0xA5, 0x52, 0x4F, 0x53, 0x55, 0xC9, 0xCE, 0xC9, 0xC4, 0xAD, 0xAD, - 0xAD, 0xCB, 0x55, 0x4F, 0x36, 0x5A, 0x5D, 0x5A, 0x1C, 0xF3, 0xF3, 0xF3, 0xF3, 0xD0, 0xC9, 0xAD, - 0x55, 0x5B, 0x1D, 0x3, 0x50, 0x5C, 0x5C, 0x5C, 0xC9, 0x5C, 0xCB, 0xE3, 0xC4, 0xCE, 0x5C, 0x43, - 0xBF, 0xBF, 0xBF, 0xBF, 0xC9, 0xC9, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, - 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5A, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x58, 0x58, 0x58, 0x57, 0x58, 0x57, 0x57, 0x58, 0x57, 0x58, 0x58, 0x58, 0x5A, 0x5A, 0x7, - 0x20, 0x9D, 0x37, 0x20, 0x20, 0x27, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x3A, 0xB4, 0x3A, 0xF7, - 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xE9, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xE9, - 0xF5, 0xF9, 0x7, 0x2C, 0x2C, 0x2C, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB8, 0x94, - 0x33, 0x2E, 0xB, 0x0, 0x5, 0x4, 0x25, 0x6E, 0x37, 0x1F, 0x4, 0x1E, 0xCD, 0xD0, 0xD0, 0xCD, - 0xAD, 0x3D, 0x2D, 0x3, 0x1, 0x1, 0x1, 0x3, 0x3, 0xA, 0x47, 0xC1, 0x49, 0x1A, 0x1A, 0x35, - 0x36, 0xC9, 0x5C, 0x5A, 0x52, 0x55, 0x5C, 0xCA, 0x5C, 0xCC, 0xD0, 0xD0, 0xD0, 0xF3, 0xC9, 0xC9, - 0x5C, 0x5A, 0x5B, 0x59, 0x51, 0x5C, 0x5C, 0x5C, 0x5C, 0xC9, 0xC9, 0xC4, 0x5C, 0xCE, 0x5D, 0x46, - 0xCA, 0xCE, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCC, 0xCC, 0xCA, 0xCA, 0xCC, 0xCC, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x5B, 0x5B, - 0x5B, 0x5B, 0x58, 0x5A, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x7, - 0xD, 0x9B, 0x37, 0xD, 0x22, 0x25, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0x3A, 0xE, 0x31, - 0xBD, 0xF0, 0xAA, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xEA, - 0xF7, 0xFD, 0x7, 0x2C, 0x2C, 0x2C, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xBB, 0x41, 0x2C, 0x2C, 0x41, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB7, 0x94, - 0x38, 0x32, 0xE, 0x0, 0x5, 0x0, 0xB, 0x37, 0x29, 0x1F, 0x1E, 0x1E, 0x52, 0x2F, 0xA, 0x1, - 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x9, 0xA, 0x2E, 0xA, 0x34, 0xBF, 0xBF, 0x36, 0x1A, 0x1C, - 0x36, 0xC9, 0x5C, 0x5A, 0x52, 0x4C, 0x3D, 0x4E, 0x52, 0xC9, 0xCA, 0xCB, 0xCB, 0xCA, 0xC9, 0x5C, - 0x5C, 0x5C, 0x1A, 0x5A, 0x5A, 0x5C, 0x5C, 0x5C, 0x5C, 0xC9, 0xCB, 0xE3, 0xC3, 0xCE, 0xC0, 0x1D, - 0x55, 0xC4, 0xBF, 0xBF, 0xC9, 0xCA, 0xCC, 0xCA, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x58, 0x58, 0x58, 0x5A, 0xE, - 0x20, 0x9B, 0x37, 0x20, 0x22, 0x25, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xE9, - 0xA3, 0x33, 0xE, 0x41, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xE9, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xE9, - 0xF5, 0xF9, 0x0, 0xE, 0x2C, 0x2C, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0xFD, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, - 0x3A, 0x31, 0xE, 0x0, 0x4, 0x0, 0x6, 0x37, 0x20, 0x1F, 0x1E, 0x4, 0x7, 0x0, 0x0, 0x0, - 0x7, 0x0, 0x1, 0x0, 0x0, 0x9, 0xE, 0xA, 0x16, 0xA, 0x1A, 0x49, 0xEC, 0x47, 0x1A, 0x1C, - 0x4C, 0x5C, 0x5C, 0x5C, 0x53, 0x4C, 0x3D, 0x36, 0x52, 0x55, 0xC9, 0xCD, 0xCB, 0xC9, 0x54, 0xAD, - 0x55, 0x5C, 0x1C, 0x46, 0x5C, 0x5C, 0xC9, 0xC9, 0xC9, 0xCB, 0xCB, 0xC9, 0xC9, 0xCE, 0x5C, 0x7, - 0x1, 0x1, 0x2C, 0x4C, 0xCD, 0xC9, 0xC4, 0x55, 0xAD, 0x5C, 0x5C, 0x5C, 0x5C, 0x55, 0x5A, 0x5A, - 0x5A, 0x57, 0x51, 0x51, 0x51, 0x57, 0x5A, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x58, 0x5A, 0x5A, 0x58, 0x5A, 0x5A, 0x7, - 0x20, 0x9B, 0x25, 0xD, 0x22, 0x25, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF8, 0xBD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xF0, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, - 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, - 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xEA, 0xE9, 0xE9, 0xBD, 0xBD, 0xBD, - 0xEA, 0xF7, 0x0, 0x7, 0x9, 0xE, 0x7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x31, - 0xA3, 0xBD, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xAA, - 0x3B, 0x33, 0x2C, 0x4, 0x6, 0x4, 0x25, 0x6E, 0x25, 0x1F, 0x4, 0x1E, 0x8, 0x1, 0x1, 0x1, - 0x3, 0x3, 0x1, 0x1, 0x0, 0x3, 0x3, 0x3, 0x3, 0x3, 0xA, 0x1B, 0xBE, 0xCD, 0x46, 0x1A, - 0x36, 0x5C, 0x5C, 0x5C, 0x55, 0x52, 0x36, 0x1B, 0x1A, 0x1B, 0x12, 0x2C, 0x9, 0x0, 0xFE, 0xFE, - 0xFE, 0x53, 0x46, 0x1D, 0x5D, 0x5A, 0x5A, 0x5C, 0xCD, 0xCE, 0xD0, 0xCD, 0x5C, 0xCD, 0x5C, 0x1B, - 0x1A, 0x12, 0x3, 0x0, 0x0, 0x0, 0x1, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, - 0x3, 0xF, 0x3, 0x3, 0x3, 0x3, 0x12, 0x50, 0x5A, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0xB, - 0x20, 0x79, 0x20, 0xD, 0x22, 0x25, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x41, - 0xB6, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, - 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, - 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF8, 0xF7, 0xF0, 0xE9, 0xBD, 0xBD, - 0xE9, 0xF5, 0x0, 0x1, 0x1, 0x7, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, - 0xB6, 0x41, 0x2C, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xAA, - 0x3B, 0x33, 0x2C, 0x4, 0x4, 0x0, 0x25, 0x71, 0x29, 0x1F, 0x1E, 0x1E, 0x2D, 0x1A, 0xA, 0xA, - 0xA, 0xA, 0xA, 0xA, 0x1, 0x1, 0x3, 0x3, 0x3, 0x1A, 0x1C, 0x1A, 0x46, 0xC1, 0xEC, 0x49, - 0x12, 0x12, 0x1C, 0x1D, 0x36, 0x3D, 0x1, 0x1, 0x1, 0x1, 0xFE, 0x0, 0x0, 0x0, 0xFE, 0xFE, - 0x0, 0x1C, 0xBF, 0x1A, 0xCA, 0x5A, 0xCA, 0xCA, 0xD0, 0xD0, 0xF3, 0xD0, 0xD0, 0xD0, 0x5C, 0x49, - 0x4A, 0x49, 0x49, 0x44, 0x1B, 0x2D, 0x1B, 0x1B, 0x1B, 0x1B, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x34, 0x34, 0x1B, 0x34, 0x34, 0x34, 0x2D, 0x8, 0x1, 0x12, 0x1B, 0x1D, 0x46, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5A, 0x5A, 0xB, - 0x20, 0x9B, 0x25, 0x20, 0x29, 0x25, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xB7, - 0xB4, 0x38, 0x2C, 0x41, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xBD, 0xBD, - 0xD8, 0xF0, 0x0, 0x1, 0x0, 0x0, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x41, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xAA, - 0x3B, 0x33, 0x2C, 0x0, 0x4, 0xFE, 0x30, 0x6E, 0x28, 0x1F, 0x1E, 0x4, 0x12, 0xE, 0x3, 0x3, - 0x3, 0x3, 0x3, 0x1, 0x0, 0x0, 0x3, 0x1A, 0x36, 0x1C, 0x1C, 0x1A, 0x1A, 0x36, 0xBF, 0xF1, - 0xC2, 0xAB, 0x46, 0x1B, 0x12, 0x12, 0x8, 0x8, 0x8, 0x0, 0x43, 0x43, 0x43, 0x43, 0x1B, 0x10, - 0x0, 0x1, 0x5C, 0x5C, 0x5A, 0x51, 0x5C, 0x5C, 0xCA, 0xD0, 0xF3, 0xD0, 0xD0, 0xF3, 0x5C, 0xAB, - 0xBE, 0xBE, 0xAB, 0x49, 0x4A, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, - 0x49, 0x49, 0x49, 0x49, 0x49, 0x49, 0x4A, 0x49, 0x49, 0x49, 0x49, 0x49, 0xAB, 0x5A, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5A, 0x5A, 0xB, - 0xC, 0x9B, 0x30, 0x20, 0x29, 0x28, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBD, 0xA3, - 0xFD, 0xFD, 0xF9, 0xBD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, - 0xD8, 0xF0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0x2C, 0xE, 0x33, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xAA, - 0x3C, 0x33, 0xE, 0x0, 0x4, 0x0, 0x39, 0x97, 0x28, 0x1F, 0x1E, 0x1E, 0x12, 0x8, 0x8, 0x3, - 0x3, 0xA, 0x1A, 0xA, 0x1, 0x0, 0x3, 0xA, 0x1A, 0x1C, 0x1C, 0x1C, 0x1A, 0x1A, 0x1C, 0x52, - 0xAD, 0xEC, 0xF1, 0xEC, 0xCE, 0xC1, 0xC1, 0xC1, 0xC1, 0xAB, 0x5A, 0x5C, 0x5C, 0x5C, 0x5C, 0x5A, - 0x50, 0x10, 0x36, 0xCA, 0x5A, 0x46, 0x18, 0x50, 0x5C, 0xCC, 0xD0, 0xF3, 0xD0, 0xF3, 0xC9, 0xBF, - 0xBF, 0xCD, 0xBF, 0xCD, 0xC1, 0xC2, 0xC2, 0xC2, 0xC1, 0xC1, 0xC2, 0xC1, 0xC1, 0xC1, 0xC1, 0xC1, - 0xBE, 0xBE, 0xC1, 0xC1, 0xC1, 0xC1, 0xF1, 0xCE, 0xCE, 0xC2, 0xC2, 0xCE, 0xC0, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0xD, - 0x5, 0x71, 0x32, 0xC, 0x29, 0x1F, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x31, - 0xBD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, - 0xD8, 0xF0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0xE9, 0xFD, 0xF0, 0x3A, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA5, - 0x3C, 0x32, 0xB, 0x0, 0x5, 0x0, 0x39, 0x6F, 0x22, 0x21, 0x1E, 0x1E, 0x8, 0x7, 0x3, 0x9, - 0x3, 0xA, 0x3, 0x3, 0xA, 0xA, 0x3, 0xA, 0x18, 0x1B, 0x1A, 0x1C, 0x36, 0x36, 0x36, 0x36, - 0x36, 0x4F, 0x5A, 0x56, 0x51, 0x36, 0x1D, 0x1B, 0x1B, 0x34, 0x51, 0x5C, 0xCA, 0xCA, 0x5C, 0xCA, - 0xCA, 0x5D, 0x1B, 0x5C, 0x5A, 0x5A, 0x42, 0x10, 0x51, 0xC9, 0xCC, 0xF3, 0xF3, 0xF3, 0xCA, 0xBF, - 0xC2, 0xCE, 0xEC, 0xF7, 0xF1, 0xF1, 0xF1, 0xEC, 0xCE, 0xCE, 0xEC, 0xEC, 0xCD, 0xCD, 0xCD, 0xC2, - 0xC1, 0xC1, 0xC1, 0xC2, 0xC1, 0xEC, 0xCE, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0xD, - 0x5, 0x97, 0x37, 0xD, 0x37, 0x1F, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, - 0x41, 0x2C, 0x2C, 0x41, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x31, - 0xE, 0xE, 0xE, 0x9, 0xE, 0xE, 0xE, 0x2C, 0x2C, 0x2C, 0xE, 0xE, 0x2C, 0xE, 0xE, 0xE, - 0xE, 0xE, 0xE, 0x2C, 0x31, 0x2C, 0x2C, 0xE, 0x31, 0x31, 0x2C, 0xE, 0x2C, 0x7, 0x7, 0x7, - 0x7, 0x9, 0x0, 0x7, 0x7, 0x0, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, - 0xB6, 0xFD, 0xFD, 0xF9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB6, 0x94, - 0x38, 0x25, 0x1F, 0x4, 0x4, 0x0, 0x39, 0xA7, 0x28, 0x1F, 0x1E, 0x1E, 0x8, 0x7, 0xA, 0x2C, - 0x1A, 0x12, 0xA, 0x1A, 0x12, 0xA, 0xA, 0x1A, 0x1A, 0x18, 0x1B, 0x1A, 0x1C, 0x1A, 0x1C, 0x1C, - 0x34, 0x4C, 0x5C, 0x51, 0x50, 0xF, 0x10, 0x11, 0x11, 0xF, 0x1B, 0x46, 0x1A, 0x36, 0x50, 0x5C, - 0xCA, 0xCA, 0x5C, 0x50, 0xCA, 0x5C, 0x5C, 0x50, 0x43, 0xA, 0x52, 0xD0, 0xF3, 0xF3, 0xCE, 0xF1, - 0xF1, 0xF1, 0xCE, 0xCE, 0xD0, 0xD0, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0xD, - 0x4, 0xA7, 0x39, 0x20, 0x65, 0x1E, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF7, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x7, 0x3F, - 0x2C, 0x2C, 0x7, 0x0, 0x7, 0xE, 0xE, 0x31, 0x38, 0x33, 0xE, 0x41, 0x38, 0x3F, 0xA5, 0x2C, - 0x31, 0xA3, 0xB4, 0x41, 0x2C, 0xE, 0xE, 0x3C, 0xA8, 0xE, 0xA3, 0xA3, 0x3A, 0x7, 0x7, 0x0, - 0x0, 0x7, 0x7, 0x7, 0x9, 0x7, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, - 0x31, 0xE9, 0xF7, 0xB6, 0xB4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xB4, 0x41, - 0x33, 0x25, 0x1F, 0x4, 0x6, 0x0, 0x39, 0x9B, 0x28, 0x1F, 0x1E, 0x1E, 0x8, 0x8, 0xA, 0x12, - 0x1A, 0x1A, 0xA, 0xA, 0x12, 0x12, 0x10, 0xF, 0x1, 0x1, 0x1, 0xF, 0xF, 0xF, 0xF, 0xF, - 0xF, 0x11, 0x11, 0x10, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x43, 0x1B, 0x1, 0x0, 0x0, 0x0, - 0x3, 0x53, 0x5A, 0x50, 0xCA, 0xCA, 0xCA, 0x5C, 0x5D, 0xC0, 0xCA, 0xCC, 0xF3, 0xFA, 0xD0, 0xCE, - 0xCE, 0xCE, 0xD0, 0xD0, 0xD0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, - 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x6, - 0xFE, 0xAE, 0x3E, 0x20, 0x6B, 0x1E, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x3A, - 0xA3, 0xB6, 0xE9, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x7, 0x2C, 0x3C, - 0xA3, 0x2C, 0x7, 0x1, 0x7, 0xE, 0xE, 0xE, 0xE, 0x2C, 0x3C, 0x3C, 0xE, 0xB4, 0xB6, 0x3A, - 0x38, 0xA8, 0x38, 0x2C, 0x2C, 0xE, 0xE, 0x7, 0x38, 0x33, 0x0, 0x7, 0xE, 0x7, 0x7, 0x7, - 0x7, 0x1, 0x0, 0x0, 0x7, 0x7, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xBB, 0x41, 0x2C, 0xE, 0xA3, 0xD8, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA8, 0x3A, - 0x31, 0x30, 0x1F, 0x4, 0x6, 0x0, 0x3E, 0xAF, 0x28, 0x1F, 0x4, 0x1E, 0xF, 0x1, 0x1, 0x1, - 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x0, 0x3, 0x1, 0x1, 0x1, 0x1, 0xFE, 0xFE, 0xFE, 0xFE, - 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x0, 0x46, 0x1A, 0x1, 0x0, 0x1, 0x0, - 0x0, 0x1A, 0x5A, 0x1B, 0x53, 0xCA, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xD0, 0xF3, 0xCE, 0xC9, - 0xC9, 0xC9, 0xCD, 0xC9, 0xAD, 0x43, 0x43, 0x43, 0x5C, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x6, - 0xFE, 0xBC, 0xA9, 0x20, 0x71, 0x1E, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xE9, - 0xB6, 0x3C, 0xE, 0x3A, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0x33, 0x2C, - 0x41, 0xA8, 0x33, 0x7, 0x7, 0x7, 0x7, 0xE, 0x38, 0x41, 0x31, 0xE, 0x31, 0x33, 0x38, 0x3A, - 0x33, 0x38, 0x31, 0x31, 0x33, 0x33, 0x2C, 0xE, 0xE, 0xA8, 0x0, 0x7, 0x7, 0x1, 0x7, 0xE, - 0xE, 0x7, 0x7, 0x0, 0x0, 0x1, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x41, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, 0x3A, - 0x31, 0x30, 0x6, 0x4, 0x4, 0x0, 0x6C, 0x9B, 0x22, 0x1F, 0x4, 0x1E, 0x1, 0x1, 0x1, 0x1, - 0xF, 0xF, 0xF, 0x1, 0x0, 0xFE, 0x3, 0x4F, 0x53, 0x59, 0x53, 0x53, 0x12, 0x0, 0xFE, 0xFE, - 0x0, 0x0, 0x0, 0xFE, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x46, 0xA, 0x0, 0x1, 0x1D, 0x0, - 0x0, 0x1, 0x55, 0x1D, 0xA, 0x2F, 0x2F, 0x34, 0x53, 0x55, 0x52, 0x3D, 0x36, 0x36, 0x2F, 0x12, - 0x1A, 0x1A, 0x1B, 0x13, 0x12, 0x46, 0x4F, 0x4F, 0x4F, 0x55, 0xC0, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, - 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5B, 0x5D, 0xD, - 0xFE, 0xE0, 0xBA, 0x20, 0x9B, 0x1F, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xBD, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF8, 0xF8, 0xF8, 0xE, 0x2C, 0x2C, - 0x2C, 0x38, 0xA3, 0xB6, 0xA3, 0x33, 0x3C, 0x41, 0x3A, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x38, 0xAA, - 0x38, 0x33, 0x31, 0x38, 0x38, 0x33, 0x33, 0xE, 0xE, 0xAA, 0x9, 0x9, 0x7, 0x1, 0x1, 0x7, - 0x9, 0xE, 0xE, 0x7, 0x1, 0x1, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA8, 0x3A, - 0x33, 0x2C, 0x6, 0x4, 0x4, 0x0, 0x6B, 0x9B, 0x29, 0x1F, 0x4, 0x4, 0x1, 0x1, 0x1, 0x1, - 0x1, 0xF, 0x1, 0x1, 0xFE, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xF, 0xF, 0xF, 0xF, - 0xF, 0xF, 0x1, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x46, 0x3, 0x0, 0x1, 0x4C, 0x4B, - 0x0, 0x0, 0xA, 0xA, 0x3, 0x46, 0x52, 0x52, 0x47, 0x47, 0x50, 0x5C, 0x5A, 0x5A, 0x5A, 0x5C, - 0x5C, 0x5C, 0x5C, 0x5C, 0x53, 0x5C, 0xCA, 0xCA, 0xBF, 0x53, 0x55, 0xCA, 0xCC, 0xCA, 0xCA, 0x5D, - 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5D, 0x5D, 0x6, - 0x0, 0xED, 0xD7, 0x1F, 0x9B, 0x1F, 0xED, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF5, 0xEE, 0xEA, 0xEA, 0x7, 0x31, 0x2C, - 0x2C, 0xE, 0x2C, 0x31, 0x33, 0x33, 0x2C, 0xE, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x31, 0xB6, - 0x31, 0x2C, 0x33, 0x38, 0x38, 0x33, 0x31, 0x2C, 0x31, 0xB6, 0x33, 0x2C, 0xE, 0x7, 0x7, 0x7, - 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xAA, 0x3F, - 0x2F, 0x2C, 0x6, 0x4, 0x4, 0x4, 0x37, 0x9B, 0x29, 0x1E, 0x4, 0x4, 0x0, 0x0, 0x2A, 0x6, - 0x0, 0x0, 0x0, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, - 0x1, 0x1, 0x1, 0xFE, 0x0, 0x0, 0x0, 0x0, 0xFE, 0x8, 0x43, 0x1, 0x0, 0x1, 0x36, 0x27, - 0x0, 0x0, 0x0, 0x8, 0x4F, 0x4F, 0x4F, 0x4F, 0x47, 0x47, 0x55, 0xC9, 0xCB, 0xCA, 0xCB, 0xD0, - 0xCE, 0xCE, 0xCB, 0xCB, 0xC9, 0x5C, 0xCA, 0xCA, 0xCE, 0xCC, 0xD0, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, - 0x5D, 0x5B, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5D, 0x5D, 0x6, - 0x0, 0xD8, 0xBA, 0x1F, 0x71, 0x1F, 0xEF, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0x31, - 0xE, 0x31, 0xB6, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xE9, 0xBD, 0xBD, 0xBD, 0x7, 0x2C, 0x2C, - 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x33, 0xB4, - 0x33, 0x2C, 0x33, 0x38, 0x3A, 0x33, 0x2C, 0x33, 0x38, 0x94, 0x3A, 0x2C, 0x2C, 0x2C, 0xE, 0x9, - 0x7, 0x7, 0x7, 0x7, 0x7, 0xE, 0x1, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xAA, 0x3F, - 0x2F, 0x2C, 0x4, 0x4, 0x6, 0x4, 0x20, 0xB2, 0x37, 0x4, 0x4, 0x1E, 0x0, 0x25, 0x4B, 0x0, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, - 0x0, 0x0, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x46, 0x0, 0xFE, 0x0, 0x3, 0x42, - 0x1, 0x0, 0x0, 0x1, 0x4F, 0x53, 0x53, 0x53, 0x47, 0x46, 0x50, 0xC9, 0xCE, 0xCE, 0xCE, 0xCC, - 0xCE, 0xD0, 0xD0, 0xCC, 0xCE, 0xCC, 0xD0, 0xD0, 0xD0, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, - 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5D, 0x5D, 0x6, - 0xFE, 0xD8, 0xB0, 0x20, 0x71, 0x1F, 0xF6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xBD, - 0xFD, 0xE, 0xA3, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xBD, 0x7, 0x2C, 0x2C, - 0x2C, 0x2C, 0x2C, 0x31, 0x2C, 0x2C, 0x2C, 0x2C, 0xE, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x3A, - 0xAA, 0xA3, 0x33, 0x33, 0x31, 0x2C, 0x31, 0x33, 0x38, 0x38, 0x3A, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, - 0xE, 0x9, 0x7, 0x1, 0x7, 0x7, 0x0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xB4, 0x3F, - 0x34, 0x2C, 0x4, 0x4, 0x6, 0x4, 0x1F, 0xD5, 0x6B, 0x4, 0x1E, 0x1E, 0xFE, 0x0, 0x0, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0xFE, 0x0, 0x0, 0xFE, 0x12, 0x36, 0x0, 0xFE, 0xFE, 0xFE, 0x1, - 0x1B, 0x3, 0x0, 0x1, 0x1B, 0x50, 0x56, 0x51, 0x46, 0x43, 0x50, 0xC0, 0xCE, 0xD0, 0xD0, 0xD0, - 0xD0, 0xD0, 0xD0, 0xD0, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0x5D, - 0x5B, 0x5D, 0x5D, 0x5B, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5D, 0x6, - 0x20, 0xFB, 0xBA, 0x25, 0x6B, 0x4, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xF8, - 0xFD, 0xE, 0xF9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xBD, 0xBB, 0xBB, 0xBB, 0x0, 0xE, 0x2C, - 0x2C, 0x33, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, - 0xE, 0x33, 0xA8, 0xA3, 0x33, 0xE, 0x41, 0xB4, 0x3A, 0x3A, 0x31, 0x2C, 0x2C, 0x2C, 0x2C, 0x2C, - 0x2C, 0x2C, 0x2C, 0x7, 0x7, 0x0, 0x41, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xAA, 0x3F, - 0x38, 0x30, 0x4, 0x4, 0x4, 0x4, 0x4, 0xD5, 0x71, 0x1E, 0x1E, 0x1E, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x2B, 0x16, 0x24, 0x6, 0x16, 0x9, 0x16, 0x7, 0x24, 0x7, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x36, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, - 0x0, 0x1A, 0x0, 0x0, 0x3, 0x5A, 0x5C, 0x5C, 0x46, 0x43, 0x3, 0x18, 0x1D, 0x46, 0x4C, 0x54, - 0xBF, 0xBF, 0xC9, 0xC9, 0xCC, 0xCC, 0xCC, 0x5C, 0x53, 0x53, 0x59, 0x59, 0x50, 0x50, 0x50, 0x50, - 0x50, 0x50, 0x50, 0x50, 0x50, 0x56, 0x56, 0x50, 0x51, 0x5D, 0x5D, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, - 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x1F, - 0xB, 0xAF, 0x39, 0xB, 0x37, 0x97, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x3A, - 0xFD, 0xE, 0xF0, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xBD, 0xBB, 0xBB, 0xBB, 0xBB, 0x0, 0x7, - 0x7, 0x2C, 0x7, 0xE, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0xE, 0xE, 0x2C, 0x2C, - 0xE, 0x7, 0x7, 0x7, 0x2C, 0x2C, 0x2C, 0xE, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, 0x7, - 0x7, 0x7, 0x7, 0x7, 0x0, 0x94, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xA8, 0x3C, - 0x33, 0xE, 0x4, 0x6, 0x4, 0x4, 0x0, 0x9B, 0xB2, 0x4, 0x4, 0x1E, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x98, 0x7, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0xFE, 0x1A, 0x36, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, - 0x0, 0x1A, 0x0, 0x0, 0x1, 0x1D, 0x59, 0x59, 0x43, 0x43, 0x8, 0x3, 0x3, 0xF, 0x10, 0x10, - 0x2F, 0xCD, 0xCE, 0xCE, 0xCE, 0xCD, 0xCE, 0x12, 0x3, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, - 0x18, 0x12, 0x12, 0x12, 0x12, 0x1A, 0x12, 0x12, 0x12, 0x50, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, - 0x5D, 0x5B, 0x5D, 0x5D, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5D, 0x1F, - 0xFE, 0x0, 0x4, 0xB, 0x4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, - 0xFD, 0xE, 0x2C, 0xD8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xBD, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, - 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, - 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBD, - 0xD8, 0xF0, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, 0x3A, - 0x31, 0xB, 0x0, 0x6, 0x4, 0x4, 0x4, 0x6C, 0x9B, 0x1E, 0x4, 0x1E, 0x0, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0x2, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x1D, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0x12, 0x0, 0x0, 0x0, 0x1, 0x53, 0x5A, 0x42, 0x4F, 0x46, 0x36, 0x36, 0x36, 0x34, 0x1A, - 0x12, 0x1A, 0x34, 0x34, 0x36, 0x46, 0x34, 0x12, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x3D, 0x3D, - 0x3D, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x34, 0x36, 0x46, 0x4F, 0x50, 0x57, 0x5A, 0x5B, 0x5B, - 0x5D, 0x5B, 0x5D, 0x5D, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x6, - 0xB, 0x29, 0x32, 0x4, 0x20, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xD8, 0xBD, 0xBD, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, - 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, - 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBB, 0xBD, 0xBD, - 0xE9, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB8, 0x94, 0x3A, - 0x31, 0xB, 0x4, 0x6, 0x4, 0x4, 0x0, 0x5, 0x20, 0x1F, 0x1E, 0x4, 0x0, 0x0, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0xFE, 0xFE, 0xFE, 0x0, 0x0, 0x0, 0x0, 0x0, 0x12, 0x36, 0x0, 0xFE, 0xFE, 0xFE, 0xFE, - 0xFE, 0x12, 0xFE, 0x0, 0x0, 0x0, 0x12, 0x5A, 0x43, 0x50, 0x59, 0x55, 0x55, 0x59, 0x53, 0x53, - 0x53, 0x34, 0x34, 0x34, 0x34, 0x34, 0x12, 0x1A, 0x4F, 0x52, 0x52, 0x52, 0x52, 0x55, 0x52, 0x52, - 0x52, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x5C, 0x36, 0x1B, 0x1B, 0x1B, 0x1A, 0x59, - 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0xC, - 0x0, 0x9B, 0x6E, 0xFE, 0xEF, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, 0xBD, - 0xEA, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB6, 0x41, 0x38, - 0x30, 0xD, 0x6, 0x4, 0x4, 0x5, 0xFE, 0x0, 0x1F, 0x1F, 0x1F, 0x1E, 0x46, 0x4F, 0x4F, 0x46, - 0x46, 0x46, 0x4F, 0x46, 0x43, 0x43, 0x1D, 0x1A, 0x3, 0xFE, 0xFE, 0xFE, 0x0, 0x12, 0x12, 0x12, - 0x12, 0x12, 0x0, 0xFE, 0x12, 0x0, 0x0, 0x0, 0x0, 0x12, 0x34, 0x1, 0x1, 0x1, 0x1, 0x1, - 0x0, 0x12, 0x1, 0x1, 0x1, 0x1, 0x1, 0x43, 0x43, 0x55, 0x5C, 0x5C, 0x5C, 0xC0, 0xC0, 0xC0, - 0xBF, 0xC9, 0xCA, 0xC0, 0xC0, 0xCA, 0x36, 0x34, 0xC9, 0xC9, 0xC9, 0xC0, 0xC9, 0xC9, 0x5A, 0x5C, - 0x5C, 0x55, 0x55, 0x55, 0xBF, 0xBF, 0xBF, 0xBF, 0xBF, 0xC9, 0x5C, 0xBF, 0x5C, 0x5A, 0x5A, 0xCC, - 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0xC, - 0x4, 0xAF, 0x3E, 0x0, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF5, 0xE9, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, - 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, - 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xD8, 0xE9, 0xEA, - 0xF5, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB6, 0x41, 0x38, - 0x2C, 0x2C, 0xD, 0x4, 0x4, 0x4, 0x4, 0x39, 0x71, 0x1F, 0x1E, 0x1E, 0xCA, 0xCA, 0x5C, 0x5C, - 0xCA, 0xC9, 0xCA, 0xCA, 0x5C, 0x5C, 0x5C, 0xC9, 0x4C, 0xFE, 0xFE, 0xFE, 0xA, 0x5C, 0x5C, 0x5C, - 0x5C, 0xBF, 0x1, 0xFE, 0x34, 0x8, 0x0, 0x0, 0x0, 0x12, 0x1A, 0x1, 0x1, 0xF, 0xF, 0xF, - 0x1, 0x2F, 0x96, 0x18, 0x11, 0x11, 0x19, 0x42, 0x43, 0x55, 0xC9, 0xC9, 0xCE, 0xCB, 0xCE, 0xC9, - 0xCD, 0xCD, 0xCF, 0xCF, 0xCE, 0xD0, 0x54, 0x36, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, - 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCA, 0xCB, 0xD0, 0xD0, 0xCC, 0xCA, 0xCA, 0xCC, 0xCA, - 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x23, - 0x5, 0xAF, 0x37, 0xB, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF7, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, - 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, - 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF0, 0xF7, - 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA3, 0x3A, - 0x2C, 0x2C, 0xD, 0x4, 0x4, 0x4, 0x20, 0xDB, 0xB5, 0x1E, 0x4, 0x1E, 0xC9, 0xC9, 0xC9, 0x5C, - 0xC9, 0xC9, 0xCC, 0xCC, 0xCA, 0xC9, 0x5C, 0x5C, 0x55, 0x0, 0xFE, 0xFE, 0x0, 0x5C, 0x5C, 0x5C, - 0x5C, 0x5C, 0x12, 0x0, 0x43, 0x1A, 0x0, 0x0, 0x0, 0xA, 0x3, 0x1, 0x1, 0xF, 0xF, 0xF, - 0xF, 0xF, 0x10, 0x10, 0x11, 0x11, 0x11, 0x43, 0x43, 0x55, 0xC9, 0xCD, 0xCE, 0xCE, 0xCE, 0xD0, - 0xD0, 0xCD, 0xCE, 0xCC, 0xCC, 0xCC, 0xBF, 0x3D, 0xCB, 0xCB, 0xCF, 0xCF, 0xCF, 0xCF, 0xCF, 0xD0, - 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, - 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0xC, - 0x4, 0xAF, 0x37, 0x4, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, - 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, - 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xF9, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xD8, 0xA8, 0x3C, - 0x33, 0x2C, 0xD, 0x2, 0x6, 0x4, 0x4, 0xD5, 0xB2, 0x4, 0x4, 0x1E, 0xCB, 0xCB, 0xE4, 0xC6, - 0xCA, 0xC9, 0xCA, 0xCC, 0xCC, 0xC9, 0xC9, 0xC9, 0xC9, 0x36, 0xFE, 0xFE, 0xFE, 0x36, 0x5C, 0xC9, - 0xC9, 0xC9, 0x46, 0x0, 0x43, 0x46, 0x1, 0x0, 0x0, 0x1, 0x1, 0xA, 0x95, 0x2E, 0xF, 0xF, - 0xF, 0xF, 0xF, 0xF, 0x10, 0x10, 0x11, 0x47, 0x43, 0x55, 0xC9, 0xCD, 0xCD, 0xC2, 0xCD, 0xCE, - 0xD0, 0xD0, 0xD0, 0xCC, 0xCC, 0xCC, 0xCC, 0xC0, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xC0, - 0x5D, 0xC0, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5A, 0x58, 0x5B, 0x7, - 0x4, 0x71, 0x6C, 0x0, 0xD7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xB4, 0x41, - 0x33, 0x2C, 0x7, 0x4, 0xB, 0x4, 0x4, 0xD5, 0xB5, 0x4, 0x4, 0x4, 0xCC, 0xCC, 0xC8, 0xC3, - 0xC9, 0xC9, 0xC9, 0x5C, 0x5C, 0xC9, 0xBF, 0x55, 0xAD, 0x53, 0x12, 0xFE, 0xFE, 0x0, 0x1A, 0x55, - 0x55, 0x55, 0x53, 0x0, 0x43, 0x5A, 0x12, 0x0, 0x0, 0x0, 0x1, 0x1, 0x1, 0x1, 0xF, 0xF, - 0xF, 0xF, 0xF, 0xF, 0xF, 0x10, 0x10, 0x59, 0x42, 0x59, 0x59, 0xBF, 0xCD, 0xCD, 0xCD, 0xCE, - 0xD0, 0xD0, 0xCC, 0xCC, 0xCE, 0xC9, 0xC9, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5B, 0x5D, 0x5D, 0x5D, 0x5D, - 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x58, 0x5B, 0x4, - 0x4, 0x79, 0x6B, 0x6, 0x29, 0xD5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xB6, 0x94, - 0x33, 0x31, 0xC, 0x4, 0x4, 0x4, 0x4, 0xDB, 0xD5, 0x4, 0x4, 0x4, 0xCC, 0xCA, 0xC6, 0xC3, - 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xAD, 0xBF, 0xBF, 0xBF, 0x55, 0x55, 0x1, 0xFE, 0x0, 0x1, 0x46, - 0x5C, 0x5C, 0x5C, 0x12, 0x36, 0x5A, 0x5A, 0x1A, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x1, 0x3, - 0x3, 0x27, 0x2E, 0xA, 0x4B, 0x32, 0x12, 0x5C, 0x1B, 0x59, 0x59, 0xC1, 0xBF, 0xAD, 0xAD, 0xAD, - 0xAD, 0xBF, 0xAD, 0xAD, 0xAD, 0xBF, 0xBF, 0xBF, 0xC9, 0xC9, 0xC9, 0xC9, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5D, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5A, 0x5A, 0xB, - 0x4, 0x9B, 0x29, 0x20, 0x29, 0x29, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBB, 0xA3, - 0x3A, 0x33, 0xE, 0x5, 0x4, 0x4, 0x1F, 0xE6, 0xB2, 0x4, 0x4, 0x1E, 0xCA, 0xC9, 0x5C, 0x5A, - 0x5C, 0xC9, 0x5C, 0xCA, 0xCC, 0xCA, 0xC9, 0x5C, 0xC9, 0x55, 0x5A, 0x46, 0x10, 0x1, 0x0, 0x1, - 0x3, 0x1B, 0x1B, 0x18, 0x18, 0x43, 0x1D, 0x12, 0x1, 0x1D, 0x43, 0x43, 0x36, 0x46, 0x46, 0x46, - 0x46, 0x52, 0x4F, 0x4F, 0x52, 0x4F, 0x53, 0xBF, 0x18, 0x50, 0x56, 0xBF, 0xC2, 0xCD, 0xCD, 0xCD, - 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xD0, 0xD0, 0xCE, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x5B, 0x58, 0x5A, 0x5A, 0xE, - 0x0, 0x79, 0x6B, 0x6, 0xD5, 0x6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xBD, 0xAA, - 0x3C, 0x33, 0x2C, 0xB, 0x4, 0x4, 0x1F, 0xDB, 0xB2, 0x4, 0x4, 0x1E, 0x5C, 0x5C, 0x5C, 0x5C, - 0x5C, 0x5C, 0xBF, 0xCA, 0xCA, 0xC9, 0xC9, 0xC9, 0xC9, 0xAD, 0xBF, 0xBF, 0x49, 0x44, 0x13, 0x13, - 0x10, 0x10, 0xF, 0x10, 0x10, 0x3, 0x1, 0x3, 0x3, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, - 0xBF, 0xCE, 0xCE, 0xCE, 0xCE, 0xC9, 0xC9, 0xBF, 0x12, 0x7, 0x10, 0x12, 0x12, 0x12, 0x12, 0x12, - 0x12, 0x1A, 0x1B, 0x1A, 0x1A, 0x1B, 0x34, 0x34, 0x1D, 0x36, 0x46, 0x46, 0x46, 0x46, 0x55, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x5B, 0x58, 0x58, 0x5A, 0x7, - 0x4, 0x9B, 0x6B, 0xD, 0x1F, 0x6B, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xE9, 0xB4, - 0x3C, 0x33, 0x2C, 0xB, 0x4, 0x4, 0x1F, 0xDB, 0xD5, 0x4, 0x4, 0x1E, 0x54, 0x53, 0x53, 0x55, - 0x5A, 0x5A, 0x55, 0x53, 0x55, 0x55, 0x55, 0x53, 0x53, 0x52, 0x53, 0x53, 0x52, 0x4A, 0xBE, 0x4A, - 0x49, 0x49, 0x45, 0x45, 0x45, 0x44, 0x12, 0x34, 0x3, 0xC9, 0x5C, 0xC9, 0xC9, 0xC9, 0xC9, 0xBF, - 0xBF, 0xC9, 0xC9, 0xCD, 0xC9, 0xC9, 0xC9, 0xBF, 0x55, 0x53, 0x55, 0x53, 0x53, 0x53, 0x53, 0x53, - 0x53, 0x53, 0x53, 0x53, 0x52, 0x52, 0x4F, 0x4F, 0x46, 0x46, 0x46, 0x4F, 0x4F, 0x46, 0x50, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x5B, 0x5B, 0x58, 0x58, 0x57, 0x5B, 0x5B, 0x5A, 0x5A, 0x7, - 0x4, 0x9A, 0x28, 0xD, 0x9B, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xB6, - 0x41, 0x33, 0x2C, 0xB, 0x4, 0x4, 0x1F, 0xE6, 0xD5, 0x4, 0x4, 0x1E, 0x2F, 0x1A, 0x1C, 0x46, - 0x45, 0x45, 0x44, 0x13, 0x13, 0x13, 0x13, 0x12, 0x10, 0x10, 0x10, 0x10, 0x12, 0x12, 0x44, 0x49, - 0xBE, 0xBE, 0xC1, 0xC1, 0xC1, 0xC2, 0xBF, 0xBF, 0x3, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0x5C, 0xC9, - 0xBF, 0xC9, 0xC9, 0xCE, 0xCD, 0xC9, 0xC9, 0xC9, 0xBF, 0xC9, 0xCE, 0xCB, 0xCE, 0xCE, 0xCE, 0xCE, - 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xCE, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5B, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x9, - 0x6, 0x77, 0x67, 0xB, 0x28, 0x29, 0xEF, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0xBB, - 0xA3, 0x3A, 0x32, 0xB, 0x4, 0x0, 0x6, 0xDB, 0xB2, 0x4, 0x1E, 0x1F, 0x1C, 0x1A, 0x1A, 0x1A, - 0x1A, 0x44, 0x49, 0x4A, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, 0xBE, - 0xC1, 0xC1, 0xBE, 0xBE, 0xBE, 0xBF, 0x5C, 0xC9, 0x46, 0xAD, 0xC9, 0xC9, 0xE7, 0x9D, 0xBF, 0xBF, - 0xAD, 0xBF, 0xC9, 0xBF, 0xC9, 0xC9, 0xCD, 0xC0, 0xC9, 0x5C, 0xBF, 0xC9, 0xC9, 0xCD, 0xCD, 0xCD, - 0xCE, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCE, 0xCE, 0xCE, 0xD0, 0xCC, 0xCE, 0xCC, 0xCC, 0xCC, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0xB, - 0x4, 0x79, 0x37, 0x6, 0x9D, 0x1F, 0x6B, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, - 0x94, 0x3A, 0x33, 0xD, 0x5, 0x4, 0x1F, 0xDB, 0xB2, 0x1E, 0x1F, 0x22, 0x1A, 0x1A, 0x1A, 0x8, - 0x3, 0x3, 0x1, 0x0, 0x1, 0x1, 0x1, 0x1, 0x1, 0x8, 0x12, 0x1A, 0x1A, 0x1A, 0x2F, 0x34, - 0x36, 0x3D, 0x46, 0x3D, 0x59, 0x59, 0x5C, 0xC9, 0x5C, 0xBF, 0xBF, 0xBF, 0xAD, 0x54, 0xBF, 0x5A, - 0x5C, 0xBF, 0x5C, 0xBF, 0xBF, 0x5C, 0xC9, 0xC0, 0xC0, 0x5C, 0xBF, 0xC9, 0xCD, 0xCD, 0xCE, 0xCE, - 0xCA, 0xCA, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5B, 0x5B, 0x5D, 0x5B, 0x5D, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x5A, 0x57, 0x58, 0x5B, 0x58, 0x58, 0x5B, 0x6, - 0x4, 0x9B, 0x37, 0xB, 0x9D, 0x65, 0x37, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xD8, - 0xA5, 0x3C, 0x33, 0xC, 0x4, 0x4, 0x1F, 0xDB, 0x9D, 0x4, 0x1F, 0x28, 0x1A, 0xA, 0xA, 0xA, - 0xA, 0x1, 0x1, 0x7, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1, 0x3, 0x3, 0x8, 0x1A, 0x12, - 0x2D, 0x34, 0x34, 0x34, 0x55, 0xC0, 0x59, 0x53, 0x55, 0xC9, 0xCB, 0xCF, 0xCB, 0xCE, 0xCD, 0xCD, - 0xCB, 0xC9, 0xC9, 0xC9, 0xBF, 0xC9, 0xCD, 0xC9, 0xC9, 0x5C, 0xC9, 0xBF, 0xBF, 0xCB, 0xC9, 0xBF, - 0xBF, 0xCA, 0xCA, 0xCA, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x57, 0x5A, 0x5A, 0x57, 0x58, 0x58, 0x58, 0x5A, 0x5B, 0x6, - 0x4, 0xB5, 0x97, 0x1F, 0xB2, 0x65, 0x6E, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xD8, - 0xA5, 0x3C, 0x33, 0xC, 0x4, 0x4, 0x1E, 0xE6, 0xD5, 0x4, 0x1F, 0x1F, 0x2F, 0x1A, 0xA, 0x3, - 0x7, 0x1, 0x3, 0x3, 0x3, 0x8, 0x3, 0x3, 0x8, 0xA, 0xA, 0x8, 0x8, 0xA, 0xA, 0x1A, - 0x2F, 0x34, 0x34, 0x2F, 0x53, 0xC0, 0x5A, 0x52, 0x52, 0xAD, 0xCF, 0xCF, 0xD0, 0xD0, 0xD0, 0xF3, - 0xF3, 0xF3, 0xF3, 0xF3, 0xC4, 0xCF, 0xCF, 0xCE, 0xC0, 0xC9, 0xC9, 0xBF, 0xBF, 0xAD, 0xAD, 0xBF, - 0xBF, 0xBF, 0xBF, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCC, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x57, 0x57, 0x57, 0x58, 0x5A, 0x57, 0x58, 0x58, 0x58, 0x58, 0x5B, 0xB, - 0x4, 0xE2, 0xAF, 0x20, 0xB2, 0x29, 0xAF, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, - 0xA5, 0x3C, 0x38, 0xC, 0x4, 0x4, 0x4, 0xDB, 0x9D, 0x4, 0x6, 0x1F, 0x1A, 0x3, 0x3, 0x3, - 0x1, 0x1, 0x8, 0x3, 0xA, 0x12, 0x8, 0x3, 0x1, 0x3, 0x3, 0x12, 0xA, 0x1A, 0x2E, 0x1A, - 0x1A, 0x2F, 0x34, 0x2F, 0x4F, 0xC0, 0x5A, 0x52, 0x52, 0x52, 0xAD, 0xC9, 0xC9, 0xCD, 0xCE, 0xCE, - 0xD0, 0xCE, 0xCE, 0xCE, 0xC9, 0xBF, 0xC9, 0xCD, 0xC0, 0xCE, 0xCD, 0xC9, 0xCD, 0xCD, 0xCD, 0xCE, - 0xCE, 0xD0, 0xD0, 0xD0, 0xCE, 0xCE, 0xCD, 0xCE, 0xCE, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5D, 0x5B, 0x5B, 0x5D, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x57, 0x58, 0x58, 0x57, 0x57, 0x58, 0x58, 0x58, 0x5B, 0xB, - 0x4, 0xDB, 0x97, 0x20, 0xD5, 0x29, 0xD5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, - 0xAA, 0x3C, 0x33, 0xC, 0x5, 0x4, 0x4, 0xD7, 0xB5, 0x4, 0x6, 0x6, 0x1A, 0xA, 0x1A, 0x3, - 0x1, 0x3, 0x8, 0x1, 0x3, 0xA, 0x3, 0x3, 0x3, 0x3, 0x3, 0x1A, 0x1A, 0x1A, 0x2E, 0x1A, - 0x2F, 0x34, 0x36, 0x34, 0x46, 0x5C, 0x5C, 0x53, 0x4C, 0x52, 0x48, 0x48, 0x48, 0x52, 0xA6, 0xA6, - 0x5C, 0xBF, 0xC4, 0xCD, 0xC9, 0xBF, 0xBF, 0xC9, 0xCD, 0xCE, 0xCD, 0xC9, 0xC9, 0xCD, 0xCE, 0xCE, - 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xD0, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x57, 0x58, 0x58, 0x57, 0x57, 0x58, 0x58, 0x5B, 0x5B, 0x5, - 0x1F, 0xE2, 0x9B, 0x25, 0xB2, 0x29, 0xE6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF7, 0xF7, 0xB7, 0xBD, 0xF5, 0xF8, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, - 0xA8, 0x3C, 0x33, 0xC, 0x5, 0x4, 0x4, 0xD5, 0xD5, 0x6, 0x6, 0x6, 0x1A, 0xA, 0x12, 0x3, - 0x3, 0x8, 0x8, 0x3, 0x1, 0x1, 0x1, 0x3, 0x3, 0x3, 0x3, 0x3, 0x12, 0x1A, 0x2D, 0x34, - 0x3D, 0x36, 0x3B, 0x36, 0x36, 0x5C, 0x5C, 0x53, 0x52, 0x54, 0x54, 0xAD, 0xBF, 0xBF, 0xBF, 0xAD, - 0xC9, 0xC9, 0xC9, 0xBF, 0xBF, 0xC9, 0xBF, 0xC9, 0xCD, 0xCE, 0xCE, 0xD0, 0xD0, 0xD0, 0xCE, 0xCE, - 0xCE, 0xCE, 0xCE, 0xCE, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5A, 0x58, 0x58, 0x58, 0x58, 0x58, 0x57, 0x58, 0x58, 0x58, 0x58, 0x58, 0xB, - 0x6, 0xE1, 0x97, 0x20, 0x71, 0x1F, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xEE, 0xF0, 0xA3, 0x7, 0x38, 0xA3, 0xB4, - 0xF0, 0xF8, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xE9, - 0xA8, 0x3C, 0x33, 0xB, 0x4, 0x4, 0x4, 0xB5, 0xD5, 0x6, 0x6, 0xD, 0x1A, 0xA, 0x1A, 0x7, - 0x1, 0x1, 0x1, 0x8, 0x8, 0x3, 0x1, 0x1, 0x1, 0x3, 0x3, 0xA, 0x1A, 0x1A, 0x2F, 0x34, - 0x36, 0x36, 0x36, 0x36, 0x36, 0x5C, 0xC0, 0x55, 0x54, 0x54, 0xAD, 0xBF, 0xAD, 0xAD, 0xAD, 0xAD, - 0xC9, 0x5C, 0xC9, 0xC9, 0xC9, 0xCD, 0xD0, 0xD0, 0xD0, 0xD0, 0xCE, 0xCD, 0xC9, 0xCD, 0xCE, 0xCE, - 0xD0, 0xD0, 0xD0, 0xCE, 0xCE, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x6, - 0x6, 0xFC, 0xB5, 0x25, 0x71, 0x1F, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x94, 0x2C, 0x2C, 0x41, 0xB6, 0xF5, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xD8, 0x2C, 0x0, 0xF, 0x8, 0x2D, - 0x3B, 0xA3, 0xB6, 0xEA, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xD8, - 0xA4, 0x3A, 0x33, 0x5, 0x4, 0x4, 0x0, 0xAF, 0xB5, 0x4, 0x6, 0x6, 0x1A, 0xA, 0x3, 0x7, - 0x8, 0x3, 0x1, 0x1, 0x3, 0x8, 0x8, 0xA, 0xA, 0x3, 0xA, 0x3, 0x1A, 0x12, 0x1A, 0x1A, - 0x36, 0x36, 0x36, 0x36, 0x4C, 0xC9, 0xC0, 0x5A, 0xC9, 0xCF, 0xCD, 0xD0, 0xD0, 0xD0, 0xD0, 0xCE, - 0xCA, 0xCA, 0xD0, 0xD0, 0xD0, 0xCE, 0xD0, 0xD0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xD0, - 0xD0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x20, - 0xB, 0xD7, 0x6E, 0x20, 0x71, 0x28, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xD8, 0x2C, 0xB6, 0xA3, 0x31, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x1, 0x1, 0x1, 0x1, - 0x8, 0x12, 0x2D, 0x41, 0xB7, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xD8, - 0xA3, 0x3A, 0x33, 0x7, 0x5, 0x4, 0xFE, 0x72, 0x97, 0x2, 0x6, 0xD, 0x2F, 0x1A, 0x12, 0x2C, - 0x2D, 0xA, 0x8, 0x1, 0x1, 0x3, 0x8, 0x3, 0xA, 0x3, 0x3, 0x2E, 0x2E, 0x1A, 0x1A, 0x1C, - 0x36, 0x4C, 0x52, 0x4C, 0x4C, 0x5C, 0x5C, 0x5A, 0xAD, 0xC4, 0xAD, 0xC4, 0xAD, 0xC4, 0xC9, 0xCF, - 0xC9, 0xCA, 0xD0, 0xD0, 0xD0, 0xCE, 0xD0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, - 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x20, - 0xFE, 0x0, 0x6, 0xB, 0x39, 0x37, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0x41, 0x33, 0xAA, 0x38, 0xF9, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x1, 0x1, 0x0, 0x0, - 0x0, 0x1, 0x1, 0x8, 0x3B, 0xB7, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xEA, 0xB7, - 0x94, 0x38, 0x25, 0xD, 0x4, 0x0, 0x0, 0x5, 0x20, 0xD, 0x25, 0xD, 0x2D, 0x12, 0xA, 0x7, - 0xA, 0x8, 0x1, 0x1, 0x1, 0x3, 0x8, 0x8, 0xA, 0xA, 0x3, 0xA, 0x12, 0xA, 0x12, 0x34, - 0x36, 0x4C, 0x4C, 0x3D, 0x4C, 0x5C, 0xC0, 0x5A, 0xAD, 0x54, 0x54, 0x54, 0x54, 0xA6, 0x54, 0xAD, - 0xC9, 0x5C, 0xC9, 0xC9, 0xBF, 0xC9, 0xC9, 0xBF, 0xC9, 0xC9, 0xC9, 0xC9, 0xC9, 0xCD, 0xC9, 0xC9, - 0xC9, 0xCD, 0xD0, 0xCC, 0xCC, 0xCC, 0xCC, 0xCA, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCC, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x58, 0x5B, 0x5B, 0x25, - 0x4, 0x37, 0x39, 0x1F, 0x1F, 0xDB, 0xED, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xA3, 0x31, 0xBB, 0xFD, 0xFD, 0xBB, 0x3A, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x0, 0x8, 0x2D, 0x2C, - 0x1, 0x0, 0x0, 0x0, 0x8, 0x3B, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF4, 0xF4, 0xF7, 0xE9, 0xB0, - 0x6F, 0x30, 0xB, 0x4, 0x4, 0x4, 0x4, 0xFE, 0x0, 0xD, 0x25, 0xD, 0x1A, 0xA, 0xA, 0x9, - 0x1, 0x1, 0x1, 0x0, 0x0, 0x1, 0x1, 0x3, 0xA, 0x1A, 0x12, 0x12, 0x12, 0x1A, 0x1C, 0x36, - 0x4C, 0x4C, 0x4C, 0x4C, 0x4C, 0x55, 0x5C, 0x5C, 0xC4, 0x55, 0x54, 0x54, 0x54, 0xAD, 0xC4, 0xBF, - 0xC9, 0x5C, 0xCD, 0xCD, 0xCD, 0xCD, 0xC9, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCD, 0xCE, 0xCE, 0xCE, - 0xD0, 0xD0, 0xD0, 0xCE, 0xD0, 0xD0, 0xCC, 0xCA, 0xCC, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, 0xCA, - 0xCA, 0xCA, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5D, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, - 0x5B, 0x5B, 0x5B, 0x5B, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x5B, 0x5B, 0x5B, 0x5B, 0x5B, 0x20, - 0x1F, 0xD7, 0x97, 0xB, 0xD, 0xE0, 0xE0, 0xED, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x41, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x1, 0x41, 0xEC, 0xF0, - 0xB7, 0x41, 0x2C, 0x1, 0x0, 0x12, 0xAA, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xF5, 0xF5, 0xE2, 0x22, 0x4, 0x4, 0x4, 0x1E, - 0x4, 0x0, 0x0, 0x0, 0x0, 0xFE, 0xFE, 0x4, 0xFE, 0x0, 0x4, 0x0, 0x0, 0x4, 0x0, 0x0, - 0xFE, 0x4, 0x0, 0x0, 0x0, 0x0, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, - 0x4, 0x4, 0x4, 0x4, 0x4, 0x0, 0x4, 0x4, 0x4, 0x4, 0x4, 0x5, 0x4, 0xFE, 0x5, 0x5, - 0x4, 0x0, 0x0, 0xFE, 0x0, 0x4, 0x0, 0xFE, 0x4, 0xFE, 0x0, 0x0, 0x4, 0x5, 0x5, 0x5, - 0x0, 0x4, 0x5, 0x5, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x4, 0x1E, 0x1E, - 0x4, 0x0, 0x4, 0x0, 0x0, 0x4, 0x4, 0x0, 0x6, 0xFE, 0x6, 0x4, 0xFE, 0x0, 0x0, 0x0, - 0xFE, 0x39, 0x25, 0xFE, 0x0, 0xB, 0x0, 0x4, 0x4, 0xB, 0x25, 0xBC, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x3A, 0x94, 0x2C, 0x2C, 0x41, 0xBB, 0xF7, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x3, 0xA3, 0xE9, 0xD8, - 0xE9, 0xF0, 0xE9, 0xB4, 0x8, 0x3, 0x94, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xBD, 0xB5, 0x64, 0x77, 0x79, 0x70, 0x67, - 0x3E, 0x6C, 0x3E, 0x38, 0x3E, 0x20, 0x20, 0xB3, 0xF6, 0xAE, 0x3E, 0x6E, 0x6C, 0x6F, 0x25, 0x4, - 0x37, 0x97, 0xA7, 0xA7, 0xA9, 0x97, 0x97, 0x71, 0x39, 0x39, 0x37, 0x37, 0x39, 0x39, 0x39, 0x37, - 0x39, 0x37, 0x39, 0x23, 0x1, 0x23, 0xA8, 0xA8, 0x6E, 0x72, 0x72, 0x72, 0xB2, 0xB3, 0xAF, 0x9B, - 0x96, 0x96, 0x96, 0x97, 0x71, 0x6B, 0x6B, 0x71, 0x39, 0x37, 0x39, 0x29, 0x4, 0x4, 0x39, 0x71, - 0x37, 0x6B, 0xD5, 0xE1, 0xD5, 0xD5, 0xE6, 0xE6, 0xF4, 0xF4, 0xE2, 0xB5, 0xAF, 0x3E, 0x25, 0x25, - 0x0, 0xFE, 0x25, 0x6E, 0x37, 0x39, 0x71, 0x97, 0x96, 0x96, 0x96, 0x96, 0x96, 0x96, 0x65, 0x39, - 0x39, 0x32, 0x25, 0x2, 0xFE, 0x4, 0x39, 0x1F, 0x6, 0xD, 0xD, 0x6, 0xB, 0x6, 0x4, 0x4, - 0x1E, 0xD5, 0x39, 0x0, 0xFE, 0x6F, 0x20, 0x4, 0x1F, 0x4, 0x0, 0x38, 0xF7, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xF9, 0xFD, 0xFD, 0xA3, 0x94, 0x41, 0x2C, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x3, 0xA3, 0xEA, 0xBD, - 0xB6, 0xB6, 0xBD, 0xF7, 0x33, 0x3, 0x94, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xB6, 0xA4, 0x72, 0x64, 0x64, 0x21, 0x21, 0x22, - 0x20, 0x20, 0x20, 0x23, 0x30, 0x4, 0xFE, 0x30, 0xAE, 0x25, 0x6, 0x25, 0x20, 0x37, 0x25, 0xB, - 0x25, 0x32, 0x25, 0x25, 0x25, 0x6, 0x6, 0x1F, 0xD, 0xB, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, - 0x1E, 0x6, 0x20, 0x20, 0xB, 0x30, 0x30, 0xB, 0x16, 0x6, 0x6, 0x1F, 0x20, 0x25, 0x25, 0x1F, - 0x1F, 0x1F, 0x1F, 0x20, 0x25, 0x20, 0x25, 0x29, 0x25, 0x20, 0x25, 0x29, 0x1F, 0x1F, 0x37, 0x37, - 0x1F, 0x20, 0x39, 0x6B, 0x39, 0x37, 0x6B, 0x71, 0x6B, 0x6E, 0x6B, 0x97, 0xD5, 0xB5, 0xB5, 0xF4, - 0x30, 0x6, 0xA7, 0xF4, 0xD5, 0xE1, 0xE6, 0xE8, 0xE8, 0xE8, 0xE6, 0xE6, 0xE6, 0xE6, 0xE1, 0xE6, - 0xE1, 0xD5, 0xE2, 0xA5, 0x6, 0x20, 0xE6, 0xB2, 0x6E, 0xA7, 0x97, 0x3E, 0x39, 0x25, 0x1F, 0x25, - 0x37, 0xFC, 0xE0, 0x0, 0xB, 0xFC, 0xF4, 0xB2, 0x6E, 0x25, 0x4, 0x32, 0xEF, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xF5, 0xFD, 0xFD, 0xFD, 0x2C, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x41, 0x2C, 0x2C, 0x41, 0xFD, 0xF7, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x3, 0xA4, 0xF0, 0xF7, - 0xEA, 0xB7, 0xB4, 0xF0, 0x31, 0x3, 0x41, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBD, 0xA4, 0x41, 0x6C, 0x66, 0x21, 0x1F, 0x20, 0x1E, - 0x5, 0x4, 0x4, 0x0, 0x0, 0x0, 0x0, 0x4, 0x6, 0x4, 0x4, 0x4, 0x0, 0x4, 0x4, 0x5, - 0x6, 0x6, 0x4, 0x4, 0x6, 0x4, 0x4, 0x1E, 0x4, 0x6, 0x6, 0x6, 0x6, 0x6, 0x6, 0x1F, - 0x1E, 0x1F, 0x6, 0x6, 0x20, 0x6, 0x6, 0x1F, 0x6, 0x6, 0x6, 0x1F, 0x1F, 0x4, 0x1F, 0x1F, - 0x1F, 0x1F, 0xB, 0xB, 0x20, 0x20, 0x20, 0xB, 0x20, 0xB, 0x20, 0x20, 0x1F, 0x4, 0x20, 0x1F, - 0x4, 0x4, 0x6, 0x1F, 0x1E, 0x4, 0x4, 0x20, 0x0, 0x4, 0x4, 0x0, 0x4, 0x30, 0x30, 0x25, - 0x37, 0x4, 0x37, 0x6C, 0x20, 0x29, 0x25, 0x25, 0x29, 0x29, 0x22, 0x22, 0x22, 0x29, 0x22, 0x67, - 0x1F, 0x20, 0x37, 0x25, 0xB, 0x1F, 0x39, 0x29, 0x37, 0x25, 0x32, 0x25, 0xB, 0x6, 0x0, 0x4, - 0x20, 0xF4, 0xAF, 0x4, 0x4, 0x6E, 0x20, 0x37, 0x25, 0xB, 0x6, 0x2C, 0xEF, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xAA, 0x33, 0xE9, 0xFD, 0xBD, 0x2C, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0xFD, 0x2C, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x3, 0xA4, 0xF5, 0xFD, - 0xFD, 0xF0, 0xB6, 0xF0, 0x33, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBD, 0xAA, 0x48, 0x40, 0x29, 0x22, 0x37, 0x37, 0x25, - 0x20, 0xD, 0xE, 0x7, 0x0, 0x0, 0x0, 0x20, 0x1F, 0x4, 0x4, 0x6, 0x4, 0x6, 0xB, 0xB, - 0x1F, 0x1F, 0x6, 0x4, 0x6, 0x20, 0x20, 0x1F, 0x4, 0x1F, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, - 0x29, 0x20, 0x6, 0x1F, 0x20, 0x20, 0x20, 0x6, 0x1F, 0x25, 0x25, 0x25, 0x25, 0x1F, 0x20, 0x25, - 0x25, 0x20, 0x25, 0x20, 0x20, 0x25, 0xD, 0x20, 0x20, 0x6, 0xB, 0x1F, 0x25, 0x25, 0x25, 0x1F, - 0x20, 0x1F, 0x4, 0x1F, 0x37, 0x25, 0x20, 0x4, 0x20, 0x20, 0x5, 0x20, 0x23, 0xB, 0x5, 0xB, - 0x5, 0x4, 0x4, 0xB, 0x4, 0xB, 0x1F, 0x1F, 0x4, 0xB, 0xB, 0xD, 0x1F, 0x20, 0x4, 0x6, - 0x20, 0x1F, 0x30, 0x20, 0xB, 0x20, 0x20, 0x20, 0xD, 0xB, 0xB, 0xD, 0x4, 0x4, 0x4, 0x1F, - 0x4, 0xD5, 0x9B, 0x4, 0x20, 0x1F, 0xB, 0x3E, 0xB6, 0xD8, 0xB0, 0x40, 0xEF, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x31, 0xE, 0x2C, 0xD8, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x3, 0xA4, 0xF5, 0xFD, - 0xF9, 0xF5, 0xBD, 0xF0, 0x31, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBD, 0xAA, 0xA4, 0x41, 0x3E, 0x6B, 0x40, 0x3A, 0x39, - 0x37, 0x32, 0x2C, 0xE, 0x9, 0xFE, 0xFE, 0x37, 0x3E, 0x6, 0x6, 0x1F, 0x6, 0x6, 0xD, 0x20, - 0x20, 0x20, 0x20, 0x20, 0x25, 0x30, 0x25, 0x20, 0x29, 0x37, 0x37, 0x30, 0x30, 0x25, 0x25, 0x25, - 0x37, 0x37, 0x30, 0x39, 0x6E, 0x37, 0x30, 0x37, 0x20, 0x29, 0x29, 0x29, 0x28, 0x28, 0x6B, 0x37, - 0x25, 0x1F, 0x25, 0x29, 0x29, 0x37, 0x37, 0x6E, 0x40, 0x97, 0xA9, 0x3E, 0x37, 0x25, 0x25, 0x39, - 0x37, 0x6B, 0x6E, 0x39, 0x39, 0x37, 0x6B, 0x25, 0x25, 0x20, 0x5, 0x4, 0x5, 0x4, 0x5, 0x25, - 0x3E, 0xAF, 0x37, 0x30, 0x20, 0xB, 0x37, 0x39, 0x20, 0x25, 0x25, 0x20, 0x25, 0x39, 0x29, 0x37, - 0x25, 0x25, 0x37, 0x25, 0x20, 0x33, 0xE, 0xE, 0x32, 0x6E, 0x30, 0x3A, 0x38, 0xB, 0xB, 0x1F, - 0x4, 0xE8, 0xD5, 0x4, 0x65, 0x6E, 0xB4, 0xB7, 0xE9, 0xFD, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xB7, 0x41, 0x2C, 0x2C, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x3, 0xA4, 0xF0, 0xF7, - 0xB7, 0xEA, 0xEA, 0xF5, 0x33, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xD8, 0xB7, 0xB4, 0xB4, 0xAA, 0xAA, 0xA8, 0xA3, - 0x3C, 0x33, 0x2D, 0x2D, 0xE, 0x0, 0x0, 0x3E, 0x6E, 0xB, 0xD, 0x20, 0x20, 0x20, 0x20, 0x25, - 0x20, 0x25, 0x20, 0x25, 0x39, 0x20, 0x4, 0x6E, 0x39, 0x37, 0x6E, 0x37, 0x20, 0x39, 0x37, 0x6B, - 0x37, 0x72, 0x6F, 0xBA, 0xD8, 0xA7, 0x6E, 0x37, 0x37, 0x37, 0x25, 0x6C, 0x71, 0x71, 0x3E, 0x37, - 0x37, 0x39, 0x3E, 0x6E, 0x32, 0x39, 0xA9, 0x37, 0x0, 0x0, 0xB0, 0xD8, 0xA7, 0x32, 0x39, 0x6E, - 0x39, 0x37, 0x6F, 0x6E, 0xA7, 0x37, 0x6E, 0x6F, 0xD, 0x6F, 0x30, 0xE2, 0xB0, 0xFB, 0xB0, 0x20, - 0x6, 0x25, 0x37, 0x25, 0x32, 0x37, 0x37, 0x40, 0x37, 0x6E, 0x6E, 0x6F, 0x6E, 0xAF, 0xA9, 0xB5, - 0x97, 0xA9, 0xB0, 0xE2, 0xBC, 0xBC, 0xBA, 0xAF, 0x97, 0xA9, 0xD7, 0x6E, 0xB, 0x20, 0x20, 0x20, - 0x2, 0xE1, 0x9B, 0x1F, 0xB5, 0xBD, 0xD8, 0xE9, 0xF0, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x3A, 0xAA, 0xF5, 0xE9, 0xB6, 0xA3, 0x38, 0x2C, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x8, 0xA4, 0xF0, 0xF5, - 0x31, 0xAA, 0xF0, 0xF5, 0x33, 0x1, 0x41, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xF0, 0xEE, 0xE9, 0xE9, 0xE9, 0xE9, 0xBD, 0xB6, - 0xA3, 0x3C, 0x33, 0x31, 0xE, 0x0, 0xFE, 0x3E, 0x6E, 0x4, 0x5, 0x20, 0x20, 0x20, 0x20, 0x29, - 0x29, 0x37, 0x39, 0x37, 0xD, 0xD, 0xD, 0xB, 0x4, 0x20, 0xAE, 0x97, 0xA7, 0x3E, 0x6E, 0xBA, - 0xBA, 0xB5, 0x20, 0x0, 0x0, 0x0, 0x30, 0xA7, 0x3E, 0x6E, 0x6F, 0x97, 0x6F, 0xAF, 0xAF, 0xB0, - 0x6E, 0x6E, 0xAF, 0xA9, 0x6E, 0x97, 0x39, 0x6, 0x33, 0x30, 0x5, 0xFE, 0xF6, 0xD8, 0xAF, 0x6E, - 0xB0, 0xA7, 0xB5, 0xB0, 0xBC, 0xA7, 0xAF, 0xA9, 0x6F, 0xF6, 0xBC, 0xFB, 0x0, 0xB, 0xFD, 0xEF, - 0x6F, 0x37, 0xBA, 0x39, 0xF4, 0xBA, 0xE2, 0xBC, 0xA7, 0xAF, 0xD7, 0xD7, 0xE2, 0xA9, 0x6, 0xE2, - 0xB5, 0xFC, 0xFC, 0xFE, 0x0, 0xFE, 0x40, 0xFC, 0xFC, 0xF6, 0xEF, 0x3E, 0x4, 0xB, 0x20, 0x30, - 0x1F, 0xE6, 0x9B, 0x20, 0xEF, 0xF5, 0xF1, 0xF0, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0x94, 0xE, 0x2C, 0xAA, 0xBD, 0xF0, 0xF9, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xA3, 0xBD, 0xF8, 0xF9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xD8, 0xE, 0x1, 0x94, 0xE9, 0xEA, - 0x2C, 0xA3, 0xEA, 0xF5, 0x31, 0x1, 0x41, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xF7, 0xF7, 0xF5, 0xF0, 0xE9, - 0xB4, 0x94, 0x38, 0x31, 0x2C, 0x0, 0x0, 0x3E, 0x6F, 0x6, 0x4, 0x4, 0x5, 0xB, 0xB, 0x4, - 0x1F, 0x6, 0x1F, 0xD, 0x20, 0x33, 0x3C, 0x32, 0x32, 0xD, 0x25, 0xA9, 0x6F, 0xA7, 0x25, 0xB, - 0x20, 0x30, 0x33, 0x3F, 0x3C, 0x33, 0x30, 0xB, 0x30, 0x32, 0x6E, 0x40, 0xD, 0x4, 0x4, 0x37, - 0xA7, 0x30, 0x30, 0x32, 0x40, 0xA7, 0x38, 0x2C, 0x3A, 0x33, 0x3A, 0x30, 0x7, 0x40, 0xB0, 0xBC, - 0xBB, 0xBA, 0xD8, 0xBC, 0xBB, 0xB6, 0xD8, 0xE9, 0xE9, 0xBC, 0xBD, 0x0, 0x32, 0x32, 0xFE, 0x32, - 0xFC, 0xEF, 0xE2, 0xED, 0xEF, 0xFE, 0x40, 0xE2, 0xB5, 0xD8, 0xB5, 0x6F, 0x7, 0xB, 0x32, 0xE, - 0x0, 0xAA, 0x2C, 0x94, 0x94, 0x3B, 0x3C, 0x7, 0x0, 0x0, 0xD, 0x30, 0x33, 0x37, 0x30, 0x25, - 0x4, 0xE6, 0x79, 0x20, 0xFD, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0x41, 0x33, 0xD8, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xB6, 0x3F, 0xE, 0x2C, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBB, 0xE9, 0x31, 0x1, 0x2D, 0x3A, 0x34, - 0x2C, 0xA4, 0xEA, 0xF5, 0x33, 0x1, 0x41, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, - 0xBD, 0xA3, 0x38, 0x33, 0x31, 0x4, 0xFE, 0x3E, 0x6B, 0x30, 0x6E, 0x3E, 0x38, 0x38, 0x30, 0xB, - 0x6, 0xD, 0xD, 0x32, 0xA3, 0xA3, 0x3C, 0x3D, 0x6F, 0x33, 0x30, 0xE, 0x33, 0x38, 0xAA, 0xBD, - 0xBA, 0xB6, 0xA3, 0x41, 0x41, 0x3F, 0x41, 0x41, 0x2C, 0xE, 0xE, 0xE, 0x32, 0xA3, 0x33, 0xE, - 0x5, 0x5, 0xE, 0x33, 0x40, 0x40, 0x41, 0xA3, 0x94, 0x41, 0x41, 0x38, 0x33, 0x2C, 0x31, 0xE, - 0xE, 0x9, 0x7, 0x7, 0x7, 0x7, 0x7, 0x9, 0xE, 0xE, 0xE, 0x38, 0x3A, 0x38, 0x40, 0xD, - 0x0, 0x0, 0x7, 0x0, 0xB, 0x33, 0x7, 0x2C, 0xD, 0x16, 0x16, 0x32, 0x6F, 0xB4, 0xA3, 0xB6, - 0xB4, 0x3A, 0xB7, 0xA4, 0xA4, 0xA4, 0xA4, 0xB4, 0xB7, 0xB4, 0xA3, 0x3B, 0x33, 0x33, 0x37, 0x30, - 0x1F, 0xE6, 0x9B, 0x25, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0x3F, 0x33, 0xE9, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xB8, 0xEE, 0x41, 0x0, 0x1, 0x1, 0x1, - 0x2C, 0xA8, 0xEA, 0xF5, 0x33, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, - 0xD8, 0xA8, 0x3A, 0x33, 0x33, 0x4, 0xFE, 0x39, 0x6E, 0x37, 0xA7, 0x41, 0x3C, 0x3F, 0x6F, 0xA7, - 0xB0, 0xD7, 0xD8, 0xD8, 0xD8, 0xB6, 0xB4, 0xB4, 0xA8, 0xB7, 0xBB, 0xE9, 0xD8, 0xE9, 0xD8, 0xD8, - 0xD8, 0xE9, 0xBD, 0xB7, 0xB4, 0xAA, 0xA3, 0xA3, 0xAA, 0xAA, 0xAA, 0xAA, 0xA3, 0xA8, 0xA3, 0xAA, - 0xB6, 0xBD, 0xBD, 0xD8, 0xE9, 0xE9, 0xE9, 0xE9, 0xB6, 0xB6, 0xA8, 0xA8, 0xAA, 0xA3, 0xAA, 0xAA, - 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xB4, 0xAA, 0xB4, 0xB4, 0xAA, 0xB4, 0xA3, 0xA3, 0x3C, 0x41, 0xA3, - 0x41, 0xA3, 0x6F, 0xA9, 0xAA, 0xA7, 0xA9, 0xB6, 0xBC, 0xD8, 0xD8, 0xBD, 0xB6, 0xB6, 0xB7, 0xEA, - 0xEB, 0xEF, 0xEB, 0xD8, 0xEA, 0xB7, 0xBD, 0xBD, 0xB9, 0xB7, 0xB4, 0xA3, 0x38, 0x38, 0x3C, 0x37, - 0x1E, 0xE6, 0x9B, 0x29, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0x3A, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x2C, 0xE, 0x33, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB6, 0xE9, 0xD8, 0x8, 0x0, 0x0, 0x0, - 0x12, 0xA4, 0xEA, 0xF5, 0x33, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, - 0xD8, 0xAA, 0x3B, 0x38, 0x38, 0x4, 0x0, 0x6E, 0x71, 0x6E, 0xBC, 0xB6, 0xB4, 0xB4, 0xB4, 0xBA, - 0xBD, 0xEB, 0xF0, 0xF0, 0xEB, 0xE9, 0xEA, 0xE9, 0xE9, 0xD8, 0xE9, 0xF0, 0xEA, 0xF0, 0xFD, 0xF0, - 0xFD, 0xF0, 0xF1, 0xF1, 0xE9, 0xE9, 0xE9, 0xBD, 0xD8, 0xD8, 0xBD, 0xBD, 0xB7, 0xB7, 0xBD, 0xBD, - 0xBD, 0xE9, 0xEE, 0xEE, 0xF0, 0xF5, 0xF5, 0xF5, 0xE9, 0xE9, 0xE9, 0xBD, 0xBD, 0xD8, 0xB6, 0xB7, - 0xB6, 0xB8, 0xB6, 0xB8, 0xB6, 0xB8, 0xB8, 0xBD, 0xBD, 0xBD, 0xB8, 0xB8, 0xB6, 0xB8, 0xAA, 0xAA, - 0xB4, 0xAA, 0xB6, 0xAA, 0xB8, 0xBB, 0xBB, 0xBD, 0xE9, 0xE9, 0xEE, 0xEE, 0xE9, 0xEA, 0xF0, 0xF0, - 0xEF, 0xFD, 0xF2, 0xF0, 0xF0, 0xF2, 0xEF, 0xF2, 0xF5, 0xEA, 0xBD, 0xB6, 0x94, 0x3F, 0x40, 0x3A, - 0x20, 0x9B, 0x29, 0x37, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xE9, 0xFD, 0xF0, 0x3A, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBD, 0xB6, 0xF0, 0xB7, 0xE, 0x1, 0x0, - 0x8, 0x94, 0xEA, 0xF5, 0x31, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xE9, 0xAA, 0x3B, 0x38, 0x3A, 0x4, 0x4, 0x9B, 0x39, 0xAF, 0xF7, 0xEA, 0xE9, 0xE9, 0xE9, 0xEF, - 0xF7, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xF7, 0xF5, 0xF0, 0xFD, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF7, 0xF7, 0xF0, 0xF0, 0xF5, 0xF0, 0xF0, 0xF0, 0xF5, 0xF0, 0xF0, 0xF0, 0xF0, - 0xF5, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xF9, 0xEF, 0xF0, 0xF0, 0xF5, 0xF5, 0xF0, - 0xF0, 0xEE, 0xE9, 0xEE, 0xF0, 0xF0, 0xEE, 0xF0, 0xF0, 0xF5, 0xEE, 0xF7, 0xE9, 0xE9, 0xF0, 0xBD, - 0xE9, 0xEA, 0xE9, 0xEE, 0xEE, 0xF0, 0xF7, 0xF5, 0xF5, 0xFD, 0xFD, 0xF7, 0xFD, 0xF5, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xBD, 0xA8, 0x94, 0x94, 0x3F, - 0x30, 0x3E, 0xB5, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xB6, 0xFD, 0xFD, 0xF9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xEA, 0xBD, 0xE9, 0xF5, 0xE9, 0xA3, 0x3A, - 0x8, 0x3A, 0xE9, 0xF5, 0x31, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, - 0xEA, 0xB4, 0x3F, 0x3A, 0x3C, 0x4, 0x0, 0x6E, 0x29, 0xAF, 0xFD, 0xF7, 0xF8, 0xF7, 0xFD, 0xF7, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xFD, 0xF7, 0xF5, 0xFD, - 0xF5, 0xF5, 0xF5, 0xFD, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xEA, 0xBD, 0xB4, 0xB4, 0xB7, - 0xF1, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x31, 0xE9, 0xF7, 0xB6, 0xB4, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF0, 0xEA, 0xD8, 0xF5, 0xF7, 0xF5, 0xF0, - 0xB6, 0xB4, 0xE9, 0xF5, 0x33, 0x1, 0x3B, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF9, 0xFB, 0xF4, 0xF4, 0xFB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xE9, 0xB6, 0x3F, 0x3A, 0x41, 0x5, 0x0, 0x3E, 0x20, 0xA9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xEA, 0xE9, 0xE9, 0xE9, - 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x41, 0x2C, 0xE, 0xA3, 0xD8, 0xF7, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xD8, 0xBD, 0x38, 0xAA, 0xE9, 0xF0, 0xF7, - 0xF8, 0xF0, 0xBD, 0xF0, 0xB4, 0x2C, 0x33, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF8, 0xED, 0xD3, 0x8F, 0x92, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xE9, 0xAA, 0x3C, 0x3F, 0x6F, 0xB, 0xFE, 0x4, 0x4, 0xB5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xF0, 0xF5, 0xF5, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0x94, 0xE, 0xE, 0x31, 0xAA, 0xF9, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x41, 0x2C, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFC, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBB, 0xBD, 0xE, 0x12, 0x3B, 0x41, 0xA3, - 0xBD, 0xF0, 0xF0, 0xF5, 0xF8, 0xF0, 0xE9, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF7, 0xE0, 0xD3, 0x84, 0x88, 0x88, 0x93, 0xFB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xEA, 0xB4, 0x41, 0x3A, 0x23, 0x4, 0xB, 0x30, 0xFE, 0xB5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x41, 0xB6, 0xF9, 0xFD, 0xF8, 0xBD, 0x33, 0xF8, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x31, 0xA3, 0xBD, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xFB, 0xF4, 0xF4, 0xDF, 0xDD, 0xDD, 0xDD, 0xF4, 0xFB, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x0, 0x3, 0x8, 0x2C, - 0x3B, 0x94, 0xAA, 0xBD, 0xF0, 0xF5, 0xF5, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xED, - 0xD3, 0x8A, 0x86, 0x87, 0x89, 0x91, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, - 0xE9, 0xB4, 0x6F, 0x3E, 0xC, 0xFE, 0x4, 0xB, 0xFE, 0x3E, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB7, 0x94, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xB6, 0x41, 0x2C, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF7, 0xDC, 0x91, 0x8F, 0x8F, 0x89, 0x88, 0x88, 0x88, 0x8F, 0x93, 0xDF, 0xFB, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x0, 0x0, 0x1, 0x1, - 0xF, 0x12, 0x2D, 0x38, 0xA4, 0xB7, 0xEA, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xEE, 0xD4, 0x8A, - 0x86, 0x87, 0x87, 0x89, 0xD4, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, - 0xE9, 0xB4, 0x41, 0x3F, 0x30, 0x0, 0xFE, 0xFE, 0x0, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0x3F, 0xFD, 0xFD, 0xF9, 0xE, - 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x41, 0x2C, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF9, 0xEE, 0xB1, 0x83, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x89, 0x92, - 0xDF, 0xFB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xE9, 0x33, 0x0, 0x0, 0x0, 0x0, - 0x1, 0x1, 0x1, 0x1, 0x12, 0x3A, 0xB4, 0xF7, 0xFD, 0xFD, 0xF9, 0xF5, 0xD9, 0x8D, 0x89, 0x85, - 0x87, 0x87, 0x87, 0x90, 0xF4, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xE9, 0xB6, 0x94, 0xA3, 0x94, 0x3A, 0x3A, 0x94, 0xA3, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x38, 0xE9, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xE, - 0xFD, 0xFD, 0xFD, 0xFD, 0x3A, 0xAA, 0xF5, 0xE9, 0xB6, 0xA3, 0x38, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF9, 0xEE, 0xA8, 0x69, 0x7E, 0x85, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x88, 0x89, 0x93, 0xDF, 0xFB, 0xFC, 0xFD, 0xFD, 0xE9, 0xB6, 0xEA, 0xF0, 0xB7, 0x41, 0x2C, 0x7, - 0x0, 0x0, 0x0, 0x0, 0x1, 0x8, 0x94, 0xF5, 0xF9, 0xF4, 0xD9, 0x8D, 0x86, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x88, 0x93, 0xFB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF0, 0xD8, 0xAA, 0xAA, 0xB4, 0xBD, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0x2C, 0xA3, 0xE, 0xFD, 0xFD, 0xBD, 0x38, - 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0x94, 0xE, 0x2C, 0xAA, 0xBD, 0xF0, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF9, 0xED, 0xB3, 0x72, 0x66, 0x7E, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x89, 0x92, 0xDD, 0xF4, 0xFB, 0xF0, 0xB7, 0xB6, 0xBD, 0xEA, 0xF0, 0xE9, 0xB4, - 0x3B, 0x2C, 0x7, 0x0, 0x0, 0x8, 0x41, 0xF0, 0xD9, 0x8D, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x89, 0xDA, 0xF4, 0xF4, 0xFC, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB6, 0x3F, 0xFD, 0xFD, 0x2C, 0xEE, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0x41, 0x33, 0xD8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF7, 0xE0, 0x90, 0x84, 0x84, 0x82, 0x7E, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x89, 0x8F, 0xDD, 0xDF, 0xED, 0xD8, 0xB7, 0xB6, 0xB6, 0xBD, 0xE9, - 0xEA, 0xD8, 0xB6, 0x3A, 0x1, 0x3, 0x41, 0xED, 0x8F, 0x88, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x89, 0x8F, 0x8F, 0x92, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0x3F, 0x33, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF9, 0xEA, 0xAE, 0x83, 0x87, 0x87, 0x85, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x89, 0x92, 0xDF, 0xF4, 0xEB, 0xBD, 0xB7, 0xE9, - 0xE9, 0xEA, 0xE9, 0xEE, 0x2C, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x92, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEE, 0x3A, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF8, 0xD8, 0x6D, 0x7E, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x8F, 0xDD, 0xD6, 0xEE, 0xB6, - 0xBB, 0xEE, 0xD8, 0xE0, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x89, 0xDD, 0xDF, 0xF4, 0xFB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x41, 0xE, 0x2C, 0x41, 0xB6, 0xF5, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF7, 0xBA, 0x74, 0x7F, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x86, 0x75, 0xD6, 0x38, - 0x2C, 0xB4, 0xE0, 0xDC, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x89, 0x89, 0x8F, 0x93, 0xF4, 0xFB, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF8, 0xBD, 0xA3, 0xE, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF0, 0xAE, 0x63, 0x85, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x85, 0x5F, 0xD1, 0x37, - 0x3, 0x3F, 0xD8, 0xDF, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x8F, 0x93, 0xFB, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xE, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xD6, 0x76, 0x80, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x85, 0x5F, 0xD1, 0x37, - 0x1, 0x3A, 0xD8, 0xDF, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x92, 0xFB, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF9, 0xFD, 0xFD, 0xE, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xD8, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xAE, 0x63, 0x80, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x85, 0x5F, 0xD1, 0x37, - 0x1, 0x3A, 0xD8, 0xDF, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0xD3, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x41, 0xBD, 0xFD, 0xF0, 0xE, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x31, 0xEA, 0xFD, 0x3C, 0xE, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, - 0xBB, 0xA7, 0x6A, 0x62, 0x7F, 0x85, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x85, 0x5F, 0xD1, 0x37, - 0x1, 0x3B, 0xD8, 0xDC, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x89, 0xDD, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0x41, 0xE, 0x2C, 0xB6, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xBD, 0x38, 0xF7, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF7, 0xE9, 0xB7, 0xA7, 0x6A, 0x62, 0x80, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x85, 0x5F, 0xD1, 0x37, - 0x1, 0x3B, 0xBB, 0xDC, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x89, 0xDD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xF0, 0x33, 0xEA, 0xF0, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF9, 0xF7, 0xE9, 0xB6, 0x72, 0x6A, 0x62, 0x7F, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x85, 0x5F, 0xD1, 0x37, - 0x1, 0x2D, 0x3F, 0x38, 0x1, 0x8, 0x41, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x85, 0x84, 0x91, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x31, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xEA, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBD, 0xE, 0xA3, 0xFD, 0x2C, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF9, 0xF7, 0xEA, 0xB8, 0xA7, 0x6A, 0x62, 0x7F, 0x85, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x85, 0x5F, 0xD1, 0x7A, - 0x0, 0x1, 0x3, 0x1, 0x1, 0x8, 0x41, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x86, 0x84, 0x8E, 0xDC, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x31, 0xFD, 0xFD, 0xFD, 0x41, 0xFD, 0xFD, 0x2C, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF7, 0xEA, 0xB8, 0xA7, 0x6A, 0x61, 0x80, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x85, 0x5F, 0x8B, 0xD2, - 0x5, 0x0, 0x0, 0x0, 0x0, 0x8, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x89, 0x8A, 0xD3, 0xE0, 0xF7, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xAA, 0xFD, 0xBB, 0xE, 0xF0, 0xE9, 0xE, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x41, 0xB6, 0xF0, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF5, 0xE9, 0xB6, 0x6F, 0x5E, 0x80, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x89, 0x8F, 0x89, 0x5F, 0x60, 0xD9, - 0x3E, 0x0, 0x0, 0x0, 0x1, 0x3, 0x3E, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x86, 0x8A, 0xD4, 0xED, 0xF7, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB4, 0xE, 0x31, 0xB6, 0xE, 0xE, 0xB6, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xB7, 0xB4, 0x38, 0x2C, 0x41, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xEB, 0xB0, 0x69, 0x7F, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x85, 0x83, 0xD4, 0xDA, 0xDF, 0xD3, 0x61, 0x75, - 0xDC, 0x37, 0x4, 0xFE, 0x0, 0x0, 0x3E, 0xDF, 0x88, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x86, 0x8E, 0xED, 0xF7, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBD, 0xA3, 0xFD, 0xFD, 0xF9, 0xBD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF4, 0xD9, 0x8D, 0x83, 0x85, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x7D, 0x63, 0xB3, 0x23, 0x72, 0xE0, 0xD4, 0x60, - 0x76, 0xDA, 0xD2, 0x70, 0x30, 0x38, 0xD6, 0x92, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x89, 0xDD, 0xF4, 0xFB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xB4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x31, 0xBD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF4, 0xD4, 0x90, 0x89, 0x88, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x7D, 0x63, 0xB3, 0xC, 0x2D, 0xB0, 0xD4, 0x75, - 0x75, 0x76, 0x8C, 0xD3, 0xD6, 0xD9, 0x8D, 0x86, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x88, 0x8F, 0xDD, 0xDF, 0xFB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xB4, 0x41, 0xFD, 0xFD, 0xAA, 0x38, 0xEE, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x41, 0x2C, 0x2C, 0x41, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xF9, 0xEE, 0xD4, 0x90, 0x89, 0x88, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x7D, 0x63, 0xB3, 0xC, 0x8, 0xA8, 0xDA, 0xD9, - 0xD2, 0xD9, 0xD1, 0xD1, 0xDC, 0xDC, 0xDD, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x8F, 0x93, 0xDF, 0xFB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xE9, 0xA3, 0xFD, 0xFD, 0xD8, 0x2C, - 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xF7, 0xBB, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF9, 0xEE, 0xD3, 0x8A, 0x86, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x7D, 0x63, 0xB3, 0xC, 0x8, 0xA3, 0xED, 0xED, - 0x23, 0xA7, 0xE0, 0xF0, 0x38, 0x72, 0xDC, 0xDD, 0x88, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x89, 0x92, 0xDF, 0xFB, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xFD, 0xFD, 0xB6, 0xA8, 0xFD, 0xEE, 0xE, - 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xD8, 0xA3, 0xE, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF8, 0xE9, 0x8C, 0x86, 0x87, 0x85, 0x85, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x7D, 0x63, 0xB3, 0xB, 0x8, 0x94, 0xE0, 0xED, - 0x4, 0x2D, 0xAA, 0xF0, 0x23, 0xE, 0xA8, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x8F, 0xDF, 0xFB, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xE, 0x2C, 0xBD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0xB4, 0xF7, 0xD8, 0x33, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF7, 0xD8, 0x7A, 0x75, 0x63, 0x61, 0x62, 0x85, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x7D, 0x63, 0xB3, 0xB, 0x8, 0x94, 0xE0, 0xE0, - 0x4, 0x8, 0x94, 0xF0, 0x23, 0x7, 0x41, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x89, 0xDD, 0xFB, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF9, 0xFD, 0xFD, 0xF8, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF9, 0xF0, 0xBD, 0xB0, 0x78, 0x63, 0x80, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x7D, 0x63, 0xB3, 0xC, 0x8, 0x94, 0xDC, 0xE0, - 0x4, 0x8, 0x94, 0xF0, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x93, 0xFB, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0xA3, 0xFD, 0xFD, 0xF8, 0x41, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x3A, 0xEE, 0xFD, 0xE9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF7, 0xE9, 0x7C, 0x86, 0x85, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x7D, 0x63, 0xB3, 0xC, 0x8, 0x94, 0xDC, 0xE0, - 0x4, 0x8, 0x94, 0xF0, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0xDD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0xA3, 0xBD, 0x31, 0xBD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x31, 0xE, 0x2C, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF9, 0xF0, 0xAE, 0x83, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x7D, 0x63, 0xB3, 0xC, 0x8, 0x94, 0xE0, 0xE0, - 0x4, 0x8, 0x94, 0xF0, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x92, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0x31, 0x2C, 0xF8, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xF9, 0xEA, 0xA7, 0x61, 0x85, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x7D, 0x63, 0xB3, 0xC, 0x8, 0xA3, 0xED, 0xED, - 0x0, 0x8, 0x94, 0xF0, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x85, 0x86, 0x89, 0xDD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBD, 0x31, 0xBD, 0xB6, 0xA3, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xD8, 0xA3, 0xE, 0x2C, 0x41, 0xBB, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF5, 0xB8, 0x6C, 0x62, 0x80, 0x80, 0x7F, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x7D, 0x63, 0xB3, 0xC, 0x8, 0xA4, 0xEE, 0xEE, - 0x1, 0x8, 0x94, 0xF0, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x86, 0x8A, 0xDD, 0xF4, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x41, 0xF8, 0xFD, 0xFD, 0xB6, 0xA3, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0xB4, 0xF7, 0xD8, 0x33, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xF9, 0xF0, 0xB6, 0x7A, 0x78, 0x69, 0x60, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x7D, 0x73, 0xBA, 0xE, 0x8, 0xA4, 0xF0, 0xF0, - 0x7, 0x8, 0x94, 0xF0, 0x23, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x85, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x89, 0xDD, 0xFC, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF9, 0xFD, 0xFD, 0xF8, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xF9, 0xF7, 0xEB, 0xB8, 0x70, 0x7E, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x88, 0x84, 0x74, 0xAE, 0xBD, 0xE, 0x8, 0xA4, 0xF5, 0xF5, - 0x7, 0x8, 0xA4, 0xF0, 0x2C, 0x1, 0x3F, 0xDF, 0x89, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x80, 0x73, 0x73, 0x81, 0x80, 0x85, 0x87, 0x87, 0x87, 0x85, 0x86, 0x86, 0x89, 0x92, 0xFB, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x3A, 0xEE, 0xFD, 0xE9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBA, 0x74, 0x85, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x88, 0x84, 0x8E, 0xD9, 0xBB, 0xB7, 0xBD, 0xE, 0x8, 0xAA, 0xF0, 0xF5, - 0x8, 0x8, 0xA4, 0xF5, 0x2D, 0x1, 0x3F, 0xE0, 0x84, 0x85, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x88, 0x84, 0x7B, 0x7A, 0x70, 0x73, 0x82, 0x83, 0x84, 0x8B, 0xB1, 0xB1, 0xD3, 0xDF, 0xFC, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x31, 0xE, 0x2C, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xB7, 0x6A, 0x7E, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x89, 0x8D, 0xD9, 0xF4, 0xF8, 0xE9, 0xBD, 0xBD, 0xE, 0x1, 0x48, 0xB6, 0xB4, - 0x3, 0x12, 0xA4, 0xF5, 0x33, 0x1, 0x41, 0xEA, 0x7A, 0x61, 0x80, 0x87, 0x87, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x86, 0x8D, 0xD6, 0xB6, 0xAE, 0xD1, 0xD9, 0xEE, 0xF0, 0xF0, 0xF5, 0xF9, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xE9, 0xA8, 0x70, 0x63, 0x81, 0x80, 0x83, 0x61, 0x62, 0x85, 0x87, - 0x87, 0x86, 0x8A, 0xD9, 0xF5, 0xF9, 0xFD, 0xFD, 0xE9, 0xBD, 0xE9, 0x31, 0x1, 0x12, 0x2D, 0xE, - 0x1, 0x12, 0xA4, 0xF1, 0x34, 0x3, 0x41, 0xF0, 0xBB, 0x72, 0x6A, 0x60, 0x85, 0x87, 0x87, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x88, 0x92, 0xED, 0xF0, 0xF5, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB7, 0x2C, 0xE, 0x38, 0xE9, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0x2C, 0xE, 0x31, 0xAA, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF0, 0xE9, 0xBA, 0xBA, 0xD6, 0xD8, 0xB4, 0x72, 0x74, 0x76, - 0xD1, 0xDC, 0xF5, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xB6, 0xEE, 0xAA, 0x1, 0x1, 0x1, 0x1, - 0x1, 0x3, 0x2D, 0x2D, 0x1, 0x8, 0x94, 0xF5, 0xF8, 0xEE, 0xB7, 0xA7, 0x68, 0x62, 0x7F, 0x87, - 0x87, 0x87, 0x87, 0x87, 0x87, 0x89, 0xDF, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF0, 0xFD, 0xF0, 0x3A, 0xB6, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xE9, 0xFD, 0xF0, 0x3A, 0xA3, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF7, 0xF7, 0xF7, 0xF8, 0xF0, 0xE9, 0xD8, 0xE0, - 0xF5, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB6, 0xD8, 0xEE, 0x31, 0x0, 0x0, 0x0, - 0x1, 0x1, 0x1, 0x1, 0x0, 0x8, 0x94, 0xF7, 0xFD, 0xF9, 0xF7, 0xE9, 0xB4, 0x72, 0x69, 0x62, - 0x85, 0x87, 0x87, 0x87, 0x89, 0x93, 0xFB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x31, 0xBD, 0xFD, 0xFD, 0xF9, 0xE, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF9, 0xFD, 0xFD, 0xF9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF9, 0xF9, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBD, 0xB6, 0xEE, 0xBD, 0x31, 0x1, 0x0, - 0x0, 0x0, 0x0, 0x0, 0x1, 0x8, 0x41, 0xF7, 0xFD, 0xFD, 0xFD, 0xF9, 0xF5, 0xD8, 0xB0, 0x72, - 0x61, 0x7E, 0x85, 0x89, 0xDD, 0xF4, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0x33, 0xFD, 0xFD, 0xF0, 0xE, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xAA, 0x3A, 0xF0, 0xFD, 0xE9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xEE, 0xD8, 0xEA, 0xF8, 0xF0, 0xB4, 0x41, - 0x2C, 0xE, 0x1, 0x0, 0x1, 0x1, 0x41, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF0, 0xE9, - 0xB0, 0xAE, 0xB3, 0xDC, 0xFB, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xBB, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x31, 0xE, 0x2C, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF5, 0xE9, 0xE9, 0xA4, 0xBD, 0xF5, 0xF8, 0xF8, - 0xF5, 0xEE, 0xAA, 0x2C, 0x1, 0xE, 0xB4, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, - 0xF7, 0xF5, 0xF7, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xEA, 0xBD, 0xBD, 0xE, 0x33, 0xA4, 0xB6, 0xE9, - 0xF5, 0xF5, 0xF0, 0xE9, 0xAA, 0xB7, 0xF0, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0x2C, 0xE, 0x31, 0xAA, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x3A, 0xA3, 0xB6, 0xE9, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x1, 0x1A, 0x34, 0x48, - 0xBD, 0xF0, 0xEA, 0xE9, 0xF0, 0xF0, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xE9, 0xFD, 0xF0, 0x3A, 0xA3, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xE9, 0xB6, 0x3C, 0xE, 0x3A, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x1, 0x1, 0xF, 0x12, - 0x48, 0xBD, 0xF0, 0xEA, 0xBD, 0xEE, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xF9, 0xFD, 0xFD, 0xF9, 0xE, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xBD, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x0, 0x1, 0x1, 0x1, - 0x12, 0x94, 0xE9, 0xF5, 0x33, 0x3A, 0xD8, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xAA, 0x3A, 0xF0, 0xFD, 0xE9, 0x2C, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF9, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x0, 0x1, 0x1, 0x0, - 0x1, 0x34, 0xB7, 0xF7, 0x31, 0x8, 0xA4, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x31, 0xE, 0x2C, 0xE9, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x2C, 0x38, 0xB4, 0xF5, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x1, 0x2D, 0x48, 0x3A, - 0x0, 0x12, 0xAA, 0xF5, 0x31, 0x3, 0x94, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x3A, 0xFD, 0xF5, 0xAA, 0x33, 0xE, 0x2C, 0xA3, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x7, 0xA4, 0xF5, 0xF0, - 0x7, 0x8, 0xA4, 0xF5, 0x31, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xB6, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x8, 0xAA, 0xF5, 0xF5, - 0x7, 0x8, 0xA4, 0xF5, 0x31, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBD, 0xA3, 0x31, 0x2C, 0x3F, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0x31, 0xE, 0x31, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x8, 0xAA, 0xF5, 0xF0, - 0x7, 0x8, 0xA4, 0xF5, 0x33, 0x3, 0x41, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB4, 0xA8, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xBD, 0xFD, 0xE, 0xA3, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x8, 0xAA, 0xF5, 0xF5, - 0x7, 0x8, 0xA4, 0xF5, 0x31, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xBB, 0xF7, 0xF9, 0xE, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xF8, 0xFD, 0xE, 0xF9, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x8, 0xAA, 0xF0, 0xF0, - 0x7, 0x8, 0xA4, 0xF5, 0x31, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x41, 0x31, 0xE, 0xB6, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x3A, 0xFD, 0xE, 0xF0, 0x2C, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x8, 0xAA, 0xF5, 0xF0, - 0x7, 0x8, 0xA4, 0xF5, 0x31, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB4, 0xB6, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0xFD, 0xE, 0x2C, 0xD8, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x8, 0xAA, 0xF5, 0xF0, - 0x7, 0x8, 0xA4, 0xF5, 0x31, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x41, 0xBB, 0xF7, 0xF9, 0xE, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x8, 0xAA, 0xF5, 0xF0, - 0x7, 0x8, 0xA4, 0xF5, 0x31, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xB6, 0x41, 0xE, 0xE, 0xB6, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xB6, 0x2C, 0xE, 0x33, 0xE9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x8, 0xAA, 0xF5, 0xF0, - 0x7, 0x8, 0xA4, 0xF5, 0x33, 0x3, 0x48, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0xE9, 0xFD, 0xF0, 0x3A, 0xB6, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x8, 0xAA, 0xF5, 0xF0, - 0x7, 0x7, 0x3B, 0xAB, 0x12, 0x3, 0x94, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xB6, 0xFD, 0xFD, 0xF9, 0xE, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xBD, 0xE, 0x7, 0xA4, 0xF5, 0xF5, - 0x7, 0x1, 0x8, 0x8, 0x1, 0x8, 0x94, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0x2C, 0x31, 0xE9, 0xF7, 0xB6, 0xB4, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xBD, 0xE9, 0x33, 0x7, 0x3B, 0xF0, 0xF8, - 0x33, 0x0, 0x1, 0x1, 0x1, 0x8, 0x94, 0xF7, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x41, 0x2C, 0xE, 0xA3, 0xD8, 0xF7, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xE9, 0xB6, 0xEA, 0xE9, 0xAA, 0xA4, 0xE9, 0xF0, - 0xB6, 0x7, 0x0, 0x0, 0x1, 0x8, 0x41, 0xF5, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF7, 0xBB, 0x41, 0x2C, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF0, 0xB6, 0xB4, 0xBD, 0xE9, 0xEA, 0xBD, 0xB6, - 0xF5, 0xA8, 0x7, 0x0, 0x0, 0x1, 0x41, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, 0xF0, 0xD8, 0xB7, 0xBB, 0xE9, 0xD8, 0xB4, - 0xBD, 0xF0, 0xB6, 0x3A, 0xE, 0x2C, 0xB7, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF8, 0xF7, 0xF5, 0xF8, 0xF7, 0xE9, - 0xB4, 0xBD, 0xEA, 0xEA, 0xB7, 0xBD, 0xF0, 0xF8, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xF9, - 0xF5, 0xF0, 0xF5, 0xF8, 0xF9, 0xF9, 0xF9, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, - 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD, 0xFD - -}; diff --git a/backends/platform/gp32/globals.h b/backends/platform/gp32/globals.h deleted file mode 100644 index 49f11ddb4e..0000000000 --- a/backends/platform/gp32/globals.h +++ /dev/null @@ -1,44 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef __GLOBALS_H -#define __GLOBALS_H - -enum { - FM_QUALITY_LOW = 0, - FM_QUALITY_MED, - FM_QUALITY_HI -}; - -struct GlobalVars { - uint16 cpuSpeed; - uint16 gammaRamp; - uint8 fmQuality; - uint32 sampleRate; -}; - -extern GlobalVars g_vars; - -#endif diff --git a/backends/platform/gp32/gp32_launcher.cpp b/backends/platform/gp32/gp32_launcher.cpp deleted file mode 100644 index 9931118f08..0000000000 --- a/backends/platform/gp32/gp32_launcher.cpp +++ /dev/null @@ -1,190 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/scummsys.h" -#include "common/file.h" - -#include "engines/engine.h" - -#include "gp32std.h" -#include "gp32std_grap.h" -#include "gp32std_input.h" -#include "gp32_launcher.h" - -#include "gfx_splash.h" -#include "globals.h" - -uint16 cpuSpeedTable[15] = {40, 66, 100, 120, 133, 144, 156, 160, 166, 172, 176, 180, 188, 192, 200}; -uint16 gammaTable[16] = {5000, 6000, 7000, 8000, 9000, 10000, 11000, 12000, 13000, 14000, 15000, 16000, 17000, 18000, 19000, 20000}; -char *oplTable[3] = {"LOW", "MEDIUM", "HIGH"}; -uint16 sampleTable[4] = {0, 11025, 22050, 44100}; - -uint8 maxTable[5] = {15, 16, 3, 3, 2}; -uint8 currentSetting[5] = {2, 5, 1, 1, 0}; - -void writeConfigVars() { - Common::File file; - - g_vars.cpuSpeed = cpuSpeedTable[currentSetting[0]]; - g_vars.gammaRamp = gammaTable[currentSetting[1]]; - g_vars.fmQuality = currentSetting[2]; - g_vars.sampleRate = sampleTable[currentSetting[3]]; - - if (!file.open("gp:\\gpetc\\scummvm.cfg", Common::File::kFileWriteMode)) { - return; - } - file.writeByte(currentSetting[0]); - file.writeByte(currentSetting[1]); - file.writeByte(currentSetting[2]); - file.writeByte(currentSetting[3]); - file.close(); -} - -void readConfigVars() { - Common::File file; - if (!file.open("gp:\\gpetc\\scummvm.cfg", Common::File::kFileReadMode)) { - currentSetting[0] = 2; - currentSetting[1] = 5; - currentSetting[2] = 1; - currentSetting[3] = 1; - writeConfigVars(); - return; - } - currentSetting[0] = file.readByte(); - currentSetting[1] = file.readByte(); - currentSetting[2] = file.readByte(); - currentSetting[3] = file.readByte(); - g_vars.cpuSpeed = cpuSpeedTable[currentSetting[0]]; - g_vars.gammaRamp = gammaTable[currentSetting[1]]; - g_vars.fmQuality = currentSetting[2]; - g_vars.sampleRate = sampleTable[currentSetting[3]]; - file.close(); -} - -void configMenu() { - uint32 nKeyUD; - uint16 nKeyP; - - int currentSelect = 0; - char text[32]; - - // OK / CANCEL - currentSetting[4] = 0; - - while (1) { - gp_fillRect(frameBuffer2, 0, 0, 320, 240, 0xffff); - gp_textOut(frameBuffer2, 90, 10, "Configuration Menu", 0); - - gp_textOut(frameBuffer2, 30, 40, "CPU clock speed", 0); - gp_textOut(frameBuffer2, 30, 80, "Gamma ramp", 0); - gp_textOut(frameBuffer2, 30, 120, "FMOPL (AdLib) quality", 0); - gp_textOut(frameBuffer2, 30, 160, "Sampling rate", 0); - - gp_textOut(frameBuffer2, 100, 210, "OK CANCEL", 0); - - if (currentSelect == 4) { - gp_textOut(frameBuffer2, 80 + currentSetting[4] * 100, 210, "@", 0); - } else - gp_textOut(frameBuffer2, 20, (currentSelect + 1) * 40, "@", 0); - - sprintf(text, "%d MHz", cpuSpeedTable[currentSetting[0]]); - gp_textOut(frameBuffer2, 220, 40, text, 0); - sprintf(text, "%.2f", (float)gammaTable[currentSetting[1]] / 10000); - gp_textOut(frameBuffer2, 220, 80, text, 0); - gp_textOut(frameBuffer2, 220, 120, oplTable[currentSetting[2]], 0); - if (sampleTable[currentSetting[3]] == 0) { - strcpy(text, "NO SOUND"); - } else { - sprintf(text, "%d Hz", sampleTable[currentSetting[3]]); - } - gp_textOut(frameBuffer2, 220, 160, text, 0); - - gp_flipScreen(); - - gp_getButtonEvent(&nKeyUD, &nKeyP); - - if (gpd_getButtonDown(nKeyUD, GPC_VK_UP)) { - if (currentSelect > 0) - currentSelect--; - } - if (gpd_getButtonDown(nKeyUD, GPC_VK_DOWN)) { - if (currentSelect < 4) - currentSelect++; - } - if (gpd_getButtonDown(nKeyUD, GPC_VK_LEFT)) { - if (currentSelect <= 4) - if (currentSetting[currentSelect] > 0) - currentSetting[currentSelect]--; - } - if (gpd_getButtonDown(nKeyUD, GPC_VK_RIGHT)) { - if (currentSelect <= 4) - if (currentSetting[currentSelect] < maxTable[currentSelect] - 1) - currentSetting[currentSelect]++; - } - - if (gpd_getButtonUp(nKeyUD, GPC_VK_START) || - gpd_getButtonUp(nKeyUD, GPC_VK_FA)) { - if (currentSelect == 4) { - if (currentSetting[currentSelect] == 0) { // OK - writeConfigVars(); - return; - } else { // CANCEL - return; - } - } - } - } -} - -void splashScreen() { - uint32 nKeyUD; - uint16 nKeyP; - - while (1) { - uint16 *buffer = frameBuffer2;//&frameBuffer1[240 - _screenHeight]; - uint8 *picBuffer = gfx_splash; - - for (int c = 0; c < LCD_WIDTH * LCD_HEIGHT; c++) { - *buffer++ = gfx_splash_Pal[*picBuffer++]; - } - - gp_flipScreen(); - - while (1) { - gp_getButtonEvent(&nKeyUD, &nKeyP); - - if (gpd_getButtonUp(nKeyUD, GPC_VK_START) || - gpd_getButtonUp(nKeyUD, GPC_VK_FA)) { - gp_fillRect(frameBuffer1, 0, 0, 320, 240, 0xffff); - gp_fillRect(frameBuffer2, 0, 0, 320, 240, 0xffff); - return; - } - if (gpd_getButtonUp(nKeyUD, GPC_VK_SELECT)) { - configMenu(); - break; - } - } - } -} diff --git a/backends/platform/gp32/gp32_launcher.h b/backends/platform/gp32/gp32_launcher.h deleted file mode 100644 index fee9e9b60e..0000000000 --- a/backends/platform/gp32/gp32_launcher.h +++ /dev/null @@ -1,35 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef __GP32_LAUNCHER_H -#define __GP32_LAUNCHER_H - -#include "common/scummsys.h" - -extern void readConfigVars(); - -extern void splashScreen(); - -#endif diff --git a/backends/platform/gp32/gp32_main.cpp b/backends/platform/gp32/gp32_main.cpp deleted file mode 100644 index 3db3dfe553..0000000000 --- a/backends/platform/gp32/gp32_main.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/scummsys.h" - -#include "common/config-manager.h" - -#include "base/main.h" - -#include "gp32std.h" -#include "gp32std_grap.h" - -#include "gp32_launcher.h" -#include "gp32_osys.h" -#include "globals.h" - -GlobalVars g_vars; - -void init() { - gp_setCpuSpeed(40); // Default CPU Speed - - GpGraphicModeSet(16, NULL); - - //if (type == NLU || type == FLU || type == BLU) - // gp_initFramebuffer(frameBuffer, 16, 85); - //else if (type == BLUPLUS) - // gp_initFramebufferBP(frameBuffer, 16, 85); - // else - // error("Invalid Console"); - gp_initFrameBuffer(); - - GpFatInit(); - GpRelativePathSet("gp:\\gpmm"); -} - -void GpMain(void *arg) { - extern void memBlockInit(); - memBlockInit(); - - init(); - - readConfigVars(); - - splashScreen(); - - //doConfig - gp_initGammaTable((float)g_vars.gammaRamp / 10000); - gp_setCpuSpeed(g_vars.cpuSpeed); - GPDEBUG("Set CPU Speed: %d", g_vars.cpuSpeed); - - // FOR DEBUG PURPOSE! - //int argc = 4; - //char *argv[] = { "scummvm", "-enull", "-pgp:\\game\\dott\\", "tentacle" }; - //int argc = 2; - //char *argv[] = { "scummvm", "-d5" }; - - extern OSystem *OSystem_GP32_create(); - g_system = OSystem_GP32_create(); - assert(g_system); - - // Invoke the actual ScummVM main entry point: - //int res = scummvm_main(argc, argv); - int res = scummvm_main(1, NULL); - - extern void memBlockDeinit(); - memBlockDeinit(); - - g_system->quit(); // TODO: Consider removing / replacing this! - - //return res; -} diff --git a/backends/platform/gp32/gp32_osys.cpp b/backends/platform/gp32/gp32_osys.cpp deleted file mode 100644 index 866d97e966..0000000000 --- a/backends/platform/gp32/gp32_osys.cpp +++ /dev/null @@ -1,792 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/scummsys.h" -#include "common/system.h" - -#include "common/rect.h" -#include "common/savefile.h" -#include "common/config-manager.h" -#include "graphics/surface.h" - -#include "gp32_osys.h" -#include "globals.h" - -static const OSystem::GraphicsMode s_supportedGraphicsModes[] = { - {0, 0, 0} -}; - -OSystem_GP32::OSystem_GP32() : - _screenWidth(0), _screenHeight(0), _gameScreen(NULL), _hwScreen(NULL), - _overlayVisible(false), _forceFull(false), _adjustAspectRatio(false), - /*_paletteDirtyStart(0), _paletteDirtyEnd(0),*/ - _mouseBuf(NULL), _mouseHeight(0), _mouseWidth(0), _mouseKeyColor(0), - _mouseHotspotX(0), _mouseHotspotY(0) { - NP("OSys::OSystem_GP32()"); - // allocate palette storage - memset(_currentPalette, 0, 256 * sizeof(uint16)); - - memset(&_km, 0, sizeof(_km)); - - // HACK: bring mouse cursor to center - _mouseX = 160; - _mouseY = 120; -} - -OSystem_GP32::~OSystem_GP32() { - NP("OSys::~OSystem_GP32()"); -} - -bool OSystem_GP32::hasFeature(Feature f) { - NP("OSys::hasFeature()"); - return false; -} - -void OSystem_GP32::setFeatureState(Feature f, bool enable) { - NP("OSys::setFeatureState()"); -} - -bool OSystem_GP32::getFeatureState(Feature f) { - NP("OSys::getFeatureState()"); - return false; -} - -const OSystem::GraphicsMode* OSystem_GP32::getSupportedGraphicsModes() const { - NP("OSys::getSupportedGraphicsModes()"); - return s_supportedGraphicsModes; -} - - -int OSystem_GP32::getDefaultGraphicsMode() const { - NP("OSys::getSupportedGraphicsModes()"); - return -1; -} - -bool OSystem_GP32::setGraphicsMode(int mode) { - NP("OSys::setGraphicsMode()"); - return true; -} - -bool OSystem_GP32::setGraphicsMode(const char *name) { - NP("OSys::setGraphicsMode()"); - return true; -} - -int OSystem_GP32::getGraphicsMode() const { - NP("OSys::getGraphicsMode()"); - return -1; -} - -void OSystem_GP32::initSize(uint width, uint height) { - NP("OSys::initSize()"); - - if (width == _screenWidth && height == _screenHeight) - return; - - _screenWidth = width; - _screenHeight = height; - - if (height != 200) - _adjustAspectRatio = false; - - _overlayWidth = width; - _overlayHeight = height; -// _overlayWidth = 320; -// _overlayHeight = 240; - - // Create the surface that contains the 8 bit game data - _gameScreen = new uint8[_screenWidth * _screenHeight]; - - // Create the surface that contains the scaled graphics in 16 bit mode - _tmpScreen = frameBuffer2; - - // Create the surface that is connected with hardware screen - _hwScreen = frameBuffer1; - - _overlayBuffer = new OverlayColor[_overlayWidth * _overlayHeight]; - - _km.x_max = _screenWidth - 1; - _km.y_max = _screenHeight - 1; - _km.x = _mouseX; - _km.y = _mouseY; - _km.delay_time = 25; - _km.last_time = 0; - - // Clear Screen - gp_fillRect(_hwScreen, 0, 0, 320, 240, 0xFFFF); -} - -int16 OSystem_GP32::getHeight() { - //NP("OSys::getHeight()"); - return _screenHeight; -} - -int16 OSystem_GP32::getWidth() { - //NP("OSys::getWidth()"); - return _screenWidth; -} - -void OSystem_GP32::setPalette(const byte *colors, uint start, uint num) { - //NP("OSys::setPalette()"); - const byte *b = colors; - uint i; - uint16 *base = _currentPalette + start; - for (i = 0; i < num; i++) { - base[i] = gp_RGBTo16(b[0], b[1], b[2]); - b += 4; - } - -// if (start < _paletteDirtyStart) -// _paletteDirtyStart = start; - -// if (start + num > _paletteDirtyEnd) -// _paletteDirtyEnd = start + num; -} - -void OSystem_GP32::grabPalette(byte *colors, uint start, uint num) { - NP("OSys::grabPalette()"); -} - -void OSystem_GP32::copyRectToScreen(const byte *src, int pitch, int x, int y, int w, int h) { - //NP("OSys::copyRectToScreen()"); - //Clip the coordinates - if (x < 0) { - w += x; - src -= x; - x = 0; - } - - if (y < 0) { - h += y; - src -= y * pitch; - y = 0; - } - - if (w > _screenWidth - x) { - w = _screenWidth - x; - } - - if (h > _screenHeight - y) { - h = _screenHeight - y; - } - - if (w <= 0 || h <= 0) - return; - - byte *dst = _gameScreen + y * _screenWidth + x; - - if (_screenWidth == pitch && pitch == w) { - memcpy(dst, src, h * w); - } else { - do { - memcpy(dst, src, w); - src += pitch; - dst += _screenWidth; - } while (--h); - } -} - -Graphics::Surface *OSystem_GP32::lockScreen() { - _framebuffer.pixels = _gameScreen; - _framebuffer.w = _screenWidth; - _framebuffer.h = _screenHeight; - _framebuffer.pitch = _screenWidth; - _framebuffer.bytesPerPixel = 1; - - return &_framebuffer; -} - -void OSystem_GP32::unlockScreen() { - // The screen is always completely update anyway, so we don't have to force a full update here. -} - -//TODO: Implement Dirty rect? -void OSystem_GP32::updateScreen() { - uint16 *buffer; - //TODO: adjust shakePos - - // draw gamescreen - buffer = &_tmpScreen[240 - _screenHeight]; - for (int x = 0; x < _screenWidth; x++) { - for (int y = 0; y < _screenHeight; y++) { - *buffer++ = _currentPalette[_gameScreen[((_screenHeight - 1) - y) * _screenWidth + x]]; - } - buffer += 240 - _screenHeight; - } - - // draw overlay - if (_overlayVisible) { - buffer = &_tmpScreen[240 - _overlayHeight]; - for (int x = 0; x < _overlayWidth; x++) { - for (int y = 0; y < _overlayHeight; y++) { - *buffer++ = _overlayBuffer[((_overlayHeight - 1) - y) * _overlayWidth + x]; - } - buffer += 240 - _overlayHeight; - } - } - - // draw mouse - //adjust cursor position - int mX = _mouseX - _mouseHotspotX; - int mY = _mouseY - _mouseHotspotY; - //if (_overlayVisible) - //else - if (_mouseVisible) - for (int y = 0; y < _mouseHeight; y++) { - for (int x = 0; x < _mouseWidth; x++) { - if (mX + x < _screenWidth && mY + y < _screenHeight && mX + x >= 0 && mY + y >= 0) - if (_mouseBuf[y * _mouseWidth + x] != _mouseKeyColor) - gpd_drawPixel16(_tmpScreen, mX + x, mY + y, _currentPalette[_mouseBuf[y * _mouseWidth + x]]); - } - } - - //TODO: draw softkeyboard - //gp_flipScreen(); - //_hwScreen = frameBuffer1; - //_tmpScreen = frameBuffer2; - memcpy(_hwScreen, _tmpScreen, LCD_WIDTH * LCD_HEIGHT * sizeof(uint16)); -} - -void OSystem_GP32::setShakePos(int shakeOffset) { - //NP("OSys::setShakePos()"); -} - -void OSystem_GP32::showOverlay() { - //NP("OSys::showOverlay()"); - _overlayVisible = true; - clearOverlay(); -} - -void OSystem_GP32::hideOverlay() { - //NP("OSys::hideOverlay()"); - _overlayVisible = false; - clearOverlay(); - _forceFull = true; -} - -// Clear overlay with game screen -//TODO: Optimize? -void OSystem_GP32::clearOverlay() { - //NP("OSys::clearOverlay()"); - if (!_overlayVisible) - return; - - uint8 *s = _gameScreen; - OverlayColor *d = _overlayBuffer; - uint8 c; - for (int y = 0; y < _overlayHeight; y++) { - for (int x = 0; x < _overlayWidth; x++) { - c = *s; - *d++ = _currentPalette[c]; - s++; - } - } - - _forceFull = true; -} - -void OSystem_GP32::grabOverlay(OverlayColor *buf, int pitch) { - //NP("OSys::grabOverlay()"); - int h = _overlayHeight; - OverlayColor *src = _overlayBuffer; - - do { - memcpy(buf, src, _overlayWidth * sizeof(OverlayColor)); - src += _overlayWidth; - buf += pitch; - } while (--h); -} - -void OSystem_GP32::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h) { - //NP("OSys::copyRectToOverlay()"); - - //Clip the coordinates - if (x < 0) { - w += x; - buf -= x; - x = 0; - } - - if (y < 0) { - h += y; - buf -= y * pitch; - y = 0; - } - - if (w > _overlayWidth - x) { - w = _overlayWidth - x; - } - - if (h > _overlayHeight - y) { - h = _overlayHeight - y; - } - - if (w <= 0 || h <= 0) - return; - - - OverlayColor *dst = _overlayBuffer + y * _overlayWidth + x; - if (_overlayWidth == pitch && pitch == w) { - memcpy(dst, buf, h * w * sizeof(OverlayColor)); - } else { - do { - memcpy(dst, buf, w * sizeof(OverlayColor)); - buf += pitch; - dst += _overlayWidth; - } while (--h); - } -} - -int16 OSystem_GP32::getOverlayHeight() { - return getHeight(); -} - -int16 OSystem_GP32::getOverlayWidth() { - return getWidth(); -} - -OverlayColor OSystem_GP32::RGBToColor(uint8 r, uint8 g, uint8 b) { - return gp_RGBTo16(r, g, b); -} - -void OSystem_GP32::colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) { - gp_16ToRGB(color, &r, &g, &b); -} - -bool OSystem_GP32::showMouse(bool visible) { - NP("OSys::showMouse()"); - if (_mouseVisible == visible) - return visible; - - bool last = _mouseVisible; - _mouseVisible = visible; - - updateScreen(); - - return last; -} - -void OSystem_GP32::warpMouse(int x, int y) { - //NP("OSys::warpMouse()"); - //assert(x > 0 && x < _screenWidth); - //assert(y > 0 && y < _screenHeight); - _mouseX = x; - _mouseY = y; -} - -void OSystem_GP32::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor, int cursorTargetScale) { - //NP("OSys::setMouseCursor()"); - _mouseWidth = w; - _mouseHeight = h; - - _mouseHotspotX = hotspotX; - _mouseHotspotY = hotspotY; - - _mouseKeyColor = keycolor; - - if (_mouseBuf) - free(_mouseBuf); - - _mouseBuf = (byte *)malloc(w * h); - memcpy(_mouseBuf, buf, w * h); -} - -void OSystem_GP32::handleKbdMouse() { - uint32 curTime = getMillis(); - if (curTime >= _km.last_time + _km.delay_time) { - _km.last_time = curTime; - if (_km.x_down_count == 1) { - _km.x_down_time = curTime; - _km.x_down_count = 2; - } - if (_km.y_down_count == 1) { - _km.y_down_time = curTime; - _km.y_down_count = 2; - } - - if (_km.x_vel || _km.y_vel) { - if (_km.x_down_count) { - if (curTime > _km.x_down_time + _km.delay_time * 12) { - if (_km.x_vel > 0) - _km.x_vel++; - else - _km.x_vel--; - } else if (curTime > _km.x_down_time + _km.delay_time * 8) { - if (_km.x_vel > 0) - _km.x_vel = 5; - else - _km.x_vel = -5; - } - } - if (_km.y_down_count) { - if (curTime > _km.y_down_time + _km.delay_time * 12) { - if (_km.y_vel > 0) - _km.y_vel++; - else - _km.y_vel--; - } else if (curTime > _km.y_down_time + _km.delay_time * 8) { - if (_km.y_vel > 0) - _km.y_vel = 5; - else - _km.y_vel = -5; - } - } - - //GPDEBUG("%d %d - %d %d", _km.x, _km.y, _km.x_vel, _km.y_vel); - _km.x += _km.x_vel; - _km.y += _km.y_vel; - - if (_km.x < 0) { - _km.x = 0; - _km.x_vel = -1; - _km.x_down_count = 1; - } else if (_km.x > _km.x_max) { - _km.x = _km.x_max; - _km.x_vel = 1; - _km.x_down_count = 1; - } - - if (_km.y < 0) { - _km.y = 0; - _km.y_vel = -1; - _km.y_down_count = 1; - } else if (_km.y > _km.y_max) { - _km.y = _km.y_max; - _km.y_vel = 1; - _km.y_down_count = 1; - } - - warpMouse(_km.x, _km.y); - } - } -} - -void OSystem_GP32::fillMouseEvent(Common::Event &event, int x, int y) { - event.mouse.x = x; - event.mouse.y = y; - - // Update the "keyboard mouse" coords - _km.x = x; - _km.y = y; - - // Optionally perform aspect ratio adjusting - //if (_adjustAspectRatio) - // event.mouse.y = aspect2Real(event.mouse.y); -} - -bool OSystem_GP32::pollEvent(Common::Event &event) { - //NP("OSys::pollEvent()"); - GP32BtnEvent ev; - - handleKbdMouse(); - - if (!gp_pollButtonEvent(&ev)) - return false; - - switch(ev.type) { - case BUTTON_DOWN: - if (ev.button == GPC_VK_LEFT) { - _km.x_vel = -1; - _km.x_down_count = 1; - } - if (ev.button == GPC_VK_RIGHT) { - _km.x_vel = 1; - _km.x_down_count = 1; - } - if (ev.button == GPC_VK_UP) { - _km.y_vel = -1; - _km.y_down_count = 1; - } - if (ev.button == GPC_VK_DOWN) { - _km.y_vel = 1; - _km.y_down_count = 1; - } - if (ev.button == GPC_VK_START) { // START = menu/enter - event.type = Common::EVENT_KEYDOWN; - if (_overlayVisible) - event.kbd.keycode = event.kbd.ascii = 13; - else { - event.kbd.keycode = Common::KEYCODE_F5; - event.kbd.ascii = Common::ASCII_F5; - } - return true; - } - if (ev.button == GPC_VK_SELECT) { // SELECT = pause - event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = event.kbd.ascii = 32; - return true; - } - if (ev.button == GPC_VK_FL) { - event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = event.kbd.ascii = '0'; - return true; - } - if (ev.button == GPC_VK_FR) { // R = ESC - event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = event.kbd.ascii = 27; - return true; - } - if (ev.button == GPC_VK_FA) { - event.type = Common::EVENT_LBUTTONDOWN; - fillMouseEvent(event, _km.x, _km.y); - return true; - } - if (ev.button == GPC_VK_FB) { - event.type = Common::EVENT_RBUTTONDOWN; - fillMouseEvent(event, _km.x, _km.y); - return true; - } - break; - case BUTTON_UP: - if (ev.button == GPC_VK_LEFT) { - if (_km.x_vel < 0) { - _km.x_vel = 0; - _km.x_down_count = 0; - } - event.type = Common::EVENT_MOUSEMOVE; - fillMouseEvent(event, _km.x, _km.y); - return true; - } - if (ev.button == GPC_VK_RIGHT) { - if (_km.x_vel > 0) { - _km.x_vel = 0; - _km.x_down_count = 0; - } - event.type = Common::EVENT_MOUSEMOVE; - fillMouseEvent(event, _km.x, _km.y); - return true; - } - if (ev.button == GPC_VK_UP) { - if (_km.y_vel < 0) { - _km.y_vel = 0; - _km.y_down_count = 0; - } - event.type = Common::EVENT_MOUSEMOVE; - fillMouseEvent(event, _km.x, _km.y); - return true; - } - if (ev.button == GPC_VK_DOWN) { - if (_km.y_vel > 0) { - _km.y_vel = 0; - _km.y_down_count = 0; - } - event.type = Common::EVENT_MOUSEMOVE; - fillMouseEvent(event, _km.x, _km.y); - return true; - } - - if (ev.button == GPC_VK_START) { - event.type = Common::EVENT_KEYUP; - if (_overlayVisible) - event.kbd.keycode = event.kbd.ascii = 13; - else { - event.kbd.keycode = Common::KEYCODE_F5; - event.kbd.ascii = Common::ASCII_F5; - } - return true; - } - if (ev.button == GPC_VK_SELECT) { - event.type = Common::EVENT_KEYUP; - event.kbd.keycode = event.kbd.ascii = 32; - return true; - } - if (ev.button == GPC_VK_FL) { - event.type = Common::EVENT_KEYUP; - event.kbd.keycode = event.kbd.ascii = '0'; - return true; - } - if (ev.button == GPC_VK_FR) { - event.type = Common::EVENT_KEYUP; - event.kbd.keycode = event.kbd.ascii = 27; - return true; - } - if (ev.button == GPC_VK_FA) { - event.type = Common::EVENT_LBUTTONUP; - fillMouseEvent(event, _km.x, _km.y); - return true; - } - if (ev.button == GPC_VK_FB) { - event.type = Common::EVENT_RBUTTONUP; - fillMouseEvent(event, _km.x, _km.y); - return true; - } - break; - default: - error("Unknown Common::Event!"); - } - - if (gp_getButtonPressed(GPC_VK_LEFT) || - gp_getButtonPressed(GPC_VK_RIGHT) || - gp_getButtonPressed(GPC_VK_UP) || - gp_getButtonPressed(GPC_VK_DOWN)) { - event.type = Common::EVENT_MOUSEMOVE; - fillMouseEvent(event, _km.x, _km.y); - return true; - } - return false; -} - -uint32 OSystem_GP32::getMillis() { - return GpTickCountGet(); -} - -void OSystem_GP32::delayMillis(uint msecs) { - int startTime = GpTickCountGet(); - while (GpTickCountGet() < startTime + msecs); -} - -// Add a new callback timer -//FIXME: Add to member -int _timerInterval; -int (*_timerCallback)(int); - -static void _timerCallbackVoid() { - //NP("timer running"); - _timerCallback(_timerInterval); //FIXME ?? (*_timercallback)(_timerinterval); -} - -void OSystem_GP32::setTimerCallback(TimerProc callback, int interval) { - //NP("OSys::setTimerCallback()"); - - int timerNo = 1; - - if (callback == NULL) { - GpTimerKill(timerNo); - return; - } - - if (GpTimerOptSet(timerNo, interval, 0, _timerCallbackVoid) == GPOS_ERR_ALREADY_USED) { - error("Timer slot is already used"); - } - - _timerInterval = interval; - _timerCallback = callback; - - GpTimerSet(timerNo); -} - -OSystem::MutexRef OSystem_GP32::createMutex() { -// NP("OSys::createMutex()"); - return NULL; -} - -void OSystem_GP32::lockMutex(MutexRef mutex) { -// NP("OSys::lockMutex()"); -} - -void OSystem_GP32::unlockMutex(MutexRef mutex) { -// NP("OSys::unlockMutex()"); -} - -void OSystem_GP32::deleteMutex(MutexRef mutex) { -// NP("OSys::deleteMutex()"); -} - -bool OSystem_GP32::setSoundCallback(SoundProc proc, void *param) { - //NP("OSys::setSoundCallback()"); - - GPSOUNDBUF gpSoundBuf; - - ConfMan.setBool("FM_medium_quality", (g_vars.fmQuality == FM_QUALITY_MED)); - ConfMan.setBool("FM_high_quality", (g_vars.fmQuality == FM_QUALITY_HI)); - //ConfMan.set("output_rate", (int)g_vars.sampleRate); - - if (ConfMan.hasKey("output_rate")) - _samplesPerSec = ConfMan.getInt("output_rate"); - - _samplesPerSec = (int)g_vars.sampleRate; //hack - - if (_samplesPerSec == 0) { - return false; - } - - if (_samplesPerSec < 0) - _samplesPerSec = SAMPLES_PER_SEC; - - // Originally, we always used 2048 samples. This loop will produce the - // same result at 22050 Hz, and should hopefully produce something - // sensible for other frequencies. Note that it must be a power of two. - - uint32 samples = 0x8000; - - for (;;) { - if ((1000 * samples) / _samplesPerSec < 100) - break; - samples >>= 1; - } - - switch(_samplesPerSec) { - case 44100: - case 22050: - case 11025: - break; - default: - _samplesPerSec = 11025; - } - - gpSoundBuf.freq = _samplesPerSec; - gpSoundBuf.format = 16; - gpSoundBuf.channels = 2; - gpSoundBuf.samples = samples; - gpSoundBuf.userdata = param; - gpSoundBuf.callback = proc; - gp_soundBufStart(&gpSoundBuf); - - // For Safety... - GPDEBUG("_samplesPerSec = %d, samples = %d", _samplesPerSec, samples); - gp_delay(1000); - return true; -} - -void OSystem_GP32::clearSoundCallback() { - //NP("OSys::clearSoundCallback()"); - if (_samplesPerSec != 0) - gp_soundBufStop(); -} - -int OSystem_GP32::getOutputSampleRate() const { - //NP("OSys::getOutputSampleRate()"); - return _samplesPerSec; -} - -void OSystem_GP32::quit() { - //NP("OSys::quit()"); - clearSoundCallback(); - setTimerCallback(0, 0); - exit(0); -} - -void OSystem_GP32::setWindowCaption(const char *caption) { - NP("OSys::setWindowCaption(%s)", caption); -} - -void OSystem_GP32::displayMessageOnOSD(const char *msg) { - NP("OSys::displayMessageOnOSD(%s)", msg); -} - -OSystem *OSystem_GP32_create() { - NP("OSys::OSystem_GP32_create()"); - return new OSystem_GP32(); -} diff --git a/backends/platform/gp32/gp32_osys.h b/backends/platform/gp32/gp32_osys.h deleted file mode 100644 index 9938671962..0000000000 --- a/backends/platform/gp32/gp32_osys.h +++ /dev/null @@ -1,155 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef GP32_OSYS_H -#define GP32_OSYS_H - -//Standard ScummVM includes. -#include "common/scummsys.h" -#include "common/system.h" - -#include "engines/engine.h" - -#include "gp32std.h" -#include "gp32std_grap.h" -#include "gp32std_input.h" -#include "gp32std_sound.h" - -class OSystem_GP32 : public OSystem { -public: - static OSystem *instance(); - -protected: - uint16 _screenWidth, _screenHeight; - uint8 *_gameScreen; - uint16 *_tmpScreen, *_hwScreen; - OverlayColor *_overlayBuffer; - - Graphics::Surface _framebuffer; - - int _overlayWidth, _overlayHeight; - bool _overlayVisible; - uint32 _shakePos; - - // Keyboard mouse emulation - struct KbdMouse { - int16 x, y, x_vel, y_vel, x_max, y_max, x_down_count, y_down_count; - uint32 last_time, delay_time, x_down_time, y_down_time; - }; - - struct MousePos { - int16 x, y, w, h; - }; - - // mouse - KbdMouse _km; - bool _mouseVisible; - int _mouseX, _mouseY; - int _mouseWidth, _mouseHeight; - int _mouseHotspotX, _mouseHotspotY; - byte _mouseKeyColor; - byte *_mouseBuf; - - bool _adjustAspectRatio; - - /** Force full redraw on next updateScreen */ - bool _forceFull; - - uint16 _currentPalette[256]; -// uint _paletteDirtyStart, _paletteDirtyEnd; - - int32 _samplesPerSec; - -public: - - OSystem_GP32(); - ~OSystem_GP32(); - - bool hasFeature(Feature f); - void setFeatureState(Feature f, bool enable); - bool getFeatureState(Feature f); - const GraphicsMode *getSupportedGraphicsModes() const; - int getDefaultGraphicsMode() const; - bool setGraphicsMode(int mode); - bool setGraphicsMode(const char *name); - int getGraphicsMode() const; - void initSize(uint width, uint height); - int16 getHeight(); - int16 getWidth(); - void setPalette(const byte *colors, uint start, uint num); - void grabPalette(byte *colors, uint start, uint num); - - void copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h); - void updateScreen(); - void setShakePos(int shakeOffset); - - void showOverlay(); - void hideOverlay(); - void clearOverlay(); - void grabOverlay(OverlayColor *buf, int pitch); - void copyRectToOverlay(const OverlayColor *buf, int pitch, int x, int y, int w, int h); - - virtual Graphics::Surface *lockScreen(); - virtual void unlockScreen(); - - int16 getOverlayHeight(); - int16 getOverlayWidth(); - - OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b); - void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b); - - bool showMouse(bool visible); - - void warpMouse(int x, int y); - void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, int hotspotY, byte keycolor = 255, int cursorTargetScale = 1); - - bool pollEvent(Common::Event &event); - uint32 getMillis(); - void delayMillis(uint msecs); - - void setTimerCallback(TimerProc callback, int interval); - - MutexRef createMutex(void); - void lockMutex(MutexRef mutex); - void unlockMutex(MutexRef mutex); - void deleteMutex(MutexRef mutex); - - bool setSoundCallback(SoundProc proc, void *param); - void clearSoundCallback(); - int getOutputSampleRate() const; - - void quit(); - - void setWindowCaption(const char *caption); - - void displayMessageOnOSD(const char *msg); - - void fillMouseEvent(Common::Event &event, int x, int y); - void handleKbdMouse(); -}; - -#else - #warning GP32_OSYS.H Called more then once. -#endif /* GP32_H */ diff --git a/backends/platform/gp32/gp32std.cpp b/backends/platform/gp32/gp32std.cpp deleted file mode 100644 index 13c055ebfa..0000000000 --- a/backends/platform/gp32/gp32std.cpp +++ /dev/null @@ -1,336 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/scummsys.h" -//#include "graphics/scaler.h" -#include "common/system.h" - -#include "engines/engine.h" - -#include "gp32std.h" -#include "gp32std_grap.h" -#include "gp32std_memory.h" - -#define DEBUG_MAX 5 -char debline[DEBUG_MAX][256]; -static int debnext = 0; - -void _dprintf(const char *s, ...) { - int deba, deb; - char buf[1024]; - va_list va; - - va_start(va, s); - vsprintf(buf, s, va); - va_end(va); - - strcpy(debline[debnext++], buf); - - if (debnext == DEBUG_MAX) - debnext = 0; - gp_fillRect(frameBuffer1, 0, 243 - (DEBUG_MAX * 8) - 4, 320, (DEBUG_MAX * 8), 0); - - for (deb = debnext, deba = 0; deb < DEBUG_MAX; deb++, deba++) { - //gp_fillRect(frameBuffer1, 0, (243 - (DEBUG_MAX * 8) - 4) + 8 * deba, 320, 8, 0); - gp_textOut(frameBuffer1, 0, (240 - (DEBUG_MAX * 8) - 4) + 8 * deba, debline[deb], 0xFFFF); - } - for (deb = 0; deb < debnext; deb++, deba++) { - //gp_fillRect(frameBuffer1, 0, (243 - (DEBUG_MAX * 8) - 4) + 8 * deba, 320, 8, 0); - gp_textOut(frameBuffer1, 0, (240 - (DEBUG_MAX * 8) - 4) + 8 * deba, debline[deb], 0xFFFF); - } - -// gp_delay(100); -} - -//////////////////// -//String functions -char *gp_strcpy(char *dst, const char *src) { - char *pDst = dst; - - while (*pDst++ = *src++) - ; - - return dst; -} - -char *gp_strncpy(char *dst, const char *src, size_t count) { - char *start = dst; - - while (count && (*dst++ = *src++)) - count--; - - if (count) - while (--count) - *dst++ = '\0'; - - return start; -} - -char *gp_strcat(char *dst, const char *src) { - char *pDst = dst; - - while (*pDst) - pDst++; - - while (*pDst++ = *src++) - ; - - return dst; - -} - -char *gp_strdup(const char *str) { - char *memory; - - if (!str) - return NULL; - - if (memory = (char *)gp_malloc(strlen(str) + 1)) - return gp_strcpy(memory, str); - - return NULL; -} - -int gp_strcasecmp(const char *dst, const char *src) { - int f, l; - do { - f = tolower((unsigned char)(*(dst++))); - l = tolower((unsigned char)(*(src++))); - } while (f && (f == l)); - - return f - l; -} - -int gp_strncasecmp(const char *dst, const char *src, size_t count) { - int f,l; - - if (count) { - do { - f = tolower((unsigned char)(*(dst++))); - l = tolower((unsigned char)(*(src++))); - } while (--count && f && (f == l)); - return f - l; - } - - return 0; -} - -//FIXME: Handle LONG string -void gp_sprintf(char *str, const char *fmt, ...) { - char s[512]; - va_list marker; - - va_start(marker, fmt); - vsnprintf(s, 512, fmt, marker); - va_end(marker); - - gp_strcpy(str, s); -} - -int gp_printf(const char *fmt, ...) { - char s[256]; - va_list marker; - - va_start(marker, fmt); - vsnprintf(s, 256, fmt, marker); - va_end(marker); - - _dprintf("%s", s); - //gp_delay(100); - return 0; -} - -void gp_delay(uint32 msecs) { - int startTime = GpTickCountGet(); - while (GpTickCountGet() < startTime + msecs); -} - -void gp_clockSpeedChange(int freq, int magic, int div) { - #define rTCFG0 (*(volatile unsigned *)0x15100000) - #define rTCFG1 (*(volatile unsigned *)0x15100004) - #define rTCNTB4 (*(volatile unsigned *)0x1510003c) - unsigned int pclk; - unsigned int prescaler0; - - // Change CPU Speed - GpClockSpeedChange(freq, magic, div); - pclk = GpPClkGet(); - - // Repair SDK timer - it forgets to set prescaler - prescaler0 = (pclk / (8000 * 40)) - 1; - rTCFG0 = (rTCFG0 & 0xFFFFFF00) | prescaler0; - rTCFG1 = 0x30033; - - // Repair GpTickCountGet - rTCNTB4 = pclk / 1600; -} - -void gp_setCpuSpeed(int freq) { - // Default value for 40 mhz - static int CLKDIV = 0x48013; - static int MCLK = 40000000; - static int CLKMODE = 0; - static int HCLK = 40000000; - static int PCLK = 40000000; - - switch (freq) { - // overclocked - case 168: { CLKDIV = 0x14000; MCLK = 168000000; CLKMODE = 3; break; } - case 172: { CLKDIV = 0x23010; MCLK = 172000000; CLKMODE = 3; break; } - case 176: { CLKDIV = 0x24010; MCLK = 176000000; CLKMODE = 3; break; } - case 180: { CLKDIV = 0x16000; MCLK = 180000000; CLKMODE = 3; break; } - case 184: { CLKDIV = 0x26010; MCLK = 184000000; CLKMODE = 3; break; } - case 188: { CLKDIV = 0x27010; MCLK = 188000000; CLKMODE = 3; break; } - case 192: { CLKDIV = 0x18000; MCLK = 192000000; CLKMODE = 3; break; } - case 196: { CLKDIV = 0x29010; MCLK = 196000000; CLKMODE = 3; break; } - case 200: { CLKDIV = 0x2A010; MCLK = 200000000; CLKMODE = 3; break; } - case 204: { CLKDIV = 0x2b010; MCLK = 204000000; CLKMODE = 3; break; } - case 208: { CLKDIV = 0x2c010; MCLK = 208000000; CLKMODE = 3; break; } - case 212: { CLKDIV = 0x2d010; MCLK = 212000000; CLKMODE = 3; break; } - case 216: { CLKDIV = 0x2e010; MCLK = 216000000; CLKMODE = 3; break; } - case 220: { CLKDIV = 0x2f010; MCLK = 220000000; CLKMODE = 3; break; } - case 224: { CLKDIV = 0x30010; MCLK = 224000000; CLKMODE = 3; break; } - case 228: { CLKDIV = 0x1e000; MCLK = 228000000; CLKMODE = 3; break; } - case 232: { CLKDIV = 0x32010; MCLK = 232000000; CLKMODE = 3; break; } - case 236: { CLKDIV = 0x33010; MCLK = 236000000; CLKMODE = 3; break; } - case 240: { CLKDIV = 0x20000; MCLK = 240000000; CLKMODE = 3; break; } - case 244: { CLKDIV = 0x35010; MCLK = 244000000; CLKMODE = 3; break; } - case 248: { CLKDIV = 0x36010; MCLK = 248000000; CLKMODE = 3; break; } - case 252: { CLKDIV = 0x22000; MCLK = 252000000; CLKMODE = 3; break; } - case 256: { CLKDIV = 0x38010; MCLK = 256000000; CLKMODE = 3; break; } - - // normal -// case 166: { CLKDIV = 0x4B011; MCLK = 166000000; CLKMODE = 3; break; } - case 166: { CLKDIV = 0x2f001; MCLK = 165000000; CLKMODE = 3; break; } - case 164: { CLKDIV = 0x4a011; MCLK = 164000000; CLKMODE = 3; break; } - case 160: { CLKDIV = 0x48011; MCLK = 160000000; CLKMODE = 3; break; } - case 156: { CLKDIV = 0x2c001; MCLK = 156000000; CLKMODE = 3; break; } - case 144: { CLKDIV = 0x28001; MCLK = 144000000; CLKMODE = 3; break; } - case 133: { CLKDIV = 0x51021; MCLK = 133500000; CLKMODE = 2; break; } - case 132: { CLKDIV = 0x3a011; MCLK = 132000000; CLKMODE = 3; break; } - case 120: { CLKDIV = 0x24001; MCLK = 120000000; CLKMODE = 2; break; } - case 100: { CLKDIV = 0x2b011; MCLK = 102000000; CLKMODE = 2; break; } - case 66: { CLKDIV = 0x25002; MCLK = 67500000; CLKMODE = 2; break; } - case 50: { CLKDIV = 0x2a012; MCLK = 50000000; CLKMODE = 0; break; } -// case 40: { CLKDIV = 0x48013; MCLK = 40000000; CLKMODE = 0; break; } - case 40: { CLKDIV = 0x48013; MCLK = 40000000; CLKMODE = 1; break; } -// case 33: { CLKDIV = 0x25003; MCLK = 33750000; CLKMODE = 0; break; } - case 33: { CLKDIV = 0x25003; MCLK = 33750000; CLKMODE = 2; break; } - case 22: { CLKDIV = 0x33023; MCLK = 22125000; CLKMODE = 0; break; } - default: - error("Invalid CPU frequency!"); - } - if (CLKMODE == 0) { HCLK = MCLK; PCLK = MCLK; } - if (CLKMODE == 1) { HCLK = MCLK; PCLK = MCLK / 2; } - if (CLKMODE == 2) { HCLK = MCLK / 2; PCLK = MCLK / 2; } - if (CLKMODE == 3) { HCLK = MCLK / 2; PCLK = MCLK / 4; } - - gp_clockSpeedChange(MCLK, CLKDIV, CLKMODE); -} - -void gp_Reset() { - gp_setCpuSpeed(66); - asm volatile("swi #4\n"); -} - -void gp_exit(int code) { - if (!code) { - printf(" ----------------------------------------"); - printf(" Your GP32 is now restarting... "); - printf(" ----------------------------------------"); - printf(""); - - gp_delay(3000); - - GpAppExit(); - } else { - printf("Exit Code %d", code); - while (1); - } -} - -// Debug functions -void GPDEBUG(const char *fmt, ...) { - char s[256]; - va_list marker; - - va_start(marker, fmt); - vsnprintf(s, 256, fmt, marker); - va_end(marker); - - _dprintf("%s", s); -} - -void NP(const char *fmt, ...) { -// return; - char s[256]; - va_list marker; - - va_start(marker, fmt); - vsnprintf(s, 256, fmt, marker); - va_end(marker); - - _dprintf("NP:%s", s); - gp_delay(50); -} - -void LP(const char *fmt, ...) { -// return; - char s[256]; - va_list marker; - - va_start(marker, fmt); - vsnprintf(s, 256, fmt, marker); - va_end(marker); - - _dprintf("LP:%s", s); - gp_delay(300); -} - -void SP(const char *fmt, ...) { -// return; - char s[256]; - va_list marker; - - va_start(marker, fmt); - vsnprintf(s, 256, fmt, marker); - va_end(marker); - - _dprintf("SP:%s", s); - gp_delay(50); -} - -void BP(const char *fmt, ...) { -// return; - char s[256]; - va_list marker; - - va_start(marker, fmt); - vsnprintf(s, 256, fmt, marker); - va_end(marker); - - _dprintf("BP:%s", s); - gp_delay(2000); -} diff --git a/backends/platform/gp32/gp32std.h b/backends/platform/gp32/gp32std.h deleted file mode 100644 index 746b096d29..0000000000 --- a/backends/platform/gp32/gp32std.h +++ /dev/null @@ -1,61 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef __GP32STD_H -#define __GP32STD_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#define LCD_WIDTH 320 -#define LCD_HEIGHT 240 - -extern char * gp_strcpy(char *dst, const char *src); -extern char * gp_strncpy(char *dst, const char *src, size_t count); -extern char * gp_strcat(char *dst, const char *src); -extern char * gp_strdup(const char *str); -extern int gp_strcasecmp(const char *dst, const char *src); -extern int gp_strncasecmp(const char *dst, const char *src, size_t count); -extern void gp_sprintf(char *str, const char *fmt, ...); - -extern void gp_setCpuSpeed(int freq); -extern int gp_printf(const char *fmt, ...); -extern void gp_delay(unsigned long msecs); -extern void gp_exit(int code); - -extern void GPDEBUG(const char *fmt, ...); -extern void LP(const char *fmt, ...); -extern void NP(const char *fmt, ...); -extern void SP(const char *fmt, ...); -extern void BP(const char *fmt, ...); - -#endif diff --git a/backends/platform/gp32/gp32std_file.cpp b/backends/platform/gp32/gp32std_file.cpp deleted file mode 100644 index 6c7076c4d4..0000000000 --- a/backends/platform/gp32/gp32std_file.cpp +++ /dev/null @@ -1,320 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - - -#include "common/scummsys.h" -//#include "graphics/scaler.h" -#include "common/system.h" - -#include "gp32std.h" -#include "gp32std_file.h" - -FILE *gp_stderr = NULL; -FILE *gp_stdout = NULL; -FILE *gp_stdin = NULL; - -// Cache Idea / Code borrowed from the ps2 port -#define USE_CACHE - -////////////////// -//File functions - - -// CACHE -inline bool gp_cacheInPos(GPFILE *stream) { - return (stream->cachePos <= stream->filePos && stream->filePos < stream->cachePos + stream->bytesInCache); -} - -int gp_cacheMiss(GPFILE *stream) { - unsigned long readcount = 0; - - int copyLen = stream->fileSize - stream->filePos; - if (copyLen > FCACHE_SIZE) - copyLen = FCACHE_SIZE; - - stream->cachePos = stream->filePos; - stream->cacheBufOffs = 0; - stream->bytesInCache = copyLen; - - ERR_CODE err = GpFileRead(stream->handle, stream->cacheData, copyLen, &readcount); - - stream->physFilePos += copyLen; - - return err; -} - -int gp_flushWriteCache(GPFILE *stream) { - if (stream->bytesInCache == 0) - return 0; - - ERR_CODE err = GpFileWrite(stream->handle, stream->cacheData, stream->bytesInCache); // flush cache - - stream->filePos += stream->bytesInCache; - stream->physFilePos += stream->bytesInCache; - stream->bytesInCache = 0; - - return err; -} - -/////////////////////////////////////////////////////////////// - -GPFILE *gp_fopen(const char *fileName, const char *openMode) { - uint32 mode; - GPFILE *file; - ERR_CODE err; - char tempPath[256]; - - if (!strchr(fileName, '.')) { - sprintf(tempPath, "%s.", fileName); - fileName = tempPath; - } - - file = new GPFILE; - -// NP("%s(\"%s\", \"%s\")", __FUNCTION__, fileName, openMode); - - // FIXME add binary/text support - if (tolower(openMode[0]) == 'r') { - mode = OPEN_R; - GpFileGetSize(fileName, &file->fileSize); - err = GpFileOpen(fileName, mode, &file->handle); - } else if (tolower(openMode[0]) == 'w') { - file->fileSize = 0; - mode = OPEN_W; - err = GpFileCreate(fileName, ALWAYS_CREATE, &file->handle); - } else if (tolower(openMode[0]) == 'a') { - warning("We do not support 'a' file open mode."); - delete file; - return NULL; - } else { - error("wrong file mode"); - } - - if (!file) { - error("%s: cannot create FILE structure", __FUNCTION__); - } - - if (err) { - printf("gp_fopen(): IO error %d", err); - delete file; - return NULL; - } - - file->mode = mode; - file->cachePos = 0; - file->filePos = 0; - file->cacheBufOffs = 0; - file->physFilePos = 0; - file->bytesInCache = 0; - - return file; -} - -int gp_fclose(GPFILE *stream) { - if (!stream) { - //warning("closing null file"); - return 1; - } - -/* if (*(uint32 *)((char *)stream - sizeof(uint32)) == 0x4321) { - debug(0, "Double closing", __FUNCTION__); - return 1; - } -*/ - -#ifdef USE_CACHE - if (stream->bytesInCache && stream->mode == OPEN_W) { - gp_flushWriteCache(stream); - } -#endif - - ERR_CODE err = GpFileClose(stream->handle); - delete stream; - - return err; -} - -int gp_fseek(GPFILE *stream, long offset, int whence) { - switch (whence) { - case SEEK_SET: - whence = FROM_BEGIN; - break; - case SEEK_CUR: - whence = FROM_CURRENT; - break; - case SEEK_END: - whence = FROM_END; - break; - } - - ERR_CODE err; -#ifdef USE_CACHE - // need to flush cache - if (stream->mode == OPEN_W) { // write - gp_flushWriteCache(stream); - err = GpFileSeek(stream->handle, whence, offset, (long *)&stream->filePos); - } else { // read - if (whence == SEEK_CUR) - offset += stream->physFilePos - stream->filePos; - - err = GpFileSeek(stream->handle, whence, offset, (long *)&stream->physFilePos); - stream->filePos = stream->physFilePos; - - if (!gp_cacheInPos(stream)) { // cache miss - gp_cacheMiss(stream); - } - } -#endif - - return 1; - //return 0; //FIXME? -} - -size_t gp_fread(void *ptr, size_t size, size_t n, GPFILE *stream) { - unsigned int len = size * n; - uint8 *dest = (uint8 *)ptr; - -#ifdef USE_CACHE - while (len && !gp_feof(stream)) { - if (gp_cacheInPos(stream)) { - uint32 startPos = (stream->cacheBufOffs + (stream->filePos - stream->cachePos)) % FCACHE_SIZE; - uint32 copyLen = stream->bytesInCache - (stream->filePos - stream->cachePos); - if (copyLen > len) - copyLen = len; - if (startPos + copyLen > FCACHE_SIZE) - copyLen = FCACHE_SIZE - startPos; - - memcpy(dest, stream->cacheData + startPos, copyLen); - - stream->filePos += copyLen; - dest += copyLen; - len -= copyLen; - } else { // cache miss or cache empty - gp_cacheMiss(stream); - } - } -#else - ulong readcount = 0; - ERR_CODE err = GpFileRead(stream->handle, ptr, len, &readcount); - stream->physFilePos += len; - stream->filePos += len; -#endif - - // FIXME: Fingolfin asks: why is there a FIXME here? Please either clarify what - // needs fixing, or remove it! - return 1; //readcount / size; //FIXME -} - -size_t gp_fwrite(const void *ptr, size_t size, size_t n, GPFILE *stream) { - int len = size * n; - uint8 *srcBuf = (uint8 *)ptr; - - if (!stream) { - //warning("writing to null file"); - return 0; - } - -#ifdef USE_CACHE - while (len) { - uint32 copyLen; - if (stream->bytesInCache + len > FCACHE_SIZE) - copyLen = FCACHE_SIZE - stream->bytesInCache; - else - copyLen = len; - - srcBuf += copyLen; - len -= copyLen; - - if (stream->bytesInCache == FCACHE_SIZE) { - gp_flushWriteCache(stream); - } - } -#else - ERR_CODE err = GpFileWrite(stream->handle, ptr, len); - if (!err) - return n; - else - return -err; -#endif - return 1; -} - -long gp_ftell(GPFILE *stream) { - ulong pos = 0; - pos = stream->filePos; - //ERR_CODE err = GpFileSeek(stream->handle, FROM_CURRENT, 0, (long*)&pos); - return pos; -} - -void gp_clearerr(GPFILE *stream) -{ -} - -int gp_feof(GPFILE *stream) { - return (unsigned long)gp_ftell(stream) >= stream->fileSize; -} - -char gp_fgetc(GPFILE *stream) { - char c[1]; - - gp_fread(&c[0], 1, 1, stream); - return c[0]; -} - -char *gp_fgets(char *s, int n, GPFILE *stream) { - int i = 0; - - while (!gp_feof(stream) && i < n) { - gp_fread(&s[i], 1, 1, stream); - if (s[i] == '\n') { - s[i + 1] = 0; - return s; - } - i++; - } - if (gp_feof(stream)) - return NULL; - else - return s; -} - -int gp_fprintf(GPFILE *stream, const char *fmt, ...) { - char s[256]; - va_list marker; - - va_start(marker, fmt); - vsnprintf(s, 256, fmt, marker); - va_end(marker); - - return gp_fwrite(s, 1, strlen(s), stream); -} - -int gp_fflush(GPFILE *stream) { - return 0; -} - -int gp_ferror(GPFILE *stream) { - return 0; -} diff --git a/backends/platform/gp32/gp32std_file.h b/backends/platform/gp32/gp32std_file.h deleted file mode 100644 index a515a63590..0000000000 --- a/backends/platform/gp32/gp32std_file.h +++ /dev/null @@ -1,61 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef __GP32STD_FILE_H -#define __GP32STD_FILE_H - -#define FCACHE_SIZE 8 * 1024 - -typedef struct { - F_HANDLE handle; - unsigned long mode; - unsigned long fileSize; - unsigned long filePos; - unsigned long physFilePos; - unsigned long cachePos; - unsigned long cacheBufOffs; - unsigned long bytesInCache; - unsigned char cacheData[FCACHE_SIZE]; -} GPFILE; - -extern GPFILE *gp_stderr; -extern GPFILE *gp_stdout; -extern GPFILE *gp_stdin; - -extern GPFILE * gp_fopen(const char *filename, const char *mode); -extern int gp_fclose(GPFILE *stream); -extern int gp_fseek(GPFILE *stream, long offset, int whence); -extern size_t gp_fread(void *ptr, size_t size, size_t n, GPFILE *stream); -extern size_t gp_fwrite(const void *ptr, size_t size, size_t n, GPFILE *stream); -extern long gp_ftell(GPFILE *stream); -extern void gp_clearerr(GPFILE *stream); -extern int gp_feof(GPFILE *stream); -extern char gp_fgetc(GPFILE *stream); -extern char * gp_fgets(char *s, int n, GPFILE *stream); -extern int gp_fflush(GPFILE *stream); -extern int gp_ferror(GPFILE *stream); -extern int gp_fprintf(GPFILE *stream, const char *fmt, ...); - -#endif diff --git a/backends/platform/gp32/gp32std_grap.cpp b/backends/platform/gp32/gp32std_grap.cpp deleted file mode 100644 index a60f61c66b..0000000000 --- a/backends/platform/gp32/gp32std_grap.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/scummsys.h" -#include "common/system.h" - -#include "gp32std.h" -#include "gp32std_grap.h" - -#include "globals.h" - -GPDRAWSURFACE lcdSurface[2]; - -uint8 flipIndex = 1; - -uint16 *frameBuffer1; -uint16 *frameBuffer2; - -uint8 gammaLUT[256]; -uint8 gammaLUTInv[256]; - -extern const unsigned char fontresEng1[]; -extern const unsigned char fontresKor1[]; - -void gp_putBitmap8x16(uint16 *frameBuffer, int x, int y, byte *lpBitmap, uint16 wColor) { - byte *pBitmap = lpBitmap; - for (int nRow = 0; nRow < 12; nRow ++) { - byte data = *pBitmap++; - for (int nCol = 0; nCol < 7; nCol ++) { - if (data & 0x80) - if (x + nCol >= 0 && y + nRow >= 0 && x + nCol < 320 && y + nRow < 240) - gpd_drawPixel16(frameBuffer, x + nCol, y + nRow, wColor); - - data <<= 1; - } - } -} - -void gp_putEngFont(uint16 *frameBuffer, int x, int y, char c, uint16 wColor) { - byte *pBitmap = (byte *) &fontresEng1[c * 16]; - gp_putBitmap8x16(frameBuffer, x, y, pBitmap, wColor); -} - -void gp_textOut(uint16 *frameBuffer, int x, int y, char* lpszText, uint16 wColor) { - // TODO: Handle korean font - int nPos = x; - char* pszText = lpszText; - - while (*pszText != '\0') { - if (*pszText == '\n') { - nPos = x; - y += 8; - } else { - gp_putEngFont(frameBuffer, nPos, y, *pszText, wColor); - nPos += 7; - } - - pszText++; - } -} - -void gp_fillRect(uint16 *frameBuffer, int16 x, int16 y, int16 w, int16 h, uint16 color) { - uint16 *buffer = &frameBuffer[(240 - (y + h)) + (240 * x)]; - for (int i = 0; i < w; i++) { - for (int j = 0; j < h; j++) { - *buffer++ = color; - } - buffer += 240 - h; - } -} - -void gp_initGammaTable(float value) -{ - for (int i = 0; i < 256; i++) { - if (value == 1.0f) { - gammaLUT[i] = i; - gammaLUTInv[i] = i; - } else { - gammaLUT[i] = (uint8)(pow((double)i / 256, 1 / (double)value) * 256); - gammaLUTInv[i] = (uint8)(pow((double)i / 256, (double)value) * 256); - } - } -} - -uint16 gp_RGBTo16(uint16 r, uint16 g, uint16 b) { - // GP32 16bit color 5551 - if (g_vars.gammaRamp != 10000) { - r = gammaLUT[r]; - g = gammaLUT[g]; - b = gammaLUT[b]; - } - return (((r >> 3) & 0x1F) << 11) | (((g >> 3) & 0x1F) << 6) | ((b >> 3) & 0x1F) << 1; -} - -void gp_16ToRGB(uint16 color, uint8 *r, uint8 *g, uint8 *b) { - *r = ((((color) >> 11) & 0x1F) << 3); - *g = ((((color) >> 6) & 0x1F) << 3); //(((color>>5)&0x3F) << 2); - *b = ((((color) >> 1) & 0x1F) << 3); //((color&0x1F) << 3); - - if (g_vars.gammaRamp != 10000) { - *r = gammaLUTInv[*r]; - *g = gammaLUTInv[*g]; - *b = gammaLUTInv[*b]; - } -} - -void gp_flipScreen() { - uint16 *frameBuffer1_old = frameBuffer1; - uint16 *frameBuffer2_old = frameBuffer2; - - GpSurfaceFlip(&lcdSurface[flipIndex]); - flipIndex = 1 - flipIndex; - frameBuffer1 = frameBuffer2_old; - frameBuffer2 = frameBuffer1_old; -} - -void gp_initFrameBuffer() { - GpLcdSurfaceGet(&lcdSurface[0], 0); - GpLcdSurfaceGet(&lcdSurface[1], 1); - GpSurfaceSet(&lcdSurface[0]); - frameBuffer1 = (uint16 *)lcdSurface[0].ptbuffer; - frameBuffer2 = (uint16 *)lcdSurface[1].ptbuffer; - - memset(frameBuffer1, 0xFF, LCD_WIDTH * LCD_HEIGHT * sizeof(uint16)); - memset(frameBuffer2, 0xFF, LCD_WIDTH * LCD_HEIGHT * sizeof(uint16)); -} diff --git a/backends/platform/gp32/gp32std_grap.h b/backends/platform/gp32/gp32std_grap.h deleted file mode 100644 index 79bc312779..0000000000 --- a/backends/platform/gp32/gp32std_grap.h +++ /dev/null @@ -1,47 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef __GP32STD_GRAP_H -#define __GP32STD_GRAP_H - -extern GPDRAWSURFACE lcdSurface[2]; -extern uint8 flipIndex; - -extern uint16 *frameBuffer1; -extern uint16 *frameBuffer2; - -extern void gp_fillRect(uint16 *frameBuffer, int16 x, int16 y, int16 w, int16 h, uint16 color); -extern uint16 gp_RGBTo16(uint16 r, uint16 g, uint16 b); -extern void gp_16ToRGB(uint16 color, uint8 *r, uint8 *g, uint8 *b); - -extern void gp_textOut(uint16 *frameBuffer, int x, int y, char* lpszText, uint16 wColor); - -extern void gp_initGammaTable(float value); -extern void gp_initFrameBuffer(); -extern void gp_flipScreen(); - -#define gpd_drawPixel16(dst,x,y,color) (dst)[(239 - (y)) + (240 * (x))] = (color) - -#endif diff --git a/backends/platform/gp32/gp32std_input.cpp b/backends/platform/gp32/gp32std_input.cpp deleted file mode 100644 index 41689d9472..0000000000 --- a/backends/platform/gp32/gp32std_input.cpp +++ /dev/null @@ -1,210 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/scummsys.h" - -#include "gp32std.h" -#include "gp32std_input.h" - -static uint32 buttonState = 0; -static uint16 buttonPressState = 0; - -#define GET_BUTTON_PRESSED(a) (buttonPressState & (a)) -#define ON_BUTTON_PRESSED(a) (buttonPressState |= (a)) -#define OFF_BUTTON_PRESSED(a) (buttonPressState &= ~(a)) - -#define GET_BUTTON_DOWN(a) (buttonState & (a) << 12) -#define ON_BUTTON_DOWN(a) buttonState |= ((a) << 12) -#define OFF_BUTTON_DOWN(a) buttonState &= ~((a) << 12) - -#define GET_BUTTON_UP(a) (buttonState & (a)) -#define ON_BUTTON_UP(a) buttonState |= (a) -#define OFF_BUTTON_UP(a) buttonState &= ~(a) - -#define rKEY_A 0x4000 -#define rKEY_B 0x2000 -#define rKEY_L 0x1000 -#define rKEY_R 0x8000 -#define rKEY_UP 0x0800 -#define rKEY_DOWN 0x0200 -#define rKEY_LEFT 0x0100 -#define rKEY_RIGHT 0x0400 -#define rKEY_START 0x0040 -#define rKEY_SELECT 0x0080 -#define rPBDAT (*(volatile unsigned *)0x1560000c) -#define rPEDAT (*(volatile unsigned *)0x15600030) - -/**************************************************************** - GP32 Input mappings - Returns Button Pressed. -****************************************************************/ -int gp_trapKey() { - int value = 0; - - unsigned long gpb = rPBDAT; // 0x156 - unsigned long gpe = rPEDAT; - - if ((gpb & rKEY_LEFT) == 0) - value |= GPC_VK_LEFT; - if ((gpb & rKEY_RIGHT) == 0) - value |= GPC_VK_RIGHT; - if ((gpb & rKEY_UP) == 0) - value |= GPC_VK_UP; - if ((gpb & rKEY_DOWN) == 0) - value |= GPC_VK_DOWN; - if ((gpb & rKEY_A) == 0) - value |= GPC_VK_FA; - if ((gpb & rKEY_B) == 0) - value |= GPC_VK_FB; - if ((gpb & rKEY_L) == 0) - value |= GPC_VK_FL; - if ((gpb & rKEY_R) == 0) - value |= GPC_VK_FR; - if ((gpe & rKEY_SELECT) == 0) - value |= GPC_VK_SELECT; - if ((gpe & rKEY_START) == 0) - value |= GPC_VK_START; - - return value; -} - -bool gp_getButtonEvent(uint32 *nKeyUD, uint16 *nKeyP) { -// int nKey = GpKeyGet(); - int nKey = gp_trapKey(); - - const int keyBitMask[10] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200}; - - for (int i = 0; i < 10; i++) { - OFF_BUTTON_DOWN(keyBitMask[i]); - OFF_BUTTON_UP(keyBitMask[i]); - if (nKey & keyBitMask[i]) { - if (!GET_BUTTON_PRESSED(keyBitMask[i])) { -// GPDEBUG("DOWN %d", i); - ON_BUTTON_PRESSED(keyBitMask[i]); - ON_BUTTON_DOWN(keyBitMask[i]); - } - } else { - if (GET_BUTTON_PRESSED(keyBitMask[i])) { -// GPDEBUG("UP %d", i); - OFF_BUTTON_PRESSED(keyBitMask[i]); - ON_BUTTON_UP(keyBitMask[i]); - } - } - } - -// GPDEBUG("%08x %04x", buttonState, buttonPressState); - *nKeyUD = buttonState; - *nKeyP = buttonPressState; - return true; -} - -#define MAX_EVENTS 32 - -struct EventQueue { -protected: - int front, rear; - int numElement; - GP32BtnEvent event[MAX_EVENTS]; - -public: - void push(GP32BtnEvent *ev) { - if ((rear + 1) % MAX_EVENTS == front) { - GPDEBUG("Queue Overflow!"); - return; - } - numElement++; - - event[rear].type = ev->type; - event[rear].button = ev->button; - rear = (rear + 1) % MAX_EVENTS; - } - - bool isEmpty() { - return (numElement == 0); - } - - bool isFull() { - return (numElement == MAX_EVENTS); - } - - bool get(GP32BtnEvent *ev) { - if (front == rear) { - return false; - } - numElement--; - ev->type = event[front].type; - ev->button = event[front].button; - front = (front + 1) % MAX_EVENTS; - return true; - } -}; - -EventQueue eventQueue; - -bool gp_pumpButtonEvent() { - int nKey = gp_trapKey(); - GP32BtnEvent ev; - - const int keyBitMask[10] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x100, 0x200}; - - for (int i = 0; i < 10; i++) { - if (nKey & keyBitMask[i]) { - if (!GET_BUTTON_PRESSED(keyBitMask[i])) { - ON_BUTTON_PRESSED(keyBitMask[i]); - ev.type = BUTTON_DOWN; - ev.button = keyBitMask[i]; - eventQueue.push(&ev); - //ON_BUTTON_DOWN(keyBitMask[i]); - } - } else { - if (GET_BUTTON_PRESSED(keyBitMask[i])) { - OFF_BUTTON_PRESSED(keyBitMask[i]); - ev.type = BUTTON_UP; - ev.button = keyBitMask[i]; - eventQueue.push(&ev); - //ON_BUTTON_UP(keyBitMask[i]); - } - } - } - - return true; -} - -bool gp_pollButtonEvent(GP32BtnEvent *ev) { - gp_pumpButtonEvent(); - - if (eventQueue.isEmpty()) { - return false; - } - - eventQueue.get(ev); -// GPDEBUG("Event poll %d %d", ev->type, ev->button); - - return true; -} - -bool gp_getButtonPressed(uint16 button) -{ - return buttonPressState & button; -} diff --git a/backends/platform/gp32/gp32std_input.h b/backends/platform/gp32/gp32std_input.h deleted file mode 100644 index bd784d3432..0000000000 --- a/backends/platform/gp32/gp32std_input.h +++ /dev/null @@ -1,53 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef __GP32STD_INPUT_H -#define __GP32STD_INPUT_H - -#include "common/scummsys.h" - -#define BUTTON_DOWN 1 -#define BUTTON_UP 2 - -struct GP32BtnEvent { - uint16 type; - uint16 button; -}; - -extern int gp_trapKey(); - -extern bool gp_getButtonEvent(uint32 *nKeyUD, uint16 *nKeyP); - -#define gpd_getEventDown(a) (((a) >> 12) & 0x0fff) -#define gpd_getEventUp(a) ((a) & 0x0fff) -#define gpd_getEventPressed(a) ((a) & 0x0fff) -#define gpd_getButtonDown(a,button) ((a) & (button) << 12) -#define gpd_getButtonUp(a,button) ((a) & (button)) -#define gpd_getButtonPressed(a,button) ((a) & (button)) - -extern bool gp_pollButtonEvent(GP32BtnEvent *ev); -extern bool gp_getButtonPressed(uint16 button); - -#endif diff --git a/backends/platform/gp32/gp32std_memory.cpp b/backends/platform/gp32/gp32std_memory.cpp deleted file mode 100644 index 9d7ef9a124..0000000000 --- a/backends/platform/gp32/gp32std_memory.cpp +++ /dev/null @@ -1,318 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/scummsys.h" -//#include "graphics/scaler.h" -#include "common/system.h" - -#include "engines/engine.h" - -#include "gp32std.h" -#include "gp32std_grap.h" -#include "gp32std_memory.h" - -///////////////////// -//Memory management - -#define USER_MEMORY_SIZE (256 * 1024) -#define USER_BLOCK_SIZE 24 -#define NUM_BLOCK (USER_MEMORY_SIZE / USER_BLOCK_SIZE) -// use fixed block size for small allocations -// consumes about 128k for block array -// consumes 256k for user memory - -class MemBlock { -protected: - static byte *userMem; -// static size_t allocSize; -// static MemBlock *head; - static int numBlock; - static int prevBlock; - - // Linked list is slow for this task. :) - static MemBlock *block; - - byte *blockData; - size_t size; - -// MemBlock *next; - - int used; - -public: - static void init(); - static void deinit(); - - static void *addBlock(size_t size); - static void deleteBlock(void *dstBlock); -}; - -byte *MemBlock::userMem = NULL; -//MemBlock *MemBlock::head = NULL; -//size_t MemBlock::allocSize = 0; -int MemBlock::numBlock = 0; -int MemBlock::prevBlock = 0; -MemBlock *MemBlock::block = NULL; - -void MemBlock::init() -{ - userMem = (byte *)gm_malloc(USER_MEMORY_SIZE + USER_BLOCK_SIZE); - block = (MemBlock *)gm_malloc(NUM_BLOCK * sizeof(MemBlock)); - - if (!(userMem && block)) { - //error - } - - memset(userMem, 0, USER_MEMORY_SIZE + USER_BLOCK_SIZE); - memset(block, 0, NUM_BLOCK * sizeof(MemBlock)); -} - -void MemBlock::deinit() -{ - if (!(userMem && block)) { - //error - } - gm_free(userMem); - gm_free(block); - userMem = NULL; - block = NULL; -} - -void *MemBlock::addBlock(size_t size) -{ - int i; - MemBlock *blk = &block[prevBlock]; - - // some optimizaion with loop - for (i = prevBlock; i < NUM_BLOCK; i++) { - if (!blk->used) { - break; - } - blk++; - } - if (i == NUM_BLOCK) { - blk = &block[0]; - for (i = 0; i < prevBlock; i++) { - if (!blk->used) { - break; - } - blk++; - } - if (i == prevBlock) { - prevBlock = 0; - return gm_malloc(size); - } - } - - byte *ptr = userMem + (i * USER_BLOCK_SIZE); - - blk->size = size; - blk->blockData = ptr; - blk->used = 1; - - prevBlock = i; - - return (void *) ptr; -} - -void MemBlock::deleteBlock(void *dstBlock) -{ - // Faster method - uint32 np = (uint32) dstBlock - (uint32) userMem; - - if ((np / USER_BLOCK_SIZE) * USER_BLOCK_SIZE != np) { - gm_free(dstBlock); -// warning("wrong block! (%d / %d)", (np / USER_BLOCK_SIZE) * USER_BLOCK_SIZE, np); - return; - } - int i = np / USER_BLOCK_SIZE; - if (i > NUM_BLOCK) { - gm_free(dstBlock); - return; - } - block[i].used = 0; - -/* - int i = 0; - for (i = 0; i < NUM_BLOCK; i++) { - if (block[i].blockData == dstBlock) - break; - } - if (i == NUM_BLOCK) { - gm_free(dstBlock); //fixme? - //warning("wrong block! %x", (uint32)block - (uint32)userMem); - } else { - GPDEBUG("deleteing block %d", i); - block[i].used = 0; - }*/ -} - -// HACK not to include struct MemBlock -void memBlockInit() -{ - MemBlock::init(); -} - -void memBlockDeinit() -{ - MemBlock::deinit(); -} - -#undef memcpy -#undef memset -void *gp_memcpy(void *dst, const void *src, size_t count) { - return memcpy(dst, src, count); -} - -void *gp_memset(void *dst, int val, size_t count) { - return memset(dst, val, count); -} - -#define MALLOC_MASK 0xAB800000 - -// WE HAVE TO ALIGN MEMORY ADDRESS ON THE ARM PROCESSOR! -#define ALIGNED_SIZE(size) ((size) + (4 - ((size) & 3))) - -void *gp_malloc(size_t size) { - uint32 np; - uint32 *up; - - // size + 8 bytes : stores block size - int allocSize = ALIGNED_SIZE(size) + sizeof(uint32) + sizeof(uint32); - if (allocSize <= USER_BLOCK_SIZE) { - np = (uint32) MemBlock::addBlock(allocSize); - } else { - np = (uint32) gm_malloc(allocSize); - } - - if (np) { - up = (uint32 *)np; - *up = ALIGNED_SIZE(size) | MALLOC_MASK; // mem size: up to 8mb - up = (uint32 *)(np + ALIGNED_SIZE(size) + sizeof(uint32)); - *up = 0x1234; // catches oob acess - return (void *)(np + sizeof(uint32)); - } - - return NULL; -} - -void gp_free(void *block) { - uint32 np; - uint32 *up; - - if (!block) { - return; - } - - np = ((uint32) block) - sizeof(uint32); - up = (uint32 *) np; - if (*up == 0x4321) { - warning("%s: double deallocation", __FUNCTION__); - return; - } - - if (*up & MALLOC_MASK != MALLOC_MASK) { - warning("%s: corrupt block", __FUNCTION__); - return; - } - - int blockSize = (*up & 0x7fffff); - up = (uint32 *)(np + blockSize + sizeof(uint32)); - if (*up != 0x1234) { - warning("gp_free: corrupt block - OOB access", __FUNCTION__); - return; - } - - np = ((uint32) block) - sizeof(uint32); - up = (uint32 *) np; - *up = 0x4321; - - if (blockSize + 8 <= USER_BLOCK_SIZE) { - MemBlock::deleteBlock(up); - } else { - gm_free(up); - } -} - -void *gp_calloc(size_t nitems, size_t size) { - void *p = gp_malloc(nitems * size); //gpcalloc doesnt clear? - - gp_memset(p, 0, nitems * size); - -// if (*(uint8 *)p != 0) -// warning("%s: calloc doesn't clear", __FUNCTION__); //fixme: was error - - return p; -} - -////////////////////////////////////////////////// -// GP32 stuff -////////////////////////////////////////////////// -static char usedMemStr[16]; -int gUsedMem = 1024 * 1024; - -//#define CLEAN_MEMORY_WITH_0xE7 -//#define CHECK_USED_MEMORY -//#define CHECK_NEW_TIME -//#define CHECK_NEW_SIZE - -void *operator new(size_t size) { -#if defined(CHECK_NEW_TIME) - static int ftick; - ftick = GpTickCountGet(); -#endif -// printf("BP:operator new(%d)", size); - void *ptr = gp_malloc(size); - -#if defined(CLEAN_MEMORY_WITH_0xE7) - if (ptr != NULL) { - gp_memset(ptr, 0xE7, size); - } -#endif -#if defined(CHECK_USED_MEMORY) - // Check free memory. - gUsedMem = ((int)(ptr) + size) - 0xc000000; - - sprintf(usedMemStr, "%8d", gUsedMem); - gp_fillRect(frameBuffer1, 0, 0, 64, 12, 0); - gp_textOut(frameBuffer1, 0, 0, usedMemStr, 0xfffff); -#endif -#if defined(CHECK_NEW_TIME) - sprintf(usedMemStr, "%2d", GpTickCountGet() - ftick); - gp_fillRect(frameBuffer1, 72, 0, 24, 12, 0); - gp_textOut(frameBuffer1, 72, 0, usedMemStr, 0xfffff); -#endif -#if defined(CHECK_NEW_SIZE) - sprintf(usedMemStr, "%8d", size); - gp_fillRect(frameBuffer1, 108, 0, 64, 12, 0); - gp_textOut(frameBuffer1, 108, 0, usedMemStr, 0xfffff); -#endif - return ptr; -} - -void operator delete(void *ptr) { -// printf("operator delete(%x)", ptr); - gp_free(ptr); -} diff --git a/backends/platform/gp32/gp32std_memory.h b/backends/platform/gp32/gp32std_memory.h deleted file mode 100644 index b824e33838..0000000000 --- a/backends/platform/gp32/gp32std_memory.h +++ /dev/null @@ -1,35 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef __GP32STD_MEMORY_H -#define __GP32STD_MEMORY_H - -extern void * gp_memcpy(void *dst, const void *src, size_t count); -extern void * gp_memset(void *dst, int val, size_t count); -extern void * gp_malloc(size_t size); -extern void * gp_calloc(size_t nitems, size_t size); -extern void gp_free(void *block); - -#endif diff --git a/backends/platform/gp32/gp32std_sound.cpp b/backends/platform/gp32/gp32std_sound.cpp deleted file mode 100644 index 68b33b95f2..0000000000 --- a/backends/platform/gp32/gp32std_sound.cpp +++ /dev/null @@ -1,187 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "common/scummsys.h" - -#include "gp32std.h" -#include "gp32std_sound.h" - -#define GP32_TIMER_AUDIO_IDX 0 - -// Global variables -static volatile unsigned int frame = 0; -static volatile unsigned int *soundPos = 0; -static volatile int idx_buf; -static volatile unsigned int shiftVal = 0; -static void *buffer; -static GPSOUNDBUF soundBuf; - -// This routine gets called by the timer interrupt and -// polls the current playing position within the buffer. - -static void soundTimer() { - static int locked = false; - - if (locked) { - return; - } - - locked = true; - - unsigned int sampleshiftVal = soundBuf.samples << shiftVal; - unsigned int t = (((unsigned int)(*soundPos) - (unsigned int)buffer) >> shiftVal) >= soundBuf.samples ? 1 : 0; - if (t != frame) { - unsigned int offs = ((frame == 1) ? (sampleshiftVal) : 0); - //memset((uint8 *)buffer + offs, 0, sampleshiftVal); - soundBuf.callback(soundBuf.userdata, (uint8 *)((unsigned int)buffer + offs), sampleshiftVal); - frame = t; - { - // Play silence - register uint16 *d = (uint16 *)((uint8 *)buffer + offs); // alignment-safe - register uint32 max = (uint32)((uint8 *)buffer + offs + sampleshiftVal); - do { - *d++ ^= 0x8000; // 1 - *d++ ^= 0x8000; // 2 - *d++ ^= 0x8000; // 3 - *d++ ^= 0x8000; // 4 - *d++ ^= 0x8000; // 5 - *d++ ^= 0x8000; // 6 - *d++ ^= 0x8000; // 7 - *d++ ^= 0x8000; // 8 - *d++ ^= 0x8000; // 9 - *d++ ^= 0x8000; // 10 - *d++ ^= 0x8000; // 11 - *d++ ^= 0x8000; // 12 - *d++ ^= 0x8000; // 13 - *d++ ^= 0x8000; // 14 - *d++ ^= 0x8000; // 15 - *d++ ^= 0x8000; // 16 - *d++ ^= 0x8000; // 17 - *d++ ^= 0x8000; // 18 - *d++ ^= 0x8000; // 19 - *d++ ^= 0x8000; // 20 - *d++ ^= 0x8000; // 21 - *d++ ^= 0x8000; // 22 - *d++ ^= 0x8000; // 23 - *d++ ^= 0x8000; // 24 - *d++ ^= 0x8000; // 25 - *d++ ^= 0x8000; // 26 - *d++ ^= 0x8000; // 27 - *d++ ^= 0x8000; // 28 - *d++ ^= 0x8000; // 29 - *d++ ^= 0x8000; // 30 - *d++ ^= 0x8000; // 31 - *d++ ^= 0x8000; // 32 - } while ((uint32)d < max); - } - } - - locked = false; -} - -int gp_soundBufStart(GPSOUNDBUF *sb) { - int bufferSize = 0; - - PCM_SR gpFreq = PCM_S11; - PCM_BIT gpFormat = PCM_16BIT; - - frame = 0; - - // Copy the structure - memcpy(&soundBuf, sb, sizeof(GPSOUNDBUF)); - - // Calculate size of a single sample in bytes - // and a corresponding shift value - shiftVal = 0; - - switch (soundBuf.format) { - case 8: - gpFormat = PCM_8BIT; - break; - case 16: - gpFormat = PCM_16BIT; - shiftVal++; - break; - } - - switch (soundBuf.freq) { - case 11025: - if (soundBuf.channels == 2) { - gpFreq = PCM_S11; - shiftVal++; - } else - gpFreq = PCM_M11; - break; - case 22050: - if (soundBuf.channels == 2) { - gpFreq = PCM_S22; - shiftVal++; - } else - gpFreq = PCM_M22; - break; - case 44100: - if (soundBuf.channels == 2) { - gpFreq = PCM_S44; - shiftVal++; - } else - gpFreq = PCM_M44; - break; - } - - soundBuf.samplesize = 1 << shiftVal; - - // Allocate memory for the playing buffer - bufferSize = soundBuf.samplesize * soundBuf.samples * 2; - buffer = malloc(bufferSize); - - // Clear the buffer - uint16 *tmpBuf = (uint16 *)buffer; - for (int i = 0; i < bufferSize / 2; i++) - tmpBuf[i] = 0x8000; - - // Frequency of the timer interrupt which polls the playing position - // FIXME: This frequency should not be multiplied by 4. - soundBuf.pollfreq = 4 * (2 * soundBuf.freq) / soundBuf.samples; - - // Set timer interrupt - if (GpTimerOptSet(GP32_TIMER_AUDIO_IDX, soundBuf.pollfreq, 0, soundTimer) == GPOS_ERR_ALREADY_USED) { - GPDEBUG(" Timer is already used... kill timer"); - GpTimerKill(GP32_TIMER_AUDIO_IDX); - } - GpTimerSet(GP32_TIMER_AUDIO_IDX); - - GpPcmInit(gpFreq, gpFormat); - GpPcmPlay((unsigned short *)buffer, bufferSize, 1); - GpPcmLock((unsigned short *)buffer, (int *)&idx_buf, (unsigned int *)&soundPos); - - return 0; -} - -void gp_soundBufStop() { - GpTimerKill(GP32_TIMER_AUDIO_IDX); - GpPcmStop(); - GpPcmRemove((unsigned short *)buffer); - free(buffer); -} diff --git a/backends/platform/gp32/gp32std_sound.h b/backends/platform/gp32/gp32std_sound.h deleted file mode 100644 index ad3f18a17f..0000000000 --- a/backends/platform/gp32/gp32std_sound.h +++ /dev/null @@ -1,48 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef __GP32STD_SOUND_H -#define __GP32STD_SOUND_H - -// GPSOUNDBUF.userdata / Pointer to the buffer which needs to be refilled / Length of the buffer in bytes -typedef void SoundProc(void *param, byte *buf, int len); - -typedef struct TGPSOUNDBUF { - int32 freq; - uint16 format; - uint16 samples; // Buffer length (in samples) - uint16 channels; - uint16 padding; // Fix alignment problem - void *userdata; // Userdata which gets passed to the callback function - SoundProc *callback; // Callback function (just like in SDL) - unsigned int pollfreq; // Frequency of the timer interrupt which polls the playing position - // recommended value: 2*(playingfreq in Hz/GPSOUNDBUF.samples) - unsigned int samplesize; // Size of one sample (8bit mono->1, 16bit stereo->4) - don't touch this -} GPSOUNDBUF; - -int gp_soundBufStart(GPSOUNDBUF *sb); -void gp_soundBufStop(); - -#endif diff --git a/backends/platform/gp32/gp_asmlib.s b/backends/platform/gp32/gp_asmlib.s deleted file mode 100644 index e1f1d8cb39..0000000000 --- a/backends/platform/gp32/gp_asmlib.s +++ /dev/null @@ -1,426 +0,0 @@ - .ALIGN -@ .ARM - - .GLOBAL cpu_speed - .GLOBAL mmu_change - .GLOBAL gp_enableIRQ - .GLOBAL gp_disableIRQ - .GLOBAL gp_installSWIIRQ - .GLOBAL gp_removeSWIIRQ - -cpu_speed: - stmdb r13!, {r0-r12,lr} - stmdb sp!, {r0, r1, r2} - mov r0, sp - swi #0x0d - add sp, sp, #12 - ldmia r13!, {r0-r12,lr} - bx lr - nop - -mmu_change: - stmdb r13!, {r0-r12,lr} - swi #0x02 - ldmia r13!, {r0-r12,lr} - bx lr - nop - -gp_enableIRQ: - stmdb r13!, {r0,lr} - mrs r0, CPSR - bic r0, r0, #0x80 - msr CPSR, r0 - ldmia r13!, {r0,pc} - bx lr - -gp_disableIRQ: - stmdb r13!, {r0,lr} - MRS r0, CPSR - ORR r0, r0, #0xc0 - MSR CPSR, r0 - ldmia r13!, {r0,pc} - bx lr - -gp_installSWIIRQ: - stmdb r13!, {r14} - swi 0x9 - ldmia r13!, {pc} - bx lr - -gp_removeSWIIRQ: - stmdb r13!, {r14} - swi 0xa - ldmia r13!, {pc} - bx lr - - -@ ******** ASMFastSolidBlit(unsigned char *src4, unsigned char *dst4, int nbx, int nby, int height2, int trans, int coul) ******** - - .ALIGN - .GLOBAL ASMFastSolidBlit - .TYPE ASMFastSolidBlit, function - .CODE 32 - -@r0 = src4 -@r1 = dst4 -@r2 = nbx -@r3 = nby - -@r4 = height2 -@r5 = trans -@r6 = coul -@r7 = tmp -@r8 = tmpnby -@r9 = tmp2 - -_bx7: - ldrb r8,[r0,+r3] @lecture 1er pixel - subs r7,r3,#1 - bmi _sauty2 - -_sauty2: @ecriture r8 - TEQ r8,r5 - STRNEB r8,[r1,+r7] - SUB r0,r0,r4 - SUB r1,r1,#240 - SUBS r2,r2,#1 - BPL _bx7 - - ldmfd r13!,{r4-r8} - add sp,sp,#8 - bx lr - -ASMFastSolidBlit: - - sub sp,sp,#12 - stmfd r13!,{r4-r9} - ldr r4,[r13,#36] - ldr r5,[r13,#40] - ldr r6,[r13,#44] - -_bx8: - ldrb r9,[r0,+r3] @lecture 1er pixel - subs r8,r3,#1 - bmi _sauty2 - -_by8: - LDRB r7,[r0,+r8] - TEQ r9,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3b - LDRB r9,[r0,+r8] - TEQ r7,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3 - LDRB r7,[r0,+r8] - TEQ r9,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3b - LDRB r9,[r0,+r8] - TEQ r7,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3 - LDRB r7,[r0,+r8] - TEQ r9,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3b - LDRB r9,[r0,+r8] - TEQ r7,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3 - LDRB r7,[r0,+r8] - TEQ r9,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3b - LDRB r9,[r0,+r8] - TEQ r7,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3 - LDRB r7,[r0,+r8] - TEQ r9,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3b - LDRB r9,[r0,+r8] - TEQ r7,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3 - LDRB r7,[r0,+r8] - TEQ r9,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3b - LDRB r9,[r0,+r8] - TEQ r7,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3 - LDRB r7,[r0,+r8] - TEQ r9,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3b - LDRB r9,[r0,+r8] - TEQ r7,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3 - LDRB r7,[r0,+r8] - TEQ r9,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - BMI _sauty3b - LDRB r9,[r0,+r8] - TEQ r7,r5 - STRNEB r6,[r1,+r8] - SUBS r8,r8,#1 - - BPL _by8 - -_sauty3: @ecriture pour r9 - TEQ r9,r5 - STRNEB r6,[r1,+r8] - SUB r0,r0,r4 - SUB r1,r1,#240 - SUBS r2,r2,#1 - BPL _bx8 - - ldmfd r13!,{r4-r9} - add sp,sp,#12 - bx lr - -_sauty3b: @ecriture pour r7 - TEQ r7,r5 - STRNEB r6,[r1,+r8] - SUB r0,r0,r4 - SUB r1,r1,#240 - SUBS r2,r2,#1 - BPL _bx8 - - ldmfd r13!,{r4-r9} - add sp,sp,#12 - bx lr - - -@ ******** ASMSaveBitmap(unsigned char *src4, unsigned char *dst, int nbx, int nby, int height2) ******** - - .ALIGN - .GLOBAL ASMSaveBitmap - .TYPE ASMSaveBitmap, function - .CODE 32 - -@r0 = src4 -@r1 = dst + 1 -@r2 = nbx -@r3 = nby - -@r7 = height2 -@r8 = tmp -@r9 = tmpnby -@r10 = dst4 - -ASMSaveBitmap: - - sub sp,sp,#4 - stmfd r13!,{r7-r10} - LDR r7,[r13,#20] - -_bx6: - MLA r10,r2,r7,r1 - MOV r9,r3 - -_by6: - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - BMI _fincol6 - LDRB r8,[r0,+r9] - SUBS r9,r9,#1 - STRB r8,[r10,+r9] - - BPL _by6 - -_fincol6: - SUB r0,r0,#240 - SUBS r2,r2,#1 - BPL _bx6 - - ldmfd r13!,{r7-r10} - add sp,sp,#4 - bx lr - - - .ALIGN - .GLOBAL gp_clearFramebuffer - .TYPE gp_clearFramebuffer, function - .CODE 32 -gp_clearFramebuffer: - @ r0 = framebuffer - @ r1 = color - orr r1,r1,r1,lsl #16 @hi halfword = lo halfword - mov r2,#38400 -clear: str r1,[r0],#4 - subs r2,r2,#1 - bne clear - bx lr - - -@ ******** ASMFastClear(unsigned char *dst4, int nbx, int nby) ******** - - .ALIGN - .GLOBAL ASMFastClear - .TYPE ASMFastClear, function - .CODE 32 - -@r0 = dst4 -@r1 = nbx -@r2 = nby - -@r3 = #0 -@r4 = tmpnby - -@optimis?pour h=20 - -ASMFastClear: - - str r4,[sp,#-4]! - MOV r3,#0 - -_bx9: - MOV r4,r2 - -_by9: - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - BMI _sauty4 - STRB r3,[r0,+r4] - SUBS r4,r4,#1 - - BPL _by9 - -_sauty4: - SUB r0,r0,#240 - SUBS r1,r1,#1 - BPL _bx9 - - ldr r4,[sp],#4 - bx lr diff --git a/backends/platform/gp32/gp_clipped.c b/backends/platform/gp32/gp_clipped.c deleted file mode 100644 index 5bcb9358d3..0000000000 --- a/backends/platform/gp32/gp_clipped.c +++ /dev/null @@ -1,101 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -//Some global variables and macros - -#define screen_width 320 -#define screen_height 240 - -void gp_FastSolidBlit(void *framebuffer, int dx, const int dy, const int width, const int height, const unsigned char *src, const int trans, const int coul) { - int xmin, ymin, xmax, ymax; - int height2 = ( (height + 3) >> 2) << 2; - - if(dx < 0) { - xmin = -dx; - } else xmin = 0; - if( (dx++ + width) > screen_width) { - xmax = screen_width - dx; - } else xmax = width - 1; - if(dy < 0) { - ymax = height + dy - 1; - } else ymax = height - 1; - if( (dy + height) > screen_height) { - ymin = dy + height - screen_height; - } else ymin = 0; - if( (xmin > xmax) || (ymin > ymax) ) return; - - unsigned char *dst4 = framebuffer + (dx + xmax) * screen_height - height - dy + 1 + ymin; - src += (xmax * height2 + ymin); - ASMFastSolidBlit(src, dst4, xmax - xmin, ymax - ymin, height2, trans, coul); -} - -//Copy from framebuffer to dest -void gp_SaveBitmap(void *framebuffer, int dx, const int dy, const int width, const int height, const unsigned char *dest) { //Sur l'icran - int xmin, ymin, xmax, ymax; - int height2 = ( (height + 3) >> 2) << 2; - - if(dx < 0) { - xmin = -dx; - } else xmin = 0; - if( (dx++ + width) > screen_width) { - xmax = screen_width - dx; - } else xmax = width - 1; - if(dy < 0) { - ymax = height + dy - 1; - } else ymax = height - 1; - if( (dy + height) > screen_height) { - ymin = dy + height - screen_height; - } else ymin = 0; - if( (xmin > xmax) || (ymin > ymax) ) return; - - unsigned char *src4 = framebuffer + (dx + xmax) * screen_height - height - dy + ymin; - dest += (xmin * height2 + ymin + 1); - ASMSaveBitmap(src4, dest, xmax - xmin, ymax - ymin, height2); -} - -//Clears area with color #0, should not trigger clicky noise - -void gp_FastClear(void *framebuffer, int dx, int dy, int width, int height) { - int xmin, ymin, xmax, ymax; - - if(dx < 0) { - xmin = -dx; - } else xmin = 0; - if( (dx++ + width) > screen_width) { - xmax = screen_width - dx; - } else xmax = width - 1; - if(dy < 0) { - ymax = height + dy - 1; - } else ymax = height - 1; - if( (dy + height) > screen_height) { - ymin = dy + height - screen_height; - } else ymin = 0; - if( (xmin > xmax) || (ymin > ymax) ) return; - - int decaly = screen_height - height - dy; - - unsigned char *dst4 = framebuffer + (dx + xmax) * screen_height - height - dy + ymin; - ASMFastClear(dst4, xmax - xmin, ymax - ymin); -} diff --git a/backends/platform/gp32/gpmad/readme.txt b/backends/platform/gp32/gpmad/readme.txt deleted file mode 100644 index edceb8494d..0000000000 --- a/backends/platform/gp32/gpmad/readme.txt +++ /dev/null @@ -1 +0,0 @@ -You may put libgpmad.a and the header files in this directory when you build with MAD library. \ No newline at end of file diff --git a/backends/platform/gp32/gptremor/readme.txt b/backends/platform/gp32/gptremor/readme.txt deleted file mode 100644 index fa1b02b198..0000000000 --- a/backends/platform/gp32/gptremor/readme.txt +++ /dev/null @@ -1 +0,0 @@ -You may put libgptremor.a and the header files in this directory when you build with Tremor library. \ No newline at end of file diff --git a/backends/platform/gp32/memcpy.S b/backends/platform/gp32/memcpy.S deleted file mode 100644 index 12853dbfc4..0000000000 --- a/backends/platform/gp32/memcpy.S +++ /dev/null @@ -1,498 +0,0 @@ -/* $NetBSD: memcpy.S,v 1.3 1997/11/22 03:27:12 mark Exp $ */ - -/*- -* Copyright (c) 1997 The NetBSD Foundation, Inc. -* All rights reserved. -* -* This code is derived from software contributed to The NetBSD Foundation -* by Neil A. Carson and Mark Brinicombe -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions -* are met: -* 1. Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* 2. Redistributions in binary form must reproduce the above copyright -* notice, this list of conditions and the following disclaimer in the -* documentation and/or other materials provided with the distribution. -* 3. All advertising materials mentioning features or use of this software -* must display the following acknowledgement: -* This product includes software developed by the NetBSD -* Foundation, Inc. and its contributors. -* 4. Neither the name of The NetBSD Foundation nor the names of its -* contributors may be used to endorse or promote products derived -* from this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -* ``AS IS\'\' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -* POSSIBILITY OF SUCH DAMAGE. -*/ - -/* This was modified by Jay Monkman to -* save and restore r12. This is necessary for RTEMS. -*/ -/* #include */ - -#define ENTRY(_LABEL) \ - .global _LABEL; _LABEL: -/* -.globl memcpy -memcpy: -*/ -ENTRY(memcpy) -stmfd sp!, {r0, r12, lr} -bl _memcpy -ldmfd sp!, {r0, r12, pc} - - -/* -.globl memove -memmove: -*/ -ENTRY(memmove) -stmfd sp!, {r0, r12, lr} -bl _memcpy -ldmfd sp!, {r0, r12, pc} - - - -/* -* This is one fun bit of code ... -* Some easy listening music is suggested while trying to understand this -* code e.g. Iron Maiden -* -* For anyone attempting to understand it : -* -* The core code is implemented here with simple stubs for memcpy() -* memmove() and bcopy(). -* -* All local labels are prefixed with Lmemcpy_ -* Following the prefix a label starting f is used in the forward copy code -* while a label using b is used in the backwards copy code -* The source and destination addresses determine whether a forward or -* backward copy is performed. -* Separate bits of code are used to deal with the following situations -* for both the forward and backwards copy. -* unaligned source address -* unaligned destination address -* Separate copy routines are used to produce an optimised result for each -* of these cases. -* The copy code will use LDM/STM instructions to copy up to 32 bytes at -* a time where possible. -* -* Note: r12 (aka ip) can be trashed during the function along with -* r0-r3 although r0-r2 have defined uses i.e. src, dest, len through out. -* Additional registers are preserved prior to use i.e. r4, r5 & lr -* -* Apologies for the state of the comments;-) -*/ - - -/* -_memcpy: -*/ -ENTRY(_memcpy) -/* Determine copy direction */ -cmp r1, r0 -bcc Lmemcpy_backwards - -moveq r0, #0 /* Quick abort for len=0 */ -moveq pc, lr - -stmdb sp!, {r0, lr} /* memcpy() returns dest addr */ -subs r2, r2, #4 -blt Lmemcpy_fl4 /* less than 4 bytes */ -ands r12, r0, #3 -bne Lmemcpy_fdestul /* oh unaligned destination addr */ -ands r12, r1, #3 -bne Lmemcpy_fsrcul /* oh unaligned source addr */ - -Lmemcpy_ft8: -/* We have aligned source and destination */ -subs r2, r2, #8 -blt Lmemcpy_fl12 /* less than 12 bytes (4 from above) */ -subs r2, r2, #0x14 -blt Lmemcpy_fl32 /* less than 32 bytes (12 from above) */ -stmdb sp!, {r4} /* borrow r4 */ - -/* blat 32 bytes at a time */ -/* XXX for really big copies perhaps we should use more registers */ -Lmemcpy_floop32: -ldmia r1!, {r3, r4, r12, lr} -stmia r0!, {r3, r4, r12, lr} -ldmia r1!, {r3, r4, r12, lr} -stmia r0!, {r3, r4, r12, lr} -subs r2, r2, #0x20 -bge Lmemcpy_floop32 - -cmn r2, #0x10 -ldmgeia r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */ -stmgeia r0!, {r3, r4, r12, lr} -subge r2, r2, #0x10 -ldmia sp!, {r4} /* return r4 */ - -Lmemcpy_fl32: -adds r2, r2, #0x14 - -/* blat 12 bytes at a time */ -Lmemcpy_floop12: -ldmgeia r1!, {r3, r12, lr} -stmgeia r0!, {r3, r12, lr} -subges r2, r2, #0x0c -bge Lmemcpy_floop12 - -Lmemcpy_fl12: -adds r2, r2, #8 -blt Lmemcpy_fl4 - -subs r2, r2, #4 -ldrlt r3, [r1], #4 -strlt r3, [r0], #4 -ldmgeia r1!, {r3, r12} -stmgeia r0!, {r3, r12} -subge r2, r2, #4 - -Lmemcpy_fl4: -/* less than 4 bytes to go */ -adds r2, r2, #4 -ldmeqia sp!, {r0, pc} /* done */ - -/* copy the crud byte at a time */ -cmp r2, #2 -ldrb r3, [r1], #1 -strb r3, [r0], #1 -ldrgeb r3, [r1], #1 -strgeb r3, [r0], #1 -ldrgtb r3, [r1], #1 -strgtb r3, [r0], #1 -ldmia sp!, {r0, pc} - -/* erg - unaligned destination */ -Lmemcpy_fdestul: -rsb r12, r12, #4 -cmp r12, #2 - -/* align destination with byte copies */ -ldrb r3, [r1], #1 -strb r3, [r0], #1 -ldrgeb r3, [r1], #1 -strgeb r3, [r0], #1 -ldrgtb r3, [r1], #1 -strgtb r3, [r0], #1 -subs r2, r2, r12 -blt Lmemcpy_fl4 /* less the 4 bytes */ - -ands r12, r1, #3 -beq Lmemcpy_ft8 /* we have an aligned source */ - -/* erg - unaligned source */ -/* This is where it gets nasty ... */ -Lmemcpy_fsrcul: -bic r1, r1, #3 -ldr lr, [r1], #4 -cmp r12, #2 -bgt Lmemcpy_fsrcul3 -beq Lmemcpy_fsrcul2 -cmp r2, #0x0c -blt Lmemcpy_fsrcul1loop4 -sub r2, r2, #0x0c -stmdb sp!, {r4, r5} - -Lmemcpy_fsrcul1loop16: -mov r3, lr, lsr #8 -ldmia r1!, {r4, r5, r12, lr} -orr r3, r3, r4, lsl #24 -mov r4, r4, lsr #8 -orr r4, r4, r5, lsl #24 -mov r5, r5, lsr #8 -orr r5, r5, r12, lsl #24 -mov r12, r12, lsr #8 -orr r12, r12, lr, lsl #24 -stmia r0!, {r3-r5, r12} -subs r2, r2, #0x10 -bge Lmemcpy_fsrcul1loop16 -ldmia sp!, {r4, r5} -adds r2, r2, #0x0c -blt Lmemcpy_fsrcul1l4 - -Lmemcpy_fsrcul1loop4: -mov r12, lr, lsr #8 -ldr lr, [r1], #4 -orr r12, r12, lr, lsl #24 -str r12, [r0], #4 -subs r2, r2, #4 -bge Lmemcpy_fsrcul1loop4 - -Lmemcpy_fsrcul1l4: -sub r1, r1, #3 -b Lmemcpy_fl4 - -Lmemcpy_fsrcul2: -cmp r2, #0x0c -blt Lmemcpy_fsrcul2loop4 -sub r2, r2, #0x0c -stmdb sp!, {r4, r5} - -Lmemcpy_fsrcul2loop16: -mov r3, lr, lsr #16 -ldmia r1!, {r4, r5, r12, lr} -orr r3, r3, r4, lsl #16 -mov r4, r4, lsr #16 -orr r4, r4, r5, lsl #16 -mov r5, r5, lsr #16 -orr r5, r5, r12, lsl #16 -mov r12, r12, lsr #16 -orr r12, r12, lr, lsl #16 -stmia r0!, {r3-r5, r12} -subs r2, r2, #0x10 -bge Lmemcpy_fsrcul2loop16 -ldmia sp!, {r4, r5} -adds r2, r2, #0x0c -blt Lmemcpy_fsrcul2l4 - -Lmemcpy_fsrcul2loop4: -mov r12, lr, lsr #16 -ldr lr, [r1], #4 -orr r12, r12, lr, lsl #16 -str r12, [r0], #4 -subs r2, r2, #4 -bge Lmemcpy_fsrcul2loop4 - -Lmemcpy_fsrcul2l4: -sub r1, r1, #2 -b Lmemcpy_fl4 - -Lmemcpy_fsrcul3: -cmp r2, #0x0c -blt Lmemcpy_fsrcul3loop4 -sub r2, r2, #0x0c -stmdb sp!, {r4, r5} - -Lmemcpy_fsrcul3loop16: -mov r3, lr, lsr #24 -ldmia r1!, {r4, r5, r12, lr} -orr r3, r3, r4, lsl #8 -mov r4, r4, lsr #24 -orr r4, r4, r5, lsl #8 -mov r5, r5, lsr #24 -orr r5, r5, r12, lsl #8 -mov r12, r12, lsr #24 -orr r12, r12, lr, lsl #8 -stmia r0!, {r3-r5, r12} -subs r2, r2, #0x10 -bge Lmemcpy_fsrcul3loop16 -ldmia sp!, {r4, r5} -adds r2, r2, #0x0c -blt Lmemcpy_fsrcul3l4 - -Lmemcpy_fsrcul3loop4: -mov r12, lr, lsr #24 -ldr lr, [r1], #4 -orr r12, r12, lr, lsl #8 -str r12, [r0], #4 -subs r2, r2, #4 -bge Lmemcpy_fsrcul3loop4 - -Lmemcpy_fsrcul3l4: -sub r1, r1, #1 -b Lmemcpy_fl4 - -Lmemcpy_backwards: -add r1, r1, r2 -add r0, r0, r2 -subs r2, r2, #4 -blt Lmemcpy_bl4 /* less than 4 bytes */ -ands r12, r0, #3 -bne Lmemcpy_bdestul /* oh unaligned destination addr */ -ands r12, r1, #3 -bne Lmemcpy_bsrcul /* oh unaligned source addr */ - -Lmemcpy_bt8: -/* We have aligned source and destination */ -subs r2, r2, #8 -blt Lmemcpy_bl12 /* less than 12 bytes (4 from above) */ -stmdb sp!, {r4, lr} -subs r2, r2, #0x14 /* less than 32 bytes (12 from above) */ -blt Lmemcpy_bl32 - -/* blat 32 bytes at a time */ -/* XXX for really big copies perhaps we should use more registers */ -Lmemcpy_bloop32: -ldmdb r1!, {r3, r4, r12, lr} -stmdb r0!, {r3, r4, r12, lr} -ldmdb r1!, {r3, r4, r12, lr} -stmdb r0!, {r3, r4, r12, lr} -subs r2, r2, #0x20 -bge Lmemcpy_bloop32 - -Lmemcpy_bl32: -cmn r2, #0x10 -ldmgedb r1!, {r3, r4, r12, lr} /* blat a remaining 16 bytes */ -stmgedb r0!, {r3, r4, r12, lr} -subge r2, r2, #0x10 -adds r2, r2, #0x14 -ldmgedb r1!, {r3, r12, lr} /* blat a remaining 12 bytes */ -stmgedb r0!, {r3, r12, lr} -subge r2, r2, #0x0c -ldmia sp!, {r4, lr} - -Lmemcpy_bl12: -adds r2, r2, #8 -blt Lmemcpy_bl4 -subs r2, r2, #4 -ldrlt r3, [r1, #-4]! -strlt r3, [r0, #-4]! -ldmgedb r1!, {r3, r12} -stmgedb r0!, {r3, r12} -subge r2, r2, #4 - -Lmemcpy_bl4: -/* less than 4 bytes to go */ -adds r2, r2, #4 -moveq pc, lr /* done */ - -/* copy the crud byte at a time */ -cmp r2, #2 -ldrb r3, [r1, #-1]! -strb r3, [r0, #-1]! -ldrgeb r3, [r1, #-1]! -strgeb r3, [r0, #-1]! -ldrgtb r3, [r1, #-1]! -strgtb r3, [r0, #-1]! -mov pc, lr - -/* erg - unaligned destination */ -Lmemcpy_bdestul: -cmp r12, #2 - -/* align destination with byte copies */ -ldrb r3, [r1, #-1]! -strb r3, [r0, #-1]! -ldrgeb r3, [r1, #-1]! -strgeb r3, [r0, #-1]! -ldrgtb r3, [r1, #-1]! -strgtb r3, [r0, #-1]! -subs r2, r2, r12 -blt Lmemcpy_bl4 /* less than 4 bytes to go */ -ands r12, r1, #3 -beq Lmemcpy_bt8 /* we have an aligned source */ - -/* erg - unaligned source */ -/* This is where it gets nasty ... */ -Lmemcpy_bsrcul: -bic r1, r1, #3 -ldr r3, [r1, #0] -cmp r12, #2 -blt Lmemcpy_bsrcul1 -beq Lmemcpy_bsrcul2 -cmp r2, #0x0c -blt Lmemcpy_bsrcul3loop4 -sub r2, r2, #0x0c -stmdb sp!, {r4, r5, lr} - -Lmemcpy_bsrcul3loop16: -mov lr, r3, lsl #8 -ldmdb r1!, {r3-r5, r12} -orr lr, lr, r12, lsr #24 -mov r12, r12, lsl #8 -orr r12, r12, r5, lsr #24 -mov r5, r5, lsl #8 -orr r5, r5, r4, lsr #24 -mov r4, r4, lsl #8 -orr r4, r4, r3, lsr #24 -stmdb r0!, {r4, r5, r12, lr} -subs r2, r2, #0x10 -bge Lmemcpy_bsrcul3loop16 -ldmia sp!, {r4, r5, lr} -adds r2, r2, #0x0c -blt Lmemcpy_bsrcul3l4 - -Lmemcpy_bsrcul3loop4: -mov r12, r3, lsl #8 -ldr r3, [r1, #-4]! -orr r12, r12, r3, lsr #24 -str r12, [r0, #-4]! -subs r2, r2, #4 -bge Lmemcpy_bsrcul3loop4 - -Lmemcpy_bsrcul3l4: -add r1, r1, #3 -b Lmemcpy_bl4 - -Lmemcpy_bsrcul2: -cmp r2, #0x0c -blt Lmemcpy_bsrcul2loop4 -sub r2, r2, #0x0c -stmdb sp!, {r4, r5, lr} - -Lmemcpy_bsrcul2loop16: -mov lr, r3, lsl #16 -ldmdb r1!, {r3-r5, r12} -orr lr, lr, r12, lsr #16 -mov r12, r12, lsl #16 -orr r12, r12, r5, lsr #16 -mov r5, r5, lsl #16 -orr r5, r5, r4, lsr #16 -mov r4, r4, lsl #16 -orr r4, r4, r3, lsr #16 -stmdb r0!, {r4, r5, r12, lr} -subs r2, r2, #0x10 -bge Lmemcpy_bsrcul2loop16 -ldmia sp!, {r4, r5, lr} -adds r2, r2, #0x0c -blt Lmemcpy_bsrcul2l4 - -Lmemcpy_bsrcul2loop4: -mov r12, r3, lsl #16 -ldr r3, [r1, #-4]! -orr r12, r12, r3, lsr #16 -str r12, [r0, #-4]! -subs r2, r2, #4 -bge Lmemcpy_bsrcul2loop4 - -Lmemcpy_bsrcul2l4: -add r1, r1, #2 -b Lmemcpy_bl4 - -Lmemcpy_bsrcul1: -cmp r2, #0x0c -blt Lmemcpy_bsrcul1loop4 -sub r2, r2, #0x0c -stmdb sp!, {r4, r5, lr} - -Lmemcpy_bsrcul1loop32: -mov lr, r3, lsl #24 -ldmdb r1!, {r3-r5, r12} -orr lr, lr, r12, lsr #8 -mov r12, r12, lsl #24 -orr r12, r12, r5, lsr #8 -mov r5, r5, lsl #24 -orr r5, r5, r4, lsr #8 -mov r4, r4, lsl #24 -orr r4, r4, r3, lsr #8 -stmdb r0!, {r4, r5, r12, lr} -subs r2, r2, #0x10 -bge Lmemcpy_bsrcul1loop32 -ldmia sp!, {r4, r5, lr} -adds r2, r2, #0x0c -blt Lmemcpy_bsrcul1l4 - -Lmemcpy_bsrcul1loop4: -mov r12, r3, lsl #24 -ldr r3, [r1, #-4]! -orr r12, r12, r3, lsr #8 -str r12, [r0, #-4]! -subs r2, r2, #4 -bge Lmemcpy_bsrcul1loop4 - -Lmemcpy_bsrcul1l4: -add r1, r1, #1 -b Lmemcpy_bl4 diff --git a/backends/platform/gp32/minilzo/readme.txt b/backends/platform/gp32/minilzo/readme.txt deleted file mode 100644 index 5cf1a9b360..0000000000 --- a/backends/platform/gp32/minilzo/readme.txt +++ /dev/null @@ -1 +0,0 @@ -You may put libminlzo.a and the header files in this directory when you build with MINILZO library. \ No newline at end of file diff --git a/backends/platform/gp32/portdefs.h b/backends/platform/gp32/portdefs.h deleted file mode 100644 index dd0d70a25a..0000000000 --- a/backends/platform/gp32/portdefs.h +++ /dev/null @@ -1,117 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef PORTDEFS_H -#define PORTDEFS_H - -#include -#include -#include -#include -#include -#include -#include - -#include "gp32std.h" -#include "gp32std_file.h" -#include "gp32std_memory.h" - -#undef byte - -#undef malloc -#undef calloc -#undef free - -#undef stderr -#undef stdout -#undef stdin - -#undef fopen -#undef fread -#undef fwrite -#undef fclose -#undef ftell -#undef rewind -#undef fseek - -#undef ferror -#undef clearerr - -#undef feof -#undef getc - -#define FILE GPFILE - -#define stderr gp_stderr -#define stdout gp_stdout -#define stdin gp_stdin - -#define fopen gp_fopen -#define fread gp_fread -#define fwrite gp_fwrite -#define fclose gp_fclose -#define fseek gp_fseek -#define ftell gp_ftell -#define ferror gp_ferror -#define clearerr gp_clearerr - -#define feof gp_feof -#define fgets gp_fgets -#define fgetc gp_fgetc -#define getc gp_fgetc - -#define fprintf gp_fprintf -#define fflush gp_fflush - -#define printf gp_printf - -#define exit gp_exit - -#define strcpy gp_strcpy -#define strncpy gp_strncpy -#define strcat gp_strcat -#define strdup gp_strdup -#define sprintf gp_sprintf -#define strcasecmp gp_strcasecmp -#define strncasecmp gp_strncasecmp - -#define memcpy gp_memcpy -#define memset gp_memset -#define malloc gp_malloc -#define calloc gp_calloc //gm_calloc -#define free gp_free - -#define FUNCTION GPDEBUG("FUNC: %s", __FUNCTION__); - -#define DELAY gp_delay(500); - -#define MARK printf("MARK: %s, %s, %d", __FILE__, __FUNCTION__, __LINE__); - -#define assert(e) ((e) ? 0 : (printf("!AS: " #e " (%s, %d)\n", __FILE__, __LINE__))) -#define ASSERT assert - -#define ENDLESSLOOP while (1) - -#endif /* PORTDEFS_H */ diff --git a/backends/platform/gp32/scummvm.bmp b/backends/platform/gp32/scummvm.bmp deleted file mode 100644 index 4f9dce2eb7..0000000000 Binary files a/backends/platform/gp32/scummvm.bmp and /dev/null differ diff --git a/backends/platform/gp32/startup.c b/backends/platform/gp32/startup.c deleted file mode 100644 index ad1022ca3c..0000000000 --- a/backends/platform/gp32/startup.c +++ /dev/null @@ -1,122 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include -#include -#include -#include -#include - -#include - -#ifdef USE_GP_MEM - #include -#endif - -unsigned int HEAPSTART; -unsigned int HEAPEND; - -void InitializeFont (void); -extern void GpKeyPollingTimeSet (int loop_cnt); -extern void GpMain(void *arg); - -int main (int arg_len, char * arg_v) - { - GM_HEAP_DEF gm_heap_def; - - _gp_sdk_init(); - - // keyboard polling count setting - GpKeyPollingTimeSet (KEYPOLLING_NUM); - - #ifdef USE_GP_MEM - gm_heap_def.heapstart = (void*)(HEAPSTART); - gm_heap_def.heapend = (void *)(HEAPEND & ~3); - gm_heap_init (&gm_heap_def); - - gp_mem_func.malloc = gm_malloc; - gp_mem_func.zimalloc = gm_zi_malloc; - gp_mem_func.calloc = gm_calloc; - gp_mem_func.free = gm_free; - gp_mem_func.availablemem = gm_availablesize; - gp_mem_func.malloc_ex = gm_malloc_ex; - gp_mem_func.free_ex = gm_free_ex; - gp_mem_func.make_mem_partition = gm_make_mem_part; - - gp_str_func.memset = gm_memset; - gp_str_func.memcpy = gm_memcpy; - gp_str_func.strcpy = gm_strcpy; - gp_str_func.strncpy = gm_strncpy; - gp_str_func.strcat = gm_strcat; - gp_str_func.strncat = gm_strncat; - gp_str_func.gpstrlen = gm_lstrlen; - gp_str_func.sprintf = gm_sprintf; - gp_str_func.uppercase = gm_uppercase; - gp_str_func.lowercase = gm_lowercase; - gp_str_func.compare = gm_compare; - gp_str_func.trim_right = gm_trim_right; - #endif /*USE_GP_MEM*/ - - //Font initialize - InitializeFont (); - - GpKernelInitialize (); - - GpKernelStart (); - - GpAppExit (); - while (1) {} - } - -void InitializeFont (void) - { - BGFONTINFO mInfo; - mInfo.kor_w = KORFONT_W; - mInfo.kor_h = KORFONT_H; - mInfo.eng_w = ENGFONT_W; - mInfo.eng_h = ENGFONT_H; - mInfo.chargap = FONT_CHARGAP; - mInfo.linegap = FONT_LINEGAP; - GpFontInit (&mInfo); - GpFontResSet ((unsigned char*)fontresKor, (unsigned char*)fontresEng); - } - -int GpPredefinedStackGet (H_THREAD th) - { - switch (th) - { - case H_THREAD_GPMAIN: - return GPMAIN_STACK_SIZE; - case H_THREAD_NET: - return NET_STACK_SIZE; - case H_THREAD_TMR0: - case H_THREAD_TMR1: - case H_THREAD_TMR2: - case H_THREAD_TMR3: - return USER_STACK_SIZE; - default: - return 0; - } - } -- cgit v1.2.3 From 2c5e8cc93861cded0b9a8ca7c605c61c7c2acc31 Mon Sep 17 00:00:00 2001 From: Neil Millstone Date: Thu, 15 May 2008 22:12:51 +0000 Subject: Porting changes from 0.11.0 branch svn-id: r32140 --- backends/platform/ds/arm9/makefile | 31 +- backends/platform/ds/arm9/source/adpcm_arm.s | 6 +- backends/platform/ds/arm9/source/blitters.cpp | 108 +-- backends/platform/ds/arm9/source/blitters.h | 10 +- backends/platform/ds/arm9/source/blitters.s | 28 +- backends/platform/ds/arm9/source/blitters_arm.s | 15 +- backends/platform/ds/arm9/source/cdaudio.cpp | 168 ++--- backends/platform/ds/arm9/source/cdaudio.h | 2 +- backends/platform/ds/arm9/source/console2.h | 4 +- backends/platform/ds/arm9/source/dsmain.cpp | 827 +++++++++++---------- backends/platform/ds/arm9/source/dsmain.h | 104 +-- backends/platform/ds/arm9/source/dsoptions.cpp | 103 ++- backends/platform/ds/arm9/source/dsoptions.h | 10 +- backends/platform/ds/arm9/source/fat/disc_io.c | 68 +- backends/platform/ds/arm9/source/fat/disc_io.h | 6 +- backends/platform/ds/arm9/source/fat/gba_nds_fat.c | 526 ++++++------- backends/platform/ds/arm9/source/fat/gba_nds_fat.h | 30 +- backends/platform/ds/arm9/source/fat/io_dldi.h | 4 +- backends/platform/ds/arm9/source/fat/io_dldi.s | 16 +- backends/platform/ds/arm9/source/fat/io_efa2.c | 28 +- backends/platform/ds/arm9/source/fat/io_fcsr.c | 16 +- backends/platform/ds/arm9/source/fat/io_fcsr.h | 4 +- .../platform/ds/arm9/source/fat/io_m3_common.c | 10 +- .../platform/ds/arm9/source/fat/io_m3_common.h | 6 +- backends/platform/ds/arm9/source/fat/io_m3cf.c | 54 +- backends/platform/ds/arm9/source/fat/io_m3cf.h | 4 +- backends/platform/ds/arm9/source/fat/io_m3sd.c | 4 +- backends/platform/ds/arm9/source/fat/io_m3sd_asm.s | 26 +- backends/platform/ds/arm9/source/fat/io_mmcf.c | 26 +- backends/platform/ds/arm9/source/fat/io_mmcf.h | 2 +- backends/platform/ds/arm9/source/fat/io_mpcf.c | 52 +- backends/platform/ds/arm9/source/fat/io_mpcf.h | 4 +- backends/platform/ds/arm9/source/fat/io_njsd.c | 84 +-- backends/platform/ds/arm9/source/fat/io_njsd.h | 4 +- backends/platform/ds/arm9/source/fat/io_nmmc.c | 62 +- backends/platform/ds/arm9/source/fat/io_nmmc.h | 4 +- backends/platform/ds/arm9/source/fat/io_sccf.c | 2 +- backends/platform/ds/arm9/source/fat/io_sccf.h | 4 +- backends/platform/ds/arm9/source/fat/io_scsd.c | 10 +- backends/platform/ds/arm9/source/fat/io_scsd.h | 8 +- backends/platform/ds/arm9/source/fat/io_scsd_asm.s | 112 +-- .../platform/ds/arm9/source/fat/io_sd_common.c | 60 +- .../platform/ds/arm9/source/fat/io_sd_common.h | 10 +- backends/platform/ds/arm9/source/gbampsave.cpp | 73 +- backends/platform/ds/arm9/source/gbampsave.h | 23 +- backends/platform/ds/arm9/source/keys.cpp | 16 +- backends/platform/ds/arm9/source/osystem_ds.cpp | 173 +++-- backends/platform/ds/arm9/source/osystem_ds.h | 30 +- backends/platform/ds/arm9/source/portdefs.cpp | 2 - backends/platform/ds/arm9/source/portdefs.h | 4 +- backends/platform/ds/arm9/source/ramsave.cpp | 85 +-- backends/platform/ds/arm9/source/ramsave.h | 44 +- backends/platform/ds/arm9/source/scummconsole.c | 76 +- backends/platform/ds/arm9/source/scummconsole.h | 2 +- backends/platform/ds/arm9/source/scummhelp.cpp | 2 +- backends/platform/ds/arm9/source/scummhelp.h | 4 +- backends/platform/ds/arm9/source/touchkeyboard.cpp | 145 ++-- backends/platform/ds/arm9/source/touchkeyboard.h | 2 +- .../platform/ds/arm9/source/wordcompletion.cpp | 16 +- backends/platform/ds/arm9/source/zipreader.cpp | 66 +- backends/platform/ds/arm9/source/zipreader.h | 16 +- 61 files changed, 1838 insertions(+), 1603 deletions(-) diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index 787e15a03b..aefd8c091e 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -34,10 +34,10 @@ ifeq ($(SCUMM_BUILD),g) DS_BUILD_G = 1 endif -#DS_BUILD_A = 1 +DS_BUILD_A = 1 #DS_BUILD_B = 1 #DS_BUILD_C = 1 -#DS_BUILD_D = 1 # started! +#DS_BUILD_D = 1 #DS_BUILD_E = 1 #DS_BUILD_F = 1 #DS_BUILD_G = 1 @@ -82,11 +82,15 @@ VPATH = $(srcdir) USE_ARM_SOUND_ASM = 1 ARM = 1 +USE_ARM_COSTUME_ASM = 1 ifdef DS_BUILD_A - DEFINES = -DDS_SCUMM_BUILD -DDS_BUILD_A -DUSE_ARM_GFX_ASM + DEFINES = -DDS_SCUMM_BUILD -DDS_BUILD_A -DUSE_ARM_GFX_ASM -DUSE_ARM_COSTUME_ASM LOGO = logoa.bmp ENABLE_SCUMM = STATIC_PLUGIN + DEFINES += -DENABLE_SCUMM=STATIC_PLUGIN + MODULES += engines/scumm + USE_ARM_GFX_ASM = 1 BUILD=scummvm-A endif @@ -146,10 +150,12 @@ CXX = arm-eabi-g++ CFLAGS = -Wno-multichar -Wall\ -Wno-multichar -mcpu=arm9tdmi -mtune=arm9tdmi \ -mcpu=arm9tdmi -mtune=arm9tdmi -fomit-frame-pointer\ - -ffast-math -mthumb-interwork + -mthumb-interwork -DUSE_ARM_COSTUME_ASM=1 + +# -ffast-math ifdef USE_DEBUGGER - DEFINES += -DUSE_DEBUGGER + DEFINES += -DUSE_DEBUGGER CFLAGS += -g endif @@ -258,14 +264,18 @@ OPTLIST := actor.cpp ds_main.cpp osystem_ds.cpp blitters.cpp fmopl.cpp rate.cpp #OPTLIST := # Compiler options for files which should be optimised for speed -OPT_SPEED := -O3 +OPT_SPEED := -O2 # Compiler options for files which should be optimised for space -OPT_SIZE := -Os -mthumb -fno-gcse -fno-schedule-insns2 +OPT_SIZE := -Os +#-mthumb -fno-gcse -fno-schedule-insns2 -OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS) + + +OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS) + @@ -331,8 +341,7 @@ ifndef HAVE_GCC3 # If you use GCC, disable the above and enable this for intelligent # dependency tracking. #.cpp.o: -%.o: %.cpp - +%.o:%.cpp $(MKDIR) $(*D)/$(DEPDIR) $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o # $(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d @@ -344,7 +353,7 @@ else # Also, with this GCC inserts additional dummy rules for the involved headers, # which ensures a smooth compilation even if said headers become obsolete. #.cpp.o: -%.o: %.cpp +%.o:%.cpp # echo !!!!!!!!!!!! $(notdir $<) # ifeq ( $(notdir $<), $(findstring $(notdir $<), $(OPTLIST)) ) # OPTFLAG=-O3 diff --git a/backends/platform/ds/arm9/source/adpcm_arm.s b/backends/platform/ds/arm9/source/adpcm_arm.s index 178a63bb8c..38e8e60c6d 100644 --- a/backends/platform/ds/arm9/source/adpcm_arm.s +++ b/backends/platform/ds/arm9/source/adpcm_arm.s @@ -55,14 +55,14 @@ ARM_adpcm loop: LDRH r10,[r11,r2] @ r10 = stepTab[stepTableIndex] TST r12,#4 @ if ((offset & 4) == 0) - MOVEQ r9, #0 @ r9 = diff = 0 + MOVEQ r9, #0 @ r9 = diff = 0 MOVNE r9, r10 @ else r9 = diff = stepTab[stepTableIndex] TST r12,#2 @ if (offset & 2) - ADDNE r9, r9, r10,ASR #1 @ diff += r10>>1 + ADDNE r9, r9, r10,ASR #1 @ diff += r10>>1 TST r12,#1 @ if (offset & 1) - ADDNE r9, r9, r10,ASR #2 @ diff += r10>>2 + ADDNE r9, r9, r10,ASR #2 @ diff += r10>>2 ADD r9, r9, r10,ASR #3 @ diff += r10>>3 diff --git a/backends/platform/ds/arm9/source/blitters.cpp b/backends/platform/ds/arm9/source/blitters.cpp index 07c6b3fee1..582e15eb13 100644 --- a/backends/platform/ds/arm9/source/blitters.cpp +++ b/backends/platform/ds/arm9/source/blitters.cpp @@ -27,25 +27,25 @@ namespace DS { -void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst, +void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst, int vsPitch, int vmScreenWidth, int textSurfacePitch) { if (height <= 0) height = 1; if (width < 4) return; - - + + width &= ~4; // src = (const byte *) (((int) (src)) & (~4)); // dst = (byte *) (((int) (dst)) & (~4)); // text = (const byte *) (((int) (text)) & (~4)); - + asm ( "mov r5, %0\n" // Height - "yLoop:\n" + "yLoop:\n" "mov r3, #0\n" // X pos - + "xLoop:\n" - + "ldr r4, [%2, r3]\n" // Load text layer word "cmp r4, %5\n" "bne singleByteCompare\n" @@ -54,7 +54,7 @@ void asmDrawStripToScreen(int height, int width, byte const* text, byte const* s "add r3, r3, #4\n" "cmp r3, %1\n" // x == width? "blt xLoop\n" - + "add %2, %2, %8\n" // src += vs->pitch "add %3, %3, %6\n" // dst += _vm->_screenWidth "add %4, %4, %7\n" // text += _textSurface.pitch @@ -62,8 +62,8 @@ void asmDrawStripToScreen(int height, int width, byte const* text, byte const* s "cmp r5, #0\n" // y == 0? "bne yLoop\n" "b end\n" - - + + "singleByteCompare:\n" "ldrb r4, [%2, r3]\n" // Load text byte "cmps r4, %5, lsr #24\n" // Compare with mask @@ -78,7 +78,7 @@ void asmDrawStripToScreen(int height, int width, byte const* text, byte const* s "ldreqb r4, [%3, r3]\n" // Otherwise Load src byte "streqb r4, [%4, r3]\n" // Store it "add r3, r3, #1\n" - + "ldrb r4, [%2, r3]\n" // Load text byte "cmps r4, %5, lsr #24\n" // Compare with mask "strneb r4, [%4, r3]\n" // Store if not equal @@ -91,7 +91,7 @@ void asmDrawStripToScreen(int height, int width, byte const* text, byte const* s "strneb r4, [%4, r3]\n" // Store if not equal "ldreqb r4, [%3, r3]\n" // Otherwise Load src byte "streqb r4, [%4, r3]\n" // Store it - "add r3, r3, #1\n" + "add r3, r3, #1\n" "cmps r3, %1\n" // x == width? "blt xLoop\n" // Repeat @@ -101,10 +101,10 @@ void asmDrawStripToScreen(int height, int width, byte const* text, byte const* s "sub r5, r5, #1\n" // y -= 1 "cmp r5, #0\n" // y == 0? "bne yLoop\n" - + "end:\n" : /* no output registers */ - : "r" (height), "r" (width), "r" (text), "r" (src), "r" (dst), "r" (CHARSET_MASK_TRANSPARENCY | (CHARSET_MASK_TRANSPARENCY << 8) | (CHARSET_MASK_TRANSPARENCY << 16) | (CHARSET_MASK_TRANSPARENCY << 24)), + : "r" (height), "r" (width), "r" (text), "r" (src), "r" (dst), "r" (CHARSET_MASK_TRANSPARENCY | (CHARSET_MASK_TRANSPARENCY << 8) | (CHARSET_MASK_TRANSPARENCY << 16) | (CHARSET_MASK_TRANSPARENCY << 24)), "r" (vsPitch), "r" (vmScreenWidth), "r" (textSurfacePitch) : "r5", "r3", "r4", "%2", "%3", "%4", "memory"); } @@ -115,7 +115,7 @@ void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height) { asm("ands r0, %3, #1\n" "addne %3, %3, #1\n" "bne roll2\n" - + "yLoop2:\n" "ldr r0, [%2, #0]\n" "str r0, [%0, #0]\n" @@ -131,7 +131,7 @@ void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height) { "add %0, %0, %1\n" "add %2, %2, %1\n" "subs %3, %3, #2\n" - "bne yLoop2\n" + "bne yLoop2\n" : /* no output registers */ : "r" (dst), "r" (dstPitch), "r" (src), "r" (height) @@ -150,7 +150,7 @@ void ComputeDivBy5TableIFN() for (int i=0; i<160; ++i) { DIV_BY_5[i] = (2*i+5)/10; - } + } } #ifdef PERFECT_5_TO_4_RESCALING @@ -163,13 +163,13 @@ static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3 u32 bs3 = s3 & 0x1F; u32 bs4 = s4 & 0x1F; -#if 0 +#if 0 u32 gs0 = (s0 >> 5) & 0x1F; u32 gs1 = (s1 >> 5) & 0x1F; u32 gs2 = (s2 >> 5) & 0x1F; u32 gs3 = (s3 >> 5) & 0x1F; u32 gs4 = (s4 >> 5) & 0x1F; - + u32 rs0 = (s0 >> 10) & 0x1F; u32 rs1 = (s1 >> 10) & 0x1F; u32 rs2 = (s2 >> 10) & 0x1F; @@ -191,22 +191,22 @@ static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3 asm("and %0, %2, %1, lsr #10" : "=r"(rs3) : "r"(s3), "r"(mask) : ); asm("and %0, %2, %1, lsr #10" : "=r"(rs4) : "r"(s4), "r"(mask) : ); #endif - + u32 rd0 = 4*rs0 + rs1; u32 rd1 = 2*rs1 + rs1 + 2*rs2; u32 rd2 = 2*rs2 + 2*rs3 + rs3; u32 rd3 = rs3 + 4*rs4; - + u32 gd0 = 4*gs0 + gs1; u32 gd1 = 2*gs1 + gs1 + 2*gs2; u32 gd2 = 2*gs2 + 2*gs3 + gs3; u32 gd3 = gs3 + 4*gs4; - + u32 bd0 = 4*bs0 + bs1; u32 bd1 = 2*bs1 + bs1 + 2*bs2; u32 bd2 = 2*bs2 + 2*bs3 + bs3; u32 bd3 = bs3 + 4*bs4; - + #if 0 // Offsetting for correct rounding rd0 = rd0*2+5; rd1 = rd1*2+5; rd2 = rd2*2+5; rd3 = rd3*2+5; @@ -217,14 +217,14 @@ static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3 gd0 = (gd0 * 51) >> 9; gd1 = (gd1 * 51) >> 9; gd2 = (gd2 * 51) >> 9; gd3 = (gd3 * 51) >> 9; bd0 = (bd0 * 51) >> 9; bd1 = (bd1 * 51) >> 9; bd2 = (bd2 * 51) >> 9; bd3 = (bd3 * 51) >> 9; #else - rd0 = DIV_BY_5[rd0]; rd1 = DIV_BY_5[rd1]; rd2 = DIV_BY_5[rd2]; rd3 = DIV_BY_5[rd3]; - gd0 = DIV_BY_5[gd0]; gd1 = DIV_BY_5[gd1]; gd2 = DIV_BY_5[gd2]; gd3 = DIV_BY_5[gd3]; - bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1]; bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3]; + rd0 = DIV_BY_5[rd0]; rd1 = DIV_BY_5[rd1]; rd2 = DIV_BY_5[rd2]; rd3 = DIV_BY_5[rd3]; + gd0 = DIV_BY_5[gd0]; gd1 = DIV_BY_5[gd1]; gd2 = DIV_BY_5[gd2]; gd3 = DIV_BY_5[gd3]; + bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1]; bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3]; #endif - + u32 d10 = 0x80008000 | (rd1 << 26) | (gd1 << 21) | (bd1 << 16) | (rd0 << 10) | (gd0 << 5) | bd0; u32 d32 = 0x80008000 | (rd3 << 26) | (gd3 << 21) | (bd3 << 16) | (rd2 << 10) | (gd2 << 5) | bd2; - + ((u32*)dest)[0] = d10; ((u32*)dest)[1] = d32; } @@ -233,7 +233,7 @@ static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3 u16* dest) { static const u32 MASK = 0x03E07C1F; - + u32 argbargbs0 = u32(s0) | (u32(s0) << 16); u32 argbargbs1 = u32(s1) | (u32(s1) << 16); u32 argbargbs2 = u32(s2) | (u32(s2) << 16); @@ -245,32 +245,32 @@ static inline void RescaleBlock_5x1555_To_4x1555( u16 s0, u16 s1, u16 s2, u16 s3 u32 grbs2 = argbargbs2 & MASK; u32 grbs3 = argbargbs3 & MASK; u32 grbs4 = argbargbs4 & MASK; - + u32 grbd0 = (3*grbs0 + grbs1) >> 2; u32 grbd1 = ( grbs1 + grbs2) >> 1; u32 grbd2 = ( grbs2 + grbs3) >> 1; u32 grbd3 = ( grbs3 + 3*grbs4) >> 2; - + grbd0 &= MASK; grbd1 &= MASK; grbd2 &= MASK; grbd3 &= MASK; - + u32 d0 = grbd0 | (grbd0 >> 16); u32 d1 = grbd1 | (grbd1 >> 16); u32 d2 = grbd2 | (grbd2 >> 16); u32 d3 = grbd3 | (grbd3 >> 16); - - d0 &= 0xFFFF; - d1 &= 0xFFFF; - d2 &= 0xFFFF; - d3 &= 0xFFFF; - - d0 |= 0x8000; - d1 |= 0x8000; - d2 |= 0x8000; - d3 |= 0x8000; - + + d0 &= 0xFFFF; + d1 &= 0xFFFF; + d2 &= 0xFFFF; + d3 &= 0xFFFF; + + d0 |= 0x8000; + d1 |= 0x8000; + d2 |= 0x8000; + d3 |= 0x8000; + dest[0] = d0; dest[1] = d1; dest[2] = d2; @@ -287,13 +287,13 @@ static inline void RescaleBlock_5x8888_To_4x1555( u32 s0, u32 s1, u32 s2, u32 s3 u32 bd0 = (d0 << 24) >> 24; u32 bd1 = (d1 << 24) >> 24; u32 gd0 = (d0 << 16) >> 24; - u32 gd1 = (d1 << 16) >> 24; + u32 gd1 = (d1 << 16) >> 24; u32 rd0 = (d0 >> 16); u32 rd1 = (d1 >> 16); - + rd0 = DIV_BY_5[rd0]; rd1 = DIV_BY_5[rd1]; gd0 = DIV_BY_5[gd0]; gd1 = DIV_BY_5[gd1]; - bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1]; + bd0 = DIV_BY_5[bd0]; bd1 = DIV_BY_5[bd1]; u32 d10 = 0x80008000 | (rd1 << 26) | (gd1 << 21) | (bd1 << 16) | (rd0 << 10) | (gd0 << 5) | bd0; ((u32*)dest)[0] = d10; @@ -307,11 +307,11 @@ static inline void RescaleBlock_5x8888_To_4x1555( u32 s0, u32 s1, u32 s2, u32 s3 u32 rd2 = (d2 >> 16); u32 rd3 = (d3 >> 16); - rd2 = DIV_BY_5[rd2]; rd3 = DIV_BY_5[rd3]; - gd2 = DIV_BY_5[gd2]; gd3 = DIV_BY_5[gd3]; - bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3]; + rd2 = DIV_BY_5[rd2]; rd3 = DIV_BY_5[rd3]; + gd2 = DIV_BY_5[gd2]; gd3 = DIV_BY_5[gd3]; + bd2 = DIV_BY_5[bd2]; bd3 = DIV_BY_5[bd3]; u32 d32 = 0x80008000 | (rd3 << 26) | (gd3 << 21) | (bd3 << 16) | (rd2 << 10) | (gd2 << 5) | bd2; - + ((u32*)dest)[1] = d32; } @@ -320,7 +320,7 @@ static inline void RescaleBlock_5x8888_To_4x1555( u32 s0, u32 s1, u32 s2, u32 s3 static inline void Rescale_320xPAL8Scanline_To_256x1555Scanline(u16* dest, const u8* src, const u32* palette) { ComputeDivBy5TableIFN(); - + for (size_t i=0; i<64; ++i) { u32 s0 = palette[src[5*i+0]]; @@ -353,7 +353,7 @@ static inline void Rescale_320xPAL8Scanline_To_256x1555Scanline(u16* dest, const static inline void Rescale_320x1555Scanline_To_256x1555Scanline(u16* dest, const u16* src) { ComputeDivBy5TableIFN(); - + for (size_t i=0; i<64; ++i) { u16 s0 = src[5*i+0]; @@ -384,7 +384,7 @@ void Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStri for (size_t i=0; i<200; ++i) { - Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam); + Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam); } } #else @@ -396,7 +396,7 @@ void Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStri for (size_t i=0; i<200; ++i) { - Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam); + Rescale_320xPAL8Scanline_To_256x1555Scanline(dest + i*destStride, src + i *srcStride, fastRam); } } #endif diff --git a/backends/platform/ds/arm9/source/blitters.h b/backends/platform/ds/arm9/source/blitters.h index 7434a58efd..463aa2ac02 100644 --- a/backends/platform/ds/arm9/source/blitters.h +++ b/backends/platform/ds/arm9/source/blitters.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #ifndef _BLITTERS_H_ #define _BLITTERS_H_ @@ -29,22 +29,22 @@ namespace DS { -void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst, +void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst, int vsPitch, int vmScreenWidth, int textSurfacePitch); void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height); void Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStride, int srcStride, const u16* palette); void Rescale_320x256x1555_To_256x256x1555(u16* dest, const u16* src, int destStride, int srcStride); } - + #else extern "C" { -void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst, +void asmDrawStripToScreen(int height, int width, byte const* text, byte const* src, byte* dst, int vsPitch, int vmScreenWidth, int textSurfacePitch); void asmCopy8Col(byte* dst, int dstPitch, const byte* src, int height); -void Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStride, int srcStride, const u16* palette); +void Rescale_320x256xPAL8_To_256x256x1555(u16* dest, const u8* src, int destStride, int srcStride, const u16* palette, u32 numLines); void Rescale_320x256x1555_To_256x256x1555(u16* dest, const u16* src, int destStride, int srcStride); } diff --git a/backends/platform/ds/arm9/source/blitters.s b/backends/platform/ds/arm9/source/blitters.s index 40b8782eec..2f14c5a140 100644 --- a/backends/platform/ds/arm9/source/blitters.s +++ b/backends/platform/ds/arm9/source/blitters.s @@ -21,7 +21,7 @@ @ @author Robin Watts (robin@wss.co.uk) .text - + .global asmDrawStripToScreen .global asmCopy8Col .global Rescale_320x256xPAL8_To_256x256x1555 @@ -142,7 +142,7 @@ asmCopy8Col: @ r3 = height STMFD r13!,{r14} SUB r1,r1,#4 - + TST r3,#1 ADDNE r3,r3,#1 BNE roll2 @@ -177,7 +177,7 @@ Rescale_320x256x1555_To_256x256x1555: @ r2 = dstStride @ r3 = srcStride STMFD r13!,{r4-r5,r8-r11,r14} - + SUB r2,r2,#64*5 @ srcStride -= line length SUB r3,r3,#64*4 @ dstStride -= line length @@ -187,7 +187,7 @@ Rescale_320x256x1555_To_256x256x1555: MOV r5, #200 @ r5 = y yLoop3: MOV r4, #64 @ r4 = x -xLoop3: +xLoop3: LDRH r9, [r0],#2 @ r9 = src0 LDRH r10,[r0],#2 @ r10= src1 LDRH r11,[r0],#2 @ r11= src2 @@ -212,7 +212,7 @@ xLoop3: ADD r11,r11,r12 @ r11= dst2 ADD r12,r12,r14 @ r12= src3 + src4 ADD r12,r12,r14,LSL #1 @ r12= src3 + src4*3 = dst3<<2 - + AND r9, r8, r9, LSR #2 @ r9 = dst0 (split) AND r10,r8, r10,LSR #1 @ r10= dst1 (split) AND r11,r8, r11,LSR #1 @ r11= dst2 (split) @@ -227,7 +227,7 @@ xLoop3: ORR r10,r10,#0x8000 ORR r11,r11,#0x8000 ORR r12,r12,#0x8000 - + STRH r9, [r1],#2 STRH r10,[r1],#2 STRH r11,[r1],#2 @@ -235,7 +235,7 @@ xLoop3: SUBS r4,r4,#1 BGT xLoop3 - + ADD r0,r0,r2,LSL #1 ADD r1,r2,r3,LSL #1 SUBS r5,r5,#1 @@ -266,7 +266,7 @@ Rescale_320x256xPAL8_To_256x256x1555: ORR r8, r8,#0x00007C00 ORR r8, r8,#0x03E00000 @ r8 = mask LDR r9, [r13,#7*4] @ r9 = palette - + SUB r13,r13,#256*4 @ r13 = 1K of space on the stack. MOV r5, r13 @ r5 points to this space MOV r14,#256 @@ -277,14 +277,14 @@ palLoop: AND r10,r10,r8 @ r10 = separated palette entry STR r10,[r5], #4 BGT palLoop - + SUB r2,r2,#64*5 @ srcStride -= line length SUB r3,r3,#64*4 @ dstStride -= line length MOV r5,#200 @ r5 = y yLoop4: MOV r4,#64 @ r4 = x -xLoop4: +xLoop4: LDRB r9, [r0],#1 @ r9 = src0 LDRB r10,[r0],#1 @ r10= src1 LDRB r11,[r0],#1 @ r11= src2 @@ -303,7 +303,7 @@ xLoop4: ADD r11,r11,r12 @ r11= dst2 ADD r12,r12,r14 @ r12= src3 + src4 ADD r12,r12,r14,LSL #1 @ r12= src3 + src4*3 = dst3<<2 - + AND r9, r8, r9, LSR #2 @ r9 = dst0 (split) AND r10,r8, r10,LSR #1 @ r10= dst1 (split) AND r11,r8, r11,LSR #1 @ r11= dst2 (split) @@ -318,7 +318,7 @@ xLoop4: ORR r10,r10,#0x8000 ORR r11,r11,#0x8000 ORR r12,r12,#0x8000 - + STRH r9, [r1],#2 STRH r10,[r1],#2 STRH r11,[r1],#2 @@ -326,7 +326,7 @@ xLoop4: SUBS r4,r4,#1 BGT xLoop4 - + ADD r0,r0,r2 ADD r1,r2,r3,LSL #1 SUBS r5,r5,#1 @@ -336,4 +336,4 @@ xLoop4: LDMFD r13!,{r4-r5,r8-r11,PC} - + diff --git a/backends/platform/ds/arm9/source/blitters_arm.s b/backends/platform/ds/arm9/source/blitters_arm.s index fa7613929b..5f7df298b4 100644 --- a/backends/platform/ds/arm9/source/blitters_arm.s +++ b/backends/platform/ds/arm9/source/blitters_arm.s @@ -251,8 +251,8 @@ xLoop3: @ const u8 *src, @ int dstStride, @ int srcStride, - @ const u16 *pal); - @ + @ const u16 *pal, + @ u32 numLines); Rescale_320x256xPAL8_To_256x256x1555: @ r0 = dst @ r1 = src @@ -263,6 +263,7 @@ Rescale_320x256xPAL8_To_256x256x1555: ORR r8, r8,#0x0000FC00 ORR r8, r8,#0x03E00000 @ r8 = mask LDR r9, [r13,#9*4] @ r9 = palette + LDR r7, [r13,#10*4] @ r7 = numLines SUB r13,r13,#256*4 @ r13 = 1K of space on the stack. MOV r5, r13 @ r5 points to this space @@ -280,7 +281,7 @@ palLoop: SUB r3,r3,#64*5 @ dstStride -= line length MOV r14,#0xFF @ r14= 255 - MOV r5,#200 @ r5 = y + MOV r5,r7 @ r5 = numLines yLoop4: MOV r4,#16 @ r4 = x xLoop4: @@ -292,7 +293,7 @@ xLoop4: ADD r6, r6, r6, LSL #1 @ r6 = 3*pal[src0] AND r9, r14,r10,LSR #16 @ r9 = src2 LDR r9, [r13,r9, LSL #2] @ r9 = pal[src2] - MOV r10,r10,LSR #24 @ r10= src3 + MOV r10,r10,LSR #24 @ r10= src3 LDR r10,[r13,r10,LSL #2] @ r10= pal[src3] ADD r6, r6, r7 @ r6 = dst0<<2 AND r6, r8, r6, LSR #2 @ r6 = dst0 (split) @@ -322,7 +323,7 @@ xLoop4: ADD r6, r6, r6, LSL #1 @ r6 = 3*pal[src5] MOV r9, r11,LSR #24 @ r9 = src7 LDR r9, [r13,r9, LSL #2] @ r9 = pal[src7] - AND r10,r14,r12 @ r10= src8 + AND r10,r14,r12 @ r10= src8 LDR r10,[r13,r10,LSL #2] @ r10= pal[src8] ADD r6, r6, r7 @ r6 = dst4<<2 AND r6, r8, r6, LSR #2 @ r6 = dst4 (split) @@ -354,7 +355,7 @@ xLoop4: ADD r6, r6, r6, LSL #1 @ r6 = 3*pal[src10] AND r9, r14,r10 @ r9 = src12 LDR r9, [r13,r9, LSL #2] @ r9 = pal[src12] - AND r12,r14,r10,LSR #8 @ r11= src13 + AND r12,r14,r10,LSR #8 @ r11= src13 LDR r12,[r13,r12,LSL #2] @ r11= pal[src13] ADD r6, r6, r7 @ r6 = dst8<<2 AND r6, r8, r6, LSR #2 @ r6 = dst8 (split) @@ -384,7 +385,7 @@ xLoop4: ADD r6, r6, r6, LSL #1 @ r6 = 3*pal[src15] AND r9, r14,r11,LSR #8 @ r9 = src17 LDR r9, [r13,r9, LSL #2] @ r9 = pal[src17] - AND r12,r14,r11,LSR #16 @ r11= src18 + AND r12,r14,r11,LSR #16 @ r11= src18 LDR r12,[r13,r12,LSL #2] @ r11= pal[src18] ADD r6, r6, r7 @ r6 = dst12<<2 AND r6, r8, r6, LSR #2 @ r6 = dst12 (split) diff --git a/backends/platform/ds/arm9/source/cdaudio.cpp b/backends/platform/ds/arm9/source/cdaudio.cpp index e8c9f55ef1..9569a820f2 100644 --- a/backends/platform/ds/arm9/source/cdaudio.cpp +++ b/backends/platform/ds/arm9/source/cdaudio.cpp @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #include "cdaudio.h" #include "ds-fs.h" #include "config-manager.h" @@ -53,14 +53,14 @@ struct WaveHeader { u16 fmtExtraData; // Number of extra fmt bytes u16 fmtExtra; // Samples per block (only for IMA-ADPCM files) } __attribute__ ((packed)); - + struct chunkHeader { - char name[4]; + char name[4]; u32 size; } __attribute__ ((packed)); struct Header { - s16 firstSample; + s16 firstSample; char stepTableIndex; char reserved; } __attribute__ ((packed)); @@ -112,7 +112,7 @@ void decompressBlock(); void allocBuffers() { - + } void setActive(bool active) { @@ -125,17 +125,17 @@ bool getActive() { void playTrack(int track, int numLoops, int startFrame, int duration) { Common::String path = ConfMan.get("path"); - + if (isPlayingFlag) { stopTrack(); } - + if (trackStartsAt2) { track++; } - - - + + + char str[100]; if (path[strlen(path.c_str()) - 1] == '/') { @@ -145,50 +145,50 @@ void playTrack(int track, int numLoops, int startFrame, int duration) { sprintf(str, "/track%d.wav", track); path = path + str; } - - + + //1820160 - + file = DS::std_fopen(path.c_str(), "rb"); - + if (!file) { consolePrintf("Failed to open %s!\n", path.c_str()); return; } - - + + DS::std_fread((const void *) &waveHeader, sizeof(waveHeader), 1, file); - + consolePrintf("Playing track %d\n", track); consolePrintf("Format: %d\n", waveHeader.fmtFormatTag); consolePrintf("Rate : %d\n", waveHeader.fmtSamPerSec); consolePrintf("Bits : %d\n", waveHeader.fmtBitsPerSam); consolePrintf("BlkSz : %d\n", waveHeader.fmtExtra); - + if ((waveHeader.fmtFormatTag != 17) && (waveHeader.fmtFormatTag != 20)) { consolePrintf("Wave file is in the wrong format! You must use IMA-ADPCM 4-bit mono.\n"); DS::std_fclose(file); return; } - + for (int r = 0; r < 8; r++) { IPC->adpcm.buffer[r] = (u8 * volatile) (decoderFormat *) malloc(waveHeader.fmtBlockAlign); IPC->adpcm.filled[r] = false; IPC->adpcm.arm7Dirty[r] = false; } - + // Skip chunks until we reach the data chunk chunkHeader chunk; DS::std_fread((const void *) &chunk, sizeof(chunkHeader), 1, file); - + while (!((chunk.name[0] == 'd') && (chunk.name[1] == 'a') && (chunk.name[2] == 't') && (chunk.name[3] == 'a'))) { DS::std_fseek(file, chunk.size, SEEK_CUR); DS::std_fread((const void *) &chunk, sizeof(chunkHeader), 1, file); } - + dataChunkStart = DS::std_ftell(file); - - + + static bool started = false; sampleNum = 0; blockCount = 0; @@ -206,35 +206,35 @@ void playTrack(int track, int numLoops, int startFrame, int duration) { memset(audioBuffer, 0, BUFFER_SIZE * 2); memset(decompressionBuffer, 0, waveHeader.fmtExtra * 2); DS::playSound(audioBuffer, BUFFER_SIZE * 2, false, false, waveHeader.fmtSamPerSec); - - } + + } fillPos = (IPC->streamPlayingSection + 1) & 3; isPlayingFlag = true; - - + + // Startframe is a 75Hz timer. Dunno why, since nothing else // seems to run at that rate. int tenths = (startFrame * 10) / 75; - + // Seek to the nearest block start to the start time int samples = (tenths * waveHeader.fmtSamPerSec) / 10; int block = samples / waveHeader.fmtExtra; - - + + if (duration == 0) { blocksLeft = 0; } else { blocksLeft = ((((duration * 100) / 75) * (waveHeader.fmtSamPerSec)) / (waveHeader.fmtExtra) / 100) + 10; } // consolePrintf("Playing %d blocks (%d)\n\n", blocksLeft, duration); - + // No need to seek if we're starting from the beginning if (block != 0) { DS::std_fseek(file, dataChunkStart + block * waveHeader.fmtBlockAlign, SEEK_SET); // consolePrintf("Startframe: %d msec: %d (%d,%d)\n", startFrame, tenthssec, samples, block); } - - + + //decompressBlock(); playNextBlock(); DS::CD::numLoops = numLoops; @@ -252,21 +252,21 @@ extern "C" void ARM_adcpm(int *block, int len, int stepTableIndex, void decompressBlock() { int block[2048]; bool loop = false; - + blockCount++; - + if (blockCount < 10) return; - - + + do { DS::std_fread((const void *) &blockHeader, sizeof(blockHeader), 1, file); - + DS::std_fread(&block[0], waveHeader.fmtBlockAlign - sizeof(blockHeader), 1, file); if (DS::std_feof(file) ) { // Reached end of file, so loop - - + + if ((numLoops == -1) || (numLoops > 1)) { // Seek file to first packet if (numLoops != -1) { @@ -283,14 +283,14 @@ void decompressBlock() { stopTrack(); return; } - + } else { loop = false; } - + } while (loop); - - + + if (blocksLeft > 0) { blocksLeft--; // consolePrintf("%d ", blocksLeft); @@ -305,37 +305,37 @@ void decompressBlock() { blockHeader.stepTableIndex, blockHeader.firstSample, decompressionBuffer); -#else +#else // First sample is in header decompressionBuffer[0] = blockHeader.firstSample; - + // Set up initial table indeces int stepTableIndex = blockHeader.stepTableIndex; int prevSample = blockHeader.firstSample; - + // consolePrintf("Decompressing block step=%d fs=%d\n", stepTableIndex, prevSample); for (int r = 0; r < waveHeader.fmtExtra - 1; r++) { - + int word = block[r >> 3]; int offset = 0; - + switch (7 - (r & 0x0007)) { case 0: { offset = (word & 0xF0000000) >> 28; break; } - + case 1: { offset = (word & 0x0F000000) >> 24; break; } - + case 2: { offset = (word & 0x00F00000) >> 20; break; } - + case 3: { offset = (word & 0x000F0000) >> 16; break; @@ -361,41 +361,41 @@ void decompressBlock() { break; } } - + int diff = 0; - + if (offset & 4) { diff = diff + stepTab[stepTableIndex]; } - + if (offset & 2) { diff = diff + (stepTab[stepTableIndex] >> 1); } - + if (offset & 1) { diff = diff + (stepTab[stepTableIndex] >> 2); } - + diff = diff + (stepTab[stepTableIndex] >> 3); - + if (offset & 8) { - diff = -diff; + diff = -diff; } - + int newSample = prevSample + diff; - + if (newSample > 32767) newSample = 32767; if (newSample < -32768) newSample = -32768; - + decompressionBuffer[r + 1] = newSample; - + prevSample = newSample; - + stepTableIndex += indexTab[offset]; - + if (stepTableIndex > 88) stepTableIndex = 88; if (stepTableIndex < 0) stepTableIndex = 0; - + } #endif @@ -404,21 +404,21 @@ void decompressBlock() { void playNextBlock() { if (!isPlayingFlag) return; int lastBlockId = -1; - + while (IPC->adpcm.semaphore); // Wait for buffer to become free if needed IPC->adpcm.semaphore = true; // Lock the buffer structure to prevent clashing with the ARM7 // DC_FlushAll(); - + //-8644, 25088 for (int block = fillPos + 1; block < fillPos + 4; block++) { int blockId = block & 3; - + if (IPC->streamFillNeeded[blockId]) { - + IPC->streamFillNeeded[blockId] = false; // DC_FlushAll(); - + /* if (!(REG_KEYINPUT & KEY_R)) { //consolePrintf("Align: %d First: %d Step:%d Res:%d\n", waveHeader.fmtBlockAlign, blockHeader.firstSample, blockHeader.stepTableIndex, blockHeader.reserved); consolePrintf("Filling buffer %d\n", blockId); @@ -432,19 +432,19 @@ void playNextBlock() { } } } - + lastBlockId = blockId; IPC->streamFillNeeded[blockId] = false; // DC_FlushAll(); } - - - + + + } - - - + + + if (lastBlockId != -1) { fillPos = lastBlockId; /* if (!(REG_KEYINPUT & KEY_R)) { @@ -459,18 +459,18 @@ void stopTrack() { if (!isPlayingFlag) return; DS::std_fclose(file); - + isPlayingFlag = false; - + for (int r = 0; r < BUFFER_SIZE; r++) { audioBuffer[r] = 0; } - + for (int r= 0; r < waveHeader.fmtExtra; r++) { decompressionBuffer[r] = 0; } // DS::stopSound(1); - + // free(audioBuffer); // free(decompressionBuffer); @@ -507,7 +507,7 @@ bool trackExists(int num) { bool checkCD() { // Need to check whethe CD audio files are present - do this by trying to open Track1.wav. consolePrintf("Attempted to open cd drive\n"); - + if (trackExists(1)) { trackStartsAt2 = false; return true; diff --git a/backends/platform/ds/arm9/source/cdaudio.h b/backends/platform/ds/arm9/source/cdaudio.h index a4a1a0bce9..d237569bb7 100644 --- a/backends/platform/ds/arm9/source/cdaudio.h +++ b/backends/platform/ds/arm9/source/cdaudio.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #ifndef _CDAUDIO_H_ #define _CDAUDIO_H_ diff --git a/backends/platform/ds/arm9/source/console2.h b/backends/platform/ds/arm9/source/console2.h index 86434dcb93..6b9a677cc7 100644 --- a/backends/platform/ds/arm9/source/console2.h +++ b/backends/platform/ds/arm9/source/console2.h @@ -25,7 +25,7 @@ // // Changelog: // 0.1: First version -// 0.2: Fixed sprite mapping bug. 1D mapping should work now. +// 0.2: Fixed sprite mapping bug. 1D mapping should work now. // Changed some register defines for consistency. // ////////////////////////////////////////////////////////////////////// @@ -87,7 +87,7 @@ void consoleClear(void); // // Changelog: // 0.1: First version -// 0.2: Fixed sprite mapping bug. 1D mapping should work now. +// 0.2: Fixed sprite mapping bug. 1D mapping should work now. // Changed some register defines for consistency. // ////////////////////////////////////////////////////////////////////// diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index 55ec5004c4..efa60015fb 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + // - Remove scummconsole.c // - Delete files @@ -55,6 +55,11 @@ // - Alternative controls? +// - Fix 512x256 backbuffer to 320x240 - Done +// - Fix keyboard appearing on wrong screen - Done +// - Volume amplify option +// - Make save/restore game screen use scaler buffer + //#define USE_LIBCARTRESET @@ -158,7 +163,6 @@ bool bufferFirstHalf; bool bufferSecondHalf; // Saved buffers -u8* savedBuffer = NULL; bool highBuffer; bool displayModeIs8Bit = false; @@ -211,36 +215,41 @@ int gameHeight = 200; // Scale bool twoHundredPercentFixedScale = false; bool cpuScalerEnable = false; -#define NUM_SUPPORTED_GAMES 17 +#define NUM_SUPPORTED_GAMES 20 #ifdef USE_PROFILER int hBlankCount = 0; #endif +u8* scalerBackBuffer = NULL; + gameListType gameList[NUM_SUPPORTED_GAMES] = { // Unknown game - use normal SCUMM controls - {"unknown", CONT_SCUMM_ORIGINAL}, - + {"unknown", CONT_SCUMM_ORIGINAL}, + // SCUMM games {"maniac", CONT_SCUMM_ORIGINAL}, {"zak", CONT_SCUMM_ORIGINAL}, {"loom", CONT_SCUMM_ORIGINAL}, {"indy3", CONT_SCUMM_ORIGINAL}, - {"atlantis", CONT_SCUMM_ORIGINAL}, + {"atlantis", CONT_SCUMM_ORIGINAL}, {"monkey", CONT_SCUMM_ORIGINAL}, {"monkey2", CONT_SCUMM_ORIGINAL}, - {"tentacle", CONT_SCUMM_ORIGINAL}, + {"tentacle", CONT_SCUMM_ORIGINAL}, {"samnmax", CONT_SCUMM_SAMNMAX}, - + // Non-SCUMM games {"sky", CONT_SKY}, {"simon1", CONT_SIMON}, {"simon2", CONT_SIMON}, - {"gob", CONT_GOBLINS}, + {"gob", CONT_GOBLINS}, {"queen", CONT_SCUMM_ORIGINAL}, {"cine", CONT_FUTURE_WARS}, - {"agi", CONT_AGI} + {"agi", CONT_AGI}, + {"elvira2", CONT_SIMON}, + {"elvira1", CONT_SIMON}, + {"waxworks", CONT_SIMON}, }; gameListType* currentGame = NULL; @@ -277,13 +286,14 @@ void updateStatus(); void triggerIcon(int imageNum); void setIcon(int num, int x, int y, int imageNum, int flags, bool enable); void setIconMain(int num, int x, int y, int imageNum, int flags, bool enable); +void uploadSpriteGfx(); TransferSound soundControl; bool isCpuScalerEnabled() { - return cpuScalerEnable; + return cpuScalerEnable || !displayModeIs8Bit; } @@ -298,11 +308,11 @@ void setCpuScalerEnable(bool enable) { //plays an 8 bit mono sample at 11025Hz void playSound(const void* data, u32 length, bool loop, bool adpcm, int rate) { - + if (!IPC->soundData) { soundControl.count = 0; } - + soundControl.data[soundControl.count].data = data; soundControl.data[soundControl.count].len = length | (loop? 0x80000000: 0x00000000); soundControl.data[soundControl.count].rate = rate; // 367 samples per frame @@ -322,8 +332,14 @@ void stopSound(int channel) { void updateOAM() { DC_FlushAll(); - dmaCopy(sprites, OAM_SUB, 128 * sizeof(SpriteEntry)); - dmaCopy(spritesMain, OAM, 128 * sizeof(SpriteEntry)); + + if (gameScreenSwap) { + dmaCopy(sprites, OAM, 128 * sizeof(SpriteEntry)); + dmaCopy(spritesMain, OAM_SUB, 128 * sizeof(SpriteEntry)); + } else { + dmaCopy(sprites, OAM_SUB, 128 * sizeof(SpriteEntry)); + dmaCopy(spritesMain, OAM, 128 * sizeof(SpriteEntry)); + } } void setGameSize(int width, int height) { @@ -346,65 +362,29 @@ void initSprites() { sprites[i].attribute[2] = 0; sprites[i].attribute[3] = 0; } - + for (int i = 0; i < 128; i++) { spritesMain[i].attribute[0] = ATTR0_DISABLED; spritesMain[i].attribute[1] = 0; spritesMain[i].attribute[2] = 0; spritesMain[i].attribute[3] = 0; } - + updateOAM(); } void saveGameBackBuffer() { -#ifndef ENABLE_SCUMM - if (savedBuffer == NULL) savedBuffer = new u8[gameWidth * gameHeight]; - for (int r = 0; r < gameHeight; r++) { - - u16* dst = (u16 *) (savedBuffer + (r * gameWidth)); - u16* src = BG_GFX_SUB + (r * 256); - for (int x = 0; x < gameWidth >> 1; x++) - { - *dst++ = *src++; - } - } -#endif + // Sometimes the only copy of the game screen is in video memory. + // So, I lock the video memory here, as if I'm going to modify it. This + // forces OSystem_DS to create a system memory copy if one doesn't exist. + // This will be automatially resotred by OSystem_DS::updateScreen(). + + OSystem_DS::instance()->lockScreen(); + OSystem_DS::instance()->unlockScreen(); } -void restoreGameBackBuffer() { -#ifndef ENABLE_SCUMM - if (savedBuffer) { - for (int r = 0; r < gameHeight; r++) { - - u16* dst = get8BitBackBuffer() + (r * 256); - u16* dst2 = BG_GFX_SUB + (r * 256); - u16* src = ((u16 *) (savedBuffer)) + (r * (gameWidth >> 1)); - - for (int x = 0; x < gameWidth >> 1; x++) - { - *dst++ = *src; - *dst2++ = *src++; - } - - } - - delete savedBuffer; - savedBuffer = NULL; - } -#else - memset(get8BitBackBuffer(), 0, 512 * 256); - memset(BG_GFX_SUB, 0, 512 * 256); - if (Scumm::g_scumm) { - Scumm::g_scumm->markRectAsDirty(Scumm::kMainVirtScreen, 0, gameWidth - 1, 0, gameHeight - 1, 1); - Scumm::g_scumm->markRectAsDirty(Scumm::kTextVirtScreen, 0, gameWidth - 1, 0, gameHeight - 1, 1); - Scumm::g_scumm->markRectAsDirty(Scumm::kVerbVirtScreen, 0, gameWidth - 1, 0, gameHeight - 1, 1); - } -#endif - -} void startSound(int freq, int buffer) { @@ -414,22 +394,22 @@ void startSound(int freq, int buffer) { bufferFirstHalf = false; bufferSecondHalf = true; - + int bytes = (2 * (bufferSamples)) + 100; - + soundBuffer = (s16 *) malloc(bytes * 2); if (!soundBuffer) consolePrintf("Sound buffer alloc failed\n"); soundHiPart = true; - + for (int r = 0; r < bytes; r++) { soundBuffer[r] = 0; } soundFrequency = freq; - + swiWaitForVBlank(); swiWaitForVBlank(); @@ -461,14 +441,14 @@ void initGame() { consolePrintf("\n\n\n\nCurrent game: '%s' %d\n", gameName, gameName[0]); currentGame = &gameList[0]; // Default game - + for (int r = 0; r < NUM_SUPPORTED_GAMES; r++) { if (!stricmp(gameName, gameList[r].gameId)) { currentGame = &gameList[r]; // consolePrintf("Game list num: %d\n", currentGame); } } - + if (firstTime) { firstTime = false; @@ -515,7 +495,7 @@ void displayMode8Bit() { consolePrintf("displayMode8Bit..."); #endif u16 buffer[32 * 32]; - + setKeyboardEnable(false); if (!displayModeIs8Bit) { @@ -524,49 +504,62 @@ void displayMode8Bit() { } } + consoleInitDefault((u16*)SCREEN_BASE_BLOCK(2), (u16*)CHAR_BASE_BLOCK(0), 16); + consolePrintSet(0, 23); + + if (!displayModeIs8Bit) { + for (int r = 0; r < 32 * 32; r++) { + ((u16 *) SCREEN_BASE_BLOCK(2))[r] = buffer[r]; + } +// dmaCopyHalfWords(3, (u16 *) SCREEN_BASE_BLOCK(0), buffer, 32 * 32 * 2); + } + + displayModeIs8Bit = true; + if (isCpuScalerEnabled()) { - videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); + videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); videoSetModeSub(MODE_3_2D /*| DISPLAY_BG0_ACTIVE*/ | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text - + vramSetBankA(VRAM_A_MAIN_BG_0x06000000); vramSetBankB(VRAM_B_MAIN_BG_0x06020000); - + vramSetBankC(VRAM_C_SUB_BG_0x06200000); - vramSetBankD(VRAM_D_MAIN_BG_0x06040000); - + vramSetBankD(VRAM_D_SUB_SPRITE); + vramSetBankH(VRAM_H_LCD); - + BG3_CR = BG_BMP16_256x256 | BG_BMP_BASE(8); BG3_XDX = 256; BG3_XDY = 0; BG3_YDX = 0; BG3_YDY = (int) ((200.0f / 192.0f) * 256); + } else { - videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); + videoSetMode(MODE_5_2D | (consoleEnable? DISPLAY_BG0_ACTIVE: 0) | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); videoSetModeSub(MODE_3_2D /*| DISPLAY_BG0_ACTIVE*/ | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text - + vramSetBankA(VRAM_A_MAIN_BG_0x06000000); vramSetBankB(VRAM_B_MAIN_BG_0x06020000); - + vramSetBankC(VRAM_C_SUB_BG_0x06200000); - vramSetBankD(VRAM_D_MAIN_BG_0x06040000); - + vramSetBankD(VRAM_D_SUB_SPRITE); + vramSetBankH(VRAM_H_LCD); - + BG3_CR = BG_BMP8_512x256 | BG_BMP_BASE(8); - + BG3_XDX = (int) (((float) (gameWidth) / 256.0f) * 256); BG3_XDY = 0; BG3_YDX = 0; BG3_YDY = (int) ((200.0f / 192.0f) * 256); - } - + } + SUB_BG3_CR = BG_BMP8_512x256; - + SUB_BG3_XDX = (int) (subScreenWidth / 256.0f * 256); SUB_BG3_XDY = 0; SUB_BG3_YDX = 0; @@ -578,35 +571,29 @@ void displayMode8Bit() { BG0_CR = BG_MAP_BASE(2) | BG_TILE_BASE(0); BG0_Y0 = 0; - - // Restore palette entry used by text in the front-end + + // Restore palette entry used by text in the front-end // PALETTE_SUB[255] = savedPalEntry255; - - consoleInitDefault((u16*)SCREEN_BASE_BLOCK(2), (u16*)CHAR_BASE_BLOCK(0), 16); - consolePrintSet(0, 23); - - if (!displayModeIs8Bit) { - for (int r = 0; r < 32 * 32; r++) { - ((u16 *) SCREEN_BASE_BLOCK(2))[r] = buffer[r]; - } -// dmaCopyHalfWords(3, (u16 *) SCREEN_BASE_BLOCK(0), buffer, 32 * 32 * 2); - } - + + initGame(); - - if (!displayModeIs8Bit) restoreGameBackBuffer(); - displayModeIs8Bit = true; + #ifdef HEAVY_LOGGING consolePrintf("done\n"); #endif + if (gameScreenSwap) { + POWER_CR |= POWER_SWAP_LCDS; + } else { + POWER_CR &= ~POWER_SWAP_LCDS; + } - POWER_CR &= ~POWER_SWAP_LCDS; - + uploadSpriteGfx(); + keyboardEnable = false; - + } void setGameID(int id) { @@ -619,22 +606,22 @@ void dummyHandler() { void checkSleepMode() { if (IPC->performArm9SleepMode) { - + consolePrintf("ARM9 Entering sleep mode\n"); - + int intSave = REG_IE; irqSet(IRQ_VBLANK, dummyHandler); // int irqHandlerSave = (int) IRQ_HANDLER; REG_IE = IRQ_VBLANK; //IRQ_HANDLER = dummyHandler; - + int powerSave = POWER_CR; POWER_CR &= ~POWER_ALL; - + while (IPC->performArm9SleepMode) { swiWaitForVBlank(); } - + POWER_CR = powerSave; // IRQ_HANDLER = (void (*)()) irqHandlerSave; irqSet(IRQ_VBLANK, VBlankHandler); @@ -671,47 +658,57 @@ void setCursorIcon(const u8* icon, uint w, uint h, byte keycolor, int hotspotX, { int off = 128*64; - - + + memset(SPRITE_GFX + off, 0, 32 * 32 * 2); - + memset(SPRITE_GFX_SUB + off, 0, 32 * 32 * 2); + for (uint y=0; ycontrol != CONT_SCUMM_SAMNMAX) return; uint16 border = RGB15(24,24,24) | 0x8000; - - - int off = 48*64; + + + int off = 176*64; memset(SPRITE_GFX_SUB+off, 0, 64*64*2); - + memset(SPRITE_GFX+off, 0, 64*64*2); + int pos = 190 - (w+2); + - - + // make border for (uint i=0; i> 1; for (uint y=0; yplayingSection; r < IPC->playingSection + 4; r++) { int chunk = r & 3; - + if (IPC->fillNeeded[chunk]) { IPC->fillNeeded[chunk] = false; DC_FlushAll(); @@ -910,9 +929,9 @@ void doSoundCallback() { IPC->fillNeeded[chunk] = false; DC_FlushAll(); } - + } - + } #ifdef HEAVY_LOGGING consolePrintf("done\n"); @@ -924,7 +943,7 @@ void doTimerCallback() { if (callbackTimer <= 0) { callbackTimer += callbackInterval; callback(callbackInterval); - } + } } } @@ -933,15 +952,15 @@ void soundUpdate() { // playSound(soundBuffer, (bufferSamples * 2), true); } // consolePrintf("%x\n", IPC->test); - - + + if (bufferFrame == 0) { // bufferFirstHalf = true; - } + } if (bufferFrame == bufferSize >> 1) { //bufferSecondHalf = true; - } - + } + bufferFrame++; if (bufferFrame == bufferSize) { bufferFrame = 0; @@ -954,20 +973,20 @@ void memoryReport() { do { p = (int *) malloc(r * 8192); free(p); - r++; + r++; } while ((p) && (r < 512)); - + int t = -1; void* block[1024]; do { t++; block[t] = (int *) malloc(4096); - } while ((t < 1024) && (block[t])); - + } while ((t < 1024) && (block[t])); + for (int q = 0; q < t; q++) { free(block[q]); } - + consolePrintf("Free: %dK, Largest: %dK\n", t * 4, r * 8); } @@ -978,7 +997,7 @@ void addIndyFightingKeys() { event.type = Common::EVENT_KEYDOWN; event.kbd.flags = 0; - + // consolePrintf("Fight keys\n"); if ((getKeysDown() & KEY_L)) { @@ -1008,16 +1027,16 @@ void addIndyFightingKeys() { event.kbd.keycode = Common::KEYCODE_6; event.kbd.ascii = '6'; system->addEvent(event); - } + } if ((getKeysChanged() & KEY_DOWN)) { event.type = getKeyEvent(KEY_DOWN); event.kbd.keycode = Common::KEYCODE_2; event.kbd.ascii = '2'; system->addEvent(event); } - + if (indyFightRight) { - + if ((getKeysChanged() & KEY_X)) { event.type = getKeyEvent(KEY_X); event.kbd.keycode = Common::KEYCODE_9; @@ -1035,7 +1054,7 @@ void addIndyFightingKeys() { event.kbd.keycode = Common::KEYCODE_3; event.kbd.ascii = '3'; system->addEvent(event); - } + } } else { @@ -1056,18 +1075,18 @@ void addIndyFightingKeys() { event.kbd.keycode = Common::KEYCODE_1; event.kbd.ascii = '1'; system->addEvent(event); - } - + } + } - - + + if ((getKeysChanged() & KEY_Y)) { event.type = getKeyEvent(KEY_Y); event.kbd.keycode = Common::KEYCODE_5; event.kbd.ascii = '5'; system->addEvent(event); } -} +} void setKeyboardEnable(bool en) { @@ -1079,8 +1098,8 @@ void setKeyboardEnable(bool en) { DS::drawKeyboard(1, 15, backupBank); - - + + SUB_BG1_CR = BG_TILE_BASE(1) | BG_MAP_BASE(15); if (displayModeIs8Bit) { @@ -1090,7 +1109,11 @@ void setKeyboardEnable(bool en) { SUB_DISPLAY_CR |= DISPLAY_BG1_ACTIVE; // Turn on keyboard layer SUB_DISPLAY_CR &= ~DISPLAY_BG0_ACTIVE; // Turn off console layer } - lcdSwap(); + + // Ensure the keyboard is on the lower screen + POWER_CR |= POWER_SWAP_LCDS; + + } else { @@ -1098,26 +1121,38 @@ void setKeyboardEnable(bool en) { for (int r = 0; r < 256; r++) { BG_PALETTE_SUB[r] = BG_PALETTE[r]; } - - + + //restoreVRAM(1, 12, backupBank); - + if (displayModeIs8Bit) { // Copy the sub screen VRAM from the top screen - they should always be // the same. u16* buffer = get8BitBackBuffer(); + s32 stride = get8BitBackBufferStride(); + for (int y = 0; y < gameHeight; y++) { + for (int x = 0; x < gameWidth; x++) { + BG_GFX_SUB[y * 256 + x] = buffer[(y * (stride / 2)) + x]; + } + } +/* for (int r = 0; r < (512 * 256) >> 1; r++) BG_GFX_SUB[r] = buffer[r]; - + */ SUB_DISPLAY_CR &= ~DISPLAY_BG1_ACTIVE; // Turn off keyboard layer SUB_DISPLAY_CR |= DISPLAY_BG3_ACTIVE; // Turn on game layer } else { SUB_DISPLAY_CR &= ~DISPLAY_BG1_ACTIVE; // Turn off keyboard layer SUB_DISPLAY_CR |= DISPLAY_BG0_ACTIVE; // Turn on console layer } - - lcdSwap(); + + // Restore the screens so they're the right way round + if (gameScreenSwap) { + POWER_CR |= POWER_SWAP_LCDS; + } else { + POWER_CR &= ~POWER_SWAP_LCDS; + } } } @@ -1136,7 +1171,7 @@ void addEventsToQueue() { OSystem_DS* system = OSystem_DS::instance(); Common::Event event; - + #ifdef USE_PROFILER if (keysDown() & KEY_R) { cygprofile_begin(); @@ -1148,7 +1183,7 @@ void addEventsToQueue() { } #endif - + if (system->isEventQueueEmpty()) { /* @@ -1157,7 +1192,7 @@ void addEventsToQueue() { consolePrintf("Tweak: %d\n", tweak); IPC->tweakChanged = true; } - + if (getKeysDown() & KEY_R) { tweak++; @@ -1173,14 +1208,14 @@ void addEventsToQueue() { if (!indyFightState) { - if ((!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R)) && (getKeysDown() & KEY_B)) { + if ((!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R)) && (getKeysDown() & KEY_B)) { if (currentGame->control == CONT_AGI) { event.kbd.keycode = Common::KEYCODE_RETURN; event.kbd.ascii = 13; event.kbd.flags = 0; } else { - event.kbd.keycode = Common::KEYCODE_ESCAPE; - event.kbd.ascii = 27; + event.kbd.keycode = Common::KEYCODE_ESCAPE; + event.kbd.ascii = 27; event.kbd.flags = 0; } @@ -1190,11 +1225,11 @@ void addEventsToQueue() { event.type = Common::EVENT_KEYUP; system->addEvent(event); } - + } - - - + + + if ((!getIndyFightState()) && (getKeysDown() & KEY_Y)) { consoleEnable = !consoleEnable; if (displayModeIs8Bit) { @@ -1203,7 +1238,7 @@ void addEventsToQueue() { displayMode16Bit(); } } - + if ((getKeyboardEnable())) { event.kbd.flags = 0; @@ -1211,30 +1246,30 @@ void addEventsToQueue() { bool release = getKeysReleased() & (KEY_LEFT | KEY_RIGHT | KEY_UP | KEY_DOWN); bool shoulders = getKeysHeld() & (KEY_L | KEY_R); - if ( (down && (!shoulders)) || release) + if ( (down && (!shoulders)) || release) { - + if (getKeysChanged() & KEY_LEFT) { event.kbd.keycode = Common::KEYCODE_LEFT; event.kbd.ascii = 0; event.type = getKeyEvent(KEY_LEFT); system->addEvent(event); } - + if (getKeysChanged() & KEY_RIGHT) { event.kbd.keycode = Common::KEYCODE_RIGHT; event.kbd.ascii = 0; event.type = getKeyEvent(KEY_RIGHT); system->addEvent(event); } - + if (getKeysChanged() & KEY_UP) { event.kbd.keycode = Common::KEYCODE_UP; event.kbd.ascii = 0; event.type = getKeyEvent(KEY_UP); system->addEvent(event); } - + if (getKeysChanged() & KEY_DOWN) { event.kbd.keycode = Common::KEYCODE_DOWN; event.kbd.ascii = 0; @@ -1242,15 +1277,22 @@ void addEventsToQueue() { system->addEvent(event); } } - + } - + if (!((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) && (!getIndyFightState()) && (!getKeyboardEnable())) { if ((getKeysDown() & KEY_A) && (!indyFightState)) { gameScreenSwap = !gameScreenSwap; - } + if (gameScreenSwap) { + POWER_CR |= POWER_SWAP_LCDS; + } else { + POWER_CR &= ~POWER_SWAP_LCDS; + } + + } + if (!getPenHeld() || (mouseMode != MOUSE_HOVER)) { if (getKeysDown() & KEY_LEFT) { mouseMode = MOUSE_LEFT; @@ -1264,7 +1306,7 @@ void addEventsToQueue() { system->addEvent(event); rightButtonDown = false; } - + if (getKeysDown() & KEY_RIGHT) { if ((currentGame->control != CONT_SCUMM_SAMNMAX) && (currentGame->control != CONT_FUTURE_WARS) && (currentGame->control != CONT_GOBLINS)) { @@ -1281,13 +1323,13 @@ void addEventsToQueue() { } else { event.mouse = Common::Point(getPenX(), getPenY()); } - + rightButtonDown = true; - + event.type = Common::EVENT_RBUTTONDOWN; system->addEvent(event); - + //event.type = Common::EVENT_RBUTTONUP; //system->addEvent(event); } @@ -1299,9 +1341,9 @@ void addEventsToQueue() { mouseMode = MOUSE_HOVER; } } - - - + + + } if ((getKeysDown() & KEY_SELECT)) { @@ -1310,18 +1352,18 @@ void addEventsToQueue() { showOptionsDialog(); } - + } - + if (!getIndyFightState() && !((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) && (getKeysDown() & KEY_X)) { setKeyboardEnable(!keyboardEnable); } - - updateStatus(); - + + updateStatus(); + Common::Event event; - + if (!keyboardEnable) { if ((!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R))) { @@ -1332,12 +1374,12 @@ void addEventsToQueue() { } if ((mouseMode != MOUSE_HOVER) || (!displayModeIs8Bit)) { - if (getPenDown() && (!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R))) { + if (getPenDown() && (!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R))) { event.type = ((mouseMode == MOUSE_LEFT) || (!displayModeIs8Bit))? Common::EVENT_LBUTTONDOWN: Common::EVENT_RBUTTONDOWN; event.mouse = Common::Point(getPenX(), getPenY()); system->addEvent(event); } - + if (getPenReleased()) { event.type = mouseMode == MOUSE_LEFT? Common::EVENT_LBUTTONUP: Common::EVENT_RBUTTONUP; event.mouse = Common::Point(getPenX(), getPenY()); @@ -1345,36 +1387,37 @@ void addEventsToQueue() { } } else { // In hover mode, D-pad left and right click the mouse when the pen is on the screen - + if (getPenHeld()) { if (getKeysDown() & KEY_LEFT) { event.type = Common::EVENT_LBUTTONDOWN; event.mouse = Common::Point(getPenX(), getPenY()); system->addEvent(event); } - /* if (getKeysReleased() & KEY_LEFT) { + if (getKeysReleased() & KEY_LEFT) { event.type = Common::EVENT_LBUTTONUP; event.mouse = Common::Point(getPenX(), getPenY()); system->addEvent(event); - }*/ + } + if (getKeysDown() & KEY_RIGHT) { event.type = Common::EVENT_RBUTTONDOWN; event.mouse = Common::Point(getPenX(), getPenY()); system->addEvent(event); } - /*if (getKeysReleased() & KEY_RIGHT) { + if (getKeysReleased() & KEY_RIGHT) { event.type = Common::EVENT_RBUTTONUP; event.mouse = Common::Point(getPenX(), getPenY()); system->addEvent(event); - }*/ + } } } - + if (((!(getKeysHeld() & KEY_L)) && (!(getKeysHeld() & KEY_R)) || (indyFightState)) && (displayModeIs8Bit)) { // Controls specific to the control method - - + + if (currentGame->control == CONT_SKY) { // Extra controls for Beneath a Steel Sky if ((getKeysDown() & KEY_DOWN)) { @@ -1387,7 +1430,7 @@ void addEventsToQueue() { // Extra controls for Simon the Sorcerer if ((getKeysDown() & KEY_DOWN)) { Common::Event event; - + event.type = Common::EVENT_KEYDOWN; event.kbd.keycode = Common::KEYCODE_F10; // F10 or # - show hotspots event.kbd.ascii = Common::ASCII_F10; @@ -1400,13 +1443,13 @@ void addEventsToQueue() { } } - - + + if (currentGame->control == CONT_SCUMM_ORIGINAL) { // Extra controls for Scumm v1-5 games if ((getKeysDown() & KEY_DOWN)) { Common::Event event; - + event.type = Common::EVENT_KEYDOWN; event.kbd.keycode = Common::KEYCODE_PERIOD; // Full stop - skips current dialogue line event.kbd.ascii = '.'; @@ -1416,19 +1459,19 @@ void addEventsToQueue() { event.type = Common::EVENT_KEYUP; system->addEvent(event); } - + if (indyFightState) { addIndyFightingKeys(); } - + } - + } } - + if (!displayModeIs8Bit) { // Front end controls - + if (leftHandedSwap(getKeysChanged()) & KEY_UP) { event.type = getKeyEvent(leftHandedSwap(KEY_UP)); event.kbd.keycode = Common::KEYCODE_UP; @@ -1455,10 +1498,10 @@ void addEventsToQueue() { event.type = Common::EVENT_KEYUP; system->addEvent(event); } - + } - + if ((getKeysChanged() & KEY_START)) { event.type = getKeyEvent(KEY_START); if (currentGame->control == CONT_FUTURE_WARS) { @@ -1477,38 +1520,37 @@ void addEventsToQueue() { // consolePrintf("!!!!!F5!!!!!"); } event.kbd.flags = 0; - consolePrintf("!!!!!F5!!!!!"); system->addEvent(event); } - + if (keyboardEnable) { DS::addKeyboardEvents(); } - + consumeKeys(); - + consumePenEvents(); } } - + void triggerIcon(int imageNum) { triggeredIcon = imageNum; - triggeredIconTimeout = 120; + triggeredIconTimeout = 120; } - + void setIcon(int num, int x, int y, int imageNum, int flags, bool enable) { - sprites[num].attribute[0] = ATTR0_BMP | (enable? y: 192) | (!enable? ATTR0_DISABLED: 0); + sprites[num].attribute[0] = ATTR0_BMP | (enable? y: 192) | (!enable? ATTR0_DISABLED: 0); sprites[num].attribute[1] = ATTR1_SIZE_32 | x | flags; sprites[num].attribute[2] = ATTR2_ALPHA(1)| (imageNum * 16); } void setIconMain(int num, int x, int y, int imageNum, int flags, bool enable) { - spritesMain[num].attribute[0] = ATTR0_BMP | (y & 0xFF) | (!enable? ATTR0_DISABLED: 0); + spritesMain[num].attribute[0] = ATTR0_BMP | (y & 0xFF) | (!enable? ATTR0_DISABLED: 0); spritesMain[num].attribute[1] = ATTR1_SIZE_32 | (x & 0x1FF) | flags; spritesMain[num].attribute[2] = ATTR2_ALPHA(1)| (imageNum * 16); } @@ -1536,16 +1578,16 @@ void updateStatus() { break; } } - + setIcon(0, 208, 150, offs, 0, true); - + if (indyFightState) { setIcon(1, (190 - 32), 150, 3, (indyFightRight? 0: ATTR1_FLIP_X), true); // consolePrintf("%d\n", indyFightRight); } else { // setIcon(1, 0, 0, 0, 0, false); } - + if (triggeredIconTimeout > 0) { triggeredIconTimeout--; setIcon(4, 16, 150, triggeredIcon, 0, true); @@ -1584,30 +1626,32 @@ void soundBufferEmptyHandler() { } else { // bufferFirstHalf = true; } - + soundHiPart = !soundHiPart; } void setMainScreenScroll(int x, int y) { - if (gameScreenSwap) { +/* if (gameScreenSwap) { SUB_BG3_CX = x + (((frameCount & 1) == 0)? 64: 0); SUB_BG3_CY = y; - } else { + } else */{ BG3_CX = x + (((frameCount & 1) == 0)? 64: 0); BG3_CY = y; - - touchX = x >> 8; - touchY = y >> 8; + + if (!gameScreenSwap) { + touchX = x >> 8; + touchY = y >> 8; + } } } void setMainScreenScale(int x, int y) { - if (gameScreenSwap) { +/* if (gameScreenSwap) { SUB_BG3_XDX = x; SUB_BG3_XDY = 0; SUB_BG3_YDX = 0; SUB_BG3_YDY = y; - } else { + } else*/ { if (isCpuScalerEnabled() && (x==320)) { BG3_XDX = 256; @@ -1616,41 +1660,54 @@ void setMainScreenScale(int x, int y) { BG3_YDY = y; } else - { + { BG3_XDX = x; BG3_XDY = 0; BG3_YDX = 0; BG3_YDY = y; } - - touchScX = x; - touchScY = y; + + if (!gameScreenSwap) { + touchScX = x; + touchScY = y; + } } } void setZoomedScreenScroll(int x, int y, bool shake) { - if (gameScreenSwap) { +/* if (gameScreenSwap) { BG3_CX = x + ((shake && ((frameCount & 1) == 0))? 64: 0); BG3_CY = y; - + touchX = x >> 8; touchY = y >> 8; - } else { + } else */{ + + if (gameScreenSwap) { + touchX = x >> 8; + touchY = y >> 8; + } + + SUB_BG3_CX = x + ((shake && (frameCount & 1) == 0)? 64: 0); SUB_BG3_CY = y; } } void setZoomedScreenScale(int x, int y) { - if (gameScreenSwap) { +/* if (gameScreenSwap) { BG3_XDX = x; BG3_XDY = 0; BG3_YDX = 0; BG3_YDY = y; - touchScX = x; - touchScY = y; - } else { + } else */{ + + if (gameScreenSwap) { + touchScX = x; + touchScY = y; + } + SUB_BG3_XDX = x; SUB_BG3_XDY = 0; SUB_BG3_YDX = 0; @@ -1684,7 +1741,7 @@ void VBlankHandler(void) { soundUpdate(); - + if ((!gameScreenSwap) && (!(getKeysHeld() & KEY_L) && !(getKeysHeld() & KEY_R))) { if (currentGame) { @@ -1699,14 +1756,14 @@ void VBlankHandler(void) { } } } - + penUpdate(); keysUpdate(); frameCount++; - + if ((cursorEnable) && (mouseCursorVisible)) { if (!keyboardEnable) { @@ -1725,31 +1782,31 @@ void VBlankHandler(void) { if (callback) { callbackTimer -= FRAME_TIME; } - + if ((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) { - + if ((!dragging) && (getPenHeld()) && (penDownFrames > 5)) { dragging = true; dragStartX = penX; dragStartY = penY; - + if (gameScreenSwap) { dragScX = subScTargetX; dragScY = subScTargetY; } else { dragScX = scX; - dragScY = scY; - } - - + dragScY = scY; + } + + } - + if ((dragging) && (!getPenHeld())) { dragging = false; } - + if (dragging) { - + if (gameScreenSwap) { subScTargetX = dragScX + ((dragStartX - penX) << 8); subScTargetY = dragScY + ((dragStartY - penY) << 8); @@ -1757,18 +1814,18 @@ void VBlankHandler(void) { scX = dragScX + ((dragStartX - penX)); scY = dragScY + ((dragStartY - penY)); } - + // consolePrintf("X:%d Y:%d\n", dragStartX - penX, dragStartY - penY); } - } - - + } + + /* if ((frameCount & 1) == 0) { SUB_BG3_CX = subScX; } else { SUB_BG3_CX = subScX + 64; } - + SUB_BG3_CY = subScY + (shakePos << 8);*/ /*SUB_BG3_XDX = (int) (subScreenWidth / 256.0f * 256); @@ -1777,40 +1834,40 @@ void VBlankHandler(void) { SUB_BG3_YDY = (int) (subScreenHeight / 192.0f * 256);*/ static int ratio = ( 320 << 8) / SCUMM_GAME_WIDTH; - + bool zooming = false; - + if ((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) { if ((getKeysHeld() & KEY_A) && (subScreenScale < ratio)) { subScreenScale += 1; zooming = true; } - + if ((getKeysHeld() & KEY_B) && (subScreenScale > 128)) { subScreenScale -=1; zooming = true; } } - + int xCenter = subScTargetX + ((subScreenWidth >> 1) << 8); int yCenter = subScTargetY + ((subScreenHeight >> 1) << 8); - + if (twoHundredPercentFixedScale) { subScreenWidth = 256 >> 1; subScreenHeight = 192 >> 1; } else { subScreenWidth = (((SCUMM_GAME_HEIGHT * 256) / 192) * subScreenScale) >> 8; subScreenHeight = SCUMM_GAME_HEIGHT * subScreenScale >> 8; - + if ( ((subScreenWidth) > 256 - 8) && ((subScreenWidth) < 256 + 8) ) { subScreenWidth = 256; subScreenHeight = 192; if (zooming) { subScX = subScTargetX; subScY = subScTargetY; - triggerIcon(5); + triggerIcon(5); } } else if ( ((subScreenWidth) > 128 - 8) && ((subScreenWidth) < 128 + 8) ) { subScreenWidth = 128; @@ -1832,13 +1889,13 @@ void VBlankHandler(void) { //triggerIcon(-1); } } - + subScTargetX = xCenter - ((subScreenWidth >> 1) << 8); subScTargetY = yCenter - ((subScreenHeight >> 1) << 8); + - - + if (subScTargetX < 0) subScTargetX = 0; if (subScTargetX > (gameWidth - subScreenWidth) << 8) subScTargetX = (gameWidth - subScreenWidth) << 8; @@ -1850,30 +1907,30 @@ void VBlankHandler(void) { subScX += (subScTargetX - subScX) >> 2; subScY += (subScTargetY - subScY) >> 2; - + if (displayModeIs8Bit) { - + if ((getKeysHeld() & KEY_L) || (getKeysHeld() & KEY_R)) { - + int offsX = 0, offsY = 0; if (getKeysHeld() & KEY_LEFT) { offsX -= 1; } - + if (getKeysHeld() & KEY_RIGHT) { offsX += 1; } - + if (getKeysHeld() & KEY_UP) { offsY -= 1; } - + if (getKeysHeld() & KEY_DOWN) { offsY += 1; } - + if (((gameScreenSwap) && (getKeysHeld() & KEY_L)) || ((!gameScreenSwap) && (getKeysHeld() & KEY_R))) { subScTargetX += offsX << 8; subScTargetY += offsY << 8; @@ -1884,32 +1941,32 @@ void VBlankHandler(void) { } if (!scaledMode) { - + if (scX + 256 > gameWidth - 1) { scX = gameWidth - 1 - 256; } - + if (scX < 0) { scX = 0; } - + if (scY + 192 > gameHeight - 1) { scY = gameHeight - 1 - 192; } - + if (scY < 0) { scY = 0; } - + setZoomedScreenScroll(subScX, subScY, (subScreenWidth != 256) && (subScreenWidth != 128)); setZoomedScreenScale(subScreenWidth, ((subScreenHeight * (256 << 8)) / 192) >> 8); - - + + setMainScreenScroll(scX << 8, (scY << 8) + (shakePos << 8)); setMainScreenScale(256, 256); // 1:1 scale - + } else { - + if (scY > gameHeight - 192 - 1) { scY = gameHeight - 192 - 1; } @@ -1917,13 +1974,13 @@ void VBlankHandler(void) { if (scY < 0) { scY = 0; } - + setZoomedScreenScroll(subScX, subScY, (subScreenWidth != 256) && (subScreenWidth != 128)); setZoomedScreenScale(subScreenWidth, ((subScreenHeight * (256 << 8)) / 192) >> 8); - + setMainScreenScroll(64, (scY << 8) + (shakePos << 8)); setMainScreenScale(320, 256); // 1:1 scale - + } } else { setZoomedScreenScroll(0, 0, true); @@ -1932,12 +1989,12 @@ void VBlankHandler(void) { setMainScreenScroll(0, 0); setMainScreenScale(320, 256); // 1:1 scale } - + // Enable on screen keyboard when pen taps icon if ((keyboardIcon) && (penX < 32) && (penY > 160) && (penHeld)) { setKeyboardEnable(true); } - + if (keyboardEnable) { if (DS::getKeyboardClosed()) { setKeyboardEnable(false); @@ -1987,7 +2044,7 @@ void setTopScreenTarget(int x, int y) { if (subScTargetY < 0) subScTargetY = 0; if (subScTargetY > gameHeight - subScreenHeight) subScTargetY = gameHeight - subScreenHeight; - + subScTargetX <<=8; subScTargetY <<=8; } @@ -2000,6 +2057,19 @@ void hBlankHandler() { } #endif +void uploadSpriteGfx() { + vramSetBankD(VRAM_D_SUB_SPRITE); + vramSetBankE(VRAM_E_MAIN_SPRITE); + + // Convert texture from 24bit 888 to 16bit 1555, remembering to set top bit! + u8* srcTex = (u8 *) icons_raw; + for (int r = 32 * 256 ; r >= 0; r--) { + SPRITE_GFX_SUB[r] = 0x8000 | (srcTex[r * 3] >> 3) | ((srcTex[r * 3 + 1] >> 3) << 5) | ((srcTex[r * 3 + 2] >> 3) << 10); + SPRITE_GFX[r] = 0x8000 | (srcTex[r * 3] >> 3) | ((srcTex[r * 3 + 1] >> 3) << 5) | ((srcTex[r * 3 + 2] >> 3) << 10); + } + +} + void initHardware() { // Guard band //((int *) (0x023FFF00)) = 0xBEEFCAFE; @@ -2008,12 +2078,12 @@ void initHardware() { penInit(); powerON(POWER_ALL); -/* vramSetBankA(VRAM_A_MAIN_BG); - vramSetBankB(VRAM_B_MAIN_BG); +/* vramSetBankA(VRAM_A_MAIN_BG); + vramSetBankB(VRAM_B_MAIN_BG); vramSetBankC(VRAM_C_SUB_BG); */ - vramSetBankI(VRAM_I_SUB_SPRITE); - vramSetBankE(VRAM_E_MAIN_SPRITE); - + vramSetBankD(VRAM_D_SUB_SPRITE); + vramSetBankE(VRAM_E_MAIN_SPRITE); + currentTimeMillis = 0; @@ -2041,8 +2111,8 @@ void initHardware() { // Allocate save buffer for game screen // savedBuffer = new u8[320 * 200]; displayMode16Bit(); - - memset(BG_GFX, 0, 512 * 256 * 2); + + memset(BG_GFX, 0, 512 * 256 * 2); scaledMode = true; scX = 0; scY = 0; @@ -2050,33 +2120,33 @@ void initHardware() { subScY = 0; subScTargetX = 0; subScTargetY = 0; - + //lcdSwap(); POWER_CR &= ~POWER_SWAP_LCDS; - + frameCount = 0; callback = NULL; - -// vramSetBankH(VRAM_H_SUB_BG); - + +// vramSetBankH(VRAM_H_SUB_BG); + // // Do text stuff //BG0_CR = BG_MAP_BASE(0) | BG_TILE_BASE(1); // BG0_Y0 = 48; - + PALETTE[255] = RGB15(31,31,31);//by default font will be rendered with color 255 - + //consoleInit() is a lot more flexible but this gets you up and running quick // consoleInitDefault((u16*)SCREEN_BASE_BLOCK(0), (u16*)CHAR_BASE_BLOCK(1), 16); //consolePrintSet(0, 6); - + //irqs are nice irqInit(); // irqInitHandler(); irqSet(IRQ_VBLANK, VBlankHandler); irqSet(IRQ_TIMER0, timerTickHandler); irqSet(IRQ_TIMER2, soundBufferEmptyHandler); - + irqEnable(IRQ_VBLANK); irqEnable(IRQ_TIMER0); irqEnable(IRQ_TIMER2); @@ -2085,15 +2155,15 @@ void initHardware() { irqSet(IRQ_HBLANK, hBlankHandler); irqEnable(IRQ_HBLANK); #endif - - + + // Set up a millisecond timer #ifdef HEAVY_LOGGING consolePrintf("Setting up timer..."); #endif TIMER0_CR = 0; TIMER0_DATA = (u32) TIMER_FREQ(1000); - TIMER0_CR = TIMER_ENABLE | TIMER_DIV_1 | TIMER_IRQ_REQ; + TIMER0_CR = TIMER_ENABLE | TIMER_DIV_1 | TIMER_IRQ_REQ; REG_IME = 1; #ifdef HEAVY_LOGGING consolePrintf("done\n"); @@ -2102,23 +2172,18 @@ void initHardware() { PALETTE[255] = RGB15(0,0,31); initSprites(); - + // videoSetModeSub(MODE_3_2D | DISPLAY_BG0_ACTIVE | DISPLAY_BG3_ACTIVE | DISPLAY_SPR_ACTIVE | DISPLAY_SPR_1D | DISPLAY_SPR_1D_BMP); //sub bg 0 will be used to print text - // Convert texture from 24bit 888 to 16bit 1555, remembering to set top bit! - u8* srcTex = (u8 *) icons_raw; - for (int r = 32 * 256 ; r >= 0; r--) { - SPRITE_GFX_SUB[r] = 0x8000 | (srcTex[r * 3] >> 3) | ((srcTex[r * 3 + 1] >> 3) << 5) | ((srcTex[r * 3 + 2] >> 3) << 10); - SPRITE_GFX[r] = 0x8000 | (srcTex[r * 3] >> 3) | ((srcTex[r * 3 + 1] >> 3) << 5) | ((srcTex[r * 3 + 2] >> 3) << 10); - } - - - + // If the software scaler's back buffer has not been allocated, do it now + scalerBackBuffer = (u8 *) malloc(320 * 256); WAIT_CR &= ~(0x0080); // REG_WRAM_CNT = 0; + uploadSpriteGfx(); + // This is a bodge to get around the fact that the cursor is turned on before it's image is set // during startup in Sam & Max. This bodge moves the cursor offscreen so it is not seen. sprites[1].attribute[1] = ATTR1_SIZE_64 | 192; @@ -2126,6 +2191,8 @@ void initHardware() { } + + void setKeyboardIcon(bool enable) { keyboardIcon = enable; } @@ -2199,27 +2266,27 @@ void penUpdate() { penDownLastFrame = false; penDownFrames = 0; } - + } int leftHandedSwap(int keys) { // Start and select are unchanged if (leftHandedMode) { int result = keys & (~(KEY_R | KEY_L | KEY_Y | KEY_A | KEY_B | KEY_X | KEY_LEFT | KEY_RIGHT | KEY_UP | KEY_DOWN)); - + if (keys & KEY_L) result |= KEY_R; if (keys & KEY_R) result |= KEY_L; - + if (keys & KEY_LEFT) result |= KEY_Y; if (keys & KEY_RIGHT) result |= KEY_A; if (keys & KEY_DOWN) result |= KEY_B; if (keys & KEY_UP) result |= KEY_X; - + if (keys & KEY_Y) result |= KEY_LEFT; if (keys & KEY_A) result |= KEY_RIGHT; if (keys & KEY_B) result |= KEY_DOWN; if (keys & KEY_X) result |= KEY_UP; - + return result; } else { return keys; @@ -2310,28 +2377,28 @@ int getPenY() { GLvector getPenPos() { GLvector v; - + v.x = (penX * inttof32(1)) / SCREEN_WIDTH; v.y = (penY * inttof32(1)) / SCREEN_HEIGHT; - + return v; } void formatSramOption() { consolePrintf("The following files are present in save RAM:\n"); DSSaveFileManager::instance()->listFiles(); - + consolePrintf("\nAre you sure you want to\n"); consolePrintf("DELETE all files?\n"); consolePrintf("A = Yes, X = No\n"); - + while (true) { if (keysHeld() & KEY_A) { DSSaveFileManager::instance()->formatSram(); consolePrintf("SRAM cleared!\n"); return; } - + if (keysHeld() & KEY_X) { consolePrintf("Whew, that was close!\n"); return; @@ -2384,7 +2451,7 @@ void fastRamReset() { bool GBAMPAvail = false; -bool initGBAMP(int mode) { +bool initGBAMP(int mode) { if (FAT_InitFiles()) { if (mode == 2) { disc_IsInserted(); @@ -2409,14 +2476,14 @@ void initDebugger() { set_verbosity(VERBOSE_INFO | VERBOSE_ERROR); wireless_init(0); wireless_connect(); - + // This is where the address of the computer running the Java // stub goes. debugger_connect_tcp(192, 168, 0, 1); - debugger_init(); - + debugger_init(); + // Update function - should really call every frame - user_debugger_update(); + user_debugger_update(); } @@ -2451,7 +2518,7 @@ cardTranslate cardReaderTable[] = { void reboot() { int deviceType = -1; - + if (disc_getDeviceId() == DEVICE_DLDI) { char id[6]; @@ -2529,13 +2596,13 @@ int main(void) initDebugger(); } #endif - + // Let arm9 read cartridge *((u16 *) (0x04000204)) &= ~0x0080; - + lastCallbackFrame = 0; tweak = 0; - + indyFightState = false; indyFightRight = true; @@ -2548,25 +2615,25 @@ int main(void) // bufferSize = 10; - + /*bufferRate = 44100; bufferFrame = 0; bufferSamples = 8192; bufferFirstHalf = false; bufferSecondHalf = true; - + int bytes = (2 * (bufferSamples)) + 100; - + soundBuffer = (s16 *) malloc(bytes * 2); soundHiPart = true; - + for (int r = 0; r < bytes; r++) { soundBuffer[r] = 0; } - + swiWaitForVBlank(); swiWaitForVBlank(); @@ -2575,35 +2642,35 @@ int main(void) swiWaitForVBlank(); swiWaitForVBlank(); */ - + lastEventFrame = 0; mouseMode = MOUSE_LEFT; - + /* TIMER1_CR = 0; TIMER1_DATA = TIMER_FREQ(bufferRate); TIMER1_CR = TIMER_ENABLE | TIMER_DIV_1; - + TIMER2_CR = 0; TIMER2_DATA = 0xFFFF - (bufferSamples / 2); TIMER2_CR = TIMER_ENABLE | TIMER_IRQ_REQ | TIMER_CASCADE; */ // 2945 - 2947 + - - + // for (int r = 2946; r < 3000; r++) { // soundBuffer[r] = 30000; // } - + //2372 consolePrintf("-------------------------------\n"); consolePrintf("ScummVM DS\n"); consolePrintf("Ported by Neil Millstone\n"); - consolePrintf("Version 0.11.0 beta1 "); + consolePrintf("Version 0.11.1 beta2"); #if defined(DS_BUILD_A) consolePrintf("build A\n"); consolePrintf("Lucasarts SCUMM games (SCUMM)\n"); @@ -2614,7 +2681,7 @@ int main(void) consolePrintf("-------------------------------\n"); #elif defined(DS_BUILD_C) consolePrintf("build C\n"); - consolePrintf("Simon/Elvira (AGOS)\n"); + consolePrintf("Simon/Elvira/Waxworks (AGOS)\n"); consolePrintf("-------------------------------\n"); #elif defined(DS_BUILD_D) consolePrintf("build D\n"); @@ -2622,7 +2689,7 @@ int main(void) consolePrintf("-------------------------------\n"); #elif defined(DS_BUILD_E) consolePrintf("build E\n"); - consolePrintf("ITE/IHNM (SAGA)\n"); + consolePrintf("Inherit the Earth (SAGA)\n"); consolePrintf("-------------------------------\n"); #elif defined(DS_BUILD_F) consolePrintf("build F\n"); @@ -2653,7 +2720,7 @@ int main(void) consolePrintf("\n"); #endif - + #ifdef USE_BUILT_IN_DRIVER_SELECTION // Do M3 detection selectioon int extraData = DSSaveFileManager::getExtraData(); @@ -2692,7 +2759,7 @@ int main(void) disc_setEnable(mode); DSSaveFileManager::setExtraData(mode); #else - + int mode = 0; #endif @@ -2738,11 +2805,11 @@ int main(void) } delete node; - + updateStatus(); - - + + // OSystem_DS::instance(); g_system = new OSystem_DS(); @@ -2773,7 +2840,7 @@ int main(void) char* argv[3] = {"/scummvmds", "--config=scummvmg.ini"}; #endif -#ifdef DS_NON_SCUMM_BUILD +#ifdef DS_NON_SCUMM_BUILD while (1) { scummvm_main(2, (char **) &argv); diff --git a/backends/platform/ds/arm9/source/dsmain.h b/backends/platform/ds/arm9/source/dsmain.h index 85212a2d01..f20442b11e 100644 --- a/backends/platform/ds/arm9/source/dsmain.h +++ b/backends/platform/ds/arm9/source/dsmain.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #ifndef _DSMAIN_H #define _DSMAIN_H @@ -42,98 +42,100 @@ enum controlType { }; struct gameListType { - char gameId[16]; - controlType control; + char gameId[16]; + controlType control; }; // Pen reading functions -void penInit(); -void penUpdate(); -bool getPenDown(); -bool getPenHeld(); -bool getPenReleased(); -int getPenX(); -int getPenY(); +void penInit(); +void penUpdate(); +bool getPenDown(); +bool getPenHeld(); +bool getPenReleased(); +int getPenX(); +int getPenY(); GLvector getPenPos(); -void consumePenEvents(); +void consumePenEvents(); // Pad reading -int getKeysHeld(); -void keysUpdate(); -int getKeysDown(); -int getKeysReleased(); -void consumeKeys(); -int leftHandedSwap(int keys); +int getKeysHeld(); +void keysUpdate(); +int getKeysDown(); +int getKeysReleased(); +void consumeKeys(); +int leftHandedSwap(int keys); // Video -void displayMode8Bit(); // Switch to 8-bit mode5 -void displayMode16Bit(); // Switch to 16-bit mode5 +void displayMode8Bit(); // Switch to 8-bit mode5 +void displayMode16Bit(); // Switch to 16-bit mode5 // Flip double buffer -void displayMode16BitFlipBuffer(); +void displayMode16BitFlipBuffer(); // Get address of current back buffer -u16* get16BitBackBuffer(); -u16* get8BitBackBuffer(); +u16* get16BitBackBuffer(); +u16* get8BitBackBuffer(); +s32 get8BitBackBufferStride(); +u16* getScalerBuffer(); -void setTalkPos(int x, int y); -void setTopScreenTarget(int x, int y); +void setTalkPos(int x, int y); +void setTopScreenTarget(int x, int y); void set200PercentFixedScale(bool on); // Timers -void setTimerCallback(OSystem_DS::TimerProc proc, int interval); // Setup a callback function at a regular interval -int getMillis(); // Return the current runtime in milliseconds -void doTimerCallback(); // Call callback function if required +void setTimerCallback(OSystem_DS::TimerProc proc, int interval); // Setup a callback function at a regular interval +int getMillis(); // Return the current runtime in milliseconds +void doTimerCallback(); // Call callback function if required // Sound -void setSoundProc(OSystem_DS::SoundProc proc, void* param); // Setup a callback function for sound -void doSoundCallback(); // Call function if sound buffers need more data -void playSound(const void* data, u32 length, bool loop, bool adpcm = false, int rate = 22050); // Start a sound -void stopSound(int channel); +void setSoundProc(OSystem_DS::SoundProc proc, void* param); // Setup a callback function for sound +void doSoundCallback(); // Call function if sound buffers need more data +void playSound(const void* data, u32 length, bool loop, bool adpcm = false, int rate = 22050); // Start a sound +void stopSound(int channel); int getSoundFrequency(); // Event queue -void addEventsToQueue(); -void VBlankHandler(); +void addEventsToQueue(); +void VBlankHandler(); // Sam and Max Stuff -void setGameID(int id); -void setCursorIcon(const u8* icon, uint w, uint h, byte keycolor, int hotspotX, int hotspotY); +void setGameID(int id); +void setCursorIcon(const u8* icon, uint w, uint h, byte keycolor, int hotspotX, int hotspotY); void setShowCursor(bool enable); void setMouseCursorVisible(bool visible); // Shake -void setShakePos(int shakePos); +void setShakePos(int shakePos); // Reports -void memoryReport(); +void memoryReport(); // GBAMP -bool isGBAMPAvailable(); +bool isGBAMPAvailable(); // Sleep (I'd like some of that right now) -void checkSleepMode(); +void checkSleepMode(); // Virtual keyboard -void setKeyboardIcon(bool enable); -bool getKeyboardIcon(); -void setKeyboardEnable(bool en); -bool getKeyboardEnable(); +void setKeyboardIcon(bool enable); +bool getKeyboardIcon(); +void setKeyboardEnable(bool en); +bool getKeyboardEnable(); // Options -void setLeftHanded(bool enable); -void setTouchXOffset(int x); -void setTouchYOffset(int y); -void setUnscaledMode(bool enable); +void setLeftHanded(bool enable); +void setTouchXOffset(int x); +void setTouchYOffset(int y); +void setUnscaledMode(bool enable); void setSnapToBorder(bool enable); -void setIndyFightState(bool st); -bool getIndyFightState(); +void setIndyFightState(bool st); +bool getIndyFightState(); bool isCpuScalerEnabled(); void setCpuScalerEnable(bool enable); // Display -bool getIsDisplayMode8Bit(); -void setGameSize(int width, int height); +bool getIsDisplayMode8Bit(); +void setGameSize(int width, int height); int getGameWidth(); int getGameHeight(); diff --git a/backends/platform/ds/arm9/source/dsoptions.cpp b/backends/platform/ds/arm9/source/dsoptions.cpp index d23201f745..edb9c70580 100644 --- a/backends/platform/ds/arm9/source/dsoptions.cpp +++ b/backends/platform/ds/arm9/source/dsoptions.cpp @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #include "dsoptions.h" #include "dsmain.h" #include "gui/dialog.h" @@ -28,6 +28,7 @@ #include "osystem_ds.h" #include "engines/scumm/scumm.h" #include "touchkeyboard.h" +#include "gui/PopUpWidget.h" #define ALLOW_CPU_SCALER @@ -40,28 +41,39 @@ namespace Scumm { namespace DS { -DSOptionsDialog::DSOptionsDialog() : GUI::Dialog(20, 0, 320 - 40, 230 - 20) { +DSOptionsDialog::DSOptionsDialog() : GUI::Dialog(5, 0, 320 - 5, 230 - 20) { addButton(this, 10, 175, "Close", GUI::kCloseCmd, 'C'); + _radioButtonMode = false; + #ifdef DS_SCUMM_BUILD if (!DS::isGBAMPAvailable()) { // addButton(this, 100, 140, "Delete Save", 'dels', 'D'); } #endif - new GUI::StaticTextWidget(this, 80, 10, 130, 15, "ScummVM DS Options", GUI::kTextAlignCenter); + new GUI::StaticTextWidget(this, 90, 10, 130, 15, "ScummVM DS Options", GUI::kTextAlignCenter); - _leftHandedCheckbox = new GUI::CheckboxWidget(this, 20, 25, 200, 20, "Left handed mode", 0, 'L'); - _indyFightCheckbox = new GUI::CheckboxWidget(this, 20, 40, 200, 20, "Indy fighting controls", 0, 'I'); - _unscaledCheckbox = new GUI::CheckboxWidget(this, 20, 55, 200, 20, "Unscaled main screen", 0, 'S'); - _twoHundredPercentCheckbox = new GUI::CheckboxWidget(this, 20, 70, 230, 20, "Zoomed screen at fixed 200% zoom", 0, 'T'); - _highQualityAudioCheckbox = new GUI::CheckboxWidget(this, 20, 85, 250, 20, "High quality audio (slower) (reboot)", 0, 'T'); - _disablePowerOff = new GUI::CheckboxWidget(this, 20, 100, 250, 20, "Disable power off on quit", 0, 'T'); - _showCursorCheckbox = new GUI::CheckboxWidget(this, 20, 115, 130, 20, "Show mouse cursor", 0, 'T'); -#ifdef ALLOW_CPU_SCALER - _cpuScaler = new GUI::CheckboxWidget(this, 160, 115, 90, 20, "CPU scaler", 0, 'T'); -#endif - _snapToBorderCheckbox = new GUI::CheckboxWidget(this, 20, 130, 250, 20, "Snap to border", 0, 'T'); + _leftHandedCheckbox = new GUI::CheckboxWidget(this, 5, 70, 130, 20, "Left handed mode", 0, 'L'); + _indyFightCheckbox = new GUI::CheckboxWidget(this, 5, 40, 200, 20, "Indy fighting controls", 0, 'I'); + _twoHundredPercentCheckbox = new GUI::CheckboxWidget(this, 5, 55, 230, 20, "Zoomed screen at fixed 200% zoom", 0, 'T'); + _highQualityAudioCheckbox = new GUI::CheckboxWidget(this, 5, 25, 250, 20, "High quality audio (slower) (reboot)", 0, 'T'); + _disablePowerOff = new GUI::CheckboxWidget(this, 5, 85, 130, 20, "Disable power off", 0, 'T'); + _showCursorCheckbox = new GUI::CheckboxWidget(this, 5, 100, 130, 20, "Show mouse cursor", 0, 'T'); + +//#ifdef ALLOW_CPU_SCALER +// _cpuScaler = new GUI::CheckboxWidget(this, 160, 115, 90, 20, "CPU scaler", 0, 'T'); +//#endif + + new GUI::StaticTextWidget(this, 180, 70, 130, 15, "Main screen:", GUI::kTextAlignLeft); + + _hardScaler = new GUI::CheckboxWidget(this, 140, 85, 170, 20, "Hardware scale (fast)", 0x10000001, 'T'); + _cpuScaler = new GUI::CheckboxWidget(this, 140, 100, 170, 20, "Software scale (quality)", 0x10000002, 'S'); + _unscaledCheckbox = new GUI::CheckboxWidget(this, 140, 115, 170, 20, "Unscaled", 0x10000003, 'S'); + + + + _snapToBorderCheckbox = new GUI::CheckboxWidget(this, 5, 115, 120, 20, "Snap to border", 0, 'T'); new GUI::StaticTextWidget(this, 20, 145, 110, 15, "Touch X Offset", GUI::kTextAlignLeft); _touchX = new GUI::SliderWidget(this, 130, 145, 130, 12, 1); @@ -153,6 +165,11 @@ DSOptionsDialog::DSOptionsDialog() : GUI::Dialog(20, 0, 320 - 40, 230 - 20) { _touchY->setValue(0); } + if (!_cpuScaler->getState() && !_unscaledCheckbox->getState()) { + _hardScaler->setState(true); + } + + _radioButtonMode = true; } DSOptionsDialog::~DSOptionsDialog() { @@ -177,16 +194,49 @@ void DSOptionsDialog::updateConfigManager() { } void DSOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data) { + + static bool guard = false; + + if ((!guard) && (_radioButtonMode)) + { + guard = true; + + if ((cmd & 0xFF000000) == 0x10000000) + { + _cpuScaler->setState(false); + _hardScaler->setState(false); + _unscaledCheckbox->setState(false); + + if ((sender == _cpuScaler) && (cmd == 0x10000002)) + { + _cpuScaler->setState(true); + } + + if ((sender == _hardScaler) && (cmd == 0x10000001)) + { + _hardScaler->setState(true); + } + + if ((sender == _unscaledCheckbox) && (cmd == 0x10000003)) + { + _unscaledCheckbox->setState(true); + } + } + + guard = false; + + } + if (cmd == GUI::kCloseCmd) { updateConfigManager(); close(); } - + #ifdef DS_SCUMM_BUILD /* if (cmd == 'dels') { _delDialog->setList(Scumm::generateSavegameList(Scumm::g_scumm, false)); _delDialog->handleCommand(NULL, GUI::kListSelectionChangedCmd, 0); - + Common::Event event; event.type = Common::EVENT_KEYDOWN; event.kbd.ascii = 0; @@ -195,9 +245,9 @@ void DSOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint event.type = Common::EVENT_KEYUP; OSystem_DS::instance()->addEvent(event); - + int idx = _delDialog->runModal(); - + if (idx >= 0) { char name[256]; Scumm::g_scumm->makeSavegameName(name, idx, false); @@ -205,10 +255,10 @@ void DSOptionsDialog::handleCommand(GUI::CommandSender *sender, uint32 cmd, uint ((DSSaveFileManager *) (OSystem_DS::instance()->getSavefileManager()))->deleteFile(name); } } - + }*/ #endif - + } @@ -220,11 +270,11 @@ void togglePause() { OSystem_DS* system = OSystem_DS::instance(); event.type = Common::EVENT_KEYDOWN; - event.kbd.keycode = Common::KEYCODE_p; + event.kbd.keycode = Common::KEYCODE_p; event.kbd.ascii = 'p'; event.kbd.flags = 0; system->addEvent(event); - + event.type = Common::EVENT_KEYUP; system->addEvent(event); } @@ -235,14 +285,12 @@ void showOptionsDialog() { togglePause(); DS::displayMode16Bit(); - + DSOptionsDialog* d = new DSOptionsDialog(); d->runModal(); - consolePrintf("deleting dialog\n"); delete d; - - consolePrintf("going to 8 bit\n"); + DS::displayMode8Bit(); togglePause(); @@ -303,7 +351,8 @@ void setOptions() { } else { DS::setCpuScalerEnable(false); } -#endif +#endif + } } diff --git a/backends/platform/ds/arm9/source/dsoptions.h b/backends/platform/ds/arm9/source/dsoptions.h index 3c9da82a83..9cfa785ca8 100644 --- a/backends/platform/ds/arm9/source/dsoptions.h +++ b/backends/platform/ds/arm9/source/dsoptions.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #ifndef _DSOPTIONS_H_ #define _DSOPTIONS_H_ @@ -39,7 +39,7 @@ class DSOptionsDialog : public GUI::Dialog { public: DSOptionsDialog(); ~DSOptionsDialog(); - + protected: virtual void handleCommand(GUI::CommandSender *sender, uint32 cmd, uint32 data); void togglePause(); @@ -53,14 +53,18 @@ protected: GUI::CheckboxWidget* _indyFightCheckbox; GUI::CheckboxWidget* _highQualityAudioCheckbox; GUI::CheckboxWidget* _disablePowerOff; - GUI::CheckboxWidget* _cpuScaler; GUI::CheckboxWidget* _showCursorCheckbox; GUI::CheckboxWidget* _snapToBorderCheckbox; + GUI::CheckboxWidget* _hardScaler; + GUI::CheckboxWidget* _cpuScaler; + #ifdef DS_SCUMM_BUILD Scumm::SaveLoadChooser* _delDialog; #endif + bool _radioButtonMode; + }; extern void showOptionsDialog(); diff --git a/backends/platform/ds/arm9/source/fat/disc_io.c b/backends/platform/ds/arm9/source/fat/disc_io.c index f456343a2c..6d48674d62 100644 --- a/backends/platform/ds/arm9/source/fat/disc_io.c +++ b/backends/platform/ds/arm9/source/fat/disc_io.c @@ -5,7 +5,7 @@ uniformed io-interface to work with Chishm's FAT library Written by MightyMax - + Modified by Chishm: 2005-11-06 * Added WAIT_CR modifications for NDS @@ -87,7 +87,7 @@ LPIO_INTERFACE active_interface = 0; Disc Cache functions 2006-02-03: - Added by www.neoflash.com + Added by www.neoflash.com */ int discDetect = 0; @@ -99,7 +99,7 @@ int dldiFound = FALSE; #include #define CACHE_FREE 0xFFFFFFFF - + static u8 cacheBuffer[ DISC_CACHE_COUNT * 512 ]; static struct { @@ -112,20 +112,20 @@ FATDevice currentDevice; static u32 disc_CacheFind(u32 sector) { u32 i; - + for( i = 0; i < DISC_CACHE_COUNT; i++ ) { if( cache[ i ].sector == sector ) return i; } - + return CACHE_FREE; } static u32 disc_CacheFindFree(void) { - + u32 i = 0, j; u32 count = -1; - + for( j = 0; j < DISC_CACHE_COUNT; j++ ) { if( cache[ j ].sector == CACHE_FREE ) { @@ -142,7 +142,7 @@ static u32 disc_CacheFindFree(void) { if( cache[ i ].sector != CACHE_FREE && cache[i].dirty != 0 ) { active_interface->fn_WriteSectors( cache[ i ].sector, 1, &cacheBuffer[ i * 512 ] ); - /* todo: handle write error here + /* todo: handle write error here cache[ i ].sector = CACHE_FREE; cache[ i ].dirty = 0; @@ -431,7 +431,7 @@ bool disc_setDsSlotInterface (void) #endif -bool disc_Init(void) +bool disc_Init(void) { #ifdef DISC_CACHE disc_CacheInit(); @@ -455,15 +455,15 @@ bool disc_Init(void) // could not find a working IO Interface active_interface = 0 ; return false ; -} +} -bool disc_IsInserted(void) +bool disc_IsInserted(void) { if (active_interface) return active_interface->fn_IsInserted() ; return false ; -} +} -bool disc_ReadSectors(u32 sector, u8 numSecs, void* buffer) +bool disc_ReadSectors(u32 sector, u8 numSecs, void* buffer) { #ifdef DISC_CACHE u8 *p=(u8*)buffer; @@ -480,9 +480,9 @@ bool disc_ReadSectors(u32 sector, u8 numSecs, void* buffer) if (active_interface) return active_interface->fn_ReadSectors(sector,numSecs,buffer) ; return false ; #endif -} +} -bool disc_WriteSectors(u32 sector, u8 numSecs, void* buffer) +bool disc_WriteSectors(u32 sector, u8 numSecs, void* buffer) { /*#ifdef DISC_CACHE u8 *p=(u8*)buffer; @@ -499,18 +499,46 @@ bool disc_WriteSectors(u32 sector, u8 numSecs, void* buffer) #ifdef DISC_CACHE disc_CacheInit(); #endif + +#define MISALIGNMENT_BODGE + +#ifdef MISALIGNMENT_BODGE + // This bodge works around problems with some card reader drivers which require data to be + // aligned to 2- or 4-byte boundaries it varies which one they require. This bodge sorts + // it but also reduces write speed as it doesn't use the multi-sector write capability any + // more. A better fix will be written for a future version. + + if (active_interface) { + u8 sectorBuffer[512]; + int r; + + for (r = 0; r < numSecs; r++) { + memcpy(sectorBuffer, &buffer[r * 512], 512); + + if (!active_interface->fn_WriteSectors(sector + r, 1, sectorBuffer)) + { + return false; + } + } + + + return true; + } + +#else if (active_interface) return active_interface->fn_WriteSectors(sector,numSecs,buffer) ; return false ; +#endif //#endif -} +} -bool disc_ClearStatus(void) +bool disc_ClearStatus(void) { if (active_interface) return active_interface->fn_ClearStatus() ; return false ; -} +} -bool disc_Shutdown(void) +bool disc_Shutdown(void) { #ifdef DISC_CACHE disc_CacheFlush(); @@ -518,7 +546,7 @@ bool disc_Shutdown(void) if (active_interface) active_interface->fn_Shutdown() ; active_interface = 0 ; return true ; -} +} u32 disc_HostType (void) { diff --git a/backends/platform/ds/arm9/source/fat/disc_io.h b/backends/platform/ds/arm9/source/fat/disc_io.h index b2317ca110..05d4c020bd 100644 --- a/backends/platform/ds/arm9/source/fat/disc_io.h +++ b/backends/platform/ds/arm9/source/fat/disc_io.h @@ -7,7 +7,7 @@ // Use DMA to read the card, remove this line to use normal reads/writes // #define _CF_USE_DMA -// Allow buffers not aligned to 16 bits when reading files. +// Allow buffers not aligned to 16 bits when reading files. // Note that this will slow down access speed, so only use if you have to. // It is also incompatible with DMA #define _CF_ALLOW_UNALIGNED @@ -43,7 +43,7 @@ // This allows the code to build on an earlier version of libnds, before the register was renamed #ifndef REG_EXMEMCNT -#define REG_EXMEMCNT REG_EXEMEMCNT +#define REG_EXMEMCNT REG_EXEMEMCNT #endif #ifndef REG_EXEMEMCNT @@ -70,7 +70,7 @@ #endif // Disable NDS specific hardware and features if running on a GBA -#ifndef NDS +#ifndef NDS #undef SUPPORT_NMMC #undef DISC_CACHE #endif diff --git a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c index fffd8ab88b..b5fdd665df 100644 --- a/backends/platform/ds/arm9/source/fat/gba_nds_fat.c +++ b/backends/platform/ds/arm9/source/fat/gba_nds_fat.c @@ -42,7 +42,7 @@ //--------------------------------------------------------------- // Appropriate placement of CF functions and data #ifdef NDS - #define _VARS_IN_RAM + #define _VARS_IN_RAM #else #define _VARS_IN_RAM __attribute__ ((section (".sbss"))) #endif @@ -74,7 +74,7 @@ #ifdef __GNUC__ #define __PACKED __attribute__ ((__packed__)) #else - #define __PACKED + #define __PACKED #pragma pack(1) #endif @@ -98,7 +98,7 @@ typedef struct u32 numSectors; union // Different types of extended BIOS Parameter Block for FAT16 and FAT32 { - struct + struct { // Ext BIOS Parameter Block for FAT16 u8 driveNumber; @@ -110,7 +110,7 @@ typedef struct // Bootcode u8 bootCode[448]; } __PACKED fat16; - struct + struct { // FAT32 extended block u32 sectorsPerFAT32; @@ -158,7 +158,7 @@ typedef struct typedef struct { u8 ordinal; // Position within LFN - u16 char0; + u16 char0; u16 char1; u16 char2; u16 char3; @@ -177,7 +177,7 @@ typedef struct u16 char12; } __PACKED DIR_ENT_LFN; -const char lfn_offset_table[13]={0x01,0x03,0x05,0x07,0x09,0x0E,0x10,0x12,0x14,0x16,0x18,0x1C,0x1E}; +const char lfn_offset_table[13]={0x01,0x03,0x05,0x07,0x09,0x0E,0x10,0x12,0x14,0x16,0x18,0x1C,0x1E}; // End of packed structs #ifdef __PACKED @@ -190,7 +190,7 @@ const char lfn_offset_table[13]={0x01,0x03,0x05,0x07,0x09,0x0E,0x10,0x12,0x14,0x //----------------------------------------------------------------- // Global Variables -// _VARS_IN_RAM variables are stored in the largest section of WRAM +// _VARS_IN_RAM variables are stored in the largest section of WRAM // available: IWRAM on NDS ARM7, EWRAM on NDS ARM9 and GBA // Files @@ -305,7 +305,7 @@ u16 getRTCtoFileTime (void) u16 getRTCtoFileDate (void) { #ifdef NDS - return ( + return ( ( ((IPC->rtc_year + 20) & 0x7F) <<9) | ( (IPC->rtc_month & 0xF) << 5) | (IPC->rtc_day & 0x1F) ); @@ -330,13 +330,13 @@ u32 FAT_NextCluster(u32 cluster) u32 nextCluster = CLUSTER_FREE; u32 sector; int offset; - - switch (filesysType) + + switch (filesysType) { case FS_UNKNOWN: nextCluster = CLUSTER_FREE; break; - + case FS_FAT12: sector = filesysFAT + (((cluster * 3) / 2) / BYTE_PER_READ); offset = ((cluster * 3) / 2) % BYTE_PER_READ; @@ -351,32 +351,32 @@ u32 FAT_NextCluster(u32 cluster) nextCluster = ((u8*)fatBuffer)[offset]; offset++; - + if (offset >= BYTE_PER_READ) { offset = 0; fatBufferCurSector++; disc_ReadSector(fatBufferCurSector, fatBuffer); } - + nextCluster |= (((u8*)fatBuffer)[offset]) << 8; - + if (cluster & 0x01) { nextCluster = nextCluster >> 4; - } else { + } else { nextCluster &= 0x0FFF; } - + if (nextCluster >= 0x0FF7) { nextCluster = CLUSTER_EOF; } break; - + case FS_FAT16: sector = filesysFAT + ((cluster << 1) / BYTE_PER_READ); offset = cluster % (BYTE_PER_READ >> 1); - + // If FAT buffer contains wrong sector if (sector != fatBufferCurSector) { @@ -387,17 +387,17 @@ u32 FAT_NextCluster(u32 cluster) // read the nextCluster value nextCluster = ((u16*)fatBuffer)[offset]; - + if (nextCluster >= 0xFFF7) { nextCluster = CLUSTER_EOF; } break; - + case FS_FAT32: sector = filesysFAT + ((cluster << 2) / BYTE_PER_READ); offset = cluster % (BYTE_PER_READ >> 2); - + // If FAT buffer contains wrong sector if (sector != fatBufferCurSector) { @@ -408,18 +408,18 @@ u32 FAT_NextCluster(u32 cluster) // read the nextCluster value nextCluster = (((u32*)fatBuffer)[offset]) & 0x0FFFFFFF; - + if (nextCluster >= 0x0FFFFFF7) { nextCluster = CLUSTER_EOF; } break; - + default: nextCluster = CLUSTER_FREE; break; } - + return nextCluster; } @@ -437,13 +437,13 @@ bool FAT_WriteFatEntry (u32 cluster, u32 value) { return false; } - - switch (filesysType) + + switch (filesysType) { case FS_UNKNOWN: return false; break; - + case FS_FAT12: sector = filesysFAT + (((cluster * 3) / 2) / BYTE_PER_READ); offset = ((cluster * 3) / 2) % BYTE_PER_READ; @@ -465,32 +465,32 @@ bool FAT_WriteFatEntry (u32 cluster, u32 value) offset = 0; // write the buffer back to disc disc_WriteSector(fatBufferCurSector, fatBuffer); - // read the next sector + // read the next sector fatBufferCurSector++; disc_ReadSector(fatBufferCurSector, fatBuffer); } - + ((u8*)fatBuffer)[offset] = (value & 0x0FF0) >> 4; } else { - + ((u8*)fatBuffer)[offset] = value & 0xFF; - + offset++; if (offset >= BYTE_PER_READ) { offset = 0; // write the buffer back to disc disc_WriteSector(fatBufferCurSector, fatBuffer); - // read the next sector + // read the next sector fatBufferCurSector++; disc_ReadSector(fatBufferCurSector, fatBuffer); } - + ((u8*)fatBuffer)[offset] = (((u8*)fatBuffer)[offset] & 0xF0) | ((value >> 8) & 0x0F); } break; - + case FS_FAT16: sector = filesysFAT + ((cluster << 1) / BYTE_PER_READ); offset = cluster % (BYTE_PER_READ >> 1); @@ -507,11 +507,11 @@ bool FAT_WriteFatEntry (u32 cluster, u32 value) ((u16*)fatBuffer)[offset] = (value & 0xFFFF); break; - + case FS_FAT32: sector = filesysFAT + ((cluster << 2) / BYTE_PER_READ); offset = cluster % (BYTE_PER_READ >> 2); - + // If FAT buffer contains wrong sector if (sector != fatBufferCurSector) { @@ -524,15 +524,15 @@ bool FAT_WriteFatEntry (u32 cluster, u32 value) (((u32*)fatBuffer)[offset]) = value; break; - + default: return false; break; } - + // write the buffer back to disc disc_WriteSector(fatBufferCurSector, fatBuffer); - + return true; } #endif @@ -540,8 +540,8 @@ bool FAT_WriteFatEntry (u32 cluster, u32 value) #ifdef CAN_WRITE_TO_DISC /*----------------------------------------------------------------- FAT_ReadWriteFatEntryBuffered -Internal function - writes FAT information about a cluster to a - buffer that should then be flushed to disc using +Internal function - writes FAT information about a cluster to a + buffer that should then be flushed to disc using FAT_WriteFatEntryFlushBuffer() Call FAT_WriteFatEntry first so as not to ruin the disc. Also returns the entry being replaced @@ -555,13 +555,13 @@ u32 FAT_ReadWriteFatEntryBuffered (u32 cluster, u32 value) if ((cluster < 0x0002) || (cluster > fatLastCluster)) return CLUSTER_FREE; - - switch (filesysType) + + switch (filesysType) { case FS_UNKNOWN: oldValue = CLUSTER_FREE; break; - + case FS_FAT12: sector = filesysFAT + (((cluster * 3) / 2) / BYTE_PER_READ); offset = ((cluster * 3) / 2) % BYTE_PER_READ; @@ -587,40 +587,40 @@ u32 FAT_ReadWriteFatEntryBuffered (u32 cluster, u32 value) offset = 0; // write the buffer back to disc disc_WriteSector(fatBufferCurSector, fatBuffer); - // read the next sector + // read the next sector fatBufferCurSector++; disc_ReadSector(fatBufferCurSector, fatBuffer); } - + oldValue |= ((((u8*)fatBuffer)[offset]) << 4) & 0x0FF0; ((u8*)fatBuffer)[offset] = (value & 0x0FF0) >> 4; } else { - + oldValue = ((u8*)fatBuffer)[offset] & 0xFF; ((u8*)fatBuffer)[offset] = value & 0xFF; - + offset++; if (offset >= BYTE_PER_READ) { offset = 0; // write the buffer back to disc disc_WriteSector(fatBufferCurSector, fatBuffer); - // read the next sector + // read the next sector fatBufferCurSector++; disc_ReadSector(fatBufferCurSector, fatBuffer); } - + oldValue |= (((u8*)fatBuffer)[offset] & 0x0F) << 8; ((u8*)fatBuffer)[offset] = (((u8*)fatBuffer)[offset] & 0xF0) | ((value >> 8) & 0x0F); } - if (oldValue >= 0x0FF7) + if (oldValue >= 0x0FF7) { oldValue = CLUSTER_EOF; } break; - + case FS_FAT16: sector = filesysFAT + ((cluster << 1) / BYTE_PER_READ); offset = cluster % (BYTE_PER_READ >> 1); @@ -634,23 +634,23 @@ u32 FAT_ReadWriteFatEntryBuffered (u32 cluster, u32 value) // Load correct sector to buffer fatBufferCurSector = sector; disc_ReadSector(fatBufferCurSector, fatBuffer); - } + } // write the value to the FAT buffer oldValue = ((u16*)fatBuffer)[offset]; ((u16*)fatBuffer)[offset] = value; - if (oldValue >= 0xFFF7) + if (oldValue >= 0xFFF7) { oldValue = CLUSTER_EOF; } break; - + case FS_FAT32: sector = filesysFAT + ((cluster << 2) / BYTE_PER_READ); offset = cluster % (BYTE_PER_READ >> 2); - + // If FAT buffer contains wrong sector if (sector != fatBufferCurSector) { @@ -666,18 +666,18 @@ u32 FAT_ReadWriteFatEntryBuffered (u32 cluster, u32 value) oldValue = ((u32*)fatBuffer)[offset]; ((u32*)fatBuffer)[offset] = value; - if (oldValue >= 0x0FFFFFF7) + if (oldValue >= 0x0FFFFFF7) { oldValue = CLUSTER_EOF; } break; - + default: oldValue = CLUSTER_FREE; break; } - + return oldValue; } #endif @@ -727,7 +727,7 @@ u32 FAT_FirstFreeCluster(void) /*----------------------------------------------------------------- FAT_LinkFreeCluster Internal function - gets the first available free cluster, sets it -to end of file, links the input cluster to it then returns the +to end of file, links the input cluster to it then returns the cluster number -----------------------------------------------------------------*/ u32 FAT_LinkFreeCluster(u32 cluster) @@ -746,7 +746,7 @@ u32 FAT_LinkFreeCluster(u32 cluster) { return curLink; // Return the current link - don't allocate a new one } - + // Get a free cluster firstFree = FAT_FirstFreeCluster(); @@ -777,7 +777,7 @@ Internal function - frees any cluster used by a file bool FAT_ClearLinks (u32 cluster) { u32 nextCluster; - + if ((cluster < 0x0002) || (cluster > fatLastCluster)) return false; @@ -793,7 +793,7 @@ bool FAT_ClearLinks (u32 cluster) while ((cluster != CLUSTER_EOF) && (cluster != CLUSTER_FREE)) { cluster = FAT_ReadWriteFatEntryBuffered (cluster, CLUSTER_FREE); - } + } // Flush fat write buffer FAT_WriteFatEntryFlushBuffer (); @@ -814,7 +814,7 @@ bool FAT_InitFiles (void) int i; int bootSector; BOOT_SEC* bootSec; - + if (!disc_Init()) { return (false); @@ -830,7 +830,7 @@ bool FAT_InitFiles (void) return false; }*/ - + // Check if there is a FAT string, which indicates this is a boot sector if ((globalBuffer[0x36] == 'F') && (globalBuffer[0x37] == 'A') && (globalBuffer[0x38] == 'T')) @@ -848,9 +848,9 @@ bool FAT_InitFiles (void) // First check for an active partition for (i=0x1BE; (i < 0x1FE) && (globalBuffer[i] != 0x80); i+= 0x10); // If it didn't find an active partition, search for any valid partition - if (i == 0x1FE) + if (i == 0x1FE) for (i=0x1BE; (i < 0x1FE) && (globalBuffer[i+0x04] == 0x00); i+= 0x10); - + // Go to first valid partition if ( i != 0x1FE) // Make sure it found a partition { @@ -865,7 +865,7 @@ bool FAT_InitFiles (void) if (!disc_ReadSector (bootSector, bootSec)) { return false; } - + // Store required information about the file system if (bootSec->sectorsPerFAT != 0) { @@ -875,7 +875,7 @@ bool FAT_InitFiles (void) { filesysSecPerFAT = bootSec->extBlock.fat32.sectorsPerFAT32; } - + if (bootSec->numSectorsSmall != 0) { filesysNumSec = bootSec->numSectorsSmall; @@ -987,7 +987,7 @@ Return the file info structure of the next valid file entry u32 dirCluster: IN cluster of subdirectory table int entry: IN the desired file entry int origin IN: relative position of the entry -DIR_ENT return OUT: desired dirEntry. First char will be FILE_FREE if +DIR_ENT return OUT: desired dirEntry. First char will be FILE_FREE if the entry does not exist. -----------------------------------------------------------------*/ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin) @@ -1011,8 +1011,8 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin) { return (dir); } - - switch (origin) + + switch (origin) { case SEEK_SET: wrkDirCluster = dirCluster; @@ -1022,7 +1022,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin) case SEEK_CUR: // Don't change anything break; case SEEK_END: // Find entry signifying end of directory - // Subtraction will never reach 0, so it keeps going + // Subtraction will never reach 0, so it keeps going // until reaches end of directory wrkDirCluster = dirCluster; wrkDirSector = 0; @@ -1055,7 +1055,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin) { notFound = true; } - firstSector = FAT_ClustToSect(wrkDirCluster); + firstSector = FAT_ClustToSect(wrkDirCluster); } else if ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER) && (wrkDirSector == (filesysData - filesysRootDir))) { @@ -1082,7 +1082,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin) lfnName[0] = '\0'; } } - if (entry == 0) + if (entry == 0) { if (!lfnExists) { @@ -1128,7 +1128,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin) } } } while (!found && !notFound); - + // If no file is found, return FILE_FREE if (notFound) { @@ -1141,7 +1141,7 @@ DIR_ENT FAT_GetDirEntry ( u32 dirCluster, int entry, int origin) /*----------------------------------------------------------------- FAT_GetLongFilename -Get the long name of the last file or directory retrived with +Get the long name of the last file or directory retrived with GetDirEntry. Also works for FindFirstFile and FindNextFile. If a long name doesn't exist, it returns the short name instead. @@ -1156,14 +1156,14 @@ bool FAT_GetLongFilename (char* filename) strncpy (filename, lfnName, MAX_FILENAME_LENGTH - 1); filename[MAX_FILENAME_LENGTH - 1] = '\0'; - + return true; } /*----------------------------------------------------------------- FAT_GetFilename -Get the alias (short name) of the file or directory stored in +Get the alias (short name) of the file or directory stored in dirEntry DIR_ENT dirEntry: IN a valid directory table entry char* alias OUT: will be filled with the alias (short filename), @@ -1192,7 +1192,7 @@ bool FAT_GetFilename (DIR_ENT dirEntry, char* alias) } } else - { + { // Copy the filename from the dirEntry to the string for (i = 0; (i < 8) && (dirEntry.name[i] != ' '); i++) { @@ -1230,8 +1230,8 @@ bool FAT_GetAlias (char* alias) } // Read in the last accessed directory entry disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - - return FAT_GetFilename (((DIR_ENT*)globalBuffer)[wrkDirOffset], alias); + + return FAT_GetFilename (((DIR_ENT*)globalBuffer)[wrkDirOffset], alias); } /*----------------------------------------------------------------- @@ -1244,8 +1244,8 @@ u32 FAT_GetFileSize (void) { // Read in the last accessed directory entry disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - - return ((DIR_ENT*)globalBuffer)[wrkDirOffset].fileSize; + + return ((DIR_ENT*)globalBuffer)[wrkDirOffset].fileSize; } /*----------------------------------------------------------------- @@ -1257,8 +1257,8 @@ u32 FAT_GetFileCluster (void) { // Read in the last accessed directory entry disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - - return (((DIR_ENT*)globalBuffer)[wrkDirOffset].startCluster) | (((DIR_ENT*)globalBuffer)[wrkDirOffset].startClusterHigh << 16); + + return (((DIR_ENT*)globalBuffer)[wrkDirOffset].startCluster) | (((DIR_ENT*)globalBuffer)[wrkDirOffset].startClusterHigh << 16); } /*----------------------------------------------------------------- @@ -1270,8 +1270,8 @@ u8 FAT_GetFileAttributes (void) { // Read in the last accessed directory entry disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - - return ((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib; + + return ((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib; } #ifdef CAN_WRITE_TO_DISC @@ -1294,10 +1294,10 @@ u8 FAT_SetFileAttributes (const char* filename, u8 attributes, u8 mask) disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); ((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib = (((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib & ~(mask & 0x27)) | (attributes & 0x27); // 0x27 is he settable attributes - + disc_WriteSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - return ((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib; + return ((DIR_ENT*)globalBuffer)[wrkDirOffset].attrib; } #endif @@ -1305,7 +1305,7 @@ u8 FAT_SetFileAttributes (const char* filename, u8 attributes, u8 mask) time_t FAT_FileTimeToCTime (u16 fileTime, u16 fileDate) { struct tm timeInfo; - + timeInfo.tm_year = (fileDate >> 9) + 80; // years since midnight January 1970 timeInfo.tm_mon = ((fileDate >> 5) & 0xf) - 1; // Months since january timeInfo.tm_mday = fileDate & 0x1f; // Day of the month @@ -1326,8 +1326,8 @@ time_t FAT_GetFileCreationTime (void) { // Read in the last accessed directory entry disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - - return FAT_FileTimeToCTime(((DIR_ENT*)globalBuffer)[wrkDirOffset].cTime, ((DIR_ENT*)globalBuffer)[wrkDirOffset].cDate); + + return FAT_FileTimeToCTime(((DIR_ENT*)globalBuffer)[wrkDirOffset].cTime, ((DIR_ENT*)globalBuffer)[wrkDirOffset].cDate); } /*----------------------------------------------------------------- @@ -1339,8 +1339,8 @@ time_t FAT_GetFileLastWriteTime (void) { // Read in the last accessed directory entry disc_ReadSector ((wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector, globalBuffer); - - return FAT_FileTimeToCTime(((DIR_ENT*)globalBuffer)[wrkDirOffset].mTime, ((DIR_ENT*)globalBuffer)[wrkDirOffset].mDate); + + return FAT_FileTimeToCTime(((DIR_ENT*)globalBuffer)[wrkDirOffset].mTime, ((DIR_ENT*)globalBuffer)[wrkDirOffset].mDate); } #endif @@ -1374,8 +1374,8 @@ DIR_ENT FAT_DirEntFromPath (const char* path) return; } #endif - - if (path[pathPos] == '/') + + if (path[pathPos] == '/') { dirCluster = filesysRootDirClus; // Start at root directory } @@ -1383,13 +1383,13 @@ DIR_ENT FAT_DirEntFromPath (const char* path) { dirCluster = curWorkDirCluster; // Start at current working dir } - + // Eat any slash / while ((path[pathPos] == '/') && (path[pathPos] != '\0')) { pathPos++; } - + // Search until can't continue found = false; notFound = false; @@ -1437,7 +1437,7 @@ DIR_ENT FAT_DirEntFromPath (const char* path) flagLFN = true; } } - + // Add end of string char name[namePos] = '\0'; @@ -1497,7 +1497,7 @@ DIR_ENT FAT_DirEntFromPath (const char* path) dirEntry = FAT_GetDirEntry (dirCluster, 1, SEEK_CUR); } } - + if (found && ((dirEntry.attrib & ATTRIB_DIR) == ATTRIB_DIR) && (path[pathPos] != '\0')) // It has found a directory from within the path that needs to be followed { @@ -1505,7 +1505,7 @@ DIR_ENT FAT_DirEntFromPath (const char* path) dirCluster = dirEntry.startCluster | (dirEntry.startClusterHigh << 16); } } - + if (notFound) { dirEntry.name[0] = FILE_FREE; @@ -1534,11 +1534,11 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) bool flagLFN, dotSeen; char fileAlias[13] = {0}; int tailNum; - + unsigned char chkSum = 0; - + u32 oldWorkDirCluster; - + DIR_ENT* dirEntries = (DIR_ENT*)globalBuffer; u32 dirCluster; int secOffset; @@ -1566,7 +1566,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) { curWorkDirCluster = filesysRootDirClus; } - + pathPos = 0; filePos = 0; flagLFN = false; @@ -1576,7 +1576,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) if (path[pathPos + filePos] == '/') { filename[filePos] = '\0'; - if (FAT_chdir(filename) == false) + if (FAT_chdir(filename) == false) { curWorkDirCluster = oldWorkDirCluster; return false; // Couldn't change directory @@ -1587,17 +1587,17 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) filename[filePos] = path[pathPos + filePos]; filePos++; } - + // Skip over last slashes while (path[pathPos] == '/') pathPos++; - + // Check if the filename has a leading "." // If so, it is an LFN if (path[pathPos] == '.') { flagLFN = true; } - + // Copy name from path filePos = 0; dotSeen = false; @@ -1622,12 +1622,12 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) flagLFN = true; } } - + if (filePos == 0) // No filename { return false; } - + // Check if a long filename was specified if (filePos > 12) { @@ -1638,7 +1638,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) if (!flagLFN && (strrchr (filename, '.') != NULL) && (strlen(strrchr(filename, '.')) > 4)) { flagLFN = true; } - + lfnPos = (filePos - 1) / 13; // Add end of string char @@ -1646,8 +1646,8 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) // Clear remaining chars while (filePos < MAX_FILENAME_LENGTH) filename[filePos++] = 0x01; // Set for LFN compatibility - - + + if (flagLFN) { // Generate short filename - always a 2 digit number for tail @@ -1666,7 +1666,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) // Pad Alias with underscores while (aliasPos < 5) fileAlias[aliasPos++] = '_'; - + fileAlias[5] = '~'; fileAlias[8] = '.'; fileAlias[9] = ' '; @@ -1692,14 +1692,14 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) } else { aliasPos = 9; } - + // Pad Alias extension with spaces while (aliasPos < 12) fileAlias[aliasPos++] = ' '; - + fileAlias[12] = '\0'; - - + + // Get a valid tail number tailNum = 0; do { @@ -1707,7 +1707,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) fileAlias[6] = 0x30 + ((tailNum / 10) % 10); // 10's digit fileAlias[7] = 0x30 + (tailNum % 10); // 1's digit } while ((FAT_DirEntFromPath(fileAlias).name[0] != FILE_FREE) && (tailNum < 100)); - + if (tailNum < 100) // Found an alias not being used { // Calculate file checksum @@ -1725,7 +1725,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) { return false; } - + dirEntryLength = lfnPos + 2; } else // Its not a long file name @@ -1743,7 +1743,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) dirEntryLength = 1; } - + // Change dirEntry name to match alias for (aliasPos = 0; ((fileAlias[aliasPos] != '.') && (fileAlias[aliasPos] != '\0') && (aliasPos < 8)); aliasPos++) { @@ -1775,12 +1775,12 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) maxSectors = (dirCluster == FAT16_ROOT_DIR_CLUSTER ? (filesysData - filesysRootDir) : filesysSecPerClus); firstSector = (dirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(dirCluster)); disc_ReadSector (firstSector + secOffset, dirEntries); - + dirEntryRemain = dirEntryLength; tempDirCluster = dirCluster; tempSecOffset = secOffset; tempEntryOffset = entryOffset; - + // Search for a large enough space to fit in new directory entry while ((dirEntries[entryOffset].name[0] != FILE_LAST) && (dirEntryRemain > 0)) { @@ -1803,7 +1803,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) { dirCluster = FAT_NextCluster(dirCluster); } - firstSector = FAT_ClustToSect(dirCluster); + firstSector = FAT_ClustToSect(dirCluster); } else if ((dirCluster == FAT16_ROOT_DIR_CLUSTER) && (secOffset == (filesysData - filesysRootDir))) { @@ -1824,7 +1824,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) } // Modifying the last directory is a special case - have to erase following entries - if (dirEntries[entryOffset].name[0] == FILE_LAST) + if (dirEntries[entryOffset].name[0] == FILE_LAST) { dirEndFlag = true; } @@ -1843,7 +1843,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) } // Add new directory entry - while (dirEntryRemain > 0) + while (dirEntryRemain > 0) { // Move to next entry, first pass advances from last used entry entryOffset++; @@ -1868,7 +1868,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) { dirCluster = FAT_NextCluster(dirCluster); } - firstSector = FAT_ClustToSect(dirCluster); + firstSector = FAT_ClustToSect(dirCluster); } else if ((dirCluster == FAT16_ROOT_DIR_CLUSTER) && (secOffset == (filesysData - filesysRootDir))) { @@ -1900,7 +1900,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) lfnEntry.flag = ATTRIB_LFN; lfnEntry.reserved1 = 0; lfnEntry.reserved2 = 0; - + *((DIR_ENT_LFN*)&dirEntries[entryOffset]) = lfnEntry; lfnPos --; lfnEntry.ordinal = 0; @@ -1914,7 +1914,7 @@ bool FAT_AddDirEntry (const char* path, DIR_ENT newDirEntry) dirEntryRemain--; } - + // Write directory back to disk disc_WriteSector (firstSector + secOffset, dirEntries); @@ -1930,7 +1930,7 @@ FAT_FindNextFile Gets the name of the next directory entry (can be a file or subdirectory) char* filename: OUT filename, must be at least 13 chars long -FILE_TYPE return: OUT returns FT_NONE if failed, +FILE_TYPE return: OUT returns FT_NONE if failed, FT_FILE if it found a file and FT_DIR if it found a directory -----------------------------------------------------------------*/ FILE_TYPE FAT_FindNextFile(char* filename) @@ -1963,7 +1963,7 @@ FAT_FindFirstFile Gets the name of the first directory entry and resets the count (can be a file or subdirectory) char* filename: OUT filename, must be at least 13 chars long -FILE_TYPE return: OUT returns FT_NONE if failed, +FILE_TYPE return: OUT returns FT_NONE if failed, FT_FILE if it found a file and FT_DIR if it found a directory -----------------------------------------------------------------*/ FILE_TYPE FAT_FindFirstFile(char* filename) @@ -1971,7 +1971,7 @@ FILE_TYPE FAT_FindFirstFile(char* filename) // Get the first directory entry DIR_ENT file; file = FAT_GetDirEntry (curWorkDirCluster, 1, SEEK_SET); - + if (file.name[0] == FILE_FREE) { return FT_NONE; // Did not find a file @@ -1996,7 +1996,7 @@ FAT_FindFirstFileLFN Gets the long file name of the first directory entry and resets the count (can be a file or subdirectory) char* lfn: OUT long file name, must be at least 256 chars long -FILE_TYPE return: OUT returns FT_NONE if failed, +FILE_TYPE return: OUT returns FT_NONE if failed, FT_FILE if it found a file and FT_DIR if it found a directory -----------------------------------------------------------------*/ FILE_TYPE FAT_FindFirstFileLFN(char* lfn) @@ -2012,7 +2012,7 @@ FAT_FindNextFileLFN Gets the long file name of the next directory entry (can be a file or subdirectory) char* lfn: OUT long file name, must be at least 256 chars long -FILE_TYPE return: OUT returns FT_NONE if failed, +FILE_TYPE return: OUT returns FT_NONE if failed, FT_FILE if it found a file and FT_DIR if it found a directory -----------------------------------------------------------------*/ FILE_TYPE FAT_FindNextFileLFN(char* lfn) @@ -2026,29 +2026,29 @@ FILE_TYPE FAT_FindNextFileLFN(char* lfn) /*----------------------------------------------------------------- FAT_FileExists -Returns the type of file +Returns the type of file char* filename: IN filename of the file to look for -FILE_TYPE return: OUT returns FT_NONE if there is now file with +FILE_TYPE return: OUT returns FT_NONE if there is now file with that name, FT_FILE if it is a file and FT_DIR if it is a directory -----------------------------------------------------------------*/ FILE_TYPE FAT_FileExists(const char* filename) { - DIR_ENT dirEntry; - // Get the dirEntry for the path specified - dirEntry = FAT_DirEntFromPath (filename); - - if (dirEntry.name[0] == FILE_FREE) - { - return FT_NONE; - } - else if (dirEntry.attrib & ATTRIB_DIR) - { - return FT_DIR; - } - else - { - return FT_FILE; - } + DIR_ENT dirEntry; + // Get the dirEntry for the path specified + dirEntry = FAT_DirEntFromPath (filename); + + if (dirEntry.name[0] == FILE_FREE) + { + return FT_NONE; + } + else if (dirEntry.attrib & ATTRIB_DIR) + { + return FT_DIR; + } + else + { + return FT_FILE; + } } /*----------------------------------------------------------------- @@ -2074,7 +2074,7 @@ u32 FAT_GetFileSystemTotalSize (void) /*----------------------------------------------------------------- FAT_chdir Changes the current working directory -const char* path: IN null terminated string of directory separated by +const char* path: IN null terminated string of directory separated by forward slashes, / is root bool return: OUT returns true if successful -----------------------------------------------------------------*/ @@ -2090,7 +2090,7 @@ bool FAT_chdir (const char* path) { return true; } - + dir = FAT_DirEntFromPath (path); if (((dir.attrib & ATTRIB_DIR) == ATTRIB_DIR) && (dir.name[0] != FILE_FREE)) @@ -2111,7 +2111,7 @@ bool FAT_chdir (const char* path) return true; } else - { + { // Couldn't change directory - wrong path specified return false; } @@ -2120,12 +2120,12 @@ bool FAT_chdir (const char* path) /*----------------------------------------------------------------- FAT_fopen(filename, mode) Opens a file -const char* path: IN null terminated string of filename and path +const char* path: IN null terminated string of filename and path separated by forward slashes, / is root const char* mode: IN mode to open file in Supported modes: "r", "r+", "w", "w+", "a", "a+", don't use "b" or "t" in any mode, as all files are openned in binary mode -FAT_FILE* return: OUT handle to open file, returns NULL if the file +FAT_FILE* return: OUT handle to open file, returns NULL if the file couldn't be openned -----------------------------------------------------------------*/ FAT_FILE* FAT_fopen(const char* path, const char* mode) @@ -2149,10 +2149,10 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) { return NULL; } - + // Get the dirEntry for the path specified dirEntry = FAT_DirEntFromPath (path); - + // Check that it is not a directory if (dirEntry.attrib & ATTRIB_DIR) { @@ -2174,7 +2174,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) // Find a free file buffer for (fileNum = 0; (fileNum < MAX_FILES_OPEN) && (openFiles[fileNum].inUse == true); fileNum++); - + if (fileNum == MAX_FILES_OPEN) // No free files { return NULL; @@ -2191,7 +2191,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) { return NULL; } - + file->read = true; #ifdef CAN_WRITE_TO_DISC file->write = ( strchr(mode, '+') != NULL ); //(mode[1] == '+'); @@ -2199,13 +2199,13 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) file->write = false; #endif file->append = false; - + // Store information about position within the file, for use // by FAT_fread, FAT_fseek, etc. file->firstCluster = dirEntry.startCluster | (dirEntry.startClusterHigh << 16); - + #ifdef CAN_WRITE_TO_DISC - // Check if file is openned for random. If it is, and currently has no cluster, one must be + // Check if file is openned for random. If it is, and currently has no cluster, one must be // assigned to it. if (file->write && file->firstCluster == CLUSTER_FREE) { @@ -2223,7 +2223,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) disc_WriteSector (file->dirEntSector, globalBuffer); } #endif - + file->length = dirEntry.fileSize; file->curPos = 0; file->curClus = dirEntry.startCluster | (dirEntry.startClusterHigh << 16); @@ -2234,7 +2234,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) file->appByte = 0; file->appClus = 0; file->appSect = 0; - + disc_ReadSector( FAT_ClustToSect( file->curClus), file->readBuffer); file->inUse = true; // We're using this file now @@ -2248,7 +2248,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) { dirEntry.attrib = ATTRIB_ARCH; dirEntry.reserved = 0; - + // Time and date set to system time and date dirEntry.cTime_ms = 0; dirEntry.cTime = getRTCtoFileTime(); @@ -2257,12 +2257,12 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) dirEntry.mTime = getRTCtoFileTime(); dirEntry.mDate = getRTCtoFileDate(); } - else // Already a file entry + else // Already a file entry { // Free any clusters used FAT_ClearLinks (dirEntry.startCluster | (dirEntry.startClusterHigh << 16)); } - + // Get a cluster to use startCluster = FAT_LinkFreeCluster (CLUSTER_FREE); if (startCluster == CLUSTER_FREE) // Couldn't get a free cluster @@ -2298,13 +2298,13 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) ((DIR_ENT*) globalBuffer)[file->dirEntOffset] = dirEntry; disc_WriteSector (file->dirEntSector, globalBuffer); } - + // Now that file is created, open it file->read = ( strchr(mode, '+') != NULL ); //(mode[1] == '+'); file->write = true; file->append = false; - + // Store information about position within the file, for use // by FAT_fread, FAT_fseek, etc. file->firstCluster = startCluster; @@ -2318,7 +2318,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) file->appByte = 0; file->appClus = 0; file->appSect = 0; - + // Empty file, so empty read buffer memset (file->readBuffer, 0, BYTE_PER_READ); file->inUse = true; // We're using this file now @@ -2332,7 +2332,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) { dirEntry.attrib = ATTRIB_ARCH; dirEntry.reserved = 0; - + // Time and date set to system time and date dirEntry.cTime_ms = 0; dirEntry.cTime = getRTCtoFileTime(); @@ -2352,13 +2352,13 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) } dirEntry.startCluster = (startCluster & 0xFFFF); dirEntry.startClusterHigh = ((startCluster >> 16) & 0xFFFF); - + if(!FAT_AddDirEntry (path, dirEntry)) return NULL; - + // Get the newly created dirEntry dirEntry = FAT_DirEntFromPath (path); - + // Store append cluster file->appClus = startCluster; @@ -2377,7 +2377,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) { return NULL; } - + // Store cluster position into the directory entry dirEntry.startCluster = (file->firstCluster & 0xFFFF); dirEntry.startClusterHigh = ((file->firstCluster >> 16) & 0xFFFF); @@ -2387,7 +2387,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) // Store append cluster file->appClus = startCluster; - + } else { // Follow cluster list until last one is found @@ -2410,7 +2410,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) file->read = ( strchr(mode, '+') != NULL ); file->write = false; file->append = true; - + // Calculate the sector and byte of the current position, // and store them file->appSect = (dirEntry.fileSize % filesysBytePerClus) / BYTE_PER_READ; @@ -2424,7 +2424,7 @@ FAT_FILE* FAT_fopen(const char* path, const char* mode) file->curClus = file->appClus; file->curSect = file->appSect; file->curByte = file->appByte; - + // Read into buffer disc_ReadSector( FAT_ClustToSect(file->curClus) + file->curSect, file->readBuffer); file->inUse = true; // We're using this file now @@ -2464,7 +2464,7 @@ bool FAT_fclose (FAT_FILE* file) disc_CacheFlush(); } #endif - file->inUse = false; + file->inUse = false; return true; } else @@ -2515,14 +2515,14 @@ int FAT_fseek(FAT_FILE* file, s32 offset, int origin) } // Can't seek in append only mode - if (!file->read && !file->write) + if (!file->read && !file->write) { return -1; } curPos = file->curPos; - switch (origin) + switch (origin) { case SEEK_SET: if (offset >= 0) @@ -2537,13 +2537,13 @@ int FAT_fseek(FAT_FILE* file, s32 offset, int origin) if (offset >= 0) { position = curPos + offset; - } + } else if ( (u32)(offset * -1) >= curPos ) { // Tried to seek before start of file position = 0; } - else + else { // Using u32 to maintain 32 bits of accuracy position = curPos - (u32)(offset * -1); @@ -2560,7 +2560,7 @@ int FAT_fseek(FAT_FILE* file, s32 offset, int origin) // Tried to seek before start of file position = 0; } - else + else { // Using u32 to maintain 32 bits of accuracy position = file->length - (u32)(offset * -1); @@ -2575,7 +2575,7 @@ int FAT_fseek(FAT_FILE* file, s32 offset, int origin) // Tried to go past end of file position = file->length; } - + // Save position file->curPos = position; @@ -2608,14 +2608,14 @@ int FAT_fseek(FAT_FILE* file, s32 offset, int origin) nextCluster = FAT_NextCluster (cluster); } // Check if ran out of clusters, and the file is being written to - if ((clusCount >= 0) && (file->write || file->append)) + if ((clusCount >= 0) && (file->write || file->append)) { // Set flag to allocate a new cluster file->curSect = filesysSecPerClus; file->curByte = 0; } file->curClus = cluster; - + // Reload sector buffer for new position in file, if it is a different sector if ((curPos ^ position) >= BYTE_PER_READ) { @@ -2645,7 +2645,7 @@ u32 FAT_fread (void* buffer, u32 size, u32 count, FAT_FILE* file) int curSect; u32 curClus; u32 tempNextCluster; - + int tempVar; char* data = (char*)buffer; @@ -2678,14 +2678,14 @@ u32 FAT_fread (void* buffer, u32 size, u32 count, FAT_FILE* file) if (tempVar > remain) tempVar = remain; - if ((tempVar < BYTE_PER_READ) && flagNoError) + if ((tempVar < BYTE_PER_READ) && flagNoError) { memcpy(data, &(file->readBuffer[curByte]), tempVar); remain -= tempVar; data += tempVar; curByte += tempVar; - if (curByte >= BYTE_PER_READ) + if (curByte >= BYTE_PER_READ) { curByte = 0; curSect++; @@ -2694,7 +2694,7 @@ u32 FAT_fread (void* buffer, u32 size, u32 count, FAT_FILE* file) // align to cluster // tempVar is number of sectors to read - if (remain > (filesysSecPerClus - curSect) * BYTE_PER_READ) + if (remain > (filesysSecPerClus - curSect) * BYTE_PER_READ) { tempVar = filesysSecPerClus - curSect; } else { @@ -2789,7 +2789,7 @@ u32 FAT_fread (void* buffer, u32 size, u32 count, FAT_FILE* file) FAT_fwrite(buffer, size, count, file) Writes size * count bytes into file from buffer, starting from current position. It then sets the current position to the - byte after the last byte written. If the file was openned in + byte after the last byte written. If the file was openned in append mode it always writes to the end of the file. const void* buffer IN: Pointer to buffer containing data. Should be at least as big as the number of bytes to be written. @@ -2870,7 +2870,7 @@ u32 FAT_fwrite (const void* buffer, u32 size, u32 count, FAT_FILE* file) disc_ReadSector( FAT_ClustToSect( curClus), writeBuffer); } } - + // Align to sector tempVar = BYTE_PER_READ - curByte; if (tempVar > remain) @@ -2885,9 +2885,9 @@ u32 FAT_fwrite (const void* buffer, u32 size, u32 count, FAT_FILE* file) // Write buffer back to disk disc_WriteSector (curSect + FAT_ClustToSect(curClus), writeBuffer); - + // Move onto next sector - if (curByte >= BYTE_PER_READ) + if (curByte >= BYTE_PER_READ) { curByte = 0; curSect++; @@ -2896,7 +2896,7 @@ u32 FAT_fwrite (const void* buffer, u32 size, u32 count, FAT_FILE* file) // Align to cluster // tempVar is number of sectors to write - if (remain > (filesysSecPerClus - curSect) * BYTE_PER_READ) + if (remain > (filesysSecPerClus - curSect) * BYTE_PER_READ) { tempVar = filesysSecPerClus - curSect; } else { @@ -2964,7 +2964,7 @@ u32 FAT_fwrite (const void* buffer, u32 size, u32 count, FAT_FILE* file) remain -= tempVar * BYTE_PER_READ; curSect += tempVar; } - + // Last remaining sector // Check if sector wanted is different to the one started with if ( (( (file->append ? file->appByte : file->curByte) + length) >= BYTE_PER_READ) && flagNoError) @@ -2984,7 +2984,7 @@ u32 FAT_fwrite (const void* buffer, u32 size, u32 count, FAT_FILE* file) disc_WriteSector( curSect + FAT_ClustToSect( curClus), writeBuffer); } } - + // Amount read is the originally requested amount minus stuff remaining length = length - remain; @@ -3041,14 +3041,14 @@ int FAT_remove (const char* path) u32 oldWorkDirCluster; char checkFilename[13]; FILE_TYPE checkFiletype; - + dirEntry = FAT_DirEntFromPath (path); if (dirEntry.name[0] == FILE_FREE) { return -1; } - + // Only delete directories if the directory is entry if (dirEntry.attrib & ATTRIB_DIR) { @@ -3062,10 +3062,10 @@ int FAT_remove (const char* path) { checkFiletype = FAT_FindNextFile (checkFilename); } - + // Change back to working directory curWorkDirCluster = oldWorkDirCluster; - + // Check that the directory is empty if (checkFiletype != FT_NONE) { @@ -3084,7 +3084,7 @@ int FAT_remove (const char* path) disc_ReadSector ( (wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector , globalBuffer); ((DIR_ENT*)globalBuffer)[wrkDirOffset].name[0] = FILE_FREE; disc_WriteSector ( (wrkDirCluster == FAT16_ROOT_DIR_CLUSTER ? filesysRootDir : FAT_ClustToSect(wrkDirCluster)) + wrkDirSector , globalBuffer); - + // Flush any sectors in disc cache disc_CacheFlush(); @@ -3095,7 +3095,7 @@ int FAT_remove (const char* path) #ifdef CAN_WRITE_TO_DISC /*----------------------------------------------------------------- FAT_mkdir (path) -Makes a new directory, so long as no other directory or file has +Makes a new directory, so long as no other directory or file has the same name. const char* path IN: Path and filename of directory to make int return OUT: zero if successful, non-zero if not @@ -3123,7 +3123,7 @@ int FAT_mkdir (const char* path) { curWorkDirCluster = filesysRootDirClus; } - + pathPos = 0; filePos = 0; @@ -3132,7 +3132,7 @@ int FAT_mkdir (const char* path) if (path[pathPos + filePos] == '/') { pathname[filePos] = '\0'; - if (FAT_chdir(pathname) == false) + if (FAT_chdir(pathname) == false) { curWorkDirCluster = oldDirCluster; return -1; // Couldn't change directory @@ -3236,9 +3236,9 @@ FAT_fgets (char *tgtBuffer, int num, FAT_FILE* file) Gets a up to num bytes from file, stopping at the first newline. -CAUTION: does not do strictly streaming. I.e. it's +CAUTION: does not do strictly streaming. I.e. it's reading more then needed bytes and seeking back. - shouldn't matter for random access + shouldn't matter for random access char *tgtBuffer OUT: buffer to write to int num IN: size of target buffer @@ -3250,62 +3250,62 @@ bool return OUT: character if successful, EOF if not * Added check for unix style text files * Removed seek when no newline is found, since it isn't necessary -------------------------------------------------------------------*/ -char *FAT_fgets(char *tgtBuffer, int num, FAT_FILE* file) -{ +char *FAT_fgets(char *tgtBuffer, int num, FAT_FILE* file) +{ u32 curPos; u32 readLength; char *returnChar; - - // invalid filehandle + + // invalid filehandle if (file == NULL) { - return NULL ; + return NULL ; } - - // end of file + + // end of file if (FAT_feof(file)==true) { - return NULL ; - } - - // save current position - curPos = FAT_ftell(file); - - // read the full buffer (max string chars is num-1 and one end of string \0 - readLength = FAT_fread(tgtBuffer,1,num-1,file) ; - - // mark least possible end of string - tgtBuffer[readLength] = '\0' ; - - if (readLength==0) { - // return error - return NULL ; - } - - // get position of first return '\r' - returnChar = strchr(tgtBuffer,'\r'); - + return NULL ; + } + + // save current position + curPos = FAT_ftell(file); + + // read the full buffer (max string chars is num-1 and one end of string \0 + readLength = FAT_fread(tgtBuffer,1,num-1,file) ; + + // mark least possible end of string + tgtBuffer[readLength] = '\0' ; + + if (readLength==0) { + // return error + return NULL ; + } + + // get position of first return '\r' + returnChar = strchr(tgtBuffer,'\r'); + // if no return is found, search for a newline if (returnChar == NULL) { returnChar = strchr(tgtBuffer,'\n'); } - - // Mark the return, if existant, as end of line/string - if (returnChar!=NULL) { - *returnChar++ = 0 ; - if (*returnChar=='\n') { // catch newline too when jumping over the end - // return to location after \r\n (strlen+2) - FAT_fseek(file,curPos+strlen(tgtBuffer)+2,SEEK_SET) ; - return tgtBuffer ; - } else { - // return to location after \r (strlen+1) - FAT_fseek(file,curPos+strlen(tgtBuffer)+1,SEEK_SET) ; - return tgtBuffer ; + + // Mark the return, if existant, as end of line/string + if (returnChar!=NULL) { + *returnChar++ = 0 ; + if (*returnChar=='\n') { // catch newline too when jumping over the end + // return to location after \r\n (strlen+2) + FAT_fseek(file,curPos+strlen(tgtBuffer)+2,SEEK_SET) ; + return tgtBuffer ; + } else { + // return to location after \r (strlen+1) + FAT_fseek(file,curPos+strlen(tgtBuffer)+1,SEEK_SET) ; + return tgtBuffer ; } } - - return tgtBuffer ; + + return tgtBuffer ; } #ifdef CAN_WRITE_TO_DISC @@ -3322,20 +3322,20 @@ bool return OUT: number of characters written if successful, * Uses FAT_FILE instead of int * writtenBytes is now u32 instead of int -------------------------------------------------------------------*/ -int FAT_fputs (const char *string, FAT_FILE* file) -{ +int FAT_fputs (const char *string, FAT_FILE* file) +{ u32 writtenBytes; - // save string except end of string '\0' - writtenBytes = FAT_fwrite((void *)string, 1, strlen(string), file); + // save string except end of string '\0' + writtenBytes = FAT_fwrite((void *)string, 1, strlen(string), file); - // check if we had an error - if (writtenBytes != strlen(string)) - { - // return EOF error + // check if we had an error + if (writtenBytes != strlen(string)) + { + // return EOF error return EOF; } - // return the charcount written - return writtenBytes ; + // return the charcount written + return writtenBytes ; } #endif diff --git a/backends/platform/ds/arm9/source/fat/gba_nds_fat.h b/backends/platform/ds/arm9/source/fat/gba_nds_fat.h index c554cc80f6..539f94fef7 100644 --- a/backends/platform/ds/arm9/source/fat/gba_nds_fat.h +++ b/backends/platform/ds/arm9/source/fat/gba_nds_fat.h @@ -25,7 +25,7 @@ // Maximum number of files open at once // Increase this to open more files, decrease to save memory -#define MAX_FILES_OPEN 4 +#define MAX_FILES_OPEN 16 // Allow file writing // Disable this to remove file writing support @@ -147,7 +147,7 @@ bool FAT_GetAlias (char* alias); /*----------------------------------------------------------------- FAT_GetLongFilename -Get the long name of the last file or directory retrived with +Get the long name of the last file or directory retrived with GetDirEntry. Also works for FindFirstFile and FindNextFile char* filename: OUT will be filled with the filename, should be at least 256 bytes long @@ -210,7 +210,7 @@ FAT_FindNextFile Gets the name of the next directory entry (can be a file or subdirectory) char* filename: OUT filename, must be at least 13 chars long -FILE_TYPE return: OUT returns FT_NONE if failed, +FILE_TYPE return: OUT returns FT_NONE if failed, FT_FILE if it found a file and FT_DIR if it found a directory -----------------------------------------------------------------*/ FILE_TYPE FAT_FindNextFile (char* filename); @@ -220,7 +220,7 @@ FAT_FindFirstFile Gets the name of the first directory entry and resets the count (can be a file or subdirectory) char* filename: OUT filename, must be at least 13 chars long -FILE_TYPE return: OUT returns FT_NONE if failed, +FILE_TYPE return: OUT returns FT_NONE if failed, FT_FILE if it found a file and FT_DIR if it found a directory -----------------------------------------------------------------*/ FILE_TYPE FAT_FindFirstFile (char* filename); @@ -230,7 +230,7 @@ FAT_FindFirstFileLFN Gets the long file name of the first directory entry and resets the count (can be a file or subdirectory) char* lfn: OUT long file name, must be at least 256 chars long -FILE_TYPE return: OUT returns FT_NONE if failed, +FILE_TYPE return: OUT returns FT_NONE if failed, FT_FILE if it found a file and FT_DIR if it found a directory -----------------------------------------------------------------*/ FILE_TYPE FAT_FindFirstFileLFN(char* lfn); @@ -240,16 +240,16 @@ FAT_FindNextFileLFN Gets the long file name of the next directory entry (can be a file or subdirectory) char* lfn: OUT long file name, must be at least 256 chars long -FILE_TYPE return: OUT returns FT_NONE if failed, +FILE_TYPE return: OUT returns FT_NONE if failed, FT_FILE if it found a file and FT_DIR if it found a directory -----------------------------------------------------------------*/ FILE_TYPE FAT_FindNextFileLFN(char* lfn); /*----------------------------------------------------------------- FAT_FileExists -Returns the type of file +Returns the type of file char* filename: IN filename of the file to look for -FILE_TYPE return: OUT returns FT_NONE if there is now file with +FILE_TYPE return: OUT returns FT_NONE if there is now file with that name, FT_FILE if it is a file and FT_DIR if it is a directory -----------------------------------------------------------------*/ FILE_TYPE FAT_FileExists (const char* filename); @@ -269,7 +269,7 @@ u32 FAT_GetFileSystemTotalSize (void); /*----------------------------------------------------------------- FAT_chdir Changes the current working directory -const char* path: IN null terminated string of directory separated by +const char* path: IN null terminated string of directory separated by forward slashes, / is root bool return: OUT returns true if successful -----------------------------------------------------------------*/ @@ -282,12 +282,12 @@ bool FAT_chdir (const char* path); /*----------------------------------------------------------------- FAT_fopen(filename, mode) Opens a file -const char* path: IN null terminated string of filename and path +const char* path: IN null terminated string of filename and path separated by forward slashes, / is root const char* mode: IN mode to open file in Supported modes: "r", "r+", "w", "w+", "a", "a+", don't use "b" or "t" in any mode, as all files are openned in binary mode -FAT_FILE* return: OUT handle to open file, returns -1 if the file +FAT_FILE* return: OUT handle to open file, returns -1 if the file couldn't be openned -----------------------------------------------------------------*/ FAT_FILE* FAT_fopen(const char* path, const char* mode); @@ -338,7 +338,7 @@ u32 FAT_fread (void* buffer, u32 size, u32 count, FAT_FILE* file); FAT_fwrite(buffer, size, count, file) Writes size * count bytes into file from buffer, starting from current position. It then sets the current position to the - byte after the last byte written. If the file was openned in + byte after the last byte written. If the file was openned in append mode it always writes to the end of the file. const void* buffer IN: Pointer to buffer containing data. Should be at least as big as the number of bytes to be written. @@ -371,7 +371,7 @@ int FAT_remove (const char* path); #ifdef CAN_WRITE_TO_DISC /*----------------------------------------------------------------- FAT_mkdir (path) -Makes a new directory, so long as no other directory or file has +Makes a new directory, so long as no other directory or file has the same name. const char* path IN: Path and filename of directory to make int return OUT: zero if successful, non-zero if not @@ -403,9 +403,9 @@ FAT_fgets (char *tgtBuffer, int num, FAT_FILE* file) Gets a up to num bytes from file, stopping at the first newline. -CAUTION: does not do strictly streaming. I.e. it's +CAUTION: does not do strictly streaming. I.e. it's reading more then needed bytes and seeking back. - shouldn't matter for random access + shouldn't matter for random access char *tgtBuffer OUT: buffer to write to int num IN: size of target buffer diff --git a/backends/platform/ds/arm9/source/fat/io_dldi.h b/backends/platform/ds/arm9/source/fat/io_dldi.h index 034c6aace3..053de3a94c 100644 --- a/backends/platform/ds/arm9/source/fat/io_dldi.h +++ b/backends/platform/ds/arm9/source/fat/io_dldi.h @@ -1,8 +1,8 @@ /* - io_dldi.h + io_dldi.h Reserved space for new drivers - + This software is completely free. No warranty is provided. If you use it, please give me credit and email me about your project at chishm@hotmail.com diff --git a/backends/platform/ds/arm9/source/fat/io_dldi.s b/backends/platform/ds/arm9/source/fat/io_dldi.s index 657e475086..c2314e772d 100644 --- a/backends/platform/ds/arm9/source/fat/io_dldi.s +++ b/backends/platform/ds/arm9/source/fat/io_dldi.s @@ -17,8 +17,8 @@ .byte 0x01 @ Version number .byte 0x0F @32KiB @ Log [base-2] of the size of this driver in bytes. .byte 0x00 @ Sections to fix - .byte 0x0F @32KiB @ Log [base-2] of the allocated space in bytes. - + .byte 0x0F @32KiB @ Log [base-2] of the allocated space in bytes. + @--------------------------------------------------------------------------------- @ Text identifier - can be anything up to 47 chars + terminating null -- 16 bytes .align 4 @@ -42,13 +42,13 @@ _dldi_driver_name: _io_dldi: .ascii "DLDI" @ ioType .word 0x00000000 @ Features - .word _DLDI_startup @ - .word _DLDI_isInserted @ + .word _DLDI_startup @ + .word _DLDI_isInserted @ .word _DLDI_readSectors @ Function pointers to standard device driver functions - .word _DLDI_writeSectors @ - .word _DLDI_clearStatus @ - .word _DLDI_shutdown @ - + .word _DLDI_writeSectors @ + .word _DLDI_clearStatus @ + .word _DLDI_shutdown @ + @--------------------------------------------------------------------------------- _DLDI_startup: diff --git a/backends/platform/ds/arm9/source/fat/io_efa2.c b/backends/platform/ds/arm9/source/fat/io_efa2.c index 468361969e..f3aa65cfcb 100644 --- a/backends/platform/ds/arm9/source/fat/io_efa2.c +++ b/backends/platform/ds/arm9/source/fat/io_efa2.c @@ -47,7 +47,7 @@ See gba_nds_fat.txt for help and license details. // ID of Samsung K9K1G NAND flash chip #define EFA2_NAND_ID 0xEC79A5C0 -// first sector of udisk +// first sector of udisk #define EFA2_UDSK_START 0x40 // @@ -101,7 +101,7 @@ void efa2_nand_lock(void) { // // Set NAND Flash chip enable and write protection bits ? -// +// // val | ~CE | ~WP | // -----+-----+-----+ // 0 | 0 | 0 | @@ -125,7 +125,7 @@ inline void efa2_nand_reset(void) { // // Read out NAND ID information, could be used for card detection -// +// // | EFA2 1GBit | // ------------------+------------+ // maker code | 0xEC | @@ -166,7 +166,7 @@ EFA2_ClearStatus Reads and checks NAND status information bool return OUT: true if NAND is idle -----------------------------------------------------------------*/ -bool EFA2_ClearStatus (void) +bool EFA2_ClearStatus (void) { // tbd: currently there is no write support, so always return // true, there is no possibility for pending operations @@ -178,7 +178,7 @@ EFA2_IsInserted Checks to see if the NAND chip used by the EFA2 is present bool return OUT: true if the correct NAND chip is found -----------------------------------------------------------------*/ -bool EFA2_IsInserted (void) +bool EFA2_IsInserted (void) { EFA2_ClearStatus(); return (efa2_nand_id() == EFA2_NAND_ID); @@ -223,7 +223,7 @@ bool EFA2_ReadSectors (u32 sector, u8 numSecs, void* buffer) efa2_nand_reset(); // set NAND to READ1 operation mode and transfer page address - REG_EFA2_NAND_CMD = 0x00; // write READ1 command + REG_EFA2_NAND_CMD = 0x00; // write READ1 command REG_EFA2_NAND_WR = 0x00; // write address [7:0] REG_EFA2_NAND_WR = (page ) & 0xff; // write address [15:8] REG_EFA2_NAND_WR = (page >> 8 ) & 0xff; // write address[23:16] @@ -280,7 +280,7 @@ bool EFA2_WriteSectors (u32 sector, u8 numSecs, void* buffer) EFA2_Shutdown unload the EFA2 interface -----------------------------------------------------------------*/ -bool EFA2_Shutdown(void) +bool EFA2_Shutdown(void) { return EFA2_ClearStatus(); } @@ -368,7 +368,7 @@ See gba_nds_fat.txt for help and license details. // ID of Samsung K9K1G NAND flash chip #define EFA2_NAND_ID 0xEC79A5C0 -// first sector of udisk +// first sector of udisk #define EFA2_UDSK_START 0x40 // @@ -422,7 +422,7 @@ void efa2_nand_lock(void) { // // Set NAND Flash chip enable and write protection bits ? -// +// // val | ~CE | ~WP | // -----+-----+-----+ // 0 | 0 | 0 | @@ -446,7 +446,7 @@ inline void efa2_nand_reset(void) { // // Read out NAND ID information, could be used for card detection -// +// // | EFA2 1GBit | // ------------------+------------+ // maker code | 0xEC | @@ -487,7 +487,7 @@ EFA2_ClearStatus Reads and checks NAND status information bool return OUT: true if NAND is idle -----------------------------------------------------------------*/ -bool EFA2_ClearStatus (void) +bool EFA2_ClearStatus (void) { // tbd: currently there is no write support, so always return // true, there is no possibility for pending operations @@ -499,7 +499,7 @@ EFA2_IsInserted Checks to see if the NAND chip used by the EFA2 is present bool return OUT: true if the correct NAND chip is found -----------------------------------------------------------------*/ -bool EFA2_IsInserted (void) +bool EFA2_IsInserted (void) { EFA2_ClearStatus(); return (efa2_nand_id() == EFA2_NAND_ID); @@ -544,7 +544,7 @@ bool EFA2_ReadSectors (u32 sector, u8 numSecs, void* buffer) efa2_nand_reset(); // set NAND to READ1 operation mode and transfer page address - REG_EFA2_NAND_CMD = 0x00; // write READ1 command + REG_EFA2_NAND_CMD = 0x00; // write READ1 command REG_EFA2_NAND_WR = 0x00; // write address [7:0] REG_EFA2_NAND_WR = (page ) & 0xff; // write address [15:8] REG_EFA2_NAND_WR = (page >> 8 ) & 0xff; // write address[23:16] @@ -601,7 +601,7 @@ bool EFA2_WriteSectors (u32 sector, u8 numSecs, void* buffer) EFA2_Shutdown unload the EFA2 interface -----------------------------------------------------------------*/ -bool EFA2_Shutdown(void) +bool EFA2_Shutdown(void) { return EFA2_ClearStatus(); } diff --git a/backends/platform/ds/arm9/source/fat/io_fcsr.c b/backends/platform/ds/arm9/source/fat/io_fcsr.c index 7a67a6b1b0..d576dfbb0f 100644 --- a/backends/platform/ds/arm9/source/fat/io_fcsr.c +++ b/backends/platform/ds/arm9/source/fat/io_fcsr.c @@ -4,7 +4,7 @@ compact_flash.c By chishm (Michael Chisholm) - Hardware Routines for using a GBA Flash Cart and SRAM as a + Hardware Routines for using a GBA Flash Cart and SRAM as a block device. This software is completely free. No warranty is provided. @@ -57,7 +57,7 @@ FCSR_IsInserted Is a GBA Flash Cart with a valid file system inserted? bool return OUT: true if a GBA FC card is inserted -----------------------------------------------------------------*/ -bool FCSR_IsInserted (void) +bool FCSR_IsInserted (void) { bool flagFoundFileSys = false; @@ -85,7 +85,7 @@ FCSR_ClearStatus Finish any pending operations bool return OUT: always true for GBA FC -----------------------------------------------------------------*/ -bool FCSR_ClearStatus (void) +bool FCSR_ClearStatus (void) { return true; } @@ -101,7 +101,7 @@ void* buffer OUT: pointer to 512 byte buffer to store data in bool return OUT: true if successful -----------------------------------------------------------------*/ bool FCSR_ReadSectors (u32 sector, u8 numSecs, void* buffer) -{ +{ int i; bool flagSramSector = false; int numSectors = (numSecs > 0 ? numSecs : 256); @@ -208,14 +208,14 @@ bool FCSR_WriteSectors (u32 sector, u8 numSecs, void* buffer) FCSR_Shutdown unload the Flash Cart interface -----------------------------------------------------------------*/ -bool FCSR_Shutdown(void) +bool FCSR_Shutdown(void) { int i; if (FCSR_ClearStatus() == false) return false; FCSR_FileSysPointer = 0; - + for (i=0; i < 4; i++) { FCSR_SramSectorPointer[i] = 0; @@ -262,11 +262,11 @@ bool FCSR_StartUp(void) // Get SRAM sector regions from header block for (i = 0; i < 4; i++) { - FCSR_SramSectorStart[i] = fileSysPointer[i+4]; + FCSR_SramSectorStart[i] = fileSysPointer[i+4]; SramRegionSize[i] = fileSysPointer[i+8]; FCSR_SramSectorEnd[i] = FCSR_SramSectorStart[i] + SramRegionSize[i]; } - + // Calculate SRAM region pointers FCSR_SramSectorPointer[0] = (u8*)(SRAM_START + 4); for (i = 1; i < 4; i++) diff --git a/backends/platform/ds/arm9/source/fat/io_fcsr.h b/backends/platform/ds/arm9/source/fat/io_fcsr.h index ef390a8ad6..2f87c1c8aa 100644 --- a/backends/platform/ds/arm9/source/fat/io_fcsr.h +++ b/backends/platform/ds/arm9/source/fat/io_fcsr.h @@ -1,5 +1,5 @@ /* - io_fcsr.h + io_fcsr.h Hardware Routines for using a GBA Flash Cart with SRAM @@ -23,7 +23,7 @@ extern LPIO_INTERFACE FCSR_GetInterface(void) ; #endif // define IO_FCSR_H /* - io_fcsr.h + io_fcsr.h Hardware Routines for using a GBA Flash Cart with SRAM diff --git a/backends/platform/ds/arm9/source/fat/io_m3_common.c b/backends/platform/ds/arm9/source/fat/io_m3_common.c index 9c8280c808..ab2c143327 100644 --- a/backends/platform/ds/arm9/source/fat/io_m3_common.c +++ b/backends/platform/ds/arm9/source/fat/io_m3_common.c @@ -1,13 +1,13 @@ /* - io_m3_common.c + io_m3_common.c Routines common to all version of the M3 - + Some code based on M3 SD drivers supplied by M3Adapter. Some code written by SaTa may have been unknowingly used. Copyright (c) 2006 Michael "Chishm" Chisholm - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -47,7 +47,7 @@ void _M3_changeMode (u32 mode) { _M3_readHalfword (0x08000000 + (mode << 1)); _M3_readHalfword (0x0800080e); _M3_readHalfword (0x08000000); - + if ((mode & 0x0f) != 4) { _M3_readHalfword (0x09000000); } else { @@ -56,5 +56,5 @@ void _M3_changeMode (u32 mode) { _M3_readHalfword (0x08000188); _M3_readHalfword (0x08000188); } -} +} diff --git a/backends/platform/ds/arm9/source/fat/io_m3_common.h b/backends/platform/ds/arm9/source/fat/io_m3_common.h index 6d0c669783..92e6bed980 100644 --- a/backends/platform/ds/arm9/source/fat/io_m3_common.h +++ b/backends/platform/ds/arm9/source/fat/io_m3_common.h @@ -1,5 +1,5 @@ /* - io_m3_common.h + io_m3_common.h Routines common to all version of the M3 @@ -7,7 +7,7 @@ Some code written by SaTa may have been unknowingly used. Copyright (c) 2006 Michael "Chishm" Chisholm - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -40,7 +40,7 @@ // Values for changing mode #define M3_MODE_ROM 0x00400004 -#define M3_MODE_MEDIA 0x00400003 +#define M3_MODE_MEDIA 0x00400003 extern void _M3_changeMode (u32 mode); diff --git a/backends/platform/ds/arm9/source/fat/io_m3cf.c b/backends/platform/ds/arm9/source/fat/io_m3cf.c index 968d83ae33..910f01097e 100644 --- a/backends/platform/ds/arm9/source/fat/io_m3cf.c +++ b/backends/platform/ds/arm9/source/fat/io_m3cf.c @@ -73,7 +73,7 @@ M3CF_IsInserted Is a compact flash card inserted? bool return OUT: true if a CF card is inserted -----------------------------------------------------------------*/ -bool M3CF_IsInserted (void) +bool M3CF_IsInserted (void) { // Change register, then check if value did change M3_REG_STS = CF_STS_INSERTED; @@ -86,17 +86,17 @@ M3CF_ClearStatus Tries to make the CF card go back to idle mode bool return OUT: true if a CF card is idle -----------------------------------------------------------------*/ -bool M3CF_ClearStatus (void) +bool M3CF_ClearStatus (void) { int i; - + // Wait until CF card is finished previous commands i=0; while ((M3_REG_CMD & CF_STS_BUSY) && (i < CARD_TIMEOUT)) { i++; } - + // Wait until card is ready for commands i = 0; while ((!(M3_REG_STS & CF_STS_INSERTED)) && (i < CARD_TIMEOUT)) @@ -128,7 +128,7 @@ bool M3CF_ReadSectors (u32 sector, u8 numSecs, void* buffer) u8 *buff_u8 = (u8*)buffer; int temp; #endif - + #if defined _CF_USE_DMA && defined NDS && defined ARM9 DC_FlushRange( buffer, j * BYTE_PER_READ); #endif @@ -139,7 +139,7 @@ bool M3CF_ReadSectors (u32 sector, u8 numSecs, void* buffer) { i++; } - + // Wait until card is ready for commands i = 0; while ((!(M3_REG_STS & CF_STS_INSERTED)) && (i < CARD_TIMEOUT)) @@ -148,20 +148,20 @@ bool M3CF_ReadSectors (u32 sector, u8 numSecs, void* buffer) } if (i >= CARD_TIMEOUT) return false; - + // Set number of sectors to read - M3_REG_SEC = numSecs; - + M3_REG_SEC = numSecs; + // Set read sector M3_REG_LBA1 = sector & 0xFF; // 1st byte of sector number M3_REG_LBA2 = (sector >> 8) & 0xFF; // 2nd byte of sector number M3_REG_LBA3 = (sector >> 16) & 0xFF; // 3rd byte of sector number M3_REG_LBA4 = ((sector >> 24) & 0x0F )| CF_CMD_LBA; // last nibble of sector number - + // Set command to read M3_REG_CMD = CF_CMD_READ; - - + + while (j--) { // Wait until card is ready for reading @@ -172,7 +172,7 @@ bool M3CF_ReadSectors (u32 sector, u8 numSecs, void* buffer) } if (i >= CARD_TIMEOUT) return false; - + // Read data #ifdef _CF_USE_DMA #ifdef NDS @@ -194,12 +194,12 @@ bool M3CF_ReadSectors (u32 sector, u8 numSecs, void* buffer) } } else { while(i--) - *buff++ = *M3_DATA; + *buff++ = *M3_DATA; } #else i=256; while(i--) - *buff++ = *M3_DATA; + *buff++ = *M3_DATA; #endif } #if defined _CF_USE_DMA && defined NDS @@ -230,7 +230,7 @@ bool M3CF_WriteSectors (u32 sector, u8 numSecs, void* buffer) u8 *buff_u8 = (u8*)buffer; int temp; #endif - + #if defined _CF_USE_DMA && defined NDS && defined ARM9 DC_FlushRange( buffer, j * BYTE_PER_READ); #endif @@ -241,7 +241,7 @@ bool M3CF_WriteSectors (u32 sector, u8 numSecs, void* buffer) { i++; } - + // Wait until card is ready for commands i = 0; while ((!(M3_REG_STS & CF_STS_INSERTED)) && (i < CARD_TIMEOUT)) @@ -250,19 +250,19 @@ bool M3CF_WriteSectors (u32 sector, u8 numSecs, void* buffer) } if (i >= CARD_TIMEOUT) return false; - + // Set number of sectors to write - M3_REG_SEC = numSecs; - + M3_REG_SEC = numSecs; + // Set write sector M3_REG_LBA1 = sector & 0xFF; // 1st byte of sector number M3_REG_LBA2 = (sector >> 8) & 0xFF; // 2nd byte of sector number M3_REG_LBA3 = (sector >> 16) & 0xFF; // 3rd byte of sector number M3_REG_LBA4 = ((sector >> 24) & 0x0F )| CF_CMD_LBA; // last nibble of sector number - + // Set command to write M3_REG_CMD = CF_CMD_WRITE; - + while (j--) { // Wait until card is ready for writing @@ -273,7 +273,7 @@ bool M3CF_WriteSectors (u32 sector, u8 numSecs, void* buffer) } if (i >= CARD_TIMEOUT) return false; - + // Write data #ifdef _CF_USE_DMA #ifdef NDS @@ -295,19 +295,19 @@ bool M3CF_WriteSectors (u32 sector, u8 numSecs, void* buffer) } } else { while(i--) - *M3_DATA = *buff++; + *M3_DATA = *buff++; } #else i=256; while(i--) - *M3_DATA = *buff++; + *M3_DATA = *buff++; #endif } #if defined _CF_USE_DMA && defined NDS // Wait for end of transfer before returning while(DMA3_CR & DMA_BUSY); #endif - + return true; } @@ -317,7 +317,7 @@ M3_Unlock Returns true if M3 was unlocked, false if failed Added by MightyMax -----------------------------------------------------------------*/ -bool M3_Unlock(void) +bool M3_Unlock(void) { // run unlock sequence volatile unsigned short tmp ; diff --git a/backends/platform/ds/arm9/source/fat/io_m3cf.h b/backends/platform/ds/arm9/source/fat/io_m3cf.h index 006c283adc..bade53f511 100644 --- a/backends/platform/ds/arm9/source/fat/io_m3cf.h +++ b/backends/platform/ds/arm9/source/fat/io_m3cf.h @@ -1,5 +1,5 @@ /* - io_m3cf.h + io_m3cf.h Hardware Routines for reading a compact flash card using the M3 CF @@ -24,7 +24,7 @@ extern LPIO_INTERFACE M3CF_GetInterface(void) ; #endif // define IO_M3CF_H /* - io_m3cf.h + io_m3cf.h Hardware Routines for reading a compact flash card using the M3 CF diff --git a/backends/platform/ds/arm9/source/fat/io_m3sd.c b/backends/platform/ds/arm9/source/fat/io_m3sd.c index 2bbda37a5a..914b83e06e 100644 --- a/backends/platform/ds/arm9/source/fat/io_m3sd.c +++ b/backends/platform/ds/arm9/source/fat/io_m3sd.c @@ -218,7 +218,7 @@ void M3SD_writesector(u16 * p,u32 sectorn) } } while ((verify > 0) && (tries < 16)); - + free(data); free(check); } // */ @@ -356,7 +356,7 @@ bool M3SD_Shutdown(void) bool M3SD_StartUp(void) { vu16* waitCr = (vu16*)0x4000204; - + *waitCr |= 0x6000; // *(vu16*)0x4000204=0x6000; // Try unlocking 3 times, because occationally it fails to detect the reader. diff --git a/backends/platform/ds/arm9/source/fat/io_m3sd_asm.s b/backends/platform/ds/arm9/source/fat/io_m3sd_asm.s index a6bb8dc187..ffaa971aca 100644 --- a/backends/platform/ds/arm9/source/fat/io_m3sd_asm.s +++ b/backends/platform/ds/arm9/source/fat/io_m3sd_asm.s @@ -54,7 +54,7 @@ sd_write_loop2: sd_write_busy: bl clkin - ldrh r0,[r1] + ldrh r0,[r1] tst r0,#0x100 beq sd_write_busy ldmfd r13!,{r0-r1} @@ -68,10 +68,10 @@ SD_crc16: stmfd r13!,{r4-r9} mov r9,r2 - mov r3,#0 - mov r4,#0 - mov r5,#0 - mov r6,#0 + mov r3,#0 + mov r4,#0 + mov r5,#0 + mov r6,#0 ldr r7,=0x80808080 ldr r8,=0x1021 @@ -86,19 +86,19 @@ sd_crc16_loop: eorne r3,r3,r8 tst r2,r7,lsr #24 eorne r3,r3,r8 - + mov r4,r4,lsl #1 tst r4,#0x10000 eorne r4,r4,r8 tst r2,r7,lsr #25 eorne r4,r4,r8 - + mov r5,r5,lsl #1 tst r5,#0x10000 eorne r5,r5,r8 tst r2,r7,lsr #26 eorne r5,r5,r8 - + mov r6,r6,lsl #1 tst r6,#0x10000 eorne r6,r6,r8 @@ -107,7 +107,7 @@ sd_crc16_loop: mov r7,r7,ror #4 subs r1,r1,#4 - bne sd_crc16_loop + bne sd_crc16_loop mov r2,r9 mov r8,#16 @@ -145,7 +145,7 @@ SD_data_write: mov r2,#SDODA sd_data_write_busy: bl clkin - ldrh r3,[r2] + ldrh r3,[r2] tst r3,#0x100 beq sd_data_write_busy @@ -169,7 +169,7 @@ sd_data_write_loop: bl clkout subs r5, r5, #2 - bne sd_data_write_loop + bne sd_data_write_loop cmp r1,#0 movne r0,r1 @@ -184,10 +184,10 @@ sd_data_write_loop2: bl clkout subs r5, r5, #1 bne sd_data_write_loop2 - + sd_data_write_busy2: bl clkin - ldrh r3,[r2] + ldrh r3,[r2] tst r3,#0x100 beq sd_data_write_busy2 diff --git a/backends/platform/ds/arm9/source/fat/io_mmcf.c b/backends/platform/ds/arm9/source/fat/io_mmcf.c index 5ccb3122e4..3034afe311 100644 --- a/backends/platform/ds/arm9/source/fat/io_mmcf.c +++ b/backends/platform/ds/arm9/source/fat/io_mmcf.c @@ -74,14 +74,14 @@ static bool cf_block_ready(void) do { while (!(CF_RD_STATUS & 0x40)); - } while (CF_RD_STATUS & 0x80); + } while (CF_RD_STATUS & 0x80); */ do { i++; - while ( (!(CF_RD_STATUS & 0x40)) && (i < CARD_TIMEOUT) ) i++; - } while ( (CF_RD_STATUS & 0x80) && (i < CARD_TIMEOUT) ); + while ( (!(CF_RD_STATUS & 0x40)) && (i < CARD_TIMEOUT) ) i++; + } while ( (CF_RD_STATUS & 0x80) && (i < CARD_TIMEOUT) ); if (i >= CARD_TIMEOUT) { return false; @@ -110,7 +110,7 @@ MMCF_IsInserted Is a compact flash card inserted? bool return OUT: true if a CF card is inserted -----------------------------------------------------------------*/ -bool MMCF_IsInserted (void) +bool MMCF_IsInserted (void) { if ( !cf_set_features(0xAA) ) return false; @@ -123,7 +123,7 @@ MMCF_ClearStatus Tries to make the CF card go back to idle mode bool return OUT: true if a CF card is idle -----------------------------------------------------------------*/ -bool MMCF_ClearStatus (void) +bool MMCF_ClearStatus (void) { return true; } @@ -185,7 +185,7 @@ bool MMCF_ReadSectors (u32 sector, u8 numSecs, void* buffer) } } else { while(i--) - *buff++ = *MP_DATA; + *buff++ = *MP_DATA; } #else i=256; @@ -222,15 +222,15 @@ bool MMCF_WriteSectors (u32 sector, u8 numSecs, void* buffer) u8 *buff_u8 = (u8*)buffer; int temp; #endif - + #if defined _CF_USE_DMA && defined NDS && defined ARM9 DC_FlushRange( buffer, j * BYTE_PER_READ); #endif - if (numSecs > 1) + if (numSecs > 1) { int r = 0; - + for (r = 0; r < numSecs; r++) { MMCF_WriteSectors(sector + r, 1, ((unsigned char *) (buffer)) + 512); @@ -270,12 +270,12 @@ bool MMCF_WriteSectors (u32 sector, u8 numSecs, void* buffer) } } else { while(i--) - *MP_DATA = *buff++; + *MP_DATA = *buff++; } #else i=256; while(i--) - *MP_DATA = *buff++; + *MP_DATA = *buff++; #endif } @@ -283,7 +283,7 @@ bool MMCF_WriteSectors (u32 sector, u8 numSecs, void* buffer) #if defined _CF_USE_DMA && defined NDS // Wait for end of transfer before returning while(DMA3_CR & DMA_BUSY); -#endif +#endif //#define _CF_VERIFY @@ -312,7 +312,7 @@ bool MMCF_WriteSectors (u32 sector, u8 numSecs, void* buffer) MMCF_Shutdown unload the GBAMP CF interface -----------------------------------------------------------------*/ -bool MMCF_Shutdown(void) +bool MMCF_Shutdown(void) { return MMCF_ClearStatus() ; } diff --git a/backends/platform/ds/arm9/source/fat/io_mmcf.h b/backends/platform/ds/arm9/source/fat/io_mmcf.h index fa9e6536ee..baa43ac59f 100644 --- a/backends/platform/ds/arm9/source/fat/io_mmcf.h +++ b/backends/platform/ds/arm9/source/fat/io_mmcf.h @@ -1,5 +1,5 @@ /* - io_mmcf.h + io_mmcf.h Hardware Routines for reading a compact flash card using the GBA Movie Player diff --git a/backends/platform/ds/arm9/source/fat/io_mpcf.c b/backends/platform/ds/arm9/source/fat/io_mpcf.c index 6b56e29291..a12b6e8e1e 100644 --- a/backends/platform/ds/arm9/source/fat/io_mpcf.c +++ b/backends/platform/ds/arm9/source/fat/io_mpcf.c @@ -73,7 +73,7 @@ MPCF_IsInserted Is a compact flash card inserted? bool return OUT: true if a CF card is inserted -----------------------------------------------------------------*/ -bool MPCF_IsInserted (void) +bool MPCF_IsInserted (void) { // Change register, then check if value did change MP_REG_STS = CF_STS_INSERTED; @@ -86,17 +86,17 @@ MPCF_ClearStatus Tries to make the CF card go back to idle mode bool return OUT: true if a CF card is idle -----------------------------------------------------------------*/ -bool MPCF_ClearStatus (void) +bool MPCF_ClearStatus (void) { int i; - + // Wait until CF card is finished previous commands i=0; while ((MP_REG_CMD & CF_STS_BUSY) && (i < CARD_TIMEOUT)) { i++; } - + // Wait until card is ready for commands i = 0; while ((!(MP_REG_STS & CF_STS_INSERTED)) && (i < CARD_TIMEOUT)) @@ -139,7 +139,7 @@ bool MPCF_ReadSectors (u32 sector, u8 numSecs, void* buffer) { i++; } - + // Wait until card is ready for commands i = 0; while ((!(MP_REG_STS & CF_STS_INSERTED)) && (i < CARD_TIMEOUT)) @@ -148,20 +148,20 @@ bool MPCF_ReadSectors (u32 sector, u8 numSecs, void* buffer) } if (i >= CARD_TIMEOUT) return false; - + // Set number of sectors to read - MP_REG_SEC = numSecs; - + MP_REG_SEC = numSecs; + // Set read sector MP_REG_LBA1 = sector & 0xFF; // 1st byte of sector number MP_REG_LBA2 = (sector >> 8) & 0xFF; // 2nd byte of sector number MP_REG_LBA3 = (sector >> 16) & 0xFF; // 3rd byte of sector number MP_REG_LBA4 = ((sector >> 24) & 0x0F )| CF_CMD_LBA; // last nibble of sector number - + // Set command to read MP_REG_CMD = CF_CMD_READ; - - + + while (j--) { // Wait until card is ready for reading @@ -172,7 +172,7 @@ bool MPCF_ReadSectors (u32 sector, u8 numSecs, void* buffer) } if (i >= CARD_TIMEOUT) return false; - + // Read data #ifdef _CF_USE_DMA #ifdef NDS @@ -194,12 +194,12 @@ bool MPCF_ReadSectors (u32 sector, u8 numSecs, void* buffer) } } else { while(i--) - *buff++ = *MP_DATA; + *buff++ = *MP_DATA; } #else i=256; while(i--) - *buff++ = *MP_DATA; + *buff++ = *MP_DATA; #endif } #if (defined _CF_USE_DMA) && (defined NDS) @@ -229,7 +229,7 @@ bool MPCF_WriteSectors (u32 sector, u8 numSecs, void* buffer) u8 *buff_u8 = (u8*)buffer; int temp; #endif - + #if defined _CF_USE_DMA && defined NDS && defined ARM9 DC_FlushRange( buffer, j * BYTE_PER_READ); #endif @@ -240,7 +240,7 @@ bool MPCF_WriteSectors (u32 sector, u8 numSecs, void* buffer) { i++; } - + // Wait until card is ready for commands i = 0; while ((!(MP_REG_STS & CF_STS_INSERTED)) && (i < CARD_TIMEOUT)) @@ -249,19 +249,19 @@ bool MPCF_WriteSectors (u32 sector, u8 numSecs, void* buffer) } if (i >= CARD_TIMEOUT) return false; - + // Set number of sectors to write - MP_REG_SEC = numSecs; - + MP_REG_SEC = numSecs; + // Set write sector MP_REG_LBA1 = sector & 0xFF; // 1st byte of sector number MP_REG_LBA2 = (sector >> 8) & 0xFF; // 2nd byte of sector number MP_REG_LBA3 = (sector >> 16) & 0xFF; // 3rd byte of sector number MP_REG_LBA4 = ((sector >> 24) & 0x0F )| CF_CMD_LBA; // last nibble of sector number - + // Set command to write MP_REG_CMD = CF_CMD_WRITE; - + while (j--) { // Wait until card is ready for writing @@ -272,7 +272,7 @@ bool MPCF_WriteSectors (u32 sector, u8 numSecs, void* buffer) } if (i >= CARD_TIMEOUT) return false; - + // Write data #ifdef _CF_USE_DMA #ifdef NDS @@ -294,19 +294,19 @@ bool MPCF_WriteSectors (u32 sector, u8 numSecs, void* buffer) } } else { while(i--) - *MP_DATA = *buff++; + *MP_DATA = *buff++; } #else i=256; while(i--) - *MP_DATA = *buff++; + *MP_DATA = *buff++; #endif } #if defined _CF_USE_DMA && defined NDS // Wait for end of transfer before returning while(DMA3_CR & DMA_BUSY); #endif - + return true; } @@ -314,7 +314,7 @@ bool MPCF_WriteSectors (u32 sector, u8 numSecs, void* buffer) MPCF_Shutdown unload the GBAMP CF interface -----------------------------------------------------------------*/ -bool MPCF_Shutdown(void) +bool MPCF_Shutdown(void) { return MPCF_ClearStatus() ; } diff --git a/backends/platform/ds/arm9/source/fat/io_mpcf.h b/backends/platform/ds/arm9/source/fat/io_mpcf.h index 8ec8859097..58cab41b4c 100644 --- a/backends/platform/ds/arm9/source/fat/io_mpcf.h +++ b/backends/platform/ds/arm9/source/fat/io_mpcf.h @@ -1,5 +1,5 @@ /* - io_mpcf.h + io_mpcf.h Hardware Routines for reading a compact flash card using the GBA Movie Player @@ -24,7 +24,7 @@ extern LPIO_INTERFACE MPCF_GetInterface(void) ; #endif // define IO_MPCF_H /* - io_mpcf.h + io_mpcf.h Hardware Routines for reading a compact flash card using the GBA Movie Player diff --git a/backends/platform/ds/arm9/source/fat/io_njsd.c b/backends/platform/ds/arm9/source/fat/io_njsd.c index d8a0ff69ac..fbb223d560 100644 --- a/backends/platform/ds/arm9/source/fat/io_njsd.c +++ b/backends/platform/ds/arm9/source/fat/io_njsd.c @@ -3,11 +3,11 @@ Hardware Routines for reading an SD card using a NinjaDS SD adapter. - + Original code supplied by NinjaMod - + Copyright (c) 2006 Michael "Chishm" Chisholm - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -28,7 +28,7 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + 2006-08-05 - Chishm * First release */ @@ -84,7 +84,7 @@ static u32 _NJSD_relativeCardAddress = 0; static inline bool _NJSD_waitIRQ(void) { /*#ifdef _NJSD_SYNC int i = IRQ_TIMEOUT; - while (!(REG_IF & 0x100000) && --i); + while (!(REG_IF & 0x100000) && --i); REG_IF = 0x100000; if (i <= 0) { return false; @@ -96,7 +96,7 @@ static inline bool _NJSD_waitIRQ(void) { //if (!(REG_IME & 1)) //{ // irq's disabled... - while (!(REG_IF & 0x100000) && (!(_NJSD_irqFlag)) && --i); + while (!(REG_IF & 0x100000) && (!(_NJSD_irqFlag)) && --i); _NJSD_irqFlag = 0; REG_IF = 0x100000; if (i <= 0) { @@ -106,7 +106,7 @@ static inline bool _NJSD_waitIRQ(void) { } //} else { // irq's enabled - // while (!(_NJSD_irqFlag) && --i); + // while (!(_NJSD_irqFlag) && --i); // _NJSD_irqFlag = 0; // REG_IF = 0x100000; // if (i <= 0) { @@ -118,8 +118,8 @@ static inline bool _NJSD_waitIRQ(void) { //#endif } -static inline void _NJSD_writeCardCommand - (u8 cmd0, u8 cmd1, u8 cmd2, u8 cmd3, u8 cmd4, u8 cmd5, u8 cmd6, u8 cmd7) +static inline void _NJSD_writeCardCommand + (u8 cmd0, u8 cmd1, u8 cmd2, u8 cmd3, u8 cmd4, u8 cmd5, u8 cmd6, u8 cmd7) { CARD_COMMAND[0] = cmd0; CARD_COMMAND[1] = cmd1; @@ -142,7 +142,7 @@ static bool _NJSD_reset (void) { if (i <= 0) { return false; } - + return true; } @@ -179,7 +179,7 @@ static bool _NJSD_sendCMDR (int speed, u8 *rsp_buf, int type, u8 cmd, u32 param) REG_IME = 0; #endif - REG_IE &= ~0x100000; + REG_IE &= ~0x100000; REG_IF = 0x100000; CARD_CR1H = CARD_CR1_ENABLE; @@ -191,7 +191,7 @@ static bool _NJSD_sendCMDR (int speed, u8 *rsp_buf, int type, u8 cmd, u32 param) } else { CARD_COMMAND[0] = 0xF0 | (speed << 2) | 0 | (1 << 1); } - + CARD_COMMAND[1] = (type & 0x40) | ((( type >> 2) & 7) << 3); CARD_COMMAND[2] = 0x40 | cmd; CARD_COMMAND[3] = (param>>24) & 0xFF; @@ -301,7 +301,7 @@ static bool _NJSD_writeSector (u8 *buffer, u8 *crc_buf, u32 offset) { } - REG_IE &= ~0x100000; + REG_IE &= ~0x100000; REG_IF = 0x100000; CARD_CR1H = CARD_CR1_ENABLE; @@ -334,7 +334,7 @@ static bool _NJSD_writeSector (u8 *buffer, u8 *crc_buf, u32 offset) { i++; } } while (CARD_CR2 & CARD_BUSY); - + i = WRITE_TIMEOUT; responseBuffer[3] = 0; do { @@ -352,7 +352,7 @@ static bool _NJSD_writeSector (u8 *buffer, u8 *crc_buf, u32 offset) { #ifdef _NJSD_SYNC REG_IME = old_REG_IME; #endif - + return true; } @@ -365,12 +365,12 @@ static bool _NJSD_sendCLK (int speed, int count) { REG_IME = 0; #endif - REG_IE &= ~0x100000; + REG_IE &= ~0x100000; REG_IF = 0x100000; //CARD_CR1H = CARD_CR1_ENABLE; // | CARD_CR1_IRQ; _NJSD_writeCardCommand (0xE0 | ((speed & 3) << 2), 0, (count - 1), 0, 0, 0, 0, 0); - + CARD_CR2 = _NJSD_cardFlags; i = COMMAND_TIMEOUT; while ((CARD_CR2 & CARD_BUSY) && --i); @@ -404,7 +404,7 @@ static bool _NJSD_sendCMDN (int speed, u8 cmd, u32 param) { REG_IME = 0; #endif - REG_IE &= ~0x100000; + REG_IE &= ~0x100000; REG_IF = 0x100000; CARD_CR1H = CARD_CR1_ENABLE; // | CARD_CR1_IRQ; @@ -438,22 +438,22 @@ static bool _NJSD_sendCMDN (int speed, u8 cmd, u32 param) { static bool _NJSD_cardInit (void) { u8 responseBuffer[17]; int i; - + // If the commands succeed the first time, assume they'll always succeed if (! _NJSD_sendCLK (SD_CLK_200KHz, 256) ) return false; if (! _NJSD_sendCMDN (SD_CLK_200KHz, GO_IDLE_STATE, 0) ) return false; _NJSD_sendCLK (SD_CLK_200KHz, 8); - + _NJSD_sendCLK (SD_CLK_200KHz, 256); - _NJSD_sendCMDN (SD_CLK_200KHz, GO_IDLE_STATE, 0); + _NJSD_sendCMDN (SD_CLK_200KHz, GO_IDLE_STATE, 0); _NJSD_sendCLK (SD_CLK_200KHz, 8); - + for (i = 0; i < MAX_STARTUP_TRIES ; i++) { _NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, APP_CMD, 0); - if ( + if ( _NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, SD_APP_OP_COND, SD_OCR_VALUE) && ((responseBuffer[1] & 0x80) != 0)) - { + { // Card is ready to receive commands now break; } @@ -461,10 +461,10 @@ static bool _NJSD_cardInit (void) { if (i >= MAX_STARTUP_TRIES) { return false; } - + // The card's name, as assigned by the manufacturer _NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_136, ALL_SEND_CID, 0); - + // Get a new address for (i = 0; i < MAX_STARTUP_TRIES ; i++) { _NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, SEND_RELATIVE_ADDR, 0); @@ -473,23 +473,23 @@ static bool _NJSD_cardInit (void) { break; } } - if (i >= MAX_STARTUP_TRIES) { + if (i >= MAX_STARTUP_TRIES) { return false; } // Some cards won't go to higher speeds unless they think you checked their capabilities _NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_136, SEND_CSD, _NJSD_relativeCardAddress); - + // Only this card should respond to all future commands _NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, SELECT_CARD, _NJSD_relativeCardAddress); - + // Set a 4 bit data bus _NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, APP_CMD, _NJSD_relativeCardAddress); _NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, SET_BUS_WIDTH, 2); // 4-bit mode. // Use 512 byte blocks _NJSD_sendCMDR (SD_CLK_200KHz, responseBuffer, SD_RSP_48, SET_BLOCKLEN, 512); // 512 byte blocks - + return true; } @@ -521,17 +521,17 @@ bool _NJSD_startup(void) { return false; } return true; -} +} bool _NJSD_writeSectors (u32 sector, u32 numSectors, const void* buffer) { - u8 crc[8]; + u8 crc[8]; u32 offset = sector * BYTES_PER_READ; u8* data = (u8*) buffer; while (numSectors--) { _SD_CRC16 ( data, BYTES_PER_READ, crc); - + if (! _NJSD_writeSector (data, crc, offset)) { return false; } @@ -549,7 +549,7 @@ bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) { #ifdef _NJSD_SYNC u32 old_REG_IME; #endif - + u8* tbuf = (u8*)buffer; if (numSectors == 0) { @@ -573,7 +573,7 @@ bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) { if (!_NJSD_waitIRQ ()) { #ifdef _NJSD_SYNC REG_IME = old_REG_IME; -#endif +#endif return false; } } @@ -586,10 +586,10 @@ bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) { if (!_NJSD_waitIRQ ()) { #ifdef _NJSD_SYNC REG_IME = old_REG_IME; -#endif +#endif return false; } - + if (((int)buffer & 0x03) != 0){ cardPolledTransfer (0xA1406000, tmp, BYTES_PER_READ, (u8*)_NJSD_read_cmd); memcpy (tbuf + (numSectors - 1) * BYTES_PER_READ, tmp, BYTES_PER_READ); @@ -618,7 +618,7 @@ bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) { #ifdef _NJSD_SYNC u32 old_REG_IME; #endif - + u8* tbuf = (u8*)buffer; if (numSectors == 0) { @@ -637,7 +637,7 @@ bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) { if (!_NJSD_waitIRQ ()) { #ifdef _NJSD_SYNC REG_IME = old_REG_IME; -#endif +#endif return false; } } @@ -645,10 +645,10 @@ bool _NJSD_readSectors (u32 sector, u32 numSectors, void* buffer) { if (!_NJSD_waitIRQ ()) { #ifdef _NJSD_SYNC REG_IME = old_REG_IME; -#endif +#endif return false; } - + cardPolledTransfer (0xA1406000, (u32*)(tbuf + (numSectors - 1) * BYTES_PER_READ), BYTES_PER_READ, (u8*)_NJSD_read_cmd); } else { _NJSD_sendCMDR (_NJSD_speed, NULL, SD_RSP_STREAM, READ_SINGLE_BLOCK, sector * BYTES_PER_READ); @@ -678,4 +678,4 @@ LPIO_INTERFACE NJSD_GetInterface(void) { } ; #endif // defined NDS -#endif +#endif \ No newline at end of file diff --git a/backends/platform/ds/arm9/source/fat/io_njsd.h b/backends/platform/ds/arm9/source/fat/io_njsd.h index dce469cad6..a297cda112 100644 --- a/backends/platform/ds/arm9/source/fat/io_njsd.h +++ b/backends/platform/ds/arm9/source/fat/io_njsd.h @@ -1,11 +1,11 @@ /* - io_njsd.h + io_njsd.h Hardware Routines for reading an SD card using a NinjaDS SD adapter. Copyright (c) 2006 Michael "Chishm" Chisholm - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/backends/platform/ds/arm9/source/fat/io_nmmc.c b/backends/platform/ds/arm9/source/fat/io_nmmc.c index e9331ae58e..a29c26e43a 100644 --- a/backends/platform/ds/arm9/source/fat/io_nmmc.c +++ b/backends/platform/ds/arm9/source/fat/io_nmmc.c @@ -13,10 +13,10 @@ project at chishm@hotmail.com See gba_nds_fat.txt for help and license details. - + 2006-02-09 - www.neoflash.com: * First stable release - + 2006-02-13 - Chishm * Added ReadMK2Config function * Added read config test to init function so no unnecessary card commands are sent @@ -73,7 +73,7 @@ static inline void Neo_MK2GameMode() { static inline void Neo_EnableEEPROM( bool enable ) { Neo_OpenSPI(spi_freq); if(enable) Neo_SPI(0x06); - else Neo_SPI(0x0E); + else Neo_SPI(0x0E); Neo_CloseSPI(); } @@ -87,7 +87,7 @@ void Neo_WriteMK2Config(u8 config) { Neo_EnableEEPROM(false); } -u8 Neo_ReadMK2Config(void) +u8 Neo_ReadMK2Config(void) { u8 config; Neo_EnableEEPROM(true); @@ -104,7 +104,7 @@ u8 Neo_ReadMK2Config(void) u8 selectMMC_command [8] = {0xFF, 0x00, 0x6A, 0xDF, 0x37, 0x59, 0x33, 0xA3}; -void Neo_SelectMMC (u8 dataByte) +void Neo_SelectMMC (u8 dataByte) { selectMMC_command[1] = dataByte; // Set enable / disable byte cardWriteCommand (selectMMC_command); // Send "5. Use the EEPROM CS to access the MK2 MMC/SD card" @@ -154,12 +154,12 @@ bool Neo_CheckMMCResponse( u8 response, u8 mask ) { bool Neo_InitMMC() { Neo_MK2GameMode(); Neo_WriteMK2Config( MK2_CONFIG_ZIP_RAM_CLOSE | MK2_CONFIG_GAME_FLASH_CLOSE); - + // Make sure the configuration was accepted if (Neo_ReadMK2Config() != (MK2_CONFIG_ZIP_RAM_CLOSE | MK2_CONFIG_GAME_FLASH_CLOSE)) { return false; // If not, then it wasn't initialised properly } - + return true; } @@ -167,7 +167,7 @@ bool Neo_InitMMC() { bool NMMC_IsInserted(void) { int i; - + Neo_EnableMMC( true ); // Open SPI port to MMC card Neo_SendMMCCommand(MMC_SEND_CSD, 0); if( Neo_CheckMMCResponse( 0x00, 0xFF ) == false ) { // Make sure no errors occured @@ -183,13 +183,13 @@ bool NMMC_IsInserted(void) { for (i = 0; i < 28; i++) { Neo_SPI(0xff); } - + return true; } bool NMMC_ClearStatus (void) { u32 i; - + Neo_EnableMMC( true ); // Open SPI port to MMC card for (i = 0; i < 10; i++) { Neo_SPI(0xFF); // Send 10 0xFF bytes to MMC card @@ -224,14 +224,14 @@ bool NMMC_StartUp(void) { return false; } Neo_EnableMMC( true ); // Open SPI port to MMC card - + // Set block length Neo_SendMMCCommand(MMC_SET_BLOCKLEN, BYTE_PER_READ ); if( Neo_CheckMMCResponse( 0x00, 0xFF ) == false ) { // Make sure no errors occured Neo_EnableMMC( false ); return false; } - + // Check if we can use a higher SPI frequency Neo_SendMMCCommand(MMC_SEND_CSD, 0); if( Neo_CheckMMCResponse( 0x00, 0xFF ) == false ) { // Make sure no errors occured @@ -252,77 +252,77 @@ bool NMMC_StartUp(void) { if ((transSpeed & 0xf0) >= 0x30) { spi_freq = 0; } - + Neo_EnableMMC( false ); return true; -} +} -bool NMMC_WriteSectors (u32 sector, u8 numSecs, void* buffer) +bool NMMC_WriteSectors (u32 sector, u8 numSecs, void* buffer) { u32 i; u8 *p=buffer; - + int totalSecs = (numSecs == 0) ? 256 : numSecs; sector *= BYTE_PER_READ; - + Neo_EnableMMC( true ); // Open SPI port to MMC card Neo_SendMMCCommand( 25, sector ); if( Neo_CheckMMCResponse( 0x00, 0xFF ) == false ) { // Make sure no errors occured Neo_EnableMMC( false ); return false; } - + while (totalSecs--) { Neo_SPI( 0xFC ); // Send Start Block token for( i = 0; i < BYTE_PER_READ; i++ ) // Send a block of data Neo_SPI( *p++ ); Neo_SPI( 0xFF ); // Send fake CRC16 Neo_SPI( 0xFF ); // Send fake CRC16 - + if( ( Neo_SPI( 0xFF ) & 0x0F ) != 0x05 ) { // Make sure the block was accepted Neo_EnableMMC( false ); return false; } while( Neo_SPI( 0xFF ) == 0x00 ); // Wait for the block to be written } - + // Stop transmission block Neo_SPI( 0xFD ); // Send Stop Transmission Block token for( i = 0; i < BYTE_PER_READ; i++ ) // Send a block of fake data Neo_SPI( 0xFF ); Neo_SPI( 0xFF ); // Send fake CRC16 Neo_SPI( 0xFF ); // Send fake CRC16 - - Neo_SPI (0xFF); // Send 8 clocks + + Neo_SPI (0xFF); // Send 8 clocks while( Neo_SPI( 0xFF ) == 0x00 ); // Wait for the busy signal to clear - - for ( i = 0; i < 0x10; i++) { + + for ( i = 0; i < 0x10; i++) { Neo_SPI (0xFF); // Send clocks for the MMC card to finish what it's doing } - + Neo_EnableMMC( false ); // Close SPI port to MMC card return true; } -bool NMMC_ReadSectors (u32 sector, u8 numSecs, void* buffer) +bool NMMC_ReadSectors (u32 sector, u8 numSecs, void* buffer) { u32 i; u8 *p=buffer; - + int totalSecs = (numSecs == 0) ? 256 : numSecs; sector *= BYTE_PER_READ; - + Neo_EnableMMC( true ); // Open SPI port to MMC card - + while (totalSecs--) { Neo_SendMMCCommand(MMC_READ_BLOCK, sector ); if( Neo_CheckMMCResponse( 0x00, 0xFF ) == false ) { // Make sure no errors occured Neo_EnableMMC( false ); return false; } - + if( Neo_CheckMMCResponse( 0xFE, 0xFF ) == false ) { // Check for Start Block token Neo_EnableMMC( false ); return false; @@ -333,7 +333,7 @@ bool NMMC_ReadSectors (u32 sector, u8 numSecs, void* buffer) Neo_SPI( 0xFF ); // Ignore CRC16 sector += BYTE_PER_READ; } - + Neo_EnableMMC( false ); // Close SPI port to MMC card return true; } diff --git a/backends/platform/ds/arm9/source/fat/io_nmmc.h b/backends/platform/ds/arm9/source/fat/io_nmmc.h index 0249e3a864..5244d21868 100644 --- a/backends/platform/ds/arm9/source/fat/io_nmmc.h +++ b/backends/platform/ds/arm9/source/fat/io_nmmc.h @@ -1,5 +1,5 @@ /* - io_NMMC.h + io_NMMC.h Hardware Routines for reading an SD or MMC card using a Neoflash MK2 or MK3. @@ -26,7 +26,7 @@ extern LPIO_INTERFACE NMMC_GetInterface(void) ; #endif // define IO_NMMC_H /* - io_NMMC.h + io_NMMC.h Hardware Routines for reading an SD or MMC card using a Neoflash MK2 or MK3. diff --git a/backends/platform/ds/arm9/source/fat/io_sccf.c b/backends/platform/ds/arm9/source/fat/io_sccf.c index bda628fdaa..0c77f4673c 100644 --- a/backends/platform/ds/arm9/source/fat/io_sccf.c +++ b/backends/platform/ds/arm9/source/fat/io_sccf.c @@ -57,7 +57,7 @@ bool SCCF_Unlock(void) temp = (~temp & 0xFF); return (CF_REG_LBA1 == temp); #undef CF_REG_LBA1 -} +} bool SCCF_Shutdown(void) { return MPCF_ClearStatus() ; diff --git a/backends/platform/ds/arm9/source/fat/io_sccf.h b/backends/platform/ds/arm9/source/fat/io_sccf.h index 2270c4eab1..961909fbce 100644 --- a/backends/platform/ds/arm9/source/fat/io_sccf.h +++ b/backends/platform/ds/arm9/source/fat/io_sccf.h @@ -1,5 +1,5 @@ /* - io_sccf.h + io_sccf.h Hardware Routines for reading a compact flash card using the Supercard CF @@ -24,7 +24,7 @@ extern LPIO_INTERFACE SCCF_GetInterface(void) ; #endif // define IO_SCCF_H /* - io_sccf.h + io_sccf.h Hardware Routines for reading a compact flash card using the Supercard CF diff --git a/backends/platform/ds/arm9/source/fat/io_scsd.c b/backends/platform/ds/arm9/source/fat/io_scsd.c index 270691436d..9359fefb6d 100644 --- a/backends/platform/ds/arm9/source/fat/io_scsd.c +++ b/backends/platform/ds/arm9/source/fat/io_scsd.c @@ -1,8 +1,8 @@ /* io_scsd.c by SaTa. based on io_sccf.c - - + + */ /* @@ -43,7 +43,7 @@ extern void InitSCMode(void); // CF extern void ReadSector(u16 *buff,u32 sector,u8 ReadNumber); extern void WriteSector(u16 *buff,u32 sector,u8 writeNumber); extern bool MemoryCard_IsInserted(void); // CF‚ƈႤ -// +// /*----------------------------------------------------------------- SCSD_Unlock @@ -55,7 +55,7 @@ bool SCSD_Unlock(void) { InitSCMode(); return MemoryCard_IsInserted(); -} +} bool SCSD_Shutdown(void) { return MPCF_ClearStatus() ; @@ -103,4 +103,4 @@ LPIO_INTERFACE SCSD_GetInterface(void) { return &io_scsd ; } ; -#endif +#endif \ No newline at end of file diff --git a/backends/platform/ds/arm9/source/fat/io_scsd.h b/backends/platform/ds/arm9/source/fat/io_scsd.h index 492492f619..75115b8d62 100644 --- a/backends/platform/ds/arm9/source/fat/io_scsd.h +++ b/backends/platform/ds/arm9/source/fat/io_scsd.h @@ -1,12 +1,12 @@ /* io_scsd.h by SaTa. based on io_sccf.h - - + + */ /* - io_sccf.h + io_sccf.h Hardware Routines for reading a compact flash card using the GBA Movie Player @@ -26,4 +26,4 @@ // export interface extern LPIO_INTERFACE SCSD_GetInterface(void) ; -#endif // define IO_SCSD_H +#endif // define IO_SCSD_H \ No newline at end of file diff --git a/backends/platform/ds/arm9/source/fat/io_scsd_asm.s b/backends/platform/ds/arm9/source/fat/io_scsd_asm.s index 390d36afeb..498cbb96c2 100644 --- a/backends/platform/ds/arm9/source/fat/io_scsd_asm.s +++ b/backends/platform/ds/arm9/source/fat/io_scsd_asm.s @@ -1,22 +1,22 @@ .TEXT @--------------------------------sd data-------------------------------- .equ sd_comadd,0x9800000 -.equ sd_dataadd,0x9000000 +.equ sd_dataadd,0x9000000 .equ sd_dataradd,0x9100000 @-----------------viod sd_data_write_s(u16 *buff,u16* crc16buff)------------------- .ALIGN - .GLOBAL sd_data_write_s + .GLOBAL sd_data_write_s .CODE 32 sd_data_write_s: stmfd r13!,{r4-r5} mov r5,#512 mov r2,#sd_dataadd sd_data_write_busy: - ldrh r3,[r2] + ldrh r3,[r2] tst r3,#0x100 beq sd_data_write_busy - ldrh r3,[r2] + ldrh r3,[r2] mov r3,#0 @star bit strh r3,[r2] @@ -24,10 +24,10 @@ sd_data_write_loop: ldrh r3,[r0],#2 add r3,r3,r3,lsl #20 mov r4,r3,lsl #8 - stmia r2,{r3-r4} - - subs r5, r5, #2 - bne sd_data_write_loop + stmia r2,{r3-r4} + + subs r5, r5, #2 + bne sd_data_write_loop cmp r1,#0 movne r0,r1 @@ -38,11 +38,11 @@ sd_data_write_loop: mov r3,#0xff @end bit strh r3,[r2] sd_data_write_loop2: - ldrh r3,[r2] + ldrh r3,[r2] tst r3,#0x100 bne sd_data_write_loop2 - ldmia r2,{r3-r4} + ldmia r2,{r3-r4} ldmfd r13!,{r4-r5} bx r14 @@ -50,7 +50,7 @@ sd_data_write_loop2: @----------void sd_data_read_s(u16 *buff)------------- .ALIGN - .GLOBAL sd_data_read_s + .GLOBAL sd_data_read_s .CODE 32 sd_data_read_s: stmfd r13!,{r4} @@ -61,62 +61,62 @@ sd_data_read_loop1: bne sd_data_read_loop1 mov r2,#512 sd_data_read_loop: - ldmia r1,{r3-r4} + ldmia r1,{r3-r4} mov r3,r4,lsr #16 strh r3 ,[r0],#2 - ldmia r1,{r3-r4} + ldmia r1,{r3-r4} mov r3,r4,lsr #16 strh r3 ,[r0],#2 - ldmia r1,{r3-r4} + ldmia r1,{r3-r4} mov r3,r4,lsr #16 strh r3 ,[r0],#2 - ldmia r1,{r3-r4} + ldmia r1,{r3-r4} mov r3,r4,lsr #16 strh r3 ,[r0],#2 - ldmia r1,{r3-r4} + ldmia r1,{r3-r4} mov r3,r4,lsr #16 strh r3 ,[r0],#2 - ldmia r1,{r3-r4} + ldmia r1,{r3-r4} mov r3,r4,lsr #16 strh r3 ,[r0],#2 - ldmia r1,{r3-r4} + ldmia r1,{r3-r4} mov r3,r4,lsr #16 strh r3 ,[r0],#2 - ldmia r1,{r3-r4} + ldmia r1,{r3-r4} mov r3,r4,lsr #16 strh r3 ,[r0],#2 - subs r2, r2, #16 - bne sd_data_read_loop + subs r2, r2, #16 + bne sd_data_read_loop ldmia r1,{r3-r4} @crc 16 - ldmia r1,{r3-r4} - ldmia r1,{r3-r4} - ldmia r1,{r3-r4} + ldmia r1,{r3-r4} + ldmia r1,{r3-r4} + ldmia r1,{r3-r4} ldrh r3,[r1] @end bit - ldmfd r13!,{r4} + ldmfd r13!,{r4} bx r14 @----------end sd_data_read_s------------- @------void sd_com_crc16_s(u16* buff,u16 num,u16* crc16buff) .ALIGN - .GLOBAL sd_crc16_s + .GLOBAL sd_crc16_s .CODE 32 sd_crc16_s: stmfd r13!,{r4-r9} mov r9,r2 - mov r3,#0 - mov r4,#0 - mov r5,#0 - mov r6,#0 + mov r3,#0 + mov r4,#0 + mov r5,#0 + mov r6,#0 ldr r7,=0x80808080 ldr r8,=0x1021 @@ -131,19 +131,19 @@ sd_crc16_loop: eorne r3,r3,r8 tst r2,r7,lsr #24 eorne r3,r3,r8 - + mov r4,r4,lsl #1 tst r4,#0x10000 eorne r4,r4,r8 tst r2,r7,lsr #25 eorne r4,r4,r8 - + mov r5,r5,lsl #1 tst r5,#0x10000 eorne r5,r5,r8 tst r2,r7,lsr #26 eorne r5,r5,r8 - + mov r6,r6,lsl #1 tst r6,#0x10000 eorne r6,r6,r8 @@ -152,7 +152,7 @@ sd_crc16_loop: mov r7,r7,ror #4 subs r1,r1,#4 - bne sd_crc16_loop + bne sd_crc16_loop mov r2,r9 mov r8,#16 @@ -184,7 +184,7 @@ sd_crc16_write_data: @--------------u8 sd_crc7_s(u16* buff,u16 num)---------------------------- .ALIGN - .GLOBAL sd_crc7_s + .GLOBAL sd_crc7_s .CODE 32 sd_crc7_s: stmfd r13!,{r4} @@ -206,7 +206,7 @@ sd_crc7_loop: mov r4,r4,ror #1 subs r1,r1,#1 - bne sd_crc7_loop + bne sd_crc7_loop mov r3,r3,lsl #1 add r0,r3,#1 @@ -216,7 +216,7 @@ sd_crc7_loop: @--------------sd_com_read_s(u16* buff,u32 num)------------------ .ALIGN - .GLOBAL sd_com_read_s + .GLOBAL sd_com_read_s .CODE 32 sd_com_read_s: @@ -229,8 +229,8 @@ sd_com_read_loop1: sd_com_read_loop: ldmia r2,{r3-r6} - subs r1, r1, #1 - bne sd_com_read_loop + subs r1, r1, #1 + bne sd_com_read_loop ldmfd r13!,{r4-r6} bx r14 @--------------end sd_com_read_s------------------ @@ -242,14 +242,14 @@ sd_com_read_loop: .CODE 32 sd_com_write_s: stmfd r13!,{r4-r6} - + mov r2,#sd_comadd sd_com_write_busy: - ldrh r3,[r2] + ldrh r3,[r2] tst r3,#0x1 beq sd_com_write_busy - ldrh r3,[r2] + ldrh r3,[r2] sd_com_write_loop: ldrb r3,[r0],#1 @@ -257,9 +257,9 @@ sd_com_write_loop: mov r4,r3,lsl #2 mov r5,r4,lsl #2 mov r6,r5,lsl #2 - stmia r2,{r3-r6} - subs r1, r1, #1 - bne sd_com_write_loop + stmia r2,{r3-r6} + subs r1, r1, #1 + bne sd_com_write_loop ldmfd r13!,{r4-r6} bx r14 @@ -267,7 +267,7 @@ sd_com_write_loop: @-----------------void send_clk(u32 num)--------- .ALIGN - .GLOBAL send_clk + .GLOBAL send_clk .CODE 32 send_clk: @@ -281,7 +281,7 @@ send_clk_loop1: @---------------------------void SDCommand(u8 command,u8 num,u32 sector)-------------------- .ALIGN - .GLOBAL SDCommand + .GLOBAL SDCommand .CODE 32 @void SDCommand(u8 command,u8 num,u32 sector ) @{ @@ -338,12 +338,12 @@ SDCommand: @ register u16 i,j; @ i=readnum; @ sectno<<=9; -@ SDCommand(18,0,sector); +@ SDCommand(18,0,sector); @ for (j=0;j> 24)) a ^= crcConst; - + b = b << 1; if (b & 0x10000) b ^= crcConst; if (dataByte & (bitPattern >> 25)) b ^= crcConst; - + c = c << 1; if (c & 0x10000) c ^= crcConst; if (dataByte & (bitPattern >> 26)) c ^= crcConst; - + d = d << 1; if (d & 0x10000) d ^= crcConst; if (dataByte & (bitPattern >> 27)) d ^= crcConst; - + bitPattern = (bitPattern >> 4) | (bitPattern << 28); } while (buffLength-=4); - + count = 16; // r8 - + do { bitPattern = bitPattern << 4; if (a & 0x8000) bitPattern |= 8; if (b & 0x8000) bitPattern |= 4; if (c & 0x8000) bitPattern |= 2; if (d & 0x8000) bitPattern |= 1; - + a = a << 1; b = b << 1; c = c << 1; d = d << 1; - + count--; - + if (!(count & 0x01)) { *crc16buff++ = (u8)(bitPattern & 0xff); } } while (count != 0); - + return; } @@ -136,20 +136,20 @@ cmd_17byte_response: a pointer to a function that sends the SD card a command an use4bitBus: initialise card to use a 4 bit data bus when communicating with the card RCA: a pointer to the location to store the card's Relative Card Address, preshifted up by 16 bits. */ -bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response, +bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response, _SD_FN_CMD_17BYTE_RESPONSE cmd_17byte_response, bool use4bitBus, u32 *RCA) { u8 responseBuffer[17] = {0}; int i; - + for (i = 0; i < MAX_STARTUP_TRIES ; i++) { cmd_6byte_response (responseBuffer, APP_CMD, 0); - if ( + if ( cmd_6byte_response (responseBuffer, SD_APP_OP_COND, SD_OCR_VALUE) && ((responseBuffer[1] & 0x80) != 0)) - { + { // Card is ready to receive commands now break; } @@ -157,10 +157,10 @@ bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response, if (i >= MAX_STARTUP_TRIES) { return false; } - + // The card's name, as assigned by the manufacturer cmd_17byte_response (responseBuffer, ALL_SEND_CID, 0); - + // Get a new address for (i = 0; i < MAX_STARTUP_TRIES ; i++) { cmd_6byte_response (responseBuffer, SEND_RELATIVE_ADDR, 0); @@ -169,16 +169,16 @@ bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response, break; } } - if (i >= MAX_STARTUP_TRIES) { + if (i >= MAX_STARTUP_TRIES) { return false; } // Some cards won't go to higher speeds unless they think you checked their capabilities cmd_17byte_response (responseBuffer, SEND_CSD, *RCA); - + // Only this card should respond to all future commands cmd_6byte_response (responseBuffer, SELECT_CARD, *RCA); - + if (use4bitBus) { // Set a 4 bit data bus cmd_6byte_response (responseBuffer, APP_CMD, *RCA); @@ -187,7 +187,7 @@ bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response, // Use 512 byte blocks cmd_6byte_response (responseBuffer, SET_BLOCKLEN, 512); // 512 byte blocks - + // Wait until card is ready for data i = 0; do { @@ -196,7 +196,7 @@ bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response, } i++; } while (!cmd_6byte_response (responseBuffer, SEND_STATUS, *RCA) && ((responseBuffer[3] & 0x1f) != ((SD_STATE_TRAN << 1) | READY_FOR_DATA))); - + return true; } diff --git a/backends/platform/ds/arm9/source/fat/io_sd_common.h b/backends/platform/ds/arm9/source/fat/io_sd_common.h index 8962d88890..09abffab39 100644 --- a/backends/platform/ds/arm9/source/fat/io_sd_common.h +++ b/backends/platform/ds/arm9/source/fat/io_sd_common.h @@ -8,7 +8,7 @@ SD routines partially based on sd.s by Romman Copyright (c) 2006 Michael "Chishm" Chisholm - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -32,7 +32,7 @@ 2006-07-11 - Chishm * Original release - + 2006-07-28 - Chishm * Changed voltage range that the SD card can use */ @@ -76,7 +76,7 @@ #define SD_STATE_IDENT 2 // Identification state, after ALL_SEND_CID #define SD_STATE_STBY 3 // Standby state, when card is deselected #define SD_STATE_TRAN 4 // Transfer state, after card is selected and ready for data transfer -#define SD_STATE_DATA 5 // +#define SD_STATE_DATA 5 // #define SD_STATE_RCV 6 // Receive data state #define SD_STATE_PRG 7 // Programming state #define SD_STATE_DIS 8 // Disconnect state @@ -85,7 +85,7 @@ #define READY_FOR_DATA 1 // bit 8 in card status /* -Calculate the CRC7 of a command and return it preshifted with +Calculate the CRC7 of a command and return it preshifted with an end bit added */ extern u8 _SD_CRC7(u8* data, int size); @@ -106,7 +106,7 @@ cmd_17byte_response: a pointer to a function that sends the SD card a command an use4bitBus: initialise card to use a 4 bit data bus when communicating with the card RCA: a pointer to the location to store the card's Relative Card Address, preshifted up by 16 bits. */ -extern bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response, +extern bool _SD_InitCard (_SD_FN_CMD_6BYTE_RESPONSE cmd_6byte_response, _SD_FN_CMD_17BYTE_RESPONSE cmd_17byte_response, bool use4bitBus, u32 *RCA); diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp index 3ee572f0f7..ca4e617e29 100644 --- a/backends/platform/ds/arm9/source/gbampsave.cpp +++ b/backends/platform/ds/arm9/source/gbampsave.cpp @@ -23,6 +23,7 @@ #include "gbampsave.h" #include "gba_nds_fat.h" #include "ds-fs.h" +#include "config-manager.h" ///////////////////////// // GBAMP Save File @@ -30,7 +31,7 @@ GBAMPSaveFile::GBAMPSaveFile(char* name, bool saveOrLoad) { handle = DS::std_fopen(name, saveOrLoad? "w": "r"); - consolePrintf("%s handle is %d\n", name, handle); +// consolePrintf("%s handle is %d\n", name, handle); // consolePrintf("Created %s\n", name); bufferPos = 0; saveSize = 0; @@ -92,40 +93,40 @@ uint32 GBAMPSaveFile::write(const void *buf, uint32 size) { memcpy(buffer + bufferPos, buf, size); bufferPos += size; - + saveSize += size; /* int pos = 0; - + int rest = SAVE_BUFFER_SIZE - bufferPos; memcpy(buffer + bufferPos, buf, rest); bufferPos = 512; pos += rest; - flushSaveBuffer(); + flushSaveBuffer(); size -= rest; // consolePrintf("First section: %d\n", rest); - + while (size >= 512) { DS::std_fwrite(((char *) (buf)) + pos, 1, 512, handle); size -= 512; pos += 512; // consolePrintf("Full chunk, %d left ", size); } - + bufferPos = 0; memcpy(buffer + bufferPos, ((char *) (buf)) + pos, size); bufferPos += size; // consolePrintf("%d left in buffer ", bufferPos);*/ - + } else { - + memcpy(buffer + bufferPos, buf, size); bufferPos += size; - + saveSize += size; } - + // if ((size > 100) || (size <= 0)) consolePrintf("Write %d bytes\n", size); return size; } @@ -145,40 +146,62 @@ GBAMPSaveFileManager::~GBAMPSaveFileManager() { GBAMPSaveFile* GBAMPSaveFileManager::openSavefile(char const* name, bool saveOrLoad) { char fileSpec[128]; - - strcpy(fileSpec, getSavePath().c_str()); - + + strcpy(fileSpec, getSavePath()); + if (fileSpec[strlen(fileSpec) - 1] == '/') { sprintf(fileSpec, "%s%s", getSavePath(), name); } else { sprintf(fileSpec, "%s/%s", getSavePath(), name); } - + // consolePrintf(fileSpec); GBAMPSaveFile* sf = new GBAMPSaveFile(fileSpec, saveOrLoad); if (sf->isOpen()) { - return sf; + return sf; } else { delete sf; - return NULL; + return NULL; } } -Common::StringList GBAMPSaveFileManager::listSavefiles(const char *pattern) { +// This method copied from an old version of the savefile.cpp, since it's been removed from there and +// placed in default-saves.cpp, where I cannot call it. +const char *GBAMPSaveFileManager::getSavePath() const { + const char *dir = NULL; + + // Try to use game specific savepath from config + dir = ConfMan.get("savepath").c_str(); + + // Work around a bug (#999122) in the original 0.6.1 release of + // ScummVM, which would insert a bad savepath value into config files. + if (0 == strcmp(dir, "None")) { + ConfMan.removeKey("savepath", ConfMan.getActiveDomainName()); + ConfMan.flushToDisk(); + dir = ConfMan.get("savepath").c_str(); + } + + + assert(dir); + + return dir; +} + +Common::StringList GBAMPSaveFileManager::listSavefiles(const char *pattern) { enum { TYPE_NO_MORE = 0, TYPE_FILE = 1, TYPE_DIR = 2 }; char name[256]; - - DS::std_cwd((char*)getSavePath().c_str()); //TODO : Check this suspicious const-cast + + DS::std_cwd((char*)getSavePath()); //TODO : Check this suspicious const-cast // consolePrintf("Save path: '%s', pattern: '%s'\n", getSavePath(),pattern); - + int fileType = FAT_FindFirstFileLFN(name); Common::StringList list; do { - + if (fileType == TYPE_FILE) { FAT_GetLongFilename(name); @@ -186,18 +209,18 @@ Common::StringList GBAMPSaveFileManager::listSavefiles(const char *pattern) { for (int r = 0; r < strlen(name); r++) { name[r] = tolower(name[r]); } - - + + if (Common::matchString(name, pattern)) { list.push_back(name); } } } while ((fileType = FAT_FindNextFileLFN(name))); - + FAT_chdir("/"); return list; -} +} diff --git a/backends/platform/ds/arm9/source/gbampsave.h b/backends/platform/ds/arm9/source/gbampsave.h index 40dcde0b26..e9188b5312 100644 --- a/backends/platform/ds/arm9/source/gbampsave.h +++ b/backends/platform/ds/arm9/source/gbampsave.h @@ -19,12 +19,11 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #ifndef _GBAMPSAVE_H_ #define _GBAMPSAVE_H_ #include "system.h" -#include "saves/default/default-saves.h" #include "ds-fs.h" #define SAVE_BUFFER_SIZE 100000 @@ -39,42 +38,44 @@ class GBAMPSaveFile : public Common::InSaveFile, public Common::OutSaveFile { public: GBAMPSaveFile(char* name, bool saveOrLoad); virtual ~GBAMPSaveFile(); - + virtual uint32 read(void *buf, uint32 size); virtual uint32 write(const void *buf, uint32 size); - + virtual bool eos() const; virtual void skip(uint32 bytes); virtual uint32 pos() const; virtual uint32 size() const; virtual void seek(int32 pos, int whence); - + void flushSaveBuffer(); - + virtual bool isOpen() const { return handle != 0; } }; -class GBAMPSaveFileManager : public DefaultSaveFileManager { +class GBAMPSaveFileManager : public Common::SaveFileManager { public: GBAMPSaveFileManager(); ~GBAMPSaveFileManager(); - + // static GBAMPSaveFileManager* instance() { return instancePtr; } GBAMPSaveFile *openSavefile(const char *filename, bool saveOrLoad); - + virtual Common::OutSaveFile* openForSaving(const char* filename) { return openSavefile(filename, true); } virtual Common::InSaveFile* openForLoading(const char* filename) { return openSavefile(filename, false); } - + virtual bool removeSavefile(const char *filename) { return false; } // TODO: Implement this virtual Common::StringList listSavefiles(const char *pattern); - + void deleteFile(char* name); void listFiles(); + + const char *getSavePath() const; }; #endif diff --git a/backends/platform/ds/arm9/source/keys.cpp b/backends/platform/ds/arm9/source/keys.cpp index 8bfc983565..dcec2287b9 100644 --- a/backends/platform/ds/arm9/source/keys.cpp +++ b/backends/platform/ds/arm9/source/keys.cpp @@ -27,26 +27,26 @@ $Log: keys.c,v $ Revision 1.13 2006/01/12 09:10:47 wntrmute Added key repeat as suggested by pepsiman - + Revision 1.12 2005/11/27 12:30:25 wntrmute reverted to correct hardware REGisters - + Revision 1.11 2005/11/27 07:48:45 joatski Renamed REG_KEYINPUT and REG_KEYCNT back to KEYS and KEYS_CR, as the alternatives are defined in registers_alt.h. Changed function returns to uint32 - + Revision 1.10 2005/11/03 23:38:49 wntrmute don't use enum for key function returns - + Revision 1.9 2005/10/13 16:30:11 dovoto Changed KEYPAD_BITS to a typedef enum, this resolved some issues with multiple redefinition of KEYPAD_BITS (although this error did not allways occur). - + Revision 1.8 2005/10/03 21:21:59 wntrmute use enum types - + Revision 1.7 2005/09/07 18:06:27 wntrmute use new register names - + Revision 1.6 2005/08/23 17:06:10 wntrmute converted all endings to unix @@ -148,4 +148,4 @@ uint32 keysUp(void) { } -} // namespace ds +} // namespace ds \ No newline at end of file diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index f9b0b768c0..2381abab5e 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -62,7 +62,7 @@ int OSystem_DS::timerHandler(int t) { tm->handler(); return t; } - + void OSystem_DS::initBackend() { ConfMan.setInt("autosave_period", 0); ConfMan.setBool("FM_medium_quality", true); @@ -71,7 +71,7 @@ void OSystem_DS::initBackend() { _timer = new DSTimerManager; DS::setSoundProc(Audio::Mixer::mixCallback, _mixer); DS::setTimerCallback(&OSystem_DS::timerHandler, 10); - + OSystem::initBackend(); } @@ -134,20 +134,20 @@ void OSystem_DS::setPalette(const byte *colors, uint start, uint num) { int red = *colors; int green = *(colors + 1); int blue = *(colors + 2); - + red >>= 3; green >>= 3; blue >>= 3; - + // if (r != 255) - { + { BG_PALETTE[r] = red | (green << 5) | (blue << 10); if (!DS::getKeyboardEnable()) { BG_PALETTE_SUB[r] = red | (green << 5) | (blue << 10); } } // if (num == 16) consolePrintf("pal:%d r:%d g:%d b:%d\n", r, red, green, blue); - + colors += 4; } } @@ -156,7 +156,7 @@ bool OSystem_DS::grabRawScreen(Graphics::Surface* surf) { surf->create(DS::getGameWidth(), DS::getGameHeight(), 1); // Ensure we copy using 16 bit quantities due to limitation of VRAM addressing - + u16* image = (u16 *) DS::get8BitBackBuffer(); for (int y = 0; y < DS::getGameHeight(); y++) @@ -173,7 +173,7 @@ bool OSystem_DS::grabRawScreen(Graphics::Surface* surf) { void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) { // consolePrintf("Grabpalette"); - + for (unsigned int r = start; r < start + num; r++) { *colors++ = (BG_PALETTE[r] & 0x001F) << 3; *colors++ = (BG_PALETTE[r] & 0x03E0) >> 5 << 3; @@ -184,60 +184,67 @@ void OSystem_DS::grabPalette(unsigned char *colors, uint start, uint num) { void OSystem_DS::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) { // consolePrintf("Copy rect %d, %d %d, %d ", x, y, w, h); - + if (w <= 1) return; if (h < 0) return; if (!DS::getIsDisplayMode8Bit()) return; - + + u16* bg; + s32 stride; u16* bgSub = (u16 *) BG_GFX_SUB; - u16* bg = (u16 *) DS::get8BitBackBuffer(); - u16* src = (u16 *) buf; - if (DS::getKeyboardEnable()) { + if (_frameBufferExists) { + bg = (u16 *) _framebuffer.pixels; + stride = _framebuffer.pitch; + } else { + bg = (u16 *) DS::get8BitBackBuffer(); + stride = DS::get8BitBackBufferStride(); + } + u16* src = (u16 *) buf; + + if (DS::getKeyboardEnable()) { + for (int dy = y; dy < y + h; dy++) { - u16* dest = bg + (dy << 8) + (x >> 1); - + u16* dest = bg + (dy * (stride >> 1)) + (x >> 1); + DC_FlushRange(src, w << 1); DC_FlushRange(dest, w << 1); dmaCopyHalfWords(3, src, dest, w); - + src += pitch >> 1; } - + } else { for (int dy = y; dy < y + h; dy++) { - u16* dest1 = bg + (dy << 8) + (x >> 1); + u16* dest1 = bg + (dy * (stride >> 1)) + (x >> 1); u16* dest2 = bgSub + (dy << 8) + (x >> 1); - + DC_FlushRange(src, w << 1); DC_FlushRange(dest1, w << 1); DC_FlushRange(dest2, w << 1); - + dmaCopyHalfWords(3, src, dest1, w); dmaCopyHalfWords(3, src, dest2, w); - + src += pitch >> 1; } } - + // consolePrintf("Done\n"); - - - + + + } void OSystem_DS::updateScreen() { - if (_frameBufferExists) + if ((_frameBufferExists) && (DS::getIsDisplayMode8Bit())) { + _frameBufferExists = false; + // Copy temp framebuffer back to screen copyRectToScreen((byte *)_framebuffer.pixels, _framebuffer.pitch, 0, 0, _framebuffer.w, _framebuffer.h); - - // Free memory - _framebuffer.free(); - - _frameBufferExists = false; } DS::displayMode16BitFlipBuffer(); @@ -271,36 +278,36 @@ void OSystem_DS::grabOverlay (OverlayColor *buf, int pitch) { void OSystem_DS::copyRectToOverlay (const OverlayColor *buf, int pitch, int x, int y, int w, int h) { u16* bg = (u16 *) DS::get16BitBackBuffer(); u16* src = (u16 *) buf; - + // if (x + w > 256) w = 256 - x; //if (x + h > 256) h = 256 - y; // consolePrintf("Copy rect ovl %d, %d %d, %d %d\n", x, y, w, h, pitch); - - + + for (int dy = y; dy < y + h; dy++) { - - + + // Slow but save copy: for (int dx = x; dx < x + w; dx++) { - + *(bg + (dy * 512) + dx) = *src; //if ((*src) != 0) consolePrintf("%d,%d: %d ", dx, dy, *src); //consolePrintf("%d,", *src); src++; } src += (pitch - w); - + // Fast but broken copy: (why?) /* REG_IME = 0; dmaCopy(src, bg + (dy << 9) + x, w * 2); REG_IME = 1; - + src += pitch;*/ } - + // consolePrintf("Copy rect ovl done"); } @@ -315,7 +322,7 @@ int16 OSystem_DS::getOverlayWidth() { return getWidth(); } - + bool OSystem_DS::showMouse(bool visible) { DS::setShowCursor(visible); return true; @@ -353,7 +360,7 @@ bool OSystem_DS::pollEvent(Common::Event &event) { return true; } } - + return false; /* if (lastPenFrame != DS::getMillis()) { @@ -366,7 +373,7 @@ bool OSystem_DS::pollEvent(Common::Event &event) { if (eventNum == 1) { eventNum = 0; lastPenFrame = DS::getMillis(); - if (DS::getPenDown()) { + if (DS::getPenDown()) { event.type = Common::EVENT_LBUTTONDOWN; event.mouse = Common::Point(DS::getPenX(), DS::getPenY()); consolePrintf("Down %d, %d ", event.mouse.x, event.mouse.y); @@ -393,12 +400,12 @@ void OSystem_DS::delayMillis(uint msecs) { int st = getMillis(); DS::addEventsToQueue(); DS::CD::update(); - + DS::doSoundCallback(); while (st + msecs >= getMillis()) { DS::doSoundCallback(); } - + DS::doTimerCallback(); DS::checkSleepMode(); DS::addEventsToQueue(); @@ -423,7 +430,7 @@ void OSystem_DS::deleteMutex(MutexRef mutex) { } void OSystem_DS::clearSoundCallback() { - consolePrintf("Clearing sound callback"); +// consolePrintf("Clearing sound callback"); // DS::setSoundProc(NULL, NULL); } @@ -456,7 +463,7 @@ void OSystem_DS::quit() { /* consolePrintf("Soft resetting..."); IPC->reset = 1; REG_IE = 0; - + asm("swi 0x26\n"); swiSoftReset();*/ } @@ -475,10 +482,10 @@ Common::SaveFileManager* OSystem_DS::getSavefileManager() { } else { forceSram = false; } - if (forceSram) { + if (forceSram) { consolePrintf("Using SRAM save method!\n"); } - + if (DS::isGBAMPAvailable() && (!forceSram)) { return &mpSaveManager; } else { @@ -488,28 +495,64 @@ Common::SaveFileManager* OSystem_DS::getSavefileManager() { Graphics::Surface* OSystem_DS::createTempFrameBuffer() { - // For now, we create a full temporary screen surface, to which we copy the - // the screen content. Later unlockScreen will copy everything back. - // Not very nice nor efficient, but at least works, and is not worse - // than in the bad old times where we used grabRawScreen + copyRectToScreen. -// consolePrintf("lockScreen()\n"); - _framebuffer.create(DS::getGameWidth(), DS::getGameHeight(), 1); // Ensure we copy using 16 bit quantities due to limitation of VRAM addressing - size_t imageStrideInBytes = DS::isCpuScalerEnabled()? DS::getGameWidth() : 512; + // If the scaler is enabled, we can just return the 8 bit back buffer, since it's in system memory + // memory anyway. Otherwise, we need to copy the back buffer into the memory normally used by the scaler buffer and + // then return it. + // We must make sure that once the frame buffer is created, future calls to copyRectToScreen() copy to this buffer + + if (DS::isCpuScalerEnabled()) { + + _framebuffer.pixels = DS::getScalerBuffer(); + _framebuffer.w = DS::getGameWidth(); + _framebuffer.h = DS::getGameHeight(); + _framebuffer.pitch = DS::getGameWidth(); + _framebuffer.bytesPerPixel = 1; + + + } else { + + s32 height = DS::getGameHeight(); + s32 width = DS::getGameWidth(); + s32 stride = DS::get8BitBackBufferStride(); + + u16* src = DS::get8BitBackBuffer(); + u16* dest = DS::getScalerBuffer(); + + for (int y = 0; y < height; y++) { + + u16* destLine = dest + (y * (width / 2)); + u16* srcLine = src + (y * (stride / 2)); + + DC_FlushRange(srcLine, width); + + dmaCopyHalfWords(3, srcLine, destLine, width); + } + + _framebuffer.pixels = dest; + _framebuffer.w = width; + _framebuffer.h = height; + _framebuffer.pitch = width; + _framebuffer.bytesPerPixel = 1; + + } + + _frameBufferExists = true; + +/* + size_t imageStrideInBytes = DS::get8BitBackBufferStride(); size_t imageStrideInWords = imageStrideInBytes / 2; u16* image = (u16 *) DS::get8BitBackBuffer(); for (int y = 0; y < DS::getGameHeight(); y++) { DC_FlushRange(image + (y * imageStrideInWords), DS::getGameWidth()); for (int x = 0; x < DS::getGameWidth() >> 1; x++) { - *(((u16 *) (_framebuffer.pixels)) + y * (DS::getGameWidth() >> 1) + x) = image[(y << 8) + x]; + *(((u16 *) (_framebuffer.pixels)) + y * (DS::getGameWidth() >> 1) + x) = image[(y * imageStrideInWords) + x]; // *(((u16 *) (surf->pixels)) + y * (DS::getGameWidth() >> 1) + x) = image[y * imageStrideInWords + x]; } - } -// consolePrintf("lockScreen() done\n"); - _frameBufferExists = true; + }*/ return &_framebuffer; } @@ -524,15 +567,7 @@ Graphics::Surface *OSystem_DS::lockScreen() { } void OSystem_DS::unlockScreen() { - -// consolePrintf("unlockScreen()\n"); - - // Copy temp framebuffer back to screen -// copyRectToScreen((byte *)_framebuffer.pixels, _framebuffer.pitch, 0, 0, _framebuffer.w, _framebuffer.h); - - // Free memory -// _framebuffer.free(); -// consolePrintf("unlockScreen() done\n"); + // No need to do anything here. The screen will be updated in updateScreen(). } void OSystem_DS::setFocusRectangle(const Common::Rect& rect) { diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index 2bbd82bcf7..5d0c5901e5 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -19,8 +19,8 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - - + + #ifndef _OSYSTEM_DS_H_ #define _OSYSTEM_DS_H_ #include "common/system.h" @@ -33,10 +33,10 @@ #include "sound/mixer.h" #include "graphics/surface.h" -class DSAudioMixer : public Audio::Mixer { +class DSAudioMixer : public Audio::Mixer { }; -class DSTimerManager : public DefaultTimerManager { +class DSTimerManager : public DefaultTimerManager { }; @@ -45,10 +45,10 @@ protected: int eventNum; int lastPenFrame; - + Common::Event eventQueue[96]; int queuePos; - + DSSaveFileManager saveManager; GBAMPSaveFileManager mpSaveManager; DSAudioMixer* _mixer; @@ -58,7 +58,7 @@ protected: static OSystem_DS* _instance; - + Graphics::Surface* createTempFrameBuffer(); public: @@ -98,7 +98,7 @@ public: inline virtual OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b); inline virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b); - + virtual bool showMouse(bool visible); virtual void warpMouse(int x, int y); @@ -131,21 +131,21 @@ public: virtual void displayMessageOnOSD(const char *msg); virtual Common::SaveFileManager *getSavefileManager(); - + void addEvent(Common::Event& e); bool isEventQueueEmpty() { return queuePos == 0; } - + virtual bool grabRawScreen(Graphics::Surface* surf); - + virtual void setFocusRectangle(const Common::Rect& rect); - + virtual void clearFocusRectangle(); - + virtual void initBackend(); - + virtual Graphics::Surface *lockScreen(); virtual void unlockScreen(); - + virtual Audio::Mixer* getMixer() { return _mixer; } virtual Common::TimerManager* getTimerManager() { return _timer; } static int timerHandler(int t); diff --git a/backends/platform/ds/arm9/source/portdefs.cpp b/backends/platform/ds/arm9/source/portdefs.cpp index 075d24d909..74a41faca0 100644 --- a/backends/platform/ds/arm9/source/portdefs.cpp +++ b/backends/platform/ds/arm9/source/portdefs.cpp @@ -37,7 +37,6 @@ extern "C" time_t __wrap_time(time_t* t) { time_t DS_time(time_t) { - consolePrintf("Time!"); if (OSystem_DS::instance()) { return 0xABCD1234 + (OSystem_DS::instance()->getMillis() / 1000); } else { @@ -46,7 +45,6 @@ time_t DS_time(time_t) { } time_t DS_time(long* t) { - consolePrintf("Time!"); if (OSystem_DS::instance()) { if (t) *t = 0xABCD1234 + (OSystem_DS::instance()->getMillis() / 1000); return 0xABCD1234 + (OSystem_DS::instance()->getMillis() / 1000); diff --git a/backends/platform/ds/arm9/source/portdefs.h b/backends/platform/ds/arm9/source/portdefs.h index 12d53a332f..de7a5795f5 100644 --- a/backends/platform/ds/arm9/source/portdefs.h +++ b/backends/platform/ds/arm9/source/portdefs.h @@ -19,10 +19,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #ifndef _PORTDEFS_H_ #define _PORTDEFS_H_ + + /* typedef unsigned char u8; typedef signed char s8; diff --git a/backends/platform/ds/arm9/source/ramsave.cpp b/backends/platform/ds/arm9/source/ramsave.cpp index a9ac773dd2..f8e005647e 100644 --- a/backends/platform/ds/arm9/source/ramsave.cpp +++ b/backends/platform/ds/arm9/source/ramsave.cpp @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * */ // Save in order 1,2,3,4,larger 2,5 #include "system.h" @@ -52,18 +52,18 @@ DSSaveFile::DSSaveFile(SCUMMSave* s, bool compressed, u8* data) { ownsData = true; saveCompressed = false; // consolePrintf("Decompressed. name=%s size=%d (%d)", save.name, save.size, save.compressedSize); - + } else { ownsData = false; origHeader = s; } - + if (save.magic == (int) 0xBEEFCAFE) { save.isValid = true; } else { save.isValid = false; } - + isTempFile = false; } @@ -78,7 +78,7 @@ DSSaveFile::~DSSaveFile() { } bool DSSaveFile::loadFromSaveRAM(vu8* address) { - + SCUMMSave newSave; for (int t = 0; t < (int) sizeof(newSave); t++) { @@ -89,13 +89,13 @@ bool DSSaveFile::loadFromSaveRAM(vu8* address) { newSave.isValid = true; *((u16 *) (0x4000204)) |= 0x3; - + saveData = new unsigned char[newSave.compressedSize]; - + for (int t = 0; t < (int) newSave.compressedSize; t++) { ((char *) (saveData))[t] = *(address + t + sizeof(newSave)); } - + if (ownsData) delete this->saveData; save = newSave; saveCompressed = true; @@ -105,7 +105,7 @@ bool DSSaveFile::loadFromSaveRAM(vu8* address) { return true; } - + return false; } @@ -114,11 +114,11 @@ void DSSaveFile::compress() { unsigned char* compBuffer = new unsigned char[(save.size * 110) / 100]; int compSize = LZ_Compress((u8 *) saveData, compBuffer, save.size); save.compressedSize = compSize; - - - + + + delete saveData; - + // Make the save smaller saveData = (u8 *) realloc(compBuffer, save.compressedSize); saveCompressed = true; @@ -129,39 +129,39 @@ int DSSaveFile::saveToSaveRAM(vu8* address) { unsigned char* compBuffer; bool failed; - + int compSize; - + compress(); - + compSize = save.compressedSize; compBuffer = saveData; - + if (DSSaveFileManager::instance()->getBytesFree() >= getRamUsage()) { DSSaveFileManager::instance()->addBytesFree(-getRamUsage()); - + // Write header for (int t = 0; t < sizeof(save); t++) { while (*(address + t) != ((char *) (&save))[t]) { *(address + t) = ((char *) (&save))[t]; } } - + // Write compressed buffer for (int t = sizeof(save); t < (int) sizeof(save) + compSize; t++) { while (*(address + t) != compBuffer[t - sizeof(save)]) { *(address + t) = compBuffer[t - sizeof(save)]; } } - + failed = false; } else { failed = true; } - + return failed? 0: compSize + sizeof(save); } @@ -177,7 +177,7 @@ uint32 DSSaveFile::read(void *buf, uint32 size) { } memcpy(buf, saveData + ptr, size); // consolePrintf("byte: %d ", ((u8 *) (buf))[0]); - + ptr += size; return size; } @@ -249,7 +249,7 @@ bool DSSaveFile::matches(char* filename) { return false; } } - + void DSSaveFile::setName(char *name) { save.isValid = true; save.magic = 0xBEEFCAFE; @@ -258,7 +258,7 @@ void DSSaveFile::setName(char *name) { save.compressedSize = 0; saveData = new unsigned char[DS_MAX_SAVE_SIZE]; strcpy(save.name, name); - + if ((strstr(name, ".s99")) || (strstr(name, ".c"))) { isTempFile = true; } else { @@ -298,10 +298,10 @@ void DSSaveFile::deleteFile() { DSSaveFileManager::DSSaveFileManager() { instancePtr = this; - + *((u16 *) (0x4000204)) |= 0x3; swiWaitForVBlank(); - + loadAllFromSRAM(); } @@ -311,7 +311,7 @@ DSSaveFileManager::~DSSaveFileManager() { void DSSaveFileManager::loadAllFromSRAM() { int addr = 1; - + for (int r = 0; r < 8; r++) { gbaSave[r].deleteFile(); } @@ -332,7 +332,7 @@ void DSSaveFileManager::formatSram() { for (int r = 0; r < SRAM_SAVE_MAX; r++) { *(CART_RAM + r) = 0; } - + loadAllFromSRAM(); } @@ -358,7 +358,7 @@ DSSaveFile *DSSaveFileManager::openSavefile(const char* filename, bool saveOrLoa return gbaSave[r].clone(); } } - + if (saveOrLoad) { return makeSaveFile(filename, saveOrLoad); } else { @@ -401,6 +401,8 @@ Common::StringList DSSaveFileManager::listSavefiles(const char *pattern) { use Common::matchString from common/util.h and read the Doxygen docs, then combine this with the old code below... */ +} + /* void DSSaveFileManager::listSavefiles(const char *prefix, bool *marks, int num) { @@ -416,21 +418,20 @@ void DSSaveFileManager::listSavefiles(const char *prefix, bool *marks, int num) } } } - + } */ -} DSSaveFile *DSSaveFileManager::makeSaveFile(const char *filename, bool saveOrLoad) { - + // Find a free save slot int r = 0; - + while ((r < 8) && (gbaSave[r].isValid())) { r++; } - + if ((r == 8) && (gbaSave[r].isValid())) { // No more saves return NULL; @@ -447,9 +448,9 @@ void DSSaveFileManager::flushToSaveRAM() { int cartAddr = 1; int s; int extraData = DSSaveFileManager::getExtraData(); - + *((u16 *) (0x4000204)) |= 0x3; - + swiWaitForVBlank(); int size = 0; @@ -459,20 +460,20 @@ void DSSaveFileManager::flushToSaveRAM() { if (!gbaSave[r].isTemp()) size += gbaSave[r].getRamUsage(); } } - + if (size <= SRAM_SAVE_MAX) { for (int r = 0; r < SRAM_SAVE_MAX; r++) { *(CART_RAM + r) = 0; } - + sramBytesFree = SRAM_SAVE_MAX; - + for (int r = 0; (r < 8); r++) { if (gbaSave[r].isValid() && (!gbaSave[r].isTemp())) { - + cartAddr += s = gbaSave[r].saveToSaveRAM(CART_RAM + cartAddr); - + /* if (s == 0) { consolePrintf("WARNING: Save didn't fit in cart RAM and has been lost!! Delete files and save again.", gbaSave[r].getName()); failed = true; @@ -483,7 +484,7 @@ void DSSaveFileManager::flushToSaveRAM() { consolePrintf("WARNING: Save didn't fit in cart RAM and has been lost!! Delete files and save again."); loadAllFromSRAM(); - + } DSSaveFileManager::setExtraData(extraData); diff --git a/backends/platform/ds/arm9/source/ramsave.h b/backends/platform/ds/arm9/source/ramsave.h index abf225e598..6add649f56 100644 --- a/backends/platform/ds/arm9/source/ramsave.h +++ b/backends/platform/ds/arm9/source/ramsave.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #ifndef _RAMSAVE_H_ #define _RAMSAVE_H_ @@ -46,56 +46,56 @@ class DSSaveFile : public Common::InSaveFile, public Common::OutSaveFile { u16 extraMagic; // 32 u32 reserved; // 36 } __attribute__ ((packed)); - + SCUMMSave save; u8* saveData; SCUMMSave* origHeader; bool isOpenFlag; bool isTempFile; - + public: DSSaveFile(); DSSaveFile(SCUMMSave* s, bool saveCompressed, u8* data); ~DSSaveFile(); - + void reset(); - + bool isOpen() const { return isOpenFlag; } virtual bool eos() const; virtual void skip(uint32 size); - + virtual uint32 pos() const; virtual uint32 size() const; virtual void seek(int32 pos, int whence); uint32 read(void *buf, uint32 size); uint32 write(const void *buf, uint32 size); - + void setName(char *name); char* getName() { return save.name; } - + bool isValid() { return save.isValid; } bool isTemp() { return isTempFile; } bool matches(char* prefix, int num); bool matches(char* filename); - + void clearData(); void compress(); - + int getRamUsage() { return sizeof(save) + save.compressedSize; } char* getRamImage() { return (char *) &save; } - + int getSize() { return save.size; } - + DSSaveFile* clone(); - + bool loadFromSaveRAM(vu8* address); int saveToSaveRAM(vu8* address); - - + + void deleteFile(); - + void operator delete(void *p) { // consolePrintf("Finished! size=%d\n", ((DSSaveFile *) (p))->save->size); } @@ -107,25 +107,25 @@ public: class DSSaveFileManager : public Common::SaveFileManager { - + DSSaveFile gbaSave[8]; static DSSaveFileManager* instancePtr; int sramBytesFree; - + public: DSSaveFileManager(); ~DSSaveFileManager(); - + static DSSaveFileManager* instance() { return instancePtr; } DSSaveFile *openSavefile(const char *filename, bool saveOrLoad); - + virtual Common::OutSaveFile* openForSaving(const char* filename) { return openSavefile(filename, true); } virtual Common::InSaveFile* openForLoading(const char* filename) { return openSavefile(filename, false); } virtual bool removeSavefile(const char *filename); virtual Common::StringList listSavefiles(const char *pattern); - + void flushToSaveRAM(); void addBytesFree(int size) { sramBytesFree += size; } @@ -134,7 +134,7 @@ public: void deleteFile(char* name); void listFiles(); void formatSram(); - + void loadAllFromSRAM(); static bool isExtraDataPresent(); diff --git a/backends/platform/ds/arm9/source/scummconsole.c b/backends/platform/ds/arm9/source/scummconsole.c index 980dea7bc4..2145b47353 100644 --- a/backends/platform/ds/arm9/source/scummconsole.c +++ b/backends/platform/ds/arm9/source/scummconsole.c @@ -25,7 +25,7 @@ // // Changelog: // 0.1: First version -// 0.2: Fixed sprite mapping bug. 1D mapping should work now. +// 0.2: Fixed sprite mapping bug. 1D mapping should work now. // Changed some register defines for consistency. // ////////////////////////////////////////////////////////////////////// @@ -52,7 +52,7 @@ u16* fontMap; u8 row, col; //font may not start on a character base boundry -u16 fontOffset; +u16 fontOffset; //the first character in the set (0 if you have a full set) u16 fontStart; @@ -65,7 +65,7 @@ u16 fontPal; /////////////////////////////////////////////////////////// //consoleInit -// param: +// param: // font: 16 color font // charBase: the location the font data will be loaded to // numCharacters: count of characters in the font @@ -79,7 +79,7 @@ void consoleInit(u16* font, u16* charBase, u16 numCharacters, u8 charStart, u16* int i; row = col = 0; - + fontStart = charStart; fontOffset = 0; @@ -111,9 +111,9 @@ void consoleInit(u16* font, u16* charBase, u16 numCharacters, u8 charStart, u16* temp |= 0xF00; if(font[i] & 0xF000) temp |= 0xF000; - + charBase[i] = temp; - } + } } }//end if bitdepth else @@ -140,7 +140,7 @@ void consoleInit(u16* font, u16* charBase, u16 numCharacters, u8 charStart, u16* void consoleInitDefault(u16* map, u16* charBase, u8 bitDepth) { - consoleInit((u16 *) default_font_bin, charBase, 128, 0, map, CONSOLE_USE_COLOR255, bitDepth); + consoleInit((u16 *) default_font_bin, charBase, 128, 0, map, CONSOLE_USE_COLOR255, bitDepth); } void consolePrintSet(int x, int y) @@ -164,9 +164,9 @@ void consolePrintChar(char c) { col = 0; - row++; + row++; } - + if(row >= CONSOLE_HEIGHT) { row--; @@ -178,7 +178,7 @@ void consolePrintChar(char c) } - + switch(c) { @@ -199,7 +199,7 @@ void consolePrintChar(char c) } - + } @@ -207,16 +207,16 @@ void printX(int w, unsigned d) { int loop = 0; int i = 0; - + char buf[20] = {0}; while(d > 0) { buf[loop++] = d & 0xF; - d = d>>4; + d = d>>4; } - + for (i = 7; i >= 0; i--) { if(buf[i] || i < loop) @@ -235,15 +235,15 @@ void printx(int w, unsigned int d) { int loop = 0; int i = 0; - + char buf[20] = {0}; while(d > 0) { buf[loop++] = d & 0xF; - d = d>>4; + d = d>>4; } - + for (i = 7; i >= 0; i--) { if(buf[i] || i < loop) @@ -262,8 +262,8 @@ void printInt(int w, int d) { int loop = 0; int i = 0; - - char buf[20] = {0}; + + char buf[20] = {0}; if(d < 0) { @@ -276,9 +276,9 @@ void printInt(int w, int d) else while (d > 0) { buf[loop++] = d % 10; - d /= 10; + d /= 10; } - + for (i = 7; i >= 0; i--) { if(buf[i] || i < loop) @@ -310,16 +310,16 @@ void print0X(int w, unsigned d) { int loop = 0; int i = 0; - + char buf[] = {0,0,0,0,0,0,0,0}; //set to zero cause I may add formatted output someday - + while(d > 0) { buf[loop++] = d & 0xF; - d = d>>4; + d = d>>4; } - + for (i = 7; i >= 0; i--) { if(buf[i] || i < w || i < loop) @@ -336,16 +336,16 @@ void print0x(int w, unsigned int d) { int loop = 0; int i = 0; - + char buf[] = {0,0,0,0,0,0,0,0}; //set to zero cause I may add formatted output someday - + while(d > 0) { buf[loop++] = d & 0xF; - d = d>>4; + d = d>>4; } - + for (i = 7; i >= 0; i--) { if(buf[i] || i < w || i < loop) @@ -362,9 +362,9 @@ void print0Int(int w, int d) { int loop = 0; int i = 0; - + char buf[] = {0,0,0,0,0,0,0,0,0,0,0,0,0}; //set to zero cause I may add formatted output someday - + if(d < 0) { consolePrintChar('-'); @@ -374,9 +374,9 @@ void print0Int(int w, int d) while(d > 0) { buf[loop++] = d % 10; - d /= 10; + d /= 10; } - + for (i = 15; i >= 0; i--) if(buf[i] || i < w || i < loop) consolePrintChar(buf[i] + '0'); @@ -414,14 +414,14 @@ void printF(int w, float f) if(*t & BIT(31)) consolePrintChar('-'); - + print0Bin(32, fraction); - + printInt(1, fraction); consolePrintChar('e'); printInt(1, exp - 127); - + /* if(exp == 0 && fraction == 0) { @@ -447,7 +447,7 @@ void consolePrintf(const char* s, ...) va_list argp; va_start(argp, s); - + while(*s) { @@ -474,7 +474,7 @@ void consolePrintf(const char* s, ...) case 'I': case 'd': case 'D': - if(z)print0Int(w, va_arg(argp, int)); + if(z)print0Int(w, va_arg(argp, int)); else printInt(w, va_arg(argp, int)); s++; break; diff --git a/backends/platform/ds/arm9/source/scummconsole.h b/backends/platform/ds/arm9/source/scummconsole.h index d8ccf34c62..01fdfc2f04 100644 --- a/backends/platform/ds/arm9/source/scummconsole.h +++ b/backends/platform/ds/arm9/source/scummconsole.h @@ -25,7 +25,7 @@ // // Changelog: // 0.1: First version -// 0.2: Fixed sprite mapping bug. 1D mapping should work now. +// 0.2: Fixed sprite mapping bug. 1D mapping should work now. // Changed some register defines for consistency. // ////////////////////////////////////////////////////////////////////// diff --git a/backends/platform/ds/arm9/source/scummhelp.cpp b/backends/platform/ds/arm9/source/scummhelp.cpp index f9efd58276..452f782dc5 100644 --- a/backends/platform/ds/arm9/source/scummhelp.cpp +++ b/backends/platform/ds/arm9/source/scummhelp.cpp @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #include "scummhelp.h" #define ADD_BIND(k,d) do { key[i] = k; dsc[i] = d; i++; } while (0) diff --git a/backends/platform/ds/arm9/source/scummhelp.h b/backends/platform/ds/arm9/source/scummhelp.h index 602cb5f788..e79c863cbd 100644 --- a/backends/platform/ds/arm9/source/scummhelp.h +++ b/backends/platform/ds/arm9/source/scummhelp.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #ifndef _SCUMMHELP_H_ #define _SCUMMHELP_H_ @@ -30,7 +30,7 @@ namespace DS { void updateStrings(byte gameId, byte version, Common::Platform platform, int page, Common::String &title, Common::String *&key, Common::String *&dsc); - + } #endif diff --git a/backends/platform/ds/arm9/source/touchkeyboard.cpp b/backends/platform/ds/arm9/source/touchkeyboard.cpp index 5ff162cc4f..11832f4e3a 100644 --- a/backends/platform/ds/arm9/source/touchkeyboard.cpp +++ b/backends/platform/ds/arm9/source/touchkeyboard.cpp @@ -45,7 +45,7 @@ struct key_data { key_data keys[DS_NUM_KEYS] = { // Key number x y character - + // Numbers {28, 3, 0, '1'}, {29, 5, 0, '2'}, @@ -116,7 +116,7 @@ key_data keys[DS_NUM_KEYS] = { {54, 29, 8, Common::KEYCODE_DOWN}, {53, 31, 8, Common::KEYCODE_RIGHT}, {51, 29, 6, Common::KEYCODE_UP}, - + // Close button {56, 30, 0, Common::KEYCODE_INVALID}, @@ -133,7 +133,7 @@ key_data keys[DS_NUM_KEYS] = { {66, 26, -2, Common::KEYCODE_F10}, {67, 28, -2, Common::KEYCODE_F11}, {68, 30, -2, Common::KEYCODE_F12}, - + }; int keyboardX; @@ -162,7 +162,7 @@ void restoreVRAM(int tileBase, int mapBase, u16* saveSpace) { /* for (int r = 0; r < 32 * 32; r++) { ((u16 *) SCREEN_BASE_BLOCK_SUB(mapBase))[r] = *saveSpace++; } - + for (int r = 0; r < 4096; r++) { ((u16 *) CHAR_BASE_BLOCK_SUB(tileBase))[r] = *saveSpace++; }*/ @@ -175,77 +175,77 @@ void drawKeyboard(int tileBase, int mapBase, u16* saveSpace) { // *saveSpace++ = ((u16 *) SCREEN_BASE_BLOCK_SUB(mapBase))[r]; ((u16 *) SCREEN_BASE_BLOCK_SUB(mapBase))[r] = 0; } - + for (int r = 0; r < KEYBOARD_DATA_SIZE / 2; r++) { // *saveSpace++ = ((u16 *) CHAR_BASE_BLOCK_SUB(tileBase))[r]; ((u16 *) CHAR_BASE_BLOCK_SUB(tileBase))[r] = ((u16 *) (keyboard_raw))[r]; } - + for (int r = 0; r < 16; r++) { BG_PALETTE_SUB[r] = ((u16 *) (keyboard_pal_raw))[r]; } // this is the font for (int tile = 0; tile < 94; tile++) { - + u16* tileAddr = (u16 *) (CHAR_BASE_BLOCK_SUB(tileBase) + ((KEYBOARD_DATA_SIZE) + (tile * 32))); u8* src = ((u8 *) (_8x8font_tga_raw)) + 18 + tile * 8; for (int y = 0 ; y < 8; y++) { for (int x = 0; x < 2; x++) { *(tileAddr + (y * 2) + x) =(*(src + (y * 752) + (x * 4) + 0) & 0x0F) - | ((*(src + (y * 752) + (x * 4) + 1) & 0x0F) << 4) + | ((*(src + (y * 752) + (x * 4) + 1) & 0x0F) << 4) | ((*(src + (y * 752) + (x * 4) + 2) & 0x0F) << 8) | ((*(src + (y * 752) + (x * 4) + 3) & 0x0F) << 12); - + } } } - + for (int r = 0; r < 16; r++) { int col = ((u16 *) (keyboard_pal_raw))[r]; - + int red = col & 0x001F; int green = (col & 0x03E0) >> 5; int blue = (col & 0x7C00) >> 10; - + red = (red * 8) / 16; green = (green * 24) / 16; blue = (blue * 8) / 16; if (green > 31) green = 31; - + BG_PALETTE_SUB[16 + r] = red | (green << 5) | (blue << 10); } - + keyboardX = -2; keyboardY = 2; - + DS::mapBase = mapBase; DS::tileBase = tileBase; - + shiftState = false; capsLockState = false; - + int x = keyboardX; int y = keyboardY; - + u16* base = ((u16 *) SCREEN_BASE_BLOCK_SUB(mapBase)); baseAddress = base; - + for (int r = 0; r < DS_NUM_KEYS; r++) { base[(y + keys[r].y) * 32 + x + keys[r].x] = 10 + keys[r].keyNum * 2; base[(y + keys[r].y) * 32 + x + keys[r].x + 1] = 10 + keys[r].keyNum * 2 + 1; - + base[(y + keys[r].y + 1) * 32 + x + keys[r].x] = 10 + 148 + keys[r].keyNum * 2; base[(y + keys[r].y + 1) * 32 + x + keys[r].x + 1] = 10 + 148 + keys[r].keyNum * 2 + 1; - + keys[r].pressed = false; } - + closed = false; clearAutoComplete(); } @@ -257,7 +257,7 @@ void drawAutoComplete() { baseAddress[y * 32 + x] = 0; } } - + for (int r = 0; r < autoCompleteCount; r++) { int y = 12 + (r % 6) * 2; @@ -265,15 +265,15 @@ void drawAutoComplete() { for (int p = 0; p < strlen(autoCompleteWord[r]); p++) { char c = autoCompleteWord[r][p]; - + int tile = c - 33 + (KEYBOARD_DATA_SIZE / 32); if (selectedCompletion == r) { tile |= 0x1000; } - baseAddress[y * 32 + x + p] = tile; - + baseAddress[y * 32 + x + p] = tile; + } } @@ -317,7 +317,7 @@ void clearAutoComplete() { void typeCompletion(int current) { Common::Event event; - OSystem_DS* system = OSystem_DS::instance(); + OSystem_DS* system = OSystem_DS::instance(); strcat(autoCompleteBuffer, &autoCompleteWord[current][charactersEntered]); strcat(autoCompleteBuffer, " "); @@ -330,7 +330,7 @@ void typeCompletion(int current) { event.type = Common::EVENT_KEYDOWN; event.kbd.flags = 0; system->addEvent(event); - + event.type = Common::EVENT_KEYUP; system->addEvent(event); } @@ -350,14 +350,14 @@ void updateTypeEvents() if (autoCompleteBuffer[0] != '\0') { Common::Event event; - OSystem_DS* system = OSystem_DS::instance(); - + OSystem_DS* system = OSystem_DS::instance(); + event.kbd.keycode = (Common::KeyCode) autoCompleteBuffer[0]; event.kbd.ascii = autoCompleteBuffer[0]; event.type = Common::EVENT_KEYDOWN; event.kbd.flags = 0; system->addEvent(event); - + event.type = Common::EVENT_KEYUP; system->addEvent(event); @@ -380,30 +380,37 @@ void createKeyEvent(int keyNum, Common::Event& event) } else { event.kbd.keycode = (Common::KeyCode) (Common::KEYCODE_F1 - (keys[keyNum].character - '1')); event.kbd.ascii = 0; - } - + } + } else if ((keys[keyNum].character >= 'A') && (keys[keyNum].character <= 'Z')) { - + if ((!DS::shiftState) && (!DS::capsLockState)) { event.kbd.ascii = keys[keyNum].character + 32; // Make key lowercase. } else { event.kbd.ascii = keys[keyNum].character; } - + event.kbd.keycode = (Common::KeyCode) event.kbd.ascii; } else { - event.kbd.ascii = keys[keyNum].character; - event.kbd.keycode = (Common::KeyCode) keys[keyNum].character; - } + if ((keys[keyNum].character >= Common::KEYCODE_F1) && (keys[keyNum].character >= Common::KEYCODE_F12)) { + event.kbd.keycode = (Common::KeyCode) keys[keyNum].character; + event.kbd.ascii = keys[keyNum].character - Common::KEYCODE_F1 + Common::ASCII_F1; + } else { + event.kbd.ascii = keys[keyNum].character; + event.kbd.keycode = (Common::KeyCode) keys[keyNum].character; + } + } } void addKeyboardEvents() { + bool resetShift = false; + updateTypeEvents(); if (DS::getPenDown()) { int x = IPC->touchXpx; int y = IPC->touchYpx; - + int tx = (x >> 3); int ty = (y >> 3); @@ -427,81 +434,89 @@ void addKeyboardEvents() { tx -= keyboardX; ty -= keyboardY; - + // consolePrintf("x=%d y=%d\n", tx, ty); - + for (int r = 0; r < DS_NUM_KEYS; r++) { - if (( (tx >= keys[r].x) && (tx <= keys[r].x + 1)) && + if (( (tx >= keys[r].x) && (tx <= keys[r].x + 1)) && (ty >= keys[r].y) && (ty <= keys[r].y + 1)) { - OSystem_DS* system = OSystem_DS::instance(); + OSystem_DS* system = OSystem_DS::instance(); Common::Event event; - + // consolePrintf("Key: %d\n", r); if ((keys[r].character == Common::KEYCODE_INVALID)) { // Close button DS::closed = true; } else { createKeyEvent(r, event); - } - - //event.kbd.keycode = keys[r].character; - //event.kbd.ascii = keys[r].character; + } + + //event.kbd.keycode = keys[r].character; + //event.kbd.ascii = keys[r].character; event.type = Common::EVENT_KEYDOWN; system->addEvent(event); // event.type = Common::EVENT_KEYUP; // system->addEvent(event); - + switch (keys[r].character) { case DS_SHIFT: { DS::shiftState = !DS::shiftState; DS::setKeyHighlight(r, DS::shiftState); break; } - + case DS_CAPSLOCK: { DS::capsLockState = !DS::capsLockState; DS::setKeyHighlight(r, DS::capsLockState); break; } - + default: { DS::setKeyHighlight(r, true); keys[r].pressed = true; - - if (DS::shiftState) { - DS::shiftState = false; - for (int t = 0; t < DS_NUM_KEYS; t++) { - if (keys[t].character == DS_SHIFT) { - DS::setKeyHighlight(t, false); - } - } - } break; } } - + } } } - + if (DS::getPenReleased()) { - + for (int r = 0; r < DS_NUM_KEYS; r++) { if (keys[r].pressed) { DS::setKeyHighlight(r, false); - OSystem_DS* system = OSystem_DS::instance(); - + OSystem_DS* system = OSystem_DS::instance(); + Common::Event event; createKeyEvent(r, event); event.type = Common::EVENT_KEYUP; system->addEvent(event); keys[r].pressed = false; + + if (keys[r].character != DS_SHIFT) { + resetShift = true; + } + } + } + + } + + + if ((resetShift) && (DS::shiftState)) { + DS::shiftState = false; + resetShift = false; + for (int t = 0; t < DS_NUM_KEYS; t++) { + if (keys[t].character == DS_SHIFT) { + DS::setKeyHighlight(t, false); } } } + } } diff --git a/backends/platform/ds/arm9/source/touchkeyboard.h b/backends/platform/ds/arm9/source/touchkeyboard.h index e4aa102ab4..8a5fc728ce 100644 --- a/backends/platform/ds/arm9/source/touchkeyboard.h +++ b/backends/platform/ds/arm9/source/touchkeyboard.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #ifndef _TOUCHKEYBOARD_H_ #define _TOUCHKEYBOARD_H_ diff --git a/backends/platform/ds/arm9/source/wordcompletion.cpp b/backends/platform/ds/arm9/source/wordcompletion.cpp index bf4ce7c909..9eeeb62410 100644 --- a/backends/platform/ds/arm9/source/wordcompletion.cpp +++ b/backends/platform/ds/arm9/source/wordcompletion.cpp @@ -23,7 +23,7 @@ void addAutoCompleteLine(char* line) { { char word[32]; int length; - + // Skip the T9-style numbers while (*line != ' ') { @@ -37,7 +37,7 @@ void addAutoCompleteLine(char* line) { if (*line == ' ') line++; - // Copy the new word + // Copy the new word do { word[length++] = *line++; } while ((*line != '\0') && (*line != ' ') && (*line != '\n')); @@ -47,7 +47,7 @@ void addAutoCompleteLine(char* line) { // Store a pointer to the start of the word wordBufferPtr[wordBufferPtrPos++] = &wordBuffer[wordBufferPos]; - + // copy the new word into the buffer strcpy(&wordBuffer[wordBufferPos], word); wordBufferPos += strlen(word) + 1; @@ -104,11 +104,11 @@ bool findWordCompletions(char* input) // Get the word from the dictonary line word = wordBufferPtr[position]; - + // Now check to see if the word is before or after the stub we're after int result = scumm_stricmp((const char *) partialWord, (const char *) word); - + if (result == 0) { // We've found the whole word. Aren't we good. break; @@ -128,10 +128,10 @@ bool findWordCompletions(char* input) word = wordBufferPtr[position]; //consolePrintf("Final word: %s\n", word); - + system->setCharactersEntered(strlen(partialWord)); - + bool match = true; @@ -161,7 +161,7 @@ bool findWordCompletions(char* input) break; } } - + if (match) { system->addAutoComplete(word); } diff --git a/backends/platform/ds/arm9/source/zipreader.cpp b/backends/platform/ds/arm9/source/zipreader.cpp index 8ba56c2b7c..01321f44f5 100644 --- a/backends/platform/ds/arm9/source/zipreader.cpp +++ b/backends/platform/ds/arm9/source/zipreader.cpp @@ -17,7 +17,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * + * */ @@ -29,25 +29,25 @@ ZipFile::ZipFile() { // Locate a zip file in cartridge memory space - + // consolePrintf("ZIP file check..."); - + char* p = (char *) ZF_SEARCH_START; bool found = false; - + _zipFile = NULL; - + while ((p != (char *) ZF_SEARCH_END) && (!found)) { // Zip file header is: 0x504B0304 - + if ( (*p == 0x50) && (*(p + 1) == 0x4B) && (*(p + 2) == 0x03) && (*(p + 3) == 0x04) ) { // Found header! found = true; _zipFile = p; } - + if (!found) p += ZF_SEARCH_STRIDE; - + } if (_zipFile) { @@ -56,14 +56,14 @@ ZipFile::ZipFile() { // consolePrintf("Not in use!\n"); return; } - + changeToRoot(); restartFile(); - + if (_currentFile->compSize != (u32) getFileSize()) { consolePrintf("Error: ZIP file contains compression!\n"); } - + _allFilesVisible = false; } @@ -83,73 +83,73 @@ bool ZipFile::restartFile() { getFileName(name); more = skipFile(); } - + return more; } bool ZipFile::currentFileInFolder() { char name[128]; - + if (_allFilesVisible) return true; - + getFileName(name); // consolePrintf("N:'%s'D:'%s'\n", name, _directory); - + if (_directory[0] == 0) { // Root directory name[strlen(name) - 1] = 0; - return !strchr(name, '\\'); // Not in root if contains a / character before the last character + return !strchr(name, '\\'); // Not in root if contains a / character before the last character } else { /* if (name starts with directory && it's not the directory && (no slashes after the directory || it's the last character) && (slash follows directory) */ - if ((strstr(name, _directory) == name) && (strlen(name) != strlen(_directory)) + if ((strstr(name, _directory) == name) && (strlen(name) != strlen(_directory)) && ((strchr(name + strlen(_directory) + 1, '\\') == NULL) || (strchr(name + strlen(_directory) + 1, '\\') == name + strlen(name) - 1)) && (*(name + strlen(_directory)) == '\\')) { return true; } } - + return false; } void ZipFile::getFileName(char* name) { strncpy(name, (char *) (_currentFile + 1), _currentFile->nameLength); - + for (int r = 0; r < (int) strlen(name); r++) { if (name[r] == '/') name[r] = '\\'; } name[_currentFile->nameLength] = 0; - + if (name[strlen(name) - 1] == '\\') { name[strlen(name) - 1] = 0; - } + } } bool ZipFile::skipFile() { bool valid; do { - + // Move on to the next file _currentFile = (FileHeader *) ( ((char *) (_currentFile)) + sizeof(*_currentFile) + _currentFile->nameLength + _currentFile->fileSize + _currentFile->extraLength ); - + // Return true if there are more files. Check this by looking for the magic number valid = (_currentFile->magic[0] == 0x50) && (_currentFile->magic[1] == 0x4B) && (_currentFile->magic[2] == 0x03) && (_currentFile->magic[3] == 0x04); - - + + } while (valid && !currentFileInFolder()); - + return valid; - + // Currently doesn't handle data descriptors! } @@ -170,7 +170,7 @@ int ZipFile::getFileSize() { } bool ZipFile::isDirectory() { - return _currentFile->fileSize == 0; // This is a bit wrong, but seems to work. + return _currentFile->fileSize == 0; // This is a bit wrong, but seems to work. } char* ZipFile::getFile() { @@ -180,7 +180,7 @@ char* ZipFile::getFile() { bool ZipFile::findFile(char* search) { changeToRoot(); restartFile(); - + char searchName[128]; strcpy(searchName, search); for (int r = 0; r < (int) strlen(searchName); r++) { @@ -191,15 +191,15 @@ bool ZipFile::findFile(char* search) { *(searchName + strlen(searchName) - 1) = '\0'; // which we need to dispose of. } - + do { char name[128]; getFileName(name); if (*(name + strlen(name) - 1) == '\\') { // Directories have a terminating slash *(name + strlen(name) - 1) = '\0'; // which we need to dispose of. } - - + + if (!stricmp(name, searchName)) { // consolePrintf("'%s'=='%s'\n", name, searchName); return true; // Got it! @@ -222,7 +222,7 @@ void ZipFile::changeDirectory(char* dir) { for (int r = 0; r < (int) strlen(_directory); r++) { if (_directory[r] == '/') _directory[r] = '\\'; } - + if (_directory[strlen(_directory) - 1] == '\\') { _directory[strlen(_directory) - 1] = '\0'; } diff --git a/backends/platform/ds/arm9/source/zipreader.h b/backends/platform/ds/arm9/source/zipreader.h index cd7244dba5..19aa3d9f31 100644 --- a/backends/platform/ds/arm9/source/zipreader.h +++ b/backends/platform/ds/arm9/source/zipreader.h @@ -19,7 +19,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ - + #ifndef _ZIPREADER_H_ #define _ZIPREADER_H_ #include "portdefs.h" @@ -45,9 +45,9 @@ class ZipFile { char* _zipFile; char _directory[128]; - + bool _allFilesVisible; - + FileHeader* _currentFile; public: @@ -55,25 +55,25 @@ public: ~ZipFile(); bool isReady(); - + // These operations set the current file bool restartFile(); bool skipFile(); - bool findFile(char* search); + bool findFile(char* search); // These return the file's data and information char* getFile(); int getFileSize(); void getFileName(char* name); bool isDirectory(); - + // These set the current directory void changeDirectory(char* name); void changeToRoot(); void setAllFilesVisible(bool state) { _allFilesVisible = state; } - + bool currentFileInFolder(); - + u16 misaligned16(u16* v); u32 misaligned32(u32* v); -- cgit v1.2.3 From 51835dac6a20c4f22071ba42f0a7bfb0f326adec Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 16 May 2008 09:45:38 +0000 Subject: Include all required header files in launcher.h (should fix compilation problems in WinCE backend) svn-id: r32141 --- gui/launcher.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/launcher.h b/gui/launcher.h index 164a7e0707..a9d09bf109 100644 --- a/gui/launcher.h +++ b/gui/launcher.h @@ -26,6 +26,7 @@ #define LAUNCHER_DIALOG_H #include "gui/dialog.h" +#include "base/game.h" #include "common/str.h" namespace GUI { -- cgit v1.2.3 From 5ddf6c4c1875994a3fe5c602799c834b2f5d5aa8 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 16 May 2008 12:10:43 +0000 Subject: Yet another compilation fix for WinCE svn-id: r32142 --- backends/platform/wince/CELauncherDialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/platform/wince/CELauncherDialog.cpp b/backends/platform/wince/CELauncherDialog.cpp index d474110f26..edfdad84b3 100644 --- a/backends/platform/wince/CELauncherDialog.cpp +++ b/backends/platform/wince/CELauncherDialog.cpp @@ -28,7 +28,7 @@ #include "CELauncherDialog.h" -#include "engines/engine.h" +#include "engines/metaengine.h" #include "gui/newgui.h" #include "gui/widget.h" -- cgit v1.2.3 From b8585f5af071bf7147dd2990e34d8221af1d0534 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Fri, 16 May 2008 19:20:28 +0000 Subject: commit eriktorbjorn's patch #1964853 (HoF: Hand of Fate credits cleanup (WIP)) with minor changes (including fix for the glitch mentioned in the tracker item) svn-id: r32143 --- engines/kyra/sequences_hof.cpp | 92 +++++++++++++++++++++++++++--------------- 1 file changed, 60 insertions(+), 32 deletions(-) diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index 3e9f6030ac..fc011642e3 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -2395,17 +2395,32 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int if (!data) return; - static const char mark[] = { 5, 13, 0}; + static const char mark[] = { 5, 13, 0 }; _screen->clearPage(tempPage1); _screen->clearPage(tempPage2); _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, 0, tempPage1); - uint8 *tmp = new uint8[397]; - memset(tmp, 0, 397); - uint8 **tmpStringTable = new uint8*[35]; + struct ScrollTextData { + int16 x; + int16 y; + uint8 *text; + byte unk1; + byte height; + byte adjust; + + ScrollTextData() { + x = 0; // 0 11 + y = 0; // 2 13 + text = 0; // 4 15 + unk1 = 0; // 8 19 + height = 0; // 9 20 + adjust = 0; // 10 21 + } + }; + + ScrollTextData *textData = new ScrollTextData[36]; uint8 *ptr = data; - int strTblIndex = 0; bool loop = true; int cnt = 0; @@ -2414,8 +2429,12 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int uint32 endTime = _system->getMillis() + speed * _tickLength; while (cnt < 35 && *ptr) { - int m = cnt * 11; - uint16 cH = cnt ? READ_LE_UINT16(&tmp[m + 2]) + tmp[m + 9] + (tmp[m + 9] >> 3) : d->h; + uint16 cH; + + if (cnt) + cH = textData[cnt].y + textData[cnt].height + (textData[cnt].height >> 3); + else + cH = d->h; char *str = (char*)ptr; @@ -2423,12 +2442,15 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int if (!ptr) ptr = (uint8*)strchr(str, 0); - tmp[m + 19] = *ptr; + textData[cnt + 1].unk1 = *ptr; *ptr = 0; - if (tmp[m + 19]) + if (textData[cnt + 1].unk1) ptr++; - tmp[m + 21] = (*str == 3 || *str == 4) ? tmp[m + 21] = *str++ : 0; + if (*str == 3 || *str == 4) + textData[cnt + 1].adjust = *str++; + else + textData[cnt + 1].adjust = 0; _screen->setFont(fid1); @@ -2439,18 +2461,25 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int str++; } - tmp[m + 20] = _screen->getFontHeight(); + textData[cnt + 1].height = _screen->getFontHeight(); - WRITE_LE_UINT16(&tmp[m + 11], (tmp[m + 21] == 3) ? 157 - _screen->getTextWidth(str) : - ((tmp[m + 21] == 4) ? 161 : (((d->w << 3) - _screen->getTextWidth(str)) >> 1) + 1)); + switch (textData[cnt + 1].adjust) { + case 3: + textData[cnt + 1].x = 157 - _screen->getTextWidth(str); + break; + case 4: + textData[cnt + 1].x = 161; + break; + default: + textData[cnt + 1].x = (((d->w << 3) - _screen->getTextWidth(str)) >> 1) + 1; + break; + } - if (tmp[m + 8] == 5) - cH -= (tmp[m + 9] + (tmp[m + 9] >> 3)); + if (textData[cnt].unk1 == 5) + cH -= (textData[cnt].height + (textData[cnt].height >> 3)); - WRITE_LE_UINT16(&tmp[m + 13], cH); - WRITE_LE_UINT32(&tmp[m + 15], strTblIndex); - tmpStringTable[strTblIndex] = (uint8*) str; - strTblIndex = (strTblIndex + 1) % 35; + textData[cnt + 1].y = cH; + textData[cnt + 1].text = (uint8*) str; cnt++; } @@ -2460,11 +2489,10 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int bool palCycle = 0; while (cnt2 < cnt) { - int m = cnt2 * 11; - const char *str = (const char*)tmpStringTable[READ_LE_UINT32(&tmp[m + 15])]; + const char *str = (const char*)textData[cnt2 + 1].text; const char *str2 = str; - uint16 cW = READ_LE_UINT16(&tmp[m + 11]) - 10; - uint16 cH = READ_LE_UINT16(&tmp[m + 13]); + int16 cW = textData[cnt2 + 1].x - 10; + int16 cH = textData[cnt2 + 1].y; int x = (d->sx << 3) + cW; int y = d->sy + cH; int col1 = 255; @@ -2472,7 +2500,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int if (cH < d->h) { _screen->setCurPage(tempPage2); _screen->setFont(fid1); - if (tmp[m + 20] != _screen->getFontHeight()) + if (textData[cnt2 + 1].height != _screen->getFontHeight()) _screen->setFont(fid2); if (specialData) { @@ -2503,18 +2531,18 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int _screen->setCurPage(0); } - WRITE_LE_UINT16(&tmp[m + 13], READ_LE_UINT16(&tmp[m + 13]) - step); + textData[cnt2 + 1].y -= step; cnt2++; } _screen->copyRegion(d->sx << 3, d->sy, d->sx << 3, d->sy, d->w << 3, d->h, tempPage2, 0); _screen->updateScreen(); - if ((int16)READ_LE_UINT16(&tmp[13]) < -10) { - tmpStringTable[tmp[15]] += strlen((char*)tmpStringTable[tmp[15]]); - tmpStringTable[tmp[15]][0] = tmp[19]; + if (textData[1].y < -10) { + textData[1].text += strlen((char*)textData[1].text); + textData[1].text[0] = textData[1].unk1; cnt--; - memcpy(&tmp[11], &tmp[22], cnt * 11); + memcpy(&textData[1], &textData[2], cnt * sizeof(ScrollTextData)); } if (palCycle) { @@ -2526,7 +2554,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int delayUntil(endTime); - if ((cnt < 36) && ((d->sy + d->h) > (READ_LE_UINT16(&tmp[cnt * 11 + 2]) + tmp[cnt * 11 + 9])) && !skipFlag()) { + if ((cnt < 36) && ((d->sy + d->h) > (textData[cnt].y + textData[cnt].height)) && !skipFlag()) { resetSkipFlag(); delay(_tickLength * 500); cnt = 0; @@ -2542,8 +2570,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int _abortIntroFlag= false; resetSkipFlag(); - delete[] tmp; - delete[] tmpStringTable; + delete[] textData; } void KyraEngine_HoF::seq_scrollPage() { @@ -2783,3 +2810,4 @@ void KyraEngine_HoF::seq_makeBookAppear() { } // end of namespace Kyra + -- cgit v1.2.3 From 9ce0b621085419093fbfc03b6e3e2e6a0369460e Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Fri, 16 May 2008 20:26:57 +0000 Subject: cleanup svn-id: r32144 --- engines/kyra/animator_hof.cpp | 8 ++------ engines/kyra/animator_mr.cpp | 6 +----- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp index 1192145530..65f38cd961 100644 --- a/engines/kyra/animator_hof.cpp +++ b/engines/kyra/animator_hof.cpp @@ -127,12 +127,8 @@ void KyraEngine_HoF::updateItemAnimations() { return; const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem]; - ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem]; - - if (++_nextAnimItem == 14) { - _nextAnimItem = 0; - return; - } + ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem]; + _nextAnimItem = ++_nextAnimItem % 14; uint32 ctime = _system->getMillis(); if (ctime < a->nextFrame) diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp index f04ca0345d..212b4919dd 100644 --- a/engines/kyra/animator_mr.cpp +++ b/engines/kyra/animator_mr.cpp @@ -205,11 +205,7 @@ void KyraEngine_MR::updateItemAnimations() { const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem]; ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem]; - - if (++_nextAnimItem == 11) { - _nextAnimItem = 0; - return; - } + _nextAnimItem = ++_nextAnimItem % 11; uint32 ctime = _system->getMillis(); if (ctime < a->nextFrame) -- cgit v1.2.3 From 5127f1a8f12f409f5ab973fe821981d4fb25b9ab Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 17 May 2008 04:07:16 +0000 Subject: Fixing the "object videos not minding drawing order / limits" glitch in Woodruff svn-id: r32146 --- engines/gob/mult_v2.cpp | 2 +- engines/gob/scenery.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index 8a299649c7..ebbcf407c6 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -755,7 +755,7 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) { animData.frame = 0; if ((animData.animation < 0) && (animObj.videoSlot > 0)) { _vm->_vidPlayer->slotClose(animObj.videoSlot - 1); - animObj.videoSlot = 0; + animObj.videoSlot = 0; } break; diff --git a/engines/gob/scenery.cpp b/engines/gob/scenery.cpp index 25df5b7e71..fa7944c203 100644 --- a/engines/gob/scenery.cpp +++ b/engines/gob/scenery.cpp @@ -623,8 +623,8 @@ void Scenery::updateAnim(int16 layer, int16 frame, int16 animation, int16 flags, Mult::Mult_Object &obj = _vm->_mult->_objects[-animation - 1]; - if (!_vm->_vidPlayer->slotIsOpen(obj.videoSlot - 1)) { - _toRedrawLeft = -1234; + if ((obj.videoSlot == 0) || !_vm->_vidPlayer->slotIsOpen(obj.videoSlot - 1)) { + _toRedrawLeft = -12345; return; } @@ -736,7 +736,7 @@ void Scenery::updateAnim(int16 layer, int16 frame, int16 animation, int16 flags, } - if (flags & 4) { + if (!(flags & 4)) { _animLeft = _toRedrawLeft = left; _animTop = _toRedrawTop = top; _animRight = _toRedrawRight = right; -- cgit v1.2.3 From 66ecacc7c388d268d2ecf04c3b6cbf4face5a164 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 17 May 2008 09:06:54 +0000 Subject: Screen mask is now only used for V2 games svn-id: r32147 --- engines/made/screen.cpp | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 563e059309..20327c3acf 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -45,11 +45,13 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { _workScreenDrawCtx.destSurface = _workScreen; _clipArea.destSurface = _workScreen; - // FIXME: Screen mask is only needed in v2 games - _screenMask = new Graphics::Surface(); - _screenMask->create(320, 200, 1); - _maskDrawCtx.clipRect = Common::Rect(320, 200); - _maskDrawCtx.destSurface = _screenMask; + // Screen mask is only needed in v2 games + if (_vm->getGameID() != GID_RTZ) { + _screenMask = new Graphics::Surface(); + _screenMask->create(320, 200, 1); + _maskDrawCtx.clipRect = Common::Rect(320, 200); + _maskDrawCtx.destSurface = _screenMask; + } for (int i = 0; i <= 3; i++) _excludeClipAreaEnabled[i] = false; @@ -90,14 +92,16 @@ Screen::Screen(MadeEngine *vm) : _vm(vm) { Screen::~Screen() { delete _backgroundScreen; delete _workScreen; - delete _screenMask; + if (_vm->getGameID() != GID_RTZ) + delete _screenMask; delete _fx; } void Screen::clearScreen() { _backgroundScreen->fillRect(Common::Rect(0, 0, 320, 200), 0); _workScreen->fillRect(Common::Rect(0, 0, 320, 200), 0); - _screenMask->fillRect(Common::Rect(0, 0, 320, 200), 0); + if (_vm->getGameID() != GID_RTZ) + _screenMask->fillRect(Common::Rect(0, 0, 320, 200), 0); _mask = 0; _needPalette = true; } @@ -167,7 +171,8 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f source = (byte*)sourceSurface->getBasePtr(startX, startY); dest = (byte*)clipInfo.destSurface->getBasePtr(x, y); - maskp = (byte*)_maskDrawCtx.destSurface->getBasePtr(x, y); + if (_vm->getGameID() != GID_RTZ) + maskp = (byte*)_maskDrawCtx.destSurface->getBasePtr(x, y); int32 sourcePitch, linePtrAdd; byte *linePtr; @@ -192,7 +197,7 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f linePtr = source; } for (int16 xc = 0; xc < clipWidth; xc++) { - if (*linePtr && (mask == 0 || maskp[xc] == 0)) { + if (*linePtr && (_vm->getGameID() == GID_RTZ || (mask == 0 || maskp[xc] == 0))) { if (*linePtr) dest[xc] = *linePtr; } @@ -200,7 +205,8 @@ void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 f } source += sourcePitch; dest += clipInfo.destSurface->pitch; - maskp += _maskDrawCtx.destSurface->pitch; + if (_vm->getGameID() != GID_RTZ) + maskp += _maskDrawCtx.destSurface->pitch; } } -- cgit v1.2.3 From 2ceb1b257767b1ab7cc4bb1a3799ef25f6786eb1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 17 May 2008 10:17:35 +0000 Subject: Documented screen effects svn-id: r32148 --- engines/made/screenfx.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp index feea365615..532ac806e3 100644 --- a/engines/made/screenfx.cpp +++ b/engines/made/screenfx.cpp @@ -60,19 +60,19 @@ void ScreenEffects::run(int16 effectNum, Graphics::Surface *surface, byte *palet switch (effectNum) { - case 0: + case 0: // No effect vfx00(surface, palette, newPalette, colorCount); break; - case 9: + case 9: // "Checkerboard" effect vfx09(surface, palette, newPalette, colorCount); break; - case 14: + case 14: // "Screen open" effect vfx14(surface, palette, newPalette, colorCount); break; - case 17: + case 17: // Palette fadeout/fadein vfx17(surface, palette, newPalette, colorCount); break; @@ -189,11 +189,13 @@ void ScreenEffects::copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int } +// No effect void ScreenEffects::vfx00(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { setPalette(palette); _screen->showWorkScreen(); } +// "Checkerboard" effect void ScreenEffects::vfx09(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int i = 0; i < 8; i++) { copyRect(surface, 0, 0, 320, 200); @@ -205,6 +207,7 @@ void ScreenEffects::vfx09(Graphics::Surface *surface, byte *palette, byte *newPa setPalette(palette); } +// "Screen open" effect void ScreenEffects::vfx14(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { int16 x = 8, y = 5; for (int i = 0; i < 27; i++) { @@ -217,6 +220,7 @@ void ScreenEffects::vfx14(Graphics::Surface *surface, byte *palette, byte *newPa setPalette(palette); } +// Palette fadeout/fadein void ScreenEffects::vfx17(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { byte tempPalette[768]; -- cgit v1.2.3 From f4cc7dfa85871575a50553dda3ee4f601cc603cf Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 17 May 2008 13:22:12 +0000 Subject: Loop the Kyra 3 menu music. (The original does.) svn-id: r32149 --- engines/kyra/kyra_mr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index c0c04cb370..07083913da 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -402,7 +402,7 @@ void KyraEngine_MR::playMenuAudioFile() { if (_soundDigital->isPlaying(_musicSoundChannel)) return; - _musicSoundChannel = _soundDigital->playSound(_menuAudioFile, 0xFF, Audio::Mixer::kMusicSoundType); + _musicSoundChannel = _soundDigital->playSound(_menuAudioFile, 0xFF, Audio::Mixer::kMusicSoundType, 255, true); } void KyraEngine_MR::snd_playWanderScoreViaMap(int track, int force) { -- cgit v1.2.3 From 25e7e1999a41bd58680933d1435a6b50f83c5788 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 17 May 2008 13:35:57 +0000 Subject: Initial incomplete version of a MADE script dumper svn-id: r32150 --- engines/made/script.cpp | 58 ++++++++++++++++++++++++++++++++++++++++++++++++- engines/made/script.h | 1 + 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/engines/made/script.cpp b/engines/made/script.cpp index 8b5a48cdd7..37e6f8536c 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -183,7 +183,6 @@ ScriptInterpreter::~ScriptInterpreter() { } void ScriptInterpreter::runScript(int16 scriptObjectIndex) { - _vm->_quit = false; _runningScriptObjectIndex = scriptObjectIndex; @@ -201,7 +200,64 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) { warning("ScriptInterpreter::runScript(%d) Unknown opcode %02X", _runningScriptObjectIndex, opcode); } } +} +void ScriptInterpreter::dumpScript(int16 scriptObjectIndex) { + _codeBase = _vm->_dat->getObject(scriptObjectIndex)->getData(); + _codeIp = _codeBase; + int16 val = 0; + + // TODO: script size + while (true) { + byte opcode = readByte(); + if (opcode >= 1 && opcode <= _commandsMax) { + printf("[%04X:%04X] %s\n", _runningScriptObjectIndex, (uint) (_codeIp - _codeBase), _commands[opcode - 1].desc); + //(this->*_commands[opcode - 1].proc)(); + + // Handle command data + if (!strcmp(_commands[opcode - 1].desc, "cmd_branchTrue")) { + val = readInt16(); + printf("Offset = %04X\n", val); + } else if (!strcmp(_commands[opcode - 1].desc, "cmd_branchFalse")) { + val = readInt16(); + printf("Offset = %04X\n", val); + } else if (!strcmp(_commands[opcode - 1].desc, "cmd_branch")) { + val = readInt16(); + printf("Offset = %04X\n", val); + } else if (!strcmp(_commands[opcode - 1].desc, "cmd_loadConstant")) { + val = readInt16(); + printf("Constant = %04X\n", val); + } else if (!strcmp(_commands[opcode - 1].desc, "cmd_loadVariable")) { + val = readInt16(); + printf("Variable = %04X\n", val); + } else if (!strcmp(_commands[opcode - 1].desc, "cmd_set")) { + val = readInt16(); + printf("Variable = %04X\n", val); + } else if (!strcmp(_commands[opcode - 1].desc, "cmd_call")) { + // TODO + printf("TODO\n"); + } else if (!strcmp(_commands[opcode - 1].desc, "cmd_arg") || + !strcmp(_commands[opcode - 1].desc, "cmd_aset") || + !strcmp(_commands[opcode - 1].desc, "cmd_tmp") || + !strcmp(_commands[opcode - 1].desc, "cmd_tset") || + !strcmp(_commands[opcode - 1].desc, "cmd_tspace")) { + val = readByte(); + printf("argIndex = %d\n", val); + } else if (!strcmp(_commands[opcode - 1].desc, "cmd_send")) { + /*byte argc = */readByte(); + // TODO + printf("TODO\n"); + } else if (!strcmp(_commands[opcode - 1].desc, "cmd_extend")) { + /*byte func = */readByte(); + + /*byte argc = */readByte(); + // TODO + printf("TODO\n"); + } + } else { + warning("ScriptInterpreter::runScript(%d) Unknown opcode %02X", _runningScriptObjectIndex, opcode); + } + } } byte ScriptInterpreter::readByte() { diff --git a/engines/made/script.h b/engines/made/script.h index 6c031f8708..f2c49bd818 100644 --- a/engines/made/script.h +++ b/engines/made/script.h @@ -63,6 +63,7 @@ public: ScriptInterpreter(MadeEngine *vm); ~ScriptInterpreter(); void runScript(int16 scriptObjectIndex); + void dumpScript(int16 scriptObjectIndex); protected: MadeEngine *_vm; -- cgit v1.2.3 From 84610606c127acf70d3faf166c4919d9eecbb625 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 17 May 2008 14:47:30 +0000 Subject: Slight cleanup and small bugfix for dumpScript()'s cmd_call svn-id: r32151 --- engines/made/script.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/engines/made/script.cpp b/engines/made/script.cpp index 37e6f8536c..b14798bab6 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -215,13 +215,9 @@ void ScriptInterpreter::dumpScript(int16 scriptObjectIndex) { //(this->*_commands[opcode - 1].proc)(); // Handle command data - if (!strcmp(_commands[opcode - 1].desc, "cmd_branchTrue")) { - val = readInt16(); - printf("Offset = %04X\n", val); - } else if (!strcmp(_commands[opcode - 1].desc, "cmd_branchFalse")) { - val = readInt16(); - printf("Offset = %04X\n", val); - } else if (!strcmp(_commands[opcode - 1].desc, "cmd_branch")) { + if (!strcmp(_commands[opcode - 1].desc, "cmd_branchTrue") || + !strcmp(_commands[opcode - 1].desc, "cmd_branchFalse") || + !strcmp(_commands[opcode - 1].desc, "cmd_branch")) { val = readInt16(); printf("Offset = %04X\n", val); } else if (!strcmp(_commands[opcode - 1].desc, "cmd_loadConstant")) { @@ -234,6 +230,7 @@ void ScriptInterpreter::dumpScript(int16 scriptObjectIndex) { val = readInt16(); printf("Variable = %04X\n", val); } else if (!strcmp(_commands[opcode - 1].desc, "cmd_call")) { + /*byte argc = */readByte(); // TODO printf("TODO\n"); } else if (!strcmp(_commands[opcode - 1].desc, "cmd_arg") || -- cgit v1.2.3 From 8f0703abd2c42e20caf14fa5c5553aa2232aff57 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 17 May 2008 15:12:20 +0000 Subject: - Fixed sound channel fadeout on VQA playing - Minor formatting fixes svn-id: r32152 --- engines/kyra/kyra_mr.cpp | 5 ++++- engines/kyra/vqa.cpp | 8 +++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 07083913da..6e4d266480 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -370,7 +370,10 @@ void KyraEngine_MR::playVQA(const char *name) { snprintf(filename, sizeof(filename), "%s%d.VQA", name, size); if (vqa.open(filename)) { - _soundDigital->stopAllSounds(); + for (int i = 0; i < 4; ++i) { + if (i != _musicSoundChannel) + _soundDigital->stopSound(i); + } _screen->hideMouse(); memcpy(_screen->getPalette(1), _screen->getPalette(0), 768); diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp index cea52e911e..3d18f27c7e 100644 --- a/engines/kyra/vqa.cpp +++ b/engines/kyra/vqa.cpp @@ -362,9 +362,8 @@ void VQAMovie::close() { delete[] _partialCodeBook; delete[] _vectorPointers; - if (_vm->_mixer->isSoundHandleActive(_sound)) { + if (_vm->_mixer->isSoundHandleActive(_sound)) _vm->_mixer->stopHandle(_sound); - } _frameInfo = NULL; _frame = NULL; @@ -655,11 +654,10 @@ void VQAMovie::play() { while (1) { uint32 elapsedTime; - if (_vm->_mixer->isSoundHandleActive(_sound)) { + if (_vm->_mixer->isSoundHandleActive(_sound)) elapsedTime = _vm->_mixer->getSoundElapsedTime(_sound); - } else { + else elapsedTime = _system->getMillis() - startTick; - } if (elapsedTime >= (i * 1000) / _header.frameRate) break; -- cgit v1.2.3 From 56b894bb2dbc099c015c51442f56f43c1e2626f1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 17 May 2008 15:20:39 +0000 Subject: Changed parameter of KyraEngine_LoK::setMouseItem. svn-id: r32153 --- engines/kyra/items_lok.cpp | 6 +++--- engines/kyra/kyra_lok.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/kyra/items_lok.cpp b/engines/kyra/items_lok.cpp index 5d9a4d5ae5..8eb62c20c2 100644 --- a/engines/kyra/items_lok.cpp +++ b/engines/kyra/items_lok.cpp @@ -176,7 +176,7 @@ void KyraEngine_LoK::placeItemInGenericMapScene(int item, int index) { } void KyraEngine_LoK::setHandItem(uint16 item) { - debugC(9, kDebugLevelMain, "KyraEngine_LoK::setHandItem(%d)", item); + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setHandItem(%u)", item); _screen->hideMouse(); setMouseItem(item); _itemInHand = item; @@ -191,8 +191,8 @@ void KyraEngine_LoK::removeHandItem() { _screen->showMouse(); } -void KyraEngine_LoK::setMouseItem(int item) { - debugC(9, kDebugLevelMain, "KyraEngine_LoK::setMouseItem(%d)", item); +void KyraEngine_LoK::setMouseItem(uint16 item) { + debugC(9, kDebugLevelMain, "KyraEngine_LoK::setMouseItem(%u)", item); if (item == 0xFFFF) _screen->setMouseCursor(1, 1, _shapes[6]); else diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index 5e244e4925..2eee4f2f6e 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -284,7 +284,7 @@ protected: // -> mouse item void setHandItem(uint16 item); void removeHandItem(); - void setMouseItem(int item); + void setMouseItem(uint16 item); // -> graphics effects void wipeDownMouseItem(int xpos, int ypos); -- cgit v1.2.3 From bf35e95049cc5e89c59815e2a1a3f32dd3153f43 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 17 May 2008 17:44:23 +0000 Subject: - fixes bug #1962601 at least for intro and outro - add a mutex lock in sound_towns svn-id: r32155 --- engines/kyra/sequences_hof.cpp | 14 +++++++------- engines/kyra/sound_towns.cpp | 1 + 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index fc011642e3..68bcd1ded2 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -855,8 +855,8 @@ int KyraEngine_HoF::seq_finaleFunters(WSAMovie_v2 *wsaObj, int x, int y, int frm seq_printCreditsString(81, 240, 70, _seqTextColorMap, 252); seq_printCreditsString(82, 240, 90, _seqTextColorMap, _seqTextColor[0]); _screen->copyPage(2, 12); - delay(endtime - _system->getMillis()); seq_playTalkText(_flags.isTalkie ? 28 : 24); + delay(endtime - _system->getMillis()); _seqTextColor[0] = 1; if (_flags.isTalkie) { @@ -2337,8 +2337,11 @@ void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, i uint32 chatTimeout = _system->getMillis() + dur * _tickLength; int curframe = firstframe; - if (vocIndex && speechEnabled()) + if (vocIndex && speechEnabled()) { + while (_sound->voiceIsPlaying() && !skipFlag()) + delay(4); seq_playTalkText(vocIndex); + } while (_system->getMillis() < chatTimeout && !(_abortIntroFlag || skipFlag())) { if (lastframe < 0) { @@ -2377,11 +2380,8 @@ void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, i if (_abortIntroFlag || skipFlag()) _sound->voiceStop(); - if (lastframe < 0) { - int t = ABS(lastframe); - if (t < curframe) - curframe = t; - } + if (ABS(lastframe) < curframe) + curframe = ABS(lastframe); if (curframe == firstframe) curframe++; diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index 513f523194..5a1801b803 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -1301,6 +1301,7 @@ bool SoundTowns::loadInstruments() { void SoundTowns::playEuphonyTrack(uint32 offset, int loop) { uint8 * twm = _vm->resource()->fileData("twmusic.pak", 0); + Common::StackLock lock(_mutex); if (!_parser) { _parser = new MidiParser_EuD(_driver->queue()); -- cgit v1.2.3 From 2e14d05caa043848f7d74f53117bce284c325b12 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 17 May 2008 18:24:14 +0000 Subject: Added default search path "hof_cd"/"malcolm" directory for HoF/Kyra3. svn-id: r32156 --- engines/kyra/resource.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 9d34c669a1..635d00f993 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -73,12 +73,22 @@ bool Resource::reset() { if (_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie) { loadPakFile("GENERAL.PAK"); } else { + if (_vm->gameFlags().isTalkie) { + // Add default file directories + Common::File::addDefaultDirectory(ConfMan.get("path") + "hof_cd"); + Common::File::addDefaultDirectory(ConfMan.get("path") + "HOF_CD"); + } + loadPakFile("INTROGEN.PAK"); loadPakFile("OTHER.PAK"); } return true; } else if (_vm->game() == GI_KYRA3) { + // Add default file directories + Common::File::addDefaultDirectory(ConfMan.get("path") + "malcolm"); + Common::File::addDefaultDirectory(ConfMan.get("path") + "MALCOLM"); + loadPakFile("WESTWOOD.001"); loadFileList("FILEDATA.FDT"); -- cgit v1.2.3 From 6e13bde2130fb12f7d307c4fcdedd8e36e3038bb Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 17 May 2008 19:01:00 +0000 Subject: Changing debug channels a bit svn-id: r32157 --- engines/gob/gob.cpp | 3 ++- engines/gob/gob.h | 5 ++-- engines/gob/inter_v2.cpp | 4 ++-- engines/gob/inter_v4.cpp | 12 ++++++---- engines/gob/sound/adlib.cpp | 2 +- engines/gob/sound/cdrom.cpp | 6 ----- engines/gob/sound/sound.cpp | 58 ++++++++++++++++++++++++++++++++++++++++++++- 7 files changed, 73 insertions(+), 17 deletions(-) diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 5871151d6e..7926f6220e 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -85,12 +85,13 @@ GobEngine::GobEngine(OSystem *syst) : Engine(syst) { Common::addSpecialDebugLevel(kDebugFuncOp, "FuncOpcodes", "Script FuncOpcodes debug level"); Common::addSpecialDebugLevel(kDebugDrawOp, "DrawOpcodes", "Script DrawOpcodes debug level"); Common::addSpecialDebugLevel(kDebugGobOp, "GoblinOpcodes", "Script GoblinOpcodes debug level"); - Common::addSpecialDebugLevel(kDebugMusic, "Music", "CD, Adlib and Infogrames music debug level"); + Common::addSpecialDebugLevel(kDebugSound, "Sound", "Sound output debug level"); Common::addSpecialDebugLevel(kDebugParser, "Parser", "Parser debug level"); Common::addSpecialDebugLevel(kDebugGameFlow, "Gameflow", "Gameflow debug level"); Common::addSpecialDebugLevel(kDebugFileIO, "FileIO", "File Input/Output debug level"); Common::addSpecialDebugLevel(kDebugSaveLoad, "SaveLoad", "Saving/Loading debug level"); Common::addSpecialDebugLevel(kDebugGraphics, "Graphics", "Graphics debug level"); + Common::addSpecialDebugLevel(kDebugVideo, "Video", "IMD/VMD video debug level"); Common::addSpecialDebugLevel(kDebugCollisions, "Collisions", "Collisions debug level"); syst->getEventManager()->registerRandomSource(_rnd, "gob"); diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 0a82bceed5..812ae1edb9 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -100,13 +100,14 @@ enum { kDebugFuncOp = 1 << 0, kDebugDrawOp = 1 << 1, kDebugGobOp = 1 << 2, - kDebugMusic = 1 << 3, // CD, Adlib and Infogrames music + kDebugSound = 1 << 3, kDebugParser = 1 << 4, kDebugGameFlow = 1 << 5, kDebugFileIO = 1 << 6, kDebugSaveLoad = 1 << 7, kDebugGraphics = 1 << 8, - kDebugCollisions = 1 << 9 + kDebugVideo = 1 << 9, + kDebugCollisions = 1 << 10 }; inline char *strncpy0(char *dest, const char *src, size_t n) { diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 493efa8438..6278a6e22f 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1087,6 +1087,8 @@ void Inter_v2::o2_playCDTrack() { } void Inter_v2::o2_waitCDTrackEnd() { + debugC(1, kDebugSound, "CDROM: Waiting for playback to end"); + while (_vm->_sound->cdGetTrackPos() >= 0) _vm->_util->longDelay(1); } @@ -2056,7 +2058,6 @@ void Inter_v2::o2_loadInfogramesIns(OpGobParams ¶ms) { strncpy0(fileName, GET_VAR_STR(varName), 15); strcat(fileName, ".INS"); - debugC(1, kDebugMusic, "Loading Infogrames instrument file \"%s\"", fileName); _vm->_sound->infogramesLoadInstruments(fileName); } @@ -2069,7 +2070,6 @@ void Inter_v2::o2_playInfogrames(OpGobParams ¶ms) { strncpy0(fileName, GET_VAR_STR(varName), 15); strcat(fileName, ".DUM"); - debugC(1, kDebugMusic, "Playing Infogrames music file \"%s\"", fileName); _vm->_sound->infogramesLoadSong(fileName); _vm->_sound->infogramesPlay(); diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp index 76b11752e0..920ca59f43 100644 --- a/engines/gob/inter_v4.cpp +++ b/engines/gob/inter_v4.cpp @@ -687,6 +687,8 @@ void Inter_v4::executeGoblinOpcode(int i, OpGobParams ¶ms) { } if (op == NULL) { + warning("unimplemented opcodeGoblin: %d", i); + int16 val; _vm->_global->_inter_execPtr -= 2; @@ -739,11 +741,14 @@ void Inter_v4::o4_playVmdOrMusic() { palEnd = _vm->_parse->parseValExpr(); palCmd = 1 << (flags & 0x3F); + debugC(1, kDebugVideo, "Playing video \"%s\" @ %d+%d, frames %d - %d, " + "paletteCmd %d (%d - %d), flags %X", fileName, x, y, startFrame, lastFrame, + palCmd, palStart, palEnd, flags); + close = false; if (lastFrame == -1) { close = true; } else if (lastFrame == -3) { -// warning("Woodruff Stub: Video/Music command -3: Play background video %s, %d, %d, %d, %d", fileName, startFrame, x, y, VAR_OFFSET(7872)); _vm->_mult->_objects[startFrame].pAnimData->animation = -startFrame - 1; @@ -767,17 +772,16 @@ void Inter_v4::o4_playVmdOrMusic() { warning("Woodruff Stub: Video/Music command -4: Play background video %s", fileName); return; } else if (lastFrame == -5) { -// warning("Woodruff Stub: Video/Music command -5: Stop background music"); _vm->_sound->bgStop(); return; } else if (lastFrame == -6) { -// warning("Woodruff Stub: Video/Music command -6: Load background video %s", fileName); + return; + } else if (lastFrame == -7) { return; } else if (lastFrame == -8) { warning("Woodruff Stub: Video/Music command -8: Play background video %s", fileName); return; } else if (lastFrame == -9) { -// warning("Woodruff Stub: Video/Music command -9: Play background music %s (%d-%d)", fileName, palEnd, palStart); _vm->_sound->bgStop(); _vm->_sound->bgSetPlayMode(BackgroundAtmosphere::kPlayModeRandom); _vm->_sound->bgPlay(fileName, palStart); diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp index fb0d9d58c1..b3d392ad1e 100644 --- a/engines/gob/sound/adlib.cpp +++ b/engines/gob/sound/adlib.cpp @@ -125,7 +125,7 @@ int AdLib::readBuffer(int16 *buffer, const int numSamples) { } void AdLib::writeOPL(byte reg, byte val) { - debugC(6, kDebugMusic, "writeOPL(%02X, %02X)", reg, val); + debugC(6, kDebugSound, "writeOPL(%02X, %02X)", reg, val); OPLWriteReg(_opl, reg, val); } diff --git a/engines/gob/sound/cdrom.cpp b/engines/gob/sound/cdrom.cpp index f3bc70807e..eef8025cc2 100644 --- a/engines/gob/sound/cdrom.cpp +++ b/engines/gob/sound/cdrom.cpp @@ -83,8 +83,6 @@ void CDROM::startTrack(const char *trackName) { if (!_LICbuffer) return; - debugC(1, kDebugMusic, "CDROM::startTrack(%s)", trackName); - byte *matchPtr = getTrackBuffer(trackName); if (!matchPtr) { warning("Track \"%s\" not found", trackName); @@ -114,8 +112,6 @@ void CDROM::play(uint32 from, uint32 to) { // HSG encodes frame information into a double word: // minute multiplied by 4500, plus second multiplied by 75, // plus frame, minus 150 - debugC(1, kDebugMusic, "CDROM::play(%d, %d)", from, to); - AudioCD.play(1, 1, from, to - from + 1); _cdPlaying = true; } @@ -159,8 +155,6 @@ void CDROM::stopPlaying() { } void CDROM::stop() { - debugC(1, kDebugMusic, "CDROM::stop()"); - _curTrackBuffer = 0; AudioCD.stop(); _cdPlaying = false; diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 63b74ca36f..79fe5acb56 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -92,6 +92,8 @@ bool Sound::sampleLoad(SoundDesc *sndDesc, const char *fileName, bool tryExist) if (!sndDesc) return false; + debugC(2, kDebugSound, "Loading sample \"%s\"", fileName); + int16 handle = _vm->_dataIO->openData(fileName); if (handle < 0) { warning("Can't open sample file \"%s\"", fileName); @@ -137,6 +139,8 @@ void Sound::speakerOn(int16 frequency, int32 length) { if (!_pcspeaker) return; + debugC(1, kDebugSound, "PCSpeaker: Playing tone (%d, %d)", frequency, length); + _pcspeaker->speakerOn(frequency, length); } @@ -144,6 +148,8 @@ void Sound::speakerOff() { if (!_pcspeaker) return; + debugC(1, kDebugSound, "PCSpeaker: Stopping tone"); + _pcspeaker->speakerOff(); } @@ -158,6 +164,8 @@ bool Sound::infogramesLoadInstruments(const char *fileName) { if (!_infogrames) return false; + debugC(1, kDebugSound, "Infogrames: Loading instruments \"%s\"", fileName); + return _infogrames->loadInstruments(fileName); } @@ -165,6 +173,8 @@ bool Sound::infogramesLoadSong(const char *fileName) { if (!_infogrames) return false; + debugC(1, kDebugSound, "Infogrames: Loading song \"%s\"", fileName); + return _infogrames->loadSong(fileName); } @@ -172,6 +182,8 @@ void Sound::infogramesPlay() { if (!_infogrames) return; + debugC(1, kDebugSound, "Infogrames: Starting playback"); + _infogrames->play(); } @@ -179,6 +191,8 @@ void Sound::infogramesStop() { if (!_infogrames) return; + debugC(1, kDebugSound, "Infogrames: Stopping playback"); + _infogrames->stop(); } @@ -186,6 +200,8 @@ bool Sound::adlibLoad(const char *fileName) { if (!_adlib) return false; + debugC(1, kDebugSound, "Adlib: Loading data (\"%s\")", fileName); + return _adlib->load(fileName); } @@ -193,6 +209,8 @@ bool Sound::adlibLoad(byte *data, uint32 size, int index) { if (!_adlib) return false; + debugC(1, kDebugSound, "Adlib: Loading data (%d)", index); + return _adlib->load(data, size, index); } @@ -200,6 +218,8 @@ void Sound::adlibUnload() { if (!_adlib) return; + debugC(1, kDebugSound, "Adlib: Unloading data"); + _adlib->unload(); } @@ -207,7 +227,7 @@ void Sound::adlibPlayTrack(const char *trackname) { if (!_adlib || _adlib->isPlaying()) return; - debugC(1, kDebugMusic, "Adlib::playTrack(%s)", trackname); + debugC(1, kDebugSound, "Adlib: Playing track \"%s\"", trackname); _adlib->unload(); _adlib->load(trackname); @@ -235,6 +255,8 @@ void Sound::adlibPlay() { if (!_adlib) return; + debugC(1, kDebugSound, "Adlib: Starting playback"); + _adlib->startPlay(); } @@ -242,6 +264,8 @@ void Sound::adlibStop() { if (!_adlib) return; + debugC(1, kDebugSound, "Adlib: Stopping playback"); + _adlib->stopPlay(); } @@ -278,6 +302,9 @@ void Sound::blasterPlay(SoundDesc *sndDesc, int16 repCount, if (!_blaster || !sndDesc) return; + debugC(1, kDebugSound, "SoundBlaster: Playing sample (%d, %d, %d)", + repCount, frequency, fadeLength); + _blaster->playSample(*sndDesc, repCount, frequency, fadeLength); } @@ -285,6 +312,8 @@ void Sound::blasterStop(int16 fadeLength, SoundDesc *sndDesc) { if (!_blaster) return; + debugC(1, kDebugSound, "SoundBlaster: Stopping playback"); + _blaster->stopSound(fadeLength, sndDesc); } @@ -293,6 +322,9 @@ void Sound::blasterPlayComposition(int16 *composition, int16 freqVal, if (!_blaster) return; + debugC(1, kDebugSound, "SoundBlaster: Playing composition (%d, %d)", + freqVal, sndCount); + blasterWaitEndPlay(); _blaster->stopComposition(); @@ -306,6 +338,8 @@ void Sound::blasterStopComposition() { if (!_blaster) return; + debugC(1, kDebugSound, "SoundBlaster: Stopping composition"); + _blaster->stopComposition(); } @@ -327,6 +361,8 @@ void Sound::blasterWaitEndPlay(bool interruptible, bool stopComp) { if (!_blaster) return; + debugC(1, kDebugSound, "SoundBlaster: Waiting for playback to end"); + if (stopComp) _blaster->endComposition(); @@ -345,6 +381,8 @@ void Sound::cdLoadLIC(const char *fname) { if (!_cdrom) return; + debugC(1, kDebugSound, "CDROM: Loading LIC \"%s\"", fname); + int handle = _vm->_dataIO->openData(fname); if (handle == -1) @@ -366,6 +404,8 @@ void Sound::cdUnloadLIC() { if (!_cdrom) return; + debugC(1, kDebugSound, "CDROM: Unloading LIC"); + _cdrom->freeLICBuffer(); } @@ -400,6 +440,9 @@ void Sound::cdPlayBgMusic() { for (int i = 0; i < ARRAYSIZE(tracks); i++) if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) { + debugC(1, kDebugSound, "CDROM: Playing background music \"%s\" (\"%s\")", + tracks[i][1], _vm->_game->_curTotFile); + _cdrom->startTrack(tracks[i][1]); break; } @@ -422,6 +465,9 @@ void Sound::cdPlayMultMusic() { int language = _vm->_global->_language <= 4 ? _vm->_global->_language : 2; for (int i = 0; i < ARRAYSIZE(tracks); i++) if (!scumm_stricmp(_vm->_game->_curTotFile, tracks[i][0])) { + debugC(1, kDebugSound, "CDROM: Playing mult music \"%s\" (\"%s\")", + tracks[i][language + 1], _vm->_game->_curTotFile); + _cdrom->startTrack(tracks[i][language + 1]); break; } @@ -431,6 +477,7 @@ void Sound::cdPlay(const char *trackName) { if (!_cdrom) return; + debugC(1, kDebugSound, "CDROM: Playing track \"%s\"", trackName); _cdrom->startTrack(trackName); } @@ -438,6 +485,7 @@ void Sound::cdStop() { if (!_cdrom) return; + debugC(1, kDebugSound, "CDROM: Stopping playback"); _cdrom->stopPlaying(); } @@ -473,6 +521,8 @@ void Sound::bgPlay(const char *base, int count) { if (!_bgatmos) return; + debugC(1, kDebugSound, "BackgroundAtmosphere: Playing \"%s\" (%d)", base, count); + _bgatmos->stop(); _bgatmos->queueClear(); @@ -495,6 +545,8 @@ void Sound::bgStop() { if (!_bgatmos) return; + debugC(1, kDebugSound, "BackgroundAtmosphere: Stopping playback"); + _bgatmos->stop(); _bgatmos->queueClear(); } @@ -510,6 +562,8 @@ void Sound::bgShade() { if (!_bgatmos) return; + debugC(1, kDebugSound, "BackgroundAtmosphere: Shading playback"); + _bgatmos->shade(); } @@ -517,6 +571,8 @@ void Sound::bgUnshade() { if (!_bgatmos) return; + debugC(1, kDebugSound, "BackgroundAtmosphere: Unshading playback"); + _bgatmos->unshade(); } -- cgit v1.2.3 From ad044516cb4a1856486cb50f6bfd866a75df5796 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 17 May 2008 19:23:44 +0000 Subject: Adding video debug output in Inter_v2, too svn-id: r32158 --- engines/gob/inter_v2.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 6278a6e22f..0e2a6c607e 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1576,6 +1576,10 @@ void Inter_v2::o2_playImd() { palEnd = _vm->_parse->parseValExpr(); palCmd = 1 << (flags & 0x3F); + debugC(1, kDebugVideo, "Playing video \"%s\" @ %d+%d, frames %d - %d, " + "paletteCmd %d (%d - %d), flags %X", _vm->_global->_inter_resStr, x, y, + startFrame, lastFrame, palCmd, palStart, palEnd, flags); + if ((imd[0] != 0) && !_vm->_vidPlayer->primaryOpen(imd, x, y, flags)) { WRITE_VAR(11, -1); return; -- cgit v1.2.3 From ec763c4be9f4e780fe6541f66895a0b525cfa637 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 17 May 2008 19:26:10 +0000 Subject: This fixes the messed-up palette after levitating in Bigwig's place in Woodruff. I hope it doesn't break anything else, though... svn-id: r32159 --- engines/gob/videoplayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index f421646ee2..c6910c1369 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -542,7 +542,7 @@ bool VideoPlayer::doPlay(int16 frame, int16 breakKey, _vm->_draw->_noInvalidated = true; } - if (state.flags & CoktelVideo::kStatePalette) { + if ((state.flags & CoktelVideo::kStatePalette) && (palCmd > 1)) { copyPalette(*(_primaryVideo->getVideo()), palStart, palEnd); if (!_backSurf) -- cgit v1.2.3 From 1fc25f99974e2d5b56e17bb50c69d2dd5aa06885 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 17 May 2008 21:02:10 +0000 Subject: fix o1_fillRect() svn-id: r32160 --- engines/kyra/script_v1.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index 7881605b9e..ce3b7ba050 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -98,7 +98,7 @@ int KyraEngine_v1::o1_playWanderScoreViaMap(EMCState *script) { int KyraEngine_v1::o1_fillRect(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - screen()->fillRect(stackPos(1), stackPos(2), stackPos(1)+stackPos(3), stackPos(2)+stackPos(4), stackPos(5), stackPos(0)); + screen()->fillRect(stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(0)); return 0; } -- cgit v1.2.3 From 4e785a9e73f6dd8b637474c4983abf2f5cfe5318 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 17 May 2008 23:55:04 +0000 Subject: Changing the split stuff again, fixing several scrolling and hotspot-text related issues svn-id: r32161 --- engines/gob/draw_v2.cpp | 28 ++++++++--------- engines/gob/inter.h | 1 + engines/gob/inter_v2.cpp | 50 ++++++----------------------- engines/gob/inter_v4.cpp | 82 +++++++++++++++++++++++++++++++++++++++++++++++- engines/gob/video.cpp | 19 ++++++++++- 5 files changed, 122 insertions(+), 58 deletions(-) diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 1195e35e93..8c12079b83 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -247,10 +247,7 @@ void Draw_v2::printTotText(int16 id) { if (_renderFlags & RENDERFLAG_FROMSPLIT) { int16 start; - if (_vm->_video->_splitHeight1 < _vm->_height) - start = _vm->_video->_splitHeight1; - else - start = _vm->_video->_splitStart; + start = _vm->_video->_splitStart; destY = start; spriteBottom = READ_LE_UINT16(ptr + 6) - READ_LE_UINT16(ptr + 2); @@ -654,22 +651,23 @@ void Draw_v2::spriteOperation(int16 operation) { int16 destSurface = _destSurface; int16 sourceSurface = _sourceSurface; - if ((_destSpriteY >= _vm->_video->_splitHeight1) && - ((_destSurface == 20) || (_destSurface == 21))) { - - if (_vm->_video->_splitHeight1 < _vm->_height) { - _destSpriteY = (_destSpriteY - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; + if (_vm->_video->_splitSurf && ((_destSurface == 20) || (_destSurface == 21))) { + if ((_destSpriteY >= _vm->_video->_splitStart)) { + _destSpriteY -= _vm->_video->_splitStart; if ((operation == DRAW_DRAWLINE) || ((operation >= DRAW_DRAWBAR) && (operation <= DRAW_FILLRECTABS))) - _spriteBottom = (_spriteBottom - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; + _spriteBottom -= _vm->_video->_splitStart; + + _destSurface += 4; } - } + if ((_spriteTop >= _vm->_video->_splitStart) && (operation == DRAW_BLITSURF)) { + _spriteTop -= _vm->_video->_splitStart; + if (_destSurface < 24) + _destSurface += 4; + } - if ((_spriteTop >= _vm->_video->_splitHeight1) && (operation == DRAW_BLITSURF) && - ((_destSurface == 20) || (_destSurface == 21))) - if (_vm->_video->_splitHeight1 < _vm->_height) - _spriteTop = (_spriteTop - _vm->_video->_splitHeight1) + _vm->_video->_splitStart; + } adjustCoords(0, &_destSpriteX, &_destSpriteY); if ((operation != DRAW_LOADSPRITE) && (_needAdjust != 2)) { diff --git a/engines/gob/inter.h b/engines/gob/inter.h index 582e57a2d4..e43cb4e891 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -519,6 +519,7 @@ protected: virtual const char *getOpcodeFuncDesc(byte i, byte j); virtual const char *getOpcodeGoblinDesc(int i); + void o4_initScreen(); void o4_playVmdOrMusic(); }; diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 0e2a6c607e..6b7607791e 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1433,49 +1433,17 @@ void Inter_v2::o2_initScreen() { if (height > 0) _vm->_video->_surfHeight = height; - if (videoMode == 0x18) { + _vm->_video->_splitHeight1 = MIN(_vm->_height, _vm->_video->_surfHeight - offY); + _vm->_video->_splitHeight2 = offY; + _vm->_video->_splitStart = _vm->_video->_surfHeight - offY; - if (_vm->_video->_surfWidth < _vm->_width) - _vm->_video->_screenDeltaX = (_vm->_width - _vm->_video->_surfWidth) / 2; - else - _vm->_video->_screenDeltaX = 0; - - _vm->_global->_mouseMinX = _vm->_video->_screenDeltaX; - _vm->_global->_mouseMaxX = _vm->_video->_screenDeltaX + _vm->_video->_surfWidth - 1; - - - int16 screenHeight = _vm->_video->_surfHeight; + _vm->_video->_screenDeltaX = 0; + _vm->_video->_screenDeltaY = 0; - if (screenHeight < _vm->_height) { - _vm->_video->_surfHeight += offY; - _vm->_video->_splitStart = screenHeight; - } else - _vm->_video->_splitStart = screenHeight - offY; - - _vm->_video->_splitHeight1 = MIN(_vm->_height, screenHeight - offY); - _vm->_video->_splitHeight2 = offY; - - if ((_vm->_video->_surfHeight + offY) < _vm->_height) - _vm->_video->_screenDeltaY = (_vm->_height - (screenHeight + offY)) / 2; - else - _vm->_video->_screenDeltaY = 0; - - _vm->_global->_mouseMaxY = (screenHeight + _vm->_video->_screenDeltaY) - offY - 1; - _vm->_global->_mouseMinY = _vm->_video->_screenDeltaY; - - } else { - _vm->_video->_splitHeight1 = MIN(_vm->_height, _vm->_video->_surfHeight - offY); - _vm->_video->_splitHeight2 = offY; - _vm->_video->_splitStart = _vm->_video->_surfHeight - offY; - - _vm->_video->_screenDeltaX = 0; - _vm->_video->_screenDeltaY = 0; - - _vm->_global->_mouseMinX = 0; - _vm->_global->_mouseMinY = 0; - _vm->_global->_mouseMaxX = _vm->_width; - _vm->_global->_mouseMaxY = _vm->_height - _vm->_video->_splitHeight2 - 1; - } + _vm->_global->_mouseMinX = 0; + _vm->_global->_mouseMinY = 0; + _vm->_global->_mouseMaxX = _vm->_width; + _vm->_global->_mouseMaxY = _vm->_height - _vm->_video->_splitHeight2 - 1; _vm->_draw->closeScreen(); _vm->_util->clearPalette(); diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp index 920ca59f43..bc92fbf2b0 100644 --- a/engines/gob/inter_v4.cpp +++ b/engines/gob/inter_v4.cpp @@ -29,6 +29,7 @@ #include "gob/gob.h" #include "gob/inter.h" #include "gob/global.h" +#include "gob/draw.h" #include "gob/game.h" #include "gob/parse.h" #include "gob/videoplayer.h" @@ -279,7 +280,7 @@ void Inter_v4::setupOpcodes() { {NULL, ""}, {NULL, ""}, /* 80 */ - OPCODE(o2_initScreen), + OPCODE(o4_initScreen), OPCODE(o2_scroll), OPCODE(o2_setScrollOffset), OPCODE(o4_playVmdOrMusic), @@ -716,6 +717,85 @@ const char *Inter_v4::getOpcodeGoblinDesc(int i) { return ""; } +void Inter_v4::o4_initScreen() { + int16 offY; + int16 videoMode; + int16 width, height; + + offY = load16(); + + videoMode = offY & 0xFF; + offY = (offY >> 8) & 0xFF; + + width = _vm->_parse->parseValExpr(); + height = _vm->_parse->parseValExpr(); + + _vm->_video->clearScreen(); + + _vm->_global->_fakeVideoMode = videoMode; + + // Some versions require this + if (videoMode == 0xD) + videoMode = _vm->_mode; + + if ((videoMode == _vm->_global->_videoMode) && (width == -1)) + return; + + if (width > 0) + _vm->_video->_surfWidth = width; + if (height > 0) + _vm->_video->_surfHeight = height; + + _vm->_video->_screenDeltaX = 0; + if (_vm->_video->_surfWidth < _vm->_width) + _vm->_video->_screenDeltaX = (_vm->_width - _vm->_video->_surfWidth) / 2; + + _vm->_global->_mouseMinX = _vm->_video->_screenDeltaX; + _vm->_global->_mouseMaxX = _vm->_video->_screenDeltaX + _vm->_video->_surfWidth - 1; + + _vm->_video->_splitStart = _vm->_video->_surfHeight - offY; + + _vm->_video->_splitHeight1 = MIN(_vm->_height, _vm->_video->_surfHeight); + _vm->_video->_splitHeight2 = offY; + + if ((_vm->_video->_surfHeight + offY) < _vm->_height) + _vm->_video->_screenDeltaY = (_vm->_height - (_vm->_video->_surfHeight + offY)) / 2; + else + _vm->_video->_screenDeltaY = 0; + + _vm->_global->_mouseMaxY = (_vm->_video->_surfHeight + _vm->_video->_screenDeltaY) - offY - 1; + _vm->_global->_mouseMinY = _vm->_video->_screenDeltaY; + + _vm->_draw->closeScreen(); + _vm->_util->clearPalette(); + memset(_vm->_global->_redPalette, 0, 256); + memset(_vm->_global->_greenPalette, 0, 256); + memset(_vm->_global->_bluePalette, 0, 256); + + _vm->_global->_videoMode = videoMode; + _vm->_video->initPrimary(videoMode); + WRITE_VAR(15, _vm->_global->_fakeVideoMode); + + _vm->_global->_setAllPalette = true; + + _vm->_util->setMousePos(_vm->_global->_inter_mouseX, + _vm->_global->_inter_mouseY); + _vm->_util->clearPalette(); + + _vm->_draw->initScreen(); + + _vm->_util->setScrollOffset(); + + _vm->_video->_splitSurf = 0; + _vm->_draw->_spritesArray[24] = 0; + _vm->_draw->_spritesArray[25] = 0; + if (offY > 0) { + _vm->_draw->_spritesArray[24] = new SurfaceDesc(videoMode, _vm->_width, offY); + _vm->_draw->_spritesArray[25] = new SurfaceDesc(videoMode, _vm->_width, offY); + _vm->_video->_splitSurf = _vm->_draw->_spritesArray[25]; + } +} + void Inter_v4::o4_playVmdOrMusic() { char fileName[128]; int16 x, y; diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 3034a38079..d2fe979754 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -86,10 +86,14 @@ void SurfaceDesc::swap(SurfaceDesc &surf) { Video::Video(GobEngine *vm) : _vm(vm) { _doRangeClamp = false; _videoDriver = 0; + _surfWidth = 320; _surfHeight = 200; + _scrollOffsetX = 0; _scrollOffsetY = 0; + + _splitSurf = 0; _splitHeight1 = 200; _splitHeight2 = 0; _splitStart = 0; @@ -184,7 +188,19 @@ void Video::retrace(bool mouse) { g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + screenOffset, _surfWidth, screenX, screenY, screenWidth, screenHeight); - if (_splitHeight2 > 0) { + if (_splitSurf) { + + screenOffset = 0; + screenX = 0; + screenY = _vm->_height - _splitSurf->getHeight(); + screenWidth = MIN(_vm->_width, _splitSurf->getWidth()); + screenHeight = _splitSurf->getHeight(); + + g_system->copyRectToScreen(_splitSurf->getVidMem() + screenOffset, + _splitSurf->getWidth(), screenX, screenY, screenWidth, screenHeight); + + } else if (_splitHeight2 > 0) { + screenOffset = _splitStart * _surfWidth; screenX = 0; screenY = _vm->_height - _splitHeight2; @@ -193,6 +209,7 @@ void Video::retrace(bool mouse) { g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + screenOffset, _surfWidth, screenX, screenY, screenWidth, screenHeight); + } g_system->updateScreen(); -- cgit v1.2.3 From 7effbb5be4353ad522b9d911b144dcb40cf8b822 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 17 May 2008 23:58:40 +0000 Subject: Add another English version of Pajama Sam 1 and SPY Fox 1. svn-id: r32162 --- engines/scumm/detection_tables.h | 1 + engines/scumm/scumm-md5.h | 4 +++- tools/scumm-md5.txt | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 49ac5a18eb..474707ec55 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -642,6 +642,7 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "pajama", "Pajama Sam", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "pajama", "PajamaNHD", kGenHEPC, UNK_LANG, UNK, 0 }, { "pajama", "PJS-DEMO", kGenHEPC, UNK_LANG, UNK, 0 }, + { "pajama", "pjsam", kGenHEPC, UNK_LANG, UNK, 0 }, { "pajama", "PjSamDemo", kGenHEPC, UNK_LANG, UNK, 0 }, { "pajama", "PYJAMA", kGenHEPC, Common::DE_DEU, UNK, 0 }, { "pajama", "SAMDEMO", kGenHEPC, Common::FR_FRA, UNK, 0 }, diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 4c956a237b..45f721d119 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Wed May 14 19:23:43 2008 + This file was generated by the md5table tool on Sat May 17 23:57:19 2008 DO NOT EDIT MANUALLY! */ @@ -107,6 +107,7 @@ static const MD5Table md5table[] = { { "22c9eb04455440131ffc157aeb8d40a8", "fbear", "HE 70", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows }, { "22d07d6c386c9c25aca5dac2a0c0d94b", "maniac", "NES", "", 262144, Common::SE_SWE, Common::kPlatformNES }, { "22f4ea88a09da12df9308ba30bcb7d0f", "loom", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformPC }, + { "23394c8d29cc63c61313959431a12476", "spyfox", "HE 99", "", -1, Common::EN_ANY, Common::kPlatformWindows }, { "257f8c14d8c584f7ddd601bcb00920c7", "maniac", "NES", "", 262144, Common::DE_DEU, Common::kPlatformNES }, { "2723fea3dae0cb47768c424b145ae0e7", "tentacle", "", "Floppy", 7932, Common::EN_ANY, Common::kPlatformPC }, { "27b3a4224ad63d5b04627595c1c1a025", "zak", "V2", "V2", -1, Common::IT_ITA, Common::kPlatformAmiga }, @@ -300,6 +301,7 @@ static const MD5Table md5table[] = { { "771bc18ec6f93837b839c992b211904b", "monkey", "Demo", "EGA Demo", -1, Common::DE_DEU, Common::kPlatformPC }, { "77f5c9cc0986eb729c1a6b4c8823bbae", "zak", "FM-TOWNS", "Demo", 7520, Common::EN_ANY, Common::kPlatformFMTowns }, { "780e4a0ae2ff17dc296f4a79543b44f8", "puttmoon", "", "", -1, Common::UNK_LANG, Common::kPlatformPC }, + { "782393c5934ecd0b536eaf5fd541bd26", "pajama", "HE 99", "", -1, Common::EN_ANY, Common::kPlatformWindows }, { "78bd5f036ea35a878b74e4f47941f784", "freddi4", "HE 99", "", -1, Common::RU_RUS, Common::kPlatformWindows }, { "78c07ca088526d8d4446a4c2cb501203", "freddi3", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformUnknown }, { "7974365d3dc0f43a2748c975f91ff042", "monkey2", "", "", -1, Common::ES_ESP, Common::kPlatformPC }, diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt index 95e6cd3f3f..e607fe8990 100644 --- a/tools/scumm-md5.txt +++ b/tools/scumm-md5.txt @@ -575,6 +575,7 @@ pajama Pajama Sam 1: No Need to Hide When It's Dark Outside 1d7a2e1ddcade791e2de0cfceac86725 -1 fr All - - - gist974, ThierryFR 4fa6870d9bc8c313b65d54b1da5a1891 -1 nl Windows - - - joostp a095e33061606d231ff37dca4c64c8ac -1 de All HE 99 - - Joachim Eberhard + 782393c5934ecd0b536eaf5fd541bd26 -1 en Windows HE 99 - - Jonathan 898eaa21f79cf8d4f08db856244689ff 66505 en Windows HE 99 Updated - Joachim Eberhard 37aed3f91c1ef959e0bd265f9b13781f -1 us All HE 100 Updated - Kirben 4aa93cb30e485b728504ba3a693f12bf -1 ru Windows HE 100 - - sev @@ -757,6 +758,7 @@ spyfox SPY Fox 1: Dry Cereal a28135a7ade38cc0208b04507c46efd1 -1 de All HE 99 - - nachbarnebenan ee785fe2569bc9965526e774f7ab86f1 -1 fr Mac HE 99 - - ThierryFR 76b66b43e593ad4d2f1dfb5cc8f19700 -1 nl Windows HE 99 - - sugarcube + 23394c8d29cc63c61313959431a12476 -1 en Windows HE 99 - - Jonathan 72ac6bc980d5101c2142189d746bd62f -1 ru Windows HE 99 - - sev 3de99ef0523f8ca7958faa3afccd035a -1 us All HE 100 Updated - Kirben -- cgit v1.2.3 From 5d11b8f6ed93642404ec6c5bdf74fae59b39f57f Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 17 May 2008 23:59:56 +0000 Subject: Ooops, forget that one svn-id: r32163 --- engines/gob/video.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/engines/gob/video.h b/engines/gob/video.h index 1ab513205b..1338885588 100644 --- a/engines/gob/video.h +++ b/engines/gob/video.h @@ -98,13 +98,18 @@ public: }; bool _doRangeClamp; + int16 _surfWidth; int16 _surfHeight; + int16 _scrollOffsetX; int16 _scrollOffsetY; + + SurfaceDesc::Ptr _splitSurf; int16 _splitHeight1; int16 _splitHeight2; int16 _splitStart; + int16 _screenDeltaX; int16 _screenDeltaY; -- cgit v1.2.3 From 721b1ecc9afa235d7535c1b9fa1bca8374b49ab1 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 18 May 2008 02:51:54 +0000 Subject: Update HE version of another release of Pajama Sam 1 and SPY Fox 1. svn-id: r32165 --- engines/scumm/scumm-md5.h | 6 +++--- tools/scumm-md5.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 45f721d119..aa75952d12 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Sat May 17 23:57:19 2008 + This file was generated by the md5table tool on Sun May 18 02:50:38 2008 DO NOT EDIT MANUALLY! */ @@ -107,7 +107,7 @@ static const MD5Table md5table[] = { { "22c9eb04455440131ffc157aeb8d40a8", "fbear", "HE 70", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows }, { "22d07d6c386c9c25aca5dac2a0c0d94b", "maniac", "NES", "", 262144, Common::SE_SWE, Common::kPlatformNES }, { "22f4ea88a09da12df9308ba30bcb7d0f", "loom", "EGA", "EGA", -1, Common::EN_ANY, Common::kPlatformPC }, - { "23394c8d29cc63c61313959431a12476", "spyfox", "HE 99", "", -1, Common::EN_ANY, Common::kPlatformWindows }, + { "23394c8d29cc63c61313959431a12476", "spyfox", "HE 100", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows }, { "257f8c14d8c584f7ddd601bcb00920c7", "maniac", "NES", "", 262144, Common::DE_DEU, Common::kPlatformNES }, { "2723fea3dae0cb47768c424b145ae0e7", "tentacle", "", "Floppy", 7932, Common::EN_ANY, Common::kPlatformPC }, { "27b3a4224ad63d5b04627595c1c1a025", "zak", "V2", "V2", -1, Common::IT_ITA, Common::kPlatformAmiga }, @@ -301,7 +301,7 @@ static const MD5Table md5table[] = { { "771bc18ec6f93837b839c992b211904b", "monkey", "Demo", "EGA Demo", -1, Common::DE_DEU, Common::kPlatformPC }, { "77f5c9cc0986eb729c1a6b4c8823bbae", "zak", "FM-TOWNS", "Demo", 7520, Common::EN_ANY, Common::kPlatformFMTowns }, { "780e4a0ae2ff17dc296f4a79543b44f8", "puttmoon", "", "", -1, Common::UNK_LANG, Common::kPlatformPC }, - { "782393c5934ecd0b536eaf5fd541bd26", "pajama", "HE 99", "", -1, Common::EN_ANY, Common::kPlatformWindows }, + { "782393c5934ecd0b536eaf5fd541bd26", "pajama", "HE 100", "Updated", -1, Common::EN_ANY, Common::kPlatformWindows }, { "78bd5f036ea35a878b74e4f47941f784", "freddi4", "HE 99", "", -1, Common::RU_RUS, Common::kPlatformWindows }, { "78c07ca088526d8d4446a4c2cb501203", "freddi3", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformUnknown }, { "7974365d3dc0f43a2748c975f91ff042", "monkey2", "", "", -1, Common::ES_ESP, Common::kPlatformPC }, diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt index e607fe8990..07aa375b5a 100644 --- a/tools/scumm-md5.txt +++ b/tools/scumm-md5.txt @@ -575,9 +575,9 @@ pajama Pajama Sam 1: No Need to Hide When It's Dark Outside 1d7a2e1ddcade791e2de0cfceac86725 -1 fr All - - - gist974, ThierryFR 4fa6870d9bc8c313b65d54b1da5a1891 -1 nl Windows - - - joostp a095e33061606d231ff37dca4c64c8ac -1 de All HE 99 - - Joachim Eberhard - 782393c5934ecd0b536eaf5fd541bd26 -1 en Windows HE 99 - - Jonathan 898eaa21f79cf8d4f08db856244689ff 66505 en Windows HE 99 Updated - Joachim Eberhard 37aed3f91c1ef959e0bd265f9b13781f -1 us All HE 100 Updated - Kirben + 782393c5934ecd0b536eaf5fd541bd26 -1 en Windows HE 100 Updated - Jonathan 4aa93cb30e485b728504ba3a693f12bf -1 ru Windows HE 100 - - sev f237bf8a5ef9af78b2a6a4f3901da341 18354 en All - Demo - khalek, sev @@ -758,9 +758,9 @@ spyfox SPY Fox 1: Dry Cereal a28135a7ade38cc0208b04507c46efd1 -1 de All HE 99 - - nachbarnebenan ee785fe2569bc9965526e774f7ab86f1 -1 fr Mac HE 99 - - ThierryFR 76b66b43e593ad4d2f1dfb5cc8f19700 -1 nl Windows HE 99 - - sugarcube - 23394c8d29cc63c61313959431a12476 -1 en Windows HE 99 - - Jonathan 72ac6bc980d5101c2142189d746bd62f -1 ru Windows HE 99 - - sev 3de99ef0523f8ca7958faa3afccd035a -1 us All HE 100 Updated - Kirben + 23394c8d29cc63c61313959431a12476 -1 en Windows HE 100 Updated - Jonathan 53e94115b55dd51d4b8ff0871aa1df1e 20103 en All - Demo - khalek, sev fbdd947d21e8f5bac6d6f7a316af1c5a 15693 en All - Demo - sev -- cgit v1.2.3 From 1ea774e95f8ce0927a38aa0e5d467cc6ca82b78b Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 18 May 2008 08:04:12 +0000 Subject: Fixed fillRect opcode for HoF. svn-id: r32166 --- engines/kyra/kyra_hof.h | 1 + engines/kyra/kyra_lok.h | 3 ++- engines/kyra/kyra_v1.h | 1 - engines/kyra/script_hof.cpp | 9 ++++++++- engines/kyra/script_lok.cpp | 6 ++++++ engines/kyra/script_v1.cpp | 6 ------ 6 files changed, 17 insertions(+), 9 deletions(-) diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index fe4b6390b7..7f13ae6be1 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -742,6 +742,7 @@ protected: int o2_setDrawNoShapeFlag(EMCState *script); int o2_setRunFlag(EMCState *script); int o2_showLetter(EMCState *script); + int o2_fillRect(EMCState *script); int o2_playFireflyScore(EMCState *script); int o2_encodeShape(EMCState *script); int o2_defineSceneAnim(EMCState *script); diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index 2eee4f2f6e..679094cdf3 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -791,9 +791,10 @@ protected: int o1_pauseMusicSeconds(EMCState *script); int o1_resetMaskRegion(EMCState *script); int o1_setPaletteChangeFlag(EMCState *script); - int o1_dummy(EMCState *script); + int o1_fillRect(EMCState *script); int o1_vocUnload(EMCState *script); int o1_vocLoad(EMCState *script); + int o1_dummy(EMCState *script); }; } // end of namespace Kyra diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 81a6254c7f..742d7549c0 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -227,7 +227,6 @@ protected: int o1_getMouseState(EMCState *script); int o1_setDeathHandler(EMCState *script); int o1_playWanderScoreViaMap(EMCState *script); - int o1_fillRect(EMCState *script); int o1_blockInWalkableRegion(EMCState *script); int o1_blockOutWalkableRegion(EMCState *script); int o1_playSoundEffect(EMCState *script); diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index d2b6b08183..8408489ab0 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -838,6 +838,13 @@ int KyraEngine_HoF::o2_showLetter(EMCState *script) { return 0; } +int KyraEngine_HoF::o2_fillRect(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + _screen->fillRect(stackPos(1), stackPos(2), stackPos(1)+stackPos(3), stackPos(2)+stackPos(4), stackPos(5), stackPos(0)); + return 0; +} + + int KyraEngine_HoF::o2_playFireflyScore(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_playFireflyScore(%p) ()", (const void *)script); if (_sound->getSfxType() == Sound::kAdlib || _sound->getSfxType() == Sound::kMidiMT32 || _sound->getSfxType() == Sound::kMidiGM) { @@ -1624,7 +1631,7 @@ void KyraEngine_HoF::setupOpcodeTable() { Opcode(o2_setRunFlag); Opcode(o2_showLetter); OpcodeUnImpl(); - Opcode(o1_fillRect); + Opcode(o2_fillRect); // 0x68 OpcodeUnImpl(); OpcodeUnImpl(); diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index 670c7282e3..f31990cdc8 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -1706,6 +1706,12 @@ int KyraEngine_LoK::o1_setPaletteChangeFlag(EMCState *script) { return _paletteChanged; } +int KyraEngine_LoK::o1_fillRect(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + _screen->fillRect(stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(0)); + return 0; +} + int KyraEngine_LoK::o1_vocUnload(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_vocUnload(%p) ()", (const void *)script); // this should unload all voc files (not needed) diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index ce3b7ba050..4795263ff3 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -96,12 +96,6 @@ int KyraEngine_v1::o1_playWanderScoreViaMap(EMCState *script) { return 0; } -int KyraEngine_v1::o1_fillRect(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - screen()->fillRect(stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(0)); - return 0; -} - int KyraEngine_v1::o1_blockInWalkableRegion(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_blockInWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); screen()->blockInRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); -- cgit v1.2.3 From 0c81b70ba35c03b2d5a862eb4afb3f0eae28c9b8 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 18 May 2008 10:57:58 +0000 Subject: Rewrote the MADE script dumper, hopefully in a more efficient way svn-id: r32167 --- engines/made/script.cpp | 91 +++++++++++++++++----------------------------- engines/made/script.h | 2 +- engines/made/scriptfuncs.h | 1 + 3 files changed, 35 insertions(+), 59 deletions(-) diff --git a/engines/made/script.cpp b/engines/made/script.cpp index b14798bab6..d757a21b50 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -175,6 +175,9 @@ ScriptInterpreter::ScriptInterpreter(MadeEngine *vm) : _vm(vm) { _functions = new ScriptFunctions(_vm); _functions->setupExternalsTable(); + // set to true to dump scripts instead of parsing them + _dumpScripts = false; + #undef COMMAND } @@ -194,7 +197,7 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) { while (!_vm->_quit) { byte opcode = readByte(); if (opcode >= 1 && opcode <= _commandsMax) { - debug(4, "[%04X:%04X] opcode = %s", _runningScriptObjectIndex, (uint) (_codeIp - _codeBase), _commands[opcode - 1].desc); + debug(4, "[%04X:%04X] %s", _runningScriptObjectIndex, (uint) (_codeIp - _codeBase), _commands[opcode - 1].desc); (this->*_commands[opcode - 1].proc)(); } else { warning("ScriptInterpreter::runScript(%d) Unknown opcode %02X", _runningScriptObjectIndex, opcode); @@ -202,61 +205,6 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) { } } -void ScriptInterpreter::dumpScript(int16 scriptObjectIndex) { - _codeBase = _vm->_dat->getObject(scriptObjectIndex)->getData(); - _codeIp = _codeBase; - int16 val = 0; - - // TODO: script size - while (true) { - byte opcode = readByte(); - if (opcode >= 1 && opcode <= _commandsMax) { - printf("[%04X:%04X] %s\n", _runningScriptObjectIndex, (uint) (_codeIp - _codeBase), _commands[opcode - 1].desc); - //(this->*_commands[opcode - 1].proc)(); - - // Handle command data - if (!strcmp(_commands[opcode - 1].desc, "cmd_branchTrue") || - !strcmp(_commands[opcode - 1].desc, "cmd_branchFalse") || - !strcmp(_commands[opcode - 1].desc, "cmd_branch")) { - val = readInt16(); - printf("Offset = %04X\n", val); - } else if (!strcmp(_commands[opcode - 1].desc, "cmd_loadConstant")) { - val = readInt16(); - printf("Constant = %04X\n", val); - } else if (!strcmp(_commands[opcode - 1].desc, "cmd_loadVariable")) { - val = readInt16(); - printf("Variable = %04X\n", val); - } else if (!strcmp(_commands[opcode - 1].desc, "cmd_set")) { - val = readInt16(); - printf("Variable = %04X\n", val); - } else if (!strcmp(_commands[opcode - 1].desc, "cmd_call")) { - /*byte argc = */readByte(); - // TODO - printf("TODO\n"); - } else if (!strcmp(_commands[opcode - 1].desc, "cmd_arg") || - !strcmp(_commands[opcode - 1].desc, "cmd_aset") || - !strcmp(_commands[opcode - 1].desc, "cmd_tmp") || - !strcmp(_commands[opcode - 1].desc, "cmd_tset") || - !strcmp(_commands[opcode - 1].desc, "cmd_tspace")) { - val = readByte(); - printf("argIndex = %d\n", val); - } else if (!strcmp(_commands[opcode - 1].desc, "cmd_send")) { - /*byte argc = */readByte(); - // TODO - printf("TODO\n"); - } else if (!strcmp(_commands[opcode - 1].desc, "cmd_extend")) { - /*byte func = */readByte(); - - /*byte argc = */readByte(); - // TODO - printf("TODO\n"); - } - } else { - warning("ScriptInterpreter::runScript(%d) Unknown opcode %02X", _runningScriptObjectIndex, opcode); - } - } -} - byte ScriptInterpreter::readByte() { return *_codeIp++; } @@ -269,18 +217,27 @@ int16 ScriptInterpreter::readInt16() { } void ScriptInterpreter::cmd_branchTrue() { + if (_dumpScripts) + return; + int16 ofs = readInt16(); if (_stack.top() != 0) _codeIp = _codeBase + ofs; } void ScriptInterpreter::cmd_branchFalse() { + if (_dumpScripts) + return; + int16 ofs = readInt16(); if (_stack.top() == 0) _codeIp = _codeBase + ofs; } void ScriptInterpreter::cmd_branch() { + if (_dumpScripts) + return; + int16 ofs = readInt16(); _codeIp = _codeBase + ofs; } @@ -474,6 +431,9 @@ void ScriptInterpreter::cmd_return() { return; } + if (_dumpScripts) + return; + int16 funcResult = _stack.top(); _stack.setStackPos(_localStackPos); _localStackPos = kScriptStackLimit - _stack.pop(); @@ -489,6 +449,10 @@ void ScriptInterpreter::cmd_return() { void ScriptInterpreter::cmd_call() { debug(4, "\nENTER: stackPtr = %d; _localStackPos = %d", _stack.getStackPos(), _localStackPos); byte argc = readByte(); + + if (_dumpScripts) + return; + _stack.push(argc); _stack.push(_codeIp - _codeBase); _stack.push(_runningScriptObjectIndex); @@ -521,6 +485,9 @@ void ScriptInterpreter::cmd_yorn() { } void ScriptInterpreter::cmd_save() { + if (_dumpScripts) + return; + int16 result = 0; int16 stringOfs = _stack.top(); const char *filename = _vm->_dat->getString(stringOfs); @@ -529,6 +496,9 @@ void ScriptInterpreter::cmd_save() { } void ScriptInterpreter::cmd_restore() { + if (_dumpScripts) + return; + int16 result = 0; int16 stringOfs = _stack.top(); const char *filename = _vm->_dat->getString(stringOfs); @@ -603,6 +573,9 @@ void ScriptInterpreter::cmd_send() { debug(4, "argc = %d", argc); + if (_dumpScripts) + return; + _stack.push(argc); _stack.push(_codeIp - _codeBase); _stack.push(_runningScriptObjectIndex); @@ -645,11 +618,13 @@ void ScriptInterpreter::cmd_extend() { byte argc = readByte(); int16 *argv = _stack.getStackPtr(); - //debug(4, "func = %d (%s); argc = %d", func, extendFuncNames[func], argc); - debug(2, "func = %d; argc = %d", func, argc); + debug(4, "func = %d (%s); argc = %d", func, _functions->getFuncName(func), argc); for (int i = 0; i < argc; i++) debug(2, "argv[%02d] = %04X (%d)", i, argv[i], argv[i]); + if (_dumpScripts) + return; + int16 result = _functions->callFunction(func, argc, argv); debug(2, "result = %04X (%d)", result, result); diff --git a/engines/made/script.h b/engines/made/script.h index f2c49bd818..0ec43478ab 100644 --- a/engines/made/script.h +++ b/engines/made/script.h @@ -63,7 +63,6 @@ public: ScriptInterpreter(MadeEngine *vm); ~ScriptInterpreter(); void runScript(int16 scriptObjectIndex); - void dumpScript(int16 scriptObjectIndex); protected: MadeEngine *_vm; @@ -72,6 +71,7 @@ protected: int16 _runningScriptObjectIndex; byte *_codeBase, *_codeIp; bool _terminated; + bool _dumpScripts; ScriptFunctions *_functions; diff --git a/engines/made/scriptfuncs.h b/engines/made/scriptfuncs.h index 052856065e..2b0f15c7a2 100644 --- a/engines/made/scriptfuncs.h +++ b/engines/made/scriptfuncs.h @@ -53,6 +53,7 @@ public: return (*_externalFuncs[index])(argc, argv); } void setupExternalsTable(); + const char* getFuncName(int index) { return _externalFuncNames[index]; } protected: MadeEngine *_vm; Audio::SoundHandle _audioStreamHandle; -- cgit v1.2.3 From c72ac9916c4fec3328e0857ef59ee892dd753959 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 18 May 2008 13:03:03 +0000 Subject: Formatting. svn-id: r32168 --- engines/kyra/script_hof.cpp | 1 - engines/kyra/script_lok.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index 8408489ab0..df6ebb1bcb 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -844,7 +844,6 @@ int KyraEngine_HoF::o2_fillRect(EMCState *script) { return 0; } - int KyraEngine_HoF::o2_playFireflyScore(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_playFireflyScore(%p) ()", (const void *)script); if (_sound->getSfxType() == Sound::kAdlib || _sound->getSfxType() == Sound::kMidiMT32 || _sound->getSfxType() == Sound::kMidiGM) { diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index f31990cdc8..90353328ac 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -1706,7 +1706,7 @@ int KyraEngine_LoK::o1_setPaletteChangeFlag(EMCState *script) { return _paletteChanged; } -int KyraEngine_LoK::o1_fillRect(EMCState *script) { +int KyraEngine_LoK::o1_fillRect(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); _screen->fillRect(stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(0)); return 0; -- cgit v1.2.3 From fad7e1f3c11021f1656c1cee855d131b3373be16 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 18 May 2008 13:22:06 +0000 Subject: Reverted commit #32166. svn-id: r32170 --- engines/kyra/kyra_hof.h | 1 - engines/kyra/kyra_lok.h | 1 - engines/kyra/kyra_v1.h | 1 + engines/kyra/script_hof.cpp | 8 +------- engines/kyra/script_lok.cpp | 6 ------ engines/kyra/script_v1.cpp | 6 ++++++ 6 files changed, 8 insertions(+), 15 deletions(-) diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index 7f13ae6be1..fe4b6390b7 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -742,7 +742,6 @@ protected: int o2_setDrawNoShapeFlag(EMCState *script); int o2_setRunFlag(EMCState *script); int o2_showLetter(EMCState *script); - int o2_fillRect(EMCState *script); int o2_playFireflyScore(EMCState *script); int o2_encodeShape(EMCState *script); int o2_defineSceneAnim(EMCState *script); diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index 679094cdf3..d3e06c701f 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -791,7 +791,6 @@ protected: int o1_pauseMusicSeconds(EMCState *script); int o1_resetMaskRegion(EMCState *script); int o1_setPaletteChangeFlag(EMCState *script); - int o1_fillRect(EMCState *script); int o1_vocUnload(EMCState *script); int o1_vocLoad(EMCState *script); int o1_dummy(EMCState *script); diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 742d7549c0..81a6254c7f 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -227,6 +227,7 @@ protected: int o1_getMouseState(EMCState *script); int o1_setDeathHandler(EMCState *script); int o1_playWanderScoreViaMap(EMCState *script); + int o1_fillRect(EMCState *script); int o1_blockInWalkableRegion(EMCState *script); int o1_blockOutWalkableRegion(EMCState *script); int o1_playSoundEffect(EMCState *script); diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index df6ebb1bcb..d2b6b08183 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -838,12 +838,6 @@ int KyraEngine_HoF::o2_showLetter(EMCState *script) { return 0; } -int KyraEngine_HoF::o2_fillRect(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - _screen->fillRect(stackPos(1), stackPos(2), stackPos(1)+stackPos(3), stackPos(2)+stackPos(4), stackPos(5), stackPos(0)); - return 0; -} - int KyraEngine_HoF::o2_playFireflyScore(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_playFireflyScore(%p) ()", (const void *)script); if (_sound->getSfxType() == Sound::kAdlib || _sound->getSfxType() == Sound::kMidiMT32 || _sound->getSfxType() == Sound::kMidiGM) { @@ -1630,7 +1624,7 @@ void KyraEngine_HoF::setupOpcodeTable() { Opcode(o2_setRunFlag); Opcode(o2_showLetter); OpcodeUnImpl(); - Opcode(o2_fillRect); + Opcode(o1_fillRect); // 0x68 OpcodeUnImpl(); OpcodeUnImpl(); diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index 90353328ac..670c7282e3 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -1706,12 +1706,6 @@ int KyraEngine_LoK::o1_setPaletteChangeFlag(EMCState *script) { return _paletteChanged; } -int KyraEngine_LoK::o1_fillRect(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); - _screen->fillRect(stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(0)); - return 0; -} - int KyraEngine_LoK::o1_vocUnload(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_vocUnload(%p) ()", (const void *)script); // this should unload all voc files (not needed) diff --git a/engines/kyra/script_v1.cpp b/engines/kyra/script_v1.cpp index 4795263ff3..f74c7e3560 100644 --- a/engines/kyra/script_v1.cpp +++ b/engines/kyra/script_v1.cpp @@ -96,6 +96,12 @@ int KyraEngine_v1::o1_playWanderScoreViaMap(EMCState *script) { return 0; } +int KyraEngine_v1::o1_fillRect(EMCState *script) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_fillRect(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5)); + screen()->fillRect(stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(0)); + return 0; +} + int KyraEngine_v1::o1_blockInWalkableRegion(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_v1::o1_blockInWalkableRegion(%p) (%d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3)); screen()->blockInRegion(stackPos(0), stackPos(1), stackPos(2)-stackPos(0)+1, stackPos(3)-stackPos(1)+1); -- cgit v1.2.3 From d046175f1fb4cc834ed7452abbec67ffed67150c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 18 May 2008 14:50:41 +0000 Subject: Typos. svn-id: r32171 --- engines/kyra/staticres.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 7ba19e9966..224bdb509c 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -1554,7 +1554,7 @@ const char *KyraEngine_HoF::_languageExtension[] = { "ENG", "FRE", "GER",/*, - "ITA", Italian and Spanish was never included + "ITA", Italian and Spanish were never included "SPA"*/ "JPN" }; @@ -1563,7 +1563,7 @@ const char *KyraEngine_HoF::_scriptLangExt[] = { "EMC", "FMC", "GMC",/*, - "IMC", Italian and Spanish was never included + "IMC", Italian and Spanish were never included "SMC"*/ "JMC" }; @@ -1956,7 +1956,7 @@ const char *KyraEngine_MR::_languageExtension[] = { "TRE", "TRF", "TRG"/*, - "TRI", Italian and Spanish was never included + "TRI", Italian and Spanish were never included "TRS"*/ }; -- cgit v1.2.3 From 14c411e90b15ec2b889d103258abbf3aa026dd18 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 18 May 2008 15:02:01 +0000 Subject: Fixing the "meteor fragment and bluxtre pulp not drawn"-glitch by not closing the object video right when it finished playing through svn-id: r32172 --- engines/gob/mult_v2.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/gob/mult_v2.cpp b/engines/gob/mult_v2.cpp index ebbcf407c6..3a83ac1867 100644 --- a/engines/gob/mult_v2.cpp +++ b/engines/gob/mult_v2.cpp @@ -764,12 +764,14 @@ void Mult_v2::newCycleAnim(Mult_Object &animObj) { case 7: animData.frame--; animData.isPaused = 1; +/* if ((animData.animation < 0) && (animObj.videoSlot > 0)) { if (_vm->_vidPlayer->getFlags(animObj.videoSlot - 1) & 0x1000) { _vm->_vidPlayer->slotClose(animObj.videoSlot - 1); animObj.videoSlot = 0; } } +*/ break; case 10: -- cgit v1.2.3 From 8d0766f4f741df6d9c0a633c895fb158dac85f34 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 18 May 2008 17:20:59 +0000 Subject: Hack to disable 'depracted' warnings on OS X 10.5 svn-id: r32173 --- backends/midi/coreaudio.cpp | 11 +++++++++++ backends/midi/quicktime.cpp | 12 ++++++++++++ 2 files changed, 23 insertions(+) diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp index 8e00c24a1f..d7ab93a90a 100644 --- a/backends/midi/coreaudio.cpp +++ b/backends/midi/coreaudio.cpp @@ -24,6 +24,17 @@ #ifdef MACOSX +// HACK to disable deprecated warnings under Mac OS X 10.5. +// Apple depracted the AUGraphNewNode & AUGraphGetNodeInfo APIs +// in favor of the new AUGraphAddNode & AUGraphNodeInfo APIs. +// While it would be trivial to switch to those, this would break +// binary compatibility with all pre-10.5 systems, so we don't want +// to do that just now. Maybe when 10.6 comes... :) +#include +#undef DEPRECATED_ATTRIBUTE +#define DEPRECATED_ATTRIBUTE + + #include "common/config-manager.h" #include "common/util.h" #include "sound/midiplugin.h" diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp index b9b5ba93c4..63905212e6 100644 --- a/backends/midi/quicktime.cpp +++ b/backends/midi/quicktime.cpp @@ -24,6 +24,18 @@ #if defined(MACOSX) || defined(macintosh) +// HACK to disable deprecated warnings under Mac OS X 10.5. +// Apple depracted the complete QuickTime Music/MIDI API. +// Apps are supposed to use CoreAudio & CoreMIDI. We do support +// those, but while QT Midi support is still around, there is no +// reason to disable this driver. If they really ditch the API in 10.6, +// we can still release binaries with this driver disabled/removed. +#include +#undef DEPRECATED_ATTRIBUTE +#define DEPRECATED_ATTRIBUTE + + + #include "common/endian.h" #include "common/util.h" #include "sound/midiplugin.h" -- cgit v1.2.3 From 17874266bd540aed192e2a8f550b181d2bd4b8ad Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sun, 18 May 2008 20:14:28 +0000 Subject: add support for Kyra 1 Italian floppy (this fixes so called bug #1409244 - KYRA1: GFX problems with ITALIAN floppy) svn-id: r32175 --- dists/engine-data/kyra.dat | Bin 231823 -> 236767 bytes engines/kyra/gui_lok.cpp | 2 ++ engines/kyra/staticres.cpp | 2 +- tools/create_kyradat/create_kyradat.cpp | 11 ++++----- tools/create_kyradat/ita.h | 39 ++++++++++++++++++++++++++++++++ 5 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 tools/create_kyradat/ita.h diff --git a/dists/engine-data/kyra.dat b/dists/engine-data/kyra.dat index c1504ebba8..7171707e8b 100644 Binary files a/dists/engine-data/kyra.dat and b/dists/engine-data/kyra.dat differ diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp index 2b823b1ae7..6fa30c9e9a 100644 --- a/engines/kyra/gui_lok.cpp +++ b/engines/kyra/gui_lok.cpp @@ -337,6 +337,8 @@ void GUI_LoK::setGUILabels() { } else if (_vm->gameFlags().lang == Common::ES_ESP) { offsetOn = offsetMainMenu = offsetOptions = offset = -4; menuLabelGarbageOffset = 72; + } else if (_vm->gameFlags().lang == Common::IT_ITA) { + offsetOn = offsetMainMenu = offsetOptions = offset = 32; } else if (_vm->gameFlags().lang == Common::DE_DEU) { offset = offsetMainMenu = offsetOn = offsetOptions = 24; } else if (_vm->gameFlags().platform == Common::kPlatformFMTowns || _vm->gameFlags().platform == Common::kPlatformPC98) { diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 224bdb509c..e57a68c746 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -44,7 +44,7 @@ namespace Kyra { -#define RESFILE_VERSION 27 +#define RESFILE_VERSION 28 bool StaticResource::checkKyraDat() { Common::File kyraDat; diff --git a/tools/create_kyradat/create_kyradat.cpp b/tools/create_kyradat/create_kyradat.cpp index abd1d54570..173ba0f993 100644 --- a/tools/create_kyradat/create_kyradat.cpp +++ b/tools/create_kyradat/create_kyradat.cpp @@ -31,7 +31,7 @@ #include "md5.h" enum { - kKyraDatVersion = 27, + kKyraDatVersion = 28, kIndexSize = 12 }; @@ -42,6 +42,7 @@ enum { #include "esp.h" #include "fre.h" #include "ger.h" +#include "ita.h" #include "towns.h" #include "amiga.h" @@ -425,12 +426,9 @@ bool extractStrings(PAKFile &out, const Game *g, const byte *data, const uint32 continue; uint32 len = strlen((const char*) data + i); i += len; -#if 1 - // FIXME: Not sure whether this correct; the original code was ambiguious, see below + targetsize = targetsize - 1 - len; -#else - targetsize = --targetsize - len; // FIXME: This operation is undefined -#endif + while (!data[++i]) { if (i == len) break; @@ -1334,6 +1332,7 @@ const Game *gameDescs[] = { kyra1EspGames, kyra1FreGames, kyra1GerGames, + kyra1ItaGames, kyra1TownsGames, kyra1AmigaGames, kyra1FanTranslations, diff --git a/tools/create_kyradat/ita.h b/tools/create_kyradat/ita.h new file mode 100644 index 0000000000..6099f8f07d --- /dev/null +++ b/tools/create_kyradat/ita.h @@ -0,0 +1,39 @@ +const ExtractEntry kyra1ItaFloppy[] = { + { kKallakWritingSeq, 0x000304fa, 0x00030cef }, + { kMalcolmTreeSeq, 0x00030cef, 0x00030F05 }, + { kWestwoodLogoSeq, 0x00030F05, 0x00030F50 }, + { kKyrandiaLogoSeq, 0x00030F50, 0x00030FAC }, + { kKallakMalcolmSeq, 0x00030FAC, 0x00031217 }, + { kForestSeq, 0x00031217, 0x000313ac }, + { kIntroCPSStrings, 0x000313AC, 0x000313C0 }, + { kIntroWSAStrings, 0x000313C0, 0x00031440 }, + { kIntroCOLStrings, 0x00031440, 0x0003146B }, + { kIntroStrings, 0x0003146B, 0x000319E7 }, + { kItemNames, 0x000346DC, 0x00034C6D }, + { kTakenStrings, 0x00033F60, 0x00033F74 }, + { kPlacedStrings, 0x00033F74, 0x00033F81 }, + { kDroppedStrings, 0x00033FAA, 0x00033FB5 }, + { kNoDropStrings, 0x00033F1A, 0x00033F5F }, + { kPutDownString, 0x0002f120, 0x0002f154 }, + { kWaitAmuletString, 0x0002f154, 0x0002f19e }, + { kBlackJewelString, 0x0002f19e, 0x0002f1c0 }, + { kHealingTipString, 0x0002f1c0, 0x0002f1ff }, + { kPoisonGoneString, 0x0002f290, 0x0002f2c4 }, + { kThePoisonStrings, 0x0002ff20, 0x0002ff83 }, + { kFluteStrings, 0x000323ab, 0x000323f7 }, + { kWispJewelStrings, 0x0002f1ff, 0x0002f273 }, + { kMagicJewelStrings, 0x0002f273, 0x0002f290 }, + { kFlaskFullString, 0x00030059, 0x0003007a }, + { kFullFlaskString, 0x0002ffa4, 0x00030059 }, + { kOutroHomeString, 0x000320f2, 0x000320f7 }, + { kVeryCleverString, 0x0003204c, 0x00032084 }, + { kGUIStrings, 0x0002f434, 0x0002f659 }, + { kNewGameString, 0x00032ba6, 0x00032bc2 }, + { kConfigStrings, 0x0002fe9f, 0x0002fef3 }, + { -1, 0, 0 } +}; + +const Game kyra1ItaGames[] = { + { kKyra1, IT_ITA, -1, "5d7550306b369a3492f9f3402702477c", kyra1ItaFloppy }, + GAME_DUMMY_ENTRY +}; -- cgit v1.2.3 From 74311906f24fa22256fdb7520dfb1851ea3324ab Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 18 May 2008 21:11:19 +0000 Subject: Cleanup. svn-id: r32176 --- engines/kyra/kyra_lok.h | 3 --- engines/kyra/kyra_mr.cpp | 2 -- engines/kyra/kyra_v1.h | 5 +++++ engines/kyra/kyra_v2.cpp | 4 ++-- engines/kyra/kyra_v2.h | 2 -- engines/kyra/scene_lok.cpp | 12 ++++++------ engines/kyra/staticres.cpp | 14 +++----------- 7 files changed, 16 insertions(+), 26 deletions(-) diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index d3e06c701f..ad425eee8c 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -628,9 +628,6 @@ protected: int _cdaTrackTableSize; const AudioDataStruct * _soundData; - static const int8 _charXPosTable[]; - static const int8 _charYPosTable[]; - // positions of the inventory static const uint16 _itemPosX[]; static const uint8 _itemPosY[]; diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index 6e4d266480..c842e318ec 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -411,8 +411,6 @@ void KyraEngine_MR::playMenuAudioFile() { void KyraEngine_MR::snd_playWanderScoreViaMap(int track, int force) { debugC(9, kDebugLevelMain, "KyraEngine_MR::snd_playWanderScoreViaMap(%d, %d)", track, force); - // XXX byte_3C87C compare - if (_musicSoundChannel != -1 && !_soundDigital->isPlaying(_musicSoundChannel)) force = 1; else if (_musicSoundChannel == -1) diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 81a6254c7f..919d853dfb 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -263,6 +263,11 @@ protected: static const int8 _addXPosTable[]; static const int8 _addYPosTable[]; + // Character + + static const int8 _charAddXPosTable[]; + static const int8 _charAddYPosTable[]; + // save/load int _gameToLoad; diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 7b720259cc..e987496ddb 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -326,8 +326,8 @@ int KyraEngine_v2::updateCharPos(int *table, int force) { debugC(9, kDebugLevelMain, "KyraEngine_v2::updateCharPos(%p, %d)", (const void*)table, force); if (_updateCharPosNextUpdate > _system->getMillis() && !force) return 0; - _mainCharacter.x1 += _updateCharPosXTable[_mainCharacter.facing]; - _mainCharacter.y1 += _updateCharPosYTable[_mainCharacter.facing]; + _mainCharacter.x1 += _charAddXPosTable[_mainCharacter.facing]; + _mainCharacter.y1 += _charAddYPosTable[_mainCharacter.facing]; updateCharAnimFrame(0, table); _updateCharPosNextUpdate = _system->getMillis() + getCharacterWalkspeed() * _tickLength; return 1; diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index 2f6d8a6185..f75fd89234 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -355,8 +355,6 @@ protected: void updateCharPosWithUpdate(); uint32 _updateCharPosNextUpdate; - static const int8 _updateCharPosXTable[]; - static const int8 _updateCharPosYTable[]; virtual int getCharacterWalkspeed() const = 0; virtual void updateCharAnimFrame(int num, int *table) = 0; diff --git a/engines/kyra/scene_lok.cpp b/engines/kyra/scene_lok.cpp index 085332b525..e4ae67f751 100644 --- a/engines/kyra/scene_lok.cpp +++ b/engines/kyra/scene_lok.cpp @@ -295,13 +295,13 @@ int KyraEngine_LoK::setCharacterPosition(int character, int *facingTable) { debugC(9, kDebugLevelMain, "KyraEngine_LoK::setCharacterPosition(%d, %p)", character, (const void *)facingTable); if (character == 0) { - _currentCharacter->x1 += _charXPosTable[_currentCharacter->facing]; - _currentCharacter->y1 += _charYPosTable[_currentCharacter->facing]; + _currentCharacter->x1 += _charAddXPosTable[_currentCharacter->facing]; + _currentCharacter->y1 += _charAddYPosTable[_currentCharacter->facing]; setCharacterPositionHelper(0, facingTable); return 1; } else { - _characterList[character].x1 += _charXPosTable[_characterList[character].facing]; - _characterList[character].y1 += _charYPosTable[_characterList[character].facing]; + _characterList[character].x1 += _charAddXPosTable[_characterList[character].facing]; + _characterList[character].y1 += _charAddYPosTable[_characterList[character].facing]; if (_characterList[character].sceneId == _currentCharacter->sceneId) setCharacterPositionHelper(character, 0); } @@ -1009,8 +1009,8 @@ int KyraEngine_LoK::changeScene(int facing) { return 0; } - int xpos = _charXPosTable[facing] + _currentCharacter->x1; - int ypos = _charYPosTable[facing] + _currentCharacter->y1; + int xpos = _charAddXPosTable[facing] + _currentCharacter->x1; + int ypos = _charAddYPosTable[facing] + _currentCharacter->y1; if (xpos >= 12 && xpos <= 308) { if (!lineIsPassable(xpos, ypos)) diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index e57a68c746..42d1e6b0df 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -1281,7 +1281,7 @@ void KyraEngine_HoF::initStaticResource() { &KyraEngine_HoF::seq_introLibrary2, &KyraEngine_HoF::seq_introLibrary2, &KyraEngine_HoF::seq_introMarco, &KyraEngine_HoF::seq_introHand1a, &KyraEngine_HoF::seq_introHand1b, &KyraEngine_HoF::seq_introHand1c, - &KyraEngine_HoF::seq_introHand2, &KyraEngine_HoF::seq_introHand3, 0 + &KyraEngine_HoF::seq_introHand2, &KyraEngine_HoF::seq_introHand3, 0 }; static const SeqProc hofDemoSequenceCallbacks[] = { @@ -1363,11 +1363,11 @@ const int8 KyraEngine_v1::_addYPosTable[] = { 0, -2, -2, -2, 0, 2, 2, 2 }; -const int8 KyraEngine_LoK::_charXPosTable[] = { +const int8 KyraEngine_v1::_charAddXPosTable[] = { 0, 4, 4, 4, 0, -4, -4, -4 }; -const int8 KyraEngine_LoK::_charYPosTable[] = { +const int8 KyraEngine_v1::_charAddYPosTable[] = { -2, -2, 0, 2, 2, 2, 0, -2 }; @@ -1534,14 +1534,6 @@ const int KyraEngine_LoK::_dosTrackMapSize = ARRAYSIZE(KyraEngine_LoK::_dosTrack // kyra engine v2 static data -const int8 KyraEngine_v2::_updateCharPosXTable[] = { - 0, 4, 4, 4, 0, -4, -4, -4 -}; - -const int8 KyraEngine_v2::_updateCharPosYTable[] = { - -2, -2, 0, 2, 2, 2, 0, -2 -}; - const int GUI_v2::_sliderBarsPosition[] = { 0x92, 0x1F, 0x92, 0x30, 0x92, 0x41, 0x92, 0x52 }; -- cgit v1.2.3 From 91b22e588652a48866ee283779f1613e4d0f093b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 18 May 2008 22:33:41 +0000 Subject: Fix for bug #1940063 (MONKEY: Crash during the marriage lechuck/marley) -- regression was introduced by rev 28167 -- rule of thumb, if you add game specific code, make it game specifc ... ;) svn-id: r32177 --- engines/scumm/charset.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index 46d034d880..bc10d73519 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -400,7 +400,8 @@ int CharsetRenderer::getStringWidth(int arg, const byte *text) { // Some localizations may override colors // See credits in Chinese COMI - if (chr == '^' && pos == 1) { + if (_vm->_game.id == GID_CMI && _vm->_language == Common::ZH_TWN + && chr == '^' && pos == 1) { if (text[pos] == 'c') { pos += 4; chr = text[pos++]; -- cgit v1.2.3 From df58a64ce04091e36ae751a3db3aeb4db06c6ea6 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 19 May 2008 13:13:41 +0000 Subject: Removed some dead code svn-id: r32178 --- common/system.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/common/system.cpp b/common/system.cpp index 9334185d05..5510bb59ec 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -130,8 +130,6 @@ void OSystem::clearScreen() { */ #if defined(__DS__) #include "backends/fs/ds/ds-fs-factory.h" -#elif defined(__GP32__) - #include "backends/fs/gp32/gp32-fs-factory.h" #elif defined(PALMOS_MODE) #include "backends/fs/palmos/palmos-fs-factory.h" #elif defined(__PLAYSTATION2__) @@ -144,8 +142,6 @@ FilesystemFactory *OSystem::getFilesystemFactory() { return 0; #elif defined(__DS__) return &DSFilesystemFactory::instance(); - #elif defined(__GP32__) - return &GP32FilesystemFactory::instance(); #elif defined(PALMOS_MODE) return &PalmOSFilesystemFactory::instance(); #elif defined(__PLAYSTATION2__) -- cgit v1.2.3 From ecf9d72ab4cc275ba0b4571407d1a50217152a38 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 19 May 2008 13:15:32 +0000 Subject: Removed some more obsolete GP32 code svn-id: r32179 --- common/util.cpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/common/util.cpp b/common/util.cpp index 1f48a6ddd9..700ea97701 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -578,14 +578,8 @@ void NORETURN CDECL error(const char *s, ...) { // Print the error message to stderr -#ifdef __GP32__ - printf("ERROR: %s\n", buf_output); -#else fprintf(stderr, "%s!\n", buf_output); -#endif - -#ifndef __GP32__ // Unless this error -originated- within the debugger itself, we // now invoke the debugger, if available / supported. if (g_engine) { @@ -599,7 +593,6 @@ void NORETURN CDECL error(const char *s, ...) { debugger->onFrame(); } } -#endif #if defined( USE_WINDBG ) @@ -641,13 +634,10 @@ void CDECL warning(const char *s, ...) { vsnprintf(buf, STRINGBUFLEN, s, va); va_end(va); -#ifdef __GP32__ //ph0x FIXME: implement fprint? - printf("WARNING: %s\n", buf); -#else #if !defined (__SYMBIAN32__) fprintf(stderr, "WARNING: %s!\n", buf); #endif -#endif + #if defined( USE_WINDBG ) strcat(buf, "\n"); #if defined( _WIN32_WCE ) -- cgit v1.2.3 From 460296f3602d35779664f2776cce7365829ccca8 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Mon, 19 May 2008 17:34:29 +0000 Subject: Restrict the remaining changes made in rev 28166 to chinese COMI svn-id: r32181 --- engines/scumm/charset.cpp | 6 +++--- engines/scumm/string.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engines/scumm/charset.cpp b/engines/scumm/charset.cpp index bc10d73519..8f3175f098 100644 --- a/engines/scumm/charset.cpp +++ b/engines/scumm/charset.cpp @@ -371,7 +371,7 @@ int CharsetRenderer::getStringWidth(int arg, const byte *text) { break; } } else { - if (chr == '@' && _vm->_language != Common::ZH_TWN) + if (chr == '@' && !(_vm->_game.id == GID_CMI && _vm->_language == Common::ZH_TWN)) continue; if (chr == 255 || (_vm->_game.version <= 6 && chr == 254)) { chr = text[pos++]; @@ -400,8 +400,8 @@ int CharsetRenderer::getStringWidth(int arg, const byte *text) { // Some localizations may override colors // See credits in Chinese COMI - if (_vm->_game.id == GID_CMI && _vm->_language == Common::ZH_TWN - && chr == '^' && pos == 1) { + if (_vm->_game.id == GID_CMI && _vm->_language == Common::ZH_TWN && + chr == '^' && pos == 1) { if (text[pos] == 'c') { pos += 4; chr = text[pos++]; diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index f42a803a3d..762bca12a9 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -174,11 +174,10 @@ void ScummEngine_v6::drawBlastTexts() { // Some localizations may override colors // See credits in Chinese COMI - if (c == '^' && (buf == _blastTextQueue[i].text + 1)) { - int color; - switch (*buf) { - case 'c': - color = buf[3] - '0' + 10 *(buf[2] - '0'); + if (_game.id == GID_CMI && _language == Common::ZH_TWN && + c == '^' && (buf == _blastTextQueue[i].text + 1)) { + if (*buf == 'c') { + int color = buf[3] - '0' + 10 *(buf[2] - '0'); _charset->setColor(color); buf += 4; @@ -1114,7 +1113,8 @@ int ScummEngine::convertMessageToString(const byte *msg, byte *dst, int dstSize) num += (_game.version == 8) ? 4 : 2; } } else { - if (!(chr == '@' && _game.heversion <= 71) || _language == Common::ZH_TWN) { + if (!(chr == '@' && _game.heversion <= 71) || + (_game.id == GID_CMI && _language == Common::ZH_TWN)) { *dst++ = chr; } } -- cgit v1.2.3 From cefff90ac61e95641950ae694e3334c1c344c32d Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 19 May 2008 19:34:55 +0000 Subject: RtZ: Fixed bug which caused PMV videos to look odd (noticeable in the intro movie) and optimized frame decompression code. svn-id: r32182 --- engines/made/graphics.cpp | 111 ++++++++++++++++++++++++++++++++++++++++++++- engines/made/graphics.h | 1 + engines/made/pmvplayer.cpp | 30 +++++++----- 3 files changed, 129 insertions(+), 13 deletions(-) diff --git a/engines/made/graphics.cpp b/engines/made/graphics.cpp index 081621ef18..76b39ed43a 100644 --- a/engines/made/graphics.cpp +++ b/engines/made/graphics.cpp @@ -47,7 +47,6 @@ void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, u byte *destPtr = (byte*)surface.getBasePtr(0, 0); - //byte lineBuf[320 * 4]; byte lineBuf[640 * 4]; byte bitBuf[40]; @@ -149,4 +148,114 @@ void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, u } +void decompressMovieImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, uint16 pixelOffs, uint16 maskOffs, uint16 lineSize) { + + uint16 width = surface.w; + uint16 height = surface.h; + uint16 bx = 0, by = 0, bw = ((width + 3) / 4) * 4; + + byte *cmdBuffer = source + cmdOffs; + byte *maskBuffer = source + maskOffs; + byte *pixelBuffer = source + pixelOffs; + + byte *destPtr = (byte*)surface.getBasePtr(0, 0); + + byte bitBuf[40]; + + int bitBufLastOfs = (((lineSize + 1) >> 1) << 1) - 2; + int bitBufLastCount = ((width + 3) >> 2) & 7; + if (bitBufLastCount == 0) + bitBufLastCount = 8; + + debug(1, "width = %d; bw = %d", width, bw); + + while (height > 0) { + + int drawDestOfs = 0; + + memcpy(bitBuf, cmdBuffer, lineSize); + cmdBuffer += lineSize; + + for (uint16 bitBufOfs = 0; bitBufOfs < lineSize; bitBufOfs += 2) { + + uint16 bits = READ_LE_UINT16(&bitBuf[bitBufOfs]); + + int bitCount; + if (bitBufOfs == bitBufLastOfs) + bitCount = bitBufLastCount; + else + bitCount = 8; + + for (int curCmd = 0; curCmd < bitCount; curCmd++) { + uint cmd = bits & 3; + bits >>= 2; + + byte pixels[4], block[16]; + uint32 mask; + + switch (cmd) { + + case 0: + pixels[0] = *pixelBuffer++; + for (int i = 0; i < 16; i++) + block[i] = pixels[0]; + break; + + case 1: + pixels[0] = *pixelBuffer++; + pixels[1] = *pixelBuffer++; + mask = READ_LE_UINT16(maskBuffer); + maskBuffer += 2; + for (int i = 0; i < 16; i++) { + block[i] = pixels[mask & 1]; + mask >>= 1; + } + break; + + case 2: + pixels[0] = *pixelBuffer++; + pixels[1] = *pixelBuffer++; + pixels[2] = *pixelBuffer++; + pixels[3] = *pixelBuffer++; + mask = READ_LE_UINT32(maskBuffer); + maskBuffer += 4; + for (int i = 0; i < 16; i++) { + block[i] = pixels[mask & 3]; + mask >>= 2; + } + break; + + case 3: + break; + + } + + if (cmd != 3) { + uint16 blockPos = 0; + uint32 maxW = MIN(4, surface.w - bx); + uint32 maxH = (MIN(4, surface.h - by) + by) * width; + for (uint32 yc = by * width; yc < maxH; yc += width) { + for (uint32 xc = 0; xc < maxW; xc++) { + destPtr[(bx + xc) + yc] = block[xc + blockPos]; + } + blockPos += 4; + } + } + + bx += 4; + if (bx >= bw) { + bx = 0; + by += 4; + } + + } + + } + + height -= 4; + + } + +} + } // End of namespace Made diff --git a/engines/made/graphics.h b/engines/made/graphics.h index 3c56bb4231..31c747a89b 100644 --- a/engines/made/graphics.h +++ b/engines/made/graphics.h @@ -34,6 +34,7 @@ namespace Made { void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, uint16 pixelOffs, uint16 maskOffs, uint16 lineSize, bool deltaFrame = false); +void decompressMovieImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, uint16 pixelOffs, uint16 maskOffs, uint16 lineSize); } // End of namespace Made diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index db56235a67..8180758d61 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -74,7 +74,7 @@ void PmvPlayer::play(const char *filename) { uint32 frameCount = 0; uint16 chunkCount = 0; uint32 soundSize = 0; - uint32 palChunkOfs = 0; + uint32 soundChunkOfs = 0, palChunkOfs = 0; uint32 palSize = 0; byte *frameData, *audioData, *soundData, *palData, *imageData; bool firstTime = true; @@ -100,23 +100,29 @@ void PmvPlayer::play(const char *filename) { frameData = new byte[chunkSize]; _fd->read(frameData, chunkSize); + + soundChunkOfs = READ_LE_UINT32(frameData + 8); + palChunkOfs = READ_LE_UINT32(frameData + 16); // Handle audio - audioData = frameData + READ_LE_UINT32(frameData + 8) - 8; - chunkSize = READ_LE_UINT16(audioData + 4); - chunkCount = READ_LE_UINT16(audioData + 6); + if (soundChunkOfs) { + + audioData = frameData + soundChunkOfs - 8; + chunkSize = READ_LE_UINT16(audioData + 4); + chunkCount = READ_LE_UINT16(audioData + 6); - if (chunkCount > 50) break; // FIXME: this is a hack + debug(1, "chunkCount = %d; chunkSize = %d; total = %d\n", chunkCount, chunkSize, chunkCount * chunkSize); - debug(1, "chunkCount = %d; chunkSize = %d; total = %d\n", chunkCount, chunkSize, chunkCount * chunkSize); + if (chunkCount > 50) break; // FIXME: this is a hack - soundSize = chunkCount * chunkSize; - soundData = new byte[soundSize]; - decompressSound(audioData + 8, soundData, chunkSize, chunkCount); - _audioStream->queueBuffer(soundData, soundSize); + soundSize = chunkCount * chunkSize; + soundData = new byte[soundSize]; + decompressSound(audioData + 8, soundData, chunkSize, chunkCount); + _audioStream->queueBuffer(soundData, soundSize); + + } // Handle palette - palChunkOfs = READ_LE_UINT32(frameData + 16); if (palChunkOfs) { palData = frameData + palChunkOfs - 8; palSize = READ_LE_UINT32(palData + 4); @@ -143,7 +149,7 @@ void PmvPlayer::play(const char *filename) { _surface->create(width, height, 1); } - decompressImage(imageData, *_surface, cmdOffs, pixelOffs, maskOffs, lineSize, frameNum > 0); + decompressMovieImage(imageData, *_surface, cmdOffs, pixelOffs, maskOffs, lineSize); if (firstTime) { _mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, _audioStream); -- cgit v1.2.3 From 75fcf38933eed3152d143298cbc46152fa37609d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 19 May 2008 20:48:31 +0000 Subject: Fix for bug #1967311 "KYRA3: Word-wrapping is slightly buggy". svn-id: r32183 --- engines/kyra/text_mr.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/kyra/text_mr.cpp b/engines/kyra/text_mr.cpp index 13b37fa77a..4e997d19bc 100644 --- a/engines/kyra/text_mr.cpp +++ b/engines/kyra/text_mr.cpp @@ -55,25 +55,25 @@ char *TextDisplayer_MR::preprocessString(const char *str) { int count = 0, offs = 0; if (textWidth > (3*maxTextWidth)) { count = getCharLength(p, textWidth/4); - offs = dropCRIntoString(p, getCharLength(p, maxTextWidth), count); + offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth)); p += count + offs; - } - + } + if (textWidth > (2*maxTextWidth)) { count = getCharLength(p, textWidth/3); - offs = dropCRIntoString(p, getCharLength(p, maxTextWidth), count); + offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth)); p += count + offs; textWidth = _screen->getTextWidth(p); } count = getCharLength(p, textWidth/2); - offs = dropCRIntoString(p, getCharLength(p, maxTextWidth), count); + offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth)); p += count + offs; textWidth = _screen->getTextWidth(p); if (textWidth > maxTextWidth) { count = getCharLength(p, textWidth/2); - offs = dropCRIntoString(p, getCharLength(p, maxTextWidth), count); + offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth)); } } -- cgit v1.2.3 From 75ee4aabda4e3c66ccda5a38f41873d285f26112 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 19 May 2008 20:50:16 +0000 Subject: Added a comment to TextDisplayer_MR::preprocessString. svn-id: r32184 --- engines/kyra/text_mr.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/kyra/text_mr.cpp b/engines/kyra/text_mr.cpp index 4e997d19bc..0894f73bd4 100644 --- a/engines/kyra/text_mr.cpp +++ b/engines/kyra/text_mr.cpp @@ -57,6 +57,7 @@ char *TextDisplayer_MR::preprocessString(const char *str) { count = getCharLength(p, textWidth/4); offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth)); p += count + offs; + // No update of textWidth here } if (textWidth > (2*maxTextWidth)) { -- cgit v1.2.3 From b80d6aaf67902304872d4aad8369cdfa5cd7da21 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 19 May 2008 20:59:51 +0000 Subject: Fixed filename string in KyraEngine_MR::objectChat. svn-id: r32185 --- engines/kyra/text_mr.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/text_mr.cpp b/engines/kyra/text_mr.cpp index 0894f73bd4..16c56da099 100644 --- a/engines/kyra/text_mr.cpp +++ b/engines/kyra/text_mr.cpp @@ -233,7 +233,7 @@ void KyraEngine_MR::objectChat(const char *str, int object, int vocHigh, int voc "MTFR00S.EMC", "MTFR00Q.EMC", "MTFR00E.EMC", "MTFR00T.EMC", "MTL00S.EMC", "MTL00Q.EMC", "MTL00E.EMC", "MTL00T.EMC", "MTR00S.EMC", "MTR00Q.EMC", "MTR00E.EMC", "MTR00T.EMC", - "MTA00S.EMC", "MTA00Q.EMC", "MTA00Q.EMC", "MTA00T.EMC" + "MTA00S.EMC", "MTA00Q.EMC", "MTA00E.EMC", "MTA00T.EMC" }; int chat = talkScriptTable[chatType + _mainCharacter.facing * 4]; -- cgit v1.2.3 From 27a9108e36c69a76fe058441da7d655ad6920a93 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 19 May 2008 21:04:49 +0000 Subject: Fixed max text line length for French version in HoF. svn-id: r32186 --- engines/kyra/text_hof.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/engines/kyra/text_hof.cpp b/engines/kyra/text_hof.cpp index 0d40827390..dd587c5112 100644 --- a/engines/kyra/text_hof.cpp +++ b/engines/kyra/text_hof.cpp @@ -107,8 +107,7 @@ char *TextDisplayer_HoF::preprocessString(const char *str) { int textWidth = _screen->getTextWidth(p); _screen->_charWidth = 0; - // longer text strings for German versions - int maxTextWidth = (_vm->language() == 2 ? 240 : 176); + int maxTextWidth = (_vm->language() == 0) ? 176 : 240; if (textWidth > maxTextWidth) { if (textWidth > (maxTextWidth*2)) { -- cgit v1.2.3 From 7d28b651727580956005be732e35fc2cdd55500e Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 19 May 2008 21:22:59 +0000 Subject: Removed unused variable. svn-id: r32187 --- engines/made/graphics.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/engines/made/graphics.cpp b/engines/made/graphics.cpp index 76b39ed43a..4081f3ba92 100644 --- a/engines/made/graphics.cpp +++ b/engines/made/graphics.cpp @@ -171,8 +171,6 @@ void decompressMovieImage(byte *source, Graphics::Surface &surface, uint16 cmdOf while (height > 0) { - int drawDestOfs = 0; - memcpy(bitBuf, cmdBuffer, lineSize); cmdBuffer += lineSize; -- cgit v1.2.3 From 520af7d4bbe2dd2eb0f023e5d868e755b774350b Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 19 May 2008 21:32:37 +0000 Subject: RtZ: Fixed a bug where sounds were cut off prematurely. svn-id: r32188 --- engines/made/scriptfuncs.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index 2819f127ef..d5227ecbf5 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -188,7 +188,8 @@ int16 ScriptFunctions::sfClearScreen(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfShowPage(int16 argc, int16 *argv) { - _vm->_mixer->stopHandle(_audioStreamHandle); + if (_vm->getGameID() != GID_RTZ) + _vm->_mixer->stopHandle(_audioStreamHandle); _vm->_screen->show(); return 0; } -- cgit v1.2.3 From 815ca646e1eb81240cc36631238fb10d8dc95a4a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 19 May 2008 21:47:42 +0000 Subject: - Fixed out of bounds bug in KyraEngine_MR::updateItemAnimations - Clean up in KyraEngine_HoF::updateItemAnimations svn-id: r32189 --- engines/kyra/animator_hof.cpp | 2 +- engines/kyra/animator_mr.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp index 65f38cd961..c5d44d10af 100644 --- a/engines/kyra/animator_hof.cpp +++ b/engines/kyra/animator_hof.cpp @@ -128,7 +128,7 @@ void KyraEngine_HoF::updateItemAnimations() { const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem]; ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem]; - _nextAnimItem = ++_nextAnimItem % 14; + _nextAnimItem = ++_nextAnimItem % _itemAnimDataSize; uint32 ctime = _system->getMillis(); if (ctime < a->nextFrame) diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp index 212b4919dd..9702499fe7 100644 --- a/engines/kyra/animator_mr.cpp +++ b/engines/kyra/animator_mr.cpp @@ -205,7 +205,7 @@ void KyraEngine_MR::updateItemAnimations() { const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem]; ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem]; - _nextAnimItem = ++_nextAnimItem % 11; + _nextAnimItem = ++_nextAnimItem % 10; uint32 ctime = _system->getMillis(); if (ctime < a->nextFrame) -- cgit v1.2.3 From 5b5e5bfc62ba459b2c58a5dba9cb64a2fc4c7c2f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 19 May 2008 23:04:52 +0000 Subject: Fixed bug in KyraEngine_v2::directLinePassable. This should fix some pathfinder issues in HoF and MR. svn-id: r32190 --- engines/kyra/scene_v2.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/kyra/scene_v2.cpp b/engines/kyra/scene_v2.cpp index 7072cfc9a5..3bf81bfb39 100644 --- a/engines/kyra/scene_v2.cpp +++ b/engines/kyra/scene_v2.cpp @@ -98,7 +98,7 @@ int KyraEngine_v2::findWay(int x, int y, int toX, int toY, int *moveTable, int m temp = pathfinderInitPositionIndexTable(temp, x, y); pathfinderFinializePath(moveTable, temp, x, y, moveTableSize); usePostProcess = false; - } + } return usePostProcess ? size : getMoveTableSize(moveTable); } @@ -106,13 +106,14 @@ bool KyraEngine_v2::directLinePassable(int x, int y, int toX, int toY) { debugC(9, kDebugLevelMain, "KyraEngine_v2::directLinePassable(%d, %d, %d, %d)", x, y, toX, toY); Screen *scr = screen(); - while (x != toX && y != toY) { + while (x != toX || y != toY) { int facing = getFacingFromPointToPoint(x, y, toX, toY); x += _addXPosTable[facing]; y += _addYPosTable[facing]; if (!scr->getShapeFlag1(x, y)) return false; } + return true; } -- cgit v1.2.3 From 26d6e2c68aad953bbce7923d875320947fbef01a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 19 May 2008 23:22:11 +0000 Subject: Typo. svn-id: r32191 --- common/system.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/system.h b/common/system.h index d2844401b0..204ea9383a 100644 --- a/common/system.h +++ b/common/system.h @@ -662,7 +662,7 @@ public: * Move ("warp") the mouse cursor to the specified position in virtual * screen coordinates. * @param x the new x position of the mouse - * @param y the new x position of the mouse + * @param y the new y position of the mouse */ virtual void warpMouse(int x, int y) = 0; -- cgit v1.2.3 From 9f12f0c450806a0c2e251edfa6de357cce3d70f4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 20 May 2008 15:36:09 +0000 Subject: Move makeAdlibOPL inside the #include guards svn-id: r32193 --- sound/fmopl.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/fmopl.h b/sound/fmopl.h index cc2f967f25..890a2d1a56 100644 --- a/sound/fmopl.h +++ b/sound/fmopl.h @@ -167,7 +167,7 @@ int OPLTimerOver(FM_OPL *OPL, int c); void OPLWriteReg(FM_OPL *OPL, int r, int v); void YM3812UpdateOne(FM_OPL *OPL, int16 *buffer, int length); -#endif - // Factory method FM_OPL *makeAdlibOPL(int rate); + +#endif -- cgit v1.2.3 From 5204d012f6b059532f68e9c7330616989f95a380 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 20 May 2008 15:54:27 +0000 Subject: Add a tiny TODO entry for graphics scaler plugins svn-id: r32194 --- base/plugins.h | 1 + 1 file changed, 1 insertion(+) diff --git a/base/plugins.h b/base/plugins.h index d03a240922..20469e67bd 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -63,6 +63,7 @@ enum PluginType { PLUGIN_TYPE_ENGINE = 0, PLUGIN_TYPE_MIDI, + /* PLUGIN_TYPE_SCALER, */ // TODO: Add graphics scaler plugins PLUGIN_TYPE_MAX }; -- cgit v1.2.3 From cc08a4953d3cf1af0146b29c63f8f72803f1ca48 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 20 May 2008 16:37:32 +0000 Subject: Cleaned up engine debug level code. svn-id: r32195 --- common/util.cpp | 92 ++++++++++++++++++++++++++++------------------ common/util.h | 6 ++- engines/scumm/debugger.cpp | 28 +++++++------- gui/debugger.cpp | 6 +-- 4 files changed, 77 insertions(+), 55 deletions(-) diff --git a/common/util.cpp b/common/util.cpp index 700ea97701..6f0fdcb233 100644 --- a/common/util.cpp +++ b/common/util.cpp @@ -394,18 +394,40 @@ const char *getRenderModeDescription(RenderMode id) { #pragma mark - -static Array gDebugLevels; -static uint32 gDebugLevelsEnabled = 0; +namespace { + +DebugLevelContainer gDebugLevels; +uint32 gDebugLevelsEnabled = 0; + +struct DebugLevelSort { + bool operator()(const EngineDebugLevel &l, const EngineDebugLevel &r) { + return (l.option.compareToIgnoreCase(r.option) < 0); + } +}; + +struct DebugLevelSearch { + const String &_option; + + DebugLevelSearch(const String &option) : _option(option) {} + + bool operator()(const EngineDebugLevel &l) { + return _option.equalsIgnoreCase(l.option); + } +}; + +} bool addSpecialDebugLevel(uint32 level, const String &option, const String &description) { - for (uint i = 0; i < gDebugLevels.size(); ++i) { - if (!scumm_stricmp(option.c_str(), gDebugLevels[i].option.c_str())) { - warning("Declared engine debug level '%s' again", option.c_str()); - gDebugLevels[i] = EngineDebugLevel(level, option, description); - return true; - } + DebugLevelContainer::iterator i = find_if(gDebugLevels.begin(), gDebugLevels.end(), DebugLevelSearch(option)); + + if (i != gDebugLevels.end()) { + warning("Declared engine debug level '%s' again", option.c_str()); + *i = EngineDebugLevel(level, option, description); + } else { + gDebugLevels.push_back(EngineDebugLevel(level, option, description)); + sort(gDebugLevels.begin(), gDebugLevels.end(), DebugLevelSort()); } - gDebugLevels.push_back(EngineDebugLevel(level, option, description)); + return true; } @@ -415,43 +437,43 @@ void clearAllSpecialDebugLevels() { } bool enableSpecialDebugLevel(const String &option) { - for (uint i = 0; i < gDebugLevels.size(); ++i) { - if (!scumm_stricmp(option.c_str(), gDebugLevels[i].option.c_str())) { - gDebugLevelsEnabled |= gDebugLevels[i].level; - gDebugLevels[i].enabled = true; - return true; - } + DebugLevelContainer::iterator i = find_if(gDebugLevels.begin(), gDebugLevels.end(), DebugLevelSearch(option)); + + if (i != gDebugLevels.end()) { + gDebugLevelsEnabled |= i->level; + i->enabled = true; + + return true; + } else { + return false; } - return false; } void enableSpecialDebugLevelList(const String &option) { - uint start = 0; - uint end = 0; - - const char *str = option.c_str(); - for (end = start + 1; end <= option.size(); ++end) { - if (str[end] == ',' || end == option.size()) { - if (!enableSpecialDebugLevel(Common::String(&str[start], end-start))) { - warning("Engine does not support debug level '%s'", Common::String(&str[start], end-start).c_str()); - } - start = end + 1; - } + StringTokenizer tokenizer(option, " ,"); + String token; + + while (!tokenizer.empty()) { + token = tokenizer.nextToken(); + if (!enableSpecialDebugLevel(token)) + warning("Engine does not support debug level '%s'", token.c_str()); } } bool disableSpecialDebugLevel(const String &option) { - for (uint i = 0; i < gDebugLevels.size(); ++i) { - if (!scumm_stricmp(option.c_str(), gDebugLevels[i].option.c_str())) { - gDebugLevelsEnabled &= ~gDebugLevels[i].level; - gDebugLevels[i].enabled = false; - return true; - } + DebugLevelContainer::iterator i = find_if(gDebugLevels.begin(), gDebugLevels.end(), DebugLevelSearch(option)); + + if (i != gDebugLevels.end()) { + gDebugLevelsEnabled &= ~i->level; + i->enabled = false; + + return true; + } else { + return false; } - return false; } -const Array &listSpecialDebugLevels() { +const DebugLevelContainer &listSpecialDebugLevels() { return gDebugLevels; } diff --git a/common/util.h b/common/util.h index 1f680d28c1..c23513596c 100644 --- a/common/util.h +++ b/common/util.h @@ -27,7 +27,7 @@ #include "common/scummsys.h" #include "common/str.h" -#include "common/array.h" +#include "common/list.h" #ifdef MIN #undef MIN @@ -308,11 +308,13 @@ void enableSpecialDebugLevelList(const String &option); */ bool disableSpecialDebugLevel(const String &option); +typedef List DebugLevelContainer; + /** * Lists all debug levels * @return returns a arry with all debug levels */ -const Array &listSpecialDebugLevels(); +const DebugLevelContainer &listSpecialDebugLevels(); /** * Return the active debug flag mask (i.e. all active debug flags ORed diff --git a/engines/scumm/debugger.cpp b/engines/scumm/debugger.cpp index 954e400c2c..9f9115e207 100644 --- a/engines/scumm/debugger.cpp +++ b/engines/scumm/debugger.cpp @@ -498,25 +498,24 @@ bool ScummDebugger::Cmd_Object(int argc, const char **argv) { } bool ScummDebugger::Cmd_Debug(int argc, const char **argv) { - Common::Array lvls = Common::listSpecialDebugLevels(); + const Common::DebugLevelContainer &lvls = Common::listSpecialDebugLevels(); bool setFlag = false; // Remove or add debug channel? if ((argc == 1) && (Common::getEnabledSpecialDebugLevels() == 0)) { DebugPrintf("No debug flags are enabled\n"); DebugPrintf("Available Channels: "); - for (uint i = 0; i < lvls.size(); i++) { - DebugPrintf("%s, ", lvls[i].option.c_str()); + for (Common::DebugLevelContainer::iterator i = lvls.begin(); i != lvls.end(); ++i) { + DebugPrintf("%s, ", i->option.c_str()); } DebugPrintf("\n"); return true; } if ((argc == 1) && (Common::getEnabledSpecialDebugLevels() > 0)) { - for (uint i = 0; i < lvls.size(); i++) { - if (lvls[i].enabled) - DebugPrintf("%s - %s\n", lvls[i].option.c_str(), - lvls[i].description.c_str()); + for (Common::DebugLevelContainer::iterator i = lvls.begin(); i != lvls.end(); ++i) { + if (i->enabled) + DebugPrintf("%s - %s\n", i->option.c_str(), i->description.c_str()); } return true; } @@ -529,25 +528,24 @@ bool ScummDebugger::Cmd_Debug(int argc, const char **argv) { } else { DebugPrintf("Syntax: Debug +CHANNEL, or Debug -CHANNEL\n"); DebugPrintf("Available Channels: "); - for (uint i = 0; i < lvls.size(); i++) { - DebugPrintf("%s, ", lvls[i].option.c_str()); - DebugPrintf("\n"); + for (Common::DebugLevelContainer::iterator i = lvls.begin(); i != lvls.end(); ++i) { + DebugPrintf("%s\n", i->option.c_str()); } } // Identify flag const char *realFlag = argv[1] + 1; - for (uint i = 0; i < lvls.size(); i++) { - if ((scumm_stricmp(lvls[i].option.c_str(), realFlag)) == 0) { + for (Common::DebugLevelContainer::iterator i = lvls.begin(); i != lvls.end(); ++i) { + if (i->option.equalsIgnoreCase(realFlag)) { if (setFlag) { - enableSpecialDebugLevel(lvls[i].option); + enableSpecialDebugLevel(i->option); DebugPrintf("Enable "); } else { - disableSpecialDebugLevel(lvls[i].option); + disableSpecialDebugLevel(i->option); DebugPrintf("Disable "); } - DebugPrintf("%s\n", lvls[i].description.c_str()); + DebugPrintf("%s\n", i->description.c_str()); return true; } } diff --git a/gui/debugger.cpp b/gui/debugger.cpp index 99aebe9b62..87abe854be 100644 --- a/gui/debugger.cpp +++ b/gui/debugger.cpp @@ -406,7 +406,7 @@ bool Debugger::Cmd_Help(int argc, const char **argv) { } bool Debugger::Cmd_DebugFlagsList(int argc, const char **argv) { - const Common::Array &debugLevels = Common::listSpecialDebugLevels(); + const Common::DebugLevelContainer &debugLevels = Common::listSpecialDebugLevels(); DebugPrintf("Engine debug levels:\n"); DebugPrintf("--------------------\n"); @@ -414,8 +414,8 @@ bool Debugger::Cmd_DebugFlagsList(int argc, const char **argv) { DebugPrintf("No engine debug levels\n"); return true; } - for (uint i = 0; i < debugLevels.size(); ++i) { - DebugPrintf("'%s' - Description: %s\n", debugLevels[i].option.c_str(), debugLevels[i].description.c_str()); + for (Common::DebugLevelContainer::const_iterator i = debugLevels.begin(); i != debugLevels.end(); ++i) { + DebugPrintf("'%s' - Description: %s\n", i->option.c_str(), i->description.c_str()); } DebugPrintf("\n"); return true; -- cgit v1.2.3 From eb354bbe02572ea1b18084e424be54b7ad666bfc Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Tue, 20 May 2008 18:01:26 +0000 Subject: Implemented visual effects 10 and 12 svn-id: r32196 --- engines/made/screenfx.cpp | 28 +++++++++++++++++++++++++++- engines/made/screenfx.h | 2 ++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp index 532ac806e3..f573c13852 100644 --- a/engines/made/screenfx.cpp +++ b/engines/made/screenfx.cpp @@ -68,6 +68,14 @@ void ScreenEffects::run(int16 effectNum, Graphics::Surface *surface, byte *palet vfx09(surface, palette, newPalette, colorCount); break; + case 10: + vfx10(surface, palette, newPalette, colorCount); + break; + + case 12: + vfx12(surface, palette, newPalette, colorCount); + break; + case 14: // "Screen open" effect vfx14(surface, palette, newPalette, colorCount); break; @@ -108,7 +116,7 @@ void ScreenEffects::setBlendedPalette(byte *palette, byte *newPalette, int color if (!_screen->isPaletteLocked()) { int32 mulValue = (value * 64) / maxValue; for (int i = 0; i < colorCount * 3; i++) - _fxPalette[i] = newPalette[i] - (newPalette[i] - palette[i]) * mulValue / 64; + _fxPalette[i] = CLIP(newPalette[i] - (newPalette[i] - palette[i]) * mulValue / 64, 0, 255); _screen->setRGBPalette(_fxPalette, 0, 256); } } @@ -207,6 +215,24 @@ void ScreenEffects::vfx09(Graphics::Surface *surface, byte *palette, byte *newPa setPalette(palette); } +void ScreenEffects::vfx10(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { + for (int x = -56; x < 312; x += 8) { + copyRect(surface, x, 0, x + 64, 200); + setBlendedPalette(palette, newPalette, colorCount, x + 56, 368); + _screen->updateScreenAndWait(25); + } + setPalette(palette); +} + +void ScreenEffects::vfx12(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { + for (int y = -70; y < 312; y += 10) { + copyRect(surface, 0, y, 320, y + 80); + setBlendedPalette(palette, newPalette, colorCount, y + 70, 260); + _screen->updateScreenAndWait(25); + } + setPalette(palette); +} + // "Screen open" effect void ScreenEffects::vfx14(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { int16 x = 8, y = 5; diff --git a/engines/made/screenfx.h b/engines/made/screenfx.h index e1f877b42e..f0e706318f 100644 --- a/engines/made/screenfx.h +++ b/engines/made/screenfx.h @@ -54,6 +54,8 @@ private: void copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2); void vfx00(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx09(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); + void vfx10(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); + void vfx12(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx14(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx17(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); }; -- cgit v1.2.3 From e20abe228d2457a6d38c8f78b99926827bf2de00 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 20 May 2008 18:19:32 +0000 Subject: Silenced an MSVC warning svn-id: r32197 --- engines/made/screen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 20327c3acf..4802908c05 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -143,7 +143,7 @@ void Screen::setExcludeArea(uint16 x1, uint16 y1, uint16 x2, uint16 y2) { void Screen::drawSurface(Graphics::Surface *sourceSurface, int x, int y, int16 flipX, int16 flipY, int16 mask, const ClipInfo &clipInfo) { - byte *source, *dest, *maskp; + byte *source, *dest, *maskp = 0; int startX = 0; int startY = 0; int clipWidth = sourceSurface->w; -- cgit v1.2.3 From bf52cc2186375b7332ffa96f386f7aabbde4b26f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 20 May 2008 18:20:17 +0000 Subject: Clarification about the weird sound frequencies in PMV videos svn-id: r32198 --- engines/made/pmvplayer.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/engines/made/pmvplayer.cpp b/engines/made/pmvplayer.cpp index 8180758d61..1a8ca9c50a 100644 --- a/engines/made/pmvplayer.cpp +++ b/engines/made/pmvplayer.cpp @@ -48,12 +48,15 @@ void PmvPlayer::play(const char *filename) { readChunk(chunkType, chunkSize); // "MHED" // TODO: Evaluate header - //_fd->skip(0x3A); uint frameDelay = _fd->readUint16LE(); _fd->skip(10); uint soundFreq = _fd->readUint16LE(); - // FIXME: weird frequencies... (11127 or 22254) + // Note: There seem to be weird sound frequencies in PMV videos. + // Not sure why, but leaving those original frequencies intact + // results to sound being choppy. Therefore, we set them to more + // "common" values here (11025 instead of 11127 and 22050 instead + // of 22254) if (soundFreq == 11127) soundFreq = 11025; if (soundFreq == 22254) soundFreq = 22050; -- cgit v1.2.3 From 141215136f9d5277cce77dfdd03f2a49b4e38f3b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 20 May 2008 18:30:26 +0000 Subject: Documented what screen effects 10 and 12 are doing svn-id: r32199 --- engines/made/screenfx.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp index f573c13852..79017cc0fb 100644 --- a/engines/made/screenfx.cpp +++ b/engines/made/screenfx.cpp @@ -68,11 +68,11 @@ void ScreenEffects::run(int16 effectNum, Graphics::Surface *surface, byte *palet vfx09(surface, palette, newPalette, colorCount); break; - case 10: + case 10: // "Screen wipe in", left to right vfx10(surface, palette, newPalette, colorCount); break; - case 12: + case 12: // "Screen wipe in", top to bottom vfx12(surface, palette, newPalette, colorCount); break; @@ -215,6 +215,7 @@ void ScreenEffects::vfx09(Graphics::Surface *surface, byte *palette, byte *newPa setPalette(palette); } +// "Screen wipe in", left to right void ScreenEffects::vfx10(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int x = -56; x < 312; x += 8) { copyRect(surface, x, 0, x + 64, 200); @@ -224,6 +225,7 @@ void ScreenEffects::vfx10(Graphics::Surface *surface, byte *palette, byte *newPa setPalette(palette); } +// "Screen wipe in", top to bottom void ScreenEffects::vfx12(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int y = -70; y < 312; y += 10) { copyRect(surface, 0, y, 320, y + 80); -- cgit v1.2.3 From 970f7e7c937b9e809ee03acd8225b2142840430c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 20 May 2008 18:56:22 +0000 Subject: Some updates to the script dumper svn-id: r32200 --- engines/made/script.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/engines/made/script.cpp b/engines/made/script.cpp index d757a21b50..7d7ebc83cd 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -431,9 +431,6 @@ void ScriptInterpreter::cmd_return() { return; } - if (_dumpScripts) - return; - int16 funcResult = _stack.top(); _stack.setStackPos(_localStackPos); _localStackPos = kScriptStackLimit - _stack.pop(); @@ -450,9 +447,6 @@ void ScriptInterpreter::cmd_call() { debug(4, "\nENTER: stackPtr = %d; _localStackPos = %d", _stack.getStackPos(), _localStackPos); byte argc = readByte(); - if (_dumpScripts) - return; - _stack.push(argc); _stack.push(_codeIp - _codeBase); _stack.push(_runningScriptObjectIndex); @@ -573,9 +567,6 @@ void ScriptInterpreter::cmd_send() { debug(4, "argc = %d", argc); - if (_dumpScripts) - return; - _stack.push(argc); _stack.push(_codeIp - _codeBase); _stack.push(_runningScriptObjectIndex); -- cgit v1.2.3 From 11697c0eb24aed6c6997c1d6282b69ed3448b1e9 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Tue, 20 May 2008 19:56:49 +0000 Subject: Delete animation frames in AnimationResource destructor. svn-id: r32201 --- engines/made/resource.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp index 8c9125127a..8bda5e564b 100644 --- a/engines/made/resource.cpp +++ b/engines/made/resource.cpp @@ -94,7 +94,8 @@ AnimationResource::AnimationResource() { } AnimationResource::~AnimationResource() { - // TODO: Free anim frames + for (uint i = 0; i < _frames.size(); i++) + delete _frames[i]; } void AnimationResource::load(byte *source, int size) { -- cgit v1.2.3 From 828a217a03038673dfbd0f88a80f78832b55d872 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Tue, 20 May 2008 20:00:10 +0000 Subject: - Implemented "stand-alone" script dumper/disassembler; it can be enabled by defining DUMP_SCRIPTS in script.h and starting with at least debug level 1. - Commented which script opcodes and extended functions are actually used or not. svn-id: r32202 --- engines/made/database.h | 2 + engines/made/made.cpp | 5 + engines/made/script.cpp | 281 ++++++++++++++++++++++++++++++------------- engines/made/script.h | 11 +- engines/made/scriptfuncs.cpp | 21 +++- engines/made/scriptfuncs.h | 1 + 6 files changed, 237 insertions(+), 84 deletions(-) diff --git a/engines/made/database.h b/engines/made/database.h index 50e37d6936..0924200374 100644 --- a/engines/made/database.h +++ b/engines/made/database.h @@ -95,6 +95,8 @@ public: return NULL; } + uint getObjectCount() const { return _objects.size(); } + int16 getMainCodeObjectIndex() const { return _mainCodeObjectIndex; } int16 getVar(int16 index); diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 4ec857547b..76482b03bb 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -206,7 +206,12 @@ int MadeEngine::go() { } _eventKey = _eventMouseX = _eventMouseY = 0; + +#ifdef DUMP_SCRIPTS + _script->dumpAllScripts(); +#else _script->runScript(_dat->getMainCodeObjectIndex()); +#endif return 0; } diff --git a/engines/made/script.cpp b/engines/made/script.cpp index 7d7ebc83cd..6b736e321b 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -91,83 +91,87 @@ int16 *ScriptStack::getStackPtr() { /* ScriptInterpreter */ ScriptInterpreter::ScriptInterpreter(MadeEngine *vm) : _vm(vm) { -#define COMMAND(x) { &ScriptInterpreter::x, #x } +#ifdef DUMP_SCRIPTS +#define COMMAND(x, sig) { &ScriptInterpreter::x, #x, sig } +#else +#define COMMAND(x, sig) { &ScriptInterpreter::x, #x} +#endif static CommandEntry commandProcs[] = { /* 01 */ - COMMAND(cmd_branchTrue), - COMMAND(cmd_branchFalse), - COMMAND(cmd_branch), - COMMAND(cmd_true), + COMMAND(cmd_branchTrue, "W"), + COMMAND(cmd_branchFalse, "W"), + COMMAND(cmd_branch, "W"), + COMMAND(cmd_true, ""), /* 05 */ - COMMAND(cmd_false), - COMMAND(cmd_push), - COMMAND(cmd_not), - COMMAND(cmd_add), + COMMAND(cmd_false, ""), + COMMAND(cmd_push, ""), + COMMAND(cmd_not, ""), + COMMAND(cmd_add, ""), /* 09 */ - COMMAND(cmd_sub), - COMMAND(cmd_mul), - COMMAND(cmd_div), - COMMAND(cmd_mod), + COMMAND(cmd_sub, ""), + COMMAND(cmd_mul, ""), + COMMAND(cmd_div, ""), + COMMAND(cmd_mod, ""), /* 13 */ - COMMAND(cmd_band), - COMMAND(cmd_bor), - COMMAND(cmd_bnot), - COMMAND(cmd_lt), + COMMAND(cmd_band, ""), + COMMAND(cmd_bor, ""), + COMMAND(cmd_bnot, ""), + COMMAND(cmd_lt, ""), /* 17 */ - COMMAND(cmd_eq), - COMMAND(cmd_gt), - COMMAND(cmd_loadConstant), - COMMAND(cmd_loadVariable), + COMMAND(cmd_eq, ""), + COMMAND(cmd_gt, ""), + COMMAND(cmd_loadConstant, "w"), + COMMAND(cmd_loadVariable, "w"), /* 21 */ - COMMAND(cmd_getObjectProperty), - COMMAND(cmd_setObjectProperty), - COMMAND(cmd_set), - COMMAND(cmd_print), + COMMAND(cmd_getObjectProperty, ""), + COMMAND(cmd_setObjectProperty, ""), + COMMAND(cmd_set, "w"), + COMMAND(cmd_print, ""), /* 25 */ - COMMAND(cmd_terpri), - COMMAND(cmd_printNumber), - COMMAND(cmd_vref), - COMMAND(cmd_vset), + COMMAND(cmd_terpri, ""), + COMMAND(cmd_printNumber, ""), + COMMAND(cmd_vref, ""), + COMMAND(cmd_vset, ""), /* 29 */ - COMMAND(cmd_vsize), - COMMAND(cmd_exit), - COMMAND(cmd_return), - COMMAND(cmd_call), + COMMAND(cmd_vsize, ""), + COMMAND(cmd_exit, ""), + COMMAND(cmd_return, ""), + COMMAND(cmd_call, "b"), /* 33 */ - COMMAND(cmd_svar), - COMMAND(cmd_sset), - COMMAND(cmd_split), - COMMAND(cmd_snlit), + COMMAND(cmd_svar, ""), + COMMAND(cmd_sset, ""), + COMMAND(cmd_split, ""), + COMMAND(cmd_snlit, ""), /* 37 */ - COMMAND(cmd_yorn), - COMMAND(cmd_save), - COMMAND(cmd_restore), - COMMAND(cmd_arg), + COMMAND(cmd_yorn, ""), + COMMAND(cmd_save, ""), + COMMAND(cmd_restore, ""), + COMMAND(cmd_arg, "b"), /* 41 */ - COMMAND(cmd_aset), - COMMAND(cmd_tmp), - COMMAND(cmd_tset), - COMMAND(cmd_tspace), + COMMAND(cmd_aset, "b"), + COMMAND(cmd_tmp, "b"), + COMMAND(cmd_tset, "b"), + COMMAND(cmd_tspace, "b"), /* 45 */ - COMMAND(cmd_class), - COMMAND(cmd_objectp), - COMMAND(cmd_vectorp), - COMMAND(cmd_restart), + COMMAND(cmd_class, ""), + COMMAND(cmd_objectp, ""), + COMMAND(cmd_vectorp, ""), + COMMAND(cmd_restart, ""), /* 49 */ - COMMAND(cmd_rand), - COMMAND(cmd_randomize), - COMMAND(cmd_send), - COMMAND(cmd_extend), + COMMAND(cmd_rand, ""), + COMMAND(cmd_randomize, ""), + COMMAND(cmd_send, "b"), + COMMAND(cmd_extend, "Eb"), /* 53 */ - COMMAND(cmd_catch), - COMMAND(cmd_cdone), - COMMAND(cmd_throw), - COMMAND(cmd_functionp), + COMMAND(cmd_catch, ""), + COMMAND(cmd_cdone, ""), + COMMAND(cmd_throw, ""), + COMMAND(cmd_functionp, ""), /* 57 */ - COMMAND(cmd_le), - COMMAND(cmd_ge), - COMMAND(cmd_varx), - COMMAND(cmd_setx) + COMMAND(cmd_le, ""), + COMMAND(cmd_ge, ""), + COMMAND(cmd_varx, ""), + COMMAND(cmd_setx, "") }; _commands = commandProcs; _commandsMax = ARRAYSIZE(commandProcs) + 1; @@ -175,9 +179,6 @@ ScriptInterpreter::ScriptInterpreter(MadeEngine *vm) : _vm(vm) { _functions = new ScriptFunctions(_vm); _functions->setupExternalsTable(); - // set to true to dump scripts instead of parsing them - _dumpScripts = false; - #undef COMMAND } @@ -217,27 +218,18 @@ int16 ScriptInterpreter::readInt16() { } void ScriptInterpreter::cmd_branchTrue() { - if (_dumpScripts) - return; - int16 ofs = readInt16(); if (_stack.top() != 0) _codeIp = _codeBase + ofs; } void ScriptInterpreter::cmd_branchFalse() { - if (_dumpScripts) - return; - int16 ofs = readInt16(); if (_stack.top() == 0) _codeIp = _codeBase + ofs; } void ScriptInterpreter::cmd_branch() { - if (_dumpScripts) - return; - int16 ofs = readInt16(); _codeIp = _codeBase + ofs; } @@ -459,29 +451,31 @@ void ScriptInterpreter::cmd_call() { } void ScriptInterpreter::cmd_svar() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_svar"); } void ScriptInterpreter::cmd_sset() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_sset"); } void ScriptInterpreter::cmd_split() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_split"); } void ScriptInterpreter::cmd_snlit() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_snlit"); } void ScriptInterpreter::cmd_yorn() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_yorn"); } void ScriptInterpreter::cmd_save() { - if (_dumpScripts) - return; - int16 result = 0; int16 stringOfs = _stack.top(); const char *filename = _vm->_dat->getString(stringOfs); @@ -490,9 +484,6 @@ void ScriptInterpreter::cmd_save() { } void ScriptInterpreter::cmd_restore() { - if (_dumpScripts) - return; - int16 result = 0; int16 stringOfs = _stack.top(); const char *filename = _vm->_dat->getString(stringOfs); @@ -531,6 +522,7 @@ void ScriptInterpreter::cmd_tspace() { } void ScriptInterpreter::cmd_class() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_class"); } @@ -543,10 +535,12 @@ void ScriptInterpreter::cmd_objectp() { } void ScriptInterpreter::cmd_vectorp() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_vectorp"); } void ScriptInterpreter::cmd_restart() { + // TODO: Used in RTZ warning("Unimplemented command: cmd_restart"); } @@ -613,9 +607,6 @@ void ScriptInterpreter::cmd_extend() { for (int i = 0; i < argc; i++) debug(2, "argv[%02d] = %04X (%d)", i, argv[i], argv[i]); - if (_dumpScripts) - return; - int16 result = _functions->callFunction(func, argc, argv); debug(2, "result = %04X (%d)", result, result); @@ -626,18 +617,22 @@ void ScriptInterpreter::cmd_extend() { } void ScriptInterpreter::cmd_catch() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_catch"); } void ScriptInterpreter::cmd_cdone() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_cdone"); } void ScriptInterpreter::cmd_throw() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_throw"); } void ScriptInterpreter::cmd_functionp() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_functionp"); } @@ -658,11 +653,133 @@ void ScriptInterpreter::cmd_ge() { } void ScriptInterpreter::cmd_varx() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_varx"); } void ScriptInterpreter::cmd_setx() { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented command: cmd_setx"); } +#ifdef DUMP_SCRIPTS +void ScriptInterpreter::dumpScript(int16 objectIndex, int *opcodeStats, int *externStats) { + + debug(1, "Dumping code for object %04X", objectIndex); + + Object *obj = _vm->_dat->getObject(objectIndex); + byte *code = obj->getData(), *codeEnd = code + obj->getSize(); + + while (code < codeEnd) { + byte opcode = *code++; + if (opcode >= 1 && opcode <= _commandsMax) { + Common::String codeLine; + const char *desc = _commands[opcode - 1].desc; + const char *sig = _commands[opcode - 1].sig; + int valueType; /* 0: dec; 1: hex; 2: extended function */ + int16 value; + char tempStr[32]; + if (opcodeStats) + opcodeStats[opcode - 1]++; + codeLine += desc; + for (; *sig != '\0'; sig++) { + codeLine += " "; + // Fallthroughs are intended + switch (*sig) { + case 'b': + valueType = 0; + value = *code++; + break; + case 'B': + valueType = 1; + value = *code++; + break; + case 'w': + valueType = 0; + value = READ_LE_UINT16(code); + code += 2; + break; + case 'W': + valueType = 1; + value = READ_LE_UINT16(code); + code += 2; + break; + case 'E': + valueType = 2; + value = *code++; + break; + } + switch (valueType) { + case 0: + snprintf(tempStr, 32, "%d", value); + break; + case 1: + snprintf(tempStr, 32, "0x%X", value); + break; + case 2: + if (value < _functions->getCount()) { + snprintf(tempStr, 32, "%s", _functions->getFuncName(value)); + externStats[value]++; + } else { + snprintf(tempStr, 32, "invalid: %d", value); + } + break; + } + codeLine += tempStr; + } + debug(1, "%s", codeLine.c_str()); + } else { + error("ScriptInterpreter::dumpScript(%d) Unknown opcode %02X", objectIndex, opcode); + } + } + debug(1, "-------------------------------------------"); +} + +void ScriptInterpreter::dumpAllScripts() { + int *opcodeStats = new int[_commandsMax - 1]; + int *externStats = new int[_functions->getCount()]; + + for (int i = 0; i < _commandsMax; i++) + opcodeStats[i] = 0; + for (int i = 0; i < _functions->getCount(); i++) + externStats[i] = 0; + + for (uint objectIndex = 1; objectIndex <= _vm->_dat->getObjectCount(); objectIndex++) { + Object *obj = _vm->_dat->getObject(objectIndex); + // Check if it's a byte array which might contain code + if (obj->getClass() != 0x7FFF) + continue; + // Code objects aren't excplicitly marked as such, we need to check if + // the last byte is a cmd_return opcode. + byte *retByte = obj->getData() + obj->getSize() - 1; + if (*retByte == 0x1F) { + dumpScript(objectIndex, opcodeStats, externStats); + } + } + + debug(1, "OPCODE statistics:"); + for (int i = 0; i < _commandsMax - 1; i++) + if (opcodeStats[i] > 0) + debug(1, "%-30s: %d", _commands[i].desc, opcodeStats[i]); + debug(1, "UNUSED OPCODE statistics:"); + for (int i = 0; i < _commandsMax - 1; i++) + if (opcodeStats[i] == 0) + debug(1, "%-30s: %d", _commands[i].desc, opcodeStats[i]); + debug(1, "."); + + debug(1, "EXTERN statistics (%d):", _functions->getCount()); + for (int i = 0; i < _functions->getCount(); i++) + if (externStats[i] > 0) + debug(1, "%-30s: %d", _functions->getFuncName(i), externStats[i]); + debug(1, "UNUSED EXTERN statistics (%d):", _functions->getCount()); + for (int i = 0; i < _functions->getCount(); i++) + if (externStats[i] == 0) + debug(1, "%-30s: %d", _functions->getFuncName(i), externStats[i]); + debug(1, "."); + + delete[] opcodeStats; + delete[] externStats; +} +#endif + } // End of namespace Made diff --git a/engines/made/script.h b/engines/made/script.h index 0ec43478ab..459a088cb8 100644 --- a/engines/made/script.h +++ b/engines/made/script.h @@ -32,6 +32,11 @@ namespace Made { +// Define this to dump all game scripts and a usage statistic of all +// opcodes/extended functions instead of running the actual game. +// Then run ScummVM with debuglevel 1. +//#define DUMP_SCRIPTS + class MadeEngine; class ScriptFunctions; @@ -63,6 +68,8 @@ public: ScriptInterpreter(MadeEngine *vm); ~ScriptInterpreter(); void runScript(int16 scriptObjectIndex); + void dumpScript(int16 objectIndex, int *opcodeStats, int *externStats); + void dumpAllScripts(); protected: MadeEngine *_vm; @@ -71,7 +78,6 @@ protected: int16 _runningScriptObjectIndex; byte *_codeBase, *_codeIp; bool _terminated; - bool _dumpScripts; ScriptFunctions *_functions; @@ -82,6 +88,9 @@ protected: struct CommandEntry { CommandProc proc; const char *desc; +#ifdef DUMP_SCRIPTS + const char *sig; +#endif }; const CommandEntry *_commands; diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index d5227ecbf5..d627be38d4 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -319,6 +319,7 @@ int16 ScriptFunctions::sfIsMusicPlaying(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfSetTextPos(int16 argc, int16 *argv) { + // TODO: Used in Manhole:NE warning("Unimplemented opcode: sfSetTextPos"); // This seems to be some kind of low-level opcode. // The original engine calls int 10h to set the VGA cursor position. @@ -331,21 +332,25 @@ int16 ScriptFunctions::sfFlashScreen(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfPlayNote(int16 argc, int16 *argv) { + // TODO: Used in Manhole:NE warning("Unimplemented opcode: sfPlayNote"); return 0; } int16 ScriptFunctions::sfStopNote(int16 argc, int16 *argv) { + // TODO: Used in Manhole:NE warning("Unimplemented opcode: sfStopNote"); return 0; } int16 ScriptFunctions::sfPlayTele(int16 argc, int16 *argv) { + // TODO: Used in Manhole:NE warning("Unimplemented opcode: sfPlayTele"); return 0; } int16 ScriptFunctions::sfStopTele(int16 argc, int16 *argv) { + // TODO: Used in Manhole:NE warning("Unimplemented opcode: sfStopTele"); return 0; } @@ -374,7 +379,7 @@ int16 ScriptFunctions::sfSetScreenLock(int16 argc, int16 *argv) { int16 ScriptFunctions::sfAddSprite(int16 argc, int16 *argv) { if (_vm->getGameID() == GID_RTZ) { - warning("Unimplemented opcode: sfAddSprite"); + // Unused in RTZ return 0; } if (_vm->getGameID() == GID_LGOP2 || _vm->getGameID() == GID_MANHOLE) { return argv[2]; @@ -483,6 +488,7 @@ int16 ScriptFunctions::sfDrawText(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfHomeText(int16 argc, int16 *argv) { + // TODO: Used in LGOP2 warning("Unimplemented opcode: sfHomeText"); return 0; } @@ -542,6 +548,7 @@ int16 ScriptFunctions::sfSetSpriteGround(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfLoadResText(int16 argc, int16 *argv) { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented opcode: sfLoadResText"); return 0; } @@ -611,6 +618,7 @@ int16 ScriptFunctions::sfGetCdTime(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfPlayCdSegment(int16 argc, int16 *argv) { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented opcode: sfPlayCdSegment"); return 0; } @@ -623,6 +631,7 @@ int16 ScriptFunctions::sfPrintf(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfClearMono(int16 argc, int16 *argv) { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented opcode: sfClearMono"); return 0; } @@ -637,11 +646,13 @@ int16 ScriptFunctions::sfGetSoundEnergy(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfClearText(int16 argc, int16 *argv) { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented opcode: sfClearText"); return 1; } int16 ScriptFunctions::sfAnimText(int16 argc, int16 *argv) { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented opcode: sfAnimText"); return 0; } @@ -692,11 +703,13 @@ int16 ScriptFunctions::sfLoadPicture(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfSetMusicVolume(int16 argc, int16 *argv) { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented opcode: sfSetMusicVolume"); return 0; } int16 ScriptFunctions::sfRestartEvents(int16 argc, int16 *argv) { + // TODO: Used in RTZ warning("Unimplemented opcode: sfRestartEvents"); return 0; } @@ -724,11 +737,13 @@ int16 ScriptFunctions::sfSetChannelState(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfSetChannelLocation(int16 argc, int16 *argv) { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented opcode: sfSetChannelLocation"); return 0; } int16 ScriptFunctions::sfSetChannelContent(int16 argc, int16 *argv) { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented opcode: sfSetChannelContent"); return 0; } @@ -796,6 +811,7 @@ int16 ScriptFunctions::sfSetSoundRate(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfDrawAnimPic(int16 argc, int16 *argv) { + // TODO: Used in RTZ warning("Unimplemented opcode: sfDrawAnimPic"); return 0; } @@ -810,6 +826,7 @@ int16 ScriptFunctions::sfLoadAnim(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfReadText(int16 argc, int16 *argv) { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented opcode: sfReadText"); return 0; } @@ -913,11 +930,13 @@ int16 ScriptFunctions::sfGetGameDescription(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfShakeScreen(int16 argc, int16 *argv) { + // TODO: Used in RTZ warning("Unimplemented opcode: sfShakeScreen"); return 0; } int16 ScriptFunctions::sfPlaceMenu(int16 argc, int16 *argv) { + // Never used in LGOP2, RTZ, Manhole:NE warning("Unimplemented opcode: sfPlaceMenu"); return 0; } diff --git a/engines/made/scriptfuncs.h b/engines/made/scriptfuncs.h index 2b0f15c7a2..9879556c3f 100644 --- a/engines/made/scriptfuncs.h +++ b/engines/made/scriptfuncs.h @@ -54,6 +54,7 @@ public: } void setupExternalsTable(); const char* getFuncName(int index) { return _externalFuncNames[index]; } + int getCount() const { return _externalFuncs.size(); } protected: MadeEngine *_vm; Audio::SoundHandle _audioStreamHandle; -- cgit v1.2.3 From 529800e1728b9d1ce89bf7faf4dfd86d6cb25e5f Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 21 May 2008 07:16:12 +0000 Subject: Removed obsolete comment and code in ScriptInterpreter::dumpScript svn-id: r32204 --- engines/made/script.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/engines/made/script.cpp b/engines/made/script.cpp index 6b736e321b..e5fdf5a109 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -679,12 +679,10 @@ void ScriptInterpreter::dumpScript(int16 objectIndex, int *opcodeStats, int *ext int valueType; /* 0: dec; 1: hex; 2: extended function */ int16 value; char tempStr[32]; - if (opcodeStats) - opcodeStats[opcode - 1]++; + opcodeStats[opcode - 1]++; codeLine += desc; for (; *sig != '\0'; sig++) { codeLine += " "; - // Fallthroughs are intended switch (*sig) { case 'b': valueType = 0; -- cgit v1.2.3 From 4074d49844d6851d377374f1d04d43fb9fdad6a8 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 21 May 2008 10:07:33 +0000 Subject: - Moved event polling from sfPollEvent to runScript - LGOP2: Fixed problem where Barth's gun was drawn at the wrong position svn-id: r32205 --- engines/made/made.cpp | 64 +++++++++++++++++++++++++++++++++++++++++- engines/made/made.h | 6 ++-- engines/made/screen.cpp | 34 +++++++++++----------- engines/made/screen.h | 14 +++++++-- engines/made/script.cpp | 4 +++ engines/made/scriptfuncs.cpp | 67 ++++++-------------------------------------- 6 files changed, 108 insertions(+), 81 deletions(-) diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 76482b03bb..08d00af9f4 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -171,6 +171,64 @@ Common::String MadeEngine::getSavegameFilename(int16 saveNum) { return filename; } +void MadeEngine::handleEvents() { + + Common::Event event; + Common::EventManager *eventMan = _system->getEventManager(); + + // NOTE: Don't reset _eventNum to 0 here or no events will come through to the scripts. + + while (eventMan->pollEvent(event)) { + switch (event.type) { + + case Common::EVENT_MOUSEMOVE: + _eventMouseX = event.mouse.x; + _eventMouseY = event.mouse.y; + break; + + case Common::EVENT_LBUTTONDOWN: + _eventNum = 1; + break; + + /* + case Common::EVENT_LBUTTONUP: + _eventNum = 2; // TODO: Is this correct? + break; + */ + + case Common::EVENT_RBUTTONDOWN: + _eventNum = 3; + break; + + /* + case Common::EVENT_RBUTTONUP: + eventNum = 4; // TODO: Is this correct? + break; + */ + + case Common::EVENT_KEYDOWN: + _eventKey = event.kbd.ascii; + // For unknown reasons, the game accepts ASCII code + // 9 as backspace + if (_eventKey == Common::KEYCODE_BACKSPACE) + _eventKey = 9; + _eventNum = 5; + break; + + case Common::EVENT_QUIT: + _quit = true; + break; + + default: + break; + + } + } + + _system->updateScreen(); + +} + int MadeEngine::go() { for (int i = 0; i < ARRAYSIZE(_timers); i++) @@ -205,7 +263,11 @@ int MadeEngine::go() { error ("Unknown MADE game"); } - _eventKey = _eventMouseX = _eventMouseY = 0; + // FIXME: This should make things a little faster until proper dirty rectangles + // are implemented. + _system->setFeatureState(OSystem::kFeatureAutoComputeDirtyRects, true); + + _eventNum = _eventKey = _eventMouseX = _eventMouseY = 0; #ifdef DUMP_SCRIPTS _script->dumpAllScripts(); diff --git a/engines/made/made.h b/engines/made/made.h index 5491e8132f..5ee3828557 100644 --- a/engines/made/made.h +++ b/engines/made/made.h @@ -93,7 +93,6 @@ public: uint32 getFeatures() const; uint16 getVersion() const; Common::Platform getPlatform() const; - void update_events(); private: public: @@ -106,6 +105,7 @@ public: bool _quit; + uint16 _eventNum; int _eventMouseX, _eventMouseY; uint16 _eventKey; int _soundRate; @@ -124,7 +124,9 @@ public: const Common::String getTargetName() { return _targetName; } Common::String getSavegameFilename(int16 saveNum); - + + void handleEvents(); + }; } // End of namespace Made diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 4802908c05..e85ca71c59 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -266,7 +266,6 @@ uint16 Screen::setChannelLocation(uint16 channelIndex, int16 x, int16 y) { uint16 Screen::setChannelContent(uint16 channelIndex, uint16 index) { if (channelIndex < 1 || channelIndex >= 100 || _channels[channelIndex - 1].type == 0) return 0; - //debug(2, "setChannelContent(%d, %04X)\n", channelIndex, index); fflush(stdout); g_system->delayMillis(5000); _channels[channelIndex - 1].index = index; return updateChannel(channelIndex - 1) + 1; } @@ -277,20 +276,6 @@ void Screen::setChannelUseMask(uint16 channelIndex) { _channels[channelIndex - 1].mask = _mask; } -void Screen::setChannelOffsets(uint16 channelIndex, int16 xofs, int16 yofs) { - if (channelIndex < 1 || channelIndex >= 100) - return; - _channels[channelIndex - 1].xofs = xofs; - _channels[channelIndex - 1].yofs = yofs; -} - -void Screen::getChannelOffsets(uint16 channelIndex, int16 &xofs, int16 &yofs) { - if (channelIndex < 1 || channelIndex >= 100) - return; - xofs = _channels[channelIndex - 1].xofs; - yofs = _channels[channelIndex - 1].yofs; -} - void Screen::drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask, int16 excludeStateMask) { for (int i = 0; i <= 3; i++) @@ -481,8 +466,6 @@ uint16 Screen::placeSprite(uint16 channelIndex, uint16 flexIndex, int16 x, int16 _channels[channelIndex].x2 = x2; _channels[channelIndex].y2 = y2; _channels[channelIndex].area = (x2 - x1) * (y2 - y1); - _channels[channelIndex].xofs = 0; - _channels[channelIndex].yofs = 0; if (_channelsUsedCount <= channelIndex) _channelsUsedCount = channelIndex + 1; @@ -824,4 +807,21 @@ void Screen::updateScreenAndWait(int delay) { _vm->_system->delayMillis(delay); } +int16 Screen::addToSpriteList(int16 index, int16 xofs, int16 yofs) { + SpriteListItem item; + item.index = index; + item.xofs = xofs; + item.yofs = yofs; + _spriteList.push_back(item); + return _spriteList.size(); +} + +SpriteListItem Screen::getFromSpriteList(int16 index) { + return _spriteList[index - 1]; +} + +void Screen::clearSpriteList() { + _spriteList.clear(); +} + } // End of namespace Made diff --git a/engines/made/screen.h b/engines/made/screen.h index 910096cacd..d0df3bf080 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -42,7 +42,7 @@ struct SpriteChannel { int16 state; int16 needRefresh; uint16 index; - int16 x, y, xofs, yofs; + int16 x, y; int16 x1, y1, x2, y2; uint32 area; uint16 fontNum; @@ -56,6 +56,10 @@ struct ClipInfo { Graphics::Surface *destSurface; }; +struct SpriteListItem { + int16 index, xofs, yofs; +}; + class MadeEngine; class Screen { @@ -120,8 +124,6 @@ public: uint16 setChannelLocation(uint16 channelIndex, int16 x, int16 y); uint16 setChannelContent(uint16 channelIndex, uint16 index); void setChannelUseMask(uint16 channelIndex); - void setChannelOffsets(uint16 channelIndex, int16 xofs, int16 yofs); - void getChannelOffsets(uint16 channelIndex, int16 &xofs, int16 &yofs); void drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask, int16 excludeStateMask); void updateSprites(); void clearChannels(); @@ -161,6 +163,10 @@ public: void showWorkScreen(); void updateScreenAndWait(int delay); + int16 addToSpriteList(int16 index, int16 xofs, int16 yofs); + SpriteListItem getFromSpriteList(int16 index); + void clearSpriteList(); + protected: MadeEngine *_vm; ScreenEffects *_fx; @@ -194,6 +200,8 @@ protected: uint16 _channelsUsedCount; SpriteChannel _channels[100]; + Common::Array _spriteList; + }; } // End of namespace Made diff --git a/engines/made/script.cpp b/engines/made/script.cpp index e5fdf5a109..4bda35dcc3 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -196,6 +196,9 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) { _codeIp = _codeBase; while (!_vm->_quit) { + + _vm->handleEvents(); + byte opcode = readByte(); if (opcode >= 1 && opcode <= _commandsMax) { debug(4, "[%04X:%04X] %s", _runningScriptObjectIndex, (uint) (_codeIp - _codeBase), _commands[opcode - 1].desc); @@ -203,6 +206,7 @@ void ScriptInterpreter::runScript(int16 scriptObjectIndex) { } else { warning("ScriptInterpreter::runScript(%d) Unknown opcode %02X", _runningScriptObjectIndex, opcode); } + } } diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index d627be38d4..f068e2619b 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -195,61 +195,8 @@ int16 ScriptFunctions::sfShowPage(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfPollEvent(int16 argc, int16 *argv) { - - Common::Event event; - Common::EventManager *eventMan = g_system->getEventManager(); - - int16 eventNum = 0; - - if (eventMan->pollEvent(event)) { - switch (event.type) { - - case Common::EVENT_MOUSEMOVE: - _vm->_eventMouseX = event.mouse.x; - _vm->_eventMouseY = event.mouse.y; - break; - - case Common::EVENT_LBUTTONDOWN: - eventNum = 1; - break; - - /* - case Common::EVENT_LBUTTONUP: - eventNum = 2; // TODO: Is this correct? - break; - */ - - case Common::EVENT_RBUTTONDOWN: - eventNum = 3; - break; - - /* - case Common::EVENT_RBUTTONUP: - eventNum = 4; // TODO: Is this correct? - break; - */ - - case Common::EVENT_KEYDOWN: - _vm->_eventKey = event.kbd.ascii; - // For unknown reasons, the game accepts ASCII code - // 9 as backspace - if (_vm->_eventKey == Common::KEYCODE_BACKSPACE) - _vm->_eventKey = 9; - eventNum = 5; - break; - - case Common::EVENT_QUIT: - _vm->_quit = true; - break; - - default: - break; - - } - } - - _vm->_system->updateScreen(); - + int16 eventNum = _vm->_eventNum; + _vm->_eventNum = 0; return eventNum; } @@ -382,7 +329,7 @@ int16 ScriptFunctions::sfAddSprite(int16 argc, int16 *argv) { // Unused in RTZ return 0; } if (_vm->getGameID() == GID_LGOP2 || _vm->getGameID() == GID_MANHOLE) { - return argv[2]; + return _vm->_screen->addToSpriteList(argv[2], argv[1], argv[0]); } else { return 0; } @@ -390,6 +337,9 @@ int16 ScriptFunctions::sfAddSprite(int16 argc, int16 *argv) { int16 ScriptFunctions::sfFreeAnim(int16 argc, int16 *argv) { _vm->_screen->clearChannels(); + if (_vm->getGameID() == GID_LGOP2 || _vm->getGameID() == GID_MANHOLE) { + _vm->_screen->clearSpriteList(); + } return 0; } @@ -397,8 +347,9 @@ int16 ScriptFunctions::sfDrawSprite(int16 argc, int16 *argv) { if (_vm->getGameID() == GID_RTZ) { return _vm->_screen->drawSprite(argv[2], argv[1], argv[0]); } if (_vm->getGameID() == GID_LGOP2 || _vm->getGameID() == GID_MANHOLE) { - int16 channel = _vm->_screen->drawSprite(argv[2], argv[1], argv[0]); - _vm->_screen->setChannelUseMask(channel); + SpriteListItem item = _vm->_screen->getFromSpriteList(argv[2]); + int16 channelIndex = _vm->_screen->drawSprite(item.index, argv[1] - item.xofs, argv[0] - item.yofs); + _vm->_screen->setChannelUseMask(channelIndex); return 0; } else { return 0; -- cgit v1.2.3 From abe87559bc6e70376ccd4d0565a9976966d77a3f Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 22 May 2008 05:02:39 +0000 Subject: Fixing the menu glitch in Woodruff svn-id: r32209 --- engines/gob/game_v2.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/engines/gob/game_v2.cpp b/engines/gob/game_v2.cpp index ff444f4a69..e783f5bfb5 100644 --- a/engines/gob/game_v2.cpp +++ b/engines/gob/game_v2.cpp @@ -632,13 +632,15 @@ void Game_v2::collisionsBlock(void) { Collision *collArea; int16 timeKey; byte *savedIP; + byte collAreaStart; if (_shouldPushColls) pushCollisions(0); - collArea = _collisionAreas; - while (collArea->left != 0xFFFF) - collArea++; + collAreaStart = 0; + while (_collisionAreas[collAreaStart].left != 0xFFFF) + collAreaStart++; + collArea = &_collisionAreas[collAreaStart]; _shouldPushColls = 0; collResId = -1; @@ -964,7 +966,7 @@ void Game_v2::collisionsBlock(void) { continue; _activeCollResId = collPtr->id; - _activeCollIndex = i; + _activeCollIndex = i + collAreaStart; _vm->_inter->storeMouse(); if (VAR(16) != 0) break; @@ -1006,7 +1008,7 @@ void Game_v2::collisionsBlock(void) { if ((collPtr->id & 0xF000) == 0x8000) if (++counter == descIndex) { _activeCollResId = collPtr->id; - _activeCollIndex = i; + _activeCollIndex = i + collAreaStart; break; } } -- cgit v1.2.3 From a70d37009a097a988992e3ba924b595c6d1289e5 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 22 May 2008 14:25:27 +0000 Subject: Correctly delete'ing CDROM and Backgroundatmosphere, fixing segfaults on machines slower than mine (thanks, LordHoto ;)) svn-id: r32210 --- engines/gob/sound/sound.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index 79fe5acb56..a90afe0e27 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -56,6 +56,8 @@ Sound::~Sound() { delete _blaster; delete _adlib; delete _infogrames; + delete _cdrom; + delete _bgatmos; for (int i = 0; i < kSoundsCount; i++) _sounds[i].free(); -- cgit v1.2.3 From 7dbceb8e6399d9e8b2b40230e0d8872423ec8ffe Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 22 May 2008 16:52:24 +0000 Subject: Oops, that way around should be more correct svn-id: r32211 --- engines/gob/coktelvideo.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp index c3625574d0..d6cbd5c2b5 100644 --- a/engines/gob/coktelvideo.cpp +++ b/engines/gob/coktelvideo.cpp @@ -1073,8 +1073,8 @@ CoktelVideo::State Vmd::processFrame(uint16 frame) { state.flags |= kStateNoVideoData; state.left = 0x7FFF; - state.right = 0x7FFF; - state.top = 0; + state.top = 0x7FFF; + state.right = 0; state.bottom = 0; if (!_vidMem) -- cgit v1.2.3 From f2294d9b89da81929816484f2b845d4c2a68e741 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 22 May 2008 17:10:41 +0000 Subject: Fixing another split screen glitch svn-id: r32212 --- engines/gob/video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index d2fe979754..3b059a2455 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -183,7 +183,7 @@ void Video::retrace(bool mouse) { int screenX = _screenDeltaX; int screenY = _screenDeltaY; int screenWidth = MIN(_surfWidth, _vm->_width); - int screenHeight = MIN(_splitHeight1, _vm->_height - _splitHeight2 - _screenDeltaY); + int screenHeight = MIN(_surfHeight + _screenDeltaY - _splitHeight2, _vm->_height); g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + screenOffset, _surfWidth, screenX, screenY, screenWidth, screenHeight); -- cgit v1.2.3 From 6a54cbc4ebb47af65f5d6f9adcef82b5811aba10 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 22 May 2008 17:33:31 +0000 Subject: Fixing the flickering when changing from object animations to videos svn-id: r32213 --- engines/gob/draw.cpp | 8 ++++++-- engines/gob/draw.h | 2 +- engines/gob/videoplayer.cpp | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index 8a7de9bdaa..cc3b413f41 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -225,7 +225,7 @@ void Draw::invalidateRect(int16 left, int16 top, int16 right, int16 bottom) { _invalidatedCount++; } -void Draw::blitInvalidated() { +void Draw::blitInvalidated(bool noForce) { if (_noInvalidated57 && ((_vm->_global->_videoMode == 5) || (_vm->_global->_videoMode == 7))) return; @@ -248,8 +248,12 @@ void Draw::blitInvalidated() { _showCursor = (_showCursor & ~2) | ((_showCursor & 1) << 1); if (_applyPal) { clearPalette(); - forceBlit(); + + if (!noForce) + forceBlit(); + setPalette(); + _invalidatedCount = 0; _noInvalidated = true; _applyPal = false; diff --git a/engines/gob/draw.h b/engines/gob/draw.h index 9ba589aa53..b7e5ef9f08 100644 --- a/engines/gob/draw.h +++ b/engines/gob/draw.h @@ -133,7 +133,7 @@ public: int16 _scrollOffsetX; void invalidateRect(int16 left, int16 top, int16 right, int16 bottom); - void blitInvalidated(); + void blitInvalidated(bool noForce = false); void setPalette(); void clearPalette(); diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index c6910c1369..c3bf60c95a 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -557,7 +557,7 @@ bool VideoPlayer::doPlay(int16 frame, int16 breakKey, if (_backSurf) { _vm->_draw->invalidateRect(state.left, state.top, state.right, state.bottom); - _vm->_draw->blitInvalidated(); + _vm->_draw->blitInvalidated(palCmd <= 1); } _vm->_video->retrace(); -- cgit v1.2.3 From bfff91b1724bb8821553e9c134059312fe2dd334 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 22 May 2008 18:30:29 +0000 Subject: Reverting my last commit, as it breaks Gob3 (and probably elsewhere, too) svn-id: r32214 --- engines/gob/draw.cpp | 8 ++------ engines/gob/draw.h | 2 +- engines/gob/videoplayer.cpp | 2 +- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/engines/gob/draw.cpp b/engines/gob/draw.cpp index cc3b413f41..8a7de9bdaa 100644 --- a/engines/gob/draw.cpp +++ b/engines/gob/draw.cpp @@ -225,7 +225,7 @@ void Draw::invalidateRect(int16 left, int16 top, int16 right, int16 bottom) { _invalidatedCount++; } -void Draw::blitInvalidated(bool noForce) { +void Draw::blitInvalidated() { if (_noInvalidated57 && ((_vm->_global->_videoMode == 5) || (_vm->_global->_videoMode == 7))) return; @@ -248,12 +248,8 @@ void Draw::blitInvalidated(bool noForce) { _showCursor = (_showCursor & ~2) | ((_showCursor & 1) << 1); if (_applyPal) { clearPalette(); - - if (!noForce) - forceBlit(); - + forceBlit(); setPalette(); - _invalidatedCount = 0; _noInvalidated = true; _applyPal = false; diff --git a/engines/gob/draw.h b/engines/gob/draw.h index b7e5ef9f08..9ba589aa53 100644 --- a/engines/gob/draw.h +++ b/engines/gob/draw.h @@ -133,7 +133,7 @@ public: int16 _scrollOffsetX; void invalidateRect(int16 left, int16 top, int16 right, int16 bottom); - void blitInvalidated(bool noForce = false); + void blitInvalidated(); void setPalette(); void clearPalette(); diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index c3bf60c95a..c6910c1369 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -557,7 +557,7 @@ bool VideoPlayer::doPlay(int16 frame, int16 breakKey, if (_backSurf) { _vm->_draw->invalidateRect(state.left, state.top, state.right, state.bottom); - _vm->_draw->blitInvalidated(palCmd <= 1); + _vm->_draw->blitInvalidated(); } _vm->_video->retrace(); -- cgit v1.2.3 From de38d0728175ab7f4625699518e5c515ac549de9 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 22 May 2008 19:47:42 +0000 Subject: Updated NEWS svn-id: r32216 --- NEWS | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS b/NEWS index eee3a92e54..6a3a59a49b 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ For a more comprehensive changelog for the latest experimental SVN code, see: - Added support for The Legend of Kyrandia: Book Two: Hand of Fate - Added support for The Legend of Kyrandia: Book Three: Malcolm's Revenge - Added support for Lost in Time + - Added support for The Bizarre Adventures of Woodruff and the Schnibble - Added support for the PC version of Waxworks - Added support for the Macintosh version of I Have no Mouth, and I must Scream -- cgit v1.2.3 From beb81bdc6ec4634939aeaaaa91351c7028243388 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 22 May 2008 21:26:56 +0000 Subject: Fixing a valgrind warning svn-id: r32218 --- engines/gob/video.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index 3b059a2455..e5d6f17574 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -183,7 +183,7 @@ void Video::retrace(bool mouse) { int screenX = _screenDeltaX; int screenY = _screenDeltaY; int screenWidth = MIN(_surfWidth, _vm->_width); - int screenHeight = MIN(_surfHeight + _screenDeltaY - _splitHeight2, _vm->_height); + int screenHeight = MIN(_surfHeight - _splitHeight2, _vm->_height); g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + screenOffset, _surfWidth, screenX, screenY, screenWidth, screenHeight); -- cgit v1.2.3 From e2d799ad4332c9511289d9b9db6534fcd2371bb5 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 23 May 2008 06:26:11 +0000 Subject: Add another English Windows version of Putt Putt Saves The Zoo. svn-id: r32220 --- engines/scumm/scumm-md5.h | 3 ++- tools/scumm-md5.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index aa75952d12..2600879c7a 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Sun May 18 02:50:38 2008 + This file was generated by the md5table tool on Fri May 23 06:23:48 2008 DO NOT EDIT MANUALLY! */ @@ -157,6 +157,7 @@ static const MD5Table md5table[] = { { "39fd6db10d0222d817025c4d3346e3b4", "farm", "", "Demo", -1, Common::EN_ANY, Common::kPlatformMacintosh }, { "3a03dab514e4038df192d8a8de469788", "atlantis", "", "Floppy", -1, Common::EN_ANY, Common::kPlatformAmiga }, { "3a0c35f3c147b98a2bdf8d400cfc4ab5", "indy3", "FM-TOWNS", "", -1, Common::JA_JPN, Common::kPlatformFMTowns }, + { "3a3e592b074f595489f7f11e150c398d", "puttzoo", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformWindows }, { "3a5d13675e9a23aedac0bac7730f0ac1", "samnmax", "", "CD", -1, Common::FR_FRA, Common::kPlatformMacintosh }, { "3a5ec90d556d4920976c5578bfbfaf79", "maniac", "NES", "extracted", -1, Common::DE_DEU, Common::kPlatformNES }, { "3af61c5edf8e15b43dbafd285b2e9777", "puttcircus", "", "Demo", -1, Common::HB_ISR, Common::kPlatformWindows }, diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt index 07aa375b5a..5208c59aec 100644 --- a/tools/scumm-md5.txt +++ b/tools/scumm-md5.txt @@ -697,6 +697,7 @@ puttzoo Putt-Putt Saves the Zoo c3b22fa4654bb580b20325ebf4174841 -1 nl Windows - - - joostp 9781422e4288dbc090720e4563168ba7 -1 fr Windows - - - gist974 92e7727e67f5cd979d8a1070e4eb8cb3 -1 en All HE 98.5 Updated - cyx + 3a3e592b074f595489f7f11e150c398d -1 us Windows HE 100 Updated - Adrian 3486ede0f904789267d4bcc5537a46d4 -1 en Mac - Demo - khalek d220d154aafbfa12bd6f3ab1b2dae420 -1 de Mac - Demo - Joachim Eberhard -- cgit v1.2.3 From df7948061125f095042f90e7efd755526ebf8646 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 23 May 2008 09:17:39 +0000 Subject: Messages in the ITE puzzle scene will now be properly shown in Italian in the Italian fan translation of ITE svn-id: r32221 --- engines/saga/puzzle.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp index 23eaa42531..59cb50dcf3 100644 --- a/engines/saga/puzzle.cpp +++ b/engines/saga/puzzle.cpp @@ -54,7 +54,12 @@ enum rifOptions { }; Puzzle::Puzzle(SagaEngine *vm) : _vm(vm), _solved(false), _active(false) { - _lang = (_vm->getLanguage() == Common::DE_DEU) ? 1 : 0; + _lang = 0; + + if (_vm->getLanguage() == Common::DE_DEU) + _lang = 1; + else if (_vm->getLanguage() == Common::IT_ITA) + _lang = 2; _hintRqState = kRQNoHint; _hintOffer = 0; -- cgit v1.2.3 From 69594a118ee21c5c6185d562fc4bd860b92150af Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Fri, 23 May 2008 11:11:55 +0000 Subject: Added prefix files for M4 and Made engine svn-id: r32222 --- backends/platform/PalmOS/Src/prefixes/native_m4.h | 7 +++++++ backends/platform/PalmOS/Src/prefixes/native_made.h | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100755 backends/platform/PalmOS/Src/prefixes/native_m4.h create mode 100755 backends/platform/PalmOS/Src/prefixes/native_made.h diff --git a/backends/platform/PalmOS/Src/prefixes/native_m4.h b/backends/platform/PalmOS/Src/prefixes/native_m4.h new file mode 100755 index 0000000000..3bf85460a6 --- /dev/null +++ b/backends/platform/PalmOS/Src/prefixes/native_m4.h @@ -0,0 +1,7 @@ +#ifndef PREFIX_H +#define PREFIX_H + +#include "native_common.h" +#define ENABLE_M4 STATIC_PLUGIN + +#endif diff --git a/backends/platform/PalmOS/Src/prefixes/native_made.h b/backends/platform/PalmOS/Src/prefixes/native_made.h new file mode 100755 index 0000000000..fd439ed181 --- /dev/null +++ b/backends/platform/PalmOS/Src/prefixes/native_made.h @@ -0,0 +1,7 @@ +#ifndef PREFIX_H +#define PREFIX_H + +#include "native_common.h" +#define ENABLE_MADE STATIC_PLUGIN + +#endif -- cgit v1.2.3 From 1b69c18b566569bf7a2e4db83bfd8c252bb69a51 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Fri, 23 May 2008 11:13:15 +0000 Subject: Fixed PalmOS compilation svn-id: r32223 --- backends/platform/PalmOS/Src/prefixes/native_kyra.h | 2 +- backends/platform/PalmOS/Src/prefixes/native_sword1.h | 2 +- engines/agos/agos.cpp | 4 +--- engines/gob/inter.cpp | 4 ++-- engines/scumm/saveload.cpp | 4 ++-- engines/scumm/script_v6.cpp | 4 ++-- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/backends/platform/PalmOS/Src/prefixes/native_kyra.h b/backends/platform/PalmOS/Src/prefixes/native_kyra.h index c89b0a5b93..3b09c63a6f 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_kyra.h +++ b/backends/platform/PalmOS/Src/prefixes/native_kyra.h @@ -2,6 +2,6 @@ #define PREFIX_H #include "native_common.h" -#define ENABLE_KYRA +#define ENABLE_KYRA STATIC_PLUGIN #endif diff --git a/backends/platform/PalmOS/Src/prefixes/native_sword1.h b/backends/platform/PalmOS/Src/prefixes/native_sword1.h index aaae4c9b86..6ae7bb9050 100644 --- a/backends/platform/PalmOS/Src/prefixes/native_sword1.h +++ b/backends/platform/PalmOS/Src/prefixes/native_sword1.h @@ -2,7 +2,7 @@ #define PREFIX_H #include "native_common.h" -#define ENABLE_SWORD1 +#define ENABLE_SWORD1 STATIC_PLUGIN #define USE_MPEG2 #define USE_VORBIS diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index a79b84843c..51619bd3cb 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -23,7 +23,7 @@ * */ - +#include // for AGOSEngine::getTime() #include "common/config-manager.h" #include "common/file.h" @@ -38,8 +38,6 @@ #include "sound/mididrv.h" #include "sound/mods/protracker.h" -#include // for AGOSEngine::getTime() - using Common::File; namespace AGOS { diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp index dd3fdf3684..9e5005f443 100644 --- a/engines/gob/inter.cpp +++ b/engines/gob/inter.cpp @@ -23,6 +23,8 @@ * */ +#include // FIXME: for Inter::renewTimeInVars() + #include "common/endian.h" #include "gob/gob.h" @@ -35,8 +37,6 @@ #include "gob/scenery.h" #include "gob/sound/sound.h" -#include // FIXME: for Inter::renewTimeInVars() - namespace Gob { Inter::Inter(GobEngine *vm) : _vm(vm) { diff --git a/engines/scumm/saveload.cpp b/engines/scumm/saveload.cpp index a8ef26c484..36b82519e9 100644 --- a/engines/scumm/saveload.cpp +++ b/engines/scumm/saveload.cpp @@ -23,6 +23,8 @@ * */ +#include // for ScummEngine::saveInfos / ScummEngine::loadInfos + #include "common/config-manager.h" #include "common/savefile.h" #include "common/system.h" @@ -44,8 +46,6 @@ #include "sound/audiocd.h" #include "sound/mixer.h" -#include // for ScummEngine::saveInfos / ScummEngine::loadInfos - namespace Scumm { struct SaveGameHeader { diff --git a/engines/scumm/script_v6.cpp b/engines/scumm/script_v6.cpp index faae72b6dd..04ea53137b 100644 --- a/engines/scumm/script_v6.cpp +++ b/engines/scumm/script_v6.cpp @@ -23,6 +23,8 @@ * */ +#include // for ScummEngine_v6::o6_getDateTime() + #include "common/config-manager.h" #include "common/system.h" @@ -44,8 +46,6 @@ #include "sound/mididrv.h" #include "sound/mixer.h" -#include // for ScummEngine_v6::o6_getDateTime() - namespace Scumm { #define OPCODE(x) _OPCODE(ScummEngine_v6, x) -- cgit v1.2.3 From 4a26c04ff95b4ec05ff0416511da8ae15e44a503 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Fri, 23 May 2008 11:25:22 +0000 Subject: Added missing getTimeAndDate backend function svn-id: r32224 --- backends/platform/PalmOS/Src/be_base.cpp | 5 +++++ backends/platform/PalmOS/Src/be_base.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/backends/platform/PalmOS/Src/be_base.cpp b/backends/platform/PalmOS/Src/be_base.cpp index 3dadbe5286..e6816893a9 100644 --- a/backends/platform/PalmOS/Src/be_base.cpp +++ b/backends/platform/PalmOS/Src/be_base.cpp @@ -120,6 +120,11 @@ void OSystem_PalmBase::initBackend() { OSystem::initBackend(); } +void OSystem_PalmBase::getTimeAndDate(struct tm &t) const { + time_t curTime = time(0); + t = *localtime(&curTime); +} + uint32 OSystem_PalmBase::getMillis() { return TimGetTicks() * 1000 / SysTicksPerSecond(); } diff --git a/backends/platform/PalmOS/Src/be_base.h b/backends/platform/PalmOS/Src/be_base.h index 38b76fcb05..582aae5d7a 100644 --- a/backends/platform/PalmOS/Src/be_base.h +++ b/backends/platform/PalmOS/Src/be_base.h @@ -26,6 +26,8 @@ #ifndef BE_BASE_H #define BE_BASE_H +#include + #include "PalmVersion.h" #include "globals.h" @@ -236,6 +238,7 @@ public: bool pollEvent(Common::Event &event); + void getTimeAndDate(struct tm &t) const; virtual uint32 getMillis(); virtual void delayMillis(uint msecs); -- cgit v1.2.3 From 16e7b030feca602573d0868e836e6104c2150b70 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Fri, 23 May 2008 11:26:33 +0000 Subject: Fixed PalmSaveFileManager svn-id: r32225 --- backends/platform/PalmOS/Src/be_save.cpp | 38 +++++++------------------------- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/backends/platform/PalmOS/Src/be_save.cpp b/backends/platform/PalmOS/Src/be_save.cpp index 1c3da1ba23..2a8e028966 100644 --- a/backends/platform/PalmOS/Src/be_save.cpp +++ b/backends/platform/PalmOS/Src/be_save.cpp @@ -28,49 +28,27 @@ #include "be_save.h" Common::StringList PalmSaveFileManager::listSavefiles(const char *pattern) { - TODO: Implement this. If you don't understand what it should do, just ask - (e.g. on scummvm-devel or Fingolfin). It should be pretty simple if you - use Common::matchString from common/util.h and read the Doxygen docs, - then combine this with the old code below... - -/* -void PalmSaveFileManager::listSavefiles(const char *prefix, bool *marks, int num) { FileRef fileRef; + Common::StringList list; + // try to open the dir Err e = VFSFileOpen(gVars->VFS.volRefNum, SCUMMVM_SAVEPATH, vfsModeRead, &fileRef); - memset(marks, false, num*sizeof(bool)); - if (e != errNone) - return; + return list; + - // enumerate all files UInt32 dirEntryIterator = vfsIteratorStart; Char filename[32]; FileInfoType info = {0, filename, 32}; - UInt16 length = StrLen(prefix); - int slot = 0; while (dirEntryIterator != vfsIteratorStop) { e = VFSDirEntryEnumerate (fileRef, &dirEntryIterator, &info); - if (e != expErrEnumerationEmpty) { // there is something - - if (StrLen(info.nameP) == (length + 2)) { // consider max 99, filename length is ok - if (StrNCaselessCompare(prefix, info.nameP, length) == 0) { // this seems to be a save file - if (isdigit(info.nameP[length]) && isdigit(info.nameP[length+1])) { - - slot = StrAToI(filename + length); - if (slot >= 0 && slot < num) - *(marks+slot) = true; - - } - } - } - - } + if (e != expErrEnumerationEmpty) // there is something + if (Common::matchString(info.nameP, pattern)) // this seems to be what we are looking for + list.push_back(info.nameP); } VFSFileClose(fileRef); -} - + return list; } -- cgit v1.2.3 From 8d3116cf4a6982d4980855b01dd2a312c1a1f2ee Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 23 May 2008 11:35:05 +0000 Subject: Cleanup. svn-id: r32226 --- engines/kyra/sound.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index a8566a7309..854e2de41f 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -67,9 +67,6 @@ bool Sound::voiceFileIsPresent(const char *file) { } bool Sound::voicePlay(const char *file, bool isSfx) { - uint32 fileSize = 0; - byte *fileData = 0; - bool found = false; char filenamebuffer[25]; int h = 0; @@ -88,28 +85,28 @@ bool Sound::voicePlay(const char *file, bool isSfx) { if (!stream) continue; audioStream = _supportedCodes[i].streamFunc(stream, true, 0, 0, 1); - found = true; break; } - if (!found) { + if (!audioStream) { strcpy(filenamebuffer, file); strcat(filenamebuffer, ".VOC"); - fileData = _vm->resource()->fileData(filenamebuffer, &fileSize); + uint32 fileSize = 0; + byte *fileData = _vm->resource()->fileData(filenamebuffer, &fileSize); if (!fileData) return false; Common::MemoryReadStream vocStream(fileData, fileSize); audioStream = Audio::makeVOCStream(vocStream); + + delete[] fileData; + fileSize = 0; } _soundChannels[h].file = file; _mixer->playInputStream(isSfx ? Audio::Mixer::kSFXSoundType : Audio::Mixer::kSpeechSoundType, &_soundChannels[h].channelHandle, audioStream); - delete[] fileData; - fileSize = 0; - return true; } -- cgit v1.2.3 From 770f0ad619a354f6a60ec41d2027ca0142ff8f13 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Fri, 23 May 2008 12:59:18 +0000 Subject: Use default save game class svn-id: r32227 --- backends/platform/PalmOS/Src/be_save.cpp | 54 -------------------------------- backends/platform/PalmOS/Src/be_save.h | 36 --------------------- backends/platform/PalmOS/Src/extend.cpp | 2 -- base/commandLine.cpp | 7 ++++- 4 files changed, 6 insertions(+), 93 deletions(-) delete mode 100644 backends/platform/PalmOS/Src/be_save.cpp delete mode 100644 backends/platform/PalmOS/Src/be_save.h diff --git a/backends/platform/PalmOS/Src/be_save.cpp b/backends/platform/PalmOS/Src/be_save.cpp deleted file mode 100644 index 2a8e028966..0000000000 --- a/backends/platform/PalmOS/Src/be_save.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "be_base.h" -#include "common/savefile.h" -#include "be_save.h" - -Common::StringList PalmSaveFileManager::listSavefiles(const char *pattern) { - FileRef fileRef; - Common::StringList list; - - // try to open the dir - Err e = VFSFileOpen(gVars->VFS.volRefNum, SCUMMVM_SAVEPATH, vfsModeRead, &fileRef); - if (e != errNone) - return list; - - - UInt32 dirEntryIterator = vfsIteratorStart; - Char filename[32]; - FileInfoType info = {0, filename, 32}; - - while (dirEntryIterator != vfsIteratorStop) { - e = VFSDirEntryEnumerate (fileRef, &dirEntryIterator, &info); - - if (e != expErrEnumerationEmpty) // there is something - if (Common::matchString(info.nameP, pattern)) // this seems to be what we are looking for - list.push_back(info.nameP); - } - - VFSFileClose(fileRef); - return list; -} diff --git a/backends/platform/PalmOS/Src/be_save.h b/backends/platform/PalmOS/Src/be_save.h deleted file mode 100644 index c0aaf2a46c..0000000000 --- a/backends/platform/PalmOS/Src/be_save.h +++ /dev/null @@ -1,36 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef BACKEND_SAVES_PALM_H -#define BACKEND_SAVES_PALM_H - -#include "saves/default/default-saves.h" - -class PalmSaveFileManager : public DefaultSaveFileManager { -public: - Common::StringList listSavefiles(const char *pattern); -}; - -#endif diff --git a/backends/platform/PalmOS/Src/extend.cpp b/backends/platform/PalmOS/Src/extend.cpp index e2dbd8f093..430563a302 100644 --- a/backends/platform/PalmOS/Src/extend.cpp +++ b/backends/platform/PalmOS/Src/extend.cpp @@ -29,8 +29,6 @@ #include "modulesrsc.h" -const char *SCUMMVM_SAVEPATH = "/PALM/Programs/ScummVM/Saved"; - void PalmFatalError(const char *err) { WinSetDrawWindow(WinGetDisplayWindow()); WinPalette(winPaletteSetToDefault,0,0,0); diff --git a/base/commandLine.cpp b/base/commandLine.cpp index d2f286cc4a..96ed6c89f1 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -46,6 +46,8 @@ #endif #elif defined(__SYMBIAN32__) #define DEFAULT_SAVE_PATH "Savegames" +#elif defined(PALMOS_MODE) +#define DEFAULT_SAVE_PATH "/PALM/Programs/ScummVM/Saved" #endif #define DETECTOR_TESTING_HACK @@ -146,7 +148,7 @@ static void usage(const char *s, ...) { vsnprintf(buf, STRINGBUFLEN, s, va); va_end(va); -#if !(defined(PALMOS_ARM) || defined(PALMOS_DEBUG) || defined(__GP32__) || defined (__SYMBIAN32__)) +#if !(defined(__GP32__) || defined (__SYMBIAN32__)) printf(USAGE_STRING, s_appName, buf, s_appName, s_appName); #endif exit(1); @@ -229,6 +231,9 @@ void registerDefaults() { ConfMan.registerDefault("savepath", savePath); #elif defined (IPHONE) ConfMan.registerDefault("savepath", OSystem_IPHONE::getSavePath()); + +#elif defined(PALMOS_MODE) + ConfMan.registerDefault("savepath", DEFAULT_SAVE_PATH); #endif #endif // #ifdef DEFAULT_SAVE_PATH -- cgit v1.2.3 From 78341b2d18be3e4042196495e20d8d4ede247612 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Fri, 23 May 2008 13:00:37 +0000 Subject: Use default save game class svn-id: r32228 --- backends/platform/PalmOS/Src/be_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/platform/PalmOS/Src/be_base.cpp b/backends/platform/PalmOS/Src/be_base.cpp index e6816893a9..b036d4ae11 100644 --- a/backends/platform/PalmOS/Src/be_base.cpp +++ b/backends/platform/PalmOS/Src/be_base.cpp @@ -100,7 +100,7 @@ void OSystem_PalmBase::initBackend() { // Create the savefile manager, if none exists yet (we check for this to // allow subclasses to provide their own). if (_saveMgr == 0) { - _saveMgr = new PalmSaveFileManager(); + _saveMgr = new DefaultSaveFileManager(); } // Create and hook up the mixer, if none exists yet (we check for this to -- cgit v1.2.3 From 9662178fcb5aca1e52b33e845b02bb95e166a026 Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Fri, 23 May 2008 13:04:13 +0000 Subject: Correct include svn-id: r32229 --- backends/platform/PalmOS/Src/be_base.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/platform/PalmOS/Src/be_base.cpp b/backends/platform/PalmOS/Src/be_base.cpp index b036d4ae11..afb3f15bae 100644 --- a/backends/platform/PalmOS/Src/be_base.cpp +++ b/backends/platform/PalmOS/Src/be_base.cpp @@ -24,9 +24,9 @@ */ #include "be_base.h" -#include "be_save.h" #include "common/config-file.h" #include "common/config-manager.h" +#include "backends/saves/default/default-saves.h" #include "backends/timer/default/default-timer.h" #include "sound/mixer.h" -- cgit v1.2.3 From ad6f12683f5a4e64af63b619850e71dd56550089 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 23 May 2008 13:05:53 +0000 Subject: Added 'enter' command to kyra1 debugger again. svn-id: r32230 --- engines/kyra/debugger.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp index 0d170dbf05..7ae5414d82 100644 --- a/engines/kyra/debugger.cpp +++ b/engines/kyra/debugger.cpp @@ -192,6 +192,7 @@ bool Debugger::cmd_setTimerCountdown(int argc, const char **argv) { Debugger_LoK::Debugger_LoK(KyraEngine_LoK *vm) : Debugger(vm), _vm(vm) { + DCmd_Register("enter", WRAP_METHOD(Debugger_LoK, cmd_enterRoom)); DCmd_Register("rooms", WRAP_METHOD(Debugger_LoK, cmd_listRooms)); DCmd_Register("give", WRAP_METHOD(Debugger_LoK, cmd_giveItem)); DCmd_Register("birthstones", WRAP_METHOD(Debugger_LoK, cmd_listBirthstones)); -- cgit v1.2.3 From 18b3e3a4ba09a886e7ad78c5b3d17ece3ee97940 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 23 May 2008 13:37:56 +0000 Subject: - Added a simple (but yet better) implementation of pauseEngineIntern for Kyra_v1 and Kyra_v2 - Added comments about what game specific details are missing in the pause implementation svn-id: r32231 --- engines/kyra/kyra_hof.h | 4 ++++ engines/kyra/kyra_lok.h | 4 ++++ engines/kyra/kyra_mr.h | 5 +++++ engines/kyra/kyra_v1.cpp | 5 +++++ engines/kyra/kyra_v1.h | 2 ++ engines/kyra/kyra_v2.cpp | 17 +++++++++++++++++ engines/kyra/kyra_v2.h | 3 +++ 7 files changed, 40 insertions(+) diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index fe4b6390b7..4eac124c45 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -182,6 +182,10 @@ public: KyraEngine_HoF(OSystem *system, const GameFlags &flags); ~KyraEngine_HoF(); + //TODO: proper extended implementation of KyraEngine_v2::pauseEngineIntern. + // Here we need to take care of the seqeunce play code (LordHoto *thinks*), + // item animation, idle animation and tim player. + Screen *screen() { return _screen; } Screen_v2 *screen_v2() const { return _screen; } GUI_v2 *gui_v2() const { return _gui; } diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index ad425eee8c..6bae169a77 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -113,6 +113,10 @@ public: KyraEngine_LoK(OSystem *system, const GameFlags &flags); ~KyraEngine_LoK(); + //TODO: proper extended implementation of KyraEngine_v1::pauseEngineIntern. + // _sprites and _seqplayer should be paused here too, to avoid some animation glitches, + // also parts of the hardcoded Malcolm fight might need some special handling. + Screen *screen() { return _screen; } Animator_LoK *animator() { return _animator; } virtual Movie *createWSAMovie(); diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h index 4ec02c7849..5af138373c 100644 --- a/engines/kyra/kyra_mr.h +++ b/engines/kyra/kyra_mr.h @@ -50,6 +50,11 @@ public: KyraEngine_MR(OSystem *system, const GameFlags &flags); ~KyraEngine_MR(); + //TODO: proper extended implementation of KyraEngine_v2::pauseEngineIntern. + // Idle animation time, item animations and album animations should be taken + // care of, but since those would just produce minor glitches it's not that + // important. + Screen *screen() { return _screen; } Screen_v2 *screen_v2() const { return _screen; } GUI_v2 *gui_v2() const { return _gui; } diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp index a3d18f7713..1cc1d728bf 100644 --- a/engines/kyra/kyra_v1.cpp +++ b/engines/kyra/kyra_v1.cpp @@ -87,6 +87,11 @@ KyraEngine_v1::KyraEngine_v1(OSystem *system, const GameFlags &flags) return _debugger; } +void KyraEngine_v1::pauseEngineIntern(bool pause) { + Engine::pauseEngineIntern(pause); + _timer->pause(pause); +} + int KyraEngine_v1::init() { registerDefaultSettings(); diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 919d853dfb..2278cc81df 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -109,6 +109,8 @@ public: ::GUI::Debugger *getDebugger(); + virtual void pauseEngineIntern(bool pause); + bool quit() const { return _quitFlag; } uint8 game() const { return _flags.gameID; } diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index e987496ddb..054fab4569 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -68,6 +68,8 @@ KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const Engi memset(&_mainCharacter, 0, sizeof(_mainCharacter)); memset(&_mainCharacter.inventory, -1, sizeof(_mainCharacter.inventory)); + + _pauseStart = 0; } KyraEngine_v2::~KyraEngine_v2() { @@ -93,6 +95,21 @@ KyraEngine_v2::~KyraEngine_v2() { delete[] _screenBuffer; } +void KyraEngine_v2::pauseEngineIntern(bool pause) { + KyraEngine_v1::pauseEngineIntern(pause); + + if (!pause) { + for (int i = 0; i < ARRAYSIZE(_sceneSpecialScriptsTimer); ++i) { + if (_sceneSpecialScriptsTimer[i]) + _sceneSpecialScriptsTimer[i] += _pauseStart; + } + + _pauseStart = 0; + } else { + _pauseStart = _system->getMillis(); + } +} + void KyraEngine_v2::delay(uint32 amount, bool updateGame, bool isMainLoop) { debugC(9, kDebugLevelMain, "KyraEngine_v2::delay(%u, %d, %d)", amount, updateGame, isMainLoop); diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h index f75fd89234..24f7aad614 100644 --- a/engines/kyra/kyra_v2.h +++ b/engines/kyra/kyra_v2.h @@ -75,6 +75,8 @@ public: KyraEngine_v2(OSystem *system, const GameFlags &flags, const EngineDesc &desc); ~KyraEngine_v2(); + virtual void pauseEngineIntern(bool pause); + virtual Screen_v2 *screen_v2() const = 0; virtual GUI *gui_v2() const = 0; @@ -85,6 +87,7 @@ protected: EngineDesc _desc; // run + uint32 _pauseStart; bool _runFlag; bool _showOutro; -- cgit v1.2.3 From 4b06f42ff339cc79eb17aa75140987c1426e405a Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Fri, 23 May 2008 17:54:47 +0000 Subject: Initial implementation of pauseEngineIntern(). There are issues, though, since the engine doesn't always allow the game to be paused, and some things (GUI, movie cutscenes, credits, ...) are outside the main engine loop. svn-id: r32232 --- engines/sword2/mouse.cpp | 24 +++++++------- engines/sword2/mouse.h | 3 +- engines/sword2/sword2.cpp | 79 ++++++++++++++++++++++++----------------------- engines/sword2/sword2.h | 3 +- 4 files changed, 55 insertions(+), 54 deletions(-) diff --git a/engines/sword2/mouse.cpp b/engines/sword2/mouse.cpp index 44d2383f78..af4f121e96 100644 --- a/engines/sword2/mouse.cpp +++ b/engines/sword2/mouse.cpp @@ -1462,19 +1462,19 @@ void Mouse::checkPlayerActivity(uint32 seconds) { _vm->_logic->writeVar(RESULT, 0); } -void Mouse::pauseGame() { - // Make the mouse cursor normal. This is the only place where we are - // allowed to clear the luggage this way. +void Mouse::pauseEngine(bool pause) { + if (pause) { + // Make the mouse cursor normal. This is the only place where + // we are allowed to clear the luggage this way. - clearPointerText(); - setLuggageAnim(NULL, 0); - setMouse(0); - setMouseTouching(1); -} - -void Mouse::unpauseGame() { - if (_vm->_logic->readVar(OBJECT_HELD) && _realLuggageItem) - setLuggage(_realLuggageItem); + clearPointerText(); + setLuggageAnim(NULL, 0); + setMouse(0); + setMouseTouching(1); + } else { + if (_vm->_logic->readVar(OBJECT_HELD) && _realLuggageItem) + setLuggage(_realLuggageItem); + } } #define MOUSEFLASHFRAME 6 diff --git a/engines/sword2/mouse.h b/engines/sword2/mouse.h index 09ac9ced20..b87129ac7f 100644 --- a/engines/sword2/mouse.h +++ b/engines/sword2/mouse.h @@ -211,8 +211,7 @@ public: uint32 getMouseTouching() { return _mouseTouching; } void setMouseTouching(uint32 touching) { _mouseTouching = touching; } - void pauseGame(); - void unpauseGame(); + void pauseEngine(bool pause); void setMouse(uint32 res); void setLuggage(uint32 res); diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index 0601d11791..26fd598d9d 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -392,7 +392,7 @@ int Sword2Engine::go() { #ifdef SWORD2_DEBUG if (_stepOneCycle) { - pauseGame(); + pauseEngineIntern(true); _stepOneCycle = false; } #endif @@ -406,9 +406,9 @@ int Sword2Engine::go() { switch (ke->kbd.keycode) { case Common::KEYCODE_p: if (_gamePaused) - unpauseGame(); + pauseEngineIntern(false); else - pauseGame(); + pauseEngineIntern(true); break; case Common::KEYCODE_c: if (!_logic->readVar(DEMO) && !_mouse->isChoosing()) { @@ -421,7 +421,7 @@ int Sword2Engine::go() { case Common::KEYCODE_SPACE: if (_gamePaused) { _stepOneCycle = true; - unpauseGame(); + pauseEngineIntern(false); } break; case Common::KEYCODE_s: @@ -689,53 +689,56 @@ void Sword2Engine::sleepUntil(uint32 time) { } } -void Sword2Engine::pauseGame() { - // Don't allow Pause while screen fading or while black - if (_screen->getFadeStatus() != RDFADE_NONE) - return; +void Sword2Engine::pauseEngineIntern(bool pause) { + if (pause) { + // FIXME: We should never disallow pausing, and we need to do + // something about pausing during cutscene moves, credits, etc. - _sound->pauseAllSound(); - _mouse->pauseGame(); + // Don't allow Pause while screen fading or while black + if (_screen->getFadeStatus() != RDFADE_NONE) + return; - // If render level is at max, turn it down because palette-matching - // won't work when the palette is dimmed. + _sound->pauseAllSound(); + _mouse->pauseEngine(true); - if (_screen->getRenderLevel() == 3) { - _screen->setRenderLevel(2); - _graphicsLevelFudged = true; - } + // If render level is at max, turn it down because palette- + // matching won't work when the palette is dimmed. + + if (_screen->getRenderLevel() == 3) { + _screen->setRenderLevel(2); + _graphicsLevelFudged = true; + } #ifdef SWORD2_DEBUG - // Don't dim it if we're single-stepping through frames - // dim the palette during the pause + // Don't dim it if we're single-stepping through frames + // dim the palette during the pause - if (!_stepOneCycle) - _screen->dimPalette(); + if (!_stepOneCycle) + _screen->dimPalette(); #else - _screen->dimPalette(); + _screen->dimPalette(); #endif - _gamePaused = true; -} - -void Sword2Engine::unpauseGame() { - _mouse->unpauseGame(); - _sound->unpauseAllSound(); + _gamePaused = true; + } else { + _mouse->pauseEngine(false); + _sound->unpauseAllSound(); - // Put back game screen palette; see screen.cpp - _screen->setFullPalette(-1); + // Put back game screen palette; see screen.cpp + _screen->setFullPalette(-1); - // If graphics level at max, turn up again - if (_graphicsLevelFudged) { - _screen->setRenderLevel(3); - _graphicsLevelFudged = false; - } + // If graphics level at max, turn up again + if (_graphicsLevelFudged) { + _screen->setRenderLevel(3); + _graphicsLevelFudged = false; + } - _gamePaused = false; + _gamePaused = false; - // If mouse is about or we're in a chooser menu - if (!_mouse->getMouseStatus() || _mouse->isChoosing()) - _mouse->setMouse(NORMAL_MOUSE_ID); + // If mouse is about or we're in a chooser menu + if (!_mouse->getMouseStatus() || _mouse->isChoosing()) + _mouse->setMouse(NORMAL_MOUSE_ID); + } } uint32 Sword2Engine::getMillis() { diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h index a9a1e21875..ba59772a71 100644 --- a/engines/sword2/sword2.h +++ b/engines/sword2/sword2.h @@ -113,8 +113,7 @@ private: uint32 calcChecksum(byte *buffer, uint32 size); - void pauseGame(); - void unpauseGame(); + virtual void pauseEngineIntern(bool pause); uint32 _totalStartups; uint32 _totalScreenManagers; -- cgit v1.2.3 From 62d0a0d1d1e3735e4898729493ea2dcaa7f85df4 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 23 May 2008 20:40:28 +0000 Subject: Implemented GobEngine::pauseEngineIntern() svn-id: r32233 --- engines/gob/coktelvideo.cpp | 5 +++++ engines/gob/coktelvideo.h | 7 ++++++- engines/gob/gob.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++++ engines/gob/gob.h | 5 +++++ engines/gob/videoplayer.cpp | 9 +++++++++ engines/gob/videoplayer.h | 2 ++ 6 files changed, 75 insertions(+), 1 deletion(-) diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp index d6cbd5c2b5..729927eb94 100644 --- a/engines/gob/coktelvideo.cpp +++ b/engines/gob/coktelvideo.cpp @@ -340,6 +340,11 @@ void Imd::waitEndFrame() { g_system->delayMillis(_frameLength); } +void Imd::notifyPaused(uint32 duration) { + if (_soundStage == 2) + _soundStartTime += duration; +} + void Imd::copyCurrentFrame(byte *dest, uint16 left, uint16 top, uint16 width, uint16 height, uint16 x, uint16 y, uint16 pitch, int16 transp) { diff --git a/engines/gob/coktelvideo.h b/engines/gob/coktelvideo.h index 581ac2ae81..31b220cd56 100644 --- a/engines/gob/coktelvideo.h +++ b/engines/gob/coktelvideo.h @@ -134,7 +134,7 @@ public: /** Use an own memory block as video memory. */ virtual void setVideoMemory() = 0; - /** Play sound (if the IMD has sound). */ + /** Play sound (if the video has sound). */ virtual void enableSound(Audio::Mixer &mixer) = 0; /** Don't play sound or stop currently playing sound. */ virtual void disableSound() = 0; @@ -155,6 +155,9 @@ public: /** Wait for the frame to end. */ virtual void waitEndFrame() = 0; + /** Notifies the video that it was paused for duration ms. */ + virtual void notifyPaused(uint32 duration) = 0; + /** Copy the current frame. * * @param dest The memory to which to copy the current frame. @@ -213,6 +216,8 @@ public: State nextFrame(); void waitEndFrame(); + void notifyPaused(uint32 duration); + void copyCurrentFrame(byte *dest, uint16 left, uint16 top, uint16 width, uint16 height, uint16 x, uint16 y, uint16 pitch, int16 transp = -1); diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 7926f6220e..9990ed5a8a 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -75,6 +75,8 @@ GobEngine::GobEngine(OSystem *syst) : Engine(syst) { _scenery = 0; _draw = 0; _util = 0; _video = 0; _saveLoad = 0; + _pauseStart = 0; + // Setup mixer _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); @@ -248,6 +250,52 @@ int GobEngine::init() { return 0; } +void GobEngine::pauseEngineIntern(bool pause) { + if (pause) { + _pauseStart = _system->getMillis(); + } else { + uint32 duration = _system->getMillis() - _pauseStart; + + _vm->_vidPlayer->notifyPaused(duration); + + _vm->_game->_startTimeKey += duration; + _vm->_draw->_cursorTimeKey += duration; + if (_vm->_inter->_soundEndTimeKey != 0) + _vm->_inter->_soundEndTimeKey += duration; + } + + _mixer->pauseAll(pause); +} + +void GobEngine::pauseGame() { + Common::Event event; + Common::EventManager *eventMan = g_system->getEventManager(); + + pauseEngineIntern(true); + + bool end = false; + while (!end && !_quitRequested) { + if (eventMan->pollEvent(event)) { + switch (event.type) { + case Common::EVENT_KEYDOWN: + if (event.kbd.flags == Common::KBD_CTRL) + if (event.kbd.keycode == Common::KEYCODE_SPACE) + end = true; + break; + case Common::EVENT_QUIT: + _quitRequested = true; + break; + default: + break; + } + } + + _vm->_util->delay(15); + } + + pauseEngineIntern(false); +} + bool GobEngine::initGameParts() { _noMusic = MidiDriver::parseMusicDriver(ConfMan.get("music_driver")) == MD_NULL; diff --git a/engines/gob/gob.h b/engines/gob/gob.h index 812ae1edb9..ba4d8a17f5 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -178,9 +178,12 @@ private: int32 _features; Common::Platform _platform; + uint32 _pauseStart; + int go(); int init(); + void pauseEngineIntern(bool pause); bool initGameParts(); void deinitGameParts(); @@ -235,6 +238,8 @@ public: virtual ~GobEngine(); void initGame(const GOBGameDescription *gd); + + void pauseGame(); }; } // End of namespace Gob diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index c6910c1369..ebc4edfc27 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -634,4 +634,13 @@ void VideoPlayer::evalBgShading(CoktelVideo &video) { _vm->_sound->bgUnshade(); } +void VideoPlayer::notifyPaused(uint32 duration) { + if (_primaryVideo->isOpen()) + _primaryVideo->getVideo()->notifyPaused(duration); + + for (uint i = 0; i < _videoSlots.size(); i++) + if (_videoSlots[i] && _videoSlots[i]->isOpen()) + _videoSlots[i]->getVideo()->notifyPaused(duration); +} + } // End of namespace Gob diff --git a/engines/gob/videoplayer.h b/engines/gob/videoplayer.h index 278045b9e5..b7aa7313b0 100644 --- a/engines/gob/videoplayer.h +++ b/engines/gob/videoplayer.h @@ -83,6 +83,8 @@ public: void writeVideoInfo(const char *videoFile, int16 varX, int16 varY, int16 varFrames, int16 varWidth, int16 varHeight); + void notifyPaused(uint32 duration); + private: class Video { public: -- cgit v1.2.3 From 9a03a9a66516f01e512ffe790f1b9588dc1d2375 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Fri, 23 May 2008 21:02:21 +0000 Subject: Removing test code svn-id: r32234 --- engines/gob/gob.cpp | 29 ----------------------------- engines/gob/gob.h | 2 -- 2 files changed, 31 deletions(-) diff --git a/engines/gob/gob.cpp b/engines/gob/gob.cpp index 9990ed5a8a..a3fe0ebbe2 100644 --- a/engines/gob/gob.cpp +++ b/engines/gob/gob.cpp @@ -267,35 +267,6 @@ void GobEngine::pauseEngineIntern(bool pause) { _mixer->pauseAll(pause); } -void GobEngine::pauseGame() { - Common::Event event; - Common::EventManager *eventMan = g_system->getEventManager(); - - pauseEngineIntern(true); - - bool end = false; - while (!end && !_quitRequested) { - if (eventMan->pollEvent(event)) { - switch (event.type) { - case Common::EVENT_KEYDOWN: - if (event.kbd.flags == Common::KBD_CTRL) - if (event.kbd.keycode == Common::KEYCODE_SPACE) - end = true; - break; - case Common::EVENT_QUIT: - _quitRequested = true; - break; - default: - break; - } - } - - _vm->_util->delay(15); - } - - pauseEngineIntern(false); -} - bool GobEngine::initGameParts() { _noMusic = MidiDriver::parseMusicDriver(ConfMan.get("music_driver")) == MD_NULL; diff --git a/engines/gob/gob.h b/engines/gob/gob.h index ba4d8a17f5..efc9718098 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -238,8 +238,6 @@ public: virtual ~GobEngine(); void initGame(const GOBGameDescription *gd); - - void pauseGame(); }; } // End of namespace Gob -- cgit v1.2.3 From 2b24a659a78abc2c3b3c62b7278046ad7607c4f2 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 23 May 2008 22:12:18 +0000 Subject: Fixed KyraEngine_v2::pauseEngineIntern. svn-id: r32235 --- engines/kyra/kyra_v2.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index 054fab4569..eade621baa 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -99,12 +99,13 @@ void KyraEngine_v2::pauseEngineIntern(bool pause) { KyraEngine_v1::pauseEngineIntern(pause); if (!pause) { + uint32 pausedTime = _system->getMillis() - _pauseStart; + _pauseStart = 0; + for (int i = 0; i < ARRAYSIZE(_sceneSpecialScriptsTimer); ++i) { if (_sceneSpecialScriptsTimer[i]) - _sceneSpecialScriptsTimer[i] += _pauseStart; + _sceneSpecialScriptsTimer[i] += pausedTime; } - - _pauseStart = 0; } else { _pauseStart = _system->getMillis(); } -- cgit v1.2.3 From 76c43c94d15f50f77ea76e61b59fef309c086b70 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 24 May 2008 00:54:04 +0000 Subject: Changed the delayed sequence list from using a system milliseconds expiry point to a milliseconds countdown - this should fix potential problems that could arise if a modal dialog was kept on-screen too long svn-id: r32237 --- engines/lure/game.cpp | 3 +-- engines/lure/res_struct.cpp | 19 +++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/engines/lure/game.cpp b/engines/lure/game.cpp index c87f81618a..f9b31c21c5 100644 --- a/engines/lure/game.cpp +++ b/engines/lure/game.cpp @@ -167,6 +167,7 @@ void Game::execute() { if (system.getMillis() > timerVal + GAME_FRAME_DELAY) { timerVal = system.getMillis(); nextFrame(); + res.delayList().tick(); Sound.musicInterface_ContinuePlaying(); } @@ -177,8 +178,6 @@ void Game::execute() { tickCheck(); } - res.delayList().tick(); - while (events.pollEvent()) { if (events.type() == Common::EVENT_KEYDOWN) { uint16 roomNum = room.roomNumber(); diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp index 913505c8c9..f3ec7821eb 100644 --- a/engines/lure/res_struct.cpp +++ b/engines/lure/res_struct.cpp @@ -762,8 +762,8 @@ RoomExitCoordinateData &RoomExitCoordinates::getData(uint16 destRoomNumber) { SequenceDelayData::SequenceDelayData(uint16 delay, uint16 seqOffset, bool canClearFlag) { OSystem &system = *g_system; - // The delay is in number of seconds - timeoutCtr = system.getMillis() + delay * 1000; + // The delay is in number of seconds - convert it to remaining milliseconds + timeoutCtr = delay * 1000; sequenceOffset = seqOffset; canClear = canClearFlag; } @@ -784,21 +784,23 @@ void SequenceDelayList::add(uint16 delay, uint16 seqOffset, bool canClear) { } void SequenceDelayList::tick() { - uint32 currTime = g_system->getMillis(); SequenceDelayList::iterator i; - debugC(ERROR_DETAILED, kLureDebugScripts, "Delay List check start at time %d", currTime); + debugC(ERROR_DETAILED, kLureDebugScripts, "Delay List check start at time %d", + g_system->getMillis()); for (i = begin(); i != end(); i++) { SequenceDelayData *entry = (*i).get(); debugC(ERROR_DETAILED, kLureDebugScripts, "Delay List check %xh at time %d", entry->sequenceOffset, entry->timeoutCtr); - if (currTime >= entry->timeoutCtr) { + if (entry->timeoutCtr <= GAME_FRAME_DELAY) { // Timeout reached - delete entry from list and execute the sequence uint16 seqOffset = entry->sequenceOffset; erase(i); Script::execute(seqOffset); return; + } else { + entry->timeoutCtr -= GAME_FRAME_DELAY; } } } @@ -816,14 +818,12 @@ void SequenceDelayList::clear(bool forceClear) { } void SequenceDelayList::saveToStream(WriteStream *stream) { - uint32 currTime = g_system->getMillis(); SequenceDelayList::iterator i; for (i = begin(); i != end(); ++i) { SequenceDelayData *entry = (*i).get(); stream->writeUint16LE(entry->sequenceOffset); - stream->writeUint32LE((currTime > entry->timeoutCtr ) ? 0 : - entry->timeoutCtr - currTime); + stream->writeUint32LE(entry->timeoutCtr); stream->writeByte(entry->canClear); } @@ -833,10 +833,9 @@ void SequenceDelayList::saveToStream(WriteStream *stream) { void SequenceDelayList::loadFromStream(ReadStream *stream) { clear(true); uint16 seqOffset; - uint32 currTime = g_system->getMillis(); while ((seqOffset = stream->readUint16LE()) != 0) { - uint32 delay = currTime + stream->readUint32LE(); + uint32 delay = stream->readUint32LE(); bool canClear = stream->readByte() != 0; push_back(SequenceDelayList::value_type(SequenceDelayData::load(delay, seqOffset, canClear))); } -- cgit v1.2.3 From e2437d33f8d735ec3a608f7290475435a9c88584 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 24 May 2008 01:03:27 +0000 Subject: Implemented LureEngine::pauseEngineIntern svn-id: r32238 --- engines/lure/lure.cpp | 10 ++++++++++ engines/lure/lure.h | 1 + 2 files changed, 11 insertions(+) diff --git a/engines/lure/lure.cpp b/engines/lure/lure.cpp index de213b4f5a..06d3b1984e 100644 --- a/engines/lure/lure.cpp +++ b/engines/lure/lure.cpp @@ -154,6 +154,16 @@ int LureEngine::go() { return 0; } +void LureEngine::pauseEngineIntern(bool pause) { + Engine::pauseEngineIntern(pause); + + if (pause) { + Sound.pause(); + } else { + Sound.resume(); + } +} + void LureEngine::quitGame() { _system->quit(); } diff --git a/engines/lure/lure.h b/engines/lure/lure.h index fa70abc1f0..d66f446247 100644 --- a/engines/lure/lure.h +++ b/engines/lure/lure.h @@ -69,6 +69,7 @@ public: virtual int init(); virtual int go(); + virtual void pauseEngineIntern(bool pause); void quitGame(); Disk &disk() { return *_disk; } -- cgit v1.2.3 From 93de8c71b8bc2194989351cdc4b76d5f9c2bf4e3 Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 24 May 2008 01:05:32 +0000 Subject: Fixed compiler warning of unused variable svn-id: r32239 --- engines/lure/res_struct.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/engines/lure/res_struct.cpp b/engines/lure/res_struct.cpp index f3ec7821eb..de09f982d1 100644 --- a/engines/lure/res_struct.cpp +++ b/engines/lure/res_struct.cpp @@ -760,8 +760,6 @@ RoomExitCoordinateData &RoomExitCoordinates::getData(uint16 destRoomNumber) { // The following classes hold any sequence offsets that are being delayed SequenceDelayData::SequenceDelayData(uint16 delay, uint16 seqOffset, bool canClearFlag) { - OSystem &system = *g_system; - // The delay is in number of seconds - convert it to remaining milliseconds timeoutCtr = delay * 1000; sequenceOffset = seqOffset; -- cgit v1.2.3 From 9c5014f6b96c00f83eaa1127f91b359cc3bdd98f Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 24 May 2008 01:06:19 +0000 Subject: Update HE version of another English Windows version of Putt Putt Saves The Zoo. svn-id: r32240 --- engines/scumm/scumm-md5.h | 4 ++-- tools/scumm-md5.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 2600879c7a..a95fe790b2 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Fri May 23 06:23:48 2008 + This file was generated by the md5table tool on Sat May 24 00:59:21 2008 DO NOT EDIT MANUALLY! */ @@ -157,7 +157,7 @@ static const MD5Table md5table[] = { { "39fd6db10d0222d817025c4d3346e3b4", "farm", "", "Demo", -1, Common::EN_ANY, Common::kPlatformMacintosh }, { "3a03dab514e4038df192d8a8de469788", "atlantis", "", "Floppy", -1, Common::EN_ANY, Common::kPlatformAmiga }, { "3a0c35f3c147b98a2bdf8d400cfc4ab5", "indy3", "FM-TOWNS", "", -1, Common::JA_JPN, Common::kPlatformFMTowns }, - { "3a3e592b074f595489f7f11e150c398d", "puttzoo", "HE 100", "Updated", -1, Common::EN_USA, Common::kPlatformWindows }, + { "3a3e592b074f595489f7f11e150c398d", "puttzoo", "HE 99", "Updated", -1, Common::EN_USA, Common::kPlatformWindows }, { "3a5d13675e9a23aedac0bac7730f0ac1", "samnmax", "", "CD", -1, Common::FR_FRA, Common::kPlatformMacintosh }, { "3a5ec90d556d4920976c5578bfbfaf79", "maniac", "NES", "extracted", -1, Common::DE_DEU, Common::kPlatformNES }, { "3af61c5edf8e15b43dbafd285b2e9777", "puttcircus", "", "Demo", -1, Common::HB_ISR, Common::kPlatformWindows }, diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt index 5208c59aec..6e1a42a99d 100644 --- a/tools/scumm-md5.txt +++ b/tools/scumm-md5.txt @@ -697,7 +697,7 @@ puttzoo Putt-Putt Saves the Zoo c3b22fa4654bb580b20325ebf4174841 -1 nl Windows - - - joostp 9781422e4288dbc090720e4563168ba7 -1 fr Windows - - - gist974 92e7727e67f5cd979d8a1070e4eb8cb3 -1 en All HE 98.5 Updated - cyx - 3a3e592b074f595489f7f11e150c398d -1 us Windows HE 100 Updated - Adrian + 3a3e592b074f595489f7f11e150c398d -1 us Windows HE 99 Updated - Adrian 3486ede0f904789267d4bcc5537a46d4 -1 en Mac - Demo - khalek d220d154aafbfa12bd6f3ab1b2dae420 -1 de Mac - Demo - Joachim Eberhard -- cgit v1.2.3 From 942f838924f286cc23258dd538199dbcda8c9929 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 24 May 2008 01:17:04 +0000 Subject: Add Max's patch for AGOSEngine::pauseEngineIntern(). svn-id: r32241 --- engines/agos/agos.cpp | 32 +++++++++++++++++++------------- engines/agos/agos.h | 1 + 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/engines/agos/agos.cpp b/engines/agos/agos.cpp index 51619bd3cb..9b22240f83 100644 --- a/engines/agos/agos.cpp +++ b/engines/agos/agos.cpp @@ -917,25 +917,31 @@ GUI::Debugger *AGOSEngine::getDebugger() { return _debugger; } -void AGOSEngine::pause() { - _keyPressed.reset(); - _pause = true; - bool ambient_status = _ambientPaused; - bool music_status = _musicPaused; +void AGOSEngine::pauseEngineIntern(bool pauseIt) { + if (pauseIt) { + _keyPressed.reset(); + _pause = true; + + _midi.pause(true); + _mixer->pauseAll(true); + _sound->ambientPause(true); + } else { + _pause = false; - _midi.pause(true); - _mixer->pauseAll(true); - _sound->ambientPause(true); + _midi.pause(_musicPaused); + _mixer->pauseAll(false); + _sound->ambientPause(_ambientPaused); + } +} + +void AGOSEngine::pause() { + pauseEngine(true); while (_pause) { delay(1); if (_keyPressed.keycode == Common::KEYCODE_p) - _pause = false; + pauseEngine(false); } - - _midi.pause(music_status); - _mixer->pauseAll(false); - _sound->ambientPause(ambient_status); } int AGOSEngine::go() { diff --git a/engines/agos/agos.h b/engines/agos/agos.h index 1d5eda8392..448d26a9d0 100644 --- a/engines/agos/agos.h +++ b/engines/agos/agos.h @@ -1205,6 +1205,7 @@ protected: void checkTimerCallback(); void delay(uint delay); void pause(); + virtual void pauseEngineIntern(bool pause); void waitForMark(uint i); void scrollScreen(); -- cgit v1.2.3 From d766719a65b3f8f968b2fbc81b6443220248ebfc Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 24 May 2008 13:51:25 +0000 Subject: fix for missing spellbook and letter text in the floppy versions svn-id: r32242 --- engines/kyra/gui_hof.cpp | 4 ++-- engines/kyra/script_hof.cpp | 2 +- engines/kyra/staticres.cpp | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp index 10f7f657a3..f7b2b4418d 100644 --- a/engines/kyra/gui_hof.cpp +++ b/engines/kyra/gui_hof.cpp @@ -455,12 +455,12 @@ void KyraEngine_HoF::showBookPage() { char filename[16]; sprintf(filename, "PAGE%.01X.", _bookCurPage); - strcat(filename, _languageExtension[_lang]); + strcat(filename, _languageExtension[(_flags.platform == Common::kPlatformPC && _flags.isTalkie) ? _lang : 4]); uint8 *leftPage = _res->fileData(filename, 0); int leftPageY = _bookPageYOffset[_bookCurPage]; sprintf(filename, "PAGE%.01X.", _bookCurPage+1); - strcat(filename, _languageExtension[_lang]); + strcat(filename, _languageExtension[(_flags.platform == Common::kPlatformPC && _flags.isTalkie) ? _lang : 4]); uint8 *rightPage = (_bookCurPage != _bookMaxPage) ? _res->fileData(filename, 0) : 0; int rightPageY = _bookPageYOffset[_bookCurPage+1]; diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index d2b6b08183..2e90379e62 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -800,7 +800,7 @@ int KyraEngine_HoF::o2_showLetter(EMCState *script) { _screen->fadeToBlack(0x14); sprintf(filename, "LETTER%.1d.", letter); - strcat(filename, _languageExtension[_lang]); + strcat(filename, _languageExtension[(_flags.platform == Common::kPlatformPC && _flags.isTalkie) ? _lang : 4]); uint8 *letterBuffer = _res->fileData(filename, 0); if (letterBuffer) { diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 42d1e6b0df..fe9925c44e 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -1548,7 +1548,8 @@ const char *KyraEngine_HoF::_languageExtension[] = { "GER",/*, "ITA", Italian and Spanish were never included "SPA"*/ - "JPN" + "JPN", + "TXT" // This is used for spell book and letter text }; const char *KyraEngine_HoF::_scriptLangExt[] = { -- cgit v1.2.3 From 6af9fcc57991c504382bd5a3be65fc4992c2e868 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 24 May 2008 14:12:32 +0000 Subject: Made the startup log output a bit more informative svn-id: r32243 --- base/main.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/base/main.cpp b/base/main.cpp index c36c506d7f..ff246fd8b3 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -90,17 +90,20 @@ static const EnginePlugin *detectPlugin() { ConfMan.set("gameid", gameid); // Query the plugins and find one that will handle the specified gameid - printf("Looking for %s\n", gameid.c_str()); + printf("User picked target '%s' (gameid '%s')...\n", ConfMan.getActiveDomainName().c_str(), gameid.c_str()); + printf(" Looking for a plugin supporting this gameid... "); GameDescriptor game = EngineMan.findGame(gameid, &plugin); if (plugin == 0) { - printf("Failed game detection\n"); + printf("failed\n"); warning("%s is an invalid gameid. Use the --list-games option to list supported gameid", gameid.c_str()); return 0; + } else { + printf("%s\n", plugin->getName()); } // FIXME: Do we really need this one? - printf("Trying to start game '%s'\n", game.description().c_str()); + printf(" Starting '%s'\n", game.description().c_str()); return plugin; } -- cgit v1.2.3 From b36354c998f19411f35f968895a4dd83546ffa5b Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 24 May 2008 14:23:16 +0000 Subject: Added the Italien version of Woodruff, as supplied by DjDiabolik in bug report #1891864 svn-id: r32244 --- engines/gob/detection.cpp | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp index cbc9272e80..f1efccc808 100644 --- a/engines/gob/detection.cpp +++ b/engines/gob/detection.cpp @@ -1684,6 +1684,71 @@ static const GOBGameDescription gameDescriptions[] = { kFeatures640, "intro" }, + { // Supplied by DjDiabolik in bug report #1971294 + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee0070556a96d8", 7069736), + EN_GRB, + kPlatformPC, + Common::ADGF_NO_FLAGS + }, + kGameTypeWoodruff, + kFeatures640, + "intro" + }, + { // Supplied by DjDiabolik in bug report #1971294 + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee0070556a96d8", 7069736), + DE_DEU, + kPlatformPC, + Common::ADGF_NO_FLAGS + }, + kGameTypeWoodruff, + kFeatures640, + "intro" + }, + { // Supplied by DjDiabolik in bug report #1971294 + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee0070556a96d8", 7069736), + FR_FRA, + kPlatformPC, + Common::ADGF_NO_FLAGS + }, + kGameTypeWoodruff, + kFeatures640, + "intro" + }, + { // Supplied by DjDiabolik in bug report #1971294 + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee0070556a96d8", 7069736), + IT_ITA, + kPlatformPC, + Common::ADGF_NO_FLAGS + }, + kGameTypeWoodruff, + kFeatures640, + "intro" + }, + { // Supplied by DjDiabolik in bug report #1971294 + { + "woodruff", + "", + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee0070556a96d8", 7069736), + ES_ESP, + kPlatformPC, + Common::ADGF_NO_FLAGS + }, + kGameTypeWoodruff, + kFeatures640, + "intro" + }, { { "dynasty", -- cgit v1.2.3 From 182ae52a98671fcd398446e5ac4ef983f5a17873 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 24 May 2008 14:44:22 +0000 Subject: typo svn-id: r32245 --- sound/softsynth/mt32/mt32emu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/softsynth/mt32/mt32emu.h b/sound/softsynth/mt32/mt32emu.h index 0aa4df7488..6eedf04bc0 100644 --- a/sound/softsynth/mt32/mt32emu.h +++ b/sound/softsynth/mt32/mt32emu.h @@ -29,7 +29,7 @@ #define MT32EMU_MONITOR_PARTIALS 0 // Determines how the waveform cache file is handled (must be regenerated after sampling rate change) #define MT32EMU_WAVECACHEMODE 0 // Load existing cache if possible, otherwise generate and save cache -//#define MT32EMU_WAVECACHEMODE 1 // Load existing cache if possible, otherwise generage but don't save cache +//#define MT32EMU_WAVECACHEMODE 1 // Load existing cache if possible, otherwise generate but don't save cache //#define MT32EMU_WAVECACHEMODE 2 // Ignore existing cache, generate and save cache //#define MT32EMU_WAVECACHEMODE 3 // Ignore existing cache, generate but don't save cache -- cgit v1.2.3 From afa92cf083e8a43a1ff6b9290763327e71ca1551 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sat, 24 May 2008 14:54:22 +0000 Subject: Added updateStatic()'s sanity checks to renderStatic() as well. Fixes an invalid read when entering the red light district svn-id: r32246 --- engines/gob/scenery.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/gob/scenery.cpp b/engines/gob/scenery.cpp index fa7944c203..2da6b092e0 100644 --- a/engines/gob/scenery.cpp +++ b/engines/gob/scenery.cpp @@ -286,6 +286,9 @@ void Scenery::renderStatic(int16 scenery, int16 layer) { pieceIndex = planePtr->pieceIndex; pictIndex = planePtr->pictIndex - 1; + if ((pictIndex >= _staticPictCount[scenery]) || (!ptr->pieces)) + continue; + _vm->_draw->_destSpriteX = planePtr->destX; _vm->_draw->_destSpriteY = planePtr->destY; left = FROM_LE_16(ptr->pieces[pictIndex][pieceIndex].left); -- cgit v1.2.3 From 556bab2b817cce7cc476e44ef778af6de44a98ba Mon Sep 17 00:00:00 2001 From: Neil Millstone Date: Sat, 24 May 2008 14:57:18 +0000 Subject: Adding getFileSystemFactory() method in response to mail on scummvm-devel. svn-id: r32247 --- backends/platform/ds/arm9/source/osystem_ds.cpp | 5 +++++ backends/platform/ds/arm9/source/osystem_ds.h | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index 2381abab5e..1d8d39dcab 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -37,6 +37,7 @@ #include "cdaudio.h" #include "graphics/surface.h" #include "touchkeyboard.h" +#include "ds-fs-factory.h" OSystem_DS* OSystem_DS::_instance = NULL; @@ -416,6 +417,10 @@ void OSystem_DS::getTimeAndDate(struct tm &t) const { t = *localtime(&curTime); } +FilesystemFactory *OSystem_DS::getFilesystemFactory() { + return &DSFilesystemFactory::instance(); +} + OSystem::MutexRef OSystem_DS::createMutex(void) { return NULL; } diff --git a/backends/platform/ds/arm9/source/osystem_ds.h b/backends/platform/ds/arm9/source/osystem_ds.h index 5d0c5901e5..246797188f 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.h +++ b/backends/platform/ds/arm9/source/osystem_ds.h @@ -155,8 +155,7 @@ public: virtual void clearAutoComplete(); virtual void setCharactersEntered(int count); - - + FilesystemFactory *getFilesystemFactory(); }; static const OSystem::GraphicsMode s_supportedGraphicsModes[] = { -- cgit v1.2.3 From d0194206498ab28efcfd2ed591041c901da78048 Mon Sep 17 00:00:00 2001 From: Neil Millstone Date: Sat, 24 May 2008 15:01:19 +0000 Subject: Removing DS ifdef from getFileSystemFactory(). svn-id: r32248 --- common/system.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/system.cpp b/common/system.cpp index 5510bb59ec..f133f3c4e3 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -137,11 +137,9 @@ void OSystem::clearScreen() { #endif FilesystemFactory *OSystem::getFilesystemFactory() { - #if defined(__amigaos4__) || defined(__DC__) || defined(__SYMBIAN32__) || defined(UNIX) || defined(WIN32) || defined(__PSP__) + #if defined(__amigaos4__) || defined(__DC__) || defined(__SYMBIAN32__) || defined(UNIX) || defined(WIN32) || defined(__PSP__) || defined(__DS__) // These ports already implement this function, so it should never be called. return 0; - #elif defined(__DS__) - return &DSFilesystemFactory::instance(); #elif defined(PALMOS_MODE) return &PalmOSFilesystemFactory::instance(); #elif defined(__PLAYSTATION2__) -- cgit v1.2.3 From 0efebd98761fc558f9c3082dbfa7239353520571 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 24 May 2008 16:30:18 +0000 Subject: - add support for HOF floppy versions - playing directly from installer files (WESTWOOD.00X) is supported (not recommended for low-end machines and certain ports) svn-id: r32249 --- engines/kyra/detection.cpp | 103 +++++- engines/kyra/kyra_hof.cpp | 2 + engines/kyra/kyra_v1.h | 11 +- engines/kyra/resource.cpp | 813 ++++++++++++++++++++++++++++++++++++++++- engines/kyra/resource.h | 9 +- engines/kyra/sequences_hof.cpp | 2 + 6 files changed, 904 insertions(+), 36 deletions(-) diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index 3c4c87e12b..a3ca2f829e 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -41,22 +41,25 @@ struct KYRAGameDescription { namespace { -#define FLAGS(x, y, z, a, b, id) { Common::UNK_LANG, Common::kPlatformUnknown, x, y, z, a, b, id } - -#define KYRA1_FLOPPY_FLAGS FLAGS(false, false, false, false, false, Kyra::GI_KYRA1) -#define KYRA1_AMIGA_FLAGS FLAGS(false, false, false, false, false, Kyra::GI_KYRA1) -#define KYRA1_TOWNS_FLAGS FLAGS(false, true, false, false, false, Kyra::GI_KYRA1) -#define KYRA1_TOWNS_SJIS_FLAGS FLAGS(false, true, false, true, false, Kyra::GI_KYRA1) -#define KYRA1_CD_FLAGS FLAGS(false, true, true, false, false, Kyra::GI_KYRA1) -#define KYRA1_DEMO_FLAGS FLAGS(true, false, false, false, false, Kyra::GI_KYRA1) - -#define KYRA2_CD_FLAGS FLAGS(false, false, true, false, false, Kyra::GI_KYRA2) -#define KYRA2_CD_DEMO_FLAGS FLAGS(true, false, true, false, false, Kyra::GI_KYRA2) -#define KYRA2_DEMO_FLAGS FLAGS(true, false, false, false, false, Kyra::GI_KYRA2) -#define KYRA2_TOWNS_FLAGS FLAGS(false, false, false, false, false, Kyra::GI_KYRA2) -#define KYRA2_TOWNS_SJIS_FLAGS FLAGS(false, false, false, true, false, Kyra::GI_KYRA2) - -#define KYRA3_CD_FLAGS FLAGS(false, false, true, false, true, Kyra::GI_KYRA3) +#define FLAGS(x, y, z, a, b, c, id) { Common::UNK_LANG, Common::kPlatformUnknown, x, y, z, a, b, c, id } + +#define KYRA1_FLOPPY_FLAGS FLAGS(false, false, false, false, false, false, Kyra::GI_KYRA1) +#define KYRA1_AMIGA_FLAGS FLAGS(false, false, false, false, false, false, Kyra::GI_KYRA1) +#define KYRA1_TOWNS_FLAGS FLAGS(false, true, false, false, false, false, Kyra::GI_KYRA1) +#define KYRA1_TOWNS_SJIS_FLAGS FLAGS(false, true, false, true, false, false, Kyra::GI_KYRA1) +#define KYRA1_CD_FLAGS FLAGS(false, true, true, false, false, false, Kyra::GI_KYRA1) +#define KYRA1_DEMO_FLAGS FLAGS(true, false, false, false, false, false, Kyra::GI_KYRA1) + +#define KYRA2_FLOPPY_FLAGS FLAGS(false, false, false, false, false, false, Kyra::GI_KYRA2) +#define KYRA2_FLOPPY_CMP_FLAGS FLAGS(false, false, false, false, false, true, Kyra::GI_KYRA2) +#define KYRA2_CD_FLAGS FLAGS(false, false, true, false, false, false, Kyra::GI_KYRA2) +#define KYRA2_CD_DEMO_FLAGS FLAGS(true, false, true, false, false, false, Kyra::GI_KYRA2) +#define KYRA2_DEMO_FLAGS FLAGS(true, false, false, false, false, false, Kyra::GI_KYRA2) +#define KYRA2_TOWNS_FLAGS FLAGS(false, false, false, false, false, false, Kyra::GI_KYRA2) +#define KYRA2_TOWNS_SJIS_FLAGS FLAGS(false, false, false, true, false, false, Kyra::GI_KYRA2) + +#define KYRA3_CD_FLAGS FLAGS(false, false, true, false, true, true, Kyra::GI_KYRA3) +#define KYRA3_CD_INS_FLAGS FLAGS(false, false, true, false, true, true, Kyra::GI_KYRA3) const KYRAGameDescription adGameDescs[] = { { @@ -296,6 +299,66 @@ const KYRAGameDescription adGameDescs[] = { KYRA1_DEMO_FLAGS }, + { // Floppy version + { + "kyra2", + 0, + AD_ENTRY1("WESTWOOD.001", "3f52dda68c4f7696c8309038be9f4151"), + Common::EN_ANY, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + KYRA2_FLOPPY_CMP_FLAGS + }, + + { // Floppy version + { + "kyra2", + 0, + AD_ENTRY1("WESTWOOD.001", "d787b9559afddfe058b84c0b3a787224"), + Common::DE_DEU, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + KYRA2_FLOPPY_CMP_FLAGS + }, + + { // // Floppy version extracted + { + "kyra2", + "Extracted", + AD_ENTRY1("FATE.PAK", "1ba18be685ad8e5a0ab5d46a0ce4d345"), + Common::EN_ANY, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + KYRA2_FLOPPY_FLAGS + }, + + { // Floppy version extracted + { + "kyra2", + "Extracted", + AD_ENTRY1("FATE.PAK", "262fb69dd8e52e596c7aefc6456f7c1b"), + Common::DE_DEU, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + KYRA2_FLOPPY_FLAGS + }, + + { // Floppy version extracted + { + "kyra2", + "Extracted", + AD_ENTRY1("FATE.PAK", "f7de11506b4c8fdf64bc763206c3e4e7"), + Common::FR_FRA, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + KYRA2_FLOPPY_FLAGS + }, + { // CD version { "kyra2", @@ -417,7 +480,7 @@ const KYRAGameDescription adGameDescs[] = { Common::kPlatformPC, Common::ADGF_DROPLANGUAGE }, - KYRA3_CD_FLAGS + KYRA3_CD_INS_FLAGS }, { { @@ -432,7 +495,7 @@ const KYRAGameDescription adGameDescs[] = { Common::kPlatformPC, Common::ADGF_DROPLANGUAGE }, - KYRA3_CD_FLAGS + KYRA3_CD_INS_FLAGS }, { { @@ -447,7 +510,7 @@ const KYRAGameDescription adGameDescs[] = { Common::kPlatformPC, Common::ADGF_DROPLANGUAGE }, - KYRA3_CD_FLAGS + KYRA3_CD_INS_FLAGS }, // installed version @@ -497,7 +560,7 @@ const KYRAGameDescription adGameDescs[] = { KYRA3_CD_FLAGS }, - { AD_TABLE_END_MARKER, FLAGS(0, 0, 0, 0, 0, 0) } + { AD_TABLE_END_MARKER, FLAGS(0, 0, 0, 0, 0, 0, 0) } }; const PlainGameDescriptor gameList[] = { diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 0bc5162e94..09388fb567 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -254,6 +254,8 @@ int KyraEngine_HoF::go() { if (_menuChoice != 4) { // load just the pak files needed for ingame _res->loadPakFile(StaticResource::staticDataFilename()); + if (_flags.useInstallerPackage) + _res->loadPakFile("WESTWOOD.001"); if (_flags.platform == Common::kPlatformPC && _flags.isTalkie) _res->loadFileList("FILEDATA.FDT"); else diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h index 2278cc81df..4f38ceca98 100644 --- a/engines/kyra/kyra_v1.h +++ b/engines/kyra/kyra_v1.h @@ -46,11 +46,12 @@ struct GameFlags { Common::Language lang; Common::Platform platform; - bool isDemo : 1; - bool useAltShapeHeader : 1; // alternative shape header (uses 2 bytes more, those are unused though) - bool isTalkie : 1; - bool useHiResOverlay : 1; - bool useDigSound : 1; + bool isDemo : 1; + bool useAltShapeHeader : 1; // alternative shape header (uses 2 bytes more, those are unused though) + bool isTalkie : 1; + bool useHiResOverlay : 1; + bool useDigSound : 1; + bool useInstallerPackage : 1; byte gameID; }; diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 635d00f993..a65093915a 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -34,6 +34,8 @@ #include "kyra/resource.h" +#define INS_CACHE_THRESHOLD 300000 // all files with file size greater than this will be cached + namespace Kyra { Resource::Resource(KyraEngine_v1 *vm) : _loaders(), _map(), _vm(vm) { @@ -69,6 +71,9 @@ bool Resource::reset() { if (_vm->gameFlags().isTalkie) loadPakFile("CHAPTER1.VRM"); } else if (_vm->game() == GI_KYRA2) { + if (_vm->gameFlags().useInstallerPackage) + loadPakFile("WESTWOOD.001"); + // mouse pointer, fonts, etc. required for initializing if (_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie) { loadPakFile("GENERAL.PAK"); @@ -85,11 +90,12 @@ bool Resource::reset() { return true; } else if (_vm->game() == GI_KYRA3) { + if (_vm->gameFlags().useInstallerPackage) + loadPakFile("WESTWOOD.001"); // Add default file directories Common::File::addDefaultDirectory(ConfMan.get("path") + "malcolm"); Common::File::addDefaultDirectory(ConfMan.get("path") + "MALCOLM"); - loadPakFile("WESTWOOD.001"); loadFileList("FILEDATA.FDT"); return true; @@ -579,7 +585,788 @@ Common::SeekableReadStream *ResLoaderPak::loadFileFromArchive(const Common::Stri return stream; } -class ResLoaderIns : public ResArchiveLoader { +class ResLoaderInsKyra : public ResArchiveLoader { +public: + bool checkFilename(Common::String filename) const; + bool isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const; + bool loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const; + Common::SeekableReadStream *loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const; + + ResFileEntry::kType getType() const { + return ResFileEntry::kInsKyra; + } +}; + +bool ResLoaderInsKyra::checkFilename(Common::String filename) const { + return false; +} + +bool ResLoaderInsKyra::isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const { + return true; +} + +bool ResLoaderInsKyra::loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const { + return true; +} + +Common::SeekableReadStream *ResLoaderInsKyra::loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const { + return 0; +} + +class FileExpanderSource { +public: + FileExpanderSource(const uint8 *data) : _dataPtr(data), _bitsLeft(8), _key(0), _index(0) {} + ~FileExpanderSource() {} + + void advSrcRefresh(); + void advSrcBitsBy1(); + void advSrcBitsByIndex(uint8 newIndex); + + uint8 getKeyLower() { return _key & 0xff; } + void setIndex(uint8 index) { _index = index; } + uint16 getKeyMasked(uint8 newIndex); + uint16 keyMaskedAlign(uint16 val); + + void copyBytes(uint8 *& dst); + +private: + const uint8 *_dataPtr; + uint16 _key; + int8 _bitsLeft; + uint8 _index; +}; + +void FileExpanderSource::advSrcBitsBy1() { + _key >>= 1; + if (!--_bitsLeft) { + _key = ((*_dataPtr++) << 8 ) | (_key & 0xff); + _bitsLeft = 8; + } +} + +void FileExpanderSource::advSrcBitsByIndex(uint8 newIndex) { + _index = newIndex; + _bitsLeft -= _index; + if (_bitsLeft <= 0) { + _key >>= (_index + _bitsLeft); + _index = -_bitsLeft; + _bitsLeft = 8 - _index; + _key = (*_dataPtr++ << 8) | (_key & 0xff); + } + _key >>= _index; +} + +uint16 FileExpanderSource::getKeyMasked(uint8 newIndex) { + static const uint8 mskTable[] = { 0x0F, 0x01, 0x03, 0x07, 0x0F, 0x1F, 0x3F, 0x7F, 0xFF }; + _index = newIndex; + uint16 res = 0; + + if (_index > 8) { + newIndex = _index - 8; + res = (_key & 0xff) & mskTable[8]; + advSrcBitsByIndex(8); + _index = newIndex; + res |= (((_key & 0xff) & mskTable[_index]) << 8); + advSrcBitsByIndex(_index); + } else { + res = (_key & 0xff) & mskTable[_index]; + advSrcBitsByIndex(_index); + } + + return res; +} + +void FileExpanderSource::copyBytes(uint8 *& dst) { + advSrcBitsByIndex(_bitsLeft); + uint16 r = (READ_LE_UINT16(_dataPtr) ^ _key) + 1; + _dataPtr += 2; + + if (r) + error("decompression failure"); + + memcpy(dst, _dataPtr, _key); + _dataPtr += _key; + dst += _key; +} + +uint16 FileExpanderSource::keyMaskedAlign(uint16 val) { + val -= 0x101; + _index = (val & 0xff) >> 2; + int16 b = ((_bitsLeft << 8) | _index) - 1; + _bitsLeft = b >> 8; + _index = b & 0xff; + return (((val & 3) + 4) << _index) + 0x101 + getKeyMasked(_index); +} + +void FileExpanderSource::advSrcRefresh() { + _key = READ_LE_UINT16(_dataPtr); + _dataPtr += 2; + _bitsLeft = 8; +} + +class FileExpander { +public: + FileExpander(); + ~FileExpander(); + + bool process(const uint8 * dst, const uint8 * src, uint32 outsize, uint32 insize); + +private: + void generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex2, int cnt); + uint8 calcCmdAndIndex(const uint8 *tbl, int16 ¶); + + FileExpanderSource *_src; + uint8 *_tables[9]; + uint16 *_tables16[3]; +}; + +FileExpander::FileExpander() : _src(0) { + _tables[0] = new uint8[3914]; + assert(_tables[0]); + + _tables[1] = _tables[0] + 320; + _tables[2] = _tables[0] + 352; + _tables[3] = _tables[0] + 864; + _tables[4] = _tables[0] + 2016; + _tables[5] = _tables[0] + 2528; + _tables[6] = _tables[0] + 2656; + _tables[7] = _tables[0] + 2736; + _tables[8] = _tables[0] + 2756; + + _tables16[0] = (uint16*) (_tables[0] + 3268); + _tables16[1] = (uint16*) (_tables[0] + 3302); + _tables16[2] = (uint16*) (_tables[0] + 3338); +} + +FileExpander::~FileExpander() { + delete _src; + delete [] _tables[0]; +} + +bool FileExpander::process(const uint8 * dst, const uint8 * src, uint32 outsize, uint32 compressedSize) { + static const uint8 indexTable[] = { + 0x10, 0x11, 0x12, 0x00, 0x08, 0x07, 0x09, 0x06, 0x0A, + 0x05, 0x0B, 0x04, 0x0C, 0x03, 0x0D, 0x02, 0x0E, 0x01, 0x0F + }; + + memset(_tables[0], 0, 3914); + + uint8 *d = (uint8*) dst; + uint16 tableSize0 = 0; + uint16 tableSize1 = 0; + bool needrefresh = true; + bool postprocess = false; + + _src = new FileExpanderSource(src); + + while (d < dst + outsize) { + + if (needrefresh) { + needrefresh = false; + _src->advSrcRefresh(); + } + + _src->advSrcBitsBy1(); + + int mode = _src->getKeyMasked(2) - 1; + if (mode == 1) { + tableSize0 = _src->getKeyMasked(5) + 257; + tableSize1 = _src->getKeyMasked(5) + 1; + memset(_tables[7], 0, 19); + + const uint8 *itbl = (uint8*) indexTable; + int numbytes = _src->getKeyMasked(4) + 4; + + while (numbytes--) + _tables[7][*itbl++] = _src->getKeyMasked(3); + + generateTables(7, 8, 255, 19); + + int cnt = tableSize0 + tableSize1; + uint8 *tmp = _tables[0]; + + while (cnt) { + uint16 cmd = _src->getKeyLower(); + cmd = READ_LE_UINT16(&_tables[8][cmd << 1]); + _src->advSrcBitsByIndex(_tables[7][cmd]); + + if (cmd < 16) { + *tmp++ = cmd; + cnt--; + } else { + uint8 tmpI = 0; + if (cmd == 16) { + cmd = _src->getKeyMasked(2) + 3; + tmpI = *(tmp - 1); + } else if (cmd == 17) { + cmd = _src->getKeyMasked(3) + 3; + } else { + cmd = _src->getKeyMasked(7) + 11; + } + _src->setIndex(tmpI); + memset(tmp, tmpI, cmd); + tmp += cmd; + + cnt -= cmd; + if (cnt < 0) + error("decompression failure"); + } + } + + memcpy(_tables[1], _tables[0] + tableSize0, tableSize1); + generateTables(0, 2, 3, tableSize0); + generateTables(1, 4, 5, tableSize1); + postprocess = true; + } else if (mode < 0) { + _src->copyBytes(d); + postprocess = false; + needrefresh = true; + } else if (mode == 0){ + uint16 cnt = 144; + uint8 *d2 = (uint8*) _tables[0]; + memset(d2, 8, 144); + memset(d2 + 144, 9, 112); + memset(d2 + 256, 7, 24); + memset(d2 + 280, 8, 8); + d2 = (uint8*) _tables[1]; + memset(d2, 5, 32); + tableSize0 = 288; + tableSize1 = 32; + + generateTables(0, 2, 3, tableSize0); + generateTables(1, 4, 5, tableSize1); + postprocess = true; + } else { + error("decompression failure"); + } + + if (!postprocess) + continue; + + int16 cmd = 0; + + do { + cmd = ((int16*) _tables[2])[_src->getKeyLower()]; + _src->advSrcBitsByIndex(cmd < 0 ? calcCmdAndIndex(_tables[3], cmd) : _tables[0][cmd]); + + if (cmd == 0x11d) { + cmd = 0x200; + } else if (cmd > 0x108) { + cmd = _src->keyMaskedAlign(cmd); + } + + if (!(cmd >> 8)) { + *d++ = cmd & 0xff; + } else if (cmd != 0x100) { + cmd -= 0xfe; + int16 offset = ((int16*) _tables[4])[_src->getKeyLower()]; + _src->advSrcBitsByIndex(offset < 0 ? calcCmdAndIndex(_tables[5], offset) : _tables[1][offset]); + if ((offset & 0xff) >= 4) { + uint8 newIndex = ((offset & 0xff) >> 1) - 1; + offset = (((offset & 1) + 2) << newIndex) + _src->getKeyMasked(newIndex); + } + + uint8 *s2 = d - 1 - offset; + if (s2 >= dst) { + while (cmd--) + *d++ = *s2++; + } else { + uint32 pos = dst - s2; + s2 += (d - dst); + + if (pos < (uint32) cmd) { + cmd -= pos; + while (pos--) + *d++ = *s2++; + s2 = (uint8*) dst; + } + while (cmd--) + *d++ = *s2++; + } + } + } while (cmd != 0x100); + } + + delete _src; + _src = 0; + + return true; +} + +void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex2, int cnt) { + const uint8 *tbl1 = _tables[srcIndex]; + const uint8 *tbl2 = _tables[dstIndex]; + const uint8 *tbl3 = dstIndex2 == 0xff ? 0 : _tables[dstIndex2]; + + if (!cnt) + return; + + uint8 *s = (uint8*) tbl1; + memset(_tables16[0], 0, 32); + + for (int i = 0; i < cnt; i++) + _tables16[0][(*s++)]++; + + _tables16[1][1] = 0; + + for (uint16 i = 1, r = 0; i < 16; i++) { + r = (r + _tables16[0][i]) << 1; + _tables16[1][i + 1] = r; + } + + if (_tables16[1][16]) { + uint16 r = 0; + for (uint16 i = 1; i < 16; i++) + r += _tables16[0][i]; + if (r > 1) + error("decompression failure"); + } + + s = (uint8*) tbl1; + uint16 *d = _tables16[2]; + for (int i = 0; i < cnt; i++) { + uint16 t = *s++; + if (t) { + _tables16[1][t]++; + t = _tables16[1][t] - 1; + } + *d++ = t; + } + + s = (uint8*) tbl1; + d = _tables16[2]; + for (int i = 0; i < cnt; i++) { + int8 t = ((int8)(*s++)) - 1; + if (t > 0) { + uint16 v1 = *d; + uint16 v2 = 0; + + do { + v2 = (v2 << 1) | (v1 & 1); + v1 >>= 1; + } while (--t && v1); + + t++; + uint8 c1 = (v1 & 1); + while (t--) { + uint8 c2 = v2 >> 15; + v2 = (v2 << 1) | c1; + c1 = c2; + }; + + *d++ = v2; + } else { + d++; + } + } + + memset((void*) tbl2, 0, 512); + + cnt--; + s = (uint8*) tbl1 + cnt; + d = &_tables16[2][cnt]; + uint16 * bt = (uint16*) tbl3; + uint16 inc = 0; + uint16 cnt2 = 0; + + do { + uint8 t = *s--; + uint16 *s2 = (uint16*) tbl2; + + if (t && t < 9) { + inc = 1 << t; + uint16 o = *d; + + do { + s2[o] = cnt; + o += inc; + } while (!(o & 0xf00)); + + } else if (t > 8) { + if (!bt) + error("decompression failure"); + + t -= 8; + uint8 shiftCnt = 1; + uint8 v = (*d) >> 8; + s2 = &((uint16*) tbl2)[*d & 0xff]; + + do { + if (!*s2) { + *s2 = (uint16)(~cnt2); + *(uint32*)&bt[cnt2] = 0; + cnt2 += 2; + } + + s2 = &bt[(uint16)(~*s2)]; + if (v & shiftCnt) + s2++; + + shiftCnt <<= 1; + } while (--t); + *s2 = cnt; + } + d--; + } while (--cnt >= 0); +} + +uint8 FileExpander::calcCmdAndIndex(const uint8 *tbl, int16 ¶) { + const uint16 *t = (uint16*) tbl; + _src->advSrcBitsByIndex(8); + uint8 newIndex = 0; + uint16 v = _src->getKeyLower(); + + do { + newIndex++; + para = t[((~para) & 0xfffe) | (v & 1)]; + v >>= 1; + } while (para < 0); + + return newIndex; +} + +class FileCache { +public: + FileCache() : _size(0) {} + ~FileCache() {} + + void add(ResFileEntry entry, const uint8 *data); + bool getData(ResFileEntry entry, uint8 *dst); + void flush(); + +private: + struct FileCacheEntry { + ResFileEntry entry; + const uint8 *data; + }; + + Common::List _cachedFileList; + uint32 _size; +}; + +void FileCache::add(ResFileEntry entry, const uint8 *data) { + FileCacheEntry fileCacheEntry; + fileCacheEntry.entry.compressedSize = entry.compressedSize; + fileCacheEntry.entry.mounted = entry.mounted; + fileCacheEntry.entry.offset = entry.offset; + fileCacheEntry.entry.parent = entry.parent; + fileCacheEntry.entry.preload = entry.preload; + fileCacheEntry.entry.prot = entry.prot; + fileCacheEntry.entry.size = entry.size; + fileCacheEntry.entry.type = entry.type; + fileCacheEntry.entry.fileIndex = entry.fileIndex; + uint8 *dst = new uint8[entry.size]; + assert(dst); + memcpy(dst, data, entry.size); + fileCacheEntry.data = dst; + _cachedFileList.push_back(fileCacheEntry); + _size += entry.size; +} + +bool FileCache::getData(ResFileEntry entry, uint8 *dst) { + for (Common::List::const_iterator c = _cachedFileList.begin(); c != _cachedFileList.end(); ++c) { + if (c->entry.offset == entry.offset && c->entry.compressedSize == entry.compressedSize && + c->entry.fileIndex == entry.fileIndex && c->entry.size == entry.size) { + memcpy(dst, c->data, c->entry.size); + return true; + } + } + return false; +} + +void FileCache::flush() { + debug("total amount of cache memory used: %d", _size); + for (Common::List::const_iterator c = _cachedFileList.begin(); c != _cachedFileList.end(); ++c) + delete [] c->data; + _cachedFileList.clear(); + _size = 0; +} + +class ResLoaderInsHof : public ResArchiveLoader { +public: + ResLoaderInsHof() {} + ~ResLoaderInsHof() { _fileCache.flush(); } + + bool checkFilename(Common::String filename) const; + bool isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const; + bool loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const; + Common::SeekableReadStream *loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const; + + ResFileEntry::kType getType() const { + return ResFileEntry::kInsHof; + } +private: + mutable FileCache _fileCache; +}; + +bool ResLoaderInsHof::checkFilename(Common::String filename) const { + filename.toUppercase(); + if (!filename.hasSuffix(".001")) + return false; + filename.insertChar('2', filename.size() - 1); + filename.deleteLastChar(); + if (!Common::File::exists(filename)) + return false; + return true; +} + +bool ResLoaderInsHof::isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const { + uint8 fileId = stream.readByte(); + uint32 size = stream.readUint32LE(); + + if (size < stream.size() + 1) + return false; + + return (fileId == 1); +} + +bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const { + Common::File tmpFile; + + uint32 pos = 0; + uint32 bytesleft = 0; + bool startFile = true; + + Common::String fn_base(filename.c_str(), 10); + Common::String fn_tmp; + char fn_ext[4]; + + int i = filename.size() - 1; + while (fn_base.lastChar() != '.') + fn_base.deleteLastChar(); + + struct InsHofArchive { + Common::String filename; + uint32 firstFile; + uint32 startOffset; + uint32 lastFile; + uint32 endOffset; + uint32 totalSize; + } newArchive; + + Common::List archives; + + for (int8 currentFile = 1; currentFile; currentFile++) { + sprintf(fn_ext, "%03d", currentFile); + fn_tmp = fn_base + Common::String(fn_ext); + + Common::File tmpFile; + if (!tmpFile.open(fn_tmp)) { + debug(3, "couldn't open file '%s'\n", fn_tmp); + break; + } + + tmpFile.seek(pos); + uint8 fileId = tmpFile.readByte(); + pos++; + + uint32 size = tmpFile.size() - 1; + if (startFile) { + size -= 4; + if (fileId == currentFile) { + size -= 6; + pos += 6; + tmpFile.seek(6, SEEK_CUR); + } else { + size = ++size - pos; + } + newArchive.filename = fn_base; + bytesleft = newArchive.totalSize = tmpFile.readUint32LE(); + pos += 4; + newArchive.firstFile = currentFile; + newArchive.startOffset = pos; + startFile = false; + } + + uint32 cs = MIN(size, bytesleft); + bytesleft -= cs; + + tmpFile.close(); + + pos += cs; + if (cs == size) { + if (!bytesleft) { + newArchive.lastFile = currentFile; + newArchive.endOffset = --pos; + archives.push_back(newArchive); + currentFile = -1; + } else { + pos = 0; + } + } else { + startFile = true; + bytesleft = size - cs; + newArchive.lastFile = currentFile--; + newArchive.endOffset = --pos; + archives.push_back(newArchive); + } + } + + ResFileEntry newEntry; + pos = 0; + + const uint32 kExecSize = 0x0bba; + const uint32 kHeaderSize = 30; + const uint32 kHeaderSize2 = 46; + + for (Common::List::iterator a = archives.begin(); a != archives.end(); ++a) { + bool startFile = true; + for (uint32 i = a->firstFile; i != (a->lastFile + 1); i++) { + sprintf(fn_ext, "%03d", i); + fn_tmp = a->filename + Common::String(fn_ext); + + if (!tmpFile.open(fn_tmp)) { + debug(3, "couldn't open file '%s'\n", fn_tmp); + break; + } + + uint32 size = (i == a->lastFile) ? a->endOffset : tmpFile.size(); + + if (startFile) { + startFile = false; + pos = a->startOffset + kExecSize; + if (pos > size) { + pos -= size; + tmpFile.close(); + continue; + } + } else { + pos ++; + } + + while (pos < size) { + uint8 hdr[43]; + uint32 m = 0; + tmpFile.seek(pos); + + if (pos + 42 > size) { + m = size - pos; + uint32 b = 42 - m; + + if (m >= 4) { + uint32 id = tmpFile.readUint32LE(); + if (id == 0x06054B50) { + startFile = true; + break; + } else { + tmpFile.seek(pos); + } + } + + + sprintf(fn_ext, "%03d", i + 1); + fn_tmp = a->filename + Common::String(fn_ext); + + Common::File tmpFile2; + tmpFile2.open(fn_tmp); + tmpFile.read(hdr, m); + tmpFile2.read(hdr + m, b); + tmpFile2.close(); + + } else { + tmpFile.read(hdr, 42); + } + + uint32 id = READ_LE_UINT32(hdr); + + if (id == 0x04034B50) { + if (hdr[8] != 8) + error("compression type not implemented"); + newEntry.compressedSize = READ_LE_UINT32(hdr + 18); + newEntry.size = READ_LE_UINT32(hdr + 22); + + uint16 filestrlen = READ_LE_UINT16(hdr + 26); + *(hdr + 30 + filestrlen) = 0; + pos += (kHeaderSize + filestrlen - m); + + newEntry.parent = filename; + newEntry.offset = pos; + newEntry.type = ResFileEntry::kAutoDetect; + newEntry.mounted = false; + newEntry.preload = false; + newEntry.prot = false; + newEntry.fileIndex = i; + files.push_back(File(Common::String((const char*) (hdr + 30)), newEntry)); + + pos += newEntry.compressedSize; + if (pos > size) { + pos -= size; + break; + } + } else { + uint32 filestrlen = READ_LE_UINT32(hdr + 28); + pos += (kHeaderSize2 + filestrlen - m); + } + } + tmpFile.close(); + } + } + + archives.clear(); + + return true; +} + +Common::SeekableReadStream *ResLoaderInsHof::loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const { + if (archive) { + delete archive; + archive = 0; + } + + bool resident = false; + uint8 * outbuffer = (uint8*) malloc(entry.size); + assert(outbuffer); + + if (!_fileCache.getData(entry, outbuffer)) { + Common::File tmpFile; + char filename[13]; + sprintf(filename, "WESTWOOD.%03d", entry.fileIndex); + + if (!tmpFile.open(filename)) { + delete [] outbuffer; + return 0; + } + + tmpFile.seek(entry.offset); + + uint8 *inbuffer = new uint8[entry.compressedSize]; + assert(inbuffer); + + if ((entry.offset + entry.compressedSize) > tmpFile.size()) { + // this is for files that are split between two archive files + uint32 a = tmpFile.size() - entry.offset; + uint32 b = entry.compressedSize - a; + + tmpFile.read(inbuffer, a); + tmpFile.close(); + + filename[strlen(filename) - 1]++; + + if (!tmpFile.open(filename)) + return 0; + tmpFile.seek(1); + tmpFile.read(inbuffer + a, b); + + } else { + tmpFile.read(inbuffer, entry.compressedSize); + } + + tmpFile.close(); + + FileExpander().process(outbuffer, inbuffer, entry.size, entry.compressedSize); + delete [] inbuffer; + + if (entry.size > INS_CACHE_THRESHOLD) + _fileCache.add(entry, outbuffer); + } + + Common::MemoryReadStream *stream = new Common::MemoryReadStream(outbuffer, entry.size, true); + assert(stream); + + return stream; +} + +class ResLoaderInsMalcolm : public ResArchiveLoader { public: bool checkFilename(Common::String filename) const; bool isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const; @@ -587,16 +1374,22 @@ public: Common::SeekableReadStream *loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const; ResFileEntry::kType getType() const { - return ResFileEntry::kIns; + return ResFileEntry::kInsMal; } }; -bool ResLoaderIns::checkFilename(Common::String filename) const { +bool ResLoaderInsMalcolm::checkFilename(Common::String filename) const { filename.toUppercase(); - return (filename.hasSuffix(".001")); + if (!filename.hasSuffix(".001")) + return false; + filename.insertChar('2', filename.size() - 1); + filename.deleteLastChar(); + if (Common::File::exists(filename)) + return false; + return true; } -bool ResLoaderIns::isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const { +bool ResLoaderInsMalcolm::isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const { stream.seek(3); uint32 size = stream.readUint32LE(); @@ -610,7 +1403,7 @@ bool ResLoaderIns::isLoadable(const Common::String &filename, Common::SeekableRe return (buffer[0] == 0x0D && buffer[1] == 0x0A); } -bool ResLoaderIns::loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const { +bool ResLoaderInsMalcolm::loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const { Common::List filenames; // thanks to eriktorbjorn for this code (a bit modified though) @@ -655,7 +1448,7 @@ bool ResLoaderIns::loadFile(const Common::String &filename, Common::SeekableRead return true; } -Common::SeekableReadStream *ResLoaderIns::loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const { +Common::SeekableReadStream *ResLoaderInsMalcolm::loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const { assert(archive); archive->seek(entry.offset, SEEK_SET); @@ -748,7 +1541,9 @@ Common::SeekableReadStream *ResLoaderTlk::loadFileFromArchive(const Common::Stri void Resource::initializeLoaders() { _loaders.push_back(LoaderList::value_type(new ResLoaderPak())); - _loaders.push_back(LoaderList::value_type(new ResLoaderIns())); + _loaders.push_back(LoaderList::value_type(new ResLoaderInsKyra())); + _loaders.push_back(LoaderList::value_type(new ResLoaderInsHof())); + _loaders.push_back(LoaderList::value_type(new ResLoaderInsMalcolm())); _loaders.push_back(LoaderList::value_type(new ResLoaderTlk())); } diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index a8de21b5ca..69ed8515c1 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -52,12 +52,17 @@ struct ResFileEntry { enum kType { kRaw = 0, kPak = 1, - kIns = 2, - kTlk = 3, + kInsKyra = 2, + kInsHof = 3, + kInsMal = 4, + kTlk = 5, kAutoDetect }; kType type; uint32 offset; + + int fileIndex; + uint32 compressedSize; }; typedef Common::HashMap ResFileMap; diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index 68bcd1ded2..f44484cc8e 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -2651,6 +2651,8 @@ void KyraEngine_HoF::seq_init() { _res->unloadAllPakFiles(); _res->loadPakFile(StaticResource::staticDataFilename()); + if (_flags.useInstallerPackage) + _res->loadPakFile("WESTWOOD.001"); _res->loadFileList(_sequencePakList, _sequencePakListSize); int numShp = -1; -- cgit v1.2.3 From 398f7be356f74ed294ce9e5f823782289baed515 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 24 May 2008 17:08:35 +0000 Subject: Fixed errors, a few of the warnings, and added a FIXME comment about possibly undefined behaviour. svn-id: r32250 --- engines/kyra/resource.cpp | 21 ++++++--------------- engines/kyra/resource.h | 9 +++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index a65093915a..4d60346fb0 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -822,7 +822,7 @@ bool FileExpander::process(const uint8 * dst, const uint8 * src, uint32 outsize, postprocess = false; needrefresh = true; } else if (mode == 0){ - uint16 cnt = 144; + // uint16 cnt = 144; uint8 *d2 = (uint8*) _tables[0]; memset(d2, 8, 144); memset(d2 + 144, 9, 112); @@ -1131,18 +1131,10 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR Common::String fn_tmp; char fn_ext[4]; - int i = filename.size() - 1; while (fn_base.lastChar() != '.') fn_base.deleteLastChar(); - struct InsHofArchive { - Common::String filename; - uint32 firstFile; - uint32 startOffset; - uint32 lastFile; - uint32 endOffset; - uint32 totalSize; - } newArchive; + InsHofArchive newArchive; Common::List archives; @@ -1150,9 +1142,8 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR sprintf(fn_ext, "%03d", currentFile); fn_tmp = fn_base + Common::String(fn_ext); - Common::File tmpFile; if (!tmpFile.open(fn_tmp)) { - debug(3, "couldn't open file '%s'\n", fn_tmp); + debug(3, "couldn't open file '%s'\n", fn_tmp.c_str()); break; } @@ -1168,6 +1159,7 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR pos += 6; tmpFile.seek(6, SEEK_CUR); } else { + // FIXME: GCC warns that this may be undefined! size = ++size - pos; } newArchive.filename = fn_base; @@ -1210,13 +1202,13 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR const uint32 kHeaderSize2 = 46; for (Common::List::iterator a = archives.begin(); a != archives.end(); ++a) { - bool startFile = true; + startFile = true; for (uint32 i = a->firstFile; i != (a->lastFile + 1); i++) { sprintf(fn_ext, "%03d", i); fn_tmp = a->filename + Common::String(fn_ext); if (!tmpFile.open(fn_tmp)) { - debug(3, "couldn't open file '%s'\n", fn_tmp); + debug(3, "couldn't open file '%s'\n", fn_tmp.c_str()); break; } @@ -1313,7 +1305,6 @@ Common::SeekableReadStream *ResLoaderInsHof::loadFileFromArchive(const Common::S archive = 0; } - bool resident = false; uint8 * outbuffer = (uint8*) malloc(entry.size); assert(outbuffer); diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index 69ed8515c1..43a41940a3 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -41,6 +41,15 @@ namespace Kyra { +struct InsHofArchive { + Common::String filename; + uint32 firstFile; + uint32 startOffset; + uint32 lastFile; + uint32 endOffset; + uint32 totalSize; +}; + struct ResFileEntry { Common::String parent; uint32 size; -- cgit v1.2.3 From ec3bc8f84d007c45b0bf27cdfe19bfa95efe4a66 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 24 May 2008 17:34:20 +0000 Subject: some cleanup (especially loads of strange casts) svn-id: r32251 --- engines/kyra/resource.cpp | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 4d60346fb0..eb66731a63 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -226,7 +226,7 @@ bool Resource::loadFileList(const Common::String &filedata) { buffer[12] = 0; f.seek(offset + 16, SEEK_SET); - Common::String filename = (char*)buffer; + Common::String filename = Common::String((char*)buffer); filename.toUppercase(); if (filename.hasSuffix(".PAK")) { @@ -709,7 +709,7 @@ public: FileExpander(); ~FileExpander(); - bool process(const uint8 * dst, const uint8 * src, uint32 outsize, uint32 insize); + bool process(uint8 *dst, const uint8 *src, uint32 outsize, uint32 insize); private: void generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex2, int cnt); @@ -743,7 +743,7 @@ FileExpander::~FileExpander() { delete [] _tables[0]; } -bool FileExpander::process(const uint8 * dst, const uint8 * src, uint32 outsize, uint32 compressedSize) { +bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32 compressedSize) { static const uint8 indexTable[] = { 0x10, 0x11, 0x12, 0x00, 0x08, 0x07, 0x09, 0x06, 0x0A, 0x05, 0x0B, 0x04, 0x0C, 0x03, 0x0D, 0x02, 0x0E, 0x01, 0x0F @@ -751,7 +751,7 @@ bool FileExpander::process(const uint8 * dst, const uint8 * src, uint32 outsize, memset(_tables[0], 0, 3914); - uint8 *d = (uint8*) dst; + uint8 *d = dst; uint16 tableSize0 = 0; uint16 tableSize1 = 0; bool needrefresh = true; @@ -774,7 +774,7 @@ bool FileExpander::process(const uint8 * dst, const uint8 * src, uint32 outsize, tableSize1 = _src->getKeyMasked(5) + 1; memset(_tables[7], 0, 19); - const uint8 *itbl = (uint8*) indexTable; + const uint8 *itbl = indexTable; int numbytes = _src->getKeyMasked(4) + 4; while (numbytes--) @@ -823,12 +823,12 @@ bool FileExpander::process(const uint8 * dst, const uint8 * src, uint32 outsize, needrefresh = true; } else if (mode == 0){ // uint16 cnt = 144; - uint8 *d2 = (uint8*) _tables[0]; + uint8 *d2 = _tables[0]; memset(d2, 8, 144); memset(d2 + 144, 9, 112); memset(d2 + 256, 7, 24); memset(d2 + 280, 8, 8); - d2 = (uint8*) _tables[1]; + d2 = _tables[1]; memset(d2, 5, 32); tableSize0 = 288; tableSize1 = 32; @@ -878,7 +878,7 @@ bool FileExpander::process(const uint8 * dst, const uint8 * src, uint32 outsize, cmd -= pos; while (pos--) *d++ = *s2++; - s2 = (uint8*) dst; + s2 = dst; } while (cmd--) *d++ = *s2++; @@ -901,7 +901,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex if (!cnt) return; - uint8 *s = (uint8*) tbl1; + const uint8 *s = tbl1; memset(_tables16[0], 0, 32); for (int i = 0; i < cnt; i++) @@ -922,7 +922,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex error("decompression failure"); } - s = (uint8*) tbl1; + s = tbl1; uint16 *d = _tables16[2]; for (int i = 0; i < cnt; i++) { uint16 t = *s++; @@ -933,7 +933,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex *d++ = t; } - s = (uint8*) tbl1; + s = tbl1; d = _tables16[2]; for (int i = 0; i < cnt; i++) { int8 t = ((int8)(*s++)) - 1; @@ -963,7 +963,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex memset((void*) tbl2, 0, 512); cnt--; - s = (uint8*) tbl1 + cnt; + s = tbl1 + cnt; d = &_tables16[2][cnt]; uint16 * bt = (uint16*) tbl3; uint16 inc = 0; @@ -1011,7 +1011,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex } uint8 FileExpander::calcCmdAndIndex(const uint8 *tbl, int16 ¶) { - const uint16 *t = (uint16*) tbl; + const uint16 *t = (const uint16*)tbl; _src->advSrcBitsByIndex(8); uint8 newIndex = 0; uint16 v = _src->getKeyLower(); @@ -1159,8 +1159,7 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR pos += 6; tmpFile.seek(6, SEEK_CUR); } else { - // FIXME: GCC warns that this may be undefined! - size = ++size - pos; + size = size + 1 - pos; } newArchive.filename = fn_base; bytesleft = newArchive.totalSize = tmpFile.readUint32LE(); -- cgit v1.2.3 From 4641f3fe7b11b25ad8dca6fc2ea68f8b72db9dae Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 24 May 2008 17:56:56 +0000 Subject: more fixes for spellbook/letter text in Hof (French and German floppy) svn-id: r32252 --- engines/kyra/gui_hof.cpp | 4 ++-- engines/kyra/script_hof.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp index f7b2b4418d..5cb5774d2b 100644 --- a/engines/kyra/gui_hof.cpp +++ b/engines/kyra/gui_hof.cpp @@ -455,12 +455,12 @@ void KyraEngine_HoF::showBookPage() { char filename[16]; sprintf(filename, "PAGE%.01X.", _bookCurPage); - strcat(filename, _languageExtension[(_flags.platform == Common::kPlatformPC && _flags.isTalkie) ? _lang : 4]); + strcat(filename, _languageExtension[(_flags.platform == Common::kPlatformPC && (_flags.isTalkie || _lang)) ? _lang : 4]); uint8 *leftPage = _res->fileData(filename, 0); int leftPageY = _bookPageYOffset[_bookCurPage]; sprintf(filename, "PAGE%.01X.", _bookCurPage+1); - strcat(filename, _languageExtension[(_flags.platform == Common::kPlatformPC && _flags.isTalkie) ? _lang : 4]); + strcat(filename, _languageExtension[(_flags.platform == Common::kPlatformPC && _flags.isTalkie || _lang) ? _lang : 4]); uint8 *rightPage = (_bookCurPage != _bookMaxPage) ? _res->fileData(filename, 0) : 0; int rightPageY = _bookPageYOffset[_bookCurPage+1]; diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index 2e90379e62..b16e534e72 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -800,7 +800,7 @@ int KyraEngine_HoF::o2_showLetter(EMCState *script) { _screen->fadeToBlack(0x14); sprintf(filename, "LETTER%.1d.", letter); - strcat(filename, _languageExtension[(_flags.platform == Common::kPlatformPC && _flags.isTalkie) ? _lang : 4]); + strcat(filename, _languageExtension[(_flags.platform == Common::kPlatformPC && (_flags.isTalkie || _lang)) ? _lang : 4]); uint8 *letterBuffer = _res->fileData(filename, 0); if (letterBuffer) { -- cgit v1.2.3 From 5968d62d3449026737724c9a00c0360724b0016b Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 24 May 2008 18:31:16 +0000 Subject: cleanup svn-id: r32253 --- engines/kyra/gui_hof.cpp | 4 ++-- engines/kyra/script_hof.cpp | 2 +- engines/kyra/staticres.cpp | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp index 5cb5774d2b..555934cb7f 100644 --- a/engines/kyra/gui_hof.cpp +++ b/engines/kyra/gui_hof.cpp @@ -455,12 +455,12 @@ void KyraEngine_HoF::showBookPage() { char filename[16]; sprintf(filename, "PAGE%.01X.", _bookCurPage); - strcat(filename, _languageExtension[(_flags.platform == Common::kPlatformPC && (_flags.isTalkie || _lang)) ? _lang : 4]); + strcat(filename, (_flags.isTalkie || _flags.platform == Common::kPlatformFMTowns || _lang) ? _languageExtension[_lang] : "TXT"); uint8 *leftPage = _res->fileData(filename, 0); int leftPageY = _bookPageYOffset[_bookCurPage]; sprintf(filename, "PAGE%.01X.", _bookCurPage+1); - strcat(filename, _languageExtension[(_flags.platform == Common::kPlatformPC && _flags.isTalkie || _lang) ? _lang : 4]); + strcat(filename, (_flags.isTalkie || _flags.platform == Common::kPlatformFMTowns || _lang) ? _languageExtension[_lang] : "TXT"); uint8 *rightPage = (_bookCurPage != _bookMaxPage) ? _res->fileData(filename, 0) : 0; int rightPageY = _bookPageYOffset[_bookCurPage+1]; diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index b16e534e72..ef50cc8dfd 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -800,7 +800,7 @@ int KyraEngine_HoF::o2_showLetter(EMCState *script) { _screen->fadeToBlack(0x14); sprintf(filename, "LETTER%.1d.", letter); - strcat(filename, _languageExtension[(_flags.platform == Common::kPlatformPC && (_flags.isTalkie || _lang)) ? _lang : 4]); + strcat(filename, (_flags.isTalkie || _flags.platform == Common::kPlatformFMTowns || _lang) ? _languageExtension[_lang] : "TXT"); uint8 *letterBuffer = _res->fileData(filename, 0); if (letterBuffer) { diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index fe9925c44e..b28fa45262 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -1549,7 +1549,6 @@ const char *KyraEngine_HoF::_languageExtension[] = { "ITA", Italian and Spanish were never included "SPA"*/ "JPN", - "TXT" // This is used for spell book and letter text }; const char *KyraEngine_HoF::_scriptLangExt[] = { -- cgit v1.2.3 From 85e6b8bb0f12cf324df5f7122d33faca72ca1e86 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 24 May 2008 19:07:44 +0000 Subject: Formatting fixes. svn-id: r32254 --- engines/kyra/resource.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index eb66731a63..fec58062e2 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -724,23 +724,23 @@ FileExpander::FileExpander() : _src(0) { _tables[0] = new uint8[3914]; assert(_tables[0]); - _tables[1] = _tables[0] + 320; - _tables[2] = _tables[0] + 352; - _tables[3] = _tables[0] + 864; - _tables[4] = _tables[0] + 2016; - _tables[5] = _tables[0] + 2528; - _tables[6] = _tables[0] + 2656; - _tables[7] = _tables[0] + 2736; - _tables[8] = _tables[0] + 2756; - - _tables16[0] = (uint16*) (_tables[0] + 3268); - _tables16[1] = (uint16*) (_tables[0] + 3302); - _tables16[2] = (uint16*) (_tables[0] + 3338); + _tables[1] = _tables[0] + 320; + _tables[2] = _tables[0] + 352; + _tables[3] = _tables[0] + 864; + _tables[4] = _tables[0] + 2016; + _tables[5] = _tables[0] + 2528; + _tables[6] = _tables[0] + 2656; + _tables[7] = _tables[0] + 2736; + _tables[8] = _tables[0] + 2756; + + _tables16[0] = (uint16 *)(_tables[0] + 3268); + _tables16[1] = (uint16 *)(_tables[0] + 3302); + _tables16[2] = (uint16 *)(_tables[0] + 3338); } FileExpander::~FileExpander() { delete _src; - delete [] _tables[0]; + delete[] _tables[0]; } bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32 compressedSize) { @@ -1075,9 +1075,9 @@ bool FileCache::getData(ResFileEntry entry, uint8 *dst) { } void FileCache::flush() { - debug("total amount of cache memory used: %d", _size); + debug(1, "total amount of cache memory used: %d", _size); for (Common::List::const_iterator c = _cachedFileList.begin(); c != _cachedFileList.end(); ++c) - delete [] c->data; + delete[] c->data; _cachedFileList.clear(); _size = 0; } @@ -1344,7 +1344,7 @@ Common::SeekableReadStream *ResLoaderInsHof::loadFileFromArchive(const Common::S tmpFile.close(); FileExpander().process(outbuffer, inbuffer, entry.size, entry.compressedSize); - delete [] inbuffer; + delete[] inbuffer; if (entry.size > INS_CACHE_THRESHOLD) _fileCache.add(entry, outbuffer); -- cgit v1.2.3 From 0897a3a05867d35bdd20d063411643103f9c2892 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 24 May 2008 19:18:17 +0000 Subject: - Fixed mismatching malloc/delete[] - More formatting fixes svn-id: r32255 --- engines/kyra/resource.cpp | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index fec58062e2..197f363b1e 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -1127,23 +1127,23 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR uint32 bytesleft = 0; bool startFile = true; - Common::String fn_base(filename.c_str(), 10); - Common::String fn_tmp; - char fn_ext[4]; + Common::String filenameBase(filename.c_str(), 10); + Common::String filenameTemp; + char filenameExt[4]; - while (fn_base.lastChar() != '.') - fn_base.deleteLastChar(); + while (filenameBase.lastChar() != '.') + filenameBase.deleteLastChar(); InsHofArchive newArchive; Common::List archives; for (int8 currentFile = 1; currentFile; currentFile++) { - sprintf(fn_ext, "%03d", currentFile); - fn_tmp = fn_base + Common::String(fn_ext); + sprintf(filenameExt, "%03d", currentFile); + filenameTemp = filenameBase + Common::String(filenameExt); - if (!tmpFile.open(fn_tmp)) { - debug(3, "couldn't open file '%s'\n", fn_tmp.c_str()); + if (!tmpFile.open(filenameTemp)) { + debug(3, "couldn't open file '%s'\n", filenameTemp.c_str()); break; } @@ -1161,7 +1161,7 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR } else { size = size + 1 - pos; } - newArchive.filename = fn_base; + newArchive.filename = filenameBase; bytesleft = newArchive.totalSize = tmpFile.readUint32LE(); pos += 4; newArchive.firstFile = currentFile; @@ -1203,11 +1203,11 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR for (Common::List::iterator a = archives.begin(); a != archives.end(); ++a) { startFile = true; for (uint32 i = a->firstFile; i != (a->lastFile + 1); i++) { - sprintf(fn_ext, "%03d", i); - fn_tmp = a->filename + Common::String(fn_ext); + sprintf(filenameExt, "%03d", i); + filenameTemp = a->filename + Common::String(filenameExt); - if (!tmpFile.open(fn_tmp)) { - debug(3, "couldn't open file '%s'\n", fn_tmp.c_str()); + if (!tmpFile.open(filenameTemp)) { + debug(3, "couldn't open file '%s'\n", filenameTemp.c_str()); break; } @@ -1243,13 +1243,12 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR tmpFile.seek(pos); } } - - - sprintf(fn_ext, "%03d", i + 1); - fn_tmp = a->filename + Common::String(fn_ext); + + sprintf(filenameExt, "%03d", i + 1); + filenameTemp = a->filename + Common::String(filenameExt); Common::File tmpFile2; - tmpFile2.open(fn_tmp); + tmpFile2.open(filenameTemp); tmpFile.read(hdr, m); tmpFile2.read(hdr + m, b); tmpFile2.close(); @@ -1277,7 +1276,7 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR newEntry.preload = false; newEntry.prot = false; newEntry.fileIndex = i; - files.push_back(File(Common::String((const char*) (hdr + 30)), newEntry)); + files.push_back(File(Common::String((const char *)(hdr + 30)), newEntry)); pos += newEntry.compressedSize; if (pos > size) { @@ -1304,7 +1303,7 @@ Common::SeekableReadStream *ResLoaderInsHof::loadFileFromArchive(const Common::S archive = 0; } - uint8 * outbuffer = (uint8*) malloc(entry.size); + uint8 *outbuffer = (uint8 *)malloc(entry.size); assert(outbuffer); if (!_fileCache.getData(entry, outbuffer)) { @@ -1313,7 +1312,7 @@ Common::SeekableReadStream *ResLoaderInsHof::loadFileFromArchive(const Common::S sprintf(filename, "WESTWOOD.%03d", entry.fileIndex); if (!tmpFile.open(filename)) { - delete [] outbuffer; + free(outbuffer); return 0; } @@ -1336,7 +1335,6 @@ Common::SeekableReadStream *ResLoaderInsHof::loadFileFromArchive(const Common::S return 0; tmpFile.seek(1); tmpFile.read(inbuffer + a, b); - } else { tmpFile.read(inbuffer, entry.compressedSize); } -- cgit v1.2.3 From 0147dd10dccd19ba140ccc11acff596369025ff0 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 24 May 2008 21:23:06 +0000 Subject: - Move more texts to strings - Add support for international versions - More differences for Spanish version - Fix font position for Spanish version - Added accented characters rendering - Bring save names to ScummVM scheme. Original saves aren't read anymore - Made mouse more responsive at save/load screen - Couple fixes for game texts svn-id: r32256 --- engines/drascula/animation.cpp | 66 ++++++++++++++++++++++- engines/drascula/detection.cpp | 60 +++++++++++++++++++-- engines/drascula/drascula.cpp | 119 +++++++++++++++++++++++++++++++++++------ engines/drascula/drascula.h | 5 +- engines/drascula/texts.cpp | 33 +++++++----- 5 files changed, 246 insertions(+), 37 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 7c0d167299..7a8ea818ee 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -65,7 +65,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; color_abc(RED); - centra_texto("Transilvanya, 1993 d.c.", 160, 100); + centra_texto(_textmisc[_lang][1], 160, 100); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; @@ -466,6 +466,9 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; + if (_lang == kSpanish) + dir_texto = dir_hare_frente; + loadPic("an11y13.alg"); decompressPic(dir_hare_dch, 1); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) @@ -475,6 +478,9 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; + if (_lang == kSpanish) + dir_texto = dir_hare_dch; + loadPic("97.alg"); decompressPic(dir_hare_dch, 1); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) @@ -657,6 +663,9 @@ void DrasculaEngine::animation_2_1() { } void DrasculaEngine::animation_3_1() { + if (_lang == kSpanish) + dir_texto = dir_hare_frente; + loadPic("an11y13.alg"); decompressPic(dir_hare_dch, 1); @@ -683,11 +692,17 @@ void DrasculaEngine::animation_3_1() { flags[0] = 1; + if (_lang == kSpanish) + dir_texto = dir_hare_dch; + loadPic("97.alg"); decompressPic(dir_hare_dch, 1); } void DrasculaEngine::animation_4_1() { + if (_lang == kSpanish) + dir_texto = dir_hare_frente; + loadPic("an12.alg"); decompressPic(dir_hare_dch, 1); @@ -720,6 +735,9 @@ void DrasculaEngine::animation_4_1() { talk_pianista(_textp[_lang][4], "p4.als"); talk(_text[_lang][209], "209.als"); + if (_lang == kSpanish) + dir_texto = dir_hare_dch; + flags[11] = 0; loadPic("97.alg"); decompressPic(dir_hare_dch, 1); @@ -842,6 +860,9 @@ void DrasculaEngine::animation_4_2() { loadPic("ciego5.alg"); decompressPic(dir_hare_frente, 1); + if (_lang == kSpanish) + dir_texto = dir_hare_frente; + copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -892,6 +913,9 @@ void DrasculaEngine::animation_4_2() { decompressPic(dir_hare_fondo, 1); withoutVerb(); + if (_lang == kSpanish) + dir_texto = dir_hare_dch; + flags[9] = 0; flags[4] = 1; } @@ -2313,6 +2337,10 @@ void DrasculaEngine::animation_1_6() { talk_dr_dch(_textd[_lang][34], "d34.als"); sentido_dr = 0; talk_dr_izq(_textd[_lang][35], "d35.als"); + + if (_lang == kSpanish) + dir_texto = dir_hare_dch; + clearRoom(); carga_escoba("102.ald"); activa_pendulo(); @@ -2526,6 +2554,9 @@ void DrasculaEngine::animation_19_6() { } void DrasculaEngine::animation_12_2() { + if (_lang == kSpanish) + dir_texto = dir_hare_frente; + loadPic("an12.alg"); decompressPic(dir_hare_dch, 1); @@ -2552,6 +2583,9 @@ void DrasculaEngine::animation_12_2() { talk_pianista(_textp[_lang][5], "P5.als"); conversa("op_1.cal"); + if (_lang == kSpanish) + dir_texto = dir_hare_dch; + flags[11] = 0; loadPic("974.alg"); decompressPic(dir_hare_dch, 1); @@ -2560,6 +2594,9 @@ void DrasculaEngine::animation_12_2() { void DrasculaEngine::animation_26_2() { int n, x = 0; + if (_lang == kSpanish) + dir_texto = dir_hare_frente; + loadPic("an12.alg"); decompressPic(dir_hare_dch, 1); @@ -2623,6 +2660,9 @@ void DrasculaEngine::animation_26_2() { pickObject(11); resta_objeto(12); + if (_lang == kSpanish) + dir_texto = dir_hare_dch; + flags[11] = 0; flags[39] = 1; loadPic("974.alg"); @@ -2631,6 +2671,9 @@ void DrasculaEngine::animation_26_2() { } void DrasculaEngine::animation_11_2() { + if (_lang == kSpanish) + dir_texto = dir_hare_frente; + loadPic("an11y13.alg"); decompressPic(dir_hare_dch, 1); @@ -2644,6 +2687,9 @@ void DrasculaEngine::animation_11_2() { pause(40); talk_tabernero("No, nada", "d82.als"); + if (_lang == kSpanish) + dir_texto = dir_hare_dch; + loadPic("974.alg"); decompressPic(dir_hare_dch, 1); } @@ -2829,6 +2875,9 @@ void DrasculaEngine::animation_34_2() { } void DrasculaEngine::animation_36_2() { + if (_lang == kSpanish) + dir_texto = dir_hare_frente; + loadPic("an11y13.alg"); decompressPic(dir_hare_dch, 1); @@ -2840,6 +2889,9 @@ void DrasculaEngine::animation_36_2() { pause(40); talk_tabernero("No, nada", "d82.als"); + if (_lang == kSpanish) + dir_texto = dir_hare_dch; + loadPic("974.alg"); decompressPic(dir_hare_dch, 1); } @@ -3207,6 +3259,9 @@ void DrasculaEngine::animation_6_2() { stopMusic(); flags[9] = 1; + if (_lang == kSpanish) + dir_texto = dir_hare_frente; + clearRoom(); loadPic("ciego1.alg"); decompressPic(dir_dibujo1, HALF_PAL); @@ -3251,6 +3306,9 @@ void DrasculaEngine::animation_6_2() { decompressPic(dir_hare_fondo, 1); withoutVerb(); + if (_lang == kSpanish) + dir_texto = dir_hare_dch; + flags[9] = 0; } @@ -3274,6 +3332,9 @@ void DrasculaEngine::animation_33_2() { loadPic("ciego5.alg"); decompressPic(dir_hare_frente, 1); + if (_lang == kSpanish) + dir_texto = dir_hare_frente; + copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -3307,6 +3368,9 @@ void DrasculaEngine::animation_33_2() { decompressPic(dir_hare_fondo, 1); withoutVerb(); + if (_lang == kSpanish) + dir_texto = dir_hare_dch; + flags[33] = 1; flags[9] = 0; } diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index 80ea4f0eab..a75da3b5cb 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -58,6 +58,10 @@ uint16 DrasculaEngine::getVersion() const { return _gameDescription->version; } +Common::Language DrasculaEngine::getLanguage() const { + return _gameDescription->desc.language; +} + } static const PlainGameDescriptor drasculaGames[] = { @@ -75,7 +79,7 @@ static const DrasculaGameDescription gameDescriptions[] = { { "drascula", 0, - AD_ENTRY1("14.ald", "09b2735953edcd43af115c65ae00b10e"), + AD_ENTRY1s("14.ald", "09b2735953edcd43af115c65ae00b10e", 1595), Common::EN_ANY, Common::kPlatformPC, Common::ADGF_NO_FLAGS @@ -85,13 +89,13 @@ static const DrasculaGameDescription gameDescriptions[] = { 0, 0, }, -/* + { // Drascula Spanish version { "drascula", 0, - AD_ENTRY1("14.ald", "0746ed1a5cc8d9728f790c29813f4b43"), + AD_ENTRY1s("14.ald", "0746ed1a5cc8d9728f790c29813f4b43", 23059), Common::ES_ESP, Common::kPlatformPC, Common::ADGF_NO_FLAGS @@ -100,7 +104,55 @@ static const DrasculaGameDescription gameDescriptions[] = { 0, 0, 0, - },*/ + }, + + { + // Drascula German version + { + "drascula", + 0, + AD_ENTRY1s("14.ald", "72e46089033d56bad1c179ac36e2a9d2", 610), + Common::DE_DEU, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + 0, + 0, + 0, + 0, + }, + + { + // Drascula French version + { + "drascula", + 0, + AD_ENTRY1s("14.ald", "eeeee96b82169003630e08992248296c", 608), + Common::FR_FRA, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + 0, + 0, + 0, + 0, + }, + + { + // Drascula Italian version + { + "drascula", + 0, + AD_ENTRY1s("14.ald", "02b49a18328d0bf2efe6ba658c9c7a1d", 2098), + Common::IT_ITA, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + 0, + 0, + 0, + 0, + }, { AD_TABLE_END_MARKER, 0, 0, 0, 0 } }; diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index d6b1904689..9046407d61 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -114,6 +114,27 @@ int DrasculaEngine::init() { _system->initSize(320, 200); _system->endGFXTransaction(); + switch (getLanguage()) { + case Common::EN_ANY: + _lang = 0; + break; + case Common::ES_ESP: + _lang = 1; + break; + case Common::DE_DEU: + _lang = 2; + break; + case Common::FR_FRA: + _lang = 3; + break; + case Common::IT_ITA: + _lang = 4; + break; + default: + warning("Unknown game language. Falling back to English"); + _lang = 0; + } + return 0; } @@ -468,7 +489,10 @@ void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int wi bool DrasculaEngine::escoba() { int n; - dir_texto = dir_mesa; + if (_lang == kSpanish) + dir_texto = dir_hare_dch; + else + dir_texto = dir_mesa; previousMusic = -1; @@ -1473,22 +1497,24 @@ void DrasculaEngine::mesa() { bool DrasculaEngine::saves() { char nombres[10][23]; - char fichero[13]; + char fichero[50]; + char fileEpa[50]; int n, n2, num_sav = 0, y = 27; Common::InSaveFile *sav; clearRoom(); - if (!(sav = _saveFileMan->openForLoading("saves.epa"))) { + snprintf(fileEpa, 50, "%s.epa", _targetName.c_str()); + if (!(sav = _saveFileMan->openForLoading(fileEpa))) { Common::OutSaveFile *epa; - if (!(epa = _saveFileMan->openForSaving("saves.epa"))) - error("Can't open saves.epa file."); + if (!(epa = _saveFileMan->openForSaving(fileEpa))) + error("Can't open %s file", fileEpa); for (n = 0; n < NUM_SAVES; n++) epa->writeString("*\n"); epa->finalize(); delete epa; - if (!(sav = _saveFileMan->openForLoading("saves.epa"))) { - error("Can't open saves.epa file."); + if (!(sav = _saveFileMan->openForLoading(fileEpa))) { + error("Can't open %s file", fileEpa); } } for (n = 0; n < NUM_SAVES; n++) @@ -1526,11 +1552,11 @@ bool DrasculaEngine::saves() { introduce_nombre(); strcpy(nombres[n], select); if (hay_seleccion == 1) { - sprintf(fichero, "gsave%02d", n + 1); + snprintf(fichero, 50, "%s%02d", _targetName.c_str(), n + 1); para_grabar(fichero); Common::OutSaveFile *tsav; - if (!(tsav = _saveFileMan->openForSaving("saves.epa"))) { - error("Can't open saves.epa file."); + if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { + error("Can't open %s file", fileEpa); } for (n = 0; n < NUM_SAVES; n++) { tsav->writeString(nombres[n]); @@ -1548,7 +1574,7 @@ bool DrasculaEngine::saves() { y = y + 9; } if (hay_seleccion == 1) { - sprintf(fichero, "gsave%02d", n + 1); + snprintf(fichero, 50, "%s%02d", _targetName.c_str(), n + 1); } num_sav = n; } @@ -1572,8 +1598,8 @@ bool DrasculaEngine::saves() { } else if (x_raton > 208 && y_raton > 123 && x_raton < 282 && y_raton < 149 && hay_seleccion == 1) { para_grabar(fichero); Common::OutSaveFile *tsav; - if (!(tsav = _saveFileMan->openForSaving("saves.epa"))) { - error("Can't open saves.epa file."); + if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { + error("Can't open %s file", fileEpa); } for (n = 0; n < NUM_SAVES; n++) { tsav->writeString(nombres[n]); @@ -1590,6 +1616,8 @@ bool DrasculaEngine::saves() { delay(400); } y = 26; + + delay(10); } clearRoom(); @@ -1606,7 +1634,7 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) longitud = strlen(said); for (h = 0; h < longitud; h++) { - y_de_letra = Y_ABC; + y_de_letra = (_lang == kSpanish) ? Y_ABC_ESP : Y_ABC; int c = toupper(said[h]); if (c == 'A') x_de_letra = X_A; @@ -1660,10 +1688,14 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) x_de_letra = X_Y; else if (c == 'Z') x_de_letra = X_Z; + else if (c == '\245') + x_de_letra = X_GN; + else if (c == '\244') + x_de_letra = X_GN; else if (c == 0xa7 || c == ' ') x_de_letra = SPACE; else { - y_de_letra = Y_SIGNOS; + y_de_letra = (_lang == kSpanish) ? Y_SIGNOS_ESP : Y_SIGNOS; if (c == '.') x_de_letra = X_DOT; else if (c == ',') @@ -1672,7 +1704,7 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) x_de_letra = X_HYPHEN; else if (c == '?') x_de_letra = X_CIERRA_INTERROGACION; - else if (c == 0xa8) + else if (c == '\250') x_de_letra = X_ABRE_INTERROGACION; // else if (c == '\'') // FIXME // x_de_letra = SPACE; // space for now @@ -1680,7 +1712,7 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) x_de_letra = X_COMILLAS; else if (c == '!') x_de_letra = X_CIERRA_EXCLAMACION; - else if (c == 0xad) + else if (c == '\255') x_de_letra = X_ABRE_EXCLAMACION; else if (c == ';') x_de_letra = X_PUNTO_Y_COMA; @@ -1726,6 +1758,41 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) x_de_letra = X_N9; else if (c == '0') x_de_letra = X_N0; + else y_de_letra=Y_ACENTOS; + + if (c == ' ') x_de_letra=X_A; + else if (c =='\202') x_de_letra = X_B; + else if (c =='\241') x_de_letra = X_C; + else if (c =='\242') x_de_letra = X_D; + else if (c =='\243') x_de_letra = X_E; + else if (c =='\205') x_de_letra = X_F; + else if (c =='\212') x_de_letra = X_G; + else if (c =='\215') x_de_letra = X_H; + else if (c =='\225') x_de_letra = X_I; + else if (c =='\227') x_de_letra = X_J; + else if (c =='\203') x_de_letra = X_K; + else if (c =='\210') x_de_letra = X_L; + else if (c =='\214') x_de_letra = X_M; + else if (c =='\223') x_de_letra = X_N; + else if (c =='\226') x_de_letra = X_GN; + else if (c =='\047') x_de_letra = X_O; + else if (c =='\200') x_de_letra = X_P; + else if (c =='\207') x_de_letra = X_P; + else if (c =='\265') x_de_letra = X_A; + else if (c =='\220') x_de_letra = X_B; + else if (c =='\326') x_de_letra = X_C; + else if (c =='\340') x_de_letra = X_D; + else if (c =='\351') x_de_letra = X_E; + else if (c =='\267') x_de_letra = X_F; + else if (c =='\324') x_de_letra = X_G; + else if (c =='\336') x_de_letra = X_H; + else if (c =='\343') x_de_letra = X_I; + else if (c =='\353') x_de_letra = X_J; + else if (c =='\266') x_de_letra = X_K; + else if (c =='\322') x_de_letra = X_L; + else if (c =='\327') x_de_letra = X_M; + else if (c =='\342') x_de_letra = X_N; + else if (c =='\352') x_de_letra = X_GN; } pos_texto[0] = x_de_letra; @@ -3992,14 +4059,22 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta int c = toupper(said[h]); if (c == 'A') x_de_letra = X_A_OPC; + else if (c == '\265') x_de_letra = X_A_OPC; + else if (c == '\267') x_de_letra = X_A_OPC; + else if (c == '\266') x_de_letra = X_A_OPC; else if (c == 'B') x_de_letra = X_B_OPC; else if (c == 'C') x_de_letra = X_C_OPC; + else if (c == '\200') x_de_letra = X_C_OPC; + else if (c == '\207') x_de_letra = X_C_OPC; else if (c == 'D') x_de_letra = X_D_OPC; else if (c == 'E') x_de_letra = X_E_OPC; + else if (c == '\220') x_de_letra = X_E_OPC; + else if (c == '\324') x_de_letra = X_E_OPC; + else if (c == '\322') x_de_letra = X_E_OPC; else if (c == 'F') x_de_letra = X_F_OPC; else if (c == 'G') @@ -4008,6 +4083,9 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta x_de_letra = X_H_OPC; else if (c == 'I') x_de_letra = X_I_OPC; + else if (c == '\326') x_de_letra = X_I_OPC; + else if (c == '\336') x_de_letra = X_I_OPC; + else if (c == '\327') x_de_letra = X_I_OPC; else if (c == 'J') x_de_letra = X_J_OPC; else if (c == 'K') @@ -4018,10 +4096,14 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta x_de_letra = X_M_OPC; else if (c == 'N') x_de_letra = X_N_OPC; + else if (c == '\047') x_de_letra = X_GN_OPC; else if (c == 'O') x_de_letra = X_O_OPC; else if (c == 'P') x_de_letra = X_P_OPC; + else if (c == '\340') x_de_letra = X_O_OPC; + else if (c == '\342') x_de_letra = X_O_OPC; + else if (c == '\343') x_de_letra = X_O_OPC; else if (c == 'Q') x_de_letra = X_Q_OPC; else if (c == 'R') @@ -4032,6 +4114,9 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta x_de_letra = X_T_OPC; else if (c == 'U') x_de_letra = X_U_OPC; + else if (c == '\353') x_de_letra = X_U_OPC; + else if (c == '\352') x_de_letra = X_U_OPC; + else if (c == '\351') x_de_letra = X_U_OPC; else if (c == 'V') x_de_letra = X_V_OPC; else if (c == 'W') diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 5cbc1fd403..0ff8497bea 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -175,7 +175,9 @@ struct DrasculaGameDescription; #define CHAR_HEIGHT 6 #define Y_ABC 158 +#define Y_ABC_ESP 149 #define Y_SIGNOS 169 +#define Y_SIGNOS_ESP 160 #define Y_ACENTOS 180 #define X_A 6 @@ -356,6 +358,7 @@ public: uint32 getFeatures() const; uint16 getVersion() const; Common::Platform getPlatform() const; + Common::Language getLanguage() const; void updateEvents(); Audio::SoundHandle _soundHandle; @@ -842,7 +845,7 @@ extern const char *_textvb[][63]; extern const char *_textsys[][4]; extern const char *_texthis[][5]; extern const char *_textverbs[][6]; -extern const char *_textmisc[][1]; +extern const char *_textmisc[][2]; extern const char *_textd1[][11]; } // End of namespace Drascula diff --git a/engines/drascula/texts.cpp b/engines/drascula/texts.cpp index 6389097c1d..c84f176d35 100644 --- a/engines/drascula/texts.cpp +++ b/engines/drascula/texts.cpp @@ -4677,7 +4677,7 @@ const char *_textt[][25] = { "QU'EST-CE QU'IL Y A, QU'Y A-T-IL?", "D'ACCORD. CHAMBRE 512. PAR LES ESCALIERS. LA CL EST SUR LA PORTE", "LE COMTE DRASCULA?!", - "NON, RIEN, CE TYPE A UNE MAUVAISE RPUTATION PAR ICI", + "NON, RIEN, CE TYPE A UNE MAUVAISE R\220PUTATION PAR ICI", // 5 "EH BIEN, IL Y A DES RUMEURS QUI COURENT SUR LUI. CERTAINS DISENT QUE C'EST UN VAMPIRE ET QU'IL ENLEVE DU MONDE POUR SUCER LEUR SANG ", "MAIS D'AUTRES PENSENT QU'IL EST SEULEMENT UN TRAFICANT D'ORGANES, ET C'EST POUR CELA QUE DES PERSONNES DPECES SONT APPARUES DANS LES ALENTOURS", @@ -5308,20 +5308,20 @@ const char *_textverbs[][6] = { "mover", }, { - "look", // TODO Translate it - "take", - "open", - "close", - "talk", - "push", + "Schau", + "Nimm", + "oeFFNE", + "Schliesse", + "Rede", + "Druecke", }, { - "look", // TODO Translate it - "take", - "open", - "close", - "talk", - "push", + "regardez", + "ramassez", + "ouvrez", + "fermez", + "parlez", + "poussez", }, { "esamina", @@ -5334,21 +5334,26 @@ const char *_textverbs[][6] = { }; -const char *_textmisc[][1] = { +const char *_textmisc[][2] = { { "HUNCHBACKED", + "Transilvania, 1993 d.c.", }, { "jorobado", + "Transilvania, 1993 d.c. (despues de cenar)", }, { "HUNCHBACKED", + "Transilvania, 1993 d.c.", }, { "HUNCHBACKED", + "Transilvania, 1993 d.c.", }, { "HUNCHBACKED", + "Transilvania, 1993 d.c.", }, }; -- cgit v1.2.3 From f2d72d9473be5dd3d942976e8ed84d58d746def9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 24 May 2008 22:11:41 +0000 Subject: Patch #1969189: "CinE renderer rewrite" svn-id: r32257 --- engines/cine/anim.cpp | 1 + engines/cine/bg.cpp | 96 ++- engines/cine/bg.h | 15 +- engines/cine/bg_list.cpp | 60 +- engines/cine/bg_list.h | 4 +- engines/cine/cine.cpp | 12 +- engines/cine/gfx.cpp | 1396 +++++++++++++++++++++++++++++++++++++------- engines/cine/gfx.h | 158 ++++- engines/cine/main_loop.cpp | 16 +- engines/cine/object.cpp | 4 + engines/cine/pal.cpp | 62 +- engines/cine/pal.h | 8 +- engines/cine/prc.cpp | 4 +- engines/cine/rel.cpp | 4 +- engines/cine/script.h | 3 +- engines/cine/script_fw.cpp | 67 +-- engines/cine/script_os.cpp | 50 +- engines/cine/texte.cpp | 92 ++- engines/cine/texte.h | 2 +- engines/cine/various.cpp | 833 +++++--------------------- engines/cine/various.h | 16 +- engines/cine/xref.txt | 37 +- 22 files changed, 1743 insertions(+), 1197 deletions(-) diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp index 6edc714da7..73837308ca 100644 --- a/engines/cine/anim.cpp +++ b/engines/cine/anim.cpp @@ -53,6 +53,7 @@ AnimData animDataTable[NUM_MAX_ANIMDATA]; static const AnimDataEntry transparencyData[] = { {"ALPHA", 0xF}, + {"TITRE", 0xF}, {"TITRE2", 0xF}, {"ET", 0xC}, {"L311", 0x3}, diff --git a/engines/cine/bg.cpp b/engines/cine/bg.cpp index b6c07a05cb..c5b7fb4e3d 100644 --- a/engines/cine/bg.cpp +++ b/engines/cine/bg.cpp @@ -37,7 +37,7 @@ uint16 bgVar0; byte *additionalBgTable[9]; byte currentAdditionalBgIdx = 0, currentAdditionalBgIdx2 = 0; -byte loadCt(const char *ctName) { +byte loadCtFW(const char *ctName) { uint16 header[32]; byte *ptr, *dataPtr; @@ -46,79 +46,62 @@ byte loadCt(const char *ctName) { ptr = dataPtr = readBundleFile(findFileInBundle(ctName)); - if (g_cine->getGameType() == Cine::GType_OS) { - uint16 bpp = READ_BE_UINT16(ptr); ptr += 2; - if (bpp == 8) { - ctColorMode = 1; - memcpy(newPalette, ptr, 256 * 3); - ptr += 3 * 256; - memcpy(page3Raw, ptr, 320 * 200); - } else { - ctColorMode = 0; - for (int i = 0; i < 16; i++) { - tempPalette[i] = READ_BE_UINT16(ptr); - ptr += 2; - } - - gfxResetRawPage(page3Raw); - gfxConvertSpriteToRaw(page3Raw, ptr, 160, 200); - } - } else { - loadRelatedPalette(ctName); + loadRelatedPalette(ctName); - assert(strstr(ctName, ".NEO")); + assert(strstr(ctName, ".NEO")); - Common::MemoryReadStream readS(ptr, 32); - - for (int i = 0; i < 16; i++) { - header[i] = readS.readUint16BE(); - } + Common::MemoryReadStream readS(ptr, 32); - gfxConvertSpriteToRaw(page3Raw, ptr + 0x80, 160, 200); + for (int i = 0; i < 16; i++) { + header[i] = readS.readUint16BE(); } + gfxConvertSpriteToRaw(page3Raw, ptr + 0x80, 160, 200); + free(dataPtr); return 0; } -void loadBgHigh(const char *currentPtr) { - memcpy(newPalette, currentPtr, 256 * 3); - currentPtr += 256 * 3; +byte loadCtOS(const char *ctName) { + byte *ptr, *dataPtr; - memcpy(page2Raw, currentPtr, 320 * 200); + if (currentCtName != ctName) + strcpy(currentCtName, ctName); + + ptr = dataPtr = readBundleFile(findFileInBundle(ctName)); - newColorMode = 2; - bgColorMode = 1; + uint16 bpp = READ_BE_UINT16(ptr); + ptr += 2; + + if (bpp == 8) { + memcpy(page3Raw, ptr + 256 * 3, 320 * 200); + renderer->loadCt256(ptr, ctName); + } else { + gfxConvertSpriteToRaw(page3Raw, ptr + 32, 160, 200); + renderer->loadCt16(ptr, ctName); + } + free(dataPtr); + return 0; } byte loadBg(const char *bgName) { byte *ptr, *dataPtr; - if (currentBgName[0] != bgName) - strcpy(currentBgName[0], bgName); - byte fileIdx = findFileInBundle(bgName); ptr = dataPtr = readBundleFile(fileIdx); - uint16 bpp = READ_BE_UINT16(ptr); ptr += 2; + uint16 bpp = READ_BE_UINT16(ptr); + ptr += 2; + if (bpp == 8) { - loadBgHigh((const char *)ptr); + renderer->loadBg256(ptr, bgName); } else { - newColorMode = 1; - bgColorMode = 0; - - for (int i = 0; i < 16; i++) { - tempPalette[i] = READ_BE_UINT16(ptr); - ptr += 2; - } - if (g_cine->getGameType() == Cine::GType_FW) { loadRelatedPalette(bgName); } - gfxResetRawPage(page2Raw); - gfxConvertSpriteToRaw(page2Raw, ptr, 160, 200); + renderer->loadBg16(ptr, bgName); } free(dataPtr); return 0; @@ -127,28 +110,15 @@ byte loadBg(const char *bgName) { void addBackground(const char *bgName, uint16 bgIdx) { byte *ptr, *dataPtr; - strcpy(currentBgName[bgIdx], bgName); - byte fileIdx = findFileInBundle(bgName); ptr = dataPtr = readBundleFile(fileIdx); - additionalBgTable[bgIdx] = (byte *) malloc(320 * 200); - uint16 bpp = READ_BE_UINT16(ptr); ptr += 2; if (bpp == 8) { - bgColorMode = 1; - memcpy(newPalette, ptr, 256 * 3); - ptr += 3 * 256; - memcpy(additionalBgTable[bgIdx], ptr, 320 * 200); + renderer->loadBg256(ptr, bgName, bgIdx); } else { - bgColorMode = 0; - for (int i = 0; i < 16; i++) { - tempPalette[i] = READ_BE_UINT16(ptr); - ptr += 2; - } - - gfxConvertSpriteToRaw(additionalBgTable[bgIdx], ptr, 160, 200); + renderer->loadBg16(ptr, bgName, bgIdx); } free(dataPtr); } diff --git a/engines/cine/bg.h b/engines/cine/bg.h index ca5c222131..5fa8209131 100644 --- a/engines/cine/bg.h +++ b/engines/cine/bg.h @@ -27,20 +27,9 @@ #define CINE_BG_H namespace Cine { -struct bgData { - byte *data; - byte colorMode; - byte *highPalette; - uint16 *lowPalette; -}; - byte loadBg(const char *bgName); -byte loadCt(const char *bgName); - -//extern bgData additionalBgTable[9]; -extern byte *additionalBgTable[9]; -extern byte currentAdditionalBgIdx; -extern byte currentAdditionalBgIdx2; +byte loadCtFW(const char *bgName); +byte loadCtOS(const char *bgName); void addBackground(const char *bgName, uint16 bgIdx); diff --git a/engines/cine/bg_list.cpp b/engines/cine/bg_list.cpp index a70733dc68..cf25f1d355 100644 --- a/engines/cine/bg_list.cpp +++ b/engines/cine/bg_list.cpp @@ -40,62 +40,20 @@ Common::List bgIncrustList; /*! \brief Add masked sprite to the background * \param objIdx Sprite description - * \param addList Add sprite to incrust list if true - * \todo Fix incrust objects on CT background. Always drawing incrust elements - * on CT background breaks game zones */ -void addToBGList(int16 objIdx, bool addList) { - int16 x = objectTable[objIdx].x; - int16 y = objectTable[objIdx].y; - int16 width = animDataTable[objectTable[objIdx].frame]._var1; - int16 height = animDataTable[objectTable[objIdx].frame]._height; - const byte *data = animDataTable[objectTable[objIdx].frame].data(); - const byte *mask = animDataTable[objectTable[objIdx].frame].mask(); -// int16 part = objectTable[objIdx].part; - - // Operation Stealth may switch among multiple backgrounds - if (g_cine->getGameType() == GType_OS) { - for (int i = 0; i < 8; i++) { - if (additionalBgTable[i]) { - drawSpriteRaw2(data, objectTable[objIdx].part, width, height, additionalBgTable[i], x, y); - } - } - } else { - drawSpriteRaw(data, mask, width, height, page2Raw, x, y); - } +void addToBGList(int16 objIdx) { + renderer->incrustSprite(objectTable[objIdx]); - if (addList) - createBgIncrustListElement(objIdx, 0); + createBgIncrustListElement(objIdx, 0); } /*! \brief Add filled sprite to the background * \param objIdx Sprite description - * \param addList Add sprite to incrust list if true - * \todo Fix incrust objects on CT background. Always drawing incrust elements - * on CT background breaks game zones */ -void addSpriteFilledToBGList(int16 objIdx, bool addList) { - int16 x = objectTable[objIdx].x; - int16 y = objectTable[objIdx].y; - int16 width = animDataTable[objectTable[objIdx].frame]._realWidth; - int16 height = animDataTable[objectTable[objIdx].frame]._height; - const byte *data = animDataTable[objectTable[objIdx].frame].data(); - - if (data) { - // Operation Stealth may switch among multiple backgrounds - if (g_cine->getGameType() == GType_OS) { - for (int i = 0; i < 8; i++) { - if (additionalBgTable[i]) { - gfxFillSprite(data, width, height, additionalBgTable[i], x, y); - } - } - } else { - gfxFillSprite(data, width, height, page2Raw, x, y); - } - } +void addSpriteFilledToBGList(int16 objIdx) { + renderer->incrustMask(objectTable[objIdx]); - if (addList) - createBgIncrustListElement(objIdx, 1); + createBgIncrustListElement(objIdx, 1); } /*! \brief Add new element to incrust list @@ -115,7 +73,7 @@ void createBgIncrustListElement(int16 objIdx, int16 param) { bgIncrustList.push_back(tmp); } -/*! \brief Reset var8 (probably something related to bgIncrustList +/*! \brief Reset var8 (probably something related to bgIncrustList) */ void resetBgIncrustList(void) { var8 = 0; @@ -142,9 +100,9 @@ void loadBgIncrustFromSave(Common::InSaveFile &fHandle) { bgIncrustList.push_back(tmp); if (tmp.param == 0) { - addToBGList(tmp.objIdx, false); + renderer->incrustSprite(objectTable[tmp.objIdx]); } else { - addSpriteFilledToBGList(tmp.objIdx, false); + renderer->incrustMask(objectTable[tmp.objIdx]); } } } diff --git a/engines/cine/bg_list.h b/engines/cine/bg_list.h index 9ceae0acf5..1849d6ec3d 100644 --- a/engines/cine/bg_list.h +++ b/engines/cine/bg_list.h @@ -46,8 +46,8 @@ struct BGIncrust { extern Common::List bgIncrustList; extern uint32 var8; -void addToBGList(int16 objIdx, bool addList = true); -void addSpriteFilledToBGList(int16 idx, bool addList = true); +void addToBGList(int16 objIdx); +void addSpriteFilledToBGList(int16 idx); void createBgIncrustListElement(int16 objIdx, int16 param); void resetBgIncrustList(void); diff --git a/engines/cine/cine.cpp b/engines/cine/cine.cpp index 41dd9be16f..efc33fadaf 100644 --- a/engines/cine/cine.cpp +++ b/engines/cine/cine.cpp @@ -95,7 +95,9 @@ int CineEngine::init() { int CineEngine::go() { CursorMan.showMouse(true); mainLoop(1); - gfxDestroy(); + + delete renderer; + delete[] page3Raw; delete g_sound; return 0; } @@ -105,8 +107,14 @@ void CineEngine::initialize() { setupOpcodes(); initLanguage(g_cine->getLanguage()); - gfxInit(); + if (g_cine->getGameType() == Cine::GType_OS) { + renderer = new OSRenderer; + } else { + renderer = new FWRenderer; + } + + page3Raw = new byte[320 * 200]; textDataPtr = (byte *)malloc(8000); partBuffer = (PartBuffer *)malloc(NUM_MAX_PARTDATA * sizeof(PartBuffer)); diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index 2730a92e62..e20dd46c53 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -27,6 +27,7 @@ #include "cine/bg.h" #include "cine/bg_list.h" #include "cine/various.h" +#include "cine/pal.h" #include "common/endian.h" #include "common/system.h" @@ -35,18 +36,8 @@ namespace Cine { -uint16 c_palette[256]; -byte colorMode256 = 0; -byte palette256[256 * 3]; -byte newPalette[256 * 3]; -byte newColorMode = 0; -byte ctColorMode = 0; -byte bgColorMode = 0; - -byte *screenBuffer; -byte *page1Raw; -byte *page2Raw; byte *page3Raw; +FWRenderer *renderer = NULL; static const byte mouseCursorNormal[] = { 0x00, 0x00, 0x40, 0x00, 0x60, 0x00, 0x70, 0x00, @@ -96,28 +87,1189 @@ static const byte cursorPalette[] = { 0xff, 0xff, 0xff, 0xff }; -void gfxInit() { - screenBuffer = (byte *)malloc(320 * 200); - page1Raw = (byte *)malloc(320 * 200); - page2Raw = (byte *)malloc(320 * 200); - page3Raw = (byte *)malloc(320 * 200); - if (!screenBuffer || !page1Raw || !page2Raw || !page3Raw) { - error("Unable to allocate offscreen buffers"); +/*! \brief Initialize renderer + */ +FWRenderer::FWRenderer() : _background(NULL), _palette(NULL), _cmd(""), + _cmdY(0), _messageBg(0), _backBuffer(new byte[_screenSize]), + _activeLowPal(NULL), _changePal(0) { + + assert(_backBuffer); + + memset(_backBuffer, 0, _screenSize); + memset(_bgName, 0, sizeof (_bgName)); +} + +/* \brief Destroy renderer + */ +FWRenderer::~FWRenderer() { + delete[] _background; + delete[] _palette; + delete[] _backBuffer; + delete[] _activeLowPal; +} + +/* \brief Reset renderer state + */ +void FWRenderer::clear() { + delete[] _background; + delete[] _palette; + delete[] _activeLowPal; + + _background = NULL; + _palette = NULL; + _activeLowPal = NULL; + + memset(_backBuffer, 0, _screenSize); + + _cmd = ""; + _cmdY = 0; + _messageBg = 0; + _changePal = 0; +} + +/*! \brief Draw 1bpp sprite using selected color + * \param obj Object info + * \param fillColor Sprite color + */ +void FWRenderer::fillSprite(const objectStruct &obj, uint8 color) { + const byte *data = animDataTable[obj.frame].data(); + int x, y, width, height; + + x = obj.x; + y = obj.y; + width = animDataTable[obj.frame]._realWidth; + height = animDataTable[obj.frame]._height; + + gfxFillSprite(data, width, height, _backBuffer, x, y, color); +} + +/*! \brief Draw 1bpp sprite using selected color on background + * \param obj Object info + * \param fillColor Sprite color + */ +void FWRenderer::incrustMask(const objectStruct &obj, uint8 color) { + const byte *data = animDataTable[obj.frame].data(); + int x, y, width, height; + + x = obj.x; + y = obj.y; + width = animDataTable[obj.frame]._realWidth; + height = animDataTable[obj.frame]._height; + + gfxFillSprite(data, width, height, _background, x, y, color); +} + +/*! \brief Draw color sprite using with external mask + * \param obj Object info + * \param mask External mask + */ +void FWRenderer::drawMaskedSprite(const objectStruct &obj, const byte *mask) { + const byte *data = animDataTable[obj.frame].data(); + int x, y, width, height; + + x = obj.x; + y = obj.y; + width = animDataTable[obj.frame]._realWidth; + height = animDataTable[obj.frame]._height; + + assert(mask); + + drawSpriteRaw(data, mask, width, height, _backBuffer, x, y); +} + +/*! \brief Draw color sprite + * \param obj Object info + */ +void FWRenderer::drawSprite(const objectStruct &obj) { + const byte *mask = animDataTable[obj.frame].mask(); + drawMaskedSprite(obj, mask); +} + +/*! \brief Draw color sprite on background + * \param obj Object info + */ +void FWRenderer::incrustSprite(const objectStruct &obj) { + const byte *data = animDataTable[obj.frame].data(); + const byte *mask = animDataTable[obj.frame].mask(); + int x, y, width, height; + + x = obj.x; + y = obj.y; + width = animDataTable[obj.frame]._realWidth; + height = animDataTable[obj.frame]._height; + + assert(mask); + + drawSpriteRaw(data, mask, width, height, _background, x, y); +} + +/*! \brief Draw command box on screen + */ +void FWRenderer::drawCommand() { + unsigned int i; + int x = 10, y = _cmdY; + + drawPlainBox(x, y, 301, 11, 0); + drawBorder(x - 1, y - 1, 302, 12, 2); + + x += 2; + y += 2; + + for (i = 0; i < _cmd.size(); i++) { + x = drawChar(_cmd[i], x, y); + } +} + +/*! \brief Draw message in a box + * \param str Message to draw + * \param x Top left message box corner coordinate + * \param y Top left message box corner coordinate + * \param width Message box width + * \param color Message box background color + */ +void FWRenderer::drawMessage(const char *str, int x, int y, int width, byte color) { + int i, tx, ty, tw; + int line = 0, words = 0, cw = 0; + int space = 0, extraSpace = 0; + + drawPlainBox(x, y, width, 4, color); + tx = x + 4; + ty = str[0] ? y - 5 : y + 4; + tw = width - 8; + + for (i = 0; str[i]; i++, line--) { + // Fit line of text into textbox + if (!line) { + while (str[i] == ' ') i++; + line = fitLine(str + i, tw, words, cw); + + if ( str[i + line] != '\0' && str[i + line] != 0x7C && words) { + space = (tw - cw) / words; + extraSpace = (tw - cw) % words; + } else { + space = 5; + extraSpace = 0; + } + + ty += 9; + drawPlainBox(x, ty, width, 9, color); + tx = x + 4; + } + + // draw characters + if (str[i] == ' ') { + tx += space + extraSpace; + + if (extraSpace) { + extraSpace = 0; + } + } else { + tx = drawChar(str[i], tx, ty); + } + } + + ty += 9; + drawPlainBox(x, ty, width, 4, color); + drawDoubleBorder(x, y, width, ty - y + 4, 2); +} + +/*! \brief Draw rectangle on screen + * \param x Top left corner coordinate + * \param y Top left corner coordinate + * \param width Rectangle width + * \param height Rectangle height + * \param color Fill color + */ +void FWRenderer::drawPlainBox(int x, int y, int width, int height, byte color) { + int i; + byte *dest = _backBuffer + y * 320 + x; + + if (width < 0) { + x += width; + width = -width; + } + + if (height < 0) { + y += height; + height = -height; + } + + for (i = 0; i < height; i++) { + memset(dest + i * 320, color, width); + } +} + +/*! \brief Draw empty rectangle + * \param x Top left corner coordinate + * \param y Top left corner coordinate + * \param width Rectangle width + * \param height Rectangle height + * \param color Line color + */ +void FWRenderer::drawBorder(int x, int y, int width, int height, byte color) { + drawLine(x, y, width, 1, color); + drawLine(x, y + height, width, 1, color); + drawLine(x, y, 1, height, color); + drawLine(x + width, y, 1, height + 1, color); +} + +/*! \brief Draw empty 2 color rectangle (inner line color is black) + * \param x Top left corner coordinate + * \param y Top left corner coordinate + * \param width Rectangle width + * \param height Rectangle height + * \param color Outter line color + */ +void FWRenderer::drawDoubleBorder(int x, int y, int width, int height, byte color) { + drawBorder(x + 1, y + 1, width - 2, height - 2, 0); + drawBorder(x, y, width, height, color); +} + +/*! \brief Draw text character on screen + * \param character Character to draw + * \param x Character coordinate + * \param y Character coordinate + */ +int FWRenderer::drawChar(char character, int x, int y) { + int width, idx; + + if (character == ' ') { + x += 5; + } else if ((width = fontParamTable[character].characterWidth)) { + idx = fontParamTable[character].characterIdx; + drawSpriteRaw(textTable[idx][0], textTable[idx][1], 16, 8, _backBuffer, x, y); + x += width + 1; + } + + return x; +} + +/*! \brief Draw Line + * \param x Line end coordinate + * \param y Line end coordinate + * \param width Horizontal line length + * \param height Vertical line length + * \param color Line color + * \note Either width or height must be equal to 1 + */ +void FWRenderer::drawLine(int x, int y, int width, int height, byte color) { + // this line is a special case of rectangle ;-) + drawPlainBox(x, y, width, height, color); +} + +/*! \brief Hide invisible parts of the sprite + * \param[in,out] mask Mask to be updated + * \param it Overlay info from overlayList + */ +void FWRenderer::remaskSprite(byte *mask, Common::List::iterator it) { + AnimData &sprite = animDataTable[objectTable[it->objIdx].frame]; + int x, y, width, height, idx; + int mx, my, mw, mh; + + x = objectTable[it->objIdx].x; + y = objectTable[it->objIdx].y; + width = sprite._realWidth; + height = sprite._height; + + for (++it; it != overlayList.end(); ++it) { + if (it->type != 5) { + continue; + } + + idx = ABS(objectTable[it->objIdx].frame); + mx = objectTable[it->objIdx].x; + my = objectTable[it->objIdx].y; + mw = animDataTable[idx]._realWidth; + mh = animDataTable[idx]._height; + + gfxUpdateSpriteMask(mask, x, y, width, height, animDataTable[idx].data(), mx, my, mw, mh); + } +} + +/*! \brief Draw background to backbuffer + */ +void FWRenderer::drawBackground() { + assert(_background); + memcpy(_backBuffer, _background, _screenSize); +} + +/*! \brief Draw one overlay + * \param it Overlay info + */ +void FWRenderer::renderOverlay(const Common::List::iterator &it) { + int idx, len, width; + objectStruct *obj; + AnimData *sprite; + byte *mask; + + switch (it->type) { + // color sprite + case 0: + sprite = animDataTable + objectTable[it->objIdx].frame; + len = sprite->_realWidth * sprite->_height; + mask = new byte[len]; + memcpy(mask, sprite->mask(), len); + remaskSprite(mask, it); + drawMaskedSprite(objectTable[it->objIdx], mask); + delete[] mask; + break; + + // game message + case 2: + if (it->objIdx >= messageTable.size()) { + return; + } + + _messageLen += messageTable[it->objIdx].size(); + drawMessage(messageTable[it->objIdx].c_str(), it->x, it->y, it->width, it->color); + break; + + // action failure message + case 3: + idx = it->objIdx * 4 + g_cine->_rnd.getRandomNumber(3); + len = strlen(failureMessages[idx]); + _messageLen += len; + width = 6 * len + 20; + width = width > 300 ? 300 : width; + + drawMessage(failureMessages[idx], (320 - width) / 2, 80, width, 4); + break; + + // bitmap + case 4: + assert(it->objIdx < NUM_MAX_OBJECT); + obj = objectTable + it->objIdx; + + if (obj->frame < 0) { + return; + } + + if (!animDataTable[obj->frame].data()) { + return; + } + + fillSprite(*obj); + break; + } +} + +/*! \brief Draw overlays + */ +void FWRenderer::drawOverlays() { + Common::List::iterator it; + + for (it = overlayList.begin(); it != overlayList.end(); ++it) { + renderOverlay(it); + } +} + +/*! \brief Draw another frame + */ +void FWRenderer::drawFrame() { + drawBackground(); + drawOverlays(); + + if (!_cmd.empty()) { + drawCommand(); + } + + if (_changePal) { + refreshPalette(); + } + + blit(); +} + +/*! \brief Update screen + */ +void FWRenderer::blit() { + g_system->copyRectToScreen(_backBuffer, 320, 0, 0, 320, 200); +} + +/*! \brief Set player command string + * \param cmd New command string + */ +void FWRenderer::setCommand(const char *cmd) { + _cmd = cmd; +} + +/*! \brief Refresh current palette + */ +void FWRenderer::refreshPalette() { + int i; + byte pal[16*4]; + + assert(_activeLowPal); + + for (i = 0; i < 16; i++) { + // This seems to match the output from DOSbox. + pal[i * 4 + 2] = ((_activeLowPal[i] & 0x00f) >> 0) * 32; + pal[i * 4 + 1] = ((_activeLowPal[i] & 0x0f0) >> 4) * 32; + pal[i * 4 + 0] = ((_activeLowPal[i] & 0xf00) >> 8) * 32; + pal[i * 4 + 3] = 0; + } + + g_system->setPalette(pal, 0, 16); + _changePal = 0; +} + +/*! \brief Load palette of current background + */ +void FWRenderer::reloadPalette() { + assert(_palette); + + if (!_activeLowPal) { + _activeLowPal = new uint16[_lowPalSize]; } - memset(page1Raw, 0, 320 * 200); - memset(page2Raw, 0, 320 * 200); - memset(page3Raw, 0, 320 * 200); - memset(additionalBgTable, 0, sizeof(additionalBgTable)); - additionalBgTable[0] = page2Raw; - additionalBgTable[8] = page3Raw; + assert(_activeLowPal); + + memcpy(_activeLowPal, _palette, _lowPalSize * sizeof (uint16)); + _changePal = 1; +} + +/*! \brief Load background into renderer + * \param bg Raw background data + */ +void FWRenderer::loadBg16(const byte *bg, const char *name) { + int i; + + if (!_background) { + _background = new byte[_screenSize]; + } + + if (!_palette) { + _palette = new uint16[_lowPalSize]; + } + + assert(_background && _palette); + + strcpy(_bgName, name); + + for (i = 0; i < _lowPalSize; i++, bg += 2) { + _palette[i] = READ_BE_UINT16(bg); + } + + gfxConvertSpriteToRaw(_background, bg, 160, 200); +} + +/*! \brief Placeholder for Operation Stealth implementation + */ +void FWRenderer::loadBg16(const byte *bg, const char *name, unsigned int idx) { + error("Future Wars renderer doesn't support multiple backgrounds"); +} + +/*! \brief Placeholder for Operation Stealth implementation + */ +void FWRenderer::loadCt16(const byte *ct, const char *name) { + error("Future Wars renderer doesn't support multiple backgrounds"); +} + +/*! \brief Placeholder for Operation Stealth implementation + */ +void FWRenderer::loadBg256(const byte *bg, const char *name) { + error("Future Wars renderer doesn't support 256 color mode"); +} + +/*! \brief Placeholder for Operation Stealth implementation + */ +void FWRenderer::loadBg256(const byte *bg, const char *name, unsigned int idx) { + error("Future Wars renderer doesn't support multiple backgrounds"); +} + +/*! \brief Placeholder for Operation Stealth implementation + */ +void FWRenderer::loadCt256(const byte *ct, const char *name) { + error("Future Wars renderer doesn't support multiple backgrounds"); +} + +/*! \brief Placeholder for Operation Stealth implementation + */ +void FWRenderer::selectBg(unsigned int idx) { + error("Future Wars renderer doesn't support multiple backgrounds"); } -void gfxDestroy() { - free(screenBuffer); - free(page1Raw); - free(page2Raw); - free(page3Raw); +/*! \brief Placeholder for Operation Stealth implementation + */ +void FWRenderer::selectScrollBg(unsigned int idx) { + error("Future Wars renderer doesn't support multiple backgrounds"); +} + +/*! \brief Placeholder for Operation Stealth implementation + */ +void FWRenderer::setScroll(unsigned int shift) { + error("Future Wars renderer doesn't support multiple backgrounds"); +} + +/*! \brief Placeholder for Operation Stealth implementation + */ +void FWRenderer::removeBg(unsigned int idx) { + error("Future Wars renderer doesn't support multiple backgrounds"); +} + +void FWRenderer::saveBg(Common::OutSaveFile &fHandle) { + fHandle.write(_bgName, 13); +} + +/*! \brief Restore active and backup palette from save + * \param fHandle Savefile open for reading + */ +void FWRenderer::restorePalette(Common::InSaveFile &fHandle) { + int i; + + if (!_palette) { + _palette = new uint16[_lowPalSize]; + } + + if (!_activeLowPal) { + _activeLowPal = new uint16[_lowPalSize]; + } + + assert(_palette && _activeLowPal); + + for (i = 0; i < _lowPalSize; i++) { + _activeLowPal[i] = fHandle.readUint16BE(); + } + + for (i = 0; i < _lowPalSize; i++) { + _palette[i] = fHandle.readUint16BE(); + } + + _changePal = 1; +} + +/*! \brief Write active and backup palette to save + * \param fHandle Savefile open for writing + */ +void FWRenderer::savePalette(Common::OutSaveFile &fHandle) { + int i; + + assert(_palette && _activeLowPal); + + for (i = 0; i < _lowPalSize; i++) { + fHandle.writeUint16BE(_activeLowPal[i]); + } + + for (i = 0; i < _lowPalSize; i++) { + fHandle.writeUint16BE(_palette[i]); + } +} + +/*! \brief Rotate active palette + * \param a First color to rotate + * \param b Last color to rotate + * \param c Possibly rotation step, must be equal to 1 at the moment + */ +void FWRenderer::rotatePalette(int a, int b, int c) { + palRotate(_activeLowPal, a, b, c); + refreshPalette(); +} + +/*! \brief Copy part of backup palette to active palette and transform + * \param first First color to transform + * \param last Last color to transform + * \param r Red channel transformation + * \param g Green channel transformation + * \param b Blue channel transformation + */ +void FWRenderer::transformPalette(int first, int last, int r, int g, int b) { + if (!_activeLowPal) { + _activeLowPal = new uint16[_lowPalSize]; + memset(_activeLowPal, 0, _lowPalSize * sizeof (uint16)); + } + + transformPaletteRange(_activeLowPal, _palette, first, last, r, g, b); + refreshPalette(); +} + +/*! \brief Draw menu box, one item per line with possible highlight + * \param items Menu items + * \param height Item count + * \param x Top left menu corner coordinate + * \param y Top left menu corner coordinate + * \param width Menu box width + * \param selected Index of highlighted item (no highlight if less than 0) + */ +void FWRenderer::drawMenu(const CommandeType *items, unsigned int height, int x, int y, int width, int selected) { + int tx, ty, th = height * 9 + 10; + unsigned int i, j; + + if (x + width > 319) { + x = 319 - width; + } + + if (y + th > 199) { + y = 199 - th; + } + + drawPlainBox(x, y, width, 4, _messageBg); + + ty = y + 4; + + for (i = 0; i < height; i++, ty += 9) { + drawPlainBox(x, ty, width, 9, (int)i == selected ? 0 : _messageBg); + tx = x + 4; + + for (j = 0; items[i][j]; j++) { + tx = drawChar(items[i][j], tx, ty); + } + } + + drawPlainBox(x, ty, width, 4, _messageBg); + drawDoubleBorder(x, y, width, ty - y + 4, 2); +} + +/*! \brief Draw text input box + * \param info Input box message + * \param input Text entered in the input area + * \param cursor Cursor position in the input area + * \param x Top left input box corner coordinate + * \param y Top left input box corner coordinate + * \param width Input box width + */ +void FWRenderer::drawInputBox(const char *info, const char *input, int cursor, int x, int y, int width) { + int i, tx, ty, tw; + int line = 0, words = 0, cw = 0; + int space = 0, extraSpace = 0; + + drawPlainBox(x, y, width, 4, _messageBg); + tx = x + 4; + ty = info[0] ? y - 5 : y + 4; + tw = width - 8; + + // input box info message + for (i = 0; info[i]; i++, line--) { + // fit line of text + if (!line) { + line = fitLine(info + i, tw, words, cw); + + if ( info[i + line] != '\0' && words) { + space = (tw - cw) / words; + extraSpace = (tw - cw) % words; + } else { + space = 5; + extraSpace = 0; + } + + ty += 9; + drawPlainBox(x, ty, width, 9, _messageBg); + tx = x + 4; + } + + // draw characters + if (info[i] == ' ') { + tx += space + extraSpace; + + if (extraSpace) { + extraSpace = 0; + } + } else { + tx = drawChar(info[i], tx, ty); + } + } + + // input area background + ty += 9; + drawPlainBox(x, ty, width, 9, _messageBg); + drawPlainBox(x + 16, ty - 1, width - 32, 9, 0); + tx = x + 20; + + // text in input area + for (i = 0; input[i]; i++) { + tx = drawChar(input[i], tx, ty); + + if (cursor == i + 2) { + drawLine(tx, ty - 1, 1, 9, 2); + } + } + + if (!input[0] || cursor == 1) { + drawLine(x + 20, ty - 1, 1, 9, 2); + } + + ty += 9; + drawPlainBox(x, ty, width, 4, _messageBg); + drawDoubleBorder(x, y, width, ty - y + 4, 2); +} + +/*! \brief Fade to black + */ +void FWRenderer::fadeToBlack() { + assert(_activeLowPal); + + for (int i = 0; i < 8; i++) { + for (int j = 0; j < 16; j++) { + _activeLowPal[j] = transformColor(_activeLowPal[j], -1, -1, -1); + } + + refreshPalette(); + g_system->updateScreen(); + g_system->delayMillis(50); + } +} + +/*! \brief Initialize Operation Stealth renderer + */ +OSRenderer::OSRenderer() : _activeHiPal(NULL), _currentBg(0), _scrollBg(0), + _bgShift(0) { + + int i; + for (i = 0; i < 9; i++) { + _bgTable[i].bg = NULL; + _bgTable[i].lowPal = NULL; + _bgTable[i].hiPal = NULL; + memset(_bgTable[i].name, 0, sizeof (_bgTable[i].name)); + } +} + +/*! \brief Destroy Operation Stealth renderer + */ +OSRenderer::~OSRenderer() { + delete[] _activeHiPal; + + for (int i = 0; i < 9; i++) { + delete[] _bgTable[i].bg; + delete[] _bgTable[i].lowPal; + delete[] _bgTable[i].hiPal; + } +} + +/*! \brief Reset Operation Stealth renderer state + */ +void OSRenderer::clear() { + delete[] _activeHiPal; + _activeHiPal = NULL; + + for (int i = 0; i < 9; i++) { + delete[] _bgTable[i].bg; + delete[] _bgTable[i].lowPal; + delete[] _bgTable[i].hiPal; + + _bgTable[i].bg = NULL; + _bgTable[i].lowPal = NULL; + _bgTable[i].hiPal = NULL; + memset(_bgTable[i].name, 0, sizeof (_bgTable[i].name)); + } + + _currentBg = 0; + _scrollBg = 0; + _bgShift = 0; + + FWRenderer::clear(); +} + +/*! \brief Draw 1bpp sprite using selected color on backgrounds + * \param obj Object info + * \param fillColor Sprite color + */ +void OSRenderer::incrustMask(const objectStruct &obj, uint8 color) { + const byte *data = animDataTable[obj.frame].data(); + int x, y, width, height, i; + + x = obj.x; + y = obj.y; + width = animDataTable[obj.frame]._realWidth; + height = animDataTable[obj.frame]._height; + + for (i = 0; i < 8; i++) { + if (!_bgTable[i].bg) { + continue; + } + + gfxFillSprite(data, width, height, _bgTable[i].bg, x, y, color); + } +} + +/*! \brief Draw color sprite + * \param obj Object info + */ +void OSRenderer::drawSprite(const objectStruct &obj) { + const byte *data = animDataTable[obj.frame].data(); + int x, y, width, height, transColor; + + x = obj.x; + y = obj.y; + transColor = obj.part; + width = animDataTable[obj.frame]._realWidth; + height = animDataTable[obj.frame]._height; + + drawSpriteRaw2(data, transColor, width, height, _backBuffer, x, y); +} + +/*! \brief Draw color sprite + * \param obj Object info + */ +void OSRenderer::incrustSprite(const objectStruct &obj) { + const byte *data = animDataTable[obj.frame].data(); + int x, y, width, height, transColor, i; + + x = obj.x; + y = obj.y; + transColor = obj.part; + width = animDataTable[obj.frame]._realWidth; + height = animDataTable[obj.frame]._height; + + for (i = 0; i < 8; i++) { + if (!_bgTable[i].bg) { + continue; + } + + drawSpriteRaw2(data, transColor, width, height, _bgTable[i].bg, x, y); + } +} + +/*! \brief Draw text character on screen + * \param character Character to draw + * \param x Character coordinate + * \param y Character coordinate + */ +int OSRenderer::drawChar(char character, int x, int y) { + int width, idx; + + if (character == ' ') { + x += 5; + } else if ((width = fontParamTable[character].characterWidth)) { + idx = fontParamTable[character].characterIdx; + drawSpriteRaw2(textTable[idx][0], 0, 16, 8, _backBuffer, x, y); + x += width + 1; + } + + return x; +} + +/*! \brief Draw background to backbuffer + */ +void OSRenderer::drawBackground() { + byte *main; + + main = _bgTable[_currentBg].bg; + assert(main); + + if (!_bgShift) { + memcpy(_backBuffer, main, _screenSize); + } else { + byte *scroll = _bgTable[_scrollBg].bg; + int mainShift = _bgShift * _screenWidth; + int mainSize = _screenSize - mainShift; + + assert(scroll); + + memcpy(_backBuffer, main + mainShift, mainSize); + memcpy(_backBuffer + mainSize, scroll, mainShift); + } +} + +/*! \brief Draw one overlay + * \param it Overlay info + */ +void OSRenderer::renderOverlay(const Common::List::iterator &it) { + int len; + objectStruct *obj; + AnimData *sprite; + byte *mask; + + switch (it->type) { + // color sprite + case 0: + sprite = animDataTable + objectTable[it->objIdx].frame; + len = sprite->_realWidth * sprite->_height; + mask = new byte[len]; + generateMask(sprite->data(), mask, len, objectTable[it->objIdx].part); + remaskSprite(mask, it); + drawMaskedSprite(objectTable[it->objIdx], mask); + delete[] mask; + break; + + // masked background + case 20: + assert(it->objIdx < NUM_MAX_OBJECT); + obj = objectTable + it->objIdx; + sprite = animDataTable + obj->frame; + + if (obj->frame < 0 || it->x > 8 || !_bgTable[it->x].bg || sprite->_bpp != 1) { + break; + } + + maskBgOverlay(_bgTable[it->x].bg, sprite->data(), sprite->_realWidth, sprite->_height, _backBuffer, obj->x, obj->y); + break; + + // something else + default: + FWRenderer::renderOverlay(it); + break; + } +} + +/*! \brief Refresh current palette + */ +void OSRenderer::refreshPalette() { + if (!_activeHiPal) { + FWRenderer::refreshPalette(); + return; + } + + int i; + byte pal[256*4]; + + for (i = 0; i < 256; i++) { + pal[i * 4 + 0] = _activeHiPal[i * 3 + 0]; + pal[i * 4 + 1] = _activeHiPal[i * 3 + 1]; + pal[i * 4 + 2] = _activeHiPal[i * 3 + 2]; + pal[i * 4 + 3] = 0; + } + + g_system->setPalette(pal, 0, 256); + _changePal = 0; +} + +/*! \brief Load palette of current background + */ +void OSRenderer::reloadPalette() { + // selected background in plane takeoff scene has swapped colors 12 + // and 14, shift background has it right + palBg *bg = _bgShift ? &_bgTable[_scrollBg] : &_bgTable[_currentBg]; + + assert(bg->lowPal || bg->hiPal); + + if (bg->lowPal) { + if (!_activeLowPal) { + _activeLowPal = new uint16[_lowPalSize]; + } + + assert(_activeLowPal); + + delete[] _activeHiPal; + _activeHiPal = NULL; + + memcpy(_activeLowPal, bg->lowPal, _lowPalSize * sizeof (uint16)); + } else { + if (!_activeHiPal) { + _activeHiPal = new byte[_hiPalSize]; + } + + assert(_activeHiPal); + + delete[] _activeLowPal; + _activeLowPal = NULL; + + memcpy(_activeHiPal, bg->hiPal, _hiPalSize); + } + _changePal = 1; +} + +/*! \brief Rotate active palette + * \param a First color to rotate + * \param b Last color to rotate + * \param c Possibly rotation step, must be equal to 1 at the moment + */ +void OSRenderer::rotatePalette(int a, int b, int c) { + if (_activeLowPal) { + FWRenderer::rotatePalette(a, b, c); + return; + } + + palRotate(_activeHiPal, a, b, c); + refreshPalette(); +} + +/*! \brief Copy part of backup palette to active palette and transform + * \param first First color to transform + * \param last Last color to transform + * \param r Red channel transformation + * \param g Green channel transformation + * \param b Blue channel transformation + */ +void OSRenderer::transformPalette(int first, int last, int r, int g, int b) { + palBg *bg = _bgShift ? &_bgTable[_scrollBg] : &_bgTable[_currentBg]; + + if (!bg->lowPal) { + if (!_activeHiPal) { + _activeHiPal = new byte[_hiPalSize]; + memset(_activeHiPal, 0, _hiPalSize); + } + + delete[] _activeLowPal; + _activeLowPal = NULL; + + transformPaletteRange(_activeHiPal, bg->hiPal, first, last, r, g, b); + } else { + if (!_activeLowPal) { + _activeLowPal = new uint16[_lowPalSize]; + memset(_activeLowPal, 0, _lowPalSize * sizeof (uint16)); + } + + delete[] _activeHiPal; + _activeHiPal = NULL; + + transformPaletteRange(_activeLowPal, bg->lowPal, first, last, r, g, b); + } + + refreshPalette(); +} + +/*! \brief Load 16 color background into renderer + * \param bg Raw background data + * \param name Background filename + */ +void OSRenderer::loadBg16(const byte *bg, const char *name) { + loadBg16(bg, name, 0); +} + +/*! \brief Load 16 color background into renderer + * \param bg Raw background data + * \param name Background filename + * \param pos Background index + */ +void OSRenderer::loadBg16(const byte *bg, const char *name, unsigned int idx) { + int i; + assert(idx < 9); + + if (!_bgTable[idx].bg) { + _bgTable[idx].bg = new byte[_screenSize]; + } + + if (!_bgTable[idx].lowPal) { + _bgTable[idx].lowPal = new uint16[_lowPalSize]; + } + + assert(_bgTable[idx].bg && _bgTable[idx].lowPal); + + delete[] _bgTable[idx].hiPal; + _bgTable[idx].hiPal = NULL; + + strcpy(_bgTable[idx].name, name); + + for (i = 0; i < _lowPalSize; i++, bg += 2) { + _bgTable[idx].lowPal[i] = READ_BE_UINT16(bg); + } + + gfxConvertSpriteToRaw(_bgTable[idx].bg, bg, 160, 200); +} + +/*! \brief Load 16 color CT data as background into renderer + * \param ct Raw CT data + * \param name Background filename + */ +void OSRenderer::loadCt16(const byte *ct, const char *name) { + loadBg16(ct, name, 8); +} + +/*! \brief Load 256 color background into renderer + * \param bg Raw background data + * \param name Background filename + */ +void OSRenderer::loadBg256(const byte *bg, const char *name) { + loadBg256(bg, name, 0); +} + +/*! \brief Load 256 color background into renderer + * \param bg Raw background data + * \param name Background filename + * \param pos Background index + */ +void OSRenderer::loadBg256(const byte *bg, const char *name, unsigned int idx) { + assert(idx < 9); + + if (!_bgTable[idx].bg) { + _bgTable[idx].bg = new byte[_screenSize]; + } + + if (!_bgTable[idx].hiPal) { + _bgTable[idx].hiPal = new byte[_hiPalSize]; + } + + assert(_bgTable[idx].bg && _bgTable[idx].hiPal); + + delete[] _bgTable[idx].lowPal; + _bgTable[idx].lowPal = NULL; + + strcpy(_bgTable[idx].name, name); + memcpy(_bgTable[idx].hiPal, bg, _hiPalSize); + memcpy(_bgTable[idx].bg, bg + _hiPalSize, _screenSize); +} + +/*! \brief Load 256 color CT data as background into renderer + * \param ct Raw CT data + * \param name Background filename + */ +void OSRenderer::loadCt256(const byte *ct, const char *name) { + loadBg256(ct, name, 8); +} + +/*! \brief Select active background and load its palette + * \param idx Background index + */ +void OSRenderer::selectBg(unsigned int idx) { + assert(idx < 9 && _bgTable[idx].bg); + assert(_bgTable[idx].lowPal || _bgTable[idx].hiPal); + + _currentBg = idx; + reloadPalette(); +} + +/*! \brief Select scroll background + * \param idx Scroll background index + */ +void OSRenderer::selectScrollBg(unsigned int idx) { + assert(idx < 9); + + if (_bgTable[idx].bg) { + _scrollBg = idx; + } + reloadPalette(); +} + +/*! \brief Set background scroll + * \param shift Background scroll in pixels + */ +void OSRenderer::setScroll(unsigned int shift) { + assert(shift <= 200); + + _bgShift = shift; +} + +/*! \brief Unload background from renderer + * \param idx Background to unload + */ +void OSRenderer::removeBg(unsigned int idx) { + assert(idx > 0 && idx < 9); + + if (_currentBg == idx) { + _currentBg = 0; + } + + if (_scrollBg == idx) { + _scrollBg = 0; + } + + delete[] _bgTable[idx].bg; + delete[] _bgTable[idx].lowPal; + delete[] _bgTable[idx].hiPal; + _bgTable[idx].bg = NULL; + _bgTable[idx].lowPal = NULL; + _bgTable[idx].hiPal = NULL; + memset(_bgTable[idx].name, 0, sizeof (_bgTable[idx].name)); +} + +/*! \brief Fade to black + * \bug Operation Stealth sometimes seems to fade to black using + * transformPalette resulting in double fadeout + */ +void OSRenderer::fadeToBlack() { + if (!_activeHiPal) { + FWRenderer::fadeToBlack(); + return; + } + + for (int i = 0; i < 8; i++) { + for (int j = 0; j < _hiPalSize; j++) { + _activeHiPal[j] = CLIP(_activeHiPal[j] - 32, 0, 255); + } + + refreshPalette(); + g_system->updateScreen(); + g_system->delayMillis(50); + } } void setMouseCursor(int cursor) { @@ -147,21 +1299,6 @@ void setMouseCursor(int cursor) { } } -static uint16 transformColor(uint16 baseColor, int8 r, int8 g, int8 b) { - int8 oriR = CLIP( (baseColor & 0x007) + r, 0, 7); - int8 oriG = CLIP(((baseColor & 0x070) >> 4) + g, 0, 7); - int8 oriB = CLIP(((baseColor & 0x700) >> 8) + b, 0, 7); - - return oriR | (oriG << 4) | (oriB << 8); -} - -void transformPaletteRange(byte startColor, byte stopColor, int8 r, int8 g, int8 b) { - for (byte i = startColor; i <= stopColor; i++) { - c_palette[i] = transformColor(tempPalette[i], b, g, r); - } - //gfxFlipPage(page2); -} - void gfxFillSprite(const byte *spritePtr, uint16 width, uint16 height, byte *page, int16 x, int16 y, uint8 fillColor) { int16 i, j; @@ -170,17 +1307,12 @@ void gfxFillSprite(const byte *spritePtr, uint16 width, uint16 height, byte *pag destPtr += i * 320; for (j = 0; j < width; j++) { - if (x + j >= 0 && x + j < 320 && i + y >= 0 - && i + y < 200) { - if (!*(spritePtr++)) { - *(destPtr++) = fillColor; - } else { - destPtr++; - } - } else { - destPtr++; - spritePtr++; + if (x + j >= 0 && x + j < 320 && i + y >= 0 && i + y < 200 && !*spritePtr) { + *destPtr = fillColor; } + + destPtr++; + spritePtr++; } } } @@ -360,53 +1492,7 @@ void gfxConvertSpriteToRaw(byte *dst, const byte *src, uint16 w, uint16 h) { } } -void gfxCopyRawPage(byte *source, byte *dest) { - memcpy(dest, source, 320 * 200); -} - -void gfxFlipRawPage(byte *frontBuffer) { - byte *page = frontBuffer; - int x, y, i; - byte *pixels = (byte *) screenBuffer; - byte c; - byte pal[256 * 4]; - - for (y = 0; y < 200; y++) { - for (x = 0; x < 320; x++) { - c = *(page++); - - if (!colorMode256) { - c = c & 15; - } - - pixels[x + 0 + y * 320] = c; - } - } - - if (colorMode256) { - for (i = 0; i < 256; i++) { - pal[i * 4 + 0] = palette256[i * 3 + 0]; - pal[i * 4 + 1] = palette256[i * 3 + 1]; - pal[i * 4 + 2] = palette256[i * 3 + 2]; - pal[i * 4 + 3] = 0; - } - g_system->setPalette(pal, 0, 256); - } else { - for (i = 0; i < 16; i++) { - // This seems to match the output from DOSbox. - pal[i * 4 + 2] = ((c_palette[i] & 0x00f) >> 0) * 32; - pal[i * 4 + 1] = ((c_palette[i] & 0x0f0) >> 4) * 32; - pal[i * 4 + 0] = ((c_palette[i] & 0xf00) >> 8) * 32; - pal[i * 4 + 3] = 0; - } - g_system->setPalette(pal, 0, 16); - } - - g_system->copyRectToScreen(screenBuffer, 320, 0, 0, 320, 200); -} - -void drawSpriteRaw(const byte *spritePtr, const byte *maskPtr, int16 width, int16 height, - byte *page, int16 x, int16 y) { +void drawSpriteRaw(const byte *spritePtr, const byte *maskPtr, int16 width, int16 height, byte *page, int16 x, int16 y) { int16 i, j; // FIXME: Is it a bug if maskPtr == NULL? @@ -417,9 +1503,8 @@ void drawSpriteRaw(const byte *spritePtr, const byte *maskPtr, int16 width, int1 byte *destPtr = page + x + y * 320; destPtr += i * 320; - for (j = 0; j < width * 8; j++) { - if (((g_cine->getGameType() == Cine::GType_FW && (!maskPtr || !(*maskPtr))) || (g_cine->getGameType() == Cine::GType_OS)) && (x + j >= 0 - && x + j < 320 && i + y >= 0 && i + y < 200)) { + for (j = 0; j < width; j++) { + if ((!maskPtr || !(*maskPtr)) && x + j >= 0 && x + j < 320 && i + y >= 0 && i + y < 200) { *(destPtr++) = *(spritePtr++); } else { destPtr++; @@ -432,21 +1517,19 @@ void drawSpriteRaw(const byte *spritePtr, const byte *maskPtr, int16 width, int1 } } -void drawSpriteRaw2(const byte *spritePtr, byte transColor, int16 width, int16 height, - byte *page, int16 x, int16 y) { +void drawSpriteRaw2(const byte *spritePtr, byte transColor, int16 width, int16 height, byte *page, int16 x, int16 y) { int16 i, j; for (i = 0; i < height; i++) { byte *destPtr = page + x + y * 320; destPtr += i * 320; - for (j = 0; j < width * 8; j++) { - if ((*(spritePtr) != transColor) && (x + j >= 0 && x + j < 320 && i + y >= 0 && i + y < 200)) { - *(destPtr++) = *(spritePtr++); - } else { - destPtr++; - spritePtr++; + for (j = 0; j < width; j++) { + if ((*spritePtr != transColor) && (x + j >= 0 && x + j < 320 && i + y >= 0 && i + y < 200)) { + *destPtr = *spritePtr; } + destPtr++; + spritePtr++; } } } @@ -499,93 +1582,4 @@ void maskBgOverlay(const byte *bgPtr, const byte *maskPtr, int16 width, int16 he } } -/*! \todo Fix rendering to prevent fadein artifacts - */ -void fadeFromBlack() { - int i, j; - int r, g, b, tr, tg, tb; - if (newColorMode == 2) { - colorMode256 = 1; - memset(palette256, 0, 256*3); - } else if (newColorMode == 1) { - colorMode256 = 0; - memset(c_palette, 0, 16 * sizeof(uint16)); - } - - for (i = 0; i < 8; i++ ) { - gfxFlipRawPage(page1Raw); - g_system->updateScreen(); - g_system->delayMillis(50); - - if (colorMode256) { - for (j = 0; j < 256*3; j++) { - r = palette256[j] + (newPalette[j] + 7) / 8; - palette256[j] = CLIP(r, 0, (int)newPalette[j]); - } - } else { - for (j = 0; j < 16; j++) { - r = c_palette[j] & 0xf; - g = (c_palette[j] & 0xf0) >> 4; - b = (c_palette[j] & 0xf00) >> 8; - - tr = tempPalette[j] & 0xf; - tg = (tempPalette[j] & 0xf0) >> 4; - tb = (tempPalette[j] & 0xf00) >> 8; - - r = CLIP(r + (tr + 7) / 8, 0, tr); - g = CLIP(g + (tg + 7) / 8, 0, tg); - b = CLIP(b + (tb + 7) / 8, 0, tb); - - c_palette[j] = r | (g << 4) | (b << 8); - } - - } - } - - if (colorMode256) { - memcpy(palette256, newPalette, 256*3); - } else { - memcpy(c_palette, tempPalette, sizeof(uint16) * 16); - } -} - -void fadeToBlack() { - for (int i = 0; i < 8; i++) { - if (colorMode256) { - for (int j = 0; j < 256*3; j++) { - palette256[j] = CLIP(palette256[j] - 32, 0, 255); - } - } else { - for (int j = 0; j < 16; j++) { - c_palette[j] = transformColor(c_palette[j], -1, -1, -1); - } - } - gfxFlipRawPage(page1Raw); - g_system->updateScreen(); - g_system->delayMillis(50); - } -} - -void blitRawScreen(byte *frontBuffer) { - gfxFlipRawPage(frontBuffer); -} - -void flip(void) { - blitRawScreen(page1Raw); - if (fadeRequired) { - if (newColorMode == 3) { - newColorMode = ctColorMode + 1; - } - - if (newColorMode == 2) { - colorMode256 = 1; - memcpy(palette256, newPalette, 256*3); - } else { - colorMode256 = 0; - memcpy(c_palette, tempPalette, sizeof(uint16) * 16); - } - fadeRequired = false; - } -} - } // End of namespace Cine diff --git a/engines/cine/gfx.h b/engines/cine/gfx.h index 3812b52113..c63c79ac82 100644 --- a/engines/cine/gfx.h +++ b/engines/cine/gfx.h @@ -26,24 +26,158 @@ #ifndef CINE_GFX_H #define CINE_GFX_H +#include "common/noncopyable.h" +#include "cine/object.h" + namespace Cine { +/*! \brief Background with palette + */ +struct palBg { + byte *bg; ///< Background data + byte *hiPal; ///< 256 color palette + uint16 *lowPal; ///< 16 color palette + char name[15]; ///< Background filename +}; + +/*! \brief Future Wars renderer + * + * Screen backbuffer is not cleared between frames, you can draw menus etc. + * without calling drawFrame() all the time + */ +class FWRenderer : public Common::NonCopyable { +private: + byte *_background; ///< Current background + char _bgName[13]; ///< Background filename + uint16 *_palette; ///< 16 color backup palette + + Common::String _cmd; ///< Player command string + +protected: + static const int _screenSize = 320 * 200; ///< Screen size + static const int _screenWidth = 320; ///< Screen width + static const int _screenHeight = 200; ///< Screen height + static const int _lowPalSize = 16; ///< 16 color palette size + + byte *_backBuffer; ///< Screen backbuffer + uint16 *_activeLowPal; ///< Active 16 color palette + int _changePal; ///< Load active palette to video backend on next frame + + void fillSprite(const objectStruct &obj, uint8 color = 0); + void drawMaskedSprite(const objectStruct &obj, const byte *mask); + virtual void drawSprite(const objectStruct &obj); + + void drawCommand(); + void drawMessage(const char *str, int x, int y, int width, byte color); + void drawPlainBox(int x, int y, int width, int height, byte color); + void drawBorder(int x, int y, int width, int height, byte color); + void drawDoubleBorder(int x, int y, int width, int height, byte color); + virtual int drawChar(char character, int x, int y); + void drawLine(int x, int y, int width, int height, byte color); + void remaskSprite(byte *mask, Common::List::iterator it); + virtual void drawBackground(); + + virtual void renderOverlay(const Common::List::iterator &it); + void drawOverlays(); + +public: + uint16 _messageBg; ///< Message box background color + uint16 _cmdY; ///< Player command string position on screen + + FWRenderer(); + virtual ~FWRenderer(); + + /*! \brief Test if renderer is ready to draw */ + virtual bool ready() { return _background != NULL; } + + virtual void clear(); + + void drawFrame(); + void blit(); + void setCommand(const char *cmd); + + virtual void incrustMask(const objectStruct &obj, uint8 color = 0); + virtual void incrustSprite(const objectStruct &obj); + + virtual void loadBg16(const byte *bg, const char *name); + virtual void loadBg16(const byte *bg, const char *name, unsigned int idx); + virtual void loadCt16(const byte *ct, const char *name); + virtual void loadBg256(const byte *bg, const char *name); + virtual void loadBg256(const byte *bg, const char *name, unsigned int idx); + virtual void loadCt256(const byte *ct, const char *name); + virtual void selectBg(unsigned int idx); + virtual void selectScrollBg(unsigned int idx); + virtual void setScroll(unsigned int shift); + virtual void removeBg(unsigned int idx); + void saveBg(Common::OutSaveFile &fHandle); + + virtual void refreshPalette(); + virtual void reloadPalette(); + void restorePalette(Common::InSaveFile &fHandle); + void savePalette(Common::OutSaveFile &fHandle); + virtual void rotatePalette(int a, int b, int c); + virtual void transformPalette(int first, int last, int r, int g, int b); + + void drawMenu(const CommandeType *items, unsigned int height, int x, int y, int width, int selected); + void drawInputBox(const char *info, const char *input, int cursor, int x, int y, int width); + + virtual void fadeToBlack(); +}; + +/*! \brief Operation Stealth renderer + */ +class OSRenderer : public FWRenderer { +private: + palBg _bgTable[9]; ///< Table of backgrounds loaded into renderer + byte *_activeHiPal; ///< Active 256 color palette + unsigned int _currentBg; ///< Current background + unsigned int _scrollBg; ///< Current scroll background + unsigned int _bgShift; ///< Background shift + +protected: + static const int _hiPalSize = 256 * 3; ///< 256 color palette size + + void drawSprite(const objectStruct &obj); + int drawChar(char character, int x, int y); + void drawBackground(); + void renderOverlay(const Common::List::iterator &it); + +public: + OSRenderer(); + ~OSRenderer(); + + /*! \brief Test if renderer is ready to draw */ + bool ready() { return _bgTable[_currentBg].bg != NULL; } + + void clear(); + + void incrustMask(const objectStruct &obj, uint8 color = 0); + void incrustSprite(const objectStruct &obj); + + void loadBg16(const byte *bg, const char *name); + void loadBg16(const byte *bg, const char *name, unsigned int idx); + void loadCt16(const byte *ct, const char *name); + void loadBg256(const byte *bg, const char *name); + void loadBg256(const byte *bg, const char *name, unsigned int idx); + void loadCt256(const byte *ct, const char *name); + void selectBg(unsigned int idx); + void selectScrollBg(unsigned int idx); + void setScroll(unsigned int shift); + void removeBg(unsigned int idx); + + void refreshPalette(); + void reloadPalette(); + void rotatePalette(int a, int b, int c); + void transformPalette(int first, int last, int r, int g, int b); + + void fadeToBlack(); +}; + void gfxDrawSprite(byte *src4, uint16 sw, uint16 sh, byte *dst4, int16 sx, int16 sy); -extern byte *page1Raw; -extern byte *page2Raw; extern byte *page3Raw; +extern FWRenderer *renderer; -extern uint16 c_palette[256]; -extern byte colorMode256; -extern byte palette256[256 * 3]; -extern byte newPalette[256 * 3]; -extern byte newColorMode; -extern byte ctColorMode; -extern byte bgColorMode; - -void gfxInit(); -void gfxDestroy(); void setMouseCursor(int cursor); void gfxCopyPage(byte *source, byte *dest); diff --git a/engines/cine/main_loop.cpp b/engines/cine/main_loop.cpp index 6042849f59..cfb828cf3c 100644 --- a/engines/cine/main_loop.cpp +++ b/engines/cine/main_loop.cpp @@ -182,14 +182,12 @@ int getKeyData() { void CineEngine::mainLoop(int bootScriptIdx) { bool playerAction; uint16 quitFlag; - uint16 i; byte di; uint16 mouseButton; quitFlag = 0; if (_preLoad == false) { - resetSeqList(); resetBgIncrustList(); setTextWindow(0, 0, 20, 200); @@ -223,17 +221,10 @@ void CineEngine::mainLoop(int bootScriptIdx) { globalVars[VAR_LOW_MEMORY] = 0; // set to 1 to disable some animations, sounds etc. } - for (i = 0; i < 16; i++) { - c_palette[i] = 0; - } - - _paletteNeedUpdate = true; - strcpy(newPrcName, ""); strcpy(newRelName, ""); strcpy(newObjectName, ""); strcpy(newMsgName, ""); - strcpy(currentBgName[0], ""); strcpy(currentCtName, ""); strcpy(currentPartName, ""); @@ -257,8 +248,9 @@ void CineEngine::mainLoop(int bootScriptIdx) { setMouseCursor(MOUSE_CURSOR_CROSS); } - drawOverlays(); - flip(); + if (renderer->ready()) { + renderer->drawFrame(); + } if (waitForPlayerClick) { playerAction = false; @@ -289,6 +281,8 @@ void CineEngine::mainLoop(int bootScriptIdx) { } while (mouseButton != 0); waitForPlayerClick = 0; + + removeMessages(); } if (checkForPendingDataLoadSwitch) { diff --git a/engines/cine/object.cpp b/engines/cine/object.cpp index 36f7b17a69..89d6b99592 100644 --- a/engines/cine/object.cpp +++ b/engines/cine/object.cpp @@ -236,6 +236,10 @@ uint16 compareObjectParam(byte objIdx, byte type, int16 value) { return compareResult; } +/*! \bug In Operation Stealth, if you try to go downstairs to the sea in the + * location between bank and hotel, getObjectParam is called with paramIdx 16 + * and crashes + */ int16 getObjectParam(uint16 objIdx, uint16 paramIdx) { assert(objIdx <= NUM_MAX_OBJECT); diff --git a/engines/cine/pal.cpp b/engines/cine/pal.cpp index 9341563898..3e6f5adf40 100644 --- a/engines/cine/pal.cpp +++ b/engines/cine/pal.cpp @@ -28,8 +28,6 @@ namespace Cine { -uint16 tempPalette[256]; - uint16 palEntriesCount; PalEntry *palPtr = NULL; @@ -113,4 +111,64 @@ void loadRelatedPalette(const char *fileName) { } } +void palRotate(uint16 *pal, byte a, byte b, byte c) { + assert(pal); + + if (c == 1) { + uint16 currentColor = pal[b]; + + for (int i = b; i > a; i--) { + pal[i] = pal[i - 1]; + } + + pal[a] = currentColor; + } +} + +void palRotate(byte *pal, byte a, byte b, byte c) { + assert(pal); + + if (c == 1) { + byte currentR = pal[3 * b + 0]; + byte currentG = pal[3 * b + 1]; + byte currentB = pal[3 * b + 2]; + + for (int i = b; i > a; i--) { + pal[3 * i + 0] = pal[3 * (i - 1) + 0]; + pal[3 * i + 1] = pal[3 * (i - 1) + 1]; + pal[3 * i + 2] = pal[3 * (i - 1) + 2]; + } + + pal[3 * a + 0] = currentR; + pal[3 * a + 1] = currentG; + pal[3 * a + 2] = currentB; + } +} + +uint16 transformColor(uint16 baseColor, int r, int g, int b) { + int8 oriR = CLIP( (baseColor & 0x007) + b, 0, 7); + int8 oriG = CLIP(((baseColor & 0x070) >> 4) + g, 0, 7); + int8 oriB = CLIP(((baseColor & 0x700) >> 8) + r, 0, 7); + + return oriR | (oriG << 4) | (oriB << 8); +} + +void transformPaletteRange(uint16 *dstPal, uint16 *srcPal, int startColor, int stopColor, int r, int g, int b) { + assert(srcPal && dstPal); + + for (int i = startColor; i <= stopColor; i++) { + dstPal[i] = transformColor(srcPal[i], r, g, b); + } +} + +void transformPaletteRange(byte *dstPal, byte *srcPal, int startColor, int stopColor, int r, int g, int b) { + assert(srcPal && dstPal); + + for (int i = startColor; i <= stopColor; i++) { + dstPal[3 * i + 0] = CLIP(srcPal[3 * i + 0] + r * 32, 0, 255); + dstPal[3 * i + 1] = CLIP(srcPal[3 * i + 1] + g * 32, 0, 255); + dstPal[3 * i + 2] = CLIP(srcPal[3 * i + 2] + b * 32, 0, 255); + } +} + } // End of namespace Cine diff --git a/engines/cine/pal.h b/engines/cine/pal.h index da822fa1a1..70fcc0d98a 100644 --- a/engines/cine/pal.h +++ b/engines/cine/pal.h @@ -36,10 +36,14 @@ struct PalEntry { void loadPal(const char *fileName); -extern uint16 tempPalette[256]; - void loadRelatedPalette(const char *fileName); +void palRotate(uint16 *pal, byte a, byte b, byte c); +void palRotate(byte *pal, byte a, byte b, byte c); +uint16 transformColor(uint16 baseColor, int r, int g, int b); +void transformPaletteRange(uint16 *srcPal, uint16 *dstPal, int startColor, int stopColor, int r, int g, int b); +void transformPaletteRange(byte *srcPal, byte *dstPal, int startColor, int stopColor, int r, int g, int b); + } // End of namespace Cine #endif diff --git a/engines/cine/prc.cpp b/engines/cine/prc.cpp index 0f068a197e..402c97b1a6 100644 --- a/engines/cine/prc.cpp +++ b/engines/cine/prc.cpp @@ -98,10 +98,10 @@ void loadPrc(const char *pPrcName) { char buffer[256]; for (s = 0; s < numScripts; s++) { - if (scriptTable[s].size) { + if (scriptTable[s]->_size) { sprintf(buffer, "%s_%03d.txt", pPrcName, s); - decompileScript(scriptTable[s].ptr, scriptTable[s].stack, scriptTable[s].size, s); + decompileScript((const byte *)scriptTable[s]->getString(0), scriptTable[s]->_size, s); dumpScript(buffer); } } diff --git a/engines/cine/rel.cpp b/engines/cine/rel.cpp index f550efed27..dd2d0f68b6 100644 --- a/engines/cine/rel.cpp +++ b/engines/cine/rel.cpp @@ -81,10 +81,10 @@ void loadRel(char *pRelName) { char buffer[256]; for (s = 0; s < numEntry; s++) { - if (relTable[s].size) { + if (relTable[s]->_size) { sprintf(buffer, "%s_%03d.txt", pRelName, s); - decompileScript(relTable[s].data, NULL, relTable[s].size, s); + decompileScript((const byte *)relTable[s]->getString(0), relTable[s]->_size, s); dumpScript(buffer); } } diff --git a/engines/cine/script.h b/engines/cine/script.h index 4a2e7072ee..23bb179ee5 100644 --- a/engines/cine/script.h +++ b/engines/cine/script.h @@ -230,6 +230,7 @@ protected: int o1_unloadMask5(); // pointers to member functions in C++ suck... + int o2_loadCt(); int o2_loadPart(); int o2_addSeqListElement(); int o2_removeSeq(); @@ -362,7 +363,7 @@ extern ScriptVars globalVars; void setupOpcodes(); -void decompileScript(byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint16 scriptIdx); +void decompileScript(const byte *scriptPtr, uint16 scriptSize, uint16 scriptIdx); void dumpScript(char *dumpName); #define OP_loadPart 0x3F diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp index f833d7c30b..4f6749517e 100644 --- a/engines/cine/script_fw.cpp +++ b/engines/cine/script_fw.cpp @@ -41,11 +41,6 @@ namespace Cine { ScriptVars globalVars(NUM_MAX_VAR); uint16 compareVars(int16 a, int16 b); -void palRotate(byte a, byte b, byte c); -void removeSeq(uint16 param1, uint16 param2, uint16 param3); -uint16 isSeqRunning(uint16 param1, uint16 param2, uint16 param3); -void addGfxElementA0(int16 param1, int16 param2); -void removeGfxElementA0(int16 idx, int16 param); const Opcode FWScript::_opcodeTable[] = { /* 00 */ @@ -1299,7 +1294,7 @@ int FWScript::o1_loadCt() { const char *param = getNextString(); debugC(5, kCineDebugScript, "Line: %d: loadCt(\"%s\")", _line, param); - loadCt(param); + loadCtFW(param); return 0; } @@ -1355,31 +1350,29 @@ int FWScript::o1_blitAndFade() { debugC(5, kCineDebugScript, "Line: %d: request fadein", _line); // TODO: use real code - drawOverlays(); - fadeRequired = true; - flip(); - // fadeFromBlack(); + + renderer->reloadPalette(); return 0; } int FWScript::o1_fadeToBlack() { debugC(5, kCineDebugScript, "Line: %d: request fadeout", _line); - fadeToBlack(); + renderer->fadeToBlack(); return 0; } int FWScript::o1_transformPaletteRange() { byte startColor = getNextByte(); byte numColor = getNextByte(); - uint16 r = getNextWord(); - uint16 g = getNextWord(); - uint16 b = getNextWord(); + int16 r = getNextWord(); + int16 g = getNextWord(); + int16 b = getNextWord(); debugC(5, kCineDebugScript, "Line: %d: transformPaletteRange(from:%d,numIdx:%d,r:%d,g:%d,b:%d)", _line, startColor, numColor, r, g, b); - transformPaletteRange(startColor, numColor, r, g, b); + renderer->transformPalette(startColor, numColor, r, g, b); return 0; } @@ -1387,7 +1380,8 @@ int FWScript::o1_setDefaultMenuColor2() { byte param = getNextByte(); debugC(5, kCineDebugScript, "Line: %d: setDefaultMenuColor2(%d)", _line, param); - defaultMenuBoxColor2 = param; + + renderer->_messageBg = param; return 0; } @@ -1397,7 +1391,8 @@ int FWScript::o1_palRotate() { byte c = getNextByte(); debugC(5, kCineDebugScript, "Line: %d: palRotate(%d,%d,%d)", _line, a, b, c); - palRotate(a, b, c); + + renderer->rotatePalette(a, b, c); return 0; } @@ -1475,11 +1470,7 @@ int FWScript::o1_compareGlobalVar() { debugC(5, kCineDebugScript, "Line: %d: compare globalVars[%d] and %d", _line, varIdx, value); - if (varIdx == 255 && (g_cine->getGameType() == Cine::GType_FW)) { // TODO: fix - _compare = 1; - } else { - _compare = compareVars(_globalVars[varIdx], value); - } + _compare = compareVars(_globalVars[varIdx], value); } return 0; @@ -1558,7 +1549,8 @@ int FWScript::o1_setDefaultMenuColor() { byte param = getNextByte(); debugC(5, kCineDebugScript, "Line: %d: setDefaultMenuColor(%d)", _line, param); - defaultMenuBoxColor = param; + + renderer->_cmdY = param; return 0; } @@ -1728,18 +1720,6 @@ int FWScript::o1_unloadMask5() { //----------------------------------------------------------------------- -void palRotate(byte a, byte b, byte c) { - if (c == 1) { - uint16 currentColor = c_palette[b]; - - for (int16 i = b; i > a; i--) { - c_palette[i] = c_palette[i - 1]; - } - - c_palette[a] = currentColor; - } -} - void addScriptToList0(uint16 idx) { ScriptPtr tmp(scriptInfo->create(*scriptTable[idx], idx)); assert(tmp); @@ -1863,14 +1843,13 @@ const char *getObjPramName(byte paramIdx) { } } -void decompileScript(byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint16 scriptIdx) { +void decompileScript(const byte *scriptPtr, uint16 scriptSize, uint16 scriptIdx) { char lineBuffer[256]; - byte *localScriptPtr = scriptPtr; + const byte *localScriptPtr = scriptPtr; uint16 exitScript; uint32 position = 0; assert(scriptPtr); - // assert(stackPtr); exitScript = 0; @@ -2292,7 +2271,7 @@ void decompileScript(byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint16 sprintf(lineBuffer, "loadPart(%s)\n", localScriptPtr + position); } - position += strlen((char *)localScriptPtr + position) + 1; + position += strlen((const char *)localScriptPtr + position) + 1; break; } case 0x40: @@ -2309,7 +2288,7 @@ void decompileScript(byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint16 sprintf(lineBuffer, "loadPrc(%d,%s)\n", param, localScriptPtr + position); - position += strlen((char *)localScriptPtr + position) + 1; + position += strlen((const char *)localScriptPtr + position) + 1; break; } case OP_requestCheckPendingDataLoad: // nop @@ -2461,7 +2440,7 @@ void decompileScript(byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint16 { sprintf(lineBuffer, "comment: %s\n", localScriptPtr + position); - position += strlen((char *)localScriptPtr + position); + position += strlen((const char *)localScriptPtr + position); break; } case 0x5A: @@ -2540,7 +2519,7 @@ void decompileScript(byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint16 { sprintf(lineBuffer, "loadDat(%s)\n", localScriptPtr + position); - position += strlen((char *)localScriptPtr + position) + 1; + position += strlen((const char *)localScriptPtr + position) + 1; break; } case 0x6E: // nop @@ -2801,7 +2780,7 @@ void decompileScript(byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint16 sprintf(lineBuffer, "ADDBG(%d,%s)\n", param1, localScriptPtr + position); - position += strlen((char *)localScriptPtr + position); + position += strlen((const char *)localScriptPtr + position); break; } @@ -2825,7 +2804,7 @@ void decompileScript(byte *scriptPtr, int16 *stackPtr, uint16 scriptSize, uint16 sprintf(lineBuffer, "loadABS(%d,%s)\n", param1, localScriptPtr + position); - position += strlen((char *)localScriptPtr + position); + position += strlen((const char *)localScriptPtr + position); break; } diff --git a/engines/cine/script_os.cpp b/engines/cine/script_os.cpp index 1f5ea2b838..36eda007c6 100644 --- a/engines/cine/script_os.cpp +++ b/engines/cine/script_os.cpp @@ -116,7 +116,7 @@ const Opcode OSScript::_opcodeTable[] = { { &FWScript::o1_loadAnim, "s" }, /* 3C */ { &FWScript::o1_loadBg, "s" }, - { &FWScript::o1_loadCt, "s" }, + { &FWScript::o2_loadCt, "s" }, { 0, 0 }, { &FWScript::o2_loadPart, "s" }, /* 40 */ @@ -365,6 +365,14 @@ FWScript *OSScriptInfo::create(const RawObjectScript &script, int16 index, const // OPERATION STEALTH opcodes // ------------------------------------------------------------------------ +int FWScript::o2_loadCt() { + const char *param = getNextString(); + + debugC(5, kCineDebugScript, "Line: %d: loadCt(\"%s\")", _line, param); + loadCtOS(param); + return 0; +} + int FWScript::o2_loadPart() { const char *param = getNextString(); @@ -615,20 +623,7 @@ int FWScript::o2_removeBackground() { debugC(5, kCineDebugScript, "Line: %d: removeBackground(%d)", _line, param); - if (additionalBgTable[param]) { - free(additionalBgTable[param]); - additionalBgTable[param] = NULL; - } - - if (currentAdditionalBgIdx == param) { - currentAdditionalBgIdx = 0; - } - - if (currentAdditionalBgIdx2 == param) { - currentAdditionalBgIdx2 = 0; - } - - strcpy(currentBgName[param], ""); + renderer->removeBg(param); return 0; } @@ -644,22 +639,11 @@ int FWScript::o2_loadAbs() { int FWScript::o2_loadBg() { byte param = getNextByte(); - assert(param <= 8); + assert(param < 9); debugC(5, kCineDebugScript, "Line: %d: useBg(%d)", _line, param); - if (additionalBgTable[param]) { - currentAdditionalBgIdx = param; - if (param == 8) { - newColorMode = 3; - } else { - newColorMode = bgColorMode + 1; - } - //if (_screenNeedFadeOut == 0) { - // adBgVar1 = 1; - //} - fadeRequired = true; - } + renderer->selectBg(param); return 0; } @@ -699,13 +683,11 @@ int FWScript::o2_op9C() { int FWScript::o2_useBgScroll() { byte param = getNextByte(); - assert(param <= 8); + assert(param < 9); debugC(5, kCineDebugScript, "Line: %d: useBgScroll(%d)", _line, param); - if (additionalBgTable[param]) { - currentAdditionalBgIdx2 = param; - } + renderer->selectScrollBg(param); return 0; } @@ -716,12 +698,12 @@ int FWScript::o2_setAdditionalBgVScroll() { byte param2 = getNextByte(); debugC(5, kCineDebugScript, "Line: %d: additionalBgVScroll = var[%d]", _line, param2); - additionalBgVScroll = _localVars[param2]; + renderer->setScroll(_localVars[param2]); } else { uint16 param2 = getNextWord(); debugC(5, kCineDebugScript, "Line: %d: additionalBgVScroll = %d", _line, param2); - additionalBgVScroll = param2; + renderer->setScroll(param2); } return 0; } diff --git a/engines/cine/texte.cpp b/engines/cine/texte.cpp index e41626cad1..91a209074d 100644 --- a/engines/cine/texte.cpp +++ b/engines/cine/texte.cpp @@ -611,65 +611,49 @@ void freePoldatDat() { fontParamTable = 0; } -uint16 computeMessageLength(const byte *ptr, uint16 width, uint16 *numWords, uint16 *messageWidth, uint16 *lineResult) { - const byte *localPtr = ptr; - - uint16 var_2 = 0; - uint16 localLineResult = 0; - uint16 var_6 = 0; - uint16 var_8 = 0; - uint16 localMessageWidth = 0; - uint16 var_16 = 0; - uint16 finished = 0; - uint16 si = 0; - uint16 di = 0; - - while (!finished) { - byte character = *(localPtr++); - - if (character == ' ') { - var_8 = var_16; - var_6 = localMessageWidth; - localLineResult = si; - var_2 = di; - - if (si + 5 < width) { - var_16++; - si += 5; - } else { - finished = 1; - } - } else if (character == 0x7C || character == 0) { - finished = 1; - si = 0; +/*! \brief Fit a substring of text into one line of fixed width text box + * \param str Text to fit + * \param maxWidth Text box width + * \param[out] words Number of words that fit + * \param[out] width Total width of nonblank characters that fit + * \return Length of substring which fits + */ +int fitLine(const char *str, int maxWidth, int &words, int &width) { + int i, bkpWords = 0, bkpWidth = 0, bkpLen = 0; + int charWidth = 0, fullWidth = 0; + + words = 0; + width = 0; + + for (i = 0; str[i]; i++) { + if (str[i] == 0x7C) { + i++; + break; + } else if (str[i] == ' ') { + charWidth = 5; + bkpWords = words++; + bkpWidth = width; + bkpLen = i + 1; } else { - if (fontParamTable[character].characterWidth) { - uint16 var_C = fontParamTable[character].characterWidth + 1; - - if (si + var_C < width) { - si += var_C; - localMessageWidth += var_C; - } else { - finished = 1; - - if (localLineResult) { - var_16 = var_8; - localMessageWidth = var_6; - si = localLineResult; - di = var_2; - } - } - } + charWidth = fontParamTable[str[i]].characterWidth + 1; + width += charWidth; } - di++; - } + if (!charWidth) { + continue; + } - *numWords = var_16; - *messageWidth = localMessageWidth; - *lineResult = si; + if (fullWidth + charWidth < maxWidth) { + fullWidth += charWidth; + } else if (fullWidth) { + words = bkpWords; + width = bkpWidth; + i = bkpLen; + break; + } + } - return di; + return i; } } // End of namespace Cine diff --git a/engines/cine/texte.h b/engines/cine/texte.h index b5eaef9211..ae82832aea 100644 --- a/engines/cine/texte.h +++ b/engines/cine/texte.h @@ -56,7 +56,7 @@ void freeErrmessDat(void); void loadPoldatDat(const char *fname); void freePoldatDat(void); -uint16 computeMessageLength(const byte *ptr, uint16 width, uint16 *numWords, uint16 *messageWidth, uint16 *lineResult); +int fitLine(const char *ptr, int maxWidth, int &words, int &width); } // End of namespace Cine diff --git a/engines/cine/various.cpp b/engines/cine/various.cpp index a6bd9964c0..9b98ddb253 100644 --- a/engines/cine/various.cpp +++ b/engines/cine/various.cpp @@ -87,7 +87,6 @@ char newPrcName[20]; char newRelName[20]; char newObjectName[20]; char newMsgName[20]; -char currentBgName[8][15]; char currentCtName[15]; char currentPartName[15]; char currentDatName[30]; @@ -96,8 +95,6 @@ int16 saveVar2; byte isInPause = 0; -uint16 defaultMenuBoxColor; - byte inputVar1 = 0; uint16 inputVar2 = 0, inputVar3 = 0; @@ -114,7 +111,6 @@ CommandeType objectListCommand[20]; int16 objListTab[20]; uint16 exitEngine; -uint16 defaultMenuBoxColor2; uint16 zoneData[NUM_MAX_ZONE]; @@ -140,6 +136,7 @@ void addPlayerCommandMessage(int16 cmd) { tmp.type = 3; overlayList.push_back(tmp); + waitForPlayerClick = 1; } int16 getRelEntryForObject(uint16 param1, uint16 param2, SelectedObjStruct *pSelectedObject) { @@ -393,11 +390,14 @@ bool brokenSave(Common::InSaveFile &fHandle) { return broken; } +/*! \todo Implement Operation Stealth loading, this is obviously Future Wars only + */ bool CineEngine::makeLoad(char *saveName) { int16 i; int16 size; bool broken; Common::InSaveFile *fHandle; + char bgName[13]; fHandle = g_saveFileMan->openForLoading(saveName); @@ -440,7 +440,6 @@ bool CineEngine::makeLoad(char *saveName) { strcpy(newRelName, ""); strcpy(newObjectName, ""); strcpy(newMsgName, ""); - strcpy(currentBgName[0], ""); strcpy(currentCtName, ""); allowPlayerInput = 0; @@ -455,9 +454,7 @@ bool CineEngine::makeLoad(char *saveName) { fadeRequired = false; - for (i = 0; i < 16; i++) { - c_palette[i] = 0; - } + renderer->clear(); checkForPendingDataLoadSwitch = 0; @@ -473,7 +470,7 @@ bool CineEngine::makeLoad(char *saveName) { fHandle->read(currentPrcName, 13); fHandle->read(currentRelName, 13); fHandle->read(currentMsgName, 13); - fHandle->read(currentBgName[0], 13); + fHandle->read(bgName, 13); fHandle->read(currentCtName, 13); checkDataDisk(currentDisk); @@ -490,12 +487,12 @@ bool CineEngine::makeLoad(char *saveName) { loadRel(currentRelName); } - if (strlen(currentBgName[0])) { - loadBg(currentBgName[0]); + if (strlen(bgName)) { + loadBg(bgName); } if (strlen(currentCtName)) { - loadCt(currentCtName); + loadCtFW(currentCtName); } fHandle->readUint16BE(); @@ -511,13 +508,7 @@ bool CineEngine::makeLoad(char *saveName) { objectTable[i].part = fHandle->readUint16BE(); } - for (i = 0; i < 16; i++) { - c_palette[i] = fHandle->readUint16BE(); - } - - for (i = 0; i < 16; i++) { - tempPalette[i] = fHandle->readUint16BE(); - } + renderer->restorePalette(*fHandle); globalVars.load(*fHandle, NUM_MAX_VAR - 1); @@ -530,8 +521,10 @@ bool CineEngine::makeLoad(char *saveName) { } fHandle->read(commandBuffer, 0x50); + renderer->setCommand(commandBuffer); + + renderer->_cmdY = fHandle->readUint16BE(); - defaultMenuBoxColor = fHandle->readUint16BE(); bgVar0 = fHandle->readUint16BE(); allowPlayerInput = fHandle->readUint16BE(); playerCommand = fHandle->readSint16BE(); @@ -542,7 +535,8 @@ bool CineEngine::makeLoad(char *saveName) { var3 = fHandle->readUint16BE(); var2 = fHandle->readUint16BE(); commandVar2 = fHandle->readSint16BE(); - defaultMenuBoxColor2 = fHandle->readUint16BE(); + + renderer->_messageBg = fHandle->readUint16BE(); fHandle->readUint16BE(); fHandle->readUint16BE(); @@ -615,7 +609,7 @@ void makeSave(char *saveFileName) { fHandle->write(currentPrcName, 13); fHandle->write(currentRelName, 13); fHandle->write(currentMsgName, 13); - fHandle->write(currentBgName[0], 13); + renderer->saveBg(*fHandle); fHandle->write(currentCtName, 13); fHandle->writeUint16BE(0xFF); @@ -631,13 +625,7 @@ void makeSave(char *saveFileName) { fHandle->writeUint16BE(objectTable[i].part); } - for (i = 0; i < 16; i++) { - fHandle->writeUint16BE(c_palette[i]); - } - - for (i = 0; i < 16; i++) { - fHandle->writeUint16BE(tempPalette[i]); - } + renderer->savePalette(*fHandle); globalVars.save(*fHandle, NUM_MAX_VAR - 1); @@ -651,7 +639,8 @@ void makeSave(char *saveFileName) { fHandle->write(commandBuffer, 0x50); - fHandle->writeUint16BE(defaultMenuBoxColor); + fHandle->writeUint16BE(renderer->_cmdY); + fHandle->writeUint16BE(bgVar0); fHandle->writeUint16BE(allowPlayerInput); fHandle->writeUint16BE(playerCommand); @@ -662,7 +651,8 @@ void makeSave(char *saveFileName) { fHandle->writeUint16BE(var3); fHandle->writeUint16BE(var2); fHandle->writeUint16BE(commandVar2); - fHandle->writeUint16BE(defaultMenuBoxColor2); + + fHandle->writeUint16BE(renderer->_messageBg); fHandle->writeUint16BE(0xFF); fHandle->writeUint16BE(0x1E); @@ -864,26 +854,6 @@ void CineEngine::makeSystemMenu(void) { } } -int drawChar(byte character, int16 x, int16 y) { - if (character == ' ') { - x += 5; - } else { - byte characterWidth = fontParamTable[character].characterWidth; - - if (characterWidth) { - byte characterIdx = fontParamTable[character].characterIdx; - if (g_cine->getGameType() == Cine::GType_OS) { - drawSpriteRaw2(textTable[characterIdx][0], 0, 2, 8, page1Raw, x, y); - } else { - drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page1Raw, x, y); - } - x += characterWidth + 1; - } - } - - return x; -} - void drawMessageBox(int16 x, int16 y, int16 width, int16 currentY, int16 offset, int16 color, byte* page) { gfxDrawLine(x + offset, y + offset, x + width - offset, y + offset, color, page); // top gfxDrawLine(x + offset, currentY + 4 - offset, x + width - offset, currentY + 4 - offset, color, page); // bottom @@ -896,49 +866,6 @@ void drawDoubleMessageBox(int16 x, int16 y, int16 width, int16 currentY, int16 c drawMessageBox(x, y, width, currentY, 0, color, page); } -void makeTextEntry(const CommandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width) { - byte color = 2; - byte color2 = defaultMenuBoxColor2; - int16 paramY = (height * 9) + 10; - int16 currentX, currentY; - int16 i; - uint16 j; - byte currentChar; - - if (X + width > 319) { - X = 319 - width; - } - - if (Y + paramY > 199) { - Y = 199 - paramY; - } - - hideMouse(); - blitRawScreen(page1Raw); - - gfxDrawPlainBoxRaw(X, Y, X + width, Y + 4, color2, page1Raw); - - currentX = X + 4; - currentY = Y + 4; - - for (i = 0; i < height; i++) { - gfxDrawPlainBoxRaw(X, currentY, X + width, currentY + 9, color2, page1Raw); - currentX = X + 4; - - for (j = 0; j < strlen(commandList[i]); j++) { - currentChar = commandList[i][j]; - currentX = drawChar(currentChar, currentX, currentY); - } - - currentY += 9; - } - - gfxDrawPlainBoxRaw(X, currentY, X + width, currentY + 4, color2, page1Raw); // bottom part - drawDoubleMessageBox(X, Y, width, currentY, color, page1Raw); - - blitRawScreen(page1Raw); -} - void processInventory(int16 x, int16 y) { int16 listSize = buildObjectListCommand(-2); uint16 button; @@ -946,7 +873,8 @@ void processInventory(int16 x, int16 y) { if (!listSize) return; - makeTextEntry(objectListCommand, listSize, x, y, 140); + renderer->drawMenu(objectListCommand, listSize, x, y, 140, -1); + renderer->blit(); do { manageEvents(); @@ -1085,7 +1013,7 @@ void makeCommandLine(void) { } if (!disableSystemMenu) { - isDrawCommandEnabled = 1; + renderer->setCommand(commandBuffer); } } @@ -1094,13 +1022,8 @@ uint16 needMouseSave = 0; uint16 menuVar4 = 0; uint16 menuVar5 = 0; -int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, uint16 Y, - uint16 width, bool recheckValue) { - byte color = 2; - byte color2 = defaultMenuBoxColor2; +int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, uint16 Y, uint16 width, bool recheckValue) { int16 paramY; - int16 currentX, currentY; - int16 i; uint16 button; int16 var_A; int16 di; @@ -1110,7 +1033,6 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, int16 var_14; int16 currentSelection, oldSelection; int16 var_4; - byte currentChar; if (disableSystemMenu) return -1; @@ -1125,30 +1047,8 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, Y = 199 - paramY; } - hideMouse(); - blitRawScreen(page1Raw); - - gfxDrawPlainBoxRaw(X, Y, X + width, Y + 4, color2, page1Raw); - - currentX = X + 4; - currentY = Y + 4; - - for (i = 0; i < height; i++) { - gfxDrawPlainBoxRaw(X, currentY, X + width, currentY + 9, color2, page1Raw); - currentX = X + 4; - - for (j = 0; j < strlen(commandList[i]); j++) { - currentChar = commandList[i][j]; - currentX = drawChar(currentChar, currentX, currentY); - } - - currentY += 9; - } - - gfxDrawPlainBoxRaw(X, currentY, X + width, currentY + 4, color2, page1Raw); // bottom part - drawDoubleMessageBox(X, Y, width, currentY, color, page1Raw); - - blitRawScreen(page1Raw); + renderer->drawMenu(commandList, height, X, Y, width, -1); + renderer->blit(); do { manageEvents(); @@ -1160,15 +1060,9 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, currentSelection = 0; di = currentSelection * 9 + Y + 4; - gfxDrawPlainBoxRaw(X + 2, di - 1, X + width - 2, di + 7, 0, page1Raw); // draw black box behind selection - currentX = X + 4; - - for (j = 0; j < strlen(commandList[currentSelection]); j++) { - currentChar = commandList[currentSelection][j]; - currentX = drawChar(currentChar, currentX, di); - } - blitRawScreen(page1Raw); + renderer->drawMenu(commandList, height, X, Y, width, currentSelection); + renderer->blit(); manageEvents(); getMouseData(mouseUpdateStatus, &button, (uint16 *)&mouseX, (uint16 *)&mouseY); @@ -1219,29 +1113,10 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, hideMouse(); } - di = oldSelection * 9 + Y + 4; - - gfxDrawPlainBoxRaw(X + 2, di - 1, X + width - 2, di + 7, color2, page1Raw); // restore color - - currentX = X + 4; - - for (j = 0; j < strlen(commandList[oldSelection]); j++) { - currentChar = commandList[oldSelection][j]; - currentX = drawChar(currentChar, currentX, di); - } - di = currentSelection * 9 + Y + 4; - gfxDrawPlainBoxRaw(X + 2, di - 1, X + width - 2, di + 7, 0, page1Raw); // black new - - currentX = X + 4; - - for (j = 0; j < strlen(commandList[currentSelection]); j++) { - currentChar = commandList[currentSelection][j]; - currentX = drawChar(currentChar, currentX, di); - } - - blitRawScreen(page1Raw); + renderer->drawMenu(commandList, height, X, Y, width, currentSelection); + renderer->blit(); // if (needMouseSave) { // gfxRedrawMouseCursor(); @@ -1271,38 +1146,6 @@ int16 makeMenuChoice(const CommandeType commandList[], uint16 height, uint16 X, return currentSelection; } -void drawMenuBox(char *command, int16 x, int16 y) { - byte j; - byte lColor = 2; - - hideMouse(); - - gfxDrawPlainBoxRaw(x, y, x + 300, y + 10, 0, page2Raw); - - drawMessageBox(x, y, 300, y + 6, -1, lColor, page2Raw); - - x += 2; - y += 2; - - for (j = 0; j < strlen(command); j++) { - byte currentChar = command[j]; - - if (currentChar == ' ') { - x += 5; - } else { - byte characterWidth = fontParamTable[currentChar].characterWidth; - - if (characterWidth) { - byte characterIdx = fontParamTable[currentChar].characterIdx; - drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page2Raw, x, y); - x += characterWidth + 1; - } - } - } - -// gfxRedrawMouseCursor(); -} - void makeActionMenu(void) { uint16 mouseButton; uint16 mouseX; @@ -1342,11 +1185,6 @@ uint16 executePlayerInput(void) { } if (allowPlayerInput) { - if (isDrawCommandEnabled) { - drawMenuBox(commandBuffer, 10, defaultMenuBoxColor); - isDrawCommandEnabled = 0; - } - getMouseData(mouseUpdateStatus, &mouseButton, &mouseX, &mouseY); while (mouseButton && currentEntry < 200) { @@ -1393,7 +1231,6 @@ uint16 executePlayerInput(void) { if (choiceResultTable[playerCommand] == commandVar1) { int16 relEntry; - drawMenuBox(commandBuffer, 10, defaultMenuBoxColor); SelectedObjStruct obj; obj.idx = commandVar3[0]; obj.param = commandVar3[1]; @@ -1410,41 +1247,40 @@ uint16 executePlayerInput(void) { commandVar1 = 0; strcpy(commandBuffer, ""); + renderer->setCommand(""); } } else { globalVars[VAR_MOUSE_X_POS] = mouseX; globalVars[VAR_MOUSE_Y_POS] = mouseY; } } - } else { - if (mouseButton & 2) { - if (mouseButton & 1) { - g_cine->makeSystemMenu(); - } + } else if (mouseButton & 2) { + if (mouseButton & 1) { + g_cine->makeSystemMenu(); + } - makeActionMenu(); - makeCommandLine(); - } else { - int16 objIdx; + makeActionMenu(); + makeCommandLine(); + } else { + int16 objIdx; - objIdx = getObjectUnderCursor(mouseX, mouseY); + objIdx = getObjectUnderCursor(mouseX, mouseY); - if (commandVar2 != objIdx) { - if (objIdx != -1) { - char command[256]; + if (commandVar2 != objIdx) { + if (objIdx != -1) { + char command[256]; - strcpy(command, commandBuffer); - strcat(command, " "); - strcat(command, objectTable[objIdx].name); + strcpy(command, commandBuffer); + strcat(command, " "); + strcat(command, objectTable[objIdx].name); - drawMenuBox(command, 10, defaultMenuBoxColor); - } else { - isDrawCommandEnabled = 1; - } + renderer->setCommand(command); + } else { + isDrawCommandEnabled = 1; } - - commandVar2 = objIdx; } + + commandVar2 = objIdx; } } else { if (mouseButton & 2) { @@ -1653,257 +1489,9 @@ void drawSprite(Common::List::iterator it, const byte *spritePtr, const free(msk); } -int16 additionalBgVScroll = 0; - -void backupOverlayPage(void) { - byte *scrollBg; - byte *bgPage = additionalBgTable[currentAdditionalBgIdx]; - - if (bgPage) { - if (!additionalBgVScroll) { - memcpy(page1Raw, bgPage, 320 * 200); - } else { - scrollBg = additionalBgTable[currentAdditionalBgIdx2]; - - for (int16 i = additionalBgVScroll; i < 200 + additionalBgVScroll; i++) { - if (i > 200) { - memcpy(page1Raw + (i - additionalBgVScroll) * 320, scrollBg + (i - 200) * 320, 320); - } else { - memcpy(page1Raw + (i - additionalBgVScroll) * 320, bgPage + (i-1) * 320, 320); - } - } - } - } -} - -void drawMessage(const char *messagePtr, int16 x, int16 y, int16 width, int16 color) { - byte color2 = 2; - byte endOfMessageReached = 0; - int16 localX, localY, localWidth; - uint16 messageLength = 0, numWords = 0, messageWidth = 0; - uint16 lineResult, fullLineWidth; - uint16 interWordSize, interWordSizeRemain; - const char *endOfMessagePtr; - byte currentChar; //, characterWidth; - - gfxDrawPlainBoxRaw(x, y, x + width, y + 4, color, page1Raw); - - localX = x + 4; - localY = y + 4; - localWidth = width - 8; - - do { - messageLength = 0; - - while (messagePtr[messageLength] == ' ') { - messageLength++; - } - - messagePtr += messageLength; - - messageLength = computeMessageLength((const byte *)messagePtr, localWidth, &numWords, &messageWidth, &lineResult); - - endOfMessagePtr = messagePtr + messageLength; - - if (lineResult) { - fullLineWidth = localWidth - messageWidth; - - if (numWords) { - interWordSize = fullLineWidth / numWords; - interWordSizeRemain = fullLineWidth % numWords; - } else { - interWordSize = 5; - interWordSizeRemain = 0; - } - } else { - interWordSize = 5; - interWordSizeRemain = 0; - } - - gfxDrawPlainBoxRaw(x, localY, x + width, localY + 9, color, page1Raw); - - do { - currentChar = *(messagePtr++); - - if (currentChar == 0) { - endOfMessageReached = 1; - } else if (currentChar == ' ') { - localX += interWordSizeRemain + interWordSize; - - if (interWordSizeRemain) - interWordSizeRemain = 0; - } else { - localX = drawChar(currentChar, localX, localY); - } - } while ((messagePtr < endOfMessagePtr) && !endOfMessageReached); - - localX = x + 4; - localY += 9; - } while (!endOfMessageReached); - - gfxDrawPlainBoxRaw(x, localY, x + width, localY + 4, color, page1Raw); - - drawDoubleMessageBox(x, y, width, localY, color2, page1Raw); -} - -void drawDialogueMessage(byte msgIdx, int16 x, int16 y, int16 width, int16 color) { - if (msgIdx >= messageTable.size()) { -// removeOverlay(msgIdx, 2); - return; - } - - _messageLen += messageTable[msgIdx].size(); - drawMessage(messageTable[msgIdx].c_str(), x, y, width, color); - - // this invalidates the iterator in drawOverlays() -// removeOverlay(msgIdx, 2); -} - -void drawFailureMessage(byte cmd) { - byte msgIdx = cmd * 4 + g_cine->_rnd.getRandomNumber(3); - - const char *messagePtr = failureMessages[msgIdx]; - int len = strlen(messagePtr); - - _messageLen += len; - - int16 width = 6 * len + 20; - - if (width > 300) - width = 300; - - int16 x = (320 - width) / 2; - int16 y = 80; - int16 color = 4; - - drawMessage(messagePtr, x, y, width, color); - - // this invalidates the iterator in drawOverlays() -// removeOverlay(cmd, 3); -} - -void drawOverlays(void) { - uint16 width, height; - AnimData *pPart; - int16 x, y; - objectStruct *objPtr; - byte messageIdx; +void removeMessages() { Common::List::iterator it; - backupOverlayPage(); - - _messageLen = 0; - - for (it = overlayList.begin(); it != overlayList.end(); ++it) { - switch (it->type) { - case 0: // sprite - assert(it->objIdx < NUM_MAX_OBJECT); - - objPtr = &objectTable[it->objIdx]; - x = objPtr->x; - y = objPtr->y; - - if (objPtr->frame < 0) { - continue; - } - - pPart = &animDataTable[objPtr->frame]; - width = pPart->_realWidth; - height = pPart->_height; - - if (!pPart->data()) { - continue; - } - - // drawSprite ignores masks of Operation Stealth sprites - drawSprite(it, pPart->data(), pPart->mask(), width, height, page1Raw, x, y); - break; - - case 2: // text - // gfxWaitVSync(); - // hideMouse(); - - messageIdx = it->objIdx; - x = it->x; - y = it->y; - width = it->width; - height = it->color; - - blitRawScreen(page1Raw); - - drawDialogueMessage(messageIdx, x, y, width, height); - - // blitScreen(page0, NULL); - // gfxRedrawMouseCursor(); - - waitForPlayerClick = 1; - - break; - - case 3: - // gfxWaitSync() - // hideMouse(); - - blitRawScreen(page1Raw); - - drawFailureMessage(it->objIdx); - - // blitScreen(page0, NULL); - // gfxRedrawMouseCursor(); - - waitForPlayerClick = 1; - - break; - - case 4: - assert(it->objIdx < NUM_MAX_OBJECT); - - objPtr = &objectTable[it->objIdx]; - x = objPtr->x; - y = objPtr->y; - - if (objPtr->frame < 0) { - continue; - } - - assert(objPtr->frame < NUM_MAX_ANIMDATA); - - pPart = &animDataTable[objPtr->frame]; - - width = pPart->_realWidth; - height = pPart->_height; - - if (!pPart->data()) { - continue; - } - - gfxFillSprite(pPart->data(), width, height, page1Raw, x, y); - break; - - case 20: - assert(it->objIdx < NUM_MAX_OBJECT); - - objPtr = &objectTable[it->objIdx]; - x = objPtr->x; - y = objPtr->y; - var5 = it->x; - - if (objPtr->frame < 0 || var5 > 8 || !additionalBgTable[var5] || animDataTable[objPtr->frame]._bpp != 1) { - continue; - } - - width = animDataTable[objPtr->frame]._realWidth; - height = animDataTable[objPtr->frame]._height; - - if (!animDataTable[objPtr->frame].data()) { - continue; - } - - maskBgOverlay(additionalBgTable[var5], animDataTable[objPtr->frame].data(), width, height, page1Raw, x, y); - break; - } - } - for (it = overlayList.begin(); it != overlayList.end(); ) { if (it->type == 2 || it->type == 3) { it = overlayList.erase(it); @@ -1978,115 +1566,96 @@ void addMessage(byte param1, int16 param2, int16 param3, int16 param4, int16 par tmp.color = param5; overlayList.push_back(tmp); + waitForPlayerClick = 1; } -SeqListElement seqList; +Common::List seqList; void removeSeq(uint16 param1, uint16 param2, uint16 param3) { - SeqListElement *currentHead = &seqList; - SeqListElement *tempHead = currentHead; + Common::List::iterator it; - while (currentHead && (currentHead->var6 != param1 || currentHead->var4 != param2 || currentHead->varE != param3)) { - tempHead = currentHead; - currentHead = tempHead->next; - } - - if (currentHead && currentHead->var6 == param1 && currentHead->var4 == param2 && currentHead->varE == param3) { - currentHead->var4 = -1; + for (it = seqList.begin(); it != seqList.end(); ++it) { + if (it->objIdx == param1 && it->var4 == param2 && it->varE == param3) { + it->var4 = -1; + break; + } } } uint16 isSeqRunning(uint16 param1, uint16 param2, uint16 param3) { - SeqListElement *currentHead = &seqList; - SeqListElement *tempHead = currentHead; - - while (currentHead && (currentHead->var6 != param1 || currentHead->var4 != param2 || currentHead->varE != param3)) { - tempHead = currentHead; - currentHead = tempHead->next; - } + Common::List::iterator it; - if (currentHead && currentHead->var6 == param1 && currentHead->var4 == param2 && currentHead->varE == param3) { - return 1; + for (it = seqList.begin(); it != seqList.end(); ++it) { + if (it->objIdx == param1 && it->var4 == param2 && it->varE == param3) { + return 1; + } } return 0; } -void addSeqListElement(int16 param0, int16 param1, int16 param2, int16 param3, int16 param4, int16 param5, int16 param6, int16 param7, int16 param8) { - SeqListElement *currentHead = &seqList; - SeqListElement *tempHead = currentHead; - SeqListElement *newElement; - - currentHead = tempHead->next; - - while (currentHead && currentHead->varE < param7) { - tempHead = currentHead; - currentHead = tempHead->next; - } - - newElement = new SeqListElement; - - newElement->next = tempHead->next; - tempHead->next = newElement; - - newElement->var6 = param0; - newElement->var4 = param1; - newElement->var8 = param2; - newElement->varA = param3; - newElement->varC = param4; - newElement->var14 = 0; - newElement->var16 = 0; - newElement->var18 = param5; - newElement->var1A = param6; - newElement->varE = param7; - newElement->var10 = param8; - newElement->var12 = param8; - newElement->var1C = 0; - newElement->var1E = 0; -} - -void resetSeqList() { - seqList.next = NULL; +void addSeqListElement(uint16 objIdx, int16 param1, int16 param2, int16 frame, int16 param4, int16 param5, int16 param6, int16 param7, int16 param8) { + Common::List::iterator it; + SeqListElement tmp; + + for (it = seqList.begin(); it != seqList.end() && it->varE < param7; ++it) ; + + tmp.objIdx = objIdx; + tmp.var4 = param1; + tmp.var8 = param2; + tmp.frame = frame; + tmp.varC = param4; + tmp.var14 = 0; + tmp.var16 = 0; + tmp.var18 = param5; + tmp.var1A = param6; + tmp.varE = param7; + tmp.var10 = param8; + tmp.var12 = param8; + tmp.var1C = 0; + tmp.var1E = 0; + + seqList.insert(it, tmp); } -void computeMove1(SeqListElement *element, int16 x, int16 y, int16 param1, +void computeMove1(SeqListElement &element, int16 x, int16 y, int16 param1, int16 param2, int16 x2, int16 y2) { - element->var16 = 0; - element->var14 = 0; + element.var16 = 0; + element.var14 = 0; if (y2) { if (y - param2 > y2) { - element->var16 = 2; + element.var16 = 2; } if (y + param2 < y2) { - element->var16 = 1; + element.var16 = 1; } } if (x2) { if (x - param1 > x2) { - element->var14 = 2; + element.var14 = 2; } if (x + param1 < x2) { - element->var14 = 1; + element.var14 = 1; } } } -uint16 computeMove2(SeqListElement *element) { +uint16 computeMove2(SeqListElement &element) { int16 returnVar = 0; - if (element->var16 == 1) { + if (element.var16 == 1) { returnVar = 4; - } else if (element->var16 == 2) { + } else if (element.var16 == 2) { returnVar = 3; } - if (element->var14 == 1) { + if (element.var14 == 1) { returnVar = 1; - } else if (element->var14 == 2) { + } else if (element.var14 == 2) { returnVar = 2; } @@ -2165,14 +1734,13 @@ void resetGfxEntityEntry(uint16 objIdx) { #endif } -uint16 addAni(uint16 param1, uint16 param2, const byte *ptr, SeqListElement *element, uint16 param3, int16 *param4) { +uint16 addAni(uint16 param1, uint16 objIdx, const byte *ptr, SeqListElement &element, uint16 param3, int16 *param4) { const byte *currentPtr = ptr; const byte *ptrData; const byte *ptr2; int16 di; assert(ptr); - assert(element); assert(param4); dummyU16 = READ_BE_UINT16((currentPtr + param1 * 2) + 8); @@ -2181,25 +1749,25 @@ uint16 addAni(uint16 param1, uint16 param2, const byte *ptr, SeqListElement *ele assert(*ptrData); - di = (objectTable[param2].costume + 1) % (*ptrData); + di = (objectTable[objIdx].costume + 1) % (*ptrData); ptr2 = (ptrData + (di * 8)) + 1; - if ((checkCollision(param2, ptr2[0], ptr2[1], ptr2[2], ptr[0]) & 1)) { + if ((checkCollision(objIdx, ptr2[0], ptr2[1], ptr2[2], ptr[0]) & 1)) { return 0; } - objectTable[param2].x += (int8)ptr2[4]; - objectTable[param2].y += (int8)ptr2[5]; - objectTable[param2].mask += (int8)ptr2[6]; + objectTable[objIdx].x += (int8)ptr2[4]; + objectTable[objIdx].y += (int8)ptr2[5]; + objectTable[objIdx].mask += (int8)ptr2[6]; - if (objectTable[param2].frame) { - resetGfxEntityEntry(param2); + if (objectTable[objIdx].frame) { + resetGfxEntityEntry(objIdx); } - objectTable[param2].frame = ptr2[7] + element->var8; + objectTable[objIdx].frame = ptr2[7] + element.var8; - if (param3 || !element->var14) { - objectTable[param2].costume = di; + if (param3 || !element.var14) { + objectTable[objIdx].costume = di; } else { *param4 = di; } @@ -2207,86 +1775,86 @@ uint16 addAni(uint16 param1, uint16 param2, const byte *ptr, SeqListElement *ele return 1; } -void processSeqListElement(SeqListElement *element) { - int16 x = objectTable[element->var6].x; - int16 y = objectTable[element->var6].y; - const byte *ptr1 = animDataTable[element->varA].data(); +void processSeqListElement(SeqListElement &element) { + int16 x = objectTable[element.objIdx].x; + int16 y = objectTable[element.objIdx].y; + const byte *ptr1 = animDataTable[element.frame].data(); int16 var_10; int16 var_4; int16 var_2; - if (element->var12 < element->var10) { - element->var12++; + if (element.var12 < element.var10) { + element.var12++; return; } - element->var12 = 0; + element.var12 = 0; if (ptr1) { uint16 param1 = ptr1[1]; uint16 param2 = ptr1[2]; - if (element->varC != 255) { + if (element.varC != 255) { // FIXME: Why is this here? Fingolfin gets lots of these // in his copy of Operation Stealth (value 0 or 236) under // Mac OS X. Maybe it's a endian issue? At least the graphics // in the copy protection screen are partially messed up. - warning("processSeqListElement: varC = %d", element->varC); + warning("processSeqListElement: varC = %d", element.varC); } if (globalVars[VAR_MOUSE_X_POS] || globalVars[VAR_MOUSE_Y_POS]) { computeMove1(element, ptr1[4] + x, ptr1[5] + y, param1, param2, globalVars[VAR_MOUSE_X_POS], globalVars[VAR_MOUSE_Y_POS]); } else { - element->var16 = 0; - element->var14 = 0; + element.var16 = 0; + element.var14 = 0; } var_10 = computeMove2(element); if (var_10) { - element->var1C = var_10; - element->var1E = var_10; + element.var1C = var_10; + element.var1E = var_10; } var_4 = -1; - if ((element->var16 == 1 - && !addAni(3, element->var6, ptr1, element, 0, &var_4)) || (element->var16 == 2 && !addAni(2, element->var6, ptr1, element, 0, + if ((element.var16 == 1 + && !addAni(3, element.objIdx, ptr1, element, 0, &var_4)) || (element.var16 == 2 && !addAni(2, element.objIdx, ptr1, element, 0, &var_4))) { - if (element->varC == 255) { + if (element.varC == 255) { globalVars[VAR_MOUSE_Y_POS] = 0; } } - if ((element->var14 == 1 - && !addAni(0, element->var6, ptr1, element, 1, &var_2))) { - if (element->varC == 255) { + if ((element.var14 == 1 + && !addAni(0, element.objIdx, ptr1, element, 1, &var_2))) { + if (element.varC == 255) { globalVars[VAR_MOUSE_X_POS] = 0; if (var_4 != -1) { - objectTable[element->var6].costume = var_4; + objectTable[element.objIdx].costume = var_4; } } } - if ((element->var14 == 2 && !addAni(1, element->var6, ptr1, element, 1, &var_2))) { - if (element->varC == 255) { + if ((element.var14 == 2 && !addAni(1, element.objIdx, ptr1, element, 1, &var_2))) { + if (element.varC == 255) { globalVars[VAR_MOUSE_X_POS] = 0; if (var_4 != -1) { - objectTable[element->var6].costume = var_4; + objectTable[element.objIdx].costume = var_4; } } } - if (element->var16 + element->var14) { - if (element->var1C) { - if (element->var1E) { - objectTable[element->var6].costume = 0; - element->var1E = 0; + if (element.var16 + element.var14) { + if (element.var1C) { + if (element.var1E) { + objectTable[element.objIdx].costume = 0; + element.var1E = 0; } - addAni(element->var1C + 3, element->var6, ptr1, element, 1, (int16 *) & var2); + addAni(element.var1C + 3, element.objIdx, ptr1, element, 1, (int16 *) & var2); } } @@ -2295,119 +1863,28 @@ void processSeqListElement(SeqListElement *element) { } void processSeqList(void) { - SeqListElement *currentHead = &seqList; - SeqListElement *tempHead = currentHead; + Common::List::iterator it; - currentHead = tempHead->next; - - while (currentHead) { - if (currentHead->var4 != -1) { - processSeqListElement(currentHead); + for (it = seqList.begin(); it != seqList.end(); ++it) { + if (it->var4 == -1) { + continue; } - tempHead = currentHead; - currentHead = tempHead->next; + processSeqListElement(*it); } } bool makeTextEntryMenu(const char *messagePtr, char *inputString, int stringMaxLength, int y) { - int16 color = 2; - byte color2 = defaultMenuBoxColor2; - byte endOfMessageReached = 0; - int16 localX, localY, localWidth; - int margins = 16; int len = strlen(messagePtr); int16 width = 6 * len + 20; - uint16 messageLength = 0, numWords = 0, messageWidth = 0; - uint16 lineResult, fullLineWidth; - uint16 interWordSize, interWordSizeRemain; - const char *endOfMessagePtr; - byte currentChar, characterWidth; width = CLIP((int)width, 180, 250); int16 x = (320 - width) / 2; - gfxDrawPlainBoxRaw(x - margins, y, x + width + margins, y + 4, color2, page1Raw); - - localX = x + 4; - localY = y + 4; - localWidth = width; - getKeyData(); // clear input key - do { - messageLength = 0; - - while (messagePtr[messageLength] == ' ') { - messageLength++; - } - - messagePtr += messageLength; - - messageLength = computeMessageLength((const byte *)messagePtr, localWidth, &numWords, &messageWidth, &lineResult); - - endOfMessagePtr = messagePtr + messageLength; - - if (lineResult) { - fullLineWidth = localWidth - messageWidth; - - if (numWords) { - interWordSize = fullLineWidth / numWords; - interWordSizeRemain = fullLineWidth % numWords; - } else { - interWordSize = 5; - interWordSizeRemain = 0; - } - } else { - interWordSize = 5; - interWordSizeRemain = 0; - } - - gfxDrawPlainBoxRaw(x - margins, localY, x + width + margins, localY + 9, color2, page1Raw); - - do { - currentChar = *(messagePtr++); - - if (currentChar == 0) { - endOfMessageReached = 1; - } else if (currentChar == ' ') { - localX += interWordSizeRemain + interWordSize; - - if (interWordSizeRemain) - interWordSizeRemain = 0; - } else { - characterWidth = fontParamTable[currentChar].characterWidth; - - if (characterWidth) { - byte characterIdx = fontParamTable[currentChar].characterIdx; - drawSpriteRaw(textTable[characterIdx][0], textTable[characterIdx][1], 2, 8, page1Raw, localX, localY); - localX += characterWidth + 1; - } - } - } while ((messagePtr < endOfMessagePtr) && !endOfMessageReached); - - localX = x + 4; - localY += 9; - } while (!endOfMessageReached); - - // Input string - gfxDrawPlainBoxRaw(x - margins, localY, x + width + margins, localY + 9, color2, page1Raw); - localY += 9; - - x -= margins; - width += margins * 2; - - gfxDrawPlainBoxRaw(x, localY, x + width, localY + 4, color2, page1Raw); - - drawDoubleMessageBox(x, y, width, localY, color, page1Raw); - - x += margins; - width -= margins * 2; - localY -= 9; - - int quit = 0; bool redraw = true; CommandeType tempString; @@ -2416,24 +1893,8 @@ bool makeTextEntryMenu(const char *messagePtr, char *inputString, int stringMaxL while (!quit) { if (redraw) { - gfxDrawPlainBoxRaw(x, localY - 1, x + width, localY + 8, 0, page1Raw); - - int currentX = x + 4; - - for (uint j = 0; j < strlen(inputString); j++) { - currentChar = inputString[j]; - currentX = drawChar(currentChar, currentX, localY); - - // draw cursor here - if (inputPos == (int)(j + 2)) - gfxDrawLine(currentX, localY - 1, currentX, localY + 8, color, page1Raw); - - } - - if (strlen(inputString) == 0 || inputPos == 1) // cursor wasn't yet drawn - gfxDrawLine(x + 4, localY - 1, x + 4, localY + 8, color, page1Raw); - - blitRawScreen(page1Raw); + renderer->drawInputBox(messagePtr, inputString, inputPos, x - 16, y, width + 32); + renderer->blit(); redraw = false; } diff --git a/engines/cine/various.h b/engines/cine/various.h index f906b2aa19..91662c16ff 100644 --- a/engines/cine/various.h +++ b/engines/cine/various.h @@ -43,11 +43,10 @@ extern bool disableSystemMenu; extern bool inMenu; struct SeqListElement { - struct SeqListElement *next; int16 var4; - int16 var6; + uint16 objIdx; int16 var8; - int16 varA; + int16 frame; int16 varC; int16 varE; int16 var10; @@ -60,7 +59,7 @@ struct SeqListElement { int16 var1E; }; -extern SeqListElement seqList; +extern Common::List seqList; extern uint16 var2; extern uint16 var3; @@ -97,7 +96,6 @@ extern char newRelName[20]; extern char newObjectName[20]; extern char newMsgName[20]; -extern char currentBgName[8][15]; extern char currentCtName[15]; extern char currentPartName[15]; @@ -130,20 +128,16 @@ struct SelectedObjStruct { int16 param; }; -extern uint16 defaultMenuBoxColor; -extern uint16 defaultMenuBoxColor2; - #define NUM_MAX_ZONE 16 extern uint16 zoneData[NUM_MAX_ZONE]; void addMessage(byte param1, int16 param2, int16 param3, int16 param4, int16 param5); -extern int16 additionalBgVScroll; +void removeMessages(); void removeSeq(uint16 param1, uint16 param2, uint16 param3); uint16 isSeqRunning(uint16 param1, uint16 param2, uint16 param3); -void addSeqListElement(int16 param0, int16 param1, int16 param2, int16 param3, int16 param4, int16 param5, int16 param6, int16 param7, int16 param8); -void resetSeqList(); +void addSeqListElement(uint16 objIdx, int16 param1, int16 param2, int16 frame, int16 param4, int16 param5, int16 param6, int16 param7, int16 param8); void processSeqList(void); bool makeTextEntryMenu(const char *caption, char *string, int strLen, int y); diff --git a/engines/cine/xref.txt b/engines/cine/xref.txt index 3640ef83d6..5a8d2eef0f 100644 --- a/engines/cine/xref.txt +++ b/engines/cine/xref.txt @@ -1,4 +1,4 @@ -script.cpp: +script_fw.cpp: setupOpcodes() - replaced with FWScript/OSScript class members getNextByte() - replaced with RawScript/FWScript class members getNextWord() - replaced with RawScript/FWScript class members @@ -89,6 +89,9 @@ o1_disableSystemMenu() - replaced with FWScript::o1_disableSystemMenu() o1_loadMask5() - replaced with FWScript::o1_loadMask5() o1_unloadMask5() - replaced with FWScript::o1_unloadMask5() +palRotate() - modified and moved to pal.cpp + +script_os.cpp: o2_loadPart() - replaced with FWScript::o2_loadPart() o2_addSeqListElement() - replaced with FWScript::o2_addSeqListElement() o2_removeSeq() - replaced with FWScript::o2_removeSeq() @@ -134,20 +137,48 @@ releaseObjectScripts() - removed (obsoleted by Common::List::clear()) various.cpp: setupScriptList() - removed (obsoleted by new makeLoad() and loadScriptFromSave() implementation) +drawChar() - removed (obsoleted by FWRenderer::drawChar()) +makeTextEntry() - removed (obsoleted by FWRenderer::drawMenu()) +drawMenuBox() - removed (obsoleted by FWRenderer::drawCommand()) +backupOverlayPage() - removed (obsoleted by FWRenderer::drawBackground()) +drawMessage() - removed (obsoleted by FWRenderer::drawMessage()) +drawDialogueMessage() - removed (obsoleted by FWRenderer::renderOverlay()) +drawFailureMessage() - removed (obsoleted by FWRenderer::renderOverlay()) +drawOverlays() - removed (obsoleted by FWRenderer::drawOverlays()) +resetSeqList() - removed (obsoleted by Common::List) anim.cpp: freeAnimData() - replaced with animData::clear() allocFrame() - replaced with animData::load() reserveFrame() - replaced with animData::load() -bg_list.cpp +bg_list.cpp: reincrustAllBg() - removed (obsoleted by new loadResourcesFromSave() and loadBgIncrustFromSave() implementation) freeBgIncrustList() - removed (obsoleted by Common::List::clear()) -object.cpp +object.cpp: unloadAllMasks() - removed (obsoleted by Common::List::clear()) resetMessageHead() - removed (obsoleted by Common::List) freeOverlay() - removed (duplicate of removeOverlay) removeOverlayElement() - renamed to removeOverlay loadOverlayElement() - renamed to addOverlay + +gfx.cpp: +gfxInit() - removed (obsoleted by FWRenderer) +gfxDestroy() - removed (obsoleted by FWRenderer) +transformColor() - moved to pal.cpp +transformPaletteRange() - modified and moved to pal.cpp +gfxCopyRawPage() - removed (obsoleted by FWRenderer) +gfxFlipRawPage() - removed (obsoleted by FWRenderer::blit() and + FWRenderer::refreshPalette()) +fadeToBlack() - removed (obsoleted by FWRenderer::fadeToBlack()) +blitRawScreen() - removed (obsoleted by FWRenderer) +flip() - removed (obsoleted by FWRenderer::reloadPalette()) + +bg.cpp: +loadCt() - split into loadCtFW() and loadCtOS() +loadBgHigh() - removed (obsoleted by OSRenderer::loadBg256()) + +texte.cpp: +computeMessageLength() - replaced with fitLine() -- cgit v1.2.3 From 68fd8b74b0a42279056a4143455bb8b40dc83ca9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 24 May 2008 22:41:15 +0000 Subject: Patch #1970427: AudioStream play length querying svn-id: r32258 --- sound/audiostream.cpp | 15 +++++++++++---- sound/audiostream.h | 14 ++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp index 0fba6affdb..4454a09fe6 100644 --- a/sound/audiostream.cpp +++ b/sound/audiostream.cpp @@ -102,6 +102,11 @@ AudioStream* AudioStream::openStreamFile(const Common::String &basename, uint32 #pragma mark --- LinearMemoryStream --- #pragma mark - +inline int32 calculatePlayTime(int rate, int samples) { + int32 seconds = samples / rate; + int32 milliseconds = (1000 * (samples % rate)) / rate; + return seconds * 1000 + milliseconds; +} /** * A simple raw audio stream, purely memory based. It operates on a single @@ -122,10 +127,11 @@ protected: const byte *_loopEnd; const int _rate; const byte *_origPtr; + const int32 _playtime; public: LinearMemoryStream(int rate, const byte *ptr, uint len, uint loopOffset, uint loopLen, bool autoFreeMemory) - : _ptr(ptr), _end(ptr+len), _loopPtr(0), _loopEnd(0), _rate(rate) { + : _ptr(ptr), _end(ptr+len), _loopPtr(0), _loopEnd(0), _rate(rate), _playtime(calculatePlayTime(rate, len / (is16Bit ? 2 : 1) / (stereo ? 2 : 1))) { // Verify the buffer sizes are sane if (is16Bit && stereo) @@ -147,10 +153,11 @@ public: } int readBuffer(int16 *buffer, const int numSamples); - bool isStereo() const { return stereo; } - bool endOfData() const { return _ptr >= _end; } + bool isStereo() const { return stereo; } + bool endOfData() const { return _ptr >= _end; } - int getRate() const { return _rate; } + int getRate() const { return _rate; } + int32 getTotalPlayTime() const { return _playtime; } }; template diff --git a/sound/audiostream.h b/sound/audiostream.h index ed6b37e51c..45740ba2ae 100644 --- a/sound/audiostream.h +++ b/sound/audiostream.h @@ -93,6 +93,20 @@ public: * NULL in case of an error (e.g. invalid/nonexisting file) */ static AudioStream* openStreamFile(const Common::String &basename, uint32 startTime = 0, uint32 duration = 0, uint numLoops = 1); + + enum { + kUnknownPlayTime = -1 + }; + + /** + * Returns total playtime of the AudioStream object. + * Note that this does not require to return an playtime, if the + * playtime of the AudioStream is unknown it returns 'kUnknownPlayTime'. + * @see kUnknownPlayTime + * + * @return playtime in milliseconds + */ + int32 getTotalPlayTime() const { return kUnknownPlayTime; } }; /** -- cgit v1.2.3 From 6866a4e133f2ae505bc142bc4b35e79d48f5191a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 24 May 2008 22:44:15 +0000 Subject: - Cleanup - Added support for showing kyra.dat error messages in a dialog svn-id: r32259 --- engines/kyra/resource.cpp | 5 +---- engines/kyra/resource.h | 2 +- engines/kyra/staticres.cpp | 34 +++++++++++++++------------------- 3 files changed, 17 insertions(+), 24 deletions(-) diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 197f363b1e..6fa256ce40 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -30,8 +30,6 @@ #include "common/fs.h" #include "common/func.h" -#include "gui/message.h" - #include "kyra/resource.h" #define INS_CACHE_THRESHOLD 300000 // all files with file size greater than this will be cached @@ -57,8 +55,7 @@ bool Resource::reset() { if (!loadPakFile(StaticResource::staticDataFilename()) || !StaticResource::checkKyraDat()) { Common::String errorMessage = "You're missing the '" + StaticResource::staticDataFilename() + "' file or it got corrupted, (re)get it from the ScummVM website"; - ::GUI::MessageDialog errorMsg(errorMessage); - errorMsg.runModal(); + _vm->GUIErrorMessage(errorMessage); error(errorMessage.c_str()); } diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index 43a41940a3..90405690a4 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -285,7 +285,7 @@ public: bool prefetchId(int id); void unloadId(int id); private: - void outputError(); + void outputError(const Common::String &error); KyraEngine_v1 *_vm; diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index b28fa45262..302b92ab07 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -40,8 +40,6 @@ #include "kyra/gui_hof.h" #include "kyra/gui_mr.h" -#include "gui/message.h" - namespace Kyra { #define RESFILE_VERSION 28 @@ -293,18 +291,20 @@ bool StaticResource::init() { error("unknown game ID"); } + char errorBuffer[100]; int tempSize = 0; uint8 *temp = getFile("INDEX", tempSize); if (!temp) { - warning("No matching INDEX file found ('%s')", getFilename("INDEX")); - outputError(); + snprintf(errorBuffer, sizeof(errorBuffer), "is missing an '%s' entry", getFilename("INDEX")); + outputError(errorBuffer); return false; } if (tempSize != 3*4) { delete[] temp; - warning("'%s' has illegal filesize %d", getFilename("INDEX"), tempSize); - outputError(); + + snprintf(errorBuffer, sizeof(errorBuffer), "has incorrect header size for entry '%s'", getFilename("INDEX")); + outputError(errorBuffer); return false; } @@ -316,28 +316,25 @@ bool StaticResource::init() { temp = 0; if (version != RESFILE_VERSION) { - warning("Invalid KYRA.DAT file version (%u, required %d)", version, RESFILE_VERSION); - outputError(); + snprintf(errorBuffer, sizeof(errorBuffer), "has invalid version %d required, you got %d", RESFILE_VERSION, version); + outputError(errorBuffer); return false; } if (gameID != _vm->game()) { - warning("Invalid game id (%u)", gameID); - outputError(); + outputError("does not include support for your game"); return false; } uint32 gameFeatures = createFeatures(_vm->gameFlags()); if ((featuresValue & GAME_FLAGS) != gameFeatures) { - warning("Your data file has a different game flags (0x%.08X has the data and your version has 0x%.08X)", (featuresValue & GAME_FLAGS), gameFeatures); - outputError(); + outputError("does not include support for your game version"); return false; } // load all tables for now if (!prefetchId(-1)) { - warning("Couldn't load all needed resources from 'KYRA.DAT'"); - outputError(); + outputError("is lacking entries for your game version"); return false; } return true; @@ -347,11 +344,10 @@ void StaticResource::deinit() { unloadId(-1); } -void StaticResource::outputError() { - Common::String errorMessage = "Your '" + StaticResource::staticDataFilename() + "' file is outdated, reget it from the ScummVM website"; - ::GUI::MessageDialog errorMsg(errorMessage); - errorMsg.runModal(); - error(errorMessage.c_str()); +void StaticResource::outputError(const Common::String &error) { + Common::String errorMessage = "Your '" + StaticResource::staticDataFilename() + "' file " + error + ", reget a correct version from the ScummVM website"; + _vm->GUIErrorMessage(errorMessage); + ::error(errorMessage.c_str()); } const char * const*StaticResource::loadStrings(int id, int &strings) { -- cgit v1.2.3 From 335eb1bf0853dbdede70fc4366fd1ff166715198 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 24 May 2008 22:47:08 +0000 Subject: Committed my fix for bug #1497437 "KYRA1: Subtitles glitch during 'Speech of the Land'". svn-id: r32260 --- engines/kyra/kyra_lok.cpp | 1 + engines/kyra/kyra_lok.h | 2 ++ engines/kyra/script_lok.cpp | 68 +++++++++++++++++++++++++++++++++++++++----- engines/kyra/sound.cpp | 18 ++++++++++-- engines/kyra/sound.h | 13 +++++++-- engines/kyra/sound_lok.cpp | 2 +- engines/kyra/sound_towns.cpp | 6 ++-- engines/kyra/text.cpp | 2 +- engines/kyra/text_lok.cpp | 6 ++-- 9 files changed, 97 insertions(+), 21 deletions(-) diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp index 0668cc7202..c852f6e3ee 100644 --- a/engines/kyra/kyra_lok.cpp +++ b/engines/kyra/kyra_lok.cpp @@ -91,6 +91,7 @@ KyraEngine_LoK::KyraEngine_LoK(OSystem *system, const GameFlags &flags) memset(_panPagesTable, 0, sizeof(_panPagesTable)); memset(_sceneAnimTable, 0, sizeof(_sceneAnimTable)); _currHeadShape = 0; + _speechPlayTime = 0; memset(&_itemBkgBackUp, 0, sizeof(_itemBkgBackUp)); } diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index 6bae169a77..fa884750e5 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -211,6 +211,8 @@ public: void snd_voiceWaitForFinish(bool ingame = true); protected: + int32 _speechPlayTime; + void saveGame(const char *fileName, const char *saveName); void loadGame(const char *fileName); diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index 670c7282e3..d4825387d9 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -35,6 +35,7 @@ #include "kyra/animator_lok.h" #include "kyra/text.h" #include "kyra/timer.h" +#include "kyra/sound.h" namespace Kyra { int KyraEngine_LoK::o1_magicInMouseItem(EMCState *script) { @@ -320,9 +321,20 @@ int KyraEngine_LoK::o1_setBrandonStatusBit(EMCState *script) { } int KyraEngine_LoK::o1_delaySecs(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_delaySecs(%p) (%d)", (const void *)script, stackPos(0)); - if (stackPos(0) > 0 && !_skipFlag) - delay(stackPos(0)*1000, true); + if (_flags.isTalkie && speechEnabled()) { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_voiceDelay(%p) (%d)", (const void *)script, stackPos(0)); + if (stackPos(0) == 0) { + snd_voiceWaitForFinish(true); + } else if (stackPos(0) < 0) { + uint32 time = ABS(stackPos(0)) * _tickLength; + delay(time, true); + } + } else { + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_delaySecs(%p) (%d)", (const void *)script, stackPos(0)); + if (stackPos(0) >= 0 && !_skipFlag) + delay(stackPos(0)*1000, true); + } + _skipFlag = false; return 0; } @@ -700,7 +712,10 @@ int KyraEngine_LoK::o1_displayWSAFrameOnHidPage(EMCState *script) { } int KyraEngine_LoK::o1_displayWSASequentialFrames(EMCState *script) { - debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_displayWSASequentialFrames(%p) (%d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6)); + if (_flags.isTalkie) + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_displayWSASequentialFrames(%p) (%d, %d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6), stackPos(7)); + else + debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_displayWSASequentialFrames(%p) (%d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6)); int startFrame = stackPos(0); int endFrame = stackPos(1); int xpos = stackPos(2); @@ -708,6 +723,43 @@ int KyraEngine_LoK::o1_displayWSASequentialFrames(EMCState *script) { int waitTime = stackPos(4); int wsaIndex = stackPos(5); int maxTime = stackPos(6); + + if (_flags.isTalkie) { + int specialTime = stackPos(7); + if (specialTime) { + int32 voiceTime = _speechPlayTime; + if (voiceTime && voiceTime != -1) { + int displayFrames = ABS(endFrame-startFrame)+1; + displayFrames *= maxTime; + assert(displayFrames != 0); + + bool voiceSync = false; + + if (specialTime < 0) { + voiceSync = true; + specialTime = ABS(specialTime); + } + + voiceTime *= specialTime; + voiceTime /= 100; + + if (voiceSync) { + uint32 voicePlayedTime = _sound->voicePlayedTime(_speechFile.c_str()); + if (voicePlayedTime >= (uint32)voiceTime) + voiceTime = 0; + else + voiceTime -= voicePlayedTime; + + if (!snd_voiceIsPlaying()) + voiceTime = 0; + } + + waitTime = voiceTime / displayFrames; + waitTime /= _tickLength; + } + } + } + if (maxTime - 1 <= 0) maxTime = 1; @@ -734,7 +786,8 @@ int KyraEngine_LoK::o1_displayWSASequentialFrames(EMCState *script) { while (endFrame >= frame) { uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(frame); - _animator->_updateScreen = true; + if (waitTime) + _animator->_updateScreen = true; while (_system->getMillis() < continueTime) { _sprites->updateSceneAnims(); _animator->updateAllObjectShapes(); @@ -751,7 +804,8 @@ int KyraEngine_LoK::o1_displayWSASequentialFrames(EMCState *script) { while (endFrame <= frame) { uint32 continueTime = waitTime * _tickLength + _system->getMillis(); _movieObjects[wsaIndex]->displayFrame(frame); - _animator->_updateScreen = true; + if (waitTime) + _animator->_updateScreen = true; while (_system->getMillis() < continueTime) { _sprites->updateSceneAnims(); _animator->updateAllObjectShapes(); @@ -1691,7 +1745,7 @@ int KyraEngine_LoK::o1_pauseMusicSeconds(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_LoK::o1_pauseMusicSeconds(%p) ()", (const void *)script); // if music disabled // return - o1_delaySecs(script); + delay(stackPos(0)*1000, true); return 0; } diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index 854e2de41f..137956196f 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -66,14 +66,14 @@ bool Sound::voiceFileIsPresent(const char *file) { return false; } -bool Sound::voicePlay(const char *file, bool isSfx) { +int32 Sound::voicePlay(const char *file, bool isSfx) { char filenamebuffer[25]; int h = 0; while (_mixer->isSoundHandleActive(_soundChannels[h].channelHandle) && h < kNumChannelHandles) h++; if (h >= kNumChannelHandles) - return false; + return 0; Audio::AudioStream *audioStream = 0; @@ -107,7 +107,7 @@ bool Sound::voicePlay(const char *file, bool isSfx) { _soundChannels[h].file = file; _mixer->playInputStream(isSfx ? Audio::Mixer::kSFXSoundType : Audio::Mixer::kSpeechSoundType, &_soundChannels[h].channelHandle, audioStream); - return true; + return audioStream->getTotalPlayTime(); } void Sound::voiceStop(const char *file) { @@ -140,6 +140,18 @@ bool Sound::voiceIsPlaying(const char *file) { return res; } +uint32 Sound::voicePlayedTime(const char *file) { + if (!file) + return 0; + + for (int i = 0; i < kNumChannelHandles; ++i) { + if (_soundChannels[i].file == file) + return _mixer->getSoundElapsedTime(_soundChannels[i].channelHandle); + } + + return 0; +} + #pragma mark - SoundMidiPC::SoundMidiPC(KyraEngine_v1 *vm, Audio::Mixer *mixer, MidiDriver *driver) : Sound(vm, mixer) { diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h index 595619c7e9..2427a6cdde 100644 --- a/engines/kyra/sound.h +++ b/engines/kyra/sound.h @@ -174,9 +174,9 @@ public: * * @param file file to be played * @param isSfx marks file as sfx instead of voice - * @return channel the voice file is played on + * @return playtime of the voice file (-1 marks unknown playtime) */ - virtual bool voicePlay(const char *file, bool isSfx = false); + virtual int32 voicePlay(const char *file, bool isSfx = false); /** * Checks if a voice is being played. @@ -185,6 +185,13 @@ public: */ bool voiceIsPlaying(const char *file = 0); + /** + * Checks how long a voice has been playing + * + * @return time in milliseconds + */ + uint32 voicePlayedTime(const char *file); + /** * Stops playback of the current voice. */ @@ -449,7 +456,7 @@ public: void haltTrack(); void beginFadeOut(); - bool voicePlay(const char *file, bool isSfx = false); + int32 voicePlay(const char *file, bool isSfx = false); void playSoundEffect(uint8) {} private: diff --git a/engines/kyra/sound_lok.cpp b/engines/kyra/sound_lok.cpp index 728013cdaa..b12b1fa800 100644 --- a/engines/kyra/sound_lok.cpp +++ b/engines/kyra/sound_lok.cpp @@ -67,7 +67,7 @@ void KyraEngine_LoK::snd_playVoiceFile(int id) { assert(id >= 0 && id < 9999); sprintf(vocFile, "%03d", id); _speechFile = vocFile; - _sound->voicePlay(vocFile); + _speechPlayTime = _sound->voicePlay(vocFile); } void KyraEngine_LoK::snd_voiceWaitForFinish(bool ingame) { diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp index 5a1801b803..4265533507 100644 --- a/engines/kyra/sound_towns.cpp +++ b/engines/kyra/sound_towns.cpp @@ -1432,7 +1432,7 @@ void SoundTowns_v2::haltTrack() { //_driver->reset(); } -bool SoundTowns_v2::voicePlay(const char *file, bool) { +int32 SoundTowns_v2::voicePlay(const char *file, bool) { static const uint16 rates[] = { 0x10E1, 0x0CA9, 0x0870, 0x0654, 0x0438, 0x032A, 0x021C, 0x0194 }; int h = 0; @@ -1440,7 +1440,7 @@ bool SoundTowns_v2::voicePlay(const char *file, bool) { while (_mixer->isSoundHandleActive(_soundChannels[h].channelHandle) && h < kNumChannelHandles) h++; if (h >= kNumChannelHandles) - return false; + return 0; } char filename [13]; @@ -1497,7 +1497,7 @@ bool SoundTowns_v2::voicePlay(const char *file, bool) { _mixer->playInputStream(Audio::Mixer::kSFXSoundType, &_soundChannels[h].channelHandle, _currentSFX); delete[] data; - return true; + return 1; } void SoundTowns_v2::beginFadeOut() { diff --git a/engines/kyra/text.cpp b/engines/kyra/text.cpp index 931c5fe1c9..f8eb10a85e 100644 --- a/engines/kyra/text.cpp +++ b/engines/kyra/text.cpp @@ -210,7 +210,7 @@ void TextDisplayer::printTalkTextMessage(const char *text, int x, int y, uint8 c calcWidestLineBounds(x1, x2, w, x); _talkCoords.x = x1; _talkCoords.w = w + 2; - _screen->copyRegion(_talkCoords.x, _talkMessageY, _talkCoords.x, _talkCoords.y, _talkCoords.w, _talkMessageH, srcPage, dstPage); + _screen->copyRegion(_talkCoords.x, _talkMessageY, _talkCoords.x, _talkCoords.y, _talkCoords.w, _talkMessageH, srcPage, dstPage, Screen::CR_NO_P_CHECK); int curPage = _screen->_curPage; _screen->_curPage = srcPage; for (int i = 0; i < lineCount; ++i) { diff --git a/engines/kyra/text_lok.cpp b/engines/kyra/text_lok.cpp index ccca079e32..f6b0407a75 100644 --- a/engines/kyra/text_lok.cpp +++ b/engines/kyra/text_lok.cpp @@ -62,10 +62,8 @@ void KyraEngine_LoK::waitForChatToFinish(int vocFile, int16 chatDuration, const if (chatDuration != -1) chatDuration *= _tickLength; - if (vocFile != -1) { - snd_voiceWaitForFinish(); + if (vocFile != -1) snd_playVoiceFile(vocFile); - } _timer->disable(14); _timer->disable(18); @@ -269,6 +267,8 @@ void KyraEngine_LoK::characterSays(int vocFile, const char *chatStr, int8 charNu if (_currentCharacter->sceneId == 210) return; + snd_voiceWaitForFinish(true); + convoInitialized = initCharacterChat(charNum); chatPartnerNum = getChatPartnerNum(); -- cgit v1.2.3 From af7bc93c461bd5b7dbd4eeed01b87ad8dbc4e1a1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 24 May 2008 22:59:20 +0000 Subject: Made AudioStream::getTotalPlayTime virtual (Ooops :-) svn-id: r32261 --- sound/audiostream.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/audiostream.h b/sound/audiostream.h index 45740ba2ae..04133936ee 100644 --- a/sound/audiostream.h +++ b/sound/audiostream.h @@ -106,7 +106,7 @@ public: * * @return playtime in milliseconds */ - int32 getTotalPlayTime() const { return kUnknownPlayTime; } + virtual int32 getTotalPlayTime() const { return kUnknownPlayTime; } }; /** -- cgit v1.2.3 From 64910f8c5fb3a9e39e356fc2856d311d8ad77bd6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 24 May 2008 23:05:01 +0000 Subject: Little cleanup. svn-id: r32262 --- engines/kyra/kyra_lok.h | 1 + engines/kyra/script_lok.cpp | 9 +++------ engines/kyra/sound.cpp | 2 +- engines/kyra/sound_lok.cpp | 7 +++++++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/engines/kyra/kyra_lok.h b/engines/kyra/kyra_lok.h index fa884750e5..cb3062847e 100644 --- a/engines/kyra/kyra_lok.h +++ b/engines/kyra/kyra_lok.h @@ -209,6 +209,7 @@ public: void snd_playWanderScoreViaMap(int command, int restart); virtual void snd_playVoiceFile(int id); void snd_voiceWaitForFinish(bool ingame = true); + uint32 snd_getVoicePlayTime(); protected: int32 _speechPlayTime; diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp index d4825387d9..efa0f8e48f 100644 --- a/engines/kyra/script_lok.cpp +++ b/engines/kyra/script_lok.cpp @@ -727,8 +727,8 @@ int KyraEngine_LoK::o1_displayWSASequentialFrames(EMCState *script) { if (_flags.isTalkie) { int specialTime = stackPos(7); if (specialTime) { - int32 voiceTime = _speechPlayTime; - if (voiceTime && voiceTime != -1) { + uint32 voiceTime = snd_getVoicePlayTime(); + if (voiceTime) { int displayFrames = ABS(endFrame-startFrame)+1; displayFrames *= maxTime; assert(displayFrames != 0); @@ -745,13 +745,10 @@ int KyraEngine_LoK::o1_displayWSASequentialFrames(EMCState *script) { if (voiceSync) { uint32 voicePlayedTime = _sound->voicePlayedTime(_speechFile.c_str()); - if (voicePlayedTime >= (uint32)voiceTime) + if (voicePlayedTime >= voiceTime) voiceTime = 0; else voiceTime -= voicePlayedTime; - - if (!snd_voiceIsPlaying()) - voiceTime = 0; } waitTime = voiceTime / displayFrames; diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index 137956196f..f8e2e1f1e0 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -95,7 +95,7 @@ int32 Sound::voicePlay(const char *file, bool isSfx) { uint32 fileSize = 0; byte *fileData = _vm->resource()->fileData(filenamebuffer, &fileSize); if (!fileData) - return false; + return 0; Common::MemoryReadStream vocStream(fileData, fileSize); audioStream = Audio::makeVOCStream(vocStream); diff --git a/engines/kyra/sound_lok.cpp b/engines/kyra/sound_lok.cpp index b12b1fa800..8a1d16a6b1 100644 --- a/engines/kyra/sound_lok.cpp +++ b/engines/kyra/sound_lok.cpp @@ -80,4 +80,11 @@ void KyraEngine_LoK::snd_voiceWaitForFinish(bool ingame) { } } +uint32 KyraEngine_LoK::snd_getVoicePlayTime() { + debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_LoK::snd_getVoicePlayTime()"); + if (!snd_voiceIsPlaying()) + return 0; + return (_speechPlayTime != -1 ? _speechPlayTime : 0); +} + } // end of namespace Kyra -- cgit v1.2.3 From aba5082d192f04db6d23804a766dddbdcf98fa2d Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 24 May 2008 23:39:13 +0000 Subject: Implementation of AudioStream::getTotalPlayTime for FLAC and OGG/Vorbis streams. svn-id: r32263 --- sound/flac.cpp | 20 ++++++++++++++++++++ sound/vorbis.cpp | 8 ++++++++ 2 files changed, 28 insertions(+) diff --git a/sound/flac.cpp b/sound/flac.cpp index 8dc3586142..a43deedcfb 100644 --- a/sound/flac.cpp +++ b/sound/flac.cpp @@ -141,6 +141,26 @@ public: return _streaminfo.channels == 0 || (_lastSampleWritten && _sampleCache.bufFill == 0); } + int32 getTotalPlayTime() const { + int32 samples = 0; + + if (!_lastSample) { + if (!_streaminfo.total_samples) + return AudioStream::kUnknownPlayTime; + + samples = _streaminfo.total_samples - _firstSample; + } else { + samples = _lastSample - _firstSample - 1; + } + + const int32 rate = _streaminfo.sample_rate; + + int32 seconds = samples / rate; + int32 milliseconds = (1000 * (samples % rate)) / rate; + + return seconds * 1000 + milliseconds; + } + bool isStreamDecoderReady() const { return getStreamDecoderState() == FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC ; } protected: diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp index a4b0f854e9..971207b0be 100644 --- a/sound/vorbis.cpp +++ b/sound/vorbis.cpp @@ -118,6 +118,14 @@ public: bool isStereo() const { return _isStereo; } int getRate() const { return _rate; } + int32 getTotalPlayTime() const { +#ifdef USE_TREMOR + return _endTime - _startTime; +#else + return (int32)((_endTime - _startTime) * 1000.0); +#endif + } + protected: void refill(); }; -- cgit v1.2.3 From cff8ccccc92e28e6ffe861dafd55b007cc164be8 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 24 May 2008 23:49:15 +0000 Subject: Take numLoops in account for getTotalPlayTime in FLAC and OGG/Vorbis streams. svn-id: r32264 --- sound/flac.cpp | 4 +++- sound/vorbis.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/sound/flac.cpp b/sound/flac.cpp index a43deedcfb..7b424c1d76 100644 --- a/sound/flac.cpp +++ b/sound/flac.cpp @@ -90,6 +90,7 @@ protected: bool _disposeAfterUse; uint _numLoops; + const uint _totalNumLoops; ::FLAC__SeekableStreamDecoder *_decoder; @@ -158,7 +159,7 @@ public: int32 seconds = samples / rate; int32 milliseconds = (1000 * (samples % rate)) / rate; - return seconds * 1000 + milliseconds; + return (seconds * 1000 + milliseconds) * _totalNumLoops; } bool isStreamDecoderReady() const { return getStreamDecoderState() == FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC ; } @@ -210,6 +211,7 @@ FlacInputStream::FlacInputStream(Common::SeekableReadStream *inStream, bool disp _inStream(inStream), _disposeAfterUse(dispose), _numLoops(numLoops), + _totalNumLoops(numLoops), _firstSample(0), _lastSample(0), _outBuffer(NULL), _requestedSamples(0), _lastSampleWritten(false), _methodConvertBuffers(&FlacInputStream::convertBuffersGeneric) diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp index 971207b0be..8c12acc6e9 100644 --- a/sound/vorbis.cpp +++ b/sound/vorbis.cpp @@ -92,6 +92,7 @@ protected: bool _isStereo; int _rate; uint _numLoops; + const uint _totalNumLoops; #ifdef USE_TREMOR ogg_int64_t _startTime; @@ -120,9 +121,9 @@ public: int32 getTotalPlayTime() const { #ifdef USE_TREMOR - return _endTime - _startTime; + return (_endTime - _startTime) * _totalNumLoops; #else - return (int32)((_endTime - _startTime) * 1000.0); + return (int32)((_endTime - _startTime) * 1000.0) * _totalNumLoops; #endif } @@ -134,6 +135,7 @@ VorbisInputStream::VorbisInputStream(Common::SeekableReadStream *inStream, bool _inStream(inStream), _disposeAfterUse(dispose), _numLoops(numLoops), + _totalNumLoops(numLoops), _bufferEnd(_buffer + ARRAYSIZE(_buffer)) { bool err = (ov_open_callbacks(inStream, &_ovFile, NULL, 0, g_stream_wrap) < 0); -- cgit v1.2.3 From ff573ec1e214c233a530a96798c0b33738bd8467 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 24 May 2008 23:58:22 +0000 Subject: Instead of simply returning 0 for "infinite" looping in FLAC and OGG/Vorbis streams in getTotalPlayTime return kUnknownPlayTime. svn-id: r32265 --- sound/flac.cpp | 3 +++ sound/vorbis.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/sound/flac.cpp b/sound/flac.cpp index 7b424c1d76..acd0a9fef7 100644 --- a/sound/flac.cpp +++ b/sound/flac.cpp @@ -143,6 +143,9 @@ public: } int32 getTotalPlayTime() const { + if (!_totalNumLoops) + return AudioStream::kUnknownPlayTime; + int32 samples = 0; if (!_lastSample) { diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp index 8c12acc6e9..64f67d2a13 100644 --- a/sound/vorbis.cpp +++ b/sound/vorbis.cpp @@ -120,6 +120,9 @@ public: int getRate() const { return _rate; } int32 getTotalPlayTime() const { + if (!_totalNumLoops) + return AudioStream::kUnknownPlayTime; + #ifdef USE_TREMOR return (_endTime - _startTime) * _totalNumLoops; #else -- cgit v1.2.3 From 3f4d22338ed5b815a5a04cb74b473dc6b8b90c06 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 25 May 2008 06:25:16 +0000 Subject: Fixing Bug #1970111 ("WOODRUFF: Close Up not erased") svn-id: r32266 --- engines/gob/videoplayer.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index ebc4edfc27..4a337d48b4 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -602,20 +602,19 @@ void VideoPlayer::writeVideoInfo(const char *videoFile, int16 varX, int16 varY, if (primaryOpen(videoFile)) { int16 x, y, width, height; - if ((VAR_OFFSET(varX) != 0xFFFFFFFF) || - !_primaryVideo->getVideo()->getAnchor(1, 2, x, y, width, height)) { + x = _primaryVideo->getVideo()->getX(); + y = _primaryVideo->getVideo()->getY(); + width = _primaryVideo->getVideo()->getWidth(); + height = _primaryVideo->getVideo()->getHeight(); - x = _primaryVideo->getVideo()->getX(); - y = _primaryVideo->getVideo()->getY(); - width = _primaryVideo->getVideo()->getWidth(); - height = _primaryVideo->getVideo()->getHeight(); - } + if (VAR_OFFSET(varX) == 0xFFFFFFFF) + _primaryVideo->getVideo()->getAnchor(1, 2, x, y, width, height); WRITE_VAR_OFFSET(varX, x); WRITE_VAR_OFFSET(varY, y); WRITE_VAR_OFFSET(varFrames, _primaryVideo->getVideo()->getFramesCount()); WRITE_VAR_OFFSET(varWidth, width); - WRITE_VAR_OFFSET(varHeight, height); + WRITE_VARO_UINT16(varHeight & 0xFFFFFFFC, height); primaryClose(); } else { -- cgit v1.2.3 From da222b1a4827062a94ec4ac5147aab1778a0f4aa Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 25 May 2008 13:02:23 +0000 Subject: Added a workaround for the nut rolling animation in the administration center in Woodruff svn-id: r32269 --- engines/gob/inter_v2.cpp | 6 ++++++ engines/gob/inter_v4.cpp | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index 6b7607791e..db79971d88 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1581,6 +1581,12 @@ void Inter_v2::o2_getImdInfo() { varWidth = _vm->_parse->parseVarIndex(); varHeight = _vm->_parse->parseVarIndex(); + // WORKAROUND: The nut rolling animation in the administration center + // in Woodruff is called "noixroul", but the scripts think it's "noixroule". + if ((_vm->getGameType() == kGameTypeWoodruff) && + (!scumm_stricmp(_vm->_global->_inter_resStr, "noixroule"))) + strcpy(_vm->_global->_inter_resStr, "noixroul"); + _vm->_vidPlayer->writeVideoInfo(_vm->_global->_inter_resStr, varX, varY, varFrames, varWidth, varHeight); } diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp index bc92fbf2b0..4c7c29255c 100644 --- a/engines/gob/inter_v4.cpp +++ b/engines/gob/inter_v4.cpp @@ -811,6 +811,12 @@ void Inter_v4::o4_playVmdOrMusic() { evalExpr(0); strncpy0(fileName, _vm->_global->_inter_resStr, 127); + // WORKAROUND: The nut rolling animation in the administration center + // in Woodruff is called "noixroul", but the scripts think it's "noixroule". + if ((_vm->getGameType() == kGameTypeWoodruff) && + (!scumm_stricmp(fileName, "noixroule"))) + strcpy(fileName, "noixroul"); + x = _vm->_parse->parseValExpr(); y = _vm->_parse->parseValExpr(); startFrame = _vm->_parse->parseValExpr(); -- cgit v1.2.3 From 48d3b34a75ad3a1c35e7efa7eaa1361f8b564afc Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sun, 25 May 2008 13:30:18 +0000 Subject: - some pauseEngineIntern() code for the HOF sequence player (not tested) svn-id: r32270 --- engines/kyra/kyra_hof.cpp | 33 +++++++++++++ engines/kyra/kyra_hof.h | 9 ++-- engines/kyra/kyra_v2.cpp | 2 +- engines/kyra/resource.cpp | 1 - engines/kyra/sequences_hof.cpp | 102 ++++++++++++++++++++--------------------- 5 files changed, 91 insertions(+), 56 deletions(-) diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 09388fb567..277b6532c8 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -177,6 +177,39 @@ KyraEngine_HoF::~KyraEngine_HoF() { _timOpcodes.clear(); } +void KyraEngine_HoF::pauseEngineIntern(bool pause) { + KyraEngine_v2::pauseEngineIntern(pause); + + if (!pause) { + uint32 pausedTime = _system->getMillis() - _pauseStart; + _pauseStart = 0; + + // sequence player + // + // Timers in KyraEngine_HoF::seq_cmpFadeFrame() and KyraEngine_HoF::seq_animatedSubFrame() + // have been left out for now. I think we don't need them here. + + _seqStartTime += pausedTime; + _seqSubFrameStartTime += pausedTime; + _seqEndTime += pausedTime; + _seqSubFrameEndTimeInternal += pausedTime; + _seqWsaChatTimeout += pausedTime; + _seqWsaChatFrameTimeout += pausedTime; + + for (int x = 0; x < 10; x++) { + if (_activeText[x].duration != -1) + _activeText[x].startTime += pausedTime; + } + + for (int x = 0; x < 8; x++) { + if (_activeWSA[x].flags == -1) + _activeWSA[x].nextFrame += pausedTime; + } + + // TODO: item animation, idle animation, tim player, etc + } +} + int KyraEngine_HoF::init() { _screen = new Screen_HoF(this, _system); assert(_screen); diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h index 4eac124c45..866dd55d16 100644 --- a/engines/kyra/kyra_hof.h +++ b/engines/kyra/kyra_hof.h @@ -182,9 +182,7 @@ public: KyraEngine_HoF(OSystem *system, const GameFlags &flags); ~KyraEngine_HoF(); - //TODO: proper extended implementation of KyraEngine_v2::pauseEngineIntern. - // Here we need to take care of the seqeunce play code (LordHoto *thinks*), - // item animation, idle animation and tim player. + void pauseEngineIntern(bool pause); Screen *screen() { return _screen; } Screen_v2 *screen_v2() const { return _screen; } @@ -860,7 +858,12 @@ protected: uint32 _seqFrameDelay; uint32 _seqStartTime; + uint32 _seqSubFrameStartTime; uint32 _seqEndTime; + uint32 _seqSubFrameEndTimeInternal; + uint32 _seqWsaChatTimeout; + uint32 _seqWsaChatFrameTimeout; + int _seqFrameCounter; int _seqScrollTextCounter; int _seqWsaCurrentFrame; diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp index eade621baa..12da338843 100644 --- a/engines/kyra/kyra_v2.cpp +++ b/engines/kyra/kyra_v2.cpp @@ -100,12 +100,12 @@ void KyraEngine_v2::pauseEngineIntern(bool pause) { if (!pause) { uint32 pausedTime = _system->getMillis() - _pauseStart; - _pauseStart = 0; for (int i = 0; i < ARRAYSIZE(_sceneSpecialScriptsTimer); ++i) { if (_sceneSpecialScriptsTimer[i]) _sceneSpecialScriptsTimer[i] += pausedTime; } + } else { _pauseStart = _system->getMillis(); } diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 6fa256ce40..6b38a0f907 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -819,7 +819,6 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32 postprocess = false; needrefresh = true; } else if (mode == 0){ - // uint16 cnt = 144; uint8 *d2 = _tables[0]; memset(d2, 8, 144); memset(d2 + 144, 9, 112); diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index f44484cc8e..0751fc15db 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -231,7 +231,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { _seqFrameDelay = cseq.frameDelay; _seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength; while (!((skipFlag() && allowSkip) || _quitFlag || (_abortIntroFlag && allowSkip) || _menuChoice)) { - uint32 starttime = _system->getMillis(); + _seqSubFrameStartTime = _system->getMillis(); seq_processWSAs(); if (cb) (this->*cb)(0, 0, 0, 0); @@ -246,8 +246,8 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { if (now >= _seqEndTime && !_seqSubframePlaying) break; - uint32 tdiff = _seqEndTime - starttime; - int32 dly = _tickLength - (now - starttime); + uint32 tdiff = _seqEndTime - _seqSubFrameStartTime; + int32 dly = _tickLength - (now - _seqSubFrameStartTime); if (dly > 0) delay(MIN(dly, tdiff)); } @@ -263,7 +263,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { _seqEndTime = _system->getMillis() + dl; while (!((skipFlag() && allowSkip) || _quitFlag || (_abortIntroFlag && allowSkip) || _menuChoice)) { - uint32 starttime = _system->getMillis(); + _seqSubFrameStartTime = _system->getMillis(); seq_processWSAs(); _screen->copyPage(2, 0); @@ -275,8 +275,8 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { break; } - uint32 tdiff = _seqEndTime - starttime; - int32 dly = _tickLength - (now - starttime); + uint32 tdiff = _seqEndTime - _seqSubFrameStartTime; + int32 dly = _tickLength - (now - _seqSubFrameStartTime); if (dly > 0) delay(MIN(dly, tdiff)); } @@ -289,13 +289,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { _sound->voiceStop(); } - if (_flags.isDemo && !_flags.isTalkie) { - if (seqNum == kSequenceDemoFisher) { - _abortIntroFlag = false; - resetSkipFlag(); - seqNum = kSequenceDemoVirgin; - } - } else { + if (!_flags.isDemo || _flags.isTalkie) { if ((seqNum != kSequenceTitle && seqNum < kSequenceZanfaun && (_abortIntroFlag || skipFlag())) || seqNum == kSequenceZanfaun) { _abortIntroFlag = false; @@ -319,8 +313,13 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { } } + if (_flags.isDemo && !_flags.isTalkie) { + _eventList.clear(); + _screen->fadeToBlack(); + } + if (!_menuChoice) - delay(1000); + delay(1200); _screen->setCurPage(oldPage); _screen->showMouse(); @@ -375,13 +374,14 @@ int KyraEngine_HoF::seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm uint8 *tmpPal = &(_screen->getPalette(3)[0x101]); memset(tmpPal, 0, 256); - uint32 endtime = 0, now = 0; + _seqSubFrameEndTimeInternal = 0; + uint32 now = 0; switch (_seqFrameCounter) { case 0: _seqSubframePlaying = true; _sound->playTrack(4); - endtime = _system->getMillis() + 60 * _tickLength; + _seqSubFrameEndTimeInternal = _system->getMillis() + 60 * _tickLength; _seqTextColor[1] = _screen->findLeastDifferentColor(_seqTextColorPresets, _screen->getPalette(0) + 3, 255) & 0xff; memset(_seqTextColorMap, _seqTextColor[1], 16); @@ -390,8 +390,8 @@ int KyraEngine_HoF::seq_introOverview(WSAMovie_v2 *wsaObj, int x, int y, int frm _screen->setTextColorMap(_seqTextColorMap); now = _system->getMillis(); - if (endtime > now) - delay(endtime - now); + if (_seqSubFrameEndTimeInternal > now) + delay(_seqSubFrameEndTimeInternal - now); break; case 1: @@ -830,7 +830,7 @@ int KyraEngine_HoF::seq_introHand3(WSAMovie_v2 *wsaObj, int x, int y, int frm) { } int KyraEngine_HoF::seq_finaleFunters(WSAMovie_v2 *wsaObj, int x, int y, int frm) { - uint32 endtime = 0; + _seqSubFrameEndTimeInternal = 0; int chatX = 0; int chatY = 0; int chatW = 0; @@ -851,12 +851,12 @@ int KyraEngine_HoF::seq_finaleFunters(WSAMovie_v2 *wsaObj, int x, int y, int frm _seqTextColor[0] = _seqTextColorMap[1] = 0xff; _screen->setTextColorMap(_seqTextColorMap); - endtime = _system->getMillis() + 480 * _tickLength; + _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength; seq_printCreditsString(81, 240, 70, _seqTextColorMap, 252); seq_printCreditsString(82, 240, 90, _seqTextColorMap, _seqTextColor[0]); _screen->copyPage(2, 12); seq_playTalkText(_flags.isTalkie ? 28 : 24); - delay(endtime - _system->getMillis()); + delay(_seqSubFrameEndTimeInternal - _system->getMillis()); _seqTextColor[0] = 1; if (_flags.isTalkie) { @@ -914,7 +914,7 @@ int KyraEngine_HoF::seq_finaleFunters(WSAMovie_v2 *wsaObj, int x, int y, int frm } int KyraEngine_HoF::seq_finaleFerb(WSAMovie_v2 *wsaObj, int x, int y, int frm) { - uint32 endtime = 0; + _seqSubFrameEndTimeInternal = 0; int chatX = 0; int chatY = 0; int chatW = 0; @@ -925,7 +925,7 @@ int KyraEngine_HoF::seq_finaleFerb(WSAMovie_v2 *wsaObj, int x, int y, int frm) { switch (frm) { case -2: seq_sequenceCommand(9); - endtime = _system->getMillis() + 480 * _tickLength; + _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength; seq_printCreditsString(34, 240, _flags.isTalkie ? 60 : 40, _seqTextColorMap, 252); seq_printCreditsString(35, 240, _flags.isTalkie ? 70 : 50, _seqTextColorMap, _seqTextColor[0]); seq_printCreditsString(36, 240, _flags.isTalkie ? 90 : 70, _seqTextColorMap, 252); @@ -934,7 +934,7 @@ int KyraEngine_HoF::seq_finaleFerb(WSAMovie_v2 *wsaObj, int x, int y, int frm) { seq_printCreditsString(39, 240, _flags.isTalkie ? 130 : 120, _seqTextColorMap, _seqTextColor[0]); if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) seq_printCreditsString(103, 240, 130, _seqTextColorMap, _seqTextColor[0]); - delay(endtime - _system->getMillis()); + delay(_seqSubFrameEndTimeInternal - _system->getMillis()); _seqEndTime = 0; break; @@ -998,7 +998,7 @@ int KyraEngine_HoF::seq_finaleFerb(WSAMovie_v2 *wsaObj, int x, int y, int frm) { } int KyraEngine_HoF::seq_finaleFish(WSAMovie_v2 *wsaObj, int x, int y, int frm) { - uint32 endtime = 0; + _seqSubFrameEndTimeInternal = 0; int chatX = 0; int chatY = 0; int chatW = 0; @@ -1007,7 +1007,7 @@ int KyraEngine_HoF::seq_finaleFish(WSAMovie_v2 *wsaObj, int x, int y, int frm) { switch (frm) { case -2: seq_sequenceCommand(9); - endtime = _system->getMillis() + 480 * _tickLength; + _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength; seq_printCreditsString(40, 240, _flags.isTalkie ? 55 : 40, _seqTextColorMap, 252); seq_printCreditsString(41, 240, _flags.isTalkie ? 65 : 50, _seqTextColorMap, _seqTextColor[0]); @@ -1016,7 +1016,7 @@ int KyraEngine_HoF::seq_finaleFish(WSAMovie_v2 *wsaObj, int x, int y, int frm) { seq_printCreditsString(44, 240, _flags.isTalkie ? 105 : 90, _seqTextColorMap, _seqTextColor[0]); seq_printCreditsString(93, 240, _flags.isTalkie ? 125 : 110, _seqTextColorMap, 252); seq_printCreditsString(94, 240, _flags.isTalkie ? 135 : 120, _seqTextColorMap, _seqTextColor[0]); - delay(endtime - _system->getMillis()); + delay(_seqSubFrameEndTimeInternal - _system->getMillis()); _seqEndTime = 0; break; @@ -1075,7 +1075,7 @@ int KyraEngine_HoF::seq_finaleFish(WSAMovie_v2 *wsaObj, int x, int y, int frm) { } int KyraEngine_HoF::seq_finaleFheep(WSAMovie_v2 *wsaObj, int x, int y, int frm) { - uint32 endtime = 0; + _seqSubFrameEndTimeInternal = 0; int chatX = 0; int chatY = 0; int chatW = 0; @@ -1089,7 +1089,7 @@ int KyraEngine_HoF::seq_finaleFheep(WSAMovie_v2 *wsaObj, int x, int y, int frm) _screen->copyPage(2, 0); _screen->updateScreen(); seq_sequenceCommand(9); - endtime = _system->getMillis() + 480 * _tickLength; + _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength; seq_printCreditsString(49, 240, 20, _seqTextColorMap, 252); seq_printCreditsString(50, 240, 30, _seqTextColorMap, _seqTextColor[0]); seq_printCreditsString(51, 240, 40, _seqTextColorMap, _seqTextColor[0]); @@ -1106,7 +1106,7 @@ int KyraEngine_HoF::seq_finaleFheep(WSAMovie_v2 *wsaObj, int x, int y, int frm) seq_printCreditsString(63, 240, 150, _seqTextColorMap, _seqTextColor[0]); seq_printCreditsString(64, 240, 160, _seqTextColorMap, _seqTextColor[0]); - delay(endtime - _system->getMillis()); + delay(_seqSubFrameEndTimeInternal - _system->getMillis()); _seqEndTime = 0; break; @@ -1157,7 +1157,7 @@ int KyraEngine_HoF::seq_finaleFheep(WSAMovie_v2 *wsaObj, int x, int y, int frm) } int KyraEngine_HoF::seq_finaleFarmer(WSAMovie_v2 *wsaObj, int x, int y, int frm) { - uint32 endtime = 0; + _seqSubFrameEndTimeInternal = 0; int chatX = 0; int chatY = 0; int chatW = 0; @@ -1169,7 +1169,7 @@ int KyraEngine_HoF::seq_finaleFarmer(WSAMovie_v2 *wsaObj, int x, int y, int frm) _screen->copyPage(2, 0); _screen->updateScreen(); seq_sequenceCommand(9); - endtime = _system->getMillis() + 480 * _tickLength; + _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength; seq_printCreditsString(45, 240, 40, _seqTextColorMap, 252); seq_printCreditsString(46, 240, 50, _seqTextColorMap, _seqTextColor[0]); seq_printCreditsString(47, 240, 60, _seqTextColorMap, _seqTextColor[0]); @@ -1182,7 +1182,7 @@ int KyraEngine_HoF::seq_finaleFarmer(WSAMovie_v2 *wsaObj, int x, int y, int frm) seq_printCreditsString(69, 240, 150, _seqTextColorMap, _seqTextColor[0]); if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98) seq_printCreditsString(104, 240, 160, _seqTextColorMap, _seqTextColor[0]); - delay(endtime - _system->getMillis()); + delay(_seqSubFrameEndTimeInternal - _system->getMillis()); _seqEndTime = 0; break; @@ -1227,7 +1227,7 @@ int KyraEngine_HoF::seq_finaleFarmer(WSAMovie_v2 *wsaObj, int x, int y, int frm) } int KyraEngine_HoF::seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm) { - uint32 endtime = 0; + _seqSubFrameEndTimeInternal = 0; int chatX = 0; int chatY = 0; int chatW = 0; @@ -1240,7 +1240,7 @@ int KyraEngine_HoF::seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm) switch (frm) { case -2: seq_sequenceCommand(9); - endtime = _system->getMillis() + 480 * _tickLength; + _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength; seq_printCreditsString(70, 240, 20, _seqTextColorMap, 252); seq_printCreditsString(71, 240, 30, _seqTextColorMap, _seqTextColor[0]); seq_printCreditsString(72, 240, 40, _seqTextColorMap, _seqTextColor[0]); @@ -1255,7 +1255,7 @@ int KyraEngine_HoF::seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm) seq_printCreditsString(90, 240, 130, _seqTextColorMap, _seqTextColor[0]); seq_printCreditsString(91, 240, 140, _seqTextColorMap, _seqTextColor[0]); seq_printCreditsString(92, 240, 150, _seqTextColorMap, _seqTextColor[0]); - delay(endtime - _system->getMillis()); + delay(_seqSubFrameEndTimeInternal - _system->getMillis()); _seqEndTime = 0; break; @@ -1327,7 +1327,7 @@ int KyraEngine_HoF::seq_finaleFuards(WSAMovie_v2 *wsaObj, int x, int y, int frm) } int KyraEngine_HoF::seq_finaleFirates(WSAMovie_v2 *wsaObj, int x, int y, int frm) { - uint32 endtime = 0; + _seqSubFrameEndTimeInternal = 0; int chatX = 0; int chatY = 0; int chatW = 0; @@ -1339,7 +1339,7 @@ int KyraEngine_HoF::seq_finaleFirates(WSAMovie_v2 *wsaObj, int x, int y, int frm _screen->copyPage(2, 0); _screen->updateScreen(); seq_sequenceCommand(9); - endtime = _system->getMillis() + 480 * _tickLength; + _seqSubFrameEndTimeInternal = _system->getMillis() + 480 * _tickLength; seq_printCreditsString(76, 240, 40, _seqTextColorMap, 252); seq_printCreditsString(77, 240, 50, _seqTextColorMap, 252); seq_printCreditsString(78, 240, 60, _seqTextColorMap, _seqTextColor[0]); @@ -1349,7 +1349,7 @@ int KyraEngine_HoF::seq_finaleFirates(WSAMovie_v2 *wsaObj, int x, int y, int frm seq_printCreditsString(85, 240, 110, _seqTextColorMap, _seqTextColor[0]); seq_printCreditsString(99, 240, 130, _seqTextColorMap, 252); seq_printCreditsString(100, 240, 140, _seqTextColorMap, _seqTextColor[0]); - delay(endtime - _system->getMillis()); + delay(_seqSubFrameEndTimeInternal - _system->getMillis()); _seqEndTime = 0; break; @@ -1811,7 +1811,7 @@ uint32 KyraEngine_HoF::seq_activeTextsTimeLeft() { } void KyraEngine_HoF::seq_processWSAs() { - for (int i = 0; i < 8; i++) { + for (int i = 0; i < 8; i++) { if (_activeWSA[i].flags != -1) { if (seq_processNextSubFrame(i)) seq_resetActiveWSA(i); @@ -2334,7 +2334,7 @@ void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, i int dur = int(strlen(_sequenceStrings[strIndex])) * (_flags.isTalkie ? 7 : 15); int entry = textEnabled() ? seq_setTextEntry(strIndex, x, y, dur, width) : strIndex; _activeText[entry].textcolor = textColor; - uint32 chatTimeout = _system->getMillis() + dur * _tickLength; + _seqWsaChatTimeout = _system->getMillis() + dur * _tickLength; int curframe = firstframe; if (vocIndex && speechEnabled()) { @@ -2343,7 +2343,7 @@ void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, i seq_playTalkText(vocIndex); } - while (_system->getMillis() < chatTimeout && !(_abortIntroFlag || skipFlag())) { + while (_system->getMillis() < _seqWsaChatTimeout && !(_abortIntroFlag || skipFlag())) { if (lastframe < 0) { int t = ABS(lastframe); if (t < curframe) @@ -2353,7 +2353,7 @@ void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, i if (ABS(lastframe) < curframe) curframe = firstframe; - uint32 frameTimeout = _seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength; + _seqWsaChatFrameTimeout = _seqEndTime = _system->getMillis() + _seqFrameDelay * _tickLength; if (wsa) { wsa->setDrawPage(2); wsa->setX(wsaXpos); @@ -2366,8 +2366,8 @@ void KyraEngine_HoF::seq_playWsaSyncDialogue(uint16 strIndex, uint16 vocIndex, i seq_processText(); uint32 tm = _system->getMillis(); - if (frameTimeout > tm && chatTimeout > tm) - delay(MIN(frameTimeout - tm, chatTimeout - tm)); + if (_seqWsaChatFrameTimeout > tm && _seqWsaChatTimeout > tm) + delay(MIN(_seqWsaChatFrameTimeout - tm, _seqWsaChatTimeout - tm)); if (speechEnabled() && !textEnabled() && !snd_voiceIsPlaying()) break; @@ -2426,7 +2426,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int int cnt = 0; while (loop) { - uint32 endTime = _system->getMillis() + speed * _tickLength; + _seqSubFrameEndTimeInternal = _system->getMillis() + speed * _tickLength; while (cnt < 35 && *ptr) { uint16 cH; @@ -2552,7 +2552,7 @@ void KyraEngine_HoF::seq_displayScrollText(uint8 *data, const ScreenDim *d, int _screen->setScreenPalette(_screen->_currentPalette); } - delayUntil(endTime); + delayUntil(_seqSubFrameEndTimeInternal); if ((cnt < 36) && ((d->sy + d->h) > (textData[cnt].y + textData[cnt].height)) && !skipFlag()) { resetSkipFlag(); @@ -2621,20 +2621,20 @@ void KyraEngine_HoF::seq_showStarcraftLogo() { _screen->copyPage(2, 0); _screen->fadeFromBlack(); for (int i = 1; i < endframe; i++) { - uint32 endTime = _system->getMillis() + 50; + _seqEndTime = _system->getMillis() + 50; if (skipFlag()) break; ci->displayFrame(i, 0); _screen->copyPage(2, 0); _screen->updateScreen(); - delay(endTime - _system->getMillis()); + delay(_seqEndTime - _system->getMillis()); } if(!skipFlag()) { - uint32 endTime = _system->getMillis() + 50; + _seqEndTime = _system->getMillis() + 50; ci->displayFrame(0, 0); _screen->copyPage(2, 0); _screen->updateScreen(); - delay(endTime - _system->getMillis()); + delay(_seqEndTime - _system->getMillis()); } _screen->fadeToBlack(); _screen->showMouse(); -- cgit v1.2.3 From 1509a17d3ac30e5ca33c7ee88d7a20200d25debf Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sun, 25 May 2008 14:39:59 +0000 Subject: typo svn-id: r32271 --- engines/kyra/kyra_hof.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 277b6532c8..9c5548c1f7 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -202,7 +202,7 @@ void KyraEngine_HoF::pauseEngineIntern(bool pause) { } for (int x = 0; x < 8; x++) { - if (_activeWSA[x].flags == -1) + if (_activeWSA[x].flags != -1) _activeWSA[x].nextFrame += pausedTime; } -- cgit v1.2.3 From 1fcf93875ec583c23232088cac3ad15c254bfccc Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 25 May 2008 22:46:16 +0000 Subject: Fixed the small static sound in Woodruff's intro video. Interestingly, this does _not_ fix the audio lag, so I was apparently wrong and it's another issue. *g* This does however fix the glitches in the Last Dynasty intro. svn-id: r32273 --- engines/gob/coktelvideo.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp index 729927eb94..ef89bc2c19 100644 --- a/engines/gob/coktelvideo.cpp +++ b/engines/gob/coktelvideo.cpp @@ -1133,6 +1133,8 @@ CoktelVideo::State Vmd::processFrame(uint16 frame) { } else if (part.type == kPartTypeVideo) { state.flags &= ~kStateNoVideoData; + uint32 size = part.size; + // New palette if (part.flags & 2) { uint8 index = _stream->readByte(); @@ -1142,9 +1144,12 @@ CoktelVideo::State Vmd::processFrame(uint16 frame) { _stream->skip((255 - count) * 3); state.flags |= kStatePalette; + + size -= (768 + 2); } - _stream->read(_frameData, part.size); + _stream->read(_frameData, size); + if (renderFrame(part.left, part.top, part.right, part.bottom)) { // Rendering succeeded, merging areas state.left = MIN(state.left, part.left); -- cgit v1.2.3 From 6ef8e5238bf33205e4945334987aafe0f43a8405 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 25 May 2008 23:12:32 +0000 Subject: Increased _soundSliceLength's accuracy. This fixes the A/V sync problems in Woodruff's intro svn-id: r32274 --- engines/gob/coktelvideo.cpp | 14 +++++++------- engines/gob/coktelvideo.h | 8 ++++++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp index ef89bc2c19..be639fae9f 100644 --- a/engines/gob/coktelvideo.cpp +++ b/engines/gob/coktelvideo.cpp @@ -123,8 +123,9 @@ bool Imd::load(Common::SeekableReadStream &stream) { return false; } - _soundSliceLength = 1000 / (_soundFreq / _soundSliceSize); - _frameLength = _soundSliceLength; + _soundSliceLength = (uint32) (((double) (1000 << 16)) / + ((double) _soundFreq / (double) _soundSliceSize)); + _frameLength = _soundSliceLength >> 16; _soundStage = 1; _hasSound = true; @@ -325,8 +326,8 @@ void Imd::waitEndFrame() { return; if (_skipFrames == 0) { - int32 waitTime = (_curFrame * _soundSliceLength) - - (g_system->getMillis() - _soundStartTime); + int32 waitTime = ((_curFrame * _soundSliceLength) - + ((g_system->getMillis() - _soundStartTime) << 16)) >> 16; if (waitTime < 0) { _skipFrames = -waitTime / _soundSliceLength; @@ -943,10 +944,9 @@ bool Vmd::load(Common::SeekableReadStream &stream) { _soundSliceSize = -_soundSliceSize; } - _soundSliceLength = (uint16) (1000.0 / + _soundSliceLength = (uint32) (((double) (1000 << 16)) / ((double) _soundFreq / (double) _soundSliceSize)); - - _frameLength = _soundSliceLength; + _frameLength = _soundSliceLength >> 16; _soundStage = 1; _audioStream = Audio::makeAppendableAudioStream(_soundFreq, diff --git a/engines/gob/coktelvideo.h b/engines/gob/coktelvideo.h index 31b220cd56..348e5e3ab1 100644 --- a/engines/gob/coktelvideo.h +++ b/engines/gob/coktelvideo.h @@ -190,7 +190,11 @@ public: int16 getHeight() const { return _height; } uint16 getFramesCount() const { return _framesCount; } uint16 getCurrentFrame() const { return _curFrame; } - int16 getFrameRate() const { if (_hasSound) return 1000 / _soundSliceLength; return _frameRate; } + int16 getFrameRate() const { + if (_hasSound) + return 1000 / (_soundSliceLength >> 16); + return _frameRate; + } uint32 getSyncLag() const { return _skipFrames; } const byte *getPalette() const { return _palette; } @@ -260,7 +264,7 @@ protected: int16 _soundFreq; int16 _soundSliceSize; int16 _soundSlicesCount; - uint16 _soundSliceLength; + uint32 _soundSliceLength; Audio::AppendableAudioStream *_audioStream; Audio::SoundHandle _audioHandle; -- cgit v1.2.3 From 2862a30dac114fd728e80669a15f315fe21bc8d6 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 26 May 2008 00:28:48 +0000 Subject: Fixed some code formatting thanks to LordHoto svn-id: r32275 --- base/commandLine.cpp | 4 ++-- base/plugins.cpp | 20 ++++++++++---------- base/plugins.h | 4 ++-- engines/metaengine.h | 2 +- gui/about.cpp | 4 ++-- sound/midiplugin.h | 2 +- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 96ed6c89f1..b9fd4ecfb7 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -564,8 +564,8 @@ static void listGames() { printf("Game ID Full Title \n" "-------------------- ------------------------------------------------------\n"); - const EnginePlugin::list &plugins = EngineMan.getPlugins(); - EnginePlugin::list::const_iterator iter = plugins.begin(); + const EnginePlugin::List &plugins = EngineMan.getPlugins(); + EnginePlugin::List::const_iterator iter = plugins.begin(); for (iter = plugins.begin(); iter != plugins.end(); ++iter) { GameList list = (**iter)->getSupportedGames(); for (GameList::iterator v = list.begin(); v != list.end(); ++v) { diff --git a/base/plugins.cpp b/base/plugins.cpp index ac8e498469..435e5bf1f1 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -284,7 +284,7 @@ void PluginManager::loadPlugins() { for (ProviderList::iterator pp = _providers.begin(); pp != _providers.end(); ++pp) { - PluginList pl((**pp).getPlugins()); + PluginList pl((*pp)->getPlugins()); for (PluginList::iterator plugin = pl.begin(); plugin != pl.end(); ++plugin) { tryLoadPlugin(*plugin); } @@ -303,7 +303,7 @@ void PluginManager::unloadPluginsExcept(PluginType type, const Plugin *plugin) { if (*p == plugin) { found = *p; } else { - (**p).unloadPlugin(); + (*p)->unloadPlugin(); delete *p; } } @@ -355,13 +355,13 @@ DECLARE_SINGLETON(EngineManager); GameDescriptor EngineManager::findGame(const Common::String &gameName, const EnginePlugin **plugin) const { // Find the GameDescriptor for this target - const EnginePlugin::list &plugins = getPlugins(); + const EnginePlugin::List &plugins = getPlugins(); GameDescriptor result; if (plugin) *plugin = 0; - EnginePlugin::list::const_iterator iter = plugins.begin(); + EnginePlugin::List::const_iterator iter = plugins.begin(); for (iter = plugins.begin(); iter != plugins.end(); ++iter) { result = (**iter)->findGame(gameName.c_str()); if (!result.gameid().empty()) { @@ -376,11 +376,11 @@ GameDescriptor EngineManager::findGame(const Common::String &gameName, const Eng GameList EngineManager::detectGames(const FSList &fslist) const { GameList candidates; - const EnginePlugin::list &plugins = getPlugins(); + const EnginePlugin::List &plugins = getPlugins(); // Iterate over all known games and for each check if it might be // the game in the presented directory. - EnginePlugin::list::const_iterator iter; + EnginePlugin::List::const_iterator iter; for (iter = plugins.begin(); iter != plugins.end(); ++iter) { candidates.push_back((**iter)->detectGames(fslist)); } @@ -388,8 +388,8 @@ GameList EngineManager::detectGames(const FSList &fslist) const { return candidates; } -const EnginePlugin::list &EngineManager::getPlugins() const { - return (const EnginePlugin::list&)PluginManager::instance().getPlugins(PLUGIN_TYPE_ENGINE); +const EnginePlugin::List &EngineManager::getPlugins() const { + return (const EnginePlugin::List &)PluginManager::instance().getPlugins(PLUGIN_TYPE_ENGINE); } @@ -399,6 +399,6 @@ const EnginePlugin::list &EngineManager::getPlugins() const { DECLARE_SINGLETON(MidiManager); -const MidiPlugin::list &MidiManager::getPlugins() const { - return (const MidiPlugin::list&)PluginManager::instance().getPlugins(PLUGIN_TYPE_MIDI); +const MidiPlugin::List &MidiManager::getPlugins() const { + return (const MidiPlugin::List &)PluginManager::instance().getPlugins(PLUGIN_TYPE_MIDI); } diff --git a/base/plugins.h b/base/plugins.h index 20469e67bd..7507e0c358 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -193,7 +193,7 @@ public: return (PO_t *)_pluginObject; } - typedef Common::Array list; + typedef Common::Array List; }; /** @@ -246,7 +246,7 @@ protected: * @param filename the name of the loadable code module * @return a pointer to a Plugin instance, or 0 if an error occurred. */ - virtual Plugin* createPlugin(const Common::String &filename) const = 0; + virtual Plugin *createPlugin(const Common::String &filename) const = 0; /** * Check if the supplied filename corresponds to a loadable plugin file in diff --git a/engines/metaengine.h b/engines/metaengine.h index c5fb006faa..aef860e0f9 100644 --- a/engines/metaengine.h +++ b/engines/metaengine.h @@ -108,7 +108,7 @@ private: public: GameDescriptor findGame(const Common::String &gameName, const EnginePlugin **plugin = NULL) const; GameList detectGames(const FSList &fslist) const; - const EnginePlugin::list &getPlugins() const; + const EnginePlugin::List &getPlugins() const; }; /** Convenience shortcut for accessing the engine manager. */ diff --git a/gui/about.cpp b/gui/about.cpp index 2afaae9a97..758f3ee6a7 100644 --- a/gui/about.cpp +++ b/gui/about.cpp @@ -128,8 +128,8 @@ AboutDialog::AboutDialog() _lines.push_back(""); addLine("\\C\\c1""Available engines:"); - const EnginePlugin::list &plugins = EngineMan.getPlugins(); - EnginePlugin::list::const_iterator iter = plugins.begin(); + const EnginePlugin::List &plugins = EngineMan.getPlugins(); + EnginePlugin::List::const_iterator iter = plugins.begin(); for (; iter != plugins.end(); ++iter) { Common::String str; str = "\\C"; diff --git a/sound/midiplugin.h b/sound/midiplugin.h index c3b407a142..0247e160e1 100644 --- a/sound/midiplugin.h +++ b/sound/midiplugin.h @@ -84,7 +84,7 @@ private: friend class Common::Singleton; public: - const MidiPlugin::list &getPlugins() const; + const MidiPlugin::List &getPlugins() const; }; /** Convenience shortcut for accessing the MIDI manager. */ -- cgit v1.2.3 From d94bfc66ad903b3c2cd677e1d481bca69f70eb12 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 26 May 2008 05:17:21 +0000 Subject: Ooops, made frame skipping for A/V sync correction work again (instead of locking up) svn-id: r32276 --- engines/gob/coktelvideo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/gob/coktelvideo.cpp b/engines/gob/coktelvideo.cpp index be639fae9f..415790e67b 100644 --- a/engines/gob/coktelvideo.cpp +++ b/engines/gob/coktelvideo.cpp @@ -326,11 +326,11 @@ void Imd::waitEndFrame() { return; if (_skipFrames == 0) { - int32 waitTime = ((_curFrame * _soundSliceLength) - - ((g_system->getMillis() - _soundStartTime) << 16)) >> 16; + int32 waitTime = (int16) (((_curFrame * _soundSliceLength) - + ((g_system->getMillis() - _soundStartTime) << 16)) >> 16); if (waitTime < 0) { - _skipFrames = -waitTime / _soundSliceLength; + _skipFrames = -waitTime / (_soundSliceLength >> 16); warning("Video A/V sync broken, skipping %d frame(s)", _skipFrames + 1); } else if (waitTime > 0) g_system->delayMillis(waitTime); -- cgit v1.2.3 From ba6f9ab9a889e0780a8e7fb9da20ada9610241c3 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 May 2008 07:18:06 +0000 Subject: Possible fix for bug #1949230: "M4: compilation error" svn-id: r32277 --- engines/m4/script.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/m4/script.h b/engines/m4/script.h index a59bf46e86..7215d57bbd 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(_scriptFile, _data[value.value]->offset)); + T* result = _dataCache->load(_scriptFile, _data[value.value]->offset); + return *result; } const char *getGlobalString(int index) const { -- cgit v1.2.3 From 365513d9e4ff94fb46790cde3470e2500d2f3c17 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 26 May 2008 07:20:23 +0000 Subject: Implemented visual effects 2 and 15 svn-id: r32278 --- engines/made/screenfx.cpp | 54 +++++++++++++++++++++++++++++++++++++++++------ engines/made/screenfx.h | 3 +++ 2 files changed, 51 insertions(+), 6 deletions(-) diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp index 79017cc0fb..b65c3db60c 100644 --- a/engines/made/screenfx.cpp +++ b/engines/made/screenfx.cpp @@ -64,6 +64,10 @@ void ScreenEffects::run(int16 effectNum, Graphics::Surface *surface, byte *palet vfx00(surface, palette, newPalette, colorCount); break; + case 2: + vfx02(surface, palette, newPalette, colorCount); + break; + case 9: // "Checkerboard" effect vfx09(surface, palette, newPalette, colorCount); break; @@ -80,6 +84,10 @@ void ScreenEffects::run(int16 effectNum, Graphics::Surface *surface, byte *palet vfx14(surface, palette, newPalette, colorCount); break; + case 15: + vfx15(surface, palette, newPalette, colorCount); + break; + case 17: // Palette fadeout/fadein vfx17(surface, palette, newPalette, colorCount); break; @@ -121,7 +129,7 @@ void ScreenEffects::setBlendedPalette(byte *palette, byte *newPalette, int color } } -void ScreenEffects::copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2) { +void ScreenEffects::copyFxRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2) { // TODO: Clean up @@ -197,18 +205,41 @@ void ScreenEffects::copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int } +void ScreenEffects::copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2) { + Graphics::Surface *vgaScreen = _screen->lockScreen(); + byte *source = (byte*)surface->getBasePtr(x1, y1); + byte *dest = (byte*)vgaScreen->getBasePtr(x1, y1); + for (int y = 0; y < y2 - y1; y++) { + memcpy(dest, source, x2 - x1); + dest += 320; + source += 320; + } + _screen->unlockScreen(); +} + // No effect void ScreenEffects::vfx00(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { setPalette(palette); _screen->showWorkScreen(); + // FIXME: For Manhole; causes sluggish mouse + _screen->updateScreenAndWait(100); +} + +void ScreenEffects::vfx02(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { + for (int x = 312; x >= 0; x -= 8) { + copyRect(surface, x, 0, x + 8, 200); + setBlendedPalette(palette, newPalette, colorCount, 312 - x, 312); + _screen->updateScreenAndWait(25); + } + setPalette(palette); } // "Checkerboard" effect void ScreenEffects::vfx09(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int i = 0; i < 8; i++) { - copyRect(surface, 0, 0, 320, 200); + copyFxRect(surface, 0, 0, 320, 200); for (int j = 0; j < 4; j++) { - setBlendedPalette(palette, newPalette, colorCount, i * 4 + j, 32); + setBlendedPalette(palette, newPalette, colorCount, i * 4 + j, 36/*FIX?*/); _screen->updateScreenAndWait(25); } } @@ -218,7 +249,7 @@ void ScreenEffects::vfx09(Graphics::Surface *surface, byte *palette, byte *newPa // "Screen wipe in", left to right void ScreenEffects::vfx10(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int x = -56; x < 312; x += 8) { - copyRect(surface, x, 0, x + 64, 200); + copyFxRect(surface, x, 0, x + 64, 200); setBlendedPalette(palette, newPalette, colorCount, x + 56, 368); _screen->updateScreenAndWait(25); } @@ -228,7 +259,7 @@ void ScreenEffects::vfx10(Graphics::Surface *surface, byte *palette, byte *newPa // "Screen wipe in", top to bottom void ScreenEffects::vfx12(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int y = -70; y < 312; y += 10) { - copyRect(surface, 0, y, 320, y + 80); + copyFxRect(surface, 0, y, 320, y + 80); setBlendedPalette(palette, newPalette, colorCount, y + 70, 260); _screen->updateScreenAndWait(25); } @@ -239,7 +270,7 @@ void ScreenEffects::vfx12(Graphics::Surface *surface, byte *palette, byte *newPa void ScreenEffects::vfx14(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { int16 x = 8, y = 5; for (int i = 0; i < 27; i++) { - copyRect(surface, 160 - x, 100 - y, 160 + x, 100 + y); + copyFxRect(surface, 160 - x, 100 - y, 160 + x, 100 + y); x += 8; y += 5; setBlendedPalette(palette, newPalette, colorCount, i, 27); @@ -248,6 +279,17 @@ void ScreenEffects::vfx14(Graphics::Surface *surface, byte *palette, byte *newPa setPalette(palette); } +void ScreenEffects::vfx15(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { + int16 x = 8; + for (int i = 0; i < 27; i++) { + copyFxRect(surface, 160 - x, 0, 160 + x, 200); + x += 8; + setBlendedPalette(palette, newPalette, colorCount, i, 27); + _screen->updateScreenAndWait(25); + } + setPalette(palette); +} + // Palette fadeout/fadein void ScreenEffects::vfx17(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { diff --git a/engines/made/screenfx.h b/engines/made/screenfx.h index f0e706318f..1c36b3e1f1 100644 --- a/engines/made/screenfx.h +++ b/engines/made/screenfx.h @@ -51,12 +51,15 @@ private: int16 vfxX1, vfxY1, vfxWidth, vfxHeight; void setPalette(byte *palette); void setBlendedPalette(byte *palette, byte *newPalette, int colorCount, int16 value, int16 maxValue); + void copyFxRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2); void copyRect(Graphics::Surface *surface, int16 x1, int16 y1, int16 x2, int16 y2); void vfx00(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); + void vfx02(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx09(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx10(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx12(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx14(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); + void vfx15(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx17(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); }; -- cgit v1.2.3 From aa02a6758a8c5933aca3d80b5d1c3a2af5c7f300 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 26 May 2008 07:27:46 +0000 Subject: - Hopefully fixed 'responsiveness' of the mouse cursor/event handling - Disabled auto dirty rects which caused major gfx problems - Added default mouse cursor for Manhole: N&E - Fixed sound rate for Manhole: N&E - Don't automatically show mouse cursor when a new cursor was loaded svn-id: r32279 --- engines/made/made.cpp | 16 +++++++++++----- engines/made/screen.cpp | 6 ++++++ engines/made/screen.h | 22 ++++++++++++++++++++++ engines/made/scriptfuncs.cpp | 4 +++- 4 files changed, 42 insertions(+), 6 deletions(-) diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 08d00af9f4..92efb881e2 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -109,7 +109,13 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng _quit = false; - _soundRate = 8000; + // Set default sound frequency + // Return to Zork sets it itself via a script funtion + if (getGameID() == GID_MANHOLE) { + _soundRate = 11025; + } else { + _soundRate = 8000; + } } @@ -176,7 +182,7 @@ void MadeEngine::handleEvents() { Common::Event event; Common::EventManager *eventMan = _system->getEventManager(); - // NOTE: Don't reset _eventNum to 0 here or no events will come through to the scripts. + // NOTE: Don't reset _eventNum to 0 here or no events will get through to the scripts. while (eventMan->pollEvent(event)) { switch (event.type) { @@ -225,8 +231,6 @@ void MadeEngine::handleEvents() { } } - _system->updateScreen(); - } int MadeEngine::go() { @@ -265,13 +269,15 @@ int MadeEngine::go() { // FIXME: This should make things a little faster until proper dirty rectangles // are implemented. - _system->setFeatureState(OSystem::kFeatureAutoComputeDirtyRects, true); + // NOTE: Disabled again since it causes major graphics errors. + //_system->setFeatureState(OSystem::kFeatureAutoComputeDirtyRects, true); _eventNum = _eventKey = _eventMouseX = _eventMouseY = 0; #ifdef DUMP_SCRIPTS _script->dumpAllScripts(); #else + _screen->setDefaultMouseCursor(); _script->runScript(_dat->getMainCodeObjectIndex()); #endif diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index e85ca71c59..754a45016c 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -352,6 +352,8 @@ void Screen::updateSprites() { _vm->_system->copyRectToScreen((const byte*)_workScreen->pixels, _workScreen->pitch, 0, 0, _workScreen->w, _workScreen->h); + _vm->_system->updateScreen(); + } void Screen::clearChannels() { @@ -824,4 +826,8 @@ void Screen::clearSpriteList() { _spriteList.clear(); } +void Screen::setDefaultMouseCursor() { + CursorMan.replaceCursor(defaultMouseCursor, 16, 16, 9, 2, 0); +} + } // End of namespace Made diff --git a/engines/made/screen.h b/engines/made/screen.h index d0df3bf080..20085bebdc 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -31,6 +31,7 @@ #include "common/rect.h" #include "graphics/surface.h" +#include "graphics/cursorman.h" #include "made/resource.h" #include "made/screenfx.h" @@ -62,6 +63,25 @@ struct SpriteListItem { class MadeEngine; +static const byte defaultMouseCursor[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 15, 15, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 15, 15, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1, 15, 15, 1, 0, 0, 0, 0, 0, + 0, 1, 1, 1, 1, 1, 1, 1, 15, 15, 1, 0, 0, 0, 0, 0, + 1, 1, 15, 1, 15, 1, 15, 1, 15, 15, 1, 0, 0, 0, 0, 0, + 1, 15, 15, 1, 15, 1, 15, 1, 15, 15, 1, 0, 0, 0, 0, 0, + 1, 15, 15, 15, 15, 15, 15, 15, 15, 15, 1, 0, 1, 1, 1, 0, + 1, 15, 15, 15, 15, 15, 15, 15, 15, 15, 1, 1, 15, 15, 15, 1, + 1, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 1, 1, 1, + 1, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 1, 1, 0, 0, + 1, 1, 15, 15, 15, 15, 15, 15, 15, 15, 15, 1, 1, 0, 0, 0, + 0, 1, 1, 15, 15, 15, 15, 15, 15, 15, 1, 1, 0, 0, 0, 0, + 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 +}; + class Screen { public: Screen(MadeEngine *vm); @@ -166,6 +186,8 @@ public: int16 addToSpriteList(int16 index, int16 xofs, int16 yofs); SpriteListItem getFromSpriteList(int16 index); void clearSpriteList(); + + void setDefaultMouseCursor(); protected: MadeEngine *_vm; diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index f068e2619b..f67b7c89c6 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -195,6 +195,9 @@ int16 ScriptFunctions::sfShowPage(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfPollEvent(int16 argc, int16 *argv) { + + _vm->_system->updateScreen(); + int16 eventNum = _vm->_eventNum; _vm->_eventNum = 0; return eventNum; @@ -487,7 +490,6 @@ int16 ScriptFunctions::sfLoadMouseCursor(int16 argc, int16 *argv) { if (flex) { Graphics::Surface *surf = flex->getPicture(); CursorMan.replaceCursor((const byte *)surf->pixels, surf->w, surf->h, argv[1], argv[0], 0); - CursorMan.showMouse(true); _vm->_res->freeResource(flex); } return 0; -- cgit v1.2.3 From dd6821cbcb3ed67086ce69e01ebf9d1274768ffd Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 May 2008 11:03:21 +0000 Subject: Cleanup svn-id: r32280 --- engines/saga/rscfile.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/engines/saga/rscfile.cpp b/engines/saga/rscfile.cpp index bd5bfdfa1d..b7d4f4f1bd 100644 --- a/engines/saga/rscfile.cpp +++ b/engines/saga/rscfile.cpp @@ -658,12 +658,8 @@ static int metaResourceTable[] = { 0, 326, 517, 677, 805, 968, 1165, 0, 1271 }; static int metaResourceTableDemo[] = { 0, 0, 0, 0, 0, 0, 0, 285, 0 }; void Resource::loadGlobalResources(int chapter, int actorsEntrance) { - if (chapter < 0) { - if (_vm->getGameId() != GID_IHNM_DEMO) - chapter = 8; - else - chapter = 7; - } + if (chapter < 0) + chapter = (_vm->getGameId() != GID_IHNM_DEMO) ? 8 : 7; // TODO //if (module.voiceLUT) -- cgit v1.2.3 From 23da4c5fa24270622edca0fbdc1153fa1cc069f6 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Mon, 26 May 2008 11:07:18 +0000 Subject: Fixed graphics decoding bug in Manhole: N&E svn-id: r32281 --- engines/made/graphics.cpp | 35 ++++++++++++++++++++++++++--------- engines/made/graphics.h | 12 +++++++++++- engines/made/resource.cpp | 16 ++++++++++------ 3 files changed, 47 insertions(+), 16 deletions(-) diff --git a/engines/made/graphics.cpp b/engines/made/graphics.cpp index 4081f3ba92..eab348a14f 100644 --- a/engines/made/graphics.cpp +++ b/engines/made/graphics.cpp @@ -29,7 +29,24 @@ namespace Made { -void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, uint16 pixelOffs, uint16 maskOffs, uint16 lineSize, bool deltaFrame) { +byte ValueReader::readPixel() { + byte value; + if (_nibbleMode) { + if (_nibbleSwitch) { + value = (_buffer[0] >> 4) & 0x0F; + _buffer++; + } else { + value = _buffer[0] & 0x0F; + } + _nibbleSwitch = !_nibbleSwitch; + } else { + value = _buffer[0]; + _buffer++; + } + return value; +} + +void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, uint16 pixelOffs, uint16 maskOffs, uint16 lineSize, byte cmdFlags, byte pixelFlags, byte maskFlags, bool deltaFrame) { const int offsets[] = { 0, 1, 2, 3, @@ -43,7 +60,7 @@ void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, u byte *cmdBuffer = source + cmdOffs; byte *maskBuffer = source + maskOffs; - byte *pixelBuffer = source + pixelOffs; + ValueReader pixelReader(source + pixelOffs, pixelFlags & 2); byte *destPtr = (byte*)surface.getBasePtr(0, 0); @@ -84,14 +101,14 @@ void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, u switch (cmd) { case 0: - pixels[0] = *pixelBuffer++; + pixels[0] = pixelReader.readPixel(); for (int i = 0; i < 16; i++) lineBuf[drawDestOfs + offsets[i]] = pixels[0]; break; case 1: - pixels[0] = *pixelBuffer++; - pixels[1] = *pixelBuffer++; + pixels[0] = pixelReader.readPixel(); + pixels[1] = pixelReader.readPixel(); mask = READ_LE_UINT16(maskBuffer); maskBuffer += 2; for (int i = 0; i < 16; i++) { @@ -101,10 +118,10 @@ void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, u break; case 2: - pixels[0] = *pixelBuffer++; - pixels[1] = *pixelBuffer++; - pixels[2] = *pixelBuffer++; - pixels[3] = *pixelBuffer++; + pixels[0] = pixelReader.readPixel(); + pixels[1] = pixelReader.readPixel(); + pixels[2] = pixelReader.readPixel(); + pixels[3] = pixelReader.readPixel(); mask = READ_LE_UINT32(maskBuffer); maskBuffer += 4; for (int i = 0; i < 16; i++) { diff --git a/engines/made/graphics.h b/engines/made/graphics.h index 31c747a89b..1a5cf72677 100644 --- a/engines/made/graphics.h +++ b/engines/made/graphics.h @@ -33,7 +33,17 @@ namespace Made { -void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, uint16 pixelOffs, uint16 maskOffs, uint16 lineSize, bool deltaFrame = false); +class ValueReader { +public: + ValueReader(byte *source, bool nibbleMode) : _buffer(source), _nibbleBuf(0), _nibbleMode(nibbleMode), _nibbleSwitch(false) {} + byte readPixel(); +protected: + byte _nibbleBuf; + bool _nibbleMode, _nibbleSwitch; + byte *_buffer; +}; + +void decompressImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, uint16 pixelOffs, uint16 maskOffs, uint16 lineSize, byte cmdFlags, byte pixelFlags, byte maskFlags, bool deltaFrame = false); void decompressMovieImage(byte *source, Graphics::Surface &surface, uint16 cmdOffs, uint16 pixelOffs, uint16 maskOffs, uint16 lineSize); } // End of namespace Made diff --git a/engines/made/resource.cpp b/engines/made/resource.cpp index 8bda5e564b..2cae8b276c 100644 --- a/engines/made/resource.cpp +++ b/engines/made/resource.cpp @@ -59,9 +59,9 @@ void PictureResource::load(byte *source, int size) { Common::MemoryReadStream *sourceS = new Common::MemoryReadStream(source, size); _hasPalette = (sourceS->readByte() != 0); - sourceS->readByte(); - sourceS->readByte(); - sourceS->readByte(); + byte cmdFlags = sourceS->readByte(); + byte pixelFlags = sourceS->readByte(); + byte maskFlags = sourceS->readByte(); uint16 cmdOffs = sourceS->readUint16LE(); uint16 pixelOffs = sourceS->readUint16LE(); uint16 maskOffs = sourceS->readUint16LE(); @@ -69,7 +69,11 @@ void PictureResource::load(byte *source, int size) { /*uint16 u = */sourceS->readUint16LE(); uint16 width = sourceS->readUint16LE(); uint16 height = sourceS->readUint16LE(); - + + if (cmdFlags || pixelFlags || maskFlags) { + warning("PictureResource::load() Graphic has flags set"); + } + _paletteColorCount = (cmdOffs - 18) / 3; // 18 = sizeof header debug(2, "width = %d; height = %d\n", width, height); @@ -82,7 +86,7 @@ void PictureResource::load(byte *source, int size) { _picture = new Graphics::Surface(); _picture->create(width, height, 1); - decompressImage(source, *_picture, cmdOffs, pixelOffs, maskOffs, lineSize); + decompressImage(source, *_picture, cmdOffs, pixelOffs, maskOffs, lineSize, cmdFlags, pixelFlags, maskFlags); delete sourceS; @@ -137,7 +141,7 @@ void AnimationResource::load(byte *source, int size) { Graphics::Surface *frame = new Graphics::Surface(); frame->create(frameWidth, frameHeight, 1); - decompressImage(source + frameOffs, *frame, cmdOffs, pixelOffs, maskOffs, lineSize, _flags & 1); + decompressImage(source + frameOffs, *frame, cmdOffs, pixelOffs, maskOffs, lineSize, 0, 0, 0, _flags & 1); _frames.push_back(frame); -- cgit v1.2.3 From 966239fc52146826e5096cbf41412b035de8c1fe Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 May 2008 11:10:46 +0000 Subject: Code cleanup: - Removed sagaresnames.h - Moved all special scenes to scene.h, and named them consistently (e.g. RID_ITE_OVERMAP_SCENE -> ITE_SCENE_OVERMAP) - Moved all resources which were used by the ITE intro into ite_introproc.cpp - Removed several defines which were only used once (e.g. the SFX names) - Reordered the GameResourceDescription resources so that ITE and IHNM specific resources are placed in the end - Updated the comment about the IHNM Mac music - Changed the callocs in loadPalAnim to mallocs, like in the rest of the code - Removed the MEM error svn-id: r32282 --- engines/saga/actor.cpp | 3 +- engines/saga/actor_walk.cpp | 5 +- engines/saga/detection.cpp | 4 - engines/saga/detection_tables.h | 138 ++++++++++---------- engines/saga/gfx.cpp | 4 +- engines/saga/interface.cpp | 9 +- engines/saga/interface.h | 4 + engines/saga/isomap.cpp | 9 +- engines/saga/isomap.h | 2 + engines/saga/ite_introproc.cpp | 108 +++++++++------- engines/saga/itedata.cpp | 149 +++++++++++----------- engines/saga/music.cpp | 20 +-- engines/saga/palanim.cpp | 21 +-- engines/saga/puzzle.cpp | 18 ++- engines/saga/saga.cpp | 35 +++-- engines/saga/saga.h | 16 +-- engines/saga/sagaresnames.h | 274 ---------------------------------------- engines/saga/saveload.cpp | 1 - engines/saga/scene.cpp | 1 - engines/saga/scene.h | 14 +- engines/saga/sfuncs.cpp | 1 - engines/saga/sndres.cpp | 16 ++- engines/saga/sprite.cpp | 6 +- engines/saga/sthread.cpp | 8 +- 24 files changed, 320 insertions(+), 546 deletions(-) delete mode 100644 engines/saga/sagaresnames.h diff --git a/engines/saga/actor.cpp b/engines/saga/actor.cpp index 52b921d000..96d901fbba 100644 --- a/engines/saga/actor.cpp +++ b/engines/saga/actor.cpp @@ -31,7 +31,6 @@ #include "saga/events.h" #include "saga/isomap.h" #include "saga/objectmap.h" -#include "saga/sagaresnames.h" #include "saga/rscfile.h" #include "saga/script.h" #include "saga/sndres.h" @@ -997,7 +996,7 @@ void Actor::createDrawOrderList() { } bool Actor::getSpriteParams(CommonObjectData *commonObjectData, int &frameNumber, SpriteList *&spriteList) { - if (_vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE) { + if (_vm->_scene->currentSceneResourceId() == ITE_SCENE_OVERMAP) { if (!(commonObjectData->_flags & kProtagonist)){ // warning("not protagonist"); return false; diff --git a/engines/saga/actor_walk.cpp b/engines/saga/actor_walk.cpp index 0c573c0c40..d62c1c61d7 100644 --- a/engines/saga/actor_walk.cpp +++ b/engines/saga/actor_walk.cpp @@ -30,7 +30,6 @@ #include "saga/events.h" #include "saga/isomap.h" #include "saga/objectmap.h" -#include "saga/sagaresnames.h" #include "saga/script.h" #include "saga/sound.h" #include "saga/scene.h" @@ -209,7 +208,7 @@ void Actor::updateActorsScene(int actorsEntrance) { actor->_finalTarget = actor->_location; _centerActor = _protagonist = actor; } else if (_vm->getGameType() == GType_ITE && - _vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE) { + _vm->_scene->currentSceneResourceId() == ITE_SCENE_OVERMAP) { continue; } @@ -416,7 +415,7 @@ void Actor::handleActions(int msec, bool setup) { speed = 4; } - if (_vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE) { + if (_vm->_scene->currentSceneResourceId() == ITE_SCENE_OVERMAP) { speed = 2; } diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp index b7d2a3aa39..7fd1024405 100644 --- a/engines/saga/detection.cpp +++ b/engines/saga/detection.cpp @@ -36,7 +36,6 @@ #include "saga/rscfile.h" #include "saga/interface.h" #include "saga/scene.h" -#include "saga/sagaresnames.h" namespace Saga { struct SAGAGameDescription { @@ -63,10 +62,7 @@ const GameSoundInfo *SagaEngine::getSfxInfo() const { return _gameDescription->s const GameSoundInfo *SagaEngine::getMusicInfo() const { static GameSoundInfo musicInfo; musicInfo.resourceType = kSoundPCM; - musicInfo.frequency = 11025; musicInfo.sampleBits = 16; - // The digital music in the ITE Mac demo version is not stereo - musicInfo.stereo = _gameDescription->gameType == GID_ITE_MACDEMO2 ? false : true; musicInfo.isBigEndian = false; musicInfo.isSigned = true; diff --git a/engines/saga/detection_tables.h b/engines/saga/detection_tables.h index 0017f34957..cbc3152f70 100644 --- a/engines/saga/detection_tables.h +++ b/engines/saga/detection_tables.h @@ -28,71 +28,81 @@ namespace Saga { static const GameResourceDescription ITE_Resources = { - RID_ITE_SCENE_LUT, // Scene lookup table RN - RID_ITE_SCRIPT_LUT, // Script lookup table RN - RID_ITE_MAIN_PANEL, - RID_ITE_CONVERSE_PANEL, - RID_ITE_OPTION_PANEL, - 0, // Warning panel (IHNM only) - 0, // Warning panel sprites (IHNM only) - RID_ITE_MAIN_SPRITES, - RID_ITE_MAIN_PANEL_SPRITES, - 0, // Option panel sprites (IHNM only) - RID_ITE_DEFAULT_PORTRAITS, - 0, // Psychic profile background (IHNM only) - RID_ITE_MAIN_STRINGS, - RID_ITE_ACTOR_NAMES + 1806, // Scene lookup table RN + 216, // Script lookup table RN + 3, // Main panel + 4, // Converse panel + 5, // Option panel + 6, // Main sprites + 7, // Main panel sprites + 35, // Main strings + // ITE specific resources + 36, // Actor names + 125, // Default portraits + // IHNM specific resources + 0, // Option panel sprites + 0, // Warning panel + 0, // Warning panel sprites + 0 // Psychic profile background }; +// FIXME: Option panel should be 4 but it is an empty resource. +// Proper fix would be to not load the options panel when the demo is running static const GameResourceDescription ITEDemo_Resources = { - RID_ITEDEMO_SCENE_LUT, // Scene lookup table RN - RID_ITEDEMO_SCRIPT_LUT, // Script lookup table RN - RID_ITEDEMO_MAIN_PANEL, - RID_ITEDEMO_CONVERSE_PANEL, - RID_ITEDEMO_OPTION_PANEL, - 0, // Warning panel (IHNM only) - 0, // Warning panel sprites (IHNM only) - RID_ITEDEMO_MAIN_SPRITES, - RID_ITEDEMO_MAIN_PANEL_SPRITES, - 0, // Option panel sprites (IHNM only) - RID_ITEDEMO_DEFAULT_PORTRAITS, - 0, // Psychic profile background (IHNM only) - RID_ITEDEMO_MAIN_STRINGS, - RID_ITEDEMO_ACTOR_NAMES + 318, // Scene lookup table RN + 146, // Script lookup table RN + 2, // Main panel + 3, // Converse panel + 3, // Option panel + 5, // Main sprites + 6, // Main panel sprites + 8, // Main strings + // ITE specific resources + 9, // Actor names + 80, // Default portraits + // IHNM specific resources + 0, // Option panel sprites + 0, // Warning panel + 0, // Warning panel sprites + 0 // Psychic profile background }; static const GameResourceDescription IHNM_Resources = { - RID_IHNM_SCENE_LUT, // Scene lookup table RN - RID_IHNM_SCRIPT_LUT, // Script lookup table RN - RID_IHNM_MAIN_PANEL, - RID_IHNM_CONVERSE_PANEL, - RID_IHNM_OPTION_PANEL, - RID_IHNM_WARNING_PANEL, - RID_IHNM_WARNING_PANEL_SPRITES, - RID_IHNM_MAIN_SPRITES, - RID_IHNM_MAIN_PANEL_SPRITES, - RID_IHNM_OPTION_PANEL_SPRITES, - 0, // Default portraits (ITE only) - RID_IHNM_PROFILE_BG, - RID_IHNM_MAIN_STRINGS, - 0 // Actors strings (ITE only) + 1272, // Scene lookup table RN + 29, // Script lookup table RN + 9, // Main panel + 10, // Converse panel + 15, // Option panel + 12, // Main sprites + 12, // Main panel sprites + 21, // Main strings + // ITE specific resources + 0, // Actor names + 0, // Default portraits + // IHNM specific resources + 16, // Option panel sprites + 17, // Warning panel + 18, // Warning panel sprites + 20 // Psychic profile background }; static const GameResourceDescription IHNMDEMO_Resources = { - RID_IHNMDEMO_SCENE_LUT, // Scene lookup table RN - RID_IHNMDEMO_SCRIPT_LUT, // Script lookup table RN - RID_IHNMDEMO_MAIN_PANEL, - RID_IHNMDEMO_CONVERSE_PANEL, - RID_IHNMDEMO_OPTION_PANEL, - RID_IHNMDEMO_WARNING_PANEL, - RID_IHNMDEMO_WARNING_PANEL_SPRITES, - RID_IHNMDEMO_MAIN_SPRITES, - RID_IHNMDEMO_MAIN_PANEL_SPRITES, - RID_IHNMDEMO_OPTION_PANEL_SPRITES, - 0, // Default portraits (ITE only) - RID_IHNMDEMO_PROFILE_BG, - RID_IHNMDEMO_MAIN_STRINGS, - 0 // Actors strings (ITE only) + 286, // Scene lookup table RN + 18, // Script lookup table RN + 5, // Main panel + 6, // Converse panel + 10, // Option panel + 7, // Main sprites + 7, // Main panel sprites + 16, // Main strings + // ITE specific resources + 0, // Actor names + 0, // Default portraits + // IHNM specific resources + 11, // Option panel sprites + 12, // Warning panel + 13, // Warning panel sprites + 15 // Psychic profile background }; static const GameFontDescription ITEDEMO_GameFonts[] = { {0}, {1} }; @@ -102,14 +112,14 @@ static const GameFontDescription IHNMDEMO_GameFonts[] = { {2}, {3}, {4} }; // Font 6 is kIHNMFont8, font 8 is kIHNMMainFont static const GameFontDescription IHNMCD_GameFonts[] = { {2}, {3}, {4}, {5}, {6}, {7}, {8} }; -// frequency, sampleBits, stereo, isBigEndian, isSigned -static const GameSoundInfo ITEPC_GameSound = { kSoundPCM, 22050, 16, false, false, true }; -static const GameSoundInfo ITEWINDEMO1_GameSound = { kSoundPCM, 22050, 8, false, false, false }; -static const GameSoundInfo ITEMACCD_G_GameSound = { kSoundMacPCM, 22050, 8, false, false, false }; -static const GameSoundInfo ITEDISK_GameSound = { kSoundVOC, -1, -1, false, false, true }; -static const GameSoundInfo ITEDEMO_GameVoice = { kSoundVOX, 22050, 16, false, false, true }; -static const GameSoundInfo IHNM_GameSound = { kSoundWAV, -1, -1, false, false, true }; -static const GameSoundInfo MAC_GameSound = { kSoundPCM, 22050, 16, false, true, true }; +// sampleBits, isBigEndian, isSigned +static const GameSoundInfo ITEPC_GameSound = { kSoundPCM, 16, false, true }; +static const GameSoundInfo ITEWINDEMO1_GameSound = { kSoundPCM, 8, false, false }; +static const GameSoundInfo ITEMACCD_G_GameSound = { kSoundMacPCM, 8, false, false }; +static const GameSoundInfo ITEDISK_GameSound = { kSoundVOC, -1, false, true }; +static const GameSoundInfo ITEDEMO_GameVoice = { kSoundVOX, 16, false, true }; +static const GameSoundInfo IHNM_GameSound = { kSoundWAV, -1, false, true }; +static const GameSoundInfo MAC_GameSound = { kSoundPCM, 16, true, true }; // Patch files. Files not found will be ignored static const GamePatchDescription ITEPatch_Files[] = { diff --git a/engines/saga/gfx.cpp b/engines/saga/gfx.cpp index d1f592e38b..85416991db 100644 --- a/engines/saga/gfx.cpp +++ b/engines/saga/gfx.cpp @@ -28,7 +28,6 @@ #include "saga/saga.h" #include "saga/gfx.h" #include "saga/interface.h" -#include "saga/sagaresnames.h" #include "saga/rscfile.h" #include "saga/scene.h" @@ -37,6 +36,9 @@ namespace Saga { +#define RID_IHNM_DEFAULT_PALETTE 1 +#define RID_IHNM_HOURGLASS_CURSOR 11 // not in demo + Gfx::Gfx(SagaEngine *vm, OSystem *system, int width, int height) : _vm(vm), _system(system) { _system->beginGFXTransaction(); _vm->initCommonGFX(width > 320); diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index ef31b85156..fe1ee0eefc 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -43,7 +43,6 @@ #include "saga/sound.h" #include "saga/sprite.h" #include "saga/rscfile.h" -#include "saga/sagaresnames.h" #include "saga/interface.h" @@ -477,9 +476,9 @@ void Interface::setMode(int mode) { bool Interface::processAscii(Common::KeyState keystate) { // TODO: Checking for Esc and Enter below is a bit hackish, and - // and probably only works with the English version. Maybe we should - // add a flag to the button so it can indicate if it's the default or - // cancel button? + // probably only works with the English version. Maybe we should + // add a flag to the button so it can indicate if it's the default + // or cancel button? uint16 ascii = keystate.ascii; int i; PanelButton *panelButton; @@ -2755,7 +2754,7 @@ void Interface::mapPanelDrawCrossHair() { if (screen.contains(mapPosition)) { _vm->_sprite->draw(backBuffer, _vm->getDisplayClip(), _vm->_sprite->_mainSprites, - _mapPanelCrossHairState? RID_ITE_SPR_XHAIR1 : RID_ITE_SPR_XHAIR2, + _mapPanelCrossHairState? RID_ITE_SPR_CROSSHAIR : RID_ITE_SPR_CROSSHAIR + 1, mapPosition, 256); } } diff --git a/engines/saga/interface.h b/engines/saga/interface.h index af59fe64d2..74cf5ace44 100644 --- a/engines/saga/interface.h +++ b/engines/saga/interface.h @@ -56,6 +56,10 @@ enum InterfaceUpdateFlags { #define STATUS_TEXT_LEN 128 #define STATUS_TEXT_INPUT_MAX 256 +#define RID_IHNM_BOSS_SCREEN 19 // not in demo +#define RID_ITE_TYCHO_MAP 1686 +#define RID_ITE_SPR_CROSSHAIR (73 + 9) + // Converse-specific stuff enum PanelModes { diff --git a/engines/saga/isomap.cpp b/engines/saga/isomap.cpp index 7a6d6a4398..e607adb4cb 100644 --- a/engines/saga/isomap.cpp +++ b/engines/saga/isomap.cpp @@ -27,7 +27,6 @@ #include "saga/saga.h" #include "saga/gfx.h" -#include "saga/sagaresnames.h" #include "saga/scene.h" #include "saga/isomap.h" @@ -285,7 +284,7 @@ void IsoMap::adjustScroll(bool jump) { tileCoordsToScreenPoint(_vm->_actor->_centerActor->_location, playerPoint); - if (_vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE) { + if (_vm->_scene->currentSceneResourceId() == ITE_SCENE_OVERMAP) { _mapPosition.x = (playerPoint.x + _viewScroll.x) * 30 / 100 - (381); _mapPosition.y = (playerPoint.y + _viewScroll.y) * 30 / 100 - (342); } @@ -322,7 +321,7 @@ void IsoMap::adjustScroll(bool jump) { _viewScroll.x = smoothSlide( _viewScroll.x, minScrollPos.x, maxScrollPos.x ); } - if (_vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE) { + if (_vm->_scene->currentSceneResourceId() == ITE_SCENE_OVERMAP) { ObjectData *obj; uint16 objectId; objectId = _vm->_actor->objIndexToId(ITE_OBJ_MAP); @@ -1510,7 +1509,7 @@ void IsoMap::findTilePath(ActorData* actor, const Location &start, const Locatio memset( &_searchArray, 0, sizeof(_searchArray)); if (!(actor->_actorFlags & kActorNoCollide) && - (_vm->_scene->currentSceneResourceId() != RID_ITE_OVERMAP_SCENE)) { + (_vm->_scene->currentSceneResourceId() != ITE_SCENE_OVERMAP)) { for (i = 0; i < _vm->_actor->_actorsCount; i++) { other = _vm->_actor->_actors[i]; if (!other->_inScene) continue; @@ -1664,7 +1663,7 @@ void IsoMap::screenPointToTileCoords(const Point &position, Location &location) Point mPos(position); int x,y; - if (_vm->_scene->currentSceneResourceId() == RID_ITE_OVERMAP_SCENE){ + if (_vm->_scene->currentSceneResourceId() == ITE_SCENE_OVERMAP){ if (mPos.y < 16) { mPos.y = 16; } diff --git a/engines/saga/isomap.h b/engines/saga/isomap.h index c79ae7cd0a..eb548ce5dc 100644 --- a/engines/saga/isomap.h +++ b/engines/saga/isomap.h @@ -32,6 +32,8 @@ namespace Saga { +#define ITE_OBJ_MAP 14 + #define SAGA_ISOTILEDATA_LEN 8 #define SAGA_ISOTILE_WIDTH 32 #define SAGA_ISOTILE_BASEHEIGHT 15 diff --git a/engines/saga/ite_introproc.cpp b/engines/saga/ite_introproc.cpp index 2aa263b097..a33a55c375 100644 --- a/engines/saga/ite_introproc.cpp +++ b/engines/saga/ite_introproc.cpp @@ -36,7 +36,6 @@ #include "saga/music.h" #include "saga/scene.h" -#include "saga/sagaresnames.h" #include "saga/rscfile.h" namespace Saga { @@ -46,6 +45,21 @@ using Common::EN_ANY; using Common::DE_DEU; using Common::IT_ITA; +// Intro scenes +#define RID_ITE_INTRO_ANIM_SCENE 1538 +#define RID_ITE_CAVE_SCENE_1 1542 +#define RID_ITE_CAVE_SCENE_2 1545 +#define RID_ITE_CAVE_SCENE_3 1548 +#define RID_ITE_CAVE_SCENE_4 1551 +#define RID_ITE_VALLEY_SCENE 1556 +#define RID_ITE_TREEHOUSE_SCENE 1560 +#define RID_ITE_FAIREPATH_SCENE 1564 +#define RID_ITE_FAIRETENT_SCENE 1567 + +// ITE intro music +#define MUSIC_1 9 +#define MUSIC_2 10 + LoadSceneParams ITE_IntroList[] = { {RID_ITE_INTRO_ANIM_SCENE, kLoadByResourceId, NULL, Scene::SC_ITEIntroAnimProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, {RID_ITE_CAVE_SCENE_1, kLoadByResourceId, NULL, Scene::SC_ITEIntroCave1Proc, false, kTransitionFade, 0, NO_CHAPTER_CHANGE}, @@ -380,63 +394,65 @@ int Scene::ITEIntroCave1Proc(int param) { static const IntroDialogue dialogue[][4] = { { { // English - RID_CAVE_VOICE_0, + 0, // cave voice 0 "We see the sky, we see the land, we see the water, " "and we wonder: Are we the only ones?" }, { - RID_CAVE_VOICE_1, + 1, // cave voice 1 "Long before we came to exist, the humans ruled the " "Earth." }, { - RID_CAVE_VOICE_2, + 2, // cave voice 2 "They made marvelous things, and moved whole " "mountains." }, { - RID_CAVE_VOICE_3, + 3, // cave voice 3 "They knew the Secret of Flight, the Secret of " "Happiness, and other secrets beyond our imagining." } }, + // ----------------------------------------------------- { { // German - RID_CAVE_VOICE_0, + 0, // cave voice 0 "Um uns sind der Himmel, das Land und die Seen; und " "wir fragen uns - sind wir die einzigen?" }, { - RID_CAVE_VOICE_1, + 1, // cave voice 1 "Lange vor unserer Zeit herrschten die Menschen " "\201ber die Erde." }, { - RID_CAVE_VOICE_2, + 2, // cave voice 2 "Sie taten wundersame Dinge und versetzten ganze " "Berge." }, { - RID_CAVE_VOICE_3, + 3, // cave voice 3 "Sie kannten das Geheimnis des Fluges, das Geheimnis " "der Fr\224hlichkeit und andere Geheimnisse, die " "unsere Vorstellungskraft \201bersteigen." } }, + // ----------------------------------------------------- { { // Italian fan translation - RID_CAVE_VOICE_0, + 0, // cave voice 0 "Guardiamo il cielo, guardiamo la terra, guardiamo " "l'acqua, e ci chiediamo: Siamo forse soli?" }, { - RID_CAVE_VOICE_1, + 1, // cave voice 1 "Molto tempo prima che noi esistessimo, gli Umani " "dominavano la terra." }, { - RID_CAVE_VOICE_2, + 2, // cave voice 2 "Fecero cose meravigliose, e mossero intere " "montagne." }, { - RID_CAVE_VOICE_3, + 3, // cave voice 3 "Conoscevano il Segreto del Volo, il Segreto della " "Felicit\224, ed altri segreti oltre ogni nostra " "immaginazione." @@ -493,47 +509,49 @@ int Scene::ITEIntroCave2Proc(int param) { static const IntroDialogue dialogue[][3] = { { { // English - RID_CAVE_VOICE_4, + 4, // cave voice 4 "The humans also knew the Secret of Life, and they " "used it to give us the Four Great Gifts:" }, { - RID_CAVE_VOICE_5, + 5, // cave voice 5 "Thinking minds, feeling hearts, speaking mouths, and " "reaching hands." }, { - RID_CAVE_VOICE_6, + 6, // cave voice 6 "We are their children." } }, + // ----------------------------------------------------- { { // German - RID_CAVE_VOICE_4, + 4, // cave voice 4 "Au$erdem kannten die Menschen das Geheimnis des " "Lebens. Und sie nutzten es, um uns die vier gro$en " "Geschenke zu geben -" }, { - RID_CAVE_VOICE_5, + 5, // cave voice 5 "den denkenden Geist, das f\201hlende Herz, den " "sprechenden Mund und die greifende Hand." }, { - RID_CAVE_VOICE_6, + 6, // cave voice 6 "Wir sind ihre Kinder." } }, + // ----------------------------------------------------- { { // Italian fan translation - RID_CAVE_VOICE_4, + 4, // cave voice 4 "Gli Umani conoscevano anche il Segreto della Vita, " "e lo usarono per darci i Quattro Grandi Doni:" }, { - RID_CAVE_VOICE_5, + 5, // cave voice 5 "Il pensiero, le emozioni, la parola e la manualit\224." }, { - RID_CAVE_VOICE_6, + 6, // cave voice 6 "Siamo i loro figli." } } }; @@ -595,46 +613,48 @@ int Scene::ITEIntroCave3Proc(int param) { static const IntroDialogue dialogue[][3] = { { { // English - RID_CAVE_VOICE_7, + 7, // cave voice 7 "They taught us how to use our hands, and how to " "speak." }, { - RID_CAVE_VOICE_8, + 8, // cave voice 8 "They showed us the joy of using our minds." }, { - RID_CAVE_VOICE_9, + 9, // cave voice 9 "They loved us, and when we were ready, they surely " "would have given us the Secret of Happiness." } }, + // ----------------------------------------------------- { { // German - RID_CAVE_VOICE_7, + 7, // cave voice 7 "Sie lehrten uns zu sprechen und unsere H\204nde zu " "benutzen." }, { - RID_CAVE_VOICE_8, + 8, // cave voice 8 "Sie zeigten uns die Freude am Denken." }, { - RID_CAVE_VOICE_9, + 9, // cave voice 9 "Sie liebten uns, und w\204ren wir bereit gewesen, " "h\204tten sie uns sicherlich das Geheimnis der " "Fr\224hlichkeit offenbart." } }, + // ----------------------------------------------------- { { // Italian fan translation - RID_CAVE_VOICE_7, + 7, // cave voice 7 "Ci insegnarono come usare le mani e come parlare. " }, { - RID_CAVE_VOICE_8, + 8, // cave voice 8 "Ci mostrarono le gioie che l'uso della mente " "pu\242 dare. " }, { - RID_CAVE_VOICE_9, + 9, // cave voice 9 "Ci amarono, ed una volta pronti, ci avrebbero " "sicuramente svelato il Segreto della Felicit\224." @@ -698,60 +718,62 @@ int Scene::ITEIntroCave4Proc(int param) { static const IntroDialogue dialogue[][4] = { { { // English - RID_CAVE_VOICE_10, + 10, // cave voice 10 "And now we see the sky, the land, and the water that " "we are heirs to, and we wonder: why did they leave?" }, { - RID_CAVE_VOICE_11, + 11, // cave voice 11 "Do they live still, in the stars? In the oceans " "depths? In the wind?" }, { - RID_CAVE_VOICE_12, + 12, // cave voice 12 "We wonder, was their fate good or evil?" }, { - RID_CAVE_VOICE_13, + 13, // cave voice 13 "And will we also share the same fate one day?" } }, + // ----------------------------------------------------- { { // German - RID_CAVE_VOICE_10, + 10, // cave voice 10 "Und nun sehen wir den Himmel, das Land und die " "Seen - unser Erbe. Und wir fragen uns - warum " "verschwanden sie?" }, { - RID_CAVE_VOICE_11, + 11, // cave voice 11 "Leben sie noch in den Sternen? In den Tiefen des " "Ozeans? Im Wind?" }, { - RID_CAVE_VOICE_12, + 12, // cave voice 12 "Wir fragen uns - war ihr Schicksal gut oder b\224se?" }, { - RID_CAVE_VOICE_13, + 13, // cave voice 13 "Und wird uns eines Tages das gleiche Schicksal " "ereilen?" } }, + // ----------------------------------------------------- { { // Italian fan translation - RID_CAVE_VOICE_10, + 10, // cave voice 10 "Ed ora che guardiamo il cielo, la terra e l'acqua " "che abbiamo ereditato, pensiamo: Perch\233 partirono?" }, { - RID_CAVE_VOICE_11, + 11, // cave voice 11 "Vivono ancora, nelle stelle? Nelle profondit\224 " "dell'oceano? Nel vento?" }, { - RID_CAVE_VOICE_12, + 12, // cave voice 12 "Ci domandiamo, il loro destino fu felice o nefasto?" }, { - RID_CAVE_VOICE_13, + 13, // cave voice 13 "E un giorno, condivideremo anche noi lo stesso " "destino?" } } diff --git a/engines/saga/itedata.cpp b/engines/saga/itedata.cpp index 1274f72b45..43c3d21012 100644 --- a/engines/saga/itedata.cpp +++ b/engines/saga/itedata.cpp @@ -26,7 +26,6 @@ // Actor and Object data tables #include "saga/saga.h" #include "saga/itedata.h" -#include "saga/sagaresnames.h" #include "saga/sndres.h" namespace Saga { @@ -245,7 +244,7 @@ ObjectTableData ITE_ObjectTable[ITE_OBJECTCOUNT] = { { 23, 0, 480, 480, 0, 24, 23, 0 }, // Silver Medallion { 24, 0, 480, 480, 0, 25, 24, 0 }, // Mud in Fur { 25, 0, 480, 480, 0, 26, 25, 0 }, // Gold Ring - { 27, 13, 1036, 572, 40, 47, 14, kObjUseWith }, // Screwdriver + { 27, 13, 1036, 572, 40, 47, 14, kObjUseWith }, // Screwdriver { 28, 0, 480, 480, 0, 29, 26, 0 }, // Apple Token { 29, 0, 480, 480, 0, 30, 22, kObjUseWith }, // Letter from Elara { 30, 0, 164, 440, 0, 31, 16, kObjUseWith }, // Spoon @@ -258,82 +257,86 @@ ObjectTableData ITE_ObjectTable[ITE_OBJECTCOUNT] = { { 40, 269, 644, 416, 0, 41, 39, kObjNotFlat }, // Electrical Cable { 41, 12, 280, 516, 0, 43, 17, kObjUseWith }, // Piece of flint { 42, 5, 876, 332, 32, 65, 18, 0 }, // Rat Cloak - { 43, 52, 556, 1612, 0, 49, 28, kObjUseWith | kObjNotFlat }, // Bucket + { 43, 52, 556, 1612, 0, 49, 28, kObjUseWith | + kObjNotFlat }, // Bucket { 48, 52, 732, 948, 0, 50, 27, kObjUseWith }, // Cup { 49, 52, 520, 1872, 0, 53, 29, 0 }, // Fertilizer { 50, 52, 1012, 1268, 0, 52, 30, 0 }, // Feeder - { 51, 252, -20, -20, 0, 71, 32, kObjUseWith | kObjNotFlat }, // Bowl in jail cell + { 51, 252, -20, -20, 0, 71, 32, kObjUseWith | + kObjNotFlat }, // Bowl in jail cell { 53, 252, 1148, 388, 0, 70, 33, 0 }, // Loose stone block in jail cell { 26, 12, 496, 368, 0, 76, 31, 0 }, // Coil of Rope from Quarry { 54, 281, 620, 352, 0, 80, 46, 0 } // Orb of Storms in Dam Lab }; FxTable ITE_SfxTable[ITE_SFXCOUNT] = { - { FX_DOOR_OPEN, 127 }, - { FX_DOOR_CLOSE, 127 }, - { FX_RUSH_WATER, 63 }, // Floppy volume: 127 - { FX_RUSH_WATER, 26 }, // Floppy volume: 40 - { FX_CRICKET, 64 }, - { FX_PORTICULLIS, 84 }, // Floppy volume: 127 - { FX_CLOCK_1, 64 }, - { FX_CLOCK_2, 64 }, - { FX_DAM_MACHINE, 64 }, - { FX_DAM_MACHINE, 40 }, - { FX_HUM1, 64 }, - { FX_HUM2, 64 }, - { FX_HUM3, 64 }, - { FX_HUM4, 64 }, - { FX_WATER_LOOP_S, 32 }, // Floppy volume: 64 - { FX_SURF, 42 }, // Floppy volume: 127 - { FX_SURF, 32 }, // Floppy volume: 64 - { FX_FIRELOOP, 64 }, // Floppy volume: 96 - { FX_SCRAPING, 84 }, // Floppy volume: 127 - { FX_BEE_SWARM, 64 }, // Floppy volume: 96 - { FX_BEE_SWARM, 26 }, // Floppy volume: 40 - { FX_SQUEAKBOARD, 64 }, - { FX_KNOCK, 127 }, - { FX_COINS, 32 }, // Floppy volume: 48 - { FX_STORM, 84 }, // Floppy volume: 127 - { FX_DOOR_CLOSE_2, 84 }, // Floppy volume: 127 - { FX_ARCWELD, 84 }, // Floppy volume: 127 - { FX_RETRACT_ORB, 127 }, - { FX_DRAGON, 127 }, - { FX_SNORES, 127 }, - { FX_SPLASH, 127 }, - { FX_LOBBY_DOOR, 127 }, - { FX_CHIRP_LOOP, 26 }, // Floppy volume: 40 - { FX_DOOR_CREAK, 96 }, - { FX_SPOON_DIG, 64 }, - { FX_CROW, 96 }, - { FX_COLDWIND, 42 }, // Floppy volume: 64 - { FX_TOOL_SND_1, 96 }, - { FX_TOOL_SND_2, 127 }, - { FX_TOOL_SND_3, 64 }, - { FX_DOOR_METAL, 96 }, - { FX_WATER_LOOP_S, 32 }, - { FX_WATER_LOOP_L, 32 }, // Floppy volume: 64 - { FX_DOOR_OPEN_2, 127 }, - { FX_JAIL_DOOR, 64 }, - { FX_KILN_FIRE, 53 }, // Floppy volume: 80 - - // Only in the CD version - { FX_CROWD_01, 64 }, - { FX_CROWD_02, 64 }, - { FX_CROWD_03, 64 }, - { FX_CROWD_04, 64 }, - { FX_CROWD_05, 64 }, - { FX_CROWD_06, 64 }, - { FX_CROWD_07, 64 }, - { FX_CROWD_08, 64 }, - { FX_CROWD_09, 64 }, - { FX_CROWD_10, 64 }, - { FX_CROWD_11, 64 }, - { FX_CROWD_12, 64 }, - { FX_CROWD_13, 64 }, - { FX_CROWD_14, 64 }, - { FX_CROWD_15, 64 }, - { FX_CROWD_16, 64 }, - { FX_CROWD_17, 64 } + { 14, 127 }, // Door open + { 15, 127 }, // Door close + { 16, 63 }, // Rush water (floppy volume: 127) + { 16, 26 }, // Rush water (floppy volume: 40) + { 17, 64 }, // Cricket + { 18, 84 }, // Porticullis (floppy volume: 127) + { 19, 64 }, // Clock 1 + { 20, 64 }, // Clock 2 + { 21, 64 }, // Dam machine + { 21, 40 }, // Dam machine + { 22, 64 }, // Hum 1 + { 23, 64 }, // Hum 2 + { 24, 64 }, // Hum 3 + { 25, 64 }, // Hum 4 + // Note: the following effect was set to 51 for + // some unknown reason + { 26, 32 }, // Stream + { 27, 42 }, // Surf (floppy volume: 127) + { 27, 32 }, // Surf (floppy volume: 64) + { 28, 64 }, // Fire loop (floppy volume: 96) + { 29, 84 }, // Scraping (floppy volume: 127) + { 30, 64 }, // Bee swarm (floppy volume: 96) + { 30, 26 }, // Bee swarm (floppy volume: 40) + { 31, 64 }, // Squeaky board + { 32, 127 }, // Knock + { 33, 32 }, // Coins (floppy volume: 48) + { 34, 84 }, // Storm (floppy volume: 127) + { 35, 84 }, // Door close 2 (floppy volume: 127) + { 36, 84 }, // Arcweld (floppy volume: 127) + { 37, 127 }, // Retract orb + { 38, 127 }, // Dragon + { 39, 127 }, // Snores + { 40, 127 }, // Splash + { 41, 127 }, // Lobby door + { 42, 26 }, // Chirp loop (floppy volume: 40) + { 43, 96 }, // Door creak + { 44, 64 }, // Spoon dig + { 45, 96 }, // Crow + { 46, 42 }, // Cold wind (floppy volume: 64) + { 47, 96 }, // Tool sound 1 + { 48, 127 }, // Tool sound 2 + { 49, 64 }, // Tool sound 3 + { 50, 96 }, // Metal door + { 51, 32 }, // Water loop S + { 52, 32 }, // Water loop L (floppy volume: 64) + { 53, 127 }, // Door open 2 + { 54, 64 }, // Jail door + { 55, 53 }, // Killing fire (floppy volume: 80) + //{ 56, 0 }, // Dummy FX + // Crowd effects, which exist only in the CD version + { 57, 64 }, + { 58, 64 }, + { 59, 64 }, + { 60, 64 }, + { 61, 64 }, + { 62, 64 }, + { 63, 64 }, + { 64, 64 }, + { 65, 64 }, + { 66, 64 }, + { 67, 64 }, + { 68, 64 }, + { 69, 64 }, + { 70, 64 }, + { 71, 64 }, + { 72, 64 }, + { 73, 64 } }; const char *ITEinterfaceTextStrings[][52] = { @@ -493,14 +496,6 @@ const char *solicitStr[][NUM_SOLICIT_REPLIES] = { } }; -const char portraitList[] = { - RID_ITE_JFERRET_SERIOUS, - RID_ITE_JFERRET_GOOFY, - RID_ITE_JFERRET_SERIOUS, - RID_ITE_JFERRET_GOOFY, - RID_ITE_JFERRET_ALOOF -}; - const char *sakkaStr[][NUM_SAKKA] = { { "Hey, you're not supposed to help the applicants!", "Guys! This is supposed to be a test!", diff --git a/engines/saga/music.cpp b/engines/saga/music.cpp index 1cbc38dfb5..732bd0b50c 100644 --- a/engines/saga/music.cpp +++ b/engines/saga/music.cpp @@ -28,7 +28,6 @@ #include "saga/saga.h" #include "saga/rscfile.h" -#include "saga/sagaresnames.h" #include "saga/music.h" #include "sound/audiostream.h" @@ -40,6 +39,7 @@ namespace Saga { #define BUFFER_SIZE 4096 +#define MUSIC_SUNSPOT 26 class DigitalMusicInputStream : public Audio::AudioStream { private: @@ -58,6 +58,7 @@ private: const int16 *_pos; const GameSoundInfo *_musicInfo; MemoryReadStream *_memoryStream; + SagaEngine *_vm; void refill(); bool eosIntern() const { @@ -73,18 +74,21 @@ public: int readBuffer(int16 *buffer, const int numSamples); bool endOfData() const { return eosIntern(); } - bool isStereo() const { return _musicInfo->stereo; } - int getRate() const { return _musicInfo->frequency; } + bool isStereo() const { + // The digital music in the ITE Mac demo version is not stereo + return _vm->getGameId() == GID_ITE_MACDEMO2 ? false : true; + } + int getRate() const { return 11025; } }; DigitalMusicInputStream::DigitalMusicInputStream(SagaEngine *vm, ResourceContext *context, uint32 resourceId, bool looping, uint32 loopStart) - : _context(context), _finished(false), _looping(looping), _bufferEnd(_buf + BUFFER_SIZE) { + : _vm(vm), _context(context), _finished(false), _looping(looping), _bufferEnd(_buf + BUFFER_SIZE) { byte compressedHeader[10]; - resourceData = vm->_resource->getResourceData(context, resourceId); + resourceData = _vm->_resource->getResourceData(context, resourceId); _file = context->getFile(resourceData); - _musicInfo = vm->getMusicInfo(); + _musicInfo = _vm->getMusicInfo(); if (_musicInfo == NULL) { error("DigitalMusicInputStream() wrong musicInfo"); @@ -480,7 +484,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) { if (_digitalMusicContext != NULL) { //TODO: check resource size loopStart = 0; - // fix ITE sunstatm score + // fix ITE sunstatm/sunspot score if ((_vm->getGameType() == GType_ITE) && (resourceId == MUSIC_SUNSPOT)) { loopStart = 4 * 18727; } @@ -557,7 +561,7 @@ void Music::play(uint32 resourceId, MusicFlags flags) { musicFile.read(resourceData, resourceSize); musicFile.close(); - // TODO: The Mac music format is unknown (probably TFMX?) + // TODO: The Mac music format is unsupported (QuickTime MIDI) // so stop here return; } else { diff --git a/engines/saga/palanim.cpp b/engines/saga/palanim.cpp index c5129fcf06..319946f2d5 100644 --- a/engines/saga/palanim.cpp +++ b/engines/saga/palanim.cpp @@ -66,12 +66,7 @@ int PalAnim::loadPalAnim(const byte *resdata, size_t resdata_len) { debug(3, "PalAnim::loadPalAnim(): Loading %d PALANIM entries.", _entryCount); - test_p = calloc(_entryCount, sizeof(PalanimEntry)); - if (test_p == NULL) { - warning("PalAnim::loadPalAnim(): Allocation failure"); - return MEM; - } - + test_p = malloc(_entryCount * sizeof(PalanimEntry)); _entries = (PalanimEntry *)test_p; for (i = 0; i < _entryCount; i++) { @@ -87,22 +82,12 @@ int PalAnim::loadPalAnim(const byte *resdata, size_t resdata_len) { debug(2, "PalAnim::loadPalAnim(): Entry %d: Loading %d palette indices.\n", i, pal_count); - test_p = calloc(1, sizeof(char) * pal_count); - if (test_p == NULL) { - warning("PalAnim::loadPalAnim(): Allocation failure"); - return MEM; - } - + test_p = malloc(sizeof(char) * pal_count); _entries[i].pal_index = (byte *)test_p; debug(2, "PalAnim::loadPalAnim(): Entry %d: Loading %d SAGA_COLOR structures.", i, color_count); - test_p = calloc(1, sizeof(Color) * color_count); - if (test_p == NULL) { - warning("PalAnim::loadPalAnim(): Allocation failure"); - return MEM; - } - + test_p = malloc(sizeof(Color) * color_count); _entries[i].colors = (Color *)test_p; for (p = 0; p < pal_count; p++) { diff --git a/engines/saga/puzzle.cpp b/engines/saga/puzzle.cpp index 59cb50dcf3..2835775320 100644 --- a/engines/saga/puzzle.cpp +++ b/engines/saga/puzzle.cpp @@ -31,13 +31,14 @@ #include "saga/sprite.h" #include "saga/puzzle.h" #include "saga/render.h" -#include "saga/sagaresnames.h" #include "common/system.h" #include "common/timer.h" namespace Saga { +#define ITE_ACTOR_PUZZLE 176 + #define PUZZLE_X_OFFSET 72 #define PUZZLE_Y_OFFSET 46 @@ -45,6 +46,21 @@ namespace Saga { #define PUZZLE_MOVED 0x04 // 1 when somewhere in the box #define PUZZLE_ALL_SET PUZZLE_FIT | PUZZLE_MOVED +// Puzzle portraits +#define RID_ITE_SAKKA_APPRAISING 6 +#define RID_ITE_SAKKA_DENIAL 7 +#define RID_ITE_SAKKA_EXCITED 8 +#define RID_ITE_JFERRET_SERIOUS 9 +#define RID_ITE_JFERRET_GOOFY 10 +#define RID_ITE_JFERRET_ALOOF 11 + +const char portraitList[] = { + RID_ITE_JFERRET_SERIOUS, + RID_ITE_JFERRET_GOOFY, + RID_ITE_JFERRET_SERIOUS, + RID_ITE_JFERRET_GOOFY, + RID_ITE_JFERRET_ALOOF +}; enum rifOptions { kROLater = 0, diff --git a/engines/saga/saga.cpp b/engines/saga/saga.cpp index 8200526ecf..40eb32b276 100644 --- a/engines/saga/saga.cpp +++ b/engines/saga/saga.cpp @@ -53,7 +53,6 @@ #include "saga/music.h" #include "saga/palanim.h" #include "saga/objectmap.h" -#include "saga/sagaresnames.h" namespace Saga { @@ -251,7 +250,7 @@ int SagaEngine::go() { _scene->changeScene(ConfMan.getInt("start_scene"), 0, kTransitionNoFade); } else if (ConfMan.hasKey("boot_param")) { if (getGameType() == GType_ITE) - _interface->addToInventory(_actor->objIndexToId(ITE_OBJ_MAGIC_HAT)); + _interface->addToInventory(_actor->objIndexToId(0)); // Magic hat _scene->changeScene(ConfMan.getInt("boot_param"), 0, kTransitionNoFade); } else if (ConfMan.hasKey("save_slot")) { // First scene sets up palette @@ -421,25 +420,25 @@ const char *SagaEngine::getTextString(int textStringId) { void SagaEngine::getExcuseInfo(int verb, const char *&textString, int &soundResourceId) { textString = NULL; - if (verb == _script->getVerbType(kVerbPickUp)) { - textString = getTextString(kTextICantPickup); - soundResourceId = RID_BOAR_VOICE_007; - } else - if (verb == _script->getVerbType(kVerbLookAt)) { - textString = getTextString(kTextNothingSpecial); - soundResourceId = RID_BOAR_VOICE_006; - } - if (verb == _script->getVerbType(kVerbOpen)) { + if (verb == _script->getVerbType(kVerbOpen)) { textString = getTextString(kTextNoPlaceToOpen); - soundResourceId = RID_BOAR_VOICE_000; - } - if (verb == _script->getVerbType(kVerbClose)) { + soundResourceId = 239; // Boar voice 0 + } + if (verb == _script->getVerbType(kVerbClose)) { textString = getTextString(kTextNoOpening); - soundResourceId = RID_BOAR_VOICE_002; - } - if (verb == _script->getVerbType(kVerbUse)) { + soundResourceId = 241; // Boar voice 2 + } + if (verb == _script->getVerbType(kVerbUse)) { textString = getTextString(kTextDontKnow); - soundResourceId = RID_BOAR_VOICE_005; + soundResourceId = 244; // Boar voice 5 + } + if (verb == _script->getVerbType(kVerbLookAt)) { + textString = getTextString(kTextNothingSpecial); + soundResourceId = 245; // Boar voice 6 + } + if (verb == _script->getVerbType(kVerbPickUp)) { + textString = getTextString(kTextICantPickup); + soundResourceId = 246; // Boar voice 7 } } diff --git a/engines/saga/saga.h b/engines/saga/saga.h index 35c3736b31..4fd789cb4e 100644 --- a/engines/saga/saga.h +++ b/engines/saga/saga.h @@ -82,11 +82,11 @@ using Common::MemoryReadStreamEndian; #define OBJECT_TYPE_MASK ((1 << OBJECT_TYPE_SHIFT) - 1) #define OBJ_SPRITE_BASE 9 +#define IHNM_OBJ_PROFILE 0x4000 #define memoryError(Place) error("%s Memory allocation error.", Place) enum ERRORCODE { - MEM = -2,//todo: remove FAILURE = -1, SUCCESS = 0 }; @@ -303,15 +303,17 @@ struct GameResourceDescription { uint32 mainPanelResourceId; uint32 conversePanelResourceId; uint32 optionPanelResourceId; - uint32 warningPanelResourceId; - uint32 warningPanelSpritesResourceId; uint32 mainSpritesResourceId; uint32 mainPanelSpritesResourceId; - uint32 optionPanelSpritesResourceId; - uint32 defaultPortraitsResourceId; - uint32 psychicProfileResourceId; uint32 mainStringsResourceId; + // ITE specific resources uint32 actorsStringsResourceId; + uint32 defaultPortraitsResourceId; + // IHNM specific resources + uint32 optionPanelSpritesResourceId; + uint32 warningPanelResourceId; + uint32 warningPanelSpritesResourceId; + uint32 psychicProfileResourceId; }; struct GameFontDescription { @@ -322,9 +324,7 @@ struct GameDisplayInfo; struct GameSoundInfo { GameSoundTypes resourceType; - long frequency; int sampleBits; - bool stereo; bool isBigEndian; bool isSigned; }; diff --git a/engines/saga/sagaresnames.h b/engines/saga/sagaresnames.h deleted file mode 100644 index 5bce483c3e..0000000000 --- a/engines/saga/sagaresnames.h +++ /dev/null @@ -1,274 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -// Descriptive names for game resource numbers - -#ifndef SAGA_RESOURCENAMES_H -#define SAGA_RESOURCENAMES_H - -namespace Saga { - -// Prefix RID_ means Resource Id - -// Lookup tables -#define RID_ITE_SCENE_LUT 1806 -#define RID_ITE_SCRIPT_LUT 216 - -#define RID_ITEDEMO_SCENE_LUT 318 -#define RID_ITEDEMO_SCRIPT_LUT 146 - -#define RID_IHNM_SCENE_LUT 1272 -#define RID_IHNM_SCRIPT_LUT 29 -#define RID_IHNM_SFX_LUT 265 - -#define RID_IHNMDEMO_SCENE_LUT 286 -#define RID_IHNMDEMO_SCRIPT_LUT 18 -#define RID_IHNMDEMO_SFX_LUT 222 - -// Object names -#define ITE_OBJ_MAP 14 -#define ITE_OBJ_MAGIC_HAT 0 - -#define IHNM_OBJ_PROFILE 0x4000 - -#define RID_IHNM_DEFAULT_PALETTE 1 - -// Actor names -#define ITE_ACTOR_PUZZLE 176 - -// Scenes -#define ITE_SCENE_INV -1 -#define ITE_SCENE_PUZZLE 26 -#define ITE_SCENE_LODGE 21 -#define ITE_SCENE_ENDCREDIT1 295 - -#define ITE_DEFAULT_SCENE 32 -#define IHNM_DEFAULT_SCENE 151 - -#define ITEDEMO_DEFAULT_SCENE 68 -#define IHNMDEMO_DEFAULT_SCENE 144 - -// Fonts -#define RID_MEDIUM_FONT 0 -#define RID_BIG_FONT 1 -#define RID_SMALL_FONT 2 - -// Interface images -#define RID_ITE_MAIN_PANEL 3 -#define RID_ITE_CONVERSE_PANEL 4 -#define RID_ITE_OPTION_PANEL 5 -#define RID_ITE_MAIN_SPRITES 6 -#define RID_ITE_MAIN_PANEL_SPRITES 7 -#define RID_ITE_MAIN_STRINGS 35 //main strings -#define RID_ITE_ACTOR_NAMES 36 //actors names -#define RID_ITE_DEFAULT_PORTRAITS 125 - -#define RID_ITEDEMO_MAIN_PANEL 2 -#define RID_ITEDEMO_CONVERSE_PANEL 3 -#define RID_ITEDEMO_OPTION_PANEL 3 // FIXME: should be 4 but it is an empty resource. -#define RID_ITEDEMO_MAIN_SPRITES 5 // Proper fix would be not load options panel when demo is running -#define RID_ITEDEMO_MAIN_PANEL_SPRITES 6 -#define RID_ITEDEMO_MAIN_STRINGS 8 //main strings -#define RID_ITEDEMO_ACTOR_NAMES 9 //actors names -#define RID_ITEDEMO_DEFAULT_PORTRAITS 80 - -#define RID_ITE_TYCHO_MAP 1686 -#define RID_ITE_SPR_XHAIR1 (73 + 9) -#define RID_ITE_SPR_XHAIR2 (74 + 9) - -#define RID_IHNM_MAIN_PANEL 9 -#define RID_IHNM_CONVERSE_PANEL 10 -#define RID_IHNM_HOURGLASS_CURSOR 11 -#define RID_IHNM_MAIN_SPRITES 12 -#define RID_IHNM_MAIN_PANEL_SPRITES 12 -#define RID_IHNM_ARROW_SPRITES 13 -#define RID_IHNM_SAVEREMINDER_SPRITES 14 -#define RID_IHNM_OPTION_PANEL 15 -#define RID_IHNM_OPTION_PANEL_SPRITES 16 -#define RID_IHNM_WARNING_PANEL 17 -#define RID_IHNM_WARNING_PANEL_SPRITES 18 -#define RID_IHNM_BOSS_SCREEN 19 -#define RID_IHNM_PROFILE_BG 20 -#define RID_IHNM_MAIN_STRINGS 21 - -#define RID_IHNMDEMO_MAIN_PANEL 5 -#define RID_IHNMDEMO_CONVERSE_PANEL 6 -#define RID_IHNMDEMO_HOURGLASS_CURSOR 6 // Does not exist in the demo -#define RID_IHNMDEMO_MAIN_SPRITES 7 -#define RID_IHNMDEMO_MAIN_PANEL_SPRITES 7 -#define RID_IHNMDEMO_ARROW_SPRITES 8 -#define RID_IHNMDEMO_SAVEREMINDER_SPRITES 9 -#define RID_IHNMDEMO_OPTION_PANEL 10 -#define RID_IHNMDEMO_OPTION_PANEL_SPRITES 11 -#define RID_IHNMDEMO_WARNING_PANEL 12 -#define RID_IHNMDEMO_WARNING_PANEL_SPRITES 13 -#define RID_IHNMDEMO_BOSS_SCREEN 14 // Does not exist in the demo -#define RID_IHNMDEMO_PROFILE_BG 15 -#define RID_IHNMDEMO_MAIN_STRINGS 16 - -// Puzzle portraits -#define RID_ITE_SAKKA_APPRAISING 6 -#define RID_ITE_SAKKA_DENIAL 7 -#define RID_ITE_SAKKA_EXCITED 8 -#define RID_ITE_JFERRET_SERIOUS 9 -#define RID_ITE_JFERRET_GOOFY 10 -#define RID_ITE_JFERRET_ALOOF 11 - -// ITE Scene resource numbers -#define RID_ITE_OVERMAP_SCENE 226 -#define RID_ITE_INTRO_ANIM_SCENE 1538 -#define RID_ITE_CAVE_SCENE_1 1542 -#define RID_ITE_CAVE_SCENE_2 1545 -#define RID_ITE_CAVE_SCENE_3 1548 -#define RID_ITE_CAVE_SCENE_4 1551 - -#define RID_ITE_VALLEY_SCENE 1556 -#define RID_ITE_TREEHOUSE_SCENE 1560 -#define RID_ITE_FAIREPATH_SCENE 1564 -#define RID_ITE_FAIRETENT_SCENE 1567 - -#define RID_ITE_INTRO_ANIM_STARTFRAME 1529 - -#define RID_ITE_INTRO_ANIM_1 1530 -#define RID_ITE_INTRO_ANIM_2 1531 -#define RID_ITE_INTRO_ANIM_3 1532 -#define RID_ITE_INTRO_ANIM_4 1533 -#define RID_ITE_INTRO_ANIM_5 1534 -#define RID_ITE_INTRO_ANIM_6 1535 -#define RID_ITE_INTRO_ANIM_7 1536 - -#define RID_ITE_CAVE_IMG_1 1540 -#define RID_ITE_CAVE_IMG_2 1543 -#define RID_ITE_CAVE_IMG_3 1546 -#define RID_ITE_CAVE_IMG_4 1549 - -#define RID_ITE_INTRO_IMG_1 1552 -#define RID_ITE_INTRO_IMG_2 1557 -#define RID_ITE_INTRO_IMG_3 1561 -#define RID_ITE_INTRO_IMG_4 1565 - -// ITE voices -#define RID_CAVE_VOICE_0 0 -#define RID_CAVE_VOICE_1 1 -#define RID_CAVE_VOICE_2 2 -#define RID_CAVE_VOICE_3 3 -#define RID_CAVE_VOICE_4 4 -#define RID_CAVE_VOICE_5 5 -#define RID_CAVE_VOICE_6 6 -#define RID_CAVE_VOICE_7 7 -#define RID_CAVE_VOICE_8 8 -#define RID_CAVE_VOICE_9 9 -#define RID_CAVE_VOICE_10 10 -#define RID_CAVE_VOICE_11 11 -#define RID_CAVE_VOICE_12 12 -#define RID_CAVE_VOICE_13 13 - -#define RID_SCENE1_VOICE_009 57 -//TODO: fill it -#define RID_SCENE1_VOICE_138 186 - -#define RID_BOAR_VOICE_000 239 -#define RID_BOAR_VOICE_002 241 -#define RID_BOAR_VOICE_005 244 -#define RID_BOAR_VOICE_006 245 -#define RID_BOAR_VOICE_007 246 - -// Music -#define MUSIC_1 9 -#define MUSIC_2 10 -#define MUSIC_SUNSPOT 26 - -// TODO: If the sound effects are numbered sequentially, we don't really need -// these constants. But for now they might be useful for debugging. - -// Sound effects - -#define FX_DOOR_OPEN 14 -#define FX_DOOR_CLOSE 15 -#define FX_RUSH_WATER 16 -#define FX_CRICKET 17 -#define FX_PORTICULLIS 18 -#define FX_CLOCK_1 19 -#define FX_CLOCK_2 20 -#define FX_DAM_MACHINE 21 -#define FX_HUM1 22 -#define FX_HUM2 23 -#define FX_HUM3 24 -#define FX_HUM4 25 -#define FX_STREAM 26 -#define FX_SURF 27 -#define FX_FIRELOOP 28 -#define FX_SCRAPING 29 -#define FX_BEE_SWARM 30 -#define FX_SQUEAKBOARD 31 -#define FX_KNOCK 32 -#define FX_COINS 33 -#define FX_STORM 34 -#define FX_DOOR_CLOSE_2 35 -#define FX_ARCWELD 36 -#define FX_RETRACT_ORB 37 -#define FX_DRAGON 38 -#define FX_SNORES 39 -#define FX_SPLASH 40 -#define FX_LOBBY_DOOR 41 -#define FX_CHIRP_LOOP 42 -#define FX_DOOR_CREAK 43 -#define FX_SPOON_DIG 44 -#define FX_CROW 45 -#define FX_COLDWIND 46 -#define FX_TOOL_SND_1 47 -#define FX_TOOL_SND_2 48 -#define FX_TOOL_SND_3 49 -#define FX_DOOR_METAL 50 -#define FX_WATER_LOOP_S 51 -#define FX_WATER_LOOP_L 52 -#define FX_DOOR_OPEN_2 53 -#define FX_JAIL_DOOR 54 -#define FX_KILN_FIRE 55 -#define FX_DUMMY 56 - -// These are only in the CD version - -#define FX_CROWD_01 57 -#define FX_CROWD_02 58 -#define FX_CROWD_03 59 -#define FX_CROWD_04 60 -#define FX_CROWD_05 61 -#define FX_CROWD_06 62 -#define FX_CROWD_07 63 -#define FX_CROWD_08 64 -#define FX_CROWD_09 65 -#define FX_CROWD_10 66 -#define FX_CROWD_11 67 -#define FX_CROWD_12 68 -#define FX_CROWD_13 69 -#define FX_CROWD_14 70 -#define FX_CROWD_15 71 -#define FX_CROWD_16 72 -#define FX_CROWD_17 73 - -} // End of namespace Saga - -#endif diff --git a/engines/saga/saveload.cpp b/engines/saga/saveload.cpp index 53290cbc5d..8d00f9d2d0 100644 --- a/engines/saga/saveload.cpp +++ b/engines/saga/saveload.cpp @@ -37,7 +37,6 @@ #include "saga/isomap.h" #include "saga/music.h" #include "saga/render.h" -#include "saga/sagaresnames.h" #include "saga/scene.h" #include "saga/script.h" diff --git a/engines/saga/scene.cpp b/engines/saga/scene.cpp index 4520c3f406..c3c1587822 100644 --- a/engines/saga/scene.cpp +++ b/engines/saga/scene.cpp @@ -43,7 +43,6 @@ #include "saga/scene.h" #include "saga/actor.h" #include "saga/rscfile.h" -#include "saga/sagaresnames.h" #include "graphics/iff.h" #include "common/util.h" diff --git a/engines/saga/scene.h b/engines/saga/scene.h index 0e4c0ed66a..723792f050 100644 --- a/engines/saga/scene.h +++ b/engines/saga/scene.h @@ -38,9 +38,21 @@ namespace Saga { //#define SCENE_DEBUG // for scene debugging #define SCENE_DOORS_MAX 16 - #define NO_CHAPTER_CHANGE -2 +// Scenes +#define ITE_SCENE_INV -1 +#define ITE_SCENE_PUZZLE 26 +#define ITE_SCENE_LODGE 21 +#define ITE_SCENE_ENDCREDIT1 295 +#define ITE_SCENE_OVERMAP 226 + +// Default scenes +#define ITE_DEFAULT_SCENE 32 +#define IHNM_DEFAULT_SCENE 151 +#define ITEDEMO_DEFAULT_SCENE 68 +#define IHNMDEMO_DEFAULT_SCENE 144 + class ObjectMap; struct Event; diff --git a/engines/saga/sfuncs.cpp b/engines/saga/sfuncs.cpp index 4862ce3be0..ea61f5ce04 100644 --- a/engines/saga/sfuncs.cpp +++ b/engines/saga/sfuncs.cpp @@ -47,7 +47,6 @@ #include "saga/scene.h" #include "saga/isomap.h" -#include "saga/sagaresnames.h" #include "common/config-manager.h" diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp index 9d3d4a9afa..8d269fb3e8 100644 --- a/engines/saga/sndres.cpp +++ b/engines/saga/sndres.cpp @@ -28,7 +28,6 @@ #include "saga/saga.h" #include "saga/itedata.h" -#include "saga/sagaresnames.h" #include "saga/rscfile.h" #include "saga/sndres.h" #include "saga/sound.h" @@ -43,6 +42,9 @@ namespace Saga { +#define RID_IHNM_SFX_LUT 265 +#define RID_IHNMDEMO_SFX_LUT 222 + SndRes::SndRes(SagaEngine *vm) : _vm(vm) { // Load sound module resource file contexts _sfxContext = _vm->_resource->getContext(GAME_SOUNDFILE); @@ -259,11 +261,11 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff switch (resourceType) { case kSoundPCM: - buffer.frequency = soundInfo->frequency; + buffer.frequency = 22050; buffer.isSigned = soundInfo->isSigned; buffer.sampleBits = soundInfo->sampleBits; buffer.size = soundResourceLength; - buffer.stereo = soundInfo->stereo; + buffer.stereo = false; if (onlyHeader) { buffer.buffer = NULL; free(soundResource); @@ -273,11 +275,11 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff result = true; break; case kSoundMacPCM: - buffer.frequency = soundInfo->frequency; + buffer.frequency = 22050; buffer.isSigned = soundInfo->isSigned; buffer.sampleBits = soundInfo->sampleBits; buffer.size = soundResourceLength - 36; - buffer.stereo = soundInfo->stereo; + buffer.stereo = false; if (onlyHeader) { buffer.buffer = NULL; } else { @@ -288,10 +290,10 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff result = true; break; case kSoundVOX: - buffer.frequency = soundInfo->frequency; + buffer.frequency = 22050; buffer.isSigned = soundInfo->isSigned; buffer.sampleBits = soundInfo->sampleBits; - buffer.stereo = soundInfo->stereo; + buffer.stereo = false; buffer.size = soundResourceLength * 4; if (onlyHeader) { buffer.buffer = NULL; diff --git a/engines/saga/sprite.cpp b/engines/saga/sprite.cpp index b5c675a403..e9d002819c 100644 --- a/engines/saga/sprite.cpp +++ b/engines/saga/sprite.cpp @@ -29,7 +29,6 @@ #include "saga/gfx.h" #include "saga/scene.h" -#include "saga/sagaresnames.h" #include "saga/rscfile.h" #include "saga/font.h" @@ -37,6 +36,11 @@ namespace Saga { +#define RID_IHNM_ARROW_SPRITES 13 +#define RID_IHNM_SAVEREMINDER_SPRITES 14 +#define RID_IHNMDEMO_ARROW_SPRITES 8 +#define RID_IHNMDEMO_SAVEREMINDER_SPRITES 9 + Sprite::Sprite(SagaEngine *vm) : _vm(vm) { debug(8, "Initializing sprite subsystem..."); diff --git a/engines/saga/sthread.cpp b/engines/saga/sthread.cpp index bc18632659..c1b289a060 100644 --- a/engines/saga/sthread.cpp +++ b/engines/saga/sthread.cpp @@ -34,10 +34,12 @@ #include "saga/script.h" #include "saga/scene.h" -#include "saga/sagaresnames.h" namespace Saga { +#define RID_SCENE1_VOICE_START 57 +#define RID_SCENE1_VOICE_END 186 + ScriptThread *Script::createThread(uint16 scriptModuleNumber, uint16 scriptEntryPointNumber) { ScriptThread *newThread; @@ -653,8 +655,8 @@ bool Script::runThread(ScriptThread *thread, uint instructionLimit) { if (_vm->getGameId() == GID_ITE_DISK_G) { // special ITE dos if ((_vm->_scene->currentSceneNumber() == ITE_DEFAULT_SCENE) && - (iparam1 >= 288) && (iparam1 <= (RID_SCENE1_VOICE_138 - RID_SCENE1_VOICE_009 + 288))) { - sampleResourceId = RID_SCENE1_VOICE_009 + iparam1 - 288; + (iparam1 >= 288) && (iparam1 <= (RID_SCENE1_VOICE_END - RID_SCENE1_VOICE_START + 288))) { + sampleResourceId = RID_SCENE1_VOICE_START + iparam1 - 288; } } else { if (thread->_voiceLUT->voicesCount > first) { -- cgit v1.2.3 From eea2aadbd85b10ba0e5314e0c952c2b6b800bee7 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 May 2008 11:14:30 +0000 Subject: Renamed files for consistency svn-id: r32283 --- engines/saga/ihnm_introproc.cpp | 285 ---------- engines/saga/introproc_ihnm.cpp | 285 ++++++++++ engines/saga/introproc_ite.cpp | 1139 +++++++++++++++++++++++++++++++++++++++ engines/saga/ite_introproc.cpp | 1139 --------------------------------------- engines/saga/module.mk | 4 +- 5 files changed, 1426 insertions(+), 1426 deletions(-) delete mode 100644 engines/saga/ihnm_introproc.cpp create mode 100644 engines/saga/introproc_ihnm.cpp create mode 100644 engines/saga/introproc_ite.cpp delete mode 100644 engines/saga/ite_introproc.cpp diff --git a/engines/saga/ihnm_introproc.cpp b/engines/saga/ihnm_introproc.cpp deleted file mode 100644 index 5f1d0157d5..0000000000 --- a/engines/saga/ihnm_introproc.cpp +++ /dev/null @@ -1,285 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -// "I Have No Mouth" Intro sequence scene procedures - -#include "saga/saga.h" -#include "saga/gfx.h" - -#include "saga/animation.h" -#include "saga/events.h" -#include "saga/interface.h" -#include "saga/render.h" -#include "saga/rscfile.h" -#include "saga/sndres.h" -#include "saga/music.h" - -#include "saga/scene.h" - -#include "common/events.h" - -namespace Saga { - -// IHNM cutaway intro resource IDs -#define RID_IHNM_INTRO_CUTAWAYS 39 -#define RID_IHNMDEMO_INTRO_CUTAWAYS 25 - -int Scene::IHNMStartProc() { - LoadSceneParams firstScene; - - IHNMLoadCutaways(); - - if (_vm->getGameId() != GID_IHNM_DEMO) { - int logoLength = -168; - - if (_vm->getLanguage() == Common::DE_DEU || _vm->getLanguage() == Common::ES_ESP) - logoLength = -128; - - // Play Cyberdreams logo for 168 frames - if (!playTitle(0, logoLength, true)) { - // Play Dreamers Guild logo for 10 seconds - if (!playLoopingTitle(1, 10)) { - // Play the title music - _vm->_music->play(1, MUSIC_NORMAL); - // Play title screen - playTitle(2, 17); - } - } - } else { - _vm->_music->play(1, MUSIC_NORMAL); - playTitle(0, 10); - playTitle(2, 12); - } - - _vm->_music->setVolume(0, 1000); - _vm->_anim->freeCutawayList(); - - // Queue first scene - firstScene.loadFlag = kLoadBySceneNumber; - firstScene.sceneDescriptor = -1; - firstScene.sceneDescription = NULL; - firstScene.sceneSkipTarget = false; - firstScene.sceneProc = NULL; - firstScene.transitionType = kTransitionFade; - firstScene.actorsEntrance = 0; - firstScene.chapter = -1; - - _vm->_scene->queueScene(&firstScene); - - return SUCCESS; -} - -int Scene::IHNMCreditsProc() { - IHNMLoadCutaways(); - - _vm->_music->play(0, MUSIC_NORMAL); - - if (_vm->getGameId() != GID_IHNM_DEMO) { - // Display the credits for 400 frames - playTitle(4, -400, true); - } else { - // Display sales info for 60 seconds - playTitle(3, 60, true); - } - - _vm->_music->setVolume(0, 1000); - _vm->_anim->freeCutawayList(); - - return SUCCESS; -} - -void Scene::IHNMLoadCutaways() { - ResourceContext *resourceContext; - //ResourceContext *soundContext; - byte *resourcePointer; - size_t resourceLength; - - resourceContext = _vm->_resource->getContext(GAME_RESOURCEFILE); - if (resourceContext == NULL) { - error("Scene::IHNMStartProc() resource context not found"); - } - - if (_vm->getGameId() != GID_IHNM_DEMO) - _vm->_resource->loadResource(resourceContext, RID_IHNM_INTRO_CUTAWAYS, resourcePointer, resourceLength); - else - _vm->_resource->loadResource(resourceContext, RID_IHNMDEMO_INTRO_CUTAWAYS, resourcePointer, resourceLength); - - if (resourceLength == 0) { - error("Scene::IHNMStartProc() Can't load cutaway list"); - } - - // Load the cutaways for the title screens - _vm->_anim->loadCutawayList(resourcePointer, resourceLength); -} - -bool Scene::checkKey() { - Common::Event event; - bool res = false; - - while (_vm->_eventMan->pollEvent(event)) { - switch (event.type) { - case Common::EVENT_QUIT: - res = true; - _vm->shutDown(); - break; - case Common::EVENT_KEYDOWN: - // Don't react to modifier keys alone. The original did - // non, and the user may want to change scaler without - // terminating the intro. - if (event.kbd.ascii) - res = true; - break; - default: - break; - } - } - - return res; -} - -bool Scene::playTitle(int title, int time, int mode) { - bool interrupted = false; - Surface *backBufferSurface; - int startTime = _vm->_system->getMillis(); - int frameTime = 0; - int curTime; - int assignedId; - int phase = 0; - bool done = false; - bool playParameter = true; - static PalEntry cur_pal[PAL_ENTRIES]; - static PalEntry pal_cut[PAL_ENTRIES]; - - backBufferSurface = _vm->_render->getBackGroundSurface(); - - // Load the cutaway - - _vm->_anim->setCutAwayMode(mode); - _vm->_frameCount = 0; - - _vm->_gfx->getCurrentPal(cur_pal); - - assignedId = _vm->_anim->playCutaway(title, false); - - _vm->_gfx->getCurrentPal(pal_cut); - - while (!done) { - curTime = _vm->_system->getMillis(); - - switch (phase) { - case 0: // fadeout - case 1: // fadeout 100% - case 7: // fadeout - case 8: // fadeout 100% - _vm->_gfx->palToBlack(cur_pal, (double)(curTime - startTime) / kNormalFadeDuration); - // fall through - - case 3: // fadein - case 4: // fadein 100% - if (phase == 3 || phase == 4) - _vm->_gfx->blackToPal(pal_cut, (double)(curTime - startTime) / kNormalFadeDuration); - - if (curTime - startTime > kNormalFadeDuration) { - phase++; - if (phase == 2 || phase == 5 || phase == 9) - startTime = curTime; - break; - } - break; - - case 2: // display background - _vm->_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0, - backBufferSurface->w, backBufferSurface->h); - phase++; - startTime = curTime; - break; - - case 5: // playback - if (time < 0) { - if (_vm->_frameCount >= -time) { - phase++; - break; - } - } else { - if (curTime - startTime >= time * 1000) { - phase++; - break; - } - } - - if (checkKey()) { - _vm->_scene->cutawaySkip(); - interrupted = true; - phase = 6; // end playback and fade out - break; - } - - if (_vm->_anim->getCycles(assignedId)) { // IHNM demo has 0 frames logo - if (curTime - frameTime > _vm->_anim->getFrameTime(assignedId)) { - _vm->_anim->play(assignedId, 0, playParameter); - - if (playParameter == true) // Do not loop animations - playParameter = false; - - frameTime = curTime; - - _vm->_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0, - backBufferSurface->w, backBufferSurface->h); - } - - } - break; - - case 6: // playback end - startTime = curTime; - _vm->_gfx->getCurrentPal(cur_pal); - phase++; - break; - - case 9: // end - done = true; - break; - } - - _vm->_system->updateScreen(); - _vm->_system->delayMillis(10); - } - - // Clean up - - _vm->_anim->endVideo(); - - memset((byte *)backBufferSurface->pixels, 0, backBufferSurface->w * backBufferSurface->h); - _vm->_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0, - backBufferSurface->w, backBufferSurface->h); - - return interrupted; -} - -bool Scene::playLoopingTitle(int title, int seconds) { - return playTitle(title, seconds, kPanelCutaway); -} - -} // End of namespace Saga diff --git a/engines/saga/introproc_ihnm.cpp b/engines/saga/introproc_ihnm.cpp new file mode 100644 index 0000000000..5f1d0157d5 --- /dev/null +++ b/engines/saga/introproc_ihnm.cpp @@ -0,0 +1,285 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +// "I Have No Mouth" Intro sequence scene procedures + +#include "saga/saga.h" +#include "saga/gfx.h" + +#include "saga/animation.h" +#include "saga/events.h" +#include "saga/interface.h" +#include "saga/render.h" +#include "saga/rscfile.h" +#include "saga/sndres.h" +#include "saga/music.h" + +#include "saga/scene.h" + +#include "common/events.h" + +namespace Saga { + +// IHNM cutaway intro resource IDs +#define RID_IHNM_INTRO_CUTAWAYS 39 +#define RID_IHNMDEMO_INTRO_CUTAWAYS 25 + +int Scene::IHNMStartProc() { + LoadSceneParams firstScene; + + IHNMLoadCutaways(); + + if (_vm->getGameId() != GID_IHNM_DEMO) { + int logoLength = -168; + + if (_vm->getLanguage() == Common::DE_DEU || _vm->getLanguage() == Common::ES_ESP) + logoLength = -128; + + // Play Cyberdreams logo for 168 frames + if (!playTitle(0, logoLength, true)) { + // Play Dreamers Guild logo for 10 seconds + if (!playLoopingTitle(1, 10)) { + // Play the title music + _vm->_music->play(1, MUSIC_NORMAL); + // Play title screen + playTitle(2, 17); + } + } + } else { + _vm->_music->play(1, MUSIC_NORMAL); + playTitle(0, 10); + playTitle(2, 12); + } + + _vm->_music->setVolume(0, 1000); + _vm->_anim->freeCutawayList(); + + // Queue first scene + firstScene.loadFlag = kLoadBySceneNumber; + firstScene.sceneDescriptor = -1; + firstScene.sceneDescription = NULL; + firstScene.sceneSkipTarget = false; + firstScene.sceneProc = NULL; + firstScene.transitionType = kTransitionFade; + firstScene.actorsEntrance = 0; + firstScene.chapter = -1; + + _vm->_scene->queueScene(&firstScene); + + return SUCCESS; +} + +int Scene::IHNMCreditsProc() { + IHNMLoadCutaways(); + + _vm->_music->play(0, MUSIC_NORMAL); + + if (_vm->getGameId() != GID_IHNM_DEMO) { + // Display the credits for 400 frames + playTitle(4, -400, true); + } else { + // Display sales info for 60 seconds + playTitle(3, 60, true); + } + + _vm->_music->setVolume(0, 1000); + _vm->_anim->freeCutawayList(); + + return SUCCESS; +} + +void Scene::IHNMLoadCutaways() { + ResourceContext *resourceContext; + //ResourceContext *soundContext; + byte *resourcePointer; + size_t resourceLength; + + resourceContext = _vm->_resource->getContext(GAME_RESOURCEFILE); + if (resourceContext == NULL) { + error("Scene::IHNMStartProc() resource context not found"); + } + + if (_vm->getGameId() != GID_IHNM_DEMO) + _vm->_resource->loadResource(resourceContext, RID_IHNM_INTRO_CUTAWAYS, resourcePointer, resourceLength); + else + _vm->_resource->loadResource(resourceContext, RID_IHNMDEMO_INTRO_CUTAWAYS, resourcePointer, resourceLength); + + if (resourceLength == 0) { + error("Scene::IHNMStartProc() Can't load cutaway list"); + } + + // Load the cutaways for the title screens + _vm->_anim->loadCutawayList(resourcePointer, resourceLength); +} + +bool Scene::checkKey() { + Common::Event event; + bool res = false; + + while (_vm->_eventMan->pollEvent(event)) { + switch (event.type) { + case Common::EVENT_QUIT: + res = true; + _vm->shutDown(); + break; + case Common::EVENT_KEYDOWN: + // Don't react to modifier keys alone. The original did + // non, and the user may want to change scaler without + // terminating the intro. + if (event.kbd.ascii) + res = true; + break; + default: + break; + } + } + + return res; +} + +bool Scene::playTitle(int title, int time, int mode) { + bool interrupted = false; + Surface *backBufferSurface; + int startTime = _vm->_system->getMillis(); + int frameTime = 0; + int curTime; + int assignedId; + int phase = 0; + bool done = false; + bool playParameter = true; + static PalEntry cur_pal[PAL_ENTRIES]; + static PalEntry pal_cut[PAL_ENTRIES]; + + backBufferSurface = _vm->_render->getBackGroundSurface(); + + // Load the cutaway + + _vm->_anim->setCutAwayMode(mode); + _vm->_frameCount = 0; + + _vm->_gfx->getCurrentPal(cur_pal); + + assignedId = _vm->_anim->playCutaway(title, false); + + _vm->_gfx->getCurrentPal(pal_cut); + + while (!done) { + curTime = _vm->_system->getMillis(); + + switch (phase) { + case 0: // fadeout + case 1: // fadeout 100% + case 7: // fadeout + case 8: // fadeout 100% + _vm->_gfx->palToBlack(cur_pal, (double)(curTime - startTime) / kNormalFadeDuration); + // fall through + + case 3: // fadein + case 4: // fadein 100% + if (phase == 3 || phase == 4) + _vm->_gfx->blackToPal(pal_cut, (double)(curTime - startTime) / kNormalFadeDuration); + + if (curTime - startTime > kNormalFadeDuration) { + phase++; + if (phase == 2 || phase == 5 || phase == 9) + startTime = curTime; + break; + } + break; + + case 2: // display background + _vm->_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0, + backBufferSurface->w, backBufferSurface->h); + phase++; + startTime = curTime; + break; + + case 5: // playback + if (time < 0) { + if (_vm->_frameCount >= -time) { + phase++; + break; + } + } else { + if (curTime - startTime >= time * 1000) { + phase++; + break; + } + } + + if (checkKey()) { + _vm->_scene->cutawaySkip(); + interrupted = true; + phase = 6; // end playback and fade out + break; + } + + if (_vm->_anim->getCycles(assignedId)) { // IHNM demo has 0 frames logo + if (curTime - frameTime > _vm->_anim->getFrameTime(assignedId)) { + _vm->_anim->play(assignedId, 0, playParameter); + + if (playParameter == true) // Do not loop animations + playParameter = false; + + frameTime = curTime; + + _vm->_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0, + backBufferSurface->w, backBufferSurface->h); + } + + } + break; + + case 6: // playback end + startTime = curTime; + _vm->_gfx->getCurrentPal(cur_pal); + phase++; + break; + + case 9: // end + done = true; + break; + } + + _vm->_system->updateScreen(); + _vm->_system->delayMillis(10); + } + + // Clean up + + _vm->_anim->endVideo(); + + memset((byte *)backBufferSurface->pixels, 0, backBufferSurface->w * backBufferSurface->h); + _vm->_system->copyRectToScreen((byte *)backBufferSurface->pixels, backBufferSurface->w, 0, 0, + backBufferSurface->w, backBufferSurface->h); + + return interrupted; +} + +bool Scene::playLoopingTitle(int title, int seconds) { + return playTitle(title, seconds, kPanelCutaway); +} + +} // End of namespace Saga diff --git a/engines/saga/introproc_ite.cpp b/engines/saga/introproc_ite.cpp new file mode 100644 index 0000000000..a33a55c375 --- /dev/null +++ b/engines/saga/introproc_ite.cpp @@ -0,0 +1,1139 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +// Intro sequence scene procedures + +#include "saga/saga.h" +#include "saga/gfx.h" + +#include "saga/animation.h" +#include "saga/events.h" +#include "saga/font.h" +#include "saga/sndres.h" +#include "saga/palanim.h" +#include "saga/music.h" + +#include "saga/scene.h" +#include "saga/rscfile.h" + +namespace Saga { + +using Common::UNK_LANG; +using Common::EN_ANY; +using Common::DE_DEU; +using Common::IT_ITA; + +// Intro scenes +#define RID_ITE_INTRO_ANIM_SCENE 1538 +#define RID_ITE_CAVE_SCENE_1 1542 +#define RID_ITE_CAVE_SCENE_2 1545 +#define RID_ITE_CAVE_SCENE_3 1548 +#define RID_ITE_CAVE_SCENE_4 1551 +#define RID_ITE_VALLEY_SCENE 1556 +#define RID_ITE_TREEHOUSE_SCENE 1560 +#define RID_ITE_FAIREPATH_SCENE 1564 +#define RID_ITE_FAIRETENT_SCENE 1567 + +// ITE intro music +#define MUSIC_1 9 +#define MUSIC_2 10 + +LoadSceneParams ITE_IntroList[] = { + {RID_ITE_INTRO_ANIM_SCENE, kLoadByResourceId, NULL, Scene::SC_ITEIntroAnimProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, + {RID_ITE_CAVE_SCENE_1, kLoadByResourceId, NULL, Scene::SC_ITEIntroCave1Proc, false, kTransitionFade, 0, NO_CHAPTER_CHANGE}, + {RID_ITE_CAVE_SCENE_2, kLoadByResourceId, NULL, Scene::SC_ITEIntroCave2Proc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, + {RID_ITE_CAVE_SCENE_3, kLoadByResourceId, NULL, Scene::SC_ITEIntroCave3Proc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, + {RID_ITE_CAVE_SCENE_4, kLoadByResourceId, NULL, Scene::SC_ITEIntroCave4Proc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, + {RID_ITE_VALLEY_SCENE, kLoadByResourceId, NULL, Scene::SC_ITEIntroValleyProc, false, kTransitionFade, 0, NO_CHAPTER_CHANGE}, + {RID_ITE_TREEHOUSE_SCENE, kLoadByResourceId, NULL, Scene::SC_ITEIntroTreeHouseProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, + {RID_ITE_FAIREPATH_SCENE, kLoadByResourceId, NULL, Scene::SC_ITEIntroFairePathProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, + {RID_ITE_FAIRETENT_SCENE, kLoadByResourceId, NULL, Scene::SC_ITEIntroFaireTentProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE} +}; + +int Scene::ITEStartProc() { + size_t scenesCount; + size_t i; + + LoadSceneParams firstScene; + LoadSceneParams tempScene; + + scenesCount = ARRAYSIZE(ITE_IntroList); + + for (i = 0; i < scenesCount; i++) { + tempScene = ITE_IntroList[i]; + tempScene.sceneDescriptor = _vm->_resource->convertResourceId(tempScene.sceneDescriptor); + _vm->_scene->queueScene(&tempScene); + } + + + firstScene.loadFlag = kLoadBySceneNumber; + firstScene.sceneDescriptor = _vm->getStartSceneNumber(); + firstScene.sceneDescription = NULL; + firstScene.sceneSkipTarget = true; + firstScene.sceneProc = NULL; + firstScene.transitionType = kTransitionFade; + firstScene.actorsEntrance = 0; + firstScene.chapter = -1; + + _vm->_scene->queueScene(&firstScene); + + return SUCCESS; +} + +Event *Scene::ITEQueueDialogue(Event *q_event, int n_dialogues, const IntroDialogue dialogue[]) { + TextListEntry textEntry; + TextListEntry *entry; + Event event; + int voice_len; + int i; + + // Queue narrator dialogue list + textEntry.knownColor = kKnownColorSubtitleTextColor; + textEntry.effectKnownColor = kKnownColorTransparent; + textEntry.useRect = true; + textEntry.rect.left = 0; + textEntry.rect.right = _vm->getDisplayWidth(); + if (_vm->getLanguage() == Common::DE_DEU) { + textEntry.rect.top = INTRO_DE_CAPTION_Y; + } else if (_vm->getLanguage() == Common::IT_ITA) { + textEntry.rect.top = INTRO_IT_CAPTION_Y; + } else { + textEntry.rect.top = INTRO_CAPTION_Y; + } + textEntry.rect.bottom = _vm->getDisplayHeight(); + textEntry.font = kKnownFontMedium; + textEntry.flags = (FontEffectFlags)(kFontOutline | kFontCentered); + + for (i = 0; i < n_dialogues; i++) { + textEntry.text = dialogue[i].i_str; + entry = _vm->_scene->_textList.addEntry(textEntry); + + // Display text + event.type = kEvTOneshot; + event.code = kTextEvent; + event.op = kEventDisplay; + event.data = entry; + event.time = (i == 0) ? 0 : VOICE_PAD; + q_event = _vm->_events->chain(q_event, &event); + + // Play voice + event.type = kEvTOneshot; + event.code = kVoiceEvent; + event.op = kEventPlay; + event.param = dialogue[i].i_voice_rn; + event.time = 0; + q_event = _vm->_events->chain(q_event, &event); + + voice_len = _vm->_sndRes->getVoiceLength(dialogue[i].i_voice_rn); + if (voice_len < 0) { + voice_len = strlen(dialogue[i].i_str) * VOICE_LETTERLEN; + } + + // Remove text + event.type = kEvTOneshot; + event.code = kTextEvent; + event.op = kEventRemove; + event.data = entry; + event.time = voice_len; + q_event = _vm->_events->chain(q_event, &event); + } + + return q_event; +} + +enum { + kCHeader, + kCText +}; + +enum { + kITEPC = (1 << 0), + kITEPCCD = (1 << 1), + kITEMac = (1 << 2), + kITEWyrmKeep = (1 << 3), + kITEAny = 0xffff, + kITENotWyrmKeep = kITEAny & ~kITEWyrmKeep +}; + +// Queue a page of credits text. The original interpreter did word-wrapping +// automatically. We currently don't. + +Event *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits, const IntroCredit credits[]) { + int game; + Common::Language lang; + + // The assumption here is that all WyrmKeep versions have the same + // credits, regardless of which operating system they're for. + + lang = _vm->getLanguage(); + + if (_vm->getFeatures() & GF_WYRMKEEP) { + game = kITEWyrmKeep; + } else if (_vm->getPlatform() == Common::kPlatformMacintosh) { + game = kITEMac; + } else if (_vm->getGameId() == GID_ITE_CD_G) { + game = kITEPCCD; + } else { + game = kITEPC; + } + + int line_spacing = 0; + int paragraph_spacing; + KnownFont font = kKnownFontSmall; + int i; + + int n_paragraphs = 0; + int credits_height = 0; + + for (i = 0; i < n_credits; i++) { + if (credits[i].lang != lang && credits[i].lang != UNK_LANG) { + continue; + } + + if (!(credits[i].game & game)) { + continue; + } + + switch (credits[i].type) { + case kCHeader: + font = kKnownFontSmall; + line_spacing = 4; + n_paragraphs++; + break; + case kCText: + font = kKnownFontMedium; + line_spacing = 2; + break; + default: + error("Unknown credit type"); + } + + credits_height += (_vm->_font->getHeight(font) + line_spacing); + } + + paragraph_spacing = (200 - credits_height) / (n_paragraphs + 3); + credits_height += (n_paragraphs * paragraph_spacing); + + int y = paragraph_spacing; + + TextListEntry textEntry; + TextListEntry *entry; + Event event; + Event *q_event = NULL; + + textEntry.knownColor = kKnownColorSubtitleTextColor; + textEntry.effectKnownColor = kKnownColorTransparent; + textEntry.flags = (FontEffectFlags)(kFontOutline | kFontCentered); + textEntry.point.x = 160; + + for (i = 0; i < n_credits; i++) { + if (credits[i].lang != lang && credits[i].lang != UNK_LANG) { + continue; + } + + if (!(credits[i].game & game)) { + continue; + } + + switch (credits[i].type) { + case kCHeader: + font = kKnownFontSmall; + line_spacing = 4; + y += paragraph_spacing; + break; + case kCText: + font = kKnownFontMedium; + line_spacing = 2; + break; + default: + break; + } + + textEntry.text = credits[i].string; + textEntry.font = font; + textEntry.point.y = y; + + entry = _vm->_scene->_textList.addEntry(textEntry); + + // Display text + event.type = kEvTOneshot; + event.code = kTextEvent; + event.op = kEventDisplay; + event.data = entry; + event.time = delta_time; + q_event = _vm->_events->queue(&event); + + // Remove text + event.type = kEvTOneshot; + event.code = kTextEvent; + event.op = kEventRemove; + event.data = entry; + event.time = duration; + q_event = _vm->_events->chain(q_event, &event); + + y += (_vm->_font->getHeight(font) + line_spacing); + } + + return q_event; +} + +int Scene::SC_ITEIntroAnimProc(int param, void *refCon) { + return ((Scene *)refCon)->ITEIntroAnimProc(param); +} + +// Handles the introductory Dreamer's Guild / NWC logo animation scene. +int Scene::ITEIntroAnimProc(int param) { + Event event; + Event *q_event; + + switch (param) { + case SCENE_BEGIN:{ + // Background for intro scene is the first frame of the + // intro animation; display it and set the palette + event.type = kEvTOneshot; + event.code = kBgEvent; + event.op = kEventDisplay; + event.param = kEvPSetPalette; + event.time = 0; + q_event = _vm->_events->queue(&event); + + debug(3, "Intro animation procedure started."); + debug(3, "Linking animation resources..."); + + _vm->_anim->setFrameTime(0, ITE_INTRO_FRAMETIME); + + // Link this scene's animation resources for continuous + // playback + int lastAnim; + + if (_vm->getFeatures() & GF_WYRMKEEP) { + if (_vm->getPlatform() == Common::kPlatformMacintosh) { + lastAnim = 3; + } else { + lastAnim = 2; + } + } else { + if (_vm->getPlatform() == Common::kPlatformMacintosh) { + lastAnim = 4; + } else { + lastAnim = 5; + } + } + + for (int i = 0; i < lastAnim; i++) + _vm->_anim->link(i, i+1); + + _vm->_anim->setFlag(lastAnim, ANIM_FLAG_ENDSCENE); + + debug(3, "Beginning animation playback."); + + // Begin the animation + event.type = kEvTOneshot; + event.code = kAnimEvent; + event.op = kEventPlay; + event.param = 0; + event.time = 0; + q_event = _vm->_events->chain(q_event, &event); + + // Queue intro music playback + event.type = kEvTOneshot; + event.code = kMusicEvent; + event.param = MUSIC_1; + event.param2 = MUSIC_LOOP; + event.op = kEventPlay; + event.time = 0; + q_event = _vm->_events->chain(q_event, &event); + } + break; + case SCENE_END: + break; + default: + warning("Illegal scene procedure parameter"); + break; + } + + return 0; +} + +int Scene::SC_ITEIntroCave1Proc(int param, void *refCon) { + return ((Scene *)refCon)->ITEIntroCave1Proc(param); +} + +// Handles first introductory cave painting scene +int Scene::ITEIntroCave1Proc(int param) { + Event event; + Event *q_event; + int lang = 0; + + if (_vm->getLanguage() == Common::DE_DEU) + lang = 1; + else if (_vm->getLanguage() == Common::IT_ITA) + lang = 2; + + static const IntroDialogue dialogue[][4] = { + { { // English + 0, // cave voice 0 + "We see the sky, we see the land, we see the water, " + "and we wonder: Are we the only ones?" + }, + { + 1, // cave voice 1 + "Long before we came to exist, the humans ruled the " + "Earth." + }, + { + 2, // cave voice 2 + "They made marvelous things, and moved whole " + "mountains." + }, + { + 3, // cave voice 3 + "They knew the Secret of Flight, the Secret of " + "Happiness, and other secrets beyond our imagining." + } }, + // ----------------------------------------------------- + { { // German + 0, // cave voice 0 + "Um uns sind der Himmel, das Land und die Seen; und " + "wir fragen uns - sind wir die einzigen?" + }, + { + 1, // cave voice 1 + "Lange vor unserer Zeit herrschten die Menschen " + "\201ber die Erde." + }, + { + 2, // cave voice 2 + "Sie taten wundersame Dinge und versetzten ganze " + "Berge." + }, + { + 3, // cave voice 3 + "Sie kannten das Geheimnis des Fluges, das Geheimnis " + "der Fr\224hlichkeit und andere Geheimnisse, die " + "unsere Vorstellungskraft \201bersteigen." + } }, + // ----------------------------------------------------- + { { // Italian fan translation + 0, // cave voice 0 + "Guardiamo il cielo, guardiamo la terra, guardiamo " + "l'acqua, e ci chiediamo: Siamo forse soli?" + }, + { + 1, // cave voice 1 + "Molto tempo prima che noi esistessimo, gli Umani " + "dominavano la terra." + }, + { + 2, // cave voice 2 + "Fecero cose meravigliose, e mossero intere " + "montagne." + }, + { + 3, // cave voice 3 + "Conoscevano il Segreto del Volo, il Segreto della " + "Felicit\224, ed altri segreti oltre ogni nostra " + "immaginazione." + } } + }; + + int n_dialogues = ARRAYSIZE(dialogue[lang]); + + switch (param) { + case SCENE_BEGIN: + // Begin palette cycling animation for candles + event.type = kEvTOneshot; + event.code = kPalAnimEvent; + event.op = kEventCycleStart; + event.time = 0; + q_event = _vm->_events->queue(&event); + + // Queue narrator dialogue list + q_event = ITEQueueDialogue(q_event, n_dialogues, dialogue[lang]); + + // End scene after last dialogue over + event.type = kEvTOneshot; + event.code = kSceneEvent; + event.op = kEventEnd; + event.time = VOICE_PAD; + q_event = _vm->_events->chain(q_event, &event); + + break; + case SCENE_END: + break; + + default: + warning("Illegal scene procedure paramater"); + break; + } + + return 0; +} + +int Scene::SC_ITEIntroCave2Proc(int param, void *refCon) { + return ((Scene *)refCon)->ITEIntroCave2Proc(param); +} + +// Handles second introductory cave painting scene +int Scene::ITEIntroCave2Proc(int param) { + Event event; + Event *q_event; + int lang = 0; + + if (_vm->getLanguage() == Common::DE_DEU) + lang = 1; + else if (_vm->getLanguage() == Common::IT_ITA) + lang = 2; + + static const IntroDialogue dialogue[][3] = { + { { // English + 4, // cave voice 4 + "The humans also knew the Secret of Life, and they " + "used it to give us the Four Great Gifts:" + }, + { + 5, // cave voice 5 + "Thinking minds, feeling hearts, speaking mouths, and " + "reaching hands." + }, + { + 6, // cave voice 6 + "We are their children." + } }, + // ----------------------------------------------------- + { { // German + 4, // cave voice 4 + "Au$erdem kannten die Menschen das Geheimnis des " + "Lebens. Und sie nutzten es, um uns die vier gro$en " + "Geschenke zu geben -" + }, + { + 5, // cave voice 5 + "den denkenden Geist, das f\201hlende Herz, den " + "sprechenden Mund und die greifende Hand." + }, + { + 6, // cave voice 6 + "Wir sind ihre Kinder." + } }, + // ----------------------------------------------------- + { { // Italian fan translation + 4, // cave voice 4 + "Gli Umani conoscevano anche il Segreto della Vita, " + "e lo usarono per darci i Quattro Grandi Doni:" + + }, + { + 5, // cave voice 5 + "Il pensiero, le emozioni, la parola e la manualit\224." + + }, + { + 6, // cave voice 6 + "Siamo i loro figli." + } } + }; + + int n_dialogues = ARRAYSIZE(dialogue[lang]); + + switch (param) { + case SCENE_BEGIN: + // Start 'dissolve' transition to new scene background + event.type = kEvTContinuous; + event.code = kTransitionEvent; + event.op = kEventDissolve; + event.time = 0; + event.duration = DISSOLVE_DURATION; + q_event = _vm->_events->queue(&event); + + // Begin palette cycling animation for candles + event.type = kEvTOneshot; + event.code = kPalAnimEvent; + event.op = kEventCycleStart; + event.time = 0; + q_event = _vm->_events->chain(q_event, &event); + + // Queue narrator dialogue list + q_event = ITEQueueDialogue(q_event, n_dialogues, dialogue[lang]); + + // End scene after last dialogue over + event.type = kEvTOneshot; + event.code = kSceneEvent; + event.op = kEventEnd; + event.time = VOICE_PAD; + q_event = _vm->_events->chain(q_event, &event); + + break; + case SCENE_END: + break; + default: + warning("Illegal scene procedure paramater"); + break; + } + + return 0; +} + +int Scene::SC_ITEIntroCave3Proc(int param, void *refCon) { + return ((Scene *)refCon)->ITEIntroCave3Proc(param); +} + +// Handles third introductory cave painting scene +int Scene::ITEIntroCave3Proc(int param) { + Event event; + Event *q_event; + int lang = 0; + + if (_vm->getLanguage() == Common::DE_DEU) + lang = 1; + else if (_vm->getLanguage() == Common::IT_ITA) + lang = 2; + + static const IntroDialogue dialogue[][3] = { + { { // English + 7, // cave voice 7 + "They taught us how to use our hands, and how to " + "speak." + }, + { + 8, // cave voice 8 + "They showed us the joy of using our minds." + }, + { + 9, // cave voice 9 + "They loved us, and when we were ready, they surely " + "would have given us the Secret of Happiness." + } }, + // ----------------------------------------------------- + { { // German + 7, // cave voice 7 + "Sie lehrten uns zu sprechen und unsere H\204nde zu " + "benutzen." + }, + { + 8, // cave voice 8 + "Sie zeigten uns die Freude am Denken." + }, + { + 9, // cave voice 9 + "Sie liebten uns, und w\204ren wir bereit gewesen, " + "h\204tten sie uns sicherlich das Geheimnis der " + "Fr\224hlichkeit offenbart." + } }, + // ----------------------------------------------------- + { { // Italian fan translation + 7, // cave voice 7 + "Ci insegnarono come usare le mani e come parlare. " + + }, + { + 8, // cave voice 8 + "Ci mostrarono le gioie che l'uso della mente " + "pu\242 dare. " + }, + { + 9, // cave voice 9 + "Ci amarono, ed una volta pronti, ci avrebbero " + "sicuramente svelato il Segreto della Felicit\224." + + } } + }; + + int n_dialogues = ARRAYSIZE(dialogue[lang]); + + switch (param) { + case SCENE_BEGIN: + // Start 'dissolve' transition to new scene background + event.type = kEvTContinuous; + event.code = kTransitionEvent; + event.op = kEventDissolve; + event.time = 0; + event.duration = DISSOLVE_DURATION; + q_event = _vm->_events->queue(&event); + + // Begin palette cycling animation for candles + event.type = kEvTOneshot; + event.code = kPalAnimEvent; + event.op = kEventCycleStart; + event.time = 0; + q_event = _vm->_events->chain(q_event, &event); + + // Queue narrator dialogue list + q_event = ITEQueueDialogue(q_event, n_dialogues, dialogue[lang]); + + // End scene after last dialogue over + event.type = kEvTOneshot; + event.code = kSceneEvent; + event.op = kEventEnd; + event.time = VOICE_PAD; + q_event = _vm->_events->chain(q_event, &event); + + break; + case SCENE_END: + break; + default: + warning("Illegal scene procedure paramater"); + break; + } + + return 0; +} + +int Scene::SC_ITEIntroCave4Proc(int param, void *refCon) { + return ((Scene *)refCon)->ITEIntroCave4Proc(param); +} + +// Handles fourth introductory cave painting scene +int Scene::ITEIntroCave4Proc(int param) { + Event event; + Event *q_event; + int lang = 0; + + if (_vm->getLanguage() == Common::DE_DEU) + lang = 1; + else if (_vm->getLanguage() == Common::IT_ITA) + lang = 2; + + static const IntroDialogue dialogue[][4] = { + { { // English + 10, // cave voice 10 + "And now we see the sky, the land, and the water that " + "we are heirs to, and we wonder: why did they leave?" + }, + { + 11, // cave voice 11 + "Do they live still, in the stars? In the oceans " + "depths? In the wind?" + }, + { + 12, // cave voice 12 + "We wonder, was their fate good or evil?" + }, + { + 13, // cave voice 13 + "And will we also share the same fate one day?" + } }, + // ----------------------------------------------------- + { { // German + 10, // cave voice 10 + "Und nun sehen wir den Himmel, das Land und die " + "Seen - unser Erbe. Und wir fragen uns - warum " + "verschwanden sie?" + }, + { + 11, // cave voice 11 + "Leben sie noch in den Sternen? In den Tiefen des " + "Ozeans? Im Wind?" + }, + { + 12, // cave voice 12 + "Wir fragen uns - war ihr Schicksal gut oder b\224se?" + }, + { + 13, // cave voice 13 + "Und wird uns eines Tages das gleiche Schicksal " + "ereilen?" + } }, + // ----------------------------------------------------- + { { // Italian fan translation + 10, // cave voice 10 + "Ed ora che guardiamo il cielo, la terra e l'acqua " + "che abbiamo ereditato, pensiamo: Perch\233 partirono?" + + }, + { + 11, // cave voice 11 + "Vivono ancora, nelle stelle? Nelle profondit\224 " + "dell'oceano? Nel vento?" + }, + { + 12, // cave voice 12 + "Ci domandiamo, il loro destino fu felice o nefasto?" + }, + { + 13, // cave voice 13 + "E un giorno, condivideremo anche noi lo stesso " + "destino?" + } } + }; + + int n_dialogues = ARRAYSIZE(dialogue[lang]); + + switch (param) { + case SCENE_BEGIN: + // Start 'dissolve' transition to new scene background + event.type = kEvTContinuous; + event.code = kTransitionEvent; + event.op = kEventDissolve; + event.time = 0; + event.duration = DISSOLVE_DURATION; + q_event = _vm->_events->queue(&event); + + // Begin palette cycling animation for candles + event.type = kEvTOneshot; + event.code = kPalAnimEvent; + event.op = kEventCycleStart; + event.time = 0; + q_event = _vm->_events->chain(q_event, &event); + + // Queue narrator dialogue list + q_event = ITEQueueDialogue(q_event, n_dialogues, dialogue[lang]); + + // End scene after last dialogue over + event.type = kEvTOneshot; + event.code = kSceneEvent; + event.op = kEventEnd; + event.time = VOICE_PAD; + q_event = _vm->_events->chain(q_event, &event); + + break; + case SCENE_END: + break; + default: + warning("Illegal scene procedure paramater"); + break; + } + + return 0; +} + +int Scene::SC_ITEIntroValleyProc(int param, void *refCon) { + return ((Scene *)refCon)->ITEIntroValleyProc(param); +} + +// Handles intro title scene (valley overlook) +int Scene::ITEIntroValleyProc(int param) { + Event event; + Event *q_event; + + static const IntroCredit credits[] = { + {EN_ANY, kITEAny, kCHeader, "Producer"}, + {DE_DEU, kITEAny, kCHeader, "Produzent"}, + {IT_ITA, kITEAny, kCHeader, "Produttore"}, + {UNK_LANG, kITEAny, kCText, "Walter Hochbrueckner"}, + {EN_ANY, kITEAny, kCHeader, "Executive Producer"}, + {DE_DEU, kITEAny, kCHeader, "Ausf\201hrender Produzent"}, + {IT_ITA, kITEAny, kCHeader, "Produttore Esecutivo"}, + {UNK_LANG, kITEAny, kCText, "Robert McNally"}, + {UNK_LANG, kITEWyrmKeep, kCHeader, "2nd Executive Producer"}, + {EN_ANY, kITENotWyrmKeep, kCHeader, "Publisher"}, + {DE_DEU, kITENotWyrmKeep, kCHeader, "Herausgeber"}, + {IT_ITA, kITENotWyrmKeep, kCHeader, "Editore"}, + {UNK_LANG, kITEAny, kCText, "Jon Van Caneghem"} + }; + + int n_credits = ARRAYSIZE(credits); + + switch (param) { + case SCENE_BEGIN: + // Begin title screen background animation + _vm->_anim->setCycles(0, -1); + + event.type = kEvTOneshot; + event.code = kAnimEvent; + event.op = kEventPlay; + event.param = 0; + event.time = 0; + q_event = _vm->_events->queue(&event); + + // Begin ITE title theme music + _vm->_music->stop(); + + event.type = kEvTOneshot; + event.code = kMusicEvent; + event.param = MUSIC_2; + event.param2 = MUSIC_NORMAL; + event.op = kEventPlay; + event.time = 0; + q_event = _vm->_events->chain(q_event, &event); + + // Pause animation before logo + event.type = kEvTOneshot; + event.code = kAnimEvent; + event.op = kEventStop; + event.param = 0; + event.time = 3000; + q_event = _vm->_events->chain(q_event, &event); + + // Display logo + event.type = kEvTContinuous; + event.code = kTransitionEvent; + event.op = kEventDissolveBGMask; + event.time = 0; + event.duration = LOGO_DISSOLVE_DURATION; + q_event = _vm->_events->chain(q_event, &event); + + // Remove logo + event.type = kEvTContinuous; + event.code = kTransitionEvent; + event.op = kEventDissolve; + event.time = 3000; + event.duration = LOGO_DISSOLVE_DURATION; + q_event = _vm->_events->chain(q_event, &event); + + // Unpause animation before logo + event.type = kEvTOneshot; + event.code = kAnimEvent; + event.op = kEventPlay; + event.time = 0; + event.param = 0; + q_event = _vm->_events->chain(q_event, &event); + + // Queue game credits list + q_event = ITEQueueCredits(9000, CREDIT_DURATION1, n_credits, credits); + + // End scene after credit display + event.type = kEvTOneshot; + event.code = kSceneEvent; + event.op = kEventEnd; + event.time = 1000; + q_event = _vm->_events->chain(q_event, &event); + + break; + case SCENE_END: + break; + default: + warning("Illegal scene procedure parameter"); + break; + } + + return 0; +} + +int Scene::SC_ITEIntroTreeHouseProc(int param, void *refCon) { + return ((Scene *)refCon)->ITEIntroTreeHouseProc(param); +} + +// Handles second intro credit screen (treehouse view) +int Scene::ITEIntroTreeHouseProc(int param) { + Event event; + Event *q_event; + + static const IntroCredit credits1[] = { + {EN_ANY, kITEAny, kCHeader, "Game Design"}, + {DE_DEU, kITEAny, kCHeader, "Spielentwurf"}, + {IT_ITA, kITEAny, kCHeader, "Progetto"}, + {UNK_LANG, kITEAny, kCText, "Talin, Joe Pearce, Robert McNally"}, + {EN_ANY, kITEAny, kCText, "and Carolly Hauksdottir"}, + {DE_DEU, kITEAny, kCText, "und Carolly Hauksdottir"}, + {IT_ITA, kITEAny, kCText, "e Carolly Hauksdottir"}, + {EN_ANY, kITEAny, kCHeader, "Screenplay and Dialog"}, + {EN_ANY, kITEAny, kCText, "Robert Leh, Len Wein, and Bill Rotsler"}, + {DE_DEU, kITEAny, kCHeader, "Geschichte und Dialoge"}, + {DE_DEU, kITEAny, kCText, "Robert Leh, Len Wein und Bill Rotsler"}, + {IT_ITA, kITEAny, kCHeader, "Sceneggiatura e Dialoghi"}, + {IT_ITA, kITEAny, kCText, "Robert Leh, Len Wein e Bill Rotsler"} + }; + + int n_credits1 = ARRAYSIZE(credits1); + + static const IntroCredit credits2[] = { + {UNK_LANG, kITEWyrmKeep, kCHeader, "Art Direction"}, + {UNK_LANG, kITEWyrmKeep, kCText, "Allison Hershey"}, + {EN_ANY, kITEAny, kCHeader, "Art"}, + {DE_DEU, kITEAny, kCHeader, "Grafiken"}, + {IT_ITA, kITEAny, kCHeader, "Grafica"}, + {UNK_LANG, kITEWyrmKeep, kCText, "Ed Lacabanne, Glenn Price, April Lee,"}, + {UNK_LANG, kITENotWyrmKeep, kCText, "Edward Lacabanne, Glenn Price, April Lee,"}, + {UNK_LANG, kITEWyrmKeep, kCText, "Lisa Sample, Brian Dowrick, Reed Waller,"}, + {EN_ANY, kITEWyrmKeep, kCText, "Allison Hershey and Talin"}, + {DE_DEU, kITEWyrmKeep, kCText, "Allison Hershey und Talin"}, + {IT_ITA, kITEWyrmKeep, kCText, "Allison Hershey e Talin"}, + {EN_ANY, kITENotWyrmKeep, kCText, "Lisa Iennaco, Brian Dowrick, Reed"}, + {EN_ANY, kITENotWyrmKeep, kCText, "Waller, Allison Hershey and Talin"}, + {DE_DEU, kITEAny, kCText, "Waller, Allison Hershey und Talin"}, + {IT_ITA, kITEAny, kCText, "Waller, Allison Hershey e Talin"}, + {EN_ANY, kITENotWyrmKeep, kCHeader, "Art Direction"}, + {DE_DEU, kITENotWyrmKeep, kCHeader, "Grafische Leitung"}, + {IT_ITA, kITENotWyrmKeep, kCHeader, "Direzione Grafica"}, + {UNK_LANG, kITENotWyrmKeep, kCText, "Allison Hershey"} + }; + + int n_credits2 = ARRAYSIZE(credits2); + + switch (param) { + case SCENE_BEGIN: + // Start 'dissolve' transition to new scene background + event.type = kEvTContinuous; + event.code = kTransitionEvent; + event.op = kEventDissolve; + event.time = 0; + event.duration = DISSOLVE_DURATION; + q_event = _vm->_events->queue(&event); + + if (_vm->_anim->hasAnimation(0)) { + // Begin title screen background animation + _vm->_anim->setFrameTime(0, 100); + + event.type = kEvTOneshot; + event.code = kAnimEvent; + event.op = kEventPlay; + event.param = 0; + event.time = 0; + q_event = _vm->_events->chain(q_event, &event); + } + + // Queue game credits list + q_event = ITEQueueCredits(DISSOLVE_DURATION + 2000, CREDIT_DURATION1, n_credits1, credits1); + q_event = ITEQueueCredits(DISSOLVE_DURATION + 7000, CREDIT_DURATION1, n_credits2, credits2); + + // End scene after credit display + event.type = kEvTOneshot; + event.code = kSceneEvent; + event.op = kEventEnd; + event.time = 1000; + q_event = _vm->_events->chain(q_event, &event); + + break; + case SCENE_END: + break; + default: + warning("Illegal scene procedure parameter"); + break; + } + + return 0; +} + +int Scene::SC_ITEIntroFairePathProc(int param, void *refCon) { + return ((Scene *)refCon)->ITEIntroFairePathProc(param); +} + +// Handles third intro credit screen (path to puzzle tent) +int Scene::ITEIntroFairePathProc(int param) { + Event event; + Event *q_event; + + static const IntroCredit credits1[] = { + {EN_ANY, kITEAny, kCHeader, "Programming"}, + {DE_DEU, kITEAny, kCHeader, "Programmiert von"}, + {IT_ITA, kITEAny, kCHeader, "Programmazione"}, + {UNK_LANG, kITEAny, kCText, "Talin, Walter Hochbrueckner,"}, + {EN_ANY, kITEAny, kCText, "Joe Burks and Robert Wiggins"}, + {DE_DEU, kITEAny, kCText, "Joe Burks und Robert Wiggins"}, + {IT_ITA, kITEAny, kCText, "Joe Burks e Robert Wiggins"}, + {EN_ANY, kITEPCCD | kITEWyrmKeep, kCHeader, "Additional Programming"}, + {EN_ANY, kITEPCCD | kITEWyrmKeep, kCText, "John Bolton"}, + {UNK_LANG, kITEMac, kCHeader, "Macintosh Version"}, + {UNK_LANG, kITEMac, kCText, "Michael McNally and Robert McNally"}, + {EN_ANY, kITEAny, kCHeader, "Music and Sound"}, + {DE_DEU, kITEAny, kCHeader, "Musik und Sound"}, + {IT_ITA, kITEAny, kCHeader, "Musica e Sonoro"}, + {UNK_LANG, kITEAny, kCText, "Matt Nathan"} + }; + + int n_credits1 = ARRAYSIZE(credits1); + + static const IntroCredit credits2[] = { + {EN_ANY, kITEAny, kCHeader, "Directed by"}, + {DE_DEU, kITEAny, kCHeader, "Regie"}, + {IT_ITA, kITEAny, kCHeader, "Regia"}, + {UNK_LANG, kITEAny, kCText, "Talin"} + }; + + int n_credits2 = ARRAYSIZE(credits2); + + switch (param) { + case SCENE_BEGIN: + // Start 'dissolve' transition to new scene background + event.type = kEvTContinuous; + event.code = kTransitionEvent; + event.op = kEventDissolve; + event.time = 0; + event.duration = DISSOLVE_DURATION; + q_event = _vm->_events->queue(&event); + + // Begin title screen background animation + _vm->_anim->setCycles(0, -1); + + event.type = kEvTOneshot; + event.code = kAnimEvent; + event.op = kEventPlay; + event.param = 0; + event.time = 0; + q_event = _vm->_events->chain(q_event, &event); + + // Queue game credits list + q_event = ITEQueueCredits(DISSOLVE_DURATION + 2000, CREDIT_DURATION1, n_credits1, credits1); + q_event = ITEQueueCredits(DISSOLVE_DURATION + 7000, CREDIT_DURATION1, n_credits2, credits2); + + // End scene after credit display + event.type = kEvTOneshot; + event.code = kSceneEvent; + event.op = kEventEnd; + event.time = 1000; + q_event = _vm->_events->chain(q_event, &event); + + break; + case SCENE_END: + break; + default: + warning("Illegal scene procedure parameter"); + break; + } + + return 0; +} + +int Scene::SC_ITEIntroFaireTentProc(int param, void *refCon) { + return ((Scene *)refCon)->ITEIntroFaireTentProc(param); +} + +// Handles fourth intro credit screen (treehouse view) +int Scene::ITEIntroFaireTentProc(int param) { + Event event; + Event *q_event; + Event *q_event_start; + + switch (param) { + case SCENE_BEGIN: + + // Start 'dissolve' transition to new scene background + event.type = kEvTContinuous; + event.code = kTransitionEvent; + event.op = kEventDissolve; + event.time = 0; + event.duration = DISSOLVE_DURATION; + q_event_start = _vm->_events->queue(&event); + + // End scene after momentary pause + event.type = kEvTOneshot; + event.code = kSceneEvent; + event.op = kEventEnd; + event.time = 5000; + q_event = _vm->_events->chain(q_event_start, &event); + + break; + case SCENE_END: + break; + default: + warning("Illegal scene procedure parameter"); + break; + } + + return 0; +} + +} // End of namespace Saga diff --git a/engines/saga/ite_introproc.cpp b/engines/saga/ite_introproc.cpp deleted file mode 100644 index a33a55c375..0000000000 --- a/engines/saga/ite_introproc.cpp +++ /dev/null @@ -1,1139 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -// Intro sequence scene procedures - -#include "saga/saga.h" -#include "saga/gfx.h" - -#include "saga/animation.h" -#include "saga/events.h" -#include "saga/font.h" -#include "saga/sndres.h" -#include "saga/palanim.h" -#include "saga/music.h" - -#include "saga/scene.h" -#include "saga/rscfile.h" - -namespace Saga { - -using Common::UNK_LANG; -using Common::EN_ANY; -using Common::DE_DEU; -using Common::IT_ITA; - -// Intro scenes -#define RID_ITE_INTRO_ANIM_SCENE 1538 -#define RID_ITE_CAVE_SCENE_1 1542 -#define RID_ITE_CAVE_SCENE_2 1545 -#define RID_ITE_CAVE_SCENE_3 1548 -#define RID_ITE_CAVE_SCENE_4 1551 -#define RID_ITE_VALLEY_SCENE 1556 -#define RID_ITE_TREEHOUSE_SCENE 1560 -#define RID_ITE_FAIREPATH_SCENE 1564 -#define RID_ITE_FAIRETENT_SCENE 1567 - -// ITE intro music -#define MUSIC_1 9 -#define MUSIC_2 10 - -LoadSceneParams ITE_IntroList[] = { - {RID_ITE_INTRO_ANIM_SCENE, kLoadByResourceId, NULL, Scene::SC_ITEIntroAnimProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, - {RID_ITE_CAVE_SCENE_1, kLoadByResourceId, NULL, Scene::SC_ITEIntroCave1Proc, false, kTransitionFade, 0, NO_CHAPTER_CHANGE}, - {RID_ITE_CAVE_SCENE_2, kLoadByResourceId, NULL, Scene::SC_ITEIntroCave2Proc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, - {RID_ITE_CAVE_SCENE_3, kLoadByResourceId, NULL, Scene::SC_ITEIntroCave3Proc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, - {RID_ITE_CAVE_SCENE_4, kLoadByResourceId, NULL, Scene::SC_ITEIntroCave4Proc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, - {RID_ITE_VALLEY_SCENE, kLoadByResourceId, NULL, Scene::SC_ITEIntroValleyProc, false, kTransitionFade, 0, NO_CHAPTER_CHANGE}, - {RID_ITE_TREEHOUSE_SCENE, kLoadByResourceId, NULL, Scene::SC_ITEIntroTreeHouseProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, - {RID_ITE_FAIREPATH_SCENE, kLoadByResourceId, NULL, Scene::SC_ITEIntroFairePathProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE}, - {RID_ITE_FAIRETENT_SCENE, kLoadByResourceId, NULL, Scene::SC_ITEIntroFaireTentProc, false, kTransitionNoFade, 0, NO_CHAPTER_CHANGE} -}; - -int Scene::ITEStartProc() { - size_t scenesCount; - size_t i; - - LoadSceneParams firstScene; - LoadSceneParams tempScene; - - scenesCount = ARRAYSIZE(ITE_IntroList); - - for (i = 0; i < scenesCount; i++) { - tempScene = ITE_IntroList[i]; - tempScene.sceneDescriptor = _vm->_resource->convertResourceId(tempScene.sceneDescriptor); - _vm->_scene->queueScene(&tempScene); - } - - - firstScene.loadFlag = kLoadBySceneNumber; - firstScene.sceneDescriptor = _vm->getStartSceneNumber(); - firstScene.sceneDescription = NULL; - firstScene.sceneSkipTarget = true; - firstScene.sceneProc = NULL; - firstScene.transitionType = kTransitionFade; - firstScene.actorsEntrance = 0; - firstScene.chapter = -1; - - _vm->_scene->queueScene(&firstScene); - - return SUCCESS; -} - -Event *Scene::ITEQueueDialogue(Event *q_event, int n_dialogues, const IntroDialogue dialogue[]) { - TextListEntry textEntry; - TextListEntry *entry; - Event event; - int voice_len; - int i; - - // Queue narrator dialogue list - textEntry.knownColor = kKnownColorSubtitleTextColor; - textEntry.effectKnownColor = kKnownColorTransparent; - textEntry.useRect = true; - textEntry.rect.left = 0; - textEntry.rect.right = _vm->getDisplayWidth(); - if (_vm->getLanguage() == Common::DE_DEU) { - textEntry.rect.top = INTRO_DE_CAPTION_Y; - } else if (_vm->getLanguage() == Common::IT_ITA) { - textEntry.rect.top = INTRO_IT_CAPTION_Y; - } else { - textEntry.rect.top = INTRO_CAPTION_Y; - } - textEntry.rect.bottom = _vm->getDisplayHeight(); - textEntry.font = kKnownFontMedium; - textEntry.flags = (FontEffectFlags)(kFontOutline | kFontCentered); - - for (i = 0; i < n_dialogues; i++) { - textEntry.text = dialogue[i].i_str; - entry = _vm->_scene->_textList.addEntry(textEntry); - - // Display text - event.type = kEvTOneshot; - event.code = kTextEvent; - event.op = kEventDisplay; - event.data = entry; - event.time = (i == 0) ? 0 : VOICE_PAD; - q_event = _vm->_events->chain(q_event, &event); - - // Play voice - event.type = kEvTOneshot; - event.code = kVoiceEvent; - event.op = kEventPlay; - event.param = dialogue[i].i_voice_rn; - event.time = 0; - q_event = _vm->_events->chain(q_event, &event); - - voice_len = _vm->_sndRes->getVoiceLength(dialogue[i].i_voice_rn); - if (voice_len < 0) { - voice_len = strlen(dialogue[i].i_str) * VOICE_LETTERLEN; - } - - // Remove text - event.type = kEvTOneshot; - event.code = kTextEvent; - event.op = kEventRemove; - event.data = entry; - event.time = voice_len; - q_event = _vm->_events->chain(q_event, &event); - } - - return q_event; -} - -enum { - kCHeader, - kCText -}; - -enum { - kITEPC = (1 << 0), - kITEPCCD = (1 << 1), - kITEMac = (1 << 2), - kITEWyrmKeep = (1 << 3), - kITEAny = 0xffff, - kITENotWyrmKeep = kITEAny & ~kITEWyrmKeep -}; - -// Queue a page of credits text. The original interpreter did word-wrapping -// automatically. We currently don't. - -Event *Scene::ITEQueueCredits(int delta_time, int duration, int n_credits, const IntroCredit credits[]) { - int game; - Common::Language lang; - - // The assumption here is that all WyrmKeep versions have the same - // credits, regardless of which operating system they're for. - - lang = _vm->getLanguage(); - - if (_vm->getFeatures() & GF_WYRMKEEP) { - game = kITEWyrmKeep; - } else if (_vm->getPlatform() == Common::kPlatformMacintosh) { - game = kITEMac; - } else if (_vm->getGameId() == GID_ITE_CD_G) { - game = kITEPCCD; - } else { - game = kITEPC; - } - - int line_spacing = 0; - int paragraph_spacing; - KnownFont font = kKnownFontSmall; - int i; - - int n_paragraphs = 0; - int credits_height = 0; - - for (i = 0; i < n_credits; i++) { - if (credits[i].lang != lang && credits[i].lang != UNK_LANG) { - continue; - } - - if (!(credits[i].game & game)) { - continue; - } - - switch (credits[i].type) { - case kCHeader: - font = kKnownFontSmall; - line_spacing = 4; - n_paragraphs++; - break; - case kCText: - font = kKnownFontMedium; - line_spacing = 2; - break; - default: - error("Unknown credit type"); - } - - credits_height += (_vm->_font->getHeight(font) + line_spacing); - } - - paragraph_spacing = (200 - credits_height) / (n_paragraphs + 3); - credits_height += (n_paragraphs * paragraph_spacing); - - int y = paragraph_spacing; - - TextListEntry textEntry; - TextListEntry *entry; - Event event; - Event *q_event = NULL; - - textEntry.knownColor = kKnownColorSubtitleTextColor; - textEntry.effectKnownColor = kKnownColorTransparent; - textEntry.flags = (FontEffectFlags)(kFontOutline | kFontCentered); - textEntry.point.x = 160; - - for (i = 0; i < n_credits; i++) { - if (credits[i].lang != lang && credits[i].lang != UNK_LANG) { - continue; - } - - if (!(credits[i].game & game)) { - continue; - } - - switch (credits[i].type) { - case kCHeader: - font = kKnownFontSmall; - line_spacing = 4; - y += paragraph_spacing; - break; - case kCText: - font = kKnownFontMedium; - line_spacing = 2; - break; - default: - break; - } - - textEntry.text = credits[i].string; - textEntry.font = font; - textEntry.point.y = y; - - entry = _vm->_scene->_textList.addEntry(textEntry); - - // Display text - event.type = kEvTOneshot; - event.code = kTextEvent; - event.op = kEventDisplay; - event.data = entry; - event.time = delta_time; - q_event = _vm->_events->queue(&event); - - // Remove text - event.type = kEvTOneshot; - event.code = kTextEvent; - event.op = kEventRemove; - event.data = entry; - event.time = duration; - q_event = _vm->_events->chain(q_event, &event); - - y += (_vm->_font->getHeight(font) + line_spacing); - } - - return q_event; -} - -int Scene::SC_ITEIntroAnimProc(int param, void *refCon) { - return ((Scene *)refCon)->ITEIntroAnimProc(param); -} - -// Handles the introductory Dreamer's Guild / NWC logo animation scene. -int Scene::ITEIntroAnimProc(int param) { - Event event; - Event *q_event; - - switch (param) { - case SCENE_BEGIN:{ - // Background for intro scene is the first frame of the - // intro animation; display it and set the palette - event.type = kEvTOneshot; - event.code = kBgEvent; - event.op = kEventDisplay; - event.param = kEvPSetPalette; - event.time = 0; - q_event = _vm->_events->queue(&event); - - debug(3, "Intro animation procedure started."); - debug(3, "Linking animation resources..."); - - _vm->_anim->setFrameTime(0, ITE_INTRO_FRAMETIME); - - // Link this scene's animation resources for continuous - // playback - int lastAnim; - - if (_vm->getFeatures() & GF_WYRMKEEP) { - if (_vm->getPlatform() == Common::kPlatformMacintosh) { - lastAnim = 3; - } else { - lastAnim = 2; - } - } else { - if (_vm->getPlatform() == Common::kPlatformMacintosh) { - lastAnim = 4; - } else { - lastAnim = 5; - } - } - - for (int i = 0; i < lastAnim; i++) - _vm->_anim->link(i, i+1); - - _vm->_anim->setFlag(lastAnim, ANIM_FLAG_ENDSCENE); - - debug(3, "Beginning animation playback."); - - // Begin the animation - event.type = kEvTOneshot; - event.code = kAnimEvent; - event.op = kEventPlay; - event.param = 0; - event.time = 0; - q_event = _vm->_events->chain(q_event, &event); - - // Queue intro music playback - event.type = kEvTOneshot; - event.code = kMusicEvent; - event.param = MUSIC_1; - event.param2 = MUSIC_LOOP; - event.op = kEventPlay; - event.time = 0; - q_event = _vm->_events->chain(q_event, &event); - } - break; - case SCENE_END: - break; - default: - warning("Illegal scene procedure parameter"); - break; - } - - return 0; -} - -int Scene::SC_ITEIntroCave1Proc(int param, void *refCon) { - return ((Scene *)refCon)->ITEIntroCave1Proc(param); -} - -// Handles first introductory cave painting scene -int Scene::ITEIntroCave1Proc(int param) { - Event event; - Event *q_event; - int lang = 0; - - if (_vm->getLanguage() == Common::DE_DEU) - lang = 1; - else if (_vm->getLanguage() == Common::IT_ITA) - lang = 2; - - static const IntroDialogue dialogue[][4] = { - { { // English - 0, // cave voice 0 - "We see the sky, we see the land, we see the water, " - "and we wonder: Are we the only ones?" - }, - { - 1, // cave voice 1 - "Long before we came to exist, the humans ruled the " - "Earth." - }, - { - 2, // cave voice 2 - "They made marvelous things, and moved whole " - "mountains." - }, - { - 3, // cave voice 3 - "They knew the Secret of Flight, the Secret of " - "Happiness, and other secrets beyond our imagining." - } }, - // ----------------------------------------------------- - { { // German - 0, // cave voice 0 - "Um uns sind der Himmel, das Land und die Seen; und " - "wir fragen uns - sind wir die einzigen?" - }, - { - 1, // cave voice 1 - "Lange vor unserer Zeit herrschten die Menschen " - "\201ber die Erde." - }, - { - 2, // cave voice 2 - "Sie taten wundersame Dinge und versetzten ganze " - "Berge." - }, - { - 3, // cave voice 3 - "Sie kannten das Geheimnis des Fluges, das Geheimnis " - "der Fr\224hlichkeit und andere Geheimnisse, die " - "unsere Vorstellungskraft \201bersteigen." - } }, - // ----------------------------------------------------- - { { // Italian fan translation - 0, // cave voice 0 - "Guardiamo il cielo, guardiamo la terra, guardiamo " - "l'acqua, e ci chiediamo: Siamo forse soli?" - }, - { - 1, // cave voice 1 - "Molto tempo prima che noi esistessimo, gli Umani " - "dominavano la terra." - }, - { - 2, // cave voice 2 - "Fecero cose meravigliose, e mossero intere " - "montagne." - }, - { - 3, // cave voice 3 - "Conoscevano il Segreto del Volo, il Segreto della " - "Felicit\224, ed altri segreti oltre ogni nostra " - "immaginazione." - } } - }; - - int n_dialogues = ARRAYSIZE(dialogue[lang]); - - switch (param) { - case SCENE_BEGIN: - // Begin palette cycling animation for candles - event.type = kEvTOneshot; - event.code = kPalAnimEvent; - event.op = kEventCycleStart; - event.time = 0; - q_event = _vm->_events->queue(&event); - - // Queue narrator dialogue list - q_event = ITEQueueDialogue(q_event, n_dialogues, dialogue[lang]); - - // End scene after last dialogue over - event.type = kEvTOneshot; - event.code = kSceneEvent; - event.op = kEventEnd; - event.time = VOICE_PAD; - q_event = _vm->_events->chain(q_event, &event); - - break; - case SCENE_END: - break; - - default: - warning("Illegal scene procedure paramater"); - break; - } - - return 0; -} - -int Scene::SC_ITEIntroCave2Proc(int param, void *refCon) { - return ((Scene *)refCon)->ITEIntroCave2Proc(param); -} - -// Handles second introductory cave painting scene -int Scene::ITEIntroCave2Proc(int param) { - Event event; - Event *q_event; - int lang = 0; - - if (_vm->getLanguage() == Common::DE_DEU) - lang = 1; - else if (_vm->getLanguage() == Common::IT_ITA) - lang = 2; - - static const IntroDialogue dialogue[][3] = { - { { // English - 4, // cave voice 4 - "The humans also knew the Secret of Life, and they " - "used it to give us the Four Great Gifts:" - }, - { - 5, // cave voice 5 - "Thinking minds, feeling hearts, speaking mouths, and " - "reaching hands." - }, - { - 6, // cave voice 6 - "We are their children." - } }, - // ----------------------------------------------------- - { { // German - 4, // cave voice 4 - "Au$erdem kannten die Menschen das Geheimnis des " - "Lebens. Und sie nutzten es, um uns die vier gro$en " - "Geschenke zu geben -" - }, - { - 5, // cave voice 5 - "den denkenden Geist, das f\201hlende Herz, den " - "sprechenden Mund und die greifende Hand." - }, - { - 6, // cave voice 6 - "Wir sind ihre Kinder." - } }, - // ----------------------------------------------------- - { { // Italian fan translation - 4, // cave voice 4 - "Gli Umani conoscevano anche il Segreto della Vita, " - "e lo usarono per darci i Quattro Grandi Doni:" - - }, - { - 5, // cave voice 5 - "Il pensiero, le emozioni, la parola e la manualit\224." - - }, - { - 6, // cave voice 6 - "Siamo i loro figli." - } } - }; - - int n_dialogues = ARRAYSIZE(dialogue[lang]); - - switch (param) { - case SCENE_BEGIN: - // Start 'dissolve' transition to new scene background - event.type = kEvTContinuous; - event.code = kTransitionEvent; - event.op = kEventDissolve; - event.time = 0; - event.duration = DISSOLVE_DURATION; - q_event = _vm->_events->queue(&event); - - // Begin palette cycling animation for candles - event.type = kEvTOneshot; - event.code = kPalAnimEvent; - event.op = kEventCycleStart; - event.time = 0; - q_event = _vm->_events->chain(q_event, &event); - - // Queue narrator dialogue list - q_event = ITEQueueDialogue(q_event, n_dialogues, dialogue[lang]); - - // End scene after last dialogue over - event.type = kEvTOneshot; - event.code = kSceneEvent; - event.op = kEventEnd; - event.time = VOICE_PAD; - q_event = _vm->_events->chain(q_event, &event); - - break; - case SCENE_END: - break; - default: - warning("Illegal scene procedure paramater"); - break; - } - - return 0; -} - -int Scene::SC_ITEIntroCave3Proc(int param, void *refCon) { - return ((Scene *)refCon)->ITEIntroCave3Proc(param); -} - -// Handles third introductory cave painting scene -int Scene::ITEIntroCave3Proc(int param) { - Event event; - Event *q_event; - int lang = 0; - - if (_vm->getLanguage() == Common::DE_DEU) - lang = 1; - else if (_vm->getLanguage() == Common::IT_ITA) - lang = 2; - - static const IntroDialogue dialogue[][3] = { - { { // English - 7, // cave voice 7 - "They taught us how to use our hands, and how to " - "speak." - }, - { - 8, // cave voice 8 - "They showed us the joy of using our minds." - }, - { - 9, // cave voice 9 - "They loved us, and when we were ready, they surely " - "would have given us the Secret of Happiness." - } }, - // ----------------------------------------------------- - { { // German - 7, // cave voice 7 - "Sie lehrten uns zu sprechen und unsere H\204nde zu " - "benutzen." - }, - { - 8, // cave voice 8 - "Sie zeigten uns die Freude am Denken." - }, - { - 9, // cave voice 9 - "Sie liebten uns, und w\204ren wir bereit gewesen, " - "h\204tten sie uns sicherlich das Geheimnis der " - "Fr\224hlichkeit offenbart." - } }, - // ----------------------------------------------------- - { { // Italian fan translation - 7, // cave voice 7 - "Ci insegnarono come usare le mani e come parlare. " - - }, - { - 8, // cave voice 8 - "Ci mostrarono le gioie che l'uso della mente " - "pu\242 dare. " - }, - { - 9, // cave voice 9 - "Ci amarono, ed una volta pronti, ci avrebbero " - "sicuramente svelato il Segreto della Felicit\224." - - } } - }; - - int n_dialogues = ARRAYSIZE(dialogue[lang]); - - switch (param) { - case SCENE_BEGIN: - // Start 'dissolve' transition to new scene background - event.type = kEvTContinuous; - event.code = kTransitionEvent; - event.op = kEventDissolve; - event.time = 0; - event.duration = DISSOLVE_DURATION; - q_event = _vm->_events->queue(&event); - - // Begin palette cycling animation for candles - event.type = kEvTOneshot; - event.code = kPalAnimEvent; - event.op = kEventCycleStart; - event.time = 0; - q_event = _vm->_events->chain(q_event, &event); - - // Queue narrator dialogue list - q_event = ITEQueueDialogue(q_event, n_dialogues, dialogue[lang]); - - // End scene after last dialogue over - event.type = kEvTOneshot; - event.code = kSceneEvent; - event.op = kEventEnd; - event.time = VOICE_PAD; - q_event = _vm->_events->chain(q_event, &event); - - break; - case SCENE_END: - break; - default: - warning("Illegal scene procedure paramater"); - break; - } - - return 0; -} - -int Scene::SC_ITEIntroCave4Proc(int param, void *refCon) { - return ((Scene *)refCon)->ITEIntroCave4Proc(param); -} - -// Handles fourth introductory cave painting scene -int Scene::ITEIntroCave4Proc(int param) { - Event event; - Event *q_event; - int lang = 0; - - if (_vm->getLanguage() == Common::DE_DEU) - lang = 1; - else if (_vm->getLanguage() == Common::IT_ITA) - lang = 2; - - static const IntroDialogue dialogue[][4] = { - { { // English - 10, // cave voice 10 - "And now we see the sky, the land, and the water that " - "we are heirs to, and we wonder: why did they leave?" - }, - { - 11, // cave voice 11 - "Do they live still, in the stars? In the oceans " - "depths? In the wind?" - }, - { - 12, // cave voice 12 - "We wonder, was their fate good or evil?" - }, - { - 13, // cave voice 13 - "And will we also share the same fate one day?" - } }, - // ----------------------------------------------------- - { { // German - 10, // cave voice 10 - "Und nun sehen wir den Himmel, das Land und die " - "Seen - unser Erbe. Und wir fragen uns - warum " - "verschwanden sie?" - }, - { - 11, // cave voice 11 - "Leben sie noch in den Sternen? In den Tiefen des " - "Ozeans? Im Wind?" - }, - { - 12, // cave voice 12 - "Wir fragen uns - war ihr Schicksal gut oder b\224se?" - }, - { - 13, // cave voice 13 - "Und wird uns eines Tages das gleiche Schicksal " - "ereilen?" - } }, - // ----------------------------------------------------- - { { // Italian fan translation - 10, // cave voice 10 - "Ed ora che guardiamo il cielo, la terra e l'acqua " - "che abbiamo ereditato, pensiamo: Perch\233 partirono?" - - }, - { - 11, // cave voice 11 - "Vivono ancora, nelle stelle? Nelle profondit\224 " - "dell'oceano? Nel vento?" - }, - { - 12, // cave voice 12 - "Ci domandiamo, il loro destino fu felice o nefasto?" - }, - { - 13, // cave voice 13 - "E un giorno, condivideremo anche noi lo stesso " - "destino?" - } } - }; - - int n_dialogues = ARRAYSIZE(dialogue[lang]); - - switch (param) { - case SCENE_BEGIN: - // Start 'dissolve' transition to new scene background - event.type = kEvTContinuous; - event.code = kTransitionEvent; - event.op = kEventDissolve; - event.time = 0; - event.duration = DISSOLVE_DURATION; - q_event = _vm->_events->queue(&event); - - // Begin palette cycling animation for candles - event.type = kEvTOneshot; - event.code = kPalAnimEvent; - event.op = kEventCycleStart; - event.time = 0; - q_event = _vm->_events->chain(q_event, &event); - - // Queue narrator dialogue list - q_event = ITEQueueDialogue(q_event, n_dialogues, dialogue[lang]); - - // End scene after last dialogue over - event.type = kEvTOneshot; - event.code = kSceneEvent; - event.op = kEventEnd; - event.time = VOICE_PAD; - q_event = _vm->_events->chain(q_event, &event); - - break; - case SCENE_END: - break; - default: - warning("Illegal scene procedure paramater"); - break; - } - - return 0; -} - -int Scene::SC_ITEIntroValleyProc(int param, void *refCon) { - return ((Scene *)refCon)->ITEIntroValleyProc(param); -} - -// Handles intro title scene (valley overlook) -int Scene::ITEIntroValleyProc(int param) { - Event event; - Event *q_event; - - static const IntroCredit credits[] = { - {EN_ANY, kITEAny, kCHeader, "Producer"}, - {DE_DEU, kITEAny, kCHeader, "Produzent"}, - {IT_ITA, kITEAny, kCHeader, "Produttore"}, - {UNK_LANG, kITEAny, kCText, "Walter Hochbrueckner"}, - {EN_ANY, kITEAny, kCHeader, "Executive Producer"}, - {DE_DEU, kITEAny, kCHeader, "Ausf\201hrender Produzent"}, - {IT_ITA, kITEAny, kCHeader, "Produttore Esecutivo"}, - {UNK_LANG, kITEAny, kCText, "Robert McNally"}, - {UNK_LANG, kITEWyrmKeep, kCHeader, "2nd Executive Producer"}, - {EN_ANY, kITENotWyrmKeep, kCHeader, "Publisher"}, - {DE_DEU, kITENotWyrmKeep, kCHeader, "Herausgeber"}, - {IT_ITA, kITENotWyrmKeep, kCHeader, "Editore"}, - {UNK_LANG, kITEAny, kCText, "Jon Van Caneghem"} - }; - - int n_credits = ARRAYSIZE(credits); - - switch (param) { - case SCENE_BEGIN: - // Begin title screen background animation - _vm->_anim->setCycles(0, -1); - - event.type = kEvTOneshot; - event.code = kAnimEvent; - event.op = kEventPlay; - event.param = 0; - event.time = 0; - q_event = _vm->_events->queue(&event); - - // Begin ITE title theme music - _vm->_music->stop(); - - event.type = kEvTOneshot; - event.code = kMusicEvent; - event.param = MUSIC_2; - event.param2 = MUSIC_NORMAL; - event.op = kEventPlay; - event.time = 0; - q_event = _vm->_events->chain(q_event, &event); - - // Pause animation before logo - event.type = kEvTOneshot; - event.code = kAnimEvent; - event.op = kEventStop; - event.param = 0; - event.time = 3000; - q_event = _vm->_events->chain(q_event, &event); - - // Display logo - event.type = kEvTContinuous; - event.code = kTransitionEvent; - event.op = kEventDissolveBGMask; - event.time = 0; - event.duration = LOGO_DISSOLVE_DURATION; - q_event = _vm->_events->chain(q_event, &event); - - // Remove logo - event.type = kEvTContinuous; - event.code = kTransitionEvent; - event.op = kEventDissolve; - event.time = 3000; - event.duration = LOGO_DISSOLVE_DURATION; - q_event = _vm->_events->chain(q_event, &event); - - // Unpause animation before logo - event.type = kEvTOneshot; - event.code = kAnimEvent; - event.op = kEventPlay; - event.time = 0; - event.param = 0; - q_event = _vm->_events->chain(q_event, &event); - - // Queue game credits list - q_event = ITEQueueCredits(9000, CREDIT_DURATION1, n_credits, credits); - - // End scene after credit display - event.type = kEvTOneshot; - event.code = kSceneEvent; - event.op = kEventEnd; - event.time = 1000; - q_event = _vm->_events->chain(q_event, &event); - - break; - case SCENE_END: - break; - default: - warning("Illegal scene procedure parameter"); - break; - } - - return 0; -} - -int Scene::SC_ITEIntroTreeHouseProc(int param, void *refCon) { - return ((Scene *)refCon)->ITEIntroTreeHouseProc(param); -} - -// Handles second intro credit screen (treehouse view) -int Scene::ITEIntroTreeHouseProc(int param) { - Event event; - Event *q_event; - - static const IntroCredit credits1[] = { - {EN_ANY, kITEAny, kCHeader, "Game Design"}, - {DE_DEU, kITEAny, kCHeader, "Spielentwurf"}, - {IT_ITA, kITEAny, kCHeader, "Progetto"}, - {UNK_LANG, kITEAny, kCText, "Talin, Joe Pearce, Robert McNally"}, - {EN_ANY, kITEAny, kCText, "and Carolly Hauksdottir"}, - {DE_DEU, kITEAny, kCText, "und Carolly Hauksdottir"}, - {IT_ITA, kITEAny, kCText, "e Carolly Hauksdottir"}, - {EN_ANY, kITEAny, kCHeader, "Screenplay and Dialog"}, - {EN_ANY, kITEAny, kCText, "Robert Leh, Len Wein, and Bill Rotsler"}, - {DE_DEU, kITEAny, kCHeader, "Geschichte und Dialoge"}, - {DE_DEU, kITEAny, kCText, "Robert Leh, Len Wein und Bill Rotsler"}, - {IT_ITA, kITEAny, kCHeader, "Sceneggiatura e Dialoghi"}, - {IT_ITA, kITEAny, kCText, "Robert Leh, Len Wein e Bill Rotsler"} - }; - - int n_credits1 = ARRAYSIZE(credits1); - - static const IntroCredit credits2[] = { - {UNK_LANG, kITEWyrmKeep, kCHeader, "Art Direction"}, - {UNK_LANG, kITEWyrmKeep, kCText, "Allison Hershey"}, - {EN_ANY, kITEAny, kCHeader, "Art"}, - {DE_DEU, kITEAny, kCHeader, "Grafiken"}, - {IT_ITA, kITEAny, kCHeader, "Grafica"}, - {UNK_LANG, kITEWyrmKeep, kCText, "Ed Lacabanne, Glenn Price, April Lee,"}, - {UNK_LANG, kITENotWyrmKeep, kCText, "Edward Lacabanne, Glenn Price, April Lee,"}, - {UNK_LANG, kITEWyrmKeep, kCText, "Lisa Sample, Brian Dowrick, Reed Waller,"}, - {EN_ANY, kITEWyrmKeep, kCText, "Allison Hershey and Talin"}, - {DE_DEU, kITEWyrmKeep, kCText, "Allison Hershey und Talin"}, - {IT_ITA, kITEWyrmKeep, kCText, "Allison Hershey e Talin"}, - {EN_ANY, kITENotWyrmKeep, kCText, "Lisa Iennaco, Brian Dowrick, Reed"}, - {EN_ANY, kITENotWyrmKeep, kCText, "Waller, Allison Hershey and Talin"}, - {DE_DEU, kITEAny, kCText, "Waller, Allison Hershey und Talin"}, - {IT_ITA, kITEAny, kCText, "Waller, Allison Hershey e Talin"}, - {EN_ANY, kITENotWyrmKeep, kCHeader, "Art Direction"}, - {DE_DEU, kITENotWyrmKeep, kCHeader, "Grafische Leitung"}, - {IT_ITA, kITENotWyrmKeep, kCHeader, "Direzione Grafica"}, - {UNK_LANG, kITENotWyrmKeep, kCText, "Allison Hershey"} - }; - - int n_credits2 = ARRAYSIZE(credits2); - - switch (param) { - case SCENE_BEGIN: - // Start 'dissolve' transition to new scene background - event.type = kEvTContinuous; - event.code = kTransitionEvent; - event.op = kEventDissolve; - event.time = 0; - event.duration = DISSOLVE_DURATION; - q_event = _vm->_events->queue(&event); - - if (_vm->_anim->hasAnimation(0)) { - // Begin title screen background animation - _vm->_anim->setFrameTime(0, 100); - - event.type = kEvTOneshot; - event.code = kAnimEvent; - event.op = kEventPlay; - event.param = 0; - event.time = 0; - q_event = _vm->_events->chain(q_event, &event); - } - - // Queue game credits list - q_event = ITEQueueCredits(DISSOLVE_DURATION + 2000, CREDIT_DURATION1, n_credits1, credits1); - q_event = ITEQueueCredits(DISSOLVE_DURATION + 7000, CREDIT_DURATION1, n_credits2, credits2); - - // End scene after credit display - event.type = kEvTOneshot; - event.code = kSceneEvent; - event.op = kEventEnd; - event.time = 1000; - q_event = _vm->_events->chain(q_event, &event); - - break; - case SCENE_END: - break; - default: - warning("Illegal scene procedure parameter"); - break; - } - - return 0; -} - -int Scene::SC_ITEIntroFairePathProc(int param, void *refCon) { - return ((Scene *)refCon)->ITEIntroFairePathProc(param); -} - -// Handles third intro credit screen (path to puzzle tent) -int Scene::ITEIntroFairePathProc(int param) { - Event event; - Event *q_event; - - static const IntroCredit credits1[] = { - {EN_ANY, kITEAny, kCHeader, "Programming"}, - {DE_DEU, kITEAny, kCHeader, "Programmiert von"}, - {IT_ITA, kITEAny, kCHeader, "Programmazione"}, - {UNK_LANG, kITEAny, kCText, "Talin, Walter Hochbrueckner,"}, - {EN_ANY, kITEAny, kCText, "Joe Burks and Robert Wiggins"}, - {DE_DEU, kITEAny, kCText, "Joe Burks und Robert Wiggins"}, - {IT_ITA, kITEAny, kCText, "Joe Burks e Robert Wiggins"}, - {EN_ANY, kITEPCCD | kITEWyrmKeep, kCHeader, "Additional Programming"}, - {EN_ANY, kITEPCCD | kITEWyrmKeep, kCText, "John Bolton"}, - {UNK_LANG, kITEMac, kCHeader, "Macintosh Version"}, - {UNK_LANG, kITEMac, kCText, "Michael McNally and Robert McNally"}, - {EN_ANY, kITEAny, kCHeader, "Music and Sound"}, - {DE_DEU, kITEAny, kCHeader, "Musik und Sound"}, - {IT_ITA, kITEAny, kCHeader, "Musica e Sonoro"}, - {UNK_LANG, kITEAny, kCText, "Matt Nathan"} - }; - - int n_credits1 = ARRAYSIZE(credits1); - - static const IntroCredit credits2[] = { - {EN_ANY, kITEAny, kCHeader, "Directed by"}, - {DE_DEU, kITEAny, kCHeader, "Regie"}, - {IT_ITA, kITEAny, kCHeader, "Regia"}, - {UNK_LANG, kITEAny, kCText, "Talin"} - }; - - int n_credits2 = ARRAYSIZE(credits2); - - switch (param) { - case SCENE_BEGIN: - // Start 'dissolve' transition to new scene background - event.type = kEvTContinuous; - event.code = kTransitionEvent; - event.op = kEventDissolve; - event.time = 0; - event.duration = DISSOLVE_DURATION; - q_event = _vm->_events->queue(&event); - - // Begin title screen background animation - _vm->_anim->setCycles(0, -1); - - event.type = kEvTOneshot; - event.code = kAnimEvent; - event.op = kEventPlay; - event.param = 0; - event.time = 0; - q_event = _vm->_events->chain(q_event, &event); - - // Queue game credits list - q_event = ITEQueueCredits(DISSOLVE_DURATION + 2000, CREDIT_DURATION1, n_credits1, credits1); - q_event = ITEQueueCredits(DISSOLVE_DURATION + 7000, CREDIT_DURATION1, n_credits2, credits2); - - // End scene after credit display - event.type = kEvTOneshot; - event.code = kSceneEvent; - event.op = kEventEnd; - event.time = 1000; - q_event = _vm->_events->chain(q_event, &event); - - break; - case SCENE_END: - break; - default: - warning("Illegal scene procedure parameter"); - break; - } - - return 0; -} - -int Scene::SC_ITEIntroFaireTentProc(int param, void *refCon) { - return ((Scene *)refCon)->ITEIntroFaireTentProc(param); -} - -// Handles fourth intro credit screen (treehouse view) -int Scene::ITEIntroFaireTentProc(int param) { - Event event; - Event *q_event; - Event *q_event_start; - - switch (param) { - case SCENE_BEGIN: - - // Start 'dissolve' transition to new scene background - event.type = kEvTContinuous; - event.code = kTransitionEvent; - event.op = kEventDissolve; - event.time = 0; - event.duration = DISSOLVE_DURATION; - q_event_start = _vm->_events->queue(&event); - - // End scene after momentary pause - event.type = kEvTOneshot; - event.code = kSceneEvent; - event.op = kEventEnd; - event.time = 5000; - q_event = _vm->_events->chain(q_event_start, &event); - - break; - case SCENE_END: - break; - default: - warning("Illegal scene procedure parameter"); - break; - } - - return 0; -} - -} // End of namespace Saga diff --git a/engines/saga/module.mk b/engines/saga/module.mk index 76783a17ae..b1929361a2 100644 --- a/engines/saga/module.mk +++ b/engines/saga/module.mk @@ -11,11 +11,11 @@ MODULE_OBJS := \ font.o \ font_map.o \ gfx.o \ - ihnm_introproc.o \ image.o \ interface.o \ + introproc_ihnm.o \ + introproc_ite.o \ isomap.o \ - ite_introproc.o \ itedata.o \ objectmap.o \ puzzle.o \ -- cgit v1.2.3 From f1410d2f72c293abed942f31673e56693cceb786 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 May 2008 11:17:57 +0000 Subject: Updated the MSVC project files of the SAGA engine svn-id: r32284 --- dists/msvc7/saga.vcproj | 3 --- dists/msvc71/saga.vcproj | 3 --- dists/msvc8/saga.vcproj | 4 ---- dists/msvc9/saga.vcproj | 4 ---- 4 files changed, 14 deletions(-) diff --git a/dists/msvc7/saga.vcproj b/dists/msvc7/saga.vcproj index ecbdec967b..42bea822e7 100644 --- a/dists/msvc7/saga.vcproj +++ b/dists/msvc7/saga.vcproj @@ -225,9 +225,6 @@ - - diff --git a/dists/msvc71/saga.vcproj b/dists/msvc71/saga.vcproj index 1e1333a9c7..9c9f0260af 100644 --- a/dists/msvc71/saga.vcproj +++ b/dists/msvc71/saga.vcproj @@ -239,9 +239,6 @@ - - diff --git a/dists/msvc8/saga.vcproj b/dists/msvc8/saga.vcproj index d40332b470..17bd6bbb68 100644 --- a/dists/msvc8/saga.vcproj +++ b/dists/msvc8/saga.vcproj @@ -332,10 +332,6 @@ RelativePath="..\..\engines\saga\saga.h" > - - diff --git a/dists/msvc9/saga.vcproj b/dists/msvc9/saga.vcproj index 8d70a3d411..0c6c1eda73 100644 --- a/dists/msvc9/saga.vcproj +++ b/dists/msvc9/saga.vcproj @@ -333,10 +333,6 @@ RelativePath="..\..\engines\saga\saga.h" > - - -- cgit v1.2.3 From e92fccfdd9cfe0b9cd0d0344adbe7d75db250061 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 26 May 2008 12:05:55 +0000 Subject: Formatting. svn-id: r32285 --- engines/m4/script.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/m4/script.h b/engines/m4/script.h index 7215d57bbd..2a937040e9 100644 --- a/engines/m4/script.h +++ b/engines/m4/script.h @@ -300,7 +300,7 @@ 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()); - T* result = _dataCache->load(_scriptFile, _data[value.value]->offset); + T *result = _dataCache->load(_scriptFile, _data[value.value]->offset); return *result; } -- cgit v1.2.3 From a6d591b947384470a85e2229c231df1eb3773ff7 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Mon, 26 May 2008 12:12:51 +0000 Subject: Replaced a loop in PluginManger::loadPlugins with Common::for_each as a typical usage example. svn-id: r32286 --- base/plugins.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/base/plugins.cpp b/base/plugins.cpp index 435e5bf1f1..052bca935d 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -285,9 +285,7 @@ void PluginManager::loadPlugins() { pp != _providers.end(); ++pp) { PluginList pl((*pp)->getPlugins()); - for (PluginList::iterator plugin = pl.begin(); plugin != pl.end(); ++plugin) { - tryLoadPlugin(*plugin); - } + Common::for_each(pl.begin(), pl.end(), Common::bind1st(Common::mem_fun(&PluginManager::tryLoadPlugin), this)); } } -- cgit v1.2.3 From 4564b65dd54ed2534a036a7c5b5e707d53050e19 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Mon, 26 May 2008 12:30:36 +0000 Subject: Update MSVC project files. svn-id: r32287 --- dists/msvc7/saga.vcproj | 14 +++++++------- dists/msvc71/saga.vcproj | 14 +++++++------- dists/msvc8/saga.vcproj | 16 ++++++++-------- dists/msvc9/saga.vcproj | 16 ++++++++-------- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/dists/msvc7/saga.vcproj b/dists/msvc7/saga.vcproj index 42bea822e7..1a1cb29555 100644 --- a/dists/msvc7/saga.vcproj +++ b/dists/msvc7/saga.vcproj @@ -1,4 +1,4 @@ - + - - @@ -166,13 +163,16 @@ RelativePath="..\..\engines\saga\interface.h"> + RelativePath="..\..\engines\saga\introproc_ihnm.cpp"> + RelativePath="..\..\engines\saga\introproc_ite.cpp"> + RelativePath="..\..\engines\saga\isomap.cpp"> + + diff --git a/dists/msvc71/saga.vcproj b/dists/msvc71/saga.vcproj index 9c9f0260af..388dd64ff2 100644 --- a/dists/msvc71/saga.vcproj +++ b/dists/msvc71/saga.vcproj @@ -1,4 +1,4 @@ - + - - @@ -180,13 +177,16 @@ RelativePath="..\..\engines\saga\interface.h"> + RelativePath="..\..\engines\saga\introproc_ihnm.cpp"> + RelativePath="..\..\engines\saga\introproc_ite.cpp"> + RelativePath="..\..\engines\saga\isomap.cpp"> + + diff --git a/dists/msvc8/saga.vcproj b/dists/msvc8/saga.vcproj index 17bd6bbb68..79f7d35fb5 100644 --- a/dists/msvc8/saga.vcproj +++ b/dists/msvc8/saga.vcproj @@ -1,4 +1,4 @@ - + - - @@ -253,15 +249,19 @@ > + + + - - @@ -254,15 +250,19 @@ > + + layers = new StaticLayer[ptr->layersCount]; - ptr->pieces = new PieceDesc*[picsCount]; - ptr->piecesFromExt = new bool[picsCount]; for (int i = 0; i < ptr->layersCount; i++) { int16 offset = READ_LE_UINT16(dataPtr + i * 2); @@ -166,18 +163,13 @@ int16 Scenery::loadStatic(char search) { backsPtr++; } + ptr->pieces = new PieceDesc*[picsCount]; + ptr->piecesCount = new uint32[picsCount]; + for (int i = 0; i < picsCount; i++) { - pictDescId = _vm->_inter->load16(); + int16 pictDescId = _vm->_inter->load16(); - if (pictDescId >= 30000) { - ptr->pieces[i] = - (PieceDesc *) _vm->_game->loadExtData(pictDescId, 0, 0); - ptr->piecesFromExt[i] = true; - } else { - ptr->pieces[i] = - (PieceDesc *) _vm->_game->loadTotResource(pictDescId); - ptr->piecesFromExt[i] = false; - } + loadPieces(pictDescId, ptr->pieces[i], ptr->piecesCount[i]); width = _vm->_inter->load16(); height = _vm->_inter->load16(); @@ -224,8 +216,7 @@ void Scenery::freeStatic(int16 index) { return; for (int i = 0; i < _staticPictCount[index]; i++) { - if (_statics[index].piecesFromExt[i]) - delete[] _statics[index].pieces[i]; + delete[] _statics[index].pieces[i]; spr = _staticPictToSprite[index * 7 + i]; _spriteRefs[spr]--; @@ -239,7 +230,7 @@ void Scenery::freeStatic(int16 index) { delete[] _statics[index].layers[i].planes; delete[] _statics[index].layers; delete[] _statics[index].pieces; - delete[] _statics[index].piecesFromExt; + delete[] _statics[index].piecesCount; _statics[index].layersCount = 0; _staticPictCount[index] = -1; @@ -253,8 +244,8 @@ void Scenery::renderStatic(int16 scenery, int16 layer) { int16 order; int16 plane; - int16 pieceIndex; - int16 pictIndex; + uint16 pieceIndex; + uint16 pictIndex; int16 left; int16 right; @@ -286,15 +277,21 @@ void Scenery::renderStatic(int16 scenery, int16 layer) { pieceIndex = planePtr->pieceIndex; pictIndex = planePtr->pictIndex - 1; - if ((pictIndex >= _staticPictCount[scenery]) || (!ptr->pieces)) + if (pictIndex >= _staticPictCount[scenery]) + continue; + + if (!ptr->pieces || !ptr->pieces[pictIndex]) + continue; + + if (pieceIndex >= ptr->piecesCount[pictIndex]) continue; _vm->_draw->_destSpriteX = planePtr->destX; _vm->_draw->_destSpriteY = planePtr->destY; - left = FROM_LE_16(ptr->pieces[pictIndex][pieceIndex].left); - right = FROM_LE_16(ptr->pieces[pictIndex][pieceIndex].right); - top = FROM_LE_16(ptr->pieces[pictIndex][pieceIndex].top); - bottom = FROM_LE_16(ptr->pieces[pictIndex][pieceIndex].bottom); + left = ptr->pieces[pictIndex][pieceIndex].left; + right = ptr->pieces[pictIndex][pieceIndex].right; + top = ptr->pieces[pictIndex][pieceIndex].top; + bottom = ptr->pieces[pictIndex][pieceIndex].bottom; _vm->_draw->_sourceSurface = _staticPictToSprite[scenery * 7 + pictIndex]; @@ -316,8 +313,8 @@ void Scenery::updateStatic(int16 orderFrom, byte index, byte layer) { int16 planeCount; int16 order; int16 plane; - int16 pieceIndex; - int16 pictIndex; + uint16 pieceIndex; + uint16 pictIndex; int16 left; int16 right; @@ -341,16 +338,22 @@ void Scenery::updateStatic(int16 orderFrom, byte index, byte layer) { pieceIndex = planePtr->pieceIndex; pictIndex = planePtr->pictIndex - 1; - if ((pictIndex >= _staticPictCount[index]) || (!pictPtr[pictIndex])) + if (pictIndex >= _staticPictCount[index]) + continue; + + if (!pictPtr || !pictPtr[pictIndex]) + continue; + + if (pieceIndex >= _statics[index].piecesCount[pictIndex]) continue; _vm->_draw->_destSpriteX = planePtr->destX; _vm->_draw->_destSpriteY = planePtr->destY; - left = FROM_LE_16(pictPtr[pictIndex][pieceIndex].left); - right = FROM_LE_16(pictPtr[pictIndex][pieceIndex].right); - top = FROM_LE_16(pictPtr[pictIndex][pieceIndex].top); - bottom = FROM_LE_16(pictPtr[pictIndex][pieceIndex].bottom); + left = pictPtr[pictIndex][pieceIndex].left; + right = pictPtr[pictIndex][pieceIndex].right; + top = pictPtr[pictIndex][pieceIndex].top; + bottom = pictPtr[pictIndex][pieceIndex].bottom; if (_vm->_draw->_destSpriteX > _toRedrawRight) continue; @@ -421,7 +424,6 @@ int16 Scenery::loadAnim(char search) { byte *extData; byte *dataPtr; Animation *ptr; - int16 pictDescId; int16 width; int16 height; int16 sprResId; @@ -460,9 +462,6 @@ int16 Scenery::loadAnim(char search) { dataPtr += 2; ptr->layers = new AnimLayer[ptr->layersCount]; - ptr->pieces = new PieceDesc*[picsCount]; - ptr->piecesFromExt = new bool[picsCount]; - ptr->sizes = new uint16[picsCount]; for (i = 0; i < ptr->layersCount; i++) { int16 offset = READ_LE_UINT16(dataPtr + i * 2); @@ -498,23 +497,13 @@ int16 Scenery::loadAnim(char search) { } } + ptr->pieces = new PieceDesc*[picsCount]; + ptr->piecesCount = new uint32[picsCount]; + for (i = 0; i < picsCount; i++) { - pictDescId = _vm->_inter->load16(); - if (pictDescId >= 30000) { - uint32 size; - - ptr->pieces[i] = - (PieceDesc *) _vm->_game->loadExtData(pictDescId, 0, 0, &size); - ptr->piecesFromExt[i] = true; - ptr->sizes[i] = size / 8; - } else { - int16 size; + int16 pictDescId = _vm->_inter->load16(); - ptr->pieces[i] = - (PieceDesc *) _vm->_game->loadTotResource(pictDescId, &size); - ptr->piecesFromExt[i] = false; - ptr->sizes[i] = size / 8; - } + loadPieces(pictDescId, ptr->pieces[i], ptr->piecesCount[i]); width = _vm->_inter->load16(); height = _vm->_inter->load16(); @@ -560,8 +549,7 @@ void Scenery::freeAnim(int16 index) { return; for (int i = 0; i < _animPictCount[index]; i++) { - if (_animations[index].piecesFromExt[i]) - delete[] _animations[index].pieces[i]; + delete[] _animations[index].pieces[i]; spr = _animPictToSprite[index * 7 + i]; _spriteRefs[spr]--; @@ -575,8 +563,7 @@ void Scenery::freeAnim(int16 index) { delete[] _animations[index].layers[i].frames; delete[] _animations[index].layers; delete[] _animations[index].pieces; - delete[] _animations[index].piecesFromExt; - delete[] _animations[index].sizes; + delete[] _animations[index].piecesCount; _animPictCount[index] = 0; } @@ -827,20 +814,19 @@ void Scenery::updateAnim(int16 layer, int16 frame, int16 animation, int16 flags, pictIndex = (pictIndex & 15) - 1; - if ((pictIndex == 0xFFFF) || (_animPictCount[animation] <= pictIndex)) { - warning("Scenery::updateAnim: pictIndex out of range"); - return; - } + if (pictIndex >= _animPictCount[animation]) + continue; - if (_animations[animation].sizes[pictIndex] <= pieceIndex) { - warning("Scenery::updateAnim: pieceIndex out of range"); + if (!pictPtr[pictIndex]) continue; - } - left = READ_LE_UINT16(&pictPtr[pictIndex][pieceIndex].left); - right = READ_LE_UINT16(&pictPtr[pictIndex][pieceIndex].right); - top = READ_LE_UINT16(&pictPtr[pictIndex][pieceIndex].top); - bottom = READ_LE_UINT16(&pictPtr[pictIndex][pieceIndex].bottom); + if (pieceIndex >= _animations[animation].piecesCount[pictIndex]) + continue; + + left = pictPtr[pictIndex][pieceIndex].left; + right = pictPtr[pictIndex][pieceIndex].right; + top = pictPtr[pictIndex][pieceIndex].top; + bottom = pictPtr[pictIndex][pieceIndex].bottom; if (flags & 2) { if (destX < _vm->_mult->_animLeft) { @@ -961,4 +947,42 @@ Scenery::AnimLayer *Scenery::getAnimLayer(uint16 index, uint16 layer) { return &_animations[index].layers[layer]; } +void Scenery::loadPieces(int16 pictDescId, PieceDesc *&pieceDesc, uint32 &piecesCount) { + byte *data; + uint32 size; + bool fromExt = false; + + if (pictDescId >= 30000) { + fromExt = true; + + uint32 eSize; + + data = _vm->_game->loadExtData(pictDescId, 0, 0, &eSize); + size = eSize; + } else { + int16 tSize; + + data = _vm->_game->loadTotResource(pictDescId, &tSize); + size = tSize; + } + + if (!data) + error("Scenery::loadPieces(): Can't load pictDescId %d", pictDescId); + + piecesCount = size / 8; + pieceDesc = new PieceDesc[piecesCount]; + + Common::MemoryReadStream pieceData(data, size); + + for (uint32 i = 0; i < piecesCount; i++) { + pieceDesc[i].left = (int16) pieceData.readUint16LE(); + pieceDesc[i].right = (int16) pieceData.readUint16LE(); + pieceDesc[i].top = (int16) pieceData.readUint16LE(); + pieceDesc[i].bottom = (int16) pieceData.readUint16LE(); + } + + if (fromExt) + delete[] data; +} + } // End of namespace Gob diff --git a/engines/gob/scenery.h b/engines/gob/scenery.h index 03ef84e16d..21bf29deda 100644 --- a/engines/gob/scenery.h +++ b/engines/gob/scenery.h @@ -34,10 +34,10 @@ public: #include "common/pack-start.h" // START STRUCT PACKING struct PieceDesc { - int16 left; //NOTE: - int16 right; //These are stored in Little Endian format - int16 top; //And should be converted by client code when accessed - int16 bottom; //i.e. use FROM_LE_16() + int16 left; + int16 right; + int16 top; + int16 bottom; } PACKED_STRUCT; struct StaticPlane { @@ -82,19 +82,16 @@ public: int16 layersCount; StaticLayer *layers; PieceDesc **pieces; - bool *piecesFromExt; - Static() : layersCount(0), layers(0), pieces(0), - piecesFromExt(0) {} + uint32 *piecesCount; + Static() : layersCount(0), layers(0), pieces(0), piecesCount(0) {} }; struct Animation { int16 layersCount; AnimLayer *layers; PieceDesc **pieces; - bool *piecesFromExt; - uint16 *sizes; - Animation() : layersCount(0), layers(0), pieces(0), - piecesFromExt(0) {} + uint32 *piecesCount; + Animation() : layersCount(0), layers(0), pieces(0), piecesCount(0) {} }; int16 _curStatic; @@ -151,6 +148,8 @@ protected: GobEngine *_vm; + void loadPieces(int16 pictDescId, PieceDesc *&pieceDesc, uint32 &piecesCount); + void updateStatic(int16 orderFrom, byte index, byte layer); }; -- cgit v1.2.3 From d37be9427508755ec6878d6c8f764b9d6ee56d14 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 May 2008 17:49:32 +0000 Subject: Cleanup svn-id: r32293 --- engines/drascula/drascula.cpp | 204 +++++++++--------------------------------- 1 file changed, 44 insertions(+), 160 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 9e4554fb8c..26e8f65bc1 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -2289,87 +2289,51 @@ void DrasculaEngine::puertas_cerradas(int l) { if (num_ejec == 1 || num_ejec == 3 || num_ejec == 5 || num_ejec == 6) return; else if (num_ejec == 2) { - if (num_obj[l] == 138 && flags[0] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 138 && flags[0] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 136 && flags[8] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 136 && flags[8] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 156 && flags[16] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 156 && flags[16] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 163 && flags[17] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 163 && flags[17] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 177 && flags[15] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 177 && flags[15] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 175 && flags[40] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 175 && flags[40] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 173 && flags[36] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 173 && flags[36] == 1) - isDoor[l] = 1; + if (num_obj[l] == 138) + isDoor[l] = flags[0]; + else if (num_obj[l] == 136) + isDoor[l] = flags[8]; + else if (num_obj[l] == 156) + isDoor[l] = flags[16]; + else if (num_obj[l] == 163) + isDoor[l] = flags[17]; + else if (num_obj[l] == 177) + isDoor[l] = flags[15]; + else if (num_obj[l] == 175) + isDoor[l] = flags[40]; + else if (num_obj[l] == 173) + isDoor[l] = flags[36]; } else if (num_ejec == 4) { if (num_obj[l] == 101 && flags[0] == 0) isDoor[l] = 0; else if (num_obj[l] == 101 && flags[0] == 1 && flags[28] == 1) isDoor[l] = 1; - else if (num_obj[l] == 103 && flags[0] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 103 && flags[0] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 104 && flags[1] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 104 && flags[1] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 105 && flags[1] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 105 && flags[1] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 106 && flags[2] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 106 && flags[2] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 107 && flags[2] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 107 && flags[2] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 110 && flags[6] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 110 && flags[6] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 114 && flags[4] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 114 && flags[4] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 115 && flags[4] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 115 && flags[4] == 1) - isDoor[l] = 1; + else if (num_obj[l] == 103) + isDoor[l] = flags[0]; + else if (num_obj[l] == 104) + isDoor[l] = flags[1]; + else if (num_obj[l] == 105) + isDoor[l] = flags[1]; + else if (num_obj[l] == 106) + isDoor[l] = flags[2]; + else if (num_obj[l] == 107) + isDoor[l] = flags[2]; + else if (num_obj[l] == 110) + isDoor[l] = flags[6]; + else if (num_obj[l] == 114) + isDoor[l] = flags[4]; + else if (num_obj[l] == 115) + isDoor[l] = flags[4]; else if (num_obj[l] == 116 && flags[5] == 0) isDoor[l] = 0; else if (num_obj[l] == 116 && flags[5] == 1 && flags[23] == 1) isDoor[l] = 1; - else if (num_obj[l] == 117 && flags[5] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 117 && flags[5] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 120 && flags[8] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 120 && flags[8] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 122 && flags[7] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 122 && flags[7] == 1) - isDoor[l] = 1; + else if (num_obj[l] == 117) + isDoor[l] = flags[5]; + else if (num_obj[l] == 120) + isDoor[l] = flags[8]; + else if (num_obj[l] == 122) + isDoor[l] = flags[7]; } } @@ -3267,80 +3231,12 @@ void DrasculaEngine::introduce_nombre() { key = getscan(); delay(70); if (key != 0) { - if (key == Common::KEYCODE_q) - select2[v] = 'q'; - else if (key == Common::KEYCODE_w) - select2[v] = 'w'; - else if (key == Common::KEYCODE_e) - select2[v] = 'e'; - else if (key == Common::KEYCODE_r) - select2[v] = 'r'; - else if (key == Common::KEYCODE_t) - select2[v] = 't'; - else if (key == Common::KEYCODE_y) - select2[v] = 'y'; - else if (key == Common::KEYCODE_u) - select2[v] = 'u'; - else if (key == Common::KEYCODE_i) - select2[v] = 'i'; - else if (key == Common::KEYCODE_o) - select2[v] = 'o'; - else if (key == Common::KEYCODE_p) - select2[v] = 'p'; - else if (key == Common::KEYCODE_a) - select2[v] = 'a'; - else if (key == Common::KEYCODE_s) - select2[v] = 's'; - else if (key == Common::KEYCODE_d) - select2[v] = 'd'; - else if (key == Common::KEYCODE_f) - select2[v] = 'f'; - else if (key == Common::KEYCODE_g) - select2[v] = 'g'; - else if (key == Common::KEYCODE_h) - select2[v] = 'h'; - else if (key == Common::KEYCODE_j) - select2[v] = 'j'; - else if (key == Common::KEYCODE_k) - select2[v] = 'k'; - else if (key == Common::KEYCODE_l) - select2[v] = 'l'; + if (key >= 0 && key <= 0xFF && isalpha(key)) + select2[v] = tolower(key); else if ((key == Common::KEYCODE_LCTRL) || (key == Common::KEYCODE_RCTRL)) select2[v] = '\164'; - else if (key == Common::KEYCODE_z) - select2[v] = 'z'; - else if (key == Common::KEYCODE_x) - select2[v] = 'x'; - else if (key == Common::KEYCODE_c) - select2[v] = 'c'; - else if (key == Common::KEYCODE_v) - select2[v] = 'v'; - else if (key == Common::KEYCODE_b) - select2[v] = 'b'; - else if (key == Common::KEYCODE_n) - select2[v] = 'n'; - else if (key == Common::KEYCODE_m) - select2[v] = 'm'; - else if (key == Common::KEYCODE_1) - select2[v] = '1'; - else if (key == Common::KEYCODE_2) - select2[v] = '2'; - else if (key == Common::KEYCODE_3) - select2[v] = '3'; - else if (key == Common::KEYCODE_4) - select2[v] = '4'; - else if (key == Common::KEYCODE_5) - select2[v] = '5'; - else if (key == Common::KEYCODE_6) - select2[v] = '6'; - else if (key == Common::KEYCODE_7) - select2[v] = '7'; - else if (key == Common::KEYCODE_8) - select2[v] = '8'; - else if (key == Common::KEYCODE_9) - select2[v] = '9'; - else if (key == Common::KEYCODE_0) - select2[v] = '0'; + else if (key >= Common::KEYCODE_0 && key <= Common::KEYCODE_9) + select2[v] = key; else if (key == Common::KEYCODE_SPACE) select2[v] = '\167'; else if (key == ESC) @@ -3759,28 +3655,16 @@ void DrasculaEngine::aumenta_num_frame() { if (num_frame == 6) num_frame = 0; - if (direccion_hare == 0) { + if (direccion_hare == 0 || direccion_hare == 7) { hare_x = hare_x - step_x; hare_y = hare_y - step_y; - } else if (direccion_hare == 7) { - hare_x = hare_x - step_x; - hare_y = hare_y - step_y; - } else if (direccion_hare == 1) { + } else if (direccion_hare == 1 || direccion_hare == 2) { hare_x = hare_x + step_x; hare_y = hare_y - step_y; - } else if (direccion_hare == 2) { + } else if (direccion_hare == 3 || direccion_hare == 4) { hare_x = hare_x + step_x; - hare_y = hare_y - step_y; - } else if (direccion_hare == 3) { - hare_x = hare_x + step_x; - hare_y = hare_y + step_y; - } else if (direccion_hare == 4) { - hare_x = hare_x + step_x; - hare_y = hare_y + step_y; - } else if (direccion_hare == 5) { - hare_x = hare_x - step_x; hare_y = hare_y + step_y; - } else if (direccion_hare == 6) { + } else if (direccion_hare == 5 || direccion_hare == 6) { hare_x = hare_x - step_x; hare_y = hare_y + step_y; } -- cgit v1.2.3 From e0051aa140da241e14a7feeb68f56d4dd6f9ee1b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 May 2008 17:50:26 +0000 Subject: Started rewriting room logic svn-id: r32294 --- engines/drascula/drascula.h | 3 + engines/drascula/rooms.cpp | 215 +++++++++++++++++++++++--------------------- engines/drascula/talk.cpp | 6 ++ 3 files changed, 123 insertions(+), 101 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 49d778dfd7..b7b5756a3a 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -72,6 +72,7 @@ struct DrasculaGameDescription; #define F8 0x42 #define F9 0x43 #define F10 0x44 +#define DEFAULT -1 #define LOOK 1 #define PICK 2 #define OPEN 3 @@ -622,6 +623,7 @@ public: void fin_sound(); void talk_bj(const char *, const char *); void talk_baul(const char *said, const char *filename); + void talk(int); void talk(const char *, const char *); void talk_sinc(const char *, const char *, const char *); void cierra_puerta(int nflag, int n_puerta); @@ -698,6 +700,7 @@ public: void aumenta_num_frame(); int sobre_que_objeto(); bool comprueba_banderas_menu(); + bool roomParse(int, int); void room_0(); void room_1(int); void room_2(int); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 7f6fa8f8b3..850c148989 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -32,82 +32,130 @@ static const char mirar_v[3][14] = {"100.als", "101.als", "54.als"}; static const int poder_t[6] = {11, 109, 111, 110, 115, 116}; static const char poder_v[6][14] = {"11.als", "109.als", "111.als", "110.als", "115.als", "116.als"}; +struct RoomTalkAction { + int num; + int action; + int objectID; + int speechID; +}; + +// TODO: move these elsewhere, or in a .dat file? +// Note: default action needs to be LAST for each group +// of actions with the same number +RoomTalkAction room0Actions[] = { + // num action object speech + { 1, LOOK, -1, 54 }, + { 1, MOVE, -1, 19 }, + { 1, PICK, -1, 11 }, + { 1, OPEN, -1, 9 }, + { 1, CLOSE, -1, 9 }, + { 1, TALK, -1, 16 }, + { 1, DEFAULT, -1, 11 }, + // ------------------------------- + { 2, MOVE, -1, 19 }, + { 2, OPEN, -1, 9 }, + { 2, CLOSE, -1, 9 }, + { 2, TALK, -1, 16 }, + // ------------------------------- + { 3, LOOK, -1, 316 }, + { 3, MOVE, -1, 317 }, + { 3, PICK, -1, 318 }, + { 3, OPEN, -1, 319 }, + { 3, CLOSE, -1, 319 }, + { 3, TALK, -1, 320 }, + { 3, DEFAULT, -1, 318 }, + // ------------------------------- + { 4, MOVE, -1, 19 }, + { 4, OPEN, -1, 9 }, + { 4, CLOSE, -1, 9 }, + { 4, TALK, -1, 16 }, + // ------------------------------- + { 5, OPEN, -1, 9 }, + { 5, CLOSE, -1, 9 }, + { 5, TALK, -1, 16 }, + // ------------------------------- + { 6, MOVE, -1, 19 }, + { 6, OPEN, -1, 9 }, + { 6, CLOSE, -1, 9 }, + { 6, TALK, -1, 16 } +}; + +RoomTalkAction room1Actions[] = { + { -1, PICK, 118, 5 }, + { -1, OPEN, 118, 3 }, + { -1, CLOSE, 118, 4 }, + { -1, TALK, 118, 6 }, + { -1, LOOK, 119, 8 }, + { -1, MOVE, 119, 13 }, + { -1, CLOSE, 119, 10 }, + { -1, TALK, 119, 12 }, + { -1, MOVE, 120, 13 }, + { -1, OPEN, 120, 18 }, + { -1, TALK, 120, 15 } +}; + +bool DrasculaEngine::roomParse(int roomNo, int flags) { + // TODO: find a better way to assign room actions + RoomTalkAction *roomActions = 0; + bool didAction = false; + + if (roomNo == 0) + roomActions = room0Actions; + else if (roomNo == 1) + roomActions = room1Actions; + + for (int i = 0; i < ARRAYSIZE(roomActions); i++) { + if (roomActions[i].num == num_ejec || + roomActions[i].num == -1) { + if (roomActions[i].action == objeto_que_lleva || + roomActions[i].action == DEFAULT) { + if (roomActions[i].objectID == flags || + roomActions[i].objectID == -1) { + talk(roomActions[i].speechID); + didAction = true; + break; + } + } + } + } + + return didAction; +} + void DrasculaEngine::room_0() { - if (num_ejec == 1) { - if (objeto_que_lleva == LOOK) - talk(_text[_lang][54], "54.als"); - else if (objeto_que_lleva == MOVE) - talk(_text[_lang][19], "19.als"); - else if (objeto_que_lleva == PICK) - talk(_text[_lang][11], "11.als"); - else if (objeto_que_lleva == OPEN) - talk(_text[_lang][9], "9.als"); - else if (objeto_que_lleva == CLOSE) - talk(_text[_lang][9], "9.als"); - else if (objeto_que_lleva == TALK) - talk(_text[_lang][16], "16.als"); - else - talk(_text[_lang][11],"11.als"); - } else if (num_ejec == 2) { + if (roomParse(0, -1)) + return; + + // non-default actions + if (num_ejec == 2) { if (objeto_que_lleva == LOOK) { talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; - } else if (objeto_que_lleva == MOVE) { - talk(_text[_lang][19], "19.als"); } else if (objeto_que_lleva == PICK) { talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; - } else if (objeto_que_lleva == OPEN) - talk(_text[_lang][9], "9.als"); - else if (objeto_que_lleva == CLOSE) - talk(_text[_lang][9], "9.als"); - else if (objeto_que_lleva == TALK) - talk(_text[_lang][16], "16.als"); - else { + } else { talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } - } else if (num_ejec == 3) { - if (objeto_que_lleva == LOOK) - talk(_text[_lang][316], "316.als"); - else if (objeto_que_lleva == MOVE) - talk(_text[_lang][317], "317.als"); - else if (objeto_que_lleva == PICK) - talk(_text[_lang][318], "318.als"); - else if (objeto_que_lleva == OPEN) - talk(_text[_lang][319], "319.als"); - else if (objeto_que_lleva == CLOSE) - talk(_text[_lang][319], "319.als"); - else if (objeto_que_lleva == TALK) - talk(_text[_lang][320], "320.als"); - else - talk(_text[_lang][318], "318.als"); } else if (num_ejec == 4) { if (objeto_que_lleva == LOOK) { talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; - } else if (objeto_que_lleva == MOVE) - talk(_text[_lang][19], "19.als"); - else if (objeto_que_lleva == PICK) { + } else if (objeto_que_lleva == PICK) { talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; - } else if (objeto_que_lleva == OPEN) - talk(_text[_lang][9], "9.als"); - else if (objeto_que_lleva == CLOSE) - talk(_text[_lang][9], "9.als"); - else if (objeto_que_lleva == TALK) - talk(_text[_lang][16], "16.als"); - else { + } else { talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) @@ -119,20 +167,12 @@ void DrasculaEngine::room_0() { c_mirar++; if (c_mirar == 3) c_mirar = 0; - } else if (objeto_que_lleva == MOVE) - talk(_text[_lang][19], "19.als"); - else if (objeto_que_lleva == PICK) { + } else if (objeto_que_lleva == PICK) { talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; - } else if (objeto_que_lleva == OPEN) - talk(_text[_lang][9], "9.als"); - else if (objeto_que_lleva == CLOSE) - talk(_text[_lang][9], "9.als"); - else if (objeto_que_lleva == TALK) - talk(_text[_lang][16], "16.als"); - else { + } else { talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) @@ -144,20 +184,12 @@ void DrasculaEngine::room_0() { c_mirar++; if (c_mirar == 3) c_mirar = 0; - } else if (objeto_que_lleva == MOVE) - talk(_text[_lang][19], "19.als"); - else if (objeto_que_lleva == PICK) { + } else if (objeto_que_lleva == PICK) { talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; - } else if (objeto_que_lleva == OPEN) - talk(_text[_lang][9], "9.als"); - else if (objeto_que_lleva == CLOSE) - talk(_text[_lang][9], "9.als"); - else if (objeto_que_lleva == TALK) - talk(_text[_lang][16], "16.als"); - else { + } else { talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) @@ -167,34 +199,15 @@ void DrasculaEngine::room_0() { } void DrasculaEngine::room_1(int fl) { + if (roomParse(1, fl)) + return; + if (objeto_que_lleva == LOOK && fl == 118) { talk(_text[_lang][1], "1.als"); pause(10); talk(_text[_lang][2], "2.als"); - } else if (objeto_que_lleva == PICK && fl == 118) - talk(_text[_lang][5], "5.als"); - else if (objeto_que_lleva == OPEN && fl == 118) - talk(_text[_lang][3], "3.als"); - else if (objeto_que_lleva == CLOSE && fl == 118) - talk(_text[_lang][4], "4.als"); - else if (objeto_que_lleva == TALK && fl == 118) - talk(_text[_lang][6], "6.als"); - else if (objeto_que_lleva == LOOK && fl == 119) - talk(_text[_lang][8], "8.als"); - else if (objeto_que_lleva == MOVE && fl == 119) - talk(_text[_lang][13], "13.als"); - else if (objeto_que_lleva == CLOSE && fl == 119) - talk(_text[_lang][10], "10.als"); - else if (objeto_que_lleva == TALK && fl == 119) - talk(_text[_lang][12], "12.als"); - else if (objeto_que_lleva == LOOK && fl == 120 && flags[8] == 0) + } else if (objeto_que_lleva == LOOK && fl == 120 && flags[8] == 0) talk(_text[_lang][14], "14.als"); - else if (objeto_que_lleva == MOVE && fl == 120) - talk(_text[_lang][13], "13.als"); - else if (objeto_que_lleva == OPEN && fl == 120) - talk(_text[_lang][18], "18.als"); - else if (objeto_que_lleva == TALK && fl == 120) - talk(_text[_lang][15], "15.als"); else hay_respuesta = 0; } @@ -287,25 +300,25 @@ void DrasculaEngine::room_3(int fl) { void DrasculaEngine::room_4(int fl) { if (objeto_que_lleva == MOVE && fl == 189 && flags[34] == 0) { - talk(_text[_lang][327], "327.als"); + talk(327); pickObject(13); flags[34] = 1; if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; } else if (objeto_que_lleva == LOOK && fl == 189) - talk(_text[_lang][182], "182.als"); + talk(182); else if (objeto_que_lleva == LOOK && fl == 207) - talk(_text[_lang][175], "175.als"); + talk(175); else if (objeto_que_lleva == TALK && fl == 207) - talk(_text[_lang][176], "176.als"); + talk(176); else if (objeto_que_lleva == LOOK && fl == 208) - talk(_text[_lang][177], "177.als"); + talk(177); else if (objeto_que_lleva == LOOK && fl == 209) - talk(_text[_lang][179], "179.als"); + talk(179); else if (objeto_que_lleva == LOOK && fl == 210) - talk(_text[_lang][180], "180.als"); + talk(180); else if (objeto_que_lleva == OPEN && fl == 210) - talk(_text[_lang][181], "181.als"); + talk(181); else hay_respuesta = 0; } diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 62f44c31d3..62a6d6e733 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -554,6 +554,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } +void DrasculaEngine::talk(int index) { + char name[100]; + sprintf(name, "%s.als", index); + talk(_text[_lang][index], name); +} + void DrasculaEngine::talk(const char *said, const char *filename) { int tiempou; long tiempol; -- cgit v1.2.3 From 6d6d634db180aa7cfa893b9c68d94f7f5a9787b9 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 26 May 2008 18:03:55 +0000 Subject: Made fallbackDetect to allow subclasses to override it svn-id: r32295 --- common/advancedDetector.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/advancedDetector.h b/common/advancedDetector.h index 2dc4b44b5f..bec03d5585 100644 --- a/common/advancedDetector.h +++ b/common/advancedDetector.h @@ -219,7 +219,7 @@ public: * @note The fslist parameter may be 0 -- in that case, it is assumed * that the callback searchs the current directory. */ - const Common::ADGameDescription *fallbackDetect(const FSList *fslist) const { + virtual const Common::ADGameDescription *fallbackDetect(const FSList *fslist) const { return 0; } }; -- cgit v1.2.3 From c6e29f4e4d6185af8e1f40d0d8a8ff2f7dec5ed6 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 26 May 2008 18:18:38 +0000 Subject: Disable Drascula's and MADE's dummy fallbackDetect. svn-id: r32297 --- engines/drascula/detection.cpp | 3 ++- engines/made/detection.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index a75da3b5cb..b3d8d964c8 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -234,7 +234,8 @@ const Common::ADGameDescription *DrasculaMetaEngine::fallbackDetect(const FSList Drascula::g_fallbackDesc.features = 0; Drascula::g_fallbackDesc.version = 0; - return (const Common::ADGameDescription *)&Drascula::g_fallbackDesc; + //return (const Common::ADGameDescription *)&Drascula::g_fallbackDesc; + return NULL; } #if PLUGIN_ENABLED_DYNAMIC(DRASCULA) diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp index d25a0685d7..7d30873866 100644 --- a/engines/made/detection.cpp +++ b/engines/made/detection.cpp @@ -356,7 +356,8 @@ const Common::ADGameDescription *MadeMetaEngine::fallbackDetect(const FSList *fs Made::g_fallbackDesc.features = 0; Made::g_fallbackDesc.version = 0; - return (const Common::ADGameDescription *)&Made::g_fallbackDesc; + //return (const Common::ADGameDescription *)&Made::g_fallbackDesc; + return NULL; } #if PLUGIN_ENABLED_DYNAMIC(MADE) -- cgit v1.2.3 From 3469c4821a6d3c810316552d49ca4bb9699cb2d8 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 May 2008 18:52:25 +0000 Subject: More simplification to the talk() calls, fixed a shadowing warning svn-id: r32298 --- engines/drascula/rooms.cpp | 180 ++++++++++++++++++++++----------------------- 1 file changed, 90 insertions(+), 90 deletions(-) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 850c148989..6098e5fba6 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -94,7 +94,7 @@ RoomTalkAction room1Actions[] = { { -1, TALK, 120, 15 } }; -bool DrasculaEngine::roomParse(int roomNo, int flags) { +bool DrasculaEngine::roomParse(int roomNo, int fl) { // TODO: find a better way to assign room actions RoomTalkAction *roomActions = 0; bool didAction = false; @@ -109,7 +109,7 @@ bool DrasculaEngine::roomParse(int roomNo, int flags) { roomActions[i].num == -1) { if (roomActions[i].action == objeto_que_lleva || roomActions[i].action == DEFAULT) { - if (roomActions[i].objectID == flags || + if (roomActions[i].objectID == fl || roomActions[i].objectID == -1) { talk(roomActions[i].speechID); didAction = true; @@ -203,73 +203,73 @@ void DrasculaEngine::room_1(int fl) { return; if (objeto_que_lleva == LOOK && fl == 118) { - talk(_text[_lang][1], "1.als"); + talk(1); pause(10); - talk(_text[_lang][2], "2.als"); + talk(2); } else if (objeto_que_lleva == LOOK && fl == 120 && flags[8] == 0) - talk(_text[_lang][14], "14.als"); + talk(14); else hay_respuesta = 0; } void DrasculaEngine::room_3(int fl) { if (objeto_que_lleva == LOOK && fl == 129) - talk(_text[_lang][21], "21.als"); + talk(21); else if (objeto_que_lleva == PICK && fl == 129) - talk(_text[_lang][5], "5.als"); + talk(5); else if (objeto_que_lleva == MOVE && fl == 129) - talk(_text[_lang][24], "24.als"); + talk(24); else if (objeto_que_lleva == OPEN && fl == 129) - talk(_text[_lang][22], "22.als"); + talk(22); else if (objeto_que_lleva == CLOSE && fl == 129) - talk(_text[_lang][10], "10.als"); + talk(10); else if (objeto_que_lleva == TALK && fl == 129) { - talk(_text[_lang][23], "23.als"); + talk(23); pause(6); talk_sinc(_text[_lang][50], "50.als", "11111111111144432554433"); } else if (objeto_que_lleva == LOOK && fl == 131) - talk(_text[_lang][27], "27.als"); + talk(27); else if (objeto_que_lleva == PICK && fl == 131) - talk(_text[_lang][5], "5.als"); + talk(5); else if (objeto_que_lleva == MOVE && fl == 131) - talk(_text[_lang][24], "24.als"); + talk(24); else if (objeto_que_lleva == OPEN && fl == 131) - talk(_text[_lang][22], "22.als"); + talk(22); else if (objeto_que_lleva == CLOSE && fl == 131) - talk(_text[_lang][10], "10.als"); + talk(10); else if (objeto_que_lleva == TALK && fl == 131) - talk(_text[_lang][23], "23.als"); + talk(23); else if (objeto_que_lleva == LOOK && fl == 132) - talk(_text[_lang][28], "28.als"); + talk(28); else if (objeto_que_lleva == PICK && fl == 132) - talk(_text[_lang][5], "5.als"); + talk(5); else if (objeto_que_lleva == MOVE && fl == 132) - talk(_text[_lang][24], "24.als"); + talk(24); else if (objeto_que_lleva == OPEN && fl == 132) - talk(_text[_lang][22], "22.als"); + talk(22); else if (objeto_que_lleva == CLOSE && fl == 132) - talk(_text[_lang][10], "10.als"); + talk(10); else if (objeto_que_lleva == TALK && fl == 132) - talk(_text[_lang][23], "23.als"); + talk(23); else if (objeto_que_lleva == LOOK && fl == 133) - talk(_text[_lang][321], "321.als"); + talk(321); else if (objeto_que_lleva == PICK && fl == 133) - talk(_text[_lang][31], "31.als"); + talk(31); else if (objeto_que_lleva == MOVE && fl == 133) - talk(_text[_lang][34], "34.als"); + talk(34); else if (objeto_que_lleva == OPEN && fl == 133) - talk(_text[_lang][30], "30.als"); + talk(30); else if (objeto_que_lleva == CLOSE && fl == 133) - talk(_text[_lang][10], "10.als"); + talk(10); else if (objeto_que_lleva == TALK && fl == 133) { talk_sinc(_text[_lang][322], "322.als", "13333334125433333333"); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(25); - talk(_text[_lang][33], "33.als"); + talk(33); } else if (objeto_que_lleva == LOOK && fl == 165) { - talk(_text[_lang][149], "149.als"); - talk(_text[_lang][150], "150.als"); + talk(149); + talk(150); } else if (objeto_que_lleva == PICK && fl == 165) { copyBackground(0, 0, 0,0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); @@ -281,19 +281,19 @@ void DrasculaEngine::room_3(int fl) { flags[3] = 1; visible[8] = 0; } else if (objeto_que_lleva == LOOK && fl == 166) - talk(_text[_lang][55], "55.als"); + talk(55); else if (objeto_que_lleva == PICK && fl == 166) - talk(_text[_lang][7], "7.als"); + talk(7); else if (objeto_que_lleva == 14 && fl == 166 && flags[37] == 0) { animation_7_2(); pickObject(8); } else if (objeto_que_lleva == 14 && fl == 166 && flags[37] == 1) - talk(_text[_lang][323], "323.als"); + talk(323); else if (objeto_que_lleva == LOOK && fl == 211) - talk(_text[_lang][184], "184.als"); + talk(184); else if (objeto_que_lleva == TALK && fl == 211) { - talk(_text[_lang][185], "185.als"); - talk(_text[_lang][186], "186.als"); + talk(185); + talk(186); } else hay_respuesta = 0; } @@ -326,46 +326,46 @@ void DrasculaEngine::room_4(int fl) { void DrasculaEngine::room_5(int fl) { if (objeto_que_lleva == LOOK && fl == 136 && flags[8]==0) talk(_text[_lang][14], "14.als"); else if (objeto_que_lleva == MOVE && fl == 136) - talk(_text[_lang][13], "13.als"); + talk(13); else if (objeto_que_lleva == OPEN && fl == 136) - talk(_text[_lang][18], "18.als"); + talk(18); else if (objeto_que_lleva == TALK && fl == 136) - talk(_text[_lang][15], "15.als"); + talk(15); else if (objeto_que_lleva == 10 && fl == 136) { animation_5_2(); resta_objeto(10); } else if (objeto_que_lleva == LOOK && fl == 212) - talk(_text[_lang][187], "187.als"); + talk(187); else if (objeto_que_lleva == TALK && fl == 212) - talk(_text[_lang][188], "188.als"); + talk(188); else if (objeto_que_lleva == LOOK && fl == 213) - talk(_text[_lang][189], "189.als"); + talk(189); else if (objeto_que_lleva == OPEN && fl == 213) - talk(_text[_lang][190], "190.als"); + talk(190); else hay_respuesta = 0; } void DrasculaEngine::room_6(int fl){ if (objeto_que_lleva == LOOK && fl==144) { - talk(_text[_lang][41], "41.als"); - talk(_text[_lang][42], "42.als"); + talk(41); + talk(42); } else if (objeto_que_lleva == PICK && fl == 144) - talk(_text[_lang][43], "43.als"); + talk(43); else if (objeto_que_lleva == LOOK && fl == 138) - talk(_text[_lang][35], "35.als"); + talk(35); else if (objeto_que_lleva == OPEN && fl == 138) openDoor(0, 1); else if (objeto_que_lleva == CLOSE && fl == 138) cierra_puerta(0, 1); else if (objeto_que_lleva == TALK && fl == 138) - talk(_text[_lang][6], "6.als"); + talk(6); else if (objeto_que_lleva == LOOK && fl == 143) - talk(_text[_lang][37], "37.als"); + talk(37); else if (objeto_que_lleva == PICK && fl == 143) - talk(_text[_lang][7], "7.als"); + talk(7); else if (objeto_que_lleva == MOVE && fl == 143) - talk(_text[_lang][7], "7.als"); + talk(7); else if (objeto_que_lleva == OPEN && fl == 143 && flags[2] == 0) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); @@ -389,9 +389,9 @@ void DrasculaEngine::room_6(int fl){ updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); fin_sound(); } else if (objeto_que_lleva == TALK && fl == 143) - talk(_text[_lang][38], "38.als"); + talk(38); else if (objeto_que_lleva == LOOK && fl == 139) - talk(_text[_lang][36], "36.als"); + talk(36); else if (objeto_que_lleva == OPEN && fl == 139 && flags[1] == 0) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); @@ -406,7 +406,7 @@ void DrasculaEngine::room_6(int fl){ updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); fin_sound(); } else if (objeto_que_lleva == LOOK && fl == 140) - talk(_text[_lang][147], "147.als"); + talk(147); else if (objeto_que_lleva == PICK && fl == 140) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); @@ -424,9 +424,9 @@ void DrasculaEngine::room_6(int fl){ void DrasculaEngine::room_7(int fl){ if (objeto_que_lleva == LOOK && fl == 169) - talk(_text[_lang][44], "44.als"); + talk(44); else if (objeto_que_lleva == LOOK && fl == 164) - talk(_text[_lang][35], "35.als" ); + talk(35); else if (objeto_que_lleva == PICK && fl == 190) { pickObject(17); flags[35] = 1; @@ -439,24 +439,24 @@ void DrasculaEngine::room_7(int fl){ void DrasculaEngine::room_8(int fl) { if (objeto_que_lleva == LOOK && fl == 147 && flags[7] == 0) { - talk(_text[_lang][58], "58.als"); + talk(58); pickObject(15); flags[7] = 1; if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; } else if (objeto_que_lleva == LOOK && fl == 147) - talk(_text[_lang][59], "59.als"); + talk(59); else hay_respuesta = 0; } void DrasculaEngine::room_9(int fl){ if (objeto_que_lleva == LOOK && fl == 150) - talk(_text[_lang][35], "35.als"); + talk(35); else if (objeto_que_lleva == TALK && fl == 150) - talk(_text[_lang][6], "6.als"); + talk(6); else if (objeto_que_lleva == LOOK && fl == 51) - talk(_text[_lang][60], "60.als"); + talk(60); else if (objeto_que_lleva == TALK && fl == 51 && flags[4] == 0) animation_4_2(); else if (objeto_que_lleva == TALK && fl == 51 && flags[4] == 1) @@ -471,19 +471,19 @@ void DrasculaEngine::room_9(int fl){ void DrasculaEngine::room_12(int fl){ if (objeto_que_lleva == LOOK && fl == 154) - talk(_text[_lang][329], "329.als"); + talk(329); else if (objeto_que_lleva == TALK && fl == 154) - talk(_text[_lang][330], "330.als"); + talk(330); else if (objeto_que_lleva == MOVE && fl == 155) - talk(_text[_lang][48], "48.als"); + talk(48); else if (objeto_que_lleva == TALK && fl == 155) - talk(_text[_lang][331], "331.als"); + talk(331); else if (objeto_que_lleva == LOOK && fl == 156) - talk(_text[_lang][35], "35.als"); + talk(35); else if (objeto_que_lleva == MOVE && fl == 156) - talk(_text[_lang][48], "48.als"); + talk(48); else if (objeto_que_lleva == TALK && fl == 156) - talk(_text[_lang][50], "50.als"); + talk(50); else if (objeto_que_lleva == OPEN && fl == 156) openDoor(16, 4); else if (objeto_que_lleva == CLOSE && fl == 156) @@ -494,9 +494,9 @@ void DrasculaEngine::room_12(int fl){ bool DrasculaEngine::room_13(int fl) { if (objeto_que_lleva == LOOK && fl == 51) { - talk(_text[_lang][411], "411.als"); + talk(411); sentido_hare = 3; - talk(_text[_lang][412], "412.als"); + talk(412); strcpy(objName[1], "yoda"); } else if (objeto_que_lleva == TALK && fl == 51) conversa("op_7.cal"); @@ -514,7 +514,7 @@ void DrasculaEngine::room_14(int fl) { if (objeto_que_lleva == TALK && fl == 54 && flags[39] == 0) animation_12_2(); else if (objeto_que_lleva == TALK && fl == 54 && flags[39] == 1) - talk(_text[_lang][109], "109.als"); + talk(109); else if (objeto_que_lleva == 12 && fl == 54) animation_26_2(); else if (objeto_que_lleva == TALK && fl == 52 && flags[5] == 0) @@ -524,36 +524,36 @@ void DrasculaEngine::room_14(int fl) { else if (objeto_que_lleva == TALK && fl == 53) animation_13_2(); else if (objeto_que_lleva == LOOK && fl == 200) - talk(_text[_lang][165], "165.als"); + talk(165); else if (objeto_que_lleva == LOOK && fl == 201) - talk(_text[_lang][166], "166.als"); + talk(166); else if (objeto_que_lleva == LOOK && fl == 202) - talk(_text[_lang][167], "167.als"); + talk(167); else if (objeto_que_lleva == LOOK && fl == 203) - talk(_text[_lang][168], "168.als"); + talk(168); else if (objeto_que_lleva == PICK && fl == 203) - talk(_text[_lang][170], "170.als"); + talk(170); else if (objeto_que_lleva == MOVE && fl == 203) - talk(_text[_lang][170], "170.als"); + talk(170); else if (objeto_que_lleva == TALK && fl == 203) - talk(_text[_lang][169], "169.als"); + talk(169); else if (objeto_que_lleva == LOOK && fl == 204) - talk(_text[_lang][171], "171.als"); + talk(171); else hay_respuesta = 0; } void DrasculaEngine::room_15(int fl) { if (objeto_que_lleva == TALK && fl == 188) - talk(_text[_lang][333], "333.als"); + talk(333); else if (objeto_que_lleva == LOOK && fl == 188) - talk(_text[_lang][334], "334.als"); + talk(334); else if (objeto_que_lleva == 19 && fl == 188 && flags[27] == 0) - talk(_text[_lang][335], "335.als"); + talk(335); else if (objeto_que_lleva == 19 && fl == 188 && flags[27] == 1) { - talk(_text[_lang][336], "336.als"); + talk(336); sentido_hare = 3; - talk(_text[_lang][337], "337.als"); + talk(337); talk_sinc(_text[_lang][46], "46.als", "4442444244244"); sentido_hare = 1; } else if (objeto_que_lleva == 18 && fl == 188 && flags[26] == 0) { @@ -568,20 +568,20 @@ void DrasculaEngine::room_15(int fl) { resta_objeto(18); } else if (objeto_que_lleva == MOVE && fl == 188 && flags[27] == 0) { animation_34_2(); - talk(_text[_lang][339], "339.als"); + talk(339); pickObject(16); flags[26] = 1; flags[27] = 1; if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; } else if (objeto_que_lleva == LOOK && fl == 205) - talk(_text[_lang][172], "172.als"); + talk(172); else if (objeto_que_lleva == LOOK && fl == 206) - talk(_text[_lang][173], "173.als"); + talk(173); else if (objeto_que_lleva == MOVE && fl == 206) - talk(_text[_lang][174], "174.als"); + talk(174); else if (objeto_que_lleva == OPEN && fl == 206) - talk(_text[_lang][174], "174.als"); + talk(174); else hay_respuesta = 0; } -- cgit v1.2.3 From 9af5cca4e2642ef88efef90abf1b3b249bcade5d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 May 2008 19:15:36 +0000 Subject: Removed a lot of duplicate code, fixed a mistake I made in sprintf svn-id: r32299 --- engines/drascula/drascula.h | 1 + engines/drascula/talk.cpp | 280 ++++++-------------------------------------- 2 files changed, 40 insertions(+), 241 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index b7b5756a3a..e466176ed8 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -611,6 +611,7 @@ public: void pon_igor(); void pon_bj(); void pon_dr(); + void talkInit(const char *filename); void talk_igor_dch(const char *said, const char *filename); void talk_dr_dch(const char *said, const char *filename); void talk_dr_izq(const char *said, const char *filename); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 62a6d6e733..fb0f029bdd 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -27,6 +27,19 @@ namespace Drascula { +void DrasculaEngine::talkInit(const char *filename) { + if (hay_sb == 1) { + sku = new Common::File; + sku->open(filename); + if (!sku->isOpen()) { + error("no puedo abrir archivo de voz"); + } + ctvd_init(2); + ctvd_speaker(1); + ctvd_output(sku); + } +} + void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { int tiempou; long tiempol; @@ -43,16 +56,7 @@ void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { color_abc(WHITE); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -115,16 +119,7 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { color_abc(RED); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -193,16 +188,7 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { color_abc(RED); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -274,16 +260,7 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { else if (num_ejec == 4) color_abc(RED); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); if (num_ejec == 6) copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); @@ -338,16 +315,7 @@ void DrasculaEngine::talk_igor_frente(const char *said, const char *filename) { color_abc(WHITE); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -419,16 +387,7 @@ void DrasculaEngine::talk_tabernero(const char *said, const char *filename) { color_abc(MAROON); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -491,16 +450,7 @@ void DrasculaEngine::talk_bj(const char *said, const char *filename) { color_abc(WHITE); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: if (num_ejec != 5) { @@ -556,7 +506,7 @@ bucless: void DrasculaEngine::talk(int index) { char name[100]; - sprintf(name, "%s.als", index); + sprintf(name, "%i.als", index); talk(_text[_lang][index], name); } @@ -603,16 +553,8 @@ void DrasculaEngine::talk(const char *said, const char *filename) { } else { color_abc(YELLOW); } - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + + talkInit(filename); bucless: @@ -726,16 +668,7 @@ void DrasculaEngine::talk_pianista(const char *said, const char *filename) { color_abc(WHITE); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -806,16 +739,7 @@ bebiendo: color_abc(DARK_GREEN); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz\n"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -885,16 +809,7 @@ void DrasculaEngine::talk_vb(const char *said, const char *filename) { color_abc(VON_BRAUN); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); copyBackground(vb_x + 5, 64, OBJWIDTH + 1, 0, 25, 27, dir_dibujo1, dir_dibujo3); @@ -953,16 +868,7 @@ void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) { color_abc(VON_BRAUN); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -1006,16 +912,7 @@ void DrasculaEngine::talk_ciego(const char *said, const char *filename, const ch copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); pos_ciego[1] = 2; pos_ciego[2] = 73; @@ -1107,16 +1004,7 @@ void DrasculaEngine::talk_hacker(const char *said, const char *filename) { color_abc(YELLOW); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: if (withVoices == 0) @@ -1157,16 +1045,7 @@ void DrasculaEngine::talk_lobo(const char *said, const char *filename) { color_abc(RED); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -1222,16 +1101,7 @@ void DrasculaEngine::talk_mus(const char *said, const char *filename) { color_abc(WHITE); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -1293,16 +1163,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename) { color_abc(YELLOW); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -1362,16 +1223,7 @@ void DrasculaEngine::talk_pen2(const char *said, const char *filename) { color_abc(YELLOW); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -1429,16 +1281,7 @@ void DrasculaEngine::talk_taber2(const char *said, const char *filename) { color_abc(MAROON); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -1494,16 +1337,7 @@ void DrasculaEngine::talk_bj_cama(const char *said, const char *filename) { color_abc(WHITE); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -1560,16 +1394,7 @@ void DrasculaEngine::talk_htel(const char *said, const char *filename) { color_abc(YELLOW); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -1631,16 +1456,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha p = 0; - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -1754,16 +1570,7 @@ void DrasculaEngine::talk_baul(const char *said, const char *filename) { color_abc(MAROON); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -1868,16 +1675,7 @@ void DrasculaEngine::talk_igor_sentado(const char *said, const char *filename) { color_abc(WHITE); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: -- cgit v1.2.3 From f68c1fd00b1f44147a09eacd5574deb222a925d5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 May 2008 19:36:38 +0000 Subject: Cleanup svn-id: r32300 --- engines/drascula/talk.cpp | 53 ++++++++--------------------------------------- 1 file changed, 9 insertions(+), 44 deletions(-) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index fb0f029bdd..ef1115e321 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -902,7 +902,6 @@ void DrasculaEngine::talk_ciego(const char *said, const char *filename, const ch byte *num_cara; int p = 0; int pos_ciego[6]; - int cara = 0; int longitud; longitud = strlen(said); @@ -924,39 +923,23 @@ bucless: copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); pos_ciego[5] = 149; char c = toupper(sincronia[p]); - if (c == '0') - cara = 0; - if (c == '1') - cara = 1; - if (c == '2') - cara = 2; - if (c == '3') - cara = 3; - if (c == '4') - cara = 4; - if (c == '5') - cara = 5; - if (c == '6') - cara = 6; - if (c == '7') - cara = 7; - if (cara == 0 || cara == 2 || cara == 4 || cara == 6) + if (c == '0' || c == '2' || c == '4' || c == '6') pos_ciego[0] = 1; else pos_ciego[0] = 132; - if (cara == 0) + if (c == '0') num_cara = dir_dibujo3; - else if (cara == 1) + else if (c == '1') num_cara = dir_dibujo3; - else if (cara == 2) + else if (c == '2') num_cara = dir_hare_dch; - else if (cara == 3) + else if (c == '3') num_cara = dir_hare_dch; - else if (cara == 4) + else if (c == '4') num_cara = dir_hare_fondo; - else if (cara == 5) + else if (c == '5') num_cara = dir_hare_fondo; else { num_cara = dir_hare_frente; @@ -1622,16 +1605,7 @@ void DrasculaEngine::talk_igorpuerta(const char *said, const char *filename) { color_abc(WHITE); - if (hay_sb == 1){ - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: @@ -1731,16 +1705,7 @@ void DrasculaEngine::talk_igor_peluca(const char *said, const char *filename) { color_abc(WHITE); - if (hay_sb == 1){ - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + talkInit(filename); bucless: -- cgit v1.2.3 From 7fe39a1470804221e85bfb4a8a5b5158006c83e4 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 May 2008 19:50:05 +0000 Subject: Cleanup svn-id: r32301 --- engines/drascula/animation.cpp | 12 +- engines/drascula/drascula.cpp | 5 +- engines/drascula/talk.cpp | 316 ++++++++++------------------------------- 3 files changed, 81 insertions(+), 252 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 51f827d6f8..4895b5e6f7 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -377,18 +377,12 @@ void DrasculaEngine::animation_1_1() { } void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { - int tiempou; - long tiempol; int x_talk[4] = {47, 93, 139, 185}; int cara; int l = 0; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(RED); @@ -433,7 +427,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 26e8f65bc1..eb04d923e4 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -4475,8 +4475,7 @@ void DrasculaEngine::mapa() { } void DrasculaEngine::grr() { - int longitud; - longitud = 30; + int longitud = 30; color_abc(DARK_GREEN); @@ -4510,7 +4509,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index ef1115e321..3470bcd3b8 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -41,18 +41,11 @@ void DrasculaEngine::talkInit(const char *filename) { } void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[8] = { 56, 82, 108, 134, 160, 186, 212, 238 }; int cara; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(WHITE); @@ -93,7 +86,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -104,18 +97,11 @@ bucless: } void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 }; int cara; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(RED); @@ -161,7 +147,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -173,18 +159,11 @@ bucless: } void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 }; int cara; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(RED); @@ -229,7 +208,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -245,15 +224,9 @@ bucless: } void DrasculaEngine::talk_solo(const char *said, const char *filename) { - int tiempou; - long tiempol; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); if (num_ejec == 1) color_abc(color_solo); @@ -289,7 +262,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -300,18 +273,11 @@ bucless: } void DrasculaEngine::talk_igor_frente(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[8] = { 56, 86, 116, 146, 176, 206, 236, 266 }; int cara; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(WHITE); @@ -354,7 +320,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -372,18 +338,11 @@ bucless: } void DrasculaEngine::talk_tabernero(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[9] = { 1, 23, 45, 67, 89, 111, 133, 155, 177 }; int cara; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(MAROON); @@ -425,7 +384,7 @@ bucless: delete(sku); ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -435,18 +394,11 @@ bucless: } void DrasculaEngine::talk_bj(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[5] = { 64, 92, 120, 148, 176 }; int cara; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(WHITE); @@ -495,7 +447,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -511,9 +463,6 @@ void DrasculaEngine::talk(int index) { } void DrasculaEngine::talk(const char *said, const char *filename) { - int tiempou; - long tiempol; - int suma_1_pixel = 0; if (num_ejec != 2) suma_1_pixel = 1; @@ -522,9 +471,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { int x_talk_dch[6] = { 1, 25, 49, 73, 97, 121 }; int x_talk_izq[6] = { 145, 169, 193, 217, 241, 265 }; int cara; - - int longitud; - longitud = strlen(said); + int longitud = strlen(said); if (num_ejec == 6) { if (flags[0] == 0 && (!strcmp(num_room, "102.alg"))) { @@ -537,9 +484,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { } } - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); if (num_ejec != 2) { if (factor_red[hare_y + alto_hare] == 100) @@ -640,7 +585,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -655,16 +600,11 @@ bucless: } void DrasculaEngine::talk_pianista(const char *said, const char *filename) { - int tiempou; - long tiempol; int x_talk[4] = { 97, 145, 193, 241 }; int cara; - int longitud; - longitud = strlen(said); + int longitud = strlen(said); - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(WHITE); @@ -700,7 +640,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -710,17 +650,11 @@ bucless: } void DrasculaEngine::talk_borracho(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[8] = { 1, 21, 41, 61, 81, 101, 121, 141 }; int cara; - int longitud; - longitud = strlen(said); + int longitud = strlen(said); - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); if (num_ejec == 1) { loadPic("an11y13.alg"); @@ -770,7 +704,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -794,18 +728,11 @@ bucless: } void DrasculaEngine::talk_vb(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[6] = {1, 27, 53, 79, 105, 131}; int cara; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(VON_BRAUN); @@ -844,7 +771,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -856,15 +783,9 @@ bucless: } void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) { - int tiempou; - long tiempol; - - int longitud; - longitud = strlen(said); + int longitud = strlen(said); - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(VON_BRAUN); @@ -887,7 +808,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -902,9 +823,7 @@ void DrasculaEngine::talk_ciego(const char *said, const char *filename, const ch byte *num_cara; int p = 0; int pos_ciego[6]; - - int longitud; - longitud = strlen(said); + int longitud = strlen(said); color_abc(VON_BRAUN); @@ -965,22 +884,16 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } } void DrasculaEngine::talk_hacker(const char *said, const char *filename) { - int tiempou; - long tiempol; - - int longitud; - longitud = strlen(said); + int longitud = strlen(said); - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1004,7 +917,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -1013,18 +926,11 @@ bucless: } void DrasculaEngine::talk_lobo(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[9] = {52, 79, 106, 133, 160, 187, 214, 241, 268}; int cara; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(RED); @@ -1059,7 +965,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -1069,18 +975,11 @@ bucless: } void DrasculaEngine::talk_mus(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[8] = { 16, 35, 54, 73, 92, 111, 130, 149}; int cara; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(WHITE); @@ -1115,7 +1014,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -1125,14 +1024,9 @@ bucless: } void DrasculaEngine::talk_pen(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[8] = {112, 138, 164, 190, 216, 242, 268, 294}; int cara; - - int longitud; - longitud = strlen(said); + int longitud = strlen(said); flags[1] = 1; @@ -1140,9 +1034,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename) { copyRect(44, 145, 145, 105, 25, 29, dir_dibujo3, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(YELLOW); @@ -1177,7 +1069,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -1189,20 +1081,13 @@ bucless: } void DrasculaEngine::talk_pen2(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[5]={122, 148, 174, 200, 226}; int cara; - - int longitud; - longitud = strlen(said); + int longitud = strlen(said); flags[1] = 1; - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(YELLOW); @@ -1237,7 +1122,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -1249,18 +1134,11 @@ bucless: } void DrasculaEngine::talk_taber2(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[6] = {1, 23, 45, 67, 89, 111}; int cara; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(MAROON); @@ -1295,7 +1173,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -1305,18 +1183,11 @@ bucless: } void DrasculaEngine::talk_bj_cama(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[5] = {51, 101, 151, 201, 251}; int cara; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(WHITE); @@ -1352,7 +1223,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -1361,19 +1232,12 @@ bucless: } void DrasculaEngine::talk_htel(const char *said, const char *filename) { - int tiempou; - long tiempol; char *num_cara; - int x_talk[3] = {1, 94, 187}; int cara, pantalla; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(YELLOW); @@ -1411,7 +1275,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -1426,9 +1290,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha int x_talk_dch[6] = {1, 25, 49, 73, 97, 121}; int x_talk_izq[6] = {145, 169, 193, 217, 241, 265}; int p, cara = 0; - - int longitud; - longitud = strlen(said); + int longitud = strlen(said); color_abc(YELLOW); @@ -1526,7 +1388,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -1538,16 +1400,10 @@ bucless: } void DrasculaEngine::talk_baul(const char *said, const char *filename) { - int tiempou; - long tiempol; int cara = 0, cara_antes; - int longitud; - - longitud = strlen(said); + int longitud = strlen(said); - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); cara_antes = flags[19]; @@ -1582,7 +1438,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -1593,15 +1449,9 @@ bucless: } void DrasculaEngine::talk_igorpuerta(const char *said, const char *filename) { - int tiempou; - long tiempol; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(WHITE); @@ -1624,7 +1474,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -1634,18 +1484,11 @@ bucless: } void DrasculaEngine::talk_igor_sentado(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[4] = { 80, 102, 124, 146 }; int cara; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(WHITE); @@ -1680,7 +1523,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } @@ -1690,18 +1533,11 @@ bucless: } void DrasculaEngine::talk_igor_peluca(const char *said, const char *filename) { - int tiempou; - long tiempol; - int x_talk[4] = {119, 158, 197, 236}; int cara = 0; + int longitud = strlen(said); - int longitud; - longitud = strlen(said); - - tiempol = _system->getMillis(); - tiempou = (unsigned int)tiempol / 2; - _rnd->setSeed(tiempou); + _rnd->setSeed((unsigned int)_system->getMillis() / 2); color_abc(WHITE); @@ -1736,7 +1572,7 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud = longitud - 2; + longitud -= 2; if (longitud > 0) goto bucless; } -- cgit v1.2.3 From f2e5283fcf2c3930fb9ab24e165722e138908896 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 26 May 2008 20:14:25 +0000 Subject: Simplified all calls to talk_vb and talk_vbpuerta, together with some more calls to talk() svn-id: r32302 --- engines/drascula/animation.cpp | 162 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 2 + engines/drascula/talk.cpp | 12 +++ 3 files changed, 95 insertions(+), 81 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 4895b5e6f7..01078e7d8f 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -1140,24 +1140,24 @@ void DrasculaEngine::animation_17_2() { } void DrasculaEngine::animation_19_2() { - talk_vbpuerta(_textvb[_lang][5], "VB5.als"); + talk_vbpuerta(5); } void DrasculaEngine::animation_20_2() { - talk_vbpuerta(_textvb[_lang][7], "VB7.als"); - talk_vbpuerta(_textvb[_lang][8], "VB8.als"); - talk(_text[_lang][383], "383.als"); - talk_vbpuerta(_textvb[_lang][9], "VB9.als"); - talk(_text[_lang][384], "384.als"); - talk_vbpuerta(_textvb[_lang][10], "VB10.als"); - talk(_text[_lang][385], "385.als"); - talk_vbpuerta(_textvb[_lang][11], "VB11.als"); + talk_vbpuerta(7); + talk_vbpuerta(8); + talk(383); + talk_vbpuerta(9); + talk(384); + talk_vbpuerta(10); + talk(385); + talk_vbpuerta(11); if (flags[23] == 0) { - talk(_text[_lang][350], "350.als"); - talk_vbpuerta(_textvb[_lang][57], "VB57.als"); + talk(350); + talk_vbpuerta(57); } else { - talk(_text[_lang][386], "386.als"); - talk_vbpuerta(_textvb[_lang][12], "VB12.als"); + talk(386); + talk_vbpuerta(12); flags[18] = 0; flags[14] = 1; openDoor(15, 1); @@ -1174,7 +1174,7 @@ void DrasculaEngine::animation_20_2() { } void DrasculaEngine::animation_21_2() { - talk_vbpuerta(_textvb[_lang][6], "VB6.als"); + talk_vbpuerta(6); } void DrasculaEngine::animation_23_2() { @@ -1184,26 +1184,26 @@ void DrasculaEngine::animation_23_2() { flags[21] = 1; if (flags[25] == 0) { - talk_vb(_textvb[_lang][13], "VB13.als"); - talk_vb(_textvb[_lang][14], "VB14.als"); + talk_vb(13); + talk_vb(14); pause(10); - talk(_text[_lang][387], "387.als"); + talk(387); } - talk_vb(_textvb[_lang][15], "VB15.als"); + talk_vb(15); lleva_vb(42); sentido_vb = 1; - talk_vb(_textvb[_lang][16], "VB16.als"); + talk_vb(16); sentido_vb = 2; lleva_al_hare(157, 147); lleva_al_hare(131, 149); sentido_hare = 0; animation_14_2(); if (flags[25] == 0) - talk_vb(_textvb[_lang][17], "VB17.als"); + talk_vb(17); pause(8); sentido_vb = 1; - talk_vb(_textvb[_lang][18], "VB18.als"); + talk_vb(18); if (flags[29] == 0) animation_23_anexo(); @@ -1215,9 +1215,9 @@ void DrasculaEngine::animation_23_2() { lleva_vb(99); if (flags[29] == 0) { - talk_vb(_textvb[_lang][19], "VB19.als"); + talk_vb(19); if (flags[25] == 0) { - talk_vb(_textvb[_lang][20],"VB20.als"); + talk_vb(20); if (resta_objeto(7) == 0) flags[30] = 1; if (resta_objeto(18) == 0) @@ -1225,7 +1225,7 @@ void DrasculaEngine::animation_23_2() { if (resta_objeto(19) == 0) flags[32] = 1; } - talk_vb(_textvb[_lang][21], "VB21.als"); + talk_vb(21); } else animation_27_2(); @@ -1324,63 +1324,63 @@ void DrasculaEngine::animation_27_2() { resta_objeto(23); suma_objeto(11); - talk_vb(_textvb[_lang][23], "VB23.als"); - talk_vb(_textvb[_lang][24], "VB24.als"); + talk_vb(23); + talk_vb(24); if (flags[30] == 1) suma_objeto(7); if (flags[31] == 1) suma_objeto(18); if (flags[32] == 1) suma_objeto(19); - talk_vb(_textvb[_lang][25],"VB25.als"); - talk_vb(_textvb[_lang][26],"VB26.als"); + talk_vb(25); + talk_vb(26); } void DrasculaEngine::animation_28_2() { - talk_vb(_textvb[_lang][27], "VB27.als"); - talk_vb(_textvb[_lang][28], "VB28.als"); - talk_vb(_textvb[_lang][29], "VB29.als"); - talk_vb(_textvb[_lang][30], "VB30.als"); + talk_vb(27); + talk_vb(28); + talk_vb(29); + talk_vb(30); } void DrasculaEngine::animation_29_2() { if (flags[33] == 0) { - talk_vb(_textvb[_lang][32], "VB32.als"); - talk(_text[_lang][398], "398.als"); - talk_vb(_textvb[_lang][33], "VB33.als"); - talk(_text[_lang][399], "399.als"); - talk_vb(_textvb[_lang][34], "VB34.als"); - talk_vb(_textvb[_lang][35], "VB35.als"); - talk(_text[_lang][400], "400.als"); - talk_vb(_textvb[_lang][36], "VB36.als"); - talk_vb(_textvb[_lang][37], "VB37.als"); - talk(_text[_lang][386], "386.als"); - talk_vb(_textvb[_lang][38], "VB38.als"); - talk_vb(_textvb[_lang][39], "VB39.als"); - talk(_text[_lang][401], "401.als"); - talk_vb(_textvb[_lang][40], "VB40.als"); - talk_vb(_textvb[_lang][41], "VB41.als"); + talk_vb(32); + talk(398); + talk_vb(33); + talk(399); + talk_vb(34); + talk_vb(35); + talk(400); + talk_vb(36); + talk_vb(37); + talk(386); + talk_vb(38); + talk_vb(39); + talk(401); + talk_vb(40); + talk_vb(41); flags[33] = 1; } else - talk_vb(_textvb[_lang][43], "VB43.als"); + talk_vb(43); - talk(_text[_lang][402], "402.als"); - talk_vb(_textvb[_lang][42], "VB42.als"); + talk(402); + talk_vb(42); if (flags[38] == 0) { - talk(_text[_lang][403], "403.als"); + talk(403); rompo_y_salgo = 1; } else - talk(_text[_lang][386], "386.als"); + talk(386); } void DrasculaEngine::animation_30_2() { - talk_vb(_textvb[_lang][31], "VB31.als"); - talk(_text[_lang][396], "396.als"); + talk_vb(31); + talk(396); } void DrasculaEngine::animation_31_2() { - talk_vb(_textvb[_lang][44], "VB44.als"); + talk_vb(44); lleva_vb(-50); pause(15); lleva_al_hare(159, 140); @@ -1394,25 +1394,25 @@ void DrasculaEngine::animation_31_2() { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(22); - talk(_text[_lang][406], "406.als"); + talk(406); lleva_vb(98); - talk_vb(_textvb[_lang][45], "VB45.als"); - talk_vb(_textvb[_lang][46], "VB46.als"); - talk_vb(_textvb[_lang][47], "VB47.als"); - talk(_text[_lang][407], "407.als"); - talk_vb(_textvb[_lang][48], "VB48.als"); - talk_vb(_textvb[_lang][49], "VB49.als"); - talk(_text[_lang][408], "408.als"); - talk_vb(_textvb[_lang][50], "VB50.als"); - talk_vb(_textvb[_lang][51], "VB51.als"); - talk(_text[_lang][409], "409.als"); - talk_vb(_textvb[_lang][52], "VB52.als"); - talk_vb(_textvb[_lang][53], "VB53.als"); + talk_vb(45); + talk_vb(46); + talk_vb(47); + talk(407); + talk_vb(48); + talk_vb(49); + talk(408); + talk_vb(50); + talk_vb(51); + talk(409); + talk_vb(52); + talk_vb(53); pause(12); - talk_vb(_textvb[_lang][54], "VB54.als"); - talk_vb(_textvb[_lang][55], "VB55.als"); - talk(_text[_lang][410], "410.als"); - talk_vb(_textvb[_lang][56], "VB56.als"); + talk_vb(54); + talk_vb(55); + talk(410); + talk_vb(56); rompo_y_salgo = 1; @@ -2698,8 +2698,8 @@ void DrasculaEngine::animation_13_2() { } void DrasculaEngine::animation_18_2() { - talk(_text[_lang][378], "378.als"); - talk_vbpuerta(_textvb[_lang][4], "VB4.als"); + talk(378); + talk_vbpuerta(4); conversa("op_3.cal"); } @@ -2713,11 +2713,11 @@ void DrasculaEngine::animation_22_2() { fin_sound(); sentido_hare = 1; - talk_vbpuerta(_textvb[_lang][1], "VB1.als"); - talk(_text[_lang][375], "375.als"); - talk_vbpuerta(_textvb[_lang][2], "VB2.als"); - talk(_text[_lang][376], "376.als"); - talk_vbpuerta(_textvb[_lang][3], "VB3.als"); + talk_vbpuerta(1); + talk(375); + talk_vbpuerta(2); + talk(376); + talk_vbpuerta(3); flags[18] = 1; } @@ -2730,7 +2730,7 @@ void DrasculaEngine::animation_24_2() { pause(3); sentido_hare = 0; - talk(_text[_lang][356], "356.als"); + talk(356); loadPic("an24.alg"); decompressPic(dir_hare_frente, 1); @@ -2739,7 +2739,7 @@ void DrasculaEngine::animation_24_2() { flags[21] = 1; - talk_vb(_textvb[_lang][22], "VB22.als"); + talk_vb(22); if (flags[22] == 0) conversa("op_4.cal"); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index e466176ed8..48dbed9bcb 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -481,7 +481,9 @@ public: bool escoba(); void black(); + void talk_vb(int); void talk_vb(const char *, const char *); + void talk_vbpuerta(int); void talk_vbpuerta(const char *said, const char *filename); void talk_ciego(const char *, const char *, const char *); void talk_hacker(const char *, const char *); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 3470bcd3b8..05fd512355 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -727,6 +727,12 @@ bucless: } } +void DrasculaEngine::talk_vb(int index) { + char name[100]; + sprintf(name, "VB%i.als", index); + talk_vb(_textvb[_lang][index], name); +} + void DrasculaEngine::talk_vb(const char *said, const char *filename) { int x_talk[6] = {1, 27, 53, 79, 105, 131}; int cara; @@ -782,6 +788,12 @@ bucless: playMusic(roomMusic); } +void DrasculaEngine::talk_vbpuerta(int index) { + char name[100]; + sprintf(name, "VB%i.als", index); + talk_vb(_textvb[_lang][index], name); +} + void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) { int longitud = strlen(said); -- cgit v1.2.3 From e45ea7b9332d39f8ece2d5394316af91cdc3d0dd Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 26 May 2008 20:18:27 +0000 Subject: Fix delays against original svn-id: r32303 --- engines/drascula/animation.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 01078e7d8f..efad9c5059 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -870,7 +870,7 @@ void DrasculaEngine::animation_4_2() { talk_ciego(_textd[_lang][75],"d75.als", _textd1[_lang][75 - TEXTD_START]); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - _system->delayMillis(1); + _system->delayMillis(1000); talk_hacker(_textd[_lang][64], "d64.als"); talk_ciego(_textd[_lang][76], "d76.als", _textd1[_lang][76 - TEXTD_START]); @@ -1016,9 +1016,9 @@ void DrasculaEngine::animation_16_2() { goto asco; if (_lang == kSpanish) - _system->delayMillis(3); + _system->delayMillis(3000); else - _system->delayMillis(4); + _system->delayMillis(4000); key = getscan(); if (key != 0) @@ -1043,9 +1043,9 @@ void DrasculaEngine::animation_16_2() { goto asco; if (_lang == kSpanish) - _system->delayMillis(3); + _system->delayMillis(3000); else - _system->delayMillis(4); + _system->delayMillis(4000); key = getscan(); if (key != 0) @@ -1070,9 +1070,9 @@ void DrasculaEngine::animation_16_2() { goto asco; if (_lang == kSpanish) - _system->delayMillis(3); + _system->delayMillis(3000); else - _system->delayMillis(4); + _system->delayMillis(4000); key = getscan(); if (key != 0) @@ -1097,9 +1097,9 @@ void DrasculaEngine::animation_16_2() { goto asco; if (_lang == kSpanish) - _system->delayMillis(2); + _system->delayMillis(2000); else - _system->delayMillis(4); + _system->delayMillis(4000); key = getscan(); if (key != 0) -- cgit v1.2.3 From c13fda76d6245d39aef10283624566a6e2f40344 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 26 May 2008 20:19:56 +0000 Subject: Fix leftover 8bit character svn-id: r32304 --- engines/drascula/drascula.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index eb04d923e4..3cb2387b65 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1760,7 +1760,7 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) x_de_letra = X_N0; else y_de_letra=Y_ACENTOS; - if (c == ' ') x_de_letra=X_A; + if (c == '\240') x_de_letra=X_A; else if (c =='\202') x_de_letra = X_B; else if (c =='\241') x_de_letra = X_C; else if (c =='\242') x_de_letra = X_D; -- cgit v1.2.3 From 9eed36cc4f8877fa5dbb2e4053112adba327d6bf Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 26 May 2008 21:07:49 +0000 Subject: Use memmove when source and destination sprite areas overlap in drawSprite() svn-id: r32305 --- engines/gob/driver_vga.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/engines/gob/driver_vga.cpp b/engines/gob/driver_vga.cpp index c4861ca146..f68ce47783 100644 --- a/engines/gob/driver_vga.cpp +++ b/engines/gob/driver_vga.cpp @@ -109,10 +109,16 @@ void VGAVideoDriver::drawSprite(SurfaceDesc *source, SurfaceDesc *dest, int16 width = MIN((right - left) + 1, (int) dest->getWidth()); int16 height = MIN((bottom - top) + 1, (int) dest->getHeight()); + if ((width < 1) || (height < 1)) + return; + byte *srcPos = source->getVidMem() + (top * source->getWidth()) + left; byte *destPos = dest->getVidMem() + (y * dest->getWidth()) + x; + uint32 size = width * height; + if (transp) { + while (height--) { for (int16 i = 0; i < width; ++i) { if (srcPos[i]) @@ -122,13 +128,26 @@ void VGAVideoDriver::drawSprite(SurfaceDesc *source, SurfaceDesc *dest, srcPos += source->getWidth(); destPos += dest->getWidth(); } + + } else if (((srcPos >= destPos) && (srcPos <= (destPos + size))) || + ((destPos >= srcPos) && (destPos <= (srcPos + size)))) { + + while (height--) { + memmove(destPos, srcPos, width); + + srcPos += source->getWidth(); + destPos += dest->getWidth(); + } + } else { + while (height--) { memcpy(destPos, srcPos, width); srcPos += source->getWidth(); destPos += dest->getWidth(); } + } } -- cgit v1.2.3 From 32eee43bbc61a5697895ec9af2ec98f7f9b5d7b9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 26 May 2008 21:48:59 +0000 Subject: Implement built-in screensaver svn-id: r32306 --- engines/drascula/drascula.cpp | 100 +++++++++++++++++++++++++++++++++++++++--- 1 file changed, 95 insertions(+), 5 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 3cb2387b65..ab8429b172 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1841,24 +1841,111 @@ bool DrasculaEngine::confirma_salir() { void DrasculaEngine::salva_pantallas() { int xr, yr; + byte *copia, *ghost; + Common::File file; + float coeff = 0, coeff2 = 0; + int count = 0; + int count2 = 0; + int tempLine[320]; + int tempRow[200]; // FIXME: that part (*.ghost) need RE from efecto.lib file for some gfx special effect // for now ignore - return; clearRoom(); loadPic("sv.alg"); decompressPic(dir_dibujo1, HALF_PAL); - //TODO inicio_ghost(); - //TODO carga_ghost(); + + // inicio_ghost(); + copia = (byte *)malloc(64000); + ghost = (byte *)malloc(65536); + + // carga_ghost(); + file.open("ghost.drv"); + if (!file.isOpen()) + error("Cannot open file ghost.drv"); + + file.read(ghost, 65536); + file.close(); MirarRaton(); xr = x_raton; yr = y_raton; for (;;) { - //TODO efecto(dir_dibujo1); + // efecto(dir_dibujo1); + + memcpy(copia, dir_dibujo1, 64000); + coeff += 0.1; + coeff2 = coeff; + + if (++count > 319) + count = 0; + + for (int i = 0; i < 320; i++) { + tempLine[i] = (int)(sin(coeff2) * 16); + coeff2 += 0.02; + if (tempLine[i] < 0) + tempLine[i] += 200; + if (tempLine[i] > 199) + tempLine[i] -= 200; + } + + coeff2 = coeff; + for (int i = 0; i < 200; i++) { + tempRow[i] = (int)(sin(coeff2) * 16); + coeff2 += 0.02; + if (tempRow[i] < 0) + tempRow[i] += 320; + if (tempRow[i] > 319) + tempRow[i] -= 320; + } + + if (++count2 > 199) + count2 = 0; + + int x1_, y1_, off1, off2; + + for (int i = 0; i < 200; i++) { + for (int j = 0; j < 320; j++) { + x1_ = j + tempRow[i]; + if (x1_ < 0) + x1_ += 320; + if (x1_ > 319) + x1_ -= 319; + + y1_ = i + count2; + if (y1_ < 0) + y1_ += 200; + if (y1_ > 199) + y1_ -= 200; + + off1 = 320 * y1_ + x1_; + + x1_ = j + count; + if (x1_ < 0) + x1_ += 320; + if (x1_ > 319) + x1_ -= 320; + + y1_ = i + tempLine[j]; + if (y1_ < 0) + y1_ += 200; + if (y1_ > 199) + y1_ -= 200; + off2 = 320 * y1_ + x1_; + + VGA[320 * i + j] = ghost[dir_dibujo1[off2] + (copia[off1] << 8)]; + } + } + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); + _system->updateScreen(); + + _system->delayMillis(20); + + // end of efecto() + MirarRaton(); if (boton_dch == 1 || boton_izq == 1) break; @@ -1867,7 +1954,10 @@ void DrasculaEngine::salva_pantallas() { if (y_raton != yr) break; } - //TODO fin_ghost(); + // fin_ghost(); + free(copia); + free(ghost); + loadPic(num_room); decompressPic(dir_dibujo1, HALF_PAL); } -- cgit v1.2.3 From a43d1e6be0fd325164b47f76d0ceb6cbb0dd01d5 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Mon, 26 May 2008 22:01:29 +0000 Subject: Changed floating point immediates to single precision (Silences MSVC warning C4305: '+=' : truncation from 'double' to 'float'). svn-id: r32307 --- engines/drascula/drascula.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index ab8429b172..d478e887c6 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1877,7 +1877,7 @@ void DrasculaEngine::salva_pantallas() { // efecto(dir_dibujo1); memcpy(copia, dir_dibujo1, 64000); - coeff += 0.1; + coeff += 0.1f; coeff2 = coeff; if (++count > 319) @@ -1885,7 +1885,7 @@ void DrasculaEngine::salva_pantallas() { for (int i = 0; i < 320; i++) { tempLine[i] = (int)(sin(coeff2) * 16); - coeff2 += 0.02; + coeff2 += 0.02f; if (tempLine[i] < 0) tempLine[i] += 200; if (tempLine[i] > 199) @@ -1895,7 +1895,7 @@ void DrasculaEngine::salva_pantallas() { coeff2 = coeff; for (int i = 0; i < 200; i++) { tempRow[i] = (int)(sin(coeff2) * 16); - coeff2 += 0.02; + coeff2 += 0.02f; if (tempRow[i] < 0) tempRow[i] += 320; if (tempRow[i] > 319) -- cgit v1.2.3 From 59df762f0a82b2ef7fa868181aea71f6356e2359 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 26 May 2008 22:02:20 +0000 Subject: More split screen fixes. I never get tired out those... ;) svn-id: r32308 --- engines/gob/inter_v2.cpp | 21 +++++++++++++++------ engines/gob/inter_v4.cpp | 9 +++++---- engines/gob/video.cpp | 4 ++-- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index db79971d88..e442ec4eca 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -1502,18 +1502,27 @@ void Inter_v2::o2_scroll() { } void Inter_v2::o2_setScrollOffset() { - int16 offset; + int16 offsetX, offsetY; - offset = _vm->_parse->parseValExpr(); + offsetX = _vm->_parse->parseValExpr(); + offsetY = _vm->_parse->parseValExpr(); - if (offset == -1) { - _vm->_parse->parseValExpr(); + if (offsetX == -1) { WRITE_VAR(2, _vm->_draw->_scrollOffsetX); WRITE_VAR(3, _vm->_draw->_scrollOffsetY); } else { - _vm->_draw->_scrollOffsetX = offset; - _vm->_draw->_scrollOffsetY = _vm->_parse->parseValExpr(); + int16 screenW = _vm->_video->_surfWidth; + int16 screenH = _vm->_video->_surfHeight; + + if (screenW > _vm->_width) + screenW -= _vm->_width; + if (screenH > _vm->_height) + screenH -= _vm->_height; + + _vm->_draw->_scrollOffsetX = CLIP(offsetX, 0, screenW); + _vm->_draw->_scrollOffsetY = CLIP(offsetY, 0, screenH); } + _vm->_util->setScrollOffset(); _noBusyWait = true; } diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp index 4c7c29255c..fd90b731a2 100644 --- a/engines/gob/inter_v4.cpp +++ b/engines/gob/inter_v4.cpp @@ -505,7 +505,7 @@ void Inter_v4::setupOpcodes() { /* 30 */ OPCODE(o1_returnTo), OPCODE(o1_loadSpriteContent), - OPCODE(o3_copySprite), + OPCODE(o1_copySprite), OPCODE(o1_fillRect), /* 34 */ OPCODE(o1_drawLine), @@ -772,6 +772,10 @@ void Inter_v4::o4_initScreen() { memset(_vm->_global->_greenPalette, 0, 256); memset(_vm->_global->_bluePalette, 0, 256); + _vm->_video->_splitSurf = 0; + _vm->_draw->_spritesArray[24] = 0; + _vm->_draw->_spritesArray[25] = 0; + _vm->_global->_videoMode = videoMode; _vm->_video->initPrimary(videoMode); WRITE_VAR(15, _vm->_global->_fakeVideoMode); @@ -786,9 +790,6 @@ void Inter_v4::o4_initScreen() { _vm->_util->setScrollOffset(); - _vm->_video->_splitSurf = 0; - _vm->_draw->_spritesArray[24] = 0; - _vm->_draw->_spritesArray[25] = 0; if (offY > 0) { _vm->_draw->_spritesArray[24] = new SurfaceDesc(videoMode, _vm->_width, offY); _vm->_draw->_spritesArray[25] = new SurfaceDesc(videoMode, _vm->_width, offY); diff --git a/engines/gob/video.cpp b/engines/gob/video.cpp index e5d6f17574..453613d1ae 100644 --- a/engines/gob/video.cpp +++ b/engines/gob/video.cpp @@ -182,8 +182,8 @@ void Video::retrace(bool mouse) { int screenOffset = _scrollOffsetY * _surfWidth + _scrollOffsetX; int screenX = _screenDeltaX; int screenY = _screenDeltaY; - int screenWidth = MIN(_surfWidth, _vm->_width); - int screenHeight = MIN(_surfHeight - _splitHeight2, _vm->_height); + int screenWidth = MIN(_surfWidth - _scrollOffsetX, _vm->_width); + int screenHeight = MIN(_surfHeight - _splitHeight2 - _scrollOffsetY, _vm->_height); g_system->copyRectToScreen(_vm->_global->_primarySurfDesc->getVidMem() + screenOffset, _surfWidth, screenX, screenY, screenWidth, screenHeight); -- cgit v1.2.3 From a0a8e0e69061dd2823b3aac2f4d8a9994cdf3cba Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Mon, 26 May 2008 23:03:17 +0000 Subject: Fixed Italian Woodruff's MD5 svn-id: r32309 --- engines/gob/detection.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/gob/detection.cpp b/engines/gob/detection.cpp index f1efccc808..8351f2ecfb 100644 --- a/engines/gob/detection.cpp +++ b/engines/gob/detection.cpp @@ -1688,7 +1688,7 @@ static const GOBGameDescription gameDescriptions[] = { { "woodruff", "", - AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee0070556a96d8", 7069736), + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), EN_GRB, kPlatformPC, Common::ADGF_NO_FLAGS @@ -1701,7 +1701,7 @@ static const GOBGameDescription gameDescriptions[] = { { "woodruff", "", - AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee0070556a96d8", 7069736), + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), DE_DEU, kPlatformPC, Common::ADGF_NO_FLAGS @@ -1714,7 +1714,7 @@ static const GOBGameDescription gameDescriptions[] = { { "woodruff", "", - AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee0070556a96d8", 7069736), + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), FR_FRA, kPlatformPC, Common::ADGF_NO_FLAGS @@ -1727,7 +1727,7 @@ static const GOBGameDescription gameDescriptions[] = { { "woodruff", "", - AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee0070556a96d8", 7069736), + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), IT_ITA, kPlatformPC, Common::ADGF_NO_FLAGS @@ -1740,7 +1740,7 @@ static const GOBGameDescription gameDescriptions[] = { { "woodruff", "", - AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee0070556a96d8", 7069736), + AD_ENTRY1s("intro.stk", "60348a87651f92e8492ee070556a96d8", 7069736), ES_ESP, kPlatformPC, Common::ADGF_NO_FLAGS -- cgit v1.2.3 From a6649af56eb51092682a320d39fde199b77f7fc5 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 27 May 2008 00:03:29 +0000 Subject: Fixed an endian-related issue, making Woodruff controlable on big-endian machines. It still breaks when switching screens and object videos are mispositioned, though. svn-id: r32310 --- engines/gob/map_v4.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/gob/map_v4.cpp b/engines/gob/map_v4.cpp index 721f040341..a3c3222213 100644 --- a/engines/gob/map_v4.cpp +++ b/engines/gob/map_v4.cpp @@ -113,7 +113,7 @@ void Map_v4::loadMapObjects(const char *avjFile) { } if (_widthByte == 4) - _mapWidth = (int16) READ_VARO_UINT16(68); + _mapWidth = VAR(17); _passWidth = _mapWidth; -- cgit v1.2.3 From 4306e1e0eb7fd08026df0bf5c02bd4ecce1c2b67 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 27 May 2008 02:39:51 +0000 Subject: Made some methods virtual to allow File subclasses svn-id: r32311 --- common/file.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common/file.h b/common/file.h index 25c51a0afe..8a69318128 100644 --- a/common/file.h +++ b/common/file.h @@ -108,10 +108,10 @@ public: * * @return: true if the end of file is reached, false otherwise. */ - bool eof() const; + virtual bool eof() const; - uint32 pos() const; - uint32 size() const; + virtual uint32 pos() const; + virtual uint32 size() const; void seek(int32 offs, int whence = SEEK_SET); uint32 read(void *dataPtr, uint32 dataSize); uint32 write(const void *dataPtr, uint32 dataSize); -- cgit v1.2.3 From 8e290114d2fd58f606c8d8da41112101c3d9386a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 27 May 2008 06:35:00 +0000 Subject: palJuego -> gamePalette x_raton -> mouseX y_raton -> mouseY Some slight cleanup svn-id: r32312 --- engines/drascula/animation.cpp | 8 +- engines/drascula/drascula.cpp | 223 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 8 +- 3 files changed, 115 insertions(+), 124 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index efad9c5059..8647294a97 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -2078,9 +2078,9 @@ void DrasculaEngine::animation_12_5() { for (color = 0; color < 255; color++) for (componente = 0; componente < 3; componente++) { - palFondo1[color][componente] = palJuego[color][componente]; - palFondo2[color][componente] = palJuego[color][componente]; - palFondo3[color][componente] = palJuego[color][componente]; + palFondo1[color][componente] = gamePalette[color][componente]; + palFondo2[color][componente] = gamePalette[color][componente]; + palFondo3[color][componente] = gamePalette[color][componente]; } for (fundido = 1; fundido >= 0; fundido--) { @@ -2125,7 +2125,7 @@ void DrasculaEngine::animation_12_5() { if (frame == 2 || frame == 4 || frame == 7 || frame == 9) setPalette((byte *)&palFondo1); else if (frame == 1 || frame == 5) - setPalette((byte *)&palJuego); + setPalette((byte *)&gamePalette); else setPalette((byte *)&palFondo2); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index d478e887c6..a7e5f0e66f 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -355,7 +355,7 @@ void DrasculaEngine::paleta_hare() { for (color = 235; color < 253; color++) for (componente = 0; componente < 3; componente++) - palHare[color][componente] = palJuego[color][componente]; + palHare[color][componente] = gamePalette[color][componente]; } void DrasculaEngine::hare_oscuro() { @@ -363,7 +363,7 @@ void DrasculaEngine::hare_oscuro() { for (color = 235; color < 253; color++ ) for (componente = 0; componente < 3; componente++) - palJuego[color][componente] = palHareOscuro[color][componente]; + gamePalette[color][componente] = palHareOscuro[color][componente]; updatePalette(); } @@ -372,9 +372,9 @@ void DrasculaEngine::setRGB(byte *dir_lectura, int plt) { int x, cnt = 0; for (x = 0; x < plt; x++) { - palJuego[x][0] = dir_lectura[cnt++] / 4; - palJuego[x][1] = dir_lectura[cnt++] / 4; - palJuego[x][2] = dir_lectura[cnt++] / 4; + gamePalette[x][0] = dir_lectura[cnt++] / 4; + gamePalette[x][1] = dir_lectura[cnt++] / 4; + gamePalette[x][2] = dir_lectura[cnt++] / 4; } updatePalette(); } @@ -395,7 +395,7 @@ void DrasculaEngine::black() { } void DrasculaEngine::updatePalette() { - setPalette((byte *)&palJuego); + setPalette((byte *)&gamePalette); } void DrasculaEngine::setPalette(byte *PalBuf) { @@ -414,10 +414,9 @@ void DrasculaEngine::setPalette(byte *PalBuf) { void DrasculaEngine::copyBackground(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *src, byte *dest) { - int x; dest += xdes + ydes * 320; src += xorg + yorg * 320; - for (x = 0; x < height; x++) { + for (int x = 0; x < height; x++) { memcpy(dest, src, width); dest += 320; src += 320; @@ -471,12 +470,11 @@ void DrasculaEngine::copyRectClip(int *Array, byte *src, byte *dest) { } void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *buffer) { - int x; byte *ptr = VGA; ptr += xdes + ydes * 320; buffer += xorg + yorg * 320; - for (x = 0; x < height; x++) { + for (int x = 0; x < height; x++) { memcpy(ptr, buffer, width); ptr += 320; buffer += 320; @@ -664,7 +662,7 @@ bucles: else loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); - setPalette((byte *)&palJuego); + setPalette((byte *)&gamePalette); menu_scr = 0; espera_soltar(); if (num_ejec != 3) @@ -709,7 +707,7 @@ bucles: cont_sv = 0; } - if (y_raton < 24 && menu_scr == 0) + if (mouseY < 24 && menu_scr == 0) menu_bar = 1; else menu_bar = 0; @@ -816,20 +814,17 @@ void DrasculaEngine::chooseObject(int objeto) { } int DrasculaEngine::resta_objeto(int osj) { - int h, q = 0; + int result = 1; - for (h = 1; h < 43; h++) { + for (int h = 1; h < 43; h++) { if (objetos_que_tengo[h] == osj) { objetos_que_tengo[h] = 0; - q = 1; + result = 0; break; } } - if (q == 1) - return 0; - else - return 1; + return result; } void DrasculaEngine::withoutVerb() { @@ -874,12 +869,8 @@ static char *getLine(Common::File *fp, char *buf, int len) { b = buf; while (!fp->eos()) { c = ~fp->readByte(); - if (c == '\r') + if (c == '\r' || c == '\n' || b - buf >= (len - 1)) continue; - if (c == '\n') - break; - if (b - buf >= (len - 1)) - break; *b++ = c; } *b = '\0'; @@ -1214,7 +1205,7 @@ void DrasculaEngine::mueve_cursor() { } else if (menu_scr == 0 && _color != LIGHT_GREEN) color_abc(LIGHT_GREEN); if (hay_nombre == 1 && menu_scr == 0) - centra_texto(texto_nombre, x_raton, y_raton); + centra_texto(texto_nombre, mouseX, mouseY); if (menu_scr == 1) menu_sin_volcar(); else if (menu_bar == 1) @@ -1222,8 +1213,8 @@ void DrasculaEngine::mueve_cursor() { pos_cursor[0] = 0; pos_cursor[1] = 0; - pos_cursor[2] = x_raton - 20; - pos_cursor[3] = y_raton - 17; + pos_cursor[2] = mouseX - 20; + pos_cursor[3] = mouseY - 17; pos_cursor[4] = OBJWIDTH; pos_cursor[5] = OBJHEIGHT; copyRectClip(pos_cursor, dir_dibujo3, dir_zona_pantalla); @@ -1233,8 +1224,8 @@ void DrasculaEngine::comprueba_objetos() { int l, veo = 0; for (l = 0; l < numRoomObjs; l++) { - if (x_raton > x1[l] && y_raton > y1[l] - && x_raton < x2[l] && y_raton < y2[l] + if (mouseX > x1[l] && mouseY > y1[l] + && mouseX < x2[l] && mouseY < y2[l] && visible[l] == 1 && isDoor[l] == 0) { strcpy(texto_nombre, objName[l]); hay_nombre = 1; @@ -1243,15 +1234,15 @@ void DrasculaEngine::comprueba_objetos() { } if (num_ejec == 2) { - if (x_raton > hare_x + 2 && y_raton > hare_y + 2 - && x_raton < hare_x + ancho_hare - 2 && y_raton < hare_y + alto_hare - 2) { + if (mouseX > hare_x + 2 && mouseY > hare_y + 2 + && mouseX < hare_x + ancho_hare - 2 && mouseY < hare_y + alto_hare - 2) { strcpy(texto_nombre, "hacker"); hay_nombre = 1; veo = 1; } } else { - if (x_raton > hare_x + 2 && y_raton > hare_y + 2 - && x_raton < hare_x + ancho_hare - 2 && y_raton < hare_y + alto_hare - 2 && veo == 0) { + if (mouseX > hare_x + 2 && mouseY > hare_y + 2 + && mouseX < hare_x + ancho_hare - 2 && mouseY < hare_y + alto_hare - 2 && veo == 0) { strcpy(texto_nombre, "hacker"); hay_nombre = 1; veo = 1; @@ -1274,7 +1265,7 @@ void DrasculaEngine::elige_en_barra() { int n, num_verbo = -1; for (n = 0; n < 7; n++) - if (x_raton > x_barra[n] && x_raton < x_barra[n + 1]) + if (mouseX > x_barra[n] && mouseX < x_barra[n + 1]) num_verbo = n; if (num_verbo < 1) @@ -1290,8 +1281,8 @@ bool DrasculaEngine::comprueba1() { saca_objeto(); else { for (l = 0; l < numRoomObjs; l++) { - if (x_raton >= x1[l] && y_raton >= y1[l] - && x_raton <= x2[l] && y_raton <= y2[l] && rompo == 0) { + if (mouseX >= x1[l] && mouseY >= y1[l] + && mouseX <= x2[l] && mouseY <= y2[l] && rompo == 0) { if (sal_de_la_habitacion(l)) return true; if (rompo == 1) @@ -1299,13 +1290,13 @@ bool DrasculaEngine::comprueba1() { } } - if (x_raton > hare_x && y_raton > hare_y - && x_raton < hare_x + ancho_hare && y_raton < hare_y + alto_hare) + if (mouseX > hare_x && mouseY > hare_y + && mouseX < hare_x + ancho_hare && mouseY < hare_y + alto_hare) rompo = 1; for (l = 0; l < numRoomObjs; l++) { - if (x_raton > x1[l] && y_raton > y1[l] - && x_raton < x2[l] && y_raton < y2[l] && rompo == 0) { + if (mouseX > x1[l] && mouseY > y1[l] + && mouseX < x2[l] && mouseY < y2[l] && rompo == 0) { sitio_x = sitiobj_x[l]; sitio_y = sitiobj_y[l]; sentido_final = sentidobj[l]; @@ -1316,8 +1307,8 @@ bool DrasculaEngine::comprueba1() { } if (rompo == 0) { - sitio_x = x_raton; - sitio_y = y_raton; + sitio_x = mouseX; + sitio_y = mouseY; if (sitio_x < suelo_x1) sitio_x = suelo_x1; @@ -1348,8 +1339,8 @@ bool DrasculaEngine::comprueba2() { return true; } else { for (l = 0; l < numRoomObjs; l++) { - if (x_raton > x1[l] && y_raton > y1[l] - && x_raton < x2[l] && y_raton < y2[l] && visible[l] == 1) { + if (mouseX > x1[l] && mouseY > y1[l] + && mouseX < x2[l] && mouseY < y2[l] && visible[l] == 1) { sentido_final = sentidobj[l]; anda_a_objeto = 1; lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); @@ -1386,8 +1377,8 @@ void DrasculaEngine::updateEvents() { _keyPressed.keycode = Common::KEYCODE_INVALID; break; case Common::EVENT_MOUSEMOVE: - x_raton = event.mouse.x; - y_raton = event.mouse.y; + mouseX = event.mouse.x; + mouseY = event.mouse.y; break; case Common::EVENT_LBUTTONDOWN: boton_izq = 1; @@ -1462,29 +1453,29 @@ void DrasculaEngine::mesa() { } if (boton_izq == 1) { delay(100); - if (x_raton > 80 && x_raton < 121) { + if (mouseX > 80 && mouseX < 121) { int vol = _mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16; - if (y_raton < nivel_master && vol < 15) + if (mouseY < nivel_master && vol < 15) vol++; - if (y_raton > nivel_master && vol > 0) + if (mouseY > nivel_master && vol > 0) vol--; _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, vol * 16); } - if (x_raton > 136 && x_raton < 178) { + if (mouseX > 136 && mouseX < 178) { int vol = _mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16; - if (y_raton < nivel_voc && vol < 15) + if (mouseY < nivel_voc && vol < 15) vol++; - if (y_raton > nivel_voc && vol > 0) + if (mouseY > nivel_voc && vol > 0) vol--; _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, vol * 16); } - if (x_raton > 192 && x_raton < 233) { + if (mouseX > 192 && mouseX < 233) { int vol = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16; - if (y_raton < nivel_cd && vol < 15) + if (mouseY < nivel_cd && vol < 15) vol++; - if (y_raton > nivel_cd && vol > 0) + if (mouseY > nivel_cd && vol > 0) vol--; _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, vol * 16); } @@ -1543,7 +1534,7 @@ bool DrasculaEngine::saves() { if (boton_izq == 1) { delay(100); for (n = 0; n < NUM_SAVES; n++) { - if (x_raton > 115 && y_raton > y + (9 * n) && x_raton < 115 + 175 && y_raton < y + 10 + (9 * n)) { + if (mouseX > 115 && mouseY > y + (9 * n) && mouseX < 115 + 175 && mouseY < y + 10 + (9 * n)) { strcpy(select, nombres[n]); if (strcmp(select, "*")) @@ -1580,7 +1571,7 @@ bool DrasculaEngine::saves() { } } - if (x_raton > 117 && y_raton > 15 && x_raton < 295 && y_raton < 24 && hay_seleccion == 1) { + if (mouseX > 117 && mouseY > 15 && mouseX < 295 && mouseY < 24 && hay_seleccion == 1) { introduce_nombre(); strcpy(nombres[num_sav], select); print_abc(select, 117, 15); @@ -1591,11 +1582,11 @@ bool DrasculaEngine::saves() { } } - if (x_raton > 125 && y_raton > 123 && x_raton < 199 && y_raton < 149 && hay_seleccion == 1) { + if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149 && hay_seleccion == 1) { if (!para_cargar(fichero)) return false; break; - } else if (x_raton > 208 && y_raton > 123 && x_raton < 282 && y_raton < 149 && hay_seleccion == 1) { + } else if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149 && hay_seleccion == 1) { para_grabar(fichero); Common::OutSaveFile *tsav; if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { @@ -1607,7 +1598,7 @@ bool DrasculaEngine::saves() { } tsav->finalize(); delete tsav; - } else if (x_raton > 168 && y_raton > 154 && x_raton < 242 && y_raton < 180) + } else if (mouseX > 168 && mouseY > 154 && mouseX < 242 && mouseY < 180) break; else if (hay_seleccion == 0) { print_abc("elige una partida", 117, 15); @@ -1870,8 +1861,8 @@ void DrasculaEngine::salva_pantallas() { file.close(); MirarRaton(); - xr = x_raton; - yr = y_raton; + xr = mouseX; + yr = mouseY; for (;;) { // efecto(dir_dibujo1); @@ -1949,9 +1940,9 @@ void DrasculaEngine::salva_pantallas() { MirarRaton(); if (boton_dch == 1 || boton_izq == 1) break; - if (x_raton != xr) + if (mouseX != xr) break; - if (y_raton != yr) + if (mouseY != yr) break; } // fin_ghost(); @@ -1980,7 +1971,7 @@ void DrasculaEngine::FundeDelNegro(int VelocidadDeFundido) { for (fundido = 0; fundido < 64; fundido++) { for (color = 0; color < 256; color++) { for (componente = 0; componente < 3; componente++) { - palFundido[color][componente] = LimitaVGA(palJuego[color][componente] - 63 + fundido); + palFundido[color][componente] = LimitaVGA(gamePalette[color][componente] - 63 + fundido); } } pause(VelocidadDeFundido); @@ -1993,48 +1984,48 @@ void DrasculaEngine::color_abc(int cl) { _color = cl; if (cl == 0) { - palJuego[254][0] = 0; - palJuego[254][1] = 0; - palJuego[254][2] = 0; + gamePalette[254][0] = 0; + gamePalette[254][1] = 0; + gamePalette[254][2] = 0; } else if (cl == 1) { - palJuego[254][0] = 0x10; - palJuego[254][1] = 0x3E; - palJuego[254][2] = 0x28; + gamePalette[254][0] = 0x10; + gamePalette[254][1] = 0x3E; + gamePalette[254][2] = 0x28; } else if (cl == 3) { - palJuego[254][0] = 0x16; - palJuego[254][1] = 0x3F; - palJuego[254][2] = 0x16; + gamePalette[254][0] = 0x16; + gamePalette[254][1] = 0x3F; + gamePalette[254][2] = 0x16; } else if (cl == 4) { - palJuego[254][0] = 0x9; - palJuego[254][1] = 0x3F; - palJuego[254][2] = 0x12; + gamePalette[254][0] = 0x9; + gamePalette[254][1] = 0x3F; + gamePalette[254][2] = 0x12; } else if (cl == 5) { - palJuego[254][0] = 0x3F; - palJuego[254][1] = 0x3F; - palJuego[254][2] = 0x15; + gamePalette[254][0] = 0x3F; + gamePalette[254][1] = 0x3F; + gamePalette[254][2] = 0x15; } else if (cl == 7) { - palJuego[254][0] = 0x38; - palJuego[254][1] = 0; - palJuego[254][2] = 0; + gamePalette[254][0] = 0x38; + gamePalette[254][1] = 0; + gamePalette[254][2] = 0; } else if (cl == 8) { - palJuego[254][0] = 0x3F; - palJuego[254][1] = 0x27; - palJuego[254][2] = 0x0B; + gamePalette[254][0] = 0x3F; + gamePalette[254][1] = 0x27; + gamePalette[254][2] = 0x0B; } else if (cl == 9) { - palJuego[254][0] = 0x2A; - palJuego[254][1] = 0; - palJuego[254][2] = 0x2A; + gamePalette[254][0] = 0x2A; + gamePalette[254][1] = 0; + gamePalette[254][2] = 0x2A; } else if (cl == 10) { - palJuego[254][0] = 0x30; - palJuego[254][1] = 0x30; - palJuego[254][2] = 0x30; + gamePalette[254][0] = 0x30; + gamePalette[254][1] = 0x30; + gamePalette[254][2] = 0x30; } else if (cl == 11) { - palJuego[254][0] = 98; - palJuego[254][1] = 91; - palJuego[254][2] = 100; + gamePalette[254][0] = 98; + gamePalette[254][1] = 91; + gamePalette[254][2] = 100; }; - setPalette((byte *)&palJuego); + setPalette((byte *)&gamePalette); } char DrasculaEngine::LimitaVGA(char valor) { @@ -2196,7 +2187,7 @@ void DrasculaEngine::FundeAlNegro(int VelocidadDeFundido) { for (fundido = 63; fundido >= 0; fundido--) { for (color = 0; color < 256; color++) { for (componente = 0; componente < 3; componente++) { - palFundido[color][componente] = LimitaVGA(palJuego[color][componente] - 63 + fundido); + palFundido[color][componente] = LimitaVGA(gamePalette[color][componente] - 63 + fundido); } } pause(VelocidadDeFundido); @@ -2432,7 +2423,7 @@ void DrasculaEngine::color_hare() { for (color = 235; color < 253; color++) { for (componente = 0; componente < 3; componente++) { - palJuego[color][componente] = palHare[color][componente]; + gamePalette[color][componente] = palHare[color][componente]; } } updatePalette(); @@ -2445,7 +2436,7 @@ void DrasculaEngine::funde_hare(int oscuridad) { for (fundido = oscuridad; fundido >= 0; fundido--) { for (color = 235; color < 253; color++) { for (componente = 0; componente < 3; componente++) - palJuego[color][componente] = LimitaVGA(palJuego[color][componente] - 8 + fundido); + gamePalette[color][componente] = LimitaVGA(gamePalette[color][componente] - 8 + fundido); } } @@ -2457,7 +2448,7 @@ void DrasculaEngine::paleta_hare_claro() { for (color = 235; color < 253; color++) { for (componente = 0; componente < 3; componente++) - palHareClaro[color][componente] = palJuego[color][componente]; + palHareClaro[color][componente] = gamePalette[color][componente]; } } @@ -2466,7 +2457,7 @@ void DrasculaEngine::paleta_hare_oscuro() { for (color = 235; color < 253; color++) { for (componente = 0; componente < 3; componente++) - palHareOscuro[color][componente] = palJuego[color][componente]; + palHareOscuro[color][componente] = gamePalette[color][componente]; } } @@ -2475,7 +2466,7 @@ void DrasculaEngine::hare_claro() { for (color = 235; color < 253; color++) { for (componente = 0; componente < 3; componente++) - palJuego[color][componente] = palHareClaro[color][componente]; + gamePalette[color][componente] = palHareClaro[color][componente]; } updatePalette(); @@ -2683,7 +2674,7 @@ void DrasculaEngine::barra_menu() { int n, sobre_verbo = 1; for (n = 0; n < 7; n++) { - if (x_raton > x_barra[n] && x_raton < x_barra[n + 1]) + if (mouseX > x_barra[n] && mouseX < x_barra[n + 1]) sobre_verbo = 0; copyRect(OBJWIDTH * n, OBJHEIGHT * sobre_verbo, x_barra[n], 2, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_zona_pantalla); @@ -3300,8 +3291,8 @@ void DrasculaEngine::cursor_mesa() { pos_cursor[0] = 225; pos_cursor[1] = 56; - pos_cursor[2] = x_raton - 20; - pos_cursor[3] = y_raton - 12; + pos_cursor[2] = mouseX - 20; + pos_cursor[3] = mouseY - 12; pos_cursor[4] = 40; pos_cursor[5] = 25; @@ -3774,8 +3765,8 @@ int DrasculaEngine::sobre_que_objeto() { int n = 0; for (n = 1; n < 43; n++) { - if (x_raton > x_obj[n] && y_raton > y_obj[n] - && x_raton < x_obj[n] + OBJWIDTH && y_raton < y_obj[n] + OBJHEIGHT) + if (mouseX > x_obj[n] && mouseY > y_obj[n] + && mouseX < x_obj[n] + OBJWIDTH && mouseY < y_obj[n] + OBJHEIGHT) break; } @@ -3919,17 +3910,17 @@ bucle_opc: MirarRaton(); - if (y_raton > 0 && y_raton < 9) { + if (mouseY > 0 && mouseY < 9) { if (usado1 == 1 && _color != WHITE) color_abc(WHITE); else if (usado1 == 0 && _color != LIGHT_GREEN) color_abc(LIGHT_GREEN); - } else if (y_raton > 8 && y_raton < 17) { + } else if (mouseY > 8 && mouseY < 17) { if (usado2 == 1 && _color != WHITE) color_abc(WHITE); else if (usado2 == 0 && _color != LIGHT_GREEN) color_abc(LIGHT_GREEN); - } else if (y_raton > 16 && y_raton < 25) { + } else if (mouseY > 16 && mouseY < 25) { if (usado3 == 1 && _color != WHITE) color_abc(WHITE); else if (usado3 == 0 && _color != LIGHT_GREEN) @@ -3937,13 +3928,13 @@ bucle_opc: } else if (_color != LIGHT_GREEN) color_abc(LIGHT_GREEN); - if (y_raton > 0 && y_raton < 9) + if (mouseY > 0 && mouseY < 9) juego1 = 2; - else if (y_raton > 8 && y_raton < 17) + else if (mouseY > 8 && mouseY < 17) juego2 = 2; - else if (y_raton > 16 && y_raton < 25) + else if (mouseY > 16 && mouseY < 25) juego3 = 2; - else if (y_raton > 24 && y_raton < 33) + else if (mouseY > 24 && mouseY < 33) juego4 = 2; print_abc_opc(frase1, 1, 2, juego1); @@ -4551,8 +4542,8 @@ void DrasculaEngine::mapa() { int l, veo = 0; for (l = 0; l < numRoomObjs; l++) { - if (x_raton > x1[l] && y_raton > y1[l] - && x_raton < x2[l] && y_raton < y2[l] + if (mouseX > x1[l] && mouseY > y1[l] + && mouseX < x2[l] && mouseY < y2[l] && visible[l] == 1) { strcpy(texto_nombre, objName[l]); hay_nombre = 1; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 48dbed9bcb..8351243acb 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -384,7 +384,7 @@ public: void copyRectClip(int *Array, byte *src, byte *dest); void updateScreen(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *buffer); - DacPalette256 palJuego; + DacPalette256 gamePalette; DacPalette256 palHare; DacPalette256 palHareClaro; DacPalette256 palHareOscuro; @@ -473,9 +473,9 @@ public: int corta_musica; char select[23]; int hay_seleccion; - int x_raton; - int y_raton; - int y_raton_ant; + int mouseX; + int mouseY; + int mouseY_ant; int boton_izq; int boton_dch; -- cgit v1.2.3 From 314ecc5d7d04b3c69977538b57f55517ba40c98a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 27 May 2008 07:04:56 +0000 Subject: Cleanup of the X_OBJ and Y_OBJ defines svn-id: r32313 --- engines/drascula/drascula.cpp | 46 +++++++++++++++-------- engines/drascula/drascula.h | 87 ------------------------------------------- 2 files changed, 30 insertions(+), 103 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index a7e5f0e66f..8a472c280d 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -79,16 +79,30 @@ DrasculaEngine::~DrasculaEngine() { delete _rnd; } -static const int x_obj[44] = {0, X_OBJ1, X_OBJ2, X_OBJ3, X_OBJ4, X_OBJ5, X_OBJ6, X_OBJ7, X_OBJ8, X_OBJ9, X_OBJ10, - X_OBJ11, X_OBJ12, X_OBJ13, X_OBJ14, X_OBJ15, X_OBJ16, X_OBJ17, X_OBJ18, X_OBJ19, X_OBJ20, - X_OBJ21, X_OBJ22, X_OBJ23, X_OBJ24, X_OBJ25, X_OBJ26, X_OBJ27, X_OBJ28, X_OBJ29, X_OBJ30, - X_OBJ31, X_OBJ32, X_OBJ33, X_OBJ34, X_OBJ35, X_OBJ36, X_OBJ37, X_OBJ38, X_OBJ39, X_OBJ40, - X_OBJ41, X_OBJ42, X_OBJ43}; -static const int y_obj[44] = {0, Y_OBJ1, Y_OBJ2, Y_OBJ3, Y_OBJ4, Y_OBJ5, Y_OBJ6, Y_OBJ7, Y_OBJ8, Y_OBJ9, Y_OBJ10, - Y_OBJ11, Y_OBJ12, Y_OBJ13, Y_OBJ14, Y_OBJ15, Y_OBJ16, Y_OBJ17, Y_OBJ18, Y_OBJ19, Y_OBJ20, - Y_OBJ21, Y_OBJ22, Y_OBJ23, Y_OBJ24, Y_OBJ25, Y_OBJ26, Y_OBJ27, Y_OBJ28, Y_OBJ29, Y_OBJ30, - Y_OBJ31, Y_OBJ32, Y_OBJ33, Y_OBJ34, Y_OBJ35, Y_OBJ36, Y_OBJ37, Y_OBJ38, Y_OBJ39, Y_OBJ40, - Y_OBJ41, Y_OBJ42, Y_OBJ43}; +struct ItemLocation { + int x; + int y; +}; + +ItemLocation itemLocations[] = { + { 0, 0 }, // empty + { 5, 10 }, { 50, 10 }, { 95, 10 }, // 1-3 + { 140, 10 }, { 185, 10 }, { 230, 10 }, // 4-6 + { 275, 10 }, { 5, 40 }, { 50, 40 }, // 7-9 + { 95, 40 }, { 140, 40 }, { 185, 40 }, // 10-12 + { 230, 40 }, { 275, 40 }, { 5, 70 }, // 13-15 + { 50, 70 }, { 95, 70 }, { 140, 70 }, // 16-18 + { 185, 70 }, { 230, 70 }, { 275, 70 }, // 19-21 + { 5, 100 }, { 50, 100 }, { 95, 100 }, // 22-24 + { 140, 100 }, { 185, 100 }, { 230, 100 }, // 25-27 + { 275, 100 }, { 5, 130 }, { 50, 130 }, // 28-30 + { 95, 130 }, { 140, 130 }, { 185, 130 }, // 31-33 + { 230, 130 }, { 275, 130 }, { 5, 160 }, // 34-36 + { 50, 160 }, { 95, 160 }, { 140, 160 }, // 37-39 + { 185, 160 }, { 230, 160 }, { 275, 160 }, // 40-42 + { 275, 160 } // 43 +}; + static const int x_pol[44] = {0, 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, 247, 83, 165, 1, 206, 42, 124, 83, 1, 247, @@ -2656,18 +2670,18 @@ void DrasculaEngine::menu_sin_volcar() { if (h != 0) { if (num_ejec == 6) - copyBackground(x_pol[n], y_pol[n], x_obj[n], y_obj[n], + copyBackground(x_pol[n], y_pol[n], itemLocations[n].x, itemLocations[n].y, OBJWIDTH, OBJHEIGHT, dir_mesa, dir_zona_pantalla); else - copyBackground(x_pol[n], y_pol[n], x_obj[n], y_obj[n], + copyBackground(x_pol[n], y_pol[n], itemLocations[n].x, itemLocations[n].y, OBJWIDTH, OBJHEIGHT, dir_hare_frente, dir_zona_pantalla); } - copyRect(x1d_menu[h], y1d_menu[h], x_obj[n], y_obj[n], + copyRect(x1d_menu[h], y1d_menu[h], itemLocations[n].x, itemLocations[n].y, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_zona_pantalla); } if (x < 7) - print_abc(texto_icono, x_obj[x] - 2, y_obj[x] - 7); + print_abc(texto_icono, itemLocations[x].x - 2, itemLocations[x].y - 7); } void DrasculaEngine::barra_menu() { @@ -3765,8 +3779,8 @@ int DrasculaEngine::sobre_que_objeto() { int n = 0; for (n = 1; n < 43; n++) { - if (mouseX > x_obj[n] && mouseY > y_obj[n] - && mouseX < x_obj[n] + OBJWIDTH && mouseY < y_obj[n] + OBJHEIGHT) + if (mouseX > itemLocations[n].x && mouseY > itemLocations[n].y + && mouseX < itemLocations[n].x + OBJWIDTH && mouseY < itemLocations[n].y + OBJHEIGHT) break; } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 8351243acb..39e7fb2b78 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -83,93 +83,6 @@ struct DrasculaGameDescription; #define OBJWIDTH 40 #define OBJHEIGHT 25 -#define X_OBJ1 5 -#define Y_OBJ1 10 -#define X_OBJ2 50 -#define Y_OBJ2 10 -#define X_OBJ3 95 -#define Y_OBJ3 10 -#define X_OBJ4 140 -#define Y_OBJ4 10 -#define X_OBJ5 185 -#define Y_OBJ5 10 -#define X_OBJ6 230 -#define Y_OBJ6 10 -#define X_OBJ7 275 -#define Y_OBJ7 10 -#define X_OBJ8 5 -#define Y_OBJ8 40 -#define X_OBJ9 50 -#define Y_OBJ9 40 -#define X_OBJ10 95 -#define Y_OBJ10 40 -#define X_OBJ11 140 -#define Y_OBJ11 40 -#define X_OBJ12 185 -#define Y_OBJ12 40 -#define X_OBJ13 230 -#define Y_OBJ13 40 -#define X_OBJ14 275 -#define Y_OBJ14 40 -#define X_OBJ15 5 -#define Y_OBJ15 70 -#define X_OBJ16 50 -#define Y_OBJ16 70 -#define X_OBJ17 95 -#define Y_OBJ17 70 -#define X_OBJ18 140 -#define Y_OBJ18 70 -#define X_OBJ19 185 -#define Y_OBJ19 70 -#define X_OBJ20 230 -#define Y_OBJ20 70 -#define X_OBJ21 275 -#define Y_OBJ21 70 -#define X_OBJ22 5 -#define Y_OBJ22 100 -#define X_OBJ23 50 -#define Y_OBJ23 100 -#define X_OBJ24 95 -#define Y_OBJ24 100 -#define X_OBJ25 140 -#define Y_OBJ25 100 -#define X_OBJ26 185 -#define Y_OBJ26 100 -#define X_OBJ27 230 -#define Y_OBJ27 100 -#define X_OBJ28 275 -#define Y_OBJ28 100 -#define X_OBJ29 5 -#define Y_OBJ29 130 -#define X_OBJ30 50 -#define Y_OBJ30 130 -#define X_OBJ31 95 -#define Y_OBJ31 130 -#define X_OBJ32 140 -#define Y_OBJ32 130 -#define X_OBJ33 185 -#define Y_OBJ33 130 -#define X_OBJ34 230 -#define Y_OBJ34 130 -#define X_OBJ35 275 -#define Y_OBJ35 130 -#define X_OBJ36 5 -#define Y_OBJ36 160 -#define X_OBJ37 50 -#define Y_OBJ37 160 -#define X_OBJ38 95 -#define Y_OBJ38 160 -#define X_OBJ39 140 -#define Y_OBJ39 160 -#define X_OBJ40 185 -#define Y_OBJ40 160 -#define X_OBJ41 230 -#define Y_OBJ41 160 -#define X_OBJ42 275 -#define Y_OBJ42 160 -#define X_OBJ43 275 -#define Y_OBJ43 160 - #define DIF_MASK_HARE 72 #define DIF_MASK_ABC 22 #define CHAR_WIDTH 8 -- cgit v1.2.3 From b1217da63f9e9c1bcace4b51621efe8b59fe2553 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 27 May 2008 07:17:15 +0000 Subject: comienza_sound -> playSound fin_sound -> stopSound comienza_sound -> playSound n_puerta -> doorNum cierra_puerta -> closeDoor svn-id: r32314 --- engines/drascula/animation.cpp | 80 +++++++++++++++++++++--------------------- engines/drascula/drascula.cpp | 34 +++++++++--------- engines/drascula/drascula.h | 12 +++---- engines/drascula/rooms.cpp | 68 +++++++++++++++++------------------ 4 files changed, 97 insertions(+), 97 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 8647294a97..0ec6845251 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -81,12 +81,12 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); - comienza_sound("s5.als"); + playSound("s5.als"); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; if (anima("scr2.bin", 17)) break; - fin_sound_corte(); + stopSound_corte(); if (anima("scr3.bin", 17)) break; loadPic("cielo2.alg"); @@ -265,7 +265,7 @@ void DrasculaEngine::animation_1_1() { break; if (anima("rayo1.bin", 16)) break; - comienza_sound("s5.als"); + playSound("s5.als"); if (anima("rayo2.bin", 15)) break; if (anima("frel2.bin", 16)) @@ -274,7 +274,7 @@ void DrasculaEngine::animation_1_1() { break; if (anima("frel.bin", 16)) break; - fin_sound_corte(); + stopSound_corte(); clearRoom(); black(); playMusic(23); @@ -469,9 +469,9 @@ void DrasculaEngine::animation_2_1() { break; pause(4); - comienza_sound("s1.als"); + playSound("s1.als"); hipo(18); - fin_sound(); + stopSound(); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; @@ -774,7 +774,7 @@ void DrasculaEngine::animation_2_2() { } x = 0; - comienza_sound("s2.als"); + playSound("s2.als"); for (n = 0; n < 6; n++) { x++; @@ -806,13 +806,13 @@ void DrasculaEngine::animation_2_2() { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - fin_sound(); + stopSound(); pause (4); - comienza_sound("s1.als"); + playSound("s1.als"); hipo_sin_nadie(12); - fin_sound(); + stopSound(); } void DrasculaEngine::animation_3_2() { @@ -958,10 +958,10 @@ void DrasculaEngine::animation_14_2() { decompressPic(dir_dibujo1, 1); - comienza_sound("s7.als"); + playSound("s7.als"); hipo(15); - fin_sound(); + stopSound(); loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); @@ -1294,7 +1294,7 @@ void DrasculaEngine::animation_25_2() { flags[24] = 0; - comienza_sound("s6.als"); + playSound("s6.als"); for (n = 0; n >= -160; n = n - 8) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); @@ -1311,7 +1311,7 @@ void DrasculaEngine::animation_25_2() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } - fin_sound(); + stopSound(); loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); @@ -1484,9 +1484,9 @@ void DrasculaEngine::animation_35_2() { pause(19); - comienza_sound("s1.als"); + playSound("s1.als"); hipo_sin_nadie(18); - fin_sound(); + stopSound(); pause(10); @@ -1798,7 +1798,7 @@ void DrasculaEngine::animation_rayo() { pause(50); - comienza_sound("s5.als"); + playSound("s5.als"); updateScreen(0, 0, 0, 0, 320, 200, dir_hare_dch); pause(3); @@ -1811,7 +1811,7 @@ void DrasculaEngine::animation_rayo() { updateScreen(0, 0, 0, 0, 320, 200, dir_dibujo3); pause(3); updateScreen(0, 0, 0, 0, 320, 200, dir_hare_frente); - fin_sound(); + stopSound(); } void DrasculaEngine::animation_2_4() { @@ -1991,8 +1991,8 @@ void DrasculaEngine::animation_5_5(){ } updateScreen(0, 0, 0, 0, 320, 200, dir_dibujo1); - comienza_sound("s1.als"); - fin_sound(); + playSound("s1.als"); + stopSound(); loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); @@ -2068,7 +2068,7 @@ void DrasculaEngine::animation_12_5() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(27); anima("rayo1.bin", 23); - comienza_sound("s5.als"); + playSound("s5.als"); anima("rayo2.bin", 17); sentido_hare = 1; updateRoom(); @@ -2119,7 +2119,7 @@ void DrasculaEngine::animation_12_5() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } - fin_sound_corte(); + stopSound_corte(); for (frame = 0; frame < 15; frame++) { if (frame == 2 || frame == 4 || frame == 7 || frame == 9) @@ -2143,9 +2143,9 @@ void DrasculaEngine::animation_12_5() { flags[1] = 1; animation_13_5(); - comienza_sound("s1.als"); + playSound("s1.als"); hipo(12); - fin_sound(); + stopSound(); loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); @@ -2209,19 +2209,19 @@ void DrasculaEngine::animation_13_5() { void DrasculaEngine::animation_14_5() { flags[11] = 1; - comienza_sound("s3.als"); + playSound("s3.als"); updateRoom(); updateScreen(0, 0, 0,0 , 320, 200, dir_zona_pantalla); - fin_sound(); + stopSound(); pause(17); sentido_hare = 3; talk(_text[_lang][246],"246.als"); lleva_al_hare(89, 160); flags[10] = 1; - comienza_sound("s7.als"); + playSound("s7.als"); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - fin_sound(); + stopSound(); pause(14); sentido_hare = 3; updateRoom(); @@ -2474,12 +2474,12 @@ void DrasculaEngine::animation_9_6() { } void DrasculaEngine::animation_10_6() { - comienza_sound ("s14.als"); + playSound ("s14.als"); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); copyBackground(164, 85, 155, 48, 113, 114, dir_dibujo3, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - fin_sound(); + stopSound(); talk_taber2(_textt[_lang][23], "t23.als"); flags[7] = 1; } @@ -2529,9 +2529,9 @@ void DrasculaEngine::animation_19_6() { pause(6); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - comienza_sound("s4.als"); + playSound("s4.als"); pause(6); - fin_sound(); + stopSound(); } void DrasculaEngine::animation_12_2() { @@ -2624,11 +2624,11 @@ void DrasculaEngine::animation_26_2() { updateScreen(225, 113, 225, 113, 50, 59, dir_zona_pantalla); x = x + 50; if (n == 2) - comienza_sound("s9.als"); + playSound("s9.als"); pause(3); } - fin_sound_corte(); + stopSound_corte(); x = 0; for (n = 0; n < 6; n++) { x++; @@ -2709,8 +2709,8 @@ void DrasculaEngine::animation_22_2() { sentido_hare=2; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - comienza_sound("s13.als"); - fin_sound(); + playSound("s13.als"); + stopSound(); sentido_hare = 1; talk_vbpuerta(1); @@ -2832,7 +2832,7 @@ void DrasculaEngine::animation_34_2() { } x = 0; - comienza_sound("s8.als"); + playSound("s8.als"); for (n = 0; n < 3; n++) { x++; @@ -2841,7 +2841,7 @@ void DrasculaEngine::animation_34_2() { x = x + 83; pause(3); } - fin_sound(); + stopSound(); pause(30); @@ -3199,7 +3199,7 @@ void DrasculaEngine::animation_5_2() { pause(3); } - comienza_sound("s1.als"); + playSound("s1.als"); x = 0; @@ -3210,7 +3210,7 @@ void DrasculaEngine::animation_5_2() { x = x + 52; pause(3); } - fin_sound_corte(); + stopSound_corte(); x = 0; diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 8a472c280d..41f6a3fde8 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -2115,7 +2115,7 @@ imprimir: } } -void DrasculaEngine::comienza_sound(const char *fichero) { +void DrasculaEngine::playSound(const char *fichero) { if (hay_sb == 1) { sku = new Common::File; sku->open(fichero); @@ -2183,7 +2183,7 @@ bool DrasculaEngine::anima(const char *animation, int FPS) { return ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)); } -void DrasculaEngine::animafin_sound_corte() { +void DrasculaEngine::animastopSound_corte() { if (hay_sb == 1) { ctvd_stop(); delete sku; @@ -2308,7 +2308,7 @@ comienza: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::fin_sound() { +void DrasculaEngine::stopSound() { delay(1); if (hay_sb == 1) { @@ -3363,8 +3363,8 @@ void DrasculaEngine::introduce_nombre() { void DrasculaEngine::para_grabar(char nom_game[]) { saveGame(nom_game); - comienza_sound("99.als"); - fin_sound(); + playSound("99.als"); + stopSound(); } void DrasculaEngine::OpenSSN(const char *Name, int Pause) { @@ -4289,7 +4289,7 @@ void DrasculaEngine::suma_objeto(int osj) { } } -void DrasculaEngine::fin_sound_corte() { +void DrasculaEngine::stopSound_corte() { if (hay_sb == 1) { ctvd_stop(); delete sku; @@ -4531,23 +4531,23 @@ comienza: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::openDoor(int nflag, int n_puerta) { +void DrasculaEngine::openDoor(int nflag, int doorNum) { if (flags[nflag] == 0) { if (num_ejec == 1 /*|| num_ejec == 4*/) { if (nflag != 7) { - comienza_sound("s3.als"); + playSound("s3.als"); flags[nflag] = 1; } } else { - comienza_sound("s3.als"); + playSound("s3.als"); flags[nflag] = 1; } - if (n_puerta != NO_DOOR) - puertas_cerradas(n_puerta); + if (doorNum != NO_DOOR) + puertas_cerradas(doorNum); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - fin_sound(); + stopSound(); withoutVerb(); } } @@ -4631,15 +4631,15 @@ void DrasculaEngine::activa_pendulo() { conta_ciego_vez = vez(); } -void DrasculaEngine::cierra_puerta(int nflag, int n_puerta) { +void DrasculaEngine::closeDoor(int nflag, int doorNum) { if (flags[nflag] == 1) { - comienza_sound("s4.als"); + playSound("s4.als"); flags[nflag] = 0; - if (n_puerta != NO_DOOR) - puertas_cerradas(n_puerta); + if (doorNum != NO_DOOR) + puertas_cerradas(doorNum); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - fin_sound(); + stopSound(); withoutVerb(); } } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 39e7fb2b78..b015074172 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -406,7 +406,7 @@ public: void pon_vb(); void lleva_vb(int punto_x); void hipo_sin_nadie(int counter); - void openDoor(int nflag, int n_puerta); + void openDoor(int nflag, int doorNum); void mapa(); void animation_1_1(); void animation_2_1(); @@ -517,9 +517,9 @@ public: char LimitaVGA(char valor); void color_abc(int cl); void centra_texto(const char *,int,int); - void comienza_sound(const char *); + void playSound(const char *); bool anima(const char *animation, int FPS); - void fin_sound_corte(); + void stopSound_corte(); void FundeAlNegro(int VelocidadDeFundido); void pause(int); void talk_dr_grande(const char *said, const char *filename); @@ -536,20 +536,20 @@ public: void talk_igorpuerta(const char *said, const char *filename); void talk_igor_peluca(const char *said, const char *filename); void hipo(int); - void fin_sound(); + void stopSound(); void talk_bj(const char *, const char *); void talk_baul(const char *said, const char *filename); void talk(int); void talk(const char *, const char *); void talk_sinc(const char *, const char *, const char *); - void cierra_puerta(int nflag, int n_puerta); + void closeDoor(int nflag, int doorNum); void playMusic(int p); void stopMusic(); int musicStatus(); void updateRoom(); bool carga_partida(const char *); void puertas_cerradas(int); - void animafin_sound_corte(); + void animastopSound_corte(); void color_hare(); void funde_hare(int oscuridad); void paleta_hare_claro(); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 6098e5fba6..f97c31566b 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -357,7 +357,7 @@ void DrasculaEngine::room_6(int fl){ else if (objeto_que_lleva == OPEN && fl == 138) openDoor(0, 1); else if (objeto_que_lleva == CLOSE && fl == 138) - cierra_puerta(0, 1); + closeDoor(0, 1); else if (objeto_que_lleva == TALK && fl == 138) talk(6); else if (objeto_que_lleva == LOOK && fl == 143) @@ -372,11 +372,11 @@ void DrasculaEngine::room_6(int fl){ copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, dir_dibujo3, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(10); - comienza_sound("s3.als"); + playSound("s3.als"); flags[2] = 1; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - fin_sound(); + stopSound(); } else if (objeto_que_lleva == CLOSE && fl == 143 && flags[2] == 1) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); flags[2] = 0; @@ -384,10 +384,10 @@ void DrasculaEngine::room_6(int fl){ copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, dir_dibujo3, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(5); - comienza_sound("s4.als"); + playSound("s4.als"); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - fin_sound(); + stopSound(); } else if (objeto_que_lleva == TALK && fl == 143) talk(38); else if (objeto_que_lleva == LOOK && fl == 139) @@ -398,13 +398,13 @@ void DrasculaEngine::room_6(int fl){ copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, dir_dibujo3, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(19); - comienza_sound("s3.als"); + playSound("s3.als"); flags[1] = 1; visible[4] = 1; visible[2] = 0; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - fin_sound(); + stopSound(); } else if (objeto_que_lleva == LOOK && fl == 140) talk(147); else if (objeto_que_lleva == PICK && fl == 140) { @@ -487,7 +487,7 @@ void DrasculaEngine::room_12(int fl){ else if (objeto_que_lleva == OPEN && fl == 156) openDoor(16, 4); else if (objeto_que_lleva == CLOSE && fl == 156) - cierra_puerta(16, 4); + closeDoor(16, 4); else hay_respuesta = 0; } @@ -560,8 +560,8 @@ void DrasculaEngine::room_15(int fl) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); copyRect(133, 135, hare_x + 6, hare_y, 39, 63, dir_dibujo3, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - comienza_sound("s8.als"); - fin_sound(); + playSound("s8.als"); + stopSound(); talk(_text[_lang][338], "338.als"); flags[27] = 0; pickObject(19); @@ -592,7 +592,7 @@ void DrasculaEngine::room_16(int fl) { else if (objeto_que_lleva == OPEN && fl == 163) openDoor(17, 0); else if (objeto_que_lleva == CLOSE && fl == 163) - cierra_puerta(17, 0); + closeDoor(17, 0); else if (objeto_que_lleva == LOOK && fl == 183) talk(_text[_lang][340], "340.als"); else if (objeto_que_lleva == TALK && fl == 183) { @@ -612,7 +612,7 @@ void DrasculaEngine::room_16(int fl) { pickObject(22); } } else if (objeto_que_lleva == CLOSE && fl == 183) - cierra_puerta(19, NO_DOOR); + closeDoor(19, NO_DOOR); else if (objeto_que_lleva == LOOK && fl == 185) talk(_text[_lang][37], "37.als"); else if (objeto_que_lleva == PICK && fl == 185) @@ -647,7 +647,7 @@ void DrasculaEngine::room_17(int fl) { else if (objeto_que_lleva == OPEN && fl == 177 && flags[14] == 1) openDoor(15, 1); else if (objeto_que_lleva == CLOSE && fl == 177 && flags[14] == 1) - cierra_puerta(15, 1); + closeDoor(15, 1); else if (objeto_que_lleva == 11 && fl == 50 && flags[22] == 0) { talk(_text[_lang][347], "347.als"); flags[29] = 1; @@ -727,7 +727,7 @@ bool DrasculaEngine::room_21(int fl) { else if (objeto_que_lleva == OPEN && fl == 101 && flags[28] == 1) openDoor(0, 1); else if (objeto_que_lleva == CLOSE && fl == 101) - cierra_puerta(0, 1); + closeDoor(0, 1); else if(objeto_que_lleva == PICK && fl == 141) { pickObject(19); visible[2] = 0; @@ -755,9 +755,9 @@ void DrasculaEngine::room_22(int fl) { } else if (objeto_que_lleva == 22 && fl == 52) { anima("up.bin",14); flags[26]=1; - comienza_sound("s1.als"); + playSound("s1.als"); hipo(14); - fin_sound(); + stopSound(); withoutVerb(); resta_objeto(22); updateData(); @@ -783,12 +783,12 @@ void DrasculaEngine::room_23(int fl) { openDoor(0, 0); updateData(); } else if(objeto_que_lleva == CLOSE && fl == 103) { - cierra_puerta(0, 0); + closeDoor(0, 0); updateData(); } else if(objeto_que_lleva == OPEN && fl == 104) openDoor(1, 1); else if(objeto_que_lleva == CLOSE && fl == 104) - cierra_puerta(1, 1); + closeDoor(1, 1); else if(objeto_que_lleva == PICK && fl == 142) { pickObject(8); visible[2] = 0; @@ -805,11 +805,11 @@ void DrasculaEngine::room_24(int fl) { if (objeto_que_lleva == OPEN && fl == 105) openDoor(1, 0); else if (objeto_que_lleva == CLOSE && fl == 105) - cierra_puerta(1, 0); + closeDoor(1, 0); else if (objeto_que_lleva == OPEN && fl == 106) openDoor(2, 1); else if (objeto_que_lleva == CLOSE && fl == 106) - cierra_puerta(2, 1); + closeDoor(2, 1); else if (objeto_que_lleva == LOOK && fl == 151) talk(_text[_lang][461], "461.als"); else @@ -822,7 +822,7 @@ void DrasculaEngine::room_26(int fl) { else if (objeto_que_lleva == OPEN && fl == 107 && flags[30] == 1) talk(_text[_lang][421], "421.als"); else if (objeto_que_lleva == CLOSE && fl == 107) - cierra_puerta(2, 0); + closeDoor(2, 0); else if (objeto_que_lleva == 10 && fl == 50 && flags[18] == 1 && flags[12] == 1) animation_5_4(); else if (objeto_que_lleva == 8 && fl == 50 && flags[18] == 1 && flags[12] == 1) @@ -836,7 +836,7 @@ void DrasculaEngine::room_26(int fl) { pickObject(10); visible[1] = 0; flags[12] = 1; - cierra_puerta(2, 0); + closeDoor(2, 0); sentido_hare = 2; talk_igorpuerta(_texti[_lang][27], "I27.als"); flags[30] = 1; @@ -875,7 +875,7 @@ void DrasculaEngine::room_27(int fl) { if (objeto_que_lleva == OPEN && fl == 110) openDoor(6, 1); else if (objeto_que_lleva == CLOSE && fl == 110) - cierra_puerta(6, 1); + closeDoor(6, 1); else if (objeto_que_lleva == OPEN && fl == 116 && flags[23] == 0) talk(_text[_lang][419], "419.als"); else if (objeto_que_lleva == OPEN && fl == 116 && flags[23] == 1) @@ -896,7 +896,7 @@ void DrasculaEngine::room_29(int fl) { if (objeto_que_lleva == OPEN && fl == 114) openDoor(4, 1); else if (objeto_que_lleva == CLOSE && fl == 114) - cierra_puerta(4, 1); + closeDoor(4, 1); else if (objeto_que_lleva == LOOK && fl == 152) talk(_text[_lang][463], "463.als"); else if (objeto_que_lleva == OPEN && fl == 152) @@ -915,7 +915,7 @@ void DrasculaEngine::room_30(int fl) { if (objeto_que_lleva == OPEN && fl == 115) openDoor(4, 0); else if (objeto_que_lleva == CLOSE && fl == 115) - cierra_puerta(4, 0); + closeDoor(4, 0); else if (objeto_que_lleva == OPEN && fl == 144 && flags[19] == 0) talk(_text[_lang][422], "422.als"); else if (objeto_que_lleva == OPEN && fl == 144 && flags[19] == 1 && flags[22] == 1) @@ -930,7 +930,7 @@ void DrasculaEngine::room_30(int fl) { if (flags[18] == 1) animation_6_4(); } else if (objeto_que_lleva == CLOSE && fl == 144) - cierra_puerta(16, 1); + closeDoor(16, 1); else if (objeto_que_lleva == 13 && fl == 144) { talk(_text[_lang][424], "424.als"); flags[19] = 1; @@ -950,7 +950,7 @@ void DrasculaEngine::room_31(int fl) { } else if (objeto_que_lleva == OPEN && fl == 117) openDoor(5, 0); else if (objeto_que_lleva == CLOSE && fl == 117) - cierra_puerta(5, 0); + closeDoor(5, 0); else if (objeto_que_lleva == LOOK && fl == 161) talk(_text[_lang][470], "470.als"); else if (objeto_que_lleva == OPEN && fl == 161) @@ -975,7 +975,7 @@ void DrasculaEngine::room_34(int fl) { pickObject(14); flags[25] = 1; } else if (objeto_que_lleva == CLOSE && fl == 120) - cierra_puerta(8, 2); + closeDoor(8, 2); else hay_respuesta=0; } @@ -1110,9 +1110,9 @@ void DrasculaEngine::room_55(int fl) { else if (objeto_que_lleva == LOOK && fl == 205) talk(_text[_lang][140], "140.als"); else if (fl == 206) { - comienza_sound("s11.als"); + playSound("s11.als"); anima("det.bin", 17); - fin_sound(); + stopSound(); lleva_al_hare(hare_x - 3, hare_y + alto_hare + 6); } else hay_respuesta = 0; @@ -1156,18 +1156,18 @@ void DrasculaEngine::room_59(int fl) { talk(_text[_lang][265], "265.als"); flags[9] = 0; if (flags[11] == 0) { - comienza_sound("s12.als"); + playSound("s12.als"); delay(40); - fin_sound(); + stopSound(); delay(10); lleva_al_hare(174, 168); sentido_hare = 2; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(40); - comienza_sound("s12.als"); + playSound("s12.als"); pause(19); - fin_sound_corte(); + stopSound_corte(); hare_se_ve = 0; updateRoom(); copyRect(101, 34, hare_x - 4, hare_y - 1, 37, 70, dir_dibujo3, dir_zona_pantalla); -- cgit v1.2.3 From afd44c95d98f6fdaf522fe2aa6292894ca8481a4 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 27 May 2008 07:45:13 +0000 Subject: Changed roomParse to accept an array directly and rewrote some more room logic svn-id: r32315 --- engines/drascula/drascula.h | 3 +- engines/drascula/rooms.cpp | 175 +++++++++++++++++++++----------------------- 2 files changed, 84 insertions(+), 94 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index b015074172..e7efe66d69 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -59,6 +59,7 @@ enum Languages { #define TEXTD_START 68 struct DrasculaGameDescription; +struct RoomTalkAction; #define NUM_SAVES 10 #define NUM_FLAGS 50 @@ -616,7 +617,7 @@ public: void aumenta_num_frame(); int sobre_que_objeto(); bool comprueba_banderas_menu(); - bool roomParse(int, int); + bool roomParse(RoomTalkAction*, int); void room_0(); void room_1(int); void room_2(int); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index f97c31566b..617c39cef4 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -81,28 +81,86 @@ RoomTalkAction room0Actions[] = { }; RoomTalkAction room1Actions[] = { + // num action object speech { -1, PICK, 118, 5 }, { -1, OPEN, 118, 3 }, { -1, CLOSE, 118, 4 }, { -1, TALK, 118, 6 }, + // ------------------------------- { -1, LOOK, 119, 8 }, { -1, MOVE, 119, 13 }, { -1, CLOSE, 119, 10 }, { -1, TALK, 119, 12 }, + // ------------------------------- { -1, MOVE, 120, 13 }, { -1, OPEN, 120, 18 }, { -1, TALK, 120, 15 } }; -bool DrasculaEngine::roomParse(int roomNo, int fl) { - // TODO: find a better way to assign room actions - RoomTalkAction *roomActions = 0; - bool didAction = false; +RoomTalkAction room3Actions[] = { + // num action object speech + { -1, LOOK, 129, 21 }, + { -1, PICK, 129, 5 }, + { -1, MOVE, 129, 24 }, + { -1, OPEN, 129, 22 }, + { -1, CLOSE, 129, 10 }, + // ------------------------------- + { -1, LOOK, 131, 27 }, + { -1, PICK, 131, 5 }, + { -1, MOVE, 131, 24 }, + { -1, OPEN, 131, 22 }, + { -1, CLOSE, 131, 10 }, + { -1, TALK, 131, 23 }, + // ------------------------------- + { -1, LOOK, 132, 28 }, + { -1, PICK, 132, 5 }, + { -1, MOVE, 132, 24 }, + { -1, OPEN, 132, 22 }, + { -1, CLOSE, 132, 10 }, + { -1, TALK, 132, 23 }, + // ------------------------------- + { -1, LOOK, 133, 321 }, + { -1, PICK, 133, 31 }, + { -1, MOVE, 133, 34 }, + { -1, OPEN, 133, 30 }, + { -1, CLOSE, 133, 10 }, + // ------------------------------- + { -1, LOOK, 166, 55 }, + { -1, PICK, 166, 7 }, + // ------------------------------- + { -1, LOOK, 211, 184 } +}; - if (roomNo == 0) - roomActions = room0Actions; - else if (roomNo == 1) - roomActions = room1Actions; +RoomTalkAction room4Actions[] = { + // num action object speech + { -1, LOOK, 189, 182 }, + // ------------------------------- + { -1, LOOK, 207, 175 }, + { -1, TALK, 207, 176 }, + // ------------------------------- + { -1, LOOK, 208, 177 }, + // ------------------------------- + { -1, LOOK, 209, 179 }, + // ------------------------------- + { -1, LOOK, 210, 180 }, + { -1, OPEN, 210, 181 } +}; + +RoomTalkAction room12Actions[] = { + // num action object speech + { -1, LOOK, 154, 329 }, + { -1, TALK, 154, 330 }, + // ------------------------------- + { -1, MOVE, 155, 48 }, + { -1, TALK, 155, 331 }, + // ------------------------------- + { -1, LOOK, 156, 35 }, + { -1, MOVE, 156, 48 }, + { -1, TALK, 156, 50 }, +}; + +bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { + bool didAction = false; for (int i = 0; i < ARRAYSIZE(roomActions); i++) { if (roomActions[i].num == num_ejec || @@ -123,7 +181,7 @@ bool DrasculaEngine::roomParse(int roomNo, int fl) { } void DrasculaEngine::room_0() { - if (roomParse(0, -1)) + if (roomParse(room0Actions, -1)) return; // non-default actions @@ -199,7 +257,7 @@ void DrasculaEngine::room_0() { } void DrasculaEngine::room_1(int fl) { - if (roomParse(1, fl)) + if (roomParse(room1Actions, fl)) return; if (objeto_que_lleva == LOOK && fl == 118) { @@ -213,55 +271,14 @@ void DrasculaEngine::room_1(int fl) { } void DrasculaEngine::room_3(int fl) { - if (objeto_que_lleva == LOOK && fl == 129) - talk(21); - else if (objeto_que_lleva == PICK && fl == 129) - talk(5); - else if (objeto_que_lleva == MOVE && fl == 129) - talk(24); - else if (objeto_que_lleva == OPEN && fl == 129) - talk(22); - else if (objeto_que_lleva == CLOSE && fl == 129) - talk(10); - else if (objeto_que_lleva == TALK && fl == 129) { + if (roomParse(room3Actions, fl)) + return; + + if (objeto_que_lleva == TALK && fl == 129) { talk(23); pause(6); talk_sinc(_text[_lang][50], "50.als", "11111111111144432554433"); - } else if (objeto_que_lleva == LOOK && fl == 131) - talk(27); - else if (objeto_que_lleva == PICK && fl == 131) - talk(5); - else if (objeto_que_lleva == MOVE && fl == 131) - talk(24); - else if (objeto_que_lleva == OPEN && fl == 131) - talk(22); - else if (objeto_que_lleva == CLOSE && fl == 131) - talk(10); - else if (objeto_que_lleva == TALK && fl == 131) - talk(23); - else if (objeto_que_lleva == LOOK && fl == 132) - talk(28); - else if (objeto_que_lleva == PICK && fl == 132) - talk(5); - else if (objeto_que_lleva == MOVE && fl == 132) - talk(24); - else if (objeto_que_lleva == OPEN && fl == 132) - talk(22); - else if (objeto_que_lleva == CLOSE && fl == 132) - talk(10); - else if (objeto_que_lleva == TALK && fl == 132) - talk(23); - else if (objeto_que_lleva == LOOK && fl == 133) - talk(321); - else if (objeto_que_lleva == PICK && fl == 133) - talk(31); - else if (objeto_que_lleva == MOVE && fl == 133) - talk(34); - else if (objeto_que_lleva == OPEN && fl == 133) - talk(30); - else if (objeto_que_lleva == CLOSE && fl == 133) - talk(10); - else if (objeto_que_lleva == TALK && fl == 133) { + } else if (objeto_que_lleva == TALK && fl == 133) { talk_sinc(_text[_lang][322], "322.als", "13333334125433333333"); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -280,17 +297,11 @@ void DrasculaEngine::room_3(int fl) { pickObject(10); flags[3] = 1; visible[8] = 0; - } else if (objeto_que_lleva == LOOK && fl == 166) - talk(55); - else if (objeto_que_lleva == PICK && fl == 166) - talk(7); - else if (objeto_que_lleva == 14 && fl == 166 && flags[37] == 0) { + } else if (objeto_que_lleva == 14 && fl == 166 && flags[37] == 0) { animation_7_2(); pickObject(8); } else if (objeto_que_lleva == 14 && fl == 166 && flags[37] == 1) talk(323); - else if (objeto_que_lleva == LOOK && fl == 211) - talk(184); else if (objeto_que_lleva == TALK && fl == 211) { talk(185); talk(186); @@ -299,27 +310,16 @@ void DrasculaEngine::room_3(int fl) { } void DrasculaEngine::room_4(int fl) { + if (roomParse(room4Actions, fl)) + return; + if (objeto_que_lleva == MOVE && fl == 189 && flags[34] == 0) { talk(327); pickObject(13); flags[34] = 1; if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; - } else if (objeto_que_lleva == LOOK && fl == 189) - talk(182); - else if (objeto_que_lleva == LOOK && fl == 207) - talk(175); - else if (objeto_que_lleva == TALK && fl == 207) - talk(176); - else if (objeto_que_lleva == LOOK && fl == 208) - talk(177); - else if (objeto_que_lleva == LOOK && fl == 209) - talk(179); - else if (objeto_que_lleva == LOOK && fl == 210) - talk(180); - else if (objeto_que_lleva == OPEN && fl == 210) - talk(181); - else + } else hay_respuesta = 0; } @@ -470,21 +470,10 @@ void DrasculaEngine::room_9(int fl){ } void DrasculaEngine::room_12(int fl){ - if (objeto_que_lleva == LOOK && fl == 154) - talk(329); - else if (objeto_que_lleva == TALK && fl == 154) - talk(330); - else if (objeto_que_lleva == MOVE && fl == 155) - talk(48); - else if (objeto_que_lleva == TALK && fl == 155) - talk(331); - else if (objeto_que_lleva == LOOK && fl == 156) - talk(35); - else if (objeto_que_lleva == MOVE && fl == 156) - talk(48); - else if (objeto_que_lleva == TALK && fl == 156) - talk(50); - else if (objeto_que_lleva == OPEN && fl == 156) + if (roomParse(room12Actions, fl)) + return; + + if (objeto_que_lleva == OPEN && fl == 156) openDoor(16, 4); else if (objeto_que_lleva == CLOSE && fl == 156) closeDoor(16, 4); -- cgit v1.2.3 From 77f2e18dcf92daa3ae88e27c5bb62f711b5ef7fc Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 27 May 2008 08:01:06 +0000 Subject: Reduce audio buffer size, as indicated on scummvm-devel svn-id: r32316 --- backends/platform/sdl/sdl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 866f5299a0..91adc9b95d 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -403,10 +403,10 @@ bool OSystem_SDL::setSoundCallback(SoundProc proc, void *param) { _samplesPerSec = SAMPLES_PER_SEC; // Determine the sample buffer size. We want it to store enough data for - // about 1/10th of a second. Note that it must be a power of two. + // about 1/64th of a second. Note that it must be a power of two. // So e.g. at 22050 Hz, we request a sample buffer size of 2048. - int samples = 0x8000; - while (10 * samples >= _samplesPerSec) { + int samples = 8192; + while (64 * samples >= _samplesPerSec) { samples >>= 1; } -- cgit v1.2.3 From 7068ec9b7117535edbee26143789b57fd5a1d616 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 27 May 2008 09:03:22 +0000 Subject: Every time strcmp is abused, a baby koala cries... Changed loads of strcmp's to integer comparisons. There might be two possible regressions (marked with a FIXME) in animation_2_1() and animation_9_6(), which need to be tested Also, fixed a silly regression I made in commit #32312 in getLine() svn-id: r32317 --- engines/drascula/animation.cpp | 29 ++++-- engines/drascula/drascula.cpp | 197 +++++++++++++++++++++-------------------- engines/drascula/drascula.h | 3 +- engines/drascula/rooms.cpp | 112 +++++++++++------------ engines/drascula/talk.cpp | 6 +- 5 files changed, 182 insertions(+), 165 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 0ec6845251..562a23a1c2 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -512,7 +512,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - strcpy(num_room, "16.alg"); + roomNumber = 16; if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; @@ -616,7 +616,10 @@ void DrasculaEngine::animation_2_1() { if (anima("rap.bin", 16)) break; sentido_hare = 3; - strcpy(num_room, "no_bj.alg"); + // FIXME: the room number is changed here to "no_bj". Is it + // possible to use loadPic("no_bj.alg") instead? + loadPic("no_bj.alg"); // is this ok? + //strcpy(num_room, "no_bj.alg"); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; pause(8); @@ -1121,7 +1124,9 @@ void DrasculaEngine::animation_16_2() { asco: loadPic(roomDisk); decompressPic(dir_dibujo3, 1); - loadPic(num_room); + char rm[20]; + sprintf(rm, "%i.alg", roomNumber); + loadPic(rm); decompressPic(dir_dibujo1, HALF_PAL); black(); updateRoom(); @@ -2411,7 +2416,12 @@ void DrasculaEngine::animation_9_6() { hare_x = -1; obj_saliendo = 108; carga_escoba("59.ald"); - strcpy(num_room, "nada.alg"); + // FIXME: the room number is changed here to "nada". Not + // sure if this makes any difference, as loadPic is called + // right afterwards. Is it possible to use loadPic("nada.alg") + // instead? + loadPic("nada.alg"); // is this ok? + //strcpy(num_room, "nada.alg"); loadPic("nota2.alg"); decompressPic(dir_dibujo1, HALF_PAL); black(); @@ -3445,10 +3455,9 @@ void DrasculaEngine::animation_5_4(){ } void DrasculaEngine::animation_6_4() { - char room[13]; + int prevRoom = roomNumber; - strcpy(room, num_room); - strcpy(num_room, "26.alg"); + roomNumber = 26; clearRoom(); loadPic("26.alg"); decompressPic(dir_dibujo1, HALF_PAL); @@ -3464,13 +3473,15 @@ void DrasculaEngine::animation_6_4() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(40); talk_igor_frente(_texti[_lang][26], "I26.als"); - strcpy(num_room, room); + roomNumber = prevRoom; clearRoom(); loadPic("96.alg"); decompressPic(dir_hare_frente, 1); loadPic(roomDisk); decompressPic(dir_dibujo3, 1); - loadPic(num_room); + char rm[20]; + sprintf(rm, "%i.alg", roomNumber); + loadPic(rm); decompressPic(dir_dibujo1, HALF_PAL); withoutVerb(); updateRoom(); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 41f6a3fde8..e1af5aca60 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -645,11 +645,11 @@ bucles: } if (num_ejec == 2) { - if ((!strcmp(num_room, "3.alg")) && (hare_x == 279) && (hare_y + alto_hare == 101)) + if (roomNumber == 3 && (hare_x == 279) && (hare_y + alto_hare == 101)) animation_1_2(); - else if ((!strcmp(num_room, "14.alg")) && (hare_x == 214) && (hare_y + alto_hare == 121)) + else if (roomNumber == 14 && (hare_x == 214) && (hare_y + alto_hare == 121)) lleva_al_hare(190, 130); - else if ((!strcmp(num_room, "14.alg")) && (hare_x == 246) && (hare_y + alto_hare == 112)) + else if (roomNumber == 14 && (hare_x == 246) && (hare_y + alto_hare == 112)) lleva_al_hare(190, 130); } @@ -782,7 +782,7 @@ bucles: return false; if (num_ejec != 3) cont_sv = 0; - } else if (num_ejec == 6 && key == Common::KEYCODE_0 && !strcmp(num_room, "61.alg")) { + } else if (num_ejec == 6 && key == Common::KEYCODE_0 && roomNumber == 61) { loadPic("alcbar.alg"); decompressPic(dir_dibujo1, 255); } else if (cont_sv == 1500) { @@ -883,8 +883,10 @@ static char *getLine(Common::File *fp, char *buf, int len) { b = buf; while (!fp->eos()) { c = ~fp->readByte(); - if (c == '\r' || c == '\n' || b - buf >= (len - 1)) + if (c == '\r') continue; + if (c == '\n' || b - buf >= (len - 1)) + break; *b++ = c; } *b = '\0'; @@ -915,8 +917,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { } int size = ald->size(); getLine(ald, buffer, size); - sscanf(buffer, "%s", num_room); - strcat(num_room, ".alg"); + roomNumber = atoi(buffer); getLine(ald, buffer, size); sscanf(buffer, "%d", &roomMusic); @@ -1053,7 +1054,9 @@ martini: loadPic(roomDisk); decompressPic(dir_dibujo3, 1); - loadPic(num_room); + char rm[20]; + sprintf(rm, "%i.alg", roomNumber); + loadPic(rm); decompressPic(dir_dibujo1, HALF_PAL); copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_dibujo3); @@ -1085,14 +1088,14 @@ martini: } } - if (!strcmp(num_room, "24.alg")) { + if (roomNumber == 24) { for (l = suelo_y1 - 1; l > 74; l--) { factor_red[l] = (int)(far - pequegnez); pequegnez = pequegnez + chiquez; } } - if (num_ejec == 5 && !strcmp(num_room, "54.alg")) { + if (num_ejec == 5 && roomNumber == 54) { for (l = suelo_y1 - 1; l > 84; l--) { factor_red[l] = (int)(far - pequegnez); pequegnez = pequegnez + chiquez; @@ -1130,13 +1133,13 @@ martini: isDoor[7] = 0; if (num_ejec == 2) { - if (!strcmp(num_room, "14.alg") && flags[39] == 1) + if (roomNumber == 14 && flags[39] == 1) roomMusic = 16; - else if (!strcmp(num_room, "15.alg") && flags[39] == 1) + else if (roomNumber == 15 && flags[39] == 1) roomMusic = 16; - if (!strcmp(num_room, "14.alg") && flags[5] == 1) + if (roomNumber == 14 && flags[5] == 1) roomMusic = 0; - else if (!strcmp(num_room, "15.alg") && flags[5] == 1) + else if (roomNumber == 15 && flags[5] == 1) roomMusic = 0; if (previousMusic != roomMusic && roomMusic != 0) @@ -1149,21 +1152,21 @@ martini: } if (num_ejec == 2) { - if ((!strcmp(num_room, "9.alg")) || (strcmp(num_room, "2.alg")) || (!strcmp(num_room, "14.alg")) || (!strcmp(num_room, "18.alg"))) + if (roomNumber == 9 || roomNumber == 2 || roomNumber == 14 || roomNumber == 18) conta_ciego_vez = vez(); } if (num_ejec == 4) { - if (!strcmp(num_room, "26.alg")) + if (roomNumber == 26) conta_ciego_vez = vez(); } - if (num_ejec == 4 && !strcmp(num_room, "24.alg") && flags[29] == 1) + if (num_ejec == 4 && roomNumber == 24 && flags[29] == 1) animation_7_4(); if (num_ejec == 5) { - if (!strcmp(num_room, "45.alg")) + if (roomNumber == 45) hare_se_ve = 0; - if (!strcmp(num_room, "49.alg") && flags[7] == 0) + if (roomNumber == 49 && flags[7] == 0) animation_4_5(); } @@ -1626,7 +1629,9 @@ bool DrasculaEngine::saves() { } clearRoom(); - loadPic(num_room); + char rm[20]; + sprintf(rm, "%i.alg", roomNumber); + loadPic(rm); decompressPic(dir_dibujo1, HALF_PAL); hay_seleccion = 0; @@ -1963,7 +1968,9 @@ void DrasculaEngine::salva_pantallas() { free(copia); free(ghost); - loadPic(num_room); + char rm[20]; + sprintf(rm, "%i.alg", roomNumber); + loadPic(rm); decompressPic(dir_dibujo1, HALF_PAL); } @@ -2063,10 +2070,7 @@ void DrasculaEngine::centra_texto(const char *mensaje, int x_texto, int y_texto) ya = 1; strcpy(m1, mensaje); - if (x_texto < 60) - x_texto = 60; - if (x_texto > 255) - x_texto = 255; + x_texto = CLIP(x_texto, 60, 255); x_texto1 = x_texto; @@ -3109,9 +3113,9 @@ bool DrasculaEngine::banderas(int fl) { talk(_text[_lang][313], "313.als"); else if (objeto_que_lleva == TALK && fl == 50) talk(_text[_lang][314], "314.als"); - else if (!strcmp(num_room, "62.alg")) + else if (roomNumber == 62) room_62(fl); - else if (!strcmp(num_room, "63.alg")) + else if (roomNumber == 63) room_63(fl); else hay_respuesta = 0; @@ -3128,41 +3132,42 @@ bool DrasculaEngine::banderas(int fl) { talk(_text[_lang][313], "313.als"); else if (objeto_que_lleva == TALK && fl == 50) talk(_text[_lang][314], "314.als"); - else if (objeto_que_lleva == 11 && fl == 50 && flags[22] == 0 && strcmp(num_room, "18.alg")) + // Note: the original check was strcmp(num_room, "18.alg") + else if (objeto_que_lleva == 11 && fl == 50 && flags[22] == 0 && roomNumber != 18) talk(_text[_lang][315], "315.als"); else if (objeto_que_lleva == 13 && fl == 50) talk(_text[_lang][156], "156.als"); else if (objeto_que_lleva == 20 && fl == 50) talk(_text[_lang][163], "163.als"); - else if (!strcmp(num_room, "1.alg")) + else if (roomNumber == 1) room_1(fl); - else if (!strcmp(num_room, "3.alg")) + else if (roomNumber == 3) room_3(fl); - else if (!strcmp(num_room, "4.alg")) + else if (roomNumber == 4) room_4(fl); - else if (!strcmp(num_room, "5.alg")) + else if (roomNumber == 5) room_5(fl); - else if (!strcmp(num_room, "6.alg")) + else if (roomNumber == 6) room_6(fl); - else if (!strcmp(num_room, "7.alg")) + else if (roomNumber == 7) room_7(fl); - else if (!strcmp(num_room, "8.alg")) + else if (roomNumber == 8) room_8(fl); - else if (!strcmp(num_room, "9.alg")) + else if (roomNumber == 9) room_9(fl); - else if (!strcmp(num_room, "12.alg")) + else if (roomNumber == 12) room_12(fl); - else if (!strcmp(num_room, "14.alg")) + else if (roomNumber == 14) room_14(fl); - else if (!strcmp(num_room, "15.alg")) + else if (roomNumber == 15) room_15(fl); - else if (!strcmp(num_room, "16.alg")) + else if (roomNumber == 16) room_16(fl); - else if (!strcmp(num_room, "17.alg")) + else if (roomNumber == 17) room_17(fl); - else if (!strcmp(num_room, "18.alg")) + else if (roomNumber == 18) room_18(fl); - else if (!strcmp(num_room, "19.alg")) + else if (roomNumber == 19) room_19(fl); else hay_respuesta = 0; @@ -3179,13 +3184,13 @@ bool DrasculaEngine::banderas(int fl) { talk(_text[_lang][313], "313.als"); else if (objeto_que_lleva == TALK && fl == 50) talk(_text[_lang][314], "314.als"); - else if (!strcmp(num_room, "13.alg")) { + else if (roomNumber == 13) { if (room_13(fl)) return true; } else hay_respuesta = 0; } else if (num_ejec == 4) { - if (!strcmp(num_room, "28.alg")) + if (roomNumber == 28) talk(_text[_lang][178], "178.als"); else if (objeto_que_lleva == LOOK && fl == 50) talk(_text[_lang][309], "309.als"); @@ -3207,30 +3212,30 @@ bool DrasculaEngine::banderas(int fl) { talk(_text[_lang][487], "487.als"); else if (objeto_que_lleva == 20 && fl == 50) talk(_text[_lang][487], "487.als"); - else if (!strcmp(num_room, "21.alg")) { + else if (roomNumber == 21) { if (room_21(fl)) return true; - } else if (!strcmp(num_room, "22.alg")) + } else if (roomNumber == 22) room_22(fl); - else if (!strcmp(num_room, "23.alg")) + else if (roomNumber == 23) room_23(fl); - else if (!strcmp(num_room, "24.alg")) + else if (roomNumber == 24) room_24(fl); - else if (!strcmp(num_room, "26.alg")) + else if (roomNumber == 26) room_26(fl); - else if (!strcmp(num_room, "27.alg")) + else if (roomNumber == 27) room_27(fl); - else if (!strcmp(num_room, "29.alg")) + else if (roomNumber == 29) room_29(fl); - else if (!strcmp(num_room, "30.alg")) + else if (roomNumber == 30) room_30(fl); - else if (!strcmp(num_room, "31.alg")) + else if (roomNumber == 31) room_31(fl); - else if (!strcmp(num_room, "34.alg")) + else if (roomNumber == 34) room_34(fl); - else if (!strcmp(num_room, "35.alg")) + else if (roomNumber == 35) room_35(fl); - else if (!strcmp(num_room, "44.alg")) + else if (roomNumber == 44) room_44(fl); else hay_respuesta = 0; @@ -3249,15 +3254,15 @@ bool DrasculaEngine::banderas(int fl) { talk("hola yo", "16.als"); else if (objeto_que_lleva == 20 && fl == 50) talk(_text[_lang][487], "487.als"); - else if (!strcmp(num_room, "49.alg")) + else if (roomNumber == 49) room_49(fl); - else if (!strcmp(num_room, "53.alg")) + else if (roomNumber == 53) room_53(fl); - else if (!strcmp(num_room, "54.alg")) + else if (roomNumber == 54) room_54(fl); - else if (!strcmp(num_room, "55.alg")) + else if (roomNumber == 55) room_55(fl); - else if (!strcmp(num_room, "56.alg")) { + else if (roomNumber == 56) { if (room_56(fl)) return true; } else @@ -3277,16 +3282,16 @@ bool DrasculaEngine::banderas(int fl) { talk(_text[_lang][313], "313.als" ); else if (objeto_que_lleva == TALK && fl == 50) talk(_text[_lang][314], "314.als" ); - else if (!strcmp(num_room, "102.alg")) + else if (roomNumber == 102) room_pendulo(fl); - else if (!strcmp(num_room, "58.alg")) + else if (roomNumber == 58) room_58(fl); - else if (!strcmp(num_room, "59.alg")) + else if (roomNumber == 59) room_59(fl); - else if (!strcmp(num_room, "60.alg")) { + else if (roomNumber == 60) { if (room_60(fl)) return true; - } else if (!strcmp(num_room, "61.alg")) + } else if (roomNumber == 61) room_61(fl); else hay_respuesta = 0; @@ -4350,69 +4355,69 @@ void DrasculaEngine::updateData() { if (num_ejec == 1) { // nothing } else if (num_ejec == 2) { - if (!strcmp(num_room,"2.alg") && flags[40] == 0) + if (roomNumber == 2 && flags[40] == 0) visible[3] = 0; - else if (!strcmp(num_room, "3.alg") && flags[3] == 1) + else if (roomNumber == 3 && flags[3] == 1) visible[8] = 0; - else if (!strcmp(num_room, "6.alg") && flags[1] == 1 && flags[10] == 0) { + else if (roomNumber == 6 && flags[1] == 1 && flags[10] == 0) { visible[2] = 0; visible[4] = 1; - } else if (!strcmp(num_room, "7.alg") && flags[35] == 1) + } else if (roomNumber == 7 && flags[35] == 1) visible[3] = 0; - else if (!strcmp(num_room, "14.alg") && flags[5] == 1) + else if (roomNumber == 14 && flags[5] == 1) visible[4] = 0; - else if (!strcmp(num_room, "18.alg") && flags[28] == 1) + else if (roomNumber == 18 && flags[28] == 1) visible[2] = 0; } else if (num_ejec == 3) { // nothing } else if (num_ejec == 4) { - if (!strcmp(num_room, "23.alg") && flags[0] == 0 && flags[11] == 0) + if (roomNumber == 23 && flags[0] == 0 && flags[11] == 0) visible[2] = 1; - if (!strcmp(num_room, "23.alg") && flags[0] == 1 && flags[11] == 0) + if (roomNumber == 23 && flags[0] == 1 && flags[11] == 0) visible[2] = 0; - if (!strcmp(num_room, "21.alg") && flags[10] == 1) + if (roomNumber == 21 && flags[10] == 1) visible[2] = 0; - if (!strcmp(num_room, "22.alg") && flags[26] == 1) { + if (roomNumber == 22 && flags[26] == 1) { visible[2] = 0; visible[1] = 1; } - if (!strcmp(num_room, "22.alg") && flags[27] == 1) + if (roomNumber == 22 && flags[27] == 1) visible[3] = 0; - if (!strcmp(num_room, "26.alg") && flags[21] == 0) + if (roomNumber == 26 && flags[21] == 0) strcpy(objName[2], _textmisc[_lang][0]); - if (!strcmp(num_room, "26.alg") && flags[18] == 1) + if (roomNumber == 26 && flags[18] == 1) visible[2] = 0; - if (!strcmp(num_room, "26.alg") && flags[12] == 1) + if (roomNumber == 26 && flags[12] == 1) visible[1] = 0; - if (!strcmp(num_room, "35.alg") && flags[14] == 1) + if (roomNumber == 35 && flags[14] == 1) visible[2] = 0; - if (!strcmp(num_room, "35.alg") && flags[17] == 1) + if (roomNumber == 35 && flags[17] == 1) visible[3] = 1; - if (!strcmp(num_room, "35.alg") && flags[15] == 1) + if (roomNumber == 35 && flags[15] == 1) visible[1] = 0; } else if (num_ejec == 5) { - if (!strcmp(num_room,"49.alg") && flags[6] == 1) + if (roomNumber == 49 && flags[6] == 1) visible[2] = 0; - if (!strcmp(num_room,"49.alg") && flags[6] == 0) + if (roomNumber == 49 && flags[6] == 0) visible[1] = 0; - if (!strcmp(num_room,"49.alg") && flags[6] == 1) + if (roomNumber == 49 && flags[6] == 1) visible[1] = 1; - if (!strcmp(num_room,"45.alg") && flags[6] == 1) + if (roomNumber == 45 && flags[6] == 1) visible[3] = 1; - if (!strcmp(num_room,"53.alg") && flags[2] == 1) + if (roomNumber == 53 && flags[2] == 1) visible[3] = 0; - if (!strcmp(num_room,"54.alg") && flags[13] == 1) + if (roomNumber == 54 && flags[13] == 1) visible[3] = 0; - if (!strcmp(num_room,"55.alg") && flags[8] == 1) + if (roomNumber == 55 && flags[8] == 1) visible[1] = 0; } else if (num_ejec == 6) { - if ((!strcmp(num_room, "58.alg")) && flags[8] == 0) + if (roomNumber == 58 && flags[8] == 0) isDoor[1] = 0; - if ((!strcmp(num_room, "58.alg")) && flags[8] == 1) + if (roomNumber == 58 && flags[8] == 1) isDoor[1] = 1; - if (!strcmp(num_room, "59.alg")) + if (roomNumber == 59) isDoor[1] = 0; - if (!strcmp(num_room, "60.alg")) { + if (roomNumber == 60) { sentido_dr = 0; x_dr = 155; y_dr = 69; @@ -4616,7 +4621,7 @@ bucless: void DrasculaEngine::activa_pendulo() { flags[1] = 2; hare_se_ve = 0; - strcpy(num_room, "102.alg"); + roomNumber = 102; loadPic("102.alg"); decompressPic(dir_dibujo1, HALF_PAL); loadPic("an_p1.alg"); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index e7efe66d69..574e12c389 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -324,7 +324,8 @@ public: int hay_sb; int nivel_osc, previousMusic, roomMusic; - char num_room[20], roomDisk[20]; + int roomNumber; + char roomDisk[20]; char currentData[20]; int numRoomObjs; char fondo_y_menu[20]; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 617c39cef4..9730874fea 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1314,133 +1314,133 @@ void DrasculaEngine::room_pendulo(int fl) { void DrasculaEngine::updateRefresh() { if (num_ejec == 1) { - if (!strcmp(num_room, "63.alg")) + if (roomNumber == 63) update_63(); - else if (!strcmp(num_room, "62.alg")) + else if (roomNumber == 62) update_62(); } else if (num_ejec == 2) { - if (!strcmp(num_room, "3.alg")) + if (roomNumber == 3) update_3(); - else if (!strcmp(num_room, "2.alg")) + else if (roomNumber == 2) update_2(); - else if (!strcmp(num_room, "4.alg")) + else if (roomNumber == 4) update_4(); - else if (!strcmp(num_room, "5.alg")) + else if (roomNumber == 5) update_5(); - else if (!strcmp(num_room, "15.alg")) + else if (roomNumber == 15) update_15(); - else if (!strcmp(num_room, "17.alg")) + else if (roomNumber == 17) update_17(); - else if (!strcmp(num_room, "18.alg")) + else if (roomNumber == 18) update_18(); - else if (!strcmp(num_room, "10.alg")) + else if (roomNumber == 10) mapa(); } else if (num_ejec == 3) { - if (!strcmp(num_room, "20.alg")) + if (roomNumber == 20) update_20(); - else if (!strcmp(num_room, "13.alg")) + else if (roomNumber == 13) update_13(); } else if (num_ejec == 4) { - if (!strcmp(num_room, "29.alg")) + if (roomNumber == 29) update_29(); - else if (!strcmp(num_room, "26.alg")) + else if (roomNumber == 26) update_26(); - else if (!strcmp(num_room, "27.alg")) + else if (roomNumber == 27) update_27(); - else if (!strcmp(num_room, "31.alg")) + else if (roomNumber == 31) update_31(); - else if (!strcmp(num_room, "34.alg")) + else if (roomNumber == 34) update_34(); - else if (!strcmp(num_room, "35.alg")) + else if (roomNumber == 35) update_35(); } else if (num_ejec == 5) { - if (!strcmp(num_room, "45.alg")) + if (roomNumber == 45) mapa(); - else if (!strcmp(num_room, "50.alg")) + else if (roomNumber == 50) update_50(); - else if (!strcmp(num_room, "57.alg")) + else if (roomNumber == 57) update_57(); } else if (num_ejec == 6) { - if (!strcmp(num_room, "60.alg")) + if (roomNumber == 60) update_60(); - else if (!strcmp(num_room, "61.alg")) + else if (roomNumber == 61) update_61(); - else if (!strcmp(num_room, "58.alg")) + else if (roomNumber == 58) update_58(); } } void DrasculaEngine::updateRefresh_pre() { if (num_ejec == 1) { - if (!strcmp(num_room, "62.alg")) + if (roomNumber == 62) update_62_pre(); - else if (!strcmp(num_room, "16.alg")) + else if (roomNumber == 16) pon_bj(); } else if (num_ejec == 2) { - if (!strcmp(num_room, "1.alg")) + if (roomNumber == 1) update_1_pre(); - else if (!strcmp(num_room, "3.alg")) + else if (roomNumber == 3) update_3_pre(); - else if (!strcmp(num_room, "5.alg")) + else if (roomNumber == 5) update_5_pre(); - else if (!strcmp(num_room, "6.alg")) + else if (roomNumber == 6) update_6_pre(); - else if (!strcmp(num_room, "7.alg")) + else if (roomNumber == 7) update_7_pre(); - else if (!strcmp(num_room, "9.alg")) + else if (roomNumber == 9) update_9_pre(); - else if (!strcmp(num_room, "12.alg")) + else if (roomNumber == 12) update_12_pre(); - else if (!strcmp(num_room, "14.alg")) + else if (roomNumber == 14) update_14_pre(); - else if (!strcmp(num_room, "16.alg")) + else if (roomNumber == 16) update_16_pre(); - else if (!strcmp(num_room, "17.alg")) + else if (roomNumber == 17) update_17_pre(); - else if (!strcmp(num_room, "18.alg")) + else if (roomNumber == 18) update_18_pre(); } else if (num_ejec == 3) { // nothing } else if (num_ejec == 4) { - if (!strcmp(num_room, "21.alg")) + if (roomNumber == 21) update_21_pre(); - else if (!strcmp(num_room, "22.alg")) + else if (roomNumber == 22) update_22_pre(); - else if (!strcmp(num_room, "23.alg")) + else if (roomNumber == 23) update_23_pre(); - else if (!strcmp(num_room, "24.alg")) + else if (roomNumber == 24) update_24_pre(); - else if (!strcmp(num_room, "26.alg")) + else if (roomNumber == 26) update_26_pre(); - else if (!strcmp(num_room, "27.alg")) + else if (roomNumber == 27) update_27_pre(); - else if (!strcmp(num_room, "29.alg")) + else if (roomNumber == 29) update_29_pre(); - else if (!strcmp(num_room, "30.alg")) + else if (roomNumber == 30) update_30_pre(); - else if (!strcmp(num_room, "31.alg")) + else if (roomNumber == 31) update_31_pre(); - else if (!strcmp(num_room, "34.alg")) + else if (roomNumber == 34) update_34_pre(); - else if (!strcmp(num_room, "35.alg")) + else if (roomNumber == 35) update_35_pre(); } else if (num_ejec == 5) { - if (!strcmp(num_room,"49.alg")) + if (roomNumber == 49) update_49_pre(); - else if (!strcmp(num_room,"53.alg")) + else if (roomNumber == 53) update_53_pre(); - else if (!strcmp(num_room,"54.alg")) + else if (roomNumber == 54) update_54_pre(); - else if (!strcmp(num_room,"56.alg")) + else if (roomNumber == 56) update_56_pre(); } else if (num_ejec == 6) { - if (!strcmp(num_room, "102.alg")) + if (roomNumber == 102) update_pendulo(); - else if (!strcmp(num_room, "58.alg")) + else if (roomNumber == 58) update_58_pre(); - else if (!strcmp(num_room, "59.alg")) + else if (roomNumber == 59) update_59_pre(); - else if (!strcmp(num_room, "60.alg")) + else if (roomNumber == 60) update_60_pre(); } } diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 05fd512355..0ef03e35eb 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -474,11 +474,11 @@ void DrasculaEngine::talk(const char *said, const char *filename) { int longitud = strlen(said); if (num_ejec == 6) { - if (flags[0] == 0 && (!strcmp(num_room, "102.alg"))) { + if (flags[0] == 0 && roomNumber == 102) { talk_pen(said, filename); return; } - if (flags[0] == 0 && (!strcmp(num_room, "58.alg"))) { + if (flags[0] == 0 && roomNumber == 58) { talk_pen2(said, filename); return; } @@ -492,7 +492,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { } if (num_ejec == 4) { - if (strcmp(num_room, "24.alg") || flags[29] == 0) { + if (roomNumber == 24 || flags[29] == 0) { color_abc(YELLOW); } } else { -- cgit v1.2.3 From 7263ec4763bd54dec670deef596dbecdbbce095b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 27 May 2008 11:49:36 +0000 Subject: Rewrote some more room logic svn-id: r32319 --- engines/drascula/rooms.cpp | 97 ++++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 46 deletions(-) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 9730874fea..3a4e45ca82 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -146,6 +146,36 @@ RoomTalkAction room4Actions[] = { { -1, OPEN, 210, 181 } }; +RoomTalkAction room5Actions[] = { + // num action object speech + { -1, MOVE, 136, 13 }, + { -1, OPEN, 136, 18 }, + { -1, TALK, 136, 15 }, + // ------------------------------- + { -1, LOOK, 212, 187 }, + { -1, TALK, 212, 188 }, + // ------------------------------- + { -1, LOOK, 213, 189 }, + { -1, OPEN, 213, 190 } +}; + +RoomTalkAction room6Actions[] = { + // num action object speech + { -1, PICK, 144, 43 }, + // ------------------------------- + { -1, LOOK, 138, 35 }, + { -1, TALK, 138, 6 }, + // ------------------------------- + { -1, LOOK, 143, 37 }, + { -1, PICK, 143, 7 }, + { -1, MOVE, 143, 7 }, + { -1, TALK, 143, 38 }, + // ------------------------------- + { -1, LOOK, 139, 36 }, + // ------------------------------- + { -1, LOOK, 140, 147 } +}; + RoomTalkAction room12Actions[] = { // num action object speech { -1, LOOK, 154, 329 }, @@ -324,59 +354,40 @@ void DrasculaEngine::room_4(int fl) { } void DrasculaEngine::room_5(int fl) { - if (objeto_que_lleva == LOOK && fl == 136 && flags[8]==0) talk(_text[_lang][14], "14.als"); - else if (objeto_que_lleva == MOVE && fl == 136) - talk(13); - else if (objeto_que_lleva == OPEN && fl == 136) - talk(18); - else if (objeto_que_lleva == TALK && fl == 136) - talk(15); + if (roomParse(room5Actions, fl)) + return; + + if (objeto_que_lleva == LOOK && fl == 136 && flags[8] == 0) + talk(14); else if (objeto_que_lleva == 10 && fl == 136) { animation_5_2(); resta_objeto(10); - } else if (objeto_que_lleva == LOOK && fl == 212) - talk(187); - else if (objeto_que_lleva == TALK && fl == 212) - talk(188); - else if (objeto_que_lleva == LOOK && fl == 213) - talk(189); - else if (objeto_que_lleva == OPEN && fl == 213) - talk(190); - else + } else hay_respuesta = 0; } void DrasculaEngine::room_6(int fl){ + if (roomParse(room6Actions, fl)) + return; + if (objeto_que_lleva == LOOK && fl==144) { talk(41); talk(42); - } else if (objeto_que_lleva == PICK && fl == 144) - talk(43); - else if (objeto_que_lleva == LOOK && fl == 138) - talk(35); - else if (objeto_que_lleva == OPEN && fl == 138) + } else if (objeto_que_lleva == OPEN && fl == 138) openDoor(0, 1); else if (objeto_que_lleva == CLOSE && fl == 138) closeDoor(0, 1); - else if (objeto_que_lleva == TALK && fl == 138) - talk(6); - else if (objeto_que_lleva == LOOK && fl == 143) - talk(37); - else if (objeto_que_lleva == PICK && fl == 143) - talk(7); - else if (objeto_que_lleva == MOVE && fl == 143) - talk(7); else if (objeto_que_lleva == OPEN && fl == 143 && flags[2] == 0) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateRefresh_pre(); - copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, dir_dibujo3, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - pause(10); - playSound("s3.als"); - flags[2] = 1; - updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - stopSound(); + updateRefresh_pre(); + copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, dir_dibujo3, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + pause(10); + playSound("s3.als"); + flags[2] = 1; + updateRoom(); + updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + stopSound(); } else if (objeto_que_lleva == CLOSE && fl == 143 && flags[2] == 1) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); flags[2] = 0; @@ -388,11 +399,7 @@ void DrasculaEngine::room_6(int fl){ updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); stopSound(); - } else if (objeto_que_lleva == TALK && fl == 143) - talk(38); - else if (objeto_que_lleva == LOOK && fl == 139) - talk(36); - else if (objeto_que_lleva == OPEN && fl == 139 && flags[1] == 0) { + } else if (objeto_que_lleva == OPEN && fl == 139 && flags[1] == 0) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, dir_dibujo3, dir_zona_pantalla); @@ -405,9 +412,7 @@ void DrasculaEngine::room_6(int fl){ updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); stopSound(); - } else if (objeto_que_lleva == LOOK && fl == 140) - talk(147); - else if (objeto_que_lleva == PICK && fl == 140) { + } else if (objeto_que_lleva == PICK && fl == 140) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, dir_dibujo3, dir_zona_pantalla); -- cgit v1.2.3 From de88eb33b5b2f9975caf13e9b651fc694c9fe4c9 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 27 May 2008 12:02:26 +0000 Subject: objeto_que_lleva -> pickedObject Removed the verb defines and replaced them with appropriate enums svn-id: r32320 --- engines/drascula/drascula.cpp | 284 ++++++++--------- engines/drascula/drascula.h | 19 +- engines/drascula/rooms.cpp | 714 +++++++++++++++++++++--------------------- 3 files changed, 510 insertions(+), 507 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index e1af5aca60..3e3af79265 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -816,15 +816,15 @@ void DrasculaEngine::pickObject(int objeto) { void DrasculaEngine::chooseObject(int objeto) { if (num_ejec == 5) { - if (lleva_objeto == 1 && menu_scr == 0 && objeto_que_lleva != 16) - suma_objeto(objeto_que_lleva); + if (lleva_objeto == 1 && menu_scr == 0 && pickedObject != 16) + suma_objeto(pickedObject); } else { if (lleva_objeto == 1 && menu_scr == 0) - suma_objeto(objeto_que_lleva); + suma_objeto(pickedObject); } copyBackground(x1d_menu[objeto], y1d_menu[objeto], 0, 0, OBJWIDTH,OBJHEIGHT, dir_hare_fondo, dir_dibujo3); lleva_objeto = 1; - objeto_que_lleva = objeto; + pickedObject = objeto; } int DrasculaEngine::resta_objeto(int osj) { @@ -846,11 +846,11 @@ void DrasculaEngine::withoutVerb() { if (menu_scr == 1) c = 0; if (num_ejec == 5) { - if (lleva_objeto == 1 && objeto_que_lleva != 16) - suma_objeto(objeto_que_lleva); + if (lleva_objeto == 1 && pickedObject != 16) + suma_objeto(pickedObject); } else { if (lleva_objeto == 1) - suma_objeto(objeto_que_lleva); + suma_objeto(pickedObject); } copyBackground(0, c, 0, 0, OBJWIDTH,OBJHEIGHT, dir_hare_fondo, dir_dibujo3); @@ -1426,17 +1426,17 @@ void DrasculaEngine::elige_verbo(int verbo) { if (menu_scr == 1) c = 0; if (num_ejec == 5) { - if (lleva_objeto == 1 && objeto_que_lleva != 16) - suma_objeto(objeto_que_lleva); + if (lleva_objeto == 1 && pickedObject != 16) + suma_objeto(pickedObject); } else { if (lleva_objeto == 1) - suma_objeto(objeto_que_lleva); + suma_objeto(pickedObject); } copyBackground(OBJWIDTH * verbo, c, 0, 0, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_dibujo3); lleva_objeto = 1; - objeto_que_lleva = verbo; + pickedObject = verbo; } void DrasculaEngine::mesa() { @@ -2378,7 +2378,7 @@ bool DrasculaEngine::carga_partida(const char *nom_game) { } lleva_objeto = sav->readSint32LE(); - objeto_que_lleva = sav->readSint32LE(); + pickedObject = sav->readSint32LE(); hay_que_load = 0; return true; @@ -2869,14 +2869,14 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { bool DrasculaEngine::coge_objeto() { int h, n; - h = objeto_que_lleva; + h = pickedObject; comprueba_flags = 1; updateRoom(); menu_sin_volcar(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - if (objeto_que_lleva < 7) + if (pickedObject < 7) goto usando_verbos; for (n = 1; n < 43; n++) { @@ -2909,209 +2909,209 @@ bool DrasculaEngine::banderas(int fl) { if (menu_scr == 1) { if (num_ejec == 1) { - if (objeto_que_lleva == LOOK && fl == 28) + if (pickedObject == kVerbLook && fl == 28) talk(_text[_lang][328], "328.als"); } else if (num_ejec == 2) { - if ((objeto_que_lleva == LOOK && fl == 22 && flags[23] == 0) - || (objeto_que_lleva == OPEN && fl == 22 && flags[23] == 0)) { + if ((pickedObject == kVerbLook && fl == 22 && flags[23] == 0) + || (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) { talk(_text[_lang][164], "164.als"); flags[23] = 1; withoutVerb(); suma_objeto(7); suma_objeto(18); - } else if (objeto_que_lleva == LOOK && fl == 22 && flags[23] == 1) + } else if (pickedObject == kVerbLook && fl == 22 && flags[23] == 1) talk(_text[_lang][307], "307.als"); - else if (objeto_que_lleva == LOOK && fl == 28) + else if (pickedObject == kVerbLook && fl == 28) talk(_text[_lang][328], "328.als"); - else if (objeto_que_lleva == LOOK && fl == 7) + else if (pickedObject == kVerbLook && fl == 7) talk(_text[_lang][143], "143.als"); - else if (objeto_que_lleva == TALK && fl == 7) + else if (pickedObject == kVerbTalk && fl == 7) talk(_text[_lang][144], "144.als"); - else if (objeto_que_lleva == LOOK && fl == 8) + else if (pickedObject == kVerbLook && fl == 8) talk(_text[_lang][145], "145.als"); - else if (objeto_que_lleva == TALK && fl == 8) + else if (pickedObject == kVerbTalk && fl == 8) talk(_text[_lang][146], "146.als"); - else if (objeto_que_lleva == LOOK && fl == 9) + else if (pickedObject == kVerbLook && fl == 9) talk(_text[_lang][147], "147.als"); - else if (objeto_que_lleva == TALK && fl == 9) + else if (pickedObject == kVerbTalk && fl == 9) talk(_text[_lang][148], "148.als"); - else if (objeto_que_lleva == LOOK && fl == 10) + else if (pickedObject == kVerbLook && fl == 10) talk(_text[_lang][151], "151.als"); - else if (objeto_que_lleva == LOOK && fl == 11) + else if (pickedObject == kVerbLook && fl == 11) talk(_text[_lang][152], "152.als"); - else if (objeto_que_lleva == TALK && fl == 11) + else if (pickedObject == kVerbTalk && fl == 11) talk(_text[_lang][153], "153.als"); - else if (objeto_que_lleva == LOOK && fl == 12) + else if (pickedObject == kVerbLook && fl == 12) talk(_text[_lang][154], "154.als"); - else if (objeto_que_lleva == LOOK && fl == 13) + else if (pickedObject == kVerbLook && fl == 13) talk(_text[_lang][155], "155.als"); - else if (objeto_que_lleva == LOOK && fl == 14) + else if (pickedObject == kVerbLook && fl == 14) talk(_text[_lang][157], "157.als"); - else if (objeto_que_lleva == LOOK && fl == 15) + else if (pickedObject == kVerbLook && fl == 15) talk(_text[_lang][58], "58.als"); - else if (objeto_que_lleva == LOOK && fl == 16) + else if (pickedObject == kVerbLook && fl == 16) talk(_text[_lang][158], "158.als"); - else if (objeto_que_lleva == LOOK && fl == 17) + else if (pickedObject == kVerbLook && fl == 17) talk(_text[_lang][159], "159.als"); - else if (objeto_que_lleva == LOOK && fl == 18) + else if (pickedObject == kVerbLook && fl == 18) talk(_text[_lang][160], "160.als"); - else if (objeto_que_lleva == LOOK && fl == 19) + else if (pickedObject == kVerbLook && fl == 19) talk(_text[_lang][161], "161.als"); - else if (objeto_que_lleva == LOOK && fl == 20) + else if (pickedObject == kVerbLook && fl == 20) talk(_text[_lang][162], "162.als"); - else if (objeto_que_lleva == LOOK && fl == 23) + else if (pickedObject == kVerbLook && fl == 23) talk(_text[_lang][152], "152.als"); else hay_respuesta = 0; } else if (num_ejec == 3) { - if (objeto_que_lleva == LOOK && fl == 22) + if (pickedObject == kVerbLook && fl == 22) talk(_text[_lang][307], "307.als"); - else if (objeto_que_lleva == LOOK && fl == 28) + else if (pickedObject == kVerbLook && fl == 28) talk(_text[_lang][328], "328.als"); - else if (objeto_que_lleva == LOOK && fl == 7) + else if (pickedObject == kVerbLook && fl == 7) talk(_text[_lang][143], "143.als"); - else if (objeto_que_lleva == TALK && fl == 7) + else if (pickedObject == kVerbTalk && fl == 7) talk(_text[_lang][144], "144.als"); - else if (objeto_que_lleva == LOOK && fl == 8) + else if (pickedObject == kVerbLook && fl == 8) talk(_text[_lang][145], "145.als"); - else if (objeto_que_lleva == TALK && fl == 8) + else if (pickedObject == kVerbTalk && fl == 8) talk(_text[_lang][146], "146.als"); - else if (objeto_que_lleva == LOOK && fl == 9) + else if (pickedObject == kVerbLook && fl == 9) talk(_text[_lang][147], "147.als"); - else if (objeto_que_lleva == TALK && fl == 9) + else if (pickedObject == kVerbTalk && fl == 9) talk(_text[_lang][148], "148.als"); - else if (objeto_que_lleva == LOOK && fl == 10) + else if (pickedObject == kVerbLook && fl == 10) talk(_text[_lang][151], "151.als"); - else if (objeto_que_lleva == LOOK && fl == 11) + else if (pickedObject == kVerbLook && fl == 11) talk(_text[_lang][152], "152.als"); - else if (objeto_que_lleva == TALK && fl == 11) + else if (pickedObject == kVerbTalk && fl == 11) talk(_text[_lang][153], "153.als"); - else if (objeto_que_lleva == LOOK && fl == 12) + else if (pickedObject == kVerbLook && fl == 12) talk(_text[_lang][154], "154.als"); - else if (objeto_que_lleva == LOOK && fl == 13) + else if (pickedObject == kVerbLook && fl == 13) talk(_text[_lang][155], "155.als"); - else if (objeto_que_lleva == LOOK && fl == 14) + else if (pickedObject == kVerbLook && fl == 14) talk(_text[_lang][157], "157.als"); - else if (objeto_que_lleva == LOOK && fl == 15) + else if (pickedObject == kVerbLook && fl == 15) talk(_text[_lang][58], "58.als"); - else if (objeto_que_lleva == LOOK && fl == 16) + else if (pickedObject == kVerbLook && fl == 16) talk(_text[_lang][158], "158.als"); - else if (objeto_que_lleva == LOOK && fl == 17) + else if (pickedObject == kVerbLook && fl == 17) talk(_text[_lang][159], "159.als"); - else if (objeto_que_lleva == LOOK && fl == 18) + else if (pickedObject == kVerbLook && fl == 18) talk(_text[_lang][160], "160.als"); - else if (objeto_que_lleva == LOOK && fl == 19) + else if (pickedObject == kVerbLook && fl == 19) talk(_text[_lang][161], "161.als"); - else if (objeto_que_lleva == LOOK && fl == 20) + else if (pickedObject == kVerbLook && fl == 20) talk(_text[_lang][162], "162.als"); - else if (objeto_que_lleva == LOOK && fl == 23) + else if (pickedObject == kVerbLook && fl == 23) talk(_text[_lang][152], "152.als"); else hay_respuesta = 0; } else if (num_ejec == 4) { - if ((objeto_que_lleva == 18 && fl == 19) || (objeto_que_lleva == 19 && fl == 18)) { + if ((pickedObject == 18 && fl == 19) || (pickedObject == 19 && fl == 18)) { withoutVerb(); chooseObject(21); resta_objeto(18); resta_objeto(19); - } else if ((objeto_que_lleva == 14 && fl == 19) || (objeto_que_lleva == 19 && fl == 14)) + } else if ((pickedObject == 14 && fl == 19) || (pickedObject == 19 && fl == 14)) talk(_text[_lang][484], "484.als"); - else if (objeto_que_lleva == LOOK && fl == 28) + else if (pickedObject == kVerbLook && fl == 28) talk(_text[_lang][328], "328.als"); - else if (objeto_que_lleva == LOOK && fl == 7) + else if (pickedObject == kVerbLook && fl == 7) talk(_text[_lang][478], "478.als"); - else if (objeto_que_lleva == LOOK && fl == 8) + else if (pickedObject == kVerbLook && fl == 8) talk(_text[_lang][480], "480.als"); - else if (objeto_que_lleva == LOOK && fl == 9) { + else if (pickedObject == kVerbLook && fl == 9) { talk(_text[_lang][482], "482.als"); talk(_text[_lang][483], "483.als"); - } else if (objeto_que_lleva == LOOK && fl == 10) + } else if (pickedObject == kVerbLook && fl == 10) talk(_text[_lang][485], "485.als"); - else if (objeto_que_lleva == LOOK && fl == 11) + else if (pickedObject == kVerbLook && fl == 11) talk(_text[_lang][488], "488.als"); - else if (objeto_que_lleva == LOOK && fl == 12) + else if (pickedObject == kVerbLook && fl == 12) talk(_text[_lang][486], "486.als"); - else if (objeto_que_lleva == LOOK && fl == 13) + else if (pickedObject == kVerbLook && fl == 13) talk(_text[_lang][490], "490.als"); - else if (objeto_que_lleva == LOOK && fl == 14) + else if (pickedObject == kVerbLook && fl == 14) talk(_text[_lang][122], "122.als"); - else if (objeto_que_lleva == LOOK && fl == 15) + else if (pickedObject == kVerbLook && fl == 15) talk(_text[_lang][117], "117.als"); - else if (objeto_que_lleva == TALK && fl == 15) + else if (pickedObject == kVerbTalk && fl == 15) talk(_text[_lang][118], "118.als"); - else if (objeto_que_lleva == OPEN && fl == 15) + else if (pickedObject == kVerbOpen && fl == 15) talk(_text[_lang][119], "119.als"); - else if (objeto_que_lleva == LOOK && fl == 16) + else if (pickedObject == kVerbLook && fl == 16) talk(_text[_lang][491], "491.als"); - else if (objeto_que_lleva == LOOK && fl == 17) + else if (pickedObject == kVerbLook && fl == 17) talk(_text[_lang][478], "478.als"); - else if (objeto_que_lleva == LOOK && fl == 18) + else if (pickedObject == kVerbLook && fl == 18) talk(_text[_lang][493], "493.als"); - else if (objeto_que_lleva == LOOK && fl == 19) { + else if (pickedObject == kVerbLook && fl == 19) { talk(_text[_lang][494], "494.als"); talk(_text[_lang][495], "495.als"); - } else if (objeto_que_lleva == LOOK && fl == 20) + } else if (pickedObject == kVerbLook && fl == 20) talk(_text[_lang][162], "162.als"); - else if (objeto_que_lleva == LOOK && fl == 21) + else if (pickedObject == kVerbLook && fl == 21) talk(_text[_lang][496], "496.als"); - else if (objeto_que_lleva == LOOK && fl == 22) + else if (pickedObject == kVerbLook && fl == 22) talk(_text[_lang][161], "161.als"); else hay_respuesta = 0; } else if (num_ejec == 5) { - if (objeto_que_lleva == LOOK && fl == 28) + if (pickedObject == kVerbLook && fl == 28) talk(_text[_lang][328], "328.als"); - else if (objeto_que_lleva == LOOK && fl == 7) + else if (pickedObject == kVerbLook && fl == 7) talk(_text[_lang][478],"478.als"); - else if (objeto_que_lleva == LOOK && fl == 8) + else if (pickedObject == kVerbLook && fl == 8) talk(_text[_lang][120], "120.als"); - else if (objeto_que_lleva == LOOK && fl == 9) { + else if (pickedObject == kVerbLook && fl == 9) { talk(_text[_lang][482], "482.als"); talk(_text[_lang][483], "483.als"); - } else if (objeto_que_lleva == LOOK && fl == 11) + } else if (pickedObject == kVerbLook && fl == 11) talk(_text[_lang][488], "488.als"); - else if (objeto_que_lleva == LOOK && fl == 13) + else if (pickedObject == kVerbLook && fl == 13) talk(_text[_lang][490], "490.als"); - else if (objeto_que_lleva == LOOK && fl == 14) + else if (pickedObject == kVerbLook && fl == 14) talk(_text[_lang][121], "121.als"); - else if (objeto_que_lleva == LOOK && fl == 15) + else if (pickedObject == kVerbLook && fl == 15) talk(_text[_lang][117], "117.als"); - else if (objeto_que_lleva == TALK && fl == 15) + else if (pickedObject == kVerbTalk && fl == 15) talk(_text[_lang][118], "118.als"); - else if (objeto_que_lleva == OPEN && fl == 15) + else if (pickedObject == kVerbOpen && fl == 15) talk(_text[_lang][119], "119.als"); - else if (objeto_que_lleva == LOOK && fl == 17) + else if (pickedObject == kVerbLook && fl == 17) talk(_text[_lang][478], "478.als"); - else if (objeto_que_lleva == LOOK && fl == 20) + else if (pickedObject == kVerbLook && fl == 20) talk(_text[_lang][162], "162.als"); else hay_respuesta = 0; } else if (num_ejec == 6) { - if (objeto_que_lleva == LOOK && fl == 28) + if (pickedObject == kVerbLook && fl == 28) talk(_text[_lang][328], "328.als"); - else if (objeto_que_lleva == LOOK && fl == 9) { + else if (pickedObject == kVerbLook && fl == 9) { talk(_text[_lang][482], "482.als"); talk(_text[_lang][483], "483.als"); - } else if (objeto_que_lleva == LOOK && fl == 20) + } else if (pickedObject == kVerbLook && fl == 20) talk(_text[_lang][123], "123.als"); - else if (objeto_que_lleva == LOOK && fl == 21) + else if (pickedObject == kVerbLook && fl == 21) talk(_text[_lang][441], "441.als"); else hay_respuesta = 0; } } else { if (num_ejec == 1) { - if (objeto_que_lleva == LOOK && fl == 50) + if (pickedObject == kVerbLook && fl == 50) talk(_text[_lang][308], "308.als"); - else if (objeto_que_lleva == OPEN && fl == 50) + else if (pickedObject == kVerbOpen && fl == 50) talk(_text[_lang][310], "310.als"); - else if (objeto_que_lleva == CLOSE && fl == 50) + else if (pickedObject == kVerbClose && fl == 50) talk(_text[_lang][311], "311.als"); - else if (objeto_que_lleva == MOVE && fl == 50) + else if (pickedObject == kVerbMove && fl == 50) talk(_text[_lang][312], "312.als"); - else if (objeto_que_lleva == PICK && fl == 50) + else if (pickedObject == kVerbPick && fl == 50) talk(_text[_lang][313], "313.als"); - else if (objeto_que_lleva == TALK && fl == 50) + else if (pickedObject == kVerbTalk && fl == 50) talk(_text[_lang][314], "314.als"); else if (roomNumber == 62) room_62(fl); @@ -3120,24 +3120,24 @@ bool DrasculaEngine::banderas(int fl) { else hay_respuesta = 0; } else if (num_ejec == 2) { - if (objeto_que_lleva == LOOK && fl == 50) + if (pickedObject == kVerbLook && fl == 50) talk(_text[_lang][308], "308.als"); - else if (objeto_que_lleva == OPEN && fl == 50) + else if (pickedObject == kVerbOpen && fl == 50) talk(_text[_lang][310], "310.als"); - else if (objeto_que_lleva == CLOSE && fl == 50) + else if (pickedObject == kVerbClose && fl == 50) talk(_text[_lang][311], "311.als"); - else if (objeto_que_lleva == MOVE && fl == 50) + else if (pickedObject == kVerbMove && fl == 50) talk(_text[_lang][312], "312.als"); - else if (objeto_que_lleva == PICK && fl == 50) + else if (pickedObject == kVerbPick && fl == 50) talk(_text[_lang][313], "313.als"); - else if (objeto_que_lleva == TALK && fl == 50) + else if (pickedObject == kVerbTalk && fl == 50) talk(_text[_lang][314], "314.als"); // Note: the original check was strcmp(num_room, "18.alg") - else if (objeto_que_lleva == 11 && fl == 50 && flags[22] == 0 && roomNumber != 18) + else if (pickedObject == 11 && fl == 50 && flags[22] == 0 && roomNumber != 18) talk(_text[_lang][315], "315.als"); - else if (objeto_que_lleva == 13 && fl == 50) + else if (pickedObject == 13 && fl == 50) talk(_text[_lang][156], "156.als"); - else if (objeto_que_lleva == 20 && fl == 50) + else if (pickedObject == 20 && fl == 50) talk(_text[_lang][163], "163.als"); else if (roomNumber == 1) room_1(fl); @@ -3172,17 +3172,17 @@ bool DrasculaEngine::banderas(int fl) { else hay_respuesta = 0; } else if (num_ejec == 3) { - if (objeto_que_lleva == LOOK && fl == 50) + if (pickedObject == kVerbLook && fl == 50) talk(_text[_lang][309], "309.als"); - else if (objeto_que_lleva == OPEN && fl == 50) + else if (pickedObject == kVerbOpen && fl == 50) talk(_text[_lang][310], "310.als"); - else if (objeto_que_lleva == CLOSE && fl == 50) + else if (pickedObject == kVerbClose && fl == 50) talk(_text[_lang][311], "311.als"); - else if (objeto_que_lleva == MOVE && fl == 50) + else if (pickedObject == kVerbMove && fl == 50) talk(_text[_lang][312], "312.als"); - else if (objeto_que_lleva == PICK && fl == 50) + else if (pickedObject == kVerbPick && fl == 50) talk(_text[_lang][313], "313.als"); - else if (objeto_que_lleva == TALK && fl == 50) + else if (pickedObject == kVerbTalk && fl == 50) talk(_text[_lang][314], "314.als"); else if (roomNumber == 13) { if (room_13(fl)) @@ -3192,25 +3192,25 @@ bool DrasculaEngine::banderas(int fl) { } else if (num_ejec == 4) { if (roomNumber == 28) talk(_text[_lang][178], "178.als"); - else if (objeto_que_lleva == LOOK && fl == 50) + else if (pickedObject == kVerbLook && fl == 50) talk(_text[_lang][309], "309.als"); - else if (objeto_que_lleva == OPEN && fl == 50) + else if (pickedObject == kVerbOpen && fl == 50) talk(_text[_lang][310], "310.als"); - else if (objeto_que_lleva == CLOSE && fl == 50) + else if (pickedObject == kVerbClose && fl == 50) talk(_text[_lang][311], "311.als"); - else if (objeto_que_lleva == MOVE && fl == 50) + else if (pickedObject == kVerbMove && fl == 50) talk(_text[_lang][312], "312.als"); - else if (objeto_que_lleva == PICK && fl == 50) + else if (pickedObject == kVerbPick && fl == 50) talk(_text[_lang][313], "313.als"); - else if (objeto_que_lleva == TALK && fl == 50) + else if (pickedObject == kVerbTalk && fl == 50) talk(_text[_lang][314], "314.als"); - else if (objeto_que_lleva == 8 && fl == 50 && flags[18] == 0) + else if (pickedObject == 8 && fl == 50 && flags[18] == 0) talk(_text[_lang][481], "481.als"); - else if (objeto_que_lleva == 9 && fl == 50) + else if (pickedObject == 9 && fl == 50) talk(_text[_lang][484], "484.als"); - else if (objeto_que_lleva == 12 && fl == 50 && flags[18] == 0) + else if (pickedObject == 12 && fl == 50 && flags[18] == 0) talk(_text[_lang][487], "487.als"); - else if (objeto_que_lleva == 20 && fl == 50) + else if (pickedObject == 20 && fl == 50) talk(_text[_lang][487], "487.als"); else if (roomNumber == 21) { if (room_21(fl)) @@ -3240,19 +3240,19 @@ bool DrasculaEngine::banderas(int fl) { else hay_respuesta = 0; } else if (num_ejec == 5) { - if (objeto_que_lleva == LOOK && fl == 50) + if (pickedObject == kVerbLook && fl == 50) talk("Cuanto mas me miro, mas me gusto", "54.als"); - else if (objeto_que_lleva == OPEN && fl == 50) + else if (pickedObject == kVerbOpen && fl == 50) talk("y luego como me cierro", "19.als"); - else if (objeto_que_lleva == CLOSE && fl == 50) + else if (pickedObject == kVerbClose && fl == 50) talk("Tendre que abrirme primero no", "19.als"); - else if (objeto_que_lleva == MOVE && fl == 50) + else if (pickedObject == kVerbMove && fl == 50) talk("Estoy bien donde estoy", "19.als"); - else if (objeto_que_lleva == PICK && fl == 50) + else if (pickedObject == kVerbPick && fl == 50) talk("Ya me tengo", "11.als"); - else if (objeto_que_lleva == TALK && fl == 50) + else if (pickedObject == kVerbTalk && fl == 50) talk("hola yo", "16.als"); - else if (objeto_que_lleva == 20 && fl == 50) + else if (pickedObject == 20 && fl == 50) talk(_text[_lang][487], "487.als"); else if (roomNumber == 49) room_49(fl); @@ -3268,19 +3268,19 @@ bool DrasculaEngine::banderas(int fl) { } else hay_respuesta = 0; } else if (num_ejec == 6) { - if (objeto_que_lleva == LOOK && fl == 50 && flags[0] == 1) + if (pickedObject == kVerbLook && fl == 50 && flags[0] == 1) talk(_text[_lang][308], "308.als"); - else if (objeto_que_lleva == LOOK && fl == 50 && flags[0] == 0) + else if (pickedObject == kVerbLook && fl == 50 && flags[0] == 0) talk(_text[_lang][310], "250.als" ); - else if (objeto_que_lleva == OPEN && fl == 50) + else if (pickedObject == kVerbOpen && fl == 50) talk(_text[_lang][310], "310.als" ); - else if (objeto_que_lleva == CLOSE && fl == 50) + else if (pickedObject == kVerbClose && fl == 50) talk(_text[_lang][311], "311.als" ); - else if (objeto_que_lleva == MOVE && fl == 50) + else if (pickedObject == kVerbMove && fl == 50) talk(_text[_lang][312], "312.als" ); - else if (objeto_que_lleva == PICK && fl == 50) + else if (pickedObject == kVerbPick && fl == 50) talk(_text[_lang][313], "313.als" ); - else if (objeto_que_lleva == TALK && fl == 50) + else if (pickedObject == kVerbTalk && fl == 50) talk(_text[_lang][314], "314.als" ); else if (roomNumber == 102) room_pendulo(fl); @@ -3737,7 +3737,7 @@ void DrasculaEngine::saveGame(char nom_game[]) { } out->writeSint32LE(lleva_objeto); - out->writeSint32LE(objeto_que_lleva); + out->writeSint32LE(pickedObject); out->finalize(); if (out->ioFailed()) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 574e12c389..8e9765502f 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -56,6 +56,16 @@ enum Languages { kItalian = 4 }; +enum Verbs { + kVerbDefault = -1, + kVerbLook = 1, + kVerbPick = 2, + kVerbOpen = 3, + kVerbClose = 4, + kVerbTalk = 5, + kVerbMove = 6 +}; + #define TEXTD_START 68 struct DrasculaGameDescription; @@ -73,13 +83,6 @@ struct RoomTalkAction; #define F8 0x42 #define F9 0x43 #define F10 0x44 -#define DEFAULT -1 -#define LOOK 1 -#define PICK 2 -#define OPEN 3 -#define CLOSE 4 -#define TALK 5 -#define MOVE 6 #define DIF_MASK 55 #define OBJWIDTH 40 #define OBJHEIGHT 25 @@ -339,7 +342,7 @@ public: char alapantallakeva[40][20]; int x_alakeva[40], y_alakeva[40], sentido_alkeva[40], alapuertakeva[40]; int x1[40], y1[40], x2[40], y2[40]; - int lleva_objeto, objeto_que_lleva; + int lleva_objeto, pickedObject; int withVoices; int menu_bar, menu_scr, hay_nombre; char texto_nombre[20]; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 3a4e45ca82..b5de794d42 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -44,149 +44,149 @@ struct RoomTalkAction { // of actions with the same number RoomTalkAction room0Actions[] = { // num action object speech - { 1, LOOK, -1, 54 }, - { 1, MOVE, -1, 19 }, - { 1, PICK, -1, 11 }, - { 1, OPEN, -1, 9 }, - { 1, CLOSE, -1, 9 }, - { 1, TALK, -1, 16 }, - { 1, DEFAULT, -1, 11 }, + { 1, kVerbLook, -1, 54 }, + { 1, kVerbMove, -1, 19 }, + { 1, kVerbPick, -1, 11 }, + { 1, kVerbOpen, -1, 9 }, + { 1, kVerbClose, -1, 9 }, + { 1, kVerbTalk, -1, 16 }, + { 1, kVerbDefault, -1, 11 }, // ------------------------------- - { 2, MOVE, -1, 19 }, - { 2, OPEN, -1, 9 }, - { 2, CLOSE, -1, 9 }, - { 2, TALK, -1, 16 }, + { 2, kVerbMove, -1, 19 }, + { 2, kVerbOpen, -1, 9 }, + { 2, kVerbClose, -1, 9 }, + { 2, kVerbTalk, -1, 16 }, // ------------------------------- - { 3, LOOK, -1, 316 }, - { 3, MOVE, -1, 317 }, - { 3, PICK, -1, 318 }, - { 3, OPEN, -1, 319 }, - { 3, CLOSE, -1, 319 }, - { 3, TALK, -1, 320 }, - { 3, DEFAULT, -1, 318 }, + { 3, kVerbLook, -1, 316 }, + { 3, kVerbMove, -1, 317 }, + { 3, kVerbPick, -1, 318 }, + { 3, kVerbOpen, -1, 319 }, + { 3, kVerbClose, -1, 319 }, + { 3, kVerbTalk, -1, 320 }, + { 3, kVerbDefault, -1, 318 }, // ------------------------------- - { 4, MOVE, -1, 19 }, - { 4, OPEN, -1, 9 }, - { 4, CLOSE, -1, 9 }, - { 4, TALK, -1, 16 }, + { 4, kVerbMove, -1, 19 }, + { 4, kVerbOpen, -1, 9 }, + { 4, kVerbClose, -1, 9 }, + { 4, kVerbTalk, -1, 16 }, // ------------------------------- - { 5, OPEN, -1, 9 }, - { 5, CLOSE, -1, 9 }, - { 5, TALK, -1, 16 }, + { 5, kVerbOpen, -1, 9 }, + { 5, kVerbClose, -1, 9 }, + { 5, kVerbTalk, -1, 16 }, // ------------------------------- - { 6, MOVE, -1, 19 }, - { 6, OPEN, -1, 9 }, - { 6, CLOSE, -1, 9 }, - { 6, TALK, -1, 16 } + { 6, kVerbMove, -1, 19 }, + { 6, kVerbOpen, -1, 9 }, + { 6, kVerbClose, -1, 9 }, + { 6, kVerbTalk, -1, 16 } }; RoomTalkAction room1Actions[] = { // num action object speech - { -1, PICK, 118, 5 }, - { -1, OPEN, 118, 3 }, - { -1, CLOSE, 118, 4 }, - { -1, TALK, 118, 6 }, + { -1, kVerbPick, 118, 5 }, + { -1, kVerbOpen, 118, 3 }, + { -1, kVerbClose, 118, 4 }, + { -1, kVerbTalk, 118, 6 }, // ------------------------------- - { -1, LOOK, 119, 8 }, - { -1, MOVE, 119, 13 }, - { -1, CLOSE, 119, 10 }, - { -1, TALK, 119, 12 }, + { -1, kVerbLook, 119, 8 }, + { -1, kVerbMove, 119, 13 }, + { -1, kVerbClose, 119, 10 }, + { -1, kVerbTalk, 119, 12 }, // ------------------------------- - { -1, MOVE, 120, 13 }, - { -1, OPEN, 120, 18 }, - { -1, TALK, 120, 15 } + { -1, kVerbMove, 120, 13 }, + { -1, kVerbOpen, 120, 18 }, + { -1, kVerbTalk, 120, 15 } }; RoomTalkAction room3Actions[] = { // num action object speech - { -1, LOOK, 129, 21 }, - { -1, PICK, 129, 5 }, - { -1, MOVE, 129, 24 }, - { -1, OPEN, 129, 22 }, - { -1, CLOSE, 129, 10 }, + { -1, kVerbLook, 129, 21 }, + { -1, kVerbPick, 129, 5 }, + { -1, kVerbMove, 129, 24 }, + { -1, kVerbOpen, 129, 22 }, + { -1, kVerbClose, 129, 10 }, // ------------------------------- - { -1, LOOK, 131, 27 }, - { -1, PICK, 131, 5 }, - { -1, MOVE, 131, 24 }, - { -1, OPEN, 131, 22 }, - { -1, CLOSE, 131, 10 }, - { -1, TALK, 131, 23 }, + { -1, kVerbLook, 131, 27 }, + { -1, kVerbPick, 131, 5 }, + { -1, kVerbMove, 131, 24 }, + { -1, kVerbOpen, 131, 22 }, + { -1, kVerbClose, 131, 10 }, + { -1, kVerbTalk, 131, 23 }, // ------------------------------- - { -1, LOOK, 132, 28 }, - { -1, PICK, 132, 5 }, - { -1, MOVE, 132, 24 }, - { -1, OPEN, 132, 22 }, - { -1, CLOSE, 132, 10 }, - { -1, TALK, 132, 23 }, + { -1, kVerbLook, 132, 28 }, + { -1, kVerbPick, 132, 5 }, + { -1, kVerbMove, 132, 24 }, + { -1, kVerbOpen, 132, 22 }, + { -1, kVerbClose, 132, 10 }, + { -1, kVerbTalk, 132, 23 }, // ------------------------------- - { -1, LOOK, 133, 321 }, - { -1, PICK, 133, 31 }, - { -1, MOVE, 133, 34 }, - { -1, OPEN, 133, 30 }, - { -1, CLOSE, 133, 10 }, + { -1, kVerbLook, 133, 321 }, + { -1, kVerbPick, 133, 31 }, + { -1, kVerbMove, 133, 34 }, + { -1, kVerbOpen, 133, 30 }, + { -1, kVerbClose, 133, 10 }, // ------------------------------- - { -1, LOOK, 166, 55 }, - { -1, PICK, 166, 7 }, + { -1, kVerbLook, 166, 55 }, + { -1, kVerbPick, 166, 7 }, // ------------------------------- - { -1, LOOK, 211, 184 } + { -1, kVerbLook, 211, 184 } }; RoomTalkAction room4Actions[] = { // num action object speech - { -1, LOOK, 189, 182 }, + { -1, kVerbLook, 189, 182 }, // ------------------------------- - { -1, LOOK, 207, 175 }, - { -1, TALK, 207, 176 }, + { -1, kVerbLook, 207, 175 }, + { -1, kVerbTalk, 207, 176 }, // ------------------------------- - { -1, LOOK, 208, 177 }, + { -1, kVerbLook, 208, 177 }, // ------------------------------- - { -1, LOOK, 209, 179 }, + { -1, kVerbLook, 209, 179 }, // ------------------------------- - { -1, LOOK, 210, 180 }, - { -1, OPEN, 210, 181 } + { -1, kVerbLook, 210, 180 }, + { -1, kVerbOpen, 210, 181 } }; RoomTalkAction room5Actions[] = { // num action object speech - { -1, MOVE, 136, 13 }, - { -1, OPEN, 136, 18 }, - { -1, TALK, 136, 15 }, + { -1, kVerbMove, 136, 13 }, + { -1, kVerbOpen, 136, 18 }, + { -1, kVerbTalk, 136, 15 }, // ------------------------------- - { -1, LOOK, 212, 187 }, - { -1, TALK, 212, 188 }, + { -1, kVerbLook, 212, 187 }, + { -1, kVerbTalk, 212, 188 }, // ------------------------------- - { -1, LOOK, 213, 189 }, - { -1, OPEN, 213, 190 } + { -1, kVerbLook, 213, 189 }, + { -1, kVerbOpen, 213, 190 } }; RoomTalkAction room6Actions[] = { // num action object speech - { -1, PICK, 144, 43 }, + { -1, kVerbPick, 144, 43 }, // ------------------------------- - { -1, LOOK, 138, 35 }, - { -1, TALK, 138, 6 }, + { -1, kVerbLook, 138, 35 }, + { -1, kVerbTalk, 138, 6 }, // ------------------------------- - { -1, LOOK, 143, 37 }, - { -1, PICK, 143, 7 }, - { -1, MOVE, 143, 7 }, - { -1, TALK, 143, 38 }, + { -1, kVerbLook, 143, 37 }, + { -1, kVerbPick, 143, 7 }, + { -1, kVerbMove, 143, 7 }, + { -1, kVerbTalk, 143, 38 }, // ------------------------------- - { -1, LOOK, 139, 36 }, + { -1, kVerbLook, 139, 36 }, // ------------------------------- - { -1, LOOK, 140, 147 } + { -1, kVerbLook, 140, 147 } }; RoomTalkAction room12Actions[] = { // num action object speech - { -1, LOOK, 154, 329 }, - { -1, TALK, 154, 330 }, + { -1, kVerbLook, 154, 329 }, + { -1, kVerbTalk, 154, 330 }, // ------------------------------- - { -1, MOVE, 155, 48 }, - { -1, TALK, 155, 331 }, + { -1, kVerbMove, 155, 48 }, + { -1, kVerbTalk, 155, 331 }, // ------------------------------- - { -1, LOOK, 156, 35 }, - { -1, MOVE, 156, 48 }, - { -1, TALK, 156, 50 }, + { -1, kVerbLook, 156, 35 }, + { -1, kVerbMove, 156, 48 }, + { -1, kVerbTalk, 156, 50 }, }; bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { @@ -195,8 +195,8 @@ bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { for (int i = 0; i < ARRAYSIZE(roomActions); i++) { if (roomActions[i].num == num_ejec || roomActions[i].num == -1) { - if (roomActions[i].action == objeto_que_lleva || - roomActions[i].action == DEFAULT) { + if (roomActions[i].action == pickedObject || + roomActions[i].action == kVerbDefault) { if (roomActions[i].objectID == fl || roomActions[i].objectID == -1) { talk(roomActions[i].speechID); @@ -216,12 +216,12 @@ void DrasculaEngine::room_0() { // non-default actions if (num_ejec == 2) { - if (objeto_que_lleva == LOOK) { + if (pickedObject == kVerbLook) { talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; - } else if (objeto_que_lleva == PICK) { + } else if (pickedObject == kVerbPick) { talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) @@ -233,12 +233,12 @@ void DrasculaEngine::room_0() { c_poder = 0; } } else if (num_ejec == 4) { - if (objeto_que_lleva == LOOK) { + if (pickedObject == kVerbLook) { talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; - } else if (objeto_que_lleva == PICK) { + } else if (pickedObject == kVerbPick) { talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) @@ -250,12 +250,12 @@ void DrasculaEngine::room_0() { c_poder = 0; } } else if (num_ejec == 5) { - if (objeto_que_lleva == LOOK) { + if (pickedObject == kVerbLook) { talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; - } else if (objeto_que_lleva == PICK) { + } else if (pickedObject == kVerbPick) { talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) @@ -267,12 +267,12 @@ void DrasculaEngine::room_0() { c_poder = 0; } } else if (num_ejec == 6) { - if (objeto_que_lleva == LOOK) { + if (pickedObject == kVerbLook) { talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; - } else if (objeto_que_lleva == PICK) { + } else if (pickedObject == kVerbPick) { talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) @@ -290,11 +290,11 @@ void DrasculaEngine::room_1(int fl) { if (roomParse(room1Actions, fl)) return; - if (objeto_que_lleva == LOOK && fl == 118) { + if (pickedObject == kVerbLook && fl == 118) { talk(1); pause(10); talk(2); - } else if (objeto_que_lleva == LOOK && fl == 120 && flags[8] == 0) + } else if (pickedObject == kVerbLook && fl == 120 && flags[8] == 0) talk(14); else hay_respuesta = 0; @@ -304,20 +304,20 @@ void DrasculaEngine::room_3(int fl) { if (roomParse(room3Actions, fl)) return; - if (objeto_que_lleva == TALK && fl == 129) { + if (pickedObject == kVerbTalk && fl == 129) { talk(23); pause(6); talk_sinc(_text[_lang][50], "50.als", "11111111111144432554433"); - } else if (objeto_que_lleva == TALK && fl == 133) { + } else if (pickedObject == kVerbTalk && fl == 133) { talk_sinc(_text[_lang][322], "322.als", "13333334125433333333"); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(25); talk(33); - } else if (objeto_que_lleva == LOOK && fl == 165) { + } else if (pickedObject == kVerbLook && fl == 165) { talk(149); talk(150); - } else if (objeto_que_lleva == PICK && fl == 165) { + } else if (pickedObject == kVerbPick && fl == 165) { copyBackground(0, 0, 0,0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); copyRect(44, 1, hare_x, hare_y, 41, 70, dir_dibujo2, dir_zona_pantalla); @@ -327,12 +327,12 @@ void DrasculaEngine::room_3(int fl) { pickObject(10); flags[3] = 1; visible[8] = 0; - } else if (objeto_que_lleva == 14 && fl == 166 && flags[37] == 0) { + } else if (pickedObject == 14 && fl == 166 && flags[37] == 0) { animation_7_2(); pickObject(8); - } else if (objeto_que_lleva == 14 && fl == 166 && flags[37] == 1) + } else if (pickedObject == 14 && fl == 166 && flags[37] == 1) talk(323); - else if (objeto_que_lleva == TALK && fl == 211) { + else if (pickedObject == kVerbTalk && fl == 211) { talk(185); talk(186); } else @@ -343,7 +343,7 @@ void DrasculaEngine::room_4(int fl) { if (roomParse(room4Actions, fl)) return; - if (objeto_que_lleva == MOVE && fl == 189 && flags[34] == 0) { + if (pickedObject == kVerbMove && fl == 189 && flags[34] == 0) { talk(327); pickObject(13); flags[34] = 1; @@ -357,9 +357,9 @@ void DrasculaEngine::room_5(int fl) { if (roomParse(room5Actions, fl)) return; - if (objeto_que_lleva == LOOK && fl == 136 && flags[8] == 0) + if (pickedObject == kVerbLook && fl == 136 && flags[8] == 0) talk(14); - else if (objeto_que_lleva == 10 && fl == 136) { + else if (pickedObject == 10 && fl == 136) { animation_5_2(); resta_objeto(10); } else @@ -370,14 +370,14 @@ void DrasculaEngine::room_6(int fl){ if (roomParse(room6Actions, fl)) return; - if (objeto_que_lleva == LOOK && fl==144) { + if (pickedObject == kVerbLook && fl==144) { talk(41); talk(42); - } else if (objeto_que_lleva == OPEN && fl == 138) + } else if (pickedObject == kVerbOpen && fl == 138) openDoor(0, 1); - else if (objeto_que_lleva == CLOSE && fl == 138) + else if (pickedObject == kVerbClose && fl == 138) closeDoor(0, 1); - else if (objeto_que_lleva == OPEN && fl == 143 && flags[2] == 0) { + else if (pickedObject == kVerbOpen && fl == 143 && flags[2] == 0) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, dir_dibujo3, dir_zona_pantalla); @@ -388,7 +388,7 @@ void DrasculaEngine::room_6(int fl){ updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); stopSound(); - } else if (objeto_que_lleva == CLOSE && fl == 143 && flags[2] == 1) { + } else if (pickedObject == kVerbClose && fl == 143 && flags[2] == 1) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); flags[2] = 0; updateRefresh_pre(); @@ -399,7 +399,7 @@ void DrasculaEngine::room_6(int fl){ updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); stopSound(); - } else if (objeto_que_lleva == OPEN && fl == 139 && flags[1] == 0) { + } else if (pickedObject == kVerbOpen && fl == 139 && flags[1] == 0) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, dir_dibujo3, dir_zona_pantalla); @@ -412,7 +412,7 @@ void DrasculaEngine::room_6(int fl){ updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); stopSound(); - } else if (objeto_que_lleva == PICK && fl == 140) { + } else if (pickedObject == kVerbPick && fl == 140) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, dir_dibujo3, dir_zona_pantalla); @@ -421,18 +421,18 @@ void DrasculaEngine::room_6(int fl){ pickObject(9); visible[4] = 0; flags[10] = 1; - } else if (objeto_que_lleva == OPEN && fl == 140) + } else if (pickedObject == kVerbOpen && fl == 140) hay_respuesta = 1; else hay_respuesta = 0; } void DrasculaEngine::room_7(int fl){ - if (objeto_que_lleva == LOOK && fl == 169) + if (pickedObject == kVerbLook && fl == 169) talk(44); - else if (objeto_que_lleva == LOOK && fl == 164) + else if (pickedObject == kVerbLook && fl == 164) talk(35); - else if (objeto_que_lleva == PICK && fl == 190) { + else if (pickedObject == kVerbPick && fl == 190) { pickObject(17); flags[35] = 1; visible[3] = 0; @@ -443,30 +443,30 @@ void DrasculaEngine::room_7(int fl){ } void DrasculaEngine::room_8(int fl) { - if (objeto_que_lleva == LOOK && fl == 147 && flags[7] == 0) { + if (pickedObject == kVerbLook && fl == 147 && flags[7] == 0) { talk(58); pickObject(15); flags[7] = 1; if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; - } else if (objeto_que_lleva == LOOK && fl == 147) + } else if (pickedObject == kVerbLook && fl == 147) talk(59); else hay_respuesta = 0; } void DrasculaEngine::room_9(int fl){ - if (objeto_que_lleva == LOOK && fl == 150) + if (pickedObject == kVerbLook && fl == 150) talk(35); - else if (objeto_que_lleva == TALK && fl == 150) + else if (pickedObject == kVerbTalk && fl == 150) talk(6); - else if (objeto_que_lleva == LOOK && fl == 51) + else if (pickedObject == kVerbLook && fl == 51) talk(60); - else if (objeto_que_lleva == TALK && fl == 51 && flags[4] == 0) + else if (pickedObject == kVerbTalk && fl == 51 && flags[4] == 0) animation_4_2(); - else if (objeto_que_lleva == TALK && fl == 51 && flags[4] == 1) + else if (pickedObject == kVerbTalk && fl == 51 && flags[4] == 1) animation_33_2(); - else if (objeto_que_lleva == 7 && fl == 51) { + else if (pickedObject == 7 && fl == 51) { animation_6_2(); resta_objeto(7); pickObject(14);} @@ -478,25 +478,25 @@ void DrasculaEngine::room_12(int fl){ if (roomParse(room12Actions, fl)) return; - if (objeto_que_lleva == OPEN && fl == 156) + if (pickedObject == kVerbOpen && fl == 156) openDoor(16, 4); - else if (objeto_que_lleva == CLOSE && fl == 156) + else if (pickedObject == kVerbClose && fl == 156) closeDoor(16, 4); else hay_respuesta = 0; } bool DrasculaEngine::room_13(int fl) { - if (objeto_que_lleva == LOOK && fl == 51) { + if (pickedObject == kVerbLook && fl == 51) { talk(411); sentido_hare = 3; talk(412); strcpy(objName[1], "yoda"); - } else if (objeto_que_lleva == TALK && fl == 51) + } else if (pickedObject == kVerbTalk && fl == 51) conversa("op_7.cal"); - else if (objeto_que_lleva == 19 && fl == 51) + else if (pickedObject == 19 && fl == 51) animation_1_3(); - else if (objeto_que_lleva == 9 && fl == 51) { + else if (pickedObject == 9 && fl == 51) { animation_2_3(); return true; } else @@ -505,52 +505,52 @@ bool DrasculaEngine::room_13(int fl) { } void DrasculaEngine::room_14(int fl) { - if (objeto_que_lleva == TALK && fl == 54 && flags[39] == 0) + if (pickedObject == kVerbTalk && fl == 54 && flags[39] == 0) animation_12_2(); - else if (objeto_que_lleva == TALK && fl == 54 && flags[39] == 1) + else if (pickedObject == kVerbTalk && fl == 54 && flags[39] == 1) talk(109); - else if (objeto_que_lleva == 12 && fl == 54) + else if (pickedObject == 12 && fl == 54) animation_26_2(); - else if (objeto_que_lleva == TALK && fl == 52 && flags[5] == 0) + else if (pickedObject == kVerbTalk && fl == 52 && flags[5] == 0) animation_11_2(); - else if (objeto_que_lleva == TALK && fl == 52 && flags[5] == 1) + else if (pickedObject == kVerbTalk && fl == 52 && flags[5] == 1) animation_36_2(); - else if (objeto_que_lleva == TALK && fl == 53) + else if (pickedObject == kVerbTalk && fl == 53) animation_13_2(); - else if (objeto_que_lleva == LOOK && fl == 200) + else if (pickedObject == kVerbLook && fl == 200) talk(165); - else if (objeto_que_lleva == LOOK && fl == 201) + else if (pickedObject == kVerbLook && fl == 201) talk(166); - else if (objeto_que_lleva == LOOK && fl == 202) + else if (pickedObject == kVerbLook && fl == 202) talk(167); - else if (objeto_que_lleva == LOOK && fl == 203) + else if (pickedObject == kVerbLook && fl == 203) talk(168); - else if (objeto_que_lleva == PICK && fl == 203) + else if (pickedObject == kVerbPick && fl == 203) talk(170); - else if (objeto_que_lleva == MOVE && fl == 203) + else if (pickedObject == kVerbMove && fl == 203) talk(170); - else if (objeto_que_lleva == TALK && fl == 203) + else if (pickedObject == kVerbTalk && fl == 203) talk(169); - else if (objeto_que_lleva == LOOK && fl == 204) + else if (pickedObject == kVerbLook && fl == 204) talk(171); else hay_respuesta = 0; } void DrasculaEngine::room_15(int fl) { - if (objeto_que_lleva == TALK && fl == 188) + if (pickedObject == kVerbTalk && fl == 188) talk(333); - else if (objeto_que_lleva == LOOK && fl == 188) + else if (pickedObject == kVerbLook && fl == 188) talk(334); - else if (objeto_que_lleva == 19 && fl == 188 && flags[27] == 0) + else if (pickedObject == 19 && fl == 188 && flags[27] == 0) talk(335); - else if (objeto_que_lleva == 19 && fl == 188 && flags[27] == 1) { + else if (pickedObject == 19 && fl == 188 && flags[27] == 1) { talk(336); sentido_hare = 3; talk(337); talk_sinc(_text[_lang][46], "46.als", "4442444244244"); sentido_hare = 1; - } else if (objeto_que_lleva == 18 && fl == 188 && flags[26] == 0) { + } else if (pickedObject == 18 && fl == 188 && flags[26] == 0) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); copyRect(133, 135, hare_x + 6, hare_y, 39, 63, dir_dibujo3, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -560,7 +560,7 @@ void DrasculaEngine::room_15(int fl) { flags[27] = 0; pickObject(19); resta_objeto(18); - } else if (objeto_que_lleva == MOVE && fl == 188 && flags[27] == 0) { + } else if (pickedObject == kVerbMove && fl == 188 && flags[27] == 0) { animation_34_2(); talk(339); pickObject(16); @@ -568,34 +568,34 @@ void DrasculaEngine::room_15(int fl) { flags[27] = 1; if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; - } else if (objeto_que_lleva == LOOK && fl == 205) + } else if (pickedObject == kVerbLook && fl == 205) talk(172); - else if (objeto_que_lleva == LOOK && fl == 206) + else if (pickedObject == kVerbLook && fl == 206) talk(173); - else if (objeto_que_lleva == MOVE && fl == 206) + else if (pickedObject == kVerbMove && fl == 206) talk(174); - else if (objeto_que_lleva == OPEN && fl == 206) + else if (pickedObject == kVerbOpen && fl == 206) talk(174); else hay_respuesta = 0; } void DrasculaEngine::room_16(int fl) { - if (objeto_que_lleva == TALK && fl == 163) + if (pickedObject == kVerbTalk && fl == 163) talk(_text[_lang][6], "6.als"); - else if (objeto_que_lleva == OPEN && fl == 163) + else if (pickedObject == kVerbOpen && fl == 163) openDoor(17, 0); - else if (objeto_que_lleva == CLOSE && fl == 163) + else if (pickedObject == kVerbClose && fl == 163) closeDoor(17, 0); - else if (objeto_que_lleva == LOOK && fl == 183) + else if (pickedObject == kVerbLook && fl == 183) talk(_text[_lang][340], "340.als"); - else if (objeto_que_lleva == TALK && fl == 183) { + else if (pickedObject == kVerbTalk && fl == 183) { talk(_text[_lang][341], "341.als"); pause(10); talk_sinc(_text[_lang][50], "50.als", "11111111111144432554433"); pause(3); talk_baul(_text[_lang][83], "d83.als"); - } else if (objeto_que_lleva == OPEN && fl == 183) { + } else if (pickedObject == kVerbOpen && fl == 183) { openDoor(19, NO_DOOR); if (flags[20] == 0) { flags[20] = 1; @@ -605,44 +605,44 @@ void DrasculaEngine::room_16(int fl) { talk(_text[_lang][342], "342.als"); pickObject(22); } - } else if (objeto_que_lleva == CLOSE && fl == 183) + } else if (pickedObject == kVerbClose && fl == 183) closeDoor(19, NO_DOOR); - else if (objeto_que_lleva == LOOK && fl == 185) + else if (pickedObject == kVerbLook && fl == 185) talk(_text[_lang][37], "37.als"); - else if (objeto_que_lleva == PICK && fl == 185) + else if (pickedObject == kVerbPick && fl == 185) talk(_text[_lang][7], "7.als"); - else if (objeto_que_lleva == MOVE && fl == 185) + else if (pickedObject == kVerbMove && fl == 185) talk(_text[_lang][7], "7.als"); - else if (objeto_que_lleva == TALK && fl == 185) + else if (pickedObject == kVerbTalk && fl == 185) talk(_text[_lang][38], "38.als"); - else if (objeto_que_lleva == LOOK && fl == 187) { + else if (pickedObject == kVerbLook && fl == 187) { talk(_text[_lang][343], "343.als"); sentido_hare = 3; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk(_text[_lang][344], "344.als"); - } else if (objeto_que_lleva == TALK && fl == 187) + } else if (pickedObject == kVerbTalk && fl == 187) talk(_text[_lang][345], "345.als"); else hay_respuesta = 0; } void DrasculaEngine::room_17(int fl) { - if (objeto_que_lleva == LOOK && fl == 177) + if (pickedObject == kVerbLook && fl == 177) talk(_text[_lang][35], "35.als"); - else if (objeto_que_lleva == TALK && fl == 177 && flags[18] == 0) + else if (pickedObject == kVerbTalk && fl == 177 && flags[18] == 0) talk(_text[_lang][6], "6.als"); - else if (objeto_que_lleva == TALK && fl == 177 && flags[18] == 1) + else if (pickedObject == kVerbTalk && fl == 177 && flags[18] == 1) animation_18_2(); - else if (objeto_que_lleva == OPEN && fl == 177 && flags[18] == 1) + else if (pickedObject == kVerbOpen && fl == 177 && flags[18] == 1) talk(_text[_lang][346], "346.als"); - else if (objeto_que_lleva == OPEN && fl == 177 && flags[14] == 0 && flags[18] == 0) + else if (pickedObject == kVerbOpen && fl == 177 && flags[14] == 0 && flags[18] == 0) animation_22_2(); - else if (objeto_que_lleva == OPEN && fl == 177 && flags[14] == 1) + else if (pickedObject == kVerbOpen && fl == 177 && flags[14] == 1) openDoor(15, 1); - else if (objeto_que_lleva == CLOSE && fl == 177 && flags[14] == 1) + else if (pickedObject == kVerbClose && fl == 177 && flags[14] == 1) closeDoor(15, 1); - else if (objeto_que_lleva == 11 && fl == 50 && flags[22] == 0) { + else if (pickedObject == 11 && fl == 50 && flags[22] == 0) { talk(_text[_lang][347], "347.als"); flags[29] = 1; pickObject(23); @@ -652,13 +652,13 @@ void DrasculaEngine::room_17(int fl) { } void DrasculaEngine::room_18(int fl) { - if (objeto_que_lleva == TALK && fl == 55 && flags[36] == 0) + if (pickedObject == kVerbTalk && fl == 55 && flags[36] == 0) animation_24_2(); - else if (objeto_que_lleva == TALK && fl == 55 && flags[36] == 1) + else if (pickedObject == kVerbTalk && fl == 55 && flags[36] == 1) talk(_text[_lang][109], "109.als"); - else if (objeto_que_lleva == LOOK && fl == 181) + else if (pickedObject == kVerbLook && fl == 181) talk(_text[_lang][348], "348.als"); - else if (objeto_que_lleva == PICK && fl == 182) { + else if (pickedObject == kVerbPick && fl == 182) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); copyRect(44, 1, hare_x, hare_y, 41, 70, dir_dibujo2, dir_zona_pantalla); @@ -668,29 +668,29 @@ void DrasculaEngine::room_18(int fl) { pickObject(12); visible[2] = 0; flags[28] = 1; - } else if (objeto_que_lleva == LOOK && fl == 182) + } else if (pickedObject == kVerbLook && fl == 182) talk(_text[_lang][154], "154.als"); - else if (objeto_que_lleva == 8 && fl == 55 && flags[38] == 0 && flags[33] == 1) + else if (pickedObject == 8 && fl == 55 && flags[38] == 0 && flags[33] == 1) talk(_text[_lang][349], "349.als"); - else if (objeto_que_lleva == 13 && fl == 55 && flags[38] == 0 && flags[33] == 1) + else if (pickedObject == 13 && fl == 55 && flags[38] == 0 && flags[33] == 1) talk(_text[_lang][349], "349.als"); - else if (objeto_que_lleva == 15 && fl == 55 && flags[38] == 0 && flags[33] == 1) + else if (pickedObject == 15 && fl == 55 && flags[38] == 0 && flags[33] == 1) talk(_text[_lang][349], "349.als"); - else if (objeto_que_lleva == 16 && fl == 55 && flags[38] == 0 && flags[33] == 1) + else if (pickedObject == 16 && fl == 55 && flags[38] == 0 && flags[33] == 1) talk(_text[_lang][349], "349.als"); - else if (objeto_que_lleva == 17 && fl == 55 && flags[38] == 0 && flags[33] == 1) + else if (pickedObject == 17 && fl == 55 && flags[38] == 0 && flags[33] == 1) talk(_text[_lang][349], "349.als"); - else if (objeto_que_lleva == 8 && fl == 55 && flags[38] == 1 && flags[33] == 1) + else if (pickedObject == 8 && fl == 55 && flags[38] == 1 && flags[33] == 1) animation_24_2(); - else if (objeto_que_lleva == 13 && fl == 55 && flags[38] == 1 && flags[33] == 1) + else if (pickedObject == 13 && fl == 55 && flags[38] == 1 && flags[33] == 1) animation_24_2(); - else if (objeto_que_lleva == 15 && fl == 55 && flags[38] == 1 && flags[33] == 1) + else if (pickedObject == 15 && fl == 55 && flags[38] == 1 && flags[33] == 1) animation_24_2(); - else if (objeto_que_lleva == 16 && fl == 55 && flags[38] == 1 && flags[33] == 1) + else if (pickedObject == 16 && fl == 55 && flags[38] == 1 && flags[33] == 1) animation_24_2(); - else if (objeto_que_lleva == 17 && fl == 55 && flags[38] == 1 && flags[33] == 1) + else if (pickedObject == 17 && fl == 55 && flags[38] == 1 && flags[33] == 1) animation_24_2(); - else if (objeto_que_lleva == 11 && fl == 50 && flags[22] == 0) { + else if (pickedObject == 11 && fl == 50 && flags[22] == 0) { sentido_hare = 3; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -709,28 +709,28 @@ void DrasculaEngine::room_18(int fl) { } void DrasculaEngine::room_19(int fl) { - if (objeto_que_lleva == LOOK && fl == 214) + if (pickedObject == kVerbLook && fl == 214) talk(_text[_lang][191], "191.als"); else hay_respuesta = 0; } bool DrasculaEngine::room_21(int fl) { - if (objeto_que_lleva == OPEN && fl == 101 && flags[28] == 0) + if (pickedObject == kVerbOpen && fl == 101 && flags[28] == 0) talk(_text[_lang][419], "419.als"); - else if (objeto_que_lleva == OPEN && fl == 101 && flags[28] == 1) + else if (pickedObject == kVerbOpen && fl == 101 && flags[28] == 1) openDoor(0, 1); - else if (objeto_que_lleva == CLOSE && fl == 101) + else if (pickedObject == kVerbClose && fl == 101) closeDoor(0, 1); - else if(objeto_que_lleva == PICK && fl == 141) { + else if(pickedObject == kVerbPick && fl == 141) { pickObject(19); visible[2] = 0; flags[10] = 1; - } else if(objeto_que_lleva == 7 && fl == 101) { + } else if(pickedObject == 7 && fl == 101) { flags[28] = 1; openDoor(0, 1); withoutVerb(); - } else if (objeto_que_lleva == 21 && fl == 179) { + } else if (pickedObject == 21 && fl == 179) { animation_9_4(); return true; } else @@ -740,13 +740,13 @@ bool DrasculaEngine::room_21(int fl) { } void DrasculaEngine::room_22(int fl) { - if (objeto_que_lleva == PICK && fl == 140) + if (pickedObject == kVerbPick && fl == 140) talk(_text[_lang][7], "7.als"); - else if (objeto_que_lleva == 11 && fl == 140) { + else if (pickedObject == 11 && fl == 140) { pickObject(18); visible[1] = 0; flags[24] = 1; - } else if (objeto_que_lleva == 22 && fl == 52) { + } else if (pickedObject == 22 && fl == 52) { anima("up.bin",14); flags[26]=1; playSound("s1.als"); @@ -758,13 +758,13 @@ void DrasculaEngine::room_22(int fl) { sentido_hare = 3; talk(_text[_lang][499], "499.als"); talk(_text[_lang][500], "500.als"); - } else if (objeto_que_lleva == LOOK && fl == 52) + } else if (pickedObject == kVerbLook && fl == 52) talk(_text[_lang][497], "497.als"); - else if (objeto_que_lleva == TALK && fl == 52) + else if (pickedObject == kVerbTalk && fl == 52) talk(_text[_lang][498], "498.als"); - else if (objeto_que_lleva == PICK && fl == 180 && flags[26] == 0) + else if (pickedObject == kVerbPick && fl == 180 && flags[26] == 0) talk(_text[_lang][420], "420.als"); - else if (objeto_que_lleva == PICK && fl == 180 && flags[26] == 1) { + else if (pickedObject == kVerbPick && fl == 180 && flags[26] == 1) { pickObject(7); visible[3] = 0; flags[27] = 1; @@ -773,17 +773,17 @@ void DrasculaEngine::room_22(int fl) { } void DrasculaEngine::room_23(int fl) { - if (objeto_que_lleva == OPEN && fl == 103) { + if (pickedObject == kVerbOpen && fl == 103) { openDoor(0, 0); updateData(); - } else if(objeto_que_lleva == CLOSE && fl == 103) { + } else if(pickedObject == kVerbClose && fl == 103) { closeDoor(0, 0); updateData(); - } else if(objeto_que_lleva == OPEN && fl == 104) + } else if(pickedObject == kVerbOpen && fl == 104) openDoor(1, 1); - else if(objeto_que_lleva == CLOSE && fl == 104) + else if(pickedObject == kVerbClose && fl == 104) closeDoor(1, 1); - else if(objeto_que_lleva == PICK && fl == 142) { + else if(pickedObject == kVerbPick && fl == 142) { pickObject(8); visible[2] = 0; flags[11] = 1; @@ -796,36 +796,36 @@ void DrasculaEngine::room_23(int fl) { } void DrasculaEngine::room_24(int fl) { - if (objeto_que_lleva == OPEN && fl == 105) + if (pickedObject == kVerbOpen && fl == 105) openDoor(1, 0); - else if (objeto_que_lleva == CLOSE && fl == 105) + else if (pickedObject == kVerbClose && fl == 105) closeDoor(1, 0); - else if (objeto_que_lleva == OPEN && fl == 106) + else if (pickedObject == kVerbOpen && fl == 106) openDoor(2, 1); - else if (objeto_que_lleva == CLOSE && fl == 106) + else if (pickedObject == kVerbClose && fl == 106) closeDoor(2, 1); - else if (objeto_que_lleva == LOOK && fl == 151) + else if (pickedObject == kVerbLook && fl == 151) talk(_text[_lang][461], "461.als"); else hay_respuesta = 0; } void DrasculaEngine::room_26(int fl) { - if (objeto_que_lleva == OPEN && fl == 107 && flags[30] == 0) + if (pickedObject == kVerbOpen && fl == 107 && flags[30] == 0) openDoor(2, 0); - else if (objeto_que_lleva == OPEN && fl == 107 && flags[30] == 1) + else if (pickedObject == kVerbOpen && fl == 107 && flags[30] == 1) talk(_text[_lang][421], "421.als"); - else if (objeto_que_lleva == CLOSE && fl == 107) + else if (pickedObject == kVerbClose && fl == 107) closeDoor(2, 0); - else if (objeto_que_lleva == 10 && fl == 50 && flags[18] == 1 && flags[12] == 1) + else if (pickedObject == 10 && fl == 50 && flags[18] == 1 && flags[12] == 1) animation_5_4(); - else if (objeto_que_lleva == 8 && fl == 50 && flags[18] == 1 && flags[12] == 1) + else if (pickedObject == 8 && fl == 50 && flags[18] == 1 && flags[12] == 1) animation_5_4(); - else if (objeto_que_lleva == 12 && fl == 50 && flags[18] == 1 && flags[12] == 1) + else if (pickedObject == 12 && fl == 50 && flags[18] == 1 && flags[12] == 1) animation_5_4(); - else if (objeto_que_lleva == 16 && fl == 50 && flags[18] == 1 && flags[12] == 1) + else if (pickedObject == 16 && fl == 50 && flags[18] == 1 && flags[12] == 1) animation_5_4(); - else if (objeto_que_lleva == PICK && fl == 143 && flags[18] == 1) { + else if (pickedObject == kVerbPick && fl == 143 && flags[18] == 1) { lleva_al_hare(260, 180); pickObject(10); visible[1] = 0; @@ -836,49 +836,49 @@ void DrasculaEngine::room_26(int fl) { flags[30] = 1; talk_igorpuerta(_texti[_lang][28], "I28.als"); lleva_al_hare(153, 180); - } else if (objeto_que_lleva == PICK && fl == 143 && flags[18] == 0) { + } else if (pickedObject == kVerbPick && fl == 143 && flags[18] == 0) { lleva_al_hare(260, 180); copyBackground(80, 78, 199, 94, 38, 27, dir_dibujo3, dir_zona_pantalla); updateScreen(199, 94, 199, 94, 38, 27, dir_zona_pantalla); pause(3); talk_igor_peluca(_texti[_lang][25], "I25.als"); lleva_al_hare(153, 180); - } else if (objeto_que_lleva == TALK && fl == 51) + } else if (pickedObject == kVerbTalk && fl == 51) animation_1_4(); - else if (objeto_que_lleva == OPEN && fl == 167) + else if (pickedObject == kVerbOpen && fl == 167) talk(_text[_lang][467], "467.als"); - else if (objeto_que_lleva == LOOK && fl == 164) + else if (pickedObject == kVerbLook && fl == 164) talk(_text[_lang][470], "470.als"); - else if (objeto_que_lleva == OPEN && fl == 164) + else if (pickedObject == kVerbOpen && fl == 164) talk(_text[_lang][471], "471.als"); - else if (objeto_que_lleva == LOOK && fl == 163) + else if (pickedObject == kVerbLook && fl == 163) talk(_text[_lang][472], "472.als"); - else if (objeto_que_lleva == PICK && fl == 163) + else if (pickedObject == kVerbPick && fl == 163) talk(_text[_lang][473], "473.als"); - else if (objeto_que_lleva == LOOK && fl == 165) + else if (pickedObject == kVerbLook && fl == 165) talk(_text[_lang][474], "474.als"); - else if (objeto_que_lleva == LOOK && fl == 168) + else if (pickedObject == kVerbLook && fl == 168) talk(_text[_lang][476], "476.als"); - else if (objeto_que_lleva == PICK && fl == 168) + else if (pickedObject == kVerbPick && fl == 168) talk(_text[_lang][477], "477.als"); else hay_respuesta = 0; } void DrasculaEngine::room_27(int fl) { - if (objeto_que_lleva == OPEN && fl == 110) + if (pickedObject == kVerbOpen && fl == 110) openDoor(6, 1); - else if (objeto_que_lleva == CLOSE && fl == 110) + else if (pickedObject == kVerbClose && fl == 110) closeDoor(6, 1); - else if (objeto_que_lleva == OPEN && fl == 116 && flags[23] == 0) + else if (pickedObject == kVerbOpen && fl == 116 && flags[23] == 0) talk(_text[_lang][419], "419.als"); - else if (objeto_que_lleva == OPEN && fl == 116 && flags[23] == 1) + else if (pickedObject == kVerbOpen && fl == 116 && flags[23] == 1) openDoor(5, 3); - else if (objeto_que_lleva == 17 && fl == 116) { + else if (pickedObject == 17 && fl == 116) { flags[23] = 1; openDoor(5,3); withoutVerb(); - } else if (objeto_que_lleva == LOOK && fl == 175) + } else if (pickedObject == kVerbLook && fl == 175) talk(_text[_lang][429], "429.als"); else if (fl == 150) talk(_text[_lang][460], "460.als"); @@ -887,34 +887,34 @@ void DrasculaEngine::room_27(int fl) { } void DrasculaEngine::room_29(int fl) { - if (objeto_que_lleva == OPEN && fl == 114) + if (pickedObject == kVerbOpen && fl == 114) openDoor(4, 1); - else if (objeto_que_lleva == CLOSE && fl == 114) + else if (pickedObject == kVerbClose && fl == 114) closeDoor(4, 1); - else if (objeto_que_lleva == LOOK && fl == 152) + else if (pickedObject == kVerbLook && fl == 152) talk(_text[_lang][463], "463.als"); - else if (objeto_que_lleva == OPEN && fl == 152) + else if (pickedObject == kVerbOpen && fl == 152) talk(_text[_lang][464], "464.als"); - else if (objeto_que_lleva == LOOK && fl == 153) + else if (pickedObject == kVerbLook && fl == 153) talk(_text[_lang][465], "465.als"); - else if (objeto_que_lleva == PICK && fl == 154) + else if (pickedObject == kVerbPick && fl == 154) talk(_text[_lang][466], "466.als"); - else if (objeto_que_lleva == OPEN && fl == 156) + else if (pickedObject == kVerbOpen && fl == 156) talk(_text[_lang][467], "467.als"); else hay_respuesta = 0; } void DrasculaEngine::room_30(int fl) { - if (objeto_que_lleva == OPEN && fl == 115) + if (pickedObject == kVerbOpen && fl == 115) openDoor(4, 0); - else if (objeto_que_lleva == CLOSE && fl == 115) + else if (pickedObject == kVerbClose && fl == 115) closeDoor(4, 0); - else if (objeto_que_lleva == OPEN && fl == 144 && flags[19] == 0) + else if (pickedObject == kVerbOpen && fl == 144 && flags[19] == 0) talk(_text[_lang][422], "422.als"); - else if (objeto_que_lleva == OPEN && fl == 144 && flags[19] == 1 && flags[22] == 1) + else if (pickedObject == kVerbOpen && fl == 144 && flags[19] == 1 && flags[22] == 1) openDoor(16, 1); - else if (objeto_que_lleva == OPEN && fl == 144 && flags[19] == 1 && flags[22] == 0) { + else if (pickedObject == kVerbOpen && fl == 144 && flags[19] == 1 && flags[22] == 0) { openDoor(16, 1); talk(_text[_lang][423], "423.als"); flags[22] = 1; @@ -923,59 +923,59 @@ void DrasculaEngine::room_30(int fl) { flags[18] = 1; if (flags[18] == 1) animation_6_4(); - } else if (objeto_que_lleva == CLOSE && fl == 144) + } else if (pickedObject == kVerbClose && fl == 144) closeDoor(16, 1); - else if (objeto_que_lleva == 13 && fl == 144) { + else if (pickedObject == 13 && fl == 144) { talk(_text[_lang][424], "424.als"); flags[19] = 1; - } else if (objeto_que_lleva == OPEN && fl == 157) + } else if (pickedObject == kVerbOpen && fl == 157) talk(_text[_lang][468], "468.als"); - else if (objeto_que_lleva == LOOK && fl == 158) + else if (pickedObject == kVerbLook && fl == 158) talk(_text[_lang][469], "469.als"); else hay_respuesta = 0; } void DrasculaEngine::room_31(int fl) { - if (objeto_que_lleva == PICK && fl == 145) { + if (pickedObject == kVerbPick && fl == 145) { pickObject(11); visible[1] = 0; flags[13] = 1; - } else if (objeto_que_lleva == OPEN && fl == 117) + } else if (pickedObject == kVerbOpen && fl == 117) openDoor(5, 0); - else if (objeto_que_lleva == CLOSE && fl == 117) + else if (pickedObject == kVerbClose && fl == 117) closeDoor(5, 0); - else if (objeto_que_lleva == LOOK && fl == 161) + else if (pickedObject == kVerbLook && fl == 161) talk(_text[_lang][470], "470.als"); - else if (objeto_que_lleva == OPEN && fl == 161) + else if (pickedObject == kVerbOpen && fl == 161) talk(_text[_lang][471], "471.als"); else hay_respuesta = 0; } void DrasculaEngine::room_34(int fl) { - if (objeto_que_lleva == MOVE && fl == 146) + if (pickedObject == kVerbMove && fl == 146) animation_8_4(); - else if (objeto_que_lleva == LOOK && fl == 146) + else if (pickedObject == kVerbLook && fl == 146) talk(_text[_lang][458], "458.als"); - else if (objeto_que_lleva == PICK && fl == 146) + else if (pickedObject == kVerbPick && fl == 146) talk(_text[_lang][459], "459.als"); - else if (objeto_que_lleva == OPEN && fl == 120 && flags[25] == 1) + else if (pickedObject == kVerbOpen && fl == 120 && flags[25] == 1) openDoor(8, 2); - else if (objeto_que_lleva == OPEN && fl == 120 && flags[25] == 0) { + else if (pickedObject == kVerbOpen && fl == 120 && flags[25] == 0) { openDoor(8, 2); sentido_hare = 3; talk(_text[_lang][425], "425.als"); pickObject(14); flags[25] = 1; - } else if (objeto_que_lleva == CLOSE && fl == 120) + } else if (pickedObject == kVerbClose && fl == 120) closeDoor(8, 2); else hay_respuesta=0; } void DrasculaEngine::room_35(int fl) { - if (objeto_que_lleva == PICK && fl == 148) { + if (pickedObject == kVerbPick && fl == 148) { pickObject(16); visible[2] = 0; flags[14] = 1; @@ -983,14 +983,14 @@ void DrasculaEngine::room_35(int fl) { flags[18] = 1; if (flags[18] == 1) animation_6_4(); - } else if (objeto_que_lleva == PICK && fl == 147) { + } else if (pickedObject == kVerbPick && fl == 147) { talk(_text[_lang][426], "426.als"); pickObject(15); visible[1] = 0; flags[15] = 1; flags[17] = 1; updateData(); - } else if (objeto_que_lleva == PICK && fl == 149) { + } else if (pickedObject == kVerbPick && fl == 149) { pickObject(13); visible[3] = 0; flags[17] = 0; @@ -999,54 +999,54 @@ void DrasculaEngine::room_35(int fl) { } void DrasculaEngine::room_44(int fl) { - if (objeto_que_lleva == LOOK && fl == 172) + if (pickedObject == kVerbLook && fl == 172) talk(_text[_lang][428], "428.als"); else hay_respuesta = 0; } void DrasculaEngine::room_49(int fl){ - if (objeto_que_lleva == TALK && fl ==51) + if (pickedObject == kVerbTalk && fl ==51) conversa("op_9.cal"); - else if (objeto_que_lleva == LOOK && fl == 51) + else if (pickedObject == kVerbLook && fl == 51) talk(_text[_lang][132], "132.als"); - else if ((objeto_que_lleva == 8 && fl == 51) || (objeto_que_lleva == 8 && fl == 203)) + else if ((pickedObject == 8 && fl == 51) || (pickedObject == 8 && fl == 203)) animation_5_5(); - else if (objeto_que_lleva == LOOK && fl == 200) + else if (pickedObject == kVerbLook && fl == 200) talk(_text[_lang][133], "133.als"); - else if (objeto_que_lleva == TALK && fl == 200) + else if (pickedObject == kVerbTalk && fl == 200) talk(_text[_lang][134], "134.als"); - else if (objeto_que_lleva == LOOK && fl == 201) + else if (pickedObject == kVerbLook && fl == 201) talk(_text[_lang][135], "135.als"); - else if (objeto_que_lleva == LOOK && fl == 203) + else if (pickedObject == kVerbLook && fl == 203) talk(_text[_lang][137], "137.als"); else hay_respuesta = 0; } void DrasculaEngine::room_53(int fl) { - if (objeto_que_lleva == PICK && fl == 120) { + if (pickedObject == kVerbPick && fl == 120) { pickObject(16); visible[3] = 0; - } else if (objeto_que_lleva == LOOK && fl == 121) + } else if (pickedObject == kVerbLook && fl == 121) talk(_text[_lang][128], "128.als"); - else if (objeto_que_lleva == LOOK && fl == 209) + else if (pickedObject == kVerbLook && fl == 209) talk(_text[_lang][129], "129.als"); - else if (objeto_que_lleva == MOVE && fl == 123) + else if (pickedObject == kVerbMove && fl == 123) animation_11_5(); - else if (objeto_que_lleva == LOOK && fl == 52) + else if (pickedObject == kVerbLook && fl == 52) talk(_text[_lang][447], "447.als"); - else if (objeto_que_lleva == TALK && fl == 52) + else if (pickedObject == kVerbTalk && fl == 52) talk(_text[_lang][131], "131.als"); - else if (objeto_que_lleva == 12 && fl == 52) + else if (pickedObject == 12 && fl == 52) animation_10_5(); - else if (objeto_que_lleva == 15 && fl == 52) + else if (pickedObject == 15 && fl == 52) animation_9_5(); - else if (objeto_que_lleva == 16 && fl == 121) { + else if (pickedObject == 16 && fl == 121) { flags[2] = 1; withoutVerb(); updateData(); - } else if (objeto_que_lleva == 16) { + } else if (pickedObject == 16) { talk(_text[_lang][439], "439.als"); withoutVerb(); visible[3] = 1; @@ -1055,13 +1055,13 @@ void DrasculaEngine::room_53(int fl) { } void DrasculaEngine::room_54(int fl) { - if ((objeto_que_lleva == TALK && fl == 118) || (objeto_que_lleva == LOOK && fl == 118 && flags[0] == 0)) + if ((pickedObject == kVerbTalk && fl == 118) || (pickedObject == kVerbLook && fl == 118 && flags[0] == 0)) animation_1_5(); - else if (objeto_que_lleva == LOOK && fl == 118 && flags[0]==1) + else if (pickedObject == kVerbLook && fl == 118 && flags[0]==1) talk(_text[_lang][124], "124.als"); - else if (objeto_que_lleva == LOOK && fl == 53) + else if (pickedObject == kVerbLook && fl == 53) talk(_text[_lang][127], "127.als"); - else if (objeto_que_lleva == TALK && fl == 53 && flags[14] == 0) { + else if (pickedObject == kVerbTalk && fl == 53 && flags[14] == 0) { talk(_text[_lang][288], "288.als"); flags[12] = 1; pause(10); @@ -1072,18 +1072,18 @@ void DrasculaEngine::room_54(int fl) { conversa("op_10.cal"); flags[12] = 0; flags[14] = 1; - } else if (objeto_que_lleva == TALK && fl == 53 && flags[14] == 1) + } else if (pickedObject == kVerbTalk && fl == 53 && flags[14] == 1) talk(_text[_lang][109], "109.als"); - else if (objeto_que_lleva == PICK && fl == 9999 && flags[13] == 0) { + else if (pickedObject == kVerbPick && fl == 9999 && flags[13] == 0) { pickObject(8); flags[13] = 1; talk_mus(_texte[_lang][10], "e10.als"); updateData(); - } else if (objeto_que_lleva == OPEN && fl == 119) + } else if (pickedObject == kVerbOpen && fl == 119) talk(_text[_lang][125], "125.als"); - else if (objeto_que_lleva == LOOK && fl == 119) + else if (pickedObject == kVerbLook && fl == 119) talk(_text[_lang][126], "126.als"); - else if (objeto_que_lleva == 10 && fl == 119) { + else if (pickedObject == 10 && fl == 119) { pause(4); talk(_text[_lang][436], "436.als"); withoutVerb(); @@ -1093,15 +1093,15 @@ void DrasculaEngine::room_54(int fl) { } void DrasculaEngine::room_55(int fl) { - if (objeto_que_lleva == PICK && fl == 122) { + if (pickedObject == kVerbPick && fl == 122) { pickObject(12); flags[8] = 1; updateData(); - } else if (objeto_que_lleva == LOOK && fl == 122) + } else if (pickedObject == kVerbLook && fl == 122) talk(_text[_lang][138], "138.als"); - else if (objeto_que_lleva == LOOK && fl == 204) + else if (pickedObject == kVerbLook && fl == 204) talk(_text[_lang][139], "139.als"); - else if (objeto_que_lleva == LOOK && fl == 205) + else if (pickedObject == kVerbLook && fl == 205) talk(_text[_lang][140], "140.als"); else if (fl == 206) { playSound("s11.als"); @@ -1113,14 +1113,14 @@ void DrasculaEngine::room_55(int fl) { } bool DrasculaEngine::room_56(int fl) { - if (objeto_que_lleva == OPEN && fl == 124) { + if (pickedObject == kVerbOpen && fl == 124) { animation_14_5(); return true; - } else if (objeto_que_lleva == LOOK && fl == 124) + } else if (pickedObject == kVerbLook && fl == 124) talk(_text[_lang][450], "450.als"); - else if (objeto_que_lleva == OPEN && fl == 207) + else if (pickedObject == kVerbOpen && fl == 207) talk(_text[_lang][141], "141.als"); - else if (objeto_que_lleva == LOOK && fl == 208) + else if (pickedObject == kVerbLook && fl == 208) talk(_text[_lang][142], "142.als"); else hay_respuesta = 0; @@ -1129,16 +1129,16 @@ bool DrasculaEngine::room_56(int fl) { } void DrasculaEngine::room_58(int fl) { - if (objeto_que_lleva == MOVE && fl == 103) + if (pickedObject == kVerbMove && fl == 103) animation_7_6(); - else if (objeto_que_lleva == LOOK && fl == 104) + else if (pickedObject == kVerbLook && fl == 104) talk(_text[_lang][454], "454.als"); else hay_respuesta = 0; } void DrasculaEngine::room_59(int fl) { - if ((objeto_que_lleva == TALK && fl == 51) || (objeto_que_lleva == LOOK && fl == 51)) { + if ((pickedObject == kVerbTalk && fl == 51) || (pickedObject == kVerbLook && fl == 51)) { flags[9] = 1; talk(_text[_lang][259], "259.als"); talk_bj_cama(_textbj[_lang][13], "bj13.als"); @@ -1212,36 +1212,36 @@ void DrasculaEngine::room_59(int fl) { } bool DrasculaEngine::room_60(int fl) { - if (objeto_que_lleva == MOVE && fl == 112) + if (pickedObject == kVerbMove && fl == 112) animation_10_6(); - else if (objeto_que_lleva == LOOK && fl == 112) + else if (pickedObject == kVerbLook && fl == 112) talk(_text[_lang][440], "440.als"); - else if (objeto_que_lleva == TALK && fl == 52) { + else if (pickedObject == kVerbTalk && fl == 52) { talk(_text[_lang][266], "266.als"); talk_taber2(_textt[_lang][1], "t1.als"); conversa("op_12.cal"); withoutVerb(); - objeto_que_lleva = 0; - } else if (objeto_que_lleva == TALK && fl == 115) + pickedObject = 0; + } else if (pickedObject == kVerbTalk && fl == 115) talk(_text[_lang][455], "455.als"); - else if (objeto_que_lleva == TALK && fl == 56) + else if (pickedObject == kVerbTalk && fl == 56) talk(_text[_lang][455], "455.als"); - else if (objeto_que_lleva == LOOK && fl == 114) + else if (pickedObject == kVerbLook && fl == 114) talk(_text[_lang][167], "167.als"); - else if (objeto_que_lleva == LOOK && fl == 113) + else if (pickedObject == kVerbLook && fl == 113) talk(_text[_lang][168], "168.als"); - else if (objeto_que_lleva == PICK && fl == 113) + else if (pickedObject == kVerbPick && fl == 113) talk(_text[_lang][170], "170.als"); - else if (objeto_que_lleva == MOVE && fl == 113) + else if (pickedObject == kVerbMove && fl == 113) talk(_text[_lang][170], "170.als"); - else if (objeto_que_lleva == TALK && fl == 113) + else if (pickedObject == kVerbTalk && fl == 113) talk(_text[_lang][169], "169.als"); - else if (objeto_que_lleva == 21 && fl == 56) + else if (pickedObject == 21 && fl == 56) animation_18_6(); - else if (objeto_que_lleva == 9 && fl == 56 && flags[6] == 1) { + else if (pickedObject == 9 && fl == 56 && flags[6] == 1) { animation_9_6(); return true; - } else if (objeto_que_lleva == 9 && fl == 56 && flags[6] == 0) { + } else if (pickedObject == 9 && fl == 56 && flags[6] == 0) { anima("cnf.bin", 14); talk(_text[_lang][455], "455.als"); } else @@ -1251,67 +1251,67 @@ bool DrasculaEngine::room_60(int fl) { } void DrasculaEngine::room_61(int fl) { - if (objeto_que_lleva == LOOK && fl == 116) + if (pickedObject == kVerbLook && fl == 116) talk(_text[_lang][172], "172.als"); - else if (objeto_que_lleva == LOOK && fl == 117) + else if (pickedObject == kVerbLook && fl == 117) talk(_text[_lang][173], "173.als"); - else if (objeto_que_lleva == MOVE && fl == 117) + else if (pickedObject == kVerbMove && fl == 117) talk(_text[_lang][174], "174.als"); - else if (objeto_que_lleva == OPEN && fl == 117) + else if (pickedObject == kVerbOpen && fl == 117) talk(_text[_lang][174], "174.als"); else hay_respuesta = 0; } void DrasculaEngine::room_62(int fl) { - if (objeto_que_lleva == TALK && fl == 53) + if (pickedObject == kVerbTalk && fl == 53) conversa("op_13.cal"); - else if (objeto_que_lleva == TALK && fl == 52 && flags[0] == 0) + else if (pickedObject == kVerbTalk && fl == 52 && flags[0] == 0) animation_3_1(); - else if (objeto_que_lleva == TALK && fl == 52 && flags[0] == 1) + else if (pickedObject == kVerbTalk && fl == 52 && flags[0] == 1) talk(_text[_lang][109], "109.als"); - else if (objeto_que_lleva == TALK && fl == 54) + else if (pickedObject == kVerbTalk && fl == 54) animation_4_1(); - else if (objeto_que_lleva == LOOK && fl == 100) + else if (pickedObject == kVerbLook && fl == 100) talk(_text[_lang][168], "168.als"); - else if (objeto_que_lleva == TALK && fl == 100) + else if (pickedObject == kVerbTalk && fl == 100) talk(_text[_lang][169], "169.als"); - else if (objeto_que_lleva == PICK && fl == 100) + else if (pickedObject == kVerbPick && fl == 100) talk(_text[_lang][170], "170.als"); - else if (objeto_que_lleva == LOOK && fl == 101) + else if (pickedObject == kVerbLook && fl == 101) talk(_text[_lang][171], "171.als"); - else if (objeto_que_lleva == LOOK && fl == 102) + else if (pickedObject == kVerbLook && fl == 102) talk(_text[_lang][167], "167.als"); - else if (objeto_que_lleva == LOOK && fl == 103) + else if (pickedObject == kVerbLook && fl == 103) talk(_text[_lang][166], "166.als"); else hay_respuesta = 0; } void DrasculaEngine::room_63(int fl) { - if (objeto_que_lleva == LOOK && fl == 110) + if (pickedObject == kVerbLook && fl == 110) talk(_text[_lang][172], "172.als"); - else if (objeto_que_lleva == LOOK && fl == 109) + else if (pickedObject == kVerbLook && fl == 109) talk(_text[_lang][173], "173.als"); - else if (objeto_que_lleva == MOVE && fl == 109) + else if (pickedObject == kVerbMove && fl == 109) talk(_text[_lang][174], "174.als"); - else if (objeto_que_lleva == LOOK && fl == 108) + else if (pickedObject == kVerbLook && fl == 108) talk(_text[_lang][334], "334.als"); - else if (objeto_que_lleva == TALK && fl == 108) + else if (pickedObject == kVerbTalk && fl == 108) talk(_text[_lang][333], "333.als"); else hay_respuesta = 0; } void DrasculaEngine::room_pendulo(int fl) { - if (objeto_que_lleva == LOOK && fl == 100) + if (pickedObject == kVerbLook && fl == 100) talk(_text[_lang][452], "452.als"); - else if (objeto_que_lleva == LOOK && fl == 101) + else if (pickedObject == kVerbLook && fl == 101) talk (_text[_lang][123], "123.als"); - else if (objeto_que_lleva == PICK && fl == 101) + else if (pickedObject == kVerbPick && fl == 101) pickObject(20); - else if (objeto_que_lleva == 20 && fl == 100) + else if (pickedObject == 20 && fl == 100) animation_6_6(); - else if (objeto_que_lleva == PICK || objeto_que_lleva == OPEN) + else if (pickedObject == kVerbPick || pickedObject == kVerbOpen) talk(_text[_lang][453], "453.als"); else hay_respuesta = 0; -- cgit v1.2.3 From 4512958d743960763c3859f7c5df93a337571665 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 27 May 2008 12:22:34 +0000 Subject: longitud -> length respuesta -> answer objetos_que_tengo -> inventoryObjects boton -> button cuadrante -> quadrant distancia -> distance juego -> game frase -> phrase suena -> sound usado -> used responde -> response puesto -> position svn-id: r32321 --- engines/drascula/animation.cpp | 6 +- engines/drascula/drascula.cpp | 382 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 18 +- engines/drascula/rooms.cpp | 82 ++++----- engines/drascula/talk.cpp | 156 ++++++++--------- 5 files changed, 322 insertions(+), 322 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 562a23a1c2..bb1c5e1e73 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -380,7 +380,7 @@ void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { int x_talk[4] = {47, 93, 139, 185}; int cara; int l = 0; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -427,8 +427,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 3e3af79265..5c274b1ef0 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -172,7 +172,7 @@ int DrasculaEngine::go() { step_x = PASO_HARE_X; step_y = PASO_HARE_Y; alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; alto_pies = PIES_HARE; alto_talk = ALTO_TALK_HARE; ancho_talk = ANCHO_TALK_HARE; - hay_respuesta = 0; + hay_answer = 0; conta_ciego_vez = 0; cambio_de_color = 0; rompo_y_salgo = 0; @@ -517,7 +517,7 @@ bool DrasculaEngine::escoba() { } for (n = 1; n < 43; n++) - objetos_que_tengo[n] = 0; + inventoryObjects[n] = 0; for (n = 0; n < NUM_FLAGS; n++) flags[n] = 0; @@ -529,7 +529,7 @@ bool DrasculaEngine::escoba() { } for (n = 1; n < 7; n++) - objetos_que_tengo[n] = n; + inventoryObjects[n] = n; if (num_ejec == 1) { pickObject(28); @@ -669,7 +669,7 @@ bucles: if (menu_scr == 0 && lleva_objeto == 1) comprueba_objetos(); - if (boton_dch == 1 && menu_scr == 1) { + if (button_dch == 1 && menu_scr == 1) { delay(100); if (num_ejec == 2) loadPic(fondo_y_menu); @@ -682,7 +682,7 @@ bucles: if (num_ejec != 3) cont_sv = 0; } - if (boton_dch == 1 && menu_scr == 0) { + if (button_dch == 1 && menu_scr == 0) { delay(100); hare_se_mueve = 0; if (sentido_hare == 2) @@ -703,18 +703,18 @@ bucles: cont_sv = 0; } - if (boton_izq == 1 && menu_bar == 1) { + if (button_izq == 1 && menu_bar == 1) { delay(100); elige_en_barra(); if (num_ejec != 3) cont_sv = 0; - } else if (boton_izq == 1 && lleva_objeto == 0) { + } else if (button_izq == 1 && lleva_objeto == 0) { delay(100); if (comprueba1()) return true; if (num_ejec != 3) cont_sv = 0; - } else if (boton_izq == 1 && lleva_objeto == 1) { + } else if (button_izq == 1 && lleva_objeto == 1) { if (comprueba2()) return true; if (num_ejec != 3) @@ -831,8 +831,8 @@ int DrasculaEngine::resta_objeto(int osj) { int result = 1; for (int h = 1; h < 43; h++) { - if (objetos_que_tengo[h] == osj) { - objetos_que_tengo[h] = 0; + if (inventoryObjects[h] == osj) { + inventoryObjects[h] = 0; result = 0; break; } @@ -1398,16 +1398,16 @@ void DrasculaEngine::updateEvents() { mouseY = event.mouse.y; break; case Common::EVENT_LBUTTONDOWN: - boton_izq = 1; + button_izq = 1; break; case Common::EVENT_LBUTTONUP: - boton_izq = 0; + button_izq = 0; break; case Common::EVENT_RBUTTONDOWN: - boton_dch = 1; + button_dch = 1; break; case Common::EVENT_RBUTTONUP: - boton_dch = 0; + button_dch = 0; break; case Common::EVENT_QUIT: // TODO @@ -1464,11 +1464,11 @@ void DrasculaEngine::mesa() { MirarRaton(); - if (boton_dch == 1) { + if (button_dch == 1) { delay(100); break; } - if (boton_izq == 1) { + if (button_izq == 1) { delay(100); if (mouseX > 80 && mouseX < 121) { int vol = _mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16; @@ -1548,7 +1548,7 @@ bool DrasculaEngine::saves() { MirarRaton(); - if (boton_izq == 1) { + if (button_izq == 1) { delay(100); for (n = 0; n < NUM_SAVES; n++) { if (mouseX > 115 && mouseY > y + (9 * n) && mouseX < 115 + 175 && mouseY < y + 10 + (9 * n)) { @@ -1640,10 +1640,10 @@ bool DrasculaEngine::saves() { void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) { int pos_texto[8]; - int y_de_letra = 0, x_de_letra = 0, h, longitud; - longitud = strlen(said); + int y_de_letra = 0, x_de_letra = 0, h, length; + length = strlen(said); - for (h = 0; h < longitud; h++) { + for (h = 0; h < length; h++) { y_de_letra = (_lang == kSpanish) ? Y_ABC_ESP : Y_ABC; int c = toupper(said[h]); if (c == 'A') @@ -1957,7 +1957,7 @@ void DrasculaEngine::salva_pantallas() { // end of efecto() MirarRaton(); - if (boton_dch == 1 || boton_izq == 1) + if (button_dch == 1 || button_izq == 1) break; if (mouseX != xr) break; @@ -2370,7 +2370,7 @@ bool DrasculaEngine::carga_partida(const char *nom_game) { sentido_hare = sav->readSint32LE(); for (l = 1; l < 43; l++) { - objetos_que_tengo[l] = sav->readSint32LE(); + inventoryObjects[l] = sav->readSint32LE(); } for (l = 0; l < NUM_FLAGS; l++) { @@ -2498,26 +2498,26 @@ void DrasculaEngine::empieza_andar() { if (num_ejec == 2) { if ((sitio_x < hare_x) && (sitio_y <= (hare_y + alto_hare))) - cuadrante_1(); + quadrant_1(); else if ((sitio_x < hare_x) && (sitio_y > (hare_y + alto_hare))) - cuadrante_3(); + quadrant_3(); else if ((sitio_x > hare_x + ancho_hare) && (sitio_y <= (hare_y + alto_hare))) - cuadrante_2(); + quadrant_2(); else if ((sitio_x > hare_x + ancho_hare) && (sitio_y > (hare_y + alto_hare))) - cuadrante_4(); + quadrant_4(); else if (sitio_y < hare_y + alto_hare) anda_parriba(); else if (sitio_y > hare_y + alto_hare) anda_pabajo(); } else { if ((sitio_x < hare_x + ancho_hare / 2 ) && (sitio_y <= (hare_y + alto_hare))) - cuadrante_1(); + quadrant_1(); else if ((sitio_x < hare_x + ancho_hare / 2) && (sitio_y > (hare_y + alto_hare))) - cuadrante_3(); + quadrant_3(); else if ((sitio_x > hare_x + ancho_hare / 2) && (sitio_y <= (hare_y + alto_hare))) - cuadrante_2(); + quadrant_2(); else if ((sitio_x > hare_x + ancho_hare / 2) && (sitio_y > (hare_y + alto_hare))) - cuadrante_4(); + quadrant_4(); else hare_se_mueve = 0; } @@ -2670,7 +2670,7 @@ void DrasculaEngine::menu_sin_volcar() { strcpy(texto_icono, iconName[x]); for (n = 1; n < 43; n++) { - h = objetos_que_tengo[n]; + h = inventoryObjects[n]; if (h != 0) { if (num_ejec == 6) @@ -2707,8 +2707,8 @@ void DrasculaEngine::saca_objeto() { for (n = 1; n < 43; n++){ if (sobre_que_objeto() == n) { - h = objetos_que_tengo[n]; - objetos_que_tengo[n] = 0; + h = inventoryObjects[n]; + inventoryObjects[n] = 0; if (h != 0) lleva_objeto = 1; } @@ -2880,8 +2880,8 @@ bool DrasculaEngine::coge_objeto() { goto usando_verbos; for (n = 1; n < 43; n++) { - if (sobre_que_objeto() == n && objetos_que_tengo[n] == 0) { - objetos_que_tengo[n] = h; + if (sobre_que_objeto() == n && inventoryObjects[n] == 0) { + inventoryObjects[n] = h; lleva_objeto = 0; comprueba_flags = 0; } @@ -2905,7 +2905,7 @@ bool DrasculaEngine::banderas(int fl) { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - hay_respuesta = 1; + hay_answer = 1; if (menu_scr == 1) { if (num_ejec == 1) { @@ -2962,7 +2962,7 @@ bool DrasculaEngine::banderas(int fl) { else if (pickedObject == kVerbLook && fl == 23) talk(_text[_lang][152], "152.als"); else - hay_respuesta = 0; + hay_answer = 0; } else if (num_ejec == 3) { if (pickedObject == kVerbLook && fl == 22) talk(_text[_lang][307], "307.als"); @@ -3007,7 +3007,7 @@ bool DrasculaEngine::banderas(int fl) { else if (pickedObject == kVerbLook && fl == 23) talk(_text[_lang][152], "152.als"); else - hay_respuesta = 0; + hay_answer = 0; } else if (num_ejec == 4) { if ((pickedObject == 18 && fl == 19) || (pickedObject == 19 && fl == 18)) { withoutVerb(); @@ -3057,7 +3057,7 @@ bool DrasculaEngine::banderas(int fl) { else if (pickedObject == kVerbLook && fl == 22) talk(_text[_lang][161], "161.als"); else - hay_respuesta = 0; + hay_answer = 0; } else if (num_ejec == 5) { if (pickedObject == kVerbLook && fl == 28) talk(_text[_lang][328], "328.als"); @@ -3085,7 +3085,7 @@ bool DrasculaEngine::banderas(int fl) { else if (pickedObject == kVerbLook && fl == 20) talk(_text[_lang][162], "162.als"); else - hay_respuesta = 0; + hay_answer = 0; } else if (num_ejec == 6) { if (pickedObject == kVerbLook && fl == 28) talk(_text[_lang][328], "328.als"); @@ -3097,7 +3097,7 @@ bool DrasculaEngine::banderas(int fl) { else if (pickedObject == kVerbLook && fl == 21) talk(_text[_lang][441], "441.als"); else - hay_respuesta = 0; + hay_answer = 0; } } else { if (num_ejec == 1) { @@ -3118,7 +3118,7 @@ bool DrasculaEngine::banderas(int fl) { else if (roomNumber == 63) room_63(fl); else - hay_respuesta = 0; + hay_answer = 0; } else if (num_ejec == 2) { if (pickedObject == kVerbLook && fl == 50) talk(_text[_lang][308], "308.als"); @@ -3170,7 +3170,7 @@ bool DrasculaEngine::banderas(int fl) { else if (roomNumber == 19) room_19(fl); else - hay_respuesta = 0; + hay_answer = 0; } else if (num_ejec == 3) { if (pickedObject == kVerbLook && fl == 50) talk(_text[_lang][309], "309.als"); @@ -3188,7 +3188,7 @@ bool DrasculaEngine::banderas(int fl) { if (room_13(fl)) return true; } else - hay_respuesta = 0; + hay_answer = 0; } else if (num_ejec == 4) { if (roomNumber == 28) talk(_text[_lang][178], "178.als"); @@ -3238,7 +3238,7 @@ bool DrasculaEngine::banderas(int fl) { else if (roomNumber == 44) room_44(fl); else - hay_respuesta = 0; + hay_answer = 0; } else if (num_ejec == 5) { if (pickedObject == kVerbLook && fl == 50) talk("Cuanto mas me miro, mas me gusto", "54.als"); @@ -3266,7 +3266,7 @@ bool DrasculaEngine::banderas(int fl) { if (room_56(fl)) return true; } else - hay_respuesta = 0; + hay_answer = 0; } else if (num_ejec == 6) { if (pickedObject == kVerbLook && fl == 50 && flags[0] == 1) talk(_text[_lang][308], "308.als"); @@ -3294,12 +3294,12 @@ bool DrasculaEngine::banderas(int fl) { } else if (roomNumber == 61) room_61(fl); else - hay_respuesta = 0; + hay_answer = 0; } } - if (hay_respuesta == 0 && hay_nombre == 1) + if (hay_answer == 0 && hay_nombre == 1) room_0(); - else if (hay_respuesta == 0 && menu_scr == 1) + else if (hay_answer == 0 && menu_scr == 1) room_0(); return false; @@ -3631,87 +3631,87 @@ char DrasculaEngine::codifica(char car) { return ~car; } -void DrasculaEngine::cuadrante_1() { - float distancia_x, distancia_y; +void DrasculaEngine::quadrant_1() { + float distance_x, distance_y; if (num_ejec == 2) - distancia_x = hare_x - sitio_x; + distance_x = hare_x - sitio_x; else - distancia_x = hare_x + ancho_hare / 2 - sitio_x; + distance_x = hare_x + ancho_hare / 2 - sitio_x; - distancia_y = (hare_y + alto_hare) - sitio_y; + distance_y = (hare_y + alto_hare) - sitio_y; - if (distancia_x < distancia_y) { + if (distance_x < distance_y) { direccion_hare = 0; sentido_hare = 2; - step_x = (int)(distancia_x / (distancia_y / PASO_HARE_Y)); + step_x = (int)(distance_x / (distance_y / PASO_HARE_Y)); } else { direccion_hare = 7; sentido_hare = 0; - step_y = (int)(distancia_y / (distancia_x / PASO_HARE_X)); + step_y = (int)(distance_y / (distance_x / PASO_HARE_X)); } } -void DrasculaEngine::cuadrante_2() { - float distancia_x, distancia_y; +void DrasculaEngine::quadrant_2() { + float distance_x, distance_y; if (num_ejec == 2) - distancia_x = abs(hare_x + ancho_hare - sitio_x); + distance_x = abs(hare_x + ancho_hare - sitio_x); else - distancia_x = abs(hare_x + ancho_hare / 2 - sitio_x); + distance_x = abs(hare_x + ancho_hare / 2 - sitio_x); - distancia_y = (hare_y + alto_hare) - sitio_y; + distance_y = (hare_y + alto_hare) - sitio_y; - if (distancia_x < distancia_y) { + if (distance_x < distance_y) { direccion_hare = 1; sentido_hare = 2; - step_x = (int)(distancia_x / (distancia_y / PASO_HARE_Y)); + step_x = (int)(distance_x / (distance_y / PASO_HARE_Y)); } else { direccion_hare = 2; sentido_hare = 1; - step_y = (int)(distancia_y / (distancia_x / PASO_HARE_X)); + step_y = (int)(distance_y / (distance_x / PASO_HARE_X)); } } -void DrasculaEngine::cuadrante_3() { - float distancia_x, distancia_y; +void DrasculaEngine::quadrant_3() { + float distance_x, distance_y; if (num_ejec == 2) - distancia_x = hare_x - sitio_x; + distance_x = hare_x - sitio_x; else - distancia_x = hare_x + ancho_hare / 2 - sitio_x; + distance_x = hare_x + ancho_hare / 2 - sitio_x; - distancia_y = sitio_y - (hare_y + alto_hare); + distance_y = sitio_y - (hare_y + alto_hare); - if (distancia_x < distancia_y) { + if (distance_x < distance_y) { direccion_hare = 5; sentido_hare = 3; - step_x = (int)(distancia_x / (distancia_y / PASO_HARE_Y)); + step_x = (int)(distance_x / (distance_y / PASO_HARE_Y)); } else { direccion_hare = 6; sentido_hare = 0; - step_y = (int)(distancia_y / (distancia_x / PASO_HARE_X)); + step_y = (int)(distance_y / (distance_x / PASO_HARE_X)); } } -void DrasculaEngine::cuadrante_4() { - float distancia_x, distancia_y; +void DrasculaEngine::quadrant_4() { + float distance_x, distance_y; if (num_ejec == 2) - distancia_x = abs(hare_x + ancho_hare - sitio_x); + distance_x = abs(hare_x + ancho_hare - sitio_x); else - distancia_x = abs(hare_x + ancho_hare / 2 - sitio_x); + distance_x = abs(hare_x + ancho_hare / 2 - sitio_x); - distancia_y = sitio_y - (hare_y + alto_hare); + distance_y = sitio_y - (hare_y + alto_hare); - if (distancia_x < distancia_y) { + if (distance_x < distance_y) { direccion_hare = 4; sentido_hare = 3; - step_x = (int)(distancia_x / (distancia_y / PASO_HARE_Y)); + step_x = (int)(distance_x / (distance_y / PASO_HARE_Y)); } else { direccion_hare = 3; sentido_hare = 1; - step_y = (int)(distancia_y / (distancia_x / PASO_HARE_X)); + step_y = (int)(distance_y / (distance_x / PASO_HARE_X)); } } @@ -3729,7 +3729,7 @@ void DrasculaEngine::saveGame(char nom_game[]) { out->writeSint32LE(sentido_hare); for (l = 1; l < 43; l++) { - out->writeSint32LE(objetos_que_tengo[l]); + out->writeSint32LE(inventoryObjects[l]); } for (l = 0; l < NUM_FLAGS; l++) { @@ -3797,7 +3797,7 @@ bool DrasculaEngine::comprueba_banderas_menu() { for (n = 0; n < 43; n++) { if (sobre_que_objeto() == n) { - h = objetos_que_tengo[n]; + h = inventoryObjects[n]; if (h != 0) if (banderas(h)) return true; @@ -3809,23 +3809,23 @@ bool DrasculaEngine::comprueba_banderas_menu() { void DrasculaEngine::conversa(const char *nom_fich) { int h; - int juego1 = 1, juego2 = 1, juego3 = 1, juego4 = 1; - char frase1[78]; - char frase2[78]; - char frase3[87]; - char frase4[78]; + int game1 = 1, game2 = 1, game3 = 1, game4 = 1; + char phrase1[78]; + char phrase2[78]; + char phrase3[87]; + char phrase4[78]; char para_codificar[13]; - char suena1[13]; - char suena2[13]; - char suena3[13]; - char suena4[13]; - int longitud; - int respuesta1; - int respuesta2; - int respuesta3; - int usado1 = 0; - int usado2 = 0; - int usado3 = 0; + char sound1[13]; + char sound2[13]; + char sound3[13]; + char sound4[13]; + int length; + int answer1; + int answer2; + int answer3; + int used1 = 0; + int used2 = 0; + int used3 = 0; char buffer[256]; rompo_y_salgo = 0; @@ -3843,67 +3843,67 @@ void DrasculaEngine::conversa(const char *nom_fich) { int size = ald->size(); getLine(ald, buffer, size); - sscanf(buffer, "%s", frase1); + sscanf(buffer, "%s", phrase1); getLine(ald, buffer, size); - sscanf(buffer, "%s", frase2); + sscanf(buffer, "%s", phrase2); getLine(ald, buffer, size); - sscanf(buffer, "%s", frase3); + sscanf(buffer, "%s", phrase3); getLine(ald, buffer, size); - sscanf(buffer, "%s", frase4); + sscanf(buffer, "%s", phrase4); getLine(ald, buffer, size); - sscanf(buffer, "%s", suena1); + sscanf(buffer, "%s", sound1); getLine(ald, buffer, size); - sscanf(buffer, "%s", suena2); + sscanf(buffer, "%s", sound2); getLine(ald, buffer, size); - sscanf(buffer, "%s", suena3); + sscanf(buffer, "%s", sound3); getLine(ald, buffer, size); - sscanf(buffer, "%s", suena4); + sscanf(buffer, "%s", sound4); getLine(ald, buffer, size); - sscanf(buffer, "%d", &respuesta1); + sscanf(buffer, "%d", &answer1); getLine(ald, buffer, size); - sscanf(buffer, "%d", &respuesta2); + sscanf(buffer, "%d", &answer2); getLine(ald, buffer, size); - sscanf(buffer, "%d", &respuesta3); + sscanf(buffer, "%d", &answer3); delete ald; ald = NULL; if (num_ejec == 2 && !strcmp(nom_fich, "op_5.cal") && flags[38] == 1 && flags[33] == 1) { - strcpy(frase3, _text[_lang][405]); - strcpy(suena3, "405.als"); - respuesta3 = 31; + strcpy(phrase3, _text[_lang][405]); + strcpy(sound3, "405.als"); + answer3 = 31; } if (num_ejec == 6 && !strcmp(nom_fich, "op_12.cal") && flags[7] == 1) { - strcpy(frase3, _text[_lang][273]); - strcpy(suena3, "273.als"); - respuesta3 = 14; + strcpy(phrase3, _text[_lang][273]); + strcpy(sound3, "273.als"); + answer3 = 14; } if (num_ejec == 6 && !strcmp(nom_fich, "op_12.cal") && flags[10] == 1) { - strcpy(frase3, " cuanto queda para que acabe el partido?"); - strcpy(suena3, "274.als"); - respuesta3 = 15; + strcpy(phrase3, " cuanto queda para que acabe el partido?"); + strcpy(sound3, "274.als"); + answer3 = 15; } - longitud = strlen(frase1); - for (h = 0; h < longitud; h++) - if (frase1[h] == (char)0xa7) - frase1[h] = ' '; + length = strlen(phrase1); + for (h = 0; h < length; h++) + if (phrase1[h] == (char)0xa7) + phrase1[h] = ' '; - longitud = strlen(frase2); - for (h = 0; h < longitud; h++) - if (frase2[h] == (char)0xa7) - frase2[h] = ' '; + length = strlen(phrase2); + for (h = 0; h < length; h++) + if (phrase2[h] == (char)0xa7) + phrase2[h] = ' '; - longitud = strlen(frase3); - for (h = 0; h < longitud; h++) - if (frase3[h] == (char)0xa7) - frase3[h] = ' '; + length = strlen(phrase3); + for (h = 0; h < length; h++) + if (phrase3[h] == (char)0xa7) + phrase3[h] = ' '; - longitud = strlen(frase4); - for (h = 0; h < longitud; h++) - if (frase4[h] == (char)0xa7) - frase4[h] = ' '; + length = strlen(phrase4); + for (h = 0; h < length; h++) + if (phrase4[h] == (char)0xa7) + phrase4[h] = ' '; loadPic("car.alg"); decompressPic(dir_hare_fondo, 1); @@ -3930,88 +3930,88 @@ bucle_opc: MirarRaton(); if (mouseY > 0 && mouseY < 9) { - if (usado1 == 1 && _color != WHITE) + if (used1 == 1 && _color != WHITE) color_abc(WHITE); - else if (usado1 == 0 && _color != LIGHT_GREEN) + else if (used1 == 0 && _color != LIGHT_GREEN) color_abc(LIGHT_GREEN); } else if (mouseY > 8 && mouseY < 17) { - if (usado2 == 1 && _color != WHITE) + if (used2 == 1 && _color != WHITE) color_abc(WHITE); - else if (usado2 == 0 && _color != LIGHT_GREEN) + else if (used2 == 0 && _color != LIGHT_GREEN) color_abc(LIGHT_GREEN); } else if (mouseY > 16 && mouseY < 25) { - if (usado3 == 1 && _color != WHITE) + if (used3 == 1 && _color != WHITE) color_abc(WHITE); - else if (usado3 == 0 && _color != LIGHT_GREEN) + else if (used3 == 0 && _color != LIGHT_GREEN) color_abc(LIGHT_GREEN); } else if (_color != LIGHT_GREEN) color_abc(LIGHT_GREEN); if (mouseY > 0 && mouseY < 9) - juego1 = 2; + game1 = 2; else if (mouseY > 8 && mouseY < 17) - juego2 = 2; + game2 = 2; else if (mouseY > 16 && mouseY < 25) - juego3 = 2; + game3 = 2; else if (mouseY > 24 && mouseY < 33) - juego4 = 2; + game4 = 2; - print_abc_opc(frase1, 1, 2, juego1); - print_abc_opc(frase2, 1, 10, juego2); - print_abc_opc(frase3, 1, 18, juego3); - print_abc_opc(frase4, 1, 26, juego4); + print_abc_opc(phrase1, 1, 2, game1); + print_abc_opc(phrase2, 1, 10, game2); + print_abc_opc(phrase3, 1, 18, game3); + print_abc_opc(phrase4, 1, 26, game4); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - if ((boton_izq == 1) && (juego1 == 2)) { + if ((button_izq == 1) && (game1 == 2)) { delay(100); - usado1 = 1; - talk(frase1, suena1); + used1 = 1; + talk(phrase1, sound1); if (num_ejec == 3) grr(); else - responde(respuesta1); - } else if ((boton_izq == 1) && (juego2 == 2)) { + response(answer1); + } else if ((button_izq == 1) && (game2 == 2)) { delay(100); - usado2 = 1; - talk(frase2, suena2); + used2 = 1; + talk(phrase2, sound2); if (num_ejec == 3) grr(); else - responde(respuesta2); - } else if ((boton_izq == 1) && (juego3 == 2)) { + response(answer2); + } else if ((button_izq == 1) && (game3 == 2)) { delay(100); - usado3 = 1; - talk(frase3, suena3); + used3 = 1; + talk(phrase3, sound3); if (num_ejec == 3) grr(); else - responde(respuesta3); - } else if ((boton_izq == 1) && (juego4 == 2)) { + response(answer3); + } else if ((button_izq == 1) && (game4 == 2)) { delay(100); - talk(frase4, suena4); + talk(phrase4, sound4); rompo_y_salgo = 1; } - if (boton_izq == 1) { + if (button_izq == 1) { delay(100); color_abc(LIGHT_GREEN); } - if (usado1 == 0) - juego1 = 1; + if (used1 == 0) + game1 = 1; else - juego1 = 3; - if (usado2 == 0) - juego2 = 1; + game1 = 3; + if (used2 == 0) + game2 = 1; else - juego2 = 3; - if (usado3 == 0) - juego3 = 1; + game2 = 3; + if (used3 == 0) + game3 = 1; else - juego3 = 3; + game3 = 3; - juego4 = 1; + game4 = 1; if (rompo_y_salgo == 0) goto bucle_opc; @@ -4025,16 +4025,16 @@ bucle_opc: withoutVerb(); } -void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_pantalla, int juego) { +void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_pantalla, int game) { int pos_texto[6]; - int y_de_signos, y_de_letra, x_de_letra = 0, h, longitud; - longitud = strlen(said); + int y_de_signos, y_de_letra, x_de_letra = 0, h, length; + length = strlen(said); - for (h = 0; h < longitud; h++) { - if (juego == 1) { + for (h = 0; h < length; h++) { + if (game == 1) { y_de_letra = Y_ABC_OPC_1; y_de_signos = Y_SIGNOS_OPC_1; - } else if (juego == 3) { + } else if (game == 3) { y_de_letra = Y_ABC_OPC_3; y_de_signos = Y_SIGNOS_OPC_3; } else { @@ -4194,7 +4194,7 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta } } -void DrasculaEngine::responde(int funcion) { +void DrasculaEngine::response(int funcion) { if (num_ejec == 1) { if (funcion == 10) talk_borracho(_textb[_lang][1], "B1.als"); @@ -4276,18 +4276,18 @@ void DrasculaEngine::responde(int funcion) { } void DrasculaEngine::suma_objeto(int osj) { - int h, puesto = 0; + int h, position = 0; for (h = 1; h < 43; h++) { - if (objetos_que_tengo[h] == osj) - puesto = 1; + if (inventoryObjects[h] == osj) + position = 1; } - if (puesto == 0) { + if (position == 0) { for (h = 1; h < 43; h++) { - if (objetos_que_tengo[h] == 0) { - objetos_que_tengo[h] = osj; - puesto = 1; + if (inventoryObjects[h] == 0) { + inventoryObjects[h] = osj; + position = 1; break; } } @@ -4575,7 +4575,7 @@ void DrasculaEngine::mapa() { } void DrasculaEngine::grr() { - int longitud = 30; + int length = 30; color_abc(DARK_GREEN); @@ -4609,8 +4609,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 8e9765502f..6170dc92c4 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -338,7 +338,7 @@ public: int num_obj[40], visible[40], isDoor[40]; int sitiobj_x[40], sitiobj_y[40], sentidobj[40]; - int objetos_que_tengo[43]; + int inventoryObjects[43]; char alapantallakeva[40][20]; int x_alakeva[40], y_alakeva[40], sentido_alkeva[40], alapuertakeva[40]; int x1[40], y1[40], x2[40], y2[40]; @@ -366,7 +366,7 @@ public: int sentido_final, anda_a_objeto; int obj_saliendo; int diff_vez, conta_vez; - int hay_respuesta; + int hay_answer; int conta_ciego_vez; int cambio_de_color; int rompo_y_salgo; @@ -394,8 +394,8 @@ public: int mouseX; int mouseY; int mouseY_ant; - int boton_izq; - int boton_dch; + int button_izq; + int button_dch; bool escoba(); void black(); @@ -610,10 +610,10 @@ public: int vez(); void reduce_hare_chico(int, int, int, int, int, int, int, byte *, byte *); char codifica(char); - void cuadrante_1(); - void cuadrante_2(); - void cuadrante_3(); - void cuadrante_4(); + void quadrant_1(); + void quadrant_2(); + void quadrant_3(); + void quadrant_4(); void update_62(); void update_62_pre(); void update_63(); @@ -655,7 +655,7 @@ public: void room_63(int); void conversa(const char *); void print_abc_opc(const char *, int, int, int); - void responde(int); + void response(int); void talk_borracho(const char *said, const char *filename); void talk_pianista(const char *said, const char *filename); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index b5de794d42..8af3f7c952 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -297,7 +297,7 @@ void DrasculaEngine::room_1(int fl) { } else if (pickedObject == kVerbLook && fl == 120 && flags[8] == 0) talk(14); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_3(int fl) { @@ -336,7 +336,7 @@ void DrasculaEngine::room_3(int fl) { talk(185); talk(186); } else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_4(int fl) { @@ -350,7 +350,7 @@ void DrasculaEngine::room_4(int fl) { if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; } else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_5(int fl) { @@ -363,7 +363,7 @@ void DrasculaEngine::room_5(int fl) { animation_5_2(); resta_objeto(10); } else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_6(int fl){ @@ -422,9 +422,9 @@ void DrasculaEngine::room_6(int fl){ visible[4] = 0; flags[10] = 1; } else if (pickedObject == kVerbOpen && fl == 140) - hay_respuesta = 1; + hay_answer = 1; else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_7(int fl){ @@ -439,7 +439,7 @@ void DrasculaEngine::room_7(int fl){ if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; } else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_8(int fl) { @@ -452,7 +452,7 @@ void DrasculaEngine::room_8(int fl) { } else if (pickedObject == kVerbLook && fl == 147) talk(59); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_9(int fl){ @@ -471,7 +471,7 @@ void DrasculaEngine::room_9(int fl){ resta_objeto(7); pickObject(14);} else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_12(int fl){ @@ -483,7 +483,7 @@ void DrasculaEngine::room_12(int fl){ else if (pickedObject == kVerbClose && fl == 156) closeDoor(16, 4); else - hay_respuesta = 0; + hay_answer = 0; } bool DrasculaEngine::room_13(int fl) { @@ -500,7 +500,7 @@ bool DrasculaEngine::room_13(int fl) { animation_2_3(); return true; } else - hay_respuesta = 0; + hay_answer = 0; return false; } @@ -534,7 +534,7 @@ void DrasculaEngine::room_14(int fl) { else if (pickedObject == kVerbLook && fl == 204) talk(171); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_15(int fl) { @@ -577,7 +577,7 @@ void DrasculaEngine::room_15(int fl) { else if (pickedObject == kVerbOpen && fl == 206) talk(174); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_16(int fl) { @@ -624,7 +624,7 @@ void DrasculaEngine::room_16(int fl) { } else if (pickedObject == kVerbTalk && fl == 187) talk(_text[_lang][345], "345.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_17(int fl) { @@ -648,7 +648,7 @@ void DrasculaEngine::room_17(int fl) { pickObject(23); resta_objeto(11); } else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_18(int fl) { @@ -705,14 +705,14 @@ void DrasculaEngine::room_18(int fl) { pickObject(23); resta_objeto(11); } else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_19(int fl) { if (pickedObject == kVerbLook && fl == 214) talk(_text[_lang][191], "191.als"); else - hay_respuesta = 0; + hay_answer = 0; } bool DrasculaEngine::room_21(int fl) { @@ -734,7 +734,7 @@ bool DrasculaEngine::room_21(int fl) { animation_9_4(); return true; } else - hay_respuesta = 0; + hay_answer = 0; return false; } @@ -769,7 +769,7 @@ void DrasculaEngine::room_22(int fl) { visible[3] = 0; flags[27] = 1; } else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_23(int fl) { @@ -792,7 +792,7 @@ void DrasculaEngine::room_23(int fl) { if (flags[18] == 1) animation_6_4(); } else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_24(int fl) { @@ -807,7 +807,7 @@ void DrasculaEngine::room_24(int fl) { else if (pickedObject == kVerbLook && fl == 151) talk(_text[_lang][461], "461.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_26(int fl) { @@ -862,7 +862,7 @@ void DrasculaEngine::room_26(int fl) { else if (pickedObject == kVerbPick && fl == 168) talk(_text[_lang][477], "477.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_27(int fl) { @@ -883,7 +883,7 @@ void DrasculaEngine::room_27(int fl) { else if (fl == 150) talk(_text[_lang][460], "460.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_29(int fl) { @@ -902,7 +902,7 @@ void DrasculaEngine::room_29(int fl) { else if (pickedObject == kVerbOpen && fl == 156) talk(_text[_lang][467], "467.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_30(int fl) { @@ -933,7 +933,7 @@ void DrasculaEngine::room_30(int fl) { else if (pickedObject == kVerbLook && fl == 158) talk(_text[_lang][469], "469.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_31(int fl) { @@ -950,7 +950,7 @@ void DrasculaEngine::room_31(int fl) { else if (pickedObject == kVerbOpen && fl == 161) talk(_text[_lang][471], "471.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_34(int fl) { @@ -971,7 +971,7 @@ void DrasculaEngine::room_34(int fl) { } else if (pickedObject == kVerbClose && fl == 120) closeDoor(8, 2); else - hay_respuesta=0; + hay_answer=0; } void DrasculaEngine::room_35(int fl) { @@ -995,14 +995,14 @@ void DrasculaEngine::room_35(int fl) { visible[3] = 0; flags[17] = 0; } else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_44(int fl) { if (pickedObject == kVerbLook && fl == 172) talk(_text[_lang][428], "428.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_49(int fl){ @@ -1021,7 +1021,7 @@ void DrasculaEngine::room_49(int fl){ else if (pickedObject == kVerbLook && fl == 203) talk(_text[_lang][137], "137.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_53(int fl) { @@ -1051,7 +1051,7 @@ void DrasculaEngine::room_53(int fl) { withoutVerb(); visible[3] = 1; } else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_54(int fl) { @@ -1089,7 +1089,7 @@ void DrasculaEngine::room_54(int fl) { withoutVerb(); resta_objeto(10); } else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_55(int fl) { @@ -1109,7 +1109,7 @@ void DrasculaEngine::room_55(int fl) { stopSound(); lleva_al_hare(hare_x - 3, hare_y + alto_hare + 6); } else - hay_respuesta = 0; + hay_answer = 0; } bool DrasculaEngine::room_56(int fl) { @@ -1123,7 +1123,7 @@ bool DrasculaEngine::room_56(int fl) { else if (pickedObject == kVerbLook && fl == 208) talk(_text[_lang][142], "142.als"); else - hay_respuesta = 0; + hay_answer = 0; return false; } @@ -1134,7 +1134,7 @@ void DrasculaEngine::room_58(int fl) { else if (pickedObject == kVerbLook && fl == 104) talk(_text[_lang][454], "454.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_59(int fl) { @@ -1208,7 +1208,7 @@ void DrasculaEngine::room_59(int fl) { flags[11] = 1; } } else - hay_respuesta = 0; + hay_answer = 0; } bool DrasculaEngine::room_60(int fl) { @@ -1245,7 +1245,7 @@ bool DrasculaEngine::room_60(int fl) { anima("cnf.bin", 14); talk(_text[_lang][455], "455.als"); } else - hay_respuesta = 0; + hay_answer = 0; return false; } @@ -1260,7 +1260,7 @@ void DrasculaEngine::room_61(int fl) { else if (pickedObject == kVerbOpen && fl == 117) talk(_text[_lang][174], "174.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_62(int fl) { @@ -1284,7 +1284,7 @@ void DrasculaEngine::room_62(int fl) { talk(_text[_lang][167], "167.als"); else if (pickedObject == kVerbLook && fl == 103) talk(_text[_lang][166], "166.als"); - else hay_respuesta = 0; + else hay_answer = 0; } void DrasculaEngine::room_63(int fl) { @@ -1299,7 +1299,7 @@ void DrasculaEngine::room_63(int fl) { else if (pickedObject == kVerbTalk && fl == 108) talk(_text[_lang][333], "333.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::room_pendulo(int fl) { @@ -1314,7 +1314,7 @@ void DrasculaEngine::room_pendulo(int fl) { else if (pickedObject == kVerbPick || pickedObject == kVerbOpen) talk(_text[_lang][453], "453.als"); else - hay_respuesta = 0; + hay_answer = 0; } void DrasculaEngine::updateRefresh() { diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 0ef03e35eb..549d930c53 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -43,7 +43,7 @@ void DrasculaEngine::talkInit(const char *filename) { void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { int x_talk[8] = { 56, 82, 108, 134, 160, 186, 212, 238 }; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -86,8 +86,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); @@ -99,7 +99,7 @@ bucless: void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 }; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -147,8 +147,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -161,7 +161,7 @@ bucless: void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 }; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -208,8 +208,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -224,7 +224,7 @@ bucless: } void DrasculaEngine::talk_solo(const char *said, const char *filename) { - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -262,8 +262,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } if (num_ejec == 6) { @@ -275,7 +275,7 @@ bucless: void DrasculaEngine::talk_igor_frente(const char *said, const char *filename) { int x_talk[8] = { 56, 86, 116, 146, 176, 206, 236, 266 }; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -320,8 +320,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -340,7 +340,7 @@ bucless: void DrasculaEngine::talk_tabernero(const char *said, const char *filename) { int x_talk[9] = { 1, 23, 45, 67, 89, 111, 133, 155, 177 }; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -384,8 +384,8 @@ bucless: delete(sku); ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -396,7 +396,7 @@ bucless: void DrasculaEngine::talk_bj(const char *said, const char *filename) { int x_talk[5] = { 64, 92, 120, 148, 176 }; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -447,8 +447,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -471,7 +471,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { int x_talk_dch[6] = { 1, 25, 49, 73, 97, 121 }; int x_talk_izq[6] = { 145, 169, 193, 217, 241, 265 }; int cara; - int longitud = strlen(said); + int length = strlen(said); if (num_ejec == 6) { if (flags[0] == 0 && roomNumber == 102) { @@ -585,8 +585,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -602,7 +602,7 @@ bucless: void DrasculaEngine::talk_pianista(const char *said, const char *filename) { int x_talk[4] = { 97, 145, 193, 241 }; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -640,8 +640,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -652,7 +652,7 @@ bucless: void DrasculaEngine::talk_borracho(const char *said, const char *filename) { int x_talk[8] = { 1, 21, 41, 61, 81, 101, 121, 141 }; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -704,8 +704,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -736,7 +736,7 @@ void DrasculaEngine::talk_vb(int index) { void DrasculaEngine::talk_vb(const char *said, const char *filename) { int x_talk[6] = {1, 27, 53, 79, 105, 131}; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -777,8 +777,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -795,7 +795,7 @@ void DrasculaEngine::talk_vbpuerta(int index) { } void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) { - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -820,8 +820,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -835,7 +835,7 @@ void DrasculaEngine::talk_ciego(const char *said, const char *filename, const ch byte *num_cara; int p = 0; int pos_ciego[6]; - int longitud = strlen(said); + int length = strlen(said); color_abc(VON_BRAUN); @@ -896,14 +896,14 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } } void DrasculaEngine::talk_hacker(const char *said, const char *filename) { - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -929,8 +929,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -940,7 +940,7 @@ bucless: void DrasculaEngine::talk_lobo(const char *said, const char *filename) { int x_talk[9] = {52, 79, 106, 133, 160, 187, 214, 241, 268}; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -977,8 +977,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -989,7 +989,7 @@ bucless: void DrasculaEngine::talk_mus(const char *said, const char *filename) { int x_talk[8] = { 16, 35, 54, 73, 92, 111, 130, 149}; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1026,8 +1026,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -1038,7 +1038,7 @@ bucless: void DrasculaEngine::talk_pen(const char *said, const char *filename) { int x_talk[8] = {112, 138, 164, 190, 216, 242, 268, 294}; int cara; - int longitud = strlen(said); + int length = strlen(said); flags[1] = 1; @@ -1081,8 +1081,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -1095,7 +1095,7 @@ bucless: void DrasculaEngine::talk_pen2(const char *said, const char *filename) { int x_talk[5]={122, 148, 174, 200, 226}; int cara; - int longitud = strlen(said); + int length = strlen(said); flags[1] = 1; @@ -1134,8 +1134,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -1148,7 +1148,7 @@ bucless: void DrasculaEngine::talk_taber2(const char *said, const char *filename) { int x_talk[6] = {1, 23, 45, 67, 89, 111}; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1185,8 +1185,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -1197,7 +1197,7 @@ bucless: void DrasculaEngine::talk_bj_cama(const char *said, const char *filename) { int x_talk[5] = {51, 101, 151, 201, 251}; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1235,8 +1235,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } updateRoom(); @@ -1247,7 +1247,7 @@ void DrasculaEngine::talk_htel(const char *said, const char *filename) { char *num_cara; int x_talk[3] = {1, 94, 187}; int cara, pantalla; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1287,8 +1287,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -1302,7 +1302,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha int x_talk_dch[6] = {1, 25, 49, 73, 97, 121}; int x_talk_izq[6] = {145, 169, 193, 217, 241, 265}; int p, cara = 0; - int longitud = strlen(said); + int length = strlen(said); color_abc(YELLOW); @@ -1400,8 +1400,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -1413,7 +1413,7 @@ bucless: void DrasculaEngine::talk_baul(const char *said, const char *filename) { int cara = 0, cara_antes; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1450,8 +1450,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -1461,7 +1461,7 @@ bucless: } void DrasculaEngine::talk_igorpuerta(const char *said, const char *filename) { - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1486,8 +1486,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -1498,7 +1498,7 @@ bucless: void DrasculaEngine::talk_igor_sentado(const char *said, const char *filename) { int x_talk[4] = { 80, 102, 124, 146 }; int cara; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1535,8 +1535,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } @@ -1547,7 +1547,7 @@ bucless: void DrasculaEngine::talk_igor_peluca(const char *said, const char *filename) { int x_talk[4] = {119, 158, 197, 236}; int cara = 0; - int longitud = strlen(said); + int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1584,8 +1584,8 @@ bucless: sku = NULL; ctvd_terminate(); } else { - longitud -= 2; - if (longitud > 0) + length -= 2; + if (length > 0) goto bucless; } -- cgit v1.2.3 From e82295daa3749c92f76907417cdc1222b33dcf7f Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 27 May 2008 13:15:51 +0000 Subject: Implemented getTotalPlayTime for MP3InputStream. svn-id: r32322 --- sound/mp3.cpp | 67 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/sound/mp3.cpp b/sound/mp3.cpp index 72ed361926..706c9d90ec 100644 --- a/sound/mp3.cpp +++ b/sound/mp3.cpp @@ -63,6 +63,8 @@ protected: const mad_timer_t _endTime; mad_timer_t _totalTime; + int32 _totalPlayTime; + mad_stream _stream; mad_frame _frame; mad_synth _synth; @@ -87,6 +89,7 @@ public: bool endOfData() const { return _state == MP3_STATE_EOS; } bool isStereo() const { return MAD_NCHANNELS(&_frame.header) == 2; } int getRate() const { return _frame.header.samplerate; } + int32 getTotalPlayTime() const { return _totalPlayTime; } protected: void decodeMP3Data(); @@ -111,6 +114,70 @@ MP3InputStream::MP3InputStream(Common::SeekableReadStream *inStream, bool dispos // may read a few bytes beyond the end of the input buffer). memset(_buf + BUFFER_SIZE, 0, MAD_BUFFER_GUARD); + // Calculate play time + mad_timer_t length; + + mad_timer_set(&length, 0, 0, 1000); + mad_timer_add(&length, start); + mad_timer_negate(&length); + + if (mad_timer_sign(end) == 0) { + mad_timer_add(&length, end); + } else { + mad_stream_init(&_stream); + mad_frame_init(&_frame); + + // Reset the stream data + _inStream->seek(0, SEEK_SET); + + // Update state + _state = MP3_STATE_READY; + + // Read the first few sample bytes + readMP3Data(); + + do { + // If necessary, load more data into the stream decoder + if (_stream.error == MAD_ERROR_BUFLEN) + readMP3Data(); + + while (_state == MP3_STATE_READY) { + _stream.error = MAD_ERROR_NONE; + + // Decode the next header. Note: mad_frame_decode would do this for us, too. + // However, for seeking we don't want to decode the full frame (else it would + // be far too slow). + if (mad_header_decode(&_frame.header, &_stream) == -1) { + if (_stream.error == MAD_ERROR_BUFLEN) { + break; // Read more data + } else if (MAD_RECOVERABLE(_stream.error)) { + debug(6, "MP3InputStream: Recoverable error in mad_header_decode (%s)", mad_stream_errorstr(&_stream)); + continue; + } else { + warning("MP3InputStream: Unrecoverable error in mad_header_decode (%s)", mad_stream_errorstr(&_stream)); + break; + } + } + + // Sum up the total playback time so far + mad_timer_add(&length, _frame.header.duration); + } + } while (_state != MP3_STATE_EOS); + + mad_synth_finish(&_synth); + mad_frame_finish(&_frame); + + // Reinit stream + _state = MP3_STATE_INIT; + } + + _totalPlayTime = mad_timer_count(length, MAD_UNITS_MILLISECONDS); + + if (numLoops) + _totalPlayTime *= numLoops; + else + _totalPlayTime = kUnknownPlayTime; + // Decode the first chunk of data. This is necessary so that _frame // is setup and isStereo() and getRate() return correct results. decodeMP3Data(); -- cgit v1.2.3 From 9d13d90d4f1dfc2bfd20a018fc1fe0405a108743 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 27 May 2008 13:28:47 +0000 Subject: - Cleanup code for FlacInputStream::getTotalPlayTime - Reset input stream position in MP3InputStream after calculating total play time svn-id: r32323 --- sound/flac.cpp | 49 +++++++++++++++++++++++++------------------------ sound/mp3.cpp | 5 ++++- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/sound/flac.cpp b/sound/flac.cpp index acd0a9fef7..f058d2dc6f 100644 --- a/sound/flac.cpp +++ b/sound/flac.cpp @@ -90,7 +90,6 @@ protected: bool _disposeAfterUse; uint _numLoops; - const uint _totalNumLoops; ::FLAC__SeekableStreamDecoder *_decoder; @@ -103,6 +102,9 @@ protected: /** index + 1(!) of the last sample to be played - 0 is end of stream */ FLAC__uint64 _lastSample; + /** total play time */ + int32 _totalPlayTime; + /** true if the last sample was decoded from the FLAC-API - there might still be data in the buffer */ bool _lastSampleWritten; @@ -142,28 +144,7 @@ public: return _streaminfo.channels == 0 || (_lastSampleWritten && _sampleCache.bufFill == 0); } - int32 getTotalPlayTime() const { - if (!_totalNumLoops) - return AudioStream::kUnknownPlayTime; - - int32 samples = 0; - - if (!_lastSample) { - if (!_streaminfo.total_samples) - return AudioStream::kUnknownPlayTime; - - samples = _streaminfo.total_samples - _firstSample; - } else { - samples = _lastSample - _firstSample - 1; - } - - const int32 rate = _streaminfo.sample_rate; - - int32 seconds = samples / rate; - int32 milliseconds = (1000 * (samples % rate)) / rate; - - return (seconds * 1000 + milliseconds) * _totalNumLoops; - } + int32 getTotalPlayTime() const { return _totalPlayTime; } bool isStreamDecoderReady() const { return getStreamDecoderState() == FLAC__STREAM_DECODER_SEARCH_FOR_FRAME_SYNC ; } @@ -214,7 +195,6 @@ FlacInputStream::FlacInputStream(Common::SeekableReadStream *inStream, bool disp _inStream(inStream), _disposeAfterUse(dispose), _numLoops(numLoops), - _totalNumLoops(numLoops), _firstSample(0), _lastSample(0), _outBuffer(NULL), _requestedSamples(0), _lastSampleWritten(false), _methodConvertBuffers(&FlacInputStream::convertBuffersGeneric) @@ -260,7 +240,28 @@ FlacInputStream::FlacInputStream(Common::SeekableReadStream *inStream, bool disp // avoid overflows). _firstSample = (FLAC__uint64)(startTime * (_streaminfo.sample_rate / 1000.0)); _lastSample = (FLAC__uint64)(endTime * (_streaminfo.sample_rate / 1000.0)); + if (_firstSample == 0 || seekAbsolute(_firstSample)) { + int32 samples = kUnknownPlayTime; + + if (!_lastSample) { + if (_streaminfo.total_samples) + samples = _streaminfo.total_samples - _firstSample; + } else { + samples = _lastSample - _firstSample - 1; + } + + if (samples != kUnknownPlayTime && samples >= 0 && numLoops) { + const int32 rate = _streaminfo.sample_rate; + + int32 seconds = samples / rate; + int32 milliseconds = (1000 * (samples % rate)) / rate; + + _totalPlayTime = (seconds * 1000 + milliseconds) * numLoops; + } else { + _totalPlayTime = kUnknownPlayTime; + } + return; // no error occured } } diff --git a/sound/mp3.cpp b/sound/mp3.cpp index 706c9d90ec..eea725ce3a 100644 --- a/sound/mp3.cpp +++ b/sound/mp3.cpp @@ -169,11 +169,14 @@ MP3InputStream::MP3InputStream(Common::SeekableReadStream *inStream, bool dispos // Reinit stream _state = MP3_STATE_INIT; + + // Reset the stream data + _inStream->seek(0, SEEK_SET); } _totalPlayTime = mad_timer_count(length, MAD_UNITS_MILLISECONDS); - if (numLoops) + if (numLoops && mad_timer_sign(length) >= 0) _totalPlayTime *= numLoops; else _totalPlayTime = kUnknownPlayTime; -- cgit v1.2.3 From 2675cd38a6bda20caad17f092eaec71dd1f13f94 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 27 May 2008 16:02:07 +0000 Subject: Fixed the two animation FIXMEs svn-id: r32325 --- engines/drascula/animation.cpp | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index bb1c5e1e73..ea4431fca8 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -616,10 +616,15 @@ void DrasculaEngine::animation_2_1() { if (anima("rap.bin", 16)) break; sentido_hare = 3; - // FIXME: the room number is changed here to "no_bj". Is it - // possible to use loadPic("no_bj.alg") instead? - loadPic("no_bj.alg"); // is this ok? - //strcpy(num_room, "no_bj.alg"); + // The room number was originally changed here to "no_bj.alg", + // which doesn't exist. In reality, this was just a hack to + // set the room number to a non-existant one, so that BJ does + // not appear again when the room is refreshed after the + // animation where Count Drascula abducts her. We set the + // room number to -1 for the same purpose + // Also check animation_9_6(), where the same hack was used by + // the original + roomNumber = -1; if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; pause(8); @@ -2416,12 +2421,14 @@ void DrasculaEngine::animation_9_6() { hare_x = -1; obj_saliendo = 108; carga_escoba("59.ald"); - // FIXME: the room number is changed here to "nada". Not - // sure if this makes any difference, as loadPic is called - // right afterwards. Is it possible to use loadPic("nada.alg") - // instead? - loadPic("nada.alg"); // is this ok? - //strcpy(num_room, "nada.alg"); + // The room number was originally changed here to "nada.alg", + // which is a non-existant file. In reality, this was just a + // hack to set the room number to a non-existant one, so that + // room sprites do not appear again when the room is refreshed. + // We set the room number to -1 for the same purpose. + // Also check animation_2_1(), where the same hack was used + // by the original + roomNumber = -1; loadPic("nota2.alg"); decompressPic(dir_dibujo1, HALF_PAL); black(); -- cgit v1.2.3 From bf8dfb67e159ac05aac2089cd216527f0f91b74c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 27 May 2008 16:13:41 +0000 Subject: More simplifications to the talk functions svn-id: r32326 --- engines/drascula/animation.cpp | 70 +++++++++++++++++++++--------------------- engines/drascula/drascula.h | 2 ++ engines/drascula/rooms.cpp | 14 ++++----- engines/drascula/talk.cpp | 18 +++++++++-- 4 files changed, 59 insertions(+), 45 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index ea4431fca8..a2cd43eac2 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -543,23 +543,23 @@ void DrasculaEngine::animation_2_1() { hare_x = 100; hare_y = 95; - talk_bj(_textbj[_lang][2], "BJ2.als"); - talk(_text[_lang][215], "215.als"); - talk_bj(_textbj[_lang][3], "BJ3.als"); - talk(_text[_lang][216], "216.als"); - talk_bj(_textbj[_lang][4], "BJ4.als"); - talk_bj(_textbj[_lang][5], "BJ5.als"); - talk_bj(_textbj[_lang][6], "BJ6.als"); - talk(_text[_lang][217], "217.als"); - talk_bj(_textbj[_lang][7], "BJ7.als"); - talk(_text[_lang][218], "218.als"); - talk_bj(_textbj[_lang][8], "BJ8.als"); - talk(_text[_lang][219], "219.als"); - talk_bj(_textbj[_lang][9], "BJ9.als"); - talk(_text[_lang][220], "220.als"); - talk(_text[_lang][221], "221.als"); - talk_bj(_textbj[_lang][10], "BJ10.als"); - talk(_text[_lang][222], "222.als"); + talk_bj(2); + talk(215); + talk_bj(3); + talk(216); + talk_bj(4); + talk_bj(5); + talk_bj(6); + talk(217); + talk_bj(7); + talk(218); + talk_bj(8); + talk(219); + talk_bj(9); + talk(220); + talk(221); + talk_bj(10); + talk(222); if (anima("gaf.bin", 15)) break; if (anima("bjb.bin", 14)) @@ -603,10 +603,10 @@ void DrasculaEngine::animation_2_1() { pause(60); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk(_text[_lang][224], "224.als"); + talk(224); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_bj(_textbj[_lang][12], "BJ12.als"); + talk_bj(12); lleva_al_hare(157, 98 + alto_hare); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; @@ -630,14 +630,14 @@ void DrasculaEngine::animation_2_1() { pause(8); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - talk(_text[_lang][225], "225.als"); + talk(225); pause(76); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; sentido_hare = 1; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - talk(_text[_lang][226], "226.als"); + talk(226); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; updateRoom(); @@ -645,7 +645,7 @@ void DrasculaEngine::animation_2_1() { pause(30); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk(_text[_lang][227],"227.als"); + talk(227); FundeAlNegro(0); break; } @@ -1863,26 +1863,26 @@ void DrasculaEngine::animation_7_4() { void DrasculaEngine::animation_1_5() { if (flags[0] == 0) { talk(_text[_lang][430], "430.als"); - talk_bj(_textbj[_lang][16], "BJ16.als"); - talk_bj(_textbj[_lang][17], "BJ17.als"); - talk_bj(_textbj[_lang][18], "BJ18.als"); - talk(_text[_lang][217], "217.als"); - talk_bj(_textbj[_lang][19], "BJ19.als"); - talk(_text[_lang][229], "229.als"); + talk_bj(16); + talk_bj(17); + talk_bj(18); + talk(217); + talk_bj(19); + talk(229); pause(5); lleva_al_hare(114, 170); sentido_hare = 3; - talk(_text[_lang][431], "431.als"); - talk_bj(_textbj[_lang][20], "BJ20.als"); + talk(431); + talk_bj(20); sentido_hare = 2; pause(4); - talk(_text[_lang][438], "438.als"); + talk(438); sitio_x = 120; sitio_y = 157; anda_a_objeto = 1; sentido_final = 1; empieza_andar(); - talk_bj(_textbj[_lang][21], "BJ21.als"); + talk_bj(21); for (;;) { if (hare_se_mueve == 0) @@ -1892,7 +1892,7 @@ void DrasculaEngine::animation_1_5() { } sentido_hare = 1; - talk(_text[_lang][229], "229.als"); + talk(229); flags[0] = 1; } @@ -1901,11 +1901,11 @@ void DrasculaEngine::animation_1_5() { } void DrasculaEngine::animation_2_5() { - talk_bj(_textbj[_lang][22], "BJ22.als"); + talk_bj(22); } void DrasculaEngine::animation_3_5() { - talk_bj(_textbj[_lang][23], "BJ23.als"); + talk_bj(23); pickObject(10); rompo_y_salgo = 1; } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 6170dc92c4..512ebb9950 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -542,6 +542,7 @@ public: void talk_igor_peluca(const char *said, const char *filename); void hipo(int); void stopSound(); + void talk_bj(int); void talk_bj(const char *, const char *); void talk_baul(const char *said, const char *filename); void talk(int); @@ -749,6 +750,7 @@ public: void talk_pen(const char *, const char *); void talk_pen2(const char *, const char *); void talk_taber2(const char *, const char *); + void talk_bj_cama(int); void talk_bj_cama(const char *said, const char * filename); void talk_htel(const char *said, const char *filename); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 8af3f7c952..50f1110c23 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1140,14 +1140,14 @@ void DrasculaEngine::room_58(int fl) { void DrasculaEngine::room_59(int fl) { if ((pickedObject == kVerbTalk && fl == 51) || (pickedObject == kVerbLook && fl == 51)) { flags[9] = 1; - talk(_text[_lang][259], "259.als"); - talk_bj_cama(_textbj[_lang][13], "bj13.als"); - talk(_text[_lang][263], "263.als"); - talk_bj_cama(_textbj[_lang][14], "bj14.als"); + talk(259); + talk_bj_cama(13); + talk(263); + talk_bj_cama(14); pause(40); - talk(_text[_lang][264], "264.als"); - talk_bj_cama(_textbj[_lang][15], "BJ15.als"); - talk(_text[_lang][265], "265.als"); + talk(264); + talk_bj_cama(15); + talk(265); flags[9] = 0; if (flags[11] == 0) { playSound("s12.als"); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 549d930c53..d6f393aa2a 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -393,6 +393,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } +void DrasculaEngine::talk_bj(int index) { + char name[20]; + sprintf(name, "BJ%i.als", index); + talk_bj(_textbj[_lang][index], name); +} + void DrasculaEngine::talk_bj(const char *said, const char *filename) { int x_talk[5] = { 64, 92, 120, 148, 176 }; int cara; @@ -457,7 +463,7 @@ bucless: } void DrasculaEngine::talk(int index) { - char name[100]; + char name[20]; sprintf(name, "%i.als", index); talk(_text[_lang][index], name); } @@ -728,7 +734,7 @@ bucless: } void DrasculaEngine::talk_vb(int index) { - char name[100]; + char name[20]; sprintf(name, "VB%i.als", index); talk_vb(_textvb[_lang][index], name); } @@ -789,7 +795,7 @@ bucless: } void DrasculaEngine::talk_vbpuerta(int index) { - char name[100]; + char name[20]; sprintf(name, "VB%i.als", index); talk_vb(_textvb[_lang][index], name); } @@ -1194,6 +1200,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } +void DrasculaEngine::talk_bj_cama(int index) { + char name[20]; + sprintf(name, "BJ%i.als", index); + talk_bj_cama(_textbj[_lang][index], name); +} + void DrasculaEngine::talk_bj_cama(const char *said, const char *filename) { int x_talk[5] = {51, 101, 151, 201, 251}; int cara; -- cgit v1.2.3 From 17fd16a38e6abecef088cfa383bf6cb1a6989d26 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Tue, 27 May 2008 19:25:04 +0000 Subject: Went through Operation Stealth's opcode list and added TODOs for naming all unknown functions properly and some notes about opcode redundancies. svn-id: r32327 --- engines/cine/script_os.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/engines/cine/script_os.cpp b/engines/cine/script_os.cpp index 36eda007c6..3c2efb3607 100644 --- a/engines/cine/script_os.cpp +++ b/engines/cine/script_os.cpp @@ -73,7 +73,7 @@ const Opcode OSScript::_opcodeTable[] = { { &FWScript::o1_loadMask4, "b" }, { &FWScript::o1_unloadMask4, "b" }, { &FWScript::o1_addSpriteFilledToBgList, "b" }, - { &FWScript::o1_op1B, "" }, + { &FWScript::o1_op1B, "" }, /* TODO: Name this opcode properly. */ /* 1C */ { 0, 0 }, { &FWScript::o1_label, "l" }, @@ -181,9 +181,9 @@ const Opcode OSScript::_opcodeTable[] = { { &FWScript::o1_fadeOutMusic, "" }, /* 70 */ { &FWScript::o1_stopSample, "" }, - { &FWScript::o1_op71, "bw" }, - { &FWScript::o1_op72, "wbw" }, - { &FWScript::o1_op72, "wbw" }, + { &FWScript::o1_op71, "bw" }, /* TODO: Name this opcode properly. */ + { &FWScript::o1_op72, "wbw" }, /* Same as opcode 0x73. TODO: Name this opcode properly. */ + { &FWScript::o1_op72, "wbw" }, /* Same as opcode 0x72. */ /* 74 */ { 0, 0 }, { 0, 0 }, @@ -201,8 +201,8 @@ const Opcode OSScript::_opcodeTable[] = { { &FWScript::o2_addSeqListElement, "bbbbwww" }, /* 80 */ { &FWScript::o2_removeSeq, "bb" }, - { &FWScript::o2_op81, "" }, - { &FWScript::o2_op82, "bbw" }, + { &FWScript::o2_op81, "" }, /* TODO: Name this opcode properly. */ + { &FWScript::o2_op82, "bbw" }, /* TODO: Name this opcode properly. */ { &FWScript::o2_isSeqRunning, "bb" }, /* 84 */ { &FWScript::o2_gotoIfSupNearest, "b" }, @@ -216,7 +216,7 @@ const Opcode OSScript::_opcodeTable[] = { { &FWScript::o2_startObjectScript, "b" }, /* 8C */ { &FWScript::o2_stopObjectScript, "b" }, - { &FWScript::o2_op8D, "wwwwwwww" }, + { &FWScript::o2_op8D, "wwwwwwww" }, /* TODO: Name this opcode properly. */ { &FWScript::o2_addBackground, "bs" }, { &FWScript::o2_removeBackground, "b" }, /* 90 */ @@ -226,32 +226,32 @@ const Opcode OSScript::_opcodeTable[] = { { 0, 0 }, /* 94 */ { 0, 0 }, - { &FWScript::o1_changeDataDisk, "b" }, + { &FWScript::o1_changeDataDisk, "b" }, /* Same as opcode 0xA9. */ { 0, 0 }, { 0, 0 }, /* 98 */ { 0, 0 }, { 0, 0 }, { &FWScript::o2_wasZoneChecked, "" }, - { &FWScript::o2_op9B, "wwwwwwww" }, + { &FWScript::o2_op9B, "wwwwwwww" }, /* TODO: Name this opcode properly. */ /* 9C */ - { &FWScript::o2_op9C, "wwww" }, + { &FWScript::o2_op9C, "wwww" }, /* TODO: Name this opcode properly. */ { &FWScript::o2_useBgScroll, "b" }, { &FWScript::o2_setAdditionalBgVScroll, "c" }, - { &FWScript::o2_op9F, "ww" }, + { &FWScript::o2_op9F, "ww" }, /* TODO: Name this opcode properly. */ /* A0 */ - { &FWScript::o2_addGfxElementA0, "ww" }, - { &FWScript::o2_removeGfxElementA0, "ww" }, - { &FWScript::o2_opA2, "ww" }, - { &FWScript::o2_opA3, "ww" }, + { &FWScript::o2_addGfxElementA0, "ww" }, /* TODO: Name this opcode properly. */ + { &FWScript::o2_removeGfxElementA0, "ww" }, /* TODO: Name this opcode properly. */ + { &FWScript::o2_opA2, "ww" }, /* TODO: Name this opcode properly. */ + { &FWScript::o2_opA3, "ww" }, /* TODO: Name this opcode properly. */ /* A4 */ - { &FWScript::o2_loadMask22, "b" }, - { &FWScript::o2_unloadMask22, "b" }, + { &FWScript::o2_loadMask22, "b" }, /* TODO: Name this opcode properly. */ + { &FWScript::o2_unloadMask22, "b" }, /* TODO: Name this opcode properly. */ { 0, 0 }, { 0, 0 }, /* A8 */ { 0, 0 }, - { &FWScript::o1_changeDataDisk, "b" } + { &FWScript::o1_changeDataDisk, "b" } /* Same as opcode 0x95. */ }; const unsigned int OSScript::_numOpcodes = ARRAYSIZE(OSScript::_opcodeTable); -- cgit v1.2.3 From c0f1b7fe66372d52da2265d001049fd966f8dac7 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Tue, 27 May 2008 19:36:39 +0000 Subject: Added a few more comments about Operation Stealth's opcodes (Redundancies, Future Wars's opcodes' end point). svn-id: r32328 --- engines/cine/script_os.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/cine/script_os.cpp b/engines/cine/script_os.cpp index 3c2efb3607..7a1322330a 100644 --- a/engines/cine/script_os.cpp +++ b/engines/cine/script_os.cpp @@ -173,7 +173,7 @@ const Opcode OSScript::_opcodeTable[] = { { &FWScript::o1_setDefaultMenuColor, "b" }, { &FWScript::o1_allowPlayerInput, "" }, { &FWScript::o1_disallowPlayerInput, "" }, - { &FWScript::o1_changeDataDisk, "b" }, + { &FWScript::o1_changeDataDisk, "b" }, /* Same as opcodes 0x95 and 0xA9. */ /* 6C */ { 0, 0 }, { &FWScript::o1_loadMusic, "s" }, @@ -193,7 +193,7 @@ const Opcode OSScript::_opcodeTable[] = { { &FWScript::o2_playSampleAlt, "bbwbww" }, { &FWScript::o1_disableSystemMenu, "b" }, { &FWScript::o1_loadMask5, "b" }, - { &FWScript::o1_unloadMask5, "b" }, + { &FWScript::o1_unloadMask5, "b" }, /* Last opcode used by Future Wars. */ /* 7C */ { 0, 0 }, { 0, 0 }, @@ -226,7 +226,7 @@ const Opcode OSScript::_opcodeTable[] = { { 0, 0 }, /* 94 */ { 0, 0 }, - { &FWScript::o1_changeDataDisk, "b" }, /* Same as opcode 0xA9. */ + { &FWScript::o1_changeDataDisk, "b" }, /* Same as opcodes 0x6B and 0xA9. */ { 0, 0 }, { 0, 0 }, /* 98 */ @@ -251,7 +251,7 @@ const Opcode OSScript::_opcodeTable[] = { { 0, 0 }, /* A8 */ { 0, 0 }, - { &FWScript::o1_changeDataDisk, "b" } /* Same as opcode 0x95. */ + { &FWScript::o1_changeDataDisk, "b" } /* Same as opcodes 0x6B and 0x95. */ }; const unsigned int OSScript::_numOpcodes = ARRAYSIZE(OSScript::_opcodeTable); -- cgit v1.2.3 From 691306f0b7e86e845fe3049316a657dd83a21865 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 27 May 2008 21:04:27 +0000 Subject: Fixed KyraEngine_v1::snd_stopVoice and KyraEngine_v1::snd_voiceIsPlaying implementations. svn-id: r32330 --- engines/kyra/script_hof.cpp | 2 +- engines/kyra/sound.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp index ef50cc8dfd..91fbfb3e49 100644 --- a/engines/kyra/script_hof.cpp +++ b/engines/kyra/script_hof.cpp @@ -760,7 +760,7 @@ int KyraEngine_HoF::o2_showItemString(EMCState *script) { int KyraEngine_HoF::o2_isAnySoundPlaying(EMCState *script) { debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_isAnySoundPlaying(%p) ()", (const void *)script); - return _sound->voiceIsPlaying(); + return _sound->voiceIsPlaying() ? 1 : 0; } int KyraEngine_HoF::o2_setDrawNoShapeFlag(EMCState *script) { diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index f8e2e1f1e0..8f9077705e 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -538,12 +538,15 @@ void KyraEngine_v1::snd_playWanderScoreViaMap(int command, int restart) { void KyraEngine_v1::snd_stopVoice() { debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_stopVoice()"); - _sound->voiceStop(_speechFile.empty() ? 0 : _speechFile.c_str()); + if (!_speechFile.empty()) { + _sound->voiceStop(_speechFile.c_str()); + _speechFile.clear(); + } } bool KyraEngine_v1::snd_voiceIsPlaying() { debugC(9, kDebugLevelMain | kDebugLevelSound, "KyraEngine_v1::snd_voiceIsPlaying()"); - return _sound->voiceIsPlaying(_speechFile.empty() ? 0 : _speechFile.c_str()); + return _speechFile.empty() ? false : _sound->voiceIsPlaying(_speechFile.c_str()); } // static res -- cgit v1.2.3 From 6358878a435a929adc5c0ca503b3eda7fe3acdd6 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 27 May 2008 21:18:21 +0000 Subject: Fixed choppy sound on my Vista box. (after talking with Fingolfin about it) svn-id: r32331 --- backends/platform/sdl/sdl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 91adc9b95d..b750864ad8 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -403,10 +403,10 @@ bool OSystem_SDL::setSoundCallback(SoundProc proc, void *param) { _samplesPerSec = SAMPLES_PER_SEC; // Determine the sample buffer size. We want it to store enough data for - // about 1/64th of a second. Note that it must be a power of two. + // about 1/32th of a second. Note that it must be a power of two. // So e.g. at 22050 Hz, we request a sample buffer size of 2048. int samples = 8192; - while (64 * samples >= _samplesPerSec) { + while (32 * samples >= _samplesPerSec) { samples >>= 1; } -- cgit v1.2.3 From 292bc04389912ea203dccaf233844520c88b0341 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 28 May 2008 02:55:42 +0000 Subject: Update the hard coded string translations in The Dig. svn-id: r32334 --- engines/scumm/string.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index 762bca12a9..f0e524408c 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -1464,6 +1464,7 @@ void ScummEngine_v7::translateText(const byte *text, byte *trans_buff) { // WORKAROUND for bug #1172655. if (_game.id == GID_DIG) { + // Based on the second release of The Dig if (!strcmp((const char *)text, "faint light")) text = (const byte *)"/NEW.007/faint light"; else if (!strcmp((const char *)text, "glowing crystal")) @@ -1472,9 +1473,9 @@ void ScummEngine_v7::translateText(const byte *text, byte *trans_buff) { text = (const byte *)"/NEW.009/glowing crystals"; else if (!strcmp((const char *)text, "pit")) text = (const byte *)"/NEW.010/pit"; - else if (!strcmp((const char *)text, "You wish.")) + else if (!strcmp((const char *)text, "/NEWTON.032/")) text = (const byte *)"/NEW.011/You wish."; - else if (!strcmp((const char *)text, "In your dreams.")) + else if (!strcmp((const char *)text, "/NEWTON.034/")) text = (const byte *)"/NEW.012/In your dreams"; else if (!strcmp((const char *)text, "left")) text = (const byte *)"/CATHPLAT.068/left"; @@ -1488,12 +1489,6 @@ void ScummEngine_v7::translateText(const byte *text, byte *trans_buff) { text = (const byte *)"/NEW.013/unattached lens"; else if (!strcmp((const char *)text, "lens slot")) text = (const byte *)"/NEW.014/lens slot"; - - // Added in second release of The Dig - else if (!strcmp((const char *)text, "/NEWTON.032/")) - text = (const byte *)"/NEW.11/You wish."; - else if (!strcmp((const char *)text, "/NEWTON.034/")) - text = (const byte *)"/NEW.12/In your dreams"; else if (!strcmp((const char *)text, "Jonathon Jackson")) text = (const byte *)"Aram Gutowski"; else if (!strcmp((const char *)text, "Brink")) -- cgit v1.2.3 From f0195a01f6efeecacaf5564eb51bd9115e589f5c Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Wed, 28 May 2008 12:05:40 +0000 Subject: Fix Operation Stealth's opcode 0x82's parameter list (Verified with DOS version's disassembly). svn-id: r32335 --- engines/cine/script_os.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/cine/script_os.cpp b/engines/cine/script_os.cpp index 7a1322330a..f9f0d3f031 100644 --- a/engines/cine/script_os.cpp +++ b/engines/cine/script_os.cpp @@ -202,7 +202,7 @@ const Opcode OSScript::_opcodeTable[] = { /* 80 */ { &FWScript::o2_removeSeq, "bb" }, { &FWScript::o2_op81, "" }, /* TODO: Name this opcode properly. */ - { &FWScript::o2_op82, "bbw" }, /* TODO: Name this opcode properly. */ + { &FWScript::o2_op82, "bbwwb" }, /* TODO: Name this opcode properly. */ { &FWScript::o2_isSeqRunning, "bb" }, /* 84 */ { &FWScript::o2_gotoIfSupNearest, "b" }, @@ -455,7 +455,9 @@ int FWScript::o2_op82() { byte a = getNextByte(); byte b = getNextByte(); uint16 c = getNextWord(); - warning("STUB: o2_op82(%x, %x, %x)", a, b, c); + uint16 d = getNextWord(); + byte e = getNextByte(); + warning("STUB: o2_op82(%x, %x, %x, %x, %x)", a, b, c, d, e); return 0; } -- cgit v1.2.3 From 51e4e487b1440f9142b5270beb7ed55abdac6f63 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Wed, 28 May 2008 13:00:27 +0000 Subject: Implemented opcode 0x9A (o2_wasZoneChecked). svn-id: r32336 --- engines/cine/script_os.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/engines/cine/script_os.cpp b/engines/cine/script_os.cpp index f9f0d3f031..7c88e3ffe3 100644 --- a/engines/cine/script_os.cpp +++ b/engines/cine/script_os.cpp @@ -232,7 +232,7 @@ const Opcode OSScript::_opcodeTable[] = { /* 98 */ { 0, 0 }, { 0, 0 }, - { &FWScript::o2_wasZoneChecked, "" }, + { &FWScript::o2_wasZoneChecked, "b" }, { &FWScript::o2_op9B, "wwwwwwww" }, /* TODO: Name this opcode properly. */ /* 9C */ { &FWScript::o2_op9C, "wwww" }, /* TODO: Name this opcode properly. */ @@ -649,10 +649,12 @@ int FWScript::o2_loadBg() { return 0; } -/*! \todo Implement this instruction +/*! \todo Check the current implementation for correctness */ int FWScript::o2_wasZoneChecked() { - warning("STUB: o2_wasZoneChecked()"); + byte param = getNextByte(); + _compare = (param < 16 && zoneData[param]); + debugC(5, kCineDebugScript, "Line: %d: o2_wasZoneChecked(%d)", _line, param); return 0; } -- cgit v1.2.3 From edc731e04f136069fad141515b997892485602c3 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 28 May 2008 13:00:41 +0000 Subject: The hard coded string translations for The Dig only apply to subtitles, and not speech. svn-id: r32337 --- engines/scumm/string.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index f0e524408c..53e5d993be 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -1439,9 +1439,13 @@ void ScummEngine_v7::loadLanguageBundle() { } void ScummEngine_v7::playSpeech(const byte *ptr) { + printf("playSpeech: %s\n", (const char *) ptr); + if ((_game.id == GID_DIG || _game.id == GID_CMI) && ptr[0]) { char pointer[20]; strcpy(pointer, (const char *)ptr); + + // Play speech if (!(_game.features & GF_DEMO) && (_game.id == GID_CMI)) // CMI demo does not have .IMX for voice @@ -1462,9 +1466,17 @@ void ScummEngine_v7::translateText(const byte *text, byte *trans_buff) { trans_buff[0] = 0; _lastStringTag[0] = 0; + if (_game.version >= 7 && text[0] == '/') { + // Extract the string tag from the text: /..../ + for (i = 0; (i < 12) && (text[i + 1] != '/'); i++) + _lastStringTag[i] = toupper(text[i + 1]); + _lastStringTag[i] = 0; + } + // WORKAROUND for bug #1172655. if (_game.id == GID_DIG) { // Based on the second release of The Dig + // Only applies to the subtitles and not speech if (!strcmp((const char *)text, "faint light")) text = (const byte *)"/NEW.007/faint light"; else if (!strcmp((const char *)text, "glowing crystal")) @@ -1501,8 +1513,8 @@ void ScummEngine_v7::translateText(const byte *text, byte *trans_buff) { if (_game.version >= 7 && text[0] == '/') { // Extract the string tag from the text: /..../ for (i = 0; (i < 12) && (text[i + 1] != '/'); i++) - _lastStringTag[i] = target.tag[i] = toupper(text[i + 1]); - _lastStringTag[i] = target.tag[i] = 0; + target.tag[i] = toupper(text[i + 1]); + target.tag[i] = 0; text += i + 2; // If a language file was loaded, try to find a translated version -- cgit v1.2.3 From 16b0905bb0b5e164a2014031749a61c24c6af32b Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Wed, 28 May 2008 13:02:33 +0000 Subject: Remove debug left over. svn-id: r32338 --- engines/scumm/string.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index 53e5d993be..81ffaa89ba 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -1439,13 +1439,9 @@ void ScummEngine_v7::loadLanguageBundle() { } void ScummEngine_v7::playSpeech(const byte *ptr) { - printf("playSpeech: %s\n", (const char *) ptr); - if ((_game.id == GID_DIG || _game.id == GID_CMI) && ptr[0]) { char pointer[20]; strcpy(pointer, (const char *)ptr); - - // Play speech if (!(_game.features & GF_DEMO) && (_game.id == GID_CMI)) // CMI demo does not have .IMX for voice -- cgit v1.2.3 From 90bf3de2d66a6605fad7f6a050fae6d277d15f56 Mon Sep 17 00:00:00 2001 From: Willem Jan Palenstijn Date: Wed, 28 May 2008 18:32:05 +0000 Subject: Decrement _nele when erasing an element from hashmap, and add a test-case for this bug. svn-id: r32343 --- common/hashmap.h | 1 + test/common/hashmap.h | 3 +++ 2 files changed, 4 insertions(+) diff --git a/common/hashmap.h b/common/hashmap.h index 81a4b0d17e..1bae44e98e 100644 --- a/common/hashmap.h +++ b/common/hashmap.h @@ -535,6 +535,7 @@ void HashMap::erase(const Key &key) { } } _arr[i] = NULL; + _nele--; return; } diff --git a/test/common/hashmap.h b/test/common/hashmap.h index 883e965065..5aa609bc00 100644 --- a/test/common/hashmap.h +++ b/test/common/hashmap.h @@ -37,6 +37,9 @@ class HashMapTestSuite : public CxxTest::TestSuite TS_ASSERT( !container.contains(1) ); container[1] = 42; TS_ASSERT( container.contains(1) ); + container.erase(0); + container.erase(1); + TS_ASSERT( container.empty() ); } void test_lookup( void ) -- cgit v1.2.3 From 29a4c3201b4fe4d8c1d6dfa10165e338cb4e01d9 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 28 May 2008 19:10:44 +0000 Subject: Remove the ENABLE_SCUMM_7_8 and ENABLE_HE directives from the SCUMM engine MSVC project file. They'll be placed in the global ScummVM project svn-id: r32344 --- dists/msvc7/scumm.vcproj | 4 ++-- dists/msvc71/scumm.vcproj | 4 ++-- dists/msvc8/scumm.vcproj | 4 ++-- dists/msvc9/scumm.vcproj | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dists/msvc7/scumm.vcproj b/dists/msvc7/scumm.vcproj index 56f78692cc..8264952066 100644 --- a/dists/msvc7/scumm.vcproj +++ b/dists/msvc7/scumm.vcproj @@ -21,7 +21,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" MinimalRebuild="TRUE" ExceptionHandling="TRUE" BasicRuntimeChecks="3" @@ -65,7 +65,7 @@ InlineFunctionExpansion="1" OmitFramePointers="TRUE" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" StringPooling="TRUE" ExceptionHandling="TRUE" RuntimeLibrary="0" diff --git a/dists/msvc71/scumm.vcproj b/dists/msvc71/scumm.vcproj index 661cc1fa19..26f8e7de58 100644 --- a/dists/msvc71/scumm.vcproj +++ b/dists/msvc71/scumm.vcproj @@ -21,7 +21,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" MinimalRebuild="TRUE" ExceptionHandling="TRUE" BasicRuntimeChecks="3" @@ -71,7 +71,7 @@ InlineFunctionExpansion="1" OmitFramePointers="TRUE" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" StringPooling="TRUE" ExceptionHandling="TRUE" RuntimeLibrary="0" diff --git a/dists/msvc8/scumm.vcproj b/dists/msvc8/scumm.vcproj index 42a4ff6993..e10f664c28 100644 --- a/dists/msvc8/scumm.vcproj +++ b/dists/msvc8/scumm.vcproj @@ -42,7 +42,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702 /wd4996" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" MinimalRebuild="true" ExceptionHandling="1" BasicRuntimeChecks="3" @@ -115,7 +115,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" StringPooling="true" ExceptionHandling="1" RuntimeLibrary="0" diff --git a/dists/msvc9/scumm.vcproj b/dists/msvc9/scumm.vcproj index 230102db35..4acecd4517 100644 --- a/dists/msvc9/scumm.vcproj +++ b/dists/msvc9/scumm.vcproj @@ -43,7 +43,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702 /wd4996" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" MinimalRebuild="true" ExceptionHandling="1" BasicRuntimeChecks="3" @@ -116,7 +116,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" StringPooling="true" ExceptionHandling="1" RuntimeLibrary="0" -- cgit v1.2.3 From e9c412241917342497a4ff80b5aaf5ca866cb7b3 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 28 May 2008 19:16:03 +0000 Subject: Added ENABLE directives for all ScummVM engines svn-id: r32345 --- dists/msvc7/scummvm.vcproj | 4 ++-- dists/msvc71/scummvm.vcproj | 4 ++-- dists/msvc8/scummvm.vcproj | 4 ++-- dists/msvc9/scummvm.vcproj | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dists/msvc7/scummvm.vcproj b/dists/msvc7/scummvm.vcproj index 55358a2cc6..aedfbe80f4 100644 --- a/dists/msvc7/scummvm.vcproj +++ b/dists/msvc7/scummvm.vcproj @@ -21,7 +21,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_NASM;USE_MT32EMU" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_NASM;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE" MinimalRebuild="TRUE" ExceptionHandling="TRUE" BasicRuntimeChecks="3" @@ -74,7 +74,7 @@ InlineFunctionExpansion="1" OmitFramePointers="TRUE" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE" StringPooling="TRUE" MinimalRebuild="FALSE" ExceptionHandling="TRUE" diff --git a/dists/msvc71/scummvm.vcproj b/dists/msvc71/scummvm.vcproj index 5e1100b788..7b7b5b72c8 100644 --- a/dists/msvc71/scummvm.vcproj +++ b/dists/msvc71/scummvm.vcproj @@ -21,7 +21,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_NASM;USE_MT32EMU" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_NASM;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE" MinimalRebuild="TRUE" ExceptionHandling="TRUE" BasicRuntimeChecks="3" @@ -80,7 +80,7 @@ InlineFunctionExpansion="1" OmitFramePointers="TRUE" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE" StringPooling="TRUE" MinimalRebuild="FALSE" ExceptionHandling="TRUE" diff --git a/dists/msvc8/scummvm.vcproj b/dists/msvc8/scummvm.vcproj index db5c10efd3..a5cd6a9169 100644 --- a/dists/msvc8/scummvm.vcproj +++ b/dists/msvc8/scummvm.vcproj @@ -42,7 +42,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702 /wd4996" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_NASM;USE_MT32EMU" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_NASM;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE" MinimalRebuild="true" ExceptionHandling="1" BasicRuntimeChecks="3" @@ -130,7 +130,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE" StringPooling="true" MinimalRebuild="false" ExceptionHandling="1" diff --git a/dists/msvc9/scummvm.vcproj b/dists/msvc9/scummvm.vcproj index 0de6bdc616..d5904961a7 100644 --- a/dists/msvc9/scummvm.vcproj +++ b/dists/msvc9/scummvm.vcproj @@ -43,7 +43,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702 /wd4996" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_NASM;USE_MT32EMU" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_NASM;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE" MinimalRebuild="true" ExceptionHandling="1" BasicRuntimeChecks="3" @@ -133,7 +133,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;USE_ZLIB;USE_MAD;USE_VORBIS;USE_MPEG2;USE_MT32EMU;ENABLE_AGI;ENABLE_AGOS;ENABLE_CINE;ENABLE_CRUISE;ENABLE_DRASCULA;ENABLE_GOB;ENABLE_IGOR;ENABLE_KYRA;ENABLE_LURE;ENABLE_M4;ENABLE_MADE;ENABLE_PARALLACTION;ENABLE_QUEEN;ENABLE_SAGA;ENABLE_SCUMM;ENABLE_SKY;ENABLE_SWORD1;ENABLE_SWORD2;ENABLE_TOUCHE;ENABLE_SCUMM_7_8;ENABLE_HE" StringPooling="true" MinimalRebuild="false" ExceptionHandling="1" -- cgit v1.2.3 From 649f439fb6fe7099ed4cf589961e6391d6ed45c5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 28 May 2008 19:30:43 +0000 Subject: Reverted commit #32344, apparently those defines are needed for the SCUMM engine for older versions of MSVC svn-id: r32346 --- dists/msvc7/scumm.vcproj | 4 ++-- dists/msvc71/scumm.vcproj | 4 ++-- dists/msvc8/scumm.vcproj | 4 ++-- dists/msvc9/scumm.vcproj | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dists/msvc7/scumm.vcproj b/dists/msvc7/scumm.vcproj index 8264952066..56f78692cc 100644 --- a/dists/msvc7/scumm.vcproj +++ b/dists/msvc7/scumm.vcproj @@ -21,7 +21,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" MinimalRebuild="TRUE" ExceptionHandling="TRUE" BasicRuntimeChecks="3" @@ -65,7 +65,7 @@ InlineFunctionExpansion="1" OmitFramePointers="TRUE" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;NDEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" StringPooling="TRUE" ExceptionHandling="TRUE" RuntimeLibrary="0" diff --git a/dists/msvc71/scumm.vcproj b/dists/msvc71/scumm.vcproj index 26f8e7de58..661cc1fa19 100644 --- a/dists/msvc71/scumm.vcproj +++ b/dists/msvc71/scumm.vcproj @@ -21,7 +21,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" MinimalRebuild="TRUE" ExceptionHandling="TRUE" BasicRuntimeChecks="3" @@ -71,7 +71,7 @@ InlineFunctionExpansion="1" OmitFramePointers="TRUE" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;NDEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" StringPooling="TRUE" ExceptionHandling="TRUE" RuntimeLibrary="0" diff --git a/dists/msvc8/scumm.vcproj b/dists/msvc8/scumm.vcproj index e10f664c28..42a4ff6993 100644 --- a/dists/msvc8/scumm.vcproj +++ b/dists/msvc8/scumm.vcproj @@ -42,7 +42,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702 /wd4996" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" MinimalRebuild="true" ExceptionHandling="1" BasicRuntimeChecks="3" @@ -115,7 +115,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;NDEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" StringPooling="true" ExceptionHandling="1" RuntimeLibrary="0" diff --git a/dists/msvc9/scumm.vcproj b/dists/msvc9/scumm.vcproj index 4acecd4517..230102db35 100644 --- a/dists/msvc9/scumm.vcproj +++ b/dists/msvc9/scumm.vcproj @@ -43,7 +43,7 @@ AdditionalOptions="/wd4201 /wd4512 /wd4511 /wd4100 /wd4121 /wd4310 /wd4706 /wd4127 /wd4189 /wd4702 /wd4996" Optimization="0" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;_DEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;_DEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" MinimalRebuild="true" ExceptionHandling="1" BasicRuntimeChecks="3" @@ -116,7 +116,7 @@ InlineFunctionExpansion="1" OmitFramePointers="true" AdditionalIncludeDirectories="../..;../../engines" - PreprocessorDefinitions="WIN32;NDEBUG;USE_ZLIB;USE_MAD;USE_VORBIS" + PreprocessorDefinitions="WIN32;NDEBUG;ENABLE_SCUMM_7_8;ENABLE_HE;USE_ZLIB;USE_MAD;USE_VORBIS" StringPooling="true" ExceptionHandling="1" RuntimeLibrary="0" -- cgit v1.2.3 From 057af1000f5187a93fc1ac1a5f61a7a6a382bf03 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 28 May 2008 19:45:04 +0000 Subject: Removed an MSVC specific hack, after discussing with jvprat. It seems that MSVC was trying to add the parenthesis after ENABLE_##ID to the check... svn-id: r32347 --- base/plugins.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/base/plugins.h b/base/plugins.h index 7507e0c358..2eaa290ed7 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -82,16 +82,10 @@ extern int pluginTypeVersions[PLUGIN_TYPE_MAX]; #define DYNAMIC_PLUGIN 2 #define PLUGIN_ENABLED_STATIC(ID) \ - (defined(ENABLE_##ID) && !PLUGIN_ENABLED_DYNAMIC(ID)) - -// HACK for MSVC -#if defined(_MSC_VER) - #undef PLUGIN_ENABLED_STATIC - #define PLUGIN_ENABLED_STATIC(ID) 1 -#endif + (defined( ENABLE_##ID ) && !PLUGIN_ENABLED_DYNAMIC(ID)) #define PLUGIN_ENABLED_DYNAMIC(ID) \ - (defined(ENABLE_##ID) && (ENABLE_##ID == DYNAMIC_PLUGIN) && defined(DYNAMIC_MODULES)) + (defined( ENABLE_##ID ) && (ENABLE_##ID == DYNAMIC_PLUGIN) && defined(DYNAMIC_MODULES)) /** * REGISTER_PLUGIN_STATIC is a convenience macro which is used to declare -- cgit v1.2.3 From df0e072a1b59011a4f37b41f9ae53036c3682e8f Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 28 May 2008 20:12:01 +0000 Subject: Fixed a crash in LGOP2 when attempting to get a sprite item from an empty array. svn-id: r32348 --- engines/made/screen.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 754a45016c..a480a3bc0c 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -819,7 +819,13 @@ int16 Screen::addToSpriteList(int16 index, int16 xofs, int16 yofs) { } SpriteListItem Screen::getFromSpriteList(int16 index) { - return _spriteList[index - 1]; + if (index > _spriteList.size()) { + SpriteListItem emptyItem; + emptyItem.index = 0; + return emptyItem; + } else { + return _spriteList[index - 1]; + } } void Screen::clearSpriteList() { -- cgit v1.2.3 From 885fa54f28df837c2045e4d8405e1ab0de60a9e3 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 28 May 2008 20:16:22 +0000 Subject: Split Object/GameDatabase into engine version specific classes svn-id: r32349 --- engines/made/database.cpp | 621 +++++++++++++++++++++++----------------------- engines/made/database.h | 124 ++++++--- engines/made/made.cpp | 10 +- 3 files changed, 402 insertions(+), 353 deletions(-) diff --git a/engines/made/database.cpp b/engines/made/database.cpp index f7fce52b21..4a331d5ca1 100644 --- a/engines/made/database.cpp +++ b/engines/made/database.cpp @@ -47,7 +47,79 @@ Object::~Object() { delete[] _objData; } -int Object::loadVersion2(Common::SeekableReadStream &source) { +const char *Object::getString() { + if (getClass() == 0x7FFF) + return (const char*)getData(); + else + return NULL; +} + +void Object::setString(const char *str) { + if (getClass() == 0x7FFF) { + char *objStr = (char*)getData(); + if (str) + strncpy(objStr, str, getSize()); + else + objStr[0] = '\0'; + } +} + +bool Object::isObject() { + return getClass() < 0x7FFE; +} + +bool Object::isVector() { + return getClass() == 0x7FFF; +} + +int16 Object::getVectorSize() { + if (getClass() == 0x7FFF || getClass() == 0x7FFE) { + return getSize(); + } else if (getClass() < 0x7FFE) { + return getCount1() + getCount2(); + } else { + // should never reach here + error("Unknown object class"); + return 0; + } +} + +int16 Object::getVectorItem(int16 index) { + if (getClass() == 0x7FFF) { + byte *vector = (byte*)getData(); + return vector[index]; + } else if (getClass() == 0x7FFE) { + int16 *vector = (int16*)getData(); + return READ_LE_UINT16(&vector[index]); + } else if (getClass() < 0x7FFE) { + int16 *vector = (int16*)getData(); + return READ_LE_UINT16(&vector[index]); + } else { + // should never reach here + error("Unknown object class"); + return 0; + } +} + +void Object::setVectorItem(int16 index, int16 value) { + if (getClass() == 0x7FFF) { + byte *vector = (byte*)getData(); + vector[index] = value; + } else if (getClass() <= 0x7FFE) { + int16 *vector = (int16*)getData(); + WRITE_LE_UINT16(&vector[index], value); + } +} + +void Object::dump(const char *filename) { + /* + FILE *o = fopen(filename, "wb"); + fwrite(_objData, _objSize, 1, o); + fclose(o); + */ +} + +int ObjectV2::load(Common::SeekableReadStream &source) { if (_freeData && _objData) delete[] _objData; @@ -67,22 +139,51 @@ int Object::loadVersion2(Common::SeekableReadStream &source) { byte count2 = header[3]; _objSize = (count1 + count2) * 2; } - _objSize += 6; + _objSize += 4; _objData = new byte[_objSize]; - WRITE_LE_UINT16(_objData, 1); - memcpy(_objData + 2, header, 4); - source.read(_objData + 6, _objSize - 6); + memcpy(_objData, header, 4); + source.read(_objData + 4, _objSize - 4); - return _objSize - 2; + return _objSize; + +} +int ObjectV2::load(byte *source) { + // Not implemented/used for version 2 objects + return 0; } -int Object::saveVersion2(Common::WriteStream &dest) { - dest.write(_objData + 2, _objSize - 2); +int ObjectV2::save(Common::WriteStream &dest) { + dest.write(_objData, _objSize); return 0; } -int Object::loadVersion3(Common::SeekableReadStream &source) { +uint16 ObjectV2::getFlags() { + return 1; +} + +uint16 ObjectV2::getClass() { + return READ_LE_UINT16(_objData); +} + +uint16 ObjectV2::getSize() { + return READ_LE_UINT16(_objData + 2); +} + +byte ObjectV2::getCount1() { + return _objData[2]; +} + +byte ObjectV2::getCount2() { + return _objData[3]; +} + +byte *ObjectV2::getData() { + return _objData + 4; +} + +int ObjectV3::load(Common::SeekableReadStream &source) { + _freeData = true; source.readUint16LE(); // skip flags uint16 type = source.readUint16LE(); @@ -100,9 +201,10 @@ int Object::loadVersion3(Common::SeekableReadStream &source) { _objData = new byte[_objSize]; source.read(_objData, _objSize); return _objSize; + } -int Object::loadVersion3(byte *source) { +int ObjectV3::load(byte *source) { _objData = source; _freeData = false; if (getClass() < 0x7FFE) { @@ -114,111 +216,43 @@ int Object::loadVersion3(byte *source) { return _objSize; } -uint16 Object::getFlags() const { +int ObjectV3::save(Common::WriteStream &dest) { + // Not implemented/used for version 3 objects + return 0; +} + +uint16 ObjectV3::getFlags() { return READ_LE_UINT16(_objData); } -uint16 Object::getClass() const { +uint16 ObjectV3::getClass() { return READ_LE_UINT16(_objData + 2); } -uint16 Object::getSize() const { +uint16 ObjectV3::getSize() { return READ_LE_UINT16(_objData + 4); } -byte Object::getCount1() const { +byte ObjectV3::getCount1() { return _objData[4]; } -byte Object::getCount2() const { +byte ObjectV3::getCount2() { return _objData[5]; } -byte *Object::getData() { +byte *ObjectV3::getData() { return _objData + 6; } -const char *Object::getString() { - if (getClass() == 0x7FFF) - return (const char*)getData(); - else - return NULL; -} - -void Object::setString(const char *str) { - if (getClass() == 0x7FFF) { - char *objStr = (char*)getData(); - if (str) - strncpy(objStr, str, getSize()); - else - objStr[0] = '\0'; - } -} - -bool Object::isObject() { - return getClass() < 0x7FFE; -} - -bool Object::isVector() { - return getClass() == 0x7FFF; -} - -int16 Object::getVectorSize() { - if (getClass() == 0x7FFF || getClass() == 0x7FFE) { - return getSize(); - } else if (getClass() < 0x7FFE) { - return getCount1() + getCount2(); - } else { - // should never reach here - error("Unknown object class"); - return 0; - } -} - -int16 Object::getVectorItem(int16 index) { - if (getClass() == 0x7FFF) { - byte *vector = (byte*)getData(); - return vector[index]; - } else if (getClass() == 0x7FFE) { - int16 *vector = (int16*)getData(); - return READ_LE_UINT16(&vector[index]); - } else if (getClass() < 0x7FFE) { - int16 *vector = (int16*)getData(); - return READ_LE_UINT16(&vector[index]); - } else { - // should never reach here - error("Unknown object class"); - return 0; - } -} -void Object::setVectorItem(int16 index, int16 value) { - if (getClass() == 0x7FFF) { - byte *vector = (byte*)getData(); - vector[index] = value; - } else if (getClass() <= 0x7FFE) { - int16 *vector = (int16*)getData(); - WRITE_LE_UINT16(&vector[index], value); - } -} - -void Object::dump(const char *filename) { - /* - FILE *o = fopen(filename, "wb"); - fwrite(_objData, _objSize, 1, o); - fclose(o); - */ -} GameDatabase::GameDatabase(MadeEngine *vm) : _vm(vm) { - _gameText = NULL; } GameDatabase::~GameDatabase() { if (_gameState) delete[] _gameState; - if (_gameText) - delete[] _gameText; } void GameDatabase::open(const char *filename) { @@ -239,19 +273,71 @@ void GameDatabase::openFromRed(const char *redFilename, const char *filename) { delete fileS; } -void GameDatabase::load(Common::SeekableReadStream &sourceS) { +int16 GameDatabase::getVar(int16 index) { + return (int16)READ_LE_UINT16(_gameState + index * 2); +} + +void GameDatabase::setVar(int16 index, int16 value) { + WRITE_LE_UINT16(_gameState + index * 2, value); +} + +int16 GameDatabase::getObjectProperty(int16 objectIndex, int16 propertyId) { + + if (objectIndex == 0) + return 0; + + int16 propertyFlag; + int16 *property = getObjectPropertyPtr(objectIndex, propertyId, propertyFlag); + + if (property) { + return (int16)READ_LE_UINT16(property); + } else { + return 0; + } + +} + +int16 GameDatabase::setObjectProperty(int16 objectIndex, int16 propertyId, int16 value) { + + if (objectIndex == 0) + return 0; + + int16 propertyFlag; + int16 *property = getObjectPropertyPtr(objectIndex, propertyId, propertyFlag); - if (_vm->getGameID() == GID_MANHOLE || _vm->getGameID() == GID_LGOP2) { - debug(2, "loading version 2 dat"); - loadVersion2(sourceS); - } else if (_vm->getGameID() == GID_RTZ) { - debug(2, "loading version 3 dat"); - loadVersion3(sourceS); + if (property) { + if (propertyFlag == 1) { + WRITE_LE_UINT16(property, value); + } else { + warning("GameDatabase::setObjectProperty(%04X, %04X, %04X) Trying to set constant property\n", + objectIndex, propertyId, value); + } + return value; + } else { + return 0; } } -void GameDatabase::loadVersion2(Common::SeekableReadStream &sourceS) { +void GameDatabase::dumpObject(int16 index) { + Object *obj = getObject(index); + char fn[512]; + sprintf(fn, "obj%04X.0", index); + obj->dump(fn); +} + + +/* GameDatabaseV2 */ + +GameDatabaseV2::GameDatabaseV2(MadeEngine *vm) : GameDatabase(vm), _gameText(NULL) { +} + +GameDatabaseV2::~GameDatabaseV2() { + if (_gameText) + delete[] _gameText; +} + +void GameDatabaseV2::load(Common::SeekableReadStream &sourceS) { // TODO: Read/verifiy header @@ -285,8 +371,8 @@ void GameDatabase::loadVersion2(Common::SeekableReadStream &sourceS) { sourceS.seek(objectsOffs); for (uint32 i = 0; i < objectCount; i++) { - Object *obj = new Object(); - int objSize = obj->loadVersion2(sourceS); + Object *obj = new ObjectV2(); + int objSize = obj->load(sourceS); // objects are aligned on 2-byte-boundaries, skip unused bytes sourceS.skip(objSize % 2); _objects.push_back(obj); @@ -294,176 +380,43 @@ void GameDatabase::loadVersion2(Common::SeekableReadStream &sourceS) { } -void GameDatabase::loadVersion3(Common::SeekableReadStream &sourceS) { - - // TODO: Read/verifiy header - - sourceS.seek(0x1E); - - uint32 objectIndexOffs = sourceS.readUint32LE(); - uint16 objectCount = sourceS.readUint16LE(); - uint32 gameStateOffs = sourceS.readUint32LE(); - _gameStateSize = sourceS.readUint32LE(); - uint32 objectsOffs = sourceS.readUint32LE(); - uint32 objectsSize = sourceS.readUint32LE(); - _mainCodeObjectIndex = sourceS.readUint16LE(); - - debug(2, "objectIndexOffs = %08X; objectCount = %d; gameStateOffs = %08X; gameStateSize = %d; objectsOffs = %08X; objectsSize = %d\n", objectIndexOffs, objectCount, gameStateOffs, _gameStateSize, objectsOffs, objectsSize); - - _gameState = new byte[_gameStateSize]; - sourceS.seek(gameStateOffs); - sourceS.read(_gameState, _gameStateSize); - - Common::Array objectOffsets; - sourceS.seek(objectIndexOffs); - for (uint32 i = 0; i < objectCount; i++) - objectOffsets.push_back(sourceS.readUint32LE()); - - for (uint32 i = 0; i < objectCount; i++) { - Object *obj = new Object(); - - // The LSB indicates if it's a constant or variable object. - // Constant objects are loaded from disk, while variable objects exist - // in the _gameState buffer. - - //debug(2, "obj(%04X) ofs = %08X\n", i, objectOffsets[i]); - - if (objectOffsets[i] & 1) { - //debug(2, "-> const %08X\n", objectsOffs + objectOffsets[i] - 1); - sourceS.seek(objectsOffs + objectOffsets[i] - 1); - obj->loadVersion3(sourceS); - } else { - //debug(2, "-> var\n"); - obj->loadVersion3(_gameState + objectOffsets[i]); - } - _objects.push_back(obj); - } - -} - -bool GameDatabase::getSavegameDescription(const char *filename, Common::String &description) { - - Common::InSaveFile *in; - - if (!(in = g_system->getSavefileManager()->openForLoading(filename))) { - return false; - } - - char desc[64]; - - in->skip(4); // TODO: Verify marker 'SGAM' - in->skip(4); // TODO: Verify size - in->skip(2); // TODO: Verify version - in->read(desc, 64); - description = desc; - - delete in; - - return true; - +bool GameDatabaseV2::getSavegameDescription(const char *filename, Common::String &description) { + // Not used in version 2 games + return false; } -int16 GameDatabase::savegame(const char *filename, const char *description, int16 version) { - +int16 GameDatabaseV2::savegame(const char *filename, const char *description, int16 version) { Common::OutSaveFile *out; int16 result = 0; - if (!(out = g_system->getSavefileManager()->openForSaving(filename))) { warning("Can't create file '%s', game not saved", filename); return 6; } - - switch (_vm->_engineVersion) { - case 2: - result = savegameV2(out, description, version); - break; - case 3: - result = savegameV3(out, description, version); - break; - default: - error("GameDatabase::savegame() Unknown engine version"); - } - + // Variable 0 is not saved + out->write(_gameState + 2, _gameStateSize - 2); + for (uint i = 0; i < _objects.size(); i++) + _objects[i]->save(*out); delete out; - return result; - } -int16 GameDatabase::loadgame(const char *filename, int16 version) { - +int16 GameDatabaseV2::loadgame(const char *filename, int16 version) { Common::InSaveFile *in; int16 result = 0; - if (!(in = g_system->getSavefileManager()->openForLoading(filename))) { warning("Can't open file '%s', game not loaded", filename); return 1; } - - switch (_vm->_engineVersion) { - case 2: - result = loadgameV2(in, version); - break; - case 3: - result = loadgameV3(in, version); - break; - default: - error("GameDatabase::loadgame() Unknown engine version"); + // Variable 0 is not loaded + in->read(_gameState + 2, _gameStateSize - 2); + for (uint i = 0; i < _objects.size(); i++) { + _objects[i]->load(*in); } - delete in; - return result; - -} - -int16 GameDatabase::savegameV2(Common::OutSaveFile *out, const char *description, int16 version) { - // Variable 0 is not saved - out->write(_gameState + 2, _gameStateSize - 2); - for (uint i = 0; i < _objects.size(); i++) - _objects[i]->saveVersion2(*out); - return 0; -} - -int16 GameDatabase::loadgameV2(Common::InSaveFile *in, int16 version) { - // Variable 0 is not loaded - in->read(_gameState + 2, _gameStateSize - 2); - for (uint i = 0; i < _objects.size(); i++) - _objects[i]->loadVersion2(*in); - return 0; } -int16 GameDatabase::savegameV3(Common::OutSaveFile *out, const char *description, int16 version) { - uint32 size = 4 + 4 + 2 + _gameStateSize; - char desc[64]; - strncpy(desc, description, 64); - out->writeUint32BE(MKID_BE('SGAM')); - out->writeUint32LE(size); - out->writeUint16LE(version); - out->write(desc, 64); - out->write(_gameState, _gameStateSize); - return 0; -} - -int16 GameDatabase::loadgameV3(Common::InSaveFile *in, int16 version) { - //uint32 expectedSize = 4 + 4 + 2 + _gameStateSize; - in->skip(4); // TODO: Verify marker 'SGAM' - in->skip(4); // TODO: Verify size - in->skip(2); // TODO: Verify version - in->skip(64); // skip savegame description - in->read(_gameState, _gameStateSize); - return 0; -} - -int16 GameDatabase::getVar(int16 index) { - return (int16)READ_LE_UINT16(_gameState + index * 2); -} - -void GameDatabase::setVar(int16 index, int16 value) { - WRITE_LE_UINT16(_gameState + index * 2, value); -} - -int16 *GameDatabase::getObjectPropertyPtrV2(int16 objectIndex, int16 propertyId, int16 &propertyFlag) { +int16 *GameDatabaseV2::getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag) { Object *obj = getObject(objectIndex); int16 *prop = (int16*)obj->getData(); @@ -486,14 +439,11 @@ int16 *GameDatabase::getObjectPropertyPtrV2(int16 objectIndex, int16 propertyId, // Now check in the object hierarchy of the given object int16 parentObjectIndex = obj->getClass(); if (parentObjectIndex == 0) { - debug(2, "GameDatabase::getObjectPropertyPtrV2() NULL(1)"); return NULL; } while (parentObjectIndex != 0) { - //debug(2, "parentObjectIndex = %04X\n", parentObjectIndex); - obj = getObject(parentObjectIndex); prop = (int16*)obj->getData(); @@ -525,12 +475,115 @@ int16 *GameDatabase::getObjectPropertyPtrV2(int16 objectIndex, int16 propertyId, } - debug(2, "GameDatabase::getObjectPropertyPtrV2() NULL(2)"); return NULL; } -int16 *GameDatabase::getObjectPropertyPtrV3(int16 objectIndex, int16 propertyId, int16 &propertyFlag) { +const char *GameDatabaseV2::getString(uint16 offset) { + return (const char*)&_gameText[offset * 4]; +} + + +/* GameDatabaseV3 */ + +GameDatabaseV3::GameDatabaseV3(MadeEngine *vm) : GameDatabase(vm) { +} + +void GameDatabaseV3::load(Common::SeekableReadStream &sourceS) { + + // TODO: Read/verifiy header + + sourceS.seek(0x1E); + + uint32 objectIndexOffs = sourceS.readUint32LE(); + uint16 objectCount = sourceS.readUint16LE(); + uint32 gameStateOffs = sourceS.readUint32LE(); + _gameStateSize = sourceS.readUint32LE(); + uint32 objectsOffs = sourceS.readUint32LE(); + uint32 objectsSize = sourceS.readUint32LE(); + _mainCodeObjectIndex = sourceS.readUint16LE(); + + debug(2, "objectIndexOffs = %08X; objectCount = %d; gameStateOffs = %08X; gameStateSize = %d; objectsOffs = %08X; objectsSize = %d\n", objectIndexOffs, objectCount, gameStateOffs, _gameStateSize, objectsOffs, objectsSize); + + _gameState = new byte[_gameStateSize]; + sourceS.seek(gameStateOffs); + sourceS.read(_gameState, _gameStateSize); + + Common::Array objectOffsets; + sourceS.seek(objectIndexOffs); + for (uint32 i = 0; i < objectCount; i++) + objectOffsets.push_back(sourceS.readUint32LE()); + + for (uint32 i = 0; i < objectCount; i++) { + Object *obj = new ObjectV3(); + + // The LSB indicates if it's a constant or variable object. + // Constant objects are loaded from disk, while variable objects exist + // in the _gameState buffer. + + if (objectOffsets[i] & 1) { + sourceS.seek(objectsOffs + objectOffsets[i] - 1); + obj->load(sourceS); + } else { + obj->load(_gameState + objectOffsets[i]); + } + _objects.push_back(obj); + } + +} + +bool GameDatabaseV3::getSavegameDescription(const char *filename, Common::String &description) { + Common::InSaveFile *in; + char desc[64]; + if (!(in = g_system->getSavefileManager()->openForLoading(filename))) { + return false; + } + in->skip(4); // TODO: Verify marker 'SGAM' + in->skip(4); // TODO: Verify size + in->skip(2); // TODO: Verify version + in->read(desc, 64); + description = desc; + delete in; + return true; +} + +int16 GameDatabaseV3::savegame(const char *filename, const char *description, int16 version) { + Common::OutSaveFile *out; + char desc[64]; + int16 result = 0; + uint32 size = 4 + 4 + 2 + _gameStateSize; + if (!(out = g_system->getSavefileManager()->openForSaving(filename))) { + warning("Can't create file '%s', game not saved", filename); + return 6; + } + strncpy(desc, description, 64); + out->writeUint32BE(MKID_BE('SGAM')); + out->writeUint32LE(size); + out->writeUint16LE(version); + out->write(desc, 64); + out->write(_gameState, _gameStateSize); + delete out; + return result; +} + +int16 GameDatabaseV3::loadgame(const char *filename, int16 version) { + Common::InSaveFile *in; + int16 result = 0; + //uint32 expectedSize = 4 + 4 + 2 + _gameStateSize; + if (!(in = g_system->getSavefileManager()->openForLoading(filename))) { + warning("Can't open file '%s', game not loaded", filename); + return 1; + } + in->skip(4); // TODO: Verify marker 'SGAM' + in->skip(4); // TODO: Verify size + in->skip(2); // TODO: Verify version + in->skip(64); // skip savegame description + in->read(_gameState, _gameStateSize); + delete in; + return result; +} + +int16 *GameDatabaseV3::getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag) { Object *obj = getObject(objectIndex); int16 *prop = (int16*)obj->getData(); @@ -558,14 +611,11 @@ int16 *GameDatabase::getObjectPropertyPtrV3(int16 objectIndex, int16 propertyId, // Now check in the object hierarchy of the given object int16 parentObjectIndex = obj->getClass(); if (parentObjectIndex == 0) { - //debug(2, "! NULL(np)\n"); return NULL; } while (parentObjectIndex != 0) { - //debug(2, "parentObjectIndex = %04X\n", parentObjectIndex); - obj = getObject(parentObjectIndex); prop = (int16*)obj->getData(); @@ -607,70 +657,13 @@ int16 *GameDatabase::getObjectPropertyPtrV3(int16 objectIndex, int16 propertyId, } - //debug(2, "! NULL(nf)\n"); return NULL; - -} - -int16 *GameDatabase::getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag) { - switch (_vm->_engineVersion) { - case 2: - return getObjectPropertyPtrV2(objectIndex, propertyId, propertyFlag); - case 3: - return getObjectPropertyPtrV3(objectIndex, propertyId, propertyFlag); - default: - error("GameDatabase::getObjectPropertyPtr() Unknown engine version"); - return NULL; - } -} - -int16 GameDatabase::getObjectProperty(int16 objectIndex, int16 propertyId) { - - if (objectIndex == 0) - return 0; - - int16 propertyFlag; - int16 *property = getObjectPropertyPtr(objectIndex, propertyId, propertyFlag); - if (property) { - return (int16)READ_LE_UINT16(property); - } else { - return 0; - } - } -int16 GameDatabase::setObjectProperty(int16 objectIndex, int16 propertyId, int16 value) { - - if (objectIndex == 0) - return 0; - - int16 propertyFlag; - int16 *property = getObjectPropertyPtr(objectIndex, propertyId, propertyFlag); - - if (property) { - if (propertyFlag == 1) { - WRITE_LE_UINT16(property, value); - } else { - warning("GameDatabase::setObjectProperty(%04X, %04X, %04X) Trying to set constant property\n", - objectIndex, propertyId, value); - } - return value; - } else { - return 0; - } - -} - -const char *GameDatabase::getString(uint16 offset) { - return (const char*)&_gameText[offset * 4]; -} - -void GameDatabase::dumpObject(int16 index) { - Object *obj = getObject(index); - char fn[512]; - sprintf(fn, "obj%04X.0", index); - obj->dump(fn); +const char *GameDatabaseV3::getString(uint16 offset) { + // Not used in version 3 games + return NULL; } } // End of namespace Made diff --git a/engines/made/database.h b/engines/made/database.h index 0924200374..49655e41ae 100644 --- a/engines/made/database.h +++ b/engines/made/database.h @@ -40,29 +40,25 @@ namespace Made { class Object { public: Object(); - ~Object(); + virtual ~Object(); + + virtual int load(Common::SeekableReadStream &source) = 0; + virtual int load(byte *source) = 0; + virtual int save(Common::WriteStream &dest) = 0; + virtual uint16 getFlags() = 0; + virtual uint16 getClass() = 0; + virtual uint16 getSize() = 0; + virtual byte getCount1() = 0; + virtual byte getCount2() = 0; + virtual byte *getData() = 0; + virtual bool isConstant() = 0; - int loadVersion2(Common::SeekableReadStream &source); - int saveVersion2(Common::WriteStream &dest); - - int loadVersion3(Common::SeekableReadStream &source); - int loadVersion3(byte *source); - - uint16 getFlags() const; - uint16 getClass() const; - uint16 getSize() const; - - byte getCount1() const; - byte getCount2() const; - - byte *getData(); const char *getString(); void setString(const char *str); bool isObject(); bool isVector(); - bool isConstant() const { return !(getFlags() & 1); } - + int16 getVectorSize(); int16 getVectorItem(int16 index); void setVectorItem(int16 index, int16 value); @@ -75,20 +71,52 @@ protected: byte *_objData; }; +class ObjectV2 : public Object { +public: + int load(Common::SeekableReadStream &source); + int load(byte *source); + int save(Common::WriteStream &dest); + uint16 getFlags(); + uint16 getClass(); + uint16 getSize(); + byte getCount1(); + byte getCount2(); + byte *getData(); + + bool isConstant() { + return false; + } + +}; + +class ObjectV3 : public Object { +public: + int load(Common::SeekableReadStream &source); + int load(byte *source); + int save(Common::WriteStream &dest); + uint16 getFlags(); + uint16 getClass(); + uint16 getSize(); + byte getCount1(); + byte getCount2(); + byte *getData(); + + bool isConstant() { + return !(getFlags() & 1); + } + +}; + class GameDatabase { public: GameDatabase(MadeEngine *vm); - ~GameDatabase(); + virtual ~GameDatabase(); void open(const char *filename); void openFromRed(const char *redFilename, const char *filename); - bool getSavegameDescription(const char *filename, Common::String &description); - int16 savegame(const char *filename, const char *description, int16 version); - int16 loadgame(const char *filename, int16 version); - - Object *getObject(int16 index) const { + Object *getObject(int16 index) const { if (index >= 1) return _objects[index - 1]; else @@ -101,32 +129,52 @@ public: int16 getVar(int16 index); void setVar(int16 index, int16 value); - - int16 *getObjectPropertyPtrV2(int16 objectIndex, int16 propertyId, int16 &propertyFlag); - int16 *getObjectPropertyPtrV3(int16 objectIndex, int16 propertyId, int16 &propertyFlag); - int16 *getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag); - + + virtual int16 *getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag) = 0; + virtual const char *getString(uint16 offset) = 0; + virtual bool getSavegameDescription(const char *filename, Common::String &description) = 0; + virtual int16 savegame(const char *filename, const char *description, int16 version) = 0; + virtual int16 loadgame(const char *filename, int16 version) = 0; + int16 getObjectProperty(int16 objectIndex, int16 propertyId); int16 setObjectProperty(int16 objectIndex, int16 propertyId, int16 value); - - const char *getString(uint16 offset); void dumpObject(int16 index); - + protected: MadeEngine *_vm; Common::Array _objects; byte *_gameState; uint32 _gameStateSize; - char *_gameText; int16 _mainCodeObjectIndex; + virtual void load(Common::SeekableReadStream &sourceS) = 0; +}; + +class GameDatabaseV2 : public GameDatabase { +public: + GameDatabaseV2(MadeEngine *vm); + ~GameDatabaseV2(); + int16 *getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag); + const char *getString(uint16 offset); + bool getSavegameDescription(const char *filename, Common::String &description); + int16 savegame(const char *filename, const char *description, int16 version); + int16 loadgame(const char *filename, int16 version); +protected: + char *_gameText; + void load(Common::SeekableReadStream &sourceS); +}; + +class GameDatabaseV3 : public GameDatabase { +public: + GameDatabaseV3(MadeEngine *vm); + int16 *getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag); + const char *getString(uint16 offset); + bool getSavegameDescription(const char *filename, Common::String &description); + int16 savegame(const char *filename, const char *description, int16 version); + int16 loadgame(const char *filename, int16 version); +protected: + char *_gameText; void load(Common::SeekableReadStream &sourceS); - void loadVersion2(Common::SeekableReadStream &sourceS); - void loadVersion3(Common::SeekableReadStream &sourceS); - int16 savegameV2(Common::OutSaveFile *out, const char *description, int16 version); - int16 loadgameV2(Common::InSaveFile *in, int16 version); - int16 savegameV3(Common::OutSaveFile *out, const char *description, int16 version); - int16 loadgameV3(Common::InSaveFile *in, int16 version); }; } // End of namespace Made diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 92efb881e2..da7ab23f5d 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -86,7 +86,15 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng _pmvPlayer = new PmvPlayer(this, _mixer); _res = new ProjectReader(); _screen = new Screen(this); - _dat = new GameDatabase(this); + + if (getGameID() == GID_LGOP2 || getGameID() == GID_MANHOLE) { + _dat = new GameDatabaseV2(this); + } else if (getGameID() == GID_RTZ) { + _dat = new GameDatabaseV3(this); + } else { + error("Unknown GameID"); + } + _script = new ScriptInterpreter(this); int midiDriver = MidiDriver::detectMusicDriver(MDT_MIDI | MDT_ADLIB | MDT_PREFER_MIDI); -- cgit v1.2.3 From c9fd5fef7645cc7ba6e14ddfeaab91d941f3b8f7 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 28 May 2008 20:31:01 +0000 Subject: Added a note about the MSVC quirk with the spaces around ENABLE_##ID svn-id: r32351 --- base/plugins.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/base/plugins.h b/base/plugins.h index 2eaa290ed7..aef95a6650 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -81,6 +81,12 @@ extern int pluginTypeVersions[PLUGIN_TYPE_MAX]; #define STATIC_PLUGIN 1 #define DYNAMIC_PLUGIN 2 +// Note: The spaces around ENABLE_##ID have been added on purpose for +// MSVC. For some reason, MSVC tries to add the parenthesis after +// ENABLE_##ID to the check, thus making it false all the time. +// Please do NOT remove them, otherwise no engine plugins will be +// registered under MSVC + #define PLUGIN_ENABLED_STATIC(ID) \ (defined( ENABLE_##ID ) && !PLUGIN_ENABLED_DYNAMIC(ID)) -- cgit v1.2.3 From 8da68b29648f9dbdcc05b3a1efe4a29ed2c4e88c Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 28 May 2008 21:15:11 +0000 Subject: Script variables are now always stored in the game version's native endianess. This should make Woodruff playable on big-endian systems. svn-id: r32352 --- engines/gob/draw_v1.cpp | 1 + engines/gob/draw_v2.cpp | 1 + engines/gob/game.cpp | 28 ++-- engines/gob/game.h | 5 +- engines/gob/game_v1.cpp | 8 +- engines/gob/game_v2.cpp | 13 +- engines/gob/global.cpp | 2 - engines/gob/global.h | 64 --------- engines/gob/gob.h | 49 +++---- engines/gob/goblin.cpp | 1 + engines/gob/goblin_v2.cpp | 1 + engines/gob/goblin_v4.cpp | 1 + engines/gob/init.cpp | 12 +- engines/gob/inter.cpp | 20 +++ engines/gob/inter.h | 10 +- engines/gob/inter_v1.cpp | 26 ++-- engines/gob/inter_v2.cpp | 33 ++--- engines/gob/inter_v4.cpp | 19 ++- engines/gob/map_v2.cpp | 13 +- engines/gob/map_v4.cpp | 13 +- engines/gob/module.mk | 1 + engines/gob/mult.cpp | 1 + engines/gob/parse.cpp | 4 +- engines/gob/parse_v1.cpp | 6 +- engines/gob/parse_v2.cpp | 6 +- engines/gob/saveload.cpp | 112 ++++++++++++++++ engines/gob/saveload.h | 11 ++ engines/gob/saveload_v2.cpp | 18 +-- engines/gob/saveload_v3.cpp | 33 ++--- engines/gob/saveload_v4.cpp | 33 ++--- engines/gob/sound/sound.cpp | 3 +- engines/gob/variables.cpp | 309 ++++++++++++++++++++++++++++++++++++++++++++ engines/gob/variables.h | 147 +++++++++++++++++++++ engines/gob/videoplayer.cpp | 12 +- 34 files changed, 756 insertions(+), 260 deletions(-) create mode 100644 engines/gob/variables.cpp create mode 100644 engines/gob/variables.h diff --git a/engines/gob/draw_v1.cpp b/engines/gob/draw_v1.cpp index 9a78769d41..b5bc56b6f5 100644 --- a/engines/gob/draw_v1.cpp +++ b/engines/gob/draw_v1.cpp @@ -32,6 +32,7 @@ #include "gob/util.h" #include "gob/game.h" #include "gob/scenery.h" +#include "gob/inter.h" #include "gob/sound/sound.h" namespace Gob { diff --git a/engines/gob/draw_v2.cpp b/engines/gob/draw_v2.cpp index 8c12079b83..378ff0dcdf 100644 --- a/engines/gob/draw_v2.cpp +++ b/engines/gob/draw_v2.cpp @@ -32,6 +32,7 @@ #include "gob/util.h" #include "gob/game.h" #include "gob/scenery.h" +#include "gob/inter.h" #include "gob/video.h" namespace Gob { diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp index 9bdcae567d..73fa820fa0 100644 --- a/engines/gob/game.cpp +++ b/engines/gob/game.cpp @@ -350,7 +350,7 @@ int16 Game::checkKeys(int16 *pMouseX, int16 *pMouseY, _vm->_util->processInput(true); - if (_vm->_mult->_multData && _vm->_global->_inter_variables && + if (_vm->_mult->_multData && _vm->_inter->_variables && (VAR(58) != 0)) { if (_vm->_mult->_multData->frameStart != (int) VAR(58) - 1) _vm->_mult->_multData->frameStart++; @@ -480,8 +480,7 @@ void Game::totSub(int8 flags, const char *newTotFile) { _extTableArray[_backupedCount] = _extTable; _extHandleArray[_backupedCount] = _extHandle; _imFileDataArray[_backupedCount] = _imFileData; - _variablesArray[_backupedCount] = _vm->_global->_inter_variables; - _variablesSizesArray[_backupedCount] = _vm->_global->_inter_variablesSizes; + _variablesArray[_backupedCount] = _vm->_inter->_variables; strcpy(_curTotFileArray[_backupedCount], _curTotFile); curBackupPos = _curBackupPos; @@ -491,10 +490,8 @@ void Game::totSub(int8 flags, const char *newTotFile) { _totTextData = 0; _totFileData = 0; _totResourceTable = 0; - if (flags & 1) { - _vm->_global->_inter_variables = 0; - _vm->_global->_inter_variablesSizes = 0; - } + if (flags & 1) + _vm->_inter->_variables = 0; strncpy0(_curTotFile, newTotFile, 9); strcat(_curTotFile, ".TOT"); @@ -514,9 +511,8 @@ void Game::totSub(int8 flags, const char *newTotFile) { popCollisions(); - if ((flags & 1) && _vm->_global->_inter_variables) { - delete[] _vm->_global->_inter_variables; - delete[] _vm->_global->_inter_variablesSizes; + if ((flags & 1) && _vm->_inter->_variables) { + _vm->_inter->delocateVars(); } _backupedCount--; @@ -530,8 +526,7 @@ void Game::totSub(int8 flags, const char *newTotFile) { _extTable = _extTableArray[_backupedCount]; _extHandle = _extHandleArray[_backupedCount]; _imFileData = _imFileDataArray[_backupedCount]; - _vm->_global->_inter_variables = _variablesArray[_backupedCount]; - _vm->_global->_inter_variablesSizes = _variablesSizesArray[_backupedCount]; + _vm->_inter->_variables = _variablesArray[_backupedCount]; strcpy(_curTotFile, _curTotFileArray[_backupedCount]); strcpy(_curExtFile, _curTotFile); _curExtFile[strlen(_curExtFile) - 4] = '\0'; @@ -563,8 +558,7 @@ void Game::switchTotSub(int16 index, int16 skipPlay) { _extTableArray[_backupedCount] = _extTable; _extHandleArray[_backupedCount] = _extHandle; _imFileDataArray[_backupedCount] = _imFileData; - _variablesArray[_backupedCount] = _vm->_global->_inter_variables; - _variablesSizesArray[_backupedCount] = _vm->_global->_inter_variablesSizes; + _variablesArray[_backupedCount] = _vm->_inter->_variables; strcpy(_curTotFileArray[_backupedCount], _curTotFile); _backupedCount++; } @@ -580,8 +574,7 @@ void Game::switchTotSub(int16 index, int16 skipPlay) { _imFileData = _imFileDataArray[_curBackupPos]; _extTable = _extTableArray[_curBackupPos]; _extHandle = _extHandleArray[_curBackupPos]; - _vm->_global->_inter_variables = _variablesArray[_curBackupPos]; - _vm->_global->_inter_variablesSizes = _variablesSizesArray[_curBackupPos]; + _vm->_inter->_variables = _variablesArray[_curBackupPos]; strcpy(_curTotFile, _curTotFileArray[_curBackupPos]); strcpy(_curExtFile, _curTotFile); _curExtFile[strlen(_curExtFile) - 4] = '\0'; @@ -608,8 +601,7 @@ void Game::switchTotSub(int16 index, int16 skipPlay) { _extTable = _extTableArray[_curBackupPos]; _extHandle = _extHandleArray[_curBackupPos]; _imFileData = _imFileDataArray[_curBackupPos]; - _vm->_global->_inter_variables = _variablesArray[_curBackupPos]; - _vm->_global->_inter_variablesSizes = _variablesSizesArray[_curBackupPos]; + _vm->_inter->_variables = _variablesArray[_curBackupPos]; strcpy(_curTotFile, _curTotFileArray[_curBackupPos]); strcpy(_curExtFile, _curTotFile); _curExtFile[strlen(_curExtFile) - 4] = '\0'; diff --git a/engines/gob/game.h b/engines/gob/game.h index bca55cd4dc..15f6ab963a 100644 --- a/engines/gob/game.h +++ b/engines/gob/game.h @@ -26,6 +26,8 @@ #ifndef GOB_GAME_H #define GOB_GAME_H +#include "gob/variables.h" + namespace Gob { class Game { @@ -200,9 +202,8 @@ protected: ExtTable *_extTableArray[5]; int16 _extHandleArray[5]; byte *_imFileDataArray[5]; - byte *_variablesArray[5]; + Variables *_variablesArray[5]; char _curTotFileArray[5][14]; - byte *_variablesSizesArray[5]; GobEngine *_vm; diff --git a/engines/gob/game_v1.cpp b/engines/gob/game_v1.cpp index 435decd9f2..66deea8ec4 100644 --- a/engines/gob/game_v1.cpp +++ b/engines/gob/game_v1.cpp @@ -166,12 +166,8 @@ void Game_v1::playTot(int16 skipPlay) { _vm->_global->_inter_animDataSize = READ_LE_UINT16(_totFileData + 0x38); - if (!_vm->_global->_inter_variables) { - variablesCount = READ_LE_UINT16(_totFileData + 0x2C); - _vm->_global->_inter_variables = new byte[variablesCount * 4]; - _vm->_global->_inter_variablesSizes = new byte[variablesCount * 4]; - _vm->_global->clearVars(variablesCount); - } + if (!_vm->_inter->_variables) + _vm->_inter->allocateVars(READ_LE_UINT16(_totFileData + 0x2C)); _vm->_global->_inter_execPtr = _totFileData; _vm->_global->_inter_execPtr += READ_LE_UINT32(_totFileData + 0x64); diff --git a/engines/gob/game_v2.cpp b/engines/gob/game_v2.cpp index e783f5bfb5..adf75176ab 100644 --- a/engines/gob/game_v2.cpp +++ b/engines/gob/game_v2.cpp @@ -54,7 +54,6 @@ void Game_v2::playTot(int16 skipPlay) { int16 _captureCounter; int16 breakFrom; int16 nestLevel; - int32 variablesCount; int32 totSize; byte *filePtr; byte *savedIP; @@ -72,7 +71,7 @@ void Game_v2::playTot(int16 skipPlay) { if (skipPlay <= 0) { while (!_vm->_quitRequested) { - if (_vm->_global->_inter_variables) + if (_vm->_inter->_variables) _vm->_draw->animateCursor(4); if (skipPlay != -1) { @@ -204,12 +203,8 @@ void Game_v2::playTot(int16 skipPlay) { _vm->_global->_inter_animDataSize = READ_LE_UINT16(_totFileData + 0x38); - if (!_vm->_global->_inter_variables) { - variablesCount = READ_LE_UINT16(_totFileData + 0x2C); - _vm->_global->_inter_variables = new byte[variablesCount * 4]; - _vm->_global->_inter_variablesSizes = new byte[variablesCount * 4]; - _vm->_global->clearVars(variablesCount); - } + if (!_vm->_inter->_variables) + _vm->_inter->allocateVars(READ_LE_UINT16(_totFileData + 0x2C)); _vm->_global->_inter_execPtr = _totFileData; _vm->_global->_inter_execPtr += @@ -1408,7 +1403,7 @@ int16 Game_v2::inputArea(int16 xPos, int16 yPos, int16 width, int16 height, flag = 1; - if (_vm->_global->_inter_variables) + if (_vm->_inter->_variables) WRITE_VAR(56, pos); while (1) { diff --git a/engines/gob/global.cpp b/engines/gob/global.cpp index 1445601017..acca5564dd 100644 --- a/engines/gob/global.cpp +++ b/engines/gob/global.cpp @@ -123,8 +123,6 @@ Global::Global(GobEngine *vm) : _vm(vm) { _inter_resStr[0] = 0; _inter_resVal = 0; - _inter_variablesSizes = 0; - _inter_variables = 0; _inter_execPtr = 0; _inter_animDataSize = 10; diff --git a/engines/gob/global.h b/engines/gob/global.h index 45c179d277..32651cf15d 100644 --- a/engines/gob/global.h +++ b/engines/gob/global.h @@ -123,8 +123,6 @@ public: char _inter_resStr[200]; int32 _inter_resVal; - byte *_inter_variablesSizes; // 0: single byte, 1: two bytes, 3: four bytes - byte *_inter_variables; byte *_inter_execPtr; int16 _inter_animDataSize; @@ -134,73 +132,11 @@ public: // Can be 1, 2 or 3 for normal, double and triple speed, respectively uint8 _speedFactor; - void clearVars(uint32 count) { - uint32 size = count * 4; - - memset(_inter_variables, 0, size); - memset(_inter_variablesSizes, 0, size); - for (uint32 i = 0; i < size; i += 4) - _inter_variablesSizes[i] = 3; - } - - void writeVarSizeStr(uint32 offset, uint32 len) { - uint32 i; - uint32 inVar; - uint32 varOff; - - inVar = offset % 4; - varOff = (offset >> 2) << 2; - for (i = 0; i < 4; i++) { - if (_inter_variablesSizes[varOff + i] == 3) - _inter_variablesSizes[varOff + i] = 0; - else if ((inVar == (i+1)) && (_inter_variablesSizes[varOff + i] == 1)) - _inter_variablesSizes[varOff + i] = 0; - } - memset(_inter_variablesSizes + offset, 0, len); - } - - void writeVar(uint32 offset, uint32 val) { - WRITE_UINT32(_inter_variables + offset, val); - writeVarSize(offset, 3); - } - void writeVar(uint32 offset, uint16 val) { - WRITE_UINT16(_inter_variables + offset, val); - writeVarSize(offset, 1); - } - void writeVar(uint32 offset, uint8 val) { - (*(uint8 *)(_inter_variables + offset)) = val; - writeVarSize(offset, 0); - } - void writeVar(uint32 offset, const char *str) { - writeVarSizeStr(offset, strlen(str)); - strcpy((char *) (_inter_variables + offset), str); - } - Global(GobEngine *vm); ~Global(); protected: GobEngine *_vm; - - void writeVarSize(uint32 offset, byte n) { - uint32 i; - uint32 inVar; - uint32 varOff; - - inVar = offset % 4; - varOff = (offset >> 2) << 2; - for (i = 0; i < 4; i++) { - if (_inter_variablesSizes[varOff + i] == 3) - _inter_variablesSizes[varOff + i] = 0; - else if ((inVar == (i+1)) && (_inter_variablesSizes[varOff + i] == 1)) - _inter_variablesSizes[varOff + i] = 0; - } - - _inter_variablesSizes[offset] = n; - for (; n > 0; n--) - _inter_variablesSizes[offset + n] = 0; - } - }; } // End of namespace Gob diff --git a/engines/gob/gob.h b/engines/gob/gob.h index efc9718098..ae2b53bc31 100644 --- a/engines/gob/gob.h +++ b/engines/gob/gob.h @@ -52,29 +52,32 @@ class Scenery; class Util; class SaveLoad; -#define VARP(offs) (_vm->_global->_inter_variables + (offs)) -#define WRITE_VARO_UINT32(offs, val) _vm->_global->writeVar(offs, (uint32) (val)) -#define WRITE_VARO_UINT16(offs, val) _vm->_global->writeVar(offs, (uint16) (val)) -#define WRITE_VARO_UINT8(offs, val) _vm->_global->writeVar(offs, (uint8) (val)) -#define WRITE_VARO_STR(offs, str) _vm->_global->writeVar(offs, (const char *) (str)) -#define WRITE_VAR_UINT32(var, val) WRITE_VARO_UINT32((var) << 2, (val)) -#define WRITE_VAR_UINT16(var, val) WRITE_VARO_UINT16((var) << 2, (val)) -#define WRITE_VAR_UINT8(var, val) WRITE_VARO_UINT8((var) << 2, (val)) -#define WRITE_VAR_STR(var, str) WRITE_VARO_STR((var) << 2, (str)) -#define READ_VARO_UINT32(offs) READ_UINT32(VARP(offs)) -#define READ_VARO_UINT16(offs) READ_UINT16(VARP(offs)) -#define READ_VARO_UINT8(offs) (*((uint8 *) VARP(offs))) -#define READ_VAR_UINT32(var) READ_VARO_UINT32((var) << 2) -#define READ_VAR_UINT16(var) READ_VARO_UINT16((var) << 2) -#define READ_VAR_UINT8(var) READ_VARO_UINT8((var) << 2) -#define GET_VARO_STR(offs) ((char *) VARP(offs)) -#define GET_VAR_STR(var) GET_VARO_STR((var) << 2) - -#define WRITE_VAR_OFFSET(offs, val) WRITE_VARO_UINT32((offs), (val)) -#define WRITE_VAR(var, val) WRITE_VAR_UINT32((var), (val)) -#define VAR_OFFSET(offs) READ_VARO_UINT32(offs) -#define VAR(var) READ_VAR_UINT32(var) -#define VAR_ADDRESS(var) ((uint32 *) VARP((var) << 2)) +#define WRITE_VAR_UINT32(var, val) _vm->_inter->_variables->writeVar32(var, val) +#define WRITE_VAR_UINT16(var, val) _vm->_inter->_variables->writeVar16(var, val) +#define WRITE_VAR_UINT8(var, val) _vm->_inter->_variables->writeVar8(var, val) +#define WRITE_VAR_STR(var, str) _vm->_inter->_variables->writeVarString(var, str) +#define WRITE_VARO_UINT32(off, val) _vm->_inter->_variables->writeOff32(off, val) +#define WRITE_VARO_UINT16(off, val) _vm->_inter->_variables->writeOff16(off, val) +#define WRITE_VARO_UINT8(off, val) _vm->_inter->_variables->writeOff8(off, val) +#define WRITE_VARO_STR(off, str) _vm->_inter->_variables->writeOffString(off, str) +#define READ_VAR_UINT32(var) _vm->_inter->_variables->readVar32(var) +#define READ_VAR_UINT16(var) _vm->_inter->_variables->readVar16(var) +#define READ_VAR_UINT8(var) _vm->_inter->_variables->readVar8(var) +#define READ_VARO_UINT32(off) _vm->_inter->_variables->readOff32(off) +#define READ_VARO_UINT16(off) _vm->_inter->_variables->readOff16(off) +#define READ_VARO_UINT8(off) _vm->_inter->_variables->readOff8(off) +#define GET_VAR_STR(var) _vm->_inter->_variables->getAddressVarString(var, 0) +#define GET_VARO_STR(off) _vm->_inter->_variables->getAddressOffString(off, 0) +#define GET_VAR_FSTR(var) _vm->_inter->_variables->getAddressVarString(var) +#define GET_VARO_FSTR(off) _vm->_inter->_variables->getAddressOffString(off) + +#define VAR_ADDRESS(var) _vm->_inter->_variables->getAddressVar32(var) + +#define WRITE_VAR_OFFSET(off, val) WRITE_VARO_UINT32((off), (val)) +#define WRITE_VAR(var, val) WRITE_VAR_UINT32((var), (val)) +#define VAR_OFFSET(off) READ_VARO_UINT32(off) +#define VAR(var) READ_VAR_UINT32(var) + enum GameType { kGameTypeNone = 0, diff --git a/engines/gob/goblin.cpp b/engines/gob/goblin.cpp index d3857e2066..e7aed0790e 100644 --- a/engines/gob/goblin.cpp +++ b/engines/gob/goblin.cpp @@ -32,6 +32,7 @@ #include "gob/map.h" #include "gob/mult.h" #include "gob/scenery.h" +#include "gob/inter.h" #include "gob/sound/sound.h" namespace Gob { diff --git a/engines/gob/goblin_v2.cpp b/engines/gob/goblin_v2.cpp index 93c4c74ecc..9144e35070 100644 --- a/engines/gob/goblin_v2.cpp +++ b/engines/gob/goblin_v2.cpp @@ -33,6 +33,7 @@ #include "gob/map.h" #include "gob/mult.h" #include "gob/scenery.h" +#include "gob/inter.h" namespace Gob { diff --git a/engines/gob/goblin_v4.cpp b/engines/gob/goblin_v4.cpp index 167946e30d..1df5aab606 100644 --- a/engines/gob/goblin_v4.cpp +++ b/engines/gob/goblin_v4.cpp @@ -29,6 +29,7 @@ #include "gob/mult.h" #include "gob/map.h" #include "gob/scenery.h" +#include "gob/inter.h" namespace Gob { diff --git a/engines/gob/init.cpp b/engines/gob/init.cpp index b1e31b34c2..c2f8b48626 100644 --- a/engines/gob/init.cpp +++ b/engines/gob/init.cpp @@ -33,6 +33,7 @@ #include "gob/draw.h" #include "gob/game.h" #include "gob/palanim.h" +#include "gob/inter.h" #include "gob/video.h" #include "gob/videoplayer.h" #include "gob/sound/sound.h" @@ -62,7 +63,6 @@ void Init::initGame(const char *totName) { char *infPtr; char *infEnd; char buffer[128]; - int32 varsCount; initVideo(); @@ -90,8 +90,6 @@ void Init::initGame(const char *totName) { _vm->_game->_totTextData = 0; _vm->_game->_totFileData = 0; _vm->_game->_totResourceTable = 0; - _vm->_global->_inter_variables = 0; - _vm->_global->_inter_variablesSizes = 0; _palDesc = new Video::PalDesc; _vm->validateVideoMode(_vm->_global->_videoMode); @@ -157,14 +155,10 @@ void Init::initGame(const char *totName) { DataStream *stream = _vm->_dataIO->openAsStream(handle, true); stream->seek(0x2C); - varsCount = stream->readUint16LE(); + _vm->_inter->allocateVars(stream->readUint16LE()); delete stream; - _vm->_global->_inter_variables = new byte[varsCount * 4]; - _vm->_global->_inter_variablesSizes = new byte[varsCount * 4]; - _vm->_global->clearVars(varsCount); - strcpy(_vm->_game->_curTotFile, buffer); _vm->_sound->cdTest(1, "GOB"); @@ -214,8 +208,6 @@ void Init::initGame(const char *totName) { _vm->_sound->cdStop(); _vm->_sound->cdUnloadLIC(); - delete[] _vm->_global->_inter_variables; - delete[] _vm->_global->_inter_variablesSizes; delete[] _vm->_game->_totFileData; if (_vm->_game->_totTextData) { if (_vm->_game->_totTextData->items) diff --git a/engines/gob/inter.cpp b/engines/gob/inter.cpp index 9e5005f443..9c39653a1d 100644 --- a/engines/gob/inter.cpp +++ b/engines/gob/inter.cpp @@ -60,6 +60,12 @@ Inter::Inter(GobEngine *vm) : _vm(vm) { _pastePos = 0; _noBusyWait = false; + + _variables = 0; +} + +Inter::~Inter() { + delocateVars(); } void Inter::initControlVars(char full) { @@ -279,4 +285,18 @@ void Inter::callSub(int16 retFlag) { _terminate = 1; } +void Inter::allocateVars(uint32 count) { + if ((_vm->getPlatform() == Common::kPlatformAmiga) || + (_vm->getPlatform() == Common::kPlatformMacintosh) || + (_vm->getPlatform() == Common::kPlatformAtariST)) + _variables = new VariablesBE(count * 4); + else + _variables = new VariablesLE(count * 4); +} + +void Inter::delocateVars() { + delete _variables; + _variables = 0; +} + } // End of namespace Gob diff --git a/engines/gob/inter.h b/engines/gob/inter.h index e43cb4e891..60b3974d6d 100644 --- a/engines/gob/inter.h +++ b/engines/gob/inter.h @@ -27,6 +27,7 @@ #define GOB_INTER_H #include "gob/goblin.h" +#include "gob/variables.h" namespace Gob { @@ -48,6 +49,8 @@ public: uint32 _soundEndTimeKey; int16 _soundStopVal; + Variables *_variables; + void initControlVars(char full); int16 load16(); char evalExpr(int16 *pRes); @@ -59,11 +62,14 @@ public: void funcBlock(int16 retFlag); void callSub(int16 retFlag); + void allocateVars(uint32 count); + void delocateVars(); + virtual int16 loadSound(int16 slot) = 0; virtual void animPalette() = 0; Inter(GobEngine *vm); - virtual ~Inter() {} + virtual ~Inter(); protected: struct OpFuncParams { @@ -83,7 +89,7 @@ protected: int16 _animPalHighIndex[8]; int16 _animPalDir[8]; - char _pasteBuf[300]; + byte _pasteBuf[300]; byte _pasteSizeBuf[300]; int16 _pastePos; diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp index a809a44b40..e2b8d65112 100644 --- a/engines/gob/inter_v1.cpp +++ b/engines/gob/inter_v1.cpp @@ -929,16 +929,16 @@ void Inter_v1::o1_initMult() { _vm->_mult->_objCount * sizeof(Mult::Mult_Object)); for (int i = 0; i < _vm->_mult->_objCount; i++) { - _vm->_mult->_objects[i].pPosX = - (int32 *)(_vm->_global->_inter_variables + - i * 4 + (posXVar / 4) * 4); - _vm->_mult->_objects[i].pPosY = - (int32 *)(_vm->_global->_inter_variables + - i * 4 + (posYVar / 4) * 4); + uint32 offPosX = i * 4 + (posXVar / 4) * 4; + uint32 offPosY = i * 4 + (posYVar / 4) * 4; + uint32 offAnim = animDataVar + i * 4 * _vm->_global->_inter_animDataSize; + + _vm->_mult->_objects[i].pPosX = (int32 *) _variables->getAddressOff32(offPosX); + _vm->_mult->_objects[i].pPosY = (int32 *) _variables->getAddressOff32(offPosY); _vm->_mult->_objects[i].pAnimData = - (Mult::Mult_AnimData *) (_vm->_global->_inter_variables + - animDataVar + i * 4 * _vm->_global->_inter_animDataSize); + (Mult::Mult_AnimData *) _variables->getAddressOff8(offAnim, + _vm->_global->_inter_animDataSize); _vm->_mult->_objects[i].pAnimData->isStatic = 1; _vm->_mult->_objects[i].tick = 0; @@ -2069,8 +2069,7 @@ bool Inter_v1::o1_prepareStr(OpFuncParams ¶ms) { int16 strVar; strVar = _vm->_parse->parseVarIndex(); - _vm->_util->prepareStr(GET_VARO_STR(strVar)); - _vm->_global->writeVarSizeStr(strVar, strlen(GET_VARO_STR(strVar))); + _vm->_util->prepareStr(GET_VARO_FSTR(strVar)); return false; } @@ -2081,8 +2080,9 @@ bool Inter_v1::o1_insertStr(OpFuncParams ¶ms) { strVar = _vm->_parse->parseVarIndex(); evalExpr(0); pos = _vm->_parse->parseValExpr(); - _vm->_util->insertStr(_vm->_global->_inter_resStr, GET_VARO_STR(strVar), pos); - _vm->_global->writeVarSizeStr(strVar, strlen(GET_VARO_STR(strVar))); + + char *str = GET_VARO_FSTR(strVar); + _vm->_util->insertStr(_vm->_global->_inter_resStr, str, pos); return false; } @@ -2222,7 +2222,7 @@ bool Inter_v1::o1_readData(OpFuncParams ¶ms) { if (((dataVar >> 2) == 59) && (size == 4)) WRITE_VAR(59, stream->readUint32LE()); else - retSize = stream->read(_vm->_global->_inter_variables + dataVar, size); + retSize = stream->read((byte *) _variables->getAddressOff8(dataVar, size), size); if (retSize == size) WRITE_VAR(1, 0); diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp index e442ec4eca..d8c33fcce6 100644 --- a/engines/gob/inter_v2.cpp +++ b/engines/gob/inter_v2.cpp @@ -903,19 +903,16 @@ void Inter_v2::o2_initMult() { _vm->_mult->_objCount * sizeof(Mult::Mult_Object)); for (int i = 0; i < _vm->_mult->_objCount; i++) { - _vm->_mult->_objects[i].pPosX = - (int32 *)(_vm->_global->_inter_variables + - i * 4 + (posXVar / 4) * 4); - _vm->_mult->_objects[i].pPosY = - (int32 *)(_vm->_global->_inter_variables + - i * 4 + (posYVar / 4) * 4); + uint32 offPosX = i * 4 + (posXVar / 4) * 4; + uint32 offPosY = i * 4 + (posYVar / 4) * 4; + uint32 offAnim = animDataVar + i * 4 * _vm->_global->_inter_animDataSize; + + _vm->_mult->_objects[i].pPosX = (int32 *) _variables->getAddressOff32(offPosX); + _vm->_mult->_objects[i].pPosY = (int32 *) _variables->getAddressOff32(offPosY); _vm->_mult->_objects[i].pAnimData = - (Mult::Mult_AnimData *) (_vm->_global->_inter_variables + - animDataVar + i * 4 * _vm->_global->_inter_animDataSize); - memset(_vm->_global->_inter_variablesSizes + - i * 4 * _vm->_global->_inter_animDataSize, 0, - _vm->_global->_inter_animDataSize); + (Mult::Mult_AnimData *) _variables->getAddressOff8(offAnim, + _vm->_global->_inter_animDataSize); _vm->_mult->_objects[i].pAnimData->isStatic = 1; _vm->_mult->_objects[i].tick = 0; @@ -1186,10 +1183,7 @@ void Inter_v2::o2_copyVars() { varOff = _vm->_parse->parseVarIndex(); _vm->_global->_inter_execPtr++; - memcpy(_pasteBuf + _pastePos, _vm->_global->_inter_variables + varOff, - _vm->_global->_inter_animDataSize * 4); - memcpy(_pasteSizeBuf + _pastePos, - _vm->_global->_inter_variablesSizes + varOff, + _variables->copyTo(varOff, _pasteBuf + _pastePos, _pasteSizeBuf + _pastePos, _vm->_global->_inter_animDataSize * 4); _pastePos += _vm->_global->_inter_animDataSize * 4; @@ -1199,6 +1193,7 @@ void Inter_v2::o2_copyVars() { } else { if (evalExpr(&varOff) == 20) _vm->_global->_inter_resVal = 0; + memcpy(_pasteBuf + _pastePos, &_vm->_global->_inter_resVal, 4); memcpy(_pasteSizeBuf + _pastePos, &_vm->_global->_inter_resVal, 4); _pastePos += 4; @@ -1222,8 +1217,7 @@ void Inter_v2::o2_pasteVars() { assert(sizeV == sizeS); _pastePos -= sizeV; - memcpy(_vm->_global->_inter_variables + varOff, _pasteBuf + _pastePos, sizeV); - memcpy(_vm->_global->_inter_variablesSizes + varOff, _pasteSizeBuf + _pastePos, sizeS); + _variables->copyFrom(varOff, _pasteBuf + _pastePos, _pasteSizeBuf + _pastePos, sizeV); } } @@ -1558,7 +1552,7 @@ void Inter_v2::o2_playImd() { startFrame, lastFrame, palCmd, palStart, palEnd, flags); if ((imd[0] != 0) && !_vm->_vidPlayer->primaryOpen(imd, x, y, flags)) { - WRITE_VAR(11, -1); + WRITE_VAR(11, (uint32) -1); return; } @@ -1972,8 +1966,7 @@ bool Inter_v2::o2_readData(OpFuncParams ¶ms) { size = READ_LE_UINT32(_vm->_game->_totFileData + 0x2C) * 4; } - buf = _vm->_global->_inter_variables + dataVar; - memset(_vm->_global->_inter_variablesSizes + dataVar, 0, size); + buf = _variables->getAddressOff8(dataVar, size); if (_vm->_global->_inter_resStr[0] == 0) { WRITE_VAR(1, size); diff --git a/engines/gob/inter_v4.cpp b/engines/gob/inter_v4.cpp index fd90b731a2..fb895dd5b2 100644 --- a/engines/gob/inter_v4.cpp +++ b/engines/gob/inter_v4.cpp @@ -642,9 +642,8 @@ void Inter_v4::setupOpcodes() { } void Inter_v4::executeDrawOpcode(byte i) { - debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%X] (%s) - %s, %d", - i, i, getOpcodeDrawDesc(i), - _vm->_game->_curTotFile, uint(_vm->_global->_inter_execPtr - _vm->_game->_totFileData)); + debugC(1, kDebugDrawOp, "opcodeDraw %d [0x%X] (%s)", + i, i, getOpcodeDrawDesc(i)); OpcodeDrawProcV4 op = _opcodesDrawV4[i].proc; @@ -655,9 +654,10 @@ void Inter_v4::executeDrawOpcode(byte i) { } bool Inter_v4::executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms) { - debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%X.0x%X] (%s) - %s, %d", - i, j, i, j, getOpcodeFuncDesc(i, j), - _vm->_game->_curTotFile, uint(_vm->_global->_inter_execPtr - _vm->_game->_totFileData)); + debugC(1, kDebugFuncOp, "opcodeFunc %d.%d [0x%X.0x%X] (%s) - %s, %d, %d", + i, j, i, j, getOpcodeFuncDesc(i, j), _vm->_game->_curTotFile, + (uint) (_vm->_global->_inter_execPtr - _vm->_game->_totFileData), + (uint) (_vm->_global->_inter_execPtr - _vm->_game->_totFileData - params.counter - 4)); if ((i > 4) || (j > 15)) { warning("unimplemented opcodeFunc: %d.%d", i, j); @@ -675,9 +675,8 @@ bool Inter_v4::executeFuncOpcode(byte i, byte j, OpFuncParams ¶ms) { } void Inter_v4::executeGoblinOpcode(int i, OpGobParams ¶ms) { - debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%X] (%s) - %s, %d", - i, i, getOpcodeGoblinDesc(i), - _vm->_game->_curTotFile, uint(_vm->_global->_inter_execPtr - _vm->_game->_totFileData)); + debugC(1, kDebugGobOp, "opcodeGoblin %d [0x%X] (%s)", + i, i, getOpcodeGoblinDesc(i)); OpcodeGoblinProcV4 op = NULL; @@ -884,7 +883,7 @@ void Inter_v4::o4_playVmdOrMusic() { } if ((fileName[0] != 0) && !_vm->_vidPlayer->primaryOpen(fileName, x, y, flags)) { - WRITE_VAR(11, -1); + WRITE_VAR(11, (uint32) -1); return; } diff --git a/engines/gob/map_v2.cpp b/engines/gob/map_v2.cpp index 668b4d2e97..bd9f5b3efc 100644 --- a/engines/gob/map_v2.cpp +++ b/engines/gob/map_v2.cpp @@ -56,12 +56,12 @@ void Map_v2::loadMapObjects(const char *avjFile) { uint32 passPos; var = _vm->_parse->parseVarIndex(); - variables = _vm->_global->_inter_variables + var; + variables = _vm->_inter->_variables->getAddressOff8(var, 0); id = _vm->_inter->load16(); if (id == -1) { - _passMap = (int8 *)(_vm->_global->_inter_variables + var); + _passMap = (int8 *) _vm->_inter->_variables->getAddressOff8(var, 0); return; } @@ -104,18 +104,17 @@ void Map_v2::loadMapObjects(const char *avjFile) { // In the original asm, this writes byte-wise into the variables-array tmpPos = mapData.pos(); mapData.seek(passPos); - if (variables != _vm->_global->_inter_variables) { - byte *sizes; + if ((variables != 0) && + (variables != _vm->_inter->_variables->getAddressOff8(0, 0))) { _passMap = (int8 *) variables; mapHeight = _screenHeight / _tilesHeight; mapWidth = _screenWidth / _tilesWidth; - sizes = _vm->_global->_inter_variablesSizes + - (((byte *) _passMap) - _vm->_global->_inter_variables); + for (int i = 0; i < mapHeight; i++) { for (int j = 0; j < mapWidth; j++) setPass(j, i, mapData.readSByte()); - memset(sizes + i * _passWidth, 0, mapWidth); + _vm->_inter->_variables->getAddressOff8(var + i * _passWidth, mapWidth); } } mapData.seek(tmpPos); diff --git a/engines/gob/map_v4.cpp b/engines/gob/map_v4.cpp index a3c3222213..3a74c4b6aa 100644 --- a/engines/gob/map_v4.cpp +++ b/engines/gob/map_v4.cpp @@ -54,7 +54,7 @@ void Map_v4::loadMapObjects(const char *avjFile) { uint32 passPos; var = _vm->_parse->parseVarIndex(); - variables = _vm->_global->_inter_variables + var; + variables = _vm->_inter->_variables->getAddressOff8(var, 0); id = _vm->_inter->load16(); @@ -62,7 +62,7 @@ void Map_v4::loadMapObjects(const char *avjFile) { warning("Woodruff Stub: loadMapObjects ID >= 65520"); return; } else if (id == -1) { - _passMap = (int8 *)(_vm->_global->_inter_variables + var); + _passMap = (int8 *) _vm->_inter->_variables->getAddressOff8(var, 0); return; } @@ -120,18 +120,17 @@ void Map_v4::loadMapObjects(const char *avjFile) { // In the original asm, this writes byte-wise into the variables-array tmpPos = mapData.pos(); mapData.seek(passPos); - if (variables != _vm->_global->_inter_variables) { - byte *sizes; + if ((variables != 0) && + (variables != _vm->_inter->_variables->getAddressOff8(0, 0))) { _passMap = (int8 *) variables; mapHeight = _screenHeight / _tilesHeight; mapWidth = _screenWidth / _tilesWidth; - sizes = _vm->_global->_inter_variablesSizes + - (((byte *) _passMap) - _vm->_global->_inter_variables); + for (int i = 0; i < mapHeight; i++) { for (int j = 0; j < mapWidth; j++) setPass(j, i, mapData.readSByte()); - memset(sizes + i * _passWidth, 0, mapWidth); + _vm->_inter->_variables->getAddressOff8(var + i * _passWidth, mapWidth); } } mapData.seek(tmpPos); diff --git a/engines/gob/module.mk b/engines/gob/module.mk index c95391cedc..45048a0899 100644 --- a/engines/gob/module.mk +++ b/engines/gob/module.mk @@ -49,6 +49,7 @@ MODULE_OBJS := \ scenery_v1.o \ scenery_v2.o \ util.o \ + variables.o \ video.o \ video_v1.o \ video_v2.o \ diff --git a/engines/gob/mult.cpp b/engines/gob/mult.cpp index bc9fe4dc11..3d6a7942f9 100644 --- a/engines/gob/mult.cpp +++ b/engines/gob/mult.cpp @@ -35,6 +35,7 @@ #include "gob/scenery.h" #include "gob/video.h" #include "gob/videoplayer.h" +#include "gob/inter.h" #include "gob/sound/sound.h" namespace Gob { diff --git a/engines/gob/parse.cpp b/engines/gob/parse.cpp index 5d7cef0341..ad1f53bb6f 100644 --- a/engines/gob/parse.cpp +++ b/engines/gob/parse.cpp @@ -44,7 +44,7 @@ int32 Parse::encodePtr(byte *ptr, int type) { offset = ptr - _vm->_game->_totFileData; break; case kInterVar: - offset = ptr - _vm->_global->_inter_variables; + offset = ptr - ((byte *) _vm->_inter->_variables->getAddressOff8(0, 0)); break; case kResStr: offset = ptr - ((byte *) _vm->_global->_inter_resStr); @@ -64,7 +64,7 @@ byte *Parse::decodePtr(int32 n) { ptr = _vm->_game->_totFileData; break; case kInterVar: - ptr = _vm->_global->_inter_variables; + ptr = (byte *) _vm->_inter->_variables->getAddressOff8(0, 0); break; case kResStr: ptr = (byte *) _vm->_global->_inter_resStr; diff --git a/engines/gob/parse_v1.cpp b/engines/gob/parse_v1.cpp index f18f63de4f..3c5f90c068 100644 --- a/engines/gob/parse_v1.cpp +++ b/engines/gob/parse_v1.cpp @@ -375,7 +375,7 @@ int16 Parse_v1::parseExpr(byte stopToken, byte *arg_2) { case 25: *operPtr = 22; temp = _vm->_inter->load16() * 4; - *valPtr = encodePtr(_vm->_global->_inter_variables + temp, + *valPtr = encodePtr(_vm->_inter->_variables->getAddressOff8(temp, 0), kInterVar); if (*_vm->_global->_inter_execPtr == 13) { _vm->_global->_inter_execPtr++; @@ -403,8 +403,8 @@ int16 Parse_v1::parseExpr(byte stopToken, byte *arg_2) { *valPtr = VAR(temp + offset); break; } - *valPtr = encodePtr(_vm->_global->_inter_variables + - temp * 4 + offset * _vm->_global->_inter_animDataSize * 4, + *valPtr = encodePtr(_vm->_inter->_variables->getAddressOff8( + temp * 4 + offset * _vm->_global->_inter_animDataSize * 4, 0), kInterVar); if (*_vm->_global->_inter_execPtr == 13) { _vm->_global->_inter_execPtr++; diff --git a/engines/gob/parse_v2.cpp b/engines/gob/parse_v2.cpp index 463a3870ee..a2e6b8fb37 100644 --- a/engines/gob/parse_v2.cpp +++ b/engines/gob/parse_v2.cpp @@ -408,8 +408,8 @@ int16 Parse_v2::parseExpr(byte stopToken, byte *arg_2) { else if (operation == 27) *valPtr = (int16) READ_VARO_UINT16(temp * 2 + offset * 2); else if (operation == 28) { - *valPtr = encodePtr(_vm->_global->_inter_variables + - temp * 4 + offset * _vm->_global->_inter_animDataSize * 4, + *valPtr = encodePtr(_vm->_inter->_variables->getAddressOff8( + temp * 4 + offset * _vm->_global->_inter_animDataSize * 4, 0), kInterVar); if (*_vm->_global->_inter_execPtr == 13) { _vm->_global->_inter_execPtr++; @@ -467,7 +467,7 @@ int16 Parse_v2::parseExpr(byte stopToken, byte *arg_2) { case 25: *operPtr = 22; temp = _vm->_inter->load16() * 4; - *valPtr = encodePtr(_vm->_global->_inter_variables + temp, kInterVar); + *valPtr = encodePtr(_vm->_inter->_variables->getAddressOff8(temp, 0), kInterVar); if (*_vm->_global->_inter_execPtr == 13) { _vm->_global->_inter_execPtr++; temp += parseValExpr(12); diff --git a/engines/gob/saveload.cpp b/engines/gob/saveload.cpp index 50f41db47e..2788716858 100644 --- a/engines/gob/saveload.cpp +++ b/engines/gob/saveload.cpp @@ -159,6 +159,60 @@ PlainSave::PlainSave() { PlainSave::~PlainSave() { } +bool PlainSave::save(int16 dataVar, int32 size, int32 offset, const char *name, + const Variables *variables) { + + if ((size <= 0) || (offset != 0)) { + warning("Invalid size (%d) or offset (%d)", size, offset); + return false; + } + + byte *vars = new byte[size]; + byte *varSizes = new byte[size]; + + if (!variables->copyTo(dataVar, vars, varSizes, size)) { + delete[] vars; + delete[] varSizes; + warning("dataVar (%d) or size (%d) out of range", dataVar, size); + return false; + } + + bool result = save(0, size, offset, name, vars, varSizes); + + delete[] vars; + delete[] varSizes; + + return result; +} + +bool PlainSave::load(int16 dataVar, int32 size, int32 offset, const char *name, + Variables *variables) { + + if ((size <= 0) || (offset != 0)) { + warning("Invalid size (%d) or offset (%d)", size, offset); + return false; + } + + byte *vars = new byte[size]; + byte *varSizes = new byte[size]; + + bool result = load(0, size, offset, name, vars, varSizes); + + if (result && variables) { + if (!variables->copyFrom(dataVar, vars, varSizes, size)) { + delete[] vars; + delete[] varSizes; + warning("dataVar (%d) or size (%d) out of range", dataVar, size); + return false; + } + } + + delete[] vars; + delete[] varSizes; + + return result; +} + bool PlainSave::save(int16 dataVar, int32 size, int32 offset, const char *name, const byte *variables, const byte *variableSizes) const { @@ -285,6 +339,64 @@ void StagedSave::assertMode(Mode mode, const char *name) { } } +bool StagedSave::save(int16 dataVar, int32 size, int32 offset, const char *name, + const Variables *variables) { + + if ((dataVar < 0) || (size <= 0) || (offset < 0)) { + warning("Invalid dataVar (%d), size (%d) or offset (%d)", dataVar, size, offset); + return false; + } + + byte *vars = 0, *varSizes = 0; + + if (variables) { + vars = new byte[size]; + varSizes = new byte[size]; + + if (!variables->copyTo(dataVar, vars, varSizes, size)) { + delete[] vars; + delete[] varSizes; + warning("dataVar (%d) or size (%d) out of range", dataVar, size); + return false; + } + } + + bool result = save(0, size, offset, name, vars, varSizes); + + delete[] vars; + delete[] varSizes; + + return result; +} + +bool StagedSave::load(int16 dataVar, int32 size, int32 offset, const char *name, + Variables *variables) { + + if ((dataVar < 0) || (size <= 0) || (offset < 0)) { + warning("Invalid dataVar (%d), size (%d) or offset (%d)", dataVar, size, offset); + return false; + } + + byte *vars = new byte[size]; + byte *varSizes = new byte[size]; + + bool result = load(0, size, offset, name, vars, varSizes); + + if (result && variables) { + if (!variables->copyFrom(dataVar, vars, varSizes, size)) { + delete[] vars; + delete[] varSizes; + warning("dataVar (%d) or size (%d) out of range", dataVar, size); + return false; + } + } + + delete[] vars; + delete[] varSizes; + + return result; +} + bool StagedSave::save(int16 dataVar, int32 size, int32 offset, const char *name, const byte *variables, const byte *variableSizes) { diff --git a/engines/gob/saveload.h b/engines/gob/saveload.h index 6c5ffe3bbe..29f7ee2594 100644 --- a/engines/gob/saveload.h +++ b/engines/gob/saveload.h @@ -30,6 +30,7 @@ #include "common/stream.h" #include "gob/video.h" +#include "gob/variables.h" namespace Gob { @@ -67,6 +68,11 @@ public: PlainSave(); ~PlainSave(); + bool save(int16 dataVar, int32 size, int32 offset, const char *name, + const Variables *variables); + bool load(int16 dataVar, int32 size, int32 offset, const char *name, + Variables *variables); + bool save(int16 dataVar, int32 size, int32 offset, const char *name, const byte *variables, const byte *variableSizes) const; bool load(int16 dataVar, int32 size, int32 offset, const char *name, @@ -80,6 +86,11 @@ public: void addStage(int32 size, bool endianed = true); + bool save(int16 dataVar, int32 size, int32 offset, const char *name, + const Variables *variables); + bool load(int16 dataVar, int32 size, int32 offset, const char *name, + Variables *variables); + bool save(int16 dataVar, int32 size, int32 offset, const char *name, const byte *variables, const byte *variableSizes); bool load(int16 dataVar, int32 size, int32 offset, const char *name, diff --git a/engines/gob/saveload_v2.cpp b/engines/gob/saveload_v2.cpp index 153b6dc2cd..a92fe8cf01 100644 --- a/engines/gob/saveload_v2.cpp +++ b/engines/gob/saveload_v2.cpp @@ -31,6 +31,7 @@ #include "gob/global.h" #include "gob/game.h" #include "gob/draw.h" +#include "gob/inter.h" namespace Gob { @@ -209,9 +210,8 @@ bool SaveLoad_v2::loadGame(SaveFile &saveFile, return false; } - SaveLoad::buildIndex(_vm->_global->_inter_variables + dataVar, + SaveLoad::buildIndex(_vm->_inter->_variables->getAddressOff8(dataVar, 600), saveFile.destName, 15, 40); - memset(_vm->_global->_inter_variablesSizes + dataVar, 0, 600); } else { int slot = getSlot(offset); @@ -227,8 +227,7 @@ bool SaveLoad_v2::loadGame(SaveFile &saveFile, return false; } - if (!_save.load(dataVar, size, 40, saveFile.destName, - _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes)) + if (!_save.load(dataVar, size, 40, saveFile.destName, _vm->_inter->_variables)) return false; } @@ -269,8 +268,7 @@ bool SaveLoad_v2::loadNotes(SaveFile &saveFile, debugC(2, kDebugSaveLoad, "Loading the notes"); - return _notes.load(dataVar, size, offset, saveFile.destName, - _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes); + return _notes.load(dataVar, size, offset, saveFile.destName, _vm->_inter->_variables); } bool SaveLoad_v2::saveGame(SaveFile &saveFile, @@ -289,7 +287,7 @@ bool SaveLoad_v2::saveGame(SaveFile &saveFile, return false; } - memcpy(_indexBuffer, _vm->_global->_inter_variables + dataVar, 600); + _vm->_inter->_variables->copyTo(dataVar, _indexBuffer, 0, 600); _hasIndex = true; } else { @@ -318,8 +316,7 @@ bool SaveLoad_v2::saveGame(SaveFile &saveFile, if(!_save.save(0, 40, 0, saveFile.destName, _indexBuffer + (slot * 40), sizes)) return false; - if (!_save.save(dataVar, size, 40, saveFile.destName, - _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes)) + if (!_save.save(dataVar, size, 40, saveFile.destName, _vm->_inter->_variables)) return false; } @@ -353,8 +350,7 @@ bool SaveLoad_v2::saveNotes(SaveFile &saveFile, debugC(2, kDebugSaveLoad, "Saving the notes"); - return _notes.save(dataVar, size, offset, saveFile.destName, - _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes); + return _notes.save(dataVar, size, offset, saveFile.destName, _vm->_inter->_variables); return false; } diff --git a/engines/gob/saveload_v3.cpp b/engines/gob/saveload_v3.cpp index d8eadd5677..67879db3d1 100644 --- a/engines/gob/saveload_v3.cpp +++ b/engines/gob/saveload_v3.cpp @@ -31,6 +31,7 @@ #include "gob/global.h" #include "gob/game.h" #include "gob/draw.h" +#include "gob/inter.h" namespace Gob { @@ -279,10 +280,8 @@ bool SaveLoad_v3::loadGame(SaveFile &saveFile, return false; } - memcpy(_vm->_global->_inter_variables + dataVar, - _propBuffer + offset, size); - memcpy(_vm->_global->_inter_variablesSizes + dataVar, - _propBuffer + offset + 500, size); + _vm->_inter->_variables->copyFrom(dataVar, + _propBuffer + offset, _propBuffer + offset + 500, size); } else if (offset == 500) { debugC(3, kDebugSaveLoad, "Loading save index"); @@ -294,9 +293,8 @@ bool SaveLoad_v3::loadGame(SaveFile &saveFile, int slot = saveFile.slot; - SaveLoad::buildIndex(_vm->_global->_inter_variables + dataVar, + SaveLoad::buildIndex(_vm->_inter->_variables->getAddressOff8(dataVar, 1200), saveFile.destName, 30, 40, 1000); - memset(_vm->_global->_inter_variablesSizes + dataVar, 0, 1200); setCurrentSlot(saveFile.destName, slot); @@ -314,8 +312,7 @@ bool SaveLoad_v3::loadGame(SaveFile &saveFile, return false; } - if (!_save.load(dataVar, size, 540, saveFile.destName, - _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes)) + if (!_save.load(dataVar, size, 540, saveFile.destName, _vm->_inter->_variables)) return false; } @@ -356,8 +353,7 @@ bool SaveLoad_v3::loadNotes(SaveFile &saveFile, debugC(2, kDebugSaveLoad, "Loading the notes"); - return _notes.load(dataVar, size, offset, saveFile.destName, - _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes); + return _notes.load(dataVar, size, offset, saveFile.destName, _vm->_inter->_variables); } bool SaveLoad_v3::loadScreenshot(SaveFile &saveFile, @@ -383,8 +379,7 @@ bool SaveLoad_v3::loadScreenshot(SaveFile &saveFile, buildScreenshotIndex(buffer, saveFile.destName, 30); setCurrentSlot(saveFile.destName, slot); - memcpy(_vm->_global->_inter_variables + dataVar, buffer, 40); - memset(_vm->_global->_inter_variablesSizes + dataVar, 0, 40); + memcpy(_vm->_inter->_variables->getAddressOff8(dataVar, 40), buffer, 40); } else { saveFile.slot = (offset - _screenshotOffset) / _screenshotSize; @@ -453,10 +448,8 @@ bool SaveLoad_v3::saveGame(SaveFile &saveFile, return false; } - memcpy(_propBuffer + offset, - _vm->_global->_inter_variables + dataVar, size); - memcpy(_propBuffer + offset + 500, - _vm->_global->_inter_variablesSizes + dataVar, size); + _vm->_inter->_variables->copyTo(dataVar, + _propBuffer + offset, _propBuffer + offset + 500, size); } else if (offset == 500) { debugC(3, kDebugSaveLoad, "Saving save index"); @@ -466,7 +459,7 @@ bool SaveLoad_v3::saveGame(SaveFile &saveFile, return false; } - memcpy(_indexBuffer, _vm->_global->_inter_variables + dataVar, size); + _vm->_inter->_variables->copyTo(dataVar, _indexBuffer, 0, size); _hasIndex = true; } else { @@ -496,8 +489,7 @@ bool SaveLoad_v3::saveGame(SaveFile &saveFile, if(!_save.save(0, 40, 500, saveFile.destName, _indexBuffer + (saveFile.slot * 40), 0)) return false; - if (!_save.save(dataVar, size, 540, saveFile.destName, - _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes)) + if (!_save.save(dataVar, size, 540, saveFile.destName, _vm->_inter->_variables)) return false; } @@ -531,8 +523,7 @@ bool SaveLoad_v3::saveNotes(SaveFile &saveFile, debugC(2, kDebugSaveLoad, "Saving the notes"); - return _notes.save(dataVar, size - 160, offset, saveFile.destName, - _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes); + return _notes.save(dataVar, size - 160, offset, saveFile.destName, _vm->_inter->_variables); return false; } diff --git a/engines/gob/saveload_v4.cpp b/engines/gob/saveload_v4.cpp index 9b46bb26ac..a6548dd82d 100644 --- a/engines/gob/saveload_v4.cpp +++ b/engines/gob/saveload_v4.cpp @@ -27,8 +27,8 @@ #include "gob/gob.h" #include "gob/saveload.h" -#include "gob/global.h" #include "gob/game.h" +#include "gob/inter.h" namespace Gob { @@ -247,8 +247,8 @@ bool SaveLoad_v4::loadScreenProps(SaveFile &saveFile, debugC(3, kDebugSaveLoad, "Loading screen properties (%d, %d, %d)", dataVar, size, offset); - memcpy(_vm->_global->_inter_variables + dataVar, _screenProps + offset, size); - memcpy(_vm->_global->_inter_variablesSizes + dataVar, _screenProps + 256000 + offset, size); + _vm->_inter->_variables->copyFrom(dataVar, + _screenProps + offset, _screenProps + 256000 + offset, size); return true; } @@ -269,10 +269,8 @@ bool SaveLoad_v4::loadGame(SaveFile &saveFile, return false; } - memcpy(_vm->_global->_inter_variables + dataVar, - _propBuffer + offset, size); - memcpy(_vm->_global->_inter_variablesSizes + dataVar, - _propBuffer + offset + 500, size); + _vm->_inter->_variables->copyFrom(dataVar, + _propBuffer + offset, _propBuffer + offset + 500, size); } else if (offset == 500) { debugC(3, kDebugSaveLoad, "Loading save index"); @@ -282,9 +280,8 @@ bool SaveLoad_v4::loadGame(SaveFile &saveFile, return false; } - SaveLoad::buildIndex(_vm->_global->_inter_variables + dataVar, + SaveLoad::buildIndex(_vm->_inter->_variables->getAddressOff8(dataVar, 1200), saveFile.destName, 30, 40, 1000); - memset(_vm->_global->_inter_variablesSizes + dataVar, 0, 1200); } else { int slot = getSlot(offset); @@ -300,8 +297,7 @@ bool SaveLoad_v4::loadGame(SaveFile &saveFile, return false; } - if (!_save.load(dataVar, size, 540, saveFile.destName, - _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes)) + if (!_save.load(dataVar, size, 540, saveFile.destName, _vm->_inter->_variables)) return false; } @@ -340,8 +336,8 @@ bool SaveLoad_v4::saveScreenProps(SaveFile &saveFile, debugC(3, kDebugSaveLoad, "Saving screen properties (%d, %d, %d)", dataVar, size, offset); - memcpy(_screenProps + offset, _vm->_global->_inter_variables + dataVar, size); - memcpy(_screenProps + 256000 + offset, _vm->_global->_inter_variablesSizes + dataVar, size); + _vm->_inter->_variables->copyTo(dataVar, + _screenProps + offset, _screenProps + 256000 + offset, size); return true; } @@ -362,10 +358,8 @@ bool SaveLoad_v4::saveGame(SaveFile &saveFile, return false; } - memcpy(_propBuffer + offset, - _vm->_global->_inter_variables + dataVar, size); - memcpy(_propBuffer + offset + 500, - _vm->_global->_inter_variablesSizes + dataVar, size); + _vm->_inter->_variables->copyTo(dataVar, + _propBuffer + offset, _propBuffer + offset + 500, size); } else if (offset == 500) { debugC(3, kDebugSaveLoad, "Saving save index"); @@ -375,7 +369,7 @@ bool SaveLoad_v4::saveGame(SaveFile &saveFile, return false; } - memcpy(_indexBuffer, _vm->_global->_inter_variables + dataVar, size); + _vm->_inter->_variables->copyTo(dataVar, _indexBuffer, 0, size); _hasIndex = true; } else { @@ -405,8 +399,7 @@ bool SaveLoad_v4::saveGame(SaveFile &saveFile, if(!_save.save(0, 40, 500, saveFile.destName, _indexBuffer + (slot * 40), 0)) return false; - if (!_save.save(dataVar, size, 540, saveFile.destName, - _vm->_global->_inter_variables, _vm->_global->_inter_variablesSizes)) + if (!_save.save(dataVar, size, 540, saveFile.destName, _vm->_inter->_variables)) return false; } diff --git a/engines/gob/sound/sound.cpp b/engines/gob/sound/sound.cpp index a90afe0e27..2d2bf8e043 100644 --- a/engines/gob/sound/sound.cpp +++ b/engines/gob/sound/sound.cpp @@ -29,6 +29,7 @@ #include "gob/util.h" #include "gob/dataio.h" #include "gob/game.h" +#include "gob/inter.h" namespace Gob { @@ -370,7 +371,7 @@ void Sound::blasterWaitEndPlay(bool interruptible, bool stopComp) { while (_blaster->isPlaying() && !_vm->_quitRequested) { if (interruptible && (_vm->_util->checkKey() == 0x11B)) { - WRITE_VAR(57, -1); + WRITE_VAR(57, (uint32) -1); return; } _vm->_util->longDelay(200); diff --git a/engines/gob/variables.cpp b/engines/gob/variables.cpp new file mode 100644 index 0000000000..af93252fb0 --- /dev/null +++ b/engines/gob/variables.cpp @@ -0,0 +1,309 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "common/endian.h" + +#include "gob/gob.h" +#include "gob/variables.h" + +namespace Gob { + +Variables::Variables(uint32 size) { + _size = size; + + _vars = new byte[_size]; + _sizes = new byte[_size]; +} + +Variables::~Variables() { + delete[] _vars; + delete[] _sizes; +} + +void Variables::clear() { + memset(_vars, 0, _size); + + // All variables are 32 bit wide per default + memset(_sizes, 0, _size); + for (uint32 i = 0; i < _size; i += 4) + _sizes[i] = kSize32; +} + +void Variables::clearSize(uint32 offset) { + uint32 inVar = offset % 4; + uint32 varOff = (offset >> 2) << 2; + + // Clearing out the old size + for (uint32 i = 0; i < 4; i++) { + if (_sizes[varOff + i] == kSize32) + _sizes[varOff + i] = kSize8; + else if ((inVar == (i + 1)) && (_sizes[varOff + i] == kSize16)) + _sizes[varOff + i] = kSize8; + } +} + +void Variables::writeSize(uint32 offset, byte n) { + clearSize(offset); + + _sizes[offset] = n; + // Setting following bytes of size to 8 bit, for easy clearing out afterwards + for (; n > 0; n--) + _sizes[offset + n] = kSize8; +} + +void Variables::writeSizeString(uint32 offset, uint32 length) { + clearSize(offset); + + memset(_sizes + offset, kSize8, length); +} + +void Variables::writeVar8(uint32 var, uint8 value) { + writeOff8(var * 4, value); +} + +void Variables::writeVar16(uint32 var, uint16 value) { + writeOff16(var * 4, value); +} + +void Variables::writeVar32(uint32 var, uint32 value) { + writeOff32(var * 4, value); +} + +void Variables::writeVarString(uint32 var, const char *value) { + writeOffString(var * 4, value); +} + +void Variables::writeOff8(uint32 offset, uint8 value) { + write8(_vars + offset, value); + writeSize(offset, kSize8); +} + +void Variables::writeOff16(uint32 offset, uint16 value) { + write16(_vars + offset, value); + writeSize(offset, kSize16); +} + +void Variables::writeOff32(uint32 offset, uint32 value) { + write32(_vars + offset, value); + writeSize(offset, kSize32); +} + +void Variables::writeOffString(uint32 offset, const char *value) { + strcpy((char *) (_vars + offset), value); + writeSizeString(offset, strlen(value)); +} + +uint8 Variables::readVar8(uint32 var) const { + return readOff8(var * 4); +} + +uint16 Variables::readVar16(uint32 var) const { + return readOff16(var * 4); +} + +uint32 Variables::readVar32(uint32 var) const { + return readOff32(var * 4); +} + +void Variables::readVarString(uint32 var, char *value, uint32 length) { + readOffString(var * 4, value, length); +} + +uint8 Variables::readOff8(uint32 offset) const { + return read8(_vars + offset); +} + +uint16 Variables::readOff16(uint32 offset) const { + return read16(_vars + offset); +} + +uint32 Variables::readOff32(uint32 offset) const { + return read32(_vars + offset); +} + +void Variables::readOffString(uint32 offset, char *value, uint32 length) { + strncpy0(value, (const char *) (_vars + offset), length - 1); +} + +const uint8 *Variables::getAddressVar8(uint32 var) const { + return getAddressOff8(var * 4); +} + +uint8 *Variables::getAddressVar8(uint32 var, uint32 n) { + return getAddressOff8(var * 4, n); +} + +const uint16 *Variables::getAddressVar16(uint32 var) const { + return getAddressOff16(var * 4); +} + +uint16 *Variables::getAddressVar16(uint32 var, uint32 n) { + return getAddressOff16(var * 4, n); +} + +const uint32 *Variables::getAddressVar32(uint32 var) const { + return getAddressOff32(var * 4); +} + +uint32 *Variables::getAddressVar32(uint32 var, uint32 n) { + return getAddressOff32(var * 4, n); +} + +const char *Variables::getAddressVarString(uint32 var) const { + return getAddressOffString(var * 4); +} + +char *Variables::getAddressVarString(uint32 var, uint32 n) { + return getAddressOffString(var * 4, n); +} + +const uint8 *Variables::getAddressOff8(uint32 offset) const { + return ((const uint8 *) (_vars + offset)); +} + +uint8 *Variables::getAddressOff8(uint32 offset, uint32 n) { + for (uint32 i = 0; i < n; i++) + writeSize(offset + i, kSize8); + + return ((uint8 *) (_vars + offset)); +} + +const uint16 *Variables::getAddressOff16(uint32 offset) const { + return ((const uint16 *) (_vars + offset)); +} + +uint16 *Variables::getAddressOff16(uint32 offset, uint32 n) { + for (uint32 i = 0; i < n; i++) + writeSize(offset + i * 2, kSize16); + + return ((uint16 *) (_vars + offset)); +} + +const uint32 *Variables::getAddressOff32(uint32 offset) const { + return ((const uint32 *) (_vars + offset)); +} + +uint32 *Variables::getAddressOff32(uint32 offset, uint32 n) { + for (uint32 i = 0; i < n; i++) + writeSize(offset + i * 4, kSize32); + + return ((uint32 *) (_vars + offset)); +} + +const char *Variables::getAddressOffString(uint32 offset) const { + return ((const char *) (_vars + offset)); +} + +char *Variables::getAddressOffString(uint32 offset, uint32 n) { + writeSizeString(offset, (n == 0xFFFFFFFF) ? strlen((char *) (_vars + offset)) : n); + + return ((char *) (_vars + offset)); +} + +bool Variables::copyTo(uint32 offset, byte *variables, byte *sizes, uint32 n) const { + if ((offset + n) > _size) + return false; + + if (variables) + memcpy(variables, _vars + offset, n); + if (sizes) + memcpy(sizes, _sizes + offset, n); + + return true; +} + +bool Variables::copyFrom(uint32 offset, const byte *variables, const byte *sizes, uint32 n) { + if (((offset + n) > _size) || !variables || !sizes) + return false; + + memcpy(_vars + offset, variables, n); + memcpy(_sizes + offset, sizes, n); + + return true; +} + + +VariablesLE::VariablesLE(uint32 size) : Variables(size) { +} + +VariablesLE::~VariablesLE() { +} + +void VariablesLE::write8(byte *buf, uint8 data) const { + *buf = (byte) data; +} + +void VariablesLE::write16(byte *buf, uint16 data) const { + WRITE_LE_UINT16(buf, data); +} + +void VariablesLE::write32(byte *buf, uint32 data) const { + WRITE_LE_UINT32(buf, data); +} + +uint8 VariablesLE::read8(const byte *buf) const { + return (uint8) *buf; +} + +uint16 VariablesLE::read16(const byte *buf) const { + return READ_LE_UINT16(buf); +} + +uint32 VariablesLE::read32(const byte *buf) const { + return READ_LE_UINT32(buf); +} + + +VariablesBE::VariablesBE(uint32 size) : Variables(size) { +} + +VariablesBE::~VariablesBE() { +} + +void VariablesBE::write8(byte *buf, uint8 data) const { + *buf = (byte) data; +} + +void VariablesBE::write16(byte *buf, uint16 data) const { + WRITE_BE_UINT16(buf, data); +} + +void VariablesBE::write32(byte *buf, uint32 data) const { + WRITE_BE_UINT32(buf, data); +} + +uint8 VariablesBE::read8(const byte *buf) const { + return (uint8) *buf; +} + +uint16 VariablesBE::read16(const byte *buf) const { + return READ_BE_UINT16(buf); +} + +uint32 VariablesBE::read32(const byte *buf) const { + return READ_BE_UINT32(buf); +} + +} // End of namespace Gob diff --git a/engines/gob/variables.h b/engines/gob/variables.h new file mode 100644 index 0000000000..5989ed38ee --- /dev/null +++ b/engines/gob/variables.h @@ -0,0 +1,147 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef GOB_VARIABLES_H +#define GOB_VARIABLES_H + +namespace Gob { + +class Variables { +public: + Variables(uint32 size); + virtual ~Variables(); + + void writeVar8(uint32 var, uint8 value); + void writeVar16(uint32 var, uint16 value); + void writeVar32(uint32 var, uint32 value); + + void writeVarString(uint32 var, const char *value); + + void writeOff8(uint32 offset, uint8 value); + void writeOff16(uint32 offset, uint16 value); + void writeOff32(uint32 offset, uint32 value); + + void writeOffString(uint32 offset, const char *value); + + uint8 readVar8(uint32 var) const; + uint16 readVar16(uint32 var) const; + uint32 readVar32(uint32 var) const; + + void readVarString(uint32 var, char *value, uint32 length); + + uint8 readOff8(uint32 offset) const; + uint16 readOff16(uint32 offset) const; + uint32 readOff32(uint32 offset) const; + + void readOffString(uint32 offset, char *value, uint32 length); + + + const uint8 *getAddressVar8(uint32 var) const; + uint8 *getAddressVar8(uint32 var, uint32 n = 1); + + const uint16 *getAddressVar16(uint32 var) const; + uint16 *getAddressVar16(uint32 var, uint32 n = 1); + + const uint32 *getAddressVar32(uint32 var) const; + uint32 *getAddressVar32(uint32 var, uint32 n = 1); + + const char *getAddressVarString(uint32 var) const; + char *getAddressVarString(uint32 var, uint32 n = 0xFFFFFFFF); + + const uint8 *getAddressOff8(uint32 offset) const; + uint8 *getAddressOff8(uint32 offset, uint32 n = 1); + + const uint16 *getAddressOff16(uint32 offset) const; + uint16 *getAddressOff16(uint32 offset, uint32 n = 1); + + const uint32 *getAddressOff32(uint32 offset) const; + uint32 *getAddressOff32(uint32 offset, uint32 n = 1); + + const char *getAddressOffString(uint32 offset) const; + char *getAddressOffString(uint32 offset, uint32 n = 0xFFFFFFFF); + + + bool copyTo(uint32 offset, byte *variables, byte *sizes, uint32 n) const; + bool copyFrom(uint32 offset, const byte *variables, const byte *sizes, uint32 n); + +protected: + virtual void write8(byte *buf, uint8 data) const = 0; + virtual void write16(byte *buf, uint16 data) const = 0; + virtual void write32(byte *buf, uint32 data) const = 0; + + virtual uint8 read8(const byte *buf) const = 0; + virtual uint16 read16(const byte *buf) const = 0; + virtual uint32 read32(const byte *buf) const = 0; + +private: + // Basically the number of additional bytes occupied + static const byte kSize8 = 0; + static const byte kSize16 = 1; + static const byte kSize32 = 3; + + uint32 _size; + + byte *_vars; + byte *_sizes; + + void clear(); + void clearSize(uint32 offset); + void writeSize(uint32 offset, byte n); + void writeSizeString(uint32 offset, uint32 length); +}; + +class VariablesLE : public Variables { +public: + VariablesLE(uint32 size); + ~VariablesLE(); + +protected: + void write8(byte *buf, uint8 data) const; + void write16(byte *buf, uint16 data) const; + void write32(byte *buf, uint32 data) const; + + uint8 read8(const byte *buf) const; + uint16 read16(const byte *buf) const; + uint32 read32(const byte *buf) const; +}; + +class VariablesBE : public Variables { +public: + VariablesBE(uint32 size); + ~VariablesBE(); + +protected: + void write8(byte *buf, uint8 data) const; + void write16(byte *buf, uint16 data) const; + void write32(byte *buf, uint32 data) const; + + uint8 read8(const byte *buf) const; + uint16 read16(const byte *buf) const; + uint32 read32(const byte *buf) const; +}; + +} // End of namespace Gob + +#endif // GOB_VARIABLES_H diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp index 4a337d48b4..909d39a63b 100644 --- a/engines/gob/videoplayer.cpp +++ b/engines/gob/videoplayer.cpp @@ -614,15 +614,15 @@ void VideoPlayer::writeVideoInfo(const char *videoFile, int16 varX, int16 varY, WRITE_VAR_OFFSET(varY, y); WRITE_VAR_OFFSET(varFrames, _primaryVideo->getVideo()->getFramesCount()); WRITE_VAR_OFFSET(varWidth, width); - WRITE_VARO_UINT16(varHeight & 0xFFFFFFFC, height); + WRITE_VAR_OFFSET(varHeight, height); primaryClose(); } else { - WRITE_VAR_OFFSET(varX, -1); - WRITE_VAR_OFFSET(varY, -1); - WRITE_VAR_OFFSET(varFrames, -1); - WRITE_VAR_OFFSET(varWidth, -1); - WRITE_VAR_OFFSET(varHeight, -1); + WRITE_VAR_OFFSET(varX, (uint32) -1); + WRITE_VAR_OFFSET(varY, (uint32) -1); + WRITE_VAR_OFFSET(varFrames, (uint32) -1); + WRITE_VAR_OFFSET(varWidth, (uint32) -1); + WRITE_VAR_OFFSET(varHeight, (uint32) -1); } } -- cgit v1.2.3 From 8757db728abc0e4b2dfca6a6fbae05ee883aaaa7 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 28 May 2008 21:27:52 +0000 Subject: Updated the MSVC project files of the gob engine for commit #32352 svn-id: r32353 --- dists/msvc7/gob.vcproj | 6 ++++++ dists/msvc71/gob.vcproj | 6 ++++++ dists/msvc8/gob.vcproj | 8 ++++++++ dists/msvc9/gob.vcproj | 8 ++++++++ 4 files changed, 28 insertions(+) diff --git a/dists/msvc7/gob.vcproj b/dists/msvc7/gob.vcproj index 9f38585b8e..bb7eac35e0 100644 --- a/dists/msvc7/gob.vcproj +++ b/dists/msvc7/gob.vcproj @@ -345,6 +345,12 @@ + + + + diff --git a/dists/msvc71/gob.vcproj b/dists/msvc71/gob.vcproj index cdd6c4dc75..3d6408cdf5 100644 --- a/dists/msvc71/gob.vcproj +++ b/dists/msvc71/gob.vcproj @@ -359,6 +359,12 @@ + + + + diff --git a/dists/msvc8/gob.vcproj b/dists/msvc8/gob.vcproj index 62f7756c8a..c178caf8be 100644 --- a/dists/msvc8/gob.vcproj +++ b/dists/msvc8/gob.vcproj @@ -492,6 +492,14 @@ RelativePath="..\..\engines\gob\util.h" > + + + + diff --git a/dists/msvc9/gob.vcproj b/dists/msvc9/gob.vcproj index 60cb8ddbc3..e6c55519b0 100644 --- a/dists/msvc9/gob.vcproj +++ b/dists/msvc9/gob.vcproj @@ -493,6 +493,14 @@ RelativePath="..\..\engines\gob\util.h" > + + + + -- cgit v1.2.3 From 4afd19ad0fc61063c4ff4fa715a500b792031184 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Wed, 28 May 2008 22:15:10 +0000 Subject: Fixed premature stopping of sounds/voices. svn-id: r32354 --- engines/made/made.cpp | 1 + engines/made/made.h | 3 +++ engines/made/scriptfuncs.cpp | 31 ++++++++++++++++--------------- 3 files changed, 20 insertions(+), 15 deletions(-) diff --git a/engines/made/made.cpp b/engines/made/made.cpp index da7ab23f5d..09a9a85ec6 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -280,6 +280,7 @@ int MadeEngine::go() { // NOTE: Disabled again since it causes major graphics errors. //_system->setFeatureState(OSystem::kFeatureAutoComputeDirtyRects, true); + _autoStopSound = false; _eventNum = _eventKey = _eventMouseX = _eventMouseY = 0; #ifdef DUMP_SCRIPTS diff --git a/engines/made/made.h b/engines/made/made.h index 5ee3828557..f7e3354c4d 100644 --- a/engines/made/made.h +++ b/engines/made/made.h @@ -108,7 +108,10 @@ public: uint16 _eventNum; int _eventMouseX, _eventMouseY; uint16 _eventKey; + int _soundRate; + bool _autoStopSound; + int _musicVolume; // 2 = LGOP2, Manhole N&E diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index f67b7c89c6..8276550a48 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -183,13 +183,15 @@ int16 ScriptFunctions::sfDrawPicture(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfClearScreen(int16 argc, int16 *argv) { + if (_vm->_autoStopSound) { + _vm->_mixer->stopHandle(_audioStreamHandle); + _vm->_autoStopSound = false; + } _vm->_screen->clearScreen(); return 0; } int16 ScriptFunctions::sfShowPage(int16 argc, int16 *argv) { - if (_vm->getGameID() != GID_RTZ) - _vm->_mixer->stopHandle(_audioStreamHandle); _vm->_screen->show(); return 0; } @@ -221,21 +223,17 @@ int16 ScriptFunctions::sfSetVisualEffect(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfPlaySound(int16 argc, int16 *argv) { - int soundNum = argv[0]; - bool loop = false; - + int16 soundNum = argv[0]; + _vm->_autoStopSound = false; + _vm->_mixer->stopHandle(_audioStreamHandle); if (argc > 1) { soundNum = argv[1]; - loop = (argv[0] == 1); + _vm->_autoStopSound = (argv[0] == 1); } - if (soundNum > 0) { - if (!_vm->_mixer->isSoundHandleActive(_audioStreamHandle)) { - _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, - _vm->_res->getSound(soundNum)->getAudioStream(_vm->_soundRate, loop)); - } + _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, + _vm->_res->getSound(soundNum)->getAudioStream(_vm->_soundRate, false)); } - return 0; } @@ -535,14 +533,17 @@ int16 ScriptFunctions::sfSoundPlaying(int16 argc, int16 *argv) { int16 ScriptFunctions::sfStopSound(int16 argc, int16 *argv) { _vm->_mixer->stopHandle(_audioStreamHandle); + _vm->_autoStopSound = false; return 0; } int16 ScriptFunctions::sfPlayVoice(int16 argc, int16 *argv) { - if (argv[0] > 0) { - _vm->_mixer->stopHandle(_audioStreamHandle); + int16 soundNum = argv[0]; + _vm->_mixer->stopHandle(_audioStreamHandle); + if (soundNum > 0) { _vm->_mixer->playInputStream(Audio::Mixer::kPlainSoundType, &_audioStreamHandle, - _vm->_res->getSound(argv[0])->getAudioStream(_vm->_soundRate, false)); + _vm->_res->getSound(soundNum)->getAudioStream(_vm->_soundRate, false)); + _vm->_autoStopSound = true; } return 0; } -- cgit v1.2.3 From ab6c82a8502ede6172f102bd5da8f3817b29a69f Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Wed, 28 May 2008 22:42:15 +0000 Subject: Silenced a signed/unsigned comparison warning svn-id: r32355 --- engines/made/screen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index a480a3bc0c..4774103d6a 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -819,7 +819,7 @@ int16 Screen::addToSpriteList(int16 index, int16 xofs, int16 yofs) { } SpriteListItem Screen::getFromSpriteList(int16 index) { - if (index > _spriteList.size()) { + if (((uint) index) > _spriteList.size()) { SpriteListItem emptyItem; emptyItem.index = 0; return emptyItem; -- cgit v1.2.3 From b844e4bd5ad61699144ad4430ef158b9222ca6b3 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 28 May 2008 23:17:10 +0000 Subject: Implemented visual effects 11 and 13 (inverse of 10 and 12) svn-id: r32356 --- engines/made/screenfx.cpp | 28 ++++++++++++++++++++++++++++ engines/made/screenfx.h | 2 ++ 2 files changed, 30 insertions(+) diff --git a/engines/made/screenfx.cpp b/engines/made/screenfx.cpp index b65c3db60c..ee96af601a 100644 --- a/engines/made/screenfx.cpp +++ b/engines/made/screenfx.cpp @@ -76,10 +76,18 @@ void ScreenEffects::run(int16 effectNum, Graphics::Surface *surface, byte *palet vfx10(surface, palette, newPalette, colorCount); break; + case 11: // "Screen wipe in", right to left + vfx11(surface, palette, newPalette, colorCount); + break; + case 12: // "Screen wipe in", top to bottom vfx12(surface, palette, newPalette, colorCount); break; + case 13: // "Screen wipe in", bottom to top + vfx13(surface, palette, newPalette, colorCount); + break; + case 14: // "Screen open" effect vfx14(surface, palette, newPalette, colorCount); break; @@ -256,6 +264,16 @@ void ScreenEffects::vfx10(Graphics::Surface *surface, byte *palette, byte *newPa setPalette(palette); } +// "Screen wipe in", right to left +void ScreenEffects::vfx11(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { + for (int x = 312; x > -56; x -= 8) { + copyFxRect(surface, x, 0, x + 64, 200); + setBlendedPalette(palette, newPalette, colorCount, x + 56, 368); + _screen->updateScreenAndWait(25); + } + setPalette(palette); +} + // "Screen wipe in", top to bottom void ScreenEffects::vfx12(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { for (int y = -70; y < 312; y += 10) { @@ -266,6 +284,16 @@ void ScreenEffects::vfx12(Graphics::Surface *surface, byte *palette, byte *newPa setPalette(palette); } +// "Screen wipe in", bottom to top +void ScreenEffects::vfx13(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { + for (int y = 312; y > -70; y -= 10) { + copyFxRect(surface, 0, y, 320, y + 80); + setBlendedPalette(palette, newPalette, colorCount, y + 70, 260); + _screen->updateScreenAndWait(25); + } + setPalette(palette); +} + // "Screen open" effect void ScreenEffects::vfx14(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount) { int16 x = 8, y = 5; diff --git a/engines/made/screenfx.h b/engines/made/screenfx.h index 1c36b3e1f1..e5023621ae 100644 --- a/engines/made/screenfx.h +++ b/engines/made/screenfx.h @@ -57,7 +57,9 @@ private: void vfx02(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx09(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx10(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); + void vfx11(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx12(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); + void vfx13(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx14(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx15(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); void vfx17(Graphics::Surface *surface, byte *palette, byte *newPalette, int colorCount); -- cgit v1.2.3 From 5779261c16434369701704ea4314dd5b3e13351a Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Thu, 29 May 2008 10:15:39 +0000 Subject: Tiny comment update (Echec in French means failure). svn-id: r32358 --- engines/cine/anim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/cine/anim.cpp b/engines/cine/anim.cpp index 73837308ca..055eb733c3 100644 --- a/engines/cine/anim.cpp +++ b/engines/cine/anim.cpp @@ -730,7 +730,7 @@ void loadResource(const char *resourceName) { } else if (strstr(resourceName, ".SEQ")) { loadSeq(resourceName, -1); return; - } else if (strstr(resourceName, "ECHEC")) { + } else if (strstr(resourceName, "ECHEC")) { // Echec (French) means failure exitEngine = 1; return; } -- cgit v1.2.3 From 7a22a632448a0067419757fe431e25eb343a2a38 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 29 May 2008 12:17:40 +0000 Subject: Simplified calls to talk_igor_dch, talk_dr_izq and talk_dr_dch Removed loads of font definitions and simplified some of the internal font mapping svn-id: r32359 --- engines/drascula/animation.cpp | 92 ++++++++-------- engines/drascula/drascula.cpp | 244 ++++++++++------------------------------- engines/drascula/drascula.h | 79 +++---------- engines/drascula/talk.cpp | 18 +++ 4 files changed, 141 insertions(+), 292 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index a2cd43eac2..f01a427eb5 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -183,17 +183,17 @@ void DrasculaEngine::animation_1_1() { pon_igor(); pon_dr(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - talk_igor_dch(_texti[_lang][8], "I8.als"); + talk_igor_dch(8); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); pon_igor(); pon_dr(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - talk_dr_izq(_textd[_lang][2], "d2.als"); + talk_dr_izq(2); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_izq(_textd[_lang][3], "d3.als"); + talk_dr_izq(3); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; if (anima("lib.bin", 16)) @@ -250,17 +250,17 @@ void DrasculaEngine::animation_1_1() { stopMusic(); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(_texti[_lang][9], "I9.als"); + talk_igor_dch(9); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_izq(_textd[_lang][9], "d9.als"); + talk_dr_izq(9); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(_texti[_lang][10], "I10.als"); + talk_igor_dch(10); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; playMusic(11); - talk_dr_izq(_textd[_lang][10], "d10.als"); + talk_dr_izq(10); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; if (anima("rayo1.bin", 16)) @@ -282,10 +282,10 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 1; - talk_igor_dch(_texti[_lang][1], "I1.als"); + talk_igor_dch(1); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_dch(_textd[_lang][11], "d11.als"); + talk_dr_dch(11); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; @@ -299,7 +299,7 @@ void DrasculaEngine::animation_1_1() { pon_igor(); pon_dr(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - talk_dr_izq(_textd[_lang][12], "d12.als"); + talk_dr_izq(12); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; @@ -313,11 +313,11 @@ void DrasculaEngine::animation_1_1() { pon_igor(); pon_dr(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - talk_igor_dch(_texti[_lang][2], "I2.als"); + talk_igor_dch(2); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; pause(13); - talk_dr_dch(_textd[_lang][13],"d13.als"); + talk_dr_dch(13); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; @@ -331,26 +331,26 @@ void DrasculaEngine::animation_1_1() { pon_igor(); pon_dr(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - talk_dr_izq(_textd[_lang][14], "d14.als"); + talk_dr_izq(14); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(_texti[_lang][3], "I3.als"); + talk_igor_dch(3); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_izq(_textd[_lang][15], "d15.als"); + talk_dr_izq(15); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(_texti[_lang][4], "I4.als"); + talk_igor_dch(4); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_izq(_textd[_lang][16], "d16.als"); + talk_dr_izq(16); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(_texti[_lang][5], "I5.als"); + talk_igor_dch(5); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; sentido_igor = 3; - talk_dr_izq(_textd[_lang][17], "d17.als"); + talk_dr_izq(17); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; pause(18); @@ -2272,24 +2272,24 @@ void DrasculaEngine::animation_1_6() { decompressPic(dir_dibujo2, 1); loadPic("car.alg"); decompressPic(dir_hare_fondo, 1); - talk_dr_dch(_textd[_lang][19], "D19.als"); - talk(_text[_lang][247], "247.als"); - talk_dr_dch(_textd[_lang][20], "d20.als"); - talk_dr_dch(_textd[_lang][21], "d21.als"); - talk(_text[_lang][248], "248.als"); - talk_dr_dch(_textd[_lang][22], "d22.als"); - talk(_text[_lang][249], "249.als"); - talk_dr_dch(_textd[_lang][23], "d23.als"); + talk_dr_dch(19); + talk(247); + talk_dr_dch(20); + talk_dr_dch(21); + talk(248); + talk_dr_dch(22); + talk(249); + talk_dr_dch(23); conversa("op_11.cal"); - talk_dr_dch(_textd[_lang][26], "d26.als"); + talk_dr_dch(26); anima("fum.bin", 15); - talk_dr_dch(_textd[_lang][27], "d27.als"); - talk(_text[_lang][254], "254.als"); - talk_dr_dch(_textd[_lang][28], "d28.als"); - talk(_text[_lang][255], "255.als"); - talk_dr_dch(_textd[_lang][29], "d29.als"); + talk_dr_dch(27); + talk(254); + talk_dr_dch(28); + talk(255); + talk_dr_dch(29); FundeAlNegro(1); clearRoom(); loadPic("time1.alg"); @@ -2303,9 +2303,9 @@ void DrasculaEngine::animation_1_6() { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); FundeDelNegro(1); - talk(_text[_lang][256], "256.als"); - talk_dr_dch(_textd[_lang][30], "d30.als"); - talk(_text[_lang][257], "257.als"); + talk(256); + talk_dr_dch(30); + talk(257); FundeAlNegro(0); clearRoom(); loadPic("time1.alg"); @@ -2317,17 +2317,17 @@ void DrasculaEngine::animation_1_6() { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); FundeDelNegro(1); - talk(_text[_lang][258], "258.als"); - talk_dr_dch(_textd[_lang][31], "d31.als"); + talk(258); + talk_dr_dch(31); animation_5_6(); - talk_dr_dch(_textd[_lang][32], "d32.als"); - talk_igor_dch(_texti[_lang][11], "I11.als"); + talk_dr_dch(32); + talk_igor_dch(11); sentido_igor = 3; - talk_dr_dch(_textd[_lang][33], "d33.als"); + talk_dr_dch(33); talk_igor_frente(_texti[_lang][12], "I12.als"); - talk_dr_dch(_textd[_lang][34], "d34.als"); + talk_dr_dch(34); sentido_dr = 0; - talk_dr_izq(_textd[_lang][35], "d35.als"); + talk_dr_izq(35); if (_lang == kSpanish) dir_texto = dir_hare_dch; @@ -2338,15 +2338,15 @@ void DrasculaEngine::animation_1_6() { } void DrasculaEngine::animation_2_6() { - talk_dr_dch(_textd[_lang][24], "d24.als"); + talk_dr_dch(24); } void DrasculaEngine::animation_3_6() { - talk_dr_dch(_textd[_lang][24], "d24.als"); + talk_dr_dch(24); } void DrasculaEngine::animation_4_6() { - talk_dr_dch(_textd[_lang][25], "d25.als"); + talk_dr_dch(25); } void DrasculaEngine::animation_5_6() { diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 5c274b1ef0..2f3f5e9c98 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1638,70 +1638,27 @@ bool DrasculaEngine::saves() { return true; } +struct charInfo { + +}; + void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) { int pos_texto[8]; int y_de_letra = 0, x_de_letra = 0, h, length; length = strlen(said); + for (h = 0; h < length; h++) { y_de_letra = (_lang == kSpanish) ? Y_ABC_ESP : Y_ABC; int c = toupper(said[h]); - if (c == 'A') - x_de_letra = X_A; - else if (c == 'B') - x_de_letra = X_B; - else if (c == 'C') - x_de_letra = X_C; - else if (c == 'D') - x_de_letra = X_D; - else if (c == 'E') - x_de_letra = X_E; - else if (c == 'F') - x_de_letra = X_F; - else if (c == 'G') - x_de_letra = X_G; - else if (c == 'H') - x_de_letra = X_H; - else if (c == 'I') - x_de_letra = X_I; - else if (c == 'J') - x_de_letra = X_J; - else if (c == 'K') - x_de_letra = X_K; - else if (c == 'L') - x_de_letra = X_L; - else if (c == 'M') - x_de_letra = X_M; - else if (c == 'N') - x_de_letra = X_N; - else if (c == 'O') - x_de_letra = X_O; - else if (c == 'P') - x_de_letra = X_P; - else if (c == 'Q') - x_de_letra = X_Q; - else if (c == 'R') - x_de_letra = X_R; - else if (c == 'S') - x_de_letra = X_S; - else if (c == 'T') - x_de_letra = X_T; - else if (c == 'U') - x_de_letra = X_U; - else if (c == 'V') - x_de_letra = X_V; - else if (c == 'W') - x_de_letra = X_W; - else if (c == 'X') - x_de_letra = X_X; - else if (c == 'Y') - x_de_letra = X_Y; - else if (c == 'Z') - x_de_letra = X_Z; - else if (c == '\245') + if (c == '\245') x_de_letra = X_GN; else if (c == '\244') x_de_letra = X_GN; + else if (c >= 'A' && c <= 'N') + x_de_letra = X_A + (c - 'A') * 9; + else if (c >= 'O' && c <= 'Z') + x_de_letra = X_A + (c - 'O') * 9; else if (c == 0xa7 || c == ' ') x_de_letra = SPACE; else { @@ -1748,60 +1705,42 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) x_de_letra = X_ASTERISCO; else if (c == '+') x_de_letra = X_PLUS; - else if (c == '1') - x_de_letra = X_N1; - else if (c == '2') - x_de_letra = X_N2; - else if (c == '3') - x_de_letra = X_N3; - else if (c == '4') - x_de_letra = X_N4; - else if (c == '5') - x_de_letra = X_N5; - else if (c == '6') - x_de_letra = X_N6; - else if (c == '7') - x_de_letra = X_N7; - else if (c == '8') - x_de_letra = X_N8; - else if (c == '9') - x_de_letra = X_N9; - else if (c == '0') - x_de_letra = X_N0; + else if (c >= '1' && c <= '0') + x_de_letra = X_N1 + (c - '1') * 9; else y_de_letra=Y_ACENTOS; if (c == '\240') x_de_letra=X_A; - else if (c =='\202') x_de_letra = X_B; - else if (c =='\241') x_de_letra = X_C; - else if (c =='\242') x_de_letra = X_D; - else if (c =='\243') x_de_letra = X_E; - else if (c =='\205') x_de_letra = X_F; - else if (c =='\212') x_de_letra = X_G; - else if (c =='\215') x_de_letra = X_H; - else if (c =='\225') x_de_letra = X_I; - else if (c =='\227') x_de_letra = X_J; - else if (c =='\203') x_de_letra = X_K; - else if (c =='\210') x_de_letra = X_L; - else if (c =='\214') x_de_letra = X_M; - else if (c =='\223') x_de_letra = X_N; + else if (c =='\202') x_de_letra = X_A + 1 * 9; // B + else if (c =='\241') x_de_letra = X_A + 2 * 9; // C + else if (c =='\242') x_de_letra = X_A + 3 * 9; // D + else if (c =='\243') x_de_letra = X_A + 4 * 9; // E + else if (c =='\205') x_de_letra = X_A + 5 * 9; // F + else if (c =='\212') x_de_letra = X_A + 6 * 9; // G + else if (c =='\215') x_de_letra = X_A + 7 * 9; // H + else if (c =='\225') x_de_letra = X_A + 8 * 9; // I + else if (c =='\227') x_de_letra = X_A + 9 * 9; // J + else if (c =='\203') x_de_letra = X_A + 10 * 9; // K + else if (c =='\210') x_de_letra = X_A + 11 * 9; // L + else if (c =='\214') x_de_letra = X_A + 12 * 9; // M + else if (c =='\223') x_de_letra = X_A + 13 * 9; // N else if (c =='\226') x_de_letra = X_GN; else if (c =='\047') x_de_letra = X_O; - else if (c =='\200') x_de_letra = X_P; - else if (c =='\207') x_de_letra = X_P; + else if (c =='\200') x_de_letra = X_O + 1 * 9; // P + else if (c =='\207') x_de_letra = X_O + 1 * 9; // P else if (c =='\265') x_de_letra = X_A; - else if (c =='\220') x_de_letra = X_B; - else if (c =='\326') x_de_letra = X_C; - else if (c =='\340') x_de_letra = X_D; - else if (c =='\351') x_de_letra = X_E; - else if (c =='\267') x_de_letra = X_F; - else if (c =='\324') x_de_letra = X_G; - else if (c =='\336') x_de_letra = X_H; - else if (c =='\343') x_de_letra = X_I; - else if (c =='\353') x_de_letra = X_J; - else if (c =='\266') x_de_letra = X_K; - else if (c =='\322') x_de_letra = X_L; - else if (c =='\327') x_de_letra = X_M; - else if (c =='\342') x_de_letra = X_N; + else if (c =='\220') x_de_letra = X_A + 1 * 9; // B + else if (c =='\326') x_de_letra = X_A + 2 * 9; // C + else if (c =='\340') x_de_letra = X_A + 3 * 9; // D + else if (c =='\351') x_de_letra = X_A + 4 * 9; // E + else if (c =='\267') x_de_letra = X_A + 5 * 9; // F + else if (c =='\324') x_de_letra = X_A + 6 * 9; // G + else if (c =='\336') x_de_letra = X_A + 7 * 9; // H + else if (c =='\343') x_de_letra = X_A + 8 * 9; // I + else if (c =='\353') x_de_letra = X_A + 9 * 9; // J + else if (c =='\266') x_de_letra = X_A + 10 * 9; // K + else if (c =='\322') x_de_letra = X_A + 11 * 9; // L + else if (c =='\327') x_de_letra = X_A + 12 * 9; // M + else if (c =='\342') x_de_letra = X_A + 13 * 9; // N else if (c =='\352') x_de_letra = X_GN; } @@ -4043,76 +3982,29 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta } int c = toupper(said[h]); - if (c == 'A') - x_de_letra = X_A_OPC; - else if (c == '\265') x_de_letra = X_A_OPC; + + if (c == '\265') x_de_letra = X_A_OPC; else if (c == '\267') x_de_letra = X_A_OPC; else if (c == '\266') x_de_letra = X_A_OPC; - else if (c == 'B') - x_de_letra = X_B_OPC; - else if (c == 'C') - x_de_letra = X_C_OPC; - else if (c == '\200') x_de_letra = X_C_OPC; - else if (c == '\207') x_de_letra = X_C_OPC; - else if (c == 'D') - x_de_letra = X_D_OPC; - else if (c == 'E') - x_de_letra = X_E_OPC; - else if (c == '\220') x_de_letra = X_E_OPC; - else if (c == '\324') x_de_letra = X_E_OPC; - else if (c == '\322') x_de_letra = X_E_OPC; - else if (c == 'F') - x_de_letra = X_F_OPC; - else if (c == 'G') - x_de_letra = X_G_OPC; - else if (c == 'H') - x_de_letra = X_H_OPC; - else if (c == 'I') - x_de_letra = X_I_OPC; - else if (c == '\326') x_de_letra = X_I_OPC; - else if (c == '\336') x_de_letra = X_I_OPC; - else if (c == '\327') x_de_letra = X_I_OPC; - else if (c == 'J') - x_de_letra = X_J_OPC; - else if (c == 'K') - x_de_letra = X_K_OPC; - else if (c == 'L') - x_de_letra = X_L_OPC; - else if (c == 'M') - x_de_letra = X_M_OPC; - else if (c == 'N') - x_de_letra = X_N_OPC; + else if (c == '\200') x_de_letra = X_A_OPC + 2 * 7; // C + else if (c == '\207') x_de_letra = X_A_OPC + 2 * 7; // C + else if (c == '\220') x_de_letra = X_A_OPC + 4 * 7; // E + else if (c == '\324') x_de_letra = X_A_OPC + 4 * 7; // E + else if (c == '\322') x_de_letra = X_A_OPC + 4 * 7; // E + else if (c == '\326') x_de_letra = X_A_OPC + 8 * 7; // I + else if (c == '\336') x_de_letra = X_A_OPC + 8 * 7; // I + else if (c == '\327') x_de_letra = X_A_OPC + 8 * 7; // I else if (c == '\047') x_de_letra = X_GN_OPC; - else if (c == 'O') - x_de_letra = X_O_OPC; - else if (c == 'P') - x_de_letra = X_P_OPC; else if (c == '\340') x_de_letra = X_O_OPC; else if (c == '\342') x_de_letra = X_O_OPC; else if (c == '\343') x_de_letra = X_O_OPC; - else if (c == 'Q') - x_de_letra = X_Q_OPC; - else if (c == 'R') - x_de_letra = X_R_OPC; - else if (c == 'S') - x_de_letra = X_S_OPC; - else if (c == 'T') - x_de_letra = X_T_OPC; - else if (c == 'U') - x_de_letra = X_U_OPC; - else if (c == '\353') x_de_letra = X_U_OPC; - else if (c == '\352') x_de_letra = X_U_OPC; - else if (c == '\351') x_de_letra = X_U_OPC; - else if (c == 'V') - x_de_letra = X_V_OPC; - else if (c == 'W') - x_de_letra = X_W_OPC; - else if (c == 'X') - x_de_letra = X_X_OPC; - else if (c == 'Y') - x_de_letra = X_Y_OPC; - else if (c == 'Z') - x_de_letra = X_Z_OPC; + else if (c == '\353') x_de_letra = X_O_OPC + 6 * 7; // U + else if (c == '\352') x_de_letra = X_O_OPC + 6 * 7; // U + else if (c == '\351') x_de_letra = X_O_OPC + 6 * 7; // U + else if (c >= 'A' && c <= 'N') + x_de_letra = X_A_OPC + (c - 'A') * 7; + else if (c >= 'O' && c <= 'Z') + x_de_letra = X_O_OPC + (c - 'O') * 7; else if (c == ' ') x_de_letra = SPACE_OPC; else { @@ -4159,26 +4051,8 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta x_de_letra = X_ASTERISCO_OPC; else if (c == '+') x_de_letra = X_PLUS_OPC; - else if (c == '1') - x_de_letra = X_N1_OPC; - else if (c == '2') - x_de_letra = X_N2_OPC; - else if (c == '3') - x_de_letra = X_N3_OPC; - else if (c == '4') - x_de_letra = X_N4_OPC; - else if (c == '5') - x_de_letra = X_N5_OPC; - else if (c == '6') - x_de_letra = X_N6_OPC; - else if (c == '7') - x_de_letra = X_N7_OPC; - else if (c == '8') - x_de_letra = X_N8_OPC; - else if (c == '9') - x_de_letra = X_N9_OPC; - else if (c == '0') - x_de_letra = X_N0_OPC; + else if (c >= '1' && c <= '0') + x_de_letra = X_N1_OPC + (c - '1') * 7; } pos_texto[0] = x_de_letra; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 512ebb9950..6e7d35614a 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -98,32 +98,15 @@ struct RoomTalkAction; #define Y_SIGNOS_ESP 160 #define Y_ACENTOS 180 +// Normal font, each letter has a space of 9 from the next +// Spanish has a special character, defined as "X_GN" +// after N, so these are split from A-N and O-Z #define X_A 6 -#define X_B 15 -#define X_C 24 -#define X_D 33 -#define X_E 42 -#define X_F 51 -#define X_G 60 -#define X_H 69 -#define X_I 78 -#define X_J 87 -#define X_K 96 -#define X_L 105 -#define X_M 114 +// (...) #define X_N 123 #define X_GN 132 #define X_O 141 -#define X_P 150 -#define X_Q 159 -#define X_R 168 -#define X_S 177 -#define X_T 186 -#define X_U 195 -#define X_V 204 -#define X_W 213 -#define X_X 222 -#define X_Y 231 +// (...) #define X_Z 240 #define X_DOT 6 #define X_COMA 15 @@ -145,15 +128,9 @@ struct RoomTalkAction; #define X_BRACKET_CLOSE 159 #define X_ASTERISCO 168 #define X_PLUS 177 -#define X_N1 186 -#define X_N2 195 -#define X_N3 204 -#define X_N4 213 -#define X_N5 222 -#define X_N6 231 -#define X_N7 240 -#define X_N8 249 -#define X_N9 258 +// Normal font, each number has a space of 9 from the next +#define X_N1 186 +// (...) #define X_N0 267 #define SPACE 250 #define ALTO_TALK_HARE 25 @@ -183,32 +160,15 @@ struct RoomTalkAction; #define Y_SIGNOS_OPC_2 40 #define Y_ABC_OPC_3 56 #define Y_SIGNOS_OPC_3 65 +// Dialog font, each letter has a space of 7 from the next +// Spanish has a special character, defined as "X_GN_OPC" +// after N, so these are split from A-N and O-Z #define X_A_OPC 10 -#define X_B_OPC 17 -#define X_C_OPC 24 -#define X_D_OPC 31 -#define X_E_OPC 38 -#define X_F_OPC 45 -#define X_G_OPC 52 -#define X_H_OPC 59 -#define X_I_OPC 66 -#define X_J_OPC 73 -#define X_K_OPC 80 -#define X_L_OPC 87 -#define X_M_OPC 94 +// (...) #define X_N_OPC 101 #define X_GN_OPC 108 #define X_O_OPC 115 -#define X_P_OPC 122 -#define X_Q_OPC 129 -#define X_R_OPC 136 -#define X_S_OPC 143 -#define X_T_OPC 150 -#define X_U_OPC 157 -#define X_V_OPC 164 -#define X_W_OPC 171 -#define X_X_OPC 178 -#define X_Y_OPC 185 +// (...) #define X_Z_OPC 192 #define SPACE_OPC 199 #define X_DOT_OPC 10 @@ -231,15 +191,9 @@ struct RoomTalkAction; #define X_BRACKET_CLOSE_OPC 129 #define X_ASTERISCO_OPC 136 #define X_PLUS_OPC 143 +// Dialog font, each number has a space of 7 from the next #define X_N1_OPC 150 -#define X_N2_OPC 157 -#define X_N3_OPC 164 -#define X_N4_OPC 171 -#define X_N5_OPC 178 -#define X_N6_OPC 185 -#define X_N7_OPC 192 -#define X_N8_OPC 199 -#define X_N9_OPC 206 +// (...) #define X_N0_OPC 213 #define NO_DOOR 99 @@ -532,8 +486,11 @@ public: void pon_bj(); void pon_dr(); void talkInit(const char *filename); + void talk_igor_dch(int); void talk_igor_dch(const char *said, const char *filename); + void talk_dr_dch(int); void talk_dr_dch(const char *said, const char *filename); + void talk_dr_izq(int); void talk_dr_izq(const char *said, const char *filename); void talk_solo(const char *, const char *); void talk_igor_frente(const char *, const char *); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index d6f393aa2a..3a6272e2a4 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -40,6 +40,12 @@ void DrasculaEngine::talkInit(const char *filename) { } } +void DrasculaEngine::talk_igor_dch(int index) { + char name[20]; + sprintf(name, "I%i.als", index); + talk_igor_dch(_texti[_lang][index], name); +} + void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { int x_talk[8] = { 56, 82, 108, 134, 160, 186, 212, 238 }; int cara; @@ -96,6 +102,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } +void DrasculaEngine::talk_dr_izq(int index) { + char name[20]; + sprintf(name, "d%i.als", index); + talk_dr_izq(_textd[_lang][index], name); +} + void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 }; int cara; @@ -158,6 +170,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } +void DrasculaEngine::talk_dr_dch(int index) { + char name[20]; + sprintf(name, "d%i.als", index); + talk_dr_dch(_textd[_lang][index], name); +} + void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 }; int cara; -- cgit v1.2.3 From 3f91c579fcdc4ed43a18792f6bd84d9e156efa13 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Thu, 29 May 2008 12:22:14 +0000 Subject: Verified most parts of opcode 0x01 (o1_modifyObjectParam) against Future Wars's and Operation Stealth's disassembly (Only part of switch case 3 still left to do). svn-id: r32360 --- engines/cine/object.cpp | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/engines/cine/object.cpp b/engines/cine/object.cpp index 89d6b99592..d7b4b853ae 100644 --- a/engines/cine/object.cpp +++ b/engines/cine/object.cpp @@ -185,39 +185,37 @@ void addObjectParam(byte objIdx, byte paramIdx, int16 newValue) { } void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue) { - paramIdx--; - - assert(paramIdx <= 5); - switch (paramIdx) { - case 0: + case 1: objectTable[objIdx].x = newValue; break; - case 1: + case 2: objectTable[objIdx].y = newValue; break; - case 2: + case 3: objectTable[objIdx].mask = newValue; + // TODO: Check this part against disassembly if (removeOverlay(objIdx, 0)) { addOverlay(objIdx, 0); } break; - case 3: + case 4: objectTable[objIdx].frame = newValue; break; - case 4: - // is it really in Future Wars? it breaks the newspaper machine - // on the airport in Operation Stealth - if (newValue == -1 && g_cine->getGameType() != Cine::GType_OS) { + case 5: + // TODO: Test if this really breaks the newspaper machine on the airport in Operation Stealth. + if (g_cine->getGameType() == Cine::GType_FW && newValue == -1) { objectTable[objIdx].costume = globalVars[0]; } else { objectTable[objIdx].costume = newValue; } break; - case 5: + case 6: objectTable[objIdx].part = newValue; break; + default: // No-operation + break; } } -- cgit v1.2.3 From b9776d46b24476a5d4f30eb4fc993ce6a4cdb76f Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Thu, 29 May 2008 12:57:11 +0000 Subject: - Implemented opcodes: sfHomeText, sfDrawAnimPic - Comments on unneeded opcodes - Simplified getting/setting strings in Objects svn-id: r32361 --- engines/made/database.cpp | 14 ++++++++++++++ engines/made/database.h | 3 +++ engines/made/screen.cpp | 4 ++-- engines/made/screen.h | 6 ++++++ engines/made/scriptfuncs.cpp | 46 ++++++++++++++++++-------------------------- 5 files changed, 44 insertions(+), 29 deletions(-) diff --git a/engines/made/database.cpp b/engines/made/database.cpp index 4a331d5ca1..4616b63252 100644 --- a/engines/made/database.cpp +++ b/engines/made/database.cpp @@ -281,6 +281,20 @@ void GameDatabase::setVar(int16 index, int16 value) { WRITE_LE_UINT16(_gameState + index * 2, value); } +const char *GameDatabase::getObjectString(int16 index) { + Object *obj = getObject(index); + if (obj) + return obj->getString(); + else + return ""; +} + +void GameDatabase::setObjectString(int16 index, const char *str) { + Object *obj = getObject(index); + if (obj) + obj->setString(str); +} + int16 GameDatabase::getObjectProperty(int16 objectIndex, int16 propertyId) { if (objectIndex == 0) diff --git a/engines/made/database.h b/engines/made/database.h index 49655e41ae..476439c1e2 100644 --- a/engines/made/database.h +++ b/engines/made/database.h @@ -130,6 +130,9 @@ public: int16 getVar(int16 index); void setVar(int16 index, int16 value); + const char *getObjectString(int16 index); + void setObjectString(int16 index, const char *str); + virtual int16 *getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag) = 0; virtual const char *getString(uint16 offset) = 0; virtual bool getSavegameDescription(const char *filename, Common::String &description) = 0; diff --git a/engines/made/screen.cpp b/engines/made/screen.cpp index 4774103d6a..cecd0c8968 100644 --- a/engines/made/screen.cpp +++ b/engines/made/screen.cpp @@ -328,7 +328,7 @@ void Screen::drawSpriteChannels(const ClipInfo &clipInfo, int16 includeStateMask break; case 4: // drawMenuText - // TODO + // Never used in any game break; default: @@ -430,7 +430,7 @@ uint16 Screen::drawSprite(uint16 flexIndex, int16 x, int16 y) { uint16 Screen::placeSprite(uint16 channelIndex, uint16 flexIndex, int16 x, int16 y) { - debug(2, "placeSprite(%d, %04X, %d, %d)\n", channelIndex, flexIndex, x, y); fflush(stdout); + debug(2, "placeSprite(%d, %04X, %d, %d)\n", channelIndex, flexIndex, x, y); if (channelIndex < 1 || channelIndex >= 100) return 0; diff --git a/engines/made/screen.h b/engines/made/screen.h index 20085bebdc..92f3512954 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -136,6 +136,11 @@ public: _textY = y; } + void homeText() { + _textX = _textRect.left; + _textY = _textRect.top; + } + uint16 updateChannel(uint16 channelIndex); void deleteChannel(uint16 channelIndex); int16 getChannelType(uint16 channelIndex); @@ -149,6 +154,7 @@ public: void clearChannels(); uint16 drawFlex(uint16 flexIndex, int16 x, int16 y, int16 flipX, int16 flipY, int16 mask, const ClipInfo &clipInfo); + void drawAnimFrame(uint16 animIndex, int16 x, int16 y, int16 frameNum, int16 flipX, int16 flipY, const ClipInfo &clipInfo); uint16 drawPic(uint16 index, int16 x, int16 y, int16 flipX, int16 flipY); diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index 8276550a48..8e06c2e8bf 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -267,10 +267,11 @@ int16 ScriptFunctions::sfIsMusicPlaying(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfSetTextPos(int16 argc, int16 *argv) { - // TODO: Used in Manhole:NE - warning("Unimplemented opcode: sfSetTextPos"); + // Used in Manhole:NE + //warning("Unimplemented opcode: sfSetTextPos"); // This seems to be some kind of low-level opcode. // The original engine calls int 10h to set the VGA cursor position. + // Since this seems to be used for debugging purposes only it's left out. return 0; } @@ -405,8 +406,7 @@ int16 ScriptFunctions::sfDrawText(int16 argc, int16 *argv) { const char *text = NULL; if (_vm->getGameID() == GID_RTZ) { - Object *obj = _vm->_dat->getObject(argv[argc - 1]); - text = obj->getString(); + text = _vm->_dat->getObjectString(argv[argc - 1]); } if (_vm->getGameID() == GID_LGOP2 || _vm->getGameID() == GID_MANHOLE) { text = _vm->_dat->getString(argv[argc - 1]); } @@ -440,8 +440,7 @@ int16 ScriptFunctions::sfDrawText(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfHomeText(int16 argc, int16 *argv) { - // TODO: Used in LGOP2 - warning("Unimplemented opcode: sfHomeText"); + _vm->_screen->homeText(); return 0; } @@ -578,8 +577,7 @@ int16 ScriptFunctions::sfPlayCdSegment(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfPrintf(int16 argc, int16 *argv) { - Object *obj = _vm->_dat->getObject(argv[argc - 1]); - const char *text = obj->getString(); + const char *text = _vm->_dat->getObjectString(argv[argc - 1]); debug(4, "--> text = %s", text); return 0; } @@ -614,15 +612,14 @@ int16 ScriptFunctions::sfAnimText(int16 argc, int16 *argv) { int16 ScriptFunctions::sfGetTextWidth(int16 argc, int16 *argv) { int16 width = 0; if (argv[1] > 0) { - Object *obj = _vm->_dat->getObject(argv[1]); - const char *text = obj->getString(); + const char *text = _vm->_dat->getObjectString(argv[1]); width = _vm->_screen->getTextWidth(argv[0], text); } return width; } int16 ScriptFunctions::sfPlayMovie(int16 argc, int16 *argv) { - const char *movieName = _vm->_dat->getObject(argv[1])->getString(); + const char *movieName = _vm->_dat->getObjectString(argv[1]); _vm->_system->showMouse(false); _vm->_pmvPlayer->play(movieName); _vm->_system->showMouse(true); @@ -663,8 +660,10 @@ int16 ScriptFunctions::sfSetMusicVolume(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfRestartEvents(int16 argc, int16 *argv) { - // TODO: Used in RTZ - warning("Unimplemented opcode: sfRestartEvents"); + // Used in RTZ + //warning("Unimplemented opcode: sfRestartEvents"); + // This is used to reset the event recording/queue. + // Since we don't use either it's left out. return 0; } @@ -765,9 +764,7 @@ int16 ScriptFunctions::sfSetSoundRate(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfDrawAnimPic(int16 argc, int16 *argv) { - // TODO: Used in RTZ - warning("Unimplemented opcode: sfDrawAnimPic"); - return 0; + return _vm->_screen->drawAnimPic(argv[5], argv[4], argv[3], argv[2], argv[1], argv[0]); } int16 ScriptFunctions::sfLoadAnim(int16 argc, int16 *argv) { @@ -794,11 +791,12 @@ int16 ScriptFunctions::sfReadMenu(int16 argc, int16 *argv) { if (menu) { const char *text = menu->getString(textIndex); debug(4, "objectIndex = %04X; text = %s\n", objectIndex, text); - Object *obj = _vm->_dat->getObject(objectIndex); - obj->setString(text); + _vm->_dat->setObjectString(objectIndex, text); _vm->_res->freeResource(menu); if (text) length = strlen(text); + } else { + _vm->_dat->setObjectString(objectIndex, ""); } return length; } @@ -836,11 +834,8 @@ int16 ScriptFunctions::sfSaveGame(int16 argc, int16 *argv) { if (saveNum > 999) return 6; - Object *obj = _vm->_dat->getObject(descObjectIndex); - const char *description = obj->getString(); - + const char *description = _vm->_dat->getObjectString(descObjectIndex); Common::String filename = _vm->getSavegameFilename(saveNum); - return _vm->_dat->savegame(filename.c_str(), description, version); } @@ -854,7 +849,6 @@ int16 ScriptFunctions::sfLoadGame(int16 argc, int16 *argv) { return 1; Common::String filename = _vm->getSavegameFilename(saveNum); - return _vm->_dat->loadgame(filename.c_str(), version); } @@ -871,13 +865,11 @@ int16 ScriptFunctions::sfGetGameDescription(int16 argc, int16 *argv) { Common::String filename = _vm->getSavegameFilename(saveNum); - Object *obj = _vm->_dat->getObject(descObjectIndex); - if (_vm->_dat->getSavegameDescription(filename.c_str(), description)) { - obj->setString(description.c_str()); + _vm->_dat->setObjectString(descObjectIndex, description.c_str()); return 0; } else { - obj->setString(""); + _vm->_dat->setObjectString(descObjectIndex, ""); return 1; } -- cgit v1.2.3 From beafc62b0d209eaf1c43de5fb43d8fc812226078 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 29 May 2008 14:04:47 +0000 Subject: puertas_cerradas -> updateDoor saca_objeto -> removeObject svn-id: r32362 --- engines/drascula/drascula.cpp | 112 +++++++++++++++++++++--------------------- engines/drascula/drascula.h | 4 +- 2 files changed, 58 insertions(+), 58 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 2f3f5e9c98..12acd64ee8 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -999,7 +999,7 @@ martini: sscanf(buffer, "%d", &sentido_alkeva[l]); getLine(ald, buffer, size); sscanf(buffer, "%d", &alapuertakeva[l]); - puertas_cerradas(l); + updateDoor(l); } } @@ -1295,7 +1295,7 @@ bool DrasculaEngine::comprueba1() { int l; if (menu_scr == 1) - saca_objeto(); + removeObject(); else { for (l = 0; l < numRoomObjs; l++) { if (mouseX >= x1[l] && mouseY >= y1[l] @@ -2323,55 +2323,55 @@ bool DrasculaEngine::carga_partida(const char *nom_game) { return true; } -void DrasculaEngine::puertas_cerradas(int l) { +void DrasculaEngine::updateDoor(int doorNum) { if (num_ejec == 1 || num_ejec == 3 || num_ejec == 5 || num_ejec == 6) return; else if (num_ejec == 2) { - if (num_obj[l] == 138) - isDoor[l] = flags[0]; - else if (num_obj[l] == 136) - isDoor[l] = flags[8]; - else if (num_obj[l] == 156) - isDoor[l] = flags[16]; - else if (num_obj[l] == 163) - isDoor[l] = flags[17]; - else if (num_obj[l] == 177) - isDoor[l] = flags[15]; - else if (num_obj[l] == 175) - isDoor[l] = flags[40]; - else if (num_obj[l] == 173) - isDoor[l] = flags[36]; + if (num_obj[doorNum] == 138) + isDoor[doorNum] = flags[0]; + else if (num_obj[doorNum] == 136) + isDoor[doorNum] = flags[8]; + else if (num_obj[doorNum] == 156) + isDoor[doorNum] = flags[16]; + else if (num_obj[doorNum] == 163) + isDoor[doorNum] = flags[17]; + else if (num_obj[doorNum] == 177) + isDoor[doorNum] = flags[15]; + else if (num_obj[doorNum] == 175) + isDoor[doorNum] = flags[40]; + else if (num_obj[doorNum] == 173) + isDoor[doorNum] = flags[36]; } else if (num_ejec == 4) { - if (num_obj[l] == 101 && flags[0] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 101 && flags[0] == 1 && flags[28] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 103) - isDoor[l] = flags[0]; - else if (num_obj[l] == 104) - isDoor[l] = flags[1]; - else if (num_obj[l] == 105) - isDoor[l] = flags[1]; - else if (num_obj[l] == 106) - isDoor[l] = flags[2]; - else if (num_obj[l] == 107) - isDoor[l] = flags[2]; - else if (num_obj[l] == 110) - isDoor[l] = flags[6]; - else if (num_obj[l] == 114) - isDoor[l] = flags[4]; - else if (num_obj[l] == 115) - isDoor[l] = flags[4]; - else if (num_obj[l] == 116 && flags[5] == 0) - isDoor[l] = 0; - else if (num_obj[l] == 116 && flags[5] == 1 && flags[23] == 1) - isDoor[l] = 1; - else if (num_obj[l] == 117) - isDoor[l] = flags[5]; - else if (num_obj[l] == 120) - isDoor[l] = flags[8]; - else if (num_obj[l] == 122) - isDoor[l] = flags[7]; + if (num_obj[doorNum] == 101 && flags[0] == 0) + isDoor[doorNum] = 0; + else if (num_obj[doorNum] == 101 && flags[0] == 1 && flags[28] == 1) + isDoor[doorNum] = 1; + else if (num_obj[doorNum] == 103) + isDoor[doorNum] = flags[0]; + else if (num_obj[doorNum] == 104) + isDoor[doorNum] = flags[1]; + else if (num_obj[doorNum] == 105) + isDoor[doorNum] = flags[1]; + else if (num_obj[doorNum] == 106) + isDoor[doorNum] = flags[2]; + else if (num_obj[doorNum] == 107) + isDoor[doorNum] = flags[2]; + else if (num_obj[doorNum] == 110) + isDoor[doorNum] = flags[6]; + else if (num_obj[doorNum] == 114) + isDoor[doorNum] = flags[4]; + else if (num_obj[doorNum] == 115) + isDoor[doorNum] = flags[4]; + else if (num_obj[doorNum] == 116 && flags[5] == 0) + isDoor[doorNum] = 0; + else if (num_obj[doorNum] == 116 && flags[5] == 1 && flags[23] == 1) + isDoor[doorNum] = 1; + else if (num_obj[doorNum] == 117) + isDoor[doorNum] = flags[5]; + else if (num_obj[doorNum] == 120) + isDoor[doorNum] = flags[8]; + else if (num_obj[doorNum] == 122) + isDoor[doorNum] = flags[7]; } } @@ -2639,7 +2639,7 @@ void DrasculaEngine::barra_menu() { } } -void DrasculaEngine::saca_objeto() { +void DrasculaEngine::removeObject() { int h = 0, n; updateRoom(); @@ -2666,7 +2666,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { if (num_obj[l] == 105 && flags[0] == 0) talk(_text[_lang][442], "442.als"); else { - puertas_cerradas(l); + updateDoor(l); if (isDoor[l] != 0) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; @@ -2690,7 +2690,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { } } } else if (num_ejec == 2) { - puertas_cerradas(l); + updateDoor(l); if (isDoor[l] != 0) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); hare_se_mueve = 0; @@ -2723,7 +2723,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { carga_escoba(salgo); } } else if (num_ejec == 3) { - puertas_cerradas(l); + updateDoor(l); if (isDoor[l] != 0 && visible[l] == 1) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; @@ -2741,7 +2741,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { carga_escoba(salgo); } } else if (num_ejec == 4) { - puertas_cerradas(l); + updateDoor(l); if (isDoor[l] != 0) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; @@ -2762,7 +2762,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { carga_escoba(salgo); } } else if (num_ejec == 5) { - puertas_cerradas(l); + updateDoor(l); if (isDoor[l] != 0 && visible[l] == 1) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; @@ -2781,7 +2781,7 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { carga_escoba(salgo); } } else if (num_ejec == 6) { - puertas_cerradas(l); + updateDoor(l); if (isDoor[l] != 0) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; @@ -4423,7 +4423,7 @@ void DrasculaEngine::openDoor(int nflag, int doorNum) { } if (doorNum != NO_DOOR) - puertas_cerradas(doorNum); + updateDoor(doorNum); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); stopSound(); @@ -4515,7 +4515,7 @@ void DrasculaEngine::closeDoor(int nflag, int doorNum) { playSound("s4.als"); flags[nflag] = 0; if (doorNum != NO_DOOR) - puertas_cerradas(doorNum); + updateDoor(doorNum); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); stopSound(); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 6e7d35614a..24861f988a 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -511,7 +511,7 @@ public: int musicStatus(); void updateRoom(); bool carga_partida(const char *); - void puertas_cerradas(int); + void updateDoor(int); void animastopSound_corte(); void color_hare(); void funde_hare(int oscuridad); @@ -525,7 +525,7 @@ public: void pon_hare(); void menu_sin_volcar(); void barra_menu(); - void saca_objeto(); + void removeObject(); bool sal_de_la_habitacion(int); bool coge_objeto(); bool banderas(int); -- cgit v1.2.3 From c2c21ffffbfe772ce79d91c3b7766b152c3d44ca Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 29 May 2008 14:14:31 +0000 Subject: MirarRaton -> updateEvents espera_soltar -> updateEvents Some cleanup svn-id: r32363 --- engines/drascula/drascula.cpp | 46 +++++++++++++------------------------------ engines/drascula/drascula.h | 2 -- 2 files changed, 14 insertions(+), 34 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 12acd64ee8..c3447d09e0 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -664,7 +664,7 @@ bucles: playMusic(roomMusic); } - MirarRaton(); + updateEvents(); if (menu_scr == 0 && lleva_objeto == 1) comprueba_objetos(); @@ -678,7 +678,7 @@ bucles: decompressPic(dir_hare_fondo, 1); setPalette((byte *)&gamePalette); menu_scr = 0; - espera_soltar(); + updateEvents(); if (num_ejec != 3) cont_sv = 0; } @@ -697,7 +697,7 @@ bucles: loadPic("icons.alg"); decompressPic(dir_hare_fondo, 1); menu_scr = 1; - espera_soltar(); + updateEvents(); withoutVerb(); if (num_ejec != 3) cont_sv = 0; @@ -1270,14 +1270,6 @@ void DrasculaEngine::comprueba_objetos() { hay_nombre = 0; } -void DrasculaEngine::espera_soltar() { - updateEvents(); -} - -void DrasculaEngine::MirarRaton() { - updateEvents(); -} - void DrasculaEngine::elige_en_barra() { int n, num_verbo = -1; @@ -1462,7 +1454,7 @@ void DrasculaEngine::mesa() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - MirarRaton(); + updateEvents(); if (button_dch == 1) { delay(100); @@ -1500,7 +1492,7 @@ void DrasculaEngine::mesa() { } - espera_soltar(); + updateEvents(); } bool DrasculaEngine::saves() { @@ -1546,7 +1538,7 @@ bool DrasculaEngine::saves() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); y = 27; - MirarRaton(); + updateEvents(); if (button_izq == 1) { delay(100); @@ -1818,7 +1810,7 @@ void DrasculaEngine::salva_pantallas() { file.read(ghost, 65536); file.close(); - MirarRaton(); + updateEvents(); xr = mouseX; yr = mouseY; @@ -1895,7 +1887,7 @@ void DrasculaEngine::salva_pantallas() { // end of efecto() - MirarRaton(); + updateEvents(); if (button_dch == 1 || button_izq == 1) break; if (mouseX != xr) @@ -2653,7 +2645,7 @@ void DrasculaEngine::removeObject() { } } - espera_soltar(); + updateEvents(); if (lleva_objeto == 1) chooseObject(h); @@ -2832,7 +2824,7 @@ usando_verbos: if (comprueba_banderas_menu()) return true; } - espera_soltar(); + updateEvents(); if (lleva_objeto == 0) withoutVerb(); @@ -3866,7 +3858,7 @@ bucle_opc: playMusic(roomMusic); } - MirarRaton(); + updateEvents(); if (mouseY > 0 && mouseY < 9) { if (used1 == 1 && _color != WHITE) @@ -3937,19 +3929,9 @@ bucle_opc: color_abc(LIGHT_GREEN); } - if (used1 == 0) - game1 = 1; - else - game1 = 3; - if (used2 == 0) - game2 = 1; - else - game2 = 3; - if (used3 == 0) - game3 = 1; - else - game3 = 3; - + game1 = (used1 == 0) ? 1 : 3; + game2 = (used2 == 0) ? 1 : 3; + game3 = (used3 == 0) ? 1 : 3; game4 = 1; if (rompo_y_salgo == 0) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 24861f988a..d01fab2de4 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -455,8 +455,6 @@ public: void lleva_al_hare(int, int); void mueve_cursor(); void comprueba_objetos(); - void espera_soltar(); - void MirarRaton(); void elige_en_barra(); bool comprueba1(); bool comprueba2(); -- cgit v1.2.3 From eb964d2844ce81bd01ab314d6f12d889405d777d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 29 May 2008 16:41:49 +0000 Subject: Fixed regression svn-id: r32364 --- engines/drascula/drascula.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index c3447d09e0..e42227dc49 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1650,7 +1650,7 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) else if (c >= 'A' && c <= 'N') x_de_letra = X_A + (c - 'A') * 9; else if (c >= 'O' && c <= 'Z') - x_de_letra = X_A + (c - 'O') * 9; + x_de_letra = X_O + (c - 'O') * 9; else if (c == 0xa7 || c == ' ') x_de_letra = SPACE; else { -- cgit v1.2.3 From 13c8e6d94b6d074985ef781d58300b56970b8c8f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 29 May 2008 16:53:28 +0000 Subject: Numbers are mapped in a different order in the game's fonts svn-id: r32365 --- engines/drascula/drascula.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index e42227dc49..f0adc6680d 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1697,8 +1697,12 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) x_de_letra = X_ASTERISCO; else if (c == '+') x_de_letra = X_PLUS; - else if (c >= '1' && c <= '0') + else if (c >= '1' && c <= '9') x_de_letra = X_N1 + (c - '1') * 9; + // "0" is mapped after "9" in the game's font + // (it's mapped before "1" normally) + else if (c == '0') + x_de_letra = X_N0; else y_de_letra=Y_ACENTOS; if (c == '\240') x_de_letra=X_A; @@ -4033,8 +4037,12 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta x_de_letra = X_ASTERISCO_OPC; else if (c == '+') x_de_letra = X_PLUS_OPC; - else if (c >= '1' && c <= '0') + else if (c >= '1' && c <= '9') x_de_letra = X_N1_OPC + (c - '1') * 7; + // "0" is mapped after "9" in the game's font + // (it's mapped before "1" normally) + else if (c == '0') + x_de_letra = X_N0_OPC; } pos_texto[0] = x_de_letra; -- cgit v1.2.3 From 7ced1215d4ff1c668a91fce587d8a0b7d245f65e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 29 May 2008 17:58:56 +0000 Subject: Fixed a crash that occurs when OS starts svn-id: r32366 --- engines/cine/gfx.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index e20dd46c53..aa457fe4f9 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -795,6 +795,14 @@ void FWRenderer::drawInputBox(const char *info, const char *input, int cursor, i /*! \brief Fade to black */ void FWRenderer::fadeToBlack() { + // FIXME: _activeLowPal is invalid when starting Operation Stealth + // Adding this sanity check fixes a crash when the game + // starts, but I'm not sure if this is the best place to check it + if (!_activeLowPal) { + warning("_activeLowPal is invalid"); + return; + } + assert(_activeLowPal); for (int i = 0; i < 8; i++) { -- cgit v1.2.3 From 8363f1294a76f5434ad20a2ac679e4da585cb249 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 29 May 2008 18:09:12 +0000 Subject: More talk related simplifications svn-id: r32367 --- engines/drascula/animation.cpp | 66 +++++++++++++++++++++--------------------- engines/drascula/drascula.h | 1 + engines/drascula/talk.cpp | 6 ++++ 3 files changed, 40 insertions(+), 33 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index f01a427eb5..268c183a81 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -456,7 +456,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; - talk_tabernero(_textt[_lang][22], "T22.als"); + talk_tabernero(22); if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) break; @@ -658,26 +658,26 @@ void DrasculaEngine::animation_3_1() { loadPic("an11y13.alg"); decompressPic(dir_hare_dch, 1); - talk(_text[_lang][192], "192.als"); - talk_tabernero(_textt[_lang][1], "t1.als"); - talk(_text[_lang][193], "193.als"); - talk_tabernero(_textt[_lang][2], "t2.als"); - talk(_text[_lang][194], "194.als"); - talk_tabernero(_textt[_lang][3], "t3.als"); - talk(_text[_lang][195], "195.als"); - talk_tabernero(_textt[_lang][4], "t4.als"); - talk(_text[_lang][196], "196.als"); - talk_tabernero(_textt[_lang][5], "t5.als"); - talk_tabernero(_textt[_lang][6], "t6.als"); - talk(_text[_lang][197], "197.als"); - talk_tabernero(_textt[_lang][7], "t7.als"); - talk(_text[_lang][198], "198.als"); - talk_tabernero(_textt[_lang][8], "t8.als"); - talk(_text[_lang][199], "199.als"); - talk_tabernero(_textt[_lang][9], "t9.als"); - talk(_text[_lang][200], "200.als"); - talk(_text[_lang][201], "201.als"); - talk(_text[_lang][202], "202.als"); + talk(192); + talk_tabernero(1); + talk(193); + talk_tabernero(2); + talk(194); + talk_tabernero(3); + talk(195); + talk_tabernero(4); + talk(196); + talk_tabernero(5); + talk_tabernero(6); + talk(197); + talk_tabernero(7); + talk(198); + talk_tabernero(8); + talk(199); + talk_tabernero(9); + talk(200); + talk(201); + talk(202); flags[0] = 1; @@ -2675,13 +2675,13 @@ void DrasculaEngine::animation_11_2() { loadPic("an11y13.alg"); decompressPic(dir_hare_dch, 1); - talk(_text[_lang][352], "352.als"); - talk_tabernero(_textt[_lang][1], "T1.als"); - talk(_text[_lang][353], "353.als"); - talk_tabernero(_textt[_lang][17], "T17.als"); - talk(_text[_lang][354], "354.als"); - talk_tabernero(_textt[_lang][18], "T18.als"); - talk(_text[_lang][355], "355.als"); + talk(352); + talk_tabernero(1); + talk(353); + talk_tabernero(17); + talk(354); + talk_tabernero(18); + talk(355); pause(40); talk_tabernero("No, nada", "d82.als"); @@ -2879,11 +2879,11 @@ void DrasculaEngine::animation_36_2() { loadPic("an11y13.alg"); decompressPic(dir_hare_dch, 1); - talk(_text[_lang][404], "404.als"); - talk_tabernero(_textt[_lang][19], "T19.als"); - talk_tabernero(_textt[_lang][20], "T20.als"); - talk_tabernero(_textt[_lang][21], "T21.als"); - talk(_text[_lang][355], "355.als"); + talk(404); + talk_tabernero(19); + talk_tabernero(20); + talk_tabernero(21); + talk(355); pause(40); talk_tabernero("No, nada", "d82.als"); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index d01fab2de4..75261f7d09 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -492,6 +492,7 @@ public: void talk_dr_izq(const char *said, const char *filename); void talk_solo(const char *, const char *); void talk_igor_frente(const char *, const char *); + void talk_tabernero(int); void talk_tabernero(const char *said, const char *filename); void talk_igorpuerta(const char *said, const char *filename); void talk_igor_peluca(const char *said, const char *filename); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 3a6272e2a4..127dc983eb 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -355,6 +355,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } +void DrasculaEngine::talk_tabernero(int index) { + char name[20]; + sprintf(name, "t%i.als", index); + talk_tabernero(_textt[_lang][index], name); +} + void DrasculaEngine::talk_tabernero(const char *said, const char *filename) { int x_talk[9] = { 1, 23, 45, 67, 89, 111, 133, 155, 177 }; int cara; -- cgit v1.2.3 From 3a43916e2022210b4de9a865f44df67157a0e004 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 29 May 2008 18:18:38 +0000 Subject: ancho -> width alto -> height nuevo_ancho -> newWidth nuevo_alto -> newHeight suma_x -> totalX suma_y -> totalY Removed unneeded variables diferencia_x/diferencia_y svn-id: r32368 --- engines/drascula/drascula.cpp | 30 ++++++++++++++---------------- engines/drascula/drascula.h | 3 +-- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index f0adc6680d..3d80b28e6f 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -3529,23 +3529,23 @@ int DrasculaEngine::vez() { return _system->getMillis() / 20; // originaly was 1 } -void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int ancho, int alto, int factor, byte *dir_inicio, byte *dir_fin) { - float suma_x, suma_y; +void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int width, int height, int factor, byte *dir_inicio, byte *dir_fin) { + float totalX, totalY; int n, m; float pixel_x, pixel_y; int pos_pixel[6]; - nuevo_ancho = (ancho * factor) / 100; - nuevo_alto = (alto * factor) / 100; + newWidth = (width * factor) / 100; + newHeight = (height * factor) / 100; - suma_x = ancho / nuevo_ancho; - suma_y = alto / nuevo_alto; + totalX = width / newWidth; + totalY = height / newHeight; pixel_x = xx1; pixel_y = yy1; - for (n = 0; n < nuevo_alto; n++) { - for (m = 0; m < nuevo_ancho; m++) { + for (n = 0; n < newHeight; n++) { + for (m = 0; m < newWidth; m++) { pos_pixel[0] = (int)pixel_x; pos_pixel[1] = (int)pixel_y; pos_pixel[2] = xx2 + m; @@ -3555,10 +3555,10 @@ void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int a copyRectClip(pos_pixel, dir_inicio, dir_fin); - pixel_x = pixel_x + suma_x; + pixel_x = pixel_x + totalX; } pixel_x = xx1; - pixel_y = pixel_y + suma_y; + pixel_y = pixel_y + totalY; } } @@ -3706,12 +3706,10 @@ void DrasculaEngine::aumenta_num_frame() { } if (num_ejec != 2) { - diferencia_y = (int)(alto_hare - nuevo_alto); - diferencia_x = (int)(ancho_hare - nuevo_ancho); - hare_y = hare_y + diferencia_y; - hare_x = hare_x + diferencia_x; - alto_hare = (int)nuevo_alto; - ancho_hare = (int)nuevo_ancho; + hare_y += (int)(alto_hare - newHeight); + hare_x += (int)(ancho_hare - newWidth); + alto_hare = (int)newHeight; + ancho_hare = (int)newWidth; } } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 75261f7d09..1cceb377e3 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -325,8 +325,7 @@ public: int cambio_de_color; int rompo_y_salgo; int vb_x, sentido_vb, vb_se_mueve, frame_vb; - float nuevo_alto, nuevo_ancho; - int diferencia_x, diferencia_y; + float newHeight, newWidth; int factor_red[202]; int frame_piano; int frame_borracho; -- cgit v1.2.3 From 7833dd87a5f3247681d6f51e45ee2f6da1ab91fd Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Thu, 29 May 2008 20:32:27 +0000 Subject: Rewrote dimPalette() so that the dimming is now a "filter" between the Screen class and the backend, i.e. as far as the game engine is concerned the palette remains unchanged. (This is similar how to the SCUMM engine handles the "noir" mode in Sam & Max.) This is one small step towards allowing the game to be paused anywhere. svn-id: r32369 --- engines/sword2/palette.cpp | 35 +++++++++++++++++++++++------------ engines/sword2/screen.cpp | 2 ++ engines/sword2/screen.h | 5 ++++- engines/sword2/sword2.cpp | 22 +++------------------- engines/sword2/sword2.h | 1 - 5 files changed, 32 insertions(+), 33 deletions(-) diff --git a/engines/sword2/palette.cpp b/engines/sword2/palette.cpp index 1b9cd28d25..81f93c77ae 100644 --- a/engines/sword2/palette.cpp +++ b/engines/sword2/palette.cpp @@ -156,22 +156,17 @@ void Screen::setPalette(int16 startEntry, int16 noEntries, byte *colourTable, ui memcpy(&_palette[4 * startEntry], colourTable, noEntries * 4); if (fadeNow == RDPAL_INSTANT) { - _vm->_system->setPalette(_palette, startEntry, noEntries); + setSystemPalette(_palette, startEntry, noEntries); setNeedFullRedraw(); } } -void Screen::dimPalette() { - byte *p = _palette; - - for (int i = 0; i < 256; i++) { - p[i * 4 + 0] /= 2; - p[i * 4 + 1] /= 2; - p[i * 4 + 2] /= 2; +void Screen::dimPalette(bool dim) { + if (dim != _dimPalette) { + _dimPalette = dim; + setSystemPalette(_palette, 0, 256); + setNeedFullRedraw(); } - - _vm->_system->setPalette(p, 0, 256); - setNeedFullRedraw(); } /** @@ -269,8 +264,24 @@ void Screen::fadeServer() { } } - _vm->_system->setPalette(newPalette, 0, 256); + setSystemPalette(newPalette, 0, 256); setNeedFullRedraw(); } +void Screen::setSystemPalette(const byte *colors, uint start, uint num) { + const byte *palette; + + if (_dimPalette) { + byte pal[256 * 4]; + + for (uint i = start * 4; i < 4 * (start + num); i++) + pal[i] = colors[i] / 2; + + palette = pal; + } else + palette = colors; + + _vm->_system->setPalette(palette, start, num); +} + } // End of namespace Sword2 diff --git a/engines/sword2/screen.cpp b/engines/sword2/screen.cpp index 1f6eb1b22d..fdabb3ee6f 100644 --- a/engines/sword2/screen.cpp +++ b/engines/sword2/screen.cpp @@ -97,6 +97,8 @@ Screen::Screen(Sword2Engine *vm, int16 width, int16 height) { _renderAverageTime = 60; _layer = 0; + + _dimPalette = false; } Screen::~Screen() { diff --git a/engines/sword2/screen.h b/engines/sword2/screen.h index d59a6ef3df..93cc5e40ce 100644 --- a/engines/sword2/screen.h +++ b/engines/sword2/screen.h @@ -350,6 +350,8 @@ private: uint16 _layer; + bool _dimPalette; + public: Screen(Sword2Engine *vm, int16 width, int16 height); ~Screen(); @@ -400,11 +402,12 @@ public: void setFullPalette(int32 palRes); void setPalette(int16 startEntry, int16 noEntries, byte *palette, uint8 setNow); + void setSystemPalette(const byte *colors, uint start, uint num); uint8 quickMatch(uint8 r, uint8 g, uint8 b); int32 fadeUp(float time = 0.75); int32 fadeDown(float time = 0.75); uint8 getFadeStatus(); - void dimPalette(); + void dimPalette(bool dim); void waitForFade(); void fadeServer(); diff --git a/engines/sword2/sword2.cpp b/engines/sword2/sword2.cpp index 26fd598d9d..7331d1f761 100644 --- a/engines/sword2/sword2.cpp +++ b/engines/sword2/sword2.cpp @@ -225,7 +225,6 @@ Sword2Engine::Sword2Engine(OSystem *syst) : Engine(syst) { #endif _gamePaused = false; - _graphicsLevelFudged = false; _gameCycle = 0; _gameSpeed = 1; @@ -701,22 +700,14 @@ void Sword2Engine::pauseEngineIntern(bool pause) { _sound->pauseAllSound(); _mouse->pauseEngine(true); - // If render level is at max, turn it down because palette- - // matching won't work when the palette is dimmed. - - if (_screen->getRenderLevel() == 3) { - _screen->setRenderLevel(2); - _graphicsLevelFudged = true; - } - #ifdef SWORD2_DEBUG // Don't dim it if we're single-stepping through frames // dim the palette during the pause if (!_stepOneCycle) - _screen->dimPalette(); + _screen->dimPalette(true); #else - _screen->dimPalette(); + _screen->dimPalette(true); #endif _gamePaused = true; @@ -724,14 +715,7 @@ void Sword2Engine::pauseEngineIntern(bool pause) { _mouse->pauseEngine(false); _sound->unpauseAllSound(); - // Put back game screen palette; see screen.cpp - _screen->setFullPalette(-1); - - // If graphics level at max, turn up again - if (_graphicsLevelFudged) { - _screen->setRenderLevel(3); - _graphicsLevelFudged = false; - } + _screen->dimPalette(false); _gamePaused = false; diff --git a/engines/sword2/sword2.h b/engines/sword2/sword2.h index ba59772a71..05c5d7fa47 100644 --- a/engines/sword2/sword2.h +++ b/engines/sword2/sword2.h @@ -207,7 +207,6 @@ public: uint32 findBufferSize(); bool _gamePaused; - bool _graphicsLevelFudged; void startGame(); void gameCycle(); -- cgit v1.2.3 From 5396cd5dedd039fa40b46ef0f86cd757de4de259 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 29 May 2008 20:35:15 +0000 Subject: Cleanup svn-id: r32370 --- engines/drascula/drascula.cpp | 52 ++++++++++--------------------------------- 1 file changed, 12 insertions(+), 40 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 3d80b28e6f..3faede05f6 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1939,48 +1939,20 @@ void DrasculaEngine::FundeDelNegro(int VelocidadDeFundido) { void DrasculaEngine::color_abc(int cl) { _color = cl; - if (cl == 0) { - gamePalette[254][0] = 0; - gamePalette[254][1] = 0; - gamePalette[254][2] = 0; - } else if (cl == 1) { - gamePalette[254][0] = 0x10; - gamePalette[254][1] = 0x3E; - gamePalette[254][2] = 0x28; - } else if (cl == 3) { - gamePalette[254][0] = 0x16; - gamePalette[254][1] = 0x3F; - gamePalette[254][2] = 0x16; - } else if (cl == 4) { - gamePalette[254][0] = 0x9; - gamePalette[254][1] = 0x3F; - gamePalette[254][2] = 0x12; - } else if (cl == 5) { - gamePalette[254][0] = 0x3F; - gamePalette[254][1] = 0x3F; - gamePalette[254][2] = 0x15; - } else if (cl == 7) { - gamePalette[254][0] = 0x38; - gamePalette[254][1] = 0; - gamePalette[254][2] = 0; - } else if (cl == 8) { - gamePalette[254][0] = 0x3F; - gamePalette[254][1] = 0x27; - gamePalette[254][2] = 0x0B; - } else if (cl == 9) { - gamePalette[254][0] = 0x2A; - gamePalette[254][1] = 0; - gamePalette[254][2] = 0x2A; - } else if (cl == 10) { - gamePalette[254][0] = 0x30; - gamePalette[254][1] = 0x30; - gamePalette[254][2] = 0x30; - } else if (cl == 11) { - gamePalette[254][0] = 98; - gamePalette[254][1] = 91; - gamePalette[254][2] = 100; + char colorTable[][3] = { + { 0, 0, 0 }, { 0x10, 0x3E, 0x28 }, + { 0, 0, 0 }, // unused + { 0x16, 0x3F, 0x16 }, { 0x09, 0x3F, 0x12 }, + { 0x3F, 0x3F, 0x15 }, + { 0, 0, 0 }, // unused + { 0x38, 0, 0 }, { 0x3F, 0x27, 0x0B }, + { 0x2A, 0, 0x2A }, { 0x30, 0x30, 0x30 }, + { 98, 91, 100 } }; + for (int i = 0; i <= 2; i++) + gamePalette[254][i] = colorTable[cl][i]; + setPalette((byte *)&gamePalette); } -- cgit v1.2.3 From b7deac38b3a529701a9c4866062e1db2db6214c4 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Thu, 29 May 2008 22:07:25 +0000 Subject: Added check in modifyObjectParam's start (Verified with FW & OS PC versions' disassemblies). Also removed superfluous default-case, hopefully no compiler will complain about this :). svn-id: r32371 --- engines/cine/object.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/cine/object.cpp b/engines/cine/object.cpp index d7b4b853ae..7666f05352 100644 --- a/engines/cine/object.cpp +++ b/engines/cine/object.cpp @@ -185,6 +185,10 @@ void addObjectParam(byte objIdx, byte paramIdx, int16 newValue) { } void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue) { + // Operation Stealth checks object index range, Future Wars doesn't. + if (g_cine->getGameType() == Cine::GType_OS && objIdx >= NUM_MAX_OBJECT) + return; + switch (paramIdx) { case 1: objectTable[objIdx].x = newValue; @@ -214,8 +218,6 @@ void modifyObjectParam(byte objIdx, byte paramIdx, int16 newValue) { case 6: objectTable[objIdx].part = newValue; break; - default: // No-operation - break; } } -- cgit v1.2.3 From 92bf1817cbba8f461fd910166c0fea6040afc622 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 29 May 2008 22:34:03 +0000 Subject: Loads of Spanish translations with the help of timofonic (thanks!). Unified some variable styles svn-id: r32372 --- engines/drascula/animation.cpp | 516 ++++++++++++------------- engines/drascula/drascula.cpp | 844 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 135 ++++--- engines/drascula/rooms.cpp | 290 +++++++------- engines/drascula/talk.cpp | 182 ++++----- 5 files changed, 983 insertions(+), 984 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 268c183a81..507ab36da5 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -37,52 +37,52 @@ void DrasculaEngine::animation_1_1() { while (term_int == 0) { playMusic(29); fliplay("logoddm.bin", 9); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; delay(600); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); delay(340); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; playMusic(26); delay(500); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; fliplay("logoalc.bin", 8); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); loadPic("cielo.alg"); decompressPic(dir_zona_pantalla, 256); black(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - FundeDelNegro(2); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + fadeFromBlack(2); + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; delay(900); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; color_abc(RED); - centra_texto(_textmisc[_lang][1], 160, 100); + centerText(_textmisc[_lang][1], 160, 100); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; delay(1000); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; delay(1200); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; fliplay("scrollb.bin", 9); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); playSound("s5.als"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (anima("scr2.bin", 17)) break; @@ -92,10 +92,10 @@ void DrasculaEngine::animation_1_1() { loadPic("cielo2.alg"); decompressPic(dir_zona_pantalla, 256); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - FundeAlNegro(1); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + fadeToBlack(1); + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); @@ -109,10 +109,10 @@ void DrasculaEngine::animation_1_1() { decompressPic(dir_dibujo2, 1); playMusic(4); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; delay(400); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; for (l2 = 0; l2 < 3; l2++) @@ -120,13 +120,13 @@ void DrasculaEngine::animation_1_1() { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); copyBackground(interf_x[l], interf_y[l], 156, 45, 63, 31, dir_dibujo2, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - if (getscan() == Common::KEYCODE_ESCAPE) { + if (getScan() == Common::KEYCODE_ESCAPE) { term_int = 1; break; } pause(3); } - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; l2 = 0; p = 0; @@ -151,17 +151,17 @@ void DrasculaEngine::animation_1_1() { } if (l2 == 7) l2 = 0; - if (getscan() == Common::KEYCODE_ESCAPE) { + if (getScan() == Common::KEYCODE_ESCAPE) { term_int = 1; break; } } - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; copyBackground(0, 0, 0, 0, 320, 200, dir_zona_pantalla, dir_dibujo1); talk_dr_grande(_textd[_lang][1], "D1.als"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); @@ -180,21 +180,21 @@ void DrasculaEngine::animation_1_1() { y_igor = 97; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk_igor_dch(8); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk_dr_izq(2); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_dr_izq(3); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (anima("lib.bin", 16)) break; @@ -207,13 +207,13 @@ void DrasculaEngine::animation_1_1() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(10); talk_solo(_textd[_lang][4],"d4.als"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; loadPic("plan1.alg"); decompressPic(dir_zona_pantalla, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk_solo(_textd[_lang][5], "d5.als"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (anima("lib2.bin", 16)) break; @@ -223,7 +223,7 @@ void DrasculaEngine::animation_1_1() { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(20); talk_solo(_textd[_lang][6], "d6.als"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (anima("lib2.bin", 16)) break; @@ -232,36 +232,36 @@ void DrasculaEngine::animation_1_1() { decompressPic(dir_zona_pantalla, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(20); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_solo(_textd[_lang][7], "d7.als"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; loadPic("plan3.alg"); decompressPic(dir_zona_pantalla, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk_solo(_textd[_lang][8], "d8.als"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); loadPic("100.alg"); decompressPic(dir_dibujo1, HALF_PAL); MusicFadeout(); stopMusic(); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_igor_dch(9); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_dr_izq(9); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_igor_dch(10); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; playMusic(11); talk_dr_izq(10); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (anima("rayo1.bin", 16)) break; @@ -278,89 +278,89 @@ void DrasculaEngine::animation_1_1() { clearRoom(); black(); playMusic(23); - FundeDelNegro(0); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + fadeFromBlack(0); + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 1; talk_igor_dch(1); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_dr_dch(11); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(1); sentido_dr = 0; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk_dr_izq(12); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(1); sentido_dr = 1; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk_igor_dch(2); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(13); talk_dr_dch(13); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(1); sentido_dr = 0; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk_dr_izq(14); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_igor_dch(3); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_dr_izq(15); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_igor_dch(4); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_dr_izq(16); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_igor_dch(5); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_igor = 3; talk_dr_izq(17); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(18); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_igor_frente(_texti[_lang][6], "I6.als"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - FundeAlNegro(0); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + fadeToBlack(0); + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); @@ -408,13 +408,13 @@ bucless: l = 0; if (withVoices == 0) - centra_texto(said, 191, 69); + centerText(said, 191, 69); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - byte key = getscan(); + byte key = getScan(); if (key == Common::KEYCODE_ESCAPE) term_int = 1; @@ -442,7 +442,7 @@ void DrasculaEngine::animation_2_1() { term_int = 0; for (;;) { - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (anima("ag.bin", 14)) @@ -453,11 +453,11 @@ void DrasculaEngine::animation_2_1() { loadPic("an11y13.alg"); decompressPic(dir_hare_dch, 1); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_tabernero(22); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (_lang == kSpanish) @@ -465,56 +465,56 @@ void DrasculaEngine::animation_2_1() { loadPic("97.alg"); decompressPic(dir_hare_dch, 1); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(4); playSound("s1.als"); - hipo(18); + hiccup(18); stopSound(); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); stopMusic(); - corta_musica = 1; + musicStopped = 1; memset(dir_zona_pantalla, 0, 64000); color_solo = WHITE; pause(80); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_solo(_textbj[_lang][1], "BJ1.als"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); loadPic("bj.alg"); decompressPic(dir_zona_pantalla, HALF_PAL); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; black(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - FundeDelNegro(1); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + fadeFromBlack(1); + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; color_solo = YELLOW; talk_solo(_text[_lang][214], "214.als"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); loadPic("16.alg"); decompressPic(dir_dibujo1, HALF_PAL); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; loadPic("auxbj.alg"); decompressPic(dir_dibujo3, 1); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; roomNumber = 16; - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; for (l = 0; l < 200; l++) factor_red[l] = 99; @@ -525,19 +525,19 @@ void DrasculaEngine::animation_2_1() { hare_y = 95; sentido_hare = 1; hare_se_ve = 1; - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; loadPic("97g.alg"); decompressPic(dir_hare_dch, 1); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (anima("lev.bin", 15)) break; lleva_al_hare(100 + ancho_hare / 2, 99 + alto_hare); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_hare = 1; hare_x = 100; @@ -566,49 +566,49 @@ void DrasculaEngine::animation_2_1() { break; playMusic(9); loadPic("97.alg"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; decompressPic(dir_hare_dch, 1); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(120); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_solo(_text[_lang][223], "223.als"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; color_solo = WHITE; updateRoom(); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(110); talk_solo(_textbj[_lang][11], "BJ11.als"); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateRoom(); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(118); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; lleva_al_hare(132, 97 + alto_hare); pause(60); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk(224); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_bj(12); lleva_al_hare(157, 98 + alto_hare); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (anima("bes.bin", 16)) break; @@ -625,28 +625,28 @@ void DrasculaEngine::animation_2_1() { // Also check animation_9_6(), where the same hack was used by // the original roomNumber = -1; - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(8); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk(225); pause(76); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_hare = 1; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk(226); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(30); - if ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)) + if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk(227); - FundeAlNegro(0); + fadeToBlack(0); break; } } @@ -838,15 +838,15 @@ void DrasculaEngine::animation_4_2() { pause(8); clearRoom(); - loadPic("ciego1.alg"); + loadPic("blind1.alg"); decompressPic(dir_dibujo1, HALF_PAL); - loadPic("ciego2.alg"); + loadPic("blind2.alg"); decompressPic(dir_dibujo3, 1); - loadPic("ciego3.alg"); + loadPic("blind3.alg"); decompressPic(dir_hare_dch, 1); - loadPic("ciego4.alg"); + loadPic("blind4.alg"); decompressPic(dir_hare_fondo, 1); - loadPic("ciego5.alg"); + loadPic("blind5.alg"); decompressPic(dir_hare_frente, 1); if (_lang == kSpanish) @@ -857,30 +857,30 @@ void DrasculaEngine::animation_4_2() { pause(10); - talk_ciego(_textd[_lang][68], "d68.als", _textd1[_lang][68 - TEXTD_START]); + talk_blind(_textd[_lang][68], "d68.als", _textd1[_lang][68 - TEXTD_START]); pause(5); talk_hacker(_textd[_lang][57], "d57.als"); pause(6); - talk_ciego(_textd[_lang][69],"d69.als", _textd1[_lang][69 - TEXTD_START]); + talk_blind(_textd[_lang][69],"d69.als", _textd1[_lang][69 - TEXTD_START]); pause(4); talk_hacker(_textd[_lang][58],"d58.als"); - talk_ciego(_textd[_lang][70],"d70.als", _textd1[_lang][70 - TEXTD_START]); + talk_blind(_textd[_lang][70],"d70.als", _textd1[_lang][70 - TEXTD_START]); delay(14); talk_hacker(_textd[_lang][59],"d59.als"); - talk_ciego(_textd[_lang][71],"d71.als", _textd1[_lang][71 - TEXTD_START]); + talk_blind(_textd[_lang][71],"d71.als", _textd1[_lang][71 - TEXTD_START]); talk_hacker(_textd[_lang][60],"d60.als"); - talk_ciego(_textd[_lang][72],"d72.als", _textd1[_lang][72 - TEXTD_START]); + talk_blind(_textd[_lang][72],"d72.als", _textd1[_lang][72 - TEXTD_START]); talk_hacker(_textd[_lang][61],"d61.als"); - talk_ciego(_textd[_lang][73],"d73.als", _textd1[_lang][73 - TEXTD_START]); + talk_blind(_textd[_lang][73],"d73.als", _textd1[_lang][73 - TEXTD_START]); talk_hacker(_textd[_lang][62],"d62.als"); - talk_ciego(_textd[_lang][74],"d74.als", _textd1[_lang][74 - TEXTD_START]); + talk_blind(_textd[_lang][74],"d74.als", _textd1[_lang][74 - TEXTD_START]); talk_hacker(_textd[_lang][63],"d63.als"); - talk_ciego(_textd[_lang][75],"d75.als", _textd1[_lang][75 - TEXTD_START]); + talk_blind(_textd[_lang][75],"d75.als", _textd1[_lang][75 - TEXTD_START]); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); _system->delayMillis(1000); talk_hacker(_textd[_lang][64], "d64.als"); - talk_ciego(_textd[_lang][76], "d76.als", _textd1[_lang][76 - TEXTD_START]); + talk_blind(_textd[_lang][76], "d76.als", _textd1[_lang][76 - TEXTD_START]); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -967,7 +967,7 @@ void DrasculaEngine::animation_14_2() { decompressPic(dir_dibujo1, 1); playSound("s7.als"); - hipo(15); + hiccup(15); stopSound(); @@ -976,17 +976,17 @@ void DrasculaEngine::animation_14_2() { } void DrasculaEngine::animation_15_2() { - talk_borracho(_textb[_lang][8], "B8.als"); + talk_drunk(_textb[_lang][8], "B8.als"); pause(7); - talk_borracho(_textb[_lang][9], "B9.als"); - talk_borracho(_textb[_lang][10], "B10.als"); - talk_borracho(_textb[_lang][11], "B11.als"); + talk_drunk(_textb[_lang][9], "B9.als"); + talk_drunk(_textb[_lang][10], "B10.als"); + talk_drunk(_textb[_lang][11], "B11.als"); } void DrasculaEngine::animation_16_2() { int l; - talk_borracho(_textb[_lang][12], "B12.als"); + talk_drunk(_textb[_lang][12], "B12.als"); talk(_text[_lang][371], "371.als"); clearRoom(); @@ -996,7 +996,7 @@ void DrasculaEngine::animation_16_2() { else playMusic(32); - int key = getscan(); + int key = getScan(); if (key != 0) goto asco; @@ -1012,14 +1012,14 @@ void DrasculaEngine::animation_16_2() { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); if (_lang != kSpanish) - centra_texto(_texthis[_lang][1], 180, 180); + centerText(_texthis[_lang][1], 180, 180); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); if (_lang == kSpanish) - FundeDelNegro(1); + fadeFromBlack(1); - key = getscan(); + key = getScan(); if (key != 0) goto asco; @@ -1028,12 +1028,12 @@ void DrasculaEngine::animation_16_2() { else _system->delayMillis(4000); - key = getscan(); + key = getScan(); if (key != 0) goto asco; - FundeAlNegro(1); - key = getscan(); + fadeToBlack(1); + key = getScan(); if (key != 0) goto asco; @@ -1043,10 +1043,10 @@ void DrasculaEngine::animation_16_2() { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); if (_lang != kSpanish) - centra_texto(_texthis[_lang][2], 180, 180); + centerText(_texthis[_lang][2], 180, 180); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - key = getscan(); + key = getScan(); if (key != 0) goto asco; @@ -1055,12 +1055,12 @@ void DrasculaEngine::animation_16_2() { else _system->delayMillis(4000); - key = getscan(); + key = getScan(); if (key != 0) goto asco; - FundeAlNegro(1); - key = getscan(); + fadeToBlack(1); + key = getScan(); if (key != 0) goto asco; @@ -1070,10 +1070,10 @@ void DrasculaEngine::animation_16_2() { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); if (_lang != kSpanish) - centra_texto(_texthis[_lang][3], 180, 180); + centerText(_texthis[_lang][3], 180, 180); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - key = getscan(); + key = getScan(); if (key != 0) goto asco; @@ -1082,11 +1082,11 @@ void DrasculaEngine::animation_16_2() { else _system->delayMillis(4000); - key = getscan(); + key = getScan(); if (key != 0) goto asco; - FundeAlNegro(1); + fadeToBlack(1); clearRoom(); loadPic("his4_1.alg"); @@ -1097,10 +1097,10 @@ void DrasculaEngine::animation_16_2() { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo3, dir_zona_pantalla); if (_lang != kSpanish) - centra_texto(_texthis[_lang][1], 180, 180); + centerText(_texthis[_lang][1], 180, 180); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - key = getscan(); + key = getScan(); if (key != 0) goto asco; @@ -1109,7 +1109,7 @@ void DrasculaEngine::animation_16_2() { else _system->delayMillis(4000); - key = getscan(); + key = getScan(); if (key != 0) goto asco; @@ -1117,13 +1117,13 @@ void DrasculaEngine::animation_16_2() { copyBackground(0, 0, 0, l, 320, 200 - l, dir_dibujo3, dir_zona_pantalla); copyBackground(0, 200 - l, 0, 0, 320, l, dir_dibujo1, dir_zona_pantalla); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - key = getscan(); + key = getScan(); if (key != 0) goto asco; } pause(5); - FundeAlNegro(2); + fadeToBlack(2); clearRoom(); asco: @@ -1136,7 +1136,7 @@ asco: black(); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - FundeDelNegro(0); + fadeFromBlack(0); if (roomMusic != 0) playMusic(roomMusic); else @@ -1144,8 +1144,8 @@ asco: } void DrasculaEngine::animation_17_2() { - talk_borracho(_textb[_lang][13], "B13.als"); - talk_borracho(_textb[_lang][14], "B14.als"); + talk_drunk(_textb[_lang][13], "B13.als"); + talk_drunk(_textb[_lang][14], "B14.als"); flags[40] = 1; } @@ -1171,9 +1171,9 @@ void DrasculaEngine::animation_20_2() { flags[18] = 0; flags[14] = 1; openDoor(15, 1); - sal_de_la_habitacion(1); + exitRoom(1); animation_23_2(); - sal_de_la_habitacion(0); + exitRoom(0); flags[21] = 0; flags[24] = 0; sentido_vb = 1; @@ -1228,11 +1228,11 @@ void DrasculaEngine::animation_23_2() { talk_vb(19); if (flags[25] == 0) { talk_vb(20); - if (resta_objeto(7) == 0) + if (removeObject(7) == 0) flags[30] = 1; - if (resta_objeto(18) == 0) + if (removeObject(18) == 0) flags[31] = 1; - if (resta_objeto(19) == 0) + if (removeObject(19) == 0) flags[32] = 1; } talk_vb(21); @@ -1331,17 +1331,17 @@ void DrasculaEngine::animation_27_2() { flags[22] = 1; withoutVerb(); - resta_objeto(23); - suma_objeto(11); + removeObject(23); + addObject(11); talk_vb(23); talk_vb(24); if (flags[30] == 1) - suma_objeto(7); + addObject(7); if (flags[31] == 1) - suma_objeto(18); + addObject(18); if (flags[32] == 1) - suma_objeto(19); + addObject(19); talk_vb(25); talk_vb(26); } @@ -1429,12 +1429,12 @@ void DrasculaEngine::animation_31_2() { flags[38] = 0; flags[36] = 1; withoutVerb(); - resta_objeto(8); - resta_objeto(13); - resta_objeto(15); - resta_objeto(16); - resta_objeto(17); - suma_objeto(20); + removeObject(8); + removeObject(13); + removeObject(15); + removeObject(16); + removeObject(17); + addObject(20); } void DrasculaEngine::animation_35_2() { @@ -1500,7 +1500,7 @@ void DrasculaEngine::animation_35_2() { pause(10); - FundeAlNegro(2); + fadeToBlack(2); } void DrasculaEngine::animation_1_3() { @@ -1825,37 +1825,37 @@ void DrasculaEngine::animation_rayo() { } void DrasculaEngine::animation_2_4() { - talk_igor_sentado(_texti[_lang][16], "I16.als"); + talk_igor_seated(_texti[_lang][16], "I16.als"); talk(_text[_lang][278], "278.als"); - talk_igor_sentado(_texti[_lang][17], "I17.als"); + talk_igor_seated(_texti[_lang][17], "I17.als"); talk(_text[_lang][279], "279.als"); - talk_igor_sentado(_texti[_lang][18], "I18.als"); + talk_igor_seated(_texti[_lang][18], "I18.als"); } void DrasculaEngine::animation_3_4() { - talk_igor_sentado(_texti[_lang][19], "I19.als"); - talk_igor_sentado(_texti[_lang][20], "I20.als"); + talk_igor_seated(_texti[_lang][19], "I19.als"); + talk_igor_seated(_texti[_lang][20], "I20.als"); talk(_text[_lang][281], "281.als"); } void DrasculaEngine::animation_4_4() { talk(_text[_lang][287], "287.als"); - talk_igor_sentado(_texti[_lang][21], "I21.als"); + talk_igor_seated(_texti[_lang][21], "I21.als"); talk(_text[_lang][284], "284.als"); - talk_igor_sentado(_texti[_lang][22], "I22.als"); + talk_igor_seated(_texti[_lang][22], "I22.als"); talk(_text[_lang][285], "285.als"); - talk_igor_sentado(_texti[_lang][23], "I23.als"); + talk_igor_seated(_texti[_lang][23], "I23.als"); } void DrasculaEngine::animation_7_4() { black(); talk(_text[_lang][427], "427.als"); - FundeDelNegro(1); - resta_objeto(8); - resta_objeto(10); - resta_objeto(12); - resta_objeto(16); - suma_objeto(17); + fadeFromBlack(1); + removeObject(8); + removeObject(10); + removeObject(12); + removeObject(16); + addObject(17); flags[30] = 0; flags[29] = 0; } @@ -1879,9 +1879,9 @@ void DrasculaEngine::animation_1_5() { talk(438); sitio_x = 120; sitio_y = 157; - anda_a_objeto = 1; + walkToObject = 1; sentido_final = 1; - empieza_andar(); + startWalking(); talk_bj(21); for (;;) { @@ -1897,7 +1897,7 @@ void DrasculaEngine::animation_1_5() { } sentido_hare = 1; - conversa("op_8.cal"); + converse("op_8.cal"); } void DrasculaEngine::animation_2_5() { @@ -1915,20 +1915,20 @@ void DrasculaEngine::animation_4_5() { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk(_text[_lang][228], "228.als"); - talk_lobo(_textl[_lang][1], "L1.als"); - talk_lobo(_textl[_lang][2], "L2.als"); + talk_wolf(_textl[_lang][1], "L1.als"); + talk_wolf(_textl[_lang][2], "L2.als"); pause(23); talk(_text[_lang][229], "229.als"); - talk_lobo(_textl[_lang][3], "L3.als"); - talk_lobo(_textl[_lang][4], "L4.als"); + talk_wolf(_textl[_lang][3], "L3.als"); + talk_wolf(_textl[_lang][4], "L4.als"); talk(_text[_lang][230], "230.als"); - talk_lobo(_textl[_lang][5], "L5.als"); + talk_wolf(_textl[_lang][5], "L5.als"); talk(_text[_lang][231], "231.als"); - talk_lobo(_textl[_lang][6], "L6.als"); - talk_lobo(_textl[_lang][7], "L7.als"); + talk_wolf(_textl[_lang][6], "L6.als"); + talk_wolf(_textl[_lang][7], "L7.als"); pause(33); talk(_text[_lang][232], "232.als"); - talk_lobo(_textl[_lang][8], "L8.als"); + talk_wolf(_textl[_lang][8], "L8.als"); } void DrasculaEngine::animation_5_5(){ @@ -1940,7 +1940,7 @@ void DrasculaEngine::animation_5_5(){ int pixel_x = hare_x - 53, pixel_y = hare_y - 9; withoutVerb(); - resta_objeto(8); + removeObject(8); lleva_al_hare(hare_x - 19, hare_y + alto_hare); sentido_hare = 1; @@ -2016,38 +2016,38 @@ void DrasculaEngine::animation_5_5(){ } void DrasculaEngine::animation_6_5() { - talk_lobo(_textl[_lang][9], "L9.als"); + talk_wolf(_textl[_lang][9], "L9.als"); talk(_text[_lang][234], "234.als"); } void DrasculaEngine::animation_7_5() { - talk_lobo(_textl[_lang][10], "L10.als"); + talk_wolf(_textl[_lang][10], "L10.als"); talk(_text[_lang][236], "236.als"); - talk_lobo(_textl[_lang][11], "L11.als"); - talk_lobo(_textl[_lang][12], "L12.als"); - talk_lobo(_textl[_lang][13], "L13.als"); + talk_wolf(_textl[_lang][11], "L11.als"); + talk_wolf(_textl[_lang][12], "L12.als"); + talk_wolf(_textl[_lang][13], "L13.als"); pause(34); - talk_lobo(_textl[_lang][14], "L14.als"); + talk_wolf(_textl[_lang][14], "L14.als"); } void DrasculaEngine::animation_8_5() { - talk_lobo(_textl[_lang][15], "L15.als"); + talk_wolf(_textl[_lang][15], "L15.als"); talk(_text[_lang][238], "238.als"); - talk_lobo(_textl[_lang][16], "L16.als"); + talk_wolf(_textl[_lang][16], "L16.als"); } void DrasculaEngine::animation_9_5() { flags[4] = 1; talk(_text[_lang][401], "401.als"); withoutVerb(); - resta_objeto(15); + removeObject(15); } void DrasculaEngine::animation_10_5() { flags[3] = 1; talk(_text[_lang][401], "401.als"); withoutVerb(); - resta_objeto(12); + removeObject(12); } void DrasculaEngine::animation_11_5() { @@ -2154,7 +2154,7 @@ void DrasculaEngine::animation_12_5() { animation_13_5(); playSound("s1.als"); - hipo(12); + hiccup(12); stopSound(); loadPic("99.alg"); @@ -2170,7 +2170,7 @@ void DrasculaEngine::animation_12_5() { sentido_hare = 1; hare_se_mueve = 0; hare_x = -1; - obj_saliendo = 104; + objExit = 104; withoutVerb(); carga_escoba("57.ald"); } @@ -2237,7 +2237,7 @@ void DrasculaEngine::animation_14_5() { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); talk_solo(_textd[_lang][18], "d18.als"); - FundeAlNegro(1); + fadeToBlack(1); } void DrasculaEngine::animation_15_5() { @@ -2280,7 +2280,7 @@ void DrasculaEngine::animation_1_6() { talk_dr_dch(22); talk(249); talk_dr_dch(23); - conversa("op_11.cal"); + converse("op_11.cal"); talk_dr_dch(26); anima("fum.bin", 15); @@ -2290,7 +2290,7 @@ void DrasculaEngine::animation_1_6() { talk_dr_dch(28); talk(255); talk_dr_dch(29); - FundeAlNegro(1); + fadeToBlack(1); clearRoom(); loadPic("time1.alg"); decompressPic(dir_zona_pantalla, 1); @@ -2302,11 +2302,11 @@ void DrasculaEngine::animation_1_6() { flags[0] = 0; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - FundeDelNegro(1); + fadeFromBlack(1); talk(256); talk_dr_dch(30); talk(257); - FundeAlNegro(0); + fadeToBlack(0); clearRoom(); loadPic("time1.alg"); decompressPic(dir_zona_pantalla,1); @@ -2316,7 +2316,7 @@ void DrasculaEngine::animation_1_6() { black(); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - FundeDelNegro(1); + fadeFromBlack(1); talk(258); talk_dr_dch(31); animation_5_6(); @@ -2334,7 +2334,7 @@ void DrasculaEngine::animation_1_6() { clearRoom(); carga_escoba("102.ald"); - activa_pendulo(); + activatePendulum(); } void DrasculaEngine::animation_2_6() { @@ -2380,7 +2380,7 @@ void DrasculaEngine::animation_6_6() { anima("rct.bin", 11); clearRoom(); withoutVerb(); - resta_objeto(20); + removeObject(20); loadPic("96.alg"); decompressPic(dir_hare_frente, 1); loadPic("97.alg"); @@ -2390,7 +2390,7 @@ void DrasculaEngine::animation_6_6() { loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); rompo = 1; - obj_saliendo = 104; + objExit = 104; hare_x = -1; withoutVerb(); carga_escoba("58.ald"); @@ -2416,10 +2416,10 @@ void DrasculaEngine::animation_9_6() { playMusic(13); flags[5] = 1; anima("drf.bin", 16); - FundeAlNegro(0); + fadeToBlack(0); clearRoom(); hare_x = -1; - obj_saliendo = 108; + objExit = 108; carga_escoba("59.ald"); // The room number was originally changed here to "nada.alg", // which is a non-existant file. In reality, this was just a @@ -2436,7 +2436,7 @@ void DrasculaEngine::animation_9_6() { hare_x -= 21; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - FundeDelNegro(0); + fadeFromBlack(0); pause(96); lleva_al_hare(116, 178); sentido_hare = 2; @@ -2478,7 +2478,7 @@ void DrasculaEngine::animation_9_6() { v_cd = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16; v_cd = v_cd + 4; playMusic(17); - FundeAlNegro(1); + fadeToBlack(1); clearRoom(); fliplay("qpc.bin", 1); MusicFadeout(); @@ -2520,7 +2520,7 @@ void DrasculaEngine::animation_13_6() { void DrasculaEngine::animation_14_6() { talk_taber2(_textt[_lang][24], "t24.als"); - suma_objeto(21); + addObject(21); flags[10] = 1; rompo_y_salgo = 1; } @@ -2532,7 +2532,7 @@ void DrasculaEngine::animation_15_6() { void DrasculaEngine::animation_18_6() { flags[6] = 1; withoutVerb(); - resta_objeto(21); + removeObject(21); anima("beb.bin", 10); } @@ -2579,7 +2579,7 @@ void DrasculaEngine::animation_12_2() { flags[11] = 1; talk_pianista(_textp[_lang][5], "P5.als"); - conversa("op_1.cal"); + converse("op_1.cal"); if (_lang == kSpanish) dir_texto = dir_hare_dch; @@ -2656,7 +2656,7 @@ void DrasculaEngine::animation_26_2() { } pickObject(11); - resta_objeto(12); + removeObject(12); if (_lang == kSpanish) dir_texto = dir_hare_dch; @@ -2698,17 +2698,17 @@ void DrasculaEngine::animation_13_2() { if (flags[41] == 0) { talk(_text[_lang][103], "103.als"); - talk_borracho(_textb[_lang][4], "B4.als"); + talk_drunk(_textb[_lang][4], "B4.als"); flags[12] = 1; talk(_text[_lang][367], "367.als"); - talk_borracho(_textb[_lang][5], "B5.als"); + talk_drunk(_textb[_lang][5], "B5.als"); flags[12] = 1; talk(_text[_lang][368], "368.als"); - talk_borracho(_textb[_lang][6], "B6.als"); - talk_borracho(_textb[_lang][7], "B7.als"); + talk_drunk(_textb[_lang][6], "B6.als"); + talk_drunk(_textb[_lang][7], "B7.als"); flags[41] = 1; } - conversa("op_2.cal"); + converse("op_2.cal"); loadPic("964.alg"); decompressPic(dir_hare_frente, 1); @@ -2717,7 +2717,7 @@ void DrasculaEngine::animation_13_2() { void DrasculaEngine::animation_18_2() { talk(378); talk_vbpuerta(4); - conversa("op_3.cal"); + converse("op_3.cal"); } void DrasculaEngine::animation_22_2() { @@ -2759,11 +2759,11 @@ void DrasculaEngine::animation_24_2() { talk_vb(22); if (flags[22] == 0) - conversa("op_4.cal"); + converse("op_4.cal"); else - conversa("op_5.cal"); + converse("op_5.cal"); - sal_de_la_habitacion(0); + exitRoom(0); flags[21] = 0; flags[24] = 0; sentido_vb = 1; @@ -3261,15 +3261,15 @@ void DrasculaEngine::animation_6_2() { dir_texto = dir_hare_frente; clearRoom(); - loadPic("ciego1.alg"); + loadPic("blind1.alg"); decompressPic(dir_dibujo1, HALF_PAL); - loadPic("ciego2.alg"); + loadPic("blind2.alg"); decompressPic(dir_dibujo3, 1); - loadPic("ciego3.alg"); + loadPic("blind3.alg"); decompressPic(dir_hare_dch, 1); - loadPic("ciego4.alg"); + loadPic("blind4.alg"); decompressPic(dir_hare_fondo, 1); - loadPic("ciego5.alg"); + loadPic("blind5.alg"); decompressPic(dir_hare_frente, 1); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); @@ -3280,7 +3280,7 @@ void DrasculaEngine::animation_6_2() { if (flags[4] == 1) talk_hacker(_textd[_lang][66], "d66.als"); pause(6); - talk_ciego(_textd[_lang][78], "d78.als", _textd1[_lang][78 - TEXTD_START]); + talk_blind(_textd[_lang][78], "d78.als", _textd1[_lang][78 - TEXTD_START]); pause(4); talk_hacker(_textd[_lang][67], "d67.als"); @@ -3319,15 +3319,15 @@ void DrasculaEngine::animation_33_2() { pause(8); clearRoom(); - loadPic("ciego1.alg"); + loadPic("blind1.alg"); decompressPic(dir_dibujo1, HALF_PAL); - loadPic("ciego2.alg"); + loadPic("blind2.alg"); decompressPic(dir_dibujo3, 1); - loadPic("ciego3.alg"); + loadPic("blind3.alg"); decompressPic(dir_hare_dch, 1); - loadPic("ciego4.alg"); + loadPic("blind4.alg"); decompressPic(dir_hare_fondo, 1); - loadPic("ciego5.alg"); + loadPic("blind5.alg"); decompressPic(dir_hare_frente, 1); if (_lang == kSpanish) @@ -3338,12 +3338,12 @@ void DrasculaEngine::animation_33_2() { pause(10); - talk_ciego(_textd[_lang][68], "d68.als", _textd1[_lang][68 - TEXTD_START]); + talk_blind(_textd[_lang][68], "d68.als", _textd1[_lang][68 - TEXTD_START]); pause(5); talk_hacker(_textd[_lang][57], "d57.als"); pause(6); _system->delayMillis(1000); - talk_ciego(_textd[_lang][77], "d77.als", _textd1[_lang][77 - TEXTD_START]); + talk_blind(_textd[_lang][77], "d77.als", _textd1[_lang][77 - TEXTD_START]); talk_hacker(_textd[_lang][65], "d65.als"); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); @@ -3396,9 +3396,9 @@ void DrasculaEngine::animation_1_4() { flags[18] = 1; flags[20] = 1; - talk_igor_sentado(_texti[_lang][13], "I13.als"); - talk_igor_sentado(_texti[_lang][14], "I14.als"); - talk_igor_sentado(_texti[_lang][15], "I15.als"); + talk_igor_seated(_texti[_lang][13], "I13.als"); + talk_igor_seated(_texti[_lang][14], "I14.als"); + talk_igor_seated(_texti[_lang][15], "I15.als"); flags[21] = 1; } else { talk(_text[_lang][356], "356.als"); @@ -3421,10 +3421,10 @@ void DrasculaEngine::animation_1_4() { talk(_text[_lang][276], "276.als"); pause(14); - talk_igor_sentado(_texti[_lang][6], "I6.als"); + talk_igor_seated(_texti[_lang][6], "I6.als"); } - conversa("op_6.cal"); + converse("op_6.cal"); flags[20] = 0; flags[18] = 0; } @@ -3457,8 +3457,8 @@ void DrasculaEngine::animation_5_4(){ loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); hare_se_ve = 1; - FundeAlNegro(0); - sal_de_la_habitacion(0); + fadeToBlack(0); + exitRoom(0); } void DrasculaEngine::animation_6_4() { @@ -3476,7 +3476,7 @@ void DrasculaEngine::animation_6_4() { update_26_pre(); x_igor = 104; y_igor = 71; - pon_igor(); + placeIgor(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(40); talk_igor_frente(_texti[_lang][26], "I26.als"); @@ -3515,7 +3515,7 @@ void DrasculaEngine::animation_8_4() { void DrasculaEngine::animation_9_4() { anima("st.bin", 14); - FundeAlNegro(1); + fadeToBlack(1); } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 3faede05f6..093cdba1f9 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -162,34 +162,34 @@ int DrasculaEngine::go() { VGA = (byte *)malloc(320 * 200); memset(VGA, 0, 64000); - lleva_objeto = 0; - menu_bar = 0; menu_scr = 0; hay_nombre = 0; + takeObject = 0; + menuBar = 0; menuScreen = 0; hasName = 0; frame_y = 0; hare_x = -1; hare_se_mueve = 0; sentido_hare = 3; num_frame = 0; hare_se_ve = 1; - comprueba_flags = 1; + checkFlags = 1; rompo = 0; rompo2 = 0; - anda_a_objeto = 0; - step_x = PASO_HARE_X; step_y = PASO_HARE_Y; - alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; alto_pies = PIES_HARE; + walkToObject = 0; + stepX = PASO_HARE_X; stepY = PASO_HARE_Y; + alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; feetHeight = PIES_HARE; alto_talk = ALTO_TALK_HARE; ancho_talk = ANCHO_TALK_HARE; - hay_answer = 0; - conta_ciego_vez = 0; - cambio_de_color = 0; + hasAnswer = 0; + conta_blind_vez = 0; + changeColor = 0; rompo_y_salgo = 0; vb_x = 120; sentido_vb = 1; vb_se_mueve = 0; frame_vb = 1; frame_piano = 0; - frame_borracho = 0; + frame_drunk = 0; frame_velas = 0; cont_sv = 0; term_int = 0; - corta_musica = 0; + musicStopped = 0; hay_seleccion = 0; Leng = 0; UsingMem = 0; - GlobalSpeed = 0; - frame_ciego = 0; - frame_ronquido = 0; - frame_murcielago = 0; + globalSpeed = 0; + frame_blind = 0; + frame_snore = 0; + frame_bat = 0; c_mirar = 0; c_poder = 0; ald = NULL; @@ -252,7 +252,7 @@ int DrasculaEngine::go() { frame_pen = 0; flag_tv = 0; - dir_pendulo = dir_dibujo3; + dir_pendulum = dir_dibujo3; loadPic("96.alg"); decompressPic(dir_hare_frente, COMPLETE_PAL); @@ -336,8 +336,8 @@ void DrasculaEngine::loadPic(const char *NamePcc) { if (!file.isOpen()) error("missing game data %s %c", NamePcc, 7); - Buffer_pcx = (byte *)malloc(65000); - auxPun = Buffer_pcx; + pcxBuffer = (byte *)malloc(65000); + auxPun = pcxBuffer; file.seek(128); while (!fExit) { ch = file.readByte(); @@ -359,8 +359,8 @@ void DrasculaEngine::loadPic(const char *NamePcc) { } void DrasculaEngine::decompressPic(byte *dir_escritura, int plt) { - memcpy(dir_escritura, Buffer_pcx, 64000); - free(Buffer_pcx); + memcpy(dir_escritura, pcxBuffer, 64000); + free(pcxBuffer); setRGB((byte *)cPal, plt); } @@ -541,9 +541,9 @@ bool DrasculaEngine::escoba() { loadPic("2aux62.alg"); decompressPic(dir_dibujo2, 1); sentido_hare = 1; - obj_saliendo = 104; + objExit = 104; if (hay_que_load != 0) { - if (!para_cargar(nom_partida)) { + if (!para_cargar(saveName)) { return true; } } else { @@ -553,80 +553,80 @@ bool DrasculaEngine::escoba() { lleva_al_hare(65, 145); } } else if (num_ejec == 2) { - suma_objeto(28); + addObject(28); sentido_hare = 3; - obj_saliendo = 162; + objExit = 162; if (hay_que_load == 0) carga_escoba("14.ald"); else { - if (!para_cargar(nom_partida)) { + if (!para_cargar(saveName)) { return true; } } } else if (num_ejec == 3) { - suma_objeto(28); - suma_objeto(11); - suma_objeto(14); - suma_objeto(22); - suma_objeto(9); - suma_objeto(20); - suma_objeto(19); + addObject(28); + addObject(11); + addObject(14); + addObject(22); + addObject(9); + addObject(20); + addObject(19); flags[1] = 1; sentido_hare = 1; - obj_saliendo = 99; + objExit = 99; if (hay_que_load == 0) carga_escoba("20.ald"); else { - if (!para_cargar(nom_partida)) { + if (!para_cargar(saveName)) { return true; } } } else if (num_ejec == 4) { - suma_objeto(28); - suma_objeto(9); - suma_objeto(20); - suma_objeto(22); - obj_saliendo = 100; + addObject(28); + addObject(9); + addObject(20); + addObject(22); + objExit = 100; if (hay_que_load == 0) { carga_escoba("21.ald"); sentido_hare = 0; hare_x = 235; hare_y = 164; } else { - if (!para_cargar(nom_partida)) { + if (!para_cargar(saveName)) { return true; } } } else if (num_ejec == 5) { - suma_objeto(28); - suma_objeto(7); - suma_objeto(9); - suma_objeto(11); - suma_objeto(13); - suma_objeto(14); - suma_objeto(15); - suma_objeto(17); - suma_objeto(20); + addObject(28); + addObject(7); + addObject(9); + addObject(11); + addObject(13); + addObject(14); + addObject(15); + addObject(17); + addObject(20); sentido_hare = 1; - obj_saliendo = 100; + objExit = 100; if (hay_que_load == 0) { carga_escoba("45.ald"); } else { - if (!para_cargar(nom_partida)) { + if (!para_cargar(saveName)) { return true; } } } else if (num_ejec == 6) { - suma_objeto(28); - suma_objeto(9); + addObject(28); + addObject(9); sentido_hare = 1; - obj_saliendo = 104; + objExit = 104; if (hay_que_load == 0) { carga_escoba("58.ald"); animation_1_6(); } else { - if (!para_cargar(nom_partida)) { + if (!para_cargar(saveName)) { return true; } loadPic("auxdr.alg"); @@ -636,12 +636,12 @@ bool DrasculaEngine::escoba() { bucles: if (hare_se_mueve == 0) { - step_x = PASO_HARE_X; - step_y = PASO_HARE_Y; + stepX = PASO_HARE_X; + stepY = PASO_HARE_Y; } - if (hare_se_mueve == 0 && anda_a_objeto == 1) { + if (hare_se_mueve == 0 && walkToObject == 1) { sentido_hare = sentido_final; - anda_a_objeto = 0; + walkToObject = 0; } if (num_ejec == 2) { @@ -653,7 +653,7 @@ bucles: lleva_al_hare(190, 130); } - mueve_cursor(); + moveCursor(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); if (num_ejec == 2) { @@ -666,23 +666,23 @@ bucles: updateEvents(); - if (menu_scr == 0 && lleva_objeto == 1) - comprueba_objetos(); + if (menuScreen == 0 && takeObject == 1) + checkObjects(); - if (button_dch == 1 && menu_scr == 1) { + if (button_dch == 1 && menuScreen == 1) { delay(100); if (num_ejec == 2) - loadPic(fondo_y_menu); + loadPic(menuBackground); else loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); setPalette((byte *)&gamePalette); - menu_scr = 0; + menuScreen = 0; updateEvents(); if (num_ejec != 3) cont_sv = 0; } - if (button_dch == 1 && menu_scr == 0) { + if (button_dch == 1 && menuScreen == 0) { delay(100); hare_se_mueve = 0; if (sentido_hare == 2) @@ -696,58 +696,58 @@ bucles: else loadPic("icons.alg"); decompressPic(dir_hare_fondo, 1); - menu_scr = 1; + menuScreen = 1; updateEvents(); withoutVerb(); if (num_ejec != 3) cont_sv = 0; } - if (button_izq == 1 && menu_bar == 1) { + if (button_izq == 1 && menuBar == 1) { delay(100); elige_en_barra(); if (num_ejec != 3) cont_sv = 0; - } else if (button_izq == 1 && lleva_objeto == 0) { + } else if (button_izq == 1 && takeObject == 0) { delay(100); if (comprueba1()) return true; if (num_ejec != 3) cont_sv = 0; - } else if (button_izq == 1 && lleva_objeto == 1) { + } else if (button_izq == 1 && takeObject == 1) { if (comprueba2()) return true; if (num_ejec != 3) cont_sv = 0; } - if (mouseY < 24 && menu_scr == 0) - menu_bar = 1; + if (mouseY < 24 && menuScreen == 0) + menuBar = 1; else - menu_bar = 0; + menuBar = 0; - Common::KeyCode key = getscan(); - if (key == Common::KEYCODE_F1 && menu_scr == 0) { - elige_verbo(1); + Common::KeyCode key = getScan(); + if (key == Common::KEYCODE_F1 && menuScreen == 0) { + selectVerb(1); if (num_ejec != 3) cont_sv = 0; - } else if (key == Common::KEYCODE_F2 && menu_scr == 0) { - elige_verbo(2); + } else if (key == Common::KEYCODE_F2 && menuScreen == 0) { + selectVerb(2); if (num_ejec != 3) cont_sv = 0; - } else if (key == Common::KEYCODE_F3 && menu_scr == 0) { - elige_verbo(3); + } else if (key == Common::KEYCODE_F3 && menuScreen == 0) { + selectVerb(3); if (num_ejec != 3) cont_sv = 0; - } else if (key == Common::KEYCODE_F4 && menu_scr == 0) { - elige_verbo(4); + } else if (key == Common::KEYCODE_F4 && menuScreen == 0) { + selectVerb(4); cont_sv = 0; - } else if (key == Common::KEYCODE_F5 && menu_scr == 0) { - elige_verbo(5); + } else if (key == Common::KEYCODE_F5 && menuScreen == 0) { + selectVerb(5); if (num_ejec != 3) cont_sv = 0; - } else if (key == Common::KEYCODE_F6 && menu_scr == 0) { - elige_verbo(6); + } else if (key == Common::KEYCODE_F6 && menuScreen == 0) { + selectVerb(6); if (num_ejec != 3) cont_sv = 0; } else if (key == Common::KEYCODE_F9) { @@ -786,7 +786,7 @@ bucles: loadPic("alcbar.alg"); decompressPic(dir_dibujo1, 255); } else if (cont_sv == 1500) { - salva_pantallas(); + screenSaver(); if (num_ejec != 3) cont_sv = 0; } else { @@ -808,7 +808,7 @@ void DrasculaEngine::pickObject(int objeto) { decompressPic(dir_hare_fondo, 1); chooseObject(objeto); if (num_ejec == 2) - loadPic(fondo_y_menu); + loadPic(menuBackground); else loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); @@ -816,18 +816,18 @@ void DrasculaEngine::pickObject(int objeto) { void DrasculaEngine::chooseObject(int objeto) { if (num_ejec == 5) { - if (lleva_objeto == 1 && menu_scr == 0 && pickedObject != 16) - suma_objeto(pickedObject); + if (takeObject == 1 && menuScreen == 0 && pickedObject != 16) + addObject(pickedObject); } else { - if (lleva_objeto == 1 && menu_scr == 0) - suma_objeto(pickedObject); + if (takeObject == 1 && menuScreen == 0) + addObject(pickedObject); } copyBackground(x1d_menu[objeto], y1d_menu[objeto], 0, 0, OBJWIDTH,OBJHEIGHT, dir_hare_fondo, dir_dibujo3); - lleva_objeto = 1; + takeObject = 1; pickedObject = objeto; } -int DrasculaEngine::resta_objeto(int osj) { +int DrasculaEngine::removeObject(int osj) { int result = 1; for (int h = 1; h < 43; h++) { @@ -843,27 +843,27 @@ int DrasculaEngine::resta_objeto(int osj) { void DrasculaEngine::withoutVerb() { int c = 171; - if (menu_scr == 1) + if (menuScreen == 1) c = 0; if (num_ejec == 5) { - if (lleva_objeto == 1 && pickedObject != 16) - suma_objeto(pickedObject); + if (takeObject == 1 && pickedObject != 16) + addObject(pickedObject); } else { - if (lleva_objeto == 1) - suma_objeto(pickedObject); + if (takeObject == 1) + addObject(pickedObject); } copyBackground(0, c, 0, 0, OBJWIDTH,OBJHEIGHT, dir_hare_fondo, dir_dibujo3); - lleva_objeto = 0; - hay_nombre = 0; + takeObject = 0; + hasName = 0; } -bool DrasculaEngine::para_cargar(char nom_game[]) { +bool DrasculaEngine::para_cargar(char gameName[]) { previousMusic = roomMusic; - menu_scr = 0; + menuScreen = 0; if (num_ejec != 1) clearRoom(); - if (!carga_partida(nom_game)) + if (!loadGame(gameName)) return false; if (num_ejec == 2 || num_ejec == 3 || num_ejec == 5) { delete ald; @@ -905,7 +905,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { char para_codificar[20]; char buffer[256]; - hay_nombre = 0; + hasName = 0; strcpy(para_codificar, nom_fich); strcpy(currentData, nom_fich); @@ -935,11 +935,11 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { getLine(ald, buffer, size); sscanf(buffer, "%d",&alto_hare); getLine(ald, buffer, size); - sscanf(buffer, "%d",&alto_pies); + sscanf(buffer, "%d",&feetHeight); getLine(ald, buffer, size); - sscanf(buffer, "%d",&step_x); + sscanf(buffer, "%d",&stepX); getLine(ald, buffer, size); - sscanf(buffer, "%d",&step_y); + sscanf(buffer, "%d",&stepY); getLine(ald, buffer, size); sscanf(buffer, "%s",pant1); @@ -957,7 +957,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { loadPic(pant4); decompressPic(dir_hare_fondo, 1); - strcpy(fondo_y_menu, pant4); + strcpy(menuBackground, pant4); } martini: @@ -967,7 +967,7 @@ martini: for (l = 0; l < numRoomObjs; l++) { getLine(ald, buffer, size); - sscanf(buffer, "%d", &num_obj[l]); + sscanf(buffer, "%d", &objectNum[l]); getLine(ald, buffer, size); sscanf(buffer, "%s", objName[l]); getLine(ald, buffer, size); @@ -990,7 +990,7 @@ martini: sscanf(buffer, "%d", &isDoor[l]); if (isDoor[l] != 0) { getLine(ald, buffer, size); - sscanf(buffer, "%s", alapantallakeva[l]); + sscanf(buffer, "%s", targetScreen[l]); getLine(ald, buffer, size); sscanf(buffer, "%d", &x_alakeva[l]); getLine(ald, buffer, size); @@ -1023,11 +1023,11 @@ martini: if (num_ejec == 2) { if (martin == 0) { - step_x = PASO_HARE_X; - step_y = PASO_HARE_Y; + stepX = PASO_HARE_X; + stepY = PASO_HARE_Y; alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; - alto_pies = PIES_HARE; + feetHeight = PIES_HARE; loadPic("97.alg"); decompressPic(dir_hare_dch, 1); loadPic("96.alg"); @@ -1035,12 +1035,12 @@ martini: loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); - strcpy(fondo_y_menu, "99.alg"); + strcpy(menuBackground, "99.alg"); } } for (l = 0; l < numRoomObjs; l++) { - if (num_obj[l] == obj_saliendo) + if (objectNum[l] == objExit) obj_salir = l; } @@ -1070,7 +1070,7 @@ martini: paleta_hare_oscuro(); hare_claro(); - cambio_de_color = -1; + changeColor = -1; if (num_ejec == 2) color_abc(LIGHT_GREEN); @@ -1153,11 +1153,11 @@ martini: if (num_ejec == 2) { if (roomNumber == 9 || roomNumber == 2 || roomNumber == 14 || roomNumber == 18) - conta_ciego_vez = vez(); + conta_blind_vez = vez(); } if (num_ejec == 4) { if (roomNumber == 26) - conta_ciego_vez = vez(); + conta_blind_vez = vez(); } if (num_ejec == 4 && roomNumber == 24 && flags[29] == 1) @@ -1179,7 +1179,7 @@ void DrasculaEngine::clearRoom() { _system->updateScreen(); } -void DrasculaEngine::lleva_al_hare(int punto_x, int punto_y) { +void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { if (num_ejec == 5 || num_ejec == 6) { if (hare_se_ve == 0) { hare_x = sitio_x; @@ -1187,9 +1187,9 @@ void DrasculaEngine::lleva_al_hare(int punto_x, int punto_y) { goto fin; } } - sitio_x = punto_x; - sitio_y = punto_y; - empieza_andar(); + sitio_x = pointX; + sitio_y = pointY; + startWalking(); for (;;) { updateRoom(); @@ -1198,8 +1198,8 @@ void DrasculaEngine::lleva_al_hare(int punto_x, int punto_y) { break; } - if (anda_a_objeto == 1) { - anda_a_objeto = 0; + if (walkToObject == 1) { + walkToObject = 0; sentido_hare = sentido_final; } fin: @@ -1207,8 +1207,8 @@ fin: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::mueve_cursor() { - int pos_cursor[8]; +void DrasculaEngine::moveCursor() { + int cursorPos[8]; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); @@ -1216,36 +1216,36 @@ void DrasculaEngine::mueve_cursor() { pon_hare(); updateRefresh(); - if (!strcmp(texto_nombre, "hacker") && hay_nombre == 1) { - if (_color != RED && menu_scr == 0) + if (!strcmp(textName, "hacker") && hasName == 1) { + if (_color != RED && menuScreen == 0) color_abc(RED); - } else if (menu_scr == 0 && _color != LIGHT_GREEN) + } else if (menuScreen == 0 && _color != LIGHT_GREEN) color_abc(LIGHT_GREEN); - if (hay_nombre == 1 && menu_scr == 0) - centra_texto(texto_nombre, mouseX, mouseY); - if (menu_scr == 1) + if (hasName == 1 && menuScreen == 0) + centerText(textName, mouseX, mouseY); + if (menuScreen == 1) menu_sin_volcar(); - else if (menu_bar == 1) - barra_menu(); - - pos_cursor[0] = 0; - pos_cursor[1] = 0; - pos_cursor[2] = mouseX - 20; - pos_cursor[3] = mouseY - 17; - pos_cursor[4] = OBJWIDTH; - pos_cursor[5] = OBJHEIGHT; - copyRectClip(pos_cursor, dir_dibujo3, dir_zona_pantalla); + else if (menuBar == 1) + clearMenu(); + + cursorPos[0] = 0; + cursorPos[1] = 0; + cursorPos[2] = mouseX - 20; + cursorPos[3] = mouseY - 17; + cursorPos[4] = OBJWIDTH; + cursorPos[5] = OBJHEIGHT; + copyRectClip(cursorPos, dir_dibujo3, dir_zona_pantalla); } -void DrasculaEngine::comprueba_objetos() { +void DrasculaEngine::checkObjects() { int l, veo = 0; for (l = 0; l < numRoomObjs; l++) { if (mouseX > x1[l] && mouseY > y1[l] && mouseX < x2[l] && mouseY < y2[l] && visible[l] == 1 && isDoor[l] == 0) { - strcpy(texto_nombre, objName[l]); - hay_nombre = 1; + strcpy(textName, objName[l]); + hasName = 1; veo = 1; } } @@ -1253,21 +1253,21 @@ void DrasculaEngine::comprueba_objetos() { if (num_ejec == 2) { if (mouseX > hare_x + 2 && mouseY > hare_y + 2 && mouseX < hare_x + ancho_hare - 2 && mouseY < hare_y + alto_hare - 2) { - strcpy(texto_nombre, "hacker"); - hay_nombre = 1; + strcpy(textName, "hacker"); + hasName = 1; veo = 1; } } else { if (mouseX > hare_x + 2 && mouseY > hare_y + 2 && mouseX < hare_x + ancho_hare - 2 && mouseY < hare_y + alto_hare - 2 && veo == 0) { - strcpy(texto_nombre, "hacker"); - hay_nombre = 1; + strcpy(textName, "hacker"); + hasName = 1; veo = 1; } } if (veo == 0) - hay_nombre = 0; + hasName = 0; } void DrasculaEngine::elige_en_barra() { @@ -1280,19 +1280,19 @@ void DrasculaEngine::elige_en_barra() { if (num_verbo < 1) withoutVerb(); else - elige_verbo(num_verbo); + selectVerb(num_verbo); } bool DrasculaEngine::comprueba1() { int l; - if (menu_scr == 1) + if (menuScreen == 1) removeObject(); else { for (l = 0; l < numRoomObjs; l++) { if (mouseX >= x1[l] && mouseY >= y1[l] && mouseX <= x2[l] && mouseY <= y2[l] && rompo == 0) { - if (sal_de_la_habitacion(l)) + if (exitRoom(l)) return true; if (rompo == 1) break; @@ -1310,8 +1310,8 @@ bool DrasculaEngine::comprueba1() { sitio_y = sitiobj_y[l]; sentido_final = sentidobj[l]; rompo = 1; - anda_a_objeto = 1; - empieza_andar(); + walkToObject = 1; + startWalking(); } } @@ -1323,12 +1323,12 @@ bool DrasculaEngine::comprueba1() { sitio_x = suelo_x1; if (sitio_x > suelo_x2) sitio_x = suelo_x2; - if (sitio_y < suelo_y1 + alto_pies) - sitio_y = suelo_y1 + alto_pies; + if (sitio_y < suelo_y1 + feetHeight) + sitio_y = suelo_y1 + feetHeight; if (sitio_y > suelo_y2) sitio_y = suelo_y2; - empieza_andar(); + startWalking(); } rompo = 0; } @@ -1339,21 +1339,21 @@ bool DrasculaEngine::comprueba1() { bool DrasculaEngine::comprueba2() { int l; - if (menu_scr == 1) { - if (coge_objeto()) + if (menuScreen == 1) { + if (pickupObject()) return true; } else { - if (!strcmp(texto_nombre, "hacker") && hay_nombre == 1) { - if (banderas(50)) + if (!strcmp(textName, "hacker") && hasName == 1) { + if (checkFlag(50)) return true; } else { for (l = 0; l < numRoomObjs; l++) { if (mouseX > x1[l] && mouseY > y1[l] && mouseX < x2[l] && mouseY < y2[l] && visible[l] == 1) { sentido_final = sentidobj[l]; - anda_a_objeto = 1; + walkToObject = 1; lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); - if (banderas(num_obj[l])) + if (checkFlag(objectNum[l])) return true; if (num_ejec == 4) break; @@ -1365,7 +1365,7 @@ bool DrasculaEngine::comprueba2() { return false; } -Common::KeyCode DrasculaEngine::getscan() { +Common::KeyCode DrasculaEngine::getScan() { updateEvents(); return _keyPressed.keycode; @@ -1412,22 +1412,22 @@ void DrasculaEngine::updateEvents() { } } -void DrasculaEngine::elige_verbo(int verbo) { +void DrasculaEngine::selectVerb(int verbo) { int c = 171; - if (menu_scr == 1) + if (menuScreen == 1) c = 0; if (num_ejec == 5) { - if (lleva_objeto == 1 && pickedObject != 16) - suma_objeto(pickedObject); + if (takeObject == 1 && pickedObject != 16) + addObject(pickedObject); } else { - if (lleva_objeto == 1) - suma_objeto(pickedObject); + if (takeObject == 1) + addObject(pickedObject); } copyBackground(OBJWIDTH * verbo, c, 0, 0, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_dibujo3); - lleva_objeto = 1; + takeObject = 1; pickedObject = verbo; } @@ -1450,7 +1450,7 @@ void DrasculaEngine::mesa() { copyBackground(183, 56, 138, nivel_voc, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4), dir_mesa, dir_zona_pantalla); copyBackground(183, 56, 194, nivel_cd, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4), dir_mesa, dir_zona_pantalla); - cursor_mesa(); + setCursorTable(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -1496,8 +1496,8 @@ void DrasculaEngine::mesa() { } bool DrasculaEngine::saves() { - char nombres[10][23]; - char fichero[50]; + char names[10][23]; + char file[50]; char fileEpa[50]; int n, n2, num_sav = 0, y = 27; Common::InSaveFile *sav; @@ -1518,7 +1518,7 @@ bool DrasculaEngine::saves() { } } for (n = 0; n < NUM_SAVES; n++) - sav->readLine(nombres[n], 23); + sav->readLine(names[n], 23); delete sav; loadPic("savescr.alg"); @@ -1530,11 +1530,11 @@ bool DrasculaEngine::saves() { y = 27; copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); for (n = 0; n < NUM_SAVES; n++) { - print_abc(nombres[n], 116, y); + print_abc(names[n], 116, y); y = y + 9; } print_abc(select, 117, 15); - cursor_mesa(); + setCursorTable(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); y = 27; @@ -1544,22 +1544,22 @@ bool DrasculaEngine::saves() { delay(100); for (n = 0; n < NUM_SAVES; n++) { if (mouseX > 115 && mouseY > y + (9 * n) && mouseX < 115 + 175 && mouseY < y + 10 + (9 * n)) { - strcpy(select, nombres[n]); + strcpy(select, names[n]); if (strcmp(select, "*")) hay_seleccion = 1; else { - introduce_nombre(); - strcpy(nombres[n], select); + enterName(); + strcpy(names[n], select); if (hay_seleccion == 1) { - snprintf(fichero, 50, "%s%02d", _targetName.c_str(), n + 1); - para_grabar(fichero); + snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1); + para_grabar(file); Common::OutSaveFile *tsav; if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { error("Can't open %s file", fileEpa); } for (n = 0; n < NUM_SAVES; n++) { - tsav->writeString(nombres[n]); + tsav->writeString(names[n]); tsav->writeString("\n"); } tsav->finalize(); @@ -1570,39 +1570,39 @@ bool DrasculaEngine::saves() { print_abc(select, 117, 15); y = 27; for (n2 = 0; n2 < NUM_SAVES; n2++) { - print_abc(nombres[n2], 116, y); + print_abc(names[n2], 116, y); y = y + 9; } if (hay_seleccion == 1) { - snprintf(fichero, 50, "%s%02d", _targetName.c_str(), n + 1); + snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1); } num_sav = n; } } if (mouseX > 117 && mouseY > 15 && mouseX < 295 && mouseY < 24 && hay_seleccion == 1) { - introduce_nombre(); - strcpy(nombres[num_sav], select); + enterName(); + strcpy(names[num_sav], select); print_abc(select, 117, 15); y = 27; for (n2 = 0; n2 < NUM_SAVES; n2++) { - print_abc(nombres[n2], 116, y); + print_abc(names[n2], 116, y); y = y + 9; } } if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149 && hay_seleccion == 1) { - if (!para_cargar(fichero)) + if (!para_cargar(file)) return false; break; } else if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149 && hay_seleccion == 1) { - para_grabar(fichero); + para_grabar(file); Common::OutSaveFile *tsav; if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { error("Can't open %s file", fileEpa); } for (n = 0; n < NUM_SAVES; n++) { - tsav->writeString(nombres[n]); + tsav->writeString(names[n]); tsav->writeString("\n"); } tsav->finalize(); @@ -1674,7 +1674,7 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) else if (c == '\255') x_de_letra = X_ABRE_EXCLAMACION; else if (c == ';') - x_de_letra = X_PUNTO_Y_COMA; + x_de_letra = X_pointY_COMA; else if (c == '>') x_de_letra = X_GREATER_THAN; else if (c == '<') @@ -1766,12 +1766,12 @@ bool DrasculaEngine::confirma_salir() { color_abc(RED); updateRoom(); - centra_texto(_textsys[_lang][1], 160, 87); + centerText(_textsys[_lang][1], 160, 87); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); delay(100); for (;;) { - key = getscan(); + key = getScan(); if (key != 0) break; } @@ -1784,7 +1784,7 @@ bool DrasculaEngine::confirma_salir() { return true; } -void DrasculaEngine::salva_pantallas() { +void DrasculaEngine::screenSaver() { int xr, yr; byte *copia, *ghost; Common::File file; @@ -1912,13 +1912,13 @@ void DrasculaEngine::salva_pantallas() { void DrasculaEngine::fliplay(const char *filefli, int vel) { OpenSSN(filefli, vel); while (PlayFrameSSN() && (!term_int)) { - if (getscan() == Common::KEYCODE_ESCAPE) + if (getScan() == Common::KEYCODE_ESCAPE) term_int = 1; } EndSSN(); } -void DrasculaEngine::FundeDelNegro(int VelocidadDeFundido) { +void DrasculaEngine::fadeFromBlack(int VelocidadDeFundido) { char fundido; unsigned int color, componente; @@ -1956,14 +1956,14 @@ void DrasculaEngine::color_abc(int cl) { setPalette((byte *)&gamePalette); } -char DrasculaEngine::LimitaVGA(char valor) { - return (valor & 0x3F) * (valor > 0); +char DrasculaEngine::LimitaVGA(char value) { + return (value & 0x3F) * (value > 0); } -void DrasculaEngine::centra_texto(const char *mensaje, int x_texto, int y_texto) { +void DrasculaEngine::centerText(const char *message, int textX, int textY) { char bb[200], m2[200], m1[200], mb[10][50]; char m3[200]; - int h, fil, x_texto3, x_texto2, x_texto1, conta_f = 0, ya = 0; + int h, fil, textX3, textX2, textX1, conta_f = 0, ya = 0; strcpy(m1, " "); strcpy(m2, " "); @@ -1973,24 +1973,24 @@ void DrasculaEngine::centra_texto(const char *mensaje, int x_texto, int y_texto) for (h = 0; h < 10; h++) strcpy(mb[h], " "); - if (x_texto > 160) + if (textX > 160) ya = 1; - strcpy(m1, mensaje); - x_texto = CLIP(x_texto, 60, 255); + strcpy(m1, message); + textX = CLIP(textX, 60, 255); - x_texto1 = x_texto; + textX1 = textX; if (ya == 1) - x_texto1 = 315 - x_texto; + textX1 = 315 - textX; - x_texto2 = (strlen(m1) / 2) * CHAR_WIDTH; + textX2 = (strlen(m1) / 2) * CHAR_WIDTH; tut: strcpy(bb, m1); scumm_strrev(bb); - if (x_texto1 < x_texto2) { + if (textX1 < textX2) { strcpy(m3, strrchr(m1, ' ')); strcpy(m1, strstr(bb, " ")); scumm_strrev(m1); @@ -1999,8 +1999,8 @@ tut: strcpy(m2, m3); }; - x_texto2 = (strlen(m1) / 2) * CHAR_WIDTH; - if (x_texto1 < x_texto2) + textX2 = (strlen(m1) / 2) * CHAR_WIDTH; + if (textX1 < textX2) goto tut; strcpy(mb[conta_f], m1); @@ -2017,19 +2017,19 @@ tut: imprimir: - fil = y_texto - (((conta_f + 3) * CHAR_HEIGHT)); + fil = textY - (((conta_f + 3) * CHAR_HEIGHT)); for (h = 0; h < conta_f + 1; h++) { - x_texto3 = strlen(mb[h]) / 2; - print_abc(mb[h], ((x_texto) - x_texto3 * CHAR_WIDTH) - 1, fil); + textX3 = strlen(mb[h]) / 2; + print_abc(mb[h], ((textX) - textX3 * CHAR_WIDTH) - 1, fil); fil = fil + CHAR_HEIGHT + 2; } } -void DrasculaEngine::playSound(const char *fichero) { +void DrasculaEngine::playSound(const char *file) { if (hay_sb == 1) { sku = new Common::File; - sku->open(fichero); + sku->open(file); if (!sku->isOpen()) { error("no puedo abrir archivo de voz"); } @@ -2051,7 +2051,7 @@ bool DrasculaEngine::anima(const char *animation, int FPS) { FileIn.open(animation); if (!FileIn.isOpen()) { - error("No encuentro un fichero de animation."); + error("No encuentro un file de animation."); } FileIn.read(&NFrames, sizeof(NFrames)); @@ -2081,7 +2081,7 @@ bool DrasculaEngine::anima(const char *animation, int FPS) { _system->updateScreen(); WaitForNext(FPS); cnt++; - byte key = getscan(); + byte key = getScan(); if (key == Common::KEYCODE_ESCAPE) term_int = 1; if (key != 0) @@ -2091,7 +2091,7 @@ bool DrasculaEngine::anima(const char *animation, int FPS) { free(AuxBuffDes); FileIn.close(); - return ((term_int == 1) || (getscan() == Common::KEYCODE_ESCAPE)); + return ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)); } void DrasculaEngine::animastopSound_corte() { @@ -2103,7 +2103,7 @@ void DrasculaEngine::animastopSound_corte() { } } -void DrasculaEngine::FundeAlNegro(int VelocidadDeFundido) { +void DrasculaEngine::fadeToBlack(int VelocidadDeFundido) { char fundido; unsigned int color, componente; @@ -2125,7 +2125,7 @@ void DrasculaEngine::pause(int cuanto) { _system->delayMillis(cuanto * 30); // was originaly 2 } -void DrasculaEngine::pon_igor() { +void DrasculaEngine::placeIgor() { int pos_igor[6]; pos_igor[0] = 1; @@ -2145,7 +2145,7 @@ void DrasculaEngine::pon_igor() { copyRectClip(pos_igor, dir_hare_frente, dir_zona_pantalla); } -void DrasculaEngine::pon_dr() { +void DrasculaEngine::placeDrascula() { int pos_dr[6]; if (sentido_dr == 1) @@ -2166,7 +2166,7 @@ void DrasculaEngine::pon_dr() { copyRectClip(pos_dr, dir_hare_fondo, dir_zona_pantalla); } -void DrasculaEngine::pon_bj() { +void DrasculaEngine::placeBJ() { int pos_bj[6]; if (sentido_bj == 3) @@ -2182,7 +2182,7 @@ void DrasculaEngine::pon_bj() { copyRectClip(pos_bj, dir_dibujo3, dir_zona_pantalla); } -void DrasculaEngine::hipo(int counter) { +void DrasculaEngine::hiccup(int counter) { int y = 0, sentido = 0; if (num_ejec == 3) y = -1; @@ -2256,17 +2256,17 @@ void DrasculaEngine::updateRoom() { updateRefresh(); } -bool DrasculaEngine::carga_partida(const char *nom_game) { +bool DrasculaEngine::loadGame(const char *gameName) { int l, n_ejec2; Common::InSaveFile *sav; - if (!(sav = _saveFileMan->openForLoading(nom_game))) { + if (!(sav = _saveFileMan->openForLoading(gameName))) { error("missing savegame file"); } n_ejec2 = sav->readSint32LE(); if (n_ejec2 != num_ejec) { - strcpy(nom_partida, nom_game); + strcpy(saveName, gameName); num_ejec = n_ejec2 - 1; hay_que_load = 1; return false; @@ -2284,7 +2284,7 @@ bool DrasculaEngine::carga_partida(const char *nom_game) { flags[l] = sav->readSint32LE(); } - lleva_objeto = sav->readSint32LE(); + takeObject = sav->readSint32LE(); pickedObject = sav->readSint32LE(); hay_que_load = 0; @@ -2295,50 +2295,50 @@ void DrasculaEngine::updateDoor(int doorNum) { if (num_ejec == 1 || num_ejec == 3 || num_ejec == 5 || num_ejec == 6) return; else if (num_ejec == 2) { - if (num_obj[doorNum] == 138) + if (objectNum[doorNum] == 138) isDoor[doorNum] = flags[0]; - else if (num_obj[doorNum] == 136) + else if (objectNum[doorNum] == 136) isDoor[doorNum] = flags[8]; - else if (num_obj[doorNum] == 156) + else if (objectNum[doorNum] == 156) isDoor[doorNum] = flags[16]; - else if (num_obj[doorNum] == 163) + else if (objectNum[doorNum] == 163) isDoor[doorNum] = flags[17]; - else if (num_obj[doorNum] == 177) + else if (objectNum[doorNum] == 177) isDoor[doorNum] = flags[15]; - else if (num_obj[doorNum] == 175) + else if (objectNum[doorNum] == 175) isDoor[doorNum] = flags[40]; - else if (num_obj[doorNum] == 173) + else if (objectNum[doorNum] == 173) isDoor[doorNum] = flags[36]; } else if (num_ejec == 4) { - if (num_obj[doorNum] == 101 && flags[0] == 0) + if (objectNum[doorNum] == 101 && flags[0] == 0) isDoor[doorNum] = 0; - else if (num_obj[doorNum] == 101 && flags[0] == 1 && flags[28] == 1) + else if (objectNum[doorNum] == 101 && flags[0] == 1 && flags[28] == 1) isDoor[doorNum] = 1; - else if (num_obj[doorNum] == 103) + else if (objectNum[doorNum] == 103) isDoor[doorNum] = flags[0]; - else if (num_obj[doorNum] == 104) + else if (objectNum[doorNum] == 104) isDoor[doorNum] = flags[1]; - else if (num_obj[doorNum] == 105) + else if (objectNum[doorNum] == 105) isDoor[doorNum] = flags[1]; - else if (num_obj[doorNum] == 106) + else if (objectNum[doorNum] == 106) isDoor[doorNum] = flags[2]; - else if (num_obj[doorNum] == 107) + else if (objectNum[doorNum] == 107) isDoor[doorNum] = flags[2]; - else if (num_obj[doorNum] == 110) + else if (objectNum[doorNum] == 110) isDoor[doorNum] = flags[6]; - else if (num_obj[doorNum] == 114) + else if (objectNum[doorNum] == 114) isDoor[doorNum] = flags[4]; - else if (num_obj[doorNum] == 115) + else if (objectNum[doorNum] == 115) isDoor[doorNum] = flags[4]; - else if (num_obj[doorNum] == 116 && flags[5] == 0) + else if (objectNum[doorNum] == 116 && flags[5] == 0) isDoor[doorNum] = 0; - else if (num_obj[doorNum] == 116 && flags[5] == 1 && flags[23] == 1) + else if (objectNum[doorNum] == 116 && flags[5] == 1 && flags[23] == 1) isDoor[doorNum] = 1; - else if (num_obj[doorNum] == 117) + else if (objectNum[doorNum] == 117) isDoor[doorNum] = flags[5]; - else if (num_obj[doorNum] == 120) + else if (objectNum[doorNum] == 120) isDoor[doorNum] = flags[8]; - else if (num_obj[doorNum] == 122) + else if (objectNum[doorNum] == 122) isDoor[doorNum] = flags[7]; } } @@ -2397,11 +2397,11 @@ void DrasculaEngine::hare_claro() { updatePalette(); } -void DrasculaEngine::empieza_andar() { +void DrasculaEngine::startWalking() { hare_se_mueve = 1; - step_x = PASO_HARE_X; - step_y = PASO_HARE_Y; + stepX = PASO_HARE_X; + stepY = PASO_HARE_Y; if (num_ejec == 2) { if ((sitio_x < hare_x) && (sitio_y <= (hare_y + alto_hare))) @@ -2435,48 +2435,48 @@ void DrasculaEngine::pon_hare() { int pos_hare[6]; int r; - if (hare_se_mueve == 1 && step_x == PASO_HARE_X) { - for (r = 0; r < step_x; r++) { + if (hare_se_mueve == 1 && stepX == PASO_HARE_X) { + for (r = 0; r < stepX; r++) { if (num_ejec != 2) { if (sentido_hare == 0 && sitio_x - r == hare_x + ancho_hare / 2) { hare_se_mueve = 0; - step_x = PASO_HARE_X; - step_y = PASO_HARE_Y; + stepX = PASO_HARE_X; + stepY = PASO_HARE_Y; } if (sentido_hare == 1 && sitio_x + r == hare_x + ancho_hare / 2) { hare_se_mueve = 0; - step_x = PASO_HARE_X; - step_y = PASO_HARE_Y; + stepX = PASO_HARE_X; + stepY = PASO_HARE_Y; hare_x = sitio_x - ancho_hare / 2; hare_y = sitio_y - alto_hare; } } else if (num_ejec == 2) { if (sentido_hare == 0 && sitio_x - r == hare_x) { hare_se_mueve = 0; - step_x = PASO_HARE_X; - step_y = PASO_HARE_Y; + stepX = PASO_HARE_X; + stepY = PASO_HARE_Y; } if (sentido_hare == 1 && sitio_x + r == hare_x + ancho_hare) { hare_se_mueve = 0; - step_x = PASO_HARE_X; - step_y = PASO_HARE_Y; + stepX = PASO_HARE_X; + stepY = PASO_HARE_Y; hare_x = sitio_x - ancho_hare + 4; hare_y = sitio_y - alto_hare; } } } } - if (hare_se_mueve == 1 && step_y == PASO_HARE_Y) { - for (r = 0; r < step_y; r++) { + if (hare_se_mueve == 1 && stepY == PASO_HARE_Y) { + for (r = 0; r < stepY; r++) { if (sentido_hare == 2 && sitio_y - r == hare_y + alto_hare) { hare_se_mueve = 0; - step_x = PASO_HARE_X; - step_y = PASO_HARE_Y; + stepX = PASO_HARE_X; + stepY = PASO_HARE_Y; } if (sentido_hare == 3 && sitio_y + r == hare_y + alto_hare) { hare_se_mueve = 0; - step_x = PASO_HARE_X; - step_y = PASO_HARE_Y; + stepX = PASO_HARE_X; + stepY = PASO_HARE_Y; } } } @@ -2565,7 +2565,7 @@ void DrasculaEngine::pon_hare() { } no_vuelco: - aumenta_num_frame(); + increaseFrameNum(); } } @@ -2573,7 +2573,7 @@ void DrasculaEngine::menu_sin_volcar() { int h, n, x; char texto_icono[13]; - x = sobre_que_objeto(); + x = whichObject(); strcpy(texto_icono, iconName[x]); for (n = 1; n < 43; n++) { @@ -2595,7 +2595,7 @@ void DrasculaEngine::menu_sin_volcar() { print_abc(texto_icono, itemLocations[x].x - 2, itemLocations[x].y - 7); } -void DrasculaEngine::barra_menu() { +void DrasculaEngine::clearMenu() { int n, sobre_verbo = 1; for (n = 0; n < 7; n++) { @@ -2613,25 +2613,25 @@ void DrasculaEngine::removeObject() { updateRoom(); for (n = 1; n < 43; n++){ - if (sobre_que_objeto() == n) { + if (whichObject() == n) { h = inventoryObjects[n]; inventoryObjects[n] = 0; if (h != 0) - lleva_objeto = 1; + takeObject = 1; } } updateEvents(); - if (lleva_objeto == 1) + if (takeObject == 1) chooseObject(h); } -bool DrasculaEngine::sal_de_la_habitacion(int l) { +bool DrasculaEngine::exitRoom(int l) { char salgo[13]; if (num_ejec == 1) { - if (num_obj[l] == 105 && flags[0] == 0) + if (objectNum[l] == 105 && flags[0] == 0) talk(_text[_lang][442], "442.als"); else { updateDoor(l); @@ -2642,16 +2642,16 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; - obj_saliendo = alapuertakeva[l]; + objExit = alapuertakeva[l]; rompo = 1; previousMusic = roomMusic; - if (num_obj[l] == 105) { + if (objectNum[l] == 105) { animation_2_1(); return true; } clearRoom(); - strcpy(salgo, alapantallakeva[l]); + strcpy(salgo, targetScreen[l]); strcat(salgo, ".ald"); hare_x = -1; carga_escoba(salgo); @@ -2663,29 +2663,29 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; - obj_saliendo = alapuertakeva[l]; + objExit = alapuertakeva[l]; rompo = 1; previousMusic = roomMusic; - if (num_obj[l] == 136) + if (objectNum[l] == 136) animation_2_2(); - if (num_obj[l] == 124) + if (objectNum[l] == 124) animation_3_2(); - if (num_obj[l] == 173) { + if (objectNum[l] == 173) { animation_35_2(); return true; - } if (num_obj[l] == 146 && flags[39] == 1) { + } if (objectNum[l] == 146 && flags[39] == 1) { flags[5] = 1; flags[11] = 1; } - if (num_obj[l] == 176 && flags[29] == 1) { + if (objectNum[l] == 176 && flags[29] == 1) { flags[29] = 0; - resta_objeto(23); - suma_objeto(11); + removeObject(23); + addObject(11); } clearRoom(); delete ald; ald = NULL; - strcpy(salgo, alapantallakeva[l]); + strcpy(salgo, targetScreen[l]); strcat(salgo, ".ald"); hare_x =- 1; carga_escoba(salgo); @@ -2699,11 +2699,11 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; - obj_saliendo = alapuertakeva[l]; + objExit = alapuertakeva[l]; rompo = 1; previousMusic = roomMusic; clearRoom(); - strcpy(salgo, alapantallakeva[l]); + strcpy(salgo, targetScreen[l]); strcat(salgo, ".ald"); hare_x =- 1; carga_escoba(salgo); @@ -2717,14 +2717,14 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; - obj_saliendo = alapuertakeva[l]; + objExit = alapuertakeva[l]; rompo = 1; previousMusic = roomMusic; - if (num_obj[l] == 108) + if (objectNum[l] == 108) lleva_al_hare(171, 78); clearRoom(); - strcpy(salgo, alapantallakeva[l]); + strcpy(salgo, targetScreen[l]); strcat(salgo, ".ald"); hare_x = -1; carga_escoba(salgo); @@ -2738,12 +2738,12 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; - obj_saliendo = alapuertakeva[l]; + objExit = alapuertakeva[l]; rompo = 1; previousMusic = roomMusic; hare_se_ve = 1; clearRoom(); - strcpy(salgo, alapantallakeva[l]); + strcpy(salgo, targetScreen[l]); strcat(salgo, ".ald"); hare_x = -1; carga_escoba(salgo); @@ -2757,16 +2757,16 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; - obj_saliendo = alapuertakeva[l]; + objExit = alapuertakeva[l]; rompo = 1; previousMusic = roomMusic; clearRoom(); - strcpy(salgo, alapantallakeva[l]); + strcpy(salgo, targetScreen[l]); strcat(salgo, ".ald"); hare_x = -1; carga_escoba(salgo); - if (obj_saliendo == 105) + if (objExit == 105) animation_19_6(); } } @@ -2774,10 +2774,10 @@ bool DrasculaEngine::sal_de_la_habitacion(int l) { return false; } -bool DrasculaEngine::coge_objeto() { +bool DrasculaEngine::pickupObject() { int h, n; h = pickedObject; - comprueba_flags = 1; + checkFlags = 1; updateRoom(); menu_sin_volcar(); @@ -2787,34 +2787,34 @@ bool DrasculaEngine::coge_objeto() { goto usando_verbos; for (n = 1; n < 43; n++) { - if (sobre_que_objeto() == n && inventoryObjects[n] == 0) { + if (whichObject() == n && inventoryObjects[n] == 0) { inventoryObjects[n] = h; - lleva_objeto = 0; - comprueba_flags = 0; + takeObject = 0; + checkFlags = 0; } } usando_verbos: - if (comprueba_flags == 1) { - if (comprueba_banderas_menu()) + if (checkFlags == 1) { + if (checkMenuFlags()) return true; } updateEvents(); - if (lleva_objeto == 0) + if (takeObject == 0) withoutVerb(); return false; } -bool DrasculaEngine::banderas(int fl) { +bool DrasculaEngine::checkFlag(int fl) { hare_se_mueve = 0; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - hay_answer = 1; + hasAnswer = 1; - if (menu_scr == 1) { + if (menuScreen == 1) { if (num_ejec == 1) { if (pickedObject == kVerbLook && fl == 28) talk(_text[_lang][328], "328.als"); @@ -2824,8 +2824,8 @@ bool DrasculaEngine::banderas(int fl) { talk(_text[_lang][164], "164.als"); flags[23] = 1; withoutVerb(); - suma_objeto(7); - suma_objeto(18); + addObject(7); + addObject(18); } else if (pickedObject == kVerbLook && fl == 22 && flags[23] == 1) talk(_text[_lang][307], "307.als"); else if (pickedObject == kVerbLook && fl == 28) @@ -2869,7 +2869,7 @@ bool DrasculaEngine::banderas(int fl) { else if (pickedObject == kVerbLook && fl == 23) talk(_text[_lang][152], "152.als"); else - hay_answer = 0; + hasAnswer = 0; } else if (num_ejec == 3) { if (pickedObject == kVerbLook && fl == 22) talk(_text[_lang][307], "307.als"); @@ -2914,13 +2914,13 @@ bool DrasculaEngine::banderas(int fl) { else if (pickedObject == kVerbLook && fl == 23) talk(_text[_lang][152], "152.als"); else - hay_answer = 0; + hasAnswer = 0; } else if (num_ejec == 4) { if ((pickedObject == 18 && fl == 19) || (pickedObject == 19 && fl == 18)) { withoutVerb(); chooseObject(21); - resta_objeto(18); - resta_objeto(19); + removeObject(18); + removeObject(19); } else if ((pickedObject == 14 && fl == 19) || (pickedObject == 19 && fl == 14)) talk(_text[_lang][484], "484.als"); else if (pickedObject == kVerbLook && fl == 28) @@ -2964,7 +2964,7 @@ bool DrasculaEngine::banderas(int fl) { else if (pickedObject == kVerbLook && fl == 22) talk(_text[_lang][161], "161.als"); else - hay_answer = 0; + hasAnswer = 0; } else if (num_ejec == 5) { if (pickedObject == kVerbLook && fl == 28) talk(_text[_lang][328], "328.als"); @@ -2992,7 +2992,7 @@ bool DrasculaEngine::banderas(int fl) { else if (pickedObject == kVerbLook && fl == 20) talk(_text[_lang][162], "162.als"); else - hay_answer = 0; + hasAnswer = 0; } else if (num_ejec == 6) { if (pickedObject == kVerbLook && fl == 28) talk(_text[_lang][328], "328.als"); @@ -3004,7 +3004,7 @@ bool DrasculaEngine::banderas(int fl) { else if (pickedObject == kVerbLook && fl == 21) talk(_text[_lang][441], "441.als"); else - hay_answer = 0; + hasAnswer = 0; } } else { if (num_ejec == 1) { @@ -3025,7 +3025,7 @@ bool DrasculaEngine::banderas(int fl) { else if (roomNumber == 63) room_63(fl); else - hay_answer = 0; + hasAnswer = 0; } else if (num_ejec == 2) { if (pickedObject == kVerbLook && fl == 50) talk(_text[_lang][308], "308.als"); @@ -3077,7 +3077,7 @@ bool DrasculaEngine::banderas(int fl) { else if (roomNumber == 19) room_19(fl); else - hay_answer = 0; + hasAnswer = 0; } else if (num_ejec == 3) { if (pickedObject == kVerbLook && fl == 50) talk(_text[_lang][309], "309.als"); @@ -3095,7 +3095,7 @@ bool DrasculaEngine::banderas(int fl) { if (room_13(fl)) return true; } else - hay_answer = 0; + hasAnswer = 0; } else if (num_ejec == 4) { if (roomNumber == 28) talk(_text[_lang][178], "178.als"); @@ -3145,7 +3145,7 @@ bool DrasculaEngine::banderas(int fl) { else if (roomNumber == 44) room_44(fl); else - hay_answer = 0; + hasAnswer = 0; } else if (num_ejec == 5) { if (pickedObject == kVerbLook && fl == 50) talk("Cuanto mas me miro, mas me gusto", "54.als"); @@ -3173,7 +3173,7 @@ bool DrasculaEngine::banderas(int fl) { if (room_56(fl)) return true; } else - hay_answer = 0; + hasAnswer = 0; } else if (num_ejec == 6) { if (pickedObject == kVerbLook && fl == 50 && flags[0] == 1) talk(_text[_lang][308], "308.als"); @@ -3190,7 +3190,7 @@ bool DrasculaEngine::banderas(int fl) { else if (pickedObject == kVerbTalk && fl == 50) talk(_text[_lang][314], "314.als" ); else if (roomNumber == 102) - room_pendulo(fl); + room_pendulum(fl); else if (roomNumber == 58) room_58(fl); else if (roomNumber == 59) @@ -3201,31 +3201,31 @@ bool DrasculaEngine::banderas(int fl) { } else if (roomNumber == 61) room_61(fl); else - hay_answer = 0; + hasAnswer = 0; } } - if (hay_answer == 0 && hay_nombre == 1) + if (hasAnswer == 0 && hasName == 1) room_0(); - else if (hay_answer == 0 && menu_scr == 1) + else if (hasAnswer == 0 && menuScreen == 1) room_0(); return false; } -void DrasculaEngine::cursor_mesa() { - int pos_cursor[8]; +void DrasculaEngine::setCursorTable() { + int cursorPos[8]; - pos_cursor[0] = 225; - pos_cursor[1] = 56; - pos_cursor[2] = mouseX - 20; - pos_cursor[3] = mouseY - 12; - pos_cursor[4] = 40; - pos_cursor[5] = 25; + cursorPos[0] = 225; + cursorPos[1] = 56; + cursorPos[2] = mouseX - 20; + cursorPos[3] = mouseY - 12; + cursorPos[4] = 40; + cursorPos[5] = 25; - copyRectClip(pos_cursor, dir_mesa, dir_zona_pantalla); + copyRectClip(cursorPos, dir_mesa, dir_zona_pantalla); } -void DrasculaEngine::introduce_nombre() { +void DrasculaEngine::enterName() { Common::KeyCode key; int v = 0, h = 0; char select2[23]; @@ -3235,7 +3235,7 @@ void DrasculaEngine::introduce_nombre() { copyBackground(115, 14, 115, 14, 176, 9, dir_dibujo1, dir_zona_pantalla); print_abc(select2, 117, 15); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - key = getscan(); + key = getScan(); delay(70); if (key != 0) { if (key >= 0 && key <= 0xFF && isalpha(key)) @@ -3273,22 +3273,22 @@ void DrasculaEngine::introduce_nombre() { } } -void DrasculaEngine::para_grabar(char nom_game[]) { - saveGame(nom_game); +void DrasculaEngine::para_grabar(char gameName[]) { + saveGame(gameName); playSound("99.als"); stopSound(); } void DrasculaEngine::OpenSSN(const char *Name, int Pause) { MiVideoSSN = (byte *)malloc(64256); - GlobalSpeed = 1000 / Pause; + globalSpeed = 1000 / Pause; FrameSSN = 0; UsingMem = 0; if (MiVideoSSN == NULL) return; - _Sesion = new Common::File; - _Sesion->open(Name); - mSesion = TryInMem(_Sesion); + _Session = new Common::File; + _Session->open(Name); + mSession = TryInMem(_Session); LastFrame = _system->getMillis(); } @@ -3298,18 +3298,18 @@ int DrasculaEngine::PlayFrameSSN() { byte *BufferSSN; if (!UsingMem) - _Sesion->read(&CHUNK, 1); + _Session->read(&CHUNK, 1); else { - memcpy(&CHUNK, mSesion, 1); - mSesion += 1; + memcpy(&CHUNK, mSession, 1); + mSession += 1; } switch (CHUNK) { case SET_PAL: if (!UsingMem) - _Sesion->read(dacSSN, 768); + _Session->read(dacSSN, 768); else { - memcpy(dacSSN, mSesion, 768); - mSesion += 768; + memcpy(dacSSN, mSession, 768); + mSession += 768; } set_dacSSN(dacSSN); break; @@ -3318,22 +3318,22 @@ int DrasculaEngine::PlayFrameSSN() { break; case INIT_FRAME: if (!UsingMem) { - _Sesion->read(&CMP, 1); - _Sesion->read(&Lengt, 4); + _Session->read(&CMP, 1); + _Session->read(&Lengt, 4); } else { - memcpy(&CMP, mSesion, 1); - mSesion += 1; - memcpy(&Lengt, mSesion, 4); - mSesion += 4; + memcpy(&CMP, mSession, 1); + mSession += 1; + memcpy(&Lengt, mSession, 4); + mSession += 4; } if (CMP == CMP_RLE) { if (!UsingMem) { BufferSSN = (byte *)malloc(Lengt); - _Sesion->read(BufferSSN, Lengt); + _Session->read(BufferSSN, Lengt); } else { BufferSSN = (byte *)malloc(Lengt); - memcpy(BufferSSN, mSesion, Lengt); - mSesion += Lengt; + memcpy(BufferSSN, mSession, Lengt); + mSession += Lengt; } Des_RLE(BufferSSN, MiVideoSSN); free(BufferSSN); @@ -3352,11 +3352,11 @@ int DrasculaEngine::PlayFrameSSN() { if (CMP == CMP_OFF) { if (!UsingMem) { BufferSSN = (byte *)malloc(Lengt); - _Sesion->read(BufferSSN, Lengt); + _Session->read(BufferSSN, Lengt); } else { BufferSSN = (byte *)malloc(Lengt); - memcpy(BufferSSN, mSesion, Lengt); - mSesion += Lengt; + memcpy(BufferSSN, mSession, Lengt); + mSession += Lengt; } Des_OFF(BufferSSN, MiVideoSSN, Lengt); free(BufferSSN); @@ -3390,24 +3390,24 @@ void DrasculaEngine::EndSSN() { if (UsingMem) free(pointer); else { - _Sesion->close(); - delete _Sesion; + _Session->close(); + delete _Session; } } -byte *DrasculaEngine::TryInMem(Common::File *Sesion) { +byte *DrasculaEngine::TryInMem(Common::File *Session) { int Lengt; - Sesion->seek(0, SEEK_END); - Lengt = Sesion->pos(); - Sesion->seek(0, SEEK_SET); + Session->seek(0, SEEK_END); + Lengt = Session->pos(); + Session->seek(0, SEEK_SET); pointer = (byte *)malloc(Lengt); if (pointer == NULL) return NULL; - Sesion->read(pointer, Lengt); + Session->read(pointer, Lengt); UsingMem = 1; - Sesion->close(); - delete Sesion; + Session->close(); + delete Session; return pointer; } @@ -3458,9 +3458,9 @@ void DrasculaEngine::MixVideo(byte *OldScreen, byte *NewScreen) { void DrasculaEngine::WaitFrameSSN() { uint32 now; - while ((now = _system->getMillis()) - LastFrame < ((uint32) GlobalSpeed)) - _system->delayMillis(GlobalSpeed - (now - LastFrame)); - LastFrame = LastFrame + GlobalSpeed; + while ((now = _system->getMillis()) - LastFrame < ((uint32) globalSpeed)) + _system->delayMillis(globalSpeed - (now - LastFrame)); + LastFrame = LastFrame + globalSpeed; } byte *DrasculaEngine::loadPCX(byte *NamePcc) { @@ -3551,11 +3551,11 @@ void DrasculaEngine::quadrant_1() { if (distance_x < distance_y) { direccion_hare = 0; sentido_hare = 2; - step_x = (int)(distance_x / (distance_y / PASO_HARE_Y)); + stepX = (int)(distance_x / (distance_y / PASO_HARE_Y)); } else { direccion_hare = 7; sentido_hare = 0; - step_y = (int)(distance_y / (distance_x / PASO_HARE_X)); + stepY = (int)(distance_y / (distance_x / PASO_HARE_X)); } } @@ -3572,11 +3572,11 @@ void DrasculaEngine::quadrant_2() { if (distance_x < distance_y) { direccion_hare = 1; sentido_hare = 2; - step_x = (int)(distance_x / (distance_y / PASO_HARE_Y)); + stepX = (int)(distance_x / (distance_y / PASO_HARE_Y)); } else { direccion_hare = 2; sentido_hare = 1; - step_y = (int)(distance_y / (distance_x / PASO_HARE_X)); + stepY = (int)(distance_y / (distance_x / PASO_HARE_X)); } } @@ -3593,11 +3593,11 @@ void DrasculaEngine::quadrant_3() { if (distance_x < distance_y) { direccion_hare = 5; sentido_hare = 3; - step_x = (int)(distance_x / (distance_y / PASO_HARE_Y)); + stepX = (int)(distance_x / (distance_y / PASO_HARE_Y)); } else { direccion_hare = 6; sentido_hare = 0; - step_y = (int)(distance_y / (distance_x / PASO_HARE_X)); + stepY = (int)(distance_y / (distance_x / PASO_HARE_X)); } } @@ -3614,19 +3614,19 @@ void DrasculaEngine::quadrant_4() { if (distance_x < distance_y) { direccion_hare = 4; sentido_hare = 3; - step_x = (int)(distance_x / (distance_y / PASO_HARE_Y)); + stepX = (int)(distance_x / (distance_y / PASO_HARE_Y)); } else { direccion_hare = 3; sentido_hare = 1; - step_y = (int)(distance_y / (distance_x / PASO_HARE_X)); + stepY = (int)(distance_y / (distance_x / PASO_HARE_X)); } } -void DrasculaEngine::saveGame(char nom_game[]) { +void DrasculaEngine::saveGame(char gameName[]) { Common::OutSaveFile *out; int l; - if (!(out = _saveFileMan->openForSaving(nom_game))) { + if (!(out = _saveFileMan->openForSaving(gameName))) { error("no puedo abrir el archivo"); } out->writeSint32LE(num_ejec); @@ -3643,17 +3643,17 @@ void DrasculaEngine::saveGame(char nom_game[]) { out->writeSint32LE(flags[l]); } - out->writeSint32LE(lleva_objeto); + out->writeSint32LE(takeObject); out->writeSint32LE(pickedObject); out->finalize(); if (out->ioFailed()) - warning("Can't write file '%s'. (Disk full?)", nom_game); + warning("Can't write file '%s'. (Disk full?)", gameName); delete out; } -void DrasculaEngine::aumenta_num_frame() { +void DrasculaEngine::increaseFrameNum() { diff_vez = vez() - conta_vez; if (diff_vez >= 6) { @@ -3663,17 +3663,17 @@ void DrasculaEngine::aumenta_num_frame() { num_frame = 0; if (direccion_hare == 0 || direccion_hare == 7) { - hare_x = hare_x - step_x; - hare_y = hare_y - step_y; + hare_x = hare_x - stepX; + hare_y = hare_y - stepY; } else if (direccion_hare == 1 || direccion_hare == 2) { - hare_x = hare_x + step_x; - hare_y = hare_y - step_y; + hare_x = hare_x + stepX; + hare_y = hare_y - stepY; } else if (direccion_hare == 3 || direccion_hare == 4) { - hare_x = hare_x + step_x; - hare_y = hare_y + step_y; + hare_x = hare_x + stepX; + hare_y = hare_y + stepY; } else if (direccion_hare == 5 || direccion_hare == 6) { - hare_x = hare_x - step_x; - hare_y = hare_y + step_y; + hare_x = hare_x - stepX; + hare_y = hare_y + stepY; } } @@ -3685,7 +3685,7 @@ void DrasculaEngine::aumenta_num_frame() { } } -int DrasculaEngine::sobre_que_objeto() { +int DrasculaEngine::whichObject() { int n = 0; for (n = 1; n < 43; n++) { @@ -3697,14 +3697,14 @@ int DrasculaEngine::sobre_que_objeto() { return n; } -bool DrasculaEngine::comprueba_banderas_menu() { +bool DrasculaEngine::checkMenuFlags() { int h, n; for (n = 0; n < 43; n++) { - if (sobre_que_objeto() == n) { + if (whichObject() == n) { h = inventoryObjects[n]; if (h != 0) - if (banderas(h)) + if (checkFlag(h)) return true; } } @@ -3712,7 +3712,7 @@ bool DrasculaEngine::comprueba_banderas_menu() { return false; } -void DrasculaEngine::conversa(const char *nom_fich) { +void DrasculaEngine::converse(const char *nom_fich) { int h; int game1 = 1, game2 = 1, game3 = 1, game4 = 1; char phrase1[78]; @@ -3912,7 +3912,7 @@ bucle_opc: goto bucle_opc; if (num_ejec == 2) - loadPic(fondo_y_menu); + loadPic(menuBackground); else loadPic("99.alg"); decompressPic(dir_hare_fondo, 1); @@ -3984,7 +3984,7 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta else if (c == 0xad) x_de_letra = X_ABRE_EXCLAMACION_OPC; else if (c == ';') - x_de_letra = X_PUNTO_Y_COMA_OPC; + x_de_letra = X_pointY_COMA_OPC; else if (c == '>') x_de_letra = X_GREATER_THAN_OPC; else if (c == '<') @@ -4031,11 +4031,11 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta void DrasculaEngine::response(int funcion) { if (num_ejec == 1) { if (funcion == 10) - talk_borracho(_textb[_lang][1], "B1.als"); + talk_drunk(_textb[_lang][1], "B1.als"); else if (funcion == 11) - talk_borracho(_textb[_lang][2], "B2.als"); + talk_drunk(_textb[_lang][2], "B2.als"); else if (funcion == 12) - talk_borracho(_textb[_lang][3], "B3.als"); + talk_drunk(_textb[_lang][3], "B3.als"); } else if (num_ejec == 2) { if (funcion == 8) animation_8_2(); @@ -4109,7 +4109,7 @@ void DrasculaEngine::response(int funcion) { } } -void DrasculaEngine::suma_objeto(int osj) { +void DrasculaEngine::addObject(int osj) { int h, position = 0; for (h = 1; h < 43; h++) { @@ -4262,13 +4262,13 @@ void DrasculaEngine::updateData() { void DrasculaEngine::anda_pabajo() { direccion_hare = 4; sentido_hare = 3; - step_x = 0; + stepX = 0; } void DrasculaEngine::anda_parriba() { direccion_hare = 0; sentido_hare = 2; - step_x = 0; + stepX = 0; } void DrasculaEngine::pon_vb() { @@ -4307,8 +4307,8 @@ void DrasculaEngine::pon_vb() { copyRectClip(pos_vb, dir_hare_frente, dir_zona_pantalla); } -void DrasculaEngine::lleva_vb(int punto_x) { - if (punto_x < vb_x) +void DrasculaEngine::lleva_vb(int pointX) { + if (pointX < vb_x) sentido_vb = 0; else sentido_vb = 1; @@ -4320,11 +4320,11 @@ void DrasculaEngine::lleva_vb(int punto_x) { updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); if (sentido_vb == 0) { vb_x = vb_x - 5; - if (vb_x <= punto_x) + if (vb_x <= pointX) break; } else { vb_x = vb_x + 5; - if (vb_x >= punto_x) + if (vb_x >= pointX) break; } pause(5); @@ -4391,21 +4391,21 @@ void DrasculaEngine::openDoor(int nflag, int doorNum) { } } -void DrasculaEngine::mapa() { +void DrasculaEngine::showMap() { int l, veo = 0; for (l = 0; l < numRoomObjs; l++) { if (mouseX > x1[l] && mouseY > y1[l] && mouseX < x2[l] && mouseY < y2[l] && visible[l] == 1) { - strcpy(texto_nombre, objName[l]); - hay_nombre = 1; + strcpy(textName, objName[l]); + hasName = 1; veo = 1; } } if (veo == 0) - hay_nombre = 0; + hasName = 0; } void DrasculaEngine::grr() { @@ -4428,12 +4428,12 @@ void DrasculaEngine::grr() { copyBackground(253, 110, 150, 65, 20, 30, dir_dibujo3, dir_zona_pantalla); if (withVoices == 0) - centra_texto(".groaaarrrrgghhh!", 153, 65); + centerText(".groaaarrrrgghhh!", 153, 65); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); bucless: - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -4452,7 +4452,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::activa_pendulo() { +void DrasculaEngine::activatePendulum() { flags[1] = 2; hare_se_ve = 0; roomNumber = 102; @@ -4467,7 +4467,7 @@ void DrasculaEngine::activa_pendulo() { copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_dibujo3); - conta_ciego_vez = vez(); + conta_blind_vez = vez(); } void DrasculaEngine::closeDoor(int nflag, int doorNum) { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 1cceb377e3..7008c30ab0 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -116,7 +116,7 @@ struct RoomTalkAction; #define X_COMILLAS 51 #define X_CIERRA_EXCLAMACION 60 #define X_ABRE_EXCLAMACION 69 -#define X_PUNTO_Y_COMA 78 +#define X_pointY_COMA 78 #define X_GREATER_THAN 87 #define X_LESSER_THAN 96 #define X_DOLAR 105 @@ -179,7 +179,7 @@ struct RoomTalkAction; #define X_COMILLAS_OPC 45 #define X_CIERRA_EXCLAMACION_OPC 52 #define X_ABRE_EXCLAMACION_OPC 59 -#define X_PUNTO_Y_COMA_OPC 66 +#define X_pointY_COMA_OPC 66 #define X_GREATER_THAN_OPC 73 #define X_LESSER_THAN_OPC 80 #define X_DOLAR_OPC 87 @@ -271,11 +271,10 @@ public: byte *dir_zona_pantalla; byte *dir_hare_frente; byte *dir_texto; - byte *dir_pendulo; + byte *dir_pendulum; byte cPal[768]; - byte *Buffer_pcx; - long LenFile; + byte *pcxBuffer; Common::File *ald, *sku; @@ -285,24 +284,24 @@ public: char roomDisk[20]; char currentData[20]; int numRoomObjs; - char fondo_y_menu[20]; + char menuBackground[20]; char objName[30][20]; char iconName[44][13]; - int num_obj[40], visible[40], isDoor[40]; + int objectNum[40], visible[40], isDoor[40]; int sitiobj_x[40], sitiobj_y[40], sentidobj[40]; int inventoryObjects[43]; - char alapantallakeva[40][20]; + char targetScreen[40][20]; int x_alakeva[40], y_alakeva[40], sentido_alkeva[40], alapuertakeva[40]; int x1[40], y1[40], x2[40], y2[40]; - int lleva_objeto, pickedObject; + int takeObject, pickedObject; int withVoices; - int menu_bar, menu_scr, hay_nombre; - char texto_nombre[20]; - int frame_ciego; - int frame_ronquido; - int frame_murcielago; + int menuBar, menuScreen, hasName; + char textName[20]; + int frame_blind; + int frame_snore; + int frame_bat; int c_mirar; int c_poder; @@ -310,28 +309,28 @@ public: int frame_y; int hare_x, hare_y, hare_se_mueve, direccion_hare, sentido_hare, num_frame, hare_se_ve; - int sitio_x, sitio_y, comprueba_flags; + int sitio_x, sitio_y, checkFlags; int rompo, rompo2; - int step_x, step_y; - int alto_hare, ancho_hare, alto_pies; + int stepX, stepY; + int alto_hare, ancho_hare, feetHeight; int alto_talk, ancho_talk; int suelo_x1, suelo_y1, suelo_x2, suelo_y2; int near, far; - int sentido_final, anda_a_objeto; - int obj_saliendo; + int sentido_final, walkToObject; + int objExit; int diff_vez, conta_vez; - int hay_answer; - int conta_ciego_vez; - int cambio_de_color; + int hasAnswer; + int conta_blind_vez; + int changeColor; int rompo_y_salgo; int vb_x, sentido_vb, vb_se_mueve, frame_vb; float newHeight, newWidth; int factor_red[202]; int frame_piano; - int frame_borracho; + int frame_drunk; int frame_velas; int color_solo; - int parpadeo; + int blinking; int x_igor, y_igor, sentido_igor; int x_dr, y_dr, sentido_dr; int x_bj, y_bj, sentido_bj; @@ -339,9 +338,9 @@ public: int term_int; int num_ejec; int hay_que_load; - char nom_partida[13]; + char saveName[13]; int _color; - int corta_musica; + int musicStopped; char select[23]; int hay_seleccion; int mouseX; @@ -356,16 +355,16 @@ public: void talk_vb(const char *, const char *); void talk_vbpuerta(int); void talk_vbpuerta(const char *said, const char *filename); - void talk_ciego(const char *, const char *, const char *); + void talk_blind(const char *, const char *, const char *); void talk_hacker(const char *, const char *); void pickObject(int); void anda_parriba(); void anda_pabajo(); void pon_vb(); - void lleva_vb(int punto_x); + void lleva_vb(int pointX); void hipo_sin_nadie(int counter); void openDoor(int nflag, int doorNum); - void mapa(); + void showMap(); void animation_1_1(); void animation_2_1(); void animation_1_2(); @@ -452,36 +451,36 @@ public: void carga_escoba(const char *); void clearRoom(); void lleva_al_hare(int, int); - void mueve_cursor(); - void comprueba_objetos(); + void moveCursor(); + void checkObjects(); void elige_en_barra(); bool comprueba1(); bool comprueba2(); - Common::KeyCode getscan(); - void elige_verbo(int); + Common::KeyCode getScan(); + void selectVerb(int); void mesa(); bool saves(); void print_abc(const char *, int, int); void delay(int ms); bool confirma_salir(); - void salva_pantallas(); + void screenSaver(); void chooseObject(int objeto); - void suma_objeto(int); - int resta_objeto(int osj); + void addObject(int); + int removeObject(int osj); void fliplay(const char *filefli, int vel); - void FundeDelNegro(int VelocidadDeFundido); - char LimitaVGA(char valor); + void fadeFromBlack(int VelocidadDeFundido); + char LimitaVGA(char value); void color_abc(int cl); - void centra_texto(const char *,int,int); + void centerText(const char *,int,int); void playSound(const char *); bool anima(const char *animation, int FPS); void stopSound_corte(); - void FundeAlNegro(int VelocidadDeFundido); + void fadeToBlack(int VelocidadDeFundido); void pause(int); void talk_dr_grande(const char *said, const char *filename); - void pon_igor(); - void pon_bj(); - void pon_dr(); + void placeIgor(); + void placeBJ(); + void placeDrascula(); void talkInit(const char *filename); void talk_igor_dch(int); void talk_igor_dch(const char *said, const char *filename); @@ -495,7 +494,7 @@ public: void talk_tabernero(const char *said, const char *filename); void talk_igorpuerta(const char *said, const char *filename); void talk_igor_peluca(const char *said, const char *filename); - void hipo(int); + void hiccup(int); void stopSound(); void talk_bj(int); void talk_bj(const char *, const char *); @@ -508,7 +507,7 @@ public: void stopMusic(); int musicStatus(); void updateRoom(); - bool carga_partida(const char *); + bool loadGame(const char *); void updateDoor(int); void animastopSound_corte(); void color_hare(); @@ -517,18 +516,18 @@ public: void paleta_hare_oscuro(); void hare_claro(); void updateData(); - void empieza_andar(); + void startWalking(); void updateRefresh(); void updateRefresh_pre(); void pon_hare(); void menu_sin_volcar(); - void barra_menu(); + void clearMenu(); void removeObject(); - bool sal_de_la_habitacion(int); - bool coge_objeto(); - bool banderas(int); - void cursor_mesa(); - void introduce_nombre(); + bool exitRoom(int); + bool pickupObject(); + bool checkFlag(int); + void setCursorTable(); + void enterName(); void para_grabar(char[]); int LookForFree(); void OpenSSN(const char *Name, int Pause); @@ -537,7 +536,7 @@ public: void Des_RLE(byte *BufferRLE, byte *MiVideoRLE); void Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght); void set_dacSSN(byte *dacSSN); - byte *TryInMem(Common::File *Sesion); + byte *TryInMem(Common::File *Session); void EndSSN(); int PlayFrameSSN(); @@ -548,13 +547,13 @@ public: byte *pointer; int UsingMem; - Common::File *_Sesion; + Common::File *_Session; byte CHUNK; byte CMP, dacSSN[768]; byte *MiVideoSSN; - byte *mSesion; + byte *mSession; int FrameSSN; - int GlobalSpeed; + int globalSpeed; uint32 LastFrame; int frame_pen; @@ -574,9 +573,9 @@ public: void update_62_pre(); void update_63(); void saveGame(char[]); - void aumenta_num_frame(); - int sobre_que_objeto(); - bool comprueba_banderas_menu(); + void increaseFrameNum(); + int whichObject(); + bool checkMenuFlags(); bool roomParse(RoomTalkAction*, int); void room_0(); void room_1(int); @@ -609,10 +608,10 @@ public: void room_44(int); void room_62(int); void room_63(int); - void conversa(const char *); + void converse(const char *); void print_abc_opc(const char *, int, int, int); void response(int); - void talk_borracho(const char *said, const char *filename); + void talk_drunk(const char *said, const char *filename); void talk_pianista(const char *said, const char *filename); void MusicFadeout(); @@ -670,15 +669,15 @@ public: void update_56_pre(); void update_50(); void update_57(); - void talk_igor_sentado(const char *, const char *); - void talk_lobo(const char *said, const char *filename); + void talk_igor_seated(const char *, const char *); + void talk_wolf(const char *said, const char *filename); void talk_mus(const char *said, const char *filename); void room_58(int); void room_59(int); bool room_60(int); void room_61(int); - void room_pendulo(int); - void update_pendulo(); + void room_pendulum(int); + void update_pendulum(); void update_58(); void update_58_pre(); void update_59_pre(); @@ -701,12 +700,12 @@ public: void animation_15_6(); void animation_18_6(); void animation_19_6(); - void activa_pendulo(); + void activatePendulum(); void talk_pen(const char *, const char *); void talk_pen2(const char *, const char *); void talk_taber2(const char *, const char *); - void talk_bj_cama(int); - void talk_bj_cama(const char *said, const char * filename); + void talk_bj_bed(int); + void talk_bj_bed(const char *said, const char * filename); void talk_htel(const char *said, const char *filename); private: diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 50f1110c23..1c2bddfeea 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -297,7 +297,7 @@ void DrasculaEngine::room_1(int fl) { } else if (pickedObject == kVerbLook && fl == 120 && flags[8] == 0) talk(14); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_3(int fl) { @@ -336,7 +336,7 @@ void DrasculaEngine::room_3(int fl) { talk(185); talk(186); } else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_4(int fl) { @@ -350,7 +350,7 @@ void DrasculaEngine::room_4(int fl) { if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; } else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_5(int fl) { @@ -361,9 +361,9 @@ void DrasculaEngine::room_5(int fl) { talk(14); else if (pickedObject == 10 && fl == 136) { animation_5_2(); - resta_objeto(10); + removeObject(10); } else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_6(int fl){ @@ -422,9 +422,9 @@ void DrasculaEngine::room_6(int fl){ visible[4] = 0; flags[10] = 1; } else if (pickedObject == kVerbOpen && fl == 140) - hay_answer = 1; + hasAnswer = 1; else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_7(int fl){ @@ -439,7 +439,7 @@ void DrasculaEngine::room_7(int fl){ if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; } else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_8(int fl) { @@ -452,7 +452,7 @@ void DrasculaEngine::room_8(int fl) { } else if (pickedObject == kVerbLook && fl == 147) talk(59); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_9(int fl){ @@ -468,10 +468,10 @@ void DrasculaEngine::room_9(int fl){ animation_33_2(); else if (pickedObject == 7 && fl == 51) { animation_6_2(); - resta_objeto(7); + removeObject(7); pickObject(14);} else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_12(int fl){ @@ -483,7 +483,7 @@ void DrasculaEngine::room_12(int fl){ else if (pickedObject == kVerbClose && fl == 156) closeDoor(16, 4); else - hay_answer = 0; + hasAnswer = 0; } bool DrasculaEngine::room_13(int fl) { @@ -493,14 +493,14 @@ bool DrasculaEngine::room_13(int fl) { talk(412); strcpy(objName[1], "yoda"); } else if (pickedObject == kVerbTalk && fl == 51) - conversa("op_7.cal"); + converse("op_7.cal"); else if (pickedObject == 19 && fl == 51) animation_1_3(); else if (pickedObject == 9 && fl == 51) { animation_2_3(); return true; } else - hay_answer = 0; + hasAnswer = 0; return false; } @@ -534,7 +534,7 @@ void DrasculaEngine::room_14(int fl) { else if (pickedObject == kVerbLook && fl == 204) talk(171); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_15(int fl) { @@ -559,7 +559,7 @@ void DrasculaEngine::room_15(int fl) { talk(_text[_lang][338], "338.als"); flags[27] = 0; pickObject(19); - resta_objeto(18); + removeObject(18); } else if (pickedObject == kVerbMove && fl == 188 && flags[27] == 0) { animation_34_2(); talk(339); @@ -577,7 +577,7 @@ void DrasculaEngine::room_15(int fl) { else if (pickedObject == kVerbOpen && fl == 206) talk(174); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_16(int fl) { @@ -624,7 +624,7 @@ void DrasculaEngine::room_16(int fl) { } else if (pickedObject == kVerbTalk && fl == 187) talk(_text[_lang][345], "345.als"); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_17(int fl) { @@ -646,9 +646,9 @@ void DrasculaEngine::room_17(int fl) { talk(_text[_lang][347], "347.als"); flags[29] = 1; pickObject(23); - resta_objeto(11); + removeObject(11); } else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_18(int fl) { @@ -703,16 +703,16 @@ void DrasculaEngine::room_18(int fl) { talk(_text[_lang][347], "347.als"); flags[29] = 1; pickObject(23); - resta_objeto(11); + removeObject(11); } else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_19(int fl) { if (pickedObject == kVerbLook && fl == 214) talk(_text[_lang][191], "191.als"); else - hay_answer = 0; + hasAnswer = 0; } bool DrasculaEngine::room_21(int fl) { @@ -734,7 +734,7 @@ bool DrasculaEngine::room_21(int fl) { animation_9_4(); return true; } else - hay_answer = 0; + hasAnswer = 0; return false; } @@ -750,10 +750,10 @@ void DrasculaEngine::room_22(int fl) { anima("up.bin",14); flags[26]=1; playSound("s1.als"); - hipo(14); + hiccup(14); stopSound(); withoutVerb(); - resta_objeto(22); + removeObject(22); updateData(); sentido_hare = 3; talk(_text[_lang][499], "499.als"); @@ -769,7 +769,7 @@ void DrasculaEngine::room_22(int fl) { visible[3] = 0; flags[27] = 1; } else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_23(int fl) { @@ -792,7 +792,7 @@ void DrasculaEngine::room_23(int fl) { if (flags[18] == 1) animation_6_4(); } else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_24(int fl) { @@ -807,7 +807,7 @@ void DrasculaEngine::room_24(int fl) { else if (pickedObject == kVerbLook && fl == 151) talk(_text[_lang][461], "461.als"); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_26(int fl) { @@ -862,7 +862,7 @@ void DrasculaEngine::room_26(int fl) { else if (pickedObject == kVerbPick && fl == 168) talk(_text[_lang][477], "477.als"); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_27(int fl) { @@ -883,7 +883,7 @@ void DrasculaEngine::room_27(int fl) { else if (fl == 150) talk(_text[_lang][460], "460.als"); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_29(int fl) { @@ -902,7 +902,7 @@ void DrasculaEngine::room_29(int fl) { else if (pickedObject == kVerbOpen && fl == 156) talk(_text[_lang][467], "467.als"); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_30(int fl) { @@ -933,7 +933,7 @@ void DrasculaEngine::room_30(int fl) { else if (pickedObject == kVerbLook && fl == 158) talk(_text[_lang][469], "469.als"); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_31(int fl) { @@ -950,7 +950,7 @@ void DrasculaEngine::room_31(int fl) { else if (pickedObject == kVerbOpen && fl == 161) talk(_text[_lang][471], "471.als"); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_34(int fl) { @@ -971,7 +971,7 @@ void DrasculaEngine::room_34(int fl) { } else if (pickedObject == kVerbClose && fl == 120) closeDoor(8, 2); else - hay_answer=0; + hasAnswer=0; } void DrasculaEngine::room_35(int fl) { @@ -995,19 +995,19 @@ void DrasculaEngine::room_35(int fl) { visible[3] = 0; flags[17] = 0; } else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_44(int fl) { if (pickedObject == kVerbLook && fl == 172) talk(_text[_lang][428], "428.als"); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_49(int fl){ if (pickedObject == kVerbTalk && fl ==51) - conversa("op_9.cal"); + converse("op_9.cal"); else if (pickedObject == kVerbLook && fl == 51) talk(_text[_lang][132], "132.als"); else if ((pickedObject == 8 && fl == 51) || (pickedObject == 8 && fl == 203)) @@ -1021,7 +1021,7 @@ void DrasculaEngine::room_49(int fl){ else if (pickedObject == kVerbLook && fl == 203) talk(_text[_lang][137], "137.als"); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_53(int fl) { @@ -1051,7 +1051,7 @@ void DrasculaEngine::room_53(int fl) { withoutVerb(); visible[3] = 1; } else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_54(int fl) { @@ -1069,7 +1069,7 @@ void DrasculaEngine::room_54(int fl) { talk(_text[_lang][289], "289.als"); talk_mus(_texte[_lang][2], "E2.als"); talk_mus(_texte[_lang][3], "E3.als"); - conversa("op_10.cal"); + converse("op_10.cal"); flags[12] = 0; flags[14] = 1; } else if (pickedObject == kVerbTalk && fl == 53 && flags[14] == 1) @@ -1087,9 +1087,9 @@ void DrasculaEngine::room_54(int fl) { pause(4); talk(_text[_lang][436], "436.als"); withoutVerb(); - resta_objeto(10); + removeObject(10); } else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_55(int fl) { @@ -1109,7 +1109,7 @@ void DrasculaEngine::room_55(int fl) { stopSound(); lleva_al_hare(hare_x - 3, hare_y + alto_hare + 6); } else - hay_answer = 0; + hasAnswer = 0; } bool DrasculaEngine::room_56(int fl) { @@ -1123,7 +1123,7 @@ bool DrasculaEngine::room_56(int fl) { else if (pickedObject == kVerbLook && fl == 208) talk(_text[_lang][142], "142.als"); else - hay_answer = 0; + hasAnswer = 0; return false; } @@ -1134,19 +1134,19 @@ void DrasculaEngine::room_58(int fl) { else if (pickedObject == kVerbLook && fl == 104) talk(_text[_lang][454], "454.als"); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_59(int fl) { if ((pickedObject == kVerbTalk && fl == 51) || (pickedObject == kVerbLook && fl == 51)) { flags[9] = 1; talk(259); - talk_bj_cama(13); + talk_bj_bed(13); talk(263); - talk_bj_cama(14); + talk_bj_bed(14); pause(40); talk(264); - talk_bj_cama(15); + talk_bj_bed(15); talk(265); flags[9] = 0; if (flags[11] == 0) { @@ -1208,7 +1208,7 @@ void DrasculaEngine::room_59(int fl) { flags[11] = 1; } } else - hay_answer = 0; + hasAnswer = 0; } bool DrasculaEngine::room_60(int fl) { @@ -1219,7 +1219,7 @@ bool DrasculaEngine::room_60(int fl) { else if (pickedObject == kVerbTalk && fl == 52) { talk(_text[_lang][266], "266.als"); talk_taber2(_textt[_lang][1], "t1.als"); - conversa("op_12.cal"); + converse("op_12.cal"); withoutVerb(); pickedObject = 0; } else if (pickedObject == kVerbTalk && fl == 115) @@ -1245,7 +1245,7 @@ bool DrasculaEngine::room_60(int fl) { anima("cnf.bin", 14); talk(_text[_lang][455], "455.als"); } else - hay_answer = 0; + hasAnswer = 0; return false; } @@ -1260,12 +1260,12 @@ void DrasculaEngine::room_61(int fl) { else if (pickedObject == kVerbOpen && fl == 117) talk(_text[_lang][174], "174.als"); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::room_62(int fl) { if (pickedObject == kVerbTalk && fl == 53) - conversa("op_13.cal"); + converse("op_13.cal"); else if (pickedObject == kVerbTalk && fl == 52 && flags[0] == 0) animation_3_1(); else if (pickedObject == kVerbTalk && fl == 52 && flags[0] == 1) @@ -1284,7 +1284,7 @@ void DrasculaEngine::room_62(int fl) { talk(_text[_lang][167], "167.als"); else if (pickedObject == kVerbLook && fl == 103) talk(_text[_lang][166], "166.als"); - else hay_answer = 0; + else hasAnswer = 0; } void DrasculaEngine::room_63(int fl) { @@ -1299,10 +1299,10 @@ void DrasculaEngine::room_63(int fl) { else if (pickedObject == kVerbTalk && fl == 108) talk(_text[_lang][333], "333.als"); else - hay_answer = 0; + hasAnswer = 0; } -void DrasculaEngine::room_pendulo(int fl) { +void DrasculaEngine::room_pendulum(int fl) { if (pickedObject == kVerbLook && fl == 100) talk(_text[_lang][452], "452.als"); else if (pickedObject == kVerbLook && fl == 101) @@ -1314,7 +1314,7 @@ void DrasculaEngine::room_pendulo(int fl) { else if (pickedObject == kVerbPick || pickedObject == kVerbOpen) talk(_text[_lang][453], "453.als"); else - hay_answer = 0; + hasAnswer = 0; } void DrasculaEngine::updateRefresh() { @@ -1339,7 +1339,7 @@ void DrasculaEngine::updateRefresh() { else if (roomNumber == 18) update_18(); else if (roomNumber == 10) - mapa(); + showMap(); } else if (num_ejec == 3) { if (roomNumber == 20) update_20(); @@ -1360,7 +1360,7 @@ void DrasculaEngine::updateRefresh() { update_35(); } else if (num_ejec == 5) { if (roomNumber == 45) - mapa(); + showMap(); else if (roomNumber == 50) update_50(); else if (roomNumber == 57) @@ -1380,7 +1380,7 @@ void DrasculaEngine::updateRefresh_pre() { if (roomNumber == 62) update_62_pre(); else if (roomNumber == 16) - pon_bj(); + placeBJ(); } else if (num_ejec == 2) { if (roomNumber == 1) update_1_pre(); @@ -1440,7 +1440,7 @@ void DrasculaEngine::updateRefresh_pre() { update_56_pre(); } else if (num_ejec == 6) { if (roomNumber == 102) - update_pendulo(); + update_pendulum(); else if (roomNumber == 58) update_58_pre(); else if (roomNumber == 59) @@ -1451,16 +1451,16 @@ void DrasculaEngine::updateRefresh_pre() { } void DrasculaEngine::update_1_pre() { - int cambio_col_antes = cambio_de_color; + int cambio_col_antes = changeColor; if (hare_x > 98 && hare_x < 153) - cambio_de_color = 1; + changeColor = 1; else - cambio_de_color = 0; + changeColor = 0; - if (cambio_col_antes != cambio_de_color && cambio_de_color == 1) + if (cambio_col_antes != changeColor && changeColor == 1) hare_oscuro(); - if (cambio_col_antes != cambio_de_color && cambio_de_color == 0) + if (cambio_col_antes != changeColor && changeColor == 0) hare_claro(); if (flags[8] == 0) @@ -1486,16 +1486,16 @@ void DrasculaEngine::update_2(){ 41, 41, 41, 41, 4, 4, 4, 4}; - if (frame_murcielago == 41) - frame_murcielago = 0; + if (frame_bat == 41) + frame_bat = 0; - pos_murci[0] = murci_x[frame_murcielago]; - pos_murci[1] = murci_y[frame_murcielago]; + pos_murci[0] = murci_x[frame_bat]; + pos_murci[1] = murci_y[frame_bat]; - if (frame_murcielago < 22) { + if (frame_bat < 22) { pos_murci[4] = 37; pos_murci[5] = 21; - } else if (frame_murcielago > 27) { + } else if (frame_bat > 27) { pos_murci[4] = 57; pos_murci[5] = 36; } else { @@ -1507,14 +1507,14 @@ void DrasculaEngine::update_2(){ pos_murci[3] = 19; copyRectClip(pos_murci, dir_dibujo3, dir_zona_pantalla); - diferencia = vez() - conta_ciego_vez; + diferencia = vez() - conta_blind_vez; if (diferencia >= 6) { - frame_murcielago++; - conta_ciego_vez = vez(); + frame_bat++; + conta_blind_vez = vez(); } copyRect(29, 37, 58, 114, 57, 39, dir_dibujo3, dir_zona_pantalla); - mapa(); + showMap(); } void DrasculaEngine::update_3_pre() { @@ -1529,15 +1529,15 @@ void DrasculaEngine::update_3() { } void DrasculaEngine::update_4() { - int cambio_col_antes = cambio_de_color; + int cambio_col_antes = changeColor; if (hare_x > 190) - cambio_de_color = 1; + changeColor = 1; else - cambio_de_color = 0; + changeColor = 0; - if (cambio_col_antes != cambio_de_color && cambio_de_color == 1) + if (cambio_col_antes != changeColor && changeColor == 1) hare_oscuro(); - if (cambio_col_antes != cambio_de_color && cambio_de_color == 0) + if (cambio_col_antes != changeColor && changeColor == 0) hare_claro(); } @@ -1551,17 +1551,17 @@ void DrasculaEngine::update_5() { } void DrasculaEngine::update_6_pre() { - int cambio_col_antes = cambio_de_color; + int cambio_col_antes = changeColor; if ((hare_x > 149 && hare_y + alto_hare > 160 && hare_x < 220 && hare_y + alto_hare < 188) || (hare_x > 75 && hare_y + alto_hare > 183 && hare_x < 145)) - cambio_de_color = 0; + changeColor = 0; else - cambio_de_color = 1; + changeColor = 1; - if (cambio_col_antes != cambio_de_color && cambio_de_color == 1) + if (cambio_col_antes != changeColor && changeColor == 1) hare_oscuro(); - if (cambio_col_antes != cambio_de_color && cambio_de_color == 0) + if (cambio_col_antes != changeColor && changeColor == 0) hare_claro(); if (flags[1] == 0) @@ -1578,21 +1578,21 @@ void DrasculaEngine::update_7_pre() { } void DrasculaEngine::update_9_pre() { - int ciego_x[] = {26, 68, 110, 152, 194, 236, 278, 26, 68}; - int ciego_y[] = {51, 51, 51, 51, 51, 51, 51, 127, 127}; + int blind_x[] = {26, 68, 110, 152, 194, 236, 278, 26, 68}; + int blind_y[] = {51, 51, 51, 51, 51, 51, 51, 127, 127}; int diferencia; - copyRect(ciego_x[frame_ciego], ciego_y[frame_ciego], 122, 57, 41, 72, dir_dibujo3, dir_zona_pantalla); + copyRect(blind_x[frame_blind], blind_y[frame_blind], 122, 57, 41, 72, dir_dibujo3, dir_zona_pantalla); if (flags[9] == 0) { - diferencia = vez() - conta_ciego_vez; + diferencia = vez() - conta_blind_vez; if (diferencia >= 11) { - frame_ciego++; - conta_ciego_vez = vez(); + frame_blind++; + conta_blind_vez = vez(); } - if (frame_ciego == 9) - frame_ciego = 0; + if (frame_blind == 9) + frame_blind = 0; } else - frame_ciego = 3; + frame_blind = 3; } void DrasculaEngine::update_12_pre() { @@ -1614,13 +1614,13 @@ void DrasculaEngine::update_14_pre() { int velas_y[] = {158, 172, 186}; int cirio_x[] = {14, 19, 24}; int pianista_x[] = {1, 91, 61, 31, 91, 31, 1, 61, 31}; - int borracho_x[] = {1, 42, 83, 124, 165, 206, 247, 1}; + int drunk_x[] = {1, 42, 83, 124, 165, 206, 247, 1}; int diferencia; copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, dir_dibujo3, dir_zona_pantalla); copyBackground(cirio_x[frame_velas], 146, 311, 80, 4, 8, dir_dibujo3, dir_zona_pantalla); - if (parpadeo == 5) + if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, dir_dibujo3, dir_zona_pantalla); if (hare_x > 101 && hare_x < 155) copyBackground(31, 138, 178, 51, 18, 16, dir_dibujo3, dir_zona_pantalla); @@ -1632,13 +1632,13 @@ void DrasculaEngine::update_14_pre() { copyBackground(165, 140, 229, 117, 43, 59, dir_dibujo3, dir_zona_pantalla); if (flags[12] == 1) - copyBackground(borracho_x[frame_borracho], 82, 170, 50, 40, 53, dir_dibujo3, dir_zona_pantalla); - diferencia = vez() - conta_ciego_vez; + copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, dir_dibujo3, dir_zona_pantalla); + diferencia = vez() - conta_blind_vez; if (diferencia > 6) { if (flags[12] == 1) { - frame_borracho++; - if (frame_borracho == 8) { - frame_borracho = 0; + frame_drunk++; + if (frame_drunk == 8) { + frame_drunk = 0; flags[12] = 0; } } else if ((_rnd->getRandomNumber(94) == 15) && (flags[13] == 0)) @@ -1650,8 +1650,8 @@ void DrasculaEngine::update_14_pre() { frame_piano++; if (frame_piano == 9) frame_piano = 0; - parpadeo = _rnd->getRandomNumber(10); - conta_ciego_vez = vez(); + blinking = _rnd->getRandomNumber(10); + conta_blind_vez = vez(); } } @@ -1677,21 +1677,21 @@ void DrasculaEngine::update_17() { void DrasculaEngine::update_18_pre() { int diferencia; - int ronquido_x[] = {95, 136, 95, 136, 95, 95, 95, 95, 136, 95, 95, 95, 95, 95, 95, 95}; - int ronquido_y[] = {18, 18, 56, 56, 94, 94, 94, 94, 94, 18, 18, 18, 18, 18, 18, 18}; + int snore_x[] = {95, 136, 95, 136, 95, 95, 95, 95, 136, 95, 95, 95, 95, 95, 95, 95}; + int snore_y[] = {18, 18, 56, 56, 94, 94, 94, 94, 94, 18, 18, 18, 18, 18, 18, 18}; if (flags[21] == 0) { copyBackground(1, 69, 120, 58, 56, 61, dir_dibujo3, dir_zona_pantalla); - copyBackground(ronquido_x[frame_ronquido], ronquido_y[frame_ronquido], 124, 59, 40, 37, dir_dibujo3, dir_zona_pantalla); + copyBackground(snore_x[frame_snore], snore_y[frame_snore], 124, 59, 40, 37, dir_dibujo3, dir_zona_pantalla); } else pon_vb(); - diferencia = vez() - conta_ciego_vez; + diferencia = vez() - conta_blind_vez; if (diferencia > 9) { - frame_ronquido++; - if (frame_ronquido == 16) - frame_ronquido = 0; - conta_ciego_vez = vez(); + frame_snore++; + if (frame_snore == 16) + frame_snore = 0; + conta_blind_vez = vez(); } } @@ -1757,13 +1757,13 @@ void DrasculaEngine::update_26_pre() { if (flags[18] == 0) copyBackground(80, 133, 199, 95, 50, 66, dir_dibujo3, dir_zona_pantalla); - if (parpadeo == 5 && flags[18] == 0) + if (blinking == 5 && flags[18] == 0) copyBackground(52, 172, 226, 106, 3, 4, dir_dibujo3, dir_zona_pantalla); - diferencia = vez() - conta_ciego_vez; + diferencia = vez() - conta_blind_vez; if (diferencia >= 10) { - parpadeo = _rnd->getRandomNumber(10); - conta_ciego_vez = vez(); + blinking = _rnd->getRandomNumber(10); + conta_blind_vez = vez(); } if (flags[20] == 1) @@ -1891,8 +1891,8 @@ void DrasculaEngine::update_58_pre() { if (flags[1] == 0 && flags[0] == 0) copyRect(278, 171, 173, 116, 25, 28, dir_dibujo3, dir_zona_pantalla); if (flags[2] == 0) { - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); } if (flags[3] == 1) copyRect(1, 29, 204, 0, 18, 125, dir_dibujo3, dir_zona_pantalla); @@ -1919,30 +1919,30 @@ void DrasculaEngine::update_60_pre() { int diferencia; if (flags[5] == 0) - pon_dr(); + placeDrascula(); copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, dir_dibujo3, dir_zona_pantalla); if (flag_tv == 1) copyBackground(114, 158, 8, 30, 8, 23, dir_dibujo3, dir_zona_pantalla); - diferencia = vez() - conta_ciego_vez; - parpadeo = _rnd->getRandomNumber(7); - if (parpadeo == 5 && flag_tv == 0) + diferencia = vez() - conta_blind_vez; + blinking = _rnd->getRandomNumber(7); + if (blinking == 5 && flag_tv == 0) flag_tv = 1; - else if (parpadeo == 5 && flag_tv == 1) + else if (blinking == 5 && flag_tv == 1) flag_tv = 0; if (diferencia > 6) { frame_velas++; if (frame_velas == 3) frame_velas = 0; - conta_ciego_vez = vez(); + conta_blind_vez = vez(); } } void DrasculaEngine::update_60() { if (hare_y - 10 < y_dr && flags[5] == 0) - pon_dr(); + placeDrascula(); } void DrasculaEngine::update_61() { @@ -1953,13 +1953,13 @@ void DrasculaEngine::update_62_pre() { int velas_y[] = { 158, 172, 186 }; int cirio_x[] = { 14, 19, 24 }; int pianista_x[] = {1, 91, 61, 31, 91, 31, 1, 61, 31 }; - int borracho_x[] = {1, 42, 83, 124, 165, 206, 247, 1 }; + int drunk_x[] = {1, 42, 83, 124, 165, 206, 247, 1 }; int diferencia; copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, dir_dibujo3, dir_zona_pantalla); copyBackground(cirio_x[frame_velas], 146, 311, 80, 4, 8, dir_dibujo3, dir_zona_pantalla); - if (parpadeo == 5) + if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, dir_dibujo3, dir_zona_pantalla); if (hare_x > 101 && hare_x < 155) @@ -1973,14 +1973,14 @@ void DrasculaEngine::update_62_pre() { copyBackground(165, 140, 229, 117, 43, 59, dir_dibujo3, dir_zona_pantalla); if (flags[12] == 1) - copyBackground(borracho_x[frame_borracho], 82, 170, 50, 40, 53, dir_dibujo3, dir_zona_pantalla); + copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, dir_dibujo3, dir_zona_pantalla); - diferencia = vez() - conta_ciego_vez; + diferencia = vez() - conta_blind_vez; if (diferencia > 6) { if (flags[12] == 1) { - frame_borracho++; - if (frame_borracho == 8) { - frame_borracho = 0; + frame_drunk++; + if (frame_drunk == 8) { + frame_drunk = 0; flags[12] = 0; } } else if ((_rnd->getRandomNumber(94) == 15) && (flags[13] == 0)) @@ -1992,19 +1992,19 @@ void DrasculaEngine::update_62_pre() { frame_piano++; if (frame_piano == 9) frame_piano = 0; - parpadeo = _rnd->getRandomNumber(10); - conta_ciego_vez = vez(); + blinking = _rnd->getRandomNumber(10); + conta_blind_vez = vez(); } } void DrasculaEngine::update_62() { - int borracho_x[] = { 1, 42, 83, 124, 165, 206, 247, 1 }; + int drunk_x[] = { 1, 42, 83, 124, 165, 206, 247, 1 }; copyRect(1, 1, 0, 0, 62, 142, dir_dibujo2, dir_zona_pantalla); if (hare_y + alto_hare < 89) { copyRect(205, 1, 180, 9, 82, 80, dir_dibujo3, dir_zona_pantalla); - copyBackground(borracho_x[frame_borracho], 82, 170, 50, 40, 53, dir_dibujo3, dir_zona_pantalla); + copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, dir_dibujo3, dir_zona_pantalla); } } @@ -2012,18 +2012,18 @@ void DrasculaEngine::update_63() { copyRect(1, 154, 83, 122, 131, 44, dir_dibujo3, dir_zona_pantalla); } -void DrasculaEngine::update_pendulo() { - int pendulo_x[] = {40, 96, 152, 208, 264, 40, 96, 152, 208, 208, 152, 264, 40, 96, 152, 208, 264}; +void DrasculaEngine::update_pendulum() { + int pendulum_x[] = {40, 96, 152, 208, 264, 40, 96, 152, 208, 208, 152, 264, 40, 96, 152, 208, 264}; int diferencia; if (frame_pen <= 4) - dir_pendulo = dir_dibujo3; + dir_pendulum = dir_dibujo3; else if (frame_pen <= 11) - dir_pendulo = dir_hare_dch; + dir_pendulum = dir_hare_dch; else - dir_pendulo = dir_hare_frente; + dir_pendulum = dir_hare_frente; - copyBackground(pendulo_x[frame_pen], 19, 152, 0, 55, 125, dir_pendulo, dir_zona_pantalla); + copyBackground(pendulum_x[frame_pen], 19, 152, 0, 55, 125, dir_pendulum, dir_zona_pantalla); if (flags[1] == 2) copyRect(18, 145, 145, 105, 25, 29, dir_dibujo3, dir_zona_pantalla); @@ -2031,12 +2031,12 @@ void DrasculaEngine::update_pendulo() { if (flags[1] == 0) copyRect(44, 145, 145, 105, 25, 29, dir_dibujo3, dir_zona_pantalla); - diferencia = vez() - conta_ciego_vez; + diferencia = vez() - conta_blind_vez; if (diferencia > 8) { frame_pen++; if (frame_pen == 17) frame_pen = 0; - conta_ciego_vez = vez(); + conta_blind_vez = vez(); } } diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 127dc983eb..4ca40734d4 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -65,8 +65,8 @@ bucless: updateRefresh_pre(); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); copyBackground(x_igor + 17, y_igor, x_igor + 17, y_igor, 37, 24, dir_dibujo1, dir_zona_pantalla); copyRect(x_talk[cara], 148, x_igor + 17, y_igor, 25, 24, dir_hare_frente, dir_zona_pantalla); @@ -74,13 +74,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, x_igor + 26, y_igor); + centerText(said, x_igor + 26, y_igor); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - byte key = getscan(); + byte key = getScan(); if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) term_int = 1; if (key != 0) @@ -97,8 +97,8 @@ bucless: goto bucless; } copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } @@ -127,8 +127,8 @@ bucless: updateRefresh_pre(); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); if (num_ejec == 6) pon_hare(); @@ -141,13 +141,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, x_dr + 19, y_dr); + centerText(said, x_dr + 19, y_dr); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - byte key = getscan(); + byte key = getScan(); if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) term_int = 1; if (key != 0) @@ -165,8 +165,8 @@ bucless: } copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } @@ -194,8 +194,8 @@ bucless: copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); updateRefresh_pre(); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); if (num_ejec == 6) pon_hare(); @@ -208,13 +208,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, x_dr + 19, y_dr); + centerText(said, x_dr + 19, y_dr); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - byte key = getscan(); + byte key = getScan(); if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) term_int = 1; if (key != 0) @@ -234,8 +234,8 @@ bucless: if (num_ejec == 6) updateRoom(); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); if (num_ejec == 6) pon_hare(); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -260,15 +260,15 @@ bucless: if (withVoices == 0) { if (num_ejec == 1) - centra_texto(said, 156, 90); + centerText(said, 156, 90); else if (num_ejec == 6) - centra_texto(said, 213, 72); + centerText(said, 213, 72); else if (num_ejec == 5) - centra_texto(said, 173, 92); + centerText(said, 173, 92); } updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - byte key = getscan(); + byte key = getScan(); if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) term_int = 1; if (key != 0) @@ -310,9 +310,9 @@ bucless: updateRefresh_pre(); if (num_ejec == 1 || num_ejec == 4) - pon_igor(); + placeIgor(); if (num_ejec == 1) - pon_dr(); + placeDrascula(); if (num_ejec == 1 || num_ejec == 6) copyBackground(x_igor, y_igor, x_igor, y_igor, 29, 25, dir_dibujo1, dir_zona_pantalla); copyRect(x_talk[cara], 173, x_igor, y_igor, 29, 25, dir_hare_frente, dir_zona_pantalla); @@ -320,13 +320,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, x_igor + 26, y_igor); + centerText(said, x_igor + 26, y_igor); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - byte key = getscan(); + byte key = getScan(); if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) term_int = 1; if (key != 0) @@ -349,8 +349,8 @@ bucless: if (num_ejec == 1) { copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - pon_igor(); - pon_dr(); + placeIgor(); + placeDrascula(); } updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } @@ -393,13 +393,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, 132, 45); + centerText(said, 132, 45); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - byte key = getscan(); + byte key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -451,7 +451,7 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, x_bj + 7, y_bj); + centerText(said, x_bj + 7, y_bj); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); @@ -460,12 +460,12 @@ bucless: updateRoom(); if (withVoices == 0) - centra_texto(said, 93, 80); + centerText(said, 93, 80); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } - byte key = getscan(); + byte key = getScan(); if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) term_int = 1; if (key != 0) @@ -548,7 +548,7 @@ bucless: pon_hare(); if (num_ejec == 2) { - if (!strcmp(fondo_y_menu, "99.alg") || !strcmp(fondo_y_menu, "994.alg")) + if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg")) copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, dir_dibujo3, dir_zona_pantalla); } else { copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), @@ -597,13 +597,13 @@ bucless: } if (withVoices == 0) - centra_texto(said, hare_x, hare_y); + centerText(said, hare_x, hare_y); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - byte key = getscan(); + byte key = getScan(); if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) term_int = 1; if (key != 0) @@ -624,7 +624,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); if (num_ejec == 1) { - if (musicStatus() == 0 && flags[11] == 0 && corta_musica == 0) + if (musicStatus() == 0 && flags[11] == 0 && musicStopped == 0) playMusic(roomMusic); } } @@ -654,13 +654,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, 221, 128); + centerText(said, 221, 128); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - byte key = getscan(); + byte key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -679,7 +679,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_borracho(const char *said, const char *filename) { +void DrasculaEngine::talk_drunk(const char *said, const char *filename) { int x_talk[8] = { 1, 21, 41, 61, 81, 101, 121, 141 }; int cara; int length = strlen(said); @@ -718,13 +718,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, 181, 54); + centerText(said, 181, 54); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - byte key = getscan(); + byte key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -791,13 +791,13 @@ bucless: } if (withVoices == 0) - centra_texto(said, vb_x, 66); + centerText(said, vb_x, 66); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -837,10 +837,10 @@ bucless: updateRoom(); if (withVoices == 0) - centra_texto(said, 150, 80); + centerText(said, 150, 80); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -861,10 +861,10 @@ bucless: playMusic(roomMusic); } -void DrasculaEngine::talk_ciego(const char *said, const char *filename, const char *sincronia) { +void DrasculaEngine::talk_blind(const char *said, const char *filename, const char *sincronia) { byte *num_cara; int p = 0; - int pos_ciego[6]; + int pos_blind[6]; int length = strlen(said); color_abc(VON_BRAUN); @@ -874,21 +874,21 @@ void DrasculaEngine::talk_ciego(const char *said, const char *filename, const ch talkInit(filename); - pos_ciego[1] = 2; - pos_ciego[2] = 73; - pos_ciego[3] = 1; - pos_ciego[4] = 126; - pos_ciego[5] = 149; + pos_blind[1] = 2; + pos_blind[2] = 73; + pos_blind[3] = 1; + pos_blind[4] = 126; + pos_blind[5] = 149; bucless: copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - pos_ciego[5] = 149; + pos_blind[5] = 149; char c = toupper(sincronia[p]); if (c == '0' || c == '2' || c == '4' || c == '6') - pos_ciego[0] = 1; + pos_blind[0] = 1; else - pos_ciego[0] = 132; + pos_blind[0] = 132; if (c == '0') num_cara = dir_dibujo3; @@ -904,19 +904,19 @@ bucless: num_cara = dir_hare_fondo; else { num_cara = dir_hare_frente; - pos_ciego[5] = 146; + pos_blind[5] = 146; } - copyRectClip( pos_ciego, num_cara, dir_zona_pantalla); + copyRectClip( pos_blind, num_cara, dir_zona_pantalla); if (withVoices == 0) - centra_texto(said, 310, 71); + centerText(said, 310, 71); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(2); p++; - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -946,10 +946,10 @@ void DrasculaEngine::talk_hacker(const char *said, const char *filename) { bucless: if (withVoices == 0) - centra_texto(said, 156, 170); + centerText(said, 156, 170); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -967,7 +967,7 @@ bucless: key = 0; } -void DrasculaEngine::talk_lobo(const char *said, const char *filename) { +void DrasculaEngine::talk_wolf(const char *said, const char *filename) { int x_talk[9] = {52, 79, 106, 133, 160, 187, 214, 241, 268}; int cara; int length = strlen(said); @@ -991,13 +991,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, 203, 78); + centerText(said, 203, 78); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -1040,13 +1040,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, 197, 64); + centerText(said, 197, 64); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -1095,13 +1095,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, 160, 105); + centerText(said, 160, 105); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -1148,13 +1148,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, 195, 107); + centerText(said, 195, 107); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -1199,13 +1199,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, 132, 45); + centerText(said, 132, 45); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -1224,13 +1224,13 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_bj_cama(int index) { +void DrasculaEngine::talk_bj_bed(int index) { char name[20]; sprintf(name, "BJ%i.als", index); - talk_bj_cama(_textbj[_lang][index], name); + talk_bj_bed(_textbj[_lang][index], name); } -void DrasculaEngine::talk_bj_cama(const char *said, const char *filename) { +void DrasculaEngine::talk_bj_bed(const char *said, const char *filename) { int x_talk[5] = {51, 101, 151, 201, 251}; int cara; int length = strlen(said); @@ -1255,13 +1255,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, 104, 102); + centerText(said, 104, 102); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -1308,12 +1308,12 @@ bucless: copyBackground(x_talk[cara], 1, 45, 24, 92, 108, (byte *)num_cara, dir_zona_pantalla); if (withVoices == 0) - centra_texto(said, 90, 50); + centerText(said, 90, 50); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -1419,14 +1419,14 @@ bucless: } if (withVoices == 0) - centra_texto(said, hare_x, hare_y); + centerText(said, hare_x, hare_y); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); p++; pause(3); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -1470,13 +1470,13 @@ bucless: updateRoom(); if (withVoices == 0) - centra_texto(said, 263, 69); + centerText(said, 263, 69); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(4); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -1509,10 +1509,10 @@ bucless: updateRoom(); if (withVoices == 0) - centra_texto(said, 87, 66); + centerText(said, 87, 66); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -1531,7 +1531,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); } -void DrasculaEngine::talk_igor_sentado(const char *said, const char *filename) { +void DrasculaEngine::talk_igor_seated(const char *said, const char *filename) { int x_talk[4] = { 80, 102, 124, 146 }; int cara; int length = strlen(said); @@ -1555,13 +1555,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, 221, 102); + centerText(said, 221, 102); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1) { @@ -1604,13 +1604,13 @@ bucless: updateRefresh(); if (withVoices == 0) - centra_texto(said, 221, 102); + centerText(said, 221, 102); updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); pause(3); - int key = getscan(); + int key = getScan(); if (key != 0) ctvd_stop(); if (hay_sb == 1){ -- cgit v1.2.3 From 3c827020a656c884f965522a945a4c46a5d085f9 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 30 May 2008 05:35:47 +0000 Subject: Fix regression introduced by last cleanup svn-id: r32373 --- engines/drascula/animation.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 507ab36da5..f2371f724c 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -838,15 +838,15 @@ void DrasculaEngine::animation_4_2() { pause(8); clearRoom(); - loadPic("blind1.alg"); + loadPic("ciego1.alg"); // ciego = blind decompressPic(dir_dibujo1, HALF_PAL); - loadPic("blind2.alg"); + loadPic("ciego2.alg"); decompressPic(dir_dibujo3, 1); - loadPic("blind3.alg"); + loadPic("ciego3.alg"); decompressPic(dir_hare_dch, 1); - loadPic("blind4.alg"); + loadPic("ciego4.alg"); decompressPic(dir_hare_fondo, 1); - loadPic("blind5.alg"); + loadPic("ciego5.alg"); decompressPic(dir_hare_frente, 1); if (_lang == kSpanish) @@ -3261,15 +3261,15 @@ void DrasculaEngine::animation_6_2() { dir_texto = dir_hare_frente; clearRoom(); - loadPic("blind1.alg"); + loadPic("ciego1.alg"); // ciego = blind decompressPic(dir_dibujo1, HALF_PAL); - loadPic("blind2.alg"); + loadPic("ciego2.alg"); decompressPic(dir_dibujo3, 1); - loadPic("blind3.alg"); + loadPic("ciego3.alg"); decompressPic(dir_hare_dch, 1); - loadPic("blind4.alg"); + loadPic("ciego4.alg"); decompressPic(dir_hare_fondo, 1); - loadPic("blind5.alg"); + loadPic("ciego5.alg"); decompressPic(dir_hare_frente, 1); copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); @@ -3319,15 +3319,15 @@ void DrasculaEngine::animation_33_2() { pause(8); clearRoom(); - loadPic("blind1.alg"); + loadPic("ciego1.alg"); // ciego = blind decompressPic(dir_dibujo1, HALF_PAL); - loadPic("blind2.alg"); + loadPic("ciego2.alg"); decompressPic(dir_dibujo3, 1); - loadPic("blind3.alg"); + loadPic("ciego3.alg"); decompressPic(dir_hare_dch, 1); - loadPic("blind4.alg"); + loadPic("ciego4.alg"); decompressPic(dir_hare_fondo, 1); - loadPic("blind5.alg"); + loadPic("ciego5.alg"); decompressPic(dir_hare_frente, 1); if (_lang == kSpanish) -- cgit v1.2.3 From 8aa1b04043b7fb60dbe4ef826217293995ee2258 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 07:09:36 +0000 Subject: dir_dibujo -> drawSurface dir_hare_fondo -> backSurface dir_mesa -> tableSurface dir_hare_dch -> extraSurface (unsure about this one) dir_zona_pantalla -> screenSurface dir_hare_frente -> frontSurface dir_texto -> textSurface dir_pendulum -> pendulumSurface svn-id: r32374 --- engines/drascula/animation.cpp | 1122 ++++++++++++++++++++-------------------- engines/drascula/drascula.cpp | 306 +++++------ engines/drascula/drascula.h | 20 +- engines/drascula/rooms.cpp | 312 +++++------ engines/drascula/talk.cpp | 302 +++++------ 5 files changed, 1031 insertions(+), 1031 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index f2371f724c..6f2bc1bc2d 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -55,9 +55,9 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); loadPic("cielo.alg"); - decompressPic(dir_zona_pantalla, 256); + decompressPic(screenSurface, 256); black(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); fadeFromBlack(2); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -66,7 +66,7 @@ void DrasculaEngine::animation_1_1() { break; color_abc(RED); centerText(_textmisc[_lang][1], 160, 100); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; delay(1000); @@ -90,8 +90,8 @@ void DrasculaEngine::animation_1_1() { if (anima("scr3.bin", 17)) break; loadPic("cielo2.alg"); - decompressPic(dir_zona_pantalla, 256); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + decompressPic(screenSurface, 256); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; fadeToBlack(1); @@ -100,13 +100,13 @@ void DrasculaEngine::animation_1_1() { clearRoom(); loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETE_PAL); + decompressPic(frontSurface, COMPLETE_PAL); loadPic("103.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); loadPic("104.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); loadPic("aux104.alg"); - decompressPic(dir_dibujo2, 1); + decompressPic(drawSurface2, 1); playMusic(4); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -117,9 +117,9 @@ void DrasculaEngine::animation_1_1() { for (l2 = 0; l2 < 3; l2++) for (l = 0; l < 7; l++) { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - copyBackground(interf_x[l], interf_y[l], 156, 45, 63, 31, dir_dibujo2, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(interf_x[l], interf_y[l], 156, 45, 63, 31, drawSurface2, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if (getScan() == Common::KEYCODE_ESCAPE) { term_int = 1; break; @@ -135,15 +135,15 @@ void DrasculaEngine::animation_1_1() { pos_pixel[5] = 31; for (l = 0; l < 180; l++) { - copyBackground(0, 0, 320 - l, 0, l, 200, dir_dibujo3, dir_zona_pantalla); - copyBackground(l, 0, 0, 0, 320 - l, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 320 - l, 0, l, 200, drawSurface3, screenSurface); + copyBackground(l, 0, 0, 0, 320 - l, 200, drawSurface1, screenSurface); pos_pixel[0] = interf_x[l2]; pos_pixel[1] = interf_y[l2]; pos_pixel[2] = 156 - l; - copyRectClip(pos_pixel, dir_dibujo2, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyRectClip(pos_pixel, drawSurface2, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); p++; if (p == 6) { p = 0; @@ -158,7 +158,7 @@ void DrasculaEngine::animation_1_1() { } if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - copyBackground(0, 0, 0, 0, 320, 200, dir_zona_pantalla, dir_dibujo1); + copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); talk_dr_grande(_textd[_lang][1], "D1.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -167,11 +167,11 @@ void DrasculaEngine::animation_1_1() { clearRoom(); loadPic("100.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); loadPic("auxigor.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("auxdr.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); sentido_dr = 0; x_dr = 129; y_dr = 95; @@ -179,17 +179,17 @@ void DrasculaEngine::animation_1_1() { x_igor = 66; y_igor = 97; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk_igor_dch(8); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk_dr_izq(2); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -203,15 +203,15 @@ void DrasculaEngine::animation_1_1() { clearRoom(); color_solo = RED; loadPic("plan1.alg"); - decompressPic(dir_zona_pantalla, HALF_PAL); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + decompressPic(screenSurface, HALF_PAL); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(10); talk_solo(_textd[_lang][4],"d4.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; loadPic("plan1.alg"); - decompressPic(dir_zona_pantalla, HALF_PAL); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + decompressPic(screenSurface, HALF_PAL); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk_solo(_textd[_lang][5], "d5.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -219,8 +219,8 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); loadPic("plan2.alg"); - decompressPic(dir_zona_pantalla, HALF_PAL); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + decompressPic(screenSurface, HALF_PAL); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(20); talk_solo(_textd[_lang][6], "d6.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -229,8 +229,8 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); loadPic("plan3.alg"); - decompressPic(dir_zona_pantalla, HALF_PAL); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + decompressPic(screenSurface, HALF_PAL); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(20); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -238,14 +238,14 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; loadPic("plan3.alg"); - decompressPic(dir_zona_pantalla, HALF_PAL); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + decompressPic(screenSurface, HALF_PAL); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk_solo(_textd[_lang][8], "d8.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); loadPic("100.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); MusicFadeout(); stopMusic(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -289,30 +289,30 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(1); sentido_dr = 0; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk_dr_izq(12); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(1); sentido_dr = 1; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk_igor_dch(2); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -321,16 +321,16 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(1); sentido_dr = 0; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk_dr_izq(14); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -371,9 +371,9 @@ void DrasculaEngine::animation_1_1() { } clearRoom(); loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETE_PAL); + decompressPic(frontSurface, COMPLETE_PAL); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); } void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { @@ -400,9 +400,9 @@ void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { bucless: cara = _rnd->getRandomNumber(3); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - copyBackground(interf_x[l] + 24, interf_y[l], 0, 45, 39, 31, dir_dibujo2, dir_zona_pantalla); - copyBackground(x_talk[cara], 1, 171, 68, 45, 48, dir_dibujo2, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(interf_x[l] + 24, interf_y[l], 0, 45, 39, 31, drawSurface2, screenSurface); + copyBackground(x_talk[cara], 1, 171, 68, 45, 48, drawSurface2, screenSurface); l++; if (l == 7) l = 0; @@ -410,7 +410,7 @@ bucless: if (withVoices == 0) centerText(said, 191, 69); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -449,10 +449,10 @@ void DrasculaEngine::animation_2_1() { break; if (_lang == kSpanish) - dir_texto = dir_hare_frente; + textSurface = frontSurface; loadPic("an11y13.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -461,10 +461,10 @@ void DrasculaEngine::animation_2_1() { break; if (_lang == kSpanish) - dir_texto = dir_hare_dch; + textSurface = extraSurface; loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -478,7 +478,7 @@ void DrasculaEngine::animation_2_1() { clearRoom(); stopMusic(); musicStopped = 1; - memset(dir_zona_pantalla, 0, 64000); + memset(screenSurface, 0, 64000); color_solo = WHITE; pause(80); @@ -489,11 +489,11 @@ void DrasculaEngine::animation_2_1() { break; clearRoom(); loadPic("bj.alg"); - decompressPic(dir_zona_pantalla, HALF_PAL); + decompressPic(screenSurface, HALF_PAL); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; black(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); fadeFromBlack(1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -504,11 +504,11 @@ void DrasculaEngine::animation_2_1() { clearRoom(); loadPic("16.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; loadPic("auxbj.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -529,7 +529,7 @@ void DrasculaEngine::animation_2_1() { break; loadPic("97g.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -568,11 +568,11 @@ void DrasculaEngine::animation_2_1() { loadPic("97.alg"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(120); @@ -585,7 +585,7 @@ void DrasculaEngine::animation_2_1() { updateRoom(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(110); talk_solo(_textbj[_lang][11], "BJ11.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -593,7 +593,7 @@ void DrasculaEngine::animation_2_1() { updateRoom(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(118); @@ -629,19 +629,19 @@ void DrasculaEngine::animation_2_1() { break; pause(8); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk(225); pause(76); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_hare = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk(226); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(30); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -653,10 +653,10 @@ void DrasculaEngine::animation_2_1() { void DrasculaEngine::animation_3_1() { if (_lang == kSpanish) - dir_texto = dir_hare_frente; + textSurface = frontSurface; loadPic("an11y13.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); talk(192); talk_tabernero(1); @@ -682,34 +682,34 @@ void DrasculaEngine::animation_3_1() { flags[0] = 1; if (_lang == kSpanish) - dir_texto = dir_hare_dch; + textSurface = extraSurface; loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); } void DrasculaEngine::animation_4_1() { if (_lang == kSpanish) - dir_texto = dir_hare_frente; + textSurface = frontSurface; loadPic("an12.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); talk(_text[_lang][205],"205.als"); updateRefresh_pre(); - copyBackground(1, 139, 228, 112, 47, 60, dir_hare_dch, dir_zona_pantalla); - updateScreen(228,112, 228,112, 47,60, dir_zona_pantalla); + copyBackground(1, 139, 228, 112, 47, 60, extraSurface, screenSurface); + updateScreen(228,112, 228,112, 47,60, screenSurface); pause(3); updateRefresh_pre(); - copyBackground(49, 139, 228, 112, 47, 60, dir_hare_dch, dir_zona_pantalla); + copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface); pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); stopMusic(); @@ -725,11 +725,11 @@ void DrasculaEngine::animation_4_1() { talk(_text[_lang][209], "209.als"); if (_lang == kSpanish) - dir_texto = dir_hare_dch; + textSurface = extraSurface; flags[11] = 0; loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); } void DrasculaEngine::animation_1_2() { @@ -741,22 +741,22 @@ void DrasculaEngine::animation_2_2() { int n, x=0; sentido_hare = 0; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); pon_hare(); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); loadPic("an2_1.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("an2_2.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - copyBackground(1, 1, 201, 87, 50, 52, dir_hare_frente, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(1, 1, 201, 87, 50, 52, frontSurface, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); for (n = 0; n < 6; n++) { x++; - copyBackground(x, 1, 201, 87, 50, 52, dir_hare_frente, dir_zona_pantalla); - updateScreen(201,87, 201,87, 50,52, dir_zona_pantalla); + copyBackground(x, 1, 201, 87, 50, 52, frontSurface, screenSurface); + updateScreen(201,87, 201,87, 50,52, screenSurface); x = x + 50; pause(3); } @@ -765,8 +765,8 @@ void DrasculaEngine::animation_2_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(x, 55, 201, 87, 50, 52, dir_hare_frente, dir_zona_pantalla); - updateScreen(201, 87, 201, 87, 50, 52, dir_zona_pantalla); + copyBackground(x, 55, 201, 87, 50, 52, frontSurface, screenSurface); + updateScreen(201, 87, 201, 87, 50, 52, screenSurface); x = x + 50; pause(3); } @@ -775,8 +775,8 @@ void DrasculaEngine::animation_2_2() { for (n = 0; n < 6; n++){ x++; - copyBackground(x, 109, 201, 87, 50, 52, dir_hare_frente, dir_zona_pantalla); - updateScreen(201, 87, 201, 87, 50, 52, dir_zona_pantalla); + copyBackground(x, 109, 201, 87, 50, 52, frontSurface, screenSurface); + updateScreen(201, 87, 201, 87, 50, 52, screenSurface); x = x + 50; pause(3); } @@ -786,8 +786,8 @@ void DrasculaEngine::animation_2_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(x, 1, 201, 87, 50, 52, dir_hare_dch, dir_zona_pantalla); - updateScreen(201,87, 201,87, 50,52, dir_zona_pantalla); + copyBackground(x, 1, 201, 87, 50, 52, extraSurface, screenSurface); + updateScreen(201,87, 201,87, 50,52, screenSurface); x = x + 50; pause(3); } @@ -796,8 +796,8 @@ void DrasculaEngine::animation_2_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(x, 55, 201, 87, 50, 52, dir_hare_dch, dir_zona_pantalla); - updateScreen(201, 87, 201, 87, 50, 52, dir_zona_pantalla); + copyBackground(x, 55, 201, 87, 50, 52, extraSurface, screenSurface); + updateScreen(201, 87, 201, 87, 50, 52, screenSurface); x = x + 50; pause(3); } @@ -805,14 +805,14 @@ void DrasculaEngine::animation_2_2() { for (n = 0; n < 2; n++) { x++; - copyBackground(x, 109, 201, 87, 50, 52, dir_hare_dch, dir_zona_pantalla); - updateScreen(201, 87, 201, 87, 50, 52, dir_zona_pantalla); + copyBackground(x, 109, 201, 87, 50, 52, extraSurface, screenSurface); + updateScreen(201, 87, 201, 87, 50, 52, screenSurface); x = x + 50; pause(3); } - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); stopSound(); @@ -839,21 +839,21 @@ void DrasculaEngine::animation_4_2() { clearRoom(); loadPic("ciego1.alg"); // ciego = blind - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); loadPic("ciego2.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); loadPic("ciego3.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("ciego4.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("ciego5.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); if (_lang == kSpanish) - dir_texto = dir_hare_frente; + textSurface = frontSurface; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(10); @@ -876,14 +876,14 @@ void DrasculaEngine::animation_4_2() { talk_blind(_textd[_lang][74],"d74.als", _textd1[_lang][74 - TEXTD_START]); talk_hacker(_textd[_lang][63],"d63.als"); talk_blind(_textd[_lang][75],"d75.als", _textd1[_lang][75 - TEXTD_START]); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); _system->delayMillis(1000); talk_hacker(_textd[_lang][64], "d64.als"); talk_blind(_textd[_lang][76], "d76.als", _textd1[_lang][76 - TEXTD_START]); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(14); @@ -891,19 +891,19 @@ void DrasculaEngine::animation_4_2() { playMusic(roomMusic); loadPic("9.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); loadPic("aux9.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); withoutVerb(); if (_lang == kSpanish) - dir_texto = dir_hare_dch; + textSurface = extraSurface; flags[9] = 0; flags[4] = 1; @@ -940,7 +940,7 @@ void DrasculaEngine::animation_14_2() { int l = 0; loadPic("an14_2.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("an14_1.alg"); pos_cabina[0] = 150; @@ -951,20 +951,20 @@ void DrasculaEngine::animation_14_2() { pos_cabina[5] = 161; for (n = -160; n <= 0; n = n + 5 + l) { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); pon_hare(); pon_vb(); pos_cabina[3] = n; - copyRectClip(pos_cabina, dir_hare_fondo, dir_zona_pantalla); + copyRectClip(pos_cabina, backSurface, screenSurface); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); l = l + 1; } flags[24] = 1; - decompressPic(dir_dibujo1, 1); + decompressPic(drawSurface1, 1); playSound("s7.als"); hiccup(15); @@ -972,7 +972,7 @@ void DrasculaEngine::animation_14_2() { stopSound(); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); } void DrasculaEngine::animation_15_2() { @@ -1004,17 +1004,17 @@ void DrasculaEngine::animation_16_2() { color_abc(DARK_GREEN); loadPic("his1.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); if (_lang == kSpanish) black(); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); if (_lang != kSpanish) centerText(_texthis[_lang][1], 180, 180); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if (_lang == kSpanish) fadeFromBlack(1); @@ -1039,13 +1039,13 @@ void DrasculaEngine::animation_16_2() { clearRoom(); loadPic("his2.alg"); - decompressPic(dir_dibujo1, HALF_PAL); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + decompressPic(drawSurface1, HALF_PAL); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); if (_lang != kSpanish) centerText(_texthis[_lang][2], 180, 180); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); key = getScan(); if (key != 0) goto asco; @@ -1066,13 +1066,13 @@ void DrasculaEngine::animation_16_2() { clearRoom(); loadPic("his3.alg"); - decompressPic(dir_dibujo1, HALF_PAL); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + decompressPic(drawSurface1, HALF_PAL); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); if (_lang != kSpanish) centerText(_texthis[_lang][3], 180, 180); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); key = getScan(); if (key != 0) goto asco; @@ -1090,16 +1090,16 @@ void DrasculaEngine::animation_16_2() { clearRoom(); loadPic("his4_1.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); loadPic("his4_2.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo3, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface3, screenSurface); if (_lang != kSpanish) centerText(_texthis[_lang][1], 180, 180); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); key = getScan(); if (key != 0) goto asco; @@ -1114,9 +1114,9 @@ void DrasculaEngine::animation_16_2() { goto asco; for (l = 1; l < 200; l++) { - copyBackground(0, 0, 0, l, 320, 200 - l, dir_dibujo3, dir_zona_pantalla); - copyBackground(0, 200 - l, 0, 0, 320, l, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, l, 320, 200 - l, drawSurface3, screenSurface); + copyBackground(0, 200 - l, 0, 0, 320, l, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); key = getScan(); if (key != 0) goto asco; @@ -1128,14 +1128,14 @@ void DrasculaEngine::animation_16_2() { asco: loadPic(roomDisk); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); char rm[20]; sprintf(rm, "%i.alg", roomNumber); loadPic(rm); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); black(); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); fadeFromBlack(0); if (roomMusic != 0) playMusic(roomMusic); @@ -1189,7 +1189,7 @@ void DrasculaEngine::animation_21_2() { void DrasculaEngine::animation_23_2() { loadPic("an24.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); flags[21] = 1; @@ -1251,18 +1251,18 @@ void DrasculaEngine::animation_23_anexo() { 76, 76, 76, 76, 76, 76, 76, 1, 1, 1, 1}; loadPic("an23.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); for (n = 0; n < 34; n++) { - copyRect(p_x, p_y, p_x, p_y, 36, 74, dir_dibujo1, dir_zona_pantalla); - copyRect(x[n], y[n], p_x, p_y, 36, 74, dir_hare_fondo, dir_zona_pantalla); + copyRect(p_x, p_y, p_x, p_y, 36, 74, drawSurface1, screenSurface); + copyRect(x[n], y[n], p_x, p_y, 36, 74, backSurface, screenSurface); updateRefresh(); - updateScreen(p_x, p_y, p_x, p_y, 36, 74, dir_zona_pantalla); + updateScreen(p_x, p_y, p_x, p_y, 36, 74, screenSurface); pause(5); } loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); } void DrasculaEngine::animation_23_anexo2() { @@ -1273,27 +1273,27 @@ void DrasculaEngine::animation_23_anexo2() { pause(50); loadPic("an23_2.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); for (n = 0; n < 14; n++) { - copyRect(p_x, p_y, p_x, p_y, 33, 71, dir_dibujo1, dir_zona_pantalla); - copyRect(x[n], y[n], p_x, p_y, 33, 71, dir_hare_fondo, dir_zona_pantalla); + copyRect(p_x, p_y, p_x, p_y, 33, 71, drawSurface1, screenSurface); + copyRect(x[n], y[n], p_x, p_y, 33, 71, backSurface, screenSurface); updateRefresh(); - updateScreen(p_x,p_y, p_x,p_y, 33,71, dir_zona_pantalla); + updateScreen(p_x,p_y, p_x,p_y, 33,71, screenSurface); pause(5); } loadPic("99.alg"); - decompressPic(dir_hare_fondo,1); + decompressPic(backSurface,1); } void DrasculaEngine::animation_25_2() { int n, pos_cabina[6]; loadPic("an14_2.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("18.alg"); - decompressPic(dir_dibujo1, 1); + decompressPic(drawSurface1, 1); pos_cabina[0] = 150; pos_cabina[1] = 6; @@ -1307,7 +1307,7 @@ void DrasculaEngine::animation_25_2() { playSound("s6.als"); for (n = 0; n >= -160; n = n - 8) { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); pon_hare(); @@ -1315,16 +1315,16 @@ void DrasculaEngine::animation_25_2() { pos_cabina[3] = n; - copyRectClip(pos_cabina, dir_hare_fondo, dir_zona_pantalla); + copyRectClip(pos_cabina, backSurface, screenSurface); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } stopSound(); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); } void DrasculaEngine::animation_27_2() { @@ -1395,14 +1395,14 @@ void DrasculaEngine::animation_31_2() { pause(15); lleva_al_hare(159, 140); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); sentido_hare = 2; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(78); sentido_hare = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(22); talk(406); lleva_vb(98); @@ -1444,17 +1444,17 @@ void DrasculaEngine::animation_35_2() { lleva_al_hare(79, 165); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); loadPic("an35_1.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("an35_2.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); for (n = 0; n < 6; n++) { x++; - copyBackground(x, 1, 70, 90, 46, 80, dir_hare_fondo, dir_zona_pantalla); - updateScreen(70,90, 70,90, 46,80,dir_zona_pantalla); + copyBackground(x, 1, 70, 90, 46, 80, backSurface, screenSurface); + updateScreen(70,90, 70,90, 46,80,screenSurface); x = x + 46; pause(3); } @@ -1462,8 +1462,8 @@ void DrasculaEngine::animation_35_2() { x = 0; for (n = 0; n < 6; n++) { x++; - copyBackground(x, 82, 70, 90, 46, 80, dir_hare_fondo, dir_zona_pantalla); - updateScreen(70, 90, 70, 90, 46, 80, dir_zona_pantalla); + copyBackground(x, 82, 70, 90, 46, 80, backSurface, screenSurface); + updateScreen(70, 90, 70, 90, 46, 80, screenSurface); x = x + 46; pause(3); } @@ -1471,8 +1471,8 @@ void DrasculaEngine::animation_35_2() { x = 0; for (n = 0; n < 6; n++) { x++; - copyBackground(x, 1, 70, 90, 46, 80, dir_hare_frente, dir_zona_pantalla); - updateScreen(70, 90, 70, 90, 46, 80, dir_zona_pantalla); + copyBackground(x, 1, 70, 90, 46, 80, frontSurface, screenSurface); + updateScreen(70, 90, 70, 90, 46, 80, screenSurface); x = x + 46; @@ -1482,15 +1482,15 @@ void DrasculaEngine::animation_35_2() { x = 0; for (n = 0; n < 2; n++) { x++; - copyBackground(x, 82, 70, 90, 46, 80, dir_hare_frente, dir_zona_pantalla); - updateScreen(70, 90, 70,90, 46, 80,dir_zona_pantalla); + copyBackground(x, 82, 70, 90, 46, 80, frontSurface, screenSurface); + updateScreen(70, 90, 70,90, 46, 80,screenSurface); x = x + 46; pause(3); } - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(19); @@ -1518,17 +1518,17 @@ void DrasculaEngine::animation_2_3() { animation_4_3(); flags[1] = 1; updateRoom(); - updateScreen(120, 0, 120, 0, 200, 200, dir_zona_pantalla); + updateScreen(120, 0, 120, 0, 200, 200, screenSurface); animation_5_3(); flags[0] = 0; flags[1] = 1; loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); lleva_al_hare(332, 127); } @@ -1538,17 +1538,17 @@ void DrasculaEngine::animation_3_3() { int px = hare_x - 20, py = hare_y - 1; loadPic("an2y_1.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("an2y_2.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("an2y_3.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 71, 72, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 2, px, py, 71, 72, dir_hare_frente, dir_zona_pantalla); - updateScreen(px, py, px, py, 71, 72, dir_zona_pantalla); + copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); + copyRect(x, 2, px, py, 71, 72, frontSurface, screenSurface); + updateScreen(px, py, px, py, 71, 72, screenSurface); x = x + 71; pause(3); } @@ -1557,9 +1557,9 @@ void DrasculaEngine::animation_3_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 71, 72, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, px, py, 71, 72, dir_hare_frente, dir_zona_pantalla); - updateScreen(px, py, px, py, 71, 72, dir_zona_pantalla); + copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); + copyRect(x, 75, px, py, 71, 72, frontSurface, screenSurface); + updateScreen(px, py, px, py, 71, 72, screenSurface); x = x + 71; pause(3); } @@ -1568,9 +1568,9 @@ void DrasculaEngine::animation_3_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 71, 72, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 2, px, py, 71, 72, dir_hare_dch, dir_zona_pantalla); - updateScreen(px, py, px, py, 71, 72, dir_zona_pantalla); + copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); + copyRect(x, 2, px, py, 71, 72, extraSurface, screenSurface); + updateScreen(px, py, px, py, 71, 72, screenSurface); x = x + 71; pause(3); } @@ -1579,9 +1579,9 @@ void DrasculaEngine::animation_3_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 71, 72, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, px, py, 71, 72, dir_hare_dch, dir_zona_pantalla); - updateScreen(px, py, px, py, 71, 72, dir_zona_pantalla); + copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); + copyRect(x, 75, px, py, 71, 72, extraSurface, screenSurface); + updateScreen(px, py, px, py, 71, 72, screenSurface); x = x + 71; pause(3); } @@ -1590,9 +1590,9 @@ void DrasculaEngine::animation_3_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 71, 72, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 2, px, py, 71, 72, dir_hare_fondo, dir_zona_pantalla); - updateScreen(px, py, px, py, 71, 72, dir_zona_pantalla); + copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); + copyRect(x, 2, px, py, 71, 72, backSurface, screenSurface); + updateScreen(px, py, px, py, 71, 72, screenSurface); x = x + 71; pause(3); } @@ -1601,9 +1601,9 @@ void DrasculaEngine::animation_3_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 71, 72, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, px, py, 71, 72, dir_hare_fondo, dir_zona_pantalla); - updateScreen(px, py, px, py, 71, 72, dir_zona_pantalla); + copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); + copyRect(x, 75, px, py, 71, 72, backSurface, screenSurface); + updateScreen(px, py, px, py, 71, 72, screenSurface); x = x + 71; pause(3); } @@ -1614,17 +1614,17 @@ void DrasculaEngine::animation_4_3() { int px = 120, py = 63; loadPic("any_1.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("any_2.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("any_3.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); for (n = 0; n < 4; n++){ x++; - copyBackground(px, py, px, py, 77, 89, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, px, py, 77, 89, dir_hare_frente, dir_zona_pantalla); - updateScreen(px, py, px, py, 77, 89, dir_zona_pantalla); + copyBackground(px, py, px, py, 77, 89, drawSurface1, screenSurface); + copyRect(x, 1, px, py, 77, 89, frontSurface, screenSurface); + updateScreen(px, py, px, py, 77, 89, screenSurface); x = x + 77; pause(3); } @@ -1633,9 +1633,9 @@ void DrasculaEngine::animation_4_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 77, 89, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 91, px, py, 77, 89, dir_hare_frente, dir_zona_pantalla); - updateScreen(px, py, px, py, 77, 89, dir_zona_pantalla); + copyBackground(px, py, px, py, 77, 89, drawSurface1, screenSurface); + copyRect(x, 91, px, py, 77, 89, frontSurface, screenSurface); + updateScreen(px, py, px, py, 77, 89, screenSurface); x = x + 77; pause(3); } @@ -1644,9 +1644,9 @@ void DrasculaEngine::animation_4_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 77, 89, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, px, py, 77, 89, dir_hare_dch, dir_zona_pantalla); - updateScreen(px, py, px, py, 77, 89, dir_zona_pantalla); + copyBackground(px, py, px, py, 77, 89, drawSurface1, screenSurface); + copyRect(x, 1, px, py, 77, 89, extraSurface, screenSurface); + updateScreen(px, py, px, py, 77, 89, screenSurface); x = x + 77; pause(3); } @@ -1655,9 +1655,9 @@ void DrasculaEngine::animation_4_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 77, 89, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 91, px, py, 77, 89, dir_hare_dch, dir_zona_pantalla); - updateScreen(px, py, px, py, 77, 89, dir_zona_pantalla); + copyBackground(px, py, px, py, 77, 89, drawSurface1, screenSurface); + copyRect(x, 91, px, py, 77, 89, extraSurface, screenSurface); + updateScreen(px, py, px, py, 77, 89, screenSurface); x = x + 77; pause(3); } @@ -1666,9 +1666,9 @@ void DrasculaEngine::animation_4_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 77, 89, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, px, py, 77, 89, dir_hare_fondo, dir_zona_pantalla); - updateScreen(px, py, px, py, 77, 89, dir_zona_pantalla); + copyBackground(px, py, px, py, 77, 89, drawSurface1, screenSurface); + copyRect(x, 1, px, py, 77, 89, backSurface, screenSurface); + updateScreen(px, py, px, py, 77, 89, screenSurface); x = x + 77; pause(3); } @@ -1677,9 +1677,9 @@ void DrasculaEngine::animation_4_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 77, 89, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 91, px, py, 77, 89, dir_hare_fondo, dir_zona_pantalla); - updateScreen(px, py, px, py, 77, 89, dir_zona_pantalla); + copyBackground(px, py, px, py, 77, 89, drawSurface1, screenSurface); + copyRect(x, 91, px, py, 77, 89, backSurface, screenSurface); + updateScreen(px, py, px, py, 77, 89, screenSurface); x = x + 77; pause(3); } @@ -1690,17 +1690,17 @@ void DrasculaEngine::animation_5_3() { int px = hare_x - 20, py = hare_y - 1; loadPic("an3y_1.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("an3y_2.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("an3y_3.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 71, 72, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 2, px, py, 71, 72, dir_hare_frente, dir_zona_pantalla); - updateScreen(px, py, px, py, 71, 72, dir_zona_pantalla); + copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); + copyRect(x, 2, px, py, 71, 72, frontSurface, screenSurface); + updateScreen(px, py, px, py, 71, 72, screenSurface); x = x + 71; pause(3); } @@ -1709,9 +1709,9 @@ void DrasculaEngine::animation_5_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 71, 72, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, px, py, 71, 72, dir_hare_frente, dir_zona_pantalla); - updateScreen(px, py, px, py, 71, 72, dir_zona_pantalla); + copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); + copyRect(x, 75, px, py, 71, 72, frontSurface, screenSurface); + updateScreen(px, py, px, py, 71, 72, screenSurface); x = x + 71; pause(3); } @@ -1720,9 +1720,9 @@ void DrasculaEngine::animation_5_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 71, 72, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 2, px, py, 71, 72, dir_hare_dch, dir_zona_pantalla); - updateScreen(px, py, px, py, 71, 72, dir_zona_pantalla); + copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); + copyRect(x, 2, px, py, 71, 72, extraSurface, screenSurface); + updateScreen(px, py, px, py, 71, 72, screenSurface); x = x + 71; pause(3); } @@ -1731,9 +1731,9 @@ void DrasculaEngine::animation_5_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 71, 72, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, px, py, 71, 72, dir_hare_dch, dir_zona_pantalla); - updateScreen(px,py, px,py, 71,72, dir_zona_pantalla); + copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); + copyRect(x, 75, px, py, 71, 72, extraSurface, screenSurface); + updateScreen(px,py, px,py, 71,72, screenSurface); x = x + 71; pause(3); } @@ -1742,9 +1742,9 @@ void DrasculaEngine::animation_5_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 71, 72, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 2, px, py, 71, 72, dir_hare_fondo, dir_zona_pantalla); - updateScreen(px, py, px, py, 71, 72, dir_zona_pantalla); + copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); + copyRect(x, 2, px, py, 71, 72, backSurface, screenSurface); + updateScreen(px, py, px, py, 71, 72, screenSurface); x = x + 71; pause(3); } @@ -1753,9 +1753,9 @@ void DrasculaEngine::animation_5_3() { for (n = 0; n < 4; n++) { x++; - copyBackground(px, py, px, py, 71, 72, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, px, py, 71, 72, dir_hare_fondo, dir_zona_pantalla); - updateScreen(px, py, px, py, 71, 72, dir_zona_pantalla); + copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); + copyRect(x, 75, px, py, 71, 72, backSurface, screenSurface); + updateScreen(px, py, px, py, 71, 72, screenSurface); x = x + 71; pause(3); } @@ -1769,58 +1769,58 @@ void DrasculaEngine::animation_6_3() { hare_se_mueve = 0; flags[3] = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); flags[1] = 0; loadPic("an4y.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); for (frame = 0; frame < 6; frame++) { pause(3); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - copyRect(yoda_x[frame], yoda_y[frame], px, py, 78, 90, dir_hare_frente, dir_zona_pantalla); - updateScreen(px, py, px, py, 78, 90, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyRect(yoda_x[frame], yoda_y[frame], px, py, 78, 90, frontSurface, screenSurface); + updateScreen(px, py, px, py, 78, 90, screenSurface); } flags[2] = 1; loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::animation_rayo() { loadPic("anr_1.alg"); - decompressPic(dir_hare_frente, HALF_PAL); + decompressPic(frontSurface, HALF_PAL); loadPic("anr_2.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("anr_3.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("anr_4.alg"); - decompressPic(dir_dibujo1, 1); + decompressPic(drawSurface1, 1); loadPic("anr_5.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); - updateScreen(0, 0, 0, 0, 320, 200, dir_hare_frente); + updateScreen(0, 0, 0, 0, 320, 200, frontSurface); pause(50); playSound("s5.als"); - updateScreen(0, 0, 0, 0, 320, 200, dir_hare_dch); + updateScreen(0, 0, 0, 0, 320, 200, extraSurface); pause(3); - updateScreen(0, 0, 0, 0, 320, 200, dir_hare_fondo); + updateScreen(0, 0, 0, 0, 320, 200, backSurface); pause(3); - updateScreen(0, 0, 0, 0, 320, 200, dir_dibujo1); + updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); pause(3); - updateScreen(0, 0, 0, 0, 320, 200, dir_hare_fondo); + updateScreen(0, 0, 0, 0, 320, 200, backSurface); pause(3); - updateScreen(0, 0, 0, 0, 320, 200, dir_dibujo3); + updateScreen(0, 0, 0, 0, 320, 200, drawSurface3); pause(3); - updateScreen(0, 0, 0, 0, 320, 200, dir_hare_frente); + updateScreen(0, 0, 0, 0, 320, 200, frontSurface); stopSound(); } @@ -1888,7 +1888,7 @@ void DrasculaEngine::animation_1_5() { if (hare_se_mueve == 0) break; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } sentido_hare = 1; @@ -1913,7 +1913,7 @@ void DrasculaEngine::animation_3_5() { void DrasculaEngine::animation_4_5() { flags[7] = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk(_text[_lang][228], "228.als"); talk_wolf(_textl[_lang][1], "L1.als"); talk_wolf(_textl[_lang][2], "L2.als"); @@ -1945,28 +1945,28 @@ void DrasculaEngine::animation_5_5(){ lleva_al_hare(hare_x - 19, hare_y + alto_hare); sentido_hare = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); loadPic("3an5_1.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("3an5_2.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); for (frame = 0; frame < 9; frame++) { pause(3); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - copyRect(hueso_x[frame], hueso_y[frame], pixel_x, pixel_y, 97, 64, dir_hare_fondo, dir_zona_pantalla); - updateScreen(pixel_x, pixel_y, pixel_x,pixel_y, 97,64, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyRect(hueso_x[frame], hueso_y[frame], pixel_x, pixel_y, 97, 64, backSurface, screenSurface); + updateScreen(pixel_x, pixel_y, pixel_x,pixel_y, 97,64, screenSurface); } - copyBackground(52, 161, 198, 81, 26, 24, dir_dibujo3, dir_zona_pantalla); - updateScreen(198, 81, 198, 81, 26, 24, dir_zona_pantalla); + copyBackground(52, 161, 198, 81, 26, 24, drawSurface3, screenSurface); + updateScreen(198, 81, 198, 81, 26, 24, screenSurface); for (frame = 0; frame < 9; frame++) { pause(3); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - copyRect(hueso_x[frame], hueso_y[frame], pixel_x, pixel_y, 97, 64, dir_hare_frente, dir_zona_pantalla); - updateScreen(pixel_x, pixel_y, pixel_x,pixel_y, 97, 64, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyRect(hueso_x[frame], hueso_y[frame], pixel_x, pixel_y, 97, 64, frontSurface, screenSurface); + updateScreen(pixel_x, pixel_y, pixel_x,pixel_y, 97, 64, screenSurface); } flags[6] = 1; @@ -1974,45 +1974,45 @@ void DrasculaEngine::animation_5_5(){ pause(12); loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); for (h = 0; h < (200 - 18); h++) - copyBackground(0, 53, 0, h, 320, 19, dir_hare_frente, dir_zona_pantalla); + copyBackground(0, 53, 0, h, 320, 19, frontSurface, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); loadPic("101.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); loadPic("3an5_3.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("3an5_4.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); - updateScreen(0, 0, 0, 0, 320, 200, dir_dibujo1); + updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); pause(9); for (frame = 0; frame < 5; frame++) { pause(3); - copyBackground(vuela_x[frame], 1, 174, 79, 61, 109, dir_hare_fondo, dir_zona_pantalla); - updateScreen(174, 79, 174, 79, 61, 109, dir_zona_pantalla); + copyBackground(vuela_x[frame], 1, 174, 79, 61, 109, backSurface, screenSurface); + updateScreen(174, 79, 174, 79, 61, 109, screenSurface); } for (frame = 0; frame < 5; frame++) { pause(3); - copyBackground(vuela_x[frame], 1, 174, 79, 61, 109, dir_hare_dch, dir_zona_pantalla); - updateScreen(174, 79, 174, 79, 61, 109, dir_zona_pantalla); + copyBackground(vuela_x[frame], 1, 174, 79, 61, 109, extraSurface, screenSurface); + updateScreen(174, 79, 174, 79, 61, 109, screenSurface); } - updateScreen(0, 0, 0, 0, 320, 200, dir_dibujo1); + updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); playSound("s1.als"); stopSound(); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); clearRoom(); loadPic("49.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); } void DrasculaEngine::animation_6_5() { @@ -2075,14 +2075,14 @@ void DrasculaEngine::animation_12_5() { playMusic(26); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(27); anima("rayo1.bin", 23); playSound("s5.als"); anima("rayo2.bin", 17); sentido_hare = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); hare_oscuro(); @@ -2112,7 +2112,7 @@ void DrasculaEngine::animation_12_5() { } loadPic("3an11_1.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); for (frame = 0; frame < 8; frame++) { if (frame == 2 || frame == 4 || frame == 8 || frame==10) @@ -2124,9 +2124,9 @@ void DrasculaEngine::animation_12_5() { pause(4); updateRoom(); - copyRect(rayo_x[frame], 1, 41, 0, 44, 44, dir_hare_fondo, dir_zona_pantalla); - copyRect(frusky_x[frame], 113, 205, 50, 38, 86, dir_dibujo3, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyRect(rayo_x[frame], 1, 41, 0, 44, 44, backSurface, screenSurface); + copyRect(frusky_x[frame], 113, 205, 50, 38, 86, drawSurface3, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } stopSound_corte(); @@ -2141,8 +2141,8 @@ void DrasculaEngine::animation_12_5() { pause(4); updateRoom(); - copyRect(elfrusky_x[frame], 47, 192, 39, 66, 106, dir_hare_fondo, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyRect(elfrusky_x[frame], 47, 192, 39, 66, 106, backSurface, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } anima("frel.bin", 16); @@ -2158,7 +2158,7 @@ void DrasculaEngine::animation_12_5() { stopSound(); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); lleva_al_hare(40, 169); lleva_al_hare(-14, 175); @@ -2183,7 +2183,7 @@ void DrasculaEngine::animation_13_5() { int pos_frusky[6]; loadPic("auxfr.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); pos_frusky[3] = 81; pos_frusky[4] = 44; @@ -2192,8 +2192,8 @@ void DrasculaEngine::animation_13_5() { pos_frusky[1] = 1; pos_frusky[2] = frank_x; updateRoom(); - copyRectClip(pos_frusky, dir_hare_fondo, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyRectClip(pos_frusky, backSurface, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(15); playMusic(18); @@ -2203,8 +2203,8 @@ void DrasculaEngine::animation_13_5() { pos_frusky[0] = frus_x[frame]; pos_frusky[1] = frus_y[frame]; pos_frusky[2] = frank_x; - copyRectClip( pos_frusky, dir_hare_fondo, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyRectClip( pos_frusky, backSurface, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); frank_x = frank_x - 5; frame++; if (frank_x <= -45) @@ -2221,7 +2221,7 @@ void DrasculaEngine::animation_14_5() { flags[11] = 1; playSound("s3.als"); updateRoom(); - updateScreen(0, 0, 0,0 , 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0,0 , 320, 200, screenSurface); stopSound(); pause(17); sentido_hare = 3; @@ -2230,12 +2230,12 @@ void DrasculaEngine::animation_14_5() { flags[10] = 1; playSound("s7.als"); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); stopSound(); pause(14); sentido_hare = 3; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk_solo(_textd[_lang][18], "d18.als"); fadeToBlack(1); } @@ -2267,11 +2267,11 @@ void DrasculaEngine::animation_1_6() { factor_red[l] = 98; loadPic("auxig2.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("auxdr.alg"); - decompressPic(dir_dibujo2, 1); + decompressPic(drawSurface2, 1); loadPic("car.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); talk_dr_dch(19); talk(247); talk_dr_dch(20); @@ -2293,15 +2293,15 @@ void DrasculaEngine::animation_1_6() { fadeToBlack(1); clearRoom(); loadPic("time1.alg"); - decompressPic(dir_zona_pantalla, 1); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + decompressPic(screenSurface, 1); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); delay(930); clearRoom(); black(); hare_se_ve = 0; flags[0] = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); fadeFromBlack(1); talk(256); talk_dr_dch(30); @@ -2309,13 +2309,13 @@ void DrasculaEngine::animation_1_6() { fadeToBlack(0); clearRoom(); loadPic("time1.alg"); - decompressPic(dir_zona_pantalla,1); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + decompressPic(screenSurface,1); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); delay(900); clearRoom(); black(); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); fadeFromBlack(1); talk(258); talk_dr_dch(31); @@ -2330,7 +2330,7 @@ void DrasculaEngine::animation_1_6() { talk_dr_izq(35); if (_lang == kSpanish) - dir_texto = dir_hare_dch; + textSurface = extraSurface; clearRoom(); carga_escoba("102.ald"); @@ -2362,14 +2362,14 @@ void DrasculaEngine::animation_5_6() { anima("man.bin", 14); for (n = -125; n <= 0; n = n + 2) { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); pos_pen[3] = n; - copyRectClip(pos_pen, dir_dibujo3, dir_zona_pantalla); + copyRectClip(pos_pen, drawSurface3, screenSurface); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(2); } @@ -2382,13 +2382,13 @@ void DrasculaEngine::animation_6_6() { withoutVerb(); removeObject(20); loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("97.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); rompo = 1; objExit = 104; hare_x = -1; @@ -2430,22 +2430,22 @@ void DrasculaEngine::animation_9_6() { // by the original roomNumber = -1; loadPic("nota2.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); black(); sentido_hare = 1; hare_x -= 21; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); fadeFromBlack(0); pause(96); lleva_al_hare(116, 178); sentido_hare = 2; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); playMusic(9); clearRoom(); loadPic("nota.alg"); - decompressPic(dir_dibujo1, COMPLETE_PAL); + decompressPic(drawSurface1, COMPLETE_PAL); color_abc(WHITE); talk_solo(_textbj[_lang][24], "bj24.als"); talk_solo(_textbj[_lang][25], "bj25.als"); @@ -2455,9 +2455,9 @@ void DrasculaEngine::animation_9_6() { sentido_hare = 3; clearRoom(); loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETE_PAL); + decompressPic(frontSurface, COMPLETE_PAL); loadPic("nota2.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); talk(_text[_lang][296], "296.als"); talk(_text[_lang][297], "297.als"); talk(_text[_lang][298], "298.als"); @@ -2465,15 +2465,15 @@ void DrasculaEngine::animation_9_6() { talk(_text[_lang][299], "299.als"); talk(_text[_lang][300], "300.als"); updateRoom(); - copyBackground(0, 0, 0, 0, 320, 200, dir_zona_pantalla, dir_dibujo1); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); color_abc(LIGHT_GREEN); talk_solo("GOOOOOOOOOOOOOOOL", "s15.als"); loadPic("nota2.alg"); - decompressPic(dir_dibujo1, 1); + decompressPic(drawSurface1, 1); sentido_hare = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk(_text[_lang][301], "301.als"); v_cd = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16; v_cd = v_cd + 4; @@ -2492,10 +2492,10 @@ void DrasculaEngine::animation_9_6() { void DrasculaEngine::animation_10_6() { playSound ("s14.als"); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(164, 85, 155, 48, 113, 114, dir_dibujo3, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(164, 85, 155, 48, 113, 114, drawSurface3, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); stopSound(); talk_taber2(_textt[_lang][23], "t23.als"); flags[7] = 1; @@ -2537,15 +2537,15 @@ void DrasculaEngine::animation_18_6() { } void DrasculaEngine::animation_19_6() { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - copyBackground(140, 23, 161, 69, 35, 80, dir_dibujo3, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(140, 23, 161, 69, 35, 80, drawSurface3, screenSurface); updateRefresh_pre(); pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(6); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); playSound("s4.als"); pause(6); stopSound(); @@ -2553,26 +2553,26 @@ void DrasculaEngine::animation_19_6() { void DrasculaEngine::animation_12_2() { if (_lang == kSpanish) - dir_texto = dir_hare_frente; + textSurface = frontSurface; loadPic("an12.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); talk(_text[_lang][356], "356.als"); updateRefresh_pre(); - copyBackground(1, 139, 228, 112, 47, 60, dir_hare_dch, dir_zona_pantalla); - updateScreen(228, 112, 228, 112, 47, 60, dir_zona_pantalla); + copyBackground(1, 139, 228, 112, 47, 60, extraSurface, screenSurface); + updateScreen(228, 112, 228, 112, 47, 60, screenSurface); pause(3); updateRefresh_pre(); - copyBackground(49, 139, 228, 112, 47, 60, dir_hare_dch, dir_zona_pantalla); + copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface); pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); stopMusic(); @@ -2582,37 +2582,37 @@ void DrasculaEngine::animation_12_2() { converse("op_1.cal"); if (_lang == kSpanish) - dir_texto = dir_hare_dch; + textSurface = extraSurface; flags[11] = 0; loadPic("974.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); } void DrasculaEngine::animation_26_2() { int n, x = 0; if (_lang == kSpanish) - dir_texto = dir_hare_frente; + textSurface = frontSurface; loadPic("an12.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); talk(_text[_lang][392], "392.als"); updateRefresh_pre(); - copyBackground(1, 139, 228, 112, 47, 60, dir_hare_dch, dir_zona_pantalla); - updateScreen(228, 112, 228, 112, 47, 60, dir_zona_pantalla); + copyBackground(1, 139, 228, 112, 47, 60, extraSurface, screenSurface); + updateScreen(228, 112, 228, 112, 47, 60, screenSurface); pause(3); updateRefresh_pre(); - copyBackground(49, 139, 228, 112, 47, 60, dir_hare_dch, dir_zona_pantalla); + copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface); pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); stopMusic(); @@ -2625,11 +2625,11 @@ void DrasculaEngine::animation_26_2() { talk_pianista(_textp[_lang][19], "P19.als"); loadPic("an26.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); for (n = 0; n < 6; n++){ x++; - copyBackground(x, 1, 225, 113, 50, 59, dir_hare_dch, dir_zona_pantalla); - updateScreen(225,113, 225,113, 50,59, dir_zona_pantalla); + copyBackground(x, 1, 225, 113, 50, 59, extraSurface, screenSurface); + updateScreen(225,113, 225,113, 50,59, screenSurface); x = x + 50; pause(3); } @@ -2637,8 +2637,8 @@ void DrasculaEngine::animation_26_2() { x = 0; for (n = 0; n < 6; n++) { x++; - copyBackground(x, 61, 225, 113, 50, 59, dir_hare_dch, dir_zona_pantalla); - updateScreen(225, 113, 225, 113, 50, 59, dir_zona_pantalla); + copyBackground(x, 61, 225, 113, 50, 59, extraSurface, screenSurface); + updateScreen(225, 113, 225, 113, 50, 59, screenSurface); x = x + 50; if (n == 2) playSound("s9.als"); @@ -2649,8 +2649,8 @@ void DrasculaEngine::animation_26_2() { x = 0; for (n = 0; n < 6; n++) { x++; - copyBackground(x, 121, 225, 113, 50, 59, dir_hare_dch, dir_zona_pantalla); - updateScreen(225, 113, 225, 113, 50, 59, dir_zona_pantalla); + copyBackground(x, 121, 225, 113, 50, 59, extraSurface, screenSurface); + updateScreen(225, 113, 225, 113, 50, 59, screenSurface); x = x + 50; pause(3); } @@ -2659,21 +2659,21 @@ void DrasculaEngine::animation_26_2() { removeObject(12); if (_lang == kSpanish) - dir_texto = dir_hare_dch; + textSurface = extraSurface; flags[11] = 0; flags[39] = 1; loadPic("974.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); roomMusic = 16; } void DrasculaEngine::animation_11_2() { if (_lang == kSpanish) - dir_texto = dir_hare_frente; + textSurface = frontSurface; loadPic("an11y13.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); talk(352); talk_tabernero(1); @@ -2686,15 +2686,15 @@ void DrasculaEngine::animation_11_2() { talk_tabernero("No, nada", "d82.als"); if (_lang == kSpanish) - dir_texto = dir_hare_dch; + textSurface = extraSurface; loadPic("974.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); } void DrasculaEngine::animation_13_2() { loadPic("an11y13.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); if (flags[41] == 0) { talk(_text[_lang][103], "103.als"); @@ -2711,7 +2711,7 @@ void DrasculaEngine::animation_13_2() { converse("op_2.cal"); loadPic("964.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); } void DrasculaEngine::animation_18_2() { @@ -2725,7 +2725,7 @@ void DrasculaEngine::animation_22_2() { sentido_hare=2; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); playSound("s13.als"); stopSound(); sentido_hare = 1; @@ -2750,7 +2750,7 @@ void DrasculaEngine::animation_24_2() { talk(356); loadPic("an24.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); animation_32_2(); @@ -2774,14 +2774,14 @@ void DrasculaEngine::animation_32_2() { int n, x = 0; loadPic("an32_1.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); loadPic("an32_2.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); for (n = 0; n < 4; n++) { x++; - copyBackground(x, 1, 113, 53, 65, 81, dir_dibujo3, dir_zona_pantalla); - updateScreen(113, 53, 113, 53, 65, 81, dir_zona_pantalla); + copyBackground(x, 1, 113, 53, 65, 81, drawSurface3, screenSurface); + updateScreen(113, 53, 113, 53, 65, 81, screenSurface); x = x + 65; pause(4); } @@ -2789,8 +2789,8 @@ void DrasculaEngine::animation_32_2() { x = 0; for (n = 0; n < 4; n++) { x++; - copyBackground(x, 83, 113, 53, 65, 81, dir_dibujo3, dir_zona_pantalla); - updateScreen(113, 53, 113, 53, 65, 81, dir_zona_pantalla); + copyBackground(x, 83, 113, 53, 65, 81, drawSurface3, screenSurface); + updateScreen(113, 53, 113, 53, 65, 81, screenSurface); x = x + 65; pause(4); } @@ -2798,8 +2798,8 @@ void DrasculaEngine::animation_32_2() { x = 0; for (n = 0; n < 4; n++) { x++; - copyBackground(x, 1, 113, 53, 65, 81, dir_hare_fondo, dir_zona_pantalla); - updateScreen(113, 53, 113, 53, 65, 81, dir_zona_pantalla); + copyBackground(x, 1, 113, 53, 65, 81, backSurface, screenSurface); + updateScreen(113, 53, 113, 53, 65, 81, screenSurface); x = x + 65; pause(4); } @@ -2807,15 +2807,15 @@ void DrasculaEngine::animation_32_2() { x = 0; for (n = 0; n < 3; n++) { x++; - copyBackground(x, 83, 113, 53, 65, 81, dir_hare_fondo, dir_zona_pantalla); - updateScreen(113, 53, 113, 53, 65, 81, dir_zona_pantalla); + copyBackground(x, 83, 113, 53, 65, 81, backSurface, screenSurface); + updateScreen(113, 53, 113, 53, 65, 81, screenSurface); x = x + 65; if (n < 2) pause(4); } loadPic("aux18.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); } void DrasculaEngine::animation_34_2() { @@ -2823,17 +2823,17 @@ void DrasculaEngine::animation_34_2() { sentido_hare = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); loadPic("an34_1.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("an34_2.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); for (n = 0; n < 3; n++) { x++; - copyBackground(x, 1, 218, 79, 83, 75, dir_hare_fondo, dir_zona_pantalla); - updateScreen(218, 79, 218, 79, 83, 75, dir_zona_pantalla); + copyBackground(x, 1, 218, 79, 83, 75, backSurface, screenSurface); + updateScreen(218, 79, 218, 79, 83, 75, screenSurface); x = x + 83; pause(3); } @@ -2842,8 +2842,8 @@ void DrasculaEngine::animation_34_2() { for (n = 0; n < 3; n++) { x++; - copyBackground(x, 77, 218, 79, 83, 75, dir_hare_fondo, dir_zona_pantalla); - updateScreen(218, 79, 218, 79, 83, 75, dir_zona_pantalla); + copyBackground(x, 77, 218, 79, 83, 75, backSurface, screenSurface); + updateScreen(218, 79, 218, 79, 83, 75, screenSurface); x = x + 83; pause(3); } @@ -2853,8 +2853,8 @@ void DrasculaEngine::animation_34_2() { for (n = 0; n < 3; n++) { x++; - copyBackground(x, 1, 218, 79, 83, 75, dir_hare_dch, dir_zona_pantalla); - updateScreen(218, 79, 218, 79, 83,75, dir_zona_pantalla); + copyBackground(x, 1, 218, 79, 83, 75, extraSurface, screenSurface); + updateScreen(218, 79, 218, 79, 83,75, screenSurface); x = x + 83; pause(3); } @@ -2862,22 +2862,22 @@ void DrasculaEngine::animation_34_2() { pause(30); - copyBackground(1, 77, 218, 79, 83, 75, dir_hare_dch, dir_zona_pantalla); - updateScreen(218, 79, 218, 79, 83, 75, dir_zona_pantalla); + copyBackground(1, 77, 218, 79, 83, 75, extraSurface, screenSurface); + updateScreen(218, 79, 218, 79, 83, 75, screenSurface); pause(3); loadPic("994.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("974.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); } void DrasculaEngine::animation_36_2() { if (_lang == kSpanish) - dir_texto = dir_hare_frente; + textSurface = frontSurface; loadPic("an11y13.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); talk(404); talk_tabernero(19); @@ -2888,34 +2888,34 @@ void DrasculaEngine::animation_36_2() { talk_tabernero("No, nada", "d82.als"); if (_lang == kSpanish) - dir_texto = dir_hare_dch; + textSurface = extraSurface; loadPic("974.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); } void DrasculaEngine::animation_7_2() { int n, x = 0; loadPic("an7_1.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("an7_2.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("an7_3.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); if (flags[3] == 1) - copyBackground(258, 110, 85, 44, 23, 53, dir_dibujo3, dir_dibujo1); + copyBackground(258, 110, 85, 44, 23, 53, drawSurface3, drawSurface1); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, 80, 64, 51, 73, dir_hare_fondo, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 1, 80, 64, 51, 73, backSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -2924,9 +2924,9 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, 80, 64, 51, 73, dir_hare_fondo, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 75, 80, 64, 51, 73, backSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -2935,9 +2935,9 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, 80, 64, 51, 73, dir_hare_dch, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 1, 80, 64, 51, 73, extraSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -2946,9 +2946,9 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, 80, 64, 51, 73, dir_hare_dch, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 75, 80, 64, 51, 73, extraSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -2957,28 +2957,28 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, 80, 64, 51, 73, dir_hare_frente, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 1, 80, 64, 51, 73, frontSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } loadPic("an7_4.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("an7_5.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("an7_6.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("an7_7.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); x = 0; for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, 80, 64, 51, 73, dir_hare_fondo, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 1, 80, 64, 51, 73, backSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -2987,9 +2987,9 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, 80, 64, 51, 73, dir_hare_fondo, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 75, 80, 64, 51, 73, backSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -2998,9 +2998,9 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, 80, 64, 51,73, dir_hare_dch, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 1, 80, 64, 51,73, extraSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -3009,9 +3009,9 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, 80, 64, 51, 73, dir_hare_dch, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 75, 80, 64, 51, 73, extraSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -3020,9 +3020,9 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, 80, 64, 51, 73, dir_hare_frente, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 1, 80, 64, 51, 73, frontSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -3031,9 +3031,9 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, 80, 64, 51, 73, dir_hare_dch, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 75, 80, 64, 51, 73, extraSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -3042,9 +3042,9 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, 80, 64, 51, 73, dir_hare_frente, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 1, 80, 64, 51, 73, frontSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -3053,9 +3053,9 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, 80, 64, 51, 73, dir_hare_frente, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 75, 80, 64, 51, 73, frontSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -3064,9 +3064,9 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, 80, 64, 51, 73, dir_dibujo3, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 1, 80, 64, 51, 73, drawSurface3, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -3075,24 +3075,24 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 2; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, 80, 64, 51, 73, dir_dibujo3, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 75, 80, 64, 51, 73, drawSurface3, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } loadPic("an7_8.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("an7_9.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); x = 0; for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, 80, 64, 51, 73, dir_hare_fondo, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 1, 80, 64, 51, 73, backSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -3101,9 +3101,9 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 75, 80, 64, 51, 73, dir_hare_fondo, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 75, 80, 64, 51, 73, backSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } @@ -3112,17 +3112,17 @@ void DrasculaEngine::animation_7_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(x, 1, 80, 64, 51, 73, dir_hare_dch, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(x, 1, 80, 64, 51, 73, extraSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); x = x + 51; pause(3); } - copyBackground(80, 64, 80, 64, 51, 73, dir_dibujo1, dir_zona_pantalla); - copyRect(1, 75, 80, 64, 51, 73, dir_hare_dch, dir_zona_pantalla); - updateScreen(80, 64, 80, 64, 51, 73, dir_zona_pantalla); + copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyRect(1, 75, 80, 64, 51, 73, extraSurface, screenSurface); + updateScreen(80, 64, 80, 64, 51, 73, screenSurface); flags[37] = 1; @@ -3130,13 +3130,13 @@ void DrasculaEngine::animation_7_2() { flags[38] = 1; loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("aux3.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); } void DrasculaEngine::animation_5_2() { @@ -3144,24 +3144,24 @@ void DrasculaEngine::animation_5_2() { sentido_hare = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); loadPic("an5_1.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("an5_2.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("an5_3.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("an5_4.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); - copyBackground(1, 1, 213, 66, 53,84, dir_hare_fondo, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(1, 1, 213, 66, 53,84, backSurface, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); for (n = 0; n < 6; n++) { x++; - copyBackground(x, 1, 213, 66, 53, 84, dir_hare_fondo, dir_zona_pantalla); - updateScreen(213, 66, 213, 66, 53, 84,dir_zona_pantalla); + copyBackground(x, 1, 213, 66, 53, 84, backSurface, screenSurface); + updateScreen(213, 66, 213, 66, 53, 84,screenSurface); x = x + 52; pause(3); } @@ -3170,8 +3170,8 @@ void DrasculaEngine::animation_5_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(x, 86, 213, 66, 53, 84, dir_hare_fondo, dir_zona_pantalla); - updateScreen(213, 66, 213, 66, 53, 84, dir_zona_pantalla); + copyBackground(x, 86, 213, 66, 53, 84, backSurface, screenSurface); + updateScreen(213, 66, 213, 66, 53, 84, screenSurface); x = x + 52; pause(3); } @@ -3180,8 +3180,8 @@ void DrasculaEngine::animation_5_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(x, 1, 213, 66, 53, 84, dir_hare_dch, dir_zona_pantalla); - updateScreen(213, 66, 213, 66, 53, 84, dir_zona_pantalla); + copyBackground(x, 1, 213, 66, 53, 84, extraSurface, screenSurface); + updateScreen(213, 66, 213, 66, 53, 84, screenSurface); x = x + 52; pause(3); } @@ -3190,8 +3190,8 @@ void DrasculaEngine::animation_5_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(x, 1, 213, 66, 53, 84, dir_hare_dch, dir_zona_pantalla); - updateScreen(213, 66, 213, 66, 53, 84, dir_zona_pantalla); + copyBackground(x, 1, 213, 66, 53, 84, extraSurface, screenSurface); + updateScreen(213, 66, 213, 66, 53, 84, screenSurface); x = x + 52; pause(3); } @@ -3200,8 +3200,8 @@ void DrasculaEngine::animation_5_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(x, 86, 213, 66, 53, 84, dir_hare_dch, dir_zona_pantalla); - updateScreen(213, 66, 213, 66, 53, 84, dir_zona_pantalla); + copyBackground(x, 86, 213, 66, 53, 84, extraSurface, screenSurface); + updateScreen(213, 66, 213, 66, 53, 84, screenSurface); x = x + 52; pause(3); } @@ -3210,8 +3210,8 @@ void DrasculaEngine::animation_5_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(x, 1, 213, 66, 53, 84, dir_hare_frente, dir_zona_pantalla); - updateScreen(213, 66, 213, 66, 53, 84, dir_zona_pantalla); + copyBackground(x, 1, 213, 66, 53, 84, frontSurface, screenSurface); + updateScreen(213, 66, 213, 66, 53, 84, screenSurface); x = x + 52; pause(3); } @@ -3222,8 +3222,8 @@ void DrasculaEngine::animation_5_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(x, 86, 213, 66, 53, 84, dir_hare_frente, dir_zona_pantalla); - updateScreen(213, 66, 213, 66, 53, 84, dir_zona_pantalla); + copyBackground(x, 86, 213, 66, 53, 84, frontSurface, screenSurface); + updateScreen(213, 66, 213, 66, 53, 84, screenSurface); x = x + 52; pause(3); } @@ -3233,20 +3233,20 @@ void DrasculaEngine::animation_5_2() { for (n = 0; n < 6; n++) { x++; - copyBackground(x, 1, 213, 66, 53, 84, dir_dibujo3, dir_zona_pantalla); - updateScreen(213, 66, 213, 66, 53, 84, dir_zona_pantalla); + copyBackground(x, 1, 213, 66, 53, 84, drawSurface3, screenSurface); + updateScreen(213, 66, 213, 66, 53, 84, screenSurface); x = x + 52; pause(3); } loadPic("994.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("974.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("964.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("aux5.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); flags[8] = 1; hare_x = hare_x - 4; talk_sinc(_text[_lang][46], "46.als", "4442444244244"); @@ -3258,22 +3258,22 @@ void DrasculaEngine::animation_6_2() { flags[9] = 1; if (_lang == kSpanish) - dir_texto = dir_hare_frente; + textSurface = frontSurface; clearRoom(); loadPic("ciego1.alg"); // ciego = blind - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); loadPic("ciego2.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); loadPic("ciego3.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("ciego4.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("ciego5.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(1); @@ -3284,8 +3284,8 @@ void DrasculaEngine::animation_6_2() { pause(4); talk_hacker(_textd[_lang][67], "d67.als"); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(10); @@ -3293,19 +3293,19 @@ void DrasculaEngine::animation_6_2() { playMusic(roomMusic); loadPic("9.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); loadPic("aux9.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); withoutVerb(); if (_lang == kSpanish) - dir_texto = dir_hare_dch; + textSurface = extraSurface; flags[9] = 0; } @@ -3320,21 +3320,21 @@ void DrasculaEngine::animation_33_2() { clearRoom(); loadPic("ciego1.alg"); // ciego = blind - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); loadPic("ciego2.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); loadPic("ciego3.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("ciego4.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("ciego5.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); if (_lang == kSpanish) - dir_texto = dir_hare_frente; + textSurface = frontSurface; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(10); @@ -3346,8 +3346,8 @@ void DrasculaEngine::animation_33_2() { talk_blind(_textd[_lang][77], "d77.als", _textd1[_lang][77 - TEXTD_START]); talk_hacker(_textd[_lang][65], "d65.als"); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(14); @@ -3355,19 +3355,19 @@ void DrasculaEngine::animation_33_2() { playMusic(roomMusic); loadPic("9.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); loadPic("aux9.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); withoutVerb(); if (_lang == kSpanish) - dir_texto = dir_hare_dch; + textSurface = extraSurface; flags[33] = 1; flags[9] = 0; @@ -3380,17 +3380,17 @@ void DrasculaEngine::animation_1_4() { updateRefresh_pre(); - copyBackground(131, 133, 199, 95, 50, 66, dir_dibujo3, dir_zona_pantalla); - updateScreen(199, 95, 199, 95, 50, 66, dir_zona_pantalla); + copyBackground(131, 133, 199, 95, 50, 66, drawSurface3, screenSurface); + updateScreen(199, 95, 199, 95, 50, 66, screenSurface); pause(3); updateRefresh_pre(); - copyBackground(182, 133, 199, 95, 50, 66, dir_dibujo3, dir_zona_pantalla); + copyBackground(182, 133, 199, 95, 50, 66, drawSurface3, screenSurface); pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); flags[18] = 1; @@ -3405,16 +3405,16 @@ void DrasculaEngine::animation_1_4() { updateRefresh_pre(); - copyBackground(131, 133, 199, 95, 50, 66, dir_dibujo3, dir_zona_pantalla); - updateScreen(199, 95, 199, 95, 50, 66, dir_zona_pantalla); + copyBackground(131, 133, 199, 95, 50, 66, drawSurface3, screenSurface); + updateScreen(199, 95, 199, 95, 50, 66, screenSurface); pause(2); updateRefresh_pre(); - copyBackground(182, 133, 199, 95, 50, 66, dir_dibujo3, dir_zona_pantalla); + copyBackground(182, 133, 199, 95, 50, 66, drawSurface3, screenSurface); pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); flags[18] = 1; flags[20] = 1; @@ -3432,30 +3432,30 @@ void DrasculaEngine::animation_1_4() { void DrasculaEngine::animation_5_4(){ sentido_hare = 3; loadPic("anh_dr.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); lleva_al_hare(99, 160); lleva_al_hare(38, 177); hare_se_ve = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); delay(800); anima("bio.bin", 14); flags[29] = 1; hare_x = 95; hare_y = 82; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); openDoor(2, 0); loadPic("auxigor.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); x_igor = 100; y_igor = 65; talk_igor_frente(_texti[_lang][29], "I29.ALS"); talk_igor_frente(_texti[_lang][30], "I30.als"); loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); hare_se_ve = 1; fadeToBlack(0); exitRoom(0); @@ -3467,29 +3467,29 @@ void DrasculaEngine::animation_6_4() { roomNumber = 26; clearRoom(); loadPic("26.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); loadPic("aux26.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); loadPic("auxigor.alg"); - decompressPic(dir_hare_frente, 1); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + decompressPic(frontSurface, 1); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); update_26_pre(); x_igor = 104; y_igor = 71; placeIgor(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(40); talk_igor_frente(_texti[_lang][26], "I26.als"); roomNumber = prevRoom; clearRoom(); loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic(roomDisk); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); char rm[20]; sprintf(rm, "%i.alg", roomNumber); loadPic(rm); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); withoutVerb(); updateRoom(); } @@ -3500,16 +3500,16 @@ void DrasculaEngine::animation_8_4() { int estanteria_y[] = {1, 1, 1, 1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74}; loadPic("an_8.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); for (frame = 0; frame < 14; frame++) { pause(2); - copyBackground(estanteria_x[frame], estanteria_y[frame], 77, 45, 73, 72, dir_hare_frente, dir_zona_pantalla); - updateScreen(77, 45, 77, 45, 73, 72, dir_zona_pantalla); + copyBackground(estanteria_x[frame], estanteria_y[frame], 77, 45, 73, 72, frontSurface, screenSurface); + updateScreen(77, 45, 77, 45, 73, 72, screenSurface); } loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); openDoor(7, 2); } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 093cdba1f9..0893cb34bb 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -203,66 +203,66 @@ int DrasculaEngine::go() { if (num_ejec != 6) { loadPic("95.alg"); - decompressPic(dir_mesa, 1); + decompressPic(tableSurface, 1); } if (num_ejec == 1) { loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETE_PAL); + decompressPic(frontSurface, COMPLETE_PAL); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); } else if (num_ejec == 2) { loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETE_PAL); + decompressPic(frontSurface, COMPLETE_PAL); loadPic("pts.alg"); - decompressPic(dir_dibujo2, 1); + decompressPic(drawSurface2, 1); } else if (num_ejec == 3) { loadPic("aux13.alg"); - decompressPic(dir_dibujo1, COMPLETE_PAL); + decompressPic(drawSurface1, COMPLETE_PAL); loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); } else if (num_ejec == 4) { loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETE_PAL); + decompressPic(frontSurface, COMPLETE_PAL); if (hay_que_load == 0) animation_rayo(); loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); clearRoom(); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); } else if (num_ejec == 5) { loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETE_PAL); + decompressPic(frontSurface, COMPLETE_PAL); loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); } else if (num_ejec == 6) { x_igor = 105, y_igor = 85, sentido_igor = 1; x_dr = 62, y_dr = 99, sentido_dr = 1; frame_pen = 0; flag_tv = 0; - dir_pendulum = dir_dibujo3; + pendulumSurface = drawSurface3; loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETE_PAL); + decompressPic(frontSurface, COMPLETE_PAL); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("95.alg"); - decompressPic(dir_mesa, 1); + decompressPic(tableSurface, 1); } memset(iconName, 0, sizeof(iconName)); @@ -296,33 +296,33 @@ void DrasculaEngine::releaseGame() { } void DrasculaEngine::allocMemory() { - dir_zona_pantalla = (byte *)malloc(64000); - assert(dir_zona_pantalla); - dir_dibujo1 = (byte *)malloc(64000); - assert(dir_dibujo1); - dir_hare_fondo = (byte *)malloc(64000); - assert(dir_hare_fondo); - dir_dibujo3 = (byte *)malloc(64000); - assert(dir_dibujo3); - dir_dibujo2 = (byte *)malloc(64000); - assert(dir_dibujo2); - dir_mesa = (byte *)malloc(64000); - assert(dir_mesa); - dir_hare_dch = (byte *)malloc(64000); - assert(dir_hare_dch); - dir_hare_frente = (byte *)malloc(64000); - assert(dir_hare_frente); + screenSurface = (byte *)malloc(64000); + assert(screenSurface); + frontSurface = (byte *)malloc(64000); + assert(frontSurface); + backSurface = (byte *)malloc(64000); + assert(backSurface); + drawSurface1 = (byte *)malloc(64000); + assert(drawSurface1); + drawSurface2 = (byte *)malloc(64000); + assert(drawSurface2); + drawSurface3 = (byte *)malloc(64000); + assert(drawSurface3); + tableSurface = (byte *)malloc(64000); + assert(tableSurface); + extraSurface = (byte *)malloc(64000); + assert(extraSurface); } void DrasculaEngine::freeMemory() { - free(dir_zona_pantalla); - free(dir_dibujo1); - free(dir_hare_fondo); - free(dir_dibujo2); - free(dir_mesa); - free(dir_dibujo3); - free(dir_hare_dch); - free(dir_hare_frente); + free(screenSurface); + free(drawSurface1); + free(backSurface); + free(drawSurface2); + free(tableSurface); + free(drawSurface3); + free(extraSurface); + free(frontSurface); } void DrasculaEngine::loadPic(const char *NamePcc) { @@ -502,9 +502,9 @@ bool DrasculaEngine::escoba() { int n; if (_lang == kSpanish) - dir_texto = dir_hare_dch; + textSurface = extraSurface; else - dir_texto = dir_mesa; + textSurface = tableSurface; previousMusic = -1; @@ -539,7 +539,7 @@ bool DrasculaEngine::escoba() { withoutVerb(); loadPic("2aux62.alg"); - decompressPic(dir_dibujo2, 1); + decompressPic(drawSurface2, 1); sentido_hare = 1; objExit = 104; if (hay_que_load != 0) { @@ -630,7 +630,7 @@ bool DrasculaEngine::escoba() { return true; } loadPic("auxdr.alg"); - decompressPic(dir_dibujo2, 1); + decompressPic(drawSurface2, 1); } } @@ -654,7 +654,7 @@ bucles: } moveCursor(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if (num_ejec == 2) { if (musicStatus() == 0 && roomMusic != 0) @@ -675,7 +675,7 @@ bucles: loadPic(menuBackground); else loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); setPalette((byte *)&gamePalette); menuScreen = 0; updateEvents(); @@ -695,7 +695,7 @@ bucles: loadPic("iconsp.alg"); else loadPic("icons.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); menuScreen = 1; updateEvents(); withoutVerb(); @@ -766,14 +766,14 @@ bucles: } else if (key == Common::KEYCODE_v) { withVoices = 1; print_abc(_textsys[_lang][2], 96, 86); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); delay(1410); if (num_ejec != 3) cont_sv = 0; } else if (key == Common::KEYCODE_t) { withVoices = 0; print_abc(_textsys[_lang][3], 94, 86); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); delay(1460); if (num_ejec != 3) cont_sv = 0; @@ -784,7 +784,7 @@ bucles: cont_sv = 0; } else if (num_ejec == 6 && key == Common::KEYCODE_0 && roomNumber == 61) { loadPic("alcbar.alg"); - decompressPic(dir_dibujo1, 255); + decompressPic(drawSurface1, 255); } else if (cont_sv == 1500) { screenSaver(); if (num_ejec != 3) @@ -805,13 +805,13 @@ void DrasculaEngine::pickObject(int objeto) { loadPic("icons3.alg"); else loadPic("icons.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); chooseObject(objeto); if (num_ejec == 2) loadPic(menuBackground); else loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); } void DrasculaEngine::chooseObject(int objeto) { @@ -822,7 +822,7 @@ void DrasculaEngine::chooseObject(int objeto) { if (takeObject == 1 && menuScreen == 0) addObject(pickedObject); } - copyBackground(x1d_menu[objeto], y1d_menu[objeto], 0, 0, OBJWIDTH,OBJHEIGHT, dir_hare_fondo, dir_dibujo3); + copyBackground(x1d_menu[objeto], y1d_menu[objeto], 0, 0, OBJWIDTH,OBJHEIGHT, backSurface, drawSurface3); takeObject = 1; pickedObject = objeto; } @@ -852,7 +852,7 @@ void DrasculaEngine::withoutVerb() { if (takeObject == 1) addObject(pickedObject); } - copyBackground(0, c, 0, 0, OBJWIDTH,OBJHEIGHT, dir_hare_fondo, dir_dibujo3); + copyBackground(0, c, 0, 0, OBJWIDTH,OBJHEIGHT, backSurface, drawSurface3); takeObject = 0; hasName = 0; @@ -951,11 +951,11 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { sscanf(buffer, "%s",pant4); loadPic(pant2); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic(pant1); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic(pant4); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); strcpy(menuBackground, pant4); } @@ -1029,11 +1029,11 @@ martini: ancho_hare = CHARACTER_WIDTH; feetHeight = PIES_HARE; loadPic("97.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); strcpy(menuBackground, "99.alg"); } @@ -1052,14 +1052,14 @@ martini: hare_se_mueve = 0; } loadPic(roomDisk); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); char rm[20]; sprintf(rm, "%i.alg", roomNumber); loadPic(rm); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); - copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_dibujo3); + copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); color_hare(); if (nivel_osc != 0) @@ -1193,7 +1193,7 @@ void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { for (;;) { updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if (hare_se_mueve == 0) break; } @@ -1204,13 +1204,13 @@ void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { } fin: updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::moveCursor() { int cursorPos[8]; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); pon_hare(); @@ -1234,7 +1234,7 @@ void DrasculaEngine::moveCursor() { cursorPos[3] = mouseY - 17; cursorPos[4] = OBJWIDTH; cursorPos[5] = OBJHEIGHT; - copyRectClip(cursorPos, dir_dibujo3, dir_zona_pantalla); + copyRectClip(cursorPos, drawSurface3, screenSurface); } void DrasculaEngine::checkObjects() { @@ -1425,7 +1425,7 @@ void DrasculaEngine::selectVerb(int verbo) { addObject(pickedObject); } - copyBackground(OBJWIDTH * verbo, c, 0, 0, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_dibujo3); + copyBackground(OBJWIDTH * verbo, c, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); takeObject = 1; pickedObject = verbo; @@ -1434,8 +1434,8 @@ void DrasculaEngine::selectVerb(int verbo) { void DrasculaEngine::mesa() { int nivel_master, nivel_voc, nivel_cd; - copyRect(1, 56, 73, 63, 177, 97, dir_mesa, dir_zona_pantalla); - updateScreen(73, 63, 73, 63, 177, 97, dir_zona_pantalla); + copyRect(1, 56, 73, 63, 177, 97, tableSurface, screenSurface); + updateScreen(73, 63, 73, 63, 177, 97, screenSurface); for (;;) { nivel_master = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4); @@ -1444,15 +1444,15 @@ void DrasculaEngine::mesa() { updateRoom(); - copyRect(1, 56, 73, 63, 177, 97, dir_mesa, dir_zona_pantalla); + copyRect(1, 56, 73, 63, 177, 97, tableSurface, screenSurface); - copyBackground(183, 56, 82, nivel_master, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4), dir_mesa, dir_zona_pantalla); - copyBackground(183, 56, 138, nivel_voc, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4), dir_mesa, dir_zona_pantalla); - copyBackground(183, 56, 194, nivel_cd, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4), dir_mesa, dir_zona_pantalla); + copyBackground(183, 56, 82, nivel_master, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4), tableSurface, screenSurface); + copyBackground(183, 56, 138, nivel_voc, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4), tableSurface, screenSurface); + copyBackground(183, 56, 194, nivel_cd, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4), tableSurface, screenSurface); setCursorTable(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); updateEvents(); @@ -1522,20 +1522,20 @@ bool DrasculaEngine::saves() { delete sav; loadPic("savescr.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); color_abc(LIGHT_GREEN); for (;;) { y = 27; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); for (n = 0; n < NUM_SAVES; n++) { print_abc(names[n], 116, y); y = y + 9; } print_abc(select, 117, 15); setCursorTable(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); y = 27; updateEvents(); @@ -1612,7 +1612,7 @@ bool DrasculaEngine::saves() { else if (hay_seleccion == 0) { print_abc("elige una partida", 117, 15); } - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); delay(400); } y = 26; @@ -1624,7 +1624,7 @@ bool DrasculaEngine::saves() { char rm[20]; sprintf(rm, "%i.alg", roomNumber); loadPic(rm); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); hay_seleccion = 0; return true; @@ -1747,7 +1747,7 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) pos_texto[4] = CHAR_WIDTH; pos_texto[5] = CHAR_HEIGHT; - copyRectClip(pos_texto, dir_texto, dir_zona_pantalla); + copyRectClip(pos_texto, textSurface, screenSurface); x_pantalla = x_pantalla + CHAR_WIDTH; if (x_pantalla > 317) { @@ -1767,7 +1767,7 @@ bool DrasculaEngine::confirma_salir() { color_abc(RED); updateRoom(); centerText(_textsys[_lang][1], 160, 87); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); delay(100); for (;;) { @@ -1800,7 +1800,7 @@ void DrasculaEngine::screenSaver() { clearRoom(); loadPic("sv.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); // inicio_ghost(); copia = (byte *)malloc(64000); @@ -1819,9 +1819,9 @@ void DrasculaEngine::screenSaver() { yr = mouseY; for (;;) { - // efecto(dir_dibujo1); + // efecto(drawSurface1); - memcpy(copia, dir_dibujo1, 64000); + memcpy(copia, drawSurface1, 64000); coeff += 0.1f; coeff2 = coeff; @@ -1881,7 +1881,7 @@ void DrasculaEngine::screenSaver() { y1_ -= 200; off2 = 320 * y1_ + x1_; - VGA[320 * i + j] = ghost[dir_dibujo1[off2] + (copia[off1] << 8)]; + VGA[320 * i + j] = ghost[drawSurface1[off2] + (copia[off1] << 8)]; } } _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); @@ -1906,7 +1906,7 @@ void DrasculaEngine::screenSaver() { char rm[20]; sprintf(rm, "%i.alg", roomNumber); loadPic(rm); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); } void DrasculaEngine::fliplay(const char *filefli, int vel) { @@ -2142,7 +2142,7 @@ void DrasculaEngine::placeIgor() { pos_igor[4] = 54; pos_igor[5] = 61; - copyRectClip(pos_igor, dir_hare_frente, dir_zona_pantalla); + copyRectClip(pos_igor, frontSurface, screenSurface); } void DrasculaEngine::placeDrascula() { @@ -2161,9 +2161,9 @@ void DrasculaEngine::placeDrascula() { pos_dr[5] = 77; if (num_ejec == 6) - copyRectClip(pos_dr, dir_dibujo2, dir_zona_pantalla); + copyRectClip(pos_dr, drawSurface2, screenSurface); else - copyRectClip(pos_dr, dir_hare_fondo, dir_zona_pantalla); + copyRectClip(pos_dr, backSurface, screenSurface); } void DrasculaEngine::placeBJ() { @@ -2179,7 +2179,7 @@ void DrasculaEngine::placeBJ() { pos_bj[4] = 26; pos_bj[5] = 76; - copyRectClip(pos_bj, dir_dibujo3, dir_zona_pantalla); + copyRectClip(pos_bj, drawSurface3, screenSurface); } void DrasculaEngine::hiccup(int counter) { @@ -2192,9 +2192,9 @@ comienza: updateRoom(); if (num_ejec == 3) - updateScreen(0, 0, 0, y, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, y, 320, 200, screenSurface); else - updateScreen(0, 1, 0, y, 320, 198, dir_zona_pantalla); + updateScreen(0, 1, 0, y, 320, 198, screenSurface); if (sentido == 0) y++; @@ -2216,7 +2216,7 @@ comienza: goto comienza; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::stopSound() { @@ -2243,13 +2243,13 @@ int DrasculaEngine::musicStatus() { } void DrasculaEngine::updateRoom() { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); if (num_ejec == 3) { if (flags[0] == 0) pon_hare(); else - copyRect(113, 54, hare_x - 20, hare_y - 1, 77, 89, dir_dibujo3, dir_zona_pantalla); + copyRect(113, 54, hare_x - 20, hare_y - 1, 77, 89, drawSurface3, screenSurface); } else { pon_hare(); } @@ -2502,28 +2502,28 @@ void DrasculaEngine::pon_hare() { if (sentido_hare == 0) { pos_hare[1] = 0; if (num_ejec == 2) - copyRectClip(pos_hare, dir_hare_dch, dir_zona_pantalla); + copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], dir_hare_dch, dir_zona_pantalla); + factor_red[hare_y + alto_hare], extraSurface, screenSurface); } else if (sentido_hare == 1) { if (num_ejec == 2) - copyRectClip(pos_hare, dir_hare_dch, dir_zona_pantalla); + copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], dir_hare_dch, dir_zona_pantalla); + factor_red[hare_y + alto_hare], extraSurface, screenSurface); } else if (sentido_hare == 2) { if (num_ejec == 2) - copyRectClip(pos_hare, dir_hare_fondo, dir_zona_pantalla); + copyRectClip(pos_hare, backSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], dir_hare_fondo, dir_zona_pantalla); + factor_red[hare_y + alto_hare], backSurface, screenSurface); } else { if (num_ejec == 2) - copyRectClip(pos_hare, dir_hare_frente, dir_zona_pantalla); + copyRectClip(pos_hare, frontSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], dir_hare_frente, dir_zona_pantalla); + factor_red[hare_y + alto_hare], frontSurface, screenSurface); } } else if (hare_se_mueve == 1) { pos_hare[0] = frame_x[num_frame]; @@ -2540,28 +2540,28 @@ void DrasculaEngine::pon_hare() { if (sentido_hare == 0) { pos_hare[1] = 0; if (num_ejec == 2) - copyRectClip(pos_hare, dir_hare_dch, dir_zona_pantalla); + copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], dir_hare_dch, dir_zona_pantalla); + factor_red[hare_y + alto_hare], extraSurface, screenSurface); } else if (sentido_hare == 1) { if (num_ejec == 2) - copyRectClip(pos_hare, dir_hare_dch, dir_zona_pantalla); + copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], dir_hare_dch, dir_zona_pantalla); + factor_red[hare_y + alto_hare], extraSurface, screenSurface); } else if (sentido_hare == 2) { if (num_ejec == 2) - copyRectClip(pos_hare, dir_hare_fondo, dir_zona_pantalla); + copyRectClip(pos_hare, backSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], dir_hare_fondo, dir_zona_pantalla); + factor_red[hare_y + alto_hare], backSurface, screenSurface); } else { if (num_ejec == 2) - copyRectClip(pos_hare, dir_hare_frente, dir_zona_pantalla); + copyRectClip(pos_hare, frontSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], dir_hare_frente, dir_zona_pantalla); + factor_red[hare_y + alto_hare], frontSurface, screenSurface); } no_vuelco: @@ -2582,13 +2582,13 @@ void DrasculaEngine::menu_sin_volcar() { if (h != 0) { if (num_ejec == 6) copyBackground(x_pol[n], y_pol[n], itemLocations[n].x, itemLocations[n].y, - OBJWIDTH, OBJHEIGHT, dir_mesa, dir_zona_pantalla); + OBJWIDTH, OBJHEIGHT, tableSurface, screenSurface); else copyBackground(x_pol[n], y_pol[n], itemLocations[n].x, itemLocations[n].y, - OBJWIDTH, OBJHEIGHT, dir_hare_frente, dir_zona_pantalla); + OBJWIDTH, OBJHEIGHT, frontSurface, screenSurface); } copyRect(x1d_menu[h], y1d_menu[h], itemLocations[n].x, itemLocations[n].y, - OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_zona_pantalla); + OBJWIDTH, OBJHEIGHT, backSurface, screenSurface); } if (x < 7) @@ -2602,7 +2602,7 @@ void DrasculaEngine::clearMenu() { if (mouseX > x_barra[n] && mouseX < x_barra[n + 1]) sobre_verbo = 0; copyRect(OBJWIDTH * n, OBJHEIGHT * sobre_verbo, x_barra[n], 2, - OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_zona_pantalla); + OBJWIDTH, OBJHEIGHT, backSurface, screenSurface); sobre_verbo = 1; } } @@ -2639,7 +2639,7 @@ bool DrasculaEngine::exitRoom(int l) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; @@ -2696,7 +2696,7 @@ bool DrasculaEngine::exitRoom(int l) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; @@ -2714,7 +2714,7 @@ bool DrasculaEngine::exitRoom(int l) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; @@ -2735,7 +2735,7 @@ bool DrasculaEngine::exitRoom(int l) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; @@ -2754,7 +2754,7 @@ bool DrasculaEngine::exitRoom(int l) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; @@ -2781,7 +2781,7 @@ bool DrasculaEngine::pickupObject() { updateRoom(); menu_sin_volcar(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if (pickedObject < 7) goto usando_verbos; @@ -2810,7 +2810,7 @@ usando_verbos: bool DrasculaEngine::checkFlag(int fl) { hare_se_mueve = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); hasAnswer = 1; @@ -3222,7 +3222,7 @@ void DrasculaEngine::setCursorTable() { cursorPos[4] = 40; cursorPos[5] = 25; - copyRectClip(cursorPos, dir_mesa, dir_zona_pantalla); + copyRectClip(cursorPos, tableSurface, screenSurface); } void DrasculaEngine::enterName() { @@ -3232,9 +3232,9 @@ void DrasculaEngine::enterName() { strcpy(select2, " "); for (;;) { select2[v] = '-'; - copyBackground(115, 14, 115, 14, 176, 9, dir_dibujo1, dir_zona_pantalla); + copyBackground(115, 14, 115, 14, 176, 9, drawSurface1, screenSurface); print_abc(select2, 117, 15); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); key = getScan(); delay(70); if (key != 0) { @@ -3811,7 +3811,7 @@ void DrasculaEngine::converse(const char *nom_fich) { phrase4[h] = ' '; loadPic("car.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); // TODO code here should limit y position for mouse in dialog menu, // but we can't implement this due lack backend functionality // from 1(top) to 31 @@ -3866,7 +3866,7 @@ bucle_opc: print_abc_opc(phrase3, 1, 18, game3); print_abc_opc(phrase4, 1, 26, game4); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if ((button_izq == 1) && (game1 == 2)) { delay(100); @@ -3915,7 +3915,7 @@ bucle_opc: loadPic(menuBackground); else loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); if (num_ejec != 5) withoutVerb(); } @@ -4022,7 +4022,7 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta pos_texto[4] = CHAR_WIDTH_OPC; pos_texto[5] = CHAR_HEIGHT_OPC; - copyRectClip(pos_texto, dir_hare_fondo, dir_zona_pantalla); + copyRectClip(pos_texto, backSurface, screenSurface); x_pantalla = x_pantalla + CHAR_WIDTH_OPC; } @@ -4304,7 +4304,7 @@ void DrasculaEngine::pon_vb() { frame_vb = 1; } - copyRectClip(pos_vb, dir_hare_frente, dir_zona_pantalla); + copyRectClip(pos_vb, frontSurface, screenSurface); } void DrasculaEngine::lleva_vb(int pointX) { @@ -4317,7 +4317,7 @@ void DrasculaEngine::lleva_vb(int pointX) { for (;;) { updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if (sentido_vb == 0) { vb_x = vb_x - 5; if (vb_x <= pointX) @@ -4341,11 +4341,11 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ comienza: counter--; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); if (num_ejec == 3) - updateScreen(0, 0, 0, y, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, y, 320, 200, screenSurface); else - updateScreen(0, 1, 0, y, 320, 198, dir_zona_pantalla); + updateScreen(0, 1, 0, y, 320, 198, screenSurface); if (sentido == 0) y++; @@ -4366,8 +4366,8 @@ comienza: if (counter > 0) goto comienza; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::openDoor(int nflag, int doorNum) { @@ -4385,7 +4385,7 @@ void DrasculaEngine::openDoor(int nflag, int doorNum) { if (doorNum != NO_DOOR) updateDoor(doorNum); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); stopSound(); withoutVerb(); } @@ -4425,12 +4425,12 @@ void DrasculaEngine::grr() { } updateRoom(); - copyBackground(253, 110, 150, 65, 20, 30, dir_dibujo3, dir_zona_pantalla); + copyBackground(253, 110, 150, 65, 20, 30, drawSurface3, screenSurface); if (withVoices == 0) centerText(".groaaarrrrgghhh!", 153, 65); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); bucless: int key = getScan(); @@ -4449,7 +4449,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::activatePendulum() { @@ -4457,15 +4457,15 @@ void DrasculaEngine::activatePendulum() { hare_se_ve = 0; roomNumber = 102; loadPic("102.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); loadPic("an_p1.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); loadPic("an_p2.alg"); - decompressPic(dir_hare_dch, 1); + decompressPic(extraSurface, 1); loadPic("an_p3.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); - copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, dir_hare_fondo, dir_dibujo3); + copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); conta_blind_vez = vez(); } @@ -4477,7 +4477,7 @@ void DrasculaEngine::closeDoor(int nflag, int doorNum) { if (doorNum != NO_DOOR) updateDoor(doorNum); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); stopSound(); withoutVerb(); } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 7008c30ab0..15382aafcf 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -262,16 +262,16 @@ public: byte *VGA; - byte *dir_dibujo1; - byte *dir_hare_fondo; - byte *dir_dibujo3; - byte *dir_dibujo2; - byte *dir_mesa; - byte *dir_hare_dch; - byte *dir_zona_pantalla; - byte *dir_hare_frente; - byte *dir_texto; - byte *dir_pendulum; + byte *drawSurface1; + byte *backSurface; + byte *drawSurface3; + byte *drawSurface2; + byte *tableSurface; + byte *extraSurface; // not sure about this one, was "dir_hare_dch" + byte *screenSurface; + byte *frontSurface; + byte *textSurface; + byte *pendulumSurface; byte cPal[768]; byte *pcxBuffer; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 1c2bddfeea..2553e34296 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -311,18 +311,18 @@ void DrasculaEngine::room_3(int fl) { } else if (pickedObject == kVerbTalk && fl == 133) { talk_sinc(_text[_lang][322], "322.als", "13333334125433333333"); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(25); talk(33); } else if (pickedObject == kVerbLook && fl == 165) { talk(149); talk(150); } else if (pickedObject == kVerbPick && fl == 165) { - copyBackground(0, 0, 0,0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0,0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(44, 1, hare_x, hare_y, 41, 70, dir_dibujo2, dir_zona_pantalla); + copyRect(44, 1, hare_x, hare_y, 41, 70, drawSurface2, screenSurface); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(4); pickObject(10); flags[3] = 1; @@ -378,45 +378,45 @@ void DrasculaEngine::room_6(int fl){ else if (pickedObject == kVerbClose && fl == 138) closeDoor(0, 1); else if (pickedObject == kVerbOpen && fl == 143 && flags[2] == 0) { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, dir_dibujo3, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, drawSurface3, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(10); playSound("s3.als"); flags[2] = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); stopSound(); } else if (pickedObject == kVerbClose && fl == 143 && flags[2] == 1) { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); flags[2] = 0; updateRefresh_pre(); - copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, dir_dibujo3, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, drawSurface3, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(5); playSound("s4.als"); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); stopSound(); } else if (pickedObject == kVerbOpen && fl == 139 && flags[1] == 0) { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, dir_dibujo3, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, drawSurface3, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(19); playSound("s3.als"); flags[1] = 1; visible[4] = 1; visible[2] = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); stopSound(); } else if (pickedObject == kVerbPick && fl == 140) { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, dir_dibujo3, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, drawSurface3, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(19); pickObject(9); visible[4] = 0; @@ -551,9 +551,9 @@ void DrasculaEngine::room_15(int fl) { talk_sinc(_text[_lang][46], "46.als", "4442444244244"); sentido_hare = 1; } else if (pickedObject == 18 && fl == 188 && flags[26] == 0) { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - copyRect(133, 135, hare_x + 6, hare_y, 39, 63, dir_dibujo3, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyRect(133, 135, hare_x + 6, hare_y, 39, 63, drawSurface3, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); playSound("s8.als"); stopSound(); talk(_text[_lang][338], "338.als"); @@ -601,7 +601,7 @@ void DrasculaEngine::room_16(int fl) { flags[20] = 1; sentido_hare = 3; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk(_text[_lang][342], "342.als"); pickObject(22); } @@ -619,7 +619,7 @@ void DrasculaEngine::room_16(int fl) { talk(_text[_lang][343], "343.als"); sentido_hare = 3; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk(_text[_lang][344], "344.als"); } else if (pickedObject == kVerbTalk && fl == 187) talk(_text[_lang][345], "345.als"); @@ -659,11 +659,11 @@ void DrasculaEngine::room_18(int fl) { else if (pickedObject == kVerbLook && fl == 181) talk(_text[_lang][348], "348.als"); else if (pickedObject == kVerbPick && fl == 182) { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(44, 1, hare_x, hare_y, 41, 70, dir_dibujo2, dir_zona_pantalla); + copyRect(44, 1, hare_x, hare_y, 41, 70, drawSurface2, screenSurface); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(4); pickObject(12); visible[2] = 0; @@ -693,12 +693,12 @@ void DrasculaEngine::room_18(int fl) { else if (pickedObject == 11 && fl == 50 && flags[22] == 0) { sentido_hare = 3; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(1, 1, hare_x - 1, hare_y + 3, 42, 67, dir_dibujo2, dir_zona_pantalla); + copyRect(1, 1, hare_x - 1, hare_y + 3, 42, 67, drawSurface2, screenSurface); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(6); talk(_text[_lang][347], "347.als"); flags[29] = 1; @@ -838,8 +838,8 @@ void DrasculaEngine::room_26(int fl) { lleva_al_hare(153, 180); } else if (pickedObject == kVerbPick && fl == 143 && flags[18] == 0) { lleva_al_hare(260, 180); - copyBackground(80, 78, 199, 94, 38, 27, dir_dibujo3, dir_zona_pantalla); - updateScreen(199, 94, 199, 94, 38, 27, dir_zona_pantalla); + copyBackground(80, 78, 199, 94, 38, 27, drawSurface3, screenSurface); + updateScreen(199, 94, 199, 94, 38, 27, screenSurface); pause(3); talk_igor_peluca(_texti[_lang][25], "I25.als"); lleva_al_hare(153, 180); @@ -1157,26 +1157,26 @@ void DrasculaEngine::room_59(int fl) { lleva_al_hare(174, 168); sentido_hare = 2; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(40); playSound("s12.als"); pause(19); stopSound_corte(); hare_se_ve = 0; updateRoom(); - copyRect(101, 34, hare_x - 4, hare_y - 1, 37, 70, dir_dibujo3, dir_zona_pantalla); - copyBackground(0, 0, 0, 0, 320, 200, dir_zona_pantalla, dir_dibujo1); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyRect(101, 34, hare_x - 4, hare_y - 1, 37, 70, drawSurface3, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); hare_se_ve = 1; clearRoom(); loadPic("tlef0.alg"); - decompressPic(dir_dibujo1, COMPLETE_PAL); + decompressPic(drawSurface1, COMPLETE_PAL); loadPic("tlef1.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); loadPic("tlef2.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); loadPic("tlef3.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); talk_htel(_text[_lang][240], "240.als"); color_abc(VON_BRAUN); @@ -1195,13 +1195,13 @@ void DrasculaEngine::room_59(int fl) { talk_solo(_textvb[_lang][62], "VB62.als"); clearRoom(); loadPic("aux59.alg"); - decompressPic(dir_dibujo3, 1); + decompressPic(drawSurface3, 1); loadPic("96.alg"); - decompressPic(dir_hare_frente, COMPLETE_PAL); + decompressPic(frontSurface, COMPLETE_PAL); loadPic("99.alg"); - decompressPic(dir_hare_fondo, 1); + decompressPic(backSurface, 1); loadPic("59.alg"); - decompressPic(dir_dibujo1, HALF_PAL); + decompressPic(drawSurface1, HALF_PAL); sentido_hare = 3; talk(_text[_lang][245], "245.als"); withoutVerb(); @@ -1464,7 +1464,7 @@ void DrasculaEngine::update_1_pre() { hare_claro(); if (flags[8] == 0) - copyBackground(2, 158, 208, 67, 27, 40, dir_dibujo3, dir_zona_pantalla); + copyBackground(2, 158, 208, 67, 27, 40, drawSurface3, screenSurface); } void DrasculaEngine::update_2(){ @@ -1506,26 +1506,26 @@ void DrasculaEngine::update_2(){ pos_murci[2] = 239; pos_murci[3] = 19; - copyRectClip(pos_murci, dir_dibujo3, dir_zona_pantalla); + copyRectClip(pos_murci, drawSurface3, screenSurface); diferencia = vez() - conta_blind_vez; if (diferencia >= 6) { frame_bat++; conta_blind_vez = vez(); } - copyRect(29, 37, 58, 114, 57, 39, dir_dibujo3, dir_zona_pantalla); + copyRect(29, 37, 58, 114, 57, 39, drawSurface3, screenSurface); showMap(); } void DrasculaEngine::update_3_pre() { if (flags[3] == 1) - copyBackground(258, 110, 85, 44, 23, 53, dir_dibujo3, dir_zona_pantalla); + copyBackground(258, 110, 85, 44, 23, 53, drawSurface3, screenSurface); } void DrasculaEngine::update_3() { if (hare_y + alto_hare < 118) - copyRect(129, 110, 194, 36, 126, 88, dir_dibujo3, dir_zona_pantalla); - copyRect(47, 57, 277, 143, 43, 50, dir_dibujo3, dir_zona_pantalla); + copyRect(129, 110, 194, 36, 126, 88, drawSurface3, screenSurface); + copyRect(47, 57, 277, 143, 43, 50, drawSurface3, screenSurface); } void DrasculaEngine::update_4() { @@ -1543,11 +1543,11 @@ void DrasculaEngine::update_4() { void DrasculaEngine::update_5_pre(){ if (flags[8] == 0) - copyBackground(256, 152, 208, 67, 27, 40, dir_dibujo3, dir_zona_pantalla); + copyBackground(256, 152, 208, 67, 27, 40, drawSurface3, screenSurface); } void DrasculaEngine::update_5() { - copyRect(114, 130, 211, 87, 109, 69, dir_dibujo3, dir_zona_pantalla); + copyRect(114, 130, 211, 87, 109, 69, drawSurface3, screenSurface); } void DrasculaEngine::update_6_pre() { @@ -1565,16 +1565,16 @@ void DrasculaEngine::update_6_pre() { hare_claro(); if (flags[1] == 0) - copyBackground(97, 117, 34, 148, 36, 31, dir_dibujo3, dir_zona_pantalla); + copyBackground(97, 117, 34, 148, 36, 31, drawSurface3, screenSurface); if (flags[0] == 0) - copyBackground(3, 103, 185, 69, 23, 76, dir_dibujo3, dir_zona_pantalla); + copyBackground(3, 103, 185, 69, 23, 76, drawSurface3, screenSurface); if (flags[2] == 0) - copyBackground(28, 100, 219, 72, 64, 97, dir_dibujo3, dir_zona_pantalla); + copyBackground(28, 100, 219, 72, 64, 97, drawSurface3, screenSurface); } void DrasculaEngine::update_7_pre() { if (flags[35] == 0) - copyBackground(1, 72, 158, 162, 19, 12, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 72, 158, 162, 19, 12, drawSurface3, screenSurface); } void DrasculaEngine::update_9_pre() { @@ -1582,7 +1582,7 @@ void DrasculaEngine::update_9_pre() { int blind_y[] = {51, 51, 51, 51, 51, 51, 51, 127, 127}; int diferencia; - copyRect(blind_x[frame_blind], blind_y[frame_blind], 122, 57, 41, 72, dir_dibujo3, dir_zona_pantalla); + copyRect(blind_x[frame_blind], blind_y[frame_blind], 122, 57, 41, 72, drawSurface3, screenSurface); if (flags[9] == 0) { diferencia = vez() - conta_blind_vez; if (diferencia >= 11) { @@ -1597,17 +1597,17 @@ void DrasculaEngine::update_9_pre() { void DrasculaEngine::update_12_pre() { if (flags[16] == 0) - copyBackground(1, 131, 106, 117, 55, 68, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 131, 106, 117, 55, 68, drawSurface3, screenSurface); } void DrasculaEngine::update_13() { if (hare_x > 55 && flags[3] == 0) animation_6_3(); if (flags[1] == 0) - copyRect(185, 110, 121, 65, 67, 88, dir_dibujo3, dir_zona_pantalla); + copyRect(185, 110, 121, 65, 67, 88, drawSurface3, screenSurface); if (flags[2] == 0) - copyRect(185, 21, 121, 63, 67, 88, dir_dibujo3, dir_zona_pantalla); - copyRect(3, 127, 99, 102, 181, 71, dir_dibujo3, dir_zona_pantalla); + copyRect(185, 21, 121, 63, 67, 88, drawSurface3, screenSurface); + copyRect(3, 127, 99, 102, 181, 71, drawSurface3, screenSurface); } void DrasculaEngine::update_14_pre() { @@ -1617,22 +1617,22 @@ void DrasculaEngine::update_14_pre() { int drunk_x[] = {1, 42, 83, 124, 165, 206, 247, 1}; int diferencia; - copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, dir_dibujo3, dir_zona_pantalla); - copyBackground(cirio_x[frame_velas], 146, 311, 80, 4, 8, dir_dibujo3, dir_zona_pantalla); + copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(cirio_x[frame_velas], 146, 311, 80, 4, 8, drawSurface3, screenSurface); if (blinking == 5) - copyBackground(1, 149, 127, 52, 9, 5, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); if (hare_x > 101 && hare_x < 155) - copyBackground(31, 138, 178, 51, 18, 16, dir_dibujo3, dir_zona_pantalla); + copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface); if (flags[11] == 0) - copyBackground(pianista_x[frame_piano], 157, 245, 130, 29, 42, dir_dibujo3, dir_zona_pantalla); + copyBackground(pianista_x[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface); else if (flags[5] == 0) - copyBackground(145, 139, 228, 112, 47, 60, dir_hare_dch, dir_zona_pantalla); + copyBackground(145, 139, 228, 112, 47, 60, extraSurface, screenSurface); else - copyBackground(165, 140, 229, 117, 43, 59, dir_dibujo3, dir_zona_pantalla); + copyBackground(165, 140, 229, 117, 43, 59, drawSurface3, screenSurface); if (flags[12] == 1) - copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, dir_dibujo3, dir_zona_pantalla); + copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); diferencia = vez() - conta_blind_vez; if (diferencia > 6) { if (flags[12] == 1) { @@ -1656,23 +1656,23 @@ void DrasculaEngine::update_14_pre() { } void DrasculaEngine::update_15() { - copyRect(1, 154, 83, 122, 131, 44, dir_dibujo3, dir_zona_pantalla); + copyRect(1, 154, 83, 122, 131, 44, drawSurface3, screenSurface); } void DrasculaEngine::update_16_pre() { if (flags[17] == 0) - copyBackground(1, 103, 24, 72, 33, 95, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 103, 24, 72, 33, 95, drawSurface3, screenSurface); if (flags[19] == 1) - copyBackground(37, 151, 224, 115, 56, 47, dir_dibujo3, dir_zona_pantalla); + copyBackground(37, 151, 224, 115, 56, 47, drawSurface3, screenSurface); } void DrasculaEngine::update_17_pre() { if (flags[15] == 1) - copyBackground(1, 135, 108, 65, 44, 63, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 135, 108, 65, 44, 63, drawSurface3, screenSurface); } void DrasculaEngine::update_17() { - copyRect(48, 135, 78, 139, 80, 30, dir_dibujo3, dir_zona_pantalla); + copyRect(48, 135, 78, 139, 80, 30, drawSurface3, screenSurface); } void DrasculaEngine::update_18_pre() { @@ -1681,8 +1681,8 @@ void DrasculaEngine::update_18_pre() { int snore_y[] = {18, 18, 56, 56, 94, 94, 94, 94, 94, 18, 18, 18, 18, 18, 18, 18}; if (flags[21] == 0) { - copyBackground(1, 69, 120, 58, 56, 61, dir_dibujo3, dir_zona_pantalla); - copyBackground(snore_x[frame_snore], snore_y[frame_snore], 124, 59, 40, 37, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 69, 120, 58, 56, 61, drawSurface3, screenSurface); + copyBackground(snore_x[frame_snore], snore_y[frame_snore], 124, 59, 40, 37, drawSurface3, screenSurface); } else pon_vb(); @@ -1697,68 +1697,68 @@ void DrasculaEngine::update_18_pre() { void DrasculaEngine::update_18() { if (flags[24] == 1) - copyRect(177, 1, 69, 29, 142, 130, dir_dibujo3, dir_zona_pantalla); - copyRect(105, 132, 109, 108, 196, 65, dir_dibujo3, dir_zona_pantalla); + copyRect(177, 1, 69, 29, 142, 130, drawSurface3, screenSurface); + copyRect(105, 132, 109, 108, 196, 65, drawSurface3, screenSurface); } void DrasculaEngine::update_20() { - copyRect(1, 137, 106, 121, 213, 61, dir_dibujo3, dir_zona_pantalla); + copyRect(1, 137, 106, 121, 213, 61, drawSurface3, screenSurface); } void DrasculaEngine::update_21_pre() { if (flags[0] == 1) - copyBackground(2, 171, 84, 126, 17, 26, dir_dibujo3, dir_zona_pantalla); + copyBackground(2, 171, 84, 126, 17, 26, drawSurface3, screenSurface); if (flags[10] == 1) - copyBackground(20, 163, 257, 149, 14, 34, dir_dibujo3, dir_zona_pantalla); + copyBackground(20, 163, 257, 149, 14, 34, drawSurface3, screenSurface); } void DrasculaEngine::update_22_pre() { if (flags[24] == 1) - copyBackground(2, 187, 107, 106, 62, 12, dir_dibujo3, dir_zona_pantalla); + copyBackground(2, 187, 107, 106, 62, 12, drawSurface3, screenSurface); if (flags[27] == 0) - copyBackground(32, 181, 203, 88, 13, 5, dir_dibujo3, dir_zona_pantalla); + copyBackground(32, 181, 203, 88, 13, 5, drawSurface3, screenSurface); if (flags[26] == 0) - copyBackground(2, 133, 137, 83, 29, 53, dir_dibujo3, dir_zona_pantalla); + copyBackground(2, 133, 137, 83, 29, 53, drawSurface3, screenSurface); else - copyBackground(65, 174, 109, 145, 55, 25, dir_dibujo3, dir_zona_pantalla); + copyBackground(65, 174, 109, 145, 55, 25, drawSurface3, screenSurface); } void DrasculaEngine::update_23_pre() { if (flags[11] == 1 && flags[0] == 0) - copyBackground(87, 171, 237, 110, 20, 28, dir_dibujo3, dir_zona_pantalla); + copyBackground(87, 171, 237, 110, 20, 28, drawSurface3, screenSurface); if (flags[0] == 1) - copyBackground(29, 126, 239, 94, 57, 73, dir_dibujo3, dir_zona_pantalla); + copyBackground(29, 126, 239, 94, 57, 73, drawSurface3, screenSurface); if (flags[1] == 1) - copyRect(1, 135, 7, 94, 27, 64, dir_dibujo3, dir_zona_pantalla); + copyRect(1, 135, 7, 94, 27, 64, drawSurface3, screenSurface); } void DrasculaEngine::update_24_pre() { if (flags[1] == 1) - copyBackground(1, 163, 225, 124, 12, 36, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 163, 225, 124, 12, 36, drawSurface3, screenSurface); if (flags[2] == 1) - copyBackground(14, 153, 30, 107, 23, 46, dir_dibujo3, dir_zona_pantalla); + copyBackground(14, 153, 30, 107, 23, 46, drawSurface3, screenSurface); } void DrasculaEngine::update_26_pre() { int diferencia; if (flags[2] == 1) - copyBackground(1, 130, 87, 44, 50, 69, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 130, 87, 44, 50, 69, drawSurface3, screenSurface); if (flags[12] == 1) - copyBackground(52, 177, 272, 103, 27, 22, dir_dibujo3, dir_zona_pantalla); + copyBackground(52, 177, 272, 103, 27, 22, drawSurface3, screenSurface); if (flags[18] == 0) - copyBackground(80, 133, 199, 95, 50, 66, dir_dibujo3, dir_zona_pantalla); + copyBackground(80, 133, 199, 95, 50, 66, drawSurface3, screenSurface); if (blinking == 5 && flags[18] == 0) - copyBackground(52, 172, 226, 106, 3, 4, dir_dibujo3, dir_zona_pantalla); + copyBackground(52, 172, 226, 106, 3, 4, drawSurface3, screenSurface); diferencia = vez() - conta_blind_vez; if (diferencia >= 10) { @@ -1767,150 +1767,150 @@ void DrasculaEngine::update_26_pre() { } if (flags[20] == 1) - copyBackground(182, 133, 199, 95, 50, 66, dir_dibujo3, dir_zona_pantalla); + copyBackground(182, 133, 199, 95, 50, 66, drawSurface3, screenSurface); } void DrasculaEngine::update_26() { if (flags[29] == 1) - copyRect(93, 1, hare_x, hare_y, 45, 78, dir_hare_fondo, dir_zona_pantalla); + copyRect(93, 1, hare_x, hare_y, 45, 78, backSurface, screenSurface); - copyRect(233, 107, 17, 102, 66, 92, dir_dibujo3, dir_zona_pantalla); + copyRect(233, 107, 17, 102, 66, 92, drawSurface3, screenSurface); } void DrasculaEngine::update_27_pre() { if (flags[5] == 1) - copyRect(1, 175, 59, 109, 17, 24, dir_dibujo3, dir_zona_pantalla); + copyRect(1, 175, 59, 109, 17, 24, drawSurface3, screenSurface); if (flags[6] == 1) - copyRect(19, 177, 161, 103, 18, 22, dir_dibujo3, dir_zona_pantalla); + copyRect(19, 177, 161, 103, 18, 22, drawSurface3, screenSurface); } void DrasculaEngine::update_27() { - copyRect(38, 177, 103, 171, 21, 22, dir_dibujo3, dir_zona_pantalla); - copyRect(60, 162, 228, 156, 18, 37, dir_dibujo3, dir_zona_pantalla); + copyRect(38, 177, 103, 171, 21, 22, drawSurface3, screenSurface); + copyRect(60, 162, 228, 156, 18, 37, drawSurface3, screenSurface); } void DrasculaEngine::update_29_pre() { if (flags[4] == 1) - copyBackground(12, 113, 247, 49, 41, 84, dir_dibujo3, dir_zona_pantalla); + copyBackground(12, 113, 247, 49, 41, 84, drawSurface3, screenSurface); } void DrasculaEngine::update_29() { - copyRect(1, 180, 150, 126, 10, 17, dir_dibujo3, dir_zona_pantalla); + copyRect(1, 180, 150, 126, 10, 17, drawSurface3, screenSurface); } void DrasculaEngine::update_30_pre() { if (flags[4] == 1) - copyBackground(1, 148, 148, 66, 35, 51, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 148, 148, 66, 35, 51, drawSurface3, screenSurface); if (flags[16] == 1) - copyBackground(37, 173, 109, 84, 20, 26, dir_dibujo3, dir_zona_pantalla); + copyBackground(37, 173, 109, 84, 20, 26, drawSurface3, screenSurface); } void DrasculaEngine::update_31_pre() { if (flags[13] == 1) - copyBackground(1, 163, 116, 41, 61, 36, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 163, 116, 41, 61, 36, drawSurface3, screenSurface); if (flags[5] == 1) - copyBackground(1, 78, 245, 63, 30, 84, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 78, 245, 63, 30, 84, drawSurface3, screenSurface); } void DrasculaEngine::update_31() { - copyRect(63, 190, 223, 157, 17, 9, dir_dibujo3, dir_zona_pantalla); + copyRect(63, 190, 223, 157, 17, 9, drawSurface3, screenSurface); } void DrasculaEngine::update_34_pre() { if (flags[7] == 1) - copyBackground(99, 127, 73, 41, 79, 72, dir_dibujo3, dir_zona_pantalla); + copyBackground(99, 127, 73, 41, 79, 72, drawSurface3, screenSurface); if (flags[8] == 1) - copyBackground(36, 129, 153, 41, 62, 65, dir_dibujo3, dir_zona_pantalla); + copyBackground(36, 129, 153, 41, 62, 65, drawSurface3, screenSurface); } void DrasculaEngine::update_34() { - copyRect(5, 171, 234, 126, 29, 23, dir_dibujo3, dir_zona_pantalla); + copyRect(5, 171, 234, 126, 29, 23, drawSurface3, screenSurface); } void DrasculaEngine::update_35_pre() { if (flags[14] == 1) - copyBackground(1, 86, 246, 65, 68, 87, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 86, 246, 65, 68, 87, drawSurface3, screenSurface); if (flags[17] == 0 && flags[15] == 1) - copyBackground(111, 150, 118, 52, 40, 23, dir_dibujo3, dir_zona_pantalla); + copyBackground(111, 150, 118, 52, 40, 23, drawSurface3, screenSurface); if (flags[17] == 1) - copyBackground(70, 150, 118, 52, 40, 23, dir_dibujo3, dir_zona_pantalla); + copyBackground(70, 150, 118, 52, 40, 23, drawSurface3, screenSurface); } void DrasculaEngine::update_35() { - copyRect(1, 174, 54, 152, 195, 25, dir_dibujo3, dir_zona_pantalla); + copyRect(1, 174, 54, 152, 195, 25, drawSurface3, screenSurface); } void DrasculaEngine::update_49_pre() { if (flags[6] == 0) - copyBackground(2, 136, 176, 81, 49, 62, dir_dibujo3, dir_zona_pantalla); + copyBackground(2, 136, 176, 81, 49, 62, drawSurface3, screenSurface); } void DrasculaEngine::update_50() { - copyRect(4, 153, 118, 95, 67, 44, dir_dibujo3, dir_zona_pantalla); + copyRect(4, 153, 118, 95, 67, 44, drawSurface3, screenSurface); } void DrasculaEngine::update_53_pre() { if (flags[1] == 0) - copyRect(2, 113, 205, 50, 38, 86, dir_dibujo3, dir_zona_pantalla); + copyRect(2, 113, 205, 50, 38, 86, drawSurface3, screenSurface); if (flags[2] == 0) - copyBackground(41, 159, 27, 117, 25, 40, dir_dibujo3, dir_zona_pantalla); + copyBackground(41, 159, 27, 117, 25, 40, drawSurface3, screenSurface); if (flags[9] == 1) - copyBackground(67, 184, 56, 93, 32, 15, dir_dibujo3, dir_zona_pantalla); + copyBackground(67, 184, 56, 93, 32, 15, drawSurface3, screenSurface); } void DrasculaEngine::update_54_pre() { if (flags[5] == 1) - copyBackground(168, 156, 187, 111, 7, 11, dir_dibujo3, dir_zona_pantalla); + copyBackground(168, 156, 187, 111, 7, 11, drawSurface3, screenSurface); if (flags[12] == 1) - copyBackground(16, 156, 190, 64, 18, 24, dir_dibujo3, dir_zona_pantalla); + copyBackground(16, 156, 190, 64, 18, 24, drawSurface3, screenSurface); } void DrasculaEngine::update_56_pre() { if (flags[10] == 0) - copyBackground(2, 126, 42, 67, 57, 67, dir_dibujo3, dir_zona_pantalla); + copyBackground(2, 126, 42, 67, 57, 67, drawSurface3, screenSurface); if (flags[11] == 1) - copyBackground(60, 160, 128, 97, 103, 38, dir_dibujo3, dir_zona_pantalla); + copyBackground(60, 160, 128, 97, 103, 38, drawSurface3, screenSurface); } void DrasculaEngine::update_57() { - copyRect(7, 113, 166, 61, 62, 82, dir_dibujo3, dir_zona_pantalla); + copyRect(7, 113, 166, 61, 62, 82, drawSurface3, screenSurface); } void DrasculaEngine::update_58_pre() { if (flags[0] == 0) - copyBackground(1, 156, 143, 120, 120, 43, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 156, 143, 120, 120, 43, drawSurface3, screenSurface); if (flags[1] == 2) - copyRect(252, 171, 173, 116, 25, 28, dir_dibujo3, dir_zona_pantalla); + copyRect(252, 171, 173, 116, 25, 28, drawSurface3, screenSurface); if (flags[1] == 0 && flags[0] == 0) - copyRect(278, 171, 173, 116, 25, 28, dir_dibujo3, dir_zona_pantalla); + copyRect(278, 171, 173, 116, 25, 28, drawSurface3, screenSurface); if (flags[2] == 0) { placeIgor(); placeDrascula(); } if (flags[3] == 1) - copyRect(1, 29, 204, 0, 18, 125, dir_dibujo3, dir_zona_pantalla); + copyRect(1, 29, 204, 0, 18, 125, drawSurface3, screenSurface); if (flags[8] == 1) - copyBackground(20, 60, 30, 64, 46, 95, dir_dibujo3, dir_zona_pantalla); + copyBackground(20, 60, 30, 64, 46, 95, drawSurface3, screenSurface); } void DrasculaEngine::update_58() { if (hare_se_ve == 1) - copyRect(67, 139, 140, 147, 12, 16, dir_dibujo3, dir_zona_pantalla); + copyRect(67, 139, 140, 147, 12, 16, drawSurface3, screenSurface); } void DrasculaEngine::update_59_pre() { if (flags[4] == 0) - copyRect(1, 146, 65, 106, 83, 40, dir_dibujo3, dir_zona_pantalla); + copyRect(1, 146, 65, 106, 83, 40, drawSurface3, screenSurface); if (flags[9] == 1) { - copyBackground(65, 103, 65, 103, 49, 38, dir_dibujo1, dir_zona_pantalla); - copyRect(1, 105, 65, 103, 49, 38, dir_dibujo3, dir_zona_pantalla); + copyBackground(65, 103, 65, 103, 49, 38, drawSurface1, screenSurface); + copyRect(1, 105, 65, 103, 49, 38, drawSurface3, screenSurface); } } @@ -1921,10 +1921,10 @@ void DrasculaEngine::update_60_pre() { if (flags[5] == 0) placeDrascula(); - copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, dir_dibujo3, dir_zona_pantalla); + copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, drawSurface3, screenSurface); if (flag_tv == 1) - copyBackground(114, 158, 8, 30, 8, 23, dir_dibujo3, dir_zona_pantalla); + copyBackground(114, 158, 8, 30, 8, 23, drawSurface3, screenSurface); diferencia = vez() - conta_blind_vez; blinking = _rnd->getRandomNumber(7); @@ -1946,7 +1946,7 @@ void DrasculaEngine::update_60() { } void DrasculaEngine::update_61() { - copyRect(1, 154, 83, 122, 131, 44, dir_dibujo3, dir_zona_pantalla); + copyRect(1, 154, 83, 122, 131, 44, drawSurface3, screenSurface); } void DrasculaEngine::update_62_pre() { @@ -1956,24 +1956,24 @@ void DrasculaEngine::update_62_pre() { int drunk_x[] = {1, 42, 83, 124, 165, 206, 247, 1 }; int diferencia; - copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, dir_dibujo3, dir_zona_pantalla); - copyBackground(cirio_x[frame_velas], 146, 311, 80, 4, 8, dir_dibujo3, dir_zona_pantalla); + copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(cirio_x[frame_velas], 146, 311, 80, 4, 8, drawSurface3, screenSurface); if (blinking == 5) - copyBackground(1, 149, 127, 52, 9, 5, dir_dibujo3, dir_zona_pantalla); + copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); if (hare_x > 101 && hare_x < 155) - copyBackground(31, 138, 178, 51, 18, 16, dir_dibujo3, dir_zona_pantalla); + copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface); if (flags[11] == 0) - copyBackground(pianista_x[frame_piano], 157, 245, 130, 29, 42, dir_dibujo3, dir_zona_pantalla); + copyBackground(pianista_x[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface); else if (flags[5] == 0) - copyBackground(145, 139, 228, 112, 47, 60, dir_hare_dch, dir_zona_pantalla); + copyBackground(145, 139, 228, 112, 47, 60, extraSurface, screenSurface); else - copyBackground(165, 140, 229, 117, 43, 59, dir_dibujo3, dir_zona_pantalla); + copyBackground(165, 140, 229, 117, 43, 59, drawSurface3, screenSurface); if (flags[12] == 1) - copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, dir_dibujo3, dir_zona_pantalla); + copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); diferencia = vez() - conta_blind_vez; if (diferencia > 6) { @@ -2000,16 +2000,16 @@ void DrasculaEngine::update_62_pre() { void DrasculaEngine::update_62() { int drunk_x[] = { 1, 42, 83, 124, 165, 206, 247, 1 }; - copyRect(1, 1, 0, 0, 62, 142, dir_dibujo2, dir_zona_pantalla); + copyRect(1, 1, 0, 0, 62, 142, drawSurface2, screenSurface); if (hare_y + alto_hare < 89) { - copyRect(205, 1, 180, 9, 82, 80, dir_dibujo3, dir_zona_pantalla); - copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, dir_dibujo3, dir_zona_pantalla); + copyRect(205, 1, 180, 9, 82, 80, drawSurface3, screenSurface); + copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); } } void DrasculaEngine::update_63() { - copyRect(1, 154, 83, 122, 131, 44, dir_dibujo3, dir_zona_pantalla); + copyRect(1, 154, 83, 122, 131, 44, drawSurface3, screenSurface); } void DrasculaEngine::update_pendulum() { @@ -2017,19 +2017,19 @@ void DrasculaEngine::update_pendulum() { int diferencia; if (frame_pen <= 4) - dir_pendulum = dir_dibujo3; + pendulumSurface = drawSurface3; else if (frame_pen <= 11) - dir_pendulum = dir_hare_dch; + pendulumSurface = extraSurface; else - dir_pendulum = dir_hare_frente; + pendulumSurface = frontSurface; - copyBackground(pendulum_x[frame_pen], 19, 152, 0, 55, 125, dir_pendulum, dir_zona_pantalla); + copyBackground(pendulum_x[frame_pen], 19, 152, 0, 55, 125, pendulumSurface, screenSurface); if (flags[1] == 2) - copyRect(18, 145, 145, 105, 25, 29, dir_dibujo3, dir_zona_pantalla); + copyRect(18, 145, 145, 105, 25, 29, drawSurface3, screenSurface); if (flags[1] == 0) - copyRect(44, 145, 145, 105, 25, 29, dir_dibujo3, dir_zona_pantalla); + copyRect(44, 145, 145, 105, 25, 29, drawSurface3, screenSurface); diferencia = vez() - conta_blind_vez; if (diferencia > 8) { diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 4ca40734d4..afd2988162 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -61,22 +61,22 @@ bucless: cara = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); placeIgor(); placeDrascula(); - copyBackground(x_igor + 17, y_igor, x_igor + 17, y_igor, 37, 24, dir_dibujo1, dir_zona_pantalla); + copyBackground(x_igor + 17, y_igor, x_igor + 17, y_igor, 37, 24, drawSurface1, screenSurface); - copyRect(x_talk[cara], 148, x_igor + 17, y_igor, 25, 24, dir_hare_frente, dir_zona_pantalla); + copyRect(x_talk[cara], 148, x_igor + 17, y_igor, 25, 24, frontSurface, screenSurface); updateRefresh(); if (withVoices == 0) centerText(said, x_igor + 26, y_igor); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -96,10 +96,10 @@ bucless: if (length > 0) goto bucless; } - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_dr_izq(int index) { @@ -123,7 +123,7 @@ bucless: cara = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); @@ -132,18 +132,18 @@ bucless: if (num_ejec == 6) pon_hare(); - copyBackground(x_dr, y_dr, x_dr, y_dr, 38, 31, dir_dibujo1, dir_zona_pantalla); + copyBackground(x_dr, y_dr, x_dr, y_dr, 38, 31, drawSurface1, screenSurface); if (num_ejec == 6) - copyRect(x_talk[cara], 90, x_dr, y_dr, 38, 31, dir_dibujo2, dir_zona_pantalla); + copyRect(x_talk[cara], 90, x_dr, y_dr, 38, 31, drawSurface2, screenSurface); else - copyRect(x_talk[cara], 90, x_dr, y_dr, 38, 31, dir_hare_fondo, dir_zona_pantalla); + copyRect(x_talk[cara], 90, x_dr, y_dr, 38, 31, backSurface, screenSurface); updateRefresh(); if (withVoices == 0) centerText(said, x_dr + 19, y_dr); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -164,10 +164,10 @@ bucless: goto bucless; } - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_dr_dch(int index) { @@ -191,7 +191,7 @@ bucless: cara = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); placeIgor(); @@ -199,18 +199,18 @@ bucless: if (num_ejec == 6) pon_hare(); - copyBackground(x_dr, y_dr, x_dr, y_dr, 45, 31, dir_dibujo1, dir_zona_pantalla); + copyBackground(x_dr, y_dr, x_dr, y_dr, 45, 31, drawSurface1, screenSurface); if (num_ejec != 6) - copyRect(x_talk[cara], 58, x_dr + 7, y_dr, 38, 31, dir_hare_fondo, dir_zona_pantalla); + copyRect(x_talk[cara], 58, x_dr + 7, y_dr, 38, 31, backSurface, screenSurface); else - copyRect(x_talk[cara], 58, x_dr + 7, y_dr, 38, 31, dir_dibujo2, dir_zona_pantalla); + copyRect(x_talk[cara], 58, x_dr + 7, y_dr, 38, 31, drawSurface2, screenSurface); updateRefresh(); if (withVoices == 0) centerText(said, x_dr + 19, y_dr); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -238,7 +238,7 @@ bucless: placeDrascula(); if (num_ejec == 6) pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_solo(const char *said, const char *filename) { @@ -254,7 +254,7 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { talkInit(filename); if (num_ejec == 6) - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); bucless: @@ -266,7 +266,7 @@ bucless: else if (num_ejec == 5) centerText(said, 173, 92); } - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); byte key = getScan(); if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) @@ -285,8 +285,8 @@ bucless: goto bucless; } if (num_ejec == 6) { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } } @@ -305,7 +305,7 @@ bucless: cara = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); @@ -314,15 +314,15 @@ bucless: if (num_ejec == 1) placeDrascula(); if (num_ejec == 1 || num_ejec == 6) - copyBackground(x_igor, y_igor, x_igor, y_igor, 29, 25, dir_dibujo1, dir_zona_pantalla); - copyRect(x_talk[cara], 173, x_igor, y_igor, 29, 25, dir_hare_frente, dir_zona_pantalla); + copyBackground(x_igor, y_igor, x_igor, y_igor, 29, 25, drawSurface1, screenSurface); + copyRect(x_talk[cara], 173, x_igor, y_igor, 29, 25, frontSurface, screenSurface); updateRefresh(); if (withVoices == 0) centerText(said, x_igor + 26, y_igor); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -348,11 +348,11 @@ bucless: } if (num_ejec == 1) { - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); } - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_tabernero(int index) { @@ -384,18 +384,18 @@ bucless: cara = _rnd->getRandomNumber(8); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 2, 121, 44, 21, 24, dir_hare_dch, dir_zona_pantalla); + copyBackground(x_talk[cara], 2, 121, 44, 21, 24, extraSurface, screenSurface); pon_hare(); updateRefresh(); if (withVoices == 0) centerText(said, 132, 45); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -414,7 +414,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_bj(int index) { @@ -438,22 +438,22 @@ bucless: if (num_ejec != 5) { cara = _rnd->getRandomNumber(4); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); copyBackground(x_bj + 2, y_bj - 1, x_bj + 2, y_bj - 1, 27, 40, - dir_dibujo1, dir_zona_pantalla); + drawSurface1, screenSurface); copyRect(x_talk[cara], 99, x_bj + 2, y_bj - 1, 27, 40, - dir_dibujo3, dir_zona_pantalla); + drawSurface3, screenSurface); pon_hare(); updateRefresh(); if (withVoices == 0) centerText(said, x_bj + 7, y_bj); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); } else { @@ -462,7 +462,7 @@ bucless: if (withVoices == 0) centerText(said, 93, 80); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } byte key = getScan(); @@ -483,7 +483,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk(int index) { @@ -535,71 +535,71 @@ bucless: cara = _rnd->getRandomNumber(5); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); if (num_ejec == 2) - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, dir_zona_pantalla, dir_dibujo3); + copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, screenSurface, drawSurface3); else copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), - dir_zona_pantalla, dir_dibujo3); + screenSurface, drawSurface3); pon_hare(); if (num_ejec == 2) { if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg")) - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, dir_dibujo3, dir_zona_pantalla); + copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, drawSurface3, screenSurface); } else { copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), - dir_dibujo3, dir_zona_pantalla); + drawSurface3, screenSurface); } if (sentido_hare == 0) { if (num_ejec == 2) copyRect(x_talk_izq[cara], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, - dir_hare_dch, dir_zona_pantalla); + extraSurface, screenSurface); else reduce_hare_chico(x_talk_izq[cara], y_mask_talk, hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], - dir_hare_dch, dir_zona_pantalla); + extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 1) { if (num_ejec == 2) copyRect(x_talk_dch[cara], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, - dir_hare_dch, dir_zona_pantalla); + extraSurface, screenSurface); else reduce_hare_chico(x_talk_dch[cara], y_mask_talk, hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], dir_hare_dch, dir_zona_pantalla); + hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 2) { if (num_ejec == 2) copyRect(x_talk_izq[cara], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, - dir_hare_frente, dir_zona_pantalla); + frontSurface, screenSurface); else reduce_hare_chico(x_talk_izq[cara], y_mask_talk, suma_1_pixel + hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], - dir_hare_frente, dir_zona_pantalla); + frontSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 3) { if (num_ejec == 2) copyRect(x_talk_dch[cara], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, - dir_hare_frente, dir_zona_pantalla); + frontSurface, screenSurface); else reduce_hare_chico(x_talk_dch[cara], y_mask_talk, suma_1_pixel + hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk,alto_talk, factor_red[hare_y + alto_hare], - dir_hare_frente, dir_zona_pantalla); + frontSurface, screenSurface); updateRefresh(); } if (withVoices == 0) centerText(said, hare_x, hare_y); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -621,7 +621,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if (num_ejec == 1) { if (musicStatus() == 0 && flags[11] == 0 && musicStopped == 0) @@ -644,19 +644,19 @@ bucless: cara = _rnd->getRandomNumber(3); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); copyBackground(x_talk[cara], 139, 228, 112, 47, 60, - dir_hare_dch, dir_zona_pantalla); + extraSurface, screenSurface); pon_hare(); updateRefresh(); if (withVoices == 0) centerText(said, 221, 128); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -676,7 +676,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_drunk(const char *said, const char *filename) { @@ -688,7 +688,7 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) { if (num_ejec == 1) { loadPic("an11y13.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); } flags[13] = 1; @@ -697,7 +697,7 @@ bebiendo: if (flags[12] == 1) { updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); goto bebiendo; } @@ -709,18 +709,18 @@ bucless: cara = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 29, 177, 50, 19, 19, dir_hare_frente, dir_zona_pantalla); + copyBackground(x_talk[cara], 29, 177, 50, 19, 19, frontSurface, screenSurface); pon_hare(); updateRefresh(); if (withVoices == 0) centerText(said, 181, 54); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -740,12 +740,12 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); flags[13] = 0; if (num_ejec == 1) { loadPic("96.alg"); - decompressPic(dir_hare_frente, 1); + decompressPic(frontSurface, 1); } if (num_ejec == 1) { @@ -774,26 +774,26 @@ void DrasculaEngine::talk_vb(const char *said, const char *filename) { talkInit(filename); - copyBackground(vb_x + 5, 64, OBJWIDTH + 1, 0, 25, 27, dir_dibujo1, dir_dibujo3); + copyBackground(vb_x + 5, 64, OBJWIDTH + 1, 0, 25, 27, drawSurface1, drawSurface3); bucless: if (sentido_vb == 1) { cara = _rnd->getRandomNumber(5); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); pon_hare(); pon_vb(); - copyBackground(OBJWIDTH + 1, 0, vb_x + 5, 64, 25, 27, dir_dibujo3, dir_zona_pantalla); - copyRect(x_talk[cara], 34, vb_x + 5, 64, 25, 27, dir_hare_frente, dir_zona_pantalla); + copyBackground(OBJWIDTH + 1, 0, vb_x + 5, 64, 25, 27, drawSurface3, screenSurface); + copyRect(x_talk[cara], 34, vb_x + 5, 64, 25, 27, frontSurface, screenSurface); updateRefresh(); } if (withVoices == 0) centerText(said, vb_x, 66); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -813,7 +813,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) playMusic(roomMusic); } @@ -838,7 +838,7 @@ bucless: updateRoom(); if (withVoices == 0) centerText(said, 150, 80); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); int key = getScan(); if (key != 0) @@ -856,7 +856,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) playMusic(roomMusic); } @@ -869,8 +869,8 @@ void DrasculaEngine::talk_blind(const char *said, const char *filename, const ch color_abc(VON_BRAUN); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talkInit(filename); @@ -881,7 +881,7 @@ void DrasculaEngine::talk_blind(const char *said, const char *filename, const ch pos_blind[5] = 149; bucless: - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); pos_blind[5] = 149; char c = toupper(sincronia[p]); @@ -891,28 +891,28 @@ bucless: pos_blind[0] = 132; if (c == '0') - num_cara = dir_dibujo3; + num_cara = drawSurface3; else if (c == '1') - num_cara = dir_dibujo3; + num_cara = drawSurface3; else if (c == '2') - num_cara = dir_hare_dch; + num_cara = extraSurface; else if (c == '3') - num_cara = dir_hare_dch; + num_cara = extraSurface; else if (c == '4') - num_cara = dir_hare_fondo; + num_cara = backSurface; else if (c == '5') - num_cara = dir_hare_fondo; + num_cara = backSurface; else { - num_cara = dir_hare_frente; + num_cara = frontSurface; pos_blind[5] = 146; } - copyRectClip( pos_blind, num_cara, dir_zona_pantalla); + copyRectClip( pos_blind, num_cara, screenSurface); if (withVoices == 0) centerText(said, 310, 71); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(2); p++; @@ -937,8 +937,8 @@ void DrasculaEngine::talk_hacker(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); color_abc(YELLOW); @@ -947,7 +947,7 @@ void DrasculaEngine::talk_hacker(const char *said, const char *filename) { bucless: if (withVoices == 0) centerText(said, 156, 170); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); int key = getScan(); if (key != 0) @@ -982,18 +982,18 @@ bucless: cara = _rnd->getRandomNumber(8); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 136, 198, 81, 26, 24, dir_dibujo3, dir_zona_pantalla); + copyBackground(x_talk[cara], 136, 198, 81, 26, 24, drawSurface3, screenSurface); pon_hare(); updateRefresh(); if (withVoices == 0) centerText(said, 203, 78); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -1013,7 +1013,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_mus(const char *said, const char *filename) { @@ -1031,18 +1031,18 @@ bucless: cara = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 156, 190, 64, 18, 24, dir_dibujo3, dir_zona_pantalla); + copyBackground(x_talk[cara], 156, 190, 64, 18, 24, drawSurface3, screenSurface); pon_hare(); updateRefresh(); if (withVoices == 0) centerText(said, 197, 64); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -1062,7 +1062,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_pen(const char *said, const char *filename) { @@ -1073,8 +1073,8 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename) { flags[1] = 1; updateRoom(); - copyRect(44, 145, 145, 105, 25, 29, dir_dibujo3, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyRect(44, 145, 145, 105, 25, 29, drawSurface3, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1086,18 +1086,18 @@ bucless: cara = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(x_talk[cara], 145, 145, 105, 25, 29, dir_dibujo3, dir_zona_pantalla); + copyRect(x_talk[cara], 145, 145, 105, 25, 29, drawSurface3, screenSurface); updateRefresh(); if (withVoices == 0) centerText(said, 160, 105); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -1117,9 +1117,9 @@ bucless: } flags[1] = 0; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_pen2(const char *said, const char *filename) { @@ -1139,18 +1139,18 @@ bucless: cara = _rnd->getRandomNumber(4); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 171, 173, 116, 25, 28, dir_dibujo3, dir_zona_pantalla); + copyBackground(x_talk[cara], 171, 173, 116, 25, 28, drawSurface3, screenSurface); updateRefresh(); if (withVoices == 0) centerText(said, 195, 107); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -1170,9 +1170,9 @@ bucless: } flags[1] = 0; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_taber2(const char *said, const char *filename) { @@ -1190,18 +1190,18 @@ bucless: cara = _rnd->getRandomNumber(5); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 130, 151, 43, 21, 24, dir_dibujo3, dir_zona_pantalla); + copyBackground(x_talk[cara], 130, 151, 43, 21, 24, drawSurface3, screenSurface); pon_hare(); updateRefresh(); if (withVoices == 0) centerText(said, 132, 45); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -1221,7 +1221,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_bj_bed(int index) { @@ -1245,19 +1245,19 @@ bucless: cara = _rnd->getRandomNumber(4); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(65, 103, 65, 103, 49, 38, dir_dibujo1, dir_zona_pantalla); - copyRect(x_talk[cara], 105, 65, 103, 49, 38, dir_dibujo3, dir_zona_pantalla); + copyBackground(65, 103, 65, 103, 49, 38, drawSurface1, screenSurface); + copyRect(x_talk[cara], 105, 65, 103, 49, 38, drawSurface3, screenSurface); pon_hare(); updateRefresh(); if (withVoices == 0) centerText(said, 104, 102); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -1276,7 +1276,7 @@ bucless: goto bucless; } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_htel(const char *said, const char *filename) { @@ -1297,20 +1297,20 @@ bucless: pantalla = _rnd->getRandomNumber(2); if (cara == 0 && pantalla == 0) - num_cara = (char *)dir_dibujo3; + num_cara = (char *)drawSurface3; else if (pantalla == 1) - num_cara = (char *)dir_hare_frente; + num_cara = (char *)frontSurface; else - num_cara = (char *)dir_hare_fondo; + num_cara = (char *)backSurface; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(x_talk[cara], 1, 45, 24, 92, 108, (byte *)num_cara, dir_zona_pantalla); + copyBackground(x_talk[cara], 1, 45, 24, 92, 108, (byte *)num_cara, screenSurface); if (withVoices == 0) centerText(said, 90, 50); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); int key = getScan(); @@ -1328,8 +1328,8 @@ bucless: goto bucless; } - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_sinc(const char *said, const char *filename, const char *sincronia) { @@ -1370,58 +1370,58 @@ bucless: if (sincronia[p] == '7') cara = 7; - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); if (num_ejec == 2) - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, dir_zona_pantalla, dir_dibujo3); + copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, screenSurface, drawSurface3); else copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), dir_zona_pantalla, dir_dibujo3); + (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), screenSurface, drawSurface3); pon_hare(); if (num_ejec == 2) { if (alto_hare != 56) - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, dir_dibujo3, dir_zona_pantalla); + copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, drawSurface3, screenSurface); } else copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), dir_dibujo3, dir_zona_pantalla); + (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), drawSurface3, screenSurface); if (sentido_hare == 0) { if (num_ejec == 2) - copyRect(x_talk_izq[cara], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, dir_hare_dch, dir_zona_pantalla); + copyRect(x_talk_izq[cara], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, extraSurface, screenSurface); else reduce_hare_chico(x_talk_izq[cara], y_mask_talk, (int)(hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], dir_hare_dch, dir_zona_pantalla); + hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 1) { if (num_ejec == 2) - copyRect(x_talk_dch[cara], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, dir_hare_dch, dir_zona_pantalla); + copyRect(x_talk_dch[cara], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, extraSurface, screenSurface); else reduce_hare_chico(x_talk_dch[cara], y_mask_talk, (int)(hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], dir_hare_dch, dir_zona_pantalla); + hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 2) { if (num_ejec == 2) - copyRect(x_talk_izq[cara], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, dir_hare_frente, dir_zona_pantalla); + copyRect(x_talk_izq[cara], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); else reduce_hare_chico(x_talk_izq[cara], y_mask_talk, (int)(suma_1_pixel + hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, - ancho_talk, alto_talk, factor_red[hare_y + alto_hare], dir_hare_frente, dir_zona_pantalla); + ancho_talk, alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 3) { if (num_ejec == 2) - copyRect(x_talk_dch[cara], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, dir_hare_frente, dir_zona_pantalla); + copyRect(x_talk_dch[cara], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); else reduce_hare_chico(x_talk_dch[cara], y_mask_talk, (int)(suma_1_pixel + hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, - ancho_talk, alto_talk, factor_red[hare_y + alto_hare], dir_hare_frente, dir_zona_pantalla); + ancho_talk, alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); updateRefresh(); } if (withVoices == 0) centerText(said, hare_x, hare_y); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); p++; pause(3); @@ -1472,7 +1472,7 @@ bucless: if (withVoices == 0) centerText(said, 263, 69); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(4); @@ -1493,7 +1493,7 @@ bucless: flags[19] = cara_antes; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_igorpuerta(const char *said, const char *filename) { @@ -1510,7 +1510,7 @@ bucless: updateRoom(); if (withVoices == 0) centerText(said, 87, 66); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); int key = getScan(); if (key != 0) @@ -1528,7 +1528,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_igor_seated(const char *said, const char *filename) { @@ -1546,18 +1546,18 @@ bucless: cara = _rnd->getRandomNumber(3); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 109, 207, 92, 21, 23, dir_dibujo3, dir_zona_pantalla); + copyBackground(x_talk[cara], 109, 207, 92, 21, 23, drawSurface3, screenSurface); pon_hare(); updateRefresh(); if (withVoices == 0) centerText(said, 221, 102); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -1577,7 +1577,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::talk_igor_peluca(const char *said, const char *filename) { @@ -1595,18 +1595,18 @@ bucless: _rnd->getRandomNumber(3); - copyBackground(0, 0, 0, 0, 320, 200, dir_dibujo1, dir_zona_pantalla); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 78, 199, 94, 38, 27, dir_dibujo3, dir_zona_pantalla); + copyBackground(x_talk[cara], 78, 199, 94, 38, 27, drawSurface3, screenSurface); pon_hare(); updateRefresh(); if (withVoices == 0) centerText(said, 221, 102); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); @@ -1626,7 +1626,7 @@ bucless: } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, dir_zona_pantalla); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } } // End of namespace Drascula -- cgit v1.2.3 From eb28418d4b2c6a3a96c2ecbf87325bfd45f6d7ba Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 07:16:17 +0000 Subject: Changed color defines to more meaningful names in an enum svn-id: r32375 --- engines/drascula/animation.cpp | 18 +++++++------- engines/drascula/drascula.cpp | 48 ++++++++++++++++++------------------- engines/drascula/drascula.h | 25 ++++++++++--------- engines/drascula/rooms.cpp | 10 ++++---- engines/drascula/talk.cpp | 54 +++++++++++++++++++++--------------------- 5 files changed, 79 insertions(+), 76 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 6f2bc1bc2d..7cff21047b 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -64,7 +64,7 @@ void DrasculaEngine::animation_1_1() { delay(900); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - color_abc(RED); + color_abc(kColorRed); centerText(_textmisc[_lang][1], 160, 100); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -201,7 +201,7 @@ void DrasculaEngine::animation_1_1() { if (anima("lib2.bin", 16)) break; clearRoom(); - color_solo = RED; + color_solo = kColorRed; loadPic("plan1.alg"); decompressPic(screenSurface, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -384,7 +384,7 @@ void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(RED); + color_abc(kColorRed); if (hay_sb == 1) { sku = new Common::File; @@ -479,7 +479,7 @@ void DrasculaEngine::animation_2_1() { stopMusic(); musicStopped = 1; memset(screenSurface, 0, 64000); - color_solo = WHITE; + color_solo = kColorWhite; pause(80); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -497,7 +497,7 @@ void DrasculaEngine::animation_2_1() { fadeFromBlack(1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - color_solo = YELLOW; + color_solo = kColorYellow; talk_solo(_text[_lang][214], "214.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -581,7 +581,7 @@ void DrasculaEngine::animation_2_1() { talk_solo(_text[_lang][223], "223.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - color_solo = WHITE; + color_solo = kColorWhite; updateRoom(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -1001,7 +1001,7 @@ void DrasculaEngine::animation_16_2() { goto asco; if (_lang != kSpanish) - color_abc(DARK_GREEN); + color_abc(kColorDarkGreen); loadPic("his1.alg"); decompressPic(drawSurface1, HALF_PAL); @@ -2446,7 +2446,7 @@ void DrasculaEngine::animation_9_6() { clearRoom(); loadPic("nota.alg"); decompressPic(drawSurface1, COMPLETE_PAL); - color_abc(WHITE); + color_abc(kColorWhite); talk_solo(_textbj[_lang][24], "bj24.als"); talk_solo(_textbj[_lang][25], "bj25.als"); talk_solo(_textbj[_lang][26], "bj26.als"); @@ -2467,7 +2467,7 @@ void DrasculaEngine::animation_9_6() { updateRoom(); copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - color_abc(LIGHT_GREEN); + color_abc(kColorLightGreen); talk_solo("GOOOOOOOOOOOOOOOL", "s15.als"); loadPic("nota2.alg"); decompressPic(drawSurface1, 1); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 0893cb34bb..26ab9590c3 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1073,7 +1073,7 @@ martini: changeColor = -1; if (num_ejec == 2) - color_abc(LIGHT_GREEN); + color_abc(kColorLightGreen); if (num_ejec != 2) { for (l = 0; l <= suelo_y1; l++) @@ -1217,10 +1217,10 @@ void DrasculaEngine::moveCursor() { updateRefresh(); if (!strcmp(textName, "hacker") && hasName == 1) { - if (_color != RED && menuScreen == 0) - color_abc(RED); - } else if (menuScreen == 0 && _color != LIGHT_GREEN) - color_abc(LIGHT_GREEN); + if (_color != kColorRed && menuScreen == 0) + color_abc(kColorRed); + } else if (menuScreen == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); if (hasName == 1 && menuScreen == 0) centerText(textName, mouseX, mouseY); if (menuScreen == 1) @@ -1524,7 +1524,7 @@ bool DrasculaEngine::saves() { loadPic("savescr.alg"); decompressPic(drawSurface1, HALF_PAL); - color_abc(LIGHT_GREEN); + color_abc(kColorLightGreen); for (;;) { y = 27; @@ -1764,7 +1764,7 @@ void DrasculaEngine::delay(int ms) { bool DrasculaEngine::confirma_salir() { byte key; - color_abc(RED); + color_abc(kColorRed); updateRoom(); centerText(_textsys[_lang][1], 160, 87); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -3815,7 +3815,7 @@ void DrasculaEngine::converse(const char *nom_fich) { // TODO code here should limit y position for mouse in dialog menu, // but we can't implement this due lack backend functionality // from 1(top) to 31 - color_abc(LIGHT_GREEN); + color_abc(kColorLightGreen); bucle_opc: @@ -3835,22 +3835,22 @@ bucle_opc: updateEvents(); if (mouseY > 0 && mouseY < 9) { - if (used1 == 1 && _color != WHITE) - color_abc(WHITE); - else if (used1 == 0 && _color != LIGHT_GREEN) - color_abc(LIGHT_GREEN); + if (used1 == 1 && _color != kColorWhite) + color_abc(kColorWhite); + else if (used1 == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); } else if (mouseY > 8 && mouseY < 17) { - if (used2 == 1 && _color != WHITE) - color_abc(WHITE); - else if (used2 == 0 && _color != LIGHT_GREEN) - color_abc(LIGHT_GREEN); + if (used2 == 1 && _color != kColorWhite) + color_abc(kColorWhite); + else if (used2 == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); } else if (mouseY > 16 && mouseY < 25) { - if (used3 == 1 && _color != WHITE) - color_abc(WHITE); - else if (used3 == 0 && _color != LIGHT_GREEN) - color_abc(LIGHT_GREEN); - } else if (_color != LIGHT_GREEN) - color_abc(LIGHT_GREEN); + if (used3 == 1 && _color != kColorWhite) + color_abc(kColorWhite); + else if (used3 == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); + } else if (_color != kColorLightGreen) + color_abc(kColorLightGreen); if (mouseY > 0 && mouseY < 9) game1 = 2; @@ -3900,7 +3900,7 @@ bucle_opc: if (button_izq == 1) { delay(100); - color_abc(LIGHT_GREEN); + color_abc(kColorLightGreen); } game1 = (used1 == 0) ? 1 : 3; @@ -4411,7 +4411,7 @@ void DrasculaEngine::showMap() { void DrasculaEngine::grr() { int length = 30; - color_abc(DARK_GREEN); + color_abc(kColorDarkGreen); if (hay_sb == 1) { sku = new Common::File; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 15382aafcf..fd1e55faec 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -66,6 +66,20 @@ enum Verbs { kVerbMove = 6 }; +enum Colors { + kColorBrown = 1, + kColorDarkBlue = 2, + kColorLightGreen = 3, + kColorDarkGreen = 4, + kColorYellow = 5, + kColorOrange = 6, + kColorRed = 7, + kColorMaroon = 8, + kColorPurple = 9, + kColorWhite = 10, + kColorPink = 11 +}; + #define TEXTD_START 68 struct DrasculaGameDescription; @@ -135,17 +149,6 @@ struct RoomTalkAction; #define SPACE 250 #define ALTO_TALK_HARE 25 #define ANCHO_TALK_HARE 23 -#define VON_BRAUN 1 -#define DARK_BLUE 2 -#define LIGHT_GREEN 3 -#define DARK_GREEN 4 -#define YELLOW 5 -#define ORANGE 6 -#define RED 7 -#define MAROON 8 -#define PURPLE 9 -#define WHITE 10 -#define PINK 11 #define PASO_HARE_X 8 #define PASO_HARE_Y 3 #define CHARACTER_HEIGHT 70 diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 2553e34296..ede8e99f66 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1179,19 +1179,19 @@ void DrasculaEngine::room_59(int fl) { decompressPic(backSurface, 1); talk_htel(_text[_lang][240], "240.als"); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talk_solo(_textvb[_lang][58], "VB58.als"); talk_htel(_text[_lang][241], "241.als"); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talk_solo(_textvb[_lang][59], "VB59.als"); talk_htel(_text[_lang][242], "242.als"); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talk_solo(_textvb[_lang][60], "VB60.als"); talk_htel(_text[_lang][196], "196.als"); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talk_solo(_textvb[_lang][61],"VB61.als"); talk_htel(_text[_lang][244], "244.als"); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talk_solo(_textvb[_lang][62], "VB62.als"); clearRoom(); loadPic("aux59.alg"); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index afd2988162..81341a3153 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -53,7 +53,7 @@ void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -115,7 +115,7 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(RED); + color_abc(kColorRed); talkInit(filename); @@ -183,7 +183,7 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(RED); + color_abc(kColorRed); talkInit(filename); @@ -249,7 +249,7 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { if (num_ejec == 1) color_abc(color_solo); else if (num_ejec == 4) - color_abc(RED); + color_abc(kColorRed); talkInit(filename); @@ -297,7 +297,7 @@ void DrasculaEngine::talk_igor_frente(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -368,7 +368,7 @@ void DrasculaEngine::talk_tabernero(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(MAROON); + color_abc(kColorMaroon); talkInit(filename); @@ -430,7 +430,7 @@ void DrasculaEngine::talk_bj(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -523,10 +523,10 @@ void DrasculaEngine::talk(const char *said, const char *filename) { if (num_ejec == 4) { if (roomNumber == 24 || flags[29] == 0) { - color_abc(YELLOW); + color_abc(kColorYellow); } } else { - color_abc(YELLOW); + color_abc(kColorYellow); } talkInit(filename); @@ -636,7 +636,7 @@ void DrasculaEngine::talk_pianista(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -701,7 +701,7 @@ bebiendo: goto bebiendo; } - color_abc(DARK_GREEN); + color_abc(kColorDarkGreen); talkInit(filename); @@ -770,7 +770,7 @@ void DrasculaEngine::talk_vb(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talkInit(filename); @@ -829,7 +829,7 @@ void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(VON_BRAUN); + color_abc(kColorBrown); talkInit(filename); @@ -867,7 +867,7 @@ void DrasculaEngine::talk_blind(const char *said, const char *filename, const ch int pos_blind[6]; int length = strlen(said); - color_abc(VON_BRAUN); + color_abc(kColorBrown); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -940,7 +940,7 @@ void DrasculaEngine::talk_hacker(const char *said, const char *filename) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - color_abc(YELLOW); + color_abc(kColorYellow); talkInit(filename); @@ -974,7 +974,7 @@ void DrasculaEngine::talk_wolf(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(RED); + color_abc(kColorRed); talkInit(filename); @@ -1023,7 +1023,7 @@ void DrasculaEngine::talk_mus(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -1078,7 +1078,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(YELLOW); + color_abc(kColorYellow); talkInit(filename); @@ -1131,7 +1131,7 @@ void DrasculaEngine::talk_pen2(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(YELLOW); + color_abc(kColorYellow); talkInit(filename); @@ -1182,7 +1182,7 @@ void DrasculaEngine::talk_taber2(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(MAROON); + color_abc(kColorMaroon); talkInit(filename); @@ -1237,7 +1237,7 @@ void DrasculaEngine::talk_bj_bed(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -1287,7 +1287,7 @@ void DrasculaEngine::talk_htel(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(YELLOW); + color_abc(kColorYellow); talkInit(filename); @@ -1340,7 +1340,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha int p, cara = 0; int length = strlen(said); - color_abc(YELLOW); + color_abc(kColorYellow); if (num_ejec == 1) { if (factor_red[hare_y + alto_hare] == 100) @@ -1455,7 +1455,7 @@ void DrasculaEngine::talk_baul(const char *said, const char *filename) { cara_antes = flags[19]; - color_abc(MAROON); + color_abc(kColorMaroon); talkInit(filename); @@ -1501,7 +1501,7 @@ void DrasculaEngine::talk_igorpuerta(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -1538,7 +1538,7 @@ void DrasculaEngine::talk_igor_seated(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); @@ -1587,7 +1587,7 @@ void DrasculaEngine::talk_igor_peluca(const char *said, const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(WHITE); + color_abc(kColorWhite); talkInit(filename); -- cgit v1.2.3 From 54e631a9034c00f9a5519441027cfda2c0532567 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 07:19:09 +0000 Subject: rompo -> doBreak Removed unused variable rompo2 svn-id: r32376 --- engines/drascula/animation.cpp | 4 ++-- engines/drascula/drascula.cpp | 28 ++++++++++++++-------------- engines/drascula/drascula.h | 2 +- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 7cff21047b..4e0f2d6c1b 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -2163,7 +2163,7 @@ void DrasculaEngine::animation_12_5() { lleva_al_hare(40, 169); lleva_al_hare(-14, 175); - rompo = 1; + doBreak = 1; previousMusic = roomMusic; hare_se_ve = 1; clearRoom(); @@ -2389,7 +2389,7 @@ void DrasculaEngine::animation_6_6() { decompressPic(extraSurface, 1); loadPic("99.alg"); decompressPic(backSurface, 1); - rompo = 1; + doBreak = 1; objExit = 104; hare_x = -1; withoutVerb(); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 26ab9590c3..73a2b55481 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -167,7 +167,7 @@ int DrasculaEngine::go() { frame_y = 0; hare_x = -1; hare_se_mueve = 0; sentido_hare = 3; num_frame = 0; hare_se_ve = 1; checkFlags = 1; - rompo = 0; rompo2 = 0; + doBreak = 0; walkToObject = 0; stepX = PASO_HARE_X; stepY = PASO_HARE_Y; alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; feetHeight = PIES_HARE; @@ -1291,31 +1291,31 @@ bool DrasculaEngine::comprueba1() { else { for (l = 0; l < numRoomObjs; l++) { if (mouseX >= x1[l] && mouseY >= y1[l] - && mouseX <= x2[l] && mouseY <= y2[l] && rompo == 0) { + && mouseX <= x2[l] && mouseY <= y2[l] && doBreak == 0) { if (exitRoom(l)) return true; - if (rompo == 1) + if (doBreak == 1) break; } } if (mouseX > hare_x && mouseY > hare_y && mouseX < hare_x + ancho_hare && mouseY < hare_y + alto_hare) - rompo = 1; + doBreak = 1; for (l = 0; l < numRoomObjs; l++) { if (mouseX > x1[l] && mouseY > y1[l] - && mouseX < x2[l] && mouseY < y2[l] && rompo == 0) { + && mouseX < x2[l] && mouseY < y2[l] && doBreak == 0) { sitio_x = sitiobj_x[l]; sitio_y = sitiobj_y[l]; sentido_final = sentidobj[l]; - rompo = 1; + doBreak = 1; walkToObject = 1; startWalking(); } } - if (rompo == 0) { + if (doBreak == 0) { sitio_x = mouseX; sitio_y = mouseY; @@ -1330,7 +1330,7 @@ bool DrasculaEngine::comprueba1() { startWalking(); } - rompo = 0; + doBreak = 0; } return false; @@ -2643,7 +2643,7 @@ bool DrasculaEngine::exitRoom(int l) { hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; - rompo = 1; + doBreak = 1; previousMusic = roomMusic; if (objectNum[l] == 105) { @@ -2664,7 +2664,7 @@ bool DrasculaEngine::exitRoom(int l) { hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; - rompo = 1; + doBreak = 1; previousMusic = roomMusic; if (objectNum[l] == 136) animation_2_2(); @@ -2700,7 +2700,7 @@ bool DrasculaEngine::exitRoom(int l) { hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; - rompo = 1; + doBreak = 1; previousMusic = roomMusic; clearRoom(); strcpy(salgo, targetScreen[l]); @@ -2718,7 +2718,7 @@ bool DrasculaEngine::exitRoom(int l) { hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; - rompo = 1; + doBreak = 1; previousMusic = roomMusic; if (objectNum[l] == 108) @@ -2739,7 +2739,7 @@ bool DrasculaEngine::exitRoom(int l) { hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; - rompo = 1; + doBreak = 1; previousMusic = roomMusic; hare_se_ve = 1; clearRoom(); @@ -2758,7 +2758,7 @@ bool DrasculaEngine::exitRoom(int l) { hare_se_mueve = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; - rompo = 1; + doBreak = 1; previousMusic = roomMusic; clearRoom(); strcpy(salgo, targetScreen[l]); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index fd1e55faec..8f2989eb1b 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -313,7 +313,7 @@ public: int frame_y; int hare_x, hare_y, hare_se_mueve, direccion_hare, sentido_hare, num_frame, hare_se_ve; int sitio_x, sitio_y, checkFlags; - int rompo, rompo2; + int doBreak; int stepX, stepY; int alto_hare, ancho_hare, feetHeight; int alto_talk, ancho_talk; -- cgit v1.2.3 From 4cc64e2b638906b70b55e4a6dd464525b63062cd Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 07:24:32 +0000 Subject: anima -> animate leng -> dataSize, and removed it from the global variables (it's only used in animate()) svn-id: r32377 --- engines/drascula/animation.cpp | 58 +++++++++++++++++++++--------------------- engines/drascula/drascula.cpp | 16 ++++++------ engines/drascula/drascula.h | 3 +-- engines/drascula/rooms.cpp | 6 ++--- 4 files changed, 41 insertions(+), 42 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 4e0f2d6c1b..175f502ee2 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -84,10 +84,10 @@ void DrasculaEngine::animation_1_1() { playSound("s5.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - if (anima("scr2.bin", 17)) + if (animate("scr2.bin", 17)) break; stopSound_corte(); - if (anima("scr3.bin", 17)) + if (animate("scr3.bin", 17)) break; loadPic("cielo2.alg"); decompressPic(screenSurface, 256); @@ -196,9 +196,9 @@ void DrasculaEngine::animation_1_1() { talk_dr_izq(3); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - if (anima("lib.bin", 16)) + if (animate("lib.bin", 16)) break; - if (anima("lib2.bin", 16)) + if (animate("lib2.bin", 16)) break; clearRoom(); color_solo = kColorRed; @@ -215,7 +215,7 @@ void DrasculaEngine::animation_1_1() { talk_solo(_textd[_lang][5], "d5.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - if (anima("lib2.bin", 16)) + if (animate("lib2.bin", 16)) break; clearRoom(); loadPic("plan2.alg"); @@ -225,7 +225,7 @@ void DrasculaEngine::animation_1_1() { talk_solo(_textd[_lang][6], "d6.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - if (anima("lib2.bin", 16)) + if (animate("lib2.bin", 16)) break; clearRoom(); loadPic("plan3.alg"); @@ -263,16 +263,16 @@ void DrasculaEngine::animation_1_1() { talk_dr_izq(10); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - if (anima("rayo1.bin", 16)) + if (animate("rayo1.bin", 16)) break; playSound("s5.als"); - if (anima("rayo2.bin", 15)) + if (animate("rayo2.bin", 15)) break; - if (anima("frel2.bin", 16)) + if (animate("frel2.bin", 16)) break; - if (anima("frel.bin", 16)) + if (animate("frel.bin", 16)) break; - if (anima("frel.bin", 16)) + if (animate("frel.bin", 16)) break; stopSound_corte(); clearRoom(); @@ -445,7 +445,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - if (anima("ag.bin", 14)) + if (animate("ag.bin", 14)) break; if (_lang == kSpanish) @@ -533,7 +533,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - if (anima("lev.bin", 15)) + if (animate("lev.bin", 15)) break; lleva_al_hare(100 + ancho_hare / 2, 99 + alto_hare); @@ -560,9 +560,9 @@ void DrasculaEngine::animation_2_1() { talk(221); talk_bj(10); talk(222); - if (anima("gaf.bin", 15)) + if (animate("gaf.bin", 15)) break; - if (anima("bjb.bin", 14)) + if (animate("bjb.bin", 14)) break; playMusic(9); loadPic("97.alg"); @@ -610,10 +610,10 @@ void DrasculaEngine::animation_2_1() { lleva_al_hare(157, 98 + alto_hare); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - if (anima("bes.bin", 16)) + if (animate("bes.bin", 16)) break; playMusic(11); - if (anima("rap.bin", 16)) + if (animate("rap.bin", 16)) break; sentido_hare = 3; // The room number was originally changed here to "no_bj.alg", @@ -2077,9 +2077,9 @@ void DrasculaEngine::animation_12_5() { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(27); - anima("rayo1.bin", 23); + animate("rayo1.bin", 23); playSound("s5.als"); - anima("rayo2.bin", 17); + animate("rayo2.bin", 17); sentido_hare = 1; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -2145,7 +2145,7 @@ void DrasculaEngine::animation_12_5() { updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } - anima("frel.bin", 16); + animate("frel.bin", 16); clearRoom(); hare_claro(); updatePalette(); @@ -2283,7 +2283,7 @@ void DrasculaEngine::animation_1_6() { converse("op_11.cal"); talk_dr_dch(26); - anima("fum.bin", 15); + animate("fum.bin", 15); talk_dr_dch(27); talk(254); @@ -2359,7 +2359,7 @@ void DrasculaEngine::animation_5_6() { pos_pen[4] = 18; pos_pen[5] = 125; - anima("man.bin", 14); + animate("man.bin", 14); for (n = -125; n <= 0; n = n + 2) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -2377,7 +2377,7 @@ void DrasculaEngine::animation_5_6() { } void DrasculaEngine::animation_6_6() { - anima("rct.bin", 11); + animate("rct.bin", 11); clearRoom(); withoutVerb(); removeObject(20); @@ -2396,7 +2396,7 @@ void DrasculaEngine::animation_6_6() { carga_escoba("58.ald"); hare_se_ve = 1; sentido_hare = 1; - anima("hbp.bin", 14); + animate("hbp.bin", 14); sentido_hare = 3; flags[0] = 1; @@ -2412,10 +2412,10 @@ void DrasculaEngine::animation_7_6() { void DrasculaEngine::animation_9_6() { int v_cd; - anima("fin.bin", 14); + animate("fin.bin", 14); playMusic(13); flags[5] = 1; - anima("drf.bin", 16); + animate("drf.bin", 16); fadeToBlack(0); clearRoom(); hare_x = -1; @@ -2533,7 +2533,7 @@ void DrasculaEngine::animation_18_6() { flags[6] = 1; withoutVerb(); removeObject(21); - anima("beb.bin", 10); + animate("beb.bin", 10); } void DrasculaEngine::animation_19_6() { @@ -3439,7 +3439,7 @@ void DrasculaEngine::animation_5_4(){ updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); delay(800); - anima("bio.bin", 14); + animate("bio.bin", 14); flags[29] = 1; hare_x = 95; hare_y = 82; @@ -3514,7 +3514,7 @@ void DrasculaEngine::animation_8_4() { } void DrasculaEngine::animation_9_4() { - anima("st.bin", 14); + animate("st.bin", 14); fadeToBlack(1); } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 73a2b55481..8087cae148 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -184,7 +184,6 @@ int DrasculaEngine::go() { term_int = 0; musicStopped = 0; hay_seleccion = 0; - Leng = 0; UsingMem = 0; globalSpeed = 0; frame_blind = 0; @@ -2039,11 +2038,12 @@ void DrasculaEngine::playSound(const char *file) { ctvd_output(sku); } -bool DrasculaEngine::anima(const char *animation, int FPS) { +bool DrasculaEngine::animate(const char *animation, int FPS) { Common::File FileIn; unsigned j; int NFrames = 1; int cnt = 2; + int dataSize = 0; AuxBuffLast = (byte *)malloc(65000); AuxBuffDes = (byte *)malloc(65000); @@ -2055,9 +2055,9 @@ bool DrasculaEngine::anima(const char *animation, int FPS) { } FileIn.read(&NFrames, sizeof(NFrames)); - FileIn.read(&Leng, sizeof(Leng)); - AuxBuffOrg = (byte *)malloc(Leng); - FileIn.read(AuxBuffOrg, Leng); + FileIn.read(&dataSize, sizeof(dataSize)); + AuxBuffOrg = (byte *)malloc(dataSize); + FileIn.read(AuxBuffOrg, dataSize); FileIn.read(cPal, 768); loadPCX(AuxBuffOrg); free(AuxBuffOrg); @@ -2068,9 +2068,9 @@ bool DrasculaEngine::anima(const char *animation, int FPS) { memcpy(AuxBuffLast, AuxBuffDes, 64000); WaitForNext(FPS); while (cnt < NFrames) { - FileIn.read(&Leng, sizeof(Leng)); - AuxBuffOrg = (byte *)malloc(Leng); - FileIn.read(AuxBuffOrg, Leng); + FileIn.read(&dataSize, sizeof(dataSize)); + AuxBuffOrg = (byte *)malloc(dataSize); + FileIn.read(AuxBuffOrg, dataSize); FileIn.read(cPal, 768); loadPCX(AuxBuffOrg); free(AuxBuffOrg); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 8f2989eb1b..e89fdf1123 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -476,7 +476,7 @@ public: void color_abc(int cl); void centerText(const char *,int,int); void playSound(const char *); - bool anima(const char *animation, int FPS); + bool animate(const char *animation, int FPS); void stopSound_corte(); void fadeToBlack(int VelocidadDeFundido); void pause(int); @@ -546,7 +546,6 @@ public: byte *AuxBuffOrg; byte *AuxBuffLast; byte *AuxBuffDes; - int Leng; byte *pointer; int UsingMem; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index ede8e99f66..0fdd0ed4e9 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -747,7 +747,7 @@ void DrasculaEngine::room_22(int fl) { visible[1] = 0; flags[24] = 1; } else if (pickedObject == 22 && fl == 52) { - anima("up.bin",14); + animate("up.bin",14); flags[26]=1; playSound("s1.als"); hiccup(14); @@ -1105,7 +1105,7 @@ void DrasculaEngine::room_55(int fl) { talk(_text[_lang][140], "140.als"); else if (fl == 206) { playSound("s11.als"); - anima("det.bin", 17); + animate("det.bin", 17); stopSound(); lleva_al_hare(hare_x - 3, hare_y + alto_hare + 6); } else @@ -1242,7 +1242,7 @@ bool DrasculaEngine::room_60(int fl) { animation_9_6(); return true; } else if (pickedObject == 9 && fl == 56 && flags[6] == 0) { - anima("cnf.bin", 14); + animate("cnf.bin", 14); talk(_text[_lang][455], "455.als"); } else hasAnswer = 0; -- cgit v1.2.3 From 1ca29c1796b0656e640bfd8f0d0dca3618c7e9b2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 07:26:55 +0000 Subject: Some cleanup, translated an error message svn-id: r32378 --- engines/drascula/drascula.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 8087cae148..a0e927ad28 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -2038,7 +2038,7 @@ void DrasculaEngine::playSound(const char *file) { ctvd_output(sku); } -bool DrasculaEngine::animate(const char *animation, int FPS) { +bool DrasculaEngine::animate(const char *animationFile, int FPS) { Common::File FileIn; unsigned j; int NFrames = 1; @@ -2048,10 +2048,10 @@ bool DrasculaEngine::animate(const char *animation, int FPS) { AuxBuffLast = (byte *)malloc(65000); AuxBuffDes = (byte *)malloc(65000); - FileIn.open(animation); + FileIn.open(animationFile); if (!FileIn.isOpen()) { - error("No encuentro un file de animation."); + error("Animation file %s not found", animationFile); } FileIn.read(&NFrames, sizeof(NFrames)); -- cgit v1.2.3 From 8d16e9330ada8de67da91fd5843e73c98ec568a0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 08:00:42 +0000 Subject: Untangling spaghetti code: removed several goto statements svn-id: r32379 --- engines/drascula/drascula.cpp | 132 ++++++++++++++++++++---------------------- 1 file changed, 64 insertions(+), 68 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index a0e927ad28..26761da8d6 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -928,8 +928,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (num_ejec == 2) { getLine(ald, buffer, size); sscanf(buffer, "%d", &martin); - if (martin == 0) - goto martini; + } + + if (num_ejec == 2 && martin != 0) { ancho_hare = martin; getLine(ald, buffer, size); sscanf(buffer, "%d",&alto_hare); @@ -959,8 +960,6 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { strcpy(menuBackground, pant4); } -martini: - getLine(ald, buffer, size); sscanf(buffer, "%d", &numRoomObjs); @@ -1183,7 +1182,9 @@ void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { if (hare_se_ve == 0) { hare_x = sitio_x; hare_y = sitio_y; - goto fin; + updateRoom(); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + return; } } sitio_x = pointX; @@ -1201,7 +1202,6 @@ void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { walkToObject = 0; sentido_hare = sentido_final; } -fin: updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } @@ -2187,33 +2187,32 @@ void DrasculaEngine::hiccup(int counter) { if (num_ejec == 3) y = -1; -comienza: - counter--; + do { + counter--; - updateRoom(); - if (num_ejec == 3) - updateScreen(0, 0, 0, y, 320, 200, screenSurface); - else - updateScreen(0, 1, 0, y, 320, 198, screenSurface); + updateRoom(); + if (num_ejec == 3) + updateScreen(0, 0, 0, y, 320, 200, screenSurface); + else + updateScreen(0, 1, 0, y, 320, 198, screenSurface); - if (sentido == 0) - y++; - else - y--; + if (sentido == 0) + y++; + else + y--; - if (num_ejec == 3) { - if (y == 1) - sentido = 1; - if (y == -1) - sentido = 0; - } else { - if (y == 2) - sentido = 1; - if (y == 0) - sentido = 0; - } - if (counter > 0) - goto comienza; + if (num_ejec == 3) { + if (y == 1) + sentido = 1; + if (y == -1) + sentido = 0; + } else { + if (y == 2) + sentido = 1; + if (y == 0) + sentido = 0; + } + } while (counter > 0); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -2482,8 +2481,10 @@ void DrasculaEngine::pon_hare() { } if (num_ejec == 1 || num_ejec == 4 || num_ejec == 5 || num_ejec == 6) { - if (hare_se_ve == 0) - goto no_vuelco; + if (hare_se_ve == 0) { + increaseFrameNum(); + return; + } } if (hare_se_mueve == 0) { @@ -2563,8 +2564,6 @@ void DrasculaEngine::pon_hare() { reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], factor_red[hare_y + alto_hare], frontSurface, screenSurface); } - -no_vuelco: increaseFrameNum(); } } @@ -2783,19 +2782,17 @@ bool DrasculaEngine::pickupObject() { menu_sin_volcar(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (pickedObject < 7) - goto usando_verbos; - - for (n = 1; n < 43; n++) { - if (whichObject() == n && inventoryObjects[n] == 0) { - inventoryObjects[n] = h; - takeObject = 0; - checkFlags = 0; + // Objects with an ID smaller than 7 are the inventory verbs + if (pickedObject >= 7) { + for (n = 1; n < 43; n++) { + if (whichObject() == n && inventoryObjects[n] == 0) { + inventoryObjects[n] = h; + takeObject = 0; + checkFlags = 0; + } } } -usando_verbos: - if (checkFlags == 1) { if (checkMenuFlags()) return true; @@ -4338,33 +4335,32 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ if (num_ejec == 3) y = -1; -comienza: - counter--; + do { + counter--; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - if (num_ejec == 3) - updateScreen(0, 0, 0, y, 320, 200, screenSurface); - else - updateScreen(0, 1, 0, y, 320, 198, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + if (num_ejec == 3) + updateScreen(0, 0, 0, y, 320, 200, screenSurface); + else + updateScreen(0, 1, 0, y, 320, 198, screenSurface); - if (sentido == 0) - y++; - else - y--; + if (sentido == 0) + y++; + else + y--; - if (num_ejec == 3) { - if (y == 1) - sentido = 1; - if (y == -1) - sentido = 0; - } else { - if (y == 2) - sentido = 1; - if (y == 0) - sentido = 0; - } - if (counter > 0) - goto comienza; + if (num_ejec == 3) { + if (y == 1) + sentido = 1; + if (y == -1) + sentido = 0; + } else { + if (y == 2) + sentido = 1; + if (y == 0) + sentido = 0; + } + } while (counter > 0); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); -- cgit v1.2.3 From 6397af21dc2a2452fd6c11da6289f5e95333cef0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 08:14:01 +0000 Subject: diferencia -> difference pos_pixel -> pixelPos hare_se_mueve -> characterMoved pixel_x/pixel_y -> pixelX/pixelY vez() -> getTime() menu_sin_volcar() -> showMenu() Removed unused function codifica() svn-id: r32380 --- engines/drascula/animation.cpp | 32 ++++++------- engines/drascula/drascula.cpp | 104 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 7 ++- engines/drascula/rooms.cpp | 64 ++++++++++++------------- 4 files changed, 101 insertions(+), 106 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 175f502ee2..33648454bd 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -32,7 +32,7 @@ static const int interf_y[] ={ 51, 51, 51, 51, 83, 83, 83 }; void DrasculaEngine::animation_1_1() { int l, l2, p; - int pos_pixel[6]; + int pixelPos[6]; while (term_int == 0) { playMusic(29); @@ -130,19 +130,19 @@ void DrasculaEngine::animation_1_1() { break; l2 = 0; p = 0; - pos_pixel[3] = 45; - pos_pixel[4] = 63; - pos_pixel[5] = 31; + pixelPos[3] = 45; + pixelPos[4] = 63; + pixelPos[5] = 31; for (l = 0; l < 180; l++) { copyBackground(0, 0, 320 - l, 0, l, 200, drawSurface3, screenSurface); copyBackground(l, 0, 0, 0, 320 - l, 200, drawSurface1, screenSurface); - pos_pixel[0] = interf_x[l2]; - pos_pixel[1] = interf_y[l2]; - pos_pixel[2] = 156 - l; + pixelPos[0] = interf_x[l2]; + pixelPos[1] = interf_y[l2]; + pixelPos[2] = 156 - l; - copyRectClip(pos_pixel, drawSurface2, screenSurface); + copyRectClip(pixelPos, drawSurface2, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); p++; if (p == 6) { @@ -1766,7 +1766,7 @@ void DrasculaEngine::animation_6_3() { int yoda_x[] = { 3 ,82, 161, 240, 3, 82 }; int yoda_y[] = { 3, 3, 3, 3, 94, 94 }; - hare_se_mueve = 0; + characterMoved = 0; flags[3] = 1; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1885,7 +1885,7 @@ void DrasculaEngine::animation_1_5() { talk_bj(21); for (;;) { - if (hare_se_mueve == 0) + if (characterMoved == 0) break; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1937,7 +1937,7 @@ void DrasculaEngine::animation_5_5(){ int hueso_x[] = {1, 99, 197, 1, 99, 197, 1, 99, 197}; int hueso_y[] = {1, 1, 1, 66, 66, 66, 131, 131, 131}; int vuela_x[] = {1, 63, 125, 187, 249}; - int pixel_x = hare_x - 53, pixel_y = hare_y - 9; + int pixelX = hare_x - 53, pixelY = hare_y - 9; withoutVerb(); removeObject(8); @@ -1955,8 +1955,8 @@ void DrasculaEngine::animation_5_5(){ for (frame = 0; frame < 9; frame++) { pause(3); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyRect(hueso_x[frame], hueso_y[frame], pixel_x, pixel_y, 97, 64, backSurface, screenSurface); - updateScreen(pixel_x, pixel_y, pixel_x,pixel_y, 97,64, screenSurface); + copyRect(hueso_x[frame], hueso_y[frame], pixelX, pixelY, 97, 64, backSurface, screenSurface); + updateScreen(pixelX, pixelY, pixelX,pixelY, 97,64, screenSurface); } copyBackground(52, 161, 198, 81, 26, 24, drawSurface3, screenSurface); @@ -1965,8 +1965,8 @@ void DrasculaEngine::animation_5_5(){ for (frame = 0; frame < 9; frame++) { pause(3); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyRect(hueso_x[frame], hueso_y[frame], pixel_x, pixel_y, 97, 64, frontSurface, screenSurface); - updateScreen(pixel_x, pixel_y, pixel_x,pixel_y, 97, 64, screenSurface); + copyRect(hueso_x[frame], hueso_y[frame], pixelX, pixelY, 97, 64, frontSurface, screenSurface); + updateScreen(pixelX, pixelY, pixelX,pixelY, 97, 64, screenSurface); } flags[6] = 1; @@ -2168,7 +2168,7 @@ void DrasculaEngine::animation_12_5() { hare_se_ve = 1; clearRoom(); sentido_hare = 1; - hare_se_mueve = 0; + characterMoved = 0; hare_x = -1; objExit = 104; withoutVerb(); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 26761da8d6..e4dfa910b3 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -165,7 +165,7 @@ int DrasculaEngine::go() { takeObject = 0; menuBar = 0; menuScreen = 0; hasName = 0; frame_y = 0; - hare_x = -1; hare_se_mueve = 0; sentido_hare = 3; num_frame = 0; hare_se_ve = 1; + hare_x = -1; characterMoved = 0; sentido_hare = 3; num_frame = 0; hare_se_ve = 1; checkFlags = 1; doBreak = 0; walkToObject = 0; @@ -634,11 +634,11 @@ bool DrasculaEngine::escoba() { } bucles: - if (hare_se_mueve == 0) { + if (characterMoved == 0) { stepX = PASO_HARE_X; stepY = PASO_HARE_Y; } - if (hare_se_mueve == 0 && walkToObject == 1) { + if (characterMoved == 0 && walkToObject == 1) { sentido_hare = sentido_final; walkToObject = 0; } @@ -683,7 +683,7 @@ bucles: } if (button_dch == 1 && menuScreen == 0) { delay(100); - hare_se_mueve = 0; + characterMoved = 0; if (sentido_hare == 2) sentido_hare = 1; if (num_ejec == 4) @@ -1047,7 +1047,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { hare_x = x_alakeva[obj_salir]; hare_y = y_alakeva[obj_salir] - alto_hare; } - hare_se_mueve = 0; + characterMoved = 0; } loadPic(roomDisk); decompressPic(drawSurface3, 1); @@ -1111,7 +1111,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { alto_hare = (CHARACTER_HEIGHT * factor_red[hare_y]) / 100; ancho_hare = (CHARACTER_WIDTH * factor_red[hare_y]) / 100; } - hare_se_mueve = 0; + characterMoved = 0; } if (num_ejec == 2) { @@ -1151,11 +1151,11 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (num_ejec == 2) { if (roomNumber == 9 || roomNumber == 2 || roomNumber == 14 || roomNumber == 18) - conta_blind_vez = vez(); + conta_blind_vez = getTime(); } if (num_ejec == 4) { if (roomNumber == 26) - conta_blind_vez = vez(); + conta_blind_vez = getTime(); } if (num_ejec == 4 && roomNumber == 24 && flags[29] == 1) @@ -1194,7 +1194,7 @@ void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { for (;;) { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (hare_se_mueve == 0) + if (characterMoved == 0) break; } @@ -1223,7 +1223,7 @@ void DrasculaEngine::moveCursor() { if (hasName == 1 && menuScreen == 0) centerText(textName, mouseX, mouseY); if (menuScreen == 1) - menu_sin_volcar(); + showMenu(); else if (menuBar == 1) clearMenu(); @@ -2397,7 +2397,7 @@ void DrasculaEngine::hare_claro() { } void DrasculaEngine::startWalking() { - hare_se_mueve = 1; + characterMoved = 1; stepX = PASO_HARE_X; stepY = PASO_HARE_Y; @@ -2425,25 +2425,25 @@ void DrasculaEngine::startWalking() { else if ((sitio_x > hare_x + ancho_hare / 2) && (sitio_y > (hare_y + alto_hare))) quadrant_4(); else - hare_se_mueve = 0; + characterMoved = 0; } - conta_vez = vez(); + conta_vez = getTime(); } void DrasculaEngine::pon_hare() { int pos_hare[6]; int r; - if (hare_se_mueve == 1 && stepX == PASO_HARE_X) { + if (characterMoved == 1 && stepX == PASO_HARE_X) { for (r = 0; r < stepX; r++) { if (num_ejec != 2) { if (sentido_hare == 0 && sitio_x - r == hare_x + ancho_hare / 2) { - hare_se_mueve = 0; + characterMoved = 0; stepX = PASO_HARE_X; stepY = PASO_HARE_Y; } if (sentido_hare == 1 && sitio_x + r == hare_x + ancho_hare / 2) { - hare_se_mueve = 0; + characterMoved = 0; stepX = PASO_HARE_X; stepY = PASO_HARE_Y; hare_x = sitio_x - ancho_hare / 2; @@ -2451,12 +2451,12 @@ void DrasculaEngine::pon_hare() { } } else if (num_ejec == 2) { if (sentido_hare == 0 && sitio_x - r == hare_x) { - hare_se_mueve = 0; + characterMoved = 0; stepX = PASO_HARE_X; stepY = PASO_HARE_Y; } if (sentido_hare == 1 && sitio_x + r == hare_x + ancho_hare) { - hare_se_mueve = 0; + characterMoved = 0; stepX = PASO_HARE_X; stepY = PASO_HARE_Y; hare_x = sitio_x - ancho_hare + 4; @@ -2465,15 +2465,15 @@ void DrasculaEngine::pon_hare() { } } } - if (hare_se_mueve == 1 && stepY == PASO_HARE_Y) { + if (characterMoved == 1 && stepY == PASO_HARE_Y) { for (r = 0; r < stepY; r++) { if (sentido_hare == 2 && sitio_y - r == hare_y + alto_hare) { - hare_se_mueve = 0; + characterMoved = 0; stepX = PASO_HARE_X; stepY = PASO_HARE_Y; } if (sentido_hare == 3 && sitio_y + r == hare_y + alto_hare) { - hare_se_mueve = 0; + characterMoved = 0; stepX = PASO_HARE_X; stepY = PASO_HARE_Y; } @@ -2487,7 +2487,7 @@ void DrasculaEngine::pon_hare() { } } - if (hare_se_mueve == 0) { + if (characterMoved == 0) { pos_hare[0] = 0; pos_hare[1] = DIF_MASK_HARE; pos_hare[2] = hare_x; @@ -2526,7 +2526,7 @@ void DrasculaEngine::pon_hare() { reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], factor_red[hare_y + alto_hare], frontSurface, screenSurface); } - } else if (hare_se_mueve == 1) { + } else if (characterMoved == 1) { pos_hare[0] = frame_x[num_frame]; pos_hare[1] = frame_y + DIF_MASK_HARE; pos_hare[2] = hare_x; @@ -2568,7 +2568,7 @@ void DrasculaEngine::pon_hare() { } } -void DrasculaEngine::menu_sin_volcar() { +void DrasculaEngine::showMenu() { int h, n, x; char texto_icono[13]; @@ -2639,7 +2639,7 @@ bool DrasculaEngine::exitRoom(int l) { sentido_hare = sentidobj[l]; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - hare_se_mueve = 0; + characterMoved = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; @@ -2660,7 +2660,7 @@ bool DrasculaEngine::exitRoom(int l) { updateDoor(l); if (isDoor[l] != 0) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); - hare_se_mueve = 0; + characterMoved = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; @@ -2696,7 +2696,7 @@ bool DrasculaEngine::exitRoom(int l) { sentido_hare = sentidobj[l]; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - hare_se_mueve = 0; + characterMoved = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; @@ -2714,7 +2714,7 @@ bool DrasculaEngine::exitRoom(int l) { sentido_hare = sentidobj[l]; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - hare_se_mueve = 0; + characterMoved = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; @@ -2735,7 +2735,7 @@ bool DrasculaEngine::exitRoom(int l) { sentido_hare = sentidobj[l]; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - hare_se_mueve = 0; + characterMoved = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; @@ -2754,7 +2754,7 @@ bool DrasculaEngine::exitRoom(int l) { sentido_hare = sentidobj[l]; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - hare_se_mueve = 0; + characterMoved = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; @@ -2779,7 +2779,7 @@ bool DrasculaEngine::pickupObject() { checkFlags = 1; updateRoom(); - menu_sin_volcar(); + showMenu(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); // Objects with an ID smaller than 7 are the inventory verbs @@ -2805,7 +2805,7 @@ bool DrasculaEngine::pickupObject() { } bool DrasculaEngine::checkFlag(int fl) { - hare_se_mueve = 0; + characterMoved = 0; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -3494,15 +3494,15 @@ void DrasculaEngine::WaitForNext(int FPS) { _system->delayMillis(1000 / FPS); } -int DrasculaEngine::vez() { +int DrasculaEngine::getTime() { return _system->getMillis() / 20; // originaly was 1 } void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int width, int height, int factor, byte *dir_inicio, byte *dir_fin) { float totalX, totalY; int n, m; - float pixel_x, pixel_y; - int pos_pixel[6]; + float pixelX, pixelY; + int pixelPos[6]; newWidth = (width * factor) / 100; newHeight = (height * factor) / 100; @@ -3510,31 +3510,27 @@ void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int w totalX = width / newWidth; totalY = height / newHeight; - pixel_x = xx1; - pixel_y = yy1; + pixelX = xx1; + pixelY = yy1; for (n = 0; n < newHeight; n++) { for (m = 0; m < newWidth; m++) { - pos_pixel[0] = (int)pixel_x; - pos_pixel[1] = (int)pixel_y; - pos_pixel[2] = xx2 + m; - pos_pixel[3] = yy2 + n; - pos_pixel[4] = 1; - pos_pixel[5] = 1; + pixelPos[0] = (int)pixelX; + pixelPos[1] = (int)pixelY; + pixelPos[2] = xx2 + m; + pixelPos[3] = yy2 + n; + pixelPos[4] = 1; + pixelPos[5] = 1; - copyRectClip(pos_pixel, dir_inicio, dir_fin); + copyRectClip(pixelPos, dir_inicio, dir_fin); - pixel_x = pixel_x + totalX; + pixelX = pixelX + totalX; } - pixel_x = xx1; - pixel_y = pixel_y + totalY; + pixelX = xx1; + pixelY = pixelY + totalY; } } -char DrasculaEngine::codifica(char car) { - return ~car; -} - void DrasculaEngine::quadrant_1() { float distance_x, distance_y; @@ -3651,10 +3647,10 @@ void DrasculaEngine::saveGame(char gameName[]) { } void DrasculaEngine::increaseFrameNum() { - diff_vez = vez() - conta_vez; + diff_vez = getTime() - conta_vez; if (diff_vez >= 6) { - conta_vez = vez(); + conta_vez = getTime(); num_frame++; if (num_frame == 6) num_frame = 0; @@ -4463,7 +4459,7 @@ void DrasculaEngine::activatePendulum() { copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); - conta_blind_vez = vez(); + conta_blind_vez = getTime(); } void DrasculaEngine::closeDoor(int nflag, int doorNum) { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index e89fdf1123..6db70333bc 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -311,7 +311,7 @@ public: int flags[NUM_FLAGS]; int frame_y; - int hare_x, hare_y, hare_se_mueve, direccion_hare, sentido_hare, num_frame, hare_se_ve; + int hare_x, hare_y, characterMoved, direccion_hare, sentido_hare, num_frame, hare_se_ve; int sitio_x, sitio_y, checkFlags; int doBreak; int stepX, stepY; @@ -523,7 +523,7 @@ public: void updateRefresh(); void updateRefresh_pre(); void pon_hare(); - void menu_sin_volcar(); + void showMenu(); void clearMenu(); void removeObject(); bool exitRoom(int); @@ -564,9 +564,8 @@ public: byte *loadPCX(byte *NamePcc); void set_dac(byte *dac); void WaitForNext(int FPS); - int vez(); + int getTime(); void reduce_hare_chico(int, int, int, int, int, int, int, byte *, byte *); - char codifica(char); void quadrant_1(); void quadrant_2(); void quadrant_3(); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 0fdd0ed4e9..c569efd065 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1469,7 +1469,7 @@ void DrasculaEngine::update_1_pre() { void DrasculaEngine::update_2(){ int pos_murci[6]; - int diferencia; + int difference; int murci_x[] = {0, 38, 76, 114, 152, 190, 228, 266, 0, 38, 76, 114, 152, 190, 228, 266, 0, 38, 76, 114, 152, 190, @@ -1507,10 +1507,10 @@ void DrasculaEngine::update_2(){ pos_murci[3] = 19; copyRectClip(pos_murci, drawSurface3, screenSurface); - diferencia = vez() - conta_blind_vez; - if (diferencia >= 6) { + difference = getTime() - conta_blind_vez; + if (difference >= 6) { frame_bat++; - conta_blind_vez = vez(); + conta_blind_vez = getTime(); } copyRect(29, 37, 58, 114, 57, 39, drawSurface3, screenSurface); @@ -1580,14 +1580,14 @@ void DrasculaEngine::update_7_pre() { void DrasculaEngine::update_9_pre() { int blind_x[] = {26, 68, 110, 152, 194, 236, 278, 26, 68}; int blind_y[] = {51, 51, 51, 51, 51, 51, 51, 127, 127}; - int diferencia; + int difference; copyRect(blind_x[frame_blind], blind_y[frame_blind], 122, 57, 41, 72, drawSurface3, screenSurface); if (flags[9] == 0) { - diferencia = vez() - conta_blind_vez; - if (diferencia >= 11) { + difference = getTime() - conta_blind_vez; + if (difference >= 11) { frame_blind++; - conta_blind_vez = vez(); + conta_blind_vez = getTime(); } if (frame_blind == 9) frame_blind = 0; @@ -1615,7 +1615,7 @@ void DrasculaEngine::update_14_pre() { int cirio_x[] = {14, 19, 24}; int pianista_x[] = {1, 91, 61, 31, 91, 31, 1, 61, 31}; int drunk_x[] = {1, 42, 83, 124, 165, 206, 247, 1}; - int diferencia; + int difference; copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, drawSurface3, screenSurface); copyBackground(cirio_x[frame_velas], 146, 311, 80, 4, 8, drawSurface3, screenSurface); @@ -1633,8 +1633,8 @@ void DrasculaEngine::update_14_pre() { if (flags[12] == 1) copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); - diferencia = vez() - conta_blind_vez; - if (diferencia > 6) { + difference = getTime() - conta_blind_vez; + if (difference > 6) { if (flags[12] == 1) { frame_drunk++; if (frame_drunk == 8) { @@ -1651,7 +1651,7 @@ void DrasculaEngine::update_14_pre() { if (frame_piano == 9) frame_piano = 0; blinking = _rnd->getRandomNumber(10); - conta_blind_vez = vez(); + conta_blind_vez = getTime(); } } @@ -1676,7 +1676,7 @@ void DrasculaEngine::update_17() { } void DrasculaEngine::update_18_pre() { - int diferencia; + int difference; int snore_x[] = {95, 136, 95, 136, 95, 95, 95, 95, 136, 95, 95, 95, 95, 95, 95, 95}; int snore_y[] = {18, 18, 56, 56, 94, 94, 94, 94, 94, 18, 18, 18, 18, 18, 18, 18}; @@ -1686,12 +1686,12 @@ void DrasculaEngine::update_18_pre() { } else pon_vb(); - diferencia = vez() - conta_blind_vez; - if (diferencia > 9) { + difference = getTime() - conta_blind_vez; + if (difference > 9) { frame_snore++; if (frame_snore == 16) frame_snore = 0; - conta_blind_vez = vez(); + conta_blind_vez = getTime(); } } @@ -1746,7 +1746,7 @@ void DrasculaEngine::update_24_pre() { } void DrasculaEngine::update_26_pre() { - int diferencia; + int difference; if (flags[2] == 1) copyBackground(1, 130, 87, 44, 50, 69, drawSurface3, screenSurface); @@ -1760,10 +1760,10 @@ void DrasculaEngine::update_26_pre() { if (blinking == 5 && flags[18] == 0) copyBackground(52, 172, 226, 106, 3, 4, drawSurface3, screenSurface); - diferencia = vez() - conta_blind_vez; - if (diferencia >= 10) { + difference = getTime() - conta_blind_vez; + if (difference >= 10) { blinking = _rnd->getRandomNumber(10); - conta_blind_vez = vez(); + conta_blind_vez = getTime(); } if (flags[20] == 1) @@ -1916,7 +1916,7 @@ void DrasculaEngine::update_59_pre() { void DrasculaEngine::update_60_pre() { int velas_y[] = {158, 172, 186}; - int diferencia; + int difference; if (flags[5] == 0) placeDrascula(); @@ -1926,17 +1926,17 @@ void DrasculaEngine::update_60_pre() { if (flag_tv == 1) copyBackground(114, 158, 8, 30, 8, 23, drawSurface3, screenSurface); - diferencia = vez() - conta_blind_vez; + difference = getTime() - conta_blind_vez; blinking = _rnd->getRandomNumber(7); if (blinking == 5 && flag_tv == 0) flag_tv = 1; else if (blinking == 5 && flag_tv == 1) flag_tv = 0; - if (diferencia > 6) { + if (difference > 6) { frame_velas++; if (frame_velas == 3) frame_velas = 0; - conta_blind_vez = vez(); + conta_blind_vez = getTime(); } } @@ -1954,7 +1954,7 @@ void DrasculaEngine::update_62_pre() { int cirio_x[] = { 14, 19, 24 }; int pianista_x[] = {1, 91, 61, 31, 91, 31, 1, 61, 31 }; int drunk_x[] = {1, 42, 83, 124, 165, 206, 247, 1 }; - int diferencia; + int difference; copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, drawSurface3, screenSurface); copyBackground(cirio_x[frame_velas], 146, 311, 80, 4, 8, drawSurface3, screenSurface); @@ -1975,8 +1975,8 @@ void DrasculaEngine::update_62_pre() { if (flags[12] == 1) copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); - diferencia = vez() - conta_blind_vez; - if (diferencia > 6) { + difference = getTime() - conta_blind_vez; + if (difference > 6) { if (flags[12] == 1) { frame_drunk++; if (frame_drunk == 8) { @@ -1993,7 +1993,7 @@ void DrasculaEngine::update_62_pre() { if (frame_piano == 9) frame_piano = 0; blinking = _rnd->getRandomNumber(10); - conta_blind_vez = vez(); + conta_blind_vez = getTime(); } } @@ -2014,7 +2014,7 @@ void DrasculaEngine::update_63() { void DrasculaEngine::update_pendulum() { int pendulum_x[] = {40, 96, 152, 208, 264, 40, 96, 152, 208, 208, 152, 264, 40, 96, 152, 208, 264}; - int diferencia; + int difference; if (frame_pen <= 4) pendulumSurface = drawSurface3; @@ -2031,12 +2031,12 @@ void DrasculaEngine::update_pendulum() { if (flags[1] == 0) copyRect(44, 145, 145, 105, 25, 29, drawSurface3, screenSurface); - diferencia = vez() - conta_blind_vez; - if (diferencia > 8) { + difference = getTime() - conta_blind_vez; + if (difference > 8) { frame_pen++; if (frame_pen == 17) frame_pen = 0; - conta_blind_vez = vez(); + conta_blind_vez = getTime(); } } -- cgit v1.2.3 From 54a28afe0c269ccabcafd19c6b40e8bffa41e1be Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 08:28:54 +0000 Subject: cara -> face componente -> component palFondo -> bgPalette Capitalization svn-id: r32381 --- engines/drascula/animation.cpp | 44 +++++------ engines/drascula/drascula.cpp | 68 ++++++++-------- engines/drascula/drascula.h | 4 +- engines/drascula/talk.cpp | 176 ++++++++++++++++++++--------------------- 4 files changed, 146 insertions(+), 146 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 33648454bd..67cc30c60d 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -378,7 +378,7 @@ void DrasculaEngine::animation_1_1() { void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { int x_talk[4] = {47, 93, 139, 185}; - int cara; + int face; int l = 0; int length = strlen(said); @@ -399,10 +399,10 @@ void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(3); + face = _rnd->getRandomNumber(3); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); copyBackground(interf_x[l] + 24, interf_y[l], 0, 45, 39, 31, drawSurface2, screenSurface); - copyBackground(x_talk[cara], 1, 171, 68, 45, 48, drawSurface2, screenSurface); + copyBackground(x_talk[face], 1, 171, 68, 45, 48, drawSurface2, screenSurface); l++; if (l == 7) l = 0; @@ -2061,16 +2061,16 @@ void DrasculaEngine::animation_11_5() { } void DrasculaEngine::animation_12_5() { - DacPalette256 palFondo1; - DacPalette256 palFondo2; - DacPalette256 palFondo3; + DacPalette256 bgPalette1; + DacPalette256 bgPalette2; + DacPalette256 bgPalette3; int frame; const int rayo_x[] = {1, 46, 91, 136, 181, 226, 271, 181}; const int frusky_x[] = {100, 139, 178, 217, 100, 178, 217, 139, 100, 139}; const int elfrusky_x[] = {1, 68, 135, 1, 68, 135, 1, 68, 135, 68, 1, 135, 68, 135, 68}; //const int humo_x[] = {1, 29, 57, 85, 113, 141, 169, 197, 225}; - int color, componente; + int color, component; char fundido; playMusic(26); @@ -2087,28 +2087,28 @@ void DrasculaEngine::animation_12_5() { hare_oscuro(); for (color = 0; color < 255; color++) - for (componente = 0; componente < 3; componente++) { - palFondo1[color][componente] = gamePalette[color][componente]; - palFondo2[color][componente] = gamePalette[color][componente]; - palFondo3[color][componente] = gamePalette[color][componente]; + for (component = 0; component < 3; component++) { + bgPalette1[color][component] = gamePalette[color][component]; + bgPalette2[color][component] = gamePalette[color][component]; + bgPalette3[color][component] = gamePalette[color][component]; } for (fundido = 1; fundido >= 0; fundido--) { for (color = 0; color < 128; color++) - for (componente = 0; componente < 3; componente++) - palFondo1[color][componente] = LimitaVGA(palFondo1[color][componente] - 8 + fundido); + for (component = 0; component < 3; component++) + bgPalette1[color][component] = LimitaVGA(bgPalette1[color][component] - 8 + fundido); } for (fundido = 2; fundido >= 0; fundido--) { for (color = 0; color < 128; color++) - for (componente = 0; componente < 3; componente++) - palFondo2[color][componente] = LimitaVGA(palFondo2[color][componente] - 8 + fundido); + for (component = 0; component < 3; component++) + bgPalette2[color][component] = LimitaVGA(bgPalette2[color][component] - 8 + fundido); } for (fundido = 3; fundido >= 0; fundido--) { for (color = 0; color < 128; color++) - for (componente = 0; componente < 3; componente++) - palFondo3[color][componente] = LimitaVGA(palFondo3[color][componente] - 8 + fundido); + for (component = 0; component < 3; component++) + bgPalette3[color][component] = LimitaVGA(bgPalette3[color][component] - 8 + fundido); } loadPic("3an11_1.alg"); @@ -2116,11 +2116,11 @@ void DrasculaEngine::animation_12_5() { for (frame = 0; frame < 8; frame++) { if (frame == 2 || frame == 4 || frame == 8 || frame==10) - setPalette((byte *)&palFondo1); + setPalette((byte *)&bgPalette1); else if (frame == 1 || frame == 5 || frame == 7 || frame == 9) - setPalette((byte *)&palFondo2); + setPalette((byte *)&bgPalette2); else - setPalette((byte *)&palFondo3); + setPalette((byte *)&bgPalette3); pause(4); updateRoom(); @@ -2133,11 +2133,11 @@ void DrasculaEngine::animation_12_5() { for (frame = 0; frame < 15; frame++) { if (frame == 2 || frame == 4 || frame == 7 || frame == 9) - setPalette((byte *)&palFondo1); + setPalette((byte *)&bgPalette1); else if (frame == 1 || frame == 5) setPalette((byte *)&gamePalette); else - setPalette((byte *)&palFondo2); + setPalette((byte *)&bgPalette2); pause(4); updateRoom(); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index e4dfa910b3..f4c66cb597 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -364,19 +364,19 @@ void DrasculaEngine::decompressPic(byte *dir_escritura, int plt) { } void DrasculaEngine::paleta_hare() { - int color, componente; + int color, component; for (color = 235; color < 253; color++) - for (componente = 0; componente < 3; componente++) - palHare[color][componente] = gamePalette[color][componente]; + for (component = 0; component < 3; component++) + palHare[color][component] = gamePalette[color][component]; } void DrasculaEngine::hare_oscuro() { - int color, componente; + int color, component; for (color = 235; color < 253; color++ ) - for (componente = 0; componente < 3; componente++) - gamePalette[color][componente] = palHareOscuro[color][componente]; + for (component = 0; component < 3; component++) + gamePalette[color][component] = palHareOscuro[color][component]; updatePalette(); } @@ -393,12 +393,12 @@ void DrasculaEngine::setRGB(byte *dir_lectura, int plt) { } void DrasculaEngine::black() { - int color, componente; + int color, component; DacPalette256 palNegra; for (color = 0; color < 256; color++) - for (componente = 0; componente < 3; componente++) - palNegra[color][componente] = 0; + for (component = 0; component < 3; component++) + palNegra[color][component] = 0; palNegra[254][0] = 0x3F; palNegra[254][1] = 0x3F; @@ -1909,8 +1909,8 @@ void DrasculaEngine::screenSaver() { } void DrasculaEngine::fliplay(const char *filefli, int vel) { - OpenSSN(filefli, vel); - while (PlayFrameSSN() && (!term_int)) { + openSSN(filefli, vel); + while (playFrameSSN() && (!term_int)) { if (getScan() == Common::KEYCODE_ESCAPE) term_int = 1; } @@ -1919,14 +1919,14 @@ void DrasculaEngine::fliplay(const char *filefli, int vel) { void DrasculaEngine::fadeFromBlack(int VelocidadDeFundido) { char fundido; - unsigned int color, componente; + unsigned int color, component; DacPalette256 palFundido; for (fundido = 0; fundido < 64; fundido++) { for (color = 0; color < 256; color++) { - for (componente = 0; componente < 3; componente++) { - palFundido[color][componente] = LimitaVGA(gamePalette[color][componente] - 63 + fundido); + for (component = 0; component < 3; component++) { + palFundido[color][component] = LimitaVGA(gamePalette[color][component] - 63 + fundido); } } pause(VelocidadDeFundido); @@ -2105,14 +2105,14 @@ void DrasculaEngine::animastopSound_corte() { void DrasculaEngine::fadeToBlack(int VelocidadDeFundido) { char fundido; - unsigned int color, componente; + unsigned int color, component; DacPalette256 palFundido; for (fundido = 63; fundido >= 0; fundido--) { for (color = 0; color < 256; color++) { - for (componente = 0; componente < 3; componente++) { - palFundido[color][componente] = LimitaVGA(gamePalette[color][componente] - 63 + fundido); + for (component = 0; component < 3; component++) { + palFundido[color][component] = LimitaVGA(gamePalette[color][component] - 63 + fundido); } } pause(VelocidadDeFundido); @@ -2343,11 +2343,11 @@ void DrasculaEngine::updateDoor(int doorNum) { } void DrasculaEngine::color_hare() { - int color, componente; + int color, component; for (color = 235; color < 253; color++) { - for (componente = 0; componente < 3; componente++) { - gamePalette[color][componente] = palHare[color][componente]; + for (component = 0; component < 3; component++) { + gamePalette[color][component] = palHare[color][component]; } } updatePalette(); @@ -2355,12 +2355,12 @@ void DrasculaEngine::color_hare() { void DrasculaEngine::funde_hare(int oscuridad) { char fundido; - unsigned int color, componente; + unsigned int color, component; for (fundido = oscuridad; fundido >= 0; fundido--) { for (color = 235; color < 253; color++) { - for (componente = 0; componente < 3; componente++) - gamePalette[color][componente] = LimitaVGA(gamePalette[color][componente] - 8 + fundido); + for (component = 0; component < 3; component++) + gamePalette[color][component] = LimitaVGA(gamePalette[color][component] - 8 + fundido); } } @@ -2368,29 +2368,29 @@ void DrasculaEngine::funde_hare(int oscuridad) { } void DrasculaEngine::paleta_hare_claro() { - int color, componente; + int color, component; for (color = 235; color < 253; color++) { - for (componente = 0; componente < 3; componente++) - palHareClaro[color][componente] = gamePalette[color][componente]; + for (component = 0; component < 3; component++) + palHareClaro[color][component] = gamePalette[color][component]; } } void DrasculaEngine::paleta_hare_oscuro() { - int color, componente; + int color, component; for (color = 235; color < 253; color++) { - for (componente = 0; componente < 3; componente++) - palHareOscuro[color][componente] = gamePalette[color][componente]; + for (component = 0; component < 3; component++) + palHareOscuro[color][component] = gamePalette[color][component]; } } void DrasculaEngine::hare_claro() { - int color, componente; + int color, component; for (color = 235; color < 253; color++) { - for (componente = 0; componente < 3; componente++) - gamePalette[color][componente] = palHareClaro[color][componente]; + for (component = 0; component < 3; component++) + gamePalette[color][component] = palHareClaro[color][component]; } updatePalette(); @@ -3276,7 +3276,7 @@ void DrasculaEngine::para_grabar(char gameName[]) { stopSound(); } -void DrasculaEngine::OpenSSN(const char *Name, int Pause) { +void DrasculaEngine::openSSN(const char *Name, int Pause) { MiVideoSSN = (byte *)malloc(64256); globalSpeed = 1000 / Pause; FrameSSN = 0; @@ -3289,7 +3289,7 @@ void DrasculaEngine::OpenSSN(const char *Name, int Pause) { LastFrame = _system->getMillis(); } -int DrasculaEngine::PlayFrameSSN() { +int DrasculaEngine::playFrameSSN() { int Exit = 0; int Lengt; byte *BufferSSN; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 6db70333bc..adddf43de6 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -533,7 +533,7 @@ public: void enterName(); void para_grabar(char[]); int LookForFree(); - void OpenSSN(const char *Name, int Pause); + void openSSN(const char *Name, int Pause); void WaitFrameSSN(); void MixVideo(byte *OldScreen, byte *NewScreen); void Des_RLE(byte *BufferRLE, byte *MiVideoRLE); @@ -541,7 +541,7 @@ public: void set_dacSSN(byte *dacSSN); byte *TryInMem(Common::File *Session); void EndSSN(); - int PlayFrameSSN(); + int playFrameSSN(); byte *AuxBuffOrg; byte *AuxBuffLast; diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 81341a3153..fa0efca481 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -48,7 +48,7 @@ void DrasculaEngine::talk_igor_dch(int index) { void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { int x_talk[8] = { 56, 82, 108, 134, 160, 186, 212, 238 }; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -59,7 +59,7 @@ void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(7); + face = _rnd->getRandomNumber(7); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -69,7 +69,7 @@ bucless: placeDrascula(); copyBackground(x_igor + 17, y_igor, x_igor + 17, y_igor, 37, 24, drawSurface1, screenSurface); - copyRect(x_talk[cara], 148, x_igor + 17, y_igor, 25, 24, frontSurface, screenSurface); + copyRect(x_talk[face], 148, x_igor + 17, y_igor, 25, 24, frontSurface, screenSurface); updateRefresh(); @@ -110,7 +110,7 @@ void DrasculaEngine::talk_dr_izq(int index) { void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 }; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -121,7 +121,7 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(7); + face = _rnd->getRandomNumber(7); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -134,9 +134,9 @@ bucless: copyBackground(x_dr, y_dr, x_dr, y_dr, 38, 31, drawSurface1, screenSurface); if (num_ejec == 6) - copyRect(x_talk[cara], 90, x_dr, y_dr, 38, 31, drawSurface2, screenSurface); + copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, drawSurface2, screenSurface); else - copyRect(x_talk[cara], 90, x_dr, y_dr, 38, 31, backSurface, screenSurface); + copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, backSurface, screenSurface); updateRefresh(); @@ -178,7 +178,7 @@ void DrasculaEngine::talk_dr_dch(int index) { void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 }; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -189,7 +189,7 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(7); + face = _rnd->getRandomNumber(7); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); @@ -201,9 +201,9 @@ bucless: copyBackground(x_dr, y_dr, x_dr, y_dr, 45, 31, drawSurface1, screenSurface); if (num_ejec != 6) - copyRect(x_talk[cara], 58, x_dr + 7, y_dr, 38, 31, backSurface, screenSurface); + copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, backSurface, screenSurface); else - copyRect(x_talk[cara], 58, x_dr + 7, y_dr, 38, 31, drawSurface2, screenSurface); + copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, drawSurface2, screenSurface); updateRefresh(); @@ -292,7 +292,7 @@ bucless: void DrasculaEngine::talk_igor_frente(const char *said, const char *filename) { int x_talk[8] = { 56, 86, 116, 146, 176, 206, 236, 266 }; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -303,7 +303,7 @@ void DrasculaEngine::talk_igor_frente(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(7); + face = _rnd->getRandomNumber(7); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -315,7 +315,7 @@ bucless: placeDrascula(); if (num_ejec == 1 || num_ejec == 6) copyBackground(x_igor, y_igor, x_igor, y_igor, 29, 25, drawSurface1, screenSurface); - copyRect(x_talk[cara], 173, x_igor, y_igor, 29, 25, frontSurface, screenSurface); + copyRect(x_talk[face], 173, x_igor, y_igor, 29, 25, frontSurface, screenSurface); updateRefresh(); @@ -363,7 +363,7 @@ void DrasculaEngine::talk_tabernero(int index) { void DrasculaEngine::talk_tabernero(const char *said, const char *filename) { int x_talk[9] = { 1, 23, 45, 67, 89, 111, 133, 155, 177 }; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -382,13 +382,13 @@ bucless: playMusic(roomMusic); } - cara = _rnd->getRandomNumber(8); + face = _rnd->getRandomNumber(8); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 2, 121, 44, 21, 24, extraSurface, screenSurface); + copyBackground(x_talk[face], 2, 121, 44, 21, 24, extraSurface, screenSurface); pon_hare(); updateRefresh(); @@ -425,7 +425,7 @@ void DrasculaEngine::talk_bj(int index) { void DrasculaEngine::talk_bj(const char *said, const char *filename) { int x_talk[5] = { 64, 92, 120, 148, 176 }; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -436,7 +436,7 @@ void DrasculaEngine::talk_bj(const char *said, const char *filename) { bucless: if (num_ejec != 5) { - cara = _rnd->getRandomNumber(4); + face = _rnd->getRandomNumber(4); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -445,7 +445,7 @@ bucless: copyBackground(x_bj + 2, y_bj - 1, x_bj + 2, y_bj - 1, 27, 40, drawSurface1, screenSurface); - copyRect(x_talk[cara], 99, x_bj + 2, y_bj - 1, 27, 40, + copyRect(x_talk[face], 99, x_bj + 2, y_bj - 1, 27, 40, drawSurface3, screenSurface); pon_hare(); updateRefresh(); @@ -500,7 +500,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { int y_mask_talk = 170; int x_talk_dch[6] = { 1, 25, 49, 73, 97, 121 }; int x_talk_izq[6] = { 145, 169, 193, 217, 241, 265 }; - int cara; + int face; int length = strlen(said); if (num_ejec == 6) { @@ -533,7 +533,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(5); + face = _rnd->getRandomNumber(5); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -558,38 +558,38 @@ bucless: if (sentido_hare == 0) { if (num_ejec == 2) - copyRect(x_talk_izq[cara], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, + copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, extraSurface, screenSurface); else - reduce_hare_chico(x_talk_izq[cara], y_mask_talk, hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), + reduce_hare_chico(x_talk_izq[face], y_mask_talk, hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 1) { if (num_ejec == 2) - copyRect(x_talk_dch[cara], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, + copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, extraSurface, screenSurface); else - reduce_hare_chico(x_talk_dch[cara], y_mask_talk, hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), + reduce_hare_chico(x_talk_dch[face], y_mask_talk, hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 2) { if (num_ejec == 2) - copyRect(x_talk_izq[cara], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, + copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); else - reduce_hare_chico(x_talk_izq[cara], y_mask_talk, + reduce_hare_chico(x_talk_izq[face], y_mask_talk, suma_1_pixel + hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 3) { if (num_ejec == 2) - copyRect(x_talk_dch[cara], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, + copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); else - reduce_hare_chico(x_talk_dch[cara], y_mask_talk, + reduce_hare_chico(x_talk_dch[face], y_mask_talk, suma_1_pixel + hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk,alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); @@ -631,7 +631,7 @@ bucless: void DrasculaEngine::talk_pianista(const char *said, const char *filename) { int x_talk[4] = { 97, 145, 193, 241 }; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -642,13 +642,13 @@ void DrasculaEngine::talk_pianista(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(3); + face = _rnd->getRandomNumber(3); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 139, 228, 112, 47, 60, + copyBackground(x_talk[face], 139, 228, 112, 47, 60, extraSurface, screenSurface); pon_hare(); updateRefresh(); @@ -681,7 +681,7 @@ bucless: void DrasculaEngine::talk_drunk(const char *said, const char *filename) { int x_talk[8] = { 1, 21, 41, 61, 81, 101, 121, 141 }; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -707,13 +707,13 @@ bebiendo: bucless: - cara = _rnd->getRandomNumber(7); + face = _rnd->getRandomNumber(7); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 29, 177, 50, 19, 19, frontSurface, screenSurface); + copyBackground(x_talk[face], 29, 177, 50, 19, 19, frontSurface, screenSurface); pon_hare(); updateRefresh(); @@ -765,7 +765,7 @@ void DrasculaEngine::talk_vb(int index) { void DrasculaEngine::talk_vb(const char *said, const char *filename) { int x_talk[6] = {1, 27, 53, 79, 105, 131}; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -779,14 +779,14 @@ void DrasculaEngine::talk_vb(const char *said, const char *filename) { bucless: if (sentido_vb == 1) { - cara = _rnd->getRandomNumber(5); + face = _rnd->getRandomNumber(5); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); pon_hare(); pon_vb(); copyBackground(OBJWIDTH + 1, 0, vb_x + 5, 64, 25, 27, drawSurface3, screenSurface); - copyRect(x_talk[cara], 34, vb_x + 5, 64, 25, 27, frontSurface, screenSurface); + copyRect(x_talk[face], 34, vb_x + 5, 64, 25, 27, frontSurface, screenSurface); updateRefresh(); } @@ -969,7 +969,7 @@ bucless: void DrasculaEngine::talk_wolf(const char *said, const char *filename) { int x_talk[9] = {52, 79, 106, 133, 160, 187, 214, 241, 268}; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -980,13 +980,13 @@ void DrasculaEngine::talk_wolf(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(8); + face = _rnd->getRandomNumber(8); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 136, 198, 81, 26, 24, drawSurface3, screenSurface); + copyBackground(x_talk[face], 136, 198, 81, 26, 24, drawSurface3, screenSurface); pon_hare(); updateRefresh(); @@ -1018,7 +1018,7 @@ bucless: void DrasculaEngine::talk_mus(const char *said, const char *filename) { int x_talk[8] = { 16, 35, 54, 73, 92, 111, 130, 149}; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1029,13 +1029,13 @@ void DrasculaEngine::talk_mus(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(7); + face = _rnd->getRandomNumber(7); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 156, 190, 64, 18, 24, drawSurface3, screenSurface); + copyBackground(x_talk[face], 156, 190, 64, 18, 24, drawSurface3, screenSurface); pon_hare(); updateRefresh(); @@ -1067,7 +1067,7 @@ bucless: void DrasculaEngine::talk_pen(const char *said, const char *filename) { int x_talk[8] = {112, 138, 164, 190, 216, 242, 268, 294}; - int cara; + int face; int length = strlen(said); flags[1] = 1; @@ -1084,13 +1084,13 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(7); + face = _rnd->getRandomNumber(7); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(x_talk[cara], 145, 145, 105, 25, 29, drawSurface3, screenSurface); + copyRect(x_talk[face], 145, 145, 105, 25, 29, drawSurface3, screenSurface); updateRefresh(); @@ -1124,7 +1124,7 @@ bucless: void DrasculaEngine::talk_pen2(const char *said, const char *filename) { int x_talk[5]={122, 148, 174, 200, 226}; - int cara; + int face; int length = strlen(said); flags[1] = 1; @@ -1137,13 +1137,13 @@ void DrasculaEngine::talk_pen2(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(4); + face = _rnd->getRandomNumber(4); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 171, 173, 116, 25, 28, drawSurface3, screenSurface); + copyBackground(x_talk[face], 171, 173, 116, 25, 28, drawSurface3, screenSurface); updateRefresh(); @@ -1177,7 +1177,7 @@ bucless: void DrasculaEngine::talk_taber2(const char *said, const char *filename) { int x_talk[6] = {1, 23, 45, 67, 89, 111}; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1188,13 +1188,13 @@ void DrasculaEngine::talk_taber2(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(5); + face = _rnd->getRandomNumber(5); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 130, 151, 43, 21, 24, drawSurface3, screenSurface); + copyBackground(x_talk[face], 130, 151, 43, 21, 24, drawSurface3, screenSurface); pon_hare(); updateRefresh(); @@ -1232,7 +1232,7 @@ void DrasculaEngine::talk_bj_bed(int index) { void DrasculaEngine::talk_bj_bed(const char *said, const char *filename) { int x_talk[5] = {51, 101, 151, 201, 251}; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1243,14 +1243,14 @@ void DrasculaEngine::talk_bj_bed(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(4); + face = _rnd->getRandomNumber(4); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); copyBackground(65, 103, 65, 103, 49, 38, drawSurface1, screenSurface); - copyRect(x_talk[cara], 105, 65, 103, 49, 38, drawSurface3, screenSurface); + copyRect(x_talk[face], 105, 65, 103, 49, 38, drawSurface3, screenSurface); pon_hare(); updateRefresh(); @@ -1282,7 +1282,7 @@ bucless: void DrasculaEngine::talk_htel(const char *said, const char *filename) { char *num_cara; int x_talk[3] = {1, 94, 187}; - int cara, pantalla; + int face, pantalla; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1293,10 +1293,10 @@ void DrasculaEngine::talk_htel(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(2); + face = _rnd->getRandomNumber(2); pantalla = _rnd->getRandomNumber(2); - if (cara == 0 && pantalla == 0) + if (face == 0 && pantalla == 0) num_cara = (char *)drawSurface3; else if (pantalla == 1) num_cara = (char *)frontSurface; @@ -1305,7 +1305,7 @@ bucless: copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(x_talk[cara], 1, 45, 24, 92, 108, (byte *)num_cara, screenSurface); + copyBackground(x_talk[face], 1, 45, 24, 92, 108, (byte *)num_cara, screenSurface); if (withVoices == 0) centerText(said, 90, 50); @@ -1337,7 +1337,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha int y_mask_talk = 170; int x_talk_dch[6] = {1, 25, 49, 73, 97, 121}; int x_talk_izq[6] = {145, 169, 193, 217, 241, 265}; - int p, cara = 0; + int p, face = 0; int length = strlen(said); color_abc(kColorYellow); @@ -1354,21 +1354,21 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha bucless: if (sincronia[p] == '0') - cara = 0; + face = 0; if (sincronia[p] == '1') - cara = 1; + face = 1; if (sincronia[p] == '2') - cara = 2; + face = 2; if (sincronia[p] == '3') - cara = 3; + face = 3; if (sincronia[p] == '4') - cara = 4; + face = 4; if (sincronia[p] == '5') - cara = 5; + face = 5; if (sincronia[p] == '6') - cara = 6; + face = 6; if (sincronia[p] == '7') - cara = 7; + face = 7; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -1388,31 +1388,31 @@ bucless: if (sentido_hare == 0) { if (num_ejec == 2) - copyRect(x_talk_izq[cara], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, extraSurface, screenSurface); + copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, extraSurface, screenSurface); else - reduce_hare_chico(x_talk_izq[cara], y_mask_talk, (int)(hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), + reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 1) { if (num_ejec == 2) - copyRect(x_talk_dch[cara], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, extraSurface, screenSurface); + copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, extraSurface, screenSurface); else - reduce_hare_chico(x_talk_dch[cara], y_mask_talk, (int)(hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), + reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 2) { if (num_ejec == 2) - copyRect(x_talk_izq[cara], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); + copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); else - reduce_hare_chico(x_talk_izq[cara], y_mask_talk, + reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(suma_1_pixel + hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 3) { if (num_ejec == 2) - copyRect(x_talk_dch[cara], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); + copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); else - reduce_hare_chico(x_talk_dch[cara], y_mask_talk, + reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(suma_1_pixel + hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); updateRefresh(); @@ -1448,7 +1448,7 @@ bucless: } void DrasculaEngine::talk_baul(const char *said, const char *filename) { - int cara = 0, cara_antes; + int face = 0, cara_antes; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1461,12 +1461,12 @@ void DrasculaEngine::talk_baul(const char *said, const char *filename) { bucless: - if (cara == 1) - cara = 0; + if (face == 1) + face = 0; else - cara = 1; + face = 1; - flags[19] = cara; + flags[19] = face; updateRoom(); if (withVoices == 0) @@ -1533,7 +1533,7 @@ bucless: void DrasculaEngine::talk_igor_seated(const char *said, const char *filename) { int x_talk[4] = { 80, 102, 124, 146 }; - int cara; + int face; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1544,13 +1544,13 @@ void DrasculaEngine::talk_igor_seated(const char *said, const char *filename) { bucless: - cara = _rnd->getRandomNumber(3); + face = _rnd->getRandomNumber(3); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[cara], 109, 207, 92, 21, 23, drawSurface3, screenSurface); + copyBackground(x_talk[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface); pon_hare(); updateRefresh(); @@ -1582,7 +1582,7 @@ bucless: void DrasculaEngine::talk_igor_peluca(const char *said, const char *filename) { int x_talk[4] = {119, 158, 197, 236}; - int cara = 0; + int face = 0; int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1599,7 +1599,7 @@ bucless: updateRefresh_pre(); - copyBackground(x_talk[cara], 78, 199, 94, 38, 27, drawSurface3, screenSurface); + copyBackground(x_talk[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface); pon_hare(); updateRefresh(); -- cgit v1.2.3 From 4ae97b90cb5ae33425e7180b91c596a8997f6cd2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 30 May 2008 08:30:40 +0000 Subject: Remove obsolete comment svn-id: r32382 --- engines/drascula/drascula.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index f4c66cb597..31746863dd 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1793,9 +1793,6 @@ void DrasculaEngine::screenSaver() { int tempLine[320]; int tempRow[200]; - // FIXME: that part (*.ghost) need RE from efecto.lib file for some gfx special effect - // for now ignore - clearRoom(); loadPic("sv.alg"); -- cgit v1.2.3 From 8c9205babd94fe01a23310227a840722e01608ee Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 30 May 2008 08:48:01 +0000 Subject: Wrap up rest of talk() calls svn-id: r32383 --- engines/drascula/animation.cpp | 108 ++++++++--------- engines/drascula/drascula.cpp | 250 +++++++++++++++++++-------------------- engines/drascula/rooms.cpp | 260 ++++++++++++++++++++--------------------- 3 files changed, 309 insertions(+), 309 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 67cc30c60d..32e4e54d0e 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -695,7 +695,7 @@ void DrasculaEngine::animation_4_1() { loadPic("an12.alg"); decompressPic(extraSurface, 1); - talk(_text[_lang][205],"205.als"); + talk(205; updateRefresh_pre(); @@ -716,13 +716,13 @@ void DrasculaEngine::animation_4_1() { flags[11] = 1; talk_pianista(_textp[_lang][1], "p1.als"); - talk(_text[_lang][206], "206.als"); + talk(206); talk_pianista(_textp[_lang][2], "p2.als"); - talk(_text[_lang][207], "207.als"); + talk(207); talk_pianista(_textp[_lang][3], "p3.als"); - talk(_text[_lang][208], "208.als"); + talk(208); talk_pianista(_textp[_lang][4], "p4.als"); - talk(_text[_lang][209], "209.als"); + talk(209); if (_lang == kSpanish) textSurface = extraSurface; @@ -834,7 +834,7 @@ void DrasculaEngine::animation_4_2() { flags[9] = 1; pause(12); - talk(_textd[_lang][56], "d56.als"); + talk([56); pause(8); clearRoom(); @@ -911,7 +911,7 @@ void DrasculaEngine::animation_4_2() { void DrasculaEngine::animation_8_2() { talk_pianista(_textp[_lang][6], "P6.als"); - talk(_text[_lang][358], "358.als"); + talk(358); talk_pianista(_textp[_lang][7], "P7.als"); talk_pianista(_textp[_lang][8], "P8.als"); } @@ -924,14 +924,14 @@ void DrasculaEngine::animation_9_2() { void DrasculaEngine::animation_10_2() { talk_pianista(_textp[_lang][12], "P12.als"); - talk(_text[_lang][361], "361.als"); + talk(361); pause(40); talk_pianista(_textp[_lang][13], "P13.als"); - talk(_text[_lang][362], "362.als"); + talk(362); talk_pianista(_textp[_lang][14], "P14.als"); - talk(_text[_lang][363], "363.als"); + talk(363); talk_pianista(_textp[_lang][15], "P15.als"); - talk(_text[_lang][364], "364.als"); + talk(364); talk_pianista(_textp[_lang][16], "P16.als"); } @@ -987,7 +987,7 @@ void DrasculaEngine::animation_16_2() { int l; talk_drunk(_textb[_lang][12], "B12.als"); - talk(_text[_lang][371], "371.als"); + talk(371); clearRoom(); @@ -1504,10 +1504,10 @@ void DrasculaEngine::animation_35_2() { } void DrasculaEngine::animation_1_3() { - talk(_text[_lang][413], "413.als"); + talk(413); grr(); pause(50); - talk(_text[_lang][414], "414.als"); + talk(414); } void DrasculaEngine::animation_2_3() { @@ -1826,30 +1826,30 @@ void DrasculaEngine::animation_rayo() { void DrasculaEngine::animation_2_4() { talk_igor_seated(_texti[_lang][16], "I16.als"); - talk(_text[_lang][278], "278.als"); + talk(278); talk_igor_seated(_texti[_lang][17], "I17.als"); - talk(_text[_lang][279], "279.als"); + talk(279); talk_igor_seated(_texti[_lang][18], "I18.als"); } void DrasculaEngine::animation_3_4() { talk_igor_seated(_texti[_lang][19], "I19.als"); talk_igor_seated(_texti[_lang][20], "I20.als"); - talk(_text[_lang][281], "281.als"); + talk(281); } void DrasculaEngine::animation_4_4() { - talk(_text[_lang][287], "287.als"); + talk(287); talk_igor_seated(_texti[_lang][21], "I21.als"); - talk(_text[_lang][284], "284.als"); + talk(284); talk_igor_seated(_texti[_lang][22], "I22.als"); - talk(_text[_lang][285], "285.als"); + talk(285); talk_igor_seated(_texti[_lang][23], "I23.als"); } void DrasculaEngine::animation_7_4() { black(); - talk(_text[_lang][427], "427.als"); + talk(427); fadeFromBlack(1); removeObject(8); removeObject(10); @@ -1862,7 +1862,7 @@ void DrasculaEngine::animation_7_4() { void DrasculaEngine::animation_1_5() { if (flags[0] == 0) { - talk(_text[_lang][430], "430.als"); + talk(430); talk_bj(16); talk_bj(17); talk_bj(18); @@ -1914,20 +1914,20 @@ void DrasculaEngine::animation_4_5() { flags[7] = 1; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - talk(_text[_lang][228], "228.als"); + talk(228); talk_wolf(_textl[_lang][1], "L1.als"); talk_wolf(_textl[_lang][2], "L2.als"); pause(23); - talk(_text[_lang][229], "229.als"); + talk(229); talk_wolf(_textl[_lang][3], "L3.als"); talk_wolf(_textl[_lang][4], "L4.als"); - talk(_text[_lang][230], "230.als"); + talk(230); talk_wolf(_textl[_lang][5], "L5.als"); - talk(_text[_lang][231], "231.als"); + talk(231); talk_wolf(_textl[_lang][6], "L6.als"); talk_wolf(_textl[_lang][7], "L7.als"); pause(33); - talk(_text[_lang][232], "232.als"); + talk(232); talk_wolf(_textl[_lang][8], "L8.als"); } @@ -2017,12 +2017,12 @@ void DrasculaEngine::animation_5_5(){ void DrasculaEngine::animation_6_5() { talk_wolf(_textl[_lang][9], "L9.als"); - talk(_text[_lang][234], "234.als"); + talk(234); } void DrasculaEngine::animation_7_5() { talk_wolf(_textl[_lang][10], "L10.als"); - talk(_text[_lang][236], "236.als"); + talk(236); talk_wolf(_textl[_lang][11], "L11.als"); talk_wolf(_textl[_lang][12], "L12.als"); talk_wolf(_textl[_lang][13], "L13.als"); @@ -2032,20 +2032,20 @@ void DrasculaEngine::animation_7_5() { void DrasculaEngine::animation_8_5() { talk_wolf(_textl[_lang][15], "L15.als"); - talk(_text[_lang][238], "238.als"); + talk(238); talk_wolf(_textl[_lang][16], "L16.als"); } void DrasculaEngine::animation_9_5() { flags[4] = 1; - talk(_text[_lang][401], "401.als"); + talk(401); withoutVerb(); removeObject(15); } void DrasculaEngine::animation_10_5() { flags[3] = 1; - talk(_text[_lang][401], "401.als"); + talk(401); withoutVerb(); removeObject(12); } @@ -2056,7 +2056,7 @@ void DrasculaEngine::animation_11_5() { animation_12_5(); else { flags[9] = 0; - talk(_text[_lang][33], "33.als"); + talk(33; } } @@ -2225,7 +2225,7 @@ void DrasculaEngine::animation_14_5() { stopSound(); pause(17); sentido_hare = 3; - talk(_text[_lang][246],"246.als"); + talk(246; lleva_al_hare(89, 160); flags[10] = 1; playSound("s7.als"); @@ -2244,7 +2244,7 @@ void DrasculaEngine::animation_15_5() { talk_mus(_texte[_lang][4], "E4.als"); talk_mus(_texte[_lang][5], "E5.als"); talk_mus(_texte[_lang][6], "E6.als"); - talk(_text[_lang][291], "291.als"); + talk(291); talk_mus(_texte[_lang][7], "E7.als"); } @@ -2458,12 +2458,12 @@ void DrasculaEngine::animation_9_6() { decompressPic(frontSurface, COMPLETE_PAL); loadPic("nota2.alg"); decompressPic(drawSurface1, HALF_PAL); - talk(_text[_lang][296], "296.als"); - talk(_text[_lang][297], "297.als"); - talk(_text[_lang][298], "298.als"); + talk(296); + talk(297); + talk(298); sentido_hare = 1; - talk(_text[_lang][299], "299.als"); - talk(_text[_lang][300], "300.als"); + talk(299); + talk(300); updateRoom(); copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -2474,7 +2474,7 @@ void DrasculaEngine::animation_9_6() { sentido_hare = 0; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - talk(_text[_lang][301], "301.als"); + talk(301); v_cd = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16; v_cd = v_cd + 4; playMusic(17); @@ -2503,13 +2503,13 @@ void DrasculaEngine::animation_10_6() { void DrasculaEngine::animation_11_6() { talk_taber2(_textt[_lang][10], "t10.als"); - talk(_text[_lang][268], "268.als"); + talk(268); talk_taber2(_textt[_lang][11], "t11.als"); } void DrasculaEngine::animation_12_6() { talk_taber2(_textt[_lang][12], "t12.als"); - talk(_text[_lang][270], "270.als"); + talk(270); talk_taber2(_textt[_lang][13], "t13.als"); talk_taber2(_textt[_lang][14], "t14.als"); } @@ -2558,7 +2558,7 @@ void DrasculaEngine::animation_12_2() { loadPic("an12.alg"); decompressPic(extraSurface, 1); - talk(_text[_lang][356], "356.als"); + talk(356); updateRefresh_pre(); @@ -2598,7 +2598,7 @@ void DrasculaEngine::animation_26_2() { loadPic("an12.alg"); decompressPic(extraSurface, 1); - talk(_text[_lang][392], "392.als"); + talk(392); updateRefresh_pre(); @@ -2619,7 +2619,7 @@ void DrasculaEngine::animation_26_2() { flags[11] = 1; talk_pianista(_textp[_lang][5], "P5.als"); - talk(_text[_lang][393], "393.als"); + talk(393); talk_pianista(_textp[_lang][17], "P17.als"); talk_pianista(_textp[_lang][18], "P18.als"); talk_pianista(_textp[_lang][19], "P19.als"); @@ -2697,13 +2697,13 @@ void DrasculaEngine::animation_13_2() { decompressPic(frontSurface, 1); if (flags[41] == 0) { - talk(_text[_lang][103], "103.als"); + talk(103); talk_drunk(_textb[_lang][4], "B4.als"); flags[12] = 1; - talk(_text[_lang][367], "367.als"); + talk(367); talk_drunk(_textb[_lang][5], "B5.als"); flags[12] = 1; - talk(_text[_lang][368], "368.als"); + talk(368); talk_drunk(_textb[_lang][6], "B6.als"); talk_drunk(_textb[_lang][7], "B7.als"); flags[41] = 1; @@ -2721,7 +2721,7 @@ void DrasculaEngine::animation_18_2() { } void DrasculaEngine::animation_22_2() { - talk(_text[_lang][374],"374.als"); + talk(374; sentido_hare=2; updateRoom(); @@ -3315,7 +3315,7 @@ void DrasculaEngine::animation_33_2() { flags[9] = 1; pause(12); - talk(_textd[_lang][56], "d56.als" ); + talk([56 ); pause(8); clearRoom(); @@ -3376,7 +3376,7 @@ void DrasculaEngine::animation_33_2() { void DrasculaEngine::animation_1_4() { if (flags[21] == 0) { strcpy(objName[2], "igor"); - talk(_text[_lang][275], "275.als"); + talk(275); updateRefresh_pre(); @@ -3401,7 +3401,7 @@ void DrasculaEngine::animation_1_4() { talk_igor_seated(_texti[_lang][15], "I15.als"); flags[21] = 1; } else { - talk(_text[_lang][356], "356.als"); + talk(356); updateRefresh_pre(); @@ -3419,7 +3419,7 @@ void DrasculaEngine::animation_1_4() { flags[18] = 1; flags[20] = 1; - talk(_text[_lang][276], "276.als"); + talk(276); pause(14); talk_igor_seated(_texti[_lang][6], "I6.als"); } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 31746863dd..fe415ee183 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -2628,7 +2628,7 @@ bool DrasculaEngine::exitRoom(int l) { if (num_ejec == 1) { if (objectNum[l] == 105 && flags[0] == 0) - talk(_text[_lang][442], "442.als"); + talk(442); else { updateDoor(l); if (isDoor[l] != 0) { @@ -2811,102 +2811,102 @@ bool DrasculaEngine::checkFlag(int fl) { if (menuScreen == 1) { if (num_ejec == 1) { if (pickedObject == kVerbLook && fl == 28) - talk(_text[_lang][328], "328.als"); + talk(328); } else if (num_ejec == 2) { if ((pickedObject == kVerbLook && fl == 22 && flags[23] == 0) || (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) { - talk(_text[_lang][164], "164.als"); + talk(164); flags[23] = 1; withoutVerb(); addObject(7); addObject(18); } else if (pickedObject == kVerbLook && fl == 22 && flags[23] == 1) - talk(_text[_lang][307], "307.als"); + talk(307); else if (pickedObject == kVerbLook && fl == 28) - talk(_text[_lang][328], "328.als"); + talk(328); else if (pickedObject == kVerbLook && fl == 7) - talk(_text[_lang][143], "143.als"); + talk(143); else if (pickedObject == kVerbTalk && fl == 7) - talk(_text[_lang][144], "144.als"); + talk(144); else if (pickedObject == kVerbLook && fl == 8) - talk(_text[_lang][145], "145.als"); + talk(145); else if (pickedObject == kVerbTalk && fl == 8) - talk(_text[_lang][146], "146.als"); + talk(146); else if (pickedObject == kVerbLook && fl == 9) - talk(_text[_lang][147], "147.als"); + talk(147); else if (pickedObject == kVerbTalk && fl == 9) - talk(_text[_lang][148], "148.als"); + talk(148); else if (pickedObject == kVerbLook && fl == 10) - talk(_text[_lang][151], "151.als"); + talk(151); else if (pickedObject == kVerbLook && fl == 11) - talk(_text[_lang][152], "152.als"); + talk(152); else if (pickedObject == kVerbTalk && fl == 11) - talk(_text[_lang][153], "153.als"); + talk(153); else if (pickedObject == kVerbLook && fl == 12) - talk(_text[_lang][154], "154.als"); + talk(154); else if (pickedObject == kVerbLook && fl == 13) - talk(_text[_lang][155], "155.als"); + talk(155); else if (pickedObject == kVerbLook && fl == 14) - talk(_text[_lang][157], "157.als"); + talk(157); else if (pickedObject == kVerbLook && fl == 15) - talk(_text[_lang][58], "58.als"); + talk(58; else if (pickedObject == kVerbLook && fl == 16) - talk(_text[_lang][158], "158.als"); + talk(158); else if (pickedObject == kVerbLook && fl == 17) - talk(_text[_lang][159], "159.als"); + talk(159); else if (pickedObject == kVerbLook && fl == 18) - talk(_text[_lang][160], "160.als"); + talk(160); else if (pickedObject == kVerbLook && fl == 19) - talk(_text[_lang][161], "161.als"); + talk(161); else if (pickedObject == kVerbLook && fl == 20) - talk(_text[_lang][162], "162.als"); + talk(162); else if (pickedObject == kVerbLook && fl == 23) - talk(_text[_lang][152], "152.als"); + talk(152); else hasAnswer = 0; } else if (num_ejec == 3) { if (pickedObject == kVerbLook && fl == 22) - talk(_text[_lang][307], "307.als"); + talk(307); else if (pickedObject == kVerbLook && fl == 28) - talk(_text[_lang][328], "328.als"); + talk(328); else if (pickedObject == kVerbLook && fl == 7) - talk(_text[_lang][143], "143.als"); + talk(143); else if (pickedObject == kVerbTalk && fl == 7) - talk(_text[_lang][144], "144.als"); + talk(144); else if (pickedObject == kVerbLook && fl == 8) - talk(_text[_lang][145], "145.als"); + talk(145); else if (pickedObject == kVerbTalk && fl == 8) - talk(_text[_lang][146], "146.als"); + talk(146); else if (pickedObject == kVerbLook && fl == 9) - talk(_text[_lang][147], "147.als"); + talk(147); else if (pickedObject == kVerbTalk && fl == 9) - talk(_text[_lang][148], "148.als"); + talk(148); else if (pickedObject == kVerbLook && fl == 10) - talk(_text[_lang][151], "151.als"); + talk(151); else if (pickedObject == kVerbLook && fl == 11) - talk(_text[_lang][152], "152.als"); + talk(152); else if (pickedObject == kVerbTalk && fl == 11) - talk(_text[_lang][153], "153.als"); + talk(153); else if (pickedObject == kVerbLook && fl == 12) - talk(_text[_lang][154], "154.als"); + talk(154); else if (pickedObject == kVerbLook && fl == 13) - talk(_text[_lang][155], "155.als"); + talk(155); else if (pickedObject == kVerbLook && fl == 14) - talk(_text[_lang][157], "157.als"); + talk(157); else if (pickedObject == kVerbLook && fl == 15) - talk(_text[_lang][58], "58.als"); + talk(58; else if (pickedObject == kVerbLook && fl == 16) - talk(_text[_lang][158], "158.als"); + talk(158); else if (pickedObject == kVerbLook && fl == 17) - talk(_text[_lang][159], "159.als"); + talk(159); else if (pickedObject == kVerbLook && fl == 18) - talk(_text[_lang][160], "160.als"); + talk(160); else if (pickedObject == kVerbLook && fl == 19) - talk(_text[_lang][161], "161.als"); + talk(161); else if (pickedObject == kVerbLook && fl == 20) - talk(_text[_lang][162], "162.als"); + talk(162); else if (pickedObject == kVerbLook && fl == 23) - talk(_text[_lang][152], "152.als"); + talk(152); else hasAnswer = 0; } else if (num_ejec == 4) { @@ -2916,104 +2916,104 @@ bool DrasculaEngine::checkFlag(int fl) { removeObject(18); removeObject(19); } else if ((pickedObject == 14 && fl == 19) || (pickedObject == 19 && fl == 14)) - talk(_text[_lang][484], "484.als"); + talk(484); else if (pickedObject == kVerbLook && fl == 28) - talk(_text[_lang][328], "328.als"); + talk(328); else if (pickedObject == kVerbLook && fl == 7) - talk(_text[_lang][478], "478.als"); + talk(478); else if (pickedObject == kVerbLook && fl == 8) - talk(_text[_lang][480], "480.als"); + talk(480); else if (pickedObject == kVerbLook && fl == 9) { - talk(_text[_lang][482], "482.als"); - talk(_text[_lang][483], "483.als"); + talk(482); + talk(483); } else if (pickedObject == kVerbLook && fl == 10) - talk(_text[_lang][485], "485.als"); + talk(485); else if (pickedObject == kVerbLook && fl == 11) - talk(_text[_lang][488], "488.als"); + talk(488); else if (pickedObject == kVerbLook && fl == 12) - talk(_text[_lang][486], "486.als"); + talk(486); else if (pickedObject == kVerbLook && fl == 13) - talk(_text[_lang][490], "490.als"); + talk(490); else if (pickedObject == kVerbLook && fl == 14) - talk(_text[_lang][122], "122.als"); + talk(122); else if (pickedObject == kVerbLook && fl == 15) - talk(_text[_lang][117], "117.als"); + talk(117); else if (pickedObject == kVerbTalk && fl == 15) - talk(_text[_lang][118], "118.als"); + talk(118); else if (pickedObject == kVerbOpen && fl == 15) - talk(_text[_lang][119], "119.als"); + talk(119); else if (pickedObject == kVerbLook && fl == 16) - talk(_text[_lang][491], "491.als"); + talk(491); else if (pickedObject == kVerbLook && fl == 17) - talk(_text[_lang][478], "478.als"); + talk(478); else if (pickedObject == kVerbLook && fl == 18) - talk(_text[_lang][493], "493.als"); + talk(493); else if (pickedObject == kVerbLook && fl == 19) { - talk(_text[_lang][494], "494.als"); - talk(_text[_lang][495], "495.als"); + talk(494); + talk(495); } else if (pickedObject == kVerbLook && fl == 20) - talk(_text[_lang][162], "162.als"); + talk(162); else if (pickedObject == kVerbLook && fl == 21) - talk(_text[_lang][496], "496.als"); + talk(496); else if (pickedObject == kVerbLook && fl == 22) - talk(_text[_lang][161], "161.als"); + talk(161); else hasAnswer = 0; } else if (num_ejec == 5) { if (pickedObject == kVerbLook && fl == 28) - talk(_text[_lang][328], "328.als"); + talk(328); else if (pickedObject == kVerbLook && fl == 7) - talk(_text[_lang][478],"478.als"); + talk(478; else if (pickedObject == kVerbLook && fl == 8) - talk(_text[_lang][120], "120.als"); + talk(120); else if (pickedObject == kVerbLook && fl == 9) { - talk(_text[_lang][482], "482.als"); - talk(_text[_lang][483], "483.als"); + talk(482); + talk(483); } else if (pickedObject == kVerbLook && fl == 11) - talk(_text[_lang][488], "488.als"); + talk(488); else if (pickedObject == kVerbLook && fl == 13) - talk(_text[_lang][490], "490.als"); + talk(490); else if (pickedObject == kVerbLook && fl == 14) - talk(_text[_lang][121], "121.als"); + talk(121); else if (pickedObject == kVerbLook && fl == 15) - talk(_text[_lang][117], "117.als"); + talk(117); else if (pickedObject == kVerbTalk && fl == 15) - talk(_text[_lang][118], "118.als"); + talk(118); else if (pickedObject == kVerbOpen && fl == 15) - talk(_text[_lang][119], "119.als"); + talk(119); else if (pickedObject == kVerbLook && fl == 17) - talk(_text[_lang][478], "478.als"); + talk(478); else if (pickedObject == kVerbLook && fl == 20) - talk(_text[_lang][162], "162.als"); + talk(162); else hasAnswer = 0; } else if (num_ejec == 6) { if (pickedObject == kVerbLook && fl == 28) - talk(_text[_lang][328], "328.als"); + talk(328); else if (pickedObject == kVerbLook && fl == 9) { - talk(_text[_lang][482], "482.als"); - talk(_text[_lang][483], "483.als"); + talk(482); + talk(483); } else if (pickedObject == kVerbLook && fl == 20) - talk(_text[_lang][123], "123.als"); + talk(123); else if (pickedObject == kVerbLook && fl == 21) - talk(_text[_lang][441], "441.als"); + talk(441); else hasAnswer = 0; } } else { if (num_ejec == 1) { if (pickedObject == kVerbLook && fl == 50) - talk(_text[_lang][308], "308.als"); + talk(308); else if (pickedObject == kVerbOpen && fl == 50) - talk(_text[_lang][310], "310.als"); + talk(310); else if (pickedObject == kVerbClose && fl == 50) - talk(_text[_lang][311], "311.als"); + talk(311); else if (pickedObject == kVerbMove && fl == 50) - talk(_text[_lang][312], "312.als"); + talk(312); else if (pickedObject == kVerbPick && fl == 50) - talk(_text[_lang][313], "313.als"); + talk(313); else if (pickedObject == kVerbTalk && fl == 50) - talk(_text[_lang][314], "314.als"); + talk(314); else if (roomNumber == 62) room_62(fl); else if (roomNumber == 63) @@ -3022,24 +3022,24 @@ bool DrasculaEngine::checkFlag(int fl) { hasAnswer = 0; } else if (num_ejec == 2) { if (pickedObject == kVerbLook && fl == 50) - talk(_text[_lang][308], "308.als"); + talk(308); else if (pickedObject == kVerbOpen && fl == 50) - talk(_text[_lang][310], "310.als"); + talk(310); else if (pickedObject == kVerbClose && fl == 50) - talk(_text[_lang][311], "311.als"); + talk(311); else if (pickedObject == kVerbMove && fl == 50) - talk(_text[_lang][312], "312.als"); + talk(312); else if (pickedObject == kVerbPick && fl == 50) - talk(_text[_lang][313], "313.als"); + talk(313); else if (pickedObject == kVerbTalk && fl == 50) - talk(_text[_lang][314], "314.als"); + talk(314); // Note: the original check was strcmp(num_room, "18.alg") else if (pickedObject == 11 && fl == 50 && flags[22] == 0 && roomNumber != 18) - talk(_text[_lang][315], "315.als"); + talk(315); else if (pickedObject == 13 && fl == 50) - talk(_text[_lang][156], "156.als"); + talk(156); else if (pickedObject == 20 && fl == 50) - talk(_text[_lang][163], "163.als"); + talk(163); else if (roomNumber == 1) room_1(fl); else if (roomNumber == 3) @@ -3074,17 +3074,17 @@ bool DrasculaEngine::checkFlag(int fl) { hasAnswer = 0; } else if (num_ejec == 3) { if (pickedObject == kVerbLook && fl == 50) - talk(_text[_lang][309], "309.als"); + talk(309); else if (pickedObject == kVerbOpen && fl == 50) - talk(_text[_lang][310], "310.als"); + talk(310); else if (pickedObject == kVerbClose && fl == 50) - talk(_text[_lang][311], "311.als"); + talk(311); else if (pickedObject == kVerbMove && fl == 50) - talk(_text[_lang][312], "312.als"); + talk(312); else if (pickedObject == kVerbPick && fl == 50) - talk(_text[_lang][313], "313.als"); + talk(313); else if (pickedObject == kVerbTalk && fl == 50) - talk(_text[_lang][314], "314.als"); + talk(314); else if (roomNumber == 13) { if (room_13(fl)) return true; @@ -3092,27 +3092,27 @@ bool DrasculaEngine::checkFlag(int fl) { hasAnswer = 0; } else if (num_ejec == 4) { if (roomNumber == 28) - talk(_text[_lang][178], "178.als"); + talk(178); else if (pickedObject == kVerbLook && fl == 50) - talk(_text[_lang][309], "309.als"); + talk(309); else if (pickedObject == kVerbOpen && fl == 50) - talk(_text[_lang][310], "310.als"); + talk(310); else if (pickedObject == kVerbClose && fl == 50) - talk(_text[_lang][311], "311.als"); + talk(311); else if (pickedObject == kVerbMove && fl == 50) - talk(_text[_lang][312], "312.als"); + talk(312); else if (pickedObject == kVerbPick && fl == 50) - talk(_text[_lang][313], "313.als"); + talk(313); else if (pickedObject == kVerbTalk && fl == 50) - talk(_text[_lang][314], "314.als"); + talk(314); else if (pickedObject == 8 && fl == 50 && flags[18] == 0) - talk(_text[_lang][481], "481.als"); + talk(481); else if (pickedObject == 9 && fl == 50) - talk(_text[_lang][484], "484.als"); + talk(484); else if (pickedObject == 12 && fl == 50 && flags[18] == 0) - talk(_text[_lang][487], "487.als"); + talk(487); else if (pickedObject == 20 && fl == 50) - talk(_text[_lang][487], "487.als"); + talk(487); else if (roomNumber == 21) { if (room_21(fl)) return true; @@ -3154,7 +3154,7 @@ bool DrasculaEngine::checkFlag(int fl) { else if (pickedObject == kVerbTalk && fl == 50) talk("hola yo", "16.als"); else if (pickedObject == 20 && fl == 50) - talk(_text[_lang][487], "487.als"); + talk(487); else if (roomNumber == 49) room_49(fl); else if (roomNumber == 53) @@ -3170,19 +3170,19 @@ bool DrasculaEngine::checkFlag(int fl) { hasAnswer = 0; } else if (num_ejec == 6) { if (pickedObject == kVerbLook && fl == 50 && flags[0] == 1) - talk(_text[_lang][308], "308.als"); + talk(308); else if (pickedObject == kVerbLook && fl == 50 && flags[0] == 0) - talk(_text[_lang][310], "250.als" ); + talk(310 ); else if (pickedObject == kVerbOpen && fl == 50) - talk(_text[_lang][310], "310.als" ); + talk(310 ); else if (pickedObject == kVerbClose && fl == 50) - talk(_text[_lang][311], "311.als" ); + talk(311 ); else if (pickedObject == kVerbMove && fl == 50) - talk(_text[_lang][312], "312.als" ); + talk(312 ); else if (pickedObject == kVerbPick && fl == 50) - talk(_text[_lang][313], "313.als" ); + talk(313 ); else if (pickedObject == kVerbTalk && fl == 50) - talk(_text[_lang][314], "314.als" ); + talk(314 ); else if (roomNumber == 102) room_pendulum(fl); else if (roomNumber == 58) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index c569efd065..dd34716a06 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -217,68 +217,68 @@ void DrasculaEngine::room_0() { // non-default actions if (num_ejec == 2) { if (pickedObject == kVerbLook) { - talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); + talk(mirar_t[c_mirarc_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; } else if (pickedObject == kVerbPick) { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); + talk(poder_t[c_poderc_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } else { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); + talk(poder_t[c_poderc_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } } else if (num_ejec == 4) { if (pickedObject == kVerbLook) { - talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); + talk(mirar_t[c_mirarc_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; } else if (pickedObject == kVerbPick) { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); + talk(poder_t[c_poderc_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } else { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); + talk(poder_t[c_poderc_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } } else if (num_ejec == 5) { if (pickedObject == kVerbLook) { - talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); + talk(mirar_t[c_mirarc_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; } else if (pickedObject == kVerbPick) { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); + talk(poder_t[c_poderc_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } else { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); + talk(poder_t[c_poderc_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } } else if (num_ejec == 6) { if (pickedObject == kVerbLook) { - talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); + talk(mirar_t[c_mirarc_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; } else if (pickedObject == kVerbPick) { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); + talk(poder_t[c_poderc_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } else { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); + talk(poder_t[c_poderc_poder]); c_poder++; if (c_poder == 6) c_poder = 0; @@ -556,7 +556,7 @@ void DrasculaEngine::room_15(int fl) { updateScreen(0, 0, 0, 0, 320, 200, screenSurface); playSound("s8.als"); stopSound(); - talk(_text[_lang][338], "338.als"); + talk(338); flags[27] = 0; pickObject(19); removeObject(18); @@ -582,15 +582,15 @@ void DrasculaEngine::room_15(int fl) { void DrasculaEngine::room_16(int fl) { if (pickedObject == kVerbTalk && fl == 163) - talk(_text[_lang][6], "6.als"); + talk(6 else if (pickedObject == kVerbOpen && fl == 163) openDoor(17, 0); else if (pickedObject == kVerbClose && fl == 163) closeDoor(17, 0); else if (pickedObject == kVerbLook && fl == 183) - talk(_text[_lang][340], "340.als"); + talk(340); else if (pickedObject == kVerbTalk && fl == 183) { - talk(_text[_lang][341], "341.als"); + talk(341); pause(10); talk_sinc(_text[_lang][50], "50.als", "11111111111144432554433"); pause(3); @@ -602,40 +602,40 @@ void DrasculaEngine::room_16(int fl) { sentido_hare = 3; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - talk(_text[_lang][342], "342.als"); + talk(342); pickObject(22); } } else if (pickedObject == kVerbClose && fl == 183) closeDoor(19, NO_DOOR); else if (pickedObject == kVerbLook && fl == 185) - talk(_text[_lang][37], "37.als"); + talk(37; else if (pickedObject == kVerbPick && fl == 185) - talk(_text[_lang][7], "7.als"); + talk(7 else if (pickedObject == kVerbMove && fl == 185) - talk(_text[_lang][7], "7.als"); + talk(7 else if (pickedObject == kVerbTalk && fl == 185) - talk(_text[_lang][38], "38.als"); + talk(38; else if (pickedObject == kVerbLook && fl == 187) { - talk(_text[_lang][343], "343.als"); + talk(343); sentido_hare = 3; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - talk(_text[_lang][344], "344.als"); + talk(344); } else if (pickedObject == kVerbTalk && fl == 187) - talk(_text[_lang][345], "345.als"); + talk(345); else hasAnswer = 0; } void DrasculaEngine::room_17(int fl) { if (pickedObject == kVerbLook && fl == 177) - talk(_text[_lang][35], "35.als"); + talk(35; else if (pickedObject == kVerbTalk && fl == 177 && flags[18] == 0) - talk(_text[_lang][6], "6.als"); + talk(6 else if (pickedObject == kVerbTalk && fl == 177 && flags[18] == 1) animation_18_2(); else if (pickedObject == kVerbOpen && fl == 177 && flags[18] == 1) - talk(_text[_lang][346], "346.als"); + talk(346); else if (pickedObject == kVerbOpen && fl == 177 && flags[14] == 0 && flags[18] == 0) animation_22_2(); else if (pickedObject == kVerbOpen && fl == 177 && flags[14] == 1) @@ -643,7 +643,7 @@ void DrasculaEngine::room_17(int fl) { else if (pickedObject == kVerbClose && fl == 177 && flags[14] == 1) closeDoor(15, 1); else if (pickedObject == 11 && fl == 50 && flags[22] == 0) { - talk(_text[_lang][347], "347.als"); + talk(347); flags[29] = 1; pickObject(23); removeObject(11); @@ -655,9 +655,9 @@ void DrasculaEngine::room_18(int fl) { if (pickedObject == kVerbTalk && fl == 55 && flags[36] == 0) animation_24_2(); else if (pickedObject == kVerbTalk && fl == 55 && flags[36] == 1) - talk(_text[_lang][109], "109.als"); + talk(109); else if (pickedObject == kVerbLook && fl == 181) - talk(_text[_lang][348], "348.als"); + talk(348); else if (pickedObject == kVerbPick && fl == 182) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); @@ -669,17 +669,17 @@ void DrasculaEngine::room_18(int fl) { visible[2] = 0; flags[28] = 1; } else if (pickedObject == kVerbLook && fl == 182) - talk(_text[_lang][154], "154.als"); + talk(154); else if (pickedObject == 8 && fl == 55 && flags[38] == 0 && flags[33] == 1) - talk(_text[_lang][349], "349.als"); + talk(349); else if (pickedObject == 13 && fl == 55 && flags[38] == 0 && flags[33] == 1) - talk(_text[_lang][349], "349.als"); + talk(349); else if (pickedObject == 15 && fl == 55 && flags[38] == 0 && flags[33] == 1) - talk(_text[_lang][349], "349.als"); + talk(349); else if (pickedObject == 16 && fl == 55 && flags[38] == 0 && flags[33] == 1) - talk(_text[_lang][349], "349.als"); + talk(349); else if (pickedObject == 17 && fl == 55 && flags[38] == 0 && flags[33] == 1) - talk(_text[_lang][349], "349.als"); + talk(349); else if (pickedObject == 8 && fl == 55 && flags[38] == 1 && flags[33] == 1) animation_24_2(); else if (pickedObject == 13 && fl == 55 && flags[38] == 1 && flags[33] == 1) @@ -700,7 +700,7 @@ void DrasculaEngine::room_18(int fl) { updateRefresh(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(6); - talk(_text[_lang][347], "347.als"); + talk(347); flags[29] = 1; pickObject(23); removeObject(11); @@ -710,14 +710,14 @@ void DrasculaEngine::room_18(int fl) { void DrasculaEngine::room_19(int fl) { if (pickedObject == kVerbLook && fl == 214) - talk(_text[_lang][191], "191.als"); + talk(191); else hasAnswer = 0; } bool DrasculaEngine::room_21(int fl) { if (pickedObject == kVerbOpen && fl == 101 && flags[28] == 0) - talk(_text[_lang][419], "419.als"); + talk(419); else if (pickedObject == kVerbOpen && fl == 101 && flags[28] == 1) openDoor(0, 1); else if (pickedObject == kVerbClose && fl == 101) @@ -741,7 +741,7 @@ bool DrasculaEngine::room_21(int fl) { void DrasculaEngine::room_22(int fl) { if (pickedObject == kVerbPick && fl == 140) - talk(_text[_lang][7], "7.als"); + talk(7 else if (pickedObject == 11 && fl == 140) { pickObject(18); visible[1] = 0; @@ -756,14 +756,14 @@ void DrasculaEngine::room_22(int fl) { removeObject(22); updateData(); sentido_hare = 3; - talk(_text[_lang][499], "499.als"); - talk(_text[_lang][500], "500.als"); + talk(499); + talk(500); } else if (pickedObject == kVerbLook && fl == 52) - talk(_text[_lang][497], "497.als"); + talk(497); else if (pickedObject == kVerbTalk && fl == 52) - talk(_text[_lang][498], "498.als"); + talk(498); else if (pickedObject == kVerbPick && fl == 180 && flags[26] == 0) - talk(_text[_lang][420], "420.als"); + talk(420); else if (pickedObject == kVerbPick && fl == 180 && flags[26] == 1) { pickObject(7); visible[3] = 0; @@ -805,7 +805,7 @@ void DrasculaEngine::room_24(int fl) { else if (pickedObject == kVerbClose && fl == 106) closeDoor(2, 1); else if (pickedObject == kVerbLook && fl == 151) - talk(_text[_lang][461], "461.als"); + talk(461); else hasAnswer = 0; } @@ -814,7 +814,7 @@ void DrasculaEngine::room_26(int fl) { if (pickedObject == kVerbOpen && fl == 107 && flags[30] == 0) openDoor(2, 0); else if (pickedObject == kVerbOpen && fl == 107 && flags[30] == 1) - talk(_text[_lang][421], "421.als"); + talk(421); else if (pickedObject == kVerbClose && fl == 107) closeDoor(2, 0); else if (pickedObject == 10 && fl == 50 && flags[18] == 1 && flags[12] == 1) @@ -846,21 +846,21 @@ void DrasculaEngine::room_26(int fl) { } else if (pickedObject == kVerbTalk && fl == 51) animation_1_4(); else if (pickedObject == kVerbOpen && fl == 167) - talk(_text[_lang][467], "467.als"); + talk(467); else if (pickedObject == kVerbLook && fl == 164) - talk(_text[_lang][470], "470.als"); + talk(470); else if (pickedObject == kVerbOpen && fl == 164) - talk(_text[_lang][471], "471.als"); + talk(471); else if (pickedObject == kVerbLook && fl == 163) - talk(_text[_lang][472], "472.als"); + talk(472); else if (pickedObject == kVerbPick && fl == 163) - talk(_text[_lang][473], "473.als"); + talk(473); else if (pickedObject == kVerbLook && fl == 165) - talk(_text[_lang][474], "474.als"); + talk(474); else if (pickedObject == kVerbLook && fl == 168) - talk(_text[_lang][476], "476.als"); + talk(476); else if (pickedObject == kVerbPick && fl == 168) - talk(_text[_lang][477], "477.als"); + talk(477); else hasAnswer = 0; } @@ -871,7 +871,7 @@ void DrasculaEngine::room_27(int fl) { else if (pickedObject == kVerbClose && fl == 110) closeDoor(6, 1); else if (pickedObject == kVerbOpen && fl == 116 && flags[23] == 0) - talk(_text[_lang][419], "419.als"); + talk(419); else if (pickedObject == kVerbOpen && fl == 116 && flags[23] == 1) openDoor(5, 3); else if (pickedObject == 17 && fl == 116) { @@ -879,9 +879,9 @@ void DrasculaEngine::room_27(int fl) { openDoor(5,3); withoutVerb(); } else if (pickedObject == kVerbLook && fl == 175) - talk(_text[_lang][429], "429.als"); + talk(429); else if (fl == 150) - talk(_text[_lang][460], "460.als"); + talk(460); else hasAnswer = 0; } @@ -892,15 +892,15 @@ void DrasculaEngine::room_29(int fl) { else if (pickedObject == kVerbClose && fl == 114) closeDoor(4, 1); else if (pickedObject == kVerbLook && fl == 152) - talk(_text[_lang][463], "463.als"); + talk(463); else if (pickedObject == kVerbOpen && fl == 152) - talk(_text[_lang][464], "464.als"); + talk(464); else if (pickedObject == kVerbLook && fl == 153) - talk(_text[_lang][465], "465.als"); + talk(465); else if (pickedObject == kVerbPick && fl == 154) - talk(_text[_lang][466], "466.als"); + talk(466); else if (pickedObject == kVerbOpen && fl == 156) - talk(_text[_lang][467], "467.als"); + talk(467); else hasAnswer = 0; } @@ -911,12 +911,12 @@ void DrasculaEngine::room_30(int fl) { else if (pickedObject == kVerbClose && fl == 115) closeDoor(4, 0); else if (pickedObject == kVerbOpen && fl == 144 && flags[19] == 0) - talk(_text[_lang][422], "422.als"); + talk(422); else if (pickedObject == kVerbOpen && fl == 144 && flags[19] == 1 && flags[22] == 1) openDoor(16, 1); else if (pickedObject == kVerbOpen && fl == 144 && flags[19] == 1 && flags[22] == 0) { openDoor(16, 1); - talk(_text[_lang][423], "423.als"); + talk(423); flags[22] = 1; pickObject(12); if (flags[11] == 1 && flags[14] == 1) @@ -926,12 +926,12 @@ void DrasculaEngine::room_30(int fl) { } else if (pickedObject == kVerbClose && fl == 144) closeDoor(16, 1); else if (pickedObject == 13 && fl == 144) { - talk(_text[_lang][424], "424.als"); + talk(424); flags[19] = 1; } else if (pickedObject == kVerbOpen && fl == 157) - talk(_text[_lang][468], "468.als"); + talk(468); else if (pickedObject == kVerbLook && fl == 158) - talk(_text[_lang][469], "469.als"); + talk(469); else hasAnswer = 0; } @@ -946,9 +946,9 @@ void DrasculaEngine::room_31(int fl) { else if (pickedObject == kVerbClose && fl == 117) closeDoor(5, 0); else if (pickedObject == kVerbLook && fl == 161) - talk(_text[_lang][470], "470.als"); + talk(470); else if (pickedObject == kVerbOpen && fl == 161) - talk(_text[_lang][471], "471.als"); + talk(471); else hasAnswer = 0; } @@ -957,15 +957,15 @@ void DrasculaEngine::room_34(int fl) { if (pickedObject == kVerbMove && fl == 146) animation_8_4(); else if (pickedObject == kVerbLook && fl == 146) - talk(_text[_lang][458], "458.als"); + talk(458); else if (pickedObject == kVerbPick && fl == 146) - talk(_text[_lang][459], "459.als"); + talk(459); else if (pickedObject == kVerbOpen && fl == 120 && flags[25] == 1) openDoor(8, 2); else if (pickedObject == kVerbOpen && fl == 120 && flags[25] == 0) { openDoor(8, 2); sentido_hare = 3; - talk(_text[_lang][425], "425.als"); + talk(425); pickObject(14); flags[25] = 1; } else if (pickedObject == kVerbClose && fl == 120) @@ -984,7 +984,7 @@ void DrasculaEngine::room_35(int fl) { if (flags[18] == 1) animation_6_4(); } else if (pickedObject == kVerbPick && fl == 147) { - talk(_text[_lang][426], "426.als"); + talk(426); pickObject(15); visible[1] = 0; flags[15] = 1; @@ -1000,7 +1000,7 @@ void DrasculaEngine::room_35(int fl) { void DrasculaEngine::room_44(int fl) { if (pickedObject == kVerbLook && fl == 172) - talk(_text[_lang][428], "428.als"); + talk(428); else hasAnswer = 0; } @@ -1009,17 +1009,17 @@ void DrasculaEngine::room_49(int fl){ if (pickedObject == kVerbTalk && fl ==51) converse("op_9.cal"); else if (pickedObject == kVerbLook && fl == 51) - talk(_text[_lang][132], "132.als"); + talk(132); else if ((pickedObject == 8 && fl == 51) || (pickedObject == 8 && fl == 203)) animation_5_5(); else if (pickedObject == kVerbLook && fl == 200) - talk(_text[_lang][133], "133.als"); + talk(133); else if (pickedObject == kVerbTalk && fl == 200) - talk(_text[_lang][134], "134.als"); + talk(134); else if (pickedObject == kVerbLook && fl == 201) - talk(_text[_lang][135], "135.als"); + talk(135); else if (pickedObject == kVerbLook && fl == 203) - talk(_text[_lang][137], "137.als"); + talk(137); else hasAnswer = 0; } @@ -1029,15 +1029,15 @@ void DrasculaEngine::room_53(int fl) { pickObject(16); visible[3] = 0; } else if (pickedObject == kVerbLook && fl == 121) - talk(_text[_lang][128], "128.als"); + talk(128); else if (pickedObject == kVerbLook && fl == 209) - talk(_text[_lang][129], "129.als"); + talk(129); else if (pickedObject == kVerbMove && fl == 123) animation_11_5(); else if (pickedObject == kVerbLook && fl == 52) - talk(_text[_lang][447], "447.als"); + talk(447); else if (pickedObject == kVerbTalk && fl == 52) - talk(_text[_lang][131], "131.als"); + talk(131); else if (pickedObject == 12 && fl == 52) animation_10_5(); else if (pickedObject == 15 && fl == 52) @@ -1047,7 +1047,7 @@ void DrasculaEngine::room_53(int fl) { withoutVerb(); updateData(); } else if (pickedObject == 16) { - talk(_text[_lang][439], "439.als"); + talk(439); withoutVerb(); visible[3] = 1; } else @@ -1058,34 +1058,34 @@ void DrasculaEngine::room_54(int fl) { if ((pickedObject == kVerbTalk && fl == 118) || (pickedObject == kVerbLook && fl == 118 && flags[0] == 0)) animation_1_5(); else if (pickedObject == kVerbLook && fl == 118 && flags[0]==1) - talk(_text[_lang][124], "124.als"); + talk(124); else if (pickedObject == kVerbLook && fl == 53) - talk(_text[_lang][127], "127.als"); + talk(127); else if (pickedObject == kVerbTalk && fl == 53 && flags[14] == 0) { - talk(_text[_lang][288], "288.als"); + talk(288); flags[12] = 1; pause(10); talk_mus(_texte[_lang][1], "E1.als"); - talk(_text[_lang][289], "289.als"); + talk(289); talk_mus(_texte[_lang][2], "E2.als"); talk_mus(_texte[_lang][3], "E3.als"); converse("op_10.cal"); flags[12] = 0; flags[14] = 1; } else if (pickedObject == kVerbTalk && fl == 53 && flags[14] == 1) - talk(_text[_lang][109], "109.als"); + talk(109); else if (pickedObject == kVerbPick && fl == 9999 && flags[13] == 0) { pickObject(8); flags[13] = 1; talk_mus(_texte[_lang][10], "e10.als"); updateData(); } else if (pickedObject == kVerbOpen && fl == 119) - talk(_text[_lang][125], "125.als"); + talk(125); else if (pickedObject == kVerbLook && fl == 119) - talk(_text[_lang][126], "126.als"); + talk(126); else if (pickedObject == 10 && fl == 119) { pause(4); - talk(_text[_lang][436], "436.als"); + talk(436); withoutVerb(); removeObject(10); } else @@ -1098,11 +1098,11 @@ void DrasculaEngine::room_55(int fl) { flags[8] = 1; updateData(); } else if (pickedObject == kVerbLook && fl == 122) - talk(_text[_lang][138], "138.als"); + talk(138); else if (pickedObject == kVerbLook && fl == 204) - talk(_text[_lang][139], "139.als"); + talk(139); else if (pickedObject == kVerbLook && fl == 205) - talk(_text[_lang][140], "140.als"); + talk(140); else if (fl == 206) { playSound("s11.als"); animate("det.bin", 17); @@ -1117,11 +1117,11 @@ bool DrasculaEngine::room_56(int fl) { animation_14_5(); return true; } else if (pickedObject == kVerbLook && fl == 124) - talk(_text[_lang][450], "450.als"); + talk(450); else if (pickedObject == kVerbOpen && fl == 207) - talk(_text[_lang][141], "141.als"); + talk(141); else if (pickedObject == kVerbLook && fl == 208) - talk(_text[_lang][142], "142.als"); + talk(142); else hasAnswer = 0; @@ -1132,7 +1132,7 @@ void DrasculaEngine::room_58(int fl) { if (pickedObject == kVerbMove && fl == 103) animation_7_6(); else if (pickedObject == kVerbLook && fl == 104) - talk(_text[_lang][454], "454.als"); + talk(454); else hasAnswer = 0; } @@ -1203,7 +1203,7 @@ void DrasculaEngine::room_59(int fl) { loadPic("59.alg"); decompressPic(drawSurface1, HALF_PAL); sentido_hare = 3; - talk(_text[_lang][245], "245.als"); + talk(245); withoutVerb(); flags[11] = 1; } @@ -1215,27 +1215,27 @@ bool DrasculaEngine::room_60(int fl) { if (pickedObject == kVerbMove && fl == 112) animation_10_6(); else if (pickedObject == kVerbLook && fl == 112) - talk(_text[_lang][440], "440.als"); + talk(440); else if (pickedObject == kVerbTalk && fl == 52) { - talk(_text[_lang][266], "266.als"); + talk(266); talk_taber2(_textt[_lang][1], "t1.als"); converse("op_12.cal"); withoutVerb(); pickedObject = 0; } else if (pickedObject == kVerbTalk && fl == 115) - talk(_text[_lang][455], "455.als"); + talk(455); else if (pickedObject == kVerbTalk && fl == 56) - talk(_text[_lang][455], "455.als"); + talk(455); else if (pickedObject == kVerbLook && fl == 114) - talk(_text[_lang][167], "167.als"); + talk(167); else if (pickedObject == kVerbLook && fl == 113) - talk(_text[_lang][168], "168.als"); + talk(168); else if (pickedObject == kVerbPick && fl == 113) - talk(_text[_lang][170], "170.als"); + talk(170); else if (pickedObject == kVerbMove && fl == 113) - talk(_text[_lang][170], "170.als"); + talk(170); else if (pickedObject == kVerbTalk && fl == 113) - talk(_text[_lang][169], "169.als"); + talk(169); else if (pickedObject == 21 && fl == 56) animation_18_6(); else if (pickedObject == 9 && fl == 56 && flags[6] == 1) { @@ -1243,7 +1243,7 @@ bool DrasculaEngine::room_60(int fl) { return true; } else if (pickedObject == 9 && fl == 56 && flags[6] == 0) { animate("cnf.bin", 14); - talk(_text[_lang][455], "455.als"); + talk(455); } else hasAnswer = 0; @@ -1252,13 +1252,13 @@ bool DrasculaEngine::room_60(int fl) { void DrasculaEngine::room_61(int fl) { if (pickedObject == kVerbLook && fl == 116) - talk(_text[_lang][172], "172.als"); + talk(172); else if (pickedObject == kVerbLook && fl == 117) - talk(_text[_lang][173], "173.als"); + talk(173); else if (pickedObject == kVerbMove && fl == 117) - talk(_text[_lang][174], "174.als"); + talk(174); else if (pickedObject == kVerbOpen && fl == 117) - talk(_text[_lang][174], "174.als"); + talk(174); else hasAnswer = 0; } @@ -1269,50 +1269,50 @@ void DrasculaEngine::room_62(int fl) { else if (pickedObject == kVerbTalk && fl == 52 && flags[0] == 0) animation_3_1(); else if (pickedObject == kVerbTalk && fl == 52 && flags[0] == 1) - talk(_text[_lang][109], "109.als"); + talk(109); else if (pickedObject == kVerbTalk && fl == 54) animation_4_1(); else if (pickedObject == kVerbLook && fl == 100) - talk(_text[_lang][168], "168.als"); + talk(168); else if (pickedObject == kVerbTalk && fl == 100) - talk(_text[_lang][169], "169.als"); + talk(169); else if (pickedObject == kVerbPick && fl == 100) - talk(_text[_lang][170], "170.als"); + talk(170); else if (pickedObject == kVerbLook && fl == 101) - talk(_text[_lang][171], "171.als"); + talk(171); else if (pickedObject == kVerbLook && fl == 102) - talk(_text[_lang][167], "167.als"); + talk(167); else if (pickedObject == kVerbLook && fl == 103) - talk(_text[_lang][166], "166.als"); + talk(166); else hasAnswer = 0; } void DrasculaEngine::room_63(int fl) { if (pickedObject == kVerbLook && fl == 110) - talk(_text[_lang][172], "172.als"); + talk(172); else if (pickedObject == kVerbLook && fl == 109) - talk(_text[_lang][173], "173.als"); + talk(173); else if (pickedObject == kVerbMove && fl == 109) - talk(_text[_lang][174], "174.als"); + talk(174); else if (pickedObject == kVerbLook && fl == 108) - talk(_text[_lang][334], "334.als"); + talk(334); else if (pickedObject == kVerbTalk && fl == 108) - talk(_text[_lang][333], "333.als"); + talk(333); else hasAnswer = 0; } void DrasculaEngine::room_pendulum(int fl) { if (pickedObject == kVerbLook && fl == 100) - talk(_text[_lang][452], "452.als"); + talk(452); else if (pickedObject == kVerbLook && fl == 101) - talk (_text[_lang][123], "123.als"); + talk(123); else if (pickedObject == kVerbPick && fl == 101) pickObject(20); else if (pickedObject == 20 && fl == 100) animation_6_6(); else if (pickedObject == kVerbPick || pickedObject == kVerbOpen) - talk(_text[_lang][453], "453.als"); + talk(453); else hasAnswer = 0; } -- cgit v1.2.3 From 9b7e8fb7047b5dc9684a8357fee7f66fbab8bb9c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 30 May 2008 08:55:47 +0000 Subject: Wrap up talk_taber2() svn-id: r32384 --- engines/drascula/animation.cpp | 18 +++++++++--------- engines/drascula/drascula.h | 29 ++++++++++++++++------------- engines/drascula/rooms.cpp | 2 +- 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 32e4e54d0e..80a3ab2f59 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -2497,36 +2497,36 @@ void DrasculaEngine::animation_10_6() { copyBackground(164, 85, 155, 48, 113, 114, drawSurface3, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); stopSound(); - talk_taber2(_textt[_lang][23], "t23.als"); + talk_taber2(23); flags[7] = 1; } void DrasculaEngine::animation_11_6() { - talk_taber2(_textt[_lang][10], "t10.als"); + talk_taber2(10); talk(268); - talk_taber2(_textt[_lang][11], "t11.als"); + talk_taber2(11); } void DrasculaEngine::animation_12_6() { - talk_taber2(_textt[_lang][12], "t12.als"); + talk_taber2(12); talk(270); - talk_taber2(_textt[_lang][13], "t13.als"); - talk_taber2(_textt[_lang][14], "t14.als"); + talk_taber2(13); + talk_taber2(14); } void DrasculaEngine::animation_13_6() { - talk_taber2(_textt[_lang][15], "t15.als"); + talk_taber2(15); } void DrasculaEngine::animation_14_6() { - talk_taber2(_textt[_lang][24], "t24.als"); + talk_taber2(24); addObject(21); flags[10] = 1; rompo_y_salgo = 1; } void DrasculaEngine::animation_15_6() { - talk_taber2(_textt[_lang][16], "t16.als"); + talk_taber2(16); } void DrasculaEngine::animation_18_6() { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index adddf43de6..79ea71369e 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -484,6 +484,7 @@ public: void placeIgor(); void placeBJ(); void placeDrascula(); + void talkInit(const char *filename); void talk_igor_dch(int); void talk_igor_dch(const char *said, const char *filename); @@ -497,14 +498,27 @@ public: void talk_tabernero(const char *said, const char *filename); void talk_igorpuerta(const char *said, const char *filename); void talk_igor_peluca(const char *said, const char *filename); - void hiccup(int); - void stopSound(); + void talk_pen(const char *, const char *); + void talk_pen2(const char *, const char *); + void talk_taber2(int); + void talk_taber2(const char *, const char *); + void talk_bj_bed(int); + void talk_bj_bed(const char *said, const char * filename); + void talk_htel(const char *said, const char *filename); void talk_bj(int); void talk_bj(const char *, const char *); void talk_baul(const char *said, const char *filename); void talk(int); void talk(const char *, const char *); void talk_sinc(const char *, const char *, const char *); + void talk_drunk(const char *said, const char *filename); + void talk_pianista(const char *said, const char *filename); + void talk_igor_seated(const char *, const char *); + void talk_wolf(const char *said, const char *filename); + void talk_mus(const char *said, const char *filename); + + void hiccup(int); + void stopSound(); void closeDoor(int nflag, int doorNum); void playMusic(int p); void stopMusic(); @@ -612,8 +626,6 @@ public: void converse(const char *); void print_abc_opc(const char *, int, int, int); void response(int); - void talk_drunk(const char *said, const char *filename); - void talk_pianista(const char *said, const char *filename); void MusicFadeout(); void ctvd_end(); @@ -670,9 +682,6 @@ public: void update_56_pre(); void update_50(); void update_57(); - void talk_igor_seated(const char *, const char *); - void talk_wolf(const char *said, const char *filename); - void talk_mus(const char *said, const char *filename); void room_58(int); void room_59(int); bool room_60(int); @@ -702,12 +711,6 @@ public: void animation_18_6(); void animation_19_6(); void activatePendulum(); - void talk_pen(const char *, const char *); - void talk_pen2(const char *, const char *); - void talk_taber2(const char *, const char *); - void talk_bj_bed(int); - void talk_bj_bed(const char *said, const char * filename); - void talk_htel(const char *said, const char *filename); private: int _lang; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index dd34716a06..239fed568d 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1218,7 +1218,7 @@ bool DrasculaEngine::room_60(int fl) { talk(440); else if (pickedObject == kVerbTalk && fl == 52) { talk(266); - talk_taber2(_textt[_lang][1], "t1.als"); + talk_taber2(1); converse("op_12.cal"); withoutVerb(); pickedObject = 0; -- cgit v1.2.3 From 0516f550c38e3cfc2978ae7b69ee76e028e18d28 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 30 May 2008 08:56:07 +0000 Subject: Wrap up talk_taber2() svn-id: r32385 --- engines/drascula/talk.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index fa0efca481..efec50134b 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -1175,6 +1175,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } +void DrasculaEngine::talk_taber2(int index) { + char name[20]; + sprintf(name, "t%i.als", index); + talk_taber2(_textt[_lang][index], name); +} + void DrasculaEngine::talk_taber2(const char *said, const char *filename) { int x_talk[6] = {1, 23, 45, 67, 89, 111}; int face; -- cgit v1.2.3 From 4eed36f88c9e0df275ae1430dc3428b92bfd711d Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 30 May 2008 09:28:52 +0000 Subject: Fix compilation svn-id: r32386 --- engines/drascula/animation.cpp | 12 ++++++------ engines/drascula/drascula.cpp | 6 +++--- engines/drascula/rooms.cpp | 40 ++++++++++++++++++++-------------------- 3 files changed, 29 insertions(+), 29 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 80a3ab2f59..46f8daba66 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -695,7 +695,7 @@ void DrasculaEngine::animation_4_1() { loadPic("an12.alg"); decompressPic(extraSurface, 1); - talk(205; + talk(205); updateRefresh_pre(); @@ -834,7 +834,7 @@ void DrasculaEngine::animation_4_2() { flags[9] = 1; pause(12); - talk([56); + talk(56); pause(8); clearRoom(); @@ -2056,7 +2056,7 @@ void DrasculaEngine::animation_11_5() { animation_12_5(); else { flags[9] = 0; - talk(33; + talk(33); } } @@ -2225,7 +2225,7 @@ void DrasculaEngine::animation_14_5() { stopSound(); pause(17); sentido_hare = 3; - talk(246; + talk(246); lleva_al_hare(89, 160); flags[10] = 1; playSound("s7.als"); @@ -2721,7 +2721,7 @@ void DrasculaEngine::animation_18_2() { } void DrasculaEngine::animation_22_2() { - talk(374; + talk(374); sentido_hare=2; updateRoom(); @@ -3315,7 +3315,7 @@ void DrasculaEngine::animation_33_2() { flags[9] = 1; pause(12); - talk([56 ); + talk(56); pause(8); clearRoom(); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index fe415ee183..6eee9ec8b7 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -2849,7 +2849,7 @@ bool DrasculaEngine::checkFlag(int fl) { else if (pickedObject == kVerbLook && fl == 14) talk(157); else if (pickedObject == kVerbLook && fl == 15) - talk(58; + talk(58); else if (pickedObject == kVerbLook && fl == 16) talk(158); else if (pickedObject == kVerbLook && fl == 17) @@ -2894,7 +2894,7 @@ bool DrasculaEngine::checkFlag(int fl) { else if (pickedObject == kVerbLook && fl == 14) talk(157); else if (pickedObject == kVerbLook && fl == 15) - talk(58; + talk(58); else if (pickedObject == kVerbLook && fl == 16) talk(158); else if (pickedObject == kVerbLook && fl == 17) @@ -2963,7 +2963,7 @@ bool DrasculaEngine::checkFlag(int fl) { if (pickedObject == kVerbLook && fl == 28) talk(328); else if (pickedObject == kVerbLook && fl == 7) - talk(478; + talk(478); else if (pickedObject == kVerbLook && fl == 8) talk(120); else if (pickedObject == kVerbLook && fl == 9) { diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 239fed568d..374dd0968b 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -217,68 +217,68 @@ void DrasculaEngine::room_0() { // non-default actions if (num_ejec == 2) { if (pickedObject == kVerbLook) { - talk(mirar_t[c_mirarc_mirar]); + talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; } else if (pickedObject == kVerbPick) { - talk(poder_t[c_poderc_poder]); + talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } else { - talk(poder_t[c_poderc_poder]); + talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } } else if (num_ejec == 4) { if (pickedObject == kVerbLook) { - talk(mirar_t[c_mirarc_mirar]); + talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; } else if (pickedObject == kVerbPick) { - talk(poder_t[c_poderc_poder]); + talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } else { - talk(poder_t[c_poderc_poder]); + talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } } else if (num_ejec == 5) { if (pickedObject == kVerbLook) { - talk(mirar_t[c_mirarc_mirar]); + talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; } else if (pickedObject == kVerbPick) { - talk(poder_t[c_poderc_poder]); + talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } else { - talk(poder_t[c_poderc_poder]); + talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } } else if (num_ejec == 6) { if (pickedObject == kVerbLook) { - talk(mirar_t[c_mirarc_mirar]); + talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; } else if (pickedObject == kVerbPick) { - talk(poder_t[c_poderc_poder]); + talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } else { - talk(poder_t[c_poderc_poder]); + talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; @@ -582,7 +582,7 @@ void DrasculaEngine::room_15(int fl) { void DrasculaEngine::room_16(int fl) { if (pickedObject == kVerbTalk && fl == 163) - talk(6 + talk(6); else if (pickedObject == kVerbOpen && fl == 163) openDoor(17, 0); else if (pickedObject == kVerbClose && fl == 163) @@ -608,13 +608,13 @@ void DrasculaEngine::room_16(int fl) { } else if (pickedObject == kVerbClose && fl == 183) closeDoor(19, NO_DOOR); else if (pickedObject == kVerbLook && fl == 185) - talk(37; + talk(37); else if (pickedObject == kVerbPick && fl == 185) - talk(7 + talk(7); else if (pickedObject == kVerbMove && fl == 185) - talk(7 + talk(7); else if (pickedObject == kVerbTalk && fl == 185) - talk(38; + talk(38); else if (pickedObject == kVerbLook && fl == 187) { talk(343); sentido_hare = 3; @@ -629,9 +629,9 @@ void DrasculaEngine::room_16(int fl) { void DrasculaEngine::room_17(int fl) { if (pickedObject == kVerbLook && fl == 177) - talk(35; + talk(35); else if (pickedObject == kVerbTalk && fl == 177 && flags[18] == 0) - talk(6 + talk(6); else if (pickedObject == kVerbTalk && fl == 177 && flags[18] == 1) animation_18_2(); else if (pickedObject == kVerbOpen && fl == 177 && flags[18] == 1) @@ -741,7 +741,7 @@ bool DrasculaEngine::room_21(int fl) { void DrasculaEngine::room_22(int fl) { if (pickedObject == kVerbPick && fl == 140) - talk(7 + talk(7); else if (pickedObject == 11 && fl == 140) { pickObject(18); visible[1] = 0; -- cgit v1.2.3 From 64def1b5624dc7068e60fe190fbeaa79f55ac9b2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 09:45:00 +0000 Subject: Big simplification and cleanup to the animation code svn-id: r32387 --- engines/drascula/animation.cpp | 728 ++++++----------------------------------- engines/drascula/drascula.h | 2 + 2 files changed, 98 insertions(+), 632 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 46f8daba66..23e7e117e1 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -30,6 +30,31 @@ namespace Drascula { static const int interf_x[] ={ 1, 65, 129, 193, 1, 65, 129 }; static const int interf_y[] ={ 51, 51, 51, 51, 83, 83, 83 }; +void DrasculaEngine::updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delay) { + int x = 0; + + for (int n = 0; n < count; n++){ + x++; + copyBackground(x, y, destX, destY, width, height, src, screenSurface); + updateScreen(destX, destY, destX, destY, width, height, screenSurface); + x += width; + pause(delay); + } +} + +void DrasculaEngine::updateAnim2(int y, int px, int py, int width, int height, int count, byte* src) { + int x = 0; + + for (int n = 0; n < count; n++) { + x++; + copyBackground(px, py, px, py, width, height, drawSurface1, screenSurface); + copyRect(x, y, px, py, width, height, src, screenSurface); + updateScreen(px, py, px, py, width, height, screenSurface); + x = x + width; + pause(3); + } +} + void DrasculaEngine::animation_1_1() { int l, l2, p; int pixelPos[6]; @@ -738,8 +763,6 @@ void DrasculaEngine::animation_1_2() { } void DrasculaEngine::animation_2_2() { - int n, x=0; - sentido_hare = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); pon_hare(); @@ -753,63 +776,16 @@ void DrasculaEngine::animation_2_2() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); copyBackground(1, 1, 201, 87, 50, 52, frontSurface, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 1, 201, 87, 50, 52, frontSurface, screenSurface); - updateScreen(201,87, 201,87, 50,52, screenSurface); - x = x + 50; - pause(3); - } - x = 0; + updateAnim(1, 201, 87, 50, 52, 6, frontSurface); + updateAnim(55, 201, 87, 50, 52, 6, frontSurface); + updateAnim(109, 201, 87, 50, 52, 6, frontSurface); - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 55, 201, 87, 50, 52, frontSurface, screenSurface); - updateScreen(201, 87, 201, 87, 50, 52, screenSurface); - x = x + 50; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++){ - x++; - copyBackground(x, 109, 201, 87, 50, 52, frontSurface, screenSurface); - updateScreen(201, 87, 201, 87, 50, 52, screenSurface); - x = x + 50; - pause(3); - } - - x = 0; playSound("s2.als"); - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 1, 201, 87, 50, 52, extraSurface, screenSurface); - updateScreen(201,87, 201,87, 50,52, screenSurface); - x = x + 50; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 55, 201, 87, 50, 52, extraSurface, screenSurface); - updateScreen(201, 87, 201, 87, 50, 52, screenSurface); - x = x + 50; - pause(3); - } - x = 0; - - for (n = 0; n < 2; n++) { - x++; - copyBackground(x, 109, 201, 87, 50, 52, extraSurface, screenSurface); - updateScreen(201, 87, 201, 87, 50, 52, screenSurface); - x = x + 50; - pause(3); - } + updateAnim(1, 201, 87, 50, 52, 6, extraSurface); + updateAnim(55, 201, 87, 50, 52, 6, extraSurface); + updateAnim(109, 201, 87, 50, 52, 2, extraSurface); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1438,8 +1414,6 @@ void DrasculaEngine::animation_31_2() { } void DrasculaEngine::animation_35_2() { - int n, x = 0; - lleva_al_hare(96, 165); lleva_al_hare(79, 165); @@ -1451,42 +1425,10 @@ void DrasculaEngine::animation_35_2() { loadPic("an35_2.alg"); decompressPic(frontSurface, 1); - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 1, 70, 90, 46, 80, backSurface, screenSurface); - updateScreen(70,90, 70,90, 46,80,screenSurface); - x = x + 46; - pause(3); - } - - x = 0; - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 82, 70, 90, 46, 80, backSurface, screenSurface); - updateScreen(70, 90, 70, 90, 46, 80, screenSurface); - x = x + 46; - pause(3); - } - - x = 0; - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 1, 70, 90, 46, 80, frontSurface, screenSurface); - updateScreen(70, 90, 70, 90, 46, 80, screenSurface); - - x = x + 46; - - pause(3); - } - - x = 0; - for (n = 0; n < 2; n++) { - x++; - copyBackground(x, 82, 70, 90, 46, 80, frontSurface, screenSurface); - updateScreen(70, 90, 70,90, 46, 80,screenSurface); - x = x + 46; - pause(3); - } + updateAnim(1, 70, 90, 46, 80, 6, backSurface); + updateAnim(82, 70, 90, 46, 80, 6, backSurface); + updateAnim(1, 70, 90, 46, 80, 6, frontSurface); + updateAnim(82, 70, 90, 46, 80, 2, frontSurface); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -1534,7 +1476,6 @@ void DrasculaEngine::animation_2_3() { } void DrasculaEngine::animation_3_3() { - int n, x = 0; int px = hare_x - 20, py = hare_y - 1; loadPic("an2y_1.alg"); @@ -1544,73 +1485,15 @@ void DrasculaEngine::animation_3_3() { loadPic("an2y_3.alg"); decompressPic(backSurface, 1); - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); - copyRect(x, 2, px, py, 71, 72, frontSurface, screenSurface); - updateScreen(px, py, px, py, 71, 72, screenSurface); - x = x + 71; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); - copyRect(x, 75, px, py, 71, 72, frontSurface, screenSurface); - updateScreen(px, py, px, py, 71, 72, screenSurface); - x = x + 71; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); - copyRect(x, 2, px, py, 71, 72, extraSurface, screenSurface); - updateScreen(px, py, px, py, 71, 72, screenSurface); - x = x + 71; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); - copyRect(x, 75, px, py, 71, 72, extraSurface, screenSurface); - updateScreen(px, py, px, py, 71, 72, screenSurface); - x = x + 71; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); - copyRect(x, 2, px, py, 71, 72, backSurface, screenSurface); - updateScreen(px, py, px, py, 71, 72, screenSurface); - x = x + 71; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); - copyRect(x, 75, px, py, 71, 72, backSurface, screenSurface); - updateScreen(px, py, px, py, 71, 72, screenSurface); - x = x + 71; - pause(3); - } + updateAnim2(2, px, py, 71, 72, 4, frontSurface); + updateAnim2(75, px, py, 71, 72, 4, frontSurface); + updateAnim2(2, px, py, 71, 72, 4, extraSurface); + updateAnim2(75, px, py, 71, 72, 4, extraSurface); + updateAnim2(2, px, py, 71, 72, 4, backSurface); + updateAnim2(75, px, py, 71, 72, 4, backSurface); } void DrasculaEngine::animation_4_3() { - int n, x = 0; int px = 120, py = 63; loadPic("any_1.alg"); @@ -1620,73 +1503,15 @@ void DrasculaEngine::animation_4_3() { loadPic("any_3.alg"); decompressPic(backSurface, 1); - for (n = 0; n < 4; n++){ - x++; - copyBackground(px, py, px, py, 77, 89, drawSurface1, screenSurface); - copyRect(x, 1, px, py, 77, 89, frontSurface, screenSurface); - updateScreen(px, py, px, py, 77, 89, screenSurface); - x = x + 77; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 77, 89, drawSurface1, screenSurface); - copyRect(x, 91, px, py, 77, 89, frontSurface, screenSurface); - updateScreen(px, py, px, py, 77, 89, screenSurface); - x = x + 77; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 77, 89, drawSurface1, screenSurface); - copyRect(x, 1, px, py, 77, 89, extraSurface, screenSurface); - updateScreen(px, py, px, py, 77, 89, screenSurface); - x = x + 77; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 77, 89, drawSurface1, screenSurface); - copyRect(x, 91, px, py, 77, 89, extraSurface, screenSurface); - updateScreen(px, py, px, py, 77, 89, screenSurface); - x = x + 77; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 77, 89, drawSurface1, screenSurface); - copyRect(x, 1, px, py, 77, 89, backSurface, screenSurface); - updateScreen(px, py, px, py, 77, 89, screenSurface); - x = x + 77; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 77, 89, drawSurface1, screenSurface); - copyRect(x, 91, px, py, 77, 89, backSurface, screenSurface); - updateScreen(px, py, px, py, 77, 89, screenSurface); - x = x + 77; - pause(3); - } + updateAnim2(1, px, py, 77, 89, 4, frontSurface); + updateAnim2(91, px, py, 77, 89, 4, frontSurface); + updateAnim2(1, px, py, 77, 89, 4, extraSurface); + updateAnim2(91, px, py, 77, 89, 4, extraSurface); + updateAnim2(1, px, py, 77, 89, 4, backSurface); + updateAnim2(91, px, py, 77, 89, 4, backSurface); } void DrasculaEngine::animation_5_3() { - int n, x = 0; int px = hare_x - 20, py = hare_y - 1; loadPic("an3y_1.alg"); @@ -1696,69 +1521,12 @@ void DrasculaEngine::animation_5_3() { loadPic("an3y_3.alg"); decompressPic(backSurface, 1); - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); - copyRect(x, 2, px, py, 71, 72, frontSurface, screenSurface); - updateScreen(px, py, px, py, 71, 72, screenSurface); - x = x + 71; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); - copyRect(x, 75, px, py, 71, 72, frontSurface, screenSurface); - updateScreen(px, py, px, py, 71, 72, screenSurface); - x = x + 71; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); - copyRect(x, 2, px, py, 71, 72, extraSurface, screenSurface); - updateScreen(px, py, px, py, 71, 72, screenSurface); - x = x + 71; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); - copyRect(x, 75, px, py, 71, 72, extraSurface, screenSurface); - updateScreen(px,py, px,py, 71,72, screenSurface); - x = x + 71; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); - copyRect(x, 2, px, py, 71, 72, backSurface, screenSurface); - updateScreen(px, py, px, py, 71, 72, screenSurface); - x = x + 71; - pause(3); - } - - x = 0; - - for (n = 0; n < 4; n++) { - x++; - copyBackground(px, py, px, py, 71, 72, drawSurface1, screenSurface); - copyRect(x, 75, px, py, 71, 72, backSurface, screenSurface); - updateScreen(px, py, px, py, 71, 72, screenSurface); - x = x + 71; - pause(3); - } + updateAnim2(2, px, py, 71, 72, 4, frontSurface); + updateAnim2(75, px, py, 71, 72, 4, frontSurface); + updateAnim2(2, px, py, 71, 72, 4, extraSurface); + updateAnim2(75, px, py, 71, 72, 4, extraSurface); + updateAnim2(2, px, py, 71, 72, 4, backSurface); + updateAnim2(75, px, py, 71, 72, 4, backSurface); } void DrasculaEngine::animation_6_3() { @@ -2590,8 +2358,6 @@ void DrasculaEngine::animation_12_2() { } void DrasculaEngine::animation_26_2() { - int n, x = 0; - if (_lang == kSpanish) textSurface = frontSurface; @@ -2626,16 +2392,11 @@ void DrasculaEngine::animation_26_2() { loadPic("an26.alg"); decompressPic(extraSurface, 1); - for (n = 0; n < 6; n++){ - x++; - copyBackground(x, 1, 225, 113, 50, 59, extraSurface, screenSurface); - updateScreen(225,113, 225,113, 50,59, screenSurface); - x = x + 50; - pause(3); - } - x = 0; - for (n = 0; n < 6; n++) { + updateAnim(1, 225, 113, 50, 59, 6, extraSurface); + + int x = 0; + for (int n = 0; n < 6; n++) { x++; copyBackground(x, 61, 225, 113, 50, 59, extraSurface, screenSurface); updateScreen(225, 113, 225, 113, 50, 59, screenSurface); @@ -2646,14 +2407,8 @@ void DrasculaEngine::animation_26_2() { } stopSound_corte(); - x = 0; - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 121, 225, 113, 50, 59, extraSurface, screenSurface); - updateScreen(225, 113, 225, 113, 50, 59, screenSurface); - x = x + 50; - pause(3); - } + + updateAnim(121, 225, 113, 50, 59, 6, extraSurface); pickObject(11); removeObject(12); @@ -2771,41 +2526,17 @@ void DrasculaEngine::animation_24_2() { } void DrasculaEngine::animation_32_2() { - int n, x = 0; - loadPic("an32_1.alg"); decompressPic(drawSurface3, 1); loadPic("an32_2.alg"); decompressPic(backSurface, 1); - for (n = 0; n < 4; n++) { - x++; - copyBackground(x, 1, 113, 53, 65, 81, drawSurface3, screenSurface); - updateScreen(113, 53, 113, 53, 65, 81, screenSurface); - x = x + 65; - pause(4); - } - - x = 0; - for (n = 0; n < 4; n++) { - x++; - copyBackground(x, 83, 113, 53, 65, 81, drawSurface3, screenSurface); - updateScreen(113, 53, 113, 53, 65, 81, screenSurface); - x = x + 65; - pause(4); - } - - x = 0; - for (n = 0; n < 4; n++) { - x++; - copyBackground(x, 1, 113, 53, 65, 81, backSurface, screenSurface); - updateScreen(113, 53, 113, 53, 65, 81, screenSurface); - x = x + 65; - pause(4); - } + updateAnim(1, 113, 53, 65, 81, 4, drawSurface3, 4); + updateAnim(83, 113, 53, 65, 81, 4, drawSurface3, 4); + updateAnim(1, 113, 53, 65, 81, 4, backSurface, 4); - x = 0; - for (n = 0; n < 3; n++) { + int x = 0; + for (int n = 0; n < 3; n++) { x++; copyBackground(x, 83, 113, 53, 65, 81, backSurface, screenSurface); updateScreen(113, 53, 113, 53, 65, 81, screenSurface); @@ -2819,8 +2550,6 @@ void DrasculaEngine::animation_32_2() { } void DrasculaEngine::animation_34_2() { - int n, x = 0; - sentido_hare = 1; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -2830,34 +2559,13 @@ void DrasculaEngine::animation_34_2() { loadPic("an34_2.alg"); decompressPic(extraSurface, 1); - for (n = 0; n < 3; n++) { - x++; - copyBackground(x, 1, 218, 79, 83, 75, backSurface, screenSurface); - updateScreen(218, 79, 218, 79, 83, 75, screenSurface); - x = x + 83; - pause(3); - } - - x = 0; - - for (n = 0; n < 3; n++) { - x++; - copyBackground(x, 77, 218, 79, 83, 75, backSurface, screenSurface); - updateScreen(218, 79, 218, 79, 83, 75, screenSurface); - x = x + 83; - pause(3); - } + updateAnim(1, 218, 79, 83, 75, 3, backSurface); + updateAnim(77, 218, 79, 83, 75, 3, backSurface); - x = 0; playSound("s8.als"); - for (n = 0; n < 3; n++) { - x++; - copyBackground(x, 1, 218, 79, 83, 75, extraSurface, screenSurface); - updateScreen(218, 79, 218, 79, 83,75, screenSurface); - x = x + 83; - pause(3); - } + updateAnim(1, 218, 79, 83, 75, 3, extraSurface); + stopSound(); pause(30); @@ -2895,8 +2603,6 @@ void DrasculaEngine::animation_36_2() { } void DrasculaEngine::animation_7_2() { - int n, x = 0; - loadPic("an7_1.alg"); decompressPic(backSurface, 1); loadPic("an7_2.alg"); @@ -2911,58 +2617,12 @@ void DrasculaEngine::animation_7_2() { updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 1, 80, 64, 51, 73, backSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 75, 80, 64, 51, 73, backSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 1, 80, 64, 51, 73, extraSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 75, 80, 64, 51, 73, extraSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; + updateAnim2(1, 80, 64, 51, 73, 6, backSurface); + updateAnim2(75, 80, 64, 51, 73, 6, backSurface); + updateAnim2(1, 80, 64, 51, 73, 6, extraSurface); + updateAnim2(75, 80, 64, 51, 73, 6, extraSurface); + updateAnim2(1, 80, 64, 51, 73, 6, frontSurface); - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 1, 80, 64, 51, 73, frontSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } loadPic("an7_4.alg"); decompressPic(backSurface, 1); loadPic("an7_5.alg"); @@ -2972,153 +2632,25 @@ void DrasculaEngine::animation_7_2() { loadPic("an7_7.alg"); decompressPic(drawSurface3, 1); - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 1, 80, 64, 51, 73, backSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 75, 80, 64, 51, 73, backSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 1, 80, 64, 51,73, extraSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 75, 80, 64, 51, 73, extraSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 1, 80, 64, 51, 73, frontSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } + updateAnim2(1, 80, 64, 51, 73, 6, backSurface); + updateAnim2(75, 80, 64, 51, 73, 6, backSurface); + updateAnim2(1, 80, 64, 51, 73, 6, extraSurface); + updateAnim2(75, 80, 64, 51, 73, 6, extraSurface); + updateAnim2(1, 80, 64, 51, 73, 6, frontSurface); + updateAnim2(75, 80, 64, 51, 73, 6, extraSurface); + updateAnim2(1, 80, 64, 51, 73, 6, frontSurface); + updateAnim2(75, 80, 64, 51, 73, 6, frontSurface); + updateAnim2(1, 80, 64, 51, 73, 6, drawSurface3); + updateAnim2(75, 80, 64, 51, 73, 2, drawSurface3); - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 75, 80, 64, 51, 73, extraSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 1, 80, 64, 51, 73, frontSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 75, 80, 64, 51, 73, frontSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 1, 80, 64, 51, 73, drawSurface3, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 2; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 75, 80, 64, 51, 73, drawSurface3, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } loadPic("an7_8.alg"); decompressPic(backSurface, 1); loadPic("an7_9.alg"); decompressPic(extraSurface, 1); - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 1, 80, 64, 51, 73, backSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 75, 80, 64, 51, 73, backSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); - copyRect(x, 1, 80, 64, 51, 73, extraSurface, screenSurface); - updateScreen(80, 64, 80, 64, 51, 73, screenSurface); - x = x + 51; - pause(3); - } - + updateAnim2(1, 80, 64, 51, 73, 6, backSurface); + updateAnim2(75, 80, 64, 51, 73, 6, backSurface); + updateAnim2(1, 80, 64, 51, 73, 6, extraSurface); copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); copyRect(1, 75, 80, 64, 51, 73, extraSurface, screenSurface); @@ -3140,8 +2672,6 @@ void DrasculaEngine::animation_7_2() { } void DrasculaEngine::animation_5_2() { - int n, x = 0; - sentido_hare = 0; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -3158,86 +2688,20 @@ void DrasculaEngine::animation_5_2() { copyBackground(1, 1, 213, 66, 53,84, backSurface, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 1, 213, 66, 53, 84, backSurface, screenSurface); - updateScreen(213, 66, 213, 66, 53, 84,screenSurface); - x = x + 52; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 86, 213, 66, 53, 84, backSurface, screenSurface); - updateScreen(213, 66, 213, 66, 53, 84, screenSurface); - x = x + 52; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 1, 213, 66, 53, 84, extraSurface, screenSurface); - updateScreen(213, 66, 213, 66, 53, 84, screenSurface); - x = x + 52; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 1, 213, 66, 53, 84, extraSurface, screenSurface); - updateScreen(213, 66, 213, 66, 53, 84, screenSurface); - x = x + 52; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 86, 213, 66, 53, 84, extraSurface, screenSurface); - updateScreen(213, 66, 213, 66, 53, 84, screenSurface); - x = x + 52; - pause(3); - } - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 1, 213, 66, 53, 84, frontSurface, screenSurface); - updateScreen(213, 66, 213, 66, 53, 84, screenSurface); - x = x + 52; - pause(3); - } + // FIXME: the widths in these calls were 53 and 52 (by mistake, probably). + // I've set them to 53, but if any problems arise, we should try 52 as well + updateAnim(1, 213, 66, 53, 84, 6, backSurface); + updateAnim(86, 213, 66, 53, 84, 6, backSurface); + updateAnim(1, 213, 66, 53, 84, 6, extraSurface); + updateAnim(1, 213, 66, 53, 84, 6, extraSurface); + updateAnim(86, 213, 66, 53, 84, 6, extraSurface); + updateAnim(1, 213, 66, 53, 84, 6, frontSurface); playSound("s1.als"); - - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 86, 213, 66, 53, 84, frontSurface, screenSurface); - updateScreen(213, 66, 213, 66, 53, 84, screenSurface); - x = x + 52; - pause(3); - } + updateAnim(86, 213, 66, 53, 84, 6, frontSurface); stopSound_corte(); - x = 0; - - for (n = 0; n < 6; n++) { - x++; - copyBackground(x, 1, 213, 66, 53, 84, drawSurface3, screenSurface); - updateScreen(213, 66, 213, 66, 53, 84, screenSurface); - x = x + 52; - pause(3); - } + updateAnim(1, 213, 66, 53, 84, 6, drawSurface3); loadPic("994.alg"); decompressPic(backSurface, 1); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 79ea71369e..52e493d925 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -638,6 +638,8 @@ public: bool room_13(int fl); void update_13(); void update_20(); + void updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delay = 3); + void updateAnim2(int y, int px, int py, int width, int height, int count, byte* src); void animation_1_3(); void animation_2_3(); void animation_3_3(); -- cgit v1.2.3 From 792286874a9f64e9aa282b219bcad574919ce7b8 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 10:02:56 +0000 Subject: talk_igorpuerta -> talk_igor_door talk_igor_peluca -> talk_igor_wig and replaced some unneeded if statements with atoi svn-id: r32388 --- engines/drascula/drascula.h | 4 ++-- engines/drascula/rooms.cpp | 6 +++--- engines/drascula/talk.cpp | 21 +++------------------ 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 52e493d925..b2ebae09e6 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -496,8 +496,8 @@ public: void talk_igor_frente(const char *, const char *); void talk_tabernero(int); void talk_tabernero(const char *said, const char *filename); - void talk_igorpuerta(const char *said, const char *filename); - void talk_igor_peluca(const char *said, const char *filename); + void talk_igor_door(const char *said, const char *filename); + void talk_igor_wig(const char *said, const char *filename); void talk_pen(const char *, const char *); void talk_pen2(const char *, const char *); void talk_taber2(int); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 374dd0968b..f7c6eacca4 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -832,16 +832,16 @@ void DrasculaEngine::room_26(int fl) { flags[12] = 1; closeDoor(2, 0); sentido_hare = 2; - talk_igorpuerta(_texti[_lang][27], "I27.als"); + talk_igor_door(_texti[_lang][27], "I27.als"); flags[30] = 1; - talk_igorpuerta(_texti[_lang][28], "I28.als"); + talk_igor_door(_texti[_lang][28], "I28.als"); lleva_al_hare(153, 180); } else if (pickedObject == kVerbPick && fl == 143 && flags[18] == 0) { lleva_al_hare(260, 180); copyBackground(80, 78, 199, 94, 38, 27, drawSurface3, screenSurface); updateScreen(199, 94, 199, 94, 38, 27, screenSurface); pause(3); - talk_igor_peluca(_texti[_lang][25], "I25.als"); + talk_igor_wig(_texti[_lang][25], "I25.als"); lleva_al_hare(153, 180); } else if (pickedObject == kVerbTalk && fl == 51) animation_1_4(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index efec50134b..111c2e6187 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -1359,22 +1359,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha bucless: - if (sincronia[p] == '0') - face = 0; - if (sincronia[p] == '1') - face = 1; - if (sincronia[p] == '2') - face = 2; - if (sincronia[p] == '3') - face = 3; - if (sincronia[p] == '4') - face = 4; - if (sincronia[p] == '5') - face = 5; - if (sincronia[p] == '6') - face = 6; - if (sincronia[p] == '7') - face = 7; + face = atoi(&sincronia[p]); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -1502,7 +1487,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } -void DrasculaEngine::talk_igorpuerta(const char *said, const char *filename) { +void DrasculaEngine::talk_igor_door(const char *said, const char *filename) { int length = strlen(said); _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -1586,7 +1571,7 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } -void DrasculaEngine::talk_igor_peluca(const char *said, const char *filename) { +void DrasculaEngine::talk_igor_wig(const char *said, const char *filename) { int x_talk[4] = {119, 158, 197, 236}; int face = 0; int length = strlen(said); -- cgit v1.2.3 From ea276dd17744fba2b7fa54f6084c6bd52d9f873e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 10:04:39 +0000 Subject: talk_igor_frente -> talk_igor_front svn-id: r32389 --- engines/drascula/animation.cpp | 10 +++++----- engines/drascula/drascula.h | 2 +- engines/drascula/talk.cpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 23e7e117e1..c0a6eeaf10 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -381,7 +381,7 @@ void DrasculaEngine::animation_1_1() { pause(18); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_frente(_texti[_lang][6], "I6.als"); + talk_igor_front(_texti[_lang][6], "I6.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; fadeToBlack(0); @@ -2092,7 +2092,7 @@ void DrasculaEngine::animation_1_6() { talk_igor_dch(11); sentido_igor = 3; talk_dr_dch(33); - talk_igor_frente(_texti[_lang][12], "I12.als"); + talk_igor_front(_texti[_lang][12], "I12.als"); talk_dr_dch(34); sentido_dr = 0; talk_dr_izq(35); @@ -2914,8 +2914,8 @@ void DrasculaEngine::animation_5_4(){ decompressPic(frontSurface, 1); x_igor = 100; y_igor = 65; - talk_igor_frente(_texti[_lang][29], "I29.ALS"); - talk_igor_frente(_texti[_lang][30], "I30.als"); + talk_igor_front(_texti[_lang][29], "I29.ALS"); + talk_igor_front(_texti[_lang][30], "I30.als"); loadPic("96.alg"); decompressPic(frontSurface, 1); loadPic("99.alg"); @@ -2943,7 +2943,7 @@ void DrasculaEngine::animation_6_4() { placeIgor(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(40); - talk_igor_frente(_texti[_lang][26], "I26.als"); + talk_igor_front(_texti[_lang][26], "I26.als"); roomNumber = prevRoom; clearRoom(); loadPic("96.alg"); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index b2ebae09e6..a6e0f598b1 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -493,7 +493,7 @@ public: void talk_dr_izq(int); void talk_dr_izq(const char *said, const char *filename); void talk_solo(const char *, const char *); - void talk_igor_frente(const char *, const char *); + void talk_igor_front(const char *, const char *); void talk_tabernero(int); void talk_tabernero(const char *said, const char *filename); void talk_igor_door(const char *said, const char *filename); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 111c2e6187..0502ca44e6 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -290,7 +290,7 @@ bucless: } } -void DrasculaEngine::talk_igor_frente(const char *said, const char *filename) { +void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { int x_talk[8] = { 56, 86, 116, 146, 176, 206, 236, 266 }; int face; int length = strlen(said); -- cgit v1.2.3 From d261c93049b9d14f4c8e70242229368f9f8eae00 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 10:14:27 +0000 Subject: More simplification of talk code. Moved talk_dr_grande() from animation.cpp to talk.cpp svn-id: r32390 --- engines/drascula/animation.cpp | 60 -------------------------- engines/drascula/drascula.h | 3 ++ engines/drascula/talk.cpp | 96 +++++++++++++++++++++--------------------- 3 files changed, 51 insertions(+), 108 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index c0a6eeaf10..b4be383e49 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -27,9 +27,6 @@ namespace Drascula { -static const int interf_x[] ={ 1, 65, 129, 193, 1, 65, 129 }; -static const int interf_y[] ={ 51, 51, 51, 51, 83, 83, 83 }; - void DrasculaEngine::updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delay) { int x = 0; @@ -401,63 +398,6 @@ void DrasculaEngine::animation_1_1() { decompressPic(backSurface, 1); } -void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { - int x_talk[4] = {47, 93, 139, 185}; - int face; - int l = 0; - int length = strlen(said); - - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - - color_abc(kColorRed); - - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } - -bucless: - - face = _rnd->getRandomNumber(3); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(interf_x[l] + 24, interf_y[l], 0, 45, 39, 31, drawSurface2, screenSurface); - copyBackground(x_talk[face], 1, 171, 68, 45, 48, drawSurface2, screenSurface); - l++; - if (l == 7) - l = 0; - - if (withVoices == 0) - centerText(said, 191, 69); - - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - - pause(3); - - byte key = getScan(); - if (key == Common::KEYCODE_ESCAPE) - term_int = 1; - - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (LookForFree() != 0) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } -} - void DrasculaEngine::animation_2_1() { int l; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index a6e0f598b1..5a43d5702e 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -211,6 +211,9 @@ struct RoomTalkAction; #define COMPLETE_PAL 256 #define HALF_PAL 128 +static const int interf_x[] ={ 1, 65, 129, 193, 1, 65, 129 }; +static const int interf_y[] ={ 51, 51, 51, 51, 83, 83, 83 }; + class DrasculaEngine : public ::Engine { int _gameId; Common::KeyState _keyPressed; diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 0502ca44e6..c4e208b7df 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -28,6 +28,8 @@ namespace Drascula { void DrasculaEngine::talkInit(const char *filename) { + _rnd->setSeed((unsigned int)_system->getMillis() / 2); + if (hay_sb == 1) { sku = new Common::File; sku->open(filename); @@ -51,8 +53,6 @@ void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorWhite); talkInit(filename); @@ -113,8 +113,6 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorRed); talkInit(filename); @@ -181,8 +179,6 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorRed); talkInit(filename); @@ -244,8 +240,6 @@ bucless: void DrasculaEngine::talk_solo(const char *said, const char *filename) { int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - if (num_ejec == 1) color_abc(color_solo); else if (num_ejec == 4) @@ -295,8 +289,6 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorWhite); talkInit(filename); @@ -366,8 +358,6 @@ void DrasculaEngine::talk_tabernero(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorMaroon); talkInit(filename); @@ -428,8 +418,6 @@ void DrasculaEngine::talk_bj(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorWhite); talkInit(filename); @@ -514,8 +502,6 @@ void DrasculaEngine::talk(const char *said, const char *filename) { } } - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - if (num_ejec != 2) { if (factor_red[hare_y + alto_hare] == 100) suma_1_pixel = 0; @@ -634,8 +620,6 @@ void DrasculaEngine::talk_pianista(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorWhite); talkInit(filename); @@ -684,8 +668,6 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - if (num_ejec == 1) { loadPic("an11y13.alg"); decompressPic(frontSurface, 1); @@ -768,8 +750,6 @@ void DrasculaEngine::talk_vb(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorBrown); talkInit(filename); @@ -827,8 +807,6 @@ void DrasculaEngine::talk_vbpuerta(int index) { void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) { int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorBrown); talkInit(filename); @@ -935,8 +913,6 @@ bucless: void DrasculaEngine::talk_hacker(const char *said, const char *filename) { int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -972,8 +948,6 @@ void DrasculaEngine::talk_wolf(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorRed); talkInit(filename); @@ -1021,8 +995,6 @@ void DrasculaEngine::talk_mus(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorWhite); talkInit(filename); @@ -1076,8 +1048,6 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename) { copyRect(44, 145, 145, 105, 25, 29, drawSurface3, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorYellow); talkInit(filename); @@ -1129,8 +1099,6 @@ void DrasculaEngine::talk_pen2(const char *said, const char *filename) { flags[1] = 1; - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorYellow); talkInit(filename); @@ -1186,8 +1154,6 @@ void DrasculaEngine::talk_taber2(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorMaroon); talkInit(filename); @@ -1241,8 +1207,6 @@ void DrasculaEngine::talk_bj_bed(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorWhite); talkInit(filename); @@ -1291,8 +1255,6 @@ void DrasculaEngine::talk_htel(const char *said, const char *filename) { int face, pantalla; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorYellow); talkInit(filename); @@ -1442,8 +1404,6 @@ void DrasculaEngine::talk_baul(const char *said, const char *filename) { int face = 0, cara_antes; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - cara_antes = flags[19]; color_abc(kColorMaroon); @@ -1490,8 +1450,6 @@ bucless: void DrasculaEngine::talk_igor_door(const char *said, const char *filename) { int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorWhite); talkInit(filename); @@ -1527,8 +1485,6 @@ void DrasculaEngine::talk_igor_seated(const char *said, const char *filename) { int face; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorWhite); talkInit(filename); @@ -1576,8 +1532,6 @@ void DrasculaEngine::talk_igor_wig(const char *said, const char *filename) { int face = 0; int length = strlen(said); - _rnd->setSeed((unsigned int)_system->getMillis() / 2); - color_abc(kColorWhite); talkInit(filename); @@ -1620,4 +1574,50 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } +void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { + int x_talk[4] = {47, 93, 139, 185}; + int face; + int l = 0; + int length = strlen(said); + + color_abc(kColorRed); + + talkInit(filename); + +bucless: + + face = _rnd->getRandomNumber(3); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(interf_x[l] + 24, interf_y[l], 0, 45, 39, 31, drawSurface2, screenSurface); + copyBackground(x_talk[face], 1, 171, 68, 45, 48, drawSurface2, screenSurface); + l++; + if (l == 7) + l = 0; + + if (withVoices == 0) + centerText(said, 191, 69); + + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + + pause(3); + + byte key = getScan(); + if (key == Common::KEYCODE_ESCAPE) + term_int = 1; + + if (key != 0) + ctvd_stop(); + if (hay_sb == 1) { + if (LookForFree() != 0) + goto bucless; + delete sku; + sku = NULL; + ctvd_terminate(); + } else { + length -= 2; + if (length > 0) + goto bucless; + } +} + } // End of namespace Drascula -- cgit v1.2.3 From d0b396f062890f1904229a5085221faf549c7c94 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 10:21:29 +0000 Subject: Moved SSN frame definitions into their own enum and removed unused definitions for the escape and F1-F10 keys svn-id: r32391 --- engines/drascula/drascula.cpp | 15 ++++++++------- engines/drascula/drascula.h | 28 ++++++++++------------------ 2 files changed, 18 insertions(+), 25 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 6eee9ec8b7..ab47e31bca 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -3240,7 +3240,7 @@ void DrasculaEngine::enterName() { select2[v] = key; else if (key == Common::KEYCODE_SPACE) select2[v] = '\167'; - else if (key == ESC) + else if (key == Common::KEYCODE_ESCAPE) break; else if (key == Common::KEYCODE_RETURN) { select2[v] = '\0'; @@ -3297,8 +3297,9 @@ int DrasculaEngine::playFrameSSN() { memcpy(&CHUNK, mSession, 1); mSession += 1; } + switch (CHUNK) { - case SET_PAL: + case kFrameSetPal: if (!UsingMem) _Session->read(dacSSN, 768); else { @@ -3307,10 +3308,10 @@ int DrasculaEngine::playFrameSSN() { } set_dacSSN(dacSSN); break; - case EMPTY_FRAME: + case kFrameEmptyFrame: WaitFrameSSN(); break; - case INIT_FRAME: + case kFrameInit: if (!UsingMem) { _Session->read(&CMP, 1); _Session->read(&Lengt, 4); @@ -3320,7 +3321,7 @@ int DrasculaEngine::playFrameSSN() { memcpy(&Lengt, mSession, 4); mSession += 4; } - if (CMP == CMP_RLE) { + if (CMP == kFrameCmpRle) { if (!UsingMem) { BufferSSN = (byte *)malloc(Lengt); _Session->read(BufferSSN, Lengt); @@ -3343,7 +3344,7 @@ int DrasculaEngine::playFrameSSN() { _system->updateScreen(); FrameSSN++; } else { - if (CMP == CMP_OFF) { + if (CMP == kFrameCmpOff) { if (!UsingMem) { BufferSSN = (byte *)malloc(Lengt); _Session->read(BufferSSN, Lengt); @@ -3368,7 +3369,7 @@ int DrasculaEngine::playFrameSSN() { } } break; - case END_ANIM: + case kFrameEndAnim: Exit = 1; break; default: diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 5a43d5702e..f6696ff820 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -80,6 +80,16 @@ enum Colors { kColorPink = 11 }; +enum SSNFrames { + kFrameInit = 0, + kFrameCmpRle = 1, + kFrameCmpOff = 2, + kFrameEndAnim = 3, + kFrameSetPal = 4, + kFrameMouseKey = 5, // unused + kFrameEmptyFrame = 6 +}; + #define TEXTD_START 68 struct DrasculaGameDescription; @@ -87,16 +97,6 @@ struct RoomTalkAction; #define NUM_SAVES 10 #define NUM_FLAGS 50 -#define ESC 0x01 -#define F1 0x3B -#define F2 0x3C -#define F3 0x3D -#define F4 0x3E -#define F5 0x3F -#define F6 0x40 -#define F8 0x42 -#define F9 0x43 -#define F10 0x44 #define DIF_MASK 55 #define OBJWIDTH 40 #define OBJHEIGHT 25 @@ -200,14 +200,6 @@ struct RoomTalkAction; #define X_N0_OPC 213 #define NO_DOOR 99 -#define INIT_FRAME 0 -#define CMP_RLE 1 -#define CMP_OFF 2 -#define END_ANIM 3 -#define SET_PAL 4 -#define MOUSE_KEY 5 -#define EMPTY_FRAME 6 - #define COMPLETE_PAL 256 #define HALF_PAL 128 -- cgit v1.2.3 From db0af96fa05b943fccff4c3a88426aab8d22736a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 10:31:47 +0000 Subject: Wrapped up talk_igor_front, talk_igor_door, talk_igor_seated and talk_igor_wig svn-id: r32392 --- engines/drascula/animation.cpp | 34 +++++++++++++++++----------------- engines/drascula/drascula.h | 4 ++++ engines/drascula/rooms.cpp | 6 +++--- engines/drascula/talk.cpp | 24 ++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 20 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index b4be383e49..57cf549f49 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -378,7 +378,7 @@ void DrasculaEngine::animation_1_1() { pause(18); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_front(_texti[_lang][6], "I6.als"); + talk_igor_front(6); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; fadeToBlack(0); @@ -1533,26 +1533,26 @@ void DrasculaEngine::animation_rayo() { } void DrasculaEngine::animation_2_4() { - talk_igor_seated(_texti[_lang][16], "I16.als"); + talk_igor_seated(16); talk(278); - talk_igor_seated(_texti[_lang][17], "I17.als"); + talk_igor_seated(17); talk(279); - talk_igor_seated(_texti[_lang][18], "I18.als"); + talk_igor_seated(18); } void DrasculaEngine::animation_3_4() { - talk_igor_seated(_texti[_lang][19], "I19.als"); - talk_igor_seated(_texti[_lang][20], "I20.als"); + talk_igor_seated(19); + talk_igor_seated(20); talk(281); } void DrasculaEngine::animation_4_4() { talk(287); - talk_igor_seated(_texti[_lang][21], "I21.als"); + talk_igor_seated(21); talk(284); - talk_igor_seated(_texti[_lang][22], "I22.als"); + talk_igor_seated(22); talk(285); - talk_igor_seated(_texti[_lang][23], "I23.als"); + talk_igor_seated(23); } void DrasculaEngine::animation_7_4() { @@ -2032,7 +2032,7 @@ void DrasculaEngine::animation_1_6() { talk_igor_dch(11); sentido_igor = 3; talk_dr_dch(33); - talk_igor_front(_texti[_lang][12], "I12.als"); + talk_igor_front(12); talk_dr_dch(34); sentido_dr = 0; talk_dr_izq(35); @@ -2800,9 +2800,9 @@ void DrasculaEngine::animation_1_4() { flags[18] = 1; flags[20] = 1; - talk_igor_seated(_texti[_lang][13], "I13.als"); - talk_igor_seated(_texti[_lang][14], "I14.als"); - talk_igor_seated(_texti[_lang][15], "I15.als"); + talk_igor_seated(13); + talk_igor_seated(14); + talk_igor_seated(15); flags[21] = 1; } else { talk(356); @@ -2825,7 +2825,7 @@ void DrasculaEngine::animation_1_4() { talk(276); pause(14); - talk_igor_seated(_texti[_lang][6], "I6.als"); + talk_igor_seated(6); } converse("op_6.cal"); @@ -2854,8 +2854,8 @@ void DrasculaEngine::animation_5_4(){ decompressPic(frontSurface, 1); x_igor = 100; y_igor = 65; - talk_igor_front(_texti[_lang][29], "I29.ALS"); - talk_igor_front(_texti[_lang][30], "I30.als"); + talk_igor_front(29); + talk_igor_front(30); loadPic("96.alg"); decompressPic(frontSurface, 1); loadPic("99.alg"); @@ -2883,7 +2883,7 @@ void DrasculaEngine::animation_6_4() { placeIgor(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(40); - talk_igor_front(_texti[_lang][26], "I26.als"); + talk_igor_front(26); roomNumber = prevRoom; clearRoom(); loadPic("96.alg"); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index f6696ff820..22610accd0 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -488,10 +488,13 @@ public: void talk_dr_izq(int); void talk_dr_izq(const char *said, const char *filename); void talk_solo(const char *, const char *); + void talk_igor_front(int); void talk_igor_front(const char *, const char *); void talk_tabernero(int); void talk_tabernero(const char *said, const char *filename); + void talk_igor_door(int); void talk_igor_door(const char *said, const char *filename); + void talk_igor_wig(int); void talk_igor_wig(const char *said, const char *filename); void talk_pen(const char *, const char *); void talk_pen2(const char *, const char *); @@ -508,6 +511,7 @@ public: void talk_sinc(const char *, const char *, const char *); void talk_drunk(const char *said, const char *filename); void talk_pianista(const char *said, const char *filename); + void talk_igor_seated(int); void talk_igor_seated(const char *, const char *); void talk_wolf(const char *said, const char *filename); void talk_mus(const char *said, const char *filename); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index f7c6eacca4..893cd4bfae 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -832,16 +832,16 @@ void DrasculaEngine::room_26(int fl) { flags[12] = 1; closeDoor(2, 0); sentido_hare = 2; - talk_igor_door(_texti[_lang][27], "I27.als"); + talk_igor_door(27); flags[30] = 1; - talk_igor_door(_texti[_lang][28], "I28.als"); + talk_igor_door(28); lleva_al_hare(153, 180); } else if (pickedObject == kVerbPick && fl == 143 && flags[18] == 0) { lleva_al_hare(260, 180); copyBackground(80, 78, 199, 94, 38, 27, drawSurface3, screenSurface); updateScreen(199, 94, 199, 94, 38, 27, screenSurface); pause(3); - talk_igor_wig(_texti[_lang][25], "I25.als"); + talk_igor_wig(25); lleva_al_hare(153, 180); } else if (pickedObject == kVerbTalk && fl == 51) animation_1_4(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index c4e208b7df..3a5820c241 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -284,6 +284,12 @@ bucless: } } +void DrasculaEngine::talk_igor_front(int index) { + char name[20]; + sprintf(name, "I%i.als", index); + talk_igor_front(_texti[_lang][index], name); +} + void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { int x_talk[8] = { 56, 86, 116, 146, 176, 206, 236, 266 }; int face; @@ -1447,6 +1453,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } +void DrasculaEngine::talk_igor_door(int index) { + char name[20]; + sprintf(name, "I%i.als", index); + talk_igor_door(_texti[_lang][index], name); +} + void DrasculaEngine::talk_igor_door(const char *said, const char *filename) { int length = strlen(said); @@ -1480,6 +1492,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } +void DrasculaEngine::talk_igor_seated(int index) { + char name[20]; + sprintf(name, "I%i.als", index); + talk_igor_seated(_texti[_lang][index], name); +} + void DrasculaEngine::talk_igor_seated(const char *said, const char *filename) { int x_talk[4] = { 80, 102, 124, 146 }; int face; @@ -1527,6 +1545,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } +void DrasculaEngine::talk_igor_wig(int index) { + char name[20]; + sprintf(name, "I%i.als", index); + talk_igor_wig(_texti[_lang][index], name); +} + void DrasculaEngine::talk_igor_wig(const char *said, const char *filename) { int x_talk[4] = {119, 158, 197, 236}; int face = 0; -- cgit v1.2.3 From 94d1e7effbe22291964202c903f5fe1d8c0f53ea Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Fri, 30 May 2008 10:43:21 +0000 Subject: Implemented opcodes 0x04 (o1_mulObjectParam) and 0x05 (o1_divObjectParam). svn-id: r32393 --- engines/cine/script.h | 4 ++-- engines/cine/script_fw.cpp | 41 +++++++++++++++++++++++++---------------- engines/cine/script_os.cpp | 4 ++-- 3 files changed, 29 insertions(+), 20 deletions(-) diff --git a/engines/cine/script.h b/engines/cine/script.h index 23bb179ee5..eeac0e8809 100644 --- a/engines/cine/script.h +++ b/engines/cine/script.h @@ -155,8 +155,8 @@ protected: int o1_getObjectParam(); int o1_addObjectParam(); int o1_subObjectParam(); - int o1_add2ObjectParam(); - int o1_sub2ObjectParam(); + int o1_mulObjectParam(); + int o1_divObjectParam(); int o1_compareObjectParam(); int o1_setupObject(); int o1_checkCollision(); diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp index 4f6749517e..6b9538e25d 100644 --- a/engines/cine/script_fw.cpp +++ b/engines/cine/script_fw.cpp @@ -49,8 +49,8 @@ const Opcode FWScript::_opcodeTable[] = { { &FWScript::o1_addObjectParam, "bbw" }, { &FWScript::o1_subObjectParam, "bbw" }, /* 04 */ - { &FWScript::o1_add2ObjectParam, "bbw" }, - { &FWScript::o1_sub2ObjectParam, "bbw" }, + { &FWScript::o1_mulObjectParam, "bbw" }, + { &FWScript::o1_divObjectParam, "bbw" }, { &FWScript::o1_compareObjectParam, "bbw" }, { &FWScript::o1_setupObject, "bwwww" }, /* 08 */ @@ -803,23 +803,32 @@ int FWScript::o1_subObjectParam() { return 0; } -/*! \todo Implement this instruction - */ -int FWScript::o1_add2ObjectParam() { - uint16 a = getNextByte(); - uint16 b = getNextByte(); - uint16 c = getNextWord(); - warning("STUB: o1_add2ObjectParam(%x, %x, %x)", a, b, c); +int FWScript::o1_mulObjectParam() { + byte objIdx = getNextByte(); + byte paramIdx = getNextByte(); + int16 newValue = getNextWord(); + + debugC(5, kCineDebugScript, "Line: %d: mulObjectParam(objIdx:%d,paramIdx:%d,newValue:%d)", _line, objIdx, paramIdx, newValue); + + // FIXME? In PC versions of Future Wars and Operation Stealth the multiplication is done unsigned. + // (16b x 16b -> 32b, taking only 16 LSBs). The question is, does it really matter? + int16 currentValue = getObjectParam(objIdx, paramIdx); + modifyObjectParam(objIdx, paramIdx, currentValue * newValue); return 0; } -/*! \todo Implement this instruction - */ -int FWScript::o1_sub2ObjectParam() { - uint16 a = getNextByte(); - uint16 b = getNextByte(); - uint16 c = getNextWord(); - warning("STUB: o1_sub2ObjectParam(%x, %x, %x)", a, b, c); +int FWScript::o1_divObjectParam() { + byte objIdx = getNextByte(); + byte paramIdx = getNextByte(); + int16 newValue = getNextWord(); + + debugC(5, kCineDebugScript, "Line: %d: divObjectParam(objIdx:%d,paramIdx:%d,newValue:%d)", _line, objIdx, paramIdx, newValue); + + // In PC versions of Future Wars and Operation Stealth the division is done signed. + // Dividend is first sign extended from 16 bits to 32 bits and then divided by the + // 16 bit divider using signed division. Only 16 LSBs of the quotient are saved. + int16 currentValue = getObjectParam(objIdx, paramIdx); + modifyObjectParam(objIdx, paramIdx, currentValue / newValue); return 0; } diff --git a/engines/cine/script_os.cpp b/engines/cine/script_os.cpp index 7c88e3ffe3..319fca5d3c 100644 --- a/engines/cine/script_os.cpp +++ b/engines/cine/script_os.cpp @@ -45,8 +45,8 @@ const Opcode OSScript::_opcodeTable[] = { { &FWScript::o1_addObjectParam, "bbw" }, { &FWScript::o1_subObjectParam, "bbw" }, /* 04 */ - { &FWScript::o1_add2ObjectParam, "bbw" }, - { &FWScript::o1_sub2ObjectParam, "bbw" }, + { &FWScript::o1_mulObjectParam, "bbw" }, + { &FWScript::o1_divObjectParam, "bbw" }, { &FWScript::o1_compareObjectParam, "bbw" }, { &FWScript::o1_setupObject, "bwwww" }, /* 08 */ -- cgit v1.2.3 From c153aaeea9c929813801913d4b74ec047fe0ac72 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 10:55:43 +0000 Subject: Wrapped up talk_drunk Some cleanup dir_escritura -> targetSurface targetScreen -> targetSurface plt (in decompressPic) -> colorCount funcion -> function svn-id: r32394 --- engines/drascula/animation.cpp | 22 ++++----- engines/drascula/drascula.cpp | 108 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 5 +- engines/drascula/talk.cpp | 6 +++ 4 files changed, 72 insertions(+), 69 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 57cf549f49..c94dea17d0 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -892,17 +892,17 @@ void DrasculaEngine::animation_14_2() { } void DrasculaEngine::animation_15_2() { - talk_drunk(_textb[_lang][8], "B8.als"); + talk_drunk(8); pause(7); - talk_drunk(_textb[_lang][9], "B9.als"); - talk_drunk(_textb[_lang][10], "B10.als"); - talk_drunk(_textb[_lang][11], "B11.als"); + talk_drunk(9); + talk_drunk(10); + talk_drunk(11); } void DrasculaEngine::animation_16_2() { int l; - talk_drunk(_textb[_lang][12], "B12.als"); + talk_drunk(12); talk(371); clearRoom(); @@ -1060,8 +1060,8 @@ asco: } void DrasculaEngine::animation_17_2() { - talk_drunk(_textb[_lang][13], "B13.als"); - talk_drunk(_textb[_lang][14], "B14.als"); + talk_drunk(13); + talk_drunk(14); flags[40] = 1; } @@ -2393,14 +2393,14 @@ void DrasculaEngine::animation_13_2() { if (flags[41] == 0) { talk(103); - talk_drunk(_textb[_lang][4], "B4.als"); + talk_drunk(4); flags[12] = 1; talk(367); - talk_drunk(_textb[_lang][5], "B5.als"); + talk_drunk(5); flags[12] = 1; talk(368); - talk_drunk(_textb[_lang][6], "B6.als"); - talk_drunk(_textb[_lang][7], "B7.als"); + talk_drunk(6); + talk_drunk(7); flags[41] = 1; } converse("op_2.cal"); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index ab47e31bca..2a28f14c89 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -357,10 +357,10 @@ void DrasculaEngine::loadPic(const char *NamePcc) { file.close(); } -void DrasculaEngine::decompressPic(byte *dir_escritura, int plt) { - memcpy(dir_escritura, pcxBuffer, 64000); +void DrasculaEngine::decompressPic(byte *targetSurface, int colorCount) { + memcpy(targetSurface, pcxBuffer, 64000); free(pcxBuffer); - setRGB((byte *)cPal, plt); + setRGB((byte *)cPal, colorCount); } void DrasculaEngine::paleta_hare() { @@ -988,7 +988,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { sscanf(buffer, "%d", &isDoor[l]); if (isDoor[l] != 0) { getLine(ald, buffer, size); - sscanf(buffer, "%s", targetScreen[l]); + sscanf(buffer, "%s", targetSurface[l]); getLine(ald, buffer, size); sscanf(buffer, "%d", &x_alakeva[l]); getLine(ald, buffer, size); @@ -1117,7 +1117,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (num_ejec == 2) { soc = 0; for (l = 0; l < 6; l++) { - soc = soc + ancho_hare; + soc += ancho_hare; frame_x[l] = soc; } } @@ -2647,7 +2647,7 @@ bool DrasculaEngine::exitRoom(int l) { return true; } clearRoom(); - strcpy(salgo, targetScreen[l]); + strcpy(salgo, targetSurface[l]); strcat(salgo, ".ald"); hare_x = -1; carga_escoba(salgo); @@ -2681,7 +2681,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); delete ald; ald = NULL; - strcpy(salgo, targetScreen[l]); + strcpy(salgo, targetSurface[l]); strcat(salgo, ".ald"); hare_x =- 1; carga_escoba(salgo); @@ -2699,7 +2699,7 @@ bool DrasculaEngine::exitRoom(int l) { doBreak = 1; previousMusic = roomMusic; clearRoom(); - strcpy(salgo, targetScreen[l]); + strcpy(salgo, targetSurface[l]); strcat(salgo, ".ald"); hare_x =- 1; carga_escoba(salgo); @@ -2720,7 +2720,7 @@ bool DrasculaEngine::exitRoom(int l) { if (objectNum[l] == 108) lleva_al_hare(171, 78); clearRoom(); - strcpy(salgo, targetScreen[l]); + strcpy(salgo, targetSurface[l]); strcat(salgo, ".ald"); hare_x = -1; carga_escoba(salgo); @@ -2739,7 +2739,7 @@ bool DrasculaEngine::exitRoom(int l) { previousMusic = roomMusic; hare_se_ve = 1; clearRoom(); - strcpy(salgo, targetScreen[l]); + strcpy(salgo, targetSurface[l]); strcat(salgo, ".ald"); hare_x = -1; carga_escoba(salgo); @@ -2757,7 +2757,7 @@ bool DrasculaEngine::exitRoom(int l) { doBreak = 1; previousMusic = roomMusic; clearRoom(); - strcpy(salgo, targetScreen[l]); + strcpy(salgo, targetSurface[l]); strcat(salgo, ".ald"); hare_x = -1; carga_escoba(salgo); @@ -4019,83 +4019,83 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta } } -void DrasculaEngine::response(int funcion) { +void DrasculaEngine::response(int function) { if (num_ejec == 1) { - if (funcion == 10) - talk_drunk(_textb[_lang][1], "B1.als"); - else if (funcion == 11) - talk_drunk(_textb[_lang][2], "B2.als"); - else if (funcion == 12) - talk_drunk(_textb[_lang][3], "B3.als"); + if (function == 10) + talk_drunk(1); + else if (function == 11) + talk_drunk(2); + else if (function == 12) + talk_drunk(3); } else if (num_ejec == 2) { - if (funcion == 8) + if (function == 8) animation_8_2(); - else if (funcion == 9) + else if (function == 9) animation_9_2(); - else if (funcion == 10) + else if (function == 10) animation_10_2(); - else if (funcion == 15) + else if (function == 15) animation_15_2(); - else if (funcion == 16) + else if (function == 16) animation_16_2(); - else if (funcion == 17) + else if (function == 17) animation_17_2(); - else if (funcion == 19) + else if (function == 19) animation_19_2(); - else if (funcion == 20) + else if (function == 20) animation_20_2(); - else if (funcion == 21) + else if (function == 21) animation_21_2(); - else if (funcion == 23) + else if (function == 23) animation_23_2(); - else if (funcion == 28) + else if (function == 28) animation_28_2(); - else if (funcion == 29) + else if (function == 29) animation_29_2(); - else if (funcion == 30) + else if (function == 30) animation_30_2(); - else if (funcion == 31) + else if (function == 31) animation_31_2(); } else if (num_ejec == 4) { - if (funcion == 2) + if (function == 2) animation_2_4(); - else if (funcion == 3) + else if (function == 3) animation_3_4(); - else if (funcion == 4) + else if (function == 4) animation_4_4(); } else if (num_ejec == 5) { - if (funcion == 2) + if (function == 2) animation_2_5(); - else if (funcion == 3) + else if (function == 3) animation_3_5(); - else if (funcion == 6) + else if (function == 6) animation_6_5(); - else if (funcion == 7) + else if (function == 7) animation_7_5(); - else if (funcion == 8) + else if (function == 8) animation_8_5(); - else if (funcion == 15) + else if (function == 15) animation_15_5(); - else if (funcion == 16) + else if (function == 16) animation_16_5(); - else if (funcion == 17) + else if (function == 17) animation_17_5(); } else if (num_ejec == 6) { - if (funcion == 2) + if (function == 2) animation_2_6(); - else if (funcion == 3) + else if (function == 3) animation_3_6(); - else if (funcion == 4) + else if (function == 4) animation_4_6(); - else if (funcion == 11) + else if (function == 11) animation_11_6(); - else if (funcion == 12) + else if (function == 12) animation_12_6(); - else if (funcion == 13) + else if (function == 13) animation_13_6(); - else if (funcion == 14) + else if (function == 14) animation_14_6(); - else if (funcion == 15) + else if (function == 15) animation_15_6(); } } @@ -4299,11 +4299,7 @@ void DrasculaEngine::pon_vb() { } void DrasculaEngine::lleva_vb(int pointX) { - if (pointX < vb_x) - sentido_vb = 0; - else - sentido_vb = 1; - + sentido_vb = (pointX < vb_x) ? 0 : 1; vb_se_mueve = 1; for (;;) { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 22610accd0..3ed0793a25 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -238,7 +238,7 @@ public: void releaseGame(); void loadPic(const char *); - void decompressPic(byte *dir_escritura, int plt); + void decompressPic(byte *targetSurface, int colorCount); typedef char DacPalette256[256][3]; @@ -290,7 +290,7 @@ public: int objectNum[40], visible[40], isDoor[40]; int sitiobj_x[40], sitiobj_y[40], sentidobj[40]; int inventoryObjects[43]; - char targetScreen[40][20]; + char targetSurface[40][20]; int x_alakeva[40], y_alakeva[40], sentido_alkeva[40], alapuertakeva[40]; int x1[40], y1[40], x2[40], y2[40]; int takeObject, pickedObject; @@ -509,6 +509,7 @@ public: void talk(int); void talk(const char *, const char *); void talk_sinc(const char *, const char *, const char *); + void talk_drunk(int); void talk_drunk(const char *said, const char *filename); void talk_pianista(const char *said, const char *filename); void talk_igor_seated(int); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 3a5820c241..669d1a7719 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -669,6 +669,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } +void DrasculaEngine::talk_drunk(int index) { + char name[20]; + sprintf(name, "B%i.als", index); + talk_drunk(_textb[_lang][index], name); +} + void DrasculaEngine::talk_drunk(const char *said, const char *filename) { int x_talk[8] = { 1, 21, 41, 61, 81, 101, 121, 141 }; int face; -- cgit v1.2.3 From d2c337401ecea5f4fb247a689c884a111cc325c0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 11:04:40 +0000 Subject: Simplified calls to playSound() svn-id: r32395 --- engines/drascula/animation.cpp | 40 ++++++++++++++++++++-------------------- engines/drascula/drascula.cpp | 13 ++++++++----- engines/drascula/drascula.h | 2 +- engines/drascula/rooms.cpp | 16 ++++++++-------- 4 files changed, 37 insertions(+), 34 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index c94dea17d0..926c985063 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -103,7 +103,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); - playSound("s5.als"); + playSound(5); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (animate("scr2.bin", 17)) @@ -287,7 +287,7 @@ void DrasculaEngine::animation_1_1() { break; if (animate("rayo1.bin", 16)) break; - playSound("s5.als"); + playSound(5); if (animate("rayo2.bin", 15)) break; if (animate("frel2.bin", 16)) @@ -434,7 +434,7 @@ void DrasculaEngine::animation_2_1() { break; pause(4); - playSound("s1.als"); + playSound(1); hiccup(18); stopSound(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -721,7 +721,7 @@ void DrasculaEngine::animation_2_2() { updateAnim(55, 201, 87, 50, 52, 6, frontSurface); updateAnim(109, 201, 87, 50, 52, 6, frontSurface); - playSound("s2.als"); + playSound(2); updateAnim(1, 201, 87, 50, 52, 6, extraSurface); updateAnim(55, 201, 87, 50, 52, 6, extraSurface); @@ -734,7 +734,7 @@ void DrasculaEngine::animation_2_2() { pause (4); - playSound("s1.als"); + playSound(1); hipo_sin_nadie(12); stopSound(); } @@ -882,7 +882,7 @@ void DrasculaEngine::animation_14_2() { decompressPic(drawSurface1, 1); - playSound("s7.als"); + playSound(7); hiccup(15); stopSound(); @@ -1220,7 +1220,7 @@ void DrasculaEngine::animation_25_2() { flags[24] = 0; - playSound("s6.als"); + playSound(6); for (n = 0; n >= -160; n = n - 8) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -1376,7 +1376,7 @@ void DrasculaEngine::animation_35_2() { pause(19); - playSound("s1.als"); + playSound(1); hipo_sin_nadie(18); stopSound(); @@ -1516,7 +1516,7 @@ void DrasculaEngine::animation_rayo() { pause(50); - playSound("s5.als"); + playSound(5); updateScreen(0, 0, 0, 0, 320, 200, extraSurface); pause(3); @@ -1709,7 +1709,7 @@ void DrasculaEngine::animation_5_5(){ } updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); - playSound("s1.als"); + playSound(1); stopSound(); loadPic("99.alg"); @@ -1786,7 +1786,7 @@ void DrasculaEngine::animation_12_5() { updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(27); animate("rayo1.bin", 23); - playSound("s5.als"); + playSound(5); animate("rayo2.bin", 17); sentido_hare = 1; updateRoom(); @@ -1861,7 +1861,7 @@ void DrasculaEngine::animation_12_5() { flags[1] = 1; animation_13_5(); - playSound("s1.als"); + playSound(1); hiccup(12); stopSound(); @@ -1927,7 +1927,7 @@ void DrasculaEngine::animation_13_5() { void DrasculaEngine::animation_14_5() { flags[11] = 1; - playSound("s3.als"); + playSound(3); updateRoom(); updateScreen(0, 0, 0,0 , 320, 200, screenSurface); stopSound(); @@ -1936,7 +1936,7 @@ void DrasculaEngine::animation_14_5() { talk(246); lleva_al_hare(89, 160); flags[10] = 1; - playSound("s7.als"); + playSound(7); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); stopSound(); @@ -2199,7 +2199,7 @@ void DrasculaEngine::animation_9_6() { } void DrasculaEngine::animation_10_6() { - playSound ("s14.als"); + playSound(14); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); copyBackground(164, 85, 155, 48, 113, 114, drawSurface3, screenSurface); @@ -2254,7 +2254,7 @@ void DrasculaEngine::animation_19_6() { pause(6); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - playSound("s4.als"); + playSound(4); pause(6); stopSound(); } @@ -2342,7 +2342,7 @@ void DrasculaEngine::animation_26_2() { updateScreen(225, 113, 225, 113, 50, 59, screenSurface); x = x + 50; if (n == 2) - playSound("s9.als"); + playSound(9); pause(3); } @@ -2421,7 +2421,7 @@ void DrasculaEngine::animation_22_2() { sentido_hare=2; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - playSound("s13.als"); + playSound(13); stopSound(); sentido_hare = 1; @@ -2502,7 +2502,7 @@ void DrasculaEngine::animation_34_2() { updateAnim(1, 218, 79, 83, 75, 3, backSurface); updateAnim(77, 218, 79, 83, 75, 3, backSurface); - playSound("s8.als"); + playSound(8); updateAnim(1, 218, 79, 83, 75, 3, extraSurface); @@ -2637,7 +2637,7 @@ void DrasculaEngine::animation_5_2() { updateAnim(86, 213, 66, 53, 84, 6, extraSurface); updateAnim(1, 213, 66, 53, 84, 6, frontSurface); - playSound("s1.als"); + playSound(1); updateAnim(86, 213, 66, 53, 84, 6, frontSurface); stopSound_corte(); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 2a28f14c89..79a10984b4 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -2022,7 +2022,10 @@ imprimir: } } -void DrasculaEngine::playSound(const char *file) { +void DrasculaEngine::playSound(int soundNum) { + char file[20]; + sprintf(file, "s%i.als", soundNum); + if (hay_sb == 1) { sku = new Common::File; sku->open(file); @@ -3269,7 +3272,7 @@ void DrasculaEngine::enterName() { void DrasculaEngine::para_grabar(char gameName[]) { saveGame(gameName); - playSound("99.als"); + playSound(99); stopSound(); } @@ -4360,11 +4363,11 @@ void DrasculaEngine::openDoor(int nflag, int doorNum) { if (flags[nflag] == 0) { if (num_ejec == 1 /*|| num_ejec == 4*/) { if (nflag != 7) { - playSound("s3.als"); + playSound(3); flags[nflag] = 1; } } else { - playSound("s3.als"); + playSound(3); flags[nflag] = 1; } @@ -4458,7 +4461,7 @@ void DrasculaEngine::activatePendulum() { void DrasculaEngine::closeDoor(int nflag, int doorNum) { if (flags[nflag] == 1) { - playSound("s4.als"); + playSound(4); flags[nflag] = 0; if (doorNum != NO_DOOR) updateDoor(doorNum); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 3ed0793a25..1f326d29b5 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -470,7 +470,7 @@ public: char LimitaVGA(char value); void color_abc(int cl); void centerText(const char *,int,int); - void playSound(const char *); + void playSound(int soundNum); bool animate(const char *animation, int FPS); void stopSound_corte(); void fadeToBlack(int VelocidadDeFundido); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 893cd4bfae..d136f7285b 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -383,7 +383,7 @@ void DrasculaEngine::room_6(int fl){ copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, drawSurface3, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(10); - playSound("s3.als"); + playSound(3); flags[2] = 1; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -395,7 +395,7 @@ void DrasculaEngine::room_6(int fl){ copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, drawSurface3, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(5); - playSound("s4.als"); + playSound(4); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); stopSound(); @@ -405,7 +405,7 @@ void DrasculaEngine::room_6(int fl){ copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, drawSurface3, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(19); - playSound("s3.als"); + playSound(3); flags[1] = 1; visible[4] = 1; visible[2] = 0; @@ -554,7 +554,7 @@ void DrasculaEngine::room_15(int fl) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); copyRect(133, 135, hare_x + 6, hare_y, 39, 63, drawSurface3, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - playSound("s8.als"); + playSound(8); stopSound(); talk(338); flags[27] = 0; @@ -749,7 +749,7 @@ void DrasculaEngine::room_22(int fl) { } else if (pickedObject == 22 && fl == 52) { animate("up.bin",14); flags[26]=1; - playSound("s1.als"); + playSound(1); hiccup(14); stopSound(); withoutVerb(); @@ -1104,7 +1104,7 @@ void DrasculaEngine::room_55(int fl) { else if (pickedObject == kVerbLook && fl == 205) talk(140); else if (fl == 206) { - playSound("s11.als"); + playSound(11); animate("det.bin", 17); stopSound(); lleva_al_hare(hare_x - 3, hare_y + alto_hare + 6); @@ -1150,7 +1150,7 @@ void DrasculaEngine::room_59(int fl) { talk(265); flags[9] = 0; if (flags[11] == 0) { - playSound("s12.als"); + playSound(12); delay(40); stopSound(); delay(10); @@ -1159,7 +1159,7 @@ void DrasculaEngine::room_59(int fl) { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(40); - playSound("s12.als"); + playSound(12); pause(19); stopSound_corte(); hare_se_ve = 0; -- cgit v1.2.3 From b6b1b864be18517b0936ec0b76e8b35509133405 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Fri, 30 May 2008 11:12:14 +0000 Subject: Checked that opcodes 0x71-0x73 really do nothing else but read the parameters in PC versions of Future Wars and Operation Stealth. Maybe they're used in the Amiga versions? svn-id: r32396 --- engines/cine/script_fw.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/engines/cine/script_fw.cpp b/engines/cine/script_fw.cpp index 6b9538e25d..845120c99e 100644 --- a/engines/cine/script_fw.cpp +++ b/engines/cine/script_fw.cpp @@ -1609,7 +1609,8 @@ int FWScript::o1_stopSample() { return 0; } -/*! \todo Implement this instruction +/*! \todo Implement this instruction's Amiga part (PC part already done) + * In PC versions of Future Wars and Operation Stealth this instruction does nothing else but read the parameters. */ int FWScript::o1_op71() { byte a = getNextByte(); @@ -1618,7 +1619,8 @@ int FWScript::o1_op71() { return 0; } -/*! \todo Implement this instruction +/*! \todo Implement this instruction's Amiga part (PC part already done) + * In PC versions of Future Wars and Operation Stealth this instruction does nothing else but read the parameters. */ int FWScript::o1_op72() { uint16 a = getNextWord(); @@ -1628,7 +1630,8 @@ int FWScript::o1_op72() { return 0; } -/*! \todo Implement this instruction +/*! \todo Implement this instruction's Amiga part (PC part already done) + * In PC versions of Future Wars and Operation Stealth this instruction does nothing else but read the parameters. */ int FWScript::o1_op73() { // I believe this opcode is identical to o1_op72(). In fact, Operation @@ -1636,7 +1639,7 @@ int FWScript::o1_op73() { uint16 a = getNextWord(); byte b = getNextByte(); uint16 c = getNextWord(); - warning("STUB: o1_op72(%x, %x, %x)", a, b, c); + warning("STUB: o1_op73(%x, %x, %x)", a, b, c); return 0; } -- cgit v1.2.3 From dcbbd33dc8c7a5c89e5acd5acf1cf0a91c969a70 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Fri, 30 May 2008 13:10:52 +0000 Subject: Detect the full version of Blue's Reading Time Activities, based on old forum post. svn-id: r32397 --- engines/scumm/detection_tables.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 474707ec55..11d803e42b 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -116,7 +116,7 @@ static const PlainGameDescriptor gameDescriptions[] = { { "PuttsFunShop", "Putt-Putt's One-Stop Fun Shop" }, { "putttime", "Putt-Putt Travels Through Time" }, { "puttzoo", "Putt-Putt Saves the Zoo" }, - { "readdemo", "Blue's Reading Time Activities (Demo)" }, + { "readtime", "Blue's Reading Time Activities" }, { "SamsFunShop", "Pajama Sam's One-Stop Fun Shop" }, { "soccer", "Backyard Soccer" }, { "Soccer2004", "Backyard Soccer 2004" }, @@ -353,7 +353,7 @@ static const GameSettings gameVariantsTable[] = { // Uses smacker in external files, for testing only {"arttime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK}, - {"readdemo", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK}, + {"readtime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK}, {"football2002", 0, 0, GID_FOOTBALL, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK}, @@ -752,8 +752,9 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "puttzoo", "zoodemo", kGenHEPC, UNK_LANG, UNK, 0 }, { "puttzoo", "Zoo Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, - { "readdemo", "readDemo", kGenHEPC, UNK_LANG, UNK, 0 }, - { "readdemo", "Blues-ReadingTime Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "readtime", "Blue's Reading Time", kGenHEPC, UNK_LANG, UNK, 0 }, + { "readtime", "readDemo", kGenHEPC, UNK_LANG, UNK, 0 }, + { "readtime", "Blues-ReadingTime Demo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "SamsFunShop", "SamsFunShop", kGenHEPC, UNK_LANG, UNK, 0 }, { "SamsFunShop", "Sam's FunShop", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, -- cgit v1.2.3 From 4837ff8b9be211eff889100a72dfbbf58e0fc2a0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 14:25:03 +0000 Subject: - Merged loadPic and decompressPic - talk_pianista -> talk_pianist - Wrapped up talk_pianist, talk_wolf, talk_htel and talk_mus - Did some cleanup in room logic svn-id: r32398 --- engines/drascula/animation.cpp | 624 +++++++++++++++-------------------------- engines/drascula/drascula.cpp | 157 ++++------- engines/drascula/drascula.h | 13 +- engines/drascula/rooms.cpp | 73 ++--- engines/drascula/talk.cpp | 32 ++- 5 files changed, 341 insertions(+), 558 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 926c985063..c07cff51b3 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -76,8 +76,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); - loadPic("cielo.alg"); - decompressPic(screenSurface, 256); + loadAndDecompressPic("cielo.alg", screenSurface, COMPLETE_PAL); black(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); fadeFromBlack(2); @@ -111,8 +110,7 @@ void DrasculaEngine::animation_1_1() { stopSound_corte(); if (animate("scr3.bin", 17)) break; - loadPic("cielo2.alg"); - decompressPic(screenSurface, 256); + loadAndDecompressPic("cielo2.alg", screenSurface, COMPLETE_PAL); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -121,14 +119,10 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); - loadPic("96.alg"); - decompressPic(frontSurface, COMPLETE_PAL); - loadPic("103.alg"); - decompressPic(drawSurface1, HALF_PAL); - loadPic("104.alg"); - decompressPic(drawSurface3, 1); - loadPic("aux104.alg"); - decompressPic(drawSurface2, 1); + loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); + loadAndDecompressPic("103.alg", drawSurface1, HALF_PAL); + loadAndDecompressPic("104.alg", drawSurface3, 1); + loadAndDecompressPic("aux104.alg", drawSurface2, 1); playMusic(4); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -188,12 +182,9 @@ void DrasculaEngine::animation_1_1() { clearRoom(); - loadPic("100.alg"); - decompressPic(drawSurface1, HALF_PAL); - loadPic("auxigor.alg"); - decompressPic(frontSurface, 1); - loadPic("auxdr.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("100.alg", drawSurface1, HALF_PAL); + loadAndDecompressPic("auxigor.alg", frontSurface, 1); + loadAndDecompressPic("auxdr.alg", backSurface, 1); sentido_dr = 0; x_dr = 129; y_dr = 95; @@ -224,15 +215,13 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); color_solo = kColorRed; - loadPic("plan1.alg"); - decompressPic(screenSurface, HALF_PAL); + loadAndDecompressPic("plan1.alg", screenSurface, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(10); talk_solo(_textd[_lang][4],"d4.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - loadPic("plan1.alg"); - decompressPic(screenSurface, HALF_PAL); + loadAndDecompressPic("plan1.alg", screenSurface, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk_solo(_textd[_lang][5], "d5.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -240,8 +229,7 @@ void DrasculaEngine::animation_1_1() { if (animate("lib2.bin", 16)) break; clearRoom(); - loadPic("plan2.alg"); - decompressPic(screenSurface, HALF_PAL); + loadAndDecompressPic("plan2.alg", screenSurface, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(20); talk_solo(_textd[_lang][6], "d6.als"); @@ -250,8 +238,7 @@ void DrasculaEngine::animation_1_1() { if (animate("lib2.bin", 16)) break; clearRoom(); - loadPic("plan3.alg"); - decompressPic(screenSurface, HALF_PAL); + loadAndDecompressPic("plan3.alg", screenSurface, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(20); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -259,15 +246,13 @@ void DrasculaEngine::animation_1_1() { talk_solo(_textd[_lang][7], "d7.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - loadPic("plan3.alg"); - decompressPic(screenSurface, HALF_PAL); + loadAndDecompressPic("plan3.alg", screenSurface, HALF_PAL); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk_solo(_textd[_lang][8], "d8.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); - loadPic("100.alg"); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic("100.alg", drawSurface1, HALF_PAL); MusicFadeout(); stopMusic(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -392,10 +377,8 @@ void DrasculaEngine::animation_1_1() { term_int = 1; } clearRoom(); - loadPic("96.alg"); - decompressPic(frontSurface, COMPLETE_PAL); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); + loadAndDecompressPic("99.alg", backSurface, 1); } void DrasculaEngine::animation_2_1() { @@ -416,8 +399,7 @@ void DrasculaEngine::animation_2_1() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an11y13.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("an11y13.alg", extraSurface, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -428,8 +410,7 @@ void DrasculaEngine::animation_2_1() { if (_lang == kSpanish) textSurface = extraSurface; - loadPic("97.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -453,8 +434,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); - loadPic("bj.alg"); - decompressPic(screenSurface, HALF_PAL); + loadAndDecompressPic("bj.alg", screenSurface, HALF_PAL); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; black(); @@ -468,12 +448,10 @@ void DrasculaEngine::animation_2_1() { break; clearRoom(); - loadPic("16.alg"); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic("16.alg", drawSurface1, HALF_PAL); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - loadPic("auxbj.alg"); - decompressPic(drawSurface3, 1); + loadAndDecompressPic("auxbj.alg", drawSurface3, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -493,8 +471,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - loadPic("97g.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("97g.alg", extraSurface, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -530,10 +507,7 @@ void DrasculaEngine::animation_2_1() { if (animate("bjb.bin", 14)) break; playMusic(9); - loadPic("97.alg"); - if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) - break; - decompressPic(extraSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateRoom(); @@ -620,8 +594,7 @@ void DrasculaEngine::animation_3_1() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an11y13.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("an11y13.alg", extraSurface, 1); talk(192); talk_tabernero(1); @@ -649,16 +622,14 @@ void DrasculaEngine::animation_3_1() { if (_lang == kSpanish) textSurface = extraSurface; - loadPic("97.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); } void DrasculaEngine::animation_4_1() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an12.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("an12.alg", extraSurface, 1); talk(205); @@ -680,21 +651,20 @@ void DrasculaEngine::animation_4_1() { stopMusic(); flags[11] = 1; - talk_pianista(_textp[_lang][1], "p1.als"); + talk_pianist(_textp[_lang][1], "p1.als"); talk(206); - talk_pianista(_textp[_lang][2], "p2.als"); + talk_pianist(_textp[_lang][2], "p2.als"); talk(207); - talk_pianista(_textp[_lang][3], "p3.als"); + talk_pianist(_textp[_lang][3], "p3.als"); talk(208); - talk_pianista(_textp[_lang][4], "p4.als"); + talk_pianist(_textp[_lang][4], "p4.als"); talk(209); if (_lang == kSpanish) textSurface = extraSurface; flags[11] = 0; - loadPic("97.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); } void DrasculaEngine::animation_1_2() { @@ -708,10 +678,8 @@ void DrasculaEngine::animation_2_2() { pon_hare(); updateRefresh(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - loadPic("an2_1.alg"); - decompressPic(frontSurface, 1); - loadPic("an2_2.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("an2_1.alg", frontSurface, 1); + loadAndDecompressPic("an2_2.alg", extraSurface, 1); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); copyBackground(1, 1, 201, 87, 50, 52, frontSurface, screenSurface); @@ -754,16 +722,11 @@ void DrasculaEngine::animation_4_2() { pause(8); clearRoom(); - loadPic("ciego1.alg"); // ciego = blind - decompressPic(drawSurface1, HALF_PAL); - loadPic("ciego2.alg"); - decompressPic(drawSurface3, 1); - loadPic("ciego3.alg"); - decompressPic(extraSurface, 1); - loadPic("ciego4.alg"); - decompressPic(backSurface, 1); - loadPic("ciego5.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind + loadAndDecompressPic("ciego2.alg", drawSurface3, 1); + loadAndDecompressPic("ciego3.alg", extraSurface, 1); + loadAndDecompressPic("ciego4.alg", backSurface, 1); + loadAndDecompressPic("ciego5.alg", frontSurface, 1); if (_lang == kSpanish) textSurface = frontSurface; @@ -806,16 +769,11 @@ void DrasculaEngine::animation_4_2() { clearRoom(); playMusic(roomMusic); - loadPic("9.alg"); - decompressPic(drawSurface1, HALF_PAL); - loadPic("aux9.alg"); - decompressPic(drawSurface3, 1); - loadPic("96.alg"); - decompressPic(frontSurface, 1); - loadPic("97.alg"); - decompressPic(extraSurface, 1); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("9.alg", drawSurface1, HALF_PAL); + loadAndDecompressPic("aux9.alg", drawSurface3, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); withoutVerb(); if (_lang == kSpanish) @@ -826,38 +784,36 @@ void DrasculaEngine::animation_4_2() { } void DrasculaEngine::animation_8_2() { - talk_pianista(_textp[_lang][6], "P6.als"); + talk_pianist(6); talk(358); - talk_pianista(_textp[_lang][7], "P7.als"); - talk_pianista(_textp[_lang][8], "P8.als"); + talk_pianist(7); + talk_pianist(8); } void DrasculaEngine::animation_9_2() { - talk_pianista(_textp[_lang][9], "P9.als"); - talk_pianista(_textp[_lang][10], "P10.als"); - talk_pianista(_textp[_lang][11], "P11.als"); + talk_pianist(9); + talk_pianist(10); + talk_pianist(11); } void DrasculaEngine::animation_10_2() { - talk_pianista(_textp[_lang][12], "P12.als"); + talk_pianist(12); talk(361); pause(40); - talk_pianista(_textp[_lang][13], "P13.als"); + talk_pianist(13); talk(362); - talk_pianista(_textp[_lang][14], "P14.als"); + talk_pianist(14); talk(363); - talk_pianista(_textp[_lang][15], "P15.als"); + talk_pianist(15); talk(364); - talk_pianista(_textp[_lang][16], "P16.als"); + talk_pianist(16); } void DrasculaEngine::animation_14_2() { int n, pos_cabina[6]; int l = 0; - loadPic("an14_2.alg"); - decompressPic(backSurface, 1); - loadPic("an14_1.alg"); + loadAndDecompressPic("an14_2.alg", backSurface, 1); pos_cabina[0] = 150; pos_cabina[1] = 6; @@ -887,8 +843,7 @@ void DrasculaEngine::animation_14_2() { stopSound(); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); } void DrasculaEngine::animation_15_2() { @@ -919,8 +874,7 @@ void DrasculaEngine::animation_16_2() { if (_lang != kSpanish) color_abc(kColorDarkGreen); - loadPic("his1.alg"); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic("his1.alg", drawSurface1, HALF_PAL); if (_lang == kSpanish) black(); @@ -954,8 +908,7 @@ void DrasculaEngine::animation_16_2() { goto asco; clearRoom(); - loadPic("his2.alg"); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic("his2.alg", drawSurface1, HALF_PAL); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); if (_lang != kSpanish) @@ -981,8 +934,7 @@ void DrasculaEngine::animation_16_2() { goto asco; clearRoom(); - loadPic("his3.alg"); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic("his3.alg", drawSurface1, HALF_PAL); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); if (_lang != kSpanish) @@ -1005,10 +957,8 @@ void DrasculaEngine::animation_16_2() { fadeToBlack(1); clearRoom(); - loadPic("his4_1.alg"); - decompressPic(drawSurface1, HALF_PAL); - loadPic("his4_2.alg"); - decompressPic(drawSurface3, 1); + loadAndDecompressPic("his4_1.alg", drawSurface1, HALF_PAL); + loadAndDecompressPic("his4_2.alg", drawSurface3, 1); copyBackground(0, 0, 0, 0, 320, 200, drawSurface3, screenSurface); @@ -1043,12 +993,10 @@ void DrasculaEngine::animation_16_2() { clearRoom(); asco: - loadPic(roomDisk); - decompressPic(drawSurface3, 1); + loadAndDecompressPic(roomDisk, drawSurface3, 1); char rm[20]; sprintf(rm, "%i.alg", roomNumber); - loadPic(rm); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic(rm, drawSurface1, HALF_PAL); black(); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1104,8 +1052,7 @@ void DrasculaEngine::animation_21_2() { } void DrasculaEngine::animation_23_2() { - loadPic("an24.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("an24.alg", frontSurface, 1); flags[21] = 1; @@ -1166,8 +1113,7 @@ void DrasculaEngine::animation_23_anexo() { int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 1, 1, 1, 1}; - loadPic("an23.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("an23.alg", backSurface, 1); for (n = 0; n < 34; n++) { copyRect(p_x, p_y, p_x, p_y, 36, 74, drawSurface1, screenSurface); @@ -1177,8 +1123,7 @@ void DrasculaEngine::animation_23_anexo() { pause(5); } - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); } void DrasculaEngine::animation_23_anexo2() { @@ -1188,8 +1133,7 @@ void DrasculaEngine::animation_23_anexo2() { pause(50); - loadPic("an23_2.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("an23_2.alg", backSurface, 1); for (n = 0; n < 14; n++) { copyRect(p_x, p_y, p_x, p_y, 33, 71, drawSurface1, screenSurface); @@ -1199,17 +1143,14 @@ void DrasculaEngine::animation_23_anexo2() { pause(5); } - loadPic("99.alg"); - decompressPic(backSurface,1); + loadAndDecompressPic("99.alg", backSurface,1); } void DrasculaEngine::animation_25_2() { int n, pos_cabina[6]; - loadPic("an14_2.alg"); - decompressPic(backSurface, 1); - loadPic("18.alg"); - decompressPic(drawSurface1, 1); + loadAndDecompressPic("an14_2.alg", backSurface, 1); + loadAndDecompressPic("18.alg", drawSurface1, 1); pos_cabina[0] = 150; pos_cabina[1] = 6; @@ -1239,8 +1180,7 @@ void DrasculaEngine::animation_25_2() { stopSound(); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); } void DrasculaEngine::animation_27_2() { @@ -1263,10 +1203,8 @@ void DrasculaEngine::animation_27_2() { } void DrasculaEngine::animation_28_2() { - talk_vb(27); - talk_vb(28); - talk_vb(29); - talk_vb(30); + for(int i = 27; i <= 30; i++) + talk_vb(i); } void DrasculaEngine::animation_29_2() { @@ -1310,8 +1248,7 @@ void DrasculaEngine::animation_31_2() { lleva_vb(-50); pause(15); lleva_al_hare(159, 140); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); sentido_hare = 2; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1360,10 +1297,8 @@ void DrasculaEngine::animation_35_2() { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - loadPic("an35_1.alg"); - decompressPic(backSurface, 1); - loadPic("an35_2.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("an35_1.alg", backSurface, 1); + loadAndDecompressPic("an35_2.alg", frontSurface, 1); updateAnim(1, 70, 90, 46, 80, 6, backSurface); updateAnim(82, 70, 90, 46, 80, 6, backSurface); @@ -1405,12 +1340,9 @@ void DrasculaEngine::animation_2_3() { flags[0] = 0; flags[1] = 1; - loadPic("96.alg"); - decompressPic(frontSurface, 1); - loadPic("97.alg"); - decompressPic(extraSurface, 1); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); lleva_al_hare(332, 127); } @@ -1418,12 +1350,9 @@ void DrasculaEngine::animation_2_3() { void DrasculaEngine::animation_3_3() { int px = hare_x - 20, py = hare_y - 1; - loadPic("an2y_1.alg"); - decompressPic(frontSurface, 1); - loadPic("an2y_2.alg"); - decompressPic(extraSurface, 1); - loadPic("an2y_3.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("an2y_1.alg", frontSurface, 1); + loadAndDecompressPic("an2y_2.alg", extraSurface, 1); + loadAndDecompressPic("an2y_3.alg", backSurface, 1); updateAnim2(2, px, py, 71, 72, 4, frontSurface); updateAnim2(75, px, py, 71, 72, 4, frontSurface); @@ -1436,12 +1365,9 @@ void DrasculaEngine::animation_3_3() { void DrasculaEngine::animation_4_3() { int px = 120, py = 63; - loadPic("any_1.alg"); - decompressPic(frontSurface, 1); - loadPic("any_2.alg"); - decompressPic(extraSurface, 1); - loadPic("any_3.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("any_1.alg", frontSurface, 1); + loadAndDecompressPic("any_2.alg", extraSurface, 1); + loadAndDecompressPic("any_3.alg", backSurface, 1); updateAnim2(1, px, py, 77, 89, 4, frontSurface); updateAnim2(91, px, py, 77, 89, 4, frontSurface); @@ -1454,12 +1380,9 @@ void DrasculaEngine::animation_4_3() { void DrasculaEngine::animation_5_3() { int px = hare_x - 20, py = hare_y - 1; - loadPic("an3y_1.alg"); - decompressPic(frontSurface, 1); - loadPic("an3y_2.alg"); - decompressPic(extraSurface, 1); - loadPic("an3y_3.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("an3y_1.alg", frontSurface, 1); + loadAndDecompressPic("an3y_2.alg", extraSurface, 1); + loadAndDecompressPic("an3y_3.alg", backSurface, 1); updateAnim2(2, px, py, 71, 72, 4, frontSurface); updateAnim2(75, px, py, 71, 72, 4, frontSurface); @@ -1481,8 +1404,7 @@ void DrasculaEngine::animation_6_3() { flags[1] = 0; - loadPic("an4y.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("an4y.alg", frontSurface, 1); for (frame = 0; frame < 6; frame++) { pause(3); @@ -1493,24 +1415,18 @@ void DrasculaEngine::animation_6_3() { flags[2] = 1; - loadPic("96.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } void DrasculaEngine::animation_rayo() { - loadPic("anr_1.alg"); - decompressPic(frontSurface, HALF_PAL); - loadPic("anr_2.alg"); - decompressPic(extraSurface, 1); - loadPic("anr_3.alg"); - decompressPic(backSurface, 1); - loadPic("anr_4.alg"); - decompressPic(drawSurface1, 1); - loadPic("anr_5.alg"); - decompressPic(drawSurface3, 1); + loadAndDecompressPic("anr_1.alg", frontSurface, HALF_PAL); + loadAndDecompressPic("anr_2.alg", extraSurface, 1); + loadAndDecompressPic("anr_3.alg", backSurface, 1); + loadAndDecompressPic("anr_4.alg", drawSurface1, 1); + loadAndDecompressPic("anr_5.alg", drawSurface3, 1); updateScreen(0, 0, 0, 0, 320, 200, frontSurface); @@ -1623,20 +1539,20 @@ void DrasculaEngine::animation_4_5() { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); talk(228); - talk_wolf(_textl[_lang][1], "L1.als"); - talk_wolf(_textl[_lang][2], "L2.als"); + talk_wolf(1); + talk_wolf(2); pause(23); talk(229); - talk_wolf(_textl[_lang][3], "L3.als"); - talk_wolf(_textl[_lang][4], "L4.als"); + talk_wolf(3); + talk_wolf(4); talk(230); - talk_wolf(_textl[_lang][5], "L5.als"); + talk_wolf(5); talk(231); - talk_wolf(_textl[_lang][6], "L6.als"); - talk_wolf(_textl[_lang][7], "L7.als"); + talk_wolf(6); + talk_wolf(7); pause(33); talk(232); - talk_wolf(_textl[_lang][8], "L8.als"); + talk_wolf(8); } void DrasculaEngine::animation_5_5(){ @@ -1655,10 +1571,8 @@ void DrasculaEngine::animation_5_5(){ updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - loadPic("3an5_1.alg"); - decompressPic(backSurface, 1); - loadPic("3an5_2.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("3an5_1.alg", backSurface, 1); + loadAndDecompressPic("3an5_2.alg", frontSurface, 1); for (frame = 0; frame < 9; frame++) { pause(3); @@ -1681,19 +1595,15 @@ void DrasculaEngine::animation_5_5(){ updateData(); pause(12); - loadPic("96.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); for (h = 0; h < (200 - 18); h++) copyBackground(0, 53, 0, h, 320, 19, frontSurface, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - loadPic("101.alg"); - decompressPic(drawSurface1, HALF_PAL); - loadPic("3an5_3.alg"); - decompressPic(backSurface, 1); - loadPic("3an5_4.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("101.alg", drawSurface1, HALF_PAL); + loadAndDecompressPic("3an5_3.alg", backSurface, 1); + loadAndDecompressPic("3an5_4.alg", extraSurface, 1); updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); pause(9); @@ -1712,36 +1622,33 @@ void DrasculaEngine::animation_5_5(){ playSound(1); stopSound(); - loadPic("99.alg"); - decompressPic(backSurface, 1); - loadPic("97.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); clearRoom(); - loadPic("49.alg"); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic("49.alg", drawSurface1, HALF_PAL); } void DrasculaEngine::animation_6_5() { - talk_wolf(_textl[_lang][9], "L9.als"); + talk_wolf(9); talk(234); } void DrasculaEngine::animation_7_5() { - talk_wolf(_textl[_lang][10], "L10.als"); + talk_wolf(10); talk(236); - talk_wolf(_textl[_lang][11], "L11.als"); - talk_wolf(_textl[_lang][12], "L12.als"); - talk_wolf(_textl[_lang][13], "L13.als"); + talk_wolf(11); + talk_wolf(12); + talk_wolf(13); pause(34); - talk_wolf(_textl[_lang][14], "L14.als"); + talk_wolf(14); } void DrasculaEngine::animation_8_5() { - talk_wolf(_textl[_lang][15], "L15.als"); + talk_wolf(15); talk(238); - talk_wolf(_textl[_lang][16], "L16.als"); + talk_wolf(16); } void DrasculaEngine::animation_9_5() { @@ -1819,8 +1726,7 @@ void DrasculaEngine::animation_12_5() { bgPalette3[color][component] = LimitaVGA(bgPalette3[color][component] - 8 + fundido); } - loadPic("3an11_1.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("3an11_1.alg", backSurface, 1); for (frame = 0; frame < 8; frame++) { if (frame == 2 || frame == 4 || frame == 8 || frame==10) @@ -1865,8 +1771,7 @@ void DrasculaEngine::animation_12_5() { hiccup(12); stopSound(); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); lleva_al_hare(40, 169); lleva_al_hare(-14, 175); @@ -1890,8 +1795,7 @@ void DrasculaEngine::animation_13_5() { int frus_y[] = {1, 1, 1, 1, 1, 1, 1, 89}; int pos_frusky[6]; - loadPic("auxfr.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("auxfr.alg", backSurface, 1); pos_frusky[3] = 81; pos_frusky[4] = 44; @@ -1949,19 +1853,19 @@ void DrasculaEngine::animation_14_5() { } void DrasculaEngine::animation_15_5() { - talk_mus(_texte[_lang][4], "E4.als"); - talk_mus(_texte[_lang][5], "E5.als"); - talk_mus(_texte[_lang][6], "E6.als"); + talk_mus(4); + talk_mus(5); + talk_mus(6); talk(291); - talk_mus(_texte[_lang][7], "E7.als"); + talk_mus(7); } void DrasculaEngine::animation_16_5() { - talk_mus(_texte[_lang][8], "E8.als"); + talk_mus(8); } void DrasculaEngine::animation_17_5() { - talk_mus(_texte[_lang][9], "E9.als"); + talk_mus(9); } void DrasculaEngine::animation_1_6() { @@ -1974,12 +1878,9 @@ void DrasculaEngine::animation_1_6() { for (l = 0; l < 200; l++) factor_red[l] = 98; - loadPic("auxig2.alg"); - decompressPic(frontSurface, 1); - loadPic("auxdr.alg"); - decompressPic(drawSurface2, 1); - loadPic("car.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("auxig2.alg", frontSurface, 1); + loadAndDecompressPic("auxdr.alg", drawSurface2, 1); + loadAndDecompressPic("car.alg", backSurface, 1); talk_dr_dch(19); talk(247); talk_dr_dch(20); @@ -2000,8 +1901,7 @@ void DrasculaEngine::animation_1_6() { talk_dr_dch(29); fadeToBlack(1); clearRoom(); - loadPic("time1.alg"); - decompressPic(screenSurface, 1); + loadAndDecompressPic("time1.alg", screenSurface, 1); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); delay(930); clearRoom(); @@ -2016,8 +1916,7 @@ void DrasculaEngine::animation_1_6() { talk(257); fadeToBlack(0); clearRoom(); - loadPic("time1.alg"); - decompressPic(screenSurface,1); + loadAndDecompressPic("time1.alg", screenSurface,1); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); delay(900); clearRoom(); @@ -2089,14 +1988,10 @@ void DrasculaEngine::animation_6_6() { clearRoom(); withoutVerb(); removeObject(20); - loadPic("96.alg"); - decompressPic(frontSurface, 1); - loadPic("97.alg"); - decompressPic(frontSurface, 1); - loadPic("97.alg"); - decompressPic(extraSurface, 1); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); + loadAndDecompressPic("97.alg", frontSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); doBreak = 1; objExit = 104; hare_x = -1; @@ -2137,8 +2032,7 @@ void DrasculaEngine::animation_9_6() { // Also check animation_2_1(), where the same hack was used // by the original roomNumber = -1; - loadPic("nota2.alg"); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic("nota2.alg", drawSurface1, HALF_PAL); black(); sentido_hare = 1; hare_x -= 21; @@ -2152,8 +2046,7 @@ void DrasculaEngine::animation_9_6() { updateScreen(0, 0, 0, 0, 320, 200, screenSurface); playMusic(9); clearRoom(); - loadPic("nota.alg"); - decompressPic(drawSurface1, COMPLETE_PAL); + loadAndDecompressPic("nota.alg", drawSurface1, COMPLETE_PAL); color_abc(kColorWhite); talk_solo(_textbj[_lang][24], "bj24.als"); talk_solo(_textbj[_lang][25], "bj25.als"); @@ -2162,10 +2055,8 @@ void DrasculaEngine::animation_9_6() { talk_solo(_textbj[_lang][28], "bj28.als"); sentido_hare = 3; clearRoom(); - loadPic("96.alg"); - decompressPic(frontSurface, COMPLETE_PAL); - loadPic("nota2.alg"); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); + loadAndDecompressPic("nota2.alg", drawSurface1, HALF_PAL); talk(296); talk(297); talk(298); @@ -2177,8 +2068,7 @@ void DrasculaEngine::animation_9_6() { updateScreen(0, 0, 0, 0, 320, 200, screenSurface); color_abc(kColorLightGreen); talk_solo("GOOOOOOOOOOOOOOOL", "s15.als"); - loadPic("nota2.alg"); - decompressPic(drawSurface1, 1); + loadAndDecompressPic("nota2.alg", drawSurface1, 1); sentido_hare = 0; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -2263,8 +2153,7 @@ void DrasculaEngine::animation_12_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an12.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("an12.alg", extraSurface, 1); talk(356); @@ -2286,23 +2175,21 @@ void DrasculaEngine::animation_12_2() { stopMusic(); flags[11] = 1; - talk_pianista(_textp[_lang][5], "P5.als"); + talk_pianist(5); converse("op_1.cal"); if (_lang == kSpanish) textSurface = extraSurface; flags[11] = 0; - loadPic("974.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("974.alg", extraSurface, 1); } void DrasculaEngine::animation_26_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an12.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("an12.alg", extraSurface, 1); talk(392); @@ -2324,14 +2211,13 @@ void DrasculaEngine::animation_26_2() { stopMusic(); flags[11] = 1; - talk_pianista(_textp[_lang][5], "P5.als"); + talk_pianist(5); talk(393); - talk_pianista(_textp[_lang][17], "P17.als"); - talk_pianista(_textp[_lang][18], "P18.als"); - talk_pianista(_textp[_lang][19], "P19.als"); + talk_pianist(17); + talk_pianist(18); + talk_pianist(19); - loadPic("an26.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("an26.alg", extraSurface, 1); updateAnim(1, 225, 113, 50, 59, 6, extraSurface); @@ -2358,8 +2244,7 @@ void DrasculaEngine::animation_26_2() { flags[11] = 0; flags[39] = 1; - loadPic("974.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("974.alg", extraSurface, 1); roomMusic = 16; } @@ -2367,8 +2252,7 @@ void DrasculaEngine::animation_11_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an11y13.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("an11y13.alg", extraSurface, 1); talk(352); talk_tabernero(1); @@ -2383,13 +2267,11 @@ void DrasculaEngine::animation_11_2() { if (_lang == kSpanish) textSurface = extraSurface; - loadPic("974.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("974.alg", extraSurface, 1); } void DrasculaEngine::animation_13_2() { - loadPic("an11y13.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("an11y13.alg", frontSurface, 1); if (flags[41] == 0) { talk(103); @@ -2405,8 +2287,7 @@ void DrasculaEngine::animation_13_2() { } converse("op_2.cal"); - loadPic("964.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("964.alg", frontSurface, 1); } void DrasculaEngine::animation_18_2() { @@ -2444,8 +2325,7 @@ void DrasculaEngine::animation_24_2() { talk(356); - loadPic("an24.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("an24.alg", frontSurface, 1); animation_32_2(); @@ -2466,10 +2346,8 @@ void DrasculaEngine::animation_24_2() { } void DrasculaEngine::animation_32_2() { - loadPic("an32_1.alg"); - decompressPic(drawSurface3, 1); - loadPic("an32_2.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("an32_1.alg", drawSurface3, 1); + loadAndDecompressPic("an32_2.alg", backSurface, 1); updateAnim(1, 113, 53, 65, 81, 4, drawSurface3, 4); updateAnim(83, 113, 53, 65, 81, 4, drawSurface3, 4); @@ -2485,8 +2363,7 @@ void DrasculaEngine::animation_32_2() { pause(4); } - loadPic("aux18.alg"); - decompressPic(drawSurface3, 1); + loadAndDecompressPic("aux18.alg", drawSurface3, 1); } void DrasculaEngine::animation_34_2() { @@ -2494,10 +2371,8 @@ void DrasculaEngine::animation_34_2() { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - loadPic("an34_1.alg"); - decompressPic(backSurface, 1); - loadPic("an34_2.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("an34_1.alg", backSurface, 1); + loadAndDecompressPic("an34_2.alg", extraSurface, 1); updateAnim(1, 218, 79, 83, 75, 3, backSurface); updateAnim(77, 218, 79, 83, 75, 3, backSurface); @@ -2514,18 +2389,15 @@ void DrasculaEngine::animation_34_2() { updateScreen(218, 79, 218, 79, 83, 75, screenSurface); pause(3); - loadPic("994.alg"); - decompressPic(backSurface, 1); - loadPic("974.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("994.alg", backSurface, 1); + loadAndDecompressPic("974.alg", extraSurface, 1); } void DrasculaEngine::animation_36_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an11y13.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("an11y13.alg", extraSurface, 1); talk(404); talk_tabernero(19); @@ -2538,17 +2410,13 @@ void DrasculaEngine::animation_36_2() { if (_lang == kSpanish) textSurface = extraSurface; - loadPic("974.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("974.alg", extraSurface, 1); } void DrasculaEngine::animation_7_2() { - loadPic("an7_1.alg"); - decompressPic(backSurface, 1); - loadPic("an7_2.alg"); - decompressPic(extraSurface, 1); - loadPic("an7_3.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("an7_1.alg", backSurface, 1); + loadAndDecompressPic("an7_2.alg", extraSurface, 1); + loadAndDecompressPic("an7_3.alg", frontSurface, 1); if (flags[3] == 1) copyBackground(258, 110, 85, 44, 23, 53, drawSurface3, drawSurface1); @@ -2563,14 +2431,10 @@ void DrasculaEngine::animation_7_2() { updateAnim2(75, 80, 64, 51, 73, 6, extraSurface); updateAnim2(1, 80, 64, 51, 73, 6, frontSurface); - loadPic("an7_4.alg"); - decompressPic(backSurface, 1); - loadPic("an7_5.alg"); - decompressPic(extraSurface, 1); - loadPic("an7_6.alg"); - decompressPic(frontSurface, 1); - loadPic("an7_7.alg"); - decompressPic(drawSurface3, 1); + loadAndDecompressPic("an7_4.alg", backSurface, 1); + loadAndDecompressPic("an7_5.alg", extraSurface, 1); + loadAndDecompressPic("an7_6.alg", frontSurface, 1); + loadAndDecompressPic("an7_7.alg", drawSurface3, 1); updateAnim2(1, 80, 64, 51, 73, 6, backSurface); updateAnim2(75, 80, 64, 51, 73, 6, backSurface); @@ -2583,10 +2447,8 @@ void DrasculaEngine::animation_7_2() { updateAnim2(1, 80, 64, 51, 73, 6, drawSurface3); updateAnim2(75, 80, 64, 51, 73, 2, drawSurface3); - loadPic("an7_8.alg"); - decompressPic(backSurface, 1); - loadPic("an7_9.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("an7_8.alg", backSurface, 1); + loadAndDecompressPic("an7_9.alg", extraSurface, 1); updateAnim2(1, 80, 64, 51, 73, 6, backSurface); updateAnim2(75, 80, 64, 51, 73, 6, backSurface); @@ -2601,14 +2463,10 @@ void DrasculaEngine::animation_7_2() { if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; - loadPic("99.alg"); - decompressPic(backSurface, 1); - loadPic("97.alg"); - decompressPic(extraSurface, 1); - loadPic("96.alg"); - decompressPic(frontSurface, 1); - loadPic("aux3.alg"); - decompressPic(drawSurface3, 1); + loadAndDecompressPic("99.alg", backSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); + loadAndDecompressPic("aux3.alg", drawSurface3, 1); } void DrasculaEngine::animation_5_2() { @@ -2616,14 +2474,10 @@ void DrasculaEngine::animation_5_2() { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - loadPic("an5_1.alg"); - decompressPic(backSurface, 1); - loadPic("an5_2.alg"); - decompressPic(extraSurface, 1); - loadPic("an5_3.alg"); - decompressPic(frontSurface, 1); - loadPic("an5_4.alg"); - decompressPic(drawSurface3, 1); + loadAndDecompressPic("an5_1.alg", backSurface, 1); + loadAndDecompressPic("an5_2.alg", extraSurface, 1); + loadAndDecompressPic("an5_3.alg", frontSurface, 1); + loadAndDecompressPic("an5_4.alg", drawSurface3, 1); copyBackground(1, 1, 213, 66, 53,84, backSurface, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -2643,14 +2497,10 @@ void DrasculaEngine::animation_5_2() { updateAnim(1, 213, 66, 53, 84, 6, drawSurface3); - loadPic("994.alg"); - decompressPic(backSurface, 1); - loadPic("974.alg"); - decompressPic(extraSurface, 1); - loadPic("964.alg"); - decompressPic(frontSurface, 1); - loadPic("aux5.alg"); - decompressPic(drawSurface3, 1); + loadAndDecompressPic("994.alg", backSurface, 1); + loadAndDecompressPic("974.alg", extraSurface, 1); + loadAndDecompressPic("964.alg", frontSurface, 1); + loadAndDecompressPic("aux5.alg", drawSurface3, 1); flags[8] = 1; hare_x = hare_x - 4; talk_sinc(_text[_lang][46], "46.als", "4442444244244"); @@ -2665,16 +2515,11 @@ void DrasculaEngine::animation_6_2() { textSurface = frontSurface; clearRoom(); - loadPic("ciego1.alg"); // ciego = blind - decompressPic(drawSurface1, HALF_PAL); - loadPic("ciego2.alg"); - decompressPic(drawSurface3, 1); - loadPic("ciego3.alg"); - decompressPic(extraSurface, 1); - loadPic("ciego4.alg"); - decompressPic(backSurface, 1); - loadPic("ciego5.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind + loadAndDecompressPic("ciego2.alg", drawSurface3, 1); + loadAndDecompressPic("ciego3.alg", extraSurface, 1); + loadAndDecompressPic("ciego4.alg", backSurface, 1); + loadAndDecompressPic("ciego5.alg", frontSurface, 1); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -2696,16 +2541,11 @@ void DrasculaEngine::animation_6_2() { clearRoom(); playMusic(roomMusic); - loadPic("9.alg"); - decompressPic(drawSurface1, HALF_PAL); - loadPic("aux9.alg"); - decompressPic(drawSurface3, 1); - loadPic("96.alg"); - decompressPic(frontSurface, 1); - loadPic("97.alg"); - decompressPic(extraSurface, 1); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("9.alg", drawSurface1, HALF_PAL); + loadAndDecompressPic("aux9.alg", drawSurface3, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); withoutVerb(); if (_lang == kSpanish) @@ -2723,16 +2563,11 @@ void DrasculaEngine::animation_33_2() { pause(8); clearRoom(); - loadPic("ciego1.alg"); // ciego = blind - decompressPic(drawSurface1, HALF_PAL); - loadPic("ciego2.alg"); - decompressPic(drawSurface3, 1); - loadPic("ciego3.alg"); - decompressPic(extraSurface, 1); - loadPic("ciego4.alg"); - decompressPic(backSurface, 1); - loadPic("ciego5.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind + loadAndDecompressPic("ciego2.alg", drawSurface3, 1); + loadAndDecompressPic("ciego3.alg", extraSurface, 1); + loadAndDecompressPic("ciego4.alg", backSurface, 1); + loadAndDecompressPic("ciego5.alg", frontSurface, 1); if (_lang == kSpanish) textSurface = frontSurface; @@ -2758,16 +2593,11 @@ void DrasculaEngine::animation_33_2() { clearRoom(); playMusic(roomMusic); - loadPic("9.alg"); - decompressPic(drawSurface1, HALF_PAL); - loadPic("aux9.alg"); - decompressPic(drawSurface3, 1); - loadPic("96.alg"); - decompressPic(frontSurface, 1); - loadPic("97.alg"); - decompressPic(extraSurface, 1); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("9.alg", drawSurface1, HALF_PAL); + loadAndDecompressPic("aux9.alg", drawSurface3, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); withoutVerb(); if (_lang == kSpanish) @@ -2835,8 +2665,7 @@ void DrasculaEngine::animation_1_4() { void DrasculaEngine::animation_5_4(){ sentido_hare = 3; - loadPic("anh_dr.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("anh_dr.alg", backSurface, 1); lleva_al_hare(99, 160); lleva_al_hare(38, 177); hare_se_ve = 0; @@ -2850,16 +2679,13 @@ void DrasculaEngine::animation_5_4(){ updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); openDoor(2, 0); - loadPic("auxigor.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("auxigor.alg", frontSurface, 1); x_igor = 100; y_igor = 65; talk_igor_front(29); talk_igor_front(30); - loadPic("96.alg"); - decompressPic(frontSurface, 1); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); hare_se_ve = 1; fadeToBlack(0); exitRoom(0); @@ -2870,12 +2696,9 @@ void DrasculaEngine::animation_6_4() { roomNumber = 26; clearRoom(); - loadPic("26.alg"); - decompressPic(drawSurface1, HALF_PAL); - loadPic("aux26.alg"); - decompressPic(drawSurface3, 1); - loadPic("auxigor.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("26.alg", drawSurface1, HALF_PAL); + loadAndDecompressPic("aux26.alg", drawSurface3, 1); + loadAndDecompressPic("auxigor.alg", frontSurface, 1); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); update_26_pre(); x_igor = 104; @@ -2886,14 +2709,11 @@ void DrasculaEngine::animation_6_4() { talk_igor_front(26); roomNumber = prevRoom; clearRoom(); - loadPic("96.alg"); - decompressPic(frontSurface, 1); - loadPic(roomDisk); - decompressPic(drawSurface3, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); + loadAndDecompressPic(roomDisk, drawSurface3, 1); char rm[20]; sprintf(rm, "%i.alg", roomNumber); - loadPic(rm); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic(rm, drawSurface1, HALF_PAL); withoutVerb(); updateRoom(); } @@ -2903,8 +2723,7 @@ void DrasculaEngine::animation_8_4() { int estanteria_x[] = {1, 75, 149, 223, 1, 75, 149, 223, 149, 223, 149, 223, 149, 223}; int estanteria_y[] = {1, 1, 1, 1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74}; - loadPic("an_8.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("an_8.alg", frontSurface, 1); for (frame = 0; frame < 14; frame++) { pause(2); @@ -2912,8 +2731,7 @@ void DrasculaEngine::animation_8_4() { updateScreen(77, 45, 77, 45, 73, 72, screenSurface); } - loadPic("96.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); openDoor(7, 2); } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 79a10984b4..457af09265 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -201,50 +201,33 @@ int DrasculaEngine::go() { hay_seleccion = 0; if (num_ejec != 6) { - loadPic("95.alg"); - decompressPic(tableSurface, 1); + loadAndDecompressPic("95.alg", tableSurface, 1); } if (num_ejec == 1) { - loadPic("96.alg"); - decompressPic(frontSurface, COMPLETE_PAL); - loadPic("99.alg"); - decompressPic(backSurface, 1); - loadPic("97.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); + loadAndDecompressPic("99.alg", backSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); } else if (num_ejec == 2) { - loadPic("96.alg"); - decompressPic(frontSurface, COMPLETE_PAL); - loadPic("pts.alg"); - decompressPic(drawSurface2, 1); + loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); + loadAndDecompressPic("pts.alg", drawSurface2, 1); } else if (num_ejec == 3) { - loadPic("aux13.alg"); - decompressPic(drawSurface1, COMPLETE_PAL); - loadPic("96.alg"); - decompressPic(frontSurface, 1); - loadPic("97.alg"); - decompressPic(extraSurface, 1); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("aux13.alg", drawSurface1, COMPLETE_PAL); + loadAndDecompressPic("96.alg", frontSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); } else if (num_ejec == 4) { - loadPic("96.alg"); - decompressPic(frontSurface, COMPLETE_PAL); + loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); if (hay_que_load == 0) animation_rayo(); - loadPic("96.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); clearRoom(); - loadPic("99.alg"); - decompressPic(backSurface, 1); - loadPic("97.alg"); - decompressPic(extraSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); } else if (num_ejec == 5) { - loadPic("96.alg"); - decompressPic(frontSurface, COMPLETE_PAL); - loadPic("97.alg"); - decompressPic(extraSurface, 1); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); + loadAndDecompressPic("97.alg", extraSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); } else if (num_ejec == 6) { x_igor = 105, y_igor = 85, sentido_igor = 1; x_dr = 62, y_dr = 99, sentido_dr = 1; @@ -253,15 +236,10 @@ int DrasculaEngine::go() { pendulumSurface = drawSurface3; - loadPic("96.alg"); - decompressPic(frontSurface, COMPLETE_PAL); - loadPic("99.alg"); - decompressPic(backSurface, 1); - loadPic("97.alg"); - decompressPic(extraSurface, 1); - - loadPic("95.alg"); - decompressPic(tableSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); + loadAndDecompressPic("99.alg", backSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); + loadAndDecompressPic("95.alg", tableSurface, 1); } memset(iconName, 0, sizeof(iconName)); @@ -537,8 +515,7 @@ bool DrasculaEngine::escoba() { animation_1_1(); withoutVerb(); - loadPic("2aux62.alg"); - decompressPic(drawSurface2, 1); + loadAndDecompressPic("2aux62.alg", drawSurface2, 1); sentido_hare = 1; objExit = 104; if (hay_que_load != 0) { @@ -628,8 +605,7 @@ bool DrasculaEngine::escoba() { if (!para_cargar(saveName)) { return true; } - loadPic("auxdr.alg"); - decompressPic(drawSurface2, 1); + loadAndDecompressPic("auxdr.alg", drawSurface2, 1); } } @@ -671,10 +647,9 @@ bucles: if (button_dch == 1 && menuScreen == 1) { delay(100); if (num_ejec == 2) - loadPic(menuBackground); + loadAndDecompressPic(menuBackground, backSurface, 1); else - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); setPalette((byte *)&gamePalette); menuScreen = 0; updateEvents(); @@ -687,14 +662,13 @@ bucles: if (sentido_hare == 2) sentido_hare = 1; if (num_ejec == 4) - loadPic("icons2.alg"); + loadAndDecompressPic("icons2.alg", backSurface, 1); else if (num_ejec == 5) - loadPic("icons3.alg"); + loadAndDecompressPic("icons3.alg", backSurface, 1); else if (num_ejec == 6) - loadPic("iconsp.alg"); + loadAndDecompressPic("iconsp.alg", backSurface, 1); else - loadPic("icons.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("icons.alg", backSurface, 1); menuScreen = 1; updateEvents(); withoutVerb(); @@ -782,8 +756,7 @@ bucles: if (num_ejec != 3) cont_sv = 0; } else if (num_ejec == 6 && key == Common::KEYCODE_0 && roomNumber == 61) { - loadPic("alcbar.alg"); - decompressPic(drawSurface1, 255); + loadAndDecompressPic("alcbar.alg", drawSurface1, 255); } else if (cont_sv == 1500) { screenSaver(); if (num_ejec != 3) @@ -797,20 +770,18 @@ bucles: void DrasculaEngine::pickObject(int objeto) { if (num_ejec == 6) - loadPic("iconsp.alg"); + loadAndDecompressPic("iconsp.alg", backSurface, 1); else if (num_ejec == 4) - loadPic("icons2.alg"); + loadAndDecompressPic("icons2.alg", backSurface, 1); else if (num_ejec == 5) - loadPic("icons3.alg"); + loadAndDecompressPic("icons3.alg", backSurface, 1); else - loadPic("icons.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("icons.alg", backSurface, 1); chooseObject(objeto); if (num_ejec == 2) - loadPic(menuBackground); + loadAndDecompressPic(menuBackground, backSurface, 1); else - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); } void DrasculaEngine::chooseObject(int objeto) { @@ -950,12 +921,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { getLine(ald, buffer, size); sscanf(buffer, "%s",pant4); - loadPic(pant2); - decompressPic(extraSurface, 1); - loadPic(pant1); - decompressPic(frontSurface, 1); - loadPic(pant4); - decompressPic(backSurface, 1); + loadAndDecompressPic(pant2, extraSurface, 1); + loadAndDecompressPic(pant1, frontSurface, 1); + loadAndDecompressPic(pant4, backSurface, 1); strcpy(menuBackground, pant4); } @@ -1026,12 +994,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; feetHeight = PIES_HARE; - loadPic("97.alg"); - decompressPic(extraSurface, 1); - loadPic("96.alg"); - decompressPic(frontSurface, 1); - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("97.alg", extraSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); strcpy(menuBackground, "99.alg"); } @@ -1049,13 +1014,11 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { } characterMoved = 0; } - loadPic(roomDisk); - decompressPic(drawSurface3, 1); + loadAndDecompressPic(roomDisk, drawSurface3, 1); char rm[20]; sprintf(rm, "%i.alg", roomNumber); - loadPic(rm); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic(rm, drawSurface1, HALF_PAL); copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); @@ -1520,8 +1483,7 @@ bool DrasculaEngine::saves() { sav->readLine(names[n], 23); delete sav; - loadPic("savescr.alg"); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic("savescr.alg", drawSurface1, HALF_PAL); color_abc(kColorLightGreen); @@ -1622,8 +1584,7 @@ bool DrasculaEngine::saves() { clearRoom(); char rm[20]; sprintf(rm, "%i.alg", roomNumber); - loadPic(rm); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic(rm, drawSurface1, HALF_PAL); hay_seleccion = 0; return true; @@ -1795,8 +1756,7 @@ void DrasculaEngine::screenSaver() { clearRoom(); - loadPic("sv.alg"); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic("sv.alg", drawSurface1, HALF_PAL); // inicio_ghost(); copia = (byte *)malloc(64000); @@ -1901,8 +1861,7 @@ void DrasculaEngine::screenSaver() { char rm[20]; sprintf(rm, "%i.alg", roomNumber); - loadPic(rm); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic(rm, drawSurface1, HALF_PAL); } void DrasculaEngine::fliplay(const char *filefli, int vel) { @@ -3804,8 +3763,7 @@ void DrasculaEngine::converse(const char *nom_fich) { if (phrase4[h] == (char)0xa7) phrase4[h] = ' '; - loadPic("car.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("car.alg", backSurface, 1); // TODO code here should limit y position for mouse in dialog menu, // but we can't implement this due lack backend functionality // from 1(top) to 31 @@ -3906,10 +3864,9 @@ bucle_opc: goto bucle_opc; if (num_ejec == 2) - loadPic(menuBackground); + loadAndDecompressPic(menuBackground, backSurface, 1); else - loadPic("99.alg"); - decompressPic(backSurface, 1); + loadAndDecompressPic("99.alg", backSurface, 1); if (num_ejec != 5) withoutVerb(); } @@ -4445,14 +4402,10 @@ void DrasculaEngine::activatePendulum() { flags[1] = 2; hare_se_ve = 0; roomNumber = 102; - loadPic("102.alg"); - decompressPic(drawSurface1, HALF_PAL); - loadPic("an_p1.alg"); - decompressPic(drawSurface3, 1); - loadPic("an_p2.alg"); - decompressPic(extraSurface, 1); - loadPic("an_p3.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("102.alg", drawSurface1, HALF_PAL); + loadAndDecompressPic("an_p1.alg", drawSurface3, 1); + loadAndDecompressPic("an_p2.alg", extraSurface, 1); + loadAndDecompressPic("an_p3.alg", frontSurface, 1); copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 1f326d29b5..c3cac99005 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -237,9 +237,14 @@ public: void freeMemory(); void releaseGame(); - void loadPic(const char *); + void loadPic(const char *NamePcc); void decompressPic(byte *targetSurface, int colorCount); + void loadAndDecompressPic(const char *NamePcc, byte *targetSurface, int colorCount) { + loadPic(NamePcc); + decompressPic(targetSurface, colorCount); + } + typedef char DacPalette256[256][3]; void setRGB(byte *dir_lectura, int plt); @@ -502,6 +507,7 @@ public: void talk_taber2(const char *, const char *); void talk_bj_bed(int); void talk_bj_bed(const char *said, const char * filename); + void talk_htel(int); void talk_htel(const char *said, const char *filename); void talk_bj(int); void talk_bj(const char *, const char *); @@ -511,10 +517,13 @@ public: void talk_sinc(const char *, const char *, const char *); void talk_drunk(int); void talk_drunk(const char *said, const char *filename); - void talk_pianista(const char *said, const char *filename); + void talk_pianist(int); + void talk_pianist(const char *said, const char *filename); void talk_igor_seated(int); void talk_igor_seated(const char *, const char *); + void talk_wolf(int); void talk_wolf(const char *said, const char *filename); + void talk_mus(int); void talk_mus(const char *said, const char *filename); void hiccup(int); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index d136f7285b..67e65998ad 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -668,28 +668,17 @@ void DrasculaEngine::room_18(int fl) { pickObject(12); visible[2] = 0; flags[28] = 1; - } else if (pickedObject == kVerbLook && fl == 182) + } else if (pickedObject == kVerbLook && fl == 182) { talk(154); - else if (pickedObject == 8 && fl == 55 && flags[38] == 0 && flags[33] == 1) - talk(349); - else if (pickedObject == 13 && fl == 55 && flags[38] == 0 && flags[33] == 1) - talk(349); - else if (pickedObject == 15 && fl == 55 && flags[38] == 0 && flags[33] == 1) - talk(349); - else if (pickedObject == 16 && fl == 55 && flags[38] == 0 && flags[33] == 1) - talk(349); - else if (pickedObject == 17 && fl == 55 && flags[38] == 0 && flags[33] == 1) - talk(349); - else if (pickedObject == 8 && fl == 55 && flags[38] == 1 && flags[33] == 1) - animation_24_2(); - else if (pickedObject == 13 && fl == 55 && flags[38] == 1 && flags[33] == 1) - animation_24_2(); - else if (pickedObject == 15 && fl == 55 && flags[38] == 1 && flags[33] == 1) - animation_24_2(); - else if (pickedObject == 16 && fl == 55 && flags[38] == 1 && flags[33] == 1) - animation_24_2(); - else if (pickedObject == 17 && fl == 55 && flags[38] == 1 && flags[33] == 1) - animation_24_2(); + } else if (fl == 55 && flags[38] == 0 && flags[33] == 0) { + if (pickedObject == 8 || pickedObject == 13 || pickedObject == 15 || + pickedObject == 16 || pickedObject == 17) + talk(349); + } else if (fl == 55 && flags[38] == 1 && flags[33] == 1) { + if (pickedObject == 8 || pickedObject == 13 || pickedObject == 15 || + pickedObject == 16 || pickedObject == 17) + animation_24_2(); + } else if (pickedObject == 11 && fl == 50 && flags[22] == 0) { sentido_hare = 3; updateRoom(); @@ -1065,10 +1054,10 @@ void DrasculaEngine::room_54(int fl) { talk(288); flags[12] = 1; pause(10); - talk_mus(_texte[_lang][1], "E1.als"); + talk_mus(1); talk(289); - talk_mus(_texte[_lang][2], "E2.als"); - talk_mus(_texte[_lang][3], "E3.als"); + talk_mus(2); + talk_mus(3); converse("op_10.cal"); flags[12] = 0; flags[14] = 1; @@ -1077,7 +1066,7 @@ void DrasculaEngine::room_54(int fl) { else if (pickedObject == kVerbPick && fl == 9999 && flags[13] == 0) { pickObject(8); flags[13] = 1; - talk_mus(_texte[_lang][10], "e10.als"); + talk_mus(10); updateData(); } else if (pickedObject == kVerbOpen && fl == 119) talk(125); @@ -1169,39 +1158,31 @@ void DrasculaEngine::room_59(int fl) { updateScreen(0, 0, 0, 0, 320, 200, screenSurface); hare_se_ve = 1; clearRoom(); - loadPic("tlef0.alg"); - decompressPic(drawSurface1, COMPLETE_PAL); - loadPic("tlef1.alg"); - decompressPic(drawSurface3, 1); - loadPic("tlef2.alg"); - decompressPic(frontSurface, 1); - loadPic("tlef3.alg"); - decompressPic(backSurface, 1); - talk_htel(_text[_lang][240], "240.als"); + loadAndDecompressPic("tlef0.alg", drawSurface1, COMPLETE_PAL); + loadAndDecompressPic("tlef1.alg", drawSurface3, 1); + loadAndDecompressPic("tlef2.alg", frontSurface, 1); + loadAndDecompressPic("tlef3.alg", backSurface, 1); + talk_htel(240); color_abc(kColorBrown); talk_solo(_textvb[_lang][58], "VB58.als"); - talk_htel(_text[_lang][241], "241.als"); + talk_htel(241); color_abc(kColorBrown); talk_solo(_textvb[_lang][59], "VB59.als"); - talk_htel(_text[_lang][242], "242.als"); + talk_htel(242); color_abc(kColorBrown); talk_solo(_textvb[_lang][60], "VB60.als"); - talk_htel(_text[_lang][196], "196.als"); + talk_htel(196); color_abc(kColorBrown); talk_solo(_textvb[_lang][61],"VB61.als"); - talk_htel(_text[_lang][244], "244.als"); + talk_htel(244); color_abc(kColorBrown); talk_solo(_textvb[_lang][62], "VB62.als"); clearRoom(); - loadPic("aux59.alg"); - decompressPic(drawSurface3, 1); - loadPic("96.alg"); - decompressPic(frontSurface, COMPLETE_PAL); - loadPic("99.alg"); - decompressPic(backSurface, 1); - loadPic("59.alg"); - decompressPic(drawSurface1, HALF_PAL); + loadAndDecompressPic("aux59.alg", drawSurface3, 1); + loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); + loadAndDecompressPic("99.alg", backSurface, 1); + loadAndDecompressPic("59.alg", drawSurface1, HALF_PAL); sentido_hare = 3; talk(245); withoutVerb(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 669d1a7719..9d29c8b807 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -621,7 +621,13 @@ bucless: } } -void DrasculaEngine::talk_pianista(const char *said, const char *filename) { +void DrasculaEngine::talk_pianist(int index) { + char name[20]; + sprintf(name, "P%i.als", index); + talk(_textp[_lang][index], name); +} + +void DrasculaEngine::talk_pianist(const char *said, const char *filename) { int x_talk[4] = { 97, 145, 193, 241 }; int face; int length = strlen(said); @@ -681,8 +687,7 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) { int length = strlen(said); if (num_ejec == 1) { - loadPic("an11y13.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("an11y13.alg", frontSurface, 1); } flags[13] = 1; @@ -738,8 +743,7 @@ bucless: flags[13] = 0; if (num_ejec == 1) { - loadPic("96.alg"); - decompressPic(frontSurface, 1); + loadAndDecompressPic("96.alg", frontSurface, 1); } if (num_ejec == 1) { @@ -955,6 +959,12 @@ bucless: key = 0; } +void DrasculaEngine::talk_wolf(int index) { + char name[20]; + sprintf(name, "L%i.als", index); + talk_wolf(_textl[_lang][index], name); +} + void DrasculaEngine::talk_wolf(const char *said, const char *filename) { int x_talk[9] = {52, 79, 106, 133, 160, 187, 214, 241, 268}; int face; @@ -1002,6 +1012,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } +void DrasculaEngine::talk_mus(int index) { + char name[20]; + sprintf(name, "E%i.als", index); + talk_mus(_texte[_lang][index], name); +} + void DrasculaEngine::talk_mus(const char *said, const char *filename) { int x_talk[8] = { 16, 35, 54, 73, 92, 111, 130, 149}; int face; @@ -1261,6 +1277,12 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } +void DrasculaEngine::talk_htel(int index) { + char name[20]; + sprintf(name, "%i.als", index); + talk_htel(_text[_lang][index], name); +} + void DrasculaEngine::talk_htel(const char *said, const char *filename) { char *num_cara; int x_talk[3] = {1, 94, 187}; -- cgit v1.2.3 From 1da231a34efb38b3a1035b59c506cc46d3aa8b81 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 14:44:08 +0000 Subject: - x_alakeva/y_alakeva -> destX/destY - confirma_salir -> confirmExit - Used CLIP instead of if's svn-id: r32399 --- engines/drascula/drascula.cpp | 30 ++++++++++-------------------- engines/drascula/drascula.h | 4 ++-- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 457af09265..3c7c9be46a 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -751,7 +751,7 @@ bucles: if (num_ejec != 3) cont_sv = 0; } else if (key == Common::KEYCODE_ESCAPE) { - if (!confirma_salir()) + if (!confirmExit()) return false; if (num_ejec != 3) cont_sv = 0; @@ -958,9 +958,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { getLine(ald, buffer, size); sscanf(buffer, "%s", targetSurface[l]); getLine(ald, buffer, size); - sscanf(buffer, "%d", &x_alakeva[l]); + sscanf(buffer, "%d", &destX[l]); getLine(ald, buffer, size); - sscanf(buffer, "%d", &y_alakeva[l]); + sscanf(buffer, "%d", &destY[l]); getLine(ald, buffer, size); sscanf(buffer, "%d", &sentido_alkeva[l]); getLine(ald, buffer, size); @@ -1009,8 +1009,8 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (num_ejec == 2) { if (hare_x == -1) { - hare_x = x_alakeva[obj_salir]; - hare_y = y_alakeva[obj_salir] - alto_hare; + hare_x = destX[obj_salir]; + hare_y = destY[obj_salir] - alto_hare; } characterMoved = 0; } @@ -1065,8 +1065,8 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (num_ejec != 2) { if (hare_x == -1) { - hare_x = x_alakeva[obj_salir]; - hare_y = y_alakeva[obj_salir]; + hare_x = destX[obj_salir]; + hare_y = destY[obj_salir]; alto_hare = (CHARACTER_HEIGHT * factor_red[hare_y]) / 100; ancho_hare = (CHARACTER_WIDTH * factor_red[hare_y]) / 100; hare_y = hare_y - alto_hare; @@ -1278,18 +1278,8 @@ bool DrasculaEngine::comprueba1() { } if (doBreak == 0) { - sitio_x = mouseX; - sitio_y = mouseY; - - if (sitio_x < suelo_x1) - sitio_x = suelo_x1; - if (sitio_x > suelo_x2) - sitio_x = suelo_x2; - if (sitio_y < suelo_y1 + feetHeight) - sitio_y = suelo_y1 + feetHeight; - if (sitio_y > suelo_y2) - sitio_y = suelo_y2; - + sitio_x = CLIP(mouseX, suelo_x1, suelo_x2); + sitio_y = CLIP(mouseY, suelo_y1 + feetHeight, suelo_y2); startWalking(); } doBreak = 0; @@ -1721,7 +1711,7 @@ void DrasculaEngine::delay(int ms) { _system->delayMillis(ms * 2); // originaly was 1 } -bool DrasculaEngine::confirma_salir() { +bool DrasculaEngine::confirmExit() { byte key; color_abc(kColorRed); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index c3cac99005..c80ef82a01 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -296,7 +296,7 @@ public: int sitiobj_x[40], sitiobj_y[40], sentidobj[40]; int inventoryObjects[43]; char targetSurface[40][20]; - int x_alakeva[40], y_alakeva[40], sentido_alkeva[40], alapuertakeva[40]; + int destX[40], destY[40], sentido_alkeva[40], alapuertakeva[40]; int x1[40], y1[40], x2[40], y2[40]; int takeObject, pickedObject; int withVoices; @@ -465,7 +465,7 @@ public: bool saves(); void print_abc(const char *, int, int); void delay(int ms); - bool confirma_salir(); + bool confirmExit(); void screenSaver(); void chooseObject(int objeto); void addObject(int); -- cgit v1.2.3 From 0e92f8ffa9925833fc84604f14b7965094eef9dc Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 14:58:09 +0000 Subject: Rewrote some more room logic svn-id: r32400 --- engines/drascula/rooms.cpp | 99 ++++++++++++++++++++++++---------------------- 1 file changed, 51 insertions(+), 48 deletions(-) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 67e65998ad..00e377ac9f 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -43,7 +43,7 @@ struct RoomTalkAction { // Note: default action needs to be LAST for each group // of actions with the same number RoomTalkAction room0Actions[] = { - // num action object speech + // num action object speech { 1, kVerbLook, -1, 54 }, { 1, kVerbMove, -1, 19 }, { 1, kVerbPick, -1, 11 }, @@ -51,12 +51,12 @@ RoomTalkAction room0Actions[] = { { 1, kVerbClose, -1, 9 }, { 1, kVerbTalk, -1, 16 }, { 1, kVerbDefault, -1, 11 }, - // ------------------------------- + // ---------------------------------- { 2, kVerbMove, -1, 19 }, { 2, kVerbOpen, -1, 9 }, { 2, kVerbClose, -1, 9 }, { 2, kVerbTalk, -1, 16 }, - // ------------------------------- + // ---------------------------------- { 3, kVerbLook, -1, 316 }, { 3, kVerbMove, -1, 317 }, { 3, kVerbPick, -1, 318 }, @@ -64,16 +64,16 @@ RoomTalkAction room0Actions[] = { { 3, kVerbClose, -1, 319 }, { 3, kVerbTalk, -1, 320 }, { 3, kVerbDefault, -1, 318 }, - // ------------------------------- + // ---------------------------------- { 4, kVerbMove, -1, 19 }, { 4, kVerbOpen, -1, 9 }, { 4, kVerbClose, -1, 9 }, { 4, kVerbTalk, -1, 16 }, - // ------------------------------- + // ---------------------------------- { 5, kVerbOpen, -1, 9 }, { 5, kVerbClose, -1, 9 }, { 5, kVerbTalk, -1, 16 }, - // ------------------------------- + // ---------------------------------- { 6, kVerbMove, -1, 19 }, { 6, kVerbOpen, -1, 9 }, { 6, kVerbClose, -1, 9 }, @@ -81,112 +81,128 @@ RoomTalkAction room0Actions[] = { }; RoomTalkAction room1Actions[] = { - // num action object speech + // num action object speech { -1, kVerbPick, 118, 5 }, { -1, kVerbOpen, 118, 3 }, { -1, kVerbClose, 118, 4 }, { -1, kVerbTalk, 118, 6 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 119, 8 }, { -1, kVerbMove, 119, 13 }, { -1, kVerbClose, 119, 10 }, { -1, kVerbTalk, 119, 12 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbMove, 120, 13 }, { -1, kVerbOpen, 120, 18 }, { -1, kVerbTalk, 120, 15 } }; RoomTalkAction room3Actions[] = { - // num action object speech + // num action object speech { -1, kVerbLook, 129, 21 }, { -1, kVerbPick, 129, 5 }, { -1, kVerbMove, 129, 24 }, { -1, kVerbOpen, 129, 22 }, { -1, kVerbClose, 129, 10 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 131, 27 }, { -1, kVerbPick, 131, 5 }, { -1, kVerbMove, 131, 24 }, { -1, kVerbOpen, 131, 22 }, { -1, kVerbClose, 131, 10 }, { -1, kVerbTalk, 131, 23 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 132, 28 }, { -1, kVerbPick, 132, 5 }, { -1, kVerbMove, 132, 24 }, { -1, kVerbOpen, 132, 22 }, { -1, kVerbClose, 132, 10 }, { -1, kVerbTalk, 132, 23 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 133, 321 }, { -1, kVerbPick, 133, 31 }, { -1, kVerbMove, 133, 34 }, { -1, kVerbOpen, 133, 30 }, { -1, kVerbClose, 133, 10 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 166, 55 }, { -1, kVerbPick, 166, 7 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 211, 184 } }; RoomTalkAction room4Actions[] = { - // num action object speech + // num action object speech { -1, kVerbLook, 189, 182 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 207, 175 }, { -1, kVerbTalk, 207, 176 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 208, 177 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 209, 179 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 210, 180 }, { -1, kVerbOpen, 210, 181 } }; RoomTalkAction room5Actions[] = { - // num action object speech + // num action object speech { -1, kVerbMove, 136, 13 }, { -1, kVerbOpen, 136, 18 }, { -1, kVerbTalk, 136, 15 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 212, 187 }, { -1, kVerbTalk, 212, 188 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 213, 189 }, { -1, kVerbOpen, 213, 190 } }; RoomTalkAction room6Actions[] = { - // num action object speech + // num action object speech { -1, kVerbPick, 144, 43 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 138, 35 }, { -1, kVerbTalk, 138, 6 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 143, 37 }, { -1, kVerbPick, 143, 7 }, { -1, kVerbMove, 143, 7 }, { -1, kVerbTalk, 143, 38 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 139, 36 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 140, 147 } }; RoomTalkAction room12Actions[] = { - // num action object speech + // num action object speech { -1, kVerbLook, 154, 329 }, { -1, kVerbTalk, 154, 330 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbMove, 155, 48 }, { -1, kVerbTalk, 155, 331 }, - // ------------------------------- + // ---------------------------------- { -1, kVerbLook, 156, 35 }, { -1, kVerbMove, 156, 48 }, - { -1, kVerbTalk, 156, 50 }, + { -1, kVerbTalk, 156, 50 } +}; + +RoomTalkAction room14Actions[] = { + // num action object speech + { -1, kVerbLook, 200, 165 }, + // ---------------------------------- + { -1, kVerbLook, 201, 166 }, + // ---------------------------------- + { -1, kVerbLook, 202, 167 }, + // ---------------------------------- + { -1, kVerbLook, 203, 168 }, + { -1, kVerbPick, 203, 170 }, + { -1, kVerbMove, 203, 170 }, + { -1, kVerbTalk, 203, 169 }, + // ---------------------------------- + { -1, kVerbLook, 204, 171 } }; bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { @@ -505,6 +521,9 @@ bool DrasculaEngine::room_13(int fl) { } void DrasculaEngine::room_14(int fl) { + if (roomParse(room14Actions, fl)) + return; + if (pickedObject == kVerbTalk && fl == 54 && flags[39] == 0) animation_12_2(); else if (pickedObject == kVerbTalk && fl == 54 && flags[39] == 1) @@ -517,22 +536,6 @@ void DrasculaEngine::room_14(int fl) { animation_36_2(); else if (pickedObject == kVerbTalk && fl == 53) animation_13_2(); - else if (pickedObject == kVerbLook && fl == 200) - talk(165); - else if (pickedObject == kVerbLook && fl == 201) - talk(166); - else if (pickedObject == kVerbLook && fl == 202) - talk(167); - else if (pickedObject == kVerbLook && fl == 203) - talk(168); - else if (pickedObject == kVerbPick && fl == 203) - talk(170); - else if (pickedObject == kVerbMove && fl == 203) - talk(170); - else if (pickedObject == kVerbTalk && fl == 203) - talk(169); - else if (pickedObject == kVerbLook && fl == 204) - talk(171); else hasAnswer = 0; } -- cgit v1.2.3 From 08eeb40ab44baa176185db23fd0e7b025a7d88cd Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 14:58:38 +0000 Subject: Cleanup svn-id: r32401 --- engines/drascula/talk.cpp | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 9d29c8b807..98532a0941 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -884,17 +884,11 @@ bucless: else pos_blind[0] = 132; - if (c == '0') + if (c == '0' || c == '1') num_cara = drawSurface3; - else if (c == '1') - num_cara = drawSurface3; - else if (c == '2') - num_cara = extraSurface; - else if (c == '3') + else if (c == '2' || c == '3') num_cara = extraSurface; - else if (c == '4') - num_cara = backSurface; - else if (c == '5') + else if (c == '4' || c == '5') num_cara = backSurface; else { num_cara = frontSurface; @@ -1446,10 +1440,7 @@ void DrasculaEngine::talk_baul(const char *said, const char *filename) { bucless: - if (face == 1) - face = 0; - else - face = 1; + face = (face == 1) ? 0 : 1; flags[19] = face; updateRoom(); -- cgit v1.2.3 From d0174453ed0ba091a3fc5b76ed7f22c67a609e63 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 15:15:49 +0000 Subject: LookForFree -> soundIsActive soundIsActive returns a boolean value now svn-id: r32402 --- engines/drascula/drascula.cpp | 6 ++--- engines/drascula/drascula.h | 2 +- engines/drascula/talk.cpp | 54 +++++++++++++++++++++---------------------- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 3c7c9be46a..426e170d08 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -2171,7 +2171,7 @@ void DrasculaEngine::stopSound() { delay(1); if (hay_sb == 1) { - while (LookForFree() != 0); + while (soundIsActive()); delete sku; sku = NULL; } @@ -4122,7 +4122,7 @@ void DrasculaEngine::ctvd_init(int b) { 11025, Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED); } -int DrasculaEngine::LookForFree() { +bool DrasculaEngine::soundIsActive() { return _mixer->isSoundHandleActive(_soundHandle); } @@ -4373,7 +4373,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index c80ef82a01..8ba248addd 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -555,7 +555,7 @@ public: void setCursorTable(); void enterName(); void para_grabar(char[]); - int LookForFree(); + bool soundIsActive(); void openSSN(const char *Name, int Pause); void WaitFrameSSN(); void MixVideo(byte *OldScreen, byte *NewScreen); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 98532a0941..c3f9fa2e2d 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -86,7 +86,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -151,7 +151,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -216,7 +216,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -268,7 +268,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -330,7 +330,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -399,7 +399,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete(sku); ctvd_terminate(); @@ -465,7 +465,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -601,7 +601,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -660,7 +660,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -727,7 +727,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -797,7 +797,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -838,7 +838,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -908,7 +908,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -939,7 +939,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -991,7 +991,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -1044,7 +1044,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -1097,7 +1097,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -1148,7 +1148,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -1203,7 +1203,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -1257,7 +1257,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -1313,7 +1313,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -1411,7 +1411,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -1456,7 +1456,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -1496,7 +1496,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -1549,7 +1549,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -1602,7 +1602,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1){ - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; @@ -1651,7 +1651,7 @@ bucless: if (key != 0) ctvd_stop(); if (hay_sb == 1) { - if (LookForFree() != 0) + if (soundIsActive()) goto bucless; delete sku; sku = NULL; -- cgit v1.2.3 From 4158ff64ed6186d517305c9b77ba42cf13daa3f1 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Fri, 30 May 2008 16:39:49 +0000 Subject: Fix warnings svn-id: r32403 --- engines/drascula/animation.cpp | 4 ++-- engines/drascula/drascula.cpp | 26 +++++++++++++------------- engines/drascula/drascula.h | 6 +++--- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index c07cff51b3..f06a777bbd 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -27,7 +27,7 @@ namespace Drascula { -void DrasculaEngine::updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delay) { +void DrasculaEngine::updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delayVal) { int x = 0; for (int n = 0; n < count; n++){ @@ -35,7 +35,7 @@ void DrasculaEngine::updateAnim(int y, int destX, int destY, int width, int heig copyBackground(x, y, destX, destY, width, height, src, screenSurface); updateScreen(destX, destY, destX, destY, width, height, screenSurface); x += width; - pause(delay); + pause(delayVal); } } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 426e170d08..1b381fc923 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -956,11 +956,11 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { sscanf(buffer, "%d", &isDoor[l]); if (isDoor[l] != 0) { getLine(ald, buffer, size); - sscanf(buffer, "%s", targetSurface[l]); + sscanf(buffer, "%s", _targetSurface[l]); getLine(ald, buffer, size); - sscanf(buffer, "%d", &destX[l]); + sscanf(buffer, "%d", &_destX[l]); getLine(ald, buffer, size); - sscanf(buffer, "%d", &destY[l]); + sscanf(buffer, "%d", &_destY[l]); getLine(ald, buffer, size); sscanf(buffer, "%d", &sentido_alkeva[l]); getLine(ald, buffer, size); @@ -1009,8 +1009,8 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (num_ejec == 2) { if (hare_x == -1) { - hare_x = destX[obj_salir]; - hare_y = destY[obj_salir] - alto_hare; + hare_x = _destX[obj_salir]; + hare_y = _destY[obj_salir] - alto_hare; } characterMoved = 0; } @@ -1065,8 +1065,8 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (num_ejec != 2) { if (hare_x == -1) { - hare_x = destX[obj_salir]; - hare_y = destY[obj_salir]; + hare_x = _destX[obj_salir]; + hare_y = _destY[obj_salir]; alto_hare = (CHARACTER_HEIGHT * factor_red[hare_y]) / 100; ancho_hare = (CHARACTER_WIDTH * factor_red[hare_y]) / 100; hare_y = hare_y - alto_hare; @@ -2599,7 +2599,7 @@ bool DrasculaEngine::exitRoom(int l) { return true; } clearRoom(); - strcpy(salgo, targetSurface[l]); + strcpy(salgo, _targetSurface[l]); strcat(salgo, ".ald"); hare_x = -1; carga_escoba(salgo); @@ -2633,7 +2633,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); delete ald; ald = NULL; - strcpy(salgo, targetSurface[l]); + strcpy(salgo, _targetSurface[l]); strcat(salgo, ".ald"); hare_x =- 1; carga_escoba(salgo); @@ -2651,7 +2651,7 @@ bool DrasculaEngine::exitRoom(int l) { doBreak = 1; previousMusic = roomMusic; clearRoom(); - strcpy(salgo, targetSurface[l]); + strcpy(salgo, _targetSurface[l]); strcat(salgo, ".ald"); hare_x =- 1; carga_escoba(salgo); @@ -2672,7 +2672,7 @@ bool DrasculaEngine::exitRoom(int l) { if (objectNum[l] == 108) lleva_al_hare(171, 78); clearRoom(); - strcpy(salgo, targetSurface[l]); + strcpy(salgo, _targetSurface[l]); strcat(salgo, ".ald"); hare_x = -1; carga_escoba(salgo); @@ -2691,7 +2691,7 @@ bool DrasculaEngine::exitRoom(int l) { previousMusic = roomMusic; hare_se_ve = 1; clearRoom(); - strcpy(salgo, targetSurface[l]); + strcpy(salgo, _targetSurface[l]); strcat(salgo, ".ald"); hare_x = -1; carga_escoba(salgo); @@ -2709,7 +2709,7 @@ bool DrasculaEngine::exitRoom(int l) { doBreak = 1; previousMusic = roomMusic; clearRoom(); - strcpy(salgo, targetSurface[l]); + strcpy(salgo, _targetSurface[l]); strcat(salgo, ".ald"); hare_x = -1; carga_escoba(salgo); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 8ba248addd..8a907bcb7a 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -295,8 +295,8 @@ public: int objectNum[40], visible[40], isDoor[40]; int sitiobj_x[40], sitiobj_y[40], sentidobj[40]; int inventoryObjects[43]; - char targetSurface[40][20]; - int destX[40], destY[40], sentido_alkeva[40], alapuertakeva[40]; + char _targetSurface[40][20]; + int _destX[40], _destY[40], sentido_alkeva[40], alapuertakeva[40]; int x1[40], y1[40], x2[40], y2[40]; int takeObject, pickedObject; int withVoices; @@ -647,7 +647,7 @@ public: bool room_13(int fl); void update_13(); void update_20(); - void updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delay = 3); + void updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delayVal = 3); void updateAnim2(int y, int px, int py, int width, int height, int count, byte* src); void animation_1_3(); void animation_2_3(); -- cgit v1.2.3 From 64211f33703841454c3c01850eea15aa5285b083 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 20:42:31 +0000 Subject: - Renamed texts.cpp to staticdata.h and moved all game static data there - Simplified room_0() - Some cleanup svn-id: r32404 --- engines/drascula/drascula.cpp | 47 +- engines/drascula/drascula.h | 19 +- engines/drascula/module.mk | 3 +- engines/drascula/rooms.cpp | 242 +- engines/drascula/staticdata.h | 5568 +++++++++++++++++++++++++++++++++++++++++ engines/drascula/texts.cpp | 5360 --------------------------------------- 6 files changed, 5597 insertions(+), 5642 deletions(-) create mode 100644 engines/drascula/staticdata.h delete mode 100644 engines/drascula/texts.cpp diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 1b381fc923..41d3af28e5 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -79,48 +79,6 @@ DrasculaEngine::~DrasculaEngine() { delete _rnd; } -struct ItemLocation { - int x; - int y; -}; - -ItemLocation itemLocations[] = { - { 0, 0 }, // empty - { 5, 10 }, { 50, 10 }, { 95, 10 }, // 1-3 - { 140, 10 }, { 185, 10 }, { 230, 10 }, // 4-6 - { 275, 10 }, { 5, 40 }, { 50, 40 }, // 7-9 - { 95, 40 }, { 140, 40 }, { 185, 40 }, // 10-12 - { 230, 40 }, { 275, 40 }, { 5, 70 }, // 13-15 - { 50, 70 }, { 95, 70 }, { 140, 70 }, // 16-18 - { 185, 70 }, { 230, 70 }, { 275, 70 }, // 19-21 - { 5, 100 }, { 50, 100 }, { 95, 100 }, // 22-24 - { 140, 100 }, { 185, 100 }, { 230, 100 }, // 25-27 - { 275, 100 }, { 5, 130 }, { 50, 130 }, // 28-30 - { 95, 130 }, { 140, 130 }, { 185, 130 }, // 31-33 - { 230, 130 }, { 275, 130 }, { 5, 160 }, // 34-36 - { 50, 160 }, { 95, 160 }, { 140, 160 }, // 37-39 - { 185, 160 }, { 230, 160 }, { 275, 160 }, // 40-42 - { 275, 160 } // 43 -}; - -static const int x_pol[44] = {0, 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, - 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, - 247, 83, 165, 1, 206, 42, 124, 83, 1, 247, - 83, 165, 1, 206, 42, 124, 83, 1, 247, 42, - 1, 165, 206}; -static const int y_pol[44] = {0, 1, 1, 1, 1, 1, 1, 1, 27, 27, 1, - 27, 27, 27, 27, 27, 27, 27, 1, 1, 27, - 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, - 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, - 27, 1, 1}; -static const int x_barra[] = {6, 51, 96, 141, 186, 232, 276, 321}; -static const int x1d_menu[] = {280, 40, 80, 120, 160, 200, 240, 0, 40, 80, 120, - 160, 200, 240, 0, 40, 80, 120, 160, 200, 240, 0, - 40, 80, 120, 160, 200, 240, 0}; -static const int y1d_menu[] = {0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25, - 50, 50, 50, 50, 50, 50, 50, 75, 75, 75, 75, 75, 75, 75, 100}; -static int frame_x[20] = {43, 87, 130, 173, 216, 259}; - int DrasculaEngine::init() { // Initialize backend _system->beginGFXTransaction(); @@ -694,10 +652,7 @@ bucles: cont_sv = 0; } - if (mouseY < 24 && menuScreen == 0) - menuBar = 1; - else - menuBar = 0; + menuBar = (mouseY < 24 && menuScreen == 0) ? 1 : 0; Common::KeyCode key = getScan(); if (key == Common::KEYCODE_F1 && menuScreen == 0) { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 8a907bcb7a..b5470bf492 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -93,7 +93,18 @@ enum SSNFrames { #define TEXTD_START 68 struct DrasculaGameDescription; -struct RoomTalkAction; + +struct RoomTalkAction { + int num; + int action; + int objectID; + int speechID; +}; + +struct ItemLocation { + int x; + int y; +}; #define NUM_SAVES 10 #define NUM_FLAGS 50 @@ -743,6 +754,12 @@ extern const char *_textverbs[][6]; extern const char *_textmisc[][2]; extern const char *_textd1[][11]; +extern ItemLocation itemLocations[]; +extern int frame_x[20]; +extern const int x_pol[44], y_pol[44]; +extern const int x_barra[]; +extern const int x1d_menu[], y1d_menu[]; + } // End of namespace Drascula #endif /* DRASCULA_H */ diff --git a/engines/drascula/module.mk b/engines/drascula/module.mk index 042b227ca3..2f72855af1 100644 --- a/engines/drascula/module.mk +++ b/engines/drascula/module.mk @@ -5,8 +5,7 @@ MODULE_OBJS = \ detection.o \ drascula.o \ rooms.o \ - talk.o \ - texts.o + talk.o # This module can be built as a plugin diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 00e377ac9f..d8a9964222 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -24,187 +24,10 @@ */ #include "drascula/drascula.h" +#include "drascula/staticdata.h" namespace Drascula { -static const int mirar_t[3] = {100, 101, 54}; -static const char mirar_v[3][14] = {"100.als", "101.als", "54.als"}; -static const int poder_t[6] = {11, 109, 111, 110, 115, 116}; -static const char poder_v[6][14] = {"11.als", "109.als", "111.als", "110.als", "115.als", "116.als"}; - -struct RoomTalkAction { - int num; - int action; - int objectID; - int speechID; -}; - -// TODO: move these elsewhere, or in a .dat file? -// Note: default action needs to be LAST for each group -// of actions with the same number -RoomTalkAction room0Actions[] = { - // num action object speech - { 1, kVerbLook, -1, 54 }, - { 1, kVerbMove, -1, 19 }, - { 1, kVerbPick, -1, 11 }, - { 1, kVerbOpen, -1, 9 }, - { 1, kVerbClose, -1, 9 }, - { 1, kVerbTalk, -1, 16 }, - { 1, kVerbDefault, -1, 11 }, - // ---------------------------------- - { 2, kVerbMove, -1, 19 }, - { 2, kVerbOpen, -1, 9 }, - { 2, kVerbClose, -1, 9 }, - { 2, kVerbTalk, -1, 16 }, - // ---------------------------------- - { 3, kVerbLook, -1, 316 }, - { 3, kVerbMove, -1, 317 }, - { 3, kVerbPick, -1, 318 }, - { 3, kVerbOpen, -1, 319 }, - { 3, kVerbClose, -1, 319 }, - { 3, kVerbTalk, -1, 320 }, - { 3, kVerbDefault, -1, 318 }, - // ---------------------------------- - { 4, kVerbMove, -1, 19 }, - { 4, kVerbOpen, -1, 9 }, - { 4, kVerbClose, -1, 9 }, - { 4, kVerbTalk, -1, 16 }, - // ---------------------------------- - { 5, kVerbOpen, -1, 9 }, - { 5, kVerbClose, -1, 9 }, - { 5, kVerbTalk, -1, 16 }, - // ---------------------------------- - { 6, kVerbMove, -1, 19 }, - { 6, kVerbOpen, -1, 9 }, - { 6, kVerbClose, -1, 9 }, - { 6, kVerbTalk, -1, 16 } -}; - -RoomTalkAction room1Actions[] = { - // num action object speech - { -1, kVerbPick, 118, 5 }, - { -1, kVerbOpen, 118, 3 }, - { -1, kVerbClose, 118, 4 }, - { -1, kVerbTalk, 118, 6 }, - // ---------------------------------- - { -1, kVerbLook, 119, 8 }, - { -1, kVerbMove, 119, 13 }, - { -1, kVerbClose, 119, 10 }, - { -1, kVerbTalk, 119, 12 }, - // ---------------------------------- - { -1, kVerbMove, 120, 13 }, - { -1, kVerbOpen, 120, 18 }, - { -1, kVerbTalk, 120, 15 } -}; - -RoomTalkAction room3Actions[] = { - // num action object speech - { -1, kVerbLook, 129, 21 }, - { -1, kVerbPick, 129, 5 }, - { -1, kVerbMove, 129, 24 }, - { -1, kVerbOpen, 129, 22 }, - { -1, kVerbClose, 129, 10 }, - // ---------------------------------- - { -1, kVerbLook, 131, 27 }, - { -1, kVerbPick, 131, 5 }, - { -1, kVerbMove, 131, 24 }, - { -1, kVerbOpen, 131, 22 }, - { -1, kVerbClose, 131, 10 }, - { -1, kVerbTalk, 131, 23 }, - // ---------------------------------- - { -1, kVerbLook, 132, 28 }, - { -1, kVerbPick, 132, 5 }, - { -1, kVerbMove, 132, 24 }, - { -1, kVerbOpen, 132, 22 }, - { -1, kVerbClose, 132, 10 }, - { -1, kVerbTalk, 132, 23 }, - // ---------------------------------- - { -1, kVerbLook, 133, 321 }, - { -1, kVerbPick, 133, 31 }, - { -1, kVerbMove, 133, 34 }, - { -1, kVerbOpen, 133, 30 }, - { -1, kVerbClose, 133, 10 }, - // ---------------------------------- - { -1, kVerbLook, 166, 55 }, - { -1, kVerbPick, 166, 7 }, - // ---------------------------------- - { -1, kVerbLook, 211, 184 } -}; - -RoomTalkAction room4Actions[] = { - // num action object speech - { -1, kVerbLook, 189, 182 }, - // ---------------------------------- - { -1, kVerbLook, 207, 175 }, - { -1, kVerbTalk, 207, 176 }, - // ---------------------------------- - { -1, kVerbLook, 208, 177 }, - // ---------------------------------- - { -1, kVerbLook, 209, 179 }, - // ---------------------------------- - { -1, kVerbLook, 210, 180 }, - { -1, kVerbOpen, 210, 181 } -}; - -RoomTalkAction room5Actions[] = { - // num action object speech - { -1, kVerbMove, 136, 13 }, - { -1, kVerbOpen, 136, 18 }, - { -1, kVerbTalk, 136, 15 }, - // ---------------------------------- - { -1, kVerbLook, 212, 187 }, - { -1, kVerbTalk, 212, 188 }, - // ---------------------------------- - { -1, kVerbLook, 213, 189 }, - { -1, kVerbOpen, 213, 190 } -}; - -RoomTalkAction room6Actions[] = { - // num action object speech - { -1, kVerbPick, 144, 43 }, - // ---------------------------------- - { -1, kVerbLook, 138, 35 }, - { -1, kVerbTalk, 138, 6 }, - // ---------------------------------- - { -1, kVerbLook, 143, 37 }, - { -1, kVerbPick, 143, 7 }, - { -1, kVerbMove, 143, 7 }, - { -1, kVerbTalk, 143, 38 }, - // ---------------------------------- - { -1, kVerbLook, 139, 36 }, - // ---------------------------------- - { -1, kVerbLook, 140, 147 } -}; - -RoomTalkAction room12Actions[] = { - // num action object speech - { -1, kVerbLook, 154, 329 }, - { -1, kVerbTalk, 154, 330 }, - // ---------------------------------- - { -1, kVerbMove, 155, 48 }, - { -1, kVerbTalk, 155, 331 }, - // ---------------------------------- - { -1, kVerbLook, 156, 35 }, - { -1, kVerbMove, 156, 48 }, - { -1, kVerbTalk, 156, 50 } -}; - -RoomTalkAction room14Actions[] = { - // num action object speech - { -1, kVerbLook, 200, 165 }, - // ---------------------------------- - { -1, kVerbLook, 201, 166 }, - // ---------------------------------- - { -1, kVerbLook, 202, 167 }, - // ---------------------------------- - { -1, kVerbLook, 203, 168 }, - { -1, kVerbPick, 203, 170 }, - { -1, kVerbMove, 203, 170 }, - { -1, kVerbTalk, 203, 169 }, - // ---------------------------------- - { -1, kVerbLook, 204, 171 } -}; - bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { bool didAction = false; @@ -227,74 +50,27 @@ bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { } void DrasculaEngine::room_0() { + static const int mirar_t[3] = {100, 101, 54}; + static const int poder_t[6] = {11, 109, 111, 110, 115, 116}; + if (roomParse(room0Actions, -1)) return; // non-default actions - if (num_ejec == 2) { - if (pickedObject == kVerbLook) { - talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); - c_mirar++; - if (c_mirar == 3) - c_mirar = 0; - } else if (pickedObject == kVerbPick) { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); - c_poder++; - if (c_poder == 6) - c_poder = 0; - } else { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); - c_poder++; - if (c_poder == 6) - c_poder = 0; - } - } else if (num_ejec == 4) { - if (pickedObject == kVerbLook) { - talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); - c_mirar++; - if (c_mirar == 3) - c_mirar = 0; - } else if (pickedObject == kVerbPick) { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); - c_poder++; - if (c_poder == 6) - c_poder = 0; - } else { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); - c_poder++; - if (c_poder == 6) - c_poder = 0; - } - } else if (num_ejec == 5) { - if (pickedObject == kVerbLook) { - talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); - c_mirar++; - if (c_mirar == 3) - c_mirar = 0; - } else if (pickedObject == kVerbPick) { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); - c_poder++; - if (c_poder == 6) - c_poder = 0; - } else { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); - c_poder++; - if (c_poder == 6) - c_poder = 0; - } - } else if (num_ejec == 6) { + if (num_ejec == 2 || num_ejec == 4 || + num_ejec == 5 || num_ejec == 6) { if (pickedObject == kVerbLook) { - talk(_text[_lang][mirar_t[c_mirar]], mirar_v[c_mirar]); + talk(mirar_t[c_mirar]); c_mirar++; if (c_mirar == 3) c_mirar = 0; } else if (pickedObject == kVerbPick) { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); + talk(poder_t[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; } else { - talk(_text[_lang][poder_t[c_poder]], poder_v[c_poder]); + talk(poder_t[c_poder]); c_poder++; if (c_poder == 6) c_poder = 0; diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h new file mode 100644 index 0000000000..937f3460b7 --- /dev/null +++ b/engines/drascula/staticdata.h @@ -0,0 +1,5568 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef STATICDATA_H +#define STATICDATA_H + +#include "drascula/drascula.h" + +namespace Drascula { + +ItemLocation itemLocations[] = { + { 0, 0 }, // empty + { 5, 10 }, { 50, 10 }, { 95, 10 }, // 1-3 + { 140, 10 }, { 185, 10 }, { 230, 10 }, // 4-6 + { 275, 10 }, { 5, 40 }, { 50, 40 }, // 7-9 + { 95, 40 }, { 140, 40 }, { 185, 40 }, // 10-12 + { 230, 40 }, { 275, 40 }, { 5, 70 }, // 13-15 + { 50, 70 }, { 95, 70 }, { 140, 70 }, // 16-18 + { 185, 70 }, { 230, 70 }, { 275, 70 }, // 19-21 + { 5, 100 }, { 50, 100 }, { 95, 100 }, // 22-24 + { 140, 100 }, { 185, 100 }, { 230, 100 }, // 25-27 + { 275, 100 }, { 5, 130 }, { 50, 130 }, // 28-30 + { 95, 130 }, { 140, 130 }, { 185, 130 }, // 31-33 + { 230, 130 }, { 275, 130 }, { 5, 160 }, // 34-36 + { 50, 160 }, { 95, 160 }, { 140, 160 }, // 37-39 + { 185, 160 }, { 230, 160 }, { 275, 160 }, // 40-42 + { 275, 160 } // 43 +}; + +const int x_pol[44] = {0, 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, + 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, + 247, 83, 165, 1, 206, 42, 124, 83, 1, 247, + 83, 165, 1, 206, 42, 124, 83, 1, 247, 42, + 1, 165, 206}; +const int y_pol[44] = {0, 1, 1, 1, 1, 1, 1, 1, 27, 27, 1, + 27, 27, 27, 27, 27, 27, 27, 1, 1, 27, + 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, + 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, + 27, 1, 1}; +const int x_barra[] = {6, 51, 96, 141, 186, 232, 276, 321}; +const int x1d_menu[] = {280, 40, 80, 120, 160, 200, 240, 0, 40, 80, 120, + 160, 200, 240, 0, 40, 80, 120, 160, 200, 240, 0, + 40, 80, 120, 160, 200, 240, 0}; +const int y1d_menu[] = {0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25, + 50, 50, 50, 50, 50, 50, 50, 75, 75, 75, 75, 75, 75, 75, 100}; +int frame_x[20] = {43, 87, 130, 173, 216, 259}; + + +// Note: default action needs to be LAST for each group +// of actions with the same number +RoomTalkAction room0Actions[] = { + // num action object speech + { 1, kVerbLook, -1, 54 }, + { 1, kVerbMove, -1, 19 }, + { 1, kVerbPick, -1, 11 }, + { 1, kVerbOpen, -1, 9 }, + { 1, kVerbClose, -1, 9 }, + { 1, kVerbTalk, -1, 16 }, + { 1, kVerbDefault, -1, 11 }, + // ---------------------------------- + { 2, kVerbMove, -1, 19 }, + { 2, kVerbOpen, -1, 9 }, + { 2, kVerbClose, -1, 9 }, + { 2, kVerbTalk, -1, 16 }, + // ---------------------------------- + { 3, kVerbLook, -1, 316 }, + { 3, kVerbMove, -1, 317 }, + { 3, kVerbPick, -1, 318 }, + { 3, kVerbOpen, -1, 319 }, + { 3, kVerbClose, -1, 319 }, + { 3, kVerbTalk, -1, 320 }, + { 3, kVerbDefault, -1, 318 }, + // ---------------------------------- + { 4, kVerbMove, -1, 19 }, + { 4, kVerbOpen, -1, 9 }, + { 4, kVerbClose, -1, 9 }, + { 4, kVerbTalk, -1, 16 }, + // ---------------------------------- + { 5, kVerbOpen, -1, 9 }, + { 5, kVerbClose, -1, 9 }, + { 5, kVerbTalk, -1, 16 }, + // ---------------------------------- + { 6, kVerbMove, -1, 19 }, + { 6, kVerbOpen, -1, 9 }, + { 6, kVerbClose, -1, 9 }, + { 6, kVerbTalk, -1, 16 } +}; + +RoomTalkAction room1Actions[] = { + // num action object speech + { -1, kVerbPick, 118, 5 }, + { -1, kVerbOpen, 118, 3 }, + { -1, kVerbClose, 118, 4 }, + { -1, kVerbTalk, 118, 6 }, + // ---------------------------------- + { -1, kVerbLook, 119, 8 }, + { -1, kVerbMove, 119, 13 }, + { -1, kVerbClose, 119, 10 }, + { -1, kVerbTalk, 119, 12 }, + // ---------------------------------- + { -1, kVerbMove, 120, 13 }, + { -1, kVerbOpen, 120, 18 }, + { -1, kVerbTalk, 120, 15 } +}; + +RoomTalkAction room3Actions[] = { + // num action object speech + { -1, kVerbLook, 129, 21 }, + { -1, kVerbPick, 129, 5 }, + { -1, kVerbMove, 129, 24 }, + { -1, kVerbOpen, 129, 22 }, + { -1, kVerbClose, 129, 10 }, + // ---------------------------------- + { -1, kVerbLook, 131, 27 }, + { -1, kVerbPick, 131, 5 }, + { -1, kVerbMove, 131, 24 }, + { -1, kVerbOpen, 131, 22 }, + { -1, kVerbClose, 131, 10 }, + { -1, kVerbTalk, 131, 23 }, + // ---------------------------------- + { -1, kVerbLook, 132, 28 }, + { -1, kVerbPick, 132, 5 }, + { -1, kVerbMove, 132, 24 }, + { -1, kVerbOpen, 132, 22 }, + { -1, kVerbClose, 132, 10 }, + { -1, kVerbTalk, 132, 23 }, + // ---------------------------------- + { -1, kVerbLook, 133, 321 }, + { -1, kVerbPick, 133, 31 }, + { -1, kVerbMove, 133, 34 }, + { -1, kVerbOpen, 133, 30 }, + { -1, kVerbClose, 133, 10 }, + // ---------------------------------- + { -1, kVerbLook, 166, 55 }, + { -1, kVerbPick, 166, 7 }, + // ---------------------------------- + { -1, kVerbLook, 211, 184 } +}; + +RoomTalkAction room4Actions[] = { + // num action object speech + { -1, kVerbLook, 189, 182 }, + // ---------------------------------- + { -1, kVerbLook, 207, 175 }, + { -1, kVerbTalk, 207, 176 }, + // ---------------------------------- + { -1, kVerbLook, 208, 177 }, + // ---------------------------------- + { -1, kVerbLook, 209, 179 }, + // ---------------------------------- + { -1, kVerbLook, 210, 180 }, + { -1, kVerbOpen, 210, 181 } +}; + +RoomTalkAction room5Actions[] = { + // num action object speech + { -1, kVerbMove, 136, 13 }, + { -1, kVerbOpen, 136, 18 }, + { -1, kVerbTalk, 136, 15 }, + // ---------------------------------- + { -1, kVerbLook, 212, 187 }, + { -1, kVerbTalk, 212, 188 }, + // ---------------------------------- + { -1, kVerbLook, 213, 189 }, + { -1, kVerbOpen, 213, 190 } +}; + +RoomTalkAction room6Actions[] = { + // num action object speech + { -1, kVerbPick, 144, 43 }, + // ---------------------------------- + { -1, kVerbLook, 138, 35 }, + { -1, kVerbTalk, 138, 6 }, + // ---------------------------------- + { -1, kVerbLook, 143, 37 }, + { -1, kVerbPick, 143, 7 }, + { -1, kVerbMove, 143, 7 }, + { -1, kVerbTalk, 143, 38 }, + // ---------------------------------- + { -1, kVerbLook, 139, 36 }, + // ---------------------------------- + { -1, kVerbLook, 140, 147 } +}; + +RoomTalkAction room12Actions[] = { + // num action object speech + { -1, kVerbLook, 154, 329 }, + { -1, kVerbTalk, 154, 330 }, + // ---------------------------------- + { -1, kVerbMove, 155, 48 }, + { -1, kVerbTalk, 155, 331 }, + // ---------------------------------- + { -1, kVerbLook, 156, 35 }, + { -1, kVerbMove, 156, 48 }, + { -1, kVerbTalk, 156, 50 } +}; + +RoomTalkAction room14Actions[] = { + // num action object speech + { -1, kVerbLook, 200, 165 }, + // ---------------------------------- + { -1, kVerbLook, 201, 166 }, + // ---------------------------------- + { -1, kVerbLook, 202, 167 }, + // ---------------------------------- + { -1, kVerbLook, 203, 168 }, + { -1, kVerbPick, 203, 170 }, + { -1, kVerbMove, 203, 170 }, + { -1, kVerbTalk, 203, 169 }, + // ---------------------------------- + { -1, kVerbLook, 204, 171 } +}; + +const char *_text[][501] = { +{ + // 0 + "", + "ITS THE SECOND BIGGEST DOOR I'VE SEEN IN MY LIFE", + "NOT REALLY", + "THE CHURCH IS ALL BOARDED UP, IT MUST HAVE BEEN ABANDONED SEVERAL YEARS AGO", + "I HAVEN'T OPENED IT", + // 5 + "WHAT SHOULD I DO, SHOULD I PULL IT OFF?", + "HI THERE DOOR, I'M GOING TO MAKE YOU A DOOR-FRAME", + "IT'S TOO MUCH FOR ME", + "THERE'S A WINDOW STOPPING THE GAME FROM WORKING PROPERLY", + "I CAN'T", + // 10 + "YES, THAT'S DONE", + "WHY?", + "HI WINDOW, ARE YOU DOING ANYTHING TONIGHT?", + "NOT WITHOUT PERMISSION FROM THE TOWN HALL", + "IF ONLY THIS WINDOW WASN'T BOARDED UP...", + // 15 + "YOO-HOO WINDOW!", + "HI THERE", + "LIKE MICROCHOF'S", + "I CAN'T REACH", + "IT'S ALRIGHT WHERE IT IS", + // 20 + "", + "ITS A COFFIN IN THE SHAPE OF A CROSS", + "NO THANKS", + "HI DEAD MAN. NO, DON'T GET UP FOR MY SAKE", + "YES, JUST LIKE IN POLTERGEIST", + // 25 + "", + "", + "I'LL BE BACK IN FIFTEEN MINUTES", + "FORBIDDEN TO PUT UP POSTERS", + "IT'S UNCLE EVARISTO'S TOMB", + // 30 + "ITS LOCKED", + "I'VE GOT ONE", + "YOO HOO, UNCLE EVERISTO!", + "THERE'S NO REPLY", + "IT'S NOT WELL PARKED", + // 35 + "IT'S A DOOR", + "A DRAWER IN THE TABLE", + "A SUSPICIOUS WARDROBE", + "HI WARDROBE, HOW ARE YOU?", + "", + // 40 + "", + "IT'S AN ANCIENT CANDELABRUM", + "IT MUST HAVE BEEN HERE EVER SINCE YULE BRINNER HAD HAIR ON HIS HEAD", + "NO, ITS A RELIC", + "ITS A NICE ALTARPIECE", + // 45 + "", + "HA, HA, HA", + "", + "NO", + "", + // 50 + "HA, HE, HI, HO, HU, GREAT!", + "", + "", + "", + "I CAN'T SEE ANYTHING IN PARTICULAR", + // 55 + "IT'S FERNAN, THE PLANT", + "IT'S ONE OF THE FENCES SPIKES", + "HEY! THERE'S A PACKET OF MATCHES UNDER HERE", + "LOOK! A PACKET OF KLEENEX, AND ONE'S STILL UNUSED", + "THERE ISN'T ANYTHING ELSE IN THE BUCKET", + // 60 + "IT'S A BLIND MAN WHO CAN'T SEE", + "", + "", + "", + "", + // 65 + "THAT'S A GREAT DEAL OF MONEY", + "", + "", + "", + "", + // 70 + "", + "", + "", + "", + "", + // 75 + "", + "", + "", + "", + "", + // 80 + "", + "", + "", + "", + "", + // 85 + "", + "", + "", + "", + "", + // 90 + "", + "", + "", + "", + "", + // 95 + "", + "", + "", + "", + "", + // 100 + "THERE IS NOTHING SPECIAL ABOUT IT", + "IT'S NOT UNUSUAL", + "HEY, WHAT'S UP MAN?", + "HI", + "NOTHING NEW?", + // 105 + "HOW IS THE FAMILY?", + "THAT IS JUST LIKE YOU!", + "BUT HOW DO I GET THAT?", + "MY RELIGION DOES NOT ALLOW ME", + "IT'D BE BETTER NOT", + // 110 + "YEAH, SURE MAN!", + "NO WAY", + "IMPOSSIBLE", + "THIS WILL NOT OPEN", + "I CAN'T DO IT BY MYSELF", + // 115 + "I COULD DO IT, BUT I JUST FEEL A LITTLE LAZY", + "I DO NOT SEE THE REASON", + "IT'S A QUITE NICE BRAIN", + "AND SO BRAIN, WHAT ARE YOU UP TONIGHT?", + "NO, IT MUST BE KEPT SOMEWHERE AWAY FROM THE MUTANT ACTION OF THE ATMOSPHERE", + // 120 + "HE IS VERY STIFF, JUST LIKE MY BOSS", + "A VERY SHARP STICK", + "YOU FAITHFUL SHARP-PAINTED STICK, NOBLE TRANSILVAAANIAN OAK TREE", + "DAMN, I HAVE TO CUT MY NAILS!", + "B.J. IS IN THERE... SHE IS A REALLY HOT CHICK!", + // 125 + "IT IS FIRMLY LOCKED", + "\"SAVE AWAY LOCKS LTD.\"", + "IT IS THE TYPICAL SKELETON YOU FIND IN THE DUNGEONS OF ALL THE GAMES", + "IT IS COMMONLY USED TO COMMUNICATE ELECTRICITY TO THE MACHINES CONNECTED TO IT", + "IT IS ABSOLUTELY HAND MADE BECAUSE THE JAPANESE MAKE THEM POCKET SIZE", + // 130 + "I HAVE ONLY SEEN IN MY LIFE ANOTHER THING AS UGLY AS THIS ONE", + "FORGET IT. I AM NOT GOING TO TELL HIM ANYTHING IN CASE HE GETS MAD", + "IT SEEMS QUITE RATIONAL", + "IT IS A PICTURE OF PLATO WRITING HIS LOST DIALOGUE", + "I AM NOT ONE OF THOSE WHO TALKS TO POSTERS", + // 135 + "THAT'S A VERY CUTE DESK", + "IT IS A VAMPIRES HUNTER'S DIPLOMA OFFICIALLY APPROVED BY OXFORD UNIVERSITY", + "IT'S A DARK NIGHT WITH FULL MOON", + "IT SEEMS LIKE THESE SCREWS ARE NOT MUCH TWISTED", + "DON'T LOOK NOW, BUT I THINK THAT A HIDDEN CAMERA IS FOCUSING ON ME", + // 140 + "THAT'S A VERY MODERN STICK DETECTOR", + "NO. THE LABORATORY IS ON THE SECOND FLOOR", + "A NICE BEDSIDE TABLE", + "IT'S A LOT OF MONEY THAT CAN'T BE MISSING IN ANY VALUABLE ADVENTURE", + "IF I WERE A RICH MAN, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", + // 145 + "THOSE ARE STRANGE LEAVES. THEY MUST HAVE BROUGHT THEM FROM SOUTH AMERICA OR AROUND THERE", + "I DON'T THINK THEY WOULD ANSWER ME", + "THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY GET ALL THE BEAUTY WITHIN IT", + "I ONLY PRAY BEFORE I GO TO BED", + "HEY, THIS PIKE SEEMS A LITTLE BIT LOOSE!", + // 150 + "I HOPE YOU WON'T COMPLAIN ABOUT GETTING NO CLUES FROM ME", + "IT'S A QUITE CONVENTIONAL PIKE", + "THEY ARE CUTE, THOUGH THEY ARE COVERED WITH A LITTLE BIT OF SHIT", + "NO, THEY WON'T HEAR ME. HA,HA,HA THIS IS GREAT!", + "\"SLEEPING BEAUTY\" FROM CHAIKOSKY, OR CHOIFRUSKY, OR WHATEVER IT IS", + // 155 + "VERY TEMPTING", + "NO, I'M NOT ONE OF THOSE WHO PUT USED BUBBLE GUMS IN THEIR MOUTH", + "THAT'S A VERY NICE SICKLE. I WONDER WHERE THE HAMMER MAY BE", + "TOBACCO MANUFACTURERS WARN ABOUT HEALTH BEING SERIOUSLY DAMAGED BY SANITARY AUTHORITIES", + "AN ABSOLUTELY NORMAL CANDLE, INCLUDING WAX AND EVERYTHING", + // 160 + "THESE TWO SHINY COINS DO REALLY GLITTER!", + "THIS SHINY COIN DOES REALLY GLITTER!", + "WITH THIS I WILL BE IMMUNE AGAINST VAMPIRE'S BITES", + "NO, IT'S IS NOT THE RIGHT MOMENT YET", + "THERE IS A ONE THOUSAND BILL AND A COUPLE COINS", + // 165 + "IT SAYS \"PLEASE, DO NOT THROW FOOD TO THE PIANIST\"", + "OMELET, 200. FRIED FISH, 150, MAYONNAISE POTATOES, 225", + "BEST BURGERS ON THIS SIDE OF THE DANUBE, ONLY FOR 325!", + "THAT'S A NICE SKULL WITH A VERY PENETRATING LOOK, HA, HA, HA, HA, THAT WAS GOOD!", + "HI SKULL, YOU REMIND ME OF UNCLE HAMLET", + // 170 + "I HAVE THE HABIT OF NOT TOUCHING THINGS THAT HAVE BEEN ALIVE", + "IT'S A BIN", + "IT'S A BET FOR TONIGHT'S GAME", + "I WONDER WHAT THERE IS BEHIND THAT", + "HEY, THAT CURTAIN IS NOT MOVING!", + // 175 + "MAN, THIS CASTLE IS REALLY GLOOMY", + "I CAN'T, HE IS TOO FAR AWAY TO HEAR ME", + "IT'S THE TYPICAL TRANSILVANIAN FOREST, WITH TREES", + "MAN YOU REALLY SAY STUPID THINGS, AND THIS IS TOO DARK!", + "GARCIA, CANDY STORE. SWEETS AND BUBBLE GUM", + // 180 + "A VERY NICE DOOR", + "IT'S CLOSED", + "A COMPLETELY LOCKED BARREL", + "", + "AREN'T THESE BUGS REALLY CUTE?", + // 185 + "BSSST, PUSSYCAT... LITTLE CAT", + "THERE IS NO ANSWER", + "THE MOON IS A SATELLITE THAT TURNS AROUND THE EARTH WITH A REVOLUTION PERIOD OF 28 DAYS", + "HI, LOONY MOON", + "IT'S TOTALLY BLOCKED UP WITH PLANKS", + // 190 + "IT'S IMPOSSIBLE. NOT EVEN THAT TOUGH GUY FROM TV COULD OPEN THIS", + "HEY! THE SHADOW OF THAT CYPRESS LOOKS PROLONGED TO ME!", + "YOU, BARTENDER...!!", + "I WOULD LIKE TO HAVE A ROOM PLEASE", + "DO YOU KNOW WHERE I CAN FIND THE SO CALLED DRASCULA?", + // 195 + "YES, SO WHAT?", + "SO?", + "IS...THAT RIGHT?", + "GOOD QUESTION. NOW, LET ME TELL YOU MY STORY. LOOK...", + "IT'S JUST FIVE MINUTES", + // 200 + "I'M JOHN HACKER AND I REPRESENT A BRITISH PROPERTY COMPANY", + "AS FAR AS I KNOW, COUNT DRASCULA WANTS TO BUY SOME PIECES OF LAND IN GIBRALTAR AND MY COMPANY SENT ME HERE TO NEGOTIATE THE SELLING", + "I THINK I'M GOING BACK TO MY MUM'S TOMORROW FIRST THING IN THE MORNING", + "BEAUTIFUL NIGHT, HUH?", + "NO, NOTHING", + // 205 + "YOU...PIANIST...!!!!", + "BEAUTIFUL NIGHT", + "AND IT'S NOT EVEN COLD OR ANYTHING", + "ALL RIGHT, I'LL JUST LET YOU GO ON PLAYING", + "WELL THEN", + // 210 + "HI BOSS, HOW ARE YOU?", + "AND HOW IS THE FAMILY?", + "THIS IS QUITE GROOVY, HUH?", + "I'D BETTER NOT SAY ANYTHING", + "THERE IS NO PLACE LIKE HOME. THERE IS NO...WHAT?, BUT YOU ARE NOT AUNT EMMA. AS A MATTER OF FACT, I DON'T HAVE ANY AUNT EMMA!", + // 215 + "YES, SO DOES MINE. YOU CAN CALL ME ANYTHING YOU WANT, BUT IF YOU CALL ME JHONNY, I'LL COME TO YOU LIKE A DOG", + "AREN'T I JUST A FUNNY GUY, HUH?. BY THE WAY, WHERE AM I?", + "YES", + "SHOOT...!", + "OH, SURE...OF COURSE!", + // 220 + "WELL, THANKS VERY MUCH FOR YOUR HELP. I WON'T BOTHER YOU ANYMORE IF YOU PLEASE TELL ME WHERE THE DOOR IS...", + "IT'S BECAUSE THE KNOCK MUST HAVE AFFECTED MY BRAIN...I CAN'T SEE A THING...", + "WELL...THAT DOESN'T MATTER. I ALWAYS CARRY A SPARE ONE", + "WOW, WHAT A HOT CHICK!! I DIDN'T NOTICE!, BUT OF COURSE, I WASN'T WEARING MY GLASSES", + "HEY...", + // 225 + "AND ALL THIIIISSS???", + "DON'T WORRY B.J. HONEY, I'LL SAVE YOU FROM FALLING INTO HIS CLUTCHES...", + "YOU REALLY GOT ME MAD MAN...", + "AHHH A WEREWOLF!! DIE YOU DAMNED EVIL!", + "YES, WELL...", + // 230 + "YES, WELL...I THINK I'LL JUST GO ON MY WAY. EXCUSE ME", + "WHAT?", + "TO TELL YOU THE TRUTH...ON SECOND THOUGHTS...I DON'T REALLY THINK SO", + "AND SO TELL ME YOU ERUDITE PHILOSOPHER, IS THERE ANY RELATIONSHIP CAUSE-AND-EFFECT BETWEEN SILLY AND BILLY?", + "OK, OK, FORGET IT. I DON'T EVEN KNOW WHO I SAID ANYTHING ABOUT IT", + // 235 + "WHAT ARE YOU DOING HERE PHILOSPOZING INSTEAD OF BEING EATING SOME PEOPLE", + "HOW COME?", + "HEY, COULD YOU SAY AGAIN ALL THAT ABOUT PRE-EVOLUTIONARY RELATIONSHIPS?", + "YES, MAN. ALL THAT STUFF YOU TOLD ME ABOUT BEFORE. I DIDN'T GET IT VERY WELL, YOU KNOW", + "NO, I'D RATHER NOT SAY ANYTHING, IN CASE HE GETS ANGRY OR SOMETHING...", + // 240 + "HELLO?", + "YES, WHAT'S UP?", + "WELL, NOW THAT YOU MENTION IT, I'LL TELL YOU THAT...", + "", + "WELL, THANKS FOR CALLING. BY THE WAY, THIS IS NOT THE CASE, OF COURSE, BUT WHAT COULD HAPPEN IF A VAMPIRE GOT THE RECIPE BY ANY CHANCE?", + // 245 + "WELL ANYWAY. LISTEN, DOESN'T THIS LOOK TO YOU LIKE A LOT OF CRAP TO END UP SOON WITH THE GAME?. WELL, MAYBE NOT", + "IT'S EMPTY!", + "WHY DID YOU TAKE MY ONLY LOVE, B.J., AWAY FROM ME?. LIFE HAS NO MEANING FOR WITHOUT HER", + "HER BRAIN?\?!!", + "TO TELL YOU THE TRUTH, I THINK I HAD JUST ENOUGH WITH YOUR OF YOUR LITTLE MONSTER", + // 250 + "OH PLEASE, HOLLY VIRGIN, DON'T LET ANYTHING WORSE HAPPEN TO ME!!", + "YOU ARE NOT GOING TO GET YOUR WAY. I'M SURE SUPERMAN WILL CAME AND RESCUE ME!", + "WHAT A SHIT OF GAME IS THIS IN WHICH THE PROTAGONIST DIES!", + "HEY, WAIT A SECOND!, WHAT ABOUT MY LAST WISH?", + "HA. HA, I'M NOW IMMUNIZED AGAINST YOU DAMNED EVIL!. THIS CIGARETTE IS AN ANTI-VAMPIRE BREW THAT VON BRAUN GAVE TO ME", + // 255 + "YES SURE, BUT YOU'LL NEVER GET ME TO GIVE YOU THE RECIPE", + "APART FROM CREATING TORTURE, I CAN ALSO STAND IT.", + "OH, NO PLEASE! I'LL TALK, BUT PLEASE, DON'T DO THAT TO ME!", + "ALL RIGHT THEN. I TOLD YOU WHAT YOU WANTED TO KNOW. NOW SET B.J. AND ME FREE AND LEAVE US ALONE!", + "WHAT ARE YOU DOING HERE B.J.?. WHERE IS DRASCULA?", + // 260 + "WHAT A MEAN GUY!. JUST BECAUSE HE BELONGS TO THE NOBILITY HE THINKS HE IS ENTITLED TO SLEEP WITH ANYBODY HE FEELS LIKE", + "DOWN WITH ARISTOCRATIC DESPOTISM!!", + "POOR PEOPLE OF THE WORLD FOR EVER..!!", + "AND AS I CAN SEE HE HAS CHAINED YOU UP WITH LOCKS AND ALL THAT STUFF, HUH?", + "WELL, ALL RIGHT. DO YOU HAVE A HAIRPIN OVER THERE?", + // 265 + "ALL RIGHT, OK, DON'T GET MAD. I'LL THINK ABOUT SOMETHING", + "YOU...BARTENDER!!", + "HOW IS THE GAME GOING?", + "WHO?", + "CAN'T YOU SEE DRASCULA IS HERE?", + // 270 + "THEN, LET'S END UP WITH HIM, RIGHT?", + "GIVE ME A SCOTCH ON THE ROCKS", + "NOTHING, I JUST FORGOT WHAT I WAS GOING TO SAY...", + "EITHER YOU GET ME A SCOTCH ON THE ROCKS OR I'LL PLAY THE PIANO UNTIL THE GAME IS OVER", + "WHEN IS THE MATCH GOING TO BE OVER?", + // 275 + "GOOD EVENING", + "AND SO IGOR, HOW ARE YOU FEELING...A LITTLE HUMPED...?. HA, HA, HA, THAT WAS FUNNY!", + "WHAT ARE YOU SUPPOSED TO BE DOING?", + "WELL, NO", + "THEN WEAR GLASSES", + // 280 + "WHAT IS ALL THAT ABOUT THE SUPERNATURAL ORGY?", + "OK, OK, STOP IT. I THINK I CAN GET THE PICTURE", + "COULDN'T YOU TELL ME WHERE DRASCULA IS?", + "OH...PLEASE...COME ON...!", + "WHY NOT?", + // 285 + "OH...BUT DIES HE SLEEP AT NIGHT?", + "WELL, I HOPE YOU GET LUCKY", + "I HAVE TO TALK TO HIM...", + "YOOUUU...SKELETOOOONN..!!!", + "GOOD HEAVENS!, IT'S A DEAD MAN TALKING!", + // 290 + "TELL HOW DID YOU GET TO END UP HERE", + "AND WHY WOULD DRASCULA WANT TO CREATE A MONSTER?", + "WHAT'S YOUR NAME, MY SKELETON FRIEND?", + "HEY, DON'T YOU WANT ANYTHING TO EAT?", + "I BET YOUR STOMACH IS PRETTY EMPTY...HA, HA,HA!", + // 295 + "THE THING IS THAT I DON'T FEEL LIKE TALKING RIGHT NOW", + "I HOPE SOMEONE F...(WHISTLE) YOU...,AND YOUR F...(WHISTLE) SON OF (WHISTLE TWICE)", + "I REALLY LOVED HER. I KNOW SHE WASN'T MUCH OF A WONDER, BUT NOBODY'S PERFECT, RIGHT?", + "BESIDES. SHE REALLY HAD ONE OF THOSE GREAT BODIES THAT YOU NEVER FORGET...", + "I'LL NEVER BE THE SAME AGAIN. I WILL SHUT MYSELF AWAY IN A MONASTERY, AND WILL LET MY LIFE JUST FLOW...", + // 300 + "NOTHING WILL GET ME OUT OF THIS MYSTERY BECAUSE...", + "WHOSE?. WHOSE?", + "I WANT TO BECOME A PIRATE", + "I WANT TO BECOME A PROGRAMMER", + "TELL ME SOMETHING ABOUT PELAYO", + // 305 + "I'LL JUST GO ON PLAYING, AND I'LL FORGET I SAW YOU", + "WHOSE STUPID IDEA COULD THIS BE?", + "IT'S LIKE MY GRANDMOTHER'S HANDBAG ", + "JESUS, AREN'T I JUST REALLY COOL MAN...!", + "THE MORE I SEE MYSELF, THE MORE I LOVE ME", + // 310 + "HOW DO I LOCK MYSELF THEN?", + "I'LL HAVE TO OPEN ME FIRST, RIGHT?", + "I'M ALL RIGHT WHERE I AM", + "I GOT ME", + "HI, MYSELF!", + // 315 + "I'LL WEAR THEM WHEN THE RIGHT TIME COMES", + "I CAN'T SEE ANYTHING SPECIAL ABOUT IT", + "IT'S ALL RIGHT WHERE IT IS", + "AND WHAT FOR?", + "I CAN'T", + // 320 + "HI, YOU!", + "IT'S UNCLE DESIDERIO'S PANTHEON!", + "YOOUU...UNCLE DESIDERIOOOO!!", + "NO, I DON'T WANT TO CUT MYSELF AGAIN", + "AHHH,,,EXCUS....", + // 325 + "JAMM. AHH...", + "YES...WOF, WOF", + "LOOK, THERE'S A PIECE OF BUBBLE GUM STUCK HERE", + "THIS IS THE PORTABLILINE I GOT LAST CHRISTMAS", + "IT'S VERY HIGH!", + // 330 + "COME OUT TO THE BALCONY MY JULIET!!", + "YOU ARE THE LIGHT THAT ILLUMINATES MY WAY!", + "HEY, DOOR!, WHAT'S THE MATTER?", + "YOOOUU, CIGARETTE SPENDING MACHINEEE!", + "IT'S A CIGARETTE SPENDING MACHINE", + // 335 + "I HAVE ANOTHER COIN INSIDE", + "NO, I JUST DECIDED TO QUIT SMOKING AND DRINKING ALCOHOL", + "I WILL DEVOTE MYSELF TO WOMEN FROM NO ON", + "THIS IS A TRICK! NOTHING CAME OUT!", + "AT LAST!", + // 340 + "JUST A TRUNK", + "HELLO TRUNK, YOUR NAME IS JUST LIKE MY COUSIN FRANK...", + "I'VE FOUND B.J.'S HANDBAG!", + "OH MY GOD! DON'T GET MY IMAGE REFLECTED! I'M A VAMPIRE!", + "OH...JESUS, IT'S JUST A DRAWING!", + // 345 + "LITTLE MIRROR, TELL ME, WHO IS THE MOST BEAUTIFUL IN THE WHOLE KINGDOM?", + "HE WON'T OPEN", + "ALL RIGHT. I GOT THE EAR-PLUGS ON", + "IT'S A VAMPIRE'S HUNTER DIPLOMA, OFFICIALLY APPROVED BY OXFORD UNIVERSITY", + "NOT YET. THERE ARE STILL SOME INGREDIENTS MISSING. IT'S NOT WORTH WAKING HIM UP", + // 350 + "BUT I DON'T HAVE MONEY", + "IT'S A BRITISH LAMP", + "HELP ME OUT HERE BARTENDER!!", + "A VAMPIRE CAME IN AND TOOK MY GIRLFRIEND AWAY!!", + "BUT, AREN'T YOU GOING TO HELP ME!!??", + // 355 + "DEAD?, WHAT DO YOU MEAN DEAD?", + "AAHH....", + "A VAMPIRE HAS KIDNAPPED THE GIRL IN ROOM 501", + "BUT YOU HAVE TO HELP ME OUT!", + "CAN'T YOU PLAY ONE FROM BLUR?", + // 360 + "HOW CAN YOU STAY HERE ALL DAY PLAYING THE SAME SONG ALL THE TIME?", + "AND THEN, HOW CAN YOU HEAR ME?", + "PLEASE, LEND ME THE ERA-PLUGS", + "COME ON, I'LL GIVE THEM BACK TO YOU RIGHT AWAY", + "COOOMEE OONNN...", + // 365 + "WELL GOODBYE, I HAVE TO KILL A VAMPIRE", + "", + "WHAT'S YOUR LANGUAGE, TRANSILVANIAN?", + "WHO IS UNCLE DESIDERIO?", + "BUT, WHAT'S THE MATTER WITH THAT DRASCULA?", + // 370 + "WHO IS THAT GUY NAMED VON BRAUN?", + "AND WHY DOESN'T HE DO IT?", + "AND WHERE CAN I FIND VON BRAUN?", + "WELL, THANKS AND GOODBYE. HOPE YOU SLEEP IT OFF JUST FINE", + "WE'D BETTER CALL FIRST", + // 375 + "ARE YOU PROFESSOR BRAUN?", + "AND COULD YOU TELL ME WHERE I CA...?", + "I DON'T BELIEVE HE IS GANIMEDES THE DWARF", + "PROFESSOR!!", + "PLEASE HELP ME!. THE LIFE OF MY GIRLFRIEND DEPENDS ON YOU!!", + // 380 + "WELL, ALL RIGHT. I DON'T NEED YOUR HELP", + "ALL RIGHT. I'M LEAVING", + "DON'T DE AFRAID. WE WILL BEAT DRASCULA TOGETHER", + "THEN WHY DON'T YOU HELP ME?", + "I GOT THEM", + // 385 + "YES, I GOT THEM!!", + "ALL RIGHT", + "AHH....YES", + "I HAVE COME TO GET INTO THAT CABIN AGAIN", + "I AM READY TO FACE YOUR TEST", + // 390 + "ALL RIGHT OLD MAN. I CAME FOR MY MONEY", + "NO, NOTHING. I WAS JUST LEAVING", + "SORRY...", + "DO YOU LIKE THIS BOOK?. IT HAS SOME SCORES FROM TCHAIKOWSKY", + "HOW CAN I KILL A VAMPIRE?", + // 395 + "HAS ANYBODY TOLD YOU THAT SLEEPING IN A BAD POSITION IS NOT GOOD FOR YOU?", + "THAT'S WHAT MY MUM ALWAYS TELL ME", + "WHY WOULDN'T DRASCULA KILL YOU?", + "AND WHAT WAS IT?", + "GREAT! YOU HAVE AN IMMUNIZING BREW", + // 400 + "SO?", + "ALL RIGHT", + "CAN YOU REPEAT WHAT I NEED FOR THAT BREW", + "WELL, I'LL RUSH OUT TO GET IT", + "HEY, WHAT HAPPENED WITH THE PIANIST?", + // 405 + "I HAVE ALL THE INGREDIENTS OF THAT BREW", + "JUST A QUESTION. WHAT IS ALL THAT ABOUT THE ALUCSARD ETEREUM?", + "HELLO, HELLO...", + "AND WHERE IS THAT CAVERN?", + "WHAT HAPPENS? DIDN'T YOU HAVE TO GO TO THE COURT?", + // 410 + "...BUT... IF I MEET MORE VAMPIRES?", + "IT'S A VAMPIRE THAT DOESN'T LET ME COME THROUGH", + "HE LOOKS LIKE YODA, BUT A LITTLE TALLER", + "HEY YODA, IF YOU JUST LET ME GO ON MY WAY, I'LL GIVE YOU A PENNY", + "OK, OK, YOU GET MAD ABOUT NOTHING MAN", + // 415 + "HAS ANYBODY TOLD YOU THAT YOU LOOK LIKE YODA?", + "HI VAMPIRE, IT'S A BEAUTIFUL NIGHT, HUH?", + "ARE YOU A VAMPIRE OR AN OIL PAINTING?", + "I'D BETTER NOT SAY ANYTHING, IN CASE YOU GET MAD", + "IT'S LOCKED", + // 420 + "THE MAGPIE WOULD STICK OUT MY EYES IF I TRIED!", + "OH MY GOD. IT'S LOCKED...THAT'S SCARY, HUH?", + "THE HINGES ARE RUSTY", + "THERE IS ONLY ONE CAN OF FLOUR IN THERE", + "THAT TOOK AWAY THE RUST", + // 425 + "I HAVE FOUND A PINE STICK", + "I'LL TAKE THIS THICKER ONE", + "WELL, I THINK I CAN GET RID OF THIS STUPID DISGUISE", + "\"PASSAGE TO TOWERS CLOSED FOR REPAIRS. PLEASE USE MAIN ENTRANCE. SORRY FOR THE INCONVENIENCE\"", + "...HE IS PALE, HE HAS FANGS AND WEARS A TOUPE\220 AND HE SURE IS DRASCULA!", + // 430 + "IT'S B.J.! ARE YOU ALL RIGHT B.J.?", + "YES, I KNOW SHE IS STUPID, BUT I'M SO LONELY", + "YOU DON'T HAVE A KEY AROUND THERE, DO YOU?", + "I BET YOU DON'T HAVE A PICKLOCK AROUND!", + "GIVE ME A HAIRPIN, I'M GOING TO PLAY MCGYVER HERE!", + // 435 + "DON'T GO ANYWHERE. I'LL BE RIGHT BACK", + "SHOOT! IT'S BROKEN!", + "OLEEEE! I EVEN SHAVED DUDE!", + "YES, DARLING?", + "HE'S NOT ARRIVED YET", + // 440 + "THE PIANIST IS NOT HERE", + "A TRANSYLVANIAN SCOTCH ON THE ROCKS", + "I DON'T HAVE A ROOM YET", + "IT LOOKS LIKE HE GOT STUCK IN THE BATH AND DECIDED TO RUN A BAR", + "HE WAS DRUNK AS A SAILOR", + // 445 + "THAT HAIR...REMINDS ME OF SOMEBODY", + "IT'S A RAW-BONED SKELETON", + "LOOK! THERE'S MIGUEL BOSE!", + "HE'S ASLEEP. IT'D BE A SHAME WAKING HIM UP", + "HE'S UGLIER THAN EMILIO DE PAZ", + // 450 + "A PINE-WOODEN COFFIN", + "HE IS GOING TO CUT ME IN LITTLE SLICES. JUST LIKE A SAUSAGE", + "I DON'T LIKE PENDULAE. I'D RATHER PREFER ARTICHOKES", + "I CAN'T MAKE IT. I'M HANDCUFFED", + "IT'S OBVIOUSLY A SECRET DOOR", + // 455 + "THEY IGNORE ME", + "COME ON..!", + "WHEN I READ THE SCRIPT IT WAS SUPPOSED TO MOVE, BUT THE BUDGET GOT CRAZY AND THEY COULDN'T AFFORD TO PAY THE GYM, SO THAT I NEVER GOT TOUGH. END OF STORY", + "IT SEEMS A LITTLE LOOSE FROM THE WALL", + "I DON'T THINK IS GOING TO HELP ME ANYWAY. IT'S TOO WET TO LIGHT IT", + // 460 + "TO WEST WING? NO WAY! NOBODY KNOWS WHAT YOU CAN FIND THERE!!", + "SHE'S GOT NICE TRANSILVANIAN REASONS", + "", + "IT'S A SHAME THERE ISN'T A ROASTED LAMB IN THERE", + "LAST TIME I OPENED AN OVEN I BLEW UP THE HOUSE", + // 465 + "THAT'S THE TRANSILVANIAN FOOTBALL BADGE", + "WHAT FOR? TO PUT IT ON MY HEAD", + "I DON'T THINK THESE TOWERS ARE THE OPENING KIND", + "I DON'T WANT TO KNOW WHAT KIND OF FOOD IS IN THERE!", + "IT LOOKS IMPRESSIONIST TO ME...", + // 470 + "THE NIGHT IS FALLING OVER ALL OF US...THAT'S SCARY, ISN'T IT?", + "IT'S STUCK!", + "IT'S THE KING. YOU DIDN'T IMAGINE THAT, DID YOU!", + "NO, I ALREADY HAVE ONE AT HOME TO FEED", + "A SHELF WITH BOOKS AND SOME OTHER THINGS", + // 475 + "BUT WHO CAN I CALL AT THIS TIME?", + "\"HOW TO MAKE THE TAX RETURN FORMS\". HOW INTERESTING!", + "I ALREADY HAVE ONE AT HOME. I THINK IT'S A WORLDWIDE BEST SELLER", + "A COMPLETELY NORMAL KEY", + "I THINK SHE IS NOT FROM AROUND HERE", + // 480 + "HEY, THEY'RE FANG-LIKE FRENCH FRIES! I LOVE IT!", + "I DON'T THINK THIS IS THE RIGHT TIME TO EAT THAT CRAP KNOWING THAT MY GIRLFRIEND HAS BEEN KIDNAPPED BY THE MOST EVIL PERSON EVER ON EARTH", + "I'M HAVING A GREAT TIME KILLING VAMPIRES WITH THIS THING!", + "LET'S SEE IF ANOTHER ONE COMES SOON!", + "NO, IT HAS TO BE WITH A DIRTY AND STINKY VAMPIRE, JUST LIKE THE ONE I KILLED BEFORE", + // 485 + "THIS IS THE ONE AND ONLY WIG ELVIS USED WHEN HE GOT BALD", + "IT'S FLOUR, BUT DON'T ASK ME ANY COMMERCIAL NAMES", + "MAYBE ANOTHER TIME, OK?", + "THAT'S A GREAT AXE, IT'S A SHAME THERE IS NO VAMPIRE'S HEAD AROUND HERE, HUH?", + "NO. I'M REALLY A GOOD PERSON", + // 490 + "IT'S MARGARET'S THATCHER DEODORANT...HA, HA, HA...!!", + "THAT'S A PRETTY CUTE CLOAK", + "", + "JUST LIKE ALL BRANCHES FROM ANY TREE IN THE WORLD, THERE IS NOTHING SPECIAL.", + "HEY, THAT'S AMAZING! A ROPE WITHIN THIS TYPE OF ADVENTURE!", + // 495 + "I WONDER WHAT WE COULD USE IT FOR...", + "A ROPE TIED TO A BRANCH OR THE OTHER WAY AROUND, HOWEVER YOU WANT TO PUT IT...", + "IT LOOKS LIKE THIS MAGPIE IS EVIL-MINDED", + "FORGET IT, I'M NOT SAYING ANYTHING IN CASE HE GETS MAD", + "SHE LOOKS DEAD, BUT SHE REALLY ISN'T, HUH?", + // 500 + "NO ANIMAL WAS HARMED DURING THE PRODUCTION OF THIS GAME", +}, +{ + // 0 + "", + "Es la segunda puerta mas grande que he visto en mi vida", + "Bueno, no", + "Esta sellada con tablones. La iglesia debe llevar abandonada varios a\244os", + "Si no la he abierto", + // 5 + "\250Que hago? \250La arranco?", + "Hola puerta. Te voy a hacer un marco.", + "Demasiado para mi.", + "una ventana sellada con tablones.", + "No puedo.", + // 10 + "Ya lo esta.", + "\250Y pa que?", + "Hola ventana. \250Tienes algo que hacer esta noche?", + "No sin el permiso de obras publicas", + "\255eh! esa ventana tiene solo un tablon...", + // 15 + "\255Eoooooo! \255Ventana!", + "Hola tu.", + "", + "No alcanzo.", + "Esta bien donde esta.", + // 20 + "", + "Es una tumba en forma de cruz.", + "No gracias.", + "Hola muerto. \250quieres gusanitos?", + "Si hombre. Como en Poltergueist.", + // 25 + "", + "", + "Vuelvo en quince minutos.", + "Prohibido pegar carteles.", + "", + // 30 + "Esta cerrado con llave.", + "Ya tengo uno.", + "", + "No contesta.", + "No, esta bien aparcado.", + // 35 + "Es una puerta.", + "Un cajon de la mesa.", + "Un sospechoso armario.", + "Hola armario. \250Que tal?", + "", + // 40 + "", + "Es un candelabro muy viejo.", + "Debe de llevar aqui desde que Mazinguer-z era un tornillo.", + "No. Es una reliquia.", + "Es un bonito retablo.", + // 45 + "", + "Ji, ji, ji.", + "", + "No.", + "", + // 50 + "Ja, ja, ja. \255que bueno!", + "", + "", + "", + "No veo nada en especial.", + // 55 + "Es Fernan, la planta.", + "Es una de las picas de la verja.", + "\255Eh! Aqui debajo hay una caja de cerillas.", + "\255Mira! un paquete de clinex. \255Y hay uno sin usar!", + "No hay nada mas en el cubo.", + // 60 + "Es un ciego que no ve.", + "", + "", + "", + "", + // 65 + "Es una cuantiosa cantidad de dinero.", + "", + "", + "", + "", + // 70 + "", + "", + "", + "", + "", + // 75 + "", + "", + "", + "", + "", + // 80 + "", + "", + "", + "", + "", + // 85 + "", + "", + "", + "", + "", + // 90 + "", + "", + "", + "", + "", + // 95 + "", + "", + "", + "", + "", + // 100 + "NO TIENE NADA DE ESPECIAL", + "NO ES NADA FUERA DE LO NORMAL", + "\250QUE PASA TU?", + "HOLA", + "\250NADA NUEVO?", + // 105 + "\250QUE TAL LA FAMILIA?", + "\255QUE COSAS TIENES!", + "\255PERO COMO VOY A COGER ESO!", + "MI RELIGION ME LO PROHIBE", + "MEJOR NO", + // 110 + "\255SI HOMBRE!", + "NI HABLAR DE ESO", + "IMPOSIBLE", + "ESTO NO SE ABRE", + "YO SOLO NO PUEDO", + // 115 + "SI QUISIERA PODRIA, PERO ES QUE ME DA PEREZA", + "NO LE VEO MOTIVO APARENTE", + "ES UN CEREBRO BASTANTE MAJO", + "Y BIEN, CEREBRO \250QUE PIENSAS HACER ESTA NOCHE?", + "NO, DEBE CONSERVARSE EN LUGAR CERRADO A LA ACCION MUTANTE DE LA ATMOSFERA", + // 120 + "ES UN HUESO, COMO MI JEFE", + "UNA ESTACA MUY AFILADA", + "FIEL ESTACA PUNTIAGUDAAA, NOBLE ROBLE TRANSILVAAANOO", + "\255VAYA, ME TENGO QUE CORTAR LAS U\245AS!", + "\255AHI DENTRO ESTA B.J., Y HAY QUE VER COMO ESTA LA TIA!", + // 125 + "ESTA CERRADA A CAL Y CANTO", + "\"CANDADOS CAL Y CANTO S.A.\"", + "ES EL TIPICO ESQUELETO QUE ESTA EN TODAS LAS MAZMORRAS DE TODOS LOS JUEGOS", + "SE SUELE USAR PARA COMUNICAR CORRIENTE ELECTRICA A LOS APARATOS A EL ENCHUFADOS", + "ES TOTALMENTE ARTESANAL, PORQUE LOS JAPONESES LOS HACEN DE BOLSILLO", + // 130 + "SOLO HE VISTO EN MI VIDA OTRA COSA TAN FEA", + "QUITA. NO LE DIGO NADA A VER SI SE VA A ENFADAR", + "PARECE BASTANTE RACIONAL", + "ES UNA FOTO DE PLATON ESCRIBIENDO SU DIALOGO PERDIDO", + "NO SOY DE LOS QUE HABLAN CON POSTERS", + // 135 + "UN ESCRITORIO MUY MONO", + "ES UN DIPLOMA DE CAZA-CAZA-VAMPIROS HOMOLOGADO POR LA UNIVERSIDAD DE OXFORD", + "ES NOCHE CERRADA CON LUNA LLENA", + "PARECE QUE ESTOS TORNILLOS NO ESTAN MUY ENROSCADOS", + "NO MIRES, PERO CREO QUE UNA CAMARA OCULTA ME ESTA ENFOCANDO", + // 140 + "UN DETECTOR DE ESTACAS MUY MODERNO", + "NO, EL LABORATORIO ESTA EN EL SEGUNDO PISO", + "UNA BONITA MESILLA DE NOCHE", + "ES UN MONTON DE DINERO QUE NO PUEDE FALTAR EN UNA AVENTURA QUE SE PRECIE", + "SI YO FUERA RICO, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", + // 145 + "SON UNAS EXTRA\245AS HOJAS. DEBEN DE HABERLAS TRAIDO DE SUDAMERICA, O POR AHI", + "NO CREO QUE ME CONTESTARAN", + "ES UN BONITO CRUCIFIJO DE MADERA. EL ICONO NO CAPTA TODA LA EXTENSION DE SU BELLEZA", + "YO SOLO REZO ANTES DE ACOSTARME", + "\255EH, PARECE QUE ESTA PICA ESTA UN POQUITO SUELTA!", + // 150 + "PARA QUE LUEGO TE QUEJES DE QUE NO DOY PISTAS", + "ES UNA PICA BASTANTE CONVENCIONAL", + "SON MONOS, AUNQUE TIENEN UN POCO DE MIERDECILLA", + "NO, NO ME OIRIAN. JI,JI,JI \255QUE BUENO!", + "\"LA BELLA DURMIENTE DEL BOSQUE\" DE CHAIKOSKY, O CHOIFRUSKY, O COMO SE DIGA", + // 155 + "MUY APETITOSO", + "NO, YO NO SOY DE ESOS QUE SE METEN EN LA BOCA CHICLES USADOS", + "UNA HOZ MUY MONA. ME PREGUNTO DONDE ESTARA EL MARTILLO", + "\"LOS FABRICANTES DE TABACO ADVIERTEN QUE LAS AUTORIDADES SANITARIAS PERJUDICAN SERIAMENTE LA SALUD\"", + "UNA VELA NORMAL Y CORRIENTE, CON CERA Y TODO", + // 160 + "\255HAY QUE VER COMO BRILLAN ESTAS DOS BRILLANTES MONEDAS!", + "\255HAY QUE VER COMO BRILLA ESTA BRILLANTE MONEDA!", + "CON ESTO SERE INMUNE A LAS MORDEDURAS DE LOS VAMPIROS", + "NO, TODAVIA NO ES EL MOMENTO", + "HAY UN BILLETE DE MIL Y UN PAR DE MONEDAS", + // 165 + "DICE \"SE RUEGA NO ECHAR COMIDA AL PIANISTA\"", + "TORTILLA, 200. PESCAITOS FRITOS, 150, PATATAS ALIOLI, 225", + "LAS MEJORES HAMBUERGUESAS A ESTE LADO DEL DANUBIO, POR SOLO 325", + "ES UNA BONITA CALAVERA, CON UNA MIRADA MUY PENETRANTE. \255JI, JI, JI, QUE BUENO!", + "HOLA CALAVERA, ME RECUERDAS AL TIO DE HAMLET", + // 170 + "TENGO POR COSTUMBRE NO TOCAR COSAS QUE HAYAN ESTADO VIVAS", + "ES UNA PAPELERA", + "ES UNA PORRA PARA EL PARTIDO DE ESTA NOCHE", + "ME PREGUNTO QUE HABRA DETRAS", + "\255EH, ESTA CORTINA NO SE MUEVE!", + // 175 + "HAY QUE VER, QUE TETRICO ES ESE CASTILLO, \250EH? ", + "NO PUEDO, ESTA DEMASIADO LEJOS PARA OIRME", + "ES UN TIPICO BOSQUE TRANSILVANO, CON ARBOLES ", + "\255PERO QUE TONTERIAS DICES, CON LO OSCURO QUE ESTA!", + "CONFITERIA GARCIA. PASTELES Y CHICLES.", + // 180 + "UNA PUERTA MUY BONITA", + "ESTA CERRADA", + "UN BARRIL COMPLETAMENTE CERRADO", + "", + "\255QUE BICHOS MAS MONOS!", + // 185 + "BSSST, BSSST, GATITO...", + "NO CONTESTA", + "LA LUNA ES UN SATELITE QUE GIRA ALREDEDOR DE LA TIERRA CON UN PERIODO DE REVOLUCION DE 28 DIAS", + "HOLA, LUNA LUNERA CASCABELERA ", + "ESTA TOTALMENTE TAPIADA CON TABLONES", + // 190 + "IMPOSIBLE. ESTO NO LO ABRE NI EL MAYORDOMO DE LA TELE", + "\255EH, PARECE QUE LA SOMBRA DE ESE CIPRES ES ALARGADA!", + "\255EOOO, TABERNEROOO!", + "QUISIERA UNA HABITACION ", + "\250SABE DONDE PUEDO ENCONTRAR A UN TAL CONDE DRASCULA?", + // 195 + "SI, \250QUE PASA? ", + "\250Y ESO?", + "\250DE... DE VERDAD?", + "BUENA PREGUNTA, LE VOY A CONTAR MI HISTORIA, MIRE...", + "SON SOLO CINCO MINUTOS", + // 200 + "ME LLAMO JOHN HACKER, Y SOY REPRESENTANTE DE UNA INMOBILIARIA BRITANICA", + "AL PARECER, EL CONDE DRASCULA QUIERE COMPRAR UNOS TERRENOS EN GIBRALTAR, Y ME HAN MANDADO A MI PARA NEGOCIAR LA VENTA", + "PERO ME PARECE A MI QUE MA\245ANA TEMPRANITO ME VUELVO CON MI MAMA", + "BONITA NOCHE \250VERDAD?", + "NO, NADA", + // 205 + "EOOOO, PIANISTA", + "BONITA NOCHE", + "Y ADEMAS NO HACE FRIO", + "PUES NADA, TE DEJO QUE SIGAS TOCANDO", + "PUES ESO", + // 210 + "HOLA JEFE, \250QUE TAL?", + "\250Y LA FAMILIA?", + "HAY AMBIENTE AQUI \250EH?", + "MEJOR NO DIGO NADA", + "SE ESTA MEJOR EN CASA QUE EN NINGUN SITIO... SE ESTA MEJOR EN... \250EH? PERO SI USTED NO ES LA TIA ENMA. ES MAS. \255SI YO NO TENGO NINGUNA TIA ENMA!", + // 215 + "SI, EL MIO TAMBIEN. USTED PUEDE LLAMARME COMO LE APETEZCA, AUNQUE SI ME LLAMA JOHNY, ACUDO COMO LOS PERROS", + "SI, QUE GOLPES TENGO \250VERDAD? POR CIERTO, \250DONDE ESTOY?", + "SI.", + "CACHIS... ", + "OH, SI. POR SUPUESTO", + // 220 + "PUES MUCHAS GRACIAS POR PRESTARME TU AYUDA. NO TE MOLESTO MAS. SI ME DICES DONDE ESTA LA PUERTA, POR FAVOR... ", + "PORQUE EL GOLPE ME HA DEBIDO AFECTAR AL CEREBRO Y NO VEO TRES EN UN BURRO ", + "BAH, NO IMPORTA. SIEMPRE LLEVO DE REPUESTO", + "\255GUAU, QUE TIA MAS BUENA! \255NO ME HABIA DADO CUENTA YO! CLARO, SIN LAS GAFAS", + "OYE... ", + // 225 + "\255\250 Y ESTOOOOOO?!", + "\255NO TE PREOCUPES B.J., AMOR MIO! TE SALVARE DE LAS GARRAS DE ESE ", + "ME HA TOCADO LAS NARICES, VAMOS.", + "\255AHHH, UN HOMBRE LOBO! \255MUERE MALDITO!", + "SI, ESTO...", + // 230 + "SI, ESTO... CREO QUE SEGUIRE MI CAMINO. CON PERMISO... ", + "\250QUE?", + "PUES LA VERDAD, PENSANDOLO BIEN... CREO QUE NO", + "DIME, OH ERUDITO FILOSOFO, \250EXISTE ALGUNA RELACION CAUSA-EFECTO ENTRE LA VELOCIDAD Y EL TOCINO?", + "VALE, VALE, DEJALO. DE TODAS FORMAS, NO SE POR QUE HE DICHO ESO.", + // 235 + "\250QUE HACES AQUI FILOSOFANDO, QUE NO TE ESTAS COMIENDO GENTE?", + "\250Y ESO?", + "OYE, PUEDES REPETIR ESO DE \"INCLINACIONES PRE-EVOLUTIVAS\"?", + "SI HOMBRE. ESE ROLLO QUE ME HAS SOLTADO ANTES. ES QUE NO ME HE ENTERADO MUY BIEN...", + "NO, MEJOR NO DIGO NADA, QUE COMO LE TOQUE LA VENA...", + // 240 + "\250SI, DIGA?", + "SI, \250QUE PASA? ", + "AH, PUES AHORA QUE SACA EL TEMA LE DIRE QUE...", + "", + "POR CIERTO, \250QUE PASARIA SI UN VAMPIRO SE HICIERA CIRCUNSTANCIALMENTE CON LA RECETA... ", + // 245 + "PUES NADA. OYE, \250A QUE ESTO PARECE UN PEGOTE PUESTO EN EL GUION PARA ACABAR PRONTO EL JUEGO? BUENO, A LO MEJOR NO", + "\255ESTA VACIO!", + "PORQUE ME ROBASTE MI AMOR, B.J. SIN ELLA LA VIDA PARA MI NO TIENE SENTIDO", + "\255\250SU CEREBRO?!", + "PUES NO ES POR NADA, PERO ME PARECE QUE ME HA CARGADO TU MONSTRUITO", + // 250 + "\255VIRGENCITA, QUE ME QUEDE COMO ESTOY!", + "\255NO TE SALDRAS CON LA TUYA. SEGURO QUE APARECE SUPERLOPEZ Y ME RESCATA!", + "VAYA UNA MIERDA DE JUEGO EN EL QUE MUERE EL PROTAGONISTA ", + "UN MOMENTO, \250QUE HAY DE MI ULTIMO DESEO?", + "\255JA, JA! AHORA ESTOY INMUNIZADO CONTRA TI MALDITO DEMONIO. ESTE CIGARRILLO ES UNA POCION ANTIVAMPIRICA QUE ME DIO VON BRAUN ", + // 255 + "SI, CLARO. PERO NUNCA CONSEGUIRAS QUE TE DIGA LA RECETA", + "PUEDO SOPORTAR LA TORTURA, ADEMAS DE CREARLA ", + "\255NO, POR FAVOR! \255HABLARE, PERO NO ME HAGA ESO!", + "BUENO. YA TE HE DICHO LO QUE QUERIAS SABER. AHORA LIBERANOS A B.J. Y A MI Y DEJANOS EN PAZ", + "\255B.J.! \250QUE HACES AQUI? \250DONDE ESTA DRASCULA?", + // 260 + "\255QUE DESALMADO! SOLO PORQUE PERTENECE A LA NOBLEZA SE CREE QUE TIENE EL DERECHO DE PERNADA CON CUALQUIERA QUE SE LE ANTOJE ", + "\255ABAJO LA ARISTOCRACIA CACIQUIL!", + "\255ARRIBA LOS POBRES DEL MUUNDOOO....", + "Y POR LO QUE VEO TE HA ENCADENADO CON CANDADO Y TODO", + "BUENO, VALE. \250NO TENDRAS UNA HORQUILLA?", + // 265 + "BUENO, BUENO. NO TE PONGAS ASI, YA SE ME OCURRIRA ALGO.", + "EH, TABERNERO", + "\250COMO VA EL PARTIDO?", + "\250QUIEN?", + "\250ES QUE NO VES QUE ESTA AQUI DRASCULA?", + // 270 + "PUES VAMOS A ACABAR CON EL \250NO?", + "PONME UN CUBATA...", + "NADA. SE ME HA OLVIDADO LO QUE TE IBA A DECIR", + "O\247ME\247PONES\247UN\247CUBATA\247O\247ME\247PONGO\247A\247TOCAR\247EL\247PIANO", + "\250CUANTO QUEDA PARA QUE ACABE EL PARTIDO?", + // 275 + "BUENAS NOCHES", + "\250Y QUE TAL ANDAS IGOR? \250JOROBAO? \255JI,JI,JI, QUE BUENO! ", + "\250QUE SE SUPONE QUE HACES?", + "PUES NO", + "PUES PONTE GAFAS", + // 280 + "\250QUE ES ESO DE LA ORGIA SOBRENATURAL?", + "VALE, VALE, NO SIGAS. YA ME HAGO UNA IDEA", + "\250NO PODRIAS DECIRME DONDE ESTA DRASCULA? ", + "ANDA, PORFAAA", + "\250POR QUE NO?", + // 285 + "AH, PERO \250DUERME POR LA NOCHE?", + "BUENO, PUES QUE SE DE BIEN LA RENTA", + "ES QUE TENGO QUE HABLAR CON EL", + "\255EOOO, ESQUELETOOO! ", + "\255CANASTOS! \255UN MUERTO QUE HABLA!", + // 290 + "CUENTAME, \250COMO HAS VENIDO A PARAR AQUI?", + "\250Y PARA QUE VA A QUERER DRASCULA CREAR UN MONSTRUO? ", + "\250CUAL ES TU NOMBRE, AMIGO ESQUELETO?", + "OYE, \250NO QUIERES QUE TE TRAIGA NADA DE COMER?", + "DEBES TENER EL ESTOMAGO VACIO. \255JI, JI, JI!", + // 295 + "LA VERDAD ES QUE NO ME APETECE HABLAR AHORA", + "\255LA MADRE QUE...(PITIDO) ESPERO QUE TE...(PITIDO) Y QUE TE...(PITIDO) DOS VECES!", + "YO LA QUERIA, DE VERDAD. VALE, DE ACUERDO QUE NO ERA UNA LUMBRERA, PERO NADIE ES PERFECTO \250NO? ", + "ADEMAS, TENIA UN CUERPAZO QUE PARA QUE QUEREMOS MAS", + "YA NO VOLVERE A SER EL MISMO. ME RECLUIRE EN UN MONASTERIO A DEJAR QUE MI VIDA SE ME ESCAPE POCO A POCO", + // 300 + "NADA PODRA YA SACARME DE ESTA MISERIA PORQUE...", + "\250DE QUIEN? \250DE QUIEN?", + "QUIERO SER PIRATA", + "QUIERO SER PROGRAMADOR ", + "CONTADME ALGO SOBRE PELAYO", + // 305 + "SEGUIRE JUGANDO Y OLVIDARE QUE OS HE VISTO ", + "\255A QUIEN SE LE HABRA OCURRIDO ESTA IDIOTEZ!", + "ES UN BOLSO COMO EL DE MI ABUELITA ", + "\255PERO QUE BUENO QUE ESTOY!", + "CUANTO MAS ME MIRO MAS ME GUSTO", + // 310 + "\250Y LUEGO COMO ME CIERRO?", + "TENDRE QUE ABRIRME PRIMERO \250NO?", + "ESTOY BIEN DONDE ESTOY", + "YA ME TENGO", + "HOLA YO", + // 315 + "ME LOS PONDRE CUANDO LA OCASION SEA OPORTUNA", + "NO VEO NADA EN ESPECIAL", + "ESTA BIEN DONDE ESTA", + "\250Y PA QUE?", + "NO PUEDO", + // 320 + "HOLA TU", + "ES EL PANTEON DEL TIO DESIDERIO", + "\255EOOOO, TIO DESIDERIOOOO!", + "NO. NO QUIERO CORTARME OTRA VEZ", + "\255EJEM,JEM...!", + // 325 + "\255YAMM, EMMM, JH!", + "\255SI, COF,COF!", + "ANDA, SI HAY UN CHICLE AQUI PEGADO", + "ES EL MOVILANI QUE ME REGALARON EN NAVIDAD", + "\255QUE ALTO ESTA!", + // 330 + "\255SAL AL BALCON JULIETA!", + "\255TU ERES LA LUZ QUE ILUMINA MI CAMINO!", + "EH,PUERTA \250QUE PASSA?", + "EOOO, MAQUINA DE TABACO DE TRANSILVANIAAA", + "ES UNA MAQUINA EXPENDEDORA DE TABACO", + // 335 + "TENGO OTRA MONEDA DENTRO", + "NO. HE DECIDIDO DEJAR EL TABACO Y EL ALCOHOL ", + "A PARTIR DE AHORA ME DEDICARE SOLO A LAS MUJERES ", + "\255ESTO ES UN TIMO! NO HA SALIDO NADA", + "\255POR FIN! ", + // 340 + "PUES ESO, UN BAUL", + "HOLA BAUL, TE LLAMAS COMO MI PRIMO QUE SE LLAMA RAUL.", + "HE ENCONTRADO EL BOLSO DE B.J.", + "DIOS MIO, NO ME REFLEJO \255SOY UN VAMPIRO!", + "...AH, NO. ES QUE ES UN DIBUJO", + // 345 + "ESPEJITO: \250QUIEN ES EL MAS BELLO DEL REINO?", + "NO ME QUIERE ABRIR", + "MUY BIEN. ME HE PUESTO LOS TAPONES", + "ES UN DIPLOMA DE CAZA-VAMPIROS HOMOLOGADO POR LA UNIVERSIDAD DE CAMBRIDGE", + "NO, AUN ME FALTAN INGREDIENTES, NO VALE LA PENA DESPERTARLE", + // 350 + "ES QUE NO TENGO DINERO", + "ES UNA LAMPARA BRITANICA", + "\255TABERNERO! \255AYUDEME!", + "HA APARECIDO UN VAMPIRO Y SE HA LLEVADO A MI NOVIA", + "\255\250PERO NO VA USTED A AYUDARME?!", + // 355 + "\250MUERTA? \250QUE ES LO QUE QUIERE DECIR?", + "\255EJEM!", + "\255UN VAMPIRO HA SECUESTRADO A LA CHICA DE LA 506!", + "\255TIENES QUE AYUDARME!", + "\250NO SABES TOCAR NINGUNA DE LOS INHUMANOS?", + // 360 + "\250COMO TE AGUANTAS, TODO EL DIA TOCANDO LO MISMO?", + "\250Y ENTONCES COMO ME OYES?", + "DEJAME LOS TAPONES", + "ANDA. SI TE LOS DEVUELVO ENSEGUIDA", + "VENGAAAA...", + // 365 + "ADIOS. TENGO QUE MATAR A UN VAMPIRO", + "", + "\250QUE HABLAS? \250EN TRANSILVANO?", + "\250QUIEN ES EL TIO DESIDERIO?", + "\250PERO QUE PASA CON ESE TAL DRASCULA?", + // 370 + "\250QUIEN ES ESE TAL VON BRAUN?", + "\250Y POR QUE NO LO HACE?", + "\250Y DONDE PUEDO ENCONTRAR A VON BRAUN?", + "PUES GRACIAS Y ADIOS, QUE LA DUERMAS BIEN", + "SERA MEJOR LLAMAR PRIMERO", + // 375 + "\250ES USTED EL PROFESOR VON BRAUN?", + "\250Y NO ME PODRIA DECIR DONDE PUEDO...?", + "NO ME CREO QUE SEA EL ENANO GANIMEDES", + "\255PROFESOR!", + "\255AYUDEME! \255LA VIDA DE MI AMADA DEPENDE DE USTED!", + // 380 + "ESTA BIEN, NO NECESITO SU AYUDA", + "DE ACUERDO. ME VOY", + "NO TENGA MIEDO. JUNTOS VENCEREMOS A DRASCULA", + "ENTONCES \250POR QUE NO ME AYUDA?", + "YO LAS TENGO", + // 385 + "\255SI LAS TENGO!", + "DE ACUERDO", + "...ER ...SI", + "VENGO A METERME EN ESA CABINA DE NUEVO", + "ESTOY PREPARADO PARA ENFRENTARME A SU PRUEBA", + // 390 + "ESTA BIEN, VEJETE. HE VENIDO A POR MI DINERO", + "NO, NADA. YA ME IBA", + "PERDONA", + "\250TE INTERESA ESTE LIBRO? TIENE PARTITURAS DE TCHAIKOWSKY", + "\250COMO PUEDO MATAR A UN VAMPIRO?", + // 395 + "\250NO TE HAN DICHO QUE ES MALO DORMIR EN MALA POSTURA?", + "PUES ES LO QUE SIEMPRE ME DICE A MI MI MADRE", + "\250POR QUE NO TE PUDO MATAR DRASCULA?", + "\250Y QUE FUE?", + "\255ESTUPENDO! \255TIENE USTED UNA POCION DE INMUNID...!", + // 400 + "\250ENTONCES?", + "MUY BIEN", + "\250ME PUEDE REPETIR LO QUE NECESITO PARA ESA POCION?", + "PUES PARTO RAUDO A BUSCARLO", + "OIGA, \250QUE HA PASADO CON EL PIANISTA?", + // 405 + "YA\247TENGO\247TODOS\247LOS\247INGREDIENTES\247DE\247ESA\247POCION", + "UNA PREGUNTA: \250QUE ES ESO DE ALUCSARD ETEREUM?", + "DIGA, DIGA... ", + "\250Y DONDE ESTA ESA GRUTA?", + "\250QUE PASA? \250NO TENIAIS JUZGADO?", + // 410 + "...PERO ...\250Y SI ME ENCUENTRO A MAS VAMPIROS?", + "ES UN VAMPIRO QUE NO ME DEJA PASAR", + "SE PARECE A YODA, PERO MAS ALTO ", + "EH, YODA. SI ME DEJAS PASAR TE DOY UN DURO", + "BUENO VALE, QUE NO SE TE PUEDE DECIR NADA", + // 415 + "HOLA VAMPIRO, BONITA NOCHE \250VERDAD?", + "\250TE HAN DICHO ALGUNA VEZ QUE TE PARECES A YODA?", + "\250ERES UN VAMPIRO O UNA PINTURA AL OLEO?", + "MEJOR NO TE DIGO NADA, NO TE VAYAS A ENFADAR", + "ESTA CERRADA CON LLAVE", + // 420 + "\255LA URRACA ME PODRIA SACAR UN OJO SI LO INTENTO!", + "\255ESTA CERRADA! \255DIOS MIO, QUE MIEDO!", + "LAS BISAGRAS ESTAN OXIDADAS", + "AQUI DENTRO SOLO HAY UN BOTE CON HARINA", + "ESO HA QUITADO EL OXIDO", + // 425 + "HE ENCONTRADO UNA ESTACA DE PINO", + "COGERE ESTE QUE ES MAS GORDO", + "BUENO, CREO QUE YA PUEDO DESHACERME DE ESTE ESTUPIDO DISFRAZ", + "\"PASADIZO A LOS TORREONES CERRADO POR OBRAS. POR FAVOR, UTILICEN ENTRADA PRINCIPAL. DISCULPEN LAS MOLESTIAS\"", + "...ES PALIDO, TIENE COLMILLOS, TIENE TUPE Y USA CAPA... \255SEGURO QUE ES DRASCULA!", + // 430 + "\255ES B.J.! B.J. \250ESTAS BIEN?", + "SI, YA LO SE QUE ES TONTA, PERO ES QUE ESTOY DE SOLO", + "NO TENDRAS UNA LLAVE POR AHI, \250VERDAD? ", + "\250A QUE NO TIENES UNA GANZUA?", + "DAME UNA HORQUILLA. VOY A HACER COMO MCGYVER", + // 435 + "NO TE MUEVAS QUE AHORA VUELVO", + "\255CACHIS! \255SE ME HA ROTO!", + "\255OLEEEE! \255Y ADEMAS ME HE AFEITADO, COLEGA!", + "\250SI, CARI\245O?", + "NO LLEGA", + // 440 + "EL PIANISTA NO ESTA", + "UN CUBATA TRANSILVANO", + "AUN NO TENGO HABITACION", + "PARECE QUE SE QUEDO ATASCADO EN LA BA\245ERA Y DECIDIO PONER UN BAR", + "ESTA COMO UNA CUBA DE CUBA", + // 445 + "ESE PELO... EL CASO ES QUE ME RECUERDA A ALGUIEN", + "ES UN ESQUELETO HUESUDO", + "\255MIRA! \255MIGUEL BOSE!", + "ESTA DURMIENDO. SERIA UNA PENA DESPERTARLE", + "ES MAS FEO QUE EMILIO DE PAZ ", + // 450 + "UN ATAUD DE MADERA DE PINO", + "ME VA A CORTAR EN RODAJITAS, COMO A UN SALCHICHON", + "NO ME GUSTAN LOS PENDULOS. PREFIERO LAS ALCACHOFAS", + "MIS MANOS ESTAN ESPOSADAS. NO VOY A PODER", + "SALTA A LA VISTA QUE ES UNA PUERTA SECRETA", + // 455 + "ME IGNORAN", + "\255ANDA YA!", + "EN EL GUION SE MOVIA, PERO EL JUEGO SE SALIO DE PRESUPUESTO Y NO PUDIERON PAGARME UN GIMNASIO PARA PONERME CACHAS, ASI QUE NADA", + "PARECE QUE ESTA UN POCO SUELTA DE LA PARED", + "NO CREO QUE ME VAYA A SERVIR DE NADA. ESTA DEMASIADO HUMEDA PARA ENCENDERLA", + // 460 + "\250AL ALA OESTE? \255NI LOCO! \255A SABER QUE HABRA ALLI!", + "TIENE BONITOS MOTIVOS TRANSILVANOS ", + "", + "QUE PENA QUE AHI DENTRO NO HAYA UN CORDERITO ASANDOSE ", + "LA ULTIMA VEZ QUE ABRI UN HORNO LA CASA SALTO POR LOS AIRES", + // 465 + "ES EL ESCUDO DEL EQUIPO DE FUTBOL DE TRANSILVANIA", + "\250Y PARA QUE? \250PARA PONERMELA EN LA CABEZA?", + "NO CREO QUE ESTOS CAJONES SEAN DE LOS QUE SE ABREN", + "\255NO QUIERO SABER LA COMIDA QUE HABRA AHI DENTRO!", + "ME DA LA IMPRESION DE QUE ES IMPRESIONISTA", + // 470 + "LA NOCHE SE APODERA DE TODOS... QUE MIEDO \250NO?", + "ESTA ATRANCADA", + "ES EL REY \250ES QUE NO TE LO HABIAS IMAGINADO?", + "NO, YA TENGO UNO EN MI CASA, AL QUE LE DOY DE COMER Y TODO", + "UNA ESTANTERIA CON LIBROS Y OTRAS COSAS ", + // 475 + "\250Y A QUIEN LLAMO A ESTAS HORAS?", + "\"COMO HACER LA DECLARACION DE LA RENTA\" \255QUE INTERESANTE!", + "YA TENGO UNO EN MI CASA. CREO QUE ES UN BEST-SELLER MUNDIAL ", + "UNA LLAVE COMPLETAMENTE NORMAL", + "ME PARECE A MI QUE ESTA NO ES DE AQUI", + // 480 + "\255EH, SON PATATAS FRITAS CON FORMA DE COLMILLO! ME ENCANTA", + "NO CREO QUE SEA EL MEJOR MOMENTO DE PONERSE A COMER CHUCHERIAS, CON MI NOVIA EN MANOS DEL SER MAS MALVADO QUE HA PARIDO MADRE", + "\255QUE BIEN ME LO ESTOY PASANDO CARGANDOME VAMPIROS CON ESTO!", + "A VER SI APARECE OTRO PRONTO", + "NO, TIENE QUE SER CON UN VAMPIRO SUCIO Y MALOLIENTE COMO EL QUE ME CARGUE ANTES", + // 485 + "ES LA AUTENTICA PELUCA QUE USO ELVIS CUANDO SE QUEDO CALVO", + "ES HARINA, PERO NO PUEDO DECIR MARCAS", + "QUIZA EN OTRO MOMENTO \250VALE?", + "ES UN HACHA MAGNIFICA, QUE PENA QUE NO HAYA POR AQUI CERCA NINGUNA CABEZA DE VAMPIRO", + "NO. EN EL FONDO SOY BUENA PERSONA", + // 490 + "ES EL DESODORANTE DE LA TACHER \255JI,JI,JI!", + "ES UNA CAPA BASTANTE MONA", + "", + "COMO TODAS LAS RAMAS DE TODOS LOS ARBOLES DE TODO EL MUNDO, O SEA, SIN NADA DE PARTICULAR", + "\255OH, INCREIBLE! \255UNA CUERDA EN UNA AVENTURA GRAFICA!", + // 495 + "ME PREGUNTO PARA QUE SERVIRA...", + "UNA CUERDA ATADA A UNA RAMA O UNA RAMA ATADA A UNA CUERDA, SEGUN SE MIRE", + "PARECE QUE ESTA URRACA TIENE MUY MALAS INTENCIONES", + "QUITA, YO NO LA DIGO NADA, A VER SI SE VA A ENFADAR", + "PARECE QUE ESTA MUERTA, PERO ES MENTIRA \250EH?", + // 500 + "NINGUN ANIMAL DA\245ADO EN LA PRODUCCION DE ESTE JUEGO", +}, +{ + // 0 + "", + "Das ist die zweitgroesste Tuer, die ich je gesehen habe !", + "Ok, stimmt nicht ganz....", + "Sie haben Bretter davorgenagelt. Die Kirche scheint seit Jahren leer zu stehen", + "Aber ich habe sie doch nicht aufgemacht!", + // 5 + "Soll ich sie aufbrechen ?", + "Hallo Tuer! Ich verpasse Dir jetzt mal einen Rahmen!", + "Zuviel fuer mich !", + "ein zugenageltes Fenster", + "Ich schaff\357es nicht!", + // 10 + "Schon geschafft!", + "Und wozu?", + "Hallo Fenster. Hast Du heute abend schon was vor?", + "Nicht ohne Genehmigung der Staedtischen Baubehoerde", + "hey! Das Fenster da hat nur EIN Brett...", + // 15 + "Heyhooo! Fenster!", + "Hallo Du", + "", + "Ich komme nicht dran!", + "Gut so ! ", + // 20 + "", + "Es ist ein Grabstein in Form eines Kreuzes.", + "Nein, danke", + "Hallo Toter. Willst Du ein paar Wuermchen?", + "Klar Mann ! Wie in Poltergeist.", + // 25 + "", + "", + "Bin in einer Viertelstunde zurueck!", + "Plakate ankleben verboten", + "", + // 30 + "Sie ist abgeschlossen.", + "Ich habe schon eins.", + "", + "Keine Reaktion !", + "Nein, da steht es gut !", + // 35 + "Es ist eine Tuer", + "Eine Schublade vom Tisch", + "Ein verdaechtiger Schrank", + "Hallo Schrank. Alles klar?", + "", + // 40 + "", + "Ein uralter Kerzenstaender", + "Der stammt wohl noch aus der Zeit als meine Ururururoma in den Kindergarten ging ", + "Nein, eine Reliquie aus vergangenen Zeiten", + "Es ist ein huebsches Altarbild", + // 45 + "", + "Hi,hi,hi", + "", + "Nein.", + "", + // 50 + "Ha,ha,ha! klasse!", + "", + "", + "", + "Ich sehe nichts besonderes", + // 55 + "Freddy, die Topfblume", + "Eine Spitze aus dem Jaegerzaun", + "Ej! Hier unten liegt eine Streichholzschachtel!", + "Guck mal! Eine Packung Tempos! Und eins sogar ungebraucht!", + "Sonst ist nichts mehr im Eimer", + // 60 + "Ein Blinder der nichts sieht", + "", + "", + "", + "", + // 65 + "Ein Wahnsinnsbatzen Geld.", + "", + "", + "", + "", + // 70 + "", + "", + "", + "", + "", + // 75 + "", + "", + "", + "", + "", + // 80 + "", + "", + "", + "", + "", + // 85 + "", + "", + "", + "", + "", + // 90 + "", + "", + "", + "", + "", + // 95 + "", + "", + "", + "", + "", + // 100 + "SIEHT NICHT UNGEWoeHNLICH AUS", + "SIEHT NICHT AUSSERGEWoeHNLICH AUS", + "EJ DU, WAS IST LOS?", + "HALLO", + "NICHTS NEUES?", + // 105 + "WIE GEHTS DER FAMILIE?", + "WAS DU FueR SACHEN HAST !", + "ABER WIE SOLLTE ICH DAS AUFHEBEN ?", + "MEINE RELIGION VERBIETET MIR DAS", + "BESSER NICHT", + // 110 + "KLAR MANN!", + "DU SPINNST WOHL !", + "UNMoeGLICH", + "GEHT NICHT AUF !", + "ALLEINE SCHAFFE ICH DAS NICHT", + // 115 + "WENN ICH WOLLTE, KoeNNTE ICH, ABER ICH HABE KEINE LUST", + "ICH WueSSTE NICHT WARUM", + "EIN SCHaeDEL, DER GUT DRAUF IST", + "UND? SCHON WAS VOR HEUTE ABEND, SCHaeDEL?", + "NEIN, ER MUSS AN EINEM KueHLEN ORT GELAGERT WERDEN, FERN DER ZERSToeRERISCHEN KRAFT DER ATMOSPHaeRE", + // 120 + "KNOCHENTROCKEN, WIE MEIN CHEF!", + "EIN SEHR SPITZER PFLOCK", + "GUTER SPITZER PFLOHOCK, HOLZ SO EDEL, TRANSSYLVAAANISCH!!!", + "OH VERDAMMT, ICH MUSS MIR DIE NaeGEL SCHNEIDEN !", + "DA DRINNEN LIEGT B.J., UND GUCK MAL WIE DIE TANTE AUSSIEHT !", + // 125 + "NIET UND NAGELFEST", + " \"NIET & NAGEL GmbH & Co. KG\"", + "DAS TYPISCHE SKELETT IM TYPISCHEN VERLIESS EINES TYPISCHEN SPIELS", + "WIRD NORMALERWEISE ZUR STROMVERSORGUNG ALLER EINGESToePSELTEN GERaeTE VERWENDET", + "TOTALES KUNSTHANDWERK, WEIL SIE DANK DEN JAPANERN KLEINE MINIATUREN SIND", + // 130 + "ES GIBT NUR EINS, WAS GENAUSO HaeSSLICH IST", + "HAU AB. ICH SAG IHM GAR NICHTS. MAL GUCKEN OB ER AUSFLIPPT", + "SCHEINT ZIEMLICH VERNueNFTIG ZU SEIN", + "EIN FOTO VON PLATON WIE ER SEINEN VERLORENEN DIALOG SCHREIBT", + "SEH ICH SO AUS ALS OB ICH MIT POSTERN REDE ? !", + // 135 + "EIN HueBSCHER SCHREIBTISCH", + "EIN VON DER UNIVERSITaeT ZU OXFORD AUSGESTELLTES VAMPIR-JaeGER-JaeGER-DIPLOM", + "VOLLMOND IN FINSTERSTER NACHT", + "DIESE SCHRAUBEN SCHEINEN ZIEMLICH FEST ZU SITZEN", + "GUCK JETZT NICHT HIN, ABER ICH GLAUBE HIER GIBT ES EINE VERSTECKTE KAMERA", + // 140 + "EIN ULTRAMODERNER PFLOCK-DETEKTOR", + "NEIN, DAS LABOR IST IM ZWEITEN STOCK", + "EIN HueBSCHES NACHTTISCHCHEN ", + "EIN BATZEN GELD DER BEI EINEM WIRKLICH GUTEN ABENTEUER NICHT FEHLEN DARF", + "WENN ICH REICH WaeRE, SCHUBIDUBISCHUBIDUBUDU ", + // 145 + "KOMISCHE BLaeTTER, DIE WERDEN SIE WOHL AUS SueDAMERIKA ODER SO MITGEBRACHT HABEN .", + "ICH GLAUBE NICHT, DASS SIE ANTWORTEN WERDEN", + "EIN SCHoeNES HOLZKRUZIFIX. DEM HELDEN SIND DIE AUSMASSE SEI-NER SCHoeNHEIT NICHT GANZ KLAR.", + "ICH BETE NUR VOR DEM ZU-BETT-GEHEN", + "EJ, ICH GLAUBE, DIE SPITZE HIER IST EIN BISSCHEN LOSE !", + // 150 + "UND NACHHER BESCHWERST DU DICH, ICH HaeTTE DIR KEINEN WINK GEGEBEN !", + "EINE STINKNORMALE ZAUNSPITZE", + "NIEDLICH, OBWOHL SIE EIN BISSCHEN VERDRECKT SIND", + "SIE WERDEN MICH NICHT HoeREN, HI,HI,HI, SUPERGUT !", + "DIE SCHoeNE SCHLAFENDE AUS DEM WALDE VON TSCHAIKOWSKY ODER TSCHESLOFSKY ODER WIE DER HEISST.", + // 155 + "SEHR APPETITLICH", + "NEIN, SEHE ICH SO AUS, ALS WueRDE ICH BENUTZTE KAUGUMMIS KAUEN ?", + "EINE NIEDLICHE SICHEL. ICH WueSSTE NUR GERNE WO DER HAMMER IST.", + "DER GESUNDHEITSMINISTER WARNT : RAUCHEN GEFaeHRDET IHRE GESUNDHEIT", + "EINE GANZ NORMALE KERZE, MIT WACHS UND ALLEM DRUM UND DRAN", + // 160 + "MAN MUSS ECHT MAL GESEHEN HABEN WIE DIESE 2 GLaeNZENDEN MueNZEN GLaeNZEN", + "MAN MUSS ECHT GESEHEN HABEN WIE DIESE GLaeNZENDE MueNZE GLaeNZT !", + "DAMIT WERDE ICH GEGEN VAMPIRBISSE IMMUN SEIN.", + "NEIN,ES IST NOCH NICHT SO WEIT", + "EIN TAUSENDER UND EIN BISSCHEN KLEINGELD", + // 165 + "DA STEHT\"DEN KLAVIERSPIELER BITTE NICHT MIT LEBENSMITTELN BEWERFEN", + "CURRYWURST 3.80. POMMES FRITES 2.30., FRIKADELLEN 1.50", + "DIE BESTEN HAMBURGER DIESSEITS DER DONAU FueR NUR 3.80 DM", + "EIN SCHoeNER TOTENKOPF MIT EINEM ZIEMLICH DURCHDRINGENDEN BLICK, HI, HI, SUPERGUT !", + "HALLO TOTENKOPF, DU ERINNERST MICH AN HAMLETS ONKEL !", + // 170 + "ICH HABE DIE ANGEWOHNHEIT, NICHTS ANZUFASSEN, WAS MAL LEBENDIG GEWESEN IST", + "EIN PAPIERKORB", + "SIE WETTEN, WIE DAS SPIEL HEUTE ABEND AUSGEHT", + "WAS SICH WOHL DAHINTER VERBERGEN MAG", + "EJ, DIESER VORHANG BEWEGT SICH NICHT !", + // 175 + "GANZ SCHoeN GRUSELIG, DAS SCHLOSS DA, WAS ?", + "ICH SCHAFFS NICHT, ER IST ZU WEIT WEG, UM MICH ZU HoeREN", + "EIN TYPISCH TRANSSYLVANISCHER WALD, MIT BaeUMEN UND SO", + "RED KEINEN BLoeDSINN, ES IST DOCH STOCKDUNKEL!", + "KONDITOREI MueLLER. GEBaeCK UND KAUGUMMIS", + // 180 + "EINE SEHR SCHoeNE TueR", + "GESCHLOSSEN", + "EINE TOTAL GESCHLOSSENE TONNE", + "", + "WAS FueR SueSSE VIECHER !", + // 185 + "PSSS,PSSS,PSSS,MIETZCHEN...", + "KEINE REAKTION", + "DER MOND IST EIN SATELLIT DER DIE ERDE IN EINER UMLAUFGESCHWINDIGKEIT VON 28 TAGEN UMKREIST.", + "HALLO MOND DU KREISRUNDES MONDGESICHT", + "TOTAL MIT BRETTERN ZUGENAGELT", + // 190 + "NICHTS ZU MACHEN. HIER KOMMT NOCH NICHT MAL ARNOLD S. MIT DER KREISSaeGE DURCH", + "SCHEINT SO, ALS HaeTTE DIE TANNE DA EINEN ueBERDIMENSIONALEN SCHATTEN !", + "HEHOO, WIRT !", + "SIND NOCH ZIMMER FREI ?", + "KoeNNEN SIE MIR SAGEN WO ICH EINEN GEWISSEN GRAF DRASCULA FINDE ?", + // 195 + "JA, WAS GIBTS ?", + "UND WIESO ?", + "WW...WIRKLICH ?", + "GUTE FRAGE, ICH WERDE IHNEN MAL MEINE STORY ERZaeHLEN, ALSO...", + "NUR FueNF MINUTEN !", + // 200 + "ICH HEISSE HEINZ HACKER UND BIN VERTRETER EINER NORDDEUTSCHEN IMMOBILIENFIRMA", + "SO WIES AUSSIEHT WILL GRAF DRASCULA EINIGE HEKTAR LAND AUF HELGOLAND KAUFEN UND ICH BIN HIER UM ueBER DIE PREISE ZU VERHANDELN", + "MMMMH, ICH GLAUBE DASS ICH MORGEN FRueH MIT MEINER MAMI ZURueCKKOMME", + "WAS FueR EINE NACHT, NICHT WAHR ?", + "NICHTS, SCHON GUT", + // 205 + "HEEHOOO, KLAVIERSPIELER", + "WAS FueR EINE NACHT", + "UND ES IST AUCH GAR NICHT SO KALT", + "NUN GUT, ICH LASS DICH JETZT MAL IN RUHE WEITERSPIELEN", + "GENAU", + // 210 + "HALLO CHEF, ALLES KLAR ?", + "UND DIE FAMILIE ?", + "HIER IST MaeCHTIG WAS LOS, WAS ?", + "ICH HALTE BESSER MEINEN MUND", + "ZU HAUSE IST ES IMMER NOCH AM SCHoeNSTEN...ZU HAUSE IST ES IMMER....Hae ? ABER SIE SIND DOCH NICHT TANTA ENMA. WO ICH DOCH GAR KEINE TANTE EMMA HABE !", + // 215 + "JA, MEINER AUCH. SIE KoeNNEN MICH NENNEN WIE SIE WOLLEN, ICH HoeRE SELBST AUF HEINZCHEN WIE AUF KOMMANDO.", + "JA, ICH HAB GANZ SCHoeNE BEULEN, WAS ? ueBRIGENS, WO BIN ICH ?", + "JA", + "VERDAMMT.....", + "JA, KLAR, SELBSTVERSTaeNDLICH !", + // 220 + "DANN ALSO VIELEN DANk FueR DEINE HILFE. ICH WERDE DICH NICHT WEITER BELaeSTIGEN. WENN DU MIR BITTE NOCH SAGEN WueRDEST, WO DIE TueR IST.... ", + "WEIL DIE BEULE WOHL MEIN GEHIRN ANGEGRIFFEN HAT UND ICH EINFACH ueBERHAUPT NICHTS SEHE", + "PAH, MACHT NICHTS. ICH HABE IMMER ERSATZ DABEI", + "WOW, WAS FueR EIN SCHARFES WEIB ! OHNE BRILLE HABE ICH DAS GAR NICHT BEMERKT !", + "EJ, DU....", + // 225 + "UND WAS IST DAAAAAS ? !", + "MACH DIR KEINE SORGEN, BJ, MEINE GELIEBTE !ICH WERDE DICH AUS SEINEN KLAUEN BEFREIEN", + "ACH KOMM, ER HAT MICH AUF DIE PALME GEBRACHT", + "UUAAA, EIN WERWOLF ! KREPIER, DU MONSTER !", + "JA, DAS.... ", + // 230 + "JA, DAS.... ICH GLAUB, ICH GEH DANN MAL WEITER, MIT VERLAUB...", + "WAS?", + "WENN ICHS MIR RECHT ueBERLEGE, UM EHRLICH ZU SEIN, ICH GLAUBE NEIN ", + "SAG MIR OH GEBILDETER PHILOSOPH, GIBT ES IRGENDEINEN KAUSALZUSAMMENHANG ZWISCHEN DER LICHTGESCHWINDIGKEIT und SCHINKENSPECK", + "OKAY,OKAY,VERGISS ES. ICH WEISS JEDENFALLS NICHT, WARUM ICH DAS GESAGT HABE", + // 235 + "WAS PHILOSOPHIERST DU HIER HERUM, WO DU DOCH MENSCHEN FRESSEN MueSSTEST!", + "HaeH", + "EJ, KANNST DU DAS MIT DEN PRaeHISTORISCHEN NEIGUNGEN NOCHMAL ERKLaeREN ?", + "JA, MANN. DER KRAM MIT DEM DU MIR EBEN GEKOMMEN BIST. ICH HAB DAS NaeMLICH NICHT GANZ KAPIERT....", + "ICH HALTE BESSER MEINEN MUND, WEIL SOBALD ER BLUT RIECHT...", + // 240 + "JA, BITTE ?", + "JA, WAS GIBTS ?", + "ACH, WO SIES GERADE ERWaeHNEN,....", + "", + "ueBRIGENS, WAS WueRDE EIGENTLICH PASSIEREN, WENN DAS REZEPT ZUFaeLLIG IN DIE HaeNDE EINES VAMPIRS GERATEN WueRDE...", + // 245 + "NA WAS SOLLS. HoeR MAL, KOMMT DIR DAS NICHT AUCH WIE EIN DaeMLICHER KLEINER TRICK VOR, UM DAS SPIEL SCHNELL ZU BEENDEN ? NAJA, VIELLEICHT AUCH NICHT", + "LEER !", + "WEIL DU MIR B.J., MEINE GELIEBTE, GERAUBT HAST. OHNE SIE HAT MEIN LEBEN KEINEN SINN.", + "SEIN GEHIRN ?", + "OCH, NUR SO! ICH GLAUBE DASS ICH GENUG VON DEM KLEINEN MONSTERCHEN HABE", + // 250 + "SueSSE KLEINE JUNGFRAU, ICH BLEIB SO WIE ICH BIN !", + "DAMIT KOMMST DU NICHT DURCH.. GLEICH KOMMT POPEYE UND HOLT MICH HIER RAUS !", + "WAS FueR EIN SCHEISS-SPIEL, BEI DEM DEM DER HELD STERBEN MUSS", + "HALT ! WAS IST MIT MEINEM LETZTEN WUNSCH ?", + "HAR,HAR ! JETZT BIN ICH IMMUN GEGEN DEIN VERFLUCHTES UNGEHEUER. DAS HIER IST EINE ANTI-VAMPIR-ZIGARETTE,DIE MIR VON BRAUN GEGEBEN HAT.", + // 255 + "JA, KLAR. ABER ICH WERDE DIR BESTIMMT NICHT DAS REZEPT VERRATEN", + "MIT FOLTER KOMM ICH GUT KLAR, ICH DENK MIR SOGAR WELCHE AUS", + "NEIN, BITTE NICHT ! ICH SAG ALLES, ABER TUN SIE MIR DAS NICHT AN !", + "O.K. ICH HAB DIR ALLES ERZaeHLT. JETZT HOL B.J. UND MICH ENDLICH HIER RAUS UND LASS UNS IN RUHE", + "B.J. !WAS MACHST DU HIER ?WO IST DRASCULA ?", + // 260 + "WAS FueR EIN MIESER TYP ! NUR WEIL ER BLAUES BLUT HAT, MueSSEN IHM NOCH LANGE NICHT ALLE JUNGFRAUEN DIESER ERDE ZU FueSSEN LIEGEN", + "NIEDER MIT DEM BONZEN-ADEL !", + "SOLIDARITaeT MIT ALLEN ARMEN DIESER WELT... !", + "UND WIES AUSSIEHT HAT ER DICH NACH ALLEN REGELN DER KUNST ANGEKETTET", + "O.K. DU HAST NICHT ZUFaeLLIG EINE HAARSPANGE ?", + // 265 + "NANANA. STELL DICH NICHT SO AN . MIR FaeLLT SCHON WAS EIN.", + "HE, WIRT", + "WER GEWINNT ?", + "WER ?", + "SIEHST DU DENN NICHT, DASS HIER DRASCULA IST ?", + // 270 + "NA, DANN LASS IHN UNS ALLE MACHEN, ODER ?", + "GIB MIR EINEN GIN-TONIC", + "SCHON GUT. ICH HAB VERGESSEN, WAS ICH DIR SAGEN WOLLTE", + "GIB\247MIR\247SOFORT\247EINEN\247GIN\247TONIC\247ODER\247ICH\247SPIEL\247KLAVIER", + "WIELANGE DAUERT DAS SPIEL NOCH ?", + // 275 + "GUTE NACHT", + "UND WIE KOMMST DU VORAN, IGOR ? SCHLEPPEND ? HI,HI,HI, KLASSE !", + "WAS SOLL DAS SEIN, WAS DU DA MACHST?", + "NEIN", + "DANN ZIEH DIE BRILLE AUF", + // 280 + "WAS SOLL DAS MIT DER ueBERNATueRLICHEN ORGIE ?", + "O.K. ES REICHT. ICH KANN ES MIR SCHON VORSTELLEN", + "KoeNNTEST DU MIR NICHT ZUFaeLLIG SAGEN, WO DRASCULA IST ?", + "ACH KOMM, BITTE, BITTE!", + "WARUM NICHT ?", + // 285 + "ACH :NACHTS SCHLaeFT ER ?", + "NA, HOFFENTLICH KLAPPT DAS MIT DER EINKOMMENSERKLaeRUNG", + "ICH MUSS NaeMLICH MIT IHM REDEN", + "HEYHOO, GERIPPE !", + "VERDAMMT ! EIN SPRECHENDER TOTER !", + // 290 + "ERaeHL MAL WIESO HAST DU HIER ANGEHALTEN ?", + "UND WOZU SOLLTE DRASCULA EIN MONSTER SCHAFFEN WOLLEN ?", + "WIE HEISST DU, LIEBES GERIPPE ?", + "EJ, SOLL ICH DIR NICHT VIELLEICHT WAS ZU ESSEN BRINGEN ?", + "DU HAST DOCH BESTIMMT EINEN LEEREN MAGEN, HI,HI,HI !", + // 295 + "ICH HABE GERADE EINFACH KEINEN BOCK, ZU REDEN", + "FI........(BIEP) DICH DOCH IN DEIN BEFI.......(BIEP) KNIE, DU ALTER WI......(BIEP) !", + "ICH HABE SIE WIRKLICH GELIEBT, NAJA, GUT, SIe WAR WIRKLICH NICHT DIE HELLSTE VON OSRAM, ABER NOBODY IS PERFECT, STIMMTS ?", + "HEY SIE HATTE EINE WAHNSINNSFIGUR, UND WAS WILLST DU MEHR", + "NICHTS WIRD MEHR WIE VORHER SEIN. ICH WERDE INS KLOSTER GEHEN UND ELENDIGLICH DAHINSIECHEN.", + // 300 + "HIER KANN MICH NICHTS UND NIEMAND MEHR RAUSHOLEN, WEIL...", + "VON WEM ? VON WEM ?", + "ICH MoeCHTE PIRAT WERDEN !", + "ICH MoeCHTE PROGRAMMIERER WERDEN !", + "ERZaeHL MIR ETWAS ueBER SIEGFRIED UND DIE NIBELUNGEN", + // 305 + "ICH HAB EUCH NIE GESEHEN UND SPIEL JETZT EINFACH WEITER", + "WER HAT SICH DENN DIESEN SCHWACHSINN EINFALLEN LASSEN ?", + "EINE HANDTASCHE, WIE SIE MEINE OMI HAT", + "OH MANN, WIE GUT ICH AUSSEHE ! ", + "ICH KoeNNTE MICH GLATT IN MICH VERLIEBEN !", + // 310 + "UND WIE SOLL ICH MICH ABSCHLIESSEN ?", + "ICH WERDE MICH WOHL ERSTMAL AUFSCHLIESSEN MueSSEN, WAS ?", + "HIER STEH ICH GUT", + "HAB MICH SCHON", + "HALLO ICH", + // 315 + "BEI PASSENDER GELEGENHEIT WERDE ICH SIE MIR MAL REINTUN", + "ICH SEHE NICHTS BESONDERES", + "GUT SO", + "UND WIESOOO ?", + "ICH KANN NICHT", + // 320 + "HALLO DU DA", + "DIE GRUFT VON ONKEL DESIDERIUS", + "HAAALLO, ONKEL DESIDEERIUUS !", + "NEIN, ICH WILL MICH NICHT SCHON WIEDER SCHNEIDEN", + "aeHEM,MMM... !", + // 325 + "MMMM, LECKER,UaeaeHH !", + "JA, HUST,HUST !", + "HEY, GUCK MAL, HIER KLEBT EIN KAUGUMMI", + "DAS SUPERHANDILY DAS ICH ZU WEIHNACHTEN BEKOMMEN HABE", + "GANZ SCHoeN HOCH", + // 330 + "TRITT AUF DEN BALKON, JULIA !", + "DU BIST DER STERN AN MEINEM FIRMAMENT !", + "EJ, TueR, WAS ISS LOSS ?", + "HEYHOO, TRANSSYLVANISCHES ZIGARRETTENAUTOMaeTCHEN !", + "EIN ZIGARRETTENSPENDERMASCHINCHEN", + // 335 + "ICH HAB DA NOCHNE MueNZE DRIN", + "NEIN, ICH RAUCHE UND TRINKE NICHT MEHR", + "VON JETZT AN WERDE ICH MICH NUR NOCH DEN FRAUEN WIDMEN", + "BETRUG ! ES IST GAR NICHTS RAUSGEKOMMEN !", + "ENDLICH !", + // 340 + "EINE TRUHE, WEITER NICHTS", + "HALLO TRUHE, DU HEISST WIE MEINE TANTE TRUDE", + "ICH HABE DIE TASCHE VON B.J. GEFUNDEN", + "MEIN GOTT, ICH SEH MICH NICHT IM SPIEGEL, ICH BIN EIN VAMPIR !", + "....ACH, NEE. ES IST NUR EIN GEMaeLDE", + // 345 + "SPIEGLEIN, SPIEGLEIN AN DER WAND, WER IST DER SCHoeNSTE Im GANZEN LAND ?", + "ER MACHT MIR NICHT AUF", + "GUT. ICH HABE DIE OHRENSToePSEL DRIN", + "EIN VON DER UNIVERSITaeT ZU CAMBRIDGE AUSGESTELLTES VAMPIR-JaeGER DIPLOM.", + "NEIN, MIR FEHLEN NOCH EINIGE ZUTATEN, ES LOHNT SICH NICHT, IHN ZU WECKEN !", + // 350 + "ICH HABE NaeMLICH KEIN GELD", + "EINE NORDDEUTSCHE LAMPE", + "WIRT! HELFEN SIE MIR !", + "DA STAND PLoeTZLICH EIN VAMPIR UND HAT MEINE FREUNDIN MITGENOMMEN.", + "ABER WOLLEN SIE MIR DENN NICHT HELFEN ?", + // 355 + "TOT? WAS WOLLEN SIE DAMIT SAGEN ?", + "aeHEM !", + "EIN VAMPIR HAT DAS MaeDEL VON 506 ENTFueHRT !", + "DU MUSST MIR HELFEN !", + "KANNST DU KEIN BEERDIGUNGSLIED SPIELEN ?", + // 360 + "WIE HaeLST DU DAS BLOSS AUS : JEDEN TAG DIE GLEICHEN LIEDER", + "AHA, UND WIE HoeRST DU MICH DANN ?", + "GIB MIR DIE OHRENSToePSEL", + "ACH KOMM, ICH GEB SIE DIR AUCH SOFORT WIEDER", + "ACH KOOOOMMM !", + // 365 + "AUF WIEDERSEHEN. ICH MUSS EINEN VAMPIR ToeTEN", + "", + "REDEST DU AUF TRANSSYLVANISCH ODER WAS ?", + "WER IST ONKEL DESIDERIUS ?", + "WAS SOLL LOS SEIN MIT DIESEM GRAF DRASCULA ?", + // 370 + "WER IST DIESER VON BRAUN ?", + "UND WARUM MACHT ER ES NICHT ?", + " UND WO KANN ICH VON BRAUN FINDEN ?", + "ALSO DANKE UND AUF WIEDERSEHEN, SCHLAF SCHoeN", + "WIR SOLLTeN BESSER VORHER KLINGELN", + // 375 + "SIND SIE PROFESSOR VON BRAUN ?", + "UND SIE KoeNNTEN MIR NICHT VERRATEN, WO..... ?", + "ICH NEHM IHM NICHT AB, DASS ER HELGE SCHNEIDER IST", + "PROFESSOR!", + "HELFEN SIE MIR !ES GEHT UM DAS LEBEN MEINER GELIEBTEN !", + // 380 + "SCHON GUT, ICH BRAUCHE IHRE HILFE NICHT", + "OK. ICH GEHE !", + "KEINE ANGST. GEMEINSAM BESIEGEN WIR DRASCULA", + "UND WARUM HELFEN SIE MIR DANN NICHT ?", + "ICH HABE SIE", + // 385 + "ABER ICH HABE SIE DOCH !", + "EINVERSTANDEN", + "...aeHM,...JA", + "ICH GEHE DIREKT NOCHMAL INS AQUARIUM", + "ICH BIN SO WEIT, MICH IHREM TEST ZU STELLEN", + // 390 + "SCHON GUT, ALTERCHEN. ZAHLTAG !", + "SCHON GUT. ICH WOLLTE SOWIESO GERADE GEHEN", + "TSCHULDIGE", + "WIE FINDEST DU DIESES BUCH? KLAVIERSTueCKE VON TSCHAIKOWSKY", + "WIE BRINGT MAN EINEN VAMPIR UM ?", + // 395 + "HAT MAN DIR NICHT GESAGT WIE MAN SICH BETTET SO LIEGT MAN ?", + "GENAU DAS SAGT MEINE MUTTER IMMER ZU MIR", + "WARUM KONNTE DICH DRASCULA NICHT ERLEDIGEN ?", + "UND WAS DANN ?", + "SUPER ! DA HABEN SIE EIN IMMUNITaeTSMISCH.... !", + // 400 + "ALSO ?", + "SEHR GUT", + "KoeNNEN SIE NOCHMAL WIEDERHOLEN WAS ICH FueR DIESE MISCHUNG BRAUCHE ?", + "DANN SATTEL ICH MAL DIE HueHNER UND BESORG ES", + "ENTSCHULDIGUNG, WO IST DER KLAVIERSPIELER ?", + // 405 + "ICH\247HAB\247SCHON\247ALLE\247ZUTATEN\247FueR\247DIE\247MISCHUNG", + "EINE FRAGE : WAS SOLL DAS HEISSEN : REIPERK ALUCSARD?", + "SAGEN SIE SCHON...", + "UND WO SOLL DIESE GROTTE SEIN ?", + "WAS IST ? GABS BEI EUCH KEINE HEXENPROZESSE ?", + // 410 + "...ABER WENN ICH NOCH MEHR VAMPIREN BEGEGNE ?", + "EIN VAMPIR, DER MICH NICHT DURCHLaeSST", + "ER SIEHT WIE AUS WIE JODA, NUR VIEL GRoeSSER", + "EJ, JODA. WENN DU MICH DURCHLaeSST, GEB ICH DIR ne mark", + "NA GUT, DIR KANN MAL WOHL NICHTS ERZaeHLEN", + // 415 + "HALLO, VAMPIR, WAS FueR EINE NACHT, WAS ?", + "HAT MAN DIR SCHON MAL GESAGT, DASS DU AUSSIEHST WIE JODA ?", + "BIST DU EIN VAMPIR ODER EIN oeLGEMaeLDE ?", + "ICH HALT BESSER MEINEN MUND, SONST REGST DU DICH NOCH AUF", + "ABGESCHLOSSEN", + // 420 + "DIE ELSTER KoeNNTE MIR EIN AUGE RAUSREISSEN, WENN ICHS VERSUCHE !", + "ZU !MEIN GOTT, WIE UNHEIMLICH !", + "DIE SCHARNIERE SIND ZUGEROSTET", + "HIER IST NUR EIN PaeCKCHEN MEHL", + "DAS HAT DEN ROST ENTFERNT", + // 425 + "ICH HABE EINEN PFLOCK AUS FICHTENHOLZ GEFUNDEN", + "ICH NEHM DAS HIER, DAS IST SCHoeN DICK !", + "NA, ICH GLAUBE ICH KANN MICH JETZT MAL AUS DIESER DaeMLICHEN VERKLEIDUNG SCHaeLEN", + "EINGaeNGE ZU DEN SEITENFLueGELN WEGEN BAUARBEITEN GESPERRT. BENUTZEN SIE BITTE DEN HAUPTEINGANG", + "...ER IST BLASS, HAT KOMISCHE ZaeHNE, TRaeGT EIN TOUPET UND EINEN UMHANG...DAS MUSS DRASCULA SEIN !", + // 430 + " ES IST B.J. ! B.J. ALLES O.K ?", + "ICH WEISS SCHON DASS SIE DUMM IST, ABER ICH BIN SO EINSAM", + "DU HAST BESTIMMT KEINEN SCHLueSSEL, STIMMTS ?", + "ICH WETTE, DU HAST KEINEN DIETRICH", + "GIB MIR DIE HAARSPANGE. ICH MACHS WIE MCGYVER", + // 435 + "BEWEG DICH NICHT, ICH BIN SOFORT ZURueCK", + "VERDAMMT! ER IST MIR ABGEBROCHEN !", + "HEYJEYJEY !UND ICH HAB MICH AUCH RASIERT, ALTER !", + "JA, SCHATZ ?", + "ES REICHT NICHT", + // 440 + "DER KLAVIERSPIELER IST NICHT DA", + "EIN TRANSSYLVANISCHER GIN-TONIC", + "ICH HABE IMMER NOCH KEIN ZIMMER", + "ES SCHEINT DASS ER IN DER BADEWANNE HaeNGENGEBLIEBEN IST UND DANN EINE KNEIPE AUFGEMACHT HAT", + "ER IST VOLL WIE EIN RUSSE", + // 445 + "DIESES HAAR.... TJA,ES ERINNERT MICH AN JEMANDEN", + "ES IST EIN KNoeCHRIGES GERIPPE", + "GUCK MAL ! BRAD PITT!", + "ER SCHLaeFT. ES WaeRE WIRKLICH SCHADE, IHN ZU WECKEN", + "ER IST HaeSSLICHER ALS DIDI HALLERVORDEN", + // 450 + "EIN SARG AUS FICHTENHOLZ", + "ER WIRD MICH IN LECKERE KLEINE SCHEIBCHEN SCHNEIDEN", + "ICH STEH NICHT SO AUF PENDEL. ICH FIND OHRFEIGEN BESSER", + "ICH KANN NICHT. ICH HAB HANDSCHELLEN AN", + "DAS SIEHT DOCH JEDER, DASS DAS EINE GEHEIMTueR IST", + // 455 + "SIE IGNORIEREN MICH", + "ACH KOMM !", + "LAUT DREHBUCH BEWEGE ich mich, ABER das Spiel war so teuer, dass nichts mehr FueR EIN FITNESS-STUDIO ueBRIG war, also habe ich auch keinen strammen arsch.", + "SCHEINT SO, ALS OB ER EIN BISSCHEN LOSE AN DER WAND HaeNGT", + "ICH GLAUBE KAUM, DASS SIE MIR NueTZEN WIRD. SIE IST VIEL ZU FEUCHT, UM SIE ANZUZueNDEN", + // 460 + "ZUM WESTFLueGEL ?ICH BIN DOCH NICHT BLoeD !WER WEISS WAS MICH DA ERWARTET !", + "MIT HueBSCHEN TRANSSYLVANISCHEN MOTIVEN", + "", + "WIE SCHADE, DASS DAS DA KEIN LECKERER LAMMBRATEN DRIN IST.", + "ALS ICH BEIM LETZTEN MAL IN EINEN OFEN GEGUCKT HABE, IST DAS HAUS IN DIE LUFT GEFLOGEN", + // 465 + "DAS IST DAS WAPPEN DER TRANSSYLVANISCHEN FUSSBALLMANNSCHAFT", + "UND WOZU? SOLL ICH MIR DAS ANS KNIE BINDEN ?", + "DIESE SORTE SCHUBLADE LaeSST SICH NICHT oeFFNEN", + "ICH MoeCHTE ECHT NICHT WISSEN, WAS ES DA DRIN ZU ESSEN GIBT!", + "DAS WIRKT ZIEMLICH IMPRESSIONISTISCH AUF MICH", + // 470 + "DIE NACHT VERSCHLUCKT ALLES... WIE UNHEIMLICH, WAS?", + "SIE KLEMMT", + "DER KoeNIG HAST DU DIR DAS NICHT DENKEN KoeNNEN?", + "NEIN, ICH HAB SCHON EINEN ZU HAUSE, DEN ICH FueTTERE UND SO", + "EIN REGAL MIT BueCHERN UND ANDEREN SACHEN", + // 475 + "UND WEN SOLL ICH UM DIESE UHRZEIT NOCH ANRUFEN?", + "\"EINKOMMENSERKLaeRUNG LEICHT GEMACHT\" WIE INTERESSANT!", + "ICH HAB SCHON EINS ZU HAUSE.ICH GLAUBE DAS IST WELTWEIT EIN BESTSELLER", + "EIN TOTAL NORMALER SCHLueSSEL", + "ICH GLAUBE, DER GEHoeRT HIER NICHT HIN", + // 480 + "HEY, DIE FRITTEN SEHEN AUS WIE ECKZaeHNE! ICH BIN HIN UND WEG", + "das ist wohl echt nicht DER moment, RUMZUNASCHEN, WENN MEINE FREUNDIN IN DEN KLAUEN DER fiesesten ausgeburt der Welt ist.", + "WAS FueR EINE RIESENGAUDI DAS MACHT, DAMIT VAMPIRE FERTIGZUMACHEN!", + "MAL GUCKEN, OB NOCH EINER AUFTAUCHT", + "NEIN, ES MUSS MIT NOCH SO EINEM DRECKIGEN, STINKENDEN UND NERVIGEN VAMPIR WIE VORHIN SEIN", + // 485 + "DAS IST DIE ORIGINALPERueCKE VON ELIVS ALS ER SCHON EINE GLATZE HATTE", + "MEHL, ABER ICH KANN JETZT KEINE MARKEN NENNEN", + "VIELLEICHT EIN ANDERES MAL, OK?", + "EINE WUNDERSCHoeNE AXT. ZU SCHADE, DASS GERADE KEIN VAMPIRKOPF IN DER NaeHE IST", + "NEIN, IM GRUNDE BIN ICH EIN NETTER MENSCH", + // 490 + "DAS IST DAS DEO VON MAGGIE THATCHER, HIHIHI!", + "EIN ZIEMLICH HueBSCHER UMHANG", + "", + "WIE JEDER BELIEBIGE AST EINES BELIEBIGEN BAUMES AN JEDEM BELIEBIGEN ORT IN DER WELT, NICHTS BESONDERES ALSO", + "\"UNGLAUBLICH\" EIN SEIL IN EINEM VIDEOSPIEL!", + // 495 + "WOZU DAS WOHL NOCH GUT SEIN WIRD...", + "EIN SEIL AN EINEM AST ODER EIN AST AN EINEM SEIL, JE NACHDEM WIE MAN DAS SO BETRACHTET", + "ES SCHEINT, DAS DIESE ELSTER WAS ueBLES IM SCHILDE FueHRT", + "ZISCH AB, ICH SAG IHR NICHTS, MAL SEHEN OB SIE AUSFLIPPT", + "SIEHT SO AUS ALS WaeRE SIE TOT, ABER STIMMT NICHT,NE?", + // 500 + "FueR DIESES SPIEL WURDEN KEINE TIERE MISSHANDELT ODER GEToeTET", +}, +{ + // 0 + "", + "C'EST LA DEUXI\212ME PORTE PLUS GRANDE QUE J'AI VUE DANS MA VIE.", + "ENFIN, PAS AUTANT QUE \207A.", + "ELLE EST BOUCH\202E AVEC DES GROSSES PLANCHES. L'\202GLISE EST PEUT-\210TRE ABANDONN\202E DEPUIS QUELQUES ANN\202ES.", + "MAIS JE NE L'AI PAS OUVERTE.", + // 5 + "QU'EST-CE QUE JE FAIS? JE L'ARRACHE?", + "BONJOUR, PORTE. JE VAIS T'ENCADRER.", + "C'EST TROP POUR MOI.", + "UNE FEN\210TRE BOUCH\202E AUX GROSSES PLANCHES.", + "JE N'ARRIVE PAS.", + // 10 + "\200A Y EST.", + "ET POURQUOI?", + "SALUT, FEN\210TRE! AS-TU QUELQUE CHOSE \205 FAIRE CE SOIR?", + "PAS SANS LE PERMIS DE TRAVAUX PUBLIQUES.", + "H\202! CETTE FEN\210TRE A SEULEMENT UNE GROSSE PLANCHE...", + // 15 + "OH\202! OH\202!-FEN\210TRE!", + "BONJOUR, TOI.", + "", + "JE N'ARRIVE PAS.", + "C'EST BIEN O\227 ELLE EST.", + // 20 + "", + "C'EST UNE TOMBE EN FORME DE CROIX.", + "NON, MERCI.", + "BONJOUR, LE D\202FUNT: VEUX-TU DES VERMISSEAUX?", + "MAIS OUI. COMME EN POLTERGUEIST.", + // 25 + "", + "", + "JE REVIENS EN QUINZE MINUTES.", + "D\202FENSE D'AFFICHER.", + "", + // 30 + "C'EST FERM\202 \205 CL\202.", + "J'EN AI D\202J\205 UN.", + "", + "IL NE R\202POND PAS.", + "MAIS NON, C'EST BIEN GAR\202.", + // 35 + "C'EST UNE PORTE.", + "UN TIROIR DE LA TABLE.", + "UNE ARMOIRE SUSPECTE.", + "BONJOUR, L'ARMOIRE. \200A VA?", + "", + // 40 + "", + "C'EST UN CAND\202LABRE TR\212S VIEUX.", + "IL DOIT \210TRE L\205 D\212S QUE MAZINGUER-Z \202TAIT UNE VIS.", + "NON, C'EST UNE RELIQUE.", + "C'EST UN JOLI R\202TABLE.", + // 45 + "", + "HI! HI! HI!", + "", + "NON.", + "", + // 50 + "HA! HA! HA! -QUE C'EST BON!", + "", + "", + "", + "JE NE VOIS RIEN DE SP\202CIAL.", + // 55 + "C'EST FERNAN, LA PLANTE.", + "C'EST UNE DES PIQUES DE LA GRILLE.", + "H\202! L\205-DESSOUS IL Y A UNE BO\214TE D'ALLUMETTES.", + "REGARDE! UN PAQUET DE CLINEX. -ET IL Y A UN TOUT NEUF!", + "IL N'Y A RIEN DE PLUS DANS LE SEAU.", + // 60 + "C'EST UN AVEUGLE QUI VE VOIT PAS.", + "", + "", + "", + "", + // 65 + "C'EST UNE GROSSE SOMME D'ARGENT.", + "", + "", + "", + "", + // 70 + "", + "", + "", + "", + "", + // 75 + "", + "", + "", + "", + "", + // 80 + "", + "", + "", + "", + "", + // 85 + "", + "", + "", + "", + "", + // 90 + "", + "", + "", + "", + "", + // 95 + "", + "", + "", + "", + "", + // 100 + "ELLE N'A RIEN DE SP\220CIAL", + "CELA N'A RIEN D'EXTRAORDINAIRE", + "QU'EST-CE QU'IL Y A?", + "BONJOUR!", + "RIEN DE NOUVEAU?", + // 105 + "LA FAMILLE, \200A VA?", + "-QUELLES CHOSES TU AS!", + "MAIS, COMME JE VAIS PRENDRE CELA!", + "MA RELIGION ME L'INTERDIT", + "CE N'EST PAS MIEUX", + // 110 + "BIEN S\352R, MON VIEUX!", + "ON NE PARLE PLUS DE CELA", + "IMPOSSIBLE", + "CELA NE S'OUVRE PAS", + "JE NE PEUX PAS TOUT SEUL", + // 115 + "SI JE VOULAIS, J' ARRIVERAIS, MAIS \200A ME DONNE DE LA PARESSE", + "JE N'Y VOIT PAS UNE RAISON APPARENTE", + "C'EST UN CERVEAU ASSEZ BIEN", + "ET BIEN CERVEAU, QUE PENSES-TU FAIRE CE SOIR?", + "NON, ON DOIT LE GARDER DANS UN ENDROIT \267 L'ABRI DES MUTATIONS DE L'ATMOSPH\324RE", + // 120 + "C'EST UN DUR, COMME MON CHEF", + "C'EST UN PIEU TR\324S AIGUIS\220", + "FID\324LE PIEU POINTUUU, NOBLE CH\322NE TRANSYLVAAAN", + "TIENS! JE DOIS COUPER MES ONGLES!", + "B.J. EST L\267-DEDANS. ET QUELLE EST MIGNONE CETTE NANA!", + // 125 + "ELLE EST FERM\220E TR\324S SOLIDEMENT", + "\"CADENAS SOLIDES S.A.\"", + "C'EST LE TYPIQUE SQUELETTE QU'ON TROUVE DANS LES GE\342LES DE TOUS LES JEUX", + "ON L' EMPLOIE NORMALEMENT POUR INDUIR DU COURANT \220LECTRIQUE AUX APPAREILS QU'Y SONT RACCORD\220S", + "C'EST ABSOLUMENT ARTISANAL, CAR LES JAPONAIS LES FONT MAINTENANT DE POCHE", + // 130 + "J'AI SEULEMENT VU DANS MA VIE UNE CHOSE SI MOCHE", + "LAISSE. JE NE LUI DIS RIEN POUR S'IL SE F\266CHE", + "IL SEMBLE ASSEZ RATIONNEL", + "C'EST UNE PHOTO DE PLATON EN TRAIN D'\220CRIRE SON DIALOGUE PERDU", + "JE NE SUIS PAS DE CEUX QUI PARLENT AUX POSTERS", + // 135 + "UN BUREAU ASSEZ MIGNON", + "C'EST UN DIPL\342ME DE CHASSE-CHASSE-VAMPIRES HOMOLOGU\220 PAR L'UNIVERSIT\220 D'OXFORD", + "C'EST UNE NUIT NOIRE AU PLEINE LUNE", + "IL PARA\327T QUE CES VIS NE SONT PAS TR\324S ENFONC\220ES", + "N'Y REGARDES PAS, MAIS JE CROIS QU'UNE CAM\220RA OCCULTE ME VISE", + // 140 + "UN D\220TECTEUR DE PIEUX ASSEZ MODERNE", + "NON, LE LABORATOIRE EST AU DEUXI\324ME \220TAGE", + "UNE JOLIE TABLE DE NUIT", + "C'EST UN TAS D'ARGENT QUI NE PEUT PAS MANQUER DANS UNE AVENTURE DIGNE DE TEL NOM", + "SI J'\220TAIS RICHE. DUBIDOUDUBIDOUDUBIDOUDUBIDOU", + // 145 + "CE SONT DES FEUILLES BIZARRES. ON A D\352 LES AMENER DE L'AM\220RIQUE DU SUD OU PAR L\267", + "JE NE PENSE PAS QU'ILS VONT ME R\220PONDRE", + "C'EST UN JOLI CRUCIFIX EN BOIS. L'IC\342NE N'ARRIVE PAS \267 SAISIR TOUT LA SPLENDEUR DE SA BEAUT\220", + "JE PRIE SEULEMENT AVANT DE ME COUCHER", + "H\220!, IL PARA\327T QUE CETTE PIQUE S'EST UN PETIT PEU D\220CROCH\220E", + // 150 + "TU NE POURRAS TE PLAIGNER APR\324S DU PEU DE PISTES QUE JE TE DONNE", + "C'EST UNE PIQUE ASSEZ CONVENTIONNELLE", + "ILS SONT MIGNONS, MAIS UN PEU SALES", + "NON, NON, ILS NE ME \220COUTERAIENT PAS. HI, HI, HI -QUE C'EST BON!", + "\"LA BELLE DORMANTE DU BOIS\" DE TCHA\330KOVSKI, OU TCHA\330FROSKI, OU N'IMPORTE COMMENT DIT-ON ", + // 155 + "TR\324S APP\220TISSANT", + "JE NE SUIS PAS DE CEUX QUI SUCCENT DES CHEWING-GUMS D\220J\267 M\266CH\220S", + "UNE FAUCILLE TR\324S MIGNONE. jE ME DEMANDE O\353 SERA LE MARTEAU?", + "\"LES FABRICANTS DE TABAC AVERTISSENT QUE LES AUTORIT\220S SANITAIRES SONT S\220RIEUSEMENT NUISIBLES POUR LA SANT\220 \"", + "UNE BOUGIE COURANTE ET NORMALE ET AVEC DE LA CIRE M\322ME", + // 160 + "IL FAUT VOIR COMME ELLES LUISENT CES DEUX RUTILANTES MONNAIES!", + "IL FAUT VOIR COMME ELLE LUIT CETTE RUTILANTE MONNAIE!", + "AVEC \200A JE SERAI IMMUNIS\220 CONTRE LES MORSURES DES VAMPIRES", + "NON, CE N'EST PAS ENCORE LE MOMENT", + "IL Y A UN BILLET DE MILLE ET DEUX SOUS", + // 165 + "ON DIT\"VOUS \322TES PRI\220S DE NE PAS DONNER \267 MANGER AU PIANISTE\"", + "L'OMELETTE, 200. DES PETITS POISSONS FRITS, 150, DES POMMES A\330OLI, 225", + "LES MEILLEURES HAMBURGERS DE CE C\342T\220 DU DANUBE, SEULEMENT 325", + "C'EST UNE JOLIE T\322TE DE MORT AU REGARD TR\324S PER\200ANT -HI, HI, HI, QUE C'EST BON!", + "BONJOUR T\322TE DE MORT, TU ME RAPPELLES L'ONCLE HAMLET", + // 170 + "J'AI LA HABITUDE DE NE PAS TOUCHER AUX CHOSES QUI ONT V\220CU AUTREFOIS", + "C'EST UNE POUBELLE", + "C'EST UNE MASSUE POUR LE MATCH DE CE SOIR", + "JE ME DEMANDE CE QU'IL AURA DERRI\324RE", + "H\220, CE RIDEAU NE BOUGE PAS!", + // 175 + "TIENS, QUEL CH\266TEAU SI SOMBRE, H\220? ", + "JE NE PEUX PAS, IL EST TROP LOIN POUR M'ENTENDRE", + "C'EST UNE TYPIQUE FOR\322T TRANSYLVANE, AVEC DES ARBRES", + "MAIS TU NE DIS QUE DES B\322TISES, C'EST UN LIEU OBSCUR!", + "CONFISERIE GARCIA, G\266TEAUX ET CHEWING-GUMS.", + // 180 + "UNE PORTE TR\324S JOLIE", + "ELLE EST FERM\220E", + "UN TONNEAU COMPL\324TEMENT FERM\220", + "", + "QUELLES BESTIOLES SI MIGNONES!", + // 185 + "BSSST, BSSST, PETIT CHAT...", + "IL NE R\220POND PAS", + "LA LUNE EST UN SATELLITE TOURNANT AUTOUR DE LA TERRE AVEC UNE P\220RIODE DE ROTATION DE 28 JOURS", + "SALUT, LUNE!, LUN\220E ET \220TOURDIE ", + "ELLE EST COMPL\324TEMENT BOUCH\220E AVEC DES GROSSES PLANCHES", + // 190 + "C'EST IMPOSSIBLE, CECI NE L'OUVRE PAS NI LE MAJORDOME DE LA T\220L\220", + "H\220, IL PARA\327T QUE L'OMBRE DE CE CYPR\324S-LA EST ALLONG\220E", + "OH\220! H\342TELIEEER!", + "JE VOUDRAIS UNE CHAMBRE", + "SAVEZ-VOUS O\353 EST QUE JE PEUX TROUVER UN TEL COMTE DRASCULA?", + // 195 + "OUI, QU'EST-CE QU'IL Y A? ", + "ET \200A?", + "EN... EN V\220RIT\220?", + "UNE BONNE QUESTION, JE VAIS VOUS RACONTER MON HISTOIRE, TIENS...", + "JE N'AI QUE POUR CINQ MINUTES", + // 200 + "JE M'APPELLE JOHN HACKER ET SUIS LE REPR\220SENTANT D'UNE INMOBILI\324RE BRITANNIQUE", + "IL PARA\327T QUE LE COMTE DRASCULA VEUT ACHETER DES TERRAINS \267 GIBRALTAR ET ON M'A ENVOY\220 POUR N\220GOCIER L'AFFAIRE", + "MAIS JE PENSE QUE DEMAIN DE BONNE HEURE JE RETOURNE AVEC MA MAMAN", + "UNE BELLE NUIT, N'EST-CE PAS?", + "NON, RIEN", + // 205 + "OH\220! PIANISTE!", + "UNE BELLE NUIT", + "ET EN PLUS, IL NE FAIT PAS FROID", + "EH BIEN, RIEN. CONTINUE \267 JOUER", + "C'EST \200A", + // 210 + "BONJOUR CHEF, \200A VA?", + "ET LA FAMILLE?", + "IL Y A DE L'AMBIANCE ICI, H\220?", + "TANT MIEUX SI JE NE DIS RIEN", + "ON EST MIEUX CHEZ-SOI QU'AILLEURS... ON EST MIEUX DANS... H\220? MAIS VOUS N'\322TES PAS TANTE EMMA. MIEUX ENCORE. -SI JE N'AI PAS AUCUNE TANTE EMMA!", + // 215 + "OUI, LE MIEN AUSSI. VOUS POUVEZ M'APPELLER COMME VOUS VOULEZ, MAIS SI VOUS M'APPELLEZ JOHNY, JE VIENS COMME LES CHIENS", + "OUI, QUELS COUPS QUE J'AI, N'EST-CE PAS? EN FAIT, O\353 SUIS-JE?", + "OUI", + "A\330E!, A\330E!...", + "OH, OUI! BIEN S\352R", + // 220 + "EH BIEN! MERCI BEAUCOUP POUR TON AIDE. JE NE TE D\220RANGE PLUS SI TU ME DIS O\353 SE TROUVE LA PORTE, S'IL TE PLA\327T...", + "CAR LE COUP A D\352 ME TOUCHER LA CERVELLE ET JE N'Y VOIS GOUTTE", + "BAH!, \200A FAIT RIEN. J'AI TOUJOURS UNE DE R\220CHANGE", + "OUAH, QUELLE BELLE FEMME! -JE NE M'AVAIS PAS RENDU COMPTE! BIEN S\352R, SANS LES LUNETTES...", + "\220COUTE...", + // 225 + "ET \200AAAAAA?!", + "NE T'EN FAIS PAS B. J., MON AMOUR! JE VAIS TE SAUVER DES GRIFFES DE CELUI-L\267 ", + "IL ME CASSE LE NEZ, TIENS!", + "AHHH, UN HOMME-LOUP! MEURS MAUDIT!", + "OUI, C'EST CELA...", + // 230 + "OUI, C'EST CELA... JE CROIS QUE JE VAIS SUIVRE MON CHEMIN. PARDON.. ", + "QUOI?", + "EH BIEN, EN V\220RIT\220, BIEN PENS\220... JE NE CROIS PAS", + "DIS -MOI, OH! \220RUDITE PHILOSOPHE! Y A-T-IL UNE R\220LATION CAUSE-EFFET ENTRE LA VITESSE ET LE LARD?", + "\200A VA, \200A VA, ABANDONNE. EN TOUT CAS, JE NE SAIS PAS POURQUOI JE L'AI DIT.", + // 235 + "QU'EST-CE QUE TU FAIS ICI EN TRAIN DE PHILOSOPHER AU LIEU DE MANGER DU MONDE?", + "QU'EST-CE QUE C'EST QUE \200A?", + "\220COUTE, PEX-TU R\220P\220TER CETTE PHRASE DES \"INCLINATIONS PR\220-\220VOLUTIVES\"?", + "BIEN S\352R, MON VIEUX. CETTE HISTOITE QUE TU M'AS LACH\220E AVANT. CE QUE JE N'AI PAS BIEN COMPRIS...", + "NON, LE MIEUX SERA DE NE RIEN DIRE. CAR SI JE LE TOUCHE LA VEINE.....", + // 240 + "OUI, QUE SE PASSE-T-IL?", + "OUI, QU'EST-CE QU'IL Y A? ", + "EH BIEN, MAINTENANT QU'IL ABORDE LE SUJET JE LUI DIRAI QUE...", + "", + "EN FAIT, QU'ARRIVERAIT-IL SI UN VAMPIRE SE POURVOYAIT DE LA FORMULE PAR HASARD... ", + // 245 + "EH BIEN, RIEN. \220COUTE, CECI NE TE SEMBLE PAS UN RAVAUDAGE QU'ON A MIS EN SC\324NE POUR EN FINIR T\342T AVEC LE JEU? BON, PEUT-\322TRE PAS", + "C'EST VIDE!", + "POURQUOI TU M'AS VOL\220 MON AMOUR. B.J. SI ELLE N'EST PAS L\267, LA VIE N'AS PAS DE SENS POUR MOI", + "SON CERVEAU?!", + "CE N'EST POUR RIEN, MAIS JE CROIS QUE TON PETIT MONSTRE M'A F\266CH\220", + // 250 + "MA VIERGE, QUE JE RESTE TEL QUE JE SUIS!", + "TU N'AURAS PAS LE DERNIER MOT. C'EST S\352R QUE MAINTENANT APPARA\327T SUPER-LOPEZ ET ME LIB\324RE!", + "QUELLE MERDE DE JEU DONT MEURT LE PROTAGONISTE!", + "UN INSTANT, QU'Y A-T-IL DE MON DERNIER D\220SIR?", + "HA! HA! MAINTENANT JE SUIS IMMUNIS\220 CONTRE TOI, D\220MON MAUDIT. CETTE CIGARETTE EST UNE POTION ANTI-VAMPIRES QUI M'A DONN\220 VON BRAUN ", + // 255 + "OUI, C'EST S\352R, MAIS TU N'OBTIENDRAS JAMAIS DE MOI LA FORMULE", + "JE PEUX SUPPORTER LA TORTURE, ET ENCORE LA CR\220ER ", + "NON, S'IL VOUS PLA\327T, JE PARLERAI, MAIS NE ME FAITES PAS \200A!", + "EH BIEN. JE T'AI D\220J\267 DIT CE QUE TU VOULAIS SAVOIR. MAINTENANT D\220LIVRE-NOUS, B.J. ET MOI, ET FICHEZ-NOUS LA PAIX", + "B.J.! QU'EST-CE QUE TU FAIS L\267? DRASCULA, O\353 EST-IL?", + // 260 + "QU'IL EST M\220CHANT! C'EST SEULEMENT PAR-CE QU'IL APPARTIENT \267 LA NOBLESSE QU'IL CROIT POUVOIR EXERCER LE DROIT DE GAMBADE AVEC N'IMPORTE QUI", + "\267 BAS L'ARISTOCRATIE ARBITRAIRE!", + "DEBOUT LES PAUVRES DU MOOONDE....!", + "ET D'APR\324S CE QUE JE VOIS ON T'A ENCHA\327N\220 AVEC CADENAS ET TOUT", + "BON, \200A VA. N'AURAS-TU PAS UNE \220PINGLE?", + // 265 + "BON, BON, NE T'EN FAIS PAS COMME \200A. JE PENSERAI \267 QUELQUE CHOSE.", + "H\220! TAVERNIER!", + "COMMENT VA LE MATCH?", + "QUI EST-CE?", + "NE VOIS-TU PAS QUE DRASCULA EST ICI?", + // 270 + "ALORS, ON VA FINIR AVEC LUI, NON?", + "SERS -MOI UN COUP...", + "RIEN. J'AI OUBLI\220 CE QUE J'ALLAIS TE DIRE", + "OU\207BIEN\207TU\207ME\207SERS\207UN\207COUP\207OU\207JE\207ME\207METS\207\267\207JOUER\207DU\207PIANO", + "COMBIEN IL RESTE POUR QUE LE MATCH FINISSE?", + // 275 + "BON SOIR", + "COMME VAS-TU, IGOR? BOSSU? -HI! HI! HI! QUE C'EST BON! ", + "QU'EST-CE QU'ON SUPPOSE QUE TU FAIS?", + "EH BIEN, NON!", + "ALORS, METS-TOI DES LUNETTES", + // 280 + "QU'EST QUE C'EST QU'UNE ORGIE SURNATURELLE?", + "\200A VA, \200A VA, ARR\322TE-TOI. JE ME FAIS D\220J\267 UNE ID\220E", + "NE POURRAIS-TU PAS ME DIRE O\353 SE TROUVE DRASCULA? ", + "ALLONS, S'IL TE PLA\327T", + "POURQUOI PAS?", + // 285 + "AH! MAIS IL DORME PENDANT LA NUIT?", + "EH BIEN! QUE LA RENTE SE DONNE BIEN", + "CE QUE JE DOIS LUI PARLER", + "OH\220! SQUELEEETTE! ", + "SAPRISTI! -UN SQUELETTE QUI PARLE!", + // 290 + "RACONTE-MOI, COMMENT EST-TU VENU JUSQU'ICI?", + "ET POUR QUELLE RAISON VOUDRAIT DRASCULA CR\220ER UN MONSTRE? ", + "COMMENT T'APPELLES-TU, AMI SQUELETTE?", + "\220COUTE, VEUX-TU QUE JE T'APPORTE QUELQUE CHOSE \267 MANGER?", + "TU DOIS AVOIR L'ESTOMAC VIDE. -HI! HI! HI!", + // 295 + "VRAIMENT JE N'AI PAS ENVIE DE PARLER MAINTENANT", + "MON DIEU! (SIFFLEMENT) J'ESP\324RE QUE...(SIFFLEMENT) ET QUE...(SIFFLEMENT) DEUX FOIS!", + "J'AI L'AIM\220E VRAIMENT. \200A VA, JE SUIS D'ACCORD, IL N'\220TAIT PAS UN G\220NIE, MAIS PERSONNE EST PARFAIT, N'EST-CE PAS? ", + "DE PLUS, ELLE AVAIT UNE FIGURE \220POUSTOUFLANTE ", + "JE NE SERAI PLUS LE M\322ME. JE VAIS M'ENFERMER DANS UN MONAST\324RE POUR VOIR FUIR MA VIE LENTEMENT", + // 300 + "RIEN NE POURRA M'EN SORTIR D\220J\267 DE CETTE MIS\324RE PARCE QUE...", + "DE QUI? DE QUI?", + "JE VEUX \322TRE UN PIRATE", + "JE VEUX \322TRE PROGRAMMEUR", + "RACONTEZ-MOI QUELQUE CHOSE SUR PELAYO", + // 305 + "JE CONTINUERAI \267 JOUER ET J'OUBLIERAI QUE VOUS AI VU ", + "QUI AURA PENS\220 \267 CETTE B\322TISE?", + "C'EST UN SAC COMME CELUI DE MA GRANDE-M\324RE", + "MAIS QUE JE SUIS BEAU!", + "PLUS JE ME REGARDE PLUS JE ME PLAIS", + // 310 + "ET APR\324S COMMENT JE ME FERME?", + "IL FAUDRA QUE M'OUVRE D'ABORD, NON?", + "JE SUIS BIEN O\353 JE SUIS", + "JE M'AI D\220J\267", + "SALUT, MOI!", + // 315 + "JE VAIS ME LES METTRE \267 TEMPS", + "JE NE VOIS RIEN DE SP\220CIAL", + "C'EST BIEN O\353 IL EST", + "ET POURQUOI FAIRE?", + "JE NE PEUX PAS", + // 320 + "SALUT, TOI!", + "C'EST LE PANTH\220ON DE L'ONCLE D\220SIR\220", + "OH\220! ONCLE D\220SIR\220\220\220\220!", + "NON, JE NE VEUX PAS ME COUPER ENCORE UNE FOIS", + "HEM! HEM!...!", + // 325 + "YAMM, HEMMM, JH!", + "OUI, COF,COF!", + "TIENS, IL Y A ICI UN CHEWING-GUM COLL\220", + "C'EST LE MOVILANI, LE CADEAU QUI M'ONT DONN\220 POUR NO\323L", + "QUE C'EST HAUT!", + // 330 + "SORS DANS LE BALCON JULIETTE!", + "TU EST LA LUMI\324RE QUI \220CLAIRE MON CHEMIN!", + "H\220, PORTE! QU'EST-CE QU'IL Y A?", + "OH\220! MACHINE \267 TABAC DE TRANSYLVANIIIE", + "C'EST UNE MACHINE \267 D\220BIT DE TABAC", + // 335 + "J'AI UNE AUTRE MONNAIE L\267 -DEDANS", + "NON, J'AI D\220CID\220 ABANDONNER LE TABAC ET L'ALCOOL", + "D\324S MAINTENANT JE VAIS ME CONSACRER SEULEMENT AUX FEMMES", + "C'EST UN VOL! RIEN EST SORTI!", + "ENFIN! ", + // 340 + "C'EST \200A, UN BAHUT", + "SALUT, BAHUT! TU T'APPELLES COMME MON COUSIN, QUI S'APPELLE RAUL", + "J'AI TROUV\220 LE SAC DE B.J..", + "MON DIEU! JE N'Y ME VOIS PAS -SUIS UN VAMPIRE!", + "...AH, NON! CE N'EST QU'UN DESSIN!", + // 345 + "PETIT MIROIR: \"C'EST QUI LE PLUS BEAU DU ROYAUME?\"", + "IL NE VEUT PAS M'OUVRIR", + "TR\324S BIEN. J'AI MIS LES TAMPONS", + "C'EST UN DIPL\342ME DE CHASSE-VAMPIRES HOMOLOGU\220 PAR L'UNIVERSIT\220 DE CAMBRIDGE", + "NON, IL ME FAUT ENCORE D'INGR\220DIENTS, PAS LA PEINE DE LUI REVEILLER", + // 350 + "C'EST QUE JE SUIS FAUCH\220", + "C'EST UNE LAMPE BRITANNIQUE", + "TAVERNIER! -AIDEZ-MOI!", + "UN VAMPIRE EST APPARU ET IL A ENLEV\220 MA FIANC\220E", + "MAIS, N'ALLEZ VOUS PAS M'AIDER?!", + // 355 + "MORTE? QUE VOULEZ-VOUS DIRE?", + "HEM!", + "UN VAMPIRE A S\220QUESTR\220E LA FILLE DE LA 506!", + "IL FAUT QUE TU M'AIDES!", + "TU NE SAIS PAS JOUER AUCUNE PI\324CE DES INHUMAINS?", + // 360 + "COMMENT TU TE SUPPORTES TOUT LE JOUR EN JOUANT LA M\322ME CHOSE?", + "ET ALORS, POURQUOI TU M'\220COUTES?", + "PR\322TE-MOI LES TAMPONS", + "ALLONS! JE VAIS TE LES REDONNER TOUT DE SUITE", + "ALLOOONSSS..." + // 365 + "AU REVOIR. JE DOIS TUER UN VAMPIRE", + "", + "EN QUOI TU PARLES! EN TRANSYLVAN?", + "C'EST QUI L'ONCLE D\220SIR\220?", + "MAIS QU'EST-CE QU'IL Y A AVEC CE DRASCULA-L\267?", + // 370 + "QUI EST-CE CE VON BRAUN-L\267?", + "ET POURQUOI IL NE LE FAIT PAS?", + "ET O\353 PEUX-JE TROUVER VON BRAUN?", + "EH BIEN, MERCI ET AU REVOIR. QUE TU LA DORMES BIEN", + "IL VAUDRA MIEUX SONNER D'ABORD", + // 375 + "LE PROFESSEUR VON BRAUN, C'EST VOUS?", + "ET NE POUVEZ-VOUS PAS M'INDIQUER O\353 JE PEUX...?", + "JE NE CROIS PAS QU'IL SOIT LE NAIN GANYM\324DE", + "PROFESSEUR!", + "AIDEZ-MOI! -LA VIE DE MA BIEN AIM\220E DEPENDE DE VOUS!", + // 380 + "\200A VA, JE N'AI PAS BESOIN DE VOTRE AIDE", + "D'ACCORD. JE M'EN VAIS", + "N'AIES PAS PEUR. NOUS ALLONS VAINCRE DRASCULA ENSEMBLE", + "ALORS, POURQUOI NE M'AIDEZ VOUS PAS?", + "JE LES AI", + // 385 + "OUI, JE LES AI!", + "D'ACCORD", + "...ER ...OUI", + "JE VIENS POUR RENTRER DANS CETTE CABINE", + "SUIS PR\322T \267 CONFRONTER VOTRE \220PREUVE", + // 390 + "\200A VA, VIEUX RIDICULE. JE SUIS VENU CHERCHER MON ARGENT", + "NON, RIEN. JE M'EN ALLAIS D\220J\267", + "PARDONNE-MOI", + "CE LIVRE T'INT\220RESSE? AVEZ-VOUS DES PARTITIONS DE TCHA\330KOVSKY?", + "COMMENT PEUX-JE TUER UN VAMPIRE?", + // 395 + "ON NE T'A JAMAIS DIT QUE C'EST MAUVAIS DORMIR DANS UNE MAUVAISE POSTURE?", + "EH BIEN, C'EST \200A QUE MA M\324RE ME DIT TOUJOURS", + "POURQUOI DRASCULA N'A PU JAMAIS TE TUER?", + "ET QU'EST-CE QUE S'EST PASS\220?", + "C'EST SUPER! -AVEZ-VOUS UNE POTION D'IMMUNIT...!", + // 400 + "ALORS?", + "TR\324S BIEN", + "POUVEZ-VOUS ME R\220P\220TER CE DONT J'AI BESOIN POUR CETTE POTION?", + "EH BIEN! JE PARS RAPIDE LE CHERCHER", + "\220COUTEZ, QU'EST-CE QUE C'EST PASSE\220 AVEC LE PIANISTE?", + // 405 + "J'AI\207D\220J\267\207TOUS\207LES\207INGR\220DIENTS\207DE\207CETTE\207POTION", + "UNE QUESTION: QU'EST.CE QUE C'EST CELA D' ALUCSARD ETEREUM?", + "PARLEZ, PARLEZ... ", + "ET C'EST O\353 CETTE GROTTE?", + "QU'EST-CE QU'IL Y A? N'AVIEZ VOUS PAS UN TRIBUNAL?", + // 410 + "...MAIS ...ET SI JE TROUVE ENCORE DES VAMPIRES?", + "C'EST UN VAMPIRE QUI M'EMP\322CHE L'ENTR\220E", + "IL RESSEMBLE \267 YODA, MAIS C'EST UN PEU PLUS GRAND", + "H\220, YODA! SI TU ME LAISSES PASSER JE TE DONNE UNE MONNAIE", + "BON, \200A VA. ON NE PEUT RIEN TE DIRE", + // 415 + "H\220, VAMPIRE! BELLE NUIT, N'EST-CE PAS?", + "ON T'A D\220J\267 DIT QUE TU RESSEMBLES \267 YODA?", + "ES-TU UN VAMPIRE OU UNE PEINTURE \267 L'HUILE?", + "IL VAUX MIEUX NE RIEN TE DIRE, POUR SI TU TE F\266CHES", + "C'EST FERM\220E \267 CL\220", + // 420 + "LA PIE POURRAIT M'ARRACHER UN OEIL SI J'EN ESSAIE!", + "C'EST FERM\220E! -MON DIEU, QUELLE PEUR!", + "LES GONDS SONT OXYD\220S", + "L\267-DEDANS IL Y A SEULEMENT UN POT AVEC DE LA FARINE", + "CECI A ENLEV\220 L'OXYDE", + // 425 + "J'AI TROUV\220 UN PIEU DE PIN", + "JE PRENDRAI CELUI-CI QUI EST PLUS GROS", + "BON, JE CROIS QUE JE PEUX ME D\220BARRASSER MAINTENANT DE CE STUPIDE D\220GUISSEMENT", + "LE PASSAGE AUX DONJONS EST FERM\220 \267 CAUSE DES TRAVAUX. VOUS \322TES PRI\220S D'UTILISER L'ENTR\220E PRINCIPALE. EXCUSEZ LES ENNUIES", + "...IL EST P\266LE. AVEC DE GROSSES DENTS. IL A UN TOUPET ET UTILISE UNE CAPE... -C'EST S\352REMENT DRASCULA!", + // 430 + "C'EST B.J.! B.J. TU EST BIEN?", + "OUI, JE SAIS QU'ELLE EST B\322TE, MAIS JE SUIS SEUL", + "N'AURAS-TU PAS UNE CL\220 PAR L\267, N'EST-CE PAS?", + "N'AURAS-TU PAS UN ROSSIGNOL, PAR HASARD?", + "DONNE-MOI UNE \220PINGLE. JE VAIS FAIRE COMME MCGYVER", + // 435 + "NE BOUGES PAS, JE REVIENS TOUT DE SUITE", + "ZUT! -S'EST CASS\220E!", + "OL\220\220\220! ET EN PLUS JE ME SUIS RAS\220, COLL\324GUE!", + "OUI, MON AMOUR?", + "IL N'ARRIVE PAS", + // 440 + "LE PIANISTE N'EST PAS L\267", + "UN COKTAIL TRANSYLVAN", + "JE N'AI PAS UNE CHAMBRE", + "SELON PARA\327T, IL EST REST\220 COINC\220 DANS LA BAIGNOIRE ET D\220CIDA ALORS D'OUVRIR UN BAR ", + "IL EST SO\352L COME UNE CUVE DE CUBA", + // 445 + "CE CHEVEU... LE CAS CE QU'IL ME RAPPELLE QUELQU'UN", + "C'EST UN SQUELETTE OSSEUX", + "REGARDE! MIGUEL BOS\220!", + "IL DORME. CE SERAIT DOMMAGE LE R\220VEILLER", + "IL EST PLUS MOCHE QU'\220MILE DE PAZ", + // 450 + "UN CERCUEIL EN BOIS DE PIN", + "IL VA ME COUPER EN PETITES TRANCHES, COMME UN SAUCISSON", + "JE N'AIME PAS LES PENDULES. JE PR\220F\324RE LES ARTICHAUTS", + "MES MAINS SONT EMMENOTT\220ES. JE N'ARRIVERAI PAS", + "IL SAUTE AUX YEUX QUE C'EST UNE PORTE SECR\324TE", + // 455 + "ILS M'IGNORENT", + "C'EST BIEN!", + "DANS LE SCRIPT IL BOUGEAIT, MAIS LE JEU A SURPASS\220 LE BUDGET ET ON N'A PAS PU ME PAYER UN GYMNASE POUR ME METTRE EN FORME. DONC, POINT DU TOUT", + "ELLE PARA\327T UN PEU D\220TACH\220E DU MUR", + "JE NE CROIS PAS POUVOIR M'EN SERVIR. ELLE TROP HUMIDE POUR L'ALLUMER", + // 460 + "\267 L'AILE OUEST? -M\322ME PAS EN FOU ACHEV\220! -VA SAVOIR QU'AURAIT-IL L\267-BASI!", + "IL Y A DE JOLIS MOTIFS TRANSYLVANS", + "", + "QUEL DOMMAGE NE PAS AVOIR TROUV\220 L\267-DEDANS UN PETIT AGNEAU EN TRAIN DE SE R\342TIR!", + "LA DERNI\324RE FOIS QUE J'AI OUVERT UN FOURNEAU LA MAISON A VOL\220 EN \220CLATS", + // 465 + "C'EST L'ENSEIGNE DE L'\220QUIPE DE FOOT-BALL DE LA TRANSYLVANIE", + "ET POURQUOI FAIRE? POUR ME LA METTRE \267 LA T\322TE?", + "JE NE CROIS PAS QUE CES TIROIRS SOIENT DE CEUX QUI S'OUVRENT", + "JE NE VEUX PAS SAVOIR LA NOURRITURE QU'IL Y AURA L\267-DEDANS!", + "J'AI L'IMPRESSION QUE C'EST DE L'IMPRESSIONNISME", + // 470 + "LA NUIT S'EMPARE DE NOUS TOUS... QUELLE PEUR, N'EST-CE PAS?", + "ELLE EST BOUCH\220E", + "C'EST LE ROI. NE L'AVAIT-TU PAS IMAGIN\220?", + "NON, J'EN AI D\220J\267 UN CHEZ MOI ET JE LUI DONNE \267 MANGER EN PLUS", + "UN PLACARD AVEC DES LIVRES ET D'AUTRES CHOSES", + // 475 + "ET QUI J'APPELLE \267 CES HEURES-L\267?", + "\"COMMENT FAIRE LA D\220CLARATION D'IMP\342TS\" COMME C'EST INT\220RESSANT!", + "J'AI D\324J\267 UN CHEZ MOI. JE CROIS QUE C'EST UN BEST-SELLER MONDIAL", + "UNE CL\220 COMPL\324TEMENT NORMALE", + "IL ME SEMBLE QUE CELLE-CI N'EST PAS D'ICI", + // 480 + "H\220! CE SONT DES FRITES SOUS FORME DE DENT CANINE! \200A ME PLA\327T", + "JE NE CROIS PAS QU'IL SOIT LE MEILLEUR MOMENT POUR MANGER DES GOURMANDISES, AVEC MA FIANC\220E AUX MAINS DE L'\322TRE LE PLUS MAUVAIS QU'UNE M\324RE A PU ACCOUCH\220", + "COMME JE SUIS BIEN EN TUANT DES VAMPIRES AVEC CELA!", + "VOYONS SI APPARA\327T T\342T UN AUTRE", + "NON, IL FAUT QU'IL SOIT AVEC UN SALE ET PUANT VAMPIRE, COMME CELUI QUI J'AI TU\220 AVANT", + // 485 + "C'EST L'AUTHENTIQUE PERRUQUE QU'ELVIS AVAIT UTILIS\220E QUAND IL EST DEVENU CHAUVE", + "C'EST DE LA FARINE, MAIS JE NE PEUX PAS DIRE DES MARQUES", + "PEUT-\322TRE DANS UN AUTRE MOMENT, D'ACCORD?", + "C'EST UNE HACHE MAGNIFIQUE, DOMMAGE DE NE PAS POUVOIR SE PAYER AUCUNE T\322TE DE VAMPIRE PAR L\267", + "NON. JE SUIS UNE BONNE PERSONNE AU FOND", + // 490 + "C'EST LE D\220ODORANT DE LA THACHER-HI!HI!HI!", + "C'EST UNE CAPE ASSEZ MIGNONE", + "", + "TOUT COMME LES BRANCHES DE TOUS LES ARBRES DU MONDE, C'EST-\267-DIRE SANS RIEN DE PARTICULIER", + "OH! C'EST INCROYABLE! -UNE CORDE DANS UNE AVENTURE DESSIN\220E!", + // 495 + "JE ME DEMANDE \267 QUOI SERVIRA-T-ELLE...?", + "UNE CORDE ATTACH\220E \267 UNE BRANCE OU UNE BRANCHE ACROCH\220E \267 UNE CORDE, \200A D\220PEND DU POINT DE VUE", + "IL PARA\327T QUE CETTE PIE \267 DE TR\324S MAUVAISES INTENTIONS", + "TAIS-TOI! JE NE LA DIS RIEN, POUR SI ELLE SE F\266CHE", + "ELLE SEMBLE MORTE, MAIS C'EST UNE MENSONGE", + // 500 + "IL N'Y A AUCUN ANIMAL ABiM\220 DANS LA PRODUCTION DE CE JEU", +}, +{ + // 0 + "", + "\220 la seconda porta pi\243 grande che ho vista nella mia vita", + "Forse.., no", + "\202 chiusa con tabelle. La chiesa deve essere abbandonata da tanti anni fa.", + "Ma se non la ho aperta", + // 5 + "Che faccio? La tolgo?", + "Ciao porta. Vado a farti una cornice", + "Troppo per me", + "una finestra chiusa con tabelle", + "Non ce la faccio", + // 10 + "Eccolo", + "E per che?", + "Ciao finestra. Hai qualcosa da fare stasera?", + "No senza il permesso del Ministero dei Lavori Pubblici", + "-eh! quella finestra ha soltanto una tabella..", + // 15 + "-Eooooo! -Finestra!", + "Tu, ciao", + "", + "Non ce la faccio", + "Va bene dov'\202 ", + // 20 + "", + "\220 una tomba in forma di croce", + "Non grazie", + "Ciao morto. Vuoi delle patatine a forma di vermi?", + "Si. Come in Poltergueist.", + // 25 + "", + "", + "Torno in quindici minuti", + "Vietato affigere manifesti", + "", + // 30 + "\220 chiuso con la chiave", + "Ne ho gi\240 uno.", + "", + "Non risponde.", + "No, \202 ben parcheggiato.", + // 35 + "\220 una porta.", + "Un casseto del tavolino.", + "Un sospettoso armadio.", + "Ciao armadio. Come va?.", + "", + // 40 + "", + "\220 un candelabro molto vecchio.", + "Deve essere qu\241 da che Mazinguer-Z era una vite.", + "No.\220 una reliquia.", + "\220 una bella pala.", + // 45 + "", + "Hi, hi, hi", + "", + "No.", + "", + // 50 + "Ha,ha,ha . - che buono!", + "", + "", + "", + "Non vedo niente di speciale.", + // 55 + "Ferdinan, la pianta.", + "\220 una degli spunzoni della cancellata.", + "-Eh! Qu\241 sotto c'\202 una scatola di cerini", + "-Guarda! un pacco di fazzoletti. -E c'\202 ne uno senza utilizzare!.", + "Non c'\202 niente di pi\243 nel secchio.", + // 60 + "\220 un cieco che non vede", + "", + "", + "", + "", + // 65 + "\220 una abbondante quantit\240 di soldi", + "", + "", + "", + "", + // 70 + "", + "", + "", + "", + "", + // 75 + "", + "", + "", + "", + "", + // 80 + "", + "", + "", + "", + "", + // 85 + "", + "", + "", + "", + "", + // 90 + "", + "", + "", + "", + "", + // 95 + "", + "", + "", + "", + "", + // 100 + "NON HA NULLA DI SPECIALE", + "NON \324 MICA SPECIALE", + "TU! CHE C'\324 ?", + "CIAO", + "NIENTE NUOVO?", + // 105 + "-COME VA LA FAMIGLIA?", + "- MA CHE STAI A DIRE?", + "-MA COME VADO A PRENDERE QUELLA COSA!", + "\324 VIETATO DALLA MIA RELIGIONE", + "MEGLIO DI NO", + // 110 + "-COME NO!", + "NEANCHE PARLARNE", + "IMPOSSIBILE", + "QUESTO NON SI APRE", + "IO SOLO NON CE LA FACCIO", + // 115 + "SE VORREI POTREI, MA MI FA PIGRIZIA", + "NON TROVO UNA BUONA RAGIONE", + "\324 UN CERVELLO ABBASTANZA CARINO", + "ALLORA, CERVELLO, CHE NE PENSI DI FARE STASERA?", + "NO, DEVE CONSERVARSI IN UN POSTO CHIUSO ALLA AZIONE MUTANTE DELLA ATMOSFERA", + // 120 + "\324 COS\336 DURO, COME IL MIO CAPO", + "UNA TALEA MOLTO AFFILATA", + "FEDELE TALEA AFFILATAAA, NOBILE ROVERE TRANSILVANOOO", + "-INSOMMA, DEVO TAGLIARMI LE UNGHIE!", + "-LA, DENTRO, C'\324 B.J,E MAMMA MIA, CHE FIGA!", + // 125 + "\324 CHIUSA SOTTO LUCCHETTO E CATENACCIO", + "\"LUCCHETTO E CATENACCIO S.A\"", + "\324 IL TIPICO SCHELETRO CHE C'\324 IN TUTTE LE CARCERE DI TUTTI I VIDEO-GIOCHI", + "SI UTILIZA PER DARE ELETRICIT\267 AGLI APARATTI COLLEGATI A LUI", + "\324 TOTALMEN11TE ARTIGIANO, PERCHE I GIAPONESSI LI FANNO TASCABILI", + // 130 + "NELLA MIA VITA, HO VISTO SOLTANTO UNA VOLTA UNA COSA COS\336 BRUTTA", + "SMETILLA. NON DICO NULLA PER SE SI ARRABBIA", + "SEMBRA ABBASTANZA RAZIONALE", + "\324 UNA FOTO DI PLATONE SCRIVENDO IL SUO DISCORSO PERSO", + "NON SONO DI QUELLI CHE PARLANO CON POSTERS", + // 135 + "UNA SCRIVANIA MOLTO CARINA", + "\324 UN DIPLOMA DI CACCIA-CACCIA-VAMPIRI OMOLOGATO DALLA UNIVERSIT\267 DI OXFORD", + "\324 NOTTE BUIA CON LUNA PIENA", + "SEMBRA CHE QUESTE VITI NON SONO MOLTO AVVITATE", + "NON GUARDARE, MA CREDO CHE UNA TELECAMERA NASCOSTA MI ST\267 REGISTRANDO", + // 140 + "UN DETETTORE DI TALEE MOLTO MODERNO", + "NO, IL LABORATORIO SI TROVA NEL SECONDO PIANO", + "UN BEL TAVOLINO", + "\324 UN SACCO DI SOLDI CHE NON PUO MANCARE IN UNA AVVENTURA CHE SIA COS\336 IMPORTANTE", + "IF I WERE A RICHMAN, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", + // 145 + "SONO DELLE STRANE FOGLIE. DEVONO AVERLE PORTATE DALLA SUDAMERICA", + "NON CREDO CHE SIA RISPOSTO", + "\324 UN BEL CROCIFISSO DI LEGNO. LA ICONA NON RIFLESSA TUTTA LA SUA BELLEZA", + "IO SOLO PREGO PRIMA DI ANDARMENE AL LETTO", + "-EH, SEMBRA CHE QUESTO SPUNZONE \324 UN PO ALLENTATO!", + // 150 + "E POI TI LAMENTI PERCHE NON TI DO SUGGERIMENTI", + "\324 UNO SPUNZONI ABBASTANZA CONVENZIONALE", + "SONO CARINI, SEBBENE HANNO PARECHIO POLVERE", + "NO, NON MI SENTIRANO; HI,HI,HI -CHE BUONO!", + "\"LA BELLA ADDORMENTATA DEL BOSCO\" DI CIAIKOSKY, O CIOIFRUSKY, O COME SI DICA", + // 155 + "MOLTO APPETITOSA", + "NO, IO NON SONO DI QUELLI CHE SI METTONO IN BOCCA GOMME USATE", + "UNA FALCE MOLTO CARINA. MI DOMANDO DOVE CI SAR\265 IL MARTELLO", + "\"I FABBRICANTI DI TABACCO AVVERTONO CHE IL TABACCO NUOCE GRAVEMENTE LA SALUTE\"", + "UNA CANDELA NORMALE, ANZI CON CERA", + // 160 + "MAMMA MIA COME BRILLANO QUESTE DUE BRILLANTI MONETE", + "MAMMA MIA COME BRILLA QUESTA BRILLANTE MONETA", + "CON QUESTO SAR\220 IMMUNE AI MORSI DEI VAMPIRI", + "NO, ANCORA NON \220 IL MOMENTO", + "C'E UN BIGLIETTO DI DIECIMILA E UN PAIO DI MONETE", + // 165 + "DICE \"SI PREGA DI NON BUTTARE CIBO AL PIANISTA\"", + "OMELETTA, 3.000 .PESCI FRITI, 2.000,PATATINE, 2.500", + "LE MIGLIORI HAMBURGUER A QUESTA PARTE DEL DANUBIO, SOLTANTO PER 4.000", + "UN BEL TESCHIO, CON UNO SGUARDO MOLTO PENETRANTE. HI,HI,HI, CHE BUONO!", + "CIAO TESCHIO, MI RICORDI AL ZIO DI HAMLET", + // 170 + "HO L'ABITUDINE DI NON TOCCARE COSE CHE SIANO STATE VIVE", + "UN CESTINO", + "UN TOTOCALCIO PER LA PARTITA DI STASERA", + "MI DOMANDO CHE CI SAR\265 DIETRO", + "-EH, QUESTA TENDE NON SI MUOVE!", + // 175 + "MADONNA, CHE TETRO \220 QUESTO CASTELLO.", + "NON CE LA FACCIO, \220 TROPPO LONTANO PER SENTIRMI", + "UN TIPICO BOSCO TRANSILVANO, CON GLI ALBERI", + "-MA CHE SCIOCHEZZE DICI, \220 MOLTO BUIO", + "PASTICCERIA ROSSI. DOLCI E GOMME", + // 180 + "UNA PORTA MOLTO BELLA", + "\220 CHIUSA", + "UN FUSTO COMPLETAMENTE CHIUSO", + "", + "CHE ANIMALETTI COS\326 BELLI!", + // 185 + "BSSSSSS,BSSSS, GATINO..", + "NON RISPONDE", + "LA LUNA \220 UN SATELLITE CHE GIRA INTORNO LA TERRA CON UN PERIODO DI RIVOLUZIONE DI 28 GIORNI", + "CIAO, LUNA LUNETTA", + "\220 TOTALMENTE CHIUSA CON TABELLE", + // 190 + "IMPOSSIBILE. QUESTO, NON LO APRE N\220 HOUDINI", + ".EH, SEMBRA CHE L'OMBRA DEL CIPRESSE \220 ALUNGATA", + "-EOOO, BARISTA", + "VORREI UNA CAMERA", + "SA DOVE POSSO TROVARE A UNO CHE SI FA CHIAMARE CONDE DRASCULA", + // 195 + "SI, PER CHE?", + "COME MAI?", + "DA.....DAVVERO?", + "BUONA DOMANDA, GLI RACONTER\220 LA MIA STORIA, SENTA..", + "SONO SOLTANTO CINQUE MINUTI", + // 200 + "MI CHIAMO JOHN HACKER, E SONO RAPPRESENTANTE DI UNA IMMOBILIARIE BRITANICA", + "MI HANNO DETTO CHE IL CONDE DRASCULA VUOLE COMPRARE DEI TERRENI A GIBRALTAR, E SONO QU\326 PER NEGOZIARE LA VENDITA", + "MA CREDO IO CHE DOMANI PRESTO TORNO CON LA MAMMA", + "BELLA NOTTE, VERO?", + "NO, NIENTE", + // 205 + "EOOOO, PIANISTA", + "BELLA NOTTE", + "ANZI, NON FA FREDDO", + "ALLORA... TI LASCIO CONTINUARE A SUONARE", + "VA BENE", + // 210 + "CIAO CAPO, COME VA?", + "E LA FAMIGLIA?", + "C'\220 GENTE QU\326, EH?", + "MEGLIO NON DICO NULLA", + "SI ST\265 MEGLIO A CASA CHE A NESSUN POSTO... -EH? MA SE LEI NON \220 LA ZIA EMMA. ANZI. SE IO NON HO NESSUNA ZIA EMMA.", + // 215 + "SI, IL MIO ANCHE. LEI PUO CHIAMARMI COME GLI PARA, MA SE MI CHIAMA JOHNY, VENGO SUBITO COME I CANI", + "SI, CHE SPIRITOSO SONO, VERO? MAA.. DOVE MI TROVO?", + "SI.", + "MANAGIA..", + "OH, SI. COME NO", + // 220 + "ALLORA GRAZIE MILE PER DARMI IL TUO AIUTO. NON TI DISTURBO PI\351 . SE MI DICI DOV'\220 LA PORTA, PER FAVORE...", + "PERCHE LA BOTTA HA DOVUTO DAGNARMI IL CERVELLO E NON VEDO UNA MADONNA", + "NON FA NIENTE. SEMPRE NE PORTO ALTRI IN PI\351 ", + "-UFFA, CHE FIGA!- NON MI ERA ACCORTO, CERTO, SENZA GLI OCCHIALI", + "SENTI..", + // 225 + "COME MAI...?!", + "NON TI PREOCUPARE B.J., AMORE MIO! TI LIBERER\220 DA QUEL TIZIO", + "MI HA FATTO ARRABBIARE", + ".AHHH, IL LUPO- MANNARO! -MUORE MALDITO!", + "BENE, CREDO...", + // 230 + "BENE, CREDO CHE PROSSIGUER\220 LA MIA STRADA. PERMESSOO..", + "-COME?", + "LA VERIT\267, PENSANDOCI MEGLIO, CREDO DI NO", + "DIMI, OH ERUDITO FILOSOFO, C'\324 QUALCUNA RELAZIONE CAUSA-EFETTO TRA LA VELOCIT\267 E LA PANCETA?", + "VA BENE, SMETTILA. COMUNQUE NON SO PERCHE HO DETTO QUESTO", + // 235 + "COSA FAI QU\336 FILOSOFANDO, CHE NON STAI MANGIANDO GENTE?", + "COME MAI?", + "SENTI, PUOI RIPETERE QUELLO DI \"INCLINAZIONI PRE-EVOLUTIVE\"?", + "SI SI, QUELLA STORIA CHE MI HAI RACCONTATO PRIMA. PERCHE NON HO CAPITO MOLTO BENE.", + "NO, MEGLIO NON DICO NULLA, NON VOGLIO METTERE IL COLTELLO NELLA PIAGA...", + // 240 + "SI, MI DICA?", + "SI, CHE SUCCEDE?", + "AH, ADESSO CHE CITA IL SOGGETTO GLI DIR\343 CHE...", + "", + "AH.., COSA SUCCEDEREBBE SE UN VAMPIRO PRENDEREBBE LA RICETA..", + // 245 + "NIENTE. SENTI, QUESTO SEMBRA UN POSTICCIO MESSO SUL COPIONE PER FINIRE PRESTO IL VIDEO-GIOCO?. BENE, FORSE, NO", + "\324 VUOTO!", + "PERCHE HAI RUBATO IL MIO AMORE, B.J., SENZA LEI LA MIA VITA NON HA SENSO", + "-IL SUO CERVELLO?!", + "NO NIENTE, MA CREDO CHE ALLA FINE IL TUO PICCOLINO MOSTRO MI HA FATTO ARRABBIARE", + // 250 + "SANTA MADONNA AIUTAMI!", + "NON TE LA CAVEREI. SICURO CHE APPARISCE SUPERMAN E MI LIBERA!", + "CHE SCHIFFO DI VIDEO-GIOCO NEL CUI MUORE IL PROTAGONISTA", + "UN ATTIMO, COSA SUCCEDE COL MIO ULTIMO DESIDERIO?", + "-HA,HA! ORA SONO IMMUNIZZATO CONTRO TE, MALEDETTO DEMONIO. QUESTA SIGARETTA \324 UNA POZIONE ANTI-VAMPIRI CHE MI HA DATTO VON BRAUN", + // 255 + "SI CERTO. MA NON RIUSCIRAI MAI A FARMI DIRTI LA RICETA", + "POSSO SOPPORTARE LA TORTURA, ANZI CREARLA", + "-NO, PER FAVORE!- PARLER\220, MA NON FARMI QUESTO!", + "BENE, TI HO GI\267 DETTO QUELLO CHE VOLEVI SAPERE. ORA LIBERA B.J. E ME, E LASCIACI PERDERE", + "-B.J-.! COSA FAI QU\336? DOV'\324 DRASCULA?", + // 260 + "CHE PERVERSO! SOLTANTO PERCH'\324 NOBILE PENSA CHE HA IL DIRITTO SU TUTTI QUANTI", + "ABASSO LA ARISTOCRAZIA!", + "FORZA I POVERI DEL MONDOOO...", + "E QUELLO CHE VEDO \324 CHE TI HA INCATENATO ANZI CON LUCCHETTO", + "O.K., NON AVRAI UNA FONCINA?", + // 265 + "BENE BENE, NON PRENDERTELA COS\336, CI PENSER\220 IO", + "EH, BARISTA", + "COME VA LA PARTITA?", + "CHI?", + "MA NON VEDI CHE DRASCULA \324 QU\336?", + // 270 + "ANDIAMO A UCCIDERLO", + "SERVIMI UN DRINK..", + "NIENTE. HO DIMENTICATO COSA VOLEVO DIRTI", + "O\247MI\247SERVI\247UN\247DRINK\247O\247MI\247METTO\247A\247SUONARE\247IL\247PIANOFORTE", + "QUANTO MANCA PER LA FINE DELLA PARTITA?", + // 275 + "BUONA SERA", + "COME VA IGOR? VAI CON LA GOBBA? -HI,HI,HI,CHE BUONO!", + "CHE STAI FACENDO?", + "NO", + "ALLORA METTITI GLI OCCHIALI", + // 280 + "COSA \324 QUELLA DELLA ORGIA SOPRANNATURALE?", + "VA BENE, NON COTINUARE, MI FACCIO IDEA", + "NON POTREI DIRMI DOV'\324 DRASCULA?", + "DAIII, PER FAVORE", + "PER CHE NO?", + // 285 + "AH, MA DORME DI NOTTE?", + "BENE, ALLORA IN BOCCA IL LUPO CON I REDDITI", + "DEVO PROPRIO PARLARE CON LUI", + "EOOOO, SCHELETROOO!", + "OH DIO! UN MORTO CHE PARLA!", + // 290 + "RACCONTAMI. COME MAI SEI VENUTO QU\336?", + "E PER CHE DRASCULA VUOLE CREARE UN MOSTRO?", + "COME TI CHIAMI, AMICO SCHELETRO?", + "SENTI, NON VUOI QUALCOSA DA MANGIARE?", + "DEVI AVERE LO STOMACO VUOTO .- HI,HI,HI!", + // 295 + "LA VERIT\267 \324 CHE NON MI VA DI PARLARE ADESSO", + "VANFFAN ( BIP ) FIGLIO DI .......( BIIP ).. VAI A FARE....( BIIIP )", + "IO LA AMAVO DAVVERO. O.K., SONO D'ACCCORDO CHE NON ERA MOLTO INTELLIGENTE, MA NESSUNO \324 PERFETTO, NO?", + "ANZI, AVEVA UN CORPO DA PAURA", + "ORMAI NON SAR\343 PI\353 QUELLO DI PRIMA .MI RICHIUDER\343 IN UN MONASTERO, E LASCIER\343 LA MIA VITA PERDERE", + // 300 + "NIENTE POTR\267 FARMI USCIRE DI QUESTA MISERIA PERCHE...", + "DI CHI? DI CHI?", + "VOGLIO ESSERE PIRATA", + "VOGLIO ESSERE PROGRAMMATORE", + "RACCONTAMI QUALCOSA SU GARIBALDI", + // 305 + "CONTINUER\343 A GIOCARE E DIMENTICHER\343 CHE VI HO VISTI", + "MA CHI AVR\267 PENSATO QUESTA SCIOCHEZZA!", + "\324 UNA BORSA COME QUELLA DI MIA NONNA", + "MA CHE FIGO SONO!", + "PI\353 MI VEDO PI\353 MI PIACCIO", + // 310 + "E POI COME MI CHIUDO?", + "PRIMA DEVO APRIRMI, VERO?", + "ST\343 BENE DOVE SONO", + "MI HO GI\267 PRESSO", + "CIAO IO", + // 315 + "ME GLI INDOSSER\343 QUANDO SIA LA OCCASIONE OPORTUNA", + "NON VEDO NIENTE DI SPECIALE", + "\324 BENE DOV'\324", + "E PER CHE?", + "NON CE LA FACCIO", + // 320 + "CIAO TU", + "\324 IL SEPOLCRO DELLO ZIO PEPPINO", + "EOOOO, ZIO PEPPINOOOO!", + "NO.NON VOGLIO TAGLIARMI UN' ALTRA VOLTA", + "-EHEM,EHEM..!", + // 325 + "GNAMM, EMMM,!", + "-SI, COF, COF!", + "GUARDA, C'\324 UNA GOMMA QU\336 ATTACATA", + "\324 IL TELEFONINO CHE MI HANNO REGALATO A NATALE", + "COM'\324 ALTO", + // 330 + "ESCI AL BALCONE GIULIETTA!", + "TU SEI LA LUCE CHE ILLUMINA LA MIA VITA!", + "EH, PORTA, CHE C'\324?", + "EOOOO, SPENDITRICE DI TABACCO DI TRANSILVANIAAA", + "\324 UNA SPENDITRICE DI TABACCO", + // 335 + "HO UN'ALTRA MONETA DENTRO", + "NO. HO DECISSO SMETTERE DI FUMARE E DI BERE", + "DA OGGI SAR\343 SOLTANTO PER LE DONNE", + "QUESTO \324 UNA TRUFFA! NON \324 USCITO NULLA", + "ALLA FINE!", + // 340 + "CHE TI HO DETTO?, UN BAULE", + "CIAO BAULE, TI CHIAMI COME MIO CUGINO CHE SI CHIAMA RAUL..E", + "HO TROVATO LA BORSA DI B.J.", + "MIO DIO, NON MI RIFLETTO, SONO UN VAMPIRO!", + "...AH, NO, \324 UN DISEGNO", + // 345 + "SPECCHIO DELLE MIE BRAME: CHI \220 ILPI\351 BELLO DEL REAME?", + "NON VUOLE APRIRMI", + "MOLTO BENE. MI HO MESSO I TAPPI", + "\324 UN DIPLOMA DI CACCIA-VAMPIRI OMOLOGATO DALLA UNVERSIT\267 DI CAMBRIDGE", + "NO. MANCANO ANCORA GLI INGREDIENTI, NON MERITA LA PENA CHE SIA SVEGLIATO", + // 350 + "NON HO SOLDI", + "\324 UNA LAMPADA BRITANICA", + "BARISTA! AIUTAMI!", + "HA COMPARITO UN VAMPIRO ED HA PRESSO LA MIA FIDANZATA", + "MA NON MI AIUTER\267", + // 355 + "MORTA? CHE VUOLE DIRE?", + "- EHEM!", + "UN VAMPIRO HA SEQUESTRATO LA RAGAZZA DELLA 506!", + "DEVI AIUTARMI!", + "NON SAI SUONARE NESSUNA DI \"ELIO E LE STORIE TESSE\"", + // 360 + "COME TI SOPPORTI, SUONANDO SEMPRE LO STESSO?", + "ALLORA COME MI SENTI?", + "PRESTAMI I TAPPI", + "DAI, TE LI RESTITUISCO SUBITO", + "DAIIII...", + // 365 + "CIAO. DEVO UCCIDERE UN VAMPIRO", + "", + "COSA DICI? IN TRANSILVANO?", + "CHI \324 LO ZIO PEPPINO?", + "MA CHE SUCCEDE CON DRASCULA?", + // 370 + "CHI \324 VON BRAUN?", + "E PER CHE NON LO FA?", + "E DOVE POSSO TROVARE VON BRAUN?", + "GRAZIE E CIAO, SOGNI D'ORO", + "SAR\267 MEGLIO BUSSARE PRIMA", + // 375 + "\324 LEI IL PROFESSORE VON BRAUN?", + "E MI POTREBBE DIRE DOVE POSSO ...?", + "NON CREDO SIA IL NANNO GANIMEDI", + "-PROFESSORE!", + "AIUTAMI! LA VITA DEL MIO AMORE DIPENDE DI LEI!", + // 380 + "VA BENE, NON HO BISOGNO DEL SUO AIUTO", + "O.K. ME NE VADO", + "NON AVERE PAURA. INSIEME VINCEREMO DRASCULA", + "ALLORA PER CHE NON MI AIUTA?", + "IO CE LE HO", + // 385 + "SI CE LE HO", + "D'ACCORDO", + "...EHH...SI", + "VENGO A RIENTRARE A QUESTA CABINA", + "SONO PRONTO PER FARE LA PROVA", + // 390 + "VA BENE, VECCHIETO. SONO VENUTO PER IL MIO SOLDI", + "NO, NIENTE. ME NE GI\267 ANDAVO", + "SCUSA", + "TI \324 INTERESANTE QUESTO LIBRO? HA PARTITURE DI TCIAKOWSKY", + "COME POSSO UCCIDERE UN VAMPIRO?", + // 395 + "NON TI HANNO DETTO CHE NON \324 BUONO DORMIRE IN CATTIVA POSIZIONE?", + "\324 QUELLO CHE SEMPRE DICE MIA MADRE", + "PER CHE DRASCULA NON FU RIUSCITO A UCCIDERTI?", + "E COSA FU?", + "BENISSIMO! HA LEI LA POZIONE DI IMMUNIT\267...!", + // 400 + "ALLORA", + "MOLTO BENE", + "MI PUO RIPETERE COSA BISOGNO PER QUELLA POZIONE?", + "VADO VIA VELOCE A TROVARLO", + "SENTA, COSA \324 SUCCESO CON IL PIANISTA?", + // 405 + "HO GI\267 TUTTI GLI INGREDIENTI DI QUESTA POZIONE", + "UNA DOMANDA: COSA \324 QUELLA DI ALUCSARD ETEREUM?", + "DICA, DICA..", + "E DOV'\324 QUELLA GROTTA?", + "CHE C'\324? NON AVETE TRIBUNALE?", + // 410 + "...MA ...E SE TROVO PI\353 VAMPIRI?", + "\324 UN VAMPIRO CHE NON MI FA PASSARE", + "SI ASSOMIGLIA A YODA, MA PI\353 ALTO", + "EH, YODA. SE MI FAI PASSARE TI DAR\343 CENTO LIRE", + "BENE, O.K., NON POSSO DIRTI NULLA", + // 415 + "CIAO VAMPIRO, BELLA NOTTE, VERO?", + "TI HANNO DETTO QUALCHE VOLTA CHE TI ASSOMIGLII A YODA?", + "SEI UN VAMPIRO O UN DIPINTO ALL'OLEO?", + "MEGLIO NON DIRTI NIENTE, PERCHE POI TI ARRABBII", + "\324 CHIUSA CON LA CHIAVE", + // 420 + "SE PROVO, LA GAZZA MI POTREI CAVARE UN OCCHIO", + "\324 CHIUSA! DIO MIO, CHE PAURA!", + "LE CERNIERE SONO OSSIDATE", + "LA DENTRO C'\324 SOLTANTO UN BARATOLO DI FARINA", + "QUESTO HA TOLTO L'OSSIDO", + // 425 + "HO TROVATO UNA TALEA DI LEGNO DI PINO", + "PRENDER\343 QUESTO CH'\220 PI\353 GROSSO", + "BENE, CREDO DI POTERE TOGLIERMI QUESTO STUPIDO COSTUME", + "\"CORRIDOIO AI TORRIONI CHIUSO PER LAVORI IN CORSO. PER FAVORE, PER LA PORTA PRINCIPALE. SCUSATE PER IL DISTURBO\"", + "..\324 PALLIDO, HA DENTI CANINI, HA CIUFFO E UTILIZA MANTELLO...- SICURO CH'\324 DRASCULA!", + // 430 + "B.J., B.J., STAI BENE?", + "SI, SO CH'\324 SCEMA MA MI SENTO SOLISSIMO", + "NON AVRAI UNA CHIAVE PER CASO, VERO?", + "- E SICURO CHE NON HAI UN GRIMALDELLO?", + "DAMI UNA FONCINA. VADO A FARE COME MCGYVER", + // 435 + "NON MUOVERTI, TORNO SUBITO", + "- MANAGIA!- SI \324 ROTTA!", + "OLE, ANCHE MI HO FATTO LA BARBA!", + "SI, CARO?", + "NON ARRIVA", + // 440 + "IL PIANISTA NON C'\324", + "UN DRINK TRANSILVANO", + "ANCORA NON HO CAMERA", + "SEMBRA CHE FU RISUCCHIATO NELLO SCARICO DELLA VASCA E HA DECISO APRIRE UN BAR", + "\324 UBRIACO PERSO", + // 445 + "QUESTI CAPELLI.... CREDO CHE MI FANNO RICORDARE A QUALCUNO", + "\324 UNO SCHELETRO OSSUTO", + "GUARDA! MIGUEL BOSE!", + "\324 ADDORMENTATO. SAREBBE UN PECCATO SVEGLIARGLI", + "\324 PI\353 BRUTTO CHE BEGNINI", + // 450 + "UN FERETRO DI LEGNO DI PINO", + "MI TAGLIER\267 A FETTINI, COME UN SALSICCIOTTO", + "NON MI PIACCIONO I PENDOLI. PREFERISCO LE CARCIOFE", + "LE MIE MANI SONO LEGATE. NON CE LA FAR\343", + "\324 OVVIO CH'\324 UNA PORTA SEGRETA", + // 455 + "MI IGNORANO", + "-DAIII!", + "NEL PRIMO COPIONE SI MUOVEVA, MA IL VIDEO-GIOCO \220 USCITO DAL BUDGET E NON HANNO POTUTO PAGARMI UNA PALESTRA E NON SONO GONFFIATO", + "SEMBRA CH'\324 UN P\343 ALLENTATA DAL MURO", + "NON CREDO CHE MI SIA UTILE. \324 TROPPO UMIDA PER ACCENDERLA.", + // 460 + "AL LATO OVEST? -N\324 PAZZO, CHI SA CHE CI SAR\267 LI!", + "HA DEI BELLI DISEGNI TRANSILVANI", + "", + "CHE PENA CHE NON CI SIA DENTRO UN AGNELLINO ARRROSTANDOSI", + "LA ULTIMA VOLTA CHE APRII UN FORNO, LA CASA SALT\220 PER ARIA", + // 465 + "LO SCUDO DELLA SCUADRA DI CALCIO DI TRANSILVANIA", + "E PER CHE? PER INDOSARLA SULLA TESTA?", + "NON CREDO CHE I CASSETI SIANO DI QUELLI CHE SI APPRONO", + "NON VOGLIO SAPERE IL CIBO CHE CI SAR\267 LA DENTRO!", + "HO L'IMPRESSIONE CH'\324 IMPRESSIONISTA", + // 470 + "LA NOTTE SI IMPADRONA DI TUTTI QUANTI... CHE PAURA?", + "\324 OSTACOLATA", + "\324 IL RE, NON LO AVEVI IMAGINATO?", + "NO, NE UNO A CASA, ANZI GLI DO DA MANGIARE", + "UNA SCAFFALATURA CON LIBRI ED ALTRE COSE", + // 475 + "E A CHI CHIAMO A QUESTE ORE?", + "\"COME FARE LA DECLARAZIONE DI REDDITI\"- CHE INTERESSANTE!", + "NE HO UNO A CASA, CREDO CH'\324 UN BEST-SELLER MONDIALE", + "UNA CHIAVE COMPLETAMENTE NORMALE", + "MI SA QHE QUESTA NON \220 DI QU\336", + // 480 + "EH, SONO PATATINE FRITE A FORMA DI DENTI CANINI ! MI AFASCINA", + "NON CREDO CHE SIA IL MOMENTO MIGLIORE PER METTERSI A MANGIARE DOLCI, L'ESSERE PI\353 CATTIVO DEL MONDO ha nelle sue mani la mia fidanzzata", + "COME MI ST\343 DIVERTENDO UCCIDENDO VAMPIRI CON QUESTO!", + "VEDIAMO SE APPARISCE UN ALTRO PRESTO", + "NO, DEVE ESSERE CON UN VAMPIRO SPORCO E SCHIFFOSO COME QUELLO DI PRIMA", + // 485 + "\324 L'AUTENTICA PARRUCA CHE UTILIZZ\343 ELVIS QUANDO DIVENT\343 PELATO", + "\220 FARINA MA NON POSSO DIRE MARCHE", + "FORSE IN UN ALTRO MOMENTO. OK?", + "\220 UNA ASCIA BUONISSIMA, CHE PENA CHE NON CI SIA QU\336 VICINO NESSUNA TESTA DI VAMPIRO", + "NO. NEL FONDO SONO UNA BRAVISSIMA PERSONA", + // 490 + "\324 IL DEODORANTE DELLA TACHER -HI,HI,HI!", + "\324 UN MANTELLO ABBASTANZA CARINO", + "", + "COME TUTTI I RAMI DI TUTTI GLI ALBERI DEL MONDO, CIO\324 MICA SPEZIALE", + "OH, INCREDIBILE!- UNA CORDA IN UNA AVVENTURA GRAFICA!", + // 495 + "MI DOMANDO A CHE SERVE...", + "UNA CORDA LEGATA A UNA BRANCA, O UNA BRANCA LEGATA A UNA CORDA, DIPENDE COME SI GUARDI", + "SEMBRA CHE QUESTA GAZZA HA CATIVE INTENZIONI", + "DAI.., NON LA DICO NULLA CHE POI SI ARRABBIA", + "SEMBRA ESSERE MORTA, MA NON \220 VERO - EH?", + // 500 + "NESSUN ANIMALE \220 STATO MALTRATO DURANTE LE RIPRESE DI QUESTO VIDEO-GIOCO", +}, +}; + +const char *_textd[][84] = { +{ + // 0 + "", + "HEY IGOR, HOW IS EVERYTHING GOING?", + "IT'S ALWAYS THE SAME STORY EVERYTIME THERE'S A GOOD GAME ON THE SATELLITE! ANYWAY, WE'LL GO WATCH IT IN THE BAR, AS USUAL", + "IGOR LISTEN CAREFULLY MAN, WE ARE GOING TO START WITH PHASE NUMBER ONE OF MY PLAN TO CONQUER THE WORLD", + "FIRST WE'LL CAPTURE ONE OF THE LIGHTNINGS AND WE'LL DEMAGNETIZE IT WITH OUR INDIFIBULATOR. THE ELECTRICITY WILL COME THROUGH TO MY MONSTER AND HE'LL GET ALIVE!", + // 5 + "IF EVERYTHING WORKS OUT ALL RIGHT, THIS WILL BE THE BEGINNING OF A GREAT ARMY THAT WILL CONQUER THE WORLD FOR ME. HA, HA", + "THE MONSTERS WILL DESTROY ALL THE ARMY'S WEAPONS IN THE WORLD, MEANWHILE, WE'LL BE SAFE IN THE PIECES OF LAND I BOUGHT IN GIBRALTAR", + "WE'LL SET UP A COUP. GOVERNMENTS ALL OVER THE WORLD WILL BE UNCOVERED AND THEIR COUNTRIES WILL SURRENDER TO ME!", + "I'LL BECOME THE FIRST BAD GUY IN HISTORY TO MAKE IT ! HA, HA!", + "I'M NOT TALKING TO YOU, IDIOT! I'M JUST GIVING YOU THE PLOT. ALL RIGHT, EVERYTHING READY?", + // 10 + "THE TIME HAS COME! TURN ON THE ALKALINE BATTERIES' SWITCH", + "DAMNED IT! WHAT WENT WRONG?", + "ARE YOU SURE YOU CHECKED IT ALL AND THERE WAS NOTHING MISSING? YOU'VE BEEN LATELY MESSING AROUND WITH THAT STUFF ABOUT TAXES AND I DON'T KNOW MAN...", + "YOU STUPID THING! YOU FORGOT TO CONNECT THE INDIFIBULATOR. THE SCREWS HAVE PROBABLY MAGNETIZED AND HIS BRAIN BURNT", + "YOU ARE DEAD, YOU ARE DEAD...WAIT TILL I GET YOU!", + // 15 + "SHUT UP! I'LL GET ANOTHER BRAIN TOMORROW AND THEN WE WILL REPEAT THE EXPERIMENT", + "THIS TIME I'LL GET A WOMAN'S BRAIN. SHINY AND NOT USED YET...HA, HA, HA, GOODIE ONE!", + "SO WHAT? I'M THE BAD GUY, RIGHT? SO I CAN BE AS FULL OF MACHISMO AS I WANT, ALL RIGHT? AND IF YOU SAY SOMETHING AGAIN I'LL TURN YOUR HUMP BACK TO FRONT!", + "HA, HA, HA. YOU FELL TOOO!! NOW YOU ARE GOING TO PAY FOR DARING TO FIGHT AGAINST ME! IGOR, TAKE HIM TO THE PENDULUM OF DEATH!", + "AND SO, TELL ME, YOU STUPID HUMAN. HOW COME YOU WANT TO DESTROY ME?", + // 20 + "THAT'S BEAUTIFUL!. IF IT WASN'T BECAUSE IT MAKES ME LAUGH, I WOULD CRY", + "OUR GIRLFRIEND'S BRAIN TO HELP ME CONQUERING THE WORLD", + "YES, SURE! I'LL TAKE IT FROM HER AND GIVE IT TO MY FRUSKYNSTEIN. THE WORLD WILL BE MINE WITH IT, HA, HA", + "WHAT!? YOU'RE DEAD, MAN! I'M GOING TO...YOU REALLY GOT ME ANGRY MAN...COME ON, PREPARE TO DIE!", + "HA, HA, HA. NOT EVEN IN YOUR WILDEST DREAMS!", + // 25 + "YES, ISN'T IT? HA, HA", + "ALL RIGHT, ALL RIGHT. BUT DO IT QUICKLY, OK?", + "PUT THAT CIGARETTE OUT NOW! I CAN'T STAND YOU ANYMORE!", + "AND SO, DOES THAT BREW HAVE THE OPPOSITE EFFECT?", + "WELL, WE'LL SEE THAT", + // 30 + "OK, LET'S SEE IT. IGOR, BRING ME THE CD \"SCRATCHING YOUR NAILS ALL OVER THE BLACKBOARD\"", + "NO WAY. THE GIRL STAYS WITH ME. YOU RE STAYING THERE UNTIL THE PENDULUM CUTS YOU INTO THIN SLICES. HA, HA, HA", + "MAN I'M I JUST BAD... COME ON IGOR, LET'S MAKE THE BREW AND CONQUER THE WORLD", + "WHAT HAPPENS NOW?", + "YES, WHAT?...OH, DAMNED, THE GAME!", + // 35 + "I FORGOT ABOUT THAT. GET THE GIRL AND LET'S GO AND WATCH IT. WE CAN CONQUER THE WORLD LATER", + "THANKS MAN, I WAS THIRSTY", + "OH, THE CRUCIFIX!!...THE CRUCIFIX...!", + "I DIDN'T NOTICE ABOUT THAT BEAUTIFUL CRUCIFIX!", + "LEAVE ME ALONE!, I'M WATCHING THE GAME", + // 40 + "", + "", + "", + "", + "", + // 45 + "", + "", + "", + "", + "", + // 50 + "", + "", + "", + "", + "", + // 55 + "", + "HI BLIND MAN. HOW IT'S GOING?", + "HOW DO YOU KNOW I'M A FOREIGNER?", + "YOU LOOK BLIND. YOU'RE WEARING DARK GLASSES LIKE STEVIE WONDER", + "LOOK, I'M SORRY, I DIDN'T KNOW YOU COULD SEE", + // 60 + "BUT HAVEN'T YOU JUST TOLD ME YOU WEREN'T BLIND", + "BUT IF YOU CAN'T SEE", + "OOOOKAY. SORRY. IN THAT CASE, HI THERE SIGHTLESS PERSON", + "I'M JOHN HACKER. YOU MUST BE ONE OF THOSE CHARACTERS WHO WILL HELP ME OUT IN EXCHANGE FOR AN OBJECT. AREN'T YOU? EH? AREN'T YOU?", + "UUUUM, EXCUSE ME FOR ASKING BLIN... SIGHTLESS PERSON! BUT WHAT SORT OF JOB IS THAT, TO GIVE SICKLES IN EXCHANGE FOR MONEY WHILE YOU PLAY THE ACCORDION?", + // 65 + "AH YES, I SUPPOSE THAT'S TRUE. GOODBYE SIGHTLESS PERSON... BLIND MAN", + "HERE IS THE LARGE AMOUNT OF MONEY YOU ASKED ME FOR", + "YOU BETTER HAVE HAD", + "HI THERE FOREIGNER", + "AND HOW DO YOU KNOW I'M BLIND?", + // 70 + "AND I'M NOT KIDDING YOU BUT YOUR'S ARE LIKE WOODY ALLEN'S", + "NO, I CAN'T SEE", + "AND I'M NOT", + "OH OF COURSE. JUST COS I CAN'T SEE, YOU ACCUSE ME OF BEING BLIND", + "HI THERE FOREIGNER! WHAT ARE YOU DOING IN TRANSYLVANIA?", + // 75 + "THAT'S RIGHT, FOREIGNER. IN EXCHANGE FOR A LARGE SUM OF MONEY I'LL GIVE YOU A SICKLE FOR WHEN YOU MIGHT NEED IT", + "SHHHH, I'M A SICKLES TRADER, THAT'S WHY I HAVE TO HIDE", + "BECAUSE YOU TOLD ME BEFORE, DIDN'T YOU?", + "THANKS FOREIGNER. HERE'S THE SICKLE IN EXCHANGE. YOU'LL FIND IT REALLY USEFUL LATER ON, HONESTLY", + "", + // 80 + "", + "", + "", + "bla, bla, bla." +}, +{ + // 0 + "", + "\250COMO VA TODO, IGOR?", + "\255SIEMPRE QUE HAY UN BUEN PARTIDO EN LA PARABOLICA PASA LO MISMO! EN FIN, IREMOS A VERLO AL BAR COMO DE COSTUMBRE", + "AHORA IGOR, ATIENDE. VAMOS A REALIZAR LA FASE 1 DE MI PLAN PARA CONQUISTAR EL MUNDO", + "PRIMERO CAPTAREMOS UNO DE LOS RAYOS DE LA TORMENTA Y LO DESMAGNETIZAREMOS CON NUESTRO INDIFIBULADOR. LA ELECTRICIDAD PASARA A MI MONSTRUO \255Y LE DARA VIDA! ", + // 5 + "SI TODO SALE BIEN ESTE NO SERA MAS QUE EL PRIMERO DE UN INMENSO EJERCITO QUE CONQUISTARA EL MUNDO PARA MI, JA, JA, JA", + "LOS MONSTRUOS DESTRUIRAN TODAS LAS ARMAS DE TODOS LOS EJERCITOS DEL MUNDO, MIENTRAS NOSOTROS NOS REFUGIAMOS EN UNOS TERRENOS QUE HE COMPRADO EN GIBRALTAR", + "ENTONCES, DAREMOS UN GOLPE DE ESTADO, LOS GOBIERNOS DEL MUNDO NO TENDRAN CON QUE PROTEGERSE, Y PONDRAN SUS PAISES A MIS PIES", + "\255SERE EL PRIMER MALO EN LA HISTORIA QUE LO CONSIGA! \255JUA, JUA, JUA!", + "\255A TI NADA, IDIOTA! ESTOY EXPONIENDO LA TRAMA. BIEN \250ESTA TODO LISTO?", + // 10 + "\255LLEGO EL MOMENTO, ENTONCES! \255DALE AL INTERRUPTOR DE LAS PILAS ALCALINAS! ", + "\255MALDITA SEA! \250QUE ES LO QUE HA PODIDO FALLAR?", + "\250SEGURO QUE LO REVISASTE BIEN Y NO FALTABA NADA? ULTIMAMENTE ESTAS CON ESO DE LA RENTA QUE NO VES UN PIJO A DOS METROS", + "\255IDIOTA, NO HABIAS CONECTADO EL INDIFIBULADOR! LOS TORNILLOS SE HABRAN MAGNETIZADO Y SE LE HABRA QUEMADO EL CEREBRO", + "ESTAS MUERTO, ESTAS MUERTO, COMO TE COJA...", + // 15 + "\255A CALLAR! MA\245ANA IRE A POR OTRO CEREBRO Y REPETIREMOS EL EXPERIMENTO ", + "NO. ESTA VEZ TRAERE UNO DE MUJER, PARA QUE ESTE NUEVECITO Y SIN ESTRENAR. JA, JA, JA, QUE MALISIMA DE CHISTA", + "\250Y QUE? YO SOY EL MALO Y SOY TODO LO MACHISTA QUE QUIERA \250ENTENDIDO? Y COMO ME VUELVAS A RECHISTAR TE TRAGAS LA CHEPA ", + "JA, JA, JA. OTRO QUE HA CAIDO. AHORA VAS A PAGAR TU OSADIA DE QUERER ACABAR CONMIGO. \255IGOR, AL PENDULO DE LA MUERTE!", + "DIME, HUMANO ESTUPIDO, \250COMO ES QUE TE HA DADO POR QUERER DESTRUIRME? ", + // 20 + "\255QUE BONITO!, ME PONDRIA A LLORAR SI NO FUERA PORQUE ME HACE GRACIA", + "A TU NOVIA LA NECESITO PARA QUE ME AYUDE CON SU CEREBRO A CONQUISTAR EL MUNDO", + "\255SI, JA! SE LO QUITARE Y SE LO PONDRE A MI FRUSKYNSTEIN, Y CON EL DOMINARE EL MUNDO, JA, JA, JA", + "\255\250QUE?! \255ESTAS MUERTO, ESTAS MUERTO! TE VOY A... ME HAS TOCADO LAS NARICES, VAMOS. \255PREPARATE A SER MATADO!", + "JA, JA, JA. QUE TE CREES TU ESO", + // 25 + "SI, \250VERDAD? JA, JA, JA ", + "AH, ESTA BIEN, PUEDES FUMARTE EL ULTIMO CIGARRILLO, PERO DEPRISITA", + "APAGA YA ESE CIGARRILLO, ME TIENES HARTO YA", + "Y DIME, \250ESA POCION TIENE EL EFECTO CONTRARIO?", + "ESO YA LO VEREMOS...", + // 30 + "BUENO, A VER SI ES VERDAD. IGOR, TRAE EL COMPACT DISC DE U\245AS ARRASCANDO UNA PIZARRA", + "ESO NI SO\245ARLO. LA CHICA SE QUEDA CONMIGO, Y TU TE QUEDAS AHI HASTA QUE EL PENDULO TE CORTE EL RODAJITAS. JA, JA, JA", + "PERO QUE MALO QUE SOY, VAMOS IGOR, VAMOS A PREPARAR LA POCION Y CONQUISTAR EL MUNDO", + "\250QUE PASA AHORA?", + "SI, \250QUE PASA?... \255ANDA, EL PARTIDO!", + // 35 + "SE ME HABIA OLVIDADO. COGE A LA CHICA Y VAMONOS A VERLE. YA CONQUISTARE EL MUNDO DESPUES", + "GRACIAS MACHO, TENIA SED", + "\255ArgH! \255ESE CRUCIFIJO! \255ESE CRUCIFIJO!...", + "QUE BONITO ES ESE CRUCIFIJO, NO ME HABIA YO FIJADO", + "DEJAME, QUE ESTOY VIENDO EL FUTBOL", + // 40 + "", + "", + "", + "", + "", + // 45 + "", + "", + "", + "", + "", + // 50 + "", + "", + "", + "", + "", + // 55 + "", + "Hola ciego. \250Que tal?", + "\250Como sabes que soy extranjero?", + "Pareces un ciego. Tienes gafas como serafin zubiri, hablas mirando al frente como Stevie Wonder...", + "Bueno, perdona. No sabia que vieses.", + // 60 + "\250Pero no me acabas de decir que no eres ciego?", + "\255Pero si no ves!", + "Vaaaale. Perdona. En ese caso: Hola invidente.", + "Soy John Hacker, y estoy jugando al Drascula. Tu debes ser el tipico personaje que me ayudara a cambio de un objeto. \250A que si? \250Eh? \250A que si?", + "Em... Perdona que te pregunte cieg..\255Invidente!. Pero... \250Que clase de profesion es la tuya, de dar hoces a cambio de dinero, mientras tocas el acordeon?", + // 65 + "Ah, si. Es verdad. Adios invidente...(ciego)", + "Ahi tienes la cuantiosa cantidad de dinero que me pediste.", + "Mas te vale.", + "Hola extranjero.", + "Y tu... \250Como sabes que soy ciego?", + // 70 + "Y tu hablas como el hijo de Bill Cosby y no me meto contigo.", + "No, si no veo.", + "Y no lo soy.", + "\255Oh, claro! Como no veo se me tacha de ciego \250no?", + "\255Hola Extranjero! y \250que haces en Transilvania?", + // 75 + "Correcto extranjero. A cambio de una cuantiosa suma de dinero, te dare una hoz, para cuando te haga falta.", + "Shhhhhh. Soy traficante de hoces, tengo que disimular.", + "Porque me lo has dicho antes \250no?", + "Gracias extranjero. Aqui tienes tu hoz a cambio. Un objeto que te sera muy util algo mas adelante... de verdad.", + "", + // 80 + "", + "", + "", + "\244a, \244a, \244a. que bueno, que bueno." +}, +{ + // 0 + "", + "WIE GEHTS, WIE STEHTS, IGOR ?", + "IMMER WENN auf kabel EIN GUTES SPIEL KOMMT, PASSIERT DAS GLEICHE. NAJA, DANN GUCKEN WIR ES UNS EBEN WIE IMMER IN DER KNEIPE AN", + "JETZT PASS AUF, IGOR. WIR WERDEN JETZT PHASE 1 MEINES WELTEROBERUNGSPLANS STARTEN.", + "Pah, einige GEWITTERBLITZE, die wir MIT dem VIBROXATOR ENTMAGNETISIEREN. und der strom wird meinem MONSTERCHEN leben einhauchen.", + // 5 + "WENN ALLES KLAPPT WIRD ER DER ERSTE SOLDAT EINER RIESIGEN ARMEE SEIN, DIE DIE WELT FueR MICH EROBERN WIRD, HARHARHAR", + "DIE MONSTER WERDEN ALLE WAFFEN IN DER GANZEN WELT VERNICHTEN WaeHREND WIR UNS AUF UNSERE LaeNDEREIEN ZURueCKZIEHEN, DIE ICH UNS AUF HELGOLAND GEKAUFT HABE.", + "DANN WERDEN WIR EINEN STAATSSTREICH MACHEN UND DIE REGIERUNGEN DIESER WELT WERDEN AUFGEBEN UND SICH MIR ZU FueSSEN WERFEN", + "ICH WERDE DER ERSTE BoeSE IN DER GESCHICHTE SEIN, DER DAS SCHAFFT, HUAHUAHUA !", + "GAR NICHTS, IDIOT ! ICH ERZaeHLE DIE HANDLUNG .O.K . IST ALLES FERTIG ?", + // 10 + "ES IST ALSO SOWEIT !DRueCK AUF DEN SCHALTER MIT DEN ALKALI-BATTERIEN !", + "VERFLIXT NOCHMAL ! WAS IST DA SCHIEFGELAUFEN ?", + "BIST DU SICHER, DASS DU ALLES GECHECKT HAST ? SEIT NEUESTEM DENKST DU NUR NOCH AN DEINE EINKOMMENSERKLaeRUNG UND KRIEGST NICHTS MEHR MIT", + "DU IDIOT !DU HAST DEN VIBROXITOR NICHT EINGESCHALTET !JETZT SIND DIE SCHRAUBEN MAGNETISIERT UND IHM WIRD WOHL DAS GEHIRN VERBRANNT SEIN", + "DU BIST EIN TOTER MANN, NA WARTE, WENN ICH DICH KRIEGE...", + // 15 + "HALT DIE KLAPPE !MORGEN HOLE ICH EIN NEUES HIRN UND WIR WIEDERHOLEN DAS EXPERIMENT", + "NEIN, DIESMAL BESORG ICH EIN FRAUENHIRN, DASS NOCH GANZ FRISCH UND UNBENUTZT IST, HAR,HAR,HAR, SUPERJOKE !", + "NA UND ? ICH BIN DER BoeSE UND DER SUPER-MACHO ODER WAS ? UND WENN DU MIR NOCHMAL WIDERSPRICHST KANNST DU DEINEN BUCKEL SCHLUCKEN", + "HARHARHAR,SCHON WIEDER EINER. DU WARST SO DREIST, MICH UMBRINGEN ZU WOLLEN. DAS WIRST DU JETZT BueSSEN. IGOR! ZUM TODESPENDEL MIT IHM !", + "SAG MAL DU DUMMES MENSCHLEIN, WIESO WOLLTEST DU MICH ZERSToeREN ?", + // 20 + "ACH WIE SueSS !ICH KoeNNTE GLATT ANFANGEN ZU HEULEN, WENN ES NICHT SO LUSTIG WaeRE", + "DEINE FREUNDIN BRAUCHE ICH NOCH, DAMIT SIE MIR MIT IHREM HIRN DABEI HILFT, DIE WELT ZU EROBERN", + "JA, HA !ICH WERDE ES RAUSREISSEN UND ES FRUNKSFENSTEIN GEBEN UND DANN WERDE ICH DIE WELT EROBERN,HARHARHAR", + "WAS ? !DU BIST EIN TOTER MANN! ICH WERDE DICH... DU HAST MICH VERaePPELT,GANZ KLAR . MACH DEIN TESTAMENT!", + "HARHARHAR, GLAUB DU DAS MAL ", + // 25 + "JA, WIRKLICH ? HARHARHAR", + "JA, SCHON GUT, RAUCH DIR NOCH EINE LETZTE ZIGARETTE, ABER RUCKZUCK", + "MACH MAL DIE ZIGARETTE AUS. MIR IST SCHON SCHLECHT", + "UND SAG MAL, DIESE MISCHUNG HAT DIE GEGENWIRKUNG ?", + "DAS WERDEN WIR JA MAL SEHEN...", + // 30 + "NA, MAL GUCKEN OB DAS STIMMT, IGOR., BRING MAL DIE CD MIT DEN DEM SOUND VON kratzenden FINGERNaeGELN AUF EINER SCHULTAFEL", + "NICHT IM TRAUM. DAS MaeDCHEN BLEIBT BEI MIR UND DU BLEIBST WO DU BIST, BIS DICH DAS PENDEL IN LECKERE SCHEIBCHEN SCHNEIDET, HARHAR", + "WIE BoeSE ICH DOCH BIN. KOMM IGOR, WIR BEREITEN DIE MISCHUNG ZU UND EROBERN DANN DIE WELT", + "WAS IST DENN JETZT WIEDER LOS ?", + "JA, WAS IST LOS ?...VERDAMMT, DAS SPIEL !", + // 35 + "DAS HAB ICH GLATT VERGESSEN. NIMM DAS MaeDCHEN UND LASS UNS DAS SPIEL ANGUCKEN GEHEN . DIE WELT EROBERN WIR DANACH.", + "DANKE, ALTER, ICH HATTE DURST", + "ARGHH! DAS KRUZIFIX DA ! DAS KRUZIFIX !", + "WIE SCHoeN DAS KRUZIFIX DA IST, HAB ICH GAR NICHT BEMERKT", + "LASS MICH, ICH GUCK DOCH GERADE FUSSBALL", + // 40 + "", + "", + "", + "", + "", + // 45 + "", + "", + "", + "", + "", + // 50 + "", + "", + "", + "", + "", + // 55 + "", + "Hallo Blinder. Wie gehts?", + "Woher weisst Du, dass ich nicht von hier bin ?", + "Du siehst wie ein Blinder aus . Du guckst beim Sprechen immer gerade aus, und dann diese Stevie-Wonder-Brille....", + "O.k,entschuldige. Ich dachte, du kannst nichts sehen", + // 60 + "Aber hast Du mir nicht gerade gesagt, dass Du NICHT blind bist?", + "Ich denke, Du siehst nichts ?", + "Okaaay,okaay! Tut mir leid. Also wenn das so ist: Sehkranker ", + "Ich bin Heinz Hacker und spiele Drascula . Du bist bestimmt derjenige, der mir hilft und dafuer irgendwas haben will. Stimmts? Hae? Hab ich recht!?", + "aeh....Entschuldige die Frage, Blind-Sehkranker!Aber...Was hast Du fuer einen komischen Beruf, dass Du Sicheln verkaufst und dabei Akkordeon spielst!", + // 65 + "Ach, klar, stimmt. Auf Wiedersehen Sehkranker...(Blinder)", + "Hier hast Du den Wahnsinnsbatzen Geld, um den Du mich gebeten hast", + "Das ist auch besser so!", + "Hallo Fremder!", + "Und Du...Woher willst Du wissen, dass ich blind bin?", + // 70 + "Und Du bist der Sohn von Bill Cosby und ich werde mich nicht mit Dir anlegen", + "Nein, ich seh doch nichts!", + "Und ich bin es nicht", + "Na super! Nur weil ich nichts sehe bin ich direkt ein Blinder, oder was?", + "Hallo Fremder! Und was machst Du in Transylvanien?", + // 75 + "Richtig, Fremder. Gegen einen Wahnsinnsbatzen Geld bekommst Du von mir eine Sichel damit Du eine hast, wenn Du eine brauchst.", + "Psssssst. Ich bin Sichel-Dealer, ich muss unentdeckt bleiben ", + "Warum hast Du mir das nicht vorher gesagt ?", + "Danke, Fremder. Hier hast du dafuer Deine Sichel. Sie wird Dir nachher noch nuetzlich sein...glaub mir !", + "", + // 80 + "", + "", + "", + "bla, bla, bla." +}, +{ + // 0 + "", + "COMMENT VA TOUT, IGOR?", + "C'EST TOUJOURS LA M\322ME CHOSE QUAND IL Y A UN BON MATCH \267 LA PARABOLIQUE! ENFIN, ALLONS LE VOIR AU BAR, COMME D'HABITUDE", + "MAINTENANT, COUTE IGOR. NOUS ALLONS RALISER LA PHASE 1 DE MON PLAN POUR CONQURIR LE MONDE", + "D'ABORD, ON SAISIRA L'UNE DES FOUDRES DE L'ORAGE ET ON LA DMAGNTISERAIT AVEC l'INDIFUBULATEUR. LA COURANTE PASSERA DANS MON MONSTRE ET LUI DONNERA LA VIE!", + // 5 + "SI TOUT VA BIEN CELUI-L\267 NE SERA QUE LE PREMIER D'UNE IMMENSE ARME QUE CONQURRA LE MONDE POUR MOI, HA! HA! HA! ", + "LES MONSTRES VONT ANANTIR TOUTES LES ARMES DE TOUTES LES ARMES DU MONDE, TANDIS QUE NOUS NOUS RFUGIONS DANS LES TERRAINS QUE J'AI ACHET \267 GIBRALTAR", + "ALORS, ON DONNERA UN COUP D'TAT. LES GOUVERNEMENTS DU MONDE N'AURONT PAS DE PROTECTION ET SES PAYS SERONT \267 MES PIEDS", + "JE SERAI LE PREMIER MALIN DE L'HISTOIRE \267 Y AVOIR RUSSI! -HOUA! HOUA! HOUA!", + "POUR TOI RIEN, IDIOT! JE PRSENTE LA TRAME. BIEN, TOUT EST PR\322T? ", + // 10 + "LE MOMENT EST ARRIV\220, ALORS! -APPUIE DONC SUR L'INTERRUPTEUR DES BATTERIES ALCALINES! ", + "H\220LAS! QU'EST-CE QUE N'A PAS MARCH\220?", + "C'EST S\352R QUE TU L'AS BIEN R\220VIS\220 ET IL NE MANQUAIT RIEN? DERNI\324REMENT AVEC CETTE HISTOIRE DE LA RENTE TU N'Y VOIS GOUTTE", + "IDIOT! TU N'AVAIS PAS CONNECT\220 L'INFIBULATEUR! LES VIS SE SERONT MAGN\220TIS\220ES ET SA CERVELLE AURA BR\352L\220E", + "TU ES MORT, TU ES MORT, SI JE T'ATTRAPE...", + // 15 + "TAIS-TOI! DEMAIN J'AURAI UNE AUTRE CERVELLE ET ON FERA L'ESSAI \267 NOUVEAU", + "NON, CETTE FOIS J'APPORTERAI UNE DE FEMME POUR QU'ELLE SOIT TOUTE NEUVE ET DE PREMI\324RE MAIN. HA! HA! HA! QUE MALIN DE XISTE", + "ET QUOI? JE SUIS LE MALIN ET TOUT LE SEXISTE QUE JE D\220SIRE, C'EST ENTENDU? SI TU ME R\220PLIQUES ENCORE JE TE FAIS ENGLOUTIR TA BOSSE", + "HA! HA! HA!. UN AUTRE QUI S'EST LAISS\220 PRENDRE. MAINTENANT TU PAIERAS CHER TON AUDACE DE VOULOIR EN FINIR AVEC MOI. -IGOR, AU PENDULE DE LA MORT!", + "DIS-MOI, HUMAIN STUPIDE, POURQUOI TU AS PENS\220 ME D\220TRUIRE? ", + // 20 + "QUE C'EST BEAU! JE SANGLOTERAIS SI CE N'ETAIT PAS DR\342LE", + "J'AI BESOIN DE TA FIANC\220E POUR QU'ELLE M'AIDE \267 CONQU\220RIR LE MONDE AVEC SA CERVELLE", + "OUI, HA! JE LA LUI ARRACHERAI ET L'INSTALLERAI SUR MON FRUSKYNSTEIN, ET AVEC LUI JE VAIS MA\327TRISER LE MONDE, HA! HA! HA!", + "QUOI?! -TU ES MORT, TU ES MORT! JE VAIS TE... TU M'AS CASS\220 LE NEZ, ALLONS, -APPR\322TE-TOI \267 \322TRE TU\220!", + "HA! HA! HA! C'EST-CE QUE TU CROIS", + // 25 + "OUI, N'EST-CE PAS? HA! HA! HA!", + "AH, C'EST BIEN! TU PEUX FUMER LA DERNI\324RE CIGARETTE, MAIS D\220P\322CHE-TOI!", + "\220TEINS D\220J\267 CETTE CIGARETTE, J'EN A RAS LE BOL!", + "ET DIS-MOIS, CETTE POTION, A-T-ELLE L'EFFET CONTRAIRE?", + "ON VERRA \200A...", + // 30 + "EH BIEN, ON VERRA SI C'EST VRAI. IGOR, APPORTE LE COMPACT DISC D'ONGLES GRATTANT UN TABLEAU", + "N'Y PENSES PAS. LA FILLE RESTE AVEC MOI, ET TOI TU RESTERAS L\267 JUSQU'\267 QUE LA PENDULE TE COUPE EN PETITES TRANCHES. HA! HA! HA!", + "MAIS QUE JE SUIS MALIN. ON Y VA, IGOR, ALLONS PR\220PARER LA POTION ET CONQU\220RIR LE MONDE", + "QU'Y A-T-IL MAINTENANT?", + "OUI, QU'Y A-T-IL?... -TIENS, LE MATCH!", + // 35 + "JE L'AVAIS OUBLI\220. PRENDS LA FILLE ET ALLONS LE VOIR. J'IRAI CONQU\220RIR LE MONDE PLUS TARD", + "MERCI MON VIEUX, J'AVAIS SOIF", + "ArgH! CE CRUCIFIX! -CE CRUCIFIX!...", + "C'EST BEAU CE CRUCIFIX, JE NE M'AVAIS PAS RENDU COMPTE", + "FICHE-MOI LA PAIX! JE REGARDE LE FOOT-BALL", + // 40 + "", + "", + "", + "", + "", + // 45 + "", + "", + "", + "", + "", + // 50 + "", + "", + "", + "", + "", + // 55 + "", + "BONJOUR, L'AVEUGLE. A VA?", + "POURQUOI TU SAIS QUE JE SUIS UN TRANGER?", + "TU PARAT UN AVEUGLE. TU AS DES LUNETTES COMME SERAFIN ZUBIRI ET TU PARLES EN REGARDANT DEVANT TOI, COMME STEVIE WONDER...", + "BON, EXCUSE-MOI. JE NE SAVAIS PAS QUE TU PUISSES VOIR.", + // 60 + "MAIS, TU NE VIENS PAS DE ME DIRE QUE TU N'EST PAS AVEUGLE?", + "MAIS TU NE VOIS PAS!", + "A VA, A VA.... PARDONNE-MOI. DANS CE CAS-L: BONJOUR AVEUGLE.", + "JE SUIS JOHN HACQUER ET JE JOUE AU DRASCULA. TU ES SREMENT LE TYPIQUE PERSONNAGE QUI VA M'AIDER EN TROC D'UN OBJET. D'ACCORD? H? D'ACCORD?", + "EUH... AVEUGLE, UNE QUESTION! MAIS... QUEL GENRE DE MTIER C'EST LE TIEN? CELUI D'CHANGER DE FAUCILLES CONTRE DE L'ARGENT EN JOUANT DE L'ACCORDON?", + // 65 + "AH, OUI! C'EST VRAI. AU REVOIR AVEUGLE...", + "VOIL LA GROSSE SOMME D'ARGENT QUE TU M'AS DEMANDE.", + "IL TE VAUX MIEUX.", + "BONJOUR, TRANGER!", + "ET TOI... COMMENT TU SAIS QUE JE SUIS UN AVEUGLE?", + // 70 + "ET TOI TU PARLES COMME LE FILS DE BILL COSBY ET MOI, JE NE T'EMBTE PAS.", + "NON, SI JE NE VOIS PAS.", + "ET MOI, JE NE LE SUIS PAS.", + "OH, BIEN SR! COMME JE NE VOIS PAS ON ME TCHE D'AVEUGLE, N'EST-CE PAS", + "BONJOUR, TRANGER! ET QU'EST-CE QUE TU FAIS EN TRANSYLVANIE?", + // 75 + "C'EST CORRECT, TRANGER. POUR UNE GROSSE SOMME D'ARGENT, JE TE DONNERAI UNE FAUCILLE, POUR QUAND TU EN AURAS BESOIN.", + "CHUT! JE SUIS UN TRAFICANT DE FAUCILLES, JE DOIS ME CACHER.", + "PARCE QUE TU ME L'AS DIT AVANT, N'EST-CE PAS?", + "MERCI TRANGER. VOIL TA FAUCILLE EN CHANGE. UNE CHOSE QUI SERA TRS PRATIQUE POUR TOI, PLUS TARD... VRAIMENT.", + "", + // 80 + "", + "", + "", + "bla, bla, bla." +}, +{ + // 0 + "", + "COME VA, IGOR?", + "-SEMPRE CHE C' UNA BUONA PARTITA SUCCEDE LO STESSO! BENE, ANDREMO A GUARDARLA AL BAR, COME SEMPRE", + "ADESSO IGOR, ASCOLTA. ANDIAMO A REALIZZARE LA FASE 1 DEL MIO PROGETTO PER CONQUISTARE IL MONDO", + "ATTRARREMO UN FULMINo DELLA TEMPESTA E LO DISMAGNETIZZAREMO CON L'INDIFIBULATORE. LA ELETTRICIT\265 ANDR\265 AL MIO MOSTRO E, GLI DAR\265 VITA!", + // 5 + "SE TUTTO VA BENE QUESTO SAR\265 SOLTANTO IL PRIMO DI UN'IMMENSO ESERCITO CHE CONQUISTAR\265 IL MONDO PER ME, HA,HA,HA", + "I MOSTRI DISTRUGGERANNO TUTTE LE ARME DI TUTTI GLI ESERCITI DEL MONDO, MENTRE NOI CI RIFURGIAREMO nei miei terreni A GIBRALTAR", + "POI, FAREMO UN GOLPE, E I GOVERNI DEL MONDO NON AVRANNO PER DIFENDERSI, E AVR\220 LE LORO NAZIONI SOTTO I MIEI PIEDI", + "SAR\220 IL PRIMO CATTIVO DELLA STORIA CHE RIESCA!", + "A TE NIENTE, SCIOCCO! ST\220 SPORRENDO LA TRAMA. BENE, TUTTO A POSTO?", + // 10 + "-\220 IL MOMENTO! -PREMI L'INTERRUTTORE DELLE BATTERIE ALCALINE!", + "- PORCA MISERIA! -CHE COSA NON \220 ANDATA BENE?", + "SEI SICURO DI AVERLO CONTROLLATO BENE? E NO MANCABA NIENTE? ULTIMAMENTE PER I REDDITI NON VEDI UNA MADONNA", + "IMBECILE!, NON HAI CONETTATO L'INDIFIBULATORE! LE VITI SARANO MAGNETIZZATE E ADESSO AVR\265 IL CERVELLO BRUCIATO", + "SEI MORTO, SEI MORTO, COME TI PRENDA..", + // 15 + "STAI ZITTO! DOMANI CERCHER\220 UN ALTRO CERVELLO E RIPETEREMO L'ESPERIMENTO", + "NO. QUESTA VOLTA NE PORTER\220 UNO DI DONNA, COS\326 SAR\265 NUOVISSIMO, MAI UTILIZZATO. HA, HA HA, CHE BARZELLETA FALLITA", + "E? SONO IL CATTIVO DELLA STORIA, E SONO MASCHILISTA SE VOGLIO, CAPITO? E NON LAMENTARTI UNA ALTRA VOLTA PERCHE MANGERAI LA TUA GOBBA", + "HA,HA,HA. UN ALTRO PRESSO. ADESSO PAGHERAI MOLTO CARO QUESTA OFFESA, LA TUA INTENZIONE DI FINIRE CON ME. -IGOR, AL PENDOLO DELLA MORTE!", + "DIMI, STUPIDO UMANO, COME MAI HAI PENSATO A DISTRUGGERMI?", + // 20 + "-CHE BELLO!, MI METTEREI A PIANGERE SE NON FOSSE PERCHE MI FA RIDERE", + "HO BISOGNO DELLA TUA RAGAZZA, IL SUO CERVELLO MI AIUTER\265 A CONQUISTARE IL MONDO", + "-SI, HA ! VADO A TOGLIARSILO PER METTEGLIELO AL MIO FRUSKYNSTEIN, E CON LUI DOMINER\220 IL MONDO, HA,HA,HA", + "CHE?! - SEI MORTO, SEI MORTO! TI VADO A...MI HAI FATTO ARRABBIARE. SEI PRONTO PER MORIRE?", + "HA,HA,HA. TU CREDI?", + // 25 + "SI, VERO? HA,HA,HA", + "VA BENE, PUOI FUMARE LA ULTIMA SIGARETTA, MA SBRIGATI", + "SONO STUFFO, BUTTA GI\265 LA SIGARETTA!", + "E DIMI, QUELLA POZIONE HA L'EFFETTO INVERSO?", + "QUELLO SI VEDR\265 ..", + // 30 + "BENE, SAR\265 VERO?. IGOR, DAMI IL COMPACT DISC DI UNGHIE GRAFFIANDO UNA LAVAGNA", + "NEANCHE SOGNARLO. LA RAGAZZA RIMANE CON ME, E TU RIMANI LI FINO CHE IL PENDOLO TI TAGLII IN FETTE. HA,HA,HA", + "MA COME SONO CATTIVO, ANDIAMO IGOR, ANDIAMO A FARE LA POZIONE, ANDIAMO A CONQUISTARE IL MONDO", + "ADESSO CHE SUCCEDE?", + "SI, CHE C'E?....LA PARTITA!", + // 35 + "L'AVEVO DIMENTICATA. PRENDI LA RAGAZZA E ANDIAMO A GUARDARE IL CALCIO. CONQUISTER\220 IL MONDO DOPO", + "GRAZIE AMICO, AVEVO SETE", + "-ARGH! -QUEL CROCIFISSO! -QUEL CROCIFISSO!...", + "QUE BELLO \220 QUEL CROCIFISSO, NON MI ERO ACCORTO", + "LASCIAMI, ST\220 GUARDANDO LA PARTITA", + // 40 + "", + "", + "", + "", + "", + // 45 + "", + "", + "", + "", + "", + // 50 + "", + "", + "", + "", + "", + // 55 + "", + "Ciao cieco. Come va?.", + "Come sai che sono straniero.", + "Sembri un cieco. Hai gli occhiali come il cieco di Sorrento, parli guardando all'infinito come Stevie Wonder..", + "Bene, scusa. Non sapevo che non vedessi", + // 60 + "Ma non mi hai appena detto che non sei cieco?.", + "- Ma se non vedi!.", + "Beeeene. Scusa. Allora: Ciao : non vedente", + "Sono John Hacker, st giocando al Drascula. Tu devi proprio essere il tipico personaggio che mi aiuter in cambio di un oggeto. Vero...?", + "Ma... Scusa ciec..- non vedente! .Ma.. . che tipo di mestiere il tuo, di dare falci per soldi, mentre suoni la fisarmonica?.", + // 65 + "Ah, si. \324 vero. Ciao non vedente....(cieco)", + "Ecco la abbondante quantit di soldi che mi avevi chiesto.", + "Mi raccomando", + "Ciao straniero.", + "E tu... Come sai che sono cieco?", + // 70 + "E tu parli come il figlio di Bill Cosby e non ti offendo.", + "No, se non vedo.", + "E non lo sono.", + "-Oh, certo!. Come non vedo mi chiamano cieco, no?.", + "-Ciao Straniero! e cosa fai in Transilvania?", + // 75 + "Corretto straniero. Per una abbondante quantit di soldi, ti dar in cambio una falce, per quando ne avrai bisogno.", + "Shhhhhh. Sono trafficante di falci, devo proprio dissimulare.", + "Perche mi lo hai detto prima, no?", + "Grazie straniero. Ecco la tua falce. Un oggeto che ti sar molto utile pi avanti...... davvero.", + "", + // 80 + "", + "", + "", + "bla, bla, bla." +}, +}; + +const char *_textb[][15] = { +{ + // 0 + "", + "I'M HERE, DRINKING", + "THEY ARE ALL DEAD, THANKS. BURPP...", + "YES, SURE...", + "SHE FEELS ATTRACTED TO UNCLE DESIDERIO", + // 5 + "EVEN BETTER, UNCLE DESIDERIO'S DEAD BODY", + "MY UNCLE. HE WENT TO CASTLE AND NEVER CAME BACK", + "WELL, HE CAME BACK JUST A LITTLE. IF ONLY VON BRAUN HADN'T SCREWED THINGS UP MY UNCLE WOULD BE DRINKING WITH US NOW", + "NOTHING...", + "WELL, YES !. THAT MEAN MAN HAS TERRIFIED US ALL", + // 10 + "FROM TIME TO TIME HE COMES DOWN TO THE VILLAGE AND TAKES SOMEONE WITH HIM.", + "A LITTLE WHILE AFTER WE JUST A FEW FOUND BODY PARTS. I THINK HE IS DEALING WITH ORGANS OR SOMETHING LIKE THAT", + "THE ONLY PERSON IN THE VILLAGE WHO KNOWS HOW TO END UP WITH DRASCULA IS A CULTIVATED PERSON", + "HE LIVES IN A LOG-CABIN OUT OF TOWN, EVER SINCE DRASCULA BEAT HIM UP", + "HE IS THE ONLY ONE WHO COULD HELP US WITH DRASCULA, AND HE DOESN'T WANT TO HEAR ABOUT US. HOW DO YOU LIKE THAT?", +}, +{ + // 0 + "", + "AQUI, BEBIENDO", + "MUERTOS TODOS. GRACIAS. BURRP ", + "SI, NO VEAS... ", + "ESTA POR EL TIO DESIDERIO", + // 5 + "Y ESTA OTRA, POR EL CADAVER DEL TIO DESIDERIO", + "MI TIO. FUE AL CASTILLO Y NO VOLVIO", + "BUENO, VOLVIO PERO POCO. SI EL VON BRAUN NO HUBIESE METIDO LA PATA MI TIO ESTARIA AQUI BEBIENDO", + "NADA... ", + "\255BUENO, SI! ESE DESALMADO NOS TIENE ATEMORIZADOS A TODOS", + // 10 + "DE VEZ EN CUANDO BAJA AL PUEBLO Y SE LLEVA A ALGUIEN", + "POCO DESPUES SOLO ENCONTRAMOS UNOS POCOS RESTOS. CREO QUE ESTA TRAFICANDO CON ORGANOS, O ALGO ASI", + "EL UNICO DEL PUEBLO QUE SSABE COMO ACABAR CON DRASCULA TIENE ESTUDIOS", + "DESDE QUE LE DERROTO DRASCULA SE HA APARTADO A UNA CABA\245A EN LAS AFUERAS DEL PUEBLO", + "ES EL UNICO QUE PODRIA AYUDARNOS A ACABAR CON DRASCULA, Y NO QUIERE SABER NADA DE NOSOTROS. \250QUE TE PARECE A TI?", +}, +{ + // 0 + "", + "HIER, BEI EINEM GUTEN TROPFEN", + "ALLE TOT. VIELEN DANK. RueLPS !", + "YO, STIMMT...", + "DIE HIER IST FueR ONKEL DESIDERIUS", + // 5 + "UND DIESE HIER FueR DIE LEICHE VON ONKEL DESIDERIUS", + "MEIN ONKEL. ER GING ZUM SCHLOSS UND KAM NICHT ZURueCK", + "NAJA, ER KAM NUR IN RESTEN ZURueCK. WENN VON BRAUN SICH NICHT VERTAN HaeTTE, WueRDE ER JETZT MIT UNS EINEN HEBEN", + "NICHTS...", + "JA STIMMT! DIESER SCHURKE JAGT UNS ALLEN EINE RIESENANGST EIN", + // 10 + "AB UND ZU GEHT ER RUNTER INS DORF UND HOLT SICH JEMANDEN", + "KURZ DANACH HABEN WIR NUR NOCH RESTE GEFUNDEN, ICH GLAUBE ER HANDELT MIT ORGANEN ODER SO", + "DER EINZIGE, DER MIT DRASCULA FERTIGWERDEN KANN, WAR AN DER UNI ", + "SEITDEM DRASCULA IHN BESIEGT HAT, LEBT ER IN EINER EINSAMEN HueTTE AUSSERHALB DES DORFES", + " ER IST DER EINZIGE, DER DRASCULA ERLEDIGEN KoeNNTE UND WILL NICHTS VON UNS WISSEN. WAS HaeLST DU DAVON ?", +}, +{ + // 0 + "", + "ICI, EN BUVANT", + "TOUS MORTS. MERCI. BOURRP", + "OUI, VRAIMENT...", + "CELLE-CI POUR L'ONCLE DSIR", + // 5 + "ET CELLE-L\267 POUR LE CADAVRE D'ONCLE DSIR", + "MON ONCLE EST ALL AU CH\266TEAU ET N'EST PAS ENCORE REVENU", + "BON, IL EST REVENU MAIS POUR PEU DE TEMPS. SI VON BRAUN N'AURAIT FAIT UN IMPAIR, MON ONCLE DSIR SERAIT ICI EN BUVANT", + "RIEN... ", + "EH OUI! CE MALIN NOUS A INTIMIDS \267 TOUS", + // 10 + "DE FOIS IL DESCEND SUR LE VILLAGE ET ENLEVE QUELQU'UN", + "UN PEU PLUS TARD ON NE TROUVE QUE QUELQUES RESTES. JE PENSE QU'IL FAIT DU TRAFIQUE D'ORGANES, OU QUELQUE CHOSE PAREILLE", + "LE SEUL DU VILLAGE QUI SAIT COMMENT FINIR AVEC DRASCULA IL A DES \220TUDES", + "DEPUIS QUE DRASCULA L'A VAINCU, IL S'EST RETIR\220 DANS UNE CABANE, EN DEHORS DU VILLAGE", + "C'EST LE SEUL QUI POURRAIT NOUS AIDER \267 FINIR AVEC DRASCULA ET LUI NE VEUX RIEN SAVOIR DE NOUS. QU'EN PENSES-TUI?", +}, +{ + // 0 + "", + "QU\326, BEVENDO", + "MORTI TUTTI. GRAZIE. BURRP", + "SII, CERTO, SICURO..", + "QUESTA PER IL ZIO PEPPINO", + // 5 + "E QUEST'ALTRA, PER IL CADAVERE DEL ZIO PEPPINO", + "MIO ZIO. FU ANDATO AL CASTELLO, E NON MAI TORNATO", + "EEEHH, TORN\220, MA PER POCO TEMPO. SE IL VON BRAUN NON AVESSE SBAGLIATO, MIO ZIO SAREBBE QU\326 BEVENDO", + "NIENTE..", + "EEH,SI! QUEL MALVAGIO CI HA INTIMORATI", + // 10 + "A VOLTE SCENDE AL PAESE E QUANDO SE NE VA SI PORTA QUALCUNO", + "UN P\220 DOPO SOLTANTO TROVIAMO QUALQUE RESTO. CREDO CHE TRAFFICA ORGANI O QUALCOSA DEL GENERE", + "L'UNICO DEL PAESE CHE SA COME FINIRE CON DRASCULA \220 UNO CHE HA STUDIATO", + "DA CHE FU SCONFFIGIATO DA DRASCULA SI \220 ALLONTANATO A UNA CAPANNA FUORI DEL PAESE", + "L'UNICO CHE POTREBBE AIUTARCI A VINCERE DRASCULA, E NON VUOLE SAPERE NIENTE DI NOI. COSA PENSI?", +}, +}; + +const char *_textbj[][29] = { +{ + // 0 + "", + "ARE YOU ALL RIGHT? HEY, COME ON, WAKE UP! CAN YOU HEAR ME? ARE YOU DEAD?", + "NO, MY NAME IS BILLIE JEAN, BUT YOU CAN CALL ME B.J. IT'S SHORTER", + "HA, HA...! THAT WAS A GOOD ONE!", + "WELL, JHONNY. YOU SEE, I WAS HERE JUST READY TO GO TO BED WHEN I HEARD THIS STRONG NOISE DOWN THE CORRIDOR", + // 5 + "I DIDN'T PAY ATTENTION AT FIRST, BUT AFTER ABOUT TWO HOURS OR SO I COULDN'T SLEEP AND WENT OUT FOR A WALK", + "AS I OPENED THE DOOR I WAS SHOCKED TO FIND YOU THERE, LYING ON THE FLOOR. I THOUGHT YOU WERE DEAD, I SWEAR... HA, HA, SILLY BILLY", + "I WAS GOING TO GIVE YOU THE KISS OF LIFE BUT IT WASN'T NECESSARY BECAUSE YOU STARTED TO TALK", + "YOU SAID SOMETHING ABOUT A SCARECROW. I WAS VERY SCARED, YOU KNOW. IT'S A REAL SHOCK WHEN A DEAD PERSON STARTS TALKING RIGHT?", + "ISN'T THAT RIGHT? WELL, THEN I MANAGED TO BRING YOU TO MY ROOM THE BEST WAY I COULD. I PUT YOU IN BED... AND THAT'S ALL... HA, HA, HA...", + // 10 + "OH, NO...! IT WASN'T THE HIT, HA, HA. I JUST STEEPED ON YOUR GLASSES BY ACCIDENT", + "YOU REALLY LOOK GOOD WITH THOSE GLASSES. I KNOW HE'S NOT FERNANDO LANCHA, BUT I FIND HIM ATTRACTIVE...", + "YES, YES, I DO... COME ON, HOLD ME AND KISS ME TIGHT", + "OH JHONNY, HONEY, THANKS GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND THEN HE'S GONE DOWNSTAIRS TO SEE THE FOOTBALL GAME", + "YES, IT'S TRUE. PLEASE, SET ME FREE", + // 15 + "NO, I'M SORRY. I USED THEM ALL IN THE TOWER WHEN I WAS TRYING TO LIBERATE WHILE YOU LET ME DOWN", + "JOHNNY, IS THAT YOU? OH, GOD, GREAT! I KNEW YOU'D COME!", + "YOU DON'T EVEN KNOW HOW MUCH THAT EVIL DRASCULA HAS MADE ME SUFFER", + "FIRSTLY HE BROUGHT ME FLYING OVER HER AND THEN PUT ME IN THIS DISGUSTING ROOM WITHOUT EVEN A MIRROR OR ANYTHING", + "I'M TELLING YOU! AND THE WORSE PART IS THAT HE DIDN'T EVEN APOLOGIZE, NOT EVEN ONCE", + // 20 + "JHONNY HONEY, WHERE ARE YOU?", + "I'M READY TO LEAVE DEAR", + "WAIT, I'M GOING TO TAKE A LOOK... NO DARLING, I'M SORRY", + "THERE YOU GO...", + "\"DEAR JOHNNY\"", + // 25 + "I'LL NEVER FORGET YOU BUT I'VE REALIZED THAT THIS JUST COULDN'T WORK OUT RIGHT. TO BE HONEST, I'LL TELL YOU THAT THERE IS ANOTHER MAN. HE'S TALLER, STRONGER", + "AND HE HAS ALSO RESCUED ME FROM DRASCULA. HE HAS ASKED ME TO MARRY HIM, AND I HAVE ACCEPTED", + "BYE JHONNY. PLEASE DON'T TRY TO FIND SOME KIND OF EXPLANATION. YOU KNOW LOVE IS BLIND AND HAS ITS OWN WAYS", + "I HOPE THERE WON'T BE HARD FEELINGS BETWEEN US. REMEMBER THAT I STILL LOVE YOU, BUT ONLY AS A FRIEND", +}, +{ + // 0 + "", + "\250ESTA USTED BIEN? OIGA, DESPIERTE. \250ME OYE? \250ESTA USTED MUERTO?", + "NO, MI NOMBRE ES BILLIE JEAN, PERO PUEDES LLAMARME B.J. ES MAS CORTO", + "\255JI, JI! \255QUE BUENO!", + "PUES VERAS JOHNY, YO ESTABA AQUI, DISPUESTA A ACOSTARME, CUANDO OI UN FUERTE GOLPE EN EL PASILLO", + // 5 + "AL PRINCIPIO NO LE DI MUCHA IMPORTANCIA, PERO A LAS DOS HORAS MAS O MENOS DESCUBRI QUE NO PODIA DORMIR Y DECIDI SALIR A DAR UN PASEO", + "Y CUAL NO SERIA MI SORPRESA CUANDO ABRI LA PUERTA Y TE ENCONTRE AHI, EN EL SUELO TIRADO. TE LO JURO QUE PENSE QUE HABIAS MUERTO, JE, JE, TONTA DE MI", + "TE FUI A HACER EL BOCA A BOCA, PERO NO FUE NECESARIO PORQUE EMPEZASTE A HABLAR", + "DECIAS NO SE QUE DE UN ESPANTAPAJAROS. YO ME LLEVE UN SUSTO MUY GORDO, PORQUE CUANDO UN MUERTO SE PONE A HABLAR ES UNA IMPRESION MUY FUERTE, \250NO CREES?", + "\250VERDAD QUE SI? BUENO, PUES COMO PUDE, CARGUE CONTIGO Y TE TRAJE A MI HABITACION. TE PUSE SOBRE LA CAMA... Y ESO ES TODO. JI, JI,JI", + // 10 + "OH, NO HA SIDO EL GOLPE, JI, JI. ES QUE SIN QUERER PISE TUS GAFAS", + "\255HAY QUE VER QUE BIEN LE SIENTAN LAS GAFAS! YA SE QUE NO ES FERNANDO LANCHA, PERO TIENE UN NO SE QUE QUE QUE SE YO", + "SI, SI, QUIERO... VAMOS, ABRAZAME FUERTE, BESAME MUCHO...", + "OH JOHNY, CARI\245O, MENOS MAL QUE HAS VENIDO. ESE DESALMADO DE DRASCULA ME HA ATADO A LA CAMA Y LUEGO SE HA IDO ABAJO A VER EL PARTIDO", + "SI, ES VERDAD. LIBERAME ", + // 15 + "NO, LO SIENTO. GASTE TODAS EN LA MAZMORRA INTENTANDO LIBERARME MIENTRAS TU ME DEJABAS TIRADA", + "JOHNY \250ERES TU? \255QUE ALEGRIA! \255SABIA QUE VENDRIAS!", + "NO SABES CUANTO ME HA HECHO SUFRIR ESE DESALMADO DE DRASCULA", + "PRIMERO ME TRAJO VOLANDO HASTA AQUI Y LUEGO ME ENCERRO EN ESTE CUARTUCHO, SIN ESPEJO NI NADA", + "COMO LO OYES. Y LO PEOR ES QUE NO PIDIO PERDON NI UNA SOLA VEZ", + // 20 + "JOHNY, QUERIDO. \250DONDE ESTAS?", + "ESTOY LISTA PARA QUE ME SAQUES DE AQUI", + "ESPERA QUE VOY A MIRAR... NO CARI\245O, LO SIENTO", + "TOMA...", + "\"QUERIDO JOHNY:", + // 25 + "NUNCA PODRE OLVIDARTE, PERO ME HE DADO CUENTA DE QUE LO NUESTRO NO FUNCIONARIA. VOY A SER SINCERA CONTIGO: HAY OTRO HOMBRE; MAS ALTO, MAS FUERTE...", + "Y ADEMAS ME HA RESCATADO DE LAS MANOS DE DRASCULA. ME HA PEDIDO EN MATRIMONIO, Y YO HE ACEPTADO", + "ADIOS, JOHNY. NO INTENTES DARLE UNA EXPLICACION, PORQUE EL AMOR ES CIEGO Y NO ATIENDE A RAZONES", + "ESPERO QUE NO ME GUARDES RENCOR, Y RECUERDA QUE TE SIGO QUERIENDO, AUNQUE SOLO COMO AMIGO\"", +}, +{ + // 0 + "", + "HALLO, ALLES KLAR ?HEY, WACHEN SIE AUF. HoeREN SIE MICH ? SIND SIE TOT ?", + "NEIN, ICH HEISSE BILLIE JEAN., ABER DU KANNST MICH B.J. NENNEN, DAS IST KueRZER", + "HI,HI! SUPERGUT !", + "JA STELL DIR VOR, HEINZ, ICH WOLLTE MICH HIER GERADE HINLEGEN, ALS ICH EINEN LAUTEN KNALL IM FLUR HoeRTE", + // 5 + "ANFANGS HAB ICH NICHT SO DRAUF GEACHTET, ABER NACHDEM ICH 2 STUNDEN LANG NICHT SCHLAFEN KONNTE, GING ICH RUNTER, UM SPAZIERENZUGEHEN", + "ICH WAR NATueRLICH BAFF, ALS ICH DICH VOR der tuer LIEGEN SAH. ICH HABE ECHT GEDACHT,DASS DU TOT BIST, HEHE, WIE bloed" + "ICH WOLLTE GERADE MUND-ZU-MUND BEATMUNG MACHEN, ABER DANN FINGST DU JA AN ZU REDEN", + "DU FASELTEST WAS VON NER VOGELSCHEUCHE UND ICH Hatte ganz schoen schiss,WEIL sprechende tote schon echt UNHEIMLICH sind?", + "NICHT WAHR ?NAJA,ICH HABE DICH DANN AUFGEHOBEN UND IN MEIN ZIMMER GETRAGEN UND AUF MEIN BETT GELEGT.... WEITER NICHTS. HI,HI,HI", + // 10 + "ACH NEIN, ES WAR NICHT DIE BEULE, HIHI, ICH BIN VERSEHENTLICH AUF DEINE BRILLE GETRETEN ", + "MAN MUSS SICH ECHT MAL ANGUCKEN, WIE GUT IHM DIE BRILLE STEHT. ER IST ZWAR NICHT DER MARTINI-MANN, ABER ER HAT WAS WEISS ICH WAS", + "JA, JA, ICH WILL. KOMM NIMM MICH UND KueSS MICH...", + "OH HEINZ, LIEBLING, GUT DASS DU DA BIST. DIESER WueSTLING VON DRASCULA HAT MICH ANS BETT GEFESSELT UND IST DANN RUNTER UM SICH DAS SPIEL ANZUSEHEN", + "JA, WIRKLICH. BEFREIE MICH", + // 15 + "NEIN, TUT MIR LEID. ICH HAB ALLE BEIM VERSUCH, AUS DEM VERLIES AUSZUBRECHEN, AUFGEBRAUCHT", + "HEINZ, BIST DU ES ? WIE TOLL ! ICH WUSSTE, DASS DU KOMMEN WueRDEST !", + "DU AHNST JA NICHT, WIE SEHR ICH WEGEN DIESEM UNGEHEUER VON DRASCULA GELITTEN HABE", + "ZUERST IST ER MIT MIR HIERHER GEFLOGEN UND DANN HAT ER MICH IN DIESES LOCH GESPERRT, OHNE SPIEGEL UND GAR NICHTS", + "WIE ICHS GESAGT HABE. DAS SCHLIMMSTE IST,DASS ER SICH KEIN EINZIGES MAL ENTSCHULDIGT HAT.", + // 20 + "HEINZ, GELIEBTER, WO BIST DU ?", + "ICH BIN BEREIT, VON DIR GERETTET ZU WERDEN", + "WARTE, ICH GUCK MAL...NEIN, SCHATZ, TUT MIR LEID", + "HIER NIMM...", + "LIEBER HEINZ !", + // 25 + "ICH WERDE DICH NIE VERGESSEN, aber das mit uns funktioniert nicht.ICH gebs zu : ES GIBT EINEN ANDERN. GRoeSSER,STaeRKER...", + "UND AUSSERDEM HAT ER MICH AUS DRASCULAS KLAUEN BEFREIT UND UM MEINE HAND ANGEHALTEN,UND ICH HABE JA GESAGT", + "LEB WOHL,HEINZ. VERSUCH NICHT EINE ERKLaeRUNG ZU FINDEN, DENN DIE LIEBE IST BLIND UND KENNT KEINE VERNUNFT", + "DU BIST MIR HOFFENTLICH NICHT BoeSE. DENK IMMER DARAN DASS ICH DICH IMMER NOCH LIEBE, WENN AUCH NUR ALS FREUND", +}, +{ + // 0 + "", + "VOUS ALLEZ BIEN? ALLEZ, REVEILLEZ-VOUS! VOUS M'ENTENDEZ? VOUS \322TES MORT?", + "NON, MON NOM EST BILLIE JEAN, MAIS TU PEUX M'APPELLER B.J., C'EST PLUS COURT", + "HI! HI! -C'EST BON!", + "EN VRIT JOHNY, J'TAIS L\267, PR\322TE \267 ME COUCHER, ET J'AI ENTENDU UN FORT COUP DANS LE COULOIR", + // 5 + "AU DBUT JE N'Y AI PAS DONN D'IMPORTANCE, MAIS APR\324S JE ME SUIS RENDUE COMPTE QUE NE POUVAIS PAS M'ENDORMIR ET SUIS SORTIE FAIRE UNE PROMENADE", + "ET \267 MON GRAN TONNEMENT, QUAND J'AI OUVERT LA PORTE, JE T'AI TROUV L\267, PAR TERRE. J'TAIS SUR LE POINT DE PENSER QUE TU AVAIS MORT, HE!, QUE JE SUIS B\322TE!", + "J'ALLAIS TE FAIRE LE BOUCHE-\267-BOUCHE MAIS IL N'A T PAS NCESSAIRE PUISQUE TU AS COMMENC \267 PARLER", + "TU DISAIS \267 SAVOIR QUOI D'UN POUVANTAIL. CELA M'A FAIT UNE GRANDE PEUR, PARCE QUE QUAND UN MORT SE MET \267 PARLER L'IMPRESSION EST TR\324S FORTE, NE CROIS-TU PAS?", + "C'EST VRAI, NON? ENFIN. JE ME SUIS DBROUILLE POUR TE PRENDRE SUR MOI, T'EMMENER DANS MA CHAMBRE ET T'INSTALLER SUR LE LIT... ET VOIL\267 TOUT. HI! HI! HI!", + // 10 + "HO! CE N'EST PAS \267 CAUSE DU COUP, HI! HI! CE QUE J'AI MARCHE SUR TES LUNETTES PAR ACCIDENT", + "\220VIDEMMENT LES LUNETTES LUI FONT DU BIEN! JE SAIS BIEN QUIL N'EST PAS FERNANDO LANCHA, MAIS IL A UN AIR QU'ALLEZ DONC SAVOIR", + "OUI, OUI, JE VEUX... VAS-Y, EMBRASSE-MOI FORT, EMBRASSE-MOI BEAUCOUP...", + "OH,JOHNY!, MON AMOUR! HEUREUSEMENT QUE TU ES VENU. CE M\220CHANT DRASCULA M'A ATTACH\220 AU LIT ET APR\324S IL EST PARTI EN BAS VOIR LE MATCH", + "OUI, C'EST VRAI, LIB\324RE-MOI", + // 15 + "NON, SUIS D\220SOL\220E. JE LES AI TOUTES UTILIS\220ES, DANS LE CACHOT, EN T\266CHANT DE ME LIB\220RER ALORS QUE TOI TU M'ABANDONNAIS", + "JOHNY, C'EST TOI? -QUELLE JOIE! -JE SAVAIS QUE TU VIENDRAIS!", + "TU NE PEUX PAS SAVOIR COMBIEN M'A FAIT SOUFFRIR CE M\220CHANT DRASCULA", + "D'ABORD IL M'EMMEN\220 EN VOLANT JUSQU'ICI ET APR\324S IL M'ENFERM\220E DANS CE TAUDIS, SANS MIROIR NI RIEN D'AUTRE", + "COMME TU L'ENTENDS. ET LE PIRE C'EST QUIL NE M'A PAS DEMAND\220 PARDON N'UNE SEULE FOIS ", + // 20 + "JOHNY, MON CH\220RI, O\353 EST-CE QUE TU ES?", + "JE SUIS PR\322TE POUR QUE TU M'EN SORTES D'ICI", + "ATTEND, JE VAIS REGARDER... NON CH\220RI, JE REGRETTE", + "TIENS...", + "\"CHER JOHNY", + // 25 + "JAMAIS JE T'OUBLIERAI, MAIS JE ME SUIS APER\200UE QUE NOTRE AFFAIRE NE POUVAIT PAS MARCHER. JE VAIS \322TRE SINC\324RE AVEC TOI: IL Y A UN AUTRE HOMME, PLUS GRAND...", + "ET ENCORE IL M'A LIB\220R\220 DES MAINS DE DRASCULA. IL M'A DEMAND\220 EN MARIAGE, ET MOI J'AI ACCEPT\220", + "AU REVOIR, JOHNY. N'Y CHERCHES PAS UNE EXPLICATION, L'AMOUR EST AVEUGLE ET N'\220COUTE PAS DES RAISONS", + "J'ESP\324RE QUE TU SERAS SANS RANCUNE, ET N'OUBLIES PAS QUE JE T'AIME ENCORE, MAIS EN AMI SEULEMENT\"", +}, +{ + // 0 + "", + "ST\265 BENE? SENTA, PUO SENTIRMI? SI \220 MORTO?", + "NO, IL MIO NOME BILLIE JEAN, MA PUOI CHIAMARMI B.J. PI \351 BREVE", + "HI,HI!- CHE BUONO!", + "NON SO JOHNY, ERO QU\326, STAVO PER ADDORMENTARMI, QUANDO HO SENTITO UN FORTE RUMORE NEL CORRIDOIO", + // 5 + "PRIMA NON GLI HO DATTO IMPORTANZA, MA DUE ORE DOPO HO SCOPERTO CHE NON RIUSCIVO A ADDORMENTARMI E SONO uscita A FARE QUATTRO PASSI", + "E FIGURATI LA SORPRESA QUANDO HO APERTO LA PORTA E TI HO TROVATO PER TERRA. TI GIURO, HO PENSATO CH'ERI MORTO..., MA COME SONO SCIOCCA", + "VOLEVO FARTI IL BOCCA A BOCCA, MA NON C'ERA BISOGNO PERCHE SUBITO HAI COMINCIATO A PARLARE", + "HAI DETTO NON SO CHE DI UN SPAVENTAPASSERI. CHE COLPO.....!, PERCHE QUANDO UN MORTO SI METTE A PARLARE FA UN COLPO GRANDISSIMO!", + "VERO DI SI? NON SO COME SONO RIUSCITA, TI HO TRASPORTATO ALLA MIA CAMERA, TI HO MESSO SUL MIO LETTO E.... NIENTE PI\351 .", + // 10 + "NO, NON \220 STATA LA BOTTA, HI, HI. \220 PERCHE ... HO PESTATO I TUOI OCCHIALI", + "MAMMA MIA MA COM'\220 BELLO CON GLI OCCHIALI! SO CHE NON \220 FERNANDO LANCHA, MA HA QUALCOSA CHE MI PIACE MOLTISSIMO", + "SI,SI, VOGLIO... ABBRACIAMI FORTE, BACIAMI MOLTO..", + "OH JOHNY, CARO, MENO MALE CHE SEI VENUTO. QUEL MALVAGIO, DRASCULA, MI HA LEGATO AL LETTO E POI SE NE \220 ANDATO A GUARDARE LA PARTITA", + "SI, \220 VERO, LIBERAMI", + // 15 + "NO, MI DISPIACE. HO UTILIZZATO TUTTE IN CARCERE PROBANDO LIBERARMI QUANDO TU MI AVEVI LASCIATA", + "JOHNY, SEI TU? - BENISSIMO. LO SAPEVO ", + "NON TI FIGURI QUANTO MI HA FATTO SOFFRIRE DRASCULA", + "PRIMA MI HA PORTATO VOLANDO FINO QUA E POI MI HA RICHIUSA IN QUESTA CAMERACCIA CHE NON HA N\220 UNO SPECCHIO", + "COME HAI SENTITO. E LO PEGLIORE: N\220 UNA VOLTA SI \220 SCUSATO", + // 20 + "JOHNY, CARO. DOVE SEI?", + "SONO PRONTA, FAMI USCIRE DA QU\326 ", + "ASPETTA, VADO A GUARDARE... NO CARO, MI DISPIACE", + "PRENDI..", + "\"CARO JOHNY:", + // 25 + "MAI POTR\220 DIMENTICARTI, MA NON SAREMO MAI FELICI INSIEME. SAR\220 SINCERA CON TE : C'\220 NE UN ALTRO; PI\351 ALTO, PI\351 FORTE..", + "ANZI MI HA LIBERATO DA DRASCULA. MI HA CHIESTO LA MANO E HO DETTO DI SI", + "ADIO JOHNY. NON CERCARE UNA SPIEGAZIONE, PERCHE L'AMORE \220 CIECO.", + "SPERO NON MI ODII, E RICORDA CHE ANCORA TI VOGLIO BENE, SEBBENE SOLO COME UN AMICO\"", +}, +}; + + +const char *_texte[][24] = { +{ + // 0 + "", + "YOU... HEY YOU!", + "DON'T GIVE ME THAT CRAP ABOUT A DEAD BODY OK?", + "I'M ALIVE. IT'S JUST THAT I'M STARVING", + "WELL, YOU SEE. I WAS THE DRUNKARD OF THE VILLAGE, JUST KEEPING UP WITH THE FAMILY TRADITION, YOU KNOW? ONE NIGHT DRASCULA KIDNAPPED ME TO TAKE MY ORGANS AWAY", + // 5 + "SINCE ALCOHOL STILL KEEPS ME QUITE YOUNG, I'M HERE LIKE A SCRAP YARD. EVERYTIME HE NEEDS SOMETHING FOR THE MONSTER HE IS MAKING, HE COMES AND TAKES IT FROM ME", + "IT HURT AT FIRST, BUT I DON'T CARE ANYMORE", + "I DON'T KNOW. I GUESS IT'S HIS GRADUATE PROJECT", + "I'M DESIDERIO, AND I CAN HELP YOU IN ANYTHING YOU NEED", + "THE TRUTH IS THAT I DON'T REALLY FEEL LIKE IT, BUT THANKS VERY MUCH ANYWAY SIR", + // 10 + "YEAH, IT'S YOU", + "WHY DO ALL ADVENTURE GAMES END UP WITH A SUNRISE OR A SUNSET?", + "DO ALL THESE NAMES BELONG TO THE CREATORS OF THE GAME?", + "AREN'T THEY ASHAMED TO BE SEEN BY EVERYBODY?", + "JESUS, THAT EMILIO DE PAZ IS EVERYWHERE!!", + // 15 + "REALLY?", + "YES", + "WELL, DON'T MAKE A FUSS ABOUT IT", + "HEY WEREWOLF, BY THE WAY...", + "DIDN'T YOU FALL OFF A WINDOW AND GOT BADLY HURT", + // 20 + "IF AT LEAST IT WASN'T ALWAYS THE SAME ONES...", + "HE'S BEEN OUT FOUR TIMES ALREADY", + "I'D LIKE TO BE A MODEL", + "ALL RIGHT, AND WHAT ARE YOU GOING TO DO?", +}, +{ + // 0 + "", + "EO, USTED", + "\255QUE MUERTO NI OCHO CUARTOS!", + "ESTOY VIVO, LO QUE PASA ES QUE YO PASO HAMBRE, \250SABE USTED? ", + "PUES VERA, SE\245OR. YO ERA EL BORRACHO DEL PUEBLO, DIGNO SUCESOR DE UNA FAMILIA DE ILUSTRES BORRACHUZOS, Y UNA NOCHE DRASCULA ME SECUESTRO PARA ROBARME LOS ORGANOS", + // 5 + "RESULTA QUE COMO ME CONSERVO EN ALCOHOL, ME TIENE AQUI EN PLAN DESSGUACE. CADA VEZ QUE NECESITA ALGO PARA EL MONSTRUO QUE ESTA CREANDO VIENE Y ME LO COGE", + "AL PRINCIPIO ME DOLIA, NO CREA, PERO YA ME DA IGUAL", + "NO SE, SERA SU PROYECTO DE FIN DE CARRERA", + "MI NOMBRE ES DESIDERIO, PARA SERVIRLE A USTED", + "PUES LA VERDAD ES QUE NO TENGO MUCHA GANA, PERO MUCHAS GRACIAS DE TODAS MANERAS, SE\245OR", + // 10 + "SI, TU MISMO", + "\250POR QUE TODOS LOS JUEGOS DE AVENTURAS TERMINAN CON UN AMANECER O UNA PUESTA DE SOL? ", + "\250Y TODOS ESTOS NOMBRES SON DE LOS QUE HAN HECHO EL JUEGO?", + "\250Y NO LES DA VERG\232ENZA SALIR Y QUE LOS VEA TODO EL MUNDO?", + "JOLIN, NO HACE MAS QUE SALIR \"EMILIO DE PAZ\" ", + // 15 + "\250DE VERDAD?", + "SI", + "PUES NO ES PARA TANTO", + "POR CIERTO HOMBRE LOBO...", + "... \250NO CAISTE POR UNA VENTANA Y TE HICISTE POLVO?", + // 20 + "SI AL MENOS NO FUESEN SIEMPRE LOS MISMOS", + "ESE YA HA SALIDO CUATRO VECES", + "ME GUSTARIA SER MODELO", + "YA, \250Y TU QUE VAS A HACER?", +}, +{ + // 0 + "", + "EJ, SIE DAA", + "DU BIST WOHL BESOFFEN ODER WAS ? !", + "ICH BIN LEBENDIG, ABER ICH HABE HUNGER, WISSEN SIE ?", + "TJA,ICH WAR DER DORFSaeUFER, STOLZER abkomme EINER DORFSaeUFERsippe UND EINES NACHTS holte mich DRASCULA, UM MIR DIE ORGANE ZU KLAUEN", + // 5 + "WEIL ICH MICH IN ALKOHOL gut HALTE BIN ICH SEIN ERSATZTEILLAGER. IMMER WENN ER WAS FueR SEIN MONSTERCHEN BRAUCHT, BEDIENT ER SICH BEI MIR", + "AM ANFANG TAT DAS HoeLLISCH WEH, ABER JETZT MERK ICH SCHON NICHTS MEHR", + "KEINE AHNUNG, ES WIRD WOHL SEINE DIPLOMARBEIT SEIN", + "ICH HEISSE DESIDERIUS UND STEHE ZU IHREN DIENSTEN", + "NAJA, EIGENTLICH HABE ICH KEINE GROSSE LUST ABER VIELEN DANK JEDENFALLS, MEIN HERR", + // 10 + "JA,NUR ZU", + "WARUM HoeREN ALLE SPIELE MIT SONNENAUFGANG ODER SONNENUNTERGANG AUF ?", + "UND SIE HABEN DIE NAMEN VON DEN MACHERN DIESES SPIELS BENUTZT ?", + "UND SIE SCHaeMEN SICH NICHT SICH ALLER WELT ZU OFFENBAREN ?", + "SCHEIBENKLEISTER. SCHON WIEDER DER PROGRAMMIERER", + // 15 + "WIRKLICH ?", + "JA", + "SO SCHLIMM IST ES AUCH WIEDER NICHT", + "APROPOS WERWOLF....", + "....BIST DU NICHT AUS EINEM FENSTER GEFALLEN UND ZU STAUB GEWORDEN ?", + // 20 + "WENN ES WENIGSTENS NICHT IMMER DIESELBEN WaeREN", + "DER IST SCHON 4 MAL AUFGETAUCHT", + "ICH WaeRE GERN FOTOMODELL", + "KLAR, UND WAS WILLST DU SPaeTER MAL MACHEN ?", +}, +{ + // 0 + "", + "OH\220! VOUS!", + "QUEL MORT NI QUELLE HISTOIRE!", + "JE SUIS VIVANT. C'EST QUE J'AI FAIM, VOUS SAVEZ? ", + "J'TAIS L'IVROGNE DU VILLAGE, LE DIGNE REPRSENTANT D'UN FAMILLE D'ILLUSTRES SO\352LARDS, ET DRASCULA M'A SQUESTR UNE NUIT POUR ME VOLER LES ORGANES", + // 5 + "COMME JE ME CONSERVE EN ALCOOL, IL ME TIENS ICI EN PLAN DBALLAGE. \267 CHAQUE FOIS QU'IL A BESOIN DE QUELQUE CHOSE POUR SON MONSTRE, IL LE PRENDRE", + "AU DBUT A ME FAISAIT MAL, MAIS JE M'EN FICHE DJ\267", + "JE NE SAIS PAS, MAIS CE SERA SON PROJET FIN D'TUDES", + "MON NOM EST DSIR, POUR VOUS SERVIR", + "VRAIMENT JE N'AI PAS UNE ENVIE FOLLE, MAIS MERCI QUAND M\322ME, MONSIEUR", + // 10 + "OUI, TOI M\322ME", + "POURQUOI TOUS LES JEUX D'AVENTURES FINISSENT AVEC UNE AUBE OU UN COUCHER DU SOLEIL? ", + "ET VOIL\267 LES NOMS DE TOUS QUI ON FAIT LE JEU?", + "ET N'ONT-ILS PAS LA HONTE DE SE MONTRER ET QUE TOUT LE MONDE LES VOIT?", + "AH ZUT! IL NE FAIT QUE SORTIR \"EMILIO DE PAZ\" ", + // 15 + "C'EST VRAI", + "OUI", + "EH BIEN, IL NE FAUT PAS EXAG\220RER", + "EN FAIT HOMME-LOUP...", + "...N'EST-TU PAS TOMB\220 D'UNE FEN\322TRE EN TE BR\220SILLANT?", + // 20 + "SI DU MOINS N'\220TAIENT PAS TOUJOURS LES M\322MES...", + "CELUI-L\267 EST D\220J\267 SORTI QUATRE FOIS", + "J'AIMERAIS \322TRE MANNEQUIN", + "PARFAITEMENT. ET TOI, QUE VAS-TU FAIRE?", +}, +{ + // 0 + "", + "EO, LEI", + "MA CHE DICI!", + "SONO VIVO, MA HO SEMPRE MOLTA FAME, SA LEI?", + "IO ERO IL BEONE DEL PAESE, DEGNO SUCCESSORE DI UNA FAMIGLIA DI ILLUSTRI BEONI, E UNA NOTTE DRASCULA MI SEQUESTR\220 PER RUBARMI GLI ORGANI", + // 5 + "mi utilizza COME UNO SCASSO, OGNI VOLTA CHE HA BISOGNO DI QUALCOSA PER IL MOSTRO CHE ST\265 CREANDO VIENE QUA E MI LO toglia", + "AL INIZIO MI FACEVA MALE, MA ORA NON FA NIENTE", + "NON SO, SAR\265 LA SUA TESINA DI FINE DI LAUREA", + "IL MIO NOME PEPPINO, PER SERVIRGLI", + "LA VERIT\265 CHE NON HO MOLTA VOGLIA, COMUNQUE GRAZIE MILE, SIGNORE", + // 10 + "SI, PROPRIO TU", + "PER CHE TUTTI I VIDEO-GIOCHI D' AVVENTURE FINISCONO CON UN'ALBEGGIARE O UN TRAMONTO?", + "E TUTTI QUESTI NOMI SONO DI CHI HANNO FATTO IL GIOCO?", + "E NON SI VERGOGNANO DI USCIRE ED ESSERE VISTI DA TUTTI QUANTI?", + "UFFA, SOLTANTO ESCI \"EMILIO DE PAZ\"", + // 15 + "DAVVERO?", + "SI", + "NON \220 PER METTERSI COS\326 ", + "CERTO LUPO-MANNARO..", + "... MA NON SEI CADUTO DA UNA FINESTRA E TI HAI FATTO MALE?", + // 20 + "SE PER UNA VOLTA NON FOSSENO SEMPRE GLI STESSI", + "QUELLO \220 GIA USCITO QUATRO VOLTE", + "MI PIACEREBBE ESSERE TOP MODEL", + "SI, E TU, COSA VAI A FARE?", +}, +}; + + +const char *_texti[][33] = { +{ + // 0 + "", + "MASTER, I THINK THIS IS NOT WORKING", + "I AM POSITIVE, MASTER", + "I'M SORRY MASTER", + "ARE YOU GOING TO BRING HERE ANOTHER CRAZY SCIENTIST? I'LL TELL YOU THAT THE LABORATORY IS ALREADY PACKED UP, AND BESIDES, THEY'RE ALL OUT OF DATE", + // 5 + "HUSH MASTER, THE FEMINIST COULD HEAR YOU", + "DAMNED IT!", + "I DIDN'T EXPECT YOU SO SOON, MASTER", + "QUITE BAD MASTER. THERE MUST BE SOME PROBLEMS WITH THE SATELLITE AND I JUST CAN'T RECEIVE ANYTHING. BESIDES THERE ARE SOME INTERFERENCES BECAUSE OF THE STORM", + "WHAT DO I KNOW, MASTER?", + // 10 + "YES, MY MASTER", + "MASTER", + "DO YOU KNOW WHAT TIME IS IT?", + "WHAT? OH, THAT SCARED ME!. YOU ARE THE \"NIGHT-CLEANING GUY\", RIGHT?", + "I'M IGOR, THE VALET. YOU CAN START WITH THE BALL ROOM. THERE'S BEEN A SUPER NATURAL ORGY YESTERDAY AND IT LOOKS LIKE SHIT", + // 15 + "IF YOU NEED ANYTHING, JUST BUY IT", + "IT'S THE TAX RETURN APPLICATION FORM, CAN'T YOU SEE IT?", + "NEITHER DO I. FIRST OF ALL THE NUMBERS ARE VERY SMALL AND ALSO I CAN'T SEE MUCH AT THIS DISTANCE.", + "NO WAY! THEY MAKE ME LOOK UGLY", + "OH, WELL. IT'S JUST LIKE A CRAZY PARTY THAT THE MASTER ORGANIZES WITH HIS FRIENDS EACH TIME SOME IDIOT COMES ALONG TRYING TO KILL HIM", + // 20 + "THEY TAKE HIS EYES OUT. THEN, POUR SOME LEMON JUICE SO THAT IT ITCHES TO DEATH, AND THEN...", + "NO", + "WHAT DO YOU MEAN WHY NOT? DO YOU KNOW WHAT TIME IT IS?", + "YES, IT'S WINTER", + "SEE YOU LATER", + // 25 + "DON'T EVEN THINK ABOUT IT!", + "WELL, THAT'S ENOUGH FOR TODAY. I'M GOING TO HAVE SUPPER", + "MAN, I ALWAYS FORGET TO LOCK IT, RIGHT?", + "THE HELL WITH IT!", + "WHAT? OH, YOU SCARED ME MASTER, I THOUGHT YOU WERE ASLEEP", + // 30 + "OH, BY THE WAY, I TOOK THE LIVING-ROOM KEYS SO THAT YOU CAN WATCH THE EARLY MORNING CARTOONS WITHOUT WAKING ME UP", + "YOU'VE GOT ANOTHER COLD MASTER? DAMN IT! I TOLD YOU TO GET SOME HEATING IN HERE...", + "ALL RIGHT, JUST TAKE YOUR ASPIRIN AND GO TO BED TO SWEAT FOR A WHILE. GOOD NIGHT", +}, +{ + // 0 + "", + "MAESTRO, CREO QUE ESTO NO RULA", + "ESTOY SEGURISIMO, MAESTRO...", + "LO SIENTO, MAESTRO", + "\250VA A TRAER OTRO DE CIENTIFICO LOCO? LE ADVIERTO QUE TENEMOS EL LABORATORIO LLENO Y ESTAN TODOS CADUCADOS", + // 5 + "CALLE, MAESTRO, QUE COMO LE OIGAN LAS FEMINISTAS", + "HAY QUE JOROBARSE", + "\255MAESTRO! \255NO LE ESPERABA TAN PRONTO!", + "MAL MAESTRO, DEBE HABER PROBLEMAS CON EL SATELITE Y NO CONSIGO SINTONIZAR LA IMAGEN. ADEMAS LA TORMENTA PRODUCE INTERFERENCIAS", + "\250Y A MI QUE ME CUENTA, MAESTRO?", + // 10 + "SI, MAESTRO", + "MAESTRO", + "\250SABE LA HORA QUE ES?", + "\250EH? \255AH, QUE SUSTO ME HAS DADO! TU ERES EL DE \"LIMPIEZA NOCTURNA\"\250NO?", + "YO SOY IGOR, EL MAYORDOMO. PUEDES EMPEZAR POR EL SALON DE BAILE. AYER HUBO ORGIA SOBRENATURAL Y ESTA HECHO UNA MIERDA", + // 15 + "SI NECESITAS ALGO, LO COMPRAS", + "LA DECLARACION DE LA RENTA \250ES QUE NO LO VES?", + "PUES YO TAMPOCO, PORQUE ENTRE QUE LOS NUMEROS SON MUY CHICOS, Y YO QUE NO VEO BIEN DE LEJOS...", + "\255NI HABLAR! ME HACEN PARECER FEO", + "BAH, ES UN FESTORRO QUE SE MONTA EL MAESTRO CON SUS COLEGAS CADA VEZ QUE LLEGA ALGUN IMBECIL QUERIENDO ACABAR CON EL", + // 20 + "PRIMERO LE SACAN LOS OJOS; LUEGO LE ECHAN ZUMO DE LIMON PARA QUE LE ESCUEZA; DESPUES...", + "NO", + "\250COMO QUE POR QUE NO? \250TU HAS VISTO LA HORA QUE ES?", + "EN INVIERNO, SI", + "HASTA LUEGO", + // 25 + "\255NI SE TE OCURRA!", + "BUENO, POR HOY YA VALE. ME VOY A CENAR", + "\255Y QUE SIEMPRE SE ME OLVIDA CERRAR CON LLAVE!", + "\255HAY QUE JOROBARSE!", + "\250EH? \255AH! QUE SUSTO ME HA DADO, MAESTRO. CREIA QUE ESTABA DURMIENDO", + // 30 + "AH, POR CIERTO, TOME LAS LLAVES DE LA SALA DE ESTAR Y ASI NO ME MOLESTA MA\245ANA TEMPRANO SI QUIERE VER LOS DIBUJOS", + "\250QUE, YA SE HA RESFRIADO OTRA VEZ, MAESTRO? HAY QUE JOROBARSE. SI SE LO TENGO DICHO, QUE PONGA CALEFACCION... ", + "BUENO, TOMESE UNA PASTILLA DE ACIDOACETIL SALICILICO Y HALA, A SUDAR. BUENAS NOCHES", +}, +{ + // 0 + "", + "MEISTER, ICH GLAUBE, DAS KLAPPT NICHT", + "ICH BIN ABSOLUT SICHER, MEISTER....", + "TUT MIR LEID, MEISTER", + "NOCH SO EINEN VERRueCKTEN WISSENSCHAFTLER ? ABER DAS LABOR IST DOCH VOLL MIT IHNEN UND ALLE SIND ueBER DEM VERFALLSDATUM", + // 5 + "SEIEN SIE STILL MEISTER. WENN DAS DIE FEMINISTINNEN HoeREN", + "GRueNSPAN UND ENTENDRECK", + "MEISTER! ICH HABE SIE NOCH GAR NICHT ERWARTET !", + "SCHLECHT, MEISTER. ES GIBT WOHL PROBLEME MIT DER SCHueSSEL UND ICH BEKOMME DAS BILD EINFACH NICHT KLAR. UND DANN DAS GEWITTER !", + "UND WIESO ERZaeHLEN SIE MIR DAS, MEISTER ?", + // 10 + "JA, MEISTER", + "MEISTER", + "WISSEN SIE, WIEVIEL UHR ES IST ?", + "Hae ?OH, DU HAST MICH GANZ SCHoeN ERSCHRECKT. BIST DU VON \"BLITZ UND BLANK BEI MONDESSCHEIN\"", + "ICH BIN IGOR, DER HAUSVERWALTER.DU KANNST MIT DEM WOHNZIMMER ANFANGEN. GESTERN HATTEN WIR EINE ueBERNATueRLICHE ORGIE UND ES SIEHT AUS WIE im SAUSTALL", + // 15 + "KAUF ALLES WAS DU BRAUCHST !", + "DIE STEUERERKLaeRUNG.SIEHST DU DAS NICHT ?", + "ICH AUCH NICHT, WEIL DIE ZAHLEN SCHON MAL SEHR KLEIN SIND UND ICH DOCH kurzsichtig bin....", + "VON WEGEN ! SIE MACHEN MICH HaeSSLICH", + "PAH, DAS IST EINE RIESENFETE DIE DER MEISTER JEDESMAL DANN ABZIEHT, WENN IRGENDSOEIN IDIOT KOMMT, DER IHN ERLEDIGEN WILL", + // 20 + " ZUERST REISSEN SIE IHM DIE AUGEN AUS DANACH GIESSEN SIE ZITRONENSAFT DRueBER DAMIT ES SCHoeN BRENNT UND DANN...", + "NEIN", + "WIE WARUM NICHT ? WEISST DU WIEVIEL UHR ES IST ?", + "im WINTER JA", + "TSCHueSS", + // 25 + "WAG ES BLOOOSS NICHT !", + "GUT, FueR HEUTE REICHTS, DAS ABENDESSEN RUFT", + "IMMER VERGESSE ICH ZUZUSCHLIESSEN !", + "VERDAMMTER MIST NOCHMAL !", + "HaeH ?AH !SIE HABEN MICH GANZ SCHoeN ERSCHRECKT, MEISTER. ICH DACHTE SIE SCHLAFEN", + // 30 + "ACH,ueBRIGENS, ICH HABE DIE WOHNZIMMERSCHLueSSEL GENOMMEN. SO NERVEN SIE MICH MORGEN FRueH NICHT MIT IHREN ZEICHENTRICKSERIEN", + "ACH, SIE HABEN SICH SCHON WIEDER ERKaeLTET, MEISTER ? ICH HAB JA IMMER SCHON GESAGT, SIE SOLLEN DIE HEIZUNG ANMACHEN...", + "NAJA, SCHLUCKEN SIE EINE SALICILACETYLSaeURE-TABLETTE UND AB INS BETT ZUM SCHWITZEN. GUTE NACHT", +}, +{ + // 0 + "", + "MA\327TRE, JE CROIS QUE \200A NE ROULE PAS", + "J'EN SUIS TR\324S S\352R, MA\327TRE...", + "JE LE REGRETTE, MA\327TRE", + "IL APPORTERA UN AUTRE DE SCIENTIFIQUE FOU? JE VOUS PRVIENS QUE LE LABORATOIRE EN EST PLEIN ET TOUS SONT PRIMS", + // 5 + "TAISEZ-VOUS, MA\327TRE, SI LES FMINISTES VOUS COUTENT...", + "CE QU'IL FAUT SUPPORTER!", + "MA\327TRE! -JE NE VOUS ATTENDAIT PAS SI T\342T!", + "A VA MAL MA\327TRE. IL DOIT AVOIR DES PROBL\324MES AVEC LE SATELLITE ET JE NE RUSSIT PAS \267 SINTONISER L'IMAGE. ET ENCORE L'ORAGE PRODUIT DES INTERFRENCES.", + "CANCANS QUE TOUT CELA, MA\327TRE!", + // 10 + "OUI, MA\327TRE", + "MA\327TRE", + "QUELLE HEURE IL EST?", + "H\220? -AH! TU M'AS FAIT PEUR! TU EST CELUI DU \"NETTOYAGE DE NUIT\", NON?", + "JE SUIS IGOR, LE MAJORDOME. TU PEUX COMMENCER PAR LE SALON DE BAL. HIER IL Y A EU UNE ORGIE SURNATURELLE ET C'EST UNE SALOPERIE", + // 15 + "SI TU AS BESOIN DE QUELQUE CHOSE, ACHETE-EN!", + "LA D\220CLARATION D'IMP\342TS, NE LE VOIS-TU PAS?", + "EH BIEN, MOI NON PLUS, CAR \267 CAUSE DE SI PETITS NUM\220ROS ET MA DIFFICULT\220 POUR BIEN VOIR DE LOIN...", + "ON N'EN PARLE PLUS! ILS ME FONT PARA\327TRE LAID", + "BAH! C'EST UNE BELLE F\322TE QUE LE MA\327TRE ORGANISE AVEC SES COLL\324GUES \267 CHAQUE FOIS QU'UN IMB\220CILE ARRIVE ET VEUT FINIR AVEC LUI", + // 20 + "D'ABORD ON LUI ARRACHE LES YEUX; APR\324S, ON LUI VERSE DE JUS DE CITRON POUR QUE \200A LUI CUISE; APR\324S...", + "NON", + "POURQUOI PAS? TU AS VU L'HEURE QU'IL EST?", + "EN HIVER, OUI", + "AU REVOIR", + // 25 + "N'Y PENSES M\322ME PAS!", + "BON, \200A VA POUR AUJOURD'HUI. JE VAIS D\327NER", + "J'OUBLIE TOUJOURS FERMER \267 CL\220, H\220LAS!", + "QUEL ENNUI!", + "H\220? -VOUS M'AVEZ FAIT PEUR, MA\327TRE. JE PENSAIS QUE VOUS DORMIEZ", + // 30 + "H\220, MA\327TRE! PRENEZ LES CL\220S DE LA SALLE DE S\220JOUR, AINSI DONC SI VOUS VOULEZ VOIR LES DESSINS ANIM\220S DEMAIN DE BONNE HEURE NE ME D\220RANGEREZ PAS", + "QUOI? VOUS VOUS \322TES ENRHUM\220 ENCORE UNE FOIS, MA\327TRE? QUELLE CONTRARI\220T\220! JE VOUS AI D\220J\267 DIT D'Y METTRE LE CHAUFFAGE... ", + "BON, AVALEZ UN COMPRIM\220 D'ACIDEAC\220TYL SALICYLIQUE ET ALLEZ TRANSPIRER! BONNE NUIT!", +}, +{ + // 0 + "", + "MAESTRO, CREDO CHE QUESTO NON VA", + "SICURISSIMO, MAESTRO", + "SCUSI, MAESTRO", + "VA A PORTARE UN ALTRO SCIENTIFICO PAZZO? GLI AVVERTO CHE IL LABORATORIO PIENO E NE ABBIAMO TUTTI SCADUTI", + // 5 + "ZITTO, MAESTRO, FIGURASI SE LE SENTONO LE FEMMINISTE", + "ACCIDENTI!", + "-MAESTRO! NON LE ASPETTAVO COS\326 PRESTO!", + "MALE MAESTRO, DEVONO CI ESSERE PROBLEMI CON IL SATELLITE E NON RIESCO A SINTONIZZARE L'IMMAGINE. ANZI LA TEMPESTA CAUSA INTERFERENZE", + "CHE NE SO, MAESTRO", + // 10 + "SI, MAESTROl", + "MAESTRO", + "SA CHE ORE SONO?", + "EH? -AH, CHE COLPO! TU SEI QUELLO DI \"PULIZIA NOTTURNA\" NO?", + "IO SONO IGOR, IL MAGGIORDOMO. PUOI COMINCIARE NEL SALOTTO DI BALLO, IERI C'ERA ORGIA SOPRANATURALE ED \220 PIENO DI MERDA", + // 15 + "SE HAI BISOGNO DI QUALCOSA, COMPRALA", + "LA DECLARAZIONE DI REDDITI, NON VEDI?", + "NEANCH'IO, I NUMERI SONO PICCOLISSIMI E ANZI, IO NON VEDO BENE DA LONTANO", + "NEANCHE PARLARNE, MI FANNO SEMBRARE BRUTTO", + "\220 UNA FESTA CHE FA IL MAESTRO PER I SUOI AMICI OGNI VOLTA CHE ARRIVA QUALCHE IMBECILE CHE VUOLE FINIRE CON LUI", + // 20 + "PRIMA, GLI TOGLIANO GLI OCCHI; POI GLI VERSANO SUCCO DI LIMONE, DOPO IL BRUCIORE.......", + "NO", + "COME CHE PER CHE NO? MA TU HAI VISTO CHE ORE SONO?", + "IN INVERNO, SI", + "ARRIVEDERCI", + // 25 + "N\324 PENSARCI", + "BENE, BASTA PER OGGI. VADO A CENARE", + "E CHE SEMPRE DIMENTICO CHIUDERE CON LA CHIAVE", + "ACCIDENTI!", + "EH? -AH! CHE COLPO, MAESTRO, PENSAVO STAVA DURMENDO", + // 30 + "ORA MI RICORDO, PRENDA LE CHIAVI DEL SOGGIORNO, COS\326 DOMANI MATTINA NON MI DISTURBA SE VUOLE GUARDARE I CARTONI ANIMATI", + "HA PRESSO FREDDO UN'ALTRA VOLTA, MAESTRO? SEMPRE GLI DICO CHE METTA IL RISCALDAMENTO", + "PRENDA UNA ASPIRINA ED A SUDARE. BUONA NOTTE", +}, +}; + + +const char *_textl[][32] = { +{ + // 0 + "", + "ARE YOU GOING TO LET OURSELVES BE GUIDED BY PRIMITIVE INSTINCTS JUST BECAUSE WE BELONG TO DIFFERENT RACES AND THE SOCIAL SITUATION IS TELLING US TO DO SO?", + "AREN'T WE TIED BY SENSE WHICH IS THE MOST POWERFUL WEAPON AS WELL AS THE MOST PRECIOUS GIFT?", + "OH, IF WE ALL LET OUR THOUGHTS GUIDE OUR WAY IN LIFE WITHOUT LEAVING SOME ROOM FOR FEELINGS WHICH LET OUR PRE-EVOLUTIVE INSTINCTS COME OUT!", + "ANSWER ME, EPHEMERAL CREATURE. WOULDN'T WE ALL BE HAPPIER WITH THOSE EMOTIONAL BOUNDINGS?", + // 5 + "YOU ARE NOT GETTING THROUGH", + "THIS IS A VERY CLEAR EXAMPLE, YOU SEE?: YOU WANT TO GET THROUGH AND GO AHEAD WITH YOUR ADVENTURE, AND I WON'T LET YOU DO THAT", + "WILL THAT BE A CONTROVERSIAL POINT BETWEEN US THAT HAVE JUST MET?", + "WELL THEN", + "WELL, THAT DEPENDS ON WHAT WE TAKE A RELATIONSHIP FOR. SOME AUTHORS DEFEND...", + // 10 + "PUKE! HUNTING AS A WAY TO SURVIVE IS AN INCOMPATIBLE ARCHAIC THING FOR A SUPERIOR BEING LIKE ME. BESIDES, I'VE BECOME A VEGETARIAN", + "IT JUST HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO BETHINK AND GET TO THE ABOVE MENTIONED THOUGHT", + "IT TOOK ME A LONG TIME TO QUIT OLD HABITS BUT AT LEAST MY IRASCIBLE SOUL BIT UP THE CONCUPISCIBLE ONE, AND EVER SINCE, I'VE NEVER EATEN MEAT AGAIN", + "NOT EVEN THE PLEASURE OF SUCKING UP THE BONE, FEELING THE TASTE OF THE SKIN AND THAT SWEET TASTE OF MARROW...THAT JUST TAKES YOU TO HEAVENLY PLACES", + "IT DOESN'T REALLY GET TO ME AT ALL", + // 15 + "WHAT?", + "I DON'T KNOW WHAT YOU'RE TALKING ABOUT, YOU EPHEMERAL CREATURE", + "I'M NOT INTERESTED", + "I DON'T KNOW ABOUT THE OTHER GAMES, BUT WE COULD USE THIS BEAUTIFUL SCREEN", + "", + // 20 + "I'D CARE...", + "NO. IT'S JUST THE SON, THE FATHER, THE GRANDFATHER AND A FRIEND, WHO ARE CALLED LIKE THAT", + "BUT, IT IS GOING TO LOOK LIKE THE GAME WAS MADE BY FIVE PEOPLE", + "THESE ARE PROMISING GUYS", + "THAT'S A GOOD ONE! A GOOD ONE!", + // 25 + "PLEASE, CALL ME CONSTANTINO", + "IT WASN'T ME MAN. IT WAS \"EL COYOTE\", MY TWIN", + "JESUS, THESE ARE REALLY LONG CREDIT TITLES", + "I STOPPED COUNTING A LONG TIME AGO", + "WHAT WILL BECOME OF YOU NOW, DESIDERIO?", + // 30 + "BUT, YOU SHOULD LOSE SOME WEIGHT", + "I'LL JUST RETIRE TO THE TIBET AND THINK ABOUT THE MEANING OF LIFE", +}, +{ + // 0 + "", + "UN MOMENTO. \250SOLO PORQUE PERTENECEMOS A RAZAS DISTINTAS Y LA SOCIEDAD DICE QUE SEREMOS ENEMIGOS VAMOS A DEJARNOS LLEVAR POR NUESTROS MAS PRIMITIVOS INSTINTOS?", + "\250ACASO NO NOS UNE LA RAZON, ELARMA MAS PODEROSA Y, A LA VEZ, EL DON MAS PRECIADO QUE TENEMOS?", + "\255AH, SI EL ENTENDIMIENTO GUIARA NUESTROS PASOS POR LA VIDA SIN DEJAR SITIO A LOS SENTIMIENTOS, QUE AFLORAN NUESTRAS INCLINACIONES PRE-EVOLUTIVAS!", + "\250NO CREES QUE SERIAMOS MAS DICHOSOS SIN ESAS ATADURAS EMOCIONALES? CONTESTA EFIMERA CRIATURA", + // 5 + "NO PASAS", + "\250VES? ESTE ES UN CLARO EJEMPLO: TU QUIERES PASAR Y CONTINUAR TU AVENTURA Y YO NO PUEDO PERMITIRLO", + "\250HA DE SER ESE MOTIVO SUFICIENTE DE CONFLICTO ENTRE NOSOTROS, QUE NO NOS CONOCEMOS DE NADA?", + "PUES ESO", + "BUENO, ESO DEPENDE DE LO QUE ENTENDAMOS POR RELACION. ALGUNOS AUTORES DEFIENDEN...", + // 10 + "AGGG. LA CAZA COMO MEDIO DE SUBSISTENCIA ES UNA ACTIVIDAD ARCAICA INCOMPATIBLE CON UNA NATURALEZA SUPERIOR COMO LA MIA. Y ADEMAS ME HE VUELTO VEGETARIANO", + "RESULTA QUE ESTABA COMIENDOME A UN TIO Y ME PUSE A REFLEXIONAR. LLEGUE A LA CONCLUSION ANTES MECIONADA", + "ME COSTO MUCHO DEJAR LOS HABITOS DESDE TANTO TIEMPO ADQUIRIDOS, PERO POR FIN MI ALMA IRASCIBLE VENCIO A LA CONCUPISCIBLE Y NO HE VUELTO A PROBAR LA CARNE", + "NI SIQUIERA EL PLACER QUE SUPONE UN HUESO, CON EL JUGO DE LA PIEL ENTRE SUS POROS Y ESE SABOR QUE TE TRANSPORTA A LUGARES REMOTOS PARADISIACOS...", + "NI SIQUIERA ME AFECTA. PARA NADA, DE VERDAD", + // 15 + "\250EL QUE?", + "NO SE DE QUE ME HABLAS, EFIMERA CRIATURA", + "NO ME INTERESA", + "LOS DEMAS JUEGOS, NO SE, PERO ESTE PARA APROVECHAR ESTA PANTALLA TAN BONITA", + "", + // 20 + "A MI SI ME DARIA", + "NO, ES QUE SON EL ABUELO, EL PADRE, EL HIJO, Y UN AMIGO QUE SE LLAMA ASI", + "NO, PERO ES QUE SI NO VA A PARECER QUE HAN HECHO EL JUEGO ENTRE CINCO", + "ESTOS CHICOS PROMETEN", + "\255ESE ES BUENO, ESE ES BUENO!", + // 25 + "LLAMAME CONSTANTINO", + "NO ERA YO, HOMBRE. ERA MI DOBLE, EL COYOTE", + "VAYA, QUE CREDITOS MAS LARGOS", + "YO YA PERDI LA CUENTA", + "BUENO DESIDERIO, \250Y QUE VA A SER DE TI AHORA?", + // 30 + "PERO TENDRIAS QUE ADELGAZAR", + "ME RETIRARE AL TIBEL A REFLEXIONAR SOBRE EL SENTIDO DE LA VIDA", +}, +{ + // 0 + "", + "MOMENT mal. NUR WEIL WIR UNTERSCHIEDLICHER HERKUNFT SIND UNd eigentlich feinde sein muessten mueSSEN WIR UNS DOCH Nicht wie die primaten auffuehren!", + "VERBINDET UNS ETWA NICHT DIE VERNUNFT, GEFaeHRLICHSTE WAFFE UND ZUGLEICH GRoeSSTE GABE, DIE WIR HABEN ?", + "AH, WENN NUR DAS GEGENSEITIGE VERSTaeNDNIS die gefuehle besiegen koennte,DIE DIE WURZEL UNSERER PRaeHISTORISCHEN NEIGUNGEN SIND!", + "GLAUBST DU NICHT, DASS WIR OHNE DIESE GEFueHLSFESSELN GLueCKLICHER WaeREN ? ANTWORTE, DU EINTAGSFLIEGE", + // 5 + "DU KOMMST NICHT DURCH", + "SIEHST DU ? DU WILLST HIER DURCH UND MIT DEM ABENTEUER WEITERMACHEN UND ICH KANN DAS NICHT ZULASSEN", + "MUSS DENN DIE TATSACHE, DASS WIR UNS NICHT KENNEN, ANLASS ZUM STREIT SEIN?", + "GENAU", + "NAJA. KOMMT DARAUF AN, WAS WIR UNTER BEZIEHUNG VERSTEHEN. EINIGE VERTRETEN JA DEN STANDPUNKT, DASS....", + // 10 + "ARRGH.nur zu jagen, um zu ueberleben ist mir zu primitiv.UND AUSSERDEM BIN ICH SEIT KURZEM VEGETARIER", + "ES GING LOS,ALS ICH MIR GERADE EINEN TYPEN EINVERLEIBTE UND ANFING NACHZUDENKEN UND ZUM EBENERWaeHNTEN SCHLUSS KAM", + "ES war hart, DIE ALTEN laster ABZULEGEN, ABER seit MEINE FLEISCHESLUST MEINEn JaeHZORN besiegt hat HABE ICH KEIN FLEISCH MEHR GEGESSEN:", + "NICHT MAL DIE GAUMENFREUDE EINES KNOCHENS, MIT DEM SAFT DER HAUT IN DEN POREN UND DIESEm GESCHMACK DER DICH INS REICH DER SINNE ENTFueHRT...", + "ES MACHT MIR ueBERHAUPT NICHTS AUS, WIRKLICH", + // 15 + "WAS JETZT ?", + "ICH WEISS NICHT, WOVON DU REDEST, DU EINTAGSFLIEGE", + "DAS INTERESSIERT MICH NICHT", + "ANDERE SPIELE, ACH ICH WEISS NICHT, ABER DAS HIER HAT SO EINE NETTE GRAFIK", + "ICH HaeTTE SCHON LUST..", + // 20 + "NEIN, SO HEISSEN DER OPA, DER VATER, DER SOHN UND EIN FREUND.", + "NEIN, ABER WENN NICHT, SIEHT ES SO AUS ALS WaeRE DAS SPIEL VON FueNF LEUTEN GEMACHT WORDEN", + "DIESE JUNGS SIND VIELVERSPRECHEND !", + "DER IST GUT, SUPERKLASSE !", + "NENN MICH KONSTANTIN", + // 25 + "MANN, DAS WAR NICHT ICH, SONDERN MEIN DOUBLE, DER KOYOTE", + "WOW, WAS FueR EINE LANGE DANKESLISTE", + "ICH HAB SCHON DEN ueBERBLICK VERLOREN", + "O.K. DESIDERIO, UND WAS WIRD JETZT AUS DIR WERDEN ?", + "ABER DANN MueSSTEST DU ABNEHMEN", + // 30 + "ICH WERDE NACH TIBET AUSWANDERN UND ueBER DEN SINN DES LEBENS NACHDENKEN", +}, +{ + // 0 + "", + "c'est parce qu'on APPARTIENT \267 DES RACES DIFF\220RENTES ET QUE LA SOCI\220T\220 NOUS CONFRONTE, QUE NOUS ALLONS AGIR PAR NOS PLUS M\220PRISABLES INSTINCTS?", + "NE SOMMES-NOUS PAR HASARD ACCROCHS PAR LA RAISON, L'ARME LA PLUS PUISSANTE, ET AUSSI LE DON LE PLUS PRCIEUX QUE NOUS AVONS?", + "AH!, SI LA RAISON GUIDAIT NOS PAS DANS LA VIE SANS Y ENTRA\327NER LES SENTIMENTS, QUI FONT JAILLIR NOS INCLINAISONS PR-VOLUTIVES!", + "NE CROIS-TU PAS QUE NOUS SERIONS PLUS HEREUX SANS CES ATTACHEMENTS-L\267? RPONDS-MOI, CRATURE PHM\324RE ", + // 5 + "TU NE PASSES PAS", + "TU VOIS? C'EST UN EXEMPLE CLAIR: TOI, TU VEUX PASSER ET POURSUIVRE TON AVENTURE ET MOI, JE NE PEUX PAS LE TOLRER", + "CELA DOIT \322TRE UNE RAISON SUFFISANTE DE CONFLIT ENTRE NOUS DEUX, QUI NE NOUS CONNAISSONS DE RIEN?", + "C'EST CELA", + "EH BIEN, CELA DPEND DE CE QU'ON ENTEND PAR RLATION. D'APR\324S QUELQUES AUTEURS...", + // 10 + "LA CHASSE COMME MOYEN DE SUBSISTANCE EST UNE ACTIVIT\220 ARCHA\330QUE, INCOMPATIBLE AVEC ma NATURE SUP\220RIEURE . ET DE PLUS JE SUIS DEVENU V\220G\220TARIEN", + "IL S'EN SUIT QU'EN TRAIN DE D\220VORER UN TYPE, JE ME SUIS MIS \267 R\220FL\220CHIR. ALORS, SUIS ARRIV\220 \267 LA CONCLUSION MENTIONN\220 CI-DESSUS", + "ABANDONNER CES HABITUDES M'EST REVENU CHER, MAIS \267 LA FIN MON \266ME IRASCIBLE a vancue MON \266ME CONCUPISCIBLE, ET D\324S LORS JE N'AI GO\352T\220 \267 LA VIANDE", + "M\322ME PAS LE PLAISIR DE CROQUER UN OS, AVEC LE SUC DE LA PEAU ENTRE SES PORES ET sa SAVEUR QUI TE TRANSPORTE VERS DES LIEUX TR\324S LONTAINS, PARADISIAQUES...", + "CECI NE M'AFFECTE PAS M\322ME, ABSOLUMENT PAS, C'EST VRAI", + // 15 + "QUOI?", + "JE NE SAIS PAS DE QUOI TU M'EN PARLES, CR\220ATURE \220PH\220M\324RE", + "CELA NE ME REGARDE PAS", + "LES AUTRES JEUX, JE NE SAIS PAS; MAIS CELUI-CI OUI, POUR EN PROFITER DE CET \220CRAN SI JOLI", + "", + // 20 + "MOI, JE NE M'EN FICHERAI PAS", + "NON, C'EST QU'ILS SONT LE GRAND-P\324RE, LE P\324RE, LE FILS, ET UN AMI QUI S'APPELLE COMME \200A", + "NON, MAIS SI NON, IL VA PARA\327TRE QU'ON A FAIT LE JEU ENTRE CINQ", + "CES GAR\200ONS ONT DU FUTUR", + "CELUI-L\267 EST BON! CELUI-L\267 EST BON!", + // 25 + "APPELLE-MOI CONSTANTIN", + "CE N'\220TAIT PAS MOI, MON VIEUX. C'\220TAIT MON DOUBLE, LE COYOTE", + "TIENS! QUELS CR\220DITS SI LONGS", + "J'AI D\220J\267 PERDU LES COMPTES", + "EH BIEN, D\220SID\324RE, QUE T'ARRIVERA-T-IL MAINTENANT?", + // 30 + "MAIS TU DEVRAIS MAIGRIR", + "JE VAIS ME RETIRER AU TIBEL POUR Y R\220FL\220CHIR SUR LE SENS DE LA VIE", +}, +{ + // 0 + "", + "UN ATTIMO. PERCHE SIAMO DI DIVERSE RAZZE E LA SOCIET\265 DICA CHE SIAMO NEMICI, ANDIAMO A LASCIARCI DOMINARE PER I PI\351 PRIMITIVI ISTINTI?", + "MA NON SIAMO UNITI DALLA RAGIONE, DALLA ARMA PI\351 PODEROSA E ANCHE PER IL DONO PI\351 PREZIOSO CHE ABBIAMO?", + "SE IL GIUDIZIO GUIDASSE I NOSTRI PASSI NELLA VITA SENZA LASCIARE POSTO AI SENTIMENTI, CHE MOSTRANO LE NOSTRE INCLINAZIONI PRE-EVOLUTIVI!", + "NON CREDI CHE SAREMMO PI\351 BEATI SENZA QUESTO LEGAME EMOZIONALE? RISPONDE EFFIMERA CREATURA", + // 5 + "NON PASSI", + "VEDI? QUESTO UN CHIARO ESEMPIO: TU VUOI PASSARE E PROSEGUIRE LA TUA AVVENTURA ED IO NON POSSO PERMETTERLO", + "MA DEVE ESSERE CAUSA DI CONFRONTO QUANDO ANCORA NON CI CONOSCIAMO?", + "CHE TI HO DETTO?", + "BOH, DIPENDE DI CHE CAPIAMO COME RELAZIONE. CI SONO AUTORI CHE DIFENDONO...", + // 10 + "LA CACCIA COME FORMA DI SUSSISTENZA \220 UNA ATTIVIT\265 ARCAICA, INCOMPATIBILE CON UNA NATURA SUPERIORE COM'\220 LA MIA: ADESSO SONO VEGETARIANO", + "TEMPO FA, STAVO MANGIANDO UN TIZIO QUANDO MI SONO MESSO A RIFLETTERE. FU QUANDO LA CONCLUSIONE DI PRIMA ARRIV\220 ", + "FU DIFFICILE LASCIARE LE MIE VECCHIE ABITUDINI, MA LA MIA ANIMA IRASCIBILE HA VINTO LA CONCUPISCIBILE E NON MANGIO PI\351 DELLA CARNE", + "NEPPURE IL PIACERE CHE FA UN OSSO, COL SUCCO DELLA PELLE E QUEL SAPORE CHE TI PORTA A POSTI LONTANI E PARADISIACI...", + "NEMMENO MI TOCCA DA VICINO, DAVVERO", + // 15 + "CHE COSA?", + "NON SO SU CHE MI PARLI, EFFIMERA CREATURA", + "NON MI INTERESA", + "GLI ALTRI VIDEO-GIOCHI, NON SO, MA QUESTO \220 PER APPROFITTARE QUESTO BELLO SCHERMO", + "", + // 20 + "IO SI ME VERGOGNAREI", + "NO, SONO IL NONNO, IL PADRE, IL FIGLIO, E UN AMICO CHE SI CHIAMA COS\326 ", + "NO, MA SE NON \220 COS\326, SEMBRAR\265 CHE HANNO FATTO IL VIDEO-GIOCO IN CINQUE", + "BRAVI RAGAZZI", + "-QUELLO \220 BUONO, QUELLO \220 BUONO!", + // 25 + "CHIAMAMI COSTANTINO", + "NON ERO IO, DAI,. ERA IL MIO CONTROFIGURA, IL COYOTE", + "INSOMMA, MOLTI TITOLI DI CODA", + "IO NON SO GI\265 QUANTI", + "ALLORA PEPPINO, CHE VAI FARE ADESSO?", + // 30 + "MA DOVRESTI DIMAGRIRE", + "MI APPARTER\220 AL TIBET A RIFLETTERE SUL SENSO DELLA VITA", +}, +}; + +const char *_textp[][20] = { +{ + // 0 + "", + "HI", + "YES SIR. IT'S BEAUTIFUL", + "NO, NO. HE WON'T DO IT", + "ALL RIGHT THEN", + // 5 + "REALLY?", + "SO?", + "I'M SORRY. THE PIANIST UNION TRADE DOESN'T ALLOW ME TO SAVE GIRLS FROM VAMPIRES' CLUTCHES", + "IF SHE HAD BEEN KIDNAPPED BY THE WEREWOLF...", + "I CAN ONLY PLAY THIS SONG", + // 10 + "I'M A CONSERVATOIRE PIANIST AND THE BARTENDER WON'T BUY MORE SCORES FOR ME", + "OH GOD, I REALLY LOVE CLASSIC MUSIC!", + "IT'S BECAUSE I'M WEARING EAR-PLUGS", + "IT'S BECAUSE I CAN LIP-READ", + "NOOO", + // 15 + "NO! I'M NOT TAKING THIS ANY LONGER!", + "NO WAYYYYY!", + "WHAT? OF COURSE I'M INTERESTED", + "THANKS GOD! I CAN PLAY A DIFFERENT SONG NOW!", + "I GUESS YOU CAN KEEP MY EAR-PLUGS", +}, +{ + // 0 + "", + "HOLA", + "BONITA. SI SE\245OR", + "NO QUE NO LO HACE", + "PUES VALE", + // 5 + "\250SI?", + "\250Y?", + "LO SIENTO. EL SINDICATO DE PIANISTAS NO ME PERMITE RESCATAR CHICAS DE LAS GARRAS DE LOS VAMPIROS", + "SI LA HUBIERA RAPTADO UN HOMBRE LOBO...", + "NO PUEDO TOCAR MAS QUE ESTA CANCION", + // 10 + "ES QUE SOY PIANISTA DE CONSERVATORIO Y EL TABERNERO NO COMPRA MAS PARTITURAS", + "\255CON LO QUE A MI ME GUSTA LA MUSICA CLASICA!", + "PORQUE LLEVO TAPONES EN LOS OIDOS", + "PORQUE LEO LOS LABIOS", + "NOOO", + // 15 + "\255QUE NO! \255QUE NO ME AGUANTO!", + "\255QUE NOOOOOO!", + "\250QUE? CLARO QUE ME INTERESA", + "AHORA PODRE TOCAR OTRA CANCION \255QUE ALIVIO!", + "SUPONGO QUE TE PUEDES QUEDAR CON MIS TAPONES", +}, +{ + // 0 + "", + "HALLO", + "JAWOLL, SEHR SCHoeN", + "NEIN, ER TUT ES EINFACH NICHT", + "NA GUT, OK.", + // 5 + "JA ?", + "UND ?", + "TUT MIR LEID. DIE KLAVIERSPIELERGEWERKSCHAFT ERLAUBT ES MIR NICHT, MaeDCHEN AUS DEN KLAUEN VON VAMPIREN ZU BEFREIEN", + "WENN SIE WERWOLF ENTFueHRT HaeTTE.....", + "ICH KANN NUR DIESES EINE LIED", + // 10 + "ICH HABE AM KONSERVATORIUM KLAVIER GESPIELT UND DER WIRT WILL MEINE PARTITueDEN NICHT KAUFEN", + "WO MIR DOCH KLASSISCHE MUSIK SO GUT GEFaeLLT !", + "WEIL ICH OHRENSToePSEL IN DEN OHREN HABE", + "WEIL ICH VON DEN LIPPEN LESEN KANN", + "NEEEIN", + // 15 + "NEEIEN! ICH KANN MICH NICHT BEHERRSCHEN !", + "NEIN,NEIN,UND NOCHMAL NEIN !", + "WIE BITTE ? KLAR BIN ICH INTERESSIERT", + "ENDLICH KANN ICH WAS ANDERES SPIELEN,WELCH ERLEICHTERUNG !", + "ICH GLAUBE, DU KANNST MEINE OHRENSToePSEL BEHALTEN", +}, +{ + // 0 + "", + "BONJOUR!", + "JOLIE, OUI M'SIEUR", + "NON, QU'ELLE NE LE FAIT PAS", + "D'ACCORD, A VA", + // 5 + "OUI?", + "ET QUOI?", + "SUIS DSOL. LE SYNDICAT DE PIANISTES NE ME PERMET PAS DE LIBRER LES FILLES DES GRIFFES DE VAMPIRES", + "SI ELLE AVAIT T RAPTE PAR UN HOMME-LOUP...", + "JE NE PEUX PAS JOUER DAVANTAGE CETTE CHANSON", + // 10 + "JE SUIS LE PIANISTE DU CONSERVATOIRE ET LE TAVERNIER N'ACH\324TE PAS MES PARTITIONS", + "ET MOI QUI AIME BEAUCOUP LA MUSIQUE CLASSIQUE!", + "PARCE QUE J'AI DES TAMPONS \267 L'OU\330E", + "PARCE QUE JE LIS LES LEVRES", + "NOOON!", + // 15 + "QUE NON! QUE JE NE PEUX PAS ME RETENIR DAVANTAGE!", + "QUE NOOOOOON!", + "QUOI? BIEN S\352R QUE \200A M'INT\220RESSE", + "MAINTENANT JE POURRAI JOUER UNE AUTRE CHANSON -QUEL SOULAGEMENT!", + "TU PEUX GARDER MES TAMPONS, JE SUPPOSE", +}, +{ + // 0 + "", + "CIAO", + "BELLA, MOLTO BELLA", + "NO, CHE NON LO FA", + "VA BENE", + // 5 + "-SI?", + "E?", + "MI DISPIACE. IL SINDACATODI PIANISTI NON MI DA PERMESSO PER LIBERARE RAGAZZE DALLE MANI DI VAMPIRI", + "SE LA AVESSE SEQUESTRATA IL LUPO-MANNARO...", + "SOLTANTO POSSO SUONARE QUESTA CANZONE", + // 10 + "\324 PERCHE SONO PIANISTA DI CONSERVATORIO E IL TABERNERO NON COMPRA PI\353 PARTITURE", + "PECCATO.....MI PIACE MOLTISSIMO LA MUSICA CLASSICA!", + "PERCHE MI HO MESSO TAPPI NEGLI ORECCHII", + "PERCHE SO LEGGERE LE LABRA", + "NOOO", + // 15 + "NO!, NON MI SOPPOROTO!", + "HO DETTO DI NOOO!", + "COSA? SI, SI MI INTERESA, COME NO", + "ADESSSO POTR\343 SUONARE UN'ALTRA CANZONE, GRAZIE!!", + "CREDO CHE I MIEI TAPPI ADESSO SONO TUOI", +}, +}; + + +const char *_textt[][25] = { +{ + // 0 + "", + "WHAT HAPPENS, WHAT'S THE MATTER?", + "OK. ROOM 512. UPSTAIRS. THE KEY IS ON THE DOOR", + "COUNT DRASCULA!!?", + "NO, NOTHING. THAT GUY HAS A BAD REPUTATION OVER HERE", + // 5 + "WELL, THERE ARE ALL KINDS OF STORIES GOING AROUND ABOUT HIM, SOME SAY HE IS A VAMPIRE WHO KIDNAPS PEOPLE TO SUCK UP THEIR BLOOD", + "HOWEVER, SOME OTHERS SAY THAT HE IS JUST AN ORGAN-DEALER AND THAT IS THE REASON WHY THERE ARE BODY PARTS ALL OVER THE PLACE", + "BUT OF COURSE, THOSE ARE JUST RUMORS. HE'S PROBABLY BOTH THINGS. BY THE WAY, WHY DO YOU WANT TO MEET HIM?", + "NO, FORGET IT. I'M REALLY BUSY...", + "WELL, OK. BUT JUST BECAUSE I WANT TO DO IT, NOT BECAUSE YOU TELL ME TO", + // 10 + "THEY'RE WINNING", + "LEAVE ME ALONE, ALL RIGHT?", + "OF COURSE. I'M NOT BLIND", + "THE TRADITION IN THIS VILLAGE IS TO FORGET ALL HARD FEELINGS WHENEVER THERE IS A GAME, SO AS TO CHEER UP THE LOCAL TEAM", + "AND PLEASE, SHUT UP FOR GOD'S SAKE. I CAN'T HEAR ANYTHING!", + // 15 + "COME ON, LEAVE ME ALONE AND DON'T BOTHER ME ANYMORE", + "IT HAS JUST STARTED! AND SHUT UP!", + "OK, OK, I THOUGHT SOMETHING WAS GOING ON", + "IT DOESN'T MATTER, ANYWAY. SHE'LL PROBABLY BE DEAD BY NOW", + "HE JUST STARTED PLAYING CLASSIC MUSIC, AND I COULDN'T STAND IT", + // 20 + "SINCE I'M PAYING HIM FOR PLAYING WHATEVER I WISH, I JUST FIRED HIM", + "AND THEN, HE GOT FRESH WITH ME. JESUS!, HE LOOKED SO NICE AND INNOCENT...WHAT A HYPOCRITE!", + "BY THE WAY, BE CAREFUL BECAUSE I JUST WAXED THE FLOOR", + "SHUT UP! WE'RE WATCHING THE GAME!", + "OH, COME ON! TAKE IT!", +}, +{ + // 0 + "", + "\250QUE PASA, QUE PASA?", + "DE ACUERDO. HABITACION 512. SUBIENDO POR LAS ESCALERAS. LA LLAVE ESTA EN LA PUERTA", + "\255\250 EL CONDE DRASCULA ?!", + "NO, NADA. ESE TIPO TIENE MALA FAMA POR AQUI", + // 5 + "BUENO, CORREN VARIOS RUMORES SOBRE EL. ALGUNOS DICEN QUE ES UN VAMPIRO Y VA SECUESTRANDO GENTE PARA CHUPARLES LA SANGRE", + "CLARO, QUE OTROS OPINAN QUE SOLO ES UN TRAFICANTE DE ORGANOS, Y POR ESO APARECE GENTE DESCUARTIZADA POR LOS ALREDEDORES", + "POR SUPUESTO SON SOLO RUMORES. LO MAS PROBABLE ES QUE SEA LAS DOS COSAS. POR CIERTO, \250PARA QUE QUIERE USTED VER A ESE TIPO?", + "NO DEJELO, QUE ES QUE TENGO MUCHO QUE HACER...", + "BUENO VALE, PERO PORQUE QUIERO YO, NO PORQUE LO DIGAS TU", + // 10 + "VAN GANANDO", + "DEJAME EN PAZ, \250VALE?", + "PUES CLARO, NO SOY CIEGO", + "ES TRADICION EN EL PUEBLO QUE CUANDO HAY PARTIDO SE OLVIDAN RENCORES PARA ANIMAR A LA SELECCION", + "Y CALLATE YA DE UNA VEZ, QUE NO ME DEJAS OIR", + // 15 + "ANDA, DEJAME EN PAZ Y NO MOLESTES", + "\255ACABA DE EMPEZAR! \255Y CALLATE!", + "AH, BUENO. CREIA QUE PASABA ALGO", + "NO, SI ES IGUAL. A ESTAS HORAS YA ESTARA MUERTA", + "ES QUE SE PUSO A TOCAR MUSICA CLASICA Y YO NO LA AGUANTO", + // 20 + "Y COMO YO LE PAGO PARA QUE TOQUE LO QUE YO QUIERO, PUES LE HE ECHADO", + "Y ENCIMA SE ME PUSO CHULO... \255Y PARECIA UNA MOSQUITA MUERTA!", + "...POR CIERTO, TENGA CUIDADO. EL SUELO ESTA RECIEN ENCERADO", + "\255SILENCIO! \255ESTAMOS VIENDO EL PARTIDO!", + "\255VENGA, ANDA! TOMA.", +}, +{ + // 0 + "", + "WAS ZUM TEUFEL IST LOS ?", + "O.K. ZIMMER 512. DIE TREPPE HOCH. DIE SCHLueSSEL STECKEN SCHON", + " GRAF DRASCULA ? !", + "NEIN, DER TYP HAT HIER EINEN SCHLECHTEN RUF", + // 5 + "NAJA, ES GIBT MEHRERE GERueCHTE ueBER IHN. EINIGE BEHAUPTEN, DASS ER LEUTE ENTFueHRT UND IHNEN DAS BLUT AUSSAUGT", + "KLAR, ANDERE GLAUBEN, DASS ER EIN ORGANHaeNDLER IST UND DESHALB TAUCHEN ueBERALL AM WALDRAND ZERSTueCKELTE LEICHEN AUF", + "NATueRLICH SIND DAS ALLES NUR GERueCHTE. HoeCHSTWAHRSCHEINLICH STIMMEN SIE ABER. ACH, UND WAS WOLLEN SIE VON IHM ?", + "NEIN, VERGESSEN SIES. ICH HABE NaeMLICH ZU TUN...", + "O.K. ABER WEIL ICH DAS WILL UND NICHT WEIL DU DAS SAGST", + // 10 + "SIE GEWINNEN", + "LASS MICH IN RUHE, OK ?", + "KLAR, ICH BIN DOCH NICHT BLIND", + "ES IST EIN ALTER BRAUCH IM DORF, DASS MAN BEI EINEM SPIEL ALTE ZWISTE VERGISST, UM DIE MANNSCHAFT ANZUFEUERN", + "UND HALT ENDLICH DEINEN MUND, ICH WILL ZUHoeREN", + // 15 + "MANN, LASS MICH IN RUHE UND NERV MICH NICHT", + "ES FaeNGT GERADE AN ! STILL JETZT !", + "ACH SO, ICH DACHTE ES IST IRGENDWAS LOS", + "NEIN, IST DOCH EGAL. JETZT WIRD SIE EH SCHON TOT SEIN", + "ER HAT KLASSIK GESPIELT UND ICH HALTE DAS NICHT AUS", + // 20 + "UND WEIL ICH ES BIN, DER IHN DAFueR BEZAHLT, DASS ER SPIELT, WAS ICH WILL, HABE ICH IHN ENTLASSEN", + "UND DANN KAM ER MIR AUCH NOCH SCHRaeG... UND WAS FueR EINE PAPPNASE ER DOCH IST !", + "...ACH JA, UND PASSEN SIE AUF. DER BODEN IST FRISCH GEBOHNERT", + "RUHE !WIR GUCKEN GERADE DAS SPIEL !", + "LOS, HAU REIN, GIBS IHM", +}, +{ + // 0 + "", + "QU'EST-CE QU'IL Y A, QU'Y A-T-IL?", + "D'ACCORD. CHAMBRE 512. PAR LES ESCALIERS. LA CL EST SUR LA PORTE", + "LE COMTE DRASCULA?!", + "NON, RIEN, CE TYPE A UNE MAUVAISE R\220PUTATION PAR ICI", + // 5 + "EH BIEN, IL Y A DES RUMEURS QUI COURENT SUR LUI. CERTAINS DISENT QUE C'EST UN VAMPIRE ET QU'IL ENLEVE DU MONDE POUR SUCER LEUR SANG ", + "MAIS D'AUTRES PENSENT QU'IL EST SEULEMENT UN TRAFICANT D'ORGANES, ET C'EST POUR CELA QUE DES PERSONNES DPECES SONT APPARUES DANS LES ALENTOURS", + "CERTAINEMENT IL NE S'AGIT QUE DES BRUITS QUI COURENT. S\352REMENT IL AURA LES DEUX MTIERS. MAIS, POURQUOI VOULEZ-VOUS VOIR CE TYPE?", + "OH, NON! OUBLIEZ CELA, J'AI BEAUCOUP \267 FAIRE.", + "BON, A VA. MAIS PARCE QUE JE VEUX ET NON PARCE QUE TU LE DIS", + // 10 + "ILS GAGNENT", + "FICHE-MOI LA PAIX, D'ACCORD?", + "C'EST S\352R, JE NE SUIS PAS UN AVUGLE", + "SELON LA TRADITION DU VILLAGE, QUAND IL Y A UN MATCH ON OUBLIE LES RANCUNES, POUR ALLER ENCOURAGER LA S\220LECTION", + "ET FERME-LA D'UNE FOIS!, JE NE PEUX PAS ENTENDRE", + // 15 + "ALLEZ, VA-T'-EN ET NE D\220RANGES PAS!", + "\200A VIENT DE COMMENCER! -ET TAIS-TOI!", + "AH, BON! JE PENSAIS QU'IL SE PASSAIT QUELQUE CHOSE", + "NON, C'EST \220GAL. \267 CES HEURES-CI ELLE SERA D\220J\267 MORTE", + "LE FAIT EST QU'ELLE A COMMENC\220 JOUER DE LA MUSIQUE CLASSIQUE ET QUE JE NE SUPPORTE PAS CELA", + // 20 + "ET MAINTENANT QUE JE LUI AI MIS DEHORS, COMMENT JE LUI PAIE POUR QU'IL JOUE CE QUE JE VEUX", + "ET ENCORE IL S'EST MONTR\220 ARROGANT... -ET DIRE QU'IL PARAISSAIT UNE SAINTE-NITOUCHE!", + "...FAITES ATTENTION, ON VIENT DE CIRER LE PARQUET", + "SILENCE! ON VOIT LE MATCH!", + "OH L\267 L\267! TIENS!", +}, +{ + // 0 + "", + "CHE SUCCEDE, CHE SUCCEDE?", + "D'ACCORDO. CAMERA 512. DEVE SALIRE LE SCALE. LA CHIAVE \324 NELLA PORTA", + "IL CONDE DRASCULA?", + "NO, NIENTE. QUEL TIZIO HA MALA REPUTAZIONE QU\336", + // 5 + "SE DICONO MOLTE COSE SU LUI. COME CH'\324 UN VAMPIRO E SEQUESTRA GENTE PER BERE LA SUA SANGUE", + "ALTRI DICONO CHE SOLO \324 UN TRAFFICANTE DI ORGANI, PER QUELLO TROVIAMO GENTE SQUARTATA FUORI LE MURA", + "SONO SOLTANTO CHIACCHIERE. FORSE SIA LE DUE COSE. MA, PERCHE VUOLE TROVARE QUEL TIZIO?", + "NO, HO MOLTO DA FARE..", + "VA BENE, MA PERCHE VOGLIO IO, NON PERCHE L'ABBIA DETTO TU", + // 10 + "ADESSO VINCONO", + "LASCIAMI IN PACE, O.K.?", + "CERTO, NON SONO CIECO", + "C'\324 LA TRADIZIONE NEL PAESE DI DIMENTICARE I RANCORI QUANDO C'\324 PARTITA DI CALCIO; PER ANIMARE LA SELEZIONE", + "TI HO DETTO DI STARE ZITTO, NON RIESCO A SENTIRE", + // 15 + "LASCIAMI IN PACE E NON MI DISTURBARE", + "\324 APPENA COMINCIATO, ZITTO!", + "AH, BENE. HO PENSATO CHE SUCCEDEVA QUALCOSA", + "NO, NON FA NIENTE. ADESSO SICURO CH'\324 GI\267 MORTA", + "SI \324 MESSO A SUONARE MUSICA CLASSICA ED IO LA ODIO", + // 20 + "\324 COME FACCIO PER SENTIRE QUELLO CHE VOGLIO SE L'HO LICENZIATO", + "E ORA SI METTE BULLO...-E SEMBRAVA PROPRIO SCEMO!", + "...SENTA! FACCIA ATTENZIONE. IL PAVIMENTO \324 APPENA INCERATO", + "ZITTO! - STIAMO GUARDANDO LA PARTITA!", + "DAI! PRENDI", +}, +}; + + +const char *_textvb[][63] = { +{ + // 0 + "", + "WHO THE HELL IS CALLING AT THIS TIME?", + "OH, ..OH, NO, NO....I'M...GANIMEDES THE DWARF. PROFESSOR VON BRAUN DOESN'T LIVE HERE ANYMORE", + "NO, I DON'T KNOW WHERE IT IS !!", + "GET OUT!!", + // 5 + "IT'S TOO LATE NOW, YOU IDIOT!! IT ALWAYS IS", + "I COULDN'T AGREE MORE", + "ME, SCARED?", + "LISTEN HERE, DUDE. YOU'RE RIGHT NOW TALKING TO THE ONLY PERSON WHO KNOWS THE SECRET TO FIGHT AGAINST THE VAMPIRE", + "YOU NEED TO HAVE SPECIAL SKILLS TO FIGHT AGAINST A VAMPIRE. NOT EVERYBODY CAN DO IT", + // 10 + "YOU DON'T HAVE THEM", + "I'M SURE YOU WOULDN'T BET ALL YOUR MONEY ON IT, HUH?", + "WELL, ALL RIGHT, COME ON IN", + "IF YOU REALLY MEAN TO FACE DRASCULA, YOU'VE GOT TO BE ABLE TO TAKE ALL TYPES OF CREAKING AND VAMPIRE-LIKE NOISES", + "IS THAT CLEAR?", + // 15 + "OK, WAIT A MINUTE", + "STAND IN THE CENTER OF THE ROOM, PLEASE", + "WHERE DID I PUT THAT RECORD CALLED \"NAILS SCRATCHING THE BLACKBOARD\"?", + "ALL RIGHT. LET'S GET TO IT", + "YOU ARE USELESS. YOU SEE...?, JUST LIKE THE REST!!", + // 20 + "JUST GIVE ME NOW THE MONEY YOU LOST AND GET OUT OF HERE", + "AND DON'T COME BACK UNTIL YOU ARE ABSOLUTELY READY", + "WHAT DO YOU WANT NOW?", + "I HAVE TO ADMIT IT. YOU REALLY GOT WHAT IT TAKES TO FIGHT AGAINST THE VAMPIRES", + "HEY, TAKE YOUR MONEY. I ADMIT IT WHEN I MAKE A MISTAKE...", + // 25 + "LEAVE ME ALONE NOW, I WANT TO GET SOME SLEEP", + "WHENEVER YOU ARE READY TO FIGHT AGAINST THE VAMPIRES, JUST COME BACK AND I'LL HELP YOU OUT", + "OH, THAT'S EASY. JUST USING THE LIGHT OF ONE CRUCIFIX IS ENOUGH TO DESTROY HIM", + "YOU HAVE TO BE EXTRA CAREFUL WITH DRASCULA, HIS FRISISNOTICS POWERS HAVE MADE OF HIM THE MOST POWERFUL VAMPIRE", + "YOU'D BE LOST IF IT WASN'T FOR THEY...", + // 30 + "...BREW!", + "YEAH, YOU'RE RIGHT! I MIGHT HAVE SOME PROBLEMS WITH MY BACK IN THE FUTURE IF I KEEP ON SLEEPING THIS WAY", + "I UNDERSTAND HE WAS A BETTER OPPONENT THAN ME, BUT YOU HAVE TO ADMIT THAT THE DISCOVERY I MADE ABOUT ANTI-VAMPIRE TECHNIQUES WAS WHAT ACTUALLY PROTECTED ME", + "I'VE FOUND THIS IMMUNIZING BREW THAT KEEPS YOU SAFE FROM ANY VAMPIRES' BITE OR AGAINST HIS FRISISNOTICS POWERS", + "NO, NO, EXCUSE ME. I HAD IT ONCE BUT IT'S VERY DANGEROUS TO HAVE A BREW OF THAT TYPE. CAN YOU IMAGINE WHAT COULD HAPPEN IF A VAMPIRE GOT IT?", + // 35 + "HE'D BE IMMUNIZED AGAINST GARLIC, THE SUNSHINE LIGHT... SO I HAD TO GET RID OF WHAT I DIN'T USE BY THE SCIENTIFIC METHOD OF THROWING IT IN THE LAVATORY", + "DON'T WORRY, I REMEMBER EXACTLY HOW TO MAKE THAT BREW", + "I NEED GARLIC, BUT I ALREADY HAVE THEM. HOWEVER YOU'LL HAVE TO GET ME SOME WAX, BUBBLE GUM AND CIGARETTE PAPER OR PERHAPS A NAPKING OR SOMETHING ALIKE", + "OH...AND OF COURSE THE MOST IMPORTANT INGREDIENT. LEAVES FROM A VERY STRANGE PLANT CALLED FERNAN", + "IT'S A CLIMBING PLANT WHICH LEAVES HAVE MAGIC POWERS IF THEY'RE CUT WITH A GOLDEN SICKLE", + // 40 + "SO THAT AS SOON AS YOU HAVE THESE FIVE THINGS, JUST COME HERE AND I'LL MAKE THE BREW", + "YOU'LL BE READY THEN TO FIGHT AGAINST DRASCULA", + "REMEMBER: WAX, NICOTINE, A PIECE OF BUBBLE GUM, A PAPER AND SOME FERNAN'S LEAVES CUT WITH A GOLDEN SICKLE", + "I TOLD YOU! IT WAS JUST BECAUSE OF THE BREW!", + "OH, ALL RIGHT. I'M GOING TO MAKE MYSELF A...THE BREW. JUST A MOMENT, OK?", + // 45 + "IT'S A PROTECTING SPELL AGAINST VAMPIRES", + "I PUT IT THERE IN ORDER TO PRETEND THAT THE SKETCHER DIDN'T FORGET TO DRAW THE WINDOW YOU CAN SEE FROM OUTSIDE", + "ALL RIGHT, THE FIRST THING YOU MUST KNOW IS THE WAY TO DRASCULA'S CASTLE", + "THERE IS A CAVERN THAT GETS YOU STRAIGHT FROM THE CASTLE. IGOR, THE CRAZY ELVIS' FUN, TAKES IT TO GET TO THE VILLAGE EACH MORNING", + "BE CAREFUL THOUGH, THERE IS A VAMPIRE ALWAYS WATCHING OVER IT. YOU'LL HAVE TO GET RID OF HIM", + // 50 + "THERE IS AN OLD WELL RIGHT BY THE CEMETERY CHURCH", + "IT WAS USED A LONG TIME AGO FOR WITCHCRAFT TRIALS", + "THEY THREW THE WITCHES IN THE WELL. IF THEY DROWNED THEY WERE REAL WITCHES. IF THEY DIDN'T, THEY WEREN'T", + "WE THREW ONE ONCE AND SHE DIDN'T DROWN, I GUESS SHE WASN'T A WITCH", + "ANYWAY. THERE IS YOUR BREW. HOWEVER, I ONLY GOT TO MAKE ENOUGH JUST FOR ONE PERSON", + // 55 + "YOU'D BETTER SMOKE IT RIGHT BEFORE YOU FIGHT AGAINST DRASCULA", + "COME ON, RUN!", + "OH, JUST EXCUSES...!", + "ARE YOU JOHN HACKER? I'M DOCTOR VON BRAUN", + "LISTEN TO ME, THIS IS VERY IMPORTANT. IT'S ABOUT THE BREW", + // 60 + "SHUT UP AND LET ME TALK. I JUST FOUND THIS BOOK ABOUT ANTI-VAMPIRE BREWS WARNING AGAINST MIXING THE JOINT WITH ANY ALCOHOLIC DRINK BEFORE YOU", + "ALCOHOL REACTS WHEN MIXED WITH BREW, SO THAT IT CANCELS OUT ITS EFFECTS JUST IN A FEW SECONDS", + "I'M SORRY, BUT I HAVE TO HANG UP RIGHT NOW. THE POLICE IS LOOKING FOR ME, THEY THINK I'M A PUSHER. STUPIDS!. ANYWAY, BYE AND GOOD LUCK SAVING THE WORLD!", +}, +{ + // 0 + "", + "\250QUIEN DIABLOS LLAMA A ESTAS HORAS?", + "EH... NO, NO. YO SOY EL ENANO GANIMEDES... EL PROFESOR VON BRAUN YA... YA NO VIVE AQUI", + "\255NO, NO SE DONDE ESTA!", + "\255QUE TE VAYAS! ", + // 5 + "IMBECIL. YA ES DEMASIADO TARDE, SIEMPRE LO ES", + "ESTOY TOTALMENTE DE ACUERDO", + "\250YO MIEDO?", + "ENTERATE CHAVAL: ESTAS HABLANDO CON EL UNICO QUE CONOCE EL SECRETO PARA ENFRENTARSE A LOS VAMPIROS", + "NO TODO EL MUNDO ES CAPAZ DE LUCHAR CON UN VAMPIRO. HAY QUE TENER UNAS CUALIDADES ESPECIALES", + // 10 + "NO LAS TIENES", + "\250TE APUESTAS TODO TU DINERO A QUE NO?", + "ESTA BIEN. PASA", + "SI DE VERDAD ERES CAPAZ DE ENFRENTARTE A DRASCULA, DEBER PODER SOPORTAR TODOS LOS RUIDOS CHIRRIANTES Y VAMPIRICOS", + "\250QUEDA CLARO?", + // 15 + "DE ACUERDO. ESPERA UN MOMENTO", + "POR FAVOR, PONTE EN EL CENTRO DE LA HABITACION", + "VEAMOS. \250DONDE HE PUESTO EL DISCO ESTE DE \"U\245AS ARRASCANDO UNA PIZARRA\"?", + "MUY BIEN. VAMOS ALLA", + "\250VES? ERES UN INUTIL, COMO TODOS LOS DEMAS", + // 20 + "AHORA DAME EL DINERO QUE HAS PERDIDO Y VETE DE AQUI", + "Y NO VUELVAS HASTA QUE NO ESTES PREPARADO DEL TODO", + "\250Y QUE ES LO QUE QUIERES TU AHORA?", + "HE DE RECONOCERLO... TIENES APTITUDES PARA LUCHAR CON LOS VAMPIROS", + "POR CIERTO, TOMA TU DINERO. SE CUANDO ME HE EQUIVOCADO", + // 25 + "AHORA VETE, QUE QUIERO DORMIR UN POCO", + "CUANDO ESTES DISPUESTO A ENFRENTARTE A ALGUN VAMPIRO, VUELVE Y TE AYUDARE EN LO QUE PUEDA", + "OH, ESO ES FACIL. LA LUZ DEL SOL O UN CRUCIFIJO Y LE HACES POLVO", + "CON EL QUE DEBES PONER ESPECIAL CUIDADO ES CON DRASCULA. SUS PODERES FRISISHNOSTICOS LE HACEN EL MAS PODEROSO DE LOS VAMPIROS", + "ESTARIAS PERDIDO A NO SER POR LA...", + // 30 + "...\255POCION!", + "OH, CLARO. TIENES RAZON, SI SIGO DURMIENDO ASI A LO MEJOR TENGO PROBLEMAS DE COLUMNA CUANDO SEA VIEJO", + "BUENO, ADMITO QUE RESULTO MEJOR ADVERSARIO QUE YO, PERO MI PRINCIPAL HALLAZGO EN EL ESTUDIO DE TECNICAS ANTI-VAMPIROS FUE LO QUE ME CUBRIO LAS ESPALDAS", + "DESCUBRI UNA POCION DE INMUNIDAD. TE HACE INVULNERABLE ANTE CUALQUIER MORDEDURA DE VAMPIRO, O A SUS PODERES FRSISSHNOTICOS", + "NO, PERDONA LA TUVE EN SU DIA, PERO UNA POCION DE ESAS CARACTERISTICAS ES PELIGROSA. IMAGINATE SI CAYERA EN MANOS DE UN VAMPIRO", + // 35 + "LE HARIA INMUNE A LOS AJOS, A LA LUZ DEL SOL... ASI QUE TUVE QUE DESHACERME DE LO QUE NO USE POR EL CIENTIFICO METODO DE TIRARLO A LA TAZA DEL WATER", + "TRANQUILO, ME ACUERDO PERFECTAMENTE DE COMO PREPARAR ESA POCION ", + "NECESITO AJOS, QUE DE ESO YA TENGO, PERO ME TENDRAS QUE CONSEGUIR ALGO DE CERA, NICOTINA, UN CHICLE, Y UN PAPEL DE FUMAR, O UNA SERVILLETA, O ALGO PARECIDO", + "\255AH! Y POR SUPUESTO, EL INGREDIENTE PRINCIPAL: UNAS HOJAS DE UNA EXTRA\245A PLANTA LLAMADA FERNAN", + "SE TRATA DE UNA PLANTA ENREDADERA CUYAS HOJAS PROPORCIONAN PODERES MAGICOS SI SE CORTAN CON UNA HOZ DE ORO", + // 40 + "PUES YA SABES, EN CUANTO TENGAS ESAS CINCO COSAS ME LAS TRAES Y TE PREPARARE LA POCION", + "DESPUES ESTARAS LISTO PARA LUCHAR CON DRASCULA", + "RECUERDA: CERA, NICOTINA, UN CHICLE, UN PAPEL Y UNAS HOJAS DE FERNAN, LA PLANTA, CORTADAS CON UNA HOZ DE ORO", + "\255YA TE LO HE DICHO! FUE TODO GRACIAS A LA POCION", + "AH, MUY BIEN. VOY ENTONCES A PREPARARME EL PO... LA POCION. SOLO TARDO UN MOMENTO", + // 45 + "ES UN SORTILEGIO DE PROTECCION CONTRA VAMPIROS", + "LO PUSE PARA DISIMULAR QUE EL DIBUJANTE SE OLVIDO DE PONER LA VENTANA QUE SE VE DESDE FUERA", + "BUENO, LO PRIMERO QUE DEBES SABER ES COMO SE VA AL CASTILLO DRASCULA", + "HAY UNA GRUTA QUE LLEVA DIRECTAMENTE AL CASTILLO Y QUE ESE LOCO FAN DE ELVIS, IGOR, USA PARA BAJAR AL PUEBLO POR LAS MA\245ANAS", + "PERO TEN CUIDADO, SIEMPRE ESTA PROTEGIDA POR UN VAMPIRO. TENDRAS QUE LIBRARTE DE EL", + // 50 + "HAY UN VIEJO POZO AL LADO DE LA CAPILLA DEL CEMENTERIO", + "SE USABA ANTIGUAMENTE PARA JUZGAR CASOS DE BRUJERIA", + "SE TIRABA A LAS BRUJAS AL POZO. SI SE HUNDIAN ERAN BRUJAS. SI NO, NO", + "UNA VEZ TIRAMOS A UNA Y NO SE HUNDIO, ASI QUE NO SERIA BRUJA", + "A LO QUE VAMOS: TOMA TU POCION, PERO SOLO ME HA DADO PARA UNO", + // 55 + "LO MEJOR ES QUE TE LO FUMES JUSTO ANTES DE ENFRENTARTE A DRASCULA", + "CORRE", + "\255EXCUSAS!", + "\250JOHN HACKER? SOY EL DOCTOR VON BRAUN", + "ESCUCHEME, ES MUY IMPORTANTE. ES SOBRE LA POCION", + // 60 + "ME HE ENCONTRADO UN LIBRO SOBRE POCIONES Y DICE QUE NO DEBE USTED BEBER ALCOHOL UNA VEZ SE HAYA FUMADO LA POCION", + "EL ALCOHOL INGERIDO REACCIONA CON LAS SUSTANCIAS DE LA POCION Y ANULA SUS EFECTOS EN DECIMAS DE SEGUNDO", + "TENGO QUE COLGAR. LA POLICIA ME BUSCA. DICEN QUE TRAFICO CON DROGAS \255IGNORANTES! BUENO, ADIOS Y SUERTE SALVANDO AL MUNDO", +}, +{ + // 0 + "", + "WER ZUM TEUFEL KLINGELT UM DIESE UHRZEIT ?", + "aeH......NEIN, NEIN. ICH BIN HELGE SCHNEIDER...HERR PROFESSOR VON BRAUN ...aeH...WOHNT HIER NICHT MEHR", + "NEIN, ICH WEISS NICHT WO ER IST !", + "NUN GEH SCHON !", + // 5 + "TROTTEL. ES IST SCHON ZU SPaeT, WIE IMMER", + "ICH BIN ABSOLUT EINVERSTANDEN", + "ICH UND DIE HOSEN VOLL ?", + "DAMIT DAS KLAR IST, KURZER : DU SPRICHST GERADE MIT DEM EINZIGEN DER DAS GEHEIMREZEPT GEGEN VAMPIRE HAT", + "NICHT JEDER KANN GEGEN EINEN VAMPIR ANTRETEN.MAN MUSS EIN PAAR GANZ BESONDERE EIGENSCHAFTEN BESITZEN", + // 10 + "DU HAST SIE NICHT", + "WETTEN NICHT ? 100.000 MARK, DASS NICHT !", + "SCHON GUT, KOMM REIN", + "WENN DU DICH DRACULA WIRKLICH STELLEN WILLST WIRST DU ALLE DIESE VAMPIRTYPISCHEN SAUG-UND QUIETSCHGERaeUSCHE ERTRAGEN MueSSEN", + "IST DAS KLAR ?", + // 15 + "O.K. WARTE MAL EINEN MOMENT", + "STELL DICH BITTE MAL IN DIE MITTE DES ZIMMERS", + "GUCKEN WIR MAL. WO IST DIESE PLATTE MIT\"FINGERNaeGEL KRATZEN AN DER TAFEL ENTLANG\" ?", + "SEHR GUT, GEHEN WIR DA HIN", + "SIEHST DU, DU BIST GENAUSO UNFaeHIG WIE ALLE ANDEREN !", + // 20 + "JETZT GIB MIR DAS GELD,UM DAS WIR GEWETTET HABEN UND KOMM HER", + "UND KOMM ERST DANN WIEDER, WENN DU 100%IG VORBEREITET BIST", + "UND WAS WILLST DU JETZT ?", + "ICH MUSS ZUGEBEN, DASS DU DAS NoeTIGE TALENT ZUR VAMPIRJAGD HAST", + "ueBRIGENS, HIER IST DEIN GELD. ICH HABE MICH GEIRRT", + // 25 + "UND JETZT GEH, ICH MoeCHTE MICH HINLEGEN", + "KOMM ZURueCK,WENN DU SO WEIT BIST, DICH EINEM VAMPIR GEGENueBERZUSTELLEN UND ICH WERDE DIR HELFEN", + "ACH, DAS IST GANZ EINFACH. EIN SONNENSTRAHL ODER EIN KRUZIFIX UND ER WIRD ZU STAUB", + "AM MEISTEN AUFPASSEN MUSST DU BEI DRASCULA..WEGEN SEINEN TRANSHYPNITISCHEN FaeHIGKEITEN IST ER DER GEFaeHRLICHSTE UNTER DEN VAMPIREN", + "DU WaeRST VERLOREN, ES SEI DENN DU HaeTTEST...", + // 30 + "....DIE MISCHUNG! ", + "JA, STIMMT, DU HAST RECHT. WENN ICH WEITERHIN SO LIEGE WERDE ICH IM HOHEN ALTER WOHL RueCKENPROBLEME HABEN", + "NAJA, ICH GEBE ZU DASS ER der bessere von uns war, ABER DIE WICHTIGSTE ERKENNTNIS IN MEINEM ANTI-VAMPIR-STUDIUM WAR, MIR EINEN BODYGUARD ZUZULEGEN", + "ICH HABE EINE IMMUNITaeTSMISCHUNG GEFUNDEN. MIT DER KANN DIR KEIN EINZIGER VAMPIRBISS ETWAS ANHABEN, UND AUCH NICHT SEINE TRANSHYPNISIE.", + "NEIN, TUT MIR LEID, ICH HATTE SIE damals, ABER EINE MISCHUNG DIESER KONSISTENZ IST SEHR GEFaeHRLICH, UND STELL DIR MAL VOR, ES GERaeT IN VAMPIRHaeNDE", + // 35 + "DAS WueRDE IHN IMMUN GEGEN KNOBLAUCH UND SONNENLICHT GEMACHT HABEN, DIE RESTE, DIE ICH NICHT MEHR FueR WISSENSCHAFTLICHE ZWECKE BRAUCHTE, landeten im klo", + "NUR DIE RUHE, ICH HABE DAS REZEPT KOMPLETT IM KOPF ", + "ICH BRAUCHE KNOBLAUCH,AH, HAB ICH SCHON, ABER DANN MUSST DU NOCH WACHS BESORGEN, NIKOTIN, KAUGUMMI UND EIN BLaeTTCHEN ODER EINE SERVIETTE ODER SO WAS", + "ACH KLAR ! UND DIE WICHTIGSTE ZUTAT : EIN PAAR BLaeTTER EINER SELTSAMEN PFLANZE DIE FREDDY HEISST", + "ES HANDELT SICH UM EINE TOPFBLUME DEREN BLaeTTER ZAUBERKRaeFTE HABEN, WENN MAN SIE MIT EINER GOLDSICHEL ABSCHNEIDET", + // 40 + "ALSO, DU WEISST SCHON, SOBALD DU MIR DIESE FueNF ZUTATEN GEBRACHT HAST, BEREITE ICH DIR DIE MISCHUNG ZU", + "DANACH BIST DU FueR DEN KAMPF GEGEN DRASCULA GERueSTET", + "DENK DRAN : WACHS, NIKOTIN, EIN KAUGUMMI, EIN BLaeTTCHEN UND EIN PAAR BLaeTTER VON FREDDY, MIT EINER GOLDSICHEL ABGESCHNITTEN", + "HAB ICH DIR DOCH SCHON GESAGT ! NUR DANK DER MISCHUNG", + "OK. ALLES KLAR. ICH FANG DANN MAL AN EINEN ZU BAUEN...aeH VORZUBEREITEN. DAUERT AUCH NICHT LANGE", + // 45 + "DAS IST EINE ZAUBERFORMEL, DIE VOR VAMPIREN SCHueTZT", + "DAS WAR ICH, DAMIT MAN NICHT MERKT, DASS DER ZEICHNER VERGESSEN HAT DAS FENSTER VON VORHIN ZU ZEICHNEN", + "ALSO, ZUERST MUSST DU WISSEN WIE MAN ZUM SCHLOSS VON DRASCULA KOMMT.", + "ES GIBT EINE GROTTE, DIE DIREKT ZUM SCHLOSS FueHRT, UND DURCH DIE IGOR, DIESER BEKLOPPTE ELVIS-FAN MORGENS IMMER ZUM DORF RUNTER GEHT", + "ABER PASS AUF, SIE WIRD PERMANENT VON EINEM VAMPIR BEWACHT, DEN DU ERSTMAL LOSWERDEN MUSST", + // 50 + "ES GIBT DA EINEN ALTEN BRUNNEN BEI DER FRIEDHOFSKAPELLE", + "FRueHER WURDE ER FueR HEXENPROZESSE BENUTZT", + "MAN WARF DIE HEXEN IN DEN BRUNNEN. WENN SIE UNTERGINGEN WAREN SIE HEXEN, WENN NICHT, DANN NICHT", + "EINMAL WARFEN WIR EINE RUNTER, DIE NICHT UNTERGING, ALSO WAR SIE KEINE HEXE", + "WENN WIR LOSGEHEN, NIMMST DU DEINE MISCHUNG, ABER WIR HABEN NUR FueR EINE PERSON", + // 55 + "AM BESTEN RAUCHST DU IHN DIR KURZ BEVOR DU DRACULA GEGENueBERSTEHST", + "LAUF !", + "BILLIGE AUSREDEN !", + "HEINZ HACKER ? ICH BIN DOKTOR VON BRAUN", + "HoeREN SIE ZU, ES IST SEHR WICHTIG. ES GEHT UM DIE MISCHUNG", + // 60 + "ICH HABE EIN BUCH ueBER MISCHUNGEN GEFUNDEN UND DA STEHT DASS MAN KEINEN ALKOHOL TRINKEN DARF, SOBALD MAN DIE MISCHUNG GERAUCHT HAT", + "DER ALKOHOL REAGIERT IM MAGEN MIT DEN SUBSTANZEN DER MISCHUNG UND VERNICHTET IHRE WIRKUNG BINNEN WENIGER MILLISEKUNDEN", + "ICH MUSS AUFLEGEN. DIE POLIZEI IST HINTER MIR HER. DIE IDIOTEN HALTEN MICH FueR EINEN DROGEN-DEALER !ALSO, TSCHueSS UND VIEL GLueCK !", +}, +{ + // 0 + "", + "QUI DIABLE APPELLE \267 CETTE HEURE-CI?", + "H... NON, NON. JE SUIS LE NAIN GANYM\324DE... LE PROFESSEUR VON BRAUN... N'HABITE DJ\267 L\267", + "NON, JE NE SAIS PAS O\353 IL EST!", + "VA-T'-EN!", + // 5 + "IMBCIL! C'EST DJ\267 TROP TARD! C'EST TOUJOURS TROP TARD!", + "JE SUIS TOUT-\267-FAIT CONFORME", + "MOI PEUR?", + "RENSEIGNE-TOI, MON GARS: TU PARLES AVEC LE SEUL QUI CONNA\327T LE SECRET POUR CONFRONTER LES VAMPIRES", + "TOUT LE MONDE N'EST PAS CAPABLE DE LUTTER AVEC UN VAMPIRE. IL FAUT DES QUALITS SPCIALES", + // 10 + "TU NE LES A PAS", + "EST-CE QUE TU PARIE TOUT L'ARGENT QUE TU AS \267 QUE C'EST NON?", + "\200A VA, ENTRE", + "SI EN V\220RIT\220 TU TE SENS CAPABLE DE CONFRONTER DRASCULA, IL FAUDRA QUE TU SUPPORTES TOUS LES BRUITS GRIN\200ANTS ET SU\200ANTS", + "C'EST CLAIR?", + // 15 + "D'ACCORD. ATTENDS UN INSTANT", + "METS-TOI AU MILIEU DE LA CHAMBRE, S'IL TE PLA\327T", + "VOYONS! O\353 EST-CE QUE J'AI MIS LE DISQUE \"ONGLES GRATTANT UN TABLEAU\"?", + "TR\324S BIEN. ON Y VA", + "TU VOIS? TU ES UN INCAPABLE, COMME TOUS LES AUTRES", + // 20 + "MAINTENANT DONNE-MOI L'ARGENT QUE TU AS PERDU ET VA-T'-EN", + "ET N'Y REVIENS \267 MOINS QUE TU SOIS COMPL\324TEMENT EN FORME", + "ET QUE VEUX-TU MAINTENANT?", + "JE DOIS LE RECONNA\327TRE... TU AS DES APTITUDES POUR LUTTER CONTRE LES VAMPIRES", + "EN FAIT, TIENS TON ARGENT. JE SAIS RECONNA\327TRE MES ERREURS", + // 25 + "MAINTENANT VA-T'-EN, JE VEUX DORMIR UN PEU ", + "QUAND TU SOIS PR\322T \267 TE CONFRONTER AVEC UN VAMPIRE, REVIENS ET TU POURRAS COMPTER SUR MOI", + "OH! C'EST FACIL. AVEC LA LUMI\324RE DU SOLEIL OU UN CRUCIFIX TU LE R\220DUIT EN CENDRES", + "MAIS TU DOIS FAIRE SP\220CIALE ATTENTION AVEC DRASCULA. GR\266CE \267 SES POUVOIRS FRISYSHNOSTIQUES C'EST LE PLUS PUISSANT DES VAMPIRES", + "JE SERAIS PERDU SI CE N'EST PAS POUR LA...", + // 30 + "...POTION!", + "OH, BIEN S\352R. TU AS RAISON, SI JE CONTINUE \267 DORMIR COMME \200\265, J'AURAI DES PROBL\324MES DE COLONNE DANS MA VIEILLESSE", + "bon, J'ACCEPTE QU'IL A \220T\220 MEILLEURE ADVERSAIRE QUE MOI, MAIS JE ME SUIS GARD\220 LE DOS GR\266CE \267 MA BONNE TROUVAILLE DANS L'\220TUDE DE TECHNIQUES ANTI-VAMPIRES", + "J'AI D\220COUVERT UNE POTION IMMUNOLOGIQUE QUI TE FAIT INVULN\220RABLE CONTRE N'IMPORTE QUELLE MORSURE DE VAMPIRE OU SES POUVOIRS FRSYSSHNOTIQUES", + "NON, EXCUSES-MOI. JE L'AI EUE, MAIS UNE POTION DE CES CARACT\220RISTIQUES EST DANGEREUSE. IMAGINE TOI SI ELLE TOMBAIT DANS LES MAINS D'UN VAMPIRE", + // 35 + "IL DEVIENDRAIT IMMUNIS\220 AUX AILS, \267 LA LUMI\324RE DU SOLEIL. DONC, J'AI D\352 M'EN D\220BARRASSER DES EXC\220DENTS PAR LA SCIENTIFIQUE M\220THODE DE LES JETER AUX \220GOUTS", + "RESTE TRANQUILLE, JE ME SOUVIENS PARFAITEMENT DE LA PR\220PARATION DE CETTE POTION", + "il me faut D'AIL, MAIS J'EN AI D\220J\267. IL FAUDRA UN PEU DE CIRE, DE LA NICOTINE, UN CHEWING-GUM ET UN PAPIER \267 CIGARETTES, OU QUELQUE CHOSE PAREILLE", + "AH! ET CERTAINEMENT, L'INGR\220DIANT PRINCIPAL: LES FEUILLES D'UNE \220TRANGE PLANTE APPEL\220E FERNAN", + "IL S'AGIT D'UNE PLANTE GRIMPANTE DONT LES FEUILLES FOURNISSENT DES POUVOIRS MAGIQUES SI ON LES COUPE AVEC UNE FAUCILLE EN OR", + // 40 + "TU LE SAIS D\220J\267. D\324S QUE TU AURAS CES CINQ TRUCS APPORTE-LES-MOI ET JE TE PR\220PARERAI LA POTION", + "APR\324S TU SERAS PR\322T POUR LUTTER CONTRE DRASCULA", + "RAPPELLE-TOI: DE LA CIRE, DE LA NICOTINE, UN CHEWING-GUM, UN PAPIER ET LES FEUILLES DE FERNAN, LA PLANTE, COUP\220ES AVEC UNE FAUCILLE EN OR", + "JE TE L'AI D\220J\267 DIT! TOUT A \220T\220 GR\266CE \267 LA POTION", + "AH! TR\324S BIEN! ALORS, JE VAIS ME PR\220PARER LE PO... LA POTION. JE N'AI QUE POUR UN MOMENT", + // 45 + "C'EST UN SORTIL\324GE DE PROTECTION CONTRE-VAMPIRES", + "JE L'AI MIS POUR DISSIMULER, LE DESSINATEUR AYANT OUBLI\220 D'Y METTRE LA FEN\322TRE QU'ON VOIT DU DEHORS", + "EH BIEN, CE QUE TU DOIS SAVOIR D'ABORD C'EST LA FA\200ON D'ALLER AU CH\266TEAU DE DRASCULA", + "IL Y A UNE GROTTE QUI M\324NE DIRECTEMENT AU CH\266TEAU ET QU'IGOR, CE FOU FAN D'ELVIS, EN UTILISE POUR SE RENDRE AU VILLAGE LE MATIN", + "MAIS FAIT ATTENTION, ELLE TOUJOURS GARD\220E PAR UN VAMPIRE. TU DEVRAS T'EN D\220BARRASSER", + // 50 + "IL Y A UN VIEUX PUITS \267 C\342T\220 DE LA CHAPELLE DU CIMETI\324RE", + "ON L'UTILISAIT JADIS POUR JUGER DES AFFAIRES DE SORCELLERIE", + "ON JETAIT LES SORCI\324RES AU PUITS. SI ELLES COULAIENT, ON \220TAIT S\352R; AUTREMENT, PAS", + "UNE FOIS ON A JET\220 UNE ET ELLE N'AS PAS COUL\220, DONC ELLE NE SERAIT PAS UNE SORCI\324RE", + "MAINTENANT GARDE \267 LA QUESTION QUI NOUS INT\220RESSE: TIENS TA POTION, MAIS ON NE M'A PAS DONN\220 QUE POUR UN SEULEMENT.", + // 55 + "IL VAUDRA MIEUX QUE TU LA FUMES JUSTE AVANT DE CONFRONTER DRASCULA", + "COURS!", + "DES EXCUSES!", + "JHON HACKER? SUIS LE DOCTEUR VON BRAUN", + "\220COUTEZ-MOI. C'EST TR\324S IMPORTANT. C'EST SUR LA POTION", + // 60 + "DANS UN LIVRE QUE J'AI TROUV\220 SUR LES POTIONS, IL DIT QUE VOUS NE DEVEZ PAS BOIR DE L'ALCOOL APR\324S AVOIR FUM\220 LA POTION ", + "L'ALCOOL AVAL\220 R\220AGIT AVEC LES INGR\220DIENTS DE LA POTION ET ANNULE SES EFFETS EN DIXI\324MES DE SECONDE", + "JE DOIS RACCROCHER. SUIS CHERCH\220 PAR LA POLICE. ILS DISENT QUE JE TRAFIQUE EN DROGUES -IGNORANTS! AU REVOIR ET BONNE CHANCE EN SAUVANT LE MONDE", +}, +{ + // 0 + "", + "MA CHI BUSSA A QUESTE ORE?", + "EH...NO,NO. IO SONO IL NANNO GANIMEDI....IL PROFESSORE VON BRAUN NON ABITA QU\336 PI\353", + "NO, NON SO DOV'\324!", + "HO DETTO VIA!", + // 5 + "IMBECILE. ORMAI TROPPO TARDE, SEMRE TARDE", + "SONO COMPLETAMENTE D'ACCORDO", + "IO, PAURA?", + "ASCOLTA BENE RAGAZZO: STAI PARLANDO CON L'UNICA PERSONA CHE CONOSCE IL SEGRETO PER VINCERE AI VAMPIRI", + "NON TUTTI QUANTI POSSONO LOTTARE CON UN VAMPIRO. SI DEVONO AVERE DELLE CARATTERISTICHE SPEZIALI", + // 10 + "NO CE LE HAI", + "SICURO CHE NON SCOMMETI TUTTO IL TUO SOLDI!", + "VA BENE . AVANTI", + "SE DAVVERO SEI PRONTO PER LOTTARE CONTRO DRASCULA, DEVI POTERE SOPPORTARE TUTTI I RUMORI STRIDENTI E VAMPIRICI", + "TUTTO CHIARO?", + // 15 + "D'ACCORDO. ASPETTA UN ATTIMO", + "PER FAVORE, METTETI NEL CENTRO DELLA CAMERA", + "DOV'\324 HO MESSO IL COMPACT DISC DI \"UNGHIE GRAFFIANDO UNA LAVAGNA\"", + "MOLTO BENE, ANDIAMO", + "VEDI? SEI UN INUTILE, COME TUTTI GLI ALTRI", + // 20 + "ORA DAMI IL SOLDI CHE HAI PERSO, E VIA", + "E NON TORNARE FINO CHE NON SIA COMPLETAMENTE PRONTO", + "E COSA VUOI TU ADESSO?", + "DEVO AMMETTERLO... HAI LA STOFFA DI LOTTATORE PER VINCERE DRASCULA", + "EH..! PRENDI IL TUO SOLDI. SO QUANDO HO SBAGLIATO", + // 25 + "ADESSO VATENE, VOGLIO DORMIRE UN P\343", + "QUANDO SIA DISPOSTO A UCCIDERE QUALCHE VAMPIRO, TORNA E TI AIUTER\343 ", + "QUELLO \324 FACILE. LA LUCE DEL SOLE O UN CROCIFISSO, E L'HAI SCHISCCIATO", + "CON CHI DEVI FARE MOLTA ATTENZIONE \324 CON DRASCULA. I SUOI POTERI FRISISHNOSTICI GLI FANNO IL PI\353 FORTE DEI VAMPIRI", + "NON POTREI FARE NULLA SE NON FOSSE PER LA .....", + // 30 + "...POZIONE!", + "CERTO. HAI RAGIONE, SE CONTINUO DORMENDO COS\336 FORSE AVR\343 PROBLEMI DI SCHIENA QUANDO SIA VECCHIO", + "BENE, \324 VERO CHE FU MEGLIO LOTTATORE DI ME, MA IL MIO STUDIO SU TECNICHE ANTI-VAMPIRI GLI AIUT\343 MOLTISSIMO", + "HO SCOPERTO UNA POZIONE DI IMMUNUT\267 . TI FA INVULNERABILE AI MORSI DI VAMPIRI, O AI SUOI POTERI FRISISHNOTICI", + "NO, SCUSA, CE L'EBBI MOLTO TEMPO FA, MA UNA POZIONE COM'ERA LA MIA \324 PERICOLOSA. FIGURATI SE LA AVESSE UN VAMPIRO", + // 35 + "GLI FAREBBE IMMUNE AGLI AGLII, ALLA LUCE DEL SOLE.... PER QUELLO L'HO SCARICATA NEL CESO", + "TRANQUILLO, MI RICORDO BENISSIMO DI COME RIFARLA", + "BISOGNO AGLII, CHE NE HO QU\326, DOVRAI PORTARMI UN P\220 DI CERA, NICOTINA, UNA GOMMA, E UNA CARTINA O UN TOVAGLIOLO, O QUALCOSA DEL GENERE", + "-AH! E COME NO, L'INGREDIENTE PRINCIPALE: DELLE FOGLIE DI UNA STRANA PIANTA CHIAMATA FERDINAN", + "\324 UNA PIANTA CONVOLVOLO, LE SUE FOGLIE PROPORZIONANO POTERI MAGICI SE SONO TAGLIATE DA UNA FALCE D'ORO", + // 40 + "ALLORA, PORTAMI QUESTE CINQUE COSE E FAR\343 PER TE LA POZIONE", + "DOPO SAREI PRONTO PER UCCIDERE DRASCULA", + "RICORDA: CERA, NICOTINA, UNA GOMMA, UNA CARTINA E FOGLIE DI FERDINAN, LA PIANTA, TAGLIATE DA UNA FALCE D'ORO", + "TI L'HO GI\267 DETTO! FU TUTTO GRAZIE ALLA POZIONE", + "AH, MOLTO BENE. DUNQUE VADO A FARE LA CAN......LA POZIONE. SAR\267 UN ATTIMINO", + // 45 + "\324 SOLTANTO UN SORTILEGIO DI PROTEZIONE CONTRO VAMPIRI", + "L'HO MESSO PER DISSIMULARE CHE IL DISEGNATORE HA DIMENTICATO METTERE LA FINESTRA CHE SI VEDE DA FUORI", + "BENE, PRIMA DEVI SAPERE COME ARRIVARE AL CASTELLO DRASCULA", + "C'\324 UNAGROTTA CHE VA AL CASTELLO E CHE UTILIZZA QUEL MATTO FAN DI ELVIS, IGOR, PER SCENDERE AL PAESE TUTTE LA MATTINE", + "MA FA ATTENZIONE, SEMPRE \220 PROTETTA DA UN VAMPIRO. DOVRAI LIBERARTI DI LUI", + // 50 + "C'\220 UN VECCHIO POZZO ACCANTO ALLA CAPELLA DEL CIMITERO", + "SI UTILIZZAVA MOLTO TEMPO FA PER GIUDICARE CASI DI STREGONERIA", + "SI BUTTAVANO DENTRO ALLE STREGE. SE SI AFFONDAVANO ERANO STREGHE. SE NO, NO", + "UNA VOLTA BUTTAMMO UNA E GALLEGGI\220, DUNQUE NON SAREBBE UNA STREGA", + "ORA BEVE LA POZIONE. PECCATO CI SIA SOLTANTO PER UNO", + // 55 + "SAR\265 MEGLIO FUMARLO PROPRIO PRIMA DELLA LOTTA CONTRO DRASCULA", + "CORRI1", + "SCUSE!", + "JOHN HACKER? SONO IL DOTTORE VON BRAUN", + "SENTA, \220 MOLTO IMPORTANTE, \220 SULLA POZIONE", + // 60 + "HO TROVATO UN LIBRO SU POZIONI E DICE CHE NON SI DEVE BERE ALCOL DOPO AVERE FUMATO LA POZIONE", + "L'ALCOL BEVUTO FA REAZIONE CON LE SOSTANZE DELLA POZIONE E ANNULLA I SUOI EFFETTI IN DECIME DI SECONDO", + "DEVO RIATTACARE. LA POLIZIA MI CERCA. DICONO CHE TRAFFICO DROGHE -IGNORANTI! BENE, ALLORA ADIO E IN BOCA IL LUPO", +}, +}; + + +const char *_textsys[][4] = { +{ + "PRESS 'DEL' AGAIN TO RESTART", + "PRESS 'ESC' AGAIN TO EXIT", + "SPEECH ONLY", + "TEXT AND SPEECH", +}, +{ + "PULSA DE NUEVO SUPR PARA EMPEZAR", + "PULSA DE NUEVO ESC PARA SALIR", + "SOLO VOCES", + "VOZ Y TEXTO", +}, +{ + "BETaeTIGEN SIE ERNEUT entf UM ANZUFANGEN", + "BETaeTIGEN SIE ERNEUT ESC UM ZU BEENDEN", + "NUR STIMMEN", + "STIMME UND TEXT", +}, +{ + "APPUYEZ \267 NOUVEAU SUR SUPR POUR COMMENCER", + "APPUYEZ \267 NOUVEAU SUR ESC POUR SORTIR", + "SEULEMENT DES VOIX", + "VOIX ET TEXT", +}, +{ + "PREMI DI NUOVO SUPR PER COMINZIARE", + "PRMI DI NUOVO ESC PER USCIRE", + "SOLO SUONI", + "SUONI E TESTO", +}, +}; + + +const char *_texthis[][5] = { +{ + "", + "A long time ago, it seems that Drascula killed Von Braun's wife, and then, as he intended to face the count, Von Braun started to investigate all he found vampires.", + "When he thought he was ready, he came up to the castle and had a very violent encounter with Drascula.", + "Nobody knows exactly what happened there. Although Von Braun lost, Drascula could not kill him.", + "Von Braun felt humiliated by his defect, run away from the castle and has never dared to face Drascula ever again.", +}, +{ + "", + "", + "", + "", + "" +}, +{ + "", + "", + "", + "", + "" +}, +{ + "", + "", + "", + "", + "" +}, +{ + "", + "", + "", + "", + "" +}, +}; + + +const char *_textd1[][11] = { +{ + // 68 + "44472225500022227555544444664447222550002222755554444466", + "444722255000222275555444446655033336666664464402256555005504450005446", + // 70 + "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", + "550330227556444744446660004446655544444722255000222275555444446644444", + "55033022755644455550444744400044504447222550002222755554444466000", + "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", + "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", + // 75 + "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", +}, +{ + // 68 + "4447222550002222755554444466", + "55033336666664464402256555005504450005446", + // 70 + "550333226220044644550044755665500440006655556666655044744656550446470046", + "74444666000444665554444444", + "5555044474440004450000", + "4444722744446664464404446554440055655022227500544446044444446", + "4447222550002222755444446666055522275550005550022200222000222666", + // 75 + "4444777444455550022220555044444446666622526644475533223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555000444555033022755644446666005204402266222003332222774440446665555005550335544444", + "5666500444555033022755555000444444444444444444444444444444" + "00222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", +}, +{ + // 68 + "44472225500022227555544444664447222550002222755554444466", + "444722255000222275555444446655033336666664464402256555005504450005446", + // 70 + "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", + "550330227556444744446660004446655544444722255000222275555444446644444", + "55033022755644455550444744400044504447222550002222755554444466000", + "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", + "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", + // 75 + "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", +}, +{ + // 68 + "44472225500022227555544444664447222550002222755554444466", + "444722255000222275555444446655033336666664464402256555005504450005446", + // 70 + "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", + "550330227556444744446660004446655544444722255000222275555444446644444", + "55033022755644455550444744400044504447222550002222755554444466000", + "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", + "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", + // 75 + "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", +}, +{ + // 68 + "44472225500022227555544444664447222550002222755554444466", + "444722255000222275555444446655033336666664464402256555005504450005446", + // 70 + "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", + "550330227556444744446660004446655544444722255000222275555444446644444", + "55033022755644455550444744400044504447222550002222755554444466000", + "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", + "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", + // 75 + "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", +}, + +}; + + +const char *_textverbs[][6] = { +{ + "look", + "take", + "open", + "close", + "talk", + "push", +}, +{ + "mirar", + "cogar", + "abrir", + "cerrar", + "hablar", + "mover", +}, +{ + "Schau", + "Nimm", + "oeFFNE", + "Schliesse", + "Rede", + "Druecke", +}, +{ + "regardez", + "ramassez", + "ouvrez", + "fermez", + "parlez", + "poussez", +}, +{ + "esamina", + "prendi", + "apri", + "chiudi", + "parla", + "premi", +}, +}; + + +const char *_textmisc[][2] = { +{ + "HUNCHBACKED", + "Transilvania, 1993 d.c.", +}, +{ + "jorobado", + "Transilvania, 1993 d.c. (despues de cenar)", +}, +{ + "HUNCHBACKED", + "Transilvania, 1993 d.c.", +}, +{ + "HUNCHBACKED", + "Transilvania, 1993 d.c.", +}, +{ + "HUNCHBACKED", + "Transilvania, 1993 d.c.", +}, +}; + +} // End of namespace Drascula + +#endif /* STATICDATA_H */ diff --git a/engines/drascula/texts.cpp b/engines/drascula/texts.cpp deleted file mode 100644 index c84f176d35..0000000000 --- a/engines/drascula/texts.cpp +++ /dev/null @@ -1,5360 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "drascula/drascula.h" - -namespace Drascula { - -const char *_text[][501] = { -{ - // 0 - "", - "ITS THE SECOND BIGGEST DOOR I'VE SEEN IN MY LIFE", - "NOT REALLY", - "THE CHURCH IS ALL BOARDED UP, IT MUST HAVE BEEN ABANDONED SEVERAL YEARS AGO", - "I HAVEN'T OPENED IT", - // 5 - "WHAT SHOULD I DO, SHOULD I PULL IT OFF?", - "HI THERE DOOR, I'M GOING TO MAKE YOU A DOOR-FRAME", - "IT'S TOO MUCH FOR ME", - "THERE'S A WINDOW STOPPING THE GAME FROM WORKING PROPERLY", - "I CAN'T", - // 10 - "YES, THAT'S DONE", - "WHY?", - "HI WINDOW, ARE YOU DOING ANYTHING TONIGHT?", - "NOT WITHOUT PERMISSION FROM THE TOWN HALL", - "IF ONLY THIS WINDOW WASN'T BOARDED UP...", - // 15 - "YOO-HOO WINDOW!", - "HI THERE", - "LIKE MICROCHOF'S", - "I CAN'T REACH", - "IT'S ALRIGHT WHERE IT IS", - // 20 - "", - "ITS A COFFIN IN THE SHAPE OF A CROSS", - "NO THANKS", - "HI DEAD MAN. NO, DON'T GET UP FOR MY SAKE", - "YES, JUST LIKE IN POLTERGEIST", - // 25 - "", - "", - "I'LL BE BACK IN FIFTEEN MINUTES", - "FORBIDDEN TO PUT UP POSTERS", - "IT'S UNCLE EVARISTO'S TOMB", - // 30 - "ITS LOCKED", - "I'VE GOT ONE", - "YOO HOO, UNCLE EVERISTO!", - "THERE'S NO REPLY", - "IT'S NOT WELL PARKED", - // 35 - "IT'S A DOOR", - "A DRAWER IN THE TABLE", - "A SUSPICIOUS WARDROBE", - "HI WARDROBE, HOW ARE YOU?", - "", - // 40 - "", - "IT'S AN ANCIENT CANDELABRUM", - "IT MUST HAVE BEEN HERE EVER SINCE YULE BRINNER HAD HAIR ON HIS HEAD", - "NO, ITS A RELIC", - "ITS A NICE ALTARPIECE", - // 45 - "", - "HA, HA, HA", - "", - "NO", - "", - // 50 - "HA, HE, HI, HO, HU, GREAT!", - "", - "", - "", - "I CAN'T SEE ANYTHING IN PARTICULAR", - // 55 - "IT'S FERNAN, THE PLANT", - "IT'S ONE OF THE FENCES SPIKES", - "HEY! THERE'S A PACKET OF MATCHES UNDER HERE", - "LOOK! A PACKET OF KLEENEX, AND ONE'S STILL UNUSED", - "THERE ISN'T ANYTHING ELSE IN THE BUCKET", - // 60 - "IT'S A BLIND MAN WHO CAN'T SEE", - "", - "", - "", - "", - // 65 - "THAT'S A GREAT DEAL OF MONEY", - "", - "", - "", - "", - // 70 - "", - "", - "", - "", - "", - // 75 - "", - "", - "", - "", - "", - // 80 - "", - "", - "", - "", - "", - // 85 - "", - "", - "", - "", - "", - // 90 - "", - "", - "", - "", - "", - // 95 - "", - "", - "", - "", - "", - // 100 - "THERE IS NOTHING SPECIAL ABOUT IT", - "IT'S NOT UNUSUAL", - "HEY, WHAT'S UP MAN?", - "HI", - "NOTHING NEW?", - // 105 - "HOW IS THE FAMILY?", - "THAT IS JUST LIKE YOU!", - "BUT HOW DO I GET THAT?", - "MY RELIGION DOES NOT ALLOW ME", - "IT'D BE BETTER NOT", - // 110 - "YEAH, SURE MAN!", - "NO WAY", - "IMPOSSIBLE", - "THIS WILL NOT OPEN", - "I CAN'T DO IT BY MYSELF", - // 115 - "I COULD DO IT, BUT I JUST FEEL A LITTLE LAZY", - "I DO NOT SEE THE REASON", - "IT'S A QUITE NICE BRAIN", - "AND SO BRAIN, WHAT ARE YOU UP TONIGHT?", - "NO, IT MUST BE KEPT SOMEWHERE AWAY FROM THE MUTANT ACTION OF THE ATMOSPHERE", - // 120 - "HE IS VERY STIFF, JUST LIKE MY BOSS", - "A VERY SHARP STICK", - "YOU FAITHFUL SHARP-PAINTED STICK, NOBLE TRANSILVAAANIAN OAK TREE", - "DAMN, I HAVE TO CUT MY NAILS!", - "B.J. IS IN THERE... SHE IS A REALLY HOT CHICK!", - // 125 - "IT IS FIRMLY LOCKED", - "\"SAVE AWAY LOCKS LTD.\"", - "IT IS THE TYPICAL SKELETON YOU FIND IN THE DUNGEONS OF ALL THE GAMES", - "IT IS COMMONLY USED TO COMMUNICATE ELECTRICITY TO THE MACHINES CONNECTED TO IT", - "IT IS ABSOLUTELY HAND MADE BECAUSE THE JAPANESE MAKE THEM POCKET SIZE", - // 130 - "I HAVE ONLY SEEN IN MY LIFE ANOTHER THING AS UGLY AS THIS ONE", - "FORGET IT. I AM NOT GOING TO TELL HIM ANYTHING IN CASE HE GETS MAD", - "IT SEEMS QUITE RATIONAL", - "IT IS A PICTURE OF PLATO WRITING HIS LOST DIALOGUE", - "I AM NOT ONE OF THOSE WHO TALKS TO POSTERS", - // 135 - "THAT'S A VERY CUTE DESK", - "IT IS A VAMPIRES HUNTER'S DIPLOMA OFFICIALLY APPROVED BY OXFORD UNIVERSITY", - "IT'S A DARK NIGHT WITH FULL MOON", - "IT SEEMS LIKE THESE SCREWS ARE NOT MUCH TWISTED", - "DON'T LOOK NOW, BUT I THINK THAT A HIDDEN CAMERA IS FOCUSING ON ME", - // 140 - "THAT'S A VERY MODERN STICK DETECTOR", - "NO. THE LABORATORY IS ON THE SECOND FLOOR", - "A NICE BEDSIDE TABLE", - "IT'S A LOT OF MONEY THAT CAN'T BE MISSING IN ANY VALUABLE ADVENTURE", - "IF I WERE A RICH MAN, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", - // 145 - "THOSE ARE STRANGE LEAVES. THEY MUST HAVE BROUGHT THEM FROM SOUTH AMERICA OR AROUND THERE", - "I DON'T THINK THEY WOULD ANSWER ME", - "THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY GET ALL THE BEAUTY WITHIN IT", - "I ONLY PRAY BEFORE I GO TO BED", - "HEY, THIS PIKE SEEMS A LITTLE BIT LOOSE!", - // 150 - "I HOPE YOU WON'T COMPLAIN ABOUT GETTING NO CLUES FROM ME", - "IT'S A QUITE CONVENTIONAL PIKE", - "THEY ARE CUTE, THOUGH THEY ARE COVERED WITH A LITTLE BIT OF SHIT", - "NO, THEY WON'T HEAR ME. HA,HA,HA THIS IS GREAT!", - "\"SLEEPING BEAUTY\" FROM CHAIKOSKY, OR CHOIFRUSKY, OR WHATEVER IT IS", - // 155 - "VERY TEMPTING", - "NO, I'M NOT ONE OF THOSE WHO PUT USED BUBBLE GUMS IN THEIR MOUTH", - "THAT'S A VERY NICE SICKLE. I WONDER WHERE THE HAMMER MAY BE", - "TOBACCO MANUFACTURERS WARN ABOUT HEALTH BEING SERIOUSLY DAMAGED BY SANITARY AUTHORITIES", - "AN ABSOLUTELY NORMAL CANDLE, INCLUDING WAX AND EVERYTHING", - // 160 - "THESE TWO SHINY COINS DO REALLY GLITTER!", - "THIS SHINY COIN DOES REALLY GLITTER!", - "WITH THIS I WILL BE IMMUNE AGAINST VAMPIRE'S BITES", - "NO, IT'S IS NOT THE RIGHT MOMENT YET", - "THERE IS A ONE THOUSAND BILL AND A COUPLE COINS", - // 165 - "IT SAYS \"PLEASE, DO NOT THROW FOOD TO THE PIANIST\"", - "OMELET, 200. FRIED FISH, 150, MAYONNAISE POTATOES, 225", - "BEST BURGERS ON THIS SIDE OF THE DANUBE, ONLY FOR 325!", - "THAT'S A NICE SKULL WITH A VERY PENETRATING LOOK, HA, HA, HA, HA, THAT WAS GOOD!", - "HI SKULL, YOU REMIND ME OF UNCLE HAMLET", - // 170 - "I HAVE THE HABIT OF NOT TOUCHING THINGS THAT HAVE BEEN ALIVE", - "IT'S A BIN", - "IT'S A BET FOR TONIGHT'S GAME", - "I WONDER WHAT THERE IS BEHIND THAT", - "HEY, THAT CURTAIN IS NOT MOVING!", - // 175 - "MAN, THIS CASTLE IS REALLY GLOOMY", - "I CAN'T, HE IS TOO FAR AWAY TO HEAR ME", - "IT'S THE TYPICAL TRANSILVANIAN FOREST, WITH TREES", - "MAN YOU REALLY SAY STUPID THINGS, AND THIS IS TOO DARK!", - "GARCIA, CANDY STORE. SWEETS AND BUBBLE GUM", - // 180 - "A VERY NICE DOOR", - "IT'S CLOSED", - "A COMPLETELY LOCKED BARREL", - "", - "AREN'T THESE BUGS REALLY CUTE?", - // 185 - "BSSST, PUSSYCAT... LITTLE CAT", - "THERE IS NO ANSWER", - "THE MOON IS A SATELLITE THAT TURNS AROUND THE EARTH WITH A REVOLUTION PERIOD OF 28 DAYS", - "HI, LOONY MOON", - "IT'S TOTALLY BLOCKED UP WITH PLANKS", - // 190 - "IT'S IMPOSSIBLE. NOT EVEN THAT TOUGH GUY FROM TV COULD OPEN THIS", - "HEY! THE SHADOW OF THAT CYPRESS LOOKS PROLONGED TO ME!", - "YOU, BARTENDER...!!", - "I WOULD LIKE TO HAVE A ROOM PLEASE", - "DO YOU KNOW WHERE I CAN FIND THE SO CALLED DRASCULA?", - // 195 - "YES, SO WHAT?", - "SO?", - "IS...THAT RIGHT?", - "GOOD QUESTION. NOW, LET ME TELL YOU MY STORY. LOOK...", - "IT'S JUST FIVE MINUTES", - // 200 - "I'M JOHN HACKER AND I REPRESENT A BRITISH PROPERTY COMPANY", - "AS FAR AS I KNOW, COUNT DRASCULA WANTS TO BUY SOME PIECES OF LAND IN GIBRALTAR AND MY COMPANY SENT ME HERE TO NEGOTIATE THE SELLING", - "I THINK I'M GOING BACK TO MY MUM'S TOMORROW FIRST THING IN THE MORNING", - "BEAUTIFUL NIGHT, HUH?", - "NO, NOTHING", - // 205 - "YOU...PIANIST...!!!!", - "BEAUTIFUL NIGHT", - "AND IT'S NOT EVEN COLD OR ANYTHING", - "ALL RIGHT, I'LL JUST LET YOU GO ON PLAYING", - "WELL THEN", - // 210 - "HI BOSS, HOW ARE YOU?", - "AND HOW IS THE FAMILY?", - "THIS IS QUITE GROOVY, HUH?", - "I'D BETTER NOT SAY ANYTHING", - "THERE IS NO PLACE LIKE HOME. THERE IS NO...WHAT?, BUT YOU ARE NOT AUNT EMMA. AS A MATTER OF FACT, I DON'T HAVE ANY AUNT EMMA!", - // 215 - "YES, SO DOES MINE. YOU CAN CALL ME ANYTHING YOU WANT, BUT IF YOU CALL ME JHONNY, I'LL COME TO YOU LIKE A DOG", - "AREN'T I JUST A FUNNY GUY, HUH?. BY THE WAY, WHERE AM I?", - "YES", - "SHOOT...!", - "OH, SURE...OF COURSE!", - // 220 - "WELL, THANKS VERY MUCH FOR YOUR HELP. I WON'T BOTHER YOU ANYMORE IF YOU PLEASE TELL ME WHERE THE DOOR IS...", - "IT'S BECAUSE THE KNOCK MUST HAVE AFFECTED MY BRAIN...I CAN'T SEE A THING...", - "WELL...THAT DOESN'T MATTER. I ALWAYS CARRY A SPARE ONE", - "WOW, WHAT A HOT CHICK!! I DIDN'T NOTICE!, BUT OF COURSE, I WASN'T WEARING MY GLASSES", - "HEY...", - // 225 - "AND ALL THIIIISSS???", - "DON'T WORRY B.J. HONEY, I'LL SAVE YOU FROM FALLING INTO HIS CLUTCHES...", - "YOU REALLY GOT ME MAD MAN...", - "AHHH A WEREWOLF!! DIE YOU DAMNED EVIL!", - "YES, WELL...", - // 230 - "YES, WELL...I THINK I'LL JUST GO ON MY WAY. EXCUSE ME", - "WHAT?", - "TO TELL YOU THE TRUTH...ON SECOND THOUGHTS...I DON'T REALLY THINK SO", - "AND SO TELL ME YOU ERUDITE PHILOSOPHER, IS THERE ANY RELATIONSHIP CAUSE-AND-EFFECT BETWEEN SILLY AND BILLY?", - "OK, OK, FORGET IT. I DON'T EVEN KNOW WHO I SAID ANYTHING ABOUT IT", - // 235 - "WHAT ARE YOU DOING HERE PHILOSPOZING INSTEAD OF BEING EATING SOME PEOPLE", - "HOW COME?", - "HEY, COULD YOU SAY AGAIN ALL THAT ABOUT PRE-EVOLUTIONARY RELATIONSHIPS?", - "YES, MAN. ALL THAT STUFF YOU TOLD ME ABOUT BEFORE. I DIDN'T GET IT VERY WELL, YOU KNOW", - "NO, I'D RATHER NOT SAY ANYTHING, IN CASE HE GETS ANGRY OR SOMETHING...", - // 240 - "HELLO?", - "YES, WHAT'S UP?", - "WELL, NOW THAT YOU MENTION IT, I'LL TELL YOU THAT...", - "", - "WELL, THANKS FOR CALLING. BY THE WAY, THIS IS NOT THE CASE, OF COURSE, BUT WHAT COULD HAPPEN IF A VAMPIRE GOT THE RECIPE BY ANY CHANCE?", - // 245 - "WELL ANYWAY. LISTEN, DOESN'T THIS LOOK TO YOU LIKE A LOT OF CRAP TO END UP SOON WITH THE GAME?. WELL, MAYBE NOT", - "IT'S EMPTY!", - "WHY DID YOU TAKE MY ONLY LOVE, B.J., AWAY FROM ME?. LIFE HAS NO MEANING FOR WITHOUT HER", - "HER BRAIN?\?!!", - "TO TELL YOU THE TRUTH, I THINK I HAD JUST ENOUGH WITH YOUR OF YOUR LITTLE MONSTER", - // 250 - "OH PLEASE, HOLLY VIRGIN, DON'T LET ANYTHING WORSE HAPPEN TO ME!!", - "YOU ARE NOT GOING TO GET YOUR WAY. I'M SURE SUPERMAN WILL CAME AND RESCUE ME!", - "WHAT A SHIT OF GAME IS THIS IN WHICH THE PROTAGONIST DIES!", - "HEY, WAIT A SECOND!, WHAT ABOUT MY LAST WISH?", - "HA. HA, I'M NOW IMMUNIZED AGAINST YOU DAMNED EVIL!. THIS CIGARETTE IS AN ANTI-VAMPIRE BREW THAT VON BRAUN GAVE TO ME", - // 255 - "YES SURE, BUT YOU'LL NEVER GET ME TO GIVE YOU THE RECIPE", - "APART FROM CREATING TORTURE, I CAN ALSO STAND IT.", - "OH, NO PLEASE! I'LL TALK, BUT PLEASE, DON'T DO THAT TO ME!", - "ALL RIGHT THEN. I TOLD YOU WHAT YOU WANTED TO KNOW. NOW SET B.J. AND ME FREE AND LEAVE US ALONE!", - "WHAT ARE YOU DOING HERE B.J.?. WHERE IS DRASCULA?", - // 260 - "WHAT A MEAN GUY!. JUST BECAUSE HE BELONGS TO THE NOBILITY HE THINKS HE IS ENTITLED TO SLEEP WITH ANYBODY HE FEELS LIKE", - "DOWN WITH ARISTOCRATIC DESPOTISM!!", - "POOR PEOPLE OF THE WORLD FOR EVER..!!", - "AND AS I CAN SEE HE HAS CHAINED YOU UP WITH LOCKS AND ALL THAT STUFF, HUH?", - "WELL, ALL RIGHT. DO YOU HAVE A HAIRPIN OVER THERE?", - // 265 - "ALL RIGHT, OK, DON'T GET MAD. I'LL THINK ABOUT SOMETHING", - "YOU...BARTENDER!!", - "HOW IS THE GAME GOING?", - "WHO?", - "CAN'T YOU SEE DRASCULA IS HERE?", - // 270 - "THEN, LET'S END UP WITH HIM, RIGHT?", - "GIVE ME A SCOTCH ON THE ROCKS", - "NOTHING, I JUST FORGOT WHAT I WAS GOING TO SAY...", - "EITHER YOU GET ME A SCOTCH ON THE ROCKS OR I'LL PLAY THE PIANO UNTIL THE GAME IS OVER", - "WHEN IS THE MATCH GOING TO BE OVER?", - // 275 - "GOOD EVENING", - "AND SO IGOR, HOW ARE YOU FEELING...A LITTLE HUMPED...?. HA, HA, HA, THAT WAS FUNNY!", - "WHAT ARE YOU SUPPOSED TO BE DOING?", - "WELL, NO", - "THEN WEAR GLASSES", - // 280 - "WHAT IS ALL THAT ABOUT THE SUPERNATURAL ORGY?", - "OK, OK, STOP IT. I THINK I CAN GET THE PICTURE", - "COULDN'T YOU TELL ME WHERE DRASCULA IS?", - "OH...PLEASE...COME ON...!", - "WHY NOT?", - // 285 - "OH...BUT DIES HE SLEEP AT NIGHT?", - "WELL, I HOPE YOU GET LUCKY", - "I HAVE TO TALK TO HIM...", - "YOOUUU...SKELETOOOONN..!!!", - "GOOD HEAVENS!, IT'S A DEAD MAN TALKING!", - // 290 - "TELL HOW DID YOU GET TO END UP HERE", - "AND WHY WOULD DRASCULA WANT TO CREATE A MONSTER?", - "WHAT'S YOUR NAME, MY SKELETON FRIEND?", - "HEY, DON'T YOU WANT ANYTHING TO EAT?", - "I BET YOUR STOMACH IS PRETTY EMPTY...HA, HA,HA!", - // 295 - "THE THING IS THAT I DON'T FEEL LIKE TALKING RIGHT NOW", - "I HOPE SOMEONE F...(WHISTLE) YOU...,AND YOUR F...(WHISTLE) SON OF (WHISTLE TWICE)", - "I REALLY LOVED HER. I KNOW SHE WASN'T MUCH OF A WONDER, BUT NOBODY'S PERFECT, RIGHT?", - "BESIDES. SHE REALLY HAD ONE OF THOSE GREAT BODIES THAT YOU NEVER FORGET...", - "I'LL NEVER BE THE SAME AGAIN. I WILL SHUT MYSELF AWAY IN A MONASTERY, AND WILL LET MY LIFE JUST FLOW...", - // 300 - "NOTHING WILL GET ME OUT OF THIS MYSTERY BECAUSE...", - "WHOSE?. WHOSE?", - "I WANT TO BECOME A PIRATE", - "I WANT TO BECOME A PROGRAMMER", - "TELL ME SOMETHING ABOUT PELAYO", - // 305 - "I'LL JUST GO ON PLAYING, AND I'LL FORGET I SAW YOU", - "WHOSE STUPID IDEA COULD THIS BE?", - "IT'S LIKE MY GRANDMOTHER'S HANDBAG ", - "JESUS, AREN'T I JUST REALLY COOL MAN...!", - "THE MORE I SEE MYSELF, THE MORE I LOVE ME", - // 310 - "HOW DO I LOCK MYSELF THEN?", - "I'LL HAVE TO OPEN ME FIRST, RIGHT?", - "I'M ALL RIGHT WHERE I AM", - "I GOT ME", - "HI, MYSELF!", - // 315 - "I'LL WEAR THEM WHEN THE RIGHT TIME COMES", - "I CAN'T SEE ANYTHING SPECIAL ABOUT IT", - "IT'S ALL RIGHT WHERE IT IS", - "AND WHAT FOR?", - "I CAN'T", - // 320 - "HI, YOU!", - "IT'S UNCLE DESIDERIO'S PANTHEON!", - "YOOUU...UNCLE DESIDERIOOOO!!", - "NO, I DON'T WANT TO CUT MYSELF AGAIN", - "AHHH,,,EXCUS....", - // 325 - "JAMM. AHH...", - "YES...WOF, WOF", - "LOOK, THERE'S A PIECE OF BUBBLE GUM STUCK HERE", - "THIS IS THE PORTABLILINE I GOT LAST CHRISTMAS", - "IT'S VERY HIGH!", - // 330 - "COME OUT TO THE BALCONY MY JULIET!!", - "YOU ARE THE LIGHT THAT ILLUMINATES MY WAY!", - "HEY, DOOR!, WHAT'S THE MATTER?", - "YOOOUU, CIGARETTE SPENDING MACHINEEE!", - "IT'S A CIGARETTE SPENDING MACHINE", - // 335 - "I HAVE ANOTHER COIN INSIDE", - "NO, I JUST DECIDED TO QUIT SMOKING AND DRINKING ALCOHOL", - "I WILL DEVOTE MYSELF TO WOMEN FROM NO ON", - "THIS IS A TRICK! NOTHING CAME OUT!", - "AT LAST!", - // 340 - "JUST A TRUNK", - "HELLO TRUNK, YOUR NAME IS JUST LIKE MY COUSIN FRANK...", - "I'VE FOUND B.J.'S HANDBAG!", - "OH MY GOD! DON'T GET MY IMAGE REFLECTED! I'M A VAMPIRE!", - "OH...JESUS, IT'S JUST A DRAWING!", - // 345 - "LITTLE MIRROR, TELL ME, WHO IS THE MOST BEAUTIFUL IN THE WHOLE KINGDOM?", - "HE WON'T OPEN", - "ALL RIGHT. I GOT THE EAR-PLUGS ON", - "IT'S A VAMPIRE'S HUNTER DIPLOMA, OFFICIALLY APPROVED BY OXFORD UNIVERSITY", - "NOT YET. THERE ARE STILL SOME INGREDIENTS MISSING. IT'S NOT WORTH WAKING HIM UP", - // 350 - "BUT I DON'T HAVE MONEY", - "IT'S A BRITISH LAMP", - "HELP ME OUT HERE BARTENDER!!", - "A VAMPIRE CAME IN AND TOOK MY GIRLFRIEND AWAY!!", - "BUT, AREN'T YOU GOING TO HELP ME!!??", - // 355 - "DEAD?, WHAT DO YOU MEAN DEAD?", - "AAHH....", - "A VAMPIRE HAS KIDNAPPED THE GIRL IN ROOM 501", - "BUT YOU HAVE TO HELP ME OUT!", - "CAN'T YOU PLAY ONE FROM BLUR?", - // 360 - "HOW CAN YOU STAY HERE ALL DAY PLAYING THE SAME SONG ALL THE TIME?", - "AND THEN, HOW CAN YOU HEAR ME?", - "PLEASE, LEND ME THE ERA-PLUGS", - "COME ON, I'LL GIVE THEM BACK TO YOU RIGHT AWAY", - "COOOMEE OONNN...", - // 365 - "WELL GOODBYE, I HAVE TO KILL A VAMPIRE", - "", - "WHAT'S YOUR LANGUAGE, TRANSILVANIAN?", - "WHO IS UNCLE DESIDERIO?", - "BUT, WHAT'S THE MATTER WITH THAT DRASCULA?", - // 370 - "WHO IS THAT GUY NAMED VON BRAUN?", - "AND WHY DOESN'T HE DO IT?", - "AND WHERE CAN I FIND VON BRAUN?", - "WELL, THANKS AND GOODBYE. HOPE YOU SLEEP IT OFF JUST FINE", - "WE'D BETTER CALL FIRST", - // 375 - "ARE YOU PROFESSOR BRAUN?", - "AND COULD YOU TELL ME WHERE I CA...?", - "I DON'T BELIEVE HE IS GANIMEDES THE DWARF", - "PROFESSOR!!", - "PLEASE HELP ME!. THE LIFE OF MY GIRLFRIEND DEPENDS ON YOU!!", - // 380 - "WELL, ALL RIGHT. I DON'T NEED YOUR HELP", - "ALL RIGHT. I'M LEAVING", - "DON'T DE AFRAID. WE WILL BEAT DRASCULA TOGETHER", - "THEN WHY DON'T YOU HELP ME?", - "I GOT THEM", - // 385 - "YES, I GOT THEM!!", - "ALL RIGHT", - "AHH....YES", - "I HAVE COME TO GET INTO THAT CABIN AGAIN", - "I AM READY TO FACE YOUR TEST", - // 390 - "ALL RIGHT OLD MAN. I CAME FOR MY MONEY", - "NO, NOTHING. I WAS JUST LEAVING", - "SORRY...", - "DO YOU LIKE THIS BOOK?. IT HAS SOME SCORES FROM TCHAIKOWSKY", - "HOW CAN I KILL A VAMPIRE?", - // 395 - "HAS ANYBODY TOLD YOU THAT SLEEPING IN A BAD POSITION IS NOT GOOD FOR YOU?", - "THAT'S WHAT MY MUM ALWAYS TELL ME", - "WHY WOULDN'T DRASCULA KILL YOU?", - "AND WHAT WAS IT?", - "GREAT! YOU HAVE AN IMMUNIZING BREW", - // 400 - "SO?", - "ALL RIGHT", - "CAN YOU REPEAT WHAT I NEED FOR THAT BREW", - "WELL, I'LL RUSH OUT TO GET IT", - "HEY, WHAT HAPPENED WITH THE PIANIST?", - // 405 - "I HAVE ALL THE INGREDIENTS OF THAT BREW", - "JUST A QUESTION. WHAT IS ALL THAT ABOUT THE ALUCSARD ETEREUM?", - "HELLO, HELLO...", - "AND WHERE IS THAT CAVERN?", - "WHAT HAPPENS? DIDN'T YOU HAVE TO GO TO THE COURT?", - // 410 - "...BUT... IF I MEET MORE VAMPIRES?", - "IT'S A VAMPIRE THAT DOESN'T LET ME COME THROUGH", - "HE LOOKS LIKE YODA, BUT A LITTLE TALLER", - "HEY YODA, IF YOU JUST LET ME GO ON MY WAY, I'LL GIVE YOU A PENNY", - "OK, OK, YOU GET MAD ABOUT NOTHING MAN", - // 415 - "HAS ANYBODY TOLD YOU THAT YOU LOOK LIKE YODA?", - "HI VAMPIRE, IT'S A BEAUTIFUL NIGHT, HUH?", - "ARE YOU A VAMPIRE OR AN OIL PAINTING?", - "I'D BETTER NOT SAY ANYTHING, IN CASE YOU GET MAD", - "IT'S LOCKED", - // 420 - "THE MAGPIE WOULD STICK OUT MY EYES IF I TRIED!", - "OH MY GOD. IT'S LOCKED...THAT'S SCARY, HUH?", - "THE HINGES ARE RUSTY", - "THERE IS ONLY ONE CAN OF FLOUR IN THERE", - "THAT TOOK AWAY THE RUST", - // 425 - "I HAVE FOUND A PINE STICK", - "I'LL TAKE THIS THICKER ONE", - "WELL, I THINK I CAN GET RID OF THIS STUPID DISGUISE", - "\"PASSAGE TO TOWERS CLOSED FOR REPAIRS. PLEASE USE MAIN ENTRANCE. SORRY FOR THE INCONVENIENCE\"", - "...HE IS PALE, HE HAS FANGS AND WEARS A TOUPE\220 AND HE SURE IS DRASCULA!", - // 430 - "IT'S B.J.! ARE YOU ALL RIGHT B.J.?", - "YES, I KNOW SHE IS STUPID, BUT I'M SO LONELY", - "YOU DON'T HAVE A KEY AROUND THERE, DO YOU?", - "I BET YOU DON'T HAVE A PICKLOCK AROUND!", - "GIVE ME A HAIRPIN, I'M GOING TO PLAY MCGYVER HERE!", - // 435 - "DON'T GO ANYWHERE. I'LL BE RIGHT BACK", - "SHOOT! IT'S BROKEN!", - "OLEEEE! I EVEN SHAVED DUDE!", - "YES, DARLING?", - "HE'S NOT ARRIVED YET", - // 440 - "THE PIANIST IS NOT HERE", - "A TRANSYLVANIAN SCOTCH ON THE ROCKS", - "I DON'T HAVE A ROOM YET", - "IT LOOKS LIKE HE GOT STUCK IN THE BATH AND DECIDED TO RUN A BAR", - "HE WAS DRUNK AS A SAILOR", - // 445 - "THAT HAIR...REMINDS ME OF SOMEBODY", - "IT'S A RAW-BONED SKELETON", - "LOOK! THERE'S MIGUEL BOSE!", - "HE'S ASLEEP. IT'D BE A SHAME WAKING HIM UP", - "HE'S UGLIER THAN EMILIO DE PAZ", - // 450 - "A PINE-WOODEN COFFIN", - "HE IS GOING TO CUT ME IN LITTLE SLICES. JUST LIKE A SAUSAGE", - "I DON'T LIKE PENDULAE. I'D RATHER PREFER ARTICHOKES", - "I CAN'T MAKE IT. I'M HANDCUFFED", - "IT'S OBVIOUSLY A SECRET DOOR", - // 455 - "THEY IGNORE ME", - "COME ON..!", - "WHEN I READ THE SCRIPT IT WAS SUPPOSED TO MOVE, BUT THE BUDGET GOT CRAZY AND THEY COULDN'T AFFORD TO PAY THE GYM, SO THAT I NEVER GOT TOUGH. END OF STORY", - "IT SEEMS A LITTLE LOOSE FROM THE WALL", - "I DON'T THINK IS GOING TO HELP ME ANYWAY. IT'S TOO WET TO LIGHT IT", - // 460 - "TO WEST WING? NO WAY! NOBODY KNOWS WHAT YOU CAN FIND THERE!!", - "SHE'S GOT NICE TRANSILVANIAN REASONS", - "", - "IT'S A SHAME THERE ISN'T A ROASTED LAMB IN THERE", - "LAST TIME I OPENED AN OVEN I BLEW UP THE HOUSE", - // 465 - "THAT'S THE TRANSILVANIAN FOOTBALL BADGE", - "WHAT FOR? TO PUT IT ON MY HEAD", - "I DON'T THINK THESE TOWERS ARE THE OPENING KIND", - "I DON'T WANT TO KNOW WHAT KIND OF FOOD IS IN THERE!", - "IT LOOKS IMPRESSIONIST TO ME...", - // 470 - "THE NIGHT IS FALLING OVER ALL OF US...THAT'S SCARY, ISN'T IT?", - "IT'S STUCK!", - "IT'S THE KING. YOU DIDN'T IMAGINE THAT, DID YOU!", - "NO, I ALREADY HAVE ONE AT HOME TO FEED", - "A SHELF WITH BOOKS AND SOME OTHER THINGS", - // 475 - "BUT WHO CAN I CALL AT THIS TIME?", - "\"HOW TO MAKE THE TAX RETURN FORMS\". HOW INTERESTING!", - "I ALREADY HAVE ONE AT HOME. I THINK IT'S A WORLDWIDE BEST SELLER", - "A COMPLETELY NORMAL KEY", - "I THINK SHE IS NOT FROM AROUND HERE", - // 480 - "HEY, THEY'RE FANG-LIKE FRENCH FRIES! I LOVE IT!", - "I DON'T THINK THIS IS THE RIGHT TIME TO EAT THAT CRAP KNOWING THAT MY GIRLFRIEND HAS BEEN KIDNAPPED BY THE MOST EVIL PERSON EVER ON EARTH", - "I'M HAVING A GREAT TIME KILLING VAMPIRES WITH THIS THING!", - "LET'S SEE IF ANOTHER ONE COMES SOON!", - "NO, IT HAS TO BE WITH A DIRTY AND STINKY VAMPIRE, JUST LIKE THE ONE I KILLED BEFORE", - // 485 - "THIS IS THE ONE AND ONLY WIG ELVIS USED WHEN HE GOT BALD", - "IT'S FLOUR, BUT DON'T ASK ME ANY COMMERCIAL NAMES", - "MAYBE ANOTHER TIME, OK?", - "THAT'S A GREAT AXE, IT'S A SHAME THERE IS NO VAMPIRE'S HEAD AROUND HERE, HUH?", - "NO. I'M REALLY A GOOD PERSON", - // 490 - "IT'S MARGARET'S THATCHER DEODORANT...HA, HA, HA...!!", - "THAT'S A PRETTY CUTE CLOAK", - "", - "JUST LIKE ALL BRANCHES FROM ANY TREE IN THE WORLD, THERE IS NOTHING SPECIAL.", - "HEY, THAT'S AMAZING! A ROPE WITHIN THIS TYPE OF ADVENTURE!", - // 495 - "I WONDER WHAT WE COULD USE IT FOR...", - "A ROPE TIED TO A BRANCH OR THE OTHER WAY AROUND, HOWEVER YOU WANT TO PUT IT...", - "IT LOOKS LIKE THIS MAGPIE IS EVIL-MINDED", - "FORGET IT, I'M NOT SAYING ANYTHING IN CASE HE GETS MAD", - "SHE LOOKS DEAD, BUT SHE REALLY ISN'T, HUH?", - // 500 - "NO ANIMAL WAS HARMED DURING THE PRODUCTION OF THIS GAME", -}, -{ - // 0 - "", - "Es la segunda puerta mas grande que he visto en mi vida", - "Bueno, no", - "Esta sellada con tablones. La iglesia debe llevar abandonada varios a\244os", - "Si no la he abierto", - // 5 - "\250Que hago? \250La arranco?", - "Hola puerta. Te voy a hacer un marco.", - "Demasiado para mi.", - "una ventana sellada con tablones.", - "No puedo.", - // 10 - "Ya lo esta.", - "\250Y pa que?", - "Hola ventana. \250Tienes algo que hacer esta noche?", - "No sin el permiso de obras publicas", - "\255eh! esa ventana tiene solo un tablon...", - // 15 - "\255Eoooooo! \255Ventana!", - "Hola tu.", - "", - "No alcanzo.", - "Esta bien donde esta.", - // 20 - "", - "Es una tumba en forma de cruz.", - "No gracias.", - "Hola muerto. \250quieres gusanitos?", - "Si hombre. Como en Poltergueist.", - // 25 - "", - "", - "Vuelvo en quince minutos.", - "Prohibido pegar carteles.", - "", - // 30 - "Esta cerrado con llave.", - "Ya tengo uno.", - "", - "No contesta.", - "No, esta bien aparcado.", - // 35 - "Es una puerta.", - "Un cajon de la mesa.", - "Un sospechoso armario.", - "Hola armario. \250Que tal?", - "", - // 40 - "", - "Es un candelabro muy viejo.", - "Debe de llevar aqui desde que Mazinguer-z era un tornillo.", - "No. Es una reliquia.", - "Es un bonito retablo.", - // 45 - "", - "Ji, ji, ji.", - "", - "No.", - "", - // 50 - "Ja, ja, ja. \255que bueno!", - "", - "", - "", - "No veo nada en especial.", - // 55 - "Es Fernan, la planta.", - "Es una de las picas de la verja.", - "\255Eh! Aqui debajo hay una caja de cerillas.", - "\255Mira! un paquete de clinex. \255Y hay uno sin usar!", - "No hay nada mas en el cubo.", - // 60 - "Es un ciego que no ve.", - "", - "", - "", - "", - // 65 - "Es una cuantiosa cantidad de dinero.", - "", - "", - "", - "", - // 70 - "", - "", - "", - "", - "", - // 75 - "", - "", - "", - "", - "", - // 80 - "", - "", - "", - "", - "", - // 85 - "", - "", - "", - "", - "", - // 90 - "", - "", - "", - "", - "", - // 95 - "", - "", - "", - "", - "", - // 100 - "NO TIENE NADA DE ESPECIAL", - "NO ES NADA FUERA DE LO NORMAL", - "\250QUE PASA TU?", - "HOLA", - "\250NADA NUEVO?", - // 105 - "\250QUE TAL LA FAMILIA?", - "\255QUE COSAS TIENES!", - "\255PERO COMO VOY A COGER ESO!", - "MI RELIGION ME LO PROHIBE", - "MEJOR NO", - // 110 - "\255SI HOMBRE!", - "NI HABLAR DE ESO", - "IMPOSIBLE", - "ESTO NO SE ABRE", - "YO SOLO NO PUEDO", - // 115 - "SI QUISIERA PODRIA, PERO ES QUE ME DA PEREZA", - "NO LE VEO MOTIVO APARENTE", - "ES UN CEREBRO BASTANTE MAJO", - "Y BIEN, CEREBRO \250QUE PIENSAS HACER ESTA NOCHE?", - "NO, DEBE CONSERVARSE EN LUGAR CERRADO A LA ACCION MUTANTE DE LA ATMOSFERA", - // 120 - "ES UN HUESO, COMO MI JEFE", - "UNA ESTACA MUY AFILADA", - "FIEL ESTACA PUNTIAGUDAAA, NOBLE ROBLE TRANSILVAAANOO", - "\255VAYA, ME TENGO QUE CORTAR LAS U\245AS!", - "\255AHI DENTRO ESTA B.J., Y HAY QUE VER COMO ESTA LA TIA!", - // 125 - "ESTA CERRADA A CAL Y CANTO", - "\"CANDADOS CAL Y CANTO S.A.\"", - "ES EL TIPICO ESQUELETO QUE ESTA EN TODAS LAS MAZMORRAS DE TODOS LOS JUEGOS", - "SE SUELE USAR PARA COMUNICAR CORRIENTE ELECTRICA A LOS APARATOS A EL ENCHUFADOS", - "ES TOTALMENTE ARTESANAL, PORQUE LOS JAPONESES LOS HACEN DE BOLSILLO", - // 130 - "SOLO HE VISTO EN MI VIDA OTRA COSA TAN FEA", - "QUITA. NO LE DIGO NADA A VER SI SE VA A ENFADAR", - "PARECE BASTANTE RACIONAL", - "ES UNA FOTO DE PLATON ESCRIBIENDO SU DIALOGO PERDIDO", - "NO SOY DE LOS QUE HABLAN CON POSTERS", - // 135 - "UN ESCRITORIO MUY MONO", - "ES UN DIPLOMA DE CAZA-CAZA-VAMPIROS HOMOLOGADO POR LA UNIVERSIDAD DE OXFORD", - "ES NOCHE CERRADA CON LUNA LLENA", - "PARECE QUE ESTOS TORNILLOS NO ESTAN MUY ENROSCADOS", - "NO MIRES, PERO CREO QUE UNA CAMARA OCULTA ME ESTA ENFOCANDO", - // 140 - "UN DETECTOR DE ESTACAS MUY MODERNO", - "NO, EL LABORATORIO ESTA EN EL SEGUNDO PISO", - "UNA BONITA MESILLA DE NOCHE", - "ES UN MONTON DE DINERO QUE NO PUEDE FALTAR EN UNA AVENTURA QUE SE PRECIE", - "SI YO FUERA RICO, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", - // 145 - "SON UNAS EXTRA\245AS HOJAS. DEBEN DE HABERLAS TRAIDO DE SUDAMERICA, O POR AHI", - "NO CREO QUE ME CONTESTARAN", - "ES UN BONITO CRUCIFIJO DE MADERA. EL ICONO NO CAPTA TODA LA EXTENSION DE SU BELLEZA", - "YO SOLO REZO ANTES DE ACOSTARME", - "\255EH, PARECE QUE ESTA PICA ESTA UN POQUITO SUELTA!", - // 150 - "PARA QUE LUEGO TE QUEJES DE QUE NO DOY PISTAS", - "ES UNA PICA BASTANTE CONVENCIONAL", - "SON MONOS, AUNQUE TIENEN UN POCO DE MIERDECILLA", - "NO, NO ME OIRIAN. JI,JI,JI \255QUE BUENO!", - "\"LA BELLA DURMIENTE DEL BOSQUE\" DE CHAIKOSKY, O CHOIFRUSKY, O COMO SE DIGA", - // 155 - "MUY APETITOSO", - "NO, YO NO SOY DE ESOS QUE SE METEN EN LA BOCA CHICLES USADOS", - "UNA HOZ MUY MONA. ME PREGUNTO DONDE ESTARA EL MARTILLO", - "\"LOS FABRICANTES DE TABACO ADVIERTEN QUE LAS AUTORIDADES SANITARIAS PERJUDICAN SERIAMENTE LA SALUD\"", - "UNA VELA NORMAL Y CORRIENTE, CON CERA Y TODO", - // 160 - "\255HAY QUE VER COMO BRILLAN ESTAS DOS BRILLANTES MONEDAS!", - "\255HAY QUE VER COMO BRILLA ESTA BRILLANTE MONEDA!", - "CON ESTO SERE INMUNE A LAS MORDEDURAS DE LOS VAMPIROS", - "NO, TODAVIA NO ES EL MOMENTO", - "HAY UN BILLETE DE MIL Y UN PAR DE MONEDAS", - // 165 - "DICE \"SE RUEGA NO ECHAR COMIDA AL PIANISTA\"", - "TORTILLA, 200. PESCAITOS FRITOS, 150, PATATAS ALIOLI, 225", - "LAS MEJORES HAMBUERGUESAS A ESTE LADO DEL DANUBIO, POR SOLO 325", - "ES UNA BONITA CALAVERA, CON UNA MIRADA MUY PENETRANTE. \255JI, JI, JI, QUE BUENO!", - "HOLA CALAVERA, ME RECUERDAS AL TIO DE HAMLET", - // 170 - "TENGO POR COSTUMBRE NO TOCAR COSAS QUE HAYAN ESTADO VIVAS", - "ES UNA PAPELERA", - "ES UNA PORRA PARA EL PARTIDO DE ESTA NOCHE", - "ME PREGUNTO QUE HABRA DETRAS", - "\255EH, ESTA CORTINA NO SE MUEVE!", - // 175 - "HAY QUE VER, QUE TETRICO ES ESE CASTILLO, \250EH? ", - "NO PUEDO, ESTA DEMASIADO LEJOS PARA OIRME", - "ES UN TIPICO BOSQUE TRANSILVANO, CON ARBOLES ", - "\255PERO QUE TONTERIAS DICES, CON LO OSCURO QUE ESTA!", - "CONFITERIA GARCIA. PASTELES Y CHICLES.", - // 180 - "UNA PUERTA MUY BONITA", - "ESTA CERRADA", - "UN BARRIL COMPLETAMENTE CERRADO", - "", - "\255QUE BICHOS MAS MONOS!", - // 185 - "BSSST, BSSST, GATITO...", - "NO CONTESTA", - "LA LUNA ES UN SATELITE QUE GIRA ALREDEDOR DE LA TIERRA CON UN PERIODO DE REVOLUCION DE 28 DIAS", - "HOLA, LUNA LUNERA CASCABELERA ", - "ESTA TOTALMENTE TAPIADA CON TABLONES", - // 190 - "IMPOSIBLE. ESTO NO LO ABRE NI EL MAYORDOMO DE LA TELE", - "\255EH, PARECE QUE LA SOMBRA DE ESE CIPRES ES ALARGADA!", - "\255EOOO, TABERNEROOO!", - "QUISIERA UNA HABITACION ", - "\250SABE DONDE PUEDO ENCONTRAR A UN TAL CONDE DRASCULA?", - // 195 - "SI, \250QUE PASA? ", - "\250Y ESO?", - "\250DE... DE VERDAD?", - "BUENA PREGUNTA, LE VOY A CONTAR MI HISTORIA, MIRE...", - "SON SOLO CINCO MINUTOS", - // 200 - "ME LLAMO JOHN HACKER, Y SOY REPRESENTANTE DE UNA INMOBILIARIA BRITANICA", - "AL PARECER, EL CONDE DRASCULA QUIERE COMPRAR UNOS TERRENOS EN GIBRALTAR, Y ME HAN MANDADO A MI PARA NEGOCIAR LA VENTA", - "PERO ME PARECE A MI QUE MA\245ANA TEMPRANITO ME VUELVO CON MI MAMA", - "BONITA NOCHE \250VERDAD?", - "NO, NADA", - // 205 - "EOOOO, PIANISTA", - "BONITA NOCHE", - "Y ADEMAS NO HACE FRIO", - "PUES NADA, TE DEJO QUE SIGAS TOCANDO", - "PUES ESO", - // 210 - "HOLA JEFE, \250QUE TAL?", - "\250Y LA FAMILIA?", - "HAY AMBIENTE AQUI \250EH?", - "MEJOR NO DIGO NADA", - "SE ESTA MEJOR EN CASA QUE EN NINGUN SITIO... SE ESTA MEJOR EN... \250EH? PERO SI USTED NO ES LA TIA ENMA. ES MAS. \255SI YO NO TENGO NINGUNA TIA ENMA!", - // 215 - "SI, EL MIO TAMBIEN. USTED PUEDE LLAMARME COMO LE APETEZCA, AUNQUE SI ME LLAMA JOHNY, ACUDO COMO LOS PERROS", - "SI, QUE GOLPES TENGO \250VERDAD? POR CIERTO, \250DONDE ESTOY?", - "SI.", - "CACHIS... ", - "OH, SI. POR SUPUESTO", - // 220 - "PUES MUCHAS GRACIAS POR PRESTARME TU AYUDA. NO TE MOLESTO MAS. SI ME DICES DONDE ESTA LA PUERTA, POR FAVOR... ", - "PORQUE EL GOLPE ME HA DEBIDO AFECTAR AL CEREBRO Y NO VEO TRES EN UN BURRO ", - "BAH, NO IMPORTA. SIEMPRE LLEVO DE REPUESTO", - "\255GUAU, QUE TIA MAS BUENA! \255NO ME HABIA DADO CUENTA YO! CLARO, SIN LAS GAFAS", - "OYE... ", - // 225 - "\255\250 Y ESTOOOOOO?!", - "\255NO TE PREOCUPES B.J., AMOR MIO! TE SALVARE DE LAS GARRAS DE ESE ", - "ME HA TOCADO LAS NARICES, VAMOS.", - "\255AHHH, UN HOMBRE LOBO! \255MUERE MALDITO!", - "SI, ESTO...", - // 230 - "SI, ESTO... CREO QUE SEGUIRE MI CAMINO. CON PERMISO... ", - "\250QUE?", - "PUES LA VERDAD, PENSANDOLO BIEN... CREO QUE NO", - "DIME, OH ERUDITO FILOSOFO, \250EXISTE ALGUNA RELACION CAUSA-EFECTO ENTRE LA VELOCIDAD Y EL TOCINO?", - "VALE, VALE, DEJALO. DE TODAS FORMAS, NO SE POR QUE HE DICHO ESO.", - // 235 - "\250QUE HACES AQUI FILOSOFANDO, QUE NO TE ESTAS COMIENDO GENTE?", - "\250Y ESO?", - "OYE, PUEDES REPETIR ESO DE \"INCLINACIONES PRE-EVOLUTIVAS\"?", - "SI HOMBRE. ESE ROLLO QUE ME HAS SOLTADO ANTES. ES QUE NO ME HE ENTERADO MUY BIEN...", - "NO, MEJOR NO DIGO NADA, QUE COMO LE TOQUE LA VENA...", - // 240 - "\250SI, DIGA?", - "SI, \250QUE PASA? ", - "AH, PUES AHORA QUE SACA EL TEMA LE DIRE QUE...", - "", - "POR CIERTO, \250QUE PASARIA SI UN VAMPIRO SE HICIERA CIRCUNSTANCIALMENTE CON LA RECETA... ", - // 245 - "PUES NADA. OYE, \250A QUE ESTO PARECE UN PEGOTE PUESTO EN EL GUION PARA ACABAR PRONTO EL JUEGO? BUENO, A LO MEJOR NO", - "\255ESTA VACIO!", - "PORQUE ME ROBASTE MI AMOR, B.J. SIN ELLA LA VIDA PARA MI NO TIENE SENTIDO", - "\255\250SU CEREBRO?!", - "PUES NO ES POR NADA, PERO ME PARECE QUE ME HA CARGADO TU MONSTRUITO", - // 250 - "\255VIRGENCITA, QUE ME QUEDE COMO ESTOY!", - "\255NO TE SALDRAS CON LA TUYA. SEGURO QUE APARECE SUPERLOPEZ Y ME RESCATA!", - "VAYA UNA MIERDA DE JUEGO EN EL QUE MUERE EL PROTAGONISTA ", - "UN MOMENTO, \250QUE HAY DE MI ULTIMO DESEO?", - "\255JA, JA! AHORA ESTOY INMUNIZADO CONTRA TI MALDITO DEMONIO. ESTE CIGARRILLO ES UNA POCION ANTIVAMPIRICA QUE ME DIO VON BRAUN ", - // 255 - "SI, CLARO. PERO NUNCA CONSEGUIRAS QUE TE DIGA LA RECETA", - "PUEDO SOPORTAR LA TORTURA, ADEMAS DE CREARLA ", - "\255NO, POR FAVOR! \255HABLARE, PERO NO ME HAGA ESO!", - "BUENO. YA TE HE DICHO LO QUE QUERIAS SABER. AHORA LIBERANOS A B.J. Y A MI Y DEJANOS EN PAZ", - "\255B.J.! \250QUE HACES AQUI? \250DONDE ESTA DRASCULA?", - // 260 - "\255QUE DESALMADO! SOLO PORQUE PERTENECE A LA NOBLEZA SE CREE QUE TIENE EL DERECHO DE PERNADA CON CUALQUIERA QUE SE LE ANTOJE ", - "\255ABAJO LA ARISTOCRACIA CACIQUIL!", - "\255ARRIBA LOS POBRES DEL MUUNDOOO....", - "Y POR LO QUE VEO TE HA ENCADENADO CON CANDADO Y TODO", - "BUENO, VALE. \250NO TENDRAS UNA HORQUILLA?", - // 265 - "BUENO, BUENO. NO TE PONGAS ASI, YA SE ME OCURRIRA ALGO.", - "EH, TABERNERO", - "\250COMO VA EL PARTIDO?", - "\250QUIEN?", - "\250ES QUE NO VES QUE ESTA AQUI DRASCULA?", - // 270 - "PUES VAMOS A ACABAR CON EL \250NO?", - "PONME UN CUBATA...", - "NADA. SE ME HA OLVIDADO LO QUE TE IBA A DECIR", - "O\247ME\247PONES\247UN\247CUBATA\247O\247ME\247PONGO\247A\247TOCAR\247EL\247PIANO", - "\250CUANTO QUEDA PARA QUE ACABE EL PARTIDO?", - // 275 - "BUENAS NOCHES", - "\250Y QUE TAL ANDAS IGOR? \250JOROBAO? \255JI,JI,JI, QUE BUENO! ", - "\250QUE SE SUPONE QUE HACES?", - "PUES NO", - "PUES PONTE GAFAS", - // 280 - "\250QUE ES ESO DE LA ORGIA SOBRENATURAL?", - "VALE, VALE, NO SIGAS. YA ME HAGO UNA IDEA", - "\250NO PODRIAS DECIRME DONDE ESTA DRASCULA? ", - "ANDA, PORFAAA", - "\250POR QUE NO?", - // 285 - "AH, PERO \250DUERME POR LA NOCHE?", - "BUENO, PUES QUE SE DE BIEN LA RENTA", - "ES QUE TENGO QUE HABLAR CON EL", - "\255EOOO, ESQUELETOOO! ", - "\255CANASTOS! \255UN MUERTO QUE HABLA!", - // 290 - "CUENTAME, \250COMO HAS VENIDO A PARAR AQUI?", - "\250Y PARA QUE VA A QUERER DRASCULA CREAR UN MONSTRUO? ", - "\250CUAL ES TU NOMBRE, AMIGO ESQUELETO?", - "OYE, \250NO QUIERES QUE TE TRAIGA NADA DE COMER?", - "DEBES TENER EL ESTOMAGO VACIO. \255JI, JI, JI!", - // 295 - "LA VERDAD ES QUE NO ME APETECE HABLAR AHORA", - "\255LA MADRE QUE...(PITIDO) ESPERO QUE TE...(PITIDO) Y QUE TE...(PITIDO) DOS VECES!", - "YO LA QUERIA, DE VERDAD. VALE, DE ACUERDO QUE NO ERA UNA LUMBRERA, PERO NADIE ES PERFECTO \250NO? ", - "ADEMAS, TENIA UN CUERPAZO QUE PARA QUE QUEREMOS MAS", - "YA NO VOLVERE A SER EL MISMO. ME RECLUIRE EN UN MONASTERIO A DEJAR QUE MI VIDA SE ME ESCAPE POCO A POCO", - // 300 - "NADA PODRA YA SACARME DE ESTA MISERIA PORQUE...", - "\250DE QUIEN? \250DE QUIEN?", - "QUIERO SER PIRATA", - "QUIERO SER PROGRAMADOR ", - "CONTADME ALGO SOBRE PELAYO", - // 305 - "SEGUIRE JUGANDO Y OLVIDARE QUE OS HE VISTO ", - "\255A QUIEN SE LE HABRA OCURRIDO ESTA IDIOTEZ!", - "ES UN BOLSO COMO EL DE MI ABUELITA ", - "\255PERO QUE BUENO QUE ESTOY!", - "CUANTO MAS ME MIRO MAS ME GUSTO", - // 310 - "\250Y LUEGO COMO ME CIERRO?", - "TENDRE QUE ABRIRME PRIMERO \250NO?", - "ESTOY BIEN DONDE ESTOY", - "YA ME TENGO", - "HOLA YO", - // 315 - "ME LOS PONDRE CUANDO LA OCASION SEA OPORTUNA", - "NO VEO NADA EN ESPECIAL", - "ESTA BIEN DONDE ESTA", - "\250Y PA QUE?", - "NO PUEDO", - // 320 - "HOLA TU", - "ES EL PANTEON DEL TIO DESIDERIO", - "\255EOOOO, TIO DESIDERIOOOO!", - "NO. NO QUIERO CORTARME OTRA VEZ", - "\255EJEM,JEM...!", - // 325 - "\255YAMM, EMMM, JH!", - "\255SI, COF,COF!", - "ANDA, SI HAY UN CHICLE AQUI PEGADO", - "ES EL MOVILANI QUE ME REGALARON EN NAVIDAD", - "\255QUE ALTO ESTA!", - // 330 - "\255SAL AL BALCON JULIETA!", - "\255TU ERES LA LUZ QUE ILUMINA MI CAMINO!", - "EH,PUERTA \250QUE PASSA?", - "EOOO, MAQUINA DE TABACO DE TRANSILVANIAAA", - "ES UNA MAQUINA EXPENDEDORA DE TABACO", - // 335 - "TENGO OTRA MONEDA DENTRO", - "NO. HE DECIDIDO DEJAR EL TABACO Y EL ALCOHOL ", - "A PARTIR DE AHORA ME DEDICARE SOLO A LAS MUJERES ", - "\255ESTO ES UN TIMO! NO HA SALIDO NADA", - "\255POR FIN! ", - // 340 - "PUES ESO, UN BAUL", - "HOLA BAUL, TE LLAMAS COMO MI PRIMO QUE SE LLAMA RAUL.", - "HE ENCONTRADO EL BOLSO DE B.J.", - "DIOS MIO, NO ME REFLEJO \255SOY UN VAMPIRO!", - "...AH, NO. ES QUE ES UN DIBUJO", - // 345 - "ESPEJITO: \250QUIEN ES EL MAS BELLO DEL REINO?", - "NO ME QUIERE ABRIR", - "MUY BIEN. ME HE PUESTO LOS TAPONES", - "ES UN DIPLOMA DE CAZA-VAMPIROS HOMOLOGADO POR LA UNIVERSIDAD DE CAMBRIDGE", - "NO, AUN ME FALTAN INGREDIENTES, NO VALE LA PENA DESPERTARLE", - // 350 - "ES QUE NO TENGO DINERO", - "ES UNA LAMPARA BRITANICA", - "\255TABERNERO! \255AYUDEME!", - "HA APARECIDO UN VAMPIRO Y SE HA LLEVADO A MI NOVIA", - "\255\250PERO NO VA USTED A AYUDARME?!", - // 355 - "\250MUERTA? \250QUE ES LO QUE QUIERE DECIR?", - "\255EJEM!", - "\255UN VAMPIRO HA SECUESTRADO A LA CHICA DE LA 506!", - "\255TIENES QUE AYUDARME!", - "\250NO SABES TOCAR NINGUNA DE LOS INHUMANOS?", - // 360 - "\250COMO TE AGUANTAS, TODO EL DIA TOCANDO LO MISMO?", - "\250Y ENTONCES COMO ME OYES?", - "DEJAME LOS TAPONES", - "ANDA. SI TE LOS DEVUELVO ENSEGUIDA", - "VENGAAAA...", - // 365 - "ADIOS. TENGO QUE MATAR A UN VAMPIRO", - "", - "\250QUE HABLAS? \250EN TRANSILVANO?", - "\250QUIEN ES EL TIO DESIDERIO?", - "\250PERO QUE PASA CON ESE TAL DRASCULA?", - // 370 - "\250QUIEN ES ESE TAL VON BRAUN?", - "\250Y POR QUE NO LO HACE?", - "\250Y DONDE PUEDO ENCONTRAR A VON BRAUN?", - "PUES GRACIAS Y ADIOS, QUE LA DUERMAS BIEN", - "SERA MEJOR LLAMAR PRIMERO", - // 375 - "\250ES USTED EL PROFESOR VON BRAUN?", - "\250Y NO ME PODRIA DECIR DONDE PUEDO...?", - "NO ME CREO QUE SEA EL ENANO GANIMEDES", - "\255PROFESOR!", - "\255AYUDEME! \255LA VIDA DE MI AMADA DEPENDE DE USTED!", - // 380 - "ESTA BIEN, NO NECESITO SU AYUDA", - "DE ACUERDO. ME VOY", - "NO TENGA MIEDO. JUNTOS VENCEREMOS A DRASCULA", - "ENTONCES \250POR QUE NO ME AYUDA?", - "YO LAS TENGO", - // 385 - "\255SI LAS TENGO!", - "DE ACUERDO", - "...ER ...SI", - "VENGO A METERME EN ESA CABINA DE NUEVO", - "ESTOY PREPARADO PARA ENFRENTARME A SU PRUEBA", - // 390 - "ESTA BIEN, VEJETE. HE VENIDO A POR MI DINERO", - "NO, NADA. YA ME IBA", - "PERDONA", - "\250TE INTERESA ESTE LIBRO? TIENE PARTITURAS DE TCHAIKOWSKY", - "\250COMO PUEDO MATAR A UN VAMPIRO?", - // 395 - "\250NO TE HAN DICHO QUE ES MALO DORMIR EN MALA POSTURA?", - "PUES ES LO QUE SIEMPRE ME DICE A MI MI MADRE", - "\250POR QUE NO TE PUDO MATAR DRASCULA?", - "\250Y QUE FUE?", - "\255ESTUPENDO! \255TIENE USTED UNA POCION DE INMUNID...!", - // 400 - "\250ENTONCES?", - "MUY BIEN", - "\250ME PUEDE REPETIR LO QUE NECESITO PARA ESA POCION?", - "PUES PARTO RAUDO A BUSCARLO", - "OIGA, \250QUE HA PASADO CON EL PIANISTA?", - // 405 - "YA\247TENGO\247TODOS\247LOS\247INGREDIENTES\247DE\247ESA\247POCION", - "UNA PREGUNTA: \250QUE ES ESO DE ALUCSARD ETEREUM?", - "DIGA, DIGA... ", - "\250Y DONDE ESTA ESA GRUTA?", - "\250QUE PASA? \250NO TENIAIS JUZGADO?", - // 410 - "...PERO ...\250Y SI ME ENCUENTRO A MAS VAMPIROS?", - "ES UN VAMPIRO QUE NO ME DEJA PASAR", - "SE PARECE A YODA, PERO MAS ALTO ", - "EH, YODA. SI ME DEJAS PASAR TE DOY UN DURO", - "BUENO VALE, QUE NO SE TE PUEDE DECIR NADA", - // 415 - "HOLA VAMPIRO, BONITA NOCHE \250VERDAD?", - "\250TE HAN DICHO ALGUNA VEZ QUE TE PARECES A YODA?", - "\250ERES UN VAMPIRO O UNA PINTURA AL OLEO?", - "MEJOR NO TE DIGO NADA, NO TE VAYAS A ENFADAR", - "ESTA CERRADA CON LLAVE", - // 420 - "\255LA URRACA ME PODRIA SACAR UN OJO SI LO INTENTO!", - "\255ESTA CERRADA! \255DIOS MIO, QUE MIEDO!", - "LAS BISAGRAS ESTAN OXIDADAS", - "AQUI DENTRO SOLO HAY UN BOTE CON HARINA", - "ESO HA QUITADO EL OXIDO", - // 425 - "HE ENCONTRADO UNA ESTACA DE PINO", - "COGERE ESTE QUE ES MAS GORDO", - "BUENO, CREO QUE YA PUEDO DESHACERME DE ESTE ESTUPIDO DISFRAZ", - "\"PASADIZO A LOS TORREONES CERRADO POR OBRAS. POR FAVOR, UTILICEN ENTRADA PRINCIPAL. DISCULPEN LAS MOLESTIAS\"", - "...ES PALIDO, TIENE COLMILLOS, TIENE TUPE Y USA CAPA... \255SEGURO QUE ES DRASCULA!", - // 430 - "\255ES B.J.! B.J. \250ESTAS BIEN?", - "SI, YA LO SE QUE ES TONTA, PERO ES QUE ESTOY DE SOLO", - "NO TENDRAS UNA LLAVE POR AHI, \250VERDAD? ", - "\250A QUE NO TIENES UNA GANZUA?", - "DAME UNA HORQUILLA. VOY A HACER COMO MCGYVER", - // 435 - "NO TE MUEVAS QUE AHORA VUELVO", - "\255CACHIS! \255SE ME HA ROTO!", - "\255OLEEEE! \255Y ADEMAS ME HE AFEITADO, COLEGA!", - "\250SI, CARI\245O?", - "NO LLEGA", - // 440 - "EL PIANISTA NO ESTA", - "UN CUBATA TRANSILVANO", - "AUN NO TENGO HABITACION", - "PARECE QUE SE QUEDO ATASCADO EN LA BA\245ERA Y DECIDIO PONER UN BAR", - "ESTA COMO UNA CUBA DE CUBA", - // 445 - "ESE PELO... EL CASO ES QUE ME RECUERDA A ALGUIEN", - "ES UN ESQUELETO HUESUDO", - "\255MIRA! \255MIGUEL BOSE!", - "ESTA DURMIENDO. SERIA UNA PENA DESPERTARLE", - "ES MAS FEO QUE EMILIO DE PAZ ", - // 450 - "UN ATAUD DE MADERA DE PINO", - "ME VA A CORTAR EN RODAJITAS, COMO A UN SALCHICHON", - "NO ME GUSTAN LOS PENDULOS. PREFIERO LAS ALCACHOFAS", - "MIS MANOS ESTAN ESPOSADAS. NO VOY A PODER", - "SALTA A LA VISTA QUE ES UNA PUERTA SECRETA", - // 455 - "ME IGNORAN", - "\255ANDA YA!", - "EN EL GUION SE MOVIA, PERO EL JUEGO SE SALIO DE PRESUPUESTO Y NO PUDIERON PAGARME UN GIMNASIO PARA PONERME CACHAS, ASI QUE NADA", - "PARECE QUE ESTA UN POCO SUELTA DE LA PARED", - "NO CREO QUE ME VAYA A SERVIR DE NADA. ESTA DEMASIADO HUMEDA PARA ENCENDERLA", - // 460 - "\250AL ALA OESTE? \255NI LOCO! \255A SABER QUE HABRA ALLI!", - "TIENE BONITOS MOTIVOS TRANSILVANOS ", - "", - "QUE PENA QUE AHI DENTRO NO HAYA UN CORDERITO ASANDOSE ", - "LA ULTIMA VEZ QUE ABRI UN HORNO LA CASA SALTO POR LOS AIRES", - // 465 - "ES EL ESCUDO DEL EQUIPO DE FUTBOL DE TRANSILVANIA", - "\250Y PARA QUE? \250PARA PONERMELA EN LA CABEZA?", - "NO CREO QUE ESTOS CAJONES SEAN DE LOS QUE SE ABREN", - "\255NO QUIERO SABER LA COMIDA QUE HABRA AHI DENTRO!", - "ME DA LA IMPRESION DE QUE ES IMPRESIONISTA", - // 470 - "LA NOCHE SE APODERA DE TODOS... QUE MIEDO \250NO?", - "ESTA ATRANCADA", - "ES EL REY \250ES QUE NO TE LO HABIAS IMAGINADO?", - "NO, YA TENGO UNO EN MI CASA, AL QUE LE DOY DE COMER Y TODO", - "UNA ESTANTERIA CON LIBROS Y OTRAS COSAS ", - // 475 - "\250Y A QUIEN LLAMO A ESTAS HORAS?", - "\"COMO HACER LA DECLARACION DE LA RENTA\" \255QUE INTERESANTE!", - "YA TENGO UNO EN MI CASA. CREO QUE ES UN BEST-SELLER MUNDIAL ", - "UNA LLAVE COMPLETAMENTE NORMAL", - "ME PARECE A MI QUE ESTA NO ES DE AQUI", - // 480 - "\255EH, SON PATATAS FRITAS CON FORMA DE COLMILLO! ME ENCANTA", - "NO CREO QUE SEA EL MEJOR MOMENTO DE PONERSE A COMER CHUCHERIAS, CON MI NOVIA EN MANOS DEL SER MAS MALVADO QUE HA PARIDO MADRE", - "\255QUE BIEN ME LO ESTOY PASANDO CARGANDOME VAMPIROS CON ESTO!", - "A VER SI APARECE OTRO PRONTO", - "NO, TIENE QUE SER CON UN VAMPIRO SUCIO Y MALOLIENTE COMO EL QUE ME CARGUE ANTES", - // 485 - "ES LA AUTENTICA PELUCA QUE USO ELVIS CUANDO SE QUEDO CALVO", - "ES HARINA, PERO NO PUEDO DECIR MARCAS", - "QUIZA EN OTRO MOMENTO \250VALE?", - "ES UN HACHA MAGNIFICA, QUE PENA QUE NO HAYA POR AQUI CERCA NINGUNA CABEZA DE VAMPIRO", - "NO. EN EL FONDO SOY BUENA PERSONA", - // 490 - "ES EL DESODORANTE DE LA TACHER \255JI,JI,JI!", - "ES UNA CAPA BASTANTE MONA", - "", - "COMO TODAS LAS RAMAS DE TODOS LOS ARBOLES DE TODO EL MUNDO, O SEA, SIN NADA DE PARTICULAR", - "\255OH, INCREIBLE! \255UNA CUERDA EN UNA AVENTURA GRAFICA!", - // 495 - "ME PREGUNTO PARA QUE SERVIRA...", - "UNA CUERDA ATADA A UNA RAMA O UNA RAMA ATADA A UNA CUERDA, SEGUN SE MIRE", - "PARECE QUE ESTA URRACA TIENE MUY MALAS INTENCIONES", - "QUITA, YO NO LA DIGO NADA, A VER SI SE VA A ENFADAR", - "PARECE QUE ESTA MUERTA, PERO ES MENTIRA \250EH?", - // 500 - "NINGUN ANIMAL DA\245ADO EN LA PRODUCCION DE ESTE JUEGO", -}, -{ - // 0 - "", - "Das ist die zweitgroesste Tuer, die ich je gesehen habe !", - "Ok, stimmt nicht ganz....", - "Sie haben Bretter davorgenagelt. Die Kirche scheint seit Jahren leer zu stehen", - "Aber ich habe sie doch nicht aufgemacht!", - // 5 - "Soll ich sie aufbrechen ?", - "Hallo Tuer! Ich verpasse Dir jetzt mal einen Rahmen!", - "Zuviel fuer mich !", - "ein zugenageltes Fenster", - "Ich schaff\357es nicht!", - // 10 - "Schon geschafft!", - "Und wozu?", - "Hallo Fenster. Hast Du heute abend schon was vor?", - "Nicht ohne Genehmigung der Staedtischen Baubehoerde", - "hey! Das Fenster da hat nur EIN Brett...", - // 15 - "Heyhooo! Fenster!", - "Hallo Du", - "", - "Ich komme nicht dran!", - "Gut so ! ", - // 20 - "", - "Es ist ein Grabstein in Form eines Kreuzes.", - "Nein, danke", - "Hallo Toter. Willst Du ein paar Wuermchen?", - "Klar Mann ! Wie in Poltergeist.", - // 25 - "", - "", - "Bin in einer Viertelstunde zurueck!", - "Plakate ankleben verboten", - "", - // 30 - "Sie ist abgeschlossen.", - "Ich habe schon eins.", - "", - "Keine Reaktion !", - "Nein, da steht es gut !", - // 35 - "Es ist eine Tuer", - "Eine Schublade vom Tisch", - "Ein verdaechtiger Schrank", - "Hallo Schrank. Alles klar?", - "", - // 40 - "", - "Ein uralter Kerzenstaender", - "Der stammt wohl noch aus der Zeit als meine Ururururoma in den Kindergarten ging ", - "Nein, eine Reliquie aus vergangenen Zeiten", - "Es ist ein huebsches Altarbild", - // 45 - "", - "Hi,hi,hi", - "", - "Nein.", - "", - // 50 - "Ha,ha,ha! klasse!", - "", - "", - "", - "Ich sehe nichts besonderes", - // 55 - "Freddy, die Topfblume", - "Eine Spitze aus dem Jaegerzaun", - "Ej! Hier unten liegt eine Streichholzschachtel!", - "Guck mal! Eine Packung Tempos! Und eins sogar ungebraucht!", - "Sonst ist nichts mehr im Eimer", - // 60 - "Ein Blinder der nichts sieht", - "", - "", - "", - "", - // 65 - "Ein Wahnsinnsbatzen Geld.", - "", - "", - "", - "", - // 70 - "", - "", - "", - "", - "", - // 75 - "", - "", - "", - "", - "", - // 80 - "", - "", - "", - "", - "", - // 85 - "", - "", - "", - "", - "", - // 90 - "", - "", - "", - "", - "", - // 95 - "", - "", - "", - "", - "", - // 100 - "SIEHT NICHT UNGEWoeHNLICH AUS", - "SIEHT NICHT AUSSERGEWoeHNLICH AUS", - "EJ DU, WAS IST LOS?", - "HALLO", - "NICHTS NEUES?", - // 105 - "WIE GEHTS DER FAMILIE?", - "WAS DU FueR SACHEN HAST !", - "ABER WIE SOLLTE ICH DAS AUFHEBEN ?", - "MEINE RELIGION VERBIETET MIR DAS", - "BESSER NICHT", - // 110 - "KLAR MANN!", - "DU SPINNST WOHL !", - "UNMoeGLICH", - "GEHT NICHT AUF !", - "ALLEINE SCHAFFE ICH DAS NICHT", - // 115 - "WENN ICH WOLLTE, KoeNNTE ICH, ABER ICH HABE KEINE LUST", - "ICH WueSSTE NICHT WARUM", - "EIN SCHaeDEL, DER GUT DRAUF IST", - "UND? SCHON WAS VOR HEUTE ABEND, SCHaeDEL?", - "NEIN, ER MUSS AN EINEM KueHLEN ORT GELAGERT WERDEN, FERN DER ZERSToeRERISCHEN KRAFT DER ATMOSPHaeRE", - // 120 - "KNOCHENTROCKEN, WIE MEIN CHEF!", - "EIN SEHR SPITZER PFLOCK", - "GUTER SPITZER PFLOHOCK, HOLZ SO EDEL, TRANSSYLVAAANISCH!!!", - "OH VERDAMMT, ICH MUSS MIR DIE NaeGEL SCHNEIDEN !", - "DA DRINNEN LIEGT B.J., UND GUCK MAL WIE DIE TANTE AUSSIEHT !", - // 125 - "NIET UND NAGELFEST", - " \"NIET & NAGEL GmbH & Co. KG\"", - "DAS TYPISCHE SKELETT IM TYPISCHEN VERLIESS EINES TYPISCHEN SPIELS", - "WIRD NORMALERWEISE ZUR STROMVERSORGUNG ALLER EINGESToePSELTEN GERaeTE VERWENDET", - "TOTALES KUNSTHANDWERK, WEIL SIE DANK DEN JAPANERN KLEINE MINIATUREN SIND", - // 130 - "ES GIBT NUR EINS, WAS GENAUSO HaeSSLICH IST", - "HAU AB. ICH SAG IHM GAR NICHTS. MAL GUCKEN OB ER AUSFLIPPT", - "SCHEINT ZIEMLICH VERNueNFTIG ZU SEIN", - "EIN FOTO VON PLATON WIE ER SEINEN VERLORENEN DIALOG SCHREIBT", - "SEH ICH SO AUS ALS OB ICH MIT POSTERN REDE ? !", - // 135 - "EIN HueBSCHER SCHREIBTISCH", - "EIN VON DER UNIVERSITaeT ZU OXFORD AUSGESTELLTES VAMPIR-JaeGER-JaeGER-DIPLOM", - "VOLLMOND IN FINSTERSTER NACHT", - "DIESE SCHRAUBEN SCHEINEN ZIEMLICH FEST ZU SITZEN", - "GUCK JETZT NICHT HIN, ABER ICH GLAUBE HIER GIBT ES EINE VERSTECKTE KAMERA", - // 140 - "EIN ULTRAMODERNER PFLOCK-DETEKTOR", - "NEIN, DAS LABOR IST IM ZWEITEN STOCK", - "EIN HueBSCHES NACHTTISCHCHEN ", - "EIN BATZEN GELD DER BEI EINEM WIRKLICH GUTEN ABENTEUER NICHT FEHLEN DARF", - "WENN ICH REICH WaeRE, SCHUBIDUBISCHUBIDUBUDU ", - // 145 - "KOMISCHE BLaeTTER, DIE WERDEN SIE WOHL AUS SueDAMERIKA ODER SO MITGEBRACHT HABEN .", - "ICH GLAUBE NICHT, DASS SIE ANTWORTEN WERDEN", - "EIN SCHoeNES HOLZKRUZIFIX. DEM HELDEN SIND DIE AUSMASSE SEI-NER SCHoeNHEIT NICHT GANZ KLAR.", - "ICH BETE NUR VOR DEM ZU-BETT-GEHEN", - "EJ, ICH GLAUBE, DIE SPITZE HIER IST EIN BISSCHEN LOSE !", - // 150 - "UND NACHHER BESCHWERST DU DICH, ICH HaeTTE DIR KEINEN WINK GEGEBEN !", - "EINE STINKNORMALE ZAUNSPITZE", - "NIEDLICH, OBWOHL SIE EIN BISSCHEN VERDRECKT SIND", - "SIE WERDEN MICH NICHT HoeREN, HI,HI,HI, SUPERGUT !", - "DIE SCHoeNE SCHLAFENDE AUS DEM WALDE VON TSCHAIKOWSKY ODER TSCHESLOFSKY ODER WIE DER HEISST.", - // 155 - "SEHR APPETITLICH", - "NEIN, SEHE ICH SO AUS, ALS WueRDE ICH BENUTZTE KAUGUMMIS KAUEN ?", - "EINE NIEDLICHE SICHEL. ICH WueSSTE NUR GERNE WO DER HAMMER IST.", - "DER GESUNDHEITSMINISTER WARNT : RAUCHEN GEFaeHRDET IHRE GESUNDHEIT", - "EINE GANZ NORMALE KERZE, MIT WACHS UND ALLEM DRUM UND DRAN", - // 160 - "MAN MUSS ECHT MAL GESEHEN HABEN WIE DIESE 2 GLaeNZENDEN MueNZEN GLaeNZEN", - "MAN MUSS ECHT GESEHEN HABEN WIE DIESE GLaeNZENDE MueNZE GLaeNZT !", - "DAMIT WERDE ICH GEGEN VAMPIRBISSE IMMUN SEIN.", - "NEIN,ES IST NOCH NICHT SO WEIT", - "EIN TAUSENDER UND EIN BISSCHEN KLEINGELD", - // 165 - "DA STEHT\"DEN KLAVIERSPIELER BITTE NICHT MIT LEBENSMITTELN BEWERFEN", - "CURRYWURST 3.80. POMMES FRITES 2.30., FRIKADELLEN 1.50", - "DIE BESTEN HAMBURGER DIESSEITS DER DONAU FueR NUR 3.80 DM", - "EIN SCHoeNER TOTENKOPF MIT EINEM ZIEMLICH DURCHDRINGENDEN BLICK, HI, HI, SUPERGUT !", - "HALLO TOTENKOPF, DU ERINNERST MICH AN HAMLETS ONKEL !", - // 170 - "ICH HABE DIE ANGEWOHNHEIT, NICHTS ANZUFASSEN, WAS MAL LEBENDIG GEWESEN IST", - "EIN PAPIERKORB", - "SIE WETTEN, WIE DAS SPIEL HEUTE ABEND AUSGEHT", - "WAS SICH WOHL DAHINTER VERBERGEN MAG", - "EJ, DIESER VORHANG BEWEGT SICH NICHT !", - // 175 - "GANZ SCHoeN GRUSELIG, DAS SCHLOSS DA, WAS ?", - "ICH SCHAFFS NICHT, ER IST ZU WEIT WEG, UM MICH ZU HoeREN", - "EIN TYPISCH TRANSSYLVANISCHER WALD, MIT BaeUMEN UND SO", - "RED KEINEN BLoeDSINN, ES IST DOCH STOCKDUNKEL!", - "KONDITOREI MueLLER. GEBaeCK UND KAUGUMMIS", - // 180 - "EINE SEHR SCHoeNE TueR", - "GESCHLOSSEN", - "EINE TOTAL GESCHLOSSENE TONNE", - "", - "WAS FueR SueSSE VIECHER !", - // 185 - "PSSS,PSSS,PSSS,MIETZCHEN...", - "KEINE REAKTION", - "DER MOND IST EIN SATELLIT DER DIE ERDE IN EINER UMLAUFGESCHWINDIGKEIT VON 28 TAGEN UMKREIST.", - "HALLO MOND DU KREISRUNDES MONDGESICHT", - "TOTAL MIT BRETTERN ZUGENAGELT", - // 190 - "NICHTS ZU MACHEN. HIER KOMMT NOCH NICHT MAL ARNOLD S. MIT DER KREISSaeGE DURCH", - "SCHEINT SO, ALS HaeTTE DIE TANNE DA EINEN ueBERDIMENSIONALEN SCHATTEN !", - "HEHOO, WIRT !", - "SIND NOCH ZIMMER FREI ?", - "KoeNNEN SIE MIR SAGEN WO ICH EINEN GEWISSEN GRAF DRASCULA FINDE ?", - // 195 - "JA, WAS GIBTS ?", - "UND WIESO ?", - "WW...WIRKLICH ?", - "GUTE FRAGE, ICH WERDE IHNEN MAL MEINE STORY ERZaeHLEN, ALSO...", - "NUR FueNF MINUTEN !", - // 200 - "ICH HEISSE HEINZ HACKER UND BIN VERTRETER EINER NORDDEUTSCHEN IMMOBILIENFIRMA", - "SO WIES AUSSIEHT WILL GRAF DRASCULA EINIGE HEKTAR LAND AUF HELGOLAND KAUFEN UND ICH BIN HIER UM ueBER DIE PREISE ZU VERHANDELN", - "MMMMH, ICH GLAUBE DASS ICH MORGEN FRueH MIT MEINER MAMI ZURueCKKOMME", - "WAS FueR EINE NACHT, NICHT WAHR ?", - "NICHTS, SCHON GUT", - // 205 - "HEEHOOO, KLAVIERSPIELER", - "WAS FueR EINE NACHT", - "UND ES IST AUCH GAR NICHT SO KALT", - "NUN GUT, ICH LASS DICH JETZT MAL IN RUHE WEITERSPIELEN", - "GENAU", - // 210 - "HALLO CHEF, ALLES KLAR ?", - "UND DIE FAMILIE ?", - "HIER IST MaeCHTIG WAS LOS, WAS ?", - "ICH HALTE BESSER MEINEN MUND", - "ZU HAUSE IST ES IMMER NOCH AM SCHoeNSTEN...ZU HAUSE IST ES IMMER....Hae ? ABER SIE SIND DOCH NICHT TANTA ENMA. WO ICH DOCH GAR KEINE TANTE EMMA HABE !", - // 215 - "JA, MEINER AUCH. SIE KoeNNEN MICH NENNEN WIE SIE WOLLEN, ICH HoeRE SELBST AUF HEINZCHEN WIE AUF KOMMANDO.", - "JA, ICH HAB GANZ SCHoeNE BEULEN, WAS ? ueBRIGENS, WO BIN ICH ?", - "JA", - "VERDAMMT.....", - "JA, KLAR, SELBSTVERSTaeNDLICH !", - // 220 - "DANN ALSO VIELEN DANk FueR DEINE HILFE. ICH WERDE DICH NICHT WEITER BELaeSTIGEN. WENN DU MIR BITTE NOCH SAGEN WueRDEST, WO DIE TueR IST.... ", - "WEIL DIE BEULE WOHL MEIN GEHIRN ANGEGRIFFEN HAT UND ICH EINFACH ueBERHAUPT NICHTS SEHE", - "PAH, MACHT NICHTS. ICH HABE IMMER ERSATZ DABEI", - "WOW, WAS FueR EIN SCHARFES WEIB ! OHNE BRILLE HABE ICH DAS GAR NICHT BEMERKT !", - "EJ, DU....", - // 225 - "UND WAS IST DAAAAAS ? !", - "MACH DIR KEINE SORGEN, BJ, MEINE GELIEBTE !ICH WERDE DICH AUS SEINEN KLAUEN BEFREIEN", - "ACH KOMM, ER HAT MICH AUF DIE PALME GEBRACHT", - "UUAAA, EIN WERWOLF ! KREPIER, DU MONSTER !", - "JA, DAS.... ", - // 230 - "JA, DAS.... ICH GLAUB, ICH GEH DANN MAL WEITER, MIT VERLAUB...", - "WAS?", - "WENN ICHS MIR RECHT ueBERLEGE, UM EHRLICH ZU SEIN, ICH GLAUBE NEIN ", - "SAG MIR OH GEBILDETER PHILOSOPH, GIBT ES IRGENDEINEN KAUSALZUSAMMENHANG ZWISCHEN DER LICHTGESCHWINDIGKEIT und SCHINKENSPECK", - "OKAY,OKAY,VERGISS ES. ICH WEISS JEDENFALLS NICHT, WARUM ICH DAS GESAGT HABE", - // 235 - "WAS PHILOSOPHIERST DU HIER HERUM, WO DU DOCH MENSCHEN FRESSEN MueSSTEST!", - "HaeH", - "EJ, KANNST DU DAS MIT DEN PRaeHISTORISCHEN NEIGUNGEN NOCHMAL ERKLaeREN ?", - "JA, MANN. DER KRAM MIT DEM DU MIR EBEN GEKOMMEN BIST. ICH HAB DAS NaeMLICH NICHT GANZ KAPIERT....", - "ICH HALTE BESSER MEINEN MUND, WEIL SOBALD ER BLUT RIECHT...", - // 240 - "JA, BITTE ?", - "JA, WAS GIBTS ?", - "ACH, WO SIES GERADE ERWaeHNEN,....", - "", - "ueBRIGENS, WAS WueRDE EIGENTLICH PASSIEREN, WENN DAS REZEPT ZUFaeLLIG IN DIE HaeNDE EINES VAMPIRS GERATEN WueRDE...", - // 245 - "NA WAS SOLLS. HoeR MAL, KOMMT DIR DAS NICHT AUCH WIE EIN DaeMLICHER KLEINER TRICK VOR, UM DAS SPIEL SCHNELL ZU BEENDEN ? NAJA, VIELLEICHT AUCH NICHT", - "LEER !", - "WEIL DU MIR B.J., MEINE GELIEBTE, GERAUBT HAST. OHNE SIE HAT MEIN LEBEN KEINEN SINN.", - "SEIN GEHIRN ?", - "OCH, NUR SO! ICH GLAUBE DASS ICH GENUG VON DEM KLEINEN MONSTERCHEN HABE", - // 250 - "SueSSE KLEINE JUNGFRAU, ICH BLEIB SO WIE ICH BIN !", - "DAMIT KOMMST DU NICHT DURCH.. GLEICH KOMMT POPEYE UND HOLT MICH HIER RAUS !", - "WAS FueR EIN SCHEISS-SPIEL, BEI DEM DEM DER HELD STERBEN MUSS", - "HALT ! WAS IST MIT MEINEM LETZTEN WUNSCH ?", - "HAR,HAR ! JETZT BIN ICH IMMUN GEGEN DEIN VERFLUCHTES UNGEHEUER. DAS HIER IST EINE ANTI-VAMPIR-ZIGARETTE,DIE MIR VON BRAUN GEGEBEN HAT.", - // 255 - "JA, KLAR. ABER ICH WERDE DIR BESTIMMT NICHT DAS REZEPT VERRATEN", - "MIT FOLTER KOMM ICH GUT KLAR, ICH DENK MIR SOGAR WELCHE AUS", - "NEIN, BITTE NICHT ! ICH SAG ALLES, ABER TUN SIE MIR DAS NICHT AN !", - "O.K. ICH HAB DIR ALLES ERZaeHLT. JETZT HOL B.J. UND MICH ENDLICH HIER RAUS UND LASS UNS IN RUHE", - "B.J. !WAS MACHST DU HIER ?WO IST DRASCULA ?", - // 260 - "WAS FueR EIN MIESER TYP ! NUR WEIL ER BLAUES BLUT HAT, MueSSEN IHM NOCH LANGE NICHT ALLE JUNGFRAUEN DIESER ERDE ZU FueSSEN LIEGEN", - "NIEDER MIT DEM BONZEN-ADEL !", - "SOLIDARITaeT MIT ALLEN ARMEN DIESER WELT... !", - "UND WIES AUSSIEHT HAT ER DICH NACH ALLEN REGELN DER KUNST ANGEKETTET", - "O.K. DU HAST NICHT ZUFaeLLIG EINE HAARSPANGE ?", - // 265 - "NANANA. STELL DICH NICHT SO AN . MIR FaeLLT SCHON WAS EIN.", - "HE, WIRT", - "WER GEWINNT ?", - "WER ?", - "SIEHST DU DENN NICHT, DASS HIER DRASCULA IST ?", - // 270 - "NA, DANN LASS IHN UNS ALLE MACHEN, ODER ?", - "GIB MIR EINEN GIN-TONIC", - "SCHON GUT. ICH HAB VERGESSEN, WAS ICH DIR SAGEN WOLLTE", - "GIB\247MIR\247SOFORT\247EINEN\247GIN\247TONIC\247ODER\247ICH\247SPIEL\247KLAVIER", - "WIELANGE DAUERT DAS SPIEL NOCH ?", - // 275 - "GUTE NACHT", - "UND WIE KOMMST DU VORAN, IGOR ? SCHLEPPEND ? HI,HI,HI, KLASSE !", - "WAS SOLL DAS SEIN, WAS DU DA MACHST?", - "NEIN", - "DANN ZIEH DIE BRILLE AUF", - // 280 - "WAS SOLL DAS MIT DER ueBERNATueRLICHEN ORGIE ?", - "O.K. ES REICHT. ICH KANN ES MIR SCHON VORSTELLEN", - "KoeNNTEST DU MIR NICHT ZUFaeLLIG SAGEN, WO DRASCULA IST ?", - "ACH KOMM, BITTE, BITTE!", - "WARUM NICHT ?", - // 285 - "ACH :NACHTS SCHLaeFT ER ?", - "NA, HOFFENTLICH KLAPPT DAS MIT DER EINKOMMENSERKLaeRUNG", - "ICH MUSS NaeMLICH MIT IHM REDEN", - "HEYHOO, GERIPPE !", - "VERDAMMT ! EIN SPRECHENDER TOTER !", - // 290 - "ERaeHL MAL WIESO HAST DU HIER ANGEHALTEN ?", - "UND WOZU SOLLTE DRASCULA EIN MONSTER SCHAFFEN WOLLEN ?", - "WIE HEISST DU, LIEBES GERIPPE ?", - "EJ, SOLL ICH DIR NICHT VIELLEICHT WAS ZU ESSEN BRINGEN ?", - "DU HAST DOCH BESTIMMT EINEN LEEREN MAGEN, HI,HI,HI !", - // 295 - "ICH HABE GERADE EINFACH KEINEN BOCK, ZU REDEN", - "FI........(BIEP) DICH DOCH IN DEIN BEFI.......(BIEP) KNIE, DU ALTER WI......(BIEP) !", - "ICH HABE SIE WIRKLICH GELIEBT, NAJA, GUT, SIe WAR WIRKLICH NICHT DIE HELLSTE VON OSRAM, ABER NOBODY IS PERFECT, STIMMTS ?", - "HEY SIE HATTE EINE WAHNSINNSFIGUR, UND WAS WILLST DU MEHR", - "NICHTS WIRD MEHR WIE VORHER SEIN. ICH WERDE INS KLOSTER GEHEN UND ELENDIGLICH DAHINSIECHEN.", - // 300 - "HIER KANN MICH NICHTS UND NIEMAND MEHR RAUSHOLEN, WEIL...", - "VON WEM ? VON WEM ?", - "ICH MoeCHTE PIRAT WERDEN !", - "ICH MoeCHTE PROGRAMMIERER WERDEN !", - "ERZaeHL MIR ETWAS ueBER SIEGFRIED UND DIE NIBELUNGEN", - // 305 - "ICH HAB EUCH NIE GESEHEN UND SPIEL JETZT EINFACH WEITER", - "WER HAT SICH DENN DIESEN SCHWACHSINN EINFALLEN LASSEN ?", - "EINE HANDTASCHE, WIE SIE MEINE OMI HAT", - "OH MANN, WIE GUT ICH AUSSEHE ! ", - "ICH KoeNNTE MICH GLATT IN MICH VERLIEBEN !", - // 310 - "UND WIE SOLL ICH MICH ABSCHLIESSEN ?", - "ICH WERDE MICH WOHL ERSTMAL AUFSCHLIESSEN MueSSEN, WAS ?", - "HIER STEH ICH GUT", - "HAB MICH SCHON", - "HALLO ICH", - // 315 - "BEI PASSENDER GELEGENHEIT WERDE ICH SIE MIR MAL REINTUN", - "ICH SEHE NICHTS BESONDERES", - "GUT SO", - "UND WIESOOO ?", - "ICH KANN NICHT", - // 320 - "HALLO DU DA", - "DIE GRUFT VON ONKEL DESIDERIUS", - "HAAALLO, ONKEL DESIDEERIUUS !", - "NEIN, ICH WILL MICH NICHT SCHON WIEDER SCHNEIDEN", - "aeHEM,MMM... !", - // 325 - "MMMM, LECKER,UaeaeHH !", - "JA, HUST,HUST !", - "HEY, GUCK MAL, HIER KLEBT EIN KAUGUMMI", - "DAS SUPERHANDILY DAS ICH ZU WEIHNACHTEN BEKOMMEN HABE", - "GANZ SCHoeN HOCH", - // 330 - "TRITT AUF DEN BALKON, JULIA !", - "DU BIST DER STERN AN MEINEM FIRMAMENT !", - "EJ, TueR, WAS ISS LOSS ?", - "HEYHOO, TRANSSYLVANISCHES ZIGARRETTENAUTOMaeTCHEN !", - "EIN ZIGARRETTENSPENDERMASCHINCHEN", - // 335 - "ICH HAB DA NOCHNE MueNZE DRIN", - "NEIN, ICH RAUCHE UND TRINKE NICHT MEHR", - "VON JETZT AN WERDE ICH MICH NUR NOCH DEN FRAUEN WIDMEN", - "BETRUG ! ES IST GAR NICHTS RAUSGEKOMMEN !", - "ENDLICH !", - // 340 - "EINE TRUHE, WEITER NICHTS", - "HALLO TRUHE, DU HEISST WIE MEINE TANTE TRUDE", - "ICH HABE DIE TASCHE VON B.J. GEFUNDEN", - "MEIN GOTT, ICH SEH MICH NICHT IM SPIEGEL, ICH BIN EIN VAMPIR !", - "....ACH, NEE. ES IST NUR EIN GEMaeLDE", - // 345 - "SPIEGLEIN, SPIEGLEIN AN DER WAND, WER IST DER SCHoeNSTE Im GANZEN LAND ?", - "ER MACHT MIR NICHT AUF", - "GUT. ICH HABE DIE OHRENSToePSEL DRIN", - "EIN VON DER UNIVERSITaeT ZU CAMBRIDGE AUSGESTELLTES VAMPIR-JaeGER DIPLOM.", - "NEIN, MIR FEHLEN NOCH EINIGE ZUTATEN, ES LOHNT SICH NICHT, IHN ZU WECKEN !", - // 350 - "ICH HABE NaeMLICH KEIN GELD", - "EINE NORDDEUTSCHE LAMPE", - "WIRT! HELFEN SIE MIR !", - "DA STAND PLoeTZLICH EIN VAMPIR UND HAT MEINE FREUNDIN MITGENOMMEN.", - "ABER WOLLEN SIE MIR DENN NICHT HELFEN ?", - // 355 - "TOT? WAS WOLLEN SIE DAMIT SAGEN ?", - "aeHEM !", - "EIN VAMPIR HAT DAS MaeDEL VON 506 ENTFueHRT !", - "DU MUSST MIR HELFEN !", - "KANNST DU KEIN BEERDIGUNGSLIED SPIELEN ?", - // 360 - "WIE HaeLST DU DAS BLOSS AUS : JEDEN TAG DIE GLEICHEN LIEDER", - "AHA, UND WIE HoeRST DU MICH DANN ?", - "GIB MIR DIE OHRENSToePSEL", - "ACH KOMM, ICH GEB SIE DIR AUCH SOFORT WIEDER", - "ACH KOOOOMMM !", - // 365 - "AUF WIEDERSEHEN. ICH MUSS EINEN VAMPIR ToeTEN", - "", - "REDEST DU AUF TRANSSYLVANISCH ODER WAS ?", - "WER IST ONKEL DESIDERIUS ?", - "WAS SOLL LOS SEIN MIT DIESEM GRAF DRASCULA ?", - // 370 - "WER IST DIESER VON BRAUN ?", - "UND WARUM MACHT ER ES NICHT ?", - " UND WO KANN ICH VON BRAUN FINDEN ?", - "ALSO DANKE UND AUF WIEDERSEHEN, SCHLAF SCHoeN", - "WIR SOLLTeN BESSER VORHER KLINGELN", - // 375 - "SIND SIE PROFESSOR VON BRAUN ?", - "UND SIE KoeNNTEN MIR NICHT VERRATEN, WO..... ?", - "ICH NEHM IHM NICHT AB, DASS ER HELGE SCHNEIDER IST", - "PROFESSOR!", - "HELFEN SIE MIR !ES GEHT UM DAS LEBEN MEINER GELIEBTEN !", - // 380 - "SCHON GUT, ICH BRAUCHE IHRE HILFE NICHT", - "OK. ICH GEHE !", - "KEINE ANGST. GEMEINSAM BESIEGEN WIR DRASCULA", - "UND WARUM HELFEN SIE MIR DANN NICHT ?", - "ICH HABE SIE", - // 385 - "ABER ICH HABE SIE DOCH !", - "EINVERSTANDEN", - "...aeHM,...JA", - "ICH GEHE DIREKT NOCHMAL INS AQUARIUM", - "ICH BIN SO WEIT, MICH IHREM TEST ZU STELLEN", - // 390 - "SCHON GUT, ALTERCHEN. ZAHLTAG !", - "SCHON GUT. ICH WOLLTE SOWIESO GERADE GEHEN", - "TSCHULDIGE", - "WIE FINDEST DU DIESES BUCH? KLAVIERSTueCKE VON TSCHAIKOWSKY", - "WIE BRINGT MAN EINEN VAMPIR UM ?", - // 395 - "HAT MAN DIR NICHT GESAGT WIE MAN SICH BETTET SO LIEGT MAN ?", - "GENAU DAS SAGT MEINE MUTTER IMMER ZU MIR", - "WARUM KONNTE DICH DRASCULA NICHT ERLEDIGEN ?", - "UND WAS DANN ?", - "SUPER ! DA HABEN SIE EIN IMMUNITaeTSMISCH.... !", - // 400 - "ALSO ?", - "SEHR GUT", - "KoeNNEN SIE NOCHMAL WIEDERHOLEN WAS ICH FueR DIESE MISCHUNG BRAUCHE ?", - "DANN SATTEL ICH MAL DIE HueHNER UND BESORG ES", - "ENTSCHULDIGUNG, WO IST DER KLAVIERSPIELER ?", - // 405 - "ICH\247HAB\247SCHON\247ALLE\247ZUTATEN\247FueR\247DIE\247MISCHUNG", - "EINE FRAGE : WAS SOLL DAS HEISSEN : REIPERK ALUCSARD?", - "SAGEN SIE SCHON...", - "UND WO SOLL DIESE GROTTE SEIN ?", - "WAS IST ? GABS BEI EUCH KEINE HEXENPROZESSE ?", - // 410 - "...ABER WENN ICH NOCH MEHR VAMPIREN BEGEGNE ?", - "EIN VAMPIR, DER MICH NICHT DURCHLaeSST", - "ER SIEHT WIE AUS WIE JODA, NUR VIEL GRoeSSER", - "EJ, JODA. WENN DU MICH DURCHLaeSST, GEB ICH DIR ne mark", - "NA GUT, DIR KANN MAL WOHL NICHTS ERZaeHLEN", - // 415 - "HALLO, VAMPIR, WAS FueR EINE NACHT, WAS ?", - "HAT MAN DIR SCHON MAL GESAGT, DASS DU AUSSIEHST WIE JODA ?", - "BIST DU EIN VAMPIR ODER EIN oeLGEMaeLDE ?", - "ICH HALT BESSER MEINEN MUND, SONST REGST DU DICH NOCH AUF", - "ABGESCHLOSSEN", - // 420 - "DIE ELSTER KoeNNTE MIR EIN AUGE RAUSREISSEN, WENN ICHS VERSUCHE !", - "ZU !MEIN GOTT, WIE UNHEIMLICH !", - "DIE SCHARNIERE SIND ZUGEROSTET", - "HIER IST NUR EIN PaeCKCHEN MEHL", - "DAS HAT DEN ROST ENTFERNT", - // 425 - "ICH HABE EINEN PFLOCK AUS FICHTENHOLZ GEFUNDEN", - "ICH NEHM DAS HIER, DAS IST SCHoeN DICK !", - "NA, ICH GLAUBE ICH KANN MICH JETZT MAL AUS DIESER DaeMLICHEN VERKLEIDUNG SCHaeLEN", - "EINGaeNGE ZU DEN SEITENFLueGELN WEGEN BAUARBEITEN GESPERRT. BENUTZEN SIE BITTE DEN HAUPTEINGANG", - "...ER IST BLASS, HAT KOMISCHE ZaeHNE, TRaeGT EIN TOUPET UND EINEN UMHANG...DAS MUSS DRASCULA SEIN !", - // 430 - " ES IST B.J. ! B.J. ALLES O.K ?", - "ICH WEISS SCHON DASS SIE DUMM IST, ABER ICH BIN SO EINSAM", - "DU HAST BESTIMMT KEINEN SCHLueSSEL, STIMMTS ?", - "ICH WETTE, DU HAST KEINEN DIETRICH", - "GIB MIR DIE HAARSPANGE. ICH MACHS WIE MCGYVER", - // 435 - "BEWEG DICH NICHT, ICH BIN SOFORT ZURueCK", - "VERDAMMT! ER IST MIR ABGEBROCHEN !", - "HEYJEYJEY !UND ICH HAB MICH AUCH RASIERT, ALTER !", - "JA, SCHATZ ?", - "ES REICHT NICHT", - // 440 - "DER KLAVIERSPIELER IST NICHT DA", - "EIN TRANSSYLVANISCHER GIN-TONIC", - "ICH HABE IMMER NOCH KEIN ZIMMER", - "ES SCHEINT DASS ER IN DER BADEWANNE HaeNGENGEBLIEBEN IST UND DANN EINE KNEIPE AUFGEMACHT HAT", - "ER IST VOLL WIE EIN RUSSE", - // 445 - "DIESES HAAR.... TJA,ES ERINNERT MICH AN JEMANDEN", - "ES IST EIN KNoeCHRIGES GERIPPE", - "GUCK MAL ! BRAD PITT!", - "ER SCHLaeFT. ES WaeRE WIRKLICH SCHADE, IHN ZU WECKEN", - "ER IST HaeSSLICHER ALS DIDI HALLERVORDEN", - // 450 - "EIN SARG AUS FICHTENHOLZ", - "ER WIRD MICH IN LECKERE KLEINE SCHEIBCHEN SCHNEIDEN", - "ICH STEH NICHT SO AUF PENDEL. ICH FIND OHRFEIGEN BESSER", - "ICH KANN NICHT. ICH HAB HANDSCHELLEN AN", - "DAS SIEHT DOCH JEDER, DASS DAS EINE GEHEIMTueR IST", - // 455 - "SIE IGNORIEREN MICH", - "ACH KOMM !", - "LAUT DREHBUCH BEWEGE ich mich, ABER das Spiel war so teuer, dass nichts mehr FueR EIN FITNESS-STUDIO ueBRIG war, also habe ich auch keinen strammen arsch.", - "SCHEINT SO, ALS OB ER EIN BISSCHEN LOSE AN DER WAND HaeNGT", - "ICH GLAUBE KAUM, DASS SIE MIR NueTZEN WIRD. SIE IST VIEL ZU FEUCHT, UM SIE ANZUZueNDEN", - // 460 - "ZUM WESTFLueGEL ?ICH BIN DOCH NICHT BLoeD !WER WEISS WAS MICH DA ERWARTET !", - "MIT HueBSCHEN TRANSSYLVANISCHEN MOTIVEN", - "", - "WIE SCHADE, DASS DAS DA KEIN LECKERER LAMMBRATEN DRIN IST.", - "ALS ICH BEIM LETZTEN MAL IN EINEN OFEN GEGUCKT HABE, IST DAS HAUS IN DIE LUFT GEFLOGEN", - // 465 - "DAS IST DAS WAPPEN DER TRANSSYLVANISCHEN FUSSBALLMANNSCHAFT", - "UND WOZU? SOLL ICH MIR DAS ANS KNIE BINDEN ?", - "DIESE SORTE SCHUBLADE LaeSST SICH NICHT oeFFNEN", - "ICH MoeCHTE ECHT NICHT WISSEN, WAS ES DA DRIN ZU ESSEN GIBT!", - "DAS WIRKT ZIEMLICH IMPRESSIONISTISCH AUF MICH", - // 470 - "DIE NACHT VERSCHLUCKT ALLES... WIE UNHEIMLICH, WAS?", - "SIE KLEMMT", - "DER KoeNIG HAST DU DIR DAS NICHT DENKEN KoeNNEN?", - "NEIN, ICH HAB SCHON EINEN ZU HAUSE, DEN ICH FueTTERE UND SO", - "EIN REGAL MIT BueCHERN UND ANDEREN SACHEN", - // 475 - "UND WEN SOLL ICH UM DIESE UHRZEIT NOCH ANRUFEN?", - "\"EINKOMMENSERKLaeRUNG LEICHT GEMACHT\" WIE INTERESSANT!", - "ICH HAB SCHON EINS ZU HAUSE.ICH GLAUBE DAS IST WELTWEIT EIN BESTSELLER", - "EIN TOTAL NORMALER SCHLueSSEL", - "ICH GLAUBE, DER GEHoeRT HIER NICHT HIN", - // 480 - "HEY, DIE FRITTEN SEHEN AUS WIE ECKZaeHNE! ICH BIN HIN UND WEG", - "das ist wohl echt nicht DER moment, RUMZUNASCHEN, WENN MEINE FREUNDIN IN DEN KLAUEN DER fiesesten ausgeburt der Welt ist.", - "WAS FueR EINE RIESENGAUDI DAS MACHT, DAMIT VAMPIRE FERTIGZUMACHEN!", - "MAL GUCKEN, OB NOCH EINER AUFTAUCHT", - "NEIN, ES MUSS MIT NOCH SO EINEM DRECKIGEN, STINKENDEN UND NERVIGEN VAMPIR WIE VORHIN SEIN", - // 485 - "DAS IST DIE ORIGINALPERueCKE VON ELIVS ALS ER SCHON EINE GLATZE HATTE", - "MEHL, ABER ICH KANN JETZT KEINE MARKEN NENNEN", - "VIELLEICHT EIN ANDERES MAL, OK?", - "EINE WUNDERSCHoeNE AXT. ZU SCHADE, DASS GERADE KEIN VAMPIRKOPF IN DER NaeHE IST", - "NEIN, IM GRUNDE BIN ICH EIN NETTER MENSCH", - // 490 - "DAS IST DAS DEO VON MAGGIE THATCHER, HIHIHI!", - "EIN ZIEMLICH HueBSCHER UMHANG", - "", - "WIE JEDER BELIEBIGE AST EINES BELIEBIGEN BAUMES AN JEDEM BELIEBIGEN ORT IN DER WELT, NICHTS BESONDERES ALSO", - "\"UNGLAUBLICH\" EIN SEIL IN EINEM VIDEOSPIEL!", - // 495 - "WOZU DAS WOHL NOCH GUT SEIN WIRD...", - "EIN SEIL AN EINEM AST ODER EIN AST AN EINEM SEIL, JE NACHDEM WIE MAN DAS SO BETRACHTET", - "ES SCHEINT, DAS DIESE ELSTER WAS ueBLES IM SCHILDE FueHRT", - "ZISCH AB, ICH SAG IHR NICHTS, MAL SEHEN OB SIE AUSFLIPPT", - "SIEHT SO AUS ALS WaeRE SIE TOT, ABER STIMMT NICHT,NE?", - // 500 - "FueR DIESES SPIEL WURDEN KEINE TIERE MISSHANDELT ODER GEToeTET", -}, -{ - // 0 - "", - "C'EST LA DEUXI\212ME PORTE PLUS GRANDE QUE J'AI VUE DANS MA VIE.", - "ENFIN, PAS AUTANT QUE \207A.", - "ELLE EST BOUCH\202E AVEC DES GROSSES PLANCHES. L'\202GLISE EST PEUT-\210TRE ABANDONN\202E DEPUIS QUELQUES ANN\202ES.", - "MAIS JE NE L'AI PAS OUVERTE.", - // 5 - "QU'EST-CE QUE JE FAIS? JE L'ARRACHE?", - "BONJOUR, PORTE. JE VAIS T'ENCADRER.", - "C'EST TROP POUR MOI.", - "UNE FEN\210TRE BOUCH\202E AUX GROSSES PLANCHES.", - "JE N'ARRIVE PAS.", - // 10 - "\200A Y EST.", - "ET POURQUOI?", - "SALUT, FEN\210TRE! AS-TU QUELQUE CHOSE \205 FAIRE CE SOIR?", - "PAS SANS LE PERMIS DE TRAVAUX PUBLIQUES.", - "H\202! CETTE FEN\210TRE A SEULEMENT UNE GROSSE PLANCHE...", - // 15 - "OH\202! OH\202!-FEN\210TRE!", - "BONJOUR, TOI.", - "", - "JE N'ARRIVE PAS.", - "C'EST BIEN O\227 ELLE EST.", - // 20 - "", - "C'EST UNE TOMBE EN FORME DE CROIX.", - "NON, MERCI.", - "BONJOUR, LE D\202FUNT: VEUX-TU DES VERMISSEAUX?", - "MAIS OUI. COMME EN POLTERGUEIST.", - // 25 - "", - "", - "JE REVIENS EN QUINZE MINUTES.", - "D\202FENSE D'AFFICHER.", - "", - // 30 - "C'EST FERM\202 \205 CL\202.", - "J'EN AI D\202J\205 UN.", - "", - "IL NE R\202POND PAS.", - "MAIS NON, C'EST BIEN GAR\202.", - // 35 - "C'EST UNE PORTE.", - "UN TIROIR DE LA TABLE.", - "UNE ARMOIRE SUSPECTE.", - "BONJOUR, L'ARMOIRE. \200A VA?", - "", - // 40 - "", - "C'EST UN CAND\202LABRE TR\212S VIEUX.", - "IL DOIT \210TRE L\205 D\212S QUE MAZINGUER-Z \202TAIT UNE VIS.", - "NON, C'EST UNE RELIQUE.", - "C'EST UN JOLI R\202TABLE.", - // 45 - "", - "HI! HI! HI!", - "", - "NON.", - "", - // 50 - "HA! HA! HA! -QUE C'EST BON!", - "", - "", - "", - "JE NE VOIS RIEN DE SP\202CIAL.", - // 55 - "C'EST FERNAN, LA PLANTE.", - "C'EST UNE DES PIQUES DE LA GRILLE.", - "H\202! L\205-DESSOUS IL Y A UNE BO\214TE D'ALLUMETTES.", - "REGARDE! UN PAQUET DE CLINEX. -ET IL Y A UN TOUT NEUF!", - "IL N'Y A RIEN DE PLUS DANS LE SEAU.", - // 60 - "C'EST UN AVEUGLE QUI VE VOIT PAS.", - "", - "", - "", - "", - // 65 - "C'EST UNE GROSSE SOMME D'ARGENT.", - "", - "", - "", - "", - // 70 - "", - "", - "", - "", - "", - // 75 - "", - "", - "", - "", - "", - // 80 - "", - "", - "", - "", - "", - // 85 - "", - "", - "", - "", - "", - // 90 - "", - "", - "", - "", - "", - // 95 - "", - "", - "", - "", - "", - // 100 - "ELLE N'A RIEN DE SP\220CIAL", - "CELA N'A RIEN D'EXTRAORDINAIRE", - "QU'EST-CE QU'IL Y A?", - "BONJOUR!", - "RIEN DE NOUVEAU?", - // 105 - "LA FAMILLE, \200A VA?", - "-QUELLES CHOSES TU AS!", - "MAIS, COMME JE VAIS PRENDRE CELA!", - "MA RELIGION ME L'INTERDIT", - "CE N'EST PAS MIEUX", - // 110 - "BIEN S\352R, MON VIEUX!", - "ON NE PARLE PLUS DE CELA", - "IMPOSSIBLE", - "CELA NE S'OUVRE PAS", - "JE NE PEUX PAS TOUT SEUL", - // 115 - "SI JE VOULAIS, J' ARRIVERAIS, MAIS \200A ME DONNE DE LA PARESSE", - "JE N'Y VOIT PAS UNE RAISON APPARENTE", - "C'EST UN CERVEAU ASSEZ BIEN", - "ET BIEN CERVEAU, QUE PENSES-TU FAIRE CE SOIR?", - "NON, ON DOIT LE GARDER DANS UN ENDROIT \267 L'ABRI DES MUTATIONS DE L'ATMOSPH\324RE", - // 120 - "C'EST UN DUR, COMME MON CHEF", - "C'EST UN PIEU TR\324S AIGUIS\220", - "FID\324LE PIEU POINTUUU, NOBLE CH\322NE TRANSYLVAAAN", - "TIENS! JE DOIS COUPER MES ONGLES!", - "B.J. EST L\267-DEDANS. ET QUELLE EST MIGNONE CETTE NANA!", - // 125 - "ELLE EST FERM\220E TR\324S SOLIDEMENT", - "\"CADENAS SOLIDES S.A.\"", - "C'EST LE TYPIQUE SQUELETTE QU'ON TROUVE DANS LES GE\342LES DE TOUS LES JEUX", - "ON L' EMPLOIE NORMALEMENT POUR INDUIR DU COURANT \220LECTRIQUE AUX APPAREILS QU'Y SONT RACCORD\220S", - "C'EST ABSOLUMENT ARTISANAL, CAR LES JAPONAIS LES FONT MAINTENANT DE POCHE", - // 130 - "J'AI SEULEMENT VU DANS MA VIE UNE CHOSE SI MOCHE", - "LAISSE. JE NE LUI DIS RIEN POUR S'IL SE F\266CHE", - "IL SEMBLE ASSEZ RATIONNEL", - "C'EST UNE PHOTO DE PLATON EN TRAIN D'\220CRIRE SON DIALOGUE PERDU", - "JE NE SUIS PAS DE CEUX QUI PARLENT AUX POSTERS", - // 135 - "UN BUREAU ASSEZ MIGNON", - "C'EST UN DIPL\342ME DE CHASSE-CHASSE-VAMPIRES HOMOLOGU\220 PAR L'UNIVERSIT\220 D'OXFORD", - "C'EST UNE NUIT NOIRE AU PLEINE LUNE", - "IL PARA\327T QUE CES VIS NE SONT PAS TR\324S ENFONC\220ES", - "N'Y REGARDES PAS, MAIS JE CROIS QU'UNE CAM\220RA OCCULTE ME VISE", - // 140 - "UN D\220TECTEUR DE PIEUX ASSEZ MODERNE", - "NON, LE LABORATOIRE EST AU DEUXI\324ME \220TAGE", - "UNE JOLIE TABLE DE NUIT", - "C'EST UN TAS D'ARGENT QUI NE PEUT PAS MANQUER DANS UNE AVENTURE DIGNE DE TEL NOM", - "SI J'\220TAIS RICHE. DUBIDOUDUBIDOUDUBIDOUDUBIDOU", - // 145 - "CE SONT DES FEUILLES BIZARRES. ON A D\352 LES AMENER DE L'AM\220RIQUE DU SUD OU PAR L\267", - "JE NE PENSE PAS QU'ILS VONT ME R\220PONDRE", - "C'EST UN JOLI CRUCIFIX EN BOIS. L'IC\342NE N'ARRIVE PAS \267 SAISIR TOUT LA SPLENDEUR DE SA BEAUT\220", - "JE PRIE SEULEMENT AVANT DE ME COUCHER", - "H\220!, IL PARA\327T QUE CETTE PIQUE S'EST UN PETIT PEU D\220CROCH\220E", - // 150 - "TU NE POURRAS TE PLAIGNER APR\324S DU PEU DE PISTES QUE JE TE DONNE", - "C'EST UNE PIQUE ASSEZ CONVENTIONNELLE", - "ILS SONT MIGNONS, MAIS UN PEU SALES", - "NON, NON, ILS NE ME \220COUTERAIENT PAS. HI, HI, HI -QUE C'EST BON!", - "\"LA BELLE DORMANTE DU BOIS\" DE TCHA\330KOVSKI, OU TCHA\330FROSKI, OU N'IMPORTE COMMENT DIT-ON ", - // 155 - "TR\324S APP\220TISSANT", - "JE NE SUIS PAS DE CEUX QUI SUCCENT DES CHEWING-GUMS D\220J\267 M\266CH\220S", - "UNE FAUCILLE TR\324S MIGNONE. jE ME DEMANDE O\353 SERA LE MARTEAU?", - "\"LES FABRICANTS DE TABAC AVERTISSENT QUE LES AUTORIT\220S SANITAIRES SONT S\220RIEUSEMENT NUISIBLES POUR LA SANT\220 \"", - "UNE BOUGIE COURANTE ET NORMALE ET AVEC DE LA CIRE M\322ME", - // 160 - "IL FAUT VOIR COMME ELLES LUISENT CES DEUX RUTILANTES MONNAIES!", - "IL FAUT VOIR COMME ELLE LUIT CETTE RUTILANTE MONNAIE!", - "AVEC \200A JE SERAI IMMUNIS\220 CONTRE LES MORSURES DES VAMPIRES", - "NON, CE N'EST PAS ENCORE LE MOMENT", - "IL Y A UN BILLET DE MILLE ET DEUX SOUS", - // 165 - "ON DIT\"VOUS \322TES PRI\220S DE NE PAS DONNER \267 MANGER AU PIANISTE\"", - "L'OMELETTE, 200. DES PETITS POISSONS FRITS, 150, DES POMMES A\330OLI, 225", - "LES MEILLEURES HAMBURGERS DE CE C\342T\220 DU DANUBE, SEULEMENT 325", - "C'EST UNE JOLIE T\322TE DE MORT AU REGARD TR\324S PER\200ANT -HI, HI, HI, QUE C'EST BON!", - "BONJOUR T\322TE DE MORT, TU ME RAPPELLES L'ONCLE HAMLET", - // 170 - "J'AI LA HABITUDE DE NE PAS TOUCHER AUX CHOSES QUI ONT V\220CU AUTREFOIS", - "C'EST UNE POUBELLE", - "C'EST UNE MASSUE POUR LE MATCH DE CE SOIR", - "JE ME DEMANDE CE QU'IL AURA DERRI\324RE", - "H\220, CE RIDEAU NE BOUGE PAS!", - // 175 - "TIENS, QUEL CH\266TEAU SI SOMBRE, H\220? ", - "JE NE PEUX PAS, IL EST TROP LOIN POUR M'ENTENDRE", - "C'EST UNE TYPIQUE FOR\322T TRANSYLVANE, AVEC DES ARBRES", - "MAIS TU NE DIS QUE DES B\322TISES, C'EST UN LIEU OBSCUR!", - "CONFISERIE GARCIA, G\266TEAUX ET CHEWING-GUMS.", - // 180 - "UNE PORTE TR\324S JOLIE", - "ELLE EST FERM\220E", - "UN TONNEAU COMPL\324TEMENT FERM\220", - "", - "QUELLES BESTIOLES SI MIGNONES!", - // 185 - "BSSST, BSSST, PETIT CHAT...", - "IL NE R\220POND PAS", - "LA LUNE EST UN SATELLITE TOURNANT AUTOUR DE LA TERRE AVEC UNE P\220RIODE DE ROTATION DE 28 JOURS", - "SALUT, LUNE!, LUN\220E ET \220TOURDIE ", - "ELLE EST COMPL\324TEMENT BOUCH\220E AVEC DES GROSSES PLANCHES", - // 190 - "C'EST IMPOSSIBLE, CECI NE L'OUVRE PAS NI LE MAJORDOME DE LA T\220L\220", - "H\220, IL PARA\327T QUE L'OMBRE DE CE CYPR\324S-LA EST ALLONG\220E", - "OH\220! H\342TELIEEER!", - "JE VOUDRAIS UNE CHAMBRE", - "SAVEZ-VOUS O\353 EST QUE JE PEUX TROUVER UN TEL COMTE DRASCULA?", - // 195 - "OUI, QU'EST-CE QU'IL Y A? ", - "ET \200A?", - "EN... EN V\220RIT\220?", - "UNE BONNE QUESTION, JE VAIS VOUS RACONTER MON HISTOIRE, TIENS...", - "JE N'AI QUE POUR CINQ MINUTES", - // 200 - "JE M'APPELLE JOHN HACKER ET SUIS LE REPR\220SENTANT D'UNE INMOBILI\324RE BRITANNIQUE", - "IL PARA\327T QUE LE COMTE DRASCULA VEUT ACHETER DES TERRAINS \267 GIBRALTAR ET ON M'A ENVOY\220 POUR N\220GOCIER L'AFFAIRE", - "MAIS JE PENSE QUE DEMAIN DE BONNE HEURE JE RETOURNE AVEC MA MAMAN", - "UNE BELLE NUIT, N'EST-CE PAS?", - "NON, RIEN", - // 205 - "OH\220! PIANISTE!", - "UNE BELLE NUIT", - "ET EN PLUS, IL NE FAIT PAS FROID", - "EH BIEN, RIEN. CONTINUE \267 JOUER", - "C'EST \200A", - // 210 - "BONJOUR CHEF, \200A VA?", - "ET LA FAMILLE?", - "IL Y A DE L'AMBIANCE ICI, H\220?", - "TANT MIEUX SI JE NE DIS RIEN", - "ON EST MIEUX CHEZ-SOI QU'AILLEURS... ON EST MIEUX DANS... H\220? MAIS VOUS N'\322TES PAS TANTE EMMA. MIEUX ENCORE. -SI JE N'AI PAS AUCUNE TANTE EMMA!", - // 215 - "OUI, LE MIEN AUSSI. VOUS POUVEZ M'APPELLER COMME VOUS VOULEZ, MAIS SI VOUS M'APPELLEZ JOHNY, JE VIENS COMME LES CHIENS", - "OUI, QUELS COUPS QUE J'AI, N'EST-CE PAS? EN FAIT, O\353 SUIS-JE?", - "OUI", - "A\330E!, A\330E!...", - "OH, OUI! BIEN S\352R", - // 220 - "EH BIEN! MERCI BEAUCOUP POUR TON AIDE. JE NE TE D\220RANGE PLUS SI TU ME DIS O\353 SE TROUVE LA PORTE, S'IL TE PLA\327T...", - "CAR LE COUP A D\352 ME TOUCHER LA CERVELLE ET JE N'Y VOIS GOUTTE", - "BAH!, \200A FAIT RIEN. J'AI TOUJOURS UNE DE R\220CHANGE", - "OUAH, QUELLE BELLE FEMME! -JE NE M'AVAIS PAS RENDU COMPTE! BIEN S\352R, SANS LES LUNETTES...", - "\220COUTE...", - // 225 - "ET \200AAAAAA?!", - "NE T'EN FAIS PAS B. J., MON AMOUR! JE VAIS TE SAUVER DES GRIFFES DE CELUI-L\267 ", - "IL ME CASSE LE NEZ, TIENS!", - "AHHH, UN HOMME-LOUP! MEURS MAUDIT!", - "OUI, C'EST CELA...", - // 230 - "OUI, C'EST CELA... JE CROIS QUE JE VAIS SUIVRE MON CHEMIN. PARDON.. ", - "QUOI?", - "EH BIEN, EN V\220RIT\220, BIEN PENS\220... JE NE CROIS PAS", - "DIS -MOI, OH! \220RUDITE PHILOSOPHE! Y A-T-IL UNE R\220LATION CAUSE-EFFET ENTRE LA VITESSE ET LE LARD?", - "\200A VA, \200A VA, ABANDONNE. EN TOUT CAS, JE NE SAIS PAS POURQUOI JE L'AI DIT.", - // 235 - "QU'EST-CE QUE TU FAIS ICI EN TRAIN DE PHILOSOPHER AU LIEU DE MANGER DU MONDE?", - "QU'EST-CE QUE C'EST QUE \200A?", - "\220COUTE, PEX-TU R\220P\220TER CETTE PHRASE DES \"INCLINATIONS PR\220-\220VOLUTIVES\"?", - "BIEN S\352R, MON VIEUX. CETTE HISTOITE QUE TU M'AS LACH\220E AVANT. CE QUE JE N'AI PAS BIEN COMPRIS...", - "NON, LE MIEUX SERA DE NE RIEN DIRE. CAR SI JE LE TOUCHE LA VEINE.....", - // 240 - "OUI, QUE SE PASSE-T-IL?", - "OUI, QU'EST-CE QU'IL Y A? ", - "EH BIEN, MAINTENANT QU'IL ABORDE LE SUJET JE LUI DIRAI QUE...", - "", - "EN FAIT, QU'ARRIVERAIT-IL SI UN VAMPIRE SE POURVOYAIT DE LA FORMULE PAR HASARD... ", - // 245 - "EH BIEN, RIEN. \220COUTE, CECI NE TE SEMBLE PAS UN RAVAUDAGE QU'ON A MIS EN SC\324NE POUR EN FINIR T\342T AVEC LE JEU? BON, PEUT-\322TRE PAS", - "C'EST VIDE!", - "POURQUOI TU M'AS VOL\220 MON AMOUR. B.J. SI ELLE N'EST PAS L\267, LA VIE N'AS PAS DE SENS POUR MOI", - "SON CERVEAU?!", - "CE N'EST POUR RIEN, MAIS JE CROIS QUE TON PETIT MONSTRE M'A F\266CH\220", - // 250 - "MA VIERGE, QUE JE RESTE TEL QUE JE SUIS!", - "TU N'AURAS PAS LE DERNIER MOT. C'EST S\352R QUE MAINTENANT APPARA\327T SUPER-LOPEZ ET ME LIB\324RE!", - "QUELLE MERDE DE JEU DONT MEURT LE PROTAGONISTE!", - "UN INSTANT, QU'Y A-T-IL DE MON DERNIER D\220SIR?", - "HA! HA! MAINTENANT JE SUIS IMMUNIS\220 CONTRE TOI, D\220MON MAUDIT. CETTE CIGARETTE EST UNE POTION ANTI-VAMPIRES QUI M'A DONN\220 VON BRAUN ", - // 255 - "OUI, C'EST S\352R, MAIS TU N'OBTIENDRAS JAMAIS DE MOI LA FORMULE", - "JE PEUX SUPPORTER LA TORTURE, ET ENCORE LA CR\220ER ", - "NON, S'IL VOUS PLA\327T, JE PARLERAI, MAIS NE ME FAITES PAS \200A!", - "EH BIEN. JE T'AI D\220J\267 DIT CE QUE TU VOULAIS SAVOIR. MAINTENANT D\220LIVRE-NOUS, B.J. ET MOI, ET FICHEZ-NOUS LA PAIX", - "B.J.! QU'EST-CE QUE TU FAIS L\267? DRASCULA, O\353 EST-IL?", - // 260 - "QU'IL EST M\220CHANT! C'EST SEULEMENT PAR-CE QU'IL APPARTIENT \267 LA NOBLESSE QU'IL CROIT POUVOIR EXERCER LE DROIT DE GAMBADE AVEC N'IMPORTE QUI", - "\267 BAS L'ARISTOCRATIE ARBITRAIRE!", - "DEBOUT LES PAUVRES DU MOOONDE....!", - "ET D'APR\324S CE QUE JE VOIS ON T'A ENCHA\327N\220 AVEC CADENAS ET TOUT", - "BON, \200A VA. N'AURAS-TU PAS UNE \220PINGLE?", - // 265 - "BON, BON, NE T'EN FAIS PAS COMME \200A. JE PENSERAI \267 QUELQUE CHOSE.", - "H\220! TAVERNIER!", - "COMMENT VA LE MATCH?", - "QUI EST-CE?", - "NE VOIS-TU PAS QUE DRASCULA EST ICI?", - // 270 - "ALORS, ON VA FINIR AVEC LUI, NON?", - "SERS -MOI UN COUP...", - "RIEN. J'AI OUBLI\220 CE QUE J'ALLAIS TE DIRE", - "OU\207BIEN\207TU\207ME\207SERS\207UN\207COUP\207OU\207JE\207ME\207METS\207\267\207JOUER\207DU\207PIANO", - "COMBIEN IL RESTE POUR QUE LE MATCH FINISSE?", - // 275 - "BON SOIR", - "COMME VAS-TU, IGOR? BOSSU? -HI! HI! HI! QUE C'EST BON! ", - "QU'EST-CE QU'ON SUPPOSE QUE TU FAIS?", - "EH BIEN, NON!", - "ALORS, METS-TOI DES LUNETTES", - // 280 - "QU'EST QUE C'EST QU'UNE ORGIE SURNATURELLE?", - "\200A VA, \200A VA, ARR\322TE-TOI. JE ME FAIS D\220J\267 UNE ID\220E", - "NE POURRAIS-TU PAS ME DIRE O\353 SE TROUVE DRASCULA? ", - "ALLONS, S'IL TE PLA\327T", - "POURQUOI PAS?", - // 285 - "AH! MAIS IL DORME PENDANT LA NUIT?", - "EH BIEN! QUE LA RENTE SE DONNE BIEN", - "CE QUE JE DOIS LUI PARLER", - "OH\220! SQUELEEETTE! ", - "SAPRISTI! -UN SQUELETTE QUI PARLE!", - // 290 - "RACONTE-MOI, COMMENT EST-TU VENU JUSQU'ICI?", - "ET POUR QUELLE RAISON VOUDRAIT DRASCULA CR\220ER UN MONSTRE? ", - "COMMENT T'APPELLES-TU, AMI SQUELETTE?", - "\220COUTE, VEUX-TU QUE JE T'APPORTE QUELQUE CHOSE \267 MANGER?", - "TU DOIS AVOIR L'ESTOMAC VIDE. -HI! HI! HI!", - // 295 - "VRAIMENT JE N'AI PAS ENVIE DE PARLER MAINTENANT", - "MON DIEU! (SIFFLEMENT) J'ESP\324RE QUE...(SIFFLEMENT) ET QUE...(SIFFLEMENT) DEUX FOIS!", - "J'AI L'AIM\220E VRAIMENT. \200A VA, JE SUIS D'ACCORD, IL N'\220TAIT PAS UN G\220NIE, MAIS PERSONNE EST PARFAIT, N'EST-CE PAS? ", - "DE PLUS, ELLE AVAIT UNE FIGURE \220POUSTOUFLANTE ", - "JE NE SERAI PLUS LE M\322ME. JE VAIS M'ENFERMER DANS UN MONAST\324RE POUR VOIR FUIR MA VIE LENTEMENT", - // 300 - "RIEN NE POURRA M'EN SORTIR D\220J\267 DE CETTE MIS\324RE PARCE QUE...", - "DE QUI? DE QUI?", - "JE VEUX \322TRE UN PIRATE", - "JE VEUX \322TRE PROGRAMMEUR", - "RACONTEZ-MOI QUELQUE CHOSE SUR PELAYO", - // 305 - "JE CONTINUERAI \267 JOUER ET J'OUBLIERAI QUE VOUS AI VU ", - "QUI AURA PENS\220 \267 CETTE B\322TISE?", - "C'EST UN SAC COMME CELUI DE MA GRANDE-M\324RE", - "MAIS QUE JE SUIS BEAU!", - "PLUS JE ME REGARDE PLUS JE ME PLAIS", - // 310 - "ET APR\324S COMMENT JE ME FERME?", - "IL FAUDRA QUE M'OUVRE D'ABORD, NON?", - "JE SUIS BIEN O\353 JE SUIS", - "JE M'AI D\220J\267", - "SALUT, MOI!", - // 315 - "JE VAIS ME LES METTRE \267 TEMPS", - "JE NE VOIS RIEN DE SP\220CIAL", - "C'EST BIEN O\353 IL EST", - "ET POURQUOI FAIRE?", - "JE NE PEUX PAS", - // 320 - "SALUT, TOI!", - "C'EST LE PANTH\220ON DE L'ONCLE D\220SIR\220", - "OH\220! ONCLE D\220SIR\220\220\220\220!", - "NON, JE NE VEUX PAS ME COUPER ENCORE UNE FOIS", - "HEM! HEM!...!", - // 325 - "YAMM, HEMMM, JH!", - "OUI, COF,COF!", - "TIENS, IL Y A ICI UN CHEWING-GUM COLL\220", - "C'EST LE MOVILANI, LE CADEAU QUI M'ONT DONN\220 POUR NO\323L", - "QUE C'EST HAUT!", - // 330 - "SORS DANS LE BALCON JULIETTE!", - "TU EST LA LUMI\324RE QUI \220CLAIRE MON CHEMIN!", - "H\220, PORTE! QU'EST-CE QU'IL Y A?", - "OH\220! MACHINE \267 TABAC DE TRANSYLVANIIIE", - "C'EST UNE MACHINE \267 D\220BIT DE TABAC", - // 335 - "J'AI UNE AUTRE MONNAIE L\267 -DEDANS", - "NON, J'AI D\220CID\220 ABANDONNER LE TABAC ET L'ALCOOL", - "D\324S MAINTENANT JE VAIS ME CONSACRER SEULEMENT AUX FEMMES", - "C'EST UN VOL! RIEN EST SORTI!", - "ENFIN! ", - // 340 - "C'EST \200A, UN BAHUT", - "SALUT, BAHUT! TU T'APPELLES COMME MON COUSIN, QUI S'APPELLE RAUL", - "J'AI TROUV\220 LE SAC DE B.J..", - "MON DIEU! JE N'Y ME VOIS PAS -SUIS UN VAMPIRE!", - "...AH, NON! CE N'EST QU'UN DESSIN!", - // 345 - "PETIT MIROIR: \"C'EST QUI LE PLUS BEAU DU ROYAUME?\"", - "IL NE VEUT PAS M'OUVRIR", - "TR\324S BIEN. J'AI MIS LES TAMPONS", - "C'EST UN DIPL\342ME DE CHASSE-VAMPIRES HOMOLOGU\220 PAR L'UNIVERSIT\220 DE CAMBRIDGE", - "NON, IL ME FAUT ENCORE D'INGR\220DIENTS, PAS LA PEINE DE LUI REVEILLER", - // 350 - "C'EST QUE JE SUIS FAUCH\220", - "C'EST UNE LAMPE BRITANNIQUE", - "TAVERNIER! -AIDEZ-MOI!", - "UN VAMPIRE EST APPARU ET IL A ENLEV\220 MA FIANC\220E", - "MAIS, N'ALLEZ VOUS PAS M'AIDER?!", - // 355 - "MORTE? QUE VOULEZ-VOUS DIRE?", - "HEM!", - "UN VAMPIRE A S\220QUESTR\220E LA FILLE DE LA 506!", - "IL FAUT QUE TU M'AIDES!", - "TU NE SAIS PAS JOUER AUCUNE PI\324CE DES INHUMAINS?", - // 360 - "COMMENT TU TE SUPPORTES TOUT LE JOUR EN JOUANT LA M\322ME CHOSE?", - "ET ALORS, POURQUOI TU M'\220COUTES?", - "PR\322TE-MOI LES TAMPONS", - "ALLONS! JE VAIS TE LES REDONNER TOUT DE SUITE", - "ALLOOONSSS..." - // 365 - "AU REVOIR. JE DOIS TUER UN VAMPIRE", - "", - "EN QUOI TU PARLES! EN TRANSYLVAN?", - "C'EST QUI L'ONCLE D\220SIR\220?", - "MAIS QU'EST-CE QU'IL Y A AVEC CE DRASCULA-L\267?", - // 370 - "QUI EST-CE CE VON BRAUN-L\267?", - "ET POURQUOI IL NE LE FAIT PAS?", - "ET O\353 PEUX-JE TROUVER VON BRAUN?", - "EH BIEN, MERCI ET AU REVOIR. QUE TU LA DORMES BIEN", - "IL VAUDRA MIEUX SONNER D'ABORD", - // 375 - "LE PROFESSEUR VON BRAUN, C'EST VOUS?", - "ET NE POUVEZ-VOUS PAS M'INDIQUER O\353 JE PEUX...?", - "JE NE CROIS PAS QU'IL SOIT LE NAIN GANYM\324DE", - "PROFESSEUR!", - "AIDEZ-MOI! -LA VIE DE MA BIEN AIM\220E DEPENDE DE VOUS!", - // 380 - "\200A VA, JE N'AI PAS BESOIN DE VOTRE AIDE", - "D'ACCORD. JE M'EN VAIS", - "N'AIES PAS PEUR. NOUS ALLONS VAINCRE DRASCULA ENSEMBLE", - "ALORS, POURQUOI NE M'AIDEZ VOUS PAS?", - "JE LES AI", - // 385 - "OUI, JE LES AI!", - "D'ACCORD", - "...ER ...OUI", - "JE VIENS POUR RENTRER DANS CETTE CABINE", - "SUIS PR\322T \267 CONFRONTER VOTRE \220PREUVE", - // 390 - "\200A VA, VIEUX RIDICULE. JE SUIS VENU CHERCHER MON ARGENT", - "NON, RIEN. JE M'EN ALLAIS D\220J\267", - "PARDONNE-MOI", - "CE LIVRE T'INT\220RESSE? AVEZ-VOUS DES PARTITIONS DE TCHA\330KOVSKY?", - "COMMENT PEUX-JE TUER UN VAMPIRE?", - // 395 - "ON NE T'A JAMAIS DIT QUE C'EST MAUVAIS DORMIR DANS UNE MAUVAISE POSTURE?", - "EH BIEN, C'EST \200A QUE MA M\324RE ME DIT TOUJOURS", - "POURQUOI DRASCULA N'A PU JAMAIS TE TUER?", - "ET QU'EST-CE QUE S'EST PASS\220?", - "C'EST SUPER! -AVEZ-VOUS UNE POTION D'IMMUNIT...!", - // 400 - "ALORS?", - "TR\324S BIEN", - "POUVEZ-VOUS ME R\220P\220TER CE DONT J'AI BESOIN POUR CETTE POTION?", - "EH BIEN! JE PARS RAPIDE LE CHERCHER", - "\220COUTEZ, QU'EST-CE QUE C'EST PASSE\220 AVEC LE PIANISTE?", - // 405 - "J'AI\207D\220J\267\207TOUS\207LES\207INGR\220DIENTS\207DE\207CETTE\207POTION", - "UNE QUESTION: QU'EST.CE QUE C'EST CELA D' ALUCSARD ETEREUM?", - "PARLEZ, PARLEZ... ", - "ET C'EST O\353 CETTE GROTTE?", - "QU'EST-CE QU'IL Y A? N'AVIEZ VOUS PAS UN TRIBUNAL?", - // 410 - "...MAIS ...ET SI JE TROUVE ENCORE DES VAMPIRES?", - "C'EST UN VAMPIRE QUI M'EMP\322CHE L'ENTR\220E", - "IL RESSEMBLE \267 YODA, MAIS C'EST UN PEU PLUS GRAND", - "H\220, YODA! SI TU ME LAISSES PASSER JE TE DONNE UNE MONNAIE", - "BON, \200A VA. ON NE PEUT RIEN TE DIRE", - // 415 - "H\220, VAMPIRE! BELLE NUIT, N'EST-CE PAS?", - "ON T'A D\220J\267 DIT QUE TU RESSEMBLES \267 YODA?", - "ES-TU UN VAMPIRE OU UNE PEINTURE \267 L'HUILE?", - "IL VAUX MIEUX NE RIEN TE DIRE, POUR SI TU TE F\266CHES", - "C'EST FERM\220E \267 CL\220", - // 420 - "LA PIE POURRAIT M'ARRACHER UN OEIL SI J'EN ESSAIE!", - "C'EST FERM\220E! -MON DIEU, QUELLE PEUR!", - "LES GONDS SONT OXYD\220S", - "L\267-DEDANS IL Y A SEULEMENT UN POT AVEC DE LA FARINE", - "CECI A ENLEV\220 L'OXYDE", - // 425 - "J'AI TROUV\220 UN PIEU DE PIN", - "JE PRENDRAI CELUI-CI QUI EST PLUS GROS", - "BON, JE CROIS QUE JE PEUX ME D\220BARRASSER MAINTENANT DE CE STUPIDE D\220GUISSEMENT", - "LE PASSAGE AUX DONJONS EST FERM\220 \267 CAUSE DES TRAVAUX. VOUS \322TES PRI\220S D'UTILISER L'ENTR\220E PRINCIPALE. EXCUSEZ LES ENNUIES", - "...IL EST P\266LE. AVEC DE GROSSES DENTS. IL A UN TOUPET ET UTILISE UNE CAPE... -C'EST S\352REMENT DRASCULA!", - // 430 - "C'EST B.J.! B.J. TU EST BIEN?", - "OUI, JE SAIS QU'ELLE EST B\322TE, MAIS JE SUIS SEUL", - "N'AURAS-TU PAS UNE CL\220 PAR L\267, N'EST-CE PAS?", - "N'AURAS-TU PAS UN ROSSIGNOL, PAR HASARD?", - "DONNE-MOI UNE \220PINGLE. JE VAIS FAIRE COMME MCGYVER", - // 435 - "NE BOUGES PAS, JE REVIENS TOUT DE SUITE", - "ZUT! -S'EST CASS\220E!", - "OL\220\220\220! ET EN PLUS JE ME SUIS RAS\220, COLL\324GUE!", - "OUI, MON AMOUR?", - "IL N'ARRIVE PAS", - // 440 - "LE PIANISTE N'EST PAS L\267", - "UN COKTAIL TRANSYLVAN", - "JE N'AI PAS UNE CHAMBRE", - "SELON PARA\327T, IL EST REST\220 COINC\220 DANS LA BAIGNOIRE ET D\220CIDA ALORS D'OUVRIR UN BAR ", - "IL EST SO\352L COME UNE CUVE DE CUBA", - // 445 - "CE CHEVEU... LE CAS CE QU'IL ME RAPPELLE QUELQU'UN", - "C'EST UN SQUELETTE OSSEUX", - "REGARDE! MIGUEL BOS\220!", - "IL DORME. CE SERAIT DOMMAGE LE R\220VEILLER", - "IL EST PLUS MOCHE QU'\220MILE DE PAZ", - // 450 - "UN CERCUEIL EN BOIS DE PIN", - "IL VA ME COUPER EN PETITES TRANCHES, COMME UN SAUCISSON", - "JE N'AIME PAS LES PENDULES. JE PR\220F\324RE LES ARTICHAUTS", - "MES MAINS SONT EMMENOTT\220ES. JE N'ARRIVERAI PAS", - "IL SAUTE AUX YEUX QUE C'EST UNE PORTE SECR\324TE", - // 455 - "ILS M'IGNORENT", - "C'EST BIEN!", - "DANS LE SCRIPT IL BOUGEAIT, MAIS LE JEU A SURPASS\220 LE BUDGET ET ON N'A PAS PU ME PAYER UN GYMNASE POUR ME METTRE EN FORME. DONC, POINT DU TOUT", - "ELLE PARA\327T UN PEU D\220TACH\220E DU MUR", - "JE NE CROIS PAS POUVOIR M'EN SERVIR. ELLE TROP HUMIDE POUR L'ALLUMER", - // 460 - "\267 L'AILE OUEST? -M\322ME PAS EN FOU ACHEV\220! -VA SAVOIR QU'AURAIT-IL L\267-BASI!", - "IL Y A DE JOLIS MOTIFS TRANSYLVANS", - "", - "QUEL DOMMAGE NE PAS AVOIR TROUV\220 L\267-DEDANS UN PETIT AGNEAU EN TRAIN DE SE R\342TIR!", - "LA DERNI\324RE FOIS QUE J'AI OUVERT UN FOURNEAU LA MAISON A VOL\220 EN \220CLATS", - // 465 - "C'EST L'ENSEIGNE DE L'\220QUIPE DE FOOT-BALL DE LA TRANSYLVANIE", - "ET POURQUOI FAIRE? POUR ME LA METTRE \267 LA T\322TE?", - "JE NE CROIS PAS QUE CES TIROIRS SOIENT DE CEUX QUI S'OUVRENT", - "JE NE VEUX PAS SAVOIR LA NOURRITURE QU'IL Y AURA L\267-DEDANS!", - "J'AI L'IMPRESSION QUE C'EST DE L'IMPRESSIONNISME", - // 470 - "LA NUIT S'EMPARE DE NOUS TOUS... QUELLE PEUR, N'EST-CE PAS?", - "ELLE EST BOUCH\220E", - "C'EST LE ROI. NE L'AVAIT-TU PAS IMAGIN\220?", - "NON, J'EN AI D\220J\267 UN CHEZ MOI ET JE LUI DONNE \267 MANGER EN PLUS", - "UN PLACARD AVEC DES LIVRES ET D'AUTRES CHOSES", - // 475 - "ET QUI J'APPELLE \267 CES HEURES-L\267?", - "\"COMMENT FAIRE LA D\220CLARATION D'IMP\342TS\" COMME C'EST INT\220RESSANT!", - "J'AI D\324J\267 UN CHEZ MOI. JE CROIS QUE C'EST UN BEST-SELLER MONDIAL", - "UNE CL\220 COMPL\324TEMENT NORMALE", - "IL ME SEMBLE QUE CELLE-CI N'EST PAS D'ICI", - // 480 - "H\220! CE SONT DES FRITES SOUS FORME DE DENT CANINE! \200A ME PLA\327T", - "JE NE CROIS PAS QU'IL SOIT LE MEILLEUR MOMENT POUR MANGER DES GOURMANDISES, AVEC MA FIANC\220E AUX MAINS DE L'\322TRE LE PLUS MAUVAIS QU'UNE M\324RE A PU ACCOUCH\220", - "COMME JE SUIS BIEN EN TUANT DES VAMPIRES AVEC CELA!", - "VOYONS SI APPARA\327T T\342T UN AUTRE", - "NON, IL FAUT QU'IL SOIT AVEC UN SALE ET PUANT VAMPIRE, COMME CELUI QUI J'AI TU\220 AVANT", - // 485 - "C'EST L'AUTHENTIQUE PERRUQUE QU'ELVIS AVAIT UTILIS\220E QUAND IL EST DEVENU CHAUVE", - "C'EST DE LA FARINE, MAIS JE NE PEUX PAS DIRE DES MARQUES", - "PEUT-\322TRE DANS UN AUTRE MOMENT, D'ACCORD?", - "C'EST UNE HACHE MAGNIFIQUE, DOMMAGE DE NE PAS POUVOIR SE PAYER AUCUNE T\322TE DE VAMPIRE PAR L\267", - "NON. JE SUIS UNE BONNE PERSONNE AU FOND", - // 490 - "C'EST LE D\220ODORANT DE LA THACHER-HI!HI!HI!", - "C'EST UNE CAPE ASSEZ MIGNONE", - "", - "TOUT COMME LES BRANCHES DE TOUS LES ARBRES DU MONDE, C'EST-\267-DIRE SANS RIEN DE PARTICULIER", - "OH! C'EST INCROYABLE! -UNE CORDE DANS UNE AVENTURE DESSIN\220E!", - // 495 - "JE ME DEMANDE \267 QUOI SERVIRA-T-ELLE...?", - "UNE CORDE ATTACH\220E \267 UNE BRANCE OU UNE BRANCHE ACROCH\220E \267 UNE CORDE, \200A D\220PEND DU POINT DE VUE", - "IL PARA\327T QUE CETTE PIE \267 DE TR\324S MAUVAISES INTENTIONS", - "TAIS-TOI! JE NE LA DIS RIEN, POUR SI ELLE SE F\266CHE", - "ELLE SEMBLE MORTE, MAIS C'EST UNE MENSONGE", - // 500 - "IL N'Y A AUCUN ANIMAL ABiM\220 DANS LA PRODUCTION DE CE JEU", -}, -{ - // 0 - "", - "\220 la seconda porta pi\243 grande che ho vista nella mia vita", - "Forse.., no", - "\202 chiusa con tabelle. La chiesa deve essere abbandonata da tanti anni fa.", - "Ma se non la ho aperta", - // 5 - "Che faccio? La tolgo?", - "Ciao porta. Vado a farti una cornice", - "Troppo per me", - "una finestra chiusa con tabelle", - "Non ce la faccio", - // 10 - "Eccolo", - "E per che?", - "Ciao finestra. Hai qualcosa da fare stasera?", - "No senza il permesso del Ministero dei Lavori Pubblici", - "-eh! quella finestra ha soltanto una tabella..", - // 15 - "-Eooooo! -Finestra!", - "Tu, ciao", - "", - "Non ce la faccio", - "Va bene dov'\202 ", - // 20 - "", - "\220 una tomba in forma di croce", - "Non grazie", - "Ciao morto. Vuoi delle patatine a forma di vermi?", - "Si. Come in Poltergueist.", - // 25 - "", - "", - "Torno in quindici minuti", - "Vietato affigere manifesti", - "", - // 30 - "\220 chiuso con la chiave", - "Ne ho gi\240 uno.", - "", - "Non risponde.", - "No, \202 ben parcheggiato.", - // 35 - "\220 una porta.", - "Un casseto del tavolino.", - "Un sospettoso armadio.", - "Ciao armadio. Come va?.", - "", - // 40 - "", - "\220 un candelabro molto vecchio.", - "Deve essere qu\241 da che Mazinguer-Z era una vite.", - "No.\220 una reliquia.", - "\220 una bella pala.", - // 45 - "", - "Hi, hi, hi", - "", - "No.", - "", - // 50 - "Ha,ha,ha . - che buono!", - "", - "", - "", - "Non vedo niente di speciale.", - // 55 - "Ferdinan, la pianta.", - "\220 una degli spunzoni della cancellata.", - "-Eh! Qu\241 sotto c'\202 una scatola di cerini", - "-Guarda! un pacco di fazzoletti. -E c'\202 ne uno senza utilizzare!.", - "Non c'\202 niente di pi\243 nel secchio.", - // 60 - "\220 un cieco che non vede", - "", - "", - "", - "", - // 65 - "\220 una abbondante quantit\240 di soldi", - "", - "", - "", - "", - // 70 - "", - "", - "", - "", - "", - // 75 - "", - "", - "", - "", - "", - // 80 - "", - "", - "", - "", - "", - // 85 - "", - "", - "", - "", - "", - // 90 - "", - "", - "", - "", - "", - // 95 - "", - "", - "", - "", - "", - // 100 - "NON HA NULLA DI SPECIALE", - "NON \324 MICA SPECIALE", - "TU! CHE C'\324 ?", - "CIAO", - "NIENTE NUOVO?", - // 105 - "-COME VA LA FAMIGLIA?", - "- MA CHE STAI A DIRE?", - "-MA COME VADO A PRENDERE QUELLA COSA!", - "\324 VIETATO DALLA MIA RELIGIONE", - "MEGLIO DI NO", - // 110 - "-COME NO!", - "NEANCHE PARLARNE", - "IMPOSSIBILE", - "QUESTO NON SI APRE", - "IO SOLO NON CE LA FACCIO", - // 115 - "SE VORREI POTREI, MA MI FA PIGRIZIA", - "NON TROVO UNA BUONA RAGIONE", - "\324 UN CERVELLO ABBASTANZA CARINO", - "ALLORA, CERVELLO, CHE NE PENSI DI FARE STASERA?", - "NO, DEVE CONSERVARSI IN UN POSTO CHIUSO ALLA AZIONE MUTANTE DELLA ATMOSFERA", - // 120 - "\324 COS\336 DURO, COME IL MIO CAPO", - "UNA TALEA MOLTO AFFILATA", - "FEDELE TALEA AFFILATAAA, NOBILE ROVERE TRANSILVANOOO", - "-INSOMMA, DEVO TAGLIARMI LE UNGHIE!", - "-LA, DENTRO, C'\324 B.J,E MAMMA MIA, CHE FIGA!", - // 125 - "\324 CHIUSA SOTTO LUCCHETTO E CATENACCIO", - "\"LUCCHETTO E CATENACCIO S.A\"", - "\324 IL TIPICO SCHELETRO CHE C'\324 IN TUTTE LE CARCERE DI TUTTI I VIDEO-GIOCHI", - "SI UTILIZA PER DARE ELETRICIT\267 AGLI APARATTI COLLEGATI A LUI", - "\324 TOTALMEN11TE ARTIGIANO, PERCHE I GIAPONESSI LI FANNO TASCABILI", - // 130 - "NELLA MIA VITA, HO VISTO SOLTANTO UNA VOLTA UNA COSA COS\336 BRUTTA", - "SMETILLA. NON DICO NULLA PER SE SI ARRABBIA", - "SEMBRA ABBASTANZA RAZIONALE", - "\324 UNA FOTO DI PLATONE SCRIVENDO IL SUO DISCORSO PERSO", - "NON SONO DI QUELLI CHE PARLANO CON POSTERS", - // 135 - "UNA SCRIVANIA MOLTO CARINA", - "\324 UN DIPLOMA DI CACCIA-CACCIA-VAMPIRI OMOLOGATO DALLA UNIVERSIT\267 DI OXFORD", - "\324 NOTTE BUIA CON LUNA PIENA", - "SEMBRA CHE QUESTE VITI NON SONO MOLTO AVVITATE", - "NON GUARDARE, MA CREDO CHE UNA TELECAMERA NASCOSTA MI ST\267 REGISTRANDO", - // 140 - "UN DETETTORE DI TALEE MOLTO MODERNO", - "NO, IL LABORATORIO SI TROVA NEL SECONDO PIANO", - "UN BEL TAVOLINO", - "\324 UN SACCO DI SOLDI CHE NON PUO MANCARE IN UNA AVVENTURA CHE SIA COS\336 IMPORTANTE", - "IF I WERE A RICHMAN, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", - // 145 - "SONO DELLE STRANE FOGLIE. DEVONO AVERLE PORTATE DALLA SUDAMERICA", - "NON CREDO CHE SIA RISPOSTO", - "\324 UN BEL CROCIFISSO DI LEGNO. LA ICONA NON RIFLESSA TUTTA LA SUA BELLEZA", - "IO SOLO PREGO PRIMA DI ANDARMENE AL LETTO", - "-EH, SEMBRA CHE QUESTO SPUNZONE \324 UN PO ALLENTATO!", - // 150 - "E POI TI LAMENTI PERCHE NON TI DO SUGGERIMENTI", - "\324 UNO SPUNZONI ABBASTANZA CONVENZIONALE", - "SONO CARINI, SEBBENE HANNO PARECHIO POLVERE", - "NO, NON MI SENTIRANO; HI,HI,HI -CHE BUONO!", - "\"LA BELLA ADDORMENTATA DEL BOSCO\" DI CIAIKOSKY, O CIOIFRUSKY, O COME SI DICA", - // 155 - "MOLTO APPETITOSA", - "NO, IO NON SONO DI QUELLI CHE SI METTONO IN BOCCA GOMME USATE", - "UNA FALCE MOLTO CARINA. MI DOMANDO DOVE CI SAR\265 IL MARTELLO", - "\"I FABBRICANTI DI TABACCO AVVERTONO CHE IL TABACCO NUOCE GRAVEMENTE LA SALUTE\"", - "UNA CANDELA NORMALE, ANZI CON CERA", - // 160 - "MAMMA MIA COME BRILLANO QUESTE DUE BRILLANTI MONETE", - "MAMMA MIA COME BRILLA QUESTA BRILLANTE MONETA", - "CON QUESTO SAR\220 IMMUNE AI MORSI DEI VAMPIRI", - "NO, ANCORA NON \220 IL MOMENTO", - "C'E UN BIGLIETTO DI DIECIMILA E UN PAIO DI MONETE", - // 165 - "DICE \"SI PREGA DI NON BUTTARE CIBO AL PIANISTA\"", - "OMELETTA, 3.000 .PESCI FRITI, 2.000,PATATINE, 2.500", - "LE MIGLIORI HAMBURGUER A QUESTA PARTE DEL DANUBIO, SOLTANTO PER 4.000", - "UN BEL TESCHIO, CON UNO SGUARDO MOLTO PENETRANTE. HI,HI,HI, CHE BUONO!", - "CIAO TESCHIO, MI RICORDI AL ZIO DI HAMLET", - // 170 - "HO L'ABITUDINE DI NON TOCCARE COSE CHE SIANO STATE VIVE", - "UN CESTINO", - "UN TOTOCALCIO PER LA PARTITA DI STASERA", - "MI DOMANDO CHE CI SAR\265 DIETRO", - "-EH, QUESTA TENDE NON SI MUOVE!", - // 175 - "MADONNA, CHE TETRO \220 QUESTO CASTELLO.", - "NON CE LA FACCIO, \220 TROPPO LONTANO PER SENTIRMI", - "UN TIPICO BOSCO TRANSILVANO, CON GLI ALBERI", - "-MA CHE SCIOCHEZZE DICI, \220 MOLTO BUIO", - "PASTICCERIA ROSSI. DOLCI E GOMME", - // 180 - "UNA PORTA MOLTO BELLA", - "\220 CHIUSA", - "UN FUSTO COMPLETAMENTE CHIUSO", - "", - "CHE ANIMALETTI COS\326 BELLI!", - // 185 - "BSSSSSS,BSSSS, GATINO..", - "NON RISPONDE", - "LA LUNA \220 UN SATELLITE CHE GIRA INTORNO LA TERRA CON UN PERIODO DI RIVOLUZIONE DI 28 GIORNI", - "CIAO, LUNA LUNETTA", - "\220 TOTALMENTE CHIUSA CON TABELLE", - // 190 - "IMPOSSIBILE. QUESTO, NON LO APRE N\220 HOUDINI", - ".EH, SEMBRA CHE L'OMBRA DEL CIPRESSE \220 ALUNGATA", - "-EOOO, BARISTA", - "VORREI UNA CAMERA", - "SA DOVE POSSO TROVARE A UNO CHE SI FA CHIAMARE CONDE DRASCULA", - // 195 - "SI, PER CHE?", - "COME MAI?", - "DA.....DAVVERO?", - "BUONA DOMANDA, GLI RACONTER\220 LA MIA STORIA, SENTA..", - "SONO SOLTANTO CINQUE MINUTI", - // 200 - "MI CHIAMO JOHN HACKER, E SONO RAPPRESENTANTE DI UNA IMMOBILIARIE BRITANICA", - "MI HANNO DETTO CHE IL CONDE DRASCULA VUOLE COMPRARE DEI TERRENI A GIBRALTAR, E SONO QU\326 PER NEGOZIARE LA VENDITA", - "MA CREDO IO CHE DOMANI PRESTO TORNO CON LA MAMMA", - "BELLA NOTTE, VERO?", - "NO, NIENTE", - // 205 - "EOOOO, PIANISTA", - "BELLA NOTTE", - "ANZI, NON FA FREDDO", - "ALLORA... TI LASCIO CONTINUARE A SUONARE", - "VA BENE", - // 210 - "CIAO CAPO, COME VA?", - "E LA FAMIGLIA?", - "C'\220 GENTE QU\326, EH?", - "MEGLIO NON DICO NULLA", - "SI ST\265 MEGLIO A CASA CHE A NESSUN POSTO... -EH? MA SE LEI NON \220 LA ZIA EMMA. ANZI. SE IO NON HO NESSUNA ZIA EMMA.", - // 215 - "SI, IL MIO ANCHE. LEI PUO CHIAMARMI COME GLI PARA, MA SE MI CHIAMA JOHNY, VENGO SUBITO COME I CANI", - "SI, CHE SPIRITOSO SONO, VERO? MAA.. DOVE MI TROVO?", - "SI.", - "MANAGIA..", - "OH, SI. COME NO", - // 220 - "ALLORA GRAZIE MILE PER DARMI IL TUO AIUTO. NON TI DISTURBO PI\351 . SE MI DICI DOV'\220 LA PORTA, PER FAVORE...", - "PERCHE LA BOTTA HA DOVUTO DAGNARMI IL CERVELLO E NON VEDO UNA MADONNA", - "NON FA NIENTE. SEMPRE NE PORTO ALTRI IN PI\351 ", - "-UFFA, CHE FIGA!- NON MI ERA ACCORTO, CERTO, SENZA GLI OCCHIALI", - "SENTI..", - // 225 - "COME MAI...?!", - "NON TI PREOCUPARE B.J., AMORE MIO! TI LIBERER\220 DA QUEL TIZIO", - "MI HA FATTO ARRABBIARE", - ".AHHH, IL LUPO- MANNARO! -MUORE MALDITO!", - "BENE, CREDO...", - // 230 - "BENE, CREDO CHE PROSSIGUER\220 LA MIA STRADA. PERMESSOO..", - "-COME?", - "LA VERIT\267, PENSANDOCI MEGLIO, CREDO DI NO", - "DIMI, OH ERUDITO FILOSOFO, C'\324 QUALCUNA RELAZIONE CAUSA-EFETTO TRA LA VELOCIT\267 E LA PANCETA?", - "VA BENE, SMETTILA. COMUNQUE NON SO PERCHE HO DETTO QUESTO", - // 235 - "COSA FAI QU\336 FILOSOFANDO, CHE NON STAI MANGIANDO GENTE?", - "COME MAI?", - "SENTI, PUOI RIPETERE QUELLO DI \"INCLINAZIONI PRE-EVOLUTIVE\"?", - "SI SI, QUELLA STORIA CHE MI HAI RACCONTATO PRIMA. PERCHE NON HO CAPITO MOLTO BENE.", - "NO, MEGLIO NON DICO NULLA, NON VOGLIO METTERE IL COLTELLO NELLA PIAGA...", - // 240 - "SI, MI DICA?", - "SI, CHE SUCCEDE?", - "AH, ADESSO CHE CITA IL SOGGETTO GLI DIR\343 CHE...", - "", - "AH.., COSA SUCCEDEREBBE SE UN VAMPIRO PRENDEREBBE LA RICETA..", - // 245 - "NIENTE. SENTI, QUESTO SEMBRA UN POSTICCIO MESSO SUL COPIONE PER FINIRE PRESTO IL VIDEO-GIOCO?. BENE, FORSE, NO", - "\324 VUOTO!", - "PERCHE HAI RUBATO IL MIO AMORE, B.J., SENZA LEI LA MIA VITA NON HA SENSO", - "-IL SUO CERVELLO?!", - "NO NIENTE, MA CREDO CHE ALLA FINE IL TUO PICCOLINO MOSTRO MI HA FATTO ARRABBIARE", - // 250 - "SANTA MADONNA AIUTAMI!", - "NON TE LA CAVEREI. SICURO CHE APPARISCE SUPERMAN E MI LIBERA!", - "CHE SCHIFFO DI VIDEO-GIOCO NEL CUI MUORE IL PROTAGONISTA", - "UN ATTIMO, COSA SUCCEDE COL MIO ULTIMO DESIDERIO?", - "-HA,HA! ORA SONO IMMUNIZZATO CONTRO TE, MALEDETTO DEMONIO. QUESTA SIGARETTA \324 UNA POZIONE ANTI-VAMPIRI CHE MI HA DATTO VON BRAUN", - // 255 - "SI CERTO. MA NON RIUSCIRAI MAI A FARMI DIRTI LA RICETA", - "POSSO SOPPORTARE LA TORTURA, ANZI CREARLA", - "-NO, PER FAVORE!- PARLER\220, MA NON FARMI QUESTO!", - "BENE, TI HO GI\267 DETTO QUELLO CHE VOLEVI SAPERE. ORA LIBERA B.J. E ME, E LASCIACI PERDERE", - "-B.J-.! COSA FAI QU\336? DOV'\324 DRASCULA?", - // 260 - "CHE PERVERSO! SOLTANTO PERCH'\324 NOBILE PENSA CHE HA IL DIRITTO SU TUTTI QUANTI", - "ABASSO LA ARISTOCRAZIA!", - "FORZA I POVERI DEL MONDOOO...", - "E QUELLO CHE VEDO \324 CHE TI HA INCATENATO ANZI CON LUCCHETTO", - "O.K., NON AVRAI UNA FONCINA?", - // 265 - "BENE BENE, NON PRENDERTELA COS\336, CI PENSER\220 IO", - "EH, BARISTA", - "COME VA LA PARTITA?", - "CHI?", - "MA NON VEDI CHE DRASCULA \324 QU\336?", - // 270 - "ANDIAMO A UCCIDERLO", - "SERVIMI UN DRINK..", - "NIENTE. HO DIMENTICATO COSA VOLEVO DIRTI", - "O\247MI\247SERVI\247UN\247DRINK\247O\247MI\247METTO\247A\247SUONARE\247IL\247PIANOFORTE", - "QUANTO MANCA PER LA FINE DELLA PARTITA?", - // 275 - "BUONA SERA", - "COME VA IGOR? VAI CON LA GOBBA? -HI,HI,HI,CHE BUONO!", - "CHE STAI FACENDO?", - "NO", - "ALLORA METTITI GLI OCCHIALI", - // 280 - "COSA \324 QUELLA DELLA ORGIA SOPRANNATURALE?", - "VA BENE, NON COTINUARE, MI FACCIO IDEA", - "NON POTREI DIRMI DOV'\324 DRASCULA?", - "DAIII, PER FAVORE", - "PER CHE NO?", - // 285 - "AH, MA DORME DI NOTTE?", - "BENE, ALLORA IN BOCCA IL LUPO CON I REDDITI", - "DEVO PROPRIO PARLARE CON LUI", - "EOOOO, SCHELETROOO!", - "OH DIO! UN MORTO CHE PARLA!", - // 290 - "RACCONTAMI. COME MAI SEI VENUTO QU\336?", - "E PER CHE DRASCULA VUOLE CREARE UN MOSTRO?", - "COME TI CHIAMI, AMICO SCHELETRO?", - "SENTI, NON VUOI QUALCOSA DA MANGIARE?", - "DEVI AVERE LO STOMACO VUOTO .- HI,HI,HI!", - // 295 - "LA VERIT\267 \324 CHE NON MI VA DI PARLARE ADESSO", - "VANFFAN ( BIP ) FIGLIO DI .......( BIIP ).. VAI A FARE....( BIIIP )", - "IO LA AMAVO DAVVERO. O.K., SONO D'ACCCORDO CHE NON ERA MOLTO INTELLIGENTE, MA NESSUNO \324 PERFETTO, NO?", - "ANZI, AVEVA UN CORPO DA PAURA", - "ORMAI NON SAR\343 PI\353 QUELLO DI PRIMA .MI RICHIUDER\343 IN UN MONASTERO, E LASCIER\343 LA MIA VITA PERDERE", - // 300 - "NIENTE POTR\267 FARMI USCIRE DI QUESTA MISERIA PERCHE...", - "DI CHI? DI CHI?", - "VOGLIO ESSERE PIRATA", - "VOGLIO ESSERE PROGRAMMATORE", - "RACCONTAMI QUALCOSA SU GARIBALDI", - // 305 - "CONTINUER\343 A GIOCARE E DIMENTICHER\343 CHE VI HO VISTI", - "MA CHI AVR\267 PENSATO QUESTA SCIOCHEZZA!", - "\324 UNA BORSA COME QUELLA DI MIA NONNA", - "MA CHE FIGO SONO!", - "PI\353 MI VEDO PI\353 MI PIACCIO", - // 310 - "E POI COME MI CHIUDO?", - "PRIMA DEVO APRIRMI, VERO?", - "ST\343 BENE DOVE SONO", - "MI HO GI\267 PRESSO", - "CIAO IO", - // 315 - "ME GLI INDOSSER\343 QUANDO SIA LA OCCASIONE OPORTUNA", - "NON VEDO NIENTE DI SPECIALE", - "\324 BENE DOV'\324", - "E PER CHE?", - "NON CE LA FACCIO", - // 320 - "CIAO TU", - "\324 IL SEPOLCRO DELLO ZIO PEPPINO", - "EOOOO, ZIO PEPPINOOOO!", - "NO.NON VOGLIO TAGLIARMI UN' ALTRA VOLTA", - "-EHEM,EHEM..!", - // 325 - "GNAMM, EMMM,!", - "-SI, COF, COF!", - "GUARDA, C'\324 UNA GOMMA QU\336 ATTACATA", - "\324 IL TELEFONINO CHE MI HANNO REGALATO A NATALE", - "COM'\324 ALTO", - // 330 - "ESCI AL BALCONE GIULIETTA!", - "TU SEI LA LUCE CHE ILLUMINA LA MIA VITA!", - "EH, PORTA, CHE C'\324?", - "EOOOO, SPENDITRICE DI TABACCO DI TRANSILVANIAAA", - "\324 UNA SPENDITRICE DI TABACCO", - // 335 - "HO UN'ALTRA MONETA DENTRO", - "NO. HO DECISSO SMETTERE DI FUMARE E DI BERE", - "DA OGGI SAR\343 SOLTANTO PER LE DONNE", - "QUESTO \324 UNA TRUFFA! NON \324 USCITO NULLA", - "ALLA FINE!", - // 340 - "CHE TI HO DETTO?, UN BAULE", - "CIAO BAULE, TI CHIAMI COME MIO CUGINO CHE SI CHIAMA RAUL..E", - "HO TROVATO LA BORSA DI B.J.", - "MIO DIO, NON MI RIFLETTO, SONO UN VAMPIRO!", - "...AH, NO, \324 UN DISEGNO", - // 345 - "SPECCHIO DELLE MIE BRAME: CHI \220 ILPI\351 BELLO DEL REAME?", - "NON VUOLE APRIRMI", - "MOLTO BENE. MI HO MESSO I TAPPI", - "\324 UN DIPLOMA DI CACCIA-VAMPIRI OMOLOGATO DALLA UNVERSIT\267 DI CAMBRIDGE", - "NO. MANCANO ANCORA GLI INGREDIENTI, NON MERITA LA PENA CHE SIA SVEGLIATO", - // 350 - "NON HO SOLDI", - "\324 UNA LAMPADA BRITANICA", - "BARISTA! AIUTAMI!", - "HA COMPARITO UN VAMPIRO ED HA PRESSO LA MIA FIDANZATA", - "MA NON MI AIUTER\267", - // 355 - "MORTA? CHE VUOLE DIRE?", - "- EHEM!", - "UN VAMPIRO HA SEQUESTRATO LA RAGAZZA DELLA 506!", - "DEVI AIUTARMI!", - "NON SAI SUONARE NESSUNA DI \"ELIO E LE STORIE TESSE\"", - // 360 - "COME TI SOPPORTI, SUONANDO SEMPRE LO STESSO?", - "ALLORA COME MI SENTI?", - "PRESTAMI I TAPPI", - "DAI, TE LI RESTITUISCO SUBITO", - "DAIIII...", - // 365 - "CIAO. DEVO UCCIDERE UN VAMPIRO", - "", - "COSA DICI? IN TRANSILVANO?", - "CHI \324 LO ZIO PEPPINO?", - "MA CHE SUCCEDE CON DRASCULA?", - // 370 - "CHI \324 VON BRAUN?", - "E PER CHE NON LO FA?", - "E DOVE POSSO TROVARE VON BRAUN?", - "GRAZIE E CIAO, SOGNI D'ORO", - "SAR\267 MEGLIO BUSSARE PRIMA", - // 375 - "\324 LEI IL PROFESSORE VON BRAUN?", - "E MI POTREBBE DIRE DOVE POSSO ...?", - "NON CREDO SIA IL NANNO GANIMEDI", - "-PROFESSORE!", - "AIUTAMI! LA VITA DEL MIO AMORE DIPENDE DI LEI!", - // 380 - "VA BENE, NON HO BISOGNO DEL SUO AIUTO", - "O.K. ME NE VADO", - "NON AVERE PAURA. INSIEME VINCEREMO DRASCULA", - "ALLORA PER CHE NON MI AIUTA?", - "IO CE LE HO", - // 385 - "SI CE LE HO", - "D'ACCORDO", - "...EHH...SI", - "VENGO A RIENTRARE A QUESTA CABINA", - "SONO PRONTO PER FARE LA PROVA", - // 390 - "VA BENE, VECCHIETO. SONO VENUTO PER IL MIO SOLDI", - "NO, NIENTE. ME NE GI\267 ANDAVO", - "SCUSA", - "TI \324 INTERESANTE QUESTO LIBRO? HA PARTITURE DI TCIAKOWSKY", - "COME POSSO UCCIDERE UN VAMPIRO?", - // 395 - "NON TI HANNO DETTO CHE NON \324 BUONO DORMIRE IN CATTIVA POSIZIONE?", - "\324 QUELLO CHE SEMPRE DICE MIA MADRE", - "PER CHE DRASCULA NON FU RIUSCITO A UCCIDERTI?", - "E COSA FU?", - "BENISSIMO! HA LEI LA POZIONE DI IMMUNIT\267...!", - // 400 - "ALLORA", - "MOLTO BENE", - "MI PUO RIPETERE COSA BISOGNO PER QUELLA POZIONE?", - "VADO VIA VELOCE A TROVARLO", - "SENTA, COSA \324 SUCCESO CON IL PIANISTA?", - // 405 - "HO GI\267 TUTTI GLI INGREDIENTI DI QUESTA POZIONE", - "UNA DOMANDA: COSA \324 QUELLA DI ALUCSARD ETEREUM?", - "DICA, DICA..", - "E DOV'\324 QUELLA GROTTA?", - "CHE C'\324? NON AVETE TRIBUNALE?", - // 410 - "...MA ...E SE TROVO PI\353 VAMPIRI?", - "\324 UN VAMPIRO CHE NON MI FA PASSARE", - "SI ASSOMIGLIA A YODA, MA PI\353 ALTO", - "EH, YODA. SE MI FAI PASSARE TI DAR\343 CENTO LIRE", - "BENE, O.K., NON POSSO DIRTI NULLA", - // 415 - "CIAO VAMPIRO, BELLA NOTTE, VERO?", - "TI HANNO DETTO QUALCHE VOLTA CHE TI ASSOMIGLII A YODA?", - "SEI UN VAMPIRO O UN DIPINTO ALL'OLEO?", - "MEGLIO NON DIRTI NIENTE, PERCHE POI TI ARRABBII", - "\324 CHIUSA CON LA CHIAVE", - // 420 - "SE PROVO, LA GAZZA MI POTREI CAVARE UN OCCHIO", - "\324 CHIUSA! DIO MIO, CHE PAURA!", - "LE CERNIERE SONO OSSIDATE", - "LA DENTRO C'\324 SOLTANTO UN BARATOLO DI FARINA", - "QUESTO HA TOLTO L'OSSIDO", - // 425 - "HO TROVATO UNA TALEA DI LEGNO DI PINO", - "PRENDER\343 QUESTO CH'\220 PI\353 GROSSO", - "BENE, CREDO DI POTERE TOGLIERMI QUESTO STUPIDO COSTUME", - "\"CORRIDOIO AI TORRIONI CHIUSO PER LAVORI IN CORSO. PER FAVORE, PER LA PORTA PRINCIPALE. SCUSATE PER IL DISTURBO\"", - "..\324 PALLIDO, HA DENTI CANINI, HA CIUFFO E UTILIZA MANTELLO...- SICURO CH'\324 DRASCULA!", - // 430 - "B.J., B.J., STAI BENE?", - "SI, SO CH'\324 SCEMA MA MI SENTO SOLISSIMO", - "NON AVRAI UNA CHIAVE PER CASO, VERO?", - "- E SICURO CHE NON HAI UN GRIMALDELLO?", - "DAMI UNA FONCINA. VADO A FARE COME MCGYVER", - // 435 - "NON MUOVERTI, TORNO SUBITO", - "- MANAGIA!- SI \324 ROTTA!", - "OLE, ANCHE MI HO FATTO LA BARBA!", - "SI, CARO?", - "NON ARRIVA", - // 440 - "IL PIANISTA NON C'\324", - "UN DRINK TRANSILVANO", - "ANCORA NON HO CAMERA", - "SEMBRA CHE FU RISUCCHIATO NELLO SCARICO DELLA VASCA E HA DECISO APRIRE UN BAR", - "\324 UBRIACO PERSO", - // 445 - "QUESTI CAPELLI.... CREDO CHE MI FANNO RICORDARE A QUALCUNO", - "\324 UNO SCHELETRO OSSUTO", - "GUARDA! MIGUEL BOSE!", - "\324 ADDORMENTATO. SAREBBE UN PECCATO SVEGLIARGLI", - "\324 PI\353 BRUTTO CHE BEGNINI", - // 450 - "UN FERETRO DI LEGNO DI PINO", - "MI TAGLIER\267 A FETTINI, COME UN SALSICCIOTTO", - "NON MI PIACCIONO I PENDOLI. PREFERISCO LE CARCIOFE", - "LE MIE MANI SONO LEGATE. NON CE LA FAR\343", - "\324 OVVIO CH'\324 UNA PORTA SEGRETA", - // 455 - "MI IGNORANO", - "-DAIII!", - "NEL PRIMO COPIONE SI MUOVEVA, MA IL VIDEO-GIOCO \220 USCITO DAL BUDGET E NON HANNO POTUTO PAGARMI UNA PALESTRA E NON SONO GONFFIATO", - "SEMBRA CH'\324 UN P\343 ALLENTATA DAL MURO", - "NON CREDO CHE MI SIA UTILE. \324 TROPPO UMIDA PER ACCENDERLA.", - // 460 - "AL LATO OVEST? -N\324 PAZZO, CHI SA CHE CI SAR\267 LI!", - "HA DEI BELLI DISEGNI TRANSILVANI", - "", - "CHE PENA CHE NON CI SIA DENTRO UN AGNELLINO ARRROSTANDOSI", - "LA ULTIMA VOLTA CHE APRII UN FORNO, LA CASA SALT\220 PER ARIA", - // 465 - "LO SCUDO DELLA SCUADRA DI CALCIO DI TRANSILVANIA", - "E PER CHE? PER INDOSARLA SULLA TESTA?", - "NON CREDO CHE I CASSETI SIANO DI QUELLI CHE SI APPRONO", - "NON VOGLIO SAPERE IL CIBO CHE CI SAR\267 LA DENTRO!", - "HO L'IMPRESSIONE CH'\324 IMPRESSIONISTA", - // 470 - "LA NOTTE SI IMPADRONA DI TUTTI QUANTI... CHE PAURA?", - "\324 OSTACOLATA", - "\324 IL RE, NON LO AVEVI IMAGINATO?", - "NO, NE UNO A CASA, ANZI GLI DO DA MANGIARE", - "UNA SCAFFALATURA CON LIBRI ED ALTRE COSE", - // 475 - "E A CHI CHIAMO A QUESTE ORE?", - "\"COME FARE LA DECLARAZIONE DI REDDITI\"- CHE INTERESSANTE!", - "NE HO UNO A CASA, CREDO CH'\324 UN BEST-SELLER MONDIALE", - "UNA CHIAVE COMPLETAMENTE NORMALE", - "MI SA QHE QUESTA NON \220 DI QU\336", - // 480 - "EH, SONO PATATINE FRITE A FORMA DI DENTI CANINI ! MI AFASCINA", - "NON CREDO CHE SIA IL MOMENTO MIGLIORE PER METTERSI A MANGIARE DOLCI, L'ESSERE PI\353 CATTIVO DEL MONDO ha nelle sue mani la mia fidanzzata", - "COME MI ST\343 DIVERTENDO UCCIDENDO VAMPIRI CON QUESTO!", - "VEDIAMO SE APPARISCE UN ALTRO PRESTO", - "NO, DEVE ESSERE CON UN VAMPIRO SPORCO E SCHIFFOSO COME QUELLO DI PRIMA", - // 485 - "\324 L'AUTENTICA PARRUCA CHE UTILIZZ\343 ELVIS QUANDO DIVENT\343 PELATO", - "\220 FARINA MA NON POSSO DIRE MARCHE", - "FORSE IN UN ALTRO MOMENTO. OK?", - "\220 UNA ASCIA BUONISSIMA, CHE PENA CHE NON CI SIA QU\336 VICINO NESSUNA TESTA DI VAMPIRO", - "NO. NEL FONDO SONO UNA BRAVISSIMA PERSONA", - // 490 - "\324 IL DEODORANTE DELLA TACHER -HI,HI,HI!", - "\324 UN MANTELLO ABBASTANZA CARINO", - "", - "COME TUTTI I RAMI DI TUTTI GLI ALBERI DEL MONDO, CIO\324 MICA SPEZIALE", - "OH, INCREDIBILE!- UNA CORDA IN UNA AVVENTURA GRAFICA!", - // 495 - "MI DOMANDO A CHE SERVE...", - "UNA CORDA LEGATA A UNA BRANCA, O UNA BRANCA LEGATA A UNA CORDA, DIPENDE COME SI GUARDI", - "SEMBRA CHE QUESTA GAZZA HA CATIVE INTENZIONI", - "DAI.., NON LA DICO NULLA CHE POI SI ARRABBIA", - "SEMBRA ESSERE MORTA, MA NON \220 VERO - EH?", - // 500 - "NESSUN ANIMALE \220 STATO MALTRATO DURANTE LE RIPRESE DI QUESTO VIDEO-GIOCO", -}, -}; - -const char *_textd[][84] = { -{ - // 0 - "", - "HEY IGOR, HOW IS EVERYTHING GOING?", - "IT'S ALWAYS THE SAME STORY EVERYTIME THERE'S A GOOD GAME ON THE SATELLITE! ANYWAY, WE'LL GO WATCH IT IN THE BAR, AS USUAL", - "IGOR LISTEN CAREFULLY MAN, WE ARE GOING TO START WITH PHASE NUMBER ONE OF MY PLAN TO CONQUER THE WORLD", - "FIRST WE'LL CAPTURE ONE OF THE LIGHTNINGS AND WE'LL DEMAGNETIZE IT WITH OUR INDIFIBULATOR. THE ELECTRICITY WILL COME THROUGH TO MY MONSTER AND HE'LL GET ALIVE!", - // 5 - "IF EVERYTHING WORKS OUT ALL RIGHT, THIS WILL BE THE BEGINNING OF A GREAT ARMY THAT WILL CONQUER THE WORLD FOR ME. HA, HA", - "THE MONSTERS WILL DESTROY ALL THE ARMY'S WEAPONS IN THE WORLD, MEANWHILE, WE'LL BE SAFE IN THE PIECES OF LAND I BOUGHT IN GIBRALTAR", - "WE'LL SET UP A COUP. GOVERNMENTS ALL OVER THE WORLD WILL BE UNCOVERED AND THEIR COUNTRIES WILL SURRENDER TO ME!", - "I'LL BECOME THE FIRST BAD GUY IN HISTORY TO MAKE IT ! HA, HA!", - "I'M NOT TALKING TO YOU, IDIOT! I'M JUST GIVING YOU THE PLOT. ALL RIGHT, EVERYTHING READY?", - // 10 - "THE TIME HAS COME! TURN ON THE ALKALINE BATTERIES' SWITCH", - "DAMNED IT! WHAT WENT WRONG?", - "ARE YOU SURE YOU CHECKED IT ALL AND THERE WAS NOTHING MISSING? YOU'VE BEEN LATELY MESSING AROUND WITH THAT STUFF ABOUT TAXES AND I DON'T KNOW MAN...", - "YOU STUPID THING! YOU FORGOT TO CONNECT THE INDIFIBULATOR. THE SCREWS HAVE PROBABLY MAGNETIZED AND HIS BRAIN BURNT", - "YOU ARE DEAD, YOU ARE DEAD...WAIT TILL I GET YOU!", - // 15 - "SHUT UP! I'LL GET ANOTHER BRAIN TOMORROW AND THEN WE WILL REPEAT THE EXPERIMENT", - "THIS TIME I'LL GET A WOMAN'S BRAIN. SHINY AND NOT USED YET...HA, HA, HA, GOODIE ONE!", - "SO WHAT? I'M THE BAD GUY, RIGHT? SO I CAN BE AS FULL OF MACHISMO AS I WANT, ALL RIGHT? AND IF YOU SAY SOMETHING AGAIN I'LL TURN YOUR HUMP BACK TO FRONT!", - "HA, HA, HA. YOU FELL TOOO!! NOW YOU ARE GOING TO PAY FOR DARING TO FIGHT AGAINST ME! IGOR, TAKE HIM TO THE PENDULUM OF DEATH!", - "AND SO, TELL ME, YOU STUPID HUMAN. HOW COME YOU WANT TO DESTROY ME?", - // 20 - "THAT'S BEAUTIFUL!. IF IT WASN'T BECAUSE IT MAKES ME LAUGH, I WOULD CRY", - "OUR GIRLFRIEND'S BRAIN TO HELP ME CONQUERING THE WORLD", - "YES, SURE! I'LL TAKE IT FROM HER AND GIVE IT TO MY FRUSKYNSTEIN. THE WORLD WILL BE MINE WITH IT, HA, HA", - "WHAT!? YOU'RE DEAD, MAN! I'M GOING TO...YOU REALLY GOT ME ANGRY MAN...COME ON, PREPARE TO DIE!", - "HA, HA, HA. NOT EVEN IN YOUR WILDEST DREAMS!", - // 25 - "YES, ISN'T IT? HA, HA", - "ALL RIGHT, ALL RIGHT. BUT DO IT QUICKLY, OK?", - "PUT THAT CIGARETTE OUT NOW! I CAN'T STAND YOU ANYMORE!", - "AND SO, DOES THAT BREW HAVE THE OPPOSITE EFFECT?", - "WELL, WE'LL SEE THAT", - // 30 - "OK, LET'S SEE IT. IGOR, BRING ME THE CD \"SCRATCHING YOUR NAILS ALL OVER THE BLACKBOARD\"", - "NO WAY. THE GIRL STAYS WITH ME. YOU RE STAYING THERE UNTIL THE PENDULUM CUTS YOU INTO THIN SLICES. HA, HA, HA", - "MAN I'M I JUST BAD... COME ON IGOR, LET'S MAKE THE BREW AND CONQUER THE WORLD", - "WHAT HAPPENS NOW?", - "YES, WHAT?...OH, DAMNED, THE GAME!", - // 35 - "I FORGOT ABOUT THAT. GET THE GIRL AND LET'S GO AND WATCH IT. WE CAN CONQUER THE WORLD LATER", - "THANKS MAN, I WAS THIRSTY", - "OH, THE CRUCIFIX!!...THE CRUCIFIX...!", - "I DIDN'T NOTICE ABOUT THAT BEAUTIFUL CRUCIFIX!", - "LEAVE ME ALONE!, I'M WATCHING THE GAME", - // 40 - "", - "", - "", - "", - "", - // 45 - "", - "", - "", - "", - "", - // 50 - "", - "", - "", - "", - "", - // 55 - "", - "HI BLIND MAN. HOW IT'S GOING?", - "HOW DO YOU KNOW I'M A FOREIGNER?", - "YOU LOOK BLIND. YOU'RE WEARING DARK GLASSES LIKE STEVIE WONDER", - "LOOK, I'M SORRY, I DIDN'T KNOW YOU COULD SEE", - // 60 - "BUT HAVEN'T YOU JUST TOLD ME YOU WEREN'T BLIND", - "BUT IF YOU CAN'T SEE", - "OOOOKAY. SORRY. IN THAT CASE, HI THERE SIGHTLESS PERSON", - "I'M JOHN HACKER. YOU MUST BE ONE OF THOSE CHARACTERS WHO WILL HELP ME OUT IN EXCHANGE FOR AN OBJECT. AREN'T YOU? EH? AREN'T YOU?", - "UUUUM, EXCUSE ME FOR ASKING BLIN... SIGHTLESS PERSON! BUT WHAT SORT OF JOB IS THAT, TO GIVE SICKLES IN EXCHANGE FOR MONEY WHILE YOU PLAY THE ACCORDION?", - // 65 - "AH YES, I SUPPOSE THAT'S TRUE. GOODBYE SIGHTLESS PERSON... BLIND MAN", - "HERE IS THE LARGE AMOUNT OF MONEY YOU ASKED ME FOR", - "YOU BETTER HAVE HAD", - "HI THERE FOREIGNER", - "AND HOW DO YOU KNOW I'M BLIND?", - // 70 - "AND I'M NOT KIDDING YOU BUT YOUR'S ARE LIKE WOODY ALLEN'S", - "NO, I CAN'T SEE", - "AND I'M NOT", - "OH OF COURSE. JUST COS I CAN'T SEE, YOU ACCUSE ME OF BEING BLIND", - "HI THERE FOREIGNER! WHAT ARE YOU DOING IN TRANSYLVANIA?", - // 75 - "THAT'S RIGHT, FOREIGNER. IN EXCHANGE FOR A LARGE SUM OF MONEY I'LL GIVE YOU A SICKLE FOR WHEN YOU MIGHT NEED IT", - "SHHHH, I'M A SICKLES TRADER, THAT'S WHY I HAVE TO HIDE", - "BECAUSE YOU TOLD ME BEFORE, DIDN'T YOU?", - "THANKS FOREIGNER. HERE'S THE SICKLE IN EXCHANGE. YOU'LL FIND IT REALLY USEFUL LATER ON, HONESTLY", - "", - // 80 - "", - "", - "", - "bla, bla, bla." -}, -{ - // 0 - "", - "\250COMO VA TODO, IGOR?", - "\255SIEMPRE QUE HAY UN BUEN PARTIDO EN LA PARABOLICA PASA LO MISMO! EN FIN, IREMOS A VERLO AL BAR COMO DE COSTUMBRE", - "AHORA IGOR, ATIENDE. VAMOS A REALIZAR LA FASE 1 DE MI PLAN PARA CONQUISTAR EL MUNDO", - "PRIMERO CAPTAREMOS UNO DE LOS RAYOS DE LA TORMENTA Y LO DESMAGNETIZAREMOS CON NUESTRO INDIFIBULADOR. LA ELECTRICIDAD PASARA A MI MONSTRUO \255Y LE DARA VIDA! ", - // 5 - "SI TODO SALE BIEN ESTE NO SERA MAS QUE EL PRIMERO DE UN INMENSO EJERCITO QUE CONQUISTARA EL MUNDO PARA MI, JA, JA, JA", - "LOS MONSTRUOS DESTRUIRAN TODAS LAS ARMAS DE TODOS LOS EJERCITOS DEL MUNDO, MIENTRAS NOSOTROS NOS REFUGIAMOS EN UNOS TERRENOS QUE HE COMPRADO EN GIBRALTAR", - "ENTONCES, DAREMOS UN GOLPE DE ESTADO, LOS GOBIERNOS DEL MUNDO NO TENDRAN CON QUE PROTEGERSE, Y PONDRAN SUS PAISES A MIS PIES", - "\255SERE EL PRIMER MALO EN LA HISTORIA QUE LO CONSIGA! \255JUA, JUA, JUA!", - "\255A TI NADA, IDIOTA! ESTOY EXPONIENDO LA TRAMA. BIEN \250ESTA TODO LISTO?", - // 10 - "\255LLEGO EL MOMENTO, ENTONCES! \255DALE AL INTERRUPTOR DE LAS PILAS ALCALINAS! ", - "\255MALDITA SEA! \250QUE ES LO QUE HA PODIDO FALLAR?", - "\250SEGURO QUE LO REVISASTE BIEN Y NO FALTABA NADA? ULTIMAMENTE ESTAS CON ESO DE LA RENTA QUE NO VES UN PIJO A DOS METROS", - "\255IDIOTA, NO HABIAS CONECTADO EL INDIFIBULADOR! LOS TORNILLOS SE HABRAN MAGNETIZADO Y SE LE HABRA QUEMADO EL CEREBRO", - "ESTAS MUERTO, ESTAS MUERTO, COMO TE COJA...", - // 15 - "\255A CALLAR! MA\245ANA IRE A POR OTRO CEREBRO Y REPETIREMOS EL EXPERIMENTO ", - "NO. ESTA VEZ TRAERE UNO DE MUJER, PARA QUE ESTE NUEVECITO Y SIN ESTRENAR. JA, JA, JA, QUE MALISIMA DE CHISTA", - "\250Y QUE? YO SOY EL MALO Y SOY TODO LO MACHISTA QUE QUIERA \250ENTENDIDO? Y COMO ME VUELVAS A RECHISTAR TE TRAGAS LA CHEPA ", - "JA, JA, JA. OTRO QUE HA CAIDO. AHORA VAS A PAGAR TU OSADIA DE QUERER ACABAR CONMIGO. \255IGOR, AL PENDULO DE LA MUERTE!", - "DIME, HUMANO ESTUPIDO, \250COMO ES QUE TE HA DADO POR QUERER DESTRUIRME? ", - // 20 - "\255QUE BONITO!, ME PONDRIA A LLORAR SI NO FUERA PORQUE ME HACE GRACIA", - "A TU NOVIA LA NECESITO PARA QUE ME AYUDE CON SU CEREBRO A CONQUISTAR EL MUNDO", - "\255SI, JA! SE LO QUITARE Y SE LO PONDRE A MI FRUSKYNSTEIN, Y CON EL DOMINARE EL MUNDO, JA, JA, JA", - "\255\250QUE?! \255ESTAS MUERTO, ESTAS MUERTO! TE VOY A... ME HAS TOCADO LAS NARICES, VAMOS. \255PREPARATE A SER MATADO!", - "JA, JA, JA. QUE TE CREES TU ESO", - // 25 - "SI, \250VERDAD? JA, JA, JA ", - "AH, ESTA BIEN, PUEDES FUMARTE EL ULTIMO CIGARRILLO, PERO DEPRISITA", - "APAGA YA ESE CIGARRILLO, ME TIENES HARTO YA", - "Y DIME, \250ESA POCION TIENE EL EFECTO CONTRARIO?", - "ESO YA LO VEREMOS...", - // 30 - "BUENO, A VER SI ES VERDAD. IGOR, TRAE EL COMPACT DISC DE U\245AS ARRASCANDO UNA PIZARRA", - "ESO NI SO\245ARLO. LA CHICA SE QUEDA CONMIGO, Y TU TE QUEDAS AHI HASTA QUE EL PENDULO TE CORTE EL RODAJITAS. JA, JA, JA", - "PERO QUE MALO QUE SOY, VAMOS IGOR, VAMOS A PREPARAR LA POCION Y CONQUISTAR EL MUNDO", - "\250QUE PASA AHORA?", - "SI, \250QUE PASA?... \255ANDA, EL PARTIDO!", - // 35 - "SE ME HABIA OLVIDADO. COGE A LA CHICA Y VAMONOS A VERLE. YA CONQUISTARE EL MUNDO DESPUES", - "GRACIAS MACHO, TENIA SED", - "\255ArgH! \255ESE CRUCIFIJO! \255ESE CRUCIFIJO!...", - "QUE BONITO ES ESE CRUCIFIJO, NO ME HABIA YO FIJADO", - "DEJAME, QUE ESTOY VIENDO EL FUTBOL", - // 40 - "", - "", - "", - "", - "", - // 45 - "", - "", - "", - "", - "", - // 50 - "", - "", - "", - "", - "", - // 55 - "", - "Hola ciego. \250Que tal?", - "\250Como sabes que soy extranjero?", - "Pareces un ciego. Tienes gafas como serafin zubiri, hablas mirando al frente como Stevie Wonder...", - "Bueno, perdona. No sabia que vieses.", - // 60 - "\250Pero no me acabas de decir que no eres ciego?", - "\255Pero si no ves!", - "Vaaaale. Perdona. En ese caso: Hola invidente.", - "Soy John Hacker, y estoy jugando al Drascula. Tu debes ser el tipico personaje que me ayudara a cambio de un objeto. \250A que si? \250Eh? \250A que si?", - "Em... Perdona que te pregunte cieg..\255Invidente!. Pero... \250Que clase de profesion es la tuya, de dar hoces a cambio de dinero, mientras tocas el acordeon?", - // 65 - "Ah, si. Es verdad. Adios invidente...(ciego)", - "Ahi tienes la cuantiosa cantidad de dinero que me pediste.", - "Mas te vale.", - "Hola extranjero.", - "Y tu... \250Como sabes que soy ciego?", - // 70 - "Y tu hablas como el hijo de Bill Cosby y no me meto contigo.", - "No, si no veo.", - "Y no lo soy.", - "\255Oh, claro! Como no veo se me tacha de ciego \250no?", - "\255Hola Extranjero! y \250que haces en Transilvania?", - // 75 - "Correcto extranjero. A cambio de una cuantiosa suma de dinero, te dare una hoz, para cuando te haga falta.", - "Shhhhhh. Soy traficante de hoces, tengo que disimular.", - "Porque me lo has dicho antes \250no?", - "Gracias extranjero. Aqui tienes tu hoz a cambio. Un objeto que te sera muy util algo mas adelante... de verdad.", - "", - // 80 - "", - "", - "", - "\244a, \244a, \244a. que bueno, que bueno." -}, -{ - // 0 - "", - "WIE GEHTS, WIE STEHTS, IGOR ?", - "IMMER WENN auf kabel EIN GUTES SPIEL KOMMT, PASSIERT DAS GLEICHE. NAJA, DANN GUCKEN WIR ES UNS EBEN WIE IMMER IN DER KNEIPE AN", - "JETZT PASS AUF, IGOR. WIR WERDEN JETZT PHASE 1 MEINES WELTEROBERUNGSPLANS STARTEN.", - "Pah, einige GEWITTERBLITZE, die wir MIT dem VIBROXATOR ENTMAGNETISIEREN. und der strom wird meinem MONSTERCHEN leben einhauchen.", - // 5 - "WENN ALLES KLAPPT WIRD ER DER ERSTE SOLDAT EINER RIESIGEN ARMEE SEIN, DIE DIE WELT FueR MICH EROBERN WIRD, HARHARHAR", - "DIE MONSTER WERDEN ALLE WAFFEN IN DER GANZEN WELT VERNICHTEN WaeHREND WIR UNS AUF UNSERE LaeNDEREIEN ZURueCKZIEHEN, DIE ICH UNS AUF HELGOLAND GEKAUFT HABE.", - "DANN WERDEN WIR EINEN STAATSSTREICH MACHEN UND DIE REGIERUNGEN DIESER WELT WERDEN AUFGEBEN UND SICH MIR ZU FueSSEN WERFEN", - "ICH WERDE DER ERSTE BoeSE IN DER GESCHICHTE SEIN, DER DAS SCHAFFT, HUAHUAHUA !", - "GAR NICHTS, IDIOT ! ICH ERZaeHLE DIE HANDLUNG .O.K . IST ALLES FERTIG ?", - // 10 - "ES IST ALSO SOWEIT !DRueCK AUF DEN SCHALTER MIT DEN ALKALI-BATTERIEN !", - "VERFLIXT NOCHMAL ! WAS IST DA SCHIEFGELAUFEN ?", - "BIST DU SICHER, DASS DU ALLES GECHECKT HAST ? SEIT NEUESTEM DENKST DU NUR NOCH AN DEINE EINKOMMENSERKLaeRUNG UND KRIEGST NICHTS MEHR MIT", - "DU IDIOT !DU HAST DEN VIBROXITOR NICHT EINGESCHALTET !JETZT SIND DIE SCHRAUBEN MAGNETISIERT UND IHM WIRD WOHL DAS GEHIRN VERBRANNT SEIN", - "DU BIST EIN TOTER MANN, NA WARTE, WENN ICH DICH KRIEGE...", - // 15 - "HALT DIE KLAPPE !MORGEN HOLE ICH EIN NEUES HIRN UND WIR WIEDERHOLEN DAS EXPERIMENT", - "NEIN, DIESMAL BESORG ICH EIN FRAUENHIRN, DASS NOCH GANZ FRISCH UND UNBENUTZT IST, HAR,HAR,HAR, SUPERJOKE !", - "NA UND ? ICH BIN DER BoeSE UND DER SUPER-MACHO ODER WAS ? UND WENN DU MIR NOCHMAL WIDERSPRICHST KANNST DU DEINEN BUCKEL SCHLUCKEN", - "HARHARHAR,SCHON WIEDER EINER. DU WARST SO DREIST, MICH UMBRINGEN ZU WOLLEN. DAS WIRST DU JETZT BueSSEN. IGOR! ZUM TODESPENDEL MIT IHM !", - "SAG MAL DU DUMMES MENSCHLEIN, WIESO WOLLTEST DU MICH ZERSToeREN ?", - // 20 - "ACH WIE SueSS !ICH KoeNNTE GLATT ANFANGEN ZU HEULEN, WENN ES NICHT SO LUSTIG WaeRE", - "DEINE FREUNDIN BRAUCHE ICH NOCH, DAMIT SIE MIR MIT IHREM HIRN DABEI HILFT, DIE WELT ZU EROBERN", - "JA, HA !ICH WERDE ES RAUSREISSEN UND ES FRUNKSFENSTEIN GEBEN UND DANN WERDE ICH DIE WELT EROBERN,HARHARHAR", - "WAS ? !DU BIST EIN TOTER MANN! ICH WERDE DICH... DU HAST MICH VERaePPELT,GANZ KLAR . MACH DEIN TESTAMENT!", - "HARHARHAR, GLAUB DU DAS MAL ", - // 25 - "JA, WIRKLICH ? HARHARHAR", - "JA, SCHON GUT, RAUCH DIR NOCH EINE LETZTE ZIGARETTE, ABER RUCKZUCK", - "MACH MAL DIE ZIGARETTE AUS. MIR IST SCHON SCHLECHT", - "UND SAG MAL, DIESE MISCHUNG HAT DIE GEGENWIRKUNG ?", - "DAS WERDEN WIR JA MAL SEHEN...", - // 30 - "NA, MAL GUCKEN OB DAS STIMMT, IGOR., BRING MAL DIE CD MIT DEN DEM SOUND VON kratzenden FINGERNaeGELN AUF EINER SCHULTAFEL", - "NICHT IM TRAUM. DAS MaeDCHEN BLEIBT BEI MIR UND DU BLEIBST WO DU BIST, BIS DICH DAS PENDEL IN LECKERE SCHEIBCHEN SCHNEIDET, HARHAR", - "WIE BoeSE ICH DOCH BIN. KOMM IGOR, WIR BEREITEN DIE MISCHUNG ZU UND EROBERN DANN DIE WELT", - "WAS IST DENN JETZT WIEDER LOS ?", - "JA, WAS IST LOS ?...VERDAMMT, DAS SPIEL !", - // 35 - "DAS HAB ICH GLATT VERGESSEN. NIMM DAS MaeDCHEN UND LASS UNS DAS SPIEL ANGUCKEN GEHEN . DIE WELT EROBERN WIR DANACH.", - "DANKE, ALTER, ICH HATTE DURST", - "ARGHH! DAS KRUZIFIX DA ! DAS KRUZIFIX !", - "WIE SCHoeN DAS KRUZIFIX DA IST, HAB ICH GAR NICHT BEMERKT", - "LASS MICH, ICH GUCK DOCH GERADE FUSSBALL", - // 40 - "", - "", - "", - "", - "", - // 45 - "", - "", - "", - "", - "", - // 50 - "", - "", - "", - "", - "", - // 55 - "", - "Hallo Blinder. Wie gehts?", - "Woher weisst Du, dass ich nicht von hier bin ?", - "Du siehst wie ein Blinder aus . Du guckst beim Sprechen immer gerade aus, und dann diese Stevie-Wonder-Brille....", - "O.k,entschuldige. Ich dachte, du kannst nichts sehen", - // 60 - "Aber hast Du mir nicht gerade gesagt, dass Du NICHT blind bist?", - "Ich denke, Du siehst nichts ?", - "Okaaay,okaay! Tut mir leid. Also wenn das so ist: Sehkranker ", - "Ich bin Heinz Hacker und spiele Drascula . Du bist bestimmt derjenige, der mir hilft und dafuer irgendwas haben will. Stimmts? Hae? Hab ich recht!?", - "aeh....Entschuldige die Frage, Blind-Sehkranker!Aber...Was hast Du fuer einen komischen Beruf, dass Du Sicheln verkaufst und dabei Akkordeon spielst!", - // 65 - "Ach, klar, stimmt. Auf Wiedersehen Sehkranker...(Blinder)", - "Hier hast Du den Wahnsinnsbatzen Geld, um den Du mich gebeten hast", - "Das ist auch besser so!", - "Hallo Fremder!", - "Und Du...Woher willst Du wissen, dass ich blind bin?", - // 70 - "Und Du bist der Sohn von Bill Cosby und ich werde mich nicht mit Dir anlegen", - "Nein, ich seh doch nichts!", - "Und ich bin es nicht", - "Na super! Nur weil ich nichts sehe bin ich direkt ein Blinder, oder was?", - "Hallo Fremder! Und was machst Du in Transylvanien?", - // 75 - "Richtig, Fremder. Gegen einen Wahnsinnsbatzen Geld bekommst Du von mir eine Sichel damit Du eine hast, wenn Du eine brauchst.", - "Psssssst. Ich bin Sichel-Dealer, ich muss unentdeckt bleiben ", - "Warum hast Du mir das nicht vorher gesagt ?", - "Danke, Fremder. Hier hast du dafuer Deine Sichel. Sie wird Dir nachher noch nuetzlich sein...glaub mir !", - "", - // 80 - "", - "", - "", - "bla, bla, bla." -}, -{ - // 0 - "", - "COMMENT VA TOUT, IGOR?", - "C'EST TOUJOURS LA M\322ME CHOSE QUAND IL Y A UN BON MATCH \267 LA PARABOLIQUE! ENFIN, ALLONS LE VOIR AU BAR, COMME D'HABITUDE", - "MAINTENANT, COUTE IGOR. NOUS ALLONS RALISER LA PHASE 1 DE MON PLAN POUR CONQURIR LE MONDE", - "D'ABORD, ON SAISIRA L'UNE DES FOUDRES DE L'ORAGE ET ON LA DMAGNTISERAIT AVEC l'INDIFUBULATEUR. LA COURANTE PASSERA DANS MON MONSTRE ET LUI DONNERA LA VIE!", - // 5 - "SI TOUT VA BIEN CELUI-L\267 NE SERA QUE LE PREMIER D'UNE IMMENSE ARME QUE CONQURRA LE MONDE POUR MOI, HA! HA! HA! ", - "LES MONSTRES VONT ANANTIR TOUTES LES ARMES DE TOUTES LES ARMES DU MONDE, TANDIS QUE NOUS NOUS RFUGIONS DANS LES TERRAINS QUE J'AI ACHET \267 GIBRALTAR", - "ALORS, ON DONNERA UN COUP D'TAT. LES GOUVERNEMENTS DU MONDE N'AURONT PAS DE PROTECTION ET SES PAYS SERONT \267 MES PIEDS", - "JE SERAI LE PREMIER MALIN DE L'HISTOIRE \267 Y AVOIR RUSSI! -HOUA! HOUA! HOUA!", - "POUR TOI RIEN, IDIOT! JE PRSENTE LA TRAME. BIEN, TOUT EST PR\322T? ", - // 10 - "LE MOMENT EST ARRIV\220, ALORS! -APPUIE DONC SUR L'INTERRUPTEUR DES BATTERIES ALCALINES! ", - "H\220LAS! QU'EST-CE QUE N'A PAS MARCH\220?", - "C'EST S\352R QUE TU L'AS BIEN R\220VIS\220 ET IL NE MANQUAIT RIEN? DERNI\324REMENT AVEC CETTE HISTOIRE DE LA RENTE TU N'Y VOIS GOUTTE", - "IDIOT! TU N'AVAIS PAS CONNECT\220 L'INFIBULATEUR! LES VIS SE SERONT MAGN\220TIS\220ES ET SA CERVELLE AURA BR\352L\220E", - "TU ES MORT, TU ES MORT, SI JE T'ATTRAPE...", - // 15 - "TAIS-TOI! DEMAIN J'AURAI UNE AUTRE CERVELLE ET ON FERA L'ESSAI \267 NOUVEAU", - "NON, CETTE FOIS J'APPORTERAI UNE DE FEMME POUR QU'ELLE SOIT TOUTE NEUVE ET DE PREMI\324RE MAIN. HA! HA! HA! QUE MALIN DE XISTE", - "ET QUOI? JE SUIS LE MALIN ET TOUT LE SEXISTE QUE JE D\220SIRE, C'EST ENTENDU? SI TU ME R\220PLIQUES ENCORE JE TE FAIS ENGLOUTIR TA BOSSE", - "HA! HA! HA!. UN AUTRE QUI S'EST LAISS\220 PRENDRE. MAINTENANT TU PAIERAS CHER TON AUDACE DE VOULOIR EN FINIR AVEC MOI. -IGOR, AU PENDULE DE LA MORT!", - "DIS-MOI, HUMAIN STUPIDE, POURQUOI TU AS PENS\220 ME D\220TRUIRE? ", - // 20 - "QUE C'EST BEAU! JE SANGLOTERAIS SI CE N'ETAIT PAS DR\342LE", - "J'AI BESOIN DE TA FIANC\220E POUR QU'ELLE M'AIDE \267 CONQU\220RIR LE MONDE AVEC SA CERVELLE", - "OUI, HA! JE LA LUI ARRACHERAI ET L'INSTALLERAI SUR MON FRUSKYNSTEIN, ET AVEC LUI JE VAIS MA\327TRISER LE MONDE, HA! HA! HA!", - "QUOI?! -TU ES MORT, TU ES MORT! JE VAIS TE... TU M'AS CASS\220 LE NEZ, ALLONS, -APPR\322TE-TOI \267 \322TRE TU\220!", - "HA! HA! HA! C'EST-CE QUE TU CROIS", - // 25 - "OUI, N'EST-CE PAS? HA! HA! HA!", - "AH, C'EST BIEN! TU PEUX FUMER LA DERNI\324RE CIGARETTE, MAIS D\220P\322CHE-TOI!", - "\220TEINS D\220J\267 CETTE CIGARETTE, J'EN A RAS LE BOL!", - "ET DIS-MOIS, CETTE POTION, A-T-ELLE L'EFFET CONTRAIRE?", - "ON VERRA \200A...", - // 30 - "EH BIEN, ON VERRA SI C'EST VRAI. IGOR, APPORTE LE COMPACT DISC D'ONGLES GRATTANT UN TABLEAU", - "N'Y PENSES PAS. LA FILLE RESTE AVEC MOI, ET TOI TU RESTERAS L\267 JUSQU'\267 QUE LA PENDULE TE COUPE EN PETITES TRANCHES. HA! HA! HA!", - "MAIS QUE JE SUIS MALIN. ON Y VA, IGOR, ALLONS PR\220PARER LA POTION ET CONQU\220RIR LE MONDE", - "QU'Y A-T-IL MAINTENANT?", - "OUI, QU'Y A-T-IL?... -TIENS, LE MATCH!", - // 35 - "JE L'AVAIS OUBLI\220. PRENDS LA FILLE ET ALLONS LE VOIR. J'IRAI CONQU\220RIR LE MONDE PLUS TARD", - "MERCI MON VIEUX, J'AVAIS SOIF", - "ArgH! CE CRUCIFIX! -CE CRUCIFIX!...", - "C'EST BEAU CE CRUCIFIX, JE NE M'AVAIS PAS RENDU COMPTE", - "FICHE-MOI LA PAIX! JE REGARDE LE FOOT-BALL", - // 40 - "", - "", - "", - "", - "", - // 45 - "", - "", - "", - "", - "", - // 50 - "", - "", - "", - "", - "", - // 55 - "", - "BONJOUR, L'AVEUGLE. A VA?", - "POURQUOI TU SAIS QUE JE SUIS UN TRANGER?", - "TU PARAT UN AVEUGLE. TU AS DES LUNETTES COMME SERAFIN ZUBIRI ET TU PARLES EN REGARDANT DEVANT TOI, COMME STEVIE WONDER...", - "BON, EXCUSE-MOI. JE NE SAVAIS PAS QUE TU PUISSES VOIR.", - // 60 - "MAIS, TU NE VIENS PAS DE ME DIRE QUE TU N'EST PAS AVEUGLE?", - "MAIS TU NE VOIS PAS!", - "A VA, A VA.... PARDONNE-MOI. DANS CE CAS-L: BONJOUR AVEUGLE.", - "JE SUIS JOHN HACQUER ET JE JOUE AU DRASCULA. TU ES SREMENT LE TYPIQUE PERSONNAGE QUI VA M'AIDER EN TROC D'UN OBJET. D'ACCORD? H? D'ACCORD?", - "EUH... AVEUGLE, UNE QUESTION! MAIS... QUEL GENRE DE MTIER C'EST LE TIEN? CELUI D'CHANGER DE FAUCILLES CONTRE DE L'ARGENT EN JOUANT DE L'ACCORDON?", - // 65 - "AH, OUI! C'EST VRAI. AU REVOIR AVEUGLE...", - "VOIL LA GROSSE SOMME D'ARGENT QUE TU M'AS DEMANDE.", - "IL TE VAUX MIEUX.", - "BONJOUR, TRANGER!", - "ET TOI... COMMENT TU SAIS QUE JE SUIS UN AVEUGLE?", - // 70 - "ET TOI TU PARLES COMME LE FILS DE BILL COSBY ET MOI, JE NE T'EMBTE PAS.", - "NON, SI JE NE VOIS PAS.", - "ET MOI, JE NE LE SUIS PAS.", - "OH, BIEN SR! COMME JE NE VOIS PAS ON ME TCHE D'AVEUGLE, N'EST-CE PAS", - "BONJOUR, TRANGER! ET QU'EST-CE QUE TU FAIS EN TRANSYLVANIE?", - // 75 - "C'EST CORRECT, TRANGER. POUR UNE GROSSE SOMME D'ARGENT, JE TE DONNERAI UNE FAUCILLE, POUR QUAND TU EN AURAS BESOIN.", - "CHUT! JE SUIS UN TRAFICANT DE FAUCILLES, JE DOIS ME CACHER.", - "PARCE QUE TU ME L'AS DIT AVANT, N'EST-CE PAS?", - "MERCI TRANGER. VOIL TA FAUCILLE EN CHANGE. UNE CHOSE QUI SERA TRS PRATIQUE POUR TOI, PLUS TARD... VRAIMENT.", - "", - // 80 - "", - "", - "", - "bla, bla, bla." -}, -{ - // 0 - "", - "COME VA, IGOR?", - "-SEMPRE CHE C' UNA BUONA PARTITA SUCCEDE LO STESSO! BENE, ANDREMO A GUARDARLA AL BAR, COME SEMPRE", - "ADESSO IGOR, ASCOLTA. ANDIAMO A REALIZZARE LA FASE 1 DEL MIO PROGETTO PER CONQUISTARE IL MONDO", - "ATTRARREMO UN FULMINo DELLA TEMPESTA E LO DISMAGNETIZZAREMO CON L'INDIFIBULATORE. LA ELETTRICIT\265 ANDR\265 AL MIO MOSTRO E, GLI DAR\265 VITA!", - // 5 - "SE TUTTO VA BENE QUESTO SAR\265 SOLTANTO IL PRIMO DI UN'IMMENSO ESERCITO CHE CONQUISTAR\265 IL MONDO PER ME, HA,HA,HA", - "I MOSTRI DISTRUGGERANNO TUTTE LE ARME DI TUTTI GLI ESERCITI DEL MONDO, MENTRE NOI CI RIFURGIAREMO nei miei terreni A GIBRALTAR", - "POI, FAREMO UN GOLPE, E I GOVERNI DEL MONDO NON AVRANNO PER DIFENDERSI, E AVR\220 LE LORO NAZIONI SOTTO I MIEI PIEDI", - "SAR\220 IL PRIMO CATTIVO DELLA STORIA CHE RIESCA!", - "A TE NIENTE, SCIOCCO! ST\220 SPORRENDO LA TRAMA. BENE, TUTTO A POSTO?", - // 10 - "-\220 IL MOMENTO! -PREMI L'INTERRUTTORE DELLE BATTERIE ALCALINE!", - "- PORCA MISERIA! -CHE COSA NON \220 ANDATA BENE?", - "SEI SICURO DI AVERLO CONTROLLATO BENE? E NO MANCABA NIENTE? ULTIMAMENTE PER I REDDITI NON VEDI UNA MADONNA", - "IMBECILE!, NON HAI CONETTATO L'INDIFIBULATORE! LE VITI SARANO MAGNETIZZATE E ADESSO AVR\265 IL CERVELLO BRUCIATO", - "SEI MORTO, SEI MORTO, COME TI PRENDA..", - // 15 - "STAI ZITTO! DOMANI CERCHER\220 UN ALTRO CERVELLO E RIPETEREMO L'ESPERIMENTO", - "NO. QUESTA VOLTA NE PORTER\220 UNO DI DONNA, COS\326 SAR\265 NUOVISSIMO, MAI UTILIZZATO. HA, HA HA, CHE BARZELLETA FALLITA", - "E? SONO IL CATTIVO DELLA STORIA, E SONO MASCHILISTA SE VOGLIO, CAPITO? E NON LAMENTARTI UNA ALTRA VOLTA PERCHE MANGERAI LA TUA GOBBA", - "HA,HA,HA. UN ALTRO PRESSO. ADESSO PAGHERAI MOLTO CARO QUESTA OFFESA, LA TUA INTENZIONE DI FINIRE CON ME. -IGOR, AL PENDOLO DELLA MORTE!", - "DIMI, STUPIDO UMANO, COME MAI HAI PENSATO A DISTRUGGERMI?", - // 20 - "-CHE BELLO!, MI METTEREI A PIANGERE SE NON FOSSE PERCHE MI FA RIDERE", - "HO BISOGNO DELLA TUA RAGAZZA, IL SUO CERVELLO MI AIUTER\265 A CONQUISTARE IL MONDO", - "-SI, HA ! VADO A TOGLIARSILO PER METTEGLIELO AL MIO FRUSKYNSTEIN, E CON LUI DOMINER\220 IL MONDO, HA,HA,HA", - "CHE?! - SEI MORTO, SEI MORTO! TI VADO A...MI HAI FATTO ARRABBIARE. SEI PRONTO PER MORIRE?", - "HA,HA,HA. TU CREDI?", - // 25 - "SI, VERO? HA,HA,HA", - "VA BENE, PUOI FUMARE LA ULTIMA SIGARETTA, MA SBRIGATI", - "SONO STUFFO, BUTTA GI\265 LA SIGARETTA!", - "E DIMI, QUELLA POZIONE HA L'EFFETTO INVERSO?", - "QUELLO SI VEDR\265 ..", - // 30 - "BENE, SAR\265 VERO?. IGOR, DAMI IL COMPACT DISC DI UNGHIE GRAFFIANDO UNA LAVAGNA", - "NEANCHE SOGNARLO. LA RAGAZZA RIMANE CON ME, E TU RIMANI LI FINO CHE IL PENDOLO TI TAGLII IN FETTE. HA,HA,HA", - "MA COME SONO CATTIVO, ANDIAMO IGOR, ANDIAMO A FARE LA POZIONE, ANDIAMO A CONQUISTARE IL MONDO", - "ADESSO CHE SUCCEDE?", - "SI, CHE C'E?....LA PARTITA!", - // 35 - "L'AVEVO DIMENTICATA. PRENDI LA RAGAZZA E ANDIAMO A GUARDARE IL CALCIO. CONQUISTER\220 IL MONDO DOPO", - "GRAZIE AMICO, AVEVO SETE", - "-ARGH! -QUEL CROCIFISSO! -QUEL CROCIFISSO!...", - "QUE BELLO \220 QUEL CROCIFISSO, NON MI ERO ACCORTO", - "LASCIAMI, ST\220 GUARDANDO LA PARTITA", - // 40 - "", - "", - "", - "", - "", - // 45 - "", - "", - "", - "", - "", - // 50 - "", - "", - "", - "", - "", - // 55 - "", - "Ciao cieco. Come va?.", - "Come sai che sono straniero.", - "Sembri un cieco. Hai gli occhiali come il cieco di Sorrento, parli guardando all'infinito come Stevie Wonder..", - "Bene, scusa. Non sapevo che non vedessi", - // 60 - "Ma non mi hai appena detto che non sei cieco?.", - "- Ma se non vedi!.", - "Beeeene. Scusa. Allora: Ciao : non vedente", - "Sono John Hacker, st giocando al Drascula. Tu devi proprio essere il tipico personaggio che mi aiuter in cambio di un oggeto. Vero...?", - "Ma... Scusa ciec..- non vedente! .Ma.. . che tipo di mestiere il tuo, di dare falci per soldi, mentre suoni la fisarmonica?.", - // 65 - "Ah, si. \324 vero. Ciao non vedente....(cieco)", - "Ecco la abbondante quantit di soldi che mi avevi chiesto.", - "Mi raccomando", - "Ciao straniero.", - "E tu... Come sai che sono cieco?", - // 70 - "E tu parli come il figlio di Bill Cosby e non ti offendo.", - "No, se non vedo.", - "E non lo sono.", - "-Oh, certo!. Come non vedo mi chiamano cieco, no?.", - "-Ciao Straniero! e cosa fai in Transilvania?", - // 75 - "Corretto straniero. Per una abbondante quantit di soldi, ti dar in cambio una falce, per quando ne avrai bisogno.", - "Shhhhhh. Sono trafficante di falci, devo proprio dissimulare.", - "Perche mi lo hai detto prima, no?", - "Grazie straniero. Ecco la tua falce. Un oggeto che ti sar molto utile pi avanti...... davvero.", - "", - // 80 - "", - "", - "", - "bla, bla, bla." -}, -}; - -const char *_textb[][15] = { -{ - // 0 - "", - "I'M HERE, DRINKING", - "THEY ARE ALL DEAD, THANKS. BURPP...", - "YES, SURE...", - "SHE FEELS ATTRACTED TO UNCLE DESIDERIO", - // 5 - "EVEN BETTER, UNCLE DESIDERIO'S DEAD BODY", - "MY UNCLE. HE WENT TO CASTLE AND NEVER CAME BACK", - "WELL, HE CAME BACK JUST A LITTLE. IF ONLY VON BRAUN HADN'T SCREWED THINGS UP MY UNCLE WOULD BE DRINKING WITH US NOW", - "NOTHING...", - "WELL, YES !. THAT MEAN MAN HAS TERRIFIED US ALL", - // 10 - "FROM TIME TO TIME HE COMES DOWN TO THE VILLAGE AND TAKES SOMEONE WITH HIM.", - "A LITTLE WHILE AFTER WE JUST A FEW FOUND BODY PARTS. I THINK HE IS DEALING WITH ORGANS OR SOMETHING LIKE THAT", - "THE ONLY PERSON IN THE VILLAGE WHO KNOWS HOW TO END UP WITH DRASCULA IS A CULTIVATED PERSON", - "HE LIVES IN A LOG-CABIN OUT OF TOWN, EVER SINCE DRASCULA BEAT HIM UP", - "HE IS THE ONLY ONE WHO COULD HELP US WITH DRASCULA, AND HE DOESN'T WANT TO HEAR ABOUT US. HOW DO YOU LIKE THAT?", -}, -{ - // 0 - "", - "AQUI, BEBIENDO", - "MUERTOS TODOS. GRACIAS. BURRP ", - "SI, NO VEAS... ", - "ESTA POR EL TIO DESIDERIO", - // 5 - "Y ESTA OTRA, POR EL CADAVER DEL TIO DESIDERIO", - "MI TIO. FUE AL CASTILLO Y NO VOLVIO", - "BUENO, VOLVIO PERO POCO. SI EL VON BRAUN NO HUBIESE METIDO LA PATA MI TIO ESTARIA AQUI BEBIENDO", - "NADA... ", - "\255BUENO, SI! ESE DESALMADO NOS TIENE ATEMORIZADOS A TODOS", - // 10 - "DE VEZ EN CUANDO BAJA AL PUEBLO Y SE LLEVA A ALGUIEN", - "POCO DESPUES SOLO ENCONTRAMOS UNOS POCOS RESTOS. CREO QUE ESTA TRAFICANDO CON ORGANOS, O ALGO ASI", - "EL UNICO DEL PUEBLO QUE SSABE COMO ACABAR CON DRASCULA TIENE ESTUDIOS", - "DESDE QUE LE DERROTO DRASCULA SE HA APARTADO A UNA CABA\245A EN LAS AFUERAS DEL PUEBLO", - "ES EL UNICO QUE PODRIA AYUDARNOS A ACABAR CON DRASCULA, Y NO QUIERE SABER NADA DE NOSOTROS. \250QUE TE PARECE A TI?", -}, -{ - // 0 - "", - "HIER, BEI EINEM GUTEN TROPFEN", - "ALLE TOT. VIELEN DANK. RueLPS !", - "YO, STIMMT...", - "DIE HIER IST FueR ONKEL DESIDERIUS", - // 5 - "UND DIESE HIER FueR DIE LEICHE VON ONKEL DESIDERIUS", - "MEIN ONKEL. ER GING ZUM SCHLOSS UND KAM NICHT ZURueCK", - "NAJA, ER KAM NUR IN RESTEN ZURueCK. WENN VON BRAUN SICH NICHT VERTAN HaeTTE, WueRDE ER JETZT MIT UNS EINEN HEBEN", - "NICHTS...", - "JA STIMMT! DIESER SCHURKE JAGT UNS ALLEN EINE RIESENANGST EIN", - // 10 - "AB UND ZU GEHT ER RUNTER INS DORF UND HOLT SICH JEMANDEN", - "KURZ DANACH HABEN WIR NUR NOCH RESTE GEFUNDEN, ICH GLAUBE ER HANDELT MIT ORGANEN ODER SO", - "DER EINZIGE, DER MIT DRASCULA FERTIGWERDEN KANN, WAR AN DER UNI ", - "SEITDEM DRASCULA IHN BESIEGT HAT, LEBT ER IN EINER EINSAMEN HueTTE AUSSERHALB DES DORFES", - " ER IST DER EINZIGE, DER DRASCULA ERLEDIGEN KoeNNTE UND WILL NICHTS VON UNS WISSEN. WAS HaeLST DU DAVON ?", -}, -{ - // 0 - "", - "ICI, EN BUVANT", - "TOUS MORTS. MERCI. BOURRP", - "OUI, VRAIMENT...", - "CELLE-CI POUR L'ONCLE DSIR", - // 5 - "ET CELLE-L\267 POUR LE CADAVRE D'ONCLE DSIR", - "MON ONCLE EST ALL AU CH\266TEAU ET N'EST PAS ENCORE REVENU", - "BON, IL EST REVENU MAIS POUR PEU DE TEMPS. SI VON BRAUN N'AURAIT FAIT UN IMPAIR, MON ONCLE DSIR SERAIT ICI EN BUVANT", - "RIEN... ", - "EH OUI! CE MALIN NOUS A INTIMIDS \267 TOUS", - // 10 - "DE FOIS IL DESCEND SUR LE VILLAGE ET ENLEVE QUELQU'UN", - "UN PEU PLUS TARD ON NE TROUVE QUE QUELQUES RESTES. JE PENSE QU'IL FAIT DU TRAFIQUE D'ORGANES, OU QUELQUE CHOSE PAREILLE", - "LE SEUL DU VILLAGE QUI SAIT COMMENT FINIR AVEC DRASCULA IL A DES \220TUDES", - "DEPUIS QUE DRASCULA L'A VAINCU, IL S'EST RETIR\220 DANS UNE CABANE, EN DEHORS DU VILLAGE", - "C'EST LE SEUL QUI POURRAIT NOUS AIDER \267 FINIR AVEC DRASCULA ET LUI NE VEUX RIEN SAVOIR DE NOUS. QU'EN PENSES-TUI?", -}, -{ - // 0 - "", - "QU\326, BEVENDO", - "MORTI TUTTI. GRAZIE. BURRP", - "SII, CERTO, SICURO..", - "QUESTA PER IL ZIO PEPPINO", - // 5 - "E QUEST'ALTRA, PER IL CADAVERE DEL ZIO PEPPINO", - "MIO ZIO. FU ANDATO AL CASTELLO, E NON MAI TORNATO", - "EEEHH, TORN\220, MA PER POCO TEMPO. SE IL VON BRAUN NON AVESSE SBAGLIATO, MIO ZIO SAREBBE QU\326 BEVENDO", - "NIENTE..", - "EEH,SI! QUEL MALVAGIO CI HA INTIMORATI", - // 10 - "A VOLTE SCENDE AL PAESE E QUANDO SE NE VA SI PORTA QUALCUNO", - "UN P\220 DOPO SOLTANTO TROVIAMO QUALQUE RESTO. CREDO CHE TRAFFICA ORGANI O QUALCOSA DEL GENERE", - "L'UNICO DEL PAESE CHE SA COME FINIRE CON DRASCULA \220 UNO CHE HA STUDIATO", - "DA CHE FU SCONFFIGIATO DA DRASCULA SI \220 ALLONTANATO A UNA CAPANNA FUORI DEL PAESE", - "L'UNICO CHE POTREBBE AIUTARCI A VINCERE DRASCULA, E NON VUOLE SAPERE NIENTE DI NOI. COSA PENSI?", -}, -}; - -const char *_textbj[][29] = { -{ - // 0 - "", - "ARE YOU ALL RIGHT? HEY, COME ON, WAKE UP! CAN YOU HEAR ME? ARE YOU DEAD?", - "NO, MY NAME IS BILLIE JEAN, BUT YOU CAN CALL ME B.J. IT'S SHORTER", - "HA, HA...! THAT WAS A GOOD ONE!", - "WELL, JHONNY. YOU SEE, I WAS HERE JUST READY TO GO TO BED WHEN I HEARD THIS STRONG NOISE DOWN THE CORRIDOR", - // 5 - "I DIDN'T PAY ATTENTION AT FIRST, BUT AFTER ABOUT TWO HOURS OR SO I COULDN'T SLEEP AND WENT OUT FOR A WALK", - "AS I OPENED THE DOOR I WAS SHOCKED TO FIND YOU THERE, LYING ON THE FLOOR. I THOUGHT YOU WERE DEAD, I SWEAR... HA, HA, SILLY BILLY", - "I WAS GOING TO GIVE YOU THE KISS OF LIFE BUT IT WASN'T NECESSARY BECAUSE YOU STARTED TO TALK", - "YOU SAID SOMETHING ABOUT A SCARECROW. I WAS VERY SCARED, YOU KNOW. IT'S A REAL SHOCK WHEN A DEAD PERSON STARTS TALKING RIGHT?", - "ISN'T THAT RIGHT? WELL, THEN I MANAGED TO BRING YOU TO MY ROOM THE BEST WAY I COULD. I PUT YOU IN BED... AND THAT'S ALL... HA, HA, HA...", - // 10 - "OH, NO...! IT WASN'T THE HIT, HA, HA. I JUST STEEPED ON YOUR GLASSES BY ACCIDENT", - "YOU REALLY LOOK GOOD WITH THOSE GLASSES. I KNOW HE'S NOT FERNANDO LANCHA, BUT I FIND HIM ATTRACTIVE...", - "YES, YES, I DO... COME ON, HOLD ME AND KISS ME TIGHT", - "OH JHONNY, HONEY, THANKS GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND THEN HE'S GONE DOWNSTAIRS TO SEE THE FOOTBALL GAME", - "YES, IT'S TRUE. PLEASE, SET ME FREE", - // 15 - "NO, I'M SORRY. I USED THEM ALL IN THE TOWER WHEN I WAS TRYING TO LIBERATE WHILE YOU LET ME DOWN", - "JOHNNY, IS THAT YOU? OH, GOD, GREAT! I KNEW YOU'D COME!", - "YOU DON'T EVEN KNOW HOW MUCH THAT EVIL DRASCULA HAS MADE ME SUFFER", - "FIRSTLY HE BROUGHT ME FLYING OVER HER AND THEN PUT ME IN THIS DISGUSTING ROOM WITHOUT EVEN A MIRROR OR ANYTHING", - "I'M TELLING YOU! AND THE WORSE PART IS THAT HE DIDN'T EVEN APOLOGIZE, NOT EVEN ONCE", - // 20 - "JHONNY HONEY, WHERE ARE YOU?", - "I'M READY TO LEAVE DEAR", - "WAIT, I'M GOING TO TAKE A LOOK... NO DARLING, I'M SORRY", - "THERE YOU GO...", - "\"DEAR JOHNNY\"", - // 25 - "I'LL NEVER FORGET YOU BUT I'VE REALIZED THAT THIS JUST COULDN'T WORK OUT RIGHT. TO BE HONEST, I'LL TELL YOU THAT THERE IS ANOTHER MAN. HE'S TALLER, STRONGER", - "AND HE HAS ALSO RESCUED ME FROM DRASCULA. HE HAS ASKED ME TO MARRY HIM, AND I HAVE ACCEPTED", - "BYE JHONNY. PLEASE DON'T TRY TO FIND SOME KIND OF EXPLANATION. YOU KNOW LOVE IS BLIND AND HAS ITS OWN WAYS", - "I HOPE THERE WON'T BE HARD FEELINGS BETWEEN US. REMEMBER THAT I STILL LOVE YOU, BUT ONLY AS A FRIEND", -}, -{ - // 0 - "", - "\250ESTA USTED BIEN? OIGA, DESPIERTE. \250ME OYE? \250ESTA USTED MUERTO?", - "NO, MI NOMBRE ES BILLIE JEAN, PERO PUEDES LLAMARME B.J. ES MAS CORTO", - "\255JI, JI! \255QUE BUENO!", - "PUES VERAS JOHNY, YO ESTABA AQUI, DISPUESTA A ACOSTARME, CUANDO OI UN FUERTE GOLPE EN EL PASILLO", - // 5 - "AL PRINCIPIO NO LE DI MUCHA IMPORTANCIA, PERO A LAS DOS HORAS MAS O MENOS DESCUBRI QUE NO PODIA DORMIR Y DECIDI SALIR A DAR UN PASEO", - "Y CUAL NO SERIA MI SORPRESA CUANDO ABRI LA PUERTA Y TE ENCONTRE AHI, EN EL SUELO TIRADO. TE LO JURO QUE PENSE QUE HABIAS MUERTO, JE, JE, TONTA DE MI", - "TE FUI A HACER EL BOCA A BOCA, PERO NO FUE NECESARIO PORQUE EMPEZASTE A HABLAR", - "DECIAS NO SE QUE DE UN ESPANTAPAJAROS. YO ME LLEVE UN SUSTO MUY GORDO, PORQUE CUANDO UN MUERTO SE PONE A HABLAR ES UNA IMPRESION MUY FUERTE, \250NO CREES?", - "\250VERDAD QUE SI? BUENO, PUES COMO PUDE, CARGUE CONTIGO Y TE TRAJE A MI HABITACION. TE PUSE SOBRE LA CAMA... Y ESO ES TODO. JI, JI,JI", - // 10 - "OH, NO HA SIDO EL GOLPE, JI, JI. ES QUE SIN QUERER PISE TUS GAFAS", - "\255HAY QUE VER QUE BIEN LE SIENTAN LAS GAFAS! YA SE QUE NO ES FERNANDO LANCHA, PERO TIENE UN NO SE QUE QUE QUE SE YO", - "SI, SI, QUIERO... VAMOS, ABRAZAME FUERTE, BESAME MUCHO...", - "OH JOHNY, CARI\245O, MENOS MAL QUE HAS VENIDO. ESE DESALMADO DE DRASCULA ME HA ATADO A LA CAMA Y LUEGO SE HA IDO ABAJO A VER EL PARTIDO", - "SI, ES VERDAD. LIBERAME ", - // 15 - "NO, LO SIENTO. GASTE TODAS EN LA MAZMORRA INTENTANDO LIBERARME MIENTRAS TU ME DEJABAS TIRADA", - "JOHNY \250ERES TU? \255QUE ALEGRIA! \255SABIA QUE VENDRIAS!", - "NO SABES CUANTO ME HA HECHO SUFRIR ESE DESALMADO DE DRASCULA", - "PRIMERO ME TRAJO VOLANDO HASTA AQUI Y LUEGO ME ENCERRO EN ESTE CUARTUCHO, SIN ESPEJO NI NADA", - "COMO LO OYES. Y LO PEOR ES QUE NO PIDIO PERDON NI UNA SOLA VEZ", - // 20 - "JOHNY, QUERIDO. \250DONDE ESTAS?", - "ESTOY LISTA PARA QUE ME SAQUES DE AQUI", - "ESPERA QUE VOY A MIRAR... NO CARI\245O, LO SIENTO", - "TOMA...", - "\"QUERIDO JOHNY:", - // 25 - "NUNCA PODRE OLVIDARTE, PERO ME HE DADO CUENTA DE QUE LO NUESTRO NO FUNCIONARIA. VOY A SER SINCERA CONTIGO: HAY OTRO HOMBRE; MAS ALTO, MAS FUERTE...", - "Y ADEMAS ME HA RESCATADO DE LAS MANOS DE DRASCULA. ME HA PEDIDO EN MATRIMONIO, Y YO HE ACEPTADO", - "ADIOS, JOHNY. NO INTENTES DARLE UNA EXPLICACION, PORQUE EL AMOR ES CIEGO Y NO ATIENDE A RAZONES", - "ESPERO QUE NO ME GUARDES RENCOR, Y RECUERDA QUE TE SIGO QUERIENDO, AUNQUE SOLO COMO AMIGO\"", -}, -{ - // 0 - "", - "HALLO, ALLES KLAR ?HEY, WACHEN SIE AUF. HoeREN SIE MICH ? SIND SIE TOT ?", - "NEIN, ICH HEISSE BILLIE JEAN., ABER DU KANNST MICH B.J. NENNEN, DAS IST KueRZER", - "HI,HI! SUPERGUT !", - "JA STELL DIR VOR, HEINZ, ICH WOLLTE MICH HIER GERADE HINLEGEN, ALS ICH EINEN LAUTEN KNALL IM FLUR HoeRTE", - // 5 - "ANFANGS HAB ICH NICHT SO DRAUF GEACHTET, ABER NACHDEM ICH 2 STUNDEN LANG NICHT SCHLAFEN KONNTE, GING ICH RUNTER, UM SPAZIERENZUGEHEN", - "ICH WAR NATueRLICH BAFF, ALS ICH DICH VOR der tuer LIEGEN SAH. ICH HABE ECHT GEDACHT,DASS DU TOT BIST, HEHE, WIE bloed" - "ICH WOLLTE GERADE MUND-ZU-MUND BEATMUNG MACHEN, ABER DANN FINGST DU JA AN ZU REDEN", - "DU FASELTEST WAS VON NER VOGELSCHEUCHE UND ICH Hatte ganz schoen schiss,WEIL sprechende tote schon echt UNHEIMLICH sind?", - "NICHT WAHR ?NAJA,ICH HABE DICH DANN AUFGEHOBEN UND IN MEIN ZIMMER GETRAGEN UND AUF MEIN BETT GELEGT.... WEITER NICHTS. HI,HI,HI", - // 10 - "ACH NEIN, ES WAR NICHT DIE BEULE, HIHI, ICH BIN VERSEHENTLICH AUF DEINE BRILLE GETRETEN ", - "MAN MUSS SICH ECHT MAL ANGUCKEN, WIE GUT IHM DIE BRILLE STEHT. ER IST ZWAR NICHT DER MARTINI-MANN, ABER ER HAT WAS WEISS ICH WAS", - "JA, JA, ICH WILL. KOMM NIMM MICH UND KueSS MICH...", - "OH HEINZ, LIEBLING, GUT DASS DU DA BIST. DIESER WueSTLING VON DRASCULA HAT MICH ANS BETT GEFESSELT UND IST DANN RUNTER UM SICH DAS SPIEL ANZUSEHEN", - "JA, WIRKLICH. BEFREIE MICH", - // 15 - "NEIN, TUT MIR LEID. ICH HAB ALLE BEIM VERSUCH, AUS DEM VERLIES AUSZUBRECHEN, AUFGEBRAUCHT", - "HEINZ, BIST DU ES ? WIE TOLL ! ICH WUSSTE, DASS DU KOMMEN WueRDEST !", - "DU AHNST JA NICHT, WIE SEHR ICH WEGEN DIESEM UNGEHEUER VON DRASCULA GELITTEN HABE", - "ZUERST IST ER MIT MIR HIERHER GEFLOGEN UND DANN HAT ER MICH IN DIESES LOCH GESPERRT, OHNE SPIEGEL UND GAR NICHTS", - "WIE ICHS GESAGT HABE. DAS SCHLIMMSTE IST,DASS ER SICH KEIN EINZIGES MAL ENTSCHULDIGT HAT.", - // 20 - "HEINZ, GELIEBTER, WO BIST DU ?", - "ICH BIN BEREIT, VON DIR GERETTET ZU WERDEN", - "WARTE, ICH GUCK MAL...NEIN, SCHATZ, TUT MIR LEID", - "HIER NIMM...", - "LIEBER HEINZ !", - // 25 - "ICH WERDE DICH NIE VERGESSEN, aber das mit uns funktioniert nicht.ICH gebs zu : ES GIBT EINEN ANDERN. GRoeSSER,STaeRKER...", - "UND AUSSERDEM HAT ER MICH AUS DRASCULAS KLAUEN BEFREIT UND UM MEINE HAND ANGEHALTEN,UND ICH HABE JA GESAGT", - "LEB WOHL,HEINZ. VERSUCH NICHT EINE ERKLaeRUNG ZU FINDEN, DENN DIE LIEBE IST BLIND UND KENNT KEINE VERNUNFT", - "DU BIST MIR HOFFENTLICH NICHT BoeSE. DENK IMMER DARAN DASS ICH DICH IMMER NOCH LIEBE, WENN AUCH NUR ALS FREUND", -}, -{ - // 0 - "", - "VOUS ALLEZ BIEN? ALLEZ, REVEILLEZ-VOUS! VOUS M'ENTENDEZ? VOUS \322TES MORT?", - "NON, MON NOM EST BILLIE JEAN, MAIS TU PEUX M'APPELLER B.J., C'EST PLUS COURT", - "HI! HI! -C'EST BON!", - "EN VRIT JOHNY, J'TAIS L\267, PR\322TE \267 ME COUCHER, ET J'AI ENTENDU UN FORT COUP DANS LE COULOIR", - // 5 - "AU DBUT JE N'Y AI PAS DONN D'IMPORTANCE, MAIS APR\324S JE ME SUIS RENDUE COMPTE QUE NE POUVAIS PAS M'ENDORMIR ET SUIS SORTIE FAIRE UNE PROMENADE", - "ET \267 MON GRAN TONNEMENT, QUAND J'AI OUVERT LA PORTE, JE T'AI TROUV L\267, PAR TERRE. J'TAIS SUR LE POINT DE PENSER QUE TU AVAIS MORT, HE!, QUE JE SUIS B\322TE!", - "J'ALLAIS TE FAIRE LE BOUCHE-\267-BOUCHE MAIS IL N'A T PAS NCESSAIRE PUISQUE TU AS COMMENC \267 PARLER", - "TU DISAIS \267 SAVOIR QUOI D'UN POUVANTAIL. CELA M'A FAIT UNE GRANDE PEUR, PARCE QUE QUAND UN MORT SE MET \267 PARLER L'IMPRESSION EST TR\324S FORTE, NE CROIS-TU PAS?", - "C'EST VRAI, NON? ENFIN. JE ME SUIS DBROUILLE POUR TE PRENDRE SUR MOI, T'EMMENER DANS MA CHAMBRE ET T'INSTALLER SUR LE LIT... ET VOIL\267 TOUT. HI! HI! HI!", - // 10 - "HO! CE N'EST PAS \267 CAUSE DU COUP, HI! HI! CE QUE J'AI MARCHE SUR TES LUNETTES PAR ACCIDENT", - "\220VIDEMMENT LES LUNETTES LUI FONT DU BIEN! JE SAIS BIEN QUIL N'EST PAS FERNANDO LANCHA, MAIS IL A UN AIR QU'ALLEZ DONC SAVOIR", - "OUI, OUI, JE VEUX... VAS-Y, EMBRASSE-MOI FORT, EMBRASSE-MOI BEAUCOUP...", - "OH,JOHNY!, MON AMOUR! HEUREUSEMENT QUE TU ES VENU. CE M\220CHANT DRASCULA M'A ATTACH\220 AU LIT ET APR\324S IL EST PARTI EN BAS VOIR LE MATCH", - "OUI, C'EST VRAI, LIB\324RE-MOI", - // 15 - "NON, SUIS D\220SOL\220E. JE LES AI TOUTES UTILIS\220ES, DANS LE CACHOT, EN T\266CHANT DE ME LIB\220RER ALORS QUE TOI TU M'ABANDONNAIS", - "JOHNY, C'EST TOI? -QUELLE JOIE! -JE SAVAIS QUE TU VIENDRAIS!", - "TU NE PEUX PAS SAVOIR COMBIEN M'A FAIT SOUFFRIR CE M\220CHANT DRASCULA", - "D'ABORD IL M'EMMEN\220 EN VOLANT JUSQU'ICI ET APR\324S IL M'ENFERM\220E DANS CE TAUDIS, SANS MIROIR NI RIEN D'AUTRE", - "COMME TU L'ENTENDS. ET LE PIRE C'EST QUIL NE M'A PAS DEMAND\220 PARDON N'UNE SEULE FOIS ", - // 20 - "JOHNY, MON CH\220RI, O\353 EST-CE QUE TU ES?", - "JE SUIS PR\322TE POUR QUE TU M'EN SORTES D'ICI", - "ATTEND, JE VAIS REGARDER... NON CH\220RI, JE REGRETTE", - "TIENS...", - "\"CHER JOHNY", - // 25 - "JAMAIS JE T'OUBLIERAI, MAIS JE ME SUIS APER\200UE QUE NOTRE AFFAIRE NE POUVAIT PAS MARCHER. JE VAIS \322TRE SINC\324RE AVEC TOI: IL Y A UN AUTRE HOMME, PLUS GRAND...", - "ET ENCORE IL M'A LIB\220R\220 DES MAINS DE DRASCULA. IL M'A DEMAND\220 EN MARIAGE, ET MOI J'AI ACCEPT\220", - "AU REVOIR, JOHNY. N'Y CHERCHES PAS UNE EXPLICATION, L'AMOUR EST AVEUGLE ET N'\220COUTE PAS DES RAISONS", - "J'ESP\324RE QUE TU SERAS SANS RANCUNE, ET N'OUBLIES PAS QUE JE T'AIME ENCORE, MAIS EN AMI SEULEMENT\"", -}, -{ - // 0 - "", - "ST\265 BENE? SENTA, PUO SENTIRMI? SI \220 MORTO?", - "NO, IL MIO NOME BILLIE JEAN, MA PUOI CHIAMARMI B.J. PI \351 BREVE", - "HI,HI!- CHE BUONO!", - "NON SO JOHNY, ERO QU\326, STAVO PER ADDORMENTARMI, QUANDO HO SENTITO UN FORTE RUMORE NEL CORRIDOIO", - // 5 - "PRIMA NON GLI HO DATTO IMPORTANZA, MA DUE ORE DOPO HO SCOPERTO CHE NON RIUSCIVO A ADDORMENTARMI E SONO uscita A FARE QUATTRO PASSI", - "E FIGURATI LA SORPRESA QUANDO HO APERTO LA PORTA E TI HO TROVATO PER TERRA. TI GIURO, HO PENSATO CH'ERI MORTO..., MA COME SONO SCIOCCA", - "VOLEVO FARTI IL BOCCA A BOCCA, MA NON C'ERA BISOGNO PERCHE SUBITO HAI COMINCIATO A PARLARE", - "HAI DETTO NON SO CHE DI UN SPAVENTAPASSERI. CHE COLPO.....!, PERCHE QUANDO UN MORTO SI METTE A PARLARE FA UN COLPO GRANDISSIMO!", - "VERO DI SI? NON SO COME SONO RIUSCITA, TI HO TRASPORTATO ALLA MIA CAMERA, TI HO MESSO SUL MIO LETTO E.... NIENTE PI\351 .", - // 10 - "NO, NON \220 STATA LA BOTTA, HI, HI. \220 PERCHE ... HO PESTATO I TUOI OCCHIALI", - "MAMMA MIA MA COM'\220 BELLO CON GLI OCCHIALI! SO CHE NON \220 FERNANDO LANCHA, MA HA QUALCOSA CHE MI PIACE MOLTISSIMO", - "SI,SI, VOGLIO... ABBRACIAMI FORTE, BACIAMI MOLTO..", - "OH JOHNY, CARO, MENO MALE CHE SEI VENUTO. QUEL MALVAGIO, DRASCULA, MI HA LEGATO AL LETTO E POI SE NE \220 ANDATO A GUARDARE LA PARTITA", - "SI, \220 VERO, LIBERAMI", - // 15 - "NO, MI DISPIACE. HO UTILIZZATO TUTTE IN CARCERE PROBANDO LIBERARMI QUANDO TU MI AVEVI LASCIATA", - "JOHNY, SEI TU? - BENISSIMO. LO SAPEVO ", - "NON TI FIGURI QUANTO MI HA FATTO SOFFRIRE DRASCULA", - "PRIMA MI HA PORTATO VOLANDO FINO QUA E POI MI HA RICHIUSA IN QUESTA CAMERACCIA CHE NON HA N\220 UNO SPECCHIO", - "COME HAI SENTITO. E LO PEGLIORE: N\220 UNA VOLTA SI \220 SCUSATO", - // 20 - "JOHNY, CARO. DOVE SEI?", - "SONO PRONTA, FAMI USCIRE DA QU\326 ", - "ASPETTA, VADO A GUARDARE... NO CARO, MI DISPIACE", - "PRENDI..", - "\"CARO JOHNY:", - // 25 - "MAI POTR\220 DIMENTICARTI, MA NON SAREMO MAI FELICI INSIEME. SAR\220 SINCERA CON TE : C'\220 NE UN ALTRO; PI\351 ALTO, PI\351 FORTE..", - "ANZI MI HA LIBERATO DA DRASCULA. MI HA CHIESTO LA MANO E HO DETTO DI SI", - "ADIO JOHNY. NON CERCARE UNA SPIEGAZIONE, PERCHE L'AMORE \220 CIECO.", - "SPERO NON MI ODII, E RICORDA CHE ANCORA TI VOGLIO BENE, SEBBENE SOLO COME UN AMICO\"", -}, -}; - - -const char *_texte[][24] = { -{ - // 0 - "", - "YOU... HEY YOU!", - "DON'T GIVE ME THAT CRAP ABOUT A DEAD BODY OK?", - "I'M ALIVE. IT'S JUST THAT I'M STARVING", - "WELL, YOU SEE. I WAS THE DRUNKARD OF THE VILLAGE, JUST KEEPING UP WITH THE FAMILY TRADITION, YOU KNOW? ONE NIGHT DRASCULA KIDNAPPED ME TO TAKE MY ORGANS AWAY", - // 5 - "SINCE ALCOHOL STILL KEEPS ME QUITE YOUNG, I'M HERE LIKE A SCRAP YARD. EVERYTIME HE NEEDS SOMETHING FOR THE MONSTER HE IS MAKING, HE COMES AND TAKES IT FROM ME", - "IT HURT AT FIRST, BUT I DON'T CARE ANYMORE", - "I DON'T KNOW. I GUESS IT'S HIS GRADUATE PROJECT", - "I'M DESIDERIO, AND I CAN HELP YOU IN ANYTHING YOU NEED", - "THE TRUTH IS THAT I DON'T REALLY FEEL LIKE IT, BUT THANKS VERY MUCH ANYWAY SIR", - // 10 - "YEAH, IT'S YOU", - "WHY DO ALL ADVENTURE GAMES END UP WITH A SUNRISE OR A SUNSET?", - "DO ALL THESE NAMES BELONG TO THE CREATORS OF THE GAME?", - "AREN'T THEY ASHAMED TO BE SEEN BY EVERYBODY?", - "JESUS, THAT EMILIO DE PAZ IS EVERYWHERE!!", - // 15 - "REALLY?", - "YES", - "WELL, DON'T MAKE A FUSS ABOUT IT", - "HEY WEREWOLF, BY THE WAY...", - "DIDN'T YOU FALL OFF A WINDOW AND GOT BADLY HURT", - // 20 - "IF AT LEAST IT WASN'T ALWAYS THE SAME ONES...", - "HE'S BEEN OUT FOUR TIMES ALREADY", - "I'D LIKE TO BE A MODEL", - "ALL RIGHT, AND WHAT ARE YOU GOING TO DO?", -}, -{ - // 0 - "", - "EO, USTED", - "\255QUE MUERTO NI OCHO CUARTOS!", - "ESTOY VIVO, LO QUE PASA ES QUE YO PASO HAMBRE, \250SABE USTED? ", - "PUES VERA, SE\245OR. YO ERA EL BORRACHO DEL PUEBLO, DIGNO SUCESOR DE UNA FAMILIA DE ILUSTRES BORRACHUZOS, Y UNA NOCHE DRASCULA ME SECUESTRO PARA ROBARME LOS ORGANOS", - // 5 - "RESULTA QUE COMO ME CONSERVO EN ALCOHOL, ME TIENE AQUI EN PLAN DESSGUACE. CADA VEZ QUE NECESITA ALGO PARA EL MONSTRUO QUE ESTA CREANDO VIENE Y ME LO COGE", - "AL PRINCIPIO ME DOLIA, NO CREA, PERO YA ME DA IGUAL", - "NO SE, SERA SU PROYECTO DE FIN DE CARRERA", - "MI NOMBRE ES DESIDERIO, PARA SERVIRLE A USTED", - "PUES LA VERDAD ES QUE NO TENGO MUCHA GANA, PERO MUCHAS GRACIAS DE TODAS MANERAS, SE\245OR", - // 10 - "SI, TU MISMO", - "\250POR QUE TODOS LOS JUEGOS DE AVENTURAS TERMINAN CON UN AMANECER O UNA PUESTA DE SOL? ", - "\250Y TODOS ESTOS NOMBRES SON DE LOS QUE HAN HECHO EL JUEGO?", - "\250Y NO LES DA VERG\232ENZA SALIR Y QUE LOS VEA TODO EL MUNDO?", - "JOLIN, NO HACE MAS QUE SALIR \"EMILIO DE PAZ\" ", - // 15 - "\250DE VERDAD?", - "SI", - "PUES NO ES PARA TANTO", - "POR CIERTO HOMBRE LOBO...", - "... \250NO CAISTE POR UNA VENTANA Y TE HICISTE POLVO?", - // 20 - "SI AL MENOS NO FUESEN SIEMPRE LOS MISMOS", - "ESE YA HA SALIDO CUATRO VECES", - "ME GUSTARIA SER MODELO", - "YA, \250Y TU QUE VAS A HACER?", -}, -{ - // 0 - "", - "EJ, SIE DAA", - "DU BIST WOHL BESOFFEN ODER WAS ? !", - "ICH BIN LEBENDIG, ABER ICH HABE HUNGER, WISSEN SIE ?", - "TJA,ICH WAR DER DORFSaeUFER, STOLZER abkomme EINER DORFSaeUFERsippe UND EINES NACHTS holte mich DRASCULA, UM MIR DIE ORGANE ZU KLAUEN", - // 5 - "WEIL ICH MICH IN ALKOHOL gut HALTE BIN ICH SEIN ERSATZTEILLAGER. IMMER WENN ER WAS FueR SEIN MONSTERCHEN BRAUCHT, BEDIENT ER SICH BEI MIR", - "AM ANFANG TAT DAS HoeLLISCH WEH, ABER JETZT MERK ICH SCHON NICHTS MEHR", - "KEINE AHNUNG, ES WIRD WOHL SEINE DIPLOMARBEIT SEIN", - "ICH HEISSE DESIDERIUS UND STEHE ZU IHREN DIENSTEN", - "NAJA, EIGENTLICH HABE ICH KEINE GROSSE LUST ABER VIELEN DANK JEDENFALLS, MEIN HERR", - // 10 - "JA,NUR ZU", - "WARUM HoeREN ALLE SPIELE MIT SONNENAUFGANG ODER SONNENUNTERGANG AUF ?", - "UND SIE HABEN DIE NAMEN VON DEN MACHERN DIESES SPIELS BENUTZT ?", - "UND SIE SCHaeMEN SICH NICHT SICH ALLER WELT ZU OFFENBAREN ?", - "SCHEIBENKLEISTER. SCHON WIEDER DER PROGRAMMIERER", - // 15 - "WIRKLICH ?", - "JA", - "SO SCHLIMM IST ES AUCH WIEDER NICHT", - "APROPOS WERWOLF....", - "....BIST DU NICHT AUS EINEM FENSTER GEFALLEN UND ZU STAUB GEWORDEN ?", - // 20 - "WENN ES WENIGSTENS NICHT IMMER DIESELBEN WaeREN", - "DER IST SCHON 4 MAL AUFGETAUCHT", - "ICH WaeRE GERN FOTOMODELL", - "KLAR, UND WAS WILLST DU SPaeTER MAL MACHEN ?", -}, -{ - // 0 - "", - "OH\220! VOUS!", - "QUEL MORT NI QUELLE HISTOIRE!", - "JE SUIS VIVANT. C'EST QUE J'AI FAIM, VOUS SAVEZ? ", - "J'TAIS L'IVROGNE DU VILLAGE, LE DIGNE REPRSENTANT D'UN FAMILLE D'ILLUSTRES SO\352LARDS, ET DRASCULA M'A SQUESTR UNE NUIT POUR ME VOLER LES ORGANES", - // 5 - "COMME JE ME CONSERVE EN ALCOOL, IL ME TIENS ICI EN PLAN DBALLAGE. \267 CHAQUE FOIS QU'IL A BESOIN DE QUELQUE CHOSE POUR SON MONSTRE, IL LE PRENDRE", - "AU DBUT A ME FAISAIT MAL, MAIS JE M'EN FICHE DJ\267", - "JE NE SAIS PAS, MAIS CE SERA SON PROJET FIN D'TUDES", - "MON NOM EST DSIR, POUR VOUS SERVIR", - "VRAIMENT JE N'AI PAS UNE ENVIE FOLLE, MAIS MERCI QUAND M\322ME, MONSIEUR", - // 10 - "OUI, TOI M\322ME", - "POURQUOI TOUS LES JEUX D'AVENTURES FINISSENT AVEC UNE AUBE OU UN COUCHER DU SOLEIL? ", - "ET VOIL\267 LES NOMS DE TOUS QUI ON FAIT LE JEU?", - "ET N'ONT-ILS PAS LA HONTE DE SE MONTRER ET QUE TOUT LE MONDE LES VOIT?", - "AH ZUT! IL NE FAIT QUE SORTIR \"EMILIO DE PAZ\" ", - // 15 - "C'EST VRAI", - "OUI", - "EH BIEN, IL NE FAUT PAS EXAG\220RER", - "EN FAIT HOMME-LOUP...", - "...N'EST-TU PAS TOMB\220 D'UNE FEN\322TRE EN TE BR\220SILLANT?", - // 20 - "SI DU MOINS N'\220TAIENT PAS TOUJOURS LES M\322MES...", - "CELUI-L\267 EST D\220J\267 SORTI QUATRE FOIS", - "J'AIMERAIS \322TRE MANNEQUIN", - "PARFAITEMENT. ET TOI, QUE VAS-TU FAIRE?", -}, -{ - // 0 - "", - "EO, LEI", - "MA CHE DICI!", - "SONO VIVO, MA HO SEMPRE MOLTA FAME, SA LEI?", - "IO ERO IL BEONE DEL PAESE, DEGNO SUCCESSORE DI UNA FAMIGLIA DI ILLUSTRI BEONI, E UNA NOTTE DRASCULA MI SEQUESTR\220 PER RUBARMI GLI ORGANI", - // 5 - "mi utilizza COME UNO SCASSO, OGNI VOLTA CHE HA BISOGNO DI QUALCOSA PER IL MOSTRO CHE ST\265 CREANDO VIENE QUA E MI LO toglia", - "AL INIZIO MI FACEVA MALE, MA ORA NON FA NIENTE", - "NON SO, SAR\265 LA SUA TESINA DI FINE DI LAUREA", - "IL MIO NOME PEPPINO, PER SERVIRGLI", - "LA VERIT\265 CHE NON HO MOLTA VOGLIA, COMUNQUE GRAZIE MILE, SIGNORE", - // 10 - "SI, PROPRIO TU", - "PER CHE TUTTI I VIDEO-GIOCHI D' AVVENTURE FINISCONO CON UN'ALBEGGIARE O UN TRAMONTO?", - "E TUTTI QUESTI NOMI SONO DI CHI HANNO FATTO IL GIOCO?", - "E NON SI VERGOGNANO DI USCIRE ED ESSERE VISTI DA TUTTI QUANTI?", - "UFFA, SOLTANTO ESCI \"EMILIO DE PAZ\"", - // 15 - "DAVVERO?", - "SI", - "NON \220 PER METTERSI COS\326 ", - "CERTO LUPO-MANNARO..", - "... MA NON SEI CADUTO DA UNA FINESTRA E TI HAI FATTO MALE?", - // 20 - "SE PER UNA VOLTA NON FOSSENO SEMPRE GLI STESSI", - "QUELLO \220 GIA USCITO QUATRO VOLTE", - "MI PIACEREBBE ESSERE TOP MODEL", - "SI, E TU, COSA VAI A FARE?", -}, -}; - - -const char *_texti[][33] = { -{ - // 0 - "", - "MASTER, I THINK THIS IS NOT WORKING", - "I AM POSITIVE, MASTER", - "I'M SORRY MASTER", - "ARE YOU GOING TO BRING HERE ANOTHER CRAZY SCIENTIST? I'LL TELL YOU THAT THE LABORATORY IS ALREADY PACKED UP, AND BESIDES, THEY'RE ALL OUT OF DATE", - // 5 - "HUSH MASTER, THE FEMINIST COULD HEAR YOU", - "DAMNED IT!", - "I DIDN'T EXPECT YOU SO SOON, MASTER", - "QUITE BAD MASTER. THERE MUST BE SOME PROBLEMS WITH THE SATELLITE AND I JUST CAN'T RECEIVE ANYTHING. BESIDES THERE ARE SOME INTERFERENCES BECAUSE OF THE STORM", - "WHAT DO I KNOW, MASTER?", - // 10 - "YES, MY MASTER", - "MASTER", - "DO YOU KNOW WHAT TIME IS IT?", - "WHAT? OH, THAT SCARED ME!. YOU ARE THE \"NIGHT-CLEANING GUY\", RIGHT?", - "I'M IGOR, THE VALET. YOU CAN START WITH THE BALL ROOM. THERE'S BEEN A SUPER NATURAL ORGY YESTERDAY AND IT LOOKS LIKE SHIT", - // 15 - "IF YOU NEED ANYTHING, JUST BUY IT", - "IT'S THE TAX RETURN APPLICATION FORM, CAN'T YOU SEE IT?", - "NEITHER DO I. FIRST OF ALL THE NUMBERS ARE VERY SMALL AND ALSO I CAN'T SEE MUCH AT THIS DISTANCE.", - "NO WAY! THEY MAKE ME LOOK UGLY", - "OH, WELL. IT'S JUST LIKE A CRAZY PARTY THAT THE MASTER ORGANIZES WITH HIS FRIENDS EACH TIME SOME IDIOT COMES ALONG TRYING TO KILL HIM", - // 20 - "THEY TAKE HIS EYES OUT. THEN, POUR SOME LEMON JUICE SO THAT IT ITCHES TO DEATH, AND THEN...", - "NO", - "WHAT DO YOU MEAN WHY NOT? DO YOU KNOW WHAT TIME IT IS?", - "YES, IT'S WINTER", - "SEE YOU LATER", - // 25 - "DON'T EVEN THINK ABOUT IT!", - "WELL, THAT'S ENOUGH FOR TODAY. I'M GOING TO HAVE SUPPER", - "MAN, I ALWAYS FORGET TO LOCK IT, RIGHT?", - "THE HELL WITH IT!", - "WHAT? OH, YOU SCARED ME MASTER, I THOUGHT YOU WERE ASLEEP", - // 30 - "OH, BY THE WAY, I TOOK THE LIVING-ROOM KEYS SO THAT YOU CAN WATCH THE EARLY MORNING CARTOONS WITHOUT WAKING ME UP", - "YOU'VE GOT ANOTHER COLD MASTER? DAMN IT! I TOLD YOU TO GET SOME HEATING IN HERE...", - "ALL RIGHT, JUST TAKE YOUR ASPIRIN AND GO TO BED TO SWEAT FOR A WHILE. GOOD NIGHT", -}, -{ - // 0 - "", - "MAESTRO, CREO QUE ESTO NO RULA", - "ESTOY SEGURISIMO, MAESTRO...", - "LO SIENTO, MAESTRO", - "\250VA A TRAER OTRO DE CIENTIFICO LOCO? LE ADVIERTO QUE TENEMOS EL LABORATORIO LLENO Y ESTAN TODOS CADUCADOS", - // 5 - "CALLE, MAESTRO, QUE COMO LE OIGAN LAS FEMINISTAS", - "HAY QUE JOROBARSE", - "\255MAESTRO! \255NO LE ESPERABA TAN PRONTO!", - "MAL MAESTRO, DEBE HABER PROBLEMAS CON EL SATELITE Y NO CONSIGO SINTONIZAR LA IMAGEN. ADEMAS LA TORMENTA PRODUCE INTERFERENCIAS", - "\250Y A MI QUE ME CUENTA, MAESTRO?", - // 10 - "SI, MAESTRO", - "MAESTRO", - "\250SABE LA HORA QUE ES?", - "\250EH? \255AH, QUE SUSTO ME HAS DADO! TU ERES EL DE \"LIMPIEZA NOCTURNA\"\250NO?", - "YO SOY IGOR, EL MAYORDOMO. PUEDES EMPEZAR POR EL SALON DE BAILE. AYER HUBO ORGIA SOBRENATURAL Y ESTA HECHO UNA MIERDA", - // 15 - "SI NECESITAS ALGO, LO COMPRAS", - "LA DECLARACION DE LA RENTA \250ES QUE NO LO VES?", - "PUES YO TAMPOCO, PORQUE ENTRE QUE LOS NUMEROS SON MUY CHICOS, Y YO QUE NO VEO BIEN DE LEJOS...", - "\255NI HABLAR! ME HACEN PARECER FEO", - "BAH, ES UN FESTORRO QUE SE MONTA EL MAESTRO CON SUS COLEGAS CADA VEZ QUE LLEGA ALGUN IMBECIL QUERIENDO ACABAR CON EL", - // 20 - "PRIMERO LE SACAN LOS OJOS; LUEGO LE ECHAN ZUMO DE LIMON PARA QUE LE ESCUEZA; DESPUES...", - "NO", - "\250COMO QUE POR QUE NO? \250TU HAS VISTO LA HORA QUE ES?", - "EN INVIERNO, SI", - "HASTA LUEGO", - // 25 - "\255NI SE TE OCURRA!", - "BUENO, POR HOY YA VALE. ME VOY A CENAR", - "\255Y QUE SIEMPRE SE ME OLVIDA CERRAR CON LLAVE!", - "\255HAY QUE JOROBARSE!", - "\250EH? \255AH! QUE SUSTO ME HA DADO, MAESTRO. CREIA QUE ESTABA DURMIENDO", - // 30 - "AH, POR CIERTO, TOME LAS LLAVES DE LA SALA DE ESTAR Y ASI NO ME MOLESTA MA\245ANA TEMPRANO SI QUIERE VER LOS DIBUJOS", - "\250QUE, YA SE HA RESFRIADO OTRA VEZ, MAESTRO? HAY QUE JOROBARSE. SI SE LO TENGO DICHO, QUE PONGA CALEFACCION... ", - "BUENO, TOMESE UNA PASTILLA DE ACIDOACETIL SALICILICO Y HALA, A SUDAR. BUENAS NOCHES", -}, -{ - // 0 - "", - "MEISTER, ICH GLAUBE, DAS KLAPPT NICHT", - "ICH BIN ABSOLUT SICHER, MEISTER....", - "TUT MIR LEID, MEISTER", - "NOCH SO EINEN VERRueCKTEN WISSENSCHAFTLER ? ABER DAS LABOR IST DOCH VOLL MIT IHNEN UND ALLE SIND ueBER DEM VERFALLSDATUM", - // 5 - "SEIEN SIE STILL MEISTER. WENN DAS DIE FEMINISTINNEN HoeREN", - "GRueNSPAN UND ENTENDRECK", - "MEISTER! ICH HABE SIE NOCH GAR NICHT ERWARTET !", - "SCHLECHT, MEISTER. ES GIBT WOHL PROBLEME MIT DER SCHueSSEL UND ICH BEKOMME DAS BILD EINFACH NICHT KLAR. UND DANN DAS GEWITTER !", - "UND WIESO ERZaeHLEN SIE MIR DAS, MEISTER ?", - // 10 - "JA, MEISTER", - "MEISTER", - "WISSEN SIE, WIEVIEL UHR ES IST ?", - "Hae ?OH, DU HAST MICH GANZ SCHoeN ERSCHRECKT. BIST DU VON \"BLITZ UND BLANK BEI MONDESSCHEIN\"", - "ICH BIN IGOR, DER HAUSVERWALTER.DU KANNST MIT DEM WOHNZIMMER ANFANGEN. GESTERN HATTEN WIR EINE ueBERNATueRLICHE ORGIE UND ES SIEHT AUS WIE im SAUSTALL", - // 15 - "KAUF ALLES WAS DU BRAUCHST !", - "DIE STEUERERKLaeRUNG.SIEHST DU DAS NICHT ?", - "ICH AUCH NICHT, WEIL DIE ZAHLEN SCHON MAL SEHR KLEIN SIND UND ICH DOCH kurzsichtig bin....", - "VON WEGEN ! SIE MACHEN MICH HaeSSLICH", - "PAH, DAS IST EINE RIESENFETE DIE DER MEISTER JEDESMAL DANN ABZIEHT, WENN IRGENDSOEIN IDIOT KOMMT, DER IHN ERLEDIGEN WILL", - // 20 - " ZUERST REISSEN SIE IHM DIE AUGEN AUS DANACH GIESSEN SIE ZITRONENSAFT DRueBER DAMIT ES SCHoeN BRENNT UND DANN...", - "NEIN", - "WIE WARUM NICHT ? WEISST DU WIEVIEL UHR ES IST ?", - "im WINTER JA", - "TSCHueSS", - // 25 - "WAG ES BLOOOSS NICHT !", - "GUT, FueR HEUTE REICHTS, DAS ABENDESSEN RUFT", - "IMMER VERGESSE ICH ZUZUSCHLIESSEN !", - "VERDAMMTER MIST NOCHMAL !", - "HaeH ?AH !SIE HABEN MICH GANZ SCHoeN ERSCHRECKT, MEISTER. ICH DACHTE SIE SCHLAFEN", - // 30 - "ACH,ueBRIGENS, ICH HABE DIE WOHNZIMMERSCHLueSSEL GENOMMEN. SO NERVEN SIE MICH MORGEN FRueH NICHT MIT IHREN ZEICHENTRICKSERIEN", - "ACH, SIE HABEN SICH SCHON WIEDER ERKaeLTET, MEISTER ? ICH HAB JA IMMER SCHON GESAGT, SIE SOLLEN DIE HEIZUNG ANMACHEN...", - "NAJA, SCHLUCKEN SIE EINE SALICILACETYLSaeURE-TABLETTE UND AB INS BETT ZUM SCHWITZEN. GUTE NACHT", -}, -{ - // 0 - "", - "MA\327TRE, JE CROIS QUE \200A NE ROULE PAS", - "J'EN SUIS TR\324S S\352R, MA\327TRE...", - "JE LE REGRETTE, MA\327TRE", - "IL APPORTERA UN AUTRE DE SCIENTIFIQUE FOU? JE VOUS PRVIENS QUE LE LABORATOIRE EN EST PLEIN ET TOUS SONT PRIMS", - // 5 - "TAISEZ-VOUS, MA\327TRE, SI LES FMINISTES VOUS COUTENT...", - "CE QU'IL FAUT SUPPORTER!", - "MA\327TRE! -JE NE VOUS ATTENDAIT PAS SI T\342T!", - "A VA MAL MA\327TRE. IL DOIT AVOIR DES PROBL\324MES AVEC LE SATELLITE ET JE NE RUSSIT PAS \267 SINTONISER L'IMAGE. ET ENCORE L'ORAGE PRODUIT DES INTERFRENCES.", - "CANCANS QUE TOUT CELA, MA\327TRE!", - // 10 - "OUI, MA\327TRE", - "MA\327TRE", - "QUELLE HEURE IL EST?", - "H\220? -AH! TU M'AS FAIT PEUR! TU EST CELUI DU \"NETTOYAGE DE NUIT\", NON?", - "JE SUIS IGOR, LE MAJORDOME. TU PEUX COMMENCER PAR LE SALON DE BAL. HIER IL Y A EU UNE ORGIE SURNATURELLE ET C'EST UNE SALOPERIE", - // 15 - "SI TU AS BESOIN DE QUELQUE CHOSE, ACHETE-EN!", - "LA D\220CLARATION D'IMP\342TS, NE LE VOIS-TU PAS?", - "EH BIEN, MOI NON PLUS, CAR \267 CAUSE DE SI PETITS NUM\220ROS ET MA DIFFICULT\220 POUR BIEN VOIR DE LOIN...", - "ON N'EN PARLE PLUS! ILS ME FONT PARA\327TRE LAID", - "BAH! C'EST UNE BELLE F\322TE QUE LE MA\327TRE ORGANISE AVEC SES COLL\324GUES \267 CHAQUE FOIS QU'UN IMB\220CILE ARRIVE ET VEUT FINIR AVEC LUI", - // 20 - "D'ABORD ON LUI ARRACHE LES YEUX; APR\324S, ON LUI VERSE DE JUS DE CITRON POUR QUE \200A LUI CUISE; APR\324S...", - "NON", - "POURQUOI PAS? TU AS VU L'HEURE QU'IL EST?", - "EN HIVER, OUI", - "AU REVOIR", - // 25 - "N'Y PENSES M\322ME PAS!", - "BON, \200A VA POUR AUJOURD'HUI. JE VAIS D\327NER", - "J'OUBLIE TOUJOURS FERMER \267 CL\220, H\220LAS!", - "QUEL ENNUI!", - "H\220? -VOUS M'AVEZ FAIT PEUR, MA\327TRE. JE PENSAIS QUE VOUS DORMIEZ", - // 30 - "H\220, MA\327TRE! PRENEZ LES CL\220S DE LA SALLE DE S\220JOUR, AINSI DONC SI VOUS VOULEZ VOIR LES DESSINS ANIM\220S DEMAIN DE BONNE HEURE NE ME D\220RANGEREZ PAS", - "QUOI? VOUS VOUS \322TES ENRHUM\220 ENCORE UNE FOIS, MA\327TRE? QUELLE CONTRARI\220T\220! JE VOUS AI D\220J\267 DIT D'Y METTRE LE CHAUFFAGE... ", - "BON, AVALEZ UN COMPRIM\220 D'ACIDEAC\220TYL SALICYLIQUE ET ALLEZ TRANSPIRER! BONNE NUIT!", -}, -{ - // 0 - "", - "MAESTRO, CREDO CHE QUESTO NON VA", - "SICURISSIMO, MAESTRO", - "SCUSI, MAESTRO", - "VA A PORTARE UN ALTRO SCIENTIFICO PAZZO? GLI AVVERTO CHE IL LABORATORIO PIENO E NE ABBIAMO TUTTI SCADUTI", - // 5 - "ZITTO, MAESTRO, FIGURASI SE LE SENTONO LE FEMMINISTE", - "ACCIDENTI!", - "-MAESTRO! NON LE ASPETTAVO COS\326 PRESTO!", - "MALE MAESTRO, DEVONO CI ESSERE PROBLEMI CON IL SATELLITE E NON RIESCO A SINTONIZZARE L'IMMAGINE. ANZI LA TEMPESTA CAUSA INTERFERENZE", - "CHE NE SO, MAESTRO", - // 10 - "SI, MAESTROl", - "MAESTRO", - "SA CHE ORE SONO?", - "EH? -AH, CHE COLPO! TU SEI QUELLO DI \"PULIZIA NOTTURNA\" NO?", - "IO SONO IGOR, IL MAGGIORDOMO. PUOI COMINCIARE NEL SALOTTO DI BALLO, IERI C'ERA ORGIA SOPRANATURALE ED \220 PIENO DI MERDA", - // 15 - "SE HAI BISOGNO DI QUALCOSA, COMPRALA", - "LA DECLARAZIONE DI REDDITI, NON VEDI?", - "NEANCH'IO, I NUMERI SONO PICCOLISSIMI E ANZI, IO NON VEDO BENE DA LONTANO", - "NEANCHE PARLARNE, MI FANNO SEMBRARE BRUTTO", - "\220 UNA FESTA CHE FA IL MAESTRO PER I SUOI AMICI OGNI VOLTA CHE ARRIVA QUALCHE IMBECILE CHE VUOLE FINIRE CON LUI", - // 20 - "PRIMA, GLI TOGLIANO GLI OCCHI; POI GLI VERSANO SUCCO DI LIMONE, DOPO IL BRUCIORE.......", - "NO", - "COME CHE PER CHE NO? MA TU HAI VISTO CHE ORE SONO?", - "IN INVERNO, SI", - "ARRIVEDERCI", - // 25 - "N\324 PENSARCI", - "BENE, BASTA PER OGGI. VADO A CENARE", - "E CHE SEMPRE DIMENTICO CHIUDERE CON LA CHIAVE", - "ACCIDENTI!", - "EH? -AH! CHE COLPO, MAESTRO, PENSAVO STAVA DURMENDO", - // 30 - "ORA MI RICORDO, PRENDA LE CHIAVI DEL SOGGIORNO, COS\326 DOMANI MATTINA NON MI DISTURBA SE VUOLE GUARDARE I CARTONI ANIMATI", - "HA PRESSO FREDDO UN'ALTRA VOLTA, MAESTRO? SEMPRE GLI DICO CHE METTA IL RISCALDAMENTO", - "PRENDA UNA ASPIRINA ED A SUDARE. BUONA NOTTE", -}, -}; - - -const char *_textl[][32] = { -{ - // 0 - "", - "ARE YOU GOING TO LET OURSELVES BE GUIDED BY PRIMITIVE INSTINCTS JUST BECAUSE WE BELONG TO DIFFERENT RACES AND THE SOCIAL SITUATION IS TELLING US TO DO SO?", - "AREN'T WE TIED BY SENSE WHICH IS THE MOST POWERFUL WEAPON AS WELL AS THE MOST PRECIOUS GIFT?", - "OH, IF WE ALL LET OUR THOUGHTS GUIDE OUR WAY IN LIFE WITHOUT LEAVING SOME ROOM FOR FEELINGS WHICH LET OUR PRE-EVOLUTIVE INSTINCTS COME OUT!", - "ANSWER ME, EPHEMERAL CREATURE. WOULDN'T WE ALL BE HAPPIER WITH THOSE EMOTIONAL BOUNDINGS?", - // 5 - "YOU ARE NOT GETTING THROUGH", - "THIS IS A VERY CLEAR EXAMPLE, YOU SEE?: YOU WANT TO GET THROUGH AND GO AHEAD WITH YOUR ADVENTURE, AND I WON'T LET YOU DO THAT", - "WILL THAT BE A CONTROVERSIAL POINT BETWEEN US THAT HAVE JUST MET?", - "WELL THEN", - "WELL, THAT DEPENDS ON WHAT WE TAKE A RELATIONSHIP FOR. SOME AUTHORS DEFEND...", - // 10 - "PUKE! HUNTING AS A WAY TO SURVIVE IS AN INCOMPATIBLE ARCHAIC THING FOR A SUPERIOR BEING LIKE ME. BESIDES, I'VE BECOME A VEGETARIAN", - "IT JUST HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO BETHINK AND GET TO THE ABOVE MENTIONED THOUGHT", - "IT TOOK ME A LONG TIME TO QUIT OLD HABITS BUT AT LEAST MY IRASCIBLE SOUL BIT UP THE CONCUPISCIBLE ONE, AND EVER SINCE, I'VE NEVER EATEN MEAT AGAIN", - "NOT EVEN THE PLEASURE OF SUCKING UP THE BONE, FEELING THE TASTE OF THE SKIN AND THAT SWEET TASTE OF MARROW...THAT JUST TAKES YOU TO HEAVENLY PLACES", - "IT DOESN'T REALLY GET TO ME AT ALL", - // 15 - "WHAT?", - "I DON'T KNOW WHAT YOU'RE TALKING ABOUT, YOU EPHEMERAL CREATURE", - "I'M NOT INTERESTED", - "I DON'T KNOW ABOUT THE OTHER GAMES, BUT WE COULD USE THIS BEAUTIFUL SCREEN", - "", - // 20 - "I'D CARE...", - "NO. IT'S JUST THE SON, THE FATHER, THE GRANDFATHER AND A FRIEND, WHO ARE CALLED LIKE THAT", - "BUT, IT IS GOING TO LOOK LIKE THE GAME WAS MADE BY FIVE PEOPLE", - "THESE ARE PROMISING GUYS", - "THAT'S A GOOD ONE! A GOOD ONE!", - // 25 - "PLEASE, CALL ME CONSTANTINO", - "IT WASN'T ME MAN. IT WAS \"EL COYOTE\", MY TWIN", - "JESUS, THESE ARE REALLY LONG CREDIT TITLES", - "I STOPPED COUNTING A LONG TIME AGO", - "WHAT WILL BECOME OF YOU NOW, DESIDERIO?", - // 30 - "BUT, YOU SHOULD LOSE SOME WEIGHT", - "I'LL JUST RETIRE TO THE TIBET AND THINK ABOUT THE MEANING OF LIFE", -}, -{ - // 0 - "", - "UN MOMENTO. \250SOLO PORQUE PERTENECEMOS A RAZAS DISTINTAS Y LA SOCIEDAD DICE QUE SEREMOS ENEMIGOS VAMOS A DEJARNOS LLEVAR POR NUESTROS MAS PRIMITIVOS INSTINTOS?", - "\250ACASO NO NOS UNE LA RAZON, ELARMA MAS PODEROSA Y, A LA VEZ, EL DON MAS PRECIADO QUE TENEMOS?", - "\255AH, SI EL ENTENDIMIENTO GUIARA NUESTROS PASOS POR LA VIDA SIN DEJAR SITIO A LOS SENTIMIENTOS, QUE AFLORAN NUESTRAS INCLINACIONES PRE-EVOLUTIVAS!", - "\250NO CREES QUE SERIAMOS MAS DICHOSOS SIN ESAS ATADURAS EMOCIONALES? CONTESTA EFIMERA CRIATURA", - // 5 - "NO PASAS", - "\250VES? ESTE ES UN CLARO EJEMPLO: TU QUIERES PASAR Y CONTINUAR TU AVENTURA Y YO NO PUEDO PERMITIRLO", - "\250HA DE SER ESE MOTIVO SUFICIENTE DE CONFLICTO ENTRE NOSOTROS, QUE NO NOS CONOCEMOS DE NADA?", - "PUES ESO", - "BUENO, ESO DEPENDE DE LO QUE ENTENDAMOS POR RELACION. ALGUNOS AUTORES DEFIENDEN...", - // 10 - "AGGG. LA CAZA COMO MEDIO DE SUBSISTENCIA ES UNA ACTIVIDAD ARCAICA INCOMPATIBLE CON UNA NATURALEZA SUPERIOR COMO LA MIA. Y ADEMAS ME HE VUELTO VEGETARIANO", - "RESULTA QUE ESTABA COMIENDOME A UN TIO Y ME PUSE A REFLEXIONAR. LLEGUE A LA CONCLUSION ANTES MECIONADA", - "ME COSTO MUCHO DEJAR LOS HABITOS DESDE TANTO TIEMPO ADQUIRIDOS, PERO POR FIN MI ALMA IRASCIBLE VENCIO A LA CONCUPISCIBLE Y NO HE VUELTO A PROBAR LA CARNE", - "NI SIQUIERA EL PLACER QUE SUPONE UN HUESO, CON EL JUGO DE LA PIEL ENTRE SUS POROS Y ESE SABOR QUE TE TRANSPORTA A LUGARES REMOTOS PARADISIACOS...", - "NI SIQUIERA ME AFECTA. PARA NADA, DE VERDAD", - // 15 - "\250EL QUE?", - "NO SE DE QUE ME HABLAS, EFIMERA CRIATURA", - "NO ME INTERESA", - "LOS DEMAS JUEGOS, NO SE, PERO ESTE PARA APROVECHAR ESTA PANTALLA TAN BONITA", - "", - // 20 - "A MI SI ME DARIA", - "NO, ES QUE SON EL ABUELO, EL PADRE, EL HIJO, Y UN AMIGO QUE SE LLAMA ASI", - "NO, PERO ES QUE SI NO VA A PARECER QUE HAN HECHO EL JUEGO ENTRE CINCO", - "ESTOS CHICOS PROMETEN", - "\255ESE ES BUENO, ESE ES BUENO!", - // 25 - "LLAMAME CONSTANTINO", - "NO ERA YO, HOMBRE. ERA MI DOBLE, EL COYOTE", - "VAYA, QUE CREDITOS MAS LARGOS", - "YO YA PERDI LA CUENTA", - "BUENO DESIDERIO, \250Y QUE VA A SER DE TI AHORA?", - // 30 - "PERO TENDRIAS QUE ADELGAZAR", - "ME RETIRARE AL TIBEL A REFLEXIONAR SOBRE EL SENTIDO DE LA VIDA", -}, -{ - // 0 - "", - "MOMENT mal. NUR WEIL WIR UNTERSCHIEDLICHER HERKUNFT SIND UNd eigentlich feinde sein muessten mueSSEN WIR UNS DOCH Nicht wie die primaten auffuehren!", - "VERBINDET UNS ETWA NICHT DIE VERNUNFT, GEFaeHRLICHSTE WAFFE UND ZUGLEICH GRoeSSTE GABE, DIE WIR HABEN ?", - "AH, WENN NUR DAS GEGENSEITIGE VERSTaeNDNIS die gefuehle besiegen koennte,DIE DIE WURZEL UNSERER PRaeHISTORISCHEN NEIGUNGEN SIND!", - "GLAUBST DU NICHT, DASS WIR OHNE DIESE GEFueHLSFESSELN GLueCKLICHER WaeREN ? ANTWORTE, DU EINTAGSFLIEGE", - // 5 - "DU KOMMST NICHT DURCH", - "SIEHST DU ? DU WILLST HIER DURCH UND MIT DEM ABENTEUER WEITERMACHEN UND ICH KANN DAS NICHT ZULASSEN", - "MUSS DENN DIE TATSACHE, DASS WIR UNS NICHT KENNEN, ANLASS ZUM STREIT SEIN?", - "GENAU", - "NAJA. KOMMT DARAUF AN, WAS WIR UNTER BEZIEHUNG VERSTEHEN. EINIGE VERTRETEN JA DEN STANDPUNKT, DASS....", - // 10 - "ARRGH.nur zu jagen, um zu ueberleben ist mir zu primitiv.UND AUSSERDEM BIN ICH SEIT KURZEM VEGETARIER", - "ES GING LOS,ALS ICH MIR GERADE EINEN TYPEN EINVERLEIBTE UND ANFING NACHZUDENKEN UND ZUM EBENERWaeHNTEN SCHLUSS KAM", - "ES war hart, DIE ALTEN laster ABZULEGEN, ABER seit MEINE FLEISCHESLUST MEINEn JaeHZORN besiegt hat HABE ICH KEIN FLEISCH MEHR GEGESSEN:", - "NICHT MAL DIE GAUMENFREUDE EINES KNOCHENS, MIT DEM SAFT DER HAUT IN DEN POREN UND DIESEm GESCHMACK DER DICH INS REICH DER SINNE ENTFueHRT...", - "ES MACHT MIR ueBERHAUPT NICHTS AUS, WIRKLICH", - // 15 - "WAS JETZT ?", - "ICH WEISS NICHT, WOVON DU REDEST, DU EINTAGSFLIEGE", - "DAS INTERESSIERT MICH NICHT", - "ANDERE SPIELE, ACH ICH WEISS NICHT, ABER DAS HIER HAT SO EINE NETTE GRAFIK", - "ICH HaeTTE SCHON LUST..", - // 20 - "NEIN, SO HEISSEN DER OPA, DER VATER, DER SOHN UND EIN FREUND.", - "NEIN, ABER WENN NICHT, SIEHT ES SO AUS ALS WaeRE DAS SPIEL VON FueNF LEUTEN GEMACHT WORDEN", - "DIESE JUNGS SIND VIELVERSPRECHEND !", - "DER IST GUT, SUPERKLASSE !", - "NENN MICH KONSTANTIN", - // 25 - "MANN, DAS WAR NICHT ICH, SONDERN MEIN DOUBLE, DER KOYOTE", - "WOW, WAS FueR EINE LANGE DANKESLISTE", - "ICH HAB SCHON DEN ueBERBLICK VERLOREN", - "O.K. DESIDERIO, UND WAS WIRD JETZT AUS DIR WERDEN ?", - "ABER DANN MueSSTEST DU ABNEHMEN", - // 30 - "ICH WERDE NACH TIBET AUSWANDERN UND ueBER DEN SINN DES LEBENS NACHDENKEN", -}, -{ - // 0 - "", - "c'est parce qu'on APPARTIENT \267 DES RACES DIFF\220RENTES ET QUE LA SOCI\220T\220 NOUS CONFRONTE, QUE NOUS ALLONS AGIR PAR NOS PLUS M\220PRISABLES INSTINCTS?", - "NE SOMMES-NOUS PAR HASARD ACCROCHS PAR LA RAISON, L'ARME LA PLUS PUISSANTE, ET AUSSI LE DON LE PLUS PRCIEUX QUE NOUS AVONS?", - "AH!, SI LA RAISON GUIDAIT NOS PAS DANS LA VIE SANS Y ENTRA\327NER LES SENTIMENTS, QUI FONT JAILLIR NOS INCLINAISONS PR-VOLUTIVES!", - "NE CROIS-TU PAS QUE NOUS SERIONS PLUS HEREUX SANS CES ATTACHEMENTS-L\267? RPONDS-MOI, CRATURE PHM\324RE ", - // 5 - "TU NE PASSES PAS", - "TU VOIS? C'EST UN EXEMPLE CLAIR: TOI, TU VEUX PASSER ET POURSUIVRE TON AVENTURE ET MOI, JE NE PEUX PAS LE TOLRER", - "CELA DOIT \322TRE UNE RAISON SUFFISANTE DE CONFLIT ENTRE NOUS DEUX, QUI NE NOUS CONNAISSONS DE RIEN?", - "C'EST CELA", - "EH BIEN, CELA DPEND DE CE QU'ON ENTEND PAR RLATION. D'APR\324S QUELQUES AUTEURS...", - // 10 - "LA CHASSE COMME MOYEN DE SUBSISTANCE EST UNE ACTIVIT\220 ARCHA\330QUE, INCOMPATIBLE AVEC ma NATURE SUP\220RIEURE . ET DE PLUS JE SUIS DEVENU V\220G\220TARIEN", - "IL S'EN SUIT QU'EN TRAIN DE D\220VORER UN TYPE, JE ME SUIS MIS \267 R\220FL\220CHIR. ALORS, SUIS ARRIV\220 \267 LA CONCLUSION MENTIONN\220 CI-DESSUS", - "ABANDONNER CES HABITUDES M'EST REVENU CHER, MAIS \267 LA FIN MON \266ME IRASCIBLE a vancue MON \266ME CONCUPISCIBLE, ET D\324S LORS JE N'AI GO\352T\220 \267 LA VIANDE", - "M\322ME PAS LE PLAISIR DE CROQUER UN OS, AVEC LE SUC DE LA PEAU ENTRE SES PORES ET sa SAVEUR QUI TE TRANSPORTE VERS DES LIEUX TR\324S LONTAINS, PARADISIAQUES...", - "CECI NE M'AFFECTE PAS M\322ME, ABSOLUMENT PAS, C'EST VRAI", - // 15 - "QUOI?", - "JE NE SAIS PAS DE QUOI TU M'EN PARLES, CR\220ATURE \220PH\220M\324RE", - "CELA NE ME REGARDE PAS", - "LES AUTRES JEUX, JE NE SAIS PAS; MAIS CELUI-CI OUI, POUR EN PROFITER DE CET \220CRAN SI JOLI", - "", - // 20 - "MOI, JE NE M'EN FICHERAI PAS", - "NON, C'EST QU'ILS SONT LE GRAND-P\324RE, LE P\324RE, LE FILS, ET UN AMI QUI S'APPELLE COMME \200A", - "NON, MAIS SI NON, IL VA PARA\327TRE QU'ON A FAIT LE JEU ENTRE CINQ", - "CES GAR\200ONS ONT DU FUTUR", - "CELUI-L\267 EST BON! CELUI-L\267 EST BON!", - // 25 - "APPELLE-MOI CONSTANTIN", - "CE N'\220TAIT PAS MOI, MON VIEUX. C'\220TAIT MON DOUBLE, LE COYOTE", - "TIENS! QUELS CR\220DITS SI LONGS", - "J'AI D\220J\267 PERDU LES COMPTES", - "EH BIEN, D\220SID\324RE, QUE T'ARRIVERA-T-IL MAINTENANT?", - // 30 - "MAIS TU DEVRAIS MAIGRIR", - "JE VAIS ME RETIRER AU TIBEL POUR Y R\220FL\220CHIR SUR LE SENS DE LA VIE", -}, -{ - // 0 - "", - "UN ATTIMO. PERCHE SIAMO DI DIVERSE RAZZE E LA SOCIET\265 DICA CHE SIAMO NEMICI, ANDIAMO A LASCIARCI DOMINARE PER I PI\351 PRIMITIVI ISTINTI?", - "MA NON SIAMO UNITI DALLA RAGIONE, DALLA ARMA PI\351 PODEROSA E ANCHE PER IL DONO PI\351 PREZIOSO CHE ABBIAMO?", - "SE IL GIUDIZIO GUIDASSE I NOSTRI PASSI NELLA VITA SENZA LASCIARE POSTO AI SENTIMENTI, CHE MOSTRANO LE NOSTRE INCLINAZIONI PRE-EVOLUTIVI!", - "NON CREDI CHE SAREMMO PI\351 BEATI SENZA QUESTO LEGAME EMOZIONALE? RISPONDE EFFIMERA CREATURA", - // 5 - "NON PASSI", - "VEDI? QUESTO UN CHIARO ESEMPIO: TU VUOI PASSARE E PROSEGUIRE LA TUA AVVENTURA ED IO NON POSSO PERMETTERLO", - "MA DEVE ESSERE CAUSA DI CONFRONTO QUANDO ANCORA NON CI CONOSCIAMO?", - "CHE TI HO DETTO?", - "BOH, DIPENDE DI CHE CAPIAMO COME RELAZIONE. CI SONO AUTORI CHE DIFENDONO...", - // 10 - "LA CACCIA COME FORMA DI SUSSISTENZA \220 UNA ATTIVIT\265 ARCAICA, INCOMPATIBILE CON UNA NATURA SUPERIORE COM'\220 LA MIA: ADESSO SONO VEGETARIANO", - "TEMPO FA, STAVO MANGIANDO UN TIZIO QUANDO MI SONO MESSO A RIFLETTERE. FU QUANDO LA CONCLUSIONE DI PRIMA ARRIV\220 ", - "FU DIFFICILE LASCIARE LE MIE VECCHIE ABITUDINI, MA LA MIA ANIMA IRASCIBILE HA VINTO LA CONCUPISCIBILE E NON MANGIO PI\351 DELLA CARNE", - "NEPPURE IL PIACERE CHE FA UN OSSO, COL SUCCO DELLA PELLE E QUEL SAPORE CHE TI PORTA A POSTI LONTANI E PARADISIACI...", - "NEMMENO MI TOCCA DA VICINO, DAVVERO", - // 15 - "CHE COSA?", - "NON SO SU CHE MI PARLI, EFFIMERA CREATURA", - "NON MI INTERESA", - "GLI ALTRI VIDEO-GIOCHI, NON SO, MA QUESTO \220 PER APPROFITTARE QUESTO BELLO SCHERMO", - "", - // 20 - "IO SI ME VERGOGNAREI", - "NO, SONO IL NONNO, IL PADRE, IL FIGLIO, E UN AMICO CHE SI CHIAMA COS\326 ", - "NO, MA SE NON \220 COS\326, SEMBRAR\265 CHE HANNO FATTO IL VIDEO-GIOCO IN CINQUE", - "BRAVI RAGAZZI", - "-QUELLO \220 BUONO, QUELLO \220 BUONO!", - // 25 - "CHIAMAMI COSTANTINO", - "NON ERO IO, DAI,. ERA IL MIO CONTROFIGURA, IL COYOTE", - "INSOMMA, MOLTI TITOLI DI CODA", - "IO NON SO GI\265 QUANTI", - "ALLORA PEPPINO, CHE VAI FARE ADESSO?", - // 30 - "MA DOVRESTI DIMAGRIRE", - "MI APPARTER\220 AL TIBET A RIFLETTERE SUL SENSO DELLA VITA", -}, -}; - -const char *_textp[][20] = { -{ - // 0 - "", - "HI", - "YES SIR. IT'S BEAUTIFUL", - "NO, NO. HE WON'T DO IT", - "ALL RIGHT THEN", - // 5 - "REALLY?", - "SO?", - "I'M SORRY. THE PIANIST UNION TRADE DOESN'T ALLOW ME TO SAVE GIRLS FROM VAMPIRES' CLUTCHES", - "IF SHE HAD BEEN KIDNAPPED BY THE WEREWOLF...", - "I CAN ONLY PLAY THIS SONG", - // 10 - "I'M A CONSERVATOIRE PIANIST AND THE BARTENDER WON'T BUY MORE SCORES FOR ME", - "OH GOD, I REALLY LOVE CLASSIC MUSIC!", - "IT'S BECAUSE I'M WEARING EAR-PLUGS", - "IT'S BECAUSE I CAN LIP-READ", - "NOOO", - // 15 - "NO! I'M NOT TAKING THIS ANY LONGER!", - "NO WAYYYYY!", - "WHAT? OF COURSE I'M INTERESTED", - "THANKS GOD! I CAN PLAY A DIFFERENT SONG NOW!", - "I GUESS YOU CAN KEEP MY EAR-PLUGS", -}, -{ - // 0 - "", - "HOLA", - "BONITA. SI SE\245OR", - "NO QUE NO LO HACE", - "PUES VALE", - // 5 - "\250SI?", - "\250Y?", - "LO SIENTO. EL SINDICATO DE PIANISTAS NO ME PERMITE RESCATAR CHICAS DE LAS GARRAS DE LOS VAMPIROS", - "SI LA HUBIERA RAPTADO UN HOMBRE LOBO...", - "NO PUEDO TOCAR MAS QUE ESTA CANCION", - // 10 - "ES QUE SOY PIANISTA DE CONSERVATORIO Y EL TABERNERO NO COMPRA MAS PARTITURAS", - "\255CON LO QUE A MI ME GUSTA LA MUSICA CLASICA!", - "PORQUE LLEVO TAPONES EN LOS OIDOS", - "PORQUE LEO LOS LABIOS", - "NOOO", - // 15 - "\255QUE NO! \255QUE NO ME AGUANTO!", - "\255QUE NOOOOOO!", - "\250QUE? CLARO QUE ME INTERESA", - "AHORA PODRE TOCAR OTRA CANCION \255QUE ALIVIO!", - "SUPONGO QUE TE PUEDES QUEDAR CON MIS TAPONES", -}, -{ - // 0 - "", - "HALLO", - "JAWOLL, SEHR SCHoeN", - "NEIN, ER TUT ES EINFACH NICHT", - "NA GUT, OK.", - // 5 - "JA ?", - "UND ?", - "TUT MIR LEID. DIE KLAVIERSPIELERGEWERKSCHAFT ERLAUBT ES MIR NICHT, MaeDCHEN AUS DEN KLAUEN VON VAMPIREN ZU BEFREIEN", - "WENN SIE WERWOLF ENTFueHRT HaeTTE.....", - "ICH KANN NUR DIESES EINE LIED", - // 10 - "ICH HABE AM KONSERVATORIUM KLAVIER GESPIELT UND DER WIRT WILL MEINE PARTITueDEN NICHT KAUFEN", - "WO MIR DOCH KLASSISCHE MUSIK SO GUT GEFaeLLT !", - "WEIL ICH OHRENSToePSEL IN DEN OHREN HABE", - "WEIL ICH VON DEN LIPPEN LESEN KANN", - "NEEEIN", - // 15 - "NEEIEN! ICH KANN MICH NICHT BEHERRSCHEN !", - "NEIN,NEIN,UND NOCHMAL NEIN !", - "WIE BITTE ? KLAR BIN ICH INTERESSIERT", - "ENDLICH KANN ICH WAS ANDERES SPIELEN,WELCH ERLEICHTERUNG !", - "ICH GLAUBE, DU KANNST MEINE OHRENSToePSEL BEHALTEN", -}, -{ - // 0 - "", - "BONJOUR!", - "JOLIE, OUI M'SIEUR", - "NON, QU'ELLE NE LE FAIT PAS", - "D'ACCORD, A VA", - // 5 - "OUI?", - "ET QUOI?", - "SUIS DSOL. LE SYNDICAT DE PIANISTES NE ME PERMET PAS DE LIBRER LES FILLES DES GRIFFES DE VAMPIRES", - "SI ELLE AVAIT T RAPTE PAR UN HOMME-LOUP...", - "JE NE PEUX PAS JOUER DAVANTAGE CETTE CHANSON", - // 10 - "JE SUIS LE PIANISTE DU CONSERVATOIRE ET LE TAVERNIER N'ACH\324TE PAS MES PARTITIONS", - "ET MOI QUI AIME BEAUCOUP LA MUSIQUE CLASSIQUE!", - "PARCE QUE J'AI DES TAMPONS \267 L'OU\330E", - "PARCE QUE JE LIS LES LEVRES", - "NOOON!", - // 15 - "QUE NON! QUE JE NE PEUX PAS ME RETENIR DAVANTAGE!", - "QUE NOOOOOON!", - "QUOI? BIEN S\352R QUE \200A M'INT\220RESSE", - "MAINTENANT JE POURRAI JOUER UNE AUTRE CHANSON -QUEL SOULAGEMENT!", - "TU PEUX GARDER MES TAMPONS, JE SUPPOSE", -}, -{ - // 0 - "", - "CIAO", - "BELLA, MOLTO BELLA", - "NO, CHE NON LO FA", - "VA BENE", - // 5 - "-SI?", - "E?", - "MI DISPIACE. IL SINDACATODI PIANISTI NON MI DA PERMESSO PER LIBERARE RAGAZZE DALLE MANI DI VAMPIRI", - "SE LA AVESSE SEQUESTRATA IL LUPO-MANNARO...", - "SOLTANTO POSSO SUONARE QUESTA CANZONE", - // 10 - "\324 PERCHE SONO PIANISTA DI CONSERVATORIO E IL TABERNERO NON COMPRA PI\353 PARTITURE", - "PECCATO.....MI PIACE MOLTISSIMO LA MUSICA CLASSICA!", - "PERCHE MI HO MESSO TAPPI NEGLI ORECCHII", - "PERCHE SO LEGGERE LE LABRA", - "NOOO", - // 15 - "NO!, NON MI SOPPOROTO!", - "HO DETTO DI NOOO!", - "COSA? SI, SI MI INTERESA, COME NO", - "ADESSSO POTR\343 SUONARE UN'ALTRA CANZONE, GRAZIE!!", - "CREDO CHE I MIEI TAPPI ADESSO SONO TUOI", -}, -}; - - -const char *_textt[][25] = { -{ - // 0 - "", - "WHAT HAPPENS, WHAT'S THE MATTER?", - "OK. ROOM 512. UPSTAIRS. THE KEY IS ON THE DOOR", - "COUNT DRASCULA!!?", - "NO, NOTHING. THAT GUY HAS A BAD REPUTATION OVER HERE", - // 5 - "WELL, THERE ARE ALL KINDS OF STORIES GOING AROUND ABOUT HIM, SOME SAY HE IS A VAMPIRE WHO KIDNAPS PEOPLE TO SUCK UP THEIR BLOOD", - "HOWEVER, SOME OTHERS SAY THAT HE IS JUST AN ORGAN-DEALER AND THAT IS THE REASON WHY THERE ARE BODY PARTS ALL OVER THE PLACE", - "BUT OF COURSE, THOSE ARE JUST RUMORS. HE'S PROBABLY BOTH THINGS. BY THE WAY, WHY DO YOU WANT TO MEET HIM?", - "NO, FORGET IT. I'M REALLY BUSY...", - "WELL, OK. BUT JUST BECAUSE I WANT TO DO IT, NOT BECAUSE YOU TELL ME TO", - // 10 - "THEY'RE WINNING", - "LEAVE ME ALONE, ALL RIGHT?", - "OF COURSE. I'M NOT BLIND", - "THE TRADITION IN THIS VILLAGE IS TO FORGET ALL HARD FEELINGS WHENEVER THERE IS A GAME, SO AS TO CHEER UP THE LOCAL TEAM", - "AND PLEASE, SHUT UP FOR GOD'S SAKE. I CAN'T HEAR ANYTHING!", - // 15 - "COME ON, LEAVE ME ALONE AND DON'T BOTHER ME ANYMORE", - "IT HAS JUST STARTED! AND SHUT UP!", - "OK, OK, I THOUGHT SOMETHING WAS GOING ON", - "IT DOESN'T MATTER, ANYWAY. SHE'LL PROBABLY BE DEAD BY NOW", - "HE JUST STARTED PLAYING CLASSIC MUSIC, AND I COULDN'T STAND IT", - // 20 - "SINCE I'M PAYING HIM FOR PLAYING WHATEVER I WISH, I JUST FIRED HIM", - "AND THEN, HE GOT FRESH WITH ME. JESUS!, HE LOOKED SO NICE AND INNOCENT...WHAT A HYPOCRITE!", - "BY THE WAY, BE CAREFUL BECAUSE I JUST WAXED THE FLOOR", - "SHUT UP! WE'RE WATCHING THE GAME!", - "OH, COME ON! TAKE IT!", -}, -{ - // 0 - "", - "\250QUE PASA, QUE PASA?", - "DE ACUERDO. HABITACION 512. SUBIENDO POR LAS ESCALERAS. LA LLAVE ESTA EN LA PUERTA", - "\255\250 EL CONDE DRASCULA ?!", - "NO, NADA. ESE TIPO TIENE MALA FAMA POR AQUI", - // 5 - "BUENO, CORREN VARIOS RUMORES SOBRE EL. ALGUNOS DICEN QUE ES UN VAMPIRO Y VA SECUESTRANDO GENTE PARA CHUPARLES LA SANGRE", - "CLARO, QUE OTROS OPINAN QUE SOLO ES UN TRAFICANTE DE ORGANOS, Y POR ESO APARECE GENTE DESCUARTIZADA POR LOS ALREDEDORES", - "POR SUPUESTO SON SOLO RUMORES. LO MAS PROBABLE ES QUE SEA LAS DOS COSAS. POR CIERTO, \250PARA QUE QUIERE USTED VER A ESE TIPO?", - "NO DEJELO, QUE ES QUE TENGO MUCHO QUE HACER...", - "BUENO VALE, PERO PORQUE QUIERO YO, NO PORQUE LO DIGAS TU", - // 10 - "VAN GANANDO", - "DEJAME EN PAZ, \250VALE?", - "PUES CLARO, NO SOY CIEGO", - "ES TRADICION EN EL PUEBLO QUE CUANDO HAY PARTIDO SE OLVIDAN RENCORES PARA ANIMAR A LA SELECCION", - "Y CALLATE YA DE UNA VEZ, QUE NO ME DEJAS OIR", - // 15 - "ANDA, DEJAME EN PAZ Y NO MOLESTES", - "\255ACABA DE EMPEZAR! \255Y CALLATE!", - "AH, BUENO. CREIA QUE PASABA ALGO", - "NO, SI ES IGUAL. A ESTAS HORAS YA ESTARA MUERTA", - "ES QUE SE PUSO A TOCAR MUSICA CLASICA Y YO NO LA AGUANTO", - // 20 - "Y COMO YO LE PAGO PARA QUE TOQUE LO QUE YO QUIERO, PUES LE HE ECHADO", - "Y ENCIMA SE ME PUSO CHULO... \255Y PARECIA UNA MOSQUITA MUERTA!", - "...POR CIERTO, TENGA CUIDADO. EL SUELO ESTA RECIEN ENCERADO", - "\255SILENCIO! \255ESTAMOS VIENDO EL PARTIDO!", - "\255VENGA, ANDA! TOMA.", -}, -{ - // 0 - "", - "WAS ZUM TEUFEL IST LOS ?", - "O.K. ZIMMER 512. DIE TREPPE HOCH. DIE SCHLueSSEL STECKEN SCHON", - " GRAF DRASCULA ? !", - "NEIN, DER TYP HAT HIER EINEN SCHLECHTEN RUF", - // 5 - "NAJA, ES GIBT MEHRERE GERueCHTE ueBER IHN. EINIGE BEHAUPTEN, DASS ER LEUTE ENTFueHRT UND IHNEN DAS BLUT AUSSAUGT", - "KLAR, ANDERE GLAUBEN, DASS ER EIN ORGANHaeNDLER IST UND DESHALB TAUCHEN ueBERALL AM WALDRAND ZERSTueCKELTE LEICHEN AUF", - "NATueRLICH SIND DAS ALLES NUR GERueCHTE. HoeCHSTWAHRSCHEINLICH STIMMEN SIE ABER. ACH, UND WAS WOLLEN SIE VON IHM ?", - "NEIN, VERGESSEN SIES. ICH HABE NaeMLICH ZU TUN...", - "O.K. ABER WEIL ICH DAS WILL UND NICHT WEIL DU DAS SAGST", - // 10 - "SIE GEWINNEN", - "LASS MICH IN RUHE, OK ?", - "KLAR, ICH BIN DOCH NICHT BLIND", - "ES IST EIN ALTER BRAUCH IM DORF, DASS MAN BEI EINEM SPIEL ALTE ZWISTE VERGISST, UM DIE MANNSCHAFT ANZUFEUERN", - "UND HALT ENDLICH DEINEN MUND, ICH WILL ZUHoeREN", - // 15 - "MANN, LASS MICH IN RUHE UND NERV MICH NICHT", - "ES FaeNGT GERADE AN ! STILL JETZT !", - "ACH SO, ICH DACHTE ES IST IRGENDWAS LOS", - "NEIN, IST DOCH EGAL. JETZT WIRD SIE EH SCHON TOT SEIN", - "ER HAT KLASSIK GESPIELT UND ICH HALTE DAS NICHT AUS", - // 20 - "UND WEIL ICH ES BIN, DER IHN DAFueR BEZAHLT, DASS ER SPIELT, WAS ICH WILL, HABE ICH IHN ENTLASSEN", - "UND DANN KAM ER MIR AUCH NOCH SCHRaeG... UND WAS FueR EINE PAPPNASE ER DOCH IST !", - "...ACH JA, UND PASSEN SIE AUF. DER BODEN IST FRISCH GEBOHNERT", - "RUHE !WIR GUCKEN GERADE DAS SPIEL !", - "LOS, HAU REIN, GIBS IHM", -}, -{ - // 0 - "", - "QU'EST-CE QU'IL Y A, QU'Y A-T-IL?", - "D'ACCORD. CHAMBRE 512. PAR LES ESCALIERS. LA CL EST SUR LA PORTE", - "LE COMTE DRASCULA?!", - "NON, RIEN, CE TYPE A UNE MAUVAISE R\220PUTATION PAR ICI", - // 5 - "EH BIEN, IL Y A DES RUMEURS QUI COURENT SUR LUI. CERTAINS DISENT QUE C'EST UN VAMPIRE ET QU'IL ENLEVE DU MONDE POUR SUCER LEUR SANG ", - "MAIS D'AUTRES PENSENT QU'IL EST SEULEMENT UN TRAFICANT D'ORGANES, ET C'EST POUR CELA QUE DES PERSONNES DPECES SONT APPARUES DANS LES ALENTOURS", - "CERTAINEMENT IL NE S'AGIT QUE DES BRUITS QUI COURENT. S\352REMENT IL AURA LES DEUX MTIERS. MAIS, POURQUOI VOULEZ-VOUS VOIR CE TYPE?", - "OH, NON! OUBLIEZ CELA, J'AI BEAUCOUP \267 FAIRE.", - "BON, A VA. MAIS PARCE QUE JE VEUX ET NON PARCE QUE TU LE DIS", - // 10 - "ILS GAGNENT", - "FICHE-MOI LA PAIX, D'ACCORD?", - "C'EST S\352R, JE NE SUIS PAS UN AVUGLE", - "SELON LA TRADITION DU VILLAGE, QUAND IL Y A UN MATCH ON OUBLIE LES RANCUNES, POUR ALLER ENCOURAGER LA S\220LECTION", - "ET FERME-LA D'UNE FOIS!, JE NE PEUX PAS ENTENDRE", - // 15 - "ALLEZ, VA-T'-EN ET NE D\220RANGES PAS!", - "\200A VIENT DE COMMENCER! -ET TAIS-TOI!", - "AH, BON! JE PENSAIS QU'IL SE PASSAIT QUELQUE CHOSE", - "NON, C'EST \220GAL. \267 CES HEURES-CI ELLE SERA D\220J\267 MORTE", - "LE FAIT EST QU'ELLE A COMMENC\220 JOUER DE LA MUSIQUE CLASSIQUE ET QUE JE NE SUPPORTE PAS CELA", - // 20 - "ET MAINTENANT QUE JE LUI AI MIS DEHORS, COMMENT JE LUI PAIE POUR QU'IL JOUE CE QUE JE VEUX", - "ET ENCORE IL S'EST MONTR\220 ARROGANT... -ET DIRE QU'IL PARAISSAIT UNE SAINTE-NITOUCHE!", - "...FAITES ATTENTION, ON VIENT DE CIRER LE PARQUET", - "SILENCE! ON VOIT LE MATCH!", - "OH L\267 L\267! TIENS!", -}, -{ - // 0 - "", - "CHE SUCCEDE, CHE SUCCEDE?", - "D'ACCORDO. CAMERA 512. DEVE SALIRE LE SCALE. LA CHIAVE \324 NELLA PORTA", - "IL CONDE DRASCULA?", - "NO, NIENTE. QUEL TIZIO HA MALA REPUTAZIONE QU\336", - // 5 - "SE DICONO MOLTE COSE SU LUI. COME CH'\324 UN VAMPIRO E SEQUESTRA GENTE PER BERE LA SUA SANGUE", - "ALTRI DICONO CHE SOLO \324 UN TRAFFICANTE DI ORGANI, PER QUELLO TROVIAMO GENTE SQUARTATA FUORI LE MURA", - "SONO SOLTANTO CHIACCHIERE. FORSE SIA LE DUE COSE. MA, PERCHE VUOLE TROVARE QUEL TIZIO?", - "NO, HO MOLTO DA FARE..", - "VA BENE, MA PERCHE VOGLIO IO, NON PERCHE L'ABBIA DETTO TU", - // 10 - "ADESSO VINCONO", - "LASCIAMI IN PACE, O.K.?", - "CERTO, NON SONO CIECO", - "C'\324 LA TRADIZIONE NEL PAESE DI DIMENTICARE I RANCORI QUANDO C'\324 PARTITA DI CALCIO; PER ANIMARE LA SELEZIONE", - "TI HO DETTO DI STARE ZITTO, NON RIESCO A SENTIRE", - // 15 - "LASCIAMI IN PACE E NON MI DISTURBARE", - "\324 APPENA COMINCIATO, ZITTO!", - "AH, BENE. HO PENSATO CHE SUCCEDEVA QUALCOSA", - "NO, NON FA NIENTE. ADESSO SICURO CH'\324 GI\267 MORTA", - "SI \324 MESSO A SUONARE MUSICA CLASSICA ED IO LA ODIO", - // 20 - "\324 COME FACCIO PER SENTIRE QUELLO CHE VOGLIO SE L'HO LICENZIATO", - "E ORA SI METTE BULLO...-E SEMBRAVA PROPRIO SCEMO!", - "...SENTA! FACCIA ATTENZIONE. IL PAVIMENTO \324 APPENA INCERATO", - "ZITTO! - STIAMO GUARDANDO LA PARTITA!", - "DAI! PRENDI", -}, -}; - - -const char *_textvb[][63] = { -{ - // 0 - "", - "WHO THE HELL IS CALLING AT THIS TIME?", - "OH, ..OH, NO, NO....I'M...GANIMEDES THE DWARF. PROFESSOR VON BRAUN DOESN'T LIVE HERE ANYMORE", - "NO, I DON'T KNOW WHERE IT IS !!", - "GET OUT!!", - // 5 - "IT'S TOO LATE NOW, YOU IDIOT!! IT ALWAYS IS", - "I COULDN'T AGREE MORE", - "ME, SCARED?", - "LISTEN HERE, DUDE. YOU'RE RIGHT NOW TALKING TO THE ONLY PERSON WHO KNOWS THE SECRET TO FIGHT AGAINST THE VAMPIRE", - "YOU NEED TO HAVE SPECIAL SKILLS TO FIGHT AGAINST A VAMPIRE. NOT EVERYBODY CAN DO IT", - // 10 - "YOU DON'T HAVE THEM", - "I'M SURE YOU WOULDN'T BET ALL YOUR MONEY ON IT, HUH?", - "WELL, ALL RIGHT, COME ON IN", - "IF YOU REALLY MEAN TO FACE DRASCULA, YOU'VE GOT TO BE ABLE TO TAKE ALL TYPES OF CREAKING AND VAMPIRE-LIKE NOISES", - "IS THAT CLEAR?", - // 15 - "OK, WAIT A MINUTE", - "STAND IN THE CENTER OF THE ROOM, PLEASE", - "WHERE DID I PUT THAT RECORD CALLED \"NAILS SCRATCHING THE BLACKBOARD\"?", - "ALL RIGHT. LET'S GET TO IT", - "YOU ARE USELESS. YOU SEE...?, JUST LIKE THE REST!!", - // 20 - "JUST GIVE ME NOW THE MONEY YOU LOST AND GET OUT OF HERE", - "AND DON'T COME BACK UNTIL YOU ARE ABSOLUTELY READY", - "WHAT DO YOU WANT NOW?", - "I HAVE TO ADMIT IT. YOU REALLY GOT WHAT IT TAKES TO FIGHT AGAINST THE VAMPIRES", - "HEY, TAKE YOUR MONEY. I ADMIT IT WHEN I MAKE A MISTAKE...", - // 25 - "LEAVE ME ALONE NOW, I WANT TO GET SOME SLEEP", - "WHENEVER YOU ARE READY TO FIGHT AGAINST THE VAMPIRES, JUST COME BACK AND I'LL HELP YOU OUT", - "OH, THAT'S EASY. JUST USING THE LIGHT OF ONE CRUCIFIX IS ENOUGH TO DESTROY HIM", - "YOU HAVE TO BE EXTRA CAREFUL WITH DRASCULA, HIS FRISISNOTICS POWERS HAVE MADE OF HIM THE MOST POWERFUL VAMPIRE", - "YOU'D BE LOST IF IT WASN'T FOR THEY...", - // 30 - "...BREW!", - "YEAH, YOU'RE RIGHT! I MIGHT HAVE SOME PROBLEMS WITH MY BACK IN THE FUTURE IF I KEEP ON SLEEPING THIS WAY", - "I UNDERSTAND HE WAS A BETTER OPPONENT THAN ME, BUT YOU HAVE TO ADMIT THAT THE DISCOVERY I MADE ABOUT ANTI-VAMPIRE TECHNIQUES WAS WHAT ACTUALLY PROTECTED ME", - "I'VE FOUND THIS IMMUNIZING BREW THAT KEEPS YOU SAFE FROM ANY VAMPIRES' BITE OR AGAINST HIS FRISISNOTICS POWERS", - "NO, NO, EXCUSE ME. I HAD IT ONCE BUT IT'S VERY DANGEROUS TO HAVE A BREW OF THAT TYPE. CAN YOU IMAGINE WHAT COULD HAPPEN IF A VAMPIRE GOT IT?", - // 35 - "HE'D BE IMMUNIZED AGAINST GARLIC, THE SUNSHINE LIGHT... SO I HAD TO GET RID OF WHAT I DIN'T USE BY THE SCIENTIFIC METHOD OF THROWING IT IN THE LAVATORY", - "DON'T WORRY, I REMEMBER EXACTLY HOW TO MAKE THAT BREW", - "I NEED GARLIC, BUT I ALREADY HAVE THEM. HOWEVER YOU'LL HAVE TO GET ME SOME WAX, BUBBLE GUM AND CIGARETTE PAPER OR PERHAPS A NAPKING OR SOMETHING ALIKE", - "OH...AND OF COURSE THE MOST IMPORTANT INGREDIENT. LEAVES FROM A VERY STRANGE PLANT CALLED FERNAN", - "IT'S A CLIMBING PLANT WHICH LEAVES HAVE MAGIC POWERS IF THEY'RE CUT WITH A GOLDEN SICKLE", - // 40 - "SO THAT AS SOON AS YOU HAVE THESE FIVE THINGS, JUST COME HERE AND I'LL MAKE THE BREW", - "YOU'LL BE READY THEN TO FIGHT AGAINST DRASCULA", - "REMEMBER: WAX, NICOTINE, A PIECE OF BUBBLE GUM, A PAPER AND SOME FERNAN'S LEAVES CUT WITH A GOLDEN SICKLE", - "I TOLD YOU! IT WAS JUST BECAUSE OF THE BREW!", - "OH, ALL RIGHT. I'M GOING TO MAKE MYSELF A...THE BREW. JUST A MOMENT, OK?", - // 45 - "IT'S A PROTECTING SPELL AGAINST VAMPIRES", - "I PUT IT THERE IN ORDER TO PRETEND THAT THE SKETCHER DIDN'T FORGET TO DRAW THE WINDOW YOU CAN SEE FROM OUTSIDE", - "ALL RIGHT, THE FIRST THING YOU MUST KNOW IS THE WAY TO DRASCULA'S CASTLE", - "THERE IS A CAVERN THAT GETS YOU STRAIGHT FROM THE CASTLE. IGOR, THE CRAZY ELVIS' FUN, TAKES IT TO GET TO THE VILLAGE EACH MORNING", - "BE CAREFUL THOUGH, THERE IS A VAMPIRE ALWAYS WATCHING OVER IT. YOU'LL HAVE TO GET RID OF HIM", - // 50 - "THERE IS AN OLD WELL RIGHT BY THE CEMETERY CHURCH", - "IT WAS USED A LONG TIME AGO FOR WITCHCRAFT TRIALS", - "THEY THREW THE WITCHES IN THE WELL. IF THEY DROWNED THEY WERE REAL WITCHES. IF THEY DIDN'T, THEY WEREN'T", - "WE THREW ONE ONCE AND SHE DIDN'T DROWN, I GUESS SHE WASN'T A WITCH", - "ANYWAY. THERE IS YOUR BREW. HOWEVER, I ONLY GOT TO MAKE ENOUGH JUST FOR ONE PERSON", - // 55 - "YOU'D BETTER SMOKE IT RIGHT BEFORE YOU FIGHT AGAINST DRASCULA", - "COME ON, RUN!", - "OH, JUST EXCUSES...!", - "ARE YOU JOHN HACKER? I'M DOCTOR VON BRAUN", - "LISTEN TO ME, THIS IS VERY IMPORTANT. IT'S ABOUT THE BREW", - // 60 - "SHUT UP AND LET ME TALK. I JUST FOUND THIS BOOK ABOUT ANTI-VAMPIRE BREWS WARNING AGAINST MIXING THE JOINT WITH ANY ALCOHOLIC DRINK BEFORE YOU", - "ALCOHOL REACTS WHEN MIXED WITH BREW, SO THAT IT CANCELS OUT ITS EFFECTS JUST IN A FEW SECONDS", - "I'M SORRY, BUT I HAVE TO HANG UP RIGHT NOW. THE POLICE IS LOOKING FOR ME, THEY THINK I'M A PUSHER. STUPIDS!. ANYWAY, BYE AND GOOD LUCK SAVING THE WORLD!", -}, -{ - // 0 - "", - "\250QUIEN DIABLOS LLAMA A ESTAS HORAS?", - "EH... NO, NO. YO SOY EL ENANO GANIMEDES... EL PROFESOR VON BRAUN YA... YA NO VIVE AQUI", - "\255NO, NO SE DONDE ESTA!", - "\255QUE TE VAYAS! ", - // 5 - "IMBECIL. YA ES DEMASIADO TARDE, SIEMPRE LO ES", - "ESTOY TOTALMENTE DE ACUERDO", - "\250YO MIEDO?", - "ENTERATE CHAVAL: ESTAS HABLANDO CON EL UNICO QUE CONOCE EL SECRETO PARA ENFRENTARSE A LOS VAMPIROS", - "NO TODO EL MUNDO ES CAPAZ DE LUCHAR CON UN VAMPIRO. HAY QUE TENER UNAS CUALIDADES ESPECIALES", - // 10 - "NO LAS TIENES", - "\250TE APUESTAS TODO TU DINERO A QUE NO?", - "ESTA BIEN. PASA", - "SI DE VERDAD ERES CAPAZ DE ENFRENTARTE A DRASCULA, DEBER PODER SOPORTAR TODOS LOS RUIDOS CHIRRIANTES Y VAMPIRICOS", - "\250QUEDA CLARO?", - // 15 - "DE ACUERDO. ESPERA UN MOMENTO", - "POR FAVOR, PONTE EN EL CENTRO DE LA HABITACION", - "VEAMOS. \250DONDE HE PUESTO EL DISCO ESTE DE \"U\245AS ARRASCANDO UNA PIZARRA\"?", - "MUY BIEN. VAMOS ALLA", - "\250VES? ERES UN INUTIL, COMO TODOS LOS DEMAS", - // 20 - "AHORA DAME EL DINERO QUE HAS PERDIDO Y VETE DE AQUI", - "Y NO VUELVAS HASTA QUE NO ESTES PREPARADO DEL TODO", - "\250Y QUE ES LO QUE QUIERES TU AHORA?", - "HE DE RECONOCERLO... TIENES APTITUDES PARA LUCHAR CON LOS VAMPIROS", - "POR CIERTO, TOMA TU DINERO. SE CUANDO ME HE EQUIVOCADO", - // 25 - "AHORA VETE, QUE QUIERO DORMIR UN POCO", - "CUANDO ESTES DISPUESTO A ENFRENTARTE A ALGUN VAMPIRO, VUELVE Y TE AYUDARE EN LO QUE PUEDA", - "OH, ESO ES FACIL. LA LUZ DEL SOL O UN CRUCIFIJO Y LE HACES POLVO", - "CON EL QUE DEBES PONER ESPECIAL CUIDADO ES CON DRASCULA. SUS PODERES FRISISHNOSTICOS LE HACEN EL MAS PODEROSO DE LOS VAMPIROS", - "ESTARIAS PERDIDO A NO SER POR LA...", - // 30 - "...\255POCION!", - "OH, CLARO. TIENES RAZON, SI SIGO DURMIENDO ASI A LO MEJOR TENGO PROBLEMAS DE COLUMNA CUANDO SEA VIEJO", - "BUENO, ADMITO QUE RESULTO MEJOR ADVERSARIO QUE YO, PERO MI PRINCIPAL HALLAZGO EN EL ESTUDIO DE TECNICAS ANTI-VAMPIROS FUE LO QUE ME CUBRIO LAS ESPALDAS", - "DESCUBRI UNA POCION DE INMUNIDAD. TE HACE INVULNERABLE ANTE CUALQUIER MORDEDURA DE VAMPIRO, O A SUS PODERES FRSISSHNOTICOS", - "NO, PERDONA LA TUVE EN SU DIA, PERO UNA POCION DE ESAS CARACTERISTICAS ES PELIGROSA. IMAGINATE SI CAYERA EN MANOS DE UN VAMPIRO", - // 35 - "LE HARIA INMUNE A LOS AJOS, A LA LUZ DEL SOL... ASI QUE TUVE QUE DESHACERME DE LO QUE NO USE POR EL CIENTIFICO METODO DE TIRARLO A LA TAZA DEL WATER", - "TRANQUILO, ME ACUERDO PERFECTAMENTE DE COMO PREPARAR ESA POCION ", - "NECESITO AJOS, QUE DE ESO YA TENGO, PERO ME TENDRAS QUE CONSEGUIR ALGO DE CERA, NICOTINA, UN CHICLE, Y UN PAPEL DE FUMAR, O UNA SERVILLETA, O ALGO PARECIDO", - "\255AH! Y POR SUPUESTO, EL INGREDIENTE PRINCIPAL: UNAS HOJAS DE UNA EXTRA\245A PLANTA LLAMADA FERNAN", - "SE TRATA DE UNA PLANTA ENREDADERA CUYAS HOJAS PROPORCIONAN PODERES MAGICOS SI SE CORTAN CON UNA HOZ DE ORO", - // 40 - "PUES YA SABES, EN CUANTO TENGAS ESAS CINCO COSAS ME LAS TRAES Y TE PREPARARE LA POCION", - "DESPUES ESTARAS LISTO PARA LUCHAR CON DRASCULA", - "RECUERDA: CERA, NICOTINA, UN CHICLE, UN PAPEL Y UNAS HOJAS DE FERNAN, LA PLANTA, CORTADAS CON UNA HOZ DE ORO", - "\255YA TE LO HE DICHO! FUE TODO GRACIAS A LA POCION", - "AH, MUY BIEN. VOY ENTONCES A PREPARARME EL PO... LA POCION. SOLO TARDO UN MOMENTO", - // 45 - "ES UN SORTILEGIO DE PROTECCION CONTRA VAMPIROS", - "LO PUSE PARA DISIMULAR QUE EL DIBUJANTE SE OLVIDO DE PONER LA VENTANA QUE SE VE DESDE FUERA", - "BUENO, LO PRIMERO QUE DEBES SABER ES COMO SE VA AL CASTILLO DRASCULA", - "HAY UNA GRUTA QUE LLEVA DIRECTAMENTE AL CASTILLO Y QUE ESE LOCO FAN DE ELVIS, IGOR, USA PARA BAJAR AL PUEBLO POR LAS MA\245ANAS", - "PERO TEN CUIDADO, SIEMPRE ESTA PROTEGIDA POR UN VAMPIRO. TENDRAS QUE LIBRARTE DE EL", - // 50 - "HAY UN VIEJO POZO AL LADO DE LA CAPILLA DEL CEMENTERIO", - "SE USABA ANTIGUAMENTE PARA JUZGAR CASOS DE BRUJERIA", - "SE TIRABA A LAS BRUJAS AL POZO. SI SE HUNDIAN ERAN BRUJAS. SI NO, NO", - "UNA VEZ TIRAMOS A UNA Y NO SE HUNDIO, ASI QUE NO SERIA BRUJA", - "A LO QUE VAMOS: TOMA TU POCION, PERO SOLO ME HA DADO PARA UNO", - // 55 - "LO MEJOR ES QUE TE LO FUMES JUSTO ANTES DE ENFRENTARTE A DRASCULA", - "CORRE", - "\255EXCUSAS!", - "\250JOHN HACKER? SOY EL DOCTOR VON BRAUN", - "ESCUCHEME, ES MUY IMPORTANTE. ES SOBRE LA POCION", - // 60 - "ME HE ENCONTRADO UN LIBRO SOBRE POCIONES Y DICE QUE NO DEBE USTED BEBER ALCOHOL UNA VEZ SE HAYA FUMADO LA POCION", - "EL ALCOHOL INGERIDO REACCIONA CON LAS SUSTANCIAS DE LA POCION Y ANULA SUS EFECTOS EN DECIMAS DE SEGUNDO", - "TENGO QUE COLGAR. LA POLICIA ME BUSCA. DICEN QUE TRAFICO CON DROGAS \255IGNORANTES! BUENO, ADIOS Y SUERTE SALVANDO AL MUNDO", -}, -{ - // 0 - "", - "WER ZUM TEUFEL KLINGELT UM DIESE UHRZEIT ?", - "aeH......NEIN, NEIN. ICH BIN HELGE SCHNEIDER...HERR PROFESSOR VON BRAUN ...aeH...WOHNT HIER NICHT MEHR", - "NEIN, ICH WEISS NICHT WO ER IST !", - "NUN GEH SCHON !", - // 5 - "TROTTEL. ES IST SCHON ZU SPaeT, WIE IMMER", - "ICH BIN ABSOLUT EINVERSTANDEN", - "ICH UND DIE HOSEN VOLL ?", - "DAMIT DAS KLAR IST, KURZER : DU SPRICHST GERADE MIT DEM EINZIGEN DER DAS GEHEIMREZEPT GEGEN VAMPIRE HAT", - "NICHT JEDER KANN GEGEN EINEN VAMPIR ANTRETEN.MAN MUSS EIN PAAR GANZ BESONDERE EIGENSCHAFTEN BESITZEN", - // 10 - "DU HAST SIE NICHT", - "WETTEN NICHT ? 100.000 MARK, DASS NICHT !", - "SCHON GUT, KOMM REIN", - "WENN DU DICH DRACULA WIRKLICH STELLEN WILLST WIRST DU ALLE DIESE VAMPIRTYPISCHEN SAUG-UND QUIETSCHGERaeUSCHE ERTRAGEN MueSSEN", - "IST DAS KLAR ?", - // 15 - "O.K. WARTE MAL EINEN MOMENT", - "STELL DICH BITTE MAL IN DIE MITTE DES ZIMMERS", - "GUCKEN WIR MAL. WO IST DIESE PLATTE MIT\"FINGERNaeGEL KRATZEN AN DER TAFEL ENTLANG\" ?", - "SEHR GUT, GEHEN WIR DA HIN", - "SIEHST DU, DU BIST GENAUSO UNFaeHIG WIE ALLE ANDEREN !", - // 20 - "JETZT GIB MIR DAS GELD,UM DAS WIR GEWETTET HABEN UND KOMM HER", - "UND KOMM ERST DANN WIEDER, WENN DU 100%IG VORBEREITET BIST", - "UND WAS WILLST DU JETZT ?", - "ICH MUSS ZUGEBEN, DASS DU DAS NoeTIGE TALENT ZUR VAMPIRJAGD HAST", - "ueBRIGENS, HIER IST DEIN GELD. ICH HABE MICH GEIRRT", - // 25 - "UND JETZT GEH, ICH MoeCHTE MICH HINLEGEN", - "KOMM ZURueCK,WENN DU SO WEIT BIST, DICH EINEM VAMPIR GEGENueBERZUSTELLEN UND ICH WERDE DIR HELFEN", - "ACH, DAS IST GANZ EINFACH. EIN SONNENSTRAHL ODER EIN KRUZIFIX UND ER WIRD ZU STAUB", - "AM MEISTEN AUFPASSEN MUSST DU BEI DRASCULA..WEGEN SEINEN TRANSHYPNITISCHEN FaeHIGKEITEN IST ER DER GEFaeHRLICHSTE UNTER DEN VAMPIREN", - "DU WaeRST VERLOREN, ES SEI DENN DU HaeTTEST...", - // 30 - "....DIE MISCHUNG! ", - "JA, STIMMT, DU HAST RECHT. WENN ICH WEITERHIN SO LIEGE WERDE ICH IM HOHEN ALTER WOHL RueCKENPROBLEME HABEN", - "NAJA, ICH GEBE ZU DASS ER der bessere von uns war, ABER DIE WICHTIGSTE ERKENNTNIS IN MEINEM ANTI-VAMPIR-STUDIUM WAR, MIR EINEN BODYGUARD ZUZULEGEN", - "ICH HABE EINE IMMUNITaeTSMISCHUNG GEFUNDEN. MIT DER KANN DIR KEIN EINZIGER VAMPIRBISS ETWAS ANHABEN, UND AUCH NICHT SEINE TRANSHYPNISIE.", - "NEIN, TUT MIR LEID, ICH HATTE SIE damals, ABER EINE MISCHUNG DIESER KONSISTENZ IST SEHR GEFaeHRLICH, UND STELL DIR MAL VOR, ES GERaeT IN VAMPIRHaeNDE", - // 35 - "DAS WueRDE IHN IMMUN GEGEN KNOBLAUCH UND SONNENLICHT GEMACHT HABEN, DIE RESTE, DIE ICH NICHT MEHR FueR WISSENSCHAFTLICHE ZWECKE BRAUCHTE, landeten im klo", - "NUR DIE RUHE, ICH HABE DAS REZEPT KOMPLETT IM KOPF ", - "ICH BRAUCHE KNOBLAUCH,AH, HAB ICH SCHON, ABER DANN MUSST DU NOCH WACHS BESORGEN, NIKOTIN, KAUGUMMI UND EIN BLaeTTCHEN ODER EINE SERVIETTE ODER SO WAS", - "ACH KLAR ! UND DIE WICHTIGSTE ZUTAT : EIN PAAR BLaeTTER EINER SELTSAMEN PFLANZE DIE FREDDY HEISST", - "ES HANDELT SICH UM EINE TOPFBLUME DEREN BLaeTTER ZAUBERKRaeFTE HABEN, WENN MAN SIE MIT EINER GOLDSICHEL ABSCHNEIDET", - // 40 - "ALSO, DU WEISST SCHON, SOBALD DU MIR DIESE FueNF ZUTATEN GEBRACHT HAST, BEREITE ICH DIR DIE MISCHUNG ZU", - "DANACH BIST DU FueR DEN KAMPF GEGEN DRASCULA GERueSTET", - "DENK DRAN : WACHS, NIKOTIN, EIN KAUGUMMI, EIN BLaeTTCHEN UND EIN PAAR BLaeTTER VON FREDDY, MIT EINER GOLDSICHEL ABGESCHNITTEN", - "HAB ICH DIR DOCH SCHON GESAGT ! NUR DANK DER MISCHUNG", - "OK. ALLES KLAR. ICH FANG DANN MAL AN EINEN ZU BAUEN...aeH VORZUBEREITEN. DAUERT AUCH NICHT LANGE", - // 45 - "DAS IST EINE ZAUBERFORMEL, DIE VOR VAMPIREN SCHueTZT", - "DAS WAR ICH, DAMIT MAN NICHT MERKT, DASS DER ZEICHNER VERGESSEN HAT DAS FENSTER VON VORHIN ZU ZEICHNEN", - "ALSO, ZUERST MUSST DU WISSEN WIE MAN ZUM SCHLOSS VON DRASCULA KOMMT.", - "ES GIBT EINE GROTTE, DIE DIREKT ZUM SCHLOSS FueHRT, UND DURCH DIE IGOR, DIESER BEKLOPPTE ELVIS-FAN MORGENS IMMER ZUM DORF RUNTER GEHT", - "ABER PASS AUF, SIE WIRD PERMANENT VON EINEM VAMPIR BEWACHT, DEN DU ERSTMAL LOSWERDEN MUSST", - // 50 - "ES GIBT DA EINEN ALTEN BRUNNEN BEI DER FRIEDHOFSKAPELLE", - "FRueHER WURDE ER FueR HEXENPROZESSE BENUTZT", - "MAN WARF DIE HEXEN IN DEN BRUNNEN. WENN SIE UNTERGINGEN WAREN SIE HEXEN, WENN NICHT, DANN NICHT", - "EINMAL WARFEN WIR EINE RUNTER, DIE NICHT UNTERGING, ALSO WAR SIE KEINE HEXE", - "WENN WIR LOSGEHEN, NIMMST DU DEINE MISCHUNG, ABER WIR HABEN NUR FueR EINE PERSON", - // 55 - "AM BESTEN RAUCHST DU IHN DIR KURZ BEVOR DU DRACULA GEGENueBERSTEHST", - "LAUF !", - "BILLIGE AUSREDEN !", - "HEINZ HACKER ? ICH BIN DOKTOR VON BRAUN", - "HoeREN SIE ZU, ES IST SEHR WICHTIG. ES GEHT UM DIE MISCHUNG", - // 60 - "ICH HABE EIN BUCH ueBER MISCHUNGEN GEFUNDEN UND DA STEHT DASS MAN KEINEN ALKOHOL TRINKEN DARF, SOBALD MAN DIE MISCHUNG GERAUCHT HAT", - "DER ALKOHOL REAGIERT IM MAGEN MIT DEN SUBSTANZEN DER MISCHUNG UND VERNICHTET IHRE WIRKUNG BINNEN WENIGER MILLISEKUNDEN", - "ICH MUSS AUFLEGEN. DIE POLIZEI IST HINTER MIR HER. DIE IDIOTEN HALTEN MICH FueR EINEN DROGEN-DEALER !ALSO, TSCHueSS UND VIEL GLueCK !", -}, -{ - // 0 - "", - "QUI DIABLE APPELLE \267 CETTE HEURE-CI?", - "H... NON, NON. JE SUIS LE NAIN GANYM\324DE... LE PROFESSEUR VON BRAUN... N'HABITE DJ\267 L\267", - "NON, JE NE SAIS PAS O\353 IL EST!", - "VA-T'-EN!", - // 5 - "IMBCIL! C'EST DJ\267 TROP TARD! C'EST TOUJOURS TROP TARD!", - "JE SUIS TOUT-\267-FAIT CONFORME", - "MOI PEUR?", - "RENSEIGNE-TOI, MON GARS: TU PARLES AVEC LE SEUL QUI CONNA\327T LE SECRET POUR CONFRONTER LES VAMPIRES", - "TOUT LE MONDE N'EST PAS CAPABLE DE LUTTER AVEC UN VAMPIRE. IL FAUT DES QUALITS SPCIALES", - // 10 - "TU NE LES A PAS", - "EST-CE QUE TU PARIE TOUT L'ARGENT QUE TU AS \267 QUE C'EST NON?", - "\200A VA, ENTRE", - "SI EN V\220RIT\220 TU TE SENS CAPABLE DE CONFRONTER DRASCULA, IL FAUDRA QUE TU SUPPORTES TOUS LES BRUITS GRIN\200ANTS ET SU\200ANTS", - "C'EST CLAIR?", - // 15 - "D'ACCORD. ATTENDS UN INSTANT", - "METS-TOI AU MILIEU DE LA CHAMBRE, S'IL TE PLA\327T", - "VOYONS! O\353 EST-CE QUE J'AI MIS LE DISQUE \"ONGLES GRATTANT UN TABLEAU\"?", - "TR\324S BIEN. ON Y VA", - "TU VOIS? TU ES UN INCAPABLE, COMME TOUS LES AUTRES", - // 20 - "MAINTENANT DONNE-MOI L'ARGENT QUE TU AS PERDU ET VA-T'-EN", - "ET N'Y REVIENS \267 MOINS QUE TU SOIS COMPL\324TEMENT EN FORME", - "ET QUE VEUX-TU MAINTENANT?", - "JE DOIS LE RECONNA\327TRE... TU AS DES APTITUDES POUR LUTTER CONTRE LES VAMPIRES", - "EN FAIT, TIENS TON ARGENT. JE SAIS RECONNA\327TRE MES ERREURS", - // 25 - "MAINTENANT VA-T'-EN, JE VEUX DORMIR UN PEU ", - "QUAND TU SOIS PR\322T \267 TE CONFRONTER AVEC UN VAMPIRE, REVIENS ET TU POURRAS COMPTER SUR MOI", - "OH! C'EST FACIL. AVEC LA LUMI\324RE DU SOLEIL OU UN CRUCIFIX TU LE R\220DUIT EN CENDRES", - "MAIS TU DOIS FAIRE SP\220CIALE ATTENTION AVEC DRASCULA. GR\266CE \267 SES POUVOIRS FRISYSHNOSTIQUES C'EST LE PLUS PUISSANT DES VAMPIRES", - "JE SERAIS PERDU SI CE N'EST PAS POUR LA...", - // 30 - "...POTION!", - "OH, BIEN S\352R. TU AS RAISON, SI JE CONTINUE \267 DORMIR COMME \200\265, J'AURAI DES PROBL\324MES DE COLONNE DANS MA VIEILLESSE", - "bon, J'ACCEPTE QU'IL A \220T\220 MEILLEURE ADVERSAIRE QUE MOI, MAIS JE ME SUIS GARD\220 LE DOS GR\266CE \267 MA BONNE TROUVAILLE DANS L'\220TUDE DE TECHNIQUES ANTI-VAMPIRES", - "J'AI D\220COUVERT UNE POTION IMMUNOLOGIQUE QUI TE FAIT INVULN\220RABLE CONTRE N'IMPORTE QUELLE MORSURE DE VAMPIRE OU SES POUVOIRS FRSYSSHNOTIQUES", - "NON, EXCUSES-MOI. JE L'AI EUE, MAIS UNE POTION DE CES CARACT\220RISTIQUES EST DANGEREUSE. IMAGINE TOI SI ELLE TOMBAIT DANS LES MAINS D'UN VAMPIRE", - // 35 - "IL DEVIENDRAIT IMMUNIS\220 AUX AILS, \267 LA LUMI\324RE DU SOLEIL. DONC, J'AI D\352 M'EN D\220BARRASSER DES EXC\220DENTS PAR LA SCIENTIFIQUE M\220THODE DE LES JETER AUX \220GOUTS", - "RESTE TRANQUILLE, JE ME SOUVIENS PARFAITEMENT DE LA PR\220PARATION DE CETTE POTION", - "il me faut D'AIL, MAIS J'EN AI D\220J\267. IL FAUDRA UN PEU DE CIRE, DE LA NICOTINE, UN CHEWING-GUM ET UN PAPIER \267 CIGARETTES, OU QUELQUE CHOSE PAREILLE", - "AH! ET CERTAINEMENT, L'INGR\220DIANT PRINCIPAL: LES FEUILLES D'UNE \220TRANGE PLANTE APPEL\220E FERNAN", - "IL S'AGIT D'UNE PLANTE GRIMPANTE DONT LES FEUILLES FOURNISSENT DES POUVOIRS MAGIQUES SI ON LES COUPE AVEC UNE FAUCILLE EN OR", - // 40 - "TU LE SAIS D\220J\267. D\324S QUE TU AURAS CES CINQ TRUCS APPORTE-LES-MOI ET JE TE PR\220PARERAI LA POTION", - "APR\324S TU SERAS PR\322T POUR LUTTER CONTRE DRASCULA", - "RAPPELLE-TOI: DE LA CIRE, DE LA NICOTINE, UN CHEWING-GUM, UN PAPIER ET LES FEUILLES DE FERNAN, LA PLANTE, COUP\220ES AVEC UNE FAUCILLE EN OR", - "JE TE L'AI D\220J\267 DIT! TOUT A \220T\220 GR\266CE \267 LA POTION", - "AH! TR\324S BIEN! ALORS, JE VAIS ME PR\220PARER LE PO... LA POTION. JE N'AI QUE POUR UN MOMENT", - // 45 - "C'EST UN SORTIL\324GE DE PROTECTION CONTRE-VAMPIRES", - "JE L'AI MIS POUR DISSIMULER, LE DESSINATEUR AYANT OUBLI\220 D'Y METTRE LA FEN\322TRE QU'ON VOIT DU DEHORS", - "EH BIEN, CE QUE TU DOIS SAVOIR D'ABORD C'EST LA FA\200ON D'ALLER AU CH\266TEAU DE DRASCULA", - "IL Y A UNE GROTTE QUI M\324NE DIRECTEMENT AU CH\266TEAU ET QU'IGOR, CE FOU FAN D'ELVIS, EN UTILISE POUR SE RENDRE AU VILLAGE LE MATIN", - "MAIS FAIT ATTENTION, ELLE TOUJOURS GARD\220E PAR UN VAMPIRE. TU DEVRAS T'EN D\220BARRASSER", - // 50 - "IL Y A UN VIEUX PUITS \267 C\342T\220 DE LA CHAPELLE DU CIMETI\324RE", - "ON L'UTILISAIT JADIS POUR JUGER DES AFFAIRES DE SORCELLERIE", - "ON JETAIT LES SORCI\324RES AU PUITS. SI ELLES COULAIENT, ON \220TAIT S\352R; AUTREMENT, PAS", - "UNE FOIS ON A JET\220 UNE ET ELLE N'AS PAS COUL\220, DONC ELLE NE SERAIT PAS UNE SORCI\324RE", - "MAINTENANT GARDE \267 LA QUESTION QUI NOUS INT\220RESSE: TIENS TA POTION, MAIS ON NE M'A PAS DONN\220 QUE POUR UN SEULEMENT.", - // 55 - "IL VAUDRA MIEUX QUE TU LA FUMES JUSTE AVANT DE CONFRONTER DRASCULA", - "COURS!", - "DES EXCUSES!", - "JHON HACKER? SUIS LE DOCTEUR VON BRAUN", - "\220COUTEZ-MOI. C'EST TR\324S IMPORTANT. C'EST SUR LA POTION", - // 60 - "DANS UN LIVRE QUE J'AI TROUV\220 SUR LES POTIONS, IL DIT QUE VOUS NE DEVEZ PAS BOIR DE L'ALCOOL APR\324S AVOIR FUM\220 LA POTION ", - "L'ALCOOL AVAL\220 R\220AGIT AVEC LES INGR\220DIENTS DE LA POTION ET ANNULE SES EFFETS EN DIXI\324MES DE SECONDE", - "JE DOIS RACCROCHER. SUIS CHERCH\220 PAR LA POLICE. ILS DISENT QUE JE TRAFIQUE EN DROGUES -IGNORANTS! AU REVOIR ET BONNE CHANCE EN SAUVANT LE MONDE", -}, -{ - // 0 - "", - "MA CHI BUSSA A QUESTE ORE?", - "EH...NO,NO. IO SONO IL NANNO GANIMEDI....IL PROFESSORE VON BRAUN NON ABITA QU\336 PI\353", - "NO, NON SO DOV'\324!", - "HO DETTO VIA!", - // 5 - "IMBECILE. ORMAI TROPPO TARDE, SEMRE TARDE", - "SONO COMPLETAMENTE D'ACCORDO", - "IO, PAURA?", - "ASCOLTA BENE RAGAZZO: STAI PARLANDO CON L'UNICA PERSONA CHE CONOSCE IL SEGRETO PER VINCERE AI VAMPIRI", - "NON TUTTI QUANTI POSSONO LOTTARE CON UN VAMPIRO. SI DEVONO AVERE DELLE CARATTERISTICHE SPEZIALI", - // 10 - "NO CE LE HAI", - "SICURO CHE NON SCOMMETI TUTTO IL TUO SOLDI!", - "VA BENE . AVANTI", - "SE DAVVERO SEI PRONTO PER LOTTARE CONTRO DRASCULA, DEVI POTERE SOPPORTARE TUTTI I RUMORI STRIDENTI E VAMPIRICI", - "TUTTO CHIARO?", - // 15 - "D'ACCORDO. ASPETTA UN ATTIMO", - "PER FAVORE, METTETI NEL CENTRO DELLA CAMERA", - "DOV'\324 HO MESSO IL COMPACT DISC DI \"UNGHIE GRAFFIANDO UNA LAVAGNA\"", - "MOLTO BENE, ANDIAMO", - "VEDI? SEI UN INUTILE, COME TUTTI GLI ALTRI", - // 20 - "ORA DAMI IL SOLDI CHE HAI PERSO, E VIA", - "E NON TORNARE FINO CHE NON SIA COMPLETAMENTE PRONTO", - "E COSA VUOI TU ADESSO?", - "DEVO AMMETTERLO... HAI LA STOFFA DI LOTTATORE PER VINCERE DRASCULA", - "EH..! PRENDI IL TUO SOLDI. SO QUANDO HO SBAGLIATO", - // 25 - "ADESSO VATENE, VOGLIO DORMIRE UN P\343", - "QUANDO SIA DISPOSTO A UCCIDERE QUALCHE VAMPIRO, TORNA E TI AIUTER\343 ", - "QUELLO \324 FACILE. LA LUCE DEL SOLE O UN CROCIFISSO, E L'HAI SCHISCCIATO", - "CON CHI DEVI FARE MOLTA ATTENZIONE \324 CON DRASCULA. I SUOI POTERI FRISISHNOSTICI GLI FANNO IL PI\353 FORTE DEI VAMPIRI", - "NON POTREI FARE NULLA SE NON FOSSE PER LA .....", - // 30 - "...POZIONE!", - "CERTO. HAI RAGIONE, SE CONTINUO DORMENDO COS\336 FORSE AVR\343 PROBLEMI DI SCHIENA QUANDO SIA VECCHIO", - "BENE, \324 VERO CHE FU MEGLIO LOTTATORE DI ME, MA IL MIO STUDIO SU TECNICHE ANTI-VAMPIRI GLI AIUT\343 MOLTISSIMO", - "HO SCOPERTO UNA POZIONE DI IMMUNUT\267 . TI FA INVULNERABILE AI MORSI DI VAMPIRI, O AI SUOI POTERI FRISISHNOTICI", - "NO, SCUSA, CE L'EBBI MOLTO TEMPO FA, MA UNA POZIONE COM'ERA LA MIA \324 PERICOLOSA. FIGURATI SE LA AVESSE UN VAMPIRO", - // 35 - "GLI FAREBBE IMMUNE AGLI AGLII, ALLA LUCE DEL SOLE.... PER QUELLO L'HO SCARICATA NEL CESO", - "TRANQUILLO, MI RICORDO BENISSIMO DI COME RIFARLA", - "BISOGNO AGLII, CHE NE HO QU\326, DOVRAI PORTARMI UN P\220 DI CERA, NICOTINA, UNA GOMMA, E UNA CARTINA O UN TOVAGLIOLO, O QUALCOSA DEL GENERE", - "-AH! E COME NO, L'INGREDIENTE PRINCIPALE: DELLE FOGLIE DI UNA STRANA PIANTA CHIAMATA FERDINAN", - "\324 UNA PIANTA CONVOLVOLO, LE SUE FOGLIE PROPORZIONANO POTERI MAGICI SE SONO TAGLIATE DA UNA FALCE D'ORO", - // 40 - "ALLORA, PORTAMI QUESTE CINQUE COSE E FAR\343 PER TE LA POZIONE", - "DOPO SAREI PRONTO PER UCCIDERE DRASCULA", - "RICORDA: CERA, NICOTINA, UNA GOMMA, UNA CARTINA E FOGLIE DI FERDINAN, LA PIANTA, TAGLIATE DA UNA FALCE D'ORO", - "TI L'HO GI\267 DETTO! FU TUTTO GRAZIE ALLA POZIONE", - "AH, MOLTO BENE. DUNQUE VADO A FARE LA CAN......LA POZIONE. SAR\267 UN ATTIMINO", - // 45 - "\324 SOLTANTO UN SORTILEGIO DI PROTEZIONE CONTRO VAMPIRI", - "L'HO MESSO PER DISSIMULARE CHE IL DISEGNATORE HA DIMENTICATO METTERE LA FINESTRA CHE SI VEDE DA FUORI", - "BENE, PRIMA DEVI SAPERE COME ARRIVARE AL CASTELLO DRASCULA", - "C'\324 UNAGROTTA CHE VA AL CASTELLO E CHE UTILIZZA QUEL MATTO FAN DI ELVIS, IGOR, PER SCENDERE AL PAESE TUTTE LA MATTINE", - "MA FA ATTENZIONE, SEMPRE \220 PROTETTA DA UN VAMPIRO. DOVRAI LIBERARTI DI LUI", - // 50 - "C'\220 UN VECCHIO POZZO ACCANTO ALLA CAPELLA DEL CIMITERO", - "SI UTILIZZAVA MOLTO TEMPO FA PER GIUDICARE CASI DI STREGONERIA", - "SI BUTTAVANO DENTRO ALLE STREGE. SE SI AFFONDAVANO ERANO STREGHE. SE NO, NO", - "UNA VOLTA BUTTAMMO UNA E GALLEGGI\220, DUNQUE NON SAREBBE UNA STREGA", - "ORA BEVE LA POZIONE. PECCATO CI SIA SOLTANTO PER UNO", - // 55 - "SAR\265 MEGLIO FUMARLO PROPRIO PRIMA DELLA LOTTA CONTRO DRASCULA", - "CORRI1", - "SCUSE!", - "JOHN HACKER? SONO IL DOTTORE VON BRAUN", - "SENTA, \220 MOLTO IMPORTANTE, \220 SULLA POZIONE", - // 60 - "HO TROVATO UN LIBRO SU POZIONI E DICE CHE NON SI DEVE BERE ALCOL DOPO AVERE FUMATO LA POZIONE", - "L'ALCOL BEVUTO FA REAZIONE CON LE SOSTANZE DELLA POZIONE E ANNULLA I SUOI EFFETTI IN DECIME DI SECONDO", - "DEVO RIATTACARE. LA POLIZIA MI CERCA. DICONO CHE TRAFFICO DROGHE -IGNORANTI! BENE, ALLORA ADIO E IN BOCA IL LUPO", -}, -}; - - -const char *_textsys[][4] = { -{ - "PRESS 'DEL' AGAIN TO RESTART", - "PRESS 'ESC' AGAIN TO EXIT", - "SPEECH ONLY", - "TEXT AND SPEECH", -}, -{ - "PULSA DE NUEVO SUPR PARA EMPEZAR", - "PULSA DE NUEVO ESC PARA SALIR", - "SOLO VOCES", - "VOZ Y TEXTO", -}, -{ - "BETaeTIGEN SIE ERNEUT entf UM ANZUFANGEN", - "BETaeTIGEN SIE ERNEUT ESC UM ZU BEENDEN", - "NUR STIMMEN", - "STIMME UND TEXT", -}, -{ - "APPUYEZ \267 NOUVEAU SUR SUPR POUR COMMENCER", - "APPUYEZ \267 NOUVEAU SUR ESC POUR SORTIR", - "SEULEMENT DES VOIX", - "VOIX ET TEXT", -}, -{ - "PREMI DI NUOVO SUPR PER COMINZIARE", - "PRMI DI NUOVO ESC PER USCIRE", - "SOLO SUONI", - "SUONI E TESTO", -}, -}; - - -const char *_texthis[][5] = { -{ - "", - "A long time ago, it seems that Drascula killed Von Braun's wife, and then, as he intended to face the count, Von Braun started to investigate all he found vampires.", - "When he thought he was ready, he came up to the castle and had a very violent encounter with Drascula.", - "Nobody knows exactly what happened there. Although Von Braun lost, Drascula could not kill him.", - "Von Braun felt humiliated by his defect, run away from the castle and has never dared to face Drascula ever again.", -}, -{ - "", - "", - "", - "", - "" -}, -{ - "", - "", - "", - "", - "" -}, -{ - "", - "", - "", - "", - "" -}, -{ - "", - "", - "", - "", - "" -}, -}; - - -const char *_textd1[][11] = { -{ - // 68 - "44472225500022227555544444664447222550002222755554444466", - "444722255000222275555444446655033336666664464402256555005504450005446", - // 70 - "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", - "550330227556444744446660004446655544444722255000222275555444446644444", - "55033022755644455550444744400044504447222550002222755554444466000", - "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", - "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", - // 75 - "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", - "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", - "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", -}, -{ - // 68 - "4447222550002222755554444466", - "55033336666664464402256555005504450005446", - // 70 - "550333226220044644550044755665500440006655556666655044744656550446470046", - "74444666000444665554444444", - "5555044474440004450000", - "4444722744446664464404446554440055655022227500544446044444446", - "4447222550002222755444446666055522275550005550022200222000222666", - // 75 - "4444777444455550022220555044444446666622526644475533223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", - "5555000444555033022755644446666005204402266222003332222774440446665555005550335544444", - "5666500444555033022755555000444444444444444444444444444444" - "00222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", -}, -{ - // 68 - "44472225500022227555544444664447222550002222755554444466", - "444722255000222275555444446655033336666664464402256555005504450005446", - // 70 - "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", - "550330227556444744446660004446655544444722255000222275555444446644444", - "55033022755644455550444744400044504447222550002222755554444466000", - "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", - "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", - // 75 - "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", - "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", - "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", -}, -{ - // 68 - "44472225500022227555544444664447222550002222755554444466", - "444722255000222275555444446655033336666664464402256555005504450005446", - // 70 - "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", - "550330227556444744446660004446655544444722255000222275555444446644444", - "55033022755644455550444744400044504447222550002222755554444466000", - "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", - "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", - // 75 - "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", - "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", - "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", -}, -{ - // 68 - "44472225500022227555544444664447222550002222755554444466", - "444722255000222275555444446655033336666664464402256555005504450005446", - // 70 - "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", - "550330227556444744446660004446655544444722255000222275555444446644444", - "55033022755644455550444744400044504447222550002222755554444466000", - "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", - "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", - // 75 - "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", - "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", - "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", -}, - -}; - - -const char *_textverbs[][6] = { -{ - "look", - "take", - "open", - "close", - "talk", - "push", -}, -{ - "mirar", - "cogar", - "abrir", - "cerrar", - "hablar", - "mover", -}, -{ - "Schau", - "Nimm", - "oeFFNE", - "Schliesse", - "Rede", - "Druecke", -}, -{ - "regardez", - "ramassez", - "ouvrez", - "fermez", - "parlez", - "poussez", -}, -{ - "esamina", - "prendi", - "apri", - "chiudi", - "parla", - "premi", -}, -}; - - -const char *_textmisc[][2] = { -{ - "HUNCHBACKED", - "Transilvania, 1993 d.c.", -}, -{ - "jorobado", - "Transilvania, 1993 d.c. (despues de cenar)", -}, -{ - "HUNCHBACKED", - "Transilvania, 1993 d.c.", -}, -{ - "HUNCHBACKED", - "Transilvania, 1993 d.c.", -}, -{ - "HUNCHBACKED", - "Transilvania, 1993 d.c.", -}, -}; - -} // End of namespace Drascula -- cgit v1.2.3 From dc3cb78e6b79cc50262f93475bc06d015bf44f16 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 20:43:51 +0000 Subject: Updated the MSVC project files of the drascula engine svn-id: r32405 --- dists/msvc7/drascula.vcproj | 4 ++-- dists/msvc71/drascula.vcproj | 4 ++-- dists/msvc8/drascula.vcproj | 4 ++-- dists/msvc9/drascula.vcproj | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dists/msvc7/drascula.vcproj b/dists/msvc7/drascula.vcproj index 8a55a1856b..3bf3cf94ea 100644 --- a/dists/msvc7/drascula.vcproj +++ b/dists/msvc7/drascula.vcproj @@ -112,10 +112,10 @@ RelativePath="..\..\engines\drascula\rooms.cpp"> + RelativePath="..\..\engines\drascula\staticdata.h"> + RelativePath="..\..\engines\drascula\talk.cpp"> diff --git a/dists/msvc71/drascula.vcproj b/dists/msvc71/drascula.vcproj index 0d27422515..10a7a52185 100644 --- a/dists/msvc71/drascula.vcproj +++ b/dists/msvc71/drascula.vcproj @@ -126,10 +126,10 @@ RelativePath="..\..\engines\drascula\rooms.cpp"> + RelativePath="..\..\engines\drascula\staticdata.h"> + RelativePath="..\..\engines\drascula\talk.cpp"> diff --git a/dists/msvc8/drascula.vcproj b/dists/msvc8/drascula.vcproj index 7cf6065a4f..830eb8afe1 100644 --- a/dists/msvc8/drascula.vcproj +++ b/dists/msvc8/drascula.vcproj @@ -181,11 +181,11 @@ > diff --git a/dists/msvc9/drascula.vcproj b/dists/msvc9/drascula.vcproj index 9eb8d5af9a..3bcda49e5d 100644 --- a/dists/msvc9/drascula.vcproj +++ b/dists/msvc9/drascula.vcproj @@ -182,11 +182,11 @@ > -- cgit v1.2.3 From 798ce0ace82d5afad2a2863cc671b056be382ded Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 21:09:21 +0000 Subject: Cleanup svn-id: r32406 --- engines/drascula/drascula.cpp | 16 +- engines/drascula/drascula.h | 15 +- engines/drascula/talk.cpp | 466 +++++++----------------------------------- 3 files changed, 85 insertions(+), 412 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 41d3af28e5..4986b784b3 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -4324,20 +4324,8 @@ void DrasculaEngine::grr() { updateScreen(0, 0, 0, 0, 320, 200, screenSurface); bucless: - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index b5470bf492..ed65a00266 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -365,12 +365,6 @@ public: bool escoba(); void black(); - void talk_vb(int); - void talk_vb(const char *, const char *); - void talk_vbpuerta(int); - void talk_vbpuerta(const char *said, const char *filename); - void talk_blind(const char *, const char *, const char *); - void talk_hacker(const char *, const char *); void pickObject(int); void anda_parriba(); void anda_pabajo(); @@ -491,12 +485,12 @@ public: void stopSound_corte(); void fadeToBlack(int VelocidadDeFundido); void pause(int); - void talk_dr_grande(const char *said, const char *filename); void placeIgor(); void placeBJ(); void placeDrascula(); void talkInit(const char *filename); + bool isTalkFinished(int* length); void talk_igor_dch(int); void talk_igor_dch(const char *said, const char *filename); void talk_dr_dch(int); @@ -536,6 +530,13 @@ public: void talk_wolf(const char *said, const char *filename); void talk_mus(int); void talk_mus(const char *said, const char *filename); + void talk_dr_grande(const char *said, const char *filename); + void talk_vb(int); + void talk_vb(const char *, const char *); + void talk_vbpuerta(int); + void talk_vbpuerta(const char *said, const char *filename); + void talk_blind(const char *, const char *, const char *); + void talk_hacker(const char *, const char *); void hiccup(int); void stopSound(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index c3f9fa2e2d..a37b8179df 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -42,6 +42,25 @@ void DrasculaEngine::talkInit(const char *filename) { } } +bool DrasculaEngine::isTalkFinished(int* length) { + byte key = getScan(); + if (key != 0) + ctvd_stop(); + if (hay_sb == 1) { + if (soundIsActive()) + return false; + delete(sku); + sku = 0; + ctvd_terminate(); + } else { + length -= 2; + if (length > 0) + return false; + } + + return true; +} + void DrasculaEngine::talk_igor_dch(int index) { char name[20]; sprintf(name, "I%i.als", index); @@ -80,22 +99,9 @@ bucless: pause(3); - byte key = getScan(); - if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) - term_int = 1; - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); @@ -145,22 +151,8 @@ bucless: pause(3); - byte key = getScan(); - if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) - term_int = 1; - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); @@ -210,22 +202,8 @@ bucless: pause(3); - byte key = getScan(); - if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) - term_int = 1; - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; if (num_ejec == 6) updateRoom(); @@ -262,22 +240,9 @@ bucless: } updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - byte key = getScan(); - if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) - term_int = 1; - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; + if (num_ejec == 6) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -324,22 +289,8 @@ bucless: pause(3); - byte key = getScan(); - if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) - term_int = 1; - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; if (num_ejec == 6) { updateRoom(); @@ -395,19 +346,8 @@ bucless: pause(3); - byte key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete(sku); - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -459,22 +399,8 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } - byte key = getScan(); - if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) - term_int = 1; - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -595,22 +521,8 @@ bucless: pause(3); - byte key = getScan(); - if (num_ejec == 1 && key == Common::KEYCODE_ESCAPE) - term_int = 1; - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -656,20 +568,8 @@ bucless: pause(3); - byte key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -723,20 +623,8 @@ bucless: pause(3); - byte key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -793,20 +681,8 @@ bucless: pause(3); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -834,20 +710,8 @@ bucless: centerText(said, 150, 80); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -904,20 +768,8 @@ bucless: pause(2); p++; - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; } void DrasculaEngine::talk_hacker(const char *said, const char *filename) { @@ -935,22 +787,8 @@ bucless: centerText(said, 156, 170); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } - - key = 0; + if (!isTalkFinished(&length)) + goto bucless; } void DrasculaEngine::talk_wolf(int index) { @@ -987,20 +825,8 @@ bucless: pause(3); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1040,20 +866,8 @@ bucless: pause(3); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) + if (!isTalkFinished(&length)) goto bucless; - } updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1093,20 +907,8 @@ bucless: pause(3); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; flags[1] = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -1144,20 +946,8 @@ bucless: pause(3); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; flags[1] = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -1199,20 +989,8 @@ bucless: pause(3); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1253,20 +1031,9 @@ bucless: pause(3); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; + updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } @@ -1309,20 +1076,8 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); pause(3); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1407,20 +1162,8 @@ bucless: p++; pause(3); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; if (num_ejec == 1 && musicStatus() == 0 && flags[11] == 0) playMusic(roomMusic); @@ -1452,20 +1195,8 @@ bucless: pause(4); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; flags[19] = cara_antes; updateRoom(); @@ -1492,20 +1223,8 @@ bucless: centerText(said, 87, 66); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1545,20 +1264,8 @@ bucless: pause(3); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1598,20 +1305,8 @@ bucless: pause(3); - int key = getScan(); - if (key != 0) - ctvd_stop(); - if (hay_sb == 1){ - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1648,19 +1343,8 @@ bucless: if (key == Common::KEYCODE_ESCAPE) term_int = 1; - if (key != 0) - ctvd_stop(); - if (hay_sb == 1) { - if (soundIsActive()) - goto bucless; - delete sku; - sku = NULL; - ctvd_terminate(); - } else { - length -= 2; - if (length > 0) - goto bucless; - } + if (!isTalkFinished(&length)) + goto bucless; } } // End of namespace Drascula -- cgit v1.2.3 From d711fd9e343f506fe61056c3496eaec10c47d84d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 23:43:47 +0000 Subject: - Simplified font mapping (in print_abc and print_abc_opc) - Moved checkFlag to rooms.cpp - x_de_letra/y_de_letra -> letterX/letterY - Made itemLocations a const - Removed loads of now unneeded letter descriptions svn-id: r32407 --- engines/drascula/drascula.cpp | 687 +++++------------------------------------- engines/drascula/drascula.h | 93 +----- engines/drascula/rooms.cpp | 405 +++++++++++++++++++++++++ engines/drascula/staticdata.h | 59 +++- 4 files changed, 542 insertions(+), 702 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 4986b784b3..3e5d0b3d18 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1535,118 +1535,35 @@ bool DrasculaEngine::saves() { return true; } -struct charInfo { - -}; - void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) { int pos_texto[8]; - int y_de_letra = 0, x_de_letra = 0, h, length; + int letterY = 0, letterX = 0, h, length; length = strlen(said); - for (h = 0; h < length; h++) { - y_de_letra = (_lang == kSpanish) ? Y_ABC_ESP : Y_ABC; int c = toupper(said[h]); - if (c == '\245') - x_de_letra = X_GN; - else if (c == '\244') - x_de_letra = X_GN; - else if (c >= 'A' && c <= 'N') - x_de_letra = X_A + (c - 'A') * 9; - else if (c >= 'O' && c <= 'Z') - x_de_letra = X_O + (c - 'O') * 9; - else if (c == 0xa7 || c == ' ') - x_de_letra = SPACE; - else { - y_de_letra = (_lang == kSpanish) ? Y_SIGNOS_ESP : Y_SIGNOS; - if (c == '.') - x_de_letra = X_DOT; - else if (c == ',') - x_de_letra = X_COMA; - else if (c == '-') - x_de_letra = X_HYPHEN; - else if (c == '?') - x_de_letra = X_CIERRA_INTERROGACION; - else if (c == '\250') - x_de_letra = X_ABRE_INTERROGACION; -// else if (c == '\'') // FIXME -// x_de_letra = SPACE; // space for now - else if (c == '"') - x_de_letra = X_COMILLAS; - else if (c == '!') - x_de_letra = X_CIERRA_EXCLAMACION; - else if (c == '\255') - x_de_letra = X_ABRE_EXCLAMACION; - else if (c == ';') - x_de_letra = X_pointY_COMA; - else if (c == '>') - x_de_letra = X_GREATER_THAN; - else if (c == '<') - x_de_letra = X_LESSER_THAN; - else if (c == '$') - x_de_letra = X_DOLAR; - else if (c == '%') - x_de_letra = X_PERCENT; - else if (c == ':') - x_de_letra = X_DOS_PUNTOS; - else if (c == '&') - x_de_letra = X_AND; - else if (c == '/') - x_de_letra = X_BARRA; - else if (c == '(') - x_de_letra = X_BRACKET_OPEN; - else if (c == ')') - x_de_letra = X_BRACKET_CLOSE; - else if (c == '*') - x_de_letra = X_ASTERISCO; - else if (c == '+') - x_de_letra = X_PLUS; - else if (c >= '1' && c <= '9') - x_de_letra = X_N1 + (c - '1') * 9; - // "0" is mapped after "9" in the game's font - // (it's mapped before "1" normally) - else if (c == '0') - x_de_letra = X_N0; - else y_de_letra=Y_ACENTOS; - - if (c == '\240') x_de_letra=X_A; - else if (c =='\202') x_de_letra = X_A + 1 * 9; // B - else if (c =='\241') x_de_letra = X_A + 2 * 9; // C - else if (c =='\242') x_de_letra = X_A + 3 * 9; // D - else if (c =='\243') x_de_letra = X_A + 4 * 9; // E - else if (c =='\205') x_de_letra = X_A + 5 * 9; // F - else if (c =='\212') x_de_letra = X_A + 6 * 9; // G - else if (c =='\215') x_de_letra = X_A + 7 * 9; // H - else if (c =='\225') x_de_letra = X_A + 8 * 9; // I - else if (c =='\227') x_de_letra = X_A + 9 * 9; // J - else if (c =='\203') x_de_letra = X_A + 10 * 9; // K - else if (c =='\210') x_de_letra = X_A + 11 * 9; // L - else if (c =='\214') x_de_letra = X_A + 12 * 9; // M - else if (c =='\223') x_de_letra = X_A + 13 * 9; // N - else if (c =='\226') x_de_letra = X_GN; - else if (c =='\047') x_de_letra = X_O; - else if (c =='\200') x_de_letra = X_O + 1 * 9; // P - else if (c =='\207') x_de_letra = X_O + 1 * 9; // P - else if (c =='\265') x_de_letra = X_A; - else if (c =='\220') x_de_letra = X_A + 1 * 9; // B - else if (c =='\326') x_de_letra = X_A + 2 * 9; // C - else if (c =='\340') x_de_letra = X_A + 3 * 9; // D - else if (c =='\351') x_de_letra = X_A + 4 * 9; // E - else if (c =='\267') x_de_letra = X_A + 5 * 9; // F - else if (c =='\324') x_de_letra = X_A + 6 * 9; // G - else if (c =='\336') x_de_letra = X_A + 7 * 9; // H - else if (c =='\343') x_de_letra = X_A + 8 * 9; // I - else if (c =='\353') x_de_letra = X_A + 9 * 9; // J - else if (c =='\266') x_de_letra = X_A + 10 * 9; // K - else if (c =='\322') x_de_letra = X_A + 11 * 9; // L - else if (c =='\327') x_de_letra = X_A + 12 * 9; // M - else if (c =='\342') x_de_letra = X_A + 13 * 9; // N - else if (c =='\352') x_de_letra = X_GN; - } - pos_texto[0] = x_de_letra; - pos_texto[1] = y_de_letra; + for (int i = 0; i < CHARMAP_SIZE; i++) { + if (c == charMap[i].inChar) { + letterX = charMap[i].mappedChar; + + switch (charMap[i].charType) { + case 0: // letters + letterY = (_lang == kSpanish) ? 149 : 158; + break; + case 1: // signs + letterY = (_lang == kSpanish) ? 160 : 169; + break; + case 2: // accented + letterY = 180; + break; + } // switch + break; + } // if + } // for + + pos_texto[0] = letterX; + pos_texto[1] = letterY; pos_texto[2] = x_pantalla; pos_texto[3] = y_pantalla; pos_texto[4] = CHAR_WIDTH; @@ -1659,6 +1576,53 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) x_pantalla = 0; y_pantalla = y_pantalla + CHAR_HEIGHT + 2; } + } // for +} + +void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_pantalla, int game) { + int pos_texto[6]; + int y_de_signos, letterY, letterX = 0, h, length; + length = strlen(said); + + for (h = 0; h < length; h++) { + if (game == 1) { + letterY = 6; + y_de_signos = 15; + } else if (game == 3) { + letterY = 56; + y_de_signos = 65; + } else { + letterY = 31; + y_de_signos = 40; + } + + int c = toupper(said[h]); + + for (int i = 0; i < CHARMAP_SIZE; i++) { + if (c == charMap[i].inChar) { + // Convert the mapped char of the normal font to the + // mapped char of the dialogue font + + int multiplier = (charMap[i].mappedChar - 6) / 9; + + letterX = multiplier * 7 + 10; + + if (charMap[i].charType > 0) + letterY = y_de_signos; + break; + } // if + } // for + + pos_texto[0] = letterX; + pos_texto[1] = letterY; + pos_texto[2] = x_pantalla; + pos_texto[3] = y_pantalla; + pos_texto[4] = CHAR_WIDTH_OPC; + pos_texto[5] = CHAR_HEIGHT_OPC; + + copyRectClip(pos_texto, backSurface, screenSurface); + + x_pantalla = x_pantalla + CHAR_WIDTH_OPC; } } @@ -2708,411 +2672,6 @@ bool DrasculaEngine::pickupObject() { return false; } -bool DrasculaEngine::checkFlag(int fl) { - characterMoved = 0; - updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - - hasAnswer = 1; - - if (menuScreen == 1) { - if (num_ejec == 1) { - if (pickedObject == kVerbLook && fl == 28) - talk(328); - } else if (num_ejec == 2) { - if ((pickedObject == kVerbLook && fl == 22 && flags[23] == 0) - || (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) { - talk(164); - flags[23] = 1; - withoutVerb(); - addObject(7); - addObject(18); - } else if (pickedObject == kVerbLook && fl == 22 && flags[23] == 1) - talk(307); - else if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 7) - talk(143); - else if (pickedObject == kVerbTalk && fl == 7) - talk(144); - else if (pickedObject == kVerbLook && fl == 8) - talk(145); - else if (pickedObject == kVerbTalk && fl == 8) - talk(146); - else if (pickedObject == kVerbLook && fl == 9) - talk(147); - else if (pickedObject == kVerbTalk && fl == 9) - talk(148); - else if (pickedObject == kVerbLook && fl == 10) - talk(151); - else if (pickedObject == kVerbLook && fl == 11) - talk(152); - else if (pickedObject == kVerbTalk && fl == 11) - talk(153); - else if (pickedObject == kVerbLook && fl == 12) - talk(154); - else if (pickedObject == kVerbLook && fl == 13) - talk(155); - else if (pickedObject == kVerbLook && fl == 14) - talk(157); - else if (pickedObject == kVerbLook && fl == 15) - talk(58); - else if (pickedObject == kVerbLook && fl == 16) - talk(158); - else if (pickedObject == kVerbLook && fl == 17) - talk(159); - else if (pickedObject == kVerbLook && fl == 18) - talk(160); - else if (pickedObject == kVerbLook && fl == 19) - talk(161); - else if (pickedObject == kVerbLook && fl == 20) - talk(162); - else if (pickedObject == kVerbLook && fl == 23) - talk(152); - else - hasAnswer = 0; - } else if (num_ejec == 3) { - if (pickedObject == kVerbLook && fl == 22) - talk(307); - else if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 7) - talk(143); - else if (pickedObject == kVerbTalk && fl == 7) - talk(144); - else if (pickedObject == kVerbLook && fl == 8) - talk(145); - else if (pickedObject == kVerbTalk && fl == 8) - talk(146); - else if (pickedObject == kVerbLook && fl == 9) - talk(147); - else if (pickedObject == kVerbTalk && fl == 9) - talk(148); - else if (pickedObject == kVerbLook && fl == 10) - talk(151); - else if (pickedObject == kVerbLook && fl == 11) - talk(152); - else if (pickedObject == kVerbTalk && fl == 11) - talk(153); - else if (pickedObject == kVerbLook && fl == 12) - talk(154); - else if (pickedObject == kVerbLook && fl == 13) - talk(155); - else if (pickedObject == kVerbLook && fl == 14) - talk(157); - else if (pickedObject == kVerbLook && fl == 15) - talk(58); - else if (pickedObject == kVerbLook && fl == 16) - talk(158); - else if (pickedObject == kVerbLook && fl == 17) - talk(159); - else if (pickedObject == kVerbLook && fl == 18) - talk(160); - else if (pickedObject == kVerbLook && fl == 19) - talk(161); - else if (pickedObject == kVerbLook && fl == 20) - talk(162); - else if (pickedObject == kVerbLook && fl == 23) - talk(152); - else - hasAnswer = 0; - } else if (num_ejec == 4) { - if ((pickedObject == 18 && fl == 19) || (pickedObject == 19 && fl == 18)) { - withoutVerb(); - chooseObject(21); - removeObject(18); - removeObject(19); - } else if ((pickedObject == 14 && fl == 19) || (pickedObject == 19 && fl == 14)) - talk(484); - else if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 7) - talk(478); - else if (pickedObject == kVerbLook && fl == 8) - talk(480); - else if (pickedObject == kVerbLook && fl == 9) { - talk(482); - talk(483); - } else if (pickedObject == kVerbLook && fl == 10) - talk(485); - else if (pickedObject == kVerbLook && fl == 11) - talk(488); - else if (pickedObject == kVerbLook && fl == 12) - talk(486); - else if (pickedObject == kVerbLook && fl == 13) - talk(490); - else if (pickedObject == kVerbLook && fl == 14) - talk(122); - else if (pickedObject == kVerbLook && fl == 15) - talk(117); - else if (pickedObject == kVerbTalk && fl == 15) - talk(118); - else if (pickedObject == kVerbOpen && fl == 15) - talk(119); - else if (pickedObject == kVerbLook && fl == 16) - talk(491); - else if (pickedObject == kVerbLook && fl == 17) - talk(478); - else if (pickedObject == kVerbLook && fl == 18) - talk(493); - else if (pickedObject == kVerbLook && fl == 19) { - talk(494); - talk(495); - } else if (pickedObject == kVerbLook && fl == 20) - talk(162); - else if (pickedObject == kVerbLook && fl == 21) - talk(496); - else if (pickedObject == kVerbLook && fl == 22) - talk(161); - else - hasAnswer = 0; - } else if (num_ejec == 5) { - if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 7) - talk(478); - else if (pickedObject == kVerbLook && fl == 8) - talk(120); - else if (pickedObject == kVerbLook && fl == 9) { - talk(482); - talk(483); - } else if (pickedObject == kVerbLook && fl == 11) - talk(488); - else if (pickedObject == kVerbLook && fl == 13) - talk(490); - else if (pickedObject == kVerbLook && fl == 14) - talk(121); - else if (pickedObject == kVerbLook && fl == 15) - talk(117); - else if (pickedObject == kVerbTalk && fl == 15) - talk(118); - else if (pickedObject == kVerbOpen && fl == 15) - talk(119); - else if (pickedObject == kVerbLook && fl == 17) - talk(478); - else if (pickedObject == kVerbLook && fl == 20) - talk(162); - else - hasAnswer = 0; - } else if (num_ejec == 6) { - if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 9) { - talk(482); - talk(483); - } else if (pickedObject == kVerbLook && fl == 20) - talk(123); - else if (pickedObject == kVerbLook && fl == 21) - talk(441); - else - hasAnswer = 0; - } - } else { - if (num_ejec == 1) { - if (pickedObject == kVerbLook && fl == 50) - talk(308); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); - else if (roomNumber == 62) - room_62(fl); - else if (roomNumber == 63) - room_63(fl); - else - hasAnswer = 0; - } else if (num_ejec == 2) { - if (pickedObject == kVerbLook && fl == 50) - talk(308); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); - // Note: the original check was strcmp(num_room, "18.alg") - else if (pickedObject == 11 && fl == 50 && flags[22] == 0 && roomNumber != 18) - talk(315); - else if (pickedObject == 13 && fl == 50) - talk(156); - else if (pickedObject == 20 && fl == 50) - talk(163); - else if (roomNumber == 1) - room_1(fl); - else if (roomNumber == 3) - room_3(fl); - else if (roomNumber == 4) - room_4(fl); - else if (roomNumber == 5) - room_5(fl); - else if (roomNumber == 6) - room_6(fl); - else if (roomNumber == 7) - room_7(fl); - else if (roomNumber == 8) - room_8(fl); - else if (roomNumber == 9) - room_9(fl); - else if (roomNumber == 12) - room_12(fl); - else if (roomNumber == 14) - room_14(fl); - else if (roomNumber == 15) - room_15(fl); - else if (roomNumber == 16) - room_16(fl); - else if (roomNumber == 17) - room_17(fl); - else if (roomNumber == 18) - room_18(fl); - else if (roomNumber == 19) - room_19(fl); - else - hasAnswer = 0; - } else if (num_ejec == 3) { - if (pickedObject == kVerbLook && fl == 50) - talk(309); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); - else if (roomNumber == 13) { - if (room_13(fl)) - return true; - } else - hasAnswer = 0; - } else if (num_ejec == 4) { - if (roomNumber == 28) - talk(178); - else if (pickedObject == kVerbLook && fl == 50) - talk(309); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); - else if (pickedObject == 8 && fl == 50 && flags[18] == 0) - talk(481); - else if (pickedObject == 9 && fl == 50) - talk(484); - else if (pickedObject == 12 && fl == 50 && flags[18] == 0) - talk(487); - else if (pickedObject == 20 && fl == 50) - talk(487); - else if (roomNumber == 21) { - if (room_21(fl)) - return true; - } else if (roomNumber == 22) - room_22(fl); - else if (roomNumber == 23) - room_23(fl); - else if (roomNumber == 24) - room_24(fl); - else if (roomNumber == 26) - room_26(fl); - else if (roomNumber == 27) - room_27(fl); - else if (roomNumber == 29) - room_29(fl); - else if (roomNumber == 30) - room_30(fl); - else if (roomNumber == 31) - room_31(fl); - else if (roomNumber == 34) - room_34(fl); - else if (roomNumber == 35) - room_35(fl); - else if (roomNumber == 44) - room_44(fl); - else - hasAnswer = 0; - } else if (num_ejec == 5) { - if (pickedObject == kVerbLook && fl == 50) - talk("Cuanto mas me miro, mas me gusto", "54.als"); - else if (pickedObject == kVerbOpen && fl == 50) - talk("y luego como me cierro", "19.als"); - else if (pickedObject == kVerbClose && fl == 50) - talk("Tendre que abrirme primero no", "19.als"); - else if (pickedObject == kVerbMove && fl == 50) - talk("Estoy bien donde estoy", "19.als"); - else if (pickedObject == kVerbPick && fl == 50) - talk("Ya me tengo", "11.als"); - else if (pickedObject == kVerbTalk && fl == 50) - talk("hola yo", "16.als"); - else if (pickedObject == 20 && fl == 50) - talk(487); - else if (roomNumber == 49) - room_49(fl); - else if (roomNumber == 53) - room_53(fl); - else if (roomNumber == 54) - room_54(fl); - else if (roomNumber == 55) - room_55(fl); - else if (roomNumber == 56) { - if (room_56(fl)) - return true; - } else - hasAnswer = 0; - } else if (num_ejec == 6) { - if (pickedObject == kVerbLook && fl == 50 && flags[0] == 1) - talk(308); - else if (pickedObject == kVerbLook && fl == 50 && flags[0] == 0) - talk(310 ); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310 ); - else if (pickedObject == kVerbClose && fl == 50) - talk(311 ); - else if (pickedObject == kVerbMove && fl == 50) - talk(312 ); - else if (pickedObject == kVerbPick && fl == 50) - talk(313 ); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314 ); - else if (roomNumber == 102) - room_pendulum(fl); - else if (roomNumber == 58) - room_58(fl); - else if (roomNumber == 59) - room_59(fl); - else if (roomNumber == 60) { - if (room_60(fl)) - return true; - } else if (roomNumber == 61) - room_61(fl); - else - hasAnswer = 0; - } - } - if (hasAnswer == 0 && hasName == 1) - room_0(); - else if (hasAnswer == 0 && menuScreen == 1) - room_0(); - - return false; -} - void DrasculaEngine::setCursorTable() { int cursorPos[8]; @@ -3816,114 +3375,6 @@ bucle_opc: withoutVerb(); } -void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_pantalla, int game) { - int pos_texto[6]; - int y_de_signos, y_de_letra, x_de_letra = 0, h, length; - length = strlen(said); - - for (h = 0; h < length; h++) { - if (game == 1) { - y_de_letra = Y_ABC_OPC_1; - y_de_signos = Y_SIGNOS_OPC_1; - } else if (game == 3) { - y_de_letra = Y_ABC_OPC_3; - y_de_signos = Y_SIGNOS_OPC_3; - } else { - y_de_letra = Y_ABC_OPC_2; - y_de_signos = Y_SIGNOS_OPC_2; - } - - int c = toupper(said[h]); - - if (c == '\265') x_de_letra = X_A_OPC; - else if (c == '\267') x_de_letra = X_A_OPC; - else if (c == '\266') x_de_letra = X_A_OPC; - else if (c == '\200') x_de_letra = X_A_OPC + 2 * 7; // C - else if (c == '\207') x_de_letra = X_A_OPC + 2 * 7; // C - else if (c == '\220') x_de_letra = X_A_OPC + 4 * 7; // E - else if (c == '\324') x_de_letra = X_A_OPC + 4 * 7; // E - else if (c == '\322') x_de_letra = X_A_OPC + 4 * 7; // E - else if (c == '\326') x_de_letra = X_A_OPC + 8 * 7; // I - else if (c == '\336') x_de_letra = X_A_OPC + 8 * 7; // I - else if (c == '\327') x_de_letra = X_A_OPC + 8 * 7; // I - else if (c == '\047') x_de_letra = X_GN_OPC; - else if (c == '\340') x_de_letra = X_O_OPC; - else if (c == '\342') x_de_letra = X_O_OPC; - else if (c == '\343') x_de_letra = X_O_OPC; - else if (c == '\353') x_de_letra = X_O_OPC + 6 * 7; // U - else if (c == '\352') x_de_letra = X_O_OPC + 6 * 7; // U - else if (c == '\351') x_de_letra = X_O_OPC + 6 * 7; // U - else if (c >= 'A' && c <= 'N') - x_de_letra = X_A_OPC + (c - 'A') * 7; - else if (c >= 'O' && c <= 'Z') - x_de_letra = X_O_OPC + (c - 'O') * 7; - else if (c == ' ') - x_de_letra = SPACE_OPC; - else { - y_de_letra = y_de_signos; - if (c == '.') - x_de_letra = X_DOT_OPC; - else if (c == ',') - x_de_letra = X_COMA_OPC; - else if (c == '-') - x_de_letra = X_HYPHEN_OPC; - else if (c == '?') - x_de_letra = X_CIERRA_INTERROGACION_OPC; - else if (c == 0xa8) - x_de_letra = X_ABRE_INTERROGACION_OPC; -// else if (c == '\'') // FIXME -// x_de_letra = SPACE; // space for now - else if (c == '"') - x_de_letra = X_COMILLAS_OPC; - else if (c == '!') - x_de_letra = X_CIERRA_INTERROGACION_OPC; - else if (c == 0xad) - x_de_letra = X_ABRE_EXCLAMACION_OPC; - else if (c == ';') - x_de_letra = X_pointY_COMA_OPC; - else if (c == '>') - x_de_letra = X_GREATER_THAN_OPC; - else if (c == '<') - x_de_letra = X_LESSER_THAN_OPC; - else if (c == '$') - x_de_letra = X_DOLAR_OPC; - else if (c == '%') - x_de_letra = X_PERCENT_OPC; - else if (c == ':') - x_de_letra = X_DOS_PUNTOS_OPC; - else if (c == '&') - x_de_letra = X_AND_OPC; - else if (c == '/') - x_de_letra = X_BARRA_OPC; - else if (c == '(') - x_de_letra = X_BRACKET_OPEN_OPC; - else if (c == ')') - x_de_letra = X_BRACKET_CLOSE_OPC; - else if (c == '*') - x_de_letra = X_ASTERISCO_OPC; - else if (c == '+') - x_de_letra = X_PLUS_OPC; - else if (c >= '1' && c <= '9') - x_de_letra = X_N1_OPC + (c - '1') * 7; - // "0" is mapped after "9" in the game's font - // (it's mapped before "1" normally) - else if (c == '0') - x_de_letra = X_N0_OPC; - } - - pos_texto[0] = x_de_letra; - pos_texto[1] = y_de_letra; - pos_texto[2] = x_pantalla; - pos_texto[3] = y_pantalla; - pos_texto[4] = CHAR_WIDTH_OPC; - pos_texto[5] = CHAR_HEIGHT_OPC; - - copyRectClip(pos_texto, backSurface, screenSurface); - - x_pantalla = x_pantalla + CHAR_WIDTH_OPC; - } -} - void DrasculaEngine::response(int function) { if (num_ejec == 1) { if (function == 10) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index ed65a00266..3614099167 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -106,6 +106,13 @@ struct ItemLocation { int y; }; +struct CharInfo { + int inChar; + int mappedChar; + int charType; // 0 - letters, 1 - signs, 2 - accented +}; + +#define CHARMAP_SIZE 93 #define NUM_SAVES 10 #define NUM_FLAGS 50 #define DIF_MASK 55 @@ -117,47 +124,6 @@ struct ItemLocation { #define CHAR_WIDTH 8 #define CHAR_HEIGHT 6 -#define Y_ABC 158 -#define Y_ABC_ESP 149 -#define Y_SIGNOS 169 -#define Y_SIGNOS_ESP 160 -#define Y_ACENTOS 180 - -// Normal font, each letter has a space of 9 from the next -// Spanish has a special character, defined as "X_GN" -// after N, so these are split from A-N and O-Z -#define X_A 6 -// (...) -#define X_N 123 -#define X_GN 132 -#define X_O 141 -// (...) -#define X_Z 240 -#define X_DOT 6 -#define X_COMA 15 -#define X_HYPHEN 24 -#define X_CIERRA_INTERROGACION 33 -#define X_ABRE_INTERROGACION 42 -#define X_COMILLAS 51 -#define X_CIERRA_EXCLAMACION 60 -#define X_ABRE_EXCLAMACION 69 -#define X_pointY_COMA 78 -#define X_GREATER_THAN 87 -#define X_LESSER_THAN 96 -#define X_DOLAR 105 -#define X_PERCENT 114 -#define X_DOS_PUNTOS 123 -#define X_AND 132 -#define X_BARRA 141 -#define X_BRACKET_OPEN 150 -#define X_BRACKET_CLOSE 159 -#define X_ASTERISCO 168 -#define X_PLUS 177 -// Normal font, each number has a space of 9 from the next -#define X_N1 186 -// (...) -#define X_N0 267 -#define SPACE 250 #define ALTO_TALK_HARE 25 #define ANCHO_TALK_HARE 23 #define PASO_HARE_X 8 @@ -168,47 +134,6 @@ struct ItemLocation { #define CHAR_WIDTH_OPC 6 #define CHAR_HEIGHT_OPC 5 -#define Y_ABC_OPC_1 6 -#define Y_SIGNOS_OPC_1 15 -#define Y_ABC_OPC_2 31 -#define Y_SIGNOS_OPC_2 40 -#define Y_ABC_OPC_3 56 -#define Y_SIGNOS_OPC_3 65 -// Dialog font, each letter has a space of 7 from the next -// Spanish has a special character, defined as "X_GN_OPC" -// after N, so these are split from A-N and O-Z -#define X_A_OPC 10 -// (...) -#define X_N_OPC 101 -#define X_GN_OPC 108 -#define X_O_OPC 115 -// (...) -#define X_Z_OPC 192 -#define SPACE_OPC 199 -#define X_DOT_OPC 10 -#define X_COMA_OPC 17 -#define X_HYPHEN_OPC 24 -#define X_CIERRA_INTERROGACION_OPC 31 -#define X_ABRE_INTERROGACION_OPC 38 -#define X_COMILLAS_OPC 45 -#define X_CIERRA_EXCLAMACION_OPC 52 -#define X_ABRE_EXCLAMACION_OPC 59 -#define X_pointY_COMA_OPC 66 -#define X_GREATER_THAN_OPC 73 -#define X_LESSER_THAN_OPC 80 -#define X_DOLAR_OPC 87 -#define X_PERCENT_OPC 94 -#define X_DOS_PUNTOS_OPC 101 -#define X_AND_OPC 108 -#define X_BARRA_OPC 115 -#define X_BRACKET_OPEN_OPC 122 -#define X_BRACKET_CLOSE_OPC 129 -#define X_ASTERISCO_OPC 136 -#define X_PLUS_OPC 143 -// Dialog font, each number has a space of 7 from the next -#define X_N1_OPC 150 -// (...) -#define X_N0_OPC 213 #define NO_DOOR 99 #define COMPLETE_PAL 256 @@ -755,12 +680,14 @@ extern const char *_textverbs[][6]; extern const char *_textmisc[][2]; extern const char *_textd1[][11]; -extern ItemLocation itemLocations[]; +extern const ItemLocation itemLocations[]; extern int frame_x[20]; extern const int x_pol[44], y_pol[44]; extern const int x_barra[]; extern const int x1d_menu[], y1d_menu[]; +extern const CharInfo charMap[]; + } // End of namespace Drascula #endif /* DRASCULA_H */ diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index d8a9964222..44f1d76615 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1800,4 +1800,409 @@ void DrasculaEngine::update_pendulum() { } } +bool DrasculaEngine::checkFlag(int fl) { + characterMoved = 0; + updateRoom(); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + + hasAnswer = 1; + + if (menuScreen == 1) { + if (num_ejec == 1) { + if (pickedObject == kVerbLook && fl == 28) + talk(328); + } else if (num_ejec == 2) { + if ((pickedObject == kVerbLook && fl == 22 && flags[23] == 0) + || (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) { + talk(164); + flags[23] = 1; + withoutVerb(); + addObject(7); + addObject(18); + } else if (pickedObject == kVerbLook && fl == 22 && flags[23] == 1) + talk(307); + else if (pickedObject == kVerbLook && fl == 28) + talk(328); + else if (pickedObject == kVerbLook && fl == 7) + talk(143); + else if (pickedObject == kVerbTalk && fl == 7) + talk(144); + else if (pickedObject == kVerbLook && fl == 8) + talk(145); + else if (pickedObject == kVerbTalk && fl == 8) + talk(146); + else if (pickedObject == kVerbLook && fl == 9) + talk(147); + else if (pickedObject == kVerbTalk && fl == 9) + talk(148); + else if (pickedObject == kVerbLook && fl == 10) + talk(151); + else if (pickedObject == kVerbLook && fl == 11) + talk(152); + else if (pickedObject == kVerbTalk && fl == 11) + talk(153); + else if (pickedObject == kVerbLook && fl == 12) + talk(154); + else if (pickedObject == kVerbLook && fl == 13) + talk(155); + else if (pickedObject == kVerbLook && fl == 14) + talk(157); + else if (pickedObject == kVerbLook && fl == 15) + talk(58); + else if (pickedObject == kVerbLook && fl == 16) + talk(158); + else if (pickedObject == kVerbLook && fl == 17) + talk(159); + else if (pickedObject == kVerbLook && fl == 18) + talk(160); + else if (pickedObject == kVerbLook && fl == 19) + talk(161); + else if (pickedObject == kVerbLook && fl == 20) + talk(162); + else if (pickedObject == kVerbLook && fl == 23) + talk(152); + else + hasAnswer = 0; + } else if (num_ejec == 3) { + if (pickedObject == kVerbLook && fl == 22) + talk(307); + else if (pickedObject == kVerbLook && fl == 28) + talk(328); + else if (pickedObject == kVerbLook && fl == 7) + talk(143); + else if (pickedObject == kVerbTalk && fl == 7) + talk(144); + else if (pickedObject == kVerbLook && fl == 8) + talk(145); + else if (pickedObject == kVerbTalk && fl == 8) + talk(146); + else if (pickedObject == kVerbLook && fl == 9) + talk(147); + else if (pickedObject == kVerbTalk && fl == 9) + talk(148); + else if (pickedObject == kVerbLook && fl == 10) + talk(151); + else if (pickedObject == kVerbLook && fl == 11) + talk(152); + else if (pickedObject == kVerbTalk && fl == 11) + talk(153); + else if (pickedObject == kVerbLook && fl == 12) + talk(154); + else if (pickedObject == kVerbLook && fl == 13) + talk(155); + else if (pickedObject == kVerbLook && fl == 14) + talk(157); + else if (pickedObject == kVerbLook && fl == 15) + talk(58); + else if (pickedObject == kVerbLook && fl == 16) + talk(158); + else if (pickedObject == kVerbLook && fl == 17) + talk(159); + else if (pickedObject == kVerbLook && fl == 18) + talk(160); + else if (pickedObject == kVerbLook && fl == 19) + talk(161); + else if (pickedObject == kVerbLook && fl == 20) + talk(162); + else if (pickedObject == kVerbLook && fl == 23) + talk(152); + else + hasAnswer = 0; + } else if (num_ejec == 4) { + if ((pickedObject == 18 && fl == 19) || (pickedObject == 19 && fl == 18)) { + withoutVerb(); + chooseObject(21); + removeObject(18); + removeObject(19); + } else if ((pickedObject == 14 && fl == 19) || (pickedObject == 19 && fl == 14)) + talk(484); + else if (pickedObject == kVerbLook && fl == 28) + talk(328); + else if (pickedObject == kVerbLook && fl == 7) + talk(478); + else if (pickedObject == kVerbLook && fl == 8) + talk(480); + else if (pickedObject == kVerbLook && fl == 9) { + talk(482); + talk(483); + } else if (pickedObject == kVerbLook && fl == 10) + talk(485); + else if (pickedObject == kVerbLook && fl == 11) + talk(488); + else if (pickedObject == kVerbLook && fl == 12) + talk(486); + else if (pickedObject == kVerbLook && fl == 13) + talk(490); + else if (pickedObject == kVerbLook && fl == 14) + talk(122); + else if (pickedObject == kVerbLook && fl == 15) + talk(117); + else if (pickedObject == kVerbTalk && fl == 15) + talk(118); + else if (pickedObject == kVerbOpen && fl == 15) + talk(119); + else if (pickedObject == kVerbLook && fl == 16) + talk(491); + else if (pickedObject == kVerbLook && fl == 17) + talk(478); + else if (pickedObject == kVerbLook && fl == 18) + talk(493); + else if (pickedObject == kVerbLook && fl == 19) { + talk(494); + talk(495); + } else if (pickedObject == kVerbLook && fl == 20) + talk(162); + else if (pickedObject == kVerbLook && fl == 21) + talk(496); + else if (pickedObject == kVerbLook && fl == 22) + talk(161); + else + hasAnswer = 0; + } else if (num_ejec == 5) { + if (pickedObject == kVerbLook && fl == 28) + talk(328); + else if (pickedObject == kVerbLook && fl == 7) + talk(478); + else if (pickedObject == kVerbLook && fl == 8) + talk(120); + else if (pickedObject == kVerbLook && fl == 9) { + talk(482); + talk(483); + } else if (pickedObject == kVerbLook && fl == 11) + talk(488); + else if (pickedObject == kVerbLook && fl == 13) + talk(490); + else if (pickedObject == kVerbLook && fl == 14) + talk(121); + else if (pickedObject == kVerbLook && fl == 15) + talk(117); + else if (pickedObject == kVerbTalk && fl == 15) + talk(118); + else if (pickedObject == kVerbOpen && fl == 15) + talk(119); + else if (pickedObject == kVerbLook && fl == 17) + talk(478); + else if (pickedObject == kVerbLook && fl == 20) + talk(162); + else + hasAnswer = 0; + } else if (num_ejec == 6) { + if (pickedObject == kVerbLook && fl == 28) + talk(328); + else if (pickedObject == kVerbLook && fl == 9) { + talk(482); + talk(483); + } else if (pickedObject == kVerbLook && fl == 20) + talk(123); + else if (pickedObject == kVerbLook && fl == 21) + talk(441); + else + hasAnswer = 0; + } + } else { + if (num_ejec == 1) { + if (pickedObject == kVerbLook && fl == 50) + talk(308); + else if (pickedObject == kVerbOpen && fl == 50) + talk(310); + else if (pickedObject == kVerbClose && fl == 50) + talk(311); + else if (pickedObject == kVerbMove && fl == 50) + talk(312); + else if (pickedObject == kVerbPick && fl == 50) + talk(313); + else if (pickedObject == kVerbTalk && fl == 50) + talk(314); + else if (roomNumber == 62) + room_62(fl); + else if (roomNumber == 63) + room_63(fl); + else + hasAnswer = 0; + } else if (num_ejec == 2) { + if (pickedObject == kVerbLook && fl == 50) + talk(308); + else if (pickedObject == kVerbOpen && fl == 50) + talk(310); + else if (pickedObject == kVerbClose && fl == 50) + talk(311); + else if (pickedObject == kVerbMove && fl == 50) + talk(312); + else if (pickedObject == kVerbPick && fl == 50) + talk(313); + else if (pickedObject == kVerbTalk && fl == 50) + talk(314); + // Note: the original check was strcmp(num_room, "18.alg") + else if (pickedObject == 11 && fl == 50 && flags[22] == 0 && roomNumber != 18) + talk(315); + else if (pickedObject == 13 && fl == 50) + talk(156); + else if (pickedObject == 20 && fl == 50) + talk(163); + else if (roomNumber == 1) + room_1(fl); + else if (roomNumber == 3) + room_3(fl); + else if (roomNumber == 4) + room_4(fl); + else if (roomNumber == 5) + room_5(fl); + else if (roomNumber == 6) + room_6(fl); + else if (roomNumber == 7) + room_7(fl); + else if (roomNumber == 8) + room_8(fl); + else if (roomNumber == 9) + room_9(fl); + else if (roomNumber == 12) + room_12(fl); + else if (roomNumber == 14) + room_14(fl); + else if (roomNumber == 15) + room_15(fl); + else if (roomNumber == 16) + room_16(fl); + else if (roomNumber == 17) + room_17(fl); + else if (roomNumber == 18) + room_18(fl); + else if (roomNumber == 19) + room_19(fl); + else + hasAnswer = 0; + } else if (num_ejec == 3) { + if (pickedObject == kVerbLook && fl == 50) + talk(309); + else if (pickedObject == kVerbOpen && fl == 50) + talk(310); + else if (pickedObject == kVerbClose && fl == 50) + talk(311); + else if (pickedObject == kVerbMove && fl == 50) + talk(312); + else if (pickedObject == kVerbPick && fl == 50) + talk(313); + else if (pickedObject == kVerbTalk && fl == 50) + talk(314); + else if (roomNumber == 13) { + if (room_13(fl)) + return true; + } else + hasAnswer = 0; + } else if (num_ejec == 4) { + if (roomNumber == 28) + talk(178); + else if (pickedObject == kVerbLook && fl == 50) + talk(309); + else if (pickedObject == kVerbOpen && fl == 50) + talk(310); + else if (pickedObject == kVerbClose && fl == 50) + talk(311); + else if (pickedObject == kVerbMove && fl == 50) + talk(312); + else if (pickedObject == kVerbPick && fl == 50) + talk(313); + else if (pickedObject == kVerbTalk && fl == 50) + talk(314); + else if (pickedObject == 8 && fl == 50 && flags[18] == 0) + talk(481); + else if (pickedObject == 9 && fl == 50) + talk(484); + else if (pickedObject == 12 && fl == 50 && flags[18] == 0) + talk(487); + else if (pickedObject == 20 && fl == 50) + talk(487); + else if (roomNumber == 21) { + if (room_21(fl)) + return true; + } else if (roomNumber == 22) + room_22(fl); + else if (roomNumber == 23) + room_23(fl); + else if (roomNumber == 24) + room_24(fl); + else if (roomNumber == 26) + room_26(fl); + else if (roomNumber == 27) + room_27(fl); + else if (roomNumber == 29) + room_29(fl); + else if (roomNumber == 30) + room_30(fl); + else if (roomNumber == 31) + room_31(fl); + else if (roomNumber == 34) + room_34(fl); + else if (roomNumber == 35) + room_35(fl); + else if (roomNumber == 44) + room_44(fl); + else + hasAnswer = 0; + } else if (num_ejec == 5) { + if (pickedObject == kVerbLook && fl == 50) + talk("Cuanto mas me miro, mas me gusto", "54.als"); + else if (pickedObject == kVerbOpen && fl == 50) + talk("y luego como me cierro", "19.als"); + else if (pickedObject == kVerbClose && fl == 50) + talk("Tendre que abrirme primero no", "19.als"); + else if (pickedObject == kVerbMove && fl == 50) + talk("Estoy bien donde estoy", "19.als"); + else if (pickedObject == kVerbPick && fl == 50) + talk("Ya me tengo", "11.als"); + else if (pickedObject == kVerbTalk && fl == 50) + talk("hola yo", "16.als"); + else if (pickedObject == 20 && fl == 50) + talk(487); + else if (roomNumber == 49) + room_49(fl); + else if (roomNumber == 53) + room_53(fl); + else if (roomNumber == 54) + room_54(fl); + else if (roomNumber == 55) + room_55(fl); + else if (roomNumber == 56) { + if (room_56(fl)) + return true; + } else + hasAnswer = 0; + } else if (num_ejec == 6) { + if (pickedObject == kVerbLook && fl == 50 && flags[0] == 1) + talk(308); + else if (pickedObject == kVerbLook && fl == 50 && flags[0] == 0) + talk(310 ); + else if (pickedObject == kVerbOpen && fl == 50) + talk(310 ); + else if (pickedObject == kVerbClose && fl == 50) + talk(311 ); + else if (pickedObject == kVerbMove && fl == 50) + talk(312 ); + else if (pickedObject == kVerbPick && fl == 50) + talk(313 ); + else if (pickedObject == kVerbTalk && fl == 50) + talk(314 ); + else if (roomNumber == 102) + room_pendulum(fl); + else if (roomNumber == 58) + room_58(fl); + else if (roomNumber == 59) + room_59(fl); + else if (roomNumber == 60) { + if (room_60(fl)) + return true; + } else if (roomNumber == 61) + room_61(fl); + else + hasAnswer = 0; + } + } + if (hasAnswer == 0 && hasName == 1) + room_0(); + else if (hasAnswer == 0 && menuScreen == 1) + room_0(); + + return false; +} + } // End of namespace Drascula diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 937f3460b7..eddccd3b98 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -30,7 +30,64 @@ namespace Drascula { -ItemLocation itemLocations[] = { +const CharInfo charMap[CHARMAP_SIZE] = { + // Letters + // --------------------------------------- + { 'A', 6, 0 }, { 'B', 15, 0 }, + { 'C', 24, 0 }, { 'D', 33, 0 }, + { 'E', 42, 0 }, { 'F', 51, 0 }, + { 'G', 60, 0 }, { 'H', 69, 0 }, + { 'I', 78, 0 }, { 'J', 87, 0 }, + { 'K', 96, 0 }, { 'L', 105, 0 }, + { 'M', 114, 0 }, { 'N', 123, 0 }, + { '\244', 132, 0 }, { '\245', 132, 0 }, // special Spanish char + { 'O', 141, 0 }, { 'P', 150, 0 }, + { 'Q', 159, 0 }, { 'R', 168, 0 }, + { 'S', 177, 0 }, { 'T', 186, 0 }, + { 'U', 195, 0 }, { 'V', 204, 0 }, + { 'W', 213, 0 }, { 'X', 222, 0 }, + { 'Y', 231, 0 }, { 'Z', 240, 0 }, + // --------------------------------------- + { 0xa7, 250, 0 }, { ' ', 250, 0 }, + // Signs + // --------------------------------------- + { '.', 6, 1 }, { ',', 15, 1 }, + { '-', 24, 1 }, { '?', 33, 1 }, + { '\250', 42, 1 }, { '"', 51, 1 }, + { '!', 60, 1 }, { '\255', 69, 1 }, + { ';', 78, 1 }, { '>', 87, 1 }, + { '<', 96, 1 }, { '$', 105, 1 }, + { '%', 114, 1 }, { ':', 123, 1 }, + { '&', 132, 1 }, { '/', 141, 1 }, + { '(', 150, 1 }, { ')', 159, 1 }, + { '*', 168, 1 }, { '+', 177, 1 }, + { '1', 186, 1 }, { '2', 195, 1 }, + { '3', 204, 1 }, { '4', 213, 1 }, + { '5', 222, 1 }, { '6', 231, 1 }, + { '7', 240, 1 }, { '8', 249, 1 }, + { '9', 258, 1 }, { '0', 267, 1 }, + // Accented + // --------------------------------------- + { '\240', 6, 2 }, { '\202', 15, 2 }, // A, B + { '\241', 24, 2 }, { '\242', 33, 2 }, // C, D + { '\243', 42, 2 }, { '\205', 51, 2 }, // E, F + { '\212', 60, 2 }, { '\215', 69, 2 }, // G, H + { '\225', 78, 2 }, { '\227', 87, 2 }, // I, J + { '\203', 96, 2 }, { '\210', 105, 2 }, // K, L + { '\214', 114, 2 }, { '\223', 123, 2 }, // M, N + { '\226', 132, 2 }, { '\047', 141, 2 }, // special Spanish char, O + { '\200', 150, 2 }, { '\207', 150, 2 }, // P, P + { '\265', 6, 2 }, { '\220', 15, 2 }, // A, B + { '\326', 24, 2 }, { '\340', 33, 2 }, // C, D + { '\351', 42, 2 }, { '\267', 51, 2 }, // E, F + { '\324', 60, 2 }, { '\336', 69, 2 }, // G, H + { '\343', 78, 2 }, { '\353', 87, 2 }, // I, J + { '\266', 96, 2 }, { '\322', 105, 2 }, // K, L + { '\327', 114, 2 }, { '\342', 123, 2 }, // M, N + { '\352', 132, 0 } // special Spanish char +}; + +const ItemLocation itemLocations[] = { { 0, 0 }, // empty { 5, 10 }, { 50, 10 }, { 95, 10 }, // 1-3 { 140, 10 }, { 185, 10 }, { 230, 10 }, // 4-6 -- cgit v1.2.3 From ab81c9bb907f41d0543661e2a7068d3402b34c3c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 30 May 2008 23:53:17 +0000 Subject: The game's screensaver should now kick in correctly svn-id: r32408 --- engines/drascula/drascula.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 3e5d0b3d18..c6da2913e0 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -712,7 +712,7 @@ bucles: cont_sv = 0; } else if (num_ejec == 6 && key == Common::KEYCODE_0 && roomNumber == 61) { loadAndDecompressPic("alcbar.alg", drawSurface1, 255); - } else if (cont_sv == 1500) { + } else if (cont_sv == 15000) { screenSaver(); if (num_ejec != 3) cont_sv = 0; -- cgit v1.2.3 From 178e4e805f7ba5ffc59bc374761dd8700e310d4c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 31 May 2008 00:06:05 +0000 Subject: tabernero -> bartender anexo -> joined LimitaVGA -> adjustToVGA velas -> candles VelocidadDeFundido -> fadeSpeed anda_parriba -> walkUp anda_pabajo -> walkDown svn-id: r32409 --- engines/drascula/animation.cpp | 50 +++++++++++++++++++++--------------------- engines/drascula/drascula.cpp | 26 +++++++++++----------- engines/drascula/drascula.h | 20 ++++++++--------- engines/drascula/rooms.cpp | 34 ++++++++++++++-------------- engines/drascula/talk.cpp | 6 ++--- 5 files changed, 68 insertions(+), 68 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index f06a777bbd..476376ab9b 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -403,7 +403,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_tabernero(22); + talk_bartender(22); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -597,22 +597,22 @@ void DrasculaEngine::animation_3_1() { loadAndDecompressPic("an11y13.alg", extraSurface, 1); talk(192); - talk_tabernero(1); + talk_bartender(1); talk(193); - talk_tabernero(2); + talk_bartender(2); talk(194); - talk_tabernero(3); + talk_bartender(3); talk(195); - talk_tabernero(4); + talk_bartender(4); talk(196); - talk_tabernero(5); - talk_tabernero(6); + talk_bartender(5); + talk_bartender(6); talk(197); - talk_tabernero(7); + talk_bartender(7); talk(198); - talk_tabernero(8); + talk_bartender(8); talk(199); - talk_tabernero(9); + talk_bartender(9); talk(200); talk(201); talk(202); @@ -1079,9 +1079,9 @@ void DrasculaEngine::animation_23_2() { talk_vb(18); if (flags[29] == 0) - animation_23_anexo(); + animation_23_joined(); else - animation_23_anexo2(); + animation_23_joined2(); sentido_vb = 2; animation_25_2(); @@ -1106,7 +1106,7 @@ void DrasculaEngine::animation_23_2() { rompo_y_salgo = 1; } -void DrasculaEngine::animation_23_anexo() { +void DrasculaEngine::animation_23_joined() { int n, p_x = hare_x + 2, p_y = hare_y - 3; int x[] = {1, 38, 75, 112, 75, 112, 75, 112, 149, 112, 149, 112, 149, 186, 223, 260, 1, 38, 75, 112, 149, 112, 149, 112, 149, 112, 149, 186, 223, 260, 260, 260, 260, 223}; @@ -1126,7 +1126,7 @@ void DrasculaEngine::animation_23_anexo() { loadAndDecompressPic("99.alg", backSurface, 1); } -void DrasculaEngine::animation_23_anexo2() { +void DrasculaEngine::animation_23_joined2() { int n, p_x = hare_x + 4, p_y = hare_y; int x[] = {1, 35, 69, 103, 137, 171, 205, 239, 273, 1, 35, 69, 103, 137}; int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 73, 73, 73, 73}; @@ -1711,19 +1711,19 @@ void DrasculaEngine::animation_12_5() { for (fundido = 1; fundido >= 0; fundido--) { for (color = 0; color < 128; color++) for (component = 0; component < 3; component++) - bgPalette1[color][component] = LimitaVGA(bgPalette1[color][component] - 8 + fundido); + bgPalette1[color][component] = adjustToVGA(bgPalette1[color][component] - 8 + fundido); } for (fundido = 2; fundido >= 0; fundido--) { for (color = 0; color < 128; color++) for (component = 0; component < 3; component++) - bgPalette2[color][component] = LimitaVGA(bgPalette2[color][component] - 8 + fundido); + bgPalette2[color][component] = adjustToVGA(bgPalette2[color][component] - 8 + fundido); } for (fundido = 3; fundido >= 0; fundido--) { for (color = 0; color < 128; color++) for (component = 0; component < 3; component++) - bgPalette3[color][component] = LimitaVGA(bgPalette3[color][component] - 8 + fundido); + bgPalette3[color][component] = adjustToVGA(bgPalette3[color][component] - 8 + fundido); } loadAndDecompressPic("3an11_1.alg", backSurface, 1); @@ -2255,14 +2255,14 @@ void DrasculaEngine::animation_11_2() { loadAndDecompressPic("an11y13.alg", extraSurface, 1); talk(352); - talk_tabernero(1); + talk_bartender(1); talk(353); - talk_tabernero(17); + talk_bartender(17); talk(354); - talk_tabernero(18); + talk_bartender(18); talk(355); pause(40); - talk_tabernero("No, nada", "d82.als"); + talk_bartender("No, nada", "d82.als"); if (_lang == kSpanish) textSurface = extraSurface; @@ -2400,12 +2400,12 @@ void DrasculaEngine::animation_36_2() { loadAndDecompressPic("an11y13.alg", extraSurface, 1); talk(404); - talk_tabernero(19); - talk_tabernero(20); - talk_tabernero(21); + talk_bartender(19); + talk_bartender(20); + talk_bartender(21); talk(355); pause(40); - talk_tabernero("No, nada", "d82.als"); + talk_bartender("No, nada", "d82.als"); if (_lang == kSpanish) textSurface = extraSurface; diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index c6da2913e0..49d64cfd63 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -137,7 +137,7 @@ int DrasculaEngine::go() { vb_x = 120; sentido_vb = 1; vb_se_mueve = 0; frame_vb = 1; frame_piano = 0; frame_drunk = 0; - frame_velas = 0; + frame_candles = 0; cont_sv = 0; term_int = 0; musicStopped = 0; @@ -1782,7 +1782,7 @@ void DrasculaEngine::fliplay(const char *filefli, int vel) { EndSSN(); } -void DrasculaEngine::fadeFromBlack(int VelocidadDeFundido) { +void DrasculaEngine::fadeFromBlack(int fadeSpeed) { char fundido; unsigned int color, component; @@ -1791,10 +1791,10 @@ void DrasculaEngine::fadeFromBlack(int VelocidadDeFundido) { for (fundido = 0; fundido < 64; fundido++) { for (color = 0; color < 256; color++) { for (component = 0; component < 3; component++) { - palFundido[color][component] = LimitaVGA(gamePalette[color][component] - 63 + fundido); + palFundido[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fundido); } } - pause(VelocidadDeFundido); + pause(fadeSpeed); setPalette((byte *)&palFundido); } @@ -1820,7 +1820,7 @@ void DrasculaEngine::color_abc(int cl) { setPalette((byte *)&gamePalette); } -char DrasculaEngine::LimitaVGA(char value) { +char DrasculaEngine::adjustToVGA(char value) { return (value & 0x3F) * (value > 0); } @@ -1971,7 +1971,7 @@ void DrasculaEngine::animastopSound_corte() { } } -void DrasculaEngine::fadeToBlack(int VelocidadDeFundido) { +void DrasculaEngine::fadeToBlack(int fadeSpeed) { char fundido; unsigned int color, component; @@ -1980,10 +1980,10 @@ void DrasculaEngine::fadeToBlack(int VelocidadDeFundido) { for (fundido = 63; fundido >= 0; fundido--) { for (color = 0; color < 256; color++) { for (component = 0; component < 3; component++) { - palFundido[color][component] = LimitaVGA(gamePalette[color][component] - 63 + fundido); + palFundido[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fundido); } } - pause(VelocidadDeFundido); + pause(fadeSpeed); setPalette((byte *)&palFundido); } @@ -2228,7 +2228,7 @@ void DrasculaEngine::funde_hare(int oscuridad) { for (fundido = oscuridad; fundido >= 0; fundido--) { for (color = 235; color < 253; color++) { for (component = 0; component < 3; component++) - gamePalette[color][component] = LimitaVGA(gamePalette[color][component] - 8 + fundido); + gamePalette[color][component] = adjustToVGA(gamePalette[color][component] - 8 + fundido); } } @@ -2280,9 +2280,9 @@ void DrasculaEngine::startWalking() { else if ((sitio_x > hare_x + ancho_hare) && (sitio_y > (hare_y + alto_hare))) quadrant_4(); else if (sitio_y < hare_y + alto_hare) - anda_parriba(); + walkUp(); else if (sitio_y > hare_y + alto_hare) - anda_pabajo(); + walkDown(); } else { if ((sitio_x < hare_x + ancho_hare / 2 ) && (sitio_y <= (hare_y + alto_hare))) quadrant_1(); @@ -3606,13 +3606,13 @@ void DrasculaEngine::updateData() { } } -void DrasculaEngine::anda_pabajo() { +void DrasculaEngine::walkDown() { direccion_hare = 4; sentido_hare = 3; stepX = 0; } -void DrasculaEngine::anda_parriba() { +void DrasculaEngine::walkUp() { direccion_hare = 0; sentido_hare = 2; stepX = 0; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 3614099167..55db43c348 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -267,7 +267,7 @@ public: int factor_red[202]; int frame_piano; int frame_drunk; - int frame_velas; + int frame_candles; int color_solo; int blinking; int x_igor, y_igor, sentido_igor; @@ -291,8 +291,8 @@ public: bool escoba(); void black(); void pickObject(int); - void anda_parriba(); - void anda_pabajo(); + void walkUp(); + void walkDown(); void pon_vb(); void lleva_vb(int pointX); void hipo_sin_nadie(int counter); @@ -325,8 +325,8 @@ public: void animation_21_2(); void animation_22_2(); void animation_23_2(); - void animation_23_anexo(); - void animation_23_anexo2(); + void animation_23_joined(); + void animation_23_joined2(); void animation_24_2(); void animation_25_2(); void animation_26_2(); @@ -401,14 +401,14 @@ public: void addObject(int); int removeObject(int osj); void fliplay(const char *filefli, int vel); - void fadeFromBlack(int VelocidadDeFundido); - char LimitaVGA(char value); + void fadeFromBlack(int fadeSpeed); + char adjustToVGA(char value); void color_abc(int cl); void centerText(const char *,int,int); void playSound(int soundNum); bool animate(const char *animation, int FPS); void stopSound_corte(); - void fadeToBlack(int VelocidadDeFundido); + void fadeToBlack(int fadeSpeed); void pause(int); void placeIgor(); void placeBJ(); @@ -425,8 +425,8 @@ public: void talk_solo(const char *, const char *); void talk_igor_front(int); void talk_igor_front(const char *, const char *); - void talk_tabernero(int); - void talk_tabernero(const char *said, const char *filename); + void talk_bartender(int); + void talk_bartender(const char *said, const char *filename); void talk_igor_door(int); void talk_igor_door(const char *said, const char *filename); void talk_igor_wig(int); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 44f1d76615..deaff84c53 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1371,14 +1371,14 @@ void DrasculaEngine::update_13() { } void DrasculaEngine::update_14_pre() { - int velas_y[] = {158, 172, 186}; + int candles_y[] = {158, 172, 186}; int cirio_x[] = {14, 19, 24}; int pianista_x[] = {1, 91, 61, 31, 91, 31, 1, 61, 31}; int drunk_x[] = {1, 42, 83, 124, 165, 206, 247, 1}; int difference; - copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, drawSurface3, screenSurface); - copyBackground(cirio_x[frame_velas], 146, 311, 80, 4, 8, drawSurface3, screenSurface); + copyBackground(123, candles_y[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(cirio_x[frame_candles], 146, 311, 80, 4, 8, drawSurface3, screenSurface); if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); @@ -1404,9 +1404,9 @@ void DrasculaEngine::update_14_pre() { } else if ((_rnd->getRandomNumber(94) == 15) && (flags[13] == 0)) flags[12] = 1; - frame_velas++; - if (frame_velas == 3) - frame_velas = 0; + frame_candles++; + if (frame_candles == 3) + frame_candles = 0; frame_piano++; if (frame_piano == 9) frame_piano = 0; @@ -1675,13 +1675,13 @@ void DrasculaEngine::update_59_pre() { } void DrasculaEngine::update_60_pre() { - int velas_y[] = {158, 172, 186}; + int candles_y[] = {158, 172, 186}; int difference; if (flags[5] == 0) placeDrascula(); - copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(123, candles_y[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface); if (flag_tv == 1) copyBackground(114, 158, 8, 30, 8, 23, drawSurface3, screenSurface); @@ -1693,9 +1693,9 @@ void DrasculaEngine::update_60_pre() { else if (blinking == 5 && flag_tv == 1) flag_tv = 0; if (difference > 6) { - frame_velas++; - if (frame_velas == 3) - frame_velas = 0; + frame_candles++; + if (frame_candles == 3) + frame_candles = 0; conta_blind_vez = getTime(); } } @@ -1710,14 +1710,14 @@ void DrasculaEngine::update_61() { } void DrasculaEngine::update_62_pre() { - int velas_y[] = { 158, 172, 186 }; + int candles_y[] = { 158, 172, 186 }; int cirio_x[] = { 14, 19, 24 }; int pianista_x[] = {1, 91, 61, 31, 91, 31, 1, 61, 31 }; int drunk_x[] = {1, 42, 83, 124, 165, 206, 247, 1 }; int difference; - copyBackground(123, velas_y[frame_velas], 142, 14, 39, 13, drawSurface3, screenSurface); - copyBackground(cirio_x[frame_velas], 146, 311, 80, 4, 8, drawSurface3, screenSurface); + copyBackground(123, candles_y[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(cirio_x[frame_candles], 146, 311, 80, 4, 8, drawSurface3, screenSurface); if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); @@ -1746,9 +1746,9 @@ void DrasculaEngine::update_62_pre() { } else if ((_rnd->getRandomNumber(94) == 15) && (flags[13] == 0)) flags[12] = 1; - frame_velas++; - if (frame_velas == 3) - frame_velas = 0; + frame_candles++; + if (frame_candles == 3) + frame_candles = 0; frame_piano++; if (frame_piano == 9) frame_piano = 0; diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index a37b8179df..1f139c11c6 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -304,13 +304,13 @@ bucless: updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } -void DrasculaEngine::talk_tabernero(int index) { +void DrasculaEngine::talk_bartender(int index) { char name[20]; sprintf(name, "t%i.als", index); - talk_tabernero(_textt[_lang][index], name); + talk_bartender(_textt[_lang][index], name); } -void DrasculaEngine::talk_tabernero(const char *said, const char *filename) { +void DrasculaEngine::talk_bartender(const char *said, const char *filename) { int x_talk[9] = { 1, 23, 45, 67, 89, 111, 133, 155, 177 }; int face; int length = strlen(said); -- cgit v1.2.3 From b33662e27f37e9fe6462fff767a47eeebd07ff23 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 31 May 2008 00:15:01 +0000 Subject: rompo_y_salgo -> breakOut svn-id: r32410 --- engines/drascula/animation.cpp | 12 ++++++------ engines/drascula/drascula.cpp | 8 ++++---- engines/drascula/drascula.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 476376ab9b..1abe1257c2 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -1043,7 +1043,7 @@ void DrasculaEngine::animation_20_2() { sentido_vb = 1; vb_x = 120; - rompo_y_salgo = 1; + breakOut = 1; } } @@ -1103,7 +1103,7 @@ void DrasculaEngine::animation_23_2() { animation_27_2(); flags[25] = 1; - rompo_y_salgo = 1; + breakOut = 1; } void DrasculaEngine::animation_23_joined() { @@ -1233,7 +1233,7 @@ void DrasculaEngine::animation_29_2() { if (flags[38] == 0) { talk(403); - rompo_y_salgo = 1; + breakOut = 1; } else talk(386); } @@ -1277,7 +1277,7 @@ void DrasculaEngine::animation_31_2() { talk(410); talk_vb(56); - rompo_y_salgo = 1; + breakOut = 1; flags[38] = 0; flags[36] = 1; @@ -1531,7 +1531,7 @@ void DrasculaEngine::animation_2_5() { void DrasculaEngine::animation_3_5() { talk_bj(23); pickObject(10); - rompo_y_salgo = 1; + breakOut = 1; } void DrasculaEngine::animation_4_5() { @@ -2120,7 +2120,7 @@ void DrasculaEngine::animation_14_6() { talk_taber2(24); addObject(21); flags[10] = 1; - rompo_y_salgo = 1; + breakOut = 1; } void DrasculaEngine::animation_15_6() { diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 49d64cfd63..9dc2e14084 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -133,7 +133,7 @@ int DrasculaEngine::go() { hasAnswer = 0; conta_blind_vez = 0; changeColor = 0; - rompo_y_salgo = 0; + breakOut = 0; vb_x = 120; sentido_vb = 1; vb_se_mueve = 0; frame_vb = 1; frame_piano = 0; frame_drunk = 0; @@ -3190,7 +3190,7 @@ void DrasculaEngine::converse(const char *nom_fich) { int used3 = 0; char buffer[256]; - rompo_y_salgo = 0; + breakOut = 0; strcpy(para_codificar, nom_fich); @@ -3351,7 +3351,7 @@ bucle_opc: } else if ((button_izq == 1) && (game4 == 2)) { delay(100); talk(phrase4, sound4); - rompo_y_salgo = 1; + breakOut = 1; } if (button_izq == 1) { @@ -3364,7 +3364,7 @@ bucle_opc: game3 = (used3 == 0) ? 1 : 3; game4 = 1; - if (rompo_y_salgo == 0) + if (breakOut == 0) goto bucle_opc; if (num_ejec == 2) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 55db43c348..54669a6ca4 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -261,7 +261,7 @@ public: int hasAnswer; int conta_blind_vez; int changeColor; - int rompo_y_salgo; + int breakOut; int vb_x, sentido_vb, vb_se_mueve, frame_vb; float newHeight, newWidth; int factor_red[202]; -- cgit v1.2.3 From 0c6ffa1882ab385ad6abce92e6a7e767c107bd68 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 31 May 2008 01:10:17 +0000 Subject: Add Blue's Clues demos. svn-id: r32411 --- engines/scumm/scumm-md5.h | 4 +++- tools/scumm-md5.txt | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index a95fe790b2..3c8207075b 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Sat May 24 00:59:21 2008 + This file was generated by the md5table tool on Sat May 31 01:07:56 2008 DO NOT EDIT MANUALLY! */ @@ -363,6 +363,7 @@ static const MD5Table md5table[] = { { "92fc0073a4cf259ff36070ecb8628ba8", "thinkerk", "", "", -1, Common::EN_USA, Common::kPlatformUnknown }, { "94aaedbb8f26d71ed3ad6dd34490e29e", "tentacle", "", "Floppy", -1, Common::FR_FRA, Common::kPlatformPC }, { "94db6519da85b8d08c976d8e9a858ea7", "baseball", "HE CUP", "Preview", 10044774, Common::UNK_LANG, Common::kPlatformUnknown }, + { "95818b178d473c989ac753574e8892aa", "readtime", "", "Demo", -1, Common::EN_ANY, Common::kPlatformUnknown }, { "95b3806e043be08668c54c3ffe98650f", "BluesABCTime", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown }, { "96a3069a3c63caa7329588ce1fef41ee", "spyozon", "", "", -1, Common::RU_RUS, Common::kPlatformUnknown }, { "9708cf716ed8bcc9ff3fcfc69413b746", "puttputt", "HE 61", "", -1, Common::EN_ANY, Common::kPlatformPC }, @@ -476,6 +477,7 @@ static const MD5Table md5table[] = { { "cf8d13446ec6cb6222287a925fd47c1d", "baseball", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown }, { "cf8ef3a1fb483c5c4b1c584d1167b2c4", "freddi", "HE 73", "", -1, Common::DE_DEU, Common::kPlatformWindows }, { "cf90b4db5486ef798db78fe6fbf897e5", "pajama3", "", "Demo", -1, Common::EN_USA, Common::kPlatformWindows }, + { "d00ffc8c32d17e575fd985d435d2eb88", "arttime", "", "Demo", -1, Common::EN_ANY, Common::kPlatformUnknown }, { "d0549508a06bbb9f99ed19c9e97891f3", "football2002", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown }, { "d06fbe28818fef7bfc45c2cdf0c0849d", "zak", "V2", "V2", -1, Common::DE_DEU, Common::kPlatformPC }, { "d0ad929def3e9cfe39dea55bd12098d4", "puttcircus", "", "", -1, Common::FR_FRA, Common::kPlatformWindows }, diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt index 6e1a42a99d..46e4787855 100644 --- a/tools/scumm-md5.txt +++ b/tools/scumm-md5.txt @@ -419,6 +419,7 @@ BluesABCTime Blue's ABC Time arttime Blue's Art Time Activities 6269b8fbf51a353e5b501e4ad98cdc67 -1 en Windows - - - killiandor + d00ffc8c32d17e575fd985d435d2eb88 -1 en All - Demo - Kirben BluesBirthday Blue's Birthday Adventure 99128b6a5bdd9831d9682fb8b5cbf8d4 -1 en All - - - knifethrower @@ -428,6 +429,9 @@ BluesBirthday Blue's Birthday Adventure dbf4d59d70b826733f379f998354d350 -1 en All - Demo - Kirben fa30c4a7a806629626269b6dcab59a15 7819264 All All HE CUP Preview - sev +readtime Blue's Reading Time Activities + 95818b178d473c989ac753574e8892aa -1 en All - Demo - Kirben + fbear Fatty Bear's Birthday Surprise 5b08000a9c47b2887df6506ac767ca68 -1 en 3DO HE 61 - - sev 3824e60cdf639d22f6df92a03dc4b131 7732 en DOS HE 61 - - khalek -- cgit v1.2.3 From d05600d22821862c73ed9c17829bd9af3deb6b0e Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 31 May 2008 06:31:21 +0000 Subject: Fix display of original load/save screen in the FM-TOWNS version of Loom. svn-id: r32413 --- engines/scumm/verbs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp index cf4711f6a2..0a61d10166 100644 --- a/engines/scumm/verbs.cpp +++ b/engines/scumm/verbs.cpp @@ -567,8 +567,8 @@ void ScummEngine::checkExecVerbs() { _mouseAndKeyboardStat = numpad[_mouseAndKeyboardStat - '0']; } - if (_game.platform == Common::kPlatformFMTowns && (_game.id == GID_ZAK || _game.id == GID_INDY3)) { - // HACK: In the FM-Towns games Indy3 and Zak the most significant bit is set for special keys + if (_game.platform == Common::kPlatformFMTowns && _game.version == 3) { + // HACK: In the FM-Towns games Indy3, Loom and Zak the most significant bit is set for special keys // like F5 (=0x8005) or joystick buttons (mask 0xFE00, e.g. SELECT=0xFE40 for the save/load menu). // Hence the distinction with (_mouseAndKeyboardStat < MBS_MAX_KEY) between mouse- and key-events is not applicable // to this games, so we have to remap the special keys here. -- cgit v1.2.3 From 46fce5ff50f1c907bb137f3b898cbb70d4b34332 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 31 May 2008 08:09:34 +0000 Subject: Replace evil gotos with proper do-while loops. svn-id: r32414 --- engines/drascula/talk.cpp | 941 +++++++++++++++++++++------------------------- 1 file changed, 435 insertions(+), 506 deletions(-) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 1f139c11c6..18e5c4d03b 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -76,31 +76,29 @@ void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { talkInit(filename); -bucless: + do { + face = _rnd->getRandomNumber(7); - face = _rnd->getRandomNumber(7); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); + updateRefresh_pre(); - placeIgor(); - placeDrascula(); - copyBackground(x_igor + 17, y_igor, x_igor + 17, y_igor, 37, 24, drawSurface1, screenSurface); + placeIgor(); + placeDrascula(); + copyBackground(x_igor + 17, y_igor, x_igor + 17, y_igor, 37, 24, drawSurface1, screenSurface); - copyRect(x_talk[face], 148, x_igor + 17, y_igor, 25, 24, frontSurface, screenSurface); + copyRect(x_talk[face], 148, x_igor + 17, y_igor, 25, 24, frontSurface, screenSurface); - updateRefresh(); + updateRefresh(); - if (withVoices == 0) - centerText(said, x_igor + 26, y_igor); + if (withVoices == 0) + centerText(said, x_igor + 26, y_igor); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - pause(3); + pause(3); - if (!isTalkFinished(&length)) - goto bucless; + } while (!isTalkFinished(&length)); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); @@ -123,36 +121,34 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { talkInit(filename); -bucless: + do { + face = _rnd->getRandomNumber(7); - face = _rnd->getRandomNumber(7); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); + updateRefresh_pre(); - placeIgor(); - placeDrascula(); - if (num_ejec == 6) - pon_hare(); + placeIgor(); + placeDrascula(); + if (num_ejec == 6) + pon_hare(); - copyBackground(x_dr, y_dr, x_dr, y_dr, 38, 31, drawSurface1, screenSurface); - if (num_ejec == 6) - copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, drawSurface2, screenSurface); - else - copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, backSurface, screenSurface); + copyBackground(x_dr, y_dr, x_dr, y_dr, 38, 31, drawSurface1, screenSurface); + if (num_ejec == 6) + copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, drawSurface2, screenSurface); + else + copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, backSurface, screenSurface); - updateRefresh(); + updateRefresh(); - if (withVoices == 0) - centerText(said, x_dr + 19, y_dr); + if (withVoices == 0) + centerText(said, x_dr + 19, y_dr); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - pause(3); + pause(3); - if (!isTalkFinished(&length)) - goto bucless; + } while (!isTalkFinished(&length)); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); @@ -175,35 +171,33 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { talkInit(filename); -bucless: - - face = _rnd->getRandomNumber(7); + do { + face = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateRefresh_pre(); - placeIgor(); - placeDrascula(); - if (num_ejec == 6) - pon_hare(); + placeIgor(); + placeDrascula(); + if (num_ejec == 6) + pon_hare(); - copyBackground(x_dr, y_dr, x_dr, y_dr, 45, 31, drawSurface1, screenSurface); - if (num_ejec != 6) - copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, backSurface, screenSurface); - else - copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, drawSurface2, screenSurface); + copyBackground(x_dr, y_dr, x_dr, y_dr, 45, 31, drawSurface1, screenSurface); + if (num_ejec != 6) + copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, backSurface, screenSurface); + else + copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, drawSurface2, screenSurface); - updateRefresh(); + updateRefresh(); - if (withVoices == 0) - centerText(said, x_dr + 19, y_dr); + if (withVoices == 0) + centerText(said, x_dr + 19, y_dr); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - pause(3); + pause(3); - if (!isTalkFinished(&length)) - goto bucless; + } while (!isTalkFinished(&length)); if (num_ejec == 6) updateRoom(); @@ -228,20 +222,17 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { if (num_ejec == 6) copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); -bucless: - - if (withVoices == 0) { - if (num_ejec == 1) - centerText(said, 156, 90); - else if (num_ejec == 6) - centerText(said, 213, 72); - else if (num_ejec == 5) - centerText(said, 173, 92); - } - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - - if (!isTalkFinished(&length)) - goto bucless; + do { + if (withVoices == 0) { + if (num_ejec == 1) + centerText(said, 156, 90); + else if (num_ejec == 6) + centerText(said, 213, 72); + else if (num_ejec == 5) + centerText(said, 173, 92); + } + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + } while (!isTalkFinished(&length)); if (num_ejec == 6) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -264,33 +255,30 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { talkInit(filename); -bucless: - - face = _rnd->getRandomNumber(7); + do { + face = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - if (num_ejec == 1 || num_ejec == 4) - placeIgor(); - if (num_ejec == 1) - placeDrascula(); - if (num_ejec == 1 || num_ejec == 6) - copyBackground(x_igor, y_igor, x_igor, y_igor, 29, 25, drawSurface1, screenSurface); - copyRect(x_talk[face], 173, x_igor, y_igor, 29, 25, frontSurface, screenSurface); + updateRefresh_pre(); - updateRefresh(); + if (num_ejec == 1 || num_ejec == 4) + placeIgor(); + if (num_ejec == 1) + placeDrascula(); + if (num_ejec == 1 || num_ejec == 6) + copyBackground(x_igor, y_igor, x_igor, y_igor, 29, 25, drawSurface1, screenSurface); + copyRect(x_talk[face], 173, x_igor, y_igor, 29, 25, frontSurface, screenSurface); - if (withVoices == 0) - centerText(said, x_igor + 26, y_igor); + updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, x_igor + 26, y_igor); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(3); + } while (!isTalkFinished(&length)); if (num_ejec == 6) { updateRoom(); @@ -319,35 +307,33 @@ void DrasculaEngine::talk_bartender(const char *said, const char *filename) { talkInit(filename); -bucless: - - if (num_ejec == 1) { - if (musicStatus() == 0) - playMusic(roomMusic); - } else if (num_ejec == 2) { - if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) - playMusic(roomMusic); - } + do { + if (num_ejec == 1) { + if (musicStatus() == 0) + playMusic(roomMusic); + } else if (num_ejec == 2) { + if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) + playMusic(roomMusic); + } - face = _rnd->getRandomNumber(8); + face = _rnd->getRandomNumber(8); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); + updateRefresh_pre(); - copyBackground(x_talk[face], 2, 121, 44, 21, 24, extraSurface, screenSurface); - pon_hare(); - updateRefresh(); + copyBackground(x_talk[face], 2, 121, 44, 21, 24, extraSurface, screenSurface); + pon_hare(); + updateRefresh(); - if (withVoices == 0) - centerText(said, 132, 45); + if (withVoices == 0) + centerText(said, 132, 45); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - pause(3); + pause(3); - if (!isTalkFinished(&length)) - goto bucless; + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -368,39 +354,37 @@ void DrasculaEngine::talk_bj(const char *said, const char *filename) { talkInit(filename); -bucless: - if (num_ejec != 5) { - face = _rnd->getRandomNumber(4); + do { + if (num_ejec != 5) { + face = _rnd->getRandomNumber(4); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); + updateRefresh_pre(); - copyBackground(x_bj + 2, y_bj - 1, x_bj + 2, y_bj - 1, 27, 40, - drawSurface1, screenSurface); + copyBackground(x_bj + 2, y_bj - 1, x_bj + 2, y_bj - 1, 27, 40, + drawSurface1, screenSurface); - copyRect(x_talk[face], 99, x_bj + 2, y_bj - 1, 27, 40, - drawSurface3, screenSurface); - pon_hare(); - updateRefresh(); + copyRect(x_talk[face], 99, x_bj + 2, y_bj - 1, 27, 40, + drawSurface3, screenSurface); + pon_hare(); + updateRefresh(); - if (withVoices == 0) - centerText(said, x_bj + 7, y_bj); - - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, x_bj + 7, y_bj); - pause(3); - } else { - updateRoom(); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (withVoices == 0) - centerText(said, 93, 80); + pause(3); + } else { + updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - } + if (withVoices == 0) + centerText(said, 93, 80); - if (!isTalkFinished(&length)) - goto bucless; + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + } + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -449,80 +433,77 @@ void DrasculaEngine::talk(const char *said, const char *filename) { talkInit(filename); -bucless: + do { + face = _rnd->getRandomNumber(5); - face = _rnd->getRandomNumber(5); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateRefresh_pre(); + if (num_ejec == 2) + copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, screenSurface, drawSurface3); + else + copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), + (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), + screenSurface, drawSurface3); - updateRefresh_pre(); - if (num_ejec == 2) - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, screenSurface, drawSurface3); - else - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), - screenSurface, drawSurface3); - - pon_hare(); - - if (num_ejec == 2) { - if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg")) - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, drawSurface3, screenSurface); - } else { - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), - drawSurface3, screenSurface); - } + pon_hare(); - if (sentido_hare == 0) { - if (num_ejec == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, + if (num_ejec == 2) { + if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg")) + copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, drawSurface3, screenSurface); + } else { + copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), + (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), + drawSurface3, screenSurface); + } + + if (sentido_hare == 0) { + if (num_ejec == 2) + copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, extraSurface, screenSurface); - else - reduce_hare_chico(x_talk_izq[face], y_mask_talk, hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), + else + reduce_hare_chico(x_talk_izq[face], y_mask_talk, hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); - updateRefresh(); - } else if (sentido_hare == 1) { - if (num_ejec == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, + updateRefresh(); + } else if (sentido_hare == 1) { + if (num_ejec == 2) + copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, extraSurface, screenSurface); - else - reduce_hare_chico(x_talk_dch[face], y_mask_talk, hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), + else + reduce_hare_chico(x_talk_dch[face], y_mask_talk, hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); - updateRefresh(); - } else if (sentido_hare == 2) { - if (num_ejec == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, + updateRefresh(); + } else if (sentido_hare == 2) { + if (num_ejec == 2) + copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); - else - reduce_hare_chico(x_talk_izq[face], y_mask_talk, + else + reduce_hare_chico(x_talk_izq[face], y_mask_talk, suma_1_pixel + hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); - updateRefresh(); - } else if (sentido_hare == 3) { - if (num_ejec == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, + updateRefresh(); + } else if (sentido_hare == 3) { + if (num_ejec == 2) + copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); - else - reduce_hare_chico(x_talk_dch[face], y_mask_talk, + else + reduce_hare_chico(x_talk_dch[face], y_mask_talk, suma_1_pixel + hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk,alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); - updateRefresh(); - } - - if (withVoices == 0) - centerText(said, hare_x, hare_y); + updateRefresh(); + } - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, hare_x, hare_y); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(3); + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -548,28 +529,25 @@ void DrasculaEngine::talk_pianist(const char *said, const char *filename) { talkInit(filename); -bucless: + do { + face = _rnd->getRandomNumber(3); - face = _rnd->getRandomNumber(3); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(x_talk[face], 139, 228, 112, 47, 60, - extraSurface, screenSurface); - pon_hare(); - updateRefresh(); + updateRefresh_pre(); - if (withVoices == 0) - centerText(said, 221, 128); + copyBackground(x_talk[face], 139, 228, 112, 47, 60, + extraSurface, screenSurface); + pon_hare(); + updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, 221, 128); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(3); + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -604,27 +582,24 @@ bebiendo: talkInit(filename); -bucless: - - face = _rnd->getRandomNumber(7); + do { + face = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(x_talk[face], 29, 177, 50, 19, 19, frontSurface, screenSurface); - pon_hare(); - updateRefresh(); + updateRefresh_pre(); - if (withVoices == 0) - centerText(said, 181, 54); + copyBackground(x_talk[face], 29, 177, 50, 19, 19, frontSurface, screenSurface); + pon_hare(); + updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, 181, 54); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(3); + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -660,29 +635,26 @@ void DrasculaEngine::talk_vb(const char *said, const char *filename) { copyBackground(vb_x + 5, 64, OBJWIDTH + 1, 0, 25, 27, drawSurface1, drawSurface3); -bucless: + do { + if (sentido_vb == 1) { + face = _rnd->getRandomNumber(5); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - if (sentido_vb == 1) { - face = _rnd->getRandomNumber(5); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + pon_hare(); + pon_vb(); - pon_hare(); - pon_vb(); - - copyBackground(OBJWIDTH + 1, 0, vb_x + 5, 64, 25, 27, drawSurface3, screenSurface); - copyRect(x_talk[face], 34, vb_x + 5, 64, 25, 27, frontSurface, screenSurface); - updateRefresh(); - } - - if (withVoices == 0) - centerText(said, vb_x, 66); + copyBackground(OBJWIDTH + 1, 0, vb_x + 5, 64, 25, 27, drawSurface3, screenSurface); + copyRect(x_talk[face], 34, vb_x + 5, 64, 25, 27, frontSurface, screenSurface); + updateRefresh(); + } - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, vb_x, 66); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(3); + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -703,15 +675,14 @@ void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) { talkInit(filename); -bucless: + do { + updateRoom(); - updateRoom(); - if (withVoices == 0) - centerText(said, 150, 80); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, 150, 80); - if (!isTalkFinished(&length)) - goto bucless; + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -738,38 +709,36 @@ void DrasculaEngine::talk_blind(const char *said, const char *filename, const ch pos_blind[4] = 126; pos_blind[5] = 149; -bucless: - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - pos_blind[5] = 149; - char c = toupper(sincronia[p]); - - if (c == '0' || c == '2' || c == '4' || c == '6') - pos_blind[0] = 1; - else - pos_blind[0] = 132; - - if (c == '0' || c == '1') - num_cara = drawSurface3; - else if (c == '2' || c == '3') - num_cara = extraSurface; - else if (c == '4' || c == '5') - num_cara = backSurface; - else { - num_cara = frontSurface; - pos_blind[5] = 146; - } + do { + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + pos_blind[5] = 149; + char c = toupper(sincronia[p]); - copyRectClip( pos_blind, num_cara, screenSurface); + if (c == '0' || c == '2' || c == '4' || c == '6') + pos_blind[0] = 1; + else + pos_blind[0] = 132; + + if (c == '0' || c == '1') + num_cara = drawSurface3; + else if (c == '2' || c == '3') + num_cara = extraSurface; + else if (c == '4' || c == '5') + num_cara = backSurface; + else { + num_cara = frontSurface; + pos_blind[5] = 146; + } - if (withVoices == 0) - centerText(said, 310, 71); + copyRectClip( pos_blind, num_cara, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - pause(2); - p++; + if (withVoices == 0) + centerText(said, 310, 71); - if (!isTalkFinished(&length)) - goto bucless; + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + pause(2); + p++; + } while (!isTalkFinished(&length)); } void DrasculaEngine::talk_hacker(const char *said, const char *filename) { @@ -782,13 +751,11 @@ void DrasculaEngine::talk_hacker(const char *said, const char *filename) { talkInit(filename); -bucless: - if (withVoices == 0) - centerText(said, 156, 170); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - - if (!isTalkFinished(&length)) - goto bucless; + do { + if (withVoices == 0) + centerText(said, 156, 170); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + } while (!isTalkFinished(&length)); } void DrasculaEngine::talk_wolf(int index) { @@ -806,27 +773,24 @@ void DrasculaEngine::talk_wolf(const char *said, const char *filename) { talkInit(filename); -bucless: + do { + face = _rnd->getRandomNumber(8); - face = _rnd->getRandomNumber(8); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(x_talk[face], 136, 198, 81, 26, 24, drawSurface3, screenSurface); - pon_hare(); - updateRefresh(); + updateRefresh_pre(); - if (withVoices == 0) - centerText(said, 203, 78); + copyBackground(x_talk[face], 136, 198, 81, 26, 24, drawSurface3, screenSurface); + pon_hare(); + updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, 203, 78); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(3); + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -847,27 +811,25 @@ void DrasculaEngine::talk_mus(const char *said, const char *filename) { talkInit(filename); -bucless: - - face = _rnd->getRandomNumber(7); + do { + face = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); + updateRefresh_pre(); - copyBackground(x_talk[face], 156, 190, 64, 18, 24, drawSurface3, screenSurface); - pon_hare(); - updateRefresh(); + copyBackground(x_talk[face], 156, 190, 64, 18, 24, drawSurface3, screenSurface); + pon_hare(); + updateRefresh(); - if (withVoices == 0) - centerText(said, 197, 64); + if (withVoices == 0) + centerText(said, 197, 64); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - pause(3); + pause(3); - if (!isTalkFinished(&length)) - goto bucless; + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -888,27 +850,24 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename) { talkInit(filename); -bucless: - - face = _rnd->getRandomNumber(7); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + do { + face = _rnd->getRandomNumber(7); - updateRefresh_pre(); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyRect(x_talk[face], 145, 145, 105, 25, 29, drawSurface3, screenSurface); + updateRefresh_pre(); - updateRefresh(); + copyRect(x_talk[face], 145, 145, 105, 25, 29, drawSurface3, screenSurface); - if (withVoices == 0) - centerText(said, 160, 105); + updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, 160, 105); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(3); + } while (!isTalkFinished(&length)); flags[1] = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -927,27 +886,24 @@ void DrasculaEngine::talk_pen2(const char *said, const char *filename) { talkInit(filename); -bucless: - - face = _rnd->getRandomNumber(4); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + do { + face = _rnd->getRandomNumber(4); - updateRefresh_pre(); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(x_talk[face], 171, 173, 116, 25, 28, drawSurface3, screenSurface); + updateRefresh_pre(); - updateRefresh(); + copyBackground(x_talk[face], 171, 173, 116, 25, 28, drawSurface3, screenSurface); - if (withVoices == 0) - centerText(said, 195, 107); + updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, 195, 107); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(3); + } while (!isTalkFinished(&length)); flags[1] = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -970,27 +926,24 @@ void DrasculaEngine::talk_taber2(const char *said, const char *filename) { talkInit(filename); -bucless: - - face = _rnd->getRandomNumber(5); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + do { + face = _rnd->getRandomNumber(5); - updateRefresh_pre(); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(x_talk[face], 130, 151, 43, 21, 24, drawSurface3, screenSurface); - pon_hare(); - updateRefresh(); + updateRefresh_pre(); - if (withVoices == 0) - centerText(said, 132, 45); + copyBackground(x_talk[face], 130, 151, 43, 21, 24, drawSurface3, screenSurface); + pon_hare(); + updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, 132, 45); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(3); + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1011,28 +964,25 @@ void DrasculaEngine::talk_bj_bed(const char *said, const char *filename) { talkInit(filename); -bucless: - - face = _rnd->getRandomNumber(4); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + do { + face = _rnd->getRandomNumber(4); - updateRefresh_pre(); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(65, 103, 65, 103, 49, 38, drawSurface1, screenSurface); - copyRect(x_talk[face], 105, 65, 103, 49, 38, drawSurface3, screenSurface); - pon_hare(); - updateRefresh(); + updateRefresh_pre(); - if (withVoices == 0) - centerText(said, 104, 102); + copyBackground(65, 103, 65, 103, 49, 38, drawSurface1, screenSurface); + copyRect(x_talk[face], 105, 65, 103, 49, 38, drawSurface3, screenSurface); + pon_hare(); + updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, 104, 102); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(3); + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1054,30 +1004,27 @@ void DrasculaEngine::talk_htel(const char *said, const char *filename) { talkInit(filename); -bucless: + do { + face = _rnd->getRandomNumber(2); + pantalla = _rnd->getRandomNumber(2); - face = _rnd->getRandomNumber(2); - pantalla = _rnd->getRandomNumber(2); - - if (face == 0 && pantalla == 0) - num_cara = (char *)drawSurface3; - else if (pantalla == 1) - num_cara = (char *)frontSurface; - else - num_cara = (char *)backSurface; - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + if (face == 0 && pantalla == 0) + num_cara = (char *)drawSurface3; + else if (pantalla == 1) + num_cara = (char *)frontSurface; + else + num_cara = (char *)backSurface; - copyBackground(x_talk[face], 1, 45, 24, 92, 108, (byte *)num_cara, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - if (withVoices == 0) - centerText(said, 90, 50); + copyBackground(x_talk[face], 1, 45, 24, 92, 108, (byte *)num_cara, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - pause(3); + if (withVoices == 0) + centerText(said, 90, 50); - if (!isTalkFinished(&length)) - goto bucless; + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + pause(3); + } while (!isTalkFinished(&length)); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1102,68 +1049,65 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha talkInit(filename); -bucless: - - face = atoi(&sincronia[p]); + do { + face = atoi(&sincronia[p]); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); - if (num_ejec == 2) - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, screenSurface, drawSurface3); - else - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), + updateRefresh_pre(); + if (num_ejec == 2) + copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, screenSurface, drawSurface3); + else + copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), screenSurface, drawSurface3); - pon_hare(); - if (num_ejec == 2) { - if (alto_hare != 56) - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, drawSurface3, screenSurface); - } else - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), + pon_hare(); + if (num_ejec == 2) { + if (alto_hare != 56) + copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, drawSurface3, screenSurface); + } else + copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), drawSurface3, screenSurface); - if (sentido_hare == 0) { - if (num_ejec == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, extraSurface, screenSurface); - else - reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), + if (sentido_hare == 0) { + if (num_ejec == 2) + copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, extraSurface, screenSurface); + else + reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); - updateRefresh(); - } else if (sentido_hare == 1) { - if (num_ejec == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, extraSurface, screenSurface); - else - reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), + updateRefresh(); + } else if (sentido_hare == 1) { + if (num_ejec == 2) + copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, extraSurface, screenSurface); + else + reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); - updateRefresh(); - } else if (sentido_hare == 2) { - if (num_ejec == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); - else - reduce_hare_chico(x_talk_izq[face], y_mask_talk, + updateRefresh(); + } else if (sentido_hare == 2) { + if (num_ejec == 2) + copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); + else + reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(suma_1_pixel + hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); - updateRefresh(); - } else if (sentido_hare == 3) { - if (num_ejec == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); - else - reduce_hare_chico(x_talk_dch[face], y_mask_talk, + updateRefresh(); + } else if (sentido_hare == 3) { + if (num_ejec == 2) + copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); + else + reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(suma_1_pixel + hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); - updateRefresh(); - } - - if (withVoices == 0) - centerText(said, hare_x, hare_y); + updateRefresh(); + } - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, hare_x, hare_y); - p++; - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + p++; + pause(3); + } while (!isTalkFinished(&length)); if (num_ejec == 1 && musicStatus() == 0 && flags[11] == 0) playMusic(roomMusic); @@ -1181,22 +1125,19 @@ void DrasculaEngine::talk_baul(const char *said, const char *filename) { talkInit(filename); -bucless: - - face = (face == 1) ? 0 : 1; + do { + face = (face == 1) ? 0 : 1; - flags[19] = face; - updateRoom(); - - if (withVoices == 0) - centerText(said, 263, 69); + flags[19] = face; + updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, 263, 69); - pause(4); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(4); + } while (!isTalkFinished(&length)); flags[19] = cara_antes; updateRoom(); @@ -1216,15 +1157,12 @@ void DrasculaEngine::talk_igor_door(const char *said, const char *filename) { talkInit(filename); -bucless: - - updateRoom(); - if (withVoices == 0) - centerText(said, 87, 66); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - - if (!isTalkFinished(&length)) - goto bucless; + do { + updateRoom(); + if (withVoices == 0) + centerText(said, 87, 66); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1245,27 +1183,24 @@ void DrasculaEngine::talk_igor_seated(const char *said, const char *filename) { talkInit(filename); -bucless: - - face = _rnd->getRandomNumber(3); + do { + face = _rnd->getRandomNumber(3); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(x_talk[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface); - pon_hare(); - updateRefresh(); + updateRefresh_pre(); - if (withVoices == 0) - centerText(said, 221, 102); + copyBackground(x_talk[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface); + pon_hare(); + updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, 221, 102); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(3); + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1286,27 +1221,24 @@ void DrasculaEngine::talk_igor_wig(const char *said, const char *filename) { talkInit(filename); -bucless: + do { + _rnd->getRandomNumber(3); - _rnd->getRandomNumber(3); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(x_talk[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface); - pon_hare(); - updateRefresh(); + updateRefresh_pre(); - if (withVoices == 0) - centerText(said, 221, 102); + copyBackground(x_talk[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface); + pon_hare(); + updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, 221, 102); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (!isTalkFinished(&length)) - goto bucless; + pause(3); + } while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); @@ -1322,29 +1254,26 @@ void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { talkInit(filename); -bucless: - - face = _rnd->getRandomNumber(3); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(interf_x[l] + 24, interf_y[l], 0, 45, 39, 31, drawSurface2, screenSurface); - copyBackground(x_talk[face], 1, 171, 68, 45, 48, drawSurface2, screenSurface); - l++; - if (l == 7) - l = 0; - - if (withVoices == 0) - centerText(said, 191, 69); + do { + face = _rnd->getRandomNumber(3); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(interf_x[l] + 24, interf_y[l], 0, 45, 39, 31, drawSurface2, screenSurface); + copyBackground(x_talk[face], 1, 171, 68, 45, 48, drawSurface2, screenSurface); + l++; + if (l == 7) + l = 0; - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + if (withVoices == 0) + centerText(said, 191, 69); - pause(3); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - byte key = getScan(); - if (key == Common::KEYCODE_ESCAPE) - term_int = 1; + pause(3); - if (!isTalkFinished(&length)) - goto bucless; + byte key = getScan(); + if (key == Common::KEYCODE_ESCAPE) + term_int = 1; + } while (!isTalkFinished(&length)); } } // End of namespace Drascula -- cgit v1.2.3 From 83880b85e9ed04425d95812ec84ae34d661d34c3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 31 May 2008 08:10:15 +0000 Subject: Fix old regression svn-id: r32415 --- engines/drascula/talk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 18e5c4d03b..7abd674ae5 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -1222,7 +1222,7 @@ void DrasculaEngine::talk_igor_wig(const char *said, const char *filename) { talkInit(filename); do { - _rnd->getRandomNumber(3); + face = _rnd->getRandomNumber(3); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); -- cgit v1.2.3 From 8fd8c68a05e8ca8df8dbc2a10f0be470a875f4c1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 31 May 2008 08:26:06 +0000 Subject: Eliminated more gotos svn-id: r32416 --- engines/drascula/drascula.cpp | 501 +++++++++++++++++++++--------------------- engines/drascula/talk.cpp | 5 +- 2 files changed, 249 insertions(+), 257 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 9dc2e14084..9248a1d3a1 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -567,160 +567,160 @@ bool DrasculaEngine::escoba() { } } -bucles: - if (characterMoved == 0) { - stepX = PASO_HARE_X; - stepY = PASO_HARE_Y; - } - if (characterMoved == 0 && walkToObject == 1) { - sentido_hare = sentido_final; - walkToObject = 0; - } - - if (num_ejec == 2) { - if (roomNumber == 3 && (hare_x == 279) && (hare_y + alto_hare == 101)) - animation_1_2(); - else if (roomNumber == 14 && (hare_x == 214) && (hare_y + alto_hare == 121)) - lleva_al_hare(190, 130); - else if (roomNumber == 14 && (hare_x == 246) && (hare_y + alto_hare == 112)) - lleva_al_hare(190, 130); - } - - moveCursor(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + while (1) { + if (characterMoved == 0) { + stepX = PASO_HARE_X; + stepY = PASO_HARE_Y; + } + if (characterMoved == 0 && walkToObject == 1) { + sentido_hare = sentido_final; + walkToObject = 0; + } - if (num_ejec == 2) { - if (musicStatus() == 0 && roomMusic != 0) - playMusic(roomMusic); - } else { - if (musicStatus() == 0) - playMusic(roomMusic); - } + if (num_ejec == 2) { + if (roomNumber == 3 && (hare_x == 279) && (hare_y + alto_hare == 101)) + animation_1_2(); + else if (roomNumber == 14 && (hare_x == 214) && (hare_y + alto_hare == 121)) + lleva_al_hare(190, 130); + else if (roomNumber == 14 && (hare_x == 246) && (hare_y + alto_hare == 112)) + lleva_al_hare(190, 130); + } - updateEvents(); + moveCursor(); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (menuScreen == 0 && takeObject == 1) - checkObjects(); + if (num_ejec == 2) { + if (musicStatus() == 0 && roomMusic != 0) + playMusic(roomMusic); + } else { + if (musicStatus() == 0) + playMusic(roomMusic); + } - if (button_dch == 1 && menuScreen == 1) { - delay(100); - if (num_ejec == 2) - loadAndDecompressPic(menuBackground, backSurface, 1); - else - loadAndDecompressPic("99.alg", backSurface, 1); - setPalette((byte *)&gamePalette); - menuScreen = 0; - updateEvents(); - if (num_ejec != 3) - cont_sv = 0; - } - if (button_dch == 1 && menuScreen == 0) { - delay(100); - characterMoved = 0; - if (sentido_hare == 2) - sentido_hare = 1; - if (num_ejec == 4) - loadAndDecompressPic("icons2.alg", backSurface, 1); - else if (num_ejec == 5) - loadAndDecompressPic("icons3.alg", backSurface, 1); - else if (num_ejec == 6) - loadAndDecompressPic("iconsp.alg", backSurface, 1); - else - loadAndDecompressPic("icons.alg", backSurface, 1); - menuScreen = 1; updateEvents(); - withoutVerb(); - if (num_ejec != 3) - cont_sv = 0; - } - if (button_izq == 1 && menuBar == 1) { - delay(100); - elige_en_barra(); - if (num_ejec != 3) - cont_sv = 0; - } else if (button_izq == 1 && takeObject == 0) { - delay(100); - if (comprueba1()) - return true; - if (num_ejec != 3) - cont_sv = 0; - } else if (button_izq == 1 && takeObject == 1) { - if (comprueba2()) - return true; - if (num_ejec != 3) - cont_sv = 0; - } + if (menuScreen == 0 && takeObject == 1) + checkObjects(); - menuBar = (mouseY < 24 && menuScreen == 0) ? 1 : 0; + if (button_dch == 1 && menuScreen == 1) { + delay(100); + if (num_ejec == 2) + loadAndDecompressPic(menuBackground, backSurface, 1); + else + loadAndDecompressPic("99.alg", backSurface, 1); + setPalette((byte *)&gamePalette); + menuScreen = 0; + updateEvents(); + if (num_ejec != 3) + cont_sv = 0; + } + if (button_dch == 1 && menuScreen == 0) { + delay(100); + characterMoved = 0; + if (sentido_hare == 2) + sentido_hare = 1; + if (num_ejec == 4) + loadAndDecompressPic("icons2.alg", backSurface, 1); + else if (num_ejec == 5) + loadAndDecompressPic("icons3.alg", backSurface, 1); + else if (num_ejec == 6) + loadAndDecompressPic("iconsp.alg", backSurface, 1); + else + loadAndDecompressPic("icons.alg", backSurface, 1); + menuScreen = 1; + updateEvents(); + withoutVerb(); + if (num_ejec != 3) + cont_sv = 0; + } - Common::KeyCode key = getScan(); - if (key == Common::KEYCODE_F1 && menuScreen == 0) { - selectVerb(1); - if (num_ejec != 3) - cont_sv = 0; - } else if (key == Common::KEYCODE_F2 && menuScreen == 0) { - selectVerb(2); - if (num_ejec != 3) - cont_sv = 0; - } else if (key == Common::KEYCODE_F3 && menuScreen == 0) { - selectVerb(3); - if (num_ejec != 3) - cont_sv = 0; - } else if (key == Common::KEYCODE_F4 && menuScreen == 0) { - selectVerb(4); - cont_sv = 0; - } else if (key == Common::KEYCODE_F5 && menuScreen == 0) { - selectVerb(5); - if (num_ejec != 3) - cont_sv = 0; - } else if (key == Common::KEYCODE_F6 && menuScreen == 0) { - selectVerb(6); - if (num_ejec != 3) + if (button_izq == 1 && menuBar == 1) { + delay(100); + elige_en_barra(); + if (num_ejec != 3) + cont_sv = 0; + } else if (button_izq == 1 && takeObject == 0) { + delay(100); + if (comprueba1()) + return true; + if (num_ejec != 3) + cont_sv = 0; + } else if (button_izq == 1 && takeObject == 1) { + if (comprueba2()) + return true; + if (num_ejec != 3) + cont_sv = 0; + } + + menuBar = (mouseY < 24 && menuScreen == 0) ? 1 : 0; + + Common::KeyCode key = getScan(); + if (key == Common::KEYCODE_F1 && menuScreen == 0) { + selectVerb(1); + if (num_ejec != 3) + cont_sv = 0; + } else if (key == Common::KEYCODE_F2 && menuScreen == 0) { + selectVerb(2); + if (num_ejec != 3) + cont_sv = 0; + } else if (key == Common::KEYCODE_F3 && menuScreen == 0) { + selectVerb(3); + if (num_ejec != 3) + cont_sv = 0; + } else if (key == Common::KEYCODE_F4 && menuScreen == 0) { + selectVerb(4); cont_sv = 0; - } else if (key == Common::KEYCODE_F9) { + } else if (key == Common::KEYCODE_F5 && menuScreen == 0) { + selectVerb(5); + if (num_ejec != 3) + cont_sv = 0; + } else if (key == Common::KEYCODE_F6 && menuScreen == 0) { + selectVerb(6); + if (num_ejec != 3) + cont_sv = 0; + } else if (key == Common::KEYCODE_F9) { mesa(); if (num_ejec != 3) cont_sv = 0; - } else if (key == Common::KEYCODE_F10) { - if (!saves()) - return true; - if (num_ejec != 3) - cont_sv = 0; - } else if (key == Common::KEYCODE_F8) { - withoutVerb(); - if (num_ejec != 3) - cont_sv = 0; - } else if (key == Common::KEYCODE_v) { - withVoices = 1; - print_abc(_textsys[_lang][2], 96, 86); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - delay(1410); - if (num_ejec != 3) - cont_sv = 0; - } else if (key == Common::KEYCODE_t) { - withVoices = 0; - print_abc(_textsys[_lang][3], 94, 86); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - delay(1460); - if (num_ejec != 3) - cont_sv = 0; - } else if (key == Common::KEYCODE_ESCAPE) { - if (!confirmExit()) - return false; - if (num_ejec != 3) - cont_sv = 0; - } else if (num_ejec == 6 && key == Common::KEYCODE_0 && roomNumber == 61) { - loadAndDecompressPic("alcbar.alg", drawSurface1, 255); - } else if (cont_sv == 15000) { - screenSaver(); - if (num_ejec != 3) - cont_sv = 0; - } else { - if (num_ejec != 3) - cont_sv++; + } else if (key == Common::KEYCODE_F10) { + if (!saves()) + return true; + if (num_ejec != 3) + cont_sv = 0; + } else if (key == Common::KEYCODE_F8) { + withoutVerb(); + if (num_ejec != 3) + cont_sv = 0; + } else if (key == Common::KEYCODE_v) { + withVoices = 1; + print_abc(_textsys[_lang][2], 96, 86); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + delay(1410); + if (num_ejec != 3) + cont_sv = 0; + } else if (key == Common::KEYCODE_t) { + withVoices = 0; + print_abc(_textsys[_lang][3], 94, 86); + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + delay(1460); + if (num_ejec != 3) + cont_sv = 0; + } else if (key == Common::KEYCODE_ESCAPE) { + if (!confirmExit()) + return false; + if (num_ejec != 3) + cont_sv = 0; + } else if (num_ejec == 6 && key == Common::KEYCODE_0 && roomNumber == 61) { + loadAndDecompressPic("alcbar.alg", drawSurface1, 255); + } else if (cont_sv == 15000) { + screenSaver(); + if (num_ejec != 3) + cont_sv = 0; + } else { + if (num_ejec != 3) + cont_sv++; + } } - goto bucles; } void DrasculaEngine::pickObject(int objeto) { @@ -1850,36 +1850,36 @@ void DrasculaEngine::centerText(const char *message, int textX, int textY) { textX2 = (strlen(m1) / 2) * CHAR_WIDTH; -tut: - strcpy(bb, m1); - scumm_strrev(bb); - - if (textX1 < textX2) { - strcpy(m3, strrchr(m1, ' ')); - strcpy(m1, strstr(bb, " ")); - scumm_strrev(m1); - m1[strlen(m1) - 1] = '\0'; - strcat(m3, m2); - strcpy(m2, m3); - }; + while (true) { + strcpy(bb, m1); + scumm_strrev(bb); - textX2 = (strlen(m1) / 2) * CHAR_WIDTH; - if (textX1 < textX2) - goto tut; - strcpy(mb[conta_f], m1); + if (textX1 < textX2) { + strcpy(m3, strrchr(m1, ' ')); + strcpy(m1, strstr(bb, " ")); + scumm_strrev(m1); + m1[strlen(m1) - 1] = '\0'; + strcat(m3, m2); + strcpy(m2, m3); + }; - if (!strcmp(m2, "")) - goto imprimir; - scumm_strrev(m2); - m2[strlen(m2) - 1] = '\0'; - scumm_strrev(m2); - strcpy(m1, m2); - strcpy(m2, ""); - conta_f++; + textX2 = (strlen(m1) / 2) * CHAR_WIDTH; - goto tut; + if (textX1 < textX2) + continue; -imprimir: + strcpy(mb[conta_f], m1); + + if (!strcmp(m2, "")) + break; + + scumm_strrev(m2); + m2[strlen(m2) - 1] = '\0'; + scumm_strrev(m2); + strcpy(m1, m2); + strcpy(m2, ""); + conta_f++; + } fil = textY - (((conta_f + 3) * CHAR_HEIGHT)); @@ -3273,99 +3273,96 @@ void DrasculaEngine::converse(const char *nom_fich) { // from 1(top) to 31 color_abc(kColorLightGreen); -bucle_opc: - - updateRoom(); + while (breakOut == 0) { + updateRoom(); - if (num_ejec == 1 || num_ejec == 4 || num_ejec == 6) { - if (musicStatus() == 0 && flags[11] == 0) - playMusic(roomMusic); - } else if (num_ejec == 2) { - if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) - playMusic(roomMusic); - } else if (num_ejec == 3 || num_ejec == 5) { - if (musicStatus() == 0) - playMusic(roomMusic); - } + if (num_ejec == 1 || num_ejec == 4 || num_ejec == 6) { + if (musicStatus() == 0 && flags[11] == 0) + playMusic(roomMusic); + } else if (num_ejec == 2) { + if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) + playMusic(roomMusic); + } else if (num_ejec == 3 || num_ejec == 5) { + if (musicStatus() == 0) + playMusic(roomMusic); + } - updateEvents(); + updateEvents(); - if (mouseY > 0 && mouseY < 9) { - if (used1 == 1 && _color != kColorWhite) - color_abc(kColorWhite); - else if (used1 == 0 && _color != kColorLightGreen) - color_abc(kColorLightGreen); - } else if (mouseY > 8 && mouseY < 17) { - if (used2 == 1 && _color != kColorWhite) - color_abc(kColorWhite); - else if (used2 == 0 && _color != kColorLightGreen) - color_abc(kColorLightGreen); - } else if (mouseY > 16 && mouseY < 25) { - if (used3 == 1 && _color != kColorWhite) - color_abc(kColorWhite); - else if (used3 == 0 && _color != kColorLightGreen) + if (mouseY > 0 && mouseY < 9) { + if (used1 == 1 && _color != kColorWhite) + color_abc(kColorWhite); + else if (used1 == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); + } else if (mouseY > 8 && mouseY < 17) { + if (used2 == 1 && _color != kColorWhite) + color_abc(kColorWhite); + else if (used2 == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); + } else if (mouseY > 16 && mouseY < 25) { + if (used3 == 1 && _color != kColorWhite) + color_abc(kColorWhite); + else if (used3 == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); + } else if (_color != kColorLightGreen) color_abc(kColorLightGreen); - } else if (_color != kColorLightGreen) - color_abc(kColorLightGreen); - - if (mouseY > 0 && mouseY < 9) - game1 = 2; - else if (mouseY > 8 && mouseY < 17) - game2 = 2; - else if (mouseY > 16 && mouseY < 25) - game3 = 2; - else if (mouseY > 24 && mouseY < 33) - game4 = 2; - print_abc_opc(phrase1, 1, 2, game1); - print_abc_opc(phrase2, 1, 10, game2); - print_abc_opc(phrase3, 1, 18, game3); - print_abc_opc(phrase4, 1, 26, game4); + if (mouseY > 0 && mouseY < 9) + game1 = 2; + else if (mouseY > 8 && mouseY < 17) + game2 = 2; + else if (mouseY > 16 && mouseY < 25) + game3 = 2; + else if (mouseY > 24 && mouseY < 33) + game4 = 2; - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + print_abc_opc(phrase1, 1, 2, game1); + print_abc_opc(phrase2, 1, 10, game2); + print_abc_opc(phrase3, 1, 18, game3); + print_abc_opc(phrase4, 1, 26, game4); - if ((button_izq == 1) && (game1 == 2)) { - delay(100); - used1 = 1; - talk(phrase1, sound1); - if (num_ejec == 3) - grr(); - else - response(answer1); - } else if ((button_izq == 1) && (game2 == 2)) { - delay(100); - used2 = 1; - talk(phrase2, sound2); - if (num_ejec == 3) - grr(); - else - response(answer2); - } else if ((button_izq == 1) && (game3 == 2)) { - delay(100); - used3 = 1; - talk(phrase3, sound3); - if (num_ejec == 3) - grr(); - else - response(answer3); - } else if ((button_izq == 1) && (game4 == 2)) { - delay(100); - talk(phrase4, sound4); - breakOut = 1; - } + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (button_izq == 1) { - delay(100); - color_abc(kColorLightGreen); - } + if ((button_izq == 1) && (game1 == 2)) { + delay(100); + used1 = 1; + talk(phrase1, sound1); + if (num_ejec == 3) + grr(); + else + response(answer1); + } else if ((button_izq == 1) && (game2 == 2)) { + delay(100); + used2 = 1; + talk(phrase2, sound2); + if (num_ejec == 3) + grr(); + else + response(answer2); + } else if ((button_izq == 1) && (game3 == 2)) { + delay(100); + used3 = 1; + talk(phrase3, sound3); + if (num_ejec == 3) + grr(); + else + response(answer3); + } else if ((button_izq == 1) && (game4 == 2)) { + delay(100); + talk(phrase4, sound4); + breakOut = 1; + } - game1 = (used1 == 0) ? 1 : 3; - game2 = (used2 == 0) ? 1 : 3; - game3 = (used3 == 0) ? 1 : 3; - game4 = 1; + if (button_izq == 1) { + delay(100); + color_abc(kColorLightGreen); + } - if (breakOut == 0) - goto bucle_opc; + game1 = (used1 == 0) ? 1 : 3; + game2 = (used2 == 0) ? 1 : 3; + game3 = (used3 == 0) ? 1 : 3; + game4 = 1; + } // while (breakOut == 0) if (num_ejec == 2) loadAndDecompressPic(menuBackground, backSurface, 1); @@ -3774,9 +3771,7 @@ void DrasculaEngine::grr() { updateScreen(0, 0, 0, 0, 320, 200, screenSurface); -bucless: - if (!isTalkFinished(&length)) - goto bucless; + while (!isTalkFinished(&length)); updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 7abd674ae5..e01c6dd3ad 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -570,12 +570,9 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) { flags[13] = 1; -bebiendo: - - if (flags[12] == 1) { + while (flags[12] == 1) { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - goto bebiendo; } color_abc(kColorDarkGreen); -- cgit v1.2.3 From bbfb4661eee5ad18c5dcfdb93ecb0de686bda3a8 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 31 May 2008 09:16:26 +0000 Subject: updateData -> updateVisible num_ejec -> currentChapter svn-id: r32417 --- engines/drascula/animation.cpp | 4 +- engines/drascula/drascula.cpp | 280 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 4 +- engines/drascula/rooms.cpp | 68 +++++----- engines/drascula/talk.cpp | 90 ++++++------- 5 files changed, 223 insertions(+), 223 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 1abe1257c2..73ea0f8bc4 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -1592,7 +1592,7 @@ void DrasculaEngine::animation_5_5(){ } flags[6] = 1; - updateData(); + updateVisible(); pause(12); loadAndDecompressPic("96.alg", frontSurface, 1); @@ -2009,7 +2009,7 @@ void DrasculaEngine::animation_6_6() { void DrasculaEngine::animation_7_6() { flags[8] = 1; - updateData(); + updateVisible(); } void DrasculaEngine::animation_9_6() { diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 9248a1d3a1..241e9596ed 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -111,7 +111,7 @@ int DrasculaEngine::init() { } int DrasculaEngine::go() { - num_ejec = 1; // values from 1 to 6 will start each part of game + currentChapter = 1; // values from 1 to 6 will start each part of game hay_que_load = 0; for (;;) { @@ -158,23 +158,23 @@ int DrasculaEngine::go() { withVoices = 0; hay_seleccion = 0; - if (num_ejec != 6) { + if (currentChapter != 6) { loadAndDecompressPic("95.alg", tableSurface, 1); } - if (num_ejec == 1) { + if (currentChapter == 1) { loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); loadAndDecompressPic("99.alg", backSurface, 1); loadAndDecompressPic("97.alg", extraSurface, 1); - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); loadAndDecompressPic("pts.alg", drawSurface2, 1); - } else if (num_ejec == 3) { + } else if (currentChapter == 3) { loadAndDecompressPic("aux13.alg", drawSurface1, COMPLETE_PAL); loadAndDecompressPic("96.alg", frontSurface, 1); loadAndDecompressPic("97.alg", extraSurface, 1); loadAndDecompressPic("99.alg", backSurface, 1); - } else if (num_ejec == 4) { + } else if (currentChapter == 4) { loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); if (hay_que_load == 0) animation_rayo(); @@ -182,11 +182,11 @@ int DrasculaEngine::go() { clearRoom(); loadAndDecompressPic("99.alg", backSurface, 1); loadAndDecompressPic("97.alg", extraSurface, 1); - } else if (num_ejec == 5) { + } else if (currentChapter == 5) { loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); loadAndDecompressPic("97.alg", extraSurface, 1); loadAndDecompressPic("99.alg", backSurface, 1); - } else if (num_ejec == 6) { + } else if (currentChapter == 6) { x_igor = 105, y_igor = 85, sentido_igor = 1; x_dr = 62, y_dr = 99, sentido_dr = 1; frame_pen = 0; @@ -210,10 +210,10 @@ int DrasculaEngine::go() { break; } releaseGame(); - if (num_ejec == 6) + if (currentChapter == 6) break; - num_ejec++; + currentChapter++; } return 0; @@ -443,7 +443,7 @@ bool DrasculaEngine::escoba() { previousMusic = -1; - if (num_ejec != 2) { + if (currentChapter != 2) { int soc = 0; for (n = 0; n < 6; n++) { soc = soc + CHARACTER_WIDTH; @@ -457,7 +457,7 @@ bool DrasculaEngine::escoba() { for (n = 0; n < NUM_FLAGS; n++) flags[n] = 0; - if (num_ejec == 2) { + if (currentChapter == 2) { flags[16] = 1; flags[17] = 1; flags[27] = 1; @@ -466,7 +466,7 @@ bool DrasculaEngine::escoba() { for (n = 1; n < 7; n++) inventoryObjects[n] = n; - if (num_ejec == 1) { + if (currentChapter == 1) { pickObject(28); if (hay_que_load == 0) @@ -486,7 +486,7 @@ bool DrasculaEngine::escoba() { hare_y = 56; lleva_al_hare(65, 145); } - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { addObject(28); sentido_hare = 3; objExit = 162; @@ -497,7 +497,7 @@ bool DrasculaEngine::escoba() { return true; } } - } else if (num_ejec == 3) { + } else if (currentChapter == 3) { addObject(28); addObject(11); addObject(14); @@ -515,7 +515,7 @@ bool DrasculaEngine::escoba() { return true; } } - } else if (num_ejec == 4) { + } else if (currentChapter == 4) { addObject(28); addObject(9); addObject(20); @@ -531,7 +531,7 @@ bool DrasculaEngine::escoba() { return true; } } - } else if (num_ejec == 5) { + } else if (currentChapter == 5) { addObject(28); addObject(7); addObject(9); @@ -550,7 +550,7 @@ bool DrasculaEngine::escoba() { return true; } } - } else if (num_ejec == 6) { + } else if (currentChapter == 6) { addObject(28); addObject(9); @@ -577,7 +577,7 @@ bool DrasculaEngine::escoba() { walkToObject = 0; } - if (num_ejec == 2) { + if (currentChapter == 2) { if (roomNumber == 3 && (hare_x == 279) && (hare_y + alto_hare == 101)) animation_1_2(); else if (roomNumber == 14 && (hare_x == 214) && (hare_y + alto_hare == 121)) @@ -589,7 +589,7 @@ bool DrasculaEngine::escoba() { moveCursor(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (num_ejec == 2) { + if (currentChapter == 2) { if (musicStatus() == 0 && roomMusic != 0) playMusic(roomMusic); } else { @@ -604,14 +604,14 @@ bool DrasculaEngine::escoba() { if (button_dch == 1 && menuScreen == 1) { delay(100); - if (num_ejec == 2) + if (currentChapter == 2) loadAndDecompressPic(menuBackground, backSurface, 1); else loadAndDecompressPic("99.alg", backSurface, 1); setPalette((byte *)&gamePalette); menuScreen = 0; updateEvents(); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } if (button_dch == 1 && menuScreen == 0) { @@ -619,36 +619,36 @@ bool DrasculaEngine::escoba() { characterMoved = 0; if (sentido_hare == 2) sentido_hare = 1; - if (num_ejec == 4) + if (currentChapter == 4) loadAndDecompressPic("icons2.alg", backSurface, 1); - else if (num_ejec == 5) + else if (currentChapter == 5) loadAndDecompressPic("icons3.alg", backSurface, 1); - else if (num_ejec == 6) + else if (currentChapter == 6) loadAndDecompressPic("iconsp.alg", backSurface, 1); else loadAndDecompressPic("icons.alg", backSurface, 1); menuScreen = 1; updateEvents(); withoutVerb(); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } if (button_izq == 1 && menuBar == 1) { delay(100); elige_en_barra(); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else if (button_izq == 1 && takeObject == 0) { delay(100); if (comprueba1()) return true; - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else if (button_izq == 1 && takeObject == 1) { if (comprueba2()) return true; - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } @@ -657,90 +657,90 @@ bool DrasculaEngine::escoba() { Common::KeyCode key = getScan(); if (key == Common::KEYCODE_F1 && menuScreen == 0) { selectVerb(1); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_F2 && menuScreen == 0) { selectVerb(2); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_F3 && menuScreen == 0) { selectVerb(3); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_F4 && menuScreen == 0) { selectVerb(4); cont_sv = 0; } else if (key == Common::KEYCODE_F5 && menuScreen == 0) { selectVerb(5); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_F6 && menuScreen == 0) { selectVerb(6); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_F9) { mesa(); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_F10) { if (!saves()) return true; - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_F8) { withoutVerb(); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_v) { withVoices = 1; print_abc(_textsys[_lang][2], 96, 86); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); delay(1410); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_t) { withVoices = 0; print_abc(_textsys[_lang][3], 94, 86); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); delay(1460); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_ESCAPE) { if (!confirmExit()) return false; - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; - } else if (num_ejec == 6 && key == Common::KEYCODE_0 && roomNumber == 61) { + } else if (currentChapter == 6 && key == Common::KEYCODE_0 && roomNumber == 61) { loadAndDecompressPic("alcbar.alg", drawSurface1, 255); } else if (cont_sv == 15000) { screenSaver(); - if (num_ejec != 3) + if (currentChapter != 3) cont_sv = 0; } else { - if (num_ejec != 3) + if (currentChapter != 3) cont_sv++; } } } void DrasculaEngine::pickObject(int objeto) { - if (num_ejec == 6) + if (currentChapter == 6) loadAndDecompressPic("iconsp.alg", backSurface, 1); - else if (num_ejec == 4) + else if (currentChapter == 4) loadAndDecompressPic("icons2.alg", backSurface, 1); - else if (num_ejec == 5) + else if (currentChapter == 5) loadAndDecompressPic("icons3.alg", backSurface, 1); else loadAndDecompressPic("icons.alg", backSurface, 1); chooseObject(objeto); - if (num_ejec == 2) + if (currentChapter == 2) loadAndDecompressPic(menuBackground, backSurface, 1); else loadAndDecompressPic("99.alg", backSurface, 1); } void DrasculaEngine::chooseObject(int objeto) { - if (num_ejec == 5) { + if (currentChapter == 5) { if (takeObject == 1 && menuScreen == 0 && pickedObject != 16) addObject(pickedObject); } else { @@ -770,7 +770,7 @@ void DrasculaEngine::withoutVerb() { int c = 171; if (menuScreen == 1) c = 0; - if (num_ejec == 5) { + if (currentChapter == 5) { if (takeObject == 1 && pickedObject != 16) addObject(pickedObject); } else { @@ -786,11 +786,11 @@ void DrasculaEngine::withoutVerb() { bool DrasculaEngine::para_cargar(char gameName[]) { previousMusic = roomMusic; menuScreen = 0; - if (num_ejec != 1) + if (currentChapter != 1) clearRoom(); if (!loadGame(gameName)) return false; - if (num_ejec == 2 || num_ejec == 3 || num_ejec == 5) { + if (currentChapter == 2 || currentChapter == 3 || currentChapter == 5) { delete ald; ald = NULL; } @@ -851,12 +851,12 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { getLine(ald, buffer, size); sscanf(buffer, "%d", &nivel_osc); - if (num_ejec == 2) { + if (currentChapter == 2) { getLine(ald, buffer, size); sscanf(buffer, "%d", &martin); } - if (num_ejec == 2 && martin != 0) { + if (currentChapter == 2 && martin != 0) { ancho_hare = martin; getLine(ald, buffer, size); sscanf(buffer, "%d",&alto_hare); @@ -933,7 +933,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { getLine(ald, buffer, size); sscanf(buffer, "%d", &suelo_y2); - if (num_ejec != 2) { + if (currentChapter != 2) { getLine(ald, buffer, size); sscanf(buffer, "%d", &far); getLine(ald, buffer, size); @@ -942,7 +942,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { delete ald; ald = NULL; - if (num_ejec == 2) { + if (currentChapter == 2) { if (martin == 0) { stepX = PASO_HARE_X; stepY = PASO_HARE_Y; @@ -962,7 +962,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { obj_salir = l; } - if (num_ejec == 2) { + if (currentChapter == 2) { if (hare_x == -1) { hare_x = _destX[obj_salir]; hare_y = _destY[obj_salir] - alto_hare; @@ -988,10 +988,10 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { hare_claro(); changeColor = -1; - if (num_ejec == 2) + if (currentChapter == 2) color_abc(kColorLightGreen); - if (num_ejec != 2) { + if (currentChapter != 2) { for (l = 0; l <= suelo_y1; l++) factor_red[l] = far; for (l = suelo_y1; l <= 201; l++) @@ -1011,14 +1011,14 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { } } - if (num_ejec == 5 && roomNumber == 54) { + if (currentChapter == 5 && roomNumber == 54) { for (l = suelo_y1 - 1; l > 84; l--) { factor_red[l] = (int)(far - pequegnez); pequegnez = pequegnez + chiquez; } } - if (num_ejec != 2) { + if (currentChapter != 2) { if (hare_x == -1) { hare_x = _destX[obj_salir]; hare_y = _destY[obj_salir]; @@ -1032,7 +1032,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { characterMoved = 0; } - if (num_ejec == 2) { + if (currentChapter == 2) { soc = 0; for (l = 0; l < 6; l++) { soc += ancho_hare; @@ -1040,15 +1040,15 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { } } - if (num_ejec == 5) + if (currentChapter == 5) hare_se_ve = 1; - updateData(); + updateVisible(); - if (num_ejec == 1) + if (currentChapter == 1) isDoor[7] = 0; - if (num_ejec == 2) { + if (currentChapter == 2) { if (roomNumber == 14 && flags[39] == 1) roomMusic = 16; else if (roomNumber == 15 && flags[39] == 1) @@ -1067,19 +1067,19 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { playMusic(roomMusic); } - if (num_ejec == 2) { + if (currentChapter == 2) { if (roomNumber == 9 || roomNumber == 2 || roomNumber == 14 || roomNumber == 18) conta_blind_vez = getTime(); } - if (num_ejec == 4) { + if (currentChapter == 4) { if (roomNumber == 26) conta_blind_vez = getTime(); } - if (num_ejec == 4 && roomNumber == 24 && flags[29] == 1) + if (currentChapter == 4 && roomNumber == 24 && flags[29] == 1) animation_7_4(); - if (num_ejec == 5) { + if (currentChapter == 5) { if (roomNumber == 45) hare_se_ve = 0; if (roomNumber == 49 && flags[7] == 0) @@ -1096,7 +1096,7 @@ void DrasculaEngine::clearRoom() { } void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { - if (num_ejec == 5 || num_ejec == 6) { + if (currentChapter == 5 || currentChapter == 6) { if (hare_se_ve == 0) { hare_x = sitio_x; hare_y = sitio_y; @@ -1167,7 +1167,7 @@ void DrasculaEngine::checkObjects() { } } - if (num_ejec == 2) { + if (currentChapter == 2) { if (mouseX > hare_x + 2 && mouseY > hare_y + 2 && mouseX < hare_x + ancho_hare - 2 && mouseY < hare_y + alto_hare - 2) { strcpy(textName, "hacker"); @@ -1262,7 +1262,7 @@ bool DrasculaEngine::comprueba2() { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); if (checkFlag(objectNum[l])) return true; - if (num_ejec == 4) + if (currentChapter == 4) break; } } @@ -1324,7 +1324,7 @@ void DrasculaEngine::selectVerb(int verbo) { if (menuScreen == 1) c = 0; - if (num_ejec == 5) { + if (currentChapter == 5) { if (takeObject == 1 && pickedObject != 16) addObject(pickedObject); } else { @@ -1997,7 +1997,7 @@ void DrasculaEngine::placeIgor() { int pos_igor[6]; pos_igor[0] = 1; - if (num_ejec == 4) { + if (currentChapter == 4) { pos_igor[1] = 138; } else { if (sentido_igor == 3) @@ -2020,7 +2020,7 @@ void DrasculaEngine::placeDrascula() { pos_dr[0] = 47; else if (sentido_dr == 0) pos_dr[0] = 1; - else if (sentido_dr == 3 && num_ejec == 1) + else if (sentido_dr == 3 && currentChapter == 1) pos_dr[0] = 93; pos_dr[1] = 122; pos_dr[2] = x_dr; @@ -2028,7 +2028,7 @@ void DrasculaEngine::placeDrascula() { pos_dr[4] = 45; pos_dr[5] = 77; - if (num_ejec == 6) + if (currentChapter == 6) copyRectClip(pos_dr, drawSurface2, screenSurface); else copyRectClip(pos_dr, backSurface, screenSurface); @@ -2052,14 +2052,14 @@ void DrasculaEngine::placeBJ() { void DrasculaEngine::hiccup(int counter) { int y = 0, sentido = 0; - if (num_ejec == 3) + if (currentChapter == 3) y = -1; do { counter--; updateRoom(); - if (num_ejec == 3) + if (currentChapter == 3) updateScreen(0, 0, 0, y, 320, 200, screenSurface); else updateScreen(0, 1, 0, y, 320, 198, screenSurface); @@ -2069,7 +2069,7 @@ void DrasculaEngine::hiccup(int counter) { else y--; - if (num_ejec == 3) { + if (currentChapter == 3) { if (y == 1) sentido = 1; if (y == -1) @@ -2112,7 +2112,7 @@ int DrasculaEngine::musicStatus() { void DrasculaEngine::updateRoom() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - if (num_ejec == 3) { + if (currentChapter == 3) { if (flags[0] == 0) pon_hare(); else @@ -2132,9 +2132,9 @@ bool DrasculaEngine::loadGame(const char *gameName) { } n_ejec2 = sav->readSint32LE(); - if (n_ejec2 != num_ejec) { + if (n_ejec2 != currentChapter) { strcpy(saveName, gameName); - num_ejec = n_ejec2 - 1; + currentChapter = n_ejec2 - 1; hay_que_load = 1; return false; } @@ -2159,9 +2159,9 @@ bool DrasculaEngine::loadGame(const char *gameName) { } void DrasculaEngine::updateDoor(int doorNum) { - if (num_ejec == 1 || num_ejec == 3 || num_ejec == 5 || num_ejec == 6) + if (currentChapter == 1 || currentChapter == 3 || currentChapter == 5 || currentChapter == 6) return; - else if (num_ejec == 2) { + else if (currentChapter == 2) { if (objectNum[doorNum] == 138) isDoor[doorNum] = flags[0]; else if (objectNum[doorNum] == 136) @@ -2176,7 +2176,7 @@ void DrasculaEngine::updateDoor(int doorNum) { isDoor[doorNum] = flags[40]; else if (objectNum[doorNum] == 173) isDoor[doorNum] = flags[36]; - } else if (num_ejec == 4) { + } else if (currentChapter == 4) { if (objectNum[doorNum] == 101 && flags[0] == 0) isDoor[doorNum] = 0; else if (objectNum[doorNum] == 101 && flags[0] == 1 && flags[28] == 1) @@ -2270,7 +2270,7 @@ void DrasculaEngine::startWalking() { stepX = PASO_HARE_X; stepY = PASO_HARE_Y; - if (num_ejec == 2) { + if (currentChapter == 2) { if ((sitio_x < hare_x) && (sitio_y <= (hare_y + alto_hare))) quadrant_1(); else if ((sitio_x < hare_x) && (sitio_y > (hare_y + alto_hare))) @@ -2304,7 +2304,7 @@ void DrasculaEngine::pon_hare() { if (characterMoved == 1 && stepX == PASO_HARE_X) { for (r = 0; r < stepX; r++) { - if (num_ejec != 2) { + if (currentChapter != 2) { if (sentido_hare == 0 && sitio_x - r == hare_x + ancho_hare / 2) { characterMoved = 0; stepX = PASO_HARE_X; @@ -2317,7 +2317,7 @@ void DrasculaEngine::pon_hare() { hare_x = sitio_x - ancho_hare / 2; hare_y = sitio_y - alto_hare; } - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { if (sentido_hare == 0 && sitio_x - r == hare_x) { characterMoved = 0; stepX = PASO_HARE_X; @@ -2348,7 +2348,7 @@ void DrasculaEngine::pon_hare() { } } - if (num_ejec == 1 || num_ejec == 4 || num_ejec == 5 || num_ejec == 6) { + if (currentChapter == 1 || currentChapter == 4 || currentChapter == 5 || currentChapter == 6) { if (hare_se_ve == 0) { increaseFrameNum(); return; @@ -2360,7 +2360,7 @@ void DrasculaEngine::pon_hare() { pos_hare[1] = DIF_MASK_HARE; pos_hare[2] = hare_x; pos_hare[3] = hare_y; - if (num_ejec == 2) { + if (currentChapter == 2) { pos_hare[4] = ancho_hare; pos_hare[5] = alto_hare; } else { @@ -2370,25 +2370,25 @@ void DrasculaEngine::pon_hare() { if (sentido_hare == 0) { pos_hare[1] = 0; - if (num_ejec == 2) + if (currentChapter == 2) copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], factor_red[hare_y + alto_hare], extraSurface, screenSurface); } else if (sentido_hare == 1) { - if (num_ejec == 2) + if (currentChapter == 2) copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], factor_red[hare_y + alto_hare], extraSurface, screenSurface); } else if (sentido_hare == 2) { - if (num_ejec == 2) + if (currentChapter == 2) copyRectClip(pos_hare, backSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], factor_red[hare_y + alto_hare], backSurface, screenSurface); } else { - if (num_ejec == 2) + if (currentChapter == 2) copyRectClip(pos_hare, frontSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], @@ -2399,7 +2399,7 @@ void DrasculaEngine::pon_hare() { pos_hare[1] = frame_y + DIF_MASK_HARE; pos_hare[2] = hare_x; pos_hare[3] = hare_y; - if (num_ejec == 2) { + if (currentChapter == 2) { pos_hare[4] = ancho_hare; pos_hare[5] = alto_hare; } else { @@ -2408,25 +2408,25 @@ void DrasculaEngine::pon_hare() { } if (sentido_hare == 0) { pos_hare[1] = 0; - if (num_ejec == 2) + if (currentChapter == 2) copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], factor_red[hare_y + alto_hare], extraSurface, screenSurface); } else if (sentido_hare == 1) { - if (num_ejec == 2) + if (currentChapter == 2) copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], factor_red[hare_y + alto_hare], extraSurface, screenSurface); } else if (sentido_hare == 2) { - if (num_ejec == 2) + if (currentChapter == 2) copyRectClip(pos_hare, backSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], factor_red[hare_y + alto_hare], backSurface, screenSurface); } else { - if (num_ejec == 2) + if (currentChapter == 2) copyRectClip(pos_hare, frontSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], @@ -2447,7 +2447,7 @@ void DrasculaEngine::showMenu() { h = inventoryObjects[n]; if (h != 0) { - if (num_ejec == 6) + if (currentChapter == 6) copyBackground(x_pol[n], y_pol[n], itemLocations[n].x, itemLocations[n].y, OBJWIDTH, OBJHEIGHT, tableSurface, screenSurface); else @@ -2497,7 +2497,7 @@ void DrasculaEngine::removeObject() { bool DrasculaEngine::exitRoom(int l) { char salgo[13]; - if (num_ejec == 1) { + if (currentChapter == 1) { if (objectNum[l] == 105 && flags[0] == 0) talk(442); else { @@ -2524,7 +2524,7 @@ bool DrasculaEngine::exitRoom(int l) { carga_escoba(salgo); } } - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { updateDoor(l); if (isDoor[l] != 0) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); @@ -2557,7 +2557,7 @@ bool DrasculaEngine::exitRoom(int l) { hare_x =- 1; carga_escoba(salgo); } - } else if (num_ejec == 3) { + } else if (currentChapter == 3) { updateDoor(l); if (isDoor[l] != 0 && visible[l] == 1) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); @@ -2575,7 +2575,7 @@ bool DrasculaEngine::exitRoom(int l) { hare_x =- 1; carga_escoba(salgo); } - } else if (num_ejec == 4) { + } else if (currentChapter == 4) { updateDoor(l); if (isDoor[l] != 0) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); @@ -2596,7 +2596,7 @@ bool DrasculaEngine::exitRoom(int l) { hare_x = -1; carga_escoba(salgo); } - } else if (num_ejec == 5) { + } else if (currentChapter == 5) { updateDoor(l); if (isDoor[l] != 0 && visible[l] == 1) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); @@ -2615,7 +2615,7 @@ bool DrasculaEngine::exitRoom(int l) { hare_x = -1; carga_escoba(salgo); } - } else if (num_ejec == 6) { + } else if (currentChapter == 6) { updateDoor(l); if (isDoor[l] != 0) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); @@ -2998,7 +2998,7 @@ void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int w void DrasculaEngine::quadrant_1() { float distance_x, distance_y; - if (num_ejec == 2) + if (currentChapter == 2) distance_x = hare_x - sitio_x; else distance_x = hare_x + ancho_hare / 2 - sitio_x; @@ -3019,7 +3019,7 @@ void DrasculaEngine::quadrant_1() { void DrasculaEngine::quadrant_2() { float distance_x, distance_y; - if (num_ejec == 2) + if (currentChapter == 2) distance_x = abs(hare_x + ancho_hare - sitio_x); else distance_x = abs(hare_x + ancho_hare / 2 - sitio_x); @@ -3040,7 +3040,7 @@ void DrasculaEngine::quadrant_2() { void DrasculaEngine::quadrant_3() { float distance_x, distance_y; - if (num_ejec == 2) + if (currentChapter == 2) distance_x = hare_x - sitio_x; else distance_x = hare_x + ancho_hare / 2 - sitio_x; @@ -3061,7 +3061,7 @@ void DrasculaEngine::quadrant_3() { void DrasculaEngine::quadrant_4() { float distance_x, distance_y; - if (num_ejec == 2) + if (currentChapter == 2) distance_x = abs(hare_x + ancho_hare - sitio_x); else distance_x = abs(hare_x + ancho_hare / 2 - sitio_x); @@ -3086,7 +3086,7 @@ void DrasculaEngine::saveGame(char gameName[]) { if (!(out = _saveFileMan->openForSaving(gameName))) { error("no puedo abrir el archivo"); } - out->writeSint32LE(num_ejec); + out->writeSint32LE(currentChapter); out->write(currentData, 20); out->writeSint32LE(hare_x); out->writeSint32LE(hare_y); @@ -3134,7 +3134,7 @@ void DrasculaEngine::increaseFrameNum() { } } - if (num_ejec != 2) { + if (currentChapter != 2) { hare_y += (int)(alto_hare - newHeight); hare_x += (int)(ancho_hare - newWidth); alto_hare = (int)newHeight; @@ -3194,7 +3194,7 @@ void DrasculaEngine::converse(const char *nom_fich) { strcpy(para_codificar, nom_fich); - if (num_ejec == 5) + if (currentChapter == 5) withoutVerb(); ald = new Common::File; @@ -3229,19 +3229,19 @@ void DrasculaEngine::converse(const char *nom_fich) { delete ald; ald = NULL; - if (num_ejec == 2 && !strcmp(nom_fich, "op_5.cal") && flags[38] == 1 && flags[33] == 1) { + if (currentChapter == 2 && !strcmp(nom_fich, "op_5.cal") && flags[38] == 1 && flags[33] == 1) { strcpy(phrase3, _text[_lang][405]); strcpy(sound3, "405.als"); answer3 = 31; } - if (num_ejec == 6 && !strcmp(nom_fich, "op_12.cal") && flags[7] == 1) { + if (currentChapter == 6 && !strcmp(nom_fich, "op_12.cal") && flags[7] == 1) { strcpy(phrase3, _text[_lang][273]); strcpy(sound3, "273.als"); answer3 = 14; } - if (num_ejec == 6 && !strcmp(nom_fich, "op_12.cal") && flags[10] == 1) { + if (currentChapter == 6 && !strcmp(nom_fich, "op_12.cal") && flags[10] == 1) { strcpy(phrase3, " cuanto queda para que acabe el partido?"); strcpy(sound3, "274.als"); answer3 = 15; @@ -3276,13 +3276,13 @@ void DrasculaEngine::converse(const char *nom_fich) { while (breakOut == 0) { updateRoom(); - if (num_ejec == 1 || num_ejec == 4 || num_ejec == 6) { + if (currentChapter == 1 || currentChapter == 4 || currentChapter == 6) { if (musicStatus() == 0 && flags[11] == 0) playMusic(roomMusic); - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) playMusic(roomMusic); - } else if (num_ejec == 3 || num_ejec == 5) { + } else if (currentChapter == 3 || currentChapter == 5) { if (musicStatus() == 0) playMusic(roomMusic); } @@ -3327,7 +3327,7 @@ void DrasculaEngine::converse(const char *nom_fich) { delay(100); used1 = 1; talk(phrase1, sound1); - if (num_ejec == 3) + if (currentChapter == 3) grr(); else response(answer1); @@ -3335,7 +3335,7 @@ void DrasculaEngine::converse(const char *nom_fich) { delay(100); used2 = 1; talk(phrase2, sound2); - if (num_ejec == 3) + if (currentChapter == 3) grr(); else response(answer2); @@ -3343,7 +3343,7 @@ void DrasculaEngine::converse(const char *nom_fich) { delay(100); used3 = 1; talk(phrase3, sound3); - if (num_ejec == 3) + if (currentChapter == 3) grr(); else response(answer3); @@ -3364,23 +3364,23 @@ void DrasculaEngine::converse(const char *nom_fich) { game4 = 1; } // while (breakOut == 0) - if (num_ejec == 2) + if (currentChapter == 2) loadAndDecompressPic(menuBackground, backSurface, 1); else loadAndDecompressPic("99.alg", backSurface, 1); - if (num_ejec != 5) + if (currentChapter != 5) withoutVerb(); } void DrasculaEngine::response(int function) { - if (num_ejec == 1) { + if (currentChapter == 1) { if (function == 10) talk_drunk(1); else if (function == 11) talk_drunk(2); else if (function == 12) talk_drunk(3); - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { if (function == 8) animation_8_2(); else if (function == 9) @@ -3409,14 +3409,14 @@ void DrasculaEngine::response(int function) { animation_30_2(); else if (function == 31) animation_31_2(); - } else if (num_ejec == 4) { + } else if (currentChapter == 4) { if (function == 2) animation_2_4(); else if (function == 3) animation_3_4(); else if (function == 4) animation_4_4(); - } else if (num_ejec == 5) { + } else if (currentChapter == 5) { if (function == 2) animation_2_5(); else if (function == 3) @@ -3433,7 +3433,7 @@ void DrasculaEngine::response(int function) { animation_16_5(); else if (function == 17) animation_17_5(); - } else if (num_ejec == 6) { + } else if (currentChapter == 6) { if (function == 2) animation_2_6(); else if (function == 3) @@ -3529,10 +3529,10 @@ bool DrasculaEngine::soundIsActive() { return _mixer->isSoundHandleActive(_soundHandle); } -void DrasculaEngine::updateData() { - if (num_ejec == 1) { +void DrasculaEngine::updateVisible() { + if (currentChapter == 1) { // nothing - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { if (roomNumber == 2 && flags[40] == 0) visible[3] = 0; else if (roomNumber == 3 && flags[3] == 1) @@ -3546,9 +3546,9 @@ void DrasculaEngine::updateData() { visible[4] = 0; else if (roomNumber == 18 && flags[28] == 1) visible[2] = 0; - } else if (num_ejec == 3) { + } else if (currentChapter == 3) { // nothing - } else if (num_ejec == 4) { + } else if (currentChapter == 4) { if (roomNumber == 23 && flags[0] == 0 && flags[11] == 0) visible[2] = 1; if (roomNumber == 23 && flags[0] == 1 && flags[11] == 0) @@ -3573,7 +3573,7 @@ void DrasculaEngine::updateData() { visible[3] = 1; if (roomNumber == 35 && flags[15] == 1) visible[1] = 0; - } else if (num_ejec == 5) { + } else if (currentChapter == 5) { if (roomNumber == 49 && flags[6] == 1) visible[2] = 0; if (roomNumber == 49 && flags[6] == 0) @@ -3588,7 +3588,7 @@ void DrasculaEngine::updateData() { visible[3] = 0; if (roomNumber == 55 && flags[8] == 1) visible[1] = 0; - } else if (num_ejec == 6) { + } else if (currentChapter == 6) { if (roomNumber == 58 && flags[8] == 0) isDoor[1] = 0; if (roomNumber == 58 && flags[8] == 1) @@ -3675,14 +3675,14 @@ void DrasculaEngine::lleva_vb(int pointX) { void DrasculaEngine::hipo_sin_nadie(int counter){ int y = 0, sentido = 0; - if (num_ejec == 3) + if (currentChapter == 3) y = -1; do { counter--; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - if (num_ejec == 3) + if (currentChapter == 3) updateScreen(0, 0, 0, y, 320, 200, screenSurface); else updateScreen(0, 1, 0, y, 320, 198, screenSurface); @@ -3692,7 +3692,7 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ else y--; - if (num_ejec == 3) { + if (currentChapter == 3) { if (y == 1) sentido = 1; if (y == -1) @@ -3711,7 +3711,7 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ void DrasculaEngine::openDoor(int nflag, int doorNum) { if (flags[nflag] == 0) { - if (num_ejec == 1 /*|| num_ejec == 4*/) { + if (currentChapter == 1 /*|| currentChapter == 4*/) { if (nflag != 7) { playSound(3); flags[nflag] = 1; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 54669a6ca4..c50110c65c 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -275,7 +275,7 @@ public: int x_bj, y_bj, sentido_bj; int cont_sv; int term_int; - int num_ejec; + int currentChapter; int hay_que_load; char saveName[13]; int _color; @@ -478,7 +478,7 @@ public: void paleta_hare_claro(); void paleta_hare_oscuro(); void hare_claro(); - void updateData(); + void updateVisible(); void startWalking(); void updateRefresh(); void updateRefresh_pre(); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index deaff84c53..78426aa0cf 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -32,7 +32,7 @@ bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { bool didAction = false; for (int i = 0; i < ARRAYSIZE(roomActions); i++) { - if (roomActions[i].num == num_ejec || + if (roomActions[i].num == currentChapter || roomActions[i].num == -1) { if (roomActions[i].action == pickedObject || roomActions[i].action == kVerbDefault) { @@ -57,8 +57,8 @@ void DrasculaEngine::room_0() { return; // non-default actions - if (num_ejec == 2 || num_ejec == 4 || - num_ejec == 5 || num_ejec == 6) { + if (currentChapter == 2 || currentChapter == 4 || + currentChapter == 5 || currentChapter == 6) { if (pickedObject == kVerbLook) { talk(mirar_t[c_mirar]); c_mirar++; @@ -522,7 +522,7 @@ void DrasculaEngine::room_22(int fl) { stopSound(); withoutVerb(); removeObject(22); - updateData(); + updateVisible(); sentido_hare = 3; talk(499); talk(500); @@ -543,10 +543,10 @@ void DrasculaEngine::room_22(int fl) { void DrasculaEngine::room_23(int fl) { if (pickedObject == kVerbOpen && fl == 103) { openDoor(0, 0); - updateData(); + updateVisible(); } else if(pickedObject == kVerbClose && fl == 103) { closeDoor(0, 0); - updateData(); + updateVisible(); } else if(pickedObject == kVerbOpen && fl == 104) openDoor(1, 1); else if(pickedObject == kVerbClose && fl == 104) @@ -757,7 +757,7 @@ void DrasculaEngine::room_35(int fl) { visible[1] = 0; flags[15] = 1; flags[17] = 1; - updateData(); + updateVisible(); } else if (pickedObject == kVerbPick && fl == 149) { pickObject(13); visible[3] = 0; @@ -813,7 +813,7 @@ void DrasculaEngine::room_53(int fl) { else if (pickedObject == 16 && fl == 121) { flags[2] = 1; withoutVerb(); - updateData(); + updateVisible(); } else if (pickedObject == 16) { talk(439); withoutVerb(); @@ -846,7 +846,7 @@ void DrasculaEngine::room_54(int fl) { pickObject(8); flags[13] = 1; talk_mus(10); - updateData(); + updateVisible(); } else if (pickedObject == kVerbOpen && fl == 119) talk(125); else if (pickedObject == kVerbLook && fl == 119) @@ -864,7 +864,7 @@ void DrasculaEngine::room_55(int fl) { if (pickedObject == kVerbPick && fl == 122) { pickObject(12); flags[8] = 1; - updateData(); + updateVisible(); } else if (pickedObject == kVerbLook && fl == 122) talk(138); else if (pickedObject == kVerbLook && fl == 204) @@ -1078,12 +1078,12 @@ void DrasculaEngine::room_pendulum(int fl) { } void DrasculaEngine::updateRefresh() { - if (num_ejec == 1) { + if (currentChapter == 1) { if (roomNumber == 63) update_63(); else if (roomNumber == 62) update_62(); - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { if (roomNumber == 3) update_3(); else if (roomNumber == 2) @@ -1100,12 +1100,12 @@ void DrasculaEngine::updateRefresh() { update_18(); else if (roomNumber == 10) showMap(); - } else if (num_ejec == 3) { + } else if (currentChapter == 3) { if (roomNumber == 20) update_20(); else if (roomNumber == 13) update_13(); - } else if (num_ejec == 4) { + } else if (currentChapter == 4) { if (roomNumber == 29) update_29(); else if (roomNumber == 26) @@ -1118,14 +1118,14 @@ void DrasculaEngine::updateRefresh() { update_34(); else if (roomNumber == 35) update_35(); - } else if (num_ejec == 5) { + } else if (currentChapter == 5) { if (roomNumber == 45) showMap(); else if (roomNumber == 50) update_50(); else if (roomNumber == 57) update_57(); - } else if (num_ejec == 6) { + } else if (currentChapter == 6) { if (roomNumber == 60) update_60(); else if (roomNumber == 61) @@ -1136,12 +1136,12 @@ void DrasculaEngine::updateRefresh() { } void DrasculaEngine::updateRefresh_pre() { - if (num_ejec == 1) { + if (currentChapter == 1) { if (roomNumber == 62) update_62_pre(); else if (roomNumber == 16) placeBJ(); - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { if (roomNumber == 1) update_1_pre(); else if (roomNumber == 3) @@ -1164,9 +1164,9 @@ void DrasculaEngine::updateRefresh_pre() { update_17_pre(); else if (roomNumber == 18) update_18_pre(); - } else if (num_ejec == 3) { + } else if (currentChapter == 3) { // nothing - } else if (num_ejec == 4) { + } else if (currentChapter == 4) { if (roomNumber == 21) update_21_pre(); else if (roomNumber == 22) @@ -1189,7 +1189,7 @@ void DrasculaEngine::updateRefresh_pre() { update_34_pre(); else if (roomNumber == 35) update_35_pre(); - } else if (num_ejec == 5) { + } else if (currentChapter == 5) { if (roomNumber == 49) update_49_pre(); else if (roomNumber == 53) @@ -1198,7 +1198,7 @@ void DrasculaEngine::updateRefresh_pre() { update_54_pre(); else if (roomNumber == 56) update_56_pre(); - } else if (num_ejec == 6) { + } else if (currentChapter == 6) { if (roomNumber == 102) update_pendulum(); else if (roomNumber == 58) @@ -1808,10 +1808,10 @@ bool DrasculaEngine::checkFlag(int fl) { hasAnswer = 1; if (menuScreen == 1) { - if (num_ejec == 1) { + if (currentChapter == 1) { if (pickedObject == kVerbLook && fl == 28) talk(328); - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { if ((pickedObject == kVerbLook && fl == 22 && flags[23] == 0) || (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) { talk(164); @@ -1863,7 +1863,7 @@ bool DrasculaEngine::checkFlag(int fl) { talk(152); else hasAnswer = 0; - } else if (num_ejec == 3) { + } else if (currentChapter == 3) { if (pickedObject == kVerbLook && fl == 22) talk(307); else if (pickedObject == kVerbLook && fl == 28) @@ -1908,7 +1908,7 @@ bool DrasculaEngine::checkFlag(int fl) { talk(152); else hasAnswer = 0; - } else if (num_ejec == 4) { + } else if (currentChapter == 4) { if ((pickedObject == 18 && fl == 19) || (pickedObject == 19 && fl == 18)) { withoutVerb(); chooseObject(21); @@ -1958,7 +1958,7 @@ bool DrasculaEngine::checkFlag(int fl) { talk(161); else hasAnswer = 0; - } else if (num_ejec == 5) { + } else if (currentChapter == 5) { if (pickedObject == kVerbLook && fl == 28) talk(328); else if (pickedObject == kVerbLook && fl == 7) @@ -1986,7 +1986,7 @@ bool DrasculaEngine::checkFlag(int fl) { talk(162); else hasAnswer = 0; - } else if (num_ejec == 6) { + } else if (currentChapter == 6) { if (pickedObject == kVerbLook && fl == 28) talk(328); else if (pickedObject == kVerbLook && fl == 9) { @@ -2000,7 +2000,7 @@ bool DrasculaEngine::checkFlag(int fl) { hasAnswer = 0; } } else { - if (num_ejec == 1) { + if (currentChapter == 1) { if (pickedObject == kVerbLook && fl == 50) talk(308); else if (pickedObject == kVerbOpen && fl == 50) @@ -2019,7 +2019,7 @@ bool DrasculaEngine::checkFlag(int fl) { room_63(fl); else hasAnswer = 0; - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { if (pickedObject == kVerbLook && fl == 50) talk(308); else if (pickedObject == kVerbOpen && fl == 50) @@ -2071,7 +2071,7 @@ bool DrasculaEngine::checkFlag(int fl) { room_19(fl); else hasAnswer = 0; - } else if (num_ejec == 3) { + } else if (currentChapter == 3) { if (pickedObject == kVerbLook && fl == 50) talk(309); else if (pickedObject == kVerbOpen && fl == 50) @@ -2089,7 +2089,7 @@ bool DrasculaEngine::checkFlag(int fl) { return true; } else hasAnswer = 0; - } else if (num_ejec == 4) { + } else if (currentChapter == 4) { if (roomNumber == 28) talk(178); else if (pickedObject == kVerbLook && fl == 50) @@ -2139,7 +2139,7 @@ bool DrasculaEngine::checkFlag(int fl) { room_44(fl); else hasAnswer = 0; - } else if (num_ejec == 5) { + } else if (currentChapter == 5) { if (pickedObject == kVerbLook && fl == 50) talk("Cuanto mas me miro, mas me gusto", "54.als"); else if (pickedObject == kVerbOpen && fl == 50) @@ -2167,7 +2167,7 @@ bool DrasculaEngine::checkFlag(int fl) { return true; } else hasAnswer = 0; - } else if (num_ejec == 6) { + } else if (currentChapter == 6) { if (pickedObject == kVerbLook && fl == 50 && flags[0] == 1) talk(308); else if (pickedObject == kVerbLook && fl == 50 && flags[0] == 0) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index e01c6dd3ad..5f9f6098f5 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -130,11 +130,11 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { placeIgor(); placeDrascula(); - if (num_ejec == 6) + if (currentChapter == 6) pon_hare(); copyBackground(x_dr, y_dr, x_dr, y_dr, 38, 31, drawSurface1, screenSurface); - if (num_ejec == 6) + if (currentChapter == 6) copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, drawSurface2, screenSurface); else copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, backSurface, screenSurface); @@ -179,11 +179,11 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { placeIgor(); placeDrascula(); - if (num_ejec == 6) + if (currentChapter == 6) pon_hare(); copyBackground(x_dr, y_dr, x_dr, y_dr, 45, 31, drawSurface1, screenSurface); - if (num_ejec != 6) + if (currentChapter != 6) copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, backSurface, screenSurface); else copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, drawSurface2, screenSurface); @@ -199,12 +199,12 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { } while (!isTalkFinished(&length)); - if (num_ejec == 6) + if (currentChapter == 6) updateRoom(); placeIgor(); placeDrascula(); - if (num_ejec == 6) + if (currentChapter == 6) pon_hare(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } @@ -212,29 +212,29 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { void DrasculaEngine::talk_solo(const char *said, const char *filename) { int length = strlen(said); - if (num_ejec == 1) + if (currentChapter == 1) color_abc(color_solo); - else if (num_ejec == 4) + else if (currentChapter == 4) color_abc(kColorRed); talkInit(filename); - if (num_ejec == 6) + if (currentChapter == 6) copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); do { if (withVoices == 0) { - if (num_ejec == 1) + if (currentChapter == 1) centerText(said, 156, 90); - else if (num_ejec == 6) + else if (currentChapter == 6) centerText(said, 213, 72); - else if (num_ejec == 5) + else if (currentChapter == 5) centerText(said, 173, 92); } updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } while (!isTalkFinished(&length)); - if (num_ejec == 6) { + if (currentChapter == 6) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); } @@ -262,11 +262,11 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { updateRefresh_pre(); - if (num_ejec == 1 || num_ejec == 4) + if (currentChapter == 1 || currentChapter == 4) placeIgor(); - if (num_ejec == 1) + if (currentChapter == 1) placeDrascula(); - if (num_ejec == 1 || num_ejec == 6) + if (currentChapter == 1 || currentChapter == 6) copyBackground(x_igor, y_igor, x_igor, y_igor, 29, 25, drawSurface1, screenSurface); copyRect(x_talk[face], 173, x_igor, y_igor, 29, 25, frontSurface, screenSurface); @@ -280,11 +280,11 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { pause(3); } while (!isTalkFinished(&length)); - if (num_ejec == 6) { + if (currentChapter == 6) { updateRoom(); } - if (num_ejec == 1) { + if (currentChapter == 1) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); @@ -308,10 +308,10 @@ void DrasculaEngine::talk_bartender(const char *said, const char *filename) { talkInit(filename); do { - if (num_ejec == 1) { + if (currentChapter == 1) { if (musicStatus() == 0) playMusic(roomMusic); - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) playMusic(roomMusic); } @@ -355,7 +355,7 @@ void DrasculaEngine::talk_bj(const char *said, const char *filename) { talkInit(filename); do { - if (num_ejec != 5) { + if (currentChapter != 5) { face = _rnd->getRandomNumber(4); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -398,7 +398,7 @@ void DrasculaEngine::talk(int index) { void DrasculaEngine::talk(const char *said, const char *filename) { int suma_1_pixel = 0; - if (num_ejec != 2) + if (currentChapter != 2) suma_1_pixel = 1; int y_mask_talk = 170; @@ -407,7 +407,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { int face; int length = strlen(said); - if (num_ejec == 6) { + if (currentChapter == 6) { if (flags[0] == 0 && roomNumber == 102) { talk_pen(said, filename); return; @@ -418,12 +418,12 @@ void DrasculaEngine::talk(const char *said, const char *filename) { } } - if (num_ejec != 2) { + if (currentChapter != 2) { if (factor_red[hare_y + alto_hare] == 100) suma_1_pixel = 0; } - if (num_ejec == 4) { + if (currentChapter == 4) { if (roomNumber == 24 || flags[29] == 0) { color_abc(kColorYellow); } @@ -439,7 +439,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - if (num_ejec == 2) + if (currentChapter == 2) copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, screenSurface, drawSurface3); else copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), @@ -448,7 +448,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { pon_hare(); - if (num_ejec == 2) { + if (currentChapter == 2) { if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg")) copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, drawSurface3, screenSurface); } else { @@ -458,7 +458,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { } if (sentido_hare == 0) { - if (num_ejec == 2) + if (currentChapter == 2) copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, extraSurface, screenSurface); else @@ -468,7 +468,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { updateRefresh(); } else if (sentido_hare == 1) { - if (num_ejec == 2) + if (currentChapter == 2) copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, extraSurface, screenSurface); else @@ -476,7 +476,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 2) { - if (num_ejec == 2) + if (currentChapter == 2) copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); else @@ -486,7 +486,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { frontSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 3) { - if (num_ejec == 2) + if (currentChapter == 2) copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); else @@ -508,7 +508,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { updateRoom(); updateScreen(0, 0, 0, 0, 320, 200, screenSurface); - if (num_ejec == 1) { + if (currentChapter == 1) { if (musicStatus() == 0 && flags[11] == 0 && musicStopped == 0) playMusic(roomMusic); } @@ -564,7 +564,7 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) { int face; int length = strlen(said); - if (num_ejec == 1) { + if (currentChapter == 1) { loadAndDecompressPic("an11y13.alg", frontSurface, 1); } @@ -602,14 +602,14 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) { updateScreen(0, 0, 0, 0, 320, 200, screenSurface); flags[13] = 0; - if (num_ejec == 1) { + if (currentChapter == 1) { loadAndDecompressPic("96.alg", frontSurface, 1); } - if (num_ejec == 1) { + if (currentChapter == 1) { if (musicStatus() == 0 && flags[11] == 0) playMusic(roomMusic); - } else if (num_ejec == 2) { + } else if (currentChapter == 2) { if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) playMusic(roomMusic); } @@ -1037,7 +1037,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha color_abc(kColorYellow); - if (num_ejec == 1) { + if (currentChapter == 1) { if (factor_red[hare_y + alto_hare] == 100) suma_1_pixel = 0; } @@ -1052,13 +1052,13 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - if (num_ejec == 2) + if (currentChapter == 2) copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, screenSurface, drawSurface3); else copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), screenSurface, drawSurface3); pon_hare(); - if (num_ejec == 2) { + if (currentChapter == 2) { if (alto_hare != 56) copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, drawSurface3, screenSurface); } else @@ -1066,21 +1066,21 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), drawSurface3, screenSurface); if (sentido_hare == 0) { - if (num_ejec == 2) + if (currentChapter == 2) copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, extraSurface, screenSurface); else reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 1) { - if (num_ejec == 2) + if (currentChapter == 2) copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, extraSurface, screenSurface); else reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 2) { - if (num_ejec == 2) + if (currentChapter == 2) copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); else reduce_hare_chico(x_talk_izq[face], y_mask_talk, @@ -1088,7 +1088,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha ancho_talk, alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 3) { - if (num_ejec == 2) + if (currentChapter == 2) copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); else reduce_hare_chico(x_talk_dch[face], y_mask_talk, @@ -1106,9 +1106,9 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha pause(3); } while (!isTalkFinished(&length)); - if (num_ejec == 1 && musicStatus() == 0 && flags[11] == 0) + if (currentChapter == 1 && musicStatus() == 0 && flags[11] == 0) playMusic(roomMusic); - if (num_ejec == 2 && musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) + if (currentChapter == 2 && musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) playMusic(roomMusic); } -- cgit v1.2.3 From c80543cbb847101a5b03eb5f786eacb25726a204 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 31 May 2008 09:38:12 +0000 Subject: Cleanup svn-id: r32418 --- engines/drascula/drascula.cpp | 156 ++++++++++++++++-------------------------- 1 file changed, 59 insertions(+), 97 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 241e9596ed..8399a1017c 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -823,6 +823,16 @@ static char *getLine(Common::File *fp, char *buf, int len) { return buf; } +void getIntFromLine(Common::File *fp, char *buf, int len, int* result) { + getLine(fp, buf, len); + sscanf(buf, "%d", result); +} + +void getStringFromLine(Common::File *fp, char *buf, int len, char* result) { + getLine(fp, buf, len); + sscanf(buf, "%s", result); +} + void DrasculaEngine::carga_escoba(const char *nom_fich) { int soc, l, martin = 0, obj_salir = 0; float chiquez = 0, pequegnez = 0; @@ -841,40 +851,26 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { error("missing data file"); } int size = ald->size(); - getLine(ald, buffer, size); - roomNumber = atoi(buffer); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &roomMusic); - getLine(ald, buffer, size); - sscanf(buffer, "%s", roomDisk); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &nivel_osc); + getIntFromLine(ald, buffer, size, &roomNumber); + getIntFromLine(ald, buffer, size, &roomMusic); + getStringFromLine(ald, buffer, size, roomDisk); + getIntFromLine(ald, buffer, size, &nivel_osc); - if (currentChapter == 2) { - getLine(ald, buffer, size); - sscanf(buffer, "%d", &martin); - } + if (currentChapter == 2) + getIntFromLine(ald, buffer, size, &martin); if (currentChapter == 2 && martin != 0) { ancho_hare = martin; - getLine(ald, buffer, size); - sscanf(buffer, "%d",&alto_hare); - getLine(ald, buffer, size); - sscanf(buffer, "%d",&feetHeight); - getLine(ald, buffer, size); - sscanf(buffer, "%d",&stepX); - getLine(ald, buffer, size); - sscanf(buffer, "%d",&stepY); - - getLine(ald, buffer, size); - sscanf(buffer, "%s",pant1); - getLine(ald, buffer, size); - sscanf(buffer, "%s",pant2); - getLine(ald, buffer, size); - sscanf(buffer, "%s",pant3); - getLine(ald, buffer, size); - sscanf(buffer, "%s",pant4); + getIntFromLine(ald, buffer, size, &alto_hare); + getIntFromLine(ald, buffer, size, &feetHeight); + getIntFromLine(ald, buffer, size, &stepX); + getIntFromLine(ald, buffer, size, &stepY); + + getStringFromLine(ald, buffer, size, pant1); + getStringFromLine(ald, buffer, size, pant2); + getStringFromLine(ald, buffer, size, pant3); + getStringFromLine(ald, buffer, size, pant4); loadAndDecompressPic(pant2, extraSurface, 1); loadAndDecompressPic(pant1, frontSurface, 1); @@ -883,61 +879,38 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { strcpy(menuBackground, pant4); } - getLine(ald, buffer, size); - sscanf(buffer, "%d", &numRoomObjs); + getIntFromLine(ald, buffer, size, &numRoomObjs); for (l = 0; l < numRoomObjs; l++) { - getLine(ald, buffer, size); - sscanf(buffer, "%d", &objectNum[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%s", objName[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &x1[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &y1[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &x2[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &y2[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &sitiobj_x[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &sitiobj_y[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &sentidobj[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &visible[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &isDoor[l]); + getIntFromLine(ald, buffer, size, &objectNum[l]); + getStringFromLine(ald, buffer, size, objName[l]); + getIntFromLine(ald, buffer, size, &x1[l]); + getIntFromLine(ald, buffer, size, &y1[l]); + getIntFromLine(ald, buffer, size, &x2[l]); + getIntFromLine(ald, buffer, size, &y2[l]); + getIntFromLine(ald, buffer, size, &sitiobj_x[l]); + getIntFromLine(ald, buffer, size, &sitiobj_y[l]); + getIntFromLine(ald, buffer, size, &sentidobj[l]); + getIntFromLine(ald, buffer, size, &visible[l]); + getIntFromLine(ald, buffer, size, &isDoor[l]); if (isDoor[l] != 0) { - getLine(ald, buffer, size); - sscanf(buffer, "%s", _targetSurface[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &_destX[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &_destY[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &sentido_alkeva[l]); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &alapuertakeva[l]); + getStringFromLine(ald, buffer, size, _targetSurface[l]); + getIntFromLine(ald, buffer, size, &_destX[l]); + getIntFromLine(ald, buffer, size, &_destY[l]); + getIntFromLine(ald, buffer, size, &sentido_alkeva[l]); + getIntFromLine(ald, buffer, size, &alapuertakeva[l]); updateDoor(l); } } - getLine(ald, buffer, size); - sscanf(buffer, "%d", &suelo_x1); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &suelo_y1); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &suelo_x2); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &suelo_y2); + getIntFromLine(ald, buffer, size, &suelo_x1); + getIntFromLine(ald, buffer, size, &suelo_y1); + getIntFromLine(ald, buffer, size, &suelo_x2); + getIntFromLine(ald, buffer, size, &suelo_y2); if (currentChapter != 2) { - getLine(ald, buffer, size); - sscanf(buffer, "%d", &far); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &near); + getIntFromLine(ald, buffer, size, &far); + getIntFromLine(ald, buffer, size, &near); } delete ald; ald = NULL; @@ -3204,28 +3177,17 @@ void DrasculaEngine::converse(const char *nom_fich) { } int size = ald->size(); - getLine(ald, buffer, size); - sscanf(buffer, "%s", phrase1); - getLine(ald, buffer, size); - sscanf(buffer, "%s", phrase2); - getLine(ald, buffer, size); - sscanf(buffer, "%s", phrase3); - getLine(ald, buffer, size); - sscanf(buffer, "%s", phrase4); - getLine(ald, buffer, size); - sscanf(buffer, "%s", sound1); - getLine(ald, buffer, size); - sscanf(buffer, "%s", sound2); - getLine(ald, buffer, size); - sscanf(buffer, "%s", sound3); - getLine(ald, buffer, size); - sscanf(buffer, "%s", sound4); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &answer1); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &answer2); - getLine(ald, buffer, size); - sscanf(buffer, "%d", &answer3); + getStringFromLine(ald, buffer, size, phrase1); + getStringFromLine(ald, buffer, size, phrase2); + getStringFromLine(ald, buffer, size, phrase3); + getStringFromLine(ald, buffer, size, phrase4); + getStringFromLine(ald, buffer, size, sound1); + getStringFromLine(ald, buffer, size, sound2); + getStringFromLine(ald, buffer, size, sound3); + getStringFromLine(ald, buffer, size, sound4); + getIntFromLine(ald, buffer, size, &answer1); + getIntFromLine(ald, buffer, size, &answer2); + getIntFromLine(ald, buffer, size, &answer3); delete ald; ald = NULL; -- cgit v1.2.3 From 6ba824e66e72c9563bda7183e717308a325cc819 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 31 May 2008 09:45:47 +0000 Subject: Oops svn-id: r32419 --- engines/drascula/staticdata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index eddccd3b98..7d8b596a8e 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -84,7 +84,7 @@ const CharInfo charMap[CHARMAP_SIZE] = { { '\343', 78, 2 }, { '\353', 87, 2 }, // I, J { '\266', 96, 2 }, { '\322', 105, 2 }, // K, L { '\327', 114, 2 }, { '\342', 123, 2 }, // M, N - { '\352', 132, 0 } // special Spanish char + { '\352', 132, 2 } // special Spanish char }; const ItemLocation itemLocations[] = { -- cgit v1.2.3 From e5934e38c5d3906a9f4fbd20a4ba2f77ff97898f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 31 May 2008 09:49:09 +0000 Subject: Fix bug #1979579: "DRASCULA: typo in Spanish verbs" svn-id: r32420 --- engines/drascula/staticdata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 7d8b596a8e..94873efd08 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -5564,7 +5564,7 @@ const char *_textverbs[][6] = { }, { "mirar", - "cogar", + "coger", "abrir", "cerrar", "hablar", -- cgit v1.2.3 From 9f95b76588950119b5f7a4be075b10942e55577d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 31 May 2008 09:55:11 +0000 Subject: x_pantalla/y_pantalla -> screenX/screenY y_de_signos -> signY pos_texto -> textPos svn-id: r32421 --- engines/drascula/drascula.cpp | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 8399a1017c..cb52a424df 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1508,8 +1508,8 @@ bool DrasculaEngine::saves() { return true; } -void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) { - int pos_texto[8]; +void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { + int textPos[8]; int letterY = 0, letterX = 0, h, length; length = strlen(said); @@ -1535,38 +1535,38 @@ void DrasculaEngine::print_abc(const char *said, int x_pantalla, int y_pantalla) } // if } // for - pos_texto[0] = letterX; - pos_texto[1] = letterY; - pos_texto[2] = x_pantalla; - pos_texto[3] = y_pantalla; - pos_texto[4] = CHAR_WIDTH; - pos_texto[5] = CHAR_HEIGHT; + textPos[0] = letterX; + textPos[1] = letterY; + textPos[2] = screenX; + textPos[3] = screenY; + textPos[4] = CHAR_WIDTH; + textPos[5] = CHAR_HEIGHT; - copyRectClip(pos_texto, textSurface, screenSurface); + copyRectClip(textPos, textSurface, screenSurface); - x_pantalla = x_pantalla + CHAR_WIDTH; - if (x_pantalla > 317) { - x_pantalla = 0; - y_pantalla = y_pantalla + CHAR_HEIGHT + 2; + screenX = screenX + CHAR_WIDTH; + if (screenX > 317) { + screenX = 0; + screenY = screenY + CHAR_HEIGHT + 2; } } // for } -void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_pantalla, int game) { - int pos_texto[6]; - int y_de_signos, letterY, letterX = 0, h, length; +void DrasculaEngine::print_abc_opc(const char *said, int screenX, int screenY, int game) { + int textPos[6]; + int signY, letterY, letterX = 0, h, length; length = strlen(said); for (h = 0; h < length; h++) { if (game == 1) { letterY = 6; - y_de_signos = 15; + signY = 15; } else if (game == 3) { letterY = 56; - y_de_signos = 65; + signY = 65; } else { letterY = 31; - y_de_signos = 40; + signY = 40; } int c = toupper(said[h]); @@ -1581,21 +1581,21 @@ void DrasculaEngine::print_abc_opc(const char *said, int x_pantalla, int y_panta letterX = multiplier * 7 + 10; if (charMap[i].charType > 0) - letterY = y_de_signos; + letterY = signY; break; } // if } // for - pos_texto[0] = letterX; - pos_texto[1] = letterY; - pos_texto[2] = x_pantalla; - pos_texto[3] = y_pantalla; - pos_texto[4] = CHAR_WIDTH_OPC; - pos_texto[5] = CHAR_HEIGHT_OPC; + textPos[0] = letterX; + textPos[1] = letterY; + textPos[2] = screenX; + textPos[3] = screenY; + textPos[4] = CHAR_WIDTH_OPC; + textPos[5] = CHAR_HEIGHT_OPC; - copyRectClip(pos_texto, backSurface, screenSurface); + copyRectClip(textPos, backSurface, screenSurface); - x_pantalla = x_pantalla + CHAR_WIDTH_OPC; + screenX = screenX + CHAR_WIDTH_OPC; } } -- cgit v1.2.3 From 7ce59d993b4f23d970a0d66c8041b07732dc2b84 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 31 May 2008 10:01:13 +0000 Subject: Remove trailing spaces svn-id: r32422 --- engines/drascula/drascula.cpp | 2 +- engines/drascula/rooms.cpp | 8 ++++---- engines/drascula/staticdata.h | 6 +++--- engines/drascula/talk.cpp | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index cb52a424df..b9d07c6830 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1512,7 +1512,7 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { int textPos[8]; int letterY = 0, letterX = 0, h, length; length = strlen(said); - + for (h = 0; h < length; h++) { int c = toupper(said[h]); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 78426aa0cf..34c7111bff 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -32,7 +32,7 @@ bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { bool didAction = false; for (int i = 0; i < ARRAYSIZE(roomActions); i++) { - if (roomActions[i].num == currentChapter || + if (roomActions[i].num == currentChapter || roomActions[i].num == -1) { if (roomActions[i].action == pickedObject || roomActions[i].action == kVerbDefault) { @@ -57,7 +57,7 @@ void DrasculaEngine::room_0() { return; // non-default actions - if (currentChapter == 2 || currentChapter == 4 || + if (currentChapter == 2 || currentChapter == 4 || currentChapter == 5 || currentChapter == 6) { if (pickedObject == kVerbLook) { talk(mirar_t[c_mirar]); @@ -149,7 +149,7 @@ void DrasculaEngine::room_5(int fl) { if (roomParse(room5Actions, fl)) return; - if (pickedObject == kVerbLook && fl == 136 && flags[8] == 0) + if (pickedObject == kVerbLook && fl == 136 && flags[8] == 0) talk(14); else if (pickedObject == 10 && fl == 136) { animation_5_2(); @@ -1983,7 +1983,7 @@ bool DrasculaEngine::checkFlag(int fl) { else if (pickedObject == kVerbLook && fl == 17) talk(478); else if (pickedObject == kVerbLook && fl == 20) - talk(162); + talk(162); else hasAnswer = 0; } else if (currentChapter == 6) { diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 94873efd08..36b68d15c6 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -31,7 +31,7 @@ namespace Drascula { const CharInfo charMap[CHARMAP_SIZE] = { - // Letters + // Letters // --------------------------------------- { 'A', 6, 0 }, { 'B', 15, 0 }, { 'C', 24, 0 }, { 'D', 33, 0 }, @@ -49,7 +49,7 @@ const CharInfo charMap[CHARMAP_SIZE] = { { 'Y', 231, 0 }, { 'Z', 240, 0 }, // --------------------------------------- { 0xa7, 250, 0 }, { ' ', 250, 0 }, - // Signs + // Signs // --------------------------------------- { '.', 6, 1 }, { ',', 15, 1 }, { '-', 24, 1 }, { '?', 33, 1 }, @@ -66,7 +66,7 @@ const CharInfo charMap[CHARMAP_SIZE] = { { '5', 222, 1 }, { '6', 231, 1 }, { '7', 240, 1 }, { '8', 249, 1 }, { '9', 258, 1 }, { '0', 267, 1 }, - // Accented + // Accented // --------------------------------------- { '\240', 6, 2 }, { '\202', 15, 2 }, // A, B { '\241', 24, 2 }, { '\242', 33, 2 }, // C, D diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 5f9f6098f5..db8fd37e1b 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -200,7 +200,7 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { } while (!isTalkFinished(&length)); if (currentChapter == 6) - updateRoom(); + updateRoom(); placeIgor(); placeDrascula(); -- cgit v1.2.3 From 601b735346698567bd6e1ecd277e4085ba104624 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 31 May 2008 10:24:45 +0000 Subject: Cleanup svn-id: r32423 --- engines/drascula/drascula.cpp | 30 ++++++------------------------ engines/drascula/drascula.h | 10 ++++++++++ 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index b9d07c6830..50f2b36629 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1669,20 +1669,14 @@ void DrasculaEngine::screenSaver() { for (int i = 0; i < 320; i++) { tempLine[i] = (int)(sin(coeff2) * 16); coeff2 += 0.02f; - if (tempLine[i] < 0) - tempLine[i] += 200; - if (tempLine[i] > 199) - tempLine[i] -= 200; + tempLine[i] = checkWrapY(tempLine[i]); } coeff2 = coeff; for (int i = 0; i < 200; i++) { tempRow[i] = (int)(sin(coeff2) * 16); coeff2 += 0.02f; - if (tempRow[i] < 0) - tempRow[i] += 320; - if (tempRow[i] > 319) - tempRow[i] -= 320; + tempRow[i] = checkWrapX(tempRow[i]); } if (++count2 > 199) @@ -1693,30 +1687,18 @@ void DrasculaEngine::screenSaver() { for (int i = 0; i < 200; i++) { for (int j = 0; j < 320; j++) { x1_ = j + tempRow[i]; - if (x1_ < 0) - x1_ += 320; - if (x1_ > 319) - x1_ -= 319; + x1_ = checkWrapX(x1_); y1_ = i + count2; - if (y1_ < 0) - y1_ += 200; - if (y1_ > 199) - y1_ -= 200; + y1_ = checkWrapY(y1_); off1 = 320 * y1_ + x1_; x1_ = j + count; - if (x1_ < 0) - x1_ += 320; - if (x1_ > 319) - x1_ -= 320; + x1_ = checkWrapX(x1_); y1_ = i + tempLine[j]; - if (y1_ < 0) - y1_ += 200; - if (y1_ > 199) - y1_ -= 200; + y1_ = checkWrapY(y1_); off2 = 320 * y1_ + x1_; VGA[320 * i + j] = ghost[drawSurface1[off2] + (copia[off1] << 8)]; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index c50110c65c..aeda0e6e4e 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -193,6 +193,16 @@ public: int height, byte *src, byte *dest); void copyRectClip(int *Array, byte *src, byte *dest); void updateScreen(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *buffer); + int checkWrapX(int x) { + if (x < 0) x += 320; + if (x > 319) x -= 320; + return x; + } + int checkWrapY(int y) { + if (y < 0) y += 200; + if (y > 199) y -= 200; + return y; + } DacPalette256 gamePalette; DacPalette256 palHare; -- cgit v1.2.3 From 8a8c67c9b76d75f3a2984da8818f462cee092879 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 31 May 2008 12:40:02 +0000 Subject: Simplified calls to updateScreen() svn-id: r32424 --- engines/drascula/animation.cpp | 172 ++++++++++++++++++++--------------------- engines/drascula/drascula.cpp | 50 ++++++------ engines/drascula/drascula.h | 3 + engines/drascula/rooms.cpp | 36 ++++----- engines/drascula/talk.cpp | 110 +++++++++++++------------- 5 files changed, 187 insertions(+), 184 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 73ea0f8bc4..1d6a54d39b 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -78,7 +78,7 @@ void DrasculaEngine::animation_1_1() { clearRoom(); loadAndDecompressPic("cielo.alg", screenSurface, COMPLETE_PAL); black(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); fadeFromBlack(2); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -87,7 +87,7 @@ void DrasculaEngine::animation_1_1() { break; color_abc(kColorRed); centerText(_textmisc[_lang][1], 160, 100); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; delay(1000); @@ -111,7 +111,7 @@ void DrasculaEngine::animation_1_1() { if (animate("scr3.bin", 17)) break; loadAndDecompressPic("cielo2.alg", screenSurface, COMPLETE_PAL); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; fadeToBlack(1); @@ -135,7 +135,7 @@ void DrasculaEngine::animation_1_1() { for (l = 0; l < 7; l++) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); copyBackground(interf_x[l], interf_y[l], 156, 45, 63, 31, drawSurface2, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if (getScan() == Common::KEYCODE_ESCAPE) { term_int = 1; break; @@ -159,7 +159,7 @@ void DrasculaEngine::animation_1_1() { pixelPos[2] = 156 - l; copyRectClip(pixelPos, drawSurface2, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); p++; if (p == 6) { p = 0; @@ -195,14 +195,14 @@ void DrasculaEngine::animation_1_1() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk_igor_dch(8); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk_dr_izq(2); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -216,13 +216,13 @@ void DrasculaEngine::animation_1_1() { clearRoom(); color_solo = kColorRed; loadAndDecompressPic("plan1.alg", screenSurface, HALF_PAL); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(10); talk_solo(_textd[_lang][4],"d4.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; loadAndDecompressPic("plan1.alg", screenSurface, HALF_PAL); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk_solo(_textd[_lang][5], "d5.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -230,7 +230,7 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); loadAndDecompressPic("plan2.alg", screenSurface, HALF_PAL); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(20); talk_solo(_textd[_lang][6], "d6.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -239,7 +239,7 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); loadAndDecompressPic("plan3.alg", screenSurface, HALF_PAL); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(20); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -247,7 +247,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; loadAndDecompressPic("plan3.alg", screenSurface, HALF_PAL); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk_solo(_textd[_lang][8], "d8.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -299,13 +299,13 @@ void DrasculaEngine::animation_1_1() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(1); sentido_dr = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk_dr_izq(12); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -313,13 +313,13 @@ void DrasculaEngine::animation_1_1() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(1); sentido_dr = 1; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk_igor_dch(2); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -331,13 +331,13 @@ void DrasculaEngine::animation_1_1() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(1); sentido_dr = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk_dr_izq(14); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -438,7 +438,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; black(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); fadeFromBlack(1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -511,7 +511,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(120); @@ -524,7 +524,7 @@ void DrasculaEngine::animation_2_1() { updateRoom(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(110); talk_solo(_textbj[_lang][11], "BJ11.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -532,7 +532,7 @@ void DrasculaEngine::animation_2_1() { updateRoom(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(118); @@ -568,19 +568,19 @@ void DrasculaEngine::animation_2_1() { break; pause(8); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk(225); pause(76); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_hare = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk(226); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(30); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -645,7 +645,7 @@ void DrasculaEngine::animation_4_1() { copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface); pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); stopMusic(); @@ -677,13 +677,13 @@ void DrasculaEngine::animation_2_2() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); pon_hare(); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); loadAndDecompressPic("an2_1.alg", frontSurface, 1); loadAndDecompressPic("an2_2.alg", extraSurface, 1); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); copyBackground(1, 1, 201, 87, 50, 52, frontSurface, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); updateAnim(1, 201, 87, 50, 52, 6, frontSurface); updateAnim(55, 201, 87, 50, 52, 6, frontSurface); @@ -696,7 +696,7 @@ void DrasculaEngine::animation_2_2() { updateAnim(109, 201, 87, 50, 52, 2, extraSurface); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); stopSound(); @@ -732,7 +732,7 @@ void DrasculaEngine::animation_4_2() { textSurface = frontSurface; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(10); @@ -756,13 +756,13 @@ void DrasculaEngine::animation_4_2() { talk_hacker(_textd[_lang][63],"d63.als"); talk_blind(_textd[_lang][75],"d75.als", _textd1[_lang][75 - TEXTD_START]); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); _system->delayMillis(1000); talk_hacker(_textd[_lang][64], "d64.als"); talk_blind(_textd[_lang][76], "d76.als", _textd1[_lang][76 - TEXTD_START]); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(14); @@ -830,7 +830,7 @@ void DrasculaEngine::animation_14_2() { pos_cabina[3] = n; copyRectClip(pos_cabina, backSurface, screenSurface); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); l = l + 1; } @@ -884,7 +884,7 @@ void DrasculaEngine::animation_16_2() { if (_lang != kSpanish) centerText(_texthis[_lang][1], 180, 180); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if (_lang == kSpanish) fadeFromBlack(1); @@ -914,7 +914,7 @@ void DrasculaEngine::animation_16_2() { if (_lang != kSpanish) centerText(_texthis[_lang][2], 180, 180); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); key = getScan(); if (key != 0) goto asco; @@ -940,7 +940,7 @@ void DrasculaEngine::animation_16_2() { if (_lang != kSpanish) centerText(_texthis[_lang][3], 180, 180); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); key = getScan(); if (key != 0) goto asco; @@ -965,7 +965,7 @@ void DrasculaEngine::animation_16_2() { if (_lang != kSpanish) centerText(_texthis[_lang][1], 180, 180); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); key = getScan(); if (key != 0) goto asco; @@ -982,7 +982,7 @@ void DrasculaEngine::animation_16_2() { for (l = 1; l < 200; l++) { copyBackground(0, 0, 0, l, 320, 200 - l, drawSurface3, screenSurface); copyBackground(0, 200 - l, 0, 0, 320, l, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); key = getScan(); if (key != 0) goto asco; @@ -999,7 +999,7 @@ asco: loadAndDecompressPic(rm, drawSurface1, HALF_PAL); black(); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); fadeFromBlack(0); if (roomMusic != 0) playMusic(roomMusic); @@ -1175,7 +1175,7 @@ void DrasculaEngine::animation_25_2() { copyRectClip(pos_cabina, backSurface, screenSurface); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } stopSound(); @@ -1251,11 +1251,11 @@ void DrasculaEngine::animation_31_2() { loadAndDecompressPic("99.alg", backSurface, 1); sentido_hare = 2; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(78); sentido_hare = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(22); talk(406); lleva_vb(98); @@ -1295,7 +1295,7 @@ void DrasculaEngine::animation_35_2() { lleva_al_hare(79, 165); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); loadAndDecompressPic("an35_1.alg", backSurface, 1); loadAndDecompressPic("an35_2.alg", frontSurface, 1); @@ -1307,7 +1307,7 @@ void DrasculaEngine::animation_35_2() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(19); @@ -1400,7 +1400,7 @@ void DrasculaEngine::animation_6_3() { characterMoved = 0; flags[3] = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); flags[1] = 0; @@ -1418,7 +1418,7 @@ void DrasculaEngine::animation_6_3() { loadAndDecompressPic("96.alg", frontSurface, 1); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::animation_rayo() { @@ -1512,7 +1512,7 @@ void DrasculaEngine::animation_1_5() { if (characterMoved == 0) break; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } sentido_hare = 1; @@ -1537,7 +1537,7 @@ void DrasculaEngine::animation_3_5() { void DrasculaEngine::animation_4_5() { flags[7] = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk(228); talk_wolf(1); talk_wolf(2); @@ -1569,7 +1569,7 @@ void DrasculaEngine::animation_5_5(){ lleva_al_hare(hare_x - 19, hare_y + alto_hare); sentido_hare = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); loadAndDecompressPic("3an5_1.alg", backSurface, 1); loadAndDecompressPic("3an5_2.alg", frontSurface, 1); @@ -1599,7 +1599,7 @@ void DrasculaEngine::animation_5_5(){ for (h = 0; h < (200 - 18); h++) copyBackground(0, 53, 0, h, 320, 19, frontSurface, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); loadAndDecompressPic("101.alg", drawSurface1, HALF_PAL); loadAndDecompressPic("3an5_3.alg", backSurface, 1); @@ -1690,14 +1690,14 @@ void DrasculaEngine::animation_12_5() { playMusic(26); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(27); animate("rayo1.bin", 23); playSound(5); animate("rayo2.bin", 17); sentido_hare = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); hare_oscuro(); @@ -1740,7 +1740,7 @@ void DrasculaEngine::animation_12_5() { updateRoom(); copyRect(rayo_x[frame], 1, 41, 0, 44, 44, backSurface, screenSurface); copyRect(frusky_x[frame], 113, 205, 50, 38, 86, drawSurface3, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } stopSound_corte(); @@ -1756,7 +1756,7 @@ void DrasculaEngine::animation_12_5() { pause(4); updateRoom(); copyRect(elfrusky_x[frame], 47, 192, 39, 66, 106, backSurface, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } animate("frel.bin", 16); @@ -1805,7 +1805,7 @@ void DrasculaEngine::animation_13_5() { pos_frusky[2] = frank_x; updateRoom(); copyRectClip(pos_frusky, backSurface, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(15); playMusic(18); @@ -1816,7 +1816,7 @@ void DrasculaEngine::animation_13_5() { pos_frusky[1] = frus_y[frame]; pos_frusky[2] = frank_x; copyRectClip( pos_frusky, backSurface, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); frank_x = frank_x - 5; frame++; if (frank_x <= -45) @@ -1842,12 +1842,12 @@ void DrasculaEngine::animation_14_5() { flags[10] = 1; playSound(7); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); stopSound(); pause(14); sentido_hare = 3; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk_solo(_textd[_lang][18], "d18.als"); fadeToBlack(1); } @@ -1902,14 +1902,14 @@ void DrasculaEngine::animation_1_6() { fadeToBlack(1); clearRoom(); loadAndDecompressPic("time1.alg", screenSurface, 1); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); delay(930); clearRoom(); black(); hare_se_ve = 0; flags[0] = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); fadeFromBlack(1); talk(256); talk_dr_dch(30); @@ -1917,12 +1917,12 @@ void DrasculaEngine::animation_1_6() { fadeToBlack(0); clearRoom(); loadAndDecompressPic("time1.alg", screenSurface,1); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); delay(900); clearRoom(); black(); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); fadeFromBlack(1); talk(258); talk_dr_dch(31); @@ -1976,7 +1976,7 @@ void DrasculaEngine::animation_5_6() { updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(2); } @@ -2037,13 +2037,13 @@ void DrasculaEngine::animation_9_6() { sentido_hare = 1; hare_x -= 21; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); fadeFromBlack(0); pause(96); lleva_al_hare(116, 178); sentido_hare = 2; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); playMusic(9); clearRoom(); loadAndDecompressPic("nota.alg", drawSurface1, COMPLETE_PAL); @@ -2065,13 +2065,13 @@ void DrasculaEngine::animation_9_6() { talk(300); updateRoom(); copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); color_abc(kColorLightGreen); talk_solo("GOOOOOOOOOOOOOOOL", "s15.als"); loadAndDecompressPic("nota2.alg", drawSurface1, 1); sentido_hare = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk(301); v_cd = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16; v_cd = v_cd + 4; @@ -2093,7 +2093,7 @@ void DrasculaEngine::animation_10_6() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); copyBackground(164, 85, 155, 48, 113, 114, drawSurface3, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); stopSound(); talk_taber2(23); flags[7] = 1; @@ -2140,10 +2140,10 @@ void DrasculaEngine::animation_19_6() { updateRefresh_pre(); pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(6); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); playSound(4); pause(6); stopSound(); @@ -2169,7 +2169,7 @@ void DrasculaEngine::animation_12_2() { copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface); pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); stopMusic(); @@ -2205,7 +2205,7 @@ void DrasculaEngine::animation_26_2() { copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface); pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); stopMusic(); @@ -2301,7 +2301,7 @@ void DrasculaEngine::animation_22_2() { sentido_hare=2; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); playSound(13); stopSound(); sentido_hare = 1; @@ -2369,7 +2369,7 @@ void DrasculaEngine::animation_32_2() { void DrasculaEngine::animation_34_2() { sentido_hare = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); loadAndDecompressPic("an34_1.alg", backSurface, 1); loadAndDecompressPic("an34_2.alg", extraSurface, 1); @@ -2423,7 +2423,7 @@ void DrasculaEngine::animation_7_2() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); updateAnim2(1, 80, 64, 51, 73, 6, backSurface); updateAnim2(75, 80, 64, 51, 73, 6, backSurface); @@ -2472,7 +2472,7 @@ void DrasculaEngine::animation_7_2() { void DrasculaEngine::animation_5_2() { sentido_hare = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); loadAndDecompressPic("an5_1.alg", backSurface, 1); loadAndDecompressPic("an5_2.alg", extraSurface, 1); @@ -2480,7 +2480,7 @@ void DrasculaEngine::animation_5_2() { loadAndDecompressPic("an5_4.alg", drawSurface3, 1); copyBackground(1, 1, 213, 66, 53,84, backSurface, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); // FIXME: the widths in these calls were 53 and 52 (by mistake, probably). // I've set them to 53, but if any problems arise, we should try 52 as well @@ -2522,7 +2522,7 @@ void DrasculaEngine::animation_6_2() { loadAndDecompressPic("ciego5.alg", frontSurface, 1); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(1); @@ -2534,7 +2534,7 @@ void DrasculaEngine::animation_6_2() { talk_hacker(_textd[_lang][67], "d67.als"); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(10); @@ -2573,7 +2573,7 @@ void DrasculaEngine::animation_33_2() { textSurface = frontSurface; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(10); @@ -2586,7 +2586,7 @@ void DrasculaEngine::animation_33_2() { talk_hacker(_textd[_lang][65], "d65.als"); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(14); @@ -2624,7 +2624,7 @@ void DrasculaEngine::animation_1_4() { copyBackground(182, 133, 199, 95, 50, 66, drawSurface3, screenSurface); pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); flags[18] = 1; @@ -2648,7 +2648,7 @@ void DrasculaEngine::animation_1_4() { copyBackground(182, 133, 199, 95, 50, 66, drawSurface3, screenSurface); pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); flags[18] = 1; flags[20] = 1; @@ -2670,14 +2670,14 @@ void DrasculaEngine::animation_5_4(){ lleva_al_hare(38, 177); hare_se_ve = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); delay(800); animate("bio.bin", 14); flags[29] = 1; hare_x = 95; hare_y = 82; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); openDoor(2, 0); loadAndDecompressPic("auxigor.alg", frontSurface, 1); x_igor = 100; @@ -2704,7 +2704,7 @@ void DrasculaEngine::animation_6_4() { x_igor = 104; y_igor = 71; placeIgor(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(40); talk_igor_front(26); roomNumber = prevRoom; diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 50f2b36629..e6304d9880 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -587,7 +587,7 @@ bool DrasculaEngine::escoba() { } moveCursor(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if (currentChapter == 2) { if (musicStatus() == 0 && roomMusic != 0) @@ -694,14 +694,14 @@ bool DrasculaEngine::escoba() { } else if (key == Common::KEYCODE_v) { withVoices = 1; print_abc(_textsys[_lang][2], 96, 86); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); delay(1410); if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_t) { withVoices = 0; print_abc(_textsys[_lang][3], 94, 86); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); delay(1460); if (currentChapter != 3) cont_sv = 0; @@ -1074,7 +1074,7 @@ void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { hare_x = sitio_x; hare_y = sitio_y; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); return; } } @@ -1084,7 +1084,7 @@ void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { for (;;) { updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if (characterMoved == 0) break; } @@ -1094,7 +1094,7 @@ void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { sentido_hare = sentido_final; } updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::moveCursor() { @@ -1332,7 +1332,7 @@ void DrasculaEngine::mesa() { setCursorTable(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); updateEvents(); @@ -1414,7 +1414,7 @@ bool DrasculaEngine::saves() { } print_abc(select, 117, 15); setCursorTable(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); y = 27; updateEvents(); @@ -1491,7 +1491,7 @@ bool DrasculaEngine::saves() { else if (hay_seleccion == 0) { print_abc("elige una partida", 117, 15); } - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); delay(400); } y = 26; @@ -1609,7 +1609,7 @@ bool DrasculaEngine::confirmExit() { color_abc(kColorRed); updateRoom(); centerText(_textsys[_lang][1], 160, 87); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); delay(100); for (;;) { @@ -2038,7 +2038,7 @@ void DrasculaEngine::hiccup(int counter) { } while (counter > 0); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::stopSound() { @@ -2461,7 +2461,7 @@ bool DrasculaEngine::exitRoom(int l) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); characterMoved = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; @@ -2518,7 +2518,7 @@ bool DrasculaEngine::exitRoom(int l) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); characterMoved = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; @@ -2536,7 +2536,7 @@ bool DrasculaEngine::exitRoom(int l) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); characterMoved = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; @@ -2557,7 +2557,7 @@ bool DrasculaEngine::exitRoom(int l) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); characterMoved = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; @@ -2576,7 +2576,7 @@ bool DrasculaEngine::exitRoom(int l) { lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); sentido_hare = sentidobj[l]; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); characterMoved = 0; sentido_hare = sentido_alkeva[l]; objExit = alapuertakeva[l]; @@ -2603,7 +2603,7 @@ bool DrasculaEngine::pickupObject() { updateRoom(); showMenu(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); // Objects with an ID smaller than 7 are the inventory verbs if (pickedObject >= 7) { @@ -2649,7 +2649,7 @@ void DrasculaEngine::enterName() { select2[v] = '-'; copyBackground(115, 14, 115, 14, 176, 9, drawSurface1, screenSurface); print_abc(select2, 117, 15); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); key = getScan(); delay(70); if (key != 0) { @@ -3265,7 +3265,7 @@ void DrasculaEngine::converse(const char *nom_fich) { print_abc_opc(phrase3, 1, 18, game3); print_abc_opc(phrase4, 1, 26, game4); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if ((button_izq == 1) && (game1 == 2)) { delay(100); @@ -3601,7 +3601,7 @@ void DrasculaEngine::lleva_vb(int pointX) { for (;;) { updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if (sentido_vb == 0) { vb_x = vb_x - 5; if (vb_x <= pointX) @@ -3650,7 +3650,7 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ } while (counter > 0); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::openDoor(int nflag, int doorNum) { @@ -3668,7 +3668,7 @@ void DrasculaEngine::openDoor(int nflag, int doorNum) { if (doorNum != NO_DOOR) updateDoor(doorNum); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); stopSound(); withoutVerb(); } @@ -3713,12 +3713,12 @@ void DrasculaEngine::grr() { if (withVoices == 0) centerText(".groaaarrrrgghhh!", 153, 65); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::activatePendulum() { @@ -3742,7 +3742,7 @@ void DrasculaEngine::closeDoor(int nflag, int doorNum) { if (doorNum != NO_DOOR) updateDoor(doorNum); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); stopSound(); withoutVerb(); } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index aeda0e6e4e..916ef3096f 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -192,6 +192,9 @@ public: void copyRect(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *src, byte *dest); void copyRectClip(int *Array, byte *src, byte *dest); + void updateScreen() { + updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + } void updateScreen(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *buffer); int checkWrapX(int x) { if (x < 0) x += 320; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 34c7111bff..2c76ed37cd 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -103,7 +103,7 @@ void DrasculaEngine::room_3(int fl) { } else if (pickedObject == kVerbTalk && fl == 133) { talk_sinc(_text[_lang][322], "322.als", "13333334125433333333"); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(25); talk(33); } else if (pickedObject == kVerbLook && fl == 165) { @@ -114,7 +114,7 @@ void DrasculaEngine::room_3(int fl) { updateRefresh_pre(); copyRect(44, 1, hare_x, hare_y, 41, 70, drawSurface2, screenSurface); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(4); pickObject(10); flags[3] = 1; @@ -173,42 +173,42 @@ void DrasculaEngine::room_6(int fl){ copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, drawSurface3, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(10); playSound(3); flags[2] = 1; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); stopSound(); } else if (pickedObject == kVerbClose && fl == 143 && flags[2] == 1) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); flags[2] = 0; updateRefresh_pre(); copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, drawSurface3, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(5); playSound(4); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); stopSound(); } else if (pickedObject == kVerbOpen && fl == 139 && flags[1] == 0) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, drawSurface3, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(19); playSound(3); flags[1] = 1; visible[4] = 1; visible[2] = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); stopSound(); } else if (pickedObject == kVerbPick && fl == 140) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, drawSurface3, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(19); pickObject(9); visible[4] = 0; @@ -332,7 +332,7 @@ void DrasculaEngine::room_15(int fl) { } else if (pickedObject == 18 && fl == 188 && flags[26] == 0) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); copyRect(133, 135, hare_x + 6, hare_y, 39, 63, drawSurface3, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); playSound(8); stopSound(); talk(338); @@ -380,7 +380,7 @@ void DrasculaEngine::room_16(int fl) { flags[20] = 1; sentido_hare = 3; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk(342); pickObject(22); } @@ -398,7 +398,7 @@ void DrasculaEngine::room_16(int fl) { talk(343); sentido_hare = 3; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talk(344); } else if (pickedObject == kVerbTalk && fl == 187) talk(345); @@ -442,7 +442,7 @@ void DrasculaEngine::room_18(int fl) { updateRefresh_pre(); copyRect(44, 1, hare_x, hare_y, 41, 70, drawSurface2, screenSurface); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(4); pickObject(12); visible[2] = 0; @@ -461,12 +461,12 @@ void DrasculaEngine::room_18(int fl) { else if (pickedObject == 11 && fl == 50 && flags[22] == 0) { sentido_hare = 3; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); copyRect(1, 1, hare_x - 1, hare_y + 3, 42, 67, drawSurface2, screenSurface); updateRefresh(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(6); talk(347); flags[29] = 1; @@ -925,7 +925,7 @@ void DrasculaEngine::room_59(int fl) { lleva_al_hare(174, 168); sentido_hare = 2; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(40); playSound(12); pause(19); @@ -934,7 +934,7 @@ void DrasculaEngine::room_59(int fl) { updateRoom(); copyRect(101, 34, hare_x - 4, hare_y - 1, 37, 70, drawSurface3, screenSurface); copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); hare_se_ve = 1; clearRoom(); loadAndDecompressPic("tlef0.alg", drawSurface1, COMPLETE_PAL); @@ -1803,7 +1803,7 @@ void DrasculaEngine::update_pendulum() { bool DrasculaEngine::checkFlag(int fl) { characterMoved = 0; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); hasAnswer = 1; diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index db8fd37e1b..56d74c9c16 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -94,7 +94,7 @@ void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { if (withVoices == 0) centerText(said, x_igor + 26, y_igor); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); @@ -103,7 +103,7 @@ void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_dr_izq(int index) { @@ -144,7 +144,7 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { if (withVoices == 0) centerText(said, x_dr + 19, y_dr); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); @@ -153,7 +153,7 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_dr_dch(int index) { @@ -193,7 +193,7 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { if (withVoices == 0) centerText(said, x_dr + 19, y_dr); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); @@ -206,7 +206,7 @@ void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { placeDrascula(); if (currentChapter == 6) pon_hare(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_solo(const char *said, const char *filename) { @@ -231,12 +231,12 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { else if (currentChapter == 5) centerText(said, 173, 92); } - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } while (!isTalkFinished(&length)); if (currentChapter == 6) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } } @@ -275,7 +275,7 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { if (withVoices == 0) centerText(said, x_igor + 26, y_igor); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); @@ -289,7 +289,7 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { placeIgor(); placeDrascula(); } - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_bartender(int index) { @@ -329,14 +329,14 @@ void DrasculaEngine::talk_bartender(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 132, 45); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_bj(int index) { @@ -373,7 +373,7 @@ void DrasculaEngine::talk_bj(const char *said, const char *filename) { if (withVoices == 0) centerText(said, x_bj + 7, y_bj); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } else { @@ -382,12 +382,12 @@ void DrasculaEngine::talk_bj(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 93, 80); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk(int index) { @@ -500,13 +500,13 @@ void DrasculaEngine::talk(const char *said, const char *filename) { if (withVoices == 0) centerText(said, hare_x, hare_y); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if (currentChapter == 1) { if (musicStatus() == 0 && flags[11] == 0 && musicStopped == 0) @@ -544,13 +544,13 @@ void DrasculaEngine::talk_pianist(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 221, 128); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_drunk(int index) { @@ -572,7 +572,7 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) { while (flags[12] == 1) { updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } color_abc(kColorDarkGreen); @@ -593,13 +593,13 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 181, 54); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); flags[13] = 0; if (currentChapter == 1) { @@ -648,13 +648,13 @@ void DrasculaEngine::talk_vb(const char *said, const char *filename) { if (withVoices == 0) centerText(said, vb_x, 66); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) playMusic(roomMusic); } @@ -678,11 +678,11 @@ void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 150, 80); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) playMusic(roomMusic); } @@ -696,7 +696,7 @@ void DrasculaEngine::talk_blind(const char *said, const char *filename, const ch color_abc(kColorBrown); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); talkInit(filename); @@ -732,7 +732,7 @@ void DrasculaEngine::talk_blind(const char *said, const char *filename, const ch if (withVoices == 0) centerText(said, 310, 71); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(2); p++; } while (!isTalkFinished(&length)); @@ -742,7 +742,7 @@ void DrasculaEngine::talk_hacker(const char *said, const char *filename) { int length = strlen(said); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); color_abc(kColorYellow); @@ -751,7 +751,7 @@ void DrasculaEngine::talk_hacker(const char *said, const char *filename) { do { if (withVoices == 0) centerText(said, 156, 170); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } while (!isTalkFinished(&length)); } @@ -784,13 +784,13 @@ void DrasculaEngine::talk_wolf(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 203, 78); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_mus(int index) { @@ -822,14 +822,14 @@ void DrasculaEngine::talk_mus(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 197, 64); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_pen(const char *said, const char *filename) { @@ -841,7 +841,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename) { updateRoom(); copyRect(44, 145, 145, 105, 25, 29, drawSurface3, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); color_abc(kColorYellow); @@ -861,7 +861,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 160, 105); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); @@ -869,7 +869,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename) { flags[1] = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_pen2(const char *said, const char *filename) { @@ -897,7 +897,7 @@ void DrasculaEngine::talk_pen2(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 195, 107); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); @@ -905,7 +905,7 @@ void DrasculaEngine::talk_pen2(const char *said, const char *filename) { flags[1] = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_taber2(int index) { @@ -937,13 +937,13 @@ void DrasculaEngine::talk_taber2(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 132, 45); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_bj_bed(int index) { @@ -976,13 +976,13 @@ void DrasculaEngine::talk_bj_bed(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 104, 102); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_htel(int index) { @@ -1019,12 +1019,12 @@ void DrasculaEngine::talk_htel(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 90, 50); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_sinc(const char *said, const char *filename, const char *sincronia) { @@ -1100,7 +1100,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha if (withVoices == 0) centerText(said, hare_x, hare_y); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); p++; pause(3); @@ -1131,14 +1131,14 @@ void DrasculaEngine::talk_baul(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 263, 69); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(4); } while (!isTalkFinished(&length)); flags[19] = cara_antes; updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_igor_door(int index) { @@ -1158,11 +1158,11 @@ void DrasculaEngine::talk_igor_door(const char *said, const char *filename) { updateRoom(); if (withVoices == 0) centerText(said, 87, 66); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_igor_seated(int index) { @@ -1194,13 +1194,13 @@ void DrasculaEngine::talk_igor_seated(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 221, 102); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_igor_wig(int index) { @@ -1232,13 +1232,13 @@ void DrasculaEngine::talk_igor_wig(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 221, 102); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); } while (!isTalkFinished(&length)); updateRoom(); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); } void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { @@ -1263,7 +1263,7 @@ void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { if (withVoices == 0) centerText(said, 191, 69); - updateScreen(0, 0, 0, 0, 320, 200, screenSurface); + updateScreen(); pause(3); -- cgit v1.2.3 From 73b8f5ec00db2a5d314261cf564b2d63b2fdeabc Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 31 May 2008 13:01:48 +0000 Subject: x_igor/y_igor -> igorX/igorY talk_dr_izq -> talk_drascula Merged talk_drascula and talk_dr_dch svn-id: r32425 --- engines/drascula/animation.cpp | 32 +++++++-------- engines/drascula/drascula.cpp | 6 +-- engines/drascula/drascula.h | 7 ++-- engines/drascula/talk.cpp | 89 ++++++++++++------------------------------ 4 files changed, 46 insertions(+), 88 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 1d6a54d39b..0bd5acde19 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -189,8 +189,8 @@ void DrasculaEngine::animation_1_1() { x_dr = 129; y_dr = 95; sentido_igor = 1; - x_igor = 66; - y_igor = 97; + igorX = 66; + igorY = 97; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); @@ -203,10 +203,10 @@ void DrasculaEngine::animation_1_1() { placeIgor(); placeDrascula(); updateScreen(); - talk_dr_izq(2); + talk_drascula(2); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_izq(3); + talk_drascula(3); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (animate("lib.bin", 16)) @@ -260,14 +260,14 @@ void DrasculaEngine::animation_1_1() { talk_igor_dch(9); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_izq(9); + talk_drascula(9); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_igor_dch(10); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; playMusic(11); - talk_dr_izq(10); + talk_drascula(10); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (animate("rayo1.bin", 16)) @@ -306,7 +306,7 @@ void DrasculaEngine::animation_1_1() { placeIgor(); placeDrascula(); updateScreen(); - talk_dr_izq(12); + talk_drascula(12); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; @@ -338,26 +338,26 @@ void DrasculaEngine::animation_1_1() { placeIgor(); placeDrascula(); updateScreen(); - talk_dr_izq(14); + talk_drascula(14); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_igor_dch(3); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_izq(15); + talk_drascula(15); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_igor_dch(4); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_izq(16); + talk_drascula(16); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_igor_dch(5); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_igor = 3; - talk_dr_izq(17); + talk_drascula(17); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(18); @@ -1934,7 +1934,7 @@ void DrasculaEngine::animation_1_6() { talk_igor_front(12); talk_dr_dch(34); sentido_dr = 0; - talk_dr_izq(35); + talk_drascula(35); if (_lang == kSpanish) textSurface = extraSurface; @@ -2680,8 +2680,8 @@ void DrasculaEngine::animation_5_4(){ updateScreen(); openDoor(2, 0); loadAndDecompressPic("auxigor.alg", frontSurface, 1); - x_igor = 100; - y_igor = 65; + igorX = 100; + igorY = 65; talk_igor_front(29); talk_igor_front(30); loadAndDecompressPic("96.alg", frontSurface, 1); @@ -2701,8 +2701,8 @@ void DrasculaEngine::animation_6_4() { loadAndDecompressPic("auxigor.alg", frontSurface, 1); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); update_26_pre(); - x_igor = 104; - y_igor = 71; + igorX = 104; + igorY = 71; placeIgor(); updateScreen(); pause(40); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index e6304d9880..aa4bd6ded5 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -187,7 +187,7 @@ int DrasculaEngine::go() { loadAndDecompressPic("97.alg", extraSurface, 1); loadAndDecompressPic("99.alg", backSurface, 1); } else if (currentChapter == 6) { - x_igor = 105, y_igor = 85, sentido_igor = 1; + igorX = 105, igorY = 85, sentido_igor = 1; x_dr = 62, y_dr = 99, sentido_dr = 1; frame_pen = 0; flag_tv = 0; @@ -1960,8 +1960,8 @@ void DrasculaEngine::placeIgor() { else if (sentido_igor == 1) pos_igor[1] = 76; } - pos_igor[2] = x_igor; - pos_igor[3] = y_igor; + pos_igor[2] = igorX; + pos_igor[3] = igorY; pos_igor[4] = 54; pos_igor[5] = 61; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 916ef3096f..2ddc006e71 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -283,7 +283,7 @@ public: int frame_candles; int color_solo; int blinking; - int x_igor, y_igor, sentido_igor; + int igorX, igorY, sentido_igor; int x_dr, y_dr, sentido_dr; int x_bj, y_bj, sentido_bj; int cont_sv; @@ -432,9 +432,8 @@ public: void talk_igor_dch(int); void talk_igor_dch(const char *said, const char *filename); void talk_dr_dch(int); - void talk_dr_dch(const char *said, const char *filename); - void talk_dr_izq(int); - void talk_dr_izq(const char *said, const char *filename); + void talk_drascula(int index, int talkerType = 0); + void talk_drascula(const char *said, const char *filename); void talk_solo(const char *, const char *); void talk_igor_front(int); void talk_igor_front(const char *, const char *); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 56d74c9c16..5955a35891 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -85,14 +85,14 @@ void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { placeIgor(); placeDrascula(); - copyBackground(x_igor + 17, y_igor, x_igor + 17, y_igor, 37, 24, drawSurface1, screenSurface); + copyBackground(igorX + 17, igorY, igorX + 17, igorY, 37, 24, drawSurface1, screenSurface); - copyRect(x_talk[face], 148, x_igor + 17, y_igor, 25, 24, frontSurface, screenSurface); + copyRect(x_talk[face], 148, igorX + 17, igorY, 25, 24, frontSurface, screenSurface); updateRefresh(); if (withVoices == 0) - centerText(said, x_igor + 26, y_igor); + centerText(said, igorX + 26, igorY); updateScreen(); @@ -106,16 +106,15 @@ void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { updateScreen(); } -void DrasculaEngine::talk_dr_izq(int index) { - char name[20]; - sprintf(name, "d%i.als", index); - talk_dr_izq(_textd[_lang][index], name); -} - -void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { +void DrasculaEngine::talk_drascula(int index, int talkerType) { + const char *said = _textd[_lang][index]; + char filename[20]; + sprintf(filename, "d%i.als", index); int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 }; int face; int length = strlen(said); + int offset = (talkerType == 0) ? 0 : 7; + int offset2 = (talkerType == 0) ? 90 : 58; color_abc(kColorRed); @@ -133,11 +132,11 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { if (currentChapter == 6) pon_hare(); - copyBackground(x_dr, y_dr, x_dr, y_dr, 38, 31, drawSurface1, screenSurface); + copyBackground(x_dr, y_dr, x_dr, y_dr, 38 + offset, 31, drawSurface1, screenSurface); if (currentChapter == 6) - copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, drawSurface2, screenSurface); + copyRect(x_talk[face], offset2, x_dr + offset, y_dr, 38, 31, drawSurface2, screenSurface); else - copyRect(x_talk[face], 90, x_dr, y_dr, 38, 31, backSurface, screenSurface); + copyRect(x_talk[face], offset2, x_dr + offset, y_dr, 38, 31, backSurface, screenSurface); updateRefresh(); @@ -150,65 +149,25 @@ void DrasculaEngine::talk_dr_izq(const char *said, const char *filename) { } while (!isTalkFinished(&length)); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - placeIgor(); - placeDrascula(); - updateScreen(); -} - -void DrasculaEngine::talk_dr_dch(int index) { - char name[20]; - sprintf(name, "d%i.als", index); - talk_dr_dch(_textd[_lang][index], name); -} - -void DrasculaEngine::talk_dr_dch(const char *said, const char *filename) { - int x_talk[8] = { 1, 40, 79, 118, 157, 196, 235, 274 }; - int face; - int length = strlen(said); - - color_abc(kColorRed); - - talkInit(filename); - - do { - face = _rnd->getRandomNumber(7); - + if (talkerType == 0) copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); - placeIgor(); - placeDrascula(); - if (currentChapter == 6) - pon_hare(); - - copyBackground(x_dr, y_dr, x_dr, y_dr, 45, 31, drawSurface1, screenSurface); - if (currentChapter != 6) - copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, backSurface, screenSurface); - else - copyRect(x_talk[face], 58, x_dr + 7, y_dr, 38, 31, drawSurface2, screenSurface); - - updateRefresh(); - - if (withVoices == 0) - centerText(said, x_dr + 19, y_dr); - - updateScreen(); - - pause(3); - - } while (!isTalkFinished(&length)); - - if (currentChapter == 6) + if (talkerType == 1 && currentChapter == 6) updateRoom(); placeIgor(); placeDrascula(); - if (currentChapter == 6) + + if (talkerType == 1 && currentChapter == 6) pon_hare(); + updateScreen(); } +void DrasculaEngine::talk_dr_dch(int index) { + talk_drascula(index, 1); +} + void DrasculaEngine::talk_solo(const char *said, const char *filename) { int length = strlen(said); @@ -267,13 +226,13 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { if (currentChapter == 1) placeDrascula(); if (currentChapter == 1 || currentChapter == 6) - copyBackground(x_igor, y_igor, x_igor, y_igor, 29, 25, drawSurface1, screenSurface); - copyRect(x_talk[face], 173, x_igor, y_igor, 29, 25, frontSurface, screenSurface); + copyBackground(igorX, igorY, igorX, igorY, 29, 25, drawSurface1, screenSurface); + copyRect(x_talk[face], 173, igorX, igorY, 29, 25, frontSurface, screenSurface); updateRefresh(); if (withVoices == 0) - centerText(said, x_igor + 26, y_igor); + centerText(said, igorX + 26, igorY); updateScreen(); -- cgit v1.2.3 From 968fe6cbd7a810d9947d529f4f34a790a2f1388f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 31 May 2008 17:44:57 +0000 Subject: Patch #1980689: "DRASCULA: ENGLISH GRAMMAR/SPELLING" thanks to sanguinehearts svn-id: r32426 --- engines/drascula/staticdata.h | 322 +++++++++++++++++++++--------------------- 1 file changed, 161 insertions(+), 161 deletions(-) diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 36b68d15c6..5a491fbce9 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -326,12 +326,12 @@ const char *_text[][501] = { "", "", "I'LL BE BACK IN FIFTEEN MINUTES", - "FORBIDDEN TO PUT UP POSTERS", + "IT IS FORBIDDEN TO PUT UP POSTERS", "IT'S UNCLE EVARISTO'S TOMB", // 30 "ITS LOCKED", "I'VE GOT ONE", - "YOO HOO, UNCLE EVERISTO!", + "YOO HOO, UNCLE EVARISTO!", "THERE'S NO REPLY", "IT'S NOT WELL PARKED", // 35 @@ -360,7 +360,7 @@ const char *_text[][501] = { "I CAN'T SEE ANYTHING IN PARTICULAR", // 55 "IT'S FERNAN, THE PLANT", - "IT'S ONE OF THE FENCES SPIKES", + "IT'S ONE OF THE FENCE SPIKES", "HEY! THERE'S A PACKET OF MATCHES UNDER HERE", "LOOK! A PACKET OF KLEENEX, AND ONE'S STILL UNUSED", "THERE ISN'T ANYTHING ELSE IN THE BUCKET", @@ -433,23 +433,23 @@ const char *_text[][501] = { // 115 "I COULD DO IT, BUT I JUST FEEL A LITTLE LAZY", "I DO NOT SEE THE REASON", - "IT'S A QUITE NICE BRAIN", + "IT'S QUITE A NICE BRAIN", "AND SO BRAIN, WHAT ARE YOU UP TONIGHT?", "NO, IT MUST BE KEPT SOMEWHERE AWAY FROM THE MUTANT ACTION OF THE ATMOSPHERE", // 120 "HE IS VERY STIFF, JUST LIKE MY BOSS", "A VERY SHARP STICK", - "YOU FAITHFUL SHARP-PAINTED STICK, NOBLE TRANSILVAAANIAN OAK TREE", + "YOU FAITHFUL SHARP-PAINTED STICK, NOBLE TRANSILVANIAN OAK TREE", "DAMN, I HAVE TO CUT MY NAILS!", "B.J. IS IN THERE... SHE IS A REALLY HOT CHICK!", // 125 "IT IS FIRMLY LOCKED", "\"SAVE AWAY LOCKS LTD.\"", "IT IS THE TYPICAL SKELETON YOU FIND IN THE DUNGEONS OF ALL THE GAMES", - "IT IS COMMONLY USED TO COMMUNICATE ELECTRICITY TO THE MACHINES CONNECTED TO IT", - "IT IS ABSOLUTELY HAND MADE BECAUSE THE JAPANESE MAKE THEM POCKET SIZE", + "IT IS COMMONLY USED TO TRANSFER ELECTRICITY TO THE MACHINES CONNECTED TO IT", + "IT IS HAND MADE BECAUSE THE JAPANESE MAKE THEM POCKET SIZE", // 130 - "I HAVE ONLY SEEN IN MY LIFE ANOTHER THING AS UGLY AS THIS ONE", + "I HAVE ONLY ONCE SEEN IN MY LIFE ANOTHER THING AS UGLY AS THIS", "FORGET IT. I AM NOT GOING TO TELL HIM ANYTHING IN CASE HE GETS MAD", "IT SEEMS QUITE RATIONAL", "IT IS A PICTURE OF PLATO WRITING HIS LOST DIALOGUE", @@ -457,8 +457,8 @@ const char *_text[][501] = { // 135 "THAT'S A VERY CUTE DESK", "IT IS A VAMPIRES HUNTER'S DIPLOMA OFFICIALLY APPROVED BY OXFORD UNIVERSITY", - "IT'S A DARK NIGHT WITH FULL MOON", - "IT SEEMS LIKE THESE SCREWS ARE NOT MUCH TWISTED", + "IT'S A DARK NIGHT WITH A FULL MOON", + "IT SEEMS LIKE THESE SCREWS ARE NOT TIGHTENED PROPERLY", "DON'T LOOK NOW, BUT I THINK THAT A HIDDEN CAMERA IS FOCUSING ON ME", // 140 "THAT'S A VERY MODERN STICK DETECTOR", @@ -469,44 +469,44 @@ const char *_text[][501] = { // 145 "THOSE ARE STRANGE LEAVES. THEY MUST HAVE BROUGHT THEM FROM SOUTH AMERICA OR AROUND THERE", "I DON'T THINK THEY WOULD ANSWER ME", - "THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY GET ALL THE BEAUTY WITHIN IT", + "THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY SHOW THE BEAUTY WITHIN IT", "I ONLY PRAY BEFORE I GO TO BED", "HEY, THIS PIKE SEEMS A LITTLE BIT LOOSE!", // 150 - "I HOPE YOU WON'T COMPLAIN ABOUT GETTING NO CLUES FROM ME", + "I HOPE YOU WON'T COMPLAIN ABOUT NOT GETTING ANY CLUES FROM ME", "IT'S A QUITE CONVENTIONAL PIKE", "THEY ARE CUTE, THOUGH THEY ARE COVERED WITH A LITTLE BIT OF SHIT", "NO, THEY WON'T HEAR ME. HA,HA,HA THIS IS GREAT!", - "\"SLEEPING BEAUTY\" FROM CHAIKOSKY, OR CHOIFRUSKY, OR WHATEVER IT IS", + "\"SLEEPING BEAUTY\" FROM TCHAIKOVSKY, OR CHOIFRUSKY, OR WHATEVER IT IS", // 155 "VERY TEMPTING", - "NO, I'M NOT ONE OF THOSE WHO PUT USED BUBBLE GUMS IN THEIR MOUTH", - "THAT'S A VERY NICE SICKLE. I WONDER WHERE THE HAMMER MAY BE", + "NO, I DO NOT PUT USED BUBBLE GUMS IN MY MOUTH", + "THAT'S A VERY NICE SICKLE. I WONDER WHERE THE HAMMER IS", "TOBACCO MANUFACTURERS WARN ABOUT HEALTH BEING SERIOUSLY DAMAGED BY SANITARY AUTHORITIES", "AN ABSOLUTELY NORMAL CANDLE, INCLUDING WAX AND EVERYTHING", // 160 - "THESE TWO SHINY COINS DO REALLY GLITTER!", - "THIS SHINY COIN DOES REALLY GLITTER!", - "WITH THIS I WILL BE IMMUNE AGAINST VAMPIRE'S BITES", + "THESE TWO SHINY COINS REALLY DO GLITTER!", + "THIS SHINY COIN REALLY DOES GLITTER!", + "WITH THIS I WILL BE IMMUNE AGAINST VAMPIRE BITES", "NO, IT'S IS NOT THE RIGHT MOMENT YET", - "THERE IS A ONE THOUSAND BILL AND A COUPLE COINS", + "THERE IS A ONE THOUSAND BILL AND A COUPLE OF COINS", // 165 "IT SAYS \"PLEASE, DO NOT THROW FOOD TO THE PIANIST\"", - "OMELET, 200. FRIED FISH, 150, MAYONNAISE POTATOES, 225", - "BEST BURGERS ON THIS SIDE OF THE DANUBE, ONLY FOR 325!", - "THAT'S A NICE SKULL WITH A VERY PENETRATING LOOK, HA, HA, HA, HA, THAT WAS GOOD!", + "OMELETTE, 200. FRIED FISH, 150, MAYONNAISE POTATOES, 225", + "BEST BURGERS ON THIS SIDE OF THE DANUBE, ONLY 325!", + "THAT'S A NICE SKULL WITH A VERY PENETRATING LOOK, HA, HA, HA, HA, THAT WAS GOOD!", "HI SKULL, YOU REMIND ME OF UNCLE HAMLET", // 170 "I HAVE THE HABIT OF NOT TOUCHING THINGS THAT HAVE BEEN ALIVE", "IT'S A BIN", "IT'S A BET FOR TONIGHT'S GAME", - "I WONDER WHAT THERE IS BEHIND THAT", - "HEY, THAT CURTAIN IS NOT MOVING!", + "I WONDER WHAT IS BEHIND THAT", + "HEY, THE CURTAIN WONT MOVE!", // 175 "MAN, THIS CASTLE IS REALLY GLOOMY", "I CAN'T, HE IS TOO FAR AWAY TO HEAR ME", - "IT'S THE TYPICAL TRANSILVANIAN FOREST, WITH TREES", - "MAN YOU REALLY SAY STUPID THINGS, AND THIS IS TOO DARK!", + "IT'S A TYPICAL TRANSILVANIAN FOREST, WITH TREES", + "MAN YOU SAY REALLY STUPID THINGS, AND THIS IS TOO DARK!", "GARCIA, CANDY STORE. SWEETS AND BUBBLE GUM", // 180 "A VERY NICE DOOR", @@ -515,7 +515,7 @@ const char *_text[][501] = { "", "AREN'T THESE BUGS REALLY CUTE?", // 185 - "BSSST, PUSSYCAT... LITTLE CAT", + "PSSST, PUSSYCAT... LITTLE CAT", "THERE IS NO ANSWER", "THE MOON IS A SATELLITE THAT TURNS AROUND THE EARTH WITH A REVOLUTION PERIOD OF 28 DAYS", "HI, LOONY MOON", @@ -534,8 +534,8 @@ const char *_text[][501] = { "IT'S JUST FIVE MINUTES", // 200 "I'M JOHN HACKER AND I REPRESENT A BRITISH PROPERTY COMPANY", - "AS FAR AS I KNOW, COUNT DRASCULA WANTS TO BUY SOME PIECES OF LAND IN GIBRALTAR AND MY COMPANY SENT ME HERE TO NEGOTIATE THE SELLING", - "I THINK I'M GOING BACK TO MY MUM'S TOMORROW FIRST THING IN THE MORNING", + "AS FAR AS I KNOW, COUNT DRASCULA WANTS TO BUY SOME PIECES OF LAND IN GIBRALTAR AND MY COMPANY SENT ME HERE TO NEGOTIATE THE SALE", + "I THINK I'M GOING BACK TO MY MUM'S TOMORROW, FIRST THING IN THE MORNING", "BEAUTIFUL NIGHT, HUH?", "NO, NOTHING", // 205 @@ -558,8 +558,8 @@ const char *_text[][501] = { "OH, SURE...OF COURSE!", // 220 "WELL, THANKS VERY MUCH FOR YOUR HELP. I WON'T BOTHER YOU ANYMORE IF YOU PLEASE TELL ME WHERE THE DOOR IS...", - "IT'S BECAUSE THE KNOCK MUST HAVE AFFECTED MY BRAIN...I CAN'T SEE A THING...", - "WELL...THAT DOESN'T MATTER. I ALWAYS CARRY A SPARE ONE", + "THE KNOCK MUST HAVE AFFECTED MY BRAIN...I CAN'T SEE A THING...", + "WELL...THAT DOESN'T MATTER. I ALWAYS CARRY A SPARE PAIR", "WOW, WHAT A HOT CHICK!! I DIDN'T NOTICE!, BUT OF COURSE, I WASN'T WEARING MY GLASSES", "HEY...", // 225 @@ -573,12 +573,12 @@ const char *_text[][501] = { "WHAT?", "TO TELL YOU THE TRUTH...ON SECOND THOUGHTS...I DON'T REALLY THINK SO", "AND SO TELL ME YOU ERUDITE PHILOSOPHER, IS THERE ANY RELATIONSHIP CAUSE-AND-EFFECT BETWEEN SILLY AND BILLY?", - "OK, OK, FORGET IT. I DON'T EVEN KNOW WHO I SAID ANYTHING ABOUT IT", + "OK, OK, FORGET IT. I DON'T EVEN KNOW WHY I SAID ANYTHING ABOUT IT", // 235 - "WHAT ARE YOU DOING HERE PHILOSPOZING INSTEAD OF BEING EATING SOME PEOPLE", + "WHAT ARE YOU DOING PHILOSOPHIZING INSTEAD OF EATING SOME PEOPLE", "HOW COME?", - "HEY, COULD YOU SAY AGAIN ALL THAT ABOUT PRE-EVOLUTIONARY RELATIONSHIPS?", - "YES, MAN. ALL THAT STUFF YOU TOLD ME ABOUT BEFORE. I DIDN'T GET IT VERY WELL, YOU KNOW", + "HEY, COULD YOU SAY ALL THAT STUFF ABOUT PRE-EVOLUTIONARY RELATIONSHIPS AGAIN?", + "YES, MAN. ALL THAT STUFF YOU TOLD ME ABOUT BEFORE. I DIDN'T UNDERSTAND IT, YOU KNOW", "NO, I'D RATHER NOT SAY ANYTHING, IN CASE HE GETS ANGRY OR SOMETHING...", // 240 "HELLO?", @@ -593,25 +593,25 @@ const char *_text[][501] = { "HER BRAIN?\?!!", "TO TELL YOU THE TRUTH, I THINK I HAD JUST ENOUGH WITH YOUR OF YOUR LITTLE MONSTER", // 250 - "OH PLEASE, HOLLY VIRGIN, DON'T LET ANYTHING WORSE HAPPEN TO ME!!", - "YOU ARE NOT GOING TO GET YOUR WAY. I'M SURE SUPERMAN WILL CAME AND RESCUE ME!", - "WHAT A SHIT OF GAME IS THIS IN WHICH THE PROTAGONIST DIES!", + "OH PLEASE, HOLY VIRGIN, DON'T LET ANYTHING WORSE HAPPEN TO ME!!", + "YOU ARE NOT GOING TO GET YOUR WAY. I'M SURE SUPERMAN WILL COME AND RESCUE ME!", + "WHAT SORT OF A SHIT GAME IS THIS IN WHICH THE PROTAGONIST DIES!", "HEY, WAIT A SECOND!, WHAT ABOUT MY LAST WISH?", "HA. HA, I'M NOW IMMUNIZED AGAINST YOU DAMNED EVIL!. THIS CIGARETTE IS AN ANTI-VAMPIRE BREW THAT VON BRAUN GAVE TO ME", // 255 "YES SURE, BUT YOU'LL NEVER GET ME TO GIVE YOU THE RECIPE", "APART FROM CREATING TORTURE, I CAN ALSO STAND IT.", "OH, NO PLEASE! I'LL TALK, BUT PLEASE, DON'T DO THAT TO ME!", - "ALL RIGHT THEN. I TOLD YOU WHAT YOU WANTED TO KNOW. NOW SET B.J. AND ME FREE AND LEAVE US ALONE!", + "ALL RIGHT THEN. I TOLD YOU WHAT YOU WANTED TO KNOW. NOW SET B.J. AND ME FREE THEN LEAVE US ALONE!", "WHAT ARE YOU DOING HERE B.J.?. WHERE IS DRASCULA?", // 260 - "WHAT A MEAN GUY!. JUST BECAUSE HE BELONGS TO THE NOBILITY HE THINKS HE IS ENTITLED TO SLEEP WITH ANYBODY HE FEELS LIKE", + "WHAT A MEAN GUY!. JUST BECAUSE HE BELONGS TO NOBILITY HE THINKS HE IS ENTITLED TO SLEEP WITH ANYBODY HE FEELS LIKE", "DOWN WITH ARISTOCRATIC DESPOTISM!!", "POOR PEOPLE OF THE WORLD FOR EVER..!!", - "AND AS I CAN SEE HE HAS CHAINED YOU UP WITH LOCKS AND ALL THAT STUFF, HUH?", - "WELL, ALL RIGHT. DO YOU HAVE A HAIRPIN OVER THERE?", + "AND I CAN SEE HE HAS CHAINED YOU UP WITH LOCKS AND ALL THAT STUFF, HUH?", + "WELL, ALL RIGHT. DO YOU HAVE A HAIR PIN OVER THERE?", // 265 - "ALL RIGHT, OK, DON'T GET MAD. I'LL THINK ABOUT SOMETHING", + "ALL RIGHT, OK, DON'T GET MAD. I'LL THINK OF SOMETHING", "YOU...BARTENDER!!", "HOW IS THE GAME GOING?", "WHO?", @@ -630,27 +630,27 @@ const char *_text[][501] = { "THEN WEAR GLASSES", // 280 "WHAT IS ALL THAT ABOUT THE SUPERNATURAL ORGY?", - "OK, OK, STOP IT. I THINK I CAN GET THE PICTURE", + "OK, OK, STOP IT. I THINK I GET THE PICTURE", "COULDN'T YOU TELL ME WHERE DRASCULA IS?", "OH...PLEASE...COME ON...!", "WHY NOT?", // 285 - "OH...BUT DIES HE SLEEP AT NIGHT?", + "OH...BUT DOES HE SLEEP AT NIGHT?", "WELL, I HOPE YOU GET LUCKY", "I HAVE TO TALK TO HIM...", - "YOOUUU...SKELETOOOONN..!!!", + "YOUUU...SKELETONNNN..!!!", "GOOD HEAVENS!, IT'S A DEAD MAN TALKING!", // 290 - "TELL HOW DID YOU GET TO END UP HERE", + "HOW DID YOU END UP HERE", "AND WHY WOULD DRASCULA WANT TO CREATE A MONSTER?", "WHAT'S YOUR NAME, MY SKELETON FRIEND?", "HEY, DON'T YOU WANT ANYTHING TO EAT?", - "I BET YOUR STOMACH IS PRETTY EMPTY...HA, HA,HA!", + "I BET YOUR STOMACH IS PRETTY EMPTY...HA,HA,HA!", // 295 - "THE THING IS THAT I DON'T FEEL LIKE TALKING RIGHT NOW", + "I DON'T FEEL LIKE TALKING RIGHT NOW", "I HOPE SOMEONE F...(WHISTLE) YOU...,AND YOUR F...(WHISTLE) SON OF (WHISTLE TWICE)", "I REALLY LOVED HER. I KNOW SHE WASN'T MUCH OF A WONDER, BUT NOBODY'S PERFECT, RIGHT?", - "BESIDES. SHE REALLY HAD ONE OF THOSE GREAT BODIES THAT YOU NEVER FORGET...", + "BESIDES. SHE HAD ONE OF THOSE GREAT BODIES THAT YOU NEVER FORGET...", "I'LL NEVER BE THE SAME AGAIN. I WILL SHUT MYSELF AWAY IN A MONASTERY, AND WILL LET MY LIFE JUST FLOW...", // 300 "NOTHING WILL GET ME OUT OF THIS MYSTERY BECAUSE...", @@ -659,11 +659,11 @@ const char *_text[][501] = { "I WANT TO BECOME A PROGRAMMER", "TELL ME SOMETHING ABOUT PELAYO", // 305 - "I'LL JUST GO ON PLAYING, AND I'LL FORGET I SAW YOU", + "I'LL JUST GO ON PLAYING, AND FORGET I SAW YOU", "WHOSE STUPID IDEA COULD THIS BE?", - "IT'S LIKE MY GRANDMOTHER'S HANDBAG ", + "IT LOOKS LIKE MY GRANDMOTHER'S HANDBAG ", "JESUS, AREN'T I JUST REALLY COOL MAN...!", - "THE MORE I SEE MYSELF, THE MORE I LOVE ME", + "THE MORE I SEE MYSELF, THE MORE I LOVE MYSELF", // 310 "HOW DO I LOCK MYSELF THEN?", "I'LL HAVE TO OPEN ME FIRST, RIGHT?", @@ -672,14 +672,14 @@ const char *_text[][501] = { "HI, MYSELF!", // 315 "I'LL WEAR THEM WHEN THE RIGHT TIME COMES", - "I CAN'T SEE ANYTHING SPECIAL ABOUT IT", + "I DON'T SEE ANYTHING SPECIAL ABOUT IT", "IT'S ALL RIGHT WHERE IT IS", "AND WHAT FOR?", "I CAN'T", // 320 "HI, YOU!", "IT'S UNCLE DESIDERIO'S PANTHEON!", - "YOOUU...UNCLE DESIDERIOOOO!!", + "YOUUU...UNCLE DESIDERIOOOO!!", "NO, I DON'T WANT TO CUT MYSELF AGAIN", "AHHH,,,EXCUS....", // 325 @@ -692,24 +692,24 @@ const char *_text[][501] = { "COME OUT TO THE BALCONY MY JULIET!!", "YOU ARE THE LIGHT THAT ILLUMINATES MY WAY!", "HEY, DOOR!, WHAT'S THE MATTER?", - "YOOOUU, CIGARETTE SPENDING MACHINEEE!", + "YOUUU, CIGARETTE SPENDING MACHINE!", "IT'S A CIGARETTE SPENDING MACHINE", // 335 "I HAVE ANOTHER COIN INSIDE", - "NO, I JUST DECIDED TO QUIT SMOKING AND DRINKING ALCOHOL", - "I WILL DEVOTE MYSELF TO WOMEN FROM NO ON", + "NO, I JUST QUIT SMOKING AND DRINKING ALCOHOL", + "I WILL DEVOTE MYSELF TO WOMEN FROM NOW ON", "THIS IS A TRICK! NOTHING CAME OUT!", "AT LAST!", // 340 - "JUST A TRUNK", + "ITS JUST A TRUNK", "HELLO TRUNK, YOUR NAME IS JUST LIKE MY COUSIN FRANK...", "I'VE FOUND B.J.'S HANDBAG!", - "OH MY GOD! DON'T GET MY IMAGE REFLECTED! I'M A VAMPIRE!", + "OH MY GOD! I HAVE NO REFLECTION! I'M A VAMPIRE!", "OH...JESUS, IT'S JUST A DRAWING!", // 345 "LITTLE MIRROR, TELL ME, WHO IS THE MOST BEAUTIFUL IN THE WHOLE KINGDOM?", "HE WON'T OPEN", - "ALL RIGHT. I GOT THE EAR-PLUGS ON", + "ALL RIGHT. I GOT THE EAR-PLUGS IN", "IT'S A VAMPIRE'S HUNTER DIPLOMA, OFFICIALLY APPROVED BY OXFORD UNIVERSITY", "NOT YET. THERE ARE STILL SOME INGREDIENTS MISSING. IT'S NOT WORTH WAKING HIM UP", // 350 @@ -726,28 +726,28 @@ const char *_text[][501] = { "CAN'T YOU PLAY ONE FROM BLUR?", // 360 "HOW CAN YOU STAY HERE ALL DAY PLAYING THE SAME SONG ALL THE TIME?", - "AND THEN, HOW CAN YOU HEAR ME?", - "PLEASE, LEND ME THE ERA-PLUGS", + "AND HOW CAN YOU HEAR ME?", + "PLEASE, LEND ME THE EAR-PLUGS", "COME ON, I'LL GIVE THEM BACK TO YOU RIGHT AWAY", - "COOOMEE OONNN...", + "COME ONNN...", // 365 "WELL GOODBYE, I HAVE TO KILL A VAMPIRE", "", "WHAT'S YOUR LANGUAGE, TRANSILVANIAN?", "WHO IS UNCLE DESIDERIO?", - "BUT, WHAT'S THE MATTER WITH THAT DRASCULA?", + "BUT, WHAT'S THE MATTER WITH DRASCULA?", // 370 "WHO IS THAT GUY NAMED VON BRAUN?", "AND WHY DOESN'T HE DO IT?", - "AND WHERE CAN I FIND VON BRAUN?", + "WHERE CAN I FIND VON BRAUN?", "WELL, THANKS AND GOODBYE. HOPE YOU SLEEP IT OFF JUST FINE", - "WE'D BETTER CALL FIRST", + "WE HAD BETTER CALL FIRST", // 375 "ARE YOU PROFESSOR BRAUN?", "AND COULD YOU TELL ME WHERE I CA...?", "I DON'T BELIEVE HE IS GANIMEDES THE DWARF", "PROFESSOR!!", - "PLEASE HELP ME!. THE LIFE OF MY GIRLFRIEND DEPENDS ON YOU!!", + "PLEASE HELP ME!. MY GIRLFRIEND'S LIFE DEPENDS ON YOU!!", // 380 "WELL, ALL RIGHT. I DON'T NEED YOUR HELP", "ALL RIGHT. I'M LEAVING", @@ -764,12 +764,12 @@ const char *_text[][501] = { "ALL RIGHT OLD MAN. I CAME FOR MY MONEY", "NO, NOTHING. I WAS JUST LEAVING", "SORRY...", - "DO YOU LIKE THIS BOOK?. IT HAS SOME SCORES FROM TCHAIKOWSKY", + "DO YOU LIKE THIS BOOK?. IT HAS SOME SCORES FROM TCHAIKOVSKY", "HOW CAN I KILL A VAMPIRE?", // 395 "HAS ANYBODY TOLD YOU THAT SLEEPING IN A BAD POSITION IS NOT GOOD FOR YOU?", "THAT'S WHAT MY MUM ALWAYS TELL ME", - "WHY WOULDN'T DRASCULA KILL YOU?", + "WHY DIDN'T DRASCULA KILL YOU?", "AND WHAT WAS IT?", "GREAT! YOU HAVE AN IMMUNIZING BREW", // 400 @@ -786,7 +786,7 @@ const char *_text[][501] = { "WHAT HAPPENS? DIDN'T YOU HAVE TO GO TO THE COURT?", // 410 "...BUT... IF I MEET MORE VAMPIRES?", - "IT'S A VAMPIRE THAT DOESN'T LET ME COME THROUGH", + "IT'S A VAMPIRE THAT WON'T LET ME COME THROUGH", "HE LOOKS LIKE YODA, BUT A LITTLE TALLER", "HEY YODA, IF YOU JUST LET ME GO ON MY WAY, I'LL GIVE YOU A PENNY", "OK, OK, YOU GET MAD ABOUT NOTHING MAN", @@ -797,55 +797,55 @@ const char *_text[][501] = { "I'D BETTER NOT SAY ANYTHING, IN CASE YOU GET MAD", "IT'S LOCKED", // 420 - "THE MAGPIE WOULD STICK OUT MY EYES IF I TRIED!", + "THE MAGPIE WOULD PECK OUT MY EYES IF I TRIED!", "OH MY GOD. IT'S LOCKED...THAT'S SCARY, HUH?", "THE HINGES ARE RUSTY", "THERE IS ONLY ONE CAN OF FLOUR IN THERE", "THAT TOOK AWAY THE RUST", // 425 - "I HAVE FOUND A PINE STICK", + "I FOUND A PINE STICK", "I'LL TAKE THIS THICKER ONE", "WELL, I THINK I CAN GET RID OF THIS STUPID DISGUISE", - "\"PASSAGE TO TOWERS CLOSED FOR REPAIRS. PLEASE USE MAIN ENTRANCE. SORRY FOR THE INCONVENIENCE\"", - "...HE IS PALE, HE HAS FANGS AND WEARS A TOUPE\220 AND HE SURE IS DRASCULA!", + "\"PASSAGE TO TOWERS CLOSED FOR REPAIRS. PLEASE USE THE MAIN ENTRANCE. SORRY FOR THE INCONVENIENCE\"", + "...HE IS PALE, HE HAS FANGS AND WEARS A TOUPE\220 HE SURE IS DRASCULA!", // 430 "IT'S B.J.! ARE YOU ALL RIGHT B.J.?", "YES, I KNOW SHE IS STUPID, BUT I'M SO LONELY", "YOU DON'T HAVE A KEY AROUND THERE, DO YOU?", - "I BET YOU DON'T HAVE A PICKLOCK AROUND!", - "GIVE ME A HAIRPIN, I'M GOING TO PLAY MCGYVER HERE!", + "I BET YOU DON'T HAVE A LOCK PICK AROUND!", + "GIVE ME A HAIR PIN, I'M GOING TO PLAY MCGYVER HERE!", // 435 "DON'T GO ANYWHERE. I'LL BE RIGHT BACK", "SHOOT! IT'S BROKEN!", "OLEEEE! I EVEN SHAVED DUDE!", "YES, DARLING?", - "HE'S NOT ARRIVED YET", + "HE HAS NOT ARRIVED YET", // 440 "THE PIANIST IS NOT HERE", - "A TRANSYLVANIAN SCOTCH ON THE ROCKS", + "A TRANSILVANIAN SCOTCH ON THE ROCKS", "I DON'T HAVE A ROOM YET", "IT LOOKS LIKE HE GOT STUCK IN THE BATH AND DECIDED TO RUN A BAR", - "HE WAS DRUNK AS A SAILOR", + "HE WAS AS DRUNK AS A SAILOR", // 445 - "THAT HAIR...REMINDS ME OF SOMEBODY", + "THAT HAIR...IT REMINDS ME OF SOMEBODY", "IT'S A RAW-BONED SKELETON", "LOOK! THERE'S MIGUEL BOSE!", - "HE'S ASLEEP. IT'D BE A SHAME WAKING HIM UP", + "HE'S ASLEEP. IT'D BE A SHAME TO WAKE HIM UP", "HE'S UGLIER THAN EMILIO DE PAZ", // 450 - "A PINE-WOODEN COFFIN", + "A PINE WOOD COFFIN", "HE IS GOING TO CUT ME IN LITTLE SLICES. JUST LIKE A SAUSAGE", - "I DON'T LIKE PENDULAE. I'D RATHER PREFER ARTICHOKES", + "I DON'T LIKE PENDULAE. I'D PREFER ARTICHOKES", "I CAN'T MAKE IT. I'M HANDCUFFED", "IT'S OBVIOUSLY A SECRET DOOR", // 455 "THEY IGNORE ME", "COME ON..!", - "WHEN I READ THE SCRIPT IT WAS SUPPOSED TO MOVE, BUT THE BUDGET GOT CRAZY AND THEY COULDN'T AFFORD TO PAY THE GYM, SO THAT I NEVER GOT TOUGH. END OF STORY", - "IT SEEMS A LITTLE LOOSE FROM THE WALL", - "I DON'T THINK IS GOING TO HELP ME ANYWAY. IT'S TOO WET TO LIGHT IT", + "WHEN I READ THE SCRIPT IT WAS SUPPOSED TO MOVE, BUT THE BUDGET GOT CRAZY AND THEY COULDN'T AFFORD TO PAY THE GYM, SO I NEVER GOT STRONGER. END OF STORY", + "IT SEEMS A LITTLE LOOSE ON THE WALL", + "I DON'T THINK IT IS GOING TO HELP ME ANYWAY. IT'S TOO WET TO LIGHT", // 460 - "TO WEST WING? NO WAY! NOBODY KNOWS WHAT YOU CAN FIND THERE!!", + "TO THE WEST WING? NO WAY! NOBODY KNOWS WHAT YOU WILL FIND IN THERE!!", "SHE'S GOT NICE TRANSILVANIAN REASONS", "", "IT'S A SHAME THERE ISN'T A ROASTED LAMB IN THERE", @@ -864,7 +864,7 @@ const char *_text[][501] = { "A SHELF WITH BOOKS AND SOME OTHER THINGS", // 475 "BUT WHO CAN I CALL AT THIS TIME?", - "\"HOW TO MAKE THE TAX RETURN FORMS\". HOW INTERESTING!", + "\"HOW TO FILL IN TAX RETURN FORMS\". HOW INTERESTING!", "I ALREADY HAVE ONE AT HOME. I THINK IT'S A WORLDWIDE BEST SELLER", "A COMPLETELY NORMAL KEY", "I THINK SHE IS NOT FROM AROUND HERE", @@ -875,23 +875,23 @@ const char *_text[][501] = { "LET'S SEE IF ANOTHER ONE COMES SOON!", "NO, IT HAS TO BE WITH A DIRTY AND STINKY VAMPIRE, JUST LIKE THE ONE I KILLED BEFORE", // 485 - "THIS IS THE ONE AND ONLY WIG ELVIS USED WHEN HE GOT BALD", + "THIS IS THE ONE AND ONLY WIG THAT ELVIS USED WHEN HE WENT BALD", "IT'S FLOUR, BUT DON'T ASK ME ANY COMMERCIAL NAMES", "MAYBE ANOTHER TIME, OK?", "THAT'S A GREAT AXE, IT'S A SHAME THERE IS NO VAMPIRE'S HEAD AROUND HERE, HUH?", - "NO. I'M REALLY A GOOD PERSON", + "NO. I REALLY AM A GOOD PERSON", // 490 - "IT'S MARGARET'S THATCHER DEODORANT...HA, HA, HA...!!", + "IT'S MARGARET'S THATCHERS DEODORANT...HA, HA, HA...!!", "THAT'S A PRETTY CUTE CLOAK", "", - "JUST LIKE ALL BRANCHES FROM ANY TREE IN THE WORLD, THERE IS NOTHING SPECIAL.", - "HEY, THAT'S AMAZING! A ROPE WITHIN THIS TYPE OF ADVENTURE!", + "JUST LIKE ALL THE BRANCHES FROM ANY TREE IN THE WORLD, THERE IS NOTHING SPECIAL.", + "HEY, THAT'S AMAZING! A ROPE WITHIN THIS TYPE OF ADVENTURE GAME!", // 495 "I WONDER WHAT WE COULD USE IT FOR...", "A ROPE TIED TO A BRANCH OR THE OTHER WAY AROUND, HOWEVER YOU WANT TO PUT IT...", "IT LOOKS LIKE THIS MAGPIE IS EVIL-MINDED", "FORGET IT, I'M NOT SAYING ANYTHING IN CASE HE GETS MAD", - "SHE LOOKS DEAD, BUT SHE REALLY ISN'T, HUH?", + "SHE LOOKS DEAD, BUT REALLY SHE ISN'T, HUH?", // 500 "NO ANIMAL WAS HARMED DURING THE PRODUCTION OF THIS GAME", }, @@ -3320,7 +3320,7 @@ const char *_textd[][84] = { "HEY IGOR, HOW IS EVERYTHING GOING?", "IT'S ALWAYS THE SAME STORY EVERYTIME THERE'S A GOOD GAME ON THE SATELLITE! ANYWAY, WE'LL GO WATCH IT IN THE BAR, AS USUAL", "IGOR LISTEN CAREFULLY MAN, WE ARE GOING TO START WITH PHASE NUMBER ONE OF MY PLAN TO CONQUER THE WORLD", - "FIRST WE'LL CAPTURE ONE OF THE LIGHTNINGS AND WE'LL DEMAGNETIZE IT WITH OUR INDIFIBULATOR. THE ELECTRICITY WILL COME THROUGH TO MY MONSTER AND HE'LL GET ALIVE!", + "FIRST WE'LL CAPTURE SOME LIGHTNING AND WE'LL DEMAGNETIZE IT WITH OUR INDIFIBULATOR. THE ELECTRICITY WILL COME THROUGH TO MY MONSTER AND HE WILL LIVE!", // 5 "IF EVERYTHING WORKS OUT ALL RIGHT, THIS WILL BE THE BEGINNING OF A GREAT ARMY THAT WILL CONQUER THE WORLD FOR ME. HA, HA", "THE MONSTERS WILL DESTROY ALL THE ARMY'S WEAPONS IN THE WORLD, MEANWHILE, WE'LL BE SAFE IN THE PIECES OF LAND I BOUGHT IN GIBRALTAR", @@ -3329,19 +3329,19 @@ const char *_textd[][84] = { "I'M NOT TALKING TO YOU, IDIOT! I'M JUST GIVING YOU THE PLOT. ALL RIGHT, EVERYTHING READY?", // 10 "THE TIME HAS COME! TURN ON THE ALKALINE BATTERIES' SWITCH", - "DAMNED IT! WHAT WENT WRONG?", - "ARE YOU SURE YOU CHECKED IT ALL AND THERE WAS NOTHING MISSING? YOU'VE BEEN LATELY MESSING AROUND WITH THAT STUFF ABOUT TAXES AND I DON'T KNOW MAN...", - "YOU STUPID THING! YOU FORGOT TO CONNECT THE INDIFIBULATOR. THE SCREWS HAVE PROBABLY MAGNETIZED AND HIS BRAIN BURNT", + "DAMN IT! WHAT WENT WRONG?", + "ARE YOU SURE YOU CHECKED IT ALL AND THERE WAS NOTHING MISSING? LATELY YOU'VE BEEN MESSING AROUND WITH THAT STUFF ABOUT TAXES AND I DON'T KNOW MAN...", + "YOU STUPID THING! YOU FORGOT TO CONNECT THE INDIFIBULATOR. THE SCREWS HAVE PROBABLY MAGNETIZED AND HIS BRAIN HAS PROBABLY BURNT", "YOU ARE DEAD, YOU ARE DEAD...WAIT TILL I GET YOU!", // 15 "SHUT UP! I'LL GET ANOTHER BRAIN TOMORROW AND THEN WE WILL REPEAT THE EXPERIMENT", "THIS TIME I'LL GET A WOMAN'S BRAIN. SHINY AND NOT USED YET...HA, HA, HA, GOODIE ONE!", "SO WHAT? I'M THE BAD GUY, RIGHT? SO I CAN BE AS FULL OF MACHISMO AS I WANT, ALL RIGHT? AND IF YOU SAY SOMETHING AGAIN I'LL TURN YOUR HUMP BACK TO FRONT!", - "HA, HA, HA. YOU FELL TOOO!! NOW YOU ARE GOING TO PAY FOR DARING TO FIGHT AGAINST ME! IGOR, TAKE HIM TO THE PENDULUM OF DEATH!", + "HA, HA, HA. YOU FELL TOO!! NOW YOU ARE GOING TO PAY FOR DARING TO FIGHT ME! IGOR, TAKE HIM TO THE PENDULUM OF DEATH!", "AND SO, TELL ME, YOU STUPID HUMAN. HOW COME YOU WANT TO DESTROY ME?", // 20 "THAT'S BEAUTIFUL!. IF IT WASN'T BECAUSE IT MAKES ME LAUGH, I WOULD CRY", - "OUR GIRLFRIEND'S BRAIN TO HELP ME CONQUERING THE WORLD", + "YOUR GIRLFRIEND'S BRAIN, TO HELP ME CONQUER THE WORLD", "YES, SURE! I'LL TAKE IT FROM HER AND GIVE IT TO MY FRUSKYNSTEIN. THE WORLD WILL BE MINE WITH IT, HA, HA", "WHAT!? YOU'RE DEAD, MAN! I'M GOING TO...YOU REALLY GOT ME ANGRY MAN...COME ON, PREPARE TO DIE!", "HA, HA, HA. NOT EVEN IN YOUR WILDEST DREAMS!", @@ -3353,7 +3353,7 @@ const char *_textd[][84] = { "WELL, WE'LL SEE THAT", // 30 "OK, LET'S SEE IT. IGOR, BRING ME THE CD \"SCRATCHING YOUR NAILS ALL OVER THE BLACKBOARD\"", - "NO WAY. THE GIRL STAYS WITH ME. YOU RE STAYING THERE UNTIL THE PENDULUM CUTS YOU INTO THIN SLICES. HA, HA, HA", + "NO WAY. THE GIRL STAYS WITH ME. YOU'RE STAYING THERE UNTIL THE PENDULUM CUTS YOU INTO THIN SLICES. HA, HA, HA", "MAN I'M I JUST BAD... COME ON IGOR, LET'S MAKE THE BREW AND CONQUER THE WORLD", "WHAT HAPPENS NOW?", "YES, WHAT?...OH, DAMNED, THE GAME!", @@ -3361,7 +3361,7 @@ const char *_textd[][84] = { "I FORGOT ABOUT THAT. GET THE GIRL AND LET'S GO AND WATCH IT. WE CAN CONQUER THE WORLD LATER", "THANKS MAN, I WAS THIRSTY", "OH, THE CRUCIFIX!!...THE CRUCIFIX...!", - "I DIDN'T NOTICE ABOUT THAT BEAUTIFUL CRUCIFIX!", + "I DIDN'T NOTICE THAT BEAUTIFUL CRUCIFIX!", "LEAVE ME ALONE!, I'M WATCHING THE GAME", // 40 "", @@ -3388,7 +3388,7 @@ const char *_textd[][84] = { "YOU LOOK BLIND. YOU'RE WEARING DARK GLASSES LIKE STEVIE WONDER", "LOOK, I'M SORRY, I DIDN'T KNOW YOU COULD SEE", // 60 - "BUT HAVEN'T YOU JUST TOLD ME YOU WEREN'T BLIND", + "BUT YOU JUST TOLD ME YOU WEREN'T BLIND", "BUT IF YOU CAN'T SEE", "OOOOKAY. SORRY. IN THAT CASE, HI THERE SIGHTLESS PERSON", "I'M JOHN HACKER. YOU MUST BE ONE OF THOSE CHARACTERS WHO WILL HELP ME OUT IN EXCHANGE FOR AN OBJECT. AREN'T YOU? EH? AREN'T YOU?", @@ -3396,15 +3396,15 @@ const char *_textd[][84] = { // 65 "AH YES, I SUPPOSE THAT'S TRUE. GOODBYE SIGHTLESS PERSON... BLIND MAN", "HERE IS THE LARGE AMOUNT OF MONEY YOU ASKED ME FOR", - "YOU BETTER HAVE HAD", + "YOU BETTER HAVE", "HI THERE FOREIGNER", "AND HOW DO YOU KNOW I'M BLIND?", // 70 - "AND I'M NOT KIDDING YOU BUT YOUR'S ARE LIKE WOODY ALLEN'S", + "AND I'M NOT KIDDING YOU BUT YOURS ARE LIKE WOODY ALLEN'S", "NO, I CAN'T SEE", "AND I'M NOT", "OH OF COURSE. JUST COS I CAN'T SEE, YOU ACCUSE ME OF BEING BLIND", - "HI THERE FOREIGNER! WHAT ARE YOU DOING IN TRANSYLVANIA?", + "HI THERE FOREIGNER! WHAT ARE YOU DOING IN TRANSILVANIA?", // 75 "THAT'S RIGHT, FOREIGNER. IN EXCHANGE FOR A LARGE SUM OF MONEY I'LL GIVE YOU A SICKLE FOR WHEN YOU MIGHT NEED IT", "SHHHH, I'M A SICKLES TRADER, THAT'S WHY I HAVE TO HIDE", @@ -3836,21 +3836,21 @@ const char *_textb[][15] = { // 0 "", "I'M HERE, DRINKING", - "THEY ARE ALL DEAD, THANKS. BURPP...", + "THEY ARE ALL DEAD, THANKS. BURP...", "YES, SURE...", "SHE FEELS ATTRACTED TO UNCLE DESIDERIO", // 5 "EVEN BETTER, UNCLE DESIDERIO'S DEAD BODY", - "MY UNCLE. HE WENT TO CASTLE AND NEVER CAME BACK", + "MY UNCLE. HE WENT TO THE CASTLE AND NEVER CAME BACK", "WELL, HE CAME BACK JUST A LITTLE. IF ONLY VON BRAUN HADN'T SCREWED THINGS UP MY UNCLE WOULD BE DRINKING WITH US NOW", "NOTHING...", "WELL, YES !. THAT MEAN MAN HAS TERRIFIED US ALL", // 10 "FROM TIME TO TIME HE COMES DOWN TO THE VILLAGE AND TAKES SOMEONE WITH HIM.", - "A LITTLE WHILE AFTER WE JUST A FEW FOUND BODY PARTS. I THINK HE IS DEALING WITH ORGANS OR SOMETHING LIKE THAT", - "THE ONLY PERSON IN THE VILLAGE WHO KNOWS HOW TO END UP WITH DRASCULA IS A CULTIVATED PERSON", + "A LITTLE WHILE AFTER WE JUST A FEW FOUND BODY PARTS. I THINK HE IS DEALING IN ORGANS OR SOMETHING LIKE THAT", + "THE ONLY PERSON IN THE VILLAGE WHO KNOWS HOW TO GET TO DRASCULA IS A CULTIVATED PERSON", "HE LIVES IN A LOG-CABIN OUT OF TOWN, EVER SINCE DRASCULA BEAT HIM UP", - "HE IS THE ONLY ONE WHO COULD HELP US WITH DRASCULA, AND HE DOESN'T WANT TO HEAR ABOUT US. HOW DO YOU LIKE THAT?", + "HE IS THE ONLY ONE WHO COULD HELP US WITH DRASCULA, AND HE DOESN'T WANT TO HEAR ABOUT IT. HOW DO YOU LIKE THAT?", }, { // 0 @@ -3941,25 +3941,25 @@ const char *_textbj[][29] = { "ARE YOU ALL RIGHT? HEY, COME ON, WAKE UP! CAN YOU HEAR ME? ARE YOU DEAD?", "NO, MY NAME IS BILLIE JEAN, BUT YOU CAN CALL ME B.J. IT'S SHORTER", "HA, HA...! THAT WAS A GOOD ONE!", - "WELL, JHONNY. YOU SEE, I WAS HERE JUST READY TO GO TO BED WHEN I HEARD THIS STRONG NOISE DOWN THE CORRIDOR", + "WELL, JHONNY. YOU SEE, I WAS HERE JUST READY TO GO TO BED WHEN I HEARD THIS LOUD NOISE DOWN THE CORRIDOR", // 5 "I DIDN'T PAY ATTENTION AT FIRST, BUT AFTER ABOUT TWO HOURS OR SO I COULDN'T SLEEP AND WENT OUT FOR A WALK", "AS I OPENED THE DOOR I WAS SHOCKED TO FIND YOU THERE, LYING ON THE FLOOR. I THOUGHT YOU WERE DEAD, I SWEAR... HA, HA, SILLY BILLY", "I WAS GOING TO GIVE YOU THE KISS OF LIFE BUT IT WASN'T NECESSARY BECAUSE YOU STARTED TO TALK", - "YOU SAID SOMETHING ABOUT A SCARECROW. I WAS VERY SCARED, YOU KNOW. IT'S A REAL SHOCK WHEN A DEAD PERSON STARTS TALKING RIGHT?", + "YOU SAID SOMETHING ABOUT A SCARECROW. I WAS VERY SCARED, YOU KNOW. IT'S A REAL SHOCK WHEN A DEAD PERSON STARTS TALKING?", "ISN'T THAT RIGHT? WELL, THEN I MANAGED TO BRING YOU TO MY ROOM THE BEST WAY I COULD. I PUT YOU IN BED... AND THAT'S ALL... HA, HA, HA...", // 10 - "OH, NO...! IT WASN'T THE HIT, HA, HA. I JUST STEEPED ON YOUR GLASSES BY ACCIDENT", + "OH, NO...! IT WASN'T THE HIT, HA, HA. I JUST STEPPED ON YOUR GLASSES BY ACCIDENT", "YOU REALLY LOOK GOOD WITH THOSE GLASSES. I KNOW HE'S NOT FERNANDO LANCHA, BUT I FIND HIM ATTRACTIVE...", "YES, YES, I DO... COME ON, HOLD ME AND KISS ME TIGHT", - "OH JHONNY, HONEY, THANKS GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND THEN HE'S GONE DOWNSTAIRS TO SEE THE FOOTBALL GAME", + "OH JHONNY, HONEY, THANK GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND THEN HE'S GONE DOWNSTAIRS TO WATCH THE FOOTBALL GAME", "YES, IT'S TRUE. PLEASE, SET ME FREE", // 15 - "NO, I'M SORRY. I USED THEM ALL IN THE TOWER WHEN I WAS TRYING TO LIBERATE WHILE YOU LET ME DOWN", + "NO, I'M SORRY. I USED THEM ALL IN THE TOWER WHEN I WAS TRYING TO ESCAPE WHILE YOU LET ME DOWN", "JOHNNY, IS THAT YOU? OH, GOD, GREAT! I KNEW YOU'D COME!", - "YOU DON'T EVEN KNOW HOW MUCH THAT EVIL DRASCULA HAS MADE ME SUFFER", - "FIRSTLY HE BROUGHT ME FLYING OVER HER AND THEN PUT ME IN THIS DISGUSTING ROOM WITHOUT EVEN A MIRROR OR ANYTHING", - "I'M TELLING YOU! AND THE WORSE PART IS THAT HE DIDN'T EVEN APOLOGIZE, NOT EVEN ONCE", + "YOU DON'T KNOW HOW MUCH THAT EVIL DRASCULA HAS MADE ME SUFFER", + "FIRSTLY HE BROUGHT ME FLYING OVER HERE AND THEN PUT ME IN THIS DISGUSTING ROOM WITHOUT A MIRROR OR ANYTHING", + "I'M TELLING YOU! AND THE WORST PART IS THAT HE DIDN'T EVEN APOLOGIZE, NOT EVEN ONCE", // 20 "JHONNY HONEY, WHERE ARE YOU?", "I'M READY TO LEAVE DEAR", @@ -4139,7 +4139,7 @@ const char *_texte[][24] = { "THE TRUTH IS THAT I DON'T REALLY FEEL LIKE IT, BUT THANKS VERY MUCH ANYWAY SIR", // 10 "YEAH, IT'S YOU", - "WHY DO ALL ADVENTURE GAMES END UP WITH A SUNRISE OR A SUNSET?", + "WHY DO ALL ADVENTURE GAMES END WITH A SUNRISE OR A SUNSET?", "DO ALL THESE NAMES BELONG TO THE CREATORS OF THE GAME?", "AREN'T THEY ASHAMED TO BE SEEN BY EVERYBODY?", "JESUS, THAT EMILIO DE PAZ IS EVERYWHERE!!", @@ -4148,9 +4148,9 @@ const char *_texte[][24] = { "YES", "WELL, DON'T MAKE A FUSS ABOUT IT", "HEY WEREWOLF, BY THE WAY...", - "DIDN'T YOU FALL OFF A WINDOW AND GOT BADLY HURT", + "DIDN'T YOU FALL OFF A WINDOW AND GET BADLY HURT", // 20 - "IF AT LEAST IT WASN'T ALWAYS THE SAME ONES...", + "AT LEAST IT WASN'T ALWAYS THE SAME ONES...", "HE'S BEEN OUT FOUR TIMES ALREADY", "I'D LIKE TO BE A MODEL", "ALL RIGHT, AND WHAT ARE YOU GOING TO DO?", @@ -4286,22 +4286,22 @@ const char *_texti[][33] = { { // 0 "", - "MASTER, I THINK THIS IS NOT WORKING", + "MASTER, THIS IS NOT WORKING", "I AM POSITIVE, MASTER", "I'M SORRY MASTER", - "ARE YOU GOING TO BRING HERE ANOTHER CRAZY SCIENTIST? I'LL TELL YOU THAT THE LABORATORY IS ALREADY PACKED UP, AND BESIDES, THEY'RE ALL OUT OF DATE", + "ARE YOU GOING TO BRING ANOTHER CRAZY SCIENTIST HERE? THE LABORATORY IS ALREADY FULL UP, AND BESIDES, THEY'RE ALL OUT OF DATE", // 5 - "HUSH MASTER, THE FEMINIST COULD HEAR YOU", - "DAMNED IT!", + "HUSH MASTER, THE FEMINISTS COULD HEAR YOU", + "DAMN IT!", "I DIDN'T EXPECT YOU SO SOON, MASTER", - "QUITE BAD MASTER. THERE MUST BE SOME PROBLEMS WITH THE SATELLITE AND I JUST CAN'T RECEIVE ANYTHING. BESIDES THERE ARE SOME INTERFERENCES BECAUSE OF THE STORM", + "QUITE BAD MASTER. THERE MUST BE SOME PROBLEMS WITH THE SATELLITE AND I JUST CAN'T RECEIVE ANYTHING. BESIDES THERE IS SOME INTERFERENCE BECAUSE OF THE STORM", "WHAT DO I KNOW, MASTER?", // 10 "YES, MY MASTER", "MASTER", "DO YOU KNOW WHAT TIME IS IT?", "WHAT? OH, THAT SCARED ME!. YOU ARE THE \"NIGHT-CLEANING GUY\", RIGHT?", - "I'M IGOR, THE VALET. YOU CAN START WITH THE BALL ROOM. THERE'S BEEN A SUPER NATURAL ORGY YESTERDAY AND IT LOOKS LIKE SHIT", + "I'M IGOR, THE VALET. YOU CAN START WITH THE BALL ROOM. THERE'S BEEN A SUPER NATURAL ORGY IN THERE YESTERDAY AND IT LOOKS LIKE SHIT", // 15 "IF YOU NEED ANYTHING, JUST BUY IT", "IT'S THE TAX RETURN APPLICATION FORM, CAN'T YOU SEE IT?", @@ -4309,7 +4309,7 @@ const char *_texti[][33] = { "NO WAY! THEY MAKE ME LOOK UGLY", "OH, WELL. IT'S JUST LIKE A CRAZY PARTY THAT THE MASTER ORGANIZES WITH HIS FRIENDS EACH TIME SOME IDIOT COMES ALONG TRYING TO KILL HIM", // 20 - "THEY TAKE HIS EYES OUT. THEN, POUR SOME LEMON JUICE SO THAT IT ITCHES TO DEATH, AND THEN...", + "THEY TAKE HIS EYES OUT. THEN, POUR IN SOME LEMON JUICE SO THAT IT ITCHES TO DEATH, AND THEN...", "NO", "WHAT DO YOU MEAN WHY NOT? DO YOU KNOW WHAT TIME IT IS?", "YES, IT'S WINTER", @@ -4501,9 +4501,9 @@ const char *_textl[][32] = { // 0 "", "ARE YOU GOING TO LET OURSELVES BE GUIDED BY PRIMITIVE INSTINCTS JUST BECAUSE WE BELONG TO DIFFERENT RACES AND THE SOCIAL SITUATION IS TELLING US TO DO SO?", - "AREN'T WE TIED BY SENSE WHICH IS THE MOST POWERFUL WEAPON AS WELL AS THE MOST PRECIOUS GIFT?", + "AREN'T WE TIED BY SENSE? WHICH IS OUR MOST POWERFUL WEAPON AS WELL AS OUR MOST PRECIOUS GIFT?", "OH, IF WE ALL LET OUR THOUGHTS GUIDE OUR WAY IN LIFE WITHOUT LEAVING SOME ROOM FOR FEELINGS WHICH LET OUR PRE-EVOLUTIVE INSTINCTS COME OUT!", - "ANSWER ME, EPHEMERAL CREATURE. WOULDN'T WE ALL BE HAPPIER WITH THOSE EMOTIONAL BOUNDINGS?", + "ANSWER ME, EPHEMERAL CREATURE. WOULDN'T WE ALL BE HAPPIER WITH THOSE EMOTIONAL BINDINGS?", // 5 "YOU ARE NOT GETTING THROUGH", "THIS IS A VERY CLEAR EXAMPLE, YOU SEE?: YOU WANT TO GET THROUGH AND GO AHEAD WITH YOUR ADVENTURE, AND I WON'T LET YOU DO THAT", @@ -4512,7 +4512,7 @@ const char *_textl[][32] = { "WELL, THAT DEPENDS ON WHAT WE TAKE A RELATIONSHIP FOR. SOME AUTHORS DEFEND...", // 10 "PUKE! HUNTING AS A WAY TO SURVIVE IS AN INCOMPATIBLE ARCHAIC THING FOR A SUPERIOR BEING LIKE ME. BESIDES, I'VE BECOME A VEGETARIAN", - "IT JUST HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO BETHINK AND GET TO THE ABOVE MENTIONED THOUGHT", + "IT JUST HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO THINK AND GET TO THE ABOVE MENTIONED THOUGHT", "IT TOOK ME A LONG TIME TO QUIT OLD HABITS BUT AT LEAST MY IRASCIBLE SOUL BIT UP THE CONCUPISCIBLE ONE, AND EVER SINCE, I'VE NEVER EATEN MEAT AGAIN", "NOT EVEN THE PLEASURE OF SUCKING UP THE BONE, FEELING THE TASTE OF THE SKIN AND THAT SWEET TASTE OF MARROW...THAT JUST TAKES YOU TO HEAVENLY PLACES", "IT DOESN'T REALLY GET TO ME AT ALL", @@ -4841,28 +4841,28 @@ const char *_textt[][25] = { { // 0 "", - "WHAT HAPPENS, WHAT'S THE MATTER?", + "WHAT HAPPENED? WHAT'S THE MATTER?", "OK. ROOM 512. UPSTAIRS. THE KEY IS ON THE DOOR", "COUNT DRASCULA!!?", - "NO, NOTHING. THAT GUY HAS A BAD REPUTATION OVER HERE", + "NO, NOTHING. THAT GUY JUST HAS A BAD REPUTATION OVER HERE", // 5 - "WELL, THERE ARE ALL KINDS OF STORIES GOING AROUND ABOUT HIM, SOME SAY HE IS A VAMPIRE WHO KIDNAPS PEOPLE TO SUCK UP THEIR BLOOD", + "WELL, THERE ARE ALL KINDS OF STORIES GOING AROUND ABOUT HIM, SOME SAY HE IS A VAMPIRE WHO KIDNAPS PEOPLE TO SUCK THEIR BLOOD", "HOWEVER, SOME OTHERS SAY THAT HE IS JUST AN ORGAN-DEALER AND THAT IS THE REASON WHY THERE ARE BODY PARTS ALL OVER THE PLACE", "BUT OF COURSE, THOSE ARE JUST RUMORS. HE'S PROBABLY BOTH THINGS. BY THE WAY, WHY DO YOU WANT TO MEET HIM?", "NO, FORGET IT. I'M REALLY BUSY...", - "WELL, OK. BUT JUST BECAUSE I WANT TO DO IT, NOT BECAUSE YOU TELL ME TO", + "WELL, OK. BUT JUST BECAUSE I WANT TO DO IT, NOT BECAUSE YOU TOLD ME TO", // 10 "THEY'RE WINNING", "LEAVE ME ALONE, ALL RIGHT?", "OF COURSE. I'M NOT BLIND", - "THE TRADITION IN THIS VILLAGE IS TO FORGET ALL HARD FEELINGS WHENEVER THERE IS A GAME, SO AS TO CHEER UP THE LOCAL TEAM", + "THE TRADITION IN THIS VILLAGE IS TO FORGET ALL HARD FEELINGS WHENEVER THERE IS A GAME, TO CHEER UP THE LOCAL TEAM", "AND PLEASE, SHUT UP FOR GOD'S SAKE. I CAN'T HEAR ANYTHING!", // 15 "COME ON, LEAVE ME ALONE AND DON'T BOTHER ME ANYMORE", - "IT HAS JUST STARTED! AND SHUT UP!", + "IT HAS JUST STARTED! SHUT UP!", "OK, OK, I THOUGHT SOMETHING WAS GOING ON", - "IT DOESN'T MATTER, ANYWAY. SHE'LL PROBABLY BE DEAD BY NOW", - "HE JUST STARTED PLAYING CLASSIC MUSIC, AND I COULDN'T STAND IT", + "IT DOESN'T MATTER, ANYWAY. SHE IS PROBABLY DEAD BY NOW", + "HE JUST STARTED PLAYING CLASSICAL MUSIC, AND I COULDN'T STAND IT", // 20 "SINCE I'M PAYING HIM FOR PLAYING WHATEVER I WISH, I JUST FIRED HIM", "AND THEN, HE GOT FRESH WITH ME. JESUS!, HE LOOKED SO NICE AND INNOCENT...WHAT A HYPOCRITE!", @@ -5013,7 +5013,7 @@ const char *_textvb[][63] = { "IT'S TOO LATE NOW, YOU IDIOT!! IT ALWAYS IS", "I COULDN'T AGREE MORE", "ME, SCARED?", - "LISTEN HERE, DUDE. YOU'RE RIGHT NOW TALKING TO THE ONLY PERSON WHO KNOWS THE SECRET TO FIGHT AGAINST THE VAMPIRE", + "LISTEN HERE, DUDE. YOU'RE TALKING TO THE ONLY PERSON WHO KNOWS THE SECRET OF HOW TO FIGHT AGAINST THE VAMPIRE", "YOU NEED TO HAVE SPECIAL SKILLS TO FIGHT AGAINST A VAMPIRE. NOT EVERYBODY CAN DO IT", // 10 "YOU DON'T HAVE THEM", @@ -5028,7 +5028,7 @@ const char *_textvb[][63] = { "ALL RIGHT. LET'S GET TO IT", "YOU ARE USELESS. YOU SEE...?, JUST LIKE THE REST!!", // 20 - "JUST GIVE ME NOW THE MONEY YOU LOST AND GET OUT OF HERE", + "JUST GIVE ME THE MONEY, YOU LOST SO GET OUT OF HERE", "AND DON'T COME BACK UNTIL YOU ARE ABSOLUTELY READY", "WHAT DO YOU WANT NOW?", "I HAVE TO ADMIT IT. YOU REALLY GOT WHAT IT TAKES TO FIGHT AGAINST THE VAMPIRES", @@ -5037,38 +5037,38 @@ const char *_textvb[][63] = { "LEAVE ME ALONE NOW, I WANT TO GET SOME SLEEP", "WHENEVER YOU ARE READY TO FIGHT AGAINST THE VAMPIRES, JUST COME BACK AND I'LL HELP YOU OUT", "OH, THAT'S EASY. JUST USING THE LIGHT OF ONE CRUCIFIX IS ENOUGH TO DESTROY HIM", - "YOU HAVE TO BE EXTRA CAREFUL WITH DRASCULA, HIS FRISISNOTICS POWERS HAVE MADE OF HIM THE MOST POWERFUL VAMPIRE", - "YOU'D BE LOST IF IT WASN'T FOR THEY...", + "YOU HAVE TO BE EXTRA CAREFUL WITH DRASCULA, HIS FRISISNOTIC POWERS HAVE MADE OF HIM THE MOST POWERFUL VAMPIRE", + "YOU'D BE LOST IF IT WASN'T FOR THEM...", // 30 "...BREW!", "YEAH, YOU'RE RIGHT! I MIGHT HAVE SOME PROBLEMS WITH MY BACK IN THE FUTURE IF I KEEP ON SLEEPING THIS WAY", "I UNDERSTAND HE WAS A BETTER OPPONENT THAN ME, BUT YOU HAVE TO ADMIT THAT THE DISCOVERY I MADE ABOUT ANTI-VAMPIRE TECHNIQUES WAS WHAT ACTUALLY PROTECTED ME", - "I'VE FOUND THIS IMMUNIZING BREW THAT KEEPS YOU SAFE FROM ANY VAMPIRES' BITE OR AGAINST HIS FRISISNOTICS POWERS", + "I'VE FOUND THIS IMMUNIZING BREW THAT KEEPS YOU SAFE FROM ANY VAMPIRES' BITE OR AGAINST HIS FRISISNOTIC POWERS", "NO, NO, EXCUSE ME. I HAD IT ONCE BUT IT'S VERY DANGEROUS TO HAVE A BREW OF THAT TYPE. CAN YOU IMAGINE WHAT COULD HAPPEN IF A VAMPIRE GOT IT?", // 35 - "HE'D BE IMMUNIZED AGAINST GARLIC, THE SUNSHINE LIGHT... SO I HAD TO GET RID OF WHAT I DIN'T USE BY THE SCIENTIFIC METHOD OF THROWING IT IN THE LAVATORY", + "HE'D BE IMMUNIZED AGAINST GARLIC, AND THE SUNSLIGHT... SO I HAD TO GET RID OF WHAT I DIDN'T USE BY THE SCIENTIFIC METHOD OF THROWING IT IN THE LAVATORY", "DON'T WORRY, I REMEMBER EXACTLY HOW TO MAKE THAT BREW", - "I NEED GARLIC, BUT I ALREADY HAVE THEM. HOWEVER YOU'LL HAVE TO GET ME SOME WAX, BUBBLE GUM AND CIGARETTE PAPER OR PERHAPS A NAPKING OR SOMETHING ALIKE", + "I NEED GARLIC, BUT I ALREADY HAVE THAT. HOWEVER YOU'LL HAVE TO GET ME SOME WAX, BUBBLE GUM AND CIGARETTE PAPER OR PERHAPS A NAPKIN OR SOMETHING ALIKE", "OH...AND OF COURSE THE MOST IMPORTANT INGREDIENT. LEAVES FROM A VERY STRANGE PLANT CALLED FERNAN", - "IT'S A CLIMBING PLANT WHICH LEAVES HAVE MAGIC POWERS IF THEY'RE CUT WITH A GOLDEN SICKLE", + "IT'S A CLIMBING PLANT WHOSE LEAVES HAVE MAGIC POWERS IF THEY'RE CUT WITH A GOLDEN SICKLE", // 40 - "SO THAT AS SOON AS YOU HAVE THESE FIVE THINGS, JUST COME HERE AND I'LL MAKE THE BREW", + "SO AS SOON AS YOU HAVE THESE FIVE THINGS, JUST COME HERE AND I'LL MAKE THE BREW", "YOU'LL BE READY THEN TO FIGHT AGAINST DRASCULA", - "REMEMBER: WAX, NICOTINE, A PIECE OF BUBBLE GUM, A PAPER AND SOME FERNAN'S LEAVES CUT WITH A GOLDEN SICKLE", - "I TOLD YOU! IT WAS JUST BECAUSE OF THE BREW!", - "OH, ALL RIGHT. I'M GOING TO MAKE MYSELF A...THE BREW. JUST A MOMENT, OK?", + "REMEMBER: WAX, NICOTINE, A PIECE OF BUBBLE GUM, PAPER AND SOME FERNAN'S LEAVES CUT WITH A GOLDEN SICKLE", + "I TOLD YOU! IT WAS BECAUSE OF THE BREW!", + "OH, ALL RIGHT. I'M GOING TO MAKE MYSELF ...THE BREW. JUST A MOMENT, OK?", // 45 "IT'S A PROTECTING SPELL AGAINST VAMPIRES", - "I PUT IT THERE IN ORDER TO PRETEND THAT THE SKETCHER DIDN'T FORGET TO DRAW THE WINDOW YOU CAN SEE FROM OUTSIDE", + "I PUT IT THERE IN ORDER TO PRETEND THE ARTIST DIDN'T FORGET TO DRAW THE WINDOW YOU CAN SEE FROM OUTSIDE", "ALL RIGHT, THE FIRST THING YOU MUST KNOW IS THE WAY TO DRASCULA'S CASTLE", - "THERE IS A CAVERN THAT GETS YOU STRAIGHT FROM THE CASTLE. IGOR, THE CRAZY ELVIS' FUN, TAKES IT TO GET TO THE VILLAGE EACH MORNING", + "THERE IS A CAVERN THAT GETS YOU STRAIGHT FROM THE CASTLE. IGOR, THE CRAZY SERVANT', TAKES IT TO GET TO THE VILLAGE EACH MORNING", "BE CAREFUL THOUGH, THERE IS A VAMPIRE ALWAYS WATCHING OVER IT. YOU'LL HAVE TO GET RID OF HIM", // 50 "THERE IS AN OLD WELL RIGHT BY THE CEMETERY CHURCH", "IT WAS USED A LONG TIME AGO FOR WITCHCRAFT TRIALS", "THEY THREW THE WITCHES IN THE WELL. IF THEY DROWNED THEY WERE REAL WITCHES. IF THEY DIDN'T, THEY WEREN'T", "WE THREW ONE ONCE AND SHE DIDN'T DROWN, I GUESS SHE WASN'T A WITCH", - "ANYWAY. THERE IS YOUR BREW. HOWEVER, I ONLY GOT TO MAKE ENOUGH JUST FOR ONE PERSON", + "ANYWAY. THERE IS YOUR BREW. HOWEVER, I ONLY GOT TO MAKE ENOUGH FOR ONE PERSON", // 55 "YOU'D BETTER SMOKE IT RIGHT BEFORE YOU FIGHT AGAINST DRASCULA", "COME ON, RUN!", @@ -5076,9 +5076,9 @@ const char *_textvb[][63] = { "ARE YOU JOHN HACKER? I'M DOCTOR VON BRAUN", "LISTEN TO ME, THIS IS VERY IMPORTANT. IT'S ABOUT THE BREW", // 60 - "SHUT UP AND LET ME TALK. I JUST FOUND THIS BOOK ABOUT ANTI-VAMPIRE BREWS WARNING AGAINST MIXING THE JOINT WITH ANY ALCOHOLIC DRINK BEFORE YOU", - "ALCOHOL REACTS WHEN MIXED WITH BREW, SO THAT IT CANCELS OUT ITS EFFECTS JUST IN A FEW SECONDS", - "I'M SORRY, BUT I HAVE TO HANG UP RIGHT NOW. THE POLICE IS LOOKING FOR ME, THEY THINK I'M A PUSHER. STUPIDS!. ANYWAY, BYE AND GOOD LUCK SAVING THE WORLD!", + "SHUT UP AND LET ME TALK. I JUST FOUND THIS BOOK ABOUT ANTI-VAMPIRE BREWS WARNING AGAINST MIXING THE CIGARETTE WITH ANY ALCOHOLIC DRINK BEFORE YOU", + "ALCOHOL REACTS WHEN MIXED WITH BREW, SO THAT IT CANCELS OUT ITS EFFECTS IN A FEW SECONDS", + "I'M SORRY, BUT I HAVE TO HANG UP RIGHT NOW. THE POLICE ARE LOOKING FOR ME, THEY THINK I'M A DRUG PUSHER. IDIOTS!. ANYWAY, BYE AND GOOD LUCK SAVING THE WORLD!", }, { // 0 @@ -5432,10 +5432,10 @@ const char *_textsys[][4] = { const char *_texthis[][5] = { { "", - "A long time ago, it seems that Drascula killed Von Braun's wife, and then, as he intended to face the count, Von Braun started to investigate all he found vampires.", + "A long time ago, it seems that Drascula killed Von Braun's wife, and then, as he intended to face the count, Von Braun started to research all he could find on vampires.", "When he thought he was ready, he came up to the castle and had a very violent encounter with Drascula.", "Nobody knows exactly what happened there. Although Von Braun lost, Drascula could not kill him.", - "Von Braun felt humiliated by his defect, run away from the castle and has never dared to face Drascula ever again.", + "Von Braun felt humiliated by his defeat, he run away from the castle and has never dared to face Drascula again.", }, { "", -- cgit v1.2.3 From c3c695792c4e0c769cb3a30585ff48f4b6d6519a Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 31 May 2008 18:33:56 +0000 Subject: Use --enable-auto-import when linking dynamic plugins with MinGW. svn-id: r32427 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 35db11f6aa..960ed4063f 100755 --- a/configure +++ b/configure @@ -1307,7 +1307,7 @@ PLUGIN_PREFIX := PLUGIN_SUFFIX := .dll PLUGIN_EXTRA_DEPS = $(EXECUTABLE) CXXFLAGS += -DDYNAMIC_MODULES -PLUGIN_LDFLAGS := -shared ./libscummvm.a +PLUGIN_LDFLAGS := -Wl,--enable-auto-import -shared ./libscummvm.a PRE_OBJS_FLAGS := -Wl,--whole-archive POST_OBJS_FLAGS := -Wl,--export-all-symbols -Wl,--no-whole-archive -Wl,--out-implib,./libscummvm.a ' -- cgit v1.2.3 From bd9671ba246b3d45a5c2d8311d1e800b633f3210 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 31 May 2008 19:02:35 +0000 Subject: Fixing various warnings in the DS port svn-id: r32428 --- backends/platform/ds/arm9/source/cdaudio.cpp | 4 ++-- backends/platform/ds/arm9/source/dsmain.cpp | 11 +++++------ backends/platform/ds/arm9/source/fat/disc_io.h | 2 +- backends/platform/ds/arm9/source/gbampsave.cpp | 6 +++--- backends/platform/ds/arm9/source/gbampsave.h | 4 ++-- backends/platform/ds/arm9/source/osystem_ds.cpp | 4 ++-- backends/platform/ds/arm9/source/ramsave.h | 4 ++-- backends/platform/ds/arm9/source/wordcompletion.h | 5 +---- 8 files changed, 18 insertions(+), 22 deletions(-) diff --git a/backends/platform/ds/arm9/source/cdaudio.cpp b/backends/platform/ds/arm9/source/cdaudio.cpp index 9569a820f2..56ac4e8c09 100644 --- a/backends/platform/ds/arm9/source/cdaudio.cpp +++ b/backends/platform/ds/arm9/source/cdaudio.cpp @@ -21,8 +21,8 @@ */ #include "cdaudio.h" -#include "ds-fs.h" -#include "config-manager.h" +#include "backends/fs/ds/ds-fs.h" +#include "common/config-manager.h" #include "dsmain.h" #include "NDS/scummvm_ipc.h" #include "console2.h" diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index efa60015fb..c03a6b3e71 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -74,9 +74,9 @@ #include "system.h" #include "osystem_ds.h" #include "icons_raw.h" -#include "gba_nds_fat.h" -#include "disc_io.h" -#include "config-manager.h" +#include "fat/gba_nds_fat.h" +#include "fat/disc_io.h" +#include "common/config-manager.h" #include "engines/scumm/scumm.h" #include "keyboard_raw.h" #include "keyboard_pal_raw.h" @@ -89,14 +89,13 @@ #include "user_debugger.h" #endif #include "ramsave.h" -#include "disc_io.h" #include "blitters.h" #include "cartreset_nolibfat.h" #include "keys.h" #ifdef USE_PROFILER #include "profiler/cyg-profile.h" #endif -#include "ds-fs.h" +#include "backends/fs/ds/ds-fs.h" namespace DS { @@ -749,7 +748,7 @@ void displayMode16Bit() { if (displayModeIs8Bit) { - static int test = 0; +// static int test = 0; // consolePrintf("saving buffer... %d\n", test++); saveGameBackBuffer(); for (int r = 0; r < 32 * 32; r++) { diff --git a/backends/platform/ds/arm9/source/fat/disc_io.h b/backends/platform/ds/arm9/source/fat/disc_io.h index 05d4c020bd..2d3da1fc6f 100644 --- a/backends/platform/ds/arm9/source/fat/disc_io.h +++ b/backends/platform/ds/arm9/source/fat/disc_io.h @@ -53,7 +53,7 @@ //---------------------------------------------------------------------- #if defined _CF_USE_DMA && defined _CF_ALLOW_UNALIGNED - #error You can't use both DMA and unaligned memory + #error You can not use both DMA and unaligned memory #endif // When compiling for NDS, make sure NDS is defined diff --git a/backends/platform/ds/arm9/source/gbampsave.cpp b/backends/platform/ds/arm9/source/gbampsave.cpp index ca4e617e29..9c8af81a6e 100644 --- a/backends/platform/ds/arm9/source/gbampsave.cpp +++ b/backends/platform/ds/arm9/source/gbampsave.cpp @@ -21,9 +21,9 @@ */ #include "gbampsave.h" -#include "gba_nds_fat.h" -#include "ds-fs.h" -#include "config-manager.h" +#include "fat/gba_nds_fat.h" +#include "backends/fs/ds/ds-fs.h" +#include "common/config-manager.h" ///////////////////////// // GBAMP Save File diff --git a/backends/platform/ds/arm9/source/gbampsave.h b/backends/platform/ds/arm9/source/gbampsave.h index e9188b5312..d0cbc68bfd 100644 --- a/backends/platform/ds/arm9/source/gbampsave.h +++ b/backends/platform/ds/arm9/source/gbampsave.h @@ -23,8 +23,8 @@ #ifndef _GBAMPSAVE_H_ #define _GBAMPSAVE_H_ -#include "system.h" -#include "ds-fs.h" +#include "common/system.h" +#include "backends/fs/ds/ds-fs.h" #define SAVE_BUFFER_SIZE 100000 diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index 1d8d39dcab..330d09403d 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -32,12 +32,12 @@ #include "nds.h" #include "dsmain.h" #include "nds/registers_alt.h" -#include "config-manager.h" +#include "common/config-manager.h" #include "common/str.h" #include "cdaudio.h" #include "graphics/surface.h" #include "touchkeyboard.h" -#include "ds-fs-factory.h" +#include "backends/fs/ds/ds-fs-factory.h" OSystem_DS* OSystem_DS::_instance = NULL; diff --git a/backends/platform/ds/arm9/source/ramsave.h b/backends/platform/ds/arm9/source/ramsave.h index 6add649f56..f919da18db 100644 --- a/backends/platform/ds/arm9/source/ramsave.h +++ b/backends/platform/ds/arm9/source/ramsave.h @@ -23,8 +23,8 @@ #ifndef _RAMSAVE_H_ #define _RAMSAVE_H_ -#include "system.h" -#include "savefile.h" +#include "common/system.h" +#include "common/savefile.h" // SaveFileManager class diff --git a/backends/platform/ds/arm9/source/wordcompletion.h b/backends/platform/ds/arm9/source/wordcompletion.h index 39be8511bf..980277d6bb 100644 --- a/backends/platform/ds/arm9/source/wordcompletion.h +++ b/backends/platform/ds/arm9/source/wordcompletion.h @@ -1,10 +1,7 @@ - - - namespace DS { extern bool findWordCompletions(char* input); extern void addAutoCompleteLine(char* line); extern void sortAutoCompleteWordList(); -} \ No newline at end of file +} -- cgit v1.2.3 From 29cac0258f2d9825c9473c151e0ba1c40a5549f4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 31 May 2008 19:05:45 +0000 Subject: DS: registers_alt.h is not neede with current libnds; added a FIXME svn-id: r32429 --- backends/platform/ds/arm7/source/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backends/platform/ds/arm7/source/main.cpp b/backends/platform/ds/arm7/source/main.cpp index 0e31204ef7..bee39f1efe 100644 --- a/backends/platform/ds/arm7/source/main.cpp +++ b/backends/platform/ds/arm7/source/main.cpp @@ -36,7 +36,7 @@ #include #include #include -#include +//#include // not needed in current libnds #include ////////////////////////////////////////////////////////////////////// #ifdef USE_DEBUGGER @@ -261,6 +261,9 @@ uint16 powerManagerWrite(uint32 command, u32 data, bool enable) { REG_SPICNT = SPI_ENABLE | SPI_BAUD_1MHz; REG_SPIDATA = enable? (result | data): (result & ~data); SerialWaitBusy(); + + // FIXME: This function should either return something, or have a comment + // explaining why it is valid for it to not return something. :-) } /* -- cgit v1.2.3 From 0f64d7236c43ed1027439ee208bc394809d4ef15 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 31 May 2008 19:06:50 +0000 Subject: DS: Fixed a warning; simplified & fixed the way scummvm_main gets invoked svn-id: r32430 --- backends/platform/ds/arm9/source/dsmain.cpp | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index c03a6b3e71..ab68df8f7a 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -2430,7 +2430,7 @@ u8 fastRamData[FAST_RAM_SIZE] ITCM_DATA; void* fastRamAlloc(int size) { // return malloc(size); - void* result = fastRamPointer; + void* result = (void *) fastRamPointer; fastRamPointer += size; if(fastRamPointer > fastRamData + FAST_RAM_SIZE) { consolePrintf("FastRam (ITCM) allocation failed!\n"); @@ -2824,33 +2824,25 @@ int main(void) //printf("'%s'", Common::ConfigManager::kApplicationDomain.c_str()); #if defined(DS_BUILD_A) - char* argv[2] = {"/scummvmds", "--config=scummvm.ini"}; + const char *argv[] = {"/scummvmds"}; #elif defined(DS_BUILD_B) - char* argv[2] = {"/scummvmds", "--config=scummvmb.ini"}; + const char *argv[] = {"/scummvmds", "--config=scummvmb.ini"}; #elif defined(DS_BUILD_C) - char* argv[2] = {"/scummvmds", "--config=scummvmc.ini"}; + const char *argv[] = {"/scummvmds", "--config=scummvmc.ini"}; #elif defined(DS_BUILD_D) - char* argv[3] = {"/scummvmds", "--config=scummvmd.ini"}; + const char *argv[] = {"/scummvmds", "--config=scummvmd.ini"}; #elif defined(DS_BUILD_E) - char* argv[3] = {"/scummvmds", "--config=scummvme.ini"}; + const char *argv[] = {"/scummvmds", "--config=scummvme.ini"}; #elif defined(DS_BUILD_F) - char* argv[3] = {"/scummvmds", "--config=scummvmf.ini"}; + const char *argv[] = {"/scummvmds", "--config=scummvmf.ini"}; #elif defined(DS_BUILD_G) - char* argv[3] = {"/scummvmds", "--config=scummvmg.ini"}; + const char *argv[] = {"/scummvmds", "--config=scummvmg.ini"}; #endif -#ifdef DS_NON_SCUMM_BUILD - - while (1) { - scummvm_main(2, (char **) &argv); - powerOff(); - } -#else while (1) { - scummvm_main(1, (char **) &argv); + scummvm_main(ARRAYSIZE(argv), (char **) &argv); powerOff(); } -#endif return 0; } -- cgit v1.2.3 From c27f261b0bf262c58276c36c658817a2805af18b Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 31 May 2008 19:08:52 +0000 Subject: DS: Use DEVKITPRO env var to find DevKitPro files, as the DevKitPro manual suggests; it does not make sense to hardcode Neil's development environment paths by default svn-id: r32431 --- backends/platform/ds/arm7/Makefile | 3 ++- backends/platform/ds/arm9/makefile | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/backends/platform/ds/arm7/Makefile b/backends/platform/ds/arm7/Makefile index e6a190b1ce..72987512ef 100644 --- a/backends/platform/ds/arm7/Makefile +++ b/backends/platform/ds/arm7/Makefile @@ -68,7 +68,8 @@ endif # list of directories containing libraries, this must be the top level containing # include and lib #--------------------------------------------------------------------------------- -LIBDIRS := /home/neil/devkitpror21/libnds home/neil/devkitpror21/libnds/nds +#LIBDIRS := /home/neil/devkitpror21/libnds home/neil/devkitpror21/libnds/nds +LIBDIRS := $(DEVKITPRO)/libnds #--------------------------------------------------------------------------------- diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index aefd8c091e..e50ba30f32 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -1,6 +1,6 @@ #DYNAMIC_MODULES = 1 -#libndsdir = $(DEVKITPRO)/libnds -libndsdir = /home/neil/devkitpror21/libnds +libndsdir = $(DEVKITPRO)/libnds +#libndsdir = /home/neil/devkitpror21/libnds # Select the build you want by uncommenting one of the following lines: @@ -34,7 +34,7 @@ ifeq ($(SCUMM_BUILD),g) DS_BUILD_G = 1 endif -DS_BUILD_A = 1 +#DS_BUILD_A = 1 #DS_BUILD_B = 1 #DS_BUILD_C = 1 #DS_BUILD_D = 1 -- cgit v1.2.3 From fb5ea14e4e5f4f078d51a7ffb901070f091d5eaf Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 31 May 2008 19:24:26 +0000 Subject: DS: The SpriteEntry::atributes array has only 3 elements; also removed some apparently not needed #includes svn-id: r32432 --- backends/platform/ds/arm9/source/dsmain.cpp | 7 +++---- backends/platform/ds/arm9/source/osystem_ds.cpp | 1 - backends/platform/ds/arm9/source/ramsave.cpp | 1 - 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/backends/platform/ds/arm9/source/dsmain.cpp b/backends/platform/ds/arm9/source/dsmain.cpp index ab68df8f7a..a130509e36 100644 --- a/backends/platform/ds/arm9/source/dsmain.cpp +++ b/backends/platform/ds/arm9/source/dsmain.cpp @@ -71,7 +71,6 @@ #include #include "dsmain.h" #include "string.h" -#include "system.h" #include "osystem_ds.h" #include "icons_raw.h" #include "fat/gba_nds_fat.h" @@ -359,14 +358,14 @@ void initSprites() { sprites[i].attribute[0] = ATTR0_DISABLED; sprites[i].attribute[1] = 0; sprites[i].attribute[2] = 0; - sprites[i].attribute[3] = 0; + sprites[i].filler = 0; } for (int i = 0; i < 128; i++) { spritesMain[i].attribute[0] = ATTR0_DISABLED; spritesMain[i].attribute[1] = 0; spritesMain[i].attribute[2] = 0; - spritesMain[i].attribute[3] = 0; + spritesMain[i].filler = 0; } updateOAM(); @@ -1611,7 +1610,7 @@ void updateStatus() { // spritesMain[0].attribute[0] = ATTR0_DISABLED; // spritesMain[0].attribute[1] = 0; // spritesMain[0].attribute[2] = 0; -// spritesMain[0].attribute[3] = 0; +// spritesMain[0].filler = 0; setIconMain(0, 0, 0, 0, 0, false); } diff --git a/backends/platform/ds/arm9/source/osystem_ds.cpp b/backends/platform/ds/arm9/source/osystem_ds.cpp index 330d09403d..6e6b457115 100644 --- a/backends/platform/ds/arm9/source/osystem_ds.cpp +++ b/backends/platform/ds/arm9/source/osystem_ds.cpp @@ -22,7 +22,6 @@ #include "common/scummsys.h" #include "common/system.h" -#include "system.h" #include "common/util.h" #include "common/rect.h" diff --git a/backends/platform/ds/arm9/source/ramsave.cpp b/backends/platform/ds/arm9/source/ramsave.cpp index f8e005647e..be355ce76f 100644 --- a/backends/platform/ds/arm9/source/ramsave.cpp +++ b/backends/platform/ds/arm9/source/ramsave.cpp @@ -20,7 +20,6 @@ * */ // Save in order 1,2,3,4,larger 2,5 -#include "system.h" #include "ramsave.h" #include "nds.h" #include "compressor/lz.h" -- cgit v1.2.3 From a00bfba616b4f2aced3381d32a2e039b621e192c Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 31 May 2008 19:24:50 +0000 Subject: DS: Removed some pointless -I compiler directives svn-id: r32433 --- backends/platform/ds/arm9/makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index e50ba30f32..411813d467 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -187,9 +187,9 @@ endif LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -Wl,--wrap,time -mno-fpu -Wl,-Map,map.txt -INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)/source -I$(portdir)/source/compressor -I$(portdir)/source/fat \ - -I$(srcdir)/backends/fs -I$(srcdir)/backends/fs/ds -I$(portdir)/data -I$(libndsdir)/include -I$(portdir)/../commoninclude\ - -I$(srcdir)/scumm -I$(libndsdir)/include -I$(libndsdir)/include/nds -I$(srcdir)/engines -I$(portdir)/source/mad\ +INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)/source \ + -I$(portdir)/data -I$(libndsdir)/include -I$(portdir)/../commoninclude\ + -I$(libndsdir)/include -I$(libndsdir)/include/nds -I$(srcdir)/engines -I$(portdir)/source/mad\ -I$(portdir)/source/libcartreset -include $(srcdir)/common/scummsys.h -- cgit v1.2.3 From 4ed41d0a16ea626a8412b07af075080744a19797 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 31 May 2008 19:29:12 +0000 Subject: DS: Adjust some compiler warnings svn-id: r32434 --- backends/platform/ds/arm9/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index 411813d467..9c9419d8b2 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -164,7 +164,7 @@ ifdef USE_PROFILER DEFINES += -DUSE_PROFILER endif -CXXFLAGS= $(CFLAGS) -Wno-non-virtual-dtor -Wno-non-virtual-dtor \ +CXXFLAGS= $(CFLAGS) -Wno-non-virtual-dtor -Wno-unknown-pragmas -Wno-reorder \ -fno-exceptions -fno-rtti -mthumb-interwork # -mthumb -- cgit v1.2.3 From 63cb8227d30ea6a80084b545ec1662c7d99cd1f3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 31 May 2008 19:35:37 +0000 Subject: Avoid some warnings when compiling in non-DEBUG mode (i.e. with assert() disabled) svn-id: r32435 --- sound/audiostream.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp index 4454a09fe6..588c49ebec 100644 --- a/sound/audiostream.cpp +++ b/sound/audiostream.cpp @@ -134,17 +134,19 @@ public: : _ptr(ptr), _end(ptr+len), _loopPtr(0), _loopEnd(0), _rate(rate), _playtime(calculatePlayTime(rate, len / (is16Bit ? 2 : 1) / (stereo ? 2 : 1))) { // Verify the buffer sizes are sane - if (is16Bit && stereo) + if (is16Bit && stereo) { assert((len & 3) == 0 && (loopLen & 3) == 0); - else if (is16Bit || stereo) + } else if (is16Bit || stereo) { assert((len & 1) == 0 && (loopLen & 1) == 0); + } if (loopLen) { _loopPtr = _ptr + loopOffset; _loopEnd = _loopPtr + loopLen; } - if (stereo) // Stereo requires even sized data + if (stereo) { // Stereo requires even sized data assert(len % 2 == 0); + } _origPtr = autoFreeMemory ? ptr : 0; } @@ -329,10 +331,11 @@ void AppendableMemoryStream::queueBuffer(byte Common::StackLock lock(_mutex); // Verify the buffer size is sane - if (is16Bit && stereo) + if (is16Bit && stereo) { assert((size & 3) == 0); - else if (is16Bit || stereo) + } else if (is16Bit || stereo) { assert((size & 1) == 0); + } // Verify that the stream has not yet been finalized (by a call to finish()) assert(!_finalized); -- cgit v1.2.3 From 93c107f46ae93e603c6f18b0a83c8b821a82976d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 31 May 2008 19:37:19 +0000 Subject: DS: Fix compilation rule in Makefile to not compile everything twice svn-id: r32436 --- backends/platform/ds/arm9/makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index 9c9419d8b2..df9a7002b6 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -365,8 +365,7 @@ else # echo !!!!!!!! $(OPTFLAG) $(MKDIR) $(*D)/$(DEPDIR) - $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o - $(CXX) -MMD -MF "$(*D)/$(DEPDIR)/$(*F).d" $(if $(findstring $(notdir $<), $(OPTLIST)), $(OPT_SPEED), $(OPT_SIZE)) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o + $(CXX) -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d",-MQ,"$@",-MP $(if $(findstring $(notdir $<), $(OPTLIST)), $(OPT_SPEED), $(OPT_SIZE)) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o endif -- cgit v1.2.3 From 97348d5f44fc56f5073f301140094438530eb021 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sat, 31 May 2008 19:39:42 +0000 Subject: DS: make sure DEPDIR and srcdir are inited, so that *.d files end up in the right spot svn-id: r32437 --- backends/platform/ds/arm9/makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index df9a7002b6..03fea92dc1 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -1,3 +1,6 @@ +srcdir ?= . +DEPDIR := .deps + #DYNAMIC_MODULES = 1 libndsdir = $(DEVKITPRO)/libnds #libndsdir = /home/neil/devkitpror21/libnds -- cgit v1.2.3 From dd79ed10114d552ce9932331d9e4023af6e8dfa1 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 31 May 2008 20:18:43 +0000 Subject: Added ADGF_CD to Italian fan translation of kyra1 cd. svn-id: r32438 --- engines/kyra/detection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp index a3ca2f829e..344121b503 100644 --- a/engines/kyra/detection.cpp +++ b/engines/kyra/detection.cpp @@ -282,7 +282,7 @@ const KYRAGameDescription adGameDescs[] = { AD_ENTRY1("GEMCUT.PAK", "d8327fc4b7a72b23c900fa13aef4093a"), Common::IT_ITA, Common::kPlatformPC, - Common::ADGF_NO_FLAGS + Common::ADGF_CD }, KYRA1_CD_FLAGS }, -- cgit v1.2.3 From 4ef680abaf3c81b061090061a69ec5ff13d71ae5 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 31 May 2008 20:48:41 +0000 Subject: - Fixed possible invalid memory access in Resource::loadFileToBuf - Reworked compressed installer files handling - Updated HoF installer file code (thanks to _athrxx for that) svn-id: r32439 --- engines/kyra/kyra_hof.cpp | 2 - engines/kyra/resource.cpp | 633 ++++++++++++++++++----------------------- engines/kyra/resource.h | 40 ++- engines/kyra/sequences_hof.cpp | 2 - 4 files changed, 302 insertions(+), 375 deletions(-) diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 9c5548c1f7..14bbc574fc 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -287,8 +287,6 @@ int KyraEngine_HoF::go() { if (_menuChoice != 4) { // load just the pak files needed for ingame _res->loadPakFile(StaticResource::staticDataFilename()); - if (_flags.useInstallerPackage) - _res->loadPakFile("WESTWOOD.001"); if (_flags.platform == Common::kPlatformPC && _flags.isTalkie) _res->loadFileList("FILEDATA.FDT"); else diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 6b38a0f907..145f4dd295 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -32,8 +32,6 @@ #include "kyra/resource.h" -#define INS_CACHE_THRESHOLD 300000 // all files with file size greater than this will be cached - namespace Kyra { Resource::Resource(KyraEngine_v1 *vm) : _loaders(), _map(), _vm(vm) { @@ -43,9 +41,13 @@ Resource::Resource(KyraEngine_v1 *vm) : _loaders(), _map(), _vm(vm) { Resource::~Resource() { _map.clear(); _loaders.clear(); + + clearCompFileList(); + _compLoaders.clear(); } bool Resource::reset() { + clearCompFileList(); unloadAllPakFiles(); FilesystemNode dir(ConfMan.get("path")); @@ -69,7 +71,7 @@ bool Resource::reset() { loadPakFile("CHAPTER1.VRM"); } else if (_vm->game() == GI_KYRA2) { if (_vm->gameFlags().useInstallerPackage) - loadPakFile("WESTWOOD.001"); + tryLoadCompFiles(); // mouse pointer, fonts, etc. required for initializing if (_vm->gameFlags().isDemo && !_vm->gameFlags().isTalkie) { @@ -89,6 +91,7 @@ bool Resource::reset() { } else if (_vm->game() == GI_KYRA3) { if (_vm->gameFlags().useInstallerPackage) loadPakFile("WESTWOOD.001"); + // Add default file directories Common::File::addDefaultDirectory(ConfMan.get("path") + "malcolm"); Common::File::addDefaultDirectory(ConfMan.get("path") + "MALCOLM"); @@ -153,6 +156,7 @@ bool Resource::loadPakFile(const Common::String &filename) { const ResArchiveLoader *loader = getLoader(iter->_value.type); if (!loader) { + assert(loader); error("no archive loader for file '%s' found which is of type %d", filename.c_str(), iter->_value.type); return false; } @@ -264,6 +268,13 @@ void Resource::unloadPakFile(const Common::String &filename) { } } +void Resource::clearCompFileList() { + for (CompFileMap::iterator i = _compFiles.begin(); i != _compFiles.end(); ++i) + delete[] i->_value.data; + + _compFiles.clear(); +} + bool Resource::isInPakList(const Common::String &filename) { if (!isAccessable(filename)) return false; @@ -304,6 +315,8 @@ bool Resource::exists(const char *file, bool errorOutOnFail) { } uint32 Resource::getFileSize(const char *file) { + CompFileMap::iterator compEntry; + if (Common::File::exists(file)) { Common::File f; if (f.open(file)) @@ -325,12 +338,14 @@ bool Resource::loadFileToBuf(const char *file, void *buf, uint32 maxSize) { return false; memset(buf, 0, maxSize); - stream->read(buf, stream->size()); + stream->read(buf, (maxSize <= stream->size()) ? maxSize : stream->size()); delete stream; return true; } Common::SeekableReadStream *Resource::getFileStream(const Common::String &file) { + CompFileMap::iterator compEntry; + if (Common::File::exists(file)) { Common::File *stream = new Common::File(); if (!stream->open(file)) { @@ -339,6 +354,8 @@ Common::SeekableReadStream *Resource::getFileStream(const Common::String &file) error("Couldn't open file '%s'", file.c_str()); } return stream; + } else if ((compEntry = _compFiles.find(file)) != _compFiles.end()) { + return new Common::MemoryReadStream(compEntry->_value.data, compEntry->_value.size, false); } else { if (!isAccessable(file)) return 0; @@ -387,19 +404,35 @@ bool Resource::isAccessable(const Common::String &file) { } void Resource::checkFile(const Common::String &file) { - if (_map.find(file) == _map.end() && Common::File::exists(file)) { - Common::File temp; - if (temp.open(file)) { + if (_map.find(file) == _map.end()) { + CompFileMap::const_iterator iter; + + if (Common::File::exists(file)) { + Common::File temp; + if (temp.open(file)) { + ResFileEntry entry; + entry.parent = ""; + entry.size = temp.size(); + entry.mounted = file.compareToIgnoreCase(StaticResource::staticDataFilename()) != 0; + entry.preload = false; + entry.prot = false; + entry.type = ResFileEntry::kAutoDetect; + entry.offset = 0; + _map[file] = entry; + temp.close(); + + detectFileTypes(); + } + } else if ((iter = _compFiles.find(file)) != _compFiles.end()) { ResFileEntry entry; entry.parent = ""; - entry.size = temp.size(); - entry.mounted = file.compareToIgnoreCase(StaticResource::staticDataFilename()) != 0; + entry.size = iter->_value.size; + entry.mounted = false; entry.preload = false; entry.prot = false; entry.type = ResFileEntry::kAutoDetect; entry.offset = 0; _map[file] = entry; - temp.close(); detectFileTypes(); } @@ -436,6 +469,13 @@ void Resource::detectFileTypes() { } } +void Resource::tryLoadCompFiles() { + for (CCompLoaderIterator i = _compLoaders.begin(); i != _compLoaders.end(); ++i) { + if ((*i)->checkForFiles()) + (*i)->loadFile(_compFiles); + } +} + #pragma mark - #pragma mark - ResFileLodaer #pragma mark - @@ -582,7 +622,7 @@ Common::SeekableReadStream *ResLoaderPak::loadFileFromArchive(const Common::Stri return stream; } -class ResLoaderInsKyra : public ResArchiveLoader { +class ResLoaderInsMalcolm : public ResArchiveLoader { public: bool checkFilename(Common::String filename) const; bool isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const; @@ -590,26 +630,169 @@ public: Common::SeekableReadStream *loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const; ResFileEntry::kType getType() const { - return ResFileEntry::kInsKyra; + return ResFileEntry::kInsMal; } }; -bool ResLoaderInsKyra::checkFilename(Common::String filename) const { - return false; +bool ResLoaderInsMalcolm::checkFilename(Common::String filename) const { + filename.toUppercase(); + if (!filename.hasSuffix(".001")) + return false; + return true; } -bool ResLoaderInsKyra::isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const { +bool ResLoaderInsMalcolm::isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const { + stream.seek(3); + uint32 size = stream.readUint32LE(); + + if (size+7 > stream.size()) + return false; + + stream.seek(size+5, SEEK_SET); + uint8 buffer[2]; + stream.read(&buffer, 2); + + return (buffer[0] == 0x0D && buffer[1] == 0x0A); +} + +bool ResLoaderInsMalcolm::loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const { + Common::List filenames; + + // thanks to eriktorbjorn for this code (a bit modified though) + stream.seek(3, SEEK_SET); + + // first file is the index table + uint32 size = stream.readUint32LE(); + Common::String temp = ""; + + for (uint32 i = 0; i < size; ++i) { + byte c = stream.readByte(); + + if (c == '\\') { + temp = ""; + } else if (c == 0x0D) { + // line endings are CRLF + c = stream.readByte(); + assert(c == 0x0A); + ++i; + + filenames.push_back(temp); + } else { + temp += (char)c; + } + } + + stream.seek(3, SEEK_SET); + + for (Common::List::iterator file = filenames.begin(); file != filenames.end(); ++file) { + ResFileEntry entry; + entry.parent = filename; + entry.type = ResFileEntry::kAutoDetect; + entry.mounted = false; + entry.preload = false; + entry.prot = false; + entry.size = stream.readUint32LE(); + entry.offset = stream.pos(); + stream.seek(entry.size, SEEK_CUR); + files.push_back(File(*file, entry)); + } + return true; } -bool ResLoaderInsKyra::loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const { +Common::SeekableReadStream *ResLoaderInsMalcolm::loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const { + assert(archive); + + archive->seek(entry.offset, SEEK_SET); + Common::SeekableSubReadStream *stream = new Common::SeekableSubReadStream(archive, entry.offset, entry.offset + entry.size, true); + assert(stream); + return stream; +} + +class ResLoaderTlk : public ResArchiveLoader { +public: + bool checkFilename(Common::String filename) const; + bool isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const; + bool loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const; + Common::SeekableReadStream *loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const; + + ResFileEntry::kType getType() const { + return ResFileEntry::kTlk; + } + +private: + static bool sortTlkFileList(const File &l, const File &r); + static FileList::const_iterator nextFile(const FileList &list, FileList::const_iterator iter); +}; + +bool ResLoaderTlk::checkFilename(Common::String filename) const { + filename.toUppercase(); + return (filename.hasSuffix(".TLK")); +} + +bool ResLoaderTlk::isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const { + uint16 entries = stream.readUint16LE(); + uint32 entryTableSize = (entries * 8); + + if (entryTableSize + 2 > stream.size()) + return false; + + uint32 offset = 0; + + for (uint i = 0; i < entries; ++i) { + stream.readUint32LE(); + offset = stream.readUint32LE(); + + if (offset > stream.size()) + return false; + } + return true; } -Common::SeekableReadStream *ResLoaderInsKyra::loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const { - return 0; +bool ResLoaderTlk::loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const { + uint16 entries = stream.readUint16LE(); + + for (uint i = 0; i < entries; ++i) { + ResFileEntry entry; + entry.parent = filename; + entry.type = ResFileEntry::kAutoDetect; + entry.mounted = false; + entry.preload = false; + entry.prot = false; + + uint32 resFilename = stream.readUint32LE(); + uint32 resOffset = stream.readUint32LE(); + + entry.offset = resOffset+4; + + char realFilename[20]; + snprintf(realFilename, 20, "%u.AUD", resFilename); + + uint32 curOffset = stream.pos(); + stream.seek(resOffset, SEEK_SET); + entry.size = stream.readUint32LE(); + stream.seek(curOffset, SEEK_SET); + + files.push_back(FileList::value_type(realFilename, entry)); + } + + return true; } +Common::SeekableReadStream *ResLoaderTlk::loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const { + assert(archive); + + archive->seek(entry.offset, SEEK_SET); + Common::SeekableSubReadStream *stream = new Common::SeekableSubReadStream(archive, entry.offset, entry.offset + entry.size, true); + assert(stream); + return stream; +} + +#pragma mark - +#pragma mark - CompFileLoader +#pragma mark - + class FileExpanderSource { public: FileExpanderSource(const uint8 *data) : _dataPtr(data), _bitsLeft(8), _key(0), _index(0) {} @@ -1021,120 +1204,50 @@ uint8 FileExpander::calcCmdAndIndex(const uint8 *tbl, int16 ¶) { return newIndex; } -class FileCache { +class CompLoaderInsHof : public CompArchiveLoader { public: - FileCache() : _size(0) {} - ~FileCache() {} - - void add(ResFileEntry entry, const uint8 *data); - bool getData(ResFileEntry entry, uint8 *dst); - void flush(); + bool checkForFiles() const; + bool loadFile(CompFileMap &loadTo) const; private: - struct FileCacheEntry { - ResFileEntry entry; - const uint8 *data; + struct FileEntry : public ResFileEntry { + int fileIndex; + uint32 compressedSize; }; - - Common::List _cachedFileList; - uint32 _size; -}; - -void FileCache::add(ResFileEntry entry, const uint8 *data) { - FileCacheEntry fileCacheEntry; - fileCacheEntry.entry.compressedSize = entry.compressedSize; - fileCacheEntry.entry.mounted = entry.mounted; - fileCacheEntry.entry.offset = entry.offset; - fileCacheEntry.entry.parent = entry.parent; - fileCacheEntry.entry.preload = entry.preload; - fileCacheEntry.entry.prot = entry.prot; - fileCacheEntry.entry.size = entry.size; - fileCacheEntry.entry.type = entry.type; - fileCacheEntry.entry.fileIndex = entry.fileIndex; - uint8 *dst = new uint8[entry.size]; - assert(dst); - memcpy(dst, data, entry.size); - fileCacheEntry.data = dst; - _cachedFileList.push_back(fileCacheEntry); - _size += entry.size; -} - -bool FileCache::getData(ResFileEntry entry, uint8 *dst) { - for (Common::List::const_iterator c = _cachedFileList.begin(); c != _cachedFileList.end(); ++c) { - if (c->entry.offset == entry.offset && c->entry.compressedSize == entry.compressedSize && - c->entry.fileIndex == entry.fileIndex && c->entry.size == entry.size) { - memcpy(dst, c->data, c->entry.size); - return true; - } - } - return false; -} - -void FileCache::flush() { - debug(1, "total amount of cache memory used: %d", _size); - for (Common::List::const_iterator c = _cachedFileList.begin(); c != _cachedFileList.end(); ++c) - delete[] c->data; - _cachedFileList.clear(); - _size = 0; -} - -class ResLoaderInsHof : public ResArchiveLoader { -public: - ResLoaderInsHof() {} - ~ResLoaderInsHof() { _fileCache.flush(); } - - bool checkFilename(Common::String filename) const; - bool isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const; - bool loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const; - Common::SeekableReadStream *loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const; - - ResFileEntry::kType getType() const { - return ResFileEntry::kInsHof; - } -private: - mutable FileCache _fileCache; -}; - -bool ResLoaderInsHof::checkFilename(Common::String filename) const { - filename.toUppercase(); - if (!filename.hasSuffix(".001")) - return false; - filename.insertChar('2', filename.size() - 1); - filename.deleteLastChar(); - if (!Common::File::exists(filename)) - return false; - return true; -} - -bool ResLoaderInsHof::isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const { - uint8 fileId = stream.readByte(); - uint32 size = stream.readUint32LE(); - if (size < stream.size() + 1) - return false; + struct Archive { + Common::String filename; + uint32 firstFile; + uint32 startOffset; + uint32 lastFile; + uint32 endOffset; + uint32 totalSize; + }; +}; - return (fileId == 1); +bool CompLoaderInsHof::checkForFiles() const { + return (Common::File::exists("WESTWOOD.001") && Common::File::exists("WESTWOOD.002")); } -bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const { +bool CompLoaderInsHof::loadFile(CompFileMap &loadTo) const { Common::File tmpFile; uint32 pos = 0; uint32 bytesleft = 0; bool startFile = true; - Common::String filenameBase(filename.c_str(), 10); + Common::String filenameBase = "WESTWOOD."; Common::String filenameTemp; char filenameExt[4]; while (filenameBase.lastChar() != '.') filenameBase.deleteLastChar(); - InsHofArchive newArchive; + Archive newArchive; - Common::List archives; + Common::List archives; - for (int8 currentFile = 1; currentFile; currentFile++) { + for (int8 currentFile = 1; currentFile; currentFile++) { sprintf(filenameExt, "%03d", currentFile); filenameTemp = filenameBase + Common::String(filenameExt); @@ -1189,14 +1302,22 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR } } - ResFileEntry newEntry; + CompFileEntry newEntry; + uint32 insize = 0; + uint32 outsize = 0; + uint8 *inbuffer = 0; + uint8 *outbuffer = 0; + uint32 inPart1 = 0; + uint32 inPart2 = 0; + Common::String entryStr; + pos = 0; const uint32 kExecSize = 0x0bba; const uint32 kHeaderSize = 30; const uint32 kHeaderSize2 = 46; - for (Common::List::iterator a = archives.begin(); a != archives.end(); ++a) { + for (Common::List::iterator a = archives.begin(); a != archives.end(); ++a) { startFile = true; for (uint32 i = a->firstFile; i != (a->lastFile + 1); i++) { sprintf(filenameExt, "%03d", i); @@ -1218,7 +1339,18 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR continue; } } else { - pos ++; + if (inPart2) { + tmpFile.seek(1); + tmpFile.read(inbuffer + inPart1, inPart2); + inPart2 = 0; + FileExpander().process(outbuffer, inbuffer, outsize, insize); + delete[] inbuffer; + inbuffer = 0; + newEntry.data = outbuffer; + newEntry.size = outsize; + loadTo[entryStr] = newEntry; + } + pos++; } while (pos < size) { @@ -1258,23 +1390,40 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR if (id == 0x04034B50) { if (hdr[8] != 8) error("compression type not implemented"); - newEntry.compressedSize = READ_LE_UINT32(hdr + 18); - newEntry.size = READ_LE_UINT32(hdr + 22); + insize = READ_LE_UINT32(hdr + 18); + outsize = READ_LE_UINT32(hdr + 22); uint16 filestrlen = READ_LE_UINT16(hdr + 26); *(hdr + 30 + filestrlen) = 0; + entryStr = Common::String((const char *)(hdr + 30)); pos += (kHeaderSize + filestrlen - m); + tmpFile.seek(pos); - newEntry.parent = filename; - newEntry.offset = pos; - newEntry.type = ResFileEntry::kAutoDetect; - newEntry.mounted = false; - newEntry.preload = false; - newEntry.prot = false; - newEntry.fileIndex = i; - files.push_back(File(Common::String((const char *)(hdr + 30)), newEntry)); + outbuffer = new uint8[outsize]; + assert(outbuffer); + + if (!inbuffer) { + inbuffer = new uint8[insize]; + assert(inbuffer); + } + + if ((pos + insize) > size) { + // this is for files that are split between two archive files + inPart1 = size - pos; + inPart2 = insize - inPart1; + tmpFile.read(inbuffer, inPart1); + } else { + tmpFile.read(inbuffer, insize); + inPart2 = 0; + FileExpander().process(outbuffer, inbuffer, insize, outsize); + delete[] inbuffer; + inbuffer = 0; + newEntry.data = outbuffer; + newEntry.size = outsize; + loadTo[entryStr] = newEntry; + } - pos += newEntry.compressedSize; + pos += insize; if (pos > size) { pos -= size; break; @@ -1288,247 +1437,18 @@ bool ResLoaderInsHof::loadFile(const Common::String &filename, Common::SeekableR } } - archives.clear(); - - return true; -} - -Common::SeekableReadStream *ResLoaderInsHof::loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const { - if (archive) { - delete archive; - archive = 0; - } - - uint8 *outbuffer = (uint8 *)malloc(entry.size); - assert(outbuffer); - - if (!_fileCache.getData(entry, outbuffer)) { - Common::File tmpFile; - char filename[13]; - sprintf(filename, "WESTWOOD.%03d", entry.fileIndex); - - if (!tmpFile.open(filename)) { - free(outbuffer); - return 0; - } - - tmpFile.seek(entry.offset); - - uint8 *inbuffer = new uint8[entry.compressedSize]; - assert(inbuffer); - - if ((entry.offset + entry.compressedSize) > tmpFile.size()) { - // this is for files that are split between two archive files - uint32 a = tmpFile.size() - entry.offset; - uint32 b = entry.compressedSize - a; - - tmpFile.read(inbuffer, a); - tmpFile.close(); - - filename[strlen(filename) - 1]++; - - if (!tmpFile.open(filename)) - return 0; - tmpFile.seek(1); - tmpFile.read(inbuffer + a, b); - } else { - tmpFile.read(inbuffer, entry.compressedSize); - } - - tmpFile.close(); - - FileExpander().process(outbuffer, inbuffer, entry.size, entry.compressedSize); - delete[] inbuffer; - - if (entry.size > INS_CACHE_THRESHOLD) - _fileCache.add(entry, outbuffer); - } - - Common::MemoryReadStream *stream = new Common::MemoryReadStream(outbuffer, entry.size, true); - assert(stream); - - return stream; -} - -class ResLoaderInsMalcolm : public ResArchiveLoader { -public: - bool checkFilename(Common::String filename) const; - bool isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const; - bool loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const; - Common::SeekableReadStream *loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const; - - ResFileEntry::kType getType() const { - return ResFileEntry::kInsMal; - } -}; - -bool ResLoaderInsMalcolm::checkFilename(Common::String filename) const { - filename.toUppercase(); - if (!filename.hasSuffix(".001")) - return false; - filename.insertChar('2', filename.size() - 1); - filename.deleteLastChar(); - if (Common::File::exists(filename)) - return false; + archives.clear(); return true; } -bool ResLoaderInsMalcolm::isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const { - stream.seek(3); - uint32 size = stream.readUint32LE(); - - if (size+7 > stream.size()) - return false; - - stream.seek(size+5, SEEK_SET); - uint8 buffer[2]; - stream.read(&buffer, 2); - - return (buffer[0] == 0x0D && buffer[1] == 0x0A); -} - -bool ResLoaderInsMalcolm::loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const { - Common::List filenames; - - // thanks to eriktorbjorn for this code (a bit modified though) - stream.seek(3, SEEK_SET); - - // first file is the index table - uint32 size = stream.readUint32LE(); - Common::String temp = ""; - - for (uint32 i = 0; i < size; ++i) { - byte c = stream.readByte(); - - if (c == '\\') { - temp = ""; - } else if (c == 0x0D) { - // line endings are CRLF - c = stream.readByte(); - assert(c == 0x0A); - ++i; - - filenames.push_back(temp); - } else { - temp += (char)c; - } - } - - stream.seek(3, SEEK_SET); - - for (Common::List::iterator file = filenames.begin(); file != filenames.end(); ++file) { - ResFileEntry entry; - entry.parent = filename; - entry.type = ResFileEntry::kAutoDetect; - entry.mounted = false; - entry.preload = false; - entry.prot = false; - entry.size = stream.readUint32LE(); - entry.offset = stream.pos(); - stream.seek(entry.size, SEEK_CUR); - files.push_back(File(*file, entry)); - } - - return true; -} - -Common::SeekableReadStream *ResLoaderInsMalcolm::loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const { - assert(archive); - - archive->seek(entry.offset, SEEK_SET); - Common::SeekableSubReadStream *stream = new Common::SeekableSubReadStream(archive, entry.offset, entry.offset + entry.size, true); - assert(stream); - return stream; -} - -class ResLoaderTlk : public ResArchiveLoader { -public: - bool checkFilename(Common::String filename) const; - bool isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const; - bool loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const; - Common::SeekableReadStream *loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const; - - ResFileEntry::kType getType() const { - return ResFileEntry::kTlk; - } - -private: - static bool sortTlkFileList(const File &l, const File &r); - static FileList::const_iterator nextFile(const FileList &list, FileList::const_iterator iter); -}; - -bool ResLoaderTlk::checkFilename(Common::String filename) const { - filename.toUppercase(); - return (filename.hasSuffix(".TLK")); -} - -bool ResLoaderTlk::isLoadable(const Common::String &filename, Common::SeekableReadStream &stream) const { - uint16 entries = stream.readUint16LE(); - uint32 entryTableSize = (entries * 8); - - if (entryTableSize + 2 > stream.size()) - return false; - - uint32 offset = 0; - - for (uint i = 0; i < entries; ++i) { - stream.readUint32LE(); - offset = stream.readUint32LE(); - - if (offset > stream.size()) - return false; - } - - return true; -} - -bool ResLoaderTlk::loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const { - uint16 entries = stream.readUint16LE(); - - for (uint i = 0; i < entries; ++i) { - ResFileEntry entry; - entry.parent = filename; - entry.type = ResFileEntry::kAutoDetect; - entry.mounted = false; - entry.preload = false; - entry.prot = false; - - uint32 resFilename = stream.readUint32LE(); - uint32 resOffset = stream.readUint32LE(); - - entry.offset = resOffset+4; - - char realFilename[20]; - snprintf(realFilename, 20, "%u.AUD", resFilename); - - uint32 curOffset = stream.pos(); - stream.seek(resOffset, SEEK_SET); - entry.size = stream.readUint32LE(); - stream.seek(curOffset, SEEK_SET); - - files.push_back(FileList::value_type(realFilename, entry)); - } - - return true; -} - -Common::SeekableReadStream *ResLoaderTlk::loadFileFromArchive(const Common::String &file, Common::SeekableReadStream *archive, const ResFileEntry entry) const { - assert(archive); - - archive->seek(entry.offset, SEEK_SET); - Common::SeekableSubReadStream *stream = new Common::SeekableSubReadStream(archive, entry.offset, entry.offset + entry.size, true); - assert(stream); - return stream; -} - #pragma mark - void Resource::initializeLoaders() { _loaders.push_back(LoaderList::value_type(new ResLoaderPak())); - _loaders.push_back(LoaderList::value_type(new ResLoaderInsKyra())); - _loaders.push_back(LoaderList::value_type(new ResLoaderInsHof())); _loaders.push_back(LoaderList::value_type(new ResLoaderInsMalcolm())); _loaders.push_back(LoaderList::value_type(new ResLoaderTlk())); + + _compLoaders.push_back(CompLoaderList::value_type(new CompLoaderInsHof())); } const ResArchiveLoader *Resource::getLoader(ResFileEntry::kType type) const { @@ -1542,3 +1462,4 @@ const ResArchiveLoader *Resource::getLoader(ResFileEntry::kType type) const { } // end of namespace Kyra + diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index 90405690a4..167ccd7943 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -41,15 +41,6 @@ namespace Kyra { -struct InsHofArchive { - Common::String filename; - uint32 firstFile; - uint32 startOffset; - uint32 lastFile; - uint32 endOffset; - uint32 totalSize; -}; - struct ResFileEntry { Common::String parent; uint32 size; @@ -61,20 +52,21 @@ struct ResFileEntry { enum kType { kRaw = 0, kPak = 1, - kInsKyra = 2, - kInsHof = 3, - kInsMal = 4, - kTlk = 5, + kInsMal = 2, + kTlk = 3, kAutoDetect }; kType type; uint32 offset; +}; - int fileIndex; - uint32 compressedSize; +struct CompFileEntry { + uint32 size; + uint8 *data; }; typedef Common::HashMap ResFileMap; +typedef Common::HashMap CompFileMap; class Resource; class ResArchiveLoader { @@ -100,6 +92,14 @@ public: protected: }; +class CompArchiveLoader { +public: + virtual ~CompArchiveLoader() {} + + virtual bool checkForFiles() const = 0; + virtual bool loadFile(CompFileMap &loadTo) const = 0; +}; + class Resource { public: Resource(KyraEngine_v1 *vm); @@ -136,6 +136,15 @@ protected: LoaderList _loaders; ResFileMap _map; + typedef Common::List > CompLoaderList; + typedef CompLoaderList::iterator CompLoaderIterator; + typedef CompLoaderList::const_iterator CCompLoaderIterator; + CompLoaderList _compLoaders; + CompFileMap _compFiles; + + void tryLoadCompFiles(); + void clearCompFileList(); + KyraEngine_v1 *_vm; }; @@ -376,3 +385,4 @@ private: + diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index 0751fc15db..ed9c5f7505 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -2651,8 +2651,6 @@ void KyraEngine_HoF::seq_init() { _res->unloadAllPakFiles(); _res->loadPakFile(StaticResource::staticDataFilename()); - if (_flags.useInstallerPackage) - _res->loadPakFile("WESTWOOD.001"); _res->loadFileList(_sequencePakList, _sequencePakListSize); int numShp = -1; -- cgit v1.2.3 From a9c9a5404d2aa111af0e8e03717d4ae14a3dd53a Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 31 May 2008 21:15:37 +0000 Subject: fix hof installer file loading svn-id: r32440 --- engines/kyra/resource.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 145f4dd295..04bf888d3c 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -1415,7 +1415,7 @@ bool CompLoaderInsHof::loadFile(CompFileMap &loadTo) const { } else { tmpFile.read(inbuffer, insize); inPart2 = 0; - FileExpander().process(outbuffer, inbuffer, insize, outsize); + FileExpander().process(outbuffer, inbuffer, outsize, insize); delete[] inbuffer; inbuffer = 0; newEntry.data = outbuffer; -- cgit v1.2.3 From 7db0b2b5a1d36958f40bb968aff89722b548a466 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sat, 31 May 2008 21:48:09 +0000 Subject: cleanup svn-id: r32441 --- engines/kyra/resource.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 04bf888d3c..cade116df5 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -1302,6 +1302,7 @@ bool CompLoaderInsHof::loadFile(CompFileMap &loadTo) const { } } + FileExpander exp; CompFileEntry newEntry; uint32 insize = 0; uint32 outsize = 0; @@ -1343,7 +1344,7 @@ bool CompLoaderInsHof::loadFile(CompFileMap &loadTo) const { tmpFile.seek(1); tmpFile.read(inbuffer + inPart1, inPart2); inPart2 = 0; - FileExpander().process(outbuffer, inbuffer, outsize, insize); + exp.process(outbuffer, inbuffer, outsize, insize); delete[] inbuffer; inbuffer = 0; newEntry.data = outbuffer; @@ -1415,7 +1416,7 @@ bool CompLoaderInsHof::loadFile(CompFileMap &loadTo) const { } else { tmpFile.read(inbuffer, insize); inPart2 = 0; - FileExpander().process(outbuffer, inbuffer, outsize, insize); + exp.process(outbuffer, inbuffer, outsize, insize); delete[] inbuffer; inbuffer = 0; newEntry.data = outbuffer; -- cgit v1.2.3 From a47106e77d9c0b2b52190cfa3efacf6a24c7ae14 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 31 May 2008 22:18:36 +0000 Subject: Cleanup. svn-id: r32443 --- engines/kyra/resource.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index cade116df5..226a8af523 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -1210,11 +1210,6 @@ public: bool loadFile(CompFileMap &loadTo) const; private: - struct FileEntry : public ResFileEntry { - int fileIndex; - uint32 compressedSize; - }; - struct Archive { Common::String filename; uint32 firstFile; -- cgit v1.2.3 From 4b4ebbd45d2c972ee179a9cb9e7fe9678bdaa038 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 31 May 2008 22:41:31 +0000 Subject: Endianness fixes in FLI player svn-id: r32444 --- engines/drascula/drascula.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index aa4bd6ded5..54ef064116 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -2709,7 +2709,7 @@ void DrasculaEngine::openSSN(const char *Name, int Pause) { int DrasculaEngine::playFrameSSN() { int Exit = 0; - int Lengt; + uint32 Lengt; byte *BufferSSN; if (!UsingMem) @@ -2734,12 +2734,12 @@ int DrasculaEngine::playFrameSSN() { break; case kFrameInit: if (!UsingMem) { - _Session->read(&CMP, 1); - _Session->read(&Lengt, 4); + CMP = _Session->readByte(); + Lengt = _Session->readUint32LE(); } else { memcpy(&CMP, mSession, 1); mSession += 1; - memcpy(&Lengt, mSession, 4); + Lengt = READ_LE_UINT32(mSession); mSession += 4; } if (CMP == kFrameCmpRle) { -- cgit v1.2.3 From 7a2d85c07c2c54ba779b221187a3779845f8bdf3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 31 May 2008 22:54:09 +0000 Subject: More endianness fixes svn-id: r32445 --- engines/drascula/drascula.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 54ef064116..7e041ce4c7 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1877,8 +1877,8 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { error("Animation file %s not found", animationFile); } - FileIn.read(&NFrames, sizeof(NFrames)); - FileIn.read(&dataSize, sizeof(dataSize)); + NFrames = FileIn.readSint32LE(); + dataSize = FileIn.readSint32LE(); AuxBuffOrg = (byte *)malloc(dataSize); FileIn.read(AuxBuffOrg, dataSize); FileIn.read(cPal, 768); @@ -1891,7 +1891,7 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { memcpy(AuxBuffLast, AuxBuffDes, 64000); WaitForNext(FPS); while (cnt < NFrames) { - FileIn.read(&dataSize, sizeof(dataSize)); + dataSize = FileIn.readSint32LE(); AuxBuffOrg = (byte *)malloc(dataSize); FileIn.read(AuxBuffOrg, dataSize); FileIn.read(cPal, 768); -- cgit v1.2.3 From 7d8a97b0afeb86a178914c351f48f1da5ccd0eef Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sat, 31 May 2008 23:26:41 +0000 Subject: Added error calls when out of memory while uncompressing HoF installer files. svn-id: r32449 --- engines/kyra/resource.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 226a8af523..73ff591792 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -1396,11 +1396,13 @@ bool CompLoaderInsHof::loadFile(CompFileMap &loadTo) const { tmpFile.seek(pos); outbuffer = new uint8[outsize]; - assert(outbuffer); + if (!outbuffer) + error("Out of memory: Can't uncompress installer files"); if (!inbuffer) { inbuffer = new uint8[insize]; - assert(inbuffer); + if (!inbuffer) + error("Out of memory: Can't uncompress installer files"); } if ((pos + insize) > size) { -- cgit v1.2.3 From 8be7d3c5226028429e4771981070f80b69ac4d69 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Sun, 1 Jun 2008 01:32:28 +0000 Subject: Ooops, intialize variables properly. svn-id: r32453 --- engines/gob/variables.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/gob/variables.cpp b/engines/gob/variables.cpp index af93252fb0..0eea2f6547 100644 --- a/engines/gob/variables.cpp +++ b/engines/gob/variables.cpp @@ -35,6 +35,8 @@ Variables::Variables(uint32 size) { _vars = new byte[_size]; _sizes = new byte[_size]; + + clear(); } Variables::~Variables() { -- cgit v1.2.3 From 0b46595bf1809ab406ca604f8821e987b7edbacb Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 1 Jun 2008 10:16:56 +0000 Subject: Add Blue's 123 Time Activities. svn-id: r32454 --- engines/scumm/detection_tables.h | 6 +++++- engines/scumm/scumm-md5.h | 3 ++- tools/scumm-md5.txt | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 11d803e42b..4e3791b7b3 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -89,7 +89,8 @@ static const PlainGameDescriptor gameDescriptions[] = { { "baseball2001", "Backyard Baseball 2001" }, { "Baseball2003", "Backyard Baseball 2003" }, { "basketball", "Backyard Basketball" }, - { "BluesABCTime", "Blue's ABC Time" }, + { "Blues123Time", "Blue's 123 Time Activities" }, + { "BluesABCTime", "Blue's ABC Time Activities" }, { "BluesBirthday", "Blue's Birthday Adventure" }, { "catalog", "Humongous Interactive Catalog" }, { "chase", "SPY Fox in Cheese Chase" }, @@ -314,6 +315,7 @@ static const GameSettings gameVariantsTable[] = { {"puttrace", "HE 98.5", 0, GID_PUTTRACE, 6, 98, MDT_NONE, GF_USE_KEY | GF_HE_985, UNK}, {"puttrace", "HE 99", 0, GID_PUTTRACE, 6, 99, MDT_NONE, GF_USE_KEY, UNK}, + {"blues123time", "", 0, GID_HEGAME, 6, 98, MDT_NONE, GF_USE_KEY, UNK}, {"bluesabctime", "", 0, GID_HEGAME, 6, 98, MDT_NONE, GF_USE_KEY, UNK}, {"BluesBirthday", 0, 0, GID_HEGAME, 6, 98, MDT_NONE, GF_USE_KEY, UNK}, {"soccer", "", 0, GID_SOCCER, 6, 98, MDT_NONE, GF_USE_KEY, UNK}, @@ -511,6 +513,8 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "basketball", "basketball", kGenHEPC, UNK_LANG, UNK, 0 }, { "basketball", "Basketball", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, + { "blues123time", "Blues123time", kGenHEPC, UNK_LANG, UNK, 0 }, + { "bluesabctime", "bluesabctime", kGenHEPC, UNK_LANG, UNK, 0 }, { "bluesabctime", "BluesABCTimeDemo", kGenHEPC, UNK_LANG, UNK, 0 }, { "bluesabctime", "BluesABCTimeDemo", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index 3c8207075b..bf7ce93eb9 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Sat May 31 01:07:56 2008 + This file was generated by the md5table tool on Sun Jun 01 10:15:58 2008 DO NOT EDIT MANUALLY! */ @@ -287,6 +287,7 @@ static const MD5Table md5table[] = { { "7020931d5a2be0a49d68e7a1882363e4", "zak", "V1", "V1", 1896, Common::EN_ANY, Common::kPlatformPC }, { "70b0719ac3a5b47ae233c561823d5b96", "puttzoo", "", "", -1, Common::NL_NLD, Common::kPlatformMacintosh }, { "71523b539491527d9860f4407faf0411", "monkey", "Demo", "EGA Demo", 7607, Common::EN_ANY, Common::kPlatformPC }, + { "71d384e7676c53d513ddd333eae1d82c", "Blues123time", "", "", -1, Common::EN_ANY, Common::kPlatformWindows }, { "71fe97c3108678cf604f14abe342341b", "spyfox2", "", "", -1, Common::NL_NLD, Common::kPlatformWindows }, { "7222f260253f325c21fcfa68b5bfab67", "spyfox2", "", "Demo", -1, Common::EN_USA, Common::kPlatformUnknown }, { "72ac6bc980d5101c2142189d746bd62f", "spyfox", "HE 99", "", -1, Common::RU_RUS, Common::kPlatformWindows }, diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt index 46e4787855..366be16fe8 100644 --- a/tools/scumm-md5.txt +++ b/tools/scumm-md5.txt @@ -410,7 +410,10 @@ thinkerk Big Thinkers Kindergarten 695fe0b3963333b7e15b37514db3c745 29789 us All - Demo - khalek, sev -BluesABCTime Blue's ABC Time +Blues123time Blue's 123 Time Activities + 71d384e7676c53d513ddd333eae1d82c -1 en Windows - - - Vasyl Tsvirkunov + +BluesABCTime Blue's ABC Time Activities 95b3806e043be08668c54c3ffe98650f -1 en All - - - sev 7ddeaf52c8b9a50551ce0aa2ac811d07 -1 en All - Demo - khalek, sev -- cgit v1.2.3 From 3b5b37c3e1d79e4482d6dc5f45dc497ead10fcd6 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 1 Jun 2008 10:37:14 +0000 Subject: Fix bug #1973247 - DIG: Subtitle glitch (Regression). svn-id: r32456 --- engines/scumm/string.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/scumm/string.cpp b/engines/scumm/string.cpp index 81ffaa89ba..f039e2ca23 100644 --- a/engines/scumm/string.cpp +++ b/engines/scumm/string.cpp @@ -1481,9 +1481,9 @@ void ScummEngine_v7::translateText(const byte *text, byte *trans_buff) { text = (const byte *)"/NEW.009/glowing crystals"; else if (!strcmp((const char *)text, "pit")) text = (const byte *)"/NEW.010/pit"; - else if (!strcmp((const char *)text, "/NEWTON.032/")) + else if (!strcmp((const char *)text, "You wish.")) text = (const byte *)"/NEW.011/You wish."; - else if (!strcmp((const char *)text, "/NEWTON.034/")) + else if (!strcmp((const char *)text, "In your dreams.")) text = (const byte *)"/NEW.012/In your dreams"; else if (!strcmp((const char *)text, "left")) text = (const byte *)"/CATHPLAT.068/left"; -- cgit v1.2.3 From cf27ab1a00c60aa6254d6e40d0b73c58fb2fcd41 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 1 Jun 2008 10:57:23 +0000 Subject: Correct HE version for Blue's 123 Time Activities. svn-id: r32457 --- engines/scumm/detection_tables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 4e3791b7b3..24765ca83a 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -315,12 +315,12 @@ static const GameSettings gameVariantsTable[] = { {"puttrace", "HE 98.5", 0, GID_PUTTRACE, 6, 98, MDT_NONE, GF_USE_KEY | GF_HE_985, UNK}, {"puttrace", "HE 99", 0, GID_PUTTRACE, 6, 99, MDT_NONE, GF_USE_KEY, UNK}, - {"blues123time", "", 0, GID_HEGAME, 6, 98, MDT_NONE, GF_USE_KEY, UNK}, {"bluesabctime", "", 0, GID_HEGAME, 6, 98, MDT_NONE, GF_USE_KEY, UNK}, {"BluesBirthday", 0, 0, GID_HEGAME, 6, 98, MDT_NONE, GF_USE_KEY, UNK}, {"soccer", "", 0, GID_SOCCER, 6, 98, MDT_NONE, GF_USE_KEY, UNK}, // Global scripts increased to 2048 + {"blues123time", "", 0, GID_HEGAME, 6, 98, MDT_NONE, GF_USE_KEY | GF_HE_985, UNK}, {"freddi4", "", 0, GID_HEGAME, 6, 98, MDT_NONE, GF_USE_KEY | GF_HE_985, UNK}, {"freddi4", "unenc", 0, GID_HEGAME, 6, 98, MDT_NONE, GF_HE_985, UNK}, -- cgit v1.2.3 From a81e10da49a1418326f324227d6daa06aed346cc Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 1 Jun 2008 11:13:55 +0000 Subject: Add Blue's 123 Time Activities. svn-id: r32459 --- README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README b/README index 4da5c439cc..ac44f53cab 100644 --- a/README +++ b/README @@ -245,7 +245,8 @@ site and view the compatibility chart. Backyard Baseball [baseball] Backyard Soccer [soccer] - Blue's ABC Time [BluesABCTime] + Blue's 123 Time Activities [Blues123Time] + Blue's ABC Time Activities [BluesABCTime] Blue's Birthday Adventure [BluesBirthday] SPY Fox 3: Operation Ozone [spyozon] -- cgit v1.2.3 From cc74ec5c39a233c05ad9e8b3eba96649ceb8490b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 1 Jun 2008 11:43:20 +0000 Subject: Unarj code based on unarj 2.62. Used by Drascula engine svn-id: r32460 --- common/module.mk | 1 + common/unarj.cpp | 666 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ common/unarj.h | 179 +++++++++++++++ 3 files changed, 846 insertions(+) create mode 100644 common/unarj.cpp create mode 100644 common/unarj.h diff --git a/common/module.mk b/common/module.mk index a7c0f4eb90..c3f2a38c3f 100644 --- a/common/module.mk +++ b/common/module.mk @@ -14,6 +14,7 @@ MODULE_OBJS := \ stream.o \ util.o \ system.o \ + unarj.o \ unzip.o \ zlib.o diff --git a/common/unarj.cpp b/common/unarj.cpp new file mode 100644 index 0000000000..c8e48dce2c --- /dev/null +++ b/common/unarj.cpp @@ -0,0 +1,666 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +// Heavily based on Unarj 2.65 + +/* UNARJ.C, UNARJ, R JUNG, 06/05/02 + * Main Extractor routine + * Copyright (c) 1991-2002 by ARJ Software, Inc. All rights reserved. + * + * This code may be freely used in programs that are NOT ARJ archivers + * (both compress and extract ARJ archives). + * + * If you wish to distribute a modified version of this program, you + * MUST indicate that it is a modified version both in the program and + * source code. + * + * We are holding the copyright on the source code, so please do not + * delete our name from the program files or from the documentation. + * + * We wish to give credit to Haruhiko Okumura for providing the + * basic ideas for ARJ and UNARJ in his program AR. Please note + * that UNARJ is significantly different from AR from an archive + * structural point of view. + * + */ + +#include "common/scummsys.h" +#include "common/util.h" +#include "common/unarj.h" + +namespace Common { + +static uint32 CRCtable[256]; + +static void InitCRC(void) { + const uint32 poly = 0xEDB88320; + int i, j; + uint32 n; + + for (i = 0; i < 256; i++) { + n = i; + for (j = 0; j < 8; j++) + n = (n & 1) ? ((n >> 1) ^ poly) : (n >> 1); + CRCtable[i] = n; + } +} + +static uint32 GetCRC(byte *data, int len) { + uint32 CRC = 0xFFFFFFFF; + int i; + for (i = 0; i < len; i++) + CRC = (CRC >> 8) ^ CRCtable[(CRC ^ data[i]) & 0xFF]; + return CRC ^ 0xFFFFFFFF; +} + +ArjFile::ArjFile() { + InitCRC(); +} + +ArjFile::~ArjFile() { + close(); + + for (uint i = 0; i < _headers.size(); i++) + delete _headers[i]; + + _headers.clear(); +} + +void ArjFile::registerArchive(const String &filename) { + int32 first_hdr_pos; + ArjHeader *header; + + if (!_currArchive.open(filename)) + return; + + first_hdr_pos = findHeader(); + + if (first_hdr_pos < 0) { + warning("ArjFile::registerArchive(): Could not find a valid header"); + return; + } + + _currArchive.seek(first_hdr_pos, SEEK_SET); + if (readHeader() == NULL) + return; + + while ((header = readHeader()) != NULL) { + _headers.push_back(header); + + _currArchive.seek(header->compSize, SEEK_CUR); + + _fileMap[header->filename] = _headers.size() - 1; + _archMap[header->filename] = filename; + } + + _currArchive.close(); + + debug(0, "ArjFile::registerArchive(%s): Located %d files", filename.c_str(), _headers.size()); +} + +int32 ArjFile::findHeader(void) { + long arcpos, lastpos; + int c; + byte header[HEADERSIZE_MAX]; + uint32 crc; + uint16 headersize; + + arcpos = _currArchive.pos(); + _currArchive.seek(0L, SEEK_END); + lastpos = _currArchive.pos() - 2; + if (lastpos > MAXSFX) + lastpos = MAXSFX; + + for ( ; arcpos < lastpos; arcpos++) { + _currArchive.seek(arcpos, SEEK_SET); + c = _currArchive.readByte(); + while (arcpos < lastpos) { + if (c != HEADER_ID_LO) // low order first + c = _currArchive.readByte(); + else if ((c = _currArchive.readByte()) == HEADER_ID_HI) + break; + arcpos++; + } + if (arcpos >= lastpos) + break; + if ((headersize = _currArchive.readUint16LE()) <= HEADERSIZE_MAX) { + _currArchive.read(header, headersize); + crc = GetCRC(header, headersize); + if (crc == _currArchive.readUint32LE()) { + _currArchive.seek(arcpos, SEEK_SET); + return arcpos; + } + } + } + return -1; // could not find a valid header +} + +ArjHeader *ArjFile::readHeader() { + ArjHeader header; + ArjHeader *head; + byte headData[HEADERSIZE_MAX]; + + header.id = _currArchive.readUint16LE(); + if (header.id != HEADER_ID) { + warning("ArjFile::readHeader(): Bad header ID (%x)", header.id); + + return NULL; + } + + header.headerSize = _currArchive.readUint16LE(); + if (header.headerSize == 0) + return NULL; // end of archive + if (header.headerSize > HEADERSIZE_MAX) { + warning("ArjFile::readHeader(): Bad header"); + + return NULL; + } + + int rSize = _currArchive.read(headData, header.headerSize); + + MemoryReadStream readS(headData, rSize); + + header.headerCrc = _currArchive.readUint32LE(); + if (GetCRC(headData, header.headerSize) != header.headerCrc) { + warning("ArjFile::readHeader(): Bad header CRC"); + return NULL; + } + + header.firstHdrSize = readS.readByte(); + header.nbr = readS.readByte(); + header.xNbr = readS.readByte(); + header.hostOs = readS.readByte(); + header.flags = readS.readByte(); + header.method = readS.readByte(); + header.fileType = readS.readByte(); + (void)readS.readByte(); + header.timeStamp = readS.readUint32LE(); + header.compSize = readS.readSint32LE(); + header.origSize = readS.readSint32LE(); + header.fileCRC = readS.readUint32LE(); + header.entryPos = readS.readUint16LE(); + header.fileMode = readS.readUint16LE(); + header.hostData = readS.readUint16LE(); + + if (header.origSize < 0 || header.compSize < 0) { + warning("ArjFile::readHeader(): Wrong file size"); + return NULL; + } + + strncpy(header.filename, (const char *)&headData[header.firstHdrSize], FNAME_MAX); + + strncpy(header.comment, (const char *)&headData[header.firstHdrSize + strlen(header.filename) + 1], COMMENT_MAX); + + /* if extheadersize == 0 then no CRC */ + /* otherwise read extheader data and read 4 bytes for CRC */ + + while ((header.extHeaderSize = _currArchive.readUint16LE()) != 0) + _currArchive.seek((long)(header.extHeaderSize + 4), SEEK_CUR); + + header.pos = _currArchive.pos(); + + head = new ArjHeader(header); + + return head; +} + + +bool ArjFile::open(const Common::String &filename, AccessMode mode) { + _isOpen = false; + + if (!_fileMap.contains(filename)) + return false; + + _isOpen = true; + + ArjHeader *hdr = _headers[_fileMap[filename]]; + + _compsize = hdr->compSize; + _origsize = hdr->origSize; + + _uncompressedData = (byte *)malloc(_origsize); + _outstream = new MemoryWriteStream(_uncompressedData, _origsize); + + _currArchive.open(_archMap[filename]); + _currArchive.seek(hdr->pos, SEEK_SET); + + if (hdr->method == 0) // store + _currArchive.read(_uncompressedData, _origsize); + else if (hdr->method == 1 || hdr->method == 2 || hdr->method == 3) + decode(); + else if (hdr->method == 4) + decode_f(); + + _currArchive.close(); + delete _outstream; + _outstream = NULL; + + _uncompressed = new MemoryReadStream(_uncompressedData, _origsize); + + return true; +} + +void ArjFile::close() { + _isOpen = false; + + delete _uncompressed; + _uncompressed = NULL; + + free(_uncompressedData); + _uncompressedData = NULL; +} + +uint32 ArjFile::read(void *dataPtr, uint32 dataSize) { + return _uncompressed->read(dataPtr, dataSize); +} + +bool ArjFile::eos() { + return _uncompressed->eos(); +} + +uint32 ArjFile::pos() { + return _uncompressed->pos(); +} + +uint32 ArjFile::size() { + return _uncompressed->size(); +} + +void ArjFile::seek(int32 offset, int whence) { + _uncompressed->seek(offset, whence); +} + +void ArjFile::init_getbits() { + _bitbuf = 0; + _subbitbuf = 0; + _bitcount = 0; + fillbuf(2 * CHAR_BIT); +} + +void ArjFile::fillbuf(int n) { // Shift bitbuf n bits left, read n bits + _bitbuf = (_bitbuf << n) & 0xFFFF; /* lose the first n bits */ + while (n > _bitcount) { + _bitbuf |= _subbitbuf << (n -= _bitcount); + if (_compsize != 0) { + _compsize--; + _subbitbuf = _currArchive.readByte(); + } else + _subbitbuf = 0; + _bitcount = CHAR_BIT; + } + _bitbuf |= _subbitbuf >> (_bitcount -= n); +} + +uint16 ArjFile::getbits(int n) { + uint16 x; + + x = _bitbuf >> (2 * CHAR_BIT - n); + fillbuf(n); + return x; +} + + + +/* Huffman decode routines */ + +void ArjFile::make_table(int nchar, byte *bitlen, int tablebits, uint16 *table, int tablesize) { + uint16 count[17], weight[17], start[18], *p; + uint i, k, len, ch, jutbits, avail, nextcode, mask; + + for (i = 1; i <= 16; i++) + count[i] = 0; + for (i = 0; (int)i < nchar; i++) + count[bitlen[i]]++; + + start[1] = 0; + for (i = 1; i <= 16; i++) + start[i + 1] = start[i] + (count[i] << (16 - i)); + if (start[17] != (uint16) (1 << 16)) + error("ArjFile::make_table(): bad file data"); + + jutbits = 16 - tablebits; + for (i = 1; (int)i <= tablebits; i++) { + start[i] >>= jutbits; + weight[i] = 1 << (tablebits - i); + } + while (i <= 16) { + weight[i] = 1 << (16 - i); + i++; + } + + i = start[tablebits + 1] >> jutbits; + if (i != (uint16) (1 << 16)) { + k = 1 << tablebits; + while (i != k) + table[i++] = 0; + } + + avail = nchar; + mask = 1 << (15 - tablebits); + for (ch = 0; (int)ch < nchar; ch++) { + if ((len = bitlen[ch]) == 0) + continue; + k = start[len]; + nextcode = k + weight[len]; + if ((int)len <= tablebits) { + if (nextcode > (uint)tablesize) + error("ArjFile::make_table(): bad file data"); + for (i = start[len]; i < nextcode; i++) + table[i] = ch; + } else { + p = &table[k >> jutbits]; + i = len - tablebits; + while (i != 0) { + if (*p == 0) { + _right[avail] = _left[avail] = 0; + *p = avail++; + } + if (k & mask) + p = &_right[*p]; + else + p = &_left[*p]; + k <<= 1; + i--; + } + *p = ch; + } + start[len] = nextcode; + } +} + +void ArjFile::read_pt_len(int nn, int nbit, int i_special) { + int i, n; + int16 c; + uint16 mask; + + n = getbits(nbit); + if (n == 0) { + c = getbits(nbit); + for (i = 0; i < nn; i++) + _pt_len[i] = 0; + for (i = 0; i < 256; i++) + _pt_table[i] = c; + } else { + i = 0; + while (i < n) { + c = _bitbuf >> (13); + if (c == 7) { + mask = 1 << (12); + while (mask & _bitbuf) { + mask >>= 1; + c++; + } + } + fillbuf((c < 7) ? 3 : (int)(c - 3)); + _pt_len[i++] = (byte)c; + if (i == i_special) { + c = getbits(2); + while (--c >= 0) + _pt_len[i++] = 0; + } + } + while (i < nn) + _pt_len[i++] = 0; + make_table(nn, _pt_len, 8, _pt_table, PTABLESIZE); // replaced sizeof + } +} + +void ArjFile::read_c_len() { + int16 i, c, n; + uint16 mask; + + n = getbits(CBIT); + if (n == 0) { + c = getbits(CBIT); + for (i = 0; i < NC; i++) + _c_len[i] = 0; + for (i = 0; i < CTABLESIZE; i++) + _c_table[i] = c; + } else { + i = 0; + while (i < n) { + c = _pt_table[_bitbuf >> (8)]; + if (c >= NT) { + mask = 1 << (7); + do { + if (_bitbuf & mask) + c = _right[c]; + else + c = _left[c]; + mask >>= 1; + } while (c >= NT); + } + fillbuf((int)(_pt_len[c])); + if (c <= 2) { + if (c == 0) + c = 1; + else if (c == 1) + c = getbits(4) + 3; + else + c = getbits(CBIT) + 20; + while (--c >= 0) + _c_len[i++] = 0; + } + else + _c_len[i++] = (byte)(c - 2); + } + while (i < NC) + _c_len[i++] = 0; + make_table(NC, _c_len, 12, _c_table, CTABLESIZE); // replaced sizeof + } +} + +uint16 ArjFile::decode_c() { + uint16 j, mask; + + if (_blocksize == 0) { + _blocksize = getbits(16); + read_pt_len(NT, TBIT, 3); + read_c_len(); + read_pt_len(NP, PBIT, -1); + } + _blocksize--; + j = _c_table[_bitbuf >> 4]; + if (j >= NC) { + mask = 1 << (3); + do { + if (_bitbuf & mask) + j = _right[j]; + else + j = _left[j]; + mask >>= 1; + } while (j >= NC); + } + fillbuf((int)(_c_len[j])); + return j; +} + +uint16 ArjFile::decode_p() { + uint16 j, mask; + + j = _pt_table[_bitbuf >> (8)]; + if (j >= NP) { + mask = 1 << (7); + do { + if (_bitbuf & mask) + j = _right[j]; + else + j = _left[j]; + mask >>= 1; + } while (j >= NP); + } + fillbuf((int)(_pt_len[j])); + if (j != 0) { + j--; + j = (1 << j) + getbits((int)j); + } + return j; +} + +void ArjFile::decode_start() { + _blocksize = 0; + init_getbits(); +} + +void ArjFile::decode() { + int16 i; + int16 j; + int16 c; + int16 r; + int32 count; + + decode_start(); + count = 0; + r = 0; + + while (count < _origsize) { + if ((c = decode_c()) <= UCHAR_MAX) { + _text[r] = (byte) c; + count++; + if (++r >= DDICSIZ) { + r = 0; + _outstream->write(_text, DDICSIZ); + } + } else { + j = c - (UCHAR_MAX + 1 - THRESHOLD); + count += j; + i = decode_p(); + if ((i = r - i - 1) < 0) + i += DDICSIZ; + if (r > i && r < DDICSIZ - MAXMATCH - 1) { + while (--j >= 0) + _text[r++] = _text[i++]; + } else { + while (--j >= 0) { + _text[r] = _text[i]; + if (++r >= DDICSIZ) { + r = 0; + _outstream->write(_text, DDICSIZ); + } + if (++i >= DDICSIZ) + i = 0; + } + } + } + } + if (r != 0) + _outstream->write(_text, r); +} + +/* Macros */ + +#define BFIL {_getbuf|=_bitbuf>>_getlen;fillbuf(CODE_BIT-_getlen);_getlen=CODE_BIT;} +#define GETBIT(c) {if(_getlen<=0)BFIL c=(_getbuf&0x8000)!=0;_getbuf<<=1;_getlen--;} +#define BPUL(l) {_getbuf<<=l;_getlen-=l;} +#define GETBITS(c,l) {if(_getlen>(CODE_BIT-l);BPUL(l)} + +int16 ArjFile::decode_ptr() { + int16 c; + int16 width; + int16 plus; + int16 pwr; + + plus = 0; + pwr = 1 << (STRTP); + for (width = (STRTP); width < (STOPP); width++) { + GETBIT(c); + if (c == 0) + break; + plus += pwr; + pwr <<= 1; + } + if (width != 0) + GETBITS(c, width); + c += plus; + return c; +} + +int16 ArjFile::decode_len() { + int16 c; + int16 width; + int16 plus; + int16 pwr; + + plus = 0; + pwr = 1 << (STRTL); + for (width = (STRTL); width < (STOPL); width++) { + GETBIT(c); + if (c == 0) + break; + plus += pwr; + pwr <<= 1; + } + if (width != 0) + GETBITS(c, width); + c += plus; + return c; +} + +void ArjFile::decode_f() { + int16 i; + int16 j; + int16 c; + int16 r; + int16 pos1; + int32 count; + + init_getbits(); + _getlen = _getbuf = 0; + count = 0; + r = 0; + + while (count < _origsize) { + c = decode_len(); + if (c == 0) { + GETBITS(c, CHAR_BIT); + _text[r] = (byte)c; + count++; + if (++r >= DDICSIZ) { + r = 0; + _outstream->write(_text, DDICSIZ); + } + } else { + j = c - 1 + THRESHOLD; + count += j; + pos1 = decode_ptr(); + if ((i = r - pos1 - 1) < 0) + i += DDICSIZ; + while (j-- > 0) { + _text[r] = _text[i]; + if (++r >= DDICSIZ) { + r = 0; + _outstream->write(_text, DDICSIZ); + } + if (++i >= DDICSIZ) + i = 0; + } + } + } + if (r != 0) + _outstream->write(_text, r); +} + + +} // End of namespace Common diff --git a/common/unarj.h b/common/unarj.h new file mode 100644 index 0000000000..63c6ca582d --- /dev/null +++ b/common/unarj.h @@ -0,0 +1,179 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef COMMON_UNARJ_H +#define COMMON_UNARJ_H + +#include "common/file.h" +#include "common/hash-str.h" + +namespace Common { + +#define HEADER_ID 0xEA60 +#define HEADER_ID_HI 0xEA +#define HEADER_ID_LO 0x60 +#define FIRST_HDR_SIZE 30 +#define FIRST_HDR_SIZE_V 34 +#define COMMENT_MAX 2048 +#define FNAME_MAX 512 +#define HEADERSIZE_MAX (FIRST_HDR_SIZE + 10 + FNAME_MAX + COMMENT_MAX) +#define CRC_MASK 0xFFFFFFFFL +#define MAXSFX 25000L + +#define CODE_BIT 16 +#define CHAR_BIT 8 +#define UCHAR_MAX 255 +#define THRESHOLD 3 +#define DDICSIZ 26624 +#define MAXDICBIT 16 +#define MATCHBIT 8 +#define MAXMATCH 256 +#define NC (UCHAR_MAX + MAXMATCH + 2 - THRESHOLD) +#define NP (MAXDICBIT + 1) +#define CBIT 9 +#define NT (CODE_BIT + 3) +#define PBIT 5 +#define TBIT 5 + +#if NT > NP +#define NPT NT +#else +#define NPT NP +#endif + +#define CTABLESIZE 4096 +#define PTABLESIZE 256 + +#define STRTP 9 +#define STOPP 13 + +#define STRTL 0 +#define STOPL 7 + +struct ArjHeader { + int32 pos; + uint16 id; + uint16 headerSize; + // + byte firstHdrSize; + byte nbr; + byte xNbr; + byte hostOs; + byte flags; + byte method; + byte fileType; + byte pad; + uint32 timeStamp; + int32 compSize; + int32 origSize; + uint32 fileCRC; + uint16 entryPos; + uint16 fileMode; + uint16 hostData; + char filename[FNAME_MAX]; + char comment[COMMENT_MAX]; + uint16 extHeaderSize; + + uint32 headerCrc; +}; + +typedef HashMap ArjFilesMap; + +class ArjFile : public File { +public: + ArjFile(); + ~ArjFile(); + + void registerArchive(const String &filename); + + bool open(const Common::String &filename, AccessMode mode = kFileReadMode); + void close(); + + uint32 read(void *dataPtr, uint32 dataSize); + bool eos(); + uint32 pos(); + uint32 size(); + void seek(int32 offset, int whence = SEEK_SET); + bool isOpen() { return _isOpen; } + +private: + File _currArchive; + Array _headers; + ArjFilesMap _fileMap; + StringMap _archMap; + ReadStream *_stream; + byte *_uncompressedData; + MemoryWriteStream *_outstream; + MemoryReadStream *_uncompressed; + + bool _isOpen; + + int32 findHeader(void); + ArjHeader *readHeader(); + + void decode(); + void decode_f(); + + uint16 _bitbuf; + int32 _compsize; + int32 _origsize; + byte _subbitbuf; + int _bitcount; + + void init_getbits(); + void fillbuf(int n); + uint16 getbits(int n); + + + void make_table(int nchar, byte *bitlen, int tablebits, uint16 *table, int tablesize); + void read_pt_len(int nn, int nbit, int i_special); + void read_c_len(void); + uint16 decode_c(void); + uint16 decode_p(void); + void decode_start(void); + int16 decode_ptr(void); + int16 decode_len(void); + +private: + byte _text[DDICSIZ]; + + int16 _getlen; + int16 _getbuf; + + uint16 _left[2 * NC - 1]; + uint16 _right[2 * NC - 1]; + byte _c_len[NC]; + byte _pt_len[NPT]; + + uint16 _c_table[CTABLESIZE]; + uint16 _pt_table[PTABLESIZE]; + uint16 _blocksize; + + +}; + +} // End of namespace Common + +#endif -- cgit v1.2.3 From e5be4847ac25bab8ad74aca1db298f321ec4f682 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 1 Jun 2008 11:44:45 +0000 Subject: WIP for hooking unarj in order to play unmodified files from CD. Will break your game unless you put packet.001 into game directory. Not everything has been hooked and files fallback and detection is not yet implemented svn-id: r32461 --- engines/drascula/drascula.cpp | 17 +++++++++-------- engines/drascula/drascula.h | 3 +++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 7e041ce4c7..0b6b618487 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -107,6 +107,8 @@ int DrasculaEngine::init() { _lang = 0; } + _arj.registerArchive("packet.001"); + return 0; } @@ -264,22 +266,21 @@ void DrasculaEngine::loadPic(const char *NamePcc) { unsigned int con, x = 0; unsigned int fExit = 0; byte ch, rep; - Common::File file; byte *auxPun; - file.open(NamePcc); - if (!file.isOpen()) + _arj.open(NamePcc); + if (!_arj.isOpen()) error("missing game data %s %c", NamePcc, 7); pcxBuffer = (byte *)malloc(65000); auxPun = pcxBuffer; - file.seek(128); + _arj.seek(128); while (!fExit) { - ch = file.readByte(); + ch = _arj.readByte(); rep = 1; if ((ch & 192) == 192) { rep = (ch & 63); - ch = file.readByte(); + ch = _arj.readByte(); } for (con = 0; con < rep; con++) { *auxPun++ = ch; @@ -289,8 +290,8 @@ void DrasculaEngine::loadPic(const char *NamePcc) { } } - file.read(cPal, 768); - file.close(); + _arj.read(cPal, 768); + _arj.close(); } void DrasculaEngine::decompressPic(byte *targetSurface, int colorCount) { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 2ddc006e71..4e8a43c6dc 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -35,6 +35,7 @@ #include "common/hash-str.h" #include "common/events.h" #include "common/keyboard.h" +#include "common/unarj.h" #include "sound/audiostream.h" #include "sound/mixer.h" @@ -230,6 +231,8 @@ public: Common::File *ald, *sku; + Common::ArjFile _arj; + int hay_sb; int nivel_osc, previousMusic, roomMusic; int roomNumber; -- cgit v1.2.3 From 5b3a6fac639505819f9077a52cea7225b09ebd0c Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sun, 1 Jun 2008 13:19:45 +0000 Subject: - (hopefully) fix valgrind warning for installer file decompression - some more pauseEngineIntern code for Hof svn-id: r32462 --- engines/kyra/kyra_hof.cpp | 7 ++++++- engines/kyra/resource.cpp | 14 +++++++++----- engines/kyra/script_tim.cpp | 7 +++++++ engines/kyra/script_tim.h | 1 + 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp index 14bbc574fc..57f0dcc24a 100644 --- a/engines/kyra/kyra_hof.cpp +++ b/engines/kyra/kyra_hof.cpp @@ -206,7 +206,12 @@ void KyraEngine_HoF::pauseEngineIntern(bool pause) { _activeWSA[x].nextFrame += pausedTime; } - // TODO: item animation, idle animation, tim player, etc + _nextIdleAnim += pausedTime; + + for (int x = 0; x < _itemAnimDataSize; x++) + _activeItemAnim[x].nextFrame += pausedTime; + + _tim->refreshTimersAfterPause(pausedTime); } } diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 73ff591792..04cfcf879a 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -795,7 +795,7 @@ Common::SeekableReadStream *ResLoaderTlk::loadFileFromArchive(const Common::Stri class FileExpanderSource { public: - FileExpanderSource(const uint8 *data) : _dataPtr(data), _bitsLeft(8), _key(0), _index(0) {} + FileExpanderSource(const uint8 *data, int dataSize) : _dataPtr(data), _endofBuffer(data + dataSize), _bitsLeft(8), _key(0), _index(0) {} ~FileExpanderSource() {} void advSrcRefresh(); @@ -811,6 +811,7 @@ public: private: const uint8 *_dataPtr; + const uint8 *_endofBuffer; uint16 _key; int8 _bitsLeft; uint8 _index; @@ -819,7 +820,8 @@ private: void FileExpanderSource::advSrcBitsBy1() { _key >>= 1; if (!--_bitsLeft) { - _key = ((*_dataPtr++) << 8 ) | (_key & 0xff); + if (_dataPtr < _endofBuffer) + _key = ((*_dataPtr++) << 8 ) | (_key & 0xff); _bitsLeft = 8; } } @@ -831,7 +833,8 @@ void FileExpanderSource::advSrcBitsByIndex(uint8 newIndex) { _key >>= (_index + _bitsLeft); _index = -_bitsLeft; _bitsLeft = 8 - _index; - _key = (*_dataPtr++ << 8) | (_key & 0xff); + if (_dataPtr < _endofBuffer) + _key = (*_dataPtr++ << 8) | (_key & 0xff); } _key >>= _index; } @@ -880,7 +883,8 @@ uint16 FileExpanderSource::keyMaskedAlign(uint16 val) { void FileExpanderSource::advSrcRefresh() { _key = READ_LE_UINT16(_dataPtr); - _dataPtr += 2; + if (_dataPtr < _endofBuffer - 1) + _dataPtr += 2; _bitsLeft = 8; } @@ -937,7 +941,7 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32 bool needrefresh = true; bool postprocess = false; - _src = new FileExpanderSource(src); + _src = new FileExpanderSource(src, compressedSize); while (d < dst + outsize) { diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp index 66390047b4..812e867c53 100644 --- a/engines/kyra/script_tim.cpp +++ b/engines/kyra/script_tim.cpp @@ -184,6 +184,13 @@ void TIMInterpreter::exec(TIM *tim, bool loop) { } while (loop); } +void TIMInterpreter::refreshTimersAfterPause(uint32 elapsedTime) { + for (int i = 0; i < 10; i++) { + _currentTim->func[i].lastTime += elapsedTime; + _currentTim->func[i].nextTime += elapsedTime; + } +} + int TIMInterpreter::execCommand(int cmd, const uint16 *param) { if (cmd < 0 || cmd >= _commandsSize) { warning("Calling unimplemented TIM command %d", cmd); diff --git a/engines/kyra/script_tim.h b/engines/kyra/script_tim.h index 957bffcc3c..7d5fe15b28 100644 --- a/engines/kyra/script_tim.h +++ b/engines/kyra/script_tim.h @@ -69,6 +69,7 @@ public: void stopCurFunc() { if (_currentTim) cmd_stopCurFunc(0); } void play(const char *filename); + void refreshTimersAfterPause(uint32 elapsedTime); private: KyraEngine_v1 *_vm; OSystem *_system; -- cgit v1.2.3 From ec93c8957b95b0ad633cf342094ad0c25db42b18 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sun, 1 Jun 2008 14:00:43 +0000 Subject: - fix regression in non-interactive HOF demo svn-id: r32464 --- engines/kyra/sequences_hof.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp index ed9c5f7505..169c319347 100644 --- a/engines/kyra/sequences_hof.cpp +++ b/engines/kyra/sequences_hof.cpp @@ -300,6 +300,8 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) { _eventList.clear(); seqNum = kSequenceFirates; } + } else if (seqNum == kSequenceDemoFisher && !(_abortIntroFlag || skipFlag())) { + seqNum = kSequenceDemoVirgin; } if (_menuChoice) { -- cgit v1.2.3 From 22d63345e33795c3ce2de4bb67db160ef8b8ea6d Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Sun, 1 Jun 2008 14:05:39 +0000 Subject: Got rid of the static arrays for initialization of parsers and exec opcodes, to make returning to launcher easier. The code has been borrowed by Kyra, after suggestion by LordHoto. svn-id: r32465 --- engines/parallaction/exec_br.cpp | 176 ++++++++++----------- engines/parallaction/exec_ns.cpp | 99 ++++++------ engines/parallaction/parser.h | 46 +++--- engines/parallaction/parser_br.cpp | 305 +++++++++++++++++-------------------- engines/parallaction/parser_ns.cpp | 207 ++++++++++++------------- 5 files changed, 396 insertions(+), 437 deletions(-) diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp index 07ed3f5d78..2aeec6358d 100644 --- a/engines/parallaction/exec_br.cpp +++ b/engines/parallaction/exec_br.cpp @@ -62,11 +62,13 @@ namespace Parallaction { -typedef OpcodeImpl OpcodeV2; -#define COMMAND_OPCODE(op) OpcodeV2(this, &Parallaction_br::cmdOp_##op) +#define SetOpcodeTable(x) table = &x; + +typedef Common::Functor0Mem OpcodeV2; +#define COMMAND_OPCODE(op) table->push_back(new OpcodeV2(this, &Parallaction_br::cmdOp_##op)) #define DECLARE_COMMAND_OPCODE(op) void Parallaction_br::cmdOp_##op() -#define INSTRUCTION_OPCODE(op) OpcodeV2(this, &Parallaction_br::instOp_##op) +#define INSTRUCTION_OPCODE(op) table->push_back(new OpcodeV2(this, &Parallaction_br::instOp_##op)) #define DECLARE_INSTRUCTION_OPCODE(op) void Parallaction_br::instOp_##op() void Parallaction_br::setupSubtitles(char *s, char *s2, int y) { @@ -498,95 +500,85 @@ DECLARE_INSTRUCTION_OPCODE(endscript) { void Parallaction_br::initOpcodes() { - static const OpcodeV2 op1[] = { - COMMAND_OPCODE(invalid), - COMMAND_OPCODE(set), - COMMAND_OPCODE(clear), - COMMAND_OPCODE(start), - COMMAND_OPCODE(speak), - COMMAND_OPCODE(get), - COMMAND_OPCODE(location), - COMMAND_OPCODE(open), - COMMAND_OPCODE(close), - COMMAND_OPCODE(on), - COMMAND_OPCODE(off), - COMMAND_OPCODE(call), - COMMAND_OPCODE(toggle), - COMMAND_OPCODE(drop), - COMMAND_OPCODE(quit), - COMMAND_OPCODE(move), - COMMAND_OPCODE(stop), - COMMAND_OPCODE(character), - COMMAND_OPCODE(followme), - COMMAND_OPCODE(onmouse), - COMMAND_OPCODE(offmouse), - COMMAND_OPCODE(add), - COMMAND_OPCODE(leave), - COMMAND_OPCODE(inc), - COMMAND_OPCODE(dec), - COMMAND_OPCODE(ifeq), - COMMAND_OPCODE(iflt), - COMMAND_OPCODE(ifgt), - COMMAND_OPCODE(let), - COMMAND_OPCODE(music), - COMMAND_OPCODE(fix), - COMMAND_OPCODE(unfix), - COMMAND_OPCODE(zeta), - COMMAND_OPCODE(scroll), - COMMAND_OPCODE(swap), - COMMAND_OPCODE(give), - COMMAND_OPCODE(text), - COMMAND_OPCODE(part), - COMMAND_OPCODE(testsfx), - COMMAND_OPCODE(ret), - COMMAND_OPCODE(onsave), - COMMAND_OPCODE(offsave) - }; - - uint i; - for (i = 0; i < ARRAYSIZE(op1); i++) - _commandOpcodes.push_back(&op1[i]); - - - static const OpcodeV2 op2[] = { - INSTRUCTION_OPCODE(invalid), - INSTRUCTION_OPCODE(on), - INSTRUCTION_OPCODE(off), - INSTRUCTION_OPCODE(set), // x - INSTRUCTION_OPCODE(set), // y - INSTRUCTION_OPCODE(set), // z - INSTRUCTION_OPCODE(set), // f - INSTRUCTION_OPCODE(loop), - INSTRUCTION_OPCODE(endloop), - INSTRUCTION_OPCODE(null), // show - INSTRUCTION_OPCODE(inc), - INSTRUCTION_OPCODE(inc), // dec - INSTRUCTION_OPCODE(set), - INSTRUCTION_OPCODE(put), - INSTRUCTION_OPCODE(call), - INSTRUCTION_OPCODE(wait), - INSTRUCTION_OPCODE(start), - INSTRUCTION_OPCODE(process), - INSTRUCTION_OPCODE(move), - INSTRUCTION_OPCODE(color), - INSTRUCTION_OPCODE(process), // sound - INSTRUCTION_OPCODE(mask), - INSTRUCTION_OPCODE(print), - INSTRUCTION_OPCODE(text), - INSTRUCTION_OPCODE(inc), // mul - INSTRUCTION_OPCODE(inc), // div - INSTRUCTION_OPCODE(ifeq), - INSTRUCTION_OPCODE(iflt), - INSTRUCTION_OPCODE(ifgt), - INSTRUCTION_OPCODE(endif), - INSTRUCTION_OPCODE(stop), - INSTRUCTION_OPCODE(endscript) - }; - - for (i = 0; i < ARRAYSIZE(op2); i++) - _instructionOpcodes.push_back(&op2[i]); - - + Common::Array *table = 0; + + SetOpcodeTable(_commandOpcodes); + COMMAND_OPCODE(invalid); + COMMAND_OPCODE(set); + COMMAND_OPCODE(clear); + COMMAND_OPCODE(start); + COMMAND_OPCODE(speak); + COMMAND_OPCODE(get); + COMMAND_OPCODE(location); + COMMAND_OPCODE(open); + COMMAND_OPCODE(close); + COMMAND_OPCODE(on); + COMMAND_OPCODE(off); + COMMAND_OPCODE(call); + COMMAND_OPCODE(toggle); + COMMAND_OPCODE(drop); + COMMAND_OPCODE(quit); + COMMAND_OPCODE(move); + COMMAND_OPCODE(stop); + COMMAND_OPCODE(character); + COMMAND_OPCODE(followme); + COMMAND_OPCODE(onmouse); + COMMAND_OPCODE(offmouse); + COMMAND_OPCODE(add); + COMMAND_OPCODE(leave); + COMMAND_OPCODE(inc); + COMMAND_OPCODE(dec); + COMMAND_OPCODE(ifeq); + COMMAND_OPCODE(iflt); + COMMAND_OPCODE(ifgt); + COMMAND_OPCODE(let); + COMMAND_OPCODE(music); + COMMAND_OPCODE(fix); + COMMAND_OPCODE(unfix); + COMMAND_OPCODE(zeta); + COMMAND_OPCODE(scroll); + COMMAND_OPCODE(swap); + COMMAND_OPCODE(give); + COMMAND_OPCODE(text); + COMMAND_OPCODE(part); + COMMAND_OPCODE(testsfx); + COMMAND_OPCODE(ret); + COMMAND_OPCODE(onsave); + COMMAND_OPCODE(offsave); + + SetOpcodeTable(_instructionOpcodes); + INSTRUCTION_OPCODE(invalid); + INSTRUCTION_OPCODE(on); + INSTRUCTION_OPCODE(off); + INSTRUCTION_OPCODE(set); // x + INSTRUCTION_OPCODE(set); // y + INSTRUCTION_OPCODE(set); // z + INSTRUCTION_OPCODE(set); // f + INSTRUCTION_OPCODE(loop); + INSTRUCTION_OPCODE(endloop); + INSTRUCTION_OPCODE(null); // show + INSTRUCTION_OPCODE(inc); + INSTRUCTION_OPCODE(inc); // dec + INSTRUCTION_OPCODE(set); + INSTRUCTION_OPCODE(put); + INSTRUCTION_OPCODE(call); + INSTRUCTION_OPCODE(wait); + INSTRUCTION_OPCODE(start); + INSTRUCTION_OPCODE(process); + INSTRUCTION_OPCODE(move); + INSTRUCTION_OPCODE(color); + INSTRUCTION_OPCODE(process); // sound + INSTRUCTION_OPCODE(mask); + INSTRUCTION_OPCODE(print); + INSTRUCTION_OPCODE(text); + INSTRUCTION_OPCODE(inc); // mul + INSTRUCTION_OPCODE(inc); // div + INSTRUCTION_OPCODE(ifeq); + INSTRUCTION_OPCODE(iflt); + INSTRUCTION_OPCODE(ifgt); + INSTRUCTION_OPCODE(endif); + INSTRUCTION_OPCODE(stop); + INSTRUCTION_OPCODE(endscript); } #if 0 diff --git a/engines/parallaction/exec_ns.cpp b/engines/parallaction/exec_ns.cpp index 68ae91c73e..a4b372f42a 100644 --- a/engines/parallaction/exec_ns.cpp +++ b/engines/parallaction/exec_ns.cpp @@ -50,12 +50,13 @@ namespace Parallaction { #define INST_MOVE 18 #define INST_ENDSCRIPT 19 +#define SetOpcodeTable(x) table = &x; -typedef OpcodeImpl OpcodeV1; -#define COMMAND_OPCODE(op) OpcodeV1(this, &Parallaction_ns::cmdOp_##op) +typedef Common::Functor0Mem OpcodeV2; +#define COMMAND_OPCODE(op) table->push_back(new OpcodeV2(this, &Parallaction_ns::cmdOp_##op)) #define DECLARE_COMMAND_OPCODE(op) void Parallaction_ns::cmdOp_##op() -#define INSTRUCTION_OPCODE(op) OpcodeV1(this, &Parallaction_ns::instOp_##op) +#define INSTRUCTION_OPCODE(op) table->push_back(new OpcodeV2(this, &Parallaction_ns::instOp_##op)) #define DECLARE_INSTRUCTION_OPCODE(op) void Parallaction_ns::instOp_##op() @@ -653,56 +654,48 @@ ZonePtr Parallaction::hitZone(uint32 type, uint16 x, uint16 y) { void Parallaction_ns::initOpcodes() { - static const OpcodeV1 op1[] = { - INSTRUCTION_OPCODE(invalid), - INSTRUCTION_OPCODE(on), - INSTRUCTION_OPCODE(off), - INSTRUCTION_OPCODE(set), // x - INSTRUCTION_OPCODE(set), // y - INSTRUCTION_OPCODE(set), // z - INSTRUCTION_OPCODE(set), // f - INSTRUCTION_OPCODE(loop), - INSTRUCTION_OPCODE(endloop), - INSTRUCTION_OPCODE(null), - INSTRUCTION_OPCODE(inc), - INSTRUCTION_OPCODE(inc), // dec - INSTRUCTION_OPCODE(set), - INSTRUCTION_OPCODE(put), - INSTRUCTION_OPCODE(call), - INSTRUCTION_OPCODE(wait), - INSTRUCTION_OPCODE(start), - INSTRUCTION_OPCODE(sound), - INSTRUCTION_OPCODE(move), - INSTRUCTION_OPCODE(endscript) - }; - - uint i; - for (i = 0; i < ARRAYSIZE(op1); i++) - _instructionOpcodes.push_back(&op1[i]); - - static const OpcodeV1 op3[] = { - COMMAND_OPCODE(invalid), - COMMAND_OPCODE(set), - COMMAND_OPCODE(clear), - COMMAND_OPCODE(start), - COMMAND_OPCODE(speak), - COMMAND_OPCODE(get), - COMMAND_OPCODE(location), - COMMAND_OPCODE(open), - COMMAND_OPCODE(close), - COMMAND_OPCODE(on), - COMMAND_OPCODE(off), - COMMAND_OPCODE(call), - COMMAND_OPCODE(toggle), - COMMAND_OPCODE(drop), - COMMAND_OPCODE(quit), - COMMAND_OPCODE(move), - COMMAND_OPCODE(stop) - }; - - for (i = 0; i < ARRAYSIZE(op3); i++) - _commandOpcodes.push_back(&op3[i]); - + Common::Array *table = 0; + + SetOpcodeTable(_instructionOpcodes); + INSTRUCTION_OPCODE(invalid); + INSTRUCTION_OPCODE(on); + INSTRUCTION_OPCODE(off); + INSTRUCTION_OPCODE(set); // x + INSTRUCTION_OPCODE(set); // y + INSTRUCTION_OPCODE(set); // z + INSTRUCTION_OPCODE(set); // f + INSTRUCTION_OPCODE(loop); + INSTRUCTION_OPCODE(endloop); + INSTRUCTION_OPCODE(null); + INSTRUCTION_OPCODE(inc); + INSTRUCTION_OPCODE(inc); // dec + INSTRUCTION_OPCODE(set); + INSTRUCTION_OPCODE(put); + INSTRUCTION_OPCODE(call); + INSTRUCTION_OPCODE(wait); + INSTRUCTION_OPCODE(start); + INSTRUCTION_OPCODE(sound); + INSTRUCTION_OPCODE(move); + INSTRUCTION_OPCODE(endscript); + + SetOpcodeTable(_commandOpcodes); + COMMAND_OPCODE(invalid); + COMMAND_OPCODE(set); + COMMAND_OPCODE(clear); + COMMAND_OPCODE(start); + COMMAND_OPCODE(speak); + COMMAND_OPCODE(get); + COMMAND_OPCODE(location); + COMMAND_OPCODE(open); + COMMAND_OPCODE(close); + COMMAND_OPCODE(on); + COMMAND_OPCODE(off); + COMMAND_OPCODE(call); + COMMAND_OPCODE(toggle); + COMMAND_OPCODE(drop); + COMMAND_OPCODE(quit); + COMMAND_OPCODE(move); + COMMAND_OPCODE(stop); } diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h index d600f9eb9d..fa5d0527ed 100644 --- a/engines/parallaction/parser.h +++ b/engines/parallaction/parser.h @@ -59,31 +59,7 @@ public: }; - -class Opcode { - -public: - virtual void operator()() const = 0; - virtual ~Opcode() { } -}; - -template -class OpcodeImpl : public Opcode { - - typedef void (T::*Fn)(); - - T* _instance; - Fn _fn; - -public: - OpcodeImpl(T* instance, const Fn &fn) : _instance(instance), _fn(fn) { } - - void operator()() const { - (_instance->*_fn)(); - } - -}; - +typedef Common::Functor0 Opcode; typedef Common::Array OpcodeSet; @@ -232,6 +208,11 @@ protected: uint _numForwardedCommands; void init(); + void clearSet(OpcodeSet &opcodes) { + for (Common::Array::iterator i = opcodes.begin(); i != opcodes.end(); ++i) + delete *i; + opcodes.clear(); + } public: LocationParser_ns(Parallaction_ns *vm) : _vm(vm) { @@ -243,6 +224,13 @@ public: delete _locationStmt; delete _zoneTypeNames; delete _zoneFlagNames; + + delete _parser; + + clearSet(_commandParsers); + clearSet(_locationAnimParsers); + clearSet(_locationZoneParsers); + clearSet(_locationParsers); } void parse(Script *script); @@ -356,6 +344,11 @@ protected: virtual void parseRValue(ScriptVar &var, const char *str); void init(); + void clearSet(OpcodeSet &opcodes) { + for (Common::Array::iterator i = opcodes.begin(); i != opcodes.end(); ++i) + delete *i; + opcodes.clear(); + } public: ProgramParser_ns(Parallaction_ns *vm) : _vm(vm) { @@ -364,6 +357,7 @@ public: virtual ~ProgramParser_ns() { delete _instructionNames; + clearSet(_instructionParsers); } void parse(Script *script, ProgramPtr program); @@ -395,6 +389,8 @@ public: virtual ~ProgramParser_br() { delete _instructionNames; + delete _parser; + } }; diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp index d9dd2ef5c8..cebda4b5ed 100644 --- a/engines/parallaction/parser_br.cpp +++ b/engines/parallaction/parser_br.cpp @@ -288,6 +288,20 @@ const char *_instructionNamesRes_br[] = { }; +#define SetOpcodeTable(x) table = &x; + +typedef Common::Functor0Mem OpcodeV1; +#define INSTRUCTION_PARSER(sig) table->push_back(new OpcodeV1(this, &ProgramParser_br::instParse_##sig)) + +typedef Common::Functor0Mem OpcodeV2; +#define ZONE_PARSER(sig) table->push_back(new OpcodeV2(this, &LocationParser_br::locZoneParse_##sig)) +#define ANIM_PARSER(sig) table->push_back(new OpcodeV2(this, &LocationParser_br::locAnimParse_##sig)) +#define LOCATION_PARSER(sig) table->push_back(new OpcodeV2(this, &LocationParser_br::locParse_##sig)) +#define COMMAND_PARSER(sig) table->push_back(new OpcodeV2(this, &LocationParser_br::cmdParse_##sig)) + +#define WARNING_PARSER(sig) table->push_back(new OpcodeV2(this, &LocationParser_br::warning_##sig)) + + #define DECLARE_ZONE_PARSER(sig) void LocationParser_br::locZoneParse_##sig() #define DECLARE_ANIM_PARSER(sig) void LocationParser_br::locAnimParse_##sig() #define DECLARE_COMMAND_PARSER(sig) void LocationParser_br::cmdParse_##sig() @@ -940,16 +954,6 @@ void ProgramParser_br::parseRValue(ScriptVar &v, const char *str) { } -typedef OpcodeImpl OpcodeV2; -#define ZONE_PARSER(sig) OpcodeV2(this, &LocationParser_br::locZoneParse_##sig) -#define ANIM_PARSER(sig) OpcodeV2(this, &LocationParser_br::locAnimParse_##sig) -#define LOCATION_PARSER(sig) OpcodeV2(this, &LocationParser_br::locParse_##sig) -#define COMMAND_PARSER(sig) OpcodeV2(this, &LocationParser_br::cmdParse_##sig) -#define WARNING_PARSER(sig) OpcodeV2(this, &LocationParser_br::warning_##sig) - -typedef OpcodeImpl OpcodeV3; -#define INSTRUCTION_PARSER(sig) OpcodeV3(this, &ProgramParser_br::instParse_##sig) - void LocationParser_br::init() { @@ -963,118 +967,101 @@ void LocationParser_br::init() { _locationZoneStmt = new Table(ARRAYSIZE(_locationZoneStmtRes_br), _locationZoneStmtRes_br); _locationAnimStmt = new Table(ARRAYSIZE(_locationAnimStmtRes_br), _locationAnimStmtRes_br); - - int i; - - static const OpcodeV2 op2[] = { - WARNING_PARSER(unexpected), - COMMAND_PARSER(flags), // set - COMMAND_PARSER(flags), // clear - COMMAND_PARSER(zone), // start - COMMAND_PARSER(zone), // speak - COMMAND_PARSER(zone), // get - COMMAND_PARSER(location), - COMMAND_PARSER(zone), // open - COMMAND_PARSER(zone), // close - COMMAND_PARSER(zone), // on - COMMAND_PARSER(zone), // off - COMMAND_PARSER(call), - COMMAND_PARSER(flags), // toggle - COMMAND_PARSER(drop), - COMMAND_PARSER(simple), // quit - COMMAND_PARSER(move), - COMMAND_PARSER(zone), // stop - COMMAND_PARSER(string), // character - COMMAND_PARSER(string), // followme - COMMAND_PARSER(simple), // onmouse - COMMAND_PARSER(simple), // offmouse - COMMAND_PARSER(drop), // add - COMMAND_PARSER(zone), // leave - COMMAND_PARSER(math), // inc - COMMAND_PARSER(math), // dec - COMMAND_PARSER(test), // test - WARNING_PARSER(unexpected), - WARNING_PARSER(unexpected), - COMMAND_PARSER(math), // let - COMMAND_PARSER(music), - COMMAND_PARSER(zone), // fix - COMMAND_PARSER(zone), // unfix - COMMAND_PARSER(zeta), - COMMAND_PARSER(unary), // scroll - COMMAND_PARSER(string), // swap - COMMAND_PARSER(give), - COMMAND_PARSER(text), - COMMAND_PARSER(unary), // part - WARNING_PARSER(unexpected), - COMMAND_PARSER(simple), // return - COMMAND_PARSER(simple), // onsave - COMMAND_PARSER(simple), // offsave - COMMAND_PARSER(endcommands), // endcommands - COMMAND_PARSER(ifchar), - COMMAND_PARSER(endif) - }; - - for (i = 0; i < ARRAYSIZE(op2); i++) - _commandParsers.push_back(&op2[i]); - - static const OpcodeV2 op4[] = { - WARNING_PARSER(unexpected), - LOCATION_PARSER(character), - LOCATION_PARSER(endlocation), - LOCATION_PARSER(ifchar), - LOCATION_PARSER(null), // endif - LOCATION_PARSER(location), - LOCATION_PARSER(mask), - LOCATION_PARSER(path), - LOCATION_PARSER(null), // disk - LOCATION_PARSER(localflags), - LOCATION_PARSER(commands), - LOCATION_PARSER(escape), - LOCATION_PARSER(acommands), - LOCATION_PARSER(flags), - LOCATION_PARSER(comment), - LOCATION_PARSER(endcomment), - LOCATION_PARSER(zone), - LOCATION_PARSER(animation), - LOCATION_PARSER(zeta), - LOCATION_PARSER(music), - LOCATION_PARSER(sound) - }; - - for (i = 0; i < ARRAYSIZE(op4); i++) - _locationParsers.push_back(&op4[i]); - - static const OpcodeV2 op5[] = { - WARNING_PARSER(unexpected), - ZONE_PARSER(endzone), - ZONE_PARSER(limits), - ZONE_PARSER(moveto), - ZONE_PARSER(type), - ZONE_PARSER(commands), - ZONE_PARSER(label), - ZONE_PARSER(flags) - }; - - for (i = 0; i < ARRAYSIZE(op5); i++) - _locationZoneParsers.push_back(&op5[i]); - - static const OpcodeV2 op6[] = { - WARNING_PARSER(unexpected), - ANIM_PARSER(endanimation), - ANIM_PARSER(endanimation), // endzone - ANIM_PARSER(script), - ANIM_PARSER(commands), - ANIM_PARSER(type), - ANIM_PARSER(label), - ANIM_PARSER(flags), - ANIM_PARSER(file), - ANIM_PARSER(position), - ANIM_PARSER(moveto) - }; - - for (i = 0; i < ARRAYSIZE(op6); i++) - _locationAnimParsers.push_back(&op6[i]); - + Common::Array *table = 0; + + SetOpcodeTable(_commandParsers); + WARNING_PARSER(unexpected); + COMMAND_PARSER(flags); // set + COMMAND_PARSER(flags); // clear + COMMAND_PARSER(zone); // start + COMMAND_PARSER(zone); // speak + COMMAND_PARSER(zone); // get + COMMAND_PARSER(location); + COMMAND_PARSER(zone); // open + COMMAND_PARSER(zone); // close + COMMAND_PARSER(zone); // on + COMMAND_PARSER(zone); // off + COMMAND_PARSER(call); + COMMAND_PARSER(flags); // toggle + COMMAND_PARSER(drop); + COMMAND_PARSER(simple); // quit + COMMAND_PARSER(move); + COMMAND_PARSER(zone); // stop + COMMAND_PARSER(string); // character + COMMAND_PARSER(string); // followme + COMMAND_PARSER(simple); // onmouse + COMMAND_PARSER(simple); // offmouse + COMMAND_PARSER(drop); // add + COMMAND_PARSER(zone); // leave + COMMAND_PARSER(math); // inc + COMMAND_PARSER(math); // dec + COMMAND_PARSER(test); // test + WARNING_PARSER(unexpected); + WARNING_PARSER(unexpected); + COMMAND_PARSER(math); // let + COMMAND_PARSER(music); + COMMAND_PARSER(zone); // fix + COMMAND_PARSER(zone); // unfix + COMMAND_PARSER(zeta); + COMMAND_PARSER(unary); // scroll + COMMAND_PARSER(string); // swap + COMMAND_PARSER(give); + COMMAND_PARSER(text); + COMMAND_PARSER(unary); // part + WARNING_PARSER(unexpected); + COMMAND_PARSER(simple); // return + COMMAND_PARSER(simple); // onsave + COMMAND_PARSER(simple); // offsave + COMMAND_PARSER(endcommands); // endcommands + COMMAND_PARSER(ifchar); + COMMAND_PARSER(endif); + + SetOpcodeTable(_locationParsers); + WARNING_PARSER(unexpected); + LOCATION_PARSER(character); + LOCATION_PARSER(endlocation); + LOCATION_PARSER(ifchar); + LOCATION_PARSER(null); // endif + LOCATION_PARSER(location); + LOCATION_PARSER(mask); + LOCATION_PARSER(path); + LOCATION_PARSER(null); // disk + LOCATION_PARSER(localflags); + LOCATION_PARSER(commands); + LOCATION_PARSER(escape); + LOCATION_PARSER(acommands); + LOCATION_PARSER(flags); + LOCATION_PARSER(comment); + LOCATION_PARSER(endcomment); + LOCATION_PARSER(zone); + LOCATION_PARSER(animation); + LOCATION_PARSER(zeta); + LOCATION_PARSER(music); + LOCATION_PARSER(sound); + + SetOpcodeTable(_locationZoneParsers); + WARNING_PARSER(unexpected); + ZONE_PARSER(endzone); + ZONE_PARSER(limits); + ZONE_PARSER(moveto); + ZONE_PARSER(type); + ZONE_PARSER(commands); + ZONE_PARSER(label); + ZONE_PARSER(flags); + + + SetOpcodeTable(_locationAnimParsers); + WARNING_PARSER(unexpected); + ANIM_PARSER(endanimation); + ANIM_PARSER(endanimation); // endzone + ANIM_PARSER(script); + ANIM_PARSER(commands); + ANIM_PARSER(type); + ANIM_PARSER(label); + ANIM_PARSER(flags); + ANIM_PARSER(file); + ANIM_PARSER(position); + ANIM_PARSER(moveto); } void ProgramParser_br::init() { @@ -1083,45 +1070,41 @@ void ProgramParser_br::init() { _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes_br), _instructionNamesRes_br); - static const OpcodeV3 op0[] = { - INSTRUCTION_PARSER(defLocal), // invalid opcode -> local definition - INSTRUCTION_PARSER(zone), // on - INSTRUCTION_PARSER(zone), // off - INSTRUCTION_PARSER(x), - INSTRUCTION_PARSER(y), - INSTRUCTION_PARSER(z), - INSTRUCTION_PARSER(f), - INSTRUCTION_PARSER(loop), - INSTRUCTION_PARSER(null), // endloop - INSTRUCTION_PARSER(null), // show - INSTRUCTION_PARSER(inc), - INSTRUCTION_PARSER(inc), // dec - INSTRUCTION_PARSER(set), - INSTRUCTION_PARSER(put), - INSTRUCTION_PARSER(call), - INSTRUCTION_PARSER(null), // wait - INSTRUCTION_PARSER(zone), // start - INSTRUCTION_PARSER(zone), // process - INSTRUCTION_PARSER(move), - INSTRUCTION_PARSER(color), - INSTRUCTION_PARSER(zone), // sound - INSTRUCTION_PARSER(mask), - INSTRUCTION_PARSER(print), - INSTRUCTION_PARSER(text), - INSTRUCTION_PARSER(inc), // mul - INSTRUCTION_PARSER(inc), // div - INSTRUCTION_PARSER(if_op), - INSTRUCTION_PARSER(null), - INSTRUCTION_PARSER(null), - INSTRUCTION_PARSER(endif), - INSTRUCTION_PARSER(zone), // stop - INSTRUCTION_PARSER(endscript) - }; - - uint i; - for (i = 0; i < ARRAYSIZE(op0); i++) - _instructionParsers.push_back(&op0[i]); - + Common::Array *table = 0; + + SetOpcodeTable(_instructionParsers); + INSTRUCTION_PARSER(defLocal); // invalid opcode -> local definition + INSTRUCTION_PARSER(zone); // on + INSTRUCTION_PARSER(zone); // off + INSTRUCTION_PARSER(x); + INSTRUCTION_PARSER(y); + INSTRUCTION_PARSER(z); + INSTRUCTION_PARSER(f); + INSTRUCTION_PARSER(loop); + INSTRUCTION_PARSER(null); // endloop + INSTRUCTION_PARSER(null); // show + INSTRUCTION_PARSER(inc); + INSTRUCTION_PARSER(inc); // dec + INSTRUCTION_PARSER(set); + INSTRUCTION_PARSER(put); + INSTRUCTION_PARSER(call); + INSTRUCTION_PARSER(null); // wait + INSTRUCTION_PARSER(zone); // start + INSTRUCTION_PARSER(zone); // process + INSTRUCTION_PARSER(move); + INSTRUCTION_PARSER(color); + INSTRUCTION_PARSER(zone); // sound + INSTRUCTION_PARSER(mask); + INSTRUCTION_PARSER(print); + INSTRUCTION_PARSER(text); + INSTRUCTION_PARSER(inc); // mul + INSTRUCTION_PARSER(inc); // div + INSTRUCTION_PARSER(if_op); + INSTRUCTION_PARSER(null); + INSTRUCTION_PARSER(null); + INSTRUCTION_PARSER(endif); + INSTRUCTION_PARSER(zone); // stop + INSTRUCTION_PARSER(endscript); } void LocationParser_br::parse(Script *script) { diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index 4966d46ad3..96a4fced71 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -1146,7 +1146,7 @@ void LocationParser_ns::parseWalkNodes(WalkNodeList &list) { return; } - +/* typedef OpcodeImpl OpcodeV1; #define INSTRUCTION_PARSER(sig) OpcodeV1(this, &ProgramParser_ns::instParse_##sig) @@ -1157,6 +1157,23 @@ typedef OpcodeImpl OpcodeV2; #define COMMAND_PARSER(sig) OpcodeV2(this, &LocationParser_ns::cmdParse_##sig) #define WARNING_PARSER(sig) OpcodeV2(this, &LocationParser_br::warning_##sig) +*/ + +#define SetOpcodeTable(x) table = &x; + + +typedef Common::Functor0Mem OpcodeV1; +#define SetOpcodeTable(x) table = &x; +#define INSTRUCTION_PARSER(sig) table->push_back(new OpcodeV1(this, &ProgramParser_ns::instParse_##sig)) + +typedef Common::Functor0Mem OpcodeV2; +#define ZONE_PARSER(sig) table->push_back(new OpcodeV2(this, &LocationParser_ns::locZoneParse_##sig)) +#define ANIM_PARSER(sig) table->push_back(new OpcodeV2(this, &LocationParser_ns::locAnimParse_##sig)) +#define LOCATION_PARSER(sig) table->push_back(new OpcodeV2(this, &LocationParser_ns::locParse_##sig)) +#define COMMAND_PARSER(sig) table->push_back(new OpcodeV2(this, &LocationParser_ns::cmdParse_##sig)) + +#define WARNING_PARSER(sig) table->push_back(new OpcodeV2(this, &LocationParser_br::warning_##sig)) + void LocationParser_ns::init() { @@ -1169,85 +1186,67 @@ void LocationParser_ns::init() { _locationZoneStmt = new Table(ARRAYSIZE(_locationZoneStmtRes_ns), _locationZoneStmtRes_ns); _locationAnimStmt = new Table(ARRAYSIZE(_locationAnimStmtRes_ns), _locationAnimStmtRes_ns); - uint i; - - static const OpcodeV2 op2[] = { - WARNING_PARSER(unexpected), - COMMAND_PARSER(flags), // set - COMMAND_PARSER(flags), // clear - COMMAND_PARSER(zone), // start - COMMAND_PARSER(zone), // speak - COMMAND_PARSER(zone), // get - COMMAND_PARSER(location), // location - COMMAND_PARSER(zone), // open - COMMAND_PARSER(zone), // close - COMMAND_PARSER(zone), // on - COMMAND_PARSER(zone), // off - COMMAND_PARSER(call), // call - COMMAND_PARSER(flags), // toggle - COMMAND_PARSER(drop), // drop - COMMAND_PARSER(simple), // quit - COMMAND_PARSER(move), // move - COMMAND_PARSER(zone), // stop - COMMAND_PARSER(endcommands), // endcommands - COMMAND_PARSER(endcommands) // endzone - }; - - for (i = 0; i < ARRAYSIZE(op2); i++) - _commandParsers.push_back(&op2[i]); - - - static const OpcodeV2 op4[] = { - WARNING_PARSER(unexpected), - LOCATION_PARSER(endlocation), - LOCATION_PARSER(location), - LOCATION_PARSER(disk), - LOCATION_PARSER(nodes), - LOCATION_PARSER(zone), - LOCATION_PARSER(animation), - LOCATION_PARSER(localflags), - LOCATION_PARSER(commands), - LOCATION_PARSER(acommands), - LOCATION_PARSER(flags), - LOCATION_PARSER(comment), - LOCATION_PARSER(endcomment), - LOCATION_PARSER(sound), - LOCATION_PARSER(music) - }; - - for (i = 0; i < ARRAYSIZE(op4); i++) - _locationParsers.push_back(&op4[i]); - - static const OpcodeV2 op5[] = { - WARNING_PARSER(unexpected), - ZONE_PARSER(limits), - ZONE_PARSER(moveto), - ZONE_PARSER(type), - ZONE_PARSER(commands), - ZONE_PARSER(label), - ZONE_PARSER(flags), - ZONE_PARSER(endzone) - }; - - for (i = 0; i < ARRAYSIZE(op5); i++) - _locationZoneParsers.push_back(&op5[i]); - - static const OpcodeV2 op6[] = { - WARNING_PARSER(unexpected), - ANIM_PARSER(script), - ANIM_PARSER(commands), - ANIM_PARSER(type), - ANIM_PARSER(label), - ANIM_PARSER(flags), - ANIM_PARSER(file), - ANIM_PARSER(position), - ANIM_PARSER(moveto), - ANIM_PARSER(endanimation) - }; - - for (i = 0; i < ARRAYSIZE(op6); i++) - _locationAnimParsers.push_back(&op6[i]); - + Common::Array *table = 0; + + SetOpcodeTable(_commandParsers); + WARNING_PARSER(unexpected); + COMMAND_PARSER(flags); // set + COMMAND_PARSER(flags); // clear + COMMAND_PARSER(zone); // start + COMMAND_PARSER(zone); // speak + COMMAND_PARSER(zone); // get + COMMAND_PARSER(location); // location + COMMAND_PARSER(zone); // open + COMMAND_PARSER(zone); // close + COMMAND_PARSER(zone); // on + COMMAND_PARSER(zone); // off + COMMAND_PARSER(call); // call + COMMAND_PARSER(flags); // toggle + COMMAND_PARSER(drop); // drop + COMMAND_PARSER(simple); // quit + COMMAND_PARSER(move); // move + COMMAND_PARSER(zone); // stop + COMMAND_PARSER(endcommands); // endcommands + COMMAND_PARSER(endcommands); // endzone + + SetOpcodeTable(_locationParsers); + WARNING_PARSER(unexpected); + LOCATION_PARSER(endlocation); + LOCATION_PARSER(location); + LOCATION_PARSER(disk); + LOCATION_PARSER(nodes); + LOCATION_PARSER(zone); + LOCATION_PARSER(animation); + LOCATION_PARSER(localflags); + LOCATION_PARSER(commands); + LOCATION_PARSER(acommands); + LOCATION_PARSER(flags); + LOCATION_PARSER(comment); + LOCATION_PARSER(endcomment); + LOCATION_PARSER(sound); + LOCATION_PARSER(music); + + SetOpcodeTable(_locationZoneParsers); + WARNING_PARSER(unexpected); + ZONE_PARSER(limits); + ZONE_PARSER(moveto); + ZONE_PARSER(type); + ZONE_PARSER(commands); + ZONE_PARSER(label); + ZONE_PARSER(flags); + ZONE_PARSER(endzone); + + SetOpcodeTable(_locationAnimParsers); + WARNING_PARSER(unexpected); + ANIM_PARSER(script); + ANIM_PARSER(commands); + ANIM_PARSER(type); + ANIM_PARSER(label); + ANIM_PARSER(flags); + ANIM_PARSER(file); + ANIM_PARSER(position); + ANIM_PARSER(moveto); + ANIM_PARSER(endanimation); } @@ -1257,32 +1256,28 @@ void ProgramParser_ns::init() { _instructionNames = new Table(ARRAYSIZE(_instructionNamesRes_ns), _instructionNamesRes_ns); - static const OpcodeV1 op0[] = { - INSTRUCTION_PARSER(defLocal), // invalid opcode -> local definition - INSTRUCTION_PARSER(animation), // on - INSTRUCTION_PARSER(animation), // off - INSTRUCTION_PARSER(x), - INSTRUCTION_PARSER(y), - INSTRUCTION_PARSER(z), - INSTRUCTION_PARSER(f), - INSTRUCTION_PARSER(loop), - INSTRUCTION_PARSER(null), // endloop - INSTRUCTION_PARSER(null), // show - INSTRUCTION_PARSER(inc), - INSTRUCTION_PARSER(inc), // dec - INSTRUCTION_PARSER(set), - INSTRUCTION_PARSER(put), - INSTRUCTION_PARSER(call), - INSTRUCTION_PARSER(null), // wait - INSTRUCTION_PARSER(animation), // start - INSTRUCTION_PARSER(sound), - INSTRUCTION_PARSER(move), - INSTRUCTION_PARSER(endscript) - }; - - for (uint i = 0; i < ARRAYSIZE(op0); i++) - _instructionParsers.push_back(&op0[i]); - + Common::Array *table = 0; + SetOpcodeTable(_instructionParsers); + INSTRUCTION_PARSER(defLocal); // invalid opcode -> local definition + INSTRUCTION_PARSER(animation); // on + INSTRUCTION_PARSER(animation); // off + INSTRUCTION_PARSER(x); + INSTRUCTION_PARSER(y); + INSTRUCTION_PARSER(z); + INSTRUCTION_PARSER(f); + INSTRUCTION_PARSER(loop); + INSTRUCTION_PARSER(null); // endloop + INSTRUCTION_PARSER(null); // show + INSTRUCTION_PARSER(inc); + INSTRUCTION_PARSER(inc); // dec + INSTRUCTION_PARSER(set); + INSTRUCTION_PARSER(put); + INSTRUCTION_PARSER(call); + INSTRUCTION_PARSER(null); // wait + INSTRUCTION_PARSER(animation); // start + INSTRUCTION_PARSER(sound); + INSTRUCTION_PARSER(move); + INSTRUCTION_PARSER(endscript); } // -- cgit v1.2.3 From 0485fbfc5be33b7219dd117fd4a14d77393e9bb2 Mon Sep 17 00:00:00 2001 From: Florian Kagerer Date: Sun, 1 Jun 2008 15:11:08 +0000 Subject: - fix 'order of evaluation' bug (MSVC release build) svn-id: r32467 --- engines/kyra/resource.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 04cfcf879a..46c73c9d3b 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -878,7 +878,8 @@ uint16 FileExpanderSource::keyMaskedAlign(uint16 val) { int16 b = ((_bitsLeft << 8) | _index) - 1; _bitsLeft = b >> 8; _index = b & 0xff; - return (((val & 3) + 4) << _index) + 0x101 + getKeyMasked(_index); + uint16 res = (((val & 3) + 4) << _index) + 0x101; + return res + getKeyMasked(_index); } void FileExpanderSource::advSrcRefresh() { @@ -1046,7 +1047,8 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32 _src->advSrcBitsByIndex(offset < 0 ? calcCmdAndIndex(_tables[5], offset) : _tables[1][offset]); if ((offset & 0xff) >= 4) { uint8 newIndex = ((offset & 0xff) >> 1) - 1; - offset = (((offset & 1) + 2) << newIndex) + _src->getKeyMasked(newIndex); + offset = (((offset & 1) + 2) << newIndex); + offset += _src->getKeyMasked(newIndex); } uint8 *s2 = d - 1 - offset; -- cgit v1.2.3 From 85a3f389ae6020fb93786e42b5919195b800a5e9 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 1 Jun 2008 15:15:12 +0000 Subject: Some paranoia checks in TIMInterpreter::refreshTimersAfterPause. svn-id: r32468 --- engines/kyra/script_tim.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp index 812e867c53..96d6927f5d 100644 --- a/engines/kyra/script_tim.cpp +++ b/engines/kyra/script_tim.cpp @@ -186,8 +186,10 @@ void TIMInterpreter::exec(TIM *tim, bool loop) { void TIMInterpreter::refreshTimersAfterPause(uint32 elapsedTime) { for (int i = 0; i < 10; i++) { - _currentTim->func[i].lastTime += elapsedTime; - _currentTim->func[i].nextTime += elapsedTime; + if (_currentTim->func[i].lastTime) + _currentTim->func[i].lastTime += elapsedTime; + if (_currentTim->func[i].nextTime) + _currentTim->func[i].nextTime += elapsedTime; } } -- cgit v1.2.3 From cc2b35ee1f5e1f60d3ed6e619f05c7884d947b95 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 1 Jun 2008 15:18:58 +0000 Subject: Cleanup svn-id: r32469 --- engines/kyra/script_tim.cpp | 22 +++++++++++++--------- engines/kyra/script_tim.h | 6 +++++- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp index 96d6927f5d..aa4a2cd855 100644 --- a/engines/kyra/script_tim.cpp +++ b/engines/kyra/script_tim.cpp @@ -118,7 +118,8 @@ TIM *TIMInterpreter::load(const char *filename, const Common::Arrayavtl[i] = READ_LE_UINT16(tim->avtl + i); - for (int i = 0; i < 10; ++i) + int num = (avtlChunkSize < TIM::kCountFuncs) ? avtlChunkSize : TIM::kCountFuncs; + for (int i = 0; i < num; ++i) tim->func[i].avtl = tim->avtl + tim->avtl[i]; return tim; @@ -145,7 +146,7 @@ void TIMInterpreter::exec(TIM *tim, bool loop) { } do { - for (_currentFunc = 0; _currentFunc < 10; ++_currentFunc) { + for (_currentFunc = 0; _currentFunc < TIM::kCountFuncs; ++_currentFunc) { TIM::Function &cur = _currentTim->func[_currentFunc]; if (_currentTim->procFunc != -1) @@ -185,7 +186,10 @@ void TIMInterpreter::exec(TIM *tim, bool loop) { } void TIMInterpreter::refreshTimersAfterPause(uint32 elapsedTime) { - for (int i = 0; i < 10; i++) { + if (!_currentTim) + return; + + for (int i = 0; i < TIM::kCountFuncs; i++) { if (_currentTim->func[i].lastTime) _currentTim->func[i].lastTime += elapsedTime; if (_currentTim->func[i].nextTime) @@ -215,7 +219,7 @@ int TIMInterpreter::cmd_initFunc0(const uint16 *param) { } int TIMInterpreter::cmd_stopCurFunc(const uint16 *param) { - if (_currentFunc < 10) + if (_currentFunc < TIM::kCountFuncs) _currentTim->func[_currentFunc].ip = 0; if (!_currentFunc) _finished = true; @@ -224,7 +228,7 @@ int TIMInterpreter::cmd_stopCurFunc(const uint16 *param) { int TIMInterpreter::cmd_initFunc(const uint16 *param) { uint16 func = *param; - assert(func < 10); + assert(func < TIM::kCountFuncs); if (_currentTim->func[func].avtl) _currentTim->func[func].ip = _currentTim->func[func].avtl; else @@ -234,13 +238,13 @@ int TIMInterpreter::cmd_initFunc(const uint16 *param) { int TIMInterpreter::cmd_stopFunc(const uint16 *param) { uint16 func = *param; - assert(func < 10); + assert(func < TIM::kCountFuncs); _currentTim->func[func].ip = 0; return 1; } int TIMInterpreter::cmd_resetAllRuntimes(const uint16 *param) { - for (int i = 0; i < 10; ++i) { + for (int i = 0; i < TIM::kCountFuncs; ++i) { if (_currentTim->func[i].ip) _currentTim->func[i].nextTime = _system->getMillis(); } @@ -264,7 +268,7 @@ int TIMInterpreter::cmd_execOpcode(const uint16 *param) { int TIMInterpreter::cmd_initFuncNow(const uint16 *param) { uint16 func = *param; - assert(func < 10); + assert(func < TIM::kCountFuncs); _currentTim->func[func].ip = _currentTim->func[func].avtl; _currentTim->func[func].lastTime = _currentTim->func[func].nextTime = _system->getMillis(); return 1; @@ -272,7 +276,7 @@ int TIMInterpreter::cmd_initFuncNow(const uint16 *param) { int TIMInterpreter::cmd_stopFuncNow(const uint16 *param) { uint16 func = *param; - assert(func < 10); + assert(func < TIM::kCountFuncs); _currentTim->func[func].ip = 0; _currentTim->func[func].lastTime = _currentTim->func[func].nextTime = _system->getMillis(); return 1; diff --git a/engines/kyra/script_tim.h b/engines/kyra/script_tim.h index 7d5fe15b28..cd715ff4ef 100644 --- a/engines/kyra/script_tim.h +++ b/engines/kyra/script_tim.h @@ -40,6 +40,10 @@ struct TIM { int16 procFunc; uint16 procParam; + enum { + kCountFuncs = 10 + }; + struct Function { const uint16 *ip; @@ -47,7 +51,7 @@ struct TIM { uint32 nextTime; const uint16 *avtl; - } func[10]; + } func[kCountFuncs]; uint16 *avtl; uint8 *text; -- cgit v1.2.3 From dee529f30cb8db234c78504b3a4f1547be6b0a96 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Sun, 1 Jun 2008 18:09:19 +0000 Subject: Tweaks to DS makefiles. 1) It wouldn't build at all for me, because source/fat had been missed off the INCLUDES line. 2) Stray whitespace removed (to stop emacs warning on saving) 3) DS_BUILD flag selection reworked slightly. Now do: make all SCUMM_BUILD=x (where x is a,b,c,d,e,f,g) and it'll select that version and build it. If no x is supplied or x is not a-g, then version a will be built. 4) New allbuilds target. In backends/platform/ds, do: make allbuilds and versions A-G are built in turn (version G does not complete currently due to lack of logo g). This uses a 'semiclean' target in each makefile to clean just the files that change between versions. svn-id: r32470 --- backends/platform/ds/arm7/Makefile | 4 +++ backends/platform/ds/arm9/makefile | 71 +++++++++++++++++--------------------- backends/platform/ds/makefile | 18 ++++++++++ 3 files changed, 54 insertions(+), 39 deletions(-) diff --git a/backends/platform/ds/arm7/Makefile b/backends/platform/ds/arm7/Makefile index 72987512ef..55db7f8cad 100644 --- a/backends/platform/ds/arm7/Makefile +++ b/backends/platform/ds/arm7/Makefile @@ -128,6 +128,10 @@ clean: @echo clean ...$(TARGET) @rm -fr $(BUILD) *.bin +#--------------------------------------------------------------------------------- +semiclean: + @echo semiclean ...$(TARGET) + #--------------------------------------------------------------------------------- else diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index 03fea92dc1..1a4d61113e 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -5,46 +5,35 @@ DEPDIR := .deps libndsdir = $(DEVKITPRO)/libnds #libndsdir = /home/neil/devkitpror21/libnds -# Select the build you want by uncommenting one of the following lines: - - - -ifeq ($(SCUMM_BUILD),a) - DS_BUILD_A = 1 -endif - -ifeq ($(SCUMM_BUILD),b) - DS_BUILD_B = 1 -endif - -ifeq ($(SCUMM_BUILD),c) - DS_BUILD_C = 1 -endif - -ifeq ($(SCUMM_BUILD),d) - DS_BUILD_D = 1 -endif - -ifeq ($(SCUMM_BUILD),e) - DS_BUILD_E = 1 -endif - -ifeq ($(SCUMM_BUILD),f) - DS_BUILD_F = 1 -endif +# Select the build by setting SCUMM_BUILD to a,b,c,d,e,f or g. +# Anything else gets build a. ifeq ($(SCUMM_BUILD),g) DS_BUILD_G = 1 +else + ifeq ($(SCUMM_BUILD),f) + DS_BUILD_F = 1 + else + ifeq ($(SCUMM_BUILD),e) + DS_BUILD_E = 1 + else + ifeq ($(SCUMM_BUILD),d) + DS_BUILD_D = 1 + else + ifeq ($(SCUMM_BUILD),c) + DS_BUILD_C = 1 + else + ifeq ($(SCUMM_BUILD),b) + DS_BUILD_B = 1 + else + DS_BUILD_A = 1 + endif + endif + endif + endif + endif endif -#DS_BUILD_A = 1 -#DS_BUILD_B = 1 -#DS_BUILD_C = 1 -#DS_BUILD_D = 1 -#DS_BUILD_E = 1 -#DS_BUILD_F = 1 -#DS_BUILD_G = 1 - # To do: # - FAT cache? @@ -82,6 +71,9 @@ VPATH = $(srcdir) # Command to build libmad is: # ./configure --host=arm-elf --enable-speed --enable-sso -enable-fpm=arm CFLAGS='-specs=ds_arm9.specs -mthumb-interwork' +# +# I actually had to use +# ./configure --host=arm-elf --enable-speed --enable-sso -enable-fpm=arm CFLAGS='-specs=ds_arm9.specs -mthumb-interwork' LDFLAGS='C:/Progra~1/devkitpro/libnds/lib/libnds9.a' --disable-shared --disable-debugging USE_ARM_SOUND_ASM = 1 ARM = 1 @@ -190,7 +182,7 @@ endif LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -Wl,--wrap,time -mno-fpu -Wl,-Map,map.txt -INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)/source \ +INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)/source -I$(portdir)/source/fat \ -I$(portdir)/data -I$(libndsdir)/include -I$(portdir)/../commoninclude\ -I$(libndsdir)/include -I$(libndsdir)/include/nds -I$(srcdir)/engines -I$(portdir)/source/mad\ -I$(portdir)/source/libcartreset -include $(srcdir)/common/scummsys.h @@ -276,9 +268,7 @@ OPT_SIZE := -Os #-mthumb -fno-gcse -fno-schedule-insns2 - -OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS) - +OBJS := $(DATA_OBJS) $(LIBCARTRESET_OBJS) $(PORT_OBJS) $(COMPRESSOR_OBJS) $(FAT_OBJS) @@ -290,6 +280,9 @@ ndsall: include $(srcdir)/Makefile.common +semiclean: + $(RM) $(portdir)/source/dsoptions.o $(portdir)/source/dsmain.o $(FAT_OBJS) $(DATA_OBJS) $(portdir)/source/wordcompletion.o + clean: $(RM) $(OBJS) $(EXECUTABLE) rm -fr $(BUILD) diff --git a/backends/platform/ds/makefile b/backends/platform/ds/makefile index 9c88932a7f..3fb19e939c 100644 --- a/backends/platform/ds/makefile +++ b/backends/platform/ds/makefile @@ -15,6 +15,24 @@ all: @for i in $(SUBDIRS); do if test -d $$i; then make -C $$i; fi; done; clean: @for i in $(SUBDIRS); do if test -d $$i; then make -C $$i clean; fi; done; +semiclean: + @for i in $(SUBDIRS); do if test -d $$i; then make -C $$i semiclean; fi; done; export: @for i in $(SUBDIRS); do if test -d $$i; then make -C $$i export; fi; done; + +allbuilds: + make semiclean + make all SCUMM_BUILD=a + make semiclean + make all SCUMM_BUILD=b + make semiclean + make all SCUMM_BUILD=c + make semiclean + make all SCUMM_BUILD=d + make semiclean + make all SCUMM_BUILD=e + make semiclean + make all SCUMM_BUILD=f + make semiclean + make all SCUMM_BUILD=g -- cgit v1.2.3 From 37563ff3ae020ab05c314ad79630aaacf8d4c458 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 1 Jun 2008 18:37:35 +0000 Subject: Fix bug #1981402: "BS1: grammatical error in the Italian menu" svn-id: r32471 --- engines/sword1/control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/sword1/control.cpp b/engines/sword1/control.cpp index 71e25fc56f..980e0b4f9f 100644 --- a/engines/sword1/control.cpp +++ b/engines/sword1/control.cpp @@ -1225,7 +1225,7 @@ const uint8 Control::_languageStrings[8 * 20][43] = { "Testo", "Fatto", "OK", - "Annula", + "Annulla", "Musica", "Parlato", "Fx", -- cgit v1.2.3 From 8728cd2881b276f3ec6ad3bf0ac61be51eb474b8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 1 Jun 2008 19:07:13 +0000 Subject: Speed up decoding by memory caching svn-id: r32472 --- common/unarj.cpp | 26 ++++++++++++++++++++------ common/unarj.h | 2 ++ 2 files changed, 22 insertions(+), 6 deletions(-) diff --git a/common/unarj.cpp b/common/unarj.cpp index c8e48dce2c..64203d5c66 100644 --- a/common/unarj.cpp +++ b/common/unarj.cpp @@ -77,6 +77,7 @@ static uint32 GetCRC(byte *data, int len) { ArjFile::ArjFile() { InitCRC(); + _isOpen = false; } ArjFile::~ArjFile() { @@ -228,6 +229,9 @@ ArjHeader *ArjFile::readHeader() { bool ArjFile::open(const Common::String &filename, AccessMode mode) { + if (_isOpen) + error("Attempt to open another instance of archive"); + _isOpen = false; if (!_fileMap.contains(filename)) @@ -246,12 +250,22 @@ bool ArjFile::open(const Common::String &filename, AccessMode mode) { _currArchive.open(_archMap[filename]); _currArchive.seek(hdr->pos, SEEK_SET); - if (hdr->method == 0) // store + if (hdr->method == 0) { // store _currArchive.read(_uncompressedData, _origsize); - else if (hdr->method == 1 || hdr->method == 2 || hdr->method == 3) - decode(); - else if (hdr->method == 4) - decode_f(); + } else { + _compressedData = (byte *)malloc(_compsize); + _currArchive.read(_compressedData, _compsize); + + _compressed = new MemoryReadStream(_compressedData, _compsize); + + if (hdr->method == 1 || hdr->method == 2 || hdr->method == 3) + decode(); + else if (hdr->method == 4) + decode_f(); + + delete _compressed; + free(_compressedData); + } _currArchive.close(); delete _outstream; @@ -305,7 +319,7 @@ void ArjFile::fillbuf(int n) { // Shift bitbuf n bits left, read n bits _bitbuf |= _subbitbuf << (n -= _bitcount); if (_compsize != 0) { _compsize--; - _subbitbuf = _currArchive.readByte(); + _subbitbuf = _compressed->readByte(); } else _subbitbuf = 0; _bitcount = CHAR_BIT; diff --git a/common/unarj.h b/common/unarj.h index 63c6ca582d..28424f70bd 100644 --- a/common/unarj.h +++ b/common/unarj.h @@ -125,7 +125,9 @@ private: StringMap _archMap; ReadStream *_stream; byte *_uncompressedData; + byte *_compressedData; MemoryWriteStream *_outstream; + MemoryReadStream *_compressed; MemoryReadStream *_uncompressed; bool _isOpen; -- cgit v1.2.3 From 49dd9376ad6aeb42ab69362bcc2856598b19931a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 1 Jun 2008 19:07:57 +0000 Subject: More ArjFile usage svn-id: r32473 --- engines/drascula/drascula.cpp | 64 ++++++++++++++++++++----------------------- engines/drascula/drascula.h | 3 +- 2 files changed, 31 insertions(+), 36 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 0b6b618487..64c5c751c8 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1630,7 +1630,6 @@ bool DrasculaEngine::confirmExit() { void DrasculaEngine::screenSaver() { int xr, yr; byte *copia, *ghost; - Common::File file; float coeff = 0, coeff2 = 0; int count = 0; int count2 = 0; @@ -1646,12 +1645,12 @@ void DrasculaEngine::screenSaver() { ghost = (byte *)malloc(65536); // carga_ghost(); - file.open("ghost.drv"); - if (!file.isOpen()) + _arj.open("ghost.drv"); + if (!_arj.isOpen()) error("Cannot open file ghost.drv"); - file.read(ghost, 65536); - file.close(); + _arj.read(ghost, 65536); + _arj.close(); updateEvents(); xr = mouseX; @@ -1863,7 +1862,6 @@ void DrasculaEngine::playSound(int soundNum) { } bool DrasculaEngine::animate(const char *animationFile, int FPS) { - Common::File FileIn; unsigned j; int NFrames = 1; int cnt = 2; @@ -1872,17 +1870,17 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { AuxBuffLast = (byte *)malloc(65000); AuxBuffDes = (byte *)malloc(65000); - FileIn.open(animationFile); + _arj.open(animationFile); - if (!FileIn.isOpen()) { + if (!_arj.isOpen()) { error("Animation file %s not found", animationFile); } - NFrames = FileIn.readSint32LE(); - dataSize = FileIn.readSint32LE(); + NFrames = _arj.readSint32LE(); + dataSize = _arj.readSint32LE(); AuxBuffOrg = (byte *)malloc(dataSize); - FileIn.read(AuxBuffOrg, dataSize); - FileIn.read(cPal, 768); + _arj.read(AuxBuffOrg, dataSize); + _arj.read(cPal, 768); loadPCX(AuxBuffOrg); free(AuxBuffOrg); memcpy(VGA, AuxBuffDes, 64000); @@ -1892,10 +1890,10 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { memcpy(AuxBuffLast, AuxBuffDes, 64000); WaitForNext(FPS); while (cnt < NFrames) { - dataSize = FileIn.readSint32LE(); + dataSize = _arj.readSint32LE(); AuxBuffOrg = (byte *)malloc(dataSize); - FileIn.read(AuxBuffOrg, dataSize); - FileIn.read(cPal, 768); + _arj.read(AuxBuffOrg, dataSize); + _arj.read(cPal, 768); loadPCX(AuxBuffOrg); free(AuxBuffOrg); for (j = 0;j < 64000; j++) { @@ -1913,7 +1911,7 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { } free(AuxBuffLast); free(AuxBuffDes); - FileIn.close(); + _arj.close(); return ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)); } @@ -2702,9 +2700,8 @@ void DrasculaEngine::openSSN(const char *Name, int Pause) { UsingMem = 0; if (MiVideoSSN == NULL) return; - _Session = new Common::File; - _Session->open(Name); - mSession = TryInMem(_Session); + _arj.open(Name); + mSession = TryInMem(); LastFrame = _system->getMillis(); } @@ -2714,7 +2711,7 @@ int DrasculaEngine::playFrameSSN() { byte *BufferSSN; if (!UsingMem) - _Session->read(&CHUNK, 1); + _arj.read(&CHUNK, 1); else { memcpy(&CHUNK, mSession, 1); mSession += 1; @@ -2723,7 +2720,7 @@ int DrasculaEngine::playFrameSSN() { switch (CHUNK) { case kFrameSetPal: if (!UsingMem) - _Session->read(dacSSN, 768); + _arj.read(dacSSN, 768); else { memcpy(dacSSN, mSession, 768); mSession += 768; @@ -2735,8 +2732,8 @@ int DrasculaEngine::playFrameSSN() { break; case kFrameInit: if (!UsingMem) { - CMP = _Session->readByte(); - Lengt = _Session->readUint32LE(); + CMP = _arj.readByte(); + Lengt = _arj.readUint32LE(); } else { memcpy(&CMP, mSession, 1); mSession += 1; @@ -2746,7 +2743,7 @@ int DrasculaEngine::playFrameSSN() { if (CMP == kFrameCmpRle) { if (!UsingMem) { BufferSSN = (byte *)malloc(Lengt); - _Session->read(BufferSSN, Lengt); + _arj.read(BufferSSN, Lengt); } else { BufferSSN = (byte *)malloc(Lengt); memcpy(BufferSSN, mSession, Lengt); @@ -2769,7 +2766,7 @@ int DrasculaEngine::playFrameSSN() { if (CMP == kFrameCmpOff) { if (!UsingMem) { BufferSSN = (byte *)malloc(Lengt); - _Session->read(BufferSSN, Lengt); + _arj.read(BufferSSN, Lengt); } else { BufferSSN = (byte *)malloc(Lengt); memcpy(BufferSSN, mSession, Lengt); @@ -2807,24 +2804,23 @@ void DrasculaEngine::EndSSN() { if (UsingMem) free(pointer); else { - _Session->close(); - delete _Session; + _arj.close(); } } -byte *DrasculaEngine::TryInMem(Common::File *Session) { +byte *DrasculaEngine::TryInMem() { int Lengt; - Session->seek(0, SEEK_END); - Lengt = Session->pos(); - Session->seek(0, SEEK_SET); + _arj.seek(0, SEEK_END); + Lengt = _arj.pos(); + _arj.seek(0, SEEK_SET); pointer = (byte *)malloc(Lengt); if (pointer == NULL) return NULL; - Session->read(pointer, Lengt); + _arj.read(pointer, Lengt); UsingMem = 1; - Session->close(); - delete Session; + _arj.close(); + return pointer; } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 4e8a43c6dc..ec7d016a9b 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -514,7 +514,7 @@ public: void Des_RLE(byte *BufferRLE, byte *MiVideoRLE); void Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght); void set_dacSSN(byte *dacSSN); - byte *TryInMem(Common::File *Session); + byte *TryInMem(); void EndSSN(); int playFrameSSN(); @@ -524,7 +524,6 @@ public: byte *pointer; int UsingMem; - Common::File *_Session; byte CHUNK; byte CMP, dacSSN[768]; byte *MiVideoSSN; -- cgit v1.2.3 From f5d9eb32f03cb55d8d46d4622a1732f77981346b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 1 Jun 2008 20:05:21 +0000 Subject: Fixed MSVC warnings svn-id: r32474 --- common/unarj.cpp | 8 ++++---- common/unarj.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/unarj.cpp b/common/unarj.cpp index 64203d5c66..58f326c1ac 100644 --- a/common/unarj.cpp +++ b/common/unarj.cpp @@ -550,7 +550,7 @@ void ArjFile::decode() { r = 0; while (count < _origsize) { - if ((c = decode_c()) <= UCHAR_MAX) { + if ((c = decode_c()) <= ARJ_UCHAR_MAX) { _text[r] = (byte) c; count++; if (++r >= DDICSIZ) { @@ -558,7 +558,7 @@ void ArjFile::decode() { _outstream->write(_text, DDICSIZ); } } else { - j = c - (UCHAR_MAX + 1 - THRESHOLD); + j = c - (ARJ_UCHAR_MAX + 1 - THRESHOLD); count += j; i = decode_p(); if ((i = r - i - 1) < 0) @@ -591,7 +591,7 @@ void ArjFile::decode() { #define GETBITS(c,l) {if(_getlen>(CODE_BIT-l);BPUL(l)} int16 ArjFile::decode_ptr() { - int16 c; + int16 c = 0; int16 width; int16 plus; int16 pwr; @@ -612,7 +612,7 @@ int16 ArjFile::decode_ptr() { } int16 ArjFile::decode_len() { - int16 c; + int16 c = 0; int16 width; int16 plus; int16 pwr; diff --git a/common/unarj.h b/common/unarj.h index 28424f70bd..289ab52ad0 100644 --- a/common/unarj.h +++ b/common/unarj.h @@ -44,13 +44,13 @@ namespace Common { #define CODE_BIT 16 #define CHAR_BIT 8 -#define UCHAR_MAX 255 +#define ARJ_UCHAR_MAX 255 // UCHAR_MAX is defined in limits.h in MSVC #define THRESHOLD 3 #define DDICSIZ 26624 #define MAXDICBIT 16 #define MATCHBIT 8 #define MAXMATCH 256 -#define NC (UCHAR_MAX + MAXMATCH + 2 - THRESHOLD) +#define NC (ARJ_UCHAR_MAX + MAXMATCH + 2 - THRESHOLD) #define NP (MAXDICBIT + 1) #define CBIT 9 #define NT (CODE_BIT + 3) -- cgit v1.2.3 From ba5cebfaf8cdddef3bd1d814106935ab305bb410 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 1 Jun 2008 20:58:05 +0000 Subject: Now whole game could be run from original packed files. svn-id: r32475 --- engines/drascula/animation.cpp | 40 ++++---- engines/drascula/drascula.cpp | 228 ++++++++++++++++------------------------- engines/drascula/drascula.h | 17 ++- engines/drascula/rooms.cpp | 16 +-- engines/drascula/talk.cpp | 17 +-- 5 files changed, 128 insertions(+), 190 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 0bd5acde19..fd75a41031 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -107,7 +107,7 @@ void DrasculaEngine::animation_1_1() { break; if (animate("scr2.bin", 17)) break; - stopSound_corte(); + stopSound(); if (animate("scr3.bin", 17)) break; loadAndDecompressPic("cielo2.alg", screenSurface, COMPLETE_PAL); @@ -281,7 +281,7 @@ void DrasculaEngine::animation_1_1() { break; if (animate("frel.bin", 16)) break; - stopSound_corte(); + stopSound(); clearRoom(); black(); playMusic(23); @@ -417,7 +417,7 @@ void DrasculaEngine::animation_2_1() { pause(4); playSound(1); hiccup(18); - stopSound(); + finishSound(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -698,13 +698,13 @@ void DrasculaEngine::animation_2_2() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); - stopSound(); + finishSound(); pause (4); playSound(1); hipo_sin_nadie(12); - stopSound(); + finishSound(); } void DrasculaEngine::animation_3_2() { @@ -841,7 +841,7 @@ void DrasculaEngine::animation_14_2() { playSound(7); hiccup(15); - stopSound(); + finishSound(); loadAndDecompressPic("99.alg", backSurface, 1); } @@ -1178,7 +1178,7 @@ void DrasculaEngine::animation_25_2() { updateScreen(); } - stopSound(); + finishSound(); loadAndDecompressPic("99.alg", backSurface, 1); } @@ -1313,7 +1313,7 @@ void DrasculaEngine::animation_35_2() { playSound(1); hipo_sin_nadie(18); - stopSound(); + finishSound(); pause(10); @@ -1445,7 +1445,7 @@ void DrasculaEngine::animation_rayo() { updateScreen(0, 0, 0, 0, 320, 200, drawSurface3); pause(3); updateScreen(0, 0, 0, 0, 320, 200, frontSurface); - stopSound(); + finishSound(); } void DrasculaEngine::animation_2_4() { @@ -1620,7 +1620,7 @@ void DrasculaEngine::animation_5_5(){ updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); playSound(1); - stopSound(); + finishSound(); loadAndDecompressPic("99.alg", backSurface, 1); loadAndDecompressPic("97.alg", extraSurface, 1); @@ -1743,7 +1743,7 @@ void DrasculaEngine::animation_12_5() { updateScreen(); } - stopSound_corte(); + stopSound(); for (frame = 0; frame < 15; frame++) { if (frame == 2 || frame == 4 || frame == 7 || frame == 9) @@ -1769,7 +1769,7 @@ void DrasculaEngine::animation_12_5() { animation_13_5(); playSound(1); hiccup(12); - stopSound(); + finishSound(); loadAndDecompressPic("99.alg", backSurface, 1); @@ -1834,7 +1834,7 @@ void DrasculaEngine::animation_14_5() { playSound(3); updateRoom(); updateScreen(0, 0, 0,0 , 320, 200, screenSurface); - stopSound(); + finishSound(); pause(17); sentido_hare = 3; talk(246); @@ -1843,7 +1843,7 @@ void DrasculaEngine::animation_14_5() { playSound(7); updateRoom(); updateScreen(); - stopSound(); + finishSound(); pause(14); sentido_hare = 3; updateRoom(); @@ -2094,7 +2094,7 @@ void DrasculaEngine::animation_10_6() { updateRefresh_pre(); copyBackground(164, 85, 155, 48, 113, 114, drawSurface3, screenSurface); updateScreen(); - stopSound(); + finishSound(); talk_taber2(23); flags[7] = 1; } @@ -2146,7 +2146,7 @@ void DrasculaEngine::animation_19_6() { updateScreen(); playSound(4); pause(6); - stopSound(); + finishSound(); } void DrasculaEngine::animation_12_2() { @@ -2232,7 +2232,7 @@ void DrasculaEngine::animation_26_2() { pause(3); } - stopSound_corte(); + stopSound(); updateAnim(121, 225, 113, 50, 59, 6, extraSurface); @@ -2303,7 +2303,7 @@ void DrasculaEngine::animation_22_2() { updateRoom(); updateScreen(); playSound(13); - stopSound(); + finishSound(); sentido_hare = 1; talk_vbpuerta(1); @@ -2381,7 +2381,7 @@ void DrasculaEngine::animation_34_2() { updateAnim(1, 218, 79, 83, 75, 3, extraSurface); - stopSound(); + finishSound(); pause(30); @@ -2493,7 +2493,7 @@ void DrasculaEngine::animation_5_2() { playSound(1); updateAnim(86, 213, 66, 53, 84, 6, frontSurface); - stopSound_corte(); + stopSound(); updateAnim(1, 213, 66, 53, 84, 6, drawSurface3); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 64c5c751c8..a8ad7a805f 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -151,8 +151,6 @@ int DrasculaEngine::go() { frame_bat = 0; c_mirar = 0; c_poder = 0; - ald = NULL; - sku = NULL; allocMemory(); @@ -223,7 +221,7 @@ int DrasculaEngine::go() { void DrasculaEngine::releaseGame() { if (hay_sb == 1) - ctvd_end(); + stopSound(); clearRoom(); black(); MusicFadeout(); @@ -792,8 +790,7 @@ bool DrasculaEngine::para_cargar(char gameName[]) { if (!loadGame(gameName)) return false; if (currentChapter == 2 || currentChapter == 3 || currentChapter == 5) { - delete ald; - ald = NULL; + // } carga_escoba(currentData); withoutVerb(); @@ -801,14 +798,14 @@ bool DrasculaEngine::para_cargar(char gameName[]) { return true; } -static char *getLine(Common::File *fp, char *buf, int len) { +char *DrasculaEngine::getLine(char *buf, int len) { byte c; char *b; for (;;) { b = buf; - while (!fp->eos()) { - c = ~fp->readByte(); + while (!_arj.eos()) { + c = ~_arj.readByte(); if (c == '\r') continue; if (c == '\n' || b - buf >= (len - 1)) @@ -816,7 +813,7 @@ static char *getLine(Common::File *fp, char *buf, int len) { *b++ = c; } *b = '\0'; - if (fp->eos() && b == buf) + if (_arj.eos() && b == buf) return NULL; if (b != buf) break; @@ -824,13 +821,13 @@ static char *getLine(Common::File *fp, char *buf, int len) { return buf; } -void getIntFromLine(Common::File *fp, char *buf, int len, int* result) { - getLine(fp, buf, len); +void DrasculaEngine::getIntFromLine(char *buf, int len, int* result) { + getLine(buf, len); sscanf(buf, "%d", result); } -void getStringFromLine(Common::File *fp, char *buf, int len, char* result) { - getLine(fp, buf, len); +void DrasculaEngine::getStringFromLine(char *buf, int len, char* result) { + getLine(buf, len); sscanf(buf, "%s", result); } @@ -846,32 +843,31 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { strcpy(para_codificar, nom_fich); strcpy(currentData, nom_fich); - ald = new Common::File; - ald->open(nom_fich); - if (!ald->isOpen()) { - error("missing data file"); + _arj.open(nom_fich); + if (!_arj.isOpen()) { + error("missing data file %s", nom_fich); } - int size = ald->size(); + int size = _arj.size(); - getIntFromLine(ald, buffer, size, &roomNumber); - getIntFromLine(ald, buffer, size, &roomMusic); - getStringFromLine(ald, buffer, size, roomDisk); - getIntFromLine(ald, buffer, size, &nivel_osc); + getIntFromLine(buffer, size, &roomNumber); + getIntFromLine(buffer, size, &roomMusic); + getStringFromLine(buffer, size, roomDisk); + getIntFromLine(buffer, size, &nivel_osc); if (currentChapter == 2) - getIntFromLine(ald, buffer, size, &martin); + getIntFromLine(buffer, size, &martin); if (currentChapter == 2 && martin != 0) { ancho_hare = martin; - getIntFromLine(ald, buffer, size, &alto_hare); - getIntFromLine(ald, buffer, size, &feetHeight); - getIntFromLine(ald, buffer, size, &stepX); - getIntFromLine(ald, buffer, size, &stepY); + getIntFromLine(buffer, size, &alto_hare); + getIntFromLine(buffer, size, &feetHeight); + getIntFromLine(buffer, size, &stepX); + getIntFromLine(buffer, size, &stepY); - getStringFromLine(ald, buffer, size, pant1); - getStringFromLine(ald, buffer, size, pant2); - getStringFromLine(ald, buffer, size, pant3); - getStringFromLine(ald, buffer, size, pant4); + getStringFromLine(buffer, size, pant1); + getStringFromLine(buffer, size, pant2); + getStringFromLine(buffer, size, pant3); + getStringFromLine(buffer, size, pant4); loadAndDecompressPic(pant2, extraSurface, 1); loadAndDecompressPic(pant1, frontSurface, 1); @@ -880,41 +876,40 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { strcpy(menuBackground, pant4); } - getIntFromLine(ald, buffer, size, &numRoomObjs); + getIntFromLine(buffer, size, &numRoomObjs); for (l = 0; l < numRoomObjs; l++) { - getIntFromLine(ald, buffer, size, &objectNum[l]); - getStringFromLine(ald, buffer, size, objName[l]); - getIntFromLine(ald, buffer, size, &x1[l]); - getIntFromLine(ald, buffer, size, &y1[l]); - getIntFromLine(ald, buffer, size, &x2[l]); - getIntFromLine(ald, buffer, size, &y2[l]); - getIntFromLine(ald, buffer, size, &sitiobj_x[l]); - getIntFromLine(ald, buffer, size, &sitiobj_y[l]); - getIntFromLine(ald, buffer, size, &sentidobj[l]); - getIntFromLine(ald, buffer, size, &visible[l]); - getIntFromLine(ald, buffer, size, &isDoor[l]); + getIntFromLine(buffer, size, &objectNum[l]); + getStringFromLine(buffer, size, objName[l]); + getIntFromLine(buffer, size, &x1[l]); + getIntFromLine(buffer, size, &y1[l]); + getIntFromLine(buffer, size, &x2[l]); + getIntFromLine(buffer, size, &y2[l]); + getIntFromLine(buffer, size, &sitiobj_x[l]); + getIntFromLine(buffer, size, &sitiobj_y[l]); + getIntFromLine(buffer, size, &sentidobj[l]); + getIntFromLine(buffer, size, &visible[l]); + getIntFromLine(buffer, size, &isDoor[l]); if (isDoor[l] != 0) { - getStringFromLine(ald, buffer, size, _targetSurface[l]); - getIntFromLine(ald, buffer, size, &_destX[l]); - getIntFromLine(ald, buffer, size, &_destY[l]); - getIntFromLine(ald, buffer, size, &sentido_alkeva[l]); - getIntFromLine(ald, buffer, size, &alapuertakeva[l]); + getStringFromLine(buffer, size, _targetSurface[l]); + getIntFromLine(buffer, size, &_destX[l]); + getIntFromLine(buffer, size, &_destY[l]); + getIntFromLine(buffer, size, &sentido_alkeva[l]); + getIntFromLine(buffer, size, &alapuertakeva[l]); updateDoor(l); } } - getIntFromLine(ald, buffer, size, &suelo_x1); - getIntFromLine(ald, buffer, size, &suelo_y1); - getIntFromLine(ald, buffer, size, &suelo_x2); - getIntFromLine(ald, buffer, size, &suelo_y2); + getIntFromLine(buffer, size, &suelo_x1); + getIntFromLine(buffer, size, &suelo_y1); + getIntFromLine(buffer, size, &suelo_x2); + getIntFromLine(buffer, size, &suelo_y2); if (currentChapter != 2) { - getIntFromLine(ald, buffer, size, &far); - getIntFromLine(ald, buffer, size, &near); + getIntFromLine(buffer, size, &far); + getIntFromLine(buffer, size, &near); } - delete ald; - ald = NULL; + _arj.close(); if (currentChapter == 2) { if (martin == 0) { @@ -1849,16 +1844,8 @@ void DrasculaEngine::playSound(int soundNum) { char file[20]; sprintf(file, "s%i.als", soundNum); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(file); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); + if (hay_sb == 1) + playFile(file); } bool DrasculaEngine::animate(const char *animationFile, int FPS) { @@ -1916,15 +1903,6 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { return ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)); } -void DrasculaEngine::animastopSound_corte() { - if (hay_sb == 1) { - ctvd_stop(); - delete sku; - sku = NULL; - ctvd_terminate(); - } -} - void DrasculaEngine::fadeToBlack(int fadeSpeed) { char fundido; unsigned int color, component; @@ -2040,13 +2018,12 @@ void DrasculaEngine::hiccup(int counter) { updateScreen(); } -void DrasculaEngine::stopSound() { +void DrasculaEngine::finishSound() { delay(1); if (hay_sb == 1) { - while (soundIsActive()); - delete sku; - sku = NULL; + while (soundIsActive()) + _system->delayMillis(10); } } @@ -2504,8 +2481,7 @@ bool DrasculaEngine::exitRoom(int l) { addObject(11); } clearRoom(); - delete ald; - ald = NULL; + strcpy(salgo, _targetSurface[l]); strcat(salgo, ".ald"); hare_x =- 1; @@ -2690,7 +2666,7 @@ void DrasculaEngine::enterName() { void DrasculaEngine::para_grabar(char gameName[]) { saveGame(gameName); playSound(99); - stopSound(); + finishSound(); } void DrasculaEngine::openSSN(const char *Name, int Pause) { @@ -3149,26 +3125,25 @@ void DrasculaEngine::converse(const char *nom_fich) { if (currentChapter == 5) withoutVerb(); - ald = new Common::File; - ald->open(nom_fich); - if (!ald->isOpen()) { - error("missing data file"); - } - int size = ald->size(); - - getStringFromLine(ald, buffer, size, phrase1); - getStringFromLine(ald, buffer, size, phrase2); - getStringFromLine(ald, buffer, size, phrase3); - getStringFromLine(ald, buffer, size, phrase4); - getStringFromLine(ald, buffer, size, sound1); - getStringFromLine(ald, buffer, size, sound2); - getStringFromLine(ald, buffer, size, sound3); - getStringFromLine(ald, buffer, size, sound4); - getIntFromLine(ald, buffer, size, &answer1); - getIntFromLine(ald, buffer, size, &answer2); - getIntFromLine(ald, buffer, size, &answer3); - delete ald; - ald = NULL; + _arj.open(nom_fich); + if (!_arj.isOpen()) { + error("missing data file %s", nom_fich); + } + int size = _arj.size(); + + getStringFromLine(buffer, size, phrase1); + getStringFromLine(buffer, size, phrase2); + getStringFromLine(buffer, size, phrase3); + getStringFromLine(buffer, size, phrase4); + getStringFromLine(buffer, size, sound1); + getStringFromLine(buffer, size, sound2); + getStringFromLine(buffer, size, sound3); + getStringFromLine(buffer, size, sound4); + getIntFromLine(buffer, size, &answer1); + getIntFromLine(buffer, size, &answer2); + getIntFromLine(buffer, size, &answer3); + + _arj.close(); if (currentChapter == 2 && !strcmp(nom_fich, "op_5.cal") && flags[38] == 1 && flags[33] == 1) { strcpy(phrase3, _text[_lang][405]); @@ -3413,12 +3388,9 @@ void DrasculaEngine::addObject(int osj) { } } -void DrasculaEngine::stopSound_corte() { +void DrasculaEngine::stopSound() { if (hay_sb == 1) { - ctvd_stop(); - delete sku; - sku = NULL; - ctvd_terminate(); + _mixer->stopHandle(_soundHandle); } } @@ -3441,27 +3413,15 @@ void DrasculaEngine::MusicFadeout() { _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, org_vol); } -void DrasculaEngine::ctvd_end() { - _mixer->stopHandle(_soundHandle); -} - -void DrasculaEngine::ctvd_stop() { - _mixer->stopHandle(_soundHandle); -} - -void DrasculaEngine::ctvd_terminate() { -// _mixer->stopHandle(_soundHandle); -} - -void DrasculaEngine::ctvd_speaker(int flag) {} - -void DrasculaEngine::ctvd_output(Common::File *file_handle) {} +void DrasculaEngine::playFile(const char *fname) { + _arj.open(fname); -void DrasculaEngine::ctvd_init(int b) { - int soundSize = sku->size(); + int soundSize = _arj.size(); byte *soundData = (byte *)malloc(soundSize); - sku->seek(32); - sku->read(soundData, soundSize); + _arj.seek(32); + _arj.read(soundData, soundSize); + _arj.close(); + _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_soundHandle, soundData, soundSize - 64, 11025, Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED); } @@ -3666,7 +3626,7 @@ void DrasculaEngine::openDoor(int nflag, int doorNum) { updateDoor(doorNum); updateRoom(); updateScreen(); - stopSound(); + finishSound(); withoutVerb(); } } @@ -3693,16 +3653,8 @@ void DrasculaEngine::grr() { color_abc(kColorDarkGreen); - if (hay_sb == 1) { - sku = new Common::File; - sku->open("s10.als"); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(4); - ctvd_speaker(1); - ctvd_output(sku); - } + if (hay_sb == 1) + playFile("s10.als"); updateRoom(); copyBackground(253, 110, 150, 65, 20, 30, drawSurface3, screenSurface); @@ -3740,7 +3692,7 @@ void DrasculaEngine::closeDoor(int nflag, int doorNum) { updateDoor(doorNum); updateRoom(); updateScreen(); - stopSound(); + finishSound(); withoutVerb(); } } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index ec7d016a9b..09973b8d41 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -229,8 +229,6 @@ public: byte cPal[768]; byte *pcxBuffer; - Common::File *ald, *sku; - Common::ArjFile _arj; int hay_sb; @@ -423,7 +421,6 @@ public: void centerText(const char *,int,int); void playSound(int soundNum); bool animate(const char *animation, int FPS); - void stopSound_corte(); void fadeToBlack(int fadeSpeed); void pause(int); void placeIgor(); @@ -479,6 +476,7 @@ public: void talk_hacker(const char *, const char *); void hiccup(int); + void finishSound(); void stopSound(); void closeDoor(int nflag, int doorNum); void playMusic(int p); @@ -487,7 +485,6 @@ public: void updateRoom(); bool loadGame(const char *); void updateDoor(int); - void animastopSound_corte(); void color_hare(); void funde_hare(int oscuridad); void paleta_hare_claro(); @@ -588,12 +585,12 @@ public: void response(int); void MusicFadeout(); - void ctvd_end(); - void ctvd_stop(); - void ctvd_terminate(); - void ctvd_speaker(int flag); - void ctvd_output(Common::File *file_handle); - void ctvd_init(int b); + void playFile(const char *fname); + + char *getLine(char *buf, int len); + void getIntFromLine(char *buf, int len, int* result); + void getStringFromLine(char *buf, int len, char* result); + void grr(); bool room_13(int fl); void update_13(); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 2c76ed37cd..0e22e4a85c 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -179,7 +179,7 @@ void DrasculaEngine::room_6(int fl){ flags[2] = 1; updateRoom(); updateScreen(); - stopSound(); + finishSound(); } else if (pickedObject == kVerbClose && fl == 143 && flags[2] == 1) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); flags[2] = 0; @@ -190,7 +190,7 @@ void DrasculaEngine::room_6(int fl){ playSound(4); updateRoom(); updateScreen(); - stopSound(); + finishSound(); } else if (pickedObject == kVerbOpen && fl == 139 && flags[1] == 0) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); @@ -203,7 +203,7 @@ void DrasculaEngine::room_6(int fl){ visible[2] = 0; updateRoom(); updateScreen(); - stopSound(); + finishSound(); } else if (pickedObject == kVerbPick && fl == 140) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); @@ -334,7 +334,7 @@ void DrasculaEngine::room_15(int fl) { copyRect(133, 135, hare_x + 6, hare_y, 39, 63, drawSurface3, screenSurface); updateScreen(); playSound(8); - stopSound(); + finishSound(); talk(338); flags[27] = 0; pickObject(19); @@ -519,7 +519,7 @@ void DrasculaEngine::room_22(int fl) { flags[26]=1; playSound(1); hiccup(14); - stopSound(); + finishSound(); withoutVerb(); removeObject(22); updateVisible(); @@ -874,7 +874,7 @@ void DrasculaEngine::room_55(int fl) { else if (fl == 206) { playSound(11); animate("det.bin", 17); - stopSound(); + finishSound(); lleva_al_hare(hare_x - 3, hare_y + alto_hare + 6); } else hasAnswer = 0; @@ -920,7 +920,7 @@ void DrasculaEngine::room_59(int fl) { if (flags[11] == 0) { playSound(12); delay(40); - stopSound(); + finishSound(); delay(10); lleva_al_hare(174, 168); sentido_hare = 2; @@ -929,7 +929,7 @@ void DrasculaEngine::room_59(int fl) { pause(40); playSound(12); pause(19); - stopSound_corte(); + stopSound(); hare_se_ve = 0; updateRoom(); copyRect(101, 34, hare_x - 4, hare_y - 1, 37, 70, drawSurface3, screenSurface); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 5955a35891..71e0b77587 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -30,28 +30,17 @@ namespace Drascula { void DrasculaEngine::talkInit(const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - if (hay_sb == 1) { - sku = new Common::File; - sku->open(filename); - if (!sku->isOpen()) { - error("no puedo abrir archivo de voz"); - } - ctvd_init(2); - ctvd_speaker(1); - ctvd_output(sku); - } + if (hay_sb == 1) + playFile(filename); } bool DrasculaEngine::isTalkFinished(int* length) { byte key = getScan(); if (key != 0) - ctvd_stop(); + stopSound(); if (hay_sb == 1) { if (soundIsActive()) return false; - delete(sku); - sku = 0; - ctvd_terminate(); } else { length -= 2; if (length > 0) -- cgit v1.2.3 From 452d46b3bf6a3c77bc4583a56e7dc5e7a4ad385b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 1 Jun 2008 21:10:29 +0000 Subject: Implement file fallback for archives svn-id: r32476 --- common/unarj.cpp | 17 ++++++++++++++++- common/unarj.h | 6 +++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/common/unarj.cpp b/common/unarj.cpp index 58f326c1ac..57673341f7 100644 --- a/common/unarj.cpp +++ b/common/unarj.cpp @@ -78,6 +78,7 @@ static uint32 GetCRC(byte *data, int len) { ArjFile::ArjFile() { InitCRC(); _isOpen = false; + _fallBack = false; } ArjFile::~ArjFile() { @@ -234,6 +235,15 @@ bool ArjFile::open(const Common::String &filename, AccessMode mode) { _isOpen = false; + if (_fallBack) { + _currArchive.open(filename); + if (_currArchive.isOpen()) { + _isOpen = true; + _uncompressed = &_currArchive; + return true; + } + } + if (!_fileMap.contains(filename)) return false; @@ -279,7 +289,12 @@ bool ArjFile::open(const Common::String &filename, AccessMode mode) { void ArjFile::close() { _isOpen = false; - delete _uncompressed; + if (_fallBack) { + _currArchive.close(); + } else { + delete _uncompressed; + } + _uncompressed = NULL; free(_uncompressedData); diff --git a/common/unarj.h b/common/unarj.h index 289ab52ad0..b015999671 100644 --- a/common/unarj.h +++ b/common/unarj.h @@ -106,6 +106,8 @@ public: ArjFile(); ~ArjFile(); + void enableFallback(bool val) { _fallBack = val; } + void registerArchive(const String &filename); bool open(const Common::String &filename, AccessMode mode = kFileReadMode); @@ -119,6 +121,8 @@ public: bool isOpen() { return _isOpen; } private: + bool _fallBack; + File _currArchive; Array _headers; ArjFilesMap _fileMap; @@ -128,7 +132,7 @@ private: byte *_compressedData; MemoryWriteStream *_outstream; MemoryReadStream *_compressed; - MemoryReadStream *_uncompressed; + SeekableReadStream *_uncompressed; bool _isOpen; -- cgit v1.2.3 From df35925557c6b45482efcf1cdf076c783a64728c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 1 Jun 2008 21:11:14 +0000 Subject: Enable file fallback for drascula. Now old uncompressed games should work. svn-id: r32477 --- engines/drascula/drascula.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index a8ad7a805f..ca9ff9a78b 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -108,6 +108,7 @@ int DrasculaEngine::init() { } _arj.registerArchive("packet.001"); + _arj.enableFallback(true); return 0; } -- cgit v1.2.3 From ffc64511cab717ca1472f52647ee3a14cab350da Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 1 Jun 2008 21:30:07 +0000 Subject: Add MD5's and packed file overrides for original packed files of the Multilingual English/German/French CD of Drascula svn-id: r32478 --- engines/drascula/detection.cpp | 48 ++++++++++++++++++++++++++++++++++++++++++ engines/drascula/drascula.cpp | 5 +++++ 2 files changed, 53 insertions(+) diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index b3d8d964c8..172f73291e 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -90,6 +90,54 @@ static const DrasculaGameDescription gameDescriptions[] = { 0, }, + { + // Drascula English version (original packed files) + { + "drascula", + 0, + AD_ENTRY1s("packet.001", "c6a8697396e213a18472542d5f547cb4", 32847563), + Common::EN_ANY, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + 0, + 0, + 0, + 0, + }, + + { + // Drascula German version (original packed files) + { + "drascula", + 0, + AD_ENTRY1s("packet.003", "e8f4dc6091037329bab4ddb1cba35807", 719728), + Common::DE_DEU, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + 0, + 0, + 0, + 0, + }, + + { + // Drascula French version (original packed files) + { + "drascula", + 0, + AD_ENTRY1s("packet.002", "4401123400f22f212b89f15fb4b43013", 721122), + Common::FR_FRA, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + 0, + 0, + 0, + 0, + }, + { // Drascula Spanish version { diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index ca9ff9a78b..7e6b8e8ba1 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -108,6 +108,11 @@ int DrasculaEngine::init() { } _arj.registerArchive("packet.001"); + // Use override files for non-English versions + if (_lang == 3) // French + _arj.registerArchive("packet.002"); + else if (_lang == 2) // German + _arj.registerArchive("packet.003"); _arj.enableFallback(true); return 0; -- cgit v1.2.3 From cb103cb9e2f620e436160dd9dda95aad7f397e93 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 1 Jun 2008 21:47:24 +0000 Subject: DS: Removed some duplicate file content (thanks to Qvist for pointing this out) svn-id: r32479 --- backends/platform/ds/arm9/buildkeyboard.bat | 4 -- backends/platform/ds/arm9/lib/readme.txt | 1 - backends/platform/ds/arm9/source/compressor/lz.h | 50 ------------------------ backends/platform/ds/arm9/source/fat/io_efa2.h | 28 ------------- backends/platform/ds/arm9/source/mad/readme.txt | 1 - 5 files changed, 84 deletions(-) diff --git a/backends/platform/ds/arm9/buildkeyboard.bat b/backends/platform/ds/arm9/buildkeyboard.bat index 2078381ccb..ae3398d24d 100644 --- a/backends/platform/ds/arm9/buildkeyboard.bat +++ b/backends/platform/ds/arm9/buildkeyboard.bat @@ -2,7 +2,3 @@ cd data ..\tools\gfx2gba -c16 -t8 -M -pkeyboard_pal.raw ..\keyboard.bmp del keyboard.map pause -cd data -..\tools\gfx2gba -c16 -t8 -M -pkeyboard_pal.raw ..\keyboard.bmp -del keyboard.map -pause \ No newline at end of file diff --git a/backends/platform/ds/arm9/lib/readme.txt b/backends/platform/ds/arm9/lib/readme.txt index f6e7f4c511..2469e38cd0 100644 --- a/backends/platform/ds/arm9/lib/readme.txt +++ b/backends/platform/ds/arm9/lib/readme.txt @@ -1,2 +1 @@ If building with MAD enabled, put libmad.a in here. -If building with MAD enabled, put libmad.a in here. \ No newline at end of file diff --git a/backends/platform/ds/arm9/source/compressor/lz.h b/backends/platform/ds/arm9/source/compressor/lz.h index dc10210742..e7ea1567ca 100644 --- a/backends/platform/ds/arm9/source/compressor/lz.h +++ b/backends/platform/ds/arm9/source/compressor/lz.h @@ -35,56 +35,6 @@ -/************************************************************************* -* Function prototypes -*************************************************************************/ - -int LZ_Compress( unsigned char *in, unsigned char *out, - unsigned int insize ); -int LZ_CompressFast( unsigned char *in, unsigned char *out, - unsigned int insize, unsigned int *work ); -void LZ_Uncompress( unsigned char *in, unsigned char *out, - unsigned int insize ); - - -#endif /* _lz_h_ */ -/************************************************************************* -* Name: lz.h -* Author: Marcus Geelnard -* Description: LZ77 coder/decoder interface. -* Reentrant: Yes -* $Id$ -*------------------------------------------------------------------------- -* Copyright (c) 2003-2004 Marcus Geelnard -* -* This software is provided 'as-is', without any express or implied -* warranty. In no event will the authors be held liable for any damages -* arising from the use of this software. -* -* Permission is granted to anyone to use this software for any purpose, -* including commercial applications, and to alter it and redistribute it -* freely, subject to the following restrictions: -* -* 1. The origin of this software must not be misrepresented; you must not -* claim that you wrote the original software. If you use this software -* in a product, an acknowledgment in the product documentation would -* be appreciated but is not required. -* -* 2. Altered source versions must be plainly marked as such, and must not -* be misrepresented as being the original software. -* -* 3. This notice may not be removed or altered from any source -* distribution. -* -* Marcus Geelnard -* marcus.geelnard at home.se -*************************************************************************/ - -#ifndef _lz_h_ -#define _lz_h_ - - - /************************************************************************* * Function prototypes *************************************************************************/ diff --git a/backends/platform/ds/arm9/source/fat/io_efa2.h b/backends/platform/ds/arm9/source/fat/io_efa2.h index 27c4e9beb8..840c6b83ac 100644 --- a/backends/platform/ds/arm9/source/fat/io_efa2.h +++ b/backends/platform/ds/arm9/source/fat/io_efa2.h @@ -26,31 +26,3 @@ extern LPIO_INTERFACE EFA2_GetInterface(void); #endif // define IO_EFA2_H -/* - io_efa2.h by CyteX - - Based on io_mpfc.h by chishm (Michael Chisholm) - - Hardware Routines for reading the NAND flash located on - EFA2 flash carts - - This software is completely free. No warranty is provided. - If you use it, please give me credit and email me about your - project at cytex gmx de and do not forget to also - drop chishm hotmail com a line - - See gba_nds_fat.txt for help and license details. -*/ - -#ifndef IO_EFA2_H -#define IO_EFA2_H - -// 'EFA2' -#define DEVICE_TYPE_EFA2 0x32414645 - -#include "disc_io.h" - -// export interface -extern LPIO_INTERFACE EFA2_GetInterface(void); - -#endif // define IO_EFA2_H diff --git a/backends/platform/ds/arm9/source/mad/readme.txt b/backends/platform/ds/arm9/source/mad/readme.txt index 09a2ec07df..c911ab9271 100644 --- a/backends/platform/ds/arm9/source/mad/readme.txt +++ b/backends/platform/ds/arm9/source/mad/readme.txt @@ -1,2 +1 @@ Put mad.h here if you are compiling with Madlib support enabled. -Put mad.h here if you are compiling with Madlib support enabled. \ No newline at end of file -- cgit v1.2.3 From 8a0abfb04560072edc4e444ddc0dcad8da19634e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 1 Jun 2008 21:57:30 +0000 Subject: Fix for crash that occurs in the unarj's fallback code - _uncompressedData is not allocated when ARJ files have not been opened svn-id: r32480 --- common/unarj.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/unarj.cpp b/common/unarj.cpp index 57673341f7..eb55e116ad 100644 --- a/common/unarj.cpp +++ b/common/unarj.cpp @@ -291,6 +291,7 @@ void ArjFile::close() { if (_fallBack) { _currArchive.close(); + return; } else { delete _uncompressed; } -- cgit v1.2.3 From 704ad4a5fbdef90bd9e53874b8930706d5184734 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 1 Jun 2008 22:38:29 +0000 Subject: Removed the now obsolete talk_dr_dch Merged talk_bartender and talk_taber2 Merged talk_pen and talk_pen2 svn-id: r32481 --- engines/drascula/animation.cpp | 56 ++++++++--------- engines/drascula/drascula.h | 10 +-- engines/drascula/rooms.cpp | 2 +- engines/drascula/talk.cpp | 140 ++++++++++++----------------------------- 4 files changed, 72 insertions(+), 136 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index fd75a41031..4c0ca7c72f 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -292,7 +292,7 @@ void DrasculaEngine::animation_1_1() { talk_igor_dch(1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_dr_dch(11); + talk_drascula(11, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; @@ -324,7 +324,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(13); - talk_dr_dch(13); + talk_drascula(13, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 3; @@ -1881,24 +1881,24 @@ void DrasculaEngine::animation_1_6() { loadAndDecompressPic("auxig2.alg", frontSurface, 1); loadAndDecompressPic("auxdr.alg", drawSurface2, 1); loadAndDecompressPic("car.alg", backSurface, 1); - talk_dr_dch(19); + talk_drascula(19, 1); talk(247); - talk_dr_dch(20); - talk_dr_dch(21); + talk_drascula(20, 1); + talk_drascula(21, 1); talk(248); - talk_dr_dch(22); + talk_drascula(22, 1); talk(249); - talk_dr_dch(23); + talk_drascula(23, 1); converse("op_11.cal"); - talk_dr_dch(26); + talk_drascula(26, 1); animate("fum.bin", 15); - talk_dr_dch(27); + talk_drascula(27, 1); talk(254); - talk_dr_dch(28); + talk_drascula(28, 1); talk(255); - talk_dr_dch(29); + talk_drascula(29, 1); fadeToBlack(1); clearRoom(); loadAndDecompressPic("time1.alg", screenSurface, 1); @@ -1912,7 +1912,7 @@ void DrasculaEngine::animation_1_6() { updateScreen(); fadeFromBlack(1); talk(256); - talk_dr_dch(30); + talk_drascula(30, 1); talk(257); fadeToBlack(0); clearRoom(); @@ -1925,14 +1925,14 @@ void DrasculaEngine::animation_1_6() { updateScreen(); fadeFromBlack(1); talk(258); - talk_dr_dch(31); + talk_drascula(31, 1); animation_5_6(); - talk_dr_dch(32); + talk_drascula(32, 1); talk_igor_dch(11); sentido_igor = 3; - talk_dr_dch(33); + talk_drascula(33, 1); talk_igor_front(12); - talk_dr_dch(34); + talk_drascula(34, 1); sentido_dr = 0; talk_drascula(35); @@ -1945,15 +1945,15 @@ void DrasculaEngine::animation_1_6() { } void DrasculaEngine::animation_2_6() { - talk_dr_dch(24); + talk_drascula(24, 1); } void DrasculaEngine::animation_3_6() { - talk_dr_dch(24); + talk_drascula(24, 1); } void DrasculaEngine::animation_4_6() { - talk_dr_dch(25); + talk_drascula(25, 1); } void DrasculaEngine::animation_5_6() { @@ -2095,36 +2095,36 @@ void DrasculaEngine::animation_10_6() { copyBackground(164, 85, 155, 48, 113, 114, drawSurface3, screenSurface); updateScreen(); finishSound(); - talk_taber2(23); + talk_bartender(23, 1); flags[7] = 1; } void DrasculaEngine::animation_11_6() { - talk_taber2(10); + talk_bartender(10, 1); talk(268); - talk_taber2(11); + talk_bartender(11, 1); } void DrasculaEngine::animation_12_6() { - talk_taber2(12); + talk_bartender(12, 1); talk(270); - talk_taber2(13); - talk_taber2(14); + talk_bartender(13, 1); + talk_bartender(14, 1); } void DrasculaEngine::animation_13_6() { - talk_taber2(15); + talk_bartender(15, 1); } void DrasculaEngine::animation_14_6() { - talk_taber2(24); + talk_bartender(24, 1); addObject(21); flags[10] = 1; breakOut = 1; } void DrasculaEngine::animation_15_6() { - talk_taber2(16); + talk_bartender(16, 1); } void DrasculaEngine::animation_18_6() { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 09973b8d41..9ac43e7e20 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -431,22 +431,18 @@ public: bool isTalkFinished(int* length); void talk_igor_dch(int); void talk_igor_dch(const char *said, const char *filename); - void talk_dr_dch(int); void talk_drascula(int index, int talkerType = 0); void talk_drascula(const char *said, const char *filename); void talk_solo(const char *, const char *); void talk_igor_front(int); void talk_igor_front(const char *, const char *); - void talk_bartender(int); - void talk_bartender(const char *said, const char *filename); + void talk_bartender(int, int talkerType = 0); + void talk_bartender(const char *said, const char *filename, int talkerType = 0); void talk_igor_door(int); void talk_igor_door(const char *said, const char *filename); void talk_igor_wig(int); void talk_igor_wig(const char *said, const char *filename); - void talk_pen(const char *, const char *); - void talk_pen2(const char *, const char *); - void talk_taber2(int); - void talk_taber2(const char *, const char *); + void talk_pen(const char *, const char *, int); void talk_bj_bed(int); void talk_bj_bed(const char *said, const char * filename); void talk_htel(int); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 0e22e4a85c..135de8b9f5 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -978,7 +978,7 @@ bool DrasculaEngine::room_60(int fl) { talk(440); else if (pickedObject == kVerbTalk && fl == 52) { talk(266); - talk_taber2(1); + talk_bartender(1, 1); converse("op_12.cal"); withoutVerb(); pickedObject = 0; diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 71e0b77587..701580e722 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -153,10 +153,6 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) { updateScreen(); } -void DrasculaEngine::talk_dr_dch(int index) { - talk_drascula(index, 1); -} - void DrasculaEngine::talk_solo(const char *said, const char *filename) { int length = strlen(said); @@ -240,13 +236,13 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { updateScreen(); } -void DrasculaEngine::talk_bartender(int index) { +void DrasculaEngine::talk_bartender(int index, int talkerType) { char name[20]; sprintf(name, "t%i.als", index); talk_bartender(_textt[_lang][index], name); } -void DrasculaEngine::talk_bartender(const char *said, const char *filename) { +void DrasculaEngine::talk_bartender(const char *said, const char *filename, int talkerType) { int x_talk[9] = { 1, 23, 45, 67, 89, 111, 133, 155, 177 }; int face; int length = strlen(said); @@ -256,21 +252,28 @@ void DrasculaEngine::talk_bartender(const char *said, const char *filename) { talkInit(filename); do { - if (currentChapter == 1) { - if (musicStatus() == 0) - playMusic(roomMusic); - } else if (currentChapter == 2) { - if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) - playMusic(roomMusic); + if (talkerType == 0) { + if (currentChapter == 1) { + if (musicStatus() == 0) + playMusic(roomMusic); + } else if (currentChapter == 2) { + if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) + playMusic(roomMusic); + } + + face = _rnd->getRandomNumber(8); + } else { + face = _rnd->getRandomNumber(5); } - face = _rnd->getRandomNumber(8); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyBackground(x_talk[face], 2, 121, 44, 21, 24, extraSurface, screenSurface); + if (talkerType == 0) + copyBackground(x_talk[face], 2, 121, 44, 21, 24, extraSurface, screenSurface); + else + copyBackground(x_talk[face], 130, 151, 43, 21, 24, drawSurface3, screenSurface); pon_hare(); updateRefresh(); @@ -280,7 +283,6 @@ void DrasculaEngine::talk_bartender(const char *said, const char *filename) { updateScreen(); pause(3); - } while (!isTalkFinished(&length)); updateRoom(); @@ -357,11 +359,11 @@ void DrasculaEngine::talk(const char *said, const char *filename) { if (currentChapter == 6) { if (flags[0] == 0 && roomNumber == 102) { - talk_pen(said, filename); + talk_pen(said, filename, 0); return; } if (flags[0] == 0 && roomNumber == 58) { - talk_pen2(said, filename); + talk_pen(said, filename, 1); return; } } @@ -780,70 +782,46 @@ void DrasculaEngine::talk_mus(const char *said, const char *filename) { updateScreen(); } -void DrasculaEngine::talk_pen(const char *said, const char *filename) { +void DrasculaEngine::talk_pen(const char *said, const char *filename, int talkerType) { int x_talk[8] = {112, 138, 164, 190, 216, 242, 268, 294}; + int x_talk2[5] = {122, 148, 174, 200, 226}; int face; int length = strlen(said); flags[1] = 1; - updateRoom(); - copyRect(44, 145, 145, 105, 25, 29, drawSurface3, screenSurface); - updateScreen(); - - color_abc(kColorYellow); - - talkInit(filename); - - do { - face = _rnd->getRandomNumber(7); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); - - copyRect(x_talk[face], 145, 145, 105, 25, 29, drawSurface3, screenSurface); - - updateRefresh(); - - if (withVoices == 0) - centerText(said, 160, 105); - + if (talkerType == 0) { + updateRoom(); + copyRect(44, 145, 145, 105, 25, 29, drawSurface3, screenSurface); updateScreen(); - - pause(3); - } while (!isTalkFinished(&length)); - - flags[1] = 0; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); - updateScreen(); -} - -void DrasculaEngine::talk_pen2(const char *said, const char *filename) { - int x_talk[5]={122, 148, 174, 200, 226}; - int face; - int length = strlen(said); - - flags[1] = 1; + } color_abc(kColorYellow); talkInit(filename); do { - face = _rnd->getRandomNumber(4); + if (talkerType == 0) + face = _rnd->getRandomNumber(7); + else + face = _rnd->getRandomNumber(4); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); - copyBackground(x_talk[face], 171, 173, 116, 25, 28, drawSurface3, screenSurface); + if (talkerType == 0) + copyRect(x_talk[face], 145, 145, 105, 25, 29, drawSurface3, screenSurface); + else + copyBackground(x_talk2[face], 171, 173, 116, 25, 28, drawSurface3, screenSurface); updateRefresh(); - if (withVoices == 0) - centerText(said, 195, 107); + if (withVoices == 0) { + if (talkerType == 0) + centerText(said, 160, 105); + else + centerText(said, 195, 107); + } updateScreen(); @@ -856,44 +834,6 @@ void DrasculaEngine::talk_pen2(const char *said, const char *filename) { updateScreen(); } -void DrasculaEngine::talk_taber2(int index) { - char name[20]; - sprintf(name, "t%i.als", index); - talk_taber2(_textt[_lang][index], name); -} - -void DrasculaEngine::talk_taber2(const char *said, const char *filename) { - int x_talk[6] = {1, 23, 45, 67, 89, 111}; - int face; - int length = strlen(said); - - color_abc(kColorMaroon); - - talkInit(filename); - - do { - face = _rnd->getRandomNumber(5); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); - - copyBackground(x_talk[face], 130, 151, 43, 21, 24, drawSurface3, screenSurface); - pon_hare(); - updateRefresh(); - - if (withVoices == 0) - centerText(said, 132, 45); - - updateScreen(); - - pause(3); - } while (!isTalkFinished(&length)); - - updateRoom(); - updateScreen(); -} - void DrasculaEngine::talk_bj_bed(int index) { char name[20]; sprintf(name, "BJ%i.als", index); -- cgit v1.2.3 From 0ca4ff8840928ec0e3a9dcff73c104c54061b9ad Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 1 Jun 2008 23:51:41 +0000 Subject: Should fix gcc warning svn-id: r32482 --- engines/kyra/script_tim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp index aa4a2cd855..4ad6464424 100644 --- a/engines/kyra/script_tim.cpp +++ b/engines/kyra/script_tim.cpp @@ -118,7 +118,7 @@ TIM *TIMInterpreter::load(const char *filename, const Common::Arrayavtl[i] = READ_LE_UINT16(tim->avtl + i); - int num = (avtlChunkSize < TIM::kCountFuncs) ? avtlChunkSize : TIM::kCountFuncs; + int num = (avtlChunkSize < TIM::kCountFuncs) ? avtlChunkSize : (int)TIM::kCountFuncs; for (int i = 0; i < num; ++i) tim->func[i].avtl = tim->avtl + tim->avtl[i]; -- cgit v1.2.3 From cb5424810c33ac40cc23562599a339cc71fbd4ad Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jun 2008 04:39:43 +0000 Subject: Show the 3 pictures in carga_escoba after the initial file is loaded (so as not to attempt and reopen the ARJ file) svn-id: r32483 --- engines/drascula/drascula.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 7e6b8e8ba1..6f84badfd9 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -875,10 +875,6 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { getStringFromLine(buffer, size, pant3); getStringFromLine(buffer, size, pant4); - loadAndDecompressPic(pant2, extraSurface, 1); - loadAndDecompressPic(pant1, frontSurface, 1); - loadAndDecompressPic(pant4, backSurface, 1); - strcpy(menuBackground, pant4); } @@ -917,6 +913,12 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { } _arj.close(); + if (currentChapter == 2 && martin != 0) { + loadAndDecompressPic(pant2, extraSurface, 1); + loadAndDecompressPic(pant1, frontSurface, 1); + loadAndDecompressPic(pant4, backSurface, 1); + } + if (currentChapter == 2) { if (martin == 0) { stepX = PASO_HARE_X; -- cgit v1.2.3 From 738a62ef6aa50ba19231c46aff40c8b46332c1bc Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jun 2008 04:42:19 +0000 Subject: loadAndDecompressPic -> loadPic svn-id: r32484 --- engines/drascula/animation.cpp | 354 ++++++++++++++++++++--------------------- engines/drascula/drascula.cpp | 114 ++++++------- engines/drascula/drascula.h | 7 +- engines/drascula/rooms.cpp | 16 +- engines/drascula/talk.cpp | 4 +- 5 files changed, 246 insertions(+), 249 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 4c0ca7c72f..09e7c8e214 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -76,7 +76,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); - loadAndDecompressPic("cielo.alg", screenSurface, COMPLETE_PAL); + loadPic("cielo.alg", screenSurface, COMPLETE_PAL); black(); updateScreen(); fadeFromBlack(2); @@ -110,7 +110,7 @@ void DrasculaEngine::animation_1_1() { stopSound(); if (animate("scr3.bin", 17)) break; - loadAndDecompressPic("cielo2.alg", screenSurface, COMPLETE_PAL); + loadPic("cielo2.alg", screenSurface, COMPLETE_PAL); updateScreen(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -119,10 +119,10 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); - loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); - loadAndDecompressPic("103.alg", drawSurface1, HALF_PAL); - loadAndDecompressPic("104.alg", drawSurface3, 1); - loadAndDecompressPic("aux104.alg", drawSurface2, 1); + loadPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic("103.alg", drawSurface1, HALF_PAL); + loadPic("104.alg", drawSurface3, 1); + loadPic("aux104.alg", drawSurface2, 1); playMusic(4); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -182,9 +182,9 @@ void DrasculaEngine::animation_1_1() { clearRoom(); - loadAndDecompressPic("100.alg", drawSurface1, HALF_PAL); - loadAndDecompressPic("auxigor.alg", frontSurface, 1); - loadAndDecompressPic("auxdr.alg", backSurface, 1); + loadPic("100.alg", drawSurface1, HALF_PAL); + loadPic("auxigor.alg", frontSurface, 1); + loadPic("auxdr.alg", backSurface, 1); sentido_dr = 0; x_dr = 129; y_dr = 95; @@ -215,13 +215,13 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); color_solo = kColorRed; - loadAndDecompressPic("plan1.alg", screenSurface, HALF_PAL); + loadPic("plan1.alg", screenSurface, HALF_PAL); updateScreen(); pause(10); talk_solo(_textd[_lang][4],"d4.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - loadAndDecompressPic("plan1.alg", screenSurface, HALF_PAL); + loadPic("plan1.alg", screenSurface, HALF_PAL); updateScreen(); talk_solo(_textd[_lang][5], "d5.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -229,7 +229,7 @@ void DrasculaEngine::animation_1_1() { if (animate("lib2.bin", 16)) break; clearRoom(); - loadAndDecompressPic("plan2.alg", screenSurface, HALF_PAL); + loadPic("plan2.alg", screenSurface, HALF_PAL); updateScreen(); pause(20); talk_solo(_textd[_lang][6], "d6.als"); @@ -238,7 +238,7 @@ void DrasculaEngine::animation_1_1() { if (animate("lib2.bin", 16)) break; clearRoom(); - loadAndDecompressPic("plan3.alg", screenSurface, HALF_PAL); + loadPic("plan3.alg", screenSurface, HALF_PAL); updateScreen(); pause(20); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -246,13 +246,13 @@ void DrasculaEngine::animation_1_1() { talk_solo(_textd[_lang][7], "d7.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - loadAndDecompressPic("plan3.alg", screenSurface, HALF_PAL); + loadPic("plan3.alg", screenSurface, HALF_PAL); updateScreen(); talk_solo(_textd[_lang][8], "d8.als"); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); - loadAndDecompressPic("100.alg", drawSurface1, HALF_PAL); + loadPic("100.alg", drawSurface1, HALF_PAL); MusicFadeout(); stopMusic(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -377,8 +377,8 @@ void DrasculaEngine::animation_1_1() { term_int = 1; } clearRoom(); - loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic("99.alg", backSurface, 1); } void DrasculaEngine::animation_2_1() { @@ -399,7 +399,7 @@ void DrasculaEngine::animation_2_1() { if (_lang == kSpanish) textSurface = frontSurface; - loadAndDecompressPic("an11y13.alg", extraSurface, 1); + loadPic("an11y13.alg", extraSurface, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -410,7 +410,7 @@ void DrasculaEngine::animation_2_1() { if (_lang == kSpanish) textSurface = extraSurface; - loadAndDecompressPic("97.alg", extraSurface, 1); + loadPic("97.alg", extraSurface, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -434,7 +434,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); - loadAndDecompressPic("bj.alg", screenSurface, HALF_PAL); + loadPic("bj.alg", screenSurface, HALF_PAL); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; black(); @@ -448,10 +448,10 @@ void DrasculaEngine::animation_2_1() { break; clearRoom(); - loadAndDecompressPic("16.alg", drawSurface1, HALF_PAL); + loadPic("16.alg", drawSurface1, HALF_PAL); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - loadAndDecompressPic("auxbj.alg", drawSurface3, 1); + loadPic("auxbj.alg", drawSurface3, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -471,7 +471,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - loadAndDecompressPic("97g.alg", extraSurface, 1); + loadPic("97g.alg", extraSurface, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -507,7 +507,7 @@ void DrasculaEngine::animation_2_1() { if (animate("bjb.bin", 14)) break; playMusic(9); - loadAndDecompressPic("97.alg", extraSurface, 1); + loadPic("97.alg", extraSurface, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateRoom(); @@ -594,7 +594,7 @@ void DrasculaEngine::animation_3_1() { if (_lang == kSpanish) textSurface = frontSurface; - loadAndDecompressPic("an11y13.alg", extraSurface, 1); + loadPic("an11y13.alg", extraSurface, 1); talk(192); talk_bartender(1); @@ -622,14 +622,14 @@ void DrasculaEngine::animation_3_1() { if (_lang == kSpanish) textSurface = extraSurface; - loadAndDecompressPic("97.alg", extraSurface, 1); + loadPic("97.alg", extraSurface, 1); } void DrasculaEngine::animation_4_1() { if (_lang == kSpanish) textSurface = frontSurface; - loadAndDecompressPic("an12.alg", extraSurface, 1); + loadPic("an12.alg", extraSurface, 1); talk(205); @@ -664,7 +664,7 @@ void DrasculaEngine::animation_4_1() { textSurface = extraSurface; flags[11] = 0; - loadAndDecompressPic("97.alg", extraSurface, 1); + loadPic("97.alg", extraSurface, 1); } void DrasculaEngine::animation_1_2() { @@ -678,8 +678,8 @@ void DrasculaEngine::animation_2_2() { pon_hare(); updateRefresh(); updateScreen(); - loadAndDecompressPic("an2_1.alg", frontSurface, 1); - loadAndDecompressPic("an2_2.alg", extraSurface, 1); + loadPic("an2_1.alg", frontSurface, 1); + loadPic("an2_2.alg", extraSurface, 1); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); copyBackground(1, 1, 201, 87, 50, 52, frontSurface, screenSurface); @@ -722,11 +722,11 @@ void DrasculaEngine::animation_4_2() { pause(8); clearRoom(); - loadAndDecompressPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind - loadAndDecompressPic("ciego2.alg", drawSurface3, 1); - loadAndDecompressPic("ciego3.alg", extraSurface, 1); - loadAndDecompressPic("ciego4.alg", backSurface, 1); - loadAndDecompressPic("ciego5.alg", frontSurface, 1); + loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind + loadPic("ciego2.alg", drawSurface3, 1); + loadPic("ciego3.alg", extraSurface, 1); + loadPic("ciego4.alg", backSurface, 1); + loadPic("ciego5.alg", frontSurface, 1); if (_lang == kSpanish) textSurface = frontSurface; @@ -769,11 +769,11 @@ void DrasculaEngine::animation_4_2() { clearRoom(); playMusic(roomMusic); - loadAndDecompressPic("9.alg", drawSurface1, HALF_PAL); - loadAndDecompressPic("aux9.alg", drawSurface3, 1); - loadAndDecompressPic("96.alg", frontSurface, 1); - loadAndDecompressPic("97.alg", extraSurface, 1); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("9.alg", drawSurface1, HALF_PAL); + loadPic("aux9.alg", drawSurface3, 1); + loadPic("96.alg", frontSurface, 1); + loadPic("97.alg", extraSurface, 1); + loadPic("99.alg", backSurface, 1); withoutVerb(); if (_lang == kSpanish) @@ -813,7 +813,7 @@ void DrasculaEngine::animation_14_2() { int n, pos_cabina[6]; int l = 0; - loadAndDecompressPic("an14_2.alg", backSurface, 1); + loadPic("an14_2.alg", backSurface, 1); pos_cabina[0] = 150; pos_cabina[1] = 6; @@ -843,7 +843,7 @@ void DrasculaEngine::animation_14_2() { finishSound(); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("99.alg", backSurface, 1); } void DrasculaEngine::animation_15_2() { @@ -874,7 +874,7 @@ void DrasculaEngine::animation_16_2() { if (_lang != kSpanish) color_abc(kColorDarkGreen); - loadAndDecompressPic("his1.alg", drawSurface1, HALF_PAL); + loadPic("his1.alg", drawSurface1, HALF_PAL); if (_lang == kSpanish) black(); @@ -908,7 +908,7 @@ void DrasculaEngine::animation_16_2() { goto asco; clearRoom(); - loadAndDecompressPic("his2.alg", drawSurface1, HALF_PAL); + loadPic("his2.alg", drawSurface1, HALF_PAL); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); if (_lang != kSpanish) @@ -934,7 +934,7 @@ void DrasculaEngine::animation_16_2() { goto asco; clearRoom(); - loadAndDecompressPic("his3.alg", drawSurface1, HALF_PAL); + loadPic("his3.alg", drawSurface1, HALF_PAL); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); if (_lang != kSpanish) @@ -957,8 +957,8 @@ void DrasculaEngine::animation_16_2() { fadeToBlack(1); clearRoom(); - loadAndDecompressPic("his4_1.alg", drawSurface1, HALF_PAL); - loadAndDecompressPic("his4_2.alg", drawSurface3, 1); + loadPic("his4_1.alg", drawSurface1, HALF_PAL); + loadPic("his4_2.alg", drawSurface3, 1); copyBackground(0, 0, 0, 0, 320, 200, drawSurface3, screenSurface); @@ -993,10 +993,10 @@ void DrasculaEngine::animation_16_2() { clearRoom(); asco: - loadAndDecompressPic(roomDisk, drawSurface3, 1); + loadPic(roomDisk, drawSurface3, 1); char rm[20]; sprintf(rm, "%i.alg", roomNumber); - loadAndDecompressPic(rm, drawSurface1, HALF_PAL); + loadPic(rm, drawSurface1, HALF_PAL); black(); updateRoom(); updateScreen(); @@ -1052,7 +1052,7 @@ void DrasculaEngine::animation_21_2() { } void DrasculaEngine::animation_23_2() { - loadAndDecompressPic("an24.alg", frontSurface, 1); + loadPic("an24.alg", frontSurface, 1); flags[21] = 1; @@ -1113,7 +1113,7 @@ void DrasculaEngine::animation_23_joined() { int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 1, 1, 1, 1}; - loadAndDecompressPic("an23.alg", backSurface, 1); + loadPic("an23.alg", backSurface, 1); for (n = 0; n < 34; n++) { copyRect(p_x, p_y, p_x, p_y, 36, 74, drawSurface1, screenSurface); @@ -1123,7 +1123,7 @@ void DrasculaEngine::animation_23_joined() { pause(5); } - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("99.alg", backSurface, 1); } void DrasculaEngine::animation_23_joined2() { @@ -1133,7 +1133,7 @@ void DrasculaEngine::animation_23_joined2() { pause(50); - loadAndDecompressPic("an23_2.alg", backSurface, 1); + loadPic("an23_2.alg", backSurface, 1); for (n = 0; n < 14; n++) { copyRect(p_x, p_y, p_x, p_y, 33, 71, drawSurface1, screenSurface); @@ -1143,14 +1143,14 @@ void DrasculaEngine::animation_23_joined2() { pause(5); } - loadAndDecompressPic("99.alg", backSurface,1); + loadPic("99.alg", backSurface,1); } void DrasculaEngine::animation_25_2() { int n, pos_cabina[6]; - loadAndDecompressPic("an14_2.alg", backSurface, 1); - loadAndDecompressPic("18.alg", drawSurface1, 1); + loadPic("an14_2.alg", backSurface, 1); + loadPic("18.alg", drawSurface1, 1); pos_cabina[0] = 150; pos_cabina[1] = 6; @@ -1180,7 +1180,7 @@ void DrasculaEngine::animation_25_2() { finishSound(); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("99.alg", backSurface, 1); } void DrasculaEngine::animation_27_2() { @@ -1248,7 +1248,7 @@ void DrasculaEngine::animation_31_2() { lleva_vb(-50); pause(15); lleva_al_hare(159, 140); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("99.alg", backSurface, 1); sentido_hare = 2; updateRoom(); updateScreen(); @@ -1297,8 +1297,8 @@ void DrasculaEngine::animation_35_2() { updateRoom(); updateScreen(); - loadAndDecompressPic("an35_1.alg", backSurface, 1); - loadAndDecompressPic("an35_2.alg", frontSurface, 1); + loadPic("an35_1.alg", backSurface, 1); + loadPic("an35_2.alg", frontSurface, 1); updateAnim(1, 70, 90, 46, 80, 6, backSurface); updateAnim(82, 70, 90, 46, 80, 6, backSurface); @@ -1340,9 +1340,9 @@ void DrasculaEngine::animation_2_3() { flags[0] = 0; flags[1] = 1; - loadAndDecompressPic("96.alg", frontSurface, 1); - loadAndDecompressPic("97.alg", extraSurface, 1); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("96.alg", frontSurface, 1); + loadPic("97.alg", extraSurface, 1); + loadPic("99.alg", backSurface, 1); lleva_al_hare(332, 127); } @@ -1350,9 +1350,9 @@ void DrasculaEngine::animation_2_3() { void DrasculaEngine::animation_3_3() { int px = hare_x - 20, py = hare_y - 1; - loadAndDecompressPic("an2y_1.alg", frontSurface, 1); - loadAndDecompressPic("an2y_2.alg", extraSurface, 1); - loadAndDecompressPic("an2y_3.alg", backSurface, 1); + loadPic("an2y_1.alg", frontSurface, 1); + loadPic("an2y_2.alg", extraSurface, 1); + loadPic("an2y_3.alg", backSurface, 1); updateAnim2(2, px, py, 71, 72, 4, frontSurface); updateAnim2(75, px, py, 71, 72, 4, frontSurface); @@ -1365,9 +1365,9 @@ void DrasculaEngine::animation_3_3() { void DrasculaEngine::animation_4_3() { int px = 120, py = 63; - loadAndDecompressPic("any_1.alg", frontSurface, 1); - loadAndDecompressPic("any_2.alg", extraSurface, 1); - loadAndDecompressPic("any_3.alg", backSurface, 1); + loadPic("any_1.alg", frontSurface, 1); + loadPic("any_2.alg", extraSurface, 1); + loadPic("any_3.alg", backSurface, 1); updateAnim2(1, px, py, 77, 89, 4, frontSurface); updateAnim2(91, px, py, 77, 89, 4, frontSurface); @@ -1380,9 +1380,9 @@ void DrasculaEngine::animation_4_3() { void DrasculaEngine::animation_5_3() { int px = hare_x - 20, py = hare_y - 1; - loadAndDecompressPic("an3y_1.alg", frontSurface, 1); - loadAndDecompressPic("an3y_2.alg", extraSurface, 1); - loadAndDecompressPic("an3y_3.alg", backSurface, 1); + loadPic("an3y_1.alg", frontSurface, 1); + loadPic("an3y_2.alg", extraSurface, 1); + loadPic("an3y_3.alg", backSurface, 1); updateAnim2(2, px, py, 71, 72, 4, frontSurface); updateAnim2(75, px, py, 71, 72, 4, frontSurface); @@ -1404,7 +1404,7 @@ void DrasculaEngine::animation_6_3() { flags[1] = 0; - loadAndDecompressPic("an4y.alg", frontSurface, 1); + loadPic("an4y.alg", frontSurface, 1); for (frame = 0; frame < 6; frame++) { pause(3); @@ -1415,18 +1415,18 @@ void DrasculaEngine::animation_6_3() { flags[2] = 1; - loadAndDecompressPic("96.alg", frontSurface, 1); + loadPic("96.alg", frontSurface, 1); updateRoom(); updateScreen(); } void DrasculaEngine::animation_rayo() { - loadAndDecompressPic("anr_1.alg", frontSurface, HALF_PAL); - loadAndDecompressPic("anr_2.alg", extraSurface, 1); - loadAndDecompressPic("anr_3.alg", backSurface, 1); - loadAndDecompressPic("anr_4.alg", drawSurface1, 1); - loadAndDecompressPic("anr_5.alg", drawSurface3, 1); + loadPic("anr_1.alg", frontSurface, HALF_PAL); + loadPic("anr_2.alg", extraSurface, 1); + loadPic("anr_3.alg", backSurface, 1); + loadPic("anr_4.alg", drawSurface1, 1); + loadPic("anr_5.alg", drawSurface3, 1); updateScreen(0, 0, 0, 0, 320, 200, frontSurface); @@ -1571,8 +1571,8 @@ void DrasculaEngine::animation_5_5(){ updateRoom(); updateScreen(); - loadAndDecompressPic("3an5_1.alg", backSurface, 1); - loadAndDecompressPic("3an5_2.alg", frontSurface, 1); + loadPic("3an5_1.alg", backSurface, 1); + loadPic("3an5_2.alg", frontSurface, 1); for (frame = 0; frame < 9; frame++) { pause(3); @@ -1595,15 +1595,15 @@ void DrasculaEngine::animation_5_5(){ updateVisible(); pause(12); - loadAndDecompressPic("96.alg", frontSurface, 1); + loadPic("96.alg", frontSurface, 1); for (h = 0; h < (200 - 18); h++) copyBackground(0, 53, 0, h, 320, 19, frontSurface, screenSurface); updateScreen(); - loadAndDecompressPic("101.alg", drawSurface1, HALF_PAL); - loadAndDecompressPic("3an5_3.alg", backSurface, 1); - loadAndDecompressPic("3an5_4.alg", extraSurface, 1); + loadPic("101.alg", drawSurface1, HALF_PAL); + loadPic("3an5_3.alg", backSurface, 1); + loadPic("3an5_4.alg", extraSurface, 1); updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); pause(9); @@ -1622,12 +1622,12 @@ void DrasculaEngine::animation_5_5(){ playSound(1); finishSound(); - loadAndDecompressPic("99.alg", backSurface, 1); - loadAndDecompressPic("97.alg", extraSurface, 1); + loadPic("99.alg", backSurface, 1); + loadPic("97.alg", extraSurface, 1); clearRoom(); - loadAndDecompressPic("49.alg", drawSurface1, HALF_PAL); + loadPic("49.alg", drawSurface1, HALF_PAL); } void DrasculaEngine::animation_6_5() { @@ -1726,7 +1726,7 @@ void DrasculaEngine::animation_12_5() { bgPalette3[color][component] = adjustToVGA(bgPalette3[color][component] - 8 + fundido); } - loadAndDecompressPic("3an11_1.alg", backSurface, 1); + loadPic("3an11_1.alg", backSurface, 1); for (frame = 0; frame < 8; frame++) { if (frame == 2 || frame == 4 || frame == 8 || frame==10) @@ -1771,7 +1771,7 @@ void DrasculaEngine::animation_12_5() { hiccup(12); finishSound(); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("99.alg", backSurface, 1); lleva_al_hare(40, 169); lleva_al_hare(-14, 175); @@ -1795,7 +1795,7 @@ void DrasculaEngine::animation_13_5() { int frus_y[] = {1, 1, 1, 1, 1, 1, 1, 89}; int pos_frusky[6]; - loadAndDecompressPic("auxfr.alg", backSurface, 1); + loadPic("auxfr.alg", backSurface, 1); pos_frusky[3] = 81; pos_frusky[4] = 44; @@ -1878,9 +1878,9 @@ void DrasculaEngine::animation_1_6() { for (l = 0; l < 200; l++) factor_red[l] = 98; - loadAndDecompressPic("auxig2.alg", frontSurface, 1); - loadAndDecompressPic("auxdr.alg", drawSurface2, 1); - loadAndDecompressPic("car.alg", backSurface, 1); + loadPic("auxig2.alg", frontSurface, 1); + loadPic("auxdr.alg", drawSurface2, 1); + loadPic("car.alg", backSurface, 1); talk_drascula(19, 1); talk(247); talk_drascula(20, 1); @@ -1901,7 +1901,7 @@ void DrasculaEngine::animation_1_6() { talk_drascula(29, 1); fadeToBlack(1); clearRoom(); - loadAndDecompressPic("time1.alg", screenSurface, 1); + loadPic("time1.alg", screenSurface, 1); updateScreen(); delay(930); clearRoom(); @@ -1916,7 +1916,7 @@ void DrasculaEngine::animation_1_6() { talk(257); fadeToBlack(0); clearRoom(); - loadAndDecompressPic("time1.alg", screenSurface,1); + loadPic("time1.alg", screenSurface,1); updateScreen(); delay(900); clearRoom(); @@ -1988,10 +1988,10 @@ void DrasculaEngine::animation_6_6() { clearRoom(); withoutVerb(); removeObject(20); - loadAndDecompressPic("96.alg", frontSurface, 1); - loadAndDecompressPic("97.alg", frontSurface, 1); - loadAndDecompressPic("97.alg", extraSurface, 1); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("96.alg", frontSurface, 1); + loadPic("97.alg", frontSurface, 1); + loadPic("97.alg", extraSurface, 1); + loadPic("99.alg", backSurface, 1); doBreak = 1; objExit = 104; hare_x = -1; @@ -2032,7 +2032,7 @@ void DrasculaEngine::animation_9_6() { // Also check animation_2_1(), where the same hack was used // by the original roomNumber = -1; - loadAndDecompressPic("nota2.alg", drawSurface1, HALF_PAL); + loadPic("nota2.alg", drawSurface1, HALF_PAL); black(); sentido_hare = 1; hare_x -= 21; @@ -2046,7 +2046,7 @@ void DrasculaEngine::animation_9_6() { updateScreen(); playMusic(9); clearRoom(); - loadAndDecompressPic("nota.alg", drawSurface1, COMPLETE_PAL); + loadPic("nota.alg", drawSurface1, COMPLETE_PAL); color_abc(kColorWhite); talk_solo(_textbj[_lang][24], "bj24.als"); talk_solo(_textbj[_lang][25], "bj25.als"); @@ -2055,8 +2055,8 @@ void DrasculaEngine::animation_9_6() { talk_solo(_textbj[_lang][28], "bj28.als"); sentido_hare = 3; clearRoom(); - loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); - loadAndDecompressPic("nota2.alg", drawSurface1, HALF_PAL); + loadPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic("nota2.alg", drawSurface1, HALF_PAL); talk(296); talk(297); talk(298); @@ -2068,7 +2068,7 @@ void DrasculaEngine::animation_9_6() { updateScreen(); color_abc(kColorLightGreen); talk_solo("GOOOOOOOOOOOOOOOL", "s15.als"); - loadAndDecompressPic("nota2.alg", drawSurface1, 1); + loadPic("nota2.alg", drawSurface1, 1); sentido_hare = 0; updateRoom(); updateScreen(); @@ -2153,7 +2153,7 @@ void DrasculaEngine::animation_12_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadAndDecompressPic("an12.alg", extraSurface, 1); + loadPic("an12.alg", extraSurface, 1); talk(356); @@ -2182,14 +2182,14 @@ void DrasculaEngine::animation_12_2() { textSurface = extraSurface; flags[11] = 0; - loadAndDecompressPic("974.alg", extraSurface, 1); + loadPic("974.alg", extraSurface, 1); } void DrasculaEngine::animation_26_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadAndDecompressPic("an12.alg", extraSurface, 1); + loadPic("an12.alg", extraSurface, 1); talk(392); @@ -2217,7 +2217,7 @@ void DrasculaEngine::animation_26_2() { talk_pianist(18); talk_pianist(19); - loadAndDecompressPic("an26.alg", extraSurface, 1); + loadPic("an26.alg", extraSurface, 1); updateAnim(1, 225, 113, 50, 59, 6, extraSurface); @@ -2244,7 +2244,7 @@ void DrasculaEngine::animation_26_2() { flags[11] = 0; flags[39] = 1; - loadAndDecompressPic("974.alg", extraSurface, 1); + loadPic("974.alg", extraSurface, 1); roomMusic = 16; } @@ -2252,7 +2252,7 @@ void DrasculaEngine::animation_11_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadAndDecompressPic("an11y13.alg", extraSurface, 1); + loadPic("an11y13.alg", extraSurface, 1); talk(352); talk_bartender(1); @@ -2267,11 +2267,11 @@ void DrasculaEngine::animation_11_2() { if (_lang == kSpanish) textSurface = extraSurface; - loadAndDecompressPic("974.alg", extraSurface, 1); + loadPic("974.alg", extraSurface, 1); } void DrasculaEngine::animation_13_2() { - loadAndDecompressPic("an11y13.alg", frontSurface, 1); + loadPic("an11y13.alg", frontSurface, 1); if (flags[41] == 0) { talk(103); @@ -2287,7 +2287,7 @@ void DrasculaEngine::animation_13_2() { } converse("op_2.cal"); - loadAndDecompressPic("964.alg", frontSurface, 1); + loadPic("964.alg", frontSurface, 1); } void DrasculaEngine::animation_18_2() { @@ -2325,7 +2325,7 @@ void DrasculaEngine::animation_24_2() { talk(356); - loadAndDecompressPic("an24.alg", frontSurface, 1); + loadPic("an24.alg", frontSurface, 1); animation_32_2(); @@ -2346,8 +2346,8 @@ void DrasculaEngine::animation_24_2() { } void DrasculaEngine::animation_32_2() { - loadAndDecompressPic("an32_1.alg", drawSurface3, 1); - loadAndDecompressPic("an32_2.alg", backSurface, 1); + loadPic("an32_1.alg", drawSurface3, 1); + loadPic("an32_2.alg", backSurface, 1); updateAnim(1, 113, 53, 65, 81, 4, drawSurface3, 4); updateAnim(83, 113, 53, 65, 81, 4, drawSurface3, 4); @@ -2363,7 +2363,7 @@ void DrasculaEngine::animation_32_2() { pause(4); } - loadAndDecompressPic("aux18.alg", drawSurface3, 1); + loadPic("aux18.alg", drawSurface3, 1); } void DrasculaEngine::animation_34_2() { @@ -2371,8 +2371,8 @@ void DrasculaEngine::animation_34_2() { updateRoom(); updateScreen(); - loadAndDecompressPic("an34_1.alg", backSurface, 1); - loadAndDecompressPic("an34_2.alg", extraSurface, 1); + loadPic("an34_1.alg", backSurface, 1); + loadPic("an34_2.alg", extraSurface, 1); updateAnim(1, 218, 79, 83, 75, 3, backSurface); updateAnim(77, 218, 79, 83, 75, 3, backSurface); @@ -2389,15 +2389,15 @@ void DrasculaEngine::animation_34_2() { updateScreen(218, 79, 218, 79, 83, 75, screenSurface); pause(3); - loadAndDecompressPic("994.alg", backSurface, 1); - loadAndDecompressPic("974.alg", extraSurface, 1); + loadPic("994.alg", backSurface, 1); + loadPic("974.alg", extraSurface, 1); } void DrasculaEngine::animation_36_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadAndDecompressPic("an11y13.alg", extraSurface, 1); + loadPic("an11y13.alg", extraSurface, 1); talk(404); talk_bartender(19); @@ -2410,13 +2410,13 @@ void DrasculaEngine::animation_36_2() { if (_lang == kSpanish) textSurface = extraSurface; - loadAndDecompressPic("974.alg", extraSurface, 1); + loadPic("974.alg", extraSurface, 1); } void DrasculaEngine::animation_7_2() { - loadAndDecompressPic("an7_1.alg", backSurface, 1); - loadAndDecompressPic("an7_2.alg", extraSurface, 1); - loadAndDecompressPic("an7_3.alg", frontSurface, 1); + loadPic("an7_1.alg", backSurface, 1); + loadPic("an7_2.alg", extraSurface, 1); + loadPic("an7_3.alg", frontSurface, 1); if (flags[3] == 1) copyBackground(258, 110, 85, 44, 23, 53, drawSurface3, drawSurface1); @@ -2431,10 +2431,10 @@ void DrasculaEngine::animation_7_2() { updateAnim2(75, 80, 64, 51, 73, 6, extraSurface); updateAnim2(1, 80, 64, 51, 73, 6, frontSurface); - loadAndDecompressPic("an7_4.alg", backSurface, 1); - loadAndDecompressPic("an7_5.alg", extraSurface, 1); - loadAndDecompressPic("an7_6.alg", frontSurface, 1); - loadAndDecompressPic("an7_7.alg", drawSurface3, 1); + loadPic("an7_4.alg", backSurface, 1); + loadPic("an7_5.alg", extraSurface, 1); + loadPic("an7_6.alg", frontSurface, 1); + loadPic("an7_7.alg", drawSurface3, 1); updateAnim2(1, 80, 64, 51, 73, 6, backSurface); updateAnim2(75, 80, 64, 51, 73, 6, backSurface); @@ -2447,8 +2447,8 @@ void DrasculaEngine::animation_7_2() { updateAnim2(1, 80, 64, 51, 73, 6, drawSurface3); updateAnim2(75, 80, 64, 51, 73, 2, drawSurface3); - loadAndDecompressPic("an7_8.alg", backSurface, 1); - loadAndDecompressPic("an7_9.alg", extraSurface, 1); + loadPic("an7_8.alg", backSurface, 1); + loadPic("an7_9.alg", extraSurface, 1); updateAnim2(1, 80, 64, 51, 73, 6, backSurface); updateAnim2(75, 80, 64, 51, 73, 6, backSurface); @@ -2463,10 +2463,10 @@ void DrasculaEngine::animation_7_2() { if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; - loadAndDecompressPic("99.alg", backSurface, 1); - loadAndDecompressPic("97.alg", extraSurface, 1); - loadAndDecompressPic("96.alg", frontSurface, 1); - loadAndDecompressPic("aux3.alg", drawSurface3, 1); + loadPic("99.alg", backSurface, 1); + loadPic("97.alg", extraSurface, 1); + loadPic("96.alg", frontSurface, 1); + loadPic("aux3.alg", drawSurface3, 1); } void DrasculaEngine::animation_5_2() { @@ -2474,10 +2474,10 @@ void DrasculaEngine::animation_5_2() { updateRoom(); updateScreen(); - loadAndDecompressPic("an5_1.alg", backSurface, 1); - loadAndDecompressPic("an5_2.alg", extraSurface, 1); - loadAndDecompressPic("an5_3.alg", frontSurface, 1); - loadAndDecompressPic("an5_4.alg", drawSurface3, 1); + loadPic("an5_1.alg", backSurface, 1); + loadPic("an5_2.alg", extraSurface, 1); + loadPic("an5_3.alg", frontSurface, 1); + loadPic("an5_4.alg", drawSurface3, 1); copyBackground(1, 1, 213, 66, 53,84, backSurface, screenSurface); updateScreen(); @@ -2497,10 +2497,10 @@ void DrasculaEngine::animation_5_2() { updateAnim(1, 213, 66, 53, 84, 6, drawSurface3); - loadAndDecompressPic("994.alg", backSurface, 1); - loadAndDecompressPic("974.alg", extraSurface, 1); - loadAndDecompressPic("964.alg", frontSurface, 1); - loadAndDecompressPic("aux5.alg", drawSurface3, 1); + loadPic("994.alg", backSurface, 1); + loadPic("974.alg", extraSurface, 1); + loadPic("964.alg", frontSurface, 1); + loadPic("aux5.alg", drawSurface3, 1); flags[8] = 1; hare_x = hare_x - 4; talk_sinc(_text[_lang][46], "46.als", "4442444244244"); @@ -2515,11 +2515,11 @@ void DrasculaEngine::animation_6_2() { textSurface = frontSurface; clearRoom(); - loadAndDecompressPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind - loadAndDecompressPic("ciego2.alg", drawSurface3, 1); - loadAndDecompressPic("ciego3.alg", extraSurface, 1); - loadAndDecompressPic("ciego4.alg", backSurface, 1); - loadAndDecompressPic("ciego5.alg", frontSurface, 1); + loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind + loadPic("ciego2.alg", drawSurface3, 1); + loadPic("ciego3.alg", extraSurface, 1); + loadPic("ciego4.alg", backSurface, 1); + loadPic("ciego5.alg", frontSurface, 1); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); @@ -2541,11 +2541,11 @@ void DrasculaEngine::animation_6_2() { clearRoom(); playMusic(roomMusic); - loadAndDecompressPic("9.alg", drawSurface1, HALF_PAL); - loadAndDecompressPic("aux9.alg", drawSurface3, 1); - loadAndDecompressPic("96.alg", frontSurface, 1); - loadAndDecompressPic("97.alg", extraSurface, 1); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("9.alg", drawSurface1, HALF_PAL); + loadPic("aux9.alg", drawSurface3, 1); + loadPic("96.alg", frontSurface, 1); + loadPic("97.alg", extraSurface, 1); + loadPic("99.alg", backSurface, 1); withoutVerb(); if (_lang == kSpanish) @@ -2563,11 +2563,11 @@ void DrasculaEngine::animation_33_2() { pause(8); clearRoom(); - loadAndDecompressPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind - loadAndDecompressPic("ciego2.alg", drawSurface3, 1); - loadAndDecompressPic("ciego3.alg", extraSurface, 1); - loadAndDecompressPic("ciego4.alg", backSurface, 1); - loadAndDecompressPic("ciego5.alg", frontSurface, 1); + loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind + loadPic("ciego2.alg", drawSurface3, 1); + loadPic("ciego3.alg", extraSurface, 1); + loadPic("ciego4.alg", backSurface, 1); + loadPic("ciego5.alg", frontSurface, 1); if (_lang == kSpanish) textSurface = frontSurface; @@ -2593,11 +2593,11 @@ void DrasculaEngine::animation_33_2() { clearRoom(); playMusic(roomMusic); - loadAndDecompressPic("9.alg", drawSurface1, HALF_PAL); - loadAndDecompressPic("aux9.alg", drawSurface3, 1); - loadAndDecompressPic("96.alg", frontSurface, 1); - loadAndDecompressPic("97.alg", extraSurface, 1); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("9.alg", drawSurface1, HALF_PAL); + loadPic("aux9.alg", drawSurface3, 1); + loadPic("96.alg", frontSurface, 1); + loadPic("97.alg", extraSurface, 1); + loadPic("99.alg", backSurface, 1); withoutVerb(); if (_lang == kSpanish) @@ -2665,7 +2665,7 @@ void DrasculaEngine::animation_1_4() { void DrasculaEngine::animation_5_4(){ sentido_hare = 3; - loadAndDecompressPic("anh_dr.alg", backSurface, 1); + loadPic("anh_dr.alg", backSurface, 1); lleva_al_hare(99, 160); lleva_al_hare(38, 177); hare_se_ve = 0; @@ -2679,13 +2679,13 @@ void DrasculaEngine::animation_5_4(){ updateRoom(); updateScreen(); openDoor(2, 0); - loadAndDecompressPic("auxigor.alg", frontSurface, 1); + loadPic("auxigor.alg", frontSurface, 1); igorX = 100; igorY = 65; talk_igor_front(29); talk_igor_front(30); - loadAndDecompressPic("96.alg", frontSurface, 1); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("96.alg", frontSurface, 1); + loadPic("99.alg", backSurface, 1); hare_se_ve = 1; fadeToBlack(0); exitRoom(0); @@ -2696,9 +2696,9 @@ void DrasculaEngine::animation_6_4() { roomNumber = 26; clearRoom(); - loadAndDecompressPic("26.alg", drawSurface1, HALF_PAL); - loadAndDecompressPic("aux26.alg", drawSurface3, 1); - loadAndDecompressPic("auxigor.alg", frontSurface, 1); + loadPic("26.alg", drawSurface1, HALF_PAL); + loadPic("aux26.alg", drawSurface3, 1); + loadPic("auxigor.alg", frontSurface, 1); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); update_26_pre(); igorX = 104; @@ -2709,11 +2709,11 @@ void DrasculaEngine::animation_6_4() { talk_igor_front(26); roomNumber = prevRoom; clearRoom(); - loadAndDecompressPic("96.alg", frontSurface, 1); - loadAndDecompressPic(roomDisk, drawSurface3, 1); + loadPic("96.alg", frontSurface, 1); + loadPic(roomDisk, drawSurface3, 1); char rm[20]; sprintf(rm, "%i.alg", roomNumber); - loadAndDecompressPic(rm, drawSurface1, HALF_PAL); + loadPic(rm, drawSurface1, HALF_PAL); withoutVerb(); updateRoom(); } @@ -2723,7 +2723,7 @@ void DrasculaEngine::animation_8_4() { int estanteria_x[] = {1, 75, 149, 223, 1, 75, 149, 223, 149, 223, 149, 223, 149, 223}; int estanteria_y[] = {1, 1, 1, 1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74}; - loadAndDecompressPic("an_8.alg", frontSurface, 1); + loadPic("an_8.alg", frontSurface, 1); for (frame = 0; frame < 14; frame++) { pause(2); @@ -2731,7 +2731,7 @@ void DrasculaEngine::animation_8_4() { updateScreen(77, 45, 77, 45, 73, 72, screenSurface); } - loadAndDecompressPic("96.alg", frontSurface, 1); + loadPic("96.alg", frontSurface, 1); openDoor(7, 2); } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 6f84badfd9..b9e3354dec 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -165,33 +165,33 @@ int DrasculaEngine::go() { hay_seleccion = 0; if (currentChapter != 6) { - loadAndDecompressPic("95.alg", tableSurface, 1); + loadPic("95.alg", tableSurface, 1); } if (currentChapter == 1) { - loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); - loadAndDecompressPic("99.alg", backSurface, 1); - loadAndDecompressPic("97.alg", extraSurface, 1); + loadPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic("99.alg", backSurface, 1); + loadPic("97.alg", extraSurface, 1); } else if (currentChapter == 2) { - loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); - loadAndDecompressPic("pts.alg", drawSurface2, 1); + loadPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic("pts.alg", drawSurface2, 1); } else if (currentChapter == 3) { - loadAndDecompressPic("aux13.alg", drawSurface1, COMPLETE_PAL); - loadAndDecompressPic("96.alg", frontSurface, 1); - loadAndDecompressPic("97.alg", extraSurface, 1); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("aux13.alg", drawSurface1, COMPLETE_PAL); + loadPic("96.alg", frontSurface, 1); + loadPic("97.alg", extraSurface, 1); + loadPic("99.alg", backSurface, 1); } else if (currentChapter == 4) { - loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic("96.alg", frontSurface, COMPLETE_PAL); if (hay_que_load == 0) animation_rayo(); - loadAndDecompressPic("96.alg", frontSurface, 1); + loadPic("96.alg", frontSurface, 1); clearRoom(); - loadAndDecompressPic("99.alg", backSurface, 1); - loadAndDecompressPic("97.alg", extraSurface, 1); + loadPic("99.alg", backSurface, 1); + loadPic("97.alg", extraSurface, 1); } else if (currentChapter == 5) { - loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); - loadAndDecompressPic("97.alg", extraSurface, 1); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic("97.alg", extraSurface, 1); + loadPic("99.alg", backSurface, 1); } else if (currentChapter == 6) { igorX = 105, igorY = 85, sentido_igor = 1; x_dr = 62, y_dr = 99, sentido_dr = 1; @@ -200,10 +200,10 @@ int DrasculaEngine::go() { pendulumSurface = drawSurface3; - loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); - loadAndDecompressPic("99.alg", backSurface, 1); - loadAndDecompressPic("97.alg", extraSurface, 1); - loadAndDecompressPic("95.alg", tableSurface, 1); + loadPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic("99.alg", backSurface, 1); + loadPic("97.alg", extraSurface, 1); + loadPic("95.alg", tableSurface, 1); } memset(iconName, 0, sizeof(iconName)); @@ -266,7 +266,7 @@ void DrasculaEngine::freeMemory() { free(frontSurface); } -void DrasculaEngine::loadPic(const char *NamePcc) { +void DrasculaEngine::loadPic(const char *NamePcc, byte *targetSurface, int colorCount) { unsigned int con, x = 0; unsigned int fExit = 0; byte ch, rep; @@ -296,6 +296,8 @@ void DrasculaEngine::loadPic(const char *NamePcc) { _arj.read(cPal, 768); _arj.close(); + + decompressPic(targetSurface, colorCount); } void DrasculaEngine::decompressPic(byte *targetSurface, int colorCount) { @@ -478,7 +480,7 @@ bool DrasculaEngine::escoba() { animation_1_1(); withoutVerb(); - loadAndDecompressPic("2aux62.alg", drawSurface2, 1); + loadPic("2aux62.alg", drawSurface2, 1); sentido_hare = 1; objExit = 104; if (hay_que_load != 0) { @@ -568,7 +570,7 @@ bool DrasculaEngine::escoba() { if (!para_cargar(saveName)) { return true; } - loadAndDecompressPic("auxdr.alg", drawSurface2, 1); + loadPic("auxdr.alg", drawSurface2, 1); } } @@ -610,9 +612,9 @@ bool DrasculaEngine::escoba() { if (button_dch == 1 && menuScreen == 1) { delay(100); if (currentChapter == 2) - loadAndDecompressPic(menuBackground, backSurface, 1); + loadPic(menuBackground, backSurface, 1); else - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("99.alg", backSurface, 1); setPalette((byte *)&gamePalette); menuScreen = 0; updateEvents(); @@ -625,13 +627,13 @@ bool DrasculaEngine::escoba() { if (sentido_hare == 2) sentido_hare = 1; if (currentChapter == 4) - loadAndDecompressPic("icons2.alg", backSurface, 1); + loadPic("icons2.alg", backSurface, 1); else if (currentChapter == 5) - loadAndDecompressPic("icons3.alg", backSurface, 1); + loadPic("icons3.alg", backSurface, 1); else if (currentChapter == 6) - loadAndDecompressPic("iconsp.alg", backSurface, 1); + loadPic("iconsp.alg", backSurface, 1); else - loadAndDecompressPic("icons.alg", backSurface, 1); + loadPic("icons.alg", backSurface, 1); menuScreen = 1; updateEvents(); withoutVerb(); @@ -716,7 +718,7 @@ bool DrasculaEngine::escoba() { if (currentChapter != 3) cont_sv = 0; } else if (currentChapter == 6 && key == Common::KEYCODE_0 && roomNumber == 61) { - loadAndDecompressPic("alcbar.alg", drawSurface1, 255); + loadPic("alcbar.alg", drawSurface1, 255); } else if (cont_sv == 15000) { screenSaver(); if (currentChapter != 3) @@ -730,18 +732,18 @@ bool DrasculaEngine::escoba() { void DrasculaEngine::pickObject(int objeto) { if (currentChapter == 6) - loadAndDecompressPic("iconsp.alg", backSurface, 1); + loadPic("iconsp.alg", backSurface, 1); else if (currentChapter == 4) - loadAndDecompressPic("icons2.alg", backSurface, 1); + loadPic("icons2.alg", backSurface, 1); else if (currentChapter == 5) - loadAndDecompressPic("icons3.alg", backSurface, 1); + loadPic("icons3.alg", backSurface, 1); else - loadAndDecompressPic("icons.alg", backSurface, 1); + loadPic("icons.alg", backSurface, 1); chooseObject(objeto); if (currentChapter == 2) - loadAndDecompressPic(menuBackground, backSurface, 1); + loadPic(menuBackground, backSurface, 1); else - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("99.alg", backSurface, 1); } void DrasculaEngine::chooseObject(int objeto) { @@ -914,9 +916,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { _arj.close(); if (currentChapter == 2 && martin != 0) { - loadAndDecompressPic(pant2, extraSurface, 1); - loadAndDecompressPic(pant1, frontSurface, 1); - loadAndDecompressPic(pant4, backSurface, 1); + loadPic(pant2, extraSurface, 1); + loadPic(pant1, frontSurface, 1); + loadPic(pant4, backSurface, 1); } if (currentChapter == 2) { @@ -926,9 +928,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; feetHeight = PIES_HARE; - loadAndDecompressPic("97.alg", extraSurface, 1); - loadAndDecompressPic("96.alg", frontSurface, 1); - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("97.alg", extraSurface, 1); + loadPic("96.alg", frontSurface, 1); + loadPic("99.alg", backSurface, 1); strcpy(menuBackground, "99.alg"); } @@ -946,11 +948,11 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { } characterMoved = 0; } - loadAndDecompressPic(roomDisk, drawSurface3, 1); + loadPic(roomDisk, drawSurface3, 1); char rm[20]; sprintf(rm, "%i.alg", roomNumber); - loadAndDecompressPic(rm, drawSurface1, HALF_PAL); + loadPic(rm, drawSurface1, HALF_PAL); copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); @@ -1405,7 +1407,7 @@ bool DrasculaEngine::saves() { sav->readLine(names[n], 23); delete sav; - loadAndDecompressPic("savescr.alg", drawSurface1, HALF_PAL); + loadPic("savescr.alg", drawSurface1, HALF_PAL); color_abc(kColorLightGreen); @@ -1506,7 +1508,7 @@ bool DrasculaEngine::saves() { clearRoom(); char rm[20]; sprintf(rm, "%i.alg", roomNumber); - loadAndDecompressPic(rm, drawSurface1, HALF_PAL); + loadPic(rm, drawSurface1, HALF_PAL); hay_seleccion = 0; return true; @@ -1641,7 +1643,7 @@ void DrasculaEngine::screenSaver() { clearRoom(); - loadAndDecompressPic("sv.alg", drawSurface1, HALF_PAL); + loadPic("sv.alg", drawSurface1, HALF_PAL); // inicio_ghost(); copia = (byte *)malloc(64000); @@ -1728,7 +1730,7 @@ void DrasculaEngine::screenSaver() { char rm[20]; sprintf(rm, "%i.alg", roomNumber); - loadAndDecompressPic(rm, drawSurface1, HALF_PAL); + loadPic(rm, drawSurface1, HALF_PAL); } void DrasculaEngine::fliplay(const char *filefli, int vel) { @@ -3191,7 +3193,7 @@ void DrasculaEngine::converse(const char *nom_fich) { if (phrase4[h] == (char)0xa7) phrase4[h] = ' '; - loadAndDecompressPic("car.alg", backSurface, 1); + loadPic("car.alg", backSurface, 1); // TODO code here should limit y position for mouse in dialog menu, // but we can't implement this due lack backend functionality // from 1(top) to 31 @@ -3289,9 +3291,9 @@ void DrasculaEngine::converse(const char *nom_fich) { } // while (breakOut == 0) if (currentChapter == 2) - loadAndDecompressPic(menuBackground, backSurface, 1); + loadPic(menuBackground, backSurface, 1); else - loadAndDecompressPic("99.alg", backSurface, 1); + loadPic("99.alg", backSurface, 1); if (currentChapter != 5) withoutVerb(); } @@ -3682,10 +3684,10 @@ void DrasculaEngine::activatePendulum() { flags[1] = 2; hare_se_ve = 0; roomNumber = 102; - loadAndDecompressPic("102.alg", drawSurface1, HALF_PAL); - loadAndDecompressPic("an_p1.alg", drawSurface3, 1); - loadAndDecompressPic("an_p2.alg", extraSurface, 1); - loadAndDecompressPic("an_p3.alg", frontSurface, 1); + loadPic("102.alg", drawSurface1, HALF_PAL); + loadPic("an_p1.alg", drawSurface3, 1); + loadPic("an_p2.alg", extraSurface, 1); + loadPic("an_p3.alg", frontSurface, 1); copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 9ac43e7e20..6ebb36ac51 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -174,14 +174,9 @@ public: void freeMemory(); void releaseGame(); - void loadPic(const char *NamePcc); + void loadPic(const char *NamePcc, byte *targetSurface, int colorCount); void decompressPic(byte *targetSurface, int colorCount); - void loadAndDecompressPic(const char *NamePcc, byte *targetSurface, int colorCount) { - loadPic(NamePcc); - decompressPic(targetSurface, colorCount); - } - typedef char DacPalette256[256][3]; void setRGB(byte *dir_lectura, int plt); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 135de8b9f5..0a65ffb23d 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -937,10 +937,10 @@ void DrasculaEngine::room_59(int fl) { updateScreen(); hare_se_ve = 1; clearRoom(); - loadAndDecompressPic("tlef0.alg", drawSurface1, COMPLETE_PAL); - loadAndDecompressPic("tlef1.alg", drawSurface3, 1); - loadAndDecompressPic("tlef2.alg", frontSurface, 1); - loadAndDecompressPic("tlef3.alg", backSurface, 1); + loadPic("tlef0.alg", drawSurface1, COMPLETE_PAL); + loadPic("tlef1.alg", drawSurface3, 1); + loadPic("tlef2.alg", frontSurface, 1); + loadPic("tlef3.alg", backSurface, 1); talk_htel(240); color_abc(kColorBrown); @@ -958,10 +958,10 @@ void DrasculaEngine::room_59(int fl) { color_abc(kColorBrown); talk_solo(_textvb[_lang][62], "VB62.als"); clearRoom(); - loadAndDecompressPic("aux59.alg", drawSurface3, 1); - loadAndDecompressPic("96.alg", frontSurface, COMPLETE_PAL); - loadAndDecompressPic("99.alg", backSurface, 1); - loadAndDecompressPic("59.alg", drawSurface1, HALF_PAL); + loadPic("aux59.alg", drawSurface3, 1); + loadPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic("99.alg", backSurface, 1); + loadPic("59.alg", drawSurface1, HALF_PAL); sentido_hare = 3; talk(245); withoutVerb(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 701580e722..c8d85639bb 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -515,7 +515,7 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) { int length = strlen(said); if (currentChapter == 1) { - loadAndDecompressPic("an11y13.alg", frontSurface, 1); + loadPic("an11y13.alg", frontSurface, 1); } flags[13] = 1; @@ -553,7 +553,7 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) { flags[13] = 0; if (currentChapter == 1) { - loadAndDecompressPic("96.alg", frontSurface, 1); + loadPic("96.alg", frontSurface, 1); } if (currentChapter == 1) { -- cgit v1.2.3 From 24156516ab29c900c1549c4356f6bbfa7cab5a28 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jun 2008 05:00:11 +0000 Subject: Simplified talk_blind() svn-id: r32485 --- engines/drascula/animation.cpp | 24 ++++++++++++------------ engines/drascula/drascula.h | 2 +- engines/drascula/talk.cpp | 10 +++++++++- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 09e7c8e214..a17afbe540 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -736,30 +736,30 @@ void DrasculaEngine::animation_4_2() { pause(10); - talk_blind(_textd[_lang][68], "d68.als", _textd1[_lang][68 - TEXTD_START]); + talk_blind(1); pause(5); talk_hacker(_textd[_lang][57], "d57.als"); pause(6); - talk_blind(_textd[_lang][69],"d69.als", _textd1[_lang][69 - TEXTD_START]); + talk_blind(2); pause(4); talk_hacker(_textd[_lang][58],"d58.als"); - talk_blind(_textd[_lang][70],"d70.als", _textd1[_lang][70 - TEXTD_START]); + talk_blind(3); delay(14); talk_hacker(_textd[_lang][59],"d59.als"); - talk_blind(_textd[_lang][71],"d71.als", _textd1[_lang][71 - TEXTD_START]); + talk_blind(4); talk_hacker(_textd[_lang][60],"d60.als"); - talk_blind(_textd[_lang][72],"d72.als", _textd1[_lang][72 - TEXTD_START]); + talk_blind(5); talk_hacker(_textd[_lang][61],"d61.als"); - talk_blind(_textd[_lang][73],"d73.als", _textd1[_lang][73 - TEXTD_START]); + talk_blind(6); talk_hacker(_textd[_lang][62],"d62.als"); - talk_blind(_textd[_lang][74],"d74.als", _textd1[_lang][74 - TEXTD_START]); + talk_blind(7); talk_hacker(_textd[_lang][63],"d63.als"); - talk_blind(_textd[_lang][75],"d75.als", _textd1[_lang][75 - TEXTD_START]); + talk_blind(8); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); _system->delayMillis(1000); talk_hacker(_textd[_lang][64], "d64.als"); - talk_blind(_textd[_lang][76], "d76.als", _textd1[_lang][76 - TEXTD_START]); + talk_blind(9); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); @@ -2529,7 +2529,7 @@ void DrasculaEngine::animation_6_2() { if (flags[4] == 1) talk_hacker(_textd[_lang][66], "d66.als"); pause(6); - talk_blind(_textd[_lang][78], "d78.als", _textd1[_lang][78 - TEXTD_START]); + talk_blind(11); pause(4); talk_hacker(_textd[_lang][67], "d67.als"); @@ -2577,12 +2577,12 @@ void DrasculaEngine::animation_33_2() { pause(10); - talk_blind(_textd[_lang][68], "d68.als", _textd1[_lang][68 - TEXTD_START]); + talk_blind(1); pause(5); talk_hacker(_textd[_lang][57], "d57.als"); pause(6); _system->delayMillis(1000); - talk_blind(_textd[_lang][77], "d77.als", _textd1[_lang][77 - TEXTD_START]); + talk_blind(10); talk_hacker(_textd[_lang][65], "d65.als"); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 6ebb36ac51..f459e559fe 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -463,7 +463,7 @@ public: void talk_vb(const char *, const char *); void talk_vbpuerta(int); void talk_vbpuerta(const char *said, const char *filename); - void talk_blind(const char *, const char *, const char *); + void talk_blind(int); void talk_hacker(const char *, const char *); void hiccup(int); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index c8d85639bb..62bedc2fd1 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -637,7 +637,15 @@ void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) { playMusic(roomMusic); } -void DrasculaEngine::talk_blind(const char *said, const char *filename, const char *sincronia) { +void DrasculaEngine::talk_blind(int index) { + // Special case: a second array is used for sync here + // Also, the blind man's texts in the first array and his + // voice files start from 58, not 1 + char filename[20]; + sprintf(filename, "d%i.als", index + TEXTD_START - 1); + const char *said = _textd[_lang][index + TEXTD_START - 1]; + const char *sincronia = _textd1[_lang][index - 1]; + byte *num_cara; int p = 0; int pos_blind[6]; -- cgit v1.2.3 From 0f17e601013853a4076fceeb621590fd57026005 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 2 Jun 2008 05:01:40 +0000 Subject: GID_WATER is no longer required. svn-id: r32486 --- engines/scumm/detection_tables.h | 3 +-- engines/scumm/scumm.h | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 24765ca83a..8c193974e5 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -286,8 +286,7 @@ static const GameSettings gameVariantsTable[] = { {"dog", "", 0, GID_HEGAME, 6, 80, MDT_NONE, GF_USE_KEY, UNK}, {"maze", "", 0, GID_HEGAME, 6, 80, MDT_NONE, GF_USE_KEY, UNK}, - {"water", "", 0, GID_WATER, 6, 80, MDT_NONE, GF_USE_KEY, UNK}, - {"water", "HE 99", 0, GID_WATER, 6, 99, MDT_NONE, GF_USE_KEY, UNK}, + {"water", "", 0, GID_HEGAME, 6, 80, MDT_NONE, GF_USE_KEY, UNK}, // condMaskCode value changed in setUserCondition & setTalkCondition {"putttime", "", 0, GID_HEGAME, 6, 85, MDT_NONE, GF_USE_KEY, UNK}, diff --git a/engines/scumm/scumm.h b/engines/scumm/scumm.h index 26b6aa6e2f..20824ffe74 100644 --- a/engines/scumm/scumm.h +++ b/engines/scumm/scumm.h @@ -221,7 +221,6 @@ enum ScummGameId { GID_FBEAR, GID_FUNPACK, GID_FREDDI3, - GID_WATER, GID_PUTTRACE, GID_FUNSHOP, // Used for all three funshops GID_FOOTBALL, -- cgit v1.2.3 From 7f36ae8d7cab7ddb30224ae24b539fa88c90566a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jun 2008 05:15:34 +0000 Subject: Removed some of the old talk functions svn-id: r32487 --- engines/drascula/animation.cpp | 4 ++-- engines/drascula/drascula.h | 5 ----- engines/drascula/talk.cpp | 43 ++++++++++++++++++++---------------------- 3 files changed, 22 insertions(+), 30 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index a17afbe540..b19aec0fae 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -2262,7 +2262,7 @@ void DrasculaEngine::animation_11_2() { talk_bartender(18); talk(355); pause(40); - talk_bartender("No, nada", "d82.als"); + talk_bartender(82); if (_lang == kSpanish) textSurface = extraSurface; @@ -2405,7 +2405,7 @@ void DrasculaEngine::animation_36_2() { talk_bartender(21); talk(355); pause(40); - talk_bartender("No, nada", "d82.als"); + talk_bartender(82); if (_lang == kSpanish) textSurface = extraSurface; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index f459e559fe..cca8f50be0 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -425,14 +425,10 @@ public: void talkInit(const char *filename); bool isTalkFinished(int* length); void talk_igor_dch(int); - void talk_igor_dch(const char *said, const char *filename); void talk_drascula(int index, int talkerType = 0); - void talk_drascula(const char *said, const char *filename); void talk_solo(const char *, const char *); void talk_igor_front(int); - void talk_igor_front(const char *, const char *); void talk_bartender(int, int talkerType = 0); - void talk_bartender(const char *said, const char *filename, int talkerType = 0); void talk_igor_door(int); void talk_igor_door(const char *said, const char *filename); void talk_igor_wig(int); @@ -443,7 +439,6 @@ public: void talk_htel(int); void talk_htel(const char *said, const char *filename); void talk_bj(int); - void talk_bj(const char *, const char *); void talk_baul(const char *said, const char *filename); void talk(int); void talk(const char *, const char *); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 62bedc2fd1..88312d9af3 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -51,12 +51,9 @@ bool DrasculaEngine::isTalkFinished(int* length) { } void DrasculaEngine::talk_igor_dch(int index) { - char name[20]; - sprintf(name, "I%i.als", index); - talk_igor_dch(_texti[_lang][index], name); -} - -void DrasculaEngine::talk_igor_dch(const char *said, const char *filename) { + char filename[20]; + sprintf(filename, "I%i.als", index); + const char *said = _texti[_lang][index]; int x_talk[8] = { 56, 82, 108, 134, 160, 186, 212, 238 }; int face; int length = strlen(said); @@ -185,12 +182,9 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { } void DrasculaEngine::talk_igor_front(int index) { - char name[20]; - sprintf(name, "I%i.als", index); - talk_igor_front(_texti[_lang][index], name); -} - -void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { + char filename[20]; + sprintf(filename, "I%i.als", index); + const char *said = _texti[_lang][index]; int x_talk[8] = { 56, 86, 116, 146, 176, 206, 236, 266 }; int face; int length = strlen(said); @@ -237,12 +231,18 @@ void DrasculaEngine::talk_igor_front(const char *said, const char *filename) { } void DrasculaEngine::talk_bartender(int index, int talkerType) { - char name[20]; - sprintf(name, "t%i.als", index); - talk_bartender(_textt[_lang][index], name); -} + char filename[20]; + sprintf(filename, "t%i.als", index); + char specialLine[20]; + sprintf(specialLine, "No, nada"); + const char *said; + + // Line 82 is hardcoded + if (index != 82) + said = _textt[_lang][index]; + else + said = (const char*)specialLine; -void DrasculaEngine::talk_bartender(const char *said, const char *filename, int talkerType) { int x_talk[9] = { 1, 23, 45, 67, 89, 111, 133, 155, 177 }; int face; int length = strlen(said); @@ -290,12 +290,9 @@ void DrasculaEngine::talk_bartender(const char *said, const char *filename, int } void DrasculaEngine::talk_bj(int index) { - char name[20]; - sprintf(name, "BJ%i.als", index); - talk_bj(_textbj[_lang][index], name); -} - -void DrasculaEngine::talk_bj(const char *said, const char *filename) { + char filename[20]; + sprintf(filename, "BJ%i.als", index); + const char *said = _textbj[_lang][index]; int x_talk[5] = { 64, 92, 120, 148, 176 }; int face; int length = strlen(said); -- cgit v1.2.3 From 4352bd1d88a0481b70ff9dcdc74193a95cea8a7c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Jun 2008 05:38:28 +0000 Subject: Proper implementation for talk_banterder(82) svn-id: r32488 --- engines/drascula/staticdata.h | 10 +++++----- engines/drascula/talk.cpp | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 5a491fbce9..c5fb4c0679 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -3414,7 +3414,7 @@ const char *_textd[][84] = { // 80 "", "", - "", + "No, nada", "bla, bla, bla." }, { @@ -3517,7 +3517,7 @@ const char *_textd[][84] = { // 80 "", "", - "", + "No, nada", "\244a, \244a, \244a. que bueno, que bueno." }, { @@ -3620,7 +3620,7 @@ const char *_textd[][84] = { // 80 "", "", - "", + "No, nada", "bla, bla, bla." }, { @@ -3723,7 +3723,7 @@ const char *_textd[][84] = { // 80 "", "", - "", + "No, nada", "bla, bla, bla." }, { @@ -3826,7 +3826,7 @@ const char *_textd[][84] = { // 80 "", "", - "", + "No, nada", "bla, bla, bla." }, }; diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 88312d9af3..821f7f9860 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -233,15 +233,15 @@ void DrasculaEngine::talk_igor_front(int index) { void DrasculaEngine::talk_bartender(int index, int talkerType) { char filename[20]; sprintf(filename, "t%i.als", index); - char specialLine[20]; - sprintf(specialLine, "No, nada"); const char *said; - // Line 82 is hardcoded + // Line 82 is a special case if (index != 82) said = _textt[_lang][index]; - else - said = (const char*)specialLine; + else { + sprintf(filename, "d%i.als", index); + said = _textd[_lang][index]; + } int x_talk[9] = { 1, 23, 45, 67, 89, 111, 133, 155, 177 }; int face; -- cgit v1.2.3 From aaf8b5810c4e4c689e31cef8c03dd5fc1b3ad519 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Jun 2008 05:56:53 +0000 Subject: Proper detection for packed German and French versions. Removed unneeded code. svn-id: r32489 --- engines/drascula/detection.cpp | 96 ++++++------------------------------------ engines/drascula/drascula.cpp | 5 --- engines/drascula/drascula.h | 8 +--- 3 files changed, 15 insertions(+), 94 deletions(-) diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index 172f73291e..358a2bc1c3 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -36,28 +36,13 @@ namespace Drascula { struct DrasculaGameDescription { Common::ADGameDescription desc; - int gameID; - int gameType; uint32 features; - uint16 version; }; -uint32 DrasculaEngine::getGameID() const { - return _gameDescription->gameID; -} - uint32 DrasculaEngine::getFeatures() const { return _gameDescription->features; } -Common::Platform DrasculaEngine::getPlatform() const { - return _gameDescription->desc.platform; -} - -uint16 DrasculaEngine::getVersion() const { - return _gameDescription->version; -} - Common::Language DrasculaEngine::getLanguage() const { return _gameDescription->desc.language; } @@ -85,9 +70,6 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::ADGF_NO_FLAGS }, 0, - 0, - 0, - 0, }, { @@ -100,10 +82,7 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::kPlatformPC, Common::ADGF_NO_FLAGS }, - 0, - 0, - 0, - 0, + GF_PACKED, }, { @@ -111,15 +90,16 @@ static const DrasculaGameDescription gameDescriptions[] = { { "drascula", 0, - AD_ENTRY1s("packet.003", "e8f4dc6091037329bab4ddb1cba35807", 719728), + { + {"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563}, + {"packet.003", 0, "e8f4dc6091037329bab4ddb1cba35807", 719728}, + {NULL, 0, NULL, 0} + }, Common::DE_DEU, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, - 0, - 0, - 0, - 0, + GF_PACKED, }, { @@ -127,15 +107,16 @@ static const DrasculaGameDescription gameDescriptions[] = { { "drascula", 0, - AD_ENTRY1s("packet.002", "4401123400f22f212b89f15fb4b43013", 721122), + { + {"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563}, + {"packet.003", 0, "4401123400f22f212b89f15fb4b43013", 721122}, + {NULL, 0, NULL, 0} + }, Common::FR_FRA, Common::kPlatformPC, Common::ADGF_NO_FLAGS }, - 0, - 0, - 0, - 0, + GF_PACKED, }, { @@ -149,9 +130,6 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::ADGF_NO_FLAGS }, 0, - 0, - 0, - 0, }, { @@ -165,9 +143,6 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::ADGF_NO_FLAGS }, 0, - 0, - 0, - 0, }, { @@ -181,9 +156,6 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::ADGF_NO_FLAGS }, 0, - 0, - 0, - 0, }, { @@ -197,31 +169,9 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::ADGF_NO_FLAGS }, 0, - 0, - 0, - 0, }, - { AD_TABLE_END_MARKER, 0, 0, 0, 0 } -}; - -/** - * The fallback game descriptor used by the Drascula engine's fallbackDetector. - * Contents of this struct are to be overwritten by the fallbackDetector. - */ -static DrasculaGameDescription g_fallbackDesc = { - { - "", - "", - AD_ENTRY1(0, 0), // This should always be AD_ENTRY1(0, 0) in the fallback descriptor - Common::UNK_LANG, - Common::kPlatformPC, - Common::ADGF_NO_FLAGS - }, - 0, - 0, - 0, - 0, + { AD_TABLE_END_MARKER, 0, } }; } // End of namespace Drascula @@ -258,9 +208,6 @@ public: } virtual bool createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const; - - const Common::ADGameDescription *fallbackDetect(const FSList *fslist) const; - }; bool DrasculaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common::ADGameDescription *desc) const { @@ -271,21 +218,6 @@ bool DrasculaMetaEngine::createInstance(OSystem *syst, Engine **engine, const Co return gd != 0; } -const Common::ADGameDescription *DrasculaMetaEngine::fallbackDetect(const FSList *fslist) const { - // Set the default values for the fallback descriptor's ADGameDescription part. - Drascula::g_fallbackDesc.desc.language = Common::UNK_LANG; - Drascula::g_fallbackDesc.desc.platform = Common::kPlatformPC; - Drascula::g_fallbackDesc.desc.flags = Common::ADGF_NO_FLAGS; - - // Set default values for the fallback descriptor's DrasculaGameDescription part. - Drascula::g_fallbackDesc.gameID = 0; - Drascula::g_fallbackDesc.features = 0; - Drascula::g_fallbackDesc.version = 0; - - //return (const Common::ADGameDescription *)&Drascula::g_fallbackDesc; - return NULL; -} - #if PLUGIN_ENABLED_DYNAMIC(DRASCULA) REGISTER_PLUGIN_DYNAMIC(DRASCULA, PLUGIN_TYPE_ENGINE, DrasculaMetaEngine); #else diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index b9e3354dec..513581eb13 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -60,11 +60,6 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam const GameSettings *g; - const char *gameid = ConfMan.get("gameid").c_str(); - for (g = drasculaSettings; g->gameid; ++g) - if (!scumm_stricmp(g->gameid, gameid)) - _gameId = g->id; - _rnd = new Common::RandomSource(); syst->getEventManager()->registerRandomSource(*_rnd, "drascula"); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index cca8f50be0..4f9a487a6b 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -47,6 +47,7 @@ namespace Drascula { enum DrasculaGameFeatures { + GF_PACKED = (1 << 0) }; enum Languages { @@ -144,7 +145,6 @@ static const int interf_x[] ={ 1, 65, 129, 193, 1, 65, 129 }; static const int interf_y[] ={ 51, 51, 51, 51, 83, 83, 83 }; class DrasculaEngine : public ::Engine { - int _gameId; Common::KeyState _keyPressed; protected: @@ -155,16 +155,10 @@ protected: public: DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gameDesc); virtual ~DrasculaEngine(); - int getGameId() { - return _gameId; - } Common::RandomSource *_rnd; const DrasculaGameDescription *_gameDescription; - uint32 getGameID() const; uint32 getFeatures() const; - uint16 getVersion() const; - Common::Platform getPlatform() const; Common::Language getLanguage() const; void updateEvents(); -- cgit v1.2.3 From cd6d528c422de5906aac1882cc1924dda903f759 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Jun 2008 06:51:59 +0000 Subject: Better implementation of packet games loading svn-id: r32490 --- engines/drascula/detection.cpp | 11 +++++++++++ engines/drascula/drascula.cpp | 10 +--------- engines/drascula/drascula.h | 2 ++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index 358a2bc1c3..a79a1f5674 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -47,6 +47,17 @@ Common::Language DrasculaEngine::getLanguage() const { return _gameDescription->desc.language; } +void DrasculaEngine::loadArchives() { + const Common::ADGameFileDescription *ag; + + if (getFeatures() & GF_PACKED) { + for (ag = _gameDescription->desc.filesDescriptions; ag->fileName; ag++) + _arj.registerArchive(ag->fileName); + } + + _arj.enableFallback(true); +} + } static const PlainGameDescriptor drasculaGames[] = { diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 513581eb13..29bc4aad8b 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -58,8 +58,6 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, ConfMan.getInt("sfx_volume")); _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, ConfMan.getInt("music_volume")); - const GameSettings *g; - _rnd = new Common::RandomSource(); syst->getEventManager()->registerRandomSource(*_rnd, "drascula"); @@ -102,13 +100,7 @@ int DrasculaEngine::init() { _lang = 0; } - _arj.registerArchive("packet.001"); - // Use override files for non-English versions - if (_lang == 3) // French - _arj.registerArchive("packet.002"); - else if (_lang == 2) // German - _arj.registerArchive("packet.003"); - _arj.enableFallback(true); + loadArchives(); return 0; } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 4f9a487a6b..e98cad2a6c 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -162,6 +162,8 @@ public: Common::Language getLanguage() const; void updateEvents(); + void loadArchives(); + Audio::SoundHandle _soundHandle; void allocMemory(); -- cgit v1.2.3 From 841dde61d07a23fdb8a827b36cc2ca15e113b37c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jun 2008 08:01:26 +0000 Subject: Updated the MSVC project files (added unarj.cpp/.h) svn-id: r32491 --- dists/msvc7/scummvm.vcproj | 10 ++++++++++ dists/msvc71/scummvm.vcproj | 10 ++++++++++ dists/msvc8/scummvm.vcproj | 14 ++++++++++++++ dists/msvc9/scummvm.vcproj | 14 ++++++++++++++ 4 files changed, 48 insertions(+) diff --git a/dists/msvc7/scummvm.vcproj b/dists/msvc7/scummvm.vcproj index aedfbe80f4..89cb1ff697 100644 --- a/dists/msvc7/scummvm.vcproj +++ b/dists/msvc7/scummvm.vcproj @@ -49,6 +49,8 @@ TargetMachine="1"/> + + + + + + diff --git a/dists/msvc71/scummvm.vcproj b/dists/msvc71/scummvm.vcproj index 7b7b5b72c8..08102bd9b2 100644 --- a/dists/msvc71/scummvm.vcproj +++ b/dists/msvc71/scummvm.vcproj @@ -49,6 +49,8 @@ TargetMachine="1"/> + + + + + + diff --git a/dists/msvc8/scummvm.vcproj b/dists/msvc8/scummvm.vcproj index a5cd6a9169..3dcaf09f83 100644 --- a/dists/msvc8/scummvm.vcproj +++ b/dists/msvc8/scummvm.vcproj @@ -96,6 +96,9 @@ + @@ -185,6 +188,9 @@ + @@ -424,6 +430,14 @@ RelativePath="..\..\common\timer.h" > + + + + diff --git a/dists/msvc9/scummvm.vcproj b/dists/msvc9/scummvm.vcproj index d5904961a7..daf6ae6c99 100644 --- a/dists/msvc9/scummvm.vcproj +++ b/dists/msvc9/scummvm.vcproj @@ -99,6 +99,9 @@ + @@ -190,6 +193,9 @@ + @@ -429,6 +435,14 @@ RelativePath="..\..\common\timer.h" > + + + + -- cgit v1.2.3 From 0fc34681c827f870b985b158fa7517d4ad19151f Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 2 Jun 2008 08:39:19 +0000 Subject: Add Macintosh version of Blue's 123 Time Activities. svn-id: r32492 --- engines/scumm/detection_tables.h | 1 + engines/scumm/scumm-md5.h | 4 ++-- tools/scumm-md5.txt | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/engines/scumm/detection_tables.h b/engines/scumm/detection_tables.h index 8c193974e5..324cc91e78 100644 --- a/engines/scumm/detection_tables.h +++ b/engines/scumm/detection_tables.h @@ -513,6 +513,7 @@ static const GameFilenamePattern gameFilenamesTable[] = { { "basketball", "Basketball", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "blues123time", "Blues123time", kGenHEPC, UNK_LANG, UNK, 0 }, + { "blues123time", "Blue's 123 Time", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 }, { "bluesabctime", "bluesabctime", kGenHEPC, UNK_LANG, UNK, 0 }, { "bluesabctime", "BluesABCTimeDemo", kGenHEPC, UNK_LANG, UNK, 0 }, diff --git a/engines/scumm/scumm-md5.h b/engines/scumm/scumm-md5.h index bf7ce93eb9..62d777aa33 100644 --- a/engines/scumm/scumm-md5.h +++ b/engines/scumm/scumm-md5.h @@ -1,5 +1,5 @@ /* - This file was generated by the md5table tool on Sun Jun 01 10:15:58 2008 + This file was generated by the md5table tool on Mon Jun 02 08:37:50 2008 DO NOT EDIT MANUALLY! */ @@ -287,7 +287,7 @@ static const MD5Table md5table[] = { { "7020931d5a2be0a49d68e7a1882363e4", "zak", "V1", "V1", 1896, Common::EN_ANY, Common::kPlatformPC }, { "70b0719ac3a5b47ae233c561823d5b96", "puttzoo", "", "", -1, Common::NL_NLD, Common::kPlatformMacintosh }, { "71523b539491527d9860f4407faf0411", "monkey", "Demo", "EGA Demo", 7607, Common::EN_ANY, Common::kPlatformPC }, - { "71d384e7676c53d513ddd333eae1d82c", "Blues123time", "", "", -1, Common::EN_ANY, Common::kPlatformWindows }, + { "71d384e7676c53d513ddd333eae1d82c", "Blues123time", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown }, { "71fe97c3108678cf604f14abe342341b", "spyfox2", "", "", -1, Common::NL_NLD, Common::kPlatformWindows }, { "7222f260253f325c21fcfa68b5bfab67", "spyfox2", "", "Demo", -1, Common::EN_USA, Common::kPlatformUnknown }, { "72ac6bc980d5101c2142189d746bd62f", "spyfox", "HE 99", "", -1, Common::RU_RUS, Common::kPlatformWindows }, diff --git a/tools/scumm-md5.txt b/tools/scumm-md5.txt index 366be16fe8..721c43b568 100644 --- a/tools/scumm-md5.txt +++ b/tools/scumm-md5.txt @@ -411,7 +411,7 @@ thinkerk Big Thinkers Kindergarten 695fe0b3963333b7e15b37514db3c745 29789 us All - Demo - khalek, sev Blues123time Blue's 123 Time Activities - 71d384e7676c53d513ddd333eae1d82c -1 en Windows - - - Vasyl Tsvirkunov + 71d384e7676c53d513ddd333eae1d82c -1 en All - - - Vasyl Tsvirkunov BluesABCTime Blue's ABC Time Activities 95b3806e043be08668c54c3ffe98650f -1 en All - - - sev -- cgit v1.2.3 From e6d2ed3ca8f06a9d6b5b37d3015eb53d5bbf772c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jun 2008 10:58:45 +0000 Subject: Further cleanup of the talk code svn-id: r32494 --- engines/drascula/animation.cpp | 62 ++++---- engines/drascula/drascula.h | 21 +-- engines/drascula/rooms.cpp | 8 +- engines/drascula/talk.cpp | 330 ++++++++++++++--------------------------- 4 files changed, 146 insertions(+), 275 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index b19aec0fae..37c1f20e2a 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -176,7 +176,7 @@ void DrasculaEngine::animation_1_1() { break; copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); - talk_dr_grande(_textd[_lang][1], "D1.als"); + talk_dr_grande(1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -196,7 +196,7 @@ void DrasculaEngine::animation_1_1() { placeIgor(); placeDrascula(); updateScreen(); - talk_igor_dch(8); + talk_igor(8, 0); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -257,13 +257,13 @@ void DrasculaEngine::animation_1_1() { stopMusic(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(9); + talk_igor(9, 0); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_drascula(9); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(10); + talk_igor(10, 0); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; playMusic(11); @@ -289,7 +289,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 1; - talk_igor_dch(1); + talk_igor(1, 0); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_drascula(11, 1); @@ -320,7 +320,7 @@ void DrasculaEngine::animation_1_1() { placeIgor(); placeDrascula(); updateScreen(); - talk_igor_dch(2); + talk_igor(2, 0); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(13); @@ -341,19 +341,19 @@ void DrasculaEngine::animation_1_1() { talk_drascula(14); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(3); + talk_igor(3, 0); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_drascula(15); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(4); + talk_igor(4, 0); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_drascula(16); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_dch(5); + talk_igor(5, 0); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_igor = 3; @@ -363,7 +363,7 @@ void DrasculaEngine::animation_1_1() { pause(18); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor_front(6); + talk_igor(6, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; fadeToBlack(0); @@ -651,13 +651,13 @@ void DrasculaEngine::animation_4_1() { stopMusic(); flags[11] = 1; - talk_pianist(_textp[_lang][1], "p1.als"); + talk_pianist(1); talk(206); - talk_pianist(_textp[_lang][2], "p2.als"); + talk_pianist(2); talk(207); - talk_pianist(_textp[_lang][3], "p3.als"); + talk_pianist(3); talk(208); - talk_pianist(_textp[_lang][4], "p4.als"); + talk_pianist(4); talk(209); if (_lang == kSpanish) @@ -1449,26 +1449,26 @@ void DrasculaEngine::animation_rayo() { } void DrasculaEngine::animation_2_4() { - talk_igor_seated(16); + talk_igor(16, 3); talk(278); - talk_igor_seated(17); + talk_igor(17, 3); talk(279); - talk_igor_seated(18); + talk_igor(18, 3); } void DrasculaEngine::animation_3_4() { - talk_igor_seated(19); - talk_igor_seated(20); + talk_igor(19, 3); + talk_igor(20, 3); talk(281); } void DrasculaEngine::animation_4_4() { talk(287); - talk_igor_seated(21); + talk_igor(21, 3); talk(284); - talk_igor_seated(22); + talk_igor(22, 3); talk(285); - talk_igor_seated(23); + talk_igor(23, 3); } void DrasculaEngine::animation_7_4() { @@ -1928,10 +1928,10 @@ void DrasculaEngine::animation_1_6() { talk_drascula(31, 1); animation_5_6(); talk_drascula(32, 1); - talk_igor_dch(11); + talk_igor(11, 0); sentido_igor = 3; talk_drascula(33, 1); - talk_igor_front(12); + talk_igor(12, 1); talk_drascula(34, 1); sentido_dr = 0; talk_drascula(35); @@ -2630,9 +2630,9 @@ void DrasculaEngine::animation_1_4() { flags[18] = 1; flags[20] = 1; - talk_igor_seated(13); - talk_igor_seated(14); - talk_igor_seated(15); + talk_igor(13, 3); + talk_igor(14, 3); + talk_igor(15, 3); flags[21] = 1; } else { talk(356); @@ -2655,7 +2655,7 @@ void DrasculaEngine::animation_1_4() { talk(276); pause(14); - talk_igor_seated(6); + talk_igor(6, 3); } converse("op_6.cal"); @@ -2682,8 +2682,8 @@ void DrasculaEngine::animation_5_4(){ loadPic("auxigor.alg", frontSurface, 1); igorX = 100; igorY = 65; - talk_igor_front(29); - talk_igor_front(30); + talk_igor(29, 1); + talk_igor(30, 1); loadPic("96.alg", frontSurface, 1); loadPic("99.alg", backSurface, 1); hare_se_ve = 1; @@ -2706,7 +2706,7 @@ void DrasculaEngine::animation_6_4() { placeIgor(); updateScreen(); pause(40); - talk_igor_front(26); + talk_igor(26, 1); roomNumber = prevRoom; clearRoom(); loadPic("96.alg", frontSurface, 1); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index e98cad2a6c..366ef620a3 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -420,40 +420,25 @@ public: void talkInit(const char *filename); bool isTalkFinished(int* length); - void talk_igor_dch(int); + void talk_igor(int, int); void talk_drascula(int index, int talkerType = 0); void talk_solo(const char *, const char *); - void talk_igor_front(int); void talk_bartender(int, int talkerType = 0); - void talk_igor_door(int); - void talk_igor_door(const char *said, const char *filename); - void talk_igor_wig(int); - void talk_igor_wig(const char *said, const char *filename); void talk_pen(const char *, const char *, int); void talk_bj_bed(int); - void talk_bj_bed(const char *said, const char * filename); void talk_htel(int); - void talk_htel(const char *said, const char *filename); void talk_bj(int); - void talk_baul(const char *said, const char *filename); + void talk_baul(int); void talk(int); void talk(const char *, const char *); void talk_sinc(const char *, const char *, const char *); void talk_drunk(int); - void talk_drunk(const char *said, const char *filename); void talk_pianist(int); - void talk_pianist(const char *said, const char *filename); - void talk_igor_seated(int); - void talk_igor_seated(const char *, const char *); void talk_wolf(int); - void talk_wolf(const char *said, const char *filename); void talk_mus(int); - void talk_mus(const char *said, const char *filename); - void talk_dr_grande(const char *said, const char *filename); + void talk_dr_grande(int); void talk_vb(int); - void talk_vb(const char *, const char *); void talk_vbpuerta(int); - void talk_vbpuerta(const char *said, const char *filename); void talk_blind(int); void talk_hacker(const char *, const char *); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 0a65ffb23d..055801a24d 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -373,7 +373,7 @@ void DrasculaEngine::room_16(int fl) { pause(10); talk_sinc(_text[_lang][50], "50.als", "11111111111144432554433"); pause(3); - talk_baul(_text[_lang][83], "d83.als"); + talk_baul(83); } else if (pickedObject == kVerbOpen && fl == 183) { openDoor(19, NO_DOOR); if (flags[20] == 0) { @@ -600,16 +600,16 @@ void DrasculaEngine::room_26(int fl) { flags[12] = 1; closeDoor(2, 0); sentido_hare = 2; - talk_igor_door(27); + talk_igor(27, 2); flags[30] = 1; - talk_igor_door(28); + talk_igor(28, 2); lleva_al_hare(153, 180); } else if (pickedObject == kVerbPick && fl == 143 && flags[18] == 0) { lleva_al_hare(260, 180); copyBackground(80, 78, 199, 94, 38, 27, drawSurface3, screenSurface); updateScreen(199, 94, 199, 94, 38, 27, screenSurface); pause(3); - talk_igor_wig(25); + talk_igor(25, 4); lleva_al_hare(153, 180); } else if (pickedObject == kVerbTalk && fl == 51) animation_1_4(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 821f7f9860..3fae1def14 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -50,11 +50,20 @@ bool DrasculaEngine::isTalkFinished(int* length) { return true; } -void DrasculaEngine::talk_igor_dch(int index) { +// talker types: +// 0: talk_igor_dch +// 1: talk_igor_front +// 2: talk_igor_door +// 3: talk_igor_seated +// 4: talk_igor_wig +void DrasculaEngine::talk_igor(int index, int talkerType) { char filename[20]; sprintf(filename, "I%i.als", index); const char *said = _texti[_lang][index]; - int x_talk[8] = { 56, 82, 108, 134, 160, 186, 212, 238 }; + int x_talk[8] = { 56, 82, 108, 134, 160, 186, 212, 238 }; + int x_talk2[8] = { 56, 86, 116, 146, 176, 206, 236, 266 }; + int x_talk3[4] = { 80, 102, 124, 146 }; + int x_talk4[4] = { 119, 158, 197, 236 }; int face; int length = strlen(said); @@ -63,35 +72,79 @@ void DrasculaEngine::talk_igor_dch(int index) { talkInit(filename); do { - face = _rnd->getRandomNumber(7); + if (talkerType == 0 || talkerType == 1) { + face = _rnd->getRandomNumber(7); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateRefresh_pre(); + } else if (talkerType == 3 || talkerType == 4) { + face = _rnd->getRandomNumber(3); + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateRefresh_pre(); + } + + if (talkerType == 0) { + placeIgor(); + placeDrascula(); + copyBackground(igorX + 17, igorY, igorX + 17, igorY, 37, 24, drawSurface1, screenSurface); + copyRect(x_talk[face], 148, igorX + 17, igorY, 25, 24, frontSurface, screenSurface); + updateRefresh(); + if (withVoices == 0) + centerText(said, igorX + 26, igorY); + updateScreen(); + pause(3); + } else if (talkerType == 1) { + if (currentChapter == 1 || currentChapter == 4) + placeIgor(); + if (currentChapter == 1) + placeDrascula(); + if (currentChapter == 1 || currentChapter == 6) + copyBackground(igorX, igorY, igorX, igorY, 29, 25, drawSurface1, screenSurface); + copyRect(x_talk2[face], 173, igorX, igorY, 29, 25, frontSurface, screenSurface); + updateRefresh(); + if (withVoices == 0) + centerText(said, igorX + 26, igorY); + updateScreen(); + pause(3); + } else if (talkerType == 2) { + updateRoom(); + if (withVoices == 0) + centerText(said, 87, 66); + updateScreen(); + } else if (talkerType == 3) { + copyBackground(x_talk2[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface); + pon_hare(); + updateRefresh(); + if (withVoices == 0) + centerText(said, 221, 102); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateScreen(); + pause(3); + } else if (talkerType == 4) { + copyBackground(x_talk3[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface); + pon_hare(); + updateRefresh(); + if (withVoices == 0) + centerText(said, 221, 102); - updateRefresh_pre(); + updateScreen(); + pause(3); + } + } while (!isTalkFinished(&length)); + if ((talkerType == 1 && currentChapter == 6) || + talkerType == 2 || talkerType == 3 || talkerType == 4) { + updateRoom(); + } + + if (talkerType == 0 || (talkerType == 1 && currentChapter == 1)) { + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); - copyBackground(igorX + 17, igorY, igorX + 17, igorY, 37, 24, drawSurface1, screenSurface); - - copyRect(x_talk[face], 148, igorX + 17, igorY, 25, 24, frontSurface, screenSurface); - - updateRefresh(); - - if (withVoices == 0) - centerText(said, igorX + 26, igorY); - - updateScreen(); - - pause(3); - - } while (!isTalkFinished(&length)); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - placeIgor(); - placeDrascula(); + } updateScreen(); } +// Talker type 0: talk_dr_izq, 1: talk_dr_dch void DrasculaEngine::talk_drascula(int index, int talkerType) { const char *said = _textd[_lang][index]; char filename[20]; @@ -181,55 +234,6 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { } } -void DrasculaEngine::talk_igor_front(int index) { - char filename[20]; - sprintf(filename, "I%i.als", index); - const char *said = _texti[_lang][index]; - int x_talk[8] = { 56, 86, 116, 146, 176, 206, 236, 266 }; - int face; - int length = strlen(said); - - color_abc(kColorWhite); - - talkInit(filename); - - do { - face = _rnd->getRandomNumber(7); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); - - if (currentChapter == 1 || currentChapter == 4) - placeIgor(); - if (currentChapter == 1) - placeDrascula(); - if (currentChapter == 1 || currentChapter == 6) - copyBackground(igorX, igorY, igorX, igorY, 29, 25, drawSurface1, screenSurface); - copyRect(x_talk[face], 173, igorX, igorY, 29, 25, frontSurface, screenSurface); - - updateRefresh(); - - if (withVoices == 0) - centerText(said, igorX + 26, igorY); - - updateScreen(); - - pause(3); - } while (!isTalkFinished(&length)); - - if (currentChapter == 6) { - updateRoom(); - } - - if (currentChapter == 1) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - placeIgor(); - placeDrascula(); - } - updateScreen(); -} - void DrasculaEngine::talk_bartender(int index, int talkerType) { char filename[20]; sprintf(filename, "t%i.als", index); @@ -462,12 +466,9 @@ void DrasculaEngine::talk(const char *said, const char *filename) { } void DrasculaEngine::talk_pianist(int index) { - char name[20]; - sprintf(name, "P%i.als", index); - talk(_textp[_lang][index], name); -} - -void DrasculaEngine::talk_pianist(const char *said, const char *filename) { + char filename[20]; + sprintf(filename, "P%i.als", index); + const char* said = _textp[_lang][index]; int x_talk[4] = { 97, 145, 193, 241 }; int face; int length = strlen(said); @@ -501,12 +502,9 @@ void DrasculaEngine::talk_pianist(const char *said, const char *filename) { } void DrasculaEngine::talk_drunk(int index) { - char name[20]; - sprintf(name, "B%i.als", index); - talk_drunk(_textb[_lang][index], name); -} - -void DrasculaEngine::talk_drunk(const char *said, const char *filename) { + char filename[20]; + sprintf(filename, "B%i.als", index); + const char *said = _textb[_lang][index]; int x_talk[8] = { 1, 21, 41, 61, 81, 101, 121, 141 }; int face; int length = strlen(said); @@ -563,12 +561,9 @@ void DrasculaEngine::talk_drunk(const char *said, const char *filename) { } void DrasculaEngine::talk_vb(int index) { - char name[20]; - sprintf(name, "VB%i.als", index); - talk_vb(_textvb[_lang][index], name); -} - -void DrasculaEngine::talk_vb(const char *said, const char *filename) { + char filename[20]; + sprintf(filename, "VB%i.als", index); + const char *said = _textvb[_lang][index]; int x_talk[6] = {1, 27, 53, 79, 105, 131}; int face; int length = strlen(said); @@ -607,12 +602,9 @@ void DrasculaEngine::talk_vb(const char *said, const char *filename) { } void DrasculaEngine::talk_vbpuerta(int index) { - char name[20]; - sprintf(name, "VB%i.als", index); - talk_vb(_textvb[_lang][index], name); -} - -void DrasculaEngine::talk_vbpuerta(const char *said, const char *filename) { + char filename[20]; + sprintf(filename, "VB%i.als", index); + const char *said = _textvb[_lang][index]; int length = strlen(said); color_abc(kColorBrown); @@ -711,12 +703,9 @@ void DrasculaEngine::talk_hacker(const char *said, const char *filename) { } void DrasculaEngine::talk_wolf(int index) { - char name[20]; - sprintf(name, "L%i.als", index); - talk_wolf(_textl[_lang][index], name); -} - -void DrasculaEngine::talk_wolf(const char *said, const char *filename) { + char filename[20]; + sprintf(filename, "L%i.als", index); + const char *said = _textl[_lang][index]; int x_talk[9] = {52, 79, 106, 133, 160, 187, 214, 241, 268}; int face; int length = strlen(said); @@ -749,12 +738,9 @@ void DrasculaEngine::talk_wolf(const char *said, const char *filename) { } void DrasculaEngine::talk_mus(int index) { - char name[20]; - sprintf(name, "E%i.als", index); - talk_mus(_texte[_lang][index], name); -} - -void DrasculaEngine::talk_mus(const char *said, const char *filename) { + char filename[20]; + sprintf(filename, "E%i.als", index); + const char *said = _texte[_lang][index]; int x_talk[8] = { 16, 35, 54, 73, 92, 111, 130, 149}; int face; int length = strlen(said); @@ -840,12 +826,9 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename, int talker } void DrasculaEngine::talk_bj_bed(int index) { - char name[20]; - sprintf(name, "BJ%i.als", index); - talk_bj_bed(_textbj[_lang][index], name); -} - -void DrasculaEngine::talk_bj_bed(const char *said, const char *filename) { + char filename[20]; + sprintf(filename, "BJ%i.als", index); + const char *said = _textbj[_lang][index]; int x_talk[5] = {51, 101, 151, 201, 251}; int face; int length = strlen(said); @@ -879,12 +862,9 @@ void DrasculaEngine::talk_bj_bed(const char *said, const char *filename) { } void DrasculaEngine::talk_htel(int index) { - char name[20]; - sprintf(name, "%i.als", index); - talk_htel(_text[_lang][index], name); -} - -void DrasculaEngine::talk_htel(const char *said, const char *filename) { + char filename[20]; + sprintf(filename, "%i.als", index); + const char *said = _text[_lang][index]; char *num_cara; int x_talk[3] = {1, 94, 187}; int face, pantalla; @@ -1005,7 +985,10 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha playMusic(roomMusic); } -void DrasculaEngine::talk_baul(const char *said, const char *filename) { +void DrasculaEngine::talk_baul(int index) { + char filename[20]; + sprintf(filename, "d%i.als", index); + const char *said = _text[_lang][index]; int face = 0, cara_antes; int length = strlen(said); @@ -1034,107 +1017,10 @@ void DrasculaEngine::talk_baul(const char *said, const char *filename) { updateScreen(); } -void DrasculaEngine::talk_igor_door(int index) { - char name[20]; - sprintf(name, "I%i.als", index); - talk_igor_door(_texti[_lang][index], name); -} - -void DrasculaEngine::talk_igor_door(const char *said, const char *filename) { - int length = strlen(said); - - color_abc(kColorWhite); - - talkInit(filename); - - do { - updateRoom(); - if (withVoices == 0) - centerText(said, 87, 66); - updateScreen(); - } while (!isTalkFinished(&length)); - - updateRoom(); - updateScreen(); -} - -void DrasculaEngine::talk_igor_seated(int index) { - char name[20]; - sprintf(name, "I%i.als", index); - talk_igor_seated(_texti[_lang][index], name); -} - -void DrasculaEngine::talk_igor_seated(const char *said, const char *filename) { - int x_talk[4] = { 80, 102, 124, 146 }; - int face; - int length = strlen(said); - - color_abc(kColorWhite); - - talkInit(filename); - - do { - face = _rnd->getRandomNumber(3); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); - - copyBackground(x_talk[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface); - pon_hare(); - updateRefresh(); - - if (withVoices == 0) - centerText(said, 221, 102); - - updateScreen(); - - pause(3); - } while (!isTalkFinished(&length)); - - updateRoom(); - updateScreen(); -} - -void DrasculaEngine::talk_igor_wig(int index) { - char name[20]; - sprintf(name, "I%i.als", index); - talk_igor_wig(_texti[_lang][index], name); -} - -void DrasculaEngine::talk_igor_wig(const char *said, const char *filename) { - int x_talk[4] = {119, 158, 197, 236}; - int face = 0; - int length = strlen(said); - - color_abc(kColorWhite); - - talkInit(filename); - - do { - face = _rnd->getRandomNumber(3); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); - - copyBackground(x_talk[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface); - pon_hare(); - updateRefresh(); - - if (withVoices == 0) - centerText(said, 221, 102); - - updateScreen(); - - pause(3); - } while (!isTalkFinished(&length)); - - updateRoom(); - updateScreen(); -} - -void DrasculaEngine::talk_dr_grande(const char *said, const char *filename) { +void DrasculaEngine::talk_dr_grande(int index) { + char filename[20]; + sprintf(filename, "D%i.als", index); + const char *said = _textd[_lang][index]; int x_talk[4] = {47, 93, 139, 185}; int face; int l = 0; -- cgit v1.2.3 From 9630298df6a39b02ea6b439379d28af7e10b469d Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Mon, 2 Jun 2008 13:12:07 +0000 Subject: Sorted static mouse arrow bitmap, so it doesn't have to be 'decoded' on the fly. This saves a headache on re-entry. svn-id: r32495 --- engines/parallaction/parallaction.h | 5 +++-- engines/parallaction/parallaction_ns.cpp | 12 +---------- engines/parallaction/staticres.cpp | 34 ++++++++++++++++---------------- 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index f639185580..3117424373 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -522,8 +522,9 @@ private: void initCursors(); void initParsers(); - static byte _mouseArrow[256]; - Frames *_mouseComposedArrow; + static byte _resMouseArrow[256]; + byte *_mouseArrow; + Frames *_mouseComposedArrow; static const Callable _dosCallables[25]; static const Callable _amigaCallables[25]; diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 8e0f83d46d..9c1b25d824 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -172,18 +172,8 @@ void Parallaction_ns::freeFonts() { } void Parallaction_ns::initCursors() { - _mouseComposedArrow = _disk->loadPointer("pointer"); - - byte temp[MOUSEARROW_WIDTH*MOUSEARROW_HEIGHT]; - memcpy(temp, _mouseArrow, MOUSEARROW_WIDTH*MOUSEARROW_HEIGHT); - - uint16 k = 0; - for (uint16 i = 0; i < 4; i++) { - for (uint16 j = 0; j < 64; j++) _mouseArrow[k++] = temp[i + j * 4]; - } - - return; + _mouseArrow = _resMouseArrow; } void Parallaction_ns::setArrowCursor() { diff --git a/engines/parallaction/staticres.cpp b/engines/parallaction/staticres.cpp index 18021db9a1..2c5cf281dd 100644 --- a/engines/parallaction/staticres.cpp +++ b/engines/parallaction/staticres.cpp @@ -29,23 +29,23 @@ namespace Parallaction { -byte Parallaction_ns::_mouseArrow[256] = { - 0x12, 0x11, 0x11, 0x11, 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x11, 0x13, 0x12, 0x12, 0x00, - 0x13, 0x12, 0x12, 0x11, 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, - 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x13, 0x13, 0x13, 0x12, 0x00, - 0x13, 0x00, 0x12, 0x00, 0x13, 0x00, 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x11, 0x11, 0x11, 0x11, 0x12, 0x12, 0x12, 0x11, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, - 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, - 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, - 0x13, 0x13, 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x11, 0x11, 0x11, 0x11, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, - 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x11, 0x12, 0x12, 0x12, 0x12, - 0x12, 0x12, 0x12, 0x13, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x13, 0x12, 0x12, 0x00, - 0x00, 0x12, 0x13, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x11, 0x11, 0x11, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x11, 0x00, - 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x11, - 0x12, 0x12, 0x12, 0x00, 0x12, 0x12, 0x12, 0x00, 0x13, 0x12, 0x12, 0x00, 0x00, 0x12, 0x13, 0x00, - 0x00, 0x12, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +byte Parallaction_ns::_resMouseArrow[256] = { + 0x12, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x00, 0x00, + 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x00, 0x00, 0x00, + 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x00, 0x00, 0x00, + 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x00, 0x00, + 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x00, + 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x00, + 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x00, 0x00, + 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x00, 0x00, 0x00, + 0x11, 0x12, 0x12, 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x12, 0x11, 0x00, 0x11, 0x12, 0x12, 0x12, 0x12, 0x12, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x11, 0x00, 0x00, 0x00, 0x11, 0x12, 0x12, 0x12, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x12, 0x13, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; -- cgit v1.2.3 From 12c3798ffb3184b57ef604225415dfac7511a4a2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Jun 2008 18:19:18 +0000 Subject: Plug memory leak svn-id: r32496 --- common/unarj.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/unarj.cpp b/common/unarj.cpp index eb55e116ad..942e659caa 100644 --- a/common/unarj.cpp +++ b/common/unarj.cpp @@ -88,6 +88,8 @@ ArjFile::~ArjFile() { delete _headers[i]; _headers.clear(); + _fileMap.clear(); + _archMap.clear(); } void ArjFile::registerArchive(const String &filename) { -- cgit v1.2.3 From 70dd879e2f2c48e59a199d0555c5e11608641f6c Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Jun 2008 18:19:58 +0000 Subject: Implement ADGF_KEEPMATCH svn-id: r32497 --- common/advancedDetector.cpp | 8 +++++++- common/advancedDetector.h | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/common/advancedDetector.cpp b/common/advancedDetector.cpp index 79289072df..8999a60942 100644 --- a/common/advancedDetector.cpp +++ b/common/advancedDetector.cpp @@ -428,7 +428,13 @@ static ADGameDescList detectGame(const FSList *fslist, const Common::ADParams &p if (curFilesMatched > maxFilesMatched) { debug(2, " ... new best match, removing all previous candidates"); maxFilesMatched = curFilesMatched; - matched.clear(); + + for (uint j = 0; j < matched.size();) { + if (matched[j]->flags & ADGF_KEEPMATCH) + ++j; + else + matched.remove_at(j); + } matched.push_back(g); } else if (curFilesMatched == maxFilesMatched) { matched.push_back(g); diff --git a/common/advancedDetector.h b/common/advancedDetector.h index bec03d5585..48b9e213d7 100644 --- a/common/advancedDetector.h +++ b/common/advancedDetector.h @@ -46,6 +46,8 @@ struct ADGameFileDescription { enum ADGameFlags { ADGF_NO_FLAGS = 0, + ADGF_KEEPMATCH = (1 << 27), // this entry is kept even when there are matched + // entries with more files ADGF_DROPLANGUAGE = (1 << 28), // don't add language to gameid ADGF_CD = (1 << 29), // add "-cd" to gameid ADGF_DEMO = (1 << 30) // add "-demo" to gameid -- cgit v1.2.3 From 251467a0130ff3e7bd0472b46459d788959e811b Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Jun 2008 18:21:03 +0000 Subject: - Now it is possible to choose English version from original CD. Thanks to ADGF_KEEPMATCH - Fix detection of French version svn-id: r32498 --- engines/drascula/detection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index a79a1f5674..06c3c88d49 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -91,7 +91,7 @@ static const DrasculaGameDescription gameDescriptions[] = { AD_ENTRY1s("packet.001", "c6a8697396e213a18472542d5f547cb4", 32847563), Common::EN_ANY, Common::kPlatformPC, - Common::ADGF_NO_FLAGS + Common::ADGF_KEEPMATCH }, GF_PACKED, }, @@ -120,7 +120,7 @@ static const DrasculaGameDescription gameDescriptions[] = { 0, { {"packet.001", 0, "c6a8697396e213a18472542d5f547cb4", 32847563}, - {"packet.003", 0, "4401123400f22f212b89f15fb4b43013", 721122}, + {"packet.002", 0, "4401123400f22f212b89f15fb4b43013", 721122}, {NULL, 0, NULL, 0} }, Common::FR_FRA, -- cgit v1.2.3 From 72e3cee9d41dcf70508b596700018d35f2f490a2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Jun 2008 18:28:55 +0000 Subject: Add detection for original unpacked Spanish and Italian versions. svn-id: r32499 --- engines/drascula/detection.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index 06c3c88d49..754c782bb1 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -130,6 +130,19 @@ static const DrasculaGameDescription gameDescriptions[] = { GF_PACKED, }, + { + // Drascula Spanish version (original packed version) + { + "drascula", + 0, + AD_ENTRY1s("packet.001", "3c971aba65a037d29d0b479cad6f5943", 31702652), + Common::ES_ESP, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + GF_PACKED, + }, + { // Drascula Spanish version { @@ -169,6 +182,18 @@ static const DrasculaGameDescription gameDescriptions[] = { 0, }, + { + // Drascula Italian version (original packed version) + { + "drascula", + 0, + AD_ENTRY1s("packet.001", "0253e924af223f5fe52537023385159b", 32564209), + Common::IT_ITA, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + GF_PACKED, + }, { // Drascula Italian version { -- cgit v1.2.3 From 945b92501a41b39d231bcec78df5aac5e41b1c33 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 2 Jun 2008 18:38:50 +0000 Subject: Simplified detection table svn-id: r32500 --- engines/drascula/detection.cpp | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp index 754c782bb1..a426857fbd 100644 --- a/engines/drascula/detection.cpp +++ b/engines/drascula/detection.cpp @@ -35,12 +35,10 @@ namespace Drascula { struct DrasculaGameDescription { Common::ADGameDescription desc; - - uint32 features; }; uint32 DrasculaEngine::getFeatures() const { - return _gameDescription->features; + return _gameDescription->desc.flags; } Common::Language DrasculaEngine::getLanguage() const { @@ -80,7 +78,6 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::kPlatformPC, Common::ADGF_NO_FLAGS }, - 0, }, { @@ -91,9 +88,8 @@ static const DrasculaGameDescription gameDescriptions[] = { AD_ENTRY1s("packet.001", "c6a8697396e213a18472542d5f547cb4", 32847563), Common::EN_ANY, Common::kPlatformPC, - Common::ADGF_KEEPMATCH + Common::ADGF_KEEPMATCH | GF_PACKED }, - GF_PACKED, }, { @@ -108,9 +104,8 @@ static const DrasculaGameDescription gameDescriptions[] = { }, Common::DE_DEU, Common::kPlatformPC, - Common::ADGF_NO_FLAGS + GF_PACKED }, - GF_PACKED, }, { @@ -125,9 +120,8 @@ static const DrasculaGameDescription gameDescriptions[] = { }, Common::FR_FRA, Common::kPlatformPC, - Common::ADGF_NO_FLAGS + GF_PACKED }, - GF_PACKED, }, { @@ -138,9 +132,8 @@ static const DrasculaGameDescription gameDescriptions[] = { AD_ENTRY1s("packet.001", "3c971aba65a037d29d0b479cad6f5943", 31702652), Common::ES_ESP, Common::kPlatformPC, - Common::ADGF_NO_FLAGS + GF_PACKED }, - GF_PACKED, }, { @@ -153,7 +146,6 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::kPlatformPC, Common::ADGF_NO_FLAGS }, - 0, }, { @@ -166,7 +158,6 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::kPlatformPC, Common::ADGF_NO_FLAGS }, - 0, }, { @@ -179,7 +170,6 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::kPlatformPC, Common::ADGF_NO_FLAGS }, - 0, }, { @@ -190,9 +180,8 @@ static const DrasculaGameDescription gameDescriptions[] = { AD_ENTRY1s("packet.001", "0253e924af223f5fe52537023385159b", 32564209), Common::IT_ITA, Common::kPlatformPC, - Common::ADGF_NO_FLAGS + GF_PACKED }, - GF_PACKED, }, { // Drascula Italian version @@ -204,10 +193,9 @@ static const DrasculaGameDescription gameDescriptions[] = { Common::kPlatformPC, Common::ADGF_NO_FLAGS }, - 0, }, - { AD_TABLE_END_MARKER, 0, } + { AD_TABLE_END_MARKER } }; } // End of namespace Drascula -- cgit v1.2.3 From 3f745d68139c6986d771ace0db7ba8d90d2cdcdc Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 2 Jun 2008 18:48:09 +0000 Subject: This should fix a regression in the recent talk_igor() cleanup. I don't actually have the game, though, so I can't actually verify that there is a regression, nor that this fixes it. svn-id: r32501 --- engines/drascula/talk.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 3fae1def14..23bfbb2b01 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -60,8 +60,8 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { char filename[20]; sprintf(filename, "I%i.als", index); const char *said = _texti[_lang][index]; - int x_talk[8] = { 56, 82, 108, 134, 160, 186, 212, 238 }; - int x_talk2[8] = { 56, 86, 116, 146, 176, 206, 236, 266 }; + int x_talk0[8] = { 56, 82, 108, 134, 160, 186, 212, 238 }; + int x_talk1[8] = { 56, 86, 116, 146, 176, 206, 236, 266 }; int x_talk3[4] = { 80, 102, 124, 146 }; int x_talk4[4] = { 119, 158, 197, 236 }; int face; @@ -86,7 +86,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { placeIgor(); placeDrascula(); copyBackground(igorX + 17, igorY, igorX + 17, igorY, 37, 24, drawSurface1, screenSurface); - copyRect(x_talk[face], 148, igorX + 17, igorY, 25, 24, frontSurface, screenSurface); + copyRect(x_talk0[face], 148, igorX + 17, igorY, 25, 24, frontSurface, screenSurface); updateRefresh(); if (withVoices == 0) centerText(said, igorX + 26, igorY); @@ -99,7 +99,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { placeDrascula(); if (currentChapter == 1 || currentChapter == 6) copyBackground(igorX, igorY, igorX, igorY, 29, 25, drawSurface1, screenSurface); - copyRect(x_talk2[face], 173, igorX, igorY, 29, 25, frontSurface, screenSurface); + copyRect(x_talk1[face], 173, igorX, igorY, 29, 25, frontSurface, screenSurface); updateRefresh(); if (withVoices == 0) centerText(said, igorX + 26, igorY); @@ -111,7 +111,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { centerText(said, 87, 66); updateScreen(); } else if (talkerType == 3) { - copyBackground(x_talk2[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface); + copyBackground(x_talk3[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface); pon_hare(); updateRefresh(); if (withVoices == 0) @@ -120,7 +120,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { updateScreen(); pause(3); } else if (talkerType == 4) { - copyBackground(x_talk3[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface); + copyBackground(x_talk4[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface); pon_hare(); updateRefresh(); if (withVoices == 0) -- cgit v1.2.3 From b0c7714cfa2a65dcb9c701aede5fa0e862adf392 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jun 2008 20:32:36 +0000 Subject: Added an enum for Igor's possible states svn-id: r32502 --- engines/drascula/animation.cpp | 52 +++++++++++++++++++++--------------------- engines/drascula/drascula.h | 8 +++++++ engines/drascula/rooms.cpp | 6 ++--- 3 files changed, 37 insertions(+), 29 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 37c1f20e2a..d389ddb6ee 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -196,7 +196,7 @@ void DrasculaEngine::animation_1_1() { placeIgor(); placeDrascula(); updateScreen(); - talk_igor(8, 0); + talk_igor(8, kIgorDch); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -257,13 +257,13 @@ void DrasculaEngine::animation_1_1() { stopMusic(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor(9, 0); + talk_igor(9, kIgorDch); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_drascula(9); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor(10, 0); + talk_igor(10, kIgorDch); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; playMusic(11); @@ -289,7 +289,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_dr = 1; - talk_igor(1, 0); + talk_igor(1, kIgorDch); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_drascula(11, 1); @@ -320,7 +320,7 @@ void DrasculaEngine::animation_1_1() { placeIgor(); placeDrascula(); updateScreen(); - talk_igor(2, 0); + talk_igor(2, kIgorDch); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; pause(13); @@ -341,19 +341,19 @@ void DrasculaEngine::animation_1_1() { talk_drascula(14); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor(3, 0); + talk_igor(3, kIgorDch); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_drascula(15); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor(4, 0); + talk_igor(4, kIgorDch); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_drascula(16); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor(5, 0); + talk_igor(5, kIgorDch); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_igor = 3; @@ -363,7 +363,7 @@ void DrasculaEngine::animation_1_1() { pause(18); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - talk_igor(6, 1); + talk_igor(6, kIgorFront); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; fadeToBlack(0); @@ -1449,26 +1449,26 @@ void DrasculaEngine::animation_rayo() { } void DrasculaEngine::animation_2_4() { - talk_igor(16, 3); + talk_igor(16, kIgorSeated); talk(278); - talk_igor(17, 3); + talk_igor(17, kIgorSeated); talk(279); - talk_igor(18, 3); + talk_igor(18, kIgorSeated); } void DrasculaEngine::animation_3_4() { - talk_igor(19, 3); - talk_igor(20, 3); + talk_igor(19, kIgorSeated); + talk_igor(20, kIgorSeated); talk(281); } void DrasculaEngine::animation_4_4() { talk(287); - talk_igor(21, 3); + talk_igor(21, kIgorSeated); talk(284); - talk_igor(22, 3); + talk_igor(22, kIgorSeated); talk(285); - talk_igor(23, 3); + talk_igor(23, kIgorSeated); } void DrasculaEngine::animation_7_4() { @@ -1928,10 +1928,10 @@ void DrasculaEngine::animation_1_6() { talk_drascula(31, 1); animation_5_6(); talk_drascula(32, 1); - talk_igor(11, 0); + talk_igor(11, kIgorDch); sentido_igor = 3; talk_drascula(33, 1); - talk_igor(12, 1); + talk_igor(12, kIgorFront); talk_drascula(34, 1); sentido_dr = 0; talk_drascula(35); @@ -2630,9 +2630,9 @@ void DrasculaEngine::animation_1_4() { flags[18] = 1; flags[20] = 1; - talk_igor(13, 3); - talk_igor(14, 3); - talk_igor(15, 3); + talk_igor(13, kIgorSeated); + talk_igor(14, kIgorSeated); + talk_igor(15, kIgorSeated); flags[21] = 1; } else { talk(356); @@ -2655,7 +2655,7 @@ void DrasculaEngine::animation_1_4() { talk(276); pause(14); - talk_igor(6, 3); + talk_igor(6, kIgorSeated); } converse("op_6.cal"); @@ -2682,8 +2682,8 @@ void DrasculaEngine::animation_5_4(){ loadPic("auxigor.alg", frontSurface, 1); igorX = 100; igorY = 65; - talk_igor(29, 1); - talk_igor(30, 1); + talk_igor(29, kIgorFront); + talk_igor(30, kIgorFront); loadPic("96.alg", frontSurface, 1); loadPic("99.alg", backSurface, 1); hare_se_ve = 1; @@ -2706,7 +2706,7 @@ void DrasculaEngine::animation_6_4() { placeIgor(); updateScreen(); pause(40); - talk_igor(26, 1); + talk_igor(26, kIgorFront); roomNumber = prevRoom; clearRoom(); loadPic("96.alg", frontSurface, 1); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 366ef620a3..180c70b5c8 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -92,6 +92,14 @@ enum SSNFrames { kFrameEmptyFrame = 6 }; +enum IgorTalkerTypes { + kIgorDch = 0, + kIgorFront = 1, + kIgorDoor = 2, + kIgorSeated = 3, + kIgorWig = 4 +}; + #define TEXTD_START 68 struct DrasculaGameDescription; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 055801a24d..d5b4c0b82e 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -600,16 +600,16 @@ void DrasculaEngine::room_26(int fl) { flags[12] = 1; closeDoor(2, 0); sentido_hare = 2; - talk_igor(27, 2); + talk_igor(27, kIgorDoor); flags[30] = 1; - talk_igor(28, 2); + talk_igor(28, kIgorDoor); lleva_al_hare(153, 180); } else if (pickedObject == kVerbPick && fl == 143 && flags[18] == 0) { lleva_al_hare(260, 180); copyBackground(80, 78, 199, 94, 38, 27, drawSurface3, screenSurface); updateScreen(199, 94, 199, 94, 38, 27, screenSurface); pause(3); - talk_igor(25, 4); + talk_igor(25, kIgorWig); lleva_al_hare(153, 180); } else if (pickedObject == kVerbTalk && fl == 51) animation_1_4(); -- cgit v1.2.3 From 6f09c5a9286f97a1fac6e85fa4092295bc779440 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jun 2008 20:46:00 +0000 Subject: rayo_x -> rayX PASO_HARE_X/PASO_HARE_Y -> STEP_X/STEP_Y PIES_HARE -> FEET_HEIGHT ALTO_TALK_HARE -> TALK_HEIGHT ANCHO_TALK_HARE -> TALK_WIDTH salgo -> roomExit num_cara -> faceBuffer pantalla -> curScreen svn-id: r32503 --- engines/drascula/animation.cpp | 4 +- engines/drascula/drascula.cpp | 102 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 12 ++--- engines/drascula/talk.cpp | 78 +++++++++++++++---------------- 4 files changed, 98 insertions(+), 98 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index d389ddb6ee..018b6e2a04 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -1681,7 +1681,7 @@ void DrasculaEngine::animation_12_5() { DacPalette256 bgPalette3; int frame; - const int rayo_x[] = {1, 46, 91, 136, 181, 226, 271, 181}; + const int rayX[] = {1, 46, 91, 136, 181, 226, 271, 181}; const int frusky_x[] = {100, 139, 178, 217, 100, 178, 217, 139, 100, 139}; const int elfrusky_x[] = {1, 68, 135, 1, 68, 135, 1, 68, 135, 68, 1, 135, 68, 135, 68}; //const int humo_x[] = {1, 29, 57, 85, 113, 141, 169, 197, 225}; @@ -1738,7 +1738,7 @@ void DrasculaEngine::animation_12_5() { pause(4); updateRoom(); - copyRect(rayo_x[frame], 1, 41, 0, 44, 44, backSurface, screenSurface); + copyRect(rayX[frame], 1, 41, 0, 44, 44, backSurface, screenSurface); copyRect(frusky_x[frame], 113, 205, 50, 38, 86, drawSurface3, screenSurface); updateScreen(); } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 29bc4aad8b..4c3580caf1 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -122,9 +122,9 @@ int DrasculaEngine::go() { checkFlags = 1; doBreak = 0; walkToObject = 0; - stepX = PASO_HARE_X; stepY = PASO_HARE_Y; - alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; feetHeight = PIES_HARE; - alto_talk = ALTO_TALK_HARE; ancho_talk = ANCHO_TALK_HARE; + stepX = STEP_X; stepY = STEP_Y; + alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; feetHeight = FEET_HEIGHT; + talkHeight = TALK_HEIGHT; talkWidth = TALK_WIDTH; hasAnswer = 0; conta_blind_vez = 0; changeColor = 0; @@ -563,8 +563,8 @@ bool DrasculaEngine::escoba() { while (1) { if (characterMoved == 0) { - stepX = PASO_HARE_X; - stepY = PASO_HARE_Y; + stepX = STEP_X; + stepY = STEP_Y; } if (characterMoved == 0 && walkToObject == 1) { sentido_hare = sentido_final; @@ -910,11 +910,11 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (currentChapter == 2) { if (martin == 0) { - stepX = PASO_HARE_X; - stepY = PASO_HARE_Y; + stepX = STEP_X; + stepY = STEP_Y; alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; - feetHeight = PIES_HARE; + feetHeight = FEET_HEIGHT; loadPic("97.alg", extraSurface, 1); loadPic("96.alg", frontSurface, 1); loadPic("99.alg", backSurface, 1); @@ -2195,8 +2195,8 @@ void DrasculaEngine::hare_claro() { void DrasculaEngine::startWalking() { characterMoved = 1; - stepX = PASO_HARE_X; - stepY = PASO_HARE_Y; + stepX = STEP_X; + stepY = STEP_Y; if (currentChapter == 2) { if ((sitio_x < hare_x) && (sitio_y <= (hare_y + alto_hare))) @@ -2230,48 +2230,48 @@ void DrasculaEngine::pon_hare() { int pos_hare[6]; int r; - if (characterMoved == 1 && stepX == PASO_HARE_X) { + if (characterMoved == 1 && stepX == STEP_X) { for (r = 0; r < stepX; r++) { if (currentChapter != 2) { if (sentido_hare == 0 && sitio_x - r == hare_x + ancho_hare / 2) { characterMoved = 0; - stepX = PASO_HARE_X; - stepY = PASO_HARE_Y; + stepX = STEP_X; + stepY = STEP_Y; } if (sentido_hare == 1 && sitio_x + r == hare_x + ancho_hare / 2) { characterMoved = 0; - stepX = PASO_HARE_X; - stepY = PASO_HARE_Y; + stepX = STEP_X; + stepY = STEP_Y; hare_x = sitio_x - ancho_hare / 2; hare_y = sitio_y - alto_hare; } } else if (currentChapter == 2) { if (sentido_hare == 0 && sitio_x - r == hare_x) { characterMoved = 0; - stepX = PASO_HARE_X; - stepY = PASO_HARE_Y; + stepX = STEP_X; + stepY = STEP_Y; } if (sentido_hare == 1 && sitio_x + r == hare_x + ancho_hare) { characterMoved = 0; - stepX = PASO_HARE_X; - stepY = PASO_HARE_Y; + stepX = STEP_X; + stepY = STEP_Y; hare_x = sitio_x - ancho_hare + 4; hare_y = sitio_y - alto_hare; } } } } - if (characterMoved == 1 && stepY == PASO_HARE_Y) { + if (characterMoved == 1 && stepY == STEP_Y) { for (r = 0; r < stepY; r++) { if (sentido_hare == 2 && sitio_y - r == hare_y + alto_hare) { characterMoved = 0; - stepX = PASO_HARE_X; - stepY = PASO_HARE_Y; + stepX = STEP_X; + stepY = STEP_Y; } if (sentido_hare == 3 && sitio_y + r == hare_y + alto_hare) { characterMoved = 0; - stepX = PASO_HARE_X; - stepY = PASO_HARE_Y; + stepX = STEP_X; + stepY = STEP_Y; } } } @@ -2423,7 +2423,7 @@ void DrasculaEngine::removeObject() { } bool DrasculaEngine::exitRoom(int l) { - char salgo[13]; + char roomExit[13]; if (currentChapter == 1) { if (objectNum[l] == 105 && flags[0] == 0) @@ -2446,10 +2446,10 @@ bool DrasculaEngine::exitRoom(int l) { return true; } clearRoom(); - strcpy(salgo, _targetSurface[l]); - strcat(salgo, ".ald"); + strcpy(roomExit, _targetSurface[l]); + strcat(roomExit, ".ald"); hare_x = -1; - carga_escoba(salgo); + carga_escoba(roomExit); } } } else if (currentChapter == 2) { @@ -2479,10 +2479,10 @@ bool DrasculaEngine::exitRoom(int l) { } clearRoom(); - strcpy(salgo, _targetSurface[l]); - strcat(salgo, ".ald"); + strcpy(roomExit, _targetSurface[l]); + strcat(roomExit, ".ald"); hare_x =- 1; - carga_escoba(salgo); + carga_escoba(roomExit); } } else if (currentChapter == 3) { updateDoor(l); @@ -2497,10 +2497,10 @@ bool DrasculaEngine::exitRoom(int l) { doBreak = 1; previousMusic = roomMusic; clearRoom(); - strcpy(salgo, _targetSurface[l]); - strcat(salgo, ".ald"); + strcpy(roomExit, _targetSurface[l]); + strcat(roomExit, ".ald"); hare_x =- 1; - carga_escoba(salgo); + carga_escoba(roomExit); } } else if (currentChapter == 4) { updateDoor(l); @@ -2518,10 +2518,10 @@ bool DrasculaEngine::exitRoom(int l) { if (objectNum[l] == 108) lleva_al_hare(171, 78); clearRoom(); - strcpy(salgo, _targetSurface[l]); - strcat(salgo, ".ald"); + strcpy(roomExit, _targetSurface[l]); + strcat(roomExit, ".ald"); hare_x = -1; - carga_escoba(salgo); + carga_escoba(roomExit); } } else if (currentChapter == 5) { updateDoor(l); @@ -2537,10 +2537,10 @@ bool DrasculaEngine::exitRoom(int l) { previousMusic = roomMusic; hare_se_ve = 1; clearRoom(); - strcpy(salgo, _targetSurface[l]); - strcat(salgo, ".ald"); + strcpy(roomExit, _targetSurface[l]); + strcat(roomExit, ".ald"); hare_x = -1; - carga_escoba(salgo); + carga_escoba(roomExit); } } else if (currentChapter == 6) { updateDoor(l); @@ -2555,10 +2555,10 @@ bool DrasculaEngine::exitRoom(int l) { doBreak = 1; previousMusic = roomMusic; clearRoom(); - strcpy(salgo, _targetSurface[l]); - strcat(salgo, ".ald"); + strcpy(roomExit, _targetSurface[l]); + strcat(roomExit, ".ald"); hare_x = -1; - carga_escoba(salgo); + carga_escoba(roomExit); if (objExit == 105) animation_19_6(); @@ -2933,11 +2933,11 @@ void DrasculaEngine::quadrant_1() { if (distance_x < distance_y) { direccion_hare = 0; sentido_hare = 2; - stepX = (int)(distance_x / (distance_y / PASO_HARE_Y)); + stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { direccion_hare = 7; sentido_hare = 0; - stepY = (int)(distance_y / (distance_x / PASO_HARE_X)); + stepY = (int)(distance_y / (distance_x / STEP_X)); } } @@ -2954,11 +2954,11 @@ void DrasculaEngine::quadrant_2() { if (distance_x < distance_y) { direccion_hare = 1; sentido_hare = 2; - stepX = (int)(distance_x / (distance_y / PASO_HARE_Y)); + stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { direccion_hare = 2; sentido_hare = 1; - stepY = (int)(distance_y / (distance_x / PASO_HARE_X)); + stepY = (int)(distance_y / (distance_x / STEP_X)); } } @@ -2975,11 +2975,11 @@ void DrasculaEngine::quadrant_3() { if (distance_x < distance_y) { direccion_hare = 5; sentido_hare = 3; - stepX = (int)(distance_x / (distance_y / PASO_HARE_Y)); + stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { direccion_hare = 6; sentido_hare = 0; - stepY = (int)(distance_y / (distance_x / PASO_HARE_X)); + stepY = (int)(distance_y / (distance_x / STEP_X)); } } @@ -2996,11 +2996,11 @@ void DrasculaEngine::quadrant_4() { if (distance_x < distance_y) { direccion_hare = 4; sentido_hare = 3; - stepX = (int)(distance_x / (distance_y / PASO_HARE_Y)); + stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { direccion_hare = 3; sentido_hare = 1; - stepY = (int)(distance_y / (distance_x / PASO_HARE_X)); + stepY = (int)(distance_y / (distance_x / STEP_X)); } } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 180c70b5c8..3552bb1c0f 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -134,13 +134,13 @@ struct CharInfo { #define CHAR_WIDTH 8 #define CHAR_HEIGHT 6 -#define ALTO_TALK_HARE 25 -#define ANCHO_TALK_HARE 23 -#define PASO_HARE_X 8 -#define PASO_HARE_Y 3 +#define TALK_HEIGHT 25 +#define TALK_WIDTH 23 +#define STEP_X 8 +#define STEP_Y 3 #define CHARACTER_HEIGHT 70 #define CHARACTER_WIDTH 43 -#define PIES_HARE 12 +#define FEET_HEIGHT 12 #define CHAR_WIDTH_OPC 6 #define CHAR_HEIGHT_OPC 5 @@ -265,7 +265,7 @@ public: int doBreak; int stepX, stepY; int alto_hare, ancho_hare, feetHeight; - int alto_talk, ancho_talk; + int talkHeight, talkWidth; int suelo_x1, suelo_y1, suelo_x2, suelo_y2; int near, far; int sentido_final, walkToObject; diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 23bfbb2b01..40c5d4a1ab 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -391,59 +391,59 @@ void DrasculaEngine::talk(const char *said, const char *filename) { updateRefresh_pre(); if (currentChapter == 2) - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, screenSurface, drawSurface3); + copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, talkHeight - 1, screenSurface, drawSurface3); else copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), + (int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), screenSurface, drawSurface3); pon_hare(); if (currentChapter == 2) { if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg")) - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, drawSurface3, screenSurface); + copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, talkHeight - 1, drawSurface3, screenSurface); } else { copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), + (int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), drawSurface3, screenSurface); } if (sentido_hare == 0) { if (currentChapter == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, + copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, talkWidth, talkHeight, extraSurface, screenSurface); else reduce_hare_chico(x_talk_izq[face], y_mask_talk, hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], + hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 1) { if (currentChapter == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, + copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, extraSurface, screenSurface); else reduce_hare_chico(x_talk_dch[face], y_mask_talk, hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); + hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 2) { if (currentChapter == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, + copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, frontSurface, screenSurface); else reduce_hare_chico(x_talk_izq[face], y_mask_talk, suma_1_pixel + hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], + hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], frontSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 3) { if (currentChapter == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, + copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, talkWidth, talkHeight, frontSurface, screenSurface); else reduce_hare_chico(x_talk_dch[face], y_mask_talk, suma_1_pixel + hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, ancho_talk,alto_talk, factor_red[hare_y + alto_hare], + hare_y, talkWidth,talkHeight, factor_red[hare_y + alto_hare], frontSurface, screenSurface); updateRefresh(); } @@ -635,7 +635,7 @@ void DrasculaEngine::talk_blind(int index) { const char *said = _textd[_lang][index + TEXTD_START - 1]; const char *sincronia = _textd1[_lang][index - 1]; - byte *num_cara; + byte *faceBuffer; int p = 0; int pos_blind[6]; int length = strlen(said); @@ -664,17 +664,17 @@ void DrasculaEngine::talk_blind(int index) { pos_blind[0] = 132; if (c == '0' || c == '1') - num_cara = drawSurface3; + faceBuffer = drawSurface3; else if (c == '2' || c == '3') - num_cara = extraSurface; + faceBuffer = extraSurface; else if (c == '4' || c == '5') - num_cara = backSurface; + faceBuffer = backSurface; else { - num_cara = frontSurface; + faceBuffer = frontSurface; pos_blind[5] = 146; } - copyRectClip( pos_blind, num_cara, screenSurface); + copyRectClip( pos_blind, faceBuffer, screenSurface); if (withVoices == 0) centerText(said, 310, 71); @@ -865,9 +865,9 @@ void DrasculaEngine::talk_htel(int index) { char filename[20]; sprintf(filename, "%i.als", index); const char *said = _text[_lang][index]; - char *num_cara; + char *faceBuffer; int x_talk[3] = {1, 94, 187}; - int face, pantalla; + int face, curScreen; int length = strlen(said); color_abc(kColorYellow); @@ -876,18 +876,18 @@ void DrasculaEngine::talk_htel(int index) { do { face = _rnd->getRandomNumber(2); - pantalla = _rnd->getRandomNumber(2); + curScreen = _rnd->getRandomNumber(2); - if (face == 0 && pantalla == 0) - num_cara = (char *)drawSurface3; - else if (pantalla == 1) - num_cara = (char *)frontSurface; + if (face == 0 && curScreen == 0) + faceBuffer = (char *)drawSurface3; + else if (curScreen == 1) + faceBuffer = (char *)frontSurface; else - num_cara = (char *)backSurface; + faceBuffer = (char *)backSurface; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyBackground(x_talk[face], 1, 45, 24, 92, 108, (byte *)num_cara, screenSurface); + copyBackground(x_talk[face], 1, 45, 24, 92, 108, (byte *)faceBuffer, screenSurface); if (withVoices == 0) centerText(said, 90, 50); @@ -926,47 +926,47 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha updateRefresh_pre(); if (currentChapter == 2) - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, alto_talk - 1, screenSurface, drawSurface3); + copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, talkHeight - 1, screenSurface, drawSurface3); else copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), screenSurface, drawSurface3); + (int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), screenSurface, drawSurface3); pon_hare(); if (currentChapter == 2) { if (alto_hare != 56) - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, alto_talk - 1, drawSurface3, screenSurface); + copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, talkHeight - 1, drawSurface3, screenSurface); } else copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(alto_talk - 1) / 100) * factor_red[hare_y + alto_hare]), drawSurface3, screenSurface); + (int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), drawSurface3, screenSurface); if (sentido_hare == 0) { if (currentChapter == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, ancho_talk, alto_talk, extraSurface, screenSurface); + copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, talkWidth, talkHeight, extraSurface, screenSurface); else reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); + hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 1) { if (currentChapter == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, extraSurface, screenSurface); + copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, extraSurface, screenSurface); else reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, ancho_talk, alto_talk, factor_red[hare_y + alto_hare], extraSurface, screenSurface); + hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 2) { if (currentChapter == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); + copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, frontSurface, screenSurface); else reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(suma_1_pixel + hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, - ancho_talk, alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); + talkWidth, talkHeight, factor_red[hare_y + alto_hare], frontSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 3) { if (currentChapter == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, ancho_talk, alto_talk, frontSurface, screenSurface); + copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, talkWidth, talkHeight, frontSurface, screenSurface); else reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(suma_1_pixel + hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, - ancho_talk, alto_talk, factor_red[hare_y + alto_hare], frontSurface, screenSurface); + talkWidth, talkHeight, factor_red[hare_y + alto_hare], frontSurface, screenSurface); updateRefresh(); } -- cgit v1.2.3 From 5789bbc836d7b26d8d1bd52fbf2a26730ed66013 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jun 2008 22:41:58 +0000 Subject: elige_en_barra -> selectVerbFromBar comprueba -> verify1 x_barra -> verbBarX conta_vez -> startTime diff_vez -> timeDiff Some cleanup svn-id: r32507 --- engines/drascula/drascula.cpp | 41 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 10 +++++----- engines/drascula/staticdata.h | 2 +- 3 files changed, 26 insertions(+), 27 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 4c3580caf1..c21ceebdb0 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -630,17 +630,17 @@ bool DrasculaEngine::escoba() { if (button_izq == 1 && menuBar == 1) { delay(100); - elige_en_barra(); + selectVerbFromBar(); if (currentChapter != 3) cont_sv = 0; } else if (button_izq == 1 && takeObject == 0) { delay(100); - if (comprueba1()) + if (verify1()) return true; if (currentChapter != 3) cont_sv = 0; } else if (button_izq == 1 && takeObject == 1) { - if (comprueba2()) + if (verify2()) return true; if (currentChapter != 3) cont_sv = 0; @@ -1153,20 +1153,19 @@ void DrasculaEngine::checkObjects() { hasName = 0; } -void DrasculaEngine::elige_en_barra() { - int n, num_verbo = -1; - - for (n = 0; n < 7; n++) - if (mouseX > x_barra[n] && mouseX < x_barra[n + 1]) - num_verbo = n; +void DrasculaEngine::selectVerbFromBar() { + for (int n = 0; n < 7; n++) { + if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1]) { + selectVerb(n); + return; + } + } - if (num_verbo < 1) - withoutVerb(); - else - selectVerb(num_verbo); + // no verb selected + withoutVerb(); } -bool DrasculaEngine::comprueba1() { +bool DrasculaEngine::verify1() { int l; if (menuScreen == 1) @@ -1209,7 +1208,7 @@ bool DrasculaEngine::comprueba1() { return false; } -bool DrasculaEngine::comprueba2() { +bool DrasculaEngine::verify2() { int l; if (menuScreen == 1) { @@ -2223,7 +2222,7 @@ void DrasculaEngine::startWalking() { else characterMoved = 0; } - conta_vez = getTime(); + startTime = getTime(); } void DrasculaEngine::pon_hare() { @@ -2394,9 +2393,9 @@ void DrasculaEngine::clearMenu() { int n, sobre_verbo = 1; for (n = 0; n < 7; n++) { - if (mouseX > x_barra[n] && mouseX < x_barra[n + 1]) + if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1]) sobre_verbo = 0; - copyRect(OBJWIDTH * n, OBJHEIGHT * sobre_verbo, x_barra[n], 2, + copyRect(OBJWIDTH * n, OBJHEIGHT * sobre_verbo, verbBarX[n], 2, OBJWIDTH, OBJHEIGHT, backSurface, screenSurface); sobre_verbo = 1; } @@ -3036,10 +3035,10 @@ void DrasculaEngine::saveGame(char gameName[]) { } void DrasculaEngine::increaseFrameNum() { - diff_vez = getTime() - conta_vez; + timeDiff = getTime() - startTime; - if (diff_vez >= 6) { - conta_vez = getTime(); + if (timeDiff >= 6) { + startTime = getTime(); num_frame++; if (num_frame == 6) num_frame = 0; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 3552bb1c0f..3d2306bbdb 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -270,7 +270,7 @@ public: int near, far; int sentido_final, walkToObject; int objExit; - int diff_vez, conta_vez; + int timeDiff, startTime; int hasAnswer; int conta_blind_vez; int changeColor; @@ -399,9 +399,9 @@ public: void lleva_al_hare(int, int); void moveCursor(); void checkObjects(); - void elige_en_barra(); - bool comprueba1(); - bool comprueba2(); + void selectVerbFromBar(); + bool verify1(); + bool verify2(); Common::KeyCode getScan(); void selectVerb(int); void mesa(); @@ -669,7 +669,7 @@ extern const char *_textd1[][11]; extern const ItemLocation itemLocations[]; extern int frame_x[20]; extern const int x_pol[44], y_pol[44]; -extern const int x_barra[]; +extern const int verbBarX[]; extern const int x1d_menu[], y1d_menu[]; extern const CharInfo charMap[]; diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index c5fb4c0679..acd9e308c6 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -116,7 +116,7 @@ const int y_pol[44] = {0, 1, 1, 1, 1, 1, 1, 1, 27, 27, 1, 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, 27, 1, 1}; -const int x_barra[] = {6, 51, 96, 141, 186, 232, 276, 321}; +const int verbBarX[] = {6, 51, 96, 141, 186, 232, 276, 321}; const int x1d_menu[] = {280, 40, 80, 120, 160, 200, 240, 0, 40, 80, 120, 160, 200, 240, 0, 40, 80, 120, 160, 200, 240, 0, 40, 80, 120, 160, 200, 240, 0}; -- cgit v1.2.3 From 220dd330c2f7418e2d20217507569551f22fc0d5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 2 Jun 2008 23:09:19 +0000 Subject: hare_x/hare_y -> curX/curY ancho_hare -> curWidth alto_hare -> curHeight direccion_hare -> curDirection Some slight cleanup svn-id: r32508 --- engines/drascula/animation.cpp | 46 ++++---- engines/drascula/drascula.cpp | 236 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 4 +- engines/drascula/rooms.cpp | 42 ++++---- engines/drascula/talk.cpp | 82 +++++++------- 5 files changed, 205 insertions(+), 205 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 018b6e2a04..54e9399e05 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -464,8 +464,8 @@ void DrasculaEngine::animation_2_1() { x_bj = 170; y_bj = 90; sentido_bj = 0; - hare_x = 91; - hare_y = 95; + curX = 91; + curY = 95; sentido_hare = 1; hare_se_ve = 1; if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -478,12 +478,12 @@ void DrasculaEngine::animation_2_1() { if (animate("lev.bin", 15)) break; - lleva_al_hare(100 + ancho_hare / 2, 99 + alto_hare); + lleva_al_hare(100 + curWidth / 2, 99 + curHeight); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; sentido_hare = 1; - hare_x = 100; - hare_y = 95; + curX = 100; + curY = 95; talk_bj(2); talk(215); @@ -538,7 +538,7 @@ void DrasculaEngine::animation_2_1() { pause(118); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - lleva_al_hare(132, 97 + alto_hare); + lleva_al_hare(132, 97 + curHeight); pause(60); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -546,7 +546,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_bj(12); - lleva_al_hare(157, 98 + alto_hare); + lleva_al_hare(157, 98 + curHeight); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (animate("bes.bin", 16)) @@ -1107,7 +1107,7 @@ void DrasculaEngine::animation_23_2() { } void DrasculaEngine::animation_23_joined() { - int n, p_x = hare_x + 2, p_y = hare_y - 3; + int n, p_x = curX + 2, p_y = curY - 3; int x[] = {1, 38, 75, 112, 75, 112, 75, 112, 149, 112, 149, 112, 149, 186, 223, 260, 1, 38, 75, 112, 149, 112, 149, 112, 149, 112, 149, 186, 223, 260, 260, 260, 260, 223}; int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76, @@ -1127,7 +1127,7 @@ void DrasculaEngine::animation_23_joined() { } void DrasculaEngine::animation_23_joined2() { - int n, p_x = hare_x + 4, p_y = hare_y; + int n, p_x = curX + 4, p_y = curY; int x[] = {1, 35, 69, 103, 137, 171, 205, 239, 273, 1, 35, 69, 103, 137}; int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 73, 73, 73, 73}; @@ -1348,7 +1348,7 @@ void DrasculaEngine::animation_2_3() { } void DrasculaEngine::animation_3_3() { - int px = hare_x - 20, py = hare_y - 1; + int px = curX - 20, py = curY - 1; loadPic("an2y_1.alg", frontSurface, 1); loadPic("an2y_2.alg", extraSurface, 1); @@ -1378,7 +1378,7 @@ void DrasculaEngine::animation_4_3() { } void DrasculaEngine::animation_5_3() { - int px = hare_x - 20, py = hare_y - 1; + int px = curX - 20, py = curY - 1; loadPic("an3y_1.alg", frontSurface, 1); loadPic("an3y_2.alg", extraSurface, 1); @@ -1561,12 +1561,12 @@ void DrasculaEngine::animation_5_5(){ int hueso_x[] = {1, 99, 197, 1, 99, 197, 1, 99, 197}; int hueso_y[] = {1, 1, 1, 66, 66, 66, 131, 131, 131}; int vuela_x[] = {1, 63, 125, 187, 249}; - int pixelX = hare_x - 53, pixelY = hare_y - 9; + int pixelX = curX - 53, pixelY = curY - 9; withoutVerb(); removeObject(8); - lleva_al_hare(hare_x - 19, hare_y + alto_hare); + lleva_al_hare(curX - 19, curY + curHeight); sentido_hare = 1; updateRoom(); updateScreen(); @@ -1782,7 +1782,7 @@ void DrasculaEngine::animation_12_5() { clearRoom(); sentido_hare = 1; characterMoved = 0; - hare_x = -1; + curX = -1; objExit = 104; withoutVerb(); carga_escoba("57.ald"); @@ -1872,8 +1872,8 @@ void DrasculaEngine::animation_1_6() { int l; sentido_hare = 0; - hare_x = 103; - hare_y = 108; + curX = 103; + curY = 108; flags[0] = 1; for (l = 0; l < 200; l++) factor_red[l] = 98; @@ -1994,7 +1994,7 @@ void DrasculaEngine::animation_6_6() { loadPic("99.alg", backSurface, 1); doBreak = 1; objExit = 104; - hare_x = -1; + curX = -1; withoutVerb(); carga_escoba("58.ald"); hare_se_ve = 1; @@ -2021,7 +2021,7 @@ void DrasculaEngine::animation_9_6() { animate("drf.bin", 16); fadeToBlack(0); clearRoom(); - hare_x = -1; + curX = -1; objExit = 108; carga_escoba("59.ald"); // The room number was originally changed here to "nada.alg", @@ -2035,7 +2035,7 @@ void DrasculaEngine::animation_9_6() { loadPic("nota2.alg", drawSurface1, HALF_PAL); black(); sentido_hare = 1; - hare_x -= 21; + curX -= 21; updateRoom(); updateScreen(); fadeFromBlack(0); @@ -2316,7 +2316,7 @@ void DrasculaEngine::animation_22_2() { } void DrasculaEngine::animation_24_2() { - if (hare_x < 178) + if (curX < 178) lleva_al_hare(208, 136); sentido_hare = 3; updateRoom(); @@ -2502,7 +2502,7 @@ void DrasculaEngine::animation_5_2() { loadPic("964.alg", frontSurface, 1); loadPic("aux5.alg", drawSurface3, 1); flags[8] = 1; - hare_x = hare_x - 4; + curX = curX - 4; talk_sinc(_text[_lang][46], "46.als", "4442444244244"); withoutVerb(); } @@ -2674,8 +2674,8 @@ void DrasculaEngine::animation_5_4(){ delay(800); animate("bio.bin", 14); flags[29] = 1; - hare_x = 95; - hare_y = 82; + curX = 95; + curY = 82; updateRoom(); updateScreen(); openDoor(2, 0); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index c21ceebdb0..ce3cbcc8f6 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -118,12 +118,12 @@ int DrasculaEngine::go() { takeObject = 0; menuBar = 0; menuScreen = 0; hasName = 0; frame_y = 0; - hare_x = -1; characterMoved = 0; sentido_hare = 3; num_frame = 0; hare_se_ve = 1; + curX = -1; characterMoved = 0; sentido_hare = 3; num_frame = 0; hare_se_ve = 1; checkFlags = 1; doBreak = 0; walkToObject = 0; stepX = STEP_X; stepY = STEP_Y; - alto_hare = CHARACTER_HEIGHT; ancho_hare = CHARACTER_WIDTH; feetHeight = FEET_HEIGHT; + curHeight = CHARACTER_HEIGHT; curWidth = CHARACTER_WIDTH; feetHeight = FEET_HEIGHT; talkHeight = TALK_HEIGHT; talkWidth = TALK_WIDTH; hasAnswer = 0; conta_blind_vez = 0; @@ -476,8 +476,8 @@ bool DrasculaEngine::escoba() { } } else { carga_escoba("62.ald"); - hare_x = -20; - hare_y = 56; + curX = -20; + curY = 56; lleva_al_hare(65, 145); } } else if (currentChapter == 2) { @@ -518,8 +518,8 @@ bool DrasculaEngine::escoba() { if (hay_que_load == 0) { carga_escoba("21.ald"); sentido_hare = 0; - hare_x = 235; - hare_y = 164; + curX = 235; + curY = 164; } else { if (!para_cargar(saveName)) { return true; @@ -572,11 +572,11 @@ bool DrasculaEngine::escoba() { } if (currentChapter == 2) { - if (roomNumber == 3 && (hare_x == 279) && (hare_y + alto_hare == 101)) + if (roomNumber == 3 && (curX == 279) && (curY + curHeight == 101)) animation_1_2(); - else if (roomNumber == 14 && (hare_x == 214) && (hare_y + alto_hare == 121)) + else if (roomNumber == 14 && (curX == 214) && (curY + curHeight == 121)) lleva_al_hare(190, 130); - else if (roomNumber == 14 && (hare_x == 246) && (hare_y + alto_hare == 112)) + else if (roomNumber == 14 && (curX == 246) && (curY + curHeight == 112)) lleva_al_hare(190, 130); } @@ -853,8 +853,8 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { getIntFromLine(buffer, size, &martin); if (currentChapter == 2 && martin != 0) { - ancho_hare = martin; - getIntFromLine(buffer, size, &alto_hare); + curWidth = martin; + getIntFromLine(buffer, size, &curHeight); getIntFromLine(buffer, size, &feetHeight); getIntFromLine(buffer, size, &stepX); getIntFromLine(buffer, size, &stepY); @@ -912,8 +912,8 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (martin == 0) { stepX = STEP_X; stepY = STEP_Y; - alto_hare = CHARACTER_HEIGHT; - ancho_hare = CHARACTER_WIDTH; + curHeight = CHARACTER_HEIGHT; + curWidth = CHARACTER_WIDTH; feetHeight = FEET_HEIGHT; loadPic("97.alg", extraSurface, 1); loadPic("96.alg", frontSurface, 1); @@ -929,9 +929,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { } if (currentChapter == 2) { - if (hare_x == -1) { - hare_x = _destX[obj_salir]; - hare_y = _destY[obj_salir] - alto_hare; + if (curX == -1) { + curX = _destX[obj_salir]; + curY = _destY[obj_salir] - curHeight; } characterMoved = 0; } @@ -985,15 +985,15 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { } if (currentChapter != 2) { - if (hare_x == -1) { - hare_x = _destX[obj_salir]; - hare_y = _destY[obj_salir]; - alto_hare = (CHARACTER_HEIGHT * factor_red[hare_y]) / 100; - ancho_hare = (CHARACTER_WIDTH * factor_red[hare_y]) / 100; - hare_y = hare_y - alto_hare; + if (curX == -1) { + curX = _destX[obj_salir]; + curY = _destY[obj_salir]; + curHeight = (CHARACTER_HEIGHT * factor_red[curY]) / 100; + curWidth = (CHARACTER_WIDTH * factor_red[curY]) / 100; + curY = curY - curHeight; } else { - alto_hare = (CHARACTER_HEIGHT * factor_red[hare_y]) / 100; - ancho_hare = (CHARACTER_WIDTH * factor_red[hare_y]) / 100; + curHeight = (CHARACTER_HEIGHT * factor_red[curY]) / 100; + curWidth = (CHARACTER_WIDTH * factor_red[curY]) / 100; } characterMoved = 0; } @@ -1001,7 +1001,7 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (currentChapter == 2) { soc = 0; for (l = 0; l < 6; l++) { - soc += ancho_hare; + soc += curWidth; frame_x[l] = soc; } } @@ -1064,8 +1064,8 @@ void DrasculaEngine::clearRoom() { void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { if (currentChapter == 5 || currentChapter == 6) { if (hare_se_ve == 0) { - hare_x = sitio_x; - hare_y = sitio_y; + curX = sitio_x; + curY = sitio_y; updateRoom(); updateScreen(); return; @@ -1134,15 +1134,15 @@ void DrasculaEngine::checkObjects() { } if (currentChapter == 2) { - if (mouseX > hare_x + 2 && mouseY > hare_y + 2 - && mouseX < hare_x + ancho_hare - 2 && mouseY < hare_y + alto_hare - 2) { + if (mouseX > curX + 2 && mouseY > curY + 2 + && mouseX < curX + curWidth - 2 && mouseY < curY + curHeight - 2) { strcpy(textName, "hacker"); hasName = 1; veo = 1; } } else { - if (mouseX > hare_x + 2 && mouseY > hare_y + 2 - && mouseX < hare_x + ancho_hare - 2 && mouseY < hare_y + alto_hare - 2 && veo == 0) { + if (mouseX > curX + 2 && mouseY > curY + 2 + && mouseX < curX + curWidth - 2 && mouseY < curY + curHeight - 2 && veo == 0) { strcpy(textName, "hacker"); hasName = 1; veo = 1; @@ -1181,8 +1181,8 @@ bool DrasculaEngine::verify1() { } } - if (mouseX > hare_x && mouseY > hare_y - && mouseX < hare_x + ancho_hare && mouseY < hare_y + alto_hare) + if (mouseX > curX && mouseY > curY + && mouseX < curX + curWidth && mouseY < curY + curHeight) doBreak = 1; for (l = 0; l < numRoomObjs; l++) { @@ -2043,7 +2043,7 @@ void DrasculaEngine::updateRoom() { if (flags[0] == 0) pon_hare(); else - copyRect(113, 54, hare_x - 20, hare_y - 1, 77, 89, drawSurface3, screenSurface); + copyRect(113, 54, curX - 20, curY - 1, 77, 89, drawSurface3, screenSurface); } else { pon_hare(); } @@ -2066,8 +2066,8 @@ bool DrasculaEngine::loadGame(const char *gameName) { return false; } sav->read(currentData, 20); - hare_x = sav->readSint32LE(); - hare_y = sav->readSint32LE(); + curX = sav->readSint32LE(); + curY = sav->readSint32LE(); sentido_hare = sav->readSint32LE(); for (l = 1; l < 43; l++) { @@ -2198,26 +2198,26 @@ void DrasculaEngine::startWalking() { stepY = STEP_Y; if (currentChapter == 2) { - if ((sitio_x < hare_x) && (sitio_y <= (hare_y + alto_hare))) + if ((sitio_x < curX) && (sitio_y <= (curY + curHeight))) quadrant_1(); - else if ((sitio_x < hare_x) && (sitio_y > (hare_y + alto_hare))) + else if ((sitio_x < curX) && (sitio_y > (curY + curHeight))) quadrant_3(); - else if ((sitio_x > hare_x + ancho_hare) && (sitio_y <= (hare_y + alto_hare))) + else if ((sitio_x > curX + curWidth) && (sitio_y <= (curY + curHeight))) quadrant_2(); - else if ((sitio_x > hare_x + ancho_hare) && (sitio_y > (hare_y + alto_hare))) + else if ((sitio_x > curX + curWidth) && (sitio_y > (curY + curHeight))) quadrant_4(); - else if (sitio_y < hare_y + alto_hare) + else if (sitio_y < curY + curHeight) walkUp(); - else if (sitio_y > hare_y + alto_hare) + else if (sitio_y > curY + curHeight) walkDown(); } else { - if ((sitio_x < hare_x + ancho_hare / 2 ) && (sitio_y <= (hare_y + alto_hare))) + if ((sitio_x < curX + curWidth / 2 ) && (sitio_y <= (curY + curHeight))) quadrant_1(); - else if ((sitio_x < hare_x + ancho_hare / 2) && (sitio_y > (hare_y + alto_hare))) + else if ((sitio_x < curX + curWidth / 2) && (sitio_y > (curY + curHeight))) quadrant_3(); - else if ((sitio_x > hare_x + ancho_hare / 2) && (sitio_y <= (hare_y + alto_hare))) + else if ((sitio_x > curX + curWidth / 2) && (sitio_y <= (curY + curHeight))) quadrant_2(); - else if ((sitio_x > hare_x + ancho_hare / 2) && (sitio_y > (hare_y + alto_hare))) + else if ((sitio_x > curX + curWidth / 2) && (sitio_y > (curY + curHeight))) quadrant_4(); else characterMoved = 0; @@ -2232,42 +2232,42 @@ void DrasculaEngine::pon_hare() { if (characterMoved == 1 && stepX == STEP_X) { for (r = 0; r < stepX; r++) { if (currentChapter != 2) { - if (sentido_hare == 0 && sitio_x - r == hare_x + ancho_hare / 2) { + if (sentido_hare == 0 && sitio_x - r == curX + curWidth / 2) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; } - if (sentido_hare == 1 && sitio_x + r == hare_x + ancho_hare / 2) { + if (sentido_hare == 1 && sitio_x + r == curX + curWidth / 2) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; - hare_x = sitio_x - ancho_hare / 2; - hare_y = sitio_y - alto_hare; + curX = sitio_x - curWidth / 2; + curY = sitio_y - curHeight; } } else if (currentChapter == 2) { - if (sentido_hare == 0 && sitio_x - r == hare_x) { + if (sentido_hare == 0 && sitio_x - r == curX) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; } - if (sentido_hare == 1 && sitio_x + r == hare_x + ancho_hare) { + if (sentido_hare == 1 && sitio_x + r == curX + curWidth) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; - hare_x = sitio_x - ancho_hare + 4; - hare_y = sitio_y - alto_hare; + curX = sitio_x - curWidth + 4; + curY = sitio_y - curHeight; } } } } if (characterMoved == 1 && stepY == STEP_Y) { for (r = 0; r < stepY; r++) { - if (sentido_hare == 2 && sitio_y - r == hare_y + alto_hare) { + if (sentido_hare == 2 && sitio_y - r == curY + curHeight) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; } - if (sentido_hare == 3 && sitio_y + r == hare_y + alto_hare) { + if (sentido_hare == 3 && sitio_y + r == curY + curHeight) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; @@ -2285,11 +2285,11 @@ void DrasculaEngine::pon_hare() { if (characterMoved == 0) { pos_hare[0] = 0; pos_hare[1] = DIF_MASK_HARE; - pos_hare[2] = hare_x; - pos_hare[3] = hare_y; + pos_hare[2] = curX; + pos_hare[3] = curY; if (currentChapter == 2) { - pos_hare[4] = ancho_hare; - pos_hare[5] = alto_hare; + pos_hare[4] = curWidth; + pos_hare[5] = curHeight; } else { pos_hare[4] = CHARACTER_WIDTH; pos_hare[5] = CHARACTER_HEIGHT; @@ -2301,34 +2301,34 @@ void DrasculaEngine::pon_hare() { copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], extraSurface, screenSurface); + factor_red[curY + curHeight], extraSurface, screenSurface); } else if (sentido_hare == 1) { if (currentChapter == 2) copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], extraSurface, screenSurface); + factor_red[curY + curHeight], extraSurface, screenSurface); } else if (sentido_hare == 2) { if (currentChapter == 2) copyRectClip(pos_hare, backSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], backSurface, screenSurface); + factor_red[curY + curHeight], backSurface, screenSurface); } else { if (currentChapter == 2) copyRectClip(pos_hare, frontSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], frontSurface, screenSurface); + factor_red[curY + curHeight], frontSurface, screenSurface); } } else if (characterMoved == 1) { pos_hare[0] = frame_x[num_frame]; pos_hare[1] = frame_y + DIF_MASK_HARE; - pos_hare[2] = hare_x; - pos_hare[3] = hare_y; + pos_hare[2] = curX; + pos_hare[3] = curY; if (currentChapter == 2) { - pos_hare[4] = ancho_hare; - pos_hare[5] = alto_hare; + pos_hare[4] = curWidth; + pos_hare[5] = curHeight; } else { pos_hare[4] = CHARACTER_WIDTH; pos_hare[5] = CHARACTER_HEIGHT; @@ -2339,25 +2339,25 @@ void DrasculaEngine::pon_hare() { copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], extraSurface, screenSurface); + factor_red[curY + curHeight], extraSurface, screenSurface); } else if (sentido_hare == 1) { if (currentChapter == 2) copyRectClip(pos_hare, extraSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], extraSurface, screenSurface); + factor_red[curY + curHeight], extraSurface, screenSurface); } else if (sentido_hare == 2) { if (currentChapter == 2) copyRectClip(pos_hare, backSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], backSurface, screenSurface); + factor_red[curY + curHeight], backSurface, screenSurface); } else { if (currentChapter == 2) copyRectClip(pos_hare, frontSurface, screenSurface); else reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], - factor_red[hare_y + alto_hare], frontSurface, screenSurface); + factor_red[curY + curHeight], frontSurface, screenSurface); } increaseFrameNum(); } @@ -2447,7 +2447,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); - hare_x = -1; + curX = -1; carga_escoba(roomExit); } } @@ -2480,7 +2480,7 @@ bool DrasculaEngine::exitRoom(int l) { strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); - hare_x =- 1; + curX =- 1; carga_escoba(roomExit); } } else if (currentChapter == 3) { @@ -2498,7 +2498,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); - hare_x =- 1; + curX =- 1; carga_escoba(roomExit); } } else if (currentChapter == 4) { @@ -2519,7 +2519,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); - hare_x = -1; + curX = -1; carga_escoba(roomExit); } } else if (currentChapter == 5) { @@ -2538,7 +2538,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); - hare_x = -1; + curX = -1; carga_escoba(roomExit); } } else if (currentChapter == 6) { @@ -2556,7 +2556,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); - hare_x = -1; + curX = -1; carga_escoba(roomExit); if (objExit == 105) @@ -2923,18 +2923,18 @@ void DrasculaEngine::quadrant_1() { float distance_x, distance_y; if (currentChapter == 2) - distance_x = hare_x - sitio_x; + distance_x = curX - sitio_x; else - distance_x = hare_x + ancho_hare / 2 - sitio_x; + distance_x = curX + curWidth / 2 - sitio_x; - distance_y = (hare_y + alto_hare) - sitio_y; + distance_y = (curY + curHeight) - sitio_y; if (distance_x < distance_y) { - direccion_hare = 0; + curDirection = 0; sentido_hare = 2; stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { - direccion_hare = 7; + curDirection = 7; sentido_hare = 0; stepY = (int)(distance_y / (distance_x / STEP_X)); } @@ -2944,18 +2944,18 @@ void DrasculaEngine::quadrant_2() { float distance_x, distance_y; if (currentChapter == 2) - distance_x = abs(hare_x + ancho_hare - sitio_x); + distance_x = abs(curX + curWidth - sitio_x); else - distance_x = abs(hare_x + ancho_hare / 2 - sitio_x); + distance_x = abs(curX + curWidth / 2 - sitio_x); - distance_y = (hare_y + alto_hare) - sitio_y; + distance_y = (curY + curHeight) - sitio_y; if (distance_x < distance_y) { - direccion_hare = 1; + curDirection = 1; sentido_hare = 2; stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { - direccion_hare = 2; + curDirection = 2; sentido_hare = 1; stepY = (int)(distance_y / (distance_x / STEP_X)); } @@ -2965,18 +2965,18 @@ void DrasculaEngine::quadrant_3() { float distance_x, distance_y; if (currentChapter == 2) - distance_x = hare_x - sitio_x; + distance_x = curX - sitio_x; else - distance_x = hare_x + ancho_hare / 2 - sitio_x; + distance_x = curX + curWidth / 2 - sitio_x; - distance_y = sitio_y - (hare_y + alto_hare); + distance_y = sitio_y - (curY + curHeight); if (distance_x < distance_y) { - direccion_hare = 5; + curDirection = 5; sentido_hare = 3; stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { - direccion_hare = 6; + curDirection = 6; sentido_hare = 0; stepY = (int)(distance_y / (distance_x / STEP_X)); } @@ -2986,18 +2986,18 @@ void DrasculaEngine::quadrant_4() { float distance_x, distance_y; if (currentChapter == 2) - distance_x = abs(hare_x + ancho_hare - sitio_x); + distance_x = abs(curX + curWidth - sitio_x); else - distance_x = abs(hare_x + ancho_hare / 2 - sitio_x); + distance_x = abs(curX + curWidth / 2 - sitio_x); - distance_y = sitio_y - (hare_y + alto_hare); + distance_y = sitio_y - (curY + curHeight); if (distance_x < distance_y) { - direccion_hare = 4; + curDirection = 4; sentido_hare = 3; stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { - direccion_hare = 3; + curDirection = 3; sentido_hare = 1; stepY = (int)(distance_y / (distance_x / STEP_X)); } @@ -3012,8 +3012,8 @@ void DrasculaEngine::saveGame(char gameName[]) { } out->writeSint32LE(currentChapter); out->write(currentData, 20); - out->writeSint32LE(hare_x); - out->writeSint32LE(hare_y); + out->writeSint32LE(curX); + out->writeSint32LE(curY); out->writeSint32LE(sentido_hare); for (l = 1; l < 43; l++) { @@ -3043,26 +3043,26 @@ void DrasculaEngine::increaseFrameNum() { if (num_frame == 6) num_frame = 0; - if (direccion_hare == 0 || direccion_hare == 7) { - hare_x = hare_x - stepX; - hare_y = hare_y - stepY; - } else if (direccion_hare == 1 || direccion_hare == 2) { - hare_x = hare_x + stepX; - hare_y = hare_y - stepY; - } else if (direccion_hare == 3 || direccion_hare == 4) { - hare_x = hare_x + stepX; - hare_y = hare_y + stepY; - } else if (direccion_hare == 5 || direccion_hare == 6) { - hare_x = hare_x - stepX; - hare_y = hare_y + stepY; + if (curDirection == 0 || curDirection == 7) { + curX -= stepX; + curY -= stepY; + } else if (curDirection == 1 || curDirection == 2) { + curX += stepX; + curY -= stepY; + } else if (curDirection == 3 || curDirection == 4) { + curX += stepX; + curY += stepY; + } else if (curDirection == 5 || curDirection == 6) { + curX -= stepX; + curY += stepY; } } if (currentChapter != 2) { - hare_y += (int)(alto_hare - newHeight); - hare_x += (int)(ancho_hare - newWidth); - alto_hare = (int)newHeight; - ancho_hare = (int)newWidth; + curY += (int)(curHeight - newHeight); + curX += (int)(curWidth - newWidth); + curHeight = (int)newHeight; + curWidth = (int)newWidth; } } @@ -3501,13 +3501,13 @@ void DrasculaEngine::updateVisible() { } void DrasculaEngine::walkDown() { - direccion_hare = 4; + curDirection = 4; sentido_hare = 3; stepX = 0; } void DrasculaEngine::walkUp() { - direccion_hare = 0; + curDirection = 0; sentido_hare = 2; stepX = 0; } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 3d2306bbdb..27472521bf 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -260,11 +260,11 @@ public: int flags[NUM_FLAGS]; int frame_y; - int hare_x, hare_y, characterMoved, direccion_hare, sentido_hare, num_frame, hare_se_ve; + int curX, curY, characterMoved, curDirection, sentido_hare, num_frame, hare_se_ve; int sitio_x, sitio_y, checkFlags; int doBreak; int stepX, stepY; - int alto_hare, ancho_hare, feetHeight; + int curHeight, curWidth, feetHeight; int talkHeight, talkWidth; int suelo_x1, suelo_y1, suelo_x2, suelo_y2; int near, far; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index d5b4c0b82e..052c5c3da0 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -112,7 +112,7 @@ void DrasculaEngine::room_3(int fl) { } else if (pickedObject == kVerbPick && fl == 165) { copyBackground(0, 0, 0,0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(44, 1, hare_x, hare_y, 41, 70, drawSurface2, screenSurface); + copyRect(44, 1, curX, curY, 41, 70, drawSurface2, screenSurface); updateRefresh(); updateScreen(); pause(4); @@ -172,7 +172,7 @@ void DrasculaEngine::room_6(int fl){ else if (pickedObject == kVerbOpen && fl == 143 && flags[2] == 0) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, drawSurface3, screenSurface); + copyRect(228, 102, curX + 5, curY - 1, 47, 73, drawSurface3, screenSurface); updateScreen(); pause(10); playSound(3); @@ -184,7 +184,7 @@ void DrasculaEngine::room_6(int fl){ copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); flags[2] = 0; updateRefresh_pre(); - copyRect(228, 102, hare_x + 5, hare_y - 1, 47, 73, drawSurface3, screenSurface); + copyRect(228, 102, curX + 5, curY - 1, 47, 73, drawSurface3, screenSurface); updateScreen(); pause(5); playSound(4); @@ -194,7 +194,7 @@ void DrasculaEngine::room_6(int fl){ } else if (pickedObject == kVerbOpen && fl == 139 && flags[1] == 0) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, drawSurface3, screenSurface); + copyRect(267, 1, curX - 14, curY - 2, 52, 73, drawSurface3, screenSurface); updateScreen(); pause(19); playSound(3); @@ -207,7 +207,7 @@ void DrasculaEngine::room_6(int fl){ } else if (pickedObject == kVerbPick && fl == 140) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(267, 1, hare_x - 14, hare_y - 2, 52, 73, drawSurface3, screenSurface); + copyRect(267, 1, curX - 14, curY - 2, 52, 73, drawSurface3, screenSurface); updateScreen(); pause(19); pickObject(9); @@ -331,7 +331,7 @@ void DrasculaEngine::room_15(int fl) { sentido_hare = 1; } else if (pickedObject == 18 && fl == 188 && flags[26] == 0) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyRect(133, 135, hare_x + 6, hare_y, 39, 63, drawSurface3, screenSurface); + copyRect(133, 135, curX + 6, curY, 39, 63, drawSurface3, screenSurface); updateScreen(); playSound(8); finishSound(); @@ -440,7 +440,7 @@ void DrasculaEngine::room_18(int fl) { else if (pickedObject == kVerbPick && fl == 182) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(44, 1, hare_x, hare_y, 41, 70, drawSurface2, screenSurface); + copyRect(44, 1, curX, curY, 41, 70, drawSurface2, screenSurface); updateRefresh(); updateScreen(); pause(4); @@ -464,7 +464,7 @@ void DrasculaEngine::room_18(int fl) { updateScreen(); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - copyRect(1, 1, hare_x - 1, hare_y + 3, 42, 67, drawSurface2, screenSurface); + copyRect(1, 1, curX - 1, curY + 3, 42, 67, drawSurface2, screenSurface); updateRefresh(); updateScreen(); pause(6); @@ -875,7 +875,7 @@ void DrasculaEngine::room_55(int fl) { playSound(11); animate("det.bin", 17); finishSound(); - lleva_al_hare(hare_x - 3, hare_y + alto_hare + 6); + lleva_al_hare(curX - 3, curY + curHeight + 6); } else hasAnswer = 0; } @@ -932,7 +932,7 @@ void DrasculaEngine::room_59(int fl) { stopSound(); hare_se_ve = 0; updateRoom(); - copyRect(101, 34, hare_x - 4, hare_y - 1, 37, 70, drawSurface3, screenSurface); + copyRect(101, 34, curX - 4, curY - 1, 37, 70, drawSurface3, screenSurface); copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); updateScreen(); hare_se_ve = 1; @@ -1213,7 +1213,7 @@ void DrasculaEngine::updateRefresh_pre() { void DrasculaEngine::update_1_pre() { int cambio_col_antes = changeColor; - if (hare_x > 98 && hare_x < 153) + if (curX > 98 && curX < 153) changeColor = 1; else changeColor = 0; @@ -1283,14 +1283,14 @@ void DrasculaEngine::update_3_pre() { } void DrasculaEngine::update_3() { - if (hare_y + alto_hare < 118) + if (curY + curHeight < 118) copyRect(129, 110, 194, 36, 126, 88, drawSurface3, screenSurface); copyRect(47, 57, 277, 143, 43, 50, drawSurface3, screenSurface); } void DrasculaEngine::update_4() { int cambio_col_antes = changeColor; - if (hare_x > 190) + if (curX > 190) changeColor = 1; else changeColor = 0; @@ -1313,8 +1313,8 @@ void DrasculaEngine::update_5() { void DrasculaEngine::update_6_pre() { int cambio_col_antes = changeColor; - if ((hare_x > 149 && hare_y + alto_hare > 160 && hare_x < 220 && hare_y + alto_hare < 188) || - (hare_x > 75 && hare_y + alto_hare > 183 && hare_x < 145)) + if ((curX > 149 && curY + curHeight > 160 && curX < 220 && curY + curHeight < 188) || + (curX > 75 && curY + curHeight > 183 && curX < 145)) changeColor = 0; else changeColor = 1; @@ -1361,7 +1361,7 @@ void DrasculaEngine::update_12_pre() { } void DrasculaEngine::update_13() { - if (hare_x > 55 && flags[3] == 0) + if (curX > 55 && flags[3] == 0) animation_6_3(); if (flags[1] == 0) copyRect(185, 110, 121, 65, 67, 88, drawSurface3, screenSurface); @@ -1382,7 +1382,7 @@ void DrasculaEngine::update_14_pre() { if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); - if (hare_x > 101 && hare_x < 155) + if (curX > 101 && curX < 155) copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface); if (flags[11] == 0) copyBackground(pianista_x[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface); @@ -1532,7 +1532,7 @@ void DrasculaEngine::update_26_pre() { void DrasculaEngine::update_26() { if (flags[29] == 1) - copyRect(93, 1, hare_x, hare_y, 45, 78, backSurface, screenSurface); + copyRect(93, 1, curX, curY, 45, 78, backSurface, screenSurface); copyRect(233, 107, 17, 102, 66, 92, drawSurface3, screenSurface); } @@ -1701,7 +1701,7 @@ void DrasculaEngine::update_60_pre() { } void DrasculaEngine::update_60() { - if (hare_y - 10 < y_dr && flags[5] == 0) + if (curY - 10 < y_dr && flags[5] == 0) placeDrascula(); } @@ -1722,7 +1722,7 @@ void DrasculaEngine::update_62_pre() { if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); - if (hare_x > 101 && hare_x < 155) + if (curX > 101 && curX < 155) copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface); if (flags[11] == 0) @@ -1762,7 +1762,7 @@ void DrasculaEngine::update_62() { copyRect(1, 1, 0, 0, 62, 142, drawSurface2, screenSurface); - if (hare_y + alto_hare < 89) { + if (curY + curHeight < 89) { copyRect(205, 1, 180, 9, 82, 80, drawSurface3, screenSurface); copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); } diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 40c5d4a1ab..35bce21559 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -370,7 +370,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { } if (currentChapter != 2) { - if (factor_red[hare_y + alto_hare] == 100) + if (factor_red[curY + curHeight] == 100) suma_1_pixel = 0; } @@ -391,65 +391,65 @@ void DrasculaEngine::talk(const char *said, const char *filename) { updateRefresh_pre(); if (currentChapter == 2) - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, talkHeight - 1, screenSurface, drawSurface3); + copyBackground(curX, curY, OBJWIDTH + 1, 0, curWidth, talkHeight - 1, screenSurface, drawSurface3); else - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), + copyBackground(curX, curY, OBJWIDTH + 1, 0, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]), + (int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), screenSurface, drawSurface3); pon_hare(); if (currentChapter == 2) { if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg")) - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, talkHeight - 1, drawSurface3, screenSurface); + copyBackground(OBJWIDTH + 1, 0, curX, curY, curWidth, talkHeight - 1, drawSurface3, screenSurface); } else { - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), + copyBackground(OBJWIDTH + 1, 0, curX, curY, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]), + (int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), drawSurface3, screenSurface); } if (sentido_hare == 0) { if (currentChapter == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, talkWidth, talkHeight, + copyRect(x_talk_izq[face], y_mask_talk, curX + 8, curY - 1, talkWidth, talkHeight, extraSurface, screenSurface); else - reduce_hare_chico(x_talk_izq[face], y_mask_talk, hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], + reduce_hare_chico(x_talk_izq[face], y_mask_talk, curX + (int)((8.0f / 100) * factor_red[curY + curHeight]), + curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 1) { if (currentChapter == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, + copyRect(x_talk_dch[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, extraSurface, screenSurface); else - reduce_hare_chico(x_talk_dch[face], y_mask_talk, hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface); + reduce_hare_chico(x_talk_dch[face], y_mask_talk, curX + (int)((12.0f / 100) * factor_red[curY + curHeight]), + curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 2) { if (currentChapter == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, + copyRect(x_talk_izq[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, frontSurface, screenSurface); else reduce_hare_chico(x_talk_izq[face], y_mask_talk, - suma_1_pixel + hare_x + (int)((12.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], + suma_1_pixel + curX + (int)((12.0f / 100) * factor_red[curY + curHeight]), + curY, talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 3) { if (currentChapter == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, talkWidth, talkHeight, + copyRect(x_talk_dch[face], y_mask_talk, curX + 8, curY, talkWidth, talkHeight, frontSurface, screenSurface); else reduce_hare_chico(x_talk_dch[face], y_mask_talk, - suma_1_pixel + hare_x + (int)((8.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, talkWidth,talkHeight, factor_red[hare_y + alto_hare], + suma_1_pixel + curX + (int)((8.0f / 100) * factor_red[curY + curHeight]), + curY, talkWidth,talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface); updateRefresh(); } if (withVoices == 0) - centerText(said, hare_x, hare_y); + centerText(said, curX, curY); updateScreen(); @@ -911,7 +911,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha color_abc(kColorYellow); if (currentChapter == 1) { - if (factor_red[hare_y + alto_hare] == 100) + if (factor_red[curY + curHeight] == 100) suma_1_pixel = 0; } @@ -926,52 +926,52 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha updateRefresh_pre(); if (currentChapter == 2) - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, ancho_hare, talkHeight - 1, screenSurface, drawSurface3); + copyBackground(curX, curY, OBJWIDTH + 1, 0, curWidth, talkHeight - 1, screenSurface, drawSurface3); else - copyBackground(hare_x, hare_y, OBJWIDTH + 1, 0, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), screenSurface, drawSurface3); + copyBackground(curX, curY, OBJWIDTH + 1, 0, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]), + (int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), screenSurface, drawSurface3); pon_hare(); if (currentChapter == 2) { - if (alto_hare != 56) - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, ancho_hare, talkHeight - 1, drawSurface3, screenSurface); + if (curHeight != 56) + copyBackground(OBJWIDTH + 1, 0, curX, curY, curWidth, talkHeight - 1, drawSurface3, screenSurface); } else - copyBackground(OBJWIDTH + 1, 0, hare_x, hare_y, (int)(((float)ancho_hare / 100) * factor_red[hare_y + alto_hare]), - (int)(((float)(talkHeight - 1) / 100) * factor_red[hare_y + alto_hare]), drawSurface3, screenSurface); + copyBackground(OBJWIDTH + 1, 0, curX, curY, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]), + (int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), drawSurface3, screenSurface); if (sentido_hare == 0) { if (currentChapter == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 8, hare_y - 1, talkWidth, talkHeight, extraSurface, screenSurface); + copyRect(x_talk_izq[face], y_mask_talk, curX + 8, curY - 1, talkWidth, talkHeight, extraSurface, screenSurface); else - reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface); + reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(curX + (8.0f / 100) * factor_red[curY + curHeight]), + curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 1) { if (currentChapter == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, extraSurface, screenSurface); + copyRect(x_talk_dch[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, extraSurface, screenSurface); else - reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), - hare_y, talkWidth, talkHeight, factor_red[hare_y + alto_hare], extraSurface, screenSurface); + reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(curX + (12.0f / 100) * factor_red[curY + curHeight]), + curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 2) { if (currentChapter == 2) - copyRect(x_talk_izq[face], y_mask_talk, hare_x + 12, hare_y, talkWidth, talkHeight, frontSurface, screenSurface); + copyRect(x_talk_izq[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, frontSurface, screenSurface); else reduce_hare_chico(x_talk_izq[face], y_mask_talk, - (int)(suma_1_pixel + hare_x + (12.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, - talkWidth, talkHeight, factor_red[hare_y + alto_hare], frontSurface, screenSurface); + (int)(suma_1_pixel + curX + (12.0f / 100) * factor_red[curY + curHeight]), curY, + talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface); updateRefresh(); } else if (sentido_hare == 3) { if (currentChapter == 2) - copyRect(x_talk_dch[face], y_mask_talk, hare_x + 8, hare_y, talkWidth, talkHeight, frontSurface, screenSurface); + copyRect(x_talk_dch[face], y_mask_talk, curX + 8, curY, talkWidth, talkHeight, frontSurface, screenSurface); else reduce_hare_chico(x_talk_dch[face], y_mask_talk, - (int)(suma_1_pixel + hare_x + (8.0f / 100) * factor_red[hare_y + alto_hare]), hare_y, - talkWidth, talkHeight, factor_red[hare_y + alto_hare], frontSurface, screenSurface); + (int)(suma_1_pixel + curX + (8.0f / 100) * factor_red[curY + curHeight]), curY, + talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface); updateRefresh(); } if (withVoices == 0) - centerText(said, hare_x, hare_y); + centerText(said, curX, curY); updateScreen(); -- cgit v1.2.3 From b87c11a4a14343a23c35e43b02bc8f4ff6b40922 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Tue, 3 Jun 2008 00:49:27 +0000 Subject: Fixed initialization of parsers, necessary after the latest removal of static arrays. svn-id: r32509 --- engines/parallaction/parallaction.h | 1 + engines/parallaction/parallaction_br.cpp | 21 +++++++++++++++++++++ engines/parallaction/parallaction_ns.cpp | 2 ++ engines/parallaction/parser.h | 18 ++++++++---------- 4 files changed, 32 insertions(+), 10 deletions(-) diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 3117424373..63042a8882 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -723,6 +723,7 @@ private: const Callable *_callables; void parseLocation(const char* name); + void loadProgram(AnimationPtr a, const char *filename); DECLARE_UNQUALIFIED_COMMAND_OPCODE(location); DECLARE_UNQUALIFIED_COMMAND_OPCODE(open); diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index f07d201ae9..62cc702222 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -74,7 +74,9 @@ int Parallaction_br::init() { initCursors(); initOpcodes(); _locationParser = new LocationParser_br(this); + _locationParser->init(); _programParser = new ProgramParser_br(this); + _programParser->init(); _part = -1; @@ -258,6 +260,25 @@ void Parallaction_br::parseLocation(const char *filename) { return; } +void Parallaction_br::loadProgram(AnimationPtr a, const char *filename) { + debugC(1, kDebugParser, "loadProgram(Animation: %s, script: %s)", a->_name, filename); + + Script *script = _disk->loadScript(filename); + ProgramPtr program(new Program); + program->_anim = a; + + _programParser->parse(script, program); + + delete script; + + _vm->_location._programs.push_back(program); + + debugC(1, kDebugParser, "loadProgram() done"); + + return; +} + + void Parallaction_br::changeCharacter(const char *name) { diff --git a/engines/parallaction/parallaction_ns.cpp b/engines/parallaction/parallaction_ns.cpp index 9c1b25d824..2cca3a6a4a 100644 --- a/engines/parallaction/parallaction_ns.cpp +++ b/engines/parallaction/parallaction_ns.cpp @@ -137,7 +137,9 @@ int Parallaction_ns::init() { initCursors(); initOpcodes(); _locationParser = new LocationParser_ns(this); + _locationParser->init(); _programParser = new ProgramParser_ns(this); + _programParser->init(); _introSarcData1 = 0; _introSarcData2 = 1; diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h index fa5d0527ed..22d3119d87 100644 --- a/engines/parallaction/parser.h +++ b/engines/parallaction/parser.h @@ -207,7 +207,6 @@ protected: } _forwardedCommands[MAX_FORWARDS]; uint _numForwardedCommands; - void init(); void clearSet(OpcodeSet &opcodes) { for (Common::Array::iterator i = opcodes.begin(); i != opcodes.end(); ++i) delete *i; @@ -216,9 +215,10 @@ protected: public: LocationParser_ns(Parallaction_ns *vm) : _vm(vm) { - init(); } + virtual void init(); + virtual ~LocationParser_ns() { delete _commandsNames; delete _locationStmt; @@ -282,13 +282,12 @@ protected: DECLARE_UNQUALIFIED_ANIM_PARSER(moveto); DECLARE_UNQUALIFIED_ANIM_PARSER(endanimation); - void init(); - public: LocationParser_br(Parallaction_br *vm) : LocationParser_ns((Parallaction_ns*)vm), _vm(vm) { - init(); } + virtual void init(); + virtual ~LocationParser_br() { delete _commandsNames; delete _locationStmt; @@ -343,7 +342,6 @@ protected: void parseLValue(ScriptVar &var, const char *str); virtual void parseRValue(ScriptVar &var, const char *str); - void init(); void clearSet(OpcodeSet &opcodes) { for (Common::Array::iterator i = opcodes.begin(); i != opcodes.end(); ++i) delete *i; @@ -352,9 +350,10 @@ protected: public: ProgramParser_ns(Parallaction_ns *vm) : _vm(vm) { - init(); } + virtual void init(); + virtual ~ProgramParser_ns() { delete _instructionNames; clearSet(_instructionParsers); @@ -380,13 +379,12 @@ protected: virtual void parseRValue(ScriptVar &var, const char *str); - void init(); - public: ProgramParser_br(Parallaction_br *vm) : ProgramParser_ns((Parallaction_ns*)vm), _vm(vm) { - init(); } + virtual void init(); + virtual ~ProgramParser_br() { delete _instructionNames; delete _parser; -- cgit v1.2.3 From 2d9a194a559d3bfe61c81b7d4995a48f2374f64d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 3 Jun 2008 07:34:47 +0000 Subject: Removed the now empty files stringSupport.cpp/.h svn-id: r32510 --- engines/cruise/cruise_main.h | 1 - engines/cruise/module.mk | 1 - engines/cruise/stringSupport.cpp | 30 ------------------------------ engines/cruise/stringSupport.h | 33 --------------------------------- 4 files changed, 65 deletions(-) delete mode 100644 engines/cruise/stringSupport.cpp delete mode 100644 engines/cruise/stringSupport.h diff --git a/engines/cruise/cruise_main.h b/engines/cruise/cruise_main.h index c7d597dbd6..60afe5fa4c 100644 --- a/engines/cruise/cruise_main.h +++ b/engines/cruise/cruise_main.h @@ -45,7 +45,6 @@ #include "cruise/stack.h" #include "cruise/script.h" #include "cruise/various.h" -#include "cruise/stringSupport.h" #include "cruise/function.h" #include "cruise/saveload.h" #include "cruise/linker.h" diff --git a/engines/cruise/module.mk b/engines/cruise/module.mk index 384d7a1ecb..8db5b1da44 100644 --- a/engines/cruise/module.mk +++ b/engines/cruise/module.mk @@ -27,7 +27,6 @@ MODULE_OBJS := \ saveload.o \ script.o \ stack.o \ - stringSupport.o \ various.o \ vars.o \ volume.o diff --git a/engines/cruise/stringSupport.cpp b/engines/cruise/stringSupport.cpp deleted file mode 100644 index 7712f1e172..0000000000 --- a/engines/cruise/stringSupport.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#include "cruise/cruise_main.h" - -namespace Cruise { - -} // End of namespace Cruise diff --git a/engines/cruise/stringSupport.h b/engines/cruise/stringSupport.h deleted file mode 100644 index c7cdb8efd9..0000000000 --- a/engines/cruise/stringSupport.h +++ /dev/null @@ -1,33 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef CRUISE_STRING_SUPPORT_H -#define CRSUIE_STRING_SUPPORT_H - -namespace Cruise { - -} // End of namespace Cruise - -#endif -- cgit v1.2.3 From 45cce58611ba8fd70bb367168c559e2ef0fe7c9f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 3 Jun 2008 07:38:28 +0000 Subject: Removed stringSupport.cpp/.h from the MSVC project files of the cruise engine svn-id: r32511 --- dists/msvc7/cruise.vcproj | 6 ------ dists/msvc71/cruise.vcproj | 6 ------ dists/msvc8/cruise.vcproj | 8 -------- dists/msvc9/cruise.vcproj | 8 -------- 4 files changed, 28 deletions(-) diff --git a/dists/msvc7/cruise.vcproj b/dists/msvc7/cruise.vcproj index d34f910c0d..bac134e02c 100644 --- a/dists/msvc7/cruise.vcproj +++ b/dists/msvc7/cruise.vcproj @@ -243,12 +243,6 @@ - - - - diff --git a/dists/msvc71/cruise.vcproj b/dists/msvc71/cruise.vcproj index 1915be0c5d..53ed72f60e 100644 --- a/dists/msvc71/cruise.vcproj +++ b/dists/msvc71/cruise.vcproj @@ -257,12 +257,6 @@ - - - - diff --git a/dists/msvc8/cruise.vcproj b/dists/msvc8/cruise.vcproj index 45479ef22f..f183d07ee3 100644 --- a/dists/msvc8/cruise.vcproj +++ b/dists/msvc8/cruise.vcproj @@ -356,14 +356,6 @@ RelativePath="..\..\engines\cruise\stack.h" > - - - - diff --git a/dists/msvc9/cruise.vcproj b/dists/msvc9/cruise.vcproj index 2d47ab4d2c..19a96eb7be 100644 --- a/dists/msvc9/cruise.vcproj +++ b/dists/msvc9/cruise.vcproj @@ -357,14 +357,6 @@ RelativePath="..\..\engines\cruise\stack.h" > - - - - -- cgit v1.2.3 From 00e662391da59adb8aae478f7af2ab867346ab7f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 3 Jun 2008 08:54:49 +0000 Subject: x_talk_izq/x_talk_dch are used in more than 1 place sentido_dr -> trackDrascula sentido_hare -> trackProtagonist sentido_final -> trackFinal lleva_al_hare -> gotoObject pon_vb/sentido_vb -> moveVB/trackVB hay_seleccion -> selectionMade suelo -> floor obj_salir -> objIsExit sitio_x/sitio_y -> roomX/roomY fundido -> fade cuanto -> duration (in pause()) pos_hare -> curPos nom_fich -> fileName sitiobj_x/sitiobj_y -> roomObjX/roomObjY sentidobj -> trackObj cirio -> candle pianista -> pianist suma_1_pixel -> talkOffset sincronia -> syncChar svn-id: r32512 --- engines/drascula/animation.cpp | 172 ++++++++--------- engines/drascula/drascula.cpp | 414 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 20 +- engines/drascula/rooms.cpp | 89 ++++----- engines/drascula/talk.cpp | 61 +++--- 5 files changed, 378 insertions(+), 378 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 54e9399e05..ae2c3e5aff 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -185,7 +185,7 @@ void DrasculaEngine::animation_1_1() { loadPic("100.alg", drawSurface1, HALF_PAL); loadPic("auxigor.alg", frontSurface, 1); loadPic("auxdr.alg", backSurface, 1); - sentido_dr = 0; + trackDrascula = 0; x_dr = 129; y_dr = 95; sentido_igor = 1; @@ -288,20 +288,20 @@ void DrasculaEngine::animation_1_1() { fadeFromBlack(0); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - sentido_dr = 1; + trackDrascula = 1; talk_igor(1, kIgorDch); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_drascula(11, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - sentido_dr = 3; + trackDrascula = 3; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); updateScreen(); pause(1); - sentido_dr = 0; + trackDrascula = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); @@ -309,13 +309,13 @@ void DrasculaEngine::animation_1_1() { talk_drascula(12); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - sentido_dr = 3; + trackDrascula = 3; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); updateScreen(); pause(1); - sentido_dr = 1; + trackDrascula = 1; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); @@ -327,13 +327,13 @@ void DrasculaEngine::animation_1_1() { talk_drascula(13, 1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - sentido_dr = 3; + trackDrascula = 3; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); updateScreen(); pause(1); - sentido_dr = 0; + trackDrascula = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); @@ -384,7 +384,7 @@ void DrasculaEngine::animation_1_1() { void DrasculaEngine::animation_2_1() { int l; - lleva_al_hare(231, 91); + gotoObject(231, 91); hare_se_ve = 0; term_int = 0; @@ -466,7 +466,7 @@ void DrasculaEngine::animation_2_1() { sentido_bj = 0; curX = 91; curY = 95; - sentido_hare = 1; + trackProtagonist = 1; hare_se_ve = 1; if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -478,10 +478,10 @@ void DrasculaEngine::animation_2_1() { if (animate("lev.bin", 15)) break; - lleva_al_hare(100 + curWidth / 2, 99 + curHeight); + gotoObject(100 + curWidth / 2, 99 + curHeight); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - sentido_hare = 1; + trackProtagonist = 1; curX = 100; curY = 95; @@ -538,7 +538,7 @@ void DrasculaEngine::animation_2_1() { pause(118); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - lleva_al_hare(132, 97 + curHeight); + gotoObject(132, 97 + curHeight); pause(60); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -546,7 +546,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; talk_bj(12); - lleva_al_hare(157, 98 + curHeight); + gotoObject(157, 98 + curHeight); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; if (animate("bes.bin", 16)) @@ -554,7 +554,7 @@ void DrasculaEngine::animation_2_1() { playMusic(11); if (animate("rap.bin", 16)) break; - sentido_hare = 3; + trackProtagonist = 3; // The room number was originally changed here to "no_bj.alg", // which doesn't exist. In reality, this was just a hack to // set the room number to a non-existant one, so that BJ does @@ -573,7 +573,7 @@ void DrasculaEngine::animation_2_1() { pause(76); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - sentido_hare = 1; + trackProtagonist = 1; updateRoom(); updateScreen(); talk(226); @@ -668,12 +668,12 @@ void DrasculaEngine::animation_4_1() { } void DrasculaEngine::animation_1_2() { - lleva_al_hare(178, 121); - lleva_al_hare(169, 135); + gotoObject(178, 121); + gotoObject(169, 135); } void DrasculaEngine::animation_2_2() { - sentido_hare = 0; + trackProtagonist = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); pon_hare(); updateRefresh(); @@ -708,9 +708,9 @@ void DrasculaEngine::animation_2_2() { } void DrasculaEngine::animation_3_2() { - lleva_al_hare(163, 106); - lleva_al_hare(287, 101); - sentido_hare = 0; + gotoObject(163, 106); + gotoObject(287, 101); + trackProtagonist = 0; } void DrasculaEngine::animation_4_2() { @@ -826,7 +826,7 @@ void DrasculaEngine::animation_14_2() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); pon_hare(); - pon_vb(); + moveVB(); pos_cabina[3] = n; copyRectClip(pos_cabina, backSurface, screenSurface); updateRefresh(); @@ -1040,8 +1040,8 @@ void DrasculaEngine::animation_20_2() { exitRoom(0); flags[21] = 0; flags[24] = 0; - sentido_vb = 1; - vb_x = 120; + trackVB = 1; + vbX = 120; breakOut = 1; } @@ -1065,17 +1065,17 @@ void DrasculaEngine::animation_23_2() { talk_vb(15); lleva_vb(42); - sentido_vb = 1; + trackVB = 1; talk_vb(16); - sentido_vb = 2; - lleva_al_hare(157, 147); - lleva_al_hare(131, 149); - sentido_hare = 0; + trackVB = 2; + gotoObject(157, 147); + gotoObject(131, 149); + trackProtagonist = 0; animation_14_2(); if (flags[25] == 0) talk_vb(17); pause(8); - sentido_vb = 1; + trackVB = 1; talk_vb(18); if (flags[29] == 0) @@ -1083,7 +1083,7 @@ void DrasculaEngine::animation_23_2() { else animation_23_joined2(); - sentido_vb = 2; + trackVB = 2; animation_25_2(); lleva_vb(99); @@ -1168,7 +1168,7 @@ void DrasculaEngine::animation_25_2() { updateRefresh_pre(); pon_hare(); - pon_vb(); + moveVB(); pos_cabina[3] = n; @@ -1247,13 +1247,13 @@ void DrasculaEngine::animation_31_2() { talk_vb(44); lleva_vb(-50); pause(15); - lleva_al_hare(159, 140); + gotoObject(159, 140); loadPic("99.alg", backSurface, 1); - sentido_hare = 2; + trackProtagonist = 2; updateRoom(); updateScreen(); pause(78); - sentido_hare = 0; + trackProtagonist = 0; updateRoom(); updateScreen(); pause(22); @@ -1291,8 +1291,8 @@ void DrasculaEngine::animation_31_2() { } void DrasculaEngine::animation_35_2() { - lleva_al_hare(96, 165); - lleva_al_hare(79, 165); + gotoObject(96, 165); + gotoObject(79, 165); updateRoom(); updateScreen(); @@ -1344,7 +1344,7 @@ void DrasculaEngine::animation_2_3() { loadPic("97.alg", extraSurface, 1); loadPic("99.alg", backSurface, 1); - lleva_al_hare(332, 127); + gotoObject(332, 127); } void DrasculaEngine::animation_3_3() { @@ -1494,17 +1494,17 @@ void DrasculaEngine::animation_1_5() { talk_bj(19); talk(229); pause(5); - lleva_al_hare(114, 170); - sentido_hare = 3; + gotoObject(114, 170); + trackProtagonist = 3; talk(431); talk_bj(20); - sentido_hare = 2; + trackProtagonist = 2; pause(4); talk(438); - sitio_x = 120; - sitio_y = 157; + roomX = 120; + roomY = 157; walkToObject = 1; - sentido_final = 1; + trackFinal = 1; startWalking(); talk_bj(21); @@ -1515,12 +1515,12 @@ void DrasculaEngine::animation_1_5() { updateScreen(); } - sentido_hare = 1; + trackProtagonist = 1; talk(229); flags[0] = 1; } - sentido_hare = 1; + trackProtagonist = 1; converse("op_8.cal"); } @@ -1566,8 +1566,8 @@ void DrasculaEngine::animation_5_5(){ withoutVerb(); removeObject(8); - lleva_al_hare(curX - 19, curY + curHeight); - sentido_hare = 1; + gotoObject(curX - 19, curY + curHeight); + trackProtagonist = 1; updateRoom(); updateScreen(); @@ -1686,7 +1686,7 @@ void DrasculaEngine::animation_12_5() { const int elfrusky_x[] = {1, 68, 135, 1, 68, 135, 1, 68, 135, 68, 1, 135, 68, 135, 68}; //const int humo_x[] = {1, 29, 57, 85, 113, 141, 169, 197, 225}; int color, component; - char fundido; + char fade; playMusic(26); updateRoom(); @@ -1695,7 +1695,7 @@ void DrasculaEngine::animation_12_5() { animate("rayo1.bin", 23); playSound(5); animate("rayo2.bin", 17); - sentido_hare = 1; + trackProtagonist = 1; updateRoom(); updateScreen(); @@ -1708,22 +1708,22 @@ void DrasculaEngine::animation_12_5() { bgPalette3[color][component] = gamePalette[color][component]; } - for (fundido = 1; fundido >= 0; fundido--) { + for (fade = 1; fade >= 0; fade--) { for (color = 0; color < 128; color++) for (component = 0; component < 3; component++) - bgPalette1[color][component] = adjustToVGA(bgPalette1[color][component] - 8 + fundido); + bgPalette1[color][component] = adjustToVGA(bgPalette1[color][component] - 8 + fade); } - for (fundido = 2; fundido >= 0; fundido--) { + for (fade = 2; fade >= 0; fade--) { for (color = 0; color < 128; color++) for (component = 0; component < 3; component++) - bgPalette2[color][component] = adjustToVGA(bgPalette2[color][component] - 8 + fundido); + bgPalette2[color][component] = adjustToVGA(bgPalette2[color][component] - 8 + fade); } - for (fundido = 3; fundido >= 0; fundido--) { + for (fade = 3; fade >= 0; fade--) { for (color = 0; color < 128; color++) for (component = 0; component < 3; component++) - bgPalette3[color][component] = adjustToVGA(bgPalette3[color][component] - 8 + fundido); + bgPalette3[color][component] = adjustToVGA(bgPalette3[color][component] - 8 + fade); } loadPic("3an11_1.alg", backSurface, 1); @@ -1773,14 +1773,14 @@ void DrasculaEngine::animation_12_5() { loadPic("99.alg", backSurface, 1); - lleva_al_hare(40, 169); - lleva_al_hare(-14, 175); + gotoObject(40, 169); + gotoObject(-14, 175); doBreak = 1; previousMusic = roomMusic; hare_se_ve = 1; clearRoom(); - sentido_hare = 1; + trackProtagonist = 1; characterMoved = 0; curX = -1; objExit = 104; @@ -1823,7 +1823,7 @@ void DrasculaEngine::animation_13_5() { break; if (frame == 7) { frame = 0; - sentido_hare = 3; + trackProtagonist = 3; } pause(6); } @@ -1836,16 +1836,16 @@ void DrasculaEngine::animation_14_5() { updateScreen(0, 0, 0,0 , 320, 200, screenSurface); finishSound(); pause(17); - sentido_hare = 3; + trackProtagonist = 3; talk(246); - lleva_al_hare(89, 160); + gotoObject(89, 160); flags[10] = 1; playSound(7); updateRoom(); updateScreen(); finishSound(); pause(14); - sentido_hare = 3; + trackProtagonist = 3; updateRoom(); updateScreen(); talk_solo(_textd[_lang][18], "d18.als"); @@ -1871,7 +1871,7 @@ void DrasculaEngine::animation_17_5() { void DrasculaEngine::animation_1_6() { int l; - sentido_hare = 0; + trackProtagonist = 0; curX = 103; curY = 108; flags[0] = 1; @@ -1933,7 +1933,7 @@ void DrasculaEngine::animation_1_6() { talk_drascula(33, 1); talk_igor(12, kIgorFront); talk_drascula(34, 1); - sentido_dr = 0; + trackDrascula = 0; talk_drascula(35); if (_lang == kSpanish) @@ -1998,10 +1998,10 @@ void DrasculaEngine::animation_6_6() { withoutVerb(); carga_escoba("58.ald"); hare_se_ve = 1; - sentido_hare = 1; + trackProtagonist = 1; animate("hbp.bin", 14); - sentido_hare = 3; + trackProtagonist = 3; flags[0] = 1; flags[1] = 0; flags[2] = 1; @@ -2034,14 +2034,14 @@ void DrasculaEngine::animation_9_6() { roomNumber = -1; loadPic("nota2.alg", drawSurface1, HALF_PAL); black(); - sentido_hare = 1; + trackProtagonist = 1; curX -= 21; updateRoom(); updateScreen(); fadeFromBlack(0); pause(96); - lleva_al_hare(116, 178); - sentido_hare = 2; + gotoObject(116, 178); + trackProtagonist = 2; updateRoom(); updateScreen(); playMusic(9); @@ -2053,14 +2053,14 @@ void DrasculaEngine::animation_9_6() { talk_solo(_textbj[_lang][26], "bj26.als"); talk_solo(_textbj[_lang][27], "bj27.als"); talk_solo(_textbj[_lang][28], "bj28.als"); - sentido_hare = 3; + trackProtagonist = 3; clearRoom(); loadPic("96.alg", frontSurface, COMPLETE_PAL); loadPic("nota2.alg", drawSurface1, HALF_PAL); talk(296); talk(297); talk(298); - sentido_hare = 1; + trackProtagonist = 1; talk(299); talk(300); updateRoom(); @@ -2069,7 +2069,7 @@ void DrasculaEngine::animation_9_6() { color_abc(kColorLightGreen); talk_solo("GOOOOOOOOOOOOOOOL", "s15.als"); loadPic("nota2.alg", drawSurface1, 1); - sentido_hare = 0; + trackProtagonist = 0; updateRoom(); updateScreen(); talk(301); @@ -2299,12 +2299,12 @@ void DrasculaEngine::animation_18_2() { void DrasculaEngine::animation_22_2() { talk(374); - sentido_hare=2; + trackProtagonist=2; updateRoom(); updateScreen(); playSound(13); finishSound(); - sentido_hare = 1; + trackProtagonist = 1; talk_vbpuerta(1); talk(375); @@ -2317,11 +2317,11 @@ void DrasculaEngine::animation_22_2() { void DrasculaEngine::animation_24_2() { if (curX < 178) - lleva_al_hare(208, 136); - sentido_hare = 3; + gotoObject(208, 136); + trackProtagonist = 3; updateRoom(); pause(3); - sentido_hare = 0; + trackProtagonist = 0; talk(356); @@ -2341,8 +2341,8 @@ void DrasculaEngine::animation_24_2() { exitRoom(0); flags[21] = 0; flags[24] = 0; - sentido_vb = 1; - vb_x = 120; + trackVB = 1; + vbX = 120; } void DrasculaEngine::animation_32_2() { @@ -2367,7 +2367,7 @@ void DrasculaEngine::animation_32_2() { } void DrasculaEngine::animation_34_2() { - sentido_hare = 1; + trackProtagonist = 1; updateRoom(); updateScreen(); @@ -2470,7 +2470,7 @@ void DrasculaEngine::animation_7_2() { } void DrasculaEngine::animation_5_2() { - sentido_hare = 0; + trackProtagonist = 0; updateRoom(); updateScreen(); @@ -2664,10 +2664,10 @@ void DrasculaEngine::animation_1_4() { } void DrasculaEngine::animation_5_4(){ - sentido_hare = 3; + trackProtagonist = 3; loadPic("anh_dr.alg", backSurface, 1); - lleva_al_hare(99, 160); - lleva_al_hare(38, 177); + gotoObject(99, 160); + gotoObject(38, 177); hare_se_ve = 0; updateRoom(); updateScreen(); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index ce3cbcc8f6..5bbad2c531 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -118,7 +118,7 @@ int DrasculaEngine::go() { takeObject = 0; menuBar = 0; menuScreen = 0; hasName = 0; frame_y = 0; - curX = -1; characterMoved = 0; sentido_hare = 3; num_frame = 0; hare_se_ve = 1; + curX = -1; characterMoved = 0; trackProtagonist = 3; num_frame = 0; hare_se_ve = 1; checkFlags = 1; doBreak = 0; walkToObject = 0; @@ -129,14 +129,14 @@ int DrasculaEngine::go() { conta_blind_vez = 0; changeColor = 0; breakOut = 0; - vb_x = 120; sentido_vb = 1; vb_se_mueve = 0; frame_vb = 1; + vbX = 120; trackVB = 1; vbHasMoved = 0; frame_vb = 1; frame_piano = 0; frame_drunk = 0; frame_candles = 0; cont_sv = 0; term_int = 0; musicStopped = 0; - hay_seleccion = 0; + selectionMade = 0; UsingMem = 0; globalSpeed = 0; frame_blind = 0; @@ -149,7 +149,7 @@ int DrasculaEngine::go() { hay_sb = 1; withVoices = 0; - hay_seleccion = 0; + selectionMade = 0; if (currentChapter != 6) { loadPic("95.alg", tableSurface, 1); @@ -181,7 +181,7 @@ int DrasculaEngine::go() { loadPic("99.alg", backSurface, 1); } else if (currentChapter == 6) { igorX = 105, igorY = 85, sentido_igor = 1; - x_dr = 62, y_dr = 99, sentido_dr = 1; + x_dr = 62, y_dr = 99, trackDrascula = 1; frame_pen = 0; flag_tv = 0; @@ -468,7 +468,7 @@ bool DrasculaEngine::escoba() { withoutVerb(); loadPic("2aux62.alg", drawSurface2, 1); - sentido_hare = 1; + trackProtagonist = 1; objExit = 104; if (hay_que_load != 0) { if (!para_cargar(saveName)) { @@ -478,11 +478,11 @@ bool DrasculaEngine::escoba() { carga_escoba("62.ald"); curX = -20; curY = 56; - lleva_al_hare(65, 145); + gotoObject(65, 145); } } else if (currentChapter == 2) { addObject(28); - sentido_hare = 3; + trackProtagonist = 3; objExit = 162; if (hay_que_load == 0) carga_escoba("14.ald"); @@ -500,7 +500,7 @@ bool DrasculaEngine::escoba() { addObject(20); addObject(19); flags[1] = 1; - sentido_hare = 1; + trackProtagonist = 1; objExit = 99; if (hay_que_load == 0) carga_escoba("20.ald"); @@ -517,7 +517,7 @@ bool DrasculaEngine::escoba() { objExit = 100; if (hay_que_load == 0) { carga_escoba("21.ald"); - sentido_hare = 0; + trackProtagonist = 0; curX = 235; curY = 164; } else { @@ -535,7 +535,7 @@ bool DrasculaEngine::escoba() { addObject(15); addObject(17); addObject(20); - sentido_hare = 1; + trackProtagonist = 1; objExit = 100; if (hay_que_load == 0) { carga_escoba("45.ald"); @@ -548,7 +548,7 @@ bool DrasculaEngine::escoba() { addObject(28); addObject(9); - sentido_hare = 1; + trackProtagonist = 1; objExit = 104; if (hay_que_load == 0) { carga_escoba("58.ald"); @@ -567,7 +567,7 @@ bool DrasculaEngine::escoba() { stepY = STEP_Y; } if (characterMoved == 0 && walkToObject == 1) { - sentido_hare = sentido_final; + trackProtagonist = trackFinal; walkToObject = 0; } @@ -575,9 +575,9 @@ bool DrasculaEngine::escoba() { if (roomNumber == 3 && (curX == 279) && (curY + curHeight == 101)) animation_1_2(); else if (roomNumber == 14 && (curX == 214) && (curY + curHeight == 121)) - lleva_al_hare(190, 130); + gotoObject(190, 130); else if (roomNumber == 14 && (curX == 246) && (curY + curHeight == 112)) - lleva_al_hare(190, 130); + gotoObject(190, 130); } moveCursor(); @@ -611,8 +611,8 @@ bool DrasculaEngine::escoba() { if (button_dch == 1 && menuScreen == 0) { delay(100); characterMoved = 0; - if (sentido_hare == 2) - sentido_hare = 1; + if (trackProtagonist == 2) + trackProtagonist = 1; if (currentChapter == 4) loadPic("icons2.alg", backSurface, 1); else if (currentChapter == 5) @@ -826,8 +826,8 @@ void DrasculaEngine::getStringFromLine(char *buf, int len, char* result) { sscanf(buf, "%s", result); } -void DrasculaEngine::carga_escoba(const char *nom_fich) { - int soc, l, martin = 0, obj_salir = 0; +void DrasculaEngine::carga_escoba(const char *fileName) { + int soc, l, martin = 0, objIsExit = 0; float chiquez = 0, pequegnez = 0; char pant1[20], pant2[20], pant3[20], pant4[20]; char para_codificar[20]; @@ -835,12 +835,12 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { hasName = 0; - strcpy(para_codificar, nom_fich); - strcpy(currentData, nom_fich); + strcpy(para_codificar, fileName); + strcpy(currentData, fileName); - _arj.open(nom_fich); + _arj.open(fileName); if (!_arj.isOpen()) { - error("missing data file %s", nom_fich); + error("missing data file %s", fileName); } int size = _arj.size(); @@ -876,9 +876,9 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { getIntFromLine(buffer, size, &y1[l]); getIntFromLine(buffer, size, &x2[l]); getIntFromLine(buffer, size, &y2[l]); - getIntFromLine(buffer, size, &sitiobj_x[l]); - getIntFromLine(buffer, size, &sitiobj_y[l]); - getIntFromLine(buffer, size, &sentidobj[l]); + getIntFromLine(buffer, size, &roomObjX[l]); + getIntFromLine(buffer, size, &roomObjY[l]); + getIntFromLine(buffer, size, &trackObj[l]); getIntFromLine(buffer, size, &visible[l]); getIntFromLine(buffer, size, &isDoor[l]); if (isDoor[l] != 0) { @@ -891,10 +891,10 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { } } - getIntFromLine(buffer, size, &suelo_x1); - getIntFromLine(buffer, size, &suelo_y1); - getIntFromLine(buffer, size, &suelo_x2); - getIntFromLine(buffer, size, &suelo_y2); + getIntFromLine(buffer, size, &floorX1); + getIntFromLine(buffer, size, &floorY1); + getIntFromLine(buffer, size, &floorX2); + getIntFromLine(buffer, size, &floorY2); if (currentChapter != 2) { getIntFromLine(buffer, size, &far); @@ -925,13 +925,13 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { for (l = 0; l < numRoomObjs; l++) { if (objectNum[l] == objExit) - obj_salir = l; + objIsExit = l; } if (currentChapter == 2) { if (curX == -1) { - curX = _destX[obj_salir]; - curY = _destY[obj_salir] - curHeight; + curX = _destX[objIsExit]; + curY = _destY[objIsExit] - curHeight; } characterMoved = 0; } @@ -958,27 +958,27 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { color_abc(kColorLightGreen); if (currentChapter != 2) { - for (l = 0; l <= suelo_y1; l++) + for (l = 0; l <= floorY1; l++) factor_red[l] = far; - for (l = suelo_y1; l <= 201; l++) + for (l = floorY1; l <= 201; l++) factor_red[l] = near; - chiquez = (float)(near - far) / (float)(suelo_y2 - suelo_y1); - for (l = suelo_y1; l <= suelo_y2; l++) { + chiquez = (float)(near - far) / (float)(floorY2 - floorY1); + for (l = floorY1; l <= floorY2; l++) { factor_red[l] = (int)(far + pequegnez); pequegnez = pequegnez + chiquez; } } if (roomNumber == 24) { - for (l = suelo_y1 - 1; l > 74; l--) { + for (l = floorY1 - 1; l > 74; l--) { factor_red[l] = (int)(far - pequegnez); pequegnez = pequegnez + chiquez; } } if (currentChapter == 5 && roomNumber == 54) { - for (l = suelo_y1 - 1; l > 84; l--) { + for (l = floorY1 - 1; l > 84; l--) { factor_red[l] = (int)(far - pequegnez); pequegnez = pequegnez + chiquez; } @@ -986,8 +986,8 @@ void DrasculaEngine::carga_escoba(const char *nom_fich) { if (currentChapter != 2) { if (curX == -1) { - curX = _destX[obj_salir]; - curY = _destY[obj_salir]; + curX = _destX[objIsExit]; + curY = _destY[objIsExit]; curHeight = (CHARACTER_HEIGHT * factor_red[curY]) / 100; curWidth = (CHARACTER_WIDTH * factor_red[curY]) / 100; curY = curY - curHeight; @@ -1061,18 +1061,18 @@ void DrasculaEngine::clearRoom() { _system->updateScreen(); } -void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { +void DrasculaEngine::gotoObject(int pointX, int pointY) { if (currentChapter == 5 || currentChapter == 6) { if (hare_se_ve == 0) { - curX = sitio_x; - curY = sitio_y; + curX = roomX; + curY = roomY; updateRoom(); updateScreen(); return; } } - sitio_x = pointX; - sitio_y = pointY; + roomX = pointX; + roomY = pointY; startWalking(); for (;;) { @@ -1084,7 +1084,7 @@ void DrasculaEngine::lleva_al_hare(int pointX, int pointY) { if (walkToObject == 1) { walkToObject = 0; - sentido_hare = sentido_final; + trackProtagonist = trackFinal; } updateRoom(); updateScreen(); @@ -1188,9 +1188,9 @@ bool DrasculaEngine::verify1() { for (l = 0; l < numRoomObjs; l++) { if (mouseX > x1[l] && mouseY > y1[l] && mouseX < x2[l] && mouseY < y2[l] && doBreak == 0) { - sitio_x = sitiobj_x[l]; - sitio_y = sitiobj_y[l]; - sentido_final = sentidobj[l]; + roomX = roomObjX[l]; + roomY = roomObjY[l]; + trackFinal = trackObj[l]; doBreak = 1; walkToObject = 1; startWalking(); @@ -1198,8 +1198,8 @@ bool DrasculaEngine::verify1() { } if (doBreak == 0) { - sitio_x = CLIP(mouseX, suelo_x1, suelo_x2); - sitio_y = CLIP(mouseY, suelo_y1 + feetHeight, suelo_y2); + roomX = CLIP(mouseX, floorX1, floorX2); + roomY = CLIP(mouseY, floorY1 + feetHeight, floorY2); startWalking(); } doBreak = 0; @@ -1222,9 +1222,9 @@ bool DrasculaEngine::verify2() { for (l = 0; l < numRoomObjs; l++) { if (mouseX > x1[l] && mouseY > y1[l] && mouseX < x2[l] && mouseY < y2[l] && visible[l] == 1) { - sentido_final = sentidobj[l]; + trackFinal = trackObj[l]; walkToObject = 1; - lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); + gotoObject(roomObjX[l], roomObjY[l]); if (checkFlag(objectNum[l])) return true; if (currentChapter == 4) @@ -1418,11 +1418,11 @@ bool DrasculaEngine::saves() { strcpy(select, names[n]); if (strcmp(select, "*")) - hay_seleccion = 1; + selectionMade = 1; else { enterName(); strcpy(names[n], select); - if (hay_seleccion == 1) { + if (selectionMade == 1) { snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1); para_grabar(file); Common::OutSaveFile *tsav; @@ -1444,14 +1444,14 @@ bool DrasculaEngine::saves() { print_abc(names[n2], 116, y); y = y + 9; } - if (hay_seleccion == 1) { + if (selectionMade == 1) { snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1); } num_sav = n; } } - if (mouseX > 117 && mouseY > 15 && mouseX < 295 && mouseY < 24 && hay_seleccion == 1) { + if (mouseX > 117 && mouseY > 15 && mouseX < 295 && mouseY < 24 && selectionMade == 1) { enterName(); strcpy(names[num_sav], select); print_abc(select, 117, 15); @@ -1462,11 +1462,11 @@ bool DrasculaEngine::saves() { } } - if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149 && hay_seleccion == 1) { + if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149 && selectionMade == 1) { if (!para_cargar(file)) return false; break; - } else if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149 && hay_seleccion == 1) { + } else if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149 && selectionMade == 1) { para_grabar(file); Common::OutSaveFile *tsav; if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { @@ -1480,7 +1480,7 @@ bool DrasculaEngine::saves() { delete tsav; } else if (mouseX > 168 && mouseY > 154 && mouseX < 242 && mouseY < 180) break; - else if (hay_seleccion == 0) { + else if (selectionMade == 0) { print_abc("elige una partida", 117, 15); } updateScreen(); @@ -1495,7 +1495,7 @@ bool DrasculaEngine::saves() { char rm[20]; sprintf(rm, "%i.alg", roomNumber); loadPic(rm, drawSurface1, HALF_PAL); - hay_seleccion = 0; + selectionMade = 0; return true; } @@ -1729,20 +1729,20 @@ void DrasculaEngine::fliplay(const char *filefli, int vel) { } void DrasculaEngine::fadeFromBlack(int fadeSpeed) { - char fundido; + char fade; unsigned int color, component; - DacPalette256 palFundido; + DacPalette256 palFade; - for (fundido = 0; fundido < 64; fundido++) { + for (fade = 0; fade < 64; fade++) { for (color = 0; color < 256; color++) { for (component = 0; component < 3; component++) { - palFundido[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fundido); + palFade[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fade); } } pause(fadeSpeed); - setPalette((byte *)&palFundido); + setPalette((byte *)&palFade); } } @@ -1900,25 +1900,25 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { } void DrasculaEngine::fadeToBlack(int fadeSpeed) { - char fundido; + char fade; unsigned int color, component; - DacPalette256 palFundido; + DacPalette256 palFade; - for (fundido = 63; fundido >= 0; fundido--) { + for (fade = 63; fade >= 0; fade--) { for (color = 0; color < 256; color++) { for (component = 0; component < 3; component++) { - palFundido[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fundido); + palFade[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fade); } } pause(fadeSpeed); - setPalette((byte *)&palFundido); + setPalette((byte *)&palFade); } } -void DrasculaEngine::pause(int cuanto) { - _system->delayMillis(cuanto * 30); // was originaly 2 +void DrasculaEngine::pause(int duration) { + _system->delayMillis(duration * 30); // was originaly 2 } void DrasculaEngine::placeIgor() { @@ -1944,11 +1944,11 @@ void DrasculaEngine::placeIgor() { void DrasculaEngine::placeDrascula() { int pos_dr[6]; - if (sentido_dr == 1) + if (trackDrascula == 1) pos_dr[0] = 47; - else if (sentido_dr == 0) + else if (trackDrascula == 0) pos_dr[0] = 1; - else if (sentido_dr == 3 && currentChapter == 1) + else if (trackDrascula == 3 && currentChapter == 1) pos_dr[0] = 93; pos_dr[1] = 122; pos_dr[2] = x_dr; @@ -2068,7 +2068,7 @@ bool DrasculaEngine::loadGame(const char *gameName) { sav->read(currentData, 20); curX = sav->readSint32LE(); curY = sav->readSint32LE(); - sentido_hare = sav->readSint32LE(); + trackProtagonist = sav->readSint32LE(); for (l = 1; l < 43; l++) { inventoryObjects[l] = sav->readSint32LE(); @@ -2149,13 +2149,13 @@ void DrasculaEngine::color_hare() { } void DrasculaEngine::funde_hare(int oscuridad) { - char fundido; + char fade; unsigned int color, component; - for (fundido = oscuridad; fundido >= 0; fundido--) { + for (fade = oscuridad; fade >= 0; fade--) { for (color = 235; color < 253; color++) { for (component = 0; component < 3; component++) - gamePalette[color][component] = adjustToVGA(gamePalette[color][component] - 8 + fundido); + gamePalette[color][component] = adjustToVGA(gamePalette[color][component] - 8 + fade); } } @@ -2198,26 +2198,26 @@ void DrasculaEngine::startWalking() { stepY = STEP_Y; if (currentChapter == 2) { - if ((sitio_x < curX) && (sitio_y <= (curY + curHeight))) + if ((roomX < curX) && (roomY <= (curY + curHeight))) quadrant_1(); - else if ((sitio_x < curX) && (sitio_y > (curY + curHeight))) + else if ((roomX < curX) && (roomY > (curY + curHeight))) quadrant_3(); - else if ((sitio_x > curX + curWidth) && (sitio_y <= (curY + curHeight))) + else if ((roomX > curX + curWidth) && (roomY <= (curY + curHeight))) quadrant_2(); - else if ((sitio_x > curX + curWidth) && (sitio_y > (curY + curHeight))) + else if ((roomX > curX + curWidth) && (roomY > (curY + curHeight))) quadrant_4(); - else if (sitio_y < curY + curHeight) + else if (roomY < curY + curHeight) walkUp(); - else if (sitio_y > curY + curHeight) + else if (roomY > curY + curHeight) walkDown(); } else { - if ((sitio_x < curX + curWidth / 2 ) && (sitio_y <= (curY + curHeight))) + if ((roomX < curX + curWidth / 2 ) && (roomY <= (curY + curHeight))) quadrant_1(); - else if ((sitio_x < curX + curWidth / 2) && (sitio_y > (curY + curHeight))) + else if ((roomX < curX + curWidth / 2) && (roomY > (curY + curHeight))) quadrant_3(); - else if ((sitio_x > curX + curWidth / 2) && (sitio_y <= (curY + curHeight))) + else if ((roomX > curX + curWidth / 2) && (roomY <= (curY + curHeight))) quadrant_2(); - else if ((sitio_x > curX + curWidth / 2) && (sitio_y > (curY + curHeight))) + else if ((roomX > curX + curWidth / 2) && (roomY > (curY + curHeight))) quadrant_4(); else characterMoved = 0; @@ -2226,48 +2226,48 @@ void DrasculaEngine::startWalking() { } void DrasculaEngine::pon_hare() { - int pos_hare[6]; + int curPos[6]; int r; if (characterMoved == 1 && stepX == STEP_X) { for (r = 0; r < stepX; r++) { if (currentChapter != 2) { - if (sentido_hare == 0 && sitio_x - r == curX + curWidth / 2) { + if (trackProtagonist == 0 && roomX - r == curX + curWidth / 2) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; } - if (sentido_hare == 1 && sitio_x + r == curX + curWidth / 2) { + if (trackProtagonist == 1 && roomX + r == curX + curWidth / 2) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; - curX = sitio_x - curWidth / 2; - curY = sitio_y - curHeight; + curX = roomX - curWidth / 2; + curY = roomY - curHeight; } } else if (currentChapter == 2) { - if (sentido_hare == 0 && sitio_x - r == curX) { + if (trackProtagonist == 0 && roomX - r == curX) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; } - if (sentido_hare == 1 && sitio_x + r == curX + curWidth) { + if (trackProtagonist == 1 && roomX + r == curX + curWidth) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; - curX = sitio_x - curWidth + 4; - curY = sitio_y - curHeight; + curX = roomX - curWidth + 4; + curY = roomY - curHeight; } } } } if (characterMoved == 1 && stepY == STEP_Y) { for (r = 0; r < stepY; r++) { - if (sentido_hare == 2 && sitio_y - r == curY + curHeight) { + if (trackProtagonist == 2 && roomY - r == curY + curHeight) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; } - if (sentido_hare == 3 && sitio_y + r == curY + curHeight) { + if (trackProtagonist == 3 && roomY + r == curY + curHeight) { characterMoved = 0; stepX = STEP_X; stepY = STEP_Y; @@ -2283,80 +2283,80 @@ void DrasculaEngine::pon_hare() { } if (characterMoved == 0) { - pos_hare[0] = 0; - pos_hare[1] = DIF_MASK_HARE; - pos_hare[2] = curX; - pos_hare[3] = curY; + curPos[0] = 0; + curPos[1] = DIF_MASK_HARE; + curPos[2] = curX; + curPos[3] = curY; if (currentChapter == 2) { - pos_hare[4] = curWidth; - pos_hare[5] = curHeight; + curPos[4] = curWidth; + curPos[5] = curHeight; } else { - pos_hare[4] = CHARACTER_WIDTH; - pos_hare[5] = CHARACTER_HEIGHT; + curPos[4] = CHARACTER_WIDTH; + curPos[5] = CHARACTER_HEIGHT; } - if (sentido_hare == 0) { - pos_hare[1] = 0; + if (trackProtagonist == 0) { + curPos[1] = 0; if (currentChapter == 2) - copyRectClip(pos_hare, extraSurface, screenSurface); + copyRectClip(curPos, extraSurface, screenSurface); else - reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], factor_red[curY + curHeight], extraSurface, screenSurface); - } else if (sentido_hare == 1) { + } else if (trackProtagonist == 1) { if (currentChapter == 2) - copyRectClip(pos_hare, extraSurface, screenSurface); + copyRectClip(curPos, extraSurface, screenSurface); else - reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], factor_red[curY + curHeight], extraSurface, screenSurface); - } else if (sentido_hare == 2) { + } else if (trackProtagonist == 2) { if (currentChapter == 2) - copyRectClip(pos_hare, backSurface, screenSurface); + copyRectClip(curPos, backSurface, screenSurface); else - reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], factor_red[curY + curHeight], backSurface, screenSurface); } else { if (currentChapter == 2) - copyRectClip(pos_hare, frontSurface, screenSurface); + copyRectClip(curPos, frontSurface, screenSurface); else - reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], factor_red[curY + curHeight], frontSurface, screenSurface); } } else if (characterMoved == 1) { - pos_hare[0] = frame_x[num_frame]; - pos_hare[1] = frame_y + DIF_MASK_HARE; - pos_hare[2] = curX; - pos_hare[3] = curY; + curPos[0] = frame_x[num_frame]; + curPos[1] = frame_y + DIF_MASK_HARE; + curPos[2] = curX; + curPos[3] = curY; if (currentChapter == 2) { - pos_hare[4] = curWidth; - pos_hare[5] = curHeight; + curPos[4] = curWidth; + curPos[5] = curHeight; } else { - pos_hare[4] = CHARACTER_WIDTH; - pos_hare[5] = CHARACTER_HEIGHT; + curPos[4] = CHARACTER_WIDTH; + curPos[5] = CHARACTER_HEIGHT; } - if (sentido_hare == 0) { - pos_hare[1] = 0; + if (trackProtagonist == 0) { + curPos[1] = 0; if (currentChapter == 2) - copyRectClip(pos_hare, extraSurface, screenSurface); + copyRectClip(curPos, extraSurface, screenSurface); else - reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], factor_red[curY + curHeight], extraSurface, screenSurface); - } else if (sentido_hare == 1) { + } else if (trackProtagonist == 1) { if (currentChapter == 2) - copyRectClip(pos_hare, extraSurface, screenSurface); + copyRectClip(curPos, extraSurface, screenSurface); else - reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], factor_red[curY + curHeight], extraSurface, screenSurface); - } else if (sentido_hare == 2) { + } else if (trackProtagonist == 2) { if (currentChapter == 2) - copyRectClip(pos_hare, backSurface, screenSurface); + copyRectClip(curPos, backSurface, screenSurface); else - reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], factor_red[curY + curHeight], backSurface, screenSurface); } else { if (currentChapter == 2) - copyRectClip(pos_hare, frontSurface, screenSurface); + copyRectClip(curPos, frontSurface, screenSurface); else - reduce_hare_chico(pos_hare[0], pos_hare[1], pos_hare[2], pos_hare[3], pos_hare[4], pos_hare[5], + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], factor_red[curY + curHeight], frontSurface, screenSurface); } increaseFrameNum(); @@ -2430,12 +2430,12 @@ bool DrasculaEngine::exitRoom(int l) { else { updateDoor(l); if (isDoor[l] != 0) { - lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); - sentido_hare = sentidobj[l]; + gotoObject(roomObjX[l], roomObjY[l]); + trackProtagonist = trackObj[l]; updateRoom(); updateScreen(); characterMoved = 0; - sentido_hare = sentido_alkeva[l]; + trackProtagonist = sentido_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; previousMusic = roomMusic; @@ -2454,9 +2454,9 @@ bool DrasculaEngine::exitRoom(int l) { } else if (currentChapter == 2) { updateDoor(l); if (isDoor[l] != 0) { - lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); + gotoObject(roomObjX[l], roomObjY[l]); characterMoved = 0; - sentido_hare = sentido_alkeva[l]; + trackProtagonist = sentido_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; previousMusic = roomMusic; @@ -2486,12 +2486,12 @@ bool DrasculaEngine::exitRoom(int l) { } else if (currentChapter == 3) { updateDoor(l); if (isDoor[l] != 0 && visible[l] == 1) { - lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); - sentido_hare = sentidobj[l]; + gotoObject(roomObjX[l], roomObjY[l]); + trackProtagonist = trackObj[l]; updateRoom(); updateScreen(); characterMoved = 0; - sentido_hare = sentido_alkeva[l]; + trackProtagonist = sentido_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; previousMusic = roomMusic; @@ -2504,18 +2504,18 @@ bool DrasculaEngine::exitRoom(int l) { } else if (currentChapter == 4) { updateDoor(l); if (isDoor[l] != 0) { - lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); - sentido_hare = sentidobj[l]; + gotoObject(roomObjX[l], roomObjY[l]); + trackProtagonist = trackObj[l]; updateRoom(); updateScreen(); characterMoved = 0; - sentido_hare = sentido_alkeva[l]; + trackProtagonist = sentido_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; previousMusic = roomMusic; if (objectNum[l] == 108) - lleva_al_hare(171, 78); + gotoObject(171, 78); clearRoom(); strcpy(roomExit, _targetSurface[l]); strcat(roomExit, ".ald"); @@ -2525,12 +2525,12 @@ bool DrasculaEngine::exitRoom(int l) { } else if (currentChapter == 5) { updateDoor(l); if (isDoor[l] != 0 && visible[l] == 1) { - lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); - sentido_hare = sentidobj[l]; + gotoObject(roomObjX[l], roomObjY[l]); + trackProtagonist = trackObj[l]; updateRoom(); updateScreen(); characterMoved = 0; - sentido_hare = sentido_alkeva[l]; + trackProtagonist = sentido_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; previousMusic = roomMusic; @@ -2544,12 +2544,12 @@ bool DrasculaEngine::exitRoom(int l) { } else if (currentChapter == 6) { updateDoor(l); if (isDoor[l] != 0) { - lleva_al_hare(sitiobj_x[l], sitiobj_y[l]); - sentido_hare = sentidobj[l]; + gotoObject(roomObjX[l], roomObjY[l]); + trackProtagonist = trackObj[l]; updateRoom(); updateScreen(); characterMoved = 0; - sentido_hare = sentido_alkeva[l]; + trackProtagonist = sentido_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; previousMusic = roomMusic; @@ -2655,7 +2655,7 @@ void DrasculaEngine::enterName() { } if (h == 1) { strcpy(select, select2); - hay_seleccion = 1; + selectionMade = 1; } } @@ -2923,19 +2923,19 @@ void DrasculaEngine::quadrant_1() { float distance_x, distance_y; if (currentChapter == 2) - distance_x = curX - sitio_x; + distance_x = curX - roomX; else - distance_x = curX + curWidth / 2 - sitio_x; + distance_x = curX + curWidth / 2 - roomX; - distance_y = (curY + curHeight) - sitio_y; + distance_y = (curY + curHeight) - roomY; if (distance_x < distance_y) { curDirection = 0; - sentido_hare = 2; + trackProtagonist = 2; stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { curDirection = 7; - sentido_hare = 0; + trackProtagonist = 0; stepY = (int)(distance_y / (distance_x / STEP_X)); } } @@ -2944,19 +2944,19 @@ void DrasculaEngine::quadrant_2() { float distance_x, distance_y; if (currentChapter == 2) - distance_x = abs(curX + curWidth - sitio_x); + distance_x = abs(curX + curWidth - roomX); else - distance_x = abs(curX + curWidth / 2 - sitio_x); + distance_x = abs(curX + curWidth / 2 - roomX); - distance_y = (curY + curHeight) - sitio_y; + distance_y = (curY + curHeight) - roomY; if (distance_x < distance_y) { curDirection = 1; - sentido_hare = 2; + trackProtagonist = 2; stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { curDirection = 2; - sentido_hare = 1; + trackProtagonist = 1; stepY = (int)(distance_y / (distance_x / STEP_X)); } } @@ -2965,19 +2965,19 @@ void DrasculaEngine::quadrant_3() { float distance_x, distance_y; if (currentChapter == 2) - distance_x = curX - sitio_x; + distance_x = curX - roomX; else - distance_x = curX + curWidth / 2 - sitio_x; + distance_x = curX + curWidth / 2 - roomX; - distance_y = sitio_y - (curY + curHeight); + distance_y = roomY - (curY + curHeight); if (distance_x < distance_y) { curDirection = 5; - sentido_hare = 3; + trackProtagonist = 3; stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { curDirection = 6; - sentido_hare = 0; + trackProtagonist = 0; stepY = (int)(distance_y / (distance_x / STEP_X)); } } @@ -2986,19 +2986,19 @@ void DrasculaEngine::quadrant_4() { float distance_x, distance_y; if (currentChapter == 2) - distance_x = abs(curX + curWidth - sitio_x); + distance_x = abs(curX + curWidth - roomX); else - distance_x = abs(curX + curWidth / 2 - sitio_x); + distance_x = abs(curX + curWidth / 2 - roomX); - distance_y = sitio_y - (curY + curHeight); + distance_y = roomY - (curY + curHeight); if (distance_x < distance_y) { curDirection = 4; - sentido_hare = 3; + trackProtagonist = 3; stepX = (int)(distance_x / (distance_y / STEP_Y)); } else { curDirection = 3; - sentido_hare = 1; + trackProtagonist = 1; stepY = (int)(distance_y / (distance_x / STEP_X)); } } @@ -3014,7 +3014,7 @@ void DrasculaEngine::saveGame(char gameName[]) { out->write(currentData, 20); out->writeSint32LE(curX); out->writeSint32LE(curY); - out->writeSint32LE(sentido_hare); + out->writeSint32LE(trackProtagonist); for (l = 1; l < 43; l++) { out->writeSint32LE(inventoryObjects[l]); @@ -3093,7 +3093,7 @@ bool DrasculaEngine::checkMenuFlags() { return false; } -void DrasculaEngine::converse(const char *nom_fich) { +void DrasculaEngine::converse(const char *fileName) { int h; int game1 = 1, game2 = 1, game3 = 1, game4 = 1; char phrase1[78]; @@ -3116,14 +3116,14 @@ void DrasculaEngine::converse(const char *nom_fich) { breakOut = 0; - strcpy(para_codificar, nom_fich); + strcpy(para_codificar, fileName); if (currentChapter == 5) withoutVerb(); - _arj.open(nom_fich); + _arj.open(fileName); if (!_arj.isOpen()) { - error("missing data file %s", nom_fich); + error("missing data file %s", fileName); } int size = _arj.size(); @@ -3141,19 +3141,19 @@ void DrasculaEngine::converse(const char *nom_fich) { _arj.close(); - if (currentChapter == 2 && !strcmp(nom_fich, "op_5.cal") && flags[38] == 1 && flags[33] == 1) { + if (currentChapter == 2 && !strcmp(fileName, "op_5.cal") && flags[38] == 1 && flags[33] == 1) { strcpy(phrase3, _text[_lang][405]); strcpy(sound3, "405.als"); answer3 = 31; } - if (currentChapter == 6 && !strcmp(nom_fich, "op_12.cal") && flags[7] == 1) { + if (currentChapter == 6 && !strcmp(fileName, "op_12.cal") && flags[7] == 1) { strcpy(phrase3, _text[_lang][273]); strcpy(sound3, "273.als"); answer3 = 14; } - if (currentChapter == 6 && !strcmp(nom_fich, "op_12.cal") && flags[10] == 1) { + if (currentChapter == 6 && !strcmp(fileName, "op_12.cal") && flags[10] == 1) { strcpy(phrase3, " cuanto queda para que acabe el partido?"); strcpy(sound3, "274.als"); answer3 = 15; @@ -3493,7 +3493,7 @@ void DrasculaEngine::updateVisible() { if (roomNumber == 59) isDoor[1] = 0; if (roomNumber == 60) { - sentido_dr = 0; + trackDrascula = 0; x_dr = 155; y_dr = 69; } @@ -3502,37 +3502,37 @@ void DrasculaEngine::updateVisible() { void DrasculaEngine::walkDown() { curDirection = 4; - sentido_hare = 3; + trackProtagonist = 3; stepX = 0; } void DrasculaEngine::walkUp() { curDirection = 0; - sentido_hare = 2; + trackProtagonist = 2; stepX = 0; } -void DrasculaEngine::pon_vb() { +void DrasculaEngine::moveVB() { int pos_vb[6]; - if (vb_se_mueve == 0) { + if (vbHasMoved == 0) { pos_vb[0] = 256; pos_vb[1] = 129; - pos_vb[2] = vb_x; + pos_vb[2] = vbX; pos_vb[3] = 66; pos_vb[4] = 33; pos_vb[5] = 69; - if (sentido_vb == 0) + if (trackVB == 0) pos_vb[0] = 222; - else if (sentido_vb == 1) + else if (trackVB == 1) pos_vb[0] = 188; } else { - pos_vb[2] = vb_x; + pos_vb[2] = vbX; pos_vb[3] = 66; pos_vb[4] = 28; pos_vb[5] = 68; - if (sentido_vb == 0) { + if (trackVB == 0) { pos_vb[0] = frame_vb; pos_vb[1] = 62; } else { @@ -3549,25 +3549,25 @@ void DrasculaEngine::pon_vb() { } void DrasculaEngine::lleva_vb(int pointX) { - sentido_vb = (pointX < vb_x) ? 0 : 1; - vb_se_mueve = 1; + trackVB = (pointX < vbX) ? 0 : 1; + vbHasMoved = 1; for (;;) { updateRoom(); updateScreen(); - if (sentido_vb == 0) { - vb_x = vb_x - 5; - if (vb_x <= pointX) + if (trackVB == 0) { + vbX = vbX - 5; + if (vbX <= pointX) break; } else { - vb_x = vb_x + 5; - if (vb_x >= pointX) + vbX = vbX + 5; + if (vbX >= pointX) break; } pause(5); } - vb_se_mueve = 0; + vbHasMoved = 0; } void DrasculaEngine::hipo_sin_nadie(int counter){ diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 27472521bf..f52f84184b 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -242,7 +242,7 @@ public: char iconName[44][13]; int objectNum[40], visible[40], isDoor[40]; - int sitiobj_x[40], sitiobj_y[40], sentidobj[40]; + int roomObjX[40], roomObjY[40], trackObj[40]; int inventoryObjects[43]; char _targetSurface[40][20]; int _destX[40], _destY[40], sentido_alkeva[40], alapuertakeva[40]; @@ -260,22 +260,22 @@ public: int flags[NUM_FLAGS]; int frame_y; - int curX, curY, characterMoved, curDirection, sentido_hare, num_frame, hare_se_ve; - int sitio_x, sitio_y, checkFlags; + int curX, curY, characterMoved, curDirection, trackProtagonist, num_frame, hare_se_ve; + int roomX, roomY, checkFlags; int doBreak; int stepX, stepY; int curHeight, curWidth, feetHeight; int talkHeight, talkWidth; - int suelo_x1, suelo_y1, suelo_x2, suelo_y2; + int floorX1, floorY1, floorX2, floorY2; int near, far; - int sentido_final, walkToObject; + int trackFinal, walkToObject; int objExit; int timeDiff, startTime; int hasAnswer; int conta_blind_vez; int changeColor; int breakOut; - int vb_x, sentido_vb, vb_se_mueve, frame_vb; + int vbX, trackVB, vbHasMoved, frame_vb; float newHeight, newWidth; int factor_red[202]; int frame_piano; @@ -284,7 +284,7 @@ public: int color_solo; int blinking; int igorX, igorY, sentido_igor; - int x_dr, y_dr, sentido_dr; + int x_dr, y_dr, trackDrascula; int x_bj, y_bj, sentido_bj; int cont_sv; int term_int; @@ -294,7 +294,7 @@ public: int _color; int musicStopped; char select[23]; - int hay_seleccion; + int selectionMade; int mouseX; int mouseY; int mouseY_ant; @@ -306,7 +306,7 @@ public: void pickObject(int); void walkUp(); void walkDown(); - void pon_vb(); + void moveVB(); void lleva_vb(int pointX); void hipo_sin_nadie(int counter); void openDoor(int nflag, int doorNum); @@ -396,7 +396,7 @@ public: bool para_cargar(char[]); void carga_escoba(const char *); void clearRoom(); - void lleva_al_hare(int, int); + void gotoObject(int, int); void moveCursor(); void checkObjects(); void selectVerbFromBar(); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 052c5c3da0..6a8c87f8b6 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -281,7 +281,7 @@ void DrasculaEngine::room_12(int fl){ bool DrasculaEngine::room_13(int fl) { if (pickedObject == kVerbLook && fl == 51) { talk(411); - sentido_hare = 3; + trackProtagonist = 3; talk(412); strcpy(objName[1], "yoda"); } else if (pickedObject == kVerbTalk && fl == 51) @@ -325,10 +325,10 @@ void DrasculaEngine::room_15(int fl) { talk(335); else if (pickedObject == 19 && fl == 188 && flags[27] == 1) { talk(336); - sentido_hare = 3; + trackProtagonist = 3; talk(337); talk_sinc(_text[_lang][46], "46.als", "4442444244244"); - sentido_hare = 1; + trackProtagonist = 1; } else if (pickedObject == 18 && fl == 188 && flags[26] == 0) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); copyRect(133, 135, curX + 6, curY, 39, 63, drawSurface3, screenSurface); @@ -378,7 +378,7 @@ void DrasculaEngine::room_16(int fl) { openDoor(19, NO_DOOR); if (flags[20] == 0) { flags[20] = 1; - sentido_hare = 3; + trackProtagonist = 3; updateRoom(); updateScreen(); talk(342); @@ -396,7 +396,7 @@ void DrasculaEngine::room_16(int fl) { talk(38); else if (pickedObject == kVerbLook && fl == 187) { talk(343); - sentido_hare = 3; + trackProtagonist = 3; updateRoom(); updateScreen(); talk(344); @@ -459,7 +459,7 @@ void DrasculaEngine::room_18(int fl) { animation_24_2(); } else if (pickedObject == 11 && fl == 50 && flags[22] == 0) { - sentido_hare = 3; + trackProtagonist = 3; updateRoom(); updateScreen(); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -523,7 +523,7 @@ void DrasculaEngine::room_22(int fl) { withoutVerb(); removeObject(22); updateVisible(); - sentido_hare = 3; + trackProtagonist = 3; talk(499); talk(500); } else if (pickedObject == kVerbLook && fl == 52) @@ -594,23 +594,23 @@ void DrasculaEngine::room_26(int fl) { else if (pickedObject == 16 && fl == 50 && flags[18] == 1 && flags[12] == 1) animation_5_4(); else if (pickedObject == kVerbPick && fl == 143 && flags[18] == 1) { - lleva_al_hare(260, 180); + gotoObject(260, 180); pickObject(10); visible[1] = 0; flags[12] = 1; closeDoor(2, 0); - sentido_hare = 2; + trackProtagonist = 2; talk_igor(27, kIgorDoor); flags[30] = 1; talk_igor(28, kIgorDoor); - lleva_al_hare(153, 180); + gotoObject(153, 180); } else if (pickedObject == kVerbPick && fl == 143 && flags[18] == 0) { - lleva_al_hare(260, 180); + gotoObject(260, 180); copyBackground(80, 78, 199, 94, 38, 27, drawSurface3, screenSurface); updateScreen(199, 94, 199, 94, 38, 27, screenSurface); pause(3); talk_igor(25, kIgorWig); - lleva_al_hare(153, 180); + gotoObject(153, 180); } else if (pickedObject == kVerbTalk && fl == 51) animation_1_4(); else if (pickedObject == kVerbOpen && fl == 167) @@ -732,7 +732,7 @@ void DrasculaEngine::room_34(int fl) { openDoor(8, 2); else if (pickedObject == kVerbOpen && fl == 120 && flags[25] == 0) { openDoor(8, 2); - sentido_hare = 3; + trackProtagonist = 3; talk(425); pickObject(14); flags[25] = 1; @@ -875,7 +875,7 @@ void DrasculaEngine::room_55(int fl) { playSound(11); animate("det.bin", 17); finishSound(); - lleva_al_hare(curX - 3, curY + curHeight + 6); + gotoObject(curX - 3, curY + curHeight + 6); } else hasAnswer = 0; } @@ -922,8 +922,8 @@ void DrasculaEngine::room_59(int fl) { delay(40); finishSound(); delay(10); - lleva_al_hare(174, 168); - sentido_hare = 2; + gotoObject(174, 168); + trackProtagonist = 2; updateRoom(); updateScreen(); pause(40); @@ -962,7 +962,7 @@ void DrasculaEngine::room_59(int fl) { loadPic("96.alg", frontSurface, COMPLETE_PAL); loadPic("99.alg", backSurface, 1); loadPic("59.alg", drawSurface1, HALF_PAL); - sentido_hare = 3; + trackProtagonist = 3; talk(245); withoutVerb(); flags[11] = 1; @@ -1371,28 +1371,28 @@ void DrasculaEngine::update_13() { } void DrasculaEngine::update_14_pre() { - int candles_y[] = {158, 172, 186}; - int cirio_x[] = {14, 19, 24}; - int pianista_x[] = {1, 91, 61, 31, 91, 31, 1, 61, 31}; - int drunk_x[] = {1, 42, 83, 124, 165, 206, 247, 1}; + int candleY[] = {158, 172, 186}; + int candleX[] = {14, 19, 24}; + int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31}; + int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1}; int difference; - copyBackground(123, candles_y[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface); - copyBackground(cirio_x[frame_candles], 146, 311, 80, 4, 8, drawSurface3, screenSurface); + copyBackground(123, candleY[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(candleX[frame_candles], 146, 311, 80, 4, 8, drawSurface3, screenSurface); if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); if (curX > 101 && curX < 155) copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface); if (flags[11] == 0) - copyBackground(pianista_x[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface); + copyBackground(pianistX[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface); else if (flags[5] == 0) copyBackground(145, 139, 228, 112, 47, 60, extraSurface, screenSurface); else copyBackground(165, 140, 229, 117, 43, 59, drawSurface3, screenSurface); if (flags[12] == 1) - copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); + copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); difference = getTime() - conta_blind_vez; if (difference > 6) { if (flags[12] == 1) { @@ -1444,7 +1444,7 @@ void DrasculaEngine::update_18_pre() { copyBackground(1, 69, 120, 58, 56, 61, drawSurface3, screenSurface); copyBackground(snore_x[frame_snore], snore_y[frame_snore], 124, 59, 40, 37, drawSurface3, screenSurface); } else - pon_vb(); + moveVB(); difference = getTime() - conta_blind_vez; if (difference > 9) { @@ -1675,13 +1675,13 @@ void DrasculaEngine::update_59_pre() { } void DrasculaEngine::update_60_pre() { - int candles_y[] = {158, 172, 186}; + int candleY[] = {158, 172, 186}; int difference; if (flags[5] == 0) placeDrascula(); - copyBackground(123, candles_y[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(123, candleY[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface); if (flag_tv == 1) copyBackground(114, 158, 8, 30, 8, 23, drawSurface3, screenSurface); @@ -1710,14 +1710,14 @@ void DrasculaEngine::update_61() { } void DrasculaEngine::update_62_pre() { - int candles_y[] = { 158, 172, 186 }; - int cirio_x[] = { 14, 19, 24 }; - int pianista_x[] = {1, 91, 61, 31, 91, 31, 1, 61, 31 }; - int drunk_x[] = {1, 42, 83, 124, 165, 206, 247, 1 }; + int candleY[] = { 158, 172, 186 }; + int candleX[] = { 14, 19, 24 }; + int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31 }; + int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1 }; int difference; - copyBackground(123, candles_y[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface); - copyBackground(cirio_x[frame_candles], 146, 311, 80, 4, 8, drawSurface3, screenSurface); + copyBackground(123, candleY[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(candleX[frame_candles], 146, 311, 80, 4, 8, drawSurface3, screenSurface); if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); @@ -1726,14 +1726,14 @@ void DrasculaEngine::update_62_pre() { copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface); if (flags[11] == 0) - copyBackground(pianista_x[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface); + copyBackground(pianistX[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface); else if (flags[5] == 0) copyBackground(145, 139, 228, 112, 47, 60, extraSurface, screenSurface); else copyBackground(165, 140, 229, 117, 43, 59, drawSurface3, screenSurface); if (flags[12] == 1) - copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); + copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); difference = getTime() - conta_blind_vez; if (difference > 6) { @@ -1758,13 +1758,13 @@ void DrasculaEngine::update_62_pre() { } void DrasculaEngine::update_62() { - int drunk_x[] = { 1, 42, 83, 124, 165, 206, 247, 1 }; + int drunkX[] = { 1, 42, 83, 124, 165, 206, 247, 1 }; copyRect(1, 1, 0, 0, 62, 142, drawSurface2, screenSurface); if (curY + curHeight < 89) { copyRect(205, 1, 180, 9, 82, 80, drawSurface3, screenSurface); - copyBackground(drunk_x[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); + copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); } } @@ -2140,6 +2140,7 @@ bool DrasculaEngine::checkFlag(int fl) { else hasAnswer = 0; } else if (currentChapter == 5) { + // TODO: These are not translated if (pickedObject == kVerbLook && fl == 50) talk("Cuanto mas me miro, mas me gusto", "54.als"); else if (pickedObject == kVerbOpen && fl == 50) @@ -2171,17 +2172,17 @@ bool DrasculaEngine::checkFlag(int fl) { if (pickedObject == kVerbLook && fl == 50 && flags[0] == 1) talk(308); else if (pickedObject == kVerbLook && fl == 50 && flags[0] == 0) - talk(310 ); + talk(310); else if (pickedObject == kVerbOpen && fl == 50) - talk(310 ); + talk(310); else if (pickedObject == kVerbClose && fl == 50) - talk(311 ); + talk(311); else if (pickedObject == kVerbMove && fl == 50) - talk(312 ); + talk(312); else if (pickedObject == kVerbPick && fl == 50) - talk(313 ); + talk(313); else if (pickedObject == kVerbTalk && fl == 50) - talk(314 ); + talk(314); else if (roomNumber == 102) room_pendulum(fl); else if (roomNumber == 58) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 35bce21559..3cd45a3253 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -27,6 +27,9 @@ namespace Drascula { +int x_talk_dch[6] = {1, 25, 49, 73, 97, 121}; +int x_talk_izq[6] = {145, 169, 193, 217, 241, 265}; + void DrasculaEngine::talkInit(const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); @@ -348,13 +351,11 @@ void DrasculaEngine::talk(int index) { } void DrasculaEngine::talk(const char *said, const char *filename) { - int suma_1_pixel = 0; + int talkOffset = 0; if (currentChapter != 2) - suma_1_pixel = 1; + talkOffset = 1; int y_mask_talk = 170; - int x_talk_dch[6] = { 1, 25, 49, 73, 97, 121 }; - int x_talk_izq[6] = { 145, 169, 193, 217, 241, 265 }; int face; int length = strlen(said); @@ -371,7 +372,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { if (currentChapter != 2) { if (factor_red[curY + curHeight] == 100) - suma_1_pixel = 0; + talkOffset = 0; } if (currentChapter == 4) { @@ -408,7 +409,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { drawSurface3, screenSurface); } - if (sentido_hare == 0) { + if (trackProtagonist == 0) { if (currentChapter == 2) copyRect(x_talk_izq[face], y_mask_talk, curX + 8, curY - 1, talkWidth, talkHeight, extraSurface, screenSurface); @@ -418,7 +419,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { extraSurface, screenSurface); updateRefresh(); - } else if (sentido_hare == 1) { + } else if (trackProtagonist == 1) { if (currentChapter == 2) copyRect(x_talk_dch[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, extraSurface, screenSurface); @@ -426,23 +427,23 @@ void DrasculaEngine::talk(const char *said, const char *filename) { reduce_hare_chico(x_talk_dch[face], y_mask_talk, curX + (int)((12.0f / 100) * factor_red[curY + curHeight]), curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface); updateRefresh(); - } else if (sentido_hare == 2) { + } else if (trackProtagonist == 2) { if (currentChapter == 2) copyRect(x_talk_izq[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, frontSurface, screenSurface); else reduce_hare_chico(x_talk_izq[face], y_mask_talk, - suma_1_pixel + curX + (int)((12.0f / 100) * factor_red[curY + curHeight]), + talkOffset + curX + (int)((12.0f / 100) * factor_red[curY + curHeight]), curY, talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface); updateRefresh(); - } else if (sentido_hare == 3) { + } else if (trackProtagonist == 3) { if (currentChapter == 2) copyRect(x_talk_dch[face], y_mask_talk, curX + 8, curY, talkWidth, talkHeight, frontSurface, screenSurface); else reduce_hare_chico(x_talk_dch[face], y_mask_talk, - suma_1_pixel + curX + (int)((8.0f / 100) * factor_red[curY + curHeight]), + talkOffset + curX + (int)((8.0f / 100) * factor_red[curY + curHeight]), curY, talkWidth,talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface); updateRefresh(); @@ -572,23 +573,23 @@ void DrasculaEngine::talk_vb(int index) { talkInit(filename); - copyBackground(vb_x + 5, 64, OBJWIDTH + 1, 0, 25, 27, drawSurface1, drawSurface3); + copyBackground(vbX + 5, 64, OBJWIDTH + 1, 0, 25, 27, drawSurface1, drawSurface3); do { - if (sentido_vb == 1) { + if (trackVB == 1) { face = _rnd->getRandomNumber(5); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); pon_hare(); - pon_vb(); + moveVB(); - copyBackground(OBJWIDTH + 1, 0, vb_x + 5, 64, 25, 27, drawSurface3, screenSurface); - copyRect(x_talk[face], 34, vb_x + 5, 64, 25, 27, frontSurface, screenSurface); + copyBackground(OBJWIDTH + 1, 0, vbX + 5, 64, 25, 27, drawSurface3, screenSurface); + copyRect(x_talk[face], 34, vbX + 5, 64, 25, 27, frontSurface, screenSurface); updateRefresh(); } if (withVoices == 0) - centerText(said, vb_x, 66); + centerText(said, vbX, 66); updateScreen(); @@ -633,7 +634,7 @@ void DrasculaEngine::talk_blind(int index) { char filename[20]; sprintf(filename, "d%i.als", index + TEXTD_START - 1); const char *said = _textd[_lang][index + TEXTD_START - 1]; - const char *sincronia = _textd1[_lang][index - 1]; + const char *syncChar = _textd1[_lang][index - 1]; byte *faceBuffer; int p = 0; @@ -656,7 +657,7 @@ void DrasculaEngine::talk_blind(int index) { do { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); pos_blind[5] = 149; - char c = toupper(sincronia[p]); + char c = toupper(syncChar[p]); if (c == '0' || c == '2' || c == '4' || c == '6') pos_blind[0] = 1; @@ -900,11 +901,9 @@ void DrasculaEngine::talk_htel(int index) { updateScreen(); } -void DrasculaEngine::talk_sinc(const char *said, const char *filename, const char *sincronia) { - int suma_1_pixel = 1; +void DrasculaEngine::talk_sinc(const char *said, const char *filename, const char *syncChar) { + int talkOffset = 1; int y_mask_talk = 170; - int x_talk_dch[6] = {1, 25, 49, 73, 97, 121}; - int x_talk_izq[6] = {145, 169, 193, 217, 241, 265}; int p, face = 0; int length = strlen(said); @@ -912,7 +911,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha if (currentChapter == 1) { if (factor_red[curY + curHeight] == 100) - suma_1_pixel = 0; + talkOffset = 0; } p = 0; @@ -920,7 +919,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha talkInit(filename); do { - face = atoi(&sincronia[p]); + face = atoi(&syncChar[p]); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -938,34 +937,34 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha copyBackground(OBJWIDTH + 1, 0, curX, curY, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]), (int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), drawSurface3, screenSurface); - if (sentido_hare == 0) { + if (trackProtagonist == 0) { if (currentChapter == 2) copyRect(x_talk_izq[face], y_mask_talk, curX + 8, curY - 1, talkWidth, talkHeight, extraSurface, screenSurface); else reduce_hare_chico(x_talk_izq[face], y_mask_talk, (int)(curX + (8.0f / 100) * factor_red[curY + curHeight]), curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface); updateRefresh(); - } else if (sentido_hare == 1) { + } else if (trackProtagonist == 1) { if (currentChapter == 2) copyRect(x_talk_dch[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, extraSurface, screenSurface); else reduce_hare_chico(x_talk_dch[face], y_mask_talk, (int)(curX + (12.0f / 100) * factor_red[curY + curHeight]), curY, talkWidth, talkHeight, factor_red[curY + curHeight], extraSurface, screenSurface); updateRefresh(); - } else if (sentido_hare == 2) { + } else if (trackProtagonist == 2) { if (currentChapter == 2) copyRect(x_talk_izq[face], y_mask_talk, curX + 12, curY, talkWidth, talkHeight, frontSurface, screenSurface); else reduce_hare_chico(x_talk_izq[face], y_mask_talk, - (int)(suma_1_pixel + curX + (12.0f / 100) * factor_red[curY + curHeight]), curY, + (int)(talkOffset + curX + (12.0f / 100) * factor_red[curY + curHeight]), curY, talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface); updateRefresh(); - } else if (sentido_hare == 3) { + } else if (trackProtagonist == 3) { if (currentChapter == 2) copyRect(x_talk_dch[face], y_mask_talk, curX + 8, curY, talkWidth, talkHeight, frontSurface, screenSurface); else reduce_hare_chico(x_talk_dch[face], y_mask_talk, - (int)(suma_1_pixel + curX + (8.0f / 100) * factor_red[curY + curHeight]), curY, + (int)(talkOffset + curX + (8.0f / 100) * factor_red[curY + curHeight]), curY, talkWidth, talkHeight, factor_red[curY + curHeight], frontSurface, screenSurface); updateRefresh(); } -- cgit v1.2.3 From 6673bf512e4b5bf8401af1bfaecb61755571cfb6 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 3 Jun 2008 09:23:56 +0000 Subject: Reordered and grouped function definitions svn-id: r32513 --- engines/drascula/drascula.h | 249 +++++++++++++++++++++++--------------------- 1 file changed, 128 insertions(+), 121 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index f52f84184b..ba43c9895c 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -311,87 +311,9 @@ public: void hipo_sin_nadie(int counter); void openDoor(int nflag, int doorNum); void showMap(); - void animation_1_1(); - void animation_2_1(); - void animation_1_2(); - void animation_2_2(); - void animation_3_1(); - void animation_4_1(); - void animation_3_2(); - void animation_4_2(); - void animation_5_2(); - void animation_6_2(); - void animation_7_2(); - void animation_8_2(); - void animation_9_2(); - void animation_10_2(); - void animation_11_2(); - void animation_12_2(); - void animation_13_2(); - void animation_14_2(); - void animation_15_2(); - void animation_16_2(); - void animation_17_2(); - void animation_18_2(); - void animation_19_2(); - void animation_20_2(); - void animation_21_2(); - void animation_22_2(); - void animation_23_2(); - void animation_23_joined(); - void animation_23_joined2(); - void animation_24_2(); - void animation_25_2(); - void animation_26_2(); - void animation_27_2(); - void animation_28_2(); - void animation_29_2(); - void animation_30_2(); - void animation_31_2(); - void animation_32_2(); - void animation_33_2(); - void animation_34_2(); - void animation_35_2(); - void animation_36_2(); - void update_1_pre(); - void update_2(); - void update_3(); - void update_3_pre(); - void update_4(); - void update_5(); - void update_5_pre(); - void update_6_pre(); - void update_7_pre(); - void update_9_pre(); - void update_12_pre(); - void update_14_pre(); - void update_15(); - void update_16_pre(); - void update_17_pre(); - void update_17(); - void update_18_pre(); - void update_18(); - void update_21_pre(); - void update_22_pre(); - void update_23_pre(); - void update_24_pre(); - void update_26_pre(); - void update_26(); - void update_27(); - void update_27_pre(); - void update_29(); - void update_29_pre(); - void update_30_pre(); - void update_31_pre(); - void update_34_pre(); - void update_35_pre(); - void update_31(); - void update_34(); - void update_35(); void hare_oscuro(); - void withoutVerb(); bool para_cargar(char[]); void carga_escoba(const char *); @@ -516,14 +438,29 @@ public: void quadrant_2(); void quadrant_3(); void quadrant_4(); - void update_62(); - void update_62_pre(); - void update_63(); void saveGame(char[]); void increaseFrameNum(); int whichObject(); bool checkMenuFlags(); bool roomParse(RoomTalkAction*, int); + void converse(const char *); + void print_abc_opc(const char *, int, int, int); + void response(int); + void room_pendulum(int); + void update_pendulum(); + void activatePendulum(); + + void MusicFadeout(); + void playFile(const char *fname); + + char *getLine(char *buf, int len); + void getIntFromLine(char *buf, int len, int* result); + void getStringFromLine(char *buf, int len, char* result); + + void grr(); + void updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delayVal = 3); + void updateAnim2(int y, int px, int py, int width, int height, int count, byte* src); + void room_0(); void room_1(int); void room_2(int); @@ -535,6 +472,7 @@ public: void room_8(int); void room_9(int); void room_12(int); + bool room_13(int fl); void room_14(int); void room_15(int); void room_16(int); @@ -553,25 +491,62 @@ public: void room_34(int); void room_35(int); void room_44(int); + void room_49(int); + void room_53(int); + void room_54(int); + void room_55(int); + bool room_56(int); + void room_58(int); + void room_59(int); + bool room_60(int); + void room_61(int); void room_62(int); void room_63(int); - void converse(const char *); - void print_abc_opc(const char *, int, int, int); - void response(int); - - void MusicFadeout(); - void playFile(const char *fname); - char *getLine(char *buf, int len); - void getIntFromLine(char *buf, int len, int* result); - void getStringFromLine(char *buf, int len, char* result); - - void grr(); - bool room_13(int fl); - void update_13(); - void update_20(); - void updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delayVal = 3); - void updateAnim2(int y, int px, int py, int width, int height, int count, byte* src); + void animation_1_1(); + void animation_2_1(); + void animation_3_1(); + void animation_4_1(); + // + void animation_1_2(); + void animation_2_2(); + void animation_3_2(); + void animation_4_2(); + void animation_5_2(); + void animation_6_2(); + void animation_7_2(); + void animation_8_2(); + void animation_9_2(); + void animation_10_2(); + void animation_11_2(); + void animation_12_2(); + void animation_13_2(); + void animation_14_2(); + void animation_15_2(); + void animation_16_2(); + void animation_17_2(); + void animation_18_2(); + void animation_19_2(); + void animation_20_2(); + void animation_21_2(); + void animation_22_2(); + void animation_23_2(); + void animation_23_joined(); + void animation_23_joined2(); + void animation_24_2(); + void animation_25_2(); + void animation_26_2(); + void animation_27_2(); + void animation_28_2(); + void animation_29_2(); + void animation_30_2(); + void animation_31_2(); + void animation_32_2(); + void animation_33_2(); + void animation_34_2(); + void animation_35_2(); + void animation_36_2(); + // void animation_1_3(); void animation_2_3(); void animation_3_3(); @@ -579,6 +554,7 @@ public: void animation_5_3(); void animation_6_3(); void animation_rayo(); + // void animation_1_4(); void animation_2_4(); void animation_3_4(); @@ -588,6 +564,7 @@ public: void animation_7_4(); void animation_8_4(); void animation_9_4(); + // void animation_1_5(); void animation_2_5(); void animation_3_5(); @@ -605,29 +582,7 @@ public: void animation_15_5(); void animation_16_5(); void animation_17_5(); - void room_49(int); - void room_53(int); - void room_54(int); - void room_55(int); - bool room_56(int); - void update_53_pre(); - void update_54_pre(); - void update_49_pre(); - void update_56_pre(); - void update_50(); - void update_57(); - void room_58(int); - void room_59(int); - bool room_60(int); - void room_61(int); - void room_pendulum(int); - void update_pendulum(); - void update_58(); - void update_58_pre(); - void update_59_pre(); - void update_60_pre(); - void update_60(); - void update_61(); + // void animation_1_6(); void animation_2_6(); void animation_3_6(); @@ -644,7 +599,59 @@ public: void animation_15_6(); void animation_18_6(); void animation_19_6(); - void activatePendulum(); + + void update_1_pre(); + void update_2(); + void update_3(); + void update_3_pre(); + void update_4(); + void update_5(); + void update_5_pre(); + void update_6_pre(); + void update_7_pre(); + void update_9_pre(); + void update_12_pre(); + void update_14_pre(); + void update_13(); + void update_15(); + void update_16_pre(); + void update_17_pre(); + void update_17(); + void update_18_pre(); + void update_18(); + void update_20(); + void update_21_pre(); + void update_22_pre(); + void update_23_pre(); + void update_24_pre(); + void update_26_pre(); + void update_26(); + void update_27(); + void update_27_pre(); + void update_29(); + void update_29_pre(); + void update_30_pre(); + void update_31_pre(); + void update_34_pre(); + void update_35_pre(); + void update_31(); + void update_34(); + void update_35(); + void update_53_pre(); + void update_54_pre(); + void update_49_pre(); + void update_56_pre(); + void update_50(); + void update_57(); + void update_58(); + void update_58_pre(); + void update_59_pre(); + void update_60_pre(); + void update_60(); + void update_61(); + void update_62(); + void update_62_pre(); + void update_63(); private: int _lang; -- cgit v1.2.3 From 3be34f071fc56275d37f9467dcf72389c1711474 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Tue, 3 Jun 2008 18:12:21 +0000 Subject: Added support for compressed kyra3 audio files. svn-id: r32516 --- engines/kyra/kyra_mr.cpp | 8 +- engines/kyra/resource.cpp | 43 ++++++++++- engines/kyra/resource.h | 4 + engines/kyra/sound.cpp | 12 +-- engines/kyra/sound.h | 17 ++++- engines/kyra/sound_digital.cpp | 164 +++++++++++++++++++++++++++++------------ 6 files changed, 187 insertions(+), 61 deletions(-) diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp index c842e318ec..8a49b8e155 100644 --- a/engines/kyra/kyra_mr.cpp +++ b/engines/kyra/kyra_mr.cpp @@ -59,7 +59,7 @@ const KyraEngine_v2::EngineDesc KyraEngine_MR::_mrEngineDesc = { KyraEngine_MR::KyraEngine_MR(OSystem *system, const GameFlags &flags) : KyraEngine_v2(system, flags, _mrEngineDesc) { _soundDigital = 0; _musicSoundChannel = -1; - _menuAudioFile = "TITLE1.AUD"; + _menuAudioFile = "TITLE1"; _lastMusicCommand = -1; _itemBuffer1 = _itemBuffer2 = 0; _scoreFile = 0; @@ -425,7 +425,7 @@ void KyraEngine_MR::snd_playWanderScoreViaMap(int track, int force) { assert(track < _soundListSize && track >= 0); char file[13]; - sprintf(file, "%s.AUD", _soundList[track]); + sprintf(file, "%s", _soundList[track]); _musicSoundChannel = _soundDigital->playSound(file, 0xFF, Audio::Mixer::kMusicSoundType); } @@ -483,7 +483,7 @@ void KyraEngine_MR::snd_playSoundEffect(int item, int volume) { if (_sfxFileMap[item*2+0] != 0xFF) { char filename[16]; assert(_sfxFileMap[item*2+0] < _sfxFileListSize); - snprintf(filename, 16, "%s.AUD", _sfxFileList[_sfxFileMap[item*2+0]]); + snprintf(filename, 16, "%s", _sfxFileList[_sfxFileMap[item*2+0]]); uint8 priority = _sfxFileMap[item*2+1]; _soundDigital->playSound(filename, priority, Audio::Mixer::kSFXSoundType, volume); @@ -498,7 +498,7 @@ void KyraEngine_MR::playVoice(int high, int low) { void KyraEngine_MR::snd_playVoiceFile(int file) { debugC(9, kDebugLevelMain, "KyraEngine_MR::snd_playVoiceFile(%d)", file); char filename[16]; - snprintf(filename, 16, "%u.AUD", (uint)file); + snprintf(filename, 16, "%.08u", (uint)file); _voiceSoundChannel = _soundDigital->playSound(filename, 0xFE, Audio::Mixer::kSpeechSoundType, 255); } diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 46c73c9d3b..01702f08b3 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -543,6 +543,20 @@ bool ResLoaderPak::isLoadable(const Common::String &filename, Common::SeekableRe return true; } +namespace { + +Common::String readString(Common::SeekableReadStream &stream) { + Common::String result; + char c = 0; + + while ((c = stream.readByte()) != 0) + result += c; + + return result; +} + +} // end of anonymous namespace + bool ResLoaderPak::loadFile(const Common::String &filename, Common::SeekableReadStream &stream, FileList &files) const { uint32 filesize = stream.size(); @@ -610,6 +624,33 @@ bool ResLoaderPak::loadFile(const Common::String &filename, Common::SeekableRead startoffset = endoffset; } + FileList::const_iterator iter = Common::find(files.begin(), files.end(), Common::String("LINKLIST")); + if (iter != files.end()) { + stream.seek(iter->entry.offset, SEEK_SET); + + uint32 magic = stream.readUint32BE(); + + if (magic != MKID_BE('SCVM')) + error("LINKLIST file does not contain 'SCVM' header"); + + uint32 links = stream.readUint32BE(); + for (uint i = 0; i < links; ++i) { + Common::String linksTo = readString(stream); + uint32 sources = stream.readUint32BE(); + + iter = Common::find(files.begin(), files.end(), linksTo); + if (iter == files.end()) + error("PAK file link destination '%s' not found", linksTo.c_str()); + + for (uint j = 0; j < sources; ++j) { + Common::String dest = readString(stream); + files.push_back(File(dest, iter->entry)); + // Better safe than sorry, we update the 'iter' value, in case push_back invalidated it + iter = Common::find(files.begin(), files.end(), linksTo); + } + } + } + return true; } @@ -767,7 +808,7 @@ bool ResLoaderTlk::loadFile(const Common::String &filename, Common::SeekableRead entry.offset = resOffset+4; char realFilename[20]; - snprintf(realFilename, 20, "%u.AUD", resFilename); + snprintf(realFilename, 20, "%.08u.AUD", resFilename); uint32 curOffset = stream.pos(); stream.seek(resOffset, SEEK_SET); diff --git a/engines/kyra/resource.h b/engines/kyra/resource.h index 167ccd7943..d43f730e6b 100644 --- a/engines/kyra/resource.h +++ b/engines/kyra/resource.h @@ -75,6 +75,10 @@ public: File() : filename(), entry() {} File(const Common::String &f, const ResFileEntry &e) : filename(f), entry(e) {} + bool operator ==(const Common::String &r) const { + return filename.equalsIgnoreCase(r); + } + Common::String filename; ResFileEntry entry; }; diff --git a/engines/kyra/sound.cpp b/engines/kyra/sound.cpp index 8f9077705e..f56c43aabd 100644 --- a/engines/kyra/sound.cpp +++ b/engines/kyra/sound.cpp @@ -50,9 +50,9 @@ Sound::~Sound() { bool Sound::voiceFileIsPresent(const char *file) { char filenamebuffer[25]; - for (int i = 0; _supportedCodes[i].fileext; ++i) { + for (int i = 0; _supportedCodecs[i].fileext; ++i) { strcpy(filenamebuffer, file); - strcat(filenamebuffer, _supportedCodes[i].fileext); + strcat(filenamebuffer, _supportedCodecs[i].fileext); if (_vm->resource()->getFileSize(filenamebuffer) > 0) return true; } @@ -77,14 +77,14 @@ int32 Sound::voicePlay(const char *file, bool isSfx) { Audio::AudioStream *audioStream = 0; - for (int i = 0; _supportedCodes[i].fileext; ++i) { + for (int i = 0; _supportedCodecs[i].fileext; ++i) { strcpy(filenamebuffer, file); - strcat(filenamebuffer, _supportedCodes[i].fileext); + strcat(filenamebuffer, _supportedCodecs[i].fileext); Common::SeekableReadStream *stream = _vm->resource()->getFileStream(filenamebuffer); if (!stream) continue; - audioStream = _supportedCodes[i].streamFunc(stream, true, 0, 0, 1); + audioStream = _supportedCodecs[i].streamFunc(stream, true, 0, 0, 1); break; } @@ -551,7 +551,7 @@ bool KyraEngine_v1::snd_voiceIsPlaying() { // static res -const Sound::SpeechCodecs Sound::_supportedCodes[] = { +const Sound::SpeechCodecs Sound::_supportedCodecs[] = { #ifdef USE_FLAC { ".VOF", Audio::makeFlacStream }, #endif // USE_FLAC diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h index 2427a6cdde..1baeb3064a 100644 --- a/engines/kyra/sound.h +++ b/engines/kyra/sound.h @@ -232,7 +232,7 @@ private: uint numLoops); }; - static const SpeechCodecs _supportedCodes[]; + static const SpeechCodecs _supportedCodecs[]; }; class AdlibDriver; @@ -498,6 +498,7 @@ private: // Digital Audio class AUDStream; +class KyraAudioStream; class KyraEngine_MR; /** @@ -564,8 +565,20 @@ private: char filename[16]; uint8 priority; - AUDStream *stream; + KyraAudioStream *stream; } _sounds[4]; + + struct AudioCodecs { + const char *fileext; + Audio::AudioStream *(*streamFunc)( + Common::SeekableReadStream *stream, + bool disposeAfterUse, + uint32 startTime, + uint32 duration, + uint numLoops); + }; + + static const AudioCodecs _supportedCodecs[]; }; } // end of namespace Kyra diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp index bac7d67129..20f3a7f9f9 100644 --- a/engines/kyra/sound_digital.cpp +++ b/engines/kyra/sound_digital.cpp @@ -29,8 +29,79 @@ #include "sound/audiostream.h" +#include "sound/mp3.h" +#include "sound/vorbis.h" +#include "sound/flac.h" + namespace Kyra { +class KyraAudioStream : public Audio::AudioStream { +public: + KyraAudioStream(Audio::AudioStream *impl) : _impl(impl), _rate(impl->getRate()), _fadeSamples(0), _fadeCount(0), _fading(0), _endOfData(false) {} + ~KyraAudioStream() { delete _impl; _impl = 0; } + + int readBuffer(int16 *buffer, const int numSamples); + bool isStereo() const { return _impl->isStereo(); } + bool endOfData() const { return _impl->endOfData() | _endOfData; } + int getRate() const { return _rate; } + int32 getTotalPlayTime() const { return _impl->getTotalPlayTime(); } + + void setRate(int newRate) { _rate = newRate; } + void beginFadeOut(uint32 millis); +private: + Audio::AudioStream *_impl; + + int _rate; + + int32 _fadeSamples; + int32 _fadeCount; + int _fading; + + bool _endOfData; +}; + +void KyraAudioStream::beginFadeOut(uint32 millis) { + _fadeSamples = (millis * getRate()) / 1000; + if (_fading == 0) + _fadeCount = _fadeSamples; + _fading = -1; +} + +int KyraAudioStream::readBuffer(int16 *buffer, const int numSamples) { + int samplesRead = _impl->readBuffer(buffer, numSamples); + + if (_fading) { + int samplesProcessed = 0; + for (; samplesProcessed < samplesRead; ++samplesProcessed) { + // To help avoid overflows for long fade times, we divide both + // _fadeSamples and _fadeCount when calculating the new sample. + + int32 div = _fadeSamples / 256; + if (_fading) { + *buffer = (*buffer * (_fadeCount / 256)) / div; + ++buffer; + + _fadeCount += _fading; + + if (_fadeCount < 0) { + _fadeCount = 0; + _endOfData = true; + } else if (_fadeCount > _fadeSamples) { + _fadeCount = _fadeSamples; + _fading = 0; + } + } + } + + if (_endOfData) { + memset(buffer, 0, (samplesRead - samplesProcessed) * sizeof(int16)); + samplesRead = samplesProcessed; + } + } + + return samplesRead; +} + // Thanks to Torbjorn Andersson (eriktorbjorn) for his aud player on which // this code is based on @@ -46,11 +117,7 @@ public: bool isStereo() const { return false; } bool endOfData() const { return _endOfData; } - void setRate(int newRate) { _rate = newRate; } int getRate() const { return _rate; } - - void beginFadeIn(uint32 millis); - void beginFadeOut(uint32 millis); private: Common::SeekableReadStream *_stream; bool _loop; @@ -69,10 +136,6 @@ private: byte *_inBuffer; uint _inBufferSize; - int32 _fadeSamples; - int32 _fadeCount; - int _fading; - int readChunk(int16 *buffer, const int maxSamples); static const int8 WSTable2Bit[]; @@ -93,9 +156,6 @@ AUDStream::AUDStream(Common::SeekableReadStream *stream, bool loop) : _stream(st _totalSize = _stream->readUint32LE(); _loop = loop; - _fadeSamples = 0; - _fading = 0; - // TODO?: add checks int flags = _stream->readByte(); // flags int type = _stream->readByte(); // type @@ -114,20 +174,6 @@ AUDStream::~AUDStream() { delete _stream; } -void AUDStream::beginFadeIn(uint32 millis) { - _fadeSamples = (millis * getRate()) / 1000; - if (_fading == 0) - _fadeCount = 0; - _fading = 1; -} - -void AUDStream::beginFadeOut(uint32 millis) { - _fadeSamples = (millis * getRate()) / 1000; - if (_fading == 0) - _fadeCount = _fadeSamples; - _fading = -1; -} - int AUDStream::readBuffer(int16 *buffer, const int numSamples) { int samplesRead = 0, samplesLeft = numSamples; @@ -288,34 +334,13 @@ int AUDStream::readChunk(int16 *buffer, const int maxSamples) { samplesProcessed += samples; _bytesLeft -= samples; - // To help avoid overflows for long fade times, we divide both - // _fadeSamples and _fadeCount when calculating the new sample. - - int32 div = _fadeSamples / 256; - while (samples--) { int16 sample = (_outBuffer[_outBufferOffset++] << 8) ^ 0x8000; - if (_fading) { - sample = (sample * (_fadeCount / 256)) / div; - _fadeCount += _fading; - - if (_fadeCount < 0) { - _fadeCount = 0; - _endOfData = true; - } else if (_fadeCount > _fadeSamples) { - _fadeCount = _fadeSamples; - _fading = 0; - } - } - *buffer++ = sample; } } - if (_fading < 0 && _fadeCount == 0) - _fading = 0; - return samplesProcessed; } @@ -367,7 +392,19 @@ int SoundDigital::playSound(const char *filename, uint8 priority, Audio::Mixer:: } } - Common::SeekableReadStream *stream = _vm->resource()->getFileStream(filename); + Common::SeekableReadStream *stream = 0; + int usedCodec = -1; + for (int i = 0; _supportedCodecs[i].fileext; ++i) { + Common::String file = filename; + file += _supportedCodecs[i].fileext; + + if (!_vm->resource()->exists(file.c_str())) + continue; + + stream = _vm->resource()->getFileStream(file); + usedCodec = i; + } + if (!stream) { warning("Couldn't find soundfile '%s'", filename); return -1; @@ -375,7 +412,13 @@ int SoundDigital::playSound(const char *filename, uint8 priority, Audio::Mixer:: strncpy(use->filename, filename, sizeof(use->filename)); use->priority = priority; - use->stream = new AUDStream(stream, loop); + Audio::AudioStream *audioStream = _supportedCodecs[usedCodec].streamFunc(stream, true, 0, 0, loop ? 0 : 1); + if (!audioStream) { + warning("Couldn't create audio stream for file '%s'", filename); + return -1; + } + use->stream = new KyraAudioStream(audioStream); + assert(use->stream); if (use->stream->endOfData()) { delete use->stream; use->stream = 0; @@ -428,5 +471,30 @@ void SoundDigital::beginFadeOut(int channel, int ticks) { _sounds[channel].stream->beginFadeOut(ticks * _vm->tickLength()); } +// static res + +namespace { + +Audio::AudioStream *makeAUDStream(Common::SeekableReadStream *stream, bool disposeAfterUse, uint32 startTime, uint32 duration, uint numLoops) { + return new AUDStream(stream, numLoops == 0 ? true : false); +} + +} // end of anonymous namespace + +const SoundDigital::AudioCodecs SoundDigital::_supportedCodecs[] = { +#ifdef USE_FLAC + { ".FLA", Audio::makeFlacStream }, +#endif // USE_FLAC +#ifdef USE_VORBIS + { ".OGG", Audio::makeVorbisStream }, +#endif // USE_VORBIS +#ifdef USE_MAD + { ".MP3", Audio::makeMP3Stream }, +#endif // USE_MAD + { ".AUD", makeAUDStream }, + { 0, 0 } +}; + + } // end of namespace Kyra -- cgit v1.2.3 From e3a8074a6d93b8ef590c9761f2a8d7aba8b06e0b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 3 Jun 2008 18:17:56 +0000 Subject: Rewrote some more room logic svn-id: r32518 --- engines/drascula/drascula.h | 2 +- engines/drascula/rooms.cpp | 83 +++++++++++-------------------------------- engines/drascula/staticdata.h | 50 ++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 63 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index ba43c9895c..4649dd5ada 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -105,7 +105,7 @@ enum IgorTalkerTypes { struct DrasculaGameDescription; struct RoomTalkAction { - int num; + int chapter; int action; int objectID; int speechID; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 6a8c87f8b6..a294895162 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -32,8 +32,8 @@ bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { bool didAction = false; for (int i = 0; i < ARRAYSIZE(roomActions); i++) { - if (roomActions[i].num == currentChapter || - roomActions[i].num == -1) { + if (roomActions[i].chapter == currentChapter || + roomActions[i].chapter == -1) { if (roomActions[i].action == pickedObject || roomActions[i].action == kVerbDefault) { if (roomActions[i].objectID == fl || @@ -317,11 +317,10 @@ void DrasculaEngine::room_14(int fl) { } void DrasculaEngine::room_15(int fl) { - if (pickedObject == kVerbTalk && fl == 188) - talk(333); - else if (pickedObject == kVerbLook && fl == 188) - talk(334); - else if (pickedObject == 19 && fl == 188 && flags[27] == 0) + if (roomParse(room15Actions, fl)) + return; + + if (pickedObject == 19 && fl == 188 && flags[27] == 0) talk(335); else if (pickedObject == 19 && fl == 188 && flags[27] == 1) { talk(336); @@ -347,27 +346,18 @@ void DrasculaEngine::room_15(int fl) { flags[27] = 1; if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; - } else if (pickedObject == kVerbLook && fl == 205) - talk(172); - else if (pickedObject == kVerbLook && fl == 206) - talk(173); - else if (pickedObject == kVerbMove && fl == 206) - talk(174); - else if (pickedObject == kVerbOpen && fl == 206) - talk(174); - else + } else hasAnswer = 0; } void DrasculaEngine::room_16(int fl) { - if (pickedObject == kVerbTalk && fl == 163) - talk(6); - else if (pickedObject == kVerbOpen && fl == 163) + if (roomParse(room16Actions, fl)) + return; + + if (pickedObject == kVerbOpen && fl == 163) openDoor(17, 0); else if (pickedObject == kVerbClose && fl == 163) closeDoor(17, 0); - else if (pickedObject == kVerbLook && fl == 183) - talk(340); else if (pickedObject == kVerbTalk && fl == 183) { talk(341); pause(10); @@ -386,23 +376,13 @@ void DrasculaEngine::room_16(int fl) { } } else if (pickedObject == kVerbClose && fl == 183) closeDoor(19, NO_DOOR); - else if (pickedObject == kVerbLook && fl == 185) - talk(37); - else if (pickedObject == kVerbPick && fl == 185) - talk(7); - else if (pickedObject == kVerbMove && fl == 185) - talk(7); - else if (pickedObject == kVerbTalk && fl == 185) - talk(38); else if (pickedObject == kVerbLook && fl == 187) { talk(343); trackProtagonist = 3; updateRoom(); updateScreen(); talk(344); - } else if (pickedObject == kVerbTalk && fl == 187) - talk(345); - else + } else hasAnswer = 0; } @@ -431,12 +411,13 @@ void DrasculaEngine::room_17(int fl) { } void DrasculaEngine::room_18(int fl) { + if (roomParse(room18Actions, fl)) + return; + if (pickedObject == kVerbTalk && fl == 55 && flags[36] == 0) animation_24_2(); else if (pickedObject == kVerbTalk && fl == 55 && flags[36] == 1) talk(109); - else if (pickedObject == kVerbLook && fl == 181) - talk(348); else if (pickedObject == kVerbPick && fl == 182) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); @@ -447,8 +428,6 @@ void DrasculaEngine::room_18(int fl) { pickObject(12); visible[2] = 0; flags[28] = 1; - } else if (pickedObject == kVerbLook && fl == 182) { - talk(154); } else if (fl == 55 && flags[38] == 0 && flags[33] == 0) { if (pickedObject == 8 || pickedObject == 13 || pickedObject == 15 || pickedObject == 16 || pickedObject == 17) @@ -579,6 +558,9 @@ void DrasculaEngine::room_24(int fl) { } void DrasculaEngine::room_26(int fl) { + if (roomParse(room26Actions, fl)) + return; + if (pickedObject == kVerbOpen && fl == 107 && flags[30] == 0) openDoor(2, 0); else if (pickedObject == kVerbOpen && fl == 107 && flags[30] == 1) @@ -613,22 +595,6 @@ void DrasculaEngine::room_26(int fl) { gotoObject(153, 180); } else if (pickedObject == kVerbTalk && fl == 51) animation_1_4(); - else if (pickedObject == kVerbOpen && fl == 167) - talk(467); - else if (pickedObject == kVerbLook && fl == 164) - talk(470); - else if (pickedObject == kVerbOpen && fl == 164) - talk(471); - else if (pickedObject == kVerbLook && fl == 163) - talk(472); - else if (pickedObject == kVerbPick && fl == 163) - talk(473); - else if (pickedObject == kVerbLook && fl == 165) - talk(474); - else if (pickedObject == kVerbLook && fl == 168) - talk(476); - else if (pickedObject == kVerbPick && fl == 168) - talk(477); else hasAnswer = 0; } @@ -655,20 +621,13 @@ void DrasculaEngine::room_27(int fl) { } void DrasculaEngine::room_29(int fl) { + if (roomParse(room29Actions, fl)) + return; + if (pickedObject == kVerbOpen && fl == 114) openDoor(4, 1); else if (pickedObject == kVerbClose && fl == 114) closeDoor(4, 1); - else if (pickedObject == kVerbLook && fl == 152) - talk(463); - else if (pickedObject == kVerbOpen && fl == 152) - talk(464); - else if (pickedObject == kVerbLook && fl == 153) - talk(465); - else if (pickedObject == kVerbPick && fl == 154) - talk(466); - else if (pickedObject == kVerbOpen && fl == 156) - talk(467); else hasAnswer = 0; } diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index acd9e308c6..03fe4c6f61 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -290,6 +290,56 @@ RoomTalkAction room14Actions[] = { { -1, kVerbLook, 204, 171 } }; +RoomTalkAction room15Actions[] = { + // num action object speech + { -1, kVerbTalk, 188, 333 }, + { -1, kVerbLook, 188, 334 }, + // ---------------------------------- + { -1, kVerbLook, 205, 172 }, + // ---------------------------------- + { -1, kVerbLook, 206, 173 }, + { -1, kVerbMove, 206, 174 }, + { -1, kVerbOpen, 206, 174 } +}; + +RoomTalkAction room16Actions[] = { + // num action object speech + { -1, kVerbTalk, 163, 6 }, + { -1, kVerbLook, 183, 340 }, + { -1, kVerbLook, 185, 37 }, + { -1, kVerbPick, 185, 7 }, + { -1, kVerbMove, 185, 7 }, + { -1, kVerbTalk, 185, 38 }, + { -1, kVerbTalk, 187, 345 } +}; + +RoomTalkAction room18Actions[] = { + // num action object speech + { -1, kVerbLook, 181, 348 }, + { -1, kVerbLook, 182, 154 } +}; + +RoomTalkAction room26Actions[] = { + // num action object speech + { -1, kVerbOpen, 167, 467 }, + { -1, kVerbLook, 164, 470 }, + { -1, kVerbOpen, 164, 471 }, + { -1, kVerbLook, 163, 472 }, + { -1, kVerbPick, 163, 473 }, + { -1, kVerbLook, 165, 474 }, + { -1, kVerbLook, 168, 476 }, + { -1, kVerbPick, 168, 477 } +}; + +RoomTalkAction room29Actions[] = { + // num action object speech + { -1, kVerbLook, 152, 463 }, + { -1, kVerbOpen, 152, 464 }, + { -1, kVerbLook, 153, 465 }, + { -1, kVerbPick, 154, 466 }, + { -1, kVerbOpen, 156, 467 } +}; + const char *_text[][501] = { { // 0 -- cgit v1.2.3 From 5288daa863b6eeb9696e9dd48640f237b0b644ba Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 3 Jun 2008 21:04:41 +0000 Subject: DS: Forgot to commit #include changes in the ds-fs.* files; this allows to get rid of -Isource/fat svn-id: r32520 --- backends/fs/ds/ds-fs.cpp | 2 +- backends/fs/ds/ds-fs.h | 2 +- backends/platform/ds/arm9/makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backends/fs/ds/ds-fs.cpp b/backends/fs/ds/ds-fs.cpp index 79b957f2e2..cffe4c118d 100644 --- a/backends/fs/ds/ds-fs.cpp +++ b/backends/fs/ds/ds-fs.cpp @@ -25,7 +25,7 @@ //#include //basic print funcionality #include "backends/fs/ds/ds-fs.h" #include "dsmain.h" -#include "gba_nds_fat.h" +#include "fat/gba_nds_fat.h" diff --git a/backends/fs/ds/ds-fs.h b/backends/fs/ds/ds-fs.h index 21dfa00667..9ac453aca9 100644 --- a/backends/fs/ds/ds-fs.h +++ b/backends/fs/ds/ds-fs.h @@ -28,7 +28,7 @@ #include "zipreader.h" #include "ramsave.h" #include "scummconsole.h" -#include "gba_nds_fat.h" +#include "fat/gba_nds_fat.h" #include "backends/fs/abstract-fs.h" namespace DS { diff --git a/backends/platform/ds/arm9/makefile b/backends/platform/ds/arm9/makefile index 1a4d61113e..7472a32218 100644 --- a/backends/platform/ds/arm9/makefile +++ b/backends/platform/ds/arm9/makefile @@ -182,7 +182,7 @@ endif LDFLAGS = -specs=ds_arm9.specs -mthumb-interwork -Wl,--wrap,time -mno-fpu -Wl,-Map,map.txt -INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)/source -I$(portdir)/source/fat \ +INCLUDES= -I./ -I$(portdir)/$(BUILD) -I$(srcdir) -I$(srcdir)/common -I$(portdir)/source \ -I$(portdir)/data -I$(libndsdir)/include -I$(portdir)/../commoninclude\ -I$(libndsdir)/include -I$(libndsdir)/include/nds -I$(srcdir)/engines -I$(portdir)/source/mad\ -I$(portdir)/source/libcartreset -include $(srcdir)/common/scummsys.h -- cgit v1.2.3 From 4b5ed050f176588067a355506792d75b7958bf21 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 3 Jun 2008 21:20:55 +0000 Subject: Initial WIP and still non-working code for the blinking save reminder icon (bug reports #1981081 and #1971729) svn-id: r32521 --- engines/saga/interface.cpp | 19 +++++++++++++++++++ engines/saga/interface.h | 5 +++++ 2 files changed, 24 insertions(+) diff --git a/engines/saga/interface.cpp b/engines/saga/interface.cpp index fe1ee0eefc..7380570a99 100644 --- a/engines/saga/interface.cpp +++ b/engines/saga/interface.cpp @@ -326,6 +326,9 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) { _statusTextInputState = kStatusTextInputFirstRun; _disableAbortSpeeches = false; + + // set save game reminder alarm + _vm->_timer->installTimerProc(&saveReminderCallback, TIMETOSAVE, this); } Interface::~Interface(void) { @@ -336,6 +339,22 @@ Interface::~Interface(void) { _scenePortraits.freeMem(); } +void Interface::saveReminderCallback(void *refCon) { + ((Interface *)refCon)->updateSaveReminder(); +} + +void Interface::updateSaveReminder() { + // TODO: finish this + /* + if (_active && _panelMode == kPanelMain) { + _vm->_timer->removeTimerProc(&saveReminderCallback); + _saveReminderState = (_saveReminderState == 0) ? 1 : 0; + drawStatusBar(); + _vm->_timer->installTimerProc(&saveReminderCallback, TIMETOSAVE, this); + } + */ +} + int Interface::activate() { if (!_active) { _active = true; diff --git a/engines/saga/interface.h b/engines/saga/interface.h index 74cf5ace44..2091c9f071 100644 --- a/engines/saga/interface.h +++ b/engines/saga/interface.h @@ -59,6 +59,8 @@ enum InterfaceUpdateFlags { #define RID_IHNM_BOSS_SCREEN 19 // not in demo #define RID_ITE_TYCHO_MAP 1686 #define RID_ITE_SPR_CROSSHAIR (73 + 9) +#define TIMETOSAVE (kScriptTimeTicksPerSecond * 1000 * 60 * 30) +#define TIMETOBLINK (kScriptTimeTicksPerSecond * 1000 * 1) // Converse-specific stuff @@ -237,6 +239,9 @@ public: void disableAbortSpeeches(bool d) { _disableAbortSpeeches = d; } + static void saveReminderCallback(void *refCon); + void updateSaveReminder(); + bool _textInput; bool _statusTextInput; -- cgit v1.2.3 From fe6ab4227e070a6ef6ae5528025c2b2ea9a0b271 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Wed, 4 Jun 2008 01:04:26 +0000 Subject: Return to menu after introduction has played (with glitches). svn-id: r32523 --- engines/parallaction/graphics.cpp | 4 ---- engines/parallaction/graphics.h | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 9110731a04..58fb02a750 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -33,10 +33,6 @@ namespace Parallaction { - -typedef Common::HashMap VarMap; -VarMap _vars; - void Gfx::registerVar(const Common::String &name, int32 initialValue) { if (_vars.contains(name)) { warning("Variable '%s' already registered, ignoring initial value.\n", name.c_str()); diff --git a/engines/parallaction/graphics.h b/engines/parallaction/graphics.h index 8f1c14aef0..894e0fd678 100644 --- a/engines/parallaction/graphics.h +++ b/engines/parallaction/graphics.h @@ -452,10 +452,13 @@ enum { kBackgroundSlide = 2 }; +typedef Common::HashMap VarMap; + class Gfx { public: Disk *_disk; + VarMap _vars; GfxObjList _gfxobjList[3]; GfxObj* loadAnim(const char *name); -- cgit v1.2.3 From 52fbdd51eb0f7d31ce1718adfc60bc169c7c84c3 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Wed, 4 Jun 2008 01:27:55 +0000 Subject: Script instructions referencing unexisting animations are now skipped, instead of crashing the engine. svn-id: r32524 --- engines/parallaction/parser_ns.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/engines/parallaction/parser_ns.cpp b/engines/parallaction/parser_ns.cpp index 96a4fced71..2c4601c938 100644 --- a/engines/parallaction/parser_ns.cpp +++ b/engines/parallaction/parser_ns.cpp @@ -308,8 +308,6 @@ void LocationParser_ns::parseAnimation(AnimationList &list, char *name) { void ProgramParser_ns::parseInstruction() { - InstructionPtr inst(new Instruction); - _script->readLineToken(true); if (_tokens[0][1] == '.') { @@ -322,10 +320,13 @@ void ProgramParser_ns::parseInstruction() { } else ctxt.a = _program->_anim; - ctxt.inst = inst; + if (!ctxt.a) { + return; + } + InstructionPtr inst(new Instruction); + ctxt.inst = inst; _parser->parseStatement(); - _program->_instructions.push_back(inst); return; -- cgit v1.2.3 From db0c37d054cdb3d205edae6106cda9adb858ce7d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 07:58:34 +0000 Subject: Removed junk code from update_1_pre, update_4 and update_6_pre pon_hare -> moveCharacters hare_oscuro -> setDarkPalette hare_claro -> setBrightPalette funde_hare -> setPaletteBase conta_blind_vez -> savedTime paleta_hare -> assignDefaultPalette paleta_hare_claro -> assignBrightPalette paleta_hare_oscuro -> assignDarkPalette distance_x/distance_y -> distanceX/distanceY palHare -> defaultPalette palHareClaro -> brightPalette palHareOscuro -> darkPalette pos_murci -> batPos murci_x/murci_y -> batX/batY blind_x/blind_y -> blindX/blindY svn-id: r32526 --- engines/drascula/animation.cpp | 22 +++--- engines/drascula/drascula.cpp | 170 ++++++++++++++++++++--------------------- engines/drascula/drascula.h | 76 +++++++++--------- engines/drascula/rooms.cpp | 111 ++++++++++++--------------- engines/drascula/talk.cpp | 28 +++---- 5 files changed, 198 insertions(+), 209 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index ae2c3e5aff..83f125edc5 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -643,7 +643,7 @@ void DrasculaEngine::animation_4_1() { updateRefresh_pre(); copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface); - pon_hare(); + moveCharacters(); updateScreen(); @@ -675,7 +675,7 @@ void DrasculaEngine::animation_1_2() { void DrasculaEngine::animation_2_2() { trackProtagonist = 0; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - pon_hare(); + moveCharacters(); updateRefresh(); updateScreen(); loadPic("an2_1.alg", frontSurface, 1); @@ -825,7 +825,7 @@ void DrasculaEngine::animation_14_2() { for (n = -160; n <= 0; n = n + 5 + l) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - pon_hare(); + moveCharacters(); moveVB(); pos_cabina[3] = n; copyRectClip(pos_cabina, backSurface, screenSurface); @@ -1167,7 +1167,7 @@ void DrasculaEngine::animation_25_2() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - pon_hare(); + moveCharacters(); moveVB(); pos_cabina[3] = n; @@ -1699,7 +1699,7 @@ void DrasculaEngine::animation_12_5() { updateRoom(); updateScreen(); - hare_oscuro(); + setDarkPalette(); for (color = 0; color < 255; color++) for (component = 0; component < 3; component++) { @@ -1761,7 +1761,7 @@ void DrasculaEngine::animation_12_5() { animate("frel.bin", 16); clearRoom(); - hare_claro(); + setBrightPalette(); updatePalette(); flags[1] = 1; @@ -2139,7 +2139,7 @@ void DrasculaEngine::animation_19_6() { copyBackground(140, 23, 161, 69, 35, 80, drawSurface3, screenSurface); updateRefresh_pre(); - pon_hare(); + moveCharacters(); updateScreen(); pause(6); updateRoom(); @@ -2167,7 +2167,7 @@ void DrasculaEngine::animation_12_2() { updateRefresh_pre(); copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface); - pon_hare(); + moveCharacters(); updateScreen(); @@ -2203,7 +2203,7 @@ void DrasculaEngine::animation_26_2() { updateRefresh_pre(); copyBackground(49, 139, 228, 112, 47, 60, extraSurface, screenSurface); - pon_hare(); + moveCharacters(); updateScreen(); @@ -2622,7 +2622,7 @@ void DrasculaEngine::animation_1_4() { updateRefresh_pre(); copyBackground(182, 133, 199, 95, 50, 66, drawSurface3, screenSurface); - pon_hare(); + moveCharacters(); updateScreen(); @@ -2646,7 +2646,7 @@ void DrasculaEngine::animation_1_4() { updateRefresh_pre(); copyBackground(182, 133, 199, 95, 50, 66, drawSurface3, screenSurface); - pon_hare(); + moveCharacters(); updateScreen(); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 5bbad2c531..a7b39ef70c 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -126,7 +126,7 @@ int DrasculaEngine::go() { curHeight = CHARACTER_HEIGHT; curWidth = CHARACTER_WIDTH; feetHeight = FEET_HEIGHT; talkHeight = TALK_HEIGHT; talkWidth = TALK_WIDTH; hasAnswer = 0; - conta_blind_vez = 0; + savedTime = 0; changeColor = 0; breakOut = 0; vbX = 120; trackVB = 1; vbHasMoved = 0; frame_vb = 1; @@ -197,7 +197,7 @@ int DrasculaEngine::go() { for (i = 0; i < 6; i++) strcpy(iconName[i + 1], _textverbs[_lang][i]); - paleta_hare(); + assignDefaultPalette(); if (!escoba()) { releaseGame(); break; @@ -293,24 +293,6 @@ void DrasculaEngine::decompressPic(byte *targetSurface, int colorCount) { setRGB((byte *)cPal, colorCount); } -void DrasculaEngine::paleta_hare() { - int color, component; - - for (color = 235; color < 253; color++) - for (component = 0; component < 3; component++) - palHare[color][component] = gamePalette[color][component]; -} - -void DrasculaEngine::hare_oscuro() { - int color, component; - - for (color = 235; color < 253; color++ ) - for (component = 0; component < 3; component++) - gamePalette[color][component] = palHareOscuro[color][component]; - - updatePalette(); -} - void DrasculaEngine::setRGB(byte *dir_lectura, int plt) { int x, cnt = 0; @@ -943,15 +925,15 @@ void DrasculaEngine::carga_escoba(const char *fileName) { copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); - color_hare(); + setDefaultPalette(); if (nivel_osc != 0) - funde_hare(nivel_osc); - paleta_hare_claro(); - color_hare(); - funde_hare(nivel_osc + 2); - paleta_hare_oscuro(); + setPaletteBase(nivel_osc); + assignBrightPalette(); + setDefaultPalette(); + setPaletteBase(nivel_osc + 2); + assignDarkPalette(); - hare_claro(); + setBrightPalette(); changeColor = -1; if (currentChapter == 2) @@ -1035,11 +1017,11 @@ void DrasculaEngine::carga_escoba(const char *fileName) { if (currentChapter == 2) { if (roomNumber == 9 || roomNumber == 2 || roomNumber == 14 || roomNumber == 18) - conta_blind_vez = getTime(); + savedTime = getTime(); } if (currentChapter == 4) { if (roomNumber == 26) - conta_blind_vez = getTime(); + savedTime = getTime(); } if (currentChapter == 4 && roomNumber == 24 && flags[29] == 1) @@ -1096,7 +1078,7 @@ void DrasculaEngine::moveCursor() { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - pon_hare(); + moveCharacters(); updateRefresh(); if (!strcmp(textName, "hacker") && hasName == 1) { @@ -2041,11 +2023,11 @@ void DrasculaEngine::updateRoom() { updateRefresh_pre(); if (currentChapter == 3) { if (flags[0] == 0) - pon_hare(); + moveCharacters(); else copyRect(113, 54, curX - 20, curY - 1, 77, 89, drawSurface3, screenSurface); } else { - pon_hare(); + moveCharacters(); } updateRefresh(); } @@ -2137,55 +2119,73 @@ void DrasculaEngine::updateDoor(int doorNum) { } } -void DrasculaEngine::color_hare() { +void DrasculaEngine::assignDefaultPalette() { + int color, component; + + for (color = 235; color < 253; color++) + for (component = 0; component < 3; component++) + defaultPalette[color][component] = gamePalette[color][component]; +} + +void DrasculaEngine::assignBrightPalette() { int color, component; for (color = 235; color < 253; color++) { - for (component = 0; component < 3; component++) { - gamePalette[color][component] = palHare[color][component]; - } + for (component = 0; component < 3; component++) + brightPalette[color][component] = gamePalette[color][component]; } - updatePalette(); } -void DrasculaEngine::funde_hare(int oscuridad) { - char fade; - unsigned int color, component; +void DrasculaEngine::assignDarkPalette() { + int color, component; - for (fade = oscuridad; fade >= 0; fade--) { - for (color = 235; color < 253; color++) { - for (component = 0; component < 3; component++) - gamePalette[color][component] = adjustToVGA(gamePalette[color][component] - 8 + fade); - } + for (color = 235; color < 253; color++) { + for (component = 0; component < 3; component++) + darkPalette[color][component] = gamePalette[color][component]; } - - updatePalette(); } -void DrasculaEngine::paleta_hare_claro() { +void DrasculaEngine::setDefaultPalette() { int color, component; for (color = 235; color < 253; color++) { - for (component = 0; component < 3; component++) - palHareClaro[color][component] = gamePalette[color][component]; + for (component = 0; component < 3; component++) { + gamePalette[color][component] = defaultPalette[color][component]; + } } + updatePalette(); } -void DrasculaEngine::paleta_hare_oscuro() { +void DrasculaEngine::setBrightPalette() { int color, component; for (color = 235; color < 253; color++) { for (component = 0; component < 3; component++) - palHareOscuro[color][component] = gamePalette[color][component]; + gamePalette[color][component] = brightPalette[color][component]; } + + updatePalette(); } -void DrasculaEngine::hare_claro() { +void DrasculaEngine::setDarkPalette() { int color, component; - for (color = 235; color < 253; color++) { + for (color = 235; color < 253; color++ ) for (component = 0; component < 3; component++) - gamePalette[color][component] = palHareClaro[color][component]; + gamePalette[color][component] = darkPalette[color][component]; + + updatePalette(); +} + +void DrasculaEngine::setPaletteBase(int darkness) { + char fade; + unsigned int color, component; + + for (fade = darkness; fade >= 0; fade--) { + for (color = 235; color < 253; color++) { + for (component = 0; component < 3; component++) + gamePalette[color][component] = adjustToVGA(gamePalette[color][component] - 8 + fade); + } } updatePalette(); @@ -2225,7 +2225,7 @@ void DrasculaEngine::startWalking() { startTime = getTime(); } -void DrasculaEngine::pon_hare() { +void DrasculaEngine::moveCharacters() { int curPos[6]; int r; @@ -2920,86 +2920,86 @@ void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int w } void DrasculaEngine::quadrant_1() { - float distance_x, distance_y; + float distanceX, distanceY; if (currentChapter == 2) - distance_x = curX - roomX; + distanceX = curX - roomX; else - distance_x = curX + curWidth / 2 - roomX; + distanceX = curX + curWidth / 2 - roomX; - distance_y = (curY + curHeight) - roomY; + distanceY = (curY + curHeight) - roomY; - if (distance_x < distance_y) { + if (distanceX < distanceY) { curDirection = 0; trackProtagonist = 2; - stepX = (int)(distance_x / (distance_y / STEP_Y)); + stepX = (int)(distanceX / (distanceY / STEP_Y)); } else { curDirection = 7; trackProtagonist = 0; - stepY = (int)(distance_y / (distance_x / STEP_X)); + stepY = (int)(distanceY / (distanceX / STEP_X)); } } void DrasculaEngine::quadrant_2() { - float distance_x, distance_y; + float distanceX, distanceY; if (currentChapter == 2) - distance_x = abs(curX + curWidth - roomX); + distanceX = abs(curX + curWidth - roomX); else - distance_x = abs(curX + curWidth / 2 - roomX); + distanceX = abs(curX + curWidth / 2 - roomX); - distance_y = (curY + curHeight) - roomY; + distanceY = (curY + curHeight) - roomY; - if (distance_x < distance_y) { + if (distanceX < distanceY) { curDirection = 1; trackProtagonist = 2; - stepX = (int)(distance_x / (distance_y / STEP_Y)); + stepX = (int)(distanceX / (distanceY / STEP_Y)); } else { curDirection = 2; trackProtagonist = 1; - stepY = (int)(distance_y / (distance_x / STEP_X)); + stepY = (int)(distanceY / (distanceX / STEP_X)); } } void DrasculaEngine::quadrant_3() { - float distance_x, distance_y; + float distanceX, distanceY; if (currentChapter == 2) - distance_x = curX - roomX; + distanceX = curX - roomX; else - distance_x = curX + curWidth / 2 - roomX; + distanceX = curX + curWidth / 2 - roomX; - distance_y = roomY - (curY + curHeight); + distanceY = roomY - (curY + curHeight); - if (distance_x < distance_y) { + if (distanceX < distanceY) { curDirection = 5; trackProtagonist = 3; - stepX = (int)(distance_x / (distance_y / STEP_Y)); + stepX = (int)(distanceX / (distanceY / STEP_Y)); } else { curDirection = 6; trackProtagonist = 0; - stepY = (int)(distance_y / (distance_x / STEP_X)); + stepY = (int)(distanceY / (distanceX / STEP_X)); } } void DrasculaEngine::quadrant_4() { - float distance_x, distance_y; + float distanceX, distanceY; if (currentChapter == 2) - distance_x = abs(curX + curWidth - roomX); + distanceX = abs(curX + curWidth - roomX); else - distance_x = abs(curX + curWidth / 2 - roomX); + distanceX = abs(curX + curWidth / 2 - roomX); - distance_y = roomY - (curY + curHeight); + distanceY = roomY - (curY + curHeight); - if (distance_x < distance_y) { + if (distanceX < distanceY) { curDirection = 4; trackProtagonist = 3; - stepX = (int)(distance_x / (distance_y / STEP_Y)); + stepX = (int)(distanceX / (distanceY / STEP_Y)); } else { curDirection = 3; trackProtagonist = 1; - stepY = (int)(distance_y / (distance_x / STEP_X)); + stepY = (int)(distanceY / (distanceX / STEP_X)); } } @@ -3677,7 +3677,7 @@ void DrasculaEngine::activatePendulum() { copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); - conta_blind_vez = getTime(); + savedTime = getTime(); } void DrasculaEngine::closeDoor(int nflag, int doorNum) { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 4649dd5ada..f40517ca0d 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -122,32 +122,32 @@ struct CharInfo { int charType; // 0 - letters, 1 - signs, 2 - accented }; -#define CHARMAP_SIZE 93 -#define NUM_SAVES 10 -#define NUM_FLAGS 50 -#define DIF_MASK 55 -#define OBJWIDTH 40 -#define OBJHEIGHT 25 - -#define DIF_MASK_HARE 72 -#define DIF_MASK_ABC 22 -#define CHAR_WIDTH 8 -#define CHAR_HEIGHT 6 - -#define TALK_HEIGHT 25 -#define TALK_WIDTH 23 -#define STEP_X 8 -#define STEP_Y 3 -#define CHARACTER_HEIGHT 70 -#define CHARACTER_WIDTH 43 -#define FEET_HEIGHT 12 - -#define CHAR_WIDTH_OPC 6 -#define CHAR_HEIGHT_OPC 5 -#define NO_DOOR 99 - -#define COMPLETE_PAL 256 -#define HALF_PAL 128 +#define CHARMAP_SIZE 93 +#define NUM_SAVES 10 +#define NUM_FLAGS 50 +#define DIF_MASK 55 +#define OBJWIDTH 40 +#define OBJHEIGHT 25 + +#define DIF_MASK_HARE 72 +#define DIF_MASK_ABC 22 +#define CHAR_WIDTH 8 +#define CHAR_HEIGHT 6 + +#define TALK_HEIGHT 25 +#define TALK_WIDTH 23 +#define STEP_X 8 +#define STEP_Y 3 +#define CHARACTER_HEIGHT 70 +#define CHARACTER_WIDTH 43 +#define FEET_HEIGHT 12 + +#define CHAR_WIDTH_OPC 6 +#define CHAR_HEIGHT_OPC 5 +#define NO_DOOR 99 + +#define COMPLETE_PAL 256 +#define HALF_PAL 128 static const int interf_x[] ={ 1, 65, 129, 193, 1, 65, 129 }; static const int interf_y[] ={ 51, 51, 51, 51, 83, 83, 83 }; @@ -184,7 +184,7 @@ public: typedef char DacPalette256[256][3]; void setRGB(byte *dir_lectura, int plt); - void paleta_hare(); + void assignDefaultPalette(); void updatePalette(); void setPalette(byte *PalBuf); void copyBackground(int xorg, int yorg, int xdes, int ydes, int width, @@ -208,9 +208,9 @@ public: } DacPalette256 gamePalette; - DacPalette256 palHare; - DacPalette256 palHareClaro; - DacPalette256 palHareOscuro; + DacPalette256 defaultPalette; + DacPalette256 brightPalette; + DacPalette256 darkPalette; byte *VGA; @@ -272,7 +272,7 @@ public: int objExit; int timeDiff, startTime; int hasAnswer; - int conta_blind_vez; + int savedTime; int changeColor; int breakOut; int vbX, trackVB, vbHasMoved, frame_vb; @@ -312,7 +312,7 @@ public: void openDoor(int nflag, int doorNum); void showMap(); - void hare_oscuro(); + void setDarkPalette(); void withoutVerb(); bool para_cargar(char[]); @@ -382,16 +382,16 @@ public: void updateRoom(); bool loadGame(const char *); void updateDoor(int); - void color_hare(); - void funde_hare(int oscuridad); - void paleta_hare_claro(); - void paleta_hare_oscuro(); - void hare_claro(); + void setDefaultPalette(); + void setPaletteBase(int darkness); + void assignBrightPalette(); + void assignDarkPalette(); + void setBrightPalette(); void updateVisible(); void startWalking(); void updateRefresh(); void updateRefresh_pre(); - void pon_hare(); + void moveCharacters(); void showMenu(); void clearMenu(); void removeObject(); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index a294895162..87b1b4f4e6 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1170,26 +1170,22 @@ void DrasculaEngine::updateRefresh_pre() { } void DrasculaEngine::update_1_pre() { - int cambio_col_antes = changeColor; - - if (curX > 98 && curX < 153) + if (curX > 98 && curX < 153) { changeColor = 1; - else + setDarkPalette(); + } else { changeColor = 0; - - if (cambio_col_antes != changeColor && changeColor == 1) - hare_oscuro(); - if (cambio_col_antes != changeColor && changeColor == 0) - hare_claro(); + setBrightPalette(); + } if (flags[8] == 0) copyBackground(2, 158, 208, 67, 27, 40, drawSurface3, screenSurface); } void DrasculaEngine::update_2(){ - int pos_murci[6]; + int batPos[6]; int difference; - int murci_x[] = {0, 38, 76, 114, 152, 190, 228, 266, + int batX[] = {0, 38, 76, 114, 152, 190, 228, 266, 0, 38, 76, 114, 152, 190, 228, 266, 0, 38, 76, 114, 152, 190, 0, 48, 96, 144, 192, 240, @@ -1197,7 +1193,7 @@ void DrasculaEngine::update_2(){ 88, 146, 204, 262, 88, 146, 204, 262}; - int murci_y[] = {179, 179, 179, 179, 179, 179, 179, 179, + int batY[] = {179, 179, 179, 179, 179, 179, 179, 179, 158, 158, 158, 158, 158, 158, 158, 158, 137, 137, 137, 137, 137, 137, 115, 115, 115, 115, 115, 115, @@ -1208,28 +1204,28 @@ void DrasculaEngine::update_2(){ if (frame_bat == 41) frame_bat = 0; - pos_murci[0] = murci_x[frame_bat]; - pos_murci[1] = murci_y[frame_bat]; + batPos[0] = batX[frame_bat]; + batPos[1] = batY[frame_bat]; if (frame_bat < 22) { - pos_murci[4] = 37; - pos_murci[5] = 21; + batPos[4] = 37; + batPos[5] = 21; } else if (frame_bat > 27) { - pos_murci[4] = 57; - pos_murci[5] = 36; + batPos[4] = 57; + batPos[5] = 36; } else { - pos_murci[4] = 47; - pos_murci[5] = 22; + batPos[4] = 47; + batPos[5] = 22; } - pos_murci[2] = 239; - pos_murci[3] = 19; + batPos[2] = 239; + batPos[3] = 19; - copyRectClip(pos_murci, drawSurface3, screenSurface); - difference = getTime() - conta_blind_vez; + copyRectClip(batPos, drawSurface3, screenSurface); + difference = getTime() - savedTime; if (difference >= 6) { frame_bat++; - conta_blind_vez = getTime(); + savedTime = getTime(); } copyRect(29, 37, 58, 114, 57, 39, drawSurface3, screenSurface); @@ -1248,16 +1244,13 @@ void DrasculaEngine::update_3() { } void DrasculaEngine::update_4() { - int cambio_col_antes = changeColor; - if (curX > 190) + if (curX > 190) { changeColor = 1; - else + setDarkPalette(); + } else { changeColor = 0; - - if (cambio_col_antes != changeColor && changeColor == 1) - hare_oscuro(); - if (cambio_col_antes != changeColor && changeColor == 0) - hare_claro(); + setBrightPalette(); + } } void DrasculaEngine::update_5_pre(){ @@ -1270,23 +1263,19 @@ void DrasculaEngine::update_5() { } void DrasculaEngine::update_6_pre() { - int cambio_col_antes = changeColor; - if ((curX > 149 && curY + curHeight > 160 && curX < 220 && curY + curHeight < 188) || - (curX > 75 && curY + curHeight > 183 && curX < 145)) + (curX > 75 && curY + curHeight > 183 && curX < 145)) { changeColor = 0; - else + setBrightPalette(); + } else { changeColor = 1; + setDarkPalette(); + } - if (cambio_col_antes != changeColor && changeColor == 1) - hare_oscuro(); - if (cambio_col_antes != changeColor && changeColor == 0) - hare_claro(); - - if (flags[1] == 0) - copyBackground(97, 117, 34, 148, 36, 31, drawSurface3, screenSurface); if (flags[0] == 0) copyBackground(3, 103, 185, 69, 23, 76, drawSurface3, screenSurface); + if (flags[1] == 0) + copyBackground(97, 117, 34, 148, 36, 31, drawSurface3, screenSurface); if (flags[2] == 0) copyBackground(28, 100, 219, 72, 64, 97, drawSurface3, screenSurface); } @@ -1297,16 +1286,16 @@ void DrasculaEngine::update_7_pre() { } void DrasculaEngine::update_9_pre() { - int blind_x[] = {26, 68, 110, 152, 194, 236, 278, 26, 68}; - int blind_y[] = {51, 51, 51, 51, 51, 51, 51, 127, 127}; + int blindX[] = {26, 68, 110, 152, 194, 236, 278, 26, 68}; + int blindY[] = {51, 51, 51, 51, 51, 51, 51, 127, 127}; int difference; - copyRect(blind_x[frame_blind], blind_y[frame_blind], 122, 57, 41, 72, drawSurface3, screenSurface); + copyRect(blindX[frame_blind], blindY[frame_blind], 122, 57, 41, 72, drawSurface3, screenSurface); if (flags[9] == 0) { - difference = getTime() - conta_blind_vez; + difference = getTime() - savedTime; if (difference >= 11) { frame_blind++; - conta_blind_vez = getTime(); + savedTime = getTime(); } if (frame_blind == 9) frame_blind = 0; @@ -1352,7 +1341,7 @@ void DrasculaEngine::update_14_pre() { if (flags[12] == 1) copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); - difference = getTime() - conta_blind_vez; + difference = getTime() - savedTime; if (difference > 6) { if (flags[12] == 1) { frame_drunk++; @@ -1370,7 +1359,7 @@ void DrasculaEngine::update_14_pre() { if (frame_piano == 9) frame_piano = 0; blinking = _rnd->getRandomNumber(10); - conta_blind_vez = getTime(); + savedTime = getTime(); } } @@ -1405,12 +1394,12 @@ void DrasculaEngine::update_18_pre() { } else moveVB(); - difference = getTime() - conta_blind_vez; + difference = getTime() - savedTime; if (difference > 9) { frame_snore++; if (frame_snore == 16) frame_snore = 0; - conta_blind_vez = getTime(); + savedTime = getTime(); } } @@ -1479,10 +1468,10 @@ void DrasculaEngine::update_26_pre() { if (blinking == 5 && flags[18] == 0) copyBackground(52, 172, 226, 106, 3, 4, drawSurface3, screenSurface); - difference = getTime() - conta_blind_vez; + difference = getTime() - savedTime; if (difference >= 10) { blinking = _rnd->getRandomNumber(10); - conta_blind_vez = getTime(); + savedTime = getTime(); } if (flags[20] == 1) @@ -1645,7 +1634,7 @@ void DrasculaEngine::update_60_pre() { if (flag_tv == 1) copyBackground(114, 158, 8, 30, 8, 23, drawSurface3, screenSurface); - difference = getTime() - conta_blind_vez; + difference = getTime() - savedTime; blinking = _rnd->getRandomNumber(7); if (blinking == 5 && flag_tv == 0) flag_tv = 1; @@ -1655,7 +1644,7 @@ void DrasculaEngine::update_60_pre() { frame_candles++; if (frame_candles == 3) frame_candles = 0; - conta_blind_vez = getTime(); + savedTime = getTime(); } } @@ -1694,7 +1683,7 @@ void DrasculaEngine::update_62_pre() { if (flags[12] == 1) copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); - difference = getTime() - conta_blind_vez; + difference = getTime() - savedTime; if (difference > 6) { if (flags[12] == 1) { frame_drunk++; @@ -1712,7 +1701,7 @@ void DrasculaEngine::update_62_pre() { if (frame_piano == 9) frame_piano = 0; blinking = _rnd->getRandomNumber(10); - conta_blind_vez = getTime(); + savedTime = getTime(); } } @@ -1750,12 +1739,12 @@ void DrasculaEngine::update_pendulum() { if (flags[1] == 0) copyRect(44, 145, 145, 105, 25, 29, drawSurface3, screenSurface); - difference = getTime() - conta_blind_vez; + difference = getTime() - savedTime; if (difference > 8) { frame_pen++; if (frame_pen == 17) frame_pen = 0; - conta_blind_vez = getTime(); + savedTime = getTime(); } } diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 3cd45a3253..8e71254cf1 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -115,7 +115,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { updateScreen(); } else if (talkerType == 3) { copyBackground(x_talk3[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface); - pon_hare(); + moveCharacters(); updateRefresh(); if (withVoices == 0) centerText(said, 221, 102); @@ -124,7 +124,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { pause(3); } else if (talkerType == 4) { copyBackground(x_talk4[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface); - pon_hare(); + moveCharacters(); updateRefresh(); if (withVoices == 0) centerText(said, 221, 102); @@ -172,7 +172,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) { placeIgor(); placeDrascula(); if (currentChapter == 6) - pon_hare(); + moveCharacters(); copyBackground(x_dr, y_dr, x_dr, y_dr, 38 + offset, 31, drawSurface1, screenSurface); if (currentChapter == 6) @@ -201,7 +201,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) { placeDrascula(); if (talkerType == 1 && currentChapter == 6) - pon_hare(); + moveCharacters(); updateScreen(); } @@ -281,7 +281,7 @@ void DrasculaEngine::talk_bartender(int index, int talkerType) { copyBackground(x_talk[face], 2, 121, 44, 21, 24, extraSurface, screenSurface); else copyBackground(x_talk[face], 130, 151, 43, 21, 24, drawSurface3, screenSurface); - pon_hare(); + moveCharacters(); updateRefresh(); if (withVoices == 0) @@ -321,7 +321,7 @@ void DrasculaEngine::talk_bj(int index) { copyRect(x_talk[face], 99, x_bj + 2, y_bj - 1, 27, 40, drawSurface3, screenSurface); - pon_hare(); + moveCharacters(); updateRefresh(); if (withVoices == 0) @@ -398,7 +398,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { (int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), screenSurface, drawSurface3); - pon_hare(); + moveCharacters(); if (currentChapter == 2) { if (!strcmp(menuBackground, "99.alg") || !strcmp(menuBackground, "994.alg")) @@ -487,7 +487,7 @@ void DrasculaEngine::talk_pianist(int index) { copyBackground(x_talk[face], 139, 228, 112, 47, 60, extraSurface, screenSurface); - pon_hare(); + moveCharacters(); updateRefresh(); if (withVoices == 0) @@ -533,7 +533,7 @@ void DrasculaEngine::talk_drunk(int index) { updateRefresh_pre(); copyBackground(x_talk[face], 29, 177, 50, 19, 19, frontSurface, screenSurface); - pon_hare(); + moveCharacters(); updateRefresh(); if (withVoices == 0) @@ -580,7 +580,7 @@ void DrasculaEngine::talk_vb(int index) { face = _rnd->getRandomNumber(5); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - pon_hare(); + moveCharacters(); moveVB(); copyBackground(OBJWIDTH + 1, 0, vbX + 5, 64, 25, 27, drawSurface3, screenSurface); @@ -723,7 +723,7 @@ void DrasculaEngine::talk_wolf(int index) { updateRefresh_pre(); copyBackground(x_talk[face], 136, 198, 81, 26, 24, drawSurface3, screenSurface); - pon_hare(); + moveCharacters(); updateRefresh(); if (withVoices == 0) @@ -758,7 +758,7 @@ void DrasculaEngine::talk_mus(int index) { updateRefresh_pre(); copyBackground(x_talk[face], 156, 190, 64, 18, 24, drawSurface3, screenSurface); - pon_hare(); + moveCharacters(); updateRefresh(); if (withVoices == 0) @@ -847,7 +847,7 @@ void DrasculaEngine::talk_bj_bed(int index) { copyBackground(65, 103, 65, 103, 49, 38, drawSurface1, screenSurface); copyRect(x_talk[face], 105, 65, 103, 49, 38, drawSurface3, screenSurface); - pon_hare(); + moveCharacters(); updateRefresh(); if (withVoices == 0) @@ -929,7 +929,7 @@ void DrasculaEngine::talk_sinc(const char *said, const char *filename, const cha else copyBackground(curX, curY, OBJWIDTH + 1, 0, (int)(((float)curWidth / 100) * factor_red[curY + curHeight]), (int)(((float)(talkHeight - 1) / 100) * factor_red[curY + curHeight]), screenSurface, drawSurface3); - pon_hare(); + moveCharacters(); if (currentChapter == 2) { if (curHeight != 56) copyBackground(OBJWIDTH + 1, 0, curX, curY, curWidth, talkHeight - 1, drawSurface3, screenSurface); -- cgit v1.2.3 From c0621fcc4e7851e6045df87a5c901c95dce8e6a2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 08:06:04 +0000 Subject: Merged para_grabar() with saveGame() sentido_igor -> trackIgor sentido_bj -> trackBJ svn-id: r32527 --- engines/drascula/animation.cpp | 8 ++++---- engines/drascula/drascula.cpp | 28 ++++++++++++---------------- engines/drascula/drascula.h | 5 ++--- 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 83f125edc5..f3ea1a3114 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -188,7 +188,7 @@ void DrasculaEngine::animation_1_1() { trackDrascula = 0; x_dr = 129; y_dr = 95; - sentido_igor = 1; + trackIgor = 1; igorX = 66; igorY = 97; @@ -356,7 +356,7 @@ void DrasculaEngine::animation_1_1() { talk_igor(5, kIgorDch); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - sentido_igor = 3; + trackIgor = 3; talk_drascula(17); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -463,7 +463,7 @@ void DrasculaEngine::animation_2_1() { factor_red[l] = 99; x_bj = 170; y_bj = 90; - sentido_bj = 0; + trackBJ = 0; curX = 91; curY = 95; trackProtagonist = 1; @@ -1929,7 +1929,7 @@ void DrasculaEngine::animation_1_6() { animation_5_6(); talk_drascula(32, 1); talk_igor(11, kIgorDch); - sentido_igor = 3; + trackIgor = 3; talk_drascula(33, 1); talk_igor(12, kIgorFront); talk_drascula(34, 1); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index a7b39ef70c..4322cbbda1 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -180,7 +180,7 @@ int DrasculaEngine::go() { loadPic("97.alg", extraSurface, 1); loadPic("99.alg", backSurface, 1); } else if (currentChapter == 6) { - igorX = 105, igorY = 85, sentido_igor = 1; + igorX = 105, igorY = 85, trackIgor = 1; x_dr = 62, y_dr = 99, trackDrascula = 1; frame_pen = 0; flag_tv = 0; @@ -1406,7 +1406,7 @@ bool DrasculaEngine::saves() { strcpy(names[n], select); if (selectionMade == 1) { snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1); - para_grabar(file); + saveGame(file); Common::OutSaveFile *tsav; if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { error("Can't open %s file", fileEpa); @@ -1449,7 +1449,7 @@ bool DrasculaEngine::saves() { return false; break; } else if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149 && selectionMade == 1) { - para_grabar(file); + saveGame(file); Common::OutSaveFile *tsav; if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { error("Can't open %s file", fileEpa); @@ -1910,9 +1910,9 @@ void DrasculaEngine::placeIgor() { if (currentChapter == 4) { pos_igor[1] = 138; } else { - if (sentido_igor == 3) + if (trackIgor == 3) pos_igor[1] = 138; - else if (sentido_igor == 1) + else if (trackIgor == 1) pos_igor[1] = 76; } pos_igor[2] = igorX; @@ -1947,9 +1947,9 @@ void DrasculaEngine::placeDrascula() { void DrasculaEngine::placeBJ() { int pos_bj[6]; - if (sentido_bj == 3) + if (trackBJ == 3) pos_bj[0] = 10; - else if (sentido_bj == 0) + else if (trackBJ == 0) pos_bj[0] = 37; pos_bj[1] = 99; pos_bj[2] = x_bj; @@ -2568,8 +2568,7 @@ bool DrasculaEngine::exitRoom(int l) { } bool DrasculaEngine::pickupObject() { - int h, n; - h = pickedObject; + int h = pickedObject; checkFlags = 1; updateRoom(); @@ -2578,7 +2577,7 @@ bool DrasculaEngine::pickupObject() { // Objects with an ID smaller than 7 are the inventory verbs if (pickedObject >= 7) { - for (n = 1; n < 43; n++) { + for (int n = 1; n < 43; n++) { if (whichObject() == n && inventoryObjects[n] == 0) { inventoryObjects[n] = h; takeObject = 0; @@ -2659,12 +2658,6 @@ void DrasculaEngine::enterName() { } } -void DrasculaEngine::para_grabar(char gameName[]) { - saveGame(gameName); - playSound(99); - finishSound(); -} - void DrasculaEngine::openSSN(const char *Name, int Pause) { MiVideoSSN = (byte *)malloc(64256); globalSpeed = 1000 / Pause; @@ -3032,6 +3025,9 @@ void DrasculaEngine::saveGame(char gameName[]) { warning("Can't write file '%s'. (Disk full?)", gameName); delete out; + + playSound(99); + finishSound(); } void DrasculaEngine::increaseFrameNum() { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index f40517ca0d..2194b50fc0 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -283,9 +283,9 @@ public: int frame_candles; int color_solo; int blinking; - int igorX, igorY, sentido_igor; + int igorX, igorY, trackIgor; int x_dr, y_dr, trackDrascula; - int x_bj, y_bj, sentido_bj; + int x_bj, y_bj, trackBJ; int cont_sv; int term_int; int currentChapter; @@ -400,7 +400,6 @@ public: bool checkFlag(int); void setCursorTable(); void enterName(); - void para_grabar(char[]); bool soundIsActive(); void openSSN(const char *Name, int Pause); void WaitFrameSSN(); -- cgit v1.2.3 From e7f8ef11a9901f157aa81ec2d53a246439edc08b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 09:02:23 +0000 Subject: carga_escoba -> enterNewRoom talk_sinc -> talk_sync n_ejec2 -> savedChapter Removed updatePalette() Simplified enterNewRoom() Merged para_cargar() and loadGame() Slight cleanup to withoutVerb() Removed set_dac and set_dacSSN svn-id: r32528 --- engines/drascula/animation.cpp | 12 ++-- engines/drascula/drascula.cpp | 126 ++++++++++++++++------------------------- engines/drascula/drascula.h | 8 +-- engines/drascula/rooms.cpp | 8 +-- engines/drascula/talk.cpp | 2 +- 5 files changed, 63 insertions(+), 93 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index f3ea1a3114..88bcc1d24d 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -1762,7 +1762,7 @@ void DrasculaEngine::animation_12_5() { animate("frel.bin", 16); clearRoom(); setBrightPalette(); - updatePalette(); + setPalette((byte *)&gamePalette); flags[1] = 1; @@ -1785,7 +1785,7 @@ void DrasculaEngine::animation_12_5() { curX = -1; objExit = 104; withoutVerb(); - carga_escoba("57.ald"); + enterNewRoom(57); } void DrasculaEngine::animation_13_5() { @@ -1940,7 +1940,7 @@ void DrasculaEngine::animation_1_6() { textSurface = extraSurface; clearRoom(); - carga_escoba("102.ald"); + enterNewRoom(102); activatePendulum(); } @@ -1996,7 +1996,7 @@ void DrasculaEngine::animation_6_6() { objExit = 104; curX = -1; withoutVerb(); - carga_escoba("58.ald"); + enterNewRoom(58); hare_se_ve = 1; trackProtagonist = 1; animate("hbp.bin", 14); @@ -2023,7 +2023,7 @@ void DrasculaEngine::animation_9_6() { clearRoom(); curX = -1; objExit = 108; - carga_escoba("59.ald"); + enterNewRoom(59); // The room number was originally changed here to "nada.alg", // which is a non-existant file. In reality, this was just a // hack to set the room number to a non-existant one, so that @@ -2503,7 +2503,7 @@ void DrasculaEngine::animation_5_2() { loadPic("aux5.alg", drawSurface3, 1); flags[8] = 1; curX = curX - 4; - talk_sinc(_text[_lang][46], "46.als", "4442444244244"); + talk_sync(_text[_lang][46], "46.als", "4442444244244"); withoutVerb(); } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 4322cbbda1..b6db1bf74f 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -301,7 +301,7 @@ void DrasculaEngine::setRGB(byte *dir_lectura, int plt) { gamePalette[x][1] = dir_lectura[cnt++] / 4; gamePalette[x][2] = dir_lectura[cnt++] / 4; } - updatePalette(); + setPalette((byte *)&gamePalette); } void DrasculaEngine::black() { @@ -319,10 +319,6 @@ void DrasculaEngine::black() { setPalette((byte *)&palNegra); } -void DrasculaEngine::updatePalette() { - setPalette((byte *)&gamePalette); -} - void DrasculaEngine::setPalette(byte *PalBuf) { byte pal[256 * 4]; int i; @@ -453,11 +449,11 @@ bool DrasculaEngine::escoba() { trackProtagonist = 1; objExit = 104; if (hay_que_load != 0) { - if (!para_cargar(saveName)) { + if (!loadGame(saveName)) { return true; } } else { - carga_escoba("62.ald"); + enterNewRoom(62); curX = -20; curY = 56; gotoObject(65, 145); @@ -467,9 +463,9 @@ bool DrasculaEngine::escoba() { trackProtagonist = 3; objExit = 162; if (hay_que_load == 0) - carga_escoba("14.ald"); + enterNewRoom(14); else { - if (!para_cargar(saveName)) { + if (!loadGame(saveName)) { return true; } } @@ -485,9 +481,9 @@ bool DrasculaEngine::escoba() { trackProtagonist = 1; objExit = 99; if (hay_que_load == 0) - carga_escoba("20.ald"); + enterNewRoom(20); else { - if (!para_cargar(saveName)) { + if (!loadGame(saveName)) { return true; } } @@ -498,12 +494,12 @@ bool DrasculaEngine::escoba() { addObject(22); objExit = 100; if (hay_que_load == 0) { - carga_escoba("21.ald"); + enterNewRoom(21); trackProtagonist = 0; curX = 235; curY = 164; } else { - if (!para_cargar(saveName)) { + if (!loadGame(saveName)) { return true; } } @@ -520,9 +516,9 @@ bool DrasculaEngine::escoba() { trackProtagonist = 1; objExit = 100; if (hay_que_load == 0) { - carga_escoba("45.ald"); + enterNewRoom(45); } else { - if (!para_cargar(saveName)) { + if (!loadGame(saveName)) { return true; } } @@ -533,10 +529,10 @@ bool DrasculaEngine::escoba() { trackProtagonist = 1; objExit = 104; if (hay_que_load == 0) { - carga_escoba("58.ald"); + enterNewRoom(58); animation_1_6(); } else { - if (!para_cargar(saveName)) { + if (!loadGame(saveName)) { return true; } loadPic("auxdr.alg", drawSurface2, 1); @@ -743,9 +739,8 @@ int DrasculaEngine::removeObject(int osj) { } void DrasculaEngine::withoutVerb() { - int c = 171; - if (menuScreen == 1) - c = 0; + int c = (menuScreen == 1) ? 0 : 171; + if (currentChapter == 5) { if (takeObject == 1 && pickedObject != 16) addObject(pickedObject); @@ -759,22 +754,6 @@ void DrasculaEngine::withoutVerb() { hasName = 0; } -bool DrasculaEngine::para_cargar(char gameName[]) { - previousMusic = roomMusic; - menuScreen = 0; - if (currentChapter != 1) - clearRoom(); - if (!loadGame(gameName)) - return false; - if (currentChapter == 2 || currentChapter == 3 || currentChapter == 5) { - // - } - carga_escoba(currentData); - withoutVerb(); - - return true; -} - char *DrasculaEngine::getLine(char *buf, int len) { byte c; char *b; @@ -808,7 +787,9 @@ void DrasculaEngine::getStringFromLine(char *buf, int len, char* result) { sscanf(buf, "%s", result); } -void DrasculaEngine::carga_escoba(const char *fileName) { +void DrasculaEngine::enterNewRoom(int index) { + char fileName[20]; + sprintf(fileName, "%d.ald", index); int soc, l, martin = 0, objIsExit = 0; float chiquez = 0, pequegnez = 0; char pant1[20], pant2[20], pant3[20], pant4[20]; @@ -1445,7 +1426,7 @@ bool DrasculaEngine::saves() { } if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149 && selectionMade == 1) { - if (!para_cargar(file)) + if (!loadGame(file)) return false; break; } else if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149 && selectionMade == 1) { @@ -1851,7 +1832,7 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { memcpy(VGA, AuxBuffDes, 64000); _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); _system->updateScreen(); - set_dac(cPal); + setPalette(cPal); memcpy(AuxBuffLast, AuxBuffDes, 64000); WaitForNext(FPS); while (cnt < NFrames) { @@ -2033,17 +2014,22 @@ void DrasculaEngine::updateRoom() { } bool DrasculaEngine::loadGame(const char *gameName) { - int l, n_ejec2; + int l, savedChapter, roomNum = 0; Common::InSaveFile *sav; + previousMusic = roomMusic; + menuScreen = 0; + if (currentChapter != 1) + clearRoom(); + if (!(sav = _saveFileMan->openForLoading(gameName))) { error("missing savegame file"); } - n_ejec2 = sav->readSint32LE(); - if (n_ejec2 != currentChapter) { + savedChapter = sav->readSint32LE(); + if (savedChapter != currentChapter) { strcpy(saveName, gameName); - currentChapter = n_ejec2 - 1; + currentChapter = savedChapter - 1; hay_que_load = 1; return false; } @@ -2063,6 +2049,9 @@ bool DrasculaEngine::loadGame(const char *gameName) { takeObject = sav->readSint32LE(); pickedObject = sav->readSint32LE(); hay_que_load = 0; + sscanf(currentData, "%d.ald", &roomNum); + enterNewRoom(roomNum); + withoutVerb(); return true; } @@ -2153,7 +2142,7 @@ void DrasculaEngine::setDefaultPalette() { gamePalette[color][component] = defaultPalette[color][component]; } } - updatePalette(); + setPalette((byte *)&gamePalette); } void DrasculaEngine::setBrightPalette() { @@ -2164,7 +2153,7 @@ void DrasculaEngine::setBrightPalette() { gamePalette[color][component] = brightPalette[color][component]; } - updatePalette(); + setPalette((byte *)&gamePalette); } void DrasculaEngine::setDarkPalette() { @@ -2174,7 +2163,7 @@ void DrasculaEngine::setDarkPalette() { for (component = 0; component < 3; component++) gamePalette[color][component] = darkPalette[color][component]; - updatePalette(); + setPalette((byte *)&gamePalette); } void DrasculaEngine::setPaletteBase(int darkness) { @@ -2188,7 +2177,7 @@ void DrasculaEngine::setPaletteBase(int darkness) { } } - updatePalette(); + setPalette((byte *)&gamePalette); } void DrasculaEngine::startWalking() { @@ -2422,7 +2411,7 @@ void DrasculaEngine::removeObject() { } bool DrasculaEngine::exitRoom(int l) { - char roomExit[13]; + int roomNum = 0; if (currentChapter == 1) { if (objectNum[l] == 105 && flags[0] == 0) @@ -2445,10 +2434,9 @@ bool DrasculaEngine::exitRoom(int l) { return true; } clearRoom(); - strcpy(roomExit, _targetSurface[l]); - strcat(roomExit, ".ald"); + sscanf(_targetSurface[l], "%d", &roomNum); curX = -1; - carga_escoba(roomExit); + enterNewRoom(roomNum); } } } else if (currentChapter == 2) { @@ -2477,11 +2465,9 @@ bool DrasculaEngine::exitRoom(int l) { addObject(11); } clearRoom(); - - strcpy(roomExit, _targetSurface[l]); - strcat(roomExit, ".ald"); + sscanf(_targetSurface[l], "%d", &roomNum); curX =- 1; - carga_escoba(roomExit); + enterNewRoom(roomNum); } } else if (currentChapter == 3) { updateDoor(l); @@ -2496,10 +2482,9 @@ bool DrasculaEngine::exitRoom(int l) { doBreak = 1; previousMusic = roomMusic; clearRoom(); - strcpy(roomExit, _targetSurface[l]); - strcat(roomExit, ".ald"); + sscanf(_targetSurface[l], "%d", &roomNum); curX =- 1; - carga_escoba(roomExit); + enterNewRoom(roomNum); } } else if (currentChapter == 4) { updateDoor(l); @@ -2517,10 +2502,9 @@ bool DrasculaEngine::exitRoom(int l) { if (objectNum[l] == 108) gotoObject(171, 78); clearRoom(); - strcpy(roomExit, _targetSurface[l]); - strcat(roomExit, ".ald"); + sscanf(_targetSurface[l], "%d", &roomNum); curX = -1; - carga_escoba(roomExit); + enterNewRoom(roomNum); } } else if (currentChapter == 5) { updateDoor(l); @@ -2536,10 +2520,9 @@ bool DrasculaEngine::exitRoom(int l) { previousMusic = roomMusic; hare_se_ve = 1; clearRoom(); - strcpy(roomExit, _targetSurface[l]); - strcat(roomExit, ".ald"); + sscanf(_targetSurface[l], "%d", &roomNum); curX = -1; - carga_escoba(roomExit); + enterNewRoom(roomNum); } } else if (currentChapter == 6) { updateDoor(l); @@ -2554,10 +2537,9 @@ bool DrasculaEngine::exitRoom(int l) { doBreak = 1; previousMusic = roomMusic; clearRoom(); - strcpy(roomExit, _targetSurface[l]); - strcat(roomExit, ".ald"); + sscanf(_targetSurface[l], "%d", &roomNum); curX = -1; - carga_escoba(roomExit); + enterNewRoom(roomNum); if (objExit == 105) animation_19_6(); @@ -2690,7 +2672,7 @@ int DrasculaEngine::playFrameSSN() { memcpy(dacSSN, mSession, 768); mSession += 768; } - set_dacSSN(dacSSN); + setPalette(dacSSN); break; case kFrameEmptyFrame: WaitFrameSSN(); @@ -2789,10 +2771,6 @@ byte *DrasculaEngine::TryInMem() { return pointer; } -void DrasculaEngine::set_dacSSN(byte *PalBuf) { - setPalette((byte *)PalBuf); -} - void DrasculaEngine::Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght) { int x = 0; unsigned char Reps; @@ -2867,10 +2845,6 @@ byte *DrasculaEngine::loadPCX(byte *NamePcc) { return AuxBuffDes; } -void DrasculaEngine::set_dac(byte *dac) { - setPalette((byte *)dac); -} - void DrasculaEngine::WaitForNext(int FPS) { _system->delayMillis(1000 / FPS); } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 2194b50fc0..a28e095bdd 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -185,7 +185,6 @@ public: void setRGB(byte *dir_lectura, int plt); void assignDefaultPalette(); - void updatePalette(); void setPalette(byte *PalBuf); void copyBackground(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *src, byte *dest); @@ -315,8 +314,7 @@ public: void setDarkPalette(); void withoutVerb(); - bool para_cargar(char[]); - void carga_escoba(const char *); + void enterNewRoom(int); void clearRoom(); void gotoObject(int, int); void moveCursor(); @@ -361,7 +359,7 @@ public: void talk_baul(int); void talk(int); void talk(const char *, const char *); - void talk_sinc(const char *, const char *, const char *); + void talk_sync(const char *, const char *, const char *); void talk_drunk(int); void talk_pianist(int); void talk_wolf(int); @@ -406,7 +404,6 @@ public: void MixVideo(byte *OldScreen, byte *NewScreen); void Des_RLE(byte *BufferRLE, byte *MiVideoRLE); void Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght); - void set_dacSSN(byte *dacSSN); byte *TryInMem(); void EndSSN(); int playFrameSSN(); @@ -429,7 +426,6 @@ public: int flag_tv; byte *loadPCX(byte *NamePcc); - void set_dac(byte *dac); void WaitForNext(int FPS); int getTime(); void reduce_hare_chico(int, int, int, int, int, int, int, byte *, byte *); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 87b1b4f4e6..b52979a0de 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -99,9 +99,9 @@ void DrasculaEngine::room_3(int fl) { if (pickedObject == kVerbTalk && fl == 129) { talk(23); pause(6); - talk_sinc(_text[_lang][50], "50.als", "11111111111144432554433"); + talk_sync(_text[_lang][50], "50.als", "11111111111144432554433"); } else if (pickedObject == kVerbTalk && fl == 133) { - talk_sinc(_text[_lang][322], "322.als", "13333334125433333333"); + talk_sync(_text[_lang][322], "322.als", "13333334125433333333"); updateRoom(); updateScreen(); pause(25); @@ -326,7 +326,7 @@ void DrasculaEngine::room_15(int fl) { talk(336); trackProtagonist = 3; talk(337); - talk_sinc(_text[_lang][46], "46.als", "4442444244244"); + talk_sync(_text[_lang][46], "46.als", "4442444244244"); trackProtagonist = 1; } else if (pickedObject == 18 && fl == 188 && flags[26] == 0) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -361,7 +361,7 @@ void DrasculaEngine::room_16(int fl) { else if (pickedObject == kVerbTalk && fl == 183) { talk(341); pause(10); - talk_sinc(_text[_lang][50], "50.als", "11111111111144432554433"); + talk_sync(_text[_lang][50], "50.als", "11111111111144432554433"); pause(3); talk_baul(83); } else if (pickedObject == kVerbOpen && fl == 183) { diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 8e71254cf1..c3861524d4 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -901,7 +901,7 @@ void DrasculaEngine::talk_htel(int index) { updateScreen(); } -void DrasculaEngine::talk_sinc(const char *said, const char *filename, const char *syncChar) { +void DrasculaEngine::talk_sync(const char *said, const char *filename, const char *syncChar) { int talkOffset = 1; int y_mask_talk = 170; int p, face = 0; -- cgit v1.2.3 From 73832f2edd82ca25bf25c15b43b1678e4ac4c32d Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Wed, 4 Jun 2008 09:07:55 +0000 Subject: * Implemented character change opcodes in BRA * Fixed loading of dialogue characters in BRA svn-id: r32529 --- engines/parallaction/disk.h | 2 +- engines/parallaction/disk_br.cpp | 27 +++++++++++++++++---------- engines/parallaction/exec_br.cpp | 3 ++- engines/parallaction/parallaction.h | 2 +- engines/parallaction/parallaction_br.cpp | 8 +++++++- engines/parallaction/parser.h | 1 + engines/parallaction/parser_br.cpp | 8 +++++++- 7 files changed, 36 insertions(+), 15 deletions(-) diff --git a/engines/parallaction/disk.h b/engines/parallaction/disk.h index 21ff4aba76..b76c66aead 100644 --- a/engines/parallaction/disk.h +++ b/engines/parallaction/disk.h @@ -209,7 +209,7 @@ protected: protected: void errorFileNotFound(const char *s); Font *createFont(const char *name, Common::ReadStream &stream); - Sprites* createSprites(const char *name); + Sprites* createSprites(Common::ReadStream &stream); void loadBitmap(Common::SeekableReadStream &stream, Graphics::Surface &surf, byte *palette); public: diff --git a/engines/parallaction/disk_br.cpp b/engines/parallaction/disk_br.cpp index e4c4ce7492..5e88327879 100644 --- a/engines/parallaction/disk_br.cpp +++ b/engines/parallaction/disk_br.cpp @@ -139,12 +139,19 @@ DosDisk_br::~DosDisk_br() { } Frames* DosDisk_br::loadTalk(const char *name) { - debugC(5, kDebugDisk, "DosDisk_br::loadTalk"); + debugC(5, kDebugDisk, "DosDisk_br::loadTalk(%s)", name); + + Common::File stream; char path[PATH_LEN]; - sprintf(path, "%s/tal/%s.tal", _partPath, name); + sprintf(path, "%s/tal/%s", _partPath, name); + if (!stream.open(path)) { + sprintf(path, "%s/tal/%s.tal", _partPath, name); + if (!stream.open(path)) + errorFileNotFound(path); + } - return createSprites(path); + return createSprites(stream); } Script* DosDisk_br::loadLocation(const char *name) { @@ -252,12 +259,7 @@ Frames* DosDisk_br::loadStatic(const char* name) { return new SurfaceToFrames(surf); } -Sprites* DosDisk_br::createSprites(const char *path) { - - Common::File stream; - if (!stream.open(path)) { - errorFileNotFound(path); - } +Sprites* DosDisk_br::createSprites(Common::ReadStream &stream) { uint16 num = stream.readUint16LE(); @@ -284,7 +286,12 @@ Frames* DosDisk_br::loadFrames(const char* name) { char path[PATH_LEN]; sprintf(path, "%s/ani/%s", _partPath, name); - return createSprites(path); + Common::File stream; + if (!stream.open(path)) + errorFileNotFound(path); + + + return createSprites(stream); } // Slides in Nippon Safes are basically screen-sized pictures with valid diff --git a/engines/parallaction/exec_br.cpp b/engines/parallaction/exec_br.cpp index 2aeec6358d..3b67b4c370 100644 --- a/engines/parallaction/exec_br.cpp +++ b/engines/parallaction/exec_br.cpp @@ -176,7 +176,8 @@ DECLARE_COMMAND_OPCODE(stop) { DECLARE_COMMAND_OPCODE(character) { - warning("Parallaction_br::cmdOp_character not yet implemented"); + debugC(9, kDebugExec, "Parallaction_br::cmdOp_character(%s)", _cmdRunCtxt.cmd->u._string); + changeCharacter(_cmdRunCtxt.cmd->u._string); } diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h index 63042a8882..6e5957d3cd 100644 --- a/engines/parallaction/parallaction.h +++ b/engines/parallaction/parallaction.h @@ -654,6 +654,7 @@ public: public: typedef void (Parallaction_br::*Callable)(void*); virtual void callFunction(uint index, void* parm); + void changeCharacter(const char *name); public: Table *_countersNames; @@ -688,7 +689,6 @@ private: void setInventoryCursor(int pos); void changeLocation(char *location); - void changeCharacter(const char *name); void runPendingZones(); void initPart(); diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 62cc702222..057664e03d 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -202,7 +202,7 @@ void Parallaction_br::runPendingZones() { if (_activeZone) { z = _activeZone; // speak Zone or sound _activeZone = nullZonePtr; -// runZone(z); // FIXME: BRA doesn't handle sound yet + runZone(z); // FIXME: BRA doesn't handle sound yet } if (_activeZone2) { @@ -281,7 +281,13 @@ void Parallaction_br::loadProgram(AnimationPtr a, const char *filename) { void Parallaction_br::changeCharacter(const char *name) { + const char *charName = _char.getName(); + if (!stricmp(charName, name)) { + return; + } + _char.setName(name); + _char._talk = _disk->loadTalk(name); } diff --git a/engines/parallaction/parser.h b/engines/parallaction/parser.h index 22d3119d87..d488cf9b58 100644 --- a/engines/parallaction/parser.h +++ b/engines/parallaction/parser.h @@ -131,6 +131,7 @@ protected: char *bgName; char *maskName; char *pathName; + char *characterName; } ctxt; void warning_unexpected(); diff --git a/engines/parallaction/parser_br.cpp b/engines/parallaction/parser_br.cpp index cebda4b5ed..51da7eb396 100644 --- a/engines/parallaction/parser_br.cpp +++ b/engines/parallaction/parser_br.cpp @@ -442,7 +442,7 @@ DECLARE_LOCATION_PARSER(redundant) { DECLARE_LOCATION_PARSER(character) { debugC(7, kDebugParser, "LOCATION_PARSER(character) "); -// changeCharacter(character); + ctxt.characterName = strdup(_tokens[0]); } @@ -1113,15 +1113,21 @@ void LocationParser_br::parse(Script *script) { ctxt.bgName = 0; ctxt.maskName = 0; ctxt.pathName = 0; + ctxt.characterName = 0; LocationParser_ns::parse(script); _vm->_gfx->setBackground(kBackgroundLocation, ctxt.bgName, ctxt.maskName, ctxt.pathName); _vm->_pathBuffer = &_vm->_gfx->_backgroundInfo.path; + if (ctxt.characterName) { + _vm->changeCharacter(ctxt.characterName); + } + free(ctxt.bgName); free(ctxt.maskName); free(ctxt.pathName); + free(ctxt.characterName); } -- cgit v1.2.3 From 08566b44b835edd97067bd50f7aff9fb6c7146e0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 09:08:37 +0000 Subject: enterNewRoom -> enterRoom Added debug output when entering/exiting rooms svn-id: r32530 --- engines/drascula/animation.cpp | 8 ++++---- engines/drascula/drascula.cpp | 34 +++++++++++++++++++--------------- engines/drascula/drascula.h | 2 +- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 88bcc1d24d..07cc2fd6c9 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -1785,7 +1785,7 @@ void DrasculaEngine::animation_12_5() { curX = -1; objExit = 104; withoutVerb(); - enterNewRoom(57); + enterRoom(57); } void DrasculaEngine::animation_13_5() { @@ -1940,7 +1940,7 @@ void DrasculaEngine::animation_1_6() { textSurface = extraSurface; clearRoom(); - enterNewRoom(102); + enterRoom(102); activatePendulum(); } @@ -1996,7 +1996,7 @@ void DrasculaEngine::animation_6_6() { objExit = 104; curX = -1; withoutVerb(); - enterNewRoom(58); + enterRoom(58); hare_se_ve = 1; trackProtagonist = 1; animate("hbp.bin", 14); @@ -2023,7 +2023,7 @@ void DrasculaEngine::animation_9_6() { clearRoom(); curX = -1; objExit = 108; - enterNewRoom(59); + enterRoom(59); // The room number was originally changed here to "nada.alg", // which is a non-existant file. In reality, this was just a // hack to set the room number to a non-existant one, so that diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index b6db1bf74f..dff32725f3 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -453,7 +453,7 @@ bool DrasculaEngine::escoba() { return true; } } else { - enterNewRoom(62); + enterRoom(62); curX = -20; curY = 56; gotoObject(65, 145); @@ -463,7 +463,7 @@ bool DrasculaEngine::escoba() { trackProtagonist = 3; objExit = 162; if (hay_que_load == 0) - enterNewRoom(14); + enterRoom(14); else { if (!loadGame(saveName)) { return true; @@ -481,7 +481,7 @@ bool DrasculaEngine::escoba() { trackProtagonist = 1; objExit = 99; if (hay_que_load == 0) - enterNewRoom(20); + enterRoom(20); else { if (!loadGame(saveName)) { return true; @@ -494,7 +494,7 @@ bool DrasculaEngine::escoba() { addObject(22); objExit = 100; if (hay_que_load == 0) { - enterNewRoom(21); + enterRoom(21); trackProtagonist = 0; curX = 235; curY = 164; @@ -516,7 +516,7 @@ bool DrasculaEngine::escoba() { trackProtagonist = 1; objExit = 100; if (hay_que_load == 0) { - enterNewRoom(45); + enterRoom(45); } else { if (!loadGame(saveName)) { return true; @@ -529,7 +529,7 @@ bool DrasculaEngine::escoba() { trackProtagonist = 1; objExit = 104; if (hay_que_load == 0) { - enterNewRoom(58); + enterRoom(58); animation_1_6(); } else { if (!loadGame(saveName)) { @@ -787,9 +787,11 @@ void DrasculaEngine::getStringFromLine(char *buf, int len, char* result) { sscanf(buf, "%s", result); } -void DrasculaEngine::enterNewRoom(int index) { +void DrasculaEngine::enterRoom(int roomIndex) { + debug(2, "Entering room %d", roomIndex); + char fileName[20]; - sprintf(fileName, "%d.ald", index); + sprintf(fileName, "%d.ald", roomIndex); int soc, l, martin = 0, objIsExit = 0; float chiquez = 0, pequegnez = 0; char pant1[20], pant2[20], pant3[20], pant4[20]; @@ -2050,7 +2052,7 @@ bool DrasculaEngine::loadGame(const char *gameName) { pickedObject = sav->readSint32LE(); hay_que_load = 0; sscanf(currentData, "%d.ald", &roomNum); - enterNewRoom(roomNum); + enterRoom(roomNum); withoutVerb(); return true; @@ -2411,6 +2413,8 @@ void DrasculaEngine::removeObject() { } bool DrasculaEngine::exitRoom(int l) { + debug(2, "Exiting room from door %d", l); + int roomNum = 0; if (currentChapter == 1) { @@ -2436,7 +2440,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); sscanf(_targetSurface[l], "%d", &roomNum); curX = -1; - enterNewRoom(roomNum); + enterRoom(roomNum); } } } else if (currentChapter == 2) { @@ -2467,7 +2471,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); sscanf(_targetSurface[l], "%d", &roomNum); curX =- 1; - enterNewRoom(roomNum); + enterRoom(roomNum); } } else if (currentChapter == 3) { updateDoor(l); @@ -2484,7 +2488,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); sscanf(_targetSurface[l], "%d", &roomNum); curX =- 1; - enterNewRoom(roomNum); + enterRoom(roomNum); } } else if (currentChapter == 4) { updateDoor(l); @@ -2504,7 +2508,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); sscanf(_targetSurface[l], "%d", &roomNum); curX = -1; - enterNewRoom(roomNum); + enterRoom(roomNum); } } else if (currentChapter == 5) { updateDoor(l); @@ -2522,7 +2526,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); sscanf(_targetSurface[l], "%d", &roomNum); curX = -1; - enterNewRoom(roomNum); + enterRoom(roomNum); } } else if (currentChapter == 6) { updateDoor(l); @@ -2539,7 +2543,7 @@ bool DrasculaEngine::exitRoom(int l) { clearRoom(); sscanf(_targetSurface[l], "%d", &roomNum); curX = -1; - enterNewRoom(roomNum); + enterRoom(roomNum); if (objExit == 105) animation_19_6(); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index a28e095bdd..7034fad43b 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -314,7 +314,7 @@ public: void setDarkPalette(); void withoutVerb(); - void enterNewRoom(int); + void enterRoom(int); void clearRoom(); void gotoObject(int, int); void moveCursor(); -- cgit v1.2.3 From 2f92ebde2ba996660ad6e39eea89232774972190 Mon Sep 17 00:00:00 2001 From: Nicola Mettifogo Date: Wed, 4 Jun 2008 09:39:38 +0000 Subject: oops. Changed stricmp to scumm_stricmp from last commit. svn-id: r32531 --- engines/parallaction/parallaction_br.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/parallaction/parallaction_br.cpp b/engines/parallaction/parallaction_br.cpp index 057664e03d..0f5cc2a0c4 100644 --- a/engines/parallaction/parallaction_br.cpp +++ b/engines/parallaction/parallaction_br.cpp @@ -282,7 +282,7 @@ void Parallaction_br::loadProgram(AnimationPtr a, const char *filename) { void Parallaction_br::changeCharacter(const char *name) { const char *charName = _char.getName(); - if (!stricmp(charName, name)) { + if (!scumm_stricmp(charName, name)) { return; } -- cgit v1.2.3 From 7e2e283a0ec7d7ecb6d27cb79f430ac2f0d8a102 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 09:56:41 +0000 Subject: Fixed regression from commit #32507 svn-id: r32532 --- engines/drascula/drascula.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index dff32725f3..f434d9d0e5 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1120,7 +1120,7 @@ void DrasculaEngine::checkObjects() { void DrasculaEngine::selectVerbFromBar() { for (int n = 0; n < 7; n++) { - if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1]) { + if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1] && n > 0) { selectVerb(n); return; } -- cgit v1.2.3 From 052d6f6bff3ec786cfa121cbd5648da85f9d6630 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 10:27:10 +0000 Subject: releaseGame() -> quitGame() nivel_osc -> palLevel Simplified calls to loadPic() svn-id: r32533 --- engines/drascula/animation.cpp | 316 ++++++++++++++++++++--------------------- engines/drascula/drascula.cpp | 116 +++++++-------- engines/drascula/drascula.h | 12 +- engines/drascula/rooms.cpp | 14 +- engines/drascula/talk.cpp | 10 +- 5 files changed, 235 insertions(+), 233 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 07cc2fd6c9..2217edf2a3 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -119,10 +119,10 @@ void DrasculaEngine::animation_1_1() { break; clearRoom(); - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("103.alg", drawSurface1, HALF_PAL); - loadPic("104.alg", drawSurface3, 1); - loadPic("aux104.alg", drawSurface2, 1); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(103, drawSurface1, HALF_PAL); + loadPic(104, drawSurface3); + loadPic("aux104.alg", drawSurface2); playMusic(4); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -182,9 +182,9 @@ void DrasculaEngine::animation_1_1() { clearRoom(); - loadPic("100.alg", drawSurface1, HALF_PAL); - loadPic("auxigor.alg", frontSurface, 1); - loadPic("auxdr.alg", backSurface, 1); + loadPic(100, drawSurface1, HALF_PAL); + loadPic("auxigor.alg", frontSurface); + loadPic("auxdr.alg", backSurface); trackDrascula = 0; x_dr = 129; y_dr = 95; @@ -252,7 +252,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); - loadPic("100.alg", drawSurface1, HALF_PAL); + loadPic(100, drawSurface1, HALF_PAL); MusicFadeout(); stopMusic(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -377,8 +377,8 @@ void DrasculaEngine::animation_1_1() { term_int = 1; } clearRoom(); - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("99.alg", backSurface, 1); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(99, backSurface); } void DrasculaEngine::animation_2_1() { @@ -399,7 +399,7 @@ void DrasculaEngine::animation_2_1() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface, 1); + loadPic("an11y13.alg", extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -410,7 +410,7 @@ void DrasculaEngine::animation_2_1() { if (_lang == kSpanish) textSurface = extraSurface; - loadPic("97.alg", extraSurface, 1); + loadPic(97, extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -448,10 +448,10 @@ void DrasculaEngine::animation_2_1() { break; clearRoom(); - loadPic("16.alg", drawSurface1, HALF_PAL); + loadPic(16, drawSurface1, HALF_PAL); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - loadPic("auxbj.alg", drawSurface3, 1); + loadPic("auxbj.alg", drawSurface3); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -471,7 +471,7 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - loadPic("97g.alg", extraSurface, 1); + loadPic("97g.alg", extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -507,7 +507,7 @@ void DrasculaEngine::animation_2_1() { if (animate("bjb.bin", 14)) break; playMusic(9); - loadPic("97.alg", extraSurface, 1); + loadPic(97, extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; updateRoom(); @@ -594,7 +594,7 @@ void DrasculaEngine::animation_3_1() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface, 1); + loadPic("an11y13.alg", extraSurface); talk(192); talk_bartender(1); @@ -622,14 +622,14 @@ void DrasculaEngine::animation_3_1() { if (_lang == kSpanish) textSurface = extraSurface; - loadPic("97.alg", extraSurface, 1); + loadPic(97, extraSurface); } void DrasculaEngine::animation_4_1() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an12.alg", extraSurface, 1); + loadPic("an12.alg", extraSurface); talk(205); @@ -664,7 +664,7 @@ void DrasculaEngine::animation_4_1() { textSurface = extraSurface; flags[11] = 0; - loadPic("97.alg", extraSurface, 1); + loadPic(97, extraSurface); } void DrasculaEngine::animation_1_2() { @@ -678,8 +678,8 @@ void DrasculaEngine::animation_2_2() { moveCharacters(); updateRefresh(); updateScreen(); - loadPic("an2_1.alg", frontSurface, 1); - loadPic("an2_2.alg", extraSurface, 1); + loadPic("an2_1.alg", frontSurface); + loadPic("an2_2.alg", extraSurface); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); copyBackground(1, 1, 201, 87, 50, 52, frontSurface, screenSurface); @@ -723,10 +723,10 @@ void DrasculaEngine::animation_4_2() { clearRoom(); loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind - loadPic("ciego2.alg", drawSurface3, 1); - loadPic("ciego3.alg", extraSurface, 1); - loadPic("ciego4.alg", backSurface, 1); - loadPic("ciego5.alg", frontSurface, 1); + loadPic("ciego2.alg", drawSurface3); + loadPic("ciego3.alg", extraSurface); + loadPic("ciego4.alg", backSurface); + loadPic("ciego5.alg", frontSurface); if (_lang == kSpanish) textSurface = frontSurface; @@ -769,11 +769,11 @@ void DrasculaEngine::animation_4_2() { clearRoom(); playMusic(roomMusic); - loadPic("9.alg", drawSurface1, HALF_PAL); - loadPic("aux9.alg", drawSurface3, 1); - loadPic("96.alg", frontSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(9, drawSurface1, HALF_PAL); + loadPic("aux9.alg", drawSurface3); + loadPic(96, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); withoutVerb(); if (_lang == kSpanish) @@ -813,7 +813,7 @@ void DrasculaEngine::animation_14_2() { int n, pos_cabina[6]; int l = 0; - loadPic("an14_2.alg", backSurface, 1); + loadPic("an14_2.alg", backSurface); pos_cabina[0] = 150; pos_cabina[1] = 6; @@ -843,7 +843,7 @@ void DrasculaEngine::animation_14_2() { finishSound(); - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); } void DrasculaEngine::animation_15_2() { @@ -958,7 +958,7 @@ void DrasculaEngine::animation_16_2() { clearRoom(); loadPic("his4_1.alg", drawSurface1, HALF_PAL); - loadPic("his4_2.alg", drawSurface3, 1); + loadPic("his4_2.alg", drawSurface3); copyBackground(0, 0, 0, 0, 320, 200, drawSurface3, screenSurface); @@ -993,7 +993,7 @@ void DrasculaEngine::animation_16_2() { clearRoom(); asco: - loadPic(roomDisk, drawSurface3, 1); + loadPic(roomDisk, drawSurface3); char rm[20]; sprintf(rm, "%i.alg", roomNumber); loadPic(rm, drawSurface1, HALF_PAL); @@ -1052,7 +1052,7 @@ void DrasculaEngine::animation_21_2() { } void DrasculaEngine::animation_23_2() { - loadPic("an24.alg", frontSurface, 1); + loadPic("an24.alg", frontSurface); flags[21] = 1; @@ -1113,7 +1113,7 @@ void DrasculaEngine::animation_23_joined() { int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 1, 1, 1, 1}; - loadPic("an23.alg", backSurface, 1); + loadPic("an23.alg", backSurface); for (n = 0; n < 34; n++) { copyRect(p_x, p_y, p_x, p_y, 36, 74, drawSurface1, screenSurface); @@ -1123,7 +1123,7 @@ void DrasculaEngine::animation_23_joined() { pause(5); } - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); } void DrasculaEngine::animation_23_joined2() { @@ -1133,7 +1133,7 @@ void DrasculaEngine::animation_23_joined2() { pause(50); - loadPic("an23_2.alg", backSurface, 1); + loadPic("an23_2.alg", backSurface); for (n = 0; n < 14; n++) { copyRect(p_x, p_y, p_x, p_y, 33, 71, drawSurface1, screenSurface); @@ -1143,14 +1143,14 @@ void DrasculaEngine::animation_23_joined2() { pause(5); } - loadPic("99.alg", backSurface,1); + loadPic(99, backSurface); } void DrasculaEngine::animation_25_2() { int n, pos_cabina[6]; - loadPic("an14_2.alg", backSurface, 1); - loadPic("18.alg", drawSurface1, 1); + loadPic("an14_2.alg", backSurface); + loadPic(18, drawSurface1); pos_cabina[0] = 150; pos_cabina[1] = 6; @@ -1180,7 +1180,7 @@ void DrasculaEngine::animation_25_2() { finishSound(); - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); } void DrasculaEngine::animation_27_2() { @@ -1248,7 +1248,7 @@ void DrasculaEngine::animation_31_2() { lleva_vb(-50); pause(15); gotoObject(159, 140); - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); trackProtagonist = 2; updateRoom(); updateScreen(); @@ -1297,8 +1297,8 @@ void DrasculaEngine::animation_35_2() { updateRoom(); updateScreen(); - loadPic("an35_1.alg", backSurface, 1); - loadPic("an35_2.alg", frontSurface, 1); + loadPic("an35_1.alg", backSurface); + loadPic("an35_2.alg", frontSurface); updateAnim(1, 70, 90, 46, 80, 6, backSurface); updateAnim(82, 70, 90, 46, 80, 6, backSurface); @@ -1340,9 +1340,9 @@ void DrasculaEngine::animation_2_3() { flags[0] = 0; flags[1] = 1; - loadPic("96.alg", frontSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(96, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); gotoObject(332, 127); } @@ -1350,9 +1350,9 @@ void DrasculaEngine::animation_2_3() { void DrasculaEngine::animation_3_3() { int px = curX - 20, py = curY - 1; - loadPic("an2y_1.alg", frontSurface, 1); - loadPic("an2y_2.alg", extraSurface, 1); - loadPic("an2y_3.alg", backSurface, 1); + loadPic("an2y_1.alg", frontSurface); + loadPic("an2y_2.alg", extraSurface); + loadPic("an2y_3.alg", backSurface); updateAnim2(2, px, py, 71, 72, 4, frontSurface); updateAnim2(75, px, py, 71, 72, 4, frontSurface); @@ -1365,9 +1365,9 @@ void DrasculaEngine::animation_3_3() { void DrasculaEngine::animation_4_3() { int px = 120, py = 63; - loadPic("any_1.alg", frontSurface, 1); - loadPic("any_2.alg", extraSurface, 1); - loadPic("any_3.alg", backSurface, 1); + loadPic("any_1.alg", frontSurface); + loadPic("any_2.alg", extraSurface); + loadPic("any_3.alg", backSurface); updateAnim2(1, px, py, 77, 89, 4, frontSurface); updateAnim2(91, px, py, 77, 89, 4, frontSurface); @@ -1380,9 +1380,9 @@ void DrasculaEngine::animation_4_3() { void DrasculaEngine::animation_5_3() { int px = curX - 20, py = curY - 1; - loadPic("an3y_1.alg", frontSurface, 1); - loadPic("an3y_2.alg", extraSurface, 1); - loadPic("an3y_3.alg", backSurface, 1); + loadPic("an3y_1.alg", frontSurface); + loadPic("an3y_2.alg", extraSurface); + loadPic("an3y_3.alg", backSurface); updateAnim2(2, px, py, 71, 72, 4, frontSurface); updateAnim2(75, px, py, 71, 72, 4, frontSurface); @@ -1404,7 +1404,7 @@ void DrasculaEngine::animation_6_3() { flags[1] = 0; - loadPic("an4y.alg", frontSurface, 1); + loadPic("an4y.alg", frontSurface); for (frame = 0; frame < 6; frame++) { pause(3); @@ -1415,7 +1415,7 @@ void DrasculaEngine::animation_6_3() { flags[2] = 1; - loadPic("96.alg", frontSurface, 1); + loadPic(96, frontSurface); updateRoom(); updateScreen(); @@ -1423,10 +1423,10 @@ void DrasculaEngine::animation_6_3() { void DrasculaEngine::animation_rayo() { loadPic("anr_1.alg", frontSurface, HALF_PAL); - loadPic("anr_2.alg", extraSurface, 1); - loadPic("anr_3.alg", backSurface, 1); - loadPic("anr_4.alg", drawSurface1, 1); - loadPic("anr_5.alg", drawSurface3, 1); + loadPic("anr_2.alg", extraSurface); + loadPic("anr_3.alg", backSurface); + loadPic("anr_4.alg", drawSurface1); + loadPic("anr_5.alg", drawSurface3); updateScreen(0, 0, 0, 0, 320, 200, frontSurface); @@ -1571,8 +1571,8 @@ void DrasculaEngine::animation_5_5(){ updateRoom(); updateScreen(); - loadPic("3an5_1.alg", backSurface, 1); - loadPic("3an5_2.alg", frontSurface, 1); + loadPic("3an5_1.alg", backSurface); + loadPic("3an5_2.alg", frontSurface); for (frame = 0; frame < 9; frame++) { pause(3); @@ -1595,15 +1595,15 @@ void DrasculaEngine::animation_5_5(){ updateVisible(); pause(12); - loadPic("96.alg", frontSurface, 1); + loadPic(96, frontSurface); for (h = 0; h < (200 - 18); h++) copyBackground(0, 53, 0, h, 320, 19, frontSurface, screenSurface); updateScreen(); - loadPic("101.alg", drawSurface1, HALF_PAL); - loadPic("3an5_3.alg", backSurface, 1); - loadPic("3an5_4.alg", extraSurface, 1); + loadPic(101, drawSurface1, HALF_PAL); + loadPic("3an5_3.alg", backSurface); + loadPic("3an5_4.alg", extraSurface); updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); pause(9); @@ -1622,12 +1622,12 @@ void DrasculaEngine::animation_5_5(){ playSound(1); finishSound(); - loadPic("99.alg", backSurface, 1); - loadPic("97.alg", extraSurface, 1); + loadPic(99, backSurface); + loadPic(97, extraSurface); clearRoom(); - loadPic("49.alg", drawSurface1, HALF_PAL); + loadPic(49, drawSurface1, HALF_PAL); } void DrasculaEngine::animation_6_5() { @@ -1726,7 +1726,7 @@ void DrasculaEngine::animation_12_5() { bgPalette3[color][component] = adjustToVGA(bgPalette3[color][component] - 8 + fade); } - loadPic("3an11_1.alg", backSurface, 1); + loadPic("3an11_1.alg", backSurface); for (frame = 0; frame < 8; frame++) { if (frame == 2 || frame == 4 || frame == 8 || frame==10) @@ -1771,7 +1771,7 @@ void DrasculaEngine::animation_12_5() { hiccup(12); finishSound(); - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); gotoObject(40, 169); gotoObject(-14, 175); @@ -1795,7 +1795,7 @@ void DrasculaEngine::animation_13_5() { int frus_y[] = {1, 1, 1, 1, 1, 1, 1, 89}; int pos_frusky[6]; - loadPic("auxfr.alg", backSurface, 1); + loadPic("auxfr.alg", backSurface); pos_frusky[3] = 81; pos_frusky[4] = 44; @@ -1878,9 +1878,9 @@ void DrasculaEngine::animation_1_6() { for (l = 0; l < 200; l++) factor_red[l] = 98; - loadPic("auxig2.alg", frontSurface, 1); - loadPic("auxdr.alg", drawSurface2, 1); - loadPic("car.alg", backSurface, 1); + loadPic("auxig2.alg", frontSurface); + loadPic("auxdr.alg", drawSurface2); + loadPic("car.alg", backSurface); talk_drascula(19, 1); talk(247); talk_drascula(20, 1); @@ -1901,7 +1901,7 @@ void DrasculaEngine::animation_1_6() { talk_drascula(29, 1); fadeToBlack(1); clearRoom(); - loadPic("time1.alg", screenSurface, 1); + loadPic("time1.alg", screenSurface); updateScreen(); delay(930); clearRoom(); @@ -1916,7 +1916,7 @@ void DrasculaEngine::animation_1_6() { talk(257); fadeToBlack(0); clearRoom(); - loadPic("time1.alg", screenSurface,1); + loadPic("time1.alg", screenSurface); updateScreen(); delay(900); clearRoom(); @@ -1988,10 +1988,10 @@ void DrasculaEngine::animation_6_6() { clearRoom(); withoutVerb(); removeObject(20); - loadPic("96.alg", frontSurface, 1); - loadPic("97.alg", frontSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(96, frontSurface); + loadPic(97, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); doBreak = 1; objExit = 104; curX = -1; @@ -2055,7 +2055,7 @@ void DrasculaEngine::animation_9_6() { talk_solo(_textbj[_lang][28], "bj28.als"); trackProtagonist = 3; clearRoom(); - loadPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic(96, frontSurface, COMPLETE_PAL); loadPic("nota2.alg", drawSurface1, HALF_PAL); talk(296); talk(297); @@ -2068,7 +2068,7 @@ void DrasculaEngine::animation_9_6() { updateScreen(); color_abc(kColorLightGreen); talk_solo("GOOOOOOOOOOOOOOOL", "s15.als"); - loadPic("nota2.alg", drawSurface1, 1); + loadPic("nota2.alg", drawSurface1); trackProtagonist = 0; updateRoom(); updateScreen(); @@ -2153,7 +2153,7 @@ void DrasculaEngine::animation_12_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an12.alg", extraSurface, 1); + loadPic("an12.alg", extraSurface); talk(356); @@ -2182,14 +2182,14 @@ void DrasculaEngine::animation_12_2() { textSurface = extraSurface; flags[11] = 0; - loadPic("974.alg", extraSurface, 1); + loadPic(974, extraSurface); } void DrasculaEngine::animation_26_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an12.alg", extraSurface, 1); + loadPic("an12.alg", extraSurface); talk(392); @@ -2217,7 +2217,7 @@ void DrasculaEngine::animation_26_2() { talk_pianist(18); talk_pianist(19); - loadPic("an26.alg", extraSurface, 1); + loadPic("an26.alg", extraSurface); updateAnim(1, 225, 113, 50, 59, 6, extraSurface); @@ -2244,7 +2244,7 @@ void DrasculaEngine::animation_26_2() { flags[11] = 0; flags[39] = 1; - loadPic("974.alg", extraSurface, 1); + loadPic(974, extraSurface); roomMusic = 16; } @@ -2252,7 +2252,7 @@ void DrasculaEngine::animation_11_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface, 1); + loadPic("an11y13.alg", extraSurface); talk(352); talk_bartender(1); @@ -2267,11 +2267,11 @@ void DrasculaEngine::animation_11_2() { if (_lang == kSpanish) textSurface = extraSurface; - loadPic("974.alg", extraSurface, 1); + loadPic(974, extraSurface); } void DrasculaEngine::animation_13_2() { - loadPic("an11y13.alg", frontSurface, 1); + loadPic("an11y13.alg", frontSurface); if (flags[41] == 0) { talk(103); @@ -2287,7 +2287,7 @@ void DrasculaEngine::animation_13_2() { } converse("op_2.cal"); - loadPic("964.alg", frontSurface, 1); + loadPic(964, frontSurface); } void DrasculaEngine::animation_18_2() { @@ -2325,7 +2325,7 @@ void DrasculaEngine::animation_24_2() { talk(356); - loadPic("an24.alg", frontSurface, 1); + loadPic("an24.alg", frontSurface); animation_32_2(); @@ -2346,8 +2346,8 @@ void DrasculaEngine::animation_24_2() { } void DrasculaEngine::animation_32_2() { - loadPic("an32_1.alg", drawSurface3, 1); - loadPic("an32_2.alg", backSurface, 1); + loadPic("an32_1.alg", drawSurface3); + loadPic("an32_2.alg", backSurface); updateAnim(1, 113, 53, 65, 81, 4, drawSurface3, 4); updateAnim(83, 113, 53, 65, 81, 4, drawSurface3, 4); @@ -2363,7 +2363,7 @@ void DrasculaEngine::animation_32_2() { pause(4); } - loadPic("aux18.alg", drawSurface3, 1); + loadPic("aux18.alg", drawSurface3); } void DrasculaEngine::animation_34_2() { @@ -2371,8 +2371,8 @@ void DrasculaEngine::animation_34_2() { updateRoom(); updateScreen(); - loadPic("an34_1.alg", backSurface, 1); - loadPic("an34_2.alg", extraSurface, 1); + loadPic("an34_1.alg", backSurface); + loadPic("an34_2.alg", extraSurface); updateAnim(1, 218, 79, 83, 75, 3, backSurface); updateAnim(77, 218, 79, 83, 75, 3, backSurface); @@ -2389,15 +2389,15 @@ void DrasculaEngine::animation_34_2() { updateScreen(218, 79, 218, 79, 83, 75, screenSurface); pause(3); - loadPic("994.alg", backSurface, 1); - loadPic("974.alg", extraSurface, 1); + loadPic(994, backSurface); + loadPic(974, extraSurface); } void DrasculaEngine::animation_36_2() { if (_lang == kSpanish) textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface, 1); + loadPic("an11y13.alg", extraSurface); talk(404); talk_bartender(19); @@ -2410,13 +2410,13 @@ void DrasculaEngine::animation_36_2() { if (_lang == kSpanish) textSurface = extraSurface; - loadPic("974.alg", extraSurface, 1); + loadPic(974, extraSurface); } void DrasculaEngine::animation_7_2() { - loadPic("an7_1.alg", backSurface, 1); - loadPic("an7_2.alg", extraSurface, 1); - loadPic("an7_3.alg", frontSurface, 1); + loadPic("an7_1.alg", backSurface); + loadPic("an7_2.alg", extraSurface); + loadPic("an7_3.alg", frontSurface); if (flags[3] == 1) copyBackground(258, 110, 85, 44, 23, 53, drawSurface3, drawSurface1); @@ -2431,10 +2431,10 @@ void DrasculaEngine::animation_7_2() { updateAnim2(75, 80, 64, 51, 73, 6, extraSurface); updateAnim2(1, 80, 64, 51, 73, 6, frontSurface); - loadPic("an7_4.alg", backSurface, 1); - loadPic("an7_5.alg", extraSurface, 1); - loadPic("an7_6.alg", frontSurface, 1); - loadPic("an7_7.alg", drawSurface3, 1); + loadPic("an7_4.alg", backSurface); + loadPic("an7_5.alg", extraSurface); + loadPic("an7_6.alg", frontSurface); + loadPic("an7_7.alg", drawSurface3); updateAnim2(1, 80, 64, 51, 73, 6, backSurface); updateAnim2(75, 80, 64, 51, 73, 6, backSurface); @@ -2447,8 +2447,8 @@ void DrasculaEngine::animation_7_2() { updateAnim2(1, 80, 64, 51, 73, 6, drawSurface3); updateAnim2(75, 80, 64, 51, 73, 2, drawSurface3); - loadPic("an7_8.alg", backSurface, 1); - loadPic("an7_9.alg", extraSurface, 1); + loadPic("an7_8.alg", backSurface); + loadPic("an7_9.alg", extraSurface); updateAnim2(1, 80, 64, 51, 73, 6, backSurface); updateAnim2(75, 80, 64, 51, 73, 6, backSurface); @@ -2463,10 +2463,10 @@ void DrasculaEngine::animation_7_2() { if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; - loadPic("99.alg", backSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("96.alg", frontSurface, 1); - loadPic("aux3.alg", drawSurface3, 1); + loadPic(99, backSurface); + loadPic(97, extraSurface); + loadPic(96, frontSurface); + loadPic("aux3.alg", drawSurface3); } void DrasculaEngine::animation_5_2() { @@ -2474,10 +2474,10 @@ void DrasculaEngine::animation_5_2() { updateRoom(); updateScreen(); - loadPic("an5_1.alg", backSurface, 1); - loadPic("an5_2.alg", extraSurface, 1); - loadPic("an5_3.alg", frontSurface, 1); - loadPic("an5_4.alg", drawSurface3, 1); + loadPic("an5_1.alg", backSurface); + loadPic("an5_2.alg", extraSurface); + loadPic("an5_3.alg", frontSurface); + loadPic("an5_4.alg", drawSurface3); copyBackground(1, 1, 213, 66, 53,84, backSurface, screenSurface); updateScreen(); @@ -2497,10 +2497,10 @@ void DrasculaEngine::animation_5_2() { updateAnim(1, 213, 66, 53, 84, 6, drawSurface3); - loadPic("994.alg", backSurface, 1); - loadPic("974.alg", extraSurface, 1); - loadPic("964.alg", frontSurface, 1); - loadPic("aux5.alg", drawSurface3, 1); + loadPic(994, backSurface); + loadPic(974, extraSurface); + loadPic(964, frontSurface); + loadPic("aux5.alg", drawSurface3); flags[8] = 1; curX = curX - 4; talk_sync(_text[_lang][46], "46.als", "4442444244244"); @@ -2516,10 +2516,10 @@ void DrasculaEngine::animation_6_2() { clearRoom(); loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind - loadPic("ciego2.alg", drawSurface3, 1); - loadPic("ciego3.alg", extraSurface, 1); - loadPic("ciego4.alg", backSurface, 1); - loadPic("ciego5.alg", frontSurface, 1); + loadPic("ciego2.alg", drawSurface3); + loadPic("ciego3.alg", extraSurface); + loadPic("ciego4.alg", backSurface); + loadPic("ciego5.alg", frontSurface); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); @@ -2541,11 +2541,11 @@ void DrasculaEngine::animation_6_2() { clearRoom(); playMusic(roomMusic); - loadPic("9.alg", drawSurface1, HALF_PAL); - loadPic("aux9.alg", drawSurface3, 1); - loadPic("96.alg", frontSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(9, drawSurface1, HALF_PAL); + loadPic("aux9.alg", drawSurface3); + loadPic(96, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); withoutVerb(); if (_lang == kSpanish) @@ -2564,10 +2564,10 @@ void DrasculaEngine::animation_33_2() { clearRoom(); loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind - loadPic("ciego2.alg", drawSurface3, 1); - loadPic("ciego3.alg", extraSurface, 1); - loadPic("ciego4.alg", backSurface, 1); - loadPic("ciego5.alg", frontSurface, 1); + loadPic("ciego2.alg", drawSurface3); + loadPic("ciego3.alg", extraSurface); + loadPic("ciego4.alg", backSurface); + loadPic("ciego5.alg", frontSurface); if (_lang == kSpanish) textSurface = frontSurface; @@ -2593,11 +2593,11 @@ void DrasculaEngine::animation_33_2() { clearRoom(); playMusic(roomMusic); - loadPic("9.alg", drawSurface1, HALF_PAL); - loadPic("aux9.alg", drawSurface3, 1); - loadPic("96.alg", frontSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(9, drawSurface1, HALF_PAL); + loadPic("aux9.alg", drawSurface3); + loadPic(96, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); withoutVerb(); if (_lang == kSpanish) @@ -2665,7 +2665,7 @@ void DrasculaEngine::animation_1_4() { void DrasculaEngine::animation_5_4(){ trackProtagonist = 3; - loadPic("anh_dr.alg", backSurface, 1); + loadPic("anh_dr.alg", backSurface); gotoObject(99, 160); gotoObject(38, 177); hare_se_ve = 0; @@ -2679,13 +2679,13 @@ void DrasculaEngine::animation_5_4(){ updateRoom(); updateScreen(); openDoor(2, 0); - loadPic("auxigor.alg", frontSurface, 1); + loadPic("auxigor.alg", frontSurface); igorX = 100; igorY = 65; talk_igor(29, kIgorFront); talk_igor(30, kIgorFront); - loadPic("96.alg", frontSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(96, frontSurface); + loadPic(99, backSurface); hare_se_ve = 1; fadeToBlack(0); exitRoom(0); @@ -2696,9 +2696,9 @@ void DrasculaEngine::animation_6_4() { roomNumber = 26; clearRoom(); - loadPic("26.alg", drawSurface1, HALF_PAL); - loadPic("aux26.alg", drawSurface3, 1); - loadPic("auxigor.alg", frontSurface, 1); + loadPic(26, drawSurface1, HALF_PAL); + loadPic("aux26.alg", drawSurface3); + loadPic("auxigor.alg", frontSurface); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); update_26_pre(); igorX = 104; @@ -2709,11 +2709,9 @@ void DrasculaEngine::animation_6_4() { talk_igor(26, kIgorFront); roomNumber = prevRoom; clearRoom(); - loadPic("96.alg", frontSurface, 1); - loadPic(roomDisk, drawSurface3, 1); - char rm[20]; - sprintf(rm, "%i.alg", roomNumber); - loadPic(rm, drawSurface1, HALF_PAL); + loadPic(96, frontSurface); + loadPic(roomDisk, drawSurface3); + loadPic(roomNumber, drawSurface1, HALF_PAL); withoutVerb(); updateRoom(); } @@ -2723,7 +2721,7 @@ void DrasculaEngine::animation_8_4() { int estanteria_x[] = {1, 75, 149, 223, 1, 75, 149, 223, 149, 223, 149, 223, 149, 223}; int estanteria_y[] = {1, 1, 1, 1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74}; - loadPic("an_8.alg", frontSurface, 1); + loadPic("an_8.alg", frontSurface); for (frame = 0; frame < 14; frame++) { pause(2); @@ -2731,7 +2729,7 @@ void DrasculaEngine::animation_8_4() { updateScreen(77, 45, 77, 45, 73, 72, screenSurface); } - loadPic("96.alg", frontSurface, 1); + loadPic(96, frontSurface); openDoor(7, 2); } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index f434d9d0e5..d069880727 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -151,34 +151,33 @@ int DrasculaEngine::go() { withVoices = 0; selectionMade = 0; - if (currentChapter != 6) { - loadPic("95.alg", tableSurface, 1); - } + if (currentChapter != 6) + loadPic(95, tableSurface); if (currentChapter == 1) { - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("99.alg", backSurface, 1); - loadPic("97.alg", extraSurface, 1); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(99, backSurface); + loadPic(97, extraSurface); } else if (currentChapter == 2) { - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("pts.alg", drawSurface2, 1); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic("pts.alg", drawSurface2); } else if (currentChapter == 3) { loadPic("aux13.alg", drawSurface1, COMPLETE_PAL); - loadPic("96.alg", frontSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(96, frontSurface); + loadPic(97, extraSurface); + loadPic(99, backSurface); } else if (currentChapter == 4) { - loadPic("96.alg", frontSurface, COMPLETE_PAL); + loadPic(96, frontSurface, COMPLETE_PAL); if (hay_que_load == 0) animation_rayo(); - loadPic("96.alg", frontSurface, 1); + loadPic(96, frontSurface); clearRoom(); - loadPic("99.alg", backSurface, 1); - loadPic("97.alg", extraSurface, 1); + loadPic(99, backSurface); + loadPic(97, extraSurface); } else if (currentChapter == 5) { - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("97.alg", extraSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(97, extraSurface); + loadPic(99, backSurface); } else if (currentChapter == 6) { igorX = 105, igorY = 85, trackIgor = 1; x_dr = 62, y_dr = 99, trackDrascula = 1; @@ -187,10 +186,10 @@ int DrasculaEngine::go() { pendulumSurface = drawSurface3; - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("99.alg", backSurface, 1); - loadPic("97.alg", extraSurface, 1); - loadPic("95.alg", tableSurface, 1); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(99, backSurface); + loadPic(97, extraSurface); + loadPic(95, tableSurface); } memset(iconName, 0, sizeof(iconName)); @@ -199,10 +198,10 @@ int DrasculaEngine::go() { assignDefaultPalette(); if (!escoba()) { - releaseGame(); + quitGame(); break; } - releaseGame(); + quitGame(); if (currentChapter == 6) break; @@ -212,7 +211,7 @@ int DrasculaEngine::go() { return 0; } -void DrasculaEngine::releaseGame() { +void DrasculaEngine::quitGame() { if (hay_sb == 1) stopSound(); clearRoom(); @@ -445,7 +444,7 @@ bool DrasculaEngine::escoba() { animation_1_1(); withoutVerb(); - loadPic("2aux62.alg", drawSurface2, 1); + loadPic("2aux62.alg", drawSurface2); trackProtagonist = 1; objExit = 104; if (hay_que_load != 0) { @@ -535,7 +534,7 @@ bool DrasculaEngine::escoba() { if (!loadGame(saveName)) { return true; } - loadPic("auxdr.alg", drawSurface2, 1); + loadPic("auxdr.alg", drawSurface2); } } @@ -577,9 +576,9 @@ bool DrasculaEngine::escoba() { if (button_dch == 1 && menuScreen == 1) { delay(100); if (currentChapter == 2) - loadPic(menuBackground, backSurface, 1); + loadPic(menuBackground, backSurface); else - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); setPalette((byte *)&gamePalette); menuScreen = 0; updateEvents(); @@ -592,13 +591,13 @@ bool DrasculaEngine::escoba() { if (trackProtagonist == 2) trackProtagonist = 1; if (currentChapter == 4) - loadPic("icons2.alg", backSurface, 1); + loadPic("icons2.alg", backSurface); else if (currentChapter == 5) - loadPic("icons3.alg", backSurface, 1); + loadPic("icons3.alg", backSurface); else if (currentChapter == 6) - loadPic("iconsp.alg", backSurface, 1); + loadPic("iconsp.alg", backSurface); else - loadPic("icons.alg", backSurface, 1); + loadPic("icons.alg", backSurface); menuScreen = 1; updateEvents(); withoutVerb(); @@ -697,18 +696,18 @@ bool DrasculaEngine::escoba() { void DrasculaEngine::pickObject(int objeto) { if (currentChapter == 6) - loadPic("iconsp.alg", backSurface, 1); + loadPic("iconsp.alg", backSurface); else if (currentChapter == 4) - loadPic("icons2.alg", backSurface, 1); + loadPic("icons2.alg", backSurface); else if (currentChapter == 5) - loadPic("icons3.alg", backSurface, 1); + loadPic("icons3.alg", backSurface); else - loadPic("icons.alg", backSurface, 1); + loadPic("icons.alg", backSurface); chooseObject(objeto); if (currentChapter == 2) - loadPic(menuBackground, backSurface, 1); + loadPic(menuBackground, backSurface); else - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); } void DrasculaEngine::chooseObject(int objeto) { @@ -797,6 +796,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { char pant1[20], pant2[20], pant3[20], pant4[20]; char para_codificar[20]; char buffer[256]; + int palLevel = 0; hasName = 0; @@ -812,7 +812,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { getIntFromLine(buffer, size, &roomNumber); getIntFromLine(buffer, size, &roomMusic); getStringFromLine(buffer, size, roomDisk); - getIntFromLine(buffer, size, &nivel_osc); + getIntFromLine(buffer, size, &palLevel); if (currentChapter == 2) getIntFromLine(buffer, size, &martin); @@ -868,9 +868,9 @@ void DrasculaEngine::enterRoom(int roomIndex) { _arj.close(); if (currentChapter == 2 && martin != 0) { - loadPic(pant2, extraSurface, 1); - loadPic(pant1, frontSurface, 1); - loadPic(pant4, backSurface, 1); + loadPic(pant2, extraSurface); + loadPic(pant1, frontSurface); + loadPic(pant4, backSurface); } if (currentChapter == 2) { @@ -880,9 +880,9 @@ void DrasculaEngine::enterRoom(int roomIndex) { curHeight = CHARACTER_HEIGHT; curWidth = CHARACTER_WIDTH; feetHeight = FEET_HEIGHT; - loadPic("97.alg", extraSurface, 1); - loadPic("96.alg", frontSurface, 1); - loadPic("99.alg", backSurface, 1); + loadPic(97, extraSurface); + loadPic(96, frontSurface); + loadPic(99, backSurface); strcpy(menuBackground, "99.alg"); } @@ -900,7 +900,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { } characterMoved = 0; } - loadPic(roomDisk, drawSurface3, 1); + loadPic(roomDisk, drawSurface3); char rm[20]; sprintf(rm, "%i.alg", roomNumber); @@ -909,11 +909,11 @@ void DrasculaEngine::enterRoom(int roomIndex) { copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); setDefaultPalette(); - if (nivel_osc != 0) - setPaletteBase(nivel_osc); + if (palLevel != 0) + setPaletteBase(palLevel); assignBrightPalette(); setDefaultPalette(); - setPaletteBase(nivel_osc + 2); + setPaletteBase(palLevel + 2); assignDarkPalette(); setBrightPalette(); @@ -1240,7 +1240,7 @@ void DrasculaEngine::updateEvents() { break; case Common::EVENT_QUIT: // TODO - releaseGame(); + quitGame(); exit(0); break; default: @@ -3153,7 +3153,7 @@ void DrasculaEngine::converse(const char *fileName) { if (phrase4[h] == (char)0xa7) phrase4[h] = ' '; - loadPic("car.alg", backSurface, 1); + loadPic("car.alg", backSurface); // TODO code here should limit y position for mouse in dialog menu, // but we can't implement this due lack backend functionality // from 1(top) to 31 @@ -3251,9 +3251,9 @@ void DrasculaEngine::converse(const char *fileName) { } // while (breakOut == 0) if (currentChapter == 2) - loadPic(menuBackground, backSurface, 1); + loadPic(menuBackground, backSurface); else - loadPic("99.alg", backSurface, 1); + loadPic(99, backSurface); if (currentChapter != 5) withoutVerb(); } @@ -3644,10 +3644,10 @@ void DrasculaEngine::activatePendulum() { flags[1] = 2; hare_se_ve = 0; roomNumber = 102; - loadPic("102.alg", drawSurface1, HALF_PAL); - loadPic("an_p1.alg", drawSurface3, 1); - loadPic("an_p2.alg", extraSurface, 1); - loadPic("an_p3.alg", frontSurface, 1); + loadPic(102, drawSurface1, HALF_PAL); + loadPic("an_p1.alg", drawSurface3); + loadPic("an_p2.alg", extraSurface); + loadPic("an_p3.alg", frontSurface); copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 7034fad43b..600b80d4be 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -176,9 +176,15 @@ public: void allocMemory(); void freeMemory(); - void releaseGame(); + void quitGame(); - void loadPic(const char *NamePcc, byte *targetSurface, int colorCount); + void loadPic(int roomNum, byte *targetSurface, int colorCount = 1) { + char rm[20]; + sprintf(rm, "%i.alg", roomNum); + loadPic(rm, targetSurface, colorCount); + } + + void loadPic(const char *NamePcc, byte *targetSurface, int colorCount = 1); void decompressPic(byte *targetSurface, int colorCount); typedef char DacPalette256[256][3]; @@ -230,7 +236,7 @@ public: Common::ArjFile _arj; int hay_sb; - int nivel_osc, previousMusic, roomMusic; + int previousMusic, roomMusic; int roomNumber; char roomDisk[20]; char currentData[20]; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index b52979a0de..647917148a 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -897,9 +897,9 @@ void DrasculaEngine::room_59(int fl) { hare_se_ve = 1; clearRoom(); loadPic("tlef0.alg", drawSurface1, COMPLETE_PAL); - loadPic("tlef1.alg", drawSurface3, 1); - loadPic("tlef2.alg", frontSurface, 1); - loadPic("tlef3.alg", backSurface, 1); + loadPic("tlef1.alg", drawSurface3); + loadPic("tlef2.alg", frontSurface); + loadPic("tlef3.alg", backSurface); talk_htel(240); color_abc(kColorBrown); @@ -917,10 +917,10 @@ void DrasculaEngine::room_59(int fl) { color_abc(kColorBrown); talk_solo(_textvb[_lang][62], "VB62.als"); clearRoom(); - loadPic("aux59.alg", drawSurface3, 1); - loadPic("96.alg", frontSurface, COMPLETE_PAL); - loadPic("99.alg", backSurface, 1); - loadPic("59.alg", drawSurface1, HALF_PAL); + loadPic("aux59.alg", drawSurface3); + loadPic(96, frontSurface, COMPLETE_PAL); + loadPic(99, backSurface); + loadPic(59, drawSurface1, HALF_PAL); trackProtagonist = 3; talk(245); withoutVerb(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index c3861524d4..c273c5c5a9 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -510,9 +510,8 @@ void DrasculaEngine::talk_drunk(int index) { int face; int length = strlen(said); - if (currentChapter == 1) { - loadPic("an11y13.alg", frontSurface, 1); - } + if (currentChapter == 1) + loadPic("an11y13.alg", frontSurface); flags[13] = 1; @@ -548,9 +547,8 @@ void DrasculaEngine::talk_drunk(int index) { updateScreen(); flags[13] = 0; - if (currentChapter == 1) { - loadPic("96.alg", frontSurface, 1); - } + if (currentChapter == 1) + loadPic("96.alg", frontSurface); if (currentChapter == 1) { if (musicStatus() == 0 && flags[11] == 0) -- cgit v1.2.3 From a8d8f23f69b856caab5712ea1fe6dff9d0f89d12 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 10:29:28 +0000 Subject: Simplified some more calls to loadPic() svn-id: r32534 --- engines/drascula/animation.cpp | 4 +--- engines/drascula/drascula.cpp | 14 ++++---------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 2217edf2a3..dc29b45c84 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -994,9 +994,7 @@ void DrasculaEngine::animation_16_2() { asco: loadPic(roomDisk, drawSurface3); - char rm[20]; - sprintf(rm, "%i.alg", roomNumber); - loadPic(rm, drawSurface1, HALF_PAL); + loadPic(roomNumber, drawSurface1, HALF_PAL); black(); updateRoom(); updateScreen(); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index d069880727..89f6e36f76 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -900,11 +900,9 @@ void DrasculaEngine::enterRoom(int roomIndex) { } characterMoved = 0; } - loadPic(roomDisk, drawSurface3); - char rm[20]; - sprintf(rm, "%i.alg", roomNumber); - loadPic(rm, drawSurface1, HALF_PAL); + loadPic(roomDisk, drawSurface3); + loadPic(roomNumber, drawSurface1, HALF_PAL); copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); @@ -1457,9 +1455,7 @@ bool DrasculaEngine::saves() { } clearRoom(); - char rm[20]; - sprintf(rm, "%i.alg", roomNumber); - loadPic(rm, drawSurface1, HALF_PAL); + loadPic(roomNumber, drawSurface1, HALF_PAL); selectionMade = 0; return true; @@ -1679,9 +1675,7 @@ void DrasculaEngine::screenSaver() { free(copia); free(ghost); - char rm[20]; - sprintf(rm, "%i.alg", roomNumber); - loadPic(rm, drawSurface1, HALF_PAL); + loadPic(roomNumber, drawSurface1, HALF_PAL); } void DrasculaEngine::fliplay(const char *filefli, int vel) { -- cgit v1.2.3 From 518d705c93d2a447ffb9902c4f0cb0facb322ed5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 10:48:18 +0000 Subject: lleva_vb -> placeVB c_mirar -> curExcuseLook c_poder -> curExcuseAction sentido -> trackCharacter mirar_t -> lookExcuses poder_t -> actionExcuses svn-id: r32535 --- engines/drascula/animation.cpp | 8 ++++---- engines/drascula/drascula.cpp | 44 +++++++++++++++++++++--------------------- engines/drascula/drascula.h | 8 ++++---- engines/drascula/rooms.cpp | 25 ++++++++++-------------- 4 files changed, 40 insertions(+), 45 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index dc29b45c84..d3d6011599 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -1062,7 +1062,7 @@ void DrasculaEngine::animation_23_2() { } talk_vb(15); - lleva_vb(42); + placeVB(42); trackVB = 1; talk_vb(16); trackVB = 2; @@ -1083,7 +1083,7 @@ void DrasculaEngine::animation_23_2() { trackVB = 2; animation_25_2(); - lleva_vb(99); + placeVB(99); if (flags[29] == 0) { talk_vb(19); @@ -1243,7 +1243,7 @@ void DrasculaEngine::animation_30_2() { void DrasculaEngine::animation_31_2() { talk_vb(44); - lleva_vb(-50); + placeVB(-50); pause(15); gotoObject(159, 140); loadPic(99, backSurface); @@ -1256,7 +1256,7 @@ void DrasculaEngine::animation_31_2() { updateScreen(); pause(22); talk(406); - lleva_vb(98); + placeVB(98); talk_vb(45); talk_vb(46); talk_vb(47); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 89f6e36f76..7675bd9fa2 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -142,8 +142,8 @@ int DrasculaEngine::go() { frame_blind = 0; frame_snore = 0; frame_bat = 0; - c_mirar = 0; - c_poder = 0; + curExcuseLook = 0; + curExcuseAction = 0; allocMemory(); @@ -850,7 +850,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { getStringFromLine(buffer, size, _targetSurface[l]); getIntFromLine(buffer, size, &_destX[l]); getIntFromLine(buffer, size, &_destY[l]); - getIntFromLine(buffer, size, &sentido_alkeva[l]); + getIntFromLine(buffer, size, &trackCharacter_alkeva[l]); getIntFromLine(buffer, size, &alapuertakeva[l]); updateDoor(l); } @@ -1938,7 +1938,7 @@ void DrasculaEngine::placeBJ() { } void DrasculaEngine::hiccup(int counter) { - int y = 0, sentido = 0; + int y = 0, trackCharacter = 0; if (currentChapter == 3) y = -1; @@ -1951,21 +1951,21 @@ void DrasculaEngine::hiccup(int counter) { else updateScreen(0, 1, 0, y, 320, 198, screenSurface); - if (sentido == 0) + if (trackCharacter == 0) y++; else y--; if (currentChapter == 3) { if (y == 1) - sentido = 1; + trackCharacter = 1; if (y == -1) - sentido = 0; + trackCharacter = 0; } else { if (y == 2) - sentido = 1; + trackCharacter = 1; if (y == 0) - sentido = 0; + trackCharacter = 0; } } while (counter > 0); @@ -2422,7 +2422,7 @@ bool DrasculaEngine::exitRoom(int l) { updateRoom(); updateScreen(); characterMoved = 0; - trackProtagonist = sentido_alkeva[l]; + trackProtagonist = trackCharacter_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; previousMusic = roomMusic; @@ -2442,7 +2442,7 @@ bool DrasculaEngine::exitRoom(int l) { if (isDoor[l] != 0) { gotoObject(roomObjX[l], roomObjY[l]); characterMoved = 0; - trackProtagonist = sentido_alkeva[l]; + trackProtagonist = trackCharacter_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; previousMusic = roomMusic; @@ -2475,7 +2475,7 @@ bool DrasculaEngine::exitRoom(int l) { updateRoom(); updateScreen(); characterMoved = 0; - trackProtagonist = sentido_alkeva[l]; + trackProtagonist = trackCharacter_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; previousMusic = roomMusic; @@ -2492,7 +2492,7 @@ bool DrasculaEngine::exitRoom(int l) { updateRoom(); updateScreen(); characterMoved = 0; - trackProtagonist = sentido_alkeva[l]; + trackProtagonist = trackCharacter_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; previousMusic = roomMusic; @@ -2512,7 +2512,7 @@ bool DrasculaEngine::exitRoom(int l) { updateRoom(); updateScreen(); characterMoved = 0; - trackProtagonist = sentido_alkeva[l]; + trackProtagonist = trackCharacter_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; previousMusic = roomMusic; @@ -2530,7 +2530,7 @@ bool DrasculaEngine::exitRoom(int l) { updateRoom(); updateScreen(); characterMoved = 0; - trackProtagonist = sentido_alkeva[l]; + trackProtagonist = trackCharacter_alkeva[l]; objExit = alapuertakeva[l]; doBreak = 1; previousMusic = roomMusic; @@ -3516,7 +3516,7 @@ void DrasculaEngine::moveVB() { copyRectClip(pos_vb, frontSurface, screenSurface); } -void DrasculaEngine::lleva_vb(int pointX) { +void DrasculaEngine::placeVB(int pointX) { trackVB = (pointX < vbX) ? 0 : 1; vbHasMoved = 1; @@ -3539,7 +3539,7 @@ void DrasculaEngine::lleva_vb(int pointX) { } void DrasculaEngine::hipo_sin_nadie(int counter){ - int y = 0, sentido = 0; + int y = 0, trackCharacter = 0; if (currentChapter == 3) y = -1; @@ -3552,21 +3552,21 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ else updateScreen(0, 1, 0, y, 320, 198, screenSurface); - if (sentido == 0) + if (trackCharacter == 0) y++; else y--; if (currentChapter == 3) { if (y == 1) - sentido = 1; + trackCharacter = 1; if (y == -1) - sentido = 0; + trackCharacter = 0; } else { if (y == 2) - sentido = 1; + trackCharacter = 1; if (y == 0) - sentido = 0; + trackCharacter = 0; } } while (counter > 0); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 600b80d4be..79a388ab31 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -250,7 +250,7 @@ public: int roomObjX[40], roomObjY[40], trackObj[40]; int inventoryObjects[43]; char _targetSurface[40][20]; - int _destX[40], _destY[40], sentido_alkeva[40], alapuertakeva[40]; + int _destX[40], _destY[40], trackCharacter_alkeva[40], alapuertakeva[40]; int x1[40], y1[40], x2[40], y2[40]; int takeObject, pickedObject; int withVoices; @@ -259,8 +259,8 @@ public: int frame_blind; int frame_snore; int frame_bat; - int c_mirar; - int c_poder; + int curExcuseLook; + int curExcuseAction; int flags[NUM_FLAGS]; @@ -312,7 +312,7 @@ public: void walkUp(); void walkDown(); void moveVB(); - void lleva_vb(int pointX); + void placeVB(int pointX); void hipo_sin_nadie(int counter); void openDoor(int nflag, int doorNum); void showMap(); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 647917148a..532f31e0ac 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -50,8 +50,8 @@ bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { } void DrasculaEngine::room_0() { - static const int mirar_t[3] = {100, 101, 54}; - static const int poder_t[6] = {11, 109, 111, 110, 115, 116}; + static const int lookExcuses[3] = {100, 101, 54}; + static const int actionExcuses[6] = {11, 109, 111, 110, 115, 116}; if (roomParse(room0Actions, -1)) return; @@ -60,20 +60,15 @@ void DrasculaEngine::room_0() { if (currentChapter == 2 || currentChapter == 4 || currentChapter == 5 || currentChapter == 6) { if (pickedObject == kVerbLook) { - talk(mirar_t[c_mirar]); - c_mirar++; - if (c_mirar == 3) - c_mirar = 0; - } else if (pickedObject == kVerbPick) { - talk(poder_t[c_poder]); - c_poder++; - if (c_poder == 6) - c_poder = 0; + talk(lookExcuses[curExcuseLook]); + curExcuseLook++; + if (curExcuseLook == 3) + curExcuseLook = 0; } else { - talk(poder_t[c_poder]); - c_poder++; - if (c_poder == 6) - c_poder = 0; + talk(actionExcuses[curExcuseAction]); + curExcuseAction++; + if (curExcuseAction == 6) + curExcuseAction = 0; } } } -- cgit v1.2.3 From bea79f2d31d4b177ac6d2c9e4e0eb78874be1be3 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 14:42:27 +0000 Subject: Rewrote some more room logic. Added a FIXME about the usage of ARRAYSIZE in this case svn-id: r32536 --- engines/drascula/rooms.cpp | 237 +++++++++++++++--------------------------- engines/drascula/staticdata.h | 182 ++++++++++++++++++++++++++++++++ 2 files changed, 268 insertions(+), 151 deletions(-) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 532f31e0ac..2e4111b472 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -29,9 +29,9 @@ namespace Drascula { bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { - bool didAction = false; - - for (int i = 0; i < ARRAYSIZE(roomActions); i++) { + // FIXME: ARRAYSIZE is plain wrong in this case... + //printf("%d\n", ARRAYSIZE(&roomActions)); + for (int i = 0; i < ARRAYSIZE(&roomActions); i++) { if (roomActions[i].chapter == currentChapter || roomActions[i].chapter == -1) { if (roomActions[i].action == pickedObject || @@ -39,14 +39,13 @@ bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { if (roomActions[i].objectID == fl || roomActions[i].objectID == -1) { talk(roomActions[i].speechID); - didAction = true; - break; + return true; } } } } - return didAction; + return false; } void DrasculaEngine::room_0() { @@ -215,11 +214,10 @@ void DrasculaEngine::room_6(int fl){ } void DrasculaEngine::room_7(int fl){ - if (pickedObject == kVerbLook && fl == 169) - talk(44); - else if (pickedObject == kVerbLook && fl == 164) - talk(35); - else if (pickedObject == kVerbPick && fl == 190) { + if (roomParse(room7Actions, fl)) + return; + + if (pickedObject == kVerbPick && fl == 190) { pickObject(17); flags[35] = 1; visible[3] = 0; @@ -230,26 +228,24 @@ void DrasculaEngine::room_7(int fl){ } void DrasculaEngine::room_8(int fl) { + if (roomParse(room8Actions, fl)) + return; + if (pickedObject == kVerbLook && fl == 147 && flags[7] == 0) { talk(58); pickObject(15); flags[7] = 1; if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) flags[38] = 1; - } else if (pickedObject == kVerbLook && fl == 147) - talk(59); - else + } else hasAnswer = 0; } void DrasculaEngine::room_9(int fl){ - if (pickedObject == kVerbLook && fl == 150) - talk(35); - else if (pickedObject == kVerbTalk && fl == 150) - talk(6); - else if (pickedObject == kVerbLook && fl == 51) - talk(60); - else if (pickedObject == kVerbTalk && fl == 51 && flags[4] == 0) + if (roomParse(room9Actions, fl)) + return; + + if (pickedObject == kVerbTalk && fl == 51 && flags[4] == 0) animation_4_2(); else if (pickedObject == kVerbTalk && fl == 51 && flags[4] == 1) animation_33_2(); @@ -451,10 +447,10 @@ void DrasculaEngine::room_18(int fl) { } void DrasculaEngine::room_19(int fl) { - if (pickedObject == kVerbLook && fl == 214) - talk(191); - else - hasAnswer = 0; + if (roomParse(room19Actions, fl)) + return; + + hasAnswer = 0; } bool DrasculaEngine::room_21(int fl) { @@ -482,9 +478,10 @@ bool DrasculaEngine::room_21(int fl) { } void DrasculaEngine::room_22(int fl) { - if (pickedObject == kVerbPick && fl == 140) - talk(7); - else if (pickedObject == 11 && fl == 140) { + if (roomParse(room22Actions, fl)) + return; + + if (pickedObject == 11 && fl == 140) { pickObject(18); visible[1] = 0; flags[24] = 1; @@ -500,11 +497,7 @@ void DrasculaEngine::room_22(int fl) { trackProtagonist = 3; talk(499); talk(500); - } else if (pickedObject == kVerbLook && fl == 52) - talk(497); - else if (pickedObject == kVerbTalk && fl == 52) - talk(498); - else if (pickedObject == kVerbPick && fl == 180 && flags[26] == 0) + } else if (pickedObject == kVerbPick && fl == 180 && flags[26] == 0) talk(420); else if (pickedObject == kVerbPick && fl == 180 && flags[26] == 1) { pickObject(7); @@ -538,6 +531,9 @@ void DrasculaEngine::room_23(int fl) { } void DrasculaEngine::room_24(int fl) { + if (roomParse(room24Actions, fl)) + return; + if (pickedObject == kVerbOpen && fl == 105) openDoor(1, 0); else if (pickedObject == kVerbClose && fl == 105) @@ -546,8 +542,6 @@ void DrasculaEngine::room_24(int fl) { openDoor(2, 1); else if (pickedObject == kVerbClose && fl == 106) closeDoor(2, 1); - else if (pickedObject == kVerbLook && fl == 151) - talk(461); else hasAnswer = 0; } @@ -628,6 +622,9 @@ void DrasculaEngine::room_29(int fl) { } void DrasculaEngine::room_30(int fl) { + if (roomParse(room30Actions, fl)) + return; + if (pickedObject == kVerbOpen && fl == 115) openDoor(4, 0); else if (pickedObject == kVerbClose && fl == 115) @@ -650,15 +647,14 @@ void DrasculaEngine::room_30(int fl) { else if (pickedObject == 13 && fl == 144) { talk(424); flags[19] = 1; - } else if (pickedObject == kVerbOpen && fl == 157) - talk(468); - else if (pickedObject == kVerbLook && fl == 158) - talk(469); - else + } else hasAnswer = 0; } void DrasculaEngine::room_31(int fl) { + if (roomParse(room31Actions, fl)) + return; + if (pickedObject == kVerbPick && fl == 145) { pickObject(11); visible[1] = 0; @@ -667,21 +663,16 @@ void DrasculaEngine::room_31(int fl) { openDoor(5, 0); else if (pickedObject == kVerbClose && fl == 117) closeDoor(5, 0); - else if (pickedObject == kVerbLook && fl == 161) - talk(470); - else if (pickedObject == kVerbOpen && fl == 161) - talk(471); else hasAnswer = 0; } void DrasculaEngine::room_34(int fl) { + if (roomParse(room34Actions, fl)) + return; + if (pickedObject == kVerbMove && fl == 146) animation_8_4(); - else if (pickedObject == kVerbLook && fl == 146) - talk(458); - else if (pickedObject == kVerbPick && fl == 146) - talk(459); else if (pickedObject == kVerbOpen && fl == 120 && flags[25] == 1) openDoor(8, 2); else if (pickedObject == kVerbOpen && fl == 120 && flags[25] == 0) { @@ -721,45 +712,33 @@ void DrasculaEngine::room_35(int fl) { } void DrasculaEngine::room_44(int fl) { - if (pickedObject == kVerbLook && fl == 172) - talk(428); - else - hasAnswer = 0; + if (roomParse(room44Actions, fl)) + return; + + hasAnswer = 0; } void DrasculaEngine::room_49(int fl){ + if (roomParse(room49Actions, fl)) + return; + if (pickedObject == kVerbTalk && fl ==51) converse("op_9.cal"); - else if (pickedObject == kVerbLook && fl == 51) - talk(132); else if ((pickedObject == 8 && fl == 51) || (pickedObject == 8 && fl == 203)) animation_5_5(); - else if (pickedObject == kVerbLook && fl == 200) - talk(133); - else if (pickedObject == kVerbTalk && fl == 200) - talk(134); - else if (pickedObject == kVerbLook && fl == 201) - talk(135); - else if (pickedObject == kVerbLook && fl == 203) - talk(137); else hasAnswer = 0; } void DrasculaEngine::room_53(int fl) { + if (roomParse(room53Actions, fl)) + return; + if (pickedObject == kVerbPick && fl == 120) { pickObject(16); visible[3] = 0; - } else if (pickedObject == kVerbLook && fl == 121) - talk(128); - else if (pickedObject == kVerbLook && fl == 209) - talk(129); - else if (pickedObject == kVerbMove && fl == 123) + } else if (pickedObject == kVerbMove && fl == 123) animation_11_5(); - else if (pickedObject == kVerbLook && fl == 52) - talk(447); - else if (pickedObject == kVerbTalk && fl == 52) - talk(131); else if (pickedObject == 12 && fl == 52) animation_10_5(); else if (pickedObject == 15 && fl == 52) @@ -777,12 +756,13 @@ void DrasculaEngine::room_53(int fl) { } void DrasculaEngine::room_54(int fl) { + if (roomParse(room54Actions, fl)) + return; + if ((pickedObject == kVerbTalk && fl == 118) || (pickedObject == kVerbLook && fl == 118 && flags[0] == 0)) animation_1_5(); else if (pickedObject == kVerbLook && fl == 118 && flags[0]==1) talk(124); - else if (pickedObject == kVerbLook && fl == 53) - talk(127); else if (pickedObject == kVerbTalk && fl == 53 && flags[14] == 0) { talk(288); flags[12] = 1; @@ -801,11 +781,7 @@ void DrasculaEngine::room_54(int fl) { flags[13] = 1; talk_mus(10); updateVisible(); - } else if (pickedObject == kVerbOpen && fl == 119) - talk(125); - else if (pickedObject == kVerbLook && fl == 119) - talk(126); - else if (pickedObject == 10 && fl == 119) { + } else if (pickedObject == 10 && fl == 119) { pause(4); talk(436); withoutVerb(); @@ -815,17 +791,14 @@ void DrasculaEngine::room_54(int fl) { } void DrasculaEngine::room_55(int fl) { + if (roomParse(room55Actions, fl)) + return; + if (pickedObject == kVerbPick && fl == 122) { pickObject(12); flags[8] = 1; updateVisible(); - } else if (pickedObject == kVerbLook && fl == 122) - talk(138); - else if (pickedObject == kVerbLook && fl == 204) - talk(139); - else if (pickedObject == kVerbLook && fl == 205) - talk(140); - else if (fl == 206) { + } else if (fl == 206) { playSound(11); animate("det.bin", 17); finishSound(); @@ -835,26 +808,24 @@ void DrasculaEngine::room_55(int fl) { } bool DrasculaEngine::room_56(int fl) { + if (roomParse(room56Actions, fl)) + return false; + if (pickedObject == kVerbOpen && fl == 124) { animation_14_5(); return true; - } else if (pickedObject == kVerbLook && fl == 124) - talk(450); - else if (pickedObject == kVerbOpen && fl == 207) - talk(141); - else if (pickedObject == kVerbLook && fl == 208) - talk(142); - else + } else hasAnswer = 0; return false; } void DrasculaEngine::room_58(int fl) { + if (roomParse(room56Actions, fl)) + return; + if (pickedObject == kVerbMove && fl == 103) animation_7_6(); - else if (pickedObject == kVerbLook && fl == 104) - talk(454); else hasAnswer = 0; } @@ -926,31 +897,18 @@ void DrasculaEngine::room_59(int fl) { } bool DrasculaEngine::room_60(int fl) { + if (roomParse(room60Actions, fl)) + return false; + if (pickedObject == kVerbMove && fl == 112) animation_10_6(); - else if (pickedObject == kVerbLook && fl == 112) - talk(440); else if (pickedObject == kVerbTalk && fl == 52) { talk(266); talk_bartender(1, 1); converse("op_12.cal"); withoutVerb(); pickedObject = 0; - } else if (pickedObject == kVerbTalk && fl == 115) - talk(455); - else if (pickedObject == kVerbTalk && fl == 56) - talk(455); - else if (pickedObject == kVerbLook && fl == 114) - talk(167); - else if (pickedObject == kVerbLook && fl == 113) - talk(168); - else if (pickedObject == kVerbPick && fl == 113) - talk(170); - else if (pickedObject == kVerbMove && fl == 113) - talk(170); - else if (pickedObject == kVerbTalk && fl == 113) - talk(169); - else if (pickedObject == 21 && fl == 56) + } else if (pickedObject == 21 && fl == 56) animation_18_6(); else if (pickedObject == 9 && fl == 56 && flags[6] == 1) { animation_9_6(); @@ -965,19 +923,16 @@ bool DrasculaEngine::room_60(int fl) { } void DrasculaEngine::room_61(int fl) { - if (pickedObject == kVerbLook && fl == 116) - talk(172); - else if (pickedObject == kVerbLook && fl == 117) - talk(173); - else if (pickedObject == kVerbMove && fl == 117) - talk(174); - else if (pickedObject == kVerbOpen && fl == 117) - talk(174); - else - hasAnswer = 0; + if (roomParse(room61Actions, fl)) + return; + + hasAnswer = 0; } void DrasculaEngine::room_62(int fl) { + if (roomParse(room62Actions, fl)) + return; + if (pickedObject == kVerbTalk && fl == 53) converse("op_13.cal"); else if (pickedObject == kVerbTalk && fl == 52 && flags[0] == 0) @@ -986,42 +941,22 @@ void DrasculaEngine::room_62(int fl) { talk(109); else if (pickedObject == kVerbTalk && fl == 54) animation_4_1(); - else if (pickedObject == kVerbLook && fl == 100) - talk(168); - else if (pickedObject == kVerbTalk && fl == 100) - talk(169); - else if (pickedObject == kVerbPick && fl == 100) - talk(170); - else if (pickedObject == kVerbLook && fl == 101) - talk(171); - else if (pickedObject == kVerbLook && fl == 102) - talk(167); - else if (pickedObject == kVerbLook && fl == 103) - talk(166); - else hasAnswer = 0; + else + hasAnswer = 0; } void DrasculaEngine::room_63(int fl) { - if (pickedObject == kVerbLook && fl == 110) - talk(172); - else if (pickedObject == kVerbLook && fl == 109) - talk(173); - else if (pickedObject == kVerbMove && fl == 109) - talk(174); - else if (pickedObject == kVerbLook && fl == 108) - talk(334); - else if (pickedObject == kVerbTalk && fl == 108) - talk(333); - else - hasAnswer = 0; + if (roomParse(room63Actions, fl)) + return; + + hasAnswer = 0; } void DrasculaEngine::room_pendulum(int fl) { - if (pickedObject == kVerbLook && fl == 100) - talk(452); - else if (pickedObject == kVerbLook && fl == 101) - talk(123); - else if (pickedObject == kVerbPick && fl == 101) + if (roomParse(roomPendulumActions, fl)) + return; + + if (pickedObject == kVerbPick && fl == 101) pickObject(20); else if (pickedObject == 20 && fl == 100) animation_6_6(); diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 03fe4c6f61..02f9360e6e 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -261,6 +261,25 @@ RoomTalkAction room6Actions[] = { { -1, kVerbLook, 140, 147 } }; +RoomTalkAction room7Actions[] = { + // num action object speech + { -1, kVerbLook, 164, 35 }, + // ---------------------------------- + { -1, kVerbLook, 169, 44 } +}; + +RoomTalkAction room8Actions[] = { + // num action object speech + { -1, kVerbLook, 147, 59 } +}; + +RoomTalkAction room9Actions[] = { + // num action object speech + { -1, kVerbLook, 150, 35 }, + { -1, kVerbTalk, 150, 6 }, + { -1, kVerbLook, 51, 60 }, +}; + RoomTalkAction room12Actions[] = { // num action object speech { -1, kVerbLook, 154, 329 }, @@ -305,28 +324,54 @@ RoomTalkAction room15Actions[] = { RoomTalkAction room16Actions[] = { // num action object speech { -1, kVerbTalk, 163, 6 }, + // ---------------------------------- { -1, kVerbLook, 183, 340 }, + // ---------------------------------- { -1, kVerbLook, 185, 37 }, { -1, kVerbPick, 185, 7 }, { -1, kVerbMove, 185, 7 }, { -1, kVerbTalk, 185, 38 }, + // ---------------------------------- { -1, kVerbTalk, 187, 345 } }; RoomTalkAction room18Actions[] = { // num action object speech { -1, kVerbLook, 181, 348 }, + // ---------------------------------- { -1, kVerbLook, 182, 154 } }; +RoomTalkAction room19Actions[] = { + // num action object speech + { -1, kVerbLook, 214, 191 } +}; + +RoomTalkAction room22Actions[] = { + // num action object speech + { -1, kVerbPick, 140, 7 }, + // ---------------------------------- + { -1, kVerbLook, 52, 497 }, + { -1, kVerbTalk, 52, 498 } +}; + +RoomTalkAction room24Actions[] = { + // num action object speech + { -1, kVerbLook, 151, 461 } +}; + RoomTalkAction room26Actions[] = { // num action object speech { -1, kVerbOpen, 167, 467 }, + // ---------------------------------- { -1, kVerbLook, 164, 470 }, { -1, kVerbOpen, 164, 471 }, + // ---------------------------------- { -1, kVerbLook, 163, 472 }, { -1, kVerbPick, 163, 473 }, + // ---------------------------------- { -1, kVerbLook, 165, 474 }, + // ---------------------------------- { -1, kVerbLook, 168, 476 }, { -1, kVerbPick, 168, 477 } }; @@ -335,11 +380,148 @@ RoomTalkAction room29Actions[] = { // num action object speech { -1, kVerbLook, 152, 463 }, { -1, kVerbOpen, 152, 464 }, + // ---------------------------------- { -1, kVerbLook, 153, 465 }, + // ---------------------------------- { -1, kVerbPick, 154, 466 }, + // ---------------------------------- { -1, kVerbOpen, 156, 467 } }; +RoomTalkAction room30Actions[] = { + // num action object speech + { -1, kVerbOpen, 157, 468 }, + // ---------------------------------- + { -1, kVerbLook, 158, 469 } +}; + +RoomTalkAction room31Actions[] = { + // num action object speech + { -1, kVerbLook, 161, 470 }, + { -1, kVerbOpen, 161, 471 } +}; + +RoomTalkAction room34Actions[] = { + // num action object speech + { -1, kVerbLook, 146, 458 }, + { -1, kVerbPick, 146, 459 } +}; + +RoomTalkAction room44Actions[] = { + // num action object speech + { -1, kVerbLook, 172, 428 } +}; + +RoomTalkAction room49Actions[] = { + // num action object speech + { -1, kVerbLook, 51, 132 }, + // ---------------------------------- + { -1, kVerbLook, 200, 133 }, + { -1, kVerbTalk, 200, 134 }, + // ---------------------------------- + { -1, kVerbLook, 201, 135 }, + // ---------------------------------- + { -1, kVerbLook, 203, 137 } +}; + +RoomTalkAction room53Actions[] = { + // num action object speech + { -1, kVerbLook, 121, 128 }, + // ---------------------------------- + { -1, kVerbLook, 209, 129 }, + // ---------------------------------- + { -1, kVerbLook, 52, 447 }, + { -1, kVerbTalk, 52, 131 } +}; + +RoomTalkAction room54Actions[] = { + // num action object speech + { -1, kVerbLook, 53, 127 }, + // ---------------------------------- + { -1, kVerbOpen, 119, 125 }, + { -1, kVerbLook, 119, 126 } +}; + +RoomTalkAction room55Actions[] = { + // num action object speech + { -1, kVerbLook, 122, 138 }, + // ---------------------------------- + { -1, kVerbLook, 204, 139 }, + // ---------------------------------- + { -1, kVerbLook, 205, 140 } +}; + +RoomTalkAction room56Actions[] = { + // num action object speech + { -1, kVerbLook, 124, 450 }, + // ---------------------------------- + { -1, kVerbOpen, 207, 141 }, + // ---------------------------------- + { -1, kVerbLook, 208, 142 } +}; + +RoomTalkAction room58Actions[] = { + // num action object speech + { -1, kVerbLook, 104, 454 } +}; + +RoomTalkAction room60Actions[] = { + // num action object speech + { -1, kVerbLook, 112, 440 }, + // ---------------------------------- + { -1, kVerbTalk, 115, 455 }, + // ---------------------------------- + { -1, kVerbTalk, 56, 455 }, + // ---------------------------------- + { -1, kVerbLook, 114, 167 }, + // ---------------------------------- + { -1, kVerbLook, 113, 168 }, + { -1, kVerbPick, 113, 170 }, + { -1, kVerbMove, 113, 170 }, + { -1, kVerbTalk, 113, 169 } +}; + +RoomTalkAction room61Actions[] = { + // num action object speech + { -1, kVerbLook, 116, 172 }, + // ---------------------------------- + { -1, kVerbLook, 117, 173 }, + // ---------------------------------- + { -1, kVerbMove, 117, 174 }, + { -1, kVerbOpen, 117, 174 }, +}; + +RoomTalkAction room62Actions[] = { + // num action object speech + { -1, kVerbLook, 100, 168}, + { -1, kVerbTalk, 100, 169}, + { -1, kVerbPick, 100, 170}, + // ---------------------------------- + { -1, kVerbLook, 101, 171}, + // ---------------------------------- + { -1, kVerbLook, 102, 167}, + // ---------------------------------- + { -1, kVerbLook, 103, 166} +}; + +RoomTalkAction room63Actions[] = { + // num action object speech + { -1, kVerbLook, 110, 172}, + // ---------------------------------- + { -1, kVerbLook, 109, 173}, + { -1, kVerbMove, 109, 174}, + // ---------------------------------- + { -1, kVerbLook, 108, 334}, + { -1, kVerbTalk, 108, 333} +}; + +RoomTalkAction roomPendulumActions[] = { + // num action object speech + { -1, kVerbLook, 100, 452}, + // ---------------------------------- + { -1, kVerbLook, 101, 123} +}; + const char *_text[][501] = { { // 0 -- cgit v1.2.3 From 735463de44f805dca91d4757e458351e2b9f8a2e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 16:15:08 +0000 Subject: Fixed the misuse of ARRAYSIZE svn-id: r32537 --- engines/drascula/drascula.h | 2 +- engines/drascula/rooms.cpp | 74 ++++++++++++++++++++++----------------------- 2 files changed, 37 insertions(+), 39 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 79a388ab31..65308bc14a 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -443,7 +443,7 @@ public: void increaseFrameNum(); int whichObject(); bool checkMenuFlags(); - bool roomParse(RoomTalkAction*, int); + bool roomParse(RoomTalkAction*, int, int); void converse(const char *); void print_abc_opc(const char *, int, int, int); void response(int); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 2e4111b472..2d4606564e 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -28,10 +28,8 @@ namespace Drascula { -bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int fl) { - // FIXME: ARRAYSIZE is plain wrong in this case... - //printf("%d\n", ARRAYSIZE(&roomActions)); - for (int i = 0; i < ARRAYSIZE(&roomActions); i++) { +bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int actionCount, int fl) { + for (int i = 0; i < actionCount; i++) { if (roomActions[i].chapter == currentChapter || roomActions[i].chapter == -1) { if (roomActions[i].action == pickedObject || @@ -52,7 +50,7 @@ void DrasculaEngine::room_0() { static const int lookExcuses[3] = {100, 101, 54}; static const int actionExcuses[6] = {11, 109, 111, 110, 115, 116}; - if (roomParse(room0Actions, -1)) + if (roomParse(room0Actions, ARRAYSIZE(room0Actions), -1)) return; // non-default actions @@ -73,7 +71,7 @@ void DrasculaEngine::room_0() { } void DrasculaEngine::room_1(int fl) { - if (roomParse(room1Actions, fl)) + if (roomParse(room1Actions, ARRAYSIZE(room1Actions), fl)) return; if (pickedObject == kVerbLook && fl == 118) { @@ -87,7 +85,7 @@ void DrasculaEngine::room_1(int fl) { } void DrasculaEngine::room_3(int fl) { - if (roomParse(room3Actions, fl)) + if (roomParse(room3Actions, ARRAYSIZE(room3Actions), fl)) return; if (pickedObject == kVerbTalk && fl == 129) { @@ -126,7 +124,7 @@ void DrasculaEngine::room_3(int fl) { } void DrasculaEngine::room_4(int fl) { - if (roomParse(room4Actions, fl)) + if (roomParse(room4Actions, ARRAYSIZE(room4Actions), fl)) return; if (pickedObject == kVerbMove && fl == 189 && flags[34] == 0) { @@ -140,7 +138,7 @@ void DrasculaEngine::room_4(int fl) { } void DrasculaEngine::room_5(int fl) { - if (roomParse(room5Actions, fl)) + if (roomParse(room5Actions, ARRAYSIZE(room5Actions), fl)) return; if (pickedObject == kVerbLook && fl == 136 && flags[8] == 0) @@ -153,7 +151,7 @@ void DrasculaEngine::room_5(int fl) { } void DrasculaEngine::room_6(int fl){ - if (roomParse(room6Actions, fl)) + if (roomParse(room6Actions, ARRAYSIZE(room6Actions), fl)) return; if (pickedObject == kVerbLook && fl==144) { @@ -214,7 +212,7 @@ void DrasculaEngine::room_6(int fl){ } void DrasculaEngine::room_7(int fl){ - if (roomParse(room7Actions, fl)) + if (roomParse(room7Actions, ARRAYSIZE(room7Actions), fl)) return; if (pickedObject == kVerbPick && fl == 190) { @@ -228,7 +226,7 @@ void DrasculaEngine::room_7(int fl){ } void DrasculaEngine::room_8(int fl) { - if (roomParse(room8Actions, fl)) + if (roomParse(room8Actions, ARRAYSIZE(room8Actions), fl)) return; if (pickedObject == kVerbLook && fl == 147 && flags[7] == 0) { @@ -242,7 +240,7 @@ void DrasculaEngine::room_8(int fl) { } void DrasculaEngine::room_9(int fl){ - if (roomParse(room9Actions, fl)) + if (roomParse(room9Actions, ARRAYSIZE(room9Actions), fl)) return; if (pickedObject == kVerbTalk && fl == 51 && flags[4] == 0) @@ -258,7 +256,7 @@ void DrasculaEngine::room_9(int fl){ } void DrasculaEngine::room_12(int fl){ - if (roomParse(room12Actions, fl)) + if (roomParse(room12Actions, ARRAYSIZE(room12Actions), fl)) return; if (pickedObject == kVerbOpen && fl == 156) @@ -288,7 +286,7 @@ bool DrasculaEngine::room_13(int fl) { } void DrasculaEngine::room_14(int fl) { - if (roomParse(room14Actions, fl)) + if (roomParse(room14Actions, ARRAYSIZE(room14Actions), fl)) return; if (pickedObject == kVerbTalk && fl == 54 && flags[39] == 0) @@ -308,7 +306,7 @@ void DrasculaEngine::room_14(int fl) { } void DrasculaEngine::room_15(int fl) { - if (roomParse(room15Actions, fl)) + if (roomParse(room15Actions, ARRAYSIZE(room15Actions), fl)) return; if (pickedObject == 19 && fl == 188 && flags[27] == 0) @@ -342,7 +340,7 @@ void DrasculaEngine::room_15(int fl) { } void DrasculaEngine::room_16(int fl) { - if (roomParse(room16Actions, fl)) + if (roomParse(room16Actions, ARRAYSIZE(room16Actions), fl)) return; if (pickedObject == kVerbOpen && fl == 163) @@ -402,7 +400,7 @@ void DrasculaEngine::room_17(int fl) { } void DrasculaEngine::room_18(int fl) { - if (roomParse(room18Actions, fl)) + if (roomParse(room18Actions, ARRAYSIZE(room18Actions), fl)) return; if (pickedObject == kVerbTalk && fl == 55 && flags[36] == 0) @@ -447,7 +445,7 @@ void DrasculaEngine::room_18(int fl) { } void DrasculaEngine::room_19(int fl) { - if (roomParse(room19Actions, fl)) + if (roomParse(room19Actions, ARRAYSIZE(room19Actions), fl)) return; hasAnswer = 0; @@ -478,7 +476,7 @@ bool DrasculaEngine::room_21(int fl) { } void DrasculaEngine::room_22(int fl) { - if (roomParse(room22Actions, fl)) + if (roomParse(room22Actions, ARRAYSIZE(room22Actions), fl)) return; if (pickedObject == 11 && fl == 140) { @@ -531,7 +529,7 @@ void DrasculaEngine::room_23(int fl) { } void DrasculaEngine::room_24(int fl) { - if (roomParse(room24Actions, fl)) + if (roomParse(room24Actions, ARRAYSIZE(room24Actions), fl)) return; if (pickedObject == kVerbOpen && fl == 105) @@ -547,7 +545,7 @@ void DrasculaEngine::room_24(int fl) { } void DrasculaEngine::room_26(int fl) { - if (roomParse(room26Actions, fl)) + if (roomParse(room26Actions, ARRAYSIZE(room26Actions), fl)) return; if (pickedObject == kVerbOpen && fl == 107 && flags[30] == 0) @@ -610,7 +608,7 @@ void DrasculaEngine::room_27(int fl) { } void DrasculaEngine::room_29(int fl) { - if (roomParse(room29Actions, fl)) + if (roomParse(room29Actions, ARRAYSIZE(room29Actions), fl)) return; if (pickedObject == kVerbOpen && fl == 114) @@ -622,7 +620,7 @@ void DrasculaEngine::room_29(int fl) { } void DrasculaEngine::room_30(int fl) { - if (roomParse(room30Actions, fl)) + if (roomParse(room30Actions, ARRAYSIZE(room30Actions), fl)) return; if (pickedObject == kVerbOpen && fl == 115) @@ -652,7 +650,7 @@ void DrasculaEngine::room_30(int fl) { } void DrasculaEngine::room_31(int fl) { - if (roomParse(room31Actions, fl)) + if (roomParse(room31Actions, ARRAYSIZE(room31Actions), fl)) return; if (pickedObject == kVerbPick && fl == 145) { @@ -668,7 +666,7 @@ void DrasculaEngine::room_31(int fl) { } void DrasculaEngine::room_34(int fl) { - if (roomParse(room34Actions, fl)) + if (roomParse(room34Actions, ARRAYSIZE(room34Actions), fl)) return; if (pickedObject == kVerbMove && fl == 146) @@ -712,14 +710,14 @@ void DrasculaEngine::room_35(int fl) { } void DrasculaEngine::room_44(int fl) { - if (roomParse(room44Actions, fl)) + if (roomParse(room44Actions, ARRAYSIZE(room44Actions), fl)) return; hasAnswer = 0; } void DrasculaEngine::room_49(int fl){ - if (roomParse(room49Actions, fl)) + if (roomParse(room49Actions, ARRAYSIZE(room49Actions), fl)) return; if (pickedObject == kVerbTalk && fl ==51) @@ -731,7 +729,7 @@ void DrasculaEngine::room_49(int fl){ } void DrasculaEngine::room_53(int fl) { - if (roomParse(room53Actions, fl)) + if (roomParse(room53Actions, ARRAYSIZE(room53Actions), fl)) return; if (pickedObject == kVerbPick && fl == 120) { @@ -756,7 +754,7 @@ void DrasculaEngine::room_53(int fl) { } void DrasculaEngine::room_54(int fl) { - if (roomParse(room54Actions, fl)) + if (roomParse(room54Actions, ARRAYSIZE(room54Actions), fl)) return; if ((pickedObject == kVerbTalk && fl == 118) || (pickedObject == kVerbLook && fl == 118 && flags[0] == 0)) @@ -791,7 +789,7 @@ void DrasculaEngine::room_54(int fl) { } void DrasculaEngine::room_55(int fl) { - if (roomParse(room55Actions, fl)) + if (roomParse(room55Actions, ARRAYSIZE(room55Actions), fl)) return; if (pickedObject == kVerbPick && fl == 122) { @@ -808,7 +806,7 @@ void DrasculaEngine::room_55(int fl) { } bool DrasculaEngine::room_56(int fl) { - if (roomParse(room56Actions, fl)) + if (roomParse(room56Actions, ARRAYSIZE(room56Actions), fl)) return false; if (pickedObject == kVerbOpen && fl == 124) { @@ -821,7 +819,7 @@ bool DrasculaEngine::room_56(int fl) { } void DrasculaEngine::room_58(int fl) { - if (roomParse(room56Actions, fl)) + if (roomParse(room58Actions, ARRAYSIZE(room58Actions), fl)) return; if (pickedObject == kVerbMove && fl == 103) @@ -897,7 +895,7 @@ void DrasculaEngine::room_59(int fl) { } bool DrasculaEngine::room_60(int fl) { - if (roomParse(room60Actions, fl)) + if (roomParse(room60Actions, ARRAYSIZE(room60Actions), fl)) return false; if (pickedObject == kVerbMove && fl == 112) @@ -923,14 +921,14 @@ bool DrasculaEngine::room_60(int fl) { } void DrasculaEngine::room_61(int fl) { - if (roomParse(room61Actions, fl)) + if (roomParse(room61Actions, ARRAYSIZE(room61Actions), fl)) return; hasAnswer = 0; } void DrasculaEngine::room_62(int fl) { - if (roomParse(room62Actions, fl)) + if (roomParse(room62Actions, ARRAYSIZE(room62Actions), fl)) return; if (pickedObject == kVerbTalk && fl == 53) @@ -946,14 +944,14 @@ void DrasculaEngine::room_62(int fl) { } void DrasculaEngine::room_63(int fl) { - if (roomParse(room63Actions, fl)) + if (roomParse(room63Actions, ARRAYSIZE(room63Actions), fl)) return; hasAnswer = 0; } void DrasculaEngine::room_pendulum(int fl) { - if (roomParse(roomPendulumActions, fl)) + if (roomParse(roomPendulumActions, ARRAYSIZE(roomPendulumActions), fl)) return; if (pickedObject == kVerbPick && fl == 101) -- cgit v1.2.3 From 659d2bb234da395c6f0425ab04e66670d5ab1ca1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 16:39:56 +0000 Subject: Fixed regression from commit #32536 svn-id: r32538 --- engines/drascula/rooms.cpp | 19 ++++++++++--------- engines/drascula/staticdata.h | 5 ----- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 2d4606564e..e318dccf27 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -226,15 +226,16 @@ void DrasculaEngine::room_7(int fl){ } void DrasculaEngine::room_8(int fl) { - if (roomParse(room8Actions, ARRAYSIZE(room8Actions), fl)) - return; - - if (pickedObject == kVerbLook && fl == 147 && flags[7] == 0) { - talk(58); - pickObject(15); - flags[7] = 1; - if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) - flags[38] = 1; + if (pickedObject == kVerbLook && fl == 147) { + if (flags[7] == 0) { + talk(58); + pickObject(15); + flags[7] = 1; + if (flags[7] == 1 && flags[26] == 1 && flags[34] == 1 && flags[35] == 1 && flags[37] == 1) + flags[38] = 1; + } else { + talk(59); + } } else hasAnswer = 0; } diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 02f9360e6e..897fb15386 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -268,11 +268,6 @@ RoomTalkAction room7Actions[] = { { -1, kVerbLook, 169, 44 } }; -RoomTalkAction room8Actions[] = { - // num action object speech - { -1, kVerbLook, 147, 59 } -}; - RoomTalkAction room9Actions[] = { // num action object speech { -1, kVerbLook, 150, 35 }, -- cgit v1.2.3 From 0931f926d45db807806f433cde9114839c4de65e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 17:02:25 +0000 Subject: Fixed typo in the initialization of the _textd1 array, which is now set correctly. Fixes bug #1982111 - "DRASCULA: Crash when buying sickle" svn-id: r32539 --- engines/drascula/staticdata.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 897fb15386..bbfcfbfdb6 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -5709,8 +5709,8 @@ const char *_textd1[][11] = { // 75 "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", - "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444", + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" }, { // 68 @@ -5725,8 +5725,8 @@ const char *_textd1[][11] = { // 75 "4444777444455550022220555044444446666622526644475533223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", "5555000444555033022755644446666005204402266222003332222774440446665555005550335544444", - "5666500444555033022755555000444444444444444444444444444444" - "00222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", + "5666500444555033022755555000444444444444444444444444444444", + "00222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" }, { // 68 @@ -5741,8 +5741,8 @@ const char *_textd1[][11] = { // 75 "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", - "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444", + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" }, { // 68 @@ -5757,8 +5757,8 @@ const char *_textd1[][11] = { // 75 "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", - "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444", + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" }, { // 68 @@ -5773,8 +5773,8 @@ const char *_textd1[][11] = { // 75 "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", - "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444" - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444", + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" }, }; -- cgit v1.2.3 From 73da6ab51ef86b89adad28a935ac22bad257b834 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 4 Jun 2008 17:20:25 +0000 Subject: - Removed -Wconversion from compiler options for g++ 4.3, it's behavior has fundamently changed in g++ 4.3 - Added -Wno-empty-body and -Wno-parentheses as compiler flags for g++ 4.3 for *now* (we should think of removing -Wparentheses though) - Fixed some warnings for g++ 4.3 (only for the engines I'm using) svn-id: r32540 --- Makefile | 2 +- backends/platform/sdl/events.cpp | 2 +- backends/platform/sdl/sdl.cpp | 2 +- common/rect.h | 2 +- configure | 6 ++++++ engines/saga/detection.cpp | 4 ++-- engines/saga/saga.h | 10 +++++----- engines/sword2/header.h | 18 +++++++++--------- engines/sword2/object.h | 12 ++++++------ engines/sword2/screen.h | 2 +- gui/eval.cpp | 2 +- 11 files changed, 34 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index d230120bb0..506265032a 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ CXXFLAGS:= -Wall $(CXXFLAGS) # Turn off some annoying and not-so-useful warnings CXXFLAGS+= -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder # Enable even more warnings... -CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion +CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wcast-align CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor -Wwrite-strings # Disable RTTI and exceptions, and enabled checking of pointers returned by "new" diff --git a/backends/platform/sdl/events.cpp b/backends/platform/sdl/events.cpp index 9a0a33f45c..a4a72ca380 100644 --- a/backends/platform/sdl/events.cpp +++ b/backends/platform/sdl/events.cpp @@ -148,7 +148,7 @@ void OSystem_SDL::handleKbdMouse() { _km.y_down_count = 1; } - SDL_WarpMouse(_km.x, _km.y); + SDL_WarpMouse((Uint16)_km.x, (Uint16)_km.y); } } } diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index b750864ad8..be3aaad926 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -406,7 +406,7 @@ bool OSystem_SDL::setSoundCallback(SoundProc proc, void *param) { // about 1/32th of a second. Note that it must be a power of two. // So e.g. at 22050 Hz, we request a sample buffer size of 2048. int samples = 8192; - while (32 * samples >= _samplesPerSec) { + while (16 * samples >= _samplesPerSec) { samples >>= 1; } diff --git a/common/rect.h b/common/rect.h index d88f400039..f71124434a 100644 --- a/common/rect.h +++ b/common/rect.h @@ -61,7 +61,7 @@ struct Point { if (diffy >= 0x1000) return 0xFFFFFF; - return diffx*diffx + diffy*diffy; + return uint(diffx*diffx + diffy*diffy); } }; diff --git a/configure b/configure index 960ed4063f..f91819b7f1 100755 --- a/configure +++ b/configure @@ -943,6 +943,12 @@ if test "$_cxx_major" -ge "3" ; then add_line_to_config_mk 'HAVE_GCC3 = 1' fi; +if test "$_cxx_major" -ge "4" && test "$_cxx_minor" -ge "3" ; then + CXXFLAGS="$CXXFLAGS -Wno-parentheses -Wno-empty-body" +else + CXXFLAGS="$CXXFLAGS -Wconversion" +fi; + add_to_config_mk_if_no $_build_hq_scalers 'DISABLE_HQ_SCALERS = 1' add_to_config_mk_if_no $_build_scalers 'DISABLE_SCALERS = 1' diff --git a/engines/saga/detection.cpp b/engines/saga/detection.cpp index 7fd1024405..9c897d8ebc 100644 --- a/engines/saga/detection.cpp +++ b/engines/saga/detection.cpp @@ -54,8 +54,8 @@ struct SAGAGameDescription { const GamePatchDescription *patchDescriptions; }; -const bool SagaEngine::isBigEndian() const { return (_gameDescription->features & GF_BIG_ENDIAN_DATA) != 0; } -const bool SagaEngine::isMacResources() const { return (getPlatform() == Common::kPlatformMacintosh); } +bool SagaEngine::isBigEndian() const { return (_gameDescription->features & GF_BIG_ENDIAN_DATA) != 0; } +bool SagaEngine::isMacResources() const { return (getPlatform() == Common::kPlatformMacintosh); } const GameResourceDescription *SagaEngine::getResourceDescription() { return _gameDescription->resourceDescription; } const GameSoundInfo *SagaEngine::getVoiceInfo() const { return _gameDescription->voiceInfo; } const GameSoundInfo *SagaEngine::getSfxInfo() const { return _gameDescription->sfxInfo; } diff --git a/engines/saga/saga.h b/engines/saga/saga.h index 4fd789cb4e..4a5fae7ddb 100644 --- a/engines/saga/saga.h +++ b/engines/saga/saga.h @@ -580,15 +580,15 @@ public: _mouseClickCount = 0; } - const bool leftMouseButtonPressed() const { + bool leftMouseButtonPressed() const { return _leftMouseButtonPressed; } - const bool rightMouseButtonPressed() const { + bool rightMouseButtonPressed() const { return _rightMouseButtonPressed; } - const bool mouseButtonPressed() const { + bool mouseButtonPressed() const { return _leftMouseButtonPressed || _rightMouseButtonPressed; } @@ -622,8 +622,8 @@ public: public: bool initGame(void); - const bool isBigEndian() const; - const bool isMacResources() const; + bool isBigEndian() const; + bool isMacResources() const; const GameResourceDescription *getResourceDescription(); const GameSoundInfo *getVoiceInfo() const; const GameSoundInfo *getSfxInfo() const; diff --git a/engines/sword2/header.h b/engines/sword2/header.h index 5100e43de1..8cd8c900f8 100644 --- a/engines/sword2/header.h +++ b/engines/sword2/header.h @@ -56,7 +56,7 @@ struct ResHeader { // compressed) byte name[NAME_LEN]; // Name of object - static const int size() { + static int size() { return 44; } @@ -152,7 +152,7 @@ struct AnimHeader { uint8 feetEndDir; // Direction to start in after running anim uint16 blend; - static const int size() { + static int size() { return 15; } @@ -209,7 +209,7 @@ struct CdtEntry { uint8 frameType; // 0 = print sprite normally with top-left // corner at (x,y), otherwise see below... - static const int size() { + static int size() { return 9; } @@ -250,7 +250,7 @@ struct FrameHeader { uint16 width; // Dimensions of frame uint16 height; - static const int size() { + static int size() { return 8; } @@ -299,7 +299,7 @@ struct MultiScreenHeader { uint32 paletteTable; uint32 maskOffset; - static const int size() { + static int size() { return 36; } @@ -339,7 +339,7 @@ struct ScreenHeader { uint16 height; uint16 noLayers; // number of layer areas - static const int size() { + static int size() { return 6; } @@ -374,7 +374,7 @@ struct LayerHeader { uint32 offset; // where to find mask data (from start of // standard file header) - static const int size() { + static int size() { return 16; } @@ -436,7 +436,7 @@ public: _addr = NULL; } - static const int size() { + static int size() { return 44; } @@ -479,7 +479,7 @@ struct TextHeader { uint32 noOfLines; // how many lines of text are there in this // module - static const int size() { + static int size() { return 4; } diff --git a/engines/sword2/object.h b/engines/sword2/object.h index 57f020eb63..b6b6ca5174 100644 --- a/engines/sword2/object.h +++ b/engines/sword2/object.h @@ -48,7 +48,7 @@ struct ObjectMouse { int32 priority; int32 pointer; // type (or resource id?) of pointer used over this area - static const int size() { + static int size() { return 24; } @@ -91,7 +91,7 @@ public: _addr = addr; } - static const int size() { + static int size() { return 8; } @@ -139,7 +139,7 @@ public: _addr = addr; } - static const int size() { + static int size() { return 12; } @@ -178,7 +178,7 @@ public: _addr = addr; } - static const int size() { + static int size() { return 36; } @@ -240,7 +240,7 @@ public: _addr = addr; } - static const int size() { + static int size() { return 56; } @@ -291,7 +291,7 @@ struct ObjectWalkdata { int32 dx[8 * (12 + 1)]; // walk step distances in x direction int32 dy[8 * (12 + 1)]; // walk step distances in y direction - static const int size() { + static int size() { return 916; } diff --git a/engines/sword2/screen.h b/engines/sword2/screen.h index 93cc5e40ce..6defe51fdc 100644 --- a/engines/sword2/screen.h +++ b/engines/sword2/screen.h @@ -187,7 +187,7 @@ struct Parallax { // The dimensions are followed by an offset table, but we don't know in // advance how big it is. See initializeBackgroundLayer(). - static const int size() { + static int size() { return 4; } diff --git a/gui/eval.cpp b/gui/eval.cpp index a2aec6d0d3..716006c108 100644 --- a/gui/eval.cpp +++ b/gui/eval.cpp @@ -102,7 +102,7 @@ void Eval::level4(int *result) { char op; op = 0; - if ((_tokenType == tDelimiter) && *_token == '+' || *_token == '-') { + if ((_tokenType == tDelimiter) && (*_token == '+' || *_token == '-')) { op = *_token; getToken(); } -- cgit v1.2.3 From f21a15cbbbb85780aad26a9df648f0ee16349ea1 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 17:41:40 +0000 Subject: Removed decompressPic() and fixed the animation of Von Braun and his glass cage svn-id: r32541 --- engines/drascula/animation.cpp | 2 +- engines/drascula/drascula.cpp | 4 ---- engines/drascula/drascula.h | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index d3d6011599..14d73ddd3d 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -836,7 +836,7 @@ void DrasculaEngine::animation_14_2() { flags[24] = 1; - decompressPic(drawSurface1, 1); + memcpy(drawSurface1, screenSurface, 64000); playSound(7); hiccup(15); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 7675bd9fa2..a60a6d0f82 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -283,10 +283,6 @@ void DrasculaEngine::loadPic(const char *NamePcc, byte *targetSurface, int color _arj.read(cPal, 768); _arj.close(); - decompressPic(targetSurface, colorCount); -} - -void DrasculaEngine::decompressPic(byte *targetSurface, int colorCount) { memcpy(targetSurface, pcxBuffer, 64000); free(pcxBuffer); setRGB((byte *)cPal, colorCount); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 65308bc14a..ae26d60475 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -185,7 +185,6 @@ public: } void loadPic(const char *NamePcc, byte *targetSurface, int colorCount = 1); - void decompressPic(byte *targetSurface, int colorCount); typedef char DacPalette256[256][3]; -- cgit v1.2.3 From b0eb20b4b8e829200b538a32b6333c5b893225cb Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 18:08:19 +0000 Subject: Fixed the animation where the window is broken by the spear outside the church svn-id: r32542 --- engines/drascula/animation.cpp | 18 ++++++++---------- engines/drascula/talk.cpp | 4 +++- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 14d73ddd3d..cdc2f1ea8b 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -2480,20 +2480,18 @@ void DrasculaEngine::animation_5_2() { copyBackground(1, 1, 213, 66, 53,84, backSurface, screenSurface); updateScreen(); - // FIXME: the widths in these calls were 53 and 52 (by mistake, probably). - // I've set them to 53, but if any problems arise, we should try 52 as well - updateAnim(1, 213, 66, 53, 84, 6, backSurface); - updateAnim(86, 213, 66, 53, 84, 6, backSurface); - updateAnim(1, 213, 66, 53, 84, 6, extraSurface); - updateAnim(1, 213, 66, 53, 84, 6, extraSurface); - updateAnim(86, 213, 66, 53, 84, 6, extraSurface); - updateAnim(1, 213, 66, 53, 84, 6, frontSurface); + updateAnim(1, 213, 66, 52, 84, 6, backSurface); + updateAnim(86, 213, 66, 52, 84, 6, backSurface); + updateAnim(1, 213, 66, 52, 84, 6, extraSurface); + updateAnim(1, 213, 66, 52, 84, 6, extraSurface); + updateAnim(86, 213, 66, 52, 84, 6, extraSurface); + updateAnim(1, 213, 66, 52, 84, 6, frontSurface); playSound(1); - updateAnim(86, 213, 66, 53, 84, 6, frontSurface); + updateAnim(86, 213, 66, 52, 84, 6, frontSurface); stopSound(); - updateAnim(1, 213, 66, 53, 84, 6, drawSurface3); + updateAnim(1, 213, 66, 52, 84, 6, drawSurface3); loadPic(994, backSurface); loadPic(974, extraSurface); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index c273c5c5a9..9d521293f5 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -904,6 +904,7 @@ void DrasculaEngine::talk_sync(const char *said, const char *filename, const cha int y_mask_talk = 170; int p, face = 0; int length = strlen(said); + char buf[1]; color_abc(kColorYellow); @@ -917,7 +918,8 @@ void DrasculaEngine::talk_sync(const char *said, const char *filename, const cha talkInit(filename); do { - face = atoi(&syncChar[p]); + strncpy(buf, &syncChar[p], 1); + face = atoi(buf); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); -- cgit v1.2.3 From 4ee6f4d01a6de5a0f908d8b7ea7cbe7bdd3a63e7 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 4 Jun 2008 18:27:58 +0000 Subject: Fix memory overwrite svn-id: r32543 --- engines/drascula/talk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 9d521293f5..ff14b043c0 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -904,7 +904,7 @@ void DrasculaEngine::talk_sync(const char *said, const char *filename, const cha int y_mask_talk = 170; int p, face = 0; int length = strlen(said); - char buf[1]; + char buf[2]; color_abc(kColorYellow); -- cgit v1.2.3 From 8d4cf05ccc8e9a52f3de1111c07f7cbc5b4c7824 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 19:21:17 +0000 Subject: Reduced the delays in Drascula's save/load screen to make it more responsive (since delay() waits for double the time internally) svn-id: r32544 --- engines/drascula/drascula.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index a60a6d0f82..003c2f8783 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1371,7 +1371,7 @@ bool DrasculaEngine::saves() { updateEvents(); if (button_izq == 1) { - delay(100); + delay(50); for (n = 0; n < NUM_SAVES; n++) { if (mouseX > 115 && mouseY > y + (9 * n) && mouseX < 115 + 175 && mouseY < y + 10 + (9 * n)) { strcpy(select, names[n]); @@ -1443,11 +1443,11 @@ bool DrasculaEngine::saves() { print_abc("elige una partida", 117, 15); } updateScreen(); - delay(400); + delay(200); } y = 26; - delay(10); + delay(5); } clearRoom(); -- cgit v1.2.3 From f44d39494df834a21411f37b4a98aaba5618ef74 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 19:24:50 +0000 Subject: Clear "select" when the save/load screen pops up, to avoid having garbage shown in the selected game slot svn-id: r32545 --- engines/drascula/drascula.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 003c2f8783..fa473cee22 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1356,6 +1356,8 @@ bool DrasculaEngine::saves() { color_abc(kColorLightGreen); + sprintf(select, ""); + for (;;) { y = 27; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); -- cgit v1.2.3 From 1869141f0448621b19ab25d3ca338a134500a049 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Wed, 4 Jun 2008 19:27:14 +0000 Subject: saves -> saveLoadScreen svn-id: r32546 --- engines/drascula/drascula.cpp | 4 ++-- engines/drascula/drascula.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index fa473cee22..6d7e050a2f 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -650,7 +650,7 @@ bool DrasculaEngine::escoba() { if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_F10) { - if (!saves()) + if (!saveLoadScreen()) return true; if (currentChapter != 3) cont_sv = 0; @@ -1326,7 +1326,7 @@ void DrasculaEngine::mesa() { updateEvents(); } -bool DrasculaEngine::saves() { +bool DrasculaEngine::saveLoadScreen() { char names[10][23]; char file[50]; char fileEpa[50]; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index ae26d60475..d206947dc9 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -330,7 +330,7 @@ public: Common::KeyCode getScan(); void selectVerb(int); void mesa(); - bool saves(); + bool saveLoadScreen(); void print_abc(const char *, int, int); void delay(int ms); bool confirmExit(); -- cgit v1.2.3 From 5e666ef774d11d030ea9957ecc64a197de2abcd8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 4 Jun 2008 20:28:20 +0000 Subject: Patch #1971285: "Nintendo Wii port" svn-id: r32547 --- backends/fs/wii/wii-fs-factory.cpp | 49 ++++ backends/fs/wii/wii-fs-factory.h | 50 ++++ backends/fs/wii/wii-fs.cpp | 196 +++++++++++++ backends/module.mk | 1 + backends/platform/wii/Makefile | 156 +++++++++++ backends/platform/wii/gecko_console.cpp | 91 +++++++ backends/platform/wii/gecko_console.h | 14 + backends/platform/wii/gx_supp.cpp | 264 ++++++++++++++++++ backends/platform/wii/gx_supp.h | 39 +++ backends/platform/wii/main.cpp | 88 ++++++ backends/platform/wii/osystem.cpp | 188 +++++++++++++ backends/platform/wii/osystem.h | 163 +++++++++++ backends/platform/wii/osystem_events.cpp | 262 ++++++++++++++++++ backends/platform/wii/osystem_gfx.cpp | 453 +++++++++++++++++++++++++++++++ backends/platform/wii/osystem_sfx.cpp | 133 +++++++++ common/scummsys.h | 8 + common/system.cpp | 2 +- dists/wii/READMII | 64 +++++ dists/wii/meta.xml | 12 + 19 files changed, 2232 insertions(+), 1 deletion(-) create mode 100644 backends/fs/wii/wii-fs-factory.cpp create mode 100644 backends/fs/wii/wii-fs-factory.h create mode 100644 backends/fs/wii/wii-fs.cpp create mode 100644 backends/platform/wii/Makefile create mode 100644 backends/platform/wii/gecko_console.cpp create mode 100644 backends/platform/wii/gecko_console.h create mode 100644 backends/platform/wii/gx_supp.cpp create mode 100644 backends/platform/wii/gx_supp.h create mode 100644 backends/platform/wii/main.cpp create mode 100644 backends/platform/wii/osystem.cpp create mode 100644 backends/platform/wii/osystem.h create mode 100644 backends/platform/wii/osystem_events.cpp create mode 100644 backends/platform/wii/osystem_gfx.cpp create mode 100644 backends/platform/wii/osystem_sfx.cpp create mode 100644 dists/wii/READMII create mode 100644 dists/wii/meta.xml diff --git a/backends/fs/wii/wii-fs-factory.cpp b/backends/fs/wii/wii-fs-factory.cpp new file mode 100644 index 0000000000..9839858dd5 --- /dev/null +++ b/backends/fs/wii/wii-fs-factory.cpp @@ -0,0 +1,49 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#if defined(__WII__) + +#include + +#include "backends/fs/wii/wii-fs-factory.h" +#include "backends/fs/wii/wii-fs.cpp" + +DECLARE_SINGLETON(WiiFilesystemFactory); + +AbstractFilesystemNode *WiiFilesystemFactory::makeRootFileNode() const { + return new WiiFilesystemNode(); +} + +AbstractFilesystemNode *WiiFilesystemFactory::makeCurrentDirectoryFileNode() const { + char buf[MAXPATHLEN]; + + if (getcwd(buf, MAXPATHLEN)) + return new WiiFilesystemNode(buf, true); + else + return new WiiFilesystemNode(); +} + +AbstractFilesystemNode *WiiFilesystemFactory::makeFileNodePath(const String &path) const { + return new WiiFilesystemNode(path, true); +} +#endif + diff --git a/backends/fs/wii/wii-fs-factory.h b/backends/fs/wii/wii-fs-factory.h new file mode 100644 index 0000000000..24badee330 --- /dev/null +++ b/backends/fs/wii/wii-fs-factory.h @@ -0,0 +1,50 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#ifndef _WII_FILESYSTEM_FACTORY_H_ +#define _WII_FILESYSTEM_FACTORY_H_ + +#include "common/singleton.h" +#include "backends/fs/fs-factory.h" + +/** + * Creates WiiFilesystemNode objects. + * + * Parts of this class are documented in the base interface class, FilesystemFactory. + */ +class WiiFilesystemFactory : public FilesystemFactory, public Common::Singleton { +public: + typedef Common::String String; + + virtual AbstractFilesystemNode *makeRootFileNode() const; + virtual AbstractFilesystemNode *makeCurrentDirectoryFileNode() const; + virtual AbstractFilesystemNode *makeFileNodePath(const String &path) const; + +protected: + WiiFilesystemFactory() {}; + +private: + friend class Common::Singleton; +}; + +#endif /*Wii_FILESYSTEM_FACTORY_H*/ + diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp new file mode 100644 index 0000000000..e6d0cf4c7e --- /dev/null +++ b/backends/fs/wii/wii-fs.cpp @@ -0,0 +1,196 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + */ + +#if defined(__WII__) + +#include "backends/fs/abstract-fs.h" + +#include + +#include +#include +#include + +/** + * Implementation of the ScummVM file system API based on Wii. + * + * Parts of this class are documented in the base interface class, AbstractFilesystemNode. + */ +class WiiFilesystemNode : public AbstractFilesystemNode { +protected: + String _displayName; + String _path; + bool _isDirectory, _isReadable, _isWritable; + +public: + /** + * Creates a WiiFilesystemNode with the root node as path. + */ + WiiFilesystemNode(); + + /** + * Creates a WiiFilesystemNode for a given path. + * + * @param path String with the path the new node should point to. + * @param verify true if the isValid and isDirectory flags should be verified during the construction. + */ + WiiFilesystemNode(const String &path, bool verify); + + virtual bool exists() const; + virtual String getDisplayName() const { return _displayName; } + virtual String getName() const { return _displayName; } + virtual String getPath() const { return _path; } + virtual bool isDirectory() const { return _isDirectory; } + virtual bool isReadable() const { return _isReadable; } + virtual bool isWritable() const { return _isWritable; } + + virtual AbstractFilesystemNode *getChild(const String &n) const; + virtual bool getChildren(AbstractFSList &list, ListMode mode, bool hidden) const; + virtual AbstractFilesystemNode *getParent() const; + +private: + virtual void setFlags(); +}; + +/** + * Returns the last component of a given path. + * + * Examples: + * /foo/bar.txt would return /bar.txt + * /foo/bar/ would return /bar/ + * + * @param str String containing the path. + * @return Pointer to the first char of the last component inside str. + */ +const char *lastPathComponent(const Common::String &str) { + if(str.empty()) + return ""; + + const char *start = str.c_str(); + const char *cur = start + str.size() - 2; + + while (cur >= start && *cur != '/') { + --cur; + } + + return cur + 1; +} + +void WiiFilesystemNode::setFlags() { + struct stat st; + + _isDirectory = false; + _isReadable = false; + _isWritable = false; + + if (!stat(_path.c_str(), &st)) { + _isDirectory = S_ISDIR(st.st_mode); + _isReadable = (st.st_mode & S_IRUSR) > 0; + _isWritable = (st.st_mode & S_IWUSR) > 0; + } +} + + +WiiFilesystemNode::WiiFilesystemNode() { + // The root dir. + _path = "fat:/"; + _displayName = _path; + + setFlags(); +} + +WiiFilesystemNode::WiiFilesystemNode(const String &p, bool verify) { + assert(p.size() > 0); + + _path = p; + + _displayName = lastPathComponent(_path); + + if (verify) + setFlags(); +} + +bool WiiFilesystemNode::exists() const { + struct stat st; + return stat(_path.c_str (), &st) == 0; +} + +AbstractFilesystemNode *WiiFilesystemNode::getChild(const String &n) const { + assert(_isDirectory); + + String newPath(_path); + if (newPath.lastChar() != '/') + newPath += '/'; + newPath += n; + + return new WiiFilesystemNode(newPath, true); +} + +bool WiiFilesystemNode::getChildren(AbstractFSList &myList, ListMode mode, bool hidden) const { + assert(_isDirectory); + + DIR_ITER* dp = diropen (_path.c_str()); + + if (dp == NULL) + return false; + + char filename[MAXPATHLEN]; + struct stat st; + + while (dirnext(dp, filename, &st) == 0) { + if (strcmp(filename, ".") == 0 || strcmp(filename, "..") == 0) + continue; + + String newPath(_path); + if (newPath.lastChar() != '/') + newPath += '/'; + newPath += filename; + + bool isDir = S_ISDIR(st.st_mode); + + if ((mode == FilesystemNode::kListFilesOnly && isDir) || + (mode == FilesystemNode::kListDirectoriesOnly && !isDir)) + continue; + + if (isDir) + newPath += '/'; + + myList.push_back(new WiiFilesystemNode(newPath, true)); + } + + dirclose(dp); + + return true; +} + +AbstractFilesystemNode *WiiFilesystemNode::getParent() const { + if (_path == "/") + return 0; + + const char *start = _path.c_str(); + const char *end = lastPathComponent(_path); + + return new WiiFilesystemNode(String(start, end - start), true); +} + +#endif //#if defined(__WII__) + diff --git a/backends/module.mk b/backends/module.mk index 187cc83ee9..6642a3a281 100644 --- a/backends/module.mk +++ b/backends/module.mk @@ -9,6 +9,7 @@ MODULE_OBJS := \ fs/psp/psp-fs-factory.o \ fs/symbian/symbian-fs-factory.o \ fs/windows/windows-fs-factory.o \ + fs/wii/wii-fs-factory.o \ events/default/default-events.o \ midi/alsa.o \ midi/camd.o \ diff --git a/backends/platform/wii/Makefile b/backends/platform/wii/Makefile new file mode 100644 index 0000000000..0654fa254d --- /dev/null +++ b/backends/platform/wii/Makefile @@ -0,0 +1,156 @@ +DEBUG_WII = 1 + +ENABLE_SCUMM = 1 +ENABLE_SCUMM_7_8 = 1 +ENABLE_HE = 1 +# ENABLE_AGI = 1 +ENABLE_AGOS = 1 +ENABLE_CINE = 1 +ENABLE_CRUISE = 1 +ENABLE_DRASCULA = 1 +ENABLE_GOB = 1 +ENABLE_IGOR = 1 +ENABLE_KYRA = 1 +ENABLE_LURE = 1 +ENABLE_M4 = 1 +ENABLE_MADE = 1 +ENABLE_PARALLACTION = 1 +ENABLE_QUEEN = 1 +ENABLE_SAGA = 1 +ENABLE_SKY = 1 +ENABLE_SWORD1 = 1 +ENABLE_SWORD2 = 1 +ENABLE_TOUCHE = 1 + +DISABLE_HQ_SCALERS = 1 +DISABLE_SCALERS = 1 + +USE_ZLIB = 1 +USE_MAD = 1 +USE_TREMOR = 1 +USE_FLAC = 1 +USE_MPEG2 = 1 +USE_MT32EMU = 1 + +srcdir = ../../.. +VPATH = $(srcdir) +HAVE_GCC3 = 1 + +DISTPATH = $(srcdir)/dists/wii + +ifeq ($(strip $(DEVKITPPC)),) +$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=devkitPPC") +endif + +PREFIX = $(DEVKITPPC)/bin/powerpc-gekko- +CXX = $(PREFIX)g++ +AS = $(PREFIX)gcc +LD = $(PREFIX)gcc +AR = $(PREFIX)ar cru +RANLIB = $(PREFIX)ranlib +STRIP = $(PREFIX)strip -g +OBJCOPY = $(PREFIX)objcopy +MKDIR = mkdir -p +RM = rm -f +CP = cp -f + +TARGET = scummvm-wii + +MACHDEP = -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float \ + -ffunction-sections -fdata-sections -fmodulo-sched + +INCDIR = $(srcdir) . $(srcdir)/engines/ $(DEVKITPRO)/libogc/include +LIBDIR = $(DEVKITPRO)/libogc/lib/wii + +CXXFLAGS = -g -Os -Wall $(MACHDEP) -D__WII__ \ + -Wno-multichar -fno-exceptions -fno-rtti + +CXXFLAGS += $(addprefix -I,$(INCDIR)) +LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(TARGET).elf.map +LDFLAGS += $(addprefix -L,$(LIBDIR)) +LIBS = -lstdc++ -lfat -lwiiuse -lbte -logc -lm + +CXXFLAGS += -I$(DEVKITPRO)/3rd/wii/include +LDFLAGS += -L$(DEVKITPRO)/3rd/wii/lib + +ifdef DEBUG_WII +CXXFLAGS += -DDEBUG_WII +LIBS += -ldb +endif + +ifdef USE_ZLIB +CXXFLAGS += -DUSE_ZLIB +LIBS += -lz +endif + +ifdef USE_MAD +CXXFLAGS += -DUSE_MAD -I$(DEVKITPRO)/libogc/include/mad +LIBS += -lmad +endif + +ifdef USE_TREMOR +CXXFLAGS += -DUSE_VORBIS -DUSE_TREMOR +LIBS += -lvorbisidec +endif + +ifdef USE_FLAC +CXXFLAGS += -DUSE_FLAC +LIBS += -lFLAC +endif + +ifdef USE_MPEG2 +CXXFLAGS += -DUSE_MPEG2 +LIBS += -lmpeg2 +endif + +ifdef USE_MT32EMU +CXXFLAGS += -DUSE_MT32EMU +endif + +OBJS := backends/platform/wii/main.o \ + backends/platform/wii/gecko_console.o \ + backends/platform/wii/gx_supp.o \ + backends/platform/wii/osystem.o \ + backends/platform/wii/osystem_gfx.o \ + backends/platform/wii/osystem_sfx.o \ + backends/platform/wii/osystem_events.o + +include $(srcdir)/Makefile.common + +.PHONY: clean-wii distclean-wii upload dist + +all: $(TARGET).dol + +$(TARGET).dol: $(TARGET).elf + $(OBJCOPY) -O binary $< $@ + +$(TARGET).elf: $(OBJS) + $(LD) $^ $(LDFLAGS) $(LIBS) -o $@ + +clean: clean-wii + +clean-wii: + @-$(RM) $(TARGET).elf $(TARGET).elf.map $(TARGET).dol + +distclean: distclean-wii + +distclean-wii: + @-$(RM) dist + +upload: + $(DEVKITPPC)/bin/wiiload $(TARGET).dol + +dist: + $(MKDIR) dist/apps/scummvm + $(CP) $(TARGET).dol dist/apps/scummvm/boot.dol + $(CP) $(DISTPATH)/meta.xml dist/apps/scummvm/ + $(CP) $(DISTPATH)/icon.png dist/apps/scummvm/ + $(CP) $(DISTPATH)/READMII dist/apps/scummvm/ + $(CP) $(srcdir)/AUTHORS dist/apps/scummvm/ + $(CP) $(srcdir)/COPYING dist/apps/scummvm/ + $(CP) $(srcdir)/COPYRIGHT dist/apps/scummvm/ + $(CP) $(srcdir)/NEWS dist/apps/scummvm/ + $(CP) $(srcdir)/README dist/apps/scummvm/ + $(CP) $(DIST_FILES_THEMES) dist/apps/scummvm/ + $(CP) $(DIST_FILES_ENGINEDATA) dist/apps/scummvm/ + diff --git a/backends/platform/wii/gecko_console.cpp b/backends/platform/wii/gecko_console.cpp new file mode 100644 index 0000000000..c419f6e7e5 --- /dev/null +++ b/backends/platform/wii/gecko_console.cpp @@ -0,0 +1,91 @@ +/*------------------------------------------------------------- + +Copyright (C) 2008 +Hector Martin (marcan) + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any +damages arising from the use of this software. + +Permission is granted to anyone to use this software for any +purpose, including commercial applications, and to alter it and +redistribute it freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you +must not claim that you wrote the original software. If you use +this software in a product, an acknowledgment in the product +documentation would be appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and +must not be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. + +-------------------------------------------------------------*/ + +#include +#include +#include +#include +#include + +#include "gecko_console.h" + +#ifdef __cplusplus +extern "C" { +#endif + +static const devoptab_t *dotab_console; +int usb_sendbuffer_safe(s32 chn,const void *buffer,int size); +int usb_sendbuffer(s32 chn,const void *buffer,int size); + +int __gecko_write(struct _reent *r,int fd,const char *ptr,int len) { + char *tmp = (char*)ptr; + u32 level; + if(dotab_console) + dotab_console->write_r(r,fd,ptr,len); + + if(!tmp || len<=0) + return -1; + level = IRQ_Disable(); + usb_sendbuffer(1, ptr, len); + IRQ_Restore(level); + return len; +} + +const devoptab_t dotab_gecko = { + "stdout", // device name + 0, // size of file structure + NULL, // device open + NULL, // device close + __gecko_write, // device write + NULL, // device read + NULL, // device seek + NULL, // device fstat + NULL, // device stat + NULL, // device link + NULL, // device unlink + NULL, // device chdir + NULL, // device rename + NULL, // device mkdir + 0, // dirStateSize + NULL, // device diropen_r + NULL, // device dirreset_r + NULL, // device dirnext_r + NULL, // device dirclose_r + NULL // device statvfs_r +}; + +void gecko_console_init(int chain) { + dotab_console = NULL; + if(chain) + dotab_console = devoptab_list[STD_OUT]; + devoptab_list[STD_OUT] = &dotab_gecko; + devoptab_list[STD_ERR] = &dotab_gecko; +} + +#ifdef __cplusplus +} +#endif + diff --git a/backends/platform/wii/gecko_console.h b/backends/platform/wii/gecko_console.h new file mode 100644 index 0000000000..ba7c393add --- /dev/null +++ b/backends/platform/wii/gecko_console.h @@ -0,0 +1,14 @@ +#ifndef _WII_GECKO_CONSOLE_H_ +#define _WII_GECKO_CONSOLE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +void gecko_console_init(int chain); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/backends/platform/wii/gx_supp.cpp b/backends/platform/wii/gx_supp.cpp new file mode 100644 index 0000000000..4c7b8ed58a --- /dev/null +++ b/backends/platform/wii/gx_supp.cpp @@ -0,0 +1,264 @@ +/**************************************************************************** +* Generic GX Support for Emulators +* softdev 2007 +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License along +* with this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* +* NGC GX Video Functions +* +* These are pretty standard functions to setup and use GX scaling. +****************************************************************************/ + +#include +#include +#include +#include +#include + +#define DEFAULT_FIFO_SIZE (256 * 1024) + +#define HASPECT 320 +#define VASPECT 240 + +#ifdef __cplusplus +extern "C" { +#endif + +/*** 2D ***/ +static u32 whichfb; +static u32 *xfb[2]; +static GXRModeObj *vmode; + +/*** 3D GX ***/ +static u8 *gp_fifo; + +/*** Texture memory ***/ +static u8 *texturemem; +static u32 texturesize; + +GXTexObj texobj; +static Mtx view; +static u16 vwidth, vheight, oldvwidth, oldvheight; + +/* New texture based scaler */ +typedef struct tagcamera { + Vector pos; + Vector up; + Vector view; +} camera; + +static s16 square[] ATTRIBUTE_ALIGN(32) = { + -HASPECT, VASPECT, 0, + HASPECT, VASPECT, 0, + HASPECT, -VASPECT, 0, + -HASPECT, -VASPECT, 0, +}; + +static camera cam = { + { 0.0f, 0.0f, 370.0f }, + { 0.0f, 0.5f, 0.0f }, + { 0.0f, 0.0f, -0.5f } +}; + +void GX_InitVideo() { + vmode = VIDEO_GetPreferredMode(NULL); + VIDEO_Configure(vmode); + + xfb[0] = (u32 *) MEM_K0_TO_K1 (SYS_AllocateFramebuffer(vmode)); + xfb[1] = (u32 *) MEM_K0_TO_K1 (SYS_AllocateFramebuffer(vmode)); + gp_fifo = (u8 *) memalign(32, DEFAULT_FIFO_SIZE); + + VIDEO_ClearFrameBuffer(vmode, xfb[0], COLOR_BLACK); + VIDEO_ClearFrameBuffer(vmode, xfb[1], COLOR_BLACK); + + whichfb = 0; + VIDEO_SetNextFramebuffer(xfb[whichfb]); + VIDEO_SetBlack(FALSE); + VIDEO_Flush(); + VIDEO_WaitVSync(); + + if (vmode->viTVMode & VI_NON_INTERLACE) + VIDEO_WaitVSync(); +} + +/**************************************************************************** + * Scaler Support Functions + ****************************************************************************/ +static void draw_init(void) { + GX_ClearVtxDesc(); + GX_SetVtxDesc(GX_VA_POS, GX_INDEX8); + GX_SetVtxDesc(GX_VA_CLR0, GX_INDEX8); + GX_SetVtxDesc(GX_VA_TEX0, GX_DIRECT); + + GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0); + GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0); + GX_SetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0); + + GX_SetArray(GX_VA_POS, square, 3 * sizeof(s16)); + + GX_SetNumTexGens(1); + GX_SetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY); + + GX_InvalidateTexAll(); + + GX_InitTexObj(&texobj, texturemem, vwidth, vheight, GX_TF_RGB565, + GX_CLAMP, GX_CLAMP, GX_FALSE); +} + +static void draw_vert(u8 pos, u8 c, f32 s, f32 t) { + GX_Position1x8(pos); + GX_Color1x8(c); + GX_TexCoord2f32(s, t); +} + +static void draw_square(Mtx v) { + Mtx m; + Mtx mv; + + guMtxIdentity(m); + guMtxTransApply(m, m, 0, 0, -100); + guMtxConcat(v, m, mv); + + GX_LoadPosMtxImm(mv, GX_PNMTX0); + GX_Begin(GX_QUADS, GX_VTXFMT0, 4); + draw_vert(0, 0, 0.0, 0.0); + draw_vert(1, 0, 1.0, 0.0); + draw_vert(2, 0, 1.0, 1.0); + draw_vert(3, 0, 0.0, 1.0); + GX_End(); +} + +/**************************************************************************** + * StartGX + ****************************************************************************/ +void GX_Start(u16 width, u16 height, s16 haspect, s16 vaspect) { + Mtx p; + + GX_AbortFrame(); + + /*** Set new aspect ***/ + square[0] = square[9] = -haspect; + square[3] = square[6] = haspect; + square[1] = square[4] = vaspect; + square[7] = square[10] = -vaspect; + + /*** Allocate 32byte aligned texture memory ***/ + texturesize = (width * height) * 2; + texturemem = (u8 *) memalign(32, texturesize); + + GXColor gxbackground = { 0, 0, 0, 0xff }; + + /*** Clear out FIFO area ***/ + memset(gp_fifo, 0, DEFAULT_FIFO_SIZE); + + /*** Initialise GX ***/ + GX_Init(gp_fifo, DEFAULT_FIFO_SIZE); + GX_SetCopyClear(gxbackground, 0x00ffffff); + + GX_SetViewport(0, 0, vmode->fbWidth, vmode->efbHeight, 0, 1); + GX_SetDispCopyYScale((f32) vmode->xfbHeight / (f32) vmode->efbHeight); + GX_SetScissor(0, 0, vmode->fbWidth, vmode->efbHeight); + GX_SetDispCopySrc(0, 0, vmode->fbWidth, vmode->efbHeight); + GX_SetDispCopyDst(vmode->fbWidth, vmode->xfbHeight); + GX_SetCopyFilter(vmode->aa, vmode->sample_pattern, GX_TRUE, + vmode->vfilter); + GX_SetFieldMode(vmode->field_rendering, + ((vmode->viHeight == 2 * vmode->xfbHeight) ? + GX_ENABLE : GX_DISABLE)); + GX_SetPixelFmt(GX_PF_RGB8_Z24, GX_ZC_LINEAR); + GX_SetCullMode(GX_CULL_NONE); + GX_CopyDisp(xfb[whichfb ^ 1], GX_TRUE); + GX_SetDispCopyGamma(GX_GM_1_0); + + guPerspective(p, 60, 1.33f, 10.0f, 1000.0f); + GX_LoadProjectionMtx(p, GX_PERSPECTIVE); + memset(texturemem, 0, texturesize); + + GX_Flush(); + + /*** Setup for first call to scaler ***/ + vwidth = vheight = -1; +} + +/**************************************************************************** +* GX_Render +* +* Pass in a buffer, width and height to update as a tiled RGB565 texture +****************************************************************************/ +void GX_Render(u16 width, u16 height, u8 *buffer, u16 pitch) { + u16 h, w; + u64 *dst = (u64 *) texturemem; + u64 *src1 = (u64 *) buffer; + u64 *src2 = (u64 *) (buffer + pitch); + u64 *src3 = (u64 *) (buffer + (pitch * 2)); + u64 *src4 = (u64 *) (buffer + (pitch * 3)); + u16 rowpitch = (pitch >> 3) * 3 + pitch % 8; + + vwidth = width; + vheight = height; + + whichfb ^= 1; + + if ((oldvheight != vheight) || (oldvwidth != vwidth)) { + /** Update scaling **/ + oldvwidth = vwidth; + oldvheight = vheight; + draw_init(); + memset(&view, 0, sizeof(Mtx)); + guLookAt(view, &cam.pos, &cam.up, &cam.view); + GX_SetViewport(0, 0, vmode->fbWidth, vmode->efbHeight, 0, 1); + } + + GX_InvVtxCache(); + GX_InvalidateTexAll(); + GX_SetTevOp(GX_TEVSTAGE0, GX_DECAL); + GX_SetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0); + + for (h = 0; h < vheight; h += 4) { + for (w = 0; w < (vwidth >> 2); w++) { + *dst++ = *src1++; + *dst++ = *src2++; + *dst++ = *src3++; + *dst++ = *src4++; + } + + src1 += rowpitch; + src2 += rowpitch; + src3 += rowpitch; + src4 += rowpitch; + } + + DCFlushRange(texturemem, texturesize); + + GX_SetNumChans(1); + GX_LoadTexObj(&texobj, GX_TEXMAP0); + + draw_square(view); + + GX_DrawDone(); + + GX_SetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); + GX_SetColorUpdate(GX_TRUE); + GX_CopyDisp(xfb[whichfb], GX_TRUE); + GX_Flush(); + + VIDEO_SetNextFramebuffer(xfb[whichfb]); + VIDEO_Flush(); +} + +#ifdef __cplusplus +} +#endif + diff --git a/backends/platform/wii/gx_supp.h b/backends/platform/wii/gx_supp.h new file mode 100644 index 0000000000..9393e93a26 --- /dev/null +++ b/backends/platform/wii/gx_supp.h @@ -0,0 +1,39 @@ +/**************************************************************************** +* Generic GX Scaler +* softdev 2007 +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License along +* with this program; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +* +* NGC GX Video Functions +* +* These are pretty standard functions to setup and use GX scaling. +****************************************************************************/ +#ifndef _WII_GX_SUPP_H_ +#define _WII_GX_SUPP_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +void GX_InitVideo(); + +void GX_Start(u16 width, u16 height, s16 haspect, s16 vaspect); +void GX_Render(u16 width, u16 height, u8 *buffer, u16 pitch); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/backends/platform/wii/main.cpp b/backends/platform/wii/main.cpp new file mode 100644 index 0000000000..7529df6de3 --- /dev/null +++ b/backends/platform/wii/main.cpp @@ -0,0 +1,88 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include +#include +#include +#include + +#include "osystem.h" + +#ifdef DEBUG_WII +#include +#include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +int main(int argc, char *argv[]) { + s32 res; + + VIDEO_Init(); + PAD_Init(); + AUDIO_Init(NULL); + +#ifdef DEBUG_WII + gecko_console_init(0); + //DEBUG_Init(GDBSTUB_DEVICE_USB, 1); +#endif + + printf("startup\n"); + + if (!fatInitDefault()) { + printf("fatInitDefault failed\n"); + } else { + // set the default path if libfat couldnt set it + // this allows loading over tcp/usbgecko + char buf[MAXPATHLEN]; + + getcwd(buf, MAXPATHLEN); + if (!strcmp(buf, "fat:/")) + chdir("/apps/scummvm"); + + //fatEnableReadAhead(PI_DEFAULT, 32, 128); + } + + g_system = new OSystem_Wii(); + assert(g_system); + + res = scummvm_main(argc, argv); + g_system->quit(); + + printf("shutdown\n"); + + if (!fatUnmount(PI_DEFAULT)) { + printf("fatUnmount failed\n"); + fatUnsafeUnmount(PI_DEFAULT); + } + + printf("reloading\n"); + + return res; +} + +#ifdef __cplusplus +} +#endif + diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp new file mode 100644 index 0000000000..97bee24d0f --- /dev/null +++ b/backends/platform/wii/osystem.cpp @@ -0,0 +1,188 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "osystem.h" +#include "backends/fs/wii/wii-fs-factory.h" + +#include + +#include +#include + +OSystem_Wii::OSystem_Wii() : + _startup_time(0), + _alarm(-1), + + _palette(NULL), + _cursorPalette(NULL), + _cursorPaletteDisabled(true), + + _gameWidth(0), + _gameHeight(0), + _gamePixels(NULL), + + _overlayVisible(false), + _overlayWidth(0), + _overlayHeight(0), + _overlaySize(0), + _overlayPixels(NULL), + + _lastScreenUpdate(0), + _texture(NULL), + _currentWidth(0), + _currentHeight(0), + + _supportedGraphicsModes(NULL), + _activeGraphicsMode(-1), + + _mouseVisible(false), + _mouseX(0), + _mouseY(0), + _mouseWidth(0), + _mouseHeight(0), + _mouseHotspotX(0), + _mouseHotspotY(0), + _mouseKeyColor(0), + _mouseCursor(NULL), + + _savefile(NULL), + _mixer(NULL), + _timer(NULL) { +} + +OSystem_Wii::~OSystem_Wii() { + if (_savefile) { + delete _savefile; + _savefile = NULL; + } + + if (_mixer) { + delete _mixer; + _mixer = NULL; + } + + if (_timer) { + delete _timer; + _timer = NULL; + } +} + +void OSystem_Wii::initBackend() { + _startup_time = gettime(); + + _savefile = new DefaultSaveFileManager(); + _mixer = new Audio::Mixer(); + _timer = new DefaultTimerManager(); + + initGfx(); + initSfx(); + initEvents(); + + OSystem::initBackend(); +} + +void OSystem_Wii::quit() { + deinitEvents(); + deinitSfx(); + deinitGfx(); +} + +bool OSystem_Wii::hasFeature(Feature f) { + return f == kFeatureCursorHasPalette; +} + +void OSystem_Wii::setFeatureState(Feature f, bool enable) { +} + +bool OSystem_Wii::getFeatureState(Feature f) { + return false; +} + +uint32 OSystem_Wii::getMillis() { + return ticks_to_millisecs(diff_ticks(_startup_time, gettime())); +} + +void OSystem_Wii::delayMillis(uint msecs) { + usleep(msecs * 1000); +} + +OSystem::MutexRef OSystem_Wii::createMutex() { + mutex_t *mutex = (mutex_t *) malloc(sizeof(mutex_t)); + s32 res = LWP_MutexInit(mutex, false); + + if (res) { + printf("ERROR creating mutex\n"); + delete mutex; + return NULL; + } + + return (MutexRef) mutex; +} + +void OSystem_Wii::lockMutex(MutexRef mutex) { + s32 res = LWP_MutexLock(*(mutex_t *) mutex); + + if (res) + printf("ERROR locking mutex %p (%d)\n", mutex, res); +} + +void OSystem_Wii::unlockMutex(MutexRef mutex) { + s32 res = LWP_MutexUnlock(*(mutex_t *) mutex); + + if (res) + printf("ERROR unlocking mutex %p (%d)\n", mutex, res); +} + +void OSystem_Wii::deleteMutex(MutexRef mutex) { + s32 res = LWP_MutexDestroy(*(mutex_t *) mutex); + + if (res) + printf("ERROR destroying mutex %p (%d)\n", mutex, res); +} + +void OSystem_Wii::setWindowCaption(const char *caption) { + printf("window caption: %s\n", caption); +} + +Common::SaveFileManager *OSystem_Wii::getSavefileManager() { + assert(_savefile); + return _savefile; +} + +Audio::Mixer *OSystem_Wii::getMixer() { + assert(_mixer); + return _mixer; +} + +Common::TimerManager *OSystem_Wii::getTimerManager() { + assert(_timer); + return _timer; +} + +FilesystemFactory *OSystem_Wii::getFilesystemFactory() { + return &WiiFilesystemFactory::instance(); +} + +void OSystem_Wii::getTimeAndDate(struct tm &t) const { + time_t curTime = time(0); + t = *localtime(&curTime); +} + diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h new file mode 100644 index 0000000000..f65310bada --- /dev/null +++ b/backends/platform/wii/osystem.h @@ -0,0 +1,163 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef _WII_OSYSTEM_H_ +#define _WII_OSYSTEM_H_ + +#include "common/system.h" +#include "base/main.h" + +#include "common/rect.h" +#include "common/events.h" + +#include "backends/saves/default/default-saves.h" +#include "backends/timer/default/default-timer.h" +#include "graphics/surface.h" +#include "sound/mixer.h" + +#include +#include +#include + +class OSystem_Wii : public OSystem { +private: + s64 _startup_time; + syswd_t _alarm; + + u16 *_palette; + u16 *_cursorPalette; + bool _cursorPaletteDisabled; + + u16 _gameWidth, _gameHeight; + u8 *_gamePixels; + Graphics::Surface _surface; + + bool _overlayVisible; + u16 _overlayWidth, _overlayHeight; + u32 _overlaySize; + OverlayColor *_overlayPixels; + + u32 _lastScreenUpdate; + u16 *_texture; + u16 _currentWidth, _currentHeight; + + OSystem::GraphicsMode *_supportedGraphicsModes; + s32 _activeGraphicsMode; + + bool _mouseVisible; + s32 _mouseX, _mouseY; + u32 _mouseWidth, _mouseHeight; + s32 _mouseHotspotX, _mouseHotspotY; + u8 _mouseKeyColor; + u8 *_mouseCursor; + + u32 _lastPadCheck; + + void initGfx(); + void deinitGfx(); + + void initSfx(); + void deinitSfx(); + + void initEvents(); + void deinitEvents(); + void updateEventScreenResolution(); + +protected: + Common::SaveFileManager *_savefile; + Audio::Mixer *_mixer; + DefaultTimerManager *_timer; + +public: + OSystem_Wii(); + virtual ~OSystem_Wii(); + + virtual void initBackend(); + + virtual bool hasFeature(Feature f); + virtual void setFeatureState(Feature f, bool enable); + virtual bool getFeatureState(Feature f); + virtual const GraphicsMode *getSupportedGraphicsModes() const; + virtual int getDefaultGraphicsMode() const; + bool setGraphicsMode(const char *name); + virtual bool setGraphicsMode(int mode); + virtual int getGraphicsMode() const; + virtual void initSize(uint width, uint height); + virtual int16 getWidth(); + virtual int16 getHeight(); + virtual void setPalette(const byte *colors, uint start, uint num); + virtual void grabPalette(byte *colors, uint start, uint num); + virtual void setCursorPalette(const byte *colors, uint start, uint num); + virtual void disableCursorPalette(bool disable); + virtual void copyRectToScreen(const byte *buf, int pitch, int x, int y, + int w, int h); + virtual void updateScreen(); + virtual Graphics::Surface *lockScreen(); + virtual void unlockScreen(); + virtual void setShakePos(int shakeOffset); + + virtual void showOverlay(); + virtual void hideOverlay(); + virtual void clearOverlay(); + virtual void grabOverlay(OverlayColor *buf, int pitch); + virtual void copyRectToOverlay(const OverlayColor *buf, int pitch, + int x, int y, int w, int h); + virtual int16 getOverlayWidth(); + virtual int16 getOverlayHeight(); + + virtual OverlayColor RGBToColor(uint8 r, uint8 g, uint8 b); + virtual void colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b); + virtual OverlayColor ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b); + virtual void colorToARGB(OverlayColor color, uint8 &a, uint8 &r, + uint8 &g, uint8 &b); + + virtual bool showMouse(bool visible); + + virtual void warpMouse(int x, int y); + virtual void setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, + int hotspotY, byte keycolor = 255, + int cursorTargetScale = 1); + + virtual bool pollEvent(Common::Event &event); + virtual uint32 getMillis(); + virtual void delayMillis(uint msecs); + + virtual MutexRef createMutex(); + virtual void lockMutex(MutexRef mutex); + virtual void unlockMutex(MutexRef mutex); + virtual void deleteMutex(MutexRef mutex); + + typedef void (*SoundProc)(void *param, byte *buf, int len); + virtual int getOutputSampleRate() const; + + virtual void quit(); + + virtual void setWindowCaption(const char *caption); + + virtual Common::SaveFileManager *getSavefileManager(); + virtual Audio::Mixer *getMixer(); + virtual Common::TimerManager *getTimerManager(); + FilesystemFactory *getFilesystemFactory(); + void getTimeAndDate(struct tm &t) const; +}; + +#endif + diff --git a/backends/platform/wii/osystem_events.cpp b/backends/platform/wii/osystem_events.cpp new file mode 100644 index 0000000000..09dfb5e96b --- /dev/null +++ b/backends/platform/wii/osystem_events.cpp @@ -0,0 +1,262 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +#ifndef GAMECUBE +#include +#endif + +#include + +#include "osystem.h" + +#define TIMER_THREAD_STACKSIZE (1024 * 32) +#define TIMER_THREAD_PRIO 64 + +#define PAD_CHECK_TIME 40 + +#ifndef GAMECUBE +#define PADS_A (PAD_BUTTON_A | (WPAD_BUTTON_A << 16)) +#define PADS_B (PAD_BUTTON_B | (WPAD_BUTTON_B << 16)) +#define PADS_X (PAD_BUTTON_X | (WPAD_BUTTON_MINUS << 16)) +#define PADS_Y (PAD_BUTTON_Y | (WPAD_BUTTON_PLUS << 16)) +#define PADS_Z (PAD_TRIGGER_Z | (WPAD_BUTTON_2 << 16)) +#define PADS_START (PAD_BUTTON_START | (WPAD_BUTTON_HOME << 16)) +#define PADS_UP (PAD_BUTTON_UP | (WPAD_BUTTON_UP << 16)) +#define PADS_DOWN (PAD_BUTTON_DOWN | (WPAD_BUTTON_DOWN << 16)) +#define PADS_LEFT (PAD_BUTTON_LEFT | (WPAD_BUTTON_LEFT << 16)) +#define PADS_RIGHT (PAD_BUTTON_RIGHT | (WPAD_BUTTON_RIGHT << 16)) +#else +#define PADS_A PAD_BUTTON_A +#define PADS_B PAD_BUTTON_B +#define PADS_X PAD_BUTTON_X +#define PADS_Y PAD_BUTTON_Y +#define PADS_Z PAD_TRIGGER_Z +#define PADS_START PAD_BUTTON_START +#define PADS_UP PAD_BUTTON_UP +#define PADS_DOWN PAD_BUTTON_DOWN +#define PADS_LEFT PAD_BUTTON_LEFT +#define PADS_RIGHT PAD_BUTTON_RIGHT +#endif + +static lwpq_t timer_queue; +static lwp_t timer_thread; +static u8 *timer_stack; +static bool timer_thread_running = false; +static bool timer_thread_quit = false; + +static void * timer_thread_func(void *arg) { + while (!timer_thread_quit) { + DefaultTimerManager *tm = + (DefaultTimerManager *) g_system->getTimerManager(); + tm->handler(); + + usleep(1000 * 10); + } + + return NULL; +} + +void OSystem_Wii::initEvents() { + timer_thread_quit = false; + + timer_stack = (u8 *) memalign(32, TIMER_THREAD_STACKSIZE); + memset(timer_stack, 0, TIMER_THREAD_STACKSIZE); + + LWP_InitQueue(&timer_queue); + + s32 res = LWP_CreateThread(&timer_thread, timer_thread_func, NULL, + timer_stack, TIMER_THREAD_STACKSIZE, + TIMER_THREAD_PRIO); + + if (res) { + printf("ERROR creating timer thread: %d\n", res); + LWP_CloseQueue(timer_queue); + } + + timer_thread_running = res == 0; + +#ifndef GAMECUBE + WPAD_Init(); + WPAD_SetDataFormat(WPAD_CHAN_0, WPAD_FMT_BTNS_ACC_IR); + WPAD_SetIdleTimeout(120); +#endif +} + +void OSystem_Wii::deinitEvents() { + if (timer_thread_running) { + timer_thread_quit = true; + LWP_ThreadBroadcast(timer_queue); + + LWP_JoinThread(timer_thread, NULL); + LWP_CloseQueue(timer_queue); + + timer_thread_running = false; + } + +#ifndef GAMECUBE + WPAD_Shutdown(); +#endif +} + +void OSystem_Wii::updateEventScreenResolution() { +#ifndef GAMECUBE + WPAD_SetVRes(WPAD_CHAN_0, _currentWidth + _currentWidth / 5, + _currentHeight + _currentHeight / 5); +#endif +} + +#define KBD_EVENT(pad_button, kbd_keycode, kbd_ascii) \ + do { \ + if ((bd | bu) & pad_button) { \ + if (bd & pad_button) \ + event.type = Common::EVENT_KEYDOWN; \ + else \ + event.type = Common::EVENT_KEYUP; \ + event.kbd.keycode = kbd_keycode; \ + event.kbd.ascii = kbd_ascii; \ + return true; \ + } \ + } while (0) + +bool OSystem_Wii::pollEvent(Common::Event &event) { + u32 bd, bh, bu; + + PAD_ScanPads(); + + bd = PAD_ButtonsDown(0); + bh = PAD_ButtonsHeld(0); + bu = PAD_ButtonsUp(0); + +#ifndef GAMECUBE + WPAD_ScanPads(); + + s32 res = WPAD_Probe(0, NULL); + + if (res == WPAD_ERR_NONE) { + + bd |= WPAD_ButtonsDown(0) << 16; + bh |= WPAD_ButtonsHeld(0) << 16; + bu |= WPAD_ButtonsUp(0) << 16; + } +#endif + + if (bd || bu) { + if (bh & PADS_UP) + event.kbd.flags = Common::KBD_SHIFT; + + KBD_EVENT(PADS_Z, Common::KEYCODE_RETURN, Common::ASCII_RETURN); + KBD_EVENT(PADS_X, Common::KEYCODE_ESCAPE, Common::ASCII_ESCAPE); + KBD_EVENT(PADS_Y, Common::KEYCODE_PERIOD, '.'); + KBD_EVENT(PADS_START, Common::KEYCODE_F5, Common::ASCII_F5); + KBD_EVENT(PADS_UP, Common::KEYCODE_LSHIFT, 0); + KBD_EVENT(PADS_DOWN, Common::KEYCODE_0, '0'); + KBD_EVENT(PADS_LEFT, Common::KEYCODE_y, 'y'); + KBD_EVENT(PADS_RIGHT, Common::KEYCODE_n, 'n'); + + if ((bd | bu) & (PADS_A | PADS_B)) { + if (bd & PADS_A) + event.type = Common::EVENT_LBUTTONDOWN; + else if (bu & PADS_A) + event.type = Common::EVENT_LBUTTONUP; + else if (bd & PADS_B) + event.type = Common::EVENT_RBUTTONDOWN; + else if (bu & PADS_B) + event.type = Common::EVENT_RBUTTONUP; + + event.mouse.x = _mouseX; + event.mouse.y = _mouseY; + + return true; + } + } + + s32 mx = _mouseX; + s32 my = _mouseY; + +#ifndef GAMECUBE + if (res == WPAD_ERR_NONE) { + struct ir_t ir; + + WPAD_IR(0, &ir); + + if (ir.valid) { + mx = ir.x - _currentWidth / 10; + my = ir.y - _currentHeight / 10; + + if (mx < 0) + mx = 0; + + if (mx >= _currentWidth) + mx = _currentWidth - 1; + + if (my < 0) + my = 0; + + if (my >= _currentHeight) + my = _currentHeight - 1; + + if ((mx != _mouseX) || (my != _mouseY)) { + event.type = Common::EVENT_MOUSEMOVE; + event.mouse.x = _mouseX = mx; + event.mouse.y = _mouseY = my; + + return true; + } + } + } +#endif + + uint32 time = getMillis(); + if (time - _lastPadCheck > PAD_CHECK_TIME) { + _lastPadCheck = time; + + if (abs (PAD_StickX(0)) > 16) + mx += PAD_StickX(0) / (4 * _overlayWidth / _currentWidth); + if (abs (PAD_StickY(0)) > 16) + my -= PAD_StickY(0) / (4 * _overlayHeight / _currentHeight); + + if (mx < 0) + mx = 0; + + if (mx >= _currentWidth) + mx = _currentWidth - 1; + + if (my < 0) + my = 0; + + if (my >= _currentHeight) + my = _currentHeight - 1; + + if ((mx != _mouseX) || (my != _mouseY)) { + event.type = Common::EVENT_MOUSEMOVE; + event.mouse.x = _mouseX = mx; + event.mouse.y = _mouseY = my; + + return true; + } + } + + return false; +} + diff --git a/backends/platform/wii/osystem_gfx.cpp b/backends/platform/wii/osystem_gfx.cpp new file mode 100644 index 0000000000..1e54233c93 --- /dev/null +++ b/backends/platform/wii/osystem_gfx.cpp @@ -0,0 +1,453 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include "osystem.h" +#include "gx_supp.h" + +#define MAX_FPS 30 + +enum GraphicModeID { + GM_DEFAULT +}; + +void OSystem_Wii::initGfx() { + _surface.w = 0; + _surface.h = 0; + _surface.pitch = 0; + _surface.pixels = NULL; + _surface.bytesPerPixel = 0; + + GX_InitVideo(); + + _overlayWidth = 640; + _overlayHeight = 480; + + _overlaySize = _overlayWidth * _overlayHeight * 2; + _overlayPixels = (OverlayColor *) memalign(32, _overlaySize); + + _palette = (u16 *) memalign(32, 256 * 2); + memset(_palette, 0, 256 * 2); + + _cursorPalette = (u16 *) memalign(32, 256 * 2); + memset(_cursorPalette, 0, 256 * 2); + + _supportedGraphicsModes = new OSystem::GraphicsMode[2]; + _supportedGraphicsModes[0].name = strdup("gx"); + _supportedGraphicsModes[0].description = strdup("wii hardware scaler"); + _supportedGraphicsModes[0].id = GM_DEFAULT; + _supportedGraphicsModes[1].name = 0; + _supportedGraphicsModes[1].description = 0; + _supportedGraphicsModes[1].id = 0; + + _texture = (u16 *) memalign(32, _overlaySize); + + GX_Start(_overlayWidth, _overlayHeight, 320, 240); +} + +void OSystem_Wii::deinitGfx() { + GX_AbortFrame(); + + if (_supportedGraphicsModes) { + delete[] _supportedGraphicsModes; + _supportedGraphicsModes = NULL; + } + + if (_gamePixels) { + free(_gamePixels); + _gamePixels = NULL; + } + + if (_palette) { + free(_palette); + _palette = NULL; + } + + if (_overlayPixels) { + free(_overlayPixels); + _overlayPixels = NULL; + } + + if (_mouseCursor) { + free(_mouseCursor); + _mouseCursor = NULL; + } + + if (_cursorPalette) { + free(_cursorPalette); + _cursorPalette = NULL; + } + + if (_texture) { + free(_texture); + _texture = NULL; + } +} + +const OSystem::GraphicsMode* OSystem_Wii::getSupportedGraphicsModes() const { + return _supportedGraphicsModes; +} + +int OSystem_Wii::getDefaultGraphicsMode() const { + return GM_DEFAULT; +} + +bool OSystem_Wii::setGraphicsMode(const char *mode) { + setGraphicsMode(GM_DEFAULT); + + return true; +} + +bool OSystem_Wii::setGraphicsMode(int mode) { + return true; +} + +int OSystem_Wii::getGraphicsMode() const { + return _activeGraphicsMode; +} + +void OSystem_Wii::initSize(uint width, uint height) { + if (_gameWidth != width || _gameHeight != height) { + printf("initSize %u %u\n", width, height); + + _gameWidth = width; + _gameHeight = height; + + if(_gamePixels) + free(_gamePixels); + + _gamePixels = (u8 *) memalign(32, _gameWidth * _gameHeight); + + if (!_overlayVisible) { + _currentWidth = _gameWidth; + _currentHeight = _gameHeight; + updateEventScreenResolution(); + } + } +} + +int16 OSystem_Wii::getWidth() { + return _gameWidth; +} + +int16 OSystem_Wii::getHeight() { + return _gameHeight; +} + +void OSystem_Wii::setPalette(const byte *colors, uint start, uint num) { + const byte *p = colors; + for (uint i = 0; i < num; ++i) { + _palette[start + i] = RGBToColor(p[0], p[1], p[2]); + p += 4; + } +} + +void OSystem_Wii::grabPalette(byte *colors, uint start, uint num) { + byte *p = colors; + u8 r, g, b; + for (uint i = 0; i < num; ++i) { + colorToRGB(_palette[start + i], r, g, b); + p[0] = r; + p[1] = g; + p[2] = b; + p[3] = 0xff; + p += 4; + } +} + +void OSystem_Wii::setCursorPalette(const byte *colors, uint start, uint num) { + const byte *p = colors; + for (uint i = 0; i < num; ++i) { + _cursorPalette[start + i] = RGBToColor(p[0], p[1], p[2]); + p += 4; + } + + _cursorPaletteDisabled = false; +} + +void OSystem_Wii::disableCursorPalette(bool disable) { + _cursorPaletteDisabled = disable; +} + +void OSystem_Wii::copyRectToScreen(const byte *buf, int pitch, int x, int y, + int w, int h) { + if (x < 0) { + w += x; + buf -= x; + x = 0; + } + + if (y < 0) { + h += y; + buf -= y * pitch; + y = 0; + } + + if (w > _gameWidth - x) + w = _gameWidth - x; + + if (h > _gameHeight - y) + h = _gameHeight - y; + + if (w <= 0 || h <= 0) + return; + + byte *dst = _gamePixels + y * _gameWidth + x; + if (_gameWidth == pitch && pitch == w) { + memcpy(dst, buf, h * w); + } else { + do { + memcpy(dst, buf, w); + buf += pitch; + dst += _gameWidth; + } while (--h); + } +} + +void OSystem_Wii::updateScreen() { + static u32 x, y, h, skip; + static s16 msx, msy, mox, moy, mskip; + static u16 mpx, mpy; + static u8 *s; + static u16 *d, *p; + + u32 now = getMillis(); + if (now - _lastScreenUpdate < 1000 / MAX_FPS) + return; + + _lastScreenUpdate = now; + + h = 0; + if (_overlayVisible) { + memcpy(_texture, _overlayPixels, _overlaySize); + } else { + for (y = 0; y < _gameHeight; ++y) { + for (x = 0; x < _gameWidth; ++x) + _texture[h + x] = _palette[_gamePixels[h + x]]; + + h += _gameWidth; + } + } + + if (_mouseVisible) { + msx = _mouseX - _mouseHotspotX; + msy = _mouseY - _mouseHotspotY; + mox = 0; + moy = 0; + mpx = _mouseWidth; + mpy = _mouseHeight; + + if (msx < 0) { + mox = -msx; + mpx -= mox; + msx = 0; + } else + if (msx + mpx > _currentWidth - 1) + mpx = _currentWidth - msx - 1; + + if (msy < 0) { + moy = -msy; + mpy -= moy; + msy = 0; + } else + if (msy + mpy + 1 > _currentHeight - 1) + mpy = _currentHeight - msy - 1; + + + if (_cursorPaletteDisabled) + p = _palette; + else + p = _cursorPalette; + + skip = _currentWidth - mpx; + mskip = _mouseWidth - mpx; + + s = _mouseCursor + moy * _mouseWidth + mox; + d = _texture + (msy * _currentWidth + msx); + + for (y = 0; y < mpy; ++y) { + for (x = 0; x < mpx; ++x) { + if (*s == _mouseKeyColor) { + s++; + d++; + + continue; + } + + *d++ = p[*s]; + s++; + } + + d += skip; + s += mskip; + } + } + + GX_Render(_currentWidth, _currentHeight, (u8 *) _texture, + _currentWidth * 2); +} + +Graphics::Surface *OSystem_Wii::lockScreen() { + _surface.pixels = _gamePixels; + _surface.w = _gameWidth; + _surface.h = _gameHeight; + _surface.pitch = _gameWidth; + _surface.bytesPerPixel = 1; + + return &_surface; +} + +void OSystem_Wii::unlockScreen() { +} + +void OSystem_Wii::setShakePos(int shakeOffset) { +} + +void OSystem_Wii::showOverlay() { + _mouseX = _overlayWidth / 2; + _mouseY = _overlayHeight / 2; + _overlayVisible = true; + _currentWidth = _overlayWidth; + _currentHeight = _overlayHeight; + + updateEventScreenResolution(); +} + +void OSystem_Wii::hideOverlay() { + _mouseX = _gameWidth / 2; + _mouseY = _gameHeight / 2; + _overlayVisible = false; + _currentWidth = _gameWidth; + _currentHeight = _gameHeight; + + updateEventScreenResolution(); +} + +void OSystem_Wii::clearOverlay() { + memset(_overlayPixels, 0, _overlaySize); +} + +void OSystem_Wii::grabOverlay(OverlayColor *buf, int pitch) { + int h = _overlayHeight; + OverlayColor *src = _overlayPixels; + + do { + memcpy(buf, src, _overlayWidth * sizeof(OverlayColor)); + src += _overlayWidth; + buf += pitch; + } while (--h); +} + +void OSystem_Wii::copyRectToOverlay(const OverlayColor *buf, int pitch, int x, + int y, int w, int h) { + if (x < 0) { + w += x; + buf -= x; + x = 0; + } + + if (y < 0) { + h += y; + buf -= y * pitch; + y = 0; + } + + if (w > _overlayWidth - x) + w = _overlayWidth - x; + + if (h > _overlayHeight - y) + h = _overlayHeight - y; + + if (w <= 0 || h <= 0) + return; + + OverlayColor *dst = _overlayPixels + (y * _overlayWidth + x); + if (_overlayWidth == pitch && pitch == w) { + memcpy(dst, buf, h * w * sizeof(OverlayColor)); + } else { + do { + memcpy(dst, buf, w * sizeof(OverlayColor)); + buf += pitch; + dst += _overlayWidth; + } while (--h); + } +} + +int16 OSystem_Wii::getOverlayWidth() { + return _overlayWidth; +} + +int16 OSystem_Wii::getOverlayHeight() { + return _overlayHeight; +} + +OverlayColor OSystem_Wii::RGBToColor(uint8 r, uint8 g, uint8 b) { + return (((r >> 3) & 0x1f) << 11) | (((g >> 2) & 0x3f) << 5 ) | + ((b >> 3) & 0x1f); +} + +void OSystem_Wii::colorToRGB(OverlayColor color, uint8 &r, uint8 &g, uint8 &b) { + r = ((color >> 11) & 0x1f) << 3; + g = ((color >> 5) & 0x3f) << 2; + b = (color & 0x1f) << 3; +} + +OverlayColor OSystem_Wii::ARGBToColor(uint8 a, uint8 r, uint8 g, uint8 b) { + return RGBToColor(r, g, b); +} + +void OSystem_Wii::colorToARGB(OverlayColor color, uint8 &a, uint8 &r, uint8 &g, + uint8 &b) { + a = 0xff; + colorToRGB(color, r, g, b); +} + +bool OSystem_Wii::showMouse(bool visible) { + bool last = _mouseVisible; + _mouseVisible = visible; + + return last; +} + +void OSystem_Wii::warpMouse(int x, int y) { + _mouseX = x; + _mouseY = y; +} + +void OSystem_Wii::setMouseCursor(const byte *buf, uint w, uint h, int hotspotX, + int hotspotY, byte keycolor, + int cursorTargetScale) { + (void) cursorTargetScale; // TODO + + _mouseWidth = w; + _mouseHeight = h; + _mouseHotspotX = hotspotX; + _mouseHotspotY = hotspotY; + _mouseKeyColor = keycolor; + + if (_mouseCursor) + free(_mouseCursor); + + _mouseCursor = (u8 *) memalign(32, w * h); + memcpy(_mouseCursor, buf, w * h); +} + diff --git a/backends/platform/wii/osystem_sfx.cpp b/backends/platform/wii/osystem_sfx.cpp new file mode 100644 index 0000000000..16b2f3b055 --- /dev/null +++ b/backends/platform/wii/osystem_sfx.cpp @@ -0,0 +1,133 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include + +#include "osystem.h" + +#define SFX_THREAD_STACKSIZE (1024 * 128) +#define SFX_THREAD_PRIO 80 +#define SFX_THREAD_FRAG_SIZE 4096 + +static lwpq_t sfx_queue; +static lwp_t sfx_thread; +static u8 *sfx_stack; +static bool sfx_thread_running = false; +static bool sfx_thread_quit = false; + +static u8 sb = 0; +static u8 *sound_buffer[2]; + +static OSystem_Wii::SoundProc sound_proc = NULL; +static void *proc_param = NULL; + +static void audio_switch_buffers() { + AUDIO_StopDMA(); + AUDIO_InitDMA((u32) sound_buffer[sb], SFX_THREAD_FRAG_SIZE); + AUDIO_StartDMA(); + + LWP_ThreadSignal(sfx_queue); +} + +static void * sfx_thread_func(void *arg) { + u8 next_sb; + + while (true) { + LWP_ThreadSleep(sfx_queue); + + if (sfx_thread_quit) + break; + + next_sb = sb ^ 1; + sound_proc(proc_param, sound_buffer[next_sb], SFX_THREAD_FRAG_SIZE); + DCFlushRange(sound_buffer[next_sb], SFX_THREAD_FRAG_SIZE); + + sb = next_sb; + } + + return NULL; +} + +void OSystem_Wii::initSfx() { + sfx_thread_running = false; + sfx_thread_quit = false; + + sfx_stack = (u8 *) memalign(32, SFX_THREAD_STACKSIZE); + memset(sfx_stack, 0, SFX_THREAD_STACKSIZE); + + LWP_InitQueue(&sfx_queue); + + s32 res = LWP_CreateThread(&sfx_thread, sfx_thread_func, NULL, sfx_stack, + SFX_THREAD_STACKSIZE, SFX_THREAD_PRIO); + + if (res) { + printf("ERROR creating sfx thread: %d\n", res); + LWP_CloseQueue(sfx_queue); + return; + } + + sfx_thread_running = true; + + sound_buffer[0] = (u8 *) memalign(32, SFX_THREAD_FRAG_SIZE); + sound_buffer[1] = (u8 *) memalign(32, SFX_THREAD_FRAG_SIZE); + + memset(sound_buffer[0], 0, SFX_THREAD_FRAG_SIZE); + memset(sound_buffer[1], 0, SFX_THREAD_FRAG_SIZE); + + DCFlushRange(sound_buffer[0], SFX_THREAD_FRAG_SIZE); + DCFlushRange(sound_buffer[1], SFX_THREAD_FRAG_SIZE); + + sound_proc = Audio::Mixer::mixCallback; + proc_param = _mixer; + + _mixer->setReady(true); + + AUDIO_SetDSPSampleRate(AI_SAMPLERATE_48KHZ); + AUDIO_RegisterDMACallback(audio_switch_buffers); + + audio_switch_buffers(); +} + +void OSystem_Wii::deinitSfx() { + if (_mixer) + _mixer->setReady(false); + + AUDIO_StopDMA(); + AUDIO_RegisterDMACallback(NULL); + + if (sfx_thread_running) { + sfx_thread_quit = true; + LWP_ThreadBroadcast(sfx_queue); + + LWP_JoinThread(sfx_thread, NULL); + LWP_CloseQueue(sfx_queue); + + sfx_thread_running = false; + + free(sound_buffer[0]); + free(sound_buffer[1]); + } +} + +int OSystem_Wii::getOutputSampleRate() const { + return 48000; +} + diff --git a/common/scummsys.h b/common/scummsys.h index 4299de7243..939f34a5c3 100644 --- a/common/scummsys.h +++ b/common/scummsys.h @@ -369,6 +369,14 @@ #define STRINGBUFLEN 256 #define printf(fmt, ...) consolePrintf(fmt, ##__VA_ARGS__) +#elif defined(__WII__) + + #define scumm_stricmp strcasecmp + #define scumm_strnicmp strncasecmp + + #define SCUMM_BIG_ENDIAN + #define SCUMM_NEED_ALIGNMENT + #else #error No system type defined diff --git a/common/system.cpp b/common/system.cpp index f133f3c4e3..015f246b7a 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -137,7 +137,7 @@ void OSystem::clearScreen() { #endif FilesystemFactory *OSystem::getFilesystemFactory() { - #if defined(__amigaos4__) || defined(__DC__) || defined(__SYMBIAN32__) || defined(UNIX) || defined(WIN32) || defined(__PSP__) || defined(__DS__) + #if defined(__amigaos4__) || defined(__DC__) || defined(__SYMBIAN32__) || defined(UNIX) || defined(WIN32) || defined(__WII__) || defined(__PSP__) || defined(__DS__) // These ports already implement this function, so it should never be called. return 0; #elif defined(PALMOS_MODE) diff --git a/dists/wii/READMII b/dists/wii/READMII new file mode 100644 index 0000000000..4f157dffe7 --- /dev/null +++ b/dists/wii/READMII @@ -0,0 +1,64 @@ +Wii port of ScummVM README +-------------------------- + +features not compiled in: +- the AGI game engine + +REQUIREMENTS + + - sd card + - wiimote or gamecube controller in port 1 + +INSTALL + + - copy the "apps" folder to the root of your sd card + - copy your demos and/or games onto the same sd card + each game goes into its own subdirectory, do not place those under + "/apps/scummvm", and do not set the "theme" or "extra" path to that folder + freeware versions: http://scummvm.org/downloads.php#extras + demos: http://scummvm.org/demos.php + +RUN + + either use the homebrew channel, available at + + http://hbc.hackmii.com/ + + or load "boot.dol" with your favorite loader + +CONTROLS + + wiimote + + analog stick: mouse movement + a: left mouse button + b: right mouse button + minus: escape + plus: "." (skip current line of text) + 2: enter + home: f5 (scummvm menu) + dpad up: shift (mass add for the gui) + dpad down: "0" + dpad left: "y" + dpad right: "n" + + gamecube pad + + analog stick: mouse movement + a: left mouse button + b: right mouse button + x: escape + y: "." (skip current line of text) + z: enter + start: f5 (scummvm menu) + dpad up: shift (mass add for the gui) + dpad down: "0" + dpad left: "y" + dpad right: "n" + +THANKS + + shagkur and WinterMute, for devkitppc/libogc and the coorperation + svpe, for fixing the libfat feof/thread bugs on the last minute + para, for making wiiuse available in libogc + diff --git a/dists/wii/meta.xml b/dists/wii/meta.xml new file mode 100644 index 0000000000..fb53474052 --- /dev/null +++ b/dists/wii/meta.xml @@ -0,0 +1,12 @@ + + + ScummVM + The ScummVM Team + rev FIXME + FIXME + Point & Click Adventures + ScummVM is a program which allows you to run certain classic graphical point-and-click adventure games, provided you already have their data files. The clever part about this: ScummVM just replaces the executables shipped with the games, allowing you to play them on systems for which they were never designed! + +Some of the adventures ScummVM supports include Adventure Soft's Simon the Sorcerer 1 and 2; Revolution's Beneath A Steel Sky, Broken Sword 1 and Broken Sword 2; Flight of the Amazon Queen; Wyrmkeep's Inherit the Earth; Coktel Vision's Gobliiins; Westwood Studios' The Legend of Kyrandia and games based on LucasArts' SCUMM (Script Creation Utility for Maniac Mansion) system such as Monkey Island, Day of the Tentacle, Sam and Max and more. + + -- cgit v1.2.3 From 7f1353f39e569bc428ac6ddc9058fedac042c340 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Wed, 4 Jun 2008 20:33:45 +0000 Subject: Add dhewg to the team svn-id: r32548 --- AUTHORS | 13 ++++++++----- gui/credits.h | 3 +++ tools/credits.pl | 4 ++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/AUTHORS b/AUTHORS index 7ebe8f1af7..2491f481a2 100644 --- a/AUTHORS +++ b/AUTHORS @@ -81,14 +81,14 @@ ScummVM Team Paul Gilbert M4: - Torbjorn Andersson + Torbjorn Andersson Paul Gilbert - Benjamin Haisch - Filippos Karapetis + Benjamin Haisch + Filippos Karapetis MADE: - Benjamin Haisch - + Benjamin Haisch + Parallaction: peres @@ -139,6 +139,9 @@ ScummVM Team Jurgen Braam Lars Persson + Wii: + Andre Heider + Other subsystems ---------------- Infrastructure: diff --git a/gui/credits.h b/gui/credits.h index a84cc53d98..41544a2248 100644 --- a/gui/credits.h +++ b/gui/credits.h @@ -144,6 +144,9 @@ static const char *credits[] = { "\\C\\c0""Jurgen Braam", "\\C\\c0""Lars Persson", "\\C\\c0""", +"\\C\\c1""Wii", +"\\C\\c0""Andre Heider", +"\\C\\c0""", "\\C\\c0""", "\\C\\c1""Other subsystems", "\\C\\c1""Infrastructure", diff --git a/tools/credits.pl b/tools/credits.pl index f176a6d957..fa806db7de 100755 --- a/tools/credits.pl +++ b/tools/credits.pl @@ -626,6 +626,10 @@ begin_credits("Credits"); add_person("Lars Persson", "AnotherGuest", ""); end_section(); + begin_section("Wii"); + add_person("Andre Heider", "dhewg", ""); + end_section(); + end_section(); begin_section("Other subsystems"); -- cgit v1.2.3 From 16209c1306bd9a9e5962339bfd5dd05f0eb76cee Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Wed, 4 Jun 2008 21:44:12 +0000 Subject: Add missing runtime data svn-id: r32550 --- dists/wii/icon.png | Bin 0 -> 12233 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 dists/wii/icon.png diff --git a/dists/wii/icon.png b/dists/wii/icon.png new file mode 100644 index 0000000000..dc873e66f2 Binary files /dev/null and b/dists/wii/icon.png differ -- cgit v1.2.3 From 5acc34fb77f2156e7cda47c5b47c156add3668cb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 5 Jun 2008 05:59:56 +0000 Subject: Slighlty modified patch #1984858: "DRASCULA: more english grammar/spelling fixes" svn-id: r32551 --- engines/drascula/staticdata.h | 84 +++++++++++++++++++++---------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index bbfcfbfdb6..f9bc270d93 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -521,7 +521,7 @@ const char *_text[][501] = { { // 0 "", - "ITS THE SECOND BIGGEST DOOR I'VE SEEN IN MY LIFE", + "THAT'S THE SECOND BIGGEST DOOR I'VE SEEN IN MY LIFE", "NOT REALLY", "THE CHURCH IS ALL BOARDED UP, IT MUST HAVE BEEN ABANDONED SEVERAL YEARS AGO", "I HAVEN'T OPENED IT", @@ -529,7 +529,7 @@ const char *_text[][501] = { "WHAT SHOULD I DO, SHOULD I PULL IT OFF?", "HI THERE DOOR, I'M GOING TO MAKE YOU A DOOR-FRAME", "IT'S TOO MUCH FOR ME", - "THERE'S A WINDOW STOPPING THE GAME FROM WORKING PROPERLY", + "THE WINDOW IS BOARDED UP", "I CAN'T", // 10 "YES, THAT'S DONE", @@ -559,7 +559,7 @@ const char *_text[][501] = { "ITS LOCKED", "I'VE GOT ONE", "YOO HOO, UNCLE EVARISTO!", - "THERE'S NO REPLY", + "THERE'S NO POWER", "IT'S NOT WELL PARKED", // 35 "IT'S A DOOR", @@ -649,7 +649,7 @@ const char *_text[][501] = { "HOW IS THE FAMILY?", "THAT IS JUST LIKE YOU!", "BUT HOW DO I GET THAT?", - "MY RELIGION DOES NOT ALLOW ME", + "MY RELIGION DOES NOT ALLOW ME TO", "IT'D BE BETTER NOT", // 110 "YEAH, SURE MAN!", @@ -665,8 +665,8 @@ const char *_text[][501] = { "NO, IT MUST BE KEPT SOMEWHERE AWAY FROM THE MUTANT ACTION OF THE ATMOSPHERE", // 120 "HE IS VERY STIFF, JUST LIKE MY BOSS", - "A VERY SHARP STICK", - "YOU FAITHFUL SHARP-PAINTED STICK, NOBLE TRANSILVANIAN OAK TREE", + "A VERY SHARP STAKE", + "YOU FAITHFUL SHARP-PAINTED STAKE, NOBLE TRANSILVANIAN OAK TREE", "DAMN, I HAVE TO CUT MY NAILS!", "B.J. IS IN THERE... SHE IS A REALLY HOT CHICK!", // 125 @@ -680,7 +680,7 @@ const char *_text[][501] = { "FORGET IT. I AM NOT GOING TO TELL HIM ANYTHING IN CASE HE GETS MAD", "IT SEEMS QUITE RATIONAL", "IT IS A PICTURE OF PLATO WRITING HIS LOST DIALOGUE", - "I AM NOT ONE OF THOSE WHO TALKS TO POSTERS", + "I AM NOT ONE OF THOSE PEOPLE WHO TALKS TO POSTERS", // 135 "THAT'S A VERY CUTE DESK", "IT IS A VAMPIRES HUNTER'S DIPLOMA OFFICIALLY APPROVED BY OXFORD UNIVERSITY", @@ -688,7 +688,7 @@ const char *_text[][501] = { "IT SEEMS LIKE THESE SCREWS ARE NOT TIGHTENED PROPERLY", "DON'T LOOK NOW, BUT I THINK THAT A HIDDEN CAMERA IS FOCUSING ON ME", // 140 - "THAT'S A VERY MODERN STICK DETECTOR", + "THAT'S A VERY MODERN STAKE DETECTOR", "NO. THE LABORATORY IS ON THE SECOND FLOOR", "A NICE BEDSIDE TABLE", "IT'S A LOT OF MONEY THAT CAN'T BE MISSING IN ANY VALUABLE ADVENTURE", @@ -696,24 +696,24 @@ const char *_text[][501] = { // 145 "THOSE ARE STRANGE LEAVES. THEY MUST HAVE BROUGHT THEM FROM SOUTH AMERICA OR AROUND THERE", "I DON'T THINK THEY WOULD ANSWER ME", - "THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY SHOW THE BEAUTY WITHIN IT", + "THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY SHOW THE FULL EXTENT OF ITS BEAUTY", "I ONLY PRAY BEFORE I GO TO BED", - "HEY, THIS PIKE SEEMS A LITTLE BIT LOOSE!", + "HEY, THIS SPIKE SEEMS A LITTLE BIT LOOSE!", // 150 "I HOPE YOU WON'T COMPLAIN ABOUT NOT GETTING ANY CLUES FROM ME", - "IT'S A QUITE CONVENTIONAL PIKE", + "IT'S A QUITE CONVENTIONAL SPIKE", "THEY ARE CUTE, THOUGH THEY ARE COVERED WITH A LITTLE BIT OF SHIT", "NO, THEY WON'T HEAR ME. HA,HA,HA THIS IS GREAT!", "\"SLEEPING BEAUTY\" FROM TCHAIKOVSKY, OR CHOIFRUSKY, OR WHATEVER IT IS", // 155 "VERY TEMPTING", - "NO, I DO NOT PUT USED BUBBLE GUMS IN MY MOUTH", + "NO, I DO NOT PUT USED BUBBLE GUM IN MY MOUTH", "THAT'S A VERY NICE SICKLE. I WONDER WHERE THE HAMMER IS", "TOBACCO MANUFACTURERS WARN ABOUT HEALTH BEING SERIOUSLY DAMAGED BY SANITARY AUTHORITIES", "AN ABSOLUTELY NORMAL CANDLE, INCLUDING WAX AND EVERYTHING", // 160 - "THESE TWO SHINY COINS REALLY DO GLITTER!", - "THIS SHINY COIN REALLY DOES GLITTER!", + "THESE TWO SHINY COINS REALLY GLITTER!", + "THIS SHINY COIN REALLY GLITTERS!", "WITH THIS I WILL BE IMMUNE AGAINST VAMPIRE BITES", "NO, IT'S IS NOT THE RIGHT MOMENT YET", "THERE IS A ONE THOUSAND BILL AND A COUPLE OF COINS", @@ -738,7 +738,7 @@ const char *_text[][501] = { // 180 "A VERY NICE DOOR", "IT'S CLOSED", - "A COMPLETELY LOCKED BARREL", + "A COMPLETELY SEALED BARREL", "", "AREN'T THESE BUGS REALLY CUTE?", // 185 @@ -746,19 +746,19 @@ const char *_text[][501] = { "THERE IS NO ANSWER", "THE MOON IS A SATELLITE THAT TURNS AROUND THE EARTH WITH A REVOLUTION PERIOD OF 28 DAYS", "HI, LOONY MOON", - "IT'S TOTALLY BLOCKED UP WITH PLANKS", + "IT'S TOTALLY BOARDED UP WITH PLANKS", // 190 "IT'S IMPOSSIBLE. NOT EVEN THAT TOUGH GUY FROM TV COULD OPEN THIS", "HEY! THE SHADOW OF THAT CYPRESS LOOKS PROLONGED TO ME!", "YOU, BARTENDER...!!", "I WOULD LIKE TO HAVE A ROOM PLEASE", - "DO YOU KNOW WHERE I CAN FIND THE SO CALLED DRASCULA?", + "DO YOU KNOW WHERE I CAN FIND THE MAN CALLED DRASCULA?", // 195 "YES, SO WHAT?", "SO?", "IS...THAT RIGHT?", - "GOOD QUESTION. NOW, LET ME TELL YOU MY STORY. LOOK...", - "IT'S JUST FIVE MINUTES", + "GOOD QUESTION. GET ME A DRINK AND LET ME TELL YOU MY STORY. LOOK...", + "IT WILL TAKE JUST FIVE MINUTES", // 200 "I'M JOHN HACKER AND I REPRESENT A BRITISH PROPERTY COMPANY", "AS FAR AS I KNOW, COUNT DRASCULA WANTS TO BUY SOME PIECES OF LAND IN GIBRALTAR AND MY COMPANY SENT ME HERE TO NEGOTIATE THE SALE", @@ -776,9 +776,9 @@ const char *_text[][501] = { "AND HOW IS THE FAMILY?", "THIS IS QUITE GROOVY, HUH?", "I'D BETTER NOT SAY ANYTHING", - "THERE IS NO PLACE LIKE HOME. THERE IS NO...WHAT?, BUT YOU ARE NOT AUNT EMMA. AS A MATTER OF FACT, I DON'T HAVE ANY AUNT EMMA!", + "THERE IS NO PLACE LIKE HOME. THERE IS NO...WHAT?, BUT YOU ARE NOT AUNTIE EMMA. AS A MATTER OF FACT, I DON'T HAVE AN AUNTIE EMMA!", // 215 - "YES, SO DOES MINE. YOU CAN CALL ME ANYTHING YOU WANT, BUT IF YOU CALL ME JHONNY, I'LL COME TO YOU LIKE A DOG", + "YES, SO DOES MINE. YOU CAN CALL ME ANYTHING YOU WANT, BUT IF YOU CALL ME JOHNNY, I'LL COME TO YOU LIKE A DOG", "AREN'T I JUST A FUNNY GUY, HUH?. BY THE WAY, WHERE AM I?", "YES", "SHOOT...!", @@ -796,13 +796,13 @@ const char *_text[][501] = { "AHHH A WEREWOLF!! DIE YOU DAMNED EVIL!", "YES, WELL...", // 230 - "YES, WELL...I THINK I'LL JUST GO ON MY WAY. EXCUSE ME", + "YES, WELL... I THINK I'LL JUST GO ON MY WAY. EXCUSE ME", "WHAT?", "TO TELL YOU THE TRUTH...ON SECOND THOUGHTS...I DON'T REALLY THINK SO", "AND SO TELL ME YOU ERUDITE PHILOSOPHER, IS THERE ANY RELATIONSHIP CAUSE-AND-EFFECT BETWEEN SILLY AND BILLY?", "OK, OK, FORGET IT. I DON'T EVEN KNOW WHY I SAID ANYTHING ABOUT IT", // 235 - "WHAT ARE YOU DOING PHILOSOPHIZING INSTEAD OF EATING SOME PEOPLE", + "WHY ARE YOU PHILOSOPHIZING INSTEAD OF EATING PEOPLE?", "HOW COME?", "HEY, COULD YOU SAY ALL THAT STUFF ABOUT PRE-EVOLUTIONARY RELATIONSHIPS AGAIN?", "YES, MAN. ALL THAT STUFF YOU TOLD ME ABOUT BEFORE. I DIDN'T UNDERSTAND IT, YOU KNOW", @@ -812,13 +812,13 @@ const char *_text[][501] = { "YES, WHAT'S UP?", "WELL, NOW THAT YOU MENTION IT, I'LL TELL YOU THAT...", "", - "WELL, THANKS FOR CALLING. BY THE WAY, THIS IS NOT THE CASE, OF COURSE, BUT WHAT COULD HAPPEN IF A VAMPIRE GOT THE RECIPE BY ANY CHANCE?", + "BY THE WAY, THIS IS NOT THE CASE, OF COURSE, BUT WHAT COULD HAPPEN IF A VAMPIRE GOT THE RECIPE BY ANY CHANCE?", // 245 - "WELL ANYWAY. LISTEN, DOESN'T THIS LOOK TO YOU LIKE A LOT OF CRAP TO END UP SOON WITH THE GAME?. WELL, MAYBE NOT", + "WELL ANYWAY. LISTEN, DOESN'T THIS LOOK TO YOU LIKE A LOT OF CRAP TO END THE GAME WITH?. WELL, MAYBE NOT", "IT'S EMPTY!", - "WHY DID YOU TAKE MY ONLY LOVE, B.J., AWAY FROM ME?. LIFE HAS NO MEANING FOR WITHOUT HER", + "WHY DID YOU TAKE MY ONLY LOVE, B.J., AWAY FROM ME?. LIFE HAS NO MEANING FOR ME WITHOUT HER", "HER BRAIN?\?!!", - "TO TELL YOU THE TRUTH, I THINK I HAD JUST ENOUGH WITH YOUR OF YOUR LITTLE MONSTER", + "TO TELL YOU THE TRUTH, I THINK I HAVE HAD JUST ABOUT ENOUGH OF YOUR LITTLE MONSTER", // 250 "OH PLEASE, HOLY VIRGIN, DON'T LET ANYTHING WORSE HAPPEN TO ME!!", "YOU ARE NOT GOING TO GET YOUR WAY. I'M SURE SUPERMAN WILL COME AND RESCUE ME!", @@ -827,7 +827,7 @@ const char *_text[][501] = { "HA. HA, I'M NOW IMMUNIZED AGAINST YOU DAMNED EVIL!. THIS CIGARETTE IS AN ANTI-VAMPIRE BREW THAT VON BRAUN GAVE TO ME", // 255 "YES SURE, BUT YOU'LL NEVER GET ME TO GIVE YOU THE RECIPE", - "APART FROM CREATING TORTURE, I CAN ALSO STAND IT.", + "APART FROM CREATING TORTURE, I CAN ALSO WITHSTAND IT.", "OH, NO PLEASE! I'LL TALK, BUT PLEASE, DON'T DO THAT TO ME!", "ALL RIGHT THEN. I TOLD YOU WHAT YOU WANTED TO KNOW. NOW SET B.J. AND ME FREE THEN LEAVE US ALONE!", "WHAT ARE YOU DOING HERE B.J.?. WHERE IS DRASCULA?", @@ -1027,10 +1027,10 @@ const char *_text[][501] = { "THE MAGPIE WOULD PECK OUT MY EYES IF I TRIED!", "OH MY GOD. IT'S LOCKED...THAT'S SCARY, HUH?", "THE HINGES ARE RUSTY", - "THERE IS ONLY ONE CAN OF FLOUR IN THERE", + "THERE IS ONLY ONE BAG OF FLOUR IN THERE", "THAT TOOK AWAY THE RUST", // 425 - "I FOUND A PINE STICK", + "I FOUND A PINE STAKE", "I'LL TAKE THIS THICKER ONE", "WELL, I THINK I CAN GET RID OF THIS STUPID DISGUISE", "\"PASSAGE TO TOWERS CLOSED FOR REPAIRS. PLEASE USE THE MAIN ENTRANCE. SORRY FOR THE INCONVENIENCE\"", @@ -3582,7 +3582,7 @@ const char *_textd[][84] = { "OK, LET'S SEE IT. IGOR, BRING ME THE CD \"SCRATCHING YOUR NAILS ALL OVER THE BLACKBOARD\"", "NO WAY. THE GIRL STAYS WITH ME. YOU'RE STAYING THERE UNTIL THE PENDULUM CUTS YOU INTO THIN SLICES. HA, HA, HA", "MAN I'M I JUST BAD... COME ON IGOR, LET'S MAKE THE BREW AND CONQUER THE WORLD", - "WHAT HAPPENS NOW?", + "WHAT HAPPENED NOW?", "YES, WHAT?...OH, DAMNED, THE GAME!", // 35 "I FORGOT ABOUT THAT. GET THE GIRL AND LET'S GO AND WATCH IT. WE CAN CONQUER THE WORLD LATER", @@ -4168,7 +4168,7 @@ const char *_textbj[][29] = { "ARE YOU ALL RIGHT? HEY, COME ON, WAKE UP! CAN YOU HEAR ME? ARE YOU DEAD?", "NO, MY NAME IS BILLIE JEAN, BUT YOU CAN CALL ME B.J. IT'S SHORTER", "HA, HA...! THAT WAS A GOOD ONE!", - "WELL, JHONNY. YOU SEE, I WAS HERE JUST READY TO GO TO BED WHEN I HEARD THIS LOUD NOISE DOWN THE CORRIDOR", + "WELL, JOHNNY. YOU SEE, I WAS HERE JUST READY TO GO TO BED WHEN I HEARD THIS LOUD NOISE DOWN THE CORRIDOR", // 5 "I DIDN'T PAY ATTENTION AT FIRST, BUT AFTER ABOUT TWO HOURS OR SO I COULDN'T SLEEP AND WENT OUT FOR A WALK", "AS I OPENED THE DOOR I WAS SHOCKED TO FIND YOU THERE, LYING ON THE FLOOR. I THOUGHT YOU WERE DEAD, I SWEAR... HA, HA, SILLY BILLY", @@ -4179,7 +4179,7 @@ const char *_textbj[][29] = { "OH, NO...! IT WASN'T THE HIT, HA, HA. I JUST STEPPED ON YOUR GLASSES BY ACCIDENT", "YOU REALLY LOOK GOOD WITH THOSE GLASSES. I KNOW HE'S NOT FERNANDO LANCHA, BUT I FIND HIM ATTRACTIVE...", "YES, YES, I DO... COME ON, HOLD ME AND KISS ME TIGHT", - "OH JHONNY, HONEY, THANK GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND THEN HE'S GONE DOWNSTAIRS TO WATCH THE FOOTBALL GAME", + "OH JOHNNY, HONEY, THANK GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND THEN HE'S GONE DOWNSTAIRS TO WATCH THE FOOTBALL GAME", "YES, IT'S TRUE. PLEASE, SET ME FREE", // 15 "NO, I'M SORRY. I USED THEM ALL IN THE TOWER WHEN I WAS TRYING TO ESCAPE WHILE YOU LET ME DOWN", @@ -4188,7 +4188,7 @@ const char *_textbj[][29] = { "FIRSTLY HE BROUGHT ME FLYING OVER HERE AND THEN PUT ME IN THIS DISGUSTING ROOM WITHOUT A MIRROR OR ANYTHING", "I'M TELLING YOU! AND THE WORST PART IS THAT HE DIDN'T EVEN APOLOGIZE, NOT EVEN ONCE", // 20 - "JHONNY HONEY, WHERE ARE YOU?", + "JOHNNY HONEY, WHERE ARE YOU?", "I'M READY TO LEAVE DEAR", "WAIT, I'M GOING TO TAKE A LOOK... NO DARLING, I'M SORRY", "THERE YOU GO...", @@ -4196,7 +4196,7 @@ const char *_textbj[][29] = { // 25 "I'LL NEVER FORGET YOU BUT I'VE REALIZED THAT THIS JUST COULDN'T WORK OUT RIGHT. TO BE HONEST, I'LL TELL YOU THAT THERE IS ANOTHER MAN. HE'S TALLER, STRONGER", "AND HE HAS ALSO RESCUED ME FROM DRASCULA. HE HAS ASKED ME TO MARRY HIM, AND I HAVE ACCEPTED", - "BYE JHONNY. PLEASE DON'T TRY TO FIND SOME KIND OF EXPLANATION. YOU KNOW LOVE IS BLIND AND HAS ITS OWN WAYS", + "BYE JOHNNY. PLEASE DON'T TRY TO FIND SOME KIND OF EXPLANATION. YOU KNOW LOVE IS BLIND AND HAS ITS OWN WAYS", "I HOPE THERE WON'T BE HARD FEELINGS BETWEEN US. REMEMBER THAT I STILL LOVE YOU, BUT ONLY AS A FRIEND", }, { @@ -4738,8 +4738,8 @@ const char *_textl[][32] = { "WELL THEN", "WELL, THAT DEPENDS ON WHAT WE TAKE A RELATIONSHIP FOR. SOME AUTHORS DEFEND...", // 10 - "PUKE! HUNTING AS A WAY TO SURVIVE IS AN INCOMPATIBLE ARCHAIC THING FOR A SUPERIOR BEING LIKE ME. BESIDES, I'VE BECOME A VEGETARIAN", - "IT JUST HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO THINK AND GET TO THE ABOVE MENTIONED THOUGHT", + "YUCK! HUNTING AS A WAY TO SURVIVE IS AN INCOMPREHENSIBLE ARCHAIC THING FOR A SUPERIOR BEING LIKE ME. BESIDES, I'VE BECOME A VEGETARIAN", + "IT JUST SO HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO THINK AND GET TO THE ABOVE MENTIONED THOUGHT", "IT TOOK ME A LONG TIME TO QUIT OLD HABITS BUT AT LEAST MY IRASCIBLE SOUL BIT UP THE CONCUPISCIBLE ONE, AND EVER SINCE, I'VE NEVER EATEN MEAT AGAIN", "NOT EVEN THE PLEASURE OF SUCKING UP THE BONE, FEELING THE TASTE OF THE SKIN AND THAT SWEET TASTE OF MARROW...THAT JUST TAKES YOU TO HEAVENLY PLACES", "IT DOESN'T REALLY GET TO ME AT ALL", @@ -5069,14 +5069,14 @@ const char *_textt[][25] = { // 0 "", "WHAT HAPPENED? WHAT'S THE MATTER?", - "OK. ROOM 512. UPSTAIRS. THE KEY IS ON THE DOOR", + "OK. ROOM 512. UPSTAIRS. THE KEY IS UNDER THE DOOR", "COUNT DRASCULA!!?", - "NO, NOTHING. THAT GUY JUST HAS A BAD REPUTATION OVER HERE", + "NO, NOTHING. THAT GUY JUST HAS A BAD REPUTATION AROUND HERE", // 5 "WELL, THERE ARE ALL KINDS OF STORIES GOING AROUND ABOUT HIM, SOME SAY HE IS A VAMPIRE WHO KIDNAPS PEOPLE TO SUCK THEIR BLOOD", "HOWEVER, SOME OTHERS SAY THAT HE IS JUST AN ORGAN-DEALER AND THAT IS THE REASON WHY THERE ARE BODY PARTS ALL OVER THE PLACE", "BUT OF COURSE, THOSE ARE JUST RUMORS. HE'S PROBABLY BOTH THINGS. BY THE WAY, WHY DO YOU WANT TO MEET HIM?", - "NO, FORGET IT. I'M REALLY BUSY...", + "HERE IS YOUR DRINK, FORGET IT. I'M REALLY BUSY...", "WELL, OK. BUT JUST BECAUSE I WANT TO DO IT, NOT BECAUSE YOU TOLD ME TO", // 10 "THEY'RE WINNING", @@ -5263,9 +5263,9 @@ const char *_textvb[][63] = { // 25 "LEAVE ME ALONE NOW, I WANT TO GET SOME SLEEP", "WHENEVER YOU ARE READY TO FIGHT AGAINST THE VAMPIRES, JUST COME BACK AND I'LL HELP YOU OUT", - "OH, THAT'S EASY. JUST USING THE LIGHT OF ONE CRUCIFIX IS ENOUGH TO DESTROY HIM", + "OH, THAT'S EASY. TAKE THIS CRUCIFIX JUST USING THE LIGHT OF THIS CRUCIFIX IS ENOUGH TO DESTROY HIM", "YOU HAVE TO BE EXTRA CAREFUL WITH DRASCULA, HIS FRISISNOTIC POWERS HAVE MADE OF HIM THE MOST POWERFUL VAMPIRE", - "YOU'D BE LOST IF IT WASN'T FOR THEM...", + "YOU'D BE LOST IF IT WASN'T FOR THIS...", // 30 "...BREW!", "YEAH, YOU'RE RIGHT! I MIGHT HAVE SOME PROBLEMS WITH MY BACK IN THE FUTURE IF I KEEP ON SLEEPING THIS WAY", -- cgit v1.2.3 From fe2fcbf2d5003dbb9102a898600437da06ac64d2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 5 Jun 2008 08:25:29 +0000 Subject: - Removed the unused hay_sb variable (originally, it was meant to check if the sound is active or not) - mesa -> volumeControls - Cleanup of volumeControls() - fliplay -> playFLI, and removed openSSN() and EndSSN() - Some translations: button_izq -> leftMouseButton button_dch -> rightMouseButton animation_rayo -> animation_ray hueso -> bone vuela -> fly svn-id: r32552 --- engines/drascula/animation.cpp | 29 ++++--- engines/drascula/drascula.cpp | 178 +++++++++++++++++------------------------ engines/drascula/drascula.h | 14 ++-- engines/drascula/talk.cpp | 13 +-- 4 files changed, 97 insertions(+), 137 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index cdc2f1ea8b..ed4ccde4e4 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -58,7 +58,7 @@ void DrasculaEngine::animation_1_1() { while (term_int == 0) { playMusic(29); - fliplay("logoddm.bin", 9); + playFLI("logoddm.bin", 9); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; delay(600); @@ -72,7 +72,7 @@ void DrasculaEngine::animation_1_1() { delay(500); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - fliplay("logoalc.bin", 8); + playFLI("logoalc.bin", 8); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); @@ -97,7 +97,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - fliplay("scrollb.bin", 9); + playFLI("scrollb.bin", 9); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -373,7 +373,7 @@ void DrasculaEngine::animation_1_1() { playMusic(2); pause(5); - fliplay("intro.bin", 12); + playFLI("intro.bin", 12); term_int = 1; } clearRoom(); @@ -1419,7 +1419,7 @@ void DrasculaEngine::animation_6_3() { updateScreen(); } -void DrasculaEngine::animation_rayo() { +void DrasculaEngine::animation_ray() { loadPic("anr_1.alg", frontSurface, HALF_PAL); loadPic("anr_2.alg", extraSurface); loadPic("anr_3.alg", backSurface); @@ -1556,9 +1556,9 @@ void DrasculaEngine::animation_4_5() { void DrasculaEngine::animation_5_5(){ int h; int frame = 0; - int hueso_x[] = {1, 99, 197, 1, 99, 197, 1, 99, 197}; - int hueso_y[] = {1, 1, 1, 66, 66, 66, 131, 131, 131}; - int vuela_x[] = {1, 63, 125, 187, 249}; + int boneX[] = {1, 99, 197, 1, 99, 197, 1, 99, 197}; + int boneY[] = {1, 1, 1, 66, 66, 66, 131, 131, 131}; + int flyX[] = {1, 63, 125, 187, 249}; int pixelX = curX - 53, pixelY = curY - 9; withoutVerb(); @@ -1575,7 +1575,7 @@ void DrasculaEngine::animation_5_5(){ for (frame = 0; frame < 9; frame++) { pause(3); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyRect(hueso_x[frame], hueso_y[frame], pixelX, pixelY, 97, 64, backSurface, screenSurface); + copyRect(boneX[frame], boneY[frame], pixelX, pixelY, 97, 64, backSurface, screenSurface); updateScreen(pixelX, pixelY, pixelX,pixelY, 97,64, screenSurface); } @@ -1585,7 +1585,7 @@ void DrasculaEngine::animation_5_5(){ for (frame = 0; frame < 9; frame++) { pause(3); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - copyRect(hueso_x[frame], hueso_y[frame], pixelX, pixelY, 97, 64, frontSurface, screenSurface); + copyRect(boneX[frame], boneY[frame], pixelX, pixelY, 97, 64, frontSurface, screenSurface); updateScreen(pixelX, pixelY, pixelX,pixelY, 97, 64, screenSurface); } @@ -1607,12 +1607,12 @@ void DrasculaEngine::animation_5_5(){ pause(9); for (frame = 0; frame < 5; frame++) { pause(3); - copyBackground(vuela_x[frame], 1, 174, 79, 61, 109, backSurface, screenSurface); + copyBackground(flyX[frame], 1, 174, 79, 61, 109, backSurface, screenSurface); updateScreen(174, 79, 174, 79, 61, 109, screenSurface); } for (frame = 0; frame < 5; frame++) { pause(3); - copyBackground(vuela_x[frame], 1, 174, 79, 61, 109, extraSurface, screenSurface); + copyBackground(flyX[frame], 1, 174, 79, 61, 109, extraSurface, screenSurface); updateScreen(174, 79, 174, 79, 61, 109, screenSurface); } updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); @@ -1682,7 +1682,6 @@ void DrasculaEngine::animation_12_5() { const int rayX[] = {1, 46, 91, 136, 181, 226, 271, 181}; const int frusky_x[] = {100, 139, 178, 217, 100, 178, 217, 139, 100, 139}; const int elfrusky_x[] = {1, 68, 135, 1, 68, 135, 1, 68, 135, 68, 1, 135, 68, 135, 68}; - //const int humo_x[] = {1, 29, 57, 85, 113, 141, 169, 197, 225}; int color, component; char fade; @@ -2076,13 +2075,13 @@ void DrasculaEngine::animation_9_6() { playMusic(17); fadeToBlack(1); clearRoom(); - fliplay("qpc.bin", 1); + playFLI("qpc.bin", 1); MusicFadeout(); stopMusic(); clearRoom(); _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, v_cd * 16); playMusic(3); - fliplay("crd.bin", 1); + playFLI("crd.bin", 1); stopMusic(); } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 6d7e050a2f..b5924d6c7b 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -147,7 +147,6 @@ int DrasculaEngine::go() { allocMemory(); - hay_sb = 1; withVoices = 0; selectionMade = 0; @@ -169,7 +168,7 @@ int DrasculaEngine::go() { } else if (currentChapter == 4) { loadPic(96, frontSurface, COMPLETE_PAL); if (hay_que_load == 0) - animation_rayo(); + animation_ray(); loadPic(96, frontSurface); clearRoom(); loadPic(99, backSurface); @@ -212,8 +211,7 @@ int DrasculaEngine::go() { } void DrasculaEngine::quitGame() { - if (hay_sb == 1) - stopSound(); + stopSound(); clearRoom(); black(); MusicFadeout(); @@ -569,7 +567,7 @@ bool DrasculaEngine::escoba() { if (menuScreen == 0 && takeObject == 1) checkObjects(); - if (button_dch == 1 && menuScreen == 1) { + if (rightMouseButton == 1 && menuScreen == 1) { delay(100); if (currentChapter == 2) loadPic(menuBackground, backSurface); @@ -581,7 +579,7 @@ bool DrasculaEngine::escoba() { if (currentChapter != 3) cont_sv = 0; } - if (button_dch == 1 && menuScreen == 0) { + if (rightMouseButton == 1 && menuScreen == 0) { delay(100); characterMoved = 0; if (trackProtagonist == 2) @@ -601,18 +599,18 @@ bool DrasculaEngine::escoba() { cont_sv = 0; } - if (button_izq == 1 && menuBar == 1) { + if (leftMouseButton == 1 && menuBar == 1) { delay(100); selectVerbFromBar(); if (currentChapter != 3) cont_sv = 0; - } else if (button_izq == 1 && takeObject == 0) { + } else if (leftMouseButton == 1 && takeObject == 0) { delay(100); if (verify1()) return true; if (currentChapter != 3) cont_sv = 0; - } else if (button_izq == 1 && takeObject == 1) { + } else if (leftMouseButton == 1 && takeObject == 1) { if (verify2()) return true; if (currentChapter != 3) @@ -646,7 +644,7 @@ bool DrasculaEngine::escoba() { if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_F9) { - mesa(); + volumeControls(); if (currentChapter != 3) cont_sv = 0; } else if (key == Common::KEYCODE_F10) { @@ -1092,16 +1090,9 @@ void DrasculaEngine::checkObjects() { } } - if (currentChapter == 2) { - if (mouseX > curX + 2 && mouseY > curY + 2 - && mouseX < curX + curWidth - 2 && mouseY < curY + curHeight - 2) { - strcpy(textName, "hacker"); - hasName = 1; - veo = 1; - } - } else { - if (mouseX > curX + 2 && mouseY > curY + 2 - && mouseX < curX + curWidth - 2 && mouseY < curY + curHeight - 2 && veo == 0) { + if (mouseX > curX + 2 && mouseY > curY + 2 + && mouseX < curX + curWidth - 2 && mouseY < curY + curHeight - 2) { + if (currentChapter == 2 || veo == 0) { strcpy(textName, "hacker"); hasName = 1; veo = 1; @@ -1221,16 +1212,16 @@ void DrasculaEngine::updateEvents() { mouseY = event.mouse.y; break; case Common::EVENT_LBUTTONDOWN: - button_izq = 1; + leftMouseButton = 1; break; case Common::EVENT_LBUTTONUP: - button_izq = 0; + leftMouseButton = 0; break; case Common::EVENT_RBUTTONDOWN: - button_dch = 1; + rightMouseButton = 1; break; case Common::EVENT_RBUTTONUP: - button_dch = 0; + rightMouseButton = 0; break; case Common::EVENT_QUIT: // TODO @@ -1244,10 +1235,8 @@ void DrasculaEngine::updateEvents() { } void DrasculaEngine::selectVerb(int verbo) { - int c = 171; + int c = (menuScreen == 1) ? 0 : 171; - if (menuScreen == 1) - c = 0; if (currentChapter == 5) { if (takeObject == 1 && pickedObject != 16) addObject(pickedObject); @@ -1262,24 +1251,33 @@ void DrasculaEngine::selectVerb(int verbo) { pickedObject = verbo; } -void DrasculaEngine::mesa() { - int nivel_master, nivel_voc, nivel_cd; +void DrasculaEngine::updateVolume(Audio::Mixer::SoundType soundType, int prevVolume) { + int vol = _mixer->getVolumeForSoundType(soundType) / 16; + if (mouseY < prevVolume && vol < 15) + vol++; + if (mouseY > prevVolume && vol > 0) + vol--; + _mixer->setVolumeForSoundType(soundType, vol * 16); +} + +void DrasculaEngine::volumeControls() { + int masterVolume, voiceVolume, musicVolume; copyRect(1, 56, 73, 63, 177, 97, tableSurface, screenSurface); updateScreen(73, 63, 73, 63, 177, 97, screenSurface); - for (;;) { - nivel_master = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4); - nivel_voc = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4); - nivel_cd = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4); + masterVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4); + voiceVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4); + musicVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4); + for (;;) { updateRoom(); copyRect(1, 56, 73, 63, 177, 97, tableSurface, screenSurface); - copyBackground(183, 56, 82, nivel_master, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4), tableSurface, screenSurface); - copyBackground(183, 56, 138, nivel_voc, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4), tableSurface, screenSurface); - copyBackground(183, 56, 194, nivel_cd, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4), tableSurface, screenSurface); + copyBackground(183, 56, 82, masterVolume, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4), tableSurface, screenSurface); + copyBackground(183, 56, 138, voiceVolume, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4), tableSurface, screenSurface); + copyBackground(183, 56, 194, musicVolume, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4), tableSurface, screenSurface); setCursorTable(); @@ -1287,37 +1285,25 @@ void DrasculaEngine::mesa() { updateEvents(); - if (button_dch == 1) { + if (rightMouseButton == 1) { delay(100); break; } - if (button_izq == 1) { + if (leftMouseButton == 1) { delay(100); if (mouseX > 80 && mouseX < 121) { - int vol = _mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16; - if (mouseY < nivel_master && vol < 15) - vol++; - if (mouseY > nivel_master && vol > 0) - vol--; - _mixer->setVolumeForSoundType(Audio::Mixer::kPlainSoundType, vol * 16); + updateVolume(Audio::Mixer::kPlainSoundType, mouseY); + masterVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4); } if (mouseX > 136 && mouseX < 178) { - int vol = _mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16; - if (mouseY < nivel_voc && vol < 15) - vol++; - if (mouseY > nivel_voc && vol > 0) - vol--; - _mixer->setVolumeForSoundType(Audio::Mixer::kSFXSoundType, vol * 16); + updateVolume(Audio::Mixer::kSFXSoundType, mouseY); + voiceVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4); } if (mouseX > 192 && mouseX < 233) { - int vol = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16; - if (mouseY < nivel_cd && vol < 15) - vol++; - if (mouseY > nivel_cd && vol > 0) - vol--; - _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, vol * 16); + updateVolume(Audio::Mixer::kMusicSoundType, mouseY); + musicVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4); } } @@ -1372,7 +1358,7 @@ bool DrasculaEngine::saveLoadScreen() { updateEvents(); - if (button_izq == 1) { + if (leftMouseButton == 1) { delay(50); for (n = 0; n < NUM_SAVES; n++) { if (mouseX > 115 && mouseY > y + (9 * n) && mouseX < 115 + 175 && mouseY < y + 10 + (9 * n)) { @@ -1662,7 +1648,7 @@ void DrasculaEngine::screenSaver() { // end of efecto() updateEvents(); - if (button_dch == 1 || button_izq == 1) + if (rightMouseButton == 1 || leftMouseButton == 1) break; if (mouseX != xr) break; @@ -1676,13 +1662,28 @@ void DrasculaEngine::screenSaver() { loadPic(roomNumber, drawSurface1, HALF_PAL); } -void DrasculaEngine::fliplay(const char *filefli, int vel) { - openSSN(filefli, vel); +void DrasculaEngine::playFLI(const char *filefli, int vel) { + // Open file + MiVideoSSN = (byte *)malloc(64256); + globalSpeed = 1000 / vel; + FrameSSN = 0; + UsingMem = 0; + if (MiVideoSSN == NULL) + return; + _arj.open(filefli); + mSession = TryInMem(); + LastFrame = _system->getMillis(); + while (playFrameSSN() && (!term_int)) { if (getScan() == Common::KEYCODE_ESCAPE) term_int = 1; } - EndSSN(); + + free(MiVideoSSN); + if (UsingMem) + free(pointer); + else + _arj.close(); } void DrasculaEngine::fadeFromBlack(int fadeSpeed) { @@ -1797,8 +1798,7 @@ void DrasculaEngine::playSound(int soundNum) { char file[20]; sprintf(file, "s%i.als", soundNum); - if (hay_sb == 1) - playFile(file); + playFile(file); } bool DrasculaEngine::animate(const char *animationFile, int FPS) { @@ -1974,10 +1974,8 @@ void DrasculaEngine::hiccup(int counter) { void DrasculaEngine::finishSound() { delay(1); - if (hay_sb == 1) { - while (soundIsActive()) - _system->delayMillis(10); - } + while (soundIsActive()) + _system->delayMillis(10); } void DrasculaEngine::playMusic(int p) { @@ -2636,18 +2634,6 @@ void DrasculaEngine::enterName() { } } -void DrasculaEngine::openSSN(const char *Name, int Pause) { - MiVideoSSN = (byte *)malloc(64256); - globalSpeed = 1000 / Pause; - FrameSSN = 0; - UsingMem = 0; - if (MiVideoSSN == NULL) - return; - _arj.open(Name); - mSession = TryInMem(); - LastFrame = _system->getMillis(); -} - int DrasculaEngine::playFrameSSN() { int Exit = 0; uint32 Lengt; @@ -2742,15 +2728,6 @@ int DrasculaEngine::playFrameSSN() { return (!Exit); } -void DrasculaEngine::EndSSN() { - free(MiVideoSSN); - if (UsingMem) - free(pointer); - else { - _arj.close(); - } -} - byte *DrasculaEngine::TryInMem() { int Lengt; @@ -3201,7 +3178,7 @@ void DrasculaEngine::converse(const char *fileName) { updateScreen(); - if ((button_izq == 1) && (game1 == 2)) { + if ((leftMouseButton == 1) && (game1 == 2)) { delay(100); used1 = 1; talk(phrase1, sound1); @@ -3209,7 +3186,7 @@ void DrasculaEngine::converse(const char *fileName) { grr(); else response(answer1); - } else if ((button_izq == 1) && (game2 == 2)) { + } else if ((leftMouseButton == 1) && (game2 == 2)) { delay(100); used2 = 1; talk(phrase2, sound2); @@ -3217,7 +3194,7 @@ void DrasculaEngine::converse(const char *fileName) { grr(); else response(answer2); - } else if ((button_izq == 1) && (game3 == 2)) { + } else if ((leftMouseButton == 1) && (game3 == 2)) { delay(100); used3 = 1; talk(phrase3, sound3); @@ -3225,13 +3202,13 @@ void DrasculaEngine::converse(const char *fileName) { grr(); else response(answer3); - } else if ((button_izq == 1) && (game4 == 2)) { + } else if ((leftMouseButton == 1) && (game4 == 2)) { delay(100); talk(phrase4, sound4); breakOut = 1; } - if (button_izq == 1) { + if (leftMouseButton == 1) { delay(100); color_abc(kColorLightGreen); } @@ -3252,12 +3229,8 @@ void DrasculaEngine::converse(const char *fileName) { void DrasculaEngine::response(int function) { if (currentChapter == 1) { - if (function == 10) - talk_drunk(1); - else if (function == 11) - talk_drunk(2); - else if (function == 12) - talk_drunk(3); + if (function >= 10 && function <= 12) + talk_drunk(function - 9); } else if (currentChapter == 2) { if (function == 8) animation_8_2(); @@ -3351,9 +3324,7 @@ void DrasculaEngine::addObject(int osj) { } void DrasculaEngine::stopSound() { - if (hay_sb == 1) { - _mixer->stopHandle(_soundHandle); - } + _mixer->stopHandle(_soundHandle); } void DrasculaEngine::MusicFadeout() { @@ -3615,8 +3586,7 @@ void DrasculaEngine::grr() { color_abc(kColorDarkGreen); - if (hay_sb == 1) - playFile("s10.als"); + playFile("s10.als"); updateRoom(); copyBackground(253, 110, 150, 65, 20, 30, drawSurface3, screenSurface); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index d206947dc9..364bcadbc2 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -234,7 +234,6 @@ public: Common::ArjFile _arj; - int hay_sb; int previousMusic, roomMusic; int roomNumber; char roomDisk[20]; @@ -302,8 +301,8 @@ public: int mouseX; int mouseY; int mouseY_ant; - int button_izq; - int button_dch; + int leftMouseButton; + int rightMouseButton; bool escoba(); void black(); @@ -329,7 +328,8 @@ public: bool verify2(); Common::KeyCode getScan(); void selectVerb(int); - void mesa(); + void updateVolume(Audio::Mixer::SoundType soundType, int prevVolume); + void volumeControls(); bool saveLoadScreen(); void print_abc(const char *, int, int); void delay(int ms); @@ -338,7 +338,7 @@ public: void chooseObject(int objeto); void addObject(int); int removeObject(int osj); - void fliplay(const char *filefli, int vel); + void playFLI(const char *filefli, int vel); void fadeFromBlack(int fadeSpeed); char adjustToVGA(char value); void color_abc(int cl); @@ -404,13 +404,11 @@ public: void setCursorTable(); void enterName(); bool soundIsActive(); - void openSSN(const char *Name, int Pause); void WaitFrameSSN(); void MixVideo(byte *OldScreen, byte *NewScreen); void Des_RLE(byte *BufferRLE, byte *MiVideoRLE); void Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght); byte *TryInMem(); - void EndSSN(); int playFrameSSN(); byte *AuxBuffOrg; @@ -553,7 +551,7 @@ public: void animation_4_3(); void animation_5_3(); void animation_6_3(); - void animation_rayo(); + void animation_ray(); // void animation_1_4(); void animation_2_4(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index ff14b043c0..108434fe9a 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -33,22 +33,15 @@ int x_talk_izq[6] = {145, 169, 193, 217, 241, 265}; void DrasculaEngine::talkInit(const char *filename) { _rnd->setSeed((unsigned int)_system->getMillis() / 2); - if (hay_sb == 1) - playFile(filename); + playFile(filename); } bool DrasculaEngine::isTalkFinished(int* length) { byte key = getScan(); if (key != 0) stopSound(); - if (hay_sb == 1) { - if (soundIsActive()) - return false; - } else { - length -= 2; - if (length > 0) - return false; - } + if (soundIsActive()) + return false; return true; } -- cgit v1.2.3 From cae527c7037dff1ef6371cc149a400bf9c564587 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 5 Jun 2008 12:41:04 +0000 Subject: Forgot the separator svn-id: r32553 --- engines/drascula/staticdata.h | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index f9bc270d93..af899f441f 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -272,6 +272,7 @@ RoomTalkAction room9Actions[] = { // num action object speech { -1, kVerbLook, 150, 35 }, { -1, kVerbTalk, 150, 6 }, + // ---------------------------------- { -1, kVerbLook, 51, 60 }, }; -- cgit v1.2.3 From bfd4fc910e76161cf088c2b9683414de7b32e3f4 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 5 Jun 2008 13:23:57 +0000 Subject: - Rewrote the way room updaters, preupdaters and room parsers are called and added debug output when they're called - Simplified calls to converse() - Removed the useless para_codificar buffers - Renamed checkFlag -> checkAction svn-id: r32554 --- engines/drascula/animation.cpp | 16 +- engines/drascula/drascula.cpp | 16 +- engines/drascula/drascula.h | 7 +- engines/drascula/rooms.cpp | 389 +++++++++++++++++++---------------------- 4 files changed, 203 insertions(+), 225 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index ed4ccde4e4..91920df920 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -1519,7 +1519,7 @@ void DrasculaEngine::animation_1_5() { } trackProtagonist = 1; - converse("op_8.cal"); + converse(8); } void DrasculaEngine::animation_2_5() { @@ -1886,7 +1886,7 @@ void DrasculaEngine::animation_1_6() { talk_drascula(22, 1); talk(249); talk_drascula(23, 1); - converse("op_11.cal"); + converse(11); talk_drascula(26, 1); animate("fum.bin", 15); @@ -2173,7 +2173,7 @@ void DrasculaEngine::animation_12_2() { flags[11] = 1; talk_pianist(5); - converse("op_1.cal"); + converse(1); if (_lang == kSpanish) textSurface = extraSurface; @@ -2282,7 +2282,7 @@ void DrasculaEngine::animation_13_2() { talk_drunk(7); flags[41] = 1; } - converse("op_2.cal"); + converse(2); loadPic(964, frontSurface); } @@ -2290,7 +2290,7 @@ void DrasculaEngine::animation_13_2() { void DrasculaEngine::animation_18_2() { talk(378); talk_vbpuerta(4); - converse("op_3.cal"); + converse(3); } void DrasculaEngine::animation_22_2() { @@ -2331,9 +2331,9 @@ void DrasculaEngine::animation_24_2() { talk_vb(22); if (flags[22] == 0) - converse("op_4.cal"); + converse(4); else - converse("op_5.cal"); + converse(5); exitRoom(0); flags[21] = 0; @@ -2653,7 +2653,7 @@ void DrasculaEngine::animation_1_4() { talk_igor(6, kIgorSeated); } - converse("op_6.cal"); + converse(6); flags[20] = 0; flags[18] = 0; } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index b5924d6c7b..23b04a2e60 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -100,6 +100,7 @@ int DrasculaEngine::init() { _lang = 0; } + setupRoomsTable(); loadArchives(); return 0; @@ -788,13 +789,11 @@ void DrasculaEngine::enterRoom(int roomIndex) { int soc, l, martin = 0, objIsExit = 0; float chiquez = 0, pequegnez = 0; char pant1[20], pant2[20], pant3[20], pant4[20]; - char para_codificar[20]; char buffer[256]; int palLevel = 0; hasName = 0; - strcpy(para_codificar, fileName); strcpy(currentData, fileName); _arj.open(fileName); @@ -1166,7 +1165,7 @@ bool DrasculaEngine::verify2() { return true; } else { if (!strcmp(textName, "hacker") && hasName == 1) { - if (checkFlag(50)) + if (checkAction(50)) return true; } else { for (l = 0; l < numRoomObjs; l++) { @@ -1175,7 +1174,7 @@ bool DrasculaEngine::verify2() { trackFinal = trackObj[l]; walkToObject = 1; gotoObject(roomObjX[l], roomObjY[l]); - if (checkFlag(objectNum[l])) + if (checkAction(objectNum[l])) return true; if (currentChapter == 4) break; @@ -3028,7 +3027,7 @@ bool DrasculaEngine::checkMenuFlags() { if (whichObject() == n) { h = inventoryObjects[n]; if (h != 0) - if (checkFlag(h)) + if (checkAction(h)) return true; } } @@ -3036,14 +3035,15 @@ bool DrasculaEngine::checkMenuFlags() { return false; } -void DrasculaEngine::converse(const char *fileName) { +void DrasculaEngine::converse(int index) { + char fileName[20]; + sprintf(fileName, "op_%d.cal", index); int h; int game1 = 1, game2 = 1, game3 = 1, game4 = 1; char phrase1[78]; char phrase2[78]; char phrase3[87]; char phrase4[78]; - char para_codificar[13]; char sound1[13]; char sound2[13]; char sound3[13]; @@ -3059,8 +3059,6 @@ void DrasculaEngine::converse(const char *fileName) { breakOut = 0; - strcpy(para_codificar, fileName); - if (currentChapter == 5) withoutVerb(); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 364bcadbc2..f125bb399d 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -400,7 +400,7 @@ public: void removeObject(); bool exitRoom(int); bool pickupObject(); - bool checkFlag(int); + bool checkAction(int); void setCursorTable(); void enterName(); bool soundIsActive(); @@ -440,8 +440,9 @@ public: void increaseFrameNum(); int whichObject(); bool checkMenuFlags(); + void setupRoomsTable(); bool roomParse(RoomTalkAction*, int, int); - void converse(const char *); + void converse(int); void print_abc_opc(const char *, int, int, int); void response(int); void room_pendulum(int); @@ -635,9 +636,9 @@ public: void update_31(); void update_34(); void update_35(); + void update_49_pre(); void update_53_pre(); void update_54_pre(); - void update_49_pre(); void update_56_pre(); void update_50(); void update_57(); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index e318dccf27..c1100c1115 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -23,11 +23,134 @@ * */ +#include "common/array.h" + #include "drascula/drascula.h" #include "drascula/staticdata.h" namespace Drascula { +typedef void (DrasculaEngine::*RoomParser)(int args); + +struct DrasculaRoomParser { + DrasculaRoomParser(const char* d, RoomParser p) : desc(d), proc(p) {} + const char* desc; + RoomParser proc; +}; + +typedef void (DrasculaEngine::*Updater)(); + +struct DrasculaUpdater { + DrasculaUpdater(const char* d, Updater p) : desc(d), proc(p) {} + const char* desc; + Updater proc; +}; + +Common::Array _roomParsers; +Common::Array _roomPreupdaters; +Common::Array _roomUpdaters; + +#define ROOM(x) _roomParsers.push_back(new DrasculaRoomParser(#x, &DrasculaEngine::x)) +#define PREUPDATEROOM(x) _roomPreupdaters.push_back(new DrasculaUpdater(#x, &DrasculaEngine::x)) +#define UPDATEROOM(x) _roomUpdaters.push_back(new DrasculaUpdater(#x, &DrasculaEngine::x)) + +void DrasculaEngine::setupRoomsTable() { + //ROOM(room_0); // default + ROOM(room_1); + ROOM(room_3); + ROOM(room_4); + ROOM(room_5); + ROOM(room_6); + ROOM(room_7); + ROOM(room_8); + ROOM(room_9); + ROOM(room_12); + //ROOM(room_13); // returns bool + ROOM(room_14); + ROOM(room_15); + ROOM(room_16); + ROOM(room_17); + ROOM(room_18); + ROOM(room_19); + //ROOM(room_21); // returns bool + ROOM(room_22); + ROOM(room_23); + ROOM(room_24); + ROOM(room_26); + ROOM(room_27); + ROOM(room_29); + ROOM(room_30); + ROOM(room_31); + ROOM(room_34); + ROOM(room_35); + ROOM(room_44); + ROOM(room_49); + ROOM(room_53); + ROOM(room_54); + ROOM(room_55); + //ROOM(room_56); // returns bool + ROOM(room_58); + ROOM(room_59); + //ROOM(room_60); // returns bool + ROOM(room_61); + ROOM(room_62); + ROOM(room_63); + + PREUPDATEROOM(update_1_pre); + PREUPDATEROOM(update_3_pre); + PREUPDATEROOM(update_5_pre); + PREUPDATEROOM(update_6_pre); + PREUPDATEROOM(update_7_pre); + PREUPDATEROOM(update_9_pre); + PREUPDATEROOM(update_12_pre); + PREUPDATEROOM(update_14_pre); + PREUPDATEROOM(update_16_pre); + PREUPDATEROOM(update_17_pre); + PREUPDATEROOM(update_18_pre); + PREUPDATEROOM(update_21_pre); + PREUPDATEROOM(update_22_pre); + PREUPDATEROOM(update_23_pre); + PREUPDATEROOM(update_24_pre); + PREUPDATEROOM(update_26_pre); + PREUPDATEROOM(update_27_pre); + PREUPDATEROOM(update_29_pre); + PREUPDATEROOM(update_30_pre); + PREUPDATEROOM(update_31_pre); + PREUPDATEROOM(update_34_pre); + PREUPDATEROOM(update_35_pre); + PREUPDATEROOM(update_49_pre); + PREUPDATEROOM(update_53_pre); + PREUPDATEROOM(update_54_pre); + PREUPDATEROOM(update_56_pre); + PREUPDATEROOM(update_58_pre); + PREUPDATEROOM(update_59_pre); + PREUPDATEROOM(update_60_pre); + PREUPDATEROOM(update_62_pre); + + UPDATEROOM(update_2); + UPDATEROOM(update_3); + UPDATEROOM(update_4); + UPDATEROOM(update_5); + UPDATEROOM(update_13); + UPDATEROOM(update_15); + UPDATEROOM(update_17); + UPDATEROOM(update_18); + UPDATEROOM(update_20); + UPDATEROOM(update_26); + UPDATEROOM(update_27); + UPDATEROOM(update_29); + UPDATEROOM(update_31); + UPDATEROOM(update_34); + UPDATEROOM(update_35); + UPDATEROOM(update_50); + UPDATEROOM(update_57); + UPDATEROOM(update_58); + UPDATEROOM(update_60); + UPDATEROOM(update_61); + UPDATEROOM(update_62); + UPDATEROOM(update_63); +} + bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int actionCount, int fl) { for (int i = 0; i < actionCount; i++) { if (roomActions[i].chapter == currentChapter || @@ -37,6 +160,7 @@ bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int actionCount, int if (roomActions[i].objectID == fl || roomActions[i].objectID == -1) { talk(roomActions[i].speechID); + hasAnswer = 1; return true; } } @@ -275,7 +399,7 @@ bool DrasculaEngine::room_13(int fl) { talk(412); strcpy(objName[1], "yoda"); } else if (pickedObject == kVerbTalk && fl == 51) - converse("op_7.cal"); + converse(7); else if (pickedObject == 19 && fl == 51) animation_1_3(); else if (pickedObject == 9 && fl == 51) { @@ -722,7 +846,7 @@ void DrasculaEngine::room_49(int fl){ return; if (pickedObject == kVerbTalk && fl ==51) - converse("op_9.cal"); + converse(9); else if ((pickedObject == 8 && fl == 51) || (pickedObject == 8 && fl == 203)) animation_5_5(); else @@ -770,7 +894,7 @@ void DrasculaEngine::room_54(int fl) { talk(289); talk_mus(2); talk_mus(3); - converse("op_10.cal"); + converse(10); flags[12] = 0; flags[14] = 1; } else if (pickedObject == kVerbTalk && fl == 53 && flags[14] == 1) @@ -904,7 +1028,7 @@ bool DrasculaEngine::room_60(int fl) { else if (pickedObject == kVerbTalk && fl == 52) { talk(266); talk_bartender(1, 1); - converse("op_12.cal"); + converse(12); withoutVerb(); pickedObject = 0; } else if (pickedObject == 21 && fl == 56) @@ -933,7 +1057,7 @@ void DrasculaEngine::room_62(int fl) { return; if (pickedObject == kVerbTalk && fl == 53) - converse("op_13.cal"); + converse(13); else if (pickedObject == kVerbTalk && fl == 52 && flags[0] == 0) animation_3_1(); else if (pickedObject == kVerbTalk && fl == 52 && flags[0] == 1) @@ -966,136 +1090,39 @@ void DrasculaEngine::room_pendulum(int fl) { } void DrasculaEngine::updateRefresh() { - if (currentChapter == 1) { - if (roomNumber == 63) - update_63(); - else if (roomNumber == 62) - update_62(); - } else if (currentChapter == 2) { - if (roomNumber == 3) - update_3(); - else if (roomNumber == 2) - update_2(); - else if (roomNumber == 4) - update_4(); - else if (roomNumber == 5) - update_5(); - else if (roomNumber == 15) - update_15(); - else if (roomNumber == 17) - update_17(); - else if (roomNumber == 18) - update_18(); - else if (roomNumber == 10) - showMap(); - } else if (currentChapter == 3) { - if (roomNumber == 20) - update_20(); - else if (roomNumber == 13) - update_13(); - } else if (currentChapter == 4) { - if (roomNumber == 29) - update_29(); - else if (roomNumber == 26) - update_26(); - else if (roomNumber == 27) - update_27(); - else if (roomNumber == 31) - update_31(); - else if (roomNumber == 34) - update_34(); - else if (roomNumber == 35) - update_35(); - } else if (currentChapter == 5) { - if (roomNumber == 45) - showMap(); - else if (roomNumber == 50) - update_50(); - else if (roomNumber == 57) - update_57(); - } else if (currentChapter == 6) { - if (roomNumber == 60) - update_60(); - else if (roomNumber == 61) - update_61(); - else if (roomNumber == 58) - update_58(); + // Call room-specific updater + char rm[20]; + sprintf(rm, "update_%d", roomNumber); + for (uint i = 0; i < _roomUpdaters.size(); i++) { + if (!strcmp(rm, _roomUpdaters[i]->desc)) { + debug(4, "Calling room updater %d", roomNumber); + (this->*(_roomUpdaters[i]->proc))(); + break; + } } + + if (roomNumber == 10) + showMap(); + else if (roomNumber == 45) + showMap(); } void DrasculaEngine::updateRefresh_pre() { - if (currentChapter == 1) { - if (roomNumber == 62) - update_62_pre(); - else if (roomNumber == 16) - placeBJ(); - } else if (currentChapter == 2) { - if (roomNumber == 1) - update_1_pre(); - else if (roomNumber == 3) - update_3_pre(); - else if (roomNumber == 5) - update_5_pre(); - else if (roomNumber == 6) - update_6_pre(); - else if (roomNumber == 7) - update_7_pre(); - else if (roomNumber == 9) - update_9_pre(); - else if (roomNumber == 12) - update_12_pre(); - else if (roomNumber == 14) - update_14_pre(); - else if (roomNumber == 16) - update_16_pre(); - else if (roomNumber == 17) - update_17_pre(); - else if (roomNumber == 18) - update_18_pre(); - } else if (currentChapter == 3) { - // nothing - } else if (currentChapter == 4) { - if (roomNumber == 21) - update_21_pre(); - else if (roomNumber == 22) - update_22_pre(); - else if (roomNumber == 23) - update_23_pre(); - else if (roomNumber == 24) - update_24_pre(); - else if (roomNumber == 26) - update_26_pre(); - else if (roomNumber == 27) - update_27_pre(); - else if (roomNumber == 29) - update_29_pre(); - else if (roomNumber == 30) - update_30_pre(); - else if (roomNumber == 31) - update_31_pre(); - else if (roomNumber == 34) - update_34_pre(); - else if (roomNumber == 35) - update_35_pre(); - } else if (currentChapter == 5) { - if (roomNumber == 49) - update_49_pre(); - else if (roomNumber == 53) - update_53_pre(); - else if (roomNumber == 54) - update_54_pre(); - else if (roomNumber == 56) - update_56_pre(); - } else if (currentChapter == 6) { - if (roomNumber == 102) - update_pendulum(); - else if (roomNumber == 58) - update_58_pre(); - else if (roomNumber == 59) - update_59_pre(); - else if (roomNumber == 60) - update_60_pre(); + // Call room-specific preupdater + char rm[20]; + sprintf(rm, "update_%d_pre", roomNumber); + for (uint i = 0; i < _roomPreupdaters.size(); i++) { + if (!strcmp(rm, _roomPreupdaters[i]->desc)) { + debug(4, "Calling room preupdater %d", roomNumber); + (this->*(_roomPreupdaters[i]->proc))(); + break; + } } + + if (currentChapter == 1 && roomNumber == 16) + placeBJ(); + else if (roomNumber == 102) + update_pendulum(); } void DrasculaEngine::update_1_pre() { @@ -1297,6 +1324,11 @@ void DrasculaEngine::update_15() { } void DrasculaEngine::update_16_pre() { + if (currentChapter != 2) { + debug(4, "update_16_pre: Special case, current chapter is not 2, not performing update"); + return; + } + if (flags[17] == 0) copyBackground(1, 103, 24, 72, 33, 95, drawSurface3, screenSurface); if (flags[19] == 1) @@ -1677,7 +1709,7 @@ void DrasculaEngine::update_pendulum() { } } -bool DrasculaEngine::checkFlag(int fl) { +bool DrasculaEngine::checkAction(int fl) { characterMoved = 0; updateRoom(); updateScreen(); @@ -1688,6 +1720,8 @@ bool DrasculaEngine::checkFlag(int fl) { if (currentChapter == 1) { if (pickedObject == kVerbLook && fl == 28) talk(328); + else + hasAnswer = 0; } else if (currentChapter == 2) { if ((pickedObject == kVerbLook && fl == 22 && flags[23] == 0) || (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) { @@ -1890,10 +1924,6 @@ bool DrasculaEngine::checkFlag(int fl) { talk(313); else if (pickedObject == kVerbTalk && fl == 50) talk(314); - else if (roomNumber == 62) - room_62(fl); - else if (roomNumber == 63) - room_63(fl); else hasAnswer = 0; } else if (currentChapter == 2) { @@ -1916,36 +1946,6 @@ bool DrasculaEngine::checkFlag(int fl) { talk(156); else if (pickedObject == 20 && fl == 50) talk(163); - else if (roomNumber == 1) - room_1(fl); - else if (roomNumber == 3) - room_3(fl); - else if (roomNumber == 4) - room_4(fl); - else if (roomNumber == 5) - room_5(fl); - else if (roomNumber == 6) - room_6(fl); - else if (roomNumber == 7) - room_7(fl); - else if (roomNumber == 8) - room_8(fl); - else if (roomNumber == 9) - room_9(fl); - else if (roomNumber == 12) - room_12(fl); - else if (roomNumber == 14) - room_14(fl); - else if (roomNumber == 15) - room_15(fl); - else if (roomNumber == 16) - room_16(fl); - else if (roomNumber == 17) - room_17(fl); - else if (roomNumber == 18) - room_18(fl); - else if (roomNumber == 19) - room_19(fl); else hasAnswer = 0; } else if (currentChapter == 3) { @@ -1992,29 +1992,7 @@ bool DrasculaEngine::checkFlag(int fl) { else if (roomNumber == 21) { if (room_21(fl)) return true; - } else if (roomNumber == 22) - room_22(fl); - else if (roomNumber == 23) - room_23(fl); - else if (roomNumber == 24) - room_24(fl); - else if (roomNumber == 26) - room_26(fl); - else if (roomNumber == 27) - room_27(fl); - else if (roomNumber == 29) - room_29(fl); - else if (roomNumber == 30) - room_30(fl); - else if (roomNumber == 31) - room_31(fl); - else if (roomNumber == 34) - room_34(fl); - else if (roomNumber == 35) - room_35(fl); - else if (roomNumber == 44) - room_44(fl); - else + } else hasAnswer = 0; } else if (currentChapter == 5) { // TODO: These are not translated @@ -2032,14 +2010,6 @@ bool DrasculaEngine::checkFlag(int fl) { talk("hola yo", "16.als"); else if (pickedObject == 20 && fl == 50) talk(487); - else if (roomNumber == 49) - room_49(fl); - else if (roomNumber == 53) - room_53(fl); - else if (roomNumber == 54) - room_54(fl); - else if (roomNumber == 55) - room_55(fl); else if (roomNumber == 56) { if (room_56(fl)) return true; @@ -2062,22 +2032,31 @@ bool DrasculaEngine::checkFlag(int fl) { talk(314); else if (roomNumber == 102) room_pendulum(fl); - else if (roomNumber == 58) - room_58(fl); - else if (roomNumber == 59) - room_59(fl); else if (roomNumber == 60) { if (room_60(fl)) return true; - } else if (roomNumber == 61) - room_61(fl); + } else hasAnswer = 0; } } - if (hasAnswer == 0 && hasName == 1) - room_0(); - else if (hasAnswer == 0 && menuScreen == 1) + + if (hasAnswer == 0) { + hasAnswer = 1; + + // Call room-specific parser + char rm[20]; + sprintf(rm, "room_%d", roomNumber); + for (uint i = 0; i < _roomParsers.size(); i++) { + if (!strcmp(rm, _roomParsers[i]->desc)) { + debug(4, "Calling room parser %d", roomNumber); + (this->*(_roomParsers[i]->proc))(fl); + break; + } + } + } + + if (hasAnswer == 0 && (hasName == 1 || menuScreen == 1)) room_0(); return false; -- cgit v1.2.3 From dd4a0efe0290891000d3b44a69fec65eafc00ce9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 5 Jun 2008 14:02:49 +0000 Subject: Fix compiler warning (to clear a C-string, do not abuse sprintf like that) svn-id: r32555 --- engines/drascula/drascula.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 23b04a2e60..ccf5ae7f92 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1341,7 +1341,7 @@ bool DrasculaEngine::saveLoadScreen() { color_abc(kColorLightGreen); - sprintf(select, ""); + select[0] = 0; for (;;) { y = 27; -- cgit v1.2.3 From 5f573fea1150ef939c4ec8c71e3ae49f6f4930c3 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 5 Jun 2008 15:03:48 +0000 Subject: Added enums for all items up to chapter 3 and some of chapter 4 svn-id: r32556 --- engines/drascula/animation.cpp | 30 ++++++++++++------------ engines/drascula/drascula.cpp | 53 +++++++++++++++++++++--------------------- engines/drascula/drascula.h | 32 +++++++++++++++++++++++++ engines/drascula/rooms.cpp | 14 +++++------ 4 files changed, 81 insertions(+), 48 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 91920df920..13425f7250 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -1089,11 +1089,11 @@ void DrasculaEngine::animation_23_2() { talk_vb(19); if (flags[25] == 0) { talk_vb(20); - if (removeObject(7) == 0) + if (removeObject(kItemMoney) == 0) flags[30] = 1; - if (removeObject(18) == 0) + if (removeObject(kItemTwoCoins) == 0) flags[31] = 1; - if (removeObject(19) == 0) + if (removeObject(kItemOneCoin) == 0) flags[32] = 1; } talk_vb(21); @@ -1185,17 +1185,17 @@ void DrasculaEngine::animation_27_2() { flags[22] = 1; withoutVerb(); - removeObject(23); - addObject(11); + removeObject(kItemEarWithEarPlug); + addObject(kItemEarplugs); talk_vb(23); talk_vb(24); if (flags[30] == 1) - addObject(7); + addObject(kItemMoney); if (flags[31] == 1) - addObject(18); + addObject(kItemTwoCoins); if (flags[32] == 1) - addObject(19); + addObject(kItemOneCoin); talk_vb(25); talk_vb(26); } @@ -1280,12 +1280,12 @@ void DrasculaEngine::animation_31_2() { flags[38] = 0; flags[36] = 1; withoutVerb(); - removeObject(8); - removeObject(13); - removeObject(15); - removeObject(16); - removeObject(17); - addObject(20); + removeObject(kItemLeaves); + removeObject(kItemBubbleGum); + removeObject(kItemTissues); + removeObject(kItemCigarettes); + removeObject(kItemCandle); + addObject(kItemReefer); } void DrasculaEngine::animation_35_2() { @@ -2234,7 +2234,7 @@ void DrasculaEngine::animation_26_2() { updateAnim(121, 225, 113, 50, 59, 6, extraSurface); pickObject(11); - removeObject(12); + removeObject(kItemBook); if (_lang == kSpanish) textSurface = extraSurface; diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index ccf5ae7f92..0b22ba3170 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -453,7 +453,7 @@ bool DrasculaEngine::escoba() { gotoObject(65, 145); } } else if (currentChapter == 2) { - addObject(28); + addObject(kItemPhone); trackProtagonist = 3; objExit = 162; if (hay_que_load == 0) @@ -464,13 +464,13 @@ bool DrasculaEngine::escoba() { } } } else if (currentChapter == 3) { - addObject(28); - addObject(11); - addObject(14); - addObject(22); - addObject(9); - addObject(20); - addObject(19); + addObject(kItemPhone); + addObject(kItemEarplugs); + addObject(kItemSickle); + addObject(kItemHandbag); + addObject(kItemCross); + addObject(kItemReefer); + addObject(kItemOneCoin); flags[1] = 1; trackProtagonist = 1; objExit = 99; @@ -481,11 +481,12 @@ bool DrasculaEngine::escoba() { return true; } } + // From here onwards the items have different IDs } else if (currentChapter == 4) { - addObject(28); - addObject(9); - addObject(20); - addObject(22); + addObject(kItemPhone2); + addObject(kItemCross2); + addObject(kItemReefer2); + addObject(kItemOneCoin2); objExit = 100; if (hay_que_load == 0) { enterRoom(21); @@ -718,11 +719,11 @@ void DrasculaEngine::chooseObject(int objeto) { pickedObject = objeto; } -int DrasculaEngine::removeObject(int osj) { +int DrasculaEngine::removeObject(int obj) { int result = 1; for (int h = 1; h < 43; h++) { - if (inventoryObjects[h] == osj) { + if (inventoryObjects[h] == obj) { inventoryObjects[h] = 0; result = 0; break; @@ -2345,10 +2346,10 @@ void DrasculaEngine::moveCharacters() { void DrasculaEngine::showMenu() { int h, n, x; - char texto_icono[13]; + char textIcon[13]; x = whichObject(); - strcpy(texto_icono, iconName[x]); + strcpy(textIcon, iconName[x]); for (n = 1; n < 43; n++) { h = inventoryObjects[n]; @@ -2366,18 +2367,18 @@ void DrasculaEngine::showMenu() { } if (x < 7) - print_abc(texto_icono, itemLocations[x].x - 2, itemLocations[x].y - 7); + print_abc(textIcon, itemLocations[x].x - 2, itemLocations[x].y - 7); } void DrasculaEngine::clearMenu() { - int n, sobre_verbo = 1; + int n, verbActivated = 1; for (n = 0; n < 7; n++) { if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1]) - sobre_verbo = 0; - copyRect(OBJWIDTH * n, OBJHEIGHT * sobre_verbo, verbBarX[n], 2, + verbActivated = 0; + copyRect(OBJWIDTH * n, OBJHEIGHT * verbActivated, verbBarX[n], 2, OBJWIDTH, OBJHEIGHT, backSurface, screenSurface); - sobre_verbo = 1; + verbActivated = 1; } } @@ -2454,8 +2455,8 @@ bool DrasculaEngine::exitRoom(int l) { } if (objectNum[l] == 176 && flags[29] == 1) { flags[29] = 0; - removeObject(23); - addObject(11); + removeObject(kItemEarWithEarPlug); + addObject(kItemEarplugs); } clearRoom(); sscanf(_targetSurface[l], "%d", &roomNum); @@ -3302,18 +3303,18 @@ void DrasculaEngine::response(int function) { } } -void DrasculaEngine::addObject(int osj) { +void DrasculaEngine::addObject(int obj) { int h, position = 0; for (h = 1; h < 43; h++) { - if (inventoryObjects[h] == osj) + if (inventoryObjects[h] == obj) position = 1; } if (position == 0) { for (h = 1; h < 43; h++) { if (inventoryObjects[h] == 0) { - inventoryObjects[h] = osj; + inventoryObjects[h] = obj; position = 1; break; } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index f125bb399d..f8af3cb7d1 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -68,6 +68,38 @@ enum Verbs { kVerbMove = 6 }; +// Items up to chapter 3 +enum InventoryItems { + kItemMoney = 7, + kItemLeaves = 8, + kItemCross = 9, + kItemSpike = 10, + kItemEarplugs = 11, + kItemBook = 12, + kItemBubbleGum = 13, + kItemSickle = 14, + kItemTissues = 15, + kItemCigarettes = 16, + kItemCandle = 17, + kItemTwoCoins = 18, + kItemOneCoin = 19, + kItemReefer = 20, + kItemKey = 21, + kItemHandbag = 22, + kItemEarWithEarPlug = 23, + kItemPhone = 28 +}; + +// Items from chapter 4 onwards +enum InventoryItems2 { + kItemKey2 = 7, + kItemCross2 = 9, + kItemRope2 = 19, + kItemReefer2 = 20, + kItemOneCoin2 = 22, + kItemPhone2 = 28 +}; + enum Colors { kColorBrown = 1, kColorDarkBlue = 2, diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index c1100c1115..cf503b8010 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -269,7 +269,7 @@ void DrasculaEngine::room_5(int fl) { talk(14); else if (pickedObject == 10 && fl == 136) { animation_5_2(); - removeObject(10); + removeObject(kItemSpike); } else hasAnswer = 0; } @@ -374,7 +374,7 @@ void DrasculaEngine::room_9(int fl){ animation_33_2(); else if (pickedObject == 7 && fl == 51) { animation_6_2(); - removeObject(7); + removeObject(kItemMoney); pickObject(14);} else hasAnswer = 0; @@ -451,7 +451,7 @@ void DrasculaEngine::room_15(int fl) { talk(338); flags[27] = 0; pickObject(19); - removeObject(18); + removeObject(kItemTwoCoins); } else if (pickedObject == kVerbMove && fl == 188 && flags[27] == 0) { animation_34_2(); talk(339); @@ -519,7 +519,7 @@ void DrasculaEngine::room_17(int fl) { talk(347); flags[29] = 1; pickObject(23); - removeObject(11); + removeObject(kItemEarplugs); } else hasAnswer = 0; } @@ -564,7 +564,7 @@ void DrasculaEngine::room_18(int fl) { talk(347); flags[29] = 1; pickObject(23); - removeObject(11); + removeObject(kItemEarplugs); } else hasAnswer = 0; } @@ -1728,8 +1728,8 @@ bool DrasculaEngine::checkAction(int fl) { talk(164); flags[23] = 1; withoutVerb(); - addObject(7); - addObject(18); + addObject(kItemMoney); + addObject(kItemTwoCoins); } else if (pickedObject == kVerbLook && fl == 22 && flags[23] == 1) talk(307); else if (pickedObject == kVerbLook && fl == 28) -- cgit v1.2.3 From b9516aa80e21c4fd61cab13bba7b6170ffc1a523 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 5 Jun 2008 15:15:20 +0000 Subject: escoba -> runCurrentChapter svn-id: r32557 --- engines/drascula/drascula.cpp | 4 ++-- engines/drascula/drascula.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 0b22ba3170..f9ca3b4aa6 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -197,7 +197,7 @@ int DrasculaEngine::go() { strcpy(iconName[i + 1], _textverbs[_lang][i]); assignDefaultPalette(); - if (!escoba()) { + if (!runCurrentChapter()) { quitGame(); break; } @@ -399,7 +399,7 @@ void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int wi _system->updateScreen(); } -bool DrasculaEngine::escoba() { +bool DrasculaEngine::runCurrentChapter() { int n; if (_lang == kSpanish) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index f8af3cb7d1..76b3c5c966 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -336,7 +336,7 @@ public: int leftMouseButton; int rightMouseButton; - bool escoba(); + bool runCurrentChapter(); void black(); void pickObject(int); void walkUp(); -- cgit v1.2.3 From a921549370b89f9cdddb16b5727efe416015663f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 5 Jun 2008 19:04:58 +0000 Subject: Pendulum room is room #102 svn-id: r32558 --- engines/drascula/drascula.h | 4 ++-- engines/drascula/rooms.cpp | 12 ++++++------ engines/drascula/staticdata.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 76b3c5c966..f93d788fd8 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -477,8 +477,6 @@ public: void converse(int); void print_abc_opc(const char *, int, int, int); void response(int); - void room_pendulum(int); - void update_pendulum(); void activatePendulum(); void MusicFadeout(); @@ -533,6 +531,7 @@ public: void room_61(int); void room_62(int); void room_63(int); + void room_102(int); void animation_1_1(); void animation_2_1(); @@ -683,6 +682,7 @@ public: void update_62(); void update_62_pre(); void update_63(); + void update_102(); private: int _lang; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index cf503b8010..a3eaa13d5a 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -95,6 +95,7 @@ void DrasculaEngine::setupRoomsTable() { ROOM(room_61); ROOM(room_62); ROOM(room_63); + ROOM(room_102); PREUPDATEROOM(update_1_pre); PREUPDATEROOM(update_3_pre); @@ -149,6 +150,7 @@ void DrasculaEngine::setupRoomsTable() { UPDATEROOM(update_61); UPDATEROOM(update_62); UPDATEROOM(update_63); + UPDATEROOM(update_102); } bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int actionCount, int fl) { @@ -1075,8 +1077,8 @@ void DrasculaEngine::room_63(int fl) { hasAnswer = 0; } -void DrasculaEngine::room_pendulum(int fl) { - if (roomParse(roomPendulumActions, ARRAYSIZE(roomPendulumActions), fl)) +void DrasculaEngine::room_102(int fl) { + if (roomParse(room102Actions, ARRAYSIZE(room102Actions), fl)) return; if (pickedObject == kVerbPick && fl == 101) @@ -1121,8 +1123,6 @@ void DrasculaEngine::updateRefresh_pre() { if (currentChapter == 1 && roomNumber == 16) placeBJ(); - else if (roomNumber == 102) - update_pendulum(); } void DrasculaEngine::update_1_pre() { @@ -1681,7 +1681,7 @@ void DrasculaEngine::update_63() { copyRect(1, 154, 83, 122, 131, 44, drawSurface3, screenSurface); } -void DrasculaEngine::update_pendulum() { +void DrasculaEngine::update_102() { int pendulum_x[] = {40, 96, 152, 208, 264, 40, 96, 152, 208, 208, 152, 264, 40, 96, 152, 208, 264}; int difference; @@ -2031,7 +2031,7 @@ bool DrasculaEngine::checkAction(int fl) { else if (pickedObject == kVerbTalk && fl == 50) talk(314); else if (roomNumber == 102) - room_pendulum(fl); + room_102(fl); else if (roomNumber == 60) { if (room_60(fl)) return true; diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index af899f441f..df4ad18556 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -511,7 +511,7 @@ RoomTalkAction room63Actions[] = { { -1, kVerbTalk, 108, 333} }; -RoomTalkAction roomPendulumActions[] = { +RoomTalkAction room102Actions[] = { // num action object speech { -1, kVerbLook, 100, 452}, // ---------------------------------- -- cgit v1.2.3 From 9cbf46a7a42f0f71797856dcbcf987ef11ae6723 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 5 Jun 2008 19:29:30 +0000 Subject: Merged all roomXXActions into single array. Thus simplified room parsers. svn-id: r32559 --- engines/drascula/drascula.h | 3 +- engines/drascula/rooms.cpp | 141 ++--------- engines/drascula/staticdata.h | 548 +++++++++++++++++------------------------- 3 files changed, 250 insertions(+), 442 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index f93d788fd8..cbc1d0b442 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -137,6 +137,7 @@ enum IgorTalkerTypes { struct DrasculaGameDescription; struct RoomTalkAction { + int room; int chapter; int action; int objectID; @@ -473,7 +474,7 @@ public: int whichObject(); bool checkMenuFlags(); void setupRoomsTable(); - bool roomParse(RoomTalkAction*, int, int); + bool roomParse(int, int); void converse(int); void print_abc_opc(const char *, int, int, int); void response(int); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index a3eaa13d5a..6f4dd821fe 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -153,17 +153,19 @@ void DrasculaEngine::setupRoomsTable() { UPDATEROOM(update_102); } -bool DrasculaEngine::roomParse(RoomTalkAction* roomActions, int actionCount, int fl) { - for (int i = 0; i < actionCount; i++) { - if (roomActions[i].chapter == currentChapter || - roomActions[i].chapter == -1) { - if (roomActions[i].action == pickedObject || - roomActions[i].action == kVerbDefault) { - if (roomActions[i].objectID == fl || - roomActions[i].objectID == -1) { - talk(roomActions[i].speechID); - hasAnswer = 1; - return true; +bool DrasculaEngine::roomParse(int room, int fl) { + for (int i = 0; i < ARRAYSIZE(roomActions); i++) { + if (roomActions[i].room == room) { + if (roomActions[i].chapter == currentChapter || + roomActions[i].chapter == -1) { + if (roomActions[i].action == pickedObject || + roomActions[i].action == kVerbDefault) { + if (roomActions[i].objectID == fl || + roomActions[i].objectID == -1) { + talk(roomActions[i].speechID); + hasAnswer = 1; + return true; + } } } } @@ -176,9 +178,6 @@ void DrasculaEngine::room_0() { static const int lookExcuses[3] = {100, 101, 54}; static const int actionExcuses[6] = {11, 109, 111, 110, 115, 116}; - if (roomParse(room0Actions, ARRAYSIZE(room0Actions), -1)) - return; - // non-default actions if (currentChapter == 2 || currentChapter == 4 || currentChapter == 5 || currentChapter == 6) { @@ -197,9 +196,6 @@ void DrasculaEngine::room_0() { } void DrasculaEngine::room_1(int fl) { - if (roomParse(room1Actions, ARRAYSIZE(room1Actions), fl)) - return; - if (pickedObject == kVerbLook && fl == 118) { talk(1); pause(10); @@ -211,9 +207,6 @@ void DrasculaEngine::room_1(int fl) { } void DrasculaEngine::room_3(int fl) { - if (roomParse(room3Actions, ARRAYSIZE(room3Actions), fl)) - return; - if (pickedObject == kVerbTalk && fl == 129) { talk(23); pause(6); @@ -250,9 +243,6 @@ void DrasculaEngine::room_3(int fl) { } void DrasculaEngine::room_4(int fl) { - if (roomParse(room4Actions, ARRAYSIZE(room4Actions), fl)) - return; - if (pickedObject == kVerbMove && fl == 189 && flags[34] == 0) { talk(327); pickObject(13); @@ -264,9 +254,6 @@ void DrasculaEngine::room_4(int fl) { } void DrasculaEngine::room_5(int fl) { - if (roomParse(room5Actions, ARRAYSIZE(room5Actions), fl)) - return; - if (pickedObject == kVerbLook && fl == 136 && flags[8] == 0) talk(14); else if (pickedObject == 10 && fl == 136) { @@ -277,9 +264,6 @@ void DrasculaEngine::room_5(int fl) { } void DrasculaEngine::room_6(int fl){ - if (roomParse(room6Actions, ARRAYSIZE(room6Actions), fl)) - return; - if (pickedObject == kVerbLook && fl==144) { talk(41); talk(42); @@ -338,9 +322,6 @@ void DrasculaEngine::room_6(int fl){ } void DrasculaEngine::room_7(int fl){ - if (roomParse(room7Actions, ARRAYSIZE(room7Actions), fl)) - return; - if (pickedObject == kVerbPick && fl == 190) { pickObject(17); flags[35] = 1; @@ -367,9 +348,6 @@ void DrasculaEngine::room_8(int fl) { } void DrasculaEngine::room_9(int fl){ - if (roomParse(room9Actions, ARRAYSIZE(room9Actions), fl)) - return; - if (pickedObject == kVerbTalk && fl == 51 && flags[4] == 0) animation_4_2(); else if (pickedObject == kVerbTalk && fl == 51 && flags[4] == 1) @@ -383,9 +361,6 @@ void DrasculaEngine::room_9(int fl){ } void DrasculaEngine::room_12(int fl){ - if (roomParse(room12Actions, ARRAYSIZE(room12Actions), fl)) - return; - if (pickedObject == kVerbOpen && fl == 156) openDoor(16, 4); else if (pickedObject == kVerbClose && fl == 156) @@ -413,9 +388,6 @@ bool DrasculaEngine::room_13(int fl) { } void DrasculaEngine::room_14(int fl) { - if (roomParse(room14Actions, ARRAYSIZE(room14Actions), fl)) - return; - if (pickedObject == kVerbTalk && fl == 54 && flags[39] == 0) animation_12_2(); else if (pickedObject == kVerbTalk && fl == 54 && flags[39] == 1) @@ -433,9 +405,6 @@ void DrasculaEngine::room_14(int fl) { } void DrasculaEngine::room_15(int fl) { - if (roomParse(room15Actions, ARRAYSIZE(room15Actions), fl)) - return; - if (pickedObject == 19 && fl == 188 && flags[27] == 0) talk(335); else if (pickedObject == 19 && fl == 188 && flags[27] == 1) { @@ -467,9 +436,6 @@ void DrasculaEngine::room_15(int fl) { } void DrasculaEngine::room_16(int fl) { - if (roomParse(room16Actions, ARRAYSIZE(room16Actions), fl)) - return; - if (pickedObject == kVerbOpen && fl == 163) openDoor(17, 0); else if (pickedObject == kVerbClose && fl == 163) @@ -527,9 +493,6 @@ void DrasculaEngine::room_17(int fl) { } void DrasculaEngine::room_18(int fl) { - if (roomParse(room18Actions, ARRAYSIZE(room18Actions), fl)) - return; - if (pickedObject == kVerbTalk && fl == 55 && flags[36] == 0) animation_24_2(); else if (pickedObject == kVerbTalk && fl == 55 && flags[36] == 1) @@ -572,9 +535,6 @@ void DrasculaEngine::room_18(int fl) { } void DrasculaEngine::room_19(int fl) { - if (roomParse(room19Actions, ARRAYSIZE(room19Actions), fl)) - return; - hasAnswer = 0; } @@ -603,9 +563,6 @@ bool DrasculaEngine::room_21(int fl) { } void DrasculaEngine::room_22(int fl) { - if (roomParse(room22Actions, ARRAYSIZE(room22Actions), fl)) - return; - if (pickedObject == 11 && fl == 140) { pickObject(18); visible[1] = 0; @@ -656,9 +613,6 @@ void DrasculaEngine::room_23(int fl) { } void DrasculaEngine::room_24(int fl) { - if (roomParse(room24Actions, ARRAYSIZE(room24Actions), fl)) - return; - if (pickedObject == kVerbOpen && fl == 105) openDoor(1, 0); else if (pickedObject == kVerbClose && fl == 105) @@ -672,9 +626,6 @@ void DrasculaEngine::room_24(int fl) { } void DrasculaEngine::room_26(int fl) { - if (roomParse(room26Actions, ARRAYSIZE(room26Actions), fl)) - return; - if (pickedObject == kVerbOpen && fl == 107 && flags[30] == 0) openDoor(2, 0); else if (pickedObject == kVerbOpen && fl == 107 && flags[30] == 1) @@ -735,9 +686,6 @@ void DrasculaEngine::room_27(int fl) { } void DrasculaEngine::room_29(int fl) { - if (roomParse(room29Actions, ARRAYSIZE(room29Actions), fl)) - return; - if (pickedObject == kVerbOpen && fl == 114) openDoor(4, 1); else if (pickedObject == kVerbClose && fl == 114) @@ -747,9 +695,6 @@ void DrasculaEngine::room_29(int fl) { } void DrasculaEngine::room_30(int fl) { - if (roomParse(room30Actions, ARRAYSIZE(room30Actions), fl)) - return; - if (pickedObject == kVerbOpen && fl == 115) openDoor(4, 0); else if (pickedObject == kVerbClose && fl == 115) @@ -777,9 +722,6 @@ void DrasculaEngine::room_30(int fl) { } void DrasculaEngine::room_31(int fl) { - if (roomParse(room31Actions, ARRAYSIZE(room31Actions), fl)) - return; - if (pickedObject == kVerbPick && fl == 145) { pickObject(11); visible[1] = 0; @@ -793,9 +735,6 @@ void DrasculaEngine::room_31(int fl) { } void DrasculaEngine::room_34(int fl) { - if (roomParse(room34Actions, ARRAYSIZE(room34Actions), fl)) - return; - if (pickedObject == kVerbMove && fl == 146) animation_8_4(); else if (pickedObject == kVerbOpen && fl == 120 && flags[25] == 1) @@ -837,16 +776,10 @@ void DrasculaEngine::room_35(int fl) { } void DrasculaEngine::room_44(int fl) { - if (roomParse(room44Actions, ARRAYSIZE(room44Actions), fl)) - return; - hasAnswer = 0; } void DrasculaEngine::room_49(int fl){ - if (roomParse(room49Actions, ARRAYSIZE(room49Actions), fl)) - return; - if (pickedObject == kVerbTalk && fl ==51) converse(9); else if ((pickedObject == 8 && fl == 51) || (pickedObject == 8 && fl == 203)) @@ -856,9 +789,6 @@ void DrasculaEngine::room_49(int fl){ } void DrasculaEngine::room_53(int fl) { - if (roomParse(room53Actions, ARRAYSIZE(room53Actions), fl)) - return; - if (pickedObject == kVerbPick && fl == 120) { pickObject(16); visible[3] = 0; @@ -881,9 +811,6 @@ void DrasculaEngine::room_53(int fl) { } void DrasculaEngine::room_54(int fl) { - if (roomParse(room54Actions, ARRAYSIZE(room54Actions), fl)) - return; - if ((pickedObject == kVerbTalk && fl == 118) || (pickedObject == kVerbLook && fl == 118 && flags[0] == 0)) animation_1_5(); else if (pickedObject == kVerbLook && fl == 118 && flags[0]==1) @@ -916,9 +843,6 @@ void DrasculaEngine::room_54(int fl) { } void DrasculaEngine::room_55(int fl) { - if (roomParse(room55Actions, ARRAYSIZE(room55Actions), fl)) - return; - if (pickedObject == kVerbPick && fl == 122) { pickObject(12); flags[8] = 1; @@ -933,9 +857,6 @@ void DrasculaEngine::room_55(int fl) { } bool DrasculaEngine::room_56(int fl) { - if (roomParse(room56Actions, ARRAYSIZE(room56Actions), fl)) - return false; - if (pickedObject == kVerbOpen && fl == 124) { animation_14_5(); return true; @@ -946,9 +867,6 @@ bool DrasculaEngine::room_56(int fl) { } void DrasculaEngine::room_58(int fl) { - if (roomParse(room58Actions, ARRAYSIZE(room58Actions), fl)) - return; - if (pickedObject == kVerbMove && fl == 103) animation_7_6(); else @@ -1022,9 +940,6 @@ void DrasculaEngine::room_59(int fl) { } bool DrasculaEngine::room_60(int fl) { - if (roomParse(room60Actions, ARRAYSIZE(room60Actions), fl)) - return false; - if (pickedObject == kVerbMove && fl == 112) animation_10_6(); else if (pickedObject == kVerbTalk && fl == 52) { @@ -1048,16 +963,10 @@ bool DrasculaEngine::room_60(int fl) { } void DrasculaEngine::room_61(int fl) { - if (roomParse(room61Actions, ARRAYSIZE(room61Actions), fl)) - return; - hasAnswer = 0; } void DrasculaEngine::room_62(int fl) { - if (roomParse(room62Actions, ARRAYSIZE(room62Actions), fl)) - return; - if (pickedObject == kVerbTalk && fl == 53) converse(13); else if (pickedObject == kVerbTalk && fl == 52 && flags[0] == 0) @@ -1071,16 +980,10 @@ void DrasculaEngine::room_62(int fl) { } void DrasculaEngine::room_63(int fl) { - if (roomParse(room63Actions, ARRAYSIZE(room63Actions), fl)) - return; - hasAnswer = 0; } void DrasculaEngine::room_102(int fl) { - if (roomParse(room102Actions, ARRAYSIZE(room102Actions), fl)) - return; - if (pickedObject == kVerbPick && fl == 101) pickObject(20); else if (pickedObject == 20 && fl == 100) @@ -2044,14 +1947,16 @@ bool DrasculaEngine::checkAction(int fl) { if (hasAnswer == 0) { hasAnswer = 1; - // Call room-specific parser - char rm[20]; - sprintf(rm, "room_%d", roomNumber); - for (uint i = 0; i < _roomParsers.size(); i++) { - if (!strcmp(rm, _roomParsers[i]->desc)) { - debug(4, "Calling room parser %d", roomNumber); - (this->*(_roomParsers[i]->proc))(fl); - break; + if (!roomParse(roomNumber, fl)) { + // Call room-specific parser + char rm[20]; + sprintf(rm, "room_%d", roomNumber); + for (uint i = 0; i < _roomParsers.size(); i++) { + if (!strcmp(rm, _roomParsers[i]->desc)) { + debug(4, "Calling room parser %d", roomNumber); + (this->*(_roomParsers[i]->proc))(fl); + break; + } } } } diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index df4ad18556..fb3d966ec3 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -127,395 +127,297 @@ int frame_x[20] = {43, 87, 130, 173, 216, 259}; // Note: default action needs to be LAST for each group // of actions with the same number -RoomTalkAction room0Actions[] = { - // num action object speech - { 1, kVerbLook, -1, 54 }, - { 1, kVerbMove, -1, 19 }, - { 1, kVerbPick, -1, 11 }, - { 1, kVerbOpen, -1, 9 }, - { 1, kVerbClose, -1, 9 }, - { 1, kVerbTalk, -1, 16 }, - { 1, kVerbDefault, -1, 11 }, +RoomTalkAction roomActions[] = { + //room num action object speech + { 0, 1, kVerbLook, -1, 54 }, + { 0, 1, kVerbMove, -1, 19 }, + { 0, 1, kVerbPick, -1, 11 }, + { 0, 1, kVerbOpen, -1, 9 }, + { 0, 1, kVerbClose, -1, 9 }, + { 0, 1, kVerbTalk, -1, 16 }, + { 0, 1, kVerbDefault, -1, 11 }, // ---------------------------------- - { 2, kVerbMove, -1, 19 }, - { 2, kVerbOpen, -1, 9 }, - { 2, kVerbClose, -1, 9 }, - { 2, kVerbTalk, -1, 16 }, + { 0, 2, kVerbMove, -1, 19 }, + { 0, 2, kVerbOpen, -1, 9 }, + { 0, 2, kVerbClose, -1, 9 }, + { 0, 2, kVerbTalk, -1, 16 }, // ---------------------------------- - { 3, kVerbLook, -1, 316 }, - { 3, kVerbMove, -1, 317 }, - { 3, kVerbPick, -1, 318 }, - { 3, kVerbOpen, -1, 319 }, - { 3, kVerbClose, -1, 319 }, - { 3, kVerbTalk, -1, 320 }, - { 3, kVerbDefault, -1, 318 }, + { 0, 3, kVerbLook, -1, 316 }, + { 0, 3, kVerbMove, -1, 317 }, + { 0, 3, kVerbPick, -1, 318 }, + { 0, 3, kVerbOpen, -1, 319 }, + { 0, 3, kVerbClose, -1, 319 }, + { 0, 3, kVerbTalk, -1, 320 }, + { 0, 3, kVerbDefault, -1, 318 }, // ---------------------------------- - { 4, kVerbMove, -1, 19 }, - { 4, kVerbOpen, -1, 9 }, - { 4, kVerbClose, -1, 9 }, - { 4, kVerbTalk, -1, 16 }, + { 0, 4, kVerbMove, -1, 19 }, + { 0, 4, kVerbOpen, -1, 9 }, + { 0, 4, kVerbClose, -1, 9 }, + { 0, 4, kVerbTalk, -1, 16 }, // ---------------------------------- - { 5, kVerbOpen, -1, 9 }, - { 5, kVerbClose, -1, 9 }, - { 5, kVerbTalk, -1, 16 }, + { 0, 5, kVerbOpen, -1, 9 }, + { 0, 5, kVerbClose, -1, 9 }, + { 0, 5, kVerbTalk, -1, 16 }, // ---------------------------------- - { 6, kVerbMove, -1, 19 }, - { 6, kVerbOpen, -1, 9 }, - { 6, kVerbClose, -1, 9 }, - { 6, kVerbTalk, -1, 16 } -}; - -RoomTalkAction room1Actions[] = { - // num action object speech - { -1, kVerbPick, 118, 5 }, - { -1, kVerbOpen, 118, 3 }, - { -1, kVerbClose, 118, 4 }, - { -1, kVerbTalk, 118, 6 }, + { 0, 6, kVerbMove, -1, 19 }, + { 0, 6, kVerbOpen, -1, 9 }, + { 0, 6, kVerbClose, -1, 9 }, + { 0, 6, kVerbTalk, -1, 16 }, + // ================================== + { 1, -1, kVerbPick, 118, 5 }, + { 1, -1, kVerbOpen, 118, 3 }, + { 1, -1, kVerbClose, 118, 4 }, + { 1, -1, kVerbTalk, 118, 6 }, // ---------------------------------- - { -1, kVerbLook, 119, 8 }, - { -1, kVerbMove, 119, 13 }, - { -1, kVerbClose, 119, 10 }, - { -1, kVerbTalk, 119, 12 }, + { 1, -1, kVerbLook, 119, 8 }, + { 1, -1, kVerbMove, 119, 13 }, + { 1, -1, kVerbClose, 119, 10 }, + { 1, -1, kVerbTalk, 119, 12 }, // ---------------------------------- - { -1, kVerbMove, 120, 13 }, - { -1, kVerbOpen, 120, 18 }, - { -1, kVerbTalk, 120, 15 } -}; - -RoomTalkAction room3Actions[] = { - // num action object speech - { -1, kVerbLook, 129, 21 }, - { -1, kVerbPick, 129, 5 }, - { -1, kVerbMove, 129, 24 }, - { -1, kVerbOpen, 129, 22 }, - { -1, kVerbClose, 129, 10 }, + { 1, -1, kVerbMove, 120, 13 }, + { 1, -1, kVerbOpen, 120, 18 }, + { 1, -1, kVerbTalk, 120, 15 }, + // ================================== + { 3, -1, kVerbLook, 129, 21 }, + { 3, -1, kVerbPick, 129, 5 }, + { 3, -1, kVerbMove, 129, 24 }, + { 3, -1, kVerbOpen, 129, 22 }, + { 3, -1, kVerbClose, 129, 10 }, // ---------------------------------- - { -1, kVerbLook, 131, 27 }, - { -1, kVerbPick, 131, 5 }, - { -1, kVerbMove, 131, 24 }, - { -1, kVerbOpen, 131, 22 }, - { -1, kVerbClose, 131, 10 }, - { -1, kVerbTalk, 131, 23 }, + { 3, -1, kVerbLook, 131, 27 }, + { 3, -1, kVerbPick, 131, 5 }, + { 3, -1, kVerbMove, 131, 24 }, + { 3, -1, kVerbOpen, 131, 22 }, + { 3, -1, kVerbClose, 131, 10 }, + { 3, -1, kVerbTalk, 131, 23 }, // ---------------------------------- - { -1, kVerbLook, 132, 28 }, - { -1, kVerbPick, 132, 5 }, - { -1, kVerbMove, 132, 24 }, - { -1, kVerbOpen, 132, 22 }, - { -1, kVerbClose, 132, 10 }, - { -1, kVerbTalk, 132, 23 }, + { 3, -1, kVerbLook, 132, 28 }, + { 3, -1, kVerbPick, 132, 5 }, + { 3, -1, kVerbMove, 132, 24 }, + { 3, -1, kVerbOpen, 132, 22 }, + { 3, -1, kVerbClose, 132, 10 }, + { 3, -1, kVerbTalk, 132, 23 }, // ---------------------------------- - { -1, kVerbLook, 133, 321 }, - { -1, kVerbPick, 133, 31 }, - { -1, kVerbMove, 133, 34 }, - { -1, kVerbOpen, 133, 30 }, - { -1, kVerbClose, 133, 10 }, + { 3, -1, kVerbLook, 133, 321 }, + { 3, -1, kVerbPick, 133, 31 }, + { 3, -1, kVerbMove, 133, 34 }, + { 3, -1, kVerbOpen, 133, 30 }, + { 3, -1, kVerbClose, 133, 10 }, // ---------------------------------- - { -1, kVerbLook, 166, 55 }, - { -1, kVerbPick, 166, 7 }, + { 3, -1, kVerbLook, 166, 55 }, + { 3, -1, kVerbPick, 166, 7 }, // ---------------------------------- - { -1, kVerbLook, 211, 184 } -}; - -RoomTalkAction room4Actions[] = { - // num action object speech - { -1, kVerbLook, 189, 182 }, + { 3, -1, kVerbLook, 211, 184 }, + // ================================== + { 4, -1, kVerbLook, 189, 182 }, // ---------------------------------- - { -1, kVerbLook, 207, 175 }, - { -1, kVerbTalk, 207, 176 }, + { 4, -1, kVerbLook, 207, 175 }, + { 4, -1, kVerbTalk, 207, 176 }, // ---------------------------------- - { -1, kVerbLook, 208, 177 }, + { 4, -1, kVerbLook, 208, 177 }, // ---------------------------------- - { -1, kVerbLook, 209, 179 }, + { 4, -1, kVerbLook, 209, 179 }, // ---------------------------------- - { -1, kVerbLook, 210, 180 }, - { -1, kVerbOpen, 210, 181 } -}; - -RoomTalkAction room5Actions[] = { - // num action object speech - { -1, kVerbMove, 136, 13 }, - { -1, kVerbOpen, 136, 18 }, - { -1, kVerbTalk, 136, 15 }, + { 4, -1, kVerbLook, 210, 180 }, + { 4, -1, kVerbOpen, 210, 181 }, + // ================================== + { 5, -1, kVerbMove, 136, 13 }, + { 5, -1, kVerbOpen, 136, 18 }, + { 5, -1, kVerbTalk, 136, 15 }, // ---------------------------------- - { -1, kVerbLook, 212, 187 }, - { -1, kVerbTalk, 212, 188 }, + { 5, -1, kVerbLook, 212, 187 }, + { 5, -1, kVerbTalk, 212, 188 }, // ---------------------------------- - { -1, kVerbLook, 213, 189 }, - { -1, kVerbOpen, 213, 190 } -}; - -RoomTalkAction room6Actions[] = { - // num action object speech - { -1, kVerbPick, 144, 43 }, + { 5, -1, kVerbLook, 213, 189 }, + { 5, -1, kVerbOpen, 213, 190 }, + // ================================== + { 6, -1, kVerbPick, 144, 43 }, // ---------------------------------- - { -1, kVerbLook, 138, 35 }, - { -1, kVerbTalk, 138, 6 }, + { 6, -1, kVerbLook, 138, 35 }, + { 6, -1, kVerbTalk, 138, 6 }, // ---------------------------------- - { -1, kVerbLook, 143, 37 }, - { -1, kVerbPick, 143, 7 }, - { -1, kVerbMove, 143, 7 }, - { -1, kVerbTalk, 143, 38 }, + { 6, -1, kVerbLook, 143, 37 }, + { 6, -1, kVerbPick, 143, 7 }, + { 6, -1, kVerbMove, 143, 7 }, + { 6, -1, kVerbTalk, 143, 38 }, // ---------------------------------- - { -1, kVerbLook, 139, 36 }, + { 6, -1, kVerbLook, 139, 36 }, // ---------------------------------- - { -1, kVerbLook, 140, 147 } -}; - -RoomTalkAction room7Actions[] = { - // num action object speech - { -1, kVerbLook, 164, 35 }, + { 6, -1, kVerbLook, 140, 147 }, + // ================================== + { 7, -1, kVerbLook, 164, 35 }, // ---------------------------------- - { -1, kVerbLook, 169, 44 } -}; - -RoomTalkAction room9Actions[] = { - // num action object speech - { -1, kVerbLook, 150, 35 }, - { -1, kVerbTalk, 150, 6 }, + { 7, -1, kVerbLook, 169, 44 }, + // ================================== + { 9, -1, kVerbLook, 150, 35 }, + { 9, -1, kVerbTalk, 150, 6 }, // ---------------------------------- - { -1, kVerbLook, 51, 60 }, -}; - -RoomTalkAction room12Actions[] = { - // num action object speech - { -1, kVerbLook, 154, 329 }, - { -1, kVerbTalk, 154, 330 }, + { 9, -1, kVerbLook, 51, 60 }, + // ================================== + { 12, -1, kVerbLook, 154, 329 }, + { 12, -1, kVerbTalk, 154, 330 }, // ---------------------------------- - { -1, kVerbMove, 155, 48 }, - { -1, kVerbTalk, 155, 331 }, + { 12, -1, kVerbMove, 155, 48 }, + { 12, -1, kVerbTalk, 155, 331 }, // ---------------------------------- - { -1, kVerbLook, 156, 35 }, - { -1, kVerbMove, 156, 48 }, - { -1, kVerbTalk, 156, 50 } -}; - -RoomTalkAction room14Actions[] = { - // num action object speech - { -1, kVerbLook, 200, 165 }, + { 12, -1, kVerbLook, 156, 35 }, + { 12, -1, kVerbMove, 156, 48 }, + { 12, -1, kVerbTalk, 156, 50 }, + // ================================== + { 14, -1, kVerbLook, 200, 165 }, // ---------------------------------- - { -1, kVerbLook, 201, 166 }, + { 14, -1, kVerbLook, 201, 166 }, // ---------------------------------- - { -1, kVerbLook, 202, 167 }, + { 14, -1, kVerbLook, 202, 167 }, // ---------------------------------- - { -1, kVerbLook, 203, 168 }, - { -1, kVerbPick, 203, 170 }, - { -1, kVerbMove, 203, 170 }, - { -1, kVerbTalk, 203, 169 }, + { 14, -1, kVerbLook, 203, 168 }, + { 14, -1, kVerbPick, 203, 170 }, + { 14, -1, kVerbMove, 203, 170 }, + { 14, -1, kVerbTalk, 203, 169 }, // ---------------------------------- - { -1, kVerbLook, 204, 171 } -}; - -RoomTalkAction room15Actions[] = { - // num action object speech - { -1, kVerbTalk, 188, 333 }, - { -1, kVerbLook, 188, 334 }, + { 14, -1, kVerbLook, 204, 171 }, + // ================================== + { 15, -1, kVerbTalk, 188, 333 }, + { 15, -1, kVerbLook, 188, 334 }, // ---------------------------------- - { -1, kVerbLook, 205, 172 }, + { 15, -1, kVerbLook, 205, 172 }, // ---------------------------------- - { -1, kVerbLook, 206, 173 }, - { -1, kVerbMove, 206, 174 }, - { -1, kVerbOpen, 206, 174 } -}; - -RoomTalkAction room16Actions[] = { - // num action object speech - { -1, kVerbTalk, 163, 6 }, + { 15, -1, kVerbLook, 206, 173 }, + { 15, -1, kVerbMove, 206, 174 }, + { 15, -1, kVerbOpen, 206, 174 }, + // ================================== + { 16, -1, kVerbTalk, 163, 6 }, // ---------------------------------- - { -1, kVerbLook, 183, 340 }, + { 16, -1, kVerbLook, 183, 340 }, // ---------------------------------- - { -1, kVerbLook, 185, 37 }, - { -1, kVerbPick, 185, 7 }, - { -1, kVerbMove, 185, 7 }, - { -1, kVerbTalk, 185, 38 }, + { 16, -1, kVerbLook, 185, 37 }, + { 16, -1, kVerbPick, 185, 7 }, + { 16, -1, kVerbMove, 185, 7 }, + { 16, -1, kVerbTalk, 185, 38 }, // ---------------------------------- - { -1, kVerbTalk, 187, 345 } -}; - -RoomTalkAction room18Actions[] = { - // num action object speech - { -1, kVerbLook, 181, 348 }, + { 16, -1, kVerbTalk, 187, 345 }, + // ================================== + { 18, -1, kVerbLook, 181, 348 }, // ---------------------------------- - { -1, kVerbLook, 182, 154 } -}; - -RoomTalkAction room19Actions[] = { - // num action object speech - { -1, kVerbLook, 214, 191 } -}; - -RoomTalkAction room22Actions[] = { - // num action object speech - { -1, kVerbPick, 140, 7 }, + { 18, -1, kVerbLook, 182, 154 }, + // ================================== + { 19, -1, kVerbLook, 214, 191 }, + // ================================== + { 22, -1, kVerbPick, 140, 7 }, // ---------------------------------- - { -1, kVerbLook, 52, 497 }, - { -1, kVerbTalk, 52, 498 } -}; - -RoomTalkAction room24Actions[] = { - // num action object speech - { -1, kVerbLook, 151, 461 } -}; - -RoomTalkAction room26Actions[] = { - // num action object speech - { -1, kVerbOpen, 167, 467 }, + { 22, -1, kVerbLook, 52, 497 }, + { 22, -1, kVerbTalk, 52, 498 }, + // ================================== + { 24, -1, kVerbLook, 151, 461 }, + // ================================== + { 26, -1, kVerbOpen, 167, 467 }, // ---------------------------------- - { -1, kVerbLook, 164, 470 }, - { -1, kVerbOpen, 164, 471 }, + { 26, -1, kVerbLook, 164, 470 }, + { 26, -1, kVerbOpen, 164, 471 }, // ---------------------------------- - { -1, kVerbLook, 163, 472 }, - { -1, kVerbPick, 163, 473 }, + { 26, -1, kVerbLook, 163, 472 }, + { 26, -1, kVerbPick, 163, 473 }, // ---------------------------------- - { -1, kVerbLook, 165, 474 }, + { 26, -1, kVerbLook, 165, 474 }, // ---------------------------------- - { -1, kVerbLook, 168, 476 }, - { -1, kVerbPick, 168, 477 } -}; - -RoomTalkAction room29Actions[] = { - // num action object speech - { -1, kVerbLook, 152, 463 }, - { -1, kVerbOpen, 152, 464 }, - // ---------------------------------- - { -1, kVerbLook, 153, 465 }, + { 26, -1, kVerbLook, 168, 476 }, + { 26, -1, kVerbPick, 168, 477 }, + // ================================== + { 29, -1, kVerbLook, 152, 463 }, + { 29, -1, kVerbOpen, 152, 464 }, // ---------------------------------- - { -1, kVerbPick, 154, 466 }, + { 29, -1, kVerbLook, 153, 465 }, // ---------------------------------- - { -1, kVerbOpen, 156, 467 } -}; - -RoomTalkAction room30Actions[] = { - // num action object speech - { -1, kVerbOpen, 157, 468 }, + { 29, -1, kVerbPick, 154, 466 }, // ---------------------------------- - { -1, kVerbLook, 158, 469 } -}; - -RoomTalkAction room31Actions[] = { - // num action object speech - { -1, kVerbLook, 161, 470 }, - { -1, kVerbOpen, 161, 471 } -}; - -RoomTalkAction room34Actions[] = { - // num action object speech - { -1, kVerbLook, 146, 458 }, - { -1, kVerbPick, 146, 459 } -}; - -RoomTalkAction room44Actions[] = { - // num action object speech - { -1, kVerbLook, 172, 428 } -}; - -RoomTalkAction room49Actions[] = { - // num action object speech - { -1, kVerbLook, 51, 132 }, + { 29, -1, kVerbOpen, 156, 467 }, + // ================================== + { 30, -1, kVerbOpen, 157, 468 }, // ---------------------------------- - { -1, kVerbLook, 200, 133 }, - { -1, kVerbTalk, 200, 134 }, + { 30, -1, kVerbLook, 158, 469 }, + // ================================== + { 31, -1, kVerbLook, 161, 470 }, + { 31, -1, kVerbOpen, 161, 471 }, + // ================================== + { 34, -1, kVerbLook, 146, 458 }, + { 34, -1, kVerbPick, 146, 459 }, + // ================================== + { 44, -1, kVerbLook, 172, 428 }, + // ================================== + { 49, -1, kVerbLook, 51, 132 }, // ---------------------------------- - { -1, kVerbLook, 201, 135 }, + { 49, -1, kVerbLook, 200, 133 }, + { 49, -1, kVerbTalk, 200, 134 }, // ---------------------------------- - { -1, kVerbLook, 203, 137 } -}; - -RoomTalkAction room53Actions[] = { - // num action object speech - { -1, kVerbLook, 121, 128 }, + { 49, -1, kVerbLook, 201, 135 }, // ---------------------------------- - { -1, kVerbLook, 209, 129 }, + { 49, -1, kVerbLook, 203, 137 }, + // ================================== + { 53, -1, kVerbLook, 121, 128 }, // ---------------------------------- - { -1, kVerbLook, 52, 447 }, - { -1, kVerbTalk, 52, 131 } -}; - -RoomTalkAction room54Actions[] = { - // num action object speech - { -1, kVerbLook, 53, 127 }, + { 53, -1, kVerbLook, 209, 129 }, // ---------------------------------- - { -1, kVerbOpen, 119, 125 }, - { -1, kVerbLook, 119, 126 } -}; - -RoomTalkAction room55Actions[] = { - // num action object speech - { -1, kVerbLook, 122, 138 }, + { 53, -1, kVerbLook, 52, 447 }, + { 53, -1, kVerbTalk, 52, 131 }, + // ================================== + { 54, -1, kVerbLook, 53, 127 }, // ---------------------------------- - { -1, kVerbLook, 204, 139 }, + { 54, -1, kVerbOpen, 119, 125 }, + { 54, -1, kVerbLook, 119, 126 }, + // ================================== + { 55, -1, kVerbLook, 122, 138 }, // ---------------------------------- - { -1, kVerbLook, 205, 140 } -}; - -RoomTalkAction room56Actions[] = { - // num action object speech - { -1, kVerbLook, 124, 450 }, + { 55, -1, kVerbLook, 204, 139 }, // ---------------------------------- - { -1, kVerbOpen, 207, 141 }, + { 55, -1, kVerbLook, 205, 140 }, + // ================================== + { 56, -1, kVerbLook, 124, 450 }, // ---------------------------------- - { -1, kVerbLook, 208, 142 } -}; - -RoomTalkAction room58Actions[] = { - // num action object speech - { -1, kVerbLook, 104, 454 } -}; - -RoomTalkAction room60Actions[] = { - // num action object speech - { -1, kVerbLook, 112, 440 }, + { 56, -1, kVerbOpen, 207, 141 }, // ---------------------------------- - { -1, kVerbTalk, 115, 455 }, + { 56, -1, kVerbLook, 208, 142 }, + // ================================== + { 58, -1, kVerbLook, 104, 454 }, + // ================================== + { 60, -1, kVerbLook, 112, 440 }, // ---------------------------------- - { -1, kVerbTalk, 56, 455 }, + { 60, -1, kVerbTalk, 115, 455 }, // ---------------------------------- - { -1, kVerbLook, 114, 167 }, + { 60, -1, kVerbTalk, 56, 455 }, // ---------------------------------- - { -1, kVerbLook, 113, 168 }, - { -1, kVerbPick, 113, 170 }, - { -1, kVerbMove, 113, 170 }, - { -1, kVerbTalk, 113, 169 } -}; - -RoomTalkAction room61Actions[] = { - // num action object speech - { -1, kVerbLook, 116, 172 }, + { 60, -1, kVerbLook, 114, 167 }, // ---------------------------------- - { -1, kVerbLook, 117, 173 }, + { 60, -1, kVerbLook, 113, 168 }, + { 60, -1, kVerbPick, 113, 170 }, + { 60, -1, kVerbMove, 113, 170 }, + { 60, -1, kVerbTalk, 113, 169 }, + // ================================== + { 61, -1, kVerbLook, 116, 172 }, // ---------------------------------- - { -1, kVerbMove, 117, 174 }, - { -1, kVerbOpen, 117, 174 }, -}; - -RoomTalkAction room62Actions[] = { - // num action object speech - { -1, kVerbLook, 100, 168}, - { -1, kVerbTalk, 100, 169}, - { -1, kVerbPick, 100, 170}, + { 61, -1, kVerbLook, 117, 173 }, // ---------------------------------- - { -1, kVerbLook, 101, 171}, + { 61, -1, kVerbMove, 117, 174 }, + { 61, -1, kVerbOpen, 117, 174 }, + { 62, -1, kVerbLook, 100, 168 }, + { 62, -1, kVerbTalk, 100, 169 }, + { 62, -1, kVerbPick, 100, 170 }, // ---------------------------------- - { -1, kVerbLook, 102, 167}, + { 62, -1, kVerbLook, 101, 171 }, // ---------------------------------- - { -1, kVerbLook, 103, 166} -}; - -RoomTalkAction room63Actions[] = { - // num action object speech - { -1, kVerbLook, 110, 172}, + { 62, -1, kVerbLook, 102, 167 }, // ---------------------------------- - { -1, kVerbLook, 109, 173}, - { -1, kVerbMove, 109, 174}, + { 62, -1, kVerbLook, 103, 166 }, + // ================================== + { 63, -1, kVerbLook, 110, 172 }, // ---------------------------------- - { -1, kVerbLook, 108, 334}, - { -1, kVerbTalk, 108, 333} -}; - -RoomTalkAction room102Actions[] = { - // num action object speech - { -1, kVerbLook, 100, 452}, + { 63, -1, kVerbLook, 109, 173 }, + { 63, -1, kVerbMove, 109, 174 }, // ---------------------------------- - { -1, kVerbLook, 101, 123} + { 63, -1, kVerbLook, 108, 334 }, + { 63, -1, kVerbTalk, 108, 333 }, + // ================================== + { 102, -1, kVerbLook, 100, 452 }, + { 102, -1, kVerbLook, 101, 123 }, }; const char *_text[][501] = { -- cgit v1.2.3 From 35cdc7aae478f55765bf213b0f929d0ba34cac8f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 5 Jun 2008 20:28:50 +0000 Subject: Converted most of checkAction() to pseudorooms 200 and 201, putting them into roomActions. svn-id: r32560 --- engines/drascula/rooms.cpp | 252 +++--------------------------------------- engines/drascula/staticdata.h | 122 ++++++++++++++++++++ 2 files changed, 140 insertions(+), 234 deletions(-) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 6f4dd821fe..ea6b7766e2 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1619,15 +1619,16 @@ bool DrasculaEngine::checkAction(int fl) { hasAnswer = 1; - if (menuScreen == 1) { + if (menuScreen == 1 && roomParse(200, fl)) { + ; + } else if (menuScreen != 1 && roomParse(201, fl)) { + ; + } else if (menuScreen == 1) { if (currentChapter == 1) { - if (pickedObject == kVerbLook && fl == 28) - talk(328); - else - hasAnswer = 0; + hasAnswer = 0; } else if (currentChapter == 2) { if ((pickedObject == kVerbLook && fl == 22 && flags[23] == 0) - || (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) { + || (pickedObject == kVerbOpen && fl == 22 && flags[23] == 0)) { talk(164); flags[23] = 1; withoutVerb(); @@ -1635,93 +1636,10 @@ bool DrasculaEngine::checkAction(int fl) { addObject(kItemTwoCoins); } else if (pickedObject == kVerbLook && fl == 22 && flags[23] == 1) talk(307); - else if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 7) - talk(143); - else if (pickedObject == kVerbTalk && fl == 7) - talk(144); - else if (pickedObject == kVerbLook && fl == 8) - talk(145); - else if (pickedObject == kVerbTalk && fl == 8) - talk(146); - else if (pickedObject == kVerbLook && fl == 9) - talk(147); - else if (pickedObject == kVerbTalk && fl == 9) - talk(148); - else if (pickedObject == kVerbLook && fl == 10) - talk(151); - else if (pickedObject == kVerbLook && fl == 11) - talk(152); - else if (pickedObject == kVerbTalk && fl == 11) - talk(153); - else if (pickedObject == kVerbLook && fl == 12) - talk(154); - else if (pickedObject == kVerbLook && fl == 13) - talk(155); - else if (pickedObject == kVerbLook && fl == 14) - talk(157); - else if (pickedObject == kVerbLook && fl == 15) - talk(58); - else if (pickedObject == kVerbLook && fl == 16) - talk(158); - else if (pickedObject == kVerbLook && fl == 17) - talk(159); - else if (pickedObject == kVerbLook && fl == 18) - talk(160); - else if (pickedObject == kVerbLook && fl == 19) - talk(161); - else if (pickedObject == kVerbLook && fl == 20) - talk(162); - else if (pickedObject == kVerbLook && fl == 23) - talk(152); else hasAnswer = 0; } else if (currentChapter == 3) { - if (pickedObject == kVerbLook && fl == 22) - talk(307); - else if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 7) - talk(143); - else if (pickedObject == kVerbTalk && fl == 7) - talk(144); - else if (pickedObject == kVerbLook && fl == 8) - talk(145); - else if (pickedObject == kVerbTalk && fl == 8) - talk(146); - else if (pickedObject == kVerbLook && fl == 9) - talk(147); - else if (pickedObject == kVerbTalk && fl == 9) - talk(148); - else if (pickedObject == kVerbLook && fl == 10) - talk(151); - else if (pickedObject == kVerbLook && fl == 11) - talk(152); - else if (pickedObject == kVerbTalk && fl == 11) - talk(153); - else if (pickedObject == kVerbLook && fl == 12) - talk(154); - else if (pickedObject == kVerbLook && fl == 13) - talk(155); - else if (pickedObject == kVerbLook && fl == 14) - talk(157); - else if (pickedObject == kVerbLook && fl == 15) - talk(58); - else if (pickedObject == kVerbLook && fl == 16) - talk(158); - else if (pickedObject == kVerbLook && fl == 17) - talk(159); - else if (pickedObject == kVerbLook && fl == 18) - talk(160); - else if (pickedObject == kVerbLook && fl == 19) - talk(161); - else if (pickedObject == kVerbLook && fl == 20) - talk(162); - else if (pickedObject == kVerbLook && fl == 23) - talk(152); - else - hasAnswer = 0; + hasAnswer = 0; } else if (currentChapter == 4) { if ((pickedObject == 18 && fl == 19) || (pickedObject == 19 && fl == 18)) { withoutVerb(); @@ -1730,120 +1648,33 @@ bool DrasculaEngine::checkAction(int fl) { removeObject(19); } else if ((pickedObject == 14 && fl == 19) || (pickedObject == 19 && fl == 14)) talk(484); - else if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 7) - talk(478); - else if (pickedObject == kVerbLook && fl == 8) - talk(480); else if (pickedObject == kVerbLook && fl == 9) { talk(482); talk(483); - } else if (pickedObject == kVerbLook && fl == 10) - talk(485); - else if (pickedObject == kVerbLook && fl == 11) - talk(488); - else if (pickedObject == kVerbLook && fl == 12) - talk(486); - else if (pickedObject == kVerbLook && fl == 13) - talk(490); - else if (pickedObject == kVerbLook && fl == 14) - talk(122); - else if (pickedObject == kVerbLook && fl == 15) - talk(117); - else if (pickedObject == kVerbTalk && fl == 15) - talk(118); - else if (pickedObject == kVerbOpen && fl == 15) - talk(119); - else if (pickedObject == kVerbLook && fl == 16) - talk(491); - else if (pickedObject == kVerbLook && fl == 17) - talk(478); - else if (pickedObject == kVerbLook && fl == 18) - talk(493); - else if (pickedObject == kVerbLook && fl == 19) { + } else if (pickedObject == kVerbLook && fl == 19) { talk(494); talk(495); - } else if (pickedObject == kVerbLook && fl == 20) - talk(162); - else if (pickedObject == kVerbLook && fl == 21) - talk(496); - else if (pickedObject == kVerbLook && fl == 22) - talk(161); - else + } else hasAnswer = 0; } else if (currentChapter == 5) { - if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 7) - talk(478); - else if (pickedObject == kVerbLook && fl == 8) - talk(120); - else if (pickedObject == kVerbLook && fl == 9) { + if (pickedObject == kVerbLook && fl == 9) { talk(482); talk(483); - } else if (pickedObject == kVerbLook && fl == 11) - talk(488); - else if (pickedObject == kVerbLook && fl == 13) - talk(490); - else if (pickedObject == kVerbLook && fl == 14) - talk(121); - else if (pickedObject == kVerbLook && fl == 15) - talk(117); - else if (pickedObject == kVerbTalk && fl == 15) - talk(118); - else if (pickedObject == kVerbOpen && fl == 15) - talk(119); - else if (pickedObject == kVerbLook && fl == 17) - talk(478); - else if (pickedObject == kVerbLook && fl == 20) - talk(162); - else + } else hasAnswer = 0; } else if (currentChapter == 6) { - if (pickedObject == kVerbLook && fl == 28) - talk(328); - else if (pickedObject == kVerbLook && fl == 9) { + if (pickedObject == kVerbLook && fl == 9) { talk(482); talk(483); - } else if (pickedObject == kVerbLook && fl == 20) - talk(123); - else if (pickedObject == kVerbLook && fl == 21) - talk(441); - else + } else hasAnswer = 0; } } else { if (currentChapter == 1) { - if (pickedObject == kVerbLook && fl == 50) - talk(308); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); - else - hasAnswer = 0; + hasAnswer = 0; } else if (currentChapter == 2) { - if (pickedObject == kVerbLook && fl == 50) - talk(308); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); // Note: the original check was strcmp(num_room, "18.alg") - else if (pickedObject == 11 && fl == 50 && flags[22] == 0 && roomNumber != 18) + if (pickedObject == 11 && fl == 50 && flags[22] == 0 && roomNumber != 18) talk(315); else if (pickedObject == 13 && fl == 50) talk(156); @@ -1852,19 +1683,7 @@ bool DrasculaEngine::checkAction(int fl) { else hasAnswer = 0; } else if (currentChapter == 3) { - if (pickedObject == kVerbLook && fl == 50) - talk(309); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); - else if (roomNumber == 13) { + if (roomNumber == 13) { if (room_13(fl)) return true; } else @@ -1872,18 +1691,6 @@ bool DrasculaEngine::checkAction(int fl) { } else if (currentChapter == 4) { if (roomNumber == 28) talk(178); - else if (pickedObject == kVerbLook && fl == 50) - talk(309); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); else if (pickedObject == 8 && fl == 50 && flags[18] == 0) talk(481); else if (pickedObject == 9 && fl == 50) @@ -1898,20 +1705,7 @@ bool DrasculaEngine::checkAction(int fl) { } else hasAnswer = 0; } else if (currentChapter == 5) { - // TODO: These are not translated - if (pickedObject == kVerbLook && fl == 50) - talk("Cuanto mas me miro, mas me gusto", "54.als"); - else if (pickedObject == kVerbOpen && fl == 50) - talk("y luego como me cierro", "19.als"); - else if (pickedObject == kVerbClose && fl == 50) - talk("Tendre que abrirme primero no", "19.als"); - else if (pickedObject == kVerbMove && fl == 50) - talk("Estoy bien donde estoy", "19.als"); - else if (pickedObject == kVerbPick && fl == 50) - talk("Ya me tengo", "11.als"); - else if (pickedObject == kVerbTalk && fl == 50) - talk("hola yo", "16.als"); - else if (pickedObject == 20 && fl == 50) + if (pickedObject == 20 && fl == 50) talk(487); else if (roomNumber == 56) { if (room_56(fl)) @@ -1923,16 +1717,6 @@ bool DrasculaEngine::checkAction(int fl) { talk(308); else if (pickedObject == kVerbLook && fl == 50 && flags[0] == 0) talk(310); - else if (pickedObject == kVerbOpen && fl == 50) - talk(310); - else if (pickedObject == kVerbClose && fl == 50) - talk(311); - else if (pickedObject == kVerbMove && fl == 50) - talk(312); - else if (pickedObject == kVerbPick && fl == 50) - talk(313); - else if (pickedObject == kVerbTalk && fl == 50) - talk(314); else if (roomNumber == 102) room_102(fl); else if (roomNumber == 60) { diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index fb3d966ec3..58bf24f75d 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -418,6 +418,128 @@ RoomTalkAction roomActions[] = { // ================================== { 102, -1, kVerbLook, 100, 452 }, { 102, -1, kVerbLook, 101, 123 }, + // ================================== + // Pseudoroom. checkAction() menuScreen == 1 + { 200, 1, kVerbLook, 28, 328 }, + // ---------------------------------- + { 200, 2, kVerbLook, 28, 328 }, + { 200, 2, kVerbLook, 7, 143 }, + { 200, 2, kVerbLook, 8, 145 }, + { 200, 2, kVerbLook, 9, 147 }, + { 200, 2, kVerbLook, 10, 151 }, + { 200, 2, kVerbLook, 11, 152 }, + { 200, 2, kVerbLook, 12, 154 }, + { 200, 2, kVerbLook, 13, 155 }, + { 200, 2, kVerbLook, 14, 157 }, + { 200, 2, kVerbLook, 15, 58 }, + { 200, 2, kVerbLook, 16, 158 }, + { 200, 2, kVerbLook, 17, 159 }, + { 200, 2, kVerbLook, 18, 160 }, + { 200, 2, kVerbLook, 19, 161 }, + { 200, 2, kVerbLook, 23, 152 }, + { 200, 2, kVerbTalk, 7, 144 }, + { 200, 2, kVerbTalk, 8, 146 }, + { 200, 2, kVerbTalk, 9, 148 }, + { 200, 2, kVerbTalk, 11, 153 }, + // ---------------------------------- + { 200, 3, kVerbLook, 22, 307 }, + { 200, 3, kVerbLook, 28, 328 }, + { 200, 3, kVerbLook, 7, 143 }, + { 200, 3, kVerbLook, 8, 145 }, + { 200, 3, kVerbLook, 9, 147 }, + { 200, 3, kVerbLook, 10, 151 }, + { 200, 3, kVerbLook, 11, 152 }, + { 200, 3, kVerbLook, 12, 154 }, + { 200, 3, kVerbLook, 13, 155 }, + { 200, 3, kVerbLook, 14, 157 }, + { 200, 3, kVerbLook, 15, 58 }, + { 200, 3, kVerbLook, 16, 158 }, + { 200, 3, kVerbLook, 17, 159 }, + { 200, 3, kVerbLook, 18, 160 }, + { 200, 3, kVerbLook, 19, 161 }, + { 200, 3, kVerbLook, 20, 162 }, + { 200, 3, kVerbLook, 23, 152 }, + { 200, 3, kVerbTalk, 7, 144 }, + { 200, 3, kVerbTalk, 8, 146 }, + { 200, 3, kVerbTalk, 9, 148 }, + { 200, 3, kVerbTalk, 11, 153 }, + // ---------------------------------- + { 200, 4, kVerbLook, 7, 478 }, + { 200, 4, kVerbLook, 8, 480 }, + { 200, 4, kVerbLook, 10, 485 }, + { 200, 4, kVerbLook, 11, 488 }, + { 200, 4, kVerbLook, 12, 486 }, + { 200, 4, kVerbLook, 13, 490 }, + { 200, 4, kVerbLook, 14, 122 }, + { 200, 4, kVerbLook, 15, 117 }, + { 200, 4, kVerbLook, 16, 491 }, + { 200, 4, kVerbLook, 17, 478 }, + { 200, 4, kVerbLook, 18, 493 }, + { 200, 4, kVerbLook, 20, 162 }, + { 200, 4, kVerbLook, 21, 496 }, + { 200, 4, kVerbLook, 22, 161 }, + { 200, 4, kVerbLook, 28, 328 }, + { 200, 4, kVerbTalk, 15, 118 }, + { 200, 4, kVerbOpen, 15, 119 }, + // ---------------------------------- + { 200, 5, kVerbLook, 7, 478 }, + { 200, 5, kVerbLook, 8, 120 }, + { 200, 5, kVerbLook, 11, 488 }, + { 200, 5, kVerbLook, 13, 490 }, + { 200, 5, kVerbLook, 14, 121 }, + { 200, 5, kVerbLook, 15, 117 }, + { 200, 5, kVerbLook, 17, 478 }, + { 200, 5, kVerbLook, 20, 162 }, + { 200, 5, kVerbLook, 28, 328 }, + { 200, 5, kVerbTalk, 15, 118 }, + { 200, 5, kVerbOpen, 15, 119 }, + // ---------------------------------- + { 200, 6, kVerbLook, 20, 123 }, + { 200, 6, kVerbLook, 21, 441 }, + { 200, 6, kVerbLook, 28, 328 }, + // ================================== + // Pseudoroom. checkAction() menuScreen != 1 + { 201, 1, kVerbLook, 50, 308 }, + { 201, 1, kVerbOpen, 50, 310 }, + { 201, 1, kVerbClose, 50, 311 }, + { 201, 1, kVerbMove, 50, 312 }, + { 201, 1, kVerbPick, 50, 313 }, + { 201, 1, kVerbTalk, 50, 314 }, + // ---------------------------------- + { 201, 2, kVerbLook, 50, 308 }, + { 201, 2, kVerbOpen, 50, 310 }, + { 201, 2, kVerbClose, 50, 311 }, + { 201, 2, kVerbMove, 50, 312 }, + { 201, 2, kVerbPick, 50, 313 }, + { 201, 2, kVerbTalk, 50, 314 }, + // ---------------------------------- + { 201, 3, kVerbLook, 50, 309 }, + { 201, 3, kVerbOpen, 50, 310 }, + { 201, 3, kVerbClose, 50, 311 }, + { 201, 3, kVerbMove, 50, 312 }, + { 201, 3, kVerbPick, 50, 313 }, + { 201, 3, kVerbTalk, 50, 314 }, + // ---------------------------------- + { 201, 4, kVerbLook, 50, 309 }, + { 201, 4, kVerbOpen, 50, 310 }, + { 201, 4, kVerbClose, 50, 311 }, + { 201, 4, kVerbMove, 50, 312 }, + { 201, 4, kVerbPick, 50, 313 }, + { 201, 4, kVerbTalk, 50, 314 }, + // ---------------------------------- + { 201, 5, kVerbLook, 50, 309 }, // Originally these are with + { 201, 5, kVerbOpen, 50, 310 }, // completely wrong voices + { 201, 5, kVerbClose, 50, 311 }, + { 201, 5, kVerbMove, 50, 312 }, + { 201, 5, kVerbPick, 50, 313 }, + { 201, 5, kVerbTalk, 50, 314 }, + // ---------------------------------- + { 201, 6, kVerbOpen, 50, 310 }, + { 201, 6, kVerbClose, 50, 311 }, + { 201, 6, kVerbMove, 50, 312 }, + { 201, 6, kVerbPick, 50, 313 }, + { 201, 6, kVerbTalk, 50, 314 }, + }; const char *_text[][501] = { -- cgit v1.2.3 From b7ac2f99f623b09c218884c490a8f3cb95eef77e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Thu, 5 Jun 2008 20:35:45 +0000 Subject: Optimize a bit roomParse, though ideal would be a binary search, but I am too lazy for that. svn-id: r32561 --- engines/drascula/rooms.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index ea6b7766e2..968cf1952b 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -154,8 +154,11 @@ void DrasculaEngine::setupRoomsTable() { } bool DrasculaEngine::roomParse(int room, int fl) { + bool seen = false; + for (int i = 0; i < ARRAYSIZE(roomActions); i++) { if (roomActions[i].room == room) { + seen = true; if (roomActions[i].chapter == currentChapter || roomActions[i].chapter == -1) { if (roomActions[i].action == pickedObject || @@ -168,7 +171,8 @@ bool DrasculaEngine::roomParse(int room, int fl) { } } } - } + } else if (seen) // Stop searching down the list + break; } return false; -- cgit v1.2.3 From 3c7e0f5f8dc39e27619f7d23d060264db8d906d3 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 5 Jun 2008 21:12:02 +0000 Subject: Fixed regression: rooms 0, 56 and 60 are not called by the default room parser (13 and 21 too, but there are no default actions associated with them) svn-id: r32562 --- engines/drascula/rooms.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 968cf1952b..62d8c557fe 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -182,6 +182,9 @@ void DrasculaEngine::room_0() { static const int lookExcuses[3] = {100, 101, 54}; static const int actionExcuses[6] = {11, 109, 111, 110, 115, 116}; + if (roomParse(0, -1)) + return; + // non-default actions if (currentChapter == 2 || currentChapter == 4 || currentChapter == 5 || currentChapter == 6) { @@ -861,6 +864,9 @@ void DrasculaEngine::room_55(int fl) { } bool DrasculaEngine::room_56(int fl) { + if (roomParse(56, fl)) + return false; + if (pickedObject == kVerbOpen && fl == 124) { animation_14_5(); return true; @@ -944,6 +950,9 @@ void DrasculaEngine::room_59(int fl) { } bool DrasculaEngine::room_60(int fl) { + if (roomParse(60, fl)) + return false; + if (pickedObject == kVerbMove && fl == 112) animation_10_6(); else if (pickedObject == kVerbTalk && fl == 52) { -- cgit v1.2.3 From c0a75930c7e6aeec6ba7e7bf03d8dfb43cf69351 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Thu, 5 Jun 2008 21:34:45 +0000 Subject: disable more more compiler warnings svn-id: r32564 --- backends/platform/wii/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backends/platform/wii/Makefile b/backends/platform/wii/Makefile index 0654fa254d..74425246f2 100644 --- a/backends/platform/wii/Makefile +++ b/backends/platform/wii/Makefile @@ -62,8 +62,9 @@ MACHDEP = -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float \ INCDIR = $(srcdir) . $(srcdir)/engines/ $(DEVKITPRO)/libogc/include LIBDIR = $(DEVKITPRO)/libogc/lib/wii -CXXFLAGS = -g -Os -Wall $(MACHDEP) -D__WII__ \ - -Wno-multichar -fno-exceptions -fno-rtti +CXXFLAGS = -g -Os -Wall $(MACHDEP) -D__WII__ -Wno-multichar -Wno-long-long \ + -Wno-multichar -Wno-unknown-pragmas -Wno-reorder \ + -fno-exceptions -fno-rtti CXXFLAGS += $(addprefix -I,$(INCDIR)) LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(TARGET).elf.map -- cgit v1.2.3 From 7eae38454add676cc1e094fae36adf875a5ac946 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Thu, 5 Jun 2008 21:39:44 +0000 Subject: recreated icon.png from scummvm_logo.svg svn-id: r32565 --- dists/wii/icon.png | Bin 12233 -> 8505 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/dists/wii/icon.png b/dists/wii/icon.png index dc873e66f2..0a3264377f 100644 Binary files a/dists/wii/icon.png and b/dists/wii/icon.png differ -- cgit v1.2.3 From 095c1544db440ebd3335cf83228018c86f1fdd54 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Jun 2008 06:35:25 +0000 Subject: Further unification of room code. svn-id: r32567 --- engines/drascula/drascula.h | 77 ++++++++-------- engines/drascula/rooms.cpp | 210 ++++++++++++++++++++++++++++++-------------- 2 files changed, 181 insertions(+), 106 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index cbc1d0b442..858b838f94 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -491,48 +491,49 @@ public: void updateAnim(int y, int destX, int destY, int width, int height, int count, byte* src, int delayVal = 3); void updateAnim2(int y, int px, int py, int width, int height, int count, byte* src); - void room_0(); - void room_1(int); - void room_2(int); - void room_3(int); - void room_4(int); - void room_5(int); - void room_6(int); - void room_7(int); - void room_8(int); - void room_9(int); - void room_12(int); + bool room(int rN, int fl); + bool room_0(int); + bool room_1(int); + bool room_2(int); + bool room_3(int); + bool room_4(int); + bool room_5(int); + bool room_6(int); + bool room_7(int); + bool room_8(int); + bool room_9(int); + bool room_12(int); bool room_13(int fl); - void room_14(int); - void room_15(int); - void room_16(int); - void room_17(int); - void room_18(int); - void room_19(int); + bool room_14(int); + bool room_15(int); + bool room_16(int); + bool room_17(int); + bool room_18(int); + bool room_19(int); bool room_21(int); - void room_22(int); - void room_23(int); - void room_24(int); - void room_26(int); - void room_27(int); - void room_29(int); - void room_30(int); - void room_31(int); - void room_34(int); - void room_35(int); - void room_44(int); - void room_49(int); - void room_53(int); - void room_54(int); - void room_55(int); + bool room_22(int); + bool room_23(int); + bool room_24(int); + bool room_26(int); + bool room_27(int); + bool room_29(int); + bool room_30(int); + bool room_31(int); + bool room_34(int); + bool room_35(int); + bool room_44(int); + bool room_49(int); + bool room_53(int); + bool room_54(int); + bool room_55(int); bool room_56(int); - void room_58(int); - void room_59(int); + bool room_58(int); + bool room_59(int); bool room_60(int); - void room_61(int); - void room_62(int); - void room_63(int); - void room_102(int); + bool room_61(int); + bool room_62(int); + bool room_63(int); + bool room_102(int); void animation_1_1(); void animation_2_1(); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 62d8c557fe..7415ce9c9c 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -30,7 +30,7 @@ namespace Drascula { -typedef void (DrasculaEngine::*RoomParser)(int args); +typedef bool (DrasculaEngine::*RoomParser)(int args); struct DrasculaRoomParser { DrasculaRoomParser(const char* d, RoomParser p) : desc(d), proc(p) {} @@ -153,11 +153,11 @@ void DrasculaEngine::setupRoomsTable() { UPDATEROOM(update_102); } -bool DrasculaEngine::roomParse(int room, int fl) { +bool DrasculaEngine::roomParse(int rN, int fl) { bool seen = false; for (int i = 0; i < ARRAYSIZE(roomActions); i++) { - if (roomActions[i].room == room) { + if (roomActions[i].room == rN) { seen = true; if (roomActions[i].chapter == currentChapter || roomActions[i].chapter == -1) { @@ -178,12 +178,11 @@ bool DrasculaEngine::roomParse(int room, int fl) { return false; } -void DrasculaEngine::room_0() { +bool DrasculaEngine::room_0(int fl) { static const int lookExcuses[3] = {100, 101, 54}; static const int actionExcuses[6] = {11, 109, 111, 110, 115, 116}; - if (roomParse(0, -1)) - return; + fl = -1; // avoid warning // non-default actions if (currentChapter == 2 || currentChapter == 4 || @@ -200,9 +199,11 @@ void DrasculaEngine::room_0() { curExcuseAction = 0; } } + + return true; } -void DrasculaEngine::room_1(int fl) { +bool DrasculaEngine::room_1(int fl) { if (pickedObject == kVerbLook && fl == 118) { talk(1); pause(10); @@ -211,9 +212,11 @@ void DrasculaEngine::room_1(int fl) { talk(14); else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_3(int fl) { +bool DrasculaEngine::room_3(int fl) { if (pickedObject == kVerbTalk && fl == 129) { talk(23); pause(6); @@ -247,9 +250,11 @@ void DrasculaEngine::room_3(int fl) { talk(186); } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_4(int fl) { +bool DrasculaEngine::room_4(int fl) { if (pickedObject == kVerbMove && fl == 189 && flags[34] == 0) { talk(327); pickObject(13); @@ -258,9 +263,11 @@ void DrasculaEngine::room_4(int fl) { flags[38] = 1; } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_5(int fl) { +bool DrasculaEngine::room_5(int fl) { if (pickedObject == kVerbLook && fl == 136 && flags[8] == 0) talk(14); else if (pickedObject == 10 && fl == 136) { @@ -268,9 +275,11 @@ void DrasculaEngine::room_5(int fl) { removeObject(kItemSpike); } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_6(int fl){ +bool DrasculaEngine::room_6(int fl) { if (pickedObject == kVerbLook && fl==144) { talk(41); talk(42); @@ -326,9 +335,11 @@ void DrasculaEngine::room_6(int fl){ hasAnswer = 1; else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_7(int fl){ +bool DrasculaEngine::room_7(int fl) { if (pickedObject == kVerbPick && fl == 190) { pickObject(17); flags[35] = 1; @@ -337,9 +348,11 @@ void DrasculaEngine::room_7(int fl){ flags[38] = 1; } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_8(int fl) { +bool DrasculaEngine::room_8(int fl) { if (pickedObject == kVerbLook && fl == 147) { if (flags[7] == 0) { talk(58); @@ -352,9 +365,11 @@ void DrasculaEngine::room_8(int fl) { } } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_9(int fl){ +bool DrasculaEngine::room_9(int fl) { if (pickedObject == kVerbTalk && fl == 51 && flags[4] == 0) animation_4_2(); else if (pickedObject == kVerbTalk && fl == 51 && flags[4] == 1) @@ -365,15 +380,19 @@ void DrasculaEngine::room_9(int fl){ pickObject(14);} else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_12(int fl){ +bool DrasculaEngine::room_12(int fl) { if (pickedObject == kVerbOpen && fl == 156) openDoor(16, 4); else if (pickedObject == kVerbClose && fl == 156) closeDoor(16, 4); else hasAnswer = 0; + + return true; } bool DrasculaEngine::room_13(int fl) { @@ -391,10 +410,11 @@ bool DrasculaEngine::room_13(int fl) { return true; } else hasAnswer = 0; + return false; } -void DrasculaEngine::room_14(int fl) { +bool DrasculaEngine::room_14(int fl) { if (pickedObject == kVerbTalk && fl == 54 && flags[39] == 0) animation_12_2(); else if (pickedObject == kVerbTalk && fl == 54 && flags[39] == 1) @@ -409,9 +429,11 @@ void DrasculaEngine::room_14(int fl) { animation_13_2(); else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_15(int fl) { +bool DrasculaEngine::room_15(int fl) { if (pickedObject == 19 && fl == 188 && flags[27] == 0) talk(335); else if (pickedObject == 19 && fl == 188 && flags[27] == 1) { @@ -440,9 +462,11 @@ void DrasculaEngine::room_15(int fl) { flags[38] = 1; } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_16(int fl) { +bool DrasculaEngine::room_16(int fl) { if (pickedObject == kVerbOpen && fl == 163) openDoor(17, 0); else if (pickedObject == kVerbClose && fl == 163) @@ -473,9 +497,11 @@ void DrasculaEngine::room_16(int fl) { talk(344); } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_17(int fl) { +bool DrasculaEngine::room_17(int fl) { if (pickedObject == kVerbLook && fl == 177) talk(35); else if (pickedObject == kVerbTalk && fl == 177 && flags[18] == 0) @@ -497,9 +523,11 @@ void DrasculaEngine::room_17(int fl) { removeObject(kItemEarplugs); } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_18(int fl) { +bool DrasculaEngine::room_18(int fl) { if (pickedObject == kVerbTalk && fl == 55 && flags[36] == 0) animation_24_2(); else if (pickedObject == kVerbTalk && fl == 55 && flags[36] == 1) @@ -539,10 +567,14 @@ void DrasculaEngine::room_18(int fl) { removeObject(kItemEarplugs); } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_19(int fl) { +bool DrasculaEngine::room_19(int fl) { hasAnswer = 0; + + return true; } bool DrasculaEngine::room_21(int fl) { @@ -569,7 +601,7 @@ bool DrasculaEngine::room_21(int fl) { return false; } -void DrasculaEngine::room_22(int fl) { +bool DrasculaEngine::room_22(int fl) { if (pickedObject == 11 && fl == 140) { pickObject(18); visible[1] = 0; @@ -594,9 +626,11 @@ void DrasculaEngine::room_22(int fl) { flags[27] = 1; } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_23(int fl) { +bool DrasculaEngine::room_23(int fl) { if (pickedObject == kVerbOpen && fl == 103) { openDoor(0, 0); updateVisible(); @@ -617,9 +651,11 @@ void DrasculaEngine::room_23(int fl) { animation_6_4(); } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_24(int fl) { +bool DrasculaEngine::room_24(int fl) { if (pickedObject == kVerbOpen && fl == 105) openDoor(1, 0); else if (pickedObject == kVerbClose && fl == 105) @@ -630,9 +666,11 @@ void DrasculaEngine::room_24(int fl) { closeDoor(2, 1); else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_26(int fl) { +bool DrasculaEngine::room_26(int fl) { if (pickedObject == kVerbOpen && fl == 107 && flags[30] == 0) openDoor(2, 0); else if (pickedObject == kVerbOpen && fl == 107 && flags[30] == 1) @@ -669,9 +707,11 @@ void DrasculaEngine::room_26(int fl) { animation_1_4(); else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_27(int fl) { +bool DrasculaEngine::room_27(int fl) { if (pickedObject == kVerbOpen && fl == 110) openDoor(6, 1); else if (pickedObject == kVerbClose && fl == 110) @@ -690,18 +730,22 @@ void DrasculaEngine::room_27(int fl) { talk(460); else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_29(int fl) { +bool DrasculaEngine::room_29(int fl) { if (pickedObject == kVerbOpen && fl == 114) openDoor(4, 1); else if (pickedObject == kVerbClose && fl == 114) closeDoor(4, 1); else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_30(int fl) { +bool DrasculaEngine::room_30(int fl) { if (pickedObject == kVerbOpen && fl == 115) openDoor(4, 0); else if (pickedObject == kVerbClose && fl == 115) @@ -726,9 +770,11 @@ void DrasculaEngine::room_30(int fl) { flags[19] = 1; } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_31(int fl) { +bool DrasculaEngine::room_31(int fl) { if (pickedObject == kVerbPick && fl == 145) { pickObject(11); visible[1] = 0; @@ -739,9 +785,11 @@ void DrasculaEngine::room_31(int fl) { closeDoor(5, 0); else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_34(int fl) { +bool DrasculaEngine::room_34(int fl) { if (pickedObject == kVerbMove && fl == 146) animation_8_4(); else if (pickedObject == kVerbOpen && fl == 120 && flags[25] == 1) @@ -756,9 +804,11 @@ void DrasculaEngine::room_34(int fl) { closeDoor(8, 2); else hasAnswer=0; + + return true; } -void DrasculaEngine::room_35(int fl) { +bool DrasculaEngine::room_35(int fl) { if (pickedObject == kVerbPick && fl == 148) { pickObject(16); visible[2] = 0; @@ -780,22 +830,28 @@ void DrasculaEngine::room_35(int fl) { flags[17] = 0; } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_44(int fl) { +bool DrasculaEngine::room_44(int fl) { hasAnswer = 0; + + return true; } -void DrasculaEngine::room_49(int fl){ +bool DrasculaEngine::room_49(int fl) { if (pickedObject == kVerbTalk && fl ==51) converse(9); else if ((pickedObject == 8 && fl == 51) || (pickedObject == 8 && fl == 203)) animation_5_5(); else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_53(int fl) { +bool DrasculaEngine::room_53(int fl) { if (pickedObject == kVerbPick && fl == 120) { pickObject(16); visible[3] = 0; @@ -815,9 +871,11 @@ void DrasculaEngine::room_53(int fl) { visible[3] = 1; } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_54(int fl) { +bool DrasculaEngine::room_54(int fl) { if ((pickedObject == kVerbTalk && fl == 118) || (pickedObject == kVerbLook && fl == 118 && flags[0] == 0)) animation_1_5(); else if (pickedObject == kVerbLook && fl == 118 && flags[0]==1) @@ -847,9 +905,11 @@ void DrasculaEngine::room_54(int fl) { removeObject(10); } else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_55(int fl) { +bool DrasculaEngine::room_55(int fl) { if (pickedObject == kVerbPick && fl == 122) { pickObject(12); flags[8] = 1; @@ -861,12 +921,11 @@ void DrasculaEngine::room_55(int fl) { gotoObject(curX - 3, curY + curHeight + 6); } else hasAnswer = 0; + + return true; } bool DrasculaEngine::room_56(int fl) { - if (roomParse(56, fl)) - return false; - if (pickedObject == kVerbOpen && fl == 124) { animation_14_5(); return true; @@ -876,14 +935,16 @@ bool DrasculaEngine::room_56(int fl) { return false; } -void DrasculaEngine::room_58(int fl) { +bool DrasculaEngine::room_58(int fl) { if (pickedObject == kVerbMove && fl == 103) animation_7_6(); else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_59(int fl) { +bool DrasculaEngine::room_59(int fl) { if ((pickedObject == kVerbTalk && fl == 51) || (pickedObject == kVerbLook && fl == 51)) { flags[9] = 1; talk(259); @@ -947,12 +1008,11 @@ void DrasculaEngine::room_59(int fl) { } } else hasAnswer = 0; + + return true; } bool DrasculaEngine::room_60(int fl) { - if (roomParse(60, fl)) - return false; - if (pickedObject == kVerbMove && fl == 112) animation_10_6(); else if (pickedObject == kVerbTalk && fl == 52) { @@ -975,11 +1035,13 @@ bool DrasculaEngine::room_60(int fl) { return false; } -void DrasculaEngine::room_61(int fl) { +bool DrasculaEngine::room_61(int fl) { hasAnswer = 0; + + return true; } -void DrasculaEngine::room_62(int fl) { +bool DrasculaEngine::room_62(int fl) { if (pickedObject == kVerbTalk && fl == 53) converse(13); else if (pickedObject == kVerbTalk && fl == 52 && flags[0] == 0) @@ -990,13 +1052,17 @@ void DrasculaEngine::room_62(int fl) { animation_4_1(); else hasAnswer = 0; + + return true; } -void DrasculaEngine::room_63(int fl) { +bool DrasculaEngine::room_63(int fl) { hasAnswer = 0; + + return true; } -void DrasculaEngine::room_102(int fl) { +bool DrasculaEngine::room_102(int fl) { if (pickedObject == kVerbPick && fl == 101) pickObject(20); else if (pickedObject == 20 && fl == 100) @@ -1005,6 +1071,8 @@ void DrasculaEngine::room_102(int fl) { talk(453); else hasAnswer = 0; + + return true; } void DrasculaEngine::updateRefresh() { @@ -1054,7 +1122,7 @@ void DrasculaEngine::update_1_pre() { copyBackground(2, 158, 208, 67, 27, 40, drawSurface3, screenSurface); } -void DrasculaEngine::update_2(){ +void DrasculaEngine::update_2() { int batPos[6]; int difference; int batX[] = {0, 38, 76, 114, 152, 190, 228, 266, @@ -1125,7 +1193,7 @@ void DrasculaEngine::update_4() { } } -void DrasculaEngine::update_5_pre(){ +void DrasculaEngine::update_5_pre() { if (flags[8] == 0) copyBackground(256, 152, 208, 67, 27, 40, drawSurface3, screenSurface); } @@ -1697,7 +1765,7 @@ bool DrasculaEngine::checkAction(int fl) { hasAnswer = 0; } else if (currentChapter == 3) { if (roomNumber == 13) { - if (room_13(fl)) + if (room(13, fl)) return true; } else hasAnswer = 0; @@ -1713,7 +1781,7 @@ bool DrasculaEngine::checkAction(int fl) { else if (pickedObject == 20 && fl == 50) talk(487); else if (roomNumber == 21) { - if (room_21(fl)) + if (room(21, fl)) return true; } else hasAnswer = 0; @@ -1721,7 +1789,7 @@ bool DrasculaEngine::checkAction(int fl) { if (pickedObject == 20 && fl == 50) talk(487); else if (roomNumber == 56) { - if (room_56(fl)) + if (room(56, fl)) return true; } else hasAnswer = 0; @@ -1731,9 +1799,9 @@ bool DrasculaEngine::checkAction(int fl) { else if (pickedObject == kVerbLook && fl == 50 && flags[0] == 0) talk(310); else if (roomNumber == 102) - room_102(fl); + room(102, fl); else if (roomNumber == 60) { - if (room_60(fl)) + if (room(60, fl)) return true; } else @@ -1744,22 +1812,28 @@ bool DrasculaEngine::checkAction(int fl) { if (hasAnswer == 0) { hasAnswer = 1; - if (!roomParse(roomNumber, fl)) { - // Call room-specific parser - char rm[20]; - sprintf(rm, "room_%d", roomNumber); - for (uint i = 0; i < _roomParsers.size(); i++) { - if (!strcmp(rm, _roomParsers[i]->desc)) { - debug(4, "Calling room parser %d", roomNumber); - (this->*(_roomParsers[i]->proc))(fl); - break; - } - } - } + room(roomNumber, fl); } if (hasAnswer == 0 && (hasName == 1 || menuScreen == 1)) - room_0(); + room(0, -1); + + return false; +} + +bool DrasculaEngine::room(int rN, int fl) { + if (!roomParse(rN, fl)) { + // Call room-specific parser + char rm[20]; + sprintf(rm, "room_%d", rN); + for (uint i = 0; i < _roomParsers.size(); i++) { + if (!strcmp(rm, _roomParsers[i]->desc)) { + debug(4, "Calling room parser %d", rN); + + return (this->*(_roomParsers[i]->proc))(fl); + } + } + } return false; } -- cgit v1.2.3 From fe8ec2ef105a1bfa05742acd5491580d81bd7fdb Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Fri, 6 Jun 2008 06:58:37 +0000 Subject: Only try to play a sound file if the file could be found. (Otherwise, it looks like it will try to use the most recently opened file, which is probably not a sound at all.) svn-id: r32568 --- engines/drascula/drascula.cpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index f9ca3b4aa6..223877389f 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1796,6 +1796,7 @@ void DrasculaEngine::centerText(const char *message, int textX, int textY) { void DrasculaEngine::playSound(int soundNum) { char file[20]; + printf("playSound(%d)\n", soundNum); sprintf(file, "s%i.als", soundNum); playFile(file); @@ -3346,16 +3347,17 @@ void DrasculaEngine::MusicFadeout() { } void DrasculaEngine::playFile(const char *fname) { - _arj.open(fname); - - int soundSize = _arj.size(); - byte *soundData = (byte *)malloc(soundSize); - _arj.seek(32); - _arj.read(soundData, soundSize); - _arj.close(); + if (_arj.open(fname)) { + int soundSize = _arj.size(); + byte *soundData = (byte *)malloc(soundSize); + _arj.seek(32); + _arj.read(soundData, soundSize); + _arj.close(); - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_soundHandle, soundData, soundSize - 64, - 11025, Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED); + _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_soundHandle, soundData, soundSize - 64, + 11025, Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED); + } else + warning("playFile: Could not open %s", fname); } bool DrasculaEngine::soundIsActive() { -- cgit v1.2.3 From 5d46aa2b7f55f4c67952699a15a3f6ae63d92c94 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Fri, 6 Jun 2008 06:59:44 +0000 Subject: Removed left-over debugging. svn-id: r32569 --- engines/drascula/drascula.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 223877389f..9d38d28887 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1796,7 +1796,6 @@ void DrasculaEngine::centerText(const char *message, int textX, int textY) { void DrasculaEngine::playSound(int soundNum) { char file[20]; - printf("playSound(%d)\n", soundNum); sprintf(file, "s%i.als", soundNum); playFile(file); -- cgit v1.2.3 From bc76980ae6c85ff74ed781240a782bd8cd86af76 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 6 Jun 2008 07:42:00 +0000 Subject: Added the rest of the rooms to the room parser svn-id: r32570 --- engines/drascula/rooms.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 7415ce9c9c..096d912b93 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -55,7 +55,7 @@ Common::Array _roomUpdaters; #define UPDATEROOM(x) _roomUpdaters.push_back(new DrasculaUpdater(#x, &DrasculaEngine::x)) void DrasculaEngine::setupRoomsTable() { - //ROOM(room_0); // default + ROOM(room_0); // default ROOM(room_1); ROOM(room_3); ROOM(room_4); @@ -65,14 +65,14 @@ void DrasculaEngine::setupRoomsTable() { ROOM(room_8); ROOM(room_9); ROOM(room_12); - //ROOM(room_13); // returns bool + ROOM(room_13); // returns bool ROOM(room_14); ROOM(room_15); ROOM(room_16); ROOM(room_17); ROOM(room_18); ROOM(room_19); - //ROOM(room_21); // returns bool + ROOM(room_21); // returns bool ROOM(room_22); ROOM(room_23); ROOM(room_24); @@ -88,10 +88,10 @@ void DrasculaEngine::setupRoomsTable() { ROOM(room_53); ROOM(room_54); ROOM(room_55); - //ROOM(room_56); // returns bool + ROOM(room_56); // returns bool ROOM(room_58); ROOM(room_59); - //ROOM(room_60); // returns bool + ROOM(room_60); // returns bool ROOM(room_61); ROOM(room_62); ROOM(room_63); -- cgit v1.2.3 From 547e25667b441f29ed96af7546b68ad468f89a40 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 6 Jun 2008 07:48:00 +0000 Subject: Removed the empty specialized parsers for rooms 19, 44, 61 and 63 svn-id: r32571 --- engines/drascula/drascula.h | 6 +----- engines/drascula/rooms.cpp | 28 ---------------------------- 2 files changed, 1 insertion(+), 33 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 858b838f94..b044086fd5 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -503,13 +503,12 @@ public: bool room_8(int); bool room_9(int); bool room_12(int); - bool room_13(int fl); + bool room_13(int); bool room_14(int); bool room_15(int); bool room_16(int); bool room_17(int); bool room_18(int); - bool room_19(int); bool room_21(int); bool room_22(int); bool room_23(int); @@ -521,7 +520,6 @@ public: bool room_31(int); bool room_34(int); bool room_35(int); - bool room_44(int); bool room_49(int); bool room_53(int); bool room_54(int); @@ -530,9 +528,7 @@ public: bool room_58(int); bool room_59(int); bool room_60(int); - bool room_61(int); bool room_62(int); - bool room_63(int); bool room_102(int); void animation_1_1(); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 096d912b93..48ba7a0964 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -71,7 +71,6 @@ void DrasculaEngine::setupRoomsTable() { ROOM(room_16); ROOM(room_17); ROOM(room_18); - ROOM(room_19); ROOM(room_21); // returns bool ROOM(room_22); ROOM(room_23); @@ -83,7 +82,6 @@ void DrasculaEngine::setupRoomsTable() { ROOM(room_31); ROOM(room_34); ROOM(room_35); - ROOM(room_44); ROOM(room_49); ROOM(room_53); ROOM(room_54); @@ -92,9 +90,7 @@ void DrasculaEngine::setupRoomsTable() { ROOM(room_58); ROOM(room_59); ROOM(room_60); // returns bool - ROOM(room_61); ROOM(room_62); - ROOM(room_63); ROOM(room_102); PREUPDATEROOM(update_1_pre); @@ -571,12 +567,6 @@ bool DrasculaEngine::room_18(int fl) { return true; } -bool DrasculaEngine::room_19(int fl) { - hasAnswer = 0; - - return true; -} - bool DrasculaEngine::room_21(int fl) { if (pickedObject == kVerbOpen && fl == 101 && flags[28] == 0) talk(419); @@ -834,12 +824,6 @@ bool DrasculaEngine::room_35(int fl) { return true; } -bool DrasculaEngine::room_44(int fl) { - hasAnswer = 0; - - return true; -} - bool DrasculaEngine::room_49(int fl) { if (pickedObject == kVerbTalk && fl ==51) converse(9); @@ -1035,12 +1019,6 @@ bool DrasculaEngine::room_60(int fl) { return false; } -bool DrasculaEngine::room_61(int fl) { - hasAnswer = 0; - - return true; -} - bool DrasculaEngine::room_62(int fl) { if (pickedObject == kVerbTalk && fl == 53) converse(13); @@ -1056,12 +1034,6 @@ bool DrasculaEngine::room_62(int fl) { return true; } -bool DrasculaEngine::room_63(int fl) { - hasAnswer = 0; - - return true; -} - bool DrasculaEngine::room_102(int fl) { if (pickedObject == kVerbPick && fl == 101) pickObject(20); -- cgit v1.2.3 From a478ef04aebb65e3cf13c766bbfb14e55ed52110 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Jun 2008 09:18:49 +0000 Subject: Fix regressions introduced in r32571 svn-id: r32572 --- engines/drascula/rooms.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 48ba7a0964..0a913c5fb4 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1805,6 +1805,9 @@ bool DrasculaEngine::room(int rN, int fl) { return (this->*(_roomParsers[i]->proc))(fl); } } + + // We did not find any parser, let default one work + hasAnswer = 0; } return false; -- cgit v1.2.3 From fa8981e1e2e0da48a936e4fcab59687ed34c0ede Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 6 Jun 2008 09:53:33 +0000 Subject: Simplified the room preupdaters and updaters svn-id: r32573 --- engines/drascula/drascula.h | 44 ++----- engines/drascula/rooms.cpp | 283 +++++++----------------------------------- engines/drascula/staticdata.h | 100 +++++++++++++-- 3 files changed, 151 insertions(+), 276 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index b044086fd5..23df79485d 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -144,6 +144,19 @@ struct RoomTalkAction { int speechID; }; +struct RoomUpdate { + int roomNum; + int flag; + int flagValue; + int sourceX; + int sourceY; + int destX; + int destY; + int width; + int height; + int type; // 0 - background, 1 - rect +}; + struct ItemLocation { int x; int y; @@ -631,55 +644,24 @@ public: void update_1_pre(); void update_2(); void update_3(); - void update_3_pre(); void update_4(); - void update_5(); - void update_5_pre(); void update_6_pre(); - void update_7_pre(); void update_9_pre(); - void update_12_pre(); void update_14_pre(); void update_13(); - void update_15(); void update_16_pre(); - void update_17_pre(); - void update_17(); void update_18_pre(); - void update_18(); - void update_20(); - void update_21_pre(); - void update_22_pre(); void update_23_pre(); - void update_24_pre(); void update_26_pre(); void update_26(); - void update_27(); - void update_27_pre(); - void update_29(); - void update_29_pre(); - void update_30_pre(); - void update_31_pre(); - void update_34_pre(); void update_35_pre(); - void update_31(); - void update_34(); - void update_35(); - void update_49_pre(); - void update_53_pre(); - void update_54_pre(); - void update_56_pre(); - void update_50(); - void update_57(); void update_58(); void update_58_pre(); void update_59_pre(); void update_60_pre(); void update_60(); - void update_61(); void update_62(); void update_62_pre(); - void update_63(); void update_102(); private: diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 0a913c5fb4..f57b4140c4 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -94,31 +94,14 @@ void DrasculaEngine::setupRoomsTable() { ROOM(room_102); PREUPDATEROOM(update_1_pre); - PREUPDATEROOM(update_3_pre); - PREUPDATEROOM(update_5_pre); PREUPDATEROOM(update_6_pre); - PREUPDATEROOM(update_7_pre); PREUPDATEROOM(update_9_pre); - PREUPDATEROOM(update_12_pre); PREUPDATEROOM(update_14_pre); PREUPDATEROOM(update_16_pre); - PREUPDATEROOM(update_17_pre); PREUPDATEROOM(update_18_pre); - PREUPDATEROOM(update_21_pre); - PREUPDATEROOM(update_22_pre); PREUPDATEROOM(update_23_pre); - PREUPDATEROOM(update_24_pre); PREUPDATEROOM(update_26_pre); - PREUPDATEROOM(update_27_pre); - PREUPDATEROOM(update_29_pre); - PREUPDATEROOM(update_30_pre); - PREUPDATEROOM(update_31_pre); - PREUPDATEROOM(update_34_pre); PREUPDATEROOM(update_35_pre); - PREUPDATEROOM(update_49_pre); - PREUPDATEROOM(update_53_pre); - PREUPDATEROOM(update_54_pre); - PREUPDATEROOM(update_56_pre); PREUPDATEROOM(update_58_pre); PREUPDATEROOM(update_59_pre); PREUPDATEROOM(update_60_pre); @@ -127,25 +110,11 @@ void DrasculaEngine::setupRoomsTable() { UPDATEROOM(update_2); UPDATEROOM(update_3); UPDATEROOM(update_4); - UPDATEROOM(update_5); UPDATEROOM(update_13); - UPDATEROOM(update_15); - UPDATEROOM(update_17); - UPDATEROOM(update_18); - UPDATEROOM(update_20); UPDATEROOM(update_26); - UPDATEROOM(update_27); - UPDATEROOM(update_29); - UPDATEROOM(update_31); - UPDATEROOM(update_34); - UPDATEROOM(update_35); - UPDATEROOM(update_50); - UPDATEROOM(update_57); UPDATEROOM(update_58); UPDATEROOM(update_60); - UPDATEROOM(update_61); UPDATEROOM(update_62); - UPDATEROOM(update_63); UPDATEROOM(update_102); } @@ -1048,6 +1017,26 @@ bool DrasculaEngine::room_102(int fl) { } void DrasculaEngine::updateRefresh() { + // Check generic updaters + for (int i = 0; i < ARRAYSIZE(roomUpdates); i++) { + if (roomUpdates[i].roomNum == roomNumber) { + if (roomUpdates[i].flag < 0 || + flags[roomUpdates[i].flag] == roomUpdates[i].flagValue) { + if (roomUpdates[i].type == 0) { + copyBackground(roomUpdates[i].sourceX, roomUpdates[i].sourceY, + roomUpdates[i].destX, roomUpdates[i].destY, + roomUpdates[i].width, roomUpdates[i].height, + drawSurface3, screenSurface); + } else { + copyRect(roomUpdates[i].sourceX, roomUpdates[i].sourceY, + roomUpdates[i].destX, roomUpdates[i].destY, + roomUpdates[i].width, roomUpdates[i].height, + drawSurface3, screenSurface); + } + } + } + } + // Call room-specific updater char rm[20]; sprintf(rm, "update_%d", roomNumber); @@ -1066,6 +1055,26 @@ void DrasculaEngine::updateRefresh() { } void DrasculaEngine::updateRefresh_pre() { + // Check generic preupdaters + for (int i = 0; i < ARRAYSIZE(roomPreUpdates); i++) { + if (roomPreUpdates[i].roomNum == roomNumber) { + if (roomPreUpdates[i].flag < 0 || + flags[roomPreUpdates[i].flag] == roomPreUpdates[i].flagValue) { + if (roomPreUpdates[i].type == 0) { + copyBackground(roomPreUpdates[i].sourceX, roomPreUpdates[i].sourceY, + roomPreUpdates[i].destX, roomPreUpdates[i].destY, + roomPreUpdates[i].width, roomPreUpdates[i].height, + drawSurface3, screenSurface); + } else { + copyRect(roomPreUpdates[i].sourceX, roomPreUpdates[i].sourceY, + roomPreUpdates[i].destX, roomPreUpdates[i].destY, + roomPreUpdates[i].width, roomPreUpdates[i].height, + drawSurface3, screenSurface); + } + } + } + } + // Call room-specific preupdater char rm[20]; sprintf(rm, "update_%d_pre", roomNumber); @@ -1144,11 +1153,6 @@ void DrasculaEngine::update_2() { showMap(); } -void DrasculaEngine::update_3_pre() { - if (flags[3] == 1) - copyBackground(258, 110, 85, 44, 23, 53, drawSurface3, screenSurface); -} - void DrasculaEngine::update_3() { if (curY + curHeight < 118) copyRect(129, 110, 194, 36, 126, 88, drawSurface3, screenSurface); @@ -1165,15 +1169,6 @@ void DrasculaEngine::update_4() { } } -void DrasculaEngine::update_5_pre() { - if (flags[8] == 0) - copyBackground(256, 152, 208, 67, 27, 40, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_5() { - copyRect(114, 130, 211, 87, 109, 69, drawSurface3, screenSurface); -} - void DrasculaEngine::update_6_pre() { if ((curX > 149 && curY + curHeight > 160 && curX < 220 && curY + curHeight < 188) || (curX > 75 && curY + curHeight > 183 && curX < 145)) { @@ -1183,18 +1178,6 @@ void DrasculaEngine::update_6_pre() { changeColor = 1; setDarkPalette(); } - - if (flags[0] == 0) - copyBackground(3, 103, 185, 69, 23, 76, drawSurface3, screenSurface); - if (flags[1] == 0) - copyBackground(97, 117, 34, 148, 36, 31, drawSurface3, screenSurface); - if (flags[2] == 0) - copyBackground(28, 100, 219, 72, 64, 97, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_7_pre() { - if (flags[35] == 0) - copyBackground(1, 72, 158, 162, 19, 12, drawSurface3, screenSurface); } void DrasculaEngine::update_9_pre() { @@ -1215,14 +1198,10 @@ void DrasculaEngine::update_9_pre() { frame_blind = 3; } -void DrasculaEngine::update_12_pre() { - if (flags[16] == 0) - copyBackground(1, 131, 106, 117, 55, 68, drawSurface3, screenSurface); -} - void DrasculaEngine::update_13() { if (curX > 55 && flags[3] == 0) animation_6_3(); + // These cannot be placed in an array, as they're between screen updates if (flags[1] == 0) copyRect(185, 110, 121, 65, 67, 88, drawSurface3, screenSurface); if (flags[2] == 0) @@ -1275,10 +1254,6 @@ void DrasculaEngine::update_14_pre() { } } -void DrasculaEngine::update_15() { - copyRect(1, 154, 83, 122, 131, 44, drawSurface3, screenSurface); -} - void DrasculaEngine::update_16_pre() { if (currentChapter != 2) { debug(4, "update_16_pre: Special case, current chapter is not 2, not performing update"); @@ -1291,15 +1266,6 @@ void DrasculaEngine::update_16_pre() { copyBackground(37, 151, 224, 115, 56, 47, drawSurface3, screenSurface); } -void DrasculaEngine::update_17_pre() { - if (flags[15] == 1) - copyBackground(1, 135, 108, 65, 44, 63, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_17() { - copyRect(48, 135, 78, 139, 80, 30, drawSurface3, screenSurface); -} - void DrasculaEngine::update_18_pre() { int difference; int snore_x[] = {95, 136, 95, 136, 95, 95, 95, 95, 136, 95, 95, 95, 95, 95, 95, 95}; @@ -1320,41 +1286,12 @@ void DrasculaEngine::update_18_pre() { } } -void DrasculaEngine::update_18() { - if (flags[24] == 1) - copyRect(177, 1, 69, 29, 142, 130, drawSurface3, screenSurface); - copyRect(105, 132, 109, 108, 196, 65, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_20() { - copyRect(1, 137, 106, 121, 213, 61, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_21_pre() { - if (flags[0] == 1) - copyBackground(2, 171, 84, 126, 17, 26, drawSurface3, screenSurface); - - if (flags[10] == 1) - copyBackground(20, 163, 257, 149, 14, 34, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_22_pre() { - if (flags[24] == 1) - copyBackground(2, 187, 107, 106, 62, 12, drawSurface3, screenSurface); - - if (flags[27] == 0) - copyBackground(32, 181, 203, 88, 13, 5, drawSurface3, screenSurface); - - if (flags[26] == 0) - copyBackground(2, 133, 137, 83, 29, 53, drawSurface3, screenSurface); - else - copyBackground(65, 174, 109, 145, 55, 25, drawSurface3, screenSurface); -} - void DrasculaEngine::update_23_pre() { if (flags[11] == 1 && flags[0] == 0) copyBackground(87, 171, 237, 110, 20, 28, drawSurface3, screenSurface); + // It might be possible to put these in an array, though I'm a bit unsure + // of the draw order if (flags[0] == 1) copyBackground(29, 126, 239, 94, 57, 73, drawSurface3, screenSurface); @@ -1362,26 +1299,9 @@ void DrasculaEngine::update_23_pre() { copyRect(1, 135, 7, 94, 27, 64, drawSurface3, screenSurface); } -void DrasculaEngine::update_24_pre() { - if (flags[1] == 1) - copyBackground(1, 163, 225, 124, 12, 36, drawSurface3, screenSurface); - - if (flags[2] == 1) - copyBackground(14, 153, 30, 107, 23, 46, drawSurface3, screenSurface); -} - void DrasculaEngine::update_26_pre() { int difference; - if (flags[2] == 1) - copyBackground(1, 130, 87, 44, 50, 69, drawSurface3, screenSurface); - - if (flags[12] == 1) - copyBackground(52, 177, 272, 103, 27, 22, drawSurface3, screenSurface); - - if (flags[18] == 0) - copyBackground(80, 133, 199, 95, 50, 66, drawSurface3, screenSurface); - if (blinking == 5 && flags[18] == 0) copyBackground(52, 172, 226, 106, 3, 4, drawSurface3, screenSurface); @@ -1402,123 +1322,20 @@ void DrasculaEngine::update_26() { copyRect(233, 107, 17, 102, 66, 92, drawSurface3, screenSurface); } -void DrasculaEngine::update_27_pre() { - if (flags[5] == 1) - copyRect(1, 175, 59, 109, 17, 24, drawSurface3, screenSurface); - - if (flags[6] == 1) - copyRect(19, 177, 161, 103, 18, 22, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_27() { - copyRect(38, 177, 103, 171, 21, 22, drawSurface3, screenSurface); - copyRect(60, 162, 228, 156, 18, 37, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_29_pre() { - if (flags[4] == 1) - copyBackground(12, 113, 247, 49, 41, 84, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_29() { - copyRect(1, 180, 150, 126, 10, 17, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_30_pre() { - if (flags[4] == 1) - copyBackground(1, 148, 148, 66, 35, 51, drawSurface3, screenSurface); - - if (flags[16] == 1) - copyBackground(37, 173, 109, 84, 20, 26, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_31_pre() { - if (flags[13] == 1) - copyBackground(1, 163, 116, 41, 61, 36, drawSurface3, screenSurface); - - if (flags[5] == 1) - copyBackground(1, 78, 245, 63, 30, 84, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_31() { - copyRect(63, 190, 223, 157, 17, 9, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_34_pre() { - if (flags[7] == 1) - copyBackground(99, 127, 73, 41, 79, 72, drawSurface3, screenSurface); - - if (flags[8] == 1) - copyBackground(36, 129, 153, 41, 62, 65, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_34() { - copyRect(5, 171, 234, 126, 29, 23, drawSurface3, screenSurface); -} - void DrasculaEngine::update_35_pre() { - if (flags[14] == 1) - copyBackground(1, 86, 246, 65, 68, 87, drawSurface3, screenSurface); - if (flags[17] == 0 && flags[15] == 1) copyBackground(111, 150, 118, 52, 40, 23, drawSurface3, screenSurface); - - if (flags[17] == 1) - copyBackground(70, 150, 118, 52, 40, 23, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_35() { - copyRect(1, 174, 54, 152, 195, 25, drawSurface3, screenSurface); -} - - -void DrasculaEngine::update_49_pre() { - if (flags[6] == 0) - copyBackground(2, 136, 176, 81, 49, 62, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_50() { - copyRect(4, 153, 118, 95, 67, 44, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_53_pre() { - if (flags[1] == 0) - copyRect(2, 113, 205, 50, 38, 86, drawSurface3, screenSurface); - if (flags[2] == 0) - copyBackground(41, 159, 27, 117, 25, 40, drawSurface3, screenSurface); - if (flags[9] == 1) - copyBackground(67, 184, 56, 93, 32, 15, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_54_pre() { - if (flags[5] == 1) - copyBackground(168, 156, 187, 111, 7, 11, drawSurface3, screenSurface); - if (flags[12] == 1) - copyBackground(16, 156, 190, 64, 18, 24, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_56_pre() { - if (flags[10] == 0) - copyBackground(2, 126, 42, 67, 57, 67, drawSurface3, screenSurface); - if (flags[11] == 1) - copyBackground(60, 160, 128, 97, 103, 38, drawSurface3, screenSurface); -} - -void DrasculaEngine::update_57() { - copyRect(7, 113, 166, 61, 62, 82, drawSurface3, screenSurface); } void DrasculaEngine::update_58_pre() { - if (flags[0] == 0) - copyBackground(1, 156, 143, 120, 120, 43, drawSurface3, screenSurface); - if (flags[1] == 2) - copyRect(252, 171, 173, 116, 25, 28, drawSurface3, screenSurface); if (flags[1] == 0 && flags[0] == 0) copyRect(278, 171, 173, 116, 25, 28, drawSurface3, screenSurface); if (flags[2] == 0) { placeIgor(); placeDrascula(); } + // Not possible to put these in an array, as there are other surfaces + // copied above if (flags[3] == 1) copyRect(1, 29, 204, 0, 18, 125, drawSurface3, screenSurface); if (flags[8] == 1) @@ -1531,8 +1348,6 @@ void DrasculaEngine::update_58() { } void DrasculaEngine::update_59_pre() { - if (flags[4] == 0) - copyRect(1, 146, 65, 106, 83, 40, drawSurface3, screenSurface); if (flags[9] == 1) { copyBackground(65, 103, 65, 103, 49, 38, drawSurface1, screenSurface); copyRect(1, 105, 65, 103, 49, 38, drawSurface3, screenSurface); @@ -1570,10 +1385,6 @@ void DrasculaEngine::update_60() { placeDrascula(); } -void DrasculaEngine::update_61() { - copyRect(1, 154, 83, 122, 131, 44, drawSurface3, screenSurface); -} - void DrasculaEngine::update_62_pre() { int candleY[] = { 158, 172, 186 }; int candleX[] = { 14, 19, 24 }; @@ -1633,10 +1444,6 @@ void DrasculaEngine::update_62() { } } -void DrasculaEngine::update_63() { - copyRect(1, 154, 83, 122, 131, 44, drawSurface3, screenSurface); -} - void DrasculaEngine::update_102() { int pendulum_x[] = {40, 96, 152, 208, 264, 40, 96, 152, 208, 208, 152, 264, 40, 96, 152, 208, 264}; int difference; diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 58bf24f75d..5fb404f4e1 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -106,12 +106,12 @@ const ItemLocation itemLocations[] = { { 275, 160 } // 43 }; -const int x_pol[44] = {0, 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, - 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, - 247, 83, 165, 1, 206, 42, 124, 83, 1, 247, - 83, 165, 1, 206, 42, 124, 83, 1, 247, 42, - 1, 165, 206}; -const int y_pol[44] = {0, 1, 1, 1, 1, 1, 1, 1, 27, 27, 1, +const int x_pol[44] = {0, 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, + 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, + 247, 83, 165, 1, 206, 42, 124, 83, 1, 247, + 83, 165, 1, 206, 42, 124, 83, 1, 247, 42, + 1, 165, 206}; +const int y_pol[44] = {0, 1, 1, 1, 1, 1, 1, 1, 27, 27, 1, 27, 27, 27, 27, 27, 27, 27, 1, 1, 27, 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, @@ -122,9 +122,95 @@ const int x1d_menu[] = {280, 40, 80, 120, 160, 200, 240, 0, 40, 80, 120, 40, 80, 120, 160, 200, 240, 0}; const int y1d_menu[] = {0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25, 50, 50, 50, 50, 50, 50, 50, 75, 75, 75, 75, 75, 75, 75, 100}; -int frame_x[20] = {43, 87, 130, 173, 216, 259}; +int frame_x[20] = {43, 87, 130, 173, 216, 259}; +const RoomUpdate roomPreUpdates[] = { + // room flag val x1 y1 x2 y2 width height type + { 3, 3, 1, 258, 110, 85, 44, 23, 53, 0 }, + //------------------------------------------------------------------------------- + { 5, 8, 0, 256, 152, 208, 67, 27, 40, 0 }, + //------------------------------------------------------------------------------- + { 6, 0, 0, 3, 103, 185, 69, 23, 76, 0 }, + { 6, 1, 0, 97, 117, 34, 148, 36, 31, 0 }, + { 6, 2, 0, 28, 100, 219, 72, 64, 97, 0 }, + //------------------------------------------------------------------------------- + { 7, 35, 0, 1, 72, 158, 162, 19, 12, 0 }, + //------------------------------------------------------------------------------- + { 12, 16, 0, 1, 131, 106, 117, 55, 68, 0 }, + //------------------------------------------------------------------------------- + { 17, 15, 1, 1, 135, 108, 65, 44, 63, 0 }, + //------------------------------------------------------------------------------- + { 21, 0, 1, 2, 171, 84, 126, 17, 26, 0 }, + { 21, 10, 1, 20, 163, 257, 149, 14, 34, 0 }, + //------------------------------------------------------------------------------- + { 22, 24, 1, 2, 187, 107, 106, 62, 12, 0 }, + { 22, 27, 0, 32, 181, 203, 88, 13, 5, 0 }, + { 22, 26, 0, 2, 133, 137, 83, 29, 53, 0 }, + { 22, 26, 1, 65, 174, 109, 145, 55, 25, 0 }, + //------------------------------------------------------------------------------- + { 24, 1, 1, 1, 163, 225, 124, 12, 36, 0 }, + { 24, 2, 1, 14, 153, 30, 107, 23, 46, 0 }, + //------------------------------------------------------------------------------- + { 26, 2, 1, 1, 130, 87, 44, 50, 69, 0 }, + { 26, 12, 1, 52, 177, 272, 103, 27, 22, 0 }, + { 26, 18, 0, 80, 133, 199, 95, 50, 66, 0 }, + //------------------------------------------------------------------------------- + { 27, 5, 1, 1, 175, 59, 109, 17, 24, 1 }, + { 27, 6, 1, 19, 177, 161, 103, 18, 22, 1 }, + //------------------------------------------------------------------------------- + { 29, 4, 1, 12, 113, 247, 49, 41, 84, 0 }, + //------------------------------------------------------------------------------- + { 30, 4, 1, 1, 148, 148, 66, 35, 51, 0 }, + { 30, 16, 1, 37, 173, 109, 84, 20, 26, 0 }, + //------------------------------------------------------------------------------- + { 31, 13, 1, 1, 163, 116, 41, 61, 36, 0 }, + { 31, 5, 1, 1, 78, 245, 63, 30, 84, 0 }, + //------------------------------------------------------------------------------- + { 34, 7, 1, 99, 127, 73, 41, 79, 72, 0 }, + { 34, 8, 1, 36, 129, 153, 41, 62, 65, 0 }, + //------------------------------------------------------------------------------- + { 35, 14, 1, 1, 86, 246, 65, 68, 87, 0 }, + { 35, 17, 1, 70, 150, 118, 52, 40, 23, 0 }, + //------------------------------------------------------------------------------- + { 49, 6, 0, 2, 136, 176, 81, 49, 62, 0 }, + //------------------------------------------------------------------------------- + { 53, 1, 0, 2, 113, 205, 50, 38, 86, 1 }, + { 53, 2, 0, 41, 159, 27, 117, 25, 40, 0 }, + { 53, 9, 1, 67, 184, 56, 93, 32, 15, 0 }, + //------------------------------------------------------------------------------- + { 54, 5, 1, 168, 156, 187, 111, 7, 11, 0 }, + { 54, 12, 1, 16, 156, 190, 64, 18, 24, 0 }, + //------------------------------------------------------------------------------- + { 56, 10, 0, 2, 126, 42, 67, 57, 67, 0 }, + { 56, 11, 1, 60, 160, 128, 97, 103, 38, 0 }, + //------------------------------------------------------------------------------- + { 58, 0, 0, 1, 156, 143, 120, 120, 43, 0 }, + { 58, 1, 2, 252, 171, 173, 116, 25, 28, 1 }, + //------------------------------------------------------------------------------- + { 59, 4, 0, 1, 146, 65, 106, 83, 40, 1 } +}; + +const RoomUpdate roomUpdates[] = { + // room flag val x1 y1 x2 y2 width height type + { 5, -1, -1, 114, 130, 211, 87, 109, 69, 1 }, + { 15, -1, -1, 1, 154, 83, 122, 131, 44, 1 }, + { 17, -1, -1, 48, 135, 78, 139, 80, 30, 1 }, + { 18, 24, 1, 177, 1, 69, 29, 142, 130, 1 }, + { 18, -1, -1, 105, 132, 109, 108, 196, 65, 1 }, + { 20, -1, -1, 1, 137, 106, 121, 213, 61, 1 }, + { 27, -1, -1, 38, 177, 103, 171, 21, 22, 1 }, + { 27, -1, -1, 60, 162, 228, 156, 18, 37, 1 }, + { 29, -1, -1, 1, 180, 150, 126, 10, 17, 1 }, + { 31, -1, -1, 63, 190, 223, 157, 17, 9, 1 }, + { 34, -1, -1, 5, 171, 234, 126, 29, 23, 1 }, + { 35, -1, -1, 1, 174, 54, 152, 195, 25, 1 }, + { 50, -1, -1, 4, 153, 118, 95, 67, 44, 1 }, + { 57, -1, -1, 7, 113, 166, 61, 62, 82, 1 }, + { 61, -1, -1, 1, 154, 83, 122, 131, 44, 1 }, + { 63, -1, -1, 1, 154, 83, 122, 131, 44, 1 }, +}; + // Note: default action needs to be LAST for each group // of actions with the same number RoomTalkAction roomActions[] = { -- cgit v1.2.3 From 266cf3b760a2299501ac5fe2701780be00d81e15 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 6 Jun 2008 10:01:14 +0000 Subject: Cleanup svn-id: r32574 --- engines/drascula/talk.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 108434fe9a..a6d06a4107 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -106,17 +106,11 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { if (withVoices == 0) centerText(said, 87, 66); updateScreen(); - } else if (talkerType == 3) { - copyBackground(x_talk3[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface); - moveCharacters(); - updateRefresh(); - if (withVoices == 0) - centerText(said, 221, 102); - - updateScreen(); - pause(3); - } else if (talkerType == 4) { - copyBackground(x_talk4[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface); + } else if (talkerType == 3 || talkerType == 4) { + if (talkerType == 3) + copyBackground(x_talk3[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface); + else + copyBackground(x_talk4[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface); moveCharacters(); updateRefresh(); if (withVoices == 0) -- cgit v1.2.3 From 0ee152fbb9b73d44f143792789b23cdbdc68a347 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Fri, 6 Jun 2008 13:34:34 +0000 Subject: - Fixed a valgrind waring - Formatting - Removed an assert svn-id: r32575 --- engines/kyra/resource.cpp | 1 - engines/kyra/staticres.cpp | 14 +++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp index 01702f08b3..afd7eacfda 100644 --- a/engines/kyra/resource.cpp +++ b/engines/kyra/resource.cpp @@ -156,7 +156,6 @@ bool Resource::loadPakFile(const Common::String &filename) { const ResArchiveLoader *loader = getLoader(iter->_value.type); if (!loader) { - assert(loader); error("no archive loader for file '%s' found which is of type %d", filename.c_str(), iter->_value.type); return false; } diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp index 302b92ab07..abdf115c1e 100644 --- a/engines/kyra/staticres.cpp +++ b/engines/kyra/staticres.cpp @@ -1200,31 +1200,31 @@ void KyraEngine_HoF::initStaticResource() { _ingamePakList = _staticres->loadStrings(k2IngamePakFiles, _ingamePakListSize); _sequenceStrings = _staticres->loadStrings(k2SeqplayStrings, _sequenceStringsSize); _ingameSoundList = _staticres->loadStrings(k2IngameSfxFiles, _ingameSoundListSize); - _ingameSoundIndex = (const uint16*) _staticres->loadRawData(k2IngameSfxIndex, _ingameSoundIndexSize); + _ingameSoundIndex = (const uint16 *)_staticres->loadRawData(k2IngameSfxIndex, _ingameSoundIndexSize); _musicFileListIntro = _staticres->loadStrings(k2SeqplayIntroTracks, _musicFileListIntroSize); _musicFileListIngame = _staticres->loadStrings(k2IngameTracks, _musicFileListIngameSize); _musicFileListFinale = _staticres->loadStrings(k2SeqplayFinaleTracks, _musicFileListFinaleSize); _cdaTrackTableIntro = _staticres->loadRawData(k2SeqplayIntroCDA, _cdaTrackTableIntroSize); _cdaTrackTableIngame = _staticres->loadRawData(k2IngameCDA, _cdaTrackTableIngameSize); _cdaTrackTableFinale = _staticres->loadRawData(k2SeqplayFinaleCDA, _cdaTrackTableFinaleSize); - _ingameTalkObjIndex = (const uint16*) _staticres->loadRawData(k2IngameTalkObjIndex, _ingameTalkObjIndexSize); + _ingameTalkObjIndex = (const uint16 *)_staticres->loadRawData(k2IngameTalkObjIndex, _ingameTalkObjIndexSize); _ingameTimJpStr = _staticres->loadStrings(k2IngameTimJpStrings, _ingameTimJpStrSize); _itemAnimData = _staticres->loadShapeAnimData_v2(k2IngameShapeAnimData, _itemAnimDataSize); // replace sequence talkie files with localized versions - const char* const* seqSoundList = _staticres->loadStrings(k2SeqplaySfxFiles, _sequenceSoundListSize); - const char* const* tlkfiles = _staticres->loadStrings(k2SeqplayTlkFiles, tmpSize); - char ** tmpSndLst = new char*[_sequenceSoundListSize]; + const char *const *seqSoundList = _staticres->loadStrings(k2SeqplaySfxFiles, _sequenceSoundListSize); + const char *const *tlkfiles = _staticres->loadStrings(k2SeqplayTlkFiles, tmpSize); + char **tmpSndLst = new char*[_sequenceSoundListSize]; for (int i = 0; i < _sequenceSoundListSize; i++) { - int len = strlen(seqSoundList[i]); + const int len = strlen(seqSoundList[i]); tmpSndLst[i] = new char[len + 1]; tmpSndLst[i][0] = 0; if (tlkfiles && len > 1) { for (int ii = 0; ii < tmpSize; ii++) { - if (!scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1])) + if (strlen(tlkfiles[ii]) > 1 && !scumm_stricmp(&seqSoundList[i][1], &tlkfiles[ii][1])) strcpy(tmpSndLst[i], tlkfiles[ii]); } } -- cgit v1.2.3 From 7c4e375b397fec0ae76db2682e4f33d2eadc9160 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 6 Jun 2008 14:50:19 +0000 Subject: - Cleaned up the code that makes the in-game screensaver pop up - Grouped all the frame_* variables - Removed the unused mouseY_ant variable Renamed: x_dr/y_dr -> drasculaX/drasculaY x_bj/y_bj -> bjX/bjY vb -> VonBraun wolf -> werewolf pos_cabina -> cabinPos dir_lectura -> pal plt -> colorCount palNegra -> blackPalette cont_sv -> framesWithoutAction svn-id: r32577 --- engines/drascula/animation.cpp | 230 ++++++++++++++++++++--------------------- engines/drascula/drascula.cpp | 170 ++++++++++++------------------ engines/drascula/drascula.h | 43 ++++---- engines/drascula/rooms.cpp | 113 ++++++++++---------- engines/drascula/talk.cpp | 32 +++--- 5 files changed, 276 insertions(+), 312 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 13425f7250..f55a388b92 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -186,8 +186,8 @@ void DrasculaEngine::animation_1_1() { loadPic("auxigor.alg", frontSurface); loadPic("auxdr.alg", backSurface); trackDrascula = 0; - x_dr = 129; - y_dr = 95; + drasculaX = 129; + drasculaY = 95; trackIgor = 1; igorX = 66; igorY = 97; @@ -461,8 +461,8 @@ void DrasculaEngine::animation_2_1() { break; for (l = 0; l < 200; l++) factor_red[l] = 99; - x_bj = 170; - y_bj = 90; + bjX = 170; + bjY = 90; trackBJ = 0; curX = 91; curY = 95; @@ -810,28 +810,28 @@ void DrasculaEngine::animation_10_2() { } void DrasculaEngine::animation_14_2() { - int n, pos_cabina[6]; + int cabinPos[6]; int l = 0; loadPic("an14_2.alg", backSurface); - pos_cabina[0] = 150; - pos_cabina[1] = 6; - pos_cabina[2] = 69; - pos_cabina[3] = -160; - pos_cabina[4] = 158; - pos_cabina[5] = 161; + cabinPos[0] = 150; + cabinPos[1] = 6; + cabinPos[2] = 69; + cabinPos[3] = -160; + cabinPos[4] = 158; + cabinPos[5] = 161; - for (n = -160; n <= 0; n = n + 5 + l) { + for (int n = -160; n <= 0; n = n + 5 + l) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); moveCharacters(); - moveVB(); - pos_cabina[3] = n; - copyRectClip(pos_cabina, backSurface, screenSurface); + moveVonBraun(); + cabinPos[3] = n; + copyRectClip(cabinPos, backSurface, screenSurface); updateRefresh(); updateScreen(); - l = l + 1; + l++; } flags[24] = 1; @@ -855,8 +855,6 @@ void DrasculaEngine::animation_15_2() { } void DrasculaEngine::animation_16_2() { - int l; - talk_drunk(12); talk(371); @@ -979,7 +977,7 @@ void DrasculaEngine::animation_16_2() { if (key != 0) goto asco; - for (l = 1; l < 200; l++) { + for (int l = 1; l < 200; l++) { copyBackground(0, 0, 0, l, 320, 200 - l, drawSurface3, screenSurface); copyBackground(0, 200 - l, 0, 0, 320, l, drawSurface1, screenSurface); updateScreen(); @@ -1012,24 +1010,24 @@ void DrasculaEngine::animation_17_2() { } void DrasculaEngine::animation_19_2() { - talk_vbpuerta(5); + talk_vonBraunpuerta(5); } void DrasculaEngine::animation_20_2() { - talk_vbpuerta(7); - talk_vbpuerta(8); + talk_vonBraunpuerta(7); + talk_vonBraunpuerta(8); talk(383); - talk_vbpuerta(9); + talk_vonBraunpuerta(9); talk(384); - talk_vbpuerta(10); + talk_vonBraunpuerta(10); talk(385); - talk_vbpuerta(11); + talk_vonBraunpuerta(11); if (flags[23] == 0) { talk(350); - talk_vbpuerta(57); + talk_vonBraunpuerta(57); } else { talk(386); - talk_vbpuerta(12); + talk_vonBraunpuerta(12); flags[18] = 0; flags[14] = 1; openDoor(15, 1); @@ -1038,15 +1036,15 @@ void DrasculaEngine::animation_20_2() { exitRoom(0); flags[21] = 0; flags[24] = 0; - trackVB = 1; - vbX = 120; + trackVonBraun = 1; + vonBraunX = 120; breakOut = 1; } } void DrasculaEngine::animation_21_2() { - talk_vbpuerta(6); + talk_vonBraunpuerta(6); } void DrasculaEngine::animation_23_2() { @@ -1055,40 +1053,40 @@ void DrasculaEngine::animation_23_2() { flags[21] = 1; if (flags[25] == 0) { - talk_vb(13); - talk_vb(14); + talk_vonBraun(13); + talk_vonBraun(14); pause(10); talk(387); } - talk_vb(15); - placeVB(42); - trackVB = 1; - talk_vb(16); - trackVB = 2; + talk_vonBraun(15); + placeVonBraun(42); + trackVonBraun = 1; + talk_vonBraun(16); + trackVonBraun = 2; gotoObject(157, 147); gotoObject(131, 149); trackProtagonist = 0; animation_14_2(); if (flags[25] == 0) - talk_vb(17); + talk_vonBraun(17); pause(8); - trackVB = 1; - talk_vb(18); + trackVonBraun = 1; + talk_vonBraun(18); if (flags[29] == 0) animation_23_joined(); else animation_23_joined2(); - trackVB = 2; + trackVonBraun = 2; animation_25_2(); - placeVB(99); + placeVonBraun(99); if (flags[29] == 0) { - talk_vb(19); + talk_vonBraun(19); if (flags[25] == 0) { - talk_vb(20); + talk_vonBraun(20); if (removeObject(kItemMoney) == 0) flags[30] = 1; if (removeObject(kItemTwoCoins) == 0) @@ -1096,7 +1094,7 @@ void DrasculaEngine::animation_23_2() { if (removeObject(kItemOneCoin) == 0) flags[32] = 1; } - talk_vb(21); + talk_vonBraun(21); } else animation_27_2(); @@ -1105,7 +1103,7 @@ void DrasculaEngine::animation_23_2() { } void DrasculaEngine::animation_23_joined() { - int n, p_x = curX + 2, p_y = curY - 3; + int p_x = curX + 2, p_y = curY - 3; int x[] = {1, 38, 75, 112, 75, 112, 75, 112, 149, 112, 149, 112, 149, 186, 223, 260, 1, 38, 75, 112, 149, 112, 149, 112, 149, 112, 149, 186, 223, 260, 260, 260, 260, 223}; int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 76, 76, 76, 76, 76, 76, 76, @@ -1113,7 +1111,7 @@ void DrasculaEngine::animation_23_joined() { loadPic("an23.alg", backSurface); - for (n = 0; n < 34; n++) { + for (int n = 0; n < 34; n++) { copyRect(p_x, p_y, p_x, p_y, 36, 74, drawSurface1, screenSurface); copyRect(x[n], y[n], p_x, p_y, 36, 74, backSurface, screenSurface); updateRefresh(); @@ -1125,7 +1123,7 @@ void DrasculaEngine::animation_23_joined() { } void DrasculaEngine::animation_23_joined2() { - int n, p_x = curX + 4, p_y = curY; + int p_x = curX + 4, p_y = curY; int x[] = {1, 35, 69, 103, 137, 171, 205, 239, 273, 1, 35, 69, 103, 137}; int y[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 73, 73, 73, 73, 73}; @@ -1133,7 +1131,7 @@ void DrasculaEngine::animation_23_joined2() { loadPic("an23_2.alg", backSurface); - for (n = 0; n < 14; n++) { + for (int n = 0; n < 14; n++) { copyRect(p_x, p_y, p_x, p_y, 33, 71, drawSurface1, screenSurface); copyRect(x[n], y[n], p_x, p_y, 33, 71, backSurface, screenSurface); updateRefresh(); @@ -1145,32 +1143,32 @@ void DrasculaEngine::animation_23_joined2() { } void DrasculaEngine::animation_25_2() { - int n, pos_cabina[6]; + int cabinPos[6]; loadPic("an14_2.alg", backSurface); loadPic(18, drawSurface1); - pos_cabina[0] = 150; - pos_cabina[1] = 6; - pos_cabina[2] = 69; - pos_cabina[3] = 0; - pos_cabina[4] = 158; - pos_cabina[5] = 161; + cabinPos[0] = 150; + cabinPos[1] = 6; + cabinPos[2] = 69; + cabinPos[3] = 0; + cabinPos[4] = 158; + cabinPos[5] = 161; flags[24] = 0; playSound(6); - for (n = 0; n >= -160; n = n - 8) { + for (int n = 0; n >= -160; n = n - 8) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); moveCharacters(); - moveVB(); + moveVonBraun(); - pos_cabina[3] = n; + cabinPos[3] = n; - copyRectClip(pos_cabina, backSurface, screenSurface); + copyRectClip(cabinPos, backSurface, screenSurface); updateRefresh(); updateScreen(); @@ -1188,46 +1186,46 @@ void DrasculaEngine::animation_27_2() { removeObject(kItemEarWithEarPlug); addObject(kItemEarplugs); - talk_vb(23); - talk_vb(24); + talk_vonBraun(23); + talk_vonBraun(24); if (flags[30] == 1) addObject(kItemMoney); if (flags[31] == 1) addObject(kItemTwoCoins); if (flags[32] == 1) addObject(kItemOneCoin); - talk_vb(25); - talk_vb(26); + talk_vonBraun(25); + talk_vonBraun(26); } void DrasculaEngine::animation_28_2() { for(int i = 27; i <= 30; i++) - talk_vb(i); + talk_vonBraun(i); } void DrasculaEngine::animation_29_2() { if (flags[33] == 0) { - talk_vb(32); + talk_vonBraun(32); talk(398); - talk_vb(33); + talk_vonBraun(33); talk(399); - talk_vb(34); - talk_vb(35); + talk_vonBraun(34); + talk_vonBraun(35); talk(400); - talk_vb(36); - talk_vb(37); + talk_vonBraun(36); + talk_vonBraun(37); talk(386); - talk_vb(38); - talk_vb(39); + talk_vonBraun(38); + talk_vonBraun(39); talk(401); - talk_vb(40); - talk_vb(41); + talk_vonBraun(40); + talk_vonBraun(41); flags[33] = 1; } else - talk_vb(43); + talk_vonBraun(43); talk(402); - talk_vb(42); + talk_vonBraun(42); if (flags[38] == 0) { talk(403); @@ -1237,13 +1235,13 @@ void DrasculaEngine::animation_29_2() { } void DrasculaEngine::animation_30_2() { - talk_vb(31); + talk_vonBraun(31); talk(396); } void DrasculaEngine::animation_31_2() { - talk_vb(44); - placeVB(-50); + talk_vonBraun(44); + placeVonBraun(-50); pause(15); gotoObject(159, 140); loadPic(99, backSurface); @@ -1256,24 +1254,24 @@ void DrasculaEngine::animation_31_2() { updateScreen(); pause(22); talk(406); - placeVB(98); - talk_vb(45); - talk_vb(46); - talk_vb(47); + placeVonBraun(98); + talk_vonBraun(45); + talk_vonBraun(46); + talk_vonBraun(47); talk(407); - talk_vb(48); - talk_vb(49); + talk_vonBraun(48); + talk_vonBraun(49); talk(408); - talk_vb(50); - talk_vb(51); + talk_vonBraun(50); + talk_vonBraun(51); talk(409); - talk_vb(52); - talk_vb(53); + talk_vonBraun(52); + talk_vonBraun(53); pause(12); - talk_vb(54); - talk_vb(55); + talk_vonBraun(54); + talk_vonBraun(55); talk(410); - talk_vb(56); + talk_vonBraun(56); breakOut = 1; @@ -1537,20 +1535,20 @@ void DrasculaEngine::animation_4_5() { updateRoom(); updateScreen(); talk(228); - talk_wolf(1); - talk_wolf(2); + talk_werewolf(1); + talk_werewolf(2); pause(23); talk(229); - talk_wolf(3); - talk_wolf(4); + talk_werewolf(3); + talk_werewolf(4); talk(230); - talk_wolf(5); + talk_werewolf(5); talk(231); - talk_wolf(6); - talk_wolf(7); + talk_werewolf(6); + talk_werewolf(7); pause(33); talk(232); - talk_wolf(8); + talk_werewolf(8); } void DrasculaEngine::animation_5_5(){ @@ -1629,24 +1627,24 @@ void DrasculaEngine::animation_5_5(){ } void DrasculaEngine::animation_6_5() { - talk_wolf(9); + talk_werewolf(9); talk(234); } void DrasculaEngine::animation_7_5() { - talk_wolf(10); + talk_werewolf(10); talk(236); - talk_wolf(11); - talk_wolf(12); - talk_wolf(13); + talk_werewolf(11); + talk_werewolf(12); + talk_werewolf(13); pause(34); - talk_wolf(14); + talk_werewolf(14); } void DrasculaEngine::animation_8_5() { - talk_wolf(15); + talk_werewolf(15); talk(238); - talk_wolf(16); + talk_werewolf(16); } void DrasculaEngine::animation_9_5() { @@ -2289,7 +2287,7 @@ void DrasculaEngine::animation_13_2() { void DrasculaEngine::animation_18_2() { talk(378); - talk_vbpuerta(4); + talk_vonBraunpuerta(4); converse(3); } @@ -2303,11 +2301,11 @@ void DrasculaEngine::animation_22_2() { finishSound(); trackProtagonist = 1; - talk_vbpuerta(1); + talk_vonBraunpuerta(1); talk(375); - talk_vbpuerta(2); + talk_vonBraunpuerta(2); talk(376); - talk_vbpuerta(3); + talk_vonBraunpuerta(3); flags[18] = 1; } @@ -2328,7 +2326,7 @@ void DrasculaEngine::animation_24_2() { flags[21] = 1; - talk_vb(22); + talk_vonBraun(22); if (flags[22] == 0) converse(4); @@ -2338,8 +2336,8 @@ void DrasculaEngine::animation_24_2() { exitRoom(0); flags[21] = 0; flags[24] = 0; - trackVB = 1; - vbX = 120; + trackVonBraun = 1; + vonBraunX = 120; } void DrasculaEngine::animation_32_2() { diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 9d38d28887..4f4910e304 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -130,22 +130,20 @@ int DrasculaEngine::go() { savedTime = 0; changeColor = 0; breakOut = 0; - vbX = 120; trackVB = 1; vbHasMoved = 0; frame_vb = 1; - frame_piano = 0; - frame_drunk = 0; - frame_candles = 0; - cont_sv = 0; + vonBraunX = 120; trackVonBraun = 1; vonBraunHasMoved = 0; + framesWithoutAction = 0; term_int = 0; musicStopped = 0; selectionMade = 0; UsingMem = 0; globalSpeed = 0; - frame_blind = 0; - frame_snore = 0; - frame_bat = 0; curExcuseLook = 0; curExcuseAction = 0; + for (i = 0; i < 8; i++) + actorFrames[i] = 0; + actorFrames[kFrameVonBraun] = 1; + allocMemory(); withVoices = 0; @@ -180,8 +178,8 @@ int DrasculaEngine::go() { loadPic(99, backSurface); } else if (currentChapter == 6) { igorX = 105, igorY = 85, trackIgor = 1; - x_dr = 62, y_dr = 99, trackDrascula = 1; - frame_pen = 0; + drasculaX = 62, drasculaY = 99, trackDrascula = 1; + actorFrames[kFramePendulum] = 0; flag_tv = 0; pendulumSurface = drawSurface3; @@ -287,30 +285,30 @@ void DrasculaEngine::loadPic(const char *NamePcc, byte *targetSurface, int color setRGB((byte *)cPal, colorCount); } -void DrasculaEngine::setRGB(byte *dir_lectura, int plt) { +void DrasculaEngine::setRGB(byte *pal, int colorCount) { int x, cnt = 0; - for (x = 0; x < plt; x++) { - gamePalette[x][0] = dir_lectura[cnt++] / 4; - gamePalette[x][1] = dir_lectura[cnt++] / 4; - gamePalette[x][2] = dir_lectura[cnt++] / 4; + for (x = 0; x < colorCount; x++) { + gamePalette[x][0] = pal[cnt++] / 4; + gamePalette[x][1] = pal[cnt++] / 4; + gamePalette[x][2] = pal[cnt++] / 4; } setPalette((byte *)&gamePalette); } void DrasculaEngine::black() { int color, component; - DacPalette256 palNegra; + DacPalette256 blackPalette; for (color = 0; color < 256; color++) for (component = 0; component < 3; component++) - palNegra[color][component] = 0; + blackPalette[color][component] = 0; - palNegra[254][0] = 0x3F; - palNegra[254][1] = 0x3F; - palNegra[254][2] = 0x15; + blackPalette[254][0] = 0x3F; + blackPalette[254][1] = 0x3F; + blackPalette[254][2] = 0x15; - setPalette((byte *)&palNegra); + setPalette((byte *)&blackPalette); } void DrasculaEngine::setPalette(byte *PalBuf) { @@ -568,7 +566,7 @@ bool DrasculaEngine::runCurrentChapter() { if (menuScreen == 0 && takeObject == 1) checkObjects(); - + if (rightMouseButton == 1 && menuScreen == 1) { delay(100); if (currentChapter == 2) @@ -578,8 +576,6 @@ bool DrasculaEngine::runCurrentChapter() { setPalette((byte *)&gamePalette); menuScreen = 0; updateEvents(); - if (currentChapter != 3) - cont_sv = 0; } if (rightMouseButton == 1 && menuScreen == 0) { delay(100); @@ -597,26 +593,18 @@ bool DrasculaEngine::runCurrentChapter() { menuScreen = 1; updateEvents(); withoutVerb(); - if (currentChapter != 3) - cont_sv = 0; } if (leftMouseButton == 1 && menuBar == 1) { delay(100); selectVerbFromBar(); - if (currentChapter != 3) - cont_sv = 0; } else if (leftMouseButton == 1 && takeObject == 0) { delay(100); if (verify1()) return true; - if (currentChapter != 3) - cont_sv = 0; } else if (leftMouseButton == 1 && takeObject == 1) { if (verify2()) return true; - if (currentChapter != 3) - cont_sv = 0; } menuBar = (mouseY < 24 && menuScreen == 0) ? 1 : 0; @@ -624,69 +612,53 @@ bool DrasculaEngine::runCurrentChapter() { Common::KeyCode key = getScan(); if (key == Common::KEYCODE_F1 && menuScreen == 0) { selectVerb(1); - if (currentChapter != 3) - cont_sv = 0; } else if (key == Common::KEYCODE_F2 && menuScreen == 0) { selectVerb(2); - if (currentChapter != 3) - cont_sv = 0; } else if (key == Common::KEYCODE_F3 && menuScreen == 0) { selectVerb(3); - if (currentChapter != 3) - cont_sv = 0; } else if (key == Common::KEYCODE_F4 && menuScreen == 0) { selectVerb(4); - cont_sv = 0; } else if (key == Common::KEYCODE_F5 && menuScreen == 0) { selectVerb(5); - if (currentChapter != 3) - cont_sv = 0; } else if (key == Common::KEYCODE_F6 && menuScreen == 0) { selectVerb(6); - if (currentChapter != 3) - cont_sv = 0; } else if (key == Common::KEYCODE_F9) { - volumeControls(); - if (currentChapter != 3) - cont_sv = 0; + volumeControls(); } else if (key == Common::KEYCODE_F10) { if (!saveLoadScreen()) return true; - if (currentChapter != 3) - cont_sv = 0; } else if (key == Common::KEYCODE_F8) { withoutVerb(); - if (currentChapter != 3) - cont_sv = 0; } else if (key == Common::KEYCODE_v) { withVoices = 1; print_abc(_textsys[_lang][2], 96, 86); updateScreen(); delay(1410); - if (currentChapter != 3) - cont_sv = 0; } else if (key == Common::KEYCODE_t) { withVoices = 0; print_abc(_textsys[_lang][3], 94, 86); updateScreen(); delay(1460); - if (currentChapter != 3) - cont_sv = 0; } else if (key == Common::KEYCODE_ESCAPE) { if (!confirmExit()) return false; - if (currentChapter != 3) - cont_sv = 0; } else if (currentChapter == 6 && key == Common::KEYCODE_0 && roomNumber == 61) { loadPic("alcbar.alg", drawSurface1, 255); - } else if (cont_sv == 15000) { - screenSaver(); + } + + if (leftMouseButton != 0 || rightMouseButton != 0 || key != 0) if (currentChapter != 3) - cont_sv = 0; - } else { + framesWithoutAction = 0; + + if (framesWithoutAction == 15000) { + screenSaver(); if (currentChapter != 3) - cont_sv++; + framesWithoutAction = 0; } + + if (currentChapter != 3) + framesWithoutAction++; + } } @@ -1908,8 +1880,8 @@ void DrasculaEngine::placeDrascula() { else if (trackDrascula == 3 && currentChapter == 1) pos_dr[0] = 93; pos_dr[1] = 122; - pos_dr[2] = x_dr; - pos_dr[3] = y_dr; + pos_dr[2] = drasculaX; + pos_dr[3] = drasculaY; pos_dr[4] = 45; pos_dr[5] = 77; @@ -1927,8 +1899,8 @@ void DrasculaEngine::placeBJ() { else if (trackBJ == 0) pos_bj[0] = 37; pos_bj[1] = 99; - pos_bj[2] = x_bj; - pos_bj[3] = y_bj; + pos_bj[2] = bjX; + pos_bj[3] = bjY; pos_bj[4] = 26; pos_bj[5] = 76; @@ -3022,14 +2994,10 @@ int DrasculaEngine::whichObject() { } bool DrasculaEngine::checkMenuFlags() { - int h, n; - - for (n = 0; n < 43; n++) { + for (int n = 0; n < 43; n++) { if (whichObject() == n) { - h = inventoryObjects[n]; - if (h != 0) - if (checkAction(h)) - return true; + if (inventoryObjects[n] != 0 && checkAction(inventoryObjects[n])) + return true; } } @@ -3431,8 +3399,8 @@ void DrasculaEngine::updateVisible() { isDoor[1] = 0; if (roomNumber == 60) { trackDrascula = 0; - x_dr = 155; - y_dr = 69; + drasculaX = 155; + drasculaY = 69; } } } @@ -3449,62 +3417,56 @@ void DrasculaEngine::walkUp() { stepX = 0; } -void DrasculaEngine::moveVB() { +void DrasculaEngine::moveVonBraun() { int pos_vb[6]; - if (vbHasMoved == 0) { + if (vonBraunHasMoved == 0) { pos_vb[0] = 256; pos_vb[1] = 129; - pos_vb[2] = vbX; + pos_vb[2] = vonBraunX; pos_vb[3] = 66; pos_vb[4] = 33; pos_vb[5] = 69; - if (trackVB == 0) + if (trackVonBraun == 0) pos_vb[0] = 222; - else if (trackVB == 1) + else if (trackVonBraun == 1) pos_vb[0] = 188; } else { - pos_vb[2] = vbX; + pos_vb[0] = actorFrames[kFrameVonBraun]; + pos_vb[1] = (trackVonBraun == 0) ? 62 : 131; + pos_vb[2] = vonBraunX; pos_vb[3] = 66; pos_vb[4] = 28; pos_vb[5] = 68; - if (trackVB == 0) { - pos_vb[0] = frame_vb; - pos_vb[1] = 62; - } else { - pos_vb[0] = frame_vb; - pos_vb[1] = 131; - } - - frame_vb = frame_vb + 29; - if (frame_vb > 146) - frame_vb = 1; + actorFrames[kFrameVonBraun] += 29; + if (actorFrames[kFrameVonBraun] > 146) + actorFrames[kFrameVonBraun] = 1; } copyRectClip(pos_vb, frontSurface, screenSurface); } -void DrasculaEngine::placeVB(int pointX) { - trackVB = (pointX < vbX) ? 0 : 1; - vbHasMoved = 1; +void DrasculaEngine::placeVonBraun(int pointX) { + trackVonBraun = (pointX < vonBraunX) ? 0 : 1; + vonBraunHasMoved = 1; for (;;) { updateRoom(); updateScreen(); - if (trackVB == 0) { - vbX = vbX - 5; - if (vbX <= pointX) + if (trackVonBraun == 0) { + vonBraunX = vonBraunX - 5; + if (vonBraunX <= pointX) break; } else { - vbX = vbX + 5; - if (vbX >= pointX) + vonBraunX = vonBraunX + 5; + if (vonBraunX >= pointX) break; } pause(5); } - vbHasMoved = 0; + vonBraunHasMoved = 0; } void DrasculaEngine::hipo_sin_nadie(int counter){ @@ -3565,20 +3527,16 @@ void DrasculaEngine::openDoor(int nflag, int doorNum) { } void DrasculaEngine::showMap() { - int l, veo = 0; + hasName = 0; - for (l = 0; l < numRoomObjs; l++) { + for (int l = 0; l < numRoomObjs; l++) { if (mouseX > x1[l] && mouseY > y1[l] && mouseX < x2[l] && mouseY < y2[l] && visible[l] == 1) { strcpy(textName, objName[l]); hasName = 1; - veo = 1; } } - - if (veo == 0) - hasName = 0; } void DrasculaEngine::grr() { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 23df79485d..38c2e88ea3 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -132,6 +132,17 @@ enum IgorTalkerTypes { kIgorWig = 4 }; +enum AnimFrameTypes { + kFrameBlind = 0, + kFrameSnore = 1, + kFrameBat = 2, + kFrameVonBraun = 3, + kFramePianist = 4, + kFrameDrunk = 5, + kFrameCandles = 6, + kFramePendulum = 7 +}; + #define TEXTD_START 68 struct DrasculaGameDescription; @@ -234,7 +245,7 @@ public: typedef char DacPalette256[256][3]; - void setRGB(byte *dir_lectura, int plt); + void setRGB(byte *pal, int plt); void assignDefaultPalette(); void setPalette(byte *PalBuf); void copyBackground(int xorg, int yorg, int xdes, int ydes, int width, @@ -280,6 +291,8 @@ public: Common::ArjFile _arj; + int actorFrames[8]; + int previousMusic, roomMusic; int roomNumber; char roomDisk[20]; @@ -300,9 +313,6 @@ public: int withVoices; int menuBar, menuScreen, hasName; char textName[20]; - int frame_blind; - int frame_snore; - int frame_bat; int curExcuseLook; int curExcuseAction; @@ -324,18 +334,15 @@ public: int savedTime; int changeColor; int breakOut; - int vbX, trackVB, vbHasMoved, frame_vb; + int vonBraunX, trackVonBraun, vonBraunHasMoved; float newHeight, newWidth; int factor_red[202]; - int frame_piano; - int frame_drunk; - int frame_candles; int color_solo; int blinking; int igorX, igorY, trackIgor; - int x_dr, y_dr, trackDrascula; - int x_bj, y_bj, trackBJ; - int cont_sv; + int drasculaX, drasculaY, trackDrascula; + int bjX, bjY, trackBJ; + int framesWithoutAction; int term_int; int currentChapter; int hay_que_load; @@ -346,7 +353,6 @@ public: int selectionMade; int mouseX; int mouseY; - int mouseY_ant; int leftMouseButton; int rightMouseButton; @@ -355,8 +361,8 @@ public: void pickObject(int); void walkUp(); void walkDown(); - void moveVB(); - void placeVB(int pointX); + void moveVonBraun(); + void placeVonBraun(int pointX); void hipo_sin_nadie(int counter); void openDoor(int nflag, int doorNum); void showMap(); @@ -386,12 +392,12 @@ public: int removeObject(int osj); void playFLI(const char *filefli, int vel); void fadeFromBlack(int fadeSpeed); + void fadeToBlack(int fadeSpeed); char adjustToVGA(char value); void color_abc(int cl); void centerText(const char *,int,int); void playSound(int soundNum); bool animate(const char *animation, int FPS); - void fadeToBlack(int fadeSpeed); void pause(int); void placeIgor(); void placeBJ(); @@ -413,11 +419,11 @@ public: void talk_sync(const char *, const char *, const char *); void talk_drunk(int); void talk_pianist(int); - void talk_wolf(int); + void talk_werewolf(int); void talk_mus(int); void talk_dr_grande(int); - void talk_vb(int); - void talk_vbpuerta(int); + void talk_vonBraun(int); + void talk_vonBraunpuerta(int); void talk_blind(int); void talk_hacker(const char *, const char *); @@ -471,7 +477,6 @@ public: int globalSpeed; uint32 LastFrame; - int frame_pen; int flag_tv; byte *loadPCX(byte *NamePcc); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index f57b4140c4..7aec2e3adb 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1122,16 +1122,16 @@ void DrasculaEngine::update_2() { 41, 41, 41, 41, 4, 4, 4, 4}; - if (frame_bat == 41) - frame_bat = 0; + if (actorFrames[kFrameBat] == 41) + actorFrames[kFrameBat] = 0; - batPos[0] = batX[frame_bat]; - batPos[1] = batY[frame_bat]; + batPos[0] = batX[actorFrames[kFrameBat]]; + batPos[1] = batY[actorFrames[kFrameBat]]; - if (frame_bat < 22) { + if (actorFrames[kFrameBat] < 22) { batPos[4] = 37; batPos[5] = 21; - } else if (frame_bat > 27) { + } else if (actorFrames[kFrameBat] > 27) { batPos[4] = 57; batPos[5] = 36; } else { @@ -1145,7 +1145,7 @@ void DrasculaEngine::update_2() { copyRectClip(batPos, drawSurface3, screenSurface); difference = getTime() - savedTime; if (difference >= 6) { - frame_bat++; + actorFrames[kFrameBat]++; savedTime = getTime(); } @@ -1185,17 +1185,18 @@ void DrasculaEngine::update_9_pre() { int blindY[] = {51, 51, 51, 51, 51, 51, 51, 127, 127}; int difference; - copyRect(blindX[frame_blind], blindY[frame_blind], 122, 57, 41, 72, drawSurface3, screenSurface); + copyRect(blindX[actorFrames[kFrameBlind]], blindY[actorFrames[kFrameBlind]], + 122, 57, 41, 72, drawSurface3, screenSurface); if (flags[9] == 0) { difference = getTime() - savedTime; if (difference >= 11) { - frame_blind++; + actorFrames[kFrameBlind]++; savedTime = getTime(); } - if (frame_blind == 9) - frame_blind = 0; + if (actorFrames[kFrameBlind] == 9) + actorFrames[kFrameBlind] = 0; } else - frame_blind = 3; + actorFrames[kFrameBlind] = 3; } void DrasculaEngine::update_13() { @@ -1216,39 +1217,39 @@ void DrasculaEngine::update_14_pre() { int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1}; int difference; - copyBackground(123, candleY[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface); - copyBackground(candleX[frame_candles], 146, 311, 80, 4, 8, drawSurface3, screenSurface); + copyBackground(123, candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(candleX[actorFrames[kFrameCandles]], 146, 311, 80, 4, 8, drawSurface3, screenSurface); if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); if (curX > 101 && curX < 155) copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface); if (flags[11] == 0) - copyBackground(pianistX[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface); + copyBackground(pianistX[actorFrames[kFramePianist]], 157, 245, 130, 29, 42, drawSurface3, screenSurface); else if (flags[5] == 0) copyBackground(145, 139, 228, 112, 47, 60, extraSurface, screenSurface); else copyBackground(165, 140, 229, 117, 43, 59, drawSurface3, screenSurface); if (flags[12] == 1) - copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); + copyBackground(drunkX[actorFrames[kFrameDrunk]], 82, 170, 50, 40, 53, drawSurface3, screenSurface); difference = getTime() - savedTime; if (difference > 6) { if (flags[12] == 1) { - frame_drunk++; - if (frame_drunk == 8) { - frame_drunk = 0; + actorFrames[kFrameDrunk]++; + if (actorFrames[kFrameDrunk] == 8) { + actorFrames[kFrameDrunk] = 0; flags[12] = 0; } } else if ((_rnd->getRandomNumber(94) == 15) && (flags[13] == 0)) flags[12] = 1; - frame_candles++; - if (frame_candles == 3) - frame_candles = 0; - frame_piano++; - if (frame_piano == 9) - frame_piano = 0; + actorFrames[kFrameCandles]++; + if (actorFrames[kFrameCandles] == 3) + actorFrames[kFrameCandles] = 0; + actorFrames[kFramePianist]++; + if (actorFrames[kFramePianist] == 9) + actorFrames[kFramePianist] = 0; blinking = _rnd->getRandomNumber(10); savedTime = getTime(); } @@ -1273,15 +1274,17 @@ void DrasculaEngine::update_18_pre() { if (flags[21] == 0) { copyBackground(1, 69, 120, 58, 56, 61, drawSurface3, screenSurface); - copyBackground(snore_x[frame_snore], snore_y[frame_snore], 124, 59, 40, 37, drawSurface3, screenSurface); + copyBackground(snore_x[actorFrames[kFrameSnore]], + snore_y[actorFrames[kFrameSnore]], + 124, 59, 40, 37, drawSurface3, screenSurface); } else - moveVB(); + moveVonBraun(); difference = getTime() - savedTime; if (difference > 9) { - frame_snore++; - if (frame_snore == 16) - frame_snore = 0; + actorFrames[kFrameSnore]++; + if (actorFrames[kFrameSnore] == 16) + actorFrames[kFrameSnore] = 0; savedTime = getTime(); } } @@ -1361,7 +1364,7 @@ void DrasculaEngine::update_60_pre() { if (flags[5] == 0) placeDrascula(); - copyBackground(123, candleY[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(123, candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); if (flag_tv == 1) copyBackground(114, 158, 8, 30, 8, 23, drawSurface3, screenSurface); @@ -1373,15 +1376,15 @@ void DrasculaEngine::update_60_pre() { else if (blinking == 5 && flag_tv == 1) flag_tv = 0; if (difference > 6) { - frame_candles++; - if (frame_candles == 3) - frame_candles = 0; + actorFrames[kFrameCandles]++; + if (actorFrames[kFrameCandles] == 3) + actorFrames[kFrameCandles] = 0; savedTime = getTime(); } } void DrasculaEngine::update_60() { - if (curY - 10 < y_dr && flags[5] == 0) + if (curY - 10 < drasculaY && flags[5] == 0) placeDrascula(); } @@ -1392,8 +1395,8 @@ void DrasculaEngine::update_62_pre() { int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1 }; int difference; - copyBackground(123, candleY[frame_candles], 142, 14, 39, 13, drawSurface3, screenSurface); - copyBackground(candleX[frame_candles], 146, 311, 80, 4, 8, drawSurface3, screenSurface); + copyBackground(123, candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(candleX[actorFrames[kFrameCandles]], 146, 311, 80, 4, 8, drawSurface3, screenSurface); if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); @@ -1402,32 +1405,32 @@ void DrasculaEngine::update_62_pre() { copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface); if (flags[11] == 0) - copyBackground(pianistX[frame_piano], 157, 245, 130, 29, 42, drawSurface3, screenSurface); + copyBackground(pianistX[actorFrames[kFramePianist]], 157, 245, 130, 29, 42, drawSurface3, screenSurface); else if (flags[5] == 0) copyBackground(145, 139, 228, 112, 47, 60, extraSurface, screenSurface); else copyBackground(165, 140, 229, 117, 43, 59, drawSurface3, screenSurface); if (flags[12] == 1) - copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); + copyBackground(drunkX[actorFrames[kFrameDrunk]], 82, 170, 50, 40, 53, drawSurface3, screenSurface); difference = getTime() - savedTime; if (difference > 6) { if (flags[12] == 1) { - frame_drunk++; - if (frame_drunk == 8) { - frame_drunk = 0; + actorFrames[kFrameDrunk]++; + if (actorFrames[kFrameDrunk] == 8) { + actorFrames[kFrameDrunk] = 0; flags[12] = 0; } } else if ((_rnd->getRandomNumber(94) == 15) && (flags[13] == 0)) flags[12] = 1; - frame_candles++; - if (frame_candles == 3) - frame_candles = 0; - frame_piano++; - if (frame_piano == 9) - frame_piano = 0; + actorFrames[kFrameCandles]++; + if (actorFrames[kFrameCandles] == 3) + actorFrames[kFrameCandles] = 0; + actorFrames[kFramePianist]++; + if (actorFrames[kFramePianist] == 9) + actorFrames[kFramePianist] = 0; blinking = _rnd->getRandomNumber(10); savedTime = getTime(); } @@ -1440,7 +1443,7 @@ void DrasculaEngine::update_62() { if (curY + curHeight < 89) { copyRect(205, 1, 180, 9, 82, 80, drawSurface3, screenSurface); - copyBackground(drunkX[frame_drunk], 82, 170, 50, 40, 53, drawSurface3, screenSurface); + copyBackground(drunkX[actorFrames[kFrameDrunk]], 82, 170, 50, 40, 53, drawSurface3, screenSurface); } } @@ -1448,14 +1451,14 @@ void DrasculaEngine::update_102() { int pendulum_x[] = {40, 96, 152, 208, 264, 40, 96, 152, 208, 208, 152, 264, 40, 96, 152, 208, 264}; int difference; - if (frame_pen <= 4) + if (actorFrames[kFramePendulum] <= 4) pendulumSurface = drawSurface3; - else if (frame_pen <= 11) + else if (actorFrames[kFramePendulum] <= 11) pendulumSurface = extraSurface; else pendulumSurface = frontSurface; - copyBackground(pendulum_x[frame_pen], 19, 152, 0, 55, 125, pendulumSurface, screenSurface); + copyBackground(pendulum_x[actorFrames[kFramePendulum]], 19, 152, 0, 55, 125, pendulumSurface, screenSurface); if (flags[1] == 2) copyRect(18, 145, 145, 105, 25, 29, drawSurface3, screenSurface); @@ -1465,9 +1468,9 @@ void DrasculaEngine::update_102() { difference = getTime() - savedTime; if (difference > 8) { - frame_pen++; - if (frame_pen == 17) - frame_pen = 0; + actorFrames[kFramePendulum]++; + if (actorFrames[kFramePendulum] == 17) + actorFrames[kFramePendulum] = 0; savedTime = getTime(); } } diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index a6d06a4107..d013186beb 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -161,16 +161,16 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) { if (currentChapter == 6) moveCharacters(); - copyBackground(x_dr, y_dr, x_dr, y_dr, 38 + offset, 31, drawSurface1, screenSurface); + copyBackground(drasculaX, drasculaY, drasculaX, drasculaY, 38 + offset, 31, drawSurface1, screenSurface); if (currentChapter == 6) - copyRect(x_talk[face], offset2, x_dr + offset, y_dr, 38, 31, drawSurface2, screenSurface); + copyRect(x_talk[face], offset2, drasculaX + offset, drasculaY, 38, 31, drawSurface2, screenSurface); else - copyRect(x_talk[face], offset2, x_dr + offset, y_dr, 38, 31, backSurface, screenSurface); + copyRect(x_talk[face], offset2, drasculaX + offset, drasculaY, 38, 31, backSurface, screenSurface); updateRefresh(); if (withVoices == 0) - centerText(said, x_dr + 19, y_dr); + centerText(said, drasculaX + 19, drasculaY); updateScreen(); @@ -303,16 +303,16 @@ void DrasculaEngine::talk_bj(int index) { updateRefresh_pre(); - copyBackground(x_bj + 2, y_bj - 1, x_bj + 2, y_bj - 1, 27, 40, + copyBackground(bjX + 2, bjY - 1, bjX + 2, bjY - 1, 27, 40, drawSurface1, screenSurface); - copyRect(x_talk[face], 99, x_bj + 2, y_bj - 1, 27, 40, + copyRect(x_talk[face], 99, bjX + 2, bjY - 1, 27, 40, drawSurface3, screenSurface); moveCharacters(); updateRefresh(); if (withVoices == 0) - centerText(said, x_bj + 7, y_bj); + centerText(said, bjX + 7, bjY); updateScreen(); @@ -546,7 +546,7 @@ void DrasculaEngine::talk_drunk(int index) { } } -void DrasculaEngine::talk_vb(int index) { +void DrasculaEngine::talk_vonBraun(int index) { char filename[20]; sprintf(filename, "VB%i.als", index); const char *said = _textvb[_lang][index]; @@ -558,23 +558,23 @@ void DrasculaEngine::talk_vb(int index) { talkInit(filename); - copyBackground(vbX + 5, 64, OBJWIDTH + 1, 0, 25, 27, drawSurface1, drawSurface3); + copyBackground(vonBraunX + 5, 64, OBJWIDTH + 1, 0, 25, 27, drawSurface1, drawSurface3); do { - if (trackVB == 1) { + if (trackVonBraun == 1) { face = _rnd->getRandomNumber(5); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); moveCharacters(); - moveVB(); + moveVonBraun(); - copyBackground(OBJWIDTH + 1, 0, vbX + 5, 64, 25, 27, drawSurface3, screenSurface); - copyRect(x_talk[face], 34, vbX + 5, 64, 25, 27, frontSurface, screenSurface); + copyBackground(OBJWIDTH + 1, 0, vonBraunX + 5, 64, 25, 27, drawSurface3, screenSurface); + copyRect(x_talk[face], 34, vonBraunX + 5, 64, 25, 27, frontSurface, screenSurface); updateRefresh(); } if (withVoices == 0) - centerText(said, vbX, 66); + centerText(said, vonBraunX, 66); updateScreen(); @@ -587,7 +587,7 @@ void DrasculaEngine::talk_vb(int index) { playMusic(roomMusic); } -void DrasculaEngine::talk_vbpuerta(int index) { +void DrasculaEngine::talk_vonBraunpuerta(int index) { char filename[20]; sprintf(filename, "VB%i.als", index); const char *said = _textvb[_lang][index]; @@ -688,7 +688,7 @@ void DrasculaEngine::talk_hacker(const char *said, const char *filename) { } while (!isTalkFinished(&length)); } -void DrasculaEngine::talk_wolf(int index) { +void DrasculaEngine::talk_werewolf(int index) { char filename[20]; sprintf(filename, "L%i.als", index); const char *said = _textl[_lang][index]; -- cgit v1.2.3 From 7a05f382c24d90bb4a93e12cf336aabf4ad30754 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 6 Jun 2008 17:58:08 +0000 Subject: Initialize roomNumber correctly svn-id: r32579 --- engines/drascula/drascula.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 4f4910e304..c93917f8d0 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -139,6 +139,7 @@ int DrasculaEngine::go() { globalSpeed = 0; curExcuseLook = 0; curExcuseAction = 0; + roomNumber = 0; for (i = 0; i < 8; i++) actorFrames[i] = 0; -- cgit v1.2.3 From 31bb8c01c7b389869564ebfbb5a5ac61be57c11f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 6 Jun 2008 18:28:50 +0000 Subject: Removed the useless textSurface buffer frame_x -> frameX candleX, candleY, pianistX and drunkX are used in more than one place svn-id: r32580 --- engines/drascula/animation.cpp | 64 ------------------------------------------ engines/drascula/drascula.cpp | 13 +++------ engines/drascula/drascula.h | 3 +- engines/drascula/rooms.cpp | 11 -------- engines/drascula/staticdata.h | 7 +++-- 5 files changed, 10 insertions(+), 88 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index f55a388b92..76c2843735 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -396,9 +396,6 @@ void DrasculaEngine::animation_2_1() { if (animate("ag.bin", 14)) break; - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -407,9 +404,6 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - if (_lang == kSpanish) - textSurface = extraSurface; - loadPic(97, extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -591,9 +585,6 @@ void DrasculaEngine::animation_2_1() { } void DrasculaEngine::animation_3_1() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface); talk(192); @@ -619,16 +610,10 @@ void DrasculaEngine::animation_3_1() { flags[0] = 1; - if (_lang == kSpanish) - textSurface = extraSurface; - loadPic(97, extraSurface); } void DrasculaEngine::animation_4_1() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an12.alg", extraSurface); talk(205); @@ -660,9 +645,6 @@ void DrasculaEngine::animation_4_1() { talk_pianist(4); talk(209); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[11] = 0; loadPic(97, extraSurface); } @@ -728,9 +710,6 @@ void DrasculaEngine::animation_4_2() { loadPic("ciego4.alg", backSurface); loadPic("ciego5.alg", frontSurface); - if (_lang == kSpanish) - textSurface = frontSurface; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); @@ -776,9 +755,6 @@ void DrasculaEngine::animation_4_2() { loadPic(99, backSurface); withoutVerb(); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[9] = 0; flags[4] = 1; } @@ -1931,9 +1907,6 @@ void DrasculaEngine::animation_1_6() { trackDrascula = 0; talk_drascula(35); - if (_lang == kSpanish) - textSurface = extraSurface; - clearRoom(); enterRoom(102); activatePendulum(); @@ -2145,9 +2118,6 @@ void DrasculaEngine::animation_19_6() { } void DrasculaEngine::animation_12_2() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an12.alg", extraSurface); talk(356); @@ -2173,17 +2143,11 @@ void DrasculaEngine::animation_12_2() { talk_pianist(5); converse(1); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[11] = 0; loadPic(974, extraSurface); } void DrasculaEngine::animation_26_2() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an12.alg", extraSurface); talk(392); @@ -2234,9 +2198,6 @@ void DrasculaEngine::animation_26_2() { pickObject(11); removeObject(kItemBook); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[11] = 0; flags[39] = 1; loadPic(974, extraSurface); @@ -2244,9 +2205,6 @@ void DrasculaEngine::animation_26_2() { } void DrasculaEngine::animation_11_2() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface); talk(352); @@ -2259,9 +2217,6 @@ void DrasculaEngine::animation_11_2() { pause(40); talk_bartender(82); - if (_lang == kSpanish) - textSurface = extraSurface; - loadPic(974, extraSurface); } @@ -2389,9 +2344,6 @@ void DrasculaEngine::animation_34_2() { } void DrasculaEngine::animation_36_2() { - if (_lang == kSpanish) - textSurface = frontSurface; - loadPic("an11y13.alg", extraSurface); talk(404); @@ -2401,10 +2353,6 @@ void DrasculaEngine::animation_36_2() { talk(355); pause(40); talk_bartender(82); - - if (_lang == kSpanish) - textSurface = extraSurface; - loadPic(974, extraSurface); } @@ -2504,9 +2452,6 @@ void DrasculaEngine::animation_6_2() { stopMusic(); flags[9] = 1; - if (_lang == kSpanish) - textSurface = frontSurface; - clearRoom(); loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind loadPic("ciego2.alg", drawSurface3); @@ -2541,9 +2486,6 @@ void DrasculaEngine::animation_6_2() { loadPic(99, backSurface); withoutVerb(); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[9] = 0; } @@ -2562,9 +2504,6 @@ void DrasculaEngine::animation_33_2() { loadPic("ciego4.alg", backSurface); loadPic("ciego5.alg", frontSurface); - if (_lang == kSpanish) - textSurface = frontSurface; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); @@ -2593,9 +2532,6 @@ void DrasculaEngine::animation_33_2() { loadPic(99, backSurface); withoutVerb(); - if (_lang == kSpanish) - textSurface = extraSurface; - flags[33] = 1; flags[9] = 0; } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index c93917f8d0..4cd511001c 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -401,18 +401,13 @@ void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int wi bool DrasculaEngine::runCurrentChapter() { int n; - if (_lang == kSpanish) - textSurface = extraSurface; - else - textSurface = tableSurface; - previousMusic = -1; if (currentChapter != 2) { int soc = 0; for (n = 0; n < 6; n++) { soc = soc + CHARACTER_WIDTH; - frame_x[n] = soc; + frameX[n] = soc; } } @@ -932,7 +927,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { soc = 0; for (l = 0; l < 6; l++) { soc += curWidth; - frame_x[l] = soc; + frameX[l] = soc; } } @@ -1452,7 +1447,7 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { textPos[4] = CHAR_WIDTH; textPos[5] = CHAR_HEIGHT; - copyRectClip(textPos, textSurface, screenSurface); + copyRectClip(textPos, tableSurface, screenSurface); screenX = screenX + CHAR_WIDTH; if (screenX > 317) { @@ -2276,7 +2271,7 @@ void DrasculaEngine::moveCharacters() { factor_red[curY + curHeight], frontSurface, screenSurface); } } else if (characterMoved == 1) { - curPos[0] = frame_x[num_frame]; + curPos[0] = frameX[num_frame]; curPos[1] = frame_y + DIF_MASK_HARE; curPos[2] = curX; curPos[3] = curY; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 38c2e88ea3..aeb63eba9d 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -283,7 +283,6 @@ public: byte *extraSurface; // not sure about this one, was "dir_hare_dch" byte *screenSurface; byte *frontSurface; - byte *textSurface; byte *pendulumSurface; byte cPal[768]; @@ -690,7 +689,7 @@ extern const char *_textmisc[][2]; extern const char *_textd1[][11]; extern const ItemLocation itemLocations[]; -extern int frame_x[20]; +extern int frameX[20]; extern const int x_pol[44], y_pol[44]; extern const int verbBarX[]; extern const int x1d_menu[], y1d_menu[]; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 7aec2e3adb..08d4e8ab4c 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1211,10 +1211,6 @@ void DrasculaEngine::update_13() { } void DrasculaEngine::update_14_pre() { - int candleY[] = {158, 172, 186}; - int candleX[] = {14, 19, 24}; - int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31}; - int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1}; int difference; copyBackground(123, candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); @@ -1358,7 +1354,6 @@ void DrasculaEngine::update_59_pre() { } void DrasculaEngine::update_60_pre() { - int candleY[] = {158, 172, 186}; int difference; if (flags[5] == 0) @@ -1389,10 +1384,6 @@ void DrasculaEngine::update_60() { } void DrasculaEngine::update_62_pre() { - int candleY[] = { 158, 172, 186 }; - int candleX[] = { 14, 19, 24 }; - int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31 }; - int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1 }; int difference; copyBackground(123, candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); @@ -1437,8 +1428,6 @@ void DrasculaEngine::update_62_pre() { } void DrasculaEngine::update_62() { - int drunkX[] = { 1, 42, 83, 124, 165, 206, 247, 1 }; - copyRect(1, 1, 0, 0, 62, 142, drawSurface2, screenSurface); if (curY + curHeight < 89) { diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 5fb404f4e1..8a5890bd7a 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -122,8 +122,11 @@ const int x1d_menu[] = {280, 40, 80, 120, 160, 200, 240, 0, 40, 80, 120, 40, 80, 120, 160, 200, 240, 0}; const int y1d_menu[] = {0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25, 50, 50, 50, 50, 50, 50, 50, 75, 75, 75, 75, 75, 75, 75, 100}; -int frame_x[20] = {43, 87, 130, 173, 216, 259}; - +int frameX[20] = {43, 87, 130, 173, 216, 259}; +int candleX[] = {14, 19, 24}; +int candleY[] = {158, 172, 186}; +int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31}; +int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1}; const RoomUpdate roomPreUpdates[] = { // room flag val x1 y1 x2 y2 width height type -- cgit v1.2.3 From c6f72c52df4bd9d39b0364c7403085a552789b14 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Jun 2008 19:17:21 +0000 Subject: Partially reverted r32580. That surface is used by Spanish version. svn-id: r32581 --- engines/drascula/animation.cpp | 64 ++++++++++++++++++++++++++++++++++++++++++ engines/drascula/drascula.cpp | 7 ++++- engines/drascula/drascula.h | 1 + 3 files changed, 71 insertions(+), 1 deletion(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 76c2843735..f55a388b92 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -396,6 +396,9 @@ void DrasculaEngine::animation_2_1() { if (animate("ag.bin", 14)) break; + if (_lang == kSpanish) + textSurface = frontSurface; + loadPic("an11y13.alg", extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -404,6 +407,9 @@ void DrasculaEngine::animation_2_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; + if (_lang == kSpanish) + textSurface = extraSurface; + loadPic(97, extraSurface); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; @@ -585,6 +591,9 @@ void DrasculaEngine::animation_2_1() { } void DrasculaEngine::animation_3_1() { + if (_lang == kSpanish) + textSurface = frontSurface; + loadPic("an11y13.alg", extraSurface); talk(192); @@ -610,10 +619,16 @@ void DrasculaEngine::animation_3_1() { flags[0] = 1; + if (_lang == kSpanish) + textSurface = extraSurface; + loadPic(97, extraSurface); } void DrasculaEngine::animation_4_1() { + if (_lang == kSpanish) + textSurface = frontSurface; + loadPic("an12.alg", extraSurface); talk(205); @@ -645,6 +660,9 @@ void DrasculaEngine::animation_4_1() { talk_pianist(4); talk(209); + if (_lang == kSpanish) + textSurface = extraSurface; + flags[11] = 0; loadPic(97, extraSurface); } @@ -710,6 +728,9 @@ void DrasculaEngine::animation_4_2() { loadPic("ciego4.alg", backSurface); loadPic("ciego5.alg", frontSurface); + if (_lang == kSpanish) + textSurface = frontSurface; + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); @@ -755,6 +776,9 @@ void DrasculaEngine::animation_4_2() { loadPic(99, backSurface); withoutVerb(); + if (_lang == kSpanish) + textSurface = extraSurface; + flags[9] = 0; flags[4] = 1; } @@ -1907,6 +1931,9 @@ void DrasculaEngine::animation_1_6() { trackDrascula = 0; talk_drascula(35); + if (_lang == kSpanish) + textSurface = extraSurface; + clearRoom(); enterRoom(102); activatePendulum(); @@ -2118,6 +2145,9 @@ void DrasculaEngine::animation_19_6() { } void DrasculaEngine::animation_12_2() { + if (_lang == kSpanish) + textSurface = frontSurface; + loadPic("an12.alg", extraSurface); talk(356); @@ -2143,11 +2173,17 @@ void DrasculaEngine::animation_12_2() { talk_pianist(5); converse(1); + if (_lang == kSpanish) + textSurface = extraSurface; + flags[11] = 0; loadPic(974, extraSurface); } void DrasculaEngine::animation_26_2() { + if (_lang == kSpanish) + textSurface = frontSurface; + loadPic("an12.alg", extraSurface); talk(392); @@ -2198,6 +2234,9 @@ void DrasculaEngine::animation_26_2() { pickObject(11); removeObject(kItemBook); + if (_lang == kSpanish) + textSurface = extraSurface; + flags[11] = 0; flags[39] = 1; loadPic(974, extraSurface); @@ -2205,6 +2244,9 @@ void DrasculaEngine::animation_26_2() { } void DrasculaEngine::animation_11_2() { + if (_lang == kSpanish) + textSurface = frontSurface; + loadPic("an11y13.alg", extraSurface); talk(352); @@ -2217,6 +2259,9 @@ void DrasculaEngine::animation_11_2() { pause(40); talk_bartender(82); + if (_lang == kSpanish) + textSurface = extraSurface; + loadPic(974, extraSurface); } @@ -2344,6 +2389,9 @@ void DrasculaEngine::animation_34_2() { } void DrasculaEngine::animation_36_2() { + if (_lang == kSpanish) + textSurface = frontSurface; + loadPic("an11y13.alg", extraSurface); talk(404); @@ -2353,6 +2401,10 @@ void DrasculaEngine::animation_36_2() { talk(355); pause(40); talk_bartender(82); + + if (_lang == kSpanish) + textSurface = extraSurface; + loadPic(974, extraSurface); } @@ -2452,6 +2504,9 @@ void DrasculaEngine::animation_6_2() { stopMusic(); flags[9] = 1; + if (_lang == kSpanish) + textSurface = frontSurface; + clearRoom(); loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind loadPic("ciego2.alg", drawSurface3); @@ -2486,6 +2541,9 @@ void DrasculaEngine::animation_6_2() { loadPic(99, backSurface); withoutVerb(); + if (_lang == kSpanish) + textSurface = extraSurface; + flags[9] = 0; } @@ -2504,6 +2562,9 @@ void DrasculaEngine::animation_33_2() { loadPic("ciego4.alg", backSurface); loadPic("ciego5.alg", frontSurface); + if (_lang == kSpanish) + textSurface = frontSurface; + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); @@ -2532,6 +2593,9 @@ void DrasculaEngine::animation_33_2() { loadPic(99, backSurface); withoutVerb(); + if (_lang == kSpanish) + textSurface = extraSurface; + flags[33] = 1; flags[9] = 0; } diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 4cd511001c..650f941b1f 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -401,6 +401,11 @@ void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int wi bool DrasculaEngine::runCurrentChapter() { int n; + if (_lang == kSpanish) + textSurface = extraSurface; + else + textSurface = tableSurface; + previousMusic = -1; if (currentChapter != 2) { @@ -1447,7 +1452,7 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { textPos[4] = CHAR_WIDTH; textPos[5] = CHAR_HEIGHT; - copyRectClip(textPos, tableSurface, screenSurface); + copyRectClip(textPos, textSurface, screenSurface); screenX = screenX + CHAR_WIDTH; if (screenX > 317) { diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index aeb63eba9d..ffd9068575 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -283,6 +283,7 @@ public: byte *extraSurface; // not sure about this one, was "dir_hare_dch" byte *screenSurface; byte *frontSurface; + byte *textSurface; byte *pendulumSurface; byte cPal[768]; -- cgit v1.2.3 From 3b1e4fc15fa18cff7ec557485d8738c828325ff6 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Jun 2008 19:29:59 +0000 Subject: Move more room code into roomActions[]. svn-id: r32582 --- engines/drascula/rooms.cpp | 8 ++------ engines/drascula/staticdata.h | 4 ++++ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 08d4e8ab4c..7c2930e642 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -683,9 +683,7 @@ bool DrasculaEngine::room_27(int fl) { flags[23] = 1; openDoor(5,3); withoutVerb(); - } else if (pickedObject == kVerbLook && fl == 175) - talk(429); - else if (fl == 150) + } else if (fl == 150) talk(460); else hasAnswer = 0; @@ -831,7 +829,7 @@ bool DrasculaEngine::room_53(int fl) { bool DrasculaEngine::room_54(int fl) { if ((pickedObject == kVerbTalk && fl == 118) || (pickedObject == kVerbLook && fl == 118 && flags[0] == 0)) animation_1_5(); - else if (pickedObject == kVerbLook && fl == 118 && flags[0]==1) + else if (pickedObject == kVerbLook && fl == 118 && flags[0] == 1) talk(124); else if (pickedObject == kVerbTalk && fl == 53 && flags[14] == 0) { talk(288); @@ -1008,8 +1006,6 @@ bool DrasculaEngine::room_102(int fl) { pickObject(20); else if (pickedObject == 20 && fl == 100) animation_6_6(); - else if (pickedObject == kVerbPick || pickedObject == kVerbOpen) - talk(453); else hasAnswer = 0; diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 8a5890bd7a..c9350f251c 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -412,6 +412,8 @@ RoomTalkAction roomActions[] = { { 26, -1, kVerbLook, 168, 476 }, { 26, -1, kVerbPick, 168, 477 }, // ================================== + { 27, -1, kVerbLook, 175, 429 }, + // ================================== { 29, -1, kVerbLook, 152, 463 }, { 29, -1, kVerbOpen, 152, 464 }, // ---------------------------------- @@ -507,6 +509,8 @@ RoomTalkAction roomActions[] = { // ================================== { 102, -1, kVerbLook, 100, 452 }, { 102, -1, kVerbLook, 101, 123 }, + { 102, -1, kVerbPick, -1, 453 }, + { 102, -1, kVerbOpen, -1, 453 }, // ================================== // Pseudoroom. checkAction() menuScreen == 1 { 200, 1, kVerbLook, 28, 328 }, -- cgit v1.2.3 From 00dba1cebce8ab3ab4e7b3fdd4257488a0483525 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 6 Jun 2008 19:37:36 +0000 Subject: - Cleanup - Removed the unneeded AuxBuffLast buffer (this one is really not necessary :) ) - Simplified some more room actions svn-id: r32583 --- engines/drascula/drascula.cpp | 45 +++++++++++++++---------------------------- engines/drascula/drascula.h | 1 - engines/drascula/rooms.cpp | 16 ++------------- engines/drascula/staticdata.h | 7 +++++++ 4 files changed, 25 insertions(+), 44 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 650f941b1f..6b561d4853 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1420,13 +1420,12 @@ bool DrasculaEngine::saveLoadScreen() { void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { int textPos[8]; - int letterY = 0, letterX = 0, h, length; - length = strlen(said); + int letterY = 0, letterX = 0, c, i; - for (h = 0; h < length; h++) { - int c = toupper(said[h]); + for (uint h = 0; h < strlen(said); h++) { + c = toupper(said[h]); - for (int i = 0; i < CHARMAP_SIZE; i++) { + for (i = 0; i < CHARMAP_SIZE; i++) { if (c == charMap[i].inChar) { letterX = charMap[i].mappedChar; @@ -1464,10 +1463,9 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { void DrasculaEngine::print_abc_opc(const char *said, int screenX, int screenY, int game) { int textPos[6]; - int signY, letterY, letterX = 0, h, length; - length = strlen(said); + int signY, letterY, letterX = 0; - for (h = 0; h < length; h++) { + for (uint h = 0; h < strlen(said); h++) { if (game == 1) { letterY = 6; signY = 15; @@ -1780,7 +1778,6 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { int cnt = 2; int dataSize = 0; - AuxBuffLast = (byte *)malloc(65000); AuxBuffDes = (byte *)malloc(65000); _arj.open(animationFile); @@ -1800,7 +1797,6 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); _system->updateScreen(); setPalette(cPal); - memcpy(AuxBuffLast, AuxBuffDes, 64000); WaitForNext(FPS); while (cnt < NFrames) { dataSize = _arj.readSint32LE(); @@ -1810,7 +1806,7 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { loadPCX(AuxBuffOrg); free(AuxBuffOrg); for (j = 0;j < 64000; j++) { - VGA[j] = AuxBuffLast[j] = AuxBuffDes[j] ^ AuxBuffLast[j]; + VGA[j] = AuxBuffDes[j] ^ VGA[j]; } _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); _system->updateScreen(); @@ -1822,7 +1818,6 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { if (key != 0) break; } - free(AuxBuffLast); free(AuxBuffDes); _arj.close(); @@ -2753,8 +2748,7 @@ void DrasculaEngine::Des_RLE(byte *BufferRLE, byte *MiVideoRLE) { } void DrasculaEngine::MixVideo(byte *OldScreen, byte *NewScreen) { - int x; - for (x = 0; x < 64000; x++) + for (int x = 0; x < 64000; x++) OldScreen[x] ^= NewScreen[x]; } @@ -2770,9 +2764,7 @@ byte *DrasculaEngine::loadPCX(byte *NamePcc) { unsigned int X = 0; unsigned int fExit = 0; char ch, rep; - byte *AuxPun; - - AuxPun = AuxBuffDes; + byte *AuxPun = AuxBuffDes; while (!fExit) { ch = *NamePcc++; @@ -2825,10 +2817,10 @@ void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int w copyRectClip(pixelPos, dir_inicio, dir_fin); - pixelX = pixelX + totalX; + pixelX += totalX; } pixelX = xx1; - pixelY = pixelY + totalY; + pixelY += totalY; } } @@ -3008,7 +3000,7 @@ bool DrasculaEngine::checkMenuFlags() { void DrasculaEngine::converse(int index) { char fileName[20]; sprintf(fileName, "op_%d.cal", index); - int h; + uint h; int game1 = 1, game2 = 1, game3 = 1, game4 = 1; char phrase1[78]; char phrase2[78]; @@ -3018,7 +3010,6 @@ void DrasculaEngine::converse(int index) { char sound2[13]; char sound3[13]; char sound4[13]; - int length; int answer1; int answer2; int answer3; @@ -3070,23 +3061,19 @@ void DrasculaEngine::converse(int index) { answer3 = 15; } - length = strlen(phrase1); - for (h = 0; h < length; h++) + for (h = 0; h < strlen(phrase1); h++) if (phrase1[h] == (char)0xa7) phrase1[h] = ' '; - length = strlen(phrase2); - for (h = 0; h < length; h++) + for (h = 0; h < strlen(phrase2); h++) if (phrase2[h] == (char)0xa7) phrase2[h] = ' '; - length = strlen(phrase3); - for (h = 0; h < length; h++) + for (h = 0; h < strlen(phrase3); h++) if (phrase3[h] == (char)0xa7) phrase3[h] = ' '; - length = strlen(phrase4); - for (h = 0; h < length; h++) + for (h = 0; h < strlen(phrase4); h++) if (phrase4[h] == (char)0xa7) phrase4[h] = ' '; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index ffd9068575..d93a33a93d 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -464,7 +464,6 @@ public: int playFrameSSN(); byte *AuxBuffOrg; - byte *AuxBuffLast; byte *AuxBuffDes; byte *pointer; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 7c2930e642..008596baf3 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1494,9 +1494,7 @@ bool DrasculaEngine::checkAction(int fl) { chooseObject(21); removeObject(18); removeObject(19); - } else if ((pickedObject == 14 && fl == 19) || (pickedObject == 19 && fl == 14)) - talk(484); - else if (pickedObject == kVerbLook && fl == 9) { + } else if (pickedObject == kVerbLook && fl == 9) { talk(482); talk(483); } else if (pickedObject == kVerbLook && fl == 19) { @@ -1524,10 +1522,6 @@ bool DrasculaEngine::checkAction(int fl) { // Note: the original check was strcmp(num_room, "18.alg") if (pickedObject == 11 && fl == 50 && flags[22] == 0 && roomNumber != 18) talk(315); - else if (pickedObject == 13 && fl == 50) - talk(156); - else if (pickedObject == 20 && fl == 50) - talk(163); else hasAnswer = 0; } else if (currentChapter == 3) { @@ -1541,21 +1535,15 @@ bool DrasculaEngine::checkAction(int fl) { talk(178); else if (pickedObject == 8 && fl == 50 && flags[18] == 0) talk(481); - else if (pickedObject == 9 && fl == 50) - talk(484); else if (pickedObject == 12 && fl == 50 && flags[18] == 0) talk(487); - else if (pickedObject == 20 && fl == 50) - talk(487); else if (roomNumber == 21) { if (room(21, fl)) return true; } else hasAnswer = 0; } else if (currentChapter == 5) { - if (pickedObject == 20 && fl == 50) - talk(487); - else if (roomNumber == 56) { + if (roomNumber == 56) { if (room(56, fl)) return true; } else diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index c9350f251c..76dfcda3f0 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -574,6 +574,8 @@ RoomTalkAction roomActions[] = { { 200, 4, kVerbLook, 28, 328 }, { 200, 4, kVerbTalk, 15, 118 }, { 200, 4, kVerbOpen, 15, 119 }, + { 200, 4, 14, 19, 484 }, + { 200, 4, 19, 14, 484 }, // ---------------------------------- { 200, 5, kVerbLook, 7, 478 }, { 200, 5, kVerbLook, 8, 120 }, @@ -605,6 +607,8 @@ RoomTalkAction roomActions[] = { { 201, 2, kVerbMove, 50, 312 }, { 201, 2, kVerbPick, 50, 313 }, { 201, 2, kVerbTalk, 50, 314 }, + { 201, 2, 13, 50, 156 }, + { 201, 2, 20, 50, 163 }, // ---------------------------------- { 201, 3, kVerbLook, 50, 309 }, { 201, 3, kVerbOpen, 50, 310 }, @@ -619,6 +623,8 @@ RoomTalkAction roomActions[] = { { 201, 4, kVerbMove, 50, 312 }, { 201, 4, kVerbPick, 50, 313 }, { 201, 4, kVerbTalk, 50, 314 }, + { 201, 4, 9, 50, 484 }, + { 201, 4, 20, 50, 487 }, // ---------------------------------- { 201, 5, kVerbLook, 50, 309 }, // Originally these are with { 201, 5, kVerbOpen, 50, 310 }, // completely wrong voices @@ -626,6 +632,7 @@ RoomTalkAction roomActions[] = { { 201, 5, kVerbMove, 50, 312 }, { 201, 5, kVerbPick, 50, 313 }, { 201, 5, kVerbTalk, 50, 314 }, + { 201, 5, 20, 50, 487 }, // ---------------------------------- { 201, 6, kVerbOpen, 50, 310 }, { 201, 6, kVerbClose, 50, 311 }, -- cgit v1.2.3 From fbf319dbfb09868a9e6b1e989bb88315defe38d4 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Fri, 6 Jun 2008 19:52:09 +0000 Subject: Partially reverted the changes to for loops in my last commit. It's not wise to call strlen() on each loop iteration... svn-id: r32584 --- engines/drascula/drascula.cpp | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 6b561d4853..cc292e0dd4 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1421,8 +1421,9 @@ bool DrasculaEngine::saveLoadScreen() { void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { int textPos[8]; int letterY = 0, letterX = 0, c, i; + uint len = strlen(said); - for (uint h = 0; h < strlen(said); h++) { + for (uint h = 0; h < len; h++) { c = toupper(said[h]); for (i = 0; i < CHARMAP_SIZE; i++) { @@ -1464,8 +1465,9 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { void DrasculaEngine::print_abc_opc(const char *said, int screenX, int screenY, int game) { int textPos[6]; int signY, letterY, letterX = 0; + uint len = strlen(said); - for (uint h = 0; h < strlen(said); h++) { + for (uint h = 0; h < len; h++) { if (game == 1) { letterY = 6; signY = 15; @@ -3017,6 +3019,7 @@ void DrasculaEngine::converse(int index) { int used2 = 0; int used3 = 0; char buffer[256]; + uint len; breakOut = 0; @@ -3061,19 +3064,23 @@ void DrasculaEngine::converse(int index) { answer3 = 15; } - for (h = 0; h < strlen(phrase1); h++) + len = strlen(phrase1); + for (h = 0; h < len; h++) if (phrase1[h] == (char)0xa7) phrase1[h] = ' '; - for (h = 0; h < strlen(phrase2); h++) + len = strlen(phrase2); + for (h = 0; h < len; h++) if (phrase2[h] == (char)0xa7) phrase2[h] = ' '; - for (h = 0; h < strlen(phrase3); h++) + len = strlen(phrase3); + for (h = 0; h < len; h++) if (phrase3[h] == (char)0xa7) phrase3[h] = ' '; - for (h = 0; h < strlen(phrase4); h++) + len = strlen(phrase4); + for (h = 0; h < len; h++) if (phrase4[h] == (char)0xa7) phrase4[h] = ' '; -- cgit v1.2.3 From 58dd060ebc92aa01836497e508cc3bfe1867d41e Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Jun 2008 20:12:51 +0000 Subject: Slighly modified patch #1985341: "DRASCULA: Hopefully my last batch of english updates" svn-id: r32585 --- engines/drascula/animation.cpp | 2 +- engines/drascula/drascula.cpp | 8 +- engines/drascula/drascula.h | 2 +- engines/drascula/staticdata.h | 199 +++++++++++++++++++++-------------------- 4 files changed, 108 insertions(+), 103 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index f55a388b92..68c6fac8d9 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -2062,7 +2062,7 @@ void DrasculaEngine::animation_9_6() { copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); updateScreen(); color_abc(kColorLightGreen); - talk_solo("GOOOOOOOOOOOOOOOL", "s15.als"); + talk_solo(_textmisc[_lang][2], "s15.als"); loadPic("nota2.alg", drawSurface1); trackProtagonist = 0; updateRoom(); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index cc292e0dd4..da621a6674 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1401,7 +1401,7 @@ bool DrasculaEngine::saveLoadScreen() { } else if (mouseX > 168 && mouseY > 154 && mouseX < 242 && mouseY < 180) break; else if (selectionMade == 0) { - print_abc("elige una partida", 117, 15); + print_abc("Please select a saved game to load", 117, 15); } updateScreen(); delay(200); @@ -2915,7 +2915,7 @@ void DrasculaEngine::saveGame(char gameName[]) { int l; if (!(out = _saveFileMan->openForSaving(gameName))) { - error("no puedo abrir el archivo"); + error("Unable to open the file"); } out->writeSint32LE(currentChapter); out->write(currentData, 20); @@ -3059,7 +3059,7 @@ void DrasculaEngine::converse(int index) { } if (currentChapter == 6 && !strcmp(fileName, "op_12.cal") && flags[10] == 1) { - strcpy(phrase3, " cuanto queda para que acabe el partido?"); + strcpy(phrase3, _text[_lang][274]); strcpy(sound3, "274.als"); answer3 = 15; } @@ -3545,7 +3545,7 @@ void DrasculaEngine::grr() { copyBackground(253, 110, 150, 65, 20, 30, drawSurface3, screenSurface); if (withVoices == 0) - centerText(".groaaarrrrgghhh!", 153, 65); + centerText("groaaarrrrgghhhh!", 153, 65); updateScreen(); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index d93a33a93d..cb396fc063 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -685,7 +685,7 @@ extern const char *_textvb[][63]; extern const char *_textsys[][4]; extern const char *_texthis[][5]; extern const char *_textverbs[][6]; -extern const char *_textmisc[][2]; +extern const char *_textmisc[][3]; extern const char *_textd1[][11]; extern const ItemLocation itemLocations[]; diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 76dfcda3f0..3bae988562 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -653,7 +653,7 @@ const char *_text[][501] = { // 5 "WHAT SHOULD I DO, SHOULD I PULL IT OFF?", "HI THERE DOOR, I'M GOING TO MAKE YOU A DOOR-FRAME", - "IT'S TOO MUCH FOR ME", + "IT'S TOO TOUGH FOR ME", "THE WINDOW IS BOARDED UP", "I CAN'T", // 10 @@ -670,7 +670,7 @@ const char *_text[][501] = { "IT'S ALRIGHT WHERE IT IS", // 20 "", - "ITS A COFFIN IN THE SHAPE OF A CROSS", + "IT'S A COFFIN IN THE SHAPE OF A CROSS", "NO THANKS", "HI DEAD MAN. NO, DON'T GET UP FOR MY SAKE", "YES, JUST LIKE IN POLTERGEIST", @@ -678,10 +678,10 @@ const char *_text[][501] = { "", "", "I'LL BE BACK IN FIFTEEN MINUTES", - "IT IS FORBIDDEN TO PUT UP POSTERS", + "IT'S FORBIDDEN TO PUT UP POSTERS", "IT'S UNCLE EVARISTO'S TOMB", // 30 - "ITS LOCKED", + "IT'S LOCKED", "I'VE GOT ONE", "YOO HOO, UNCLE EVARISTO!", "THERE'S NO POWER", @@ -695,9 +695,9 @@ const char *_text[][501] = { // 40 "", "IT'S AN ANCIENT CANDELABRUM", - "IT MUST HAVE BEEN HERE EVER SINCE YULE BRINNER HAD HAIR ON HIS HEAD", - "NO, ITS A RELIC", - "ITS A NICE ALTARPIECE", + "IT MUST HAVE BEEN HERE SINCE YULE BRINNER HAD HAIR ON HIS HEAD", + "NO, IT'S A RELIC", + "IT'S A NICE ALTARPIECE", // 45 "", "HA, HA, HA", @@ -789,21 +789,21 @@ const char *_text[][501] = { "AND SO BRAIN, WHAT ARE YOU UP TONIGHT?", "NO, IT MUST BE KEPT SOMEWHERE AWAY FROM THE MUTANT ACTION OF THE ATMOSPHERE", // 120 - "HE IS VERY STIFF, JUST LIKE MY BOSS", + "IT IS VERY STIFF, JUST LIKE MY BOSS", "A VERY SHARP STAKE", - "YOU FAITHFUL SHARP-PAINTED STAKE, NOBLE TRANSILVANIAN OAK TREE", + "YOU FAITHFUL SHARP-PAINTED STAKE, FROM THE MOST NOBLE TRANSILVANIAN OAK TREE", "DAMN, I HAVE TO CUT MY NAILS!", "B.J. IS IN THERE... SHE IS A REALLY HOT CHICK!", // 125 "IT IS FIRMLY LOCKED", - "\"SAVE AWAY LOCKS LTD.\"", + "\"SAFE AWAY LOCKS LTD.\"", "IT IS THE TYPICAL SKELETON YOU FIND IN THE DUNGEONS OF ALL THE GAMES", "IT IS COMMONLY USED TO TRANSFER ELECTRICITY TO THE MACHINES CONNECTED TO IT", "IT IS HAND MADE BECAUSE THE JAPANESE MAKE THEM POCKET SIZE", // 130 "I HAVE ONLY ONCE SEEN IN MY LIFE ANOTHER THING AS UGLY AS THIS", "FORGET IT. I AM NOT GOING TO TELL HIM ANYTHING IN CASE HE GETS MAD", - "IT SEEMS QUITE RATIONAL", + "HE SEEMS QUITE RATIONAL", "IT IS A PICTURE OF PLATO WRITING HIS LOST DIALOGUE", "I AM NOT ONE OF THOSE PEOPLE WHO TALKS TO POSTERS", // 135 @@ -821,13 +821,13 @@ const char *_text[][501] = { // 145 "THOSE ARE STRANGE LEAVES. THEY MUST HAVE BROUGHT THEM FROM SOUTH AMERICA OR AROUND THERE", "I DON'T THINK THEY WOULD ANSWER ME", - "THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY SHOW THE FULL EXTENT OF ITS BEAUTY", + "THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY SHOW THE FULL EXTENT OF IT'S BEAUTY", "I ONLY PRAY BEFORE I GO TO BED", "HEY, THIS SPIKE SEEMS A LITTLE BIT LOOSE!", // 150 "I HOPE YOU WON'T COMPLAIN ABOUT NOT GETTING ANY CLUES FROM ME", "IT'S A QUITE CONVENTIONAL SPIKE", - "THEY ARE CUTE, THOUGH THEY ARE COVERED WITH A LITTLE BIT OF SHIT", + "THEY ARE CUTE, THOUGH THEY ARE COVERED WITH A LITTLE BIT OF WAX", "NO, THEY WON'T HEAR ME. HA,HA,HA THIS IS GREAT!", "\"SLEEPING BEAUTY\" FROM TCHAIKOVSKY, OR CHOIFRUSKY, OR WHATEVER IT IS", // 155 @@ -844,7 +844,7 @@ const char *_text[][501] = { "THERE IS A ONE THOUSAND BILL AND A COUPLE OF COINS", // 165 "IT SAYS \"PLEASE, DO NOT THROW FOOD TO THE PIANIST\"", - "OMELETTE, 200. FRIED FISH, 150, MAYONNAISE POTATOES, 225", + "OMELETTE, 1.00. FRIED FISH, 0.80, MAYONNAISE POTATOES, 1.10", "BEST BURGERS ON THIS SIDE OF THE DANUBE, ONLY 325!", "THAT'S A NICE SKULL WITH A VERY PENETRATING LOOK, HA, HA, HA, HA, THAT WAS GOOD!", "HI SKULL, YOU REMIND ME OF UNCLE HAMLET", @@ -853,12 +853,12 @@ const char *_text[][501] = { "IT'S A BIN", "IT'S A BET FOR TONIGHT'S GAME", "I WONDER WHAT IS BEHIND THAT", - "HEY, THE CURTAIN WONT MOVE!", + "HEY, THE CURTAIN WILL NOT MOVE!", // 175 "MAN, THIS CASTLE IS REALLY GLOOMY", "I CAN'T, HE IS TOO FAR AWAY TO HEAR ME", "IT'S A TYPICAL TRANSILVANIAN FOREST, WITH TREES", - "MAN YOU SAY REALLY STUPID THINGS, AND THIS IS TOO DARK!", + "MAN YOU SAY REALLY STUPID THINGS, THIS ROOM IS TOO DARK!", "GARCIA, CANDY STORE. SWEETS AND BUBBLE GUM", // 180 "A VERY NICE DOOR", @@ -882,7 +882,7 @@ const char *_text[][501] = { "YES, SO WHAT?", "SO?", "IS...THAT RIGHT?", - "GOOD QUESTION. GET ME A DRINK AND LET ME TELL YOU MY STORY. LOOK...", + "GOOD QUESTION. LET ME TELL YOU MY STORY. LOOK...", "IT WILL TAKE JUST FIVE MINUTES", // 200 "I'M JOHN HACKER AND I REPRESENT A BRITISH PROPERTY COMPANY", @@ -893,7 +893,7 @@ const char *_text[][501] = { // 205 "YOU...PIANIST...!!!!", "BEAUTIFUL NIGHT", - "AND IT'S NOT EVEN COLD OR ANYTHING", + "AND IT'S NOT EVEN COLD OR ANYTHING, BY THE WAY, CANT YOU PLAY A DIFFERENT SONG?", "ALL RIGHT, I'LL JUST LET YOU GO ON PLAYING", "WELL THEN", // 210 @@ -903,7 +903,7 @@ const char *_text[][501] = { "I'D BETTER NOT SAY ANYTHING", "THERE IS NO PLACE LIKE HOME. THERE IS NO...WHAT?, BUT YOU ARE NOT AUNTIE EMMA. AS A MATTER OF FACT, I DON'T HAVE AN AUNTIE EMMA!", // 215 - "YES, SO DOES MINE. YOU CAN CALL ME ANYTHING YOU WANT, BUT IF YOU CALL ME JOHNNY, I'LL COME TO YOU LIKE A DOG", + "YOU CAN CALL ME ANYTHING YOU WANT, BUT IF YOU CALL ME JOHNNY, I'LL COME TO YOU LIKE A DOG", "AREN'T I JUST A FUNNY GUY, HUH?. BY THE WAY, WHERE AM I?", "YES", "SHOOT...!", @@ -939,11 +939,11 @@ const char *_text[][501] = { "", "BY THE WAY, THIS IS NOT THE CASE, OF COURSE, BUT WHAT COULD HAPPEN IF A VAMPIRE GOT THE RECIPE BY ANY CHANCE?", // 245 - "WELL ANYWAY. LISTEN, DOESN'T THIS LOOK TO YOU LIKE A LOT OF CRAP TO END THE GAME WITH?. WELL, MAYBE NOT", + "WELL ANYWAY. LISTEN, DOESN'T THIS LOOK LIKE A LOT OF CRAP TO END THE GAME WITH?. WELL, MAYBE NOT", "IT'S EMPTY!", "WHY DID YOU TAKE MY ONLY LOVE, B.J., AWAY FROM ME?. LIFE HAS NO MEANING FOR ME WITHOUT HER", "HER BRAIN?\?!!", - "TO TELL YOU THE TRUTH, I THINK I HAVE HAD JUST ABOUT ENOUGH OF YOUR LITTLE MONSTER", + "TO TELL YOU THE TRUTH, I THINK I HAVE HAD ENOUGH FUN WITH YOUR LITTLE MONSTER ALREADY", // 250 "OH PLEASE, HOLY VIRGIN, DON'T LET ANYTHING WORSE HAPPEN TO ME!!", "YOU ARE NOT GOING TO GET YOUR WAY. I'M SURE SUPERMAN WILL COME AND RESCUE ME!", @@ -969,7 +969,7 @@ const char *_text[][501] = { "WHO?", "CAN'T YOU SEE DRASCULA IS HERE?", // 270 - "THEN, LET'S END UP WITH HIM, RIGHT?", + "THEN, LET'S FINISH HIM OFF, RIGHT?", "GIVE ME A SCOTCH ON THE ROCKS", "NOTHING, I JUST FORGOT WHAT I WAS GOING TO SAY...", "EITHER YOU GET ME A SCOTCH ON THE ROCKS OR I'LL PLAY THE PIANO UNTIL THE GAME IS OVER", @@ -978,7 +978,7 @@ const char *_text[][501] = { "GOOD EVENING", "AND SO IGOR, HOW ARE YOU FEELING...A LITTLE HUMPED...?. HA, HA, HA, THAT WAS FUNNY!", "WHAT ARE YOU SUPPOSED TO BE DOING?", - "WELL, NO", + "WELL, NO, I DONT UNDERSTAND TAXES", "THEN WEAR GLASSES", // 280 "WHAT IS ALL THAT ABOUT THE SUPERNATURAL ORGY?", @@ -987,7 +987,7 @@ const char *_text[][501] = { "OH...PLEASE...COME ON...!", "WHY NOT?", // 285 - "OH...BUT DOES HE SLEEP AT NIGHT?", + "OH...DOES HE SLEEP AT NIGHT?", "WELL, I HOPE YOU GET LUCKY", "I HAVE TO TALK TO HIM...", "YOUUU...SKELETONNNN..!!!", @@ -1038,14 +1038,14 @@ const char *_text[][501] = { "JAMM. AHH...", "YES...WOF, WOF", "LOOK, THERE'S A PIECE OF BUBBLE GUM STUCK HERE", - "THIS IS THE PORTABLILINE I GOT LAST CHRISTMAS", + "THIS IS THE MOBILE PHONE I GOT LAST CHRISTMAS", "IT'S VERY HIGH!", // 330 "COME OUT TO THE BALCONY MY JULIET!!", "YOU ARE THE LIGHT THAT ILLUMINATES MY WAY!", "HEY, DOOR!, WHAT'S THE MATTER?", - "YOUUU, CIGARETTE SPENDING MACHINE!", - "IT'S A CIGARETTE SPENDING MACHINE", + "YOUUU, CIGARETTE VENDING MACHINE!", + "IT'S A CIGARETTE VENDING MACHINE", // 335 "I HAVE ANOTHER COIN INSIDE", "NO, I JUST QUIT SMOKING AND DRINKING ALCOHOL", @@ -1053,7 +1053,7 @@ const char *_text[][501] = { "THIS IS A TRICK! NOTHING CAME OUT!", "AT LAST!", // 340 - "ITS JUST A TRUNK", + "IT'S JUST A TRUNK", "HELLO TRUNK, YOUR NAME IS JUST LIKE MY COUSIN FRANK...", "I'VE FOUND B.J.'S HANDBAG!", "OH MY GOD! I HAVE NO REFLECTION! I'M A VAMPIRE!", @@ -1085,11 +1085,11 @@ const char *_text[][501] = { // 365 "WELL GOODBYE, I HAVE TO KILL A VAMPIRE", "", - "WHAT'S YOUR LANGUAGE, TRANSILVANIAN?", - "WHO IS UNCLE DESIDERIO?", - "BUT, WHAT'S THE MATTER WITH DRASCULA?", + "WHAT LANGUAGE ARE YOU SPEAKING?, TRANSILVANIAN?", + "WHAT ARE YOU TALKING ABOUT? WHO IS UNCLE DESIDERIO?", + "BUT, WHAT'S THE PROBLEM WITH DRASCULA?", // 370 - "WHO IS THAT GUY NAMED VON BRAUN?", + "WHO IS THIS GUY NAMED VON BRAUN?", "AND WHY DOESN'T HE DO IT?", "WHERE CAN I FIND VON BRAUN?", "WELL, THANKS AND GOODBYE. HOPE YOU SLEEP IT OFF JUST FINE", @@ -1116,7 +1116,7 @@ const char *_text[][501] = { "ALL RIGHT OLD MAN. I CAME FOR MY MONEY", "NO, NOTHING. I WAS JUST LEAVING", "SORRY...", - "DO YOU LIKE THIS BOOK?. IT HAS SOME SCORES FROM TCHAIKOVSKY", + "WOULD YOU LIKE THIS BOOK?. IT HAS SOME SCORES FROM TCHAIKOVSKY", "HOW CAN I KILL A VAMPIRE?", // 395 "HAS ANYBODY TOLD YOU THAT SLEEPING IN A BAD POSITION IS NOT GOOD FOR YOU?", @@ -1133,9 +1133,9 @@ const char *_text[][501] = { // 405 "I HAVE ALL THE INGREDIENTS OF THAT BREW", "JUST A QUESTION. WHAT IS ALL THAT ABOUT THE ALUCSARD ETEREUM?", - "HELLO, HELLO...", + "YES, YES?...", "AND WHERE IS THAT CAVERN?", - "WHAT HAPPENS? DIDN'T YOU HAVE TO GO TO THE COURT?", + "WHAT HAPPENED? DIDN'T THEY HAVE TO GO TO COURT?", // 410 "...BUT... IF I MEET MORE VAMPIRES?", "IT'S A VAMPIRE THAT WON'T LET ME COME THROUGH", @@ -1156,7 +1156,7 @@ const char *_text[][501] = { "THAT TOOK AWAY THE RUST", // 425 "I FOUND A PINE STAKE", - "I'LL TAKE THIS THICKER ONE", + "I'LL TAKE THIS LARGER ONE", "WELL, I THINK I CAN GET RID OF THIS STUPID DISGUISE", "\"PASSAGE TO TOWERS CLOSED FOR REPAIRS. PLEASE USE THE MAIN ENTRANCE. SORRY FOR THE INCONVENIENCE\"", "...HE IS PALE, HE HAS FANGS AND WEARS A TOUPE\220 HE SURE IS DRASCULA!", @@ -1197,21 +1197,21 @@ const char *_text[][501] = { "IT SEEMS A LITTLE LOOSE ON THE WALL", "I DON'T THINK IT IS GOING TO HELP ME ANYWAY. IT'S TOO WET TO LIGHT", // 460 - "TO THE WEST WING? NO WAY! NOBODY KNOWS WHAT YOU WILL FIND IN THERE!!", - "SHE'S GOT NICE TRANSILVANIAN REASONS", + "TO THE WEST WING? NO WAY! NOBODY KNOWS WHAT YOU WILL FIND THERE!!", + "SHE'S GOT NICE TRANSILVANIAN FEATURES", "", "IT'S A SHAME THERE ISN'T A ROASTED LAMB IN THERE", "LAST TIME I OPENED AN OVEN I BLEW UP THE HOUSE", // 465 - "THAT'S THE TRANSILVANIAN FOOTBALL BADGE", - "WHAT FOR? TO PUT IT ON MY HEAD", + "THAT'S THE TRANSILVANIAN FOOTBALL TEAMS BADGE", + "WHAT FOR? TO PUT IT ON MY HEAD??", "I DON'T THINK THESE TOWERS ARE THE OPENING KIND", "I DON'T WANT TO KNOW WHAT KIND OF FOOD IS IN THERE!", "IT LOOKS IMPRESSIONIST TO ME...", // 470 "THE NIGHT IS FALLING OVER ALL OF US...THAT'S SCARY, ISN'T IT?", "IT'S STUCK!", - "IT'S THE KING. YOU DIDN'T IMAGINE THAT, DID YOU!", + "IT'S ELVIS THE KING. YOU DIDN'T IMAGINE THAT WOULD BE HERE, DID YOU!", "NO, I ALREADY HAVE ONE AT HOME TO FEED", "A SHELF WITH BOOKS AND SOME OTHER THINGS", // 475 @@ -1237,13 +1237,13 @@ const char *_text[][501] = { "THAT'S A PRETTY CUTE CLOAK", "", "JUST LIKE ALL THE BRANCHES FROM ANY TREE IN THE WORLD, THERE IS NOTHING SPECIAL.", - "HEY, THAT'S AMAZING! A ROPE WITHIN THIS TYPE OF ADVENTURE GAME!", + "HEY, THAT'S AMAZING! A ROPE IN THIS TYPE OF ADVENTURE GAME!", // 495 "I WONDER WHAT WE COULD USE IT FOR...", "A ROPE TIED TO A BRANCH OR THE OTHER WAY AROUND, HOWEVER YOU WANT TO PUT IT...", "IT LOOKS LIKE THIS MAGPIE IS EVIL-MINDED", "FORGET IT, I'M NOT SAYING ANYTHING IN CASE HE GETS MAD", - "SHE LOOKS DEAD, BUT REALLY SHE ISN'T, HUH?", + "SHE LOOKS DEAD, BUT SHE REALLY ISN'T, HUH?", // 500 "NO ANIMAL WAS HARMED DURING THE PRODUCTION OF THIS GAME", }, @@ -3672,10 +3672,10 @@ const char *_textd[][84] = { "HEY IGOR, HOW IS EVERYTHING GOING?", "IT'S ALWAYS THE SAME STORY EVERYTIME THERE'S A GOOD GAME ON THE SATELLITE! ANYWAY, WE'LL GO WATCH IT IN THE BAR, AS USUAL", "IGOR LISTEN CAREFULLY MAN, WE ARE GOING TO START WITH PHASE NUMBER ONE OF MY PLAN TO CONQUER THE WORLD", - "FIRST WE'LL CAPTURE SOME LIGHTNING AND WE'LL DEMAGNETIZE IT WITH OUR INDIFIBULATOR. THE ELECTRICITY WILL COME THROUGH TO MY MONSTER AND HE WILL LIVE!", + "FIRST WE'LL CAPTURE SOME LIGHTNING THEN WE'LL DEMAGNETIZE IT WITH OUR INDIFIBULATOR. THE ELECTRICITY WILL FLOW THROUGH TO MY MONSTER AND HE WILL LIVE!", // 5 "IF EVERYTHING WORKS OUT ALL RIGHT, THIS WILL BE THE BEGINNING OF A GREAT ARMY THAT WILL CONQUER THE WORLD FOR ME. HA, HA", - "THE MONSTERS WILL DESTROY ALL THE ARMY'S WEAPONS IN THE WORLD, MEANWHILE, WE'LL BE SAFE IN THE PIECES OF LAND I BOUGHT IN GIBRALTAR", + "THE MONSTERS WILL DESTROY ALL THE ARMY'S WEAPONS IN THE WORLD, MEANWHILE, WE'LL BE SAFE IN THE PIECES OF LAND I PLAN TO BUY IN GIBRALTAR", "WE'LL SET UP A COUP. GOVERNMENTS ALL OVER THE WORLD WILL BE UNCOVERED AND THEIR COUNTRIES WILL SURRENDER TO ME!", "I'LL BECOME THE FIRST BAD GUY IN HISTORY TO MAKE IT ! HA, HA!", "I'M NOT TALKING TO YOU, IDIOT! I'M JUST GIVING YOU THE PLOT. ALL RIGHT, EVERYTHING READY?", @@ -3683,17 +3683,17 @@ const char *_textd[][84] = { "THE TIME HAS COME! TURN ON THE ALKALINE BATTERIES' SWITCH", "DAMN IT! WHAT WENT WRONG?", "ARE YOU SURE YOU CHECKED IT ALL AND THERE WAS NOTHING MISSING? LATELY YOU'VE BEEN MESSING AROUND WITH THAT STUFF ABOUT TAXES AND I DON'T KNOW MAN...", - "YOU STUPID THING! YOU FORGOT TO CONNECT THE INDIFIBULATOR. THE SCREWS HAVE PROBABLY MAGNETIZED AND HIS BRAIN HAS PROBABLY BURNT", + "YOU STUPID THING! YOU FORGOT TO CONNECT THE INDIFIBULATOR. THE SCREWS HAVE MAGNETIZED AND HIS BRAIN HAS PROBABLY BURNT", "YOU ARE DEAD, YOU ARE DEAD...WAIT TILL I GET YOU!", // 15 "SHUT UP! I'LL GET ANOTHER BRAIN TOMORROW AND THEN WE WILL REPEAT THE EXPERIMENT", - "THIS TIME I'LL GET A WOMAN'S BRAIN. SHINY AND NOT USED YET...HA, HA, HA, GOODIE ONE!", - "SO WHAT? I'M THE BAD GUY, RIGHT? SO I CAN BE AS FULL OF MACHISMO AS I WANT, ALL RIGHT? AND IF YOU SAY SOMETHING AGAIN I'LL TURN YOUR HUMP BACK TO FRONT!", - "HA, HA, HA. YOU FELL TOO!! NOW YOU ARE GOING TO PAY FOR DARING TO FIGHT ME! IGOR, TAKE HIM TO THE PENDULUM OF DEATH!", + "THIS TIME I'LL GET A WOMAN'S BRAIN. SHINY AND NOT USED YET...HA, HA, HA, GOOD ONE!", + "SO WHAT? I'M THE BAD GUY, RIGHT? SO I CAN BE AS FULL OF MACHISMO AS I WANT, ALL RIGHT? AND IF YOU SAY ANOTHER THING I'LL TURN YOUR HUMP BACK TO FRONT!", + "HA, HA, HA. YOU FELL FOR IT!! NOW YOU ARE GOING TO PAY FOR DARING TO FIGHT ME! IGOR, TAKE HIM TO THE PENDULUM OF DEATH!", "AND SO, TELL ME, YOU STUPID HUMAN. HOW COME YOU WANT TO DESTROY ME?", // 20 "THAT'S BEAUTIFUL!. IF IT WASN'T BECAUSE IT MAKES ME LAUGH, I WOULD CRY", - "YOUR GIRLFRIEND'S BRAIN, TO HELP ME CONQUER THE WORLD", + "I PLAN TO USE YOUR GIRLFRIEND'S BRAIN, TO HELP ME CONQUER THE WORLD", "YES, SURE! I'LL TAKE IT FROM HER AND GIVE IT TO MY FRUSKYNSTEIN. THE WORLD WILL BE MINE WITH IT, HA, HA", "WHAT!? YOU'RE DEAD, MAN! I'M GOING TO...YOU REALLY GOT ME ANGRY MAN...COME ON, PREPARE TO DIE!", "HA, HA, HA. NOT EVEN IN YOUR WILDEST DREAMS!", @@ -3701,13 +3701,13 @@ const char *_textd[][84] = { "YES, ISN'T IT? HA, HA", "ALL RIGHT, ALL RIGHT. BUT DO IT QUICKLY, OK?", "PUT THAT CIGARETTE OUT NOW! I CAN'T STAND YOU ANYMORE!", - "AND SO, DOES THAT BREW HAVE THE OPPOSITE EFFECT?", - "WELL, WE'LL SEE THAT", + "SO, DOES THAT BREW HAVE IMMUNISATING EFFECTS FOR VAMPIRES??", + "WELL, WE'LL SEE ABOUT THAT", // 30 - "OK, LET'S SEE IT. IGOR, BRING ME THE CD \"SCRATCHING YOUR NAILS ALL OVER THE BLACKBOARD\"", + "OK, LET'S SEE. IGOR, BRING ME THE CD \"SCRATCHING YOUR NAILS ALL OVER THE BLACKBOARD\"", "NO WAY. THE GIRL STAYS WITH ME. YOU'RE STAYING THERE UNTIL THE PENDULUM CUTS YOU INTO THIN SLICES. HA, HA, HA", - "MAN I'M I JUST BAD... COME ON IGOR, LET'S MAKE THE BREW AND CONQUER THE WORLD", - "WHAT HAPPENED NOW?", + "MAN I'M SO BAD... COME ON IGOR, LET'S MAKE THE BREW AND CONQUER THE WORLD", + "WHATS HAPPENED NOW?", "YES, WHAT?...OH, DAMNED, THE GAME!", // 35 "I FORGOT ABOUT THAT. GET THE GIRL AND LET'S GO AND WATCH IT. WE CAN CONQUER THE WORLD LATER", @@ -3737,7 +3737,7 @@ const char *_textd[][84] = { "", "HI BLIND MAN. HOW IT'S GOING?", "HOW DO YOU KNOW I'M A FOREIGNER?", - "YOU LOOK BLIND. YOU'RE WEARING DARK GLASSES LIKE STEVIE WONDER", + "YOU LOOK BLIND. BECAUSE YOU'RE WEARING DARK GLASSES LIKE STEVIE WONDER", "LOOK, I'M SORRY, I DIDN'T KNOW YOU COULD SEE", // 60 "BUT YOU JUST TOLD ME YOU WEREN'T BLIND", @@ -3748,26 +3748,26 @@ const char *_textd[][84] = { // 65 "AH YES, I SUPPOSE THAT'S TRUE. GOODBYE SIGHTLESS PERSON... BLIND MAN", "HERE IS THE LARGE AMOUNT OF MONEY YOU ASKED ME FOR", - "YOU BETTER HAVE", + "I HOPE SO", "HI THERE FOREIGNER", "AND HOW DO YOU KNOW I'M BLIND?", // 70 - "AND I'M NOT KIDDING YOU BUT YOURS ARE LIKE WOODY ALLEN'S", + "AND I'M NOT KIDDING YOU BUT YOURS LOOK LIKE WOODY ALLEN'S", "NO, I CAN'T SEE", "AND I'M NOT", - "OH OF COURSE. JUST COS I CAN'T SEE, YOU ACCUSE ME OF BEING BLIND", + "OH OF COURSE. JUST BECAUSE I CAN'T SEE, YOU ACCUSE ME OF BEING BLIND", "HI THERE FOREIGNER! WHAT ARE YOU DOING IN TRANSILVANIA?", // 75 - "THAT'S RIGHT, FOREIGNER. IN EXCHANGE FOR A LARGE SUM OF MONEY I'LL GIVE YOU A SICKLE FOR WHEN YOU MIGHT NEED IT", + "THAT'S RIGHT, FOREIGNER. IN EXCHANGE FOR A LARGE SUM OF MONEY I'LL GIVE YOU A SICKLE YOU NEVER KNOW WHEN YOU MIGHT NEED IT", "SHHHH, I'M A SICKLES TRADER, THAT'S WHY I HAVE TO HIDE", "BECAUSE YOU TOLD ME BEFORE, DIDN'T YOU?", - "THANKS FOREIGNER. HERE'S THE SICKLE IN EXCHANGE. YOU'LL FIND IT REALLY USEFUL LATER ON, HONESTLY", + "THANKS FOREIGNER. HERE'S THE SICKLE IN EXCHANGE. YOU'LL FIND IT REALLY USEFUL LATER ON, HONESTLY.", "", // 80 "", "", - "No, nada", - "bla, bla, bla." + "NOTHING, NOTHING AT ALL", + "BLA, BLA, BLA." }, { // 0 @@ -4188,18 +4188,18 @@ const char *_textb[][15] = { // 0 "", "I'M HERE, DRINKING", - "THEY ARE ALL DEAD, THANKS. BURP...", + "THEY ARE ALL DEAD, THANKS. HIC...!", "YES, SURE...", - "SHE FEELS ATTRACTED TO UNCLE DESIDERIO", + "SHE IS ATTRACTED TO UNCLE DESIDERIO", // 5 "EVEN BETTER, UNCLE DESIDERIO'S DEAD BODY", "MY UNCLE. HE WENT TO THE CASTLE AND NEVER CAME BACK", "WELL, HE CAME BACK JUST A LITTLE. IF ONLY VON BRAUN HADN'T SCREWED THINGS UP MY UNCLE WOULD BE DRINKING WITH US NOW", "NOTHING...", - "WELL, YES !. THAT MEAN MAN HAS TERRIFIED US ALL", + "WELL, YES! THAT MEAN MAN HAS TERRIFIED US ALL", // 10 "FROM TIME TO TIME HE COMES DOWN TO THE VILLAGE AND TAKES SOMEONE WITH HIM.", - "A LITTLE WHILE AFTER WE JUST A FEW FOUND BODY PARTS. I THINK HE IS DEALING IN ORGANS OR SOMETHING LIKE THAT", + "A LITTLE WHILE AFTER WE FOUND A FEW BODY PARTS. I THINK HE IS DEALING IN ORGANS OR SOMETHING LIKE THAT", "THE ONLY PERSON IN THE VILLAGE WHO KNOWS HOW TO GET TO DRASCULA IS A CULTIVATED PERSON", "HE LIVES IN A LOG-CABIN OUT OF TOWN, EVER SINCE DRASCULA BEAT HIM UP", "HE IS THE ONLY ONE WHO COULD HELP US WITH DRASCULA, AND HE DOESN'T WANT TO HEAR ABOUT IT. HOW DO YOU LIKE THAT?", @@ -4299,12 +4299,12 @@ const char *_textbj[][29] = { "AS I OPENED THE DOOR I WAS SHOCKED TO FIND YOU THERE, LYING ON THE FLOOR. I THOUGHT YOU WERE DEAD, I SWEAR... HA, HA, SILLY BILLY", "I WAS GOING TO GIVE YOU THE KISS OF LIFE BUT IT WASN'T NECESSARY BECAUSE YOU STARTED TO TALK", "YOU SAID SOMETHING ABOUT A SCARECROW. I WAS VERY SCARED, YOU KNOW. IT'S A REAL SHOCK WHEN A DEAD PERSON STARTS TALKING?", - "ISN'T THAT RIGHT? WELL, THEN I MANAGED TO BRING YOU TO MY ROOM THE BEST WAY I COULD. I PUT YOU IN BED... AND THAT'S ALL... HA, HA, HA...", + "ISN'T THAT RIGHT? WELL, THEN I MANAGED TO BRING YOU TO MY ROOM THE BEST WAY I COULD. I PUT YOU IN MY BED... AND THAT'S ALL... HA, HA, HA...", // 10 "OH, NO...! IT WASN'T THE HIT, HA, HA. I JUST STEPPED ON YOUR GLASSES BY ACCIDENT", "YOU REALLY LOOK GOOD WITH THOSE GLASSES. I KNOW HE'S NOT FERNANDO LANCHA, BUT I FIND HIM ATTRACTIVE...", "YES, YES, I DO... COME ON, HOLD ME AND KISS ME TIGHT", - "OH JOHNNY, HONEY, THANK GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND THEN HE'S GONE DOWNSTAIRS TO WATCH THE FOOTBALL GAME", + "OH JOHNNY, HONEY, THANK GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND HE'S GONE DOWNSTAIRS TO WATCH THE FOOTBALL GAME", "YES, IT'S TRUE. PLEASE, SET ME FREE", // 15 "NO, I'M SORRY. I USED THEM ALL IN THE TOWER WHEN I WAS TRYING TO ESCAPE WHILE YOU LET ME DOWN", @@ -4321,7 +4321,7 @@ const char *_textbj[][29] = { // 25 "I'LL NEVER FORGET YOU BUT I'VE REALIZED THAT THIS JUST COULDN'T WORK OUT RIGHT. TO BE HONEST, I'LL TELL YOU THAT THERE IS ANOTHER MAN. HE'S TALLER, STRONGER", "AND HE HAS ALSO RESCUED ME FROM DRASCULA. HE HAS ASKED ME TO MARRY HIM, AND I HAVE ACCEPTED", - "BYE JOHNNY. PLEASE DON'T TRY TO FIND SOME KIND OF EXPLANATION. YOU KNOW LOVE IS BLIND AND HAS ITS OWN WAYS", + "BYE JOHNNY. PLEASE DON'T TRY TO FIND SOME KIND OF EXPLANATION. YOU KNOW LOVE IS BLIND AND HAS IT'S OWN WAYS", "I HOPE THERE WON'T BE HARD FEELINGS BETWEEN US. REMEMBER THAT I STILL LOVE YOU, BUT ONLY AS A FRIEND", }, { @@ -4487,10 +4487,10 @@ const char *_texte[][24] = { "SINCE ALCOHOL STILL KEEPS ME QUITE YOUNG, I'M HERE LIKE A SCRAP YARD. EVERYTIME HE NEEDS SOMETHING FOR THE MONSTER HE IS MAKING, HE COMES AND TAKES IT FROM ME", "IT HURT AT FIRST, BUT I DON'T CARE ANYMORE", "I DON'T KNOW. I GUESS IT'S HIS GRADUATE PROJECT", - "I'M DESIDERIO, AND I CAN HELP YOU IN ANYTHING YOU NEED", + "I'M DESIDERIO, AND I CAN HELP YOU WITH ANYTHING YOU NEED", "THE TRUTH IS THAT I DON'T REALLY FEEL LIKE IT, BUT THANKS VERY MUCH ANYWAY SIR", // 10 - "YEAH, IT'S YOU", + "TAKE IT, IT'S YOURS", "WHY DO ALL ADVENTURE GAMES END WITH A SUNRISE OR A SUNSET?", "DO ALL THESE NAMES BELONG TO THE CREATORS OF THE GAME?", "AREN'T THEY ASHAMED TO BE SEEN BY EVERYBODY?", @@ -4643,10 +4643,10 @@ const char *_texti[][33] = { "I'M SORRY MASTER", "ARE YOU GOING TO BRING ANOTHER CRAZY SCIENTIST HERE? THE LABORATORY IS ALREADY FULL UP, AND BESIDES, THEY'RE ALL OUT OF DATE", // 5 - "HUSH MASTER, THE FEMINISTS COULD HEAR YOU", + "HUSH MASTER, THE FEMINISTS MIGHT HEAR YOU", "DAMN IT!", "I DIDN'T EXPECT YOU SO SOON, MASTER", - "QUITE BAD MASTER. THERE MUST BE SOME PROBLEMS WITH THE SATELLITE AND I JUST CAN'T RECEIVE ANYTHING. BESIDES THERE IS SOME INTERFERENCE BECAUSE OF THE STORM", + "QUITE BAD MASTER. THERE ARE SOME PROBLEMS WITH THE SATELLITE, I JUST CAN'T RECEIVE ANYTHING. THERE MUST BE SOME INTERFERENCE FROM THE STORM", "WHAT DO I KNOW, MASTER?", // 10 "YES, MY MASTER", @@ -4656,8 +4656,8 @@ const char *_texti[][33] = { "I'M IGOR, THE VALET. YOU CAN START WITH THE BALL ROOM. THERE'S BEEN A SUPER NATURAL ORGY IN THERE YESTERDAY AND IT LOOKS LIKE SHIT", // 15 "IF YOU NEED ANYTHING, JUST BUY IT", - "IT'S THE TAX RETURN APPLICATION FORM, CAN'T YOU SEE IT?", - "NEITHER DO I. FIRST OF ALL THE NUMBERS ARE VERY SMALL AND ALSO I CAN'T SEE MUCH AT THIS DISTANCE.", + "IT'S THE TAX RETURN APPLICATION FORM, CAN'T YOU SEE?", + "NEITHER DO I. THE NUMBERS ARE VERY SMALL AND I CAN'T SEE MUCH AT THIS DISTANCE.", "NO WAY! THEY MAKE ME LOOK UGLY", "OH, WELL. IT'S JUST LIKE A CRAZY PARTY THAT THE MASTER ORGANIZES WITH HIS FRIENDS EACH TIME SOME IDIOT COMES ALONG TRYING TO KILL HIM", // 20 @@ -4852,21 +4852,21 @@ const char *_textl[][32] = { { // 0 "", - "ARE YOU GOING TO LET OURSELVES BE GUIDED BY PRIMITIVE INSTINCTS JUST BECAUSE WE BELONG TO DIFFERENT RACES AND THE SOCIAL SITUATION IS TELLING US TO DO SO?", + "ARE YOU GOING TO LET YOURSELF BE GUIDED BY PRIMITIVE INSTINCTS JUST BECAUSE WE BELONG TO DIFFERENT RACES AND THE SOCIAL SITUATION IS TELLING US TO DO SO?", "AREN'T WE TIED BY SENSE? WHICH IS OUR MOST POWERFUL WEAPON AS WELL AS OUR MOST PRECIOUS GIFT?", "OH, IF WE ALL LET OUR THOUGHTS GUIDE OUR WAY IN LIFE WITHOUT LEAVING SOME ROOM FOR FEELINGS WHICH LET OUR PRE-EVOLUTIVE INSTINCTS COME OUT!", - "ANSWER ME, EPHEMERAL CREATURE. WOULDN'T WE ALL BE HAPPIER WITH THOSE EMOTIONAL BINDINGS?", + "ANSWER ME, EPHEMERAL CREATURE. WOULDN'T WE ALL BE HAPPIER WITHOUT THOSE EMOTIONAL BINDINGS?", // 5 "YOU ARE NOT GETTING THROUGH", "THIS IS A VERY CLEAR EXAMPLE, YOU SEE?: YOU WANT TO GET THROUGH AND GO AHEAD WITH YOUR ADVENTURE, AND I WON'T LET YOU DO THAT", - "WILL THAT BE A CONTROVERSIAL POINT BETWEEN US THAT HAVE JUST MET?", + "WILL THIS BE A CONTROVERSIAL POINT BETWEEN US AFTER WE HAVE ONLY JUST MET?", "WELL THEN", - "WELL, THAT DEPENDS ON WHAT WE TAKE A RELATIONSHIP FOR. SOME AUTHORS DEFEND...", + "WELL, THAT DEPENDS ON WHAT WE HAVE A RELATIONSHIP FOR. SOME AUTHORS DEFEND...", // 10 "YUCK! HUNTING AS A WAY TO SURVIVE IS AN INCOMPREHENSIBLE ARCHAIC THING FOR A SUPERIOR BEING LIKE ME. BESIDES, I'VE BECOME A VEGETARIAN", - "IT JUST SO HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO THINK AND GET TO THE ABOVE MENTIONED THOUGHT", - "IT TOOK ME A LONG TIME TO QUIT OLD HABITS BUT AT LEAST MY IRASCIBLE SOUL BIT UP THE CONCUPISCIBLE ONE, AND EVER SINCE, I'VE NEVER EATEN MEAT AGAIN", - "NOT EVEN THE PLEASURE OF SUCKING UP THE BONE, FEELING THE TASTE OF THE SKIN AND THAT SWEET TASTE OF MARROW...THAT JUST TAKES YOU TO HEAVENLY PLACES", + "IT JUST SO HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO THINK ABOUT THE ABOVE MENTIONED THOUGHT", + "IT TOOK ME A LONG TIME TO QUIT OLD HABITS BUT AT LEAST MY IRASCIBLE SOUL SWALLOWED UP THE CONCUPISCIBLE ONE, AND EVER SINCE, I'VE NEVER EATEN MEAT AGAIN", + "NOT EVEN THE PLEASURE OF SUCKING ON THE BONE, THE TASTE OF THE SKIN AND THAT SWEET TASTE OF MARROW...THAT JUST TAKES YOU TO HEAVENLY PLACES", "IT DOESN'T REALLY GET TO ME AT ALL", // 15 "WHAT?", @@ -5066,7 +5066,7 @@ const char *_textp[][20] = { // 5 "REALLY?", "SO?", - "I'M SORRY. THE PIANIST UNION TRADE DOESN'T ALLOW ME TO SAVE GIRLS FROM VAMPIRES' CLUTCHES", + "I'M SORRY. THE PIANIST TRADE UNION DOESN'T ALLOW ME TO SAVE GIRLS FROM VAMPIRES' CLUTCHES", "IF SHE HAD BEEN KIDNAPPED BY THE WEREWOLF...", "I CAN ONLY PLAY THIS SONG", // 10 @@ -5079,7 +5079,7 @@ const char *_textp[][20] = { "NO! I'M NOT TAKING THIS ANY LONGER!", "NO WAYYYYY!", "WHAT? OF COURSE I'M INTERESTED", - "THANKS GOD! I CAN PLAY A DIFFERENT SONG NOW!", + "THANK GOD! I CAN PLAY A DIFFERENT SONG NOW!", "I GUESS YOU CAN KEEP MY EAR-PLUGS", }, { @@ -5201,7 +5201,7 @@ const char *_textt[][25] = { "WELL, THERE ARE ALL KINDS OF STORIES GOING AROUND ABOUT HIM, SOME SAY HE IS A VAMPIRE WHO KIDNAPS PEOPLE TO SUCK THEIR BLOOD", "HOWEVER, SOME OTHERS SAY THAT HE IS JUST AN ORGAN-DEALER AND THAT IS THE REASON WHY THERE ARE BODY PARTS ALL OVER THE PLACE", "BUT OF COURSE, THOSE ARE JUST RUMORS. HE'S PROBABLY BOTH THINGS. BY THE WAY, WHY DO YOU WANT TO MEET HIM?", - "HERE IS YOUR DRINK, FORGET IT. I'M REALLY BUSY...", + "FORGET IT. I'M REALLY BUSY...", "WELL, OK. BUT JUST BECAUSE I WANT TO DO IT, NOT BECAUSE YOU TOLD ME TO", // 10 "THEY'RE WINNING", @@ -5359,36 +5359,36 @@ const char *_textvb[][63] = { "", "WHO THE HELL IS CALLING AT THIS TIME?", "OH, ..OH, NO, NO....I'M...GANIMEDES THE DWARF. PROFESSOR VON BRAUN DOESN'T LIVE HERE ANYMORE", - "NO, I DON'T KNOW WHERE IT IS !!", + "NO, I DON'T KNOW WHERE HE LIVES !!", "GET OUT!!", // 5 "IT'S TOO LATE NOW, YOU IDIOT!! IT ALWAYS IS", "I COULDN'T AGREE MORE", "ME, SCARED?", - "LISTEN HERE, DUDE. YOU'RE TALKING TO THE ONLY PERSON WHO KNOWS THE SECRET OF HOW TO FIGHT AGAINST THE VAMPIRE", + "LISTEN HERE, DUDE. YOU'RE TALKING TO THE ONLY PERSON WHO KNOWS THE SECRET OF HOW TO FIGHT AGAINST THE VAMPIRES", "YOU NEED TO HAVE SPECIAL SKILLS TO FIGHT AGAINST A VAMPIRE. NOT EVERYBODY CAN DO IT", // 10 "YOU DON'T HAVE THEM", "I'M SURE YOU WOULDN'T BET ALL YOUR MONEY ON IT, HUH?", "WELL, ALL RIGHT, COME ON IN", - "IF YOU REALLY MEAN TO FACE DRASCULA, YOU'VE GOT TO BE ABLE TO TAKE ALL TYPES OF CREAKING AND VAMPIRE-LIKE NOISES", + "IF YOU REALLY MEAN TO FACE DRASCULA, YOU'VE GOT TO BE ABLE TO STAND ALL TYPES OF CREAKING AND VAMPIRE-LIKE NOISES", "IS THAT CLEAR?", // 15 "OK, WAIT A MINUTE", "STAND IN THE CENTER OF THE ROOM, PLEASE", - "WHERE DID I PUT THAT RECORD CALLED \"NAILS SCRATCHING THE BLACKBOARD\"?", + "NOW WHERE DID I PUT THE RECORD CALLED \"NAILS SCRATCHING THE BLACKBOARD\"?", "ALL RIGHT. LET'S GET TO IT", "YOU ARE USELESS. YOU SEE...?, JUST LIKE THE REST!!", // 20 "JUST GIVE ME THE MONEY, YOU LOST SO GET OUT OF HERE", "AND DON'T COME BACK UNTIL YOU ARE ABSOLUTELY READY", "WHAT DO YOU WANT NOW?", - "I HAVE TO ADMIT IT. YOU REALLY GOT WHAT IT TAKES TO FIGHT AGAINST THE VAMPIRES", - "HEY, TAKE YOUR MONEY. I ADMIT IT WHEN I MAKE A MISTAKE...", + "I HAVE TO ADMIT IT. YOU REALLY HAVE WHAT IT TAKES TO FIGHT AGAINST THE VAMPIRES", + "HEY, TAKE YOUR MONEY. I'LL ADMIT IT. I MAKE A MISTAKE...", // 25 "LEAVE ME ALONE NOW, I WANT TO GET SOME SLEEP", "WHENEVER YOU ARE READY TO FIGHT AGAINST THE VAMPIRES, JUST COME BACK AND I'LL HELP YOU OUT", - "OH, THAT'S EASY. TAKE THIS CRUCIFIX JUST USING THE LIGHT OF THIS CRUCIFIX IS ENOUGH TO DESTROY HIM", + "OH, THAT'S EASY. TAKE THIS CRUCIFIX JUST USING IT'S LIGHT IS ENOUGH TO DESTROY A VAMPIRE", "YOU HAVE TO BE EXTRA CAREFUL WITH DRASCULA, HIS FRISISNOTIC POWERS HAVE MADE OF HIM THE MOST POWERFUL VAMPIRE", "YOU'D BE LOST IF IT WASN'T FOR THIS...", // 30 @@ -5428,8 +5428,8 @@ const char *_textvb[][63] = { "ARE YOU JOHN HACKER? I'M DOCTOR VON BRAUN", "LISTEN TO ME, THIS IS VERY IMPORTANT. IT'S ABOUT THE BREW", // 60 - "SHUT UP AND LET ME TALK. I JUST FOUND THIS BOOK ABOUT ANTI-VAMPIRE BREWS WARNING AGAINST MIXING THE CIGARETTE WITH ANY ALCOHOLIC DRINK BEFORE YOU", - "ALCOHOL REACTS WHEN MIXED WITH BREW, SO THAT IT CANCELS OUT ITS EFFECTS IN A FEW SECONDS", + "SHUT UP AND LET ME TALK. I JUST FOUND THIS BOOK ABOUT ANTI-VAMPIRE BREWS WARNING AGAINST MIXING THE CIGARETTE WITH ANY ALCOHOLIC DRINK", + "ALCOHOL REACTS WHEN MIXED WITH BREW, SO THAT IT CANCELS OUT IT'S EFFECTS IN A FEW SECONDS", "I'M SORRY, BUT I HAVE TO HANG UP RIGHT NOW. THE POLICE ARE LOOKING FOR ME, THEY THINK I'M A DRUG PUSHER. IDIOTS!. ANYWAY, BYE AND GOOD LUCK SAVING THE WORLD!", }, { @@ -5785,7 +5785,7 @@ const char *_texthis[][5] = { { "", "A long time ago, it seems that Drascula killed Von Braun's wife, and then, as he intended to face the count, Von Braun started to research all he could find on vampires.", - "When he thought he was ready, he came up to the castle and had a very violent encounter with Drascula.", + "When he thought he was ready, he went up to the castle and had a very violent encounter with Drascula.", "Nobody knows exactly what happened there. Although Von Braun lost, Drascula could not kill him.", "Von Braun felt humiliated by his defeat, he run away from the castle and has never dared to face Drascula again.", }, @@ -5949,26 +5949,31 @@ const char *_textverbs[][6] = { }; -const char *_textmisc[][2] = { +const char *_textmisc[][3] = { { "HUNCHBACKED", "Transilvania, 1993 d.c.", + "GOOOOOOOAAAAAAAL!", }, { "jorobado", "Transilvania, 1993 d.c. (despues de cenar)", + "GOOOOOOOOOOOOOOOL", }, { "HUNCHBACKED", "Transilvania, 1993 d.c.", + "GOOOOOOOAAAAAAAL!", }, { "HUNCHBACKED", "Transilvania, 1993 d.c.", + "GOOOOOOOAAAAAAAL!", }, { "HUNCHBACKED", "Transilvania, 1993 d.c.", + "GOOOOOOOAAAAAAAL!", }, }; -- cgit v1.2.3 From 3d072b44029cfa6a574faf4b833bbbe2225e20d3 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Jun 2008 20:21:06 +0000 Subject: Another English fix from sanguineh svn-id: r32586 --- engines/drascula/staticdata.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 3bae988562..8c06b39a17 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -791,7 +791,7 @@ const char *_text[][501] = { // 120 "IT IS VERY STIFF, JUST LIKE MY BOSS", "A VERY SHARP STAKE", - "YOU FAITHFUL SHARP-PAINTED STAKE, FROM THE MOST NOBLE TRANSILVANIAN OAK TREE", + "YOU FAITHFUL SHARP-POINTED STAKE, FROM THE MOST NOBLE TRANSILVANIAN OAK TREE", "DAMN, I HAVE TO CUT MY NAILS!", "B.J. IS IN THERE... SHE IS A REALLY HOT CHICK!", // 125 -- cgit v1.2.3 From 18aec42f1909e9e4320ed7abe1c8dac2b6f6ffbb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 6 Jun 2008 20:58:32 +0000 Subject: Fix apostrophe rendering in conversation texts. svn-id: r32587 --- engines/drascula/drascula.cpp | 6 ++++++ engines/drascula/staticdata.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index da621a6674..50d4aad644 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1481,6 +1481,12 @@ void DrasculaEngine::print_abc_opc(const char *said, int screenX, int screenY, i int c = toupper(said[h]); + // WORKAROUND: Even original did not process it correctly + // Fixes apostrophe rendering + if (_lang != kSpanish) + if (c == '\'') + c = '\244'; + for (int i = 0; i < CHARMAP_SIZE; i++) { if (c == charMap[i].inChar) { // Convert the mapped char of the normal font to the diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 8c06b39a17..e6e49f870c 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -75,7 +75,7 @@ const CharInfo charMap[CHARMAP_SIZE] = { { '\225', 78, 2 }, { '\227', 87, 2 }, // I, J { '\203', 96, 2 }, { '\210', 105, 2 }, // K, L { '\214', 114, 2 }, { '\223', 123, 2 }, // M, N - { '\226', 132, 2 }, { '\047', 141, 2 }, // special Spanish char, O + { '\226', 132, 2 }, { '\'', 141, 2 }, // special Spanish char, O { '\200', 150, 2 }, { '\207', 150, 2 }, // P, P { '\265', 6, 2 }, { '\220', 15, 2 }, // A, B { '\326', 24, 2 }, { '\340', 33, 2 }, // C, D -- cgit v1.2.3 From 67765c65592cefcc942af60e69567f0419b7b767 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 7 Jun 2008 10:10:40 +0000 Subject: Simplified talk_hacker svn-id: r32588 --- engines/drascula/animation.cpp | 24 ++++++++++++------------ engines/drascula/drascula.h | 2 +- engines/drascula/talk.cpp | 5 ++++- 3 files changed, 17 insertions(+), 14 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 68c6fac8d9..c9efaa96b3 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -738,27 +738,27 @@ void DrasculaEngine::animation_4_2() { talk_blind(1); pause(5); - talk_hacker(_textd[_lang][57], "d57.als"); + talk_hacker(57); pause(6); talk_blind(2); pause(4); - talk_hacker(_textd[_lang][58],"d58.als"); + talk_hacker(58); talk_blind(3); delay(14); - talk_hacker(_textd[_lang][59],"d59.als"); + talk_hacker(59); talk_blind(4); - talk_hacker(_textd[_lang][60],"d60.als"); + talk_hacker(60); talk_blind(5); - talk_hacker(_textd[_lang][61],"d61.als"); + talk_hacker(61); talk_blind(6); - talk_hacker(_textd[_lang][62],"d62.als"); + talk_hacker(62); talk_blind(7); - talk_hacker(_textd[_lang][63],"d63.als"); + talk_hacker(63); talk_blind(8); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); _system->delayMillis(1000); - talk_hacker(_textd[_lang][64], "d64.als"); + talk_hacker(64); talk_blind(9); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); @@ -2520,11 +2520,11 @@ void DrasculaEngine::animation_6_2() { pause(1); if (flags[4] == 1) - talk_hacker(_textd[_lang][66], "d66.als"); + talk_hacker(66); pause(6); talk_blind(11); pause(4); - talk_hacker(_textd[_lang][67], "d67.als"); + talk_hacker(67); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); @@ -2572,11 +2572,11 @@ void DrasculaEngine::animation_33_2() { talk_blind(1); pause(5); - talk_hacker(_textd[_lang][57], "d57.als"); + talk_hacker(57); pause(6); _system->delayMillis(1000); talk_blind(10); - talk_hacker(_textd[_lang][65], "d65.als"); + talk_hacker(65); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateScreen(); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index cb396fc063..b49ddb0a08 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -425,7 +425,7 @@ public: void talk_vonBraun(int); void talk_vonBraunpuerta(int); void talk_blind(int); - void talk_hacker(const char *, const char *); + void talk_hacker(int); void hiccup(int); void finishSound(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index d013186beb..f121900b9a 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -671,7 +671,10 @@ void DrasculaEngine::talk_blind(int index) { } while (!isTalkFinished(&length)); } -void DrasculaEngine::talk_hacker(const char *said, const char *filename) { +void DrasculaEngine::talk_hacker(int index) { + char filename[20]; + sprintf(filename, "d%i.als", index); + const char *said = _textd[_lang][index]; int length = strlen(said); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); -- cgit v1.2.3 From 7192c88b19d4f89f86f7b0fa1c08349e45c6b3c8 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 7 Jun 2008 11:31:40 +0000 Subject: Used enums for igor talker types Merged a lot of code of talk_pianist, talk_drunk, talk_werewolf and talk_mus svn-id: r32589 --- engines/drascula/drascula.h | 1 + engines/drascula/talk.cpp | 161 +++++++++++++------------------------------- 2 files changed, 47 insertions(+), 115 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index b49ddb0a08..25177f2210 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -426,6 +426,7 @@ public: void talk_vonBraunpuerta(int); void talk_blind(int); void talk_hacker(int); + void talk_generic(const char* said, const char* filename, int* faces, int faceCount, int* coords); void hiccup(int); void finishSound(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index f121900b9a..b63e14e670 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -68,17 +68,17 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { talkInit(filename); do { - if (talkerType == 0 || talkerType == 1) { + if (talkerType == kIgorDch || talkerType == kIgorFront) { face = _rnd->getRandomNumber(7); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); - } else if (talkerType == 3 || talkerType == 4) { + } else if (talkerType == kIgorSeated || talkerType == kIgorWig) { face = _rnd->getRandomNumber(3); copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); } - if (talkerType == 0) { + if (talkerType == kIgorDch) { placeIgor(); placeDrascula(); copyBackground(igorX + 17, igorY, igorX + 17, igorY, 37, 24, drawSurface1, screenSurface); @@ -88,7 +88,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { centerText(said, igorX + 26, igorY); updateScreen(); pause(3); - } else if (talkerType == 1) { + } else if (talkerType == kIgorFront) { if (currentChapter == 1 || currentChapter == 4) placeIgor(); if (currentChapter == 1) @@ -101,13 +101,13 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { centerText(said, igorX + 26, igorY); updateScreen(); pause(3); - } else if (talkerType == 2) { + } else if (talkerType == kIgorDoor) { updateRoom(); if (withVoices == 0) centerText(said, 87, 66); updateScreen(); - } else if (talkerType == 3 || talkerType == 4) { - if (talkerType == 3) + } else if (talkerType == kIgorSeated || talkerType == kIgorWig) { + if (talkerType == kIgorSeated) copyBackground(x_talk3[face], 109, 207, 92, 21, 23, drawSurface3, screenSurface); else copyBackground(x_talk4[face], 78, 199, 94, 38, 27, drawSurface3, screenSurface); @@ -121,12 +121,12 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { } } while (!isTalkFinished(&length)); - if ((talkerType == 1 && currentChapter == 6) || - talkerType == 2 || talkerType == 3 || talkerType == 4) { + if ((talkerType == kIgorFront && currentChapter == 6) || + talkerType == kIgorDoor || talkerType == kIgorSeated || talkerType == kIgorWig) { updateRoom(); } - if (talkerType == 0 || (talkerType == 1 && currentChapter == 1)) { + if (talkerType == kIgorDch || (talkerType == kIgorFront && currentChapter == 1)) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); placeIgor(); placeDrascula(); @@ -458,35 +458,10 @@ void DrasculaEngine::talk_pianist(int index) { sprintf(filename, "P%i.als", index); const char* said = _textp[_lang][index]; int x_talk[4] = { 97, 145, 193, 241 }; - int face; - int length = strlen(said); + int coords[7] = { 139, 228, 112, 47, 60, 221, 128 }; color_abc(kColorWhite); - - talkInit(filename); - - do { - face = _rnd->getRandomNumber(3); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); - - copyBackground(x_talk[face], 139, 228, 112, 47, 60, - extraSurface, screenSurface); - moveCharacters(); - updateRefresh(); - - if (withVoices == 0) - centerText(said, 221, 128); - - updateScreen(); - - pause(3); - } while (!isTalkFinished(&length)); - - updateRoom(); - updateScreen(); + talk_generic(said, filename, x_talk, 4, coords); } void DrasculaEngine::talk_drunk(int index) { @@ -494,8 +469,7 @@ void DrasculaEngine::talk_drunk(int index) { sprintf(filename, "B%i.als", index); const char *said = _textb[_lang][index]; int x_talk[8] = { 1, 21, 41, 61, 81, 101, 121, 141 }; - int face; - int length = strlen(said); + int coords[7] = { 29, 177, 50, 19, 19, 181, 54 }; if (currentChapter == 1) loadPic("an11y13.alg", frontSurface); @@ -509,29 +483,7 @@ void DrasculaEngine::talk_drunk(int index) { color_abc(kColorDarkGreen); - talkInit(filename); - - do { - face = _rnd->getRandomNumber(7); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); - - copyBackground(x_talk[face], 29, 177, 50, 19, 19, frontSurface, screenSurface); - moveCharacters(); - updateRefresh(); - - if (withVoices == 0) - centerText(said, 181, 54); - - updateScreen(); - - pause(3); - } while (!isTalkFinished(&length)); - - updateRoom(); - updateScreen(); + talk_generic(said, filename, x_talk, 8, coords); flags[13] = 0; if (currentChapter == 1) @@ -696,34 +648,10 @@ void DrasculaEngine::talk_werewolf(int index) { sprintf(filename, "L%i.als", index); const char *said = _textl[_lang][index]; int x_talk[9] = {52, 79, 106, 133, 160, 187, 214, 241, 268}; - int face; - int length = strlen(said); + int coords[7] = { 136, 198, 81, 26, 24, 203, 78 }; color_abc(kColorRed); - - talkInit(filename); - - do { - face = _rnd->getRandomNumber(8); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); - - copyBackground(x_talk[face], 136, 198, 81, 26, 24, drawSurface3, screenSurface); - moveCharacters(); - updateRefresh(); - - if (withVoices == 0) - centerText(said, 203, 78); - - updateScreen(); - - pause(3); - } while (!isTalkFinished(&length)); - - updateRoom(); - updateScreen(); + talk_generic(said, filename, x_talk, 9, coords); } void DrasculaEngine::talk_mus(int index) { @@ -731,35 +659,10 @@ void DrasculaEngine::talk_mus(int index) { sprintf(filename, "E%i.als", index); const char *said = _texte[_lang][index]; int x_talk[8] = { 16, 35, 54, 73, 92, 111, 130, 149}; - int face; - int length = strlen(said); + int coords[7] = { 156, 190, 64, 18, 24, 197, 64 }; color_abc(kColorWhite); - - talkInit(filename); - - do { - face = _rnd->getRandomNumber(7); - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); - - copyBackground(x_talk[face], 156, 190, 64, 18, 24, drawSurface3, screenSurface); - moveCharacters(); - updateRefresh(); - - if (withVoices == 0) - centerText(said, 197, 64); - - updateScreen(); - - pause(3); - - } while (!isTalkFinished(&length)); - - updateRoom(); - updateScreen(); + talk_generic(said, filename, x_talk, 8, coords); } void DrasculaEngine::talk_pen(const char *said, const char *filename, int talkerType) { @@ -1041,4 +944,32 @@ void DrasculaEngine::talk_dr_grande(int index) { } while (!isTalkFinished(&length)); } +void DrasculaEngine::talk_generic(const char* said, const char* filename, int* faces, int faceCount, int* coords) { + int face; + int length = strlen(said); + talkInit(filename); + + do { + face = _rnd->getRandomNumber(faceCount - 1); + + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateRefresh_pre(); + copyBackground(faces[face], coords[0], coords[1], coords[2], + coords[3], coords[4], drawSurface3, screenSurface); + moveCharacters(); + updateRefresh(); + + if (withVoices == 0) + centerText(said, coords[5], coords[6]); + + updateScreen(); + + pause(3); + + } while (!isTalkFinished(&length)); + + updateRoom(); + updateScreen(); +} + } // End of namespace Drascula -- cgit v1.2.3 From d3adb312c98862b696f1f12ac01bc470e4ee34f5 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 7 Jun 2008 11:43:54 +0000 Subject: Fixed regression from last commit svn-id: r32590 --- engines/drascula/drascula.h | 2 +- engines/drascula/talk.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 25177f2210..8167fc136a 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -426,7 +426,7 @@ public: void talk_vonBraunpuerta(int); void talk_blind(int); void talk_hacker(int); - void talk_generic(const char* said, const char* filename, int* faces, int faceCount, int* coords); + void talk_generic(const char* said, const char* filename, int* faces, int faceCount, int* coords, byte* surface); void hiccup(int); void finishSound(); diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index b63e14e670..7a16b8d976 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -461,7 +461,7 @@ void DrasculaEngine::talk_pianist(int index) { int coords[7] = { 139, 228, 112, 47, 60, 221, 128 }; color_abc(kColorWhite); - talk_generic(said, filename, x_talk, 4, coords); + talk_generic(said, filename, x_talk, 4, coords, extraSurface); } void DrasculaEngine::talk_drunk(int index) { @@ -483,7 +483,7 @@ void DrasculaEngine::talk_drunk(int index) { color_abc(kColorDarkGreen); - talk_generic(said, filename, x_talk, 8, coords); + talk_generic(said, filename, x_talk, 8, coords, frontSurface); flags[13] = 0; if (currentChapter == 1) @@ -651,7 +651,7 @@ void DrasculaEngine::talk_werewolf(int index) { int coords[7] = { 136, 198, 81, 26, 24, 203, 78 }; color_abc(kColorRed); - talk_generic(said, filename, x_talk, 9, coords); + talk_generic(said, filename, x_talk, 9, coords, drawSurface3); } void DrasculaEngine::talk_mus(int index) { @@ -662,7 +662,7 @@ void DrasculaEngine::talk_mus(int index) { int coords[7] = { 156, 190, 64, 18, 24, 197, 64 }; color_abc(kColorWhite); - talk_generic(said, filename, x_talk, 8, coords); + talk_generic(said, filename, x_talk, 8, coords, drawSurface3); } void DrasculaEngine::talk_pen(const char *said, const char *filename, int talkerType) { @@ -944,7 +944,7 @@ void DrasculaEngine::talk_dr_grande(int index) { } while (!isTalkFinished(&length)); } -void DrasculaEngine::talk_generic(const char* said, const char* filename, int* faces, int faceCount, int* coords) { +void DrasculaEngine::talk_generic(const char* said, const char* filename, int* faces, int faceCount, int* coords, byte* surface) { int face; int length = strlen(said); talkInit(filename); @@ -955,7 +955,7 @@ void DrasculaEngine::talk_generic(const char* said, const char* filename, int* f copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); copyBackground(faces[face], coords[0], coords[1], coords[2], - coords[3], coords[4], drawSurface3, screenSurface); + coords[3], coords[4], surface, screenSurface); moveCharacters(); updateRefresh(); -- cgit v1.2.3 From b28b0fe6d7bb306e761057bb74fa018da369ada2 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sat, 7 Jun 2008 14:15:56 +0000 Subject: Cleanup estanteria -> bookcase svn-id: r32591 --- engines/drascula/animation.cpp | 69 +++++++++++++----------------------------- engines/drascula/talk.cpp | 1 - 2 files changed, 21 insertions(+), 49 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index c9efaa96b3..53fea4a57c 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -52,6 +52,7 @@ void DrasculaEngine::updateAnim2(int y, int px, int py, int width, int height, i } } +// This is the game's introduction sequence void DrasculaEngine::animation_1_1() { int l, l2, p; int pixelPos[6]; @@ -381,6 +382,7 @@ void DrasculaEngine::animation_1_1() { loadPic(99, backSurface); } +// John falls in love with BJ, who is then abducted by Drascula void DrasculaEngine::animation_2_1() { int l; @@ -1143,18 +1145,11 @@ void DrasculaEngine::animation_23_joined2() { } void DrasculaEngine::animation_25_2() { - int cabinPos[6]; + int cabinPos[6] = { 150, 6, 69, 0, 158, 161 }; loadPic("an14_2.alg", backSurface); loadPic(18, drawSurface1); - cabinPos[0] = 150; - cabinPos[1] = 6; - cabinPos[2] = 69; - cabinPos[3] = 0; - cabinPos[4] = 158; - cabinPos[5] = 161; - flags[24] = 0; playSound(6); @@ -1703,22 +1698,16 @@ void DrasculaEngine::animation_12_5() { bgPalette3[color][component] = gamePalette[color][component]; } - for (fade = 1; fade >= 0; fade--) { - for (color = 0; color < 128; color++) - for (component = 0; component < 3; component++) - bgPalette1[color][component] = adjustToVGA(bgPalette1[color][component] - 8 + fade); - } - - for (fade = 2; fade >= 0; fade--) { - for (color = 0; color < 128; color++) - for (component = 0; component < 3; component++) - bgPalette2[color][component] = adjustToVGA(bgPalette2[color][component] - 8 + fade); - } - for (fade = 3; fade >= 0; fade--) { - for (color = 0; color < 128; color++) - for (component = 0; component < 3; component++) + for (color = 0; color < 128; color++) { + for (component = 0; component < 3; component++) { bgPalette3[color][component] = adjustToVGA(bgPalette3[color][component] - 8 + fade); + if (fade <= 2) + bgPalette2[color][component] = adjustToVGA(bgPalette2[color][component] - 8 + fade); + if (fade <= 1) + bgPalette1[color][component] = adjustToVGA(bgPalette1[color][component] - 8 + fade); + } + } } loadPic("3an11_1.alg", backSurface); @@ -1788,16 +1777,10 @@ void DrasculaEngine::animation_13_5() { int frame = 0; int frus_x[] = {1, 46, 91, 136, 181, 226, 271}; int frus_y[] = {1, 1, 1, 1, 1, 1, 1, 89}; - int pos_frusky[6]; + int pos_frusky[6] = { 1, 1, frank_x, 81, 44, 87 }; loadPic("auxfr.alg", backSurface); - pos_frusky[3] = 81; - pos_frusky[4] = 44; - pos_frusky[5] = 87; - pos_frusky[0] = 1; - pos_frusky[1] = 1; - pos_frusky[2] = frank_x; updateRoom(); copyRectClip(pos_frusky, backSurface, screenSurface); updateScreen(); @@ -1812,7 +1795,7 @@ void DrasculaEngine::animation_13_5() { pos_frusky[2] = frank_x; copyRectClip( pos_frusky, backSurface, screenSurface); updateScreen(); - frank_x = frank_x - 5; + frank_x -= 5; frame++; if (frank_x <= -45) break; @@ -1864,13 +1847,11 @@ void DrasculaEngine::animation_17_5() { } void DrasculaEngine::animation_1_6() { - int l; - trackProtagonist = 0; curX = 103; curY = 108; flags[0] = 1; - for (l = 0; l < 200; l++) + for (int l = 0; l < 200; l++) factor_red[l] = 98; loadPic("auxig2.alg", frontSurface); @@ -1952,18 +1933,11 @@ void DrasculaEngine::animation_4_6() { } void DrasculaEngine::animation_5_6() { - int n, pos_pen[6]; - - pos_pen[0] = 1; - pos_pen[1] = 29; - pos_pen[2] = 204; - pos_pen[3] = -125; - pos_pen[4] = 18; - pos_pen[5] = 125; + int pos_pen[6] = { 1, 29, 204, -125, 18, 125 }; animate("man.bin", 14); - for (n = -125; n <= 0; n = n + 2) { + for (int n = -125; n <= 0; n = n + 2) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); pos_pen[3] = n; @@ -2069,7 +2043,7 @@ void DrasculaEngine::animation_9_6() { updateScreen(); talk(301); v_cd = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16; - v_cd = v_cd + 4; + v_cd += 4; playMusic(17); fadeToBlack(1); clearRoom(); @@ -2710,15 +2684,14 @@ void DrasculaEngine::animation_6_4() { } void DrasculaEngine::animation_8_4() { - int frame; - int estanteria_x[] = {1, 75, 149, 223, 1, 75, 149, 223, 149, 223, 149, 223, 149, 223}; - int estanteria_y[] = {1, 1, 1, 1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74}; + int bookcaseX[] = {1, 75, 149, 223, 1, 75, 149, 223, 149, 223, 149, 223, 149, 223}; + int bookcaseY[] = {1, 1, 1, 1, 74, 74, 74, 74, 74, 74, 74, 74, 74, 74}; loadPic("an_8.alg", frontSurface); - for (frame = 0; frame < 14; frame++) { + for (int frame = 0; frame < 14; frame++) { pause(2); - copyBackground(estanteria_x[frame], estanteria_y[frame], 77, 45, 73, 72, frontSurface, screenSurface); + copyBackground(bookcaseX[frame], bookcaseY[frame], 77, 45, 73, 72, frontSurface, screenSurface); updateScreen(77, 45, 77, 45, 73, 72, screenSurface); } diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 7a16b8d976..95765fe867 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -965,7 +965,6 @@ void DrasculaEngine::talk_generic(const char* said, const char* filename, int* f updateScreen(); pause(3); - } while (!isTalkFinished(&length)); updateRoom(); -- cgit v1.2.3 From f6a1a89d04810fc453db81becd6ab67f84be51b1 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Jun 2008 14:45:01 +0000 Subject: Patch #1986992: "DRASCULA: correcting errors" svn-id: r32592 --- engines/drascula/drascula.cpp | 2 +- engines/drascula/staticdata.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 50d4aad644..49dc7def50 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -1401,7 +1401,7 @@ bool DrasculaEngine::saveLoadScreen() { } else if (mouseX > 168 && mouseY > 154 && mouseX < 242 && mouseY < 180) break; else if (selectionMade == 0) { - print_abc("Please select a saved game to load", 117, 15); + print_abc("Please select a slot", 117, 15); } updateScreen(); delay(200); diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index e6e49f870c..f833c95482 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -5071,7 +5071,7 @@ const char *_textp[][20] = { "I CAN ONLY PLAY THIS SONG", // 10 "I'M A CONSERVATOIRE PIANIST AND THE BARTENDER WON'T BUY MORE SCORES FOR ME", - "OH GOD, I REALLY LOVE CLASSIC MUSIC!", + "OH GOD, I REALLY LOVE CLASSICAL MUSIC!", "IT'S BECAUSE I'M WEARING EAR-PLUGS", "IT'S BECAUSE I CAN LIP-READ", "NOOO", -- cgit v1.2.3 From 1217f0a42be87138a2d375bd78b50b880b2bdcab Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sat, 7 Jun 2008 15:37:17 +0000 Subject: added support for reset and power buttons svn-id: r32593 --- backends/platform/wii/main.cpp | 19 +++++++++++++++++++ backends/platform/wii/osystem.cpp | 2 ++ backends/platform/wii/osystem.h | 13 +++++++++++++ backends/platform/wii/osystem_events.cpp | 9 +++++++++ 4 files changed, 43 insertions(+) diff --git a/backends/platform/wii/main.cpp b/backends/platform/wii/main.cpp index 7529df6de3..5753ecefe4 100644 --- a/backends/platform/wii/main.cpp +++ b/backends/platform/wii/main.cpp @@ -36,6 +36,17 @@ extern "C" { #endif +bool reset_btn_pressed = false; +bool power_btn_pressed = false; + +void reset_cb(void) { + reset_btn_pressed = true; +} + +void power_cb(void) { + power_btn_pressed = true; +} + int main(int argc, char *argv[]) { s32 res; @@ -50,6 +61,9 @@ int main(int argc, char *argv[]) { printf("startup\n"); + SYS_SetResetCallback(reset_cb); + SYS_SetPowerCallback(power_cb); + if (!fatInitDefault()) { printf("fatInitDefault failed\n"); } else { @@ -77,6 +91,11 @@ int main(int argc, char *argv[]) { fatUnsafeUnmount(PI_DEFAULT); } + if (power_btn_pressed) { + printf("shutting down\n"); + SYS_ResetSystem(SYS_POWEROFF, 0, 0); + } + printf("reloading\n"); return res; diff --git a/backends/platform/wii/osystem.cpp b/backends/platform/wii/osystem.cpp index 97bee24d0f..2667ecb69d 100644 --- a/backends/platform/wii/osystem.cpp +++ b/backends/platform/wii/osystem.cpp @@ -63,6 +63,8 @@ OSystem_Wii::OSystem_Wii() : _mouseKeyColor(0), _mouseCursor(NULL), + _event_quit(false), + _savefile(NULL), _mixer(NULL), _timer(NULL) { diff --git a/backends/platform/wii/osystem.h b/backends/platform/wii/osystem.h index f65310bada..2a168fd0b7 100644 --- a/backends/platform/wii/osystem.h +++ b/backends/platform/wii/osystem.h @@ -37,6 +37,17 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + +extern bool reset_btn_pressed; +extern bool power_btn_pressed; + +#ifdef __cplusplus +} +#endif + class OSystem_Wii : public OSystem { private: s64 _startup_time; @@ -69,6 +80,8 @@ private: u8 _mouseKeyColor; u8 *_mouseCursor; + bool _event_quit; + u32 _lastPadCheck; void initGfx(); diff --git a/backends/platform/wii/osystem_events.cpp b/backends/platform/wii/osystem_events.cpp index 09dfb5e96b..2d7c2d9c18 100644 --- a/backends/platform/wii/osystem_events.cpp +++ b/backends/platform/wii/osystem_events.cpp @@ -140,6 +140,15 @@ void OSystem_Wii::updateEventScreenResolution() { } while (0) bool OSystem_Wii::pollEvent(Common::Event &event) { + if ((reset_btn_pressed || power_btn_pressed) && !_event_quit) { + _event_quit = true; + event.type = Common::EVENT_QUIT; + + printf("quit event\n"); + + return true; + } + u32 bd, bh, bu; PAD_ScanPads(); -- cgit v1.2.3 From b17d9f4fb0a12db1d0af3c20196f67e3b9af7ef4 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sat, 7 Jun 2008 15:39:25 +0000 Subject: -Wno-multichar slipped in twice svn-id: r32594 --- backends/platform/wii/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/backends/platform/wii/Makefile b/backends/platform/wii/Makefile index 74425246f2..a52ceb1774 100644 --- a/backends/platform/wii/Makefile +++ b/backends/platform/wii/Makefile @@ -63,8 +63,7 @@ INCDIR = $(srcdir) . $(srcdir)/engines/ $(DEVKITPRO)/libogc/include LIBDIR = $(DEVKITPRO)/libogc/lib/wii CXXFLAGS = -g -Os -Wall $(MACHDEP) -D__WII__ -Wno-multichar -Wno-long-long \ - -Wno-multichar -Wno-unknown-pragmas -Wno-reorder \ - -fno-exceptions -fno-rtti + -Wno-unknown-pragmas -Wno-reorder -fno-exceptions -fno-rtti CXXFLAGS += $(addprefix -I,$(INCDIR)) LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(TARGET).elf.map -- cgit v1.2.3 From a78c2251ca8ed02f2955af28d4d82245de04660f Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Jun 2008 18:38:44 +0000 Subject: Ooops. Several missing colons in the texts which lead to wrong messages were spotted and fixed. svn-id: r32596 --- engines/drascula/staticdata.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index f833c95482..56ff8d08d7 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -2893,7 +2893,7 @@ const char *_text[][501] = { "ET ALORS, POURQUOI TU M'\220COUTES?", "PR\322TE-MOI LES TAMPONS", "ALLONS! JE VAIS TE LES REDONNER TOUT DE SUITE", - "ALLOOONSSS..." + "ALLOOONSSS...", // 365 "AU REVOIR. JE DOIS TUER UN VAMPIRE", "", @@ -4370,7 +4370,7 @@ const char *_textbj[][29] = { "JA STELL DIR VOR, HEINZ, ICH WOLLTE MICH HIER GERADE HINLEGEN, ALS ICH EINEN LAUTEN KNALL IM FLUR HoeRTE", // 5 "ANFANGS HAB ICH NICHT SO DRAUF GEACHTET, ABER NACHDEM ICH 2 STUNDEN LANG NICHT SCHLAFEN KONNTE, GING ICH RUNTER, UM SPAZIERENZUGEHEN", - "ICH WAR NATueRLICH BAFF, ALS ICH DICH VOR der tuer LIEGEN SAH. ICH HABE ECHT GEDACHT,DASS DU TOT BIST, HEHE, WIE bloed" + "ICH WAR NATueRLICH BAFF, ALS ICH DICH VOR der tuer LIEGEN SAH. ICH HABE ECHT GEDACHT,DASS DU TOT BIST, HEHE, WIE bloed", "ICH WOLLTE GERADE MUND-ZU-MUND BEATMUNG MACHEN, ABER DANN FINGST DU JA AN ZU REDEN", "DU FASELTEST WAS VON NER VOGELSCHEUCHE UND ICH Hatte ganz schoen schiss,WEIL sprechende tote schon echt UNHEIMLICH sind?", "NICHT WAHR ?NAJA,ICH HABE DICH DANN AUFGEHOBEN UND IN MEIN ZIMMER GETRAGEN UND AUF MEIN BETT GELEGT.... WEITER NICHTS. HI,HI,HI", -- cgit v1.2.3 From 681f331895b18a84f15ce8bb1825d945a3bf0151 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Jun 2008 18:43:20 +0000 Subject: Another fix, now to German texts. svn-id: r32597 --- engines/drascula/staticdata.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 56ff8d08d7..dc289fb4ce 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -4955,20 +4955,21 @@ const char *_textl[][32] = { "ICH WEISS NICHT, WOVON DU REDEST, DU EINTAGSFLIEGE", "DAS INTERESSIERT MICH NICHT", "ANDERE SPIELE, ACH ICH WEISS NICHT, ABER DAS HIER HAT SO EINE NETTE GRAFIK", - "ICH HaeTTE SCHON LUST..", + "", // 20 + "ICH HaeTTE SCHON LUST..", "NEIN, SO HEISSEN DER OPA, DER VATER, DER SOHN UND EIN FREUND.", "NEIN, ABER WENN NICHT, SIEHT ES SO AUS ALS WaeRE DAS SPIEL VON FueNF LEUTEN GEMACHT WORDEN", "DIESE JUNGS SIND VIELVERSPRECHEND !", "DER IST GUT, SUPERKLASSE !", - "NENN MICH KONSTANTIN", // 25 + "NENN MICH KONSTANTIN", "MANN, DAS WAR NICHT ICH, SONDERN MEIN DOUBLE, DER KOYOTE", "WOW, WAS FueR EINE LANGE DANKESLISTE", "ICH HAB SCHON DEN ueBERBLICK VERLOREN", "O.K. DESIDERIO, UND WAS WIRD JETZT AUS DIR WERDEN ?", - "ABER DANN MueSSTEST DU ABNEHMEN", // 30 + "ABER DANN MueSSTEST DU ABNEHMEN", "ICH WERDE NACH TIBET AUSWANDERN UND ueBER DEN SINN DES LEBENS NACHDENKEN", }, { -- cgit v1.2.3 From 3723afc268afc8aedc83f9353eb44be6566050bf Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Jun 2008 18:59:12 +0000 Subject: create_drascula tool, courtsey of md5. Not yet used by the engine. svn-id: r32598 --- tools/create_drascula/Makefile | 4 + tools/create_drascula/create_drascula.cpp | 310 ++ tools/create_drascula/create_drascula.h | 91 + tools/create_drascula/create_drascula.sln | 20 + tools/create_drascula/create_drascula.vcproj | 190 + tools/create_drascula/module.mk | 13 + tools/create_drascula/staticdata.h | 5977 ++++++++++++++++++++++++++ 7 files changed, 6605 insertions(+) create mode 100644 tools/create_drascula/Makefile create mode 100644 tools/create_drascula/create_drascula.cpp create mode 100644 tools/create_drascula/create_drascula.h create mode 100644 tools/create_drascula/create_drascula.sln create mode 100644 tools/create_drascula/create_drascula.vcproj create mode 100644 tools/create_drascula/module.mk create mode 100644 tools/create_drascula/staticdata.h diff --git a/tools/create_drascula/Makefile b/tools/create_drascula/Makefile new file mode 100644 index 0000000000..3052436b55 --- /dev/null +++ b/tools/create_drascula/Makefile @@ -0,0 +1,4 @@ +# $Id$ + +all: + g++ -I../.. create_drascula.cpp -o create_drascula diff --git a/tools/create_drascula/create_drascula.cpp b/tools/create_drascula/create_drascula.cpp new file mode 100644 index 0000000000..c2c5b79132 --- /dev/null +++ b/tools/create_drascula/create_drascula.cpp @@ -0,0 +1,310 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + * This is a utility for storing all the hardcoded data of Drascula in a separate + * data file, used by the game engine + */ + + // HACK to allow building with the SDL backend on MinGW +// see bug #1800764 "TOOLS: MinGW tools building broken" +#ifdef main +#undef main +#endif // main + +#include +#include +#include + +#include "create_drascula.h" +#include "staticdata.h" + +#define DRASCULA_DAT_VER 1 // 1 byte + +typedef unsigned char uint8; +typedef unsigned short uint16; + +static void writeByte(FILE *fp, uint8 b) { + fwrite(&b, 1, 1, fp); +} + +static void writeUint16BE(FILE *fp, uint16 value) { + writeByte(fp, (uint8)(value >> 8)); + writeByte(fp, (uint8)(value & 0xFF)); +} + +int main(int argc, char *argv[]) { + FILE* outFile; + int i, lang; + + outFile = fopen("drascula.dat", "wb"); + + // Write header + fwrite("DRASCULA", 8, 1, outFile); + + writeByte(outFile, DRASCULA_DAT_VER); + + // Write charmap + writeUint16BE(outFile, ARRAYSIZE(charMap)); + for (i = 0; i < ARRAYSIZE(charMap); i++) { + writeUint16BE(outFile, charMap[i].inChar); + writeUint16BE(outFile, charMap[i].mappedChar); + writeUint16BE(outFile, charMap[i].charType); + } + + // Write item locations + writeUint16BE(outFile, ARRAYSIZE(itemLocations)); + for (i = 0; i < ARRAYSIZE(itemLocations); i++) { + writeUint16BE(outFile, itemLocations[i].x); + writeUint16BE(outFile, itemLocations[i].y); + } + + // Write x_pol and y_pol + writeUint16BE(outFile, ARRAYSIZE(x_pol)); + for (i = 0; i < ARRAYSIZE(x_pol); i++) { + writeUint16BE(outFile, x_pol[i]); + writeUint16BE(outFile, y_pol[i]); + } + + // Write verbBarX + writeUint16BE(outFile, ARRAYSIZE(verbBarX)); + for (i = 0; i < ARRAYSIZE(verbBarX); i++) { + writeUint16BE(outFile, verbBarX[i]); + } + + // Write x1d_menu and y1d_menu + writeUint16BE(outFile, ARRAYSIZE(x1d_menu)); + for (i = 0; i < ARRAYSIZE(x1d_menu); i++) { + writeUint16BE(outFile, x1d_menu[i]); + writeUint16BE(outFile, y1d_menu[i]); + } + + // Write frameX + writeUint16BE(outFile, ARRAYSIZE(frameX)); + for (i = 0; i < ARRAYSIZE(frameX); i++) { + writeUint16BE(outFile, frameX[i]); + } + + // Write candleX and candleY + writeUint16BE(outFile, ARRAYSIZE(candleX)); + for (i = 0; i < ARRAYSIZE(candleX); i++) { + writeUint16BE(outFile, candleX[i]); + writeUint16BE(outFile, candleY[i]); + } + + // Write pianistX + writeUint16BE(outFile, ARRAYSIZE(pianistX)); + for (i = 0; i < ARRAYSIZE(pianistX); i++) { + writeUint16BE(outFile, pianistX[i]); + } + + // Write drunkX + writeUint16BE(outFile, ARRAYSIZE(drunkX)); + for (i = 0; i < ARRAYSIZE(drunkX); i++) { + writeUint16BE(outFile, drunkX[i]); + } + + // Write preupdates + writeUint16BE(outFile, ARRAYSIZE(roomPreUpdates)); + + for (i = 0; i < ARRAYSIZE(roomPreUpdates); i++) { + writeUint16BE(outFile, roomPreUpdates[i].roomNum); + writeUint16BE(outFile, roomPreUpdates[i].flag); + writeUint16BE(outFile, roomPreUpdates[i].flagValue); + writeUint16BE(outFile, roomPreUpdates[i].sourceX); + writeUint16BE(outFile, roomPreUpdates[i].sourceY); + writeUint16BE(outFile, roomPreUpdates[i].destX); + writeUint16BE(outFile, roomPreUpdates[i].destY); + writeUint16BE(outFile, roomPreUpdates[i].width); + writeUint16BE(outFile, roomPreUpdates[i].height); + writeUint16BE(outFile, roomPreUpdates[i].type); + } + + // Write updates + writeUint16BE(outFile, ARRAYSIZE(roomUpdates)); + + for (i = 0; i < ARRAYSIZE(roomUpdates); i++) { + writeUint16BE(outFile, roomUpdates[i].roomNum); + writeUint16BE(outFile, roomUpdates[i].flag); + writeUint16BE(outFile, roomUpdates[i].flagValue); + writeUint16BE(outFile, roomUpdates[i].sourceX); + writeUint16BE(outFile, roomUpdates[i].sourceY); + writeUint16BE(outFile, roomUpdates[i].destX); + writeUint16BE(outFile, roomUpdates[i].destY); + writeUint16BE(outFile, roomUpdates[i].width); + writeUint16BE(outFile, roomUpdates[i].height); + writeUint16BE(outFile, roomUpdates[i].type); + } + + // Write room actions + writeUint16BE(outFile, ARRAYSIZE(roomActions)); + + for (i = 0; i < ARRAYSIZE(roomActions); i++) { + writeUint16BE(outFile, roomActions[i].room); + writeUint16BE(outFile, roomActions[i].chapter); + writeUint16BE(outFile, roomActions[i].action); + writeUint16BE(outFile, roomActions[i].objectID); + writeUint16BE(outFile, roomActions[i].speechID); + } + + // langs + writeUint16BE(outFile, NUM_LANGS); + + // Write _text + writeUint16BE(outFile, NUM_TEXT); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXT; i++) { + writeUint16BE(outFile, strlen(_text[lang][i])); + fwrite(_text[lang][i], strlen(_text[lang][i]), 1, outFile); + } + } + + // Write _textd + writeUint16BE(outFile, NUM_TEXTD); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTD; i++) { + writeUint16BE(outFile, strlen(_textd[lang][i])); + fwrite(_textd[lang][i], strlen(_textd[lang][i]), 1, outFile); + } + } + + // Write _textb + writeUint16BE(outFile, NUM_TEXTB); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTB; i++) { + writeUint16BE(outFile, strlen(_textb[lang][i])); + fwrite(_textb[lang][i], strlen(_textb[lang][i]), 1, outFile); + } + } + + // Write _textbj + writeUint16BE(outFile, NUM_TEXTBJ); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTBJ; i++) { + writeUint16BE(outFile, strlen(_textbj[lang][i])); + fwrite(_textbj[lang][i], strlen(_textbj[lang][i]), 1, outFile); + } + } + + // Write _texte + writeUint16BE(outFile, NUM_TEXTE); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTE; i++) { + writeUint16BE(outFile, strlen(_texte[lang][i])); + fwrite(_texte[lang][i], strlen(_texte[lang][i]), 1, outFile); + } + } + + // Write _texti + writeUint16BE(outFile, NUM_TEXTI); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTI; i++) { + writeUint16BE(outFile, strlen(_texti[lang][i])); + fwrite(_texti[lang][i], strlen(_texti[lang][i]), 1, outFile); + } + } + + // Write _textl + writeUint16BE(outFile, NUM_TEXTL); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTL; i++) { + writeUint16BE(outFile, strlen(_textl[lang][i])); + fwrite(_textl[lang][i], strlen(_textl[lang][i]), 1, outFile); + } + } + + // Write _textp + writeUint16BE(outFile, NUM_TEXTP); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTP; i++) { + writeUint16BE(outFile, strlen(_textp[lang][i])); + fwrite(_textp[lang][i], strlen(_textp[lang][i]), 1, outFile); + } + } + + // Write _textt + writeUint16BE(outFile, NUM_TEXTT); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTT; i++) { + writeUint16BE(outFile, strlen(_textt[lang][i])); + fwrite(_textt[lang][i], strlen(_textt[lang][i]), 1, outFile); + } + } + + // Write _textvb + writeUint16BE(outFile, NUM_TEXTVB); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTVB; i++) { + writeUint16BE(outFile, strlen(_textvb[lang][i])); + fwrite(_textvb[lang][i], strlen(_textvb[lang][i]), 1, outFile); + } + } + + // Write _textsys + writeUint16BE(outFile, NUM_TEXTSYS); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTSYS; i++) { + writeUint16BE(outFile, strlen(_textsys[lang][i])); + fwrite(_textsys[lang][i], strlen(_textsys[lang][i]), 1, outFile); + } + } + + // Write _texthis + writeUint16BE(outFile, NUM_TEXTHIS); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTHIS; i++) { + writeUint16BE(outFile, strlen(_texthis[lang][i])); + fwrite(_texthis[lang][i], strlen(_texthis[lang][i]), 1, outFile); + } + } + + // Write _textverbs + writeUint16BE(outFile, NUM_TEXTVERBS); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTVERBS; i++) { + writeUint16BE(outFile, strlen(_textverbs[lang][i])); + fwrite(_textverbs[lang][i], strlen(_textverbs[lang][i]), 1, outFile); + } + } + + // Write _textmisc + writeUint16BE(outFile, NUM_TEXTMISC); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTMISC; i++) { + writeUint16BE(outFile, strlen(_textmisc[lang][i])); + fwrite(_textmisc[lang][i], strlen(_textmisc[lang][i]), 1, outFile); + } + } + + // Write _textd1 + writeUint16BE(outFile, NUM_TEXTD1); + for (lang = 0; lang < NUM_LANGS; lang++) { + for (i = 0; i < NUM_TEXTD1; i++) { + writeUint16BE(outFile, strlen(_textd1[lang][i])); + fwrite(_textd1[lang][i], strlen(_textd1[lang][i]), 1, outFile); + } + } + + fclose(outFile); + + return 0; +} diff --git a/tools/create_drascula/create_drascula.h b/tools/create_drascula/create_drascula.h new file mode 100644 index 0000000000..3ccda05a2c --- /dev/null +++ b/tools/create_drascula/create_drascula.h @@ -0,0 +1,91 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef CREATE_DRASCULA_H +#define CREATE_DRASCULA_H + +#define ARRAYSIZE(x) ((int)(sizeof(x) / sizeof(x[0]))) + +#define NUM_LANGS 5 +#define NUM_TEXT 501 +#define NUM_TEXTD 84 +#define NUM_TEXTB 15 +#define NUM_TEXTBJ 29 +#define NUM_TEXTE 24 +#define NUM_TEXTI 33 +#define NUM_TEXTL 32 +#define NUM_TEXTP 20 +#define NUM_TEXTT 25 +#define NUM_TEXTVB 63 +#define NUM_TEXTSYS 4 +#define NUM_TEXTHIS 5 +#define NUM_TEXTVERBS 6 +#define NUM_TEXTMISC 3 +#define NUM_TEXTD1 11 + +enum Verbs { + kVerbDefault = -1, + kVerbLook = 1, + kVerbPick = 2, + kVerbOpen = 3, + kVerbClose = 4, + kVerbTalk = 5, + kVerbMove = 6 +}; + +struct RoomTalkAction { + int room; + int chapter; + int action; + int objectID; + int speechID; +}; + +struct ItemLocation { + int x; + int y; +}; + +struct CharInfo { + int inChar; + int mappedChar; + int charType; // 0 - letters, 1 - signs, 2 - accented +}; + +struct RoomUpdate { + int roomNum; + int flag; + int flagValue; + int sourceX; + int sourceY; + int destX; + int destY; + int width; + int height; + int type; // 0 - background, 1 - rect +}; + + +#endif /* CREATE_DRASCULA_H */ diff --git a/tools/create_drascula/create_drascula.sln b/tools/create_drascula/create_drascula.sln new file mode 100644 index 0000000000..4a39bdbe42 --- /dev/null +++ b/tools/create_drascula/create_drascula.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "create_drascula", "create_drascula.vcproj", "{5F280130-349D-11DD-AE16-0800200C9A66}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5F280130-349D-11DD-AE16-0800200C9A66}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F280130-349D-11DD-AE16-0800200C9A66}.Debug|Win32.Build.0 = Debug|Win32 + {5F280130-349D-11DD-AE16-0800200C9A66}.Release|Win32.ActiveCfg = Release|Win32 + {5F280130-349D-11DD-AE16-0800200C9A66}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tools/create_drascula/create_drascula.vcproj b/tools/create_drascula/create_drascula.vcproj new file mode 100644 index 0000000000..2532f8fd66 --- /dev/null +++ b/tools/create_drascula/create_drascula.vcproj @@ -0,0 +1,190 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/create_drascula/module.mk b/tools/create_drascula/module.mk new file mode 100644 index 0000000000..3d64871960 --- /dev/null +++ b/tools/create_drascula/module.mk @@ -0,0 +1,13 @@ +# $URL$ +# $Id$ + +MODULE := tools/create_drascula + +MODULE_OBJS := \ + create_drascula.o + +# Set the name of the executable +TOOL_EXECUTABLE := create_drascula + +# Include common rules +include $(srcdir)/rules.mk diff --git a/tools/create_drascula/staticdata.h b/tools/create_drascula/staticdata.h new file mode 100644 index 0000000000..2544b8c7e4 --- /dev/null +++ b/tools/create_drascula/staticdata.h @@ -0,0 +1,5977 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#ifndef STATICDATA_H +#define STATICDATA_H + +const CharInfo charMap[] = { + // Letters + // --------------------------------------- + { 'A', 6, 0 }, { 'B', 15, 0 }, + { 'C', 24, 0 }, { 'D', 33, 0 }, + { 'E', 42, 0 }, { 'F', 51, 0 }, + { 'G', 60, 0 }, { 'H', 69, 0 }, + { 'I', 78, 0 }, { 'J', 87, 0 }, + { 'K', 96, 0 }, { 'L', 105, 0 }, + { 'M', 114, 0 }, { 'N', 123, 0 }, + { '\244', 132, 0 }, { '\245', 132, 0 }, // special Spanish char + { 'O', 141, 0 }, { 'P', 150, 0 }, + { 'Q', 159, 0 }, { 'R', 168, 0 }, + { 'S', 177, 0 }, { 'T', 186, 0 }, + { 'U', 195, 0 }, { 'V', 204, 0 }, + { 'W', 213, 0 }, { 'X', 222, 0 }, + { 'Y', 231, 0 }, { 'Z', 240, 0 }, + // --------------------------------------- + { 0xa7, 250, 0 }, { ' ', 250, 0 }, + // Signs + // --------------------------------------- + { '.', 6, 1 }, { ',', 15, 1 }, + { '-', 24, 1 }, { '?', 33, 1 }, + { '\250', 42, 1 }, { '"', 51, 1 }, + { '!', 60, 1 }, { '\255', 69, 1 }, + { ';', 78, 1 }, { '>', 87, 1 }, + { '<', 96, 1 }, { '$', 105, 1 }, + { '%', 114, 1 }, { ':', 123, 1 }, + { '&', 132, 1 }, { '/', 141, 1 }, + { '(', 150, 1 }, { ')', 159, 1 }, + { '*', 168, 1 }, { '+', 177, 1 }, + { '1', 186, 1 }, { '2', 195, 1 }, + { '3', 204, 1 }, { '4', 213, 1 }, + { '5', 222, 1 }, { '6', 231, 1 }, + { '7', 240, 1 }, { '8', 249, 1 }, + { '9', 258, 1 }, { '0', 267, 1 }, + // Accented + // --------------------------------------- + { '\240', 6, 2 }, { '\202', 15, 2 }, // A, B + { '\241', 24, 2 }, { '\242', 33, 2 }, // C, D + { '\243', 42, 2 }, { '\205', 51, 2 }, // E, F + { '\212', 60, 2 }, { '\215', 69, 2 }, // G, H + { '\225', 78, 2 }, { '\227', 87, 2 }, // I, J + { '\203', 96, 2 }, { '\210', 105, 2 }, // K, L + { '\214', 114, 2 }, { '\223', 123, 2 }, // M, N + { '\226', 132, 2 }, { '\'', 141, 2 }, // special Spanish char, O + { '\200', 150, 2 }, { '\207', 150, 2 }, // P, P + { '\265', 6, 2 }, { '\220', 15, 2 }, // A, B + { '\326', 24, 2 }, { '\340', 33, 2 }, // C, D + { '\351', 42, 2 }, { '\267', 51, 2 }, // E, F + { '\324', 60, 2 }, { '\336', 69, 2 }, // G, H + { '\343', 78, 2 }, { '\353', 87, 2 }, // I, J + { '\266', 96, 2 }, { '\322', 105, 2 }, // K, L + { '\327', 114, 2 }, { '\342', 123, 2 }, // M, N + { '\352', 132, 2 } // special Spanish char +}; + +const ItemLocation itemLocations[] = { + { 0, 0 }, // empty + { 5, 10 }, { 50, 10 }, { 95, 10 }, // 1-3 + { 140, 10 }, { 185, 10 }, { 230, 10 }, // 4-6 + { 275, 10 }, { 5, 40 }, { 50, 40 }, // 7-9 + { 95, 40 }, { 140, 40 }, { 185, 40 }, // 10-12 + { 230, 40 }, { 275, 40 }, { 5, 70 }, // 13-15 + { 50, 70 }, { 95, 70 }, { 140, 70 }, // 16-18 + { 185, 70 }, { 230, 70 }, { 275, 70 }, // 19-21 + { 5, 100 }, { 50, 100 }, { 95, 100 }, // 22-24 + { 140, 100 }, { 185, 100 }, { 230, 100 }, // 25-27 + { 275, 100 }, { 5, 130 }, { 50, 130 }, // 28-30 + { 95, 130 }, { 140, 130 }, { 185, 130 }, // 31-33 + { 230, 130 }, { 275, 130 }, { 5, 160 }, // 34-36 + { 50, 160 }, { 95, 160 }, { 140, 160 }, // 37-39 + { 185, 160 }, { 230, 160 }, { 275, 160 }, // 40-42 + { 275, 160 } // 43 +}; + +const int x_pol[44] = {0, 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, + 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, + 247, 83, 165, 1, 206, 42, 124, 83, 1, 247, + 83, 165, 1, 206, 42, 124, 83, 1, 247, 42, + 1, 165, 206}; +const int y_pol[44] = {0, 1, 1, 1, 1, 1, 1, 1, 27, 27, 1, + 27, 27, 27, 27, 27, 27, 27, 1, 1, 27, + 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, + 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, + 27, 1, 1}; +const int verbBarX[] = {6, 51, 96, 141, 186, 232, 276, 321}; +const int x1d_menu[] = {280, 40, 80, 120, 160, 200, 240, 0, 40, 80, 120, + 160, 200, 240, 0, 40, 80, 120, 160, 200, 240, 0, + 40, 80, 120, 160, 200, 240, 0}; +const int y1d_menu[] = {0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25, + 50, 50, 50, 50, 50, 50, 50, 75, 75, 75, 75, 75, 75, 75, 100}; +int frameX[20] = {43, 87, 130, 173, 216, 259}; +int candleX[] = {14, 19, 24}; +int candleY[] = {158, 172, 186}; +int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31}; +int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1}; + +const RoomUpdate roomPreUpdates[] = { + // room flag val x1 y1 x2 y2 width height type + { 3, 3, 1, 258, 110, 85, 44, 23, 53, 0 }, + //------------------------------------------------------------------------------- + { 5, 8, 0, 256, 152, 208, 67, 27, 40, 0 }, + //------------------------------------------------------------------------------- + { 6, 0, 0, 3, 103, 185, 69, 23, 76, 0 }, + { 6, 1, 0, 97, 117, 34, 148, 36, 31, 0 }, + { 6, 2, 0, 28, 100, 219, 72, 64, 97, 0 }, + //------------------------------------------------------------------------------- + { 7, 35, 0, 1, 72, 158, 162, 19, 12, 0 }, + //------------------------------------------------------------------------------- + { 12, 16, 0, 1, 131, 106, 117, 55, 68, 0 }, + //------------------------------------------------------------------------------- + { 17, 15, 1, 1, 135, 108, 65, 44, 63, 0 }, + //------------------------------------------------------------------------------- + { 21, 0, 1, 2, 171, 84, 126, 17, 26, 0 }, + { 21, 10, 1, 20, 163, 257, 149, 14, 34, 0 }, + //------------------------------------------------------------------------------- + { 22, 24, 1, 2, 187, 107, 106, 62, 12, 0 }, + { 22, 27, 0, 32, 181, 203, 88, 13, 5, 0 }, + { 22, 26, 0, 2, 133, 137, 83, 29, 53, 0 }, + { 22, 26, 1, 65, 174, 109, 145, 55, 25, 0 }, + //------------------------------------------------------------------------------- + { 24, 1, 1, 1, 163, 225, 124, 12, 36, 0 }, + { 24, 2, 1, 14, 153, 30, 107, 23, 46, 0 }, + //------------------------------------------------------------------------------- + { 26, 2, 1, 1, 130, 87, 44, 50, 69, 0 }, + { 26, 12, 1, 52, 177, 272, 103, 27, 22, 0 }, + { 26, 18, 0, 80, 133, 199, 95, 50, 66, 0 }, + //------------------------------------------------------------------------------- + { 27, 5, 1, 1, 175, 59, 109, 17, 24, 1 }, + { 27, 6, 1, 19, 177, 161, 103, 18, 22, 1 }, + //------------------------------------------------------------------------------- + { 29, 4, 1, 12, 113, 247, 49, 41, 84, 0 }, + //------------------------------------------------------------------------------- + { 30, 4, 1, 1, 148, 148, 66, 35, 51, 0 }, + { 30, 16, 1, 37, 173, 109, 84, 20, 26, 0 }, + //------------------------------------------------------------------------------- + { 31, 13, 1, 1, 163, 116, 41, 61, 36, 0 }, + { 31, 5, 1, 1, 78, 245, 63, 30, 84, 0 }, + //------------------------------------------------------------------------------- + { 34, 7, 1, 99, 127, 73, 41, 79, 72, 0 }, + { 34, 8, 1, 36, 129, 153, 41, 62, 65, 0 }, + //------------------------------------------------------------------------------- + { 35, 14, 1, 1, 86, 246, 65, 68, 87, 0 }, + { 35, 17, 1, 70, 150, 118, 52, 40, 23, 0 }, + //------------------------------------------------------------------------------- + { 49, 6, 0, 2, 136, 176, 81, 49, 62, 0 }, + //------------------------------------------------------------------------------- + { 53, 1, 0, 2, 113, 205, 50, 38, 86, 1 }, + { 53, 2, 0, 41, 159, 27, 117, 25, 40, 0 }, + { 53, 9, 1, 67, 184, 56, 93, 32, 15, 0 }, + //------------------------------------------------------------------------------- + { 54, 5, 1, 168, 156, 187, 111, 7, 11, 0 }, + { 54, 12, 1, 16, 156, 190, 64, 18, 24, 0 }, + //------------------------------------------------------------------------------- + { 56, 10, 0, 2, 126, 42, 67, 57, 67, 0 }, + { 56, 11, 1, 60, 160, 128, 97, 103, 38, 0 }, + //------------------------------------------------------------------------------- + { 58, 0, 0, 1, 156, 143, 120, 120, 43, 0 }, + { 58, 1, 2, 252, 171, 173, 116, 25, 28, 1 }, + //------------------------------------------------------------------------------- + { 59, 4, 0, 1, 146, 65, 106, 83, 40, 1 } +}; + +const RoomUpdate roomUpdates[] = { + // room flag val x1 y1 x2 y2 width height type + { 5, -1, -1, 114, 130, 211, 87, 109, 69, 1 }, + { 15, -1, -1, 1, 154, 83, 122, 131, 44, 1 }, + { 17, -1, -1, 48, 135, 78, 139, 80, 30, 1 }, + { 18, 24, 1, 177, 1, 69, 29, 142, 130, 1 }, + { 18, -1, -1, 105, 132, 109, 108, 196, 65, 1 }, + { 20, -1, -1, 1, 137, 106, 121, 213, 61, 1 }, + { 27, -1, -1, 38, 177, 103, 171, 21, 22, 1 }, + { 27, -1, -1, 60, 162, 228, 156, 18, 37, 1 }, + { 29, -1, -1, 1, 180, 150, 126, 10, 17, 1 }, + { 31, -1, -1, 63, 190, 223, 157, 17, 9, 1 }, + { 34, -1, -1, 5, 171, 234, 126, 29, 23, 1 }, + { 35, -1, -1, 1, 174, 54, 152, 195, 25, 1 }, + { 50, -1, -1, 4, 153, 118, 95, 67, 44, 1 }, + { 57, -1, -1, 7, 113, 166, 61, 62, 82, 1 }, + { 61, -1, -1, 1, 154, 83, 122, 131, 44, 1 }, + { 63, -1, -1, 1, 154, 83, 122, 131, 44, 1 }, +}; + +// Note: default action needs to be LAST for each group +// of actions with the same number +RoomTalkAction roomActions[] = { + //room num action object speech + { 0, 1, kVerbLook, -1, 54 }, + { 0, 1, kVerbMove, -1, 19 }, + { 0, 1, kVerbPick, -1, 11 }, + { 0, 1, kVerbOpen, -1, 9 }, + { 0, 1, kVerbClose, -1, 9 }, + { 0, 1, kVerbTalk, -1, 16 }, + { 0, 1, kVerbDefault, -1, 11 }, + // ---------------------------------- + { 0, 2, kVerbMove, -1, 19 }, + { 0, 2, kVerbOpen, -1, 9 }, + { 0, 2, kVerbClose, -1, 9 }, + { 0, 2, kVerbTalk, -1, 16 }, + // ---------------------------------- + { 0, 3, kVerbLook, -1, 316 }, + { 0, 3, kVerbMove, -1, 317 }, + { 0, 3, kVerbPick, -1, 318 }, + { 0, 3, kVerbOpen, -1, 319 }, + { 0, 3, kVerbClose, -1, 319 }, + { 0, 3, kVerbTalk, -1, 320 }, + { 0, 3, kVerbDefault, -1, 318 }, + // ---------------------------------- + { 0, 4, kVerbMove, -1, 19 }, + { 0, 4, kVerbOpen, -1, 9 }, + { 0, 4, kVerbClose, -1, 9 }, + { 0, 4, kVerbTalk, -1, 16 }, + // ---------------------------------- + { 0, 5, kVerbOpen, -1, 9 }, + { 0, 5, kVerbClose, -1, 9 }, + { 0, 5, kVerbTalk, -1, 16 }, + // ---------------------------------- + { 0, 6, kVerbMove, -1, 19 }, + { 0, 6, kVerbOpen, -1, 9 }, + { 0, 6, kVerbClose, -1, 9 }, + { 0, 6, kVerbTalk, -1, 16 }, + // ================================== + { 1, -1, kVerbPick, 118, 5 }, + { 1, -1, kVerbOpen, 118, 3 }, + { 1, -1, kVerbClose, 118, 4 }, + { 1, -1, kVerbTalk, 118, 6 }, + // ---------------------------------- + { 1, -1, kVerbLook, 119, 8 }, + { 1, -1, kVerbMove, 119, 13 }, + { 1, -1, kVerbClose, 119, 10 }, + { 1, -1, kVerbTalk, 119, 12 }, + // ---------------------------------- + { 1, -1, kVerbMove, 120, 13 }, + { 1, -1, kVerbOpen, 120, 18 }, + { 1, -1, kVerbTalk, 120, 15 }, + // ================================== + { 3, -1, kVerbLook, 129, 21 }, + { 3, -1, kVerbPick, 129, 5 }, + { 3, -1, kVerbMove, 129, 24 }, + { 3, -1, kVerbOpen, 129, 22 }, + { 3, -1, kVerbClose, 129, 10 }, + // ---------------------------------- + { 3, -1, kVerbLook, 131, 27 }, + { 3, -1, kVerbPick, 131, 5 }, + { 3, -1, kVerbMove, 131, 24 }, + { 3, -1, kVerbOpen, 131, 22 }, + { 3, -1, kVerbClose, 131, 10 }, + { 3, -1, kVerbTalk, 131, 23 }, + // ---------------------------------- + { 3, -1, kVerbLook, 132, 28 }, + { 3, -1, kVerbPick, 132, 5 }, + { 3, -1, kVerbMove, 132, 24 }, + { 3, -1, kVerbOpen, 132, 22 }, + { 3, -1, kVerbClose, 132, 10 }, + { 3, -1, kVerbTalk, 132, 23 }, + // ---------------------------------- + { 3, -1, kVerbLook, 133, 321 }, + { 3, -1, kVerbPick, 133, 31 }, + { 3, -1, kVerbMove, 133, 34 }, + { 3, -1, kVerbOpen, 133, 30 }, + { 3, -1, kVerbClose, 133, 10 }, + // ---------------------------------- + { 3, -1, kVerbLook, 166, 55 }, + { 3, -1, kVerbPick, 166, 7 }, + // ---------------------------------- + { 3, -1, kVerbLook, 211, 184 }, + // ================================== + { 4, -1, kVerbLook, 189, 182 }, + // ---------------------------------- + { 4, -1, kVerbLook, 207, 175 }, + { 4, -1, kVerbTalk, 207, 176 }, + // ---------------------------------- + { 4, -1, kVerbLook, 208, 177 }, + // ---------------------------------- + { 4, -1, kVerbLook, 209, 179 }, + // ---------------------------------- + { 4, -1, kVerbLook, 210, 180 }, + { 4, -1, kVerbOpen, 210, 181 }, + // ================================== + { 5, -1, kVerbMove, 136, 13 }, + { 5, -1, kVerbOpen, 136, 18 }, + { 5, -1, kVerbTalk, 136, 15 }, + // ---------------------------------- + { 5, -1, kVerbLook, 212, 187 }, + { 5, -1, kVerbTalk, 212, 188 }, + // ---------------------------------- + { 5, -1, kVerbLook, 213, 189 }, + { 5, -1, kVerbOpen, 213, 190 }, + // ================================== + { 6, -1, kVerbPick, 144, 43 }, + // ---------------------------------- + { 6, -1, kVerbLook, 138, 35 }, + { 6, -1, kVerbTalk, 138, 6 }, + // ---------------------------------- + { 6, -1, kVerbLook, 143, 37 }, + { 6, -1, kVerbPick, 143, 7 }, + { 6, -1, kVerbMove, 143, 7 }, + { 6, -1, kVerbTalk, 143, 38 }, + // ---------------------------------- + { 6, -1, kVerbLook, 139, 36 }, + // ---------------------------------- + { 6, -1, kVerbLook, 140, 147 }, + // ================================== + { 7, -1, kVerbLook, 164, 35 }, + // ---------------------------------- + { 7, -1, kVerbLook, 169, 44 }, + // ================================== + { 9, -1, kVerbLook, 150, 35 }, + { 9, -1, kVerbTalk, 150, 6 }, + // ---------------------------------- + { 9, -1, kVerbLook, 51, 60 }, + // ================================== + { 12, -1, kVerbLook, 154, 329 }, + { 12, -1, kVerbTalk, 154, 330 }, + // ---------------------------------- + { 12, -1, kVerbMove, 155, 48 }, + { 12, -1, kVerbTalk, 155, 331 }, + // ---------------------------------- + { 12, -1, kVerbLook, 156, 35 }, + { 12, -1, kVerbMove, 156, 48 }, + { 12, -1, kVerbTalk, 156, 50 }, + // ================================== + { 14, -1, kVerbLook, 200, 165 }, + // ---------------------------------- + { 14, -1, kVerbLook, 201, 166 }, + // ---------------------------------- + { 14, -1, kVerbLook, 202, 167 }, + // ---------------------------------- + { 14, -1, kVerbLook, 203, 168 }, + { 14, -1, kVerbPick, 203, 170 }, + { 14, -1, kVerbMove, 203, 170 }, + { 14, -1, kVerbTalk, 203, 169 }, + // ---------------------------------- + { 14, -1, kVerbLook, 204, 171 }, + // ================================== + { 15, -1, kVerbTalk, 188, 333 }, + { 15, -1, kVerbLook, 188, 334 }, + // ---------------------------------- + { 15, -1, kVerbLook, 205, 172 }, + // ---------------------------------- + { 15, -1, kVerbLook, 206, 173 }, + { 15, -1, kVerbMove, 206, 174 }, + { 15, -1, kVerbOpen, 206, 174 }, + // ================================== + { 16, -1, kVerbTalk, 163, 6 }, + // ---------------------------------- + { 16, -1, kVerbLook, 183, 340 }, + // ---------------------------------- + { 16, -1, kVerbLook, 185, 37 }, + { 16, -1, kVerbPick, 185, 7 }, + { 16, -1, kVerbMove, 185, 7 }, + { 16, -1, kVerbTalk, 185, 38 }, + // ---------------------------------- + { 16, -1, kVerbTalk, 187, 345 }, + // ================================== + { 18, -1, kVerbLook, 181, 348 }, + // ---------------------------------- + { 18, -1, kVerbLook, 182, 154 }, + // ================================== + { 19, -1, kVerbLook, 214, 191 }, + // ================================== + { 22, -1, kVerbPick, 140, 7 }, + // ---------------------------------- + { 22, -1, kVerbLook, 52, 497 }, + { 22, -1, kVerbTalk, 52, 498 }, + // ================================== + { 24, -1, kVerbLook, 151, 461 }, + // ================================== + { 26, -1, kVerbOpen, 167, 467 }, + // ---------------------------------- + { 26, -1, kVerbLook, 164, 470 }, + { 26, -1, kVerbOpen, 164, 471 }, + // ---------------------------------- + { 26, -1, kVerbLook, 163, 472 }, + { 26, -1, kVerbPick, 163, 473 }, + // ---------------------------------- + { 26, -1, kVerbLook, 165, 474 }, + // ---------------------------------- + { 26, -1, kVerbLook, 168, 476 }, + { 26, -1, kVerbPick, 168, 477 }, + // ================================== + { 27, -1, kVerbLook, 175, 429 }, + // ================================== + { 29, -1, kVerbLook, 152, 463 }, + { 29, -1, kVerbOpen, 152, 464 }, + // ---------------------------------- + { 29, -1, kVerbLook, 153, 465 }, + // ---------------------------------- + { 29, -1, kVerbPick, 154, 466 }, + // ---------------------------------- + { 29, -1, kVerbOpen, 156, 467 }, + // ================================== + { 30, -1, kVerbOpen, 157, 468 }, + // ---------------------------------- + { 30, -1, kVerbLook, 158, 469 }, + // ================================== + { 31, -1, kVerbLook, 161, 470 }, + { 31, -1, kVerbOpen, 161, 471 }, + // ================================== + { 34, -1, kVerbLook, 146, 458 }, + { 34, -1, kVerbPick, 146, 459 }, + // ================================== + { 44, -1, kVerbLook, 172, 428 }, + // ================================== + { 49, -1, kVerbLook, 51, 132 }, + // ---------------------------------- + { 49, -1, kVerbLook, 200, 133 }, + { 49, -1, kVerbTalk, 200, 134 }, + // ---------------------------------- + { 49, -1, kVerbLook, 201, 135 }, + // ---------------------------------- + { 49, -1, kVerbLook, 203, 137 }, + // ================================== + { 53, -1, kVerbLook, 121, 128 }, + // ---------------------------------- + { 53, -1, kVerbLook, 209, 129 }, + // ---------------------------------- + { 53, -1, kVerbLook, 52, 447 }, + { 53, -1, kVerbTalk, 52, 131 }, + // ================================== + { 54, -1, kVerbLook, 53, 127 }, + // ---------------------------------- + { 54, -1, kVerbOpen, 119, 125 }, + { 54, -1, kVerbLook, 119, 126 }, + // ================================== + { 55, -1, kVerbLook, 122, 138 }, + // ---------------------------------- + { 55, -1, kVerbLook, 204, 139 }, + // ---------------------------------- + { 55, -1, kVerbLook, 205, 140 }, + // ================================== + { 56, -1, kVerbLook, 124, 450 }, + // ---------------------------------- + { 56, -1, kVerbOpen, 207, 141 }, + // ---------------------------------- + { 56, -1, kVerbLook, 208, 142 }, + // ================================== + { 58, -1, kVerbLook, 104, 454 }, + // ================================== + { 60, -1, kVerbLook, 112, 440 }, + // ---------------------------------- + { 60, -1, kVerbTalk, 115, 455 }, + // ---------------------------------- + { 60, -1, kVerbTalk, 56, 455 }, + // ---------------------------------- + { 60, -1, kVerbLook, 114, 167 }, + // ---------------------------------- + { 60, -1, kVerbLook, 113, 168 }, + { 60, -1, kVerbPick, 113, 170 }, + { 60, -1, kVerbMove, 113, 170 }, + { 60, -1, kVerbTalk, 113, 169 }, + // ================================== + { 61, -1, kVerbLook, 116, 172 }, + // ---------------------------------- + { 61, -1, kVerbLook, 117, 173 }, + // ---------------------------------- + { 61, -1, kVerbMove, 117, 174 }, + { 61, -1, kVerbOpen, 117, 174 }, + { 62, -1, kVerbLook, 100, 168 }, + { 62, -1, kVerbTalk, 100, 169 }, + { 62, -1, kVerbPick, 100, 170 }, + // ---------------------------------- + { 62, -1, kVerbLook, 101, 171 }, + // ---------------------------------- + { 62, -1, kVerbLook, 102, 167 }, + // ---------------------------------- + { 62, -1, kVerbLook, 103, 166 }, + // ================================== + { 63, -1, kVerbLook, 110, 172 }, + // ---------------------------------- + { 63, -1, kVerbLook, 109, 173 }, + { 63, -1, kVerbMove, 109, 174 }, + // ---------------------------------- + { 63, -1, kVerbLook, 108, 334 }, + { 63, -1, kVerbTalk, 108, 333 }, + // ================================== + { 102, -1, kVerbLook, 100, 452 }, + { 102, -1, kVerbLook, 101, 123 }, + { 102, -1, kVerbPick, -1, 453 }, + { 102, -1, kVerbOpen, -1, 453 }, + // ================================== + // Pseudoroom. checkAction() menuScreen == 1 + { 200, 1, kVerbLook, 28, 328 }, + // ---------------------------------- + { 200, 2, kVerbLook, 28, 328 }, + { 200, 2, kVerbLook, 7, 143 }, + { 200, 2, kVerbLook, 8, 145 }, + { 200, 2, kVerbLook, 9, 147 }, + { 200, 2, kVerbLook, 10, 151 }, + { 200, 2, kVerbLook, 11, 152 }, + { 200, 2, kVerbLook, 12, 154 }, + { 200, 2, kVerbLook, 13, 155 }, + { 200, 2, kVerbLook, 14, 157 }, + { 200, 2, kVerbLook, 15, 58 }, + { 200, 2, kVerbLook, 16, 158 }, + { 200, 2, kVerbLook, 17, 159 }, + { 200, 2, kVerbLook, 18, 160 }, + { 200, 2, kVerbLook, 19, 161 }, + { 200, 2, kVerbLook, 23, 152 }, + { 200, 2, kVerbTalk, 7, 144 }, + { 200, 2, kVerbTalk, 8, 146 }, + { 200, 2, kVerbTalk, 9, 148 }, + { 200, 2, kVerbTalk, 11, 153 }, + // ---------------------------------- + { 200, 3, kVerbLook, 22, 307 }, + { 200, 3, kVerbLook, 28, 328 }, + { 200, 3, kVerbLook, 7, 143 }, + { 200, 3, kVerbLook, 8, 145 }, + { 200, 3, kVerbLook, 9, 147 }, + { 200, 3, kVerbLook, 10, 151 }, + { 200, 3, kVerbLook, 11, 152 }, + { 200, 3, kVerbLook, 12, 154 }, + { 200, 3, kVerbLook, 13, 155 }, + { 200, 3, kVerbLook, 14, 157 }, + { 200, 3, kVerbLook, 15, 58 }, + { 200, 3, kVerbLook, 16, 158 }, + { 200, 3, kVerbLook, 17, 159 }, + { 200, 3, kVerbLook, 18, 160 }, + { 200, 3, kVerbLook, 19, 161 }, + { 200, 3, kVerbLook, 20, 162 }, + { 200, 3, kVerbLook, 23, 152 }, + { 200, 3, kVerbTalk, 7, 144 }, + { 200, 3, kVerbTalk, 8, 146 }, + { 200, 3, kVerbTalk, 9, 148 }, + { 200, 3, kVerbTalk, 11, 153 }, + // ---------------------------------- + { 200, 4, kVerbLook, 7, 478 }, + { 200, 4, kVerbLook, 8, 480 }, + { 200, 4, kVerbLook, 10, 485 }, + { 200, 4, kVerbLook, 11, 488 }, + { 200, 4, kVerbLook, 12, 486 }, + { 200, 4, kVerbLook, 13, 490 }, + { 200, 4, kVerbLook, 14, 122 }, + { 200, 4, kVerbLook, 15, 117 }, + { 200, 4, kVerbLook, 16, 491 }, + { 200, 4, kVerbLook, 17, 478 }, + { 200, 4, kVerbLook, 18, 493 }, + { 200, 4, kVerbLook, 20, 162 }, + { 200, 4, kVerbLook, 21, 496 }, + { 200, 4, kVerbLook, 22, 161 }, + { 200, 4, kVerbLook, 28, 328 }, + { 200, 4, kVerbTalk, 15, 118 }, + { 200, 4, kVerbOpen, 15, 119 }, + { 200, 4, 14, 19, 484 }, + { 200, 4, 19, 14, 484 }, + // ---------------------------------- + { 200, 5, kVerbLook, 7, 478 }, + { 200, 5, kVerbLook, 8, 120 }, + { 200, 5, kVerbLook, 11, 488 }, + { 200, 5, kVerbLook, 13, 490 }, + { 200, 5, kVerbLook, 14, 121 }, + { 200, 5, kVerbLook, 15, 117 }, + { 200, 5, kVerbLook, 17, 478 }, + { 200, 5, kVerbLook, 20, 162 }, + { 200, 5, kVerbLook, 28, 328 }, + { 200, 5, kVerbTalk, 15, 118 }, + { 200, 5, kVerbOpen, 15, 119 }, + // ---------------------------------- + { 200, 6, kVerbLook, 20, 123 }, + { 200, 6, kVerbLook, 21, 441 }, + { 200, 6, kVerbLook, 28, 328 }, + // ================================== + // Pseudoroom. checkAction() menuScreen != 1 + { 201, 1, kVerbLook, 50, 308 }, + { 201, 1, kVerbOpen, 50, 310 }, + { 201, 1, kVerbClose, 50, 311 }, + { 201, 1, kVerbMove, 50, 312 }, + { 201, 1, kVerbPick, 50, 313 }, + { 201, 1, kVerbTalk, 50, 314 }, + // ---------------------------------- + { 201, 2, kVerbLook, 50, 308 }, + { 201, 2, kVerbOpen, 50, 310 }, + { 201, 2, kVerbClose, 50, 311 }, + { 201, 2, kVerbMove, 50, 312 }, + { 201, 2, kVerbPick, 50, 313 }, + { 201, 2, kVerbTalk, 50, 314 }, + { 201, 2, 13, 50, 156 }, + { 201, 2, 20, 50, 163 }, + // ---------------------------------- + { 201, 3, kVerbLook, 50, 309 }, + { 201, 3, kVerbOpen, 50, 310 }, + { 201, 3, kVerbClose, 50, 311 }, + { 201, 3, kVerbMove, 50, 312 }, + { 201, 3, kVerbPick, 50, 313 }, + { 201, 3, kVerbTalk, 50, 314 }, + // ---------------------------------- + { 201, 4, kVerbLook, 50, 309 }, + { 201, 4, kVerbOpen, 50, 310 }, + { 201, 4, kVerbClose, 50, 311 }, + { 201, 4, kVerbMove, 50, 312 }, + { 201, 4, kVerbPick, 50, 313 }, + { 201, 4, kVerbTalk, 50, 314 }, + { 201, 4, 9, 50, 484 }, + { 201, 4, 20, 50, 487 }, + // ---------------------------------- + { 201, 5, kVerbLook, 50, 309 }, // Originally these are with + { 201, 5, kVerbOpen, 50, 310 }, // completely wrong voices + { 201, 5, kVerbClose, 50, 311 }, + { 201, 5, kVerbMove, 50, 312 }, + { 201, 5, kVerbPick, 50, 313 }, + { 201, 5, kVerbTalk, 50, 314 }, + { 201, 5, 20, 50, 487 }, + // ---------------------------------- + { 201, 6, kVerbOpen, 50, 310 }, + { 201, 6, kVerbClose, 50, 311 }, + { 201, 6, kVerbMove, 50, 312 }, + { 201, 6, kVerbPick, 50, 313 }, + { 201, 6, kVerbTalk, 50, 314 }, + +}; + +const char *_text[NUM_LANGS][NUM_TEXT] = { +{ + // 0 + "", + "THAT'S THE SECOND BIGGEST DOOR I'VE SEEN IN MY LIFE", + "NOT REALLY", + "THE CHURCH IS ALL BOARDED UP, IT MUST HAVE BEEN ABANDONED SEVERAL YEARS AGO", + "I HAVEN'T OPENED IT", + // 5 + "WHAT SHOULD I DO, SHOULD I PULL IT OFF?", + "HI THERE DOOR, I'M GOING TO MAKE YOU A DOOR-FRAME", + "IT'S TOO TOUGH FOR ME", + "THE WINDOW IS BOARDED UP", + "I CAN'T", + // 10 + "YES, THAT'S DONE", + "WHY?", + "HI WINDOW, ARE YOU DOING ANYTHING TONIGHT?", + "NOT WITHOUT PERMISSION FROM THE TOWN HALL", + "IF ONLY THIS WINDOW WASN'T BOARDED UP...", + // 15 + "YOO-HOO WINDOW!", + "HI THERE", + "LIKE MICROCHOF'S", + "I CAN'T REACH", + "IT'S ALRIGHT WHERE IT IS", + // 20 + "", + "IT'S A COFFIN IN THE SHAPE OF A CROSS", + "NO THANKS", + "HI DEAD MAN. NO, DON'T GET UP FOR MY SAKE", + "YES, JUST LIKE IN POLTERGEIST", + // 25 + "", + "", + "I'LL BE BACK IN FIFTEEN MINUTES", + "IT'S FORBIDDEN TO PUT UP POSTERS", + "IT'S UNCLE EVARISTO'S TOMB", + // 30 + "IT'S LOCKED", + "I'VE GOT ONE", + "YOO HOO, UNCLE EVARISTO!", + "THERE'S NO POWER", + "IT'S NOT WELL PARKED", + // 35 + "IT'S A DOOR", + "A DRAWER IN THE TABLE", + "A SUSPICIOUS WARDROBE", + "HI WARDROBE, HOW ARE YOU?", + "", + // 40 + "", + "IT'S AN ANCIENT CANDELABRUM", + "IT MUST HAVE BEEN HERE SINCE YULE BRINNER HAD HAIR ON HIS HEAD", + "NO, IT'S A RELIC", + "IT'S A NICE ALTARPIECE", + // 45 + "", + "HA, HA, HA", + "", + "NO", + "", + // 50 + "HA, HE, HI, HO, HU, GREAT!", + "", + "", + "", + "I CAN'T SEE ANYTHING IN PARTICULAR", + // 55 + "IT'S FERNAN, THE PLANT", + "IT'S ONE OF THE FENCE SPIKES", + "HEY! THERE'S A PACKET OF MATCHES UNDER HERE", + "LOOK! A PACKET OF KLEENEX, AND ONE'S STILL UNUSED", + "THERE ISN'T ANYTHING ELSE IN THE BUCKET", + // 60 + "IT'S A BLIND MAN WHO CAN'T SEE", + "", + "", + "", + "", + // 65 + "THAT'S A GREAT DEAL OF MONEY", + "", + "", + "", + "", + // 70 + "", + "", + "", + "", + "", + // 75 + "", + "", + "", + "", + "", + // 80 + "", + "", + "", + "", + "", + // 85 + "", + "", + "", + "", + "", + // 90 + "", + "", + "", + "", + "", + // 95 + "", + "", + "", + "", + "", + // 100 + "THERE IS NOTHING SPECIAL ABOUT IT", + "IT'S NOT UNUSUAL", + "HEY, WHAT'S UP MAN?", + "HI", + "NOTHING NEW?", + // 105 + "HOW IS THE FAMILY?", + "THAT IS JUST LIKE YOU!", + "BUT HOW DO I GET THAT?", + "MY RELIGION DOES NOT ALLOW ME TO", + "IT'D BE BETTER NOT", + // 110 + "YEAH, SURE MAN!", + "NO WAY", + "IMPOSSIBLE", + "THIS WILL NOT OPEN", + "I CAN'T DO IT BY MYSELF", + // 115 + "I COULD DO IT, BUT I JUST FEEL A LITTLE LAZY", + "I DO NOT SEE THE REASON", + "IT'S QUITE A NICE BRAIN", + "AND SO BRAIN, WHAT ARE YOU UP TONIGHT?", + "NO, IT MUST BE KEPT SOMEWHERE AWAY FROM THE MUTANT ACTION OF THE ATMOSPHERE", + // 120 + "IT IS VERY STIFF, JUST LIKE MY BOSS", + "A VERY SHARP STAKE", + "YOU FAITHFUL SHARP-POINTED STAKE, FROM THE MOST NOBLE TRANSILVANIAN OAK TREE", + "DAMN, I HAVE TO CUT MY NAILS!", + "B.J. IS IN THERE... SHE IS A REALLY HOT CHICK!", + // 125 + "IT IS FIRMLY LOCKED", + "\"SAFE AWAY LOCKS LTD.\"", + "IT IS THE TYPICAL SKELETON YOU FIND IN THE DUNGEONS OF ALL THE GAMES", + "IT IS COMMONLY USED TO TRANSFER ELECTRICITY TO THE MACHINES CONNECTED TO IT", + "IT IS HAND MADE BECAUSE THE JAPANESE MAKE THEM POCKET SIZE", + // 130 + "I HAVE ONLY ONCE SEEN IN MY LIFE ANOTHER THING AS UGLY AS THIS", + "FORGET IT. I AM NOT GOING TO TELL HIM ANYTHING IN CASE HE GETS MAD", + "HE SEEMS QUITE RATIONAL", + "IT IS A PICTURE OF PLATO WRITING HIS LOST DIALOGUE", + "I AM NOT ONE OF THOSE PEOPLE WHO TALKS TO POSTERS", + // 135 + "THAT'S A VERY CUTE DESK", + "IT IS A VAMPIRES HUNTER'S DIPLOMA OFFICIALLY APPROVED BY OXFORD UNIVERSITY", + "IT'S A DARK NIGHT WITH A FULL MOON", + "IT SEEMS LIKE THESE SCREWS ARE NOT TIGHTENED PROPERLY", + "DON'T LOOK NOW, BUT I THINK THAT A HIDDEN CAMERA IS FOCUSING ON ME", + // 140 + "THAT'S A VERY MODERN STAKE DETECTOR", + "NO. THE LABORATORY IS ON THE SECOND FLOOR", + "A NICE BEDSIDE TABLE", + "IT'S A LOT OF MONEY THAT CAN'T BE MISSING IN ANY VALUABLE ADVENTURE", + "IF I WERE A RICH MAN, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", + // 145 + "THOSE ARE STRANGE LEAVES. THEY MUST HAVE BROUGHT THEM FROM SOUTH AMERICA OR AROUND THERE", + "I DON'T THINK THEY WOULD ANSWER ME", + "THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY SHOW THE FULL EXTENT OF IT'S BEAUTY", + "I ONLY PRAY BEFORE I GO TO BED", + "HEY, THIS SPIKE SEEMS A LITTLE BIT LOOSE!", + // 150 + "I HOPE YOU WON'T COMPLAIN ABOUT NOT GETTING ANY CLUES FROM ME", + "IT'S A QUITE CONVENTIONAL SPIKE", + "THEY ARE CUTE, THOUGH THEY ARE COVERED WITH A LITTLE BIT OF WAX", + "NO, THEY WON'T HEAR ME. HA,HA,HA THIS IS GREAT!", + "\"SLEEPING BEAUTY\" FROM TCHAIKOVSKY, OR CHOIFRUSKY, OR WHATEVER IT IS", + // 155 + "VERY TEMPTING", + "NO, I DO NOT PUT USED BUBBLE GUM IN MY MOUTH", + "THAT'S A VERY NICE SICKLE. I WONDER WHERE THE HAMMER IS", + "TOBACCO MANUFACTURERS WARN ABOUT HEALTH BEING SERIOUSLY DAMAGED BY SANITARY AUTHORITIES", + "AN ABSOLUTELY NORMAL CANDLE, INCLUDING WAX AND EVERYTHING", + // 160 + "THESE TWO SHINY COINS REALLY GLITTER!", + "THIS SHINY COIN REALLY GLITTERS!", + "WITH THIS I WILL BE IMMUNE AGAINST VAMPIRE BITES", + "NO, IT'S IS NOT THE RIGHT MOMENT YET", + "THERE IS A ONE THOUSAND BILL AND A COUPLE OF COINS", + // 165 + "IT SAYS \"PLEASE, DO NOT THROW FOOD TO THE PIANIST\"", + "OMELETTE, 1.00. FRIED FISH, 0.80, MAYONNAISE POTATOES, 1.10", + "BEST BURGERS ON THIS SIDE OF THE DANUBE, ONLY 325!", + "THAT'S A NICE SKULL WITH A VERY PENETRATING LOOK, HA, HA, HA, HA, THAT WAS GOOD!", + "HI SKULL, YOU REMIND ME OF UNCLE HAMLET", + // 170 + "I HAVE THE HABIT OF NOT TOUCHING THINGS THAT HAVE BEEN ALIVE", + "IT'S A BIN", + "IT'S A BET FOR TONIGHT'S GAME", + "I WONDER WHAT IS BEHIND THAT", + "HEY, THE CURTAIN WILL NOT MOVE!", + // 175 + "MAN, THIS CASTLE IS REALLY GLOOMY", + "I CAN'T, HE IS TOO FAR AWAY TO HEAR ME", + "IT'S A TYPICAL TRANSILVANIAN FOREST, WITH TREES", + "MAN YOU SAY REALLY STUPID THINGS, THIS ROOM IS TOO DARK!", + "GARCIA, CANDY STORE. SWEETS AND BUBBLE GUM", + // 180 + "A VERY NICE DOOR", + "IT'S CLOSED", + "A COMPLETELY SEALED BARREL", + "", + "AREN'T THESE BUGS REALLY CUTE?", + // 185 + "PSSST, PUSSYCAT... LITTLE CAT", + "THERE IS NO ANSWER", + "THE MOON IS A SATELLITE THAT TURNS AROUND THE EARTH WITH A REVOLUTION PERIOD OF 28 DAYS", + "HI, LOONY MOON", + "IT'S TOTALLY BOARDED UP WITH PLANKS", + // 190 + "IT'S IMPOSSIBLE. NOT EVEN THAT TOUGH GUY FROM TV COULD OPEN THIS", + "HEY! THE SHADOW OF THAT CYPRESS LOOKS PROLONGED TO ME!", + "YOU, BARTENDER...!!", + "I WOULD LIKE TO HAVE A ROOM PLEASE", + "DO YOU KNOW WHERE I CAN FIND THE MAN CALLED DRASCULA?", + // 195 + "YES, SO WHAT?", + "SO?", + "IS...THAT RIGHT?", + "GOOD QUESTION. LET ME TELL YOU MY STORY. LOOK...", + "IT WILL TAKE JUST FIVE MINUTES", + // 200 + "I'M JOHN HACKER AND I REPRESENT A BRITISH PROPERTY COMPANY", + "AS FAR AS I KNOW, COUNT DRASCULA WANTS TO BUY SOME PIECES OF LAND IN GIBRALTAR AND MY COMPANY SENT ME HERE TO NEGOTIATE THE SALE", + "I THINK I'M GOING BACK TO MY MUM'S TOMORROW, FIRST THING IN THE MORNING", + "BEAUTIFUL NIGHT, HUH?", + "NO, NOTHING", + // 205 + "YOU...PIANIST...!!!!", + "BEAUTIFUL NIGHT", + "AND IT'S NOT EVEN COLD OR ANYTHING, BY THE WAY, CANT YOU PLAY A DIFFERENT SONG?", + "ALL RIGHT, I'LL JUST LET YOU GO ON PLAYING", + "WELL THEN", + // 210 + "HI BOSS, HOW ARE YOU?", + "AND HOW IS THE FAMILY?", + "THIS IS QUITE GROOVY, HUH?", + "I'D BETTER NOT SAY ANYTHING", + "THERE IS NO PLACE LIKE HOME. THERE IS NO...WHAT?, BUT YOU ARE NOT AUNTIE EMMA. AS A MATTER OF FACT, I DON'T HAVE AN AUNTIE EMMA!", + // 215 + "YOU CAN CALL ME ANYTHING YOU WANT, BUT IF YOU CALL ME JOHNNY, I'LL COME TO YOU LIKE A DOG", + "AREN'T I JUST A FUNNY GUY, HUH?. BY THE WAY, WHERE AM I?", + "YES", + "SHOOT...!", + "OH, SURE...OF COURSE!", + // 220 + "WELL, THANKS VERY MUCH FOR YOUR HELP. I WON'T BOTHER YOU ANYMORE IF YOU PLEASE TELL ME WHERE THE DOOR IS...", + "THE KNOCK MUST HAVE AFFECTED MY BRAIN...I CAN'T SEE A THING...", + "WELL...THAT DOESN'T MATTER. I ALWAYS CARRY A SPARE PAIR", + "WOW, WHAT A HOT CHICK!! I DIDN'T NOTICE!, BUT OF COURSE, I WASN'T WEARING MY GLASSES", + "HEY...", + // 225 + "AND ALL THIIIISSS???", + "DON'T WORRY B.J. HONEY, I'LL SAVE YOU FROM FALLING INTO HIS CLUTCHES...", + "YOU REALLY GOT ME MAD MAN...", + "AHHH A WEREWOLF!! DIE YOU DAMNED EVIL!", + "YES, WELL...", + // 230 + "YES, WELL... I THINK I'LL JUST GO ON MY WAY. EXCUSE ME", + "WHAT?", + "TO TELL YOU THE TRUTH...ON SECOND THOUGHTS...I DON'T REALLY THINK SO", + "AND SO TELL ME YOU ERUDITE PHILOSOPHER, IS THERE ANY RELATIONSHIP CAUSE-AND-EFFECT BETWEEN SILLY AND BILLY?", + "OK, OK, FORGET IT. I DON'T EVEN KNOW WHY I SAID ANYTHING ABOUT IT", + // 235 + "WHY ARE YOU PHILOSOPHIZING INSTEAD OF EATING PEOPLE?", + "HOW COME?", + "HEY, COULD YOU SAY ALL THAT STUFF ABOUT PRE-EVOLUTIONARY RELATIONSHIPS AGAIN?", + "YES, MAN. ALL THAT STUFF YOU TOLD ME ABOUT BEFORE. I DIDN'T UNDERSTAND IT, YOU KNOW", + "NO, I'D RATHER NOT SAY ANYTHING, IN CASE HE GETS ANGRY OR SOMETHING...", + // 240 + "HELLO?", + "YES, WHAT'S UP?", + "WELL, NOW THAT YOU MENTION IT, I'LL TELL YOU THAT...", + "", + "BY THE WAY, THIS IS NOT THE CASE, OF COURSE, BUT WHAT COULD HAPPEN IF A VAMPIRE GOT THE RECIPE BY ANY CHANCE?", + // 245 + "WELL ANYWAY. LISTEN, DOESN'T THIS LOOK LIKE A LOT OF CRAP TO END THE GAME WITH?. WELL, MAYBE NOT", + "IT'S EMPTY!", + "WHY DID YOU TAKE MY ONLY LOVE, B.J., AWAY FROM ME?. LIFE HAS NO MEANING FOR ME WITHOUT HER", + "HER BRAIN?\?!!", + "TO TELL YOU THE TRUTH, I THINK I HAVE HAD ENOUGH FUN WITH YOUR LITTLE MONSTER ALREADY", + // 250 + "OH PLEASE, HOLY VIRGIN, DON'T LET ANYTHING WORSE HAPPEN TO ME!!", + "YOU ARE NOT GOING TO GET YOUR WAY. I'M SURE SUPERMAN WILL COME AND RESCUE ME!", + "WHAT SORT OF A SHIT GAME IS THIS IN WHICH THE PROTAGONIST DIES!", + "HEY, WAIT A SECOND!, WHAT ABOUT MY LAST WISH?", + "HA. HA, I'M NOW IMMUNIZED AGAINST YOU DAMNED EVIL!. THIS CIGARETTE IS AN ANTI-VAMPIRE BREW THAT VON BRAUN GAVE TO ME", + // 255 + "YES SURE, BUT YOU'LL NEVER GET ME TO GIVE YOU THE RECIPE", + "APART FROM CREATING TORTURE, I CAN ALSO WITHSTAND IT.", + "OH, NO PLEASE! I'LL TALK, BUT PLEASE, DON'T DO THAT TO ME!", + "ALL RIGHT THEN. I TOLD YOU WHAT YOU WANTED TO KNOW. NOW SET B.J. AND ME FREE THEN LEAVE US ALONE!", + "WHAT ARE YOU DOING HERE B.J.?. WHERE IS DRASCULA?", + // 260 + "WHAT A MEAN GUY!. JUST BECAUSE HE BELONGS TO NOBILITY HE THINKS HE IS ENTITLED TO SLEEP WITH ANYBODY HE FEELS LIKE", + "DOWN WITH ARISTOCRATIC DESPOTISM!!", + "POOR PEOPLE OF THE WORLD FOR EVER..!!", + "AND I CAN SEE HE HAS CHAINED YOU UP WITH LOCKS AND ALL THAT STUFF, HUH?", + "WELL, ALL RIGHT. DO YOU HAVE A HAIR PIN OVER THERE?", + // 265 + "ALL RIGHT, OK, DON'T GET MAD. I'LL THINK OF SOMETHING", + "YOU...BARTENDER!!", + "HOW IS THE GAME GOING?", + "WHO?", + "CAN'T YOU SEE DRASCULA IS HERE?", + // 270 + "THEN, LET'S FINISH HIM OFF, RIGHT?", + "GIVE ME A SCOTCH ON THE ROCKS", + "NOTHING, I JUST FORGOT WHAT I WAS GOING TO SAY...", + "EITHER YOU GET ME A SCOTCH ON THE ROCKS OR I'LL PLAY THE PIANO UNTIL THE GAME IS OVER", + "WHEN IS THE MATCH GOING TO BE OVER?", + // 275 + "GOOD EVENING", + "AND SO IGOR, HOW ARE YOU FEELING...A LITTLE HUMPED...?. HA, HA, HA, THAT WAS FUNNY!", + "WHAT ARE YOU SUPPOSED TO BE DOING?", + "WELL, NO, I DONT UNDERSTAND TAXES", + "THEN WEAR GLASSES", + // 280 + "WHAT IS ALL THAT ABOUT THE SUPERNATURAL ORGY?", + "OK, OK, STOP IT. I THINK I GET THE PICTURE", + "COULDN'T YOU TELL ME WHERE DRASCULA IS?", + "OH...PLEASE...COME ON...!", + "WHY NOT?", + // 285 + "OH...DOES HE SLEEP AT NIGHT?", + "WELL, I HOPE YOU GET LUCKY", + "I HAVE TO TALK TO HIM...", + "YOUUU...SKELETONNNN..!!!", + "GOOD HEAVENS!, IT'S A DEAD MAN TALKING!", + // 290 + "HOW DID YOU END UP HERE", + "AND WHY WOULD DRASCULA WANT TO CREATE A MONSTER?", + "WHAT'S YOUR NAME, MY SKELETON FRIEND?", + "HEY, DON'T YOU WANT ANYTHING TO EAT?", + "I BET YOUR STOMACH IS PRETTY EMPTY...HA,HA,HA!", + // 295 + "I DON'T FEEL LIKE TALKING RIGHT NOW", + "I HOPE SOMEONE F...(WHISTLE) YOU...,AND YOUR F...(WHISTLE) SON OF (WHISTLE TWICE)", + "I REALLY LOVED HER. I KNOW SHE WASN'T MUCH OF A WONDER, BUT NOBODY'S PERFECT, RIGHT?", + "BESIDES. SHE HAD ONE OF THOSE GREAT BODIES THAT YOU NEVER FORGET...", + "I'LL NEVER BE THE SAME AGAIN. I WILL SHUT MYSELF AWAY IN A MONASTERY, AND WILL LET MY LIFE JUST FLOW...", + // 300 + "NOTHING WILL GET ME OUT OF THIS MYSTERY BECAUSE...", + "WHOSE?. WHOSE?", + "I WANT TO BECOME A PIRATE", + "I WANT TO BECOME A PROGRAMMER", + "TELL ME SOMETHING ABOUT PELAYO", + // 305 + "I'LL JUST GO ON PLAYING, AND FORGET I SAW YOU", + "WHOSE STUPID IDEA COULD THIS BE?", + "IT LOOKS LIKE MY GRANDMOTHER'S HANDBAG ", + "JESUS, AREN'T I JUST REALLY COOL MAN...!", + "THE MORE I SEE MYSELF, THE MORE I LOVE MYSELF", + // 310 + "HOW DO I LOCK MYSELF THEN?", + "I'LL HAVE TO OPEN ME FIRST, RIGHT?", + "I'M ALL RIGHT WHERE I AM", + "I GOT ME", + "HI, MYSELF!", + // 315 + "I'LL WEAR THEM WHEN THE RIGHT TIME COMES", + "I DON'T SEE ANYTHING SPECIAL ABOUT IT", + "IT'S ALL RIGHT WHERE IT IS", + "AND WHAT FOR?", + "I CAN'T", + // 320 + "HI, YOU!", + "IT'S UNCLE DESIDERIO'S PANTHEON!", + "YOUUU...UNCLE DESIDERIOOOO!!", + "NO, I DON'T WANT TO CUT MYSELF AGAIN", + "AHHH,,,EXCUS....", + // 325 + "JAMM. AHH...", + "YES...WOF, WOF", + "LOOK, THERE'S A PIECE OF BUBBLE GUM STUCK HERE", + "THIS IS THE MOBILE PHONE I GOT LAST CHRISTMAS", + "IT'S VERY HIGH!", + // 330 + "COME OUT TO THE BALCONY MY JULIET!!", + "YOU ARE THE LIGHT THAT ILLUMINATES MY WAY!", + "HEY, DOOR!, WHAT'S THE MATTER?", + "YOUUU, CIGARETTE VENDING MACHINE!", + "IT'S A CIGARETTE VENDING MACHINE", + // 335 + "I HAVE ANOTHER COIN INSIDE", + "NO, I JUST QUIT SMOKING AND DRINKING ALCOHOL", + "I WILL DEVOTE MYSELF TO WOMEN FROM NOW ON", + "THIS IS A TRICK! NOTHING CAME OUT!", + "AT LAST!", + // 340 + "IT'S JUST A TRUNK", + "HELLO TRUNK, YOUR NAME IS JUST LIKE MY COUSIN FRANK...", + "I'VE FOUND B.J.'S HANDBAG!", + "OH MY GOD! I HAVE NO REFLECTION! I'M A VAMPIRE!", + "OH...JESUS, IT'S JUST A DRAWING!", + // 345 + "LITTLE MIRROR, TELL ME, WHO IS THE MOST BEAUTIFUL IN THE WHOLE KINGDOM?", + "HE WON'T OPEN", + "ALL RIGHT. I GOT THE EAR-PLUGS IN", + "IT'S A VAMPIRE'S HUNTER DIPLOMA, OFFICIALLY APPROVED BY OXFORD UNIVERSITY", + "NOT YET. THERE ARE STILL SOME INGREDIENTS MISSING. IT'S NOT WORTH WAKING HIM UP", + // 350 + "BUT I DON'T HAVE MONEY", + "IT'S A BRITISH LAMP", + "HELP ME OUT HERE BARTENDER!!", + "A VAMPIRE CAME IN AND TOOK MY GIRLFRIEND AWAY!!", + "BUT, AREN'T YOU GOING TO HELP ME!!??", + // 355 + "DEAD?, WHAT DO YOU MEAN DEAD?", + "AAHH....", + "A VAMPIRE HAS KIDNAPPED THE GIRL IN ROOM 501", + "BUT YOU HAVE TO HELP ME OUT!", + "CAN'T YOU PLAY ONE FROM BLUR?", + // 360 + "HOW CAN YOU STAY HERE ALL DAY PLAYING THE SAME SONG ALL THE TIME?", + "AND HOW CAN YOU HEAR ME?", + "PLEASE, LEND ME THE EAR-PLUGS", + "COME ON, I'LL GIVE THEM BACK TO YOU RIGHT AWAY", + "COME ONNN...", + // 365 + "WELL GOODBYE, I HAVE TO KILL A VAMPIRE", + "", + "WHAT LANGUAGE ARE YOU SPEAKING?, TRANSILVANIAN?", + "WHAT ARE YOU TALKING ABOUT? WHO IS UNCLE DESIDERIO?", + "BUT, WHAT'S THE PROBLEM WITH DRASCULA?", + // 370 + "WHO IS THIS GUY NAMED VON BRAUN?", + "AND WHY DOESN'T HE DO IT?", + "WHERE CAN I FIND VON BRAUN?", + "WELL, THANKS AND GOODBYE. HOPE YOU SLEEP IT OFF JUST FINE", + "WE HAD BETTER CALL FIRST", + // 375 + "ARE YOU PROFESSOR BRAUN?", + "AND COULD YOU TELL ME WHERE I CA...?", + "I DON'T BELIEVE HE IS GANIMEDES THE DWARF", + "PROFESSOR!!", + "PLEASE HELP ME!. MY GIRLFRIEND'S LIFE DEPENDS ON YOU!!", + // 380 + "WELL, ALL RIGHT. I DON'T NEED YOUR HELP", + "ALL RIGHT. I'M LEAVING", + "DON'T DE AFRAID. WE WILL BEAT DRASCULA TOGETHER", + "THEN WHY DON'T YOU HELP ME?", + "I GOT THEM", + // 385 + "YES, I GOT THEM!!", + "ALL RIGHT", + "AHH....YES", + "I HAVE COME TO GET INTO THAT CABIN AGAIN", + "I AM READY TO FACE YOUR TEST", + // 390 + "ALL RIGHT OLD MAN. I CAME FOR MY MONEY", + "NO, NOTHING. I WAS JUST LEAVING", + "SORRY...", + "WOULD YOU LIKE THIS BOOK?. IT HAS SOME SCORES FROM TCHAIKOVSKY", + "HOW CAN I KILL A VAMPIRE?", + // 395 + "HAS ANYBODY TOLD YOU THAT SLEEPING IN A BAD POSITION IS NOT GOOD FOR YOU?", + "THAT'S WHAT MY MUM ALWAYS TELL ME", + "WHY DIDN'T DRASCULA KILL YOU?", + "AND WHAT WAS IT?", + "GREAT! YOU HAVE AN IMMUNIZING BREW", + // 400 + "SO?", + "ALL RIGHT", + "CAN YOU REPEAT WHAT I NEED FOR THAT BREW", + "WELL, I'LL RUSH OUT TO GET IT", + "HEY, WHAT HAPPENED WITH THE PIANIST?", + // 405 + "I HAVE ALL THE INGREDIENTS OF THAT BREW", + "JUST A QUESTION. WHAT IS ALL THAT ABOUT THE ALUCSARD ETEREUM?", + "YES, YES?...", + "AND WHERE IS THAT CAVERN?", + "WHAT HAPPENED? DIDN'T THEY HAVE TO GO TO COURT?", + // 410 + "...BUT... IF I MEET MORE VAMPIRES?", + "IT'S A VAMPIRE THAT WON'T LET ME COME THROUGH", + "HE LOOKS LIKE YODA, BUT A LITTLE TALLER", + "HEY YODA, IF YOU JUST LET ME GO ON MY WAY, I'LL GIVE YOU A PENNY", + "OK, OK, YOU GET MAD ABOUT NOTHING MAN", + // 415 + "HAS ANYBODY TOLD YOU THAT YOU LOOK LIKE YODA?", + "HI VAMPIRE, IT'S A BEAUTIFUL NIGHT, HUH?", + "ARE YOU A VAMPIRE OR AN OIL PAINTING?", + "I'D BETTER NOT SAY ANYTHING, IN CASE YOU GET MAD", + "IT'S LOCKED", + // 420 + "THE MAGPIE WOULD PECK OUT MY EYES IF I TRIED!", + "OH MY GOD. IT'S LOCKED...THAT'S SCARY, HUH?", + "THE HINGES ARE RUSTY", + "THERE IS ONLY ONE BAG OF FLOUR IN THERE", + "THAT TOOK AWAY THE RUST", + // 425 + "I FOUND A PINE STAKE", + "I'LL TAKE THIS LARGER ONE", + "WELL, I THINK I CAN GET RID OF THIS STUPID DISGUISE", + "\"PASSAGE TO TOWERS CLOSED FOR REPAIRS. PLEASE USE THE MAIN ENTRANCE. SORRY FOR THE INCONVENIENCE\"", + "...HE IS PALE, HE HAS FANGS AND WEARS A TOUPE\220 HE SURE IS DRASCULA!", + // 430 + "IT'S B.J.! ARE YOU ALL RIGHT B.J.?", + "YES, I KNOW SHE IS STUPID, BUT I'M SO LONELY", + "YOU DON'T HAVE A KEY AROUND THERE, DO YOU?", + "I BET YOU DON'T HAVE A LOCK PICK AROUND!", + "GIVE ME A HAIR PIN, I'M GOING TO PLAY MCGYVER HERE!", + // 435 + "DON'T GO ANYWHERE. I'LL BE RIGHT BACK", + "SHOOT! IT'S BROKEN!", + "OLEEEE! I EVEN SHAVED DUDE!", + "YES, DARLING?", + "HE HAS NOT ARRIVED YET", + // 440 + "THE PIANIST IS NOT HERE", + "A TRANSILVANIAN SCOTCH ON THE ROCKS", + "I DON'T HAVE A ROOM YET", + "IT LOOKS LIKE HE GOT STUCK IN THE BATH AND DECIDED TO RUN A BAR", + "HE WAS AS DRUNK AS A SAILOR", + // 445 + "THAT HAIR...IT REMINDS ME OF SOMEBODY", + "IT'S A RAW-BONED SKELETON", + "LOOK! THERE'S MIGUEL BOSE!", + "HE'S ASLEEP. IT'D BE A SHAME TO WAKE HIM UP", + "HE'S UGLIER THAN EMILIO DE PAZ", + // 450 + "A PINE WOOD COFFIN", + "HE IS GOING TO CUT ME IN LITTLE SLICES. JUST LIKE A SAUSAGE", + "I DON'T LIKE PENDULAE. I'D PREFER ARTICHOKES", + "I CAN'T MAKE IT. I'M HANDCUFFED", + "IT'S OBVIOUSLY A SECRET DOOR", + // 455 + "THEY IGNORE ME", + "COME ON..!", + "WHEN I READ THE SCRIPT IT WAS SUPPOSED TO MOVE, BUT THE BUDGET GOT CRAZY AND THEY COULDN'T AFFORD TO PAY THE GYM, SO I NEVER GOT STRONGER. END OF STORY", + "IT SEEMS A LITTLE LOOSE ON THE WALL", + "I DON'T THINK IT IS GOING TO HELP ME ANYWAY. IT'S TOO WET TO LIGHT", + // 460 + "TO THE WEST WING? NO WAY! NOBODY KNOWS WHAT YOU WILL FIND THERE!!", + "SHE'S GOT NICE TRANSILVANIAN FEATURES", + "", + "IT'S A SHAME THERE ISN'T A ROASTED LAMB IN THERE", + "LAST TIME I OPENED AN OVEN I BLEW UP THE HOUSE", + // 465 + "THAT'S THE TRANSILVANIAN FOOTBALL TEAMS BADGE", + "WHAT FOR? TO PUT IT ON MY HEAD??", + "I DON'T THINK THESE TOWERS ARE THE OPENING KIND", + "I DON'T WANT TO KNOW WHAT KIND OF FOOD IS IN THERE!", + "IT LOOKS IMPRESSIONIST TO ME...", + // 470 + "THE NIGHT IS FALLING OVER ALL OF US...THAT'S SCARY, ISN'T IT?", + "IT'S STUCK!", + "IT'S ELVIS THE KING. YOU DIDN'T IMAGINE THAT WOULD BE HERE, DID YOU!", + "NO, I ALREADY HAVE ONE AT HOME TO FEED", + "A SHELF WITH BOOKS AND SOME OTHER THINGS", + // 475 + "BUT WHO CAN I CALL AT THIS TIME?", + "\"HOW TO FILL IN TAX RETURN FORMS\". HOW INTERESTING!", + "I ALREADY HAVE ONE AT HOME. I THINK IT'S A WORLDWIDE BEST SELLER", + "A COMPLETELY NORMAL KEY", + "I THINK SHE IS NOT FROM AROUND HERE", + // 480 + "HEY, THEY'RE FANG-LIKE FRENCH FRIES! I LOVE IT!", + "I DON'T THINK THIS IS THE RIGHT TIME TO EAT THAT CRAP KNOWING THAT MY GIRLFRIEND HAS BEEN KIDNAPPED BY THE MOST EVIL PERSON EVER ON EARTH", + "I'M HAVING A GREAT TIME KILLING VAMPIRES WITH THIS THING!", + "LET'S SEE IF ANOTHER ONE COMES SOON!", + "NO, IT HAS TO BE WITH A DIRTY AND STINKY VAMPIRE, JUST LIKE THE ONE I KILLED BEFORE", + // 485 + "THIS IS THE ONE AND ONLY WIG THAT ELVIS USED WHEN HE WENT BALD", + "IT'S FLOUR, BUT DON'T ASK ME ANY COMMERCIAL NAMES", + "MAYBE ANOTHER TIME, OK?", + "THAT'S A GREAT AXE, IT'S A SHAME THERE IS NO VAMPIRE'S HEAD AROUND HERE, HUH?", + "NO. I REALLY AM A GOOD PERSON", + // 490 + "IT'S MARGARET'S THATCHERS DEODORANT...HA, HA, HA...!!", + "THAT'S A PRETTY CUTE CLOAK", + "", + "JUST LIKE ALL THE BRANCHES FROM ANY TREE IN THE WORLD, THERE IS NOTHING SPECIAL.", + "HEY, THAT'S AMAZING! A ROPE IN THIS TYPE OF ADVENTURE GAME!", + // 495 + "I WONDER WHAT WE COULD USE IT FOR...", + "A ROPE TIED TO A BRANCH OR THE OTHER WAY AROUND, HOWEVER YOU WANT TO PUT IT...", + "IT LOOKS LIKE THIS MAGPIE IS EVIL-MINDED", + "FORGET IT, I'M NOT SAYING ANYTHING IN CASE HE GETS MAD", + "SHE LOOKS DEAD, BUT SHE REALLY ISN'T, HUH?", + // 500 + "NO ANIMAL WAS HARMED DURING THE PRODUCTION OF THIS GAME", +}, +{ + // 0 + "", + "Es la segunda puerta mas grande que he visto en mi vida", + "Bueno, no", + "Esta sellada con tablones. La iglesia debe llevar abandonada varios a\244os", + "Si no la he abierto", + // 5 + "\250Que hago? \250La arranco?", + "Hola puerta. Te voy a hacer un marco.", + "Demasiado para mi.", + "una ventana sellada con tablones.", + "No puedo.", + // 10 + "Ya lo esta.", + "\250Y pa que?", + "Hola ventana. \250Tienes algo que hacer esta noche?", + "No sin el permiso de obras publicas", + "\255eh! esa ventana tiene solo un tablon...", + // 15 + "\255Eoooooo! \255Ventana!", + "Hola tu.", + "", + "No alcanzo.", + "Esta bien donde esta.", + // 20 + "", + "Es una tumba en forma de cruz.", + "No gracias.", + "Hola muerto. \250quieres gusanitos?", + "Si hombre. Como en Poltergueist.", + // 25 + "", + "", + "Vuelvo en quince minutos.", + "Prohibido pegar carteles.", + "", + // 30 + "Esta cerrado con llave.", + "Ya tengo uno.", + "", + "No contesta.", + "No, esta bien aparcado.", + // 35 + "Es una puerta.", + "Un cajon de la mesa.", + "Un sospechoso armario.", + "Hola armario. \250Que tal?", + "", + // 40 + "", + "Es un candelabro muy viejo.", + "Debe de llevar aqui desde que Mazinguer-z era un tornillo.", + "No. Es una reliquia.", + "Es un bonito retablo.", + // 45 + "", + "Ji, ji, ji.", + "", + "No.", + "", + // 50 + "Ja, ja, ja. \255que bueno!", + "", + "", + "", + "No veo nada en especial.", + // 55 + "Es Fernan, la planta.", + "Es una de las picas de la verja.", + "\255Eh! Aqui debajo hay una caja de cerillas.", + "\255Mira! un paquete de clinex. \255Y hay uno sin usar!", + "No hay nada mas en el cubo.", + // 60 + "Es un ciego que no ve.", + "", + "", + "", + "", + // 65 + "Es una cuantiosa cantidad de dinero.", + "", + "", + "", + "", + // 70 + "", + "", + "", + "", + "", + // 75 + "", + "", + "", + "", + "", + // 80 + "", + "", + "", + "", + "", + // 85 + "", + "", + "", + "", + "", + // 90 + "", + "", + "", + "", + "", + // 95 + "", + "", + "", + "", + "", + // 100 + "NO TIENE NADA DE ESPECIAL", + "NO ES NADA FUERA DE LO NORMAL", + "\250QUE PASA TU?", + "HOLA", + "\250NADA NUEVO?", + // 105 + "\250QUE TAL LA FAMILIA?", + "\255QUE COSAS TIENES!", + "\255PERO COMO VOY A COGER ESO!", + "MI RELIGION ME LO PROHIBE", + "MEJOR NO", + // 110 + "\255SI HOMBRE!", + "NI HABLAR DE ESO", + "IMPOSIBLE", + "ESTO NO SE ABRE", + "YO SOLO NO PUEDO", + // 115 + "SI QUISIERA PODRIA, PERO ES QUE ME DA PEREZA", + "NO LE VEO MOTIVO APARENTE", + "ES UN CEREBRO BASTANTE MAJO", + "Y BIEN, CEREBRO \250QUE PIENSAS HACER ESTA NOCHE?", + "NO, DEBE CONSERVARSE EN LUGAR CERRADO A LA ACCION MUTANTE DE LA ATMOSFERA", + // 120 + "ES UN HUESO, COMO MI JEFE", + "UNA ESTACA MUY AFILADA", + "FIEL ESTACA PUNTIAGUDAAA, NOBLE ROBLE TRANSILVAAANOO", + "\255VAYA, ME TENGO QUE CORTAR LAS U\245AS!", + "\255AHI DENTRO ESTA B.J., Y HAY QUE VER COMO ESTA LA TIA!", + // 125 + "ESTA CERRADA A CAL Y CANTO", + "\"CANDADOS CAL Y CANTO S.A.\"", + "ES EL TIPICO ESQUELETO QUE ESTA EN TODAS LAS MAZMORRAS DE TODOS LOS JUEGOS", + "SE SUELE USAR PARA COMUNICAR CORRIENTE ELECTRICA A LOS APARATOS A EL ENCHUFADOS", + "ES TOTALMENTE ARTESANAL, PORQUE LOS JAPONESES LOS HACEN DE BOLSILLO", + // 130 + "SOLO HE VISTO EN MI VIDA OTRA COSA TAN FEA", + "QUITA. NO LE DIGO NADA A VER SI SE VA A ENFADAR", + "PARECE BASTANTE RACIONAL", + "ES UNA FOTO DE PLATON ESCRIBIENDO SU DIALOGO PERDIDO", + "NO SOY DE LOS QUE HABLAN CON POSTERS", + // 135 + "UN ESCRITORIO MUY MONO", + "ES UN DIPLOMA DE CAZA-CAZA-VAMPIROS HOMOLOGADO POR LA UNIVERSIDAD DE OXFORD", + "ES NOCHE CERRADA CON LUNA LLENA", + "PARECE QUE ESTOS TORNILLOS NO ESTAN MUY ENROSCADOS", + "NO MIRES, PERO CREO QUE UNA CAMARA OCULTA ME ESTA ENFOCANDO", + // 140 + "UN DETECTOR DE ESTACAS MUY MODERNO", + "NO, EL LABORATORIO ESTA EN EL SEGUNDO PISO", + "UNA BONITA MESILLA DE NOCHE", + "ES UN MONTON DE DINERO QUE NO PUEDE FALTAR EN UNA AVENTURA QUE SE PRECIE", + "SI YO FUERA RICO, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", + // 145 + "SON UNAS EXTRA\245AS HOJAS. DEBEN DE HABERLAS TRAIDO DE SUDAMERICA, O POR AHI", + "NO CREO QUE ME CONTESTARAN", + "ES UN BONITO CRUCIFIJO DE MADERA. EL ICONO NO CAPTA TODA LA EXTENSION DE SU BELLEZA", + "YO SOLO REZO ANTES DE ACOSTARME", + "\255EH, PARECE QUE ESTA PICA ESTA UN POQUITO SUELTA!", + // 150 + "PARA QUE LUEGO TE QUEJES DE QUE NO DOY PISTAS", + "ES UNA PICA BASTANTE CONVENCIONAL", + "SON MONOS, AUNQUE TIENEN UN POCO DE MIERDECILLA", + "NO, NO ME OIRIAN. JI,JI,JI \255QUE BUENO!", + "\"LA BELLA DURMIENTE DEL BOSQUE\" DE CHAIKOSKY, O CHOIFRUSKY, O COMO SE DIGA", + // 155 + "MUY APETITOSO", + "NO, YO NO SOY DE ESOS QUE SE METEN EN LA BOCA CHICLES USADOS", + "UNA HOZ MUY MONA. ME PREGUNTO DONDE ESTARA EL MARTILLO", + "\"LOS FABRICANTES DE TABACO ADVIERTEN QUE LAS AUTORIDADES SANITARIAS PERJUDICAN SERIAMENTE LA SALUD\"", + "UNA VELA NORMAL Y CORRIENTE, CON CERA Y TODO", + // 160 + "\255HAY QUE VER COMO BRILLAN ESTAS DOS BRILLANTES MONEDAS!", + "\255HAY QUE VER COMO BRILLA ESTA BRILLANTE MONEDA!", + "CON ESTO SERE INMUNE A LAS MORDEDURAS DE LOS VAMPIROS", + "NO, TODAVIA NO ES EL MOMENTO", + "HAY UN BILLETE DE MIL Y UN PAR DE MONEDAS", + // 165 + "DICE \"SE RUEGA NO ECHAR COMIDA AL PIANISTA\"", + "TORTILLA, 200. PESCAITOS FRITOS, 150, PATATAS ALIOLI, 225", + "LAS MEJORES HAMBUERGUESAS A ESTE LADO DEL DANUBIO, POR SOLO 325", + "ES UNA BONITA CALAVERA, CON UNA MIRADA MUY PENETRANTE. \255JI, JI, JI, QUE BUENO!", + "HOLA CALAVERA, ME RECUERDAS AL TIO DE HAMLET", + // 170 + "TENGO POR COSTUMBRE NO TOCAR COSAS QUE HAYAN ESTADO VIVAS", + "ES UNA PAPELERA", + "ES UNA PORRA PARA EL PARTIDO DE ESTA NOCHE", + "ME PREGUNTO QUE HABRA DETRAS", + "\255EH, ESTA CORTINA NO SE MUEVE!", + // 175 + "HAY QUE VER, QUE TETRICO ES ESE CASTILLO, \250EH? ", + "NO PUEDO, ESTA DEMASIADO LEJOS PARA OIRME", + "ES UN TIPICO BOSQUE TRANSILVANO, CON ARBOLES ", + "\255PERO QUE TONTERIAS DICES, CON LO OSCURO QUE ESTA!", + "CONFITERIA GARCIA. PASTELES Y CHICLES.", + // 180 + "UNA PUERTA MUY BONITA", + "ESTA CERRADA", + "UN BARRIL COMPLETAMENTE CERRADO", + "", + "\255QUE BICHOS MAS MONOS!", + // 185 + "BSSST, BSSST, GATITO...", + "NO CONTESTA", + "LA LUNA ES UN SATELITE QUE GIRA ALREDEDOR DE LA TIERRA CON UN PERIODO DE REVOLUCION DE 28 DIAS", + "HOLA, LUNA LUNERA CASCABELERA ", + "ESTA TOTALMENTE TAPIADA CON TABLONES", + // 190 + "IMPOSIBLE. ESTO NO LO ABRE NI EL MAYORDOMO DE LA TELE", + "\255EH, PARECE QUE LA SOMBRA DE ESE CIPRES ES ALARGADA!", + "\255EOOO, TABERNEROOO!", + "QUISIERA UNA HABITACION ", + "\250SABE DONDE PUEDO ENCONTRAR A UN TAL CONDE DRASCULA?", + // 195 + "SI, \250QUE PASA? ", + "\250Y ESO?", + "\250DE... DE VERDAD?", + "BUENA PREGUNTA, LE VOY A CONTAR MI HISTORIA, MIRE...", + "SON SOLO CINCO MINUTOS", + // 200 + "ME LLAMO JOHN HACKER, Y SOY REPRESENTANTE DE UNA INMOBILIARIA BRITANICA", + "AL PARECER, EL CONDE DRASCULA QUIERE COMPRAR UNOS TERRENOS EN GIBRALTAR, Y ME HAN MANDADO A MI PARA NEGOCIAR LA VENTA", + "PERO ME PARECE A MI QUE MA\245ANA TEMPRANITO ME VUELVO CON MI MAMA", + "BONITA NOCHE \250VERDAD?", + "NO, NADA", + // 205 + "EOOOO, PIANISTA", + "BONITA NOCHE", + "Y ADEMAS NO HACE FRIO", + "PUES NADA, TE DEJO QUE SIGAS TOCANDO", + "PUES ESO", + // 210 + "HOLA JEFE, \250QUE TAL?", + "\250Y LA FAMILIA?", + "HAY AMBIENTE AQUI \250EH?", + "MEJOR NO DIGO NADA", + "SE ESTA MEJOR EN CASA QUE EN NINGUN SITIO... SE ESTA MEJOR EN... \250EH? PERO SI USTED NO ES LA TIA ENMA. ES MAS. \255SI YO NO TENGO NINGUNA TIA ENMA!", + // 215 + "SI, EL MIO TAMBIEN. USTED PUEDE LLAMARME COMO LE APETEZCA, AUNQUE SI ME LLAMA JOHNY, ACUDO COMO LOS PERROS", + "SI, QUE GOLPES TENGO \250VERDAD? POR CIERTO, \250DONDE ESTOY?", + "SI.", + "CACHIS... ", + "OH, SI. POR SUPUESTO", + // 220 + "PUES MUCHAS GRACIAS POR PRESTARME TU AYUDA. NO TE MOLESTO MAS. SI ME DICES DONDE ESTA LA PUERTA, POR FAVOR... ", + "PORQUE EL GOLPE ME HA DEBIDO AFECTAR AL CEREBRO Y NO VEO TRES EN UN BURRO ", + "BAH, NO IMPORTA. SIEMPRE LLEVO DE REPUESTO", + "\255GUAU, QUE TIA MAS BUENA! \255NO ME HABIA DADO CUENTA YO! CLARO, SIN LAS GAFAS", + "OYE... ", + // 225 + "\255\250 Y ESTOOOOOO?!", + "\255NO TE PREOCUPES B.J., AMOR MIO! TE SALVARE DE LAS GARRAS DE ESE ", + "ME HA TOCADO LAS NARICES, VAMOS.", + "\255AHHH, UN HOMBRE LOBO! \255MUERE MALDITO!", + "SI, ESTO...", + // 230 + "SI, ESTO... CREO QUE SEGUIRE MI CAMINO. CON PERMISO... ", + "\250QUE?", + "PUES LA VERDAD, PENSANDOLO BIEN... CREO QUE NO", + "DIME, OH ERUDITO FILOSOFO, \250EXISTE ALGUNA RELACION CAUSA-EFECTO ENTRE LA VELOCIDAD Y EL TOCINO?", + "VALE, VALE, DEJALO. DE TODAS FORMAS, NO SE POR QUE HE DICHO ESO.", + // 235 + "\250QUE HACES AQUI FILOSOFANDO, QUE NO TE ESTAS COMIENDO GENTE?", + "\250Y ESO?", + "OYE, PUEDES REPETIR ESO DE \"INCLINACIONES PRE-EVOLUTIVAS\"?", + "SI HOMBRE. ESE ROLLO QUE ME HAS SOLTADO ANTES. ES QUE NO ME HE ENTERADO MUY BIEN...", + "NO, MEJOR NO DIGO NADA, QUE COMO LE TOQUE LA VENA...", + // 240 + "\250SI, DIGA?", + "SI, \250QUE PASA? ", + "AH, PUES AHORA QUE SACA EL TEMA LE DIRE QUE...", + "", + "POR CIERTO, \250QUE PASARIA SI UN VAMPIRO SE HICIERA CIRCUNSTANCIALMENTE CON LA RECETA... ", + // 245 + "PUES NADA. OYE, \250A QUE ESTO PARECE UN PEGOTE PUESTO EN EL GUION PARA ACABAR PRONTO EL JUEGO? BUENO, A LO MEJOR NO", + "\255ESTA VACIO!", + "PORQUE ME ROBASTE MI AMOR, B.J. SIN ELLA LA VIDA PARA MI NO TIENE SENTIDO", + "\255\250SU CEREBRO?!", + "PUES NO ES POR NADA, PERO ME PARECE QUE ME HA CARGADO TU MONSTRUITO", + // 250 + "\255VIRGENCITA, QUE ME QUEDE COMO ESTOY!", + "\255NO TE SALDRAS CON LA TUYA. SEGURO QUE APARECE SUPERLOPEZ Y ME RESCATA!", + "VAYA UNA MIERDA DE JUEGO EN EL QUE MUERE EL PROTAGONISTA ", + "UN MOMENTO, \250QUE HAY DE MI ULTIMO DESEO?", + "\255JA, JA! AHORA ESTOY INMUNIZADO CONTRA TI MALDITO DEMONIO. ESTE CIGARRILLO ES UNA POCION ANTIVAMPIRICA QUE ME DIO VON BRAUN ", + // 255 + "SI, CLARO. PERO NUNCA CONSEGUIRAS QUE TE DIGA LA RECETA", + "PUEDO SOPORTAR LA TORTURA, ADEMAS DE CREARLA ", + "\255NO, POR FAVOR! \255HABLARE, PERO NO ME HAGA ESO!", + "BUENO. YA TE HE DICHO LO QUE QUERIAS SABER. AHORA LIBERANOS A B.J. Y A MI Y DEJANOS EN PAZ", + "\255B.J.! \250QUE HACES AQUI? \250DONDE ESTA DRASCULA?", + // 260 + "\255QUE DESALMADO! SOLO PORQUE PERTENECE A LA NOBLEZA SE CREE QUE TIENE EL DERECHO DE PERNADA CON CUALQUIERA QUE SE LE ANTOJE ", + "\255ABAJO LA ARISTOCRACIA CACIQUIL!", + "\255ARRIBA LOS POBRES DEL MUUNDOOO....", + "Y POR LO QUE VEO TE HA ENCADENADO CON CANDADO Y TODO", + "BUENO, VALE. \250NO TENDRAS UNA HORQUILLA?", + // 265 + "BUENO, BUENO. NO TE PONGAS ASI, YA SE ME OCURRIRA ALGO.", + "EH, TABERNERO", + "\250COMO VA EL PARTIDO?", + "\250QUIEN?", + "\250ES QUE NO VES QUE ESTA AQUI DRASCULA?", + // 270 + "PUES VAMOS A ACABAR CON EL \250NO?", + "PONME UN CUBATA...", + "NADA. SE ME HA OLVIDADO LO QUE TE IBA A DECIR", + "O\247ME\247PONES\247UN\247CUBATA\247O\247ME\247PONGO\247A\247TOCAR\247EL\247PIANO", + "\250CUANTO QUEDA PARA QUE ACABE EL PARTIDO?", + // 275 + "BUENAS NOCHES", + "\250Y QUE TAL ANDAS IGOR? \250JOROBAO? \255JI,JI,JI, QUE BUENO! ", + "\250QUE SE SUPONE QUE HACES?", + "PUES NO", + "PUES PONTE GAFAS", + // 280 + "\250QUE ES ESO DE LA ORGIA SOBRENATURAL?", + "VALE, VALE, NO SIGAS. YA ME HAGO UNA IDEA", + "\250NO PODRIAS DECIRME DONDE ESTA DRASCULA? ", + "ANDA, PORFAAA", + "\250POR QUE NO?", + // 285 + "AH, PERO \250DUERME POR LA NOCHE?", + "BUENO, PUES QUE SE DE BIEN LA RENTA", + "ES QUE TENGO QUE HABLAR CON EL", + "\255EOOO, ESQUELETOOO! ", + "\255CANASTOS! \255UN MUERTO QUE HABLA!", + // 290 + "CUENTAME, \250COMO HAS VENIDO A PARAR AQUI?", + "\250Y PARA QUE VA A QUERER DRASCULA CREAR UN MONSTRUO? ", + "\250CUAL ES TU NOMBRE, AMIGO ESQUELETO?", + "OYE, \250NO QUIERES QUE TE TRAIGA NADA DE COMER?", + "DEBES TENER EL ESTOMAGO VACIO. \255JI, JI, JI!", + // 295 + "LA VERDAD ES QUE NO ME APETECE HABLAR AHORA", + "\255LA MADRE QUE...(PITIDO) ESPERO QUE TE...(PITIDO) Y QUE TE...(PITIDO) DOS VECES!", + "YO LA QUERIA, DE VERDAD. VALE, DE ACUERDO QUE NO ERA UNA LUMBRERA, PERO NADIE ES PERFECTO \250NO? ", + "ADEMAS, TENIA UN CUERPAZO QUE PARA QUE QUEREMOS MAS", + "YA NO VOLVERE A SER EL MISMO. ME RECLUIRE EN UN MONASTERIO A DEJAR QUE MI VIDA SE ME ESCAPE POCO A POCO", + // 300 + "NADA PODRA YA SACARME DE ESTA MISERIA PORQUE...", + "\250DE QUIEN? \250DE QUIEN?", + "QUIERO SER PIRATA", + "QUIERO SER PROGRAMADOR ", + "CONTADME ALGO SOBRE PELAYO", + // 305 + "SEGUIRE JUGANDO Y OLVIDARE QUE OS HE VISTO ", + "\255A QUIEN SE LE HABRA OCURRIDO ESTA IDIOTEZ!", + "ES UN BOLSO COMO EL DE MI ABUELITA ", + "\255PERO QUE BUENO QUE ESTOY!", + "CUANTO MAS ME MIRO MAS ME GUSTO", + // 310 + "\250Y LUEGO COMO ME CIERRO?", + "TENDRE QUE ABRIRME PRIMERO \250NO?", + "ESTOY BIEN DONDE ESTOY", + "YA ME TENGO", + "HOLA YO", + // 315 + "ME LOS PONDRE CUANDO LA OCASION SEA OPORTUNA", + "NO VEO NADA EN ESPECIAL", + "ESTA BIEN DONDE ESTA", + "\250Y PA QUE?", + "NO PUEDO", + // 320 + "HOLA TU", + "ES EL PANTEON DEL TIO DESIDERIO", + "\255EOOOO, TIO DESIDERIOOOO!", + "NO. NO QUIERO CORTARME OTRA VEZ", + "\255EJEM,JEM...!", + // 325 + "\255YAMM, EMMM, JH!", + "\255SI, COF,COF!", + "ANDA, SI HAY UN CHICLE AQUI PEGADO", + "ES EL MOVILANI QUE ME REGALARON EN NAVIDAD", + "\255QUE ALTO ESTA!", + // 330 + "\255SAL AL BALCON JULIETA!", + "\255TU ERES LA LUZ QUE ILUMINA MI CAMINO!", + "EH,PUERTA \250QUE PASSA?", + "EOOO, MAQUINA DE TABACO DE TRANSILVANIAAA", + "ES UNA MAQUINA EXPENDEDORA DE TABACO", + // 335 + "TENGO OTRA MONEDA DENTRO", + "NO. HE DECIDIDO DEJAR EL TABACO Y EL ALCOHOL ", + "A PARTIR DE AHORA ME DEDICARE SOLO A LAS MUJERES ", + "\255ESTO ES UN TIMO! NO HA SALIDO NADA", + "\255POR FIN! ", + // 340 + "PUES ESO, UN BAUL", + "HOLA BAUL, TE LLAMAS COMO MI PRIMO QUE SE LLAMA RAUL.", + "HE ENCONTRADO EL BOLSO DE B.J.", + "DIOS MIO, NO ME REFLEJO \255SOY UN VAMPIRO!", + "...AH, NO. ES QUE ES UN DIBUJO", + // 345 + "ESPEJITO: \250QUIEN ES EL MAS BELLO DEL REINO?", + "NO ME QUIERE ABRIR", + "MUY BIEN. ME HE PUESTO LOS TAPONES", + "ES UN DIPLOMA DE CAZA-VAMPIROS HOMOLOGADO POR LA UNIVERSIDAD DE CAMBRIDGE", + "NO, AUN ME FALTAN INGREDIENTES, NO VALE LA PENA DESPERTARLE", + // 350 + "ES QUE NO TENGO DINERO", + "ES UNA LAMPARA BRITANICA", + "\255TABERNERO! \255AYUDEME!", + "HA APARECIDO UN VAMPIRO Y SE HA LLEVADO A MI NOVIA", + "\255\250PERO NO VA USTED A AYUDARME?!", + // 355 + "\250MUERTA? \250QUE ES LO QUE QUIERE DECIR?", + "\255EJEM!", + "\255UN VAMPIRO HA SECUESTRADO A LA CHICA DE LA 506!", + "\255TIENES QUE AYUDARME!", + "\250NO SABES TOCAR NINGUNA DE LOS INHUMANOS?", + // 360 + "\250COMO TE AGUANTAS, TODO EL DIA TOCANDO LO MISMO?", + "\250Y ENTONCES COMO ME OYES?", + "DEJAME LOS TAPONES", + "ANDA. SI TE LOS DEVUELVO ENSEGUIDA", + "VENGAAAA...", + // 365 + "ADIOS. TENGO QUE MATAR A UN VAMPIRO", + "", + "\250QUE HABLAS? \250EN TRANSILVANO?", + "\250QUIEN ES EL TIO DESIDERIO?", + "\250PERO QUE PASA CON ESE TAL DRASCULA?", + // 370 + "\250QUIEN ES ESE TAL VON BRAUN?", + "\250Y POR QUE NO LO HACE?", + "\250Y DONDE PUEDO ENCONTRAR A VON BRAUN?", + "PUES GRACIAS Y ADIOS, QUE LA DUERMAS BIEN", + "SERA MEJOR LLAMAR PRIMERO", + // 375 + "\250ES USTED EL PROFESOR VON BRAUN?", + "\250Y NO ME PODRIA DECIR DONDE PUEDO...?", + "NO ME CREO QUE SEA EL ENANO GANIMEDES", + "\255PROFESOR!", + "\255AYUDEME! \255LA VIDA DE MI AMADA DEPENDE DE USTED!", + // 380 + "ESTA BIEN, NO NECESITO SU AYUDA", + "DE ACUERDO. ME VOY", + "NO TENGA MIEDO. JUNTOS VENCEREMOS A DRASCULA", + "ENTONCES \250POR QUE NO ME AYUDA?", + "YO LAS TENGO", + // 385 + "\255SI LAS TENGO!", + "DE ACUERDO", + "...ER ...SI", + "VENGO A METERME EN ESA CABINA DE NUEVO", + "ESTOY PREPARADO PARA ENFRENTARME A SU PRUEBA", + // 390 + "ESTA BIEN, VEJETE. HE VENIDO A POR MI DINERO", + "NO, NADA. YA ME IBA", + "PERDONA", + "\250TE INTERESA ESTE LIBRO? TIENE PARTITURAS DE TCHAIKOWSKY", + "\250COMO PUEDO MATAR A UN VAMPIRO?", + // 395 + "\250NO TE HAN DICHO QUE ES MALO DORMIR EN MALA POSTURA?", + "PUES ES LO QUE SIEMPRE ME DICE A MI MI MADRE", + "\250POR QUE NO TE PUDO MATAR DRASCULA?", + "\250Y QUE FUE?", + "\255ESTUPENDO! \255TIENE USTED UNA POCION DE INMUNID...!", + // 400 + "\250ENTONCES?", + "MUY BIEN", + "\250ME PUEDE REPETIR LO QUE NECESITO PARA ESA POCION?", + "PUES PARTO RAUDO A BUSCARLO", + "OIGA, \250QUE HA PASADO CON EL PIANISTA?", + // 405 + "YA\247TENGO\247TODOS\247LOS\247INGREDIENTES\247DE\247ESA\247POCION", + "UNA PREGUNTA: \250QUE ES ESO DE ALUCSARD ETEREUM?", + "DIGA, DIGA... ", + "\250Y DONDE ESTA ESA GRUTA?", + "\250QUE PASA? \250NO TENIAIS JUZGADO?", + // 410 + "...PERO ...\250Y SI ME ENCUENTRO A MAS VAMPIROS?", + "ES UN VAMPIRO QUE NO ME DEJA PASAR", + "SE PARECE A YODA, PERO MAS ALTO ", + "EH, YODA. SI ME DEJAS PASAR TE DOY UN DURO", + "BUENO VALE, QUE NO SE TE PUEDE DECIR NADA", + // 415 + "HOLA VAMPIRO, BONITA NOCHE \250VERDAD?", + "\250TE HAN DICHO ALGUNA VEZ QUE TE PARECES A YODA?", + "\250ERES UN VAMPIRO O UNA PINTURA AL OLEO?", + "MEJOR NO TE DIGO NADA, NO TE VAYAS A ENFADAR", + "ESTA CERRADA CON LLAVE", + // 420 + "\255LA URRACA ME PODRIA SACAR UN OJO SI LO INTENTO!", + "\255ESTA CERRADA! \255DIOS MIO, QUE MIEDO!", + "LAS BISAGRAS ESTAN OXIDADAS", + "AQUI DENTRO SOLO HAY UN BOTE CON HARINA", + "ESO HA QUITADO EL OXIDO", + // 425 + "HE ENCONTRADO UNA ESTACA DE PINO", + "COGERE ESTE QUE ES MAS GORDO", + "BUENO, CREO QUE YA PUEDO DESHACERME DE ESTE ESTUPIDO DISFRAZ", + "\"PASADIZO A LOS TORREONES CERRADO POR OBRAS. POR FAVOR, UTILICEN ENTRADA PRINCIPAL. DISCULPEN LAS MOLESTIAS\"", + "...ES PALIDO, TIENE COLMILLOS, TIENE TUPE Y USA CAPA... \255SEGURO QUE ES DRASCULA!", + // 430 + "\255ES B.J.! B.J. \250ESTAS BIEN?", + "SI, YA LO SE QUE ES TONTA, PERO ES QUE ESTOY DE SOLO", + "NO TENDRAS UNA LLAVE POR AHI, \250VERDAD? ", + "\250A QUE NO TIENES UNA GANZUA?", + "DAME UNA HORQUILLA. VOY A HACER COMO MCGYVER", + // 435 + "NO TE MUEVAS QUE AHORA VUELVO", + "\255CACHIS! \255SE ME HA ROTO!", + "\255OLEEEE! \255Y ADEMAS ME HE AFEITADO, COLEGA!", + "\250SI, CARI\245O?", + "NO LLEGA", + // 440 + "EL PIANISTA NO ESTA", + "UN CUBATA TRANSILVANO", + "AUN NO TENGO HABITACION", + "PARECE QUE SE QUEDO ATASCADO EN LA BA\245ERA Y DECIDIO PONER UN BAR", + "ESTA COMO UNA CUBA DE CUBA", + // 445 + "ESE PELO... EL CASO ES QUE ME RECUERDA A ALGUIEN", + "ES UN ESQUELETO HUESUDO", + "\255MIRA! \255MIGUEL BOSE!", + "ESTA DURMIENDO. SERIA UNA PENA DESPERTARLE", + "ES MAS FEO QUE EMILIO DE PAZ ", + // 450 + "UN ATAUD DE MADERA DE PINO", + "ME VA A CORTAR EN RODAJITAS, COMO A UN SALCHICHON", + "NO ME GUSTAN LOS PENDULOS. PREFIERO LAS ALCACHOFAS", + "MIS MANOS ESTAN ESPOSADAS. NO VOY A PODER", + "SALTA A LA VISTA QUE ES UNA PUERTA SECRETA", + // 455 + "ME IGNORAN", + "\255ANDA YA!", + "EN EL GUION SE MOVIA, PERO EL JUEGO SE SALIO DE PRESUPUESTO Y NO PUDIERON PAGARME UN GIMNASIO PARA PONERME CACHAS, ASI QUE NADA", + "PARECE QUE ESTA UN POCO SUELTA DE LA PARED", + "NO CREO QUE ME VAYA A SERVIR DE NADA. ESTA DEMASIADO HUMEDA PARA ENCENDERLA", + // 460 + "\250AL ALA OESTE? \255NI LOCO! \255A SABER QUE HABRA ALLI!", + "TIENE BONITOS MOTIVOS TRANSILVANOS ", + "", + "QUE PENA QUE AHI DENTRO NO HAYA UN CORDERITO ASANDOSE ", + "LA ULTIMA VEZ QUE ABRI UN HORNO LA CASA SALTO POR LOS AIRES", + // 465 + "ES EL ESCUDO DEL EQUIPO DE FUTBOL DE TRANSILVANIA", + "\250Y PARA QUE? \250PARA PONERMELA EN LA CABEZA?", + "NO CREO QUE ESTOS CAJONES SEAN DE LOS QUE SE ABREN", + "\255NO QUIERO SABER LA COMIDA QUE HABRA AHI DENTRO!", + "ME DA LA IMPRESION DE QUE ES IMPRESIONISTA", + // 470 + "LA NOCHE SE APODERA DE TODOS... QUE MIEDO \250NO?", + "ESTA ATRANCADA", + "ES EL REY \250ES QUE NO TE LO HABIAS IMAGINADO?", + "NO, YA TENGO UNO EN MI CASA, AL QUE LE DOY DE COMER Y TODO", + "UNA ESTANTERIA CON LIBROS Y OTRAS COSAS ", + // 475 + "\250Y A QUIEN LLAMO A ESTAS HORAS?", + "\"COMO HACER LA DECLARACION DE LA RENTA\" \255QUE INTERESANTE!", + "YA TENGO UNO EN MI CASA. CREO QUE ES UN BEST-SELLER MUNDIAL ", + "UNA LLAVE COMPLETAMENTE NORMAL", + "ME PARECE A MI QUE ESTA NO ES DE AQUI", + // 480 + "\255EH, SON PATATAS FRITAS CON FORMA DE COLMILLO! ME ENCANTA", + "NO CREO QUE SEA EL MEJOR MOMENTO DE PONERSE A COMER CHUCHERIAS, CON MI NOVIA EN MANOS DEL SER MAS MALVADO QUE HA PARIDO MADRE", + "\255QUE BIEN ME LO ESTOY PASANDO CARGANDOME VAMPIROS CON ESTO!", + "A VER SI APARECE OTRO PRONTO", + "NO, TIENE QUE SER CON UN VAMPIRO SUCIO Y MALOLIENTE COMO EL QUE ME CARGUE ANTES", + // 485 + "ES LA AUTENTICA PELUCA QUE USO ELVIS CUANDO SE QUEDO CALVO", + "ES HARINA, PERO NO PUEDO DECIR MARCAS", + "QUIZA EN OTRO MOMENTO \250VALE?", + "ES UN HACHA MAGNIFICA, QUE PENA QUE NO HAYA POR AQUI CERCA NINGUNA CABEZA DE VAMPIRO", + "NO. EN EL FONDO SOY BUENA PERSONA", + // 490 + "ES EL DESODORANTE DE LA TACHER \255JI,JI,JI!", + "ES UNA CAPA BASTANTE MONA", + "", + "COMO TODAS LAS RAMAS DE TODOS LOS ARBOLES DE TODO EL MUNDO, O SEA, SIN NADA DE PARTICULAR", + "\255OH, INCREIBLE! \255UNA CUERDA EN UNA AVENTURA GRAFICA!", + // 495 + "ME PREGUNTO PARA QUE SERVIRA...", + "UNA CUERDA ATADA A UNA RAMA O UNA RAMA ATADA A UNA CUERDA, SEGUN SE MIRE", + "PARECE QUE ESTA URRACA TIENE MUY MALAS INTENCIONES", + "QUITA, YO NO LA DIGO NADA, A VER SI SE VA A ENFADAR", + "PARECE QUE ESTA MUERTA, PERO ES MENTIRA \250EH?", + // 500 + "NINGUN ANIMAL DA\245ADO EN LA PRODUCCION DE ESTE JUEGO", +}, +{ + // 0 + "", + "Das ist die zweitgroesste Tuer, die ich je gesehen habe !", + "Ok, stimmt nicht ganz....", + "Sie haben Bretter davorgenagelt. Die Kirche scheint seit Jahren leer zu stehen", + "Aber ich habe sie doch nicht aufgemacht!", + // 5 + "Soll ich sie aufbrechen ?", + "Hallo Tuer! Ich verpasse Dir jetzt mal einen Rahmen!", + "Zuviel fuer mich !", + "ein zugenageltes Fenster", + "Ich schaff\357es nicht!", + // 10 + "Schon geschafft!", + "Und wozu?", + "Hallo Fenster. Hast Du heute abend schon was vor?", + "Nicht ohne Genehmigung der Staedtischen Baubehoerde", + "hey! Das Fenster da hat nur EIN Brett...", + // 15 + "Heyhooo! Fenster!", + "Hallo Du", + "", + "Ich komme nicht dran!", + "Gut so ! ", + // 20 + "", + "Es ist ein Grabstein in Form eines Kreuzes.", + "Nein, danke", + "Hallo Toter. Willst Du ein paar Wuermchen?", + "Klar Mann ! Wie in Poltergeist.", + // 25 + "", + "", + "Bin in einer Viertelstunde zurueck!", + "Plakate ankleben verboten", + "", + // 30 + "Sie ist abgeschlossen.", + "Ich habe schon eins.", + "", + "Keine Reaktion !", + "Nein, da steht es gut !", + // 35 + "Es ist eine Tuer", + "Eine Schublade vom Tisch", + "Ein verdaechtiger Schrank", + "Hallo Schrank. Alles klar?", + "", + // 40 + "", + "Ein uralter Kerzenstaender", + "Der stammt wohl noch aus der Zeit als meine Ururururoma in den Kindergarten ging ", + "Nein, eine Reliquie aus vergangenen Zeiten", + "Es ist ein huebsches Altarbild", + // 45 + "", + "Hi,hi,hi", + "", + "Nein.", + "", + // 50 + "Ha,ha,ha! klasse!", + "", + "", + "", + "Ich sehe nichts besonderes", + // 55 + "Freddy, die Topfblume", + "Eine Spitze aus dem Jaegerzaun", + "Ej! Hier unten liegt eine Streichholzschachtel!", + "Guck mal! Eine Packung Tempos! Und eins sogar ungebraucht!", + "Sonst ist nichts mehr im Eimer", + // 60 + "Ein Blinder der nichts sieht", + "", + "", + "", + "", + // 65 + "Ein Wahnsinnsbatzen Geld.", + "", + "", + "", + "", + // 70 + "", + "", + "", + "", + "", + // 75 + "", + "", + "", + "", + "", + // 80 + "", + "", + "", + "", + "", + // 85 + "", + "", + "", + "", + "", + // 90 + "", + "", + "", + "", + "", + // 95 + "", + "", + "", + "", + "", + // 100 + "SIEHT NICHT UNGEWoeHNLICH AUS", + "SIEHT NICHT AUSSERGEWoeHNLICH AUS", + "EJ DU, WAS IST LOS?", + "HALLO", + "NICHTS NEUES?", + // 105 + "WIE GEHTS DER FAMILIE?", + "WAS DU FueR SACHEN HAST !", + "ABER WIE SOLLTE ICH DAS AUFHEBEN ?", + "MEINE RELIGION VERBIETET MIR DAS", + "BESSER NICHT", + // 110 + "KLAR MANN!", + "DU SPINNST WOHL !", + "UNMoeGLICH", + "GEHT NICHT AUF !", + "ALLEINE SCHAFFE ICH DAS NICHT", + // 115 + "WENN ICH WOLLTE, KoeNNTE ICH, ABER ICH HABE KEINE LUST", + "ICH WueSSTE NICHT WARUM", + "EIN SCHaeDEL, DER GUT DRAUF IST", + "UND? SCHON WAS VOR HEUTE ABEND, SCHaeDEL?", + "NEIN, ER MUSS AN EINEM KueHLEN ORT GELAGERT WERDEN, FERN DER ZERSToeRERISCHEN KRAFT DER ATMOSPHaeRE", + // 120 + "KNOCHENTROCKEN, WIE MEIN CHEF!", + "EIN SEHR SPITZER PFLOCK", + "GUTER SPITZER PFLOHOCK, HOLZ SO EDEL, TRANSSYLVAAANISCH!!!", + "OH VERDAMMT, ICH MUSS MIR DIE NaeGEL SCHNEIDEN !", + "DA DRINNEN LIEGT B.J., UND GUCK MAL WIE DIE TANTE AUSSIEHT !", + // 125 + "NIET UND NAGELFEST", + " \"NIET & NAGEL GmbH & Co. KG\"", + "DAS TYPISCHE SKELETT IM TYPISCHEN VERLIESS EINES TYPISCHEN SPIELS", + "WIRD NORMALERWEISE ZUR STROMVERSORGUNG ALLER EINGESToePSELTEN GERaeTE VERWENDET", + "TOTALES KUNSTHANDWERK, WEIL SIE DANK DEN JAPANERN KLEINE MINIATUREN SIND", + // 130 + "ES GIBT NUR EINS, WAS GENAUSO HaeSSLICH IST", + "HAU AB. ICH SAG IHM GAR NICHTS. MAL GUCKEN OB ER AUSFLIPPT", + "SCHEINT ZIEMLICH VERNueNFTIG ZU SEIN", + "EIN FOTO VON PLATON WIE ER SEINEN VERLORENEN DIALOG SCHREIBT", + "SEH ICH SO AUS ALS OB ICH MIT POSTERN REDE ? !", + // 135 + "EIN HueBSCHER SCHREIBTISCH", + "EIN VON DER UNIVERSITaeT ZU OXFORD AUSGESTELLTES VAMPIR-JaeGER-JaeGER-DIPLOM", + "VOLLMOND IN FINSTERSTER NACHT", + "DIESE SCHRAUBEN SCHEINEN ZIEMLICH FEST ZU SITZEN", + "GUCK JETZT NICHT HIN, ABER ICH GLAUBE HIER GIBT ES EINE VERSTECKTE KAMERA", + // 140 + "EIN ULTRAMODERNER PFLOCK-DETEKTOR", + "NEIN, DAS LABOR IST IM ZWEITEN STOCK", + "EIN HueBSCHES NACHTTISCHCHEN ", + "EIN BATZEN GELD DER BEI EINEM WIRKLICH GUTEN ABENTEUER NICHT FEHLEN DARF", + "WENN ICH REICH WaeRE, SCHUBIDUBISCHUBIDUBUDU ", + // 145 + "KOMISCHE BLaeTTER, DIE WERDEN SIE WOHL AUS SueDAMERIKA ODER SO MITGEBRACHT HABEN .", + "ICH GLAUBE NICHT, DASS SIE ANTWORTEN WERDEN", + "EIN SCHoeNES HOLZKRUZIFIX. DEM HELDEN SIND DIE AUSMASSE SEI-NER SCHoeNHEIT NICHT GANZ KLAR.", + "ICH BETE NUR VOR DEM ZU-BETT-GEHEN", + "EJ, ICH GLAUBE, DIE SPITZE HIER IST EIN BISSCHEN LOSE !", + // 150 + "UND NACHHER BESCHWERST DU DICH, ICH HaeTTE DIR KEINEN WINK GEGEBEN !", + "EINE STINKNORMALE ZAUNSPITZE", + "NIEDLICH, OBWOHL SIE EIN BISSCHEN VERDRECKT SIND", + "SIE WERDEN MICH NICHT HoeREN, HI,HI,HI, SUPERGUT !", + "DIE SCHoeNE SCHLAFENDE AUS DEM WALDE VON TSCHAIKOWSKY ODER TSCHESLOFSKY ODER WIE DER HEISST.", + // 155 + "SEHR APPETITLICH", + "NEIN, SEHE ICH SO AUS, ALS WueRDE ICH BENUTZTE KAUGUMMIS KAUEN ?", + "EINE NIEDLICHE SICHEL. ICH WueSSTE NUR GERNE WO DER HAMMER IST.", + "DER GESUNDHEITSMINISTER WARNT : RAUCHEN GEFaeHRDET IHRE GESUNDHEIT", + "EINE GANZ NORMALE KERZE, MIT WACHS UND ALLEM DRUM UND DRAN", + // 160 + "MAN MUSS ECHT MAL GESEHEN HABEN WIE DIESE 2 GLaeNZENDEN MueNZEN GLaeNZEN", + "MAN MUSS ECHT GESEHEN HABEN WIE DIESE GLaeNZENDE MueNZE GLaeNZT !", + "DAMIT WERDE ICH GEGEN VAMPIRBISSE IMMUN SEIN.", + "NEIN,ES IST NOCH NICHT SO WEIT", + "EIN TAUSENDER UND EIN BISSCHEN KLEINGELD", + // 165 + "DA STEHT\"DEN KLAVIERSPIELER BITTE NICHT MIT LEBENSMITTELN BEWERFEN", + "CURRYWURST 3.80. POMMES FRITES 2.30., FRIKADELLEN 1.50", + "DIE BESTEN HAMBURGER DIESSEITS DER DONAU FueR NUR 3.80 DM", + "EIN SCHoeNER TOTENKOPF MIT EINEM ZIEMLICH DURCHDRINGENDEN BLICK, HI, HI, SUPERGUT !", + "HALLO TOTENKOPF, DU ERINNERST MICH AN HAMLETS ONKEL !", + // 170 + "ICH HABE DIE ANGEWOHNHEIT, NICHTS ANZUFASSEN, WAS MAL LEBENDIG GEWESEN IST", + "EIN PAPIERKORB", + "SIE WETTEN, WIE DAS SPIEL HEUTE ABEND AUSGEHT", + "WAS SICH WOHL DAHINTER VERBERGEN MAG", + "EJ, DIESER VORHANG BEWEGT SICH NICHT !", + // 175 + "GANZ SCHoeN GRUSELIG, DAS SCHLOSS DA, WAS ?", + "ICH SCHAFFS NICHT, ER IST ZU WEIT WEG, UM MICH ZU HoeREN", + "EIN TYPISCH TRANSSYLVANISCHER WALD, MIT BaeUMEN UND SO", + "RED KEINEN BLoeDSINN, ES IST DOCH STOCKDUNKEL!", + "KONDITOREI MueLLER. GEBaeCK UND KAUGUMMIS", + // 180 + "EINE SEHR SCHoeNE TueR", + "GESCHLOSSEN", + "EINE TOTAL GESCHLOSSENE TONNE", + "", + "WAS FueR SueSSE VIECHER !", + // 185 + "PSSS,PSSS,PSSS,MIETZCHEN...", + "KEINE REAKTION", + "DER MOND IST EIN SATELLIT DER DIE ERDE IN EINER UMLAUFGESCHWINDIGKEIT VON 28 TAGEN UMKREIST.", + "HALLO MOND DU KREISRUNDES MONDGESICHT", + "TOTAL MIT BRETTERN ZUGENAGELT", + // 190 + "NICHTS ZU MACHEN. HIER KOMMT NOCH NICHT MAL ARNOLD S. MIT DER KREISSaeGE DURCH", + "SCHEINT SO, ALS HaeTTE DIE TANNE DA EINEN ueBERDIMENSIONALEN SCHATTEN !", + "HEHOO, WIRT !", + "SIND NOCH ZIMMER FREI ?", + "KoeNNEN SIE MIR SAGEN WO ICH EINEN GEWISSEN GRAF DRASCULA FINDE ?", + // 195 + "JA, WAS GIBTS ?", + "UND WIESO ?", + "WW...WIRKLICH ?", + "GUTE FRAGE, ICH WERDE IHNEN MAL MEINE STORY ERZaeHLEN, ALSO...", + "NUR FueNF MINUTEN !", + // 200 + "ICH HEISSE HEINZ HACKER UND BIN VERTRETER EINER NORDDEUTSCHEN IMMOBILIENFIRMA", + "SO WIES AUSSIEHT WILL GRAF DRASCULA EINIGE HEKTAR LAND AUF HELGOLAND KAUFEN UND ICH BIN HIER UM ueBER DIE PREISE ZU VERHANDELN", + "MMMMH, ICH GLAUBE DASS ICH MORGEN FRueH MIT MEINER MAMI ZURueCKKOMME", + "WAS FueR EINE NACHT, NICHT WAHR ?", + "NICHTS, SCHON GUT", + // 205 + "HEEHOOO, KLAVIERSPIELER", + "WAS FueR EINE NACHT", + "UND ES IST AUCH GAR NICHT SO KALT", + "NUN GUT, ICH LASS DICH JETZT MAL IN RUHE WEITERSPIELEN", + "GENAU", + // 210 + "HALLO CHEF, ALLES KLAR ?", + "UND DIE FAMILIE ?", + "HIER IST MaeCHTIG WAS LOS, WAS ?", + "ICH HALTE BESSER MEINEN MUND", + "ZU HAUSE IST ES IMMER NOCH AM SCHoeNSTEN...ZU HAUSE IST ES IMMER....Hae ? ABER SIE SIND DOCH NICHT TANTA ENMA. WO ICH DOCH GAR KEINE TANTE EMMA HABE !", + // 215 + "JA, MEINER AUCH. SIE KoeNNEN MICH NENNEN WIE SIE WOLLEN, ICH HoeRE SELBST AUF HEINZCHEN WIE AUF KOMMANDO.", + "JA, ICH HAB GANZ SCHoeNE BEULEN, WAS ? ueBRIGENS, WO BIN ICH ?", + "JA", + "VERDAMMT.....", + "JA, KLAR, SELBSTVERSTaeNDLICH !", + // 220 + "DANN ALSO VIELEN DANk FueR DEINE HILFE. ICH WERDE DICH NICHT WEITER BELaeSTIGEN. WENN DU MIR BITTE NOCH SAGEN WueRDEST, WO DIE TueR IST.... ", + "WEIL DIE BEULE WOHL MEIN GEHIRN ANGEGRIFFEN HAT UND ICH EINFACH ueBERHAUPT NICHTS SEHE", + "PAH, MACHT NICHTS. ICH HABE IMMER ERSATZ DABEI", + "WOW, WAS FueR EIN SCHARFES WEIB ! OHNE BRILLE HABE ICH DAS GAR NICHT BEMERKT !", + "EJ, DU....", + // 225 + "UND WAS IST DAAAAAS ? !", + "MACH DIR KEINE SORGEN, BJ, MEINE GELIEBTE !ICH WERDE DICH AUS SEINEN KLAUEN BEFREIEN", + "ACH KOMM, ER HAT MICH AUF DIE PALME GEBRACHT", + "UUAAA, EIN WERWOLF ! KREPIER, DU MONSTER !", + "JA, DAS.... ", + // 230 + "JA, DAS.... ICH GLAUB, ICH GEH DANN MAL WEITER, MIT VERLAUB...", + "WAS?", + "WENN ICHS MIR RECHT ueBERLEGE, UM EHRLICH ZU SEIN, ICH GLAUBE NEIN ", + "SAG MIR OH GEBILDETER PHILOSOPH, GIBT ES IRGENDEINEN KAUSALZUSAMMENHANG ZWISCHEN DER LICHTGESCHWINDIGKEIT und SCHINKENSPECK", + "OKAY,OKAY,VERGISS ES. ICH WEISS JEDENFALLS NICHT, WARUM ICH DAS GESAGT HABE", + // 235 + "WAS PHILOSOPHIERST DU HIER HERUM, WO DU DOCH MENSCHEN FRESSEN MueSSTEST!", + "HaeH", + "EJ, KANNST DU DAS MIT DEN PRaeHISTORISCHEN NEIGUNGEN NOCHMAL ERKLaeREN ?", + "JA, MANN. DER KRAM MIT DEM DU MIR EBEN GEKOMMEN BIST. ICH HAB DAS NaeMLICH NICHT GANZ KAPIERT....", + "ICH HALTE BESSER MEINEN MUND, WEIL SOBALD ER BLUT RIECHT...", + // 240 + "JA, BITTE ?", + "JA, WAS GIBTS ?", + "ACH, WO SIES GERADE ERWaeHNEN,....", + "", + "ueBRIGENS, WAS WueRDE EIGENTLICH PASSIEREN, WENN DAS REZEPT ZUFaeLLIG IN DIE HaeNDE EINES VAMPIRS GERATEN WueRDE...", + // 245 + "NA WAS SOLLS. HoeR MAL, KOMMT DIR DAS NICHT AUCH WIE EIN DaeMLICHER KLEINER TRICK VOR, UM DAS SPIEL SCHNELL ZU BEENDEN ? NAJA, VIELLEICHT AUCH NICHT", + "LEER !", + "WEIL DU MIR B.J., MEINE GELIEBTE, GERAUBT HAST. OHNE SIE HAT MEIN LEBEN KEINEN SINN.", + "SEIN GEHIRN ?", + "OCH, NUR SO! ICH GLAUBE DASS ICH GENUG VON DEM KLEINEN MONSTERCHEN HABE", + // 250 + "SueSSE KLEINE JUNGFRAU, ICH BLEIB SO WIE ICH BIN !", + "DAMIT KOMMST DU NICHT DURCH.. GLEICH KOMMT POPEYE UND HOLT MICH HIER RAUS !", + "WAS FueR EIN SCHEISS-SPIEL, BEI DEM DEM DER HELD STERBEN MUSS", + "HALT ! WAS IST MIT MEINEM LETZTEN WUNSCH ?", + "HAR,HAR ! JETZT BIN ICH IMMUN GEGEN DEIN VERFLUCHTES UNGEHEUER. DAS HIER IST EINE ANTI-VAMPIR-ZIGARETTE,DIE MIR VON BRAUN GEGEBEN HAT.", + // 255 + "JA, KLAR. ABER ICH WERDE DIR BESTIMMT NICHT DAS REZEPT VERRATEN", + "MIT FOLTER KOMM ICH GUT KLAR, ICH DENK MIR SOGAR WELCHE AUS", + "NEIN, BITTE NICHT ! ICH SAG ALLES, ABER TUN SIE MIR DAS NICHT AN !", + "O.K. ICH HAB DIR ALLES ERZaeHLT. JETZT HOL B.J. UND MICH ENDLICH HIER RAUS UND LASS UNS IN RUHE", + "B.J. !WAS MACHST DU HIER ?WO IST DRASCULA ?", + // 260 + "WAS FueR EIN MIESER TYP ! NUR WEIL ER BLAUES BLUT HAT, MueSSEN IHM NOCH LANGE NICHT ALLE JUNGFRAUEN DIESER ERDE ZU FueSSEN LIEGEN", + "NIEDER MIT DEM BONZEN-ADEL !", + "SOLIDARITaeT MIT ALLEN ARMEN DIESER WELT... !", + "UND WIES AUSSIEHT HAT ER DICH NACH ALLEN REGELN DER KUNST ANGEKETTET", + "O.K. DU HAST NICHT ZUFaeLLIG EINE HAARSPANGE ?", + // 265 + "NANANA. STELL DICH NICHT SO AN . MIR FaeLLT SCHON WAS EIN.", + "HE, WIRT", + "WER GEWINNT ?", + "WER ?", + "SIEHST DU DENN NICHT, DASS HIER DRASCULA IST ?", + // 270 + "NA, DANN LASS IHN UNS ALLE MACHEN, ODER ?", + "GIB MIR EINEN GIN-TONIC", + "SCHON GUT. ICH HAB VERGESSEN, WAS ICH DIR SAGEN WOLLTE", + "GIB\247MIR\247SOFORT\247EINEN\247GIN\247TONIC\247ODER\247ICH\247SPIEL\247KLAVIER", + "WIELANGE DAUERT DAS SPIEL NOCH ?", + // 275 + "GUTE NACHT", + "UND WIE KOMMST DU VORAN, IGOR ? SCHLEPPEND ? HI,HI,HI, KLASSE !", + "WAS SOLL DAS SEIN, WAS DU DA MACHST?", + "NEIN", + "DANN ZIEH DIE BRILLE AUF", + // 280 + "WAS SOLL DAS MIT DER ueBERNATueRLICHEN ORGIE ?", + "O.K. ES REICHT. ICH KANN ES MIR SCHON VORSTELLEN", + "KoeNNTEST DU MIR NICHT ZUFaeLLIG SAGEN, WO DRASCULA IST ?", + "ACH KOMM, BITTE, BITTE!", + "WARUM NICHT ?", + // 285 + "ACH :NACHTS SCHLaeFT ER ?", + "NA, HOFFENTLICH KLAPPT DAS MIT DER EINKOMMENSERKLaeRUNG", + "ICH MUSS NaeMLICH MIT IHM REDEN", + "HEYHOO, GERIPPE !", + "VERDAMMT ! EIN SPRECHENDER TOTER !", + // 290 + "ERaeHL MAL WIESO HAST DU HIER ANGEHALTEN ?", + "UND WOZU SOLLTE DRASCULA EIN MONSTER SCHAFFEN WOLLEN ?", + "WIE HEISST DU, LIEBES GERIPPE ?", + "EJ, SOLL ICH DIR NICHT VIELLEICHT WAS ZU ESSEN BRINGEN ?", + "DU HAST DOCH BESTIMMT EINEN LEEREN MAGEN, HI,HI,HI !", + // 295 + "ICH HABE GERADE EINFACH KEINEN BOCK, ZU REDEN", + "FI........(BIEP) DICH DOCH IN DEIN BEFI.......(BIEP) KNIE, DU ALTER WI......(BIEP) !", + "ICH HABE SIE WIRKLICH GELIEBT, NAJA, GUT, SIe WAR WIRKLICH NICHT DIE HELLSTE VON OSRAM, ABER NOBODY IS PERFECT, STIMMTS ?", + "HEY SIE HATTE EINE WAHNSINNSFIGUR, UND WAS WILLST DU MEHR", + "NICHTS WIRD MEHR WIE VORHER SEIN. ICH WERDE INS KLOSTER GEHEN UND ELENDIGLICH DAHINSIECHEN.", + // 300 + "HIER KANN MICH NICHTS UND NIEMAND MEHR RAUSHOLEN, WEIL...", + "VON WEM ? VON WEM ?", + "ICH MoeCHTE PIRAT WERDEN !", + "ICH MoeCHTE PROGRAMMIERER WERDEN !", + "ERZaeHL MIR ETWAS ueBER SIEGFRIED UND DIE NIBELUNGEN", + // 305 + "ICH HAB EUCH NIE GESEHEN UND SPIEL JETZT EINFACH WEITER", + "WER HAT SICH DENN DIESEN SCHWACHSINN EINFALLEN LASSEN ?", + "EINE HANDTASCHE, WIE SIE MEINE OMI HAT", + "OH MANN, WIE GUT ICH AUSSEHE ! ", + "ICH KoeNNTE MICH GLATT IN MICH VERLIEBEN !", + // 310 + "UND WIE SOLL ICH MICH ABSCHLIESSEN ?", + "ICH WERDE MICH WOHL ERSTMAL AUFSCHLIESSEN MueSSEN, WAS ?", + "HIER STEH ICH GUT", + "HAB MICH SCHON", + "HALLO ICH", + // 315 + "BEI PASSENDER GELEGENHEIT WERDE ICH SIE MIR MAL REINTUN", + "ICH SEHE NICHTS BESONDERES", + "GUT SO", + "UND WIESOOO ?", + "ICH KANN NICHT", + // 320 + "HALLO DU DA", + "DIE GRUFT VON ONKEL DESIDERIUS", + "HAAALLO, ONKEL DESIDEERIUUS !", + "NEIN, ICH WILL MICH NICHT SCHON WIEDER SCHNEIDEN", + "aeHEM,MMM... !", + // 325 + "MMMM, LECKER,UaeaeHH !", + "JA, HUST,HUST !", + "HEY, GUCK MAL, HIER KLEBT EIN KAUGUMMI", + "DAS SUPERHANDILY DAS ICH ZU WEIHNACHTEN BEKOMMEN HABE", + "GANZ SCHoeN HOCH", + // 330 + "TRITT AUF DEN BALKON, JULIA !", + "DU BIST DER STERN AN MEINEM FIRMAMENT !", + "EJ, TueR, WAS ISS LOSS ?", + "HEYHOO, TRANSSYLVANISCHES ZIGARRETTENAUTOMaeTCHEN !", + "EIN ZIGARRETTENSPENDERMASCHINCHEN", + // 335 + "ICH HAB DA NOCHNE MueNZE DRIN", + "NEIN, ICH RAUCHE UND TRINKE NICHT MEHR", + "VON JETZT AN WERDE ICH MICH NUR NOCH DEN FRAUEN WIDMEN", + "BETRUG ! ES IST GAR NICHTS RAUSGEKOMMEN !", + "ENDLICH !", + // 340 + "EINE TRUHE, WEITER NICHTS", + "HALLO TRUHE, DU HEISST WIE MEINE TANTE TRUDE", + "ICH HABE DIE TASCHE VON B.J. GEFUNDEN", + "MEIN GOTT, ICH SEH MICH NICHT IM SPIEGEL, ICH BIN EIN VAMPIR !", + "....ACH, NEE. ES IST NUR EIN GEMaeLDE", + // 345 + "SPIEGLEIN, SPIEGLEIN AN DER WAND, WER IST DER SCHoeNSTE Im GANZEN LAND ?", + "ER MACHT MIR NICHT AUF", + "GUT. ICH HABE DIE OHRENSToePSEL DRIN", + "EIN VON DER UNIVERSITaeT ZU CAMBRIDGE AUSGESTELLTES VAMPIR-JaeGER DIPLOM.", + "NEIN, MIR FEHLEN NOCH EINIGE ZUTATEN, ES LOHNT SICH NICHT, IHN ZU WECKEN !", + // 350 + "ICH HABE NaeMLICH KEIN GELD", + "EINE NORDDEUTSCHE LAMPE", + "WIRT! HELFEN SIE MIR !", + "DA STAND PLoeTZLICH EIN VAMPIR UND HAT MEINE FREUNDIN MITGENOMMEN.", + "ABER WOLLEN SIE MIR DENN NICHT HELFEN ?", + // 355 + "TOT? WAS WOLLEN SIE DAMIT SAGEN ?", + "aeHEM !", + "EIN VAMPIR HAT DAS MaeDEL VON 506 ENTFueHRT !", + "DU MUSST MIR HELFEN !", + "KANNST DU KEIN BEERDIGUNGSLIED SPIELEN ?", + // 360 + "WIE HaeLST DU DAS BLOSS AUS : JEDEN TAG DIE GLEICHEN LIEDER", + "AHA, UND WIE HoeRST DU MICH DANN ?", + "GIB MIR DIE OHRENSToePSEL", + "ACH KOMM, ICH GEB SIE DIR AUCH SOFORT WIEDER", + "ACH KOOOOMMM !", + // 365 + "AUF WIEDERSEHEN. ICH MUSS EINEN VAMPIR ToeTEN", + "", + "REDEST DU AUF TRANSSYLVANISCH ODER WAS ?", + "WER IST ONKEL DESIDERIUS ?", + "WAS SOLL LOS SEIN MIT DIESEM GRAF DRASCULA ?", + // 370 + "WER IST DIESER VON BRAUN ?", + "UND WARUM MACHT ER ES NICHT ?", + " UND WO KANN ICH VON BRAUN FINDEN ?", + "ALSO DANKE UND AUF WIEDERSEHEN, SCHLAF SCHoeN", + "WIR SOLLTeN BESSER VORHER KLINGELN", + // 375 + "SIND SIE PROFESSOR VON BRAUN ?", + "UND SIE KoeNNTEN MIR NICHT VERRATEN, WO..... ?", + "ICH NEHM IHM NICHT AB, DASS ER HELGE SCHNEIDER IST", + "PROFESSOR!", + "HELFEN SIE MIR !ES GEHT UM DAS LEBEN MEINER GELIEBTEN !", + // 380 + "SCHON GUT, ICH BRAUCHE IHRE HILFE NICHT", + "OK. ICH GEHE !", + "KEINE ANGST. GEMEINSAM BESIEGEN WIR DRASCULA", + "UND WARUM HELFEN SIE MIR DANN NICHT ?", + "ICH HABE SIE", + // 385 + "ABER ICH HABE SIE DOCH !", + "EINVERSTANDEN", + "...aeHM,...JA", + "ICH GEHE DIREKT NOCHMAL INS AQUARIUM", + "ICH BIN SO WEIT, MICH IHREM TEST ZU STELLEN", + // 390 + "SCHON GUT, ALTERCHEN. ZAHLTAG !", + "SCHON GUT. ICH WOLLTE SOWIESO GERADE GEHEN", + "TSCHULDIGE", + "WIE FINDEST DU DIESES BUCH? KLAVIERSTueCKE VON TSCHAIKOWSKY", + "WIE BRINGT MAN EINEN VAMPIR UM ?", + // 395 + "HAT MAN DIR NICHT GESAGT WIE MAN SICH BETTET SO LIEGT MAN ?", + "GENAU DAS SAGT MEINE MUTTER IMMER ZU MIR", + "WARUM KONNTE DICH DRASCULA NICHT ERLEDIGEN ?", + "UND WAS DANN ?", + "SUPER ! DA HABEN SIE EIN IMMUNITaeTSMISCH.... !", + // 400 + "ALSO ?", + "SEHR GUT", + "KoeNNEN SIE NOCHMAL WIEDERHOLEN WAS ICH FueR DIESE MISCHUNG BRAUCHE ?", + "DANN SATTEL ICH MAL DIE HueHNER UND BESORG ES", + "ENTSCHULDIGUNG, WO IST DER KLAVIERSPIELER ?", + // 405 + "ICH\247HAB\247SCHON\247ALLE\247ZUTATEN\247FueR\247DIE\247MISCHUNG", + "EINE FRAGE : WAS SOLL DAS HEISSEN : REIPERK ALUCSARD?", + "SAGEN SIE SCHON...", + "UND WO SOLL DIESE GROTTE SEIN ?", + "WAS IST ? GABS BEI EUCH KEINE HEXENPROZESSE ?", + // 410 + "...ABER WENN ICH NOCH MEHR VAMPIREN BEGEGNE ?", + "EIN VAMPIR, DER MICH NICHT DURCHLaeSST", + "ER SIEHT WIE AUS WIE JODA, NUR VIEL GRoeSSER", + "EJ, JODA. WENN DU MICH DURCHLaeSST, GEB ICH DIR ne mark", + "NA GUT, DIR KANN MAL WOHL NICHTS ERZaeHLEN", + // 415 + "HALLO, VAMPIR, WAS FueR EINE NACHT, WAS ?", + "HAT MAN DIR SCHON MAL GESAGT, DASS DU AUSSIEHST WIE JODA ?", + "BIST DU EIN VAMPIR ODER EIN oeLGEMaeLDE ?", + "ICH HALT BESSER MEINEN MUND, SONST REGST DU DICH NOCH AUF", + "ABGESCHLOSSEN", + // 420 + "DIE ELSTER KoeNNTE MIR EIN AUGE RAUSREISSEN, WENN ICHS VERSUCHE !", + "ZU !MEIN GOTT, WIE UNHEIMLICH !", + "DIE SCHARNIERE SIND ZUGEROSTET", + "HIER IST NUR EIN PaeCKCHEN MEHL", + "DAS HAT DEN ROST ENTFERNT", + // 425 + "ICH HABE EINEN PFLOCK AUS FICHTENHOLZ GEFUNDEN", + "ICH NEHM DAS HIER, DAS IST SCHoeN DICK !", + "NA, ICH GLAUBE ICH KANN MICH JETZT MAL AUS DIESER DaeMLICHEN VERKLEIDUNG SCHaeLEN", + "EINGaeNGE ZU DEN SEITENFLueGELN WEGEN BAUARBEITEN GESPERRT. BENUTZEN SIE BITTE DEN HAUPTEINGANG", + "...ER IST BLASS, HAT KOMISCHE ZaeHNE, TRaeGT EIN TOUPET UND EINEN UMHANG...DAS MUSS DRASCULA SEIN !", + // 430 + " ES IST B.J. ! B.J. ALLES O.K ?", + "ICH WEISS SCHON DASS SIE DUMM IST, ABER ICH BIN SO EINSAM", + "DU HAST BESTIMMT KEINEN SCHLueSSEL, STIMMTS ?", + "ICH WETTE, DU HAST KEINEN DIETRICH", + "GIB MIR DIE HAARSPANGE. ICH MACHS WIE MCGYVER", + // 435 + "BEWEG DICH NICHT, ICH BIN SOFORT ZURueCK", + "VERDAMMT! ER IST MIR ABGEBROCHEN !", + "HEYJEYJEY !UND ICH HAB MICH AUCH RASIERT, ALTER !", + "JA, SCHATZ ?", + "ES REICHT NICHT", + // 440 + "DER KLAVIERSPIELER IST NICHT DA", + "EIN TRANSSYLVANISCHER GIN-TONIC", + "ICH HABE IMMER NOCH KEIN ZIMMER", + "ES SCHEINT DASS ER IN DER BADEWANNE HaeNGENGEBLIEBEN IST UND DANN EINE KNEIPE AUFGEMACHT HAT", + "ER IST VOLL WIE EIN RUSSE", + // 445 + "DIESES HAAR.... TJA,ES ERINNERT MICH AN JEMANDEN", + "ES IST EIN KNoeCHRIGES GERIPPE", + "GUCK MAL ! BRAD PITT!", + "ER SCHLaeFT. ES WaeRE WIRKLICH SCHADE, IHN ZU WECKEN", + "ER IST HaeSSLICHER ALS DIDI HALLERVORDEN", + // 450 + "EIN SARG AUS FICHTENHOLZ", + "ER WIRD MICH IN LECKERE KLEINE SCHEIBCHEN SCHNEIDEN", + "ICH STEH NICHT SO AUF PENDEL. ICH FIND OHRFEIGEN BESSER", + "ICH KANN NICHT. ICH HAB HANDSCHELLEN AN", + "DAS SIEHT DOCH JEDER, DASS DAS EINE GEHEIMTueR IST", + // 455 + "SIE IGNORIEREN MICH", + "ACH KOMM !", + "LAUT DREHBUCH BEWEGE ich mich, ABER das Spiel war so teuer, dass nichts mehr FueR EIN FITNESS-STUDIO ueBRIG war, also habe ich auch keinen strammen arsch.", + "SCHEINT SO, ALS OB ER EIN BISSCHEN LOSE AN DER WAND HaeNGT", + "ICH GLAUBE KAUM, DASS SIE MIR NueTZEN WIRD. SIE IST VIEL ZU FEUCHT, UM SIE ANZUZueNDEN", + // 460 + "ZUM WESTFLueGEL ?ICH BIN DOCH NICHT BLoeD !WER WEISS WAS MICH DA ERWARTET !", + "MIT HueBSCHEN TRANSSYLVANISCHEN MOTIVEN", + "", + "WIE SCHADE, DASS DAS DA KEIN LECKERER LAMMBRATEN DRIN IST.", + "ALS ICH BEIM LETZTEN MAL IN EINEN OFEN GEGUCKT HABE, IST DAS HAUS IN DIE LUFT GEFLOGEN", + // 465 + "DAS IST DAS WAPPEN DER TRANSSYLVANISCHEN FUSSBALLMANNSCHAFT", + "UND WOZU? SOLL ICH MIR DAS ANS KNIE BINDEN ?", + "DIESE SORTE SCHUBLADE LaeSST SICH NICHT oeFFNEN", + "ICH MoeCHTE ECHT NICHT WISSEN, WAS ES DA DRIN ZU ESSEN GIBT!", + "DAS WIRKT ZIEMLICH IMPRESSIONISTISCH AUF MICH", + // 470 + "DIE NACHT VERSCHLUCKT ALLES... WIE UNHEIMLICH, WAS?", + "SIE KLEMMT", + "DER KoeNIG HAST DU DIR DAS NICHT DENKEN KoeNNEN?", + "NEIN, ICH HAB SCHON EINEN ZU HAUSE, DEN ICH FueTTERE UND SO", + "EIN REGAL MIT BueCHERN UND ANDEREN SACHEN", + // 475 + "UND WEN SOLL ICH UM DIESE UHRZEIT NOCH ANRUFEN?", + "\"EINKOMMENSERKLaeRUNG LEICHT GEMACHT\" WIE INTERESSANT!", + "ICH HAB SCHON EINS ZU HAUSE.ICH GLAUBE DAS IST WELTWEIT EIN BESTSELLER", + "EIN TOTAL NORMALER SCHLueSSEL", + "ICH GLAUBE, DER GEHoeRT HIER NICHT HIN", + // 480 + "HEY, DIE FRITTEN SEHEN AUS WIE ECKZaeHNE! ICH BIN HIN UND WEG", + "das ist wohl echt nicht DER moment, RUMZUNASCHEN, WENN MEINE FREUNDIN IN DEN KLAUEN DER fiesesten ausgeburt der Welt ist.", + "WAS FueR EINE RIESENGAUDI DAS MACHT, DAMIT VAMPIRE FERTIGZUMACHEN!", + "MAL GUCKEN, OB NOCH EINER AUFTAUCHT", + "NEIN, ES MUSS MIT NOCH SO EINEM DRECKIGEN, STINKENDEN UND NERVIGEN VAMPIR WIE VORHIN SEIN", + // 485 + "DAS IST DIE ORIGINALPERueCKE VON ELIVS ALS ER SCHON EINE GLATZE HATTE", + "MEHL, ABER ICH KANN JETZT KEINE MARKEN NENNEN", + "VIELLEICHT EIN ANDERES MAL, OK?", + "EINE WUNDERSCHoeNE AXT. ZU SCHADE, DASS GERADE KEIN VAMPIRKOPF IN DER NaeHE IST", + "NEIN, IM GRUNDE BIN ICH EIN NETTER MENSCH", + // 490 + "DAS IST DAS DEO VON MAGGIE THATCHER, HIHIHI!", + "EIN ZIEMLICH HueBSCHER UMHANG", + "", + "WIE JEDER BELIEBIGE AST EINES BELIEBIGEN BAUMES AN JEDEM BELIEBIGEN ORT IN DER WELT, NICHTS BESONDERES ALSO", + "\"UNGLAUBLICH\" EIN SEIL IN EINEM VIDEOSPIEL!", + // 495 + "WOZU DAS WOHL NOCH GUT SEIN WIRD...", + "EIN SEIL AN EINEM AST ODER EIN AST AN EINEM SEIL, JE NACHDEM WIE MAN DAS SO BETRACHTET", + "ES SCHEINT, DAS DIESE ELSTER WAS ueBLES IM SCHILDE FueHRT", + "ZISCH AB, ICH SAG IHR NICHTS, MAL SEHEN OB SIE AUSFLIPPT", + "SIEHT SO AUS ALS WaeRE SIE TOT, ABER STIMMT NICHT,NE?", + // 500 + "FueR DIESES SPIEL WURDEN KEINE TIERE MISSHANDELT ODER GEToeTET", +}, +{ + // 0 + "", + "C'EST LA DEUXI\212ME PORTE PLUS GRANDE QUE J'AI VUE DANS MA VIE.", + "ENFIN, PAS AUTANT QUE \207A.", + "ELLE EST BOUCH\202E AVEC DES GROSSES PLANCHES. L'\202GLISE EST PEUT-\210TRE ABANDONN\202E DEPUIS QUELQUES ANN\202ES.", + "MAIS JE NE L'AI PAS OUVERTE.", + // 5 + "QU'EST-CE QUE JE FAIS? JE L'ARRACHE?", + "BONJOUR, PORTE. JE VAIS T'ENCADRER.", + "C'EST TROP POUR MOI.", + "UNE FEN\210TRE BOUCH\202E AUX GROSSES PLANCHES.", + "JE N'ARRIVE PAS.", + // 10 + "\200A Y EST.", + "ET POURQUOI?", + "SALUT, FEN\210TRE! AS-TU QUELQUE CHOSE \205 FAIRE CE SOIR?", + "PAS SANS LE PERMIS DE TRAVAUX PUBLIQUES.", + "H\202! CETTE FEN\210TRE A SEULEMENT UNE GROSSE PLANCHE...", + // 15 + "OH\202! OH\202!-FEN\210TRE!", + "BONJOUR, TOI.", + "", + "JE N'ARRIVE PAS.", + "C'EST BIEN O\227 ELLE EST.", + // 20 + "", + "C'EST UNE TOMBE EN FORME DE CROIX.", + "NON, MERCI.", + "BONJOUR, LE D\202FUNT: VEUX-TU DES VERMISSEAUX?", + "MAIS OUI. COMME EN POLTERGUEIST.", + // 25 + "", + "", + "JE REVIENS EN QUINZE MINUTES.", + "D\202FENSE D'AFFICHER.", + "", + // 30 + "C'EST FERM\202 \205 CL\202.", + "J'EN AI D\202J\205 UN.", + "", + "IL NE R\202POND PAS.", + "MAIS NON, C'EST BIEN GAR\202.", + // 35 + "C'EST UNE PORTE.", + "UN TIROIR DE LA TABLE.", + "UNE ARMOIRE SUSPECTE.", + "BONJOUR, L'ARMOIRE. \200A VA?", + "", + // 40 + "", + "C'EST UN CAND\202LABRE TR\212S VIEUX.", + "IL DOIT \210TRE L\205 D\212S QUE MAZINGUER-Z \202TAIT UNE VIS.", + "NON, C'EST UNE RELIQUE.", + "C'EST UN JOLI R\202TABLE.", + // 45 + "", + "HI! HI! HI!", + "", + "NON.", + "", + // 50 + "HA! HA! HA! -QUE C'EST BON!", + "", + "", + "", + "JE NE VOIS RIEN DE SP\202CIAL.", + // 55 + "C'EST FERNAN, LA PLANTE.", + "C'EST UNE DES PIQUES DE LA GRILLE.", + "H\202! L\205-DESSOUS IL Y A UNE BO\214TE D'ALLUMETTES.", + "REGARDE! UN PAQUET DE CLINEX. -ET IL Y A UN TOUT NEUF!", + "IL N'Y A RIEN DE PLUS DANS LE SEAU.", + // 60 + "C'EST UN AVEUGLE QUI VE VOIT PAS.", + "", + "", + "", + "", + // 65 + "C'EST UNE GROSSE SOMME D'ARGENT.", + "", + "", + "", + "", + // 70 + "", + "", + "", + "", + "", + // 75 + "", + "", + "", + "", + "", + // 80 + "", + "", + "", + "", + "", + // 85 + "", + "", + "", + "", + "", + // 90 + "", + "", + "", + "", + "", + // 95 + "", + "", + "", + "", + "", + // 100 + "ELLE N'A RIEN DE SP\220CIAL", + "CELA N'A RIEN D'EXTRAORDINAIRE", + "QU'EST-CE QU'IL Y A?", + "BONJOUR!", + "RIEN DE NOUVEAU?", + // 105 + "LA FAMILLE, \200A VA?", + "-QUELLES CHOSES TU AS!", + "MAIS, COMME JE VAIS PRENDRE CELA!", + "MA RELIGION ME L'INTERDIT", + "CE N'EST PAS MIEUX", + // 110 + "BIEN S\352R, MON VIEUX!", + "ON NE PARLE PLUS DE CELA", + "IMPOSSIBLE", + "CELA NE S'OUVRE PAS", + "JE NE PEUX PAS TOUT SEUL", + // 115 + "SI JE VOULAIS, J' ARRIVERAIS, MAIS \200A ME DONNE DE LA PARESSE", + "JE N'Y VOIT PAS UNE RAISON APPARENTE", + "C'EST UN CERVEAU ASSEZ BIEN", + "ET BIEN CERVEAU, QUE PENSES-TU FAIRE CE SOIR?", + "NON, ON DOIT LE GARDER DANS UN ENDROIT \267 L'ABRI DES MUTATIONS DE L'ATMOSPH\324RE", + // 120 + "C'EST UN DUR, COMME MON CHEF", + "C'EST UN PIEU TR\324S AIGUIS\220", + "FID\324LE PIEU POINTUUU, NOBLE CH\322NE TRANSYLVAAAN", + "TIENS! JE DOIS COUPER MES ONGLES!", + "B.J. EST L\267-DEDANS. ET QUELLE EST MIGNONE CETTE NANA!", + // 125 + "ELLE EST FERM\220E TR\324S SOLIDEMENT", + "\"CADENAS SOLIDES S.A.\"", + "C'EST LE TYPIQUE SQUELETTE QU'ON TROUVE DANS LES GE\342LES DE TOUS LES JEUX", + "ON L' EMPLOIE NORMALEMENT POUR INDUIR DU COURANT \220LECTRIQUE AUX APPAREILS QU'Y SONT RACCORD\220S", + "C'EST ABSOLUMENT ARTISANAL, CAR LES JAPONAIS LES FONT MAINTENANT DE POCHE", + // 130 + "J'AI SEULEMENT VU DANS MA VIE UNE CHOSE SI MOCHE", + "LAISSE. JE NE LUI DIS RIEN POUR S'IL SE F\266CHE", + "IL SEMBLE ASSEZ RATIONNEL", + "C'EST UNE PHOTO DE PLATON EN TRAIN D'\220CRIRE SON DIALOGUE PERDU", + "JE NE SUIS PAS DE CEUX QUI PARLENT AUX POSTERS", + // 135 + "UN BUREAU ASSEZ MIGNON", + "C'EST UN DIPL\342ME DE CHASSE-CHASSE-VAMPIRES HOMOLOGU\220 PAR L'UNIVERSIT\220 D'OXFORD", + "C'EST UNE NUIT NOIRE AU PLEINE LUNE", + "IL PARA\327T QUE CES VIS NE SONT PAS TR\324S ENFONC\220ES", + "N'Y REGARDES PAS, MAIS JE CROIS QU'UNE CAM\220RA OCCULTE ME VISE", + // 140 + "UN D\220TECTEUR DE PIEUX ASSEZ MODERNE", + "NON, LE LABORATOIRE EST AU DEUXI\324ME \220TAGE", + "UNE JOLIE TABLE DE NUIT", + "C'EST UN TAS D'ARGENT QUI NE PEUT PAS MANQUER DANS UNE AVENTURE DIGNE DE TEL NOM", + "SI J'\220TAIS RICHE. DUBIDOUDUBIDOUDUBIDOUDUBIDOU", + // 145 + "CE SONT DES FEUILLES BIZARRES. ON A D\352 LES AMENER DE L'AM\220RIQUE DU SUD OU PAR L\267", + "JE NE PENSE PAS QU'ILS VONT ME R\220PONDRE", + "C'EST UN JOLI CRUCIFIX EN BOIS. L'IC\342NE N'ARRIVE PAS \267 SAISIR TOUT LA SPLENDEUR DE SA BEAUT\220", + "JE PRIE SEULEMENT AVANT DE ME COUCHER", + "H\220!, IL PARA\327T QUE CETTE PIQUE S'EST UN PETIT PEU D\220CROCH\220E", + // 150 + "TU NE POURRAS TE PLAIGNER APR\324S DU PEU DE PISTES QUE JE TE DONNE", + "C'EST UNE PIQUE ASSEZ CONVENTIONNELLE", + "ILS SONT MIGNONS, MAIS UN PEU SALES", + "NON, NON, ILS NE ME \220COUTERAIENT PAS. HI, HI, HI -QUE C'EST BON!", + "\"LA BELLE DORMANTE DU BOIS\" DE TCHA\330KOVSKI, OU TCHA\330FROSKI, OU N'IMPORTE COMMENT DIT-ON ", + // 155 + "TR\324S APP\220TISSANT", + "JE NE SUIS PAS DE CEUX QUI SUCCENT DES CHEWING-GUMS D\220J\267 M\266CH\220S", + "UNE FAUCILLE TR\324S MIGNONE. jE ME DEMANDE O\353 SERA LE MARTEAU?", + "\"LES FABRICANTS DE TABAC AVERTISSENT QUE LES AUTORIT\220S SANITAIRES SONT S\220RIEUSEMENT NUISIBLES POUR LA SANT\220 \"", + "UNE BOUGIE COURANTE ET NORMALE ET AVEC DE LA CIRE M\322ME", + // 160 + "IL FAUT VOIR COMME ELLES LUISENT CES DEUX RUTILANTES MONNAIES!", + "IL FAUT VOIR COMME ELLE LUIT CETTE RUTILANTE MONNAIE!", + "AVEC \200A JE SERAI IMMUNIS\220 CONTRE LES MORSURES DES VAMPIRES", + "NON, CE N'EST PAS ENCORE LE MOMENT", + "IL Y A UN BILLET DE MILLE ET DEUX SOUS", + // 165 + "ON DIT\"VOUS \322TES PRI\220S DE NE PAS DONNER \267 MANGER AU PIANISTE\"", + "L'OMELETTE, 200. DES PETITS POISSONS FRITS, 150, DES POMMES A\330OLI, 225", + "LES MEILLEURES HAMBURGERS DE CE C\342T\220 DU DANUBE, SEULEMENT 325", + "C'EST UNE JOLIE T\322TE DE MORT AU REGARD TR\324S PER\200ANT -HI, HI, HI, QUE C'EST BON!", + "BONJOUR T\322TE DE MORT, TU ME RAPPELLES L'ONCLE HAMLET", + // 170 + "J'AI LA HABITUDE DE NE PAS TOUCHER AUX CHOSES QUI ONT V\220CU AUTREFOIS", + "C'EST UNE POUBELLE", + "C'EST UNE MASSUE POUR LE MATCH DE CE SOIR", + "JE ME DEMANDE CE QU'IL AURA DERRI\324RE", + "H\220, CE RIDEAU NE BOUGE PAS!", + // 175 + "TIENS, QUEL CH\266TEAU SI SOMBRE, H\220? ", + "JE NE PEUX PAS, IL EST TROP LOIN POUR M'ENTENDRE", + "C'EST UNE TYPIQUE FOR\322T TRANSYLVANE, AVEC DES ARBRES", + "MAIS TU NE DIS QUE DES B\322TISES, C'EST UN LIEU OBSCUR!", + "CONFISERIE GARCIA, G\266TEAUX ET CHEWING-GUMS.", + // 180 + "UNE PORTE TR\324S JOLIE", + "ELLE EST FERM\220E", + "UN TONNEAU COMPL\324TEMENT FERM\220", + "", + "QUELLES BESTIOLES SI MIGNONES!", + // 185 + "BSSST, BSSST, PETIT CHAT...", + "IL NE R\220POND PAS", + "LA LUNE EST UN SATELLITE TOURNANT AUTOUR DE LA TERRE AVEC UNE P\220RIODE DE ROTATION DE 28 JOURS", + "SALUT, LUNE!, LUN\220E ET \220TOURDIE ", + "ELLE EST COMPL\324TEMENT BOUCH\220E AVEC DES GROSSES PLANCHES", + // 190 + "C'EST IMPOSSIBLE, CECI NE L'OUVRE PAS NI LE MAJORDOME DE LA T\220L\220", + "H\220, IL PARA\327T QUE L'OMBRE DE CE CYPR\324S-LA EST ALLONG\220E", + "OH\220! H\342TELIEEER!", + "JE VOUDRAIS UNE CHAMBRE", + "SAVEZ-VOUS O\353 EST QUE JE PEUX TROUVER UN TEL COMTE DRASCULA?", + // 195 + "OUI, QU'EST-CE QU'IL Y A? ", + "ET \200A?", + "EN... EN V\220RIT\220?", + "UNE BONNE QUESTION, JE VAIS VOUS RACONTER MON HISTOIRE, TIENS...", + "JE N'AI QUE POUR CINQ MINUTES", + // 200 + "JE M'APPELLE JOHN HACKER ET SUIS LE REPR\220SENTANT D'UNE INMOBILI\324RE BRITANNIQUE", + "IL PARA\327T QUE LE COMTE DRASCULA VEUT ACHETER DES TERRAINS \267 GIBRALTAR ET ON M'A ENVOY\220 POUR N\220GOCIER L'AFFAIRE", + "MAIS JE PENSE QUE DEMAIN DE BONNE HEURE JE RETOURNE AVEC MA MAMAN", + "UNE BELLE NUIT, N'EST-CE PAS?", + "NON, RIEN", + // 205 + "OH\220! PIANISTE!", + "UNE BELLE NUIT", + "ET EN PLUS, IL NE FAIT PAS FROID", + "EH BIEN, RIEN. CONTINUE \267 JOUER", + "C'EST \200A", + // 210 + "BONJOUR CHEF, \200A VA?", + "ET LA FAMILLE?", + "IL Y A DE L'AMBIANCE ICI, H\220?", + "TANT MIEUX SI JE NE DIS RIEN", + "ON EST MIEUX CHEZ-SOI QU'AILLEURS... ON EST MIEUX DANS... H\220? MAIS VOUS N'\322TES PAS TANTE EMMA. MIEUX ENCORE. -SI JE N'AI PAS AUCUNE TANTE EMMA!", + // 215 + "OUI, LE MIEN AUSSI. VOUS POUVEZ M'APPELLER COMME VOUS VOULEZ, MAIS SI VOUS M'APPELLEZ JOHNY, JE VIENS COMME LES CHIENS", + "OUI, QUELS COUPS QUE J'AI, N'EST-CE PAS? EN FAIT, O\353 SUIS-JE?", + "OUI", + "A\330E!, A\330E!...", + "OH, OUI! BIEN S\352R", + // 220 + "EH BIEN! MERCI BEAUCOUP POUR TON AIDE. JE NE TE D\220RANGE PLUS SI TU ME DIS O\353 SE TROUVE LA PORTE, S'IL TE PLA\327T...", + "CAR LE COUP A D\352 ME TOUCHER LA CERVELLE ET JE N'Y VOIS GOUTTE", + "BAH!, \200A FAIT RIEN. J'AI TOUJOURS UNE DE R\220CHANGE", + "OUAH, QUELLE BELLE FEMME! -JE NE M'AVAIS PAS RENDU COMPTE! BIEN S\352R, SANS LES LUNETTES...", + "\220COUTE...", + // 225 + "ET \200AAAAAA?!", + "NE T'EN FAIS PAS B. J., MON AMOUR! JE VAIS TE SAUVER DES GRIFFES DE CELUI-L\267 ", + "IL ME CASSE LE NEZ, TIENS!", + "AHHH, UN HOMME-LOUP! MEURS MAUDIT!", + "OUI, C'EST CELA...", + // 230 + "OUI, C'EST CELA... JE CROIS QUE JE VAIS SUIVRE MON CHEMIN. PARDON.. ", + "QUOI?", + "EH BIEN, EN V\220RIT\220, BIEN PENS\220... JE NE CROIS PAS", + "DIS -MOI, OH! \220RUDITE PHILOSOPHE! Y A-T-IL UNE R\220LATION CAUSE-EFFET ENTRE LA VITESSE ET LE LARD?", + "\200A VA, \200A VA, ABANDONNE. EN TOUT CAS, JE NE SAIS PAS POURQUOI JE L'AI DIT.", + // 235 + "QU'EST-CE QUE TU FAIS ICI EN TRAIN DE PHILOSOPHER AU LIEU DE MANGER DU MONDE?", + "QU'EST-CE QUE C'EST QUE \200A?", + "\220COUTE, PEX-TU R\220P\220TER CETTE PHRASE DES \"INCLINATIONS PR\220-\220VOLUTIVES\"?", + "BIEN S\352R, MON VIEUX. CETTE HISTOITE QUE TU M'AS LACH\220E AVANT. CE QUE JE N'AI PAS BIEN COMPRIS...", + "NON, LE MIEUX SERA DE NE RIEN DIRE. CAR SI JE LE TOUCHE LA VEINE.....", + // 240 + "OUI, QUE SE PASSE-T-IL?", + "OUI, QU'EST-CE QU'IL Y A? ", + "EH BIEN, MAINTENANT QU'IL ABORDE LE SUJET JE LUI DIRAI QUE...", + "", + "EN FAIT, QU'ARRIVERAIT-IL SI UN VAMPIRE SE POURVOYAIT DE LA FORMULE PAR HASARD... ", + // 245 + "EH BIEN, RIEN. \220COUTE, CECI NE TE SEMBLE PAS UN RAVAUDAGE QU'ON A MIS EN SC\324NE POUR EN FINIR T\342T AVEC LE JEU? BON, PEUT-\322TRE PAS", + "C'EST VIDE!", + "POURQUOI TU M'AS VOL\220 MON AMOUR. B.J. SI ELLE N'EST PAS L\267, LA VIE N'AS PAS DE SENS POUR MOI", + "SON CERVEAU?!", + "CE N'EST POUR RIEN, MAIS JE CROIS QUE TON PETIT MONSTRE M'A F\266CH\220", + // 250 + "MA VIERGE, QUE JE RESTE TEL QUE JE SUIS!", + "TU N'AURAS PAS LE DERNIER MOT. C'EST S\352R QUE MAINTENANT APPARA\327T SUPER-LOPEZ ET ME LIB\324RE!", + "QUELLE MERDE DE JEU DONT MEURT LE PROTAGONISTE!", + "UN INSTANT, QU'Y A-T-IL DE MON DERNIER D\220SIR?", + "HA! HA! MAINTENANT JE SUIS IMMUNIS\220 CONTRE TOI, D\220MON MAUDIT. CETTE CIGARETTE EST UNE POTION ANTI-VAMPIRES QUI M'A DONN\220 VON BRAUN ", + // 255 + "OUI, C'EST S\352R, MAIS TU N'OBTIENDRAS JAMAIS DE MOI LA FORMULE", + "JE PEUX SUPPORTER LA TORTURE, ET ENCORE LA CR\220ER ", + "NON, S'IL VOUS PLA\327T, JE PARLERAI, MAIS NE ME FAITES PAS \200A!", + "EH BIEN. JE T'AI D\220J\267 DIT CE QUE TU VOULAIS SAVOIR. MAINTENANT D\220LIVRE-NOUS, B.J. ET MOI, ET FICHEZ-NOUS LA PAIX", + "B.J.! QU'EST-CE QUE TU FAIS L\267? DRASCULA, O\353 EST-IL?", + // 260 + "QU'IL EST M\220CHANT! C'EST SEULEMENT PAR-CE QU'IL APPARTIENT \267 LA NOBLESSE QU'IL CROIT POUVOIR EXERCER LE DROIT DE GAMBADE AVEC N'IMPORTE QUI", + "\267 BAS L'ARISTOCRATIE ARBITRAIRE!", + "DEBOUT LES PAUVRES DU MOOONDE....!", + "ET D'APR\324S CE QUE JE VOIS ON T'A ENCHA\327N\220 AVEC CADENAS ET TOUT", + "BON, \200A VA. N'AURAS-TU PAS UNE \220PINGLE?", + // 265 + "BON, BON, NE T'EN FAIS PAS COMME \200A. JE PENSERAI \267 QUELQUE CHOSE.", + "H\220! TAVERNIER!", + "COMMENT VA LE MATCH?", + "QUI EST-CE?", + "NE VOIS-TU PAS QUE DRASCULA EST ICI?", + // 270 + "ALORS, ON VA FINIR AVEC LUI, NON?", + "SERS -MOI UN COUP...", + "RIEN. J'AI OUBLI\220 CE QUE J'ALLAIS TE DIRE", + "OU\207BIEN\207TU\207ME\207SERS\207UN\207COUP\207OU\207JE\207ME\207METS\207\267\207JOUER\207DU\207PIANO", + "COMBIEN IL RESTE POUR QUE LE MATCH FINISSE?", + // 275 + "BON SOIR", + "COMME VAS-TU, IGOR? BOSSU? -HI! HI! HI! QUE C'EST BON! ", + "QU'EST-CE QU'ON SUPPOSE QUE TU FAIS?", + "EH BIEN, NON!", + "ALORS, METS-TOI DES LUNETTES", + // 280 + "QU'EST QUE C'EST QU'UNE ORGIE SURNATURELLE?", + "\200A VA, \200A VA, ARR\322TE-TOI. JE ME FAIS D\220J\267 UNE ID\220E", + "NE POURRAIS-TU PAS ME DIRE O\353 SE TROUVE DRASCULA? ", + "ALLONS, S'IL TE PLA\327T", + "POURQUOI PAS?", + // 285 + "AH! MAIS IL DORME PENDANT LA NUIT?", + "EH BIEN! QUE LA RENTE SE DONNE BIEN", + "CE QUE JE DOIS LUI PARLER", + "OH\220! SQUELEEETTE! ", + "SAPRISTI! -UN SQUELETTE QUI PARLE!", + // 290 + "RACONTE-MOI, COMMENT EST-TU VENU JUSQU'ICI?", + "ET POUR QUELLE RAISON VOUDRAIT DRASCULA CR\220ER UN MONSTRE? ", + "COMMENT T'APPELLES-TU, AMI SQUELETTE?", + "\220COUTE, VEUX-TU QUE JE T'APPORTE QUELQUE CHOSE \267 MANGER?", + "TU DOIS AVOIR L'ESTOMAC VIDE. -HI! HI! HI!", + // 295 + "VRAIMENT JE N'AI PAS ENVIE DE PARLER MAINTENANT", + "MON DIEU! (SIFFLEMENT) J'ESP\324RE QUE...(SIFFLEMENT) ET QUE...(SIFFLEMENT) DEUX FOIS!", + "J'AI L'AIM\220E VRAIMENT. \200A VA, JE SUIS D'ACCORD, IL N'\220TAIT PAS UN G\220NIE, MAIS PERSONNE EST PARFAIT, N'EST-CE PAS? ", + "DE PLUS, ELLE AVAIT UNE FIGURE \220POUSTOUFLANTE ", + "JE NE SERAI PLUS LE M\322ME. JE VAIS M'ENFERMER DANS UN MONAST\324RE POUR VOIR FUIR MA VIE LENTEMENT", + // 300 + "RIEN NE POURRA M'EN SORTIR D\220J\267 DE CETTE MIS\324RE PARCE QUE...", + "DE QUI? DE QUI?", + "JE VEUX \322TRE UN PIRATE", + "JE VEUX \322TRE PROGRAMMEUR", + "RACONTEZ-MOI QUELQUE CHOSE SUR PELAYO", + // 305 + "JE CONTINUERAI \267 JOUER ET J'OUBLIERAI QUE VOUS AI VU ", + "QUI AURA PENS\220 \267 CETTE B\322TISE?", + "C'EST UN SAC COMME CELUI DE MA GRANDE-M\324RE", + "MAIS QUE JE SUIS BEAU!", + "PLUS JE ME REGARDE PLUS JE ME PLAIS", + // 310 + "ET APR\324S COMMENT JE ME FERME?", + "IL FAUDRA QUE M'OUVRE D'ABORD, NON?", + "JE SUIS BIEN O\353 JE SUIS", + "JE M'AI D\220J\267", + "SALUT, MOI!", + // 315 + "JE VAIS ME LES METTRE \267 TEMPS", + "JE NE VOIS RIEN DE SP\220CIAL", + "C'EST BIEN O\353 IL EST", + "ET POURQUOI FAIRE?", + "JE NE PEUX PAS", + // 320 + "SALUT, TOI!", + "C'EST LE PANTH\220ON DE L'ONCLE D\220SIR\220", + "OH\220! ONCLE D\220SIR\220\220\220\220!", + "NON, JE NE VEUX PAS ME COUPER ENCORE UNE FOIS", + "HEM! HEM!...!", + // 325 + "YAMM, HEMMM, JH!", + "OUI, COF,COF!", + "TIENS, IL Y A ICI UN CHEWING-GUM COLL\220", + "C'EST LE MOVILANI, LE CADEAU QUI M'ONT DONN\220 POUR NO\323L", + "QUE C'EST HAUT!", + // 330 + "SORS DANS LE BALCON JULIETTE!", + "TU EST LA LUMI\324RE QUI \220CLAIRE MON CHEMIN!", + "H\220, PORTE! QU'EST-CE QU'IL Y A?", + "OH\220! MACHINE \267 TABAC DE TRANSYLVANIIIE", + "C'EST UNE MACHINE \267 D\220BIT DE TABAC", + // 335 + "J'AI UNE AUTRE MONNAIE L\267 -DEDANS", + "NON, J'AI D\220CID\220 ABANDONNER LE TABAC ET L'ALCOOL", + "D\324S MAINTENANT JE VAIS ME CONSACRER SEULEMENT AUX FEMMES", + "C'EST UN VOL! RIEN EST SORTI!", + "ENFIN! ", + // 340 + "C'EST \200A, UN BAHUT", + "SALUT, BAHUT! TU T'APPELLES COMME MON COUSIN, QUI S'APPELLE RAUL", + "J'AI TROUV\220 LE SAC DE B.J..", + "MON DIEU! JE N'Y ME VOIS PAS -SUIS UN VAMPIRE!", + "...AH, NON! CE N'EST QU'UN DESSIN!", + // 345 + "PETIT MIROIR: \"C'EST QUI LE PLUS BEAU DU ROYAUME?\"", + "IL NE VEUT PAS M'OUVRIR", + "TR\324S BIEN. J'AI MIS LES TAMPONS", + "C'EST UN DIPL\342ME DE CHASSE-VAMPIRES HOMOLOGU\220 PAR L'UNIVERSIT\220 DE CAMBRIDGE", + "NON, IL ME FAUT ENCORE D'INGR\220DIENTS, PAS LA PEINE DE LUI REVEILLER", + // 350 + "C'EST QUE JE SUIS FAUCH\220", + "C'EST UNE LAMPE BRITANNIQUE", + "TAVERNIER! -AIDEZ-MOI!", + "UN VAMPIRE EST APPARU ET IL A ENLEV\220 MA FIANC\220E", + "MAIS, N'ALLEZ VOUS PAS M'AIDER?!", + // 355 + "MORTE? QUE VOULEZ-VOUS DIRE?", + "HEM!", + "UN VAMPIRE A S\220QUESTR\220E LA FILLE DE LA 506!", + "IL FAUT QUE TU M'AIDES!", + "TU NE SAIS PAS JOUER AUCUNE PI\324CE DES INHUMAINS?", + // 360 + "COMMENT TU TE SUPPORTES TOUT LE JOUR EN JOUANT LA M\322ME CHOSE?", + "ET ALORS, POURQUOI TU M'\220COUTES?", + "PR\322TE-MOI LES TAMPONS", + "ALLONS! JE VAIS TE LES REDONNER TOUT DE SUITE", + "ALLOOONSSS...", + // 365 + "AU REVOIR. JE DOIS TUER UN VAMPIRE", + "", + "EN QUOI TU PARLES! EN TRANSYLVAN?", + "C'EST QUI L'ONCLE D\220SIR\220?", + "MAIS QU'EST-CE QU'IL Y A AVEC CE DRASCULA-L\267?", + // 370 + "QUI EST-CE CE VON BRAUN-L\267?", + "ET POURQUOI IL NE LE FAIT PAS?", + "ET O\353 PEUX-JE TROUVER VON BRAUN?", + "EH BIEN, MERCI ET AU REVOIR. QUE TU LA DORMES BIEN", + "IL VAUDRA MIEUX SONNER D'ABORD", + // 375 + "LE PROFESSEUR VON BRAUN, C'EST VOUS?", + "ET NE POUVEZ-VOUS PAS M'INDIQUER O\353 JE PEUX...?", + "JE NE CROIS PAS QU'IL SOIT LE NAIN GANYM\324DE", + "PROFESSEUR!", + "AIDEZ-MOI! -LA VIE DE MA BIEN AIM\220E DEPENDE DE VOUS!", + // 380 + "\200A VA, JE N'AI PAS BESOIN DE VOTRE AIDE", + "D'ACCORD. JE M'EN VAIS", + "N'AIES PAS PEUR. NOUS ALLONS VAINCRE DRASCULA ENSEMBLE", + "ALORS, POURQUOI NE M'AIDEZ VOUS PAS?", + "JE LES AI", + // 385 + "OUI, JE LES AI!", + "D'ACCORD", + "...ER ...OUI", + "JE VIENS POUR RENTRER DANS CETTE CABINE", + "SUIS PR\322T \267 CONFRONTER VOTRE \220PREUVE", + // 390 + "\200A VA, VIEUX RIDICULE. JE SUIS VENU CHERCHER MON ARGENT", + "NON, RIEN. JE M'EN ALLAIS D\220J\267", + "PARDONNE-MOI", + "CE LIVRE T'INT\220RESSE? AVEZ-VOUS DES PARTITIONS DE TCHA\330KOVSKY?", + "COMMENT PEUX-JE TUER UN VAMPIRE?", + // 395 + "ON NE T'A JAMAIS DIT QUE C'EST MAUVAIS DORMIR DANS UNE MAUVAISE POSTURE?", + "EH BIEN, C'EST \200A QUE MA M\324RE ME DIT TOUJOURS", + "POURQUOI DRASCULA N'A PU JAMAIS TE TUER?", + "ET QU'EST-CE QUE S'EST PASS\220?", + "C'EST SUPER! -AVEZ-VOUS UNE POTION D'IMMUNIT...!", + // 400 + "ALORS?", + "TR\324S BIEN", + "POUVEZ-VOUS ME R\220P\220TER CE DONT J'AI BESOIN POUR CETTE POTION?", + "EH BIEN! JE PARS RAPIDE LE CHERCHER", + "\220COUTEZ, QU'EST-CE QUE C'EST PASSE\220 AVEC LE PIANISTE?", + // 405 + "J'AI\207D\220J\267\207TOUS\207LES\207INGR\220DIENTS\207DE\207CETTE\207POTION", + "UNE QUESTION: QU'EST.CE QUE C'EST CELA D' ALUCSARD ETEREUM?", + "PARLEZ, PARLEZ... ", + "ET C'EST O\353 CETTE GROTTE?", + "QU'EST-CE QU'IL Y A? N'AVIEZ VOUS PAS UN TRIBUNAL?", + // 410 + "...MAIS ...ET SI JE TROUVE ENCORE DES VAMPIRES?", + "C'EST UN VAMPIRE QUI M'EMP\322CHE L'ENTR\220E", + "IL RESSEMBLE \267 YODA, MAIS C'EST UN PEU PLUS GRAND", + "H\220, YODA! SI TU ME LAISSES PASSER JE TE DONNE UNE MONNAIE", + "BON, \200A VA. ON NE PEUT RIEN TE DIRE", + // 415 + "H\220, VAMPIRE! BELLE NUIT, N'EST-CE PAS?", + "ON T'A D\220J\267 DIT QUE TU RESSEMBLES \267 YODA?", + "ES-TU UN VAMPIRE OU UNE PEINTURE \267 L'HUILE?", + "IL VAUX MIEUX NE RIEN TE DIRE, POUR SI TU TE F\266CHES", + "C'EST FERM\220E \267 CL\220", + // 420 + "LA PIE POURRAIT M'ARRACHER UN OEIL SI J'EN ESSAIE!", + "C'EST FERM\220E! -MON DIEU, QUELLE PEUR!", + "LES GONDS SONT OXYD\220S", + "L\267-DEDANS IL Y A SEULEMENT UN POT AVEC DE LA FARINE", + "CECI A ENLEV\220 L'OXYDE", + // 425 + "J'AI TROUV\220 UN PIEU DE PIN", + "JE PRENDRAI CELUI-CI QUI EST PLUS GROS", + "BON, JE CROIS QUE JE PEUX ME D\220BARRASSER MAINTENANT DE CE STUPIDE D\220GUISSEMENT", + "LE PASSAGE AUX DONJONS EST FERM\220 \267 CAUSE DES TRAVAUX. VOUS \322TES PRI\220S D'UTILISER L'ENTR\220E PRINCIPALE. EXCUSEZ LES ENNUIES", + "...IL EST P\266LE. AVEC DE GROSSES DENTS. IL A UN TOUPET ET UTILISE UNE CAPE... -C'EST S\352REMENT DRASCULA!", + // 430 + "C'EST B.J.! B.J. TU EST BIEN?", + "OUI, JE SAIS QU'ELLE EST B\322TE, MAIS JE SUIS SEUL", + "N'AURAS-TU PAS UNE CL\220 PAR L\267, N'EST-CE PAS?", + "N'AURAS-TU PAS UN ROSSIGNOL, PAR HASARD?", + "DONNE-MOI UNE \220PINGLE. JE VAIS FAIRE COMME MCGYVER", + // 435 + "NE BOUGES PAS, JE REVIENS TOUT DE SUITE", + "ZUT! -S'EST CASS\220E!", + "OL\220\220\220! ET EN PLUS JE ME SUIS RAS\220, COLL\324GUE!", + "OUI, MON AMOUR?", + "IL N'ARRIVE PAS", + // 440 + "LE PIANISTE N'EST PAS L\267", + "UN COKTAIL TRANSYLVAN", + "JE N'AI PAS UNE CHAMBRE", + "SELON PARA\327T, IL EST REST\220 COINC\220 DANS LA BAIGNOIRE ET D\220CIDA ALORS D'OUVRIR UN BAR ", + "IL EST SO\352L COME UNE CUVE DE CUBA", + // 445 + "CE CHEVEU... LE CAS CE QU'IL ME RAPPELLE QUELQU'UN", + "C'EST UN SQUELETTE OSSEUX", + "REGARDE! MIGUEL BOS\220!", + "IL DORME. CE SERAIT DOMMAGE LE R\220VEILLER", + "IL EST PLUS MOCHE QU'\220MILE DE PAZ", + // 450 + "UN CERCUEIL EN BOIS DE PIN", + "IL VA ME COUPER EN PETITES TRANCHES, COMME UN SAUCISSON", + "JE N'AIME PAS LES PENDULES. JE PR\220F\324RE LES ARTICHAUTS", + "MES MAINS SONT EMMENOTT\220ES. JE N'ARRIVERAI PAS", + "IL SAUTE AUX YEUX QUE C'EST UNE PORTE SECR\324TE", + // 455 + "ILS M'IGNORENT", + "C'EST BIEN!", + "DANS LE SCRIPT IL BOUGEAIT, MAIS LE JEU A SURPASS\220 LE BUDGET ET ON N'A PAS PU ME PAYER UN GYMNASE POUR ME METTRE EN FORME. DONC, POINT DU TOUT", + "ELLE PARA\327T UN PEU D\220TACH\220E DU MUR", + "JE NE CROIS PAS POUVOIR M'EN SERVIR. ELLE TROP HUMIDE POUR L'ALLUMER", + // 460 + "\267 L'AILE OUEST? -M\322ME PAS EN FOU ACHEV\220! -VA SAVOIR QU'AURAIT-IL L\267-BASI!", + "IL Y A DE JOLIS MOTIFS TRANSYLVANS", + "", + "QUEL DOMMAGE NE PAS AVOIR TROUV\220 L\267-DEDANS UN PETIT AGNEAU EN TRAIN DE SE R\342TIR!", + "LA DERNI\324RE FOIS QUE J'AI OUVERT UN FOURNEAU LA MAISON A VOL\220 EN \220CLATS", + // 465 + "C'EST L'ENSEIGNE DE L'\220QUIPE DE FOOT-BALL DE LA TRANSYLVANIE", + "ET POURQUOI FAIRE? POUR ME LA METTRE \267 LA T\322TE?", + "JE NE CROIS PAS QUE CES TIROIRS SOIENT DE CEUX QUI S'OUVRENT", + "JE NE VEUX PAS SAVOIR LA NOURRITURE QU'IL Y AURA L\267-DEDANS!", + "J'AI L'IMPRESSION QUE C'EST DE L'IMPRESSIONNISME", + // 470 + "LA NUIT S'EMPARE DE NOUS TOUS... QUELLE PEUR, N'EST-CE PAS?", + "ELLE EST BOUCH\220E", + "C'EST LE ROI. NE L'AVAIT-TU PAS IMAGIN\220?", + "NON, J'EN AI D\220J\267 UN CHEZ MOI ET JE LUI DONNE \267 MANGER EN PLUS", + "UN PLACARD AVEC DES LIVRES ET D'AUTRES CHOSES", + // 475 + "ET QUI J'APPELLE \267 CES HEURES-L\267?", + "\"COMMENT FAIRE LA D\220CLARATION D'IMP\342TS\" COMME C'EST INT\220RESSANT!", + "J'AI D\324J\267 UN CHEZ MOI. JE CROIS QUE C'EST UN BEST-SELLER MONDIAL", + "UNE CL\220 COMPL\324TEMENT NORMALE", + "IL ME SEMBLE QUE CELLE-CI N'EST PAS D'ICI", + // 480 + "H\220! CE SONT DES FRITES SOUS FORME DE DENT CANINE! \200A ME PLA\327T", + "JE NE CROIS PAS QU'IL SOIT LE MEILLEUR MOMENT POUR MANGER DES GOURMANDISES, AVEC MA FIANC\220E AUX MAINS DE L'\322TRE LE PLUS MAUVAIS QU'UNE M\324RE A PU ACCOUCH\220", + "COMME JE SUIS BIEN EN TUANT DES VAMPIRES AVEC CELA!", + "VOYONS SI APPARA\327T T\342T UN AUTRE", + "NON, IL FAUT QU'IL SOIT AVEC UN SALE ET PUANT VAMPIRE, COMME CELUI QUI J'AI TU\220 AVANT", + // 485 + "C'EST L'AUTHENTIQUE PERRUQUE QU'ELVIS AVAIT UTILIS\220E QUAND IL EST DEVENU CHAUVE", + "C'EST DE LA FARINE, MAIS JE NE PEUX PAS DIRE DES MARQUES", + "PEUT-\322TRE DANS UN AUTRE MOMENT, D'ACCORD?", + "C'EST UNE HACHE MAGNIFIQUE, DOMMAGE DE NE PAS POUVOIR SE PAYER AUCUNE T\322TE DE VAMPIRE PAR L\267", + "NON. JE SUIS UNE BONNE PERSONNE AU FOND", + // 490 + "C'EST LE D\220ODORANT DE LA THACHER-HI!HI!HI!", + "C'EST UNE CAPE ASSEZ MIGNONE", + "", + "TOUT COMME LES BRANCHES DE TOUS LES ARBRES DU MONDE, C'EST-\267-DIRE SANS RIEN DE PARTICULIER", + "OH! C'EST INCROYABLE! -UNE CORDE DANS UNE AVENTURE DESSIN\220E!", + // 495 + "JE ME DEMANDE \267 QUOI SERVIRA-T-ELLE...?", + "UNE CORDE ATTACH\220E \267 UNE BRANCE OU UNE BRANCHE ACROCH\220E \267 UNE CORDE, \200A D\220PEND DU POINT DE VUE", + "IL PARA\327T QUE CETTE PIE \267 DE TR\324S MAUVAISES INTENTIONS", + "TAIS-TOI! JE NE LA DIS RIEN, POUR SI ELLE SE F\266CHE", + "ELLE SEMBLE MORTE, MAIS C'EST UNE MENSONGE", + // 500 + "IL N'Y A AUCUN ANIMAL ABiM\220 DANS LA PRODUCTION DE CE JEU", +}, +{ + // 0 + "", + "\220 la seconda porta pi\243 grande che ho vista nella mia vita", + "Forse.., no", + "\202 chiusa con tabelle. La chiesa deve essere abbandonata da tanti anni fa.", + "Ma se non la ho aperta", + // 5 + "Che faccio? La tolgo?", + "Ciao porta. Vado a farti una cornice", + "Troppo per me", + "una finestra chiusa con tabelle", + "Non ce la faccio", + // 10 + "Eccolo", + "E per che?", + "Ciao finestra. Hai qualcosa da fare stasera?", + "No senza il permesso del Ministero dei Lavori Pubblici", + "-eh! quella finestra ha soltanto una tabella..", + // 15 + "-Eooooo! -Finestra!", + "Tu, ciao", + "", + "Non ce la faccio", + "Va bene dov'\202 ", + // 20 + "", + "\220 una tomba in forma di croce", + "Non grazie", + "Ciao morto. Vuoi delle patatine a forma di vermi?", + "Si. Come in Poltergueist.", + // 25 + "", + "", + "Torno in quindici minuti", + "Vietato affigere manifesti", + "", + // 30 + "\220 chiuso con la chiave", + "Ne ho gi\240 uno.", + "", + "Non risponde.", + "No, \202 ben parcheggiato.", + // 35 + "\220 una porta.", + "Un casseto del tavolino.", + "Un sospettoso armadio.", + "Ciao armadio. Come va?.", + "", + // 40 + "", + "\220 un candelabro molto vecchio.", + "Deve essere qu\241 da che Mazinguer-Z era una vite.", + "No.\220 una reliquia.", + "\220 una bella pala.", + // 45 + "", + "Hi, hi, hi", + "", + "No.", + "", + // 50 + "Ha,ha,ha . - che buono!", + "", + "", + "", + "Non vedo niente di speciale.", + // 55 + "Ferdinan, la pianta.", + "\220 una degli spunzoni della cancellata.", + "-Eh! Qu\241 sotto c'\202 una scatola di cerini", + "-Guarda! un pacco di fazzoletti. -E c'\202 ne uno senza utilizzare!.", + "Non c'\202 niente di pi\243 nel secchio.", + // 60 + "\220 un cieco che non vede", + "", + "", + "", + "", + // 65 + "\220 una abbondante quantit\240 di soldi", + "", + "", + "", + "", + // 70 + "", + "", + "", + "", + "", + // 75 + "", + "", + "", + "", + "", + // 80 + "", + "", + "", + "", + "", + // 85 + "", + "", + "", + "", + "", + // 90 + "", + "", + "", + "", + "", + // 95 + "", + "", + "", + "", + "", + // 100 + "NON HA NULLA DI SPECIALE", + "NON \324 MICA SPECIALE", + "TU! CHE C'\324 ?", + "CIAO", + "NIENTE NUOVO?", + // 105 + "-COME VA LA FAMIGLIA?", + "- MA CHE STAI A DIRE?", + "-MA COME VADO A PRENDERE QUELLA COSA!", + "\324 VIETATO DALLA MIA RELIGIONE", + "MEGLIO DI NO", + // 110 + "-COME NO!", + "NEANCHE PARLARNE", + "IMPOSSIBILE", + "QUESTO NON SI APRE", + "IO SOLO NON CE LA FACCIO", + // 115 + "SE VORREI POTREI, MA MI FA PIGRIZIA", + "NON TROVO UNA BUONA RAGIONE", + "\324 UN CERVELLO ABBASTANZA CARINO", + "ALLORA, CERVELLO, CHE NE PENSI DI FARE STASERA?", + "NO, DEVE CONSERVARSI IN UN POSTO CHIUSO ALLA AZIONE MUTANTE DELLA ATMOSFERA", + // 120 + "\324 COS\336 DURO, COME IL MIO CAPO", + "UNA TALEA MOLTO AFFILATA", + "FEDELE TALEA AFFILATAAA, NOBILE ROVERE TRANSILVANOOO", + "-INSOMMA, DEVO TAGLIARMI LE UNGHIE!", + "-LA, DENTRO, C'\324 B.J,E MAMMA MIA, CHE FIGA!", + // 125 + "\324 CHIUSA SOTTO LUCCHETTO E CATENACCIO", + "\"LUCCHETTO E CATENACCIO S.A\"", + "\324 IL TIPICO SCHELETRO CHE C'\324 IN TUTTE LE CARCERE DI TUTTI I VIDEO-GIOCHI", + "SI UTILIZA PER DARE ELETRICIT\267 AGLI APARATTI COLLEGATI A LUI", + "\324 TOTALMEN11TE ARTIGIANO, PERCHE I GIAPONESSI LI FANNO TASCABILI", + // 130 + "NELLA MIA VITA, HO VISTO SOLTANTO UNA VOLTA UNA COSA COS\336 BRUTTA", + "SMETILLA. NON DICO NULLA PER SE SI ARRABBIA", + "SEMBRA ABBASTANZA RAZIONALE", + "\324 UNA FOTO DI PLATONE SCRIVENDO IL SUO DISCORSO PERSO", + "NON SONO DI QUELLI CHE PARLANO CON POSTERS", + // 135 + "UNA SCRIVANIA MOLTO CARINA", + "\324 UN DIPLOMA DI CACCIA-CACCIA-VAMPIRI OMOLOGATO DALLA UNIVERSIT\267 DI OXFORD", + "\324 NOTTE BUIA CON LUNA PIENA", + "SEMBRA CHE QUESTE VITI NON SONO MOLTO AVVITATE", + "NON GUARDARE, MA CREDO CHE UNA TELECAMERA NASCOSTA MI ST\267 REGISTRANDO", + // 140 + "UN DETETTORE DI TALEE MOLTO MODERNO", + "NO, IL LABORATORIO SI TROVA NEL SECONDO PIANO", + "UN BEL TAVOLINO", + "\324 UN SACCO DI SOLDI CHE NON PUO MANCARE IN UNA AVVENTURA CHE SIA COS\336 IMPORTANTE", + "IF I WERE A RICHMAN, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", + // 145 + "SONO DELLE STRANE FOGLIE. DEVONO AVERLE PORTATE DALLA SUDAMERICA", + "NON CREDO CHE SIA RISPOSTO", + "\324 UN BEL CROCIFISSO DI LEGNO. LA ICONA NON RIFLESSA TUTTA LA SUA BELLEZA", + "IO SOLO PREGO PRIMA DI ANDARMENE AL LETTO", + "-EH, SEMBRA CHE QUESTO SPUNZONE \324 UN PO ALLENTATO!", + // 150 + "E POI TI LAMENTI PERCHE NON TI DO SUGGERIMENTI", + "\324 UNO SPUNZONI ABBASTANZA CONVENZIONALE", + "SONO CARINI, SEBBENE HANNO PARECHIO POLVERE", + "NO, NON MI SENTIRANO; HI,HI,HI -CHE BUONO!", + "\"LA BELLA ADDORMENTATA DEL BOSCO\" DI CIAIKOSKY, O CIOIFRUSKY, O COME SI DICA", + // 155 + "MOLTO APPETITOSA", + "NO, IO NON SONO DI QUELLI CHE SI METTONO IN BOCCA GOMME USATE", + "UNA FALCE MOLTO CARINA. MI DOMANDO DOVE CI SAR\265 IL MARTELLO", + "\"I FABBRICANTI DI TABACCO AVVERTONO CHE IL TABACCO NUOCE GRAVEMENTE LA SALUTE\"", + "UNA CANDELA NORMALE, ANZI CON CERA", + // 160 + "MAMMA MIA COME BRILLANO QUESTE DUE BRILLANTI MONETE", + "MAMMA MIA COME BRILLA QUESTA BRILLANTE MONETA", + "CON QUESTO SAR\220 IMMUNE AI MORSI DEI VAMPIRI", + "NO, ANCORA NON \220 IL MOMENTO", + "C'E UN BIGLIETTO DI DIECIMILA E UN PAIO DI MONETE", + // 165 + "DICE \"SI PREGA DI NON BUTTARE CIBO AL PIANISTA\"", + "OMELETTA, 3.000 .PESCI FRITI, 2.000,PATATINE, 2.500", + "LE MIGLIORI HAMBURGUER A QUESTA PARTE DEL DANUBIO, SOLTANTO PER 4.000", + "UN BEL TESCHIO, CON UNO SGUARDO MOLTO PENETRANTE. HI,HI,HI, CHE BUONO!", + "CIAO TESCHIO, MI RICORDI AL ZIO DI HAMLET", + // 170 + "HO L'ABITUDINE DI NON TOCCARE COSE CHE SIANO STATE VIVE", + "UN CESTINO", + "UN TOTOCALCIO PER LA PARTITA DI STASERA", + "MI DOMANDO CHE CI SAR\265 DIETRO", + "-EH, QUESTA TENDE NON SI MUOVE!", + // 175 + "MADONNA, CHE TETRO \220 QUESTO CASTELLO.", + "NON CE LA FACCIO, \220 TROPPO LONTANO PER SENTIRMI", + "UN TIPICO BOSCO TRANSILVANO, CON GLI ALBERI", + "-MA CHE SCIOCHEZZE DICI, \220 MOLTO BUIO", + "PASTICCERIA ROSSI. DOLCI E GOMME", + // 180 + "UNA PORTA MOLTO BELLA", + "\220 CHIUSA", + "UN FUSTO COMPLETAMENTE CHIUSO", + "", + "CHE ANIMALETTI COS\326 BELLI!", + // 185 + "BSSSSSS,BSSSS, GATINO..", + "NON RISPONDE", + "LA LUNA \220 UN SATELLITE CHE GIRA INTORNO LA TERRA CON UN PERIODO DI RIVOLUZIONE DI 28 GIORNI", + "CIAO, LUNA LUNETTA", + "\220 TOTALMENTE CHIUSA CON TABELLE", + // 190 + "IMPOSSIBILE. QUESTO, NON LO APRE N\220 HOUDINI", + ".EH, SEMBRA CHE L'OMBRA DEL CIPRESSE \220 ALUNGATA", + "-EOOO, BARISTA", + "VORREI UNA CAMERA", + "SA DOVE POSSO TROVARE A UNO CHE SI FA CHIAMARE CONDE DRASCULA", + // 195 + "SI, PER CHE?", + "COME MAI?", + "DA.....DAVVERO?", + "BUONA DOMANDA, GLI RACONTER\220 LA MIA STORIA, SENTA..", + "SONO SOLTANTO CINQUE MINUTI", + // 200 + "MI CHIAMO JOHN HACKER, E SONO RAPPRESENTANTE DI UNA IMMOBILIARIE BRITANICA", + "MI HANNO DETTO CHE IL CONDE DRASCULA VUOLE COMPRARE DEI TERRENI A GIBRALTAR, E SONO QU\326 PER NEGOZIARE LA VENDITA", + "MA CREDO IO CHE DOMANI PRESTO TORNO CON LA MAMMA", + "BELLA NOTTE, VERO?", + "NO, NIENTE", + // 205 + "EOOOO, PIANISTA", + "BELLA NOTTE", + "ANZI, NON FA FREDDO", + "ALLORA... TI LASCIO CONTINUARE A SUONARE", + "VA BENE", + // 210 + "CIAO CAPO, COME VA?", + "E LA FAMIGLIA?", + "C'\220 GENTE QU\326, EH?", + "MEGLIO NON DICO NULLA", + "SI ST\265 MEGLIO A CASA CHE A NESSUN POSTO... -EH? MA SE LEI NON \220 LA ZIA EMMA. ANZI. SE IO NON HO NESSUNA ZIA EMMA.", + // 215 + "SI, IL MIO ANCHE. LEI PUO CHIAMARMI COME GLI PARA, MA SE MI CHIAMA JOHNY, VENGO SUBITO COME I CANI", + "SI, CHE SPIRITOSO SONO, VERO? MAA.. DOVE MI TROVO?", + "SI.", + "MANAGIA..", + "OH, SI. COME NO", + // 220 + "ALLORA GRAZIE MILE PER DARMI IL TUO AIUTO. NON TI DISTURBO PI\351 . SE MI DICI DOV'\220 LA PORTA, PER FAVORE...", + "PERCHE LA BOTTA HA DOVUTO DAGNARMI IL CERVELLO E NON VEDO UNA MADONNA", + "NON FA NIENTE. SEMPRE NE PORTO ALTRI IN PI\351 ", + "-UFFA, CHE FIGA!- NON MI ERA ACCORTO, CERTO, SENZA GLI OCCHIALI", + "SENTI..", + // 225 + "COME MAI...?!", + "NON TI PREOCUPARE B.J., AMORE MIO! TI LIBERER\220 DA QUEL TIZIO", + "MI HA FATTO ARRABBIARE", + ".AHHH, IL LUPO- MANNARO! -MUORE MALDITO!", + "BENE, CREDO...", + // 230 + "BENE, CREDO CHE PROSSIGUER\220 LA MIA STRADA. PERMESSOO..", + "-COME?", + "LA VERIT\267, PENSANDOCI MEGLIO, CREDO DI NO", + "DIMI, OH ERUDITO FILOSOFO, C'\324 QUALCUNA RELAZIONE CAUSA-EFETTO TRA LA VELOCIT\267 E LA PANCETA?", + "VA BENE, SMETTILA. COMUNQUE NON SO PERCHE HO DETTO QUESTO", + // 235 + "COSA FAI QU\336 FILOSOFANDO, CHE NON STAI MANGIANDO GENTE?", + "COME MAI?", + "SENTI, PUOI RIPETERE QUELLO DI \"INCLINAZIONI PRE-EVOLUTIVE\"?", + "SI SI, QUELLA STORIA CHE MI HAI RACCONTATO PRIMA. PERCHE NON HO CAPITO MOLTO BENE.", + "NO, MEGLIO NON DICO NULLA, NON VOGLIO METTERE IL COLTELLO NELLA PIAGA...", + // 240 + "SI, MI DICA?", + "SI, CHE SUCCEDE?", + "AH, ADESSO CHE CITA IL SOGGETTO GLI DIR\343 CHE...", + "", + "AH.., COSA SUCCEDEREBBE SE UN VAMPIRO PRENDEREBBE LA RICETA..", + // 245 + "NIENTE. SENTI, QUESTO SEMBRA UN POSTICCIO MESSO SUL COPIONE PER FINIRE PRESTO IL VIDEO-GIOCO?. BENE, FORSE, NO", + "\324 VUOTO!", + "PERCHE HAI RUBATO IL MIO AMORE, B.J., SENZA LEI LA MIA VITA NON HA SENSO", + "-IL SUO CERVELLO?!", + "NO NIENTE, MA CREDO CHE ALLA FINE IL TUO PICCOLINO MOSTRO MI HA FATTO ARRABBIARE", + // 250 + "SANTA MADONNA AIUTAMI!", + "NON TE LA CAVEREI. SICURO CHE APPARISCE SUPERMAN E MI LIBERA!", + "CHE SCHIFFO DI VIDEO-GIOCO NEL CUI MUORE IL PROTAGONISTA", + "UN ATTIMO, COSA SUCCEDE COL MIO ULTIMO DESIDERIO?", + "-HA,HA! ORA SONO IMMUNIZZATO CONTRO TE, MALEDETTO DEMONIO. QUESTA SIGARETTA \324 UNA POZIONE ANTI-VAMPIRI CHE MI HA DATTO VON BRAUN", + // 255 + "SI CERTO. MA NON RIUSCIRAI MAI A FARMI DIRTI LA RICETA", + "POSSO SOPPORTARE LA TORTURA, ANZI CREARLA", + "-NO, PER FAVORE!- PARLER\220, MA NON FARMI QUESTO!", + "BENE, TI HO GI\267 DETTO QUELLO CHE VOLEVI SAPERE. ORA LIBERA B.J. E ME, E LASCIACI PERDERE", + "-B.J-.! COSA FAI QU\336? DOV'\324 DRASCULA?", + // 260 + "CHE PERVERSO! SOLTANTO PERCH'\324 NOBILE PENSA CHE HA IL DIRITTO SU TUTTI QUANTI", + "ABASSO LA ARISTOCRAZIA!", + "FORZA I POVERI DEL MONDOOO...", + "E QUELLO CHE VEDO \324 CHE TI HA INCATENATO ANZI CON LUCCHETTO", + "O.K., NON AVRAI UNA FONCINA?", + // 265 + "BENE BENE, NON PRENDERTELA COS\336, CI PENSER\220 IO", + "EH, BARISTA", + "COME VA LA PARTITA?", + "CHI?", + "MA NON VEDI CHE DRASCULA \324 QU\336?", + // 270 + "ANDIAMO A UCCIDERLO", + "SERVIMI UN DRINK..", + "NIENTE. HO DIMENTICATO COSA VOLEVO DIRTI", + "O\247MI\247SERVI\247UN\247DRINK\247O\247MI\247METTO\247A\247SUONARE\247IL\247PIANOFORTE", + "QUANTO MANCA PER LA FINE DELLA PARTITA?", + // 275 + "BUONA SERA", + "COME VA IGOR? VAI CON LA GOBBA? -HI,HI,HI,CHE BUONO!", + "CHE STAI FACENDO?", + "NO", + "ALLORA METTITI GLI OCCHIALI", + // 280 + "COSA \324 QUELLA DELLA ORGIA SOPRANNATURALE?", + "VA BENE, NON COTINUARE, MI FACCIO IDEA", + "NON POTREI DIRMI DOV'\324 DRASCULA?", + "DAIII, PER FAVORE", + "PER CHE NO?", + // 285 + "AH, MA DORME DI NOTTE?", + "BENE, ALLORA IN BOCCA IL LUPO CON I REDDITI", + "DEVO PROPRIO PARLARE CON LUI", + "EOOOO, SCHELETROOO!", + "OH DIO! UN MORTO CHE PARLA!", + // 290 + "RACCONTAMI. COME MAI SEI VENUTO QU\336?", + "E PER CHE DRASCULA VUOLE CREARE UN MOSTRO?", + "COME TI CHIAMI, AMICO SCHELETRO?", + "SENTI, NON VUOI QUALCOSA DA MANGIARE?", + "DEVI AVERE LO STOMACO VUOTO .- HI,HI,HI!", + // 295 + "LA VERIT\267 \324 CHE NON MI VA DI PARLARE ADESSO", + "VANFFAN ( BIP ) FIGLIO DI .......( BIIP ).. VAI A FARE....( BIIIP )", + "IO LA AMAVO DAVVERO. O.K., SONO D'ACCCORDO CHE NON ERA MOLTO INTELLIGENTE, MA NESSUNO \324 PERFETTO, NO?", + "ANZI, AVEVA UN CORPO DA PAURA", + "ORMAI NON SAR\343 PI\353 QUELLO DI PRIMA .MI RICHIUDER\343 IN UN MONASTERO, E LASCIER\343 LA MIA VITA PERDERE", + // 300 + "NIENTE POTR\267 FARMI USCIRE DI QUESTA MISERIA PERCHE...", + "DI CHI? DI CHI?", + "VOGLIO ESSERE PIRATA", + "VOGLIO ESSERE PROGRAMMATORE", + "RACCONTAMI QUALCOSA SU GARIBALDI", + // 305 + "CONTINUER\343 A GIOCARE E DIMENTICHER\343 CHE VI HO VISTI", + "MA CHI AVR\267 PENSATO QUESTA SCIOCHEZZA!", + "\324 UNA BORSA COME QUELLA DI MIA NONNA", + "MA CHE FIGO SONO!", + "PI\353 MI VEDO PI\353 MI PIACCIO", + // 310 + "E POI COME MI CHIUDO?", + "PRIMA DEVO APRIRMI, VERO?", + "ST\343 BENE DOVE SONO", + "MI HO GI\267 PRESSO", + "CIAO IO", + // 315 + "ME GLI INDOSSER\343 QUANDO SIA LA OCCASIONE OPORTUNA", + "NON VEDO NIENTE DI SPECIALE", + "\324 BENE DOV'\324", + "E PER CHE?", + "NON CE LA FACCIO", + // 320 + "CIAO TU", + "\324 IL SEPOLCRO DELLO ZIO PEPPINO", + "EOOOO, ZIO PEPPINOOOO!", + "NO.NON VOGLIO TAGLIARMI UN' ALTRA VOLTA", + "-EHEM,EHEM..!", + // 325 + "GNAMM, EMMM,!", + "-SI, COF, COF!", + "GUARDA, C'\324 UNA GOMMA QU\336 ATTACATA", + "\324 IL TELEFONINO CHE MI HANNO REGALATO A NATALE", + "COM'\324 ALTO", + // 330 + "ESCI AL BALCONE GIULIETTA!", + "TU SEI LA LUCE CHE ILLUMINA LA MIA VITA!", + "EH, PORTA, CHE C'\324?", + "EOOOO, SPENDITRICE DI TABACCO DI TRANSILVANIAAA", + "\324 UNA SPENDITRICE DI TABACCO", + // 335 + "HO UN'ALTRA MONETA DENTRO", + "NO. HO DECISSO SMETTERE DI FUMARE E DI BERE", + "DA OGGI SAR\343 SOLTANTO PER LE DONNE", + "QUESTO \324 UNA TRUFFA! NON \324 USCITO NULLA", + "ALLA FINE!", + // 340 + "CHE TI HO DETTO?, UN BAULE", + "CIAO BAULE, TI CHIAMI COME MIO CUGINO CHE SI CHIAMA RAUL..E", + "HO TROVATO LA BORSA DI B.J.", + "MIO DIO, NON MI RIFLETTO, SONO UN VAMPIRO!", + "...AH, NO, \324 UN DISEGNO", + // 345 + "SPECCHIO DELLE MIE BRAME: CHI \220 ILPI\351 BELLO DEL REAME?", + "NON VUOLE APRIRMI", + "MOLTO BENE. MI HO MESSO I TAPPI", + "\324 UN DIPLOMA DI CACCIA-VAMPIRI OMOLOGATO DALLA UNVERSIT\267 DI CAMBRIDGE", + "NO. MANCANO ANCORA GLI INGREDIENTI, NON MERITA LA PENA CHE SIA SVEGLIATO", + // 350 + "NON HO SOLDI", + "\324 UNA LAMPADA BRITANICA", + "BARISTA! AIUTAMI!", + "HA COMPARITO UN VAMPIRO ED HA PRESSO LA MIA FIDANZATA", + "MA NON MI AIUTER\267", + // 355 + "MORTA? CHE VUOLE DIRE?", + "- EHEM!", + "UN VAMPIRO HA SEQUESTRATO LA RAGAZZA DELLA 506!", + "DEVI AIUTARMI!", + "NON SAI SUONARE NESSUNA DI \"ELIO E LE STORIE TESSE\"", + // 360 + "COME TI SOPPORTI, SUONANDO SEMPRE LO STESSO?", + "ALLORA COME MI SENTI?", + "PRESTAMI I TAPPI", + "DAI, TE LI RESTITUISCO SUBITO", + "DAIIII...", + // 365 + "CIAO. DEVO UCCIDERE UN VAMPIRO", + "", + "COSA DICI? IN TRANSILVANO?", + "CHI \324 LO ZIO PEPPINO?", + "MA CHE SUCCEDE CON DRASCULA?", + // 370 + "CHI \324 VON BRAUN?", + "E PER CHE NON LO FA?", + "E DOVE POSSO TROVARE VON BRAUN?", + "GRAZIE E CIAO, SOGNI D'ORO", + "SAR\267 MEGLIO BUSSARE PRIMA", + // 375 + "\324 LEI IL PROFESSORE VON BRAUN?", + "E MI POTREBBE DIRE DOVE POSSO ...?", + "NON CREDO SIA IL NANNO GANIMEDI", + "-PROFESSORE!", + "AIUTAMI! LA VITA DEL MIO AMORE DIPENDE DI LEI!", + // 380 + "VA BENE, NON HO BISOGNO DEL SUO AIUTO", + "O.K. ME NE VADO", + "NON AVERE PAURA. INSIEME VINCEREMO DRASCULA", + "ALLORA PER CHE NON MI AIUTA?", + "IO CE LE HO", + // 385 + "SI CE LE HO", + "D'ACCORDO", + "...EHH...SI", + "VENGO A RIENTRARE A QUESTA CABINA", + "SONO PRONTO PER FARE LA PROVA", + // 390 + "VA BENE, VECCHIETO. SONO VENUTO PER IL MIO SOLDI", + "NO, NIENTE. ME NE GI\267 ANDAVO", + "SCUSA", + "TI \324 INTERESANTE QUESTO LIBRO? HA PARTITURE DI TCIAKOWSKY", + "COME POSSO UCCIDERE UN VAMPIRO?", + // 395 + "NON TI HANNO DETTO CHE NON \324 BUONO DORMIRE IN CATTIVA POSIZIONE?", + "\324 QUELLO CHE SEMPRE DICE MIA MADRE", + "PER CHE DRASCULA NON FU RIUSCITO A UCCIDERTI?", + "E COSA FU?", + "BENISSIMO! HA LEI LA POZIONE DI IMMUNIT\267...!", + // 400 + "ALLORA", + "MOLTO BENE", + "MI PUO RIPETERE COSA BISOGNO PER QUELLA POZIONE?", + "VADO VIA VELOCE A TROVARLO", + "SENTA, COSA \324 SUCCESO CON IL PIANISTA?", + // 405 + "HO GI\267 TUTTI GLI INGREDIENTI DI QUESTA POZIONE", + "UNA DOMANDA: COSA \324 QUELLA DI ALUCSARD ETEREUM?", + "DICA, DICA..", + "E DOV'\324 QUELLA GROTTA?", + "CHE C'\324? NON AVETE TRIBUNALE?", + // 410 + "...MA ...E SE TROVO PI\353 VAMPIRI?", + "\324 UN VAMPIRO CHE NON MI FA PASSARE", + "SI ASSOMIGLIA A YODA, MA PI\353 ALTO", + "EH, YODA. SE MI FAI PASSARE TI DAR\343 CENTO LIRE", + "BENE, O.K., NON POSSO DIRTI NULLA", + // 415 + "CIAO VAMPIRO, BELLA NOTTE, VERO?", + "TI HANNO DETTO QUALCHE VOLTA CHE TI ASSOMIGLII A YODA?", + "SEI UN VAMPIRO O UN DIPINTO ALL'OLEO?", + "MEGLIO NON DIRTI NIENTE, PERCHE POI TI ARRABBII", + "\324 CHIUSA CON LA CHIAVE", + // 420 + "SE PROVO, LA GAZZA MI POTREI CAVARE UN OCCHIO", + "\324 CHIUSA! DIO MIO, CHE PAURA!", + "LE CERNIERE SONO OSSIDATE", + "LA DENTRO C'\324 SOLTANTO UN BARATOLO DI FARINA", + "QUESTO HA TOLTO L'OSSIDO", + // 425 + "HO TROVATO UNA TALEA DI LEGNO DI PINO", + "PRENDER\343 QUESTO CH'\220 PI\353 GROSSO", + "BENE, CREDO DI POTERE TOGLIERMI QUESTO STUPIDO COSTUME", + "\"CORRIDOIO AI TORRIONI CHIUSO PER LAVORI IN CORSO. PER FAVORE, PER LA PORTA PRINCIPALE. SCUSATE PER IL DISTURBO\"", + "..\324 PALLIDO, HA DENTI CANINI, HA CIUFFO E UTILIZA MANTELLO...- SICURO CH'\324 DRASCULA!", + // 430 + "B.J., B.J., STAI BENE?", + "SI, SO CH'\324 SCEMA MA MI SENTO SOLISSIMO", + "NON AVRAI UNA CHIAVE PER CASO, VERO?", + "- E SICURO CHE NON HAI UN GRIMALDELLO?", + "DAMI UNA FONCINA. VADO A FARE COME MCGYVER", + // 435 + "NON MUOVERTI, TORNO SUBITO", + "- MANAGIA!- SI \324 ROTTA!", + "OLE, ANCHE MI HO FATTO LA BARBA!", + "SI, CARO?", + "NON ARRIVA", + // 440 + "IL PIANISTA NON C'\324", + "UN DRINK TRANSILVANO", + "ANCORA NON HO CAMERA", + "SEMBRA CHE FU RISUCCHIATO NELLO SCARICO DELLA VASCA E HA DECISO APRIRE UN BAR", + "\324 UBRIACO PERSO", + // 445 + "QUESTI CAPELLI.... CREDO CHE MI FANNO RICORDARE A QUALCUNO", + "\324 UNO SCHELETRO OSSUTO", + "GUARDA! MIGUEL BOSE!", + "\324 ADDORMENTATO. SAREBBE UN PECCATO SVEGLIARGLI", + "\324 PI\353 BRUTTO CHE BEGNINI", + // 450 + "UN FERETRO DI LEGNO DI PINO", + "MI TAGLIER\267 A FETTINI, COME UN SALSICCIOTTO", + "NON MI PIACCIONO I PENDOLI. PREFERISCO LE CARCIOFE", + "LE MIE MANI SONO LEGATE. NON CE LA FAR\343", + "\324 OVVIO CH'\324 UNA PORTA SEGRETA", + // 455 + "MI IGNORANO", + "-DAIII!", + "NEL PRIMO COPIONE SI MUOVEVA, MA IL VIDEO-GIOCO \220 USCITO DAL BUDGET E NON HANNO POTUTO PAGARMI UNA PALESTRA E NON SONO GONFFIATO", + "SEMBRA CH'\324 UN P\343 ALLENTATA DAL MURO", + "NON CREDO CHE MI SIA UTILE. \324 TROPPO UMIDA PER ACCENDERLA.", + // 460 + "AL LATO OVEST? -N\324 PAZZO, CHI SA CHE CI SAR\267 LI!", + "HA DEI BELLI DISEGNI TRANSILVANI", + "", + "CHE PENA CHE NON CI SIA DENTRO UN AGNELLINO ARRROSTANDOSI", + "LA ULTIMA VOLTA CHE APRII UN FORNO, LA CASA SALT\220 PER ARIA", + // 465 + "LO SCUDO DELLA SCUADRA DI CALCIO DI TRANSILVANIA", + "E PER CHE? PER INDOSARLA SULLA TESTA?", + "NON CREDO CHE I CASSETI SIANO DI QUELLI CHE SI APPRONO", + "NON VOGLIO SAPERE IL CIBO CHE CI SAR\267 LA DENTRO!", + "HO L'IMPRESSIONE CH'\324 IMPRESSIONISTA", + // 470 + "LA NOTTE SI IMPADRONA DI TUTTI QUANTI... CHE PAURA?", + "\324 OSTACOLATA", + "\324 IL RE, NON LO AVEVI IMAGINATO?", + "NO, NE UNO A CASA, ANZI GLI DO DA MANGIARE", + "UNA SCAFFALATURA CON LIBRI ED ALTRE COSE", + // 475 + "E A CHI CHIAMO A QUESTE ORE?", + "\"COME FARE LA DECLARAZIONE DI REDDITI\"- CHE INTERESSANTE!", + "NE HO UNO A CASA, CREDO CH'\324 UN BEST-SELLER MONDIALE", + "UNA CHIAVE COMPLETAMENTE NORMALE", + "MI SA QHE QUESTA NON \220 DI QU\336", + // 480 + "EH, SONO PATATINE FRITE A FORMA DI DENTI CANINI ! MI AFASCINA", + "NON CREDO CHE SIA IL MOMENTO MIGLIORE PER METTERSI A MANGIARE DOLCI, L'ESSERE PI\353 CATTIVO DEL MONDO ha nelle sue mani la mia fidanzzata", + "COME MI ST\343 DIVERTENDO UCCIDENDO VAMPIRI CON QUESTO!", + "VEDIAMO SE APPARISCE UN ALTRO PRESTO", + "NO, DEVE ESSERE CON UN VAMPIRO SPORCO E SCHIFFOSO COME QUELLO DI PRIMA", + // 485 + "\324 L'AUTENTICA PARRUCA CHE UTILIZZ\343 ELVIS QUANDO DIVENT\343 PELATO", + "\220 FARINA MA NON POSSO DIRE MARCHE", + "FORSE IN UN ALTRO MOMENTO. OK?", + "\220 UNA ASCIA BUONISSIMA, CHE PENA CHE NON CI SIA QU\336 VICINO NESSUNA TESTA DI VAMPIRO", + "NO. NEL FONDO SONO UNA BRAVISSIMA PERSONA", + // 490 + "\324 IL DEODORANTE DELLA TACHER -HI,HI,HI!", + "\324 UN MANTELLO ABBASTANZA CARINO", + "", + "COME TUTTI I RAMI DI TUTTI GLI ALBERI DEL MONDO, CIO\324 MICA SPEZIALE", + "OH, INCREDIBILE!- UNA CORDA IN UNA AVVENTURA GRAFICA!", + // 495 + "MI DOMANDO A CHE SERVE...", + "UNA CORDA LEGATA A UNA BRANCA, O UNA BRANCA LEGATA A UNA CORDA, DIPENDE COME SI GUARDI", + "SEMBRA CHE QUESTA GAZZA HA CATIVE INTENZIONI", + "DAI.., NON LA DICO NULLA CHE POI SI ARRABBIA", + "SEMBRA ESSERE MORTA, MA NON \220 VERO - EH?", + // 500 + "NESSUN ANIMALE \220 STATO MALTRATO DURANTE LE RIPRESE DI QUESTO VIDEO-GIOCO", +}, +}; + +const char *_textd[NUM_LANGS][NUM_TEXTD] = { +{ + // 0 + "", + "HEY IGOR, HOW IS EVERYTHING GOING?", + "IT'S ALWAYS THE SAME STORY EVERYTIME THERE'S A GOOD GAME ON THE SATELLITE! ANYWAY, WE'LL GO WATCH IT IN THE BAR, AS USUAL", + "IGOR LISTEN CAREFULLY MAN, WE ARE GOING TO START WITH PHASE NUMBER ONE OF MY PLAN TO CONQUER THE WORLD", + "FIRST WE'LL CAPTURE SOME LIGHTNING THEN WE'LL DEMAGNETIZE IT WITH OUR INDIFIBULATOR. THE ELECTRICITY WILL FLOW THROUGH TO MY MONSTER AND HE WILL LIVE!", + // 5 + "IF EVERYTHING WORKS OUT ALL RIGHT, THIS WILL BE THE BEGINNING OF A GREAT ARMY THAT WILL CONQUER THE WORLD FOR ME. HA, HA", + "THE MONSTERS WILL DESTROY ALL THE ARMY'S WEAPONS IN THE WORLD, MEANWHILE, WE'LL BE SAFE IN THE PIECES OF LAND I PLAN TO BUY IN GIBRALTAR", + "WE'LL SET UP A COUP. GOVERNMENTS ALL OVER THE WORLD WILL BE UNCOVERED AND THEIR COUNTRIES WILL SURRENDER TO ME!", + "I'LL BECOME THE FIRST BAD GUY IN HISTORY TO MAKE IT ! HA, HA!", + "I'M NOT TALKING TO YOU, IDIOT! I'M JUST GIVING YOU THE PLOT. ALL RIGHT, EVERYTHING READY?", + // 10 + "THE TIME HAS COME! TURN ON THE ALKALINE BATTERIES' SWITCH", + "DAMN IT! WHAT WENT WRONG?", + "ARE YOU SURE YOU CHECKED IT ALL AND THERE WAS NOTHING MISSING? LATELY YOU'VE BEEN MESSING AROUND WITH THAT STUFF ABOUT TAXES AND I DON'T KNOW MAN...", + "YOU STUPID THING! YOU FORGOT TO CONNECT THE INDIFIBULATOR. THE SCREWS HAVE MAGNETIZED AND HIS BRAIN HAS PROBABLY BURNT", + "YOU ARE DEAD, YOU ARE DEAD...WAIT TILL I GET YOU!", + // 15 + "SHUT UP! I'LL GET ANOTHER BRAIN TOMORROW AND THEN WE WILL REPEAT THE EXPERIMENT", + "THIS TIME I'LL GET A WOMAN'S BRAIN. SHINY AND NOT USED YET...HA, HA, HA, GOOD ONE!", + "SO WHAT? I'M THE BAD GUY, RIGHT? SO I CAN BE AS FULL OF MACHISMO AS I WANT, ALL RIGHT? AND IF YOU SAY ANOTHER THING I'LL TURN YOUR HUMP BACK TO FRONT!", + "HA, HA, HA. YOU FELL FOR IT!! NOW YOU ARE GOING TO PAY FOR DARING TO FIGHT ME! IGOR, TAKE HIM TO THE PENDULUM OF DEATH!", + "AND SO, TELL ME, YOU STUPID HUMAN. HOW COME YOU WANT TO DESTROY ME?", + // 20 + "THAT'S BEAUTIFUL!. IF IT WASN'T BECAUSE IT MAKES ME LAUGH, I WOULD CRY", + "I PLAN TO USE YOUR GIRLFRIEND'S BRAIN, TO HELP ME CONQUER THE WORLD", + "YES, SURE! I'LL TAKE IT FROM HER AND GIVE IT TO MY FRUSKYNSTEIN. THE WORLD WILL BE MINE WITH IT, HA, HA", + "WHAT!? YOU'RE DEAD, MAN! I'M GOING TO...YOU REALLY GOT ME ANGRY MAN...COME ON, PREPARE TO DIE!", + "HA, HA, HA. NOT EVEN IN YOUR WILDEST DREAMS!", + // 25 + "YES, ISN'T IT? HA, HA", + "ALL RIGHT, ALL RIGHT. BUT DO IT QUICKLY, OK?", + "PUT THAT CIGARETTE OUT NOW! I CAN'T STAND YOU ANYMORE!", + "SO, DOES THAT BREW HAVE IMMUNISATING EFFECTS FOR VAMPIRES??", + "WELL, WE'LL SEE ABOUT THAT", + // 30 + "OK, LET'S SEE. IGOR, BRING ME THE CD \"SCRATCHING YOUR NAILS ALL OVER THE BLACKBOARD\"", + "NO WAY. THE GIRL STAYS WITH ME. YOU'RE STAYING THERE UNTIL THE PENDULUM CUTS YOU INTO THIN SLICES. HA, HA, HA", + "MAN I'M SO BAD... COME ON IGOR, LET'S MAKE THE BREW AND CONQUER THE WORLD", + "WHATS HAPPENED NOW?", + "YES, WHAT?...OH, DAMNED, THE GAME!", + // 35 + "I FORGOT ABOUT THAT. GET THE GIRL AND LET'S GO AND WATCH IT. WE CAN CONQUER THE WORLD LATER", + "THANKS MAN, I WAS THIRSTY", + "OH, THE CRUCIFIX!!...THE CRUCIFIX...!", + "I DIDN'T NOTICE THAT BEAUTIFUL CRUCIFIX!", + "LEAVE ME ALONE!, I'M WATCHING THE GAME", + // 40 + "", + "", + "", + "", + "", + // 45 + "", + "", + "", + "", + "", + // 50 + "", + "", + "", + "", + "", + // 55 + "", + "HI BLIND MAN. HOW IT'S GOING?", + "HOW DO YOU KNOW I'M A FOREIGNER?", + "YOU LOOK BLIND. BECAUSE YOU'RE WEARING DARK GLASSES LIKE STEVIE WONDER", + "LOOK, I'M SORRY, I DIDN'T KNOW YOU COULD SEE", + // 60 + "BUT YOU JUST TOLD ME YOU WEREN'T BLIND", + "BUT IF YOU CAN'T SEE", + "OOOOKAY. SORRY. IN THAT CASE, HI THERE SIGHTLESS PERSON", + "I'M JOHN HACKER. YOU MUST BE ONE OF THOSE CHARACTERS WHO WILL HELP ME OUT IN EXCHANGE FOR AN OBJECT. AREN'T YOU? EH? AREN'T YOU?", + "UUUUM, EXCUSE ME FOR ASKING BLIN... SIGHTLESS PERSON! BUT WHAT SORT OF JOB IS THAT, TO GIVE SICKLES IN EXCHANGE FOR MONEY WHILE YOU PLAY THE ACCORDION?", + // 65 + "AH YES, I SUPPOSE THAT'S TRUE. GOODBYE SIGHTLESS PERSON... BLIND MAN", + "HERE IS THE LARGE AMOUNT OF MONEY YOU ASKED ME FOR", + "I HOPE SO", + "HI THERE FOREIGNER", + "AND HOW DO YOU KNOW I'M BLIND?", + // 70 + "AND I'M NOT KIDDING YOU BUT YOURS LOOK LIKE WOODY ALLEN'S", + "NO, I CAN'T SEE", + "AND I'M NOT", + "OH OF COURSE. JUST BECAUSE I CAN'T SEE, YOU ACCUSE ME OF BEING BLIND", + "HI THERE FOREIGNER! WHAT ARE YOU DOING IN TRANSILVANIA?", + // 75 + "THAT'S RIGHT, FOREIGNER. IN EXCHANGE FOR A LARGE SUM OF MONEY I'LL GIVE YOU A SICKLE YOU NEVER KNOW WHEN YOU MIGHT NEED IT", + "SHHHH, I'M A SICKLES TRADER, THAT'S WHY I HAVE TO HIDE", + "BECAUSE YOU TOLD ME BEFORE, DIDN'T YOU?", + "THANKS FOREIGNER. HERE'S THE SICKLE IN EXCHANGE. YOU'LL FIND IT REALLY USEFUL LATER ON, HONESTLY.", + "", + // 80 + "", + "", + "NOTHING, NOTHING AT ALL", + "BLA, BLA, BLA." +}, +{ + // 0 + "", + "\250COMO VA TODO, IGOR?", + "\255SIEMPRE QUE HAY UN BUEN PARTIDO EN LA PARABOLICA PASA LO MISMO! EN FIN, IREMOS A VERLO AL BAR COMO DE COSTUMBRE", + "AHORA IGOR, ATIENDE. VAMOS A REALIZAR LA FASE 1 DE MI PLAN PARA CONQUISTAR EL MUNDO", + "PRIMERO CAPTAREMOS UNO DE LOS RAYOS DE LA TORMENTA Y LO DESMAGNETIZAREMOS CON NUESTRO INDIFIBULADOR. LA ELECTRICIDAD PASARA A MI MONSTRUO \255Y LE DARA VIDA! ", + // 5 + "SI TODO SALE BIEN ESTE NO SERA MAS QUE EL PRIMERO DE UN INMENSO EJERCITO QUE CONQUISTARA EL MUNDO PARA MI, JA, JA, JA", + "LOS MONSTRUOS DESTRUIRAN TODAS LAS ARMAS DE TODOS LOS EJERCITOS DEL MUNDO, MIENTRAS NOSOTROS NOS REFUGIAMOS EN UNOS TERRENOS QUE HE COMPRADO EN GIBRALTAR", + "ENTONCES, DAREMOS UN GOLPE DE ESTADO, LOS GOBIERNOS DEL MUNDO NO TENDRAN CON QUE PROTEGERSE, Y PONDRAN SUS PAISES A MIS PIES", + "\255SERE EL PRIMER MALO EN LA HISTORIA QUE LO CONSIGA! \255JUA, JUA, JUA!", + "\255A TI NADA, IDIOTA! ESTOY EXPONIENDO LA TRAMA. BIEN \250ESTA TODO LISTO?", + // 10 + "\255LLEGO EL MOMENTO, ENTONCES! \255DALE AL INTERRUPTOR DE LAS PILAS ALCALINAS! ", + "\255MALDITA SEA! \250QUE ES LO QUE HA PODIDO FALLAR?", + "\250SEGURO QUE LO REVISASTE BIEN Y NO FALTABA NADA? ULTIMAMENTE ESTAS CON ESO DE LA RENTA QUE NO VES UN PIJO A DOS METROS", + "\255IDIOTA, NO HABIAS CONECTADO EL INDIFIBULADOR! LOS TORNILLOS SE HABRAN MAGNETIZADO Y SE LE HABRA QUEMADO EL CEREBRO", + "ESTAS MUERTO, ESTAS MUERTO, COMO TE COJA...", + // 15 + "\255A CALLAR! MA\245ANA IRE A POR OTRO CEREBRO Y REPETIREMOS EL EXPERIMENTO ", + "NO. ESTA VEZ TRAERE UNO DE MUJER, PARA QUE ESTE NUEVECITO Y SIN ESTRENAR. JA, JA, JA, QUE MALISIMA DE CHISTA", + "\250Y QUE? YO SOY EL MALO Y SOY TODO LO MACHISTA QUE QUIERA \250ENTENDIDO? Y COMO ME VUELVAS A RECHISTAR TE TRAGAS LA CHEPA ", + "JA, JA, JA. OTRO QUE HA CAIDO. AHORA VAS A PAGAR TU OSADIA DE QUERER ACABAR CONMIGO. \255IGOR, AL PENDULO DE LA MUERTE!", + "DIME, HUMANO ESTUPIDO, \250COMO ES QUE TE HA DADO POR QUERER DESTRUIRME? ", + // 20 + "\255QUE BONITO!, ME PONDRIA A LLORAR SI NO FUERA PORQUE ME HACE GRACIA", + "A TU NOVIA LA NECESITO PARA QUE ME AYUDE CON SU CEREBRO A CONQUISTAR EL MUNDO", + "\255SI, JA! SE LO QUITARE Y SE LO PONDRE A MI FRUSKYNSTEIN, Y CON EL DOMINARE EL MUNDO, JA, JA, JA", + "\255\250QUE?! \255ESTAS MUERTO, ESTAS MUERTO! TE VOY A... ME HAS TOCADO LAS NARICES, VAMOS. \255PREPARATE A SER MATADO!", + "JA, JA, JA. QUE TE CREES TU ESO", + // 25 + "SI, \250VERDAD? JA, JA, JA ", + "AH, ESTA BIEN, PUEDES FUMARTE EL ULTIMO CIGARRILLO, PERO DEPRISITA", + "APAGA YA ESE CIGARRILLO, ME TIENES HARTO YA", + "Y DIME, \250ESA POCION TIENE EL EFECTO CONTRARIO?", + "ESO YA LO VEREMOS...", + // 30 + "BUENO, A VER SI ES VERDAD. IGOR, TRAE EL COMPACT DISC DE U\245AS ARRASCANDO UNA PIZARRA", + "ESO NI SO\245ARLO. LA CHICA SE QUEDA CONMIGO, Y TU TE QUEDAS AHI HASTA QUE EL PENDULO TE CORTE EL RODAJITAS. JA, JA, JA", + "PERO QUE MALO QUE SOY, VAMOS IGOR, VAMOS A PREPARAR LA POCION Y CONQUISTAR EL MUNDO", + "\250QUE PASA AHORA?", + "SI, \250QUE PASA?... \255ANDA, EL PARTIDO!", + // 35 + "SE ME HABIA OLVIDADO. COGE A LA CHICA Y VAMONOS A VERLE. YA CONQUISTARE EL MUNDO DESPUES", + "GRACIAS MACHO, TENIA SED", + "\255ArgH! \255ESE CRUCIFIJO! \255ESE CRUCIFIJO!...", + "QUE BONITO ES ESE CRUCIFIJO, NO ME HABIA YO FIJADO", + "DEJAME, QUE ESTOY VIENDO EL FUTBOL", + // 40 + "", + "", + "", + "", + "", + // 45 + "", + "", + "", + "", + "", + // 50 + "", + "", + "", + "", + "", + // 55 + "", + "Hola ciego. \250Que tal?", + "\250Como sabes que soy extranjero?", + "Pareces un ciego. Tienes gafas como serafin zubiri, hablas mirando al frente como Stevie Wonder...", + "Bueno, perdona. No sabia que vieses.", + // 60 + "\250Pero no me acabas de decir que no eres ciego?", + "\255Pero si no ves!", + "Vaaaale. Perdona. En ese caso: Hola invidente.", + "Soy John Hacker, y estoy jugando al Drascula. Tu debes ser el tipico personaje que me ayudara a cambio de un objeto. \250A que si? \250Eh? \250A que si?", + "Em... Perdona que te pregunte cieg..\255Invidente!. Pero... \250Que clase de profesion es la tuya, de dar hoces a cambio de dinero, mientras tocas el acordeon?", + // 65 + "Ah, si. Es verdad. Adios invidente...(ciego)", + "Ahi tienes la cuantiosa cantidad de dinero que me pediste.", + "Mas te vale.", + "Hola extranjero.", + "Y tu... \250Como sabes que soy ciego?", + // 70 + "Y tu hablas como el hijo de Bill Cosby y no me meto contigo.", + "No, si no veo.", + "Y no lo soy.", + "\255Oh, claro! Como no veo se me tacha de ciego \250no?", + "\255Hola Extranjero! y \250que haces en Transilvania?", + // 75 + "Correcto extranjero. A cambio de una cuantiosa suma de dinero, te dare una hoz, para cuando te haga falta.", + "Shhhhhh. Soy traficante de hoces, tengo que disimular.", + "Porque me lo has dicho antes \250no?", + "Gracias extranjero. Aqui tienes tu hoz a cambio. Un objeto que te sera muy util algo mas adelante... de verdad.", + "", + // 80 + "", + "", + "No, nada", + "\244a, \244a, \244a. que bueno, que bueno." +}, +{ + // 0 + "", + "WIE GEHTS, WIE STEHTS, IGOR ?", + "IMMER WENN auf kabel EIN GUTES SPIEL KOMMT, PASSIERT DAS GLEICHE. NAJA, DANN GUCKEN WIR ES UNS EBEN WIE IMMER IN DER KNEIPE AN", + "JETZT PASS AUF, IGOR. WIR WERDEN JETZT PHASE 1 MEINES WELTEROBERUNGSPLANS STARTEN.", + "Pah, einige GEWITTERBLITZE, die wir MIT dem VIBROXATOR ENTMAGNETISIEREN. und der strom wird meinem MONSTERCHEN leben einhauchen.", + // 5 + "WENN ALLES KLAPPT WIRD ER DER ERSTE SOLDAT EINER RIESIGEN ARMEE SEIN, DIE DIE WELT FueR MICH EROBERN WIRD, HARHARHAR", + "DIE MONSTER WERDEN ALLE WAFFEN IN DER GANZEN WELT VERNICHTEN WaeHREND WIR UNS AUF UNSERE LaeNDEREIEN ZURueCKZIEHEN, DIE ICH UNS AUF HELGOLAND GEKAUFT HABE.", + "DANN WERDEN WIR EINEN STAATSSTREICH MACHEN UND DIE REGIERUNGEN DIESER WELT WERDEN AUFGEBEN UND SICH MIR ZU FueSSEN WERFEN", + "ICH WERDE DER ERSTE BoeSE IN DER GESCHICHTE SEIN, DER DAS SCHAFFT, HUAHUAHUA !", + "GAR NICHTS, IDIOT ! ICH ERZaeHLE DIE HANDLUNG .O.K . IST ALLES FERTIG ?", + // 10 + "ES IST ALSO SOWEIT !DRueCK AUF DEN SCHALTER MIT DEN ALKALI-BATTERIEN !", + "VERFLIXT NOCHMAL ! WAS IST DA SCHIEFGELAUFEN ?", + "BIST DU SICHER, DASS DU ALLES GECHECKT HAST ? SEIT NEUESTEM DENKST DU NUR NOCH AN DEINE EINKOMMENSERKLaeRUNG UND KRIEGST NICHTS MEHR MIT", + "DU IDIOT !DU HAST DEN VIBROXITOR NICHT EINGESCHALTET !JETZT SIND DIE SCHRAUBEN MAGNETISIERT UND IHM WIRD WOHL DAS GEHIRN VERBRANNT SEIN", + "DU BIST EIN TOTER MANN, NA WARTE, WENN ICH DICH KRIEGE...", + // 15 + "HALT DIE KLAPPE !MORGEN HOLE ICH EIN NEUES HIRN UND WIR WIEDERHOLEN DAS EXPERIMENT", + "NEIN, DIESMAL BESORG ICH EIN FRAUENHIRN, DASS NOCH GANZ FRISCH UND UNBENUTZT IST, HAR,HAR,HAR, SUPERJOKE !", + "NA UND ? ICH BIN DER BoeSE UND DER SUPER-MACHO ODER WAS ? UND WENN DU MIR NOCHMAL WIDERSPRICHST KANNST DU DEINEN BUCKEL SCHLUCKEN", + "HARHARHAR,SCHON WIEDER EINER. DU WARST SO DREIST, MICH UMBRINGEN ZU WOLLEN. DAS WIRST DU JETZT BueSSEN. IGOR! ZUM TODESPENDEL MIT IHM !", + "SAG MAL DU DUMMES MENSCHLEIN, WIESO WOLLTEST DU MICH ZERSToeREN ?", + // 20 + "ACH WIE SueSS !ICH KoeNNTE GLATT ANFANGEN ZU HEULEN, WENN ES NICHT SO LUSTIG WaeRE", + "DEINE FREUNDIN BRAUCHE ICH NOCH, DAMIT SIE MIR MIT IHREM HIRN DABEI HILFT, DIE WELT ZU EROBERN", + "JA, HA !ICH WERDE ES RAUSREISSEN UND ES FRUNKSFENSTEIN GEBEN UND DANN WERDE ICH DIE WELT EROBERN,HARHARHAR", + "WAS ? !DU BIST EIN TOTER MANN! ICH WERDE DICH... DU HAST MICH VERaePPELT,GANZ KLAR . MACH DEIN TESTAMENT!", + "HARHARHAR, GLAUB DU DAS MAL ", + // 25 + "JA, WIRKLICH ? HARHARHAR", + "JA, SCHON GUT, RAUCH DIR NOCH EINE LETZTE ZIGARETTE, ABER RUCKZUCK", + "MACH MAL DIE ZIGARETTE AUS. MIR IST SCHON SCHLECHT", + "UND SAG MAL, DIESE MISCHUNG HAT DIE GEGENWIRKUNG ?", + "DAS WERDEN WIR JA MAL SEHEN...", + // 30 + "NA, MAL GUCKEN OB DAS STIMMT, IGOR., BRING MAL DIE CD MIT DEN DEM SOUND VON kratzenden FINGERNaeGELN AUF EINER SCHULTAFEL", + "NICHT IM TRAUM. DAS MaeDCHEN BLEIBT BEI MIR UND DU BLEIBST WO DU BIST, BIS DICH DAS PENDEL IN LECKERE SCHEIBCHEN SCHNEIDET, HARHAR", + "WIE BoeSE ICH DOCH BIN. KOMM IGOR, WIR BEREITEN DIE MISCHUNG ZU UND EROBERN DANN DIE WELT", + "WAS IST DENN JETZT WIEDER LOS ?", + "JA, WAS IST LOS ?...VERDAMMT, DAS SPIEL !", + // 35 + "DAS HAB ICH GLATT VERGESSEN. NIMM DAS MaeDCHEN UND LASS UNS DAS SPIEL ANGUCKEN GEHEN . DIE WELT EROBERN WIR DANACH.", + "DANKE, ALTER, ICH HATTE DURST", + "ARGHH! DAS KRUZIFIX DA ! DAS KRUZIFIX !", + "WIE SCHoeN DAS KRUZIFIX DA IST, HAB ICH GAR NICHT BEMERKT", + "LASS MICH, ICH GUCK DOCH GERADE FUSSBALL", + // 40 + "", + "", + "", + "", + "", + // 45 + "", + "", + "", + "", + "", + // 50 + "", + "", + "", + "", + "", + // 55 + "", + "Hallo Blinder. Wie gehts?", + "Woher weisst Du, dass ich nicht von hier bin ?", + "Du siehst wie ein Blinder aus . Du guckst beim Sprechen immer gerade aus, und dann diese Stevie-Wonder-Brille....", + "O.k,entschuldige. Ich dachte, du kannst nichts sehen", + // 60 + "Aber hast Du mir nicht gerade gesagt, dass Du NICHT blind bist?", + "Ich denke, Du siehst nichts ?", + "Okaaay,okaay! Tut mir leid. Also wenn das so ist: Sehkranker ", + "Ich bin Heinz Hacker und spiele Drascula . Du bist bestimmt derjenige, der mir hilft und dafuer irgendwas haben will. Stimmts? Hae? Hab ich recht!?", + "aeh....Entschuldige die Frage, Blind-Sehkranker!Aber...Was hast Du fuer einen komischen Beruf, dass Du Sicheln verkaufst und dabei Akkordeon spielst!", + // 65 + "Ach, klar, stimmt. Auf Wiedersehen Sehkranker...(Blinder)", + "Hier hast Du den Wahnsinnsbatzen Geld, um den Du mich gebeten hast", + "Das ist auch besser so!", + "Hallo Fremder!", + "Und Du...Woher willst Du wissen, dass ich blind bin?", + // 70 + "Und Du bist der Sohn von Bill Cosby und ich werde mich nicht mit Dir anlegen", + "Nein, ich seh doch nichts!", + "Und ich bin es nicht", + "Na super! Nur weil ich nichts sehe bin ich direkt ein Blinder, oder was?", + "Hallo Fremder! Und was machst Du in Transylvanien?", + // 75 + "Richtig, Fremder. Gegen einen Wahnsinnsbatzen Geld bekommst Du von mir eine Sichel damit Du eine hast, wenn Du eine brauchst.", + "Psssssst. Ich bin Sichel-Dealer, ich muss unentdeckt bleiben ", + "Warum hast Du mir das nicht vorher gesagt ?", + "Danke, Fremder. Hier hast du dafuer Deine Sichel. Sie wird Dir nachher noch nuetzlich sein...glaub mir !", + "", + // 80 + "", + "", + "No, nada", + "bla, bla, bla." +}, +{ + // 0 + "", + "COMMENT VA TOUT, IGOR?", + "C'EST TOUJOURS LA M\322ME CHOSE QUAND IL Y A UN BON MATCH \267 LA PARABOLIQUE! ENFIN, ALLONS LE VOIR AU BAR, COMME D'HABITUDE", + "MAINTENANT, COUTE IGOR. NOUS ALLONS RALISER LA PHASE 1 DE MON PLAN POUR CONQURIR LE MONDE", + "D'ABORD, ON SAISIRA L'UNE DES FOUDRES DE L'ORAGE ET ON LA DMAGNTISERAIT AVEC l'INDIFUBULATEUR. LA COURANTE PASSERA DANS MON MONSTRE ET LUI DONNERA LA VIE!", + // 5 + "SI TOUT VA BIEN CELUI-L\267 NE SERA QUE LE PREMIER D'UNE IMMENSE ARME QUE CONQURRA LE MONDE POUR MOI, HA! HA! HA! ", + "LES MONSTRES VONT ANANTIR TOUTES LES ARMES DE TOUTES LES ARMES DU MONDE, TANDIS QUE NOUS NOUS RFUGIONS DANS LES TERRAINS QUE J'AI ACHET \267 GIBRALTAR", + "ALORS, ON DONNERA UN COUP D'TAT. LES GOUVERNEMENTS DU MONDE N'AURONT PAS DE PROTECTION ET SES PAYS SERONT \267 MES PIEDS", + "JE SERAI LE PREMIER MALIN DE L'HISTOIRE \267 Y AVOIR RUSSI! -HOUA! HOUA! HOUA!", + "POUR TOI RIEN, IDIOT! JE PRSENTE LA TRAME. BIEN, TOUT EST PR\322T? ", + // 10 + "LE MOMENT EST ARRIV\220, ALORS! -APPUIE DONC SUR L'INTERRUPTEUR DES BATTERIES ALCALINES! ", + "H\220LAS! QU'EST-CE QUE N'A PAS MARCH\220?", + "C'EST S\352R QUE TU L'AS BIEN R\220VIS\220 ET IL NE MANQUAIT RIEN? DERNI\324REMENT AVEC CETTE HISTOIRE DE LA RENTE TU N'Y VOIS GOUTTE", + "IDIOT! TU N'AVAIS PAS CONNECT\220 L'INFIBULATEUR! LES VIS SE SERONT MAGN\220TIS\220ES ET SA CERVELLE AURA BR\352L\220E", + "TU ES MORT, TU ES MORT, SI JE T'ATTRAPE...", + // 15 + "TAIS-TOI! DEMAIN J'AURAI UNE AUTRE CERVELLE ET ON FERA L'ESSAI \267 NOUVEAU", + "NON, CETTE FOIS J'APPORTERAI UNE DE FEMME POUR QU'ELLE SOIT TOUTE NEUVE ET DE PREMI\324RE MAIN. HA! HA! HA! QUE MALIN DE XISTE", + "ET QUOI? JE SUIS LE MALIN ET TOUT LE SEXISTE QUE JE D\220SIRE, C'EST ENTENDU? SI TU ME R\220PLIQUES ENCORE JE TE FAIS ENGLOUTIR TA BOSSE", + "HA! HA! HA!. UN AUTRE QUI S'EST LAISS\220 PRENDRE. MAINTENANT TU PAIERAS CHER TON AUDACE DE VOULOIR EN FINIR AVEC MOI. -IGOR, AU PENDULE DE LA MORT!", + "DIS-MOI, HUMAIN STUPIDE, POURQUOI TU AS PENS\220 ME D\220TRUIRE? ", + // 20 + "QUE C'EST BEAU! JE SANGLOTERAIS SI CE N'ETAIT PAS DR\342LE", + "J'AI BESOIN DE TA FIANC\220E POUR QU'ELLE M'AIDE \267 CONQU\220RIR LE MONDE AVEC SA CERVELLE", + "OUI, HA! JE LA LUI ARRACHERAI ET L'INSTALLERAI SUR MON FRUSKYNSTEIN, ET AVEC LUI JE VAIS MA\327TRISER LE MONDE, HA! HA! HA!", + "QUOI?! -TU ES MORT, TU ES MORT! JE VAIS TE... TU M'AS CASS\220 LE NEZ, ALLONS, -APPR\322TE-TOI \267 \322TRE TU\220!", + "HA! HA! HA! C'EST-CE QUE TU CROIS", + // 25 + "OUI, N'EST-CE PAS? HA! HA! HA!", + "AH, C'EST BIEN! TU PEUX FUMER LA DERNI\324RE CIGARETTE, MAIS D\220P\322CHE-TOI!", + "\220TEINS D\220J\267 CETTE CIGARETTE, J'EN A RAS LE BOL!", + "ET DIS-MOIS, CETTE POTION, A-T-ELLE L'EFFET CONTRAIRE?", + "ON VERRA \200A...", + // 30 + "EH BIEN, ON VERRA SI C'EST VRAI. IGOR, APPORTE LE COMPACT DISC D'ONGLES GRATTANT UN TABLEAU", + "N'Y PENSES PAS. LA FILLE RESTE AVEC MOI, ET TOI TU RESTERAS L\267 JUSQU'\267 QUE LA PENDULE TE COUPE EN PETITES TRANCHES. HA! HA! HA!", + "MAIS QUE JE SUIS MALIN. ON Y VA, IGOR, ALLONS PR\220PARER LA POTION ET CONQU\220RIR LE MONDE", + "QU'Y A-T-IL MAINTENANT?", + "OUI, QU'Y A-T-IL?... -TIENS, LE MATCH!", + // 35 + "JE L'AVAIS OUBLI\220. PRENDS LA FILLE ET ALLONS LE VOIR. J'IRAI CONQU\220RIR LE MONDE PLUS TARD", + "MERCI MON VIEUX, J'AVAIS SOIF", + "ArgH! CE CRUCIFIX! -CE CRUCIFIX!...", + "C'EST BEAU CE CRUCIFIX, JE NE M'AVAIS PAS RENDU COMPTE", + "FICHE-MOI LA PAIX! JE REGARDE LE FOOT-BALL", + // 40 + "", + "", + "", + "", + "", + // 45 + "", + "", + "", + "", + "", + // 50 + "", + "", + "", + "", + "", + // 55 + "", + "BONJOUR, L'AVEUGLE. A VA?", + "POURQUOI TU SAIS QUE JE SUIS UN TRANGER?", + "TU PARAT UN AVEUGLE. TU AS DES LUNETTES COMME SERAFIN ZUBIRI ET TU PARLES EN REGARDANT DEVANT TOI, COMME STEVIE WONDER...", + "BON, EXCUSE-MOI. JE NE SAVAIS PAS QUE TU PUISSES VOIR.", + // 60 + "MAIS, TU NE VIENS PAS DE ME DIRE QUE TU N'EST PAS AVEUGLE?", + "MAIS TU NE VOIS PAS!", + "A VA, A VA.... PARDONNE-MOI. DANS CE CAS-L: BONJOUR AVEUGLE.", + "JE SUIS JOHN HACQUER ET JE JOUE AU DRASCULA. TU ES SREMENT LE TYPIQUE PERSONNAGE QUI VA M'AIDER EN TROC D'UN OBJET. D'ACCORD? H? D'ACCORD?", + "EUH... AVEUGLE, UNE QUESTION! MAIS... QUEL GENRE DE MTIER C'EST LE TIEN? CELUI D'CHANGER DE FAUCILLES CONTRE DE L'ARGENT EN JOUANT DE L'ACCORDON?", + // 65 + "AH, OUI! C'EST VRAI. AU REVOIR AVEUGLE...", + "VOIL LA GROSSE SOMME D'ARGENT QUE TU M'AS DEMANDE.", + "IL TE VAUX MIEUX.", + "BONJOUR, TRANGER!", + "ET TOI... COMMENT TU SAIS QUE JE SUIS UN AVEUGLE?", + // 70 + "ET TOI TU PARLES COMME LE FILS DE BILL COSBY ET MOI, JE NE T'EMBTE PAS.", + "NON, SI JE NE VOIS PAS.", + "ET MOI, JE NE LE SUIS PAS.", + "OH, BIEN SR! COMME JE NE VOIS PAS ON ME TCHE D'AVEUGLE, N'EST-CE PAS", + "BONJOUR, TRANGER! ET QU'EST-CE QUE TU FAIS EN TRANSYLVANIE?", + // 75 + "C'EST CORRECT, TRANGER. POUR UNE GROSSE SOMME D'ARGENT, JE TE DONNERAI UNE FAUCILLE, POUR QUAND TU EN AURAS BESOIN.", + "CHUT! JE SUIS UN TRAFICANT DE FAUCILLES, JE DOIS ME CACHER.", + "PARCE QUE TU ME L'AS DIT AVANT, N'EST-CE PAS?", + "MERCI TRANGER. VOIL TA FAUCILLE EN CHANGE. UNE CHOSE QUI SERA TRS PRATIQUE POUR TOI, PLUS TARD... VRAIMENT.", + "", + // 80 + "", + "", + "No, nada", + "bla, bla, bla." +}, +{ + // 0 + "", + "COME VA, IGOR?", + "-SEMPRE CHE C' UNA BUONA PARTITA SUCCEDE LO STESSO! BENE, ANDREMO A GUARDARLA AL BAR, COME SEMPRE", + "ADESSO IGOR, ASCOLTA. ANDIAMO A REALIZZARE LA FASE 1 DEL MIO PROGETTO PER CONQUISTARE IL MONDO", + "ATTRARREMO UN FULMINo DELLA TEMPESTA E LO DISMAGNETIZZAREMO CON L'INDIFIBULATORE. LA ELETTRICIT\265 ANDR\265 AL MIO MOSTRO E, GLI DAR\265 VITA!", + // 5 + "SE TUTTO VA BENE QUESTO SAR\265 SOLTANTO IL PRIMO DI UN'IMMENSO ESERCITO CHE CONQUISTAR\265 IL MONDO PER ME, HA,HA,HA", + "I MOSTRI DISTRUGGERANNO TUTTE LE ARME DI TUTTI GLI ESERCITI DEL MONDO, MENTRE NOI CI RIFURGIAREMO nei miei terreni A GIBRALTAR", + "POI, FAREMO UN GOLPE, E I GOVERNI DEL MONDO NON AVRANNO PER DIFENDERSI, E AVR\220 LE LORO NAZIONI SOTTO I MIEI PIEDI", + "SAR\220 IL PRIMO CATTIVO DELLA STORIA CHE RIESCA!", + "A TE NIENTE, SCIOCCO! ST\220 SPORRENDO LA TRAMA. BENE, TUTTO A POSTO?", + // 10 + "-\220 IL MOMENTO! -PREMI L'INTERRUTTORE DELLE BATTERIE ALCALINE!", + "- PORCA MISERIA! -CHE COSA NON \220 ANDATA BENE?", + "SEI SICURO DI AVERLO CONTROLLATO BENE? E NO MANCABA NIENTE? ULTIMAMENTE PER I REDDITI NON VEDI UNA MADONNA", + "IMBECILE!, NON HAI CONETTATO L'INDIFIBULATORE! LE VITI SARANO MAGNETIZZATE E ADESSO AVR\265 IL CERVELLO BRUCIATO", + "SEI MORTO, SEI MORTO, COME TI PRENDA..", + // 15 + "STAI ZITTO! DOMANI CERCHER\220 UN ALTRO CERVELLO E RIPETEREMO L'ESPERIMENTO", + "NO. QUESTA VOLTA NE PORTER\220 UNO DI DONNA, COS\326 SAR\265 NUOVISSIMO, MAI UTILIZZATO. HA, HA HA, CHE BARZELLETA FALLITA", + "E? SONO IL CATTIVO DELLA STORIA, E SONO MASCHILISTA SE VOGLIO, CAPITO? E NON LAMENTARTI UNA ALTRA VOLTA PERCHE MANGERAI LA TUA GOBBA", + "HA,HA,HA. UN ALTRO PRESSO. ADESSO PAGHERAI MOLTO CARO QUESTA OFFESA, LA TUA INTENZIONE DI FINIRE CON ME. -IGOR, AL PENDOLO DELLA MORTE!", + "DIMI, STUPIDO UMANO, COME MAI HAI PENSATO A DISTRUGGERMI?", + // 20 + "-CHE BELLO!, MI METTEREI A PIANGERE SE NON FOSSE PERCHE MI FA RIDERE", + "HO BISOGNO DELLA TUA RAGAZZA, IL SUO CERVELLO MI AIUTER\265 A CONQUISTARE IL MONDO", + "-SI, HA ! VADO A TOGLIARSILO PER METTEGLIELO AL MIO FRUSKYNSTEIN, E CON LUI DOMINER\220 IL MONDO, HA,HA,HA", + "CHE?! - SEI MORTO, SEI MORTO! TI VADO A...MI HAI FATTO ARRABBIARE. SEI PRONTO PER MORIRE?", + "HA,HA,HA. TU CREDI?", + // 25 + "SI, VERO? HA,HA,HA", + "VA BENE, PUOI FUMARE LA ULTIMA SIGARETTA, MA SBRIGATI", + "SONO STUFFO, BUTTA GI\265 LA SIGARETTA!", + "E DIMI, QUELLA POZIONE HA L'EFFETTO INVERSO?", + "QUELLO SI VEDR\265 ..", + // 30 + "BENE, SAR\265 VERO?. IGOR, DAMI IL COMPACT DISC DI UNGHIE GRAFFIANDO UNA LAVAGNA", + "NEANCHE SOGNARLO. LA RAGAZZA RIMANE CON ME, E TU RIMANI LI FINO CHE IL PENDOLO TI TAGLII IN FETTE. HA,HA,HA", + "MA COME SONO CATTIVO, ANDIAMO IGOR, ANDIAMO A FARE LA POZIONE, ANDIAMO A CONQUISTARE IL MONDO", + "ADESSO CHE SUCCEDE?", + "SI, CHE C'E?....LA PARTITA!", + // 35 + "L'AVEVO DIMENTICATA. PRENDI LA RAGAZZA E ANDIAMO A GUARDARE IL CALCIO. CONQUISTER\220 IL MONDO DOPO", + "GRAZIE AMICO, AVEVO SETE", + "-ARGH! -QUEL CROCIFISSO! -QUEL CROCIFISSO!...", + "QUE BELLO \220 QUEL CROCIFISSO, NON MI ERO ACCORTO", + "LASCIAMI, ST\220 GUARDANDO LA PARTITA", + // 40 + "", + "", + "", + "", + "", + // 45 + "", + "", + "", + "", + "", + // 50 + "", + "", + "", + "", + "", + // 55 + "", + "Ciao cieco. Come va?.", + "Come sai che sono straniero.", + "Sembri un cieco. Hai gli occhiali come il cieco di Sorrento, parli guardando all'infinito come Stevie Wonder..", + "Bene, scusa. Non sapevo che non vedessi", + // 60 + "Ma non mi hai appena detto che non sei cieco?.", + "- Ma se non vedi!.", + "Beeeene. Scusa. Allora: Ciao : non vedente", + "Sono John Hacker, st giocando al Drascula. Tu devi proprio essere il tipico personaggio che mi aiuter in cambio di un oggeto. Vero...?", + "Ma... Scusa ciec..- non vedente! .Ma.. . che tipo di mestiere il tuo, di dare falci per soldi, mentre suoni la fisarmonica?.", + // 65 + "Ah, si. \324 vero. Ciao non vedente....(cieco)", + "Ecco la abbondante quantit di soldi che mi avevi chiesto.", + "Mi raccomando", + "Ciao straniero.", + "E tu... Come sai che sono cieco?", + // 70 + "E tu parli come il figlio di Bill Cosby e non ti offendo.", + "No, se non vedo.", + "E non lo sono.", + "-Oh, certo!. Come non vedo mi chiamano cieco, no?.", + "-Ciao Straniero! e cosa fai in Transilvania?", + // 75 + "Corretto straniero. Per una abbondante quantit di soldi, ti dar in cambio una falce, per quando ne avrai bisogno.", + "Shhhhhh. Sono trafficante di falci, devo proprio dissimulare.", + "Perche mi lo hai detto prima, no?", + "Grazie straniero. Ecco la tua falce. Un oggeto che ti sar molto utile pi avanti...... davvero.", + "", + // 80 + "", + "", + "No, nada", + "bla, bla, bla." +}, +}; + +const char *_textb[NUM_LANGS][NUM_TEXTB] = { +{ + // 0 + "", + "I'M HERE, DRINKING", + "THEY ARE ALL DEAD, THANKS. HIC...!", + "YES, SURE...", + "SHE IS ATTRACTED TO UNCLE DESIDERIO", + // 5 + "EVEN BETTER, UNCLE DESIDERIO'S DEAD BODY", + "MY UNCLE. HE WENT TO THE CASTLE AND NEVER CAME BACK", + "WELL, HE CAME BACK JUST A LITTLE. IF ONLY VON BRAUN HADN'T SCREWED THINGS UP MY UNCLE WOULD BE DRINKING WITH US NOW", + "NOTHING...", + "WELL, YES! THAT MEAN MAN HAS TERRIFIED US ALL", + // 10 + "FROM TIME TO TIME HE COMES DOWN TO THE VILLAGE AND TAKES SOMEONE WITH HIM.", + "A LITTLE WHILE AFTER WE FOUND A FEW BODY PARTS. I THINK HE IS DEALING IN ORGANS OR SOMETHING LIKE THAT", + "THE ONLY PERSON IN THE VILLAGE WHO KNOWS HOW TO GET TO DRASCULA IS A CULTIVATED PERSON", + "HE LIVES IN A LOG-CABIN OUT OF TOWN, EVER SINCE DRASCULA BEAT HIM UP", + "HE IS THE ONLY ONE WHO COULD HELP US WITH DRASCULA, AND HE DOESN'T WANT TO HEAR ABOUT IT. HOW DO YOU LIKE THAT?", +}, +{ + // 0 + "", + "AQUI, BEBIENDO", + "MUERTOS TODOS. GRACIAS. BURRP ", + "SI, NO VEAS... ", + "ESTA POR EL TIO DESIDERIO", + // 5 + "Y ESTA OTRA, POR EL CADAVER DEL TIO DESIDERIO", + "MI TIO. FUE AL CASTILLO Y NO VOLVIO", + "BUENO, VOLVIO PERO POCO. SI EL VON BRAUN NO HUBIESE METIDO LA PATA MI TIO ESTARIA AQUI BEBIENDO", + "NADA... ", + "\255BUENO, SI! ESE DESALMADO NOS TIENE ATEMORIZADOS A TODOS", + // 10 + "DE VEZ EN CUANDO BAJA AL PUEBLO Y SE LLEVA A ALGUIEN", + "POCO DESPUES SOLO ENCONTRAMOS UNOS POCOS RESTOS. CREO QUE ESTA TRAFICANDO CON ORGANOS, O ALGO ASI", + "EL UNICO DEL PUEBLO QUE SSABE COMO ACABAR CON DRASCULA TIENE ESTUDIOS", + "DESDE QUE LE DERROTO DRASCULA SE HA APARTADO A UNA CABA\245A EN LAS AFUERAS DEL PUEBLO", + "ES EL UNICO QUE PODRIA AYUDARNOS A ACABAR CON DRASCULA, Y NO QUIERE SABER NADA DE NOSOTROS. \250QUE TE PARECE A TI?", +}, +{ + // 0 + "", + "HIER, BEI EINEM GUTEN TROPFEN", + "ALLE TOT. VIELEN DANK. RueLPS !", + "YO, STIMMT...", + "DIE HIER IST FueR ONKEL DESIDERIUS", + // 5 + "UND DIESE HIER FueR DIE LEICHE VON ONKEL DESIDERIUS", + "MEIN ONKEL. ER GING ZUM SCHLOSS UND KAM NICHT ZURueCK", + "NAJA, ER KAM NUR IN RESTEN ZURueCK. WENN VON BRAUN SICH NICHT VERTAN HaeTTE, WueRDE ER JETZT MIT UNS EINEN HEBEN", + "NICHTS...", + "JA STIMMT! DIESER SCHURKE JAGT UNS ALLEN EINE RIESENANGST EIN", + // 10 + "AB UND ZU GEHT ER RUNTER INS DORF UND HOLT SICH JEMANDEN", + "KURZ DANACH HABEN WIR NUR NOCH RESTE GEFUNDEN, ICH GLAUBE ER HANDELT MIT ORGANEN ODER SO", + "DER EINZIGE, DER MIT DRASCULA FERTIGWERDEN KANN, WAR AN DER UNI ", + "SEITDEM DRASCULA IHN BESIEGT HAT, LEBT ER IN EINER EINSAMEN HueTTE AUSSERHALB DES DORFES", + " ER IST DER EINZIGE, DER DRASCULA ERLEDIGEN KoeNNTE UND WILL NICHTS VON UNS WISSEN. WAS HaeLST DU DAVON ?", +}, +{ + // 0 + "", + "ICI, EN BUVANT", + "TOUS MORTS. MERCI. BOURRP", + "OUI, VRAIMENT...", + "CELLE-CI POUR L'ONCLE DSIR", + // 5 + "ET CELLE-L\267 POUR LE CADAVRE D'ONCLE DSIR", + "MON ONCLE EST ALL AU CH\266TEAU ET N'EST PAS ENCORE REVENU", + "BON, IL EST REVENU MAIS POUR PEU DE TEMPS. SI VON BRAUN N'AURAIT FAIT UN IMPAIR, MON ONCLE DSIR SERAIT ICI EN BUVANT", + "RIEN... ", + "EH OUI! CE MALIN NOUS A INTIMIDS \267 TOUS", + // 10 + "DE FOIS IL DESCEND SUR LE VILLAGE ET ENLEVE QUELQU'UN", + "UN PEU PLUS TARD ON NE TROUVE QUE QUELQUES RESTES. JE PENSE QU'IL FAIT DU TRAFIQUE D'ORGANES, OU QUELQUE CHOSE PAREILLE", + "LE SEUL DU VILLAGE QUI SAIT COMMENT FINIR AVEC DRASCULA IL A DES \220TUDES", + "DEPUIS QUE DRASCULA L'A VAINCU, IL S'EST RETIR\220 DANS UNE CABANE, EN DEHORS DU VILLAGE", + "C'EST LE SEUL QUI POURRAIT NOUS AIDER \267 FINIR AVEC DRASCULA ET LUI NE VEUX RIEN SAVOIR DE NOUS. QU'EN PENSES-TUI?", +}, +{ + // 0 + "", + "QU\326, BEVENDO", + "MORTI TUTTI. GRAZIE. BURRP", + "SII, CERTO, SICURO..", + "QUESTA PER IL ZIO PEPPINO", + // 5 + "E QUEST'ALTRA, PER IL CADAVERE DEL ZIO PEPPINO", + "MIO ZIO. FU ANDATO AL CASTELLO, E NON MAI TORNATO", + "EEEHH, TORN\220, MA PER POCO TEMPO. SE IL VON BRAUN NON AVESSE SBAGLIATO, MIO ZIO SAREBBE QU\326 BEVENDO", + "NIENTE..", + "EEH,SI! QUEL MALVAGIO CI HA INTIMORATI", + // 10 + "A VOLTE SCENDE AL PAESE E QUANDO SE NE VA SI PORTA QUALCUNO", + "UN P\220 DOPO SOLTANTO TROVIAMO QUALQUE RESTO. CREDO CHE TRAFFICA ORGANI O QUALCOSA DEL GENERE", + "L'UNICO DEL PAESE CHE SA COME FINIRE CON DRASCULA \220 UNO CHE HA STUDIATO", + "DA CHE FU SCONFFIGIATO DA DRASCULA SI \220 ALLONTANATO A UNA CAPANNA FUORI DEL PAESE", + "L'UNICO CHE POTREBBE AIUTARCI A VINCERE DRASCULA, E NON VUOLE SAPERE NIENTE DI NOI. COSA PENSI?", +}, +}; + +const char *_textbj[NUM_LANGS][NUM_TEXTBJ] = { +{ + // 0 + "", + "ARE YOU ALL RIGHT? HEY, COME ON, WAKE UP! CAN YOU HEAR ME? ARE YOU DEAD?", + "NO, MY NAME IS BILLIE JEAN, BUT YOU CAN CALL ME B.J. IT'S SHORTER", + "HA, HA...! THAT WAS A GOOD ONE!", + "WELL, JOHNNY. YOU SEE, I WAS HERE JUST READY TO GO TO BED WHEN I HEARD THIS LOUD NOISE DOWN THE CORRIDOR", + // 5 + "I DIDN'T PAY ATTENTION AT FIRST, BUT AFTER ABOUT TWO HOURS OR SO I COULDN'T SLEEP AND WENT OUT FOR A WALK", + "AS I OPENED THE DOOR I WAS SHOCKED TO FIND YOU THERE, LYING ON THE FLOOR. I THOUGHT YOU WERE DEAD, I SWEAR... HA, HA, SILLY BILLY", + "I WAS GOING TO GIVE YOU THE KISS OF LIFE BUT IT WASN'T NECESSARY BECAUSE YOU STARTED TO TALK", + "YOU SAID SOMETHING ABOUT A SCARECROW. I WAS VERY SCARED, YOU KNOW. IT'S A REAL SHOCK WHEN A DEAD PERSON STARTS TALKING?", + "ISN'T THAT RIGHT? WELL, THEN I MANAGED TO BRING YOU TO MY ROOM THE BEST WAY I COULD. I PUT YOU IN MY BED... AND THAT'S ALL... HA, HA, HA...", + // 10 + "OH, NO...! IT WASN'T THE HIT, HA, HA. I JUST STEPPED ON YOUR GLASSES BY ACCIDENT", + "YOU REALLY LOOK GOOD WITH THOSE GLASSES. I KNOW HE'S NOT FERNANDO LANCHA, BUT I FIND HIM ATTRACTIVE...", + "YES, YES, I DO... COME ON, HOLD ME AND KISS ME TIGHT", + "OH JOHNNY, HONEY, THANK GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND HE'S GONE DOWNSTAIRS TO WATCH THE FOOTBALL GAME", + "YES, IT'S TRUE. PLEASE, SET ME FREE", + // 15 + "NO, I'M SORRY. I USED THEM ALL IN THE TOWER WHEN I WAS TRYING TO ESCAPE WHILE YOU LET ME DOWN", + "JOHNNY, IS THAT YOU? OH, GOD, GREAT! I KNEW YOU'D COME!", + "YOU DON'T KNOW HOW MUCH THAT EVIL DRASCULA HAS MADE ME SUFFER", + "FIRSTLY HE BROUGHT ME FLYING OVER HERE AND THEN PUT ME IN THIS DISGUSTING ROOM WITHOUT A MIRROR OR ANYTHING", + "I'M TELLING YOU! AND THE WORST PART IS THAT HE DIDN'T EVEN APOLOGIZE, NOT EVEN ONCE", + // 20 + "JOHNNY HONEY, WHERE ARE YOU?", + "I'M READY TO LEAVE DEAR", + "WAIT, I'M GOING TO TAKE A LOOK... NO DARLING, I'M SORRY", + "THERE YOU GO...", + "\"DEAR JOHNNY\"", + // 25 + "I'LL NEVER FORGET YOU BUT I'VE REALIZED THAT THIS JUST COULDN'T WORK OUT RIGHT. TO BE HONEST, I'LL TELL YOU THAT THERE IS ANOTHER MAN. HE'S TALLER, STRONGER", + "AND HE HAS ALSO RESCUED ME FROM DRASCULA. HE HAS ASKED ME TO MARRY HIM, AND I HAVE ACCEPTED", + "BYE JOHNNY. PLEASE DON'T TRY TO FIND SOME KIND OF EXPLANATION. YOU KNOW LOVE IS BLIND AND HAS IT'S OWN WAYS", + "I HOPE THERE WON'T BE HARD FEELINGS BETWEEN US. REMEMBER THAT I STILL LOVE YOU, BUT ONLY AS A FRIEND", +}, +{ + // 0 + "", + "\250ESTA USTED BIEN? OIGA, DESPIERTE. \250ME OYE? \250ESTA USTED MUERTO?", + "NO, MI NOMBRE ES BILLIE JEAN, PERO PUEDES LLAMARME B.J. ES MAS CORTO", + "\255JI, JI! \255QUE BUENO!", + "PUES VERAS JOHNY, YO ESTABA AQUI, DISPUESTA A ACOSTARME, CUANDO OI UN FUERTE GOLPE EN EL PASILLO", + // 5 + "AL PRINCIPIO NO LE DI MUCHA IMPORTANCIA, PERO A LAS DOS HORAS MAS O MENOS DESCUBRI QUE NO PODIA DORMIR Y DECIDI SALIR A DAR UN PASEO", + "Y CUAL NO SERIA MI SORPRESA CUANDO ABRI LA PUERTA Y TE ENCONTRE AHI, EN EL SUELO TIRADO. TE LO JURO QUE PENSE QUE HABIAS MUERTO, JE, JE, TONTA DE MI", + "TE FUI A HACER EL BOCA A BOCA, PERO NO FUE NECESARIO PORQUE EMPEZASTE A HABLAR", + "DECIAS NO SE QUE DE UN ESPANTAPAJAROS. YO ME LLEVE UN SUSTO MUY GORDO, PORQUE CUANDO UN MUERTO SE PONE A HABLAR ES UNA IMPRESION MUY FUERTE, \250NO CREES?", + "\250VERDAD QUE SI? BUENO, PUES COMO PUDE, CARGUE CONTIGO Y TE TRAJE A MI HABITACION. TE PUSE SOBRE LA CAMA... Y ESO ES TODO. JI, JI,JI", + // 10 + "OH, NO HA SIDO EL GOLPE, JI, JI. ES QUE SIN QUERER PISE TUS GAFAS", + "\255HAY QUE VER QUE BIEN LE SIENTAN LAS GAFAS! YA SE QUE NO ES FERNANDO LANCHA, PERO TIENE UN NO SE QUE QUE QUE SE YO", + "SI, SI, QUIERO... VAMOS, ABRAZAME FUERTE, BESAME MUCHO...", + "OH JOHNY, CARI\245O, MENOS MAL QUE HAS VENIDO. ESE DESALMADO DE DRASCULA ME HA ATADO A LA CAMA Y LUEGO SE HA IDO ABAJO A VER EL PARTIDO", + "SI, ES VERDAD. LIBERAME ", + // 15 + "NO, LO SIENTO. GASTE TODAS EN LA MAZMORRA INTENTANDO LIBERARME MIENTRAS TU ME DEJABAS TIRADA", + "JOHNY \250ERES TU? \255QUE ALEGRIA! \255SABIA QUE VENDRIAS!", + "NO SABES CUANTO ME HA HECHO SUFRIR ESE DESALMADO DE DRASCULA", + "PRIMERO ME TRAJO VOLANDO HASTA AQUI Y LUEGO ME ENCERRO EN ESTE CUARTUCHO, SIN ESPEJO NI NADA", + "COMO LO OYES. Y LO PEOR ES QUE NO PIDIO PERDON NI UNA SOLA VEZ", + // 20 + "JOHNY, QUERIDO. \250DONDE ESTAS?", + "ESTOY LISTA PARA QUE ME SAQUES DE AQUI", + "ESPERA QUE VOY A MIRAR... NO CARI\245O, LO SIENTO", + "TOMA...", + "\"QUERIDO JOHNY:", + // 25 + "NUNCA PODRE OLVIDARTE, PERO ME HE DADO CUENTA DE QUE LO NUESTRO NO FUNCIONARIA. VOY A SER SINCERA CONTIGO: HAY OTRO HOMBRE; MAS ALTO, MAS FUERTE...", + "Y ADEMAS ME HA RESCATADO DE LAS MANOS DE DRASCULA. ME HA PEDIDO EN MATRIMONIO, Y YO HE ACEPTADO", + "ADIOS, JOHNY. NO INTENTES DARLE UNA EXPLICACION, PORQUE EL AMOR ES CIEGO Y NO ATIENDE A RAZONES", + "ESPERO QUE NO ME GUARDES RENCOR, Y RECUERDA QUE TE SIGO QUERIENDO, AUNQUE SOLO COMO AMIGO\"", +}, +{ + // 0 + "", + "HALLO, ALLES KLAR ?HEY, WACHEN SIE AUF. HoeREN SIE MICH ? SIND SIE TOT ?", + "NEIN, ICH HEISSE BILLIE JEAN., ABER DU KANNST MICH B.J. NENNEN, DAS IST KueRZER", + "HI,HI! SUPERGUT !", + "JA STELL DIR VOR, HEINZ, ICH WOLLTE MICH HIER GERADE HINLEGEN, ALS ICH EINEN LAUTEN KNALL IM FLUR HoeRTE", + // 5 + "ANFANGS HAB ICH NICHT SO DRAUF GEACHTET, ABER NACHDEM ICH 2 STUNDEN LANG NICHT SCHLAFEN KONNTE, GING ICH RUNTER, UM SPAZIERENZUGEHEN", + "ICH WAR NATueRLICH BAFF, ALS ICH DICH VOR der tuer LIEGEN SAH. ICH HABE ECHT GEDACHT,DASS DU TOT BIST, HEHE, WIE bloed", + "ICH WOLLTE GERADE MUND-ZU-MUND BEATMUNG MACHEN, ABER DANN FINGST DU JA AN ZU REDEN", + "DU FASELTEST WAS VON NER VOGELSCHEUCHE UND ICH Hatte ganz schoen schiss,WEIL sprechende tote schon echt UNHEIMLICH sind?", + "NICHT WAHR ?NAJA,ICH HABE DICH DANN AUFGEHOBEN UND IN MEIN ZIMMER GETRAGEN UND AUF MEIN BETT GELEGT.... WEITER NICHTS. HI,HI,HI", + // 10 + "ACH NEIN, ES WAR NICHT DIE BEULE, HIHI, ICH BIN VERSEHENTLICH AUF DEINE BRILLE GETRETEN ", + "MAN MUSS SICH ECHT MAL ANGUCKEN, WIE GUT IHM DIE BRILLE STEHT. ER IST ZWAR NICHT DER MARTINI-MANN, ABER ER HAT WAS WEISS ICH WAS", + "JA, JA, ICH WILL. KOMM NIMM MICH UND KueSS MICH...", + "OH HEINZ, LIEBLING, GUT DASS DU DA BIST. DIESER WueSTLING VON DRASCULA HAT MICH ANS BETT GEFESSELT UND IST DANN RUNTER UM SICH DAS SPIEL ANZUSEHEN", + "JA, WIRKLICH. BEFREIE MICH", + // 15 + "NEIN, TUT MIR LEID. ICH HAB ALLE BEIM VERSUCH, AUS DEM VERLIES AUSZUBRECHEN, AUFGEBRAUCHT", + "HEINZ, BIST DU ES ? WIE TOLL ! ICH WUSSTE, DASS DU KOMMEN WueRDEST !", + "DU AHNST JA NICHT, WIE SEHR ICH WEGEN DIESEM UNGEHEUER VON DRASCULA GELITTEN HABE", + "ZUERST IST ER MIT MIR HIERHER GEFLOGEN UND DANN HAT ER MICH IN DIESES LOCH GESPERRT, OHNE SPIEGEL UND GAR NICHTS", + "WIE ICHS GESAGT HABE. DAS SCHLIMMSTE IST,DASS ER SICH KEIN EINZIGES MAL ENTSCHULDIGT HAT.", + // 20 + "HEINZ, GELIEBTER, WO BIST DU ?", + "ICH BIN BEREIT, VON DIR GERETTET ZU WERDEN", + "WARTE, ICH GUCK MAL...NEIN, SCHATZ, TUT MIR LEID", + "HIER NIMM...", + "LIEBER HEINZ !", + // 25 + "ICH WERDE DICH NIE VERGESSEN, aber das mit uns funktioniert nicht.ICH gebs zu : ES GIBT EINEN ANDERN. GRoeSSER,STaeRKER...", + "UND AUSSERDEM HAT ER MICH AUS DRASCULAS KLAUEN BEFREIT UND UM MEINE HAND ANGEHALTEN,UND ICH HABE JA GESAGT", + "LEB WOHL,HEINZ. VERSUCH NICHT EINE ERKLaeRUNG ZU FINDEN, DENN DIE LIEBE IST BLIND UND KENNT KEINE VERNUNFT", + "DU BIST MIR HOFFENTLICH NICHT BoeSE. DENK IMMER DARAN DASS ICH DICH IMMER NOCH LIEBE, WENN AUCH NUR ALS FREUND", +}, +{ + // 0 + "", + "VOUS ALLEZ BIEN? ALLEZ, REVEILLEZ-VOUS! VOUS M'ENTENDEZ? VOUS \322TES MORT?", + "NON, MON NOM EST BILLIE JEAN, MAIS TU PEUX M'APPELLER B.J., C'EST PLUS COURT", + "HI! HI! -C'EST BON!", + "EN VRIT JOHNY, J'TAIS L\267, PR\322TE \267 ME COUCHER, ET J'AI ENTENDU UN FORT COUP DANS LE COULOIR", + // 5 + "AU DBUT JE N'Y AI PAS DONN D'IMPORTANCE, MAIS APR\324S JE ME SUIS RENDUE COMPTE QUE NE POUVAIS PAS M'ENDORMIR ET SUIS SORTIE FAIRE UNE PROMENADE", + "ET \267 MON GRAN TONNEMENT, QUAND J'AI OUVERT LA PORTE, JE T'AI TROUV L\267, PAR TERRE. J'TAIS SUR LE POINT DE PENSER QUE TU AVAIS MORT, HE!, QUE JE SUIS B\322TE!", + "J'ALLAIS TE FAIRE LE BOUCHE-\267-BOUCHE MAIS IL N'A T PAS NCESSAIRE PUISQUE TU AS COMMENC \267 PARLER", + "TU DISAIS \267 SAVOIR QUOI D'UN POUVANTAIL. CELA M'A FAIT UNE GRANDE PEUR, PARCE QUE QUAND UN MORT SE MET \267 PARLER L'IMPRESSION EST TR\324S FORTE, NE CROIS-TU PAS?", + "C'EST VRAI, NON? ENFIN. JE ME SUIS DBROUILLE POUR TE PRENDRE SUR MOI, T'EMMENER DANS MA CHAMBRE ET T'INSTALLER SUR LE LIT... ET VOIL\267 TOUT. HI! HI! HI!", + // 10 + "HO! CE N'EST PAS \267 CAUSE DU COUP, HI! HI! CE QUE J'AI MARCHE SUR TES LUNETTES PAR ACCIDENT", + "\220VIDEMMENT LES LUNETTES LUI FONT DU BIEN! JE SAIS BIEN QUIL N'EST PAS FERNANDO LANCHA, MAIS IL A UN AIR QU'ALLEZ DONC SAVOIR", + "OUI, OUI, JE VEUX... VAS-Y, EMBRASSE-MOI FORT, EMBRASSE-MOI BEAUCOUP...", + "OH,JOHNY!, MON AMOUR! HEUREUSEMENT QUE TU ES VENU. CE M\220CHANT DRASCULA M'A ATTACH\220 AU LIT ET APR\324S IL EST PARTI EN BAS VOIR LE MATCH", + "OUI, C'EST VRAI, LIB\324RE-MOI", + // 15 + "NON, SUIS D\220SOL\220E. JE LES AI TOUTES UTILIS\220ES, DANS LE CACHOT, EN T\266CHANT DE ME LIB\220RER ALORS QUE TOI TU M'ABANDONNAIS", + "JOHNY, C'EST TOI? -QUELLE JOIE! -JE SAVAIS QUE TU VIENDRAIS!", + "TU NE PEUX PAS SAVOIR COMBIEN M'A FAIT SOUFFRIR CE M\220CHANT DRASCULA", + "D'ABORD IL M'EMMEN\220 EN VOLANT JUSQU'ICI ET APR\324S IL M'ENFERM\220E DANS CE TAUDIS, SANS MIROIR NI RIEN D'AUTRE", + "COMME TU L'ENTENDS. ET LE PIRE C'EST QUIL NE M'A PAS DEMAND\220 PARDON N'UNE SEULE FOIS ", + // 20 + "JOHNY, MON CH\220RI, O\353 EST-CE QUE TU ES?", + "JE SUIS PR\322TE POUR QUE TU M'EN SORTES D'ICI", + "ATTEND, JE VAIS REGARDER... NON CH\220RI, JE REGRETTE", + "TIENS...", + "\"CHER JOHNY", + // 25 + "JAMAIS JE T'OUBLIERAI, MAIS JE ME SUIS APER\200UE QUE NOTRE AFFAIRE NE POUVAIT PAS MARCHER. JE VAIS \322TRE SINC\324RE AVEC TOI: IL Y A UN AUTRE HOMME, PLUS GRAND...", + "ET ENCORE IL M'A LIB\220R\220 DES MAINS DE DRASCULA. IL M'A DEMAND\220 EN MARIAGE, ET MOI J'AI ACCEPT\220", + "AU REVOIR, JOHNY. N'Y CHERCHES PAS UNE EXPLICATION, L'AMOUR EST AVEUGLE ET N'\220COUTE PAS DES RAISONS", + "J'ESP\324RE QUE TU SERAS SANS RANCUNE, ET N'OUBLIES PAS QUE JE T'AIME ENCORE, MAIS EN AMI SEULEMENT\"", +}, +{ + // 0 + "", + "ST\265 BENE? SENTA, PUO SENTIRMI? SI \220 MORTO?", + "NO, IL MIO NOME BILLIE JEAN, MA PUOI CHIAMARMI B.J. PI \351 BREVE", + "HI,HI!- CHE BUONO!", + "NON SO JOHNY, ERO QU\326, STAVO PER ADDORMENTARMI, QUANDO HO SENTITO UN FORTE RUMORE NEL CORRIDOIO", + // 5 + "PRIMA NON GLI HO DATTO IMPORTANZA, MA DUE ORE DOPO HO SCOPERTO CHE NON RIUSCIVO A ADDORMENTARMI E SONO uscita A FARE QUATTRO PASSI", + "E FIGURATI LA SORPRESA QUANDO HO APERTO LA PORTA E TI HO TROVATO PER TERRA. TI GIURO, HO PENSATO CH'ERI MORTO..., MA COME SONO SCIOCCA", + "VOLEVO FARTI IL BOCCA A BOCCA, MA NON C'ERA BISOGNO PERCHE SUBITO HAI COMINCIATO A PARLARE", + "HAI DETTO NON SO CHE DI UN SPAVENTAPASSERI. CHE COLPO.....!, PERCHE QUANDO UN MORTO SI METTE A PARLARE FA UN COLPO GRANDISSIMO!", + "VERO DI SI? NON SO COME SONO RIUSCITA, TI HO TRASPORTATO ALLA MIA CAMERA, TI HO MESSO SUL MIO LETTO E.... NIENTE PI\351 .", + // 10 + "NO, NON \220 STATA LA BOTTA, HI, HI. \220 PERCHE ... HO PESTATO I TUOI OCCHIALI", + "MAMMA MIA MA COM'\220 BELLO CON GLI OCCHIALI! SO CHE NON \220 FERNANDO LANCHA, MA HA QUALCOSA CHE MI PIACE MOLTISSIMO", + "SI,SI, VOGLIO... ABBRACIAMI FORTE, BACIAMI MOLTO..", + "OH JOHNY, CARO, MENO MALE CHE SEI VENUTO. QUEL MALVAGIO, DRASCULA, MI HA LEGATO AL LETTO E POI SE NE \220 ANDATO A GUARDARE LA PARTITA", + "SI, \220 VERO, LIBERAMI", + // 15 + "NO, MI DISPIACE. HO UTILIZZATO TUTTE IN CARCERE PROBANDO LIBERARMI QUANDO TU MI AVEVI LASCIATA", + "JOHNY, SEI TU? - BENISSIMO. LO SAPEVO ", + "NON TI FIGURI QUANTO MI HA FATTO SOFFRIRE DRASCULA", + "PRIMA MI HA PORTATO VOLANDO FINO QUA E POI MI HA RICHIUSA IN QUESTA CAMERACCIA CHE NON HA N\220 UNO SPECCHIO", + "COME HAI SENTITO. E LO PEGLIORE: N\220 UNA VOLTA SI \220 SCUSATO", + // 20 + "JOHNY, CARO. DOVE SEI?", + "SONO PRONTA, FAMI USCIRE DA QU\326 ", + "ASPETTA, VADO A GUARDARE... NO CARO, MI DISPIACE", + "PRENDI..", + "\"CARO JOHNY:", + // 25 + "MAI POTR\220 DIMENTICARTI, MA NON SAREMO MAI FELICI INSIEME. SAR\220 SINCERA CON TE : C'\220 NE UN ALTRO; PI\351 ALTO, PI\351 FORTE..", + "ANZI MI HA LIBERATO DA DRASCULA. MI HA CHIESTO LA MANO E HO DETTO DI SI", + "ADIO JOHNY. NON CERCARE UNA SPIEGAZIONE, PERCHE L'AMORE \220 CIECO.", + "SPERO NON MI ODII, E RICORDA CHE ANCORA TI VOGLIO BENE, SEBBENE SOLO COME UN AMICO\"", +}, +}; + + +const char *_texte[NUM_LANGS][NUM_TEXTE] = { +{ + // 0 + "", + "YOU... HEY YOU!", + "DON'T GIVE ME THAT CRAP ABOUT A DEAD BODY OK?", + "I'M ALIVE. IT'S JUST THAT I'M STARVING", + "WELL, YOU SEE. I WAS THE DRUNKARD OF THE VILLAGE, JUST KEEPING UP WITH THE FAMILY TRADITION, YOU KNOW? ONE NIGHT DRASCULA KIDNAPPED ME TO TAKE MY ORGANS AWAY", + // 5 + "SINCE ALCOHOL STILL KEEPS ME QUITE YOUNG, I'M HERE LIKE A SCRAP YARD. EVERYTIME HE NEEDS SOMETHING FOR THE MONSTER HE IS MAKING, HE COMES AND TAKES IT FROM ME", + "IT HURT AT FIRST, BUT I DON'T CARE ANYMORE", + "I DON'T KNOW. I GUESS IT'S HIS GRADUATE PROJECT", + "I'M DESIDERIO, AND I CAN HELP YOU WITH ANYTHING YOU NEED", + "THE TRUTH IS THAT I DON'T REALLY FEEL LIKE IT, BUT THANKS VERY MUCH ANYWAY SIR", + // 10 + "TAKE IT, IT'S YOURS", + "WHY DO ALL ADVENTURE GAMES END WITH A SUNRISE OR A SUNSET?", + "DO ALL THESE NAMES BELONG TO THE CREATORS OF THE GAME?", + "AREN'T THEY ASHAMED TO BE SEEN BY EVERYBODY?", + "JESUS, THAT EMILIO DE PAZ IS EVERYWHERE!!", + // 15 + "REALLY?", + "YES", + "WELL, DON'T MAKE A FUSS ABOUT IT", + "HEY WEREWOLF, BY THE WAY...", + "DIDN'T YOU FALL OFF A WINDOW AND GET BADLY HURT", + // 20 + "AT LEAST IT WASN'T ALWAYS THE SAME ONES...", + "HE'S BEEN OUT FOUR TIMES ALREADY", + "I'D LIKE TO BE A MODEL", + "ALL RIGHT, AND WHAT ARE YOU GOING TO DO?", +}, +{ + // 0 + "", + "EO, USTED", + "\255QUE MUERTO NI OCHO CUARTOS!", + "ESTOY VIVO, LO QUE PASA ES QUE YO PASO HAMBRE, \250SABE USTED? ", + "PUES VERA, SE\245OR. YO ERA EL BORRACHO DEL PUEBLO, DIGNO SUCESOR DE UNA FAMILIA DE ILUSTRES BORRACHUZOS, Y UNA NOCHE DRASCULA ME SECUESTRO PARA ROBARME LOS ORGANOS", + // 5 + "RESULTA QUE COMO ME CONSERVO EN ALCOHOL, ME TIENE AQUI EN PLAN DESSGUACE. CADA VEZ QUE NECESITA ALGO PARA EL MONSTRUO QUE ESTA CREANDO VIENE Y ME LO COGE", + "AL PRINCIPIO ME DOLIA, NO CREA, PERO YA ME DA IGUAL", + "NO SE, SERA SU PROYECTO DE FIN DE CARRERA", + "MI NOMBRE ES DESIDERIO, PARA SERVIRLE A USTED", + "PUES LA VERDAD ES QUE NO TENGO MUCHA GANA, PERO MUCHAS GRACIAS DE TODAS MANERAS, SE\245OR", + // 10 + "SI, TU MISMO", + "\250POR QUE TODOS LOS JUEGOS DE AVENTURAS TERMINAN CON UN AMANECER O UNA PUESTA DE SOL? ", + "\250Y TODOS ESTOS NOMBRES SON DE LOS QUE HAN HECHO EL JUEGO?", + "\250Y NO LES DA VERG\232ENZA SALIR Y QUE LOS VEA TODO EL MUNDO?", + "JOLIN, NO HACE MAS QUE SALIR \"EMILIO DE PAZ\" ", + // 15 + "\250DE VERDAD?", + "SI", + "PUES NO ES PARA TANTO", + "POR CIERTO HOMBRE LOBO...", + "... \250NO CAISTE POR UNA VENTANA Y TE HICISTE POLVO?", + // 20 + "SI AL MENOS NO FUESEN SIEMPRE LOS MISMOS", + "ESE YA HA SALIDO CUATRO VECES", + "ME GUSTARIA SER MODELO", + "YA, \250Y TU QUE VAS A HACER?", +}, +{ + // 0 + "", + "EJ, SIE DAA", + "DU BIST WOHL BESOFFEN ODER WAS ? !", + "ICH BIN LEBENDIG, ABER ICH HABE HUNGER, WISSEN SIE ?", + "TJA,ICH WAR DER DORFSaeUFER, STOLZER abkomme EINER DORFSaeUFERsippe UND EINES NACHTS holte mich DRASCULA, UM MIR DIE ORGANE ZU KLAUEN", + // 5 + "WEIL ICH MICH IN ALKOHOL gut HALTE BIN ICH SEIN ERSATZTEILLAGER. IMMER WENN ER WAS FueR SEIN MONSTERCHEN BRAUCHT, BEDIENT ER SICH BEI MIR", + "AM ANFANG TAT DAS HoeLLISCH WEH, ABER JETZT MERK ICH SCHON NICHTS MEHR", + "KEINE AHNUNG, ES WIRD WOHL SEINE DIPLOMARBEIT SEIN", + "ICH HEISSE DESIDERIUS UND STEHE ZU IHREN DIENSTEN", + "NAJA, EIGENTLICH HABE ICH KEINE GROSSE LUST ABER VIELEN DANK JEDENFALLS, MEIN HERR", + // 10 + "JA,NUR ZU", + "WARUM HoeREN ALLE SPIELE MIT SONNENAUFGANG ODER SONNENUNTERGANG AUF ?", + "UND SIE HABEN DIE NAMEN VON DEN MACHERN DIESES SPIELS BENUTZT ?", + "UND SIE SCHaeMEN SICH NICHT SICH ALLER WELT ZU OFFENBAREN ?", + "SCHEIBENKLEISTER. SCHON WIEDER DER PROGRAMMIERER", + // 15 + "WIRKLICH ?", + "JA", + "SO SCHLIMM IST ES AUCH WIEDER NICHT", + "APROPOS WERWOLF....", + "....BIST DU NICHT AUS EINEM FENSTER GEFALLEN UND ZU STAUB GEWORDEN ?", + // 20 + "WENN ES WENIGSTENS NICHT IMMER DIESELBEN WaeREN", + "DER IST SCHON 4 MAL AUFGETAUCHT", + "ICH WaeRE GERN FOTOMODELL", + "KLAR, UND WAS WILLST DU SPaeTER MAL MACHEN ?", +}, +{ + // 0 + "", + "OH\220! VOUS!", + "QUEL MORT NI QUELLE HISTOIRE!", + "JE SUIS VIVANT. C'EST QUE J'AI FAIM, VOUS SAVEZ? ", + "J'TAIS L'IVROGNE DU VILLAGE, LE DIGNE REPRSENTANT D'UN FAMILLE D'ILLUSTRES SO\352LARDS, ET DRASCULA M'A SQUESTR UNE NUIT POUR ME VOLER LES ORGANES", + // 5 + "COMME JE ME CONSERVE EN ALCOOL, IL ME TIENS ICI EN PLAN DBALLAGE. \267 CHAQUE FOIS QU'IL A BESOIN DE QUELQUE CHOSE POUR SON MONSTRE, IL LE PRENDRE", + "AU DBUT A ME FAISAIT MAL, MAIS JE M'EN FICHE DJ\267", + "JE NE SAIS PAS, MAIS CE SERA SON PROJET FIN D'TUDES", + "MON NOM EST DSIR, POUR VOUS SERVIR", + "VRAIMENT JE N'AI PAS UNE ENVIE FOLLE, MAIS MERCI QUAND M\322ME, MONSIEUR", + // 10 + "OUI, TOI M\322ME", + "POURQUOI TOUS LES JEUX D'AVENTURES FINISSENT AVEC UNE AUBE OU UN COUCHER DU SOLEIL? ", + "ET VOIL\267 LES NOMS DE TOUS QUI ON FAIT LE JEU?", + "ET N'ONT-ILS PAS LA HONTE DE SE MONTRER ET QUE TOUT LE MONDE LES VOIT?", + "AH ZUT! IL NE FAIT QUE SORTIR \"EMILIO DE PAZ\" ", + // 15 + "C'EST VRAI", + "OUI", + "EH BIEN, IL NE FAUT PAS EXAG\220RER", + "EN FAIT HOMME-LOUP...", + "...N'EST-TU PAS TOMB\220 D'UNE FEN\322TRE EN TE BR\220SILLANT?", + // 20 + "SI DU MOINS N'\220TAIENT PAS TOUJOURS LES M\322MES...", + "CELUI-L\267 EST D\220J\267 SORTI QUATRE FOIS", + "J'AIMERAIS \322TRE MANNEQUIN", + "PARFAITEMENT. ET TOI, QUE VAS-TU FAIRE?", +}, +{ + // 0 + "", + "EO, LEI", + "MA CHE DICI!", + "SONO VIVO, MA HO SEMPRE MOLTA FAME, SA LEI?", + "IO ERO IL BEONE DEL PAESE, DEGNO SUCCESSORE DI UNA FAMIGLIA DI ILLUSTRI BEONI, E UNA NOTTE DRASCULA MI SEQUESTR\220 PER RUBARMI GLI ORGANI", + // 5 + "mi utilizza COME UNO SCASSO, OGNI VOLTA CHE HA BISOGNO DI QUALCOSA PER IL MOSTRO CHE ST\265 CREANDO VIENE QUA E MI LO toglia", + "AL INIZIO MI FACEVA MALE, MA ORA NON FA NIENTE", + "NON SO, SAR\265 LA SUA TESINA DI FINE DI LAUREA", + "IL MIO NOME PEPPINO, PER SERVIRGLI", + "LA VERIT\265 CHE NON HO MOLTA VOGLIA, COMUNQUE GRAZIE MILE, SIGNORE", + // 10 + "SI, PROPRIO TU", + "PER CHE TUTTI I VIDEO-GIOCHI D' AVVENTURE FINISCONO CON UN'ALBEGGIARE O UN TRAMONTO?", + "E TUTTI QUESTI NOMI SONO DI CHI HANNO FATTO IL GIOCO?", + "E NON SI VERGOGNANO DI USCIRE ED ESSERE VISTI DA TUTTI QUANTI?", + "UFFA, SOLTANTO ESCI \"EMILIO DE PAZ\"", + // 15 + "DAVVERO?", + "SI", + "NON \220 PER METTERSI COS\326 ", + "CERTO LUPO-MANNARO..", + "... MA NON SEI CADUTO DA UNA FINESTRA E TI HAI FATTO MALE?", + // 20 + "SE PER UNA VOLTA NON FOSSENO SEMPRE GLI STESSI", + "QUELLO \220 GIA USCITO QUATRO VOLTE", + "MI PIACEREBBE ESSERE TOP MODEL", + "SI, E TU, COSA VAI A FARE?", +}, +}; + + +const char *_texti[NUM_LANGS][NUM_TEXTI] = { +{ + // 0 + "", + "MASTER, THIS IS NOT WORKING", + "I AM POSITIVE, MASTER", + "I'M SORRY MASTER", + "ARE YOU GOING TO BRING ANOTHER CRAZY SCIENTIST HERE? THE LABORATORY IS ALREADY FULL UP, AND BESIDES, THEY'RE ALL OUT OF DATE", + // 5 + "HUSH MASTER, THE FEMINISTS MIGHT HEAR YOU", + "DAMN IT!", + "I DIDN'T EXPECT YOU SO SOON, MASTER", + "QUITE BAD MASTER. THERE ARE SOME PROBLEMS WITH THE SATELLITE, I JUST CAN'T RECEIVE ANYTHING. THERE MUST BE SOME INTERFERENCE FROM THE STORM", + "WHAT DO I KNOW, MASTER?", + // 10 + "YES, MY MASTER", + "MASTER", + "DO YOU KNOW WHAT TIME IS IT?", + "WHAT? OH, THAT SCARED ME!. YOU ARE THE \"NIGHT-CLEANING GUY\", RIGHT?", + "I'M IGOR, THE VALET. YOU CAN START WITH THE BALL ROOM. THERE'S BEEN A SUPER NATURAL ORGY IN THERE YESTERDAY AND IT LOOKS LIKE SHIT", + // 15 + "IF YOU NEED ANYTHING, JUST BUY IT", + "IT'S THE TAX RETURN APPLICATION FORM, CAN'T YOU SEE?", + "NEITHER DO I. THE NUMBERS ARE VERY SMALL AND I CAN'T SEE MUCH AT THIS DISTANCE.", + "NO WAY! THEY MAKE ME LOOK UGLY", + "OH, WELL. IT'S JUST LIKE A CRAZY PARTY THAT THE MASTER ORGANIZES WITH HIS FRIENDS EACH TIME SOME IDIOT COMES ALONG TRYING TO KILL HIM", + // 20 + "THEY TAKE HIS EYES OUT. THEN, POUR IN SOME LEMON JUICE SO THAT IT ITCHES TO DEATH, AND THEN...", + "NO", + "WHAT DO YOU MEAN WHY NOT? DO YOU KNOW WHAT TIME IT IS?", + "YES, IT'S WINTER", + "SEE YOU LATER", + // 25 + "DON'T EVEN THINK ABOUT IT!", + "WELL, THAT'S ENOUGH FOR TODAY. I'M GOING TO HAVE SUPPER", + "MAN, I ALWAYS FORGET TO LOCK IT, RIGHT?", + "THE HELL WITH IT!", + "WHAT? OH, YOU SCARED ME MASTER, I THOUGHT YOU WERE ASLEEP", + // 30 + "OH, BY THE WAY, I TOOK THE LIVING-ROOM KEYS SO THAT YOU CAN WATCH THE EARLY MORNING CARTOONS WITHOUT WAKING ME UP", + "YOU'VE GOT ANOTHER COLD MASTER? DAMN IT! I TOLD YOU TO GET SOME HEATING IN HERE...", + "ALL RIGHT, JUST TAKE YOUR ASPIRIN AND GO TO BED TO SWEAT FOR A WHILE. GOOD NIGHT", +}, +{ + // 0 + "", + "MAESTRO, CREO QUE ESTO NO RULA", + "ESTOY SEGURISIMO, MAESTRO...", + "LO SIENTO, MAESTRO", + "\250VA A TRAER OTRO DE CIENTIFICO LOCO? LE ADVIERTO QUE TENEMOS EL LABORATORIO LLENO Y ESTAN TODOS CADUCADOS", + // 5 + "CALLE, MAESTRO, QUE COMO LE OIGAN LAS FEMINISTAS", + "HAY QUE JOROBARSE", + "\255MAESTRO! \255NO LE ESPERABA TAN PRONTO!", + "MAL MAESTRO, DEBE HABER PROBLEMAS CON EL SATELITE Y NO CONSIGO SINTONIZAR LA IMAGEN. ADEMAS LA TORMENTA PRODUCE INTERFERENCIAS", + "\250Y A MI QUE ME CUENTA, MAESTRO?", + // 10 + "SI, MAESTRO", + "MAESTRO", + "\250SABE LA HORA QUE ES?", + "\250EH? \255AH, QUE SUSTO ME HAS DADO! TU ERES EL DE \"LIMPIEZA NOCTURNA\"\250NO?", + "YO SOY IGOR, EL MAYORDOMO. PUEDES EMPEZAR POR EL SALON DE BAILE. AYER HUBO ORGIA SOBRENATURAL Y ESTA HECHO UNA MIERDA", + // 15 + "SI NECESITAS ALGO, LO COMPRAS", + "LA DECLARACION DE LA RENTA \250ES QUE NO LO VES?", + "PUES YO TAMPOCO, PORQUE ENTRE QUE LOS NUMEROS SON MUY CHICOS, Y YO QUE NO VEO BIEN DE LEJOS...", + "\255NI HABLAR! ME HACEN PARECER FEO", + "BAH, ES UN FESTORRO QUE SE MONTA EL MAESTRO CON SUS COLEGAS CADA VEZ QUE LLEGA ALGUN IMBECIL QUERIENDO ACABAR CON EL", + // 20 + "PRIMERO LE SACAN LOS OJOS; LUEGO LE ECHAN ZUMO DE LIMON PARA QUE LE ESCUEZA; DESPUES...", + "NO", + "\250COMO QUE POR QUE NO? \250TU HAS VISTO LA HORA QUE ES?", + "EN INVIERNO, SI", + "HASTA LUEGO", + // 25 + "\255NI SE TE OCURRA!", + "BUENO, POR HOY YA VALE. ME VOY A CENAR", + "\255Y QUE SIEMPRE SE ME OLVIDA CERRAR CON LLAVE!", + "\255HAY QUE JOROBARSE!", + "\250EH? \255AH! QUE SUSTO ME HA DADO, MAESTRO. CREIA QUE ESTABA DURMIENDO", + // 30 + "AH, POR CIERTO, TOME LAS LLAVES DE LA SALA DE ESTAR Y ASI NO ME MOLESTA MA\245ANA TEMPRANO SI QUIERE VER LOS DIBUJOS", + "\250QUE, YA SE HA RESFRIADO OTRA VEZ, MAESTRO? HAY QUE JOROBARSE. SI SE LO TENGO DICHO, QUE PONGA CALEFACCION... ", + "BUENO, TOMESE UNA PASTILLA DE ACIDOACETIL SALICILICO Y HALA, A SUDAR. BUENAS NOCHES", +}, +{ + // 0 + "", + "MEISTER, ICH GLAUBE, DAS KLAPPT NICHT", + "ICH BIN ABSOLUT SICHER, MEISTER....", + "TUT MIR LEID, MEISTER", + "NOCH SO EINEN VERRueCKTEN WISSENSCHAFTLER ? ABER DAS LABOR IST DOCH VOLL MIT IHNEN UND ALLE SIND ueBER DEM VERFALLSDATUM", + // 5 + "SEIEN SIE STILL MEISTER. WENN DAS DIE FEMINISTINNEN HoeREN", + "GRueNSPAN UND ENTENDRECK", + "MEISTER! ICH HABE SIE NOCH GAR NICHT ERWARTET !", + "SCHLECHT, MEISTER. ES GIBT WOHL PROBLEME MIT DER SCHueSSEL UND ICH BEKOMME DAS BILD EINFACH NICHT KLAR. UND DANN DAS GEWITTER !", + "UND WIESO ERZaeHLEN SIE MIR DAS, MEISTER ?", + // 10 + "JA, MEISTER", + "MEISTER", + "WISSEN SIE, WIEVIEL UHR ES IST ?", + "Hae ?OH, DU HAST MICH GANZ SCHoeN ERSCHRECKT. BIST DU VON \"BLITZ UND BLANK BEI MONDESSCHEIN\"", + "ICH BIN IGOR, DER HAUSVERWALTER.DU KANNST MIT DEM WOHNZIMMER ANFANGEN. GESTERN HATTEN WIR EINE ueBERNATueRLICHE ORGIE UND ES SIEHT AUS WIE im SAUSTALL", + // 15 + "KAUF ALLES WAS DU BRAUCHST !", + "DIE STEUERERKLaeRUNG.SIEHST DU DAS NICHT ?", + "ICH AUCH NICHT, WEIL DIE ZAHLEN SCHON MAL SEHR KLEIN SIND UND ICH DOCH kurzsichtig bin....", + "VON WEGEN ! SIE MACHEN MICH HaeSSLICH", + "PAH, DAS IST EINE RIESENFETE DIE DER MEISTER JEDESMAL DANN ABZIEHT, WENN IRGENDSOEIN IDIOT KOMMT, DER IHN ERLEDIGEN WILL", + // 20 + " ZUERST REISSEN SIE IHM DIE AUGEN AUS DANACH GIESSEN SIE ZITRONENSAFT DRueBER DAMIT ES SCHoeN BRENNT UND DANN...", + "NEIN", + "WIE WARUM NICHT ? WEISST DU WIEVIEL UHR ES IST ?", + "im WINTER JA", + "TSCHueSS", + // 25 + "WAG ES BLOOOSS NICHT !", + "GUT, FueR HEUTE REICHTS, DAS ABENDESSEN RUFT", + "IMMER VERGESSE ICH ZUZUSCHLIESSEN !", + "VERDAMMTER MIST NOCHMAL !", + "HaeH ?AH !SIE HABEN MICH GANZ SCHoeN ERSCHRECKT, MEISTER. ICH DACHTE SIE SCHLAFEN", + // 30 + "ACH,ueBRIGENS, ICH HABE DIE WOHNZIMMERSCHLueSSEL GENOMMEN. SO NERVEN SIE MICH MORGEN FRueH NICHT MIT IHREN ZEICHENTRICKSERIEN", + "ACH, SIE HABEN SICH SCHON WIEDER ERKaeLTET, MEISTER ? ICH HAB JA IMMER SCHON GESAGT, SIE SOLLEN DIE HEIZUNG ANMACHEN...", + "NAJA, SCHLUCKEN SIE EINE SALICILACETYLSaeURE-TABLETTE UND AB INS BETT ZUM SCHWITZEN. GUTE NACHT", +}, +{ + // 0 + "", + "MA\327TRE, JE CROIS QUE \200A NE ROULE PAS", + "J'EN SUIS TR\324S S\352R, MA\327TRE...", + "JE LE REGRETTE, MA\327TRE", + "IL APPORTERA UN AUTRE DE SCIENTIFIQUE FOU? JE VOUS PRVIENS QUE LE LABORATOIRE EN EST PLEIN ET TOUS SONT PRIMS", + // 5 + "TAISEZ-VOUS, MA\327TRE, SI LES FMINISTES VOUS COUTENT...", + "CE QU'IL FAUT SUPPORTER!", + "MA\327TRE! -JE NE VOUS ATTENDAIT PAS SI T\342T!", + "A VA MAL MA\327TRE. IL DOIT AVOIR DES PROBL\324MES AVEC LE SATELLITE ET JE NE RUSSIT PAS \267 SINTONISER L'IMAGE. ET ENCORE L'ORAGE PRODUIT DES INTERFRENCES.", + "CANCANS QUE TOUT CELA, MA\327TRE!", + // 10 + "OUI, MA\327TRE", + "MA\327TRE", + "QUELLE HEURE IL EST?", + "H\220? -AH! TU M'AS FAIT PEUR! TU EST CELUI DU \"NETTOYAGE DE NUIT\", NON?", + "JE SUIS IGOR, LE MAJORDOME. TU PEUX COMMENCER PAR LE SALON DE BAL. HIER IL Y A EU UNE ORGIE SURNATURELLE ET C'EST UNE SALOPERIE", + // 15 + "SI TU AS BESOIN DE QUELQUE CHOSE, ACHETE-EN!", + "LA D\220CLARATION D'IMP\342TS, NE LE VOIS-TU PAS?", + "EH BIEN, MOI NON PLUS, CAR \267 CAUSE DE SI PETITS NUM\220ROS ET MA DIFFICULT\220 POUR BIEN VOIR DE LOIN...", + "ON N'EN PARLE PLUS! ILS ME FONT PARA\327TRE LAID", + "BAH! C'EST UNE BELLE F\322TE QUE LE MA\327TRE ORGANISE AVEC SES COLL\324GUES \267 CHAQUE FOIS QU'UN IMB\220CILE ARRIVE ET VEUT FINIR AVEC LUI", + // 20 + "D'ABORD ON LUI ARRACHE LES YEUX; APR\324S, ON LUI VERSE DE JUS DE CITRON POUR QUE \200A LUI CUISE; APR\324S...", + "NON", + "POURQUOI PAS? TU AS VU L'HEURE QU'IL EST?", + "EN HIVER, OUI", + "AU REVOIR", + // 25 + "N'Y PENSES M\322ME PAS!", + "BON, \200A VA POUR AUJOURD'HUI. JE VAIS D\327NER", + "J'OUBLIE TOUJOURS FERMER \267 CL\220, H\220LAS!", + "QUEL ENNUI!", + "H\220? -VOUS M'AVEZ FAIT PEUR, MA\327TRE. JE PENSAIS QUE VOUS DORMIEZ", + // 30 + "H\220, MA\327TRE! PRENEZ LES CL\220S DE LA SALLE DE S\220JOUR, AINSI DONC SI VOUS VOULEZ VOIR LES DESSINS ANIM\220S DEMAIN DE BONNE HEURE NE ME D\220RANGEREZ PAS", + "QUOI? VOUS VOUS \322TES ENRHUM\220 ENCORE UNE FOIS, MA\327TRE? QUELLE CONTRARI\220T\220! JE VOUS AI D\220J\267 DIT D'Y METTRE LE CHAUFFAGE... ", + "BON, AVALEZ UN COMPRIM\220 D'ACIDEAC\220TYL SALICYLIQUE ET ALLEZ TRANSPIRER! BONNE NUIT!", +}, +{ + // 0 + "", + "MAESTRO, CREDO CHE QUESTO NON VA", + "SICURISSIMO, MAESTRO", + "SCUSI, MAESTRO", + "VA A PORTARE UN ALTRO SCIENTIFICO PAZZO? GLI AVVERTO CHE IL LABORATORIO PIENO E NE ABBIAMO TUTTI SCADUTI", + // 5 + "ZITTO, MAESTRO, FIGURASI SE LE SENTONO LE FEMMINISTE", + "ACCIDENTI!", + "-MAESTRO! NON LE ASPETTAVO COS\326 PRESTO!", + "MALE MAESTRO, DEVONO CI ESSERE PROBLEMI CON IL SATELLITE E NON RIESCO A SINTONIZZARE L'IMMAGINE. ANZI LA TEMPESTA CAUSA INTERFERENZE", + "CHE NE SO, MAESTRO", + // 10 + "SI, MAESTROl", + "MAESTRO", + "SA CHE ORE SONO?", + "EH? -AH, CHE COLPO! TU SEI QUELLO DI \"PULIZIA NOTTURNA\" NO?", + "IO SONO IGOR, IL MAGGIORDOMO. PUOI COMINCIARE NEL SALOTTO DI BALLO, IERI C'ERA ORGIA SOPRANATURALE ED \220 PIENO DI MERDA", + // 15 + "SE HAI BISOGNO DI QUALCOSA, COMPRALA", + "LA DECLARAZIONE DI REDDITI, NON VEDI?", + "NEANCH'IO, I NUMERI SONO PICCOLISSIMI E ANZI, IO NON VEDO BENE DA LONTANO", + "NEANCHE PARLARNE, MI FANNO SEMBRARE BRUTTO", + "\220 UNA FESTA CHE FA IL MAESTRO PER I SUOI AMICI OGNI VOLTA CHE ARRIVA QUALCHE IMBECILE CHE VUOLE FINIRE CON LUI", + // 20 + "PRIMA, GLI TOGLIANO GLI OCCHI; POI GLI VERSANO SUCCO DI LIMONE, DOPO IL BRUCIORE.......", + "NO", + "COME CHE PER CHE NO? MA TU HAI VISTO CHE ORE SONO?", + "IN INVERNO, SI", + "ARRIVEDERCI", + // 25 + "N\324 PENSARCI", + "BENE, BASTA PER OGGI. VADO A CENARE", + "E CHE SEMPRE DIMENTICO CHIUDERE CON LA CHIAVE", + "ACCIDENTI!", + "EH? -AH! CHE COLPO, MAESTRO, PENSAVO STAVA DURMENDO", + // 30 + "ORA MI RICORDO, PRENDA LE CHIAVI DEL SOGGIORNO, COS\326 DOMANI MATTINA NON MI DISTURBA SE VUOLE GUARDARE I CARTONI ANIMATI", + "HA PRESSO FREDDO UN'ALTRA VOLTA, MAESTRO? SEMPRE GLI DICO CHE METTA IL RISCALDAMENTO", + "PRENDA UNA ASPIRINA ED A SUDARE. BUONA NOTTE", +}, +}; + + +const char *_textl[NUM_LANGS][NUM_TEXTL] = { +{ + // 0 + "", + "ARE YOU GOING TO LET YOURSELF BE GUIDED BY PRIMITIVE INSTINCTS JUST BECAUSE WE BELONG TO DIFFERENT RACES AND THE SOCIAL SITUATION IS TELLING US TO DO SO?", + "AREN'T WE TIED BY SENSE? WHICH IS OUR MOST POWERFUL WEAPON AS WELL AS OUR MOST PRECIOUS GIFT?", + "OH, IF WE ALL LET OUR THOUGHTS GUIDE OUR WAY IN LIFE WITHOUT LEAVING SOME ROOM FOR FEELINGS WHICH LET OUR PRE-EVOLUTIVE INSTINCTS COME OUT!", + "ANSWER ME, EPHEMERAL CREATURE. WOULDN'T WE ALL BE HAPPIER WITHOUT THOSE EMOTIONAL BINDINGS?", + // 5 + "YOU ARE NOT GETTING THROUGH", + "THIS IS A VERY CLEAR EXAMPLE, YOU SEE?: YOU WANT TO GET THROUGH AND GO AHEAD WITH YOUR ADVENTURE, AND I WON'T LET YOU DO THAT", + "WILL THIS BE A CONTROVERSIAL POINT BETWEEN US AFTER WE HAVE ONLY JUST MET?", + "WELL THEN", + "WELL, THAT DEPENDS ON WHAT WE HAVE A RELATIONSHIP FOR. SOME AUTHORS DEFEND...", + // 10 + "YUCK! HUNTING AS A WAY TO SURVIVE IS AN INCOMPREHENSIBLE ARCHAIC THING FOR A SUPERIOR BEING LIKE ME. BESIDES, I'VE BECOME A VEGETARIAN", + "IT JUST SO HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO THINK ABOUT THE ABOVE MENTIONED THOUGHT", + "IT TOOK ME A LONG TIME TO QUIT OLD HABITS BUT AT LEAST MY IRASCIBLE SOUL SWALLOWED UP THE CONCUPISCIBLE ONE, AND EVER SINCE, I'VE NEVER EATEN MEAT AGAIN", + "NOT EVEN THE PLEASURE OF SUCKING ON THE BONE, THE TASTE OF THE SKIN AND THAT SWEET TASTE OF MARROW...THAT JUST TAKES YOU TO HEAVENLY PLACES", + "IT DOESN'T REALLY GET TO ME AT ALL", + // 15 + "WHAT?", + "I DON'T KNOW WHAT YOU'RE TALKING ABOUT, YOU EPHEMERAL CREATURE", + "I'M NOT INTERESTED", + "I DON'T KNOW ABOUT THE OTHER GAMES, BUT WE COULD USE THIS BEAUTIFUL SCREEN", + "", + // 20 + "I'D CARE...", + "NO. IT'S JUST THE SON, THE FATHER, THE GRANDFATHER AND A FRIEND, WHO ARE CALLED LIKE THAT", + "BUT, IT IS GOING TO LOOK LIKE THE GAME WAS MADE BY FIVE PEOPLE", + "THESE ARE PROMISING GUYS", + "THAT'S A GOOD ONE! A GOOD ONE!", + // 25 + "PLEASE, CALL ME CONSTANTINO", + "IT WASN'T ME MAN. IT WAS \"EL COYOTE\", MY TWIN", + "JESUS, THESE ARE REALLY LONG CREDIT TITLES", + "I STOPPED COUNTING A LONG TIME AGO", + "WHAT WILL BECOME OF YOU NOW, DESIDERIO?", + // 30 + "BUT, YOU SHOULD LOSE SOME WEIGHT", + "I'LL JUST RETIRE TO THE TIBET AND THINK ABOUT THE MEANING OF LIFE", +}, +{ + // 0 + "", + "UN MOMENTO. \250SOLO PORQUE PERTENECEMOS A RAZAS DISTINTAS Y LA SOCIEDAD DICE QUE SEREMOS ENEMIGOS VAMOS A DEJARNOS LLEVAR POR NUESTROS MAS PRIMITIVOS INSTINTOS?", + "\250ACASO NO NOS UNE LA RAZON, ELARMA MAS PODEROSA Y, A LA VEZ, EL DON MAS PRECIADO QUE TENEMOS?", + "\255AH, SI EL ENTENDIMIENTO GUIARA NUESTROS PASOS POR LA VIDA SIN DEJAR SITIO A LOS SENTIMIENTOS, QUE AFLORAN NUESTRAS INCLINACIONES PRE-EVOLUTIVAS!", + "\250NO CREES QUE SERIAMOS MAS DICHOSOS SIN ESAS ATADURAS EMOCIONALES? CONTESTA EFIMERA CRIATURA", + // 5 + "NO PASAS", + "\250VES? ESTE ES UN CLARO EJEMPLO: TU QUIERES PASAR Y CONTINUAR TU AVENTURA Y YO NO PUEDO PERMITIRLO", + "\250HA DE SER ESE MOTIVO SUFICIENTE DE CONFLICTO ENTRE NOSOTROS, QUE NO NOS CONOCEMOS DE NADA?", + "PUES ESO", + "BUENO, ESO DEPENDE DE LO QUE ENTENDAMOS POR RELACION. ALGUNOS AUTORES DEFIENDEN...", + // 10 + "AGGG. LA CAZA COMO MEDIO DE SUBSISTENCIA ES UNA ACTIVIDAD ARCAICA INCOMPATIBLE CON UNA NATURALEZA SUPERIOR COMO LA MIA. Y ADEMAS ME HE VUELTO VEGETARIANO", + "RESULTA QUE ESTABA COMIENDOME A UN TIO Y ME PUSE A REFLEXIONAR. LLEGUE A LA CONCLUSION ANTES MECIONADA", + "ME COSTO MUCHO DEJAR LOS HABITOS DESDE TANTO TIEMPO ADQUIRIDOS, PERO POR FIN MI ALMA IRASCIBLE VENCIO A LA CONCUPISCIBLE Y NO HE VUELTO A PROBAR LA CARNE", + "NI SIQUIERA EL PLACER QUE SUPONE UN HUESO, CON EL JUGO DE LA PIEL ENTRE SUS POROS Y ESE SABOR QUE TE TRANSPORTA A LUGARES REMOTOS PARADISIACOS...", + "NI SIQUIERA ME AFECTA. PARA NADA, DE VERDAD", + // 15 + "\250EL QUE?", + "NO SE DE QUE ME HABLAS, EFIMERA CRIATURA", + "NO ME INTERESA", + "LOS DEMAS JUEGOS, NO SE, PERO ESTE PARA APROVECHAR ESTA PANTALLA TAN BONITA", + "", + // 20 + "A MI SI ME DARIA", + "NO, ES QUE SON EL ABUELO, EL PADRE, EL HIJO, Y UN AMIGO QUE SE LLAMA ASI", + "NO, PERO ES QUE SI NO VA A PARECER QUE HAN HECHO EL JUEGO ENTRE CINCO", + "ESTOS CHICOS PROMETEN", + "\255ESE ES BUENO, ESE ES BUENO!", + // 25 + "LLAMAME CONSTANTINO", + "NO ERA YO, HOMBRE. ERA MI DOBLE, EL COYOTE", + "VAYA, QUE CREDITOS MAS LARGOS", + "YO YA PERDI LA CUENTA", + "BUENO DESIDERIO, \250Y QUE VA A SER DE TI AHORA?", + // 30 + "PERO TENDRIAS QUE ADELGAZAR", + "ME RETIRARE AL TIBEL A REFLEXIONAR SOBRE EL SENTIDO DE LA VIDA", +}, +{ + // 0 + "", + "MOMENT mal. NUR WEIL WIR UNTERSCHIEDLICHER HERKUNFT SIND UNd eigentlich feinde sein muessten mueSSEN WIR UNS DOCH Nicht wie die primaten auffuehren!", + "VERBINDET UNS ETWA NICHT DIE VERNUNFT, GEFaeHRLICHSTE WAFFE UND ZUGLEICH GRoeSSTE GABE, DIE WIR HABEN ?", + "AH, WENN NUR DAS GEGENSEITIGE VERSTaeNDNIS die gefuehle besiegen koennte,DIE DIE WURZEL UNSERER PRaeHISTORISCHEN NEIGUNGEN SIND!", + "GLAUBST DU NICHT, DASS WIR OHNE DIESE GEFueHLSFESSELN GLueCKLICHER WaeREN ? ANTWORTE, DU EINTAGSFLIEGE", + // 5 + "DU KOMMST NICHT DURCH", + "SIEHST DU ? DU WILLST HIER DURCH UND MIT DEM ABENTEUER WEITERMACHEN UND ICH KANN DAS NICHT ZULASSEN", + "MUSS DENN DIE TATSACHE, DASS WIR UNS NICHT KENNEN, ANLASS ZUM STREIT SEIN?", + "GENAU", + "NAJA. KOMMT DARAUF AN, WAS WIR UNTER BEZIEHUNG VERSTEHEN. EINIGE VERTRETEN JA DEN STANDPUNKT, DASS....", + // 10 + "ARRGH.nur zu jagen, um zu ueberleben ist mir zu primitiv.UND AUSSERDEM BIN ICH SEIT KURZEM VEGETARIER", + "ES GING LOS,ALS ICH MIR GERADE EINEN TYPEN EINVERLEIBTE UND ANFING NACHZUDENKEN UND ZUM EBENERWaeHNTEN SCHLUSS KAM", + "ES war hart, DIE ALTEN laster ABZULEGEN, ABER seit MEINE FLEISCHESLUST MEINEn JaeHZORN besiegt hat HABE ICH KEIN FLEISCH MEHR GEGESSEN:", + "NICHT MAL DIE GAUMENFREUDE EINES KNOCHENS, MIT DEM SAFT DER HAUT IN DEN POREN UND DIESEm GESCHMACK DER DICH INS REICH DER SINNE ENTFueHRT...", + "ES MACHT MIR ueBERHAUPT NICHTS AUS, WIRKLICH", + // 15 + "WAS JETZT ?", + "ICH WEISS NICHT, WOVON DU REDEST, DU EINTAGSFLIEGE", + "DAS INTERESSIERT MICH NICHT", + "ANDERE SPIELE, ACH ICH WEISS NICHT, ABER DAS HIER HAT SO EINE NETTE GRAFIK", + "", + // 20 + "ICH HaeTTE SCHON LUST..", + "NEIN, SO HEISSEN DER OPA, DER VATER, DER SOHN UND EIN FREUND.", + "NEIN, ABER WENN NICHT, SIEHT ES SO AUS ALS WaeRE DAS SPIEL VON FueNF LEUTEN GEMACHT WORDEN", + "DIESE JUNGS SIND VIELVERSPRECHEND !", + "DER IST GUT, SUPERKLASSE !", + // 25 + "NENN MICH KONSTANTIN", + "MANN, DAS WAR NICHT ICH, SONDERN MEIN DOUBLE, DER KOYOTE", + "WOW, WAS FueR EINE LANGE DANKESLISTE", + "ICH HAB SCHON DEN ueBERBLICK VERLOREN", + "O.K. DESIDERIO, UND WAS WIRD JETZT AUS DIR WERDEN ?", + // 30 + "ABER DANN MueSSTEST DU ABNEHMEN", + "ICH WERDE NACH TIBET AUSWANDERN UND ueBER DEN SINN DES LEBENS NACHDENKEN", +}, +{ + // 0 + "", + "c'est parce qu'on APPARTIENT \267 DES RACES DIFF\220RENTES ET QUE LA SOCI\220T\220 NOUS CONFRONTE, QUE NOUS ALLONS AGIR PAR NOS PLUS M\220PRISABLES INSTINCTS?", + "NE SOMMES-NOUS PAR HASARD ACCROCHS PAR LA RAISON, L'ARME LA PLUS PUISSANTE, ET AUSSI LE DON LE PLUS PRCIEUX QUE NOUS AVONS?", + "AH!, SI LA RAISON GUIDAIT NOS PAS DANS LA VIE SANS Y ENTRA\327NER LES SENTIMENTS, QUI FONT JAILLIR NOS INCLINAISONS PR-VOLUTIVES!", + "NE CROIS-TU PAS QUE NOUS SERIONS PLUS HEREUX SANS CES ATTACHEMENTS-L\267? RPONDS-MOI, CRATURE PHM\324RE ", + // 5 + "TU NE PASSES PAS", + "TU VOIS? C'EST UN EXEMPLE CLAIR: TOI, TU VEUX PASSER ET POURSUIVRE TON AVENTURE ET MOI, JE NE PEUX PAS LE TOLRER", + "CELA DOIT \322TRE UNE RAISON SUFFISANTE DE CONFLIT ENTRE NOUS DEUX, QUI NE NOUS CONNAISSONS DE RIEN?", + "C'EST CELA", + "EH BIEN, CELA DPEND DE CE QU'ON ENTEND PAR RLATION. D'APR\324S QUELQUES AUTEURS...", + // 10 + "LA CHASSE COMME MOYEN DE SUBSISTANCE EST UNE ACTIVIT\220 ARCHA\330QUE, INCOMPATIBLE AVEC ma NATURE SUP\220RIEURE . ET DE PLUS JE SUIS DEVENU V\220G\220TARIEN", + "IL S'EN SUIT QU'EN TRAIN DE D\220VORER UN TYPE, JE ME SUIS MIS \267 R\220FL\220CHIR. ALORS, SUIS ARRIV\220 \267 LA CONCLUSION MENTIONN\220 CI-DESSUS", + "ABANDONNER CES HABITUDES M'EST REVENU CHER, MAIS \267 LA FIN MON \266ME IRASCIBLE a vancue MON \266ME CONCUPISCIBLE, ET D\324S LORS JE N'AI GO\352T\220 \267 LA VIANDE", + "M\322ME PAS LE PLAISIR DE CROQUER UN OS, AVEC LE SUC DE LA PEAU ENTRE SES PORES ET sa SAVEUR QUI TE TRANSPORTE VERS DES LIEUX TR\324S LONTAINS, PARADISIAQUES...", + "CECI NE M'AFFECTE PAS M\322ME, ABSOLUMENT PAS, C'EST VRAI", + // 15 + "QUOI?", + "JE NE SAIS PAS DE QUOI TU M'EN PARLES, CR\220ATURE \220PH\220M\324RE", + "CELA NE ME REGARDE PAS", + "LES AUTRES JEUX, JE NE SAIS PAS; MAIS CELUI-CI OUI, POUR EN PROFITER DE CET \220CRAN SI JOLI", + "", + // 20 + "MOI, JE NE M'EN FICHERAI PAS", + "NON, C'EST QU'ILS SONT LE GRAND-P\324RE, LE P\324RE, LE FILS, ET UN AMI QUI S'APPELLE COMME \200A", + "NON, MAIS SI NON, IL VA PARA\327TRE QU'ON A FAIT LE JEU ENTRE CINQ", + "CES GAR\200ONS ONT DU FUTUR", + "CELUI-L\267 EST BON! CELUI-L\267 EST BON!", + // 25 + "APPELLE-MOI CONSTANTIN", + "CE N'\220TAIT PAS MOI, MON VIEUX. C'\220TAIT MON DOUBLE, LE COYOTE", + "TIENS! QUELS CR\220DITS SI LONGS", + "J'AI D\220J\267 PERDU LES COMPTES", + "EH BIEN, D\220SID\324RE, QUE T'ARRIVERA-T-IL MAINTENANT?", + // 30 + "MAIS TU DEVRAIS MAIGRIR", + "JE VAIS ME RETIRER AU TIBEL POUR Y R\220FL\220CHIR SUR LE SENS DE LA VIE", +}, +{ + // 0 + "", + "UN ATTIMO. PERCHE SIAMO DI DIVERSE RAZZE E LA SOCIET\265 DICA CHE SIAMO NEMICI, ANDIAMO A LASCIARCI DOMINARE PER I PI\351 PRIMITIVI ISTINTI?", + "MA NON SIAMO UNITI DALLA RAGIONE, DALLA ARMA PI\351 PODEROSA E ANCHE PER IL DONO PI\351 PREZIOSO CHE ABBIAMO?", + "SE IL GIUDIZIO GUIDASSE I NOSTRI PASSI NELLA VITA SENZA LASCIARE POSTO AI SENTIMENTI, CHE MOSTRANO LE NOSTRE INCLINAZIONI PRE-EVOLUTIVI!", + "NON CREDI CHE SAREMMO PI\351 BEATI SENZA QUESTO LEGAME EMOZIONALE? RISPONDE EFFIMERA CREATURA", + // 5 + "NON PASSI", + "VEDI? QUESTO UN CHIARO ESEMPIO: TU VUOI PASSARE E PROSEGUIRE LA TUA AVVENTURA ED IO NON POSSO PERMETTERLO", + "MA DEVE ESSERE CAUSA DI CONFRONTO QUANDO ANCORA NON CI CONOSCIAMO?", + "CHE TI HO DETTO?", + "BOH, DIPENDE DI CHE CAPIAMO COME RELAZIONE. CI SONO AUTORI CHE DIFENDONO...", + // 10 + "LA CACCIA COME FORMA DI SUSSISTENZA \220 UNA ATTIVIT\265 ARCAICA, INCOMPATIBILE CON UNA NATURA SUPERIORE COM'\220 LA MIA: ADESSO SONO VEGETARIANO", + "TEMPO FA, STAVO MANGIANDO UN TIZIO QUANDO MI SONO MESSO A RIFLETTERE. FU QUANDO LA CONCLUSIONE DI PRIMA ARRIV\220 ", + "FU DIFFICILE LASCIARE LE MIE VECCHIE ABITUDINI, MA LA MIA ANIMA IRASCIBILE HA VINTO LA CONCUPISCIBILE E NON MANGIO PI\351 DELLA CARNE", + "NEPPURE IL PIACERE CHE FA UN OSSO, COL SUCCO DELLA PELLE E QUEL SAPORE CHE TI PORTA A POSTI LONTANI E PARADISIACI...", + "NEMMENO MI TOCCA DA VICINO, DAVVERO", + // 15 + "CHE COSA?", + "NON SO SU CHE MI PARLI, EFFIMERA CREATURA", + "NON MI INTERESA", + "GLI ALTRI VIDEO-GIOCHI, NON SO, MA QUESTO \220 PER APPROFITTARE QUESTO BELLO SCHERMO", + "", + // 20 + "IO SI ME VERGOGNAREI", + "NO, SONO IL NONNO, IL PADRE, IL FIGLIO, E UN AMICO CHE SI CHIAMA COS\326 ", + "NO, MA SE NON \220 COS\326, SEMBRAR\265 CHE HANNO FATTO IL VIDEO-GIOCO IN CINQUE", + "BRAVI RAGAZZI", + "-QUELLO \220 BUONO, QUELLO \220 BUONO!", + // 25 + "CHIAMAMI COSTANTINO", + "NON ERO IO, DAI,. ERA IL MIO CONTROFIGURA, IL COYOTE", + "INSOMMA, MOLTI TITOLI DI CODA", + "IO NON SO GI\265 QUANTI", + "ALLORA PEPPINO, CHE VAI FARE ADESSO?", + // 30 + "MA DOVRESTI DIMAGRIRE", + "MI APPARTER\220 AL TIBET A RIFLETTERE SUL SENSO DELLA VITA", +}, +}; + +const char *_textp[NUM_LANGS][NUM_TEXTP] = { +{ + // 0 + "", + "HI", + "YES SIR. IT'S BEAUTIFUL", + "NO, NO. HE WON'T DO IT", + "ALL RIGHT THEN", + // 5 + "REALLY?", + "SO?", + "I'M SORRY. THE PIANIST TRADE UNION DOESN'T ALLOW ME TO SAVE GIRLS FROM VAMPIRES' CLUTCHES", + "IF SHE HAD BEEN KIDNAPPED BY THE WEREWOLF...", + "I CAN ONLY PLAY THIS SONG", + // 10 + "I'M A CONSERVATOIRE PIANIST AND THE BARTENDER WON'T BUY MORE SCORES FOR ME", + "OH GOD, I REALLY LOVE CLASSICAL MUSIC!", + "IT'S BECAUSE I'M WEARING EAR-PLUGS", + "IT'S BECAUSE I CAN LIP-READ", + "NOOO", + // 15 + "NO! I'M NOT TAKING THIS ANY LONGER!", + "NO WAYYYYY!", + "WHAT? OF COURSE I'M INTERESTED", + "THANK GOD! I CAN PLAY A DIFFERENT SONG NOW!", + "I GUESS YOU CAN KEEP MY EAR-PLUGS", +}, +{ + // 0 + "", + "HOLA", + "BONITA. SI SE\245OR", + "NO QUE NO LO HACE", + "PUES VALE", + // 5 + "\250SI?", + "\250Y?", + "LO SIENTO. EL SINDICATO DE PIANISTAS NO ME PERMITE RESCATAR CHICAS DE LAS GARRAS DE LOS VAMPIROS", + "SI LA HUBIERA RAPTADO UN HOMBRE LOBO...", + "NO PUEDO TOCAR MAS QUE ESTA CANCION", + // 10 + "ES QUE SOY PIANISTA DE CONSERVATORIO Y EL TABERNERO NO COMPRA MAS PARTITURAS", + "\255CON LO QUE A MI ME GUSTA LA MUSICA CLASICA!", + "PORQUE LLEVO TAPONES EN LOS OIDOS", + "PORQUE LEO LOS LABIOS", + "NOOO", + // 15 + "\255QUE NO! \255QUE NO ME AGUANTO!", + "\255QUE NOOOOOO!", + "\250QUE? CLARO QUE ME INTERESA", + "AHORA PODRE TOCAR OTRA CANCION \255QUE ALIVIO!", + "SUPONGO QUE TE PUEDES QUEDAR CON MIS TAPONES", +}, +{ + // 0 + "", + "HALLO", + "JAWOLL, SEHR SCHoeN", + "NEIN, ER TUT ES EINFACH NICHT", + "NA GUT, OK.", + // 5 + "JA ?", + "UND ?", + "TUT MIR LEID. DIE KLAVIERSPIELERGEWERKSCHAFT ERLAUBT ES MIR NICHT, MaeDCHEN AUS DEN KLAUEN VON VAMPIREN ZU BEFREIEN", + "WENN SIE WERWOLF ENTFueHRT HaeTTE.....", + "ICH KANN NUR DIESES EINE LIED", + // 10 + "ICH HABE AM KONSERVATORIUM KLAVIER GESPIELT UND DER WIRT WILL MEINE PARTITueDEN NICHT KAUFEN", + "WO MIR DOCH KLASSISCHE MUSIK SO GUT GEFaeLLT !", + "WEIL ICH OHRENSToePSEL IN DEN OHREN HABE", + "WEIL ICH VON DEN LIPPEN LESEN KANN", + "NEEEIN", + // 15 + "NEEIEN! ICH KANN MICH NICHT BEHERRSCHEN !", + "NEIN,NEIN,UND NOCHMAL NEIN !", + "WIE BITTE ? KLAR BIN ICH INTERESSIERT", + "ENDLICH KANN ICH WAS ANDERES SPIELEN,WELCH ERLEICHTERUNG !", + "ICH GLAUBE, DU KANNST MEINE OHRENSToePSEL BEHALTEN", +}, +{ + // 0 + "", + "BONJOUR!", + "JOLIE, OUI M'SIEUR", + "NON, QU'ELLE NE LE FAIT PAS", + "D'ACCORD, A VA", + // 5 + "OUI?", + "ET QUOI?", + "SUIS DSOL. LE SYNDICAT DE PIANISTES NE ME PERMET PAS DE LIBRER LES FILLES DES GRIFFES DE VAMPIRES", + "SI ELLE AVAIT T RAPTE PAR UN HOMME-LOUP...", + "JE NE PEUX PAS JOUER DAVANTAGE CETTE CHANSON", + // 10 + "JE SUIS LE PIANISTE DU CONSERVATOIRE ET LE TAVERNIER N'ACH\324TE PAS MES PARTITIONS", + "ET MOI QUI AIME BEAUCOUP LA MUSIQUE CLASSIQUE!", + "PARCE QUE J'AI DES TAMPONS \267 L'OU\330E", + "PARCE QUE JE LIS LES LEVRES", + "NOOON!", + // 15 + "QUE NON! QUE JE NE PEUX PAS ME RETENIR DAVANTAGE!", + "QUE NOOOOOON!", + "QUOI? BIEN S\352R QUE \200A M'INT\220RESSE", + "MAINTENANT JE POURRAI JOUER UNE AUTRE CHANSON -QUEL SOULAGEMENT!", + "TU PEUX GARDER MES TAMPONS, JE SUPPOSE", +}, +{ + // 0 + "", + "CIAO", + "BELLA, MOLTO BELLA", + "NO, CHE NON LO FA", + "VA BENE", + // 5 + "-SI?", + "E?", + "MI DISPIACE. IL SINDACATODI PIANISTI NON MI DA PERMESSO PER LIBERARE RAGAZZE DALLE MANI DI VAMPIRI", + "SE LA AVESSE SEQUESTRATA IL LUPO-MANNARO...", + "SOLTANTO POSSO SUONARE QUESTA CANZONE", + // 10 + "\324 PERCHE SONO PIANISTA DI CONSERVATORIO E IL TABERNERO NON COMPRA PI\353 PARTITURE", + "PECCATO.....MI PIACE MOLTISSIMO LA MUSICA CLASSICA!", + "PERCHE MI HO MESSO TAPPI NEGLI ORECCHII", + "PERCHE SO LEGGERE LE LABRA", + "NOOO", + // 15 + "NO!, NON MI SOPPOROTO!", + "HO DETTO DI NOOO!", + "COSA? SI, SI MI INTERESA, COME NO", + "ADESSSO POTR\343 SUONARE UN'ALTRA CANZONE, GRAZIE!!", + "CREDO CHE I MIEI TAPPI ADESSO SONO TUOI", +}, +}; + + +const char *_textt[NUM_LANGS][NUM_TEXTT] = { +{ + // 0 + "", + "WHAT HAPPENED? WHAT'S THE MATTER?", + "OK. ROOM 512. UPSTAIRS. THE KEY IS UNDER THE DOOR", + "COUNT DRASCULA!!?", + "NO, NOTHING. THAT GUY JUST HAS A BAD REPUTATION AROUND HERE", + // 5 + "WELL, THERE ARE ALL KINDS OF STORIES GOING AROUND ABOUT HIM, SOME SAY HE IS A VAMPIRE WHO KIDNAPS PEOPLE TO SUCK THEIR BLOOD", + "HOWEVER, SOME OTHERS SAY THAT HE IS JUST AN ORGAN-DEALER AND THAT IS THE REASON WHY THERE ARE BODY PARTS ALL OVER THE PLACE", + "BUT OF COURSE, THOSE ARE JUST RUMORS. HE'S PROBABLY BOTH THINGS. BY THE WAY, WHY DO YOU WANT TO MEET HIM?", + "FORGET IT. I'M REALLY BUSY...", + "WELL, OK. BUT JUST BECAUSE I WANT TO DO IT, NOT BECAUSE YOU TOLD ME TO", + // 10 + "THEY'RE WINNING", + "LEAVE ME ALONE, ALL RIGHT?", + "OF COURSE. I'M NOT BLIND", + "THE TRADITION IN THIS VILLAGE IS TO FORGET ALL HARD FEELINGS WHENEVER THERE IS A GAME, TO CHEER UP THE LOCAL TEAM", + "AND PLEASE, SHUT UP FOR GOD'S SAKE. I CAN'T HEAR ANYTHING!", + // 15 + "COME ON, LEAVE ME ALONE AND DON'T BOTHER ME ANYMORE", + "IT HAS JUST STARTED! SHUT UP!", + "OK, OK, I THOUGHT SOMETHING WAS GOING ON", + "IT DOESN'T MATTER, ANYWAY. SHE IS PROBABLY DEAD BY NOW", + "HE JUST STARTED PLAYING CLASSICAL MUSIC, AND I COULDN'T STAND IT", + // 20 + "SINCE I'M PAYING HIM FOR PLAYING WHATEVER I WISH, I JUST FIRED HIM", + "AND THEN, HE GOT FRESH WITH ME. JESUS!, HE LOOKED SO NICE AND INNOCENT...WHAT A HYPOCRITE!", + "BY THE WAY, BE CAREFUL BECAUSE I JUST WAXED THE FLOOR", + "SHUT UP! WE'RE WATCHING THE GAME!", + "OH, COME ON! TAKE IT!", +}, +{ + // 0 + "", + "\250QUE PASA, QUE PASA?", + "DE ACUERDO. HABITACION 512. SUBIENDO POR LAS ESCALERAS. LA LLAVE ESTA EN LA PUERTA", + "\255\250 EL CONDE DRASCULA ?!", + "NO, NADA. ESE TIPO TIENE MALA FAMA POR AQUI", + // 5 + "BUENO, CORREN VARIOS RUMORES SOBRE EL. ALGUNOS DICEN QUE ES UN VAMPIRO Y VA SECUESTRANDO GENTE PARA CHUPARLES LA SANGRE", + "CLARO, QUE OTROS OPINAN QUE SOLO ES UN TRAFICANTE DE ORGANOS, Y POR ESO APARECE GENTE DESCUARTIZADA POR LOS ALREDEDORES", + "POR SUPUESTO SON SOLO RUMORES. LO MAS PROBABLE ES QUE SEA LAS DOS COSAS. POR CIERTO, \250PARA QUE QUIERE USTED VER A ESE TIPO?", + "NO DEJELO, QUE ES QUE TENGO MUCHO QUE HACER...", + "BUENO VALE, PERO PORQUE QUIERO YO, NO PORQUE LO DIGAS TU", + // 10 + "VAN GANANDO", + "DEJAME EN PAZ, \250VALE?", + "PUES CLARO, NO SOY CIEGO", + "ES TRADICION EN EL PUEBLO QUE CUANDO HAY PARTIDO SE OLVIDAN RENCORES PARA ANIMAR A LA SELECCION", + "Y CALLATE YA DE UNA VEZ, QUE NO ME DEJAS OIR", + // 15 + "ANDA, DEJAME EN PAZ Y NO MOLESTES", + "\255ACABA DE EMPEZAR! \255Y CALLATE!", + "AH, BUENO. CREIA QUE PASABA ALGO", + "NO, SI ES IGUAL. A ESTAS HORAS YA ESTARA MUERTA", + "ES QUE SE PUSO A TOCAR MUSICA CLASICA Y YO NO LA AGUANTO", + // 20 + "Y COMO YO LE PAGO PARA QUE TOQUE LO QUE YO QUIERO, PUES LE HE ECHADO", + "Y ENCIMA SE ME PUSO CHULO... \255Y PARECIA UNA MOSQUITA MUERTA!", + "...POR CIERTO, TENGA CUIDADO. EL SUELO ESTA RECIEN ENCERADO", + "\255SILENCIO! \255ESTAMOS VIENDO EL PARTIDO!", + "\255VENGA, ANDA! TOMA.", +}, +{ + // 0 + "", + "WAS ZUM TEUFEL IST LOS ?", + "O.K. ZIMMER 512. DIE TREPPE HOCH. DIE SCHLueSSEL STECKEN SCHON", + " GRAF DRASCULA ? !", + "NEIN, DER TYP HAT HIER EINEN SCHLECHTEN RUF", + // 5 + "NAJA, ES GIBT MEHRERE GERueCHTE ueBER IHN. EINIGE BEHAUPTEN, DASS ER LEUTE ENTFueHRT UND IHNEN DAS BLUT AUSSAUGT", + "KLAR, ANDERE GLAUBEN, DASS ER EIN ORGANHaeNDLER IST UND DESHALB TAUCHEN ueBERALL AM WALDRAND ZERSTueCKELTE LEICHEN AUF", + "NATueRLICH SIND DAS ALLES NUR GERueCHTE. HoeCHSTWAHRSCHEINLICH STIMMEN SIE ABER. ACH, UND WAS WOLLEN SIE VON IHM ?", + "NEIN, VERGESSEN SIES. ICH HABE NaeMLICH ZU TUN...", + "O.K. ABER WEIL ICH DAS WILL UND NICHT WEIL DU DAS SAGST", + // 10 + "SIE GEWINNEN", + "LASS MICH IN RUHE, OK ?", + "KLAR, ICH BIN DOCH NICHT BLIND", + "ES IST EIN ALTER BRAUCH IM DORF, DASS MAN BEI EINEM SPIEL ALTE ZWISTE VERGISST, UM DIE MANNSCHAFT ANZUFEUERN", + "UND HALT ENDLICH DEINEN MUND, ICH WILL ZUHoeREN", + // 15 + "MANN, LASS MICH IN RUHE UND NERV MICH NICHT", + "ES FaeNGT GERADE AN ! STILL JETZT !", + "ACH SO, ICH DACHTE ES IST IRGENDWAS LOS", + "NEIN, IST DOCH EGAL. JETZT WIRD SIE EH SCHON TOT SEIN", + "ER HAT KLASSIK GESPIELT UND ICH HALTE DAS NICHT AUS", + // 20 + "UND WEIL ICH ES BIN, DER IHN DAFueR BEZAHLT, DASS ER SPIELT, WAS ICH WILL, HABE ICH IHN ENTLASSEN", + "UND DANN KAM ER MIR AUCH NOCH SCHRaeG... UND WAS FueR EINE PAPPNASE ER DOCH IST !", + "...ACH JA, UND PASSEN SIE AUF. DER BODEN IST FRISCH GEBOHNERT", + "RUHE !WIR GUCKEN GERADE DAS SPIEL !", + "LOS, HAU REIN, GIBS IHM", +}, +{ + // 0 + "", + "QU'EST-CE QU'IL Y A, QU'Y A-T-IL?", + "D'ACCORD. CHAMBRE 512. PAR LES ESCALIERS. LA CL EST SUR LA PORTE", + "LE COMTE DRASCULA?!", + "NON, RIEN, CE TYPE A UNE MAUVAISE R\220PUTATION PAR ICI", + // 5 + "EH BIEN, IL Y A DES RUMEURS QUI COURENT SUR LUI. CERTAINS DISENT QUE C'EST UN VAMPIRE ET QU'IL ENLEVE DU MONDE POUR SUCER LEUR SANG ", + "MAIS D'AUTRES PENSENT QU'IL EST SEULEMENT UN TRAFICANT D'ORGANES, ET C'EST POUR CELA QUE DES PERSONNES DPECES SONT APPARUES DANS LES ALENTOURS", + "CERTAINEMENT IL NE S'AGIT QUE DES BRUITS QUI COURENT. S\352REMENT IL AURA LES DEUX MTIERS. MAIS, POURQUOI VOULEZ-VOUS VOIR CE TYPE?", + "OH, NON! OUBLIEZ CELA, J'AI BEAUCOUP \267 FAIRE.", + "BON, A VA. MAIS PARCE QUE JE VEUX ET NON PARCE QUE TU LE DIS", + // 10 + "ILS GAGNENT", + "FICHE-MOI LA PAIX, D'ACCORD?", + "C'EST S\352R, JE NE SUIS PAS UN AVUGLE", + "SELON LA TRADITION DU VILLAGE, QUAND IL Y A UN MATCH ON OUBLIE LES RANCUNES, POUR ALLER ENCOURAGER LA S\220LECTION", + "ET FERME-LA D'UNE FOIS!, JE NE PEUX PAS ENTENDRE", + // 15 + "ALLEZ, VA-T'-EN ET NE D\220RANGES PAS!", + "\200A VIENT DE COMMENCER! -ET TAIS-TOI!", + "AH, BON! JE PENSAIS QU'IL SE PASSAIT QUELQUE CHOSE", + "NON, C'EST \220GAL. \267 CES HEURES-CI ELLE SERA D\220J\267 MORTE", + "LE FAIT EST QU'ELLE A COMMENC\220 JOUER DE LA MUSIQUE CLASSIQUE ET QUE JE NE SUPPORTE PAS CELA", + // 20 + "ET MAINTENANT QUE JE LUI AI MIS DEHORS, COMMENT JE LUI PAIE POUR QU'IL JOUE CE QUE JE VEUX", + "ET ENCORE IL S'EST MONTR\220 ARROGANT... -ET DIRE QU'IL PARAISSAIT UNE SAINTE-NITOUCHE!", + "...FAITES ATTENTION, ON VIENT DE CIRER LE PARQUET", + "SILENCE! ON VOIT LE MATCH!", + "OH L\267 L\267! TIENS!", +}, +{ + // 0 + "", + "CHE SUCCEDE, CHE SUCCEDE?", + "D'ACCORDO. CAMERA 512. DEVE SALIRE LE SCALE. LA CHIAVE \324 NELLA PORTA", + "IL CONDE DRASCULA?", + "NO, NIENTE. QUEL TIZIO HA MALA REPUTAZIONE QU\336", + // 5 + "SE DICONO MOLTE COSE SU LUI. COME CH'\324 UN VAMPIRO E SEQUESTRA GENTE PER BERE LA SUA SANGUE", + "ALTRI DICONO CHE SOLO \324 UN TRAFFICANTE DI ORGANI, PER QUELLO TROVIAMO GENTE SQUARTATA FUORI LE MURA", + "SONO SOLTANTO CHIACCHIERE. FORSE SIA LE DUE COSE. MA, PERCHE VUOLE TROVARE QUEL TIZIO?", + "NO, HO MOLTO DA FARE..", + "VA BENE, MA PERCHE VOGLIO IO, NON PERCHE L'ABBIA DETTO TU", + // 10 + "ADESSO VINCONO", + "LASCIAMI IN PACE, O.K.?", + "CERTO, NON SONO CIECO", + "C'\324 LA TRADIZIONE NEL PAESE DI DIMENTICARE I RANCORI QUANDO C'\324 PARTITA DI CALCIO; PER ANIMARE LA SELEZIONE", + "TI HO DETTO DI STARE ZITTO, NON RIESCO A SENTIRE", + // 15 + "LASCIAMI IN PACE E NON MI DISTURBARE", + "\324 APPENA COMINCIATO, ZITTO!", + "AH, BENE. HO PENSATO CHE SUCCEDEVA QUALCOSA", + "NO, NON FA NIENTE. ADESSO SICURO CH'\324 GI\267 MORTA", + "SI \324 MESSO A SUONARE MUSICA CLASSICA ED IO LA ODIO", + // 20 + "\324 COME FACCIO PER SENTIRE QUELLO CHE VOGLIO SE L'HO LICENZIATO", + "E ORA SI METTE BULLO...-E SEMBRAVA PROPRIO SCEMO!", + "...SENTA! FACCIA ATTENZIONE. IL PAVIMENTO \324 APPENA INCERATO", + "ZITTO! - STIAMO GUARDANDO LA PARTITA!", + "DAI! PRENDI", +}, +}; + + +const char *_textvb[NUM_LANGS][NUM_TEXTVB] = { +{ + // 0 + "", + "WHO THE HELL IS CALLING AT THIS TIME?", + "OH, ..OH, NO, NO....I'M...GANIMEDES THE DWARF. PROFESSOR VON BRAUN DOESN'T LIVE HERE ANYMORE", + "NO, I DON'T KNOW WHERE HE LIVES !!", + "GET OUT!!", + // 5 + "IT'S TOO LATE NOW, YOU IDIOT!! IT ALWAYS IS", + "I COULDN'T AGREE MORE", + "ME, SCARED?", + "LISTEN HERE, DUDE. YOU'RE TALKING TO THE ONLY PERSON WHO KNOWS THE SECRET OF HOW TO FIGHT AGAINST THE VAMPIRES", + "YOU NEED TO HAVE SPECIAL SKILLS TO FIGHT AGAINST A VAMPIRE. NOT EVERYBODY CAN DO IT", + // 10 + "YOU DON'T HAVE THEM", + "I'M SURE YOU WOULDN'T BET ALL YOUR MONEY ON IT, HUH?", + "WELL, ALL RIGHT, COME ON IN", + "IF YOU REALLY MEAN TO FACE DRASCULA, YOU'VE GOT TO BE ABLE TO STAND ALL TYPES OF CREAKING AND VAMPIRE-LIKE NOISES", + "IS THAT CLEAR?", + // 15 + "OK, WAIT A MINUTE", + "STAND IN THE CENTER OF THE ROOM, PLEASE", + "NOW WHERE DID I PUT THE RECORD CALLED \"NAILS SCRATCHING THE BLACKBOARD\"?", + "ALL RIGHT. LET'S GET TO IT", + "YOU ARE USELESS. YOU SEE...?, JUST LIKE THE REST!!", + // 20 + "JUST GIVE ME THE MONEY, YOU LOST SO GET OUT OF HERE", + "AND DON'T COME BACK UNTIL YOU ARE ABSOLUTELY READY", + "WHAT DO YOU WANT NOW?", + "I HAVE TO ADMIT IT. YOU REALLY HAVE WHAT IT TAKES TO FIGHT AGAINST THE VAMPIRES", + "HEY, TAKE YOUR MONEY. I'LL ADMIT IT. I MAKE A MISTAKE...", + // 25 + "LEAVE ME ALONE NOW, I WANT TO GET SOME SLEEP", + "WHENEVER YOU ARE READY TO FIGHT AGAINST THE VAMPIRES, JUST COME BACK AND I'LL HELP YOU OUT", + "OH, THAT'S EASY. TAKE THIS CRUCIFIX JUST USING IT'S LIGHT IS ENOUGH TO DESTROY A VAMPIRE", + "YOU HAVE TO BE EXTRA CAREFUL WITH DRASCULA, HIS FRISISNOTIC POWERS HAVE MADE OF HIM THE MOST POWERFUL VAMPIRE", + "YOU'D BE LOST IF IT WASN'T FOR THIS...", + // 30 + "...BREW!", + "YEAH, YOU'RE RIGHT! I MIGHT HAVE SOME PROBLEMS WITH MY BACK IN THE FUTURE IF I KEEP ON SLEEPING THIS WAY", + "I UNDERSTAND HE WAS A BETTER OPPONENT THAN ME, BUT YOU HAVE TO ADMIT THAT THE DISCOVERY I MADE ABOUT ANTI-VAMPIRE TECHNIQUES WAS WHAT ACTUALLY PROTECTED ME", + "I'VE FOUND THIS IMMUNIZING BREW THAT KEEPS YOU SAFE FROM ANY VAMPIRES' BITE OR AGAINST HIS FRISISNOTIC POWERS", + "NO, NO, EXCUSE ME. I HAD IT ONCE BUT IT'S VERY DANGEROUS TO HAVE A BREW OF THAT TYPE. CAN YOU IMAGINE WHAT COULD HAPPEN IF A VAMPIRE GOT IT?", + // 35 + "HE'D BE IMMUNIZED AGAINST GARLIC, AND THE SUNSLIGHT... SO I HAD TO GET RID OF WHAT I DIDN'T USE BY THE SCIENTIFIC METHOD OF THROWING IT IN THE LAVATORY", + "DON'T WORRY, I REMEMBER EXACTLY HOW TO MAKE THAT BREW", + "I NEED GARLIC, BUT I ALREADY HAVE THAT. HOWEVER YOU'LL HAVE TO GET ME SOME WAX, BUBBLE GUM AND CIGARETTE PAPER OR PERHAPS A NAPKIN OR SOMETHING ALIKE", + "OH...AND OF COURSE THE MOST IMPORTANT INGREDIENT. LEAVES FROM A VERY STRANGE PLANT CALLED FERNAN", + "IT'S A CLIMBING PLANT WHOSE LEAVES HAVE MAGIC POWERS IF THEY'RE CUT WITH A GOLDEN SICKLE", + // 40 + "SO AS SOON AS YOU HAVE THESE FIVE THINGS, JUST COME HERE AND I'LL MAKE THE BREW", + "YOU'LL BE READY THEN TO FIGHT AGAINST DRASCULA", + "REMEMBER: WAX, NICOTINE, A PIECE OF BUBBLE GUM, PAPER AND SOME FERNAN'S LEAVES CUT WITH A GOLDEN SICKLE", + "I TOLD YOU! IT WAS BECAUSE OF THE BREW!", + "OH, ALL RIGHT. I'M GOING TO MAKE MYSELF ...THE BREW. JUST A MOMENT, OK?", + // 45 + "IT'S A PROTECTING SPELL AGAINST VAMPIRES", + "I PUT IT THERE IN ORDER TO PRETEND THE ARTIST DIDN'T FORGET TO DRAW THE WINDOW YOU CAN SEE FROM OUTSIDE", + "ALL RIGHT, THE FIRST THING YOU MUST KNOW IS THE WAY TO DRASCULA'S CASTLE", + "THERE IS A CAVERN THAT GETS YOU STRAIGHT FROM THE CASTLE. IGOR, THE CRAZY SERVANT', TAKES IT TO GET TO THE VILLAGE EACH MORNING", + "BE CAREFUL THOUGH, THERE IS A VAMPIRE ALWAYS WATCHING OVER IT. YOU'LL HAVE TO GET RID OF HIM", + // 50 + "THERE IS AN OLD WELL RIGHT BY THE CEMETERY CHURCH", + "IT WAS USED A LONG TIME AGO FOR WITCHCRAFT TRIALS", + "THEY THREW THE WITCHES IN THE WELL. IF THEY DROWNED THEY WERE REAL WITCHES. IF THEY DIDN'T, THEY WEREN'T", + "WE THREW ONE ONCE AND SHE DIDN'T DROWN, I GUESS SHE WASN'T A WITCH", + "ANYWAY. THERE IS YOUR BREW. HOWEVER, I ONLY GOT TO MAKE ENOUGH FOR ONE PERSON", + // 55 + "YOU'D BETTER SMOKE IT RIGHT BEFORE YOU FIGHT AGAINST DRASCULA", + "COME ON, RUN!", + "OH, JUST EXCUSES...!", + "ARE YOU JOHN HACKER? I'M DOCTOR VON BRAUN", + "LISTEN TO ME, THIS IS VERY IMPORTANT. IT'S ABOUT THE BREW", + // 60 + "SHUT UP AND LET ME TALK. I JUST FOUND THIS BOOK ABOUT ANTI-VAMPIRE BREWS WARNING AGAINST MIXING THE CIGARETTE WITH ANY ALCOHOLIC DRINK", + "ALCOHOL REACTS WHEN MIXED WITH BREW, SO THAT IT CANCELS OUT IT'S EFFECTS IN A FEW SECONDS", + "I'M SORRY, BUT I HAVE TO HANG UP RIGHT NOW. THE POLICE ARE LOOKING FOR ME, THEY THINK I'M A DRUG PUSHER. IDIOTS!. ANYWAY, BYE AND GOOD LUCK SAVING THE WORLD!", +}, +{ + // 0 + "", + "\250QUIEN DIABLOS LLAMA A ESTAS HORAS?", + "EH... NO, NO. YO SOY EL ENANO GANIMEDES... EL PROFESOR VON BRAUN YA... YA NO VIVE AQUI", + "\255NO, NO SE DONDE ESTA!", + "\255QUE TE VAYAS! ", + // 5 + "IMBECIL. YA ES DEMASIADO TARDE, SIEMPRE LO ES", + "ESTOY TOTALMENTE DE ACUERDO", + "\250YO MIEDO?", + "ENTERATE CHAVAL: ESTAS HABLANDO CON EL UNICO QUE CONOCE EL SECRETO PARA ENFRENTARSE A LOS VAMPIROS", + "NO TODO EL MUNDO ES CAPAZ DE LUCHAR CON UN VAMPIRO. HAY QUE TENER UNAS CUALIDADES ESPECIALES", + // 10 + "NO LAS TIENES", + "\250TE APUESTAS TODO TU DINERO A QUE NO?", + "ESTA BIEN. PASA", + "SI DE VERDAD ERES CAPAZ DE ENFRENTARTE A DRASCULA, DEBER PODER SOPORTAR TODOS LOS RUIDOS CHIRRIANTES Y VAMPIRICOS", + "\250QUEDA CLARO?", + // 15 + "DE ACUERDO. ESPERA UN MOMENTO", + "POR FAVOR, PONTE EN EL CENTRO DE LA HABITACION", + "VEAMOS. \250DONDE HE PUESTO EL DISCO ESTE DE \"U\245AS ARRASCANDO UNA PIZARRA\"?", + "MUY BIEN. VAMOS ALLA", + "\250VES? ERES UN INUTIL, COMO TODOS LOS DEMAS", + // 20 + "AHORA DAME EL DINERO QUE HAS PERDIDO Y VETE DE AQUI", + "Y NO VUELVAS HASTA QUE NO ESTES PREPARADO DEL TODO", + "\250Y QUE ES LO QUE QUIERES TU AHORA?", + "HE DE RECONOCERLO... TIENES APTITUDES PARA LUCHAR CON LOS VAMPIROS", + "POR CIERTO, TOMA TU DINERO. SE CUANDO ME HE EQUIVOCADO", + // 25 + "AHORA VETE, QUE QUIERO DORMIR UN POCO", + "CUANDO ESTES DISPUESTO A ENFRENTARTE A ALGUN VAMPIRO, VUELVE Y TE AYUDARE EN LO QUE PUEDA", + "OH, ESO ES FACIL. LA LUZ DEL SOL O UN CRUCIFIJO Y LE HACES POLVO", + "CON EL QUE DEBES PONER ESPECIAL CUIDADO ES CON DRASCULA. SUS PODERES FRISISHNOSTICOS LE HACEN EL MAS PODEROSO DE LOS VAMPIROS", + "ESTARIAS PERDIDO A NO SER POR LA...", + // 30 + "...\255POCION!", + "OH, CLARO. TIENES RAZON, SI SIGO DURMIENDO ASI A LO MEJOR TENGO PROBLEMAS DE COLUMNA CUANDO SEA VIEJO", + "BUENO, ADMITO QUE RESULTO MEJOR ADVERSARIO QUE YO, PERO MI PRINCIPAL HALLAZGO EN EL ESTUDIO DE TECNICAS ANTI-VAMPIROS FUE LO QUE ME CUBRIO LAS ESPALDAS", + "DESCUBRI UNA POCION DE INMUNIDAD. TE HACE INVULNERABLE ANTE CUALQUIER MORDEDURA DE VAMPIRO, O A SUS PODERES FRSISSHNOTICOS", + "NO, PERDONA LA TUVE EN SU DIA, PERO UNA POCION DE ESAS CARACTERISTICAS ES PELIGROSA. IMAGINATE SI CAYERA EN MANOS DE UN VAMPIRO", + // 35 + "LE HARIA INMUNE A LOS AJOS, A LA LUZ DEL SOL... ASI QUE TUVE QUE DESHACERME DE LO QUE NO USE POR EL CIENTIFICO METODO DE TIRARLO A LA TAZA DEL WATER", + "TRANQUILO, ME ACUERDO PERFECTAMENTE DE COMO PREPARAR ESA POCION ", + "NECESITO AJOS, QUE DE ESO YA TENGO, PERO ME TENDRAS QUE CONSEGUIR ALGO DE CERA, NICOTINA, UN CHICLE, Y UN PAPEL DE FUMAR, O UNA SERVILLETA, O ALGO PARECIDO", + "\255AH! Y POR SUPUESTO, EL INGREDIENTE PRINCIPAL: UNAS HOJAS DE UNA EXTRA\245A PLANTA LLAMADA FERNAN", + "SE TRATA DE UNA PLANTA ENREDADERA CUYAS HOJAS PROPORCIONAN PODERES MAGICOS SI SE CORTAN CON UNA HOZ DE ORO", + // 40 + "PUES YA SABES, EN CUANTO TENGAS ESAS CINCO COSAS ME LAS TRAES Y TE PREPARARE LA POCION", + "DESPUES ESTARAS LISTO PARA LUCHAR CON DRASCULA", + "RECUERDA: CERA, NICOTINA, UN CHICLE, UN PAPEL Y UNAS HOJAS DE FERNAN, LA PLANTA, CORTADAS CON UNA HOZ DE ORO", + "\255YA TE LO HE DICHO! FUE TODO GRACIAS A LA POCION", + "AH, MUY BIEN. VOY ENTONCES A PREPARARME EL PO... LA POCION. SOLO TARDO UN MOMENTO", + // 45 + "ES UN SORTILEGIO DE PROTECCION CONTRA VAMPIROS", + "LO PUSE PARA DISIMULAR QUE EL DIBUJANTE SE OLVIDO DE PONER LA VENTANA QUE SE VE DESDE FUERA", + "BUENO, LO PRIMERO QUE DEBES SABER ES COMO SE VA AL CASTILLO DRASCULA", + "HAY UNA GRUTA QUE LLEVA DIRECTAMENTE AL CASTILLO Y QUE ESE LOCO FAN DE ELVIS, IGOR, USA PARA BAJAR AL PUEBLO POR LAS MA\245ANAS", + "PERO TEN CUIDADO, SIEMPRE ESTA PROTEGIDA POR UN VAMPIRO. TENDRAS QUE LIBRARTE DE EL", + // 50 + "HAY UN VIEJO POZO AL LADO DE LA CAPILLA DEL CEMENTERIO", + "SE USABA ANTIGUAMENTE PARA JUZGAR CASOS DE BRUJERIA", + "SE TIRABA A LAS BRUJAS AL POZO. SI SE HUNDIAN ERAN BRUJAS. SI NO, NO", + "UNA VEZ TIRAMOS A UNA Y NO SE HUNDIO, ASI QUE NO SERIA BRUJA", + "A LO QUE VAMOS: TOMA TU POCION, PERO SOLO ME HA DADO PARA UNO", + // 55 + "LO MEJOR ES QUE TE LO FUMES JUSTO ANTES DE ENFRENTARTE A DRASCULA", + "CORRE", + "\255EXCUSAS!", + "\250JOHN HACKER? SOY EL DOCTOR VON BRAUN", + "ESCUCHEME, ES MUY IMPORTANTE. ES SOBRE LA POCION", + // 60 + "ME HE ENCONTRADO UN LIBRO SOBRE POCIONES Y DICE QUE NO DEBE USTED BEBER ALCOHOL UNA VEZ SE HAYA FUMADO LA POCION", + "EL ALCOHOL INGERIDO REACCIONA CON LAS SUSTANCIAS DE LA POCION Y ANULA SUS EFECTOS EN DECIMAS DE SEGUNDO", + "TENGO QUE COLGAR. LA POLICIA ME BUSCA. DICEN QUE TRAFICO CON DROGAS \255IGNORANTES! BUENO, ADIOS Y SUERTE SALVANDO AL MUNDO", +}, +{ + // 0 + "", + "WER ZUM TEUFEL KLINGELT UM DIESE UHRZEIT ?", + "aeH......NEIN, NEIN. ICH BIN HELGE SCHNEIDER...HERR PROFESSOR VON BRAUN ...aeH...WOHNT HIER NICHT MEHR", + "NEIN, ICH WEISS NICHT WO ER IST !", + "NUN GEH SCHON !", + // 5 + "TROTTEL. ES IST SCHON ZU SPaeT, WIE IMMER", + "ICH BIN ABSOLUT EINVERSTANDEN", + "ICH UND DIE HOSEN VOLL ?", + "DAMIT DAS KLAR IST, KURZER : DU SPRICHST GERADE MIT DEM EINZIGEN DER DAS GEHEIMREZEPT GEGEN VAMPIRE HAT", + "NICHT JEDER KANN GEGEN EINEN VAMPIR ANTRETEN.MAN MUSS EIN PAAR GANZ BESONDERE EIGENSCHAFTEN BESITZEN", + // 10 + "DU HAST SIE NICHT", + "WETTEN NICHT ? 100.000 MARK, DASS NICHT !", + "SCHON GUT, KOMM REIN", + "WENN DU DICH DRACULA WIRKLICH STELLEN WILLST WIRST DU ALLE DIESE VAMPIRTYPISCHEN SAUG-UND QUIETSCHGERaeUSCHE ERTRAGEN MueSSEN", + "IST DAS KLAR ?", + // 15 + "O.K. WARTE MAL EINEN MOMENT", + "STELL DICH BITTE MAL IN DIE MITTE DES ZIMMERS", + "GUCKEN WIR MAL. WO IST DIESE PLATTE MIT\"FINGERNaeGEL KRATZEN AN DER TAFEL ENTLANG\" ?", + "SEHR GUT, GEHEN WIR DA HIN", + "SIEHST DU, DU BIST GENAUSO UNFaeHIG WIE ALLE ANDEREN !", + // 20 + "JETZT GIB MIR DAS GELD,UM DAS WIR GEWETTET HABEN UND KOMM HER", + "UND KOMM ERST DANN WIEDER, WENN DU 100%IG VORBEREITET BIST", + "UND WAS WILLST DU JETZT ?", + "ICH MUSS ZUGEBEN, DASS DU DAS NoeTIGE TALENT ZUR VAMPIRJAGD HAST", + "ueBRIGENS, HIER IST DEIN GELD. ICH HABE MICH GEIRRT", + // 25 + "UND JETZT GEH, ICH MoeCHTE MICH HINLEGEN", + "KOMM ZURueCK,WENN DU SO WEIT BIST, DICH EINEM VAMPIR GEGENueBERZUSTELLEN UND ICH WERDE DIR HELFEN", + "ACH, DAS IST GANZ EINFACH. EIN SONNENSTRAHL ODER EIN KRUZIFIX UND ER WIRD ZU STAUB", + "AM MEISTEN AUFPASSEN MUSST DU BEI DRASCULA..WEGEN SEINEN TRANSHYPNITISCHEN FaeHIGKEITEN IST ER DER GEFaeHRLICHSTE UNTER DEN VAMPIREN", + "DU WaeRST VERLOREN, ES SEI DENN DU HaeTTEST...", + // 30 + "....DIE MISCHUNG! ", + "JA, STIMMT, DU HAST RECHT. WENN ICH WEITERHIN SO LIEGE WERDE ICH IM HOHEN ALTER WOHL RueCKENPROBLEME HABEN", + "NAJA, ICH GEBE ZU DASS ER der bessere von uns war, ABER DIE WICHTIGSTE ERKENNTNIS IN MEINEM ANTI-VAMPIR-STUDIUM WAR, MIR EINEN BODYGUARD ZUZULEGEN", + "ICH HABE EINE IMMUNITaeTSMISCHUNG GEFUNDEN. MIT DER KANN DIR KEIN EINZIGER VAMPIRBISS ETWAS ANHABEN, UND AUCH NICHT SEINE TRANSHYPNISIE.", + "NEIN, TUT MIR LEID, ICH HATTE SIE damals, ABER EINE MISCHUNG DIESER KONSISTENZ IST SEHR GEFaeHRLICH, UND STELL DIR MAL VOR, ES GERaeT IN VAMPIRHaeNDE", + // 35 + "DAS WueRDE IHN IMMUN GEGEN KNOBLAUCH UND SONNENLICHT GEMACHT HABEN, DIE RESTE, DIE ICH NICHT MEHR FueR WISSENSCHAFTLICHE ZWECKE BRAUCHTE, landeten im klo", + "NUR DIE RUHE, ICH HABE DAS REZEPT KOMPLETT IM KOPF ", + "ICH BRAUCHE KNOBLAUCH,AH, HAB ICH SCHON, ABER DANN MUSST DU NOCH WACHS BESORGEN, NIKOTIN, KAUGUMMI UND EIN BLaeTTCHEN ODER EINE SERVIETTE ODER SO WAS", + "ACH KLAR ! UND DIE WICHTIGSTE ZUTAT : EIN PAAR BLaeTTER EINER SELTSAMEN PFLANZE DIE FREDDY HEISST", + "ES HANDELT SICH UM EINE TOPFBLUME DEREN BLaeTTER ZAUBERKRaeFTE HABEN, WENN MAN SIE MIT EINER GOLDSICHEL ABSCHNEIDET", + // 40 + "ALSO, DU WEISST SCHON, SOBALD DU MIR DIESE FueNF ZUTATEN GEBRACHT HAST, BEREITE ICH DIR DIE MISCHUNG ZU", + "DANACH BIST DU FueR DEN KAMPF GEGEN DRASCULA GERueSTET", + "DENK DRAN : WACHS, NIKOTIN, EIN KAUGUMMI, EIN BLaeTTCHEN UND EIN PAAR BLaeTTER VON FREDDY, MIT EINER GOLDSICHEL ABGESCHNITTEN", + "HAB ICH DIR DOCH SCHON GESAGT ! NUR DANK DER MISCHUNG", + "OK. ALLES KLAR. ICH FANG DANN MAL AN EINEN ZU BAUEN...aeH VORZUBEREITEN. DAUERT AUCH NICHT LANGE", + // 45 + "DAS IST EINE ZAUBERFORMEL, DIE VOR VAMPIREN SCHueTZT", + "DAS WAR ICH, DAMIT MAN NICHT MERKT, DASS DER ZEICHNER VERGESSEN HAT DAS FENSTER VON VORHIN ZU ZEICHNEN", + "ALSO, ZUERST MUSST DU WISSEN WIE MAN ZUM SCHLOSS VON DRASCULA KOMMT.", + "ES GIBT EINE GROTTE, DIE DIREKT ZUM SCHLOSS FueHRT, UND DURCH DIE IGOR, DIESER BEKLOPPTE ELVIS-FAN MORGENS IMMER ZUM DORF RUNTER GEHT", + "ABER PASS AUF, SIE WIRD PERMANENT VON EINEM VAMPIR BEWACHT, DEN DU ERSTMAL LOSWERDEN MUSST", + // 50 + "ES GIBT DA EINEN ALTEN BRUNNEN BEI DER FRIEDHOFSKAPELLE", + "FRueHER WURDE ER FueR HEXENPROZESSE BENUTZT", + "MAN WARF DIE HEXEN IN DEN BRUNNEN. WENN SIE UNTERGINGEN WAREN SIE HEXEN, WENN NICHT, DANN NICHT", + "EINMAL WARFEN WIR EINE RUNTER, DIE NICHT UNTERGING, ALSO WAR SIE KEINE HEXE", + "WENN WIR LOSGEHEN, NIMMST DU DEINE MISCHUNG, ABER WIR HABEN NUR FueR EINE PERSON", + // 55 + "AM BESTEN RAUCHST DU IHN DIR KURZ BEVOR DU DRACULA GEGENueBERSTEHST", + "LAUF !", + "BILLIGE AUSREDEN !", + "HEINZ HACKER ? ICH BIN DOKTOR VON BRAUN", + "HoeREN SIE ZU, ES IST SEHR WICHTIG. ES GEHT UM DIE MISCHUNG", + // 60 + "ICH HABE EIN BUCH ueBER MISCHUNGEN GEFUNDEN UND DA STEHT DASS MAN KEINEN ALKOHOL TRINKEN DARF, SOBALD MAN DIE MISCHUNG GERAUCHT HAT", + "DER ALKOHOL REAGIERT IM MAGEN MIT DEN SUBSTANZEN DER MISCHUNG UND VERNICHTET IHRE WIRKUNG BINNEN WENIGER MILLISEKUNDEN", + "ICH MUSS AUFLEGEN. DIE POLIZEI IST HINTER MIR HER. DIE IDIOTEN HALTEN MICH FueR EINEN DROGEN-DEALER !ALSO, TSCHueSS UND VIEL GLueCK !", +}, +{ + // 0 + "", + "QUI DIABLE APPELLE \267 CETTE HEURE-CI?", + "H... NON, NON. JE SUIS LE NAIN GANYM\324DE... LE PROFESSEUR VON BRAUN... N'HABITE DJ\267 L\267", + "NON, JE NE SAIS PAS O\353 IL EST!", + "VA-T'-EN!", + // 5 + "IMBCIL! C'EST DJ\267 TROP TARD! C'EST TOUJOURS TROP TARD!", + "JE SUIS TOUT-\267-FAIT CONFORME", + "MOI PEUR?", + "RENSEIGNE-TOI, MON GARS: TU PARLES AVEC LE SEUL QUI CONNA\327T LE SECRET POUR CONFRONTER LES VAMPIRES", + "TOUT LE MONDE N'EST PAS CAPABLE DE LUTTER AVEC UN VAMPIRE. IL FAUT DES QUALITS SPCIALES", + // 10 + "TU NE LES A PAS", + "EST-CE QUE TU PARIE TOUT L'ARGENT QUE TU AS \267 QUE C'EST NON?", + "\200A VA, ENTRE", + "SI EN V\220RIT\220 TU TE SENS CAPABLE DE CONFRONTER DRASCULA, IL FAUDRA QUE TU SUPPORTES TOUS LES BRUITS GRIN\200ANTS ET SU\200ANTS", + "C'EST CLAIR?", + // 15 + "D'ACCORD. ATTENDS UN INSTANT", + "METS-TOI AU MILIEU DE LA CHAMBRE, S'IL TE PLA\327T", + "VOYONS! O\353 EST-CE QUE J'AI MIS LE DISQUE \"ONGLES GRATTANT UN TABLEAU\"?", + "TR\324S BIEN. ON Y VA", + "TU VOIS? TU ES UN INCAPABLE, COMME TOUS LES AUTRES", + // 20 + "MAINTENANT DONNE-MOI L'ARGENT QUE TU AS PERDU ET VA-T'-EN", + "ET N'Y REVIENS \267 MOINS QUE TU SOIS COMPL\324TEMENT EN FORME", + "ET QUE VEUX-TU MAINTENANT?", + "JE DOIS LE RECONNA\327TRE... TU AS DES APTITUDES POUR LUTTER CONTRE LES VAMPIRES", + "EN FAIT, TIENS TON ARGENT. JE SAIS RECONNA\327TRE MES ERREURS", + // 25 + "MAINTENANT VA-T'-EN, JE VEUX DORMIR UN PEU ", + "QUAND TU SOIS PR\322T \267 TE CONFRONTER AVEC UN VAMPIRE, REVIENS ET TU POURRAS COMPTER SUR MOI", + "OH! C'EST FACIL. AVEC LA LUMI\324RE DU SOLEIL OU UN CRUCIFIX TU LE R\220DUIT EN CENDRES", + "MAIS TU DOIS FAIRE SP\220CIALE ATTENTION AVEC DRASCULA. GR\266CE \267 SES POUVOIRS FRISYSHNOSTIQUES C'EST LE PLUS PUISSANT DES VAMPIRES", + "JE SERAIS PERDU SI CE N'EST PAS POUR LA...", + // 30 + "...POTION!", + "OH, BIEN S\352R. TU AS RAISON, SI JE CONTINUE \267 DORMIR COMME \200\265, J'AURAI DES PROBL\324MES DE COLONNE DANS MA VIEILLESSE", + "bon, J'ACCEPTE QU'IL A \220T\220 MEILLEURE ADVERSAIRE QUE MOI, MAIS JE ME SUIS GARD\220 LE DOS GR\266CE \267 MA BONNE TROUVAILLE DANS L'\220TUDE DE TECHNIQUES ANTI-VAMPIRES", + "J'AI D\220COUVERT UNE POTION IMMUNOLOGIQUE QUI TE FAIT INVULN\220RABLE CONTRE N'IMPORTE QUELLE MORSURE DE VAMPIRE OU SES POUVOIRS FRSYSSHNOTIQUES", + "NON, EXCUSES-MOI. JE L'AI EUE, MAIS UNE POTION DE CES CARACT\220RISTIQUES EST DANGEREUSE. IMAGINE TOI SI ELLE TOMBAIT DANS LES MAINS D'UN VAMPIRE", + // 35 + "IL DEVIENDRAIT IMMUNIS\220 AUX AILS, \267 LA LUMI\324RE DU SOLEIL. DONC, J'AI D\352 M'EN D\220BARRASSER DES EXC\220DENTS PAR LA SCIENTIFIQUE M\220THODE DE LES JETER AUX \220GOUTS", + "RESTE TRANQUILLE, JE ME SOUVIENS PARFAITEMENT DE LA PR\220PARATION DE CETTE POTION", + "il me faut D'AIL, MAIS J'EN AI D\220J\267. IL FAUDRA UN PEU DE CIRE, DE LA NICOTINE, UN CHEWING-GUM ET UN PAPIER \267 CIGARETTES, OU QUELQUE CHOSE PAREILLE", + "AH! ET CERTAINEMENT, L'INGR\220DIANT PRINCIPAL: LES FEUILLES D'UNE \220TRANGE PLANTE APPEL\220E FERNAN", + "IL S'AGIT D'UNE PLANTE GRIMPANTE DONT LES FEUILLES FOURNISSENT DES POUVOIRS MAGIQUES SI ON LES COUPE AVEC UNE FAUCILLE EN OR", + // 40 + "TU LE SAIS D\220J\267. D\324S QUE TU AURAS CES CINQ TRUCS APPORTE-LES-MOI ET JE TE PR\220PARERAI LA POTION", + "APR\324S TU SERAS PR\322T POUR LUTTER CONTRE DRASCULA", + "RAPPELLE-TOI: DE LA CIRE, DE LA NICOTINE, UN CHEWING-GUM, UN PAPIER ET LES FEUILLES DE FERNAN, LA PLANTE, COUP\220ES AVEC UNE FAUCILLE EN OR", + "JE TE L'AI D\220J\267 DIT! TOUT A \220T\220 GR\266CE \267 LA POTION", + "AH! TR\324S BIEN! ALORS, JE VAIS ME PR\220PARER LE PO... LA POTION. JE N'AI QUE POUR UN MOMENT", + // 45 + "C'EST UN SORTIL\324GE DE PROTECTION CONTRE-VAMPIRES", + "JE L'AI MIS POUR DISSIMULER, LE DESSINATEUR AYANT OUBLI\220 D'Y METTRE LA FEN\322TRE QU'ON VOIT DU DEHORS", + "EH BIEN, CE QUE TU DOIS SAVOIR D'ABORD C'EST LA FA\200ON D'ALLER AU CH\266TEAU DE DRASCULA", + "IL Y A UNE GROTTE QUI M\324NE DIRECTEMENT AU CH\266TEAU ET QU'IGOR, CE FOU FAN D'ELVIS, EN UTILISE POUR SE RENDRE AU VILLAGE LE MATIN", + "MAIS FAIT ATTENTION, ELLE TOUJOURS GARD\220E PAR UN VAMPIRE. TU DEVRAS T'EN D\220BARRASSER", + // 50 + "IL Y A UN VIEUX PUITS \267 C\342T\220 DE LA CHAPELLE DU CIMETI\324RE", + "ON L'UTILISAIT JADIS POUR JUGER DES AFFAIRES DE SORCELLERIE", + "ON JETAIT LES SORCI\324RES AU PUITS. SI ELLES COULAIENT, ON \220TAIT S\352R; AUTREMENT, PAS", + "UNE FOIS ON A JET\220 UNE ET ELLE N'AS PAS COUL\220, DONC ELLE NE SERAIT PAS UNE SORCI\324RE", + "MAINTENANT GARDE \267 LA QUESTION QUI NOUS INT\220RESSE: TIENS TA POTION, MAIS ON NE M'A PAS DONN\220 QUE POUR UN SEULEMENT.", + // 55 + "IL VAUDRA MIEUX QUE TU LA FUMES JUSTE AVANT DE CONFRONTER DRASCULA", + "COURS!", + "DES EXCUSES!", + "JHON HACKER? SUIS LE DOCTEUR VON BRAUN", + "\220COUTEZ-MOI. C'EST TR\324S IMPORTANT. C'EST SUR LA POTION", + // 60 + "DANS UN LIVRE QUE J'AI TROUV\220 SUR LES POTIONS, IL DIT QUE VOUS NE DEVEZ PAS BOIR DE L'ALCOOL APR\324S AVOIR FUM\220 LA POTION ", + "L'ALCOOL AVAL\220 R\220AGIT AVEC LES INGR\220DIENTS DE LA POTION ET ANNULE SES EFFETS EN DIXI\324MES DE SECONDE", + "JE DOIS RACCROCHER. SUIS CHERCH\220 PAR LA POLICE. ILS DISENT QUE JE TRAFIQUE EN DROGUES -IGNORANTS! AU REVOIR ET BONNE CHANCE EN SAUVANT LE MONDE", +}, +{ + // 0 + "", + "MA CHI BUSSA A QUESTE ORE?", + "EH...NO,NO. IO SONO IL NANNO GANIMEDI....IL PROFESSORE VON BRAUN NON ABITA QU\336 PI\353", + "NO, NON SO DOV'\324!", + "HO DETTO VIA!", + // 5 + "IMBECILE. ORMAI TROPPO TARDE, SEMRE TARDE", + "SONO COMPLETAMENTE D'ACCORDO", + "IO, PAURA?", + "ASCOLTA BENE RAGAZZO: STAI PARLANDO CON L'UNICA PERSONA CHE CONOSCE IL SEGRETO PER VINCERE AI VAMPIRI", + "NON TUTTI QUANTI POSSONO LOTTARE CON UN VAMPIRO. SI DEVONO AVERE DELLE CARATTERISTICHE SPEZIALI", + // 10 + "NO CE LE HAI", + "SICURO CHE NON SCOMMETI TUTTO IL TUO SOLDI!", + "VA BENE . AVANTI", + "SE DAVVERO SEI PRONTO PER LOTTARE CONTRO DRASCULA, DEVI POTERE SOPPORTARE TUTTI I RUMORI STRIDENTI E VAMPIRICI", + "TUTTO CHIARO?", + // 15 + "D'ACCORDO. ASPETTA UN ATTIMO", + "PER FAVORE, METTETI NEL CENTRO DELLA CAMERA", + "DOV'\324 HO MESSO IL COMPACT DISC DI \"UNGHIE GRAFFIANDO UNA LAVAGNA\"", + "MOLTO BENE, ANDIAMO", + "VEDI? SEI UN INUTILE, COME TUTTI GLI ALTRI", + // 20 + "ORA DAMI IL SOLDI CHE HAI PERSO, E VIA", + "E NON TORNARE FINO CHE NON SIA COMPLETAMENTE PRONTO", + "E COSA VUOI TU ADESSO?", + "DEVO AMMETTERLO... HAI LA STOFFA DI LOTTATORE PER VINCERE DRASCULA", + "EH..! PRENDI IL TUO SOLDI. SO QUANDO HO SBAGLIATO", + // 25 + "ADESSO VATENE, VOGLIO DORMIRE UN P\343", + "QUANDO SIA DISPOSTO A UCCIDERE QUALCHE VAMPIRO, TORNA E TI AIUTER\343 ", + "QUELLO \324 FACILE. LA LUCE DEL SOLE O UN CROCIFISSO, E L'HAI SCHISCCIATO", + "CON CHI DEVI FARE MOLTA ATTENZIONE \324 CON DRASCULA. I SUOI POTERI FRISISHNOSTICI GLI FANNO IL PI\353 FORTE DEI VAMPIRI", + "NON POTREI FARE NULLA SE NON FOSSE PER LA .....", + // 30 + "...POZIONE!", + "CERTO. HAI RAGIONE, SE CONTINUO DORMENDO COS\336 FORSE AVR\343 PROBLEMI DI SCHIENA QUANDO SIA VECCHIO", + "BENE, \324 VERO CHE FU MEGLIO LOTTATORE DI ME, MA IL MIO STUDIO SU TECNICHE ANTI-VAMPIRI GLI AIUT\343 MOLTISSIMO", + "HO SCOPERTO UNA POZIONE DI IMMUNUT\267 . TI FA INVULNERABILE AI MORSI DI VAMPIRI, O AI SUOI POTERI FRISISHNOTICI", + "NO, SCUSA, CE L'EBBI MOLTO TEMPO FA, MA UNA POZIONE COM'ERA LA MIA \324 PERICOLOSA. FIGURATI SE LA AVESSE UN VAMPIRO", + // 35 + "GLI FAREBBE IMMUNE AGLI AGLII, ALLA LUCE DEL SOLE.... PER QUELLO L'HO SCARICATA NEL CESO", + "TRANQUILLO, MI RICORDO BENISSIMO DI COME RIFARLA", + "BISOGNO AGLII, CHE NE HO QU\326, DOVRAI PORTARMI UN P\220 DI CERA, NICOTINA, UNA GOMMA, E UNA CARTINA O UN TOVAGLIOLO, O QUALCOSA DEL GENERE", + "-AH! E COME NO, L'INGREDIENTE PRINCIPALE: DELLE FOGLIE DI UNA STRANA PIANTA CHIAMATA FERDINAN", + "\324 UNA PIANTA CONVOLVOLO, LE SUE FOGLIE PROPORZIONANO POTERI MAGICI SE SONO TAGLIATE DA UNA FALCE D'ORO", + // 40 + "ALLORA, PORTAMI QUESTE CINQUE COSE E FAR\343 PER TE LA POZIONE", + "DOPO SAREI PRONTO PER UCCIDERE DRASCULA", + "RICORDA: CERA, NICOTINA, UNA GOMMA, UNA CARTINA E FOGLIE DI FERDINAN, LA PIANTA, TAGLIATE DA UNA FALCE D'ORO", + "TI L'HO GI\267 DETTO! FU TUTTO GRAZIE ALLA POZIONE", + "AH, MOLTO BENE. DUNQUE VADO A FARE LA CAN......LA POZIONE. SAR\267 UN ATTIMINO", + // 45 + "\324 SOLTANTO UN SORTILEGIO DI PROTEZIONE CONTRO VAMPIRI", + "L'HO MESSO PER DISSIMULARE CHE IL DISEGNATORE HA DIMENTICATO METTERE LA FINESTRA CHE SI VEDE DA FUORI", + "BENE, PRIMA DEVI SAPERE COME ARRIVARE AL CASTELLO DRASCULA", + "C'\324 UNAGROTTA CHE VA AL CASTELLO E CHE UTILIZZA QUEL MATTO FAN DI ELVIS, IGOR, PER SCENDERE AL PAESE TUTTE LA MATTINE", + "MA FA ATTENZIONE, SEMPRE \220 PROTETTA DA UN VAMPIRO. DOVRAI LIBERARTI DI LUI", + // 50 + "C'\220 UN VECCHIO POZZO ACCANTO ALLA CAPELLA DEL CIMITERO", + "SI UTILIZZAVA MOLTO TEMPO FA PER GIUDICARE CASI DI STREGONERIA", + "SI BUTTAVANO DENTRO ALLE STREGE. SE SI AFFONDAVANO ERANO STREGHE. SE NO, NO", + "UNA VOLTA BUTTAMMO UNA E GALLEGGI\220, DUNQUE NON SAREBBE UNA STREGA", + "ORA BEVE LA POZIONE. PECCATO CI SIA SOLTANTO PER UNO", + // 55 + "SAR\265 MEGLIO FUMARLO PROPRIO PRIMA DELLA LOTTA CONTRO DRASCULA", + "CORRI1", + "SCUSE!", + "JOHN HACKER? SONO IL DOTTORE VON BRAUN", + "SENTA, \220 MOLTO IMPORTANTE, \220 SULLA POZIONE", + // 60 + "HO TROVATO UN LIBRO SU POZIONI E DICE CHE NON SI DEVE BERE ALCOL DOPO AVERE FUMATO LA POZIONE", + "L'ALCOL BEVUTO FA REAZIONE CON LE SOSTANZE DELLA POZIONE E ANNULLA I SUOI EFFETTI IN DECIME DI SECONDO", + "DEVO RIATTACARE. LA POLIZIA MI CERCA. DICONO CHE TRAFFICO DROGHE -IGNORANTI! BENE, ALLORA ADIO E IN BOCA IL LUPO", +}, +}; + + +const char *_textsys[NUM_LANGS][NUM_TEXTSYS] = { +{ + "PRESS 'DEL' AGAIN TO RESTART", + "PRESS 'ESC' AGAIN TO EXIT", + "SPEECH ONLY", + "TEXT AND SPEECH", +}, +{ + "PULSA DE NUEVO SUPR PARA EMPEZAR", + "PULSA DE NUEVO ESC PARA SALIR", + "SOLO VOCES", + "VOZ Y TEXTO", +}, +{ + "BETaeTIGEN SIE ERNEUT entf UM ANZUFANGEN", + "BETaeTIGEN SIE ERNEUT ESC UM ZU BEENDEN", + "NUR STIMMEN", + "STIMME UND TEXT", +}, +{ + "APPUYEZ \267 NOUVEAU SUR SUPR POUR COMMENCER", + "APPUYEZ \267 NOUVEAU SUR ESC POUR SORTIR", + "SEULEMENT DES VOIX", + "VOIX ET TEXT", +}, +{ + "PREMI DI NUOVO SUPR PER COMINZIARE", + "PRMI DI NUOVO ESC PER USCIRE", + "SOLO SUONI", + "SUONI E TESTO", +}, +}; + + +const char *_texthis[NUM_LANGS][NUM_TEXTHIS] = { +{ + "", + "A long time ago, it seems that Drascula killed Von Braun's wife, and then, as he intended to face the count, Von Braun started to research all he could find on vampires.", + "When he thought he was ready, he went up to the castle and had a very violent encounter with Drascula.", + "Nobody knows exactly what happened there. Although Von Braun lost, Drascula could not kill him.", + "Von Braun felt humiliated by his defeat, he run away from the castle and has never dared to face Drascula again.", +}, +{ + "", + "", + "", + "", + "" +}, +{ + "", + "", + "", + "", + "" +}, +{ + "", + "", + "", + "", + "" +}, +{ + "", + "", + "", + "", + "" +}, +}; + + +const char *_textd1[NUM_LANGS][NUM_TEXTD1] = { +{ + // 68 + "44472225500022227555544444664447222550002222755554444466", + "444722255000222275555444446655033336666664464402256555005504450005446", + // 70 + "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", + "550330227556444744446660004446655544444722255000222275555444446644444", + "55033022755644455550444744400044504447222550002222755554444466000", + "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", + "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", + // 75 + "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444", + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" +}, +{ + // 68 + "4447222550002222755554444466", + "55033336666664464402256555005504450005446", + // 70 + "550333226220044644550044755665500440006655556666655044744656550446470046", + "74444666000444665554444444", + "5555044474440004450000", + "4444722744446664464404446554440055655022227500544446044444446", + "4447222550002222755444446666055522275550005550022200222000222666", + // 75 + "4444777444455550022220555044444446666622526644475533223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555000444555033022755644446666005204402266222003332222774440446665555005550335544444", + "5666500444555033022755555000444444444444444444444444444444", + "00222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" +}, +{ + // 68 + "44472225500022227555544444664447222550002222755554444466", + "444722255000222275555444446655033336666664464402256555005504450005446", + // 70 + "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", + "550330227556444744446660004446655544444722255000222275555444446644444", + "55033022755644455550444744400044504447222550002222755554444466000", + "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", + "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", + // 75 + "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444", + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" +}, +{ + // 68 + "44472225500022227555544444664447222550002222755554444466", + "444722255000222275555444446655033336666664464402256555005504450005446", + // 70 + "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", + "550330227556444744446660004446655544444722255000222275555444446644444", + "55033022755644455550444744400044504447222550002222755554444466000", + "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", + "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", + // 75 + "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444", + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" +}, +{ + // 68 + "44472225500022227555544444664447222550002222755554444466", + "444722255000222275555444446655033336666664464402256555005504450005446", + // 70 + "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", + "550330227556444744446660004446655544444722255000222275555444446644444", + "55033022755644455550444744400044504447222550002222755554444466000", + "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", + "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", + // 75 + "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", + "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", + "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444", + "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" +}, + +}; + + +const char *_textverbs[NUM_LANGS][NUM_TEXTVERBS] = { +{ + "look", + "take", + "open", + "close", + "talk", + "push", +}, +{ + "mirar", + "coger", + "abrir", + "cerrar", + "hablar", + "mover", +}, +{ + "Schau", + "Nimm", + "oeFFNE", + "Schliesse", + "Rede", + "Druecke", +}, +{ + "regardez", + "ramassez", + "ouvrez", + "fermez", + "parlez", + "poussez", +}, +{ + "esamina", + "prendi", + "apri", + "chiudi", + "parla", + "premi", +}, +}; + + +const char *_textmisc[NUM_LANGS][NUM_TEXTMISC] = { +{ + "HUNCHBACKED", + "Transilvania, 1993 d.c.", + "GOOOOOOOAAAAAAAL!", +}, +{ + "jorobado", + "Transilvania, 1993 d.c. (despues de cenar)", + "GOOOOOOOOOOOOOOOL", +}, +{ + "HUNCHBACKED", + "Transilvania, 1993 d.c.", + "GOOOOOOOAAAAAAAL!", +}, +{ + "HUNCHBACKED", + "Transilvania, 1993 d.c.", + "GOOOOOOOAAAAAAAL!", +}, +{ + "HUNCHBACKED", + "Transilvania, 1993 d.c.", + "GOOOOOOOAAAAAAAL!", +}, +}; + +#endif /* STATICDATA_H */ -- cgit v1.2.3 From e14f81391c8210ea7cef8f798871ff0f57c76cbb Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Jun 2008 19:40:43 +0000 Subject: Shuffled around more code. Now the files look more manageable. svn-id: r32599 --- engines/drascula/actors.cpp | 477 +++++++ engines/drascula/animation.cpp | 13 + engines/drascula/converse.cpp | 297 ++++ engines/drascula/drascula.cpp | 2958 +--------------------------------------- engines/drascula/graphics.cpp | 736 ++++++++++ engines/drascula/interface.cpp | 213 +++ engines/drascula/objects.cpp | 299 ++++ engines/drascula/palette.cpp | 202 +++ engines/drascula/rooms.cpp | 477 +++++++ engines/drascula/saveload.cpp | 240 ++++ engines/drascula/sound.cpp | 159 +++ 11 files changed, 3157 insertions(+), 2914 deletions(-) create mode 100644 engines/drascula/actors.cpp create mode 100644 engines/drascula/converse.cpp create mode 100644 engines/drascula/graphics.cpp create mode 100644 engines/drascula/interface.cpp create mode 100644 engines/drascula/objects.cpp create mode 100644 engines/drascula/palette.cpp create mode 100644 engines/drascula/saveload.cpp create mode 100644 engines/drascula/sound.cpp diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp new file mode 100644 index 0000000000..166ba49930 --- /dev/null +++ b/engines/drascula/actors.cpp @@ -0,0 +1,477 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "drascula/drascula.h" + +namespace Drascula { + +void DrasculaEngine::placeIgor() { + int pos_igor[6]; + + pos_igor[0] = 1; + if (currentChapter == 4) { + pos_igor[1] = 138; + } else { + if (trackIgor == 3) + pos_igor[1] = 138; + else if (trackIgor == 1) + pos_igor[1] = 76; + } + pos_igor[2] = igorX; + pos_igor[3] = igorY; + pos_igor[4] = 54; + pos_igor[5] = 61; + + copyRectClip(pos_igor, frontSurface, screenSurface); +} + +void DrasculaEngine::placeDrascula() { + int pos_dr[6]; + + if (trackDrascula == 1) + pos_dr[0] = 47; + else if (trackDrascula == 0) + pos_dr[0] = 1; + else if (trackDrascula == 3 && currentChapter == 1) + pos_dr[0] = 93; + pos_dr[1] = 122; + pos_dr[2] = drasculaX; + pos_dr[3] = drasculaY; + pos_dr[4] = 45; + pos_dr[5] = 77; + + if (currentChapter == 6) + copyRectClip(pos_dr, drawSurface2, screenSurface); + else + copyRectClip(pos_dr, backSurface, screenSurface); +} + +void DrasculaEngine::placeBJ() { + int pos_bj[6]; + + if (trackBJ == 3) + pos_bj[0] = 10; + else if (trackBJ == 0) + pos_bj[0] = 37; + pos_bj[1] = 99; + pos_bj[2] = bjX; + pos_bj[3] = bjY; + pos_bj[4] = 26; + pos_bj[5] = 76; + + copyRectClip(pos_bj, drawSurface3, screenSurface); +} + +void DrasculaEngine::hiccup(int counter) { + int y = 0, trackCharacter = 0; + if (currentChapter == 3) + y = -1; + + do { + counter--; + + updateRoom(); + if (currentChapter == 3) + updateScreen(0, 0, 0, y, 320, 200, screenSurface); + else + updateScreen(0, 1, 0, y, 320, 198, screenSurface); + + if (trackCharacter == 0) + y++; + else + y--; + + if (currentChapter == 3) { + if (y == 1) + trackCharacter = 1; + if (y == -1) + trackCharacter = 0; + } else { + if (y == 2) + trackCharacter = 1; + if (y == 0) + trackCharacter = 0; + } + } while (counter > 0); + + updateRoom(); + updateScreen(); +} + +void DrasculaEngine::startWalking() { + characterMoved = 1; + + stepX = STEP_X; + stepY = STEP_Y; + + if (currentChapter == 2) { + if ((roomX < curX) && (roomY <= (curY + curHeight))) + quadrant_1(); + else if ((roomX < curX) && (roomY > (curY + curHeight))) + quadrant_3(); + else if ((roomX > curX + curWidth) && (roomY <= (curY + curHeight))) + quadrant_2(); + else if ((roomX > curX + curWidth) && (roomY > (curY + curHeight))) + quadrant_4(); + else if (roomY < curY + curHeight) + walkUp(); + else if (roomY > curY + curHeight) + walkDown(); + } else { + if ((roomX < curX + curWidth / 2 ) && (roomY <= (curY + curHeight))) + quadrant_1(); + else if ((roomX < curX + curWidth / 2) && (roomY > (curY + curHeight))) + quadrant_3(); + else if ((roomX > curX + curWidth / 2) && (roomY <= (curY + curHeight))) + quadrant_2(); + else if ((roomX > curX + curWidth / 2) && (roomY > (curY + curHeight))) + quadrant_4(); + else + characterMoved = 0; + } + startTime = getTime(); +} + +void DrasculaEngine::moveCharacters() { + int curPos[6]; + int r; + + if (characterMoved == 1 && stepX == STEP_X) { + for (r = 0; r < stepX; r++) { + if (currentChapter != 2) { + if (trackProtagonist == 0 && roomX - r == curX + curWidth / 2) { + characterMoved = 0; + stepX = STEP_X; + stepY = STEP_Y; + } + if (trackProtagonist == 1 && roomX + r == curX + curWidth / 2) { + characterMoved = 0; + stepX = STEP_X; + stepY = STEP_Y; + curX = roomX - curWidth / 2; + curY = roomY - curHeight; + } + } else if (currentChapter == 2) { + if (trackProtagonist == 0 && roomX - r == curX) { + characterMoved = 0; + stepX = STEP_X; + stepY = STEP_Y; + } + if (trackProtagonist == 1 && roomX + r == curX + curWidth) { + characterMoved = 0; + stepX = STEP_X; + stepY = STEP_Y; + curX = roomX - curWidth + 4; + curY = roomY - curHeight; + } + } + } + } + if (characterMoved == 1 && stepY == STEP_Y) { + for (r = 0; r < stepY; r++) { + if (trackProtagonist == 2 && roomY - r == curY + curHeight) { + characterMoved = 0; + stepX = STEP_X; + stepY = STEP_Y; + } + if (trackProtagonist == 3 && roomY + r == curY + curHeight) { + characterMoved = 0; + stepX = STEP_X; + stepY = STEP_Y; + } + } + } + + if (currentChapter == 1 || currentChapter == 4 || currentChapter == 5 || currentChapter == 6) { + if (hare_se_ve == 0) { + increaseFrameNum(); + return; + } + } + + if (characterMoved == 0) { + curPos[0] = 0; + curPos[1] = DIF_MASK_HARE; + curPos[2] = curX; + curPos[3] = curY; + if (currentChapter == 2) { + curPos[4] = curWidth; + curPos[5] = curHeight; + } else { + curPos[4] = CHARACTER_WIDTH; + curPos[5] = CHARACTER_HEIGHT; + } + + if (trackProtagonist == 0) { + curPos[1] = 0; + if (currentChapter == 2) + copyRectClip(curPos, extraSurface, screenSurface); + else + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], + factor_red[curY + curHeight], extraSurface, screenSurface); + } else if (trackProtagonist == 1) { + if (currentChapter == 2) + copyRectClip(curPos, extraSurface, screenSurface); + else + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], + factor_red[curY + curHeight], extraSurface, screenSurface); + } else if (trackProtagonist == 2) { + if (currentChapter == 2) + copyRectClip(curPos, backSurface, screenSurface); + else + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], + factor_red[curY + curHeight], backSurface, screenSurface); + } else { + if (currentChapter == 2) + copyRectClip(curPos, frontSurface, screenSurface); + else + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], + factor_red[curY + curHeight], frontSurface, screenSurface); + } + } else if (characterMoved == 1) { + curPos[0] = frameX[num_frame]; + curPos[1] = frame_y + DIF_MASK_HARE; + curPos[2] = curX; + curPos[3] = curY; + if (currentChapter == 2) { + curPos[4] = curWidth; + curPos[5] = curHeight; + } else { + curPos[4] = CHARACTER_WIDTH; + curPos[5] = CHARACTER_HEIGHT; + } + if (trackProtagonist == 0) { + curPos[1] = 0; + if (currentChapter == 2) + copyRectClip(curPos, extraSurface, screenSurface); + else + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], + factor_red[curY + curHeight], extraSurface, screenSurface); + } else if (trackProtagonist == 1) { + if (currentChapter == 2) + copyRectClip(curPos, extraSurface, screenSurface); + else + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], + factor_red[curY + curHeight], extraSurface, screenSurface); + } else if (trackProtagonist == 2) { + if (currentChapter == 2) + copyRectClip(curPos, backSurface, screenSurface); + else + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], + factor_red[curY + curHeight], backSurface, screenSurface); + } else { + if (currentChapter == 2) + copyRectClip(curPos, frontSurface, screenSurface); + else + reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], + factor_red[curY + curHeight], frontSurface, screenSurface); + } + increaseFrameNum(); + } +} + +void DrasculaEngine::quadrant_1() { + float distanceX, distanceY; + + if (currentChapter == 2) + distanceX = curX - roomX; + else + distanceX = curX + curWidth / 2 - roomX; + + distanceY = (curY + curHeight) - roomY; + + if (distanceX < distanceY) { + curDirection = 0; + trackProtagonist = 2; + stepX = (int)(distanceX / (distanceY / STEP_Y)); + } else { + curDirection = 7; + trackProtagonist = 0; + stepY = (int)(distanceY / (distanceX / STEP_X)); + } +} + +void DrasculaEngine::quadrant_2() { + float distanceX, distanceY; + + if (currentChapter == 2) + distanceX = abs(curX + curWidth - roomX); + else + distanceX = abs(curX + curWidth / 2 - roomX); + + distanceY = (curY + curHeight) - roomY; + + if (distanceX < distanceY) { + curDirection = 1; + trackProtagonist = 2; + stepX = (int)(distanceX / (distanceY / STEP_Y)); + } else { + curDirection = 2; + trackProtagonist = 1; + stepY = (int)(distanceY / (distanceX / STEP_X)); + } +} + +void DrasculaEngine::quadrant_3() { + float distanceX, distanceY; + + if (currentChapter == 2) + distanceX = curX - roomX; + else + distanceX = curX + curWidth / 2 - roomX; + + distanceY = roomY - (curY + curHeight); + + if (distanceX < distanceY) { + curDirection = 5; + trackProtagonist = 3; + stepX = (int)(distanceX / (distanceY / STEP_Y)); + } else { + curDirection = 6; + trackProtagonist = 0; + stepY = (int)(distanceY / (distanceX / STEP_X)); + } +} + +void DrasculaEngine::quadrant_4() { + float distanceX, distanceY; + + if (currentChapter == 2) + distanceX = abs(curX + curWidth - roomX); + else + distanceX = abs(curX + curWidth / 2 - roomX); + + distanceY = roomY - (curY + curHeight); + + if (distanceX < distanceY) { + curDirection = 4; + trackProtagonist = 3; + stepX = (int)(distanceX / (distanceY / STEP_Y)); + } else { + curDirection = 3; + trackProtagonist = 1; + stepY = (int)(distanceY / (distanceX / STEP_X)); + } +} + +void DrasculaEngine::increaseFrameNum() { + timeDiff = getTime() - startTime; + + if (timeDiff >= 6) { + startTime = getTime(); + num_frame++; + if (num_frame == 6) + num_frame = 0; + + if (curDirection == 0 || curDirection == 7) { + curX -= stepX; + curY -= stepY; + } else if (curDirection == 1 || curDirection == 2) { + curX += stepX; + curY -= stepY; + } else if (curDirection == 3 || curDirection == 4) { + curX += stepX; + curY += stepY; + } else if (curDirection == 5 || curDirection == 6) { + curX -= stepX; + curY += stepY; + } + } + + if (currentChapter != 2) { + curY += (int)(curHeight - newHeight); + curX += (int)(curWidth - newWidth); + curHeight = (int)newHeight; + curWidth = (int)newWidth; + } +} + +void DrasculaEngine::walkDown() { + curDirection = 4; + trackProtagonist = 3; + stepX = 0; +} + +void DrasculaEngine::walkUp() { + curDirection = 0; + trackProtagonist = 2; + stepX = 0; +} + +void DrasculaEngine::moveVonBraun() { + int pos_vb[6]; + + if (vonBraunHasMoved == 0) { + pos_vb[0] = 256; + pos_vb[1] = 129; + pos_vb[2] = vonBraunX; + pos_vb[3] = 66; + pos_vb[4] = 33; + pos_vb[5] = 69; + if (trackVonBraun == 0) + pos_vb[0] = 222; + else if (trackVonBraun == 1) + pos_vb[0] = 188; + } else { + pos_vb[0] = actorFrames[kFrameVonBraun]; + pos_vb[1] = (trackVonBraun == 0) ? 62 : 131; + pos_vb[2] = vonBraunX; + pos_vb[3] = 66; + pos_vb[4] = 28; + pos_vb[5] = 68; + + actorFrames[kFrameVonBraun] += 29; + if (actorFrames[kFrameVonBraun] > 146) + actorFrames[kFrameVonBraun] = 1; + } + + copyRectClip(pos_vb, frontSurface, screenSurface); +} + +void DrasculaEngine::placeVonBraun(int pointX) { + trackVonBraun = (pointX < vonBraunX) ? 0 : 1; + vonBraunHasMoved = 1; + + for (;;) { + updateRoom(); + updateScreen(); + if (trackVonBraun == 0) { + vonBraunX = vonBraunX - 5; + if (vonBraunX <= pointX) + break; + } else { + vonBraunX = vonBraunX + 5; + if (vonBraunX >= pointX) + break; + } + pause(5); + } + + vonBraunHasMoved = 0; +} + + + +} // End of namespace Drascula diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 53fea4a57c..1c0cc5967d 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -2704,5 +2704,18 @@ void DrasculaEngine::animation_9_4() { fadeToBlack(1); } +void DrasculaEngine::activatePendulum() { + flags[1] = 2; + hare_se_ve = 0; + roomNumber = 102; + loadPic(102, drawSurface1, HALF_PAL); + loadPic("an_p1.alg", drawSurface3); + loadPic("an_p2.alg", extraSurface); + loadPic("an_p3.alg", frontSurface); + + copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); + + savedTime = getTime(); +} } // End of namespace Drascula diff --git a/engines/drascula/converse.cpp b/engines/drascula/converse.cpp new file mode 100644 index 0000000000..1c3831e4ca --- /dev/null +++ b/engines/drascula/converse.cpp @@ -0,0 +1,297 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "drascula/drascula.h" + +namespace Drascula { + +void DrasculaEngine::converse(int index) { + char fileName[20]; + sprintf(fileName, "op_%d.cal", index); + uint h; + int game1 = 1, game2 = 1, game3 = 1, game4 = 1; + char phrase1[78]; + char phrase2[78]; + char phrase3[87]; + char phrase4[78]; + char sound1[13]; + char sound2[13]; + char sound3[13]; + char sound4[13]; + int answer1; + int answer2; + int answer3; + int used1 = 0; + int used2 = 0; + int used3 = 0; + char buffer[256]; + uint len; + + breakOut = 0; + + if (currentChapter == 5) + withoutVerb(); + + _arj.open(fileName); + if (!_arj.isOpen()) { + error("missing data file %s", fileName); + } + int size = _arj.size(); + + getStringFromLine(buffer, size, phrase1); + getStringFromLine(buffer, size, phrase2); + getStringFromLine(buffer, size, phrase3); + getStringFromLine(buffer, size, phrase4); + getStringFromLine(buffer, size, sound1); + getStringFromLine(buffer, size, sound2); + getStringFromLine(buffer, size, sound3); + getStringFromLine(buffer, size, sound4); + getIntFromLine(buffer, size, &answer1); + getIntFromLine(buffer, size, &answer2); + getIntFromLine(buffer, size, &answer3); + + _arj.close(); + + if (currentChapter == 2 && !strcmp(fileName, "op_5.cal") && flags[38] == 1 && flags[33] == 1) { + strcpy(phrase3, _text[_lang][405]); + strcpy(sound3, "405.als"); + answer3 = 31; + } + + if (currentChapter == 6 && !strcmp(fileName, "op_12.cal") && flags[7] == 1) { + strcpy(phrase3, _text[_lang][273]); + strcpy(sound3, "273.als"); + answer3 = 14; + } + + if (currentChapter == 6 && !strcmp(fileName, "op_12.cal") && flags[10] == 1) { + strcpy(phrase3, _text[_lang][274]); + strcpy(sound3, "274.als"); + answer3 = 15; + } + + len = strlen(phrase1); + for (h = 0; h < len; h++) + if (phrase1[h] == (char)0xa7) + phrase1[h] = ' '; + + len = strlen(phrase2); + for (h = 0; h < len; h++) + if (phrase2[h] == (char)0xa7) + phrase2[h] = ' '; + + len = strlen(phrase3); + for (h = 0; h < len; h++) + if (phrase3[h] == (char)0xa7) + phrase3[h] = ' '; + + len = strlen(phrase4); + for (h = 0; h < len; h++) + if (phrase4[h] == (char)0xa7) + phrase4[h] = ' '; + + loadPic("car.alg", backSurface); + // TODO code here should limit y position for mouse in dialog menu, + // but we can't implement this due lack backend functionality + // from 1(top) to 31 + color_abc(kColorLightGreen); + + while (breakOut == 0) { + updateRoom(); + + if (currentChapter == 1 || currentChapter == 4 || currentChapter == 6) { + if (musicStatus() == 0 && flags[11] == 0) + playMusic(roomMusic); + } else if (currentChapter == 2) { + if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) + playMusic(roomMusic); + } else if (currentChapter == 3 || currentChapter == 5) { + if (musicStatus() == 0) + playMusic(roomMusic); + } + + updateEvents(); + + if (mouseY > 0 && mouseY < 9) { + if (used1 == 1 && _color != kColorWhite) + color_abc(kColorWhite); + else if (used1 == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); + } else if (mouseY > 8 && mouseY < 17) { + if (used2 == 1 && _color != kColorWhite) + color_abc(kColorWhite); + else if (used2 == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); + } else if (mouseY > 16 && mouseY < 25) { + if (used3 == 1 && _color != kColorWhite) + color_abc(kColorWhite); + else if (used3 == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); + } else if (_color != kColorLightGreen) + color_abc(kColorLightGreen); + + if (mouseY > 0 && mouseY < 9) + game1 = 2; + else if (mouseY > 8 && mouseY < 17) + game2 = 2; + else if (mouseY > 16 && mouseY < 25) + game3 = 2; + else if (mouseY > 24 && mouseY < 33) + game4 = 2; + + print_abc_opc(phrase1, 1, 2, game1); + print_abc_opc(phrase2, 1, 10, game2); + print_abc_opc(phrase3, 1, 18, game3); + print_abc_opc(phrase4, 1, 26, game4); + + updateScreen(); + + if ((leftMouseButton == 1) && (game1 == 2)) { + delay(100); + used1 = 1; + talk(phrase1, sound1); + if (currentChapter == 3) + grr(); + else + response(answer1); + } else if ((leftMouseButton == 1) && (game2 == 2)) { + delay(100); + used2 = 1; + talk(phrase2, sound2); + if (currentChapter == 3) + grr(); + else + response(answer2); + } else if ((leftMouseButton == 1) && (game3 == 2)) { + delay(100); + used3 = 1; + talk(phrase3, sound3); + if (currentChapter == 3) + grr(); + else + response(answer3); + } else if ((leftMouseButton == 1) && (game4 == 2)) { + delay(100); + talk(phrase4, sound4); + breakOut = 1; + } + + if (leftMouseButton == 1) { + delay(100); + color_abc(kColorLightGreen); + } + + game1 = (used1 == 0) ? 1 : 3; + game2 = (used2 == 0) ? 1 : 3; + game3 = (used3 == 0) ? 1 : 3; + game4 = 1; + } // while (breakOut == 0) + + if (currentChapter == 2) + loadPic(menuBackground, backSurface); + else + loadPic(99, backSurface); + if (currentChapter != 5) + withoutVerb(); +} + +void DrasculaEngine::response(int function) { + if (currentChapter == 1) { + if (function >= 10 && function <= 12) + talk_drunk(function - 9); + } else if (currentChapter == 2) { + if (function == 8) + animation_8_2(); + else if (function == 9) + animation_9_2(); + else if (function == 10) + animation_10_2(); + else if (function == 15) + animation_15_2(); + else if (function == 16) + animation_16_2(); + else if (function == 17) + animation_17_2(); + else if (function == 19) + animation_19_2(); + else if (function == 20) + animation_20_2(); + else if (function == 21) + animation_21_2(); + else if (function == 23) + animation_23_2(); + else if (function == 28) + animation_28_2(); + else if (function == 29) + animation_29_2(); + else if (function == 30) + animation_30_2(); + else if (function == 31) + animation_31_2(); + } else if (currentChapter == 4) { + if (function == 2) + animation_2_4(); + else if (function == 3) + animation_3_4(); + else if (function == 4) + animation_4_4(); + } else if (currentChapter == 5) { + if (function == 2) + animation_2_5(); + else if (function == 3) + animation_3_5(); + else if (function == 6) + animation_6_5(); + else if (function == 7) + animation_7_5(); + else if (function == 8) + animation_8_5(); + else if (function == 15) + animation_15_5(); + else if (function == 16) + animation_16_5(); + else if (function == 17) + animation_17_5(); + } else if (currentChapter == 6) { + if (function == 2) + animation_2_6(); + else if (function == 3) + animation_3_6(); + else if (function == 4) + animation_4_6(); + else if (function == 11) + animation_11_6(); + else if (function == 12) + animation_12_6(); + else if (function == 13) + animation_13_6(); + else if (function == 14) + animation_14_6(); + else if (function == 15) + animation_15_6(); + } +} + +} // End of namespace Drascula diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 49dc7def50..835e893d57 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -220,184 +220,6 @@ void DrasculaEngine::quitGame() { free(VGA); } -void DrasculaEngine::allocMemory() { - screenSurface = (byte *)malloc(64000); - assert(screenSurface); - frontSurface = (byte *)malloc(64000); - assert(frontSurface); - backSurface = (byte *)malloc(64000); - assert(backSurface); - drawSurface1 = (byte *)malloc(64000); - assert(drawSurface1); - drawSurface2 = (byte *)malloc(64000); - assert(drawSurface2); - drawSurface3 = (byte *)malloc(64000); - assert(drawSurface3); - tableSurface = (byte *)malloc(64000); - assert(tableSurface); - extraSurface = (byte *)malloc(64000); - assert(extraSurface); -} - -void DrasculaEngine::freeMemory() { - free(screenSurface); - free(drawSurface1); - free(backSurface); - free(drawSurface2); - free(tableSurface); - free(drawSurface3); - free(extraSurface); - free(frontSurface); -} - -void DrasculaEngine::loadPic(const char *NamePcc, byte *targetSurface, int colorCount) { - unsigned int con, x = 0; - unsigned int fExit = 0; - byte ch, rep; - byte *auxPun; - - _arj.open(NamePcc); - if (!_arj.isOpen()) - error("missing game data %s %c", NamePcc, 7); - - pcxBuffer = (byte *)malloc(65000); - auxPun = pcxBuffer; - _arj.seek(128); - while (!fExit) { - ch = _arj.readByte(); - rep = 1; - if ((ch & 192) == 192) { - rep = (ch & 63); - ch = _arj.readByte(); - } - for (con = 0; con < rep; con++) { - *auxPun++ = ch; - x++; - if (x > 64000) - fExit = 1; - } - } - - _arj.read(cPal, 768); - _arj.close(); - - memcpy(targetSurface, pcxBuffer, 64000); - free(pcxBuffer); - setRGB((byte *)cPal, colorCount); -} - -void DrasculaEngine::setRGB(byte *pal, int colorCount) { - int x, cnt = 0; - - for (x = 0; x < colorCount; x++) { - gamePalette[x][0] = pal[cnt++] / 4; - gamePalette[x][1] = pal[cnt++] / 4; - gamePalette[x][2] = pal[cnt++] / 4; - } - setPalette((byte *)&gamePalette); -} - -void DrasculaEngine::black() { - int color, component; - DacPalette256 blackPalette; - - for (color = 0; color < 256; color++) - for (component = 0; component < 3; component++) - blackPalette[color][component] = 0; - - blackPalette[254][0] = 0x3F; - blackPalette[254][1] = 0x3F; - blackPalette[254][2] = 0x15; - - setPalette((byte *)&blackPalette); -} - -void DrasculaEngine::setPalette(byte *PalBuf) { - byte pal[256 * 4]; - int i; - - for (i = 0; i < 256; i++) { - pal[i * 4 + 0] = PalBuf[i * 3 + 0] * 4; - pal[i * 4 + 1] = PalBuf[i * 3 + 1] * 4; - pal[i * 4 + 2] = PalBuf[i * 3 + 2] * 4; - pal[i * 4 + 3] = 0; - } - _system->setPalette(pal, 0, 256); - _system->updateScreen(); -} - -void DrasculaEngine::copyBackground(int xorg, int yorg, int xdes, int ydes, int width, - int height, byte *src, byte *dest) { - dest += xdes + ydes * 320; - src += xorg + yorg * 320; - for (int x = 0; x < height; x++) { - memcpy(dest, src, width); - dest += 320; - src += 320; - } -} - -void DrasculaEngine::copyRect(int xorg, int yorg, int xdes, int ydes, int width, - int height, byte *src, byte *dest) { - int y, x; - - dest += xdes + ydes * 320; - src += xorg + yorg * 320; - - for (y = 0; y < height; y++) - for (x = 0; x < width; x++) - if (src[x + y * 320] != 255) - dest[x + y * 320] = src[x + y * 320]; -} - -void DrasculaEngine::copyRectClip(int *Array, byte *src, byte *dest) { - int y, x; - int xorg = Array[0]; - int yorg = Array[1]; - int xdes = Array[2]; - int ydes = Array[3]; - int width = Array[4]; - int height = Array[5]; - - if (ydes < 0) { - yorg += -ydes; - height += ydes; - ydes = 0; - } - if (xdes < 0) { - xorg += -xdes; - width += xdes; - xdes = 0; - } - if ((xdes + width) > 319) - width -= (xdes + width) - 320; - if ((ydes + height) > 199) - height -= (ydes + height) - 200; - - dest += xdes + ydes * 320; - src += xorg + yorg * 320; - - for (y = 0; y < height; y++) - for (x = 0; x < width; x++) - if (src[x + y * 320] != 255) - dest[x + y * 320] = src[x + y * 320]; -} - -void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *buffer) { - byte *ptr = VGA; - - ptr += xdes + ydes * 320; - buffer += xorg + yorg * 320; - for (int x = 0; x < height; x++) { - memcpy(ptr, buffer, width); - ptr += 320; - buffer += 320; - } - - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - _system->updateScreen(); -} - bool DrasculaEngine::runCurrentChapter() { int n; @@ -663,65 +485,6 @@ bool DrasculaEngine::runCurrentChapter() { } } -void DrasculaEngine::pickObject(int objeto) { - if (currentChapter == 6) - loadPic("iconsp.alg", backSurface); - else if (currentChapter == 4) - loadPic("icons2.alg", backSurface); - else if (currentChapter == 5) - loadPic("icons3.alg", backSurface); - else - loadPic("icons.alg", backSurface); - chooseObject(objeto); - if (currentChapter == 2) - loadPic(menuBackground, backSurface); - else - loadPic(99, backSurface); -} - -void DrasculaEngine::chooseObject(int objeto) { - if (currentChapter == 5) { - if (takeObject == 1 && menuScreen == 0 && pickedObject != 16) - addObject(pickedObject); - } else { - if (takeObject == 1 && menuScreen == 0) - addObject(pickedObject); - } - copyBackground(x1d_menu[objeto], y1d_menu[objeto], 0, 0, OBJWIDTH,OBJHEIGHT, backSurface, drawSurface3); - takeObject = 1; - pickedObject = objeto; -} - -int DrasculaEngine::removeObject(int obj) { - int result = 1; - - for (int h = 1; h < 43; h++) { - if (inventoryObjects[h] == obj) { - inventoryObjects[h] = 0; - result = 0; - break; - } - } - - return result; -} - -void DrasculaEngine::withoutVerb() { - int c = (menuScreen == 1) ? 0 : 171; - - if (currentChapter == 5) { - if (takeObject == 1 && pickedObject != 16) - addObject(pickedObject); - } else { - if (takeObject == 1) - addObject(pickedObject); - } - copyBackground(0, c, 0, 0, OBJWIDTH,OBJHEIGHT, backSurface, drawSurface3); - - takeObject = 0; - hasName = 0; -} - char *DrasculaEngine::getLine(char *buf, int len) { byte c; char *b; @@ -755,339 +518,6 @@ void DrasculaEngine::getStringFromLine(char *buf, int len, char* result) { sscanf(buf, "%s", result); } -void DrasculaEngine::enterRoom(int roomIndex) { - debug(2, "Entering room %d", roomIndex); - - char fileName[20]; - sprintf(fileName, "%d.ald", roomIndex); - int soc, l, martin = 0, objIsExit = 0; - float chiquez = 0, pequegnez = 0; - char pant1[20], pant2[20], pant3[20], pant4[20]; - char buffer[256]; - int palLevel = 0; - - hasName = 0; - - strcpy(currentData, fileName); - - _arj.open(fileName); - if (!_arj.isOpen()) { - error("missing data file %s", fileName); - } - int size = _arj.size(); - - getIntFromLine(buffer, size, &roomNumber); - getIntFromLine(buffer, size, &roomMusic); - getStringFromLine(buffer, size, roomDisk); - getIntFromLine(buffer, size, &palLevel); - - if (currentChapter == 2) - getIntFromLine(buffer, size, &martin); - - if (currentChapter == 2 && martin != 0) { - curWidth = martin; - getIntFromLine(buffer, size, &curHeight); - getIntFromLine(buffer, size, &feetHeight); - getIntFromLine(buffer, size, &stepX); - getIntFromLine(buffer, size, &stepY); - - getStringFromLine(buffer, size, pant1); - getStringFromLine(buffer, size, pant2); - getStringFromLine(buffer, size, pant3); - getStringFromLine(buffer, size, pant4); - - strcpy(menuBackground, pant4); - } - - getIntFromLine(buffer, size, &numRoomObjs); - - for (l = 0; l < numRoomObjs; l++) { - getIntFromLine(buffer, size, &objectNum[l]); - getStringFromLine(buffer, size, objName[l]); - getIntFromLine(buffer, size, &x1[l]); - getIntFromLine(buffer, size, &y1[l]); - getIntFromLine(buffer, size, &x2[l]); - getIntFromLine(buffer, size, &y2[l]); - getIntFromLine(buffer, size, &roomObjX[l]); - getIntFromLine(buffer, size, &roomObjY[l]); - getIntFromLine(buffer, size, &trackObj[l]); - getIntFromLine(buffer, size, &visible[l]); - getIntFromLine(buffer, size, &isDoor[l]); - if (isDoor[l] != 0) { - getStringFromLine(buffer, size, _targetSurface[l]); - getIntFromLine(buffer, size, &_destX[l]); - getIntFromLine(buffer, size, &_destY[l]); - getIntFromLine(buffer, size, &trackCharacter_alkeva[l]); - getIntFromLine(buffer, size, &alapuertakeva[l]); - updateDoor(l); - } - } - - getIntFromLine(buffer, size, &floorX1); - getIntFromLine(buffer, size, &floorY1); - getIntFromLine(buffer, size, &floorX2); - getIntFromLine(buffer, size, &floorY2); - - if (currentChapter != 2) { - getIntFromLine(buffer, size, &far); - getIntFromLine(buffer, size, &near); - } - _arj.close(); - - if (currentChapter == 2 && martin != 0) { - loadPic(pant2, extraSurface); - loadPic(pant1, frontSurface); - loadPic(pant4, backSurface); - } - - if (currentChapter == 2) { - if (martin == 0) { - stepX = STEP_X; - stepY = STEP_Y; - curHeight = CHARACTER_HEIGHT; - curWidth = CHARACTER_WIDTH; - feetHeight = FEET_HEIGHT; - loadPic(97, extraSurface); - loadPic(96, frontSurface); - loadPic(99, backSurface); - - strcpy(menuBackground, "99.alg"); - } - } - - for (l = 0; l < numRoomObjs; l++) { - if (objectNum[l] == objExit) - objIsExit = l; - } - - if (currentChapter == 2) { - if (curX == -1) { - curX = _destX[objIsExit]; - curY = _destY[objIsExit] - curHeight; - } - characterMoved = 0; - } - - loadPic(roomDisk, drawSurface3); - loadPic(roomNumber, drawSurface1, HALF_PAL); - - copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); - - setDefaultPalette(); - if (palLevel != 0) - setPaletteBase(palLevel); - assignBrightPalette(); - setDefaultPalette(); - setPaletteBase(palLevel + 2); - assignDarkPalette(); - - setBrightPalette(); - changeColor = -1; - - if (currentChapter == 2) - color_abc(kColorLightGreen); - - if (currentChapter != 2) { - for (l = 0; l <= floorY1; l++) - factor_red[l] = far; - for (l = floorY1; l <= 201; l++) - factor_red[l] = near; - - chiquez = (float)(near - far) / (float)(floorY2 - floorY1); - for (l = floorY1; l <= floorY2; l++) { - factor_red[l] = (int)(far + pequegnez); - pequegnez = pequegnez + chiquez; - } - } - - if (roomNumber == 24) { - for (l = floorY1 - 1; l > 74; l--) { - factor_red[l] = (int)(far - pequegnez); - pequegnez = pequegnez + chiquez; - } - } - - if (currentChapter == 5 && roomNumber == 54) { - for (l = floorY1 - 1; l > 84; l--) { - factor_red[l] = (int)(far - pequegnez); - pequegnez = pequegnez + chiquez; - } - } - - if (currentChapter != 2) { - if (curX == -1) { - curX = _destX[objIsExit]; - curY = _destY[objIsExit]; - curHeight = (CHARACTER_HEIGHT * factor_red[curY]) / 100; - curWidth = (CHARACTER_WIDTH * factor_red[curY]) / 100; - curY = curY - curHeight; - } else { - curHeight = (CHARACTER_HEIGHT * factor_red[curY]) / 100; - curWidth = (CHARACTER_WIDTH * factor_red[curY]) / 100; - } - characterMoved = 0; - } - - if (currentChapter == 2) { - soc = 0; - for (l = 0; l < 6; l++) { - soc += curWidth; - frameX[l] = soc; - } - } - - if (currentChapter == 5) - hare_se_ve = 1; - - updateVisible(); - - if (currentChapter == 1) - isDoor[7] = 0; - - if (currentChapter == 2) { - if (roomNumber == 14 && flags[39] == 1) - roomMusic = 16; - else if (roomNumber == 15 && flags[39] == 1) - roomMusic = 16; - if (roomNumber == 14 && flags[5] == 1) - roomMusic = 0; - else if (roomNumber == 15 && flags[5] == 1) - roomMusic = 0; - - if (previousMusic != roomMusic && roomMusic != 0) - playMusic(roomMusic); - if (roomMusic == 0) - stopMusic(); - } else { - if (previousMusic != roomMusic && roomMusic != 0) - playMusic(roomMusic); - } - - if (currentChapter == 2) { - if (roomNumber == 9 || roomNumber == 2 || roomNumber == 14 || roomNumber == 18) - savedTime = getTime(); - } - if (currentChapter == 4) { - if (roomNumber == 26) - savedTime = getTime(); - } - - if (currentChapter == 4 && roomNumber == 24 && flags[29] == 1) - animation_7_4(); - - if (currentChapter == 5) { - if (roomNumber == 45) - hare_se_ve = 0; - if (roomNumber == 49 && flags[7] == 0) - animation_4_5(); - } - - updateRoom(); -} - -void DrasculaEngine::clearRoom() { - memset(VGA, 0, 64000); - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - _system->updateScreen(); -} - -void DrasculaEngine::gotoObject(int pointX, int pointY) { - if (currentChapter == 5 || currentChapter == 6) { - if (hare_se_ve == 0) { - curX = roomX; - curY = roomY; - updateRoom(); - updateScreen(); - return; - } - } - roomX = pointX; - roomY = pointY; - startWalking(); - - for (;;) { - updateRoom(); - updateScreen(); - if (characterMoved == 0) - break; - } - - if (walkToObject == 1) { - walkToObject = 0; - trackProtagonist = trackFinal; - } - updateRoom(); - updateScreen(); -} - -void DrasculaEngine::moveCursor() { - int cursorPos[8]; - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - - updateRefresh_pre(); - moveCharacters(); - updateRefresh(); - - if (!strcmp(textName, "hacker") && hasName == 1) { - if (_color != kColorRed && menuScreen == 0) - color_abc(kColorRed); - } else if (menuScreen == 0 && _color != kColorLightGreen) - color_abc(kColorLightGreen); - if (hasName == 1 && menuScreen == 0) - centerText(textName, mouseX, mouseY); - if (menuScreen == 1) - showMenu(); - else if (menuBar == 1) - clearMenu(); - - cursorPos[0] = 0; - cursorPos[1] = 0; - cursorPos[2] = mouseX - 20; - cursorPos[3] = mouseY - 17; - cursorPos[4] = OBJWIDTH; - cursorPos[5] = OBJHEIGHT; - copyRectClip(cursorPos, drawSurface3, screenSurface); -} - -void DrasculaEngine::checkObjects() { - int l, veo = 0; - - for (l = 0; l < numRoomObjs; l++) { - if (mouseX > x1[l] && mouseY > y1[l] - && mouseX < x2[l] && mouseY < y2[l] - && visible[l] == 1 && isDoor[l] == 0) { - strcpy(textName, objName[l]); - hasName = 1; - veo = 1; - } - } - - if (mouseX > curX + 2 && mouseY > curY + 2 - && mouseX < curX + curWidth - 2 && mouseY < curY + curHeight - 2) { - if (currentChapter == 2 || veo == 0) { - strcpy(textName, "hacker"); - hasName = 1; - veo = 1; - } - } - - if (veo == 0) - hasName = 0; -} - -void DrasculaEngine::selectVerbFromBar() { - for (int n = 0; n < 7; n++) { - if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1] && n > 0) { - selectVerb(n); - return; - } - } - - // no verb selected - withoutVerb(); -} - bool DrasculaEngine::verify1() { int l; @@ -1207,2287 +637,69 @@ void DrasculaEngine::updateEvents() { } } -void DrasculaEngine::selectVerb(int verbo) { - int c = (menuScreen == 1) ? 0 : 171; - - if (currentChapter == 5) { - if (takeObject == 1 && pickedObject != 16) - addObject(pickedObject); - } else { - if (takeObject == 1) - addObject(pickedObject); - } - - copyBackground(OBJWIDTH * verbo, c, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); - - takeObject = 1; - pickedObject = verbo; +void DrasculaEngine::delay(int ms) { + _system->delayMillis(ms * 2); // originaly was 1 } -void DrasculaEngine::updateVolume(Audio::Mixer::SoundType soundType, int prevVolume) { - int vol = _mixer->getVolumeForSoundType(soundType) / 16; - if (mouseY < prevVolume && vol < 15) - vol++; - if (mouseY > prevVolume && vol > 0) - vol--; - _mixer->setVolumeForSoundType(soundType, vol * 16); +void DrasculaEngine::pause(int duration) { + _system->delayMillis(duration * 30); // was originaly 2 } -void DrasculaEngine::volumeControls() { - int masterVolume, voiceVolume, musicVolume; - - copyRect(1, 56, 73, 63, 177, 97, tableSurface, screenSurface); - updateScreen(73, 63, 73, 63, 177, 97, screenSurface); - - masterVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4); - voiceVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4); - musicVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4); - - for (;;) { - updateRoom(); - - copyRect(1, 56, 73, 63, 177, 97, tableSurface, screenSurface); +int DrasculaEngine::getTime() { + return _system->getMillis() / 20; // originaly was 1 +} - copyBackground(183, 56, 82, masterVolume, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4), tableSurface, screenSurface); - copyBackground(183, 56, 138, voiceVolume, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4), tableSurface, screenSurface); - copyBackground(183, 56, 194, musicVolume, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4), tableSurface, screenSurface); +void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int width, int height, int factor, byte *dir_inicio, byte *dir_fin) { + float totalX, totalY; + int n, m; + float pixelX, pixelY; + int pixelPos[6]; - setCursorTable(); + newWidth = (width * factor) / 100; + newHeight = (height * factor) / 100; - updateScreen(); + totalX = width / newWidth; + totalY = height / newHeight; - updateEvents(); + pixelX = xx1; + pixelY = yy1; - if (rightMouseButton == 1) { - delay(100); - break; - } - if (leftMouseButton == 1) { - delay(100); - if (mouseX > 80 && mouseX < 121) { - updateVolume(Audio::Mixer::kPlainSoundType, mouseY); - masterVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4); - } + for (n = 0; n < newHeight; n++) { + for (m = 0; m < newWidth; m++) { + pixelPos[0] = (int)pixelX; + pixelPos[1] = (int)pixelY; + pixelPos[2] = xx2 + m; + pixelPos[3] = yy2 + n; + pixelPos[4] = 1; + pixelPos[5] = 1; - if (mouseX > 136 && mouseX < 178) { - updateVolume(Audio::Mixer::kSFXSoundType, mouseY); - voiceVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4); - } + copyRectClip(pixelPos, dir_inicio, dir_fin); - if (mouseX > 192 && mouseX < 233) { - updateVolume(Audio::Mixer::kMusicSoundType, mouseY); - musicVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4); - } + pixelX += totalX; } - + pixelX = xx1; + pixelY += totalY; } - - updateEvents(); } -bool DrasculaEngine::saveLoadScreen() { - char names[10][23]; - char file[50]; - char fileEpa[50]; - int n, n2, num_sav = 0, y = 27; - Common::InSaveFile *sav; - - clearRoom(); - - snprintf(fileEpa, 50, "%s.epa", _targetName.c_str()); - if (!(sav = _saveFileMan->openForLoading(fileEpa))) { - Common::OutSaveFile *epa; - if (!(epa = _saveFileMan->openForSaving(fileEpa))) - error("Can't open %s file", fileEpa); - for (n = 0; n < NUM_SAVES; n++) - epa->writeString("*\n"); - epa->finalize(); - delete epa; - if (!(sav = _saveFileMan->openForLoading(fileEpa))) { - error("Can't open %s file", fileEpa); - } - } - for (n = 0; n < NUM_SAVES; n++) - sav->readLine(names[n], 23); - delete sav; - - loadPic("savescr.alg", drawSurface1, HALF_PAL); - - color_abc(kColorLightGreen); +void DrasculaEngine::hipo_sin_nadie(int counter){ + int y = 0, trackCharacter = 0; + if (currentChapter == 3) + y = -1; - select[0] = 0; + do { + counter--; - for (;;) { - y = 27; copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - for (n = 0; n < NUM_SAVES; n++) { - print_abc(names[n], 116, y); - y = y + 9; - } - print_abc(select, 117, 15); - setCursorTable(); - updateScreen(); - y = 27; - - updateEvents(); + if (currentChapter == 3) + updateScreen(0, 0, 0, y, 320, 200, screenSurface); + else + updateScreen(0, 1, 0, y, 320, 198, screenSurface); - if (leftMouseButton == 1) { - delay(50); - for (n = 0; n < NUM_SAVES; n++) { - if (mouseX > 115 && mouseY > y + (9 * n) && mouseX < 115 + 175 && mouseY < y + 10 + (9 * n)) { - strcpy(select, names[n]); - - if (strcmp(select, "*")) - selectionMade = 1; - else { - enterName(); - strcpy(names[n], select); - if (selectionMade == 1) { - snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1); - saveGame(file); - Common::OutSaveFile *tsav; - if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { - error("Can't open %s file", fileEpa); - } - for (n = 0; n < NUM_SAVES; n++) { - tsav->writeString(names[n]); - tsav->writeString("\n"); - } - tsav->finalize(); - delete tsav; - } - } - - print_abc(select, 117, 15); - y = 27; - for (n2 = 0; n2 < NUM_SAVES; n2++) { - print_abc(names[n2], 116, y); - y = y + 9; - } - if (selectionMade == 1) { - snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1); - } - num_sav = n; - } - } - - if (mouseX > 117 && mouseY > 15 && mouseX < 295 && mouseY < 24 && selectionMade == 1) { - enterName(); - strcpy(names[num_sav], select); - print_abc(select, 117, 15); - y = 27; - for (n2 = 0; n2 < NUM_SAVES; n2++) { - print_abc(names[n2], 116, y); - y = y + 9; - } - } - - if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149 && selectionMade == 1) { - if (!loadGame(file)) - return false; - break; - } else if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149 && selectionMade == 1) { - saveGame(file); - Common::OutSaveFile *tsav; - if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { - error("Can't open %s file", fileEpa); - } - for (n = 0; n < NUM_SAVES; n++) { - tsav->writeString(names[n]); - tsav->writeString("\n"); - } - tsav->finalize(); - delete tsav; - } else if (mouseX > 168 && mouseY > 154 && mouseX < 242 && mouseY < 180) - break; - else if (selectionMade == 0) { - print_abc("Please select a slot", 117, 15); - } - updateScreen(); - delay(200); - } - y = 26; - - delay(5); - } - - clearRoom(); - loadPic(roomNumber, drawSurface1, HALF_PAL); - selectionMade = 0; - - return true; -} - -void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { - int textPos[8]; - int letterY = 0, letterX = 0, c, i; - uint len = strlen(said); - - for (uint h = 0; h < len; h++) { - c = toupper(said[h]); - - for (i = 0; i < CHARMAP_SIZE; i++) { - if (c == charMap[i].inChar) { - letterX = charMap[i].mappedChar; - - switch (charMap[i].charType) { - case 0: // letters - letterY = (_lang == kSpanish) ? 149 : 158; - break; - case 1: // signs - letterY = (_lang == kSpanish) ? 160 : 169; - break; - case 2: // accented - letterY = 180; - break; - } // switch - break; - } // if - } // for - - textPos[0] = letterX; - textPos[1] = letterY; - textPos[2] = screenX; - textPos[3] = screenY; - textPos[4] = CHAR_WIDTH; - textPos[5] = CHAR_HEIGHT; - - copyRectClip(textPos, textSurface, screenSurface); - - screenX = screenX + CHAR_WIDTH; - if (screenX > 317) { - screenX = 0; - screenY = screenY + CHAR_HEIGHT + 2; - } - } // for -} - -void DrasculaEngine::print_abc_opc(const char *said, int screenX, int screenY, int game) { - int textPos[6]; - int signY, letterY, letterX = 0; - uint len = strlen(said); - - for (uint h = 0; h < len; h++) { - if (game == 1) { - letterY = 6; - signY = 15; - } else if (game == 3) { - letterY = 56; - signY = 65; - } else { - letterY = 31; - signY = 40; - } - - int c = toupper(said[h]); - - // WORKAROUND: Even original did not process it correctly - // Fixes apostrophe rendering - if (_lang != kSpanish) - if (c == '\'') - c = '\244'; - - for (int i = 0; i < CHARMAP_SIZE; i++) { - if (c == charMap[i].inChar) { - // Convert the mapped char of the normal font to the - // mapped char of the dialogue font - - int multiplier = (charMap[i].mappedChar - 6) / 9; - - letterX = multiplier * 7 + 10; - - if (charMap[i].charType > 0) - letterY = signY; - break; - } // if - } // for - - textPos[0] = letterX; - textPos[1] = letterY; - textPos[2] = screenX; - textPos[3] = screenY; - textPos[4] = CHAR_WIDTH_OPC; - textPos[5] = CHAR_HEIGHT_OPC; - - copyRectClip(textPos, backSurface, screenSurface); - - screenX = screenX + CHAR_WIDTH_OPC; - } -} - -void DrasculaEngine::delay(int ms) { - _system->delayMillis(ms * 2); // originaly was 1 -} - -bool DrasculaEngine::confirmExit() { - byte key; - - color_abc(kColorRed); - updateRoom(); - centerText(_textsys[_lang][1], 160, 87); - updateScreen(); - - delay(100); - for (;;) { - key = getScan(); - if (key != 0) - break; - } - - if (key == Common::KEYCODE_ESCAPE) { - stopMusic(); - return false; - } - - return true; -} - -void DrasculaEngine::screenSaver() { - int xr, yr; - byte *copia, *ghost; - float coeff = 0, coeff2 = 0; - int count = 0; - int count2 = 0; - int tempLine[320]; - int tempRow[200]; - - clearRoom(); - - loadPic("sv.alg", drawSurface1, HALF_PAL); - - // inicio_ghost(); - copia = (byte *)malloc(64000); - ghost = (byte *)malloc(65536); - - // carga_ghost(); - _arj.open("ghost.drv"); - if (!_arj.isOpen()) - error("Cannot open file ghost.drv"); - - _arj.read(ghost, 65536); - _arj.close(); - - updateEvents(); - xr = mouseX; - yr = mouseY; - - for (;;) { - // efecto(drawSurface1); - - memcpy(copia, drawSurface1, 64000); - coeff += 0.1f; - coeff2 = coeff; - - if (++count > 319) - count = 0; - - for (int i = 0; i < 320; i++) { - tempLine[i] = (int)(sin(coeff2) * 16); - coeff2 += 0.02f; - tempLine[i] = checkWrapY(tempLine[i]); - } - - coeff2 = coeff; - for (int i = 0; i < 200; i++) { - tempRow[i] = (int)(sin(coeff2) * 16); - coeff2 += 0.02f; - tempRow[i] = checkWrapX(tempRow[i]); - } - - if (++count2 > 199) - count2 = 0; - - int x1_, y1_, off1, off2; - - for (int i = 0; i < 200; i++) { - for (int j = 0; j < 320; j++) { - x1_ = j + tempRow[i]; - x1_ = checkWrapX(x1_); - - y1_ = i + count2; - y1_ = checkWrapY(y1_); - - off1 = 320 * y1_ + x1_; - - x1_ = j + count; - x1_ = checkWrapX(x1_); - - y1_ = i + tempLine[j]; - y1_ = checkWrapY(y1_); - off2 = 320 * y1_ + x1_; - - VGA[320 * i + j] = ghost[drawSurface1[off2] + (copia[off1] << 8)]; - } - } - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - _system->updateScreen(); - - _system->delayMillis(20); - - // end of efecto() - - updateEvents(); - if (rightMouseButton == 1 || leftMouseButton == 1) - break; - if (mouseX != xr) - break; - if (mouseY != yr) - break; - } - // fin_ghost(); - free(copia); - free(ghost); - - loadPic(roomNumber, drawSurface1, HALF_PAL); -} - -void DrasculaEngine::playFLI(const char *filefli, int vel) { - // Open file - MiVideoSSN = (byte *)malloc(64256); - globalSpeed = 1000 / vel; - FrameSSN = 0; - UsingMem = 0; - if (MiVideoSSN == NULL) - return; - _arj.open(filefli); - mSession = TryInMem(); - LastFrame = _system->getMillis(); - - while (playFrameSSN() && (!term_int)) { - if (getScan() == Common::KEYCODE_ESCAPE) - term_int = 1; - } - - free(MiVideoSSN); - if (UsingMem) - free(pointer); - else - _arj.close(); -} - -void DrasculaEngine::fadeFromBlack(int fadeSpeed) { - char fade; - unsigned int color, component; - - DacPalette256 palFade; - - for (fade = 0; fade < 64; fade++) { - for (color = 0; color < 256; color++) { - for (component = 0; component < 3; component++) { - palFade[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fade); - } - } - pause(fadeSpeed); - - setPalette((byte *)&palFade); - } -} - -void DrasculaEngine::color_abc(int cl) { - _color = cl; - - char colorTable[][3] = { - { 0, 0, 0 }, { 0x10, 0x3E, 0x28 }, - { 0, 0, 0 }, // unused - { 0x16, 0x3F, 0x16 }, { 0x09, 0x3F, 0x12 }, - { 0x3F, 0x3F, 0x15 }, - { 0, 0, 0 }, // unused - { 0x38, 0, 0 }, { 0x3F, 0x27, 0x0B }, - { 0x2A, 0, 0x2A }, { 0x30, 0x30, 0x30 }, - { 98, 91, 100 } - }; - - for (int i = 0; i <= 2; i++) - gamePalette[254][i] = colorTable[cl][i]; - - setPalette((byte *)&gamePalette); -} - -char DrasculaEngine::adjustToVGA(char value) { - return (value & 0x3F) * (value > 0); -} - -void DrasculaEngine::centerText(const char *message, int textX, int textY) { - char bb[200], m2[200], m1[200], mb[10][50]; - char m3[200]; - int h, fil, textX3, textX2, textX1, conta_f = 0, ya = 0; - - strcpy(m1, " "); - strcpy(m2, " "); - strcpy(m3, " "); - strcpy(bb, " "); - - for (h = 0; h < 10; h++) - strcpy(mb[h], " "); - - if (textX > 160) - ya = 1; - - strcpy(m1, message); - textX = CLIP(textX, 60, 255); - - textX1 = textX; - - if (ya == 1) - textX1 = 315 - textX; - - textX2 = (strlen(m1) / 2) * CHAR_WIDTH; - - while (true) { - strcpy(bb, m1); - scumm_strrev(bb); - - if (textX1 < textX2) { - strcpy(m3, strrchr(m1, ' ')); - strcpy(m1, strstr(bb, " ")); - scumm_strrev(m1); - m1[strlen(m1) - 1] = '\0'; - strcat(m3, m2); - strcpy(m2, m3); - }; - - textX2 = (strlen(m1) / 2) * CHAR_WIDTH; - - if (textX1 < textX2) - continue; - - strcpy(mb[conta_f], m1); - - if (!strcmp(m2, "")) - break; - - scumm_strrev(m2); - m2[strlen(m2) - 1] = '\0'; - scumm_strrev(m2); - strcpy(m1, m2); - strcpy(m2, ""); - conta_f++; - } - - fil = textY - (((conta_f + 3) * CHAR_HEIGHT)); - - for (h = 0; h < conta_f + 1; h++) { - textX3 = strlen(mb[h]) / 2; - print_abc(mb[h], ((textX) - textX3 * CHAR_WIDTH) - 1, fil); - fil = fil + CHAR_HEIGHT + 2; - } -} - -void DrasculaEngine::playSound(int soundNum) { - char file[20]; - sprintf(file, "s%i.als", soundNum); - - playFile(file); -} - -bool DrasculaEngine::animate(const char *animationFile, int FPS) { - unsigned j; - int NFrames = 1; - int cnt = 2; - int dataSize = 0; - - AuxBuffDes = (byte *)malloc(65000); - - _arj.open(animationFile); - - if (!_arj.isOpen()) { - error("Animation file %s not found", animationFile); - } - - NFrames = _arj.readSint32LE(); - dataSize = _arj.readSint32LE(); - AuxBuffOrg = (byte *)malloc(dataSize); - _arj.read(AuxBuffOrg, dataSize); - _arj.read(cPal, 768); - loadPCX(AuxBuffOrg); - free(AuxBuffOrg); - memcpy(VGA, AuxBuffDes, 64000); - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - _system->updateScreen(); - setPalette(cPal); - WaitForNext(FPS); - while (cnt < NFrames) { - dataSize = _arj.readSint32LE(); - AuxBuffOrg = (byte *)malloc(dataSize); - _arj.read(AuxBuffOrg, dataSize); - _arj.read(cPal, 768); - loadPCX(AuxBuffOrg); - free(AuxBuffOrg); - for (j = 0;j < 64000; j++) { - VGA[j] = AuxBuffDes[j] ^ VGA[j]; - } - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - _system->updateScreen(); - WaitForNext(FPS); - cnt++; - byte key = getScan(); - if (key == Common::KEYCODE_ESCAPE) - term_int = 1; - if (key != 0) - break; - } - free(AuxBuffDes); - _arj.close(); - - return ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)); -} - -void DrasculaEngine::fadeToBlack(int fadeSpeed) { - char fade; - unsigned int color, component; - - DacPalette256 palFade; - - for (fade = 63; fade >= 0; fade--) { - for (color = 0; color < 256; color++) { - for (component = 0; component < 3; component++) { - palFade[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fade); - } - } - pause(fadeSpeed); - - setPalette((byte *)&palFade); - } -} - -void DrasculaEngine::pause(int duration) { - _system->delayMillis(duration * 30); // was originaly 2 -} - -void DrasculaEngine::placeIgor() { - int pos_igor[6]; - - pos_igor[0] = 1; - if (currentChapter == 4) { - pos_igor[1] = 138; - } else { - if (trackIgor == 3) - pos_igor[1] = 138; - else if (trackIgor == 1) - pos_igor[1] = 76; - } - pos_igor[2] = igorX; - pos_igor[3] = igorY; - pos_igor[4] = 54; - pos_igor[5] = 61; - - copyRectClip(pos_igor, frontSurface, screenSurface); -} - -void DrasculaEngine::placeDrascula() { - int pos_dr[6]; - - if (trackDrascula == 1) - pos_dr[0] = 47; - else if (trackDrascula == 0) - pos_dr[0] = 1; - else if (trackDrascula == 3 && currentChapter == 1) - pos_dr[0] = 93; - pos_dr[1] = 122; - pos_dr[2] = drasculaX; - pos_dr[3] = drasculaY; - pos_dr[4] = 45; - pos_dr[5] = 77; - - if (currentChapter == 6) - copyRectClip(pos_dr, drawSurface2, screenSurface); - else - copyRectClip(pos_dr, backSurface, screenSurface); -} - -void DrasculaEngine::placeBJ() { - int pos_bj[6]; - - if (trackBJ == 3) - pos_bj[0] = 10; - else if (trackBJ == 0) - pos_bj[0] = 37; - pos_bj[1] = 99; - pos_bj[2] = bjX; - pos_bj[3] = bjY; - pos_bj[4] = 26; - pos_bj[5] = 76; - - copyRectClip(pos_bj, drawSurface3, screenSurface); -} - -void DrasculaEngine::hiccup(int counter) { - int y = 0, trackCharacter = 0; - if (currentChapter == 3) - y = -1; - - do { - counter--; - - updateRoom(); - if (currentChapter == 3) - updateScreen(0, 0, 0, y, 320, 200, screenSurface); - else - updateScreen(0, 1, 0, y, 320, 198, screenSurface); - - if (trackCharacter == 0) - y++; - else - y--; - - if (currentChapter == 3) { - if (y == 1) - trackCharacter = 1; - if (y == -1) - trackCharacter = 0; - } else { - if (y == 2) - trackCharacter = 1; - if (y == 0) - trackCharacter = 0; - } - } while (counter > 0); - - updateRoom(); - updateScreen(); -} - -void DrasculaEngine::finishSound() { - delay(1); - - while (soundIsActive()) - _system->delayMillis(10); -} - -void DrasculaEngine::playMusic(int p) { - AudioCD.stop(); - AudioCD.play(p - 1, 1, 0, 0); -} - -void DrasculaEngine::stopMusic() { - AudioCD.stop(); -} - -int DrasculaEngine::musicStatus() { - return AudioCD.isPlaying(); -} - -void DrasculaEngine::updateRoom() { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - updateRefresh_pre(); - if (currentChapter == 3) { - if (flags[0] == 0) - moveCharacters(); - else - copyRect(113, 54, curX - 20, curY - 1, 77, 89, drawSurface3, screenSurface); - } else { - moveCharacters(); - } - updateRefresh(); -} - -bool DrasculaEngine::loadGame(const char *gameName) { - int l, savedChapter, roomNum = 0; - Common::InSaveFile *sav; - - previousMusic = roomMusic; - menuScreen = 0; - if (currentChapter != 1) - clearRoom(); - - if (!(sav = _saveFileMan->openForLoading(gameName))) { - error("missing savegame file"); - } - - savedChapter = sav->readSint32LE(); - if (savedChapter != currentChapter) { - strcpy(saveName, gameName); - currentChapter = savedChapter - 1; - hay_que_load = 1; - return false; - } - sav->read(currentData, 20); - curX = sav->readSint32LE(); - curY = sav->readSint32LE(); - trackProtagonist = sav->readSint32LE(); - - for (l = 1; l < 43; l++) { - inventoryObjects[l] = sav->readSint32LE(); - } - - for (l = 0; l < NUM_FLAGS; l++) { - flags[l] = sav->readSint32LE(); - } - - takeObject = sav->readSint32LE(); - pickedObject = sav->readSint32LE(); - hay_que_load = 0; - sscanf(currentData, "%d.ald", &roomNum); - enterRoom(roomNum); - withoutVerb(); - - return true; -} - -void DrasculaEngine::updateDoor(int doorNum) { - if (currentChapter == 1 || currentChapter == 3 || currentChapter == 5 || currentChapter == 6) - return; - else if (currentChapter == 2) { - if (objectNum[doorNum] == 138) - isDoor[doorNum] = flags[0]; - else if (objectNum[doorNum] == 136) - isDoor[doorNum] = flags[8]; - else if (objectNum[doorNum] == 156) - isDoor[doorNum] = flags[16]; - else if (objectNum[doorNum] == 163) - isDoor[doorNum] = flags[17]; - else if (objectNum[doorNum] == 177) - isDoor[doorNum] = flags[15]; - else if (objectNum[doorNum] == 175) - isDoor[doorNum] = flags[40]; - else if (objectNum[doorNum] == 173) - isDoor[doorNum] = flags[36]; - } else if (currentChapter == 4) { - if (objectNum[doorNum] == 101 && flags[0] == 0) - isDoor[doorNum] = 0; - else if (objectNum[doorNum] == 101 && flags[0] == 1 && flags[28] == 1) - isDoor[doorNum] = 1; - else if (objectNum[doorNum] == 103) - isDoor[doorNum] = flags[0]; - else if (objectNum[doorNum] == 104) - isDoor[doorNum] = flags[1]; - else if (objectNum[doorNum] == 105) - isDoor[doorNum] = flags[1]; - else if (objectNum[doorNum] == 106) - isDoor[doorNum] = flags[2]; - else if (objectNum[doorNum] == 107) - isDoor[doorNum] = flags[2]; - else if (objectNum[doorNum] == 110) - isDoor[doorNum] = flags[6]; - else if (objectNum[doorNum] == 114) - isDoor[doorNum] = flags[4]; - else if (objectNum[doorNum] == 115) - isDoor[doorNum] = flags[4]; - else if (objectNum[doorNum] == 116 && flags[5] == 0) - isDoor[doorNum] = 0; - else if (objectNum[doorNum] == 116 && flags[5] == 1 && flags[23] == 1) - isDoor[doorNum] = 1; - else if (objectNum[doorNum] == 117) - isDoor[doorNum] = flags[5]; - else if (objectNum[doorNum] == 120) - isDoor[doorNum] = flags[8]; - else if (objectNum[doorNum] == 122) - isDoor[doorNum] = flags[7]; - } -} - -void DrasculaEngine::assignDefaultPalette() { - int color, component; - - for (color = 235; color < 253; color++) - for (component = 0; component < 3; component++) - defaultPalette[color][component] = gamePalette[color][component]; -} - -void DrasculaEngine::assignBrightPalette() { - int color, component; - - for (color = 235; color < 253; color++) { - for (component = 0; component < 3; component++) - brightPalette[color][component] = gamePalette[color][component]; - } -} - -void DrasculaEngine::assignDarkPalette() { - int color, component; - - for (color = 235; color < 253; color++) { - for (component = 0; component < 3; component++) - darkPalette[color][component] = gamePalette[color][component]; - } -} - -void DrasculaEngine::setDefaultPalette() { - int color, component; - - for (color = 235; color < 253; color++) { - for (component = 0; component < 3; component++) { - gamePalette[color][component] = defaultPalette[color][component]; - } - } - setPalette((byte *)&gamePalette); -} - -void DrasculaEngine::setBrightPalette() { - int color, component; - - for (color = 235; color < 253; color++) { - for (component = 0; component < 3; component++) - gamePalette[color][component] = brightPalette[color][component]; - } - - setPalette((byte *)&gamePalette); -} - -void DrasculaEngine::setDarkPalette() { - int color, component; - - for (color = 235; color < 253; color++ ) - for (component = 0; component < 3; component++) - gamePalette[color][component] = darkPalette[color][component]; - - setPalette((byte *)&gamePalette); -} - -void DrasculaEngine::setPaletteBase(int darkness) { - char fade; - unsigned int color, component; - - for (fade = darkness; fade >= 0; fade--) { - for (color = 235; color < 253; color++) { - for (component = 0; component < 3; component++) - gamePalette[color][component] = adjustToVGA(gamePalette[color][component] - 8 + fade); - } - } - - setPalette((byte *)&gamePalette); -} - -void DrasculaEngine::startWalking() { - characterMoved = 1; - - stepX = STEP_X; - stepY = STEP_Y; - - if (currentChapter == 2) { - if ((roomX < curX) && (roomY <= (curY + curHeight))) - quadrant_1(); - else if ((roomX < curX) && (roomY > (curY + curHeight))) - quadrant_3(); - else if ((roomX > curX + curWidth) && (roomY <= (curY + curHeight))) - quadrant_2(); - else if ((roomX > curX + curWidth) && (roomY > (curY + curHeight))) - quadrant_4(); - else if (roomY < curY + curHeight) - walkUp(); - else if (roomY > curY + curHeight) - walkDown(); - } else { - if ((roomX < curX + curWidth / 2 ) && (roomY <= (curY + curHeight))) - quadrant_1(); - else if ((roomX < curX + curWidth / 2) && (roomY > (curY + curHeight))) - quadrant_3(); - else if ((roomX > curX + curWidth / 2) && (roomY <= (curY + curHeight))) - quadrant_2(); - else if ((roomX > curX + curWidth / 2) && (roomY > (curY + curHeight))) - quadrant_4(); - else - characterMoved = 0; - } - startTime = getTime(); -} - -void DrasculaEngine::moveCharacters() { - int curPos[6]; - int r; - - if (characterMoved == 1 && stepX == STEP_X) { - for (r = 0; r < stepX; r++) { - if (currentChapter != 2) { - if (trackProtagonist == 0 && roomX - r == curX + curWidth / 2) { - characterMoved = 0; - stepX = STEP_X; - stepY = STEP_Y; - } - if (trackProtagonist == 1 && roomX + r == curX + curWidth / 2) { - characterMoved = 0; - stepX = STEP_X; - stepY = STEP_Y; - curX = roomX - curWidth / 2; - curY = roomY - curHeight; - } - } else if (currentChapter == 2) { - if (trackProtagonist == 0 && roomX - r == curX) { - characterMoved = 0; - stepX = STEP_X; - stepY = STEP_Y; - } - if (trackProtagonist == 1 && roomX + r == curX + curWidth) { - characterMoved = 0; - stepX = STEP_X; - stepY = STEP_Y; - curX = roomX - curWidth + 4; - curY = roomY - curHeight; - } - } - } - } - if (characterMoved == 1 && stepY == STEP_Y) { - for (r = 0; r < stepY; r++) { - if (trackProtagonist == 2 && roomY - r == curY + curHeight) { - characterMoved = 0; - stepX = STEP_X; - stepY = STEP_Y; - } - if (trackProtagonist == 3 && roomY + r == curY + curHeight) { - characterMoved = 0; - stepX = STEP_X; - stepY = STEP_Y; - } - } - } - - if (currentChapter == 1 || currentChapter == 4 || currentChapter == 5 || currentChapter == 6) { - if (hare_se_ve == 0) { - increaseFrameNum(); - return; - } - } - - if (characterMoved == 0) { - curPos[0] = 0; - curPos[1] = DIF_MASK_HARE; - curPos[2] = curX; - curPos[3] = curY; - if (currentChapter == 2) { - curPos[4] = curWidth; - curPos[5] = curHeight; - } else { - curPos[4] = CHARACTER_WIDTH; - curPos[5] = CHARACTER_HEIGHT; - } - - if (trackProtagonist == 0) { - curPos[1] = 0; - if (currentChapter == 2) - copyRectClip(curPos, extraSurface, screenSurface); - else - reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], - factor_red[curY + curHeight], extraSurface, screenSurface); - } else if (trackProtagonist == 1) { - if (currentChapter == 2) - copyRectClip(curPos, extraSurface, screenSurface); - else - reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], - factor_red[curY + curHeight], extraSurface, screenSurface); - } else if (trackProtagonist == 2) { - if (currentChapter == 2) - copyRectClip(curPos, backSurface, screenSurface); - else - reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], - factor_red[curY + curHeight], backSurface, screenSurface); - } else { - if (currentChapter == 2) - copyRectClip(curPos, frontSurface, screenSurface); - else - reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], - factor_red[curY + curHeight], frontSurface, screenSurface); - } - } else if (characterMoved == 1) { - curPos[0] = frameX[num_frame]; - curPos[1] = frame_y + DIF_MASK_HARE; - curPos[2] = curX; - curPos[3] = curY; - if (currentChapter == 2) { - curPos[4] = curWidth; - curPos[5] = curHeight; - } else { - curPos[4] = CHARACTER_WIDTH; - curPos[5] = CHARACTER_HEIGHT; - } - if (trackProtagonist == 0) { - curPos[1] = 0; - if (currentChapter == 2) - copyRectClip(curPos, extraSurface, screenSurface); - else - reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], - factor_red[curY + curHeight], extraSurface, screenSurface); - } else if (trackProtagonist == 1) { - if (currentChapter == 2) - copyRectClip(curPos, extraSurface, screenSurface); - else - reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], - factor_red[curY + curHeight], extraSurface, screenSurface); - } else if (trackProtagonist == 2) { - if (currentChapter == 2) - copyRectClip(curPos, backSurface, screenSurface); - else - reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], - factor_red[curY + curHeight], backSurface, screenSurface); - } else { - if (currentChapter == 2) - copyRectClip(curPos, frontSurface, screenSurface); - else - reduce_hare_chico(curPos[0], curPos[1], curPos[2], curPos[3], curPos[4], curPos[5], - factor_red[curY + curHeight], frontSurface, screenSurface); - } - increaseFrameNum(); - } -} - -void DrasculaEngine::showMenu() { - int h, n, x; - char textIcon[13]; - - x = whichObject(); - strcpy(textIcon, iconName[x]); - - for (n = 1; n < 43; n++) { - h = inventoryObjects[n]; - - if (h != 0) { - if (currentChapter == 6) - copyBackground(x_pol[n], y_pol[n], itemLocations[n].x, itemLocations[n].y, - OBJWIDTH, OBJHEIGHT, tableSurface, screenSurface); - else - copyBackground(x_pol[n], y_pol[n], itemLocations[n].x, itemLocations[n].y, - OBJWIDTH, OBJHEIGHT, frontSurface, screenSurface); - } - copyRect(x1d_menu[h], y1d_menu[h], itemLocations[n].x, itemLocations[n].y, - OBJWIDTH, OBJHEIGHT, backSurface, screenSurface); - } - - if (x < 7) - print_abc(textIcon, itemLocations[x].x - 2, itemLocations[x].y - 7); -} - -void DrasculaEngine::clearMenu() { - int n, verbActivated = 1; - - for (n = 0; n < 7; n++) { - if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1]) - verbActivated = 0; - copyRect(OBJWIDTH * n, OBJHEIGHT * verbActivated, verbBarX[n], 2, - OBJWIDTH, OBJHEIGHT, backSurface, screenSurface); - verbActivated = 1; - } -} - -void DrasculaEngine::removeObject() { - int h = 0, n; - - updateRoom(); - - for (n = 1; n < 43; n++){ - if (whichObject() == n) { - h = inventoryObjects[n]; - inventoryObjects[n] = 0; - if (h != 0) - takeObject = 1; - } - } - - updateEvents(); - - if (takeObject == 1) - chooseObject(h); -} - -bool DrasculaEngine::exitRoom(int l) { - debug(2, "Exiting room from door %d", l); - - int roomNum = 0; - - if (currentChapter == 1) { - if (objectNum[l] == 105 && flags[0] == 0) - talk(442); - else { - updateDoor(l); - if (isDoor[l] != 0) { - gotoObject(roomObjX[l], roomObjY[l]); - trackProtagonist = trackObj[l]; - updateRoom(); - updateScreen(); - characterMoved = 0; - trackProtagonist = trackCharacter_alkeva[l]; - objExit = alapuertakeva[l]; - doBreak = 1; - previousMusic = roomMusic; - - if (objectNum[l] == 105) { - animation_2_1(); - return true; - } - clearRoom(); - sscanf(_targetSurface[l], "%d", &roomNum); - curX = -1; - enterRoom(roomNum); - } - } - } else if (currentChapter == 2) { - updateDoor(l); - if (isDoor[l] != 0) { - gotoObject(roomObjX[l], roomObjY[l]); - characterMoved = 0; - trackProtagonist = trackCharacter_alkeva[l]; - objExit = alapuertakeva[l]; - doBreak = 1; - previousMusic = roomMusic; - if (objectNum[l] == 136) - animation_2_2(); - if (objectNum[l] == 124) - animation_3_2(); - if (objectNum[l] == 173) { - animation_35_2(); - return true; - } if (objectNum[l] == 146 && flags[39] == 1) { - flags[5] = 1; - flags[11] = 1; - } - if (objectNum[l] == 176 && flags[29] == 1) { - flags[29] = 0; - removeObject(kItemEarWithEarPlug); - addObject(kItemEarplugs); - } - clearRoom(); - sscanf(_targetSurface[l], "%d", &roomNum); - curX =- 1; - enterRoom(roomNum); - } - } else if (currentChapter == 3) { - updateDoor(l); - if (isDoor[l] != 0 && visible[l] == 1) { - gotoObject(roomObjX[l], roomObjY[l]); - trackProtagonist = trackObj[l]; - updateRoom(); - updateScreen(); - characterMoved = 0; - trackProtagonist = trackCharacter_alkeva[l]; - objExit = alapuertakeva[l]; - doBreak = 1; - previousMusic = roomMusic; - clearRoom(); - sscanf(_targetSurface[l], "%d", &roomNum); - curX =- 1; - enterRoom(roomNum); - } - } else if (currentChapter == 4) { - updateDoor(l); - if (isDoor[l] != 0) { - gotoObject(roomObjX[l], roomObjY[l]); - trackProtagonist = trackObj[l]; - updateRoom(); - updateScreen(); - characterMoved = 0; - trackProtagonist = trackCharacter_alkeva[l]; - objExit = alapuertakeva[l]; - doBreak = 1; - previousMusic = roomMusic; - - if (objectNum[l] == 108) - gotoObject(171, 78); - clearRoom(); - sscanf(_targetSurface[l], "%d", &roomNum); - curX = -1; - enterRoom(roomNum); - } - } else if (currentChapter == 5) { - updateDoor(l); - if (isDoor[l] != 0 && visible[l] == 1) { - gotoObject(roomObjX[l], roomObjY[l]); - trackProtagonist = trackObj[l]; - updateRoom(); - updateScreen(); - characterMoved = 0; - trackProtagonist = trackCharacter_alkeva[l]; - objExit = alapuertakeva[l]; - doBreak = 1; - previousMusic = roomMusic; - hare_se_ve = 1; - clearRoom(); - sscanf(_targetSurface[l], "%d", &roomNum); - curX = -1; - enterRoom(roomNum); - } - } else if (currentChapter == 6) { - updateDoor(l); - if (isDoor[l] != 0) { - gotoObject(roomObjX[l], roomObjY[l]); - trackProtagonist = trackObj[l]; - updateRoom(); - updateScreen(); - characterMoved = 0; - trackProtagonist = trackCharacter_alkeva[l]; - objExit = alapuertakeva[l]; - doBreak = 1; - previousMusic = roomMusic; - clearRoom(); - sscanf(_targetSurface[l], "%d", &roomNum); - curX = -1; - enterRoom(roomNum); - - if (objExit == 105) - animation_19_6(); - } - } - - return false; -} - -bool DrasculaEngine::pickupObject() { - int h = pickedObject; - checkFlags = 1; - - updateRoom(); - showMenu(); - updateScreen(); - - // Objects with an ID smaller than 7 are the inventory verbs - if (pickedObject >= 7) { - for (int n = 1; n < 43; n++) { - if (whichObject() == n && inventoryObjects[n] == 0) { - inventoryObjects[n] = h; - takeObject = 0; - checkFlags = 0; - } - } - } - - if (checkFlags == 1) { - if (checkMenuFlags()) - return true; - } - updateEvents(); - if (takeObject == 0) - withoutVerb(); - - return false; -} - -void DrasculaEngine::setCursorTable() { - int cursorPos[8]; - - cursorPos[0] = 225; - cursorPos[1] = 56; - cursorPos[2] = mouseX - 20; - cursorPos[3] = mouseY - 12; - cursorPos[4] = 40; - cursorPos[5] = 25; - - copyRectClip(cursorPos, tableSurface, screenSurface); -} - -void DrasculaEngine::enterName() { - Common::KeyCode key; - int v = 0, h = 0; - char select2[23]; - strcpy(select2, " "); - for (;;) { - select2[v] = '-'; - copyBackground(115, 14, 115, 14, 176, 9, drawSurface1, screenSurface); - print_abc(select2, 117, 15); - updateScreen(); - key = getScan(); - delay(70); - if (key != 0) { - if (key >= 0 && key <= 0xFF && isalpha(key)) - select2[v] = tolower(key); - else if ((key == Common::KEYCODE_LCTRL) || (key == Common::KEYCODE_RCTRL)) - select2[v] = '\164'; - else if (key >= Common::KEYCODE_0 && key <= Common::KEYCODE_9) - select2[v] = key; - else if (key == Common::KEYCODE_SPACE) - select2[v] = '\167'; - else if (key == Common::KEYCODE_ESCAPE) - break; - else if (key == Common::KEYCODE_RETURN) { - select2[v] = '\0'; - h = 1; - break; - } else if (key == Common::KEYCODE_BACKSPACE) - select2[v] = '\0'; - else - v--; - - if (key == Common::KEYCODE_BACKSPACE) - v--; - else - v++; - } - if (v == 22) - v = 21; - else if (v == -1) - v = 0; - } - if (h == 1) { - strcpy(select, select2); - selectionMade = 1; - } -} - -int DrasculaEngine::playFrameSSN() { - int Exit = 0; - uint32 Lengt; - byte *BufferSSN; - - if (!UsingMem) - _arj.read(&CHUNK, 1); - else { - memcpy(&CHUNK, mSession, 1); - mSession += 1; - } - - switch (CHUNK) { - case kFrameSetPal: - if (!UsingMem) - _arj.read(dacSSN, 768); - else { - memcpy(dacSSN, mSession, 768); - mSession += 768; - } - setPalette(dacSSN); - break; - case kFrameEmptyFrame: - WaitFrameSSN(); - break; - case kFrameInit: - if (!UsingMem) { - CMP = _arj.readByte(); - Lengt = _arj.readUint32LE(); - } else { - memcpy(&CMP, mSession, 1); - mSession += 1; - Lengt = READ_LE_UINT32(mSession); - mSession += 4; - } - if (CMP == kFrameCmpRle) { - if (!UsingMem) { - BufferSSN = (byte *)malloc(Lengt); - _arj.read(BufferSSN, Lengt); - } else { - BufferSSN = (byte *)malloc(Lengt); - memcpy(BufferSSN, mSession, Lengt); - mSession += Lengt; - } - Des_RLE(BufferSSN, MiVideoSSN); - free(BufferSSN); - if (FrameSSN) { - WaitFrameSSN(); - MixVideo(VGA, MiVideoSSN); - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - } else { - WaitFrameSSN(); - memcpy(VGA, MiVideoSSN, 64000); - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - } - _system->updateScreen(); - FrameSSN++; - } else { - if (CMP == kFrameCmpOff) { - if (!UsingMem) { - BufferSSN = (byte *)malloc(Lengt); - _arj.read(BufferSSN, Lengt); - } else { - BufferSSN = (byte *)malloc(Lengt); - memcpy(BufferSSN, mSession, Lengt); - mSession += Lengt; - } - Des_OFF(BufferSSN, MiVideoSSN, Lengt); - free(BufferSSN); - if (FrameSSN) { - WaitFrameSSN(); - MixVideo(VGA, MiVideoSSN); - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - } else { - WaitFrameSSN(); - memcpy(VGA, MiVideoSSN, 64000); - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - } - _system->updateScreen(); - FrameSSN++; - } - } - break; - case kFrameEndAnim: - Exit = 1; - break; - default: - Exit = 1; - break; - } - - return (!Exit); -} - -byte *DrasculaEngine::TryInMem() { - int Lengt; - - _arj.seek(0, SEEK_END); - Lengt = _arj.pos(); - _arj.seek(0, SEEK_SET); - pointer = (byte *)malloc(Lengt); - if (pointer == NULL) - return NULL; - _arj.read(pointer, Lengt); - UsingMem = 1; - _arj.close(); - - return pointer; -} - -void DrasculaEngine::Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght) { - int x = 0; - unsigned char Reps; - int Offset; - - memset(MiVideoSSN, 0, 64000); - while (x < Lenght) { - Offset = BufferOFF[x] + BufferOFF[x + 1] * 256; - Reps = BufferOFF[x + 2]; - memcpy(MiVideoOFF + Offset, &BufferOFF[x + 3], Reps); - x += 3 + Reps; - } -} - -void DrasculaEngine::Des_RLE(byte *BufferRLE, byte *MiVideoRLE) { - signed int con = 0; - unsigned int X = 0; - unsigned int fExit = 0; - char ch, rep; - while (!fExit) { - ch = *BufferRLE++; - rep = 1; - if ((ch & 192) == 192) { - rep = (ch & 63); - ch =* BufferRLE++; - } - for (con = 0; con < rep; con++) { - *MiVideoRLE++ = ch; - X++; - if (X > 64000) - fExit = 1; - } - } -} - -void DrasculaEngine::MixVideo(byte *OldScreen, byte *NewScreen) { - for (int x = 0; x < 64000; x++) - OldScreen[x] ^= NewScreen[x]; -} - -void DrasculaEngine::WaitFrameSSN() { - uint32 now; - while ((now = _system->getMillis()) - LastFrame < ((uint32) globalSpeed)) - _system->delayMillis(globalSpeed - (now - LastFrame)); - LastFrame = LastFrame + globalSpeed; -} - -byte *DrasculaEngine::loadPCX(byte *NamePcc) { - signed int con = 0; - unsigned int X = 0; - unsigned int fExit = 0; - char ch, rep; - byte *AuxPun = AuxBuffDes; - - while (!fExit) { - ch = *NamePcc++; - rep = 1; - if ((ch & 192) == 192) { - rep = (ch & 63); - ch = *NamePcc++; - } - for (con = 0; con< rep; con++) { - *AuxPun++ = ch; - X++; - if (X > 64000) - fExit = 1; - } - } - return AuxBuffDes; -} - -void DrasculaEngine::WaitForNext(int FPS) { - _system->delayMillis(1000 / FPS); -} - -int DrasculaEngine::getTime() { - return _system->getMillis() / 20; // originaly was 1 -} - -void DrasculaEngine::reduce_hare_chico(int xx1, int yy1, int xx2, int yy2, int width, int height, int factor, byte *dir_inicio, byte *dir_fin) { - float totalX, totalY; - int n, m; - float pixelX, pixelY; - int pixelPos[6]; - - newWidth = (width * factor) / 100; - newHeight = (height * factor) / 100; - - totalX = width / newWidth; - totalY = height / newHeight; - - pixelX = xx1; - pixelY = yy1; - - for (n = 0; n < newHeight; n++) { - for (m = 0; m < newWidth; m++) { - pixelPos[0] = (int)pixelX; - pixelPos[1] = (int)pixelY; - pixelPos[2] = xx2 + m; - pixelPos[3] = yy2 + n; - pixelPos[4] = 1; - pixelPos[5] = 1; - - copyRectClip(pixelPos, dir_inicio, dir_fin); - - pixelX += totalX; - } - pixelX = xx1; - pixelY += totalY; - } -} - -void DrasculaEngine::quadrant_1() { - float distanceX, distanceY; - - if (currentChapter == 2) - distanceX = curX - roomX; - else - distanceX = curX + curWidth / 2 - roomX; - - distanceY = (curY + curHeight) - roomY; - - if (distanceX < distanceY) { - curDirection = 0; - trackProtagonist = 2; - stepX = (int)(distanceX / (distanceY / STEP_Y)); - } else { - curDirection = 7; - trackProtagonist = 0; - stepY = (int)(distanceY / (distanceX / STEP_X)); - } -} - -void DrasculaEngine::quadrant_2() { - float distanceX, distanceY; - - if (currentChapter == 2) - distanceX = abs(curX + curWidth - roomX); - else - distanceX = abs(curX + curWidth / 2 - roomX); - - distanceY = (curY + curHeight) - roomY; - - if (distanceX < distanceY) { - curDirection = 1; - trackProtagonist = 2; - stepX = (int)(distanceX / (distanceY / STEP_Y)); - } else { - curDirection = 2; - trackProtagonist = 1; - stepY = (int)(distanceY / (distanceX / STEP_X)); - } -} - -void DrasculaEngine::quadrant_3() { - float distanceX, distanceY; - - if (currentChapter == 2) - distanceX = curX - roomX; - else - distanceX = curX + curWidth / 2 - roomX; - - distanceY = roomY - (curY + curHeight); - - if (distanceX < distanceY) { - curDirection = 5; - trackProtagonist = 3; - stepX = (int)(distanceX / (distanceY / STEP_Y)); - } else { - curDirection = 6; - trackProtagonist = 0; - stepY = (int)(distanceY / (distanceX / STEP_X)); - } -} - -void DrasculaEngine::quadrant_4() { - float distanceX, distanceY; - - if (currentChapter == 2) - distanceX = abs(curX + curWidth - roomX); - else - distanceX = abs(curX + curWidth / 2 - roomX); - - distanceY = roomY - (curY + curHeight); - - if (distanceX < distanceY) { - curDirection = 4; - trackProtagonist = 3; - stepX = (int)(distanceX / (distanceY / STEP_Y)); - } else { - curDirection = 3; - trackProtagonist = 1; - stepY = (int)(distanceY / (distanceX / STEP_X)); - } -} - -void DrasculaEngine::saveGame(char gameName[]) { - Common::OutSaveFile *out; - int l; - - if (!(out = _saveFileMan->openForSaving(gameName))) { - error("Unable to open the file"); - } - out->writeSint32LE(currentChapter); - out->write(currentData, 20); - out->writeSint32LE(curX); - out->writeSint32LE(curY); - out->writeSint32LE(trackProtagonist); - - for (l = 1; l < 43; l++) { - out->writeSint32LE(inventoryObjects[l]); - } - - for (l = 0; l < NUM_FLAGS; l++) { - out->writeSint32LE(flags[l]); - } - - out->writeSint32LE(takeObject); - out->writeSint32LE(pickedObject); - - out->finalize(); - if (out->ioFailed()) - warning("Can't write file '%s'. (Disk full?)", gameName); - - delete out; - - playSound(99); - finishSound(); -} - -void DrasculaEngine::increaseFrameNum() { - timeDiff = getTime() - startTime; - - if (timeDiff >= 6) { - startTime = getTime(); - num_frame++; - if (num_frame == 6) - num_frame = 0; - - if (curDirection == 0 || curDirection == 7) { - curX -= stepX; - curY -= stepY; - } else if (curDirection == 1 || curDirection == 2) { - curX += stepX; - curY -= stepY; - } else if (curDirection == 3 || curDirection == 4) { - curX += stepX; - curY += stepY; - } else if (curDirection == 5 || curDirection == 6) { - curX -= stepX; - curY += stepY; - } - } - - if (currentChapter != 2) { - curY += (int)(curHeight - newHeight); - curX += (int)(curWidth - newWidth); - curHeight = (int)newHeight; - curWidth = (int)newWidth; - } -} - -int DrasculaEngine::whichObject() { - int n = 0; - - for (n = 1; n < 43; n++) { - if (mouseX > itemLocations[n].x && mouseY > itemLocations[n].y - && mouseX < itemLocations[n].x + OBJWIDTH && mouseY < itemLocations[n].y + OBJHEIGHT) - break; - } - - return n; -} - -bool DrasculaEngine::checkMenuFlags() { - for (int n = 0; n < 43; n++) { - if (whichObject() == n) { - if (inventoryObjects[n] != 0 && checkAction(inventoryObjects[n])) - return true; - } - } - - return false; -} - -void DrasculaEngine::converse(int index) { - char fileName[20]; - sprintf(fileName, "op_%d.cal", index); - uint h; - int game1 = 1, game2 = 1, game3 = 1, game4 = 1; - char phrase1[78]; - char phrase2[78]; - char phrase3[87]; - char phrase4[78]; - char sound1[13]; - char sound2[13]; - char sound3[13]; - char sound4[13]; - int answer1; - int answer2; - int answer3; - int used1 = 0; - int used2 = 0; - int used3 = 0; - char buffer[256]; - uint len; - - breakOut = 0; - - if (currentChapter == 5) - withoutVerb(); - - _arj.open(fileName); - if (!_arj.isOpen()) { - error("missing data file %s", fileName); - } - int size = _arj.size(); - - getStringFromLine(buffer, size, phrase1); - getStringFromLine(buffer, size, phrase2); - getStringFromLine(buffer, size, phrase3); - getStringFromLine(buffer, size, phrase4); - getStringFromLine(buffer, size, sound1); - getStringFromLine(buffer, size, sound2); - getStringFromLine(buffer, size, sound3); - getStringFromLine(buffer, size, sound4); - getIntFromLine(buffer, size, &answer1); - getIntFromLine(buffer, size, &answer2); - getIntFromLine(buffer, size, &answer3); - - _arj.close(); - - if (currentChapter == 2 && !strcmp(fileName, "op_5.cal") && flags[38] == 1 && flags[33] == 1) { - strcpy(phrase3, _text[_lang][405]); - strcpy(sound3, "405.als"); - answer3 = 31; - } - - if (currentChapter == 6 && !strcmp(fileName, "op_12.cal") && flags[7] == 1) { - strcpy(phrase3, _text[_lang][273]); - strcpy(sound3, "273.als"); - answer3 = 14; - } - - if (currentChapter == 6 && !strcmp(fileName, "op_12.cal") && flags[10] == 1) { - strcpy(phrase3, _text[_lang][274]); - strcpy(sound3, "274.als"); - answer3 = 15; - } - - len = strlen(phrase1); - for (h = 0; h < len; h++) - if (phrase1[h] == (char)0xa7) - phrase1[h] = ' '; - - len = strlen(phrase2); - for (h = 0; h < len; h++) - if (phrase2[h] == (char)0xa7) - phrase2[h] = ' '; - - len = strlen(phrase3); - for (h = 0; h < len; h++) - if (phrase3[h] == (char)0xa7) - phrase3[h] = ' '; - - len = strlen(phrase4); - for (h = 0; h < len; h++) - if (phrase4[h] == (char)0xa7) - phrase4[h] = ' '; - - loadPic("car.alg", backSurface); - // TODO code here should limit y position for mouse in dialog menu, - // but we can't implement this due lack backend functionality - // from 1(top) to 31 - color_abc(kColorLightGreen); - - while (breakOut == 0) { - updateRoom(); - - if (currentChapter == 1 || currentChapter == 4 || currentChapter == 6) { - if (musicStatus() == 0 && flags[11] == 0) - playMusic(roomMusic); - } else if (currentChapter == 2) { - if (musicStatus() == 0 && flags[11] == 0 && roomMusic != 0) - playMusic(roomMusic); - } else if (currentChapter == 3 || currentChapter == 5) { - if (musicStatus() == 0) - playMusic(roomMusic); - } - - updateEvents(); - - if (mouseY > 0 && mouseY < 9) { - if (used1 == 1 && _color != kColorWhite) - color_abc(kColorWhite); - else if (used1 == 0 && _color != kColorLightGreen) - color_abc(kColorLightGreen); - } else if (mouseY > 8 && mouseY < 17) { - if (used2 == 1 && _color != kColorWhite) - color_abc(kColorWhite); - else if (used2 == 0 && _color != kColorLightGreen) - color_abc(kColorLightGreen); - } else if (mouseY > 16 && mouseY < 25) { - if (used3 == 1 && _color != kColorWhite) - color_abc(kColorWhite); - else if (used3 == 0 && _color != kColorLightGreen) - color_abc(kColorLightGreen); - } else if (_color != kColorLightGreen) - color_abc(kColorLightGreen); - - if (mouseY > 0 && mouseY < 9) - game1 = 2; - else if (mouseY > 8 && mouseY < 17) - game2 = 2; - else if (mouseY > 16 && mouseY < 25) - game3 = 2; - else if (mouseY > 24 && mouseY < 33) - game4 = 2; - - print_abc_opc(phrase1, 1, 2, game1); - print_abc_opc(phrase2, 1, 10, game2); - print_abc_opc(phrase3, 1, 18, game3); - print_abc_opc(phrase4, 1, 26, game4); - - updateScreen(); - - if ((leftMouseButton == 1) && (game1 == 2)) { - delay(100); - used1 = 1; - talk(phrase1, sound1); - if (currentChapter == 3) - grr(); - else - response(answer1); - } else if ((leftMouseButton == 1) && (game2 == 2)) { - delay(100); - used2 = 1; - talk(phrase2, sound2); - if (currentChapter == 3) - grr(); - else - response(answer2); - } else if ((leftMouseButton == 1) && (game3 == 2)) { - delay(100); - used3 = 1; - talk(phrase3, sound3); - if (currentChapter == 3) - grr(); - else - response(answer3); - } else if ((leftMouseButton == 1) && (game4 == 2)) { - delay(100); - talk(phrase4, sound4); - breakOut = 1; - } - - if (leftMouseButton == 1) { - delay(100); - color_abc(kColorLightGreen); - } - - game1 = (used1 == 0) ? 1 : 3; - game2 = (used2 == 0) ? 1 : 3; - game3 = (used3 == 0) ? 1 : 3; - game4 = 1; - } // while (breakOut == 0) - - if (currentChapter == 2) - loadPic(menuBackground, backSurface); - else - loadPic(99, backSurface); - if (currentChapter != 5) - withoutVerb(); -} - -void DrasculaEngine::response(int function) { - if (currentChapter == 1) { - if (function >= 10 && function <= 12) - talk_drunk(function - 9); - } else if (currentChapter == 2) { - if (function == 8) - animation_8_2(); - else if (function == 9) - animation_9_2(); - else if (function == 10) - animation_10_2(); - else if (function == 15) - animation_15_2(); - else if (function == 16) - animation_16_2(); - else if (function == 17) - animation_17_2(); - else if (function == 19) - animation_19_2(); - else if (function == 20) - animation_20_2(); - else if (function == 21) - animation_21_2(); - else if (function == 23) - animation_23_2(); - else if (function == 28) - animation_28_2(); - else if (function == 29) - animation_29_2(); - else if (function == 30) - animation_30_2(); - else if (function == 31) - animation_31_2(); - } else if (currentChapter == 4) { - if (function == 2) - animation_2_4(); - else if (function == 3) - animation_3_4(); - else if (function == 4) - animation_4_4(); - } else if (currentChapter == 5) { - if (function == 2) - animation_2_5(); - else if (function == 3) - animation_3_5(); - else if (function == 6) - animation_6_5(); - else if (function == 7) - animation_7_5(); - else if (function == 8) - animation_8_5(); - else if (function == 15) - animation_15_5(); - else if (function == 16) - animation_16_5(); - else if (function == 17) - animation_17_5(); - } else if (currentChapter == 6) { - if (function == 2) - animation_2_6(); - else if (function == 3) - animation_3_6(); - else if (function == 4) - animation_4_6(); - else if (function == 11) - animation_11_6(); - else if (function == 12) - animation_12_6(); - else if (function == 13) - animation_13_6(); - else if (function == 14) - animation_14_6(); - else if (function == 15) - animation_15_6(); - } -} - -void DrasculaEngine::addObject(int obj) { - int h, position = 0; - - for (h = 1; h < 43; h++) { - if (inventoryObjects[h] == obj) - position = 1; - } - - if (position == 0) { - for (h = 1; h < 43; h++) { - if (inventoryObjects[h] == 0) { - inventoryObjects[h] = obj; - position = 1; - break; - } - } - } -} - -void DrasculaEngine::stopSound() { - _mixer->stopHandle(_soundHandle); -} - -void DrasculaEngine::MusicFadeout() { - int org_vol = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType); - for (;;) { - int vol = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType); - vol -= 10; - if (vol < 0) - vol = 0; - _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, vol); - if (vol == 0) - break; - updateEvents(); - _system->updateScreen(); - _system->delayMillis(50); - } - AudioCD.stop(); - _system->delayMillis(100); - _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, org_vol); -} - -void DrasculaEngine::playFile(const char *fname) { - if (_arj.open(fname)) { - int soundSize = _arj.size(); - byte *soundData = (byte *)malloc(soundSize); - _arj.seek(32); - _arj.read(soundData, soundSize); - _arj.close(); - - _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_soundHandle, soundData, soundSize - 64, - 11025, Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED); - } else - warning("playFile: Could not open %s", fname); -} - -bool DrasculaEngine::soundIsActive() { - return _mixer->isSoundHandleActive(_soundHandle); -} - -void DrasculaEngine::updateVisible() { - if (currentChapter == 1) { - // nothing - } else if (currentChapter == 2) { - if (roomNumber == 2 && flags[40] == 0) - visible[3] = 0; - else if (roomNumber == 3 && flags[3] == 1) - visible[8] = 0; - else if (roomNumber == 6 && flags[1] == 1 && flags[10] == 0) { - visible[2] = 0; - visible[4] = 1; - } else if (roomNumber == 7 && flags[35] == 1) - visible[3] = 0; - else if (roomNumber == 14 && flags[5] == 1) - visible[4] = 0; - else if (roomNumber == 18 && flags[28] == 1) - visible[2] = 0; - } else if (currentChapter == 3) { - // nothing - } else if (currentChapter == 4) { - if (roomNumber == 23 && flags[0] == 0 && flags[11] == 0) - visible[2] = 1; - if (roomNumber == 23 && flags[0] == 1 && flags[11] == 0) - visible[2] = 0; - if (roomNumber == 21 && flags[10] == 1) - visible[2] = 0; - if (roomNumber == 22 && flags[26] == 1) { - visible[2] = 0; - visible[1] = 1; - } - if (roomNumber == 22 && flags[27] == 1) - visible[3] = 0; - if (roomNumber == 26 && flags[21] == 0) - strcpy(objName[2], _textmisc[_lang][0]); - if (roomNumber == 26 && flags[18] == 1) - visible[2] = 0; - if (roomNumber == 26 && flags[12] == 1) - visible[1] = 0; - if (roomNumber == 35 && flags[14] == 1) - visible[2] = 0; - if (roomNumber == 35 && flags[17] == 1) - visible[3] = 1; - if (roomNumber == 35 && flags[15] == 1) - visible[1] = 0; - } else if (currentChapter == 5) { - if (roomNumber == 49 && flags[6] == 1) - visible[2] = 0; - if (roomNumber == 49 && flags[6] == 0) - visible[1] = 0; - if (roomNumber == 49 && flags[6] == 1) - visible[1] = 1; - if (roomNumber == 45 && flags[6] == 1) - visible[3] = 1; - if (roomNumber == 53 && flags[2] == 1) - visible[3] = 0; - if (roomNumber == 54 && flags[13] == 1) - visible[3] = 0; - if (roomNumber == 55 && flags[8] == 1) - visible[1] = 0; - } else if (currentChapter == 6) { - if (roomNumber == 58 && flags[8] == 0) - isDoor[1] = 0; - if (roomNumber == 58 && flags[8] == 1) - isDoor[1] = 1; - if (roomNumber == 59) - isDoor[1] = 0; - if (roomNumber == 60) { - trackDrascula = 0; - drasculaX = 155; - drasculaY = 69; - } - } -} - -void DrasculaEngine::walkDown() { - curDirection = 4; - trackProtagonist = 3; - stepX = 0; -} - -void DrasculaEngine::walkUp() { - curDirection = 0; - trackProtagonist = 2; - stepX = 0; -} - -void DrasculaEngine::moveVonBraun() { - int pos_vb[6]; - - if (vonBraunHasMoved == 0) { - pos_vb[0] = 256; - pos_vb[1] = 129; - pos_vb[2] = vonBraunX; - pos_vb[3] = 66; - pos_vb[4] = 33; - pos_vb[5] = 69; - if (trackVonBraun == 0) - pos_vb[0] = 222; - else if (trackVonBraun == 1) - pos_vb[0] = 188; - } else { - pos_vb[0] = actorFrames[kFrameVonBraun]; - pos_vb[1] = (trackVonBraun == 0) ? 62 : 131; - pos_vb[2] = vonBraunX; - pos_vb[3] = 66; - pos_vb[4] = 28; - pos_vb[5] = 68; - - actorFrames[kFrameVonBraun] += 29; - if (actorFrames[kFrameVonBraun] > 146) - actorFrames[kFrameVonBraun] = 1; - } - - copyRectClip(pos_vb, frontSurface, screenSurface); -} - -void DrasculaEngine::placeVonBraun(int pointX) { - trackVonBraun = (pointX < vonBraunX) ? 0 : 1; - vonBraunHasMoved = 1; - - for (;;) { - updateRoom(); - updateScreen(); - if (trackVonBraun == 0) { - vonBraunX = vonBraunX - 5; - if (vonBraunX <= pointX) - break; - } else { - vonBraunX = vonBraunX + 5; - if (vonBraunX >= pointX) - break; - } - pause(5); - } - - vonBraunHasMoved = 0; -} - -void DrasculaEngine::hipo_sin_nadie(int counter){ - int y = 0, trackCharacter = 0; - if (currentChapter == 3) - y = -1; - - do { - counter--; - - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); - if (currentChapter == 3) - updateScreen(0, 0, 0, y, 320, 200, screenSurface); - else - updateScreen(0, 1, 0, y, 320, 198, screenSurface); - - if (trackCharacter == 0) - y++; - else - y--; + if (trackCharacter == 0) + y++; + else + y--; if (currentChapter == 3) { if (y == 1) @@ -3506,86 +718,4 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ updateScreen(); } -void DrasculaEngine::openDoor(int nflag, int doorNum) { - if (flags[nflag] == 0) { - if (currentChapter == 1 /*|| currentChapter == 4*/) { - if (nflag != 7) { - playSound(3); - flags[nflag] = 1; - } - } else { - playSound(3); - flags[nflag] = 1; - } - - if (doorNum != NO_DOOR) - updateDoor(doorNum); - updateRoom(); - updateScreen(); - finishSound(); - withoutVerb(); - } -} - -void DrasculaEngine::showMap() { - hasName = 0; - - for (int l = 0; l < numRoomObjs; l++) { - if (mouseX > x1[l] && mouseY > y1[l] - && mouseX < x2[l] && mouseY < y2[l] - && visible[l] == 1) { - strcpy(textName, objName[l]); - hasName = 1; - } - } -} - -void DrasculaEngine::grr() { - int length = 30; - - color_abc(kColorDarkGreen); - - playFile("s10.als"); - - updateRoom(); - copyBackground(253, 110, 150, 65, 20, 30, drawSurface3, screenSurface); - - if (withVoices == 0) - centerText("groaaarrrrgghhhh!", 153, 65); - - updateScreen(); - - while (!isTalkFinished(&length)); - - updateRoom(); - updateScreen(); -} - -void DrasculaEngine::activatePendulum() { - flags[1] = 2; - hare_se_ve = 0; - roomNumber = 102; - loadPic(102, drawSurface1, HALF_PAL); - loadPic("an_p1.alg", drawSurface3); - loadPic("an_p2.alg", extraSurface); - loadPic("an_p3.alg", frontSurface); - - copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); - - savedTime = getTime(); -} - -void DrasculaEngine::closeDoor(int nflag, int doorNum) { - if (flags[nflag] == 1) { - playSound(4); - flags[nflag] = 0; - if (doorNum != NO_DOOR) - updateDoor(doorNum); - updateRoom(); - updateScreen(); - finishSound(); - withoutVerb(); - } -} - } // End of namespace Drascula diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp new file mode 100644 index 0000000000..803b26f96d --- /dev/null +++ b/engines/drascula/graphics.cpp @@ -0,0 +1,736 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "drascula/drascula.h" + +namespace Drascula { + +void DrasculaEngine::allocMemory() { + screenSurface = (byte *)malloc(64000); + assert(screenSurface); + frontSurface = (byte *)malloc(64000); + assert(frontSurface); + backSurface = (byte *)malloc(64000); + assert(backSurface); + drawSurface1 = (byte *)malloc(64000); + assert(drawSurface1); + drawSurface2 = (byte *)malloc(64000); + assert(drawSurface2); + drawSurface3 = (byte *)malloc(64000); + assert(drawSurface3); + tableSurface = (byte *)malloc(64000); + assert(tableSurface); + extraSurface = (byte *)malloc(64000); + assert(extraSurface); +} + +void DrasculaEngine::freeMemory() { + free(screenSurface); + free(drawSurface1); + free(backSurface); + free(drawSurface2); + free(tableSurface); + free(drawSurface3); + free(extraSurface); + free(frontSurface); +} + +void DrasculaEngine::moveCursor() { + int cursorPos[8]; + + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + + updateRefresh_pre(); + moveCharacters(); + updateRefresh(); + + if (!strcmp(textName, "hacker") && hasName == 1) { + if (_color != kColorRed && menuScreen == 0) + color_abc(kColorRed); + } else if (menuScreen == 0 && _color != kColorLightGreen) + color_abc(kColorLightGreen); + if (hasName == 1 && menuScreen == 0) + centerText(textName, mouseX, mouseY); + if (menuScreen == 1) + showMenu(); + else if (menuBar == 1) + clearMenu(); + + cursorPos[0] = 0; + cursorPos[1] = 0; + cursorPos[2] = mouseX - 20; + cursorPos[3] = mouseY - 17; + cursorPos[4] = OBJWIDTH; + cursorPos[5] = OBJHEIGHT; + copyRectClip(cursorPos, drawSurface3, screenSurface); +} + +void DrasculaEngine::setCursorTable() { + int cursorPos[8]; + + cursorPos[0] = 225; + cursorPos[1] = 56; + cursorPos[2] = mouseX - 20; + cursorPos[3] = mouseY - 12; + cursorPos[4] = 40; + cursorPos[5] = 25; + + copyRectClip(cursorPos, tableSurface, screenSurface); +} + +void DrasculaEngine::loadPic(const char *NamePcc, byte *targetSurface, int colorCount) { + unsigned int con, x = 0; + unsigned int fExit = 0; + byte ch, rep; + byte *auxPun; + + _arj.open(NamePcc); + if (!_arj.isOpen()) + error("missing game data %s %c", NamePcc, 7); + + pcxBuffer = (byte *)malloc(65000); + auxPun = pcxBuffer; + _arj.seek(128); + while (!fExit) { + ch = _arj.readByte(); + rep = 1; + if ((ch & 192) == 192) { + rep = (ch & 63); + ch = _arj.readByte(); + } + for (con = 0; con < rep; con++) { + *auxPun++ = ch; + x++; + if (x > 64000) + fExit = 1; + } + } + + _arj.read(cPal, 768); + _arj.close(); + + memcpy(targetSurface, pcxBuffer, 64000); + free(pcxBuffer); + setRGB((byte *)cPal, colorCount); +} + +byte *DrasculaEngine::loadPCX(byte *NamePcc) { + signed int con = 0; + unsigned int X = 0; + unsigned int fExit = 0; + char ch, rep; + byte *AuxPun = AuxBuffDes; + + while (!fExit) { + ch = *NamePcc++; + rep = 1; + if ((ch & 192) == 192) { + rep = (ch & 63); + ch = *NamePcc++; + } + for (con = 0; con< rep; con++) { + *AuxPun++ = ch; + X++; + if (X > 64000) + fExit = 1; + } + } + return AuxBuffDes; +} + +void DrasculaEngine::copyBackground(int xorg, int yorg, int xdes, int ydes, int width, + int height, byte *src, byte *dest) { + dest += xdes + ydes * 320; + src += xorg + yorg * 320; + for (int x = 0; x < height; x++) { + memcpy(dest, src, width); + dest += 320; + src += 320; + } +} + +void DrasculaEngine::copyRect(int xorg, int yorg, int xdes, int ydes, int width, + int height, byte *src, byte *dest) { + int y, x; + + dest += xdes + ydes * 320; + src += xorg + yorg * 320; + + for (y = 0; y < height; y++) + for (x = 0; x < width; x++) + if (src[x + y * 320] != 255) + dest[x + y * 320] = src[x + y * 320]; +} + +void DrasculaEngine::copyRectClip(int *Array, byte *src, byte *dest) { + int y, x; + int xorg = Array[0]; + int yorg = Array[1]; + int xdes = Array[2]; + int ydes = Array[3]; + int width = Array[4]; + int height = Array[5]; + + if (ydes < 0) { + yorg += -ydes; + height += ydes; + ydes = 0; + } + if (xdes < 0) { + xorg += -xdes; + width += xdes; + xdes = 0; + } + if ((xdes + width) > 319) + width -= (xdes + width) - 320; + if ((ydes + height) > 199) + height -= (ydes + height) - 200; + + dest += xdes + ydes * 320; + src += xorg + yorg * 320; + + for (y = 0; y < height; y++) + for (x = 0; x < width; x++) + if (src[x + y * 320] != 255) + dest[x + y * 320] = src[x + y * 320]; +} + +void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int width, int height, byte *buffer) { + byte *ptr = VGA; + + ptr += xdes + ydes * 320; + buffer += xorg + yorg * 320; + for (int x = 0; x < height; x++) { + memcpy(ptr, buffer, width); + ptr += 320; + buffer += 320; + } + + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); + _system->updateScreen(); +} + +void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { + int textPos[8]; + int letterY = 0, letterX = 0, c, i; + uint len = strlen(said); + + for (uint h = 0; h < len; h++) { + c = toupper(said[h]); + + for (i = 0; i < CHARMAP_SIZE; i++) { + if (c == charMap[i].inChar) { + letterX = charMap[i].mappedChar; + + switch (charMap[i].charType) { + case 0: // letters + letterY = (_lang == kSpanish) ? 149 : 158; + break; + case 1: // signs + letterY = (_lang == kSpanish) ? 160 : 169; + break; + case 2: // accented + letterY = 180; + break; + } // switch + break; + } // if + } // for + + textPos[0] = letterX; + textPos[1] = letterY; + textPos[2] = screenX; + textPos[3] = screenY; + textPos[4] = CHAR_WIDTH; + textPos[5] = CHAR_HEIGHT; + + copyRectClip(textPos, textSurface, screenSurface); + + screenX = screenX + CHAR_WIDTH; + if (screenX > 317) { + screenX = 0; + screenY = screenY + CHAR_HEIGHT + 2; + } + } // for +} + +void DrasculaEngine::print_abc_opc(const char *said, int screenX, int screenY, int game) { + int textPos[6]; + int signY, letterY, letterX = 0; + uint len = strlen(said); + + for (uint h = 0; h < len; h++) { + if (game == 1) { + letterY = 6; + signY = 15; + } else if (game == 3) { + letterY = 56; + signY = 65; + } else { + letterY = 31; + signY = 40; + } + + int c = toupper(said[h]); + + // WORKAROUND: Even original did not process it correctly + // Fixes apostrophe rendering + if (_lang != kSpanish) + if (c == '\'') + c = '\244'; + + for (int i = 0; i < CHARMAP_SIZE; i++) { + if (c == charMap[i].inChar) { + // Convert the mapped char of the normal font to the + // mapped char of the dialogue font + + int multiplier = (charMap[i].mappedChar - 6) / 9; + + letterX = multiplier * 7 + 10; + + if (charMap[i].charType > 0) + letterY = signY; + break; + } // if + } // for + + textPos[0] = letterX; + textPos[1] = letterY; + textPos[2] = screenX; + textPos[3] = screenY; + textPos[4] = CHAR_WIDTH_OPC; + textPos[5] = CHAR_HEIGHT_OPC; + + copyRectClip(textPos, backSurface, screenSurface); + + screenX = screenX + CHAR_WIDTH_OPC; + } +} + +void DrasculaEngine::centerText(const char *message, int textX, int textY) { + char bb[200], m2[200], m1[200], mb[10][50]; + char m3[200]; + int h, fil, textX3, textX2, textX1, conta_f = 0, ya = 0; + + strcpy(m1, " "); + strcpy(m2, " "); + strcpy(m3, " "); + strcpy(bb, " "); + + for (h = 0; h < 10; h++) + strcpy(mb[h], " "); + + if (textX > 160) + ya = 1; + + strcpy(m1, message); + textX = CLIP(textX, 60, 255); + + textX1 = textX; + + if (ya == 1) + textX1 = 315 - textX; + + textX2 = (strlen(m1) / 2) * CHAR_WIDTH; + + while (true) { + strcpy(bb, m1); + scumm_strrev(bb); + + if (textX1 < textX2) { + strcpy(m3, strrchr(m1, ' ')); + strcpy(m1, strstr(bb, " ")); + scumm_strrev(m1); + m1[strlen(m1) - 1] = '\0'; + strcat(m3, m2); + strcpy(m2, m3); + }; + + textX2 = (strlen(m1) / 2) * CHAR_WIDTH; + + if (textX1 < textX2) + continue; + + strcpy(mb[conta_f], m1); + + if (!strcmp(m2, "")) + break; + + scumm_strrev(m2); + m2[strlen(m2) - 1] = '\0'; + scumm_strrev(m2); + strcpy(m1, m2); + strcpy(m2, ""); + conta_f++; + } + + fil = textY - (((conta_f + 3) * CHAR_HEIGHT)); + + for (h = 0; h < conta_f + 1; h++) { + textX3 = strlen(mb[h]) / 2; + print_abc(mb[h], ((textX) - textX3 * CHAR_WIDTH) - 1, fil); + fil = fil + CHAR_HEIGHT + 2; + } +} + +void DrasculaEngine::screenSaver() { + int xr, yr; + byte *copia, *ghost; + float coeff = 0, coeff2 = 0; + int count = 0; + int count2 = 0; + int tempLine[320]; + int tempRow[200]; + + clearRoom(); + + loadPic("sv.alg", drawSurface1, HALF_PAL); + + // inicio_ghost(); + copia = (byte *)malloc(64000); + ghost = (byte *)malloc(65536); + + // carga_ghost(); + _arj.open("ghost.drv"); + if (!_arj.isOpen()) + error("Cannot open file ghost.drv"); + + _arj.read(ghost, 65536); + _arj.close(); + + updateEvents(); + xr = mouseX; + yr = mouseY; + + for (;;) { + // efecto(drawSurface1); + + memcpy(copia, drawSurface1, 64000); + coeff += 0.1f; + coeff2 = coeff; + + if (++count > 319) + count = 0; + + for (int i = 0; i < 320; i++) { + tempLine[i] = (int)(sin(coeff2) * 16); + coeff2 += 0.02f; + tempLine[i] = checkWrapY(tempLine[i]); + } + + coeff2 = coeff; + for (int i = 0; i < 200; i++) { + tempRow[i] = (int)(sin(coeff2) * 16); + coeff2 += 0.02f; + tempRow[i] = checkWrapX(tempRow[i]); + } + + if (++count2 > 199) + count2 = 0; + + int x1_, y1_, off1, off2; + + for (int i = 0; i < 200; i++) { + for (int j = 0; j < 320; j++) { + x1_ = j + tempRow[i]; + x1_ = checkWrapX(x1_); + + y1_ = i + count2; + y1_ = checkWrapY(y1_); + + off1 = 320 * y1_ + x1_; + + x1_ = j + count; + x1_ = checkWrapX(x1_); + + y1_ = i + tempLine[j]; + y1_ = checkWrapY(y1_); + off2 = 320 * y1_ + x1_; + + VGA[320 * i + j] = ghost[drawSurface1[off2] + (copia[off1] << 8)]; + } + } + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); + _system->updateScreen(); + + _system->delayMillis(20); + + // end of efecto() + + updateEvents(); + if (rightMouseButton == 1 || leftMouseButton == 1) + break; + if (mouseX != xr) + break; + if (mouseY != yr) + break; + } + // fin_ghost(); + free(copia); + free(ghost); + + loadPic(roomNumber, drawSurface1, HALF_PAL); +} + +void DrasculaEngine::playFLI(const char *filefli, int vel) { + // Open file + MiVideoSSN = (byte *)malloc(64256); + globalSpeed = 1000 / vel; + FrameSSN = 0; + UsingMem = 0; + if (MiVideoSSN == NULL) + return; + _arj.open(filefli); + mSession = TryInMem(); + LastFrame = _system->getMillis(); + + while (playFrameSSN() && (!term_int)) { + if (getScan() == Common::KEYCODE_ESCAPE) + term_int = 1; + } + + free(MiVideoSSN); + if (UsingMem) + free(pointer); + else + _arj.close(); +} + +int DrasculaEngine::playFrameSSN() { + int Exit = 0; + uint32 Lengt; + byte *BufferSSN; + + if (!UsingMem) + _arj.read(&CHUNK, 1); + else { + memcpy(&CHUNK, mSession, 1); + mSession += 1; + } + + switch (CHUNK) { + case kFrameSetPal: + if (!UsingMem) + _arj.read(dacSSN, 768); + else { + memcpy(dacSSN, mSession, 768); + mSession += 768; + } + setPalette(dacSSN); + break; + case kFrameEmptyFrame: + WaitFrameSSN(); + break; + case kFrameInit: + if (!UsingMem) { + CMP = _arj.readByte(); + Lengt = _arj.readUint32LE(); + } else { + memcpy(&CMP, mSession, 1); + mSession += 1; + Lengt = READ_LE_UINT32(mSession); + mSession += 4; + } + if (CMP == kFrameCmpRle) { + if (!UsingMem) { + BufferSSN = (byte *)malloc(Lengt); + _arj.read(BufferSSN, Lengt); + } else { + BufferSSN = (byte *)malloc(Lengt); + memcpy(BufferSSN, mSession, Lengt); + mSession += Lengt; + } + Des_RLE(BufferSSN, MiVideoSSN); + free(BufferSSN); + if (FrameSSN) { + WaitFrameSSN(); + MixVideo(VGA, MiVideoSSN); + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); + } else { + WaitFrameSSN(); + memcpy(VGA, MiVideoSSN, 64000); + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); + } + _system->updateScreen(); + FrameSSN++; + } else { + if (CMP == kFrameCmpOff) { + if (!UsingMem) { + BufferSSN = (byte *)malloc(Lengt); + _arj.read(BufferSSN, Lengt); + } else { + BufferSSN = (byte *)malloc(Lengt); + memcpy(BufferSSN, mSession, Lengt); + mSession += Lengt; + } + Des_OFF(BufferSSN, MiVideoSSN, Lengt); + free(BufferSSN); + if (FrameSSN) { + WaitFrameSSN(); + MixVideo(VGA, MiVideoSSN); + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); + } else { + WaitFrameSSN(); + memcpy(VGA, MiVideoSSN, 64000); + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); + } + _system->updateScreen(); + FrameSSN++; + } + } + break; + case kFrameEndAnim: + Exit = 1; + break; + default: + Exit = 1; + break; + } + + return (!Exit); +} + +byte *DrasculaEngine::TryInMem() { + int Lengt; + + _arj.seek(0, SEEK_END); + Lengt = _arj.pos(); + _arj.seek(0, SEEK_SET); + pointer = (byte *)malloc(Lengt); + if (pointer == NULL) + return NULL; + _arj.read(pointer, Lengt); + UsingMem = 1; + _arj.close(); + + return pointer; +} + +void DrasculaEngine::Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght) { + int x = 0; + unsigned char Reps; + int Offset; + + memset(MiVideoSSN, 0, 64000); + while (x < Lenght) { + Offset = BufferOFF[x] + BufferOFF[x + 1] * 256; + Reps = BufferOFF[x + 2]; + memcpy(MiVideoOFF + Offset, &BufferOFF[x + 3], Reps); + x += 3 + Reps; + } +} + +void DrasculaEngine::Des_RLE(byte *BufferRLE, byte *MiVideoRLE) { + signed int con = 0; + unsigned int X = 0; + unsigned int fExit = 0; + char ch, rep; + while (!fExit) { + ch = *BufferRLE++; + rep = 1; + if ((ch & 192) == 192) { + rep = (ch & 63); + ch =* BufferRLE++; + } + for (con = 0; con < rep; con++) { + *MiVideoRLE++ = ch; + X++; + if (X > 64000) + fExit = 1; + } + } +} + +void DrasculaEngine::MixVideo(byte *OldScreen, byte *NewScreen) { + for (int x = 0; x < 64000; x++) + OldScreen[x] ^= NewScreen[x]; +} + +void DrasculaEngine::WaitFrameSSN() { + uint32 now; + while ((now = _system->getMillis()) - LastFrame < ((uint32) globalSpeed)) + _system->delayMillis(globalSpeed - (now - LastFrame)); + LastFrame = LastFrame + globalSpeed; +} + +void DrasculaEngine::WaitForNext(int FPS) { + _system->delayMillis(1000 / FPS); +} + +bool DrasculaEngine::animate(const char *animationFile, int FPS) { + unsigned j; + int NFrames = 1; + int cnt = 2; + int dataSize = 0; + + AuxBuffDes = (byte *)malloc(65000); + + _arj.open(animationFile); + + if (!_arj.isOpen()) { + error("Animation file %s not found", animationFile); + } + + NFrames = _arj.readSint32LE(); + dataSize = _arj.readSint32LE(); + AuxBuffOrg = (byte *)malloc(dataSize); + _arj.read(AuxBuffOrg, dataSize); + _arj.read(cPal, 768); + loadPCX(AuxBuffOrg); + free(AuxBuffOrg); + memcpy(VGA, AuxBuffDes, 64000); + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); + _system->updateScreen(); + setPalette(cPal); + WaitForNext(FPS); + while (cnt < NFrames) { + dataSize = _arj.readSint32LE(); + AuxBuffOrg = (byte *)malloc(dataSize); + _arj.read(AuxBuffOrg, dataSize); + _arj.read(cPal, 768); + loadPCX(AuxBuffOrg); + free(AuxBuffOrg); + for (j = 0;j < 64000; j++) { + VGA[j] = AuxBuffDes[j] ^ VGA[j]; + } + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); + _system->updateScreen(); + WaitForNext(FPS); + cnt++; + byte key = getScan(); + if (key == Common::KEYCODE_ESCAPE) + term_int = 1; + if (key != 0) + break; + } + free(AuxBuffDes); + _arj.close(); + + return ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)); +} + + + +} // End of namespace Drascula diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp new file mode 100644 index 0000000000..41e7d4eba8 --- /dev/null +++ b/engines/drascula/interface.cpp @@ -0,0 +1,213 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "drascula/drascula.h" + +namespace Drascula { + +void DrasculaEngine::selectVerbFromBar() { + for (int n = 0; n < 7; n++) { + if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1] && n > 0) { + selectVerb(n); + return; + } + } + + // no verb selected + withoutVerb(); +} + +void DrasculaEngine::selectVerb(int verbo) { + int c = (menuScreen == 1) ? 0 : 171; + + if (currentChapter == 5) { + if (takeObject == 1 && pickedObject != 16) + addObject(pickedObject); + } else { + if (takeObject == 1) + addObject(pickedObject); + } + + copyBackground(OBJWIDTH * verbo, c, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); + + takeObject = 1; + pickedObject = verbo; +} + +bool DrasculaEngine::confirmExit() { + byte key; + + color_abc(kColorRed); + updateRoom(); + centerText(_textsys[_lang][1], 160, 87); + updateScreen(); + + delay(100); + for (;;) { + key = getScan(); + if (key != 0) + break; + } + + if (key == Common::KEYCODE_ESCAPE) { + stopMusic(); + return false; + } + + return true; +} + +void DrasculaEngine::showMenu() { + int h, n, x; + char textIcon[13]; + + x = whichObject(); + strcpy(textIcon, iconName[x]); + + for (n = 1; n < 43; n++) { + h = inventoryObjects[n]; + + if (h != 0) { + if (currentChapter == 6) + copyBackground(x_pol[n], y_pol[n], itemLocations[n].x, itemLocations[n].y, + OBJWIDTH, OBJHEIGHT, tableSurface, screenSurface); + else + copyBackground(x_pol[n], y_pol[n], itemLocations[n].x, itemLocations[n].y, + OBJWIDTH, OBJHEIGHT, frontSurface, screenSurface); + } + copyRect(x1d_menu[h], y1d_menu[h], itemLocations[n].x, itemLocations[n].y, + OBJWIDTH, OBJHEIGHT, backSurface, screenSurface); + } + + if (x < 7) + print_abc(textIcon, itemLocations[x].x - 2, itemLocations[x].y - 7); +} + +void DrasculaEngine::clearMenu() { + int n, verbActivated = 1; + + for (n = 0; n < 7; n++) { + if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1]) + verbActivated = 0; + copyRect(OBJWIDTH * n, OBJHEIGHT * verbActivated, verbBarX[n], 2, + OBJWIDTH, OBJHEIGHT, backSurface, screenSurface); + verbActivated = 1; + } +} + +void DrasculaEngine::enterName() { + Common::KeyCode key; + int v = 0, h = 0; + char select2[23]; + strcpy(select2, " "); + for (;;) { + select2[v] = '-'; + copyBackground(115, 14, 115, 14, 176, 9, drawSurface1, screenSurface); + print_abc(select2, 117, 15); + updateScreen(); + key = getScan(); + delay(70); + if (key != 0) { + if (key >= 0 && key <= 0xFF && isalpha(key)) + select2[v] = tolower(key); + else if ((key == Common::KEYCODE_LCTRL) || (key == Common::KEYCODE_RCTRL)) + select2[v] = '\164'; + else if (key >= Common::KEYCODE_0 && key <= Common::KEYCODE_9) + select2[v] = key; + else if (key == Common::KEYCODE_SPACE) + select2[v] = '\167'; + else if (key == Common::KEYCODE_ESCAPE) + break; + else if (key == Common::KEYCODE_RETURN) { + select2[v] = '\0'; + h = 1; + break; + } else if (key == Common::KEYCODE_BACKSPACE) + select2[v] = '\0'; + else + v--; + + if (key == Common::KEYCODE_BACKSPACE) + v--; + else + v++; + } + if (v == 22) + v = 21; + else if (v == -1) + v = 0; + } + if (h == 1) { + strcpy(select, select2); + selectionMade = 1; + } +} + +bool DrasculaEngine::checkMenuFlags() { + for (int n = 0; n < 43; n++) { + if (whichObject() == n) { + if (inventoryObjects[n] != 0 && checkAction(inventoryObjects[n])) + return true; + } + } + + return false; +} + +void DrasculaEngine::showMap() { + hasName = 0; + + for (int l = 0; l < numRoomObjs; l++) { + if (mouseX > x1[l] && mouseY > y1[l] + && mouseX < x2[l] && mouseY < y2[l] + && visible[l] == 1) { + strcpy(textName, objName[l]); + hasName = 1; + } + } +} + +void DrasculaEngine::grr() { + int length = 30; + + color_abc(kColorDarkGreen); + + playFile("s10.als"); + + updateRoom(); + copyBackground(253, 110, 150, 65, 20, 30, drawSurface3, screenSurface); + + if (withVoices == 0) + centerText("groaaarrrrgghhhh!", 153, 65); + + updateScreen(); + + while (!isTalkFinished(&length)); + + updateRoom(); + updateScreen(); +} + +} // End of namespace Drascula diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp new file mode 100644 index 0000000000..87dfb22c48 --- /dev/null +++ b/engines/drascula/objects.cpp @@ -0,0 +1,299 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "drascula/drascula.h" + +namespace Drascula { + +void DrasculaEngine::pickObject(int objeto) { + if (currentChapter == 6) + loadPic("iconsp.alg", backSurface); + else if (currentChapter == 4) + loadPic("icons2.alg", backSurface); + else if (currentChapter == 5) + loadPic("icons3.alg", backSurface); + else + loadPic("icons.alg", backSurface); + chooseObject(objeto); + if (currentChapter == 2) + loadPic(menuBackground, backSurface); + else + loadPic(99, backSurface); +} + +void DrasculaEngine::chooseObject(int objeto) { + if (currentChapter == 5) { + if (takeObject == 1 && menuScreen == 0 && pickedObject != 16) + addObject(pickedObject); + } else { + if (takeObject == 1 && menuScreen == 0) + addObject(pickedObject); + } + copyBackground(x1d_menu[objeto], y1d_menu[objeto], 0, 0, OBJWIDTH,OBJHEIGHT, backSurface, drawSurface3); + takeObject = 1; + pickedObject = objeto; +} + +int DrasculaEngine::removeObject(int obj) { + int result = 1; + + for (int h = 1; h < 43; h++) { + if (inventoryObjects[h] == obj) { + inventoryObjects[h] = 0; + result = 0; + break; + } + } + + return result; +} + +void DrasculaEngine::withoutVerb() { + int c = (menuScreen == 1) ? 0 : 171; + + if (currentChapter == 5) { + if (takeObject == 1 && pickedObject != 16) + addObject(pickedObject); + } else { + if (takeObject == 1) + addObject(pickedObject); + } + copyBackground(0, c, 0, 0, OBJWIDTH,OBJHEIGHT, backSurface, drawSurface3); + + takeObject = 0; + hasName = 0; +} + +void DrasculaEngine::gotoObject(int pointX, int pointY) { + if (currentChapter == 5 || currentChapter == 6) { + if (hare_se_ve == 0) { + curX = roomX; + curY = roomY; + updateRoom(); + updateScreen(); + return; + } + } + roomX = pointX; + roomY = pointY; + startWalking(); + + for (;;) { + updateRoom(); + updateScreen(); + if (characterMoved == 0) + break; + } + + if (walkToObject == 1) { + walkToObject = 0; + trackProtagonist = trackFinal; + } + updateRoom(); + updateScreen(); +} + +void DrasculaEngine::checkObjects() { + int l, veo = 0; + + for (l = 0; l < numRoomObjs; l++) { + if (mouseX > x1[l] && mouseY > y1[l] + && mouseX < x2[l] && mouseY < y2[l] + && visible[l] == 1 && isDoor[l] == 0) { + strcpy(textName, objName[l]); + hasName = 1; + veo = 1; + } + } + + if (mouseX > curX + 2 && mouseY > curY + 2 + && mouseX < curX + curWidth - 2 && mouseY < curY + curHeight - 2) { + if (currentChapter == 2 || veo == 0) { + strcpy(textName, "hacker"); + hasName = 1; + veo = 1; + } + } + + if (veo == 0) + hasName = 0; +} + +void DrasculaEngine::removeObject() { + int h = 0, n; + + updateRoom(); + + for (n = 1; n < 43; n++){ + if (whichObject() == n) { + h = inventoryObjects[n]; + inventoryObjects[n] = 0; + if (h != 0) + takeObject = 1; + } + } + + updateEvents(); + + if (takeObject == 1) + chooseObject(h); +} + +bool DrasculaEngine::pickupObject() { + int h = pickedObject; + checkFlags = 1; + + updateRoom(); + showMenu(); + updateScreen(); + + // Objects with an ID smaller than 7 are the inventory verbs + if (pickedObject >= 7) { + for (int n = 1; n < 43; n++) { + if (whichObject() == n && inventoryObjects[n] == 0) { + inventoryObjects[n] = h; + takeObject = 0; + checkFlags = 0; + } + } + } + + if (checkFlags == 1) { + if (checkMenuFlags()) + return true; + } + updateEvents(); + if (takeObject == 0) + withoutVerb(); + + return false; +} + +void DrasculaEngine::addObject(int obj) { + int h, position = 0; + + for (h = 1; h < 43; h++) { + if (inventoryObjects[h] == obj) + position = 1; + } + + if (position == 0) { + for (h = 1; h < 43; h++) { + if (inventoryObjects[h] == 0) { + inventoryObjects[h] = obj; + position = 1; + break; + } + } + } +} + +int DrasculaEngine::whichObject() { + int n = 0; + + for (n = 1; n < 43; n++) { + if (mouseX > itemLocations[n].x && mouseY > itemLocations[n].y + && mouseX < itemLocations[n].x + OBJWIDTH && mouseY < itemLocations[n].y + OBJHEIGHT) + break; + } + + return n; +} + +void DrasculaEngine::updateVisible() { + if (currentChapter == 1) { + // nothing + } else if (currentChapter == 2) { + if (roomNumber == 2 && flags[40] == 0) + visible[3] = 0; + else if (roomNumber == 3 && flags[3] == 1) + visible[8] = 0; + else if (roomNumber == 6 && flags[1] == 1 && flags[10] == 0) { + visible[2] = 0; + visible[4] = 1; + } else if (roomNumber == 7 && flags[35] == 1) + visible[3] = 0; + else if (roomNumber == 14 && flags[5] == 1) + visible[4] = 0; + else if (roomNumber == 18 && flags[28] == 1) + visible[2] = 0; + } else if (currentChapter == 3) { + // nothing + } else if (currentChapter == 4) { + if (roomNumber == 23 && flags[0] == 0 && flags[11] == 0) + visible[2] = 1; + if (roomNumber == 23 && flags[0] == 1 && flags[11] == 0) + visible[2] = 0; + if (roomNumber == 21 && flags[10] == 1) + visible[2] = 0; + if (roomNumber == 22 && flags[26] == 1) { + visible[2] = 0; + visible[1] = 1; + } + if (roomNumber == 22 && flags[27] == 1) + visible[3] = 0; + if (roomNumber == 26 && flags[21] == 0) + strcpy(objName[2], _textmisc[_lang][0]); + if (roomNumber == 26 && flags[18] == 1) + visible[2] = 0; + if (roomNumber == 26 && flags[12] == 1) + visible[1] = 0; + if (roomNumber == 35 && flags[14] == 1) + visible[2] = 0; + if (roomNumber == 35 && flags[17] == 1) + visible[3] = 1; + if (roomNumber == 35 && flags[15] == 1) + visible[1] = 0; + } else if (currentChapter == 5) { + if (roomNumber == 49 && flags[6] == 1) + visible[2] = 0; + if (roomNumber == 49 && flags[6] == 0) + visible[1] = 0; + if (roomNumber == 49 && flags[6] == 1) + visible[1] = 1; + if (roomNumber == 45 && flags[6] == 1) + visible[3] = 1; + if (roomNumber == 53 && flags[2] == 1) + visible[3] = 0; + if (roomNumber == 54 && flags[13] == 1) + visible[3] = 0; + if (roomNumber == 55 && flags[8] == 1) + visible[1] = 0; + } else if (currentChapter == 6) { + if (roomNumber == 58 && flags[8] == 0) + isDoor[1] = 0; + if (roomNumber == 58 && flags[8] == 1) + isDoor[1] = 1; + if (roomNumber == 59) + isDoor[1] = 0; + if (roomNumber == 60) { + trackDrascula = 0; + drasculaX = 155; + drasculaY = 69; + } + } +} + +} // End of namespace Drascula diff --git a/engines/drascula/palette.cpp b/engines/drascula/palette.cpp new file mode 100644 index 0000000000..ad57bce618 --- /dev/null +++ b/engines/drascula/palette.cpp @@ -0,0 +1,202 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "drascula/drascula.h" + +namespace Drascula { + +void DrasculaEngine::setRGB(byte *pal, int colorCount) { + int x, cnt = 0; + + for (x = 0; x < colorCount; x++) { + gamePalette[x][0] = pal[cnt++] / 4; + gamePalette[x][1] = pal[cnt++] / 4; + gamePalette[x][2] = pal[cnt++] / 4; + } + setPalette((byte *)&gamePalette); +} + +void DrasculaEngine::black() { + int color, component; + DacPalette256 blackPalette; + + for (color = 0; color < 256; color++) + for (component = 0; component < 3; component++) + blackPalette[color][component] = 0; + + blackPalette[254][0] = 0x3F; + blackPalette[254][1] = 0x3F; + blackPalette[254][2] = 0x15; + + setPalette((byte *)&blackPalette); +} + +void DrasculaEngine::setPalette(byte *PalBuf) { + byte pal[256 * 4]; + int i; + + for (i = 0; i < 256; i++) { + pal[i * 4 + 0] = PalBuf[i * 3 + 0] * 4; + pal[i * 4 + 1] = PalBuf[i * 3 + 1] * 4; + pal[i * 4 + 2] = PalBuf[i * 3 + 2] * 4; + pal[i * 4 + 3] = 0; + } + _system->setPalette(pal, 0, 256); + _system->updateScreen(); +} + +void DrasculaEngine::color_abc(int cl) { + _color = cl; + + char colorTable[][3] = { + { 0, 0, 0 }, { 0x10, 0x3E, 0x28 }, + { 0, 0, 0 }, // unused + { 0x16, 0x3F, 0x16 }, { 0x09, 0x3F, 0x12 }, + { 0x3F, 0x3F, 0x15 }, + { 0, 0, 0 }, // unused + { 0x38, 0, 0 }, { 0x3F, 0x27, 0x0B }, + { 0x2A, 0, 0x2A }, { 0x30, 0x30, 0x30 }, + { 98, 91, 100 } + }; + + for (int i = 0; i <= 2; i++) + gamePalette[254][i] = colorTable[cl][i]; + + setPalette((byte *)&gamePalette); +} + +char DrasculaEngine::adjustToVGA(char value) { + return (value & 0x3F) * (value > 0); +} + +void DrasculaEngine::fadeToBlack(int fadeSpeed) { + char fade; + unsigned int color, component; + + DacPalette256 palFade; + + for (fade = 63; fade >= 0; fade--) { + for (color = 0; color < 256; color++) { + for (component = 0; component < 3; component++) { + palFade[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fade); + } + } + pause(fadeSpeed); + + setPalette((byte *)&palFade); + } +} + +void DrasculaEngine::fadeFromBlack(int fadeSpeed) { + char fade; + unsigned int color, component; + + DacPalette256 palFade; + + for (fade = 0; fade < 64; fade++) { + for (color = 0; color < 256; color++) { + for (component = 0; component < 3; component++) { + palFade[color][component] = adjustToVGA(gamePalette[color][component] - 63 + fade); + } + } + pause(fadeSpeed); + + setPalette((byte *)&palFade); + } +} + +void DrasculaEngine::assignDefaultPalette() { + int color, component; + + for (color = 235; color < 253; color++) + for (component = 0; component < 3; component++) + defaultPalette[color][component] = gamePalette[color][component]; +} + +void DrasculaEngine::assignBrightPalette() { + int color, component; + + for (color = 235; color < 253; color++) { + for (component = 0; component < 3; component++) + brightPalette[color][component] = gamePalette[color][component]; + } +} + +void DrasculaEngine::assignDarkPalette() { + int color, component; + + for (color = 235; color < 253; color++) { + for (component = 0; component < 3; component++) + darkPalette[color][component] = gamePalette[color][component]; + } +} + +void DrasculaEngine::setDefaultPalette() { + int color, component; + + for (color = 235; color < 253; color++) { + for (component = 0; component < 3; component++) { + gamePalette[color][component] = defaultPalette[color][component]; + } + } + setPalette((byte *)&gamePalette); +} + +void DrasculaEngine::setBrightPalette() { + int color, component; + + for (color = 235; color < 253; color++) { + for (component = 0; component < 3; component++) + gamePalette[color][component] = brightPalette[color][component]; + } + + setPalette((byte *)&gamePalette); +} + +void DrasculaEngine::setDarkPalette() { + int color, component; + + for (color = 235; color < 253; color++ ) + for (component = 0; component < 3; component++) + gamePalette[color][component] = darkPalette[color][component]; + + setPalette((byte *)&gamePalette); +} + +void DrasculaEngine::setPaletteBase(int darkness) { + char fade; + unsigned int color, component; + + for (fade = darkness; fade >= 0; fade--) { + for (color = 235; color < 253; color++) { + for (component = 0; component < 3; component++) + gamePalette[color][component] = adjustToVGA(gamePalette[color][component] - 8 + fade); + } + } + + setPalette((byte *)&gamePalette); +} + +} // End of namespace Drascula diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 008596baf3..8f1837f995 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1596,4 +1596,481 @@ bool DrasculaEngine::room(int rN, int fl) { return false; } +void DrasculaEngine::enterRoom(int roomIndex) { + debug(2, "Entering room %d", roomIndex); + + char fileName[20]; + sprintf(fileName, "%d.ald", roomIndex); + int soc, l, martin = 0, objIsExit = 0; + float chiquez = 0, pequegnez = 0; + char pant1[20], pant2[20], pant3[20], pant4[20]; + char buffer[256]; + int palLevel = 0; + + hasName = 0; + + strcpy(currentData, fileName); + + _arj.open(fileName); + if (!_arj.isOpen()) { + error("missing data file %s", fileName); + } + int size = _arj.size(); + + getIntFromLine(buffer, size, &roomNumber); + getIntFromLine(buffer, size, &roomMusic); + getStringFromLine(buffer, size, roomDisk); + getIntFromLine(buffer, size, &palLevel); + + if (currentChapter == 2) + getIntFromLine(buffer, size, &martin); + + if (currentChapter == 2 && martin != 0) { + curWidth = martin; + getIntFromLine(buffer, size, &curHeight); + getIntFromLine(buffer, size, &feetHeight); + getIntFromLine(buffer, size, &stepX); + getIntFromLine(buffer, size, &stepY); + + getStringFromLine(buffer, size, pant1); + getStringFromLine(buffer, size, pant2); + getStringFromLine(buffer, size, pant3); + getStringFromLine(buffer, size, pant4); + + strcpy(menuBackground, pant4); + } + + getIntFromLine(buffer, size, &numRoomObjs); + + for (l = 0; l < numRoomObjs; l++) { + getIntFromLine(buffer, size, &objectNum[l]); + getStringFromLine(buffer, size, objName[l]); + getIntFromLine(buffer, size, &x1[l]); + getIntFromLine(buffer, size, &y1[l]); + getIntFromLine(buffer, size, &x2[l]); + getIntFromLine(buffer, size, &y2[l]); + getIntFromLine(buffer, size, &roomObjX[l]); + getIntFromLine(buffer, size, &roomObjY[l]); + getIntFromLine(buffer, size, &trackObj[l]); + getIntFromLine(buffer, size, &visible[l]); + getIntFromLine(buffer, size, &isDoor[l]); + if (isDoor[l] != 0) { + getStringFromLine(buffer, size, _targetSurface[l]); + getIntFromLine(buffer, size, &_destX[l]); + getIntFromLine(buffer, size, &_destY[l]); + getIntFromLine(buffer, size, &trackCharacter_alkeva[l]); + getIntFromLine(buffer, size, &alapuertakeva[l]); + updateDoor(l); + } + } + + getIntFromLine(buffer, size, &floorX1); + getIntFromLine(buffer, size, &floorY1); + getIntFromLine(buffer, size, &floorX2); + getIntFromLine(buffer, size, &floorY2); + + if (currentChapter != 2) { + getIntFromLine(buffer, size, &far); + getIntFromLine(buffer, size, &near); + } + _arj.close(); + + if (currentChapter == 2 && martin != 0) { + loadPic(pant2, extraSurface); + loadPic(pant1, frontSurface); + loadPic(pant4, backSurface); + } + + if (currentChapter == 2) { + if (martin == 0) { + stepX = STEP_X; + stepY = STEP_Y; + curHeight = CHARACTER_HEIGHT; + curWidth = CHARACTER_WIDTH; + feetHeight = FEET_HEIGHT; + loadPic(97, extraSurface); + loadPic(96, frontSurface); + loadPic(99, backSurface); + + strcpy(menuBackground, "99.alg"); + } + } + + for (l = 0; l < numRoomObjs; l++) { + if (objectNum[l] == objExit) + objIsExit = l; + } + + if (currentChapter == 2) { + if (curX == -1) { + curX = _destX[objIsExit]; + curY = _destY[objIsExit] - curHeight; + } + characterMoved = 0; + } + + loadPic(roomDisk, drawSurface3); + loadPic(roomNumber, drawSurface1, HALF_PAL); + + copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); + + setDefaultPalette(); + if (palLevel != 0) + setPaletteBase(palLevel); + assignBrightPalette(); + setDefaultPalette(); + setPaletteBase(palLevel + 2); + assignDarkPalette(); + + setBrightPalette(); + changeColor = -1; + + if (currentChapter == 2) + color_abc(kColorLightGreen); + + if (currentChapter != 2) { + for (l = 0; l <= floorY1; l++) + factor_red[l] = far; + for (l = floorY1; l <= 201; l++) + factor_red[l] = near; + + chiquez = (float)(near - far) / (float)(floorY2 - floorY1); + for (l = floorY1; l <= floorY2; l++) { + factor_red[l] = (int)(far + pequegnez); + pequegnez = pequegnez + chiquez; + } + } + + if (roomNumber == 24) { + for (l = floorY1 - 1; l > 74; l--) { + factor_red[l] = (int)(far - pequegnez); + pequegnez = pequegnez + chiquez; + } + } + + if (currentChapter == 5 && roomNumber == 54) { + for (l = floorY1 - 1; l > 84; l--) { + factor_red[l] = (int)(far - pequegnez); + pequegnez = pequegnez + chiquez; + } + } + + if (currentChapter != 2) { + if (curX == -1) { + curX = _destX[objIsExit]; + curY = _destY[objIsExit]; + curHeight = (CHARACTER_HEIGHT * factor_red[curY]) / 100; + curWidth = (CHARACTER_WIDTH * factor_red[curY]) / 100; + curY = curY - curHeight; + } else { + curHeight = (CHARACTER_HEIGHT * factor_red[curY]) / 100; + curWidth = (CHARACTER_WIDTH * factor_red[curY]) / 100; + } + characterMoved = 0; + } + + if (currentChapter == 2) { + soc = 0; + for (l = 0; l < 6; l++) { + soc += curWidth; + frameX[l] = soc; + } + } + + if (currentChapter == 5) + hare_se_ve = 1; + + updateVisible(); + + if (currentChapter == 1) + isDoor[7] = 0; + + if (currentChapter == 2) { + if (roomNumber == 14 && flags[39] == 1) + roomMusic = 16; + else if (roomNumber == 15 && flags[39] == 1) + roomMusic = 16; + if (roomNumber == 14 && flags[5] == 1) + roomMusic = 0; + else if (roomNumber == 15 && flags[5] == 1) + roomMusic = 0; + + if (previousMusic != roomMusic && roomMusic != 0) + playMusic(roomMusic); + if (roomMusic == 0) + stopMusic(); + } else { + if (previousMusic != roomMusic && roomMusic != 0) + playMusic(roomMusic); + } + + if (currentChapter == 2) { + if (roomNumber == 9 || roomNumber == 2 || roomNumber == 14 || roomNumber == 18) + savedTime = getTime(); + } + if (currentChapter == 4) { + if (roomNumber == 26) + savedTime = getTime(); + } + + if (currentChapter == 4 && roomNumber == 24 && flags[29] == 1) + animation_7_4(); + + if (currentChapter == 5) { + if (roomNumber == 45) + hare_se_ve = 0; + if (roomNumber == 49 && flags[7] == 0) + animation_4_5(); + } + + updateRoom(); +} + +void DrasculaEngine::clearRoom() { + memset(VGA, 0, 64000); + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); + _system->updateScreen(); +} + +bool DrasculaEngine::exitRoom(int l) { + debug(2, "Exiting room from door %d", l); + + int roomNum = 0; + + if (currentChapter == 1) { + if (objectNum[l] == 105 && flags[0] == 0) + talk(442); + else { + updateDoor(l); + if (isDoor[l] != 0) { + gotoObject(roomObjX[l], roomObjY[l]); + trackProtagonist = trackObj[l]; + updateRoom(); + updateScreen(); + characterMoved = 0; + trackProtagonist = trackCharacter_alkeva[l]; + objExit = alapuertakeva[l]; + doBreak = 1; + previousMusic = roomMusic; + + if (objectNum[l] == 105) { + animation_2_1(); + return true; + } + clearRoom(); + sscanf(_targetSurface[l], "%d", &roomNum); + curX = -1; + enterRoom(roomNum); + } + } + } else if (currentChapter == 2) { + updateDoor(l); + if (isDoor[l] != 0) { + gotoObject(roomObjX[l], roomObjY[l]); + characterMoved = 0; + trackProtagonist = trackCharacter_alkeva[l]; + objExit = alapuertakeva[l]; + doBreak = 1; + previousMusic = roomMusic; + if (objectNum[l] == 136) + animation_2_2(); + if (objectNum[l] == 124) + animation_3_2(); + if (objectNum[l] == 173) { + animation_35_2(); + return true; + } if (objectNum[l] == 146 && flags[39] == 1) { + flags[5] = 1; + flags[11] = 1; + } + if (objectNum[l] == 176 && flags[29] == 1) { + flags[29] = 0; + removeObject(kItemEarWithEarPlug); + addObject(kItemEarplugs); + } + clearRoom(); + sscanf(_targetSurface[l], "%d", &roomNum); + curX =- 1; + enterRoom(roomNum); + } + } else if (currentChapter == 3) { + updateDoor(l); + if (isDoor[l] != 0 && visible[l] == 1) { + gotoObject(roomObjX[l], roomObjY[l]); + trackProtagonist = trackObj[l]; + updateRoom(); + updateScreen(); + characterMoved = 0; + trackProtagonist = trackCharacter_alkeva[l]; + objExit = alapuertakeva[l]; + doBreak = 1; + previousMusic = roomMusic; + clearRoom(); + sscanf(_targetSurface[l], "%d", &roomNum); + curX =- 1; + enterRoom(roomNum); + } + } else if (currentChapter == 4) { + updateDoor(l); + if (isDoor[l] != 0) { + gotoObject(roomObjX[l], roomObjY[l]); + trackProtagonist = trackObj[l]; + updateRoom(); + updateScreen(); + characterMoved = 0; + trackProtagonist = trackCharacter_alkeva[l]; + objExit = alapuertakeva[l]; + doBreak = 1; + previousMusic = roomMusic; + + if (objectNum[l] == 108) + gotoObject(171, 78); + clearRoom(); + sscanf(_targetSurface[l], "%d", &roomNum); + curX = -1; + enterRoom(roomNum); + } + } else if (currentChapter == 5) { + updateDoor(l); + if (isDoor[l] != 0 && visible[l] == 1) { + gotoObject(roomObjX[l], roomObjY[l]); + trackProtagonist = trackObj[l]; + updateRoom(); + updateScreen(); + characterMoved = 0; + trackProtagonist = trackCharacter_alkeva[l]; + objExit = alapuertakeva[l]; + doBreak = 1; + previousMusic = roomMusic; + hare_se_ve = 1; + clearRoom(); + sscanf(_targetSurface[l], "%d", &roomNum); + curX = -1; + enterRoom(roomNum); + } + } else if (currentChapter == 6) { + updateDoor(l); + if (isDoor[l] != 0) { + gotoObject(roomObjX[l], roomObjY[l]); + trackProtagonist = trackObj[l]; + updateRoom(); + updateScreen(); + characterMoved = 0; + trackProtagonist = trackCharacter_alkeva[l]; + objExit = alapuertakeva[l]; + doBreak = 1; + previousMusic = roomMusic; + clearRoom(); + sscanf(_targetSurface[l], "%d", &roomNum); + curX = -1; + enterRoom(roomNum); + + if (objExit == 105) + animation_19_6(); + } + } + + return false; +} + +void DrasculaEngine::updateRoom() { + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + updateRefresh_pre(); + if (currentChapter == 3) { + if (flags[0] == 0) + moveCharacters(); + else + copyRect(113, 54, curX - 20, curY - 1, 77, 89, drawSurface3, screenSurface); + } else { + moveCharacters(); + } + updateRefresh(); +} + +void DrasculaEngine::updateDoor(int doorNum) { + if (currentChapter == 1 || currentChapter == 3 || currentChapter == 5 || currentChapter == 6) + return; + else if (currentChapter == 2) { + if (objectNum[doorNum] == 138) + isDoor[doorNum] = flags[0]; + else if (objectNum[doorNum] == 136) + isDoor[doorNum] = flags[8]; + else if (objectNum[doorNum] == 156) + isDoor[doorNum] = flags[16]; + else if (objectNum[doorNum] == 163) + isDoor[doorNum] = flags[17]; + else if (objectNum[doorNum] == 177) + isDoor[doorNum] = flags[15]; + else if (objectNum[doorNum] == 175) + isDoor[doorNum] = flags[40]; + else if (objectNum[doorNum] == 173) + isDoor[doorNum] = flags[36]; + } else if (currentChapter == 4) { + if (objectNum[doorNum] == 101 && flags[0] == 0) + isDoor[doorNum] = 0; + else if (objectNum[doorNum] == 101 && flags[0] == 1 && flags[28] == 1) + isDoor[doorNum] = 1; + else if (objectNum[doorNum] == 103) + isDoor[doorNum] = flags[0]; + else if (objectNum[doorNum] == 104) + isDoor[doorNum] = flags[1]; + else if (objectNum[doorNum] == 105) + isDoor[doorNum] = flags[1]; + else if (objectNum[doorNum] == 106) + isDoor[doorNum] = flags[2]; + else if (objectNum[doorNum] == 107) + isDoor[doorNum] = flags[2]; + else if (objectNum[doorNum] == 110) + isDoor[doorNum] = flags[6]; + else if (objectNum[doorNum] == 114) + isDoor[doorNum] = flags[4]; + else if (objectNum[doorNum] == 115) + isDoor[doorNum] = flags[4]; + else if (objectNum[doorNum] == 116 && flags[5] == 0) + isDoor[doorNum] = 0; + else if (objectNum[doorNum] == 116 && flags[5] == 1 && flags[23] == 1) + isDoor[doorNum] = 1; + else if (objectNum[doorNum] == 117) + isDoor[doorNum] = flags[5]; + else if (objectNum[doorNum] == 120) + isDoor[doorNum] = flags[8]; + else if (objectNum[doorNum] == 122) + isDoor[doorNum] = flags[7]; + } +} + +void DrasculaEngine::openDoor(int nflag, int doorNum) { + if (flags[nflag] == 0) { + if (currentChapter == 1 /*|| currentChapter == 4*/) { + if (nflag != 7) { + playSound(3); + flags[nflag] = 1; + } + } else { + playSound(3); + flags[nflag] = 1; + } + + if (doorNum != NO_DOOR) + updateDoor(doorNum); + updateRoom(); + updateScreen(); + finishSound(); + withoutVerb(); + } +} + +void DrasculaEngine::closeDoor(int nflag, int doorNum) { + if (flags[nflag] == 1) { + playSound(4); + flags[nflag] = 0; + if (doorNum != NO_DOOR) + updateDoor(doorNum); + updateRoom(); + updateScreen(); + finishSound(); + withoutVerb(); + } +} + } // End of namespace Drascula diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp new file mode 100644 index 0000000000..9e5b0aa74d --- /dev/null +++ b/engines/drascula/saveload.cpp @@ -0,0 +1,240 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "drascula/drascula.h" + +namespace Drascula { + +bool DrasculaEngine::saveLoadScreen() { + char names[10][23]; + char file[50]; + char fileEpa[50]; + int n, n2, num_sav = 0, y = 27; + Common::InSaveFile *sav; + + clearRoom(); + + snprintf(fileEpa, 50, "%s.epa", _targetName.c_str()); + if (!(sav = _saveFileMan->openForLoading(fileEpa))) { + Common::OutSaveFile *epa; + if (!(epa = _saveFileMan->openForSaving(fileEpa))) + error("Can't open %s file", fileEpa); + for (n = 0; n < NUM_SAVES; n++) + epa->writeString("*\n"); + epa->finalize(); + delete epa; + if (!(sav = _saveFileMan->openForLoading(fileEpa))) { + error("Can't open %s file", fileEpa); + } + } + for (n = 0; n < NUM_SAVES; n++) + sav->readLine(names[n], 23); + delete sav; + + loadPic("savescr.alg", drawSurface1, HALF_PAL); + + color_abc(kColorLightGreen); + + select[0] = 0; + + for (;;) { + y = 27; + copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + for (n = 0; n < NUM_SAVES; n++) { + print_abc(names[n], 116, y); + y = y + 9; + } + print_abc(select, 117, 15); + setCursorTable(); + updateScreen(); + y = 27; + + updateEvents(); + + if (leftMouseButton == 1) { + delay(50); + for (n = 0; n < NUM_SAVES; n++) { + if (mouseX > 115 && mouseY > y + (9 * n) && mouseX < 115 + 175 && mouseY < y + 10 + (9 * n)) { + strcpy(select, names[n]); + + if (strcmp(select, "*")) + selectionMade = 1; + else { + enterName(); + strcpy(names[n], select); + if (selectionMade == 1) { + snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1); + saveGame(file); + Common::OutSaveFile *tsav; + if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { + error("Can't open %s file", fileEpa); + } + for (n = 0; n < NUM_SAVES; n++) { + tsav->writeString(names[n]); + tsav->writeString("\n"); + } + tsav->finalize(); + delete tsav; + } + } + + print_abc(select, 117, 15); + y = 27; + for (n2 = 0; n2 < NUM_SAVES; n2++) { + print_abc(names[n2], 116, y); + y = y + 9; + } + if (selectionMade == 1) { + snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1); + } + num_sav = n; + } + } + + if (mouseX > 117 && mouseY > 15 && mouseX < 295 && mouseY < 24 && selectionMade == 1) { + enterName(); + strcpy(names[num_sav], select); + print_abc(select, 117, 15); + y = 27; + for (n2 = 0; n2 < NUM_SAVES; n2++) { + print_abc(names[n2], 116, y); + y = y + 9; + } + } + + if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149 && selectionMade == 1) { + if (!loadGame(file)) + return false; + break; + } else if (mouseX > 208 && mouseY > 123 && mouseX < 282 && mouseY < 149 && selectionMade == 1) { + saveGame(file); + Common::OutSaveFile *tsav; + if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { + error("Can't open %s file", fileEpa); + } + for (n = 0; n < NUM_SAVES; n++) { + tsav->writeString(names[n]); + tsav->writeString("\n"); + } + tsav->finalize(); + delete tsav; + } else if (mouseX > 168 && mouseY > 154 && mouseX < 242 && mouseY < 180) + break; + else if (selectionMade == 0) { + print_abc("Please select a slot", 117, 15); + } + updateScreen(); + delay(200); + } + y = 26; + + delay(5); + } + + clearRoom(); + loadPic(roomNumber, drawSurface1, HALF_PAL); + selectionMade = 0; + + return true; +} + +bool DrasculaEngine::loadGame(const char *gameName) { + int l, savedChapter, roomNum = 0; + Common::InSaveFile *sav; + + previousMusic = roomMusic; + menuScreen = 0; + if (currentChapter != 1) + clearRoom(); + + if (!(sav = _saveFileMan->openForLoading(gameName))) { + error("missing savegame file"); + } + + savedChapter = sav->readSint32LE(); + if (savedChapter != currentChapter) { + strcpy(saveName, gameName); + currentChapter = savedChapter - 1; + hay_que_load = 1; + return false; + } + sav->read(currentData, 20); + curX = sav->readSint32LE(); + curY = sav->readSint32LE(); + trackProtagonist = sav->readSint32LE(); + + for (l = 1; l < 43; l++) { + inventoryObjects[l] = sav->readSint32LE(); + } + + for (l = 0; l < NUM_FLAGS; l++) { + flags[l] = sav->readSint32LE(); + } + + takeObject = sav->readSint32LE(); + pickedObject = sav->readSint32LE(); + hay_que_load = 0; + sscanf(currentData, "%d.ald", &roomNum); + enterRoom(roomNum); + withoutVerb(); + + return true; +} + +void DrasculaEngine::saveGame(char gameName[]) { + Common::OutSaveFile *out; + int l; + + if (!(out = _saveFileMan->openForSaving(gameName))) { + error("Unable to open the file"); + } + out->writeSint32LE(currentChapter); + out->write(currentData, 20); + out->writeSint32LE(curX); + out->writeSint32LE(curY); + out->writeSint32LE(trackProtagonist); + + for (l = 1; l < 43; l++) { + out->writeSint32LE(inventoryObjects[l]); + } + + for (l = 0; l < NUM_FLAGS; l++) { + out->writeSint32LE(flags[l]); + } + + out->writeSint32LE(takeObject); + out->writeSint32LE(pickedObject); + + out->finalize(); + if (out->ioFailed()) + warning("Can't write file '%s'. (Disk full?)", gameName); + + delete out; + + playSound(99); + finishSound(); +} + +} // End of namespace Drascula diff --git a/engines/drascula/sound.cpp b/engines/drascula/sound.cpp new file mode 100644 index 0000000000..840d6c7cb5 --- /dev/null +++ b/engines/drascula/sound.cpp @@ -0,0 +1,159 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "drascula/drascula.h" + +namespace Drascula { + +void DrasculaEngine::updateVolume(Audio::Mixer::SoundType soundType, int prevVolume) { + int vol = _mixer->getVolumeForSoundType(soundType) / 16; + if (mouseY < prevVolume && vol < 15) + vol++; + if (mouseY > prevVolume && vol > 0) + vol--; + _mixer->setVolumeForSoundType(soundType, vol * 16); +} + +void DrasculaEngine::volumeControls() { + int masterVolume, voiceVolume, musicVolume; + + copyRect(1, 56, 73, 63, 177, 97, tableSurface, screenSurface); + updateScreen(73, 63, 73, 63, 177, 97, screenSurface); + + masterVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4); + voiceVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4); + musicVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4); + + for (;;) { + updateRoom(); + + copyRect(1, 56, 73, 63, 177, 97, tableSurface, screenSurface); + + copyBackground(183, 56, 82, masterVolume, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4), tableSurface, screenSurface); + copyBackground(183, 56, 138, voiceVolume, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4), tableSurface, screenSurface); + copyBackground(183, 56, 194, musicVolume, 39, 2 + ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4), tableSurface, screenSurface); + + setCursorTable(); + + updateScreen(); + + updateEvents(); + + if (rightMouseButton == 1) { + delay(100); + break; + } + if (leftMouseButton == 1) { + delay(100); + if (mouseX > 80 && mouseX < 121) { + updateVolume(Audio::Mixer::kPlainSoundType, mouseY); + masterVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kPlainSoundType) / 16) * 4); + } + + if (mouseX > 136 && mouseX < 178) { + updateVolume(Audio::Mixer::kSFXSoundType, mouseY); + voiceVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kSFXSoundType) / 16) * 4); + } + + if (mouseX > 192 && mouseX < 233) { + updateVolume(Audio::Mixer::kMusicSoundType, mouseY); + musicVolume = 72 + 61 - ((_mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType) / 16) * 4); + } + } + + } + + updateEvents(); +} + +void DrasculaEngine::playSound(int soundNum) { + char file[20]; + sprintf(file, "s%i.als", soundNum); + + playFile(file); +} + +void DrasculaEngine::finishSound() { + delay(1); + + while (soundIsActive()) + _system->delayMillis(10); +} + +void DrasculaEngine::playMusic(int p) { + AudioCD.stop(); + AudioCD.play(p - 1, 1, 0, 0); +} + +void DrasculaEngine::stopMusic() { + AudioCD.stop(); +} + +int DrasculaEngine::musicStatus() { + return AudioCD.isPlaying(); +} + +void DrasculaEngine::stopSound() { + _mixer->stopHandle(_soundHandle); +} + +void DrasculaEngine::MusicFadeout() { + int org_vol = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType); + for (;;) { + int vol = _mixer->getVolumeForSoundType(Audio::Mixer::kMusicSoundType); + vol -= 10; + if (vol < 0) + vol = 0; + _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, vol); + if (vol == 0) + break; + updateEvents(); + _system->updateScreen(); + _system->delayMillis(50); + } + AudioCD.stop(); + _system->delayMillis(100); + _mixer->setVolumeForSoundType(Audio::Mixer::kMusicSoundType, org_vol); +} + +void DrasculaEngine::playFile(const char *fname) { + if (_arj.open(fname)) { + int soundSize = _arj.size(); + byte *soundData = (byte *)malloc(soundSize); + _arj.seek(32); + _arj.read(soundData, soundSize); + _arj.close(); + + _mixer->playRaw(Audio::Mixer::kSFXSoundType, &_soundHandle, soundData, soundSize - 64, + 11025, Audio::Mixer::FLAG_AUTOFREE | Audio::Mixer::FLAG_UNSIGNED); + } else + warning("playFile: Could not open %s", fname); +} + +bool DrasculaEngine::soundIsActive() { + return _mixer->isSoundHandleActive(_soundHandle); +} + +} // End of namespace Drascula -- cgit v1.2.3 From 7a0feca9e2cb30d410e0c86d0753caffb9db4dc8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Jun 2008 19:44:00 +0000 Subject: Add new files to makefile. svn-id: r32600 --- engines/drascula/module.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/engines/drascula/module.mk b/engines/drascula/module.mk index 2f72855af1..dfe53ca824 100644 --- a/engines/drascula/module.mk +++ b/engines/drascula/module.mk @@ -1,10 +1,18 @@ MODULE := engines/drascula MODULE_OBJS = \ + actors.o \ animation.o \ + converse.o \ detection.o \ drascula.o \ + graphics.o \ + interface.o \ + objects.o \ + palette.o \ rooms.o \ + saveload.o \ + sound.o \ talk.o -- cgit v1.2.3 From 6225e8e416c4b7ccc0a5cfa0ba224119309f67f9 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Sat, 7 Jun 2008 20:00:51 +0000 Subject: Update Drascula's MSVC project files for r32599. svn-id: r32601 --- dists/msvc7/drascula.vcproj | 24 ++++++++++++++++++++++++ dists/msvc71/drascula.vcproj | 24 ++++++++++++++++++++++++ dists/msvc8/drascula.vcproj | 32 ++++++++++++++++++++++++++++++++ dists/msvc9/drascula.vcproj | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 112 insertions(+) diff --git a/dists/msvc7/drascula.vcproj b/dists/msvc7/drascula.vcproj index 3bf3cf94ea..af0b63c76c 100644 --- a/dists/msvc7/drascula.vcproj +++ b/dists/msvc7/drascula.vcproj @@ -96,9 +96,15 @@ + + + + @@ -108,9 +114,27 @@ + + + + + + + + + + + + diff --git a/dists/msvc71/drascula.vcproj b/dists/msvc71/drascula.vcproj index 10a7a52185..e08abd9b35 100644 --- a/dists/msvc71/drascula.vcproj +++ b/dists/msvc71/drascula.vcproj @@ -110,9 +110,15 @@ + + + + @@ -122,9 +128,27 @@ + + + + + + + + + + + + diff --git a/dists/msvc8/drascula.vcproj b/dists/msvc8/drascula.vcproj index 830eb8afe1..1d4d99aa08 100644 --- a/dists/msvc8/drascula.vcproj +++ b/dists/msvc8/drascula.vcproj @@ -160,10 +160,18 @@ + + + + @@ -176,10 +184,34 @@ RelativePath="..\..\engines\drascula\drascula.h" > + + + + + + + + + + + + diff --git a/dists/msvc9/drascula.vcproj b/dists/msvc9/drascula.vcproj index 3bcda49e5d..ab26dd8d37 100644 --- a/dists/msvc9/drascula.vcproj +++ b/dists/msvc9/drascula.vcproj @@ -161,10 +161,18 @@ + + + + @@ -177,10 +185,34 @@ RelativePath="..\..\engines\drascula\drascula.h" > + + + + + + + + + + + + -- cgit v1.2.3 From 9fc94f8cca3e3c70e2bf572c236a337d6cd3b1d8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Jun 2008 20:40:59 +0000 Subject: Make .dat file a bit smaller. svn-id: r32602 --- tools/create_drascula/create_drascula.cpp | 7 ++----- tools/create_drascula/create_drascula.h | 9 ++++++--- tools/create_drascula/staticdata.h | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tools/create_drascula/create_drascula.cpp b/tools/create_drascula/create_drascula.cpp index c2c5b79132..118540db81 100644 --- a/tools/create_drascula/create_drascula.cpp +++ b/tools/create_drascula/create_drascula.cpp @@ -40,9 +40,6 @@ #define DRASCULA_DAT_VER 1 // 1 byte -typedef unsigned char uint8; -typedef unsigned short uint16; - static void writeByte(FILE *fp, uint8 b) { fwrite(&b, 1, 1, fp); } @@ -66,9 +63,9 @@ int main(int argc, char *argv[]) { // Write charmap writeUint16BE(outFile, ARRAYSIZE(charMap)); for (i = 0; i < ARRAYSIZE(charMap); i++) { - writeUint16BE(outFile, charMap[i].inChar); + writeByte(outFile, charMap[i].inChar); writeUint16BE(outFile, charMap[i].mappedChar); - writeUint16BE(outFile, charMap[i].charType); + writeByte(outFile, charMap[i].charType); } // Write item locations diff --git a/tools/create_drascula/create_drascula.h b/tools/create_drascula/create_drascula.h index 3ccda05a2c..ff1281cf0b 100644 --- a/tools/create_drascula/create_drascula.h +++ b/tools/create_drascula/create_drascula.h @@ -45,6 +45,9 @@ #define NUM_TEXTMISC 3 #define NUM_TEXTD1 11 +typedef unsigned char uint8; +typedef unsigned short uint16; + enum Verbs { kVerbDefault = -1, kVerbLook = 1, @@ -69,9 +72,9 @@ struct ItemLocation { }; struct CharInfo { - int inChar; - int mappedChar; - int charType; // 0 - letters, 1 - signs, 2 - accented + char inChar; + uint16 mappedChar; + char charType; // 0 - letters, 1 - signs, 2 - accented }; struct RoomUpdate { diff --git a/tools/create_drascula/staticdata.h b/tools/create_drascula/staticdata.h index 2544b8c7e4..06ca11b419 100644 --- a/tools/create_drascula/staticdata.h +++ b/tools/create_drascula/staticdata.h @@ -44,7 +44,7 @@ const CharInfo charMap[] = { { 'W', 213, 0 }, { 'X', 222, 0 }, { 'Y', 231, 0 }, { 'Z', 240, 0 }, // --------------------------------------- - { 0xa7, 250, 0 }, { ' ', 250, 0 }, + { '\247', 250, 0 }, { ' ', 250, 0 }, // Signs // --------------------------------------- { '.', 6, 1 }, { ',', 15, 1 }, -- cgit v1.2.3 From 09597d028c827654ab805544bb505c69302dd93a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Jun 2008 20:47:52 +0000 Subject: WIP of drascula.dat loading. DISCLAIMER: this is too far from finished. From now drascula.dat is required to run the game, but in the meantime you have to make it by yourself. Do not update DRASCULA_DAT_VER as I want it to be version 1 once all loading will be implemented, but that may lead to some changes similar to r32602. svn-id: r32603 --- engines/drascula/drascula.cpp | 54 ++++++++++++++++++++++++++++++++++++++++ engines/drascula/drascula.h | 17 ++++++++----- engines/drascula/graphics.cpp | 19 ++++++++------- engines/drascula/staticdata.h | 57 ------------------------------------------- 4 files changed, 75 insertions(+), 72 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 835e893d57..e795dee46d 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -70,6 +70,8 @@ DrasculaEngine::DrasculaEngine(OSystem *syst, const DrasculaGameDescription *gam DrasculaEngine::~DrasculaEngine() { delete _rnd; + + free(_charMap); } int DrasculaEngine::init() { @@ -100,6 +102,9 @@ int DrasculaEngine::init() { _lang = 0; } + if (!loadDrasculaDat()) + return 1; + setupRoomsTable(); loadArchives(); @@ -718,4 +723,53 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ updateScreen(); } +bool DrasculaEngine::loadDrasculaDat() { + Common::File in; + + in.open("drascula.dat"); + + if (!in.isOpen()) { + Common::String errorMessage = "You're missing the 'drascula.dat' file. Get it from the ScummVM website"; + GUIErrorMessage(errorMessage); + warning(errorMessage.c_str()); + + return false; + } + + char buf[256]; + int ver; + + in.read(buf, 8); + buf[8] = '\0'; + + if (strcmp(buf, "DRASCULA")) { + Common::String errorMessage = "File 'drascula.dat' is corrupt. Get it from the ScummVM website"; + GUIErrorMessage(errorMessage); + warning(errorMessage.c_str()); + + return false; + } + + ver = in.readByte(); + + if (ver != DRASCULA_DAT_VER) { + snprintf(buf, 256, "File 'drascula.dat' is wrong version. Expected %d but got %d. Get it from the ScummVM website", DRASCULA_DAT_VER, ver); + GUIErrorMessage(buf); + warning(buf); + + return false; + } + + _charMapSize = in.readUint16BE(); + _charMap = (CharInfo *)malloc(sizeof(CharInfo) * _charMapSize); + + for (int i = 0; i < _charMapSize; i++) { + _charMap[i].inChar = in.readByte(); + _charMap[i].mappedChar = in.readUint16BE(); + _charMap[i].charType = in.readByte(); + } + + return true; +} + } // End of namespace Drascula diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 8167fc136a..a5c1d4262f 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -46,6 +46,9 @@ namespace Drascula { +// Do not update this yet. The file is not loaded fully +#define DRASCULA_DAT_VER 1 + enum DrasculaGameFeatures { GF_PACKED = (1 << 0) }; @@ -174,12 +177,11 @@ struct ItemLocation { }; struct CharInfo { - int inChar; - int mappedChar; - int charType; // 0 - letters, 1 - signs, 2 - accented + byte inChar; + uint16 mappedChar; + byte charType; // 0 - letters, 1 - signs, 2 - accented }; -#define CHARMAP_SIZE 93 #define NUM_SAVES 10 #define NUM_FLAGS 50 #define DIF_MASK 55 @@ -356,6 +358,8 @@ public: int leftMouseButton; int rightMouseButton; + bool loadDrasculaDat(); + bool runCurrentChapter(); void black(); void pickObject(int); @@ -671,6 +675,9 @@ public: private: int _lang; + + CharInfo *_charMap; + int _charMapSize; }; extern const char *_text[][501]; @@ -695,8 +702,6 @@ extern const int x_pol[44], y_pol[44]; extern const int verbBarX[]; extern const int x1d_menu[], y1d_menu[]; -extern const CharInfo charMap[]; - } // End of namespace Drascula #endif /* DRASCULA_H */ diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 803b26f96d..38a324fff7 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -234,17 +234,18 @@ void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int wi void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { int textPos[8]; - int letterY = 0, letterX = 0, c, i; + int letterY = 0, letterX = 0, i; uint len = strlen(said); + byte c; for (uint h = 0; h < len; h++) { c = toupper(said[h]); - for (i = 0; i < CHARMAP_SIZE; i++) { - if (c == charMap[i].inChar) { - letterX = charMap[i].mappedChar; + for (i = 0; i < _charMapSize; i++) { + if (c == _charMap[i].inChar) { + letterX = _charMap[i].mappedChar; - switch (charMap[i].charType) { + switch (_charMap[i].charType) { case 0: // letters letterY = (_lang == kSpanish) ? 149 : 158; break; @@ -301,16 +302,16 @@ void DrasculaEngine::print_abc_opc(const char *said, int screenX, int screenY, i if (c == '\'') c = '\244'; - for (int i = 0; i < CHARMAP_SIZE; i++) { - if (c == charMap[i].inChar) { + for (int i = 0; i < _charMapSize; i++) { + if (c == _charMap[i].inChar) { // Convert the mapped char of the normal font to the // mapped char of the dialogue font - int multiplier = (charMap[i].mappedChar - 6) / 9; + int multiplier = (_charMap[i].mappedChar - 6) / 9; letterX = multiplier * 7 + 10; - if (charMap[i].charType > 0) + if (_charMap[i].charType > 0) letterY = signY; break; } // if diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index dc289fb4ce..3cf8f0f2c9 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -30,63 +30,6 @@ namespace Drascula { -const CharInfo charMap[CHARMAP_SIZE] = { - // Letters - // --------------------------------------- - { 'A', 6, 0 }, { 'B', 15, 0 }, - { 'C', 24, 0 }, { 'D', 33, 0 }, - { 'E', 42, 0 }, { 'F', 51, 0 }, - { 'G', 60, 0 }, { 'H', 69, 0 }, - { 'I', 78, 0 }, { 'J', 87, 0 }, - { 'K', 96, 0 }, { 'L', 105, 0 }, - { 'M', 114, 0 }, { 'N', 123, 0 }, - { '\244', 132, 0 }, { '\245', 132, 0 }, // special Spanish char - { 'O', 141, 0 }, { 'P', 150, 0 }, - { 'Q', 159, 0 }, { 'R', 168, 0 }, - { 'S', 177, 0 }, { 'T', 186, 0 }, - { 'U', 195, 0 }, { 'V', 204, 0 }, - { 'W', 213, 0 }, { 'X', 222, 0 }, - { 'Y', 231, 0 }, { 'Z', 240, 0 }, - // --------------------------------------- - { 0xa7, 250, 0 }, { ' ', 250, 0 }, - // Signs - // --------------------------------------- - { '.', 6, 1 }, { ',', 15, 1 }, - { '-', 24, 1 }, { '?', 33, 1 }, - { '\250', 42, 1 }, { '"', 51, 1 }, - { '!', 60, 1 }, { '\255', 69, 1 }, - { ';', 78, 1 }, { '>', 87, 1 }, - { '<', 96, 1 }, { '$', 105, 1 }, - { '%', 114, 1 }, { ':', 123, 1 }, - { '&', 132, 1 }, { '/', 141, 1 }, - { '(', 150, 1 }, { ')', 159, 1 }, - { '*', 168, 1 }, { '+', 177, 1 }, - { '1', 186, 1 }, { '2', 195, 1 }, - { '3', 204, 1 }, { '4', 213, 1 }, - { '5', 222, 1 }, { '6', 231, 1 }, - { '7', 240, 1 }, { '8', 249, 1 }, - { '9', 258, 1 }, { '0', 267, 1 }, - // Accented - // --------------------------------------- - { '\240', 6, 2 }, { '\202', 15, 2 }, // A, B - { '\241', 24, 2 }, { '\242', 33, 2 }, // C, D - { '\243', 42, 2 }, { '\205', 51, 2 }, // E, F - { '\212', 60, 2 }, { '\215', 69, 2 }, // G, H - { '\225', 78, 2 }, { '\227', 87, 2 }, // I, J - { '\203', 96, 2 }, { '\210', 105, 2 }, // K, L - { '\214', 114, 2 }, { '\223', 123, 2 }, // M, N - { '\226', 132, 2 }, { '\'', 141, 2 }, // special Spanish char, O - { '\200', 150, 2 }, { '\207', 150, 2 }, // P, P - { '\265', 6, 2 }, { '\220', 15, 2 }, // A, B - { '\326', 24, 2 }, { '\340', 33, 2 }, // C, D - { '\351', 42, 2 }, { '\267', 51, 2 }, // E, F - { '\324', 60, 2 }, { '\336', 69, 2 }, // G, H - { '\343', 78, 2 }, { '\353', 87, 2 }, // I, J - { '\266', 96, 2 }, { '\322', 105, 2 }, // K, L - { '\327', 114, 2 }, { '\342', 123, 2 }, // M, N - { '\352', 132, 2 } // special Spanish char -}; - const ItemLocation itemLocations[] = { { 0, 0 }, // empty { 5, 10 }, { 50, 10 }, { 95, 10 }, // 1-3 -- cgit v1.2.3 From 8a0566de14eddca31d67704a1a2d31831bc08ff2 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Jun 2008 21:02:03 +0000 Subject: Add stubs for .dat file loading svn-id: r32605 --- engines/drascula/drascula.cpp | 83 +++++++++++++++++++++++++++++++++++++++++++ engines/drascula/drascula.h | 13 +++++++ 2 files changed, 96 insertions(+) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index e795dee46d..93e46d4ea3 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -769,6 +769,89 @@ bool DrasculaEngine::loadDrasculaDat() { _charMap[i].charType = in.readByte(); } + _itemLocationsSize = in.readUint16BE(); + for (int i = 0; i < _itemLocationsSize; i++) { + in.readUint16BE(); + in.readUint16BE(); + } + + _xPolSize = in.readUint16BE(); + for (int i = 0; i < _xPolSize; i++) { + in.readUint16BE(); + in.readUint16BE(); + } + + _verbBarXSize = in.readUint16BE(); + for (int i = 0; i < _verbBarXSize; i++) { + in.readUint16BE(); + } + + _x1dMenuSize = in.readUint16BE(); + for (int i = 0; i < _x1dMenuSize; i++) { + in.readUint16BE(); + in.readUint16BE(); + } + + _frameXSize = in.readUint16BE(); + for (int i = 0; i < _frameXSize; i++) { + in.readUint16BE(); + } + + _candleXSize = in.readUint16BE(); + for (int i = 0; i < _candleXSize; i++) { + in.readUint16BE(); + in.readUint16BE(); + } + + _pianistXSize = in.readUint16BE(); + for (int i = 0; i < _pianistXSize; i++) { + in.readUint16BE(); + } + + _drunkXSize = in.readUint16BE(); + for (int i = 0; i < _drunkXSize; i++) { + in.readUint16BE(); + } + + _roomPreUpdatesSize = in.readUint16BE(); + for (int i = 0; i < _roomPreUpdatesSize; i++) { + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + } + + _roomUpdatesSize = in.readUint16BE(); + for (int i = 0; i < _roomUpdatesSize; i++) { + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + } + + _roomActionsSize = in.readUint16BE(); + for (int i = 0; i < _roomActionsSize; i++) { + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + in.readUint16BE(); + } + + _numLangs = in.readUint16BE(); + return true; } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index a5c1d4262f..d3b0405ada 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -678,6 +678,19 @@ private: CharInfo *_charMap; int _charMapSize; + + int _itemLocationsSize; + int _xPolSize; + int _verbBarXSize; + int _x1dMenuSize; + int _frameXSize; + int _candleXSize; + int _pianistXSize; + int _drunkXSize; + int _roomPreUpdatesSize; + int _roomUpdatesSize; + int _roomActionsSize; + int _numLangs; }; extern const char *_text[][501]; -- cgit v1.2.3 From 5bdcec23d845082e8a21da6629eb66bbf3f69a69 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 7 Jun 2008 21:10:19 +0000 Subject: Preparations for optimal memory allocation on reading. svn-id: r32606 --- tools/create_drascula/create_drascula.cpp | 91 +++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) diff --git a/tools/create_drascula/create_drascula.cpp b/tools/create_drascula/create_drascula.cpp index 118540db81..000122c485 100644 --- a/tools/create_drascula/create_drascula.cpp +++ b/tools/create_drascula/create_drascula.cpp @@ -52,6 +52,7 @@ static void writeUint16BE(FILE *fp, uint16 value) { int main(int argc, char *argv[]) { FILE* outFile; int i, lang; + int len; outFile = fopen("drascula.dat", "wb"); @@ -169,6 +170,12 @@ int main(int argc, char *argv[]) { // Write _text writeUint16BE(outFile, NUM_TEXT); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXT; i++) { + len += strlen(_text[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXT; i++) { writeUint16BE(outFile, strlen(_text[lang][i])); fwrite(_text[lang][i], strlen(_text[lang][i]), 1, outFile); @@ -178,6 +185,12 @@ int main(int argc, char *argv[]) { // Write _textd writeUint16BE(outFile, NUM_TEXTD); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTD; i++) { + len += strlen(_textd[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTD; i++) { writeUint16BE(outFile, strlen(_textd[lang][i])); fwrite(_textd[lang][i], strlen(_textd[lang][i]), 1, outFile); @@ -187,6 +200,12 @@ int main(int argc, char *argv[]) { // Write _textb writeUint16BE(outFile, NUM_TEXTB); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTB; i++) { + len += strlen(_textb[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTB; i++) { writeUint16BE(outFile, strlen(_textb[lang][i])); fwrite(_textb[lang][i], strlen(_textb[lang][i]), 1, outFile); @@ -196,6 +215,12 @@ int main(int argc, char *argv[]) { // Write _textbj writeUint16BE(outFile, NUM_TEXTBJ); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTBJ; i++) { + len += strlen(_textbj[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTBJ; i++) { writeUint16BE(outFile, strlen(_textbj[lang][i])); fwrite(_textbj[lang][i], strlen(_textbj[lang][i]), 1, outFile); @@ -205,6 +230,12 @@ int main(int argc, char *argv[]) { // Write _texte writeUint16BE(outFile, NUM_TEXTE); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTE; i++) { + len += strlen(_texte[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTE; i++) { writeUint16BE(outFile, strlen(_texte[lang][i])); fwrite(_texte[lang][i], strlen(_texte[lang][i]), 1, outFile); @@ -214,6 +245,12 @@ int main(int argc, char *argv[]) { // Write _texti writeUint16BE(outFile, NUM_TEXTI); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTI; i++) { + len += strlen(_texti[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTI; i++) { writeUint16BE(outFile, strlen(_texti[lang][i])); fwrite(_texti[lang][i], strlen(_texti[lang][i]), 1, outFile); @@ -223,6 +260,12 @@ int main(int argc, char *argv[]) { // Write _textl writeUint16BE(outFile, NUM_TEXTL); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTL; i++) { + len += strlen(_textl[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTL; i++) { writeUint16BE(outFile, strlen(_textl[lang][i])); fwrite(_textl[lang][i], strlen(_textl[lang][i]), 1, outFile); @@ -232,6 +275,12 @@ int main(int argc, char *argv[]) { // Write _textp writeUint16BE(outFile, NUM_TEXTP); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTP; i++) { + len += strlen(_textp[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTP; i++) { writeUint16BE(outFile, strlen(_textp[lang][i])); fwrite(_textp[lang][i], strlen(_textp[lang][i]), 1, outFile); @@ -241,6 +290,12 @@ int main(int argc, char *argv[]) { // Write _textt writeUint16BE(outFile, NUM_TEXTT); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTT; i++) { + len += strlen(_textt[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTT; i++) { writeUint16BE(outFile, strlen(_textt[lang][i])); fwrite(_textt[lang][i], strlen(_textt[lang][i]), 1, outFile); @@ -250,6 +305,12 @@ int main(int argc, char *argv[]) { // Write _textvb writeUint16BE(outFile, NUM_TEXTVB); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTVB; i++) { + len += strlen(_textvb[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTVB; i++) { writeUint16BE(outFile, strlen(_textvb[lang][i])); fwrite(_textvb[lang][i], strlen(_textvb[lang][i]), 1, outFile); @@ -259,6 +320,12 @@ int main(int argc, char *argv[]) { // Write _textsys writeUint16BE(outFile, NUM_TEXTSYS); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTSYS; i++) { + len += strlen(_textsys[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTSYS; i++) { writeUint16BE(outFile, strlen(_textsys[lang][i])); fwrite(_textsys[lang][i], strlen(_textsys[lang][i]), 1, outFile); @@ -268,6 +335,12 @@ int main(int argc, char *argv[]) { // Write _texthis writeUint16BE(outFile, NUM_TEXTHIS); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTHIS; i++) { + len += strlen(_texthis[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTHIS; i++) { writeUint16BE(outFile, strlen(_texthis[lang][i])); fwrite(_texthis[lang][i], strlen(_texthis[lang][i]), 1, outFile); @@ -277,6 +350,12 @@ int main(int argc, char *argv[]) { // Write _textverbs writeUint16BE(outFile, NUM_TEXTVERBS); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTVERBS; i++) { + len += strlen(_textverbs[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTVERBS; i++) { writeUint16BE(outFile, strlen(_textverbs[lang][i])); fwrite(_textverbs[lang][i], strlen(_textverbs[lang][i]), 1, outFile); @@ -286,6 +365,12 @@ int main(int argc, char *argv[]) { // Write _textmisc writeUint16BE(outFile, NUM_TEXTMISC); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTMISC; i++) { + len += strlen(_textmisc[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTMISC; i++) { writeUint16BE(outFile, strlen(_textmisc[lang][i])); fwrite(_textmisc[lang][i], strlen(_textmisc[lang][i]), 1, outFile); @@ -295,6 +380,12 @@ int main(int argc, char *argv[]) { // Write _textd1 writeUint16BE(outFile, NUM_TEXTD1); for (lang = 0; lang < NUM_LANGS; lang++) { + len = 0; + for (i = 0; i < NUM_TEXTD1; i++) { + len += strlen(_textd1[lang][i]) + 2; + } + writeUint16BE(outFile, len); + for (i = 0; i < NUM_TEXTD1; i++) { writeUint16BE(outFile, strlen(_textd1[lang][i])); fwrite(_textd1[lang][i], strlen(_textd1[lang][i]), 1, outFile); -- cgit v1.2.3 From ee1dfa3f3d75fbf28453b6cb3f55166ce88dbe2b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jun 2008 02:00:34 +0000 Subject: Initialize _charMap to avoid crash when drascula.dat doesn't exist svn-id: r32607 --- engines/drascula/drascula.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 93e46d4ea3..a30698a3f0 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -102,6 +102,7 @@ int DrasculaEngine::init() { _lang = 0; } + _charMap = 0; if (!loadDrasculaDat()) return 1; -- cgit v1.2.3 From b050430b41109d9ce9fabd3f1d98ad5dc4f54474 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jun 2008 02:02:06 +0000 Subject: Don't attempt to close the arj file if it hasn't been opened svn-id: r32608 --- common/unarj.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/unarj.cpp b/common/unarj.cpp index 942e659caa..f3ac20c285 100644 --- a/common/unarj.cpp +++ b/common/unarj.cpp @@ -289,6 +289,9 @@ bool ArjFile::open(const Common::String &filename, AccessMode mode) { } void ArjFile::close() { + if (!_isOpen) + return; + _isOpen = false; if (_fallBack) { -- cgit v1.2.3 From 6c5d005edc9b960dccd8dd56b1a8004834f40127 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jun 2008 03:09:21 +0000 Subject: Cleanup svn-id: r32609 --- engines/drascula/actors.cpp | 21 ++----------- engines/drascula/animation.cpp | 9 +----- engines/drascula/graphics.cpp | 67 ++++++++++-------------------------------- engines/drascula/talk.cpp | 8 +---- 4 files changed, 20 insertions(+), 85 deletions(-) diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp index 166ba49930..d831104fac 100644 --- a/engines/drascula/actors.cpp +++ b/engines/drascula/actors.cpp @@ -28,9 +28,8 @@ namespace Drascula { void DrasculaEngine::placeIgor() { - int pos_igor[6]; + int pos_igor[6] = { 1, 0, igorX, igorY, 54, 61 }; - pos_igor[0] = 1; if (currentChapter == 4) { pos_igor[1] = 138; } else { @@ -39,16 +38,12 @@ void DrasculaEngine::placeIgor() { else if (trackIgor == 1) pos_igor[1] = 76; } - pos_igor[2] = igorX; - pos_igor[3] = igorY; - pos_igor[4] = 54; - pos_igor[5] = 61; copyRectClip(pos_igor, frontSurface, screenSurface); } void DrasculaEngine::placeDrascula() { - int pos_dr[6]; + int pos_dr[6] = { 0, 122, drasculaX, drasculaY, 45, 77 }; if (trackDrascula == 1) pos_dr[0] = 47; @@ -56,11 +51,6 @@ void DrasculaEngine::placeDrascula() { pos_dr[0] = 1; else if (trackDrascula == 3 && currentChapter == 1) pos_dr[0] = 93; - pos_dr[1] = 122; - pos_dr[2] = drasculaX; - pos_dr[3] = drasculaY; - pos_dr[4] = 45; - pos_dr[5] = 77; if (currentChapter == 6) copyRectClip(pos_dr, drawSurface2, screenSurface); @@ -69,17 +59,12 @@ void DrasculaEngine::placeDrascula() { } void DrasculaEngine::placeBJ() { - int pos_bj[6]; + int pos_bj[6] = { 0, 99, bjX, bjY, 26, 76 }; if (trackBJ == 3) pos_bj[0] = 10; else if (trackBJ == 0) pos_bj[0] = 37; - pos_bj[1] = 99; - pos_bj[2] = bjX; - pos_bj[3] = bjY; - pos_bj[4] = 26; - pos_bj[5] = 76; copyRectClip(pos_bj, drawSurface3, screenSurface); } diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 1c0cc5967d..66f903e3e3 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -812,18 +812,11 @@ void DrasculaEngine::animation_10_2() { } void DrasculaEngine::animation_14_2() { - int cabinPos[6]; + int cabinPos[6] = { 150, 6, 69, -160, 158, 161 }; int l = 0; loadPic("an14_2.alg", backSurface); - cabinPos[0] = 150; - cabinPos[1] = 6; - cabinPos[2] = 69; - cabinPos[3] = -160; - cabinPos[4] = 158; - cabinPos[5] = 161; - for (int n = -160; n <= 0; n = n + 5 + l) { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 38a324fff7..a2b4527015 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -58,8 +58,6 @@ void DrasculaEngine::freeMemory() { } void DrasculaEngine::moveCursor() { - int cursorPos[8]; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); updateRefresh_pre(); @@ -78,25 +76,12 @@ void DrasculaEngine::moveCursor() { else if (menuBar == 1) clearMenu(); - cursorPos[0] = 0; - cursorPos[1] = 0; - cursorPos[2] = mouseX - 20; - cursorPos[3] = mouseY - 17; - cursorPos[4] = OBJWIDTH; - cursorPos[5] = OBJHEIGHT; + int cursorPos[6] = { 0, 0, mouseX - 20, mouseY - 17, OBJWIDTH, OBJHEIGHT }; copyRectClip(cursorPos, drawSurface3, screenSurface); } void DrasculaEngine::setCursorTable() { - int cursorPos[8]; - - cursorPos[0] = 225; - cursorPos[1] = 56; - cursorPos[2] = mouseX - 20; - cursorPos[3] = mouseY - 12; - cursorPos[4] = 40; - cursorPos[5] = 25; - + int cursorPos[6] = { 225, 56, mouseX - 20, mouseY - 12, 40, 25 }; copyRectClip(cursorPos, tableSurface, screenSurface); } @@ -233,7 +218,6 @@ void DrasculaEngine::updateScreen(int xorg, int yorg, int xdes, int ydes, int wi } void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { - int textPos[8]; int letterY = 0, letterX = 0, i; uint len = strlen(said); byte c; @@ -260,13 +244,7 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { } // if } // for - textPos[0] = letterX; - textPos[1] = letterY; - textPos[2] = screenX; - textPos[3] = screenY; - textPos[4] = CHAR_WIDTH; - textPos[5] = CHAR_HEIGHT; - + int textPos[6] = { letterX, letterY, screenX, screenY, CHAR_WIDTH, CHAR_HEIGHT }; copyRectClip(textPos, textSurface, screenSurface); screenX = screenX + CHAR_WIDTH; @@ -278,7 +256,6 @@ void DrasculaEngine::print_abc(const char *said, int screenX, int screenY) { } void DrasculaEngine::print_abc_opc(const char *said, int screenX, int screenY, int game) { - int textPos[6]; int signY, letterY, letterX = 0; uint len = strlen(said); @@ -317,13 +294,7 @@ void DrasculaEngine::print_abc_opc(const char *said, int screenX, int screenY, i } // if } // for - textPos[0] = letterX; - textPos[1] = letterY; - textPos[2] = screenX; - textPos[3] = screenY; - textPos[4] = CHAR_WIDTH_OPC; - textPos[5] = CHAR_HEIGHT_OPC; - + int textPos[6] = { letterX, letterY, screenX, screenY, CHAR_WIDTH_OPC, CHAR_HEIGHT_OPC }; copyRectClip(textPos, backSurface, screenSurface); screenX = screenX + CHAR_WIDTH_OPC; @@ -555,48 +526,40 @@ int DrasculaEngine::playFrameSSN() { mSession += 4; } if (CMP == kFrameCmpRle) { + BufferSSN = (byte *)malloc(Lengt); if (!UsingMem) { - BufferSSN = (byte *)malloc(Lengt); _arj.read(BufferSSN, Lengt); } else { - BufferSSN = (byte *)malloc(Lengt); memcpy(BufferSSN, mSession, Lengt); mSession += Lengt; } Des_RLE(BufferSSN, MiVideoSSN); free(BufferSSN); - if (FrameSSN) { - WaitFrameSSN(); - MixVideo(VGA, MiVideoSSN); - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - } else { - WaitFrameSSN(); + WaitFrameSSN(); + if (FrameSSN) + MixVideo(VGA, MiVideoSSN); + else memcpy(VGA, MiVideoSSN, 64000); - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - } + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); _system->updateScreen(); FrameSSN++; } else { if (CMP == kFrameCmpOff) { + BufferSSN = (byte *)malloc(Lengt); if (!UsingMem) { - BufferSSN = (byte *)malloc(Lengt); _arj.read(BufferSSN, Lengt); } else { - BufferSSN = (byte *)malloc(Lengt); memcpy(BufferSSN, mSession, Lengt); mSession += Lengt; } Des_OFF(BufferSSN, MiVideoSSN, Lengt); free(BufferSSN); - if (FrameSSN) { - WaitFrameSSN(); + WaitFrameSSN(); + if (FrameSSN) MixVideo(VGA, MiVideoSSN); - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - } else { - WaitFrameSSN(); + else memcpy(VGA, MiVideoSSN, 64000); - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - } + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); _system->updateScreen(); FrameSSN++; } diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 95765fe867..6aa09b2505 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -575,7 +575,7 @@ void DrasculaEngine::talk_blind(int index) { byte *faceBuffer; int p = 0; - int pos_blind[6]; + int pos_blind[6] = { 0, 2, 73, 1, 126, 149 }; int length = strlen(said); color_abc(kColorBrown); @@ -585,12 +585,6 @@ void DrasculaEngine::talk_blind(int index) { talkInit(filename); - pos_blind[1] = 2; - pos_blind[2] = 73; - pos_blind[3] = 1; - pos_blind[4] = 126; - pos_blind[5] = 149; - do { copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); pos_blind[5] = 149; -- cgit v1.2.3 From cd0683e8d588e2d64d4fe2bb5fc70023bf586ce7 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 8 Jun 2008 05:42:21 +0000 Subject: Implement data padding svn-id: r32610 --- tools/create_drascula/create_drascula.cpp | 66 ++++++++++++++++++++++++++++++- tools/create_drascula/create_drascula.h | 2 + 2 files changed, 67 insertions(+), 1 deletion(-) diff --git a/tools/create_drascula/create_drascula.cpp b/tools/create_drascula/create_drascula.cpp index 000122c485..14e50165d0 100644 --- a/tools/create_drascula/create_drascula.cpp +++ b/tools/create_drascula/create_drascula.cpp @@ -52,7 +52,8 @@ static void writeUint16BE(FILE *fp, uint16 value) { int main(int argc, char *argv[]) { FILE* outFile; int i, lang; - int len; + int len, pad; + uint8 padBuf[DATAALIGNMENT]; outFile = fopen("drascula.dat", "wb"); @@ -164,6 +165,9 @@ int main(int argc, char *argv[]) { writeUint16BE(outFile, roomActions[i].speechID); } + for (i = 0; i < DATAALIGNMENT; i++) + padBuf[i] = 0; + // langs writeUint16BE(outFile, NUM_LANGS); @@ -173,12 +177,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXT; i++) { len += strlen(_text[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXT; i++) { writeUint16BE(outFile, strlen(_text[lang][i])); fwrite(_text[lang][i], strlen(_text[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -188,12 +196,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTD; i++) { len += strlen(_textd[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTD; i++) { writeUint16BE(outFile, strlen(_textd[lang][i])); fwrite(_textd[lang][i], strlen(_textd[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -203,12 +215,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTB; i++) { len += strlen(_textb[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTB; i++) { writeUint16BE(outFile, strlen(_textb[lang][i])); fwrite(_textb[lang][i], strlen(_textb[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -218,12 +234,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTBJ; i++) { len += strlen(_textbj[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTBJ; i++) { writeUint16BE(outFile, strlen(_textbj[lang][i])); fwrite(_textbj[lang][i], strlen(_textbj[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -233,12 +253,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTE; i++) { len += strlen(_texte[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTE; i++) { writeUint16BE(outFile, strlen(_texte[lang][i])); fwrite(_texte[lang][i], strlen(_texte[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -248,12 +272,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTI; i++) { len += strlen(_texti[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTI; i++) { writeUint16BE(outFile, strlen(_texti[lang][i])); fwrite(_texti[lang][i], strlen(_texti[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -263,12 +291,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTL; i++) { len += strlen(_textl[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTL; i++) { writeUint16BE(outFile, strlen(_textl[lang][i])); fwrite(_textl[lang][i], strlen(_textl[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -278,12 +310,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTP; i++) { len += strlen(_textp[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTP; i++) { writeUint16BE(outFile, strlen(_textp[lang][i])); fwrite(_textp[lang][i], strlen(_textp[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -293,12 +329,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTT; i++) { len += strlen(_textt[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTT; i++) { writeUint16BE(outFile, strlen(_textt[lang][i])); fwrite(_textt[lang][i], strlen(_textt[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -308,12 +348,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTVB; i++) { len += strlen(_textvb[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTVB; i++) { writeUint16BE(outFile, strlen(_textvb[lang][i])); fwrite(_textvb[lang][i], strlen(_textvb[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -323,12 +367,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTSYS; i++) { len += strlen(_textsys[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTSYS; i++) { writeUint16BE(outFile, strlen(_textsys[lang][i])); fwrite(_textsys[lang][i], strlen(_textsys[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -338,12 +386,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTHIS; i++) { len += strlen(_texthis[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTHIS; i++) { writeUint16BE(outFile, strlen(_texthis[lang][i])); fwrite(_texthis[lang][i], strlen(_texthis[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -353,12 +405,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTVERBS; i++) { len += strlen(_textverbs[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTVERBS; i++) { writeUint16BE(outFile, strlen(_textverbs[lang][i])); fwrite(_textverbs[lang][i], strlen(_textverbs[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -368,12 +424,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTMISC; i++) { len += strlen(_textmisc[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTMISC; i++) { writeUint16BE(outFile, strlen(_textmisc[lang][i])); fwrite(_textmisc[lang][i], strlen(_textmisc[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } @@ -383,12 +443,16 @@ int main(int argc, char *argv[]) { len = 0; for (i = 0; i < NUM_TEXTD1; i++) { len += strlen(_textd1[lang][i]) + 2; + pad = len % DATAALIGNMENT; + len += pad; } writeUint16BE(outFile, len); for (i = 0; i < NUM_TEXTD1; i++) { writeUint16BE(outFile, strlen(_textd1[lang][i])); fwrite(_textd1[lang][i], strlen(_textd1[lang][i]), 1, outFile); + + fwrite(padBuf, pad, 1, outFile); } } diff --git a/tools/create_drascula/create_drascula.h b/tools/create_drascula/create_drascula.h index ff1281cf0b..0c6a5774df 100644 --- a/tools/create_drascula/create_drascula.h +++ b/tools/create_drascula/create_drascula.h @@ -28,6 +28,8 @@ #define ARRAYSIZE(x) ((int)(sizeof(x) / sizeof(x[0]))) +#define DATAALIGNMENT 4 + #define NUM_LANGS 5 #define NUM_TEXT 501 #define NUM_TEXTD 84 -- cgit v1.2.3 From 99b7c8eb435c628af398f7305a35d879280a0de2 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sun, 8 Jun 2008 07:05:22 +0000 Subject: Use _system->quit() instead of exit(0). svn-id: r32611 --- engines/drascula/drascula.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index a30698a3f0..d014f2e791 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -635,7 +635,7 @@ void DrasculaEngine::updateEvents() { case Common::EVENT_QUIT: // TODO quitGame(); - exit(0); + _system->quit(); break; default: break; -- cgit v1.2.3 From af7472642089e52e16c7e39428b44c39e997841f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jun 2008 10:56:44 +0000 Subject: Grouped all the different draw buffers/pointers together svn-id: r32612 --- engines/drascula/drascula.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index d3b0405ada..4501d73134 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -275,8 +275,8 @@ public: DacPalette256 brightPalette; DacPalette256 darkPalette; + // Graphics buffers/pointers byte *VGA; - byte *drawSurface1; byte *backSurface; byte *drawSurface3; @@ -287,9 +287,14 @@ public: byte *frontSurface; byte *textSurface; byte *pendulumSurface; + byte *pcxBuffer; + byte *AuxBuffOrg; + byte *AuxBuffDes; + byte *pointer; + byte *MiVideoSSN; + byte *mSession; byte cPal[768]; - byte *pcxBuffer; Common::ArjFile _arj; @@ -468,15 +473,9 @@ public: byte *TryInMem(); int playFrameSSN(); - byte *AuxBuffOrg; - byte *AuxBuffDes; - - byte *pointer; int UsingMem; byte CHUNK; byte CMP, dacSSN[768]; - byte *MiVideoSSN; - byte *mSession; int FrameSSN; int globalSpeed; uint32 LastFrame; -- cgit v1.2.3 From 5880defea4cdc3ea8e621769c34f46be724c6e66 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jun 2008 11:10:00 +0000 Subject: Removed the useless pcxBuffer buffer and auxPun pointer and fixed an off-by-one error in the PCX decoding routine svn-id: r32613 --- engines/drascula/drascula.h | 1 - engines/drascula/graphics.cpp | 11 ++++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 4501d73134..08aa44ce58 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -287,7 +287,6 @@ public: byte *frontSurface; byte *textSurface; byte *pendulumSurface; - byte *pcxBuffer; byte *AuxBuffOrg; byte *AuxBuffDes; byte *pointer; diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index a2b4527015..22d32b42ca 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -89,14 +89,11 @@ void DrasculaEngine::loadPic(const char *NamePcc, byte *targetSurface, int color unsigned int con, x = 0; unsigned int fExit = 0; byte ch, rep; - byte *auxPun; _arj.open(NamePcc); if (!_arj.isOpen()) error("missing game data %s %c", NamePcc, 7); - pcxBuffer = (byte *)malloc(65000); - auxPun = pcxBuffer; _arj.seek(128); while (!fExit) { ch = _arj.readByte(); @@ -106,18 +103,18 @@ void DrasculaEngine::loadPic(const char *NamePcc, byte *targetSurface, int color ch = _arj.readByte(); } for (con = 0; con < rep; con++) { - *auxPun++ = ch; x++; - if (x > 64000) + if (x > 64000) { fExit = 1; + break; + } + *targetSurface++ = ch; } } _arj.read(cPal, 768); _arj.close(); - memcpy(targetSurface, pcxBuffer, 64000); - free(pcxBuffer); setRGB((byte *)cPal, colorCount); } -- cgit v1.2.3 From dcde2f7a9670b399f617f5599d0ba7e4dd6bfcc0 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jun 2008 11:26:48 +0000 Subject: The pendulumSurface pointer is only used in update_102() svn-id: r32614 --- engines/drascula/drascula.cpp | 2 -- engines/drascula/drascula.h | 1 - engines/drascula/rooms.cpp | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index d014f2e791..b041bddbf6 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -189,8 +189,6 @@ int DrasculaEngine::go() { actorFrames[kFramePendulum] = 0; flag_tv = 0; - pendulumSurface = drawSurface3; - loadPic(96, frontSurface, COMPLETE_PAL); loadPic(99, backSurface); loadPic(97, extraSurface); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 08aa44ce58..5d0636d27d 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -286,7 +286,6 @@ public: byte *screenSurface; byte *frontSurface; byte *textSurface; - byte *pendulumSurface; byte *AuxBuffOrg; byte *AuxBuffDes; byte *pointer; diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 8f1837f995..48b5446296 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1435,6 +1435,7 @@ void DrasculaEngine::update_62() { void DrasculaEngine::update_102() { int pendulum_x[] = {40, 96, 152, 208, 264, 40, 96, 152, 208, 208, 152, 264, 40, 96, 152, 208, 264}; int difference; + byte *pendulumSurface = drawSurface3; if (actorFrames[kFramePendulum] <= 4) pendulumSurface = drawSurface3; -- cgit v1.2.3 From 1b233db8510870e5daabf80550bdff3ace668fef Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jun 2008 14:11:22 +0000 Subject: - Removed the AuxBuffOrg and AuxBuffDes buffers - Renamed loadPCX -> showFrame - Removed WaitForNext() - Cleaned up the PCX frame loading code svn-id: r32615 --- engines/drascula/drascula.h | 5 +-- engines/drascula/graphics.cpp | 96 ++++++++++++++++++++----------------------- 2 files changed, 46 insertions(+), 55 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 5d0636d27d..012b3d2695 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -286,8 +286,6 @@ public: byte *screenSurface; byte *frontSurface; byte *textSurface; - byte *AuxBuffOrg; - byte *AuxBuffDes; byte *pointer; byte *MiVideoSSN; byte *mSession; @@ -480,8 +478,7 @@ public: int flag_tv; - byte *loadPCX(byte *NamePcc); - void WaitForNext(int FPS); + void showFrame(bool firstFrame = false); int getTime(); void reduce_hare_chico(int, int, int, int, int, int, int, byte *, byte *); void quadrant_1(); diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 22d32b42ca..343d885c54 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -118,28 +118,50 @@ void DrasculaEngine::loadPic(const char *NamePcc, byte *targetSurface, int color setRGB((byte *)cPal, colorCount); } -byte *DrasculaEngine::loadPCX(byte *NamePcc) { - signed int con = 0; - unsigned int X = 0; - unsigned int fExit = 0; - char ch, rep; - byte *AuxPun = AuxBuffDes; - - while (!fExit) { - ch = *NamePcc++; - rep = 1; - if ((ch & 192) == 192) { - rep = (ch & 63); - ch = *NamePcc++; +void DrasculaEngine::showFrame(bool firstFrame) { + bool stopProcessing = false; + byte pixel; + uint repeat, curByte = 0; + + int dataSize = _arj.readSint32LE(); + byte *pcxData = (byte *)malloc(dataSize); + _arj.read(pcxData, dataSize); + _arj.read(cPal, 768); + byte *srcPtr = pcxData; + byte *dstPtr = VGA; + byte *prevFrame = (byte *)malloc(64000); + memcpy(prevFrame, VGA, 64000); + + while (!stopProcessing) { + pixel = *srcPtr++; + repeat = 1; + if ((pixel & 192) == 192) { + repeat = (pixel & 63); + pixel = *srcPtr++; } - for (con = 0; con< rep; con++) { - *AuxPun++ = ch; - X++; - if (X > 64000) - fExit = 1; + for (uint j = 0; j < repeat; j++) { + curByte++; + if (curByte > 64000) { + stopProcessing = true; + break; + } + *dstPtr++ = pixel; } } - return AuxBuffDes; + + free(pcxData); + + if (!firstFrame) { + for (int j = 0; j < 64000; j++) + VGA[j] = prevFrame[j] ^ VGA[j]; + } + + _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); + _system->updateScreen(); + if (firstFrame) + setPalette(cPal); + + free(prevFrame); } void DrasculaEngine::copyBackground(int xorg, int yorg, int xdes, int ydes, int width, @@ -636,17 +658,9 @@ void DrasculaEngine::WaitFrameSSN() { LastFrame = LastFrame + globalSpeed; } -void DrasculaEngine::WaitForNext(int FPS) { - _system->delayMillis(1000 / FPS); -} - bool DrasculaEngine::animate(const char *animationFile, int FPS) { - unsigned j; int NFrames = 1; int cnt = 2; - int dataSize = 0; - - AuxBuffDes = (byte *)malloc(65000); _arj.open(animationFile); @@ -655,30 +669,11 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { } NFrames = _arj.readSint32LE(); - dataSize = _arj.readSint32LE(); - AuxBuffOrg = (byte *)malloc(dataSize); - _arj.read(AuxBuffOrg, dataSize); - _arj.read(cPal, 768); - loadPCX(AuxBuffOrg); - free(AuxBuffOrg); - memcpy(VGA, AuxBuffDes, 64000); - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - _system->updateScreen(); - setPalette(cPal); - WaitForNext(FPS); + showFrame(true); + _system->delayMillis(1000 / FPS); while (cnt < NFrames) { - dataSize = _arj.readSint32LE(); - AuxBuffOrg = (byte *)malloc(dataSize); - _arj.read(AuxBuffOrg, dataSize); - _arj.read(cPal, 768); - loadPCX(AuxBuffOrg); - free(AuxBuffOrg); - for (j = 0;j < 64000; j++) { - VGA[j] = AuxBuffDes[j] ^ VGA[j]; - } - _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); - _system->updateScreen(); - WaitForNext(FPS); + showFrame(); + _system->delayMillis(1000 / FPS); cnt++; byte key = getScan(); if (key == Common::KEYCODE_ESCAPE) @@ -686,7 +681,6 @@ bool DrasculaEngine::animate(const char *animationFile, int FPS) { if (key != 0) break; } - free(AuxBuffDes); _arj.close(); return ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)); -- cgit v1.2.3 From f45939a90a7ab90f661f005ad8e4d5bbc4cc6fcd Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jun 2008 14:17:35 +0000 Subject: Use mixVideo() in showFrame() and some capitalization fixes svn-id: r32616 --- engines/drascula/drascula.h | 4 ++-- engines/drascula/graphics.cpp | 20 +++++++++----------- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 012b3d2695..fa9a036063 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -462,8 +462,8 @@ public: void setCursorTable(); void enterName(); bool soundIsActive(); - void WaitFrameSSN(); - void MixVideo(byte *OldScreen, byte *NewScreen); + void waitFrameSSN(); + void mixVideo(byte *OldScreen, byte *NewScreen); void Des_RLE(byte *BufferRLE, byte *MiVideoRLE); void Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght); byte *TryInMem(); diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 343d885c54..533f7cc0c5 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -151,10 +151,8 @@ void DrasculaEngine::showFrame(bool firstFrame) { free(pcxData); - if (!firstFrame) { - for (int j = 0; j < 64000; j++) - VGA[j] = prevFrame[j] ^ VGA[j]; - } + if (!firstFrame) + mixVideo(VGA, prevFrame); _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); _system->updateScreen(); @@ -532,7 +530,7 @@ int DrasculaEngine::playFrameSSN() { setPalette(dacSSN); break; case kFrameEmptyFrame: - WaitFrameSSN(); + waitFrameSSN(); break; case kFrameInit: if (!UsingMem) { @@ -554,9 +552,9 @@ int DrasculaEngine::playFrameSSN() { } Des_RLE(BufferSSN, MiVideoSSN); free(BufferSSN); - WaitFrameSSN(); + waitFrameSSN(); if (FrameSSN) - MixVideo(VGA, MiVideoSSN); + mixVideo(VGA, MiVideoSSN); else memcpy(VGA, MiVideoSSN, 64000); _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); @@ -573,9 +571,9 @@ int DrasculaEngine::playFrameSSN() { } Des_OFF(BufferSSN, MiVideoSSN, Lengt); free(BufferSSN); - WaitFrameSSN(); + waitFrameSSN(); if (FrameSSN) - MixVideo(VGA, MiVideoSSN); + mixVideo(VGA, MiVideoSSN); else memcpy(VGA, MiVideoSSN, 64000); _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); @@ -646,12 +644,12 @@ void DrasculaEngine::Des_RLE(byte *BufferRLE, byte *MiVideoRLE) { } } -void DrasculaEngine::MixVideo(byte *OldScreen, byte *NewScreen) { +void DrasculaEngine::mixVideo(byte *OldScreen, byte *NewScreen) { for (int x = 0; x < 64000; x++) OldScreen[x] ^= NewScreen[x]; } -void DrasculaEngine::WaitFrameSSN() { +void DrasculaEngine::waitFrameSSN() { uint32 now; while ((now = _system->getMillis()) - LastFrame < ((uint32) globalSpeed)) _system->delayMillis(globalSpeed - (now - LastFrame)); -- cgit v1.2.3 From c37c19a8cfc04249d4b85e4d91122bd0998ca145 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jun 2008 14:59:52 +0000 Subject: pointer -> memPtr Des_RLE -> decodeRLE Des_OFF -> decodeOffset Lenght -> length Removed duplicate code for RLE decoding svn-id: r32617 --- engines/drascula/drascula.h | 6 ++-- engines/drascula/graphics.cpp | 76 +++++++++++++++++-------------------------- 2 files changed, 32 insertions(+), 50 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index fa9a036063..76814e5844 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -286,7 +286,7 @@ public: byte *screenSurface; byte *frontSurface; byte *textSurface; - byte *pointer; + byte *memPtr; byte *MiVideoSSN; byte *mSession; @@ -464,8 +464,8 @@ public: bool soundIsActive(); void waitFrameSSN(); void mixVideo(byte *OldScreen, byte *NewScreen); - void Des_RLE(byte *BufferRLE, byte *MiVideoRLE); - void Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght); + void decodeRLE(byte *BufferRLE, byte *MiVideoRLE); + void decodeOffset(byte *BufferOFF, byte *MiVideoOFF, int length); byte *TryInMem(); int playFrameSSN(); diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 533f7cc0c5..054e8f13aa 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -119,35 +119,14 @@ void DrasculaEngine::loadPic(const char *NamePcc, byte *targetSurface, int color } void DrasculaEngine::showFrame(bool firstFrame) { - bool stopProcessing = false; - byte pixel; - uint repeat, curByte = 0; - int dataSize = _arj.readSint32LE(); byte *pcxData = (byte *)malloc(dataSize); _arj.read(pcxData, dataSize); _arj.read(cPal, 768); - byte *srcPtr = pcxData; - byte *dstPtr = VGA; byte *prevFrame = (byte *)malloc(64000); memcpy(prevFrame, VGA, 64000); - while (!stopProcessing) { - pixel = *srcPtr++; - repeat = 1; - if ((pixel & 192) == 192) { - repeat = (pixel & 63); - pixel = *srcPtr++; - } - for (uint j = 0; j < repeat; j++) { - curByte++; - if (curByte > 64000) { - stopProcessing = true; - break; - } - *dstPtr++ = pixel; - } - } + decodeRLE(pcxData, VGA); free(pcxData); @@ -502,7 +481,7 @@ void DrasculaEngine::playFLI(const char *filefli, int vel) { free(MiVideoSSN); if (UsingMem) - free(pointer); + free(memPtr); else _arj.close(); } @@ -550,7 +529,7 @@ int DrasculaEngine::playFrameSSN() { memcpy(BufferSSN, mSession, Lengt); mSession += Lengt; } - Des_RLE(BufferSSN, MiVideoSSN); + decodeRLE(BufferSSN, MiVideoSSN); free(BufferSSN); waitFrameSSN(); if (FrameSSN) @@ -569,7 +548,7 @@ int DrasculaEngine::playFrameSSN() { memcpy(BufferSSN, mSession, Lengt); mSession += Lengt; } - Des_OFF(BufferSSN, MiVideoSSN, Lengt); + decodeOffset(BufferSSN, MiVideoSSN, Lengt); free(BufferSSN); waitFrameSSN(); if (FrameSSN) @@ -599,23 +578,23 @@ byte *DrasculaEngine::TryInMem() { _arj.seek(0, SEEK_END); Lengt = _arj.pos(); _arj.seek(0, SEEK_SET); - pointer = (byte *)malloc(Lengt); - if (pointer == NULL) + memPtr = (byte *)malloc(Lengt); + if (memPtr == NULL) return NULL; - _arj.read(pointer, Lengt); + _arj.read(memPtr, Lengt); UsingMem = 1; _arj.close(); - return pointer; + return memPtr; } -void DrasculaEngine::Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght) { +void DrasculaEngine::decodeOffset(byte *BufferOFF, byte *MiVideoOFF, int length) { int x = 0; unsigned char Reps; int Offset; memset(MiVideoSSN, 0, 64000); - while (x < Lenght) { + while (x < length) { Offset = BufferOFF[x] + BufferOFF[x + 1] * 256; Reps = BufferOFF[x + 2]; memcpy(MiVideoOFF + Offset, &BufferOFF[x + 3], Reps); @@ -623,23 +602,26 @@ void DrasculaEngine::Des_OFF(byte *BufferOFF, byte *MiVideoOFF, int Lenght) { } } -void DrasculaEngine::Des_RLE(byte *BufferRLE, byte *MiVideoRLE) { - signed int con = 0; - unsigned int X = 0; - unsigned int fExit = 0; - char ch, rep; - while (!fExit) { - ch = *BufferRLE++; - rep = 1; - if ((ch & 192) == 192) { - rep = (ch & 63); - ch =* BufferRLE++; +void DrasculaEngine::decodeRLE(byte* srcPtr, byte* dstPtr) { + bool stopProcessing = false; + byte pixel; + uint repeat; + int curByte = 0; + + while (!stopProcessing) { + pixel = *srcPtr++; + repeat = 1; + if ((pixel & 192) == 192) { + repeat = (pixel & 63); + pixel = *srcPtr++; } - for (con = 0; con < rep; con++) { - *MiVideoRLE++ = ch; - X++; - if (X > 64000) - fExit = 1; + for (uint j = 0; j < repeat; j++) { + curByte++; + if (curByte > 64000) { + stopProcessing = true; + break; + } + *dstPtr++ = pixel; } } } -- cgit v1.2.3 From e2e4c90bb3b36f96ca0d0b763d723882599dc458 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Sun, 8 Jun 2008 15:22:04 +0000 Subject: Fixed readVolCnf() filename length detection and converted fixVolCnfFileName-function to something easier to understand. svn-id: r32618 --- engines/cine/part.cpp | 105 +++++++++++++++++++++++++++++++------------------- 1 file changed, 66 insertions(+), 39 deletions(-) diff --git a/engines/cine/part.cpp b/engines/cine/part.cpp index 43656460c5..0ce8dfdb21 100644 --- a/engines/cine/part.cpp +++ b/engines/cine/part.cpp @@ -70,25 +70,41 @@ void closePart(void) { // TODO } -static void fixVolCnfFileName(char *dst, const uint8 *src) { - memcpy(dst, src, 8); - src += 8; - dst[8] = 0; - - char *ext = strchr(dst, ' '); - if (!ext) { - ext = &dst[8]; - } - if (*src == ' ') { - *ext = 0; - } else { - *ext++ = '.'; - memcpy(ext, src, 3); - char *end = strchr(ext, ' '); - if (!end) { - end = &ext[3]; +static Common::String fixVolCnfFileName(const uint8 *src, uint len) { + assert(len == 11 || len == 13); + // Copy source to a temporary buffer and force a trailing zero for string manipulation + char tmp[14]; + memcpy(tmp, src, len); + tmp[len] = 0; + + if (len == 11) { + // Filenames of length 11 have no separation of the extension and the basename + // so that's why we have to convert them first. There's no trailing zero in them + // either and they're always of the full length 11 with padding spaces. Extension + // can be always found at offset 8 onwards. + // + // Examples of filename mappings: + // "AEROPORTMSG" -> "AEROPORT.MSG" + // "MITRAILLHP " -> "MITRAILL.HP" (Notice the trailing space after the extension) + // "BOND10 " -> "BOND10" + // "GIRL SET" -> "GIRL.SET" + + // Replace all space characters with zeroes + for (uint i = 0; i < len; i++) + if (tmp[i] == ' ') + tmp[i] = 0; + // Extract the filename's extension + Common::String extension(tmp + 8); + tmp[8] = 0; // Force separation of extension and basename + Common::String basename(tmp); + if (extension.empty()) { + return basename; + } else { + return basename + "." + extension; } - *end = 0; + } else { + // Filenames of length 13 are okay as they are, no need for conversion + return Common::String(tmp); } } @@ -97,30 +113,24 @@ void CineEngine::readVolCnf() { if (!f.open("vol.cnf")) { error("Unable to open 'vol.cnf'"); } - bool abaseHeader = false; uint32 unpackedSize, packedSize; char hdr[8]; f.read(hdr, 8); - if (memcmp(hdr, "ABASECP", 7) == 0) { - abaseHeader = true; + bool compressed = (memcmp(hdr, "ABASECP", 7) == 0); + if (compressed) { unpackedSize = f.readUint32BE(); packedSize = f.readUint32BE(); } else { f.seek(0); unpackedSize = packedSize = f.size(); } - uint8 *buf = (uint8 *)malloc(unpackedSize); - if (!buf) { - error("Unable to allocate %d bytes", unpackedSize); - } + uint8 *buf = new uint8[unpackedSize]; f.read(buf, packedSize); if (packedSize != unpackedSize) { - bool b = delphineUnpack(buf, buf, packedSize); - if (!b) { + if (!delphineUnpack(buf, buf, packedSize)) { error("Error while unpacking 'vol.cnf' data"); } } - const int fileNameLength = abaseHeader ? 11 : 13; uint8 *p = buf; int resourceFilesCount = READ_BE_UINT16(p); p += 2; int entrySize = READ_BE_UINT16(p); p += 2; @@ -132,31 +142,48 @@ void CineEngine::readVolCnf() { p += entrySize; } - int volumeEntriesCount = 0; + // Check file name blocks' sizes + bool fileNameLenMod11, fileNameLenMod13; + fileNameLenMod11 = fileNameLenMod13 = true; for (int i = 0; i < resourceFilesCount; ++i) { int size = READ_BE_UINT32(p); p += 4; - assert((size % fileNameLength) == 0); - volumeEntriesCount += size / fileNameLength; + fileNameLenMod11 &= ((size % 11) == 0); + fileNameLenMod13 &= ((size % 13) == 0); p += size; } + // Make sure at least one of the candidates for file name length fits the data + assert(fileNameLenMod11 || fileNameLenMod13); + + // File name length used to be deduced from the fact whether the file + // was compressed or not. Compressed files used file name length 11, + // uncompressed files used file name length 13. It worked almost always, + // but not with the game entry that's detected as the Operation Stealth's + // US Amiga release. It uses a compressed 'vol.cnf' file but still uses + // file names of length 13. So we try to deduce the file name length from + // the data in the 'vol.cnf' file. + int fileNameLength; + if (fileNameLenMod11 != fileNameLenMod13) { + // All file name blocks' sizes were divisible by either 11 or 13, but not with both. + fileNameLength = (fileNameLenMod11 ? 11 : 13); + } else { + warning("Couldn't deduce file name length from data in 'vol.cnf', using a backup deduction scheme."); + // Here we use the former file name length detection method + // if we couldn't deduce the file name length from the data. + fileNameLength = (compressed ? 11 : 13); + } p = buf + 4 + resourceFilesCount * entrySize; for (int i = 0; i < resourceFilesCount; ++i) { int count = READ_BE_UINT32(p) / fileNameLength; p += 4; while (count--) { - char volumeEntryName[13]; - if (abaseHeader) { - fixVolCnfFileName(volumeEntryName, p); - } else { - memcpy(volumeEntryName, p, fileNameLength); - } + Common::String volumeEntryName = fixVolCnfFileName(p, fileNameLength); _volumeEntriesMap.setVal(volumeEntryName, _volumeResourceFiles[i].c_str()); - debugC(5, kCineDebugPart, "Added volume entry name '%s' resource file '%s'", volumeEntryName, _volumeResourceFiles[i].c_str()); + debugC(5, kCineDebugPart, "Added volume entry name '%s' resource file '%s'", volumeEntryName.c_str(), _volumeResourceFiles[i].c_str()); p += fileNameLength; } } - free(buf); + delete[] buf; } int16 findFileInBundle(const char *fileName) { -- cgit v1.2.3 From 069ffd4b701db0ff8faf1bd163945c3a0d99b494 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jun 2008 15:56:48 +0000 Subject: Removed the MiVideoSSN buffer, using screenSurface instead. Added a FIXME for decodeOffset (as it can incorrectly write beyond 64000 bytes, up to 64256) svn-id: r32619 --- engines/drascula/drascula.h | 1 - engines/drascula/graphics.cpp | 37 +++++++++++++++++++------------------ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 76814e5844..56ec856675 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -287,7 +287,6 @@ public: byte *frontSurface; byte *textSurface; byte *memPtr; - byte *MiVideoSSN; byte *mSession; byte cPal[768]; diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 054e8f13aa..a9f754d0f2 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -28,7 +28,10 @@ namespace Drascula { void DrasculaEngine::allocMemory() { - screenSurface = (byte *)malloc(64000); + // FIXME: decodeOffset writes beyond 64000, so this + // buffer has been initialized to 64256 bytes (like + // the original did with the MiVideoSSN buffer) + screenSurface = (byte *)malloc(64256); assert(screenSurface); frontSurface = (byte *)malloc(64000); assert(frontSurface); @@ -464,12 +467,9 @@ void DrasculaEngine::screenSaver() { void DrasculaEngine::playFLI(const char *filefli, int vel) { // Open file - MiVideoSSN = (byte *)malloc(64256); globalSpeed = 1000 / vel; FrameSSN = 0; UsingMem = 0; - if (MiVideoSSN == NULL) - return; _arj.open(filefli); mSession = TryInMem(); LastFrame = _system->getMillis(); @@ -479,7 +479,6 @@ void DrasculaEngine::playFLI(const char *filefli, int vel) { term_int = 1; } - free(MiVideoSSN); if (UsingMem) free(memPtr); else @@ -529,13 +528,13 @@ int DrasculaEngine::playFrameSSN() { memcpy(BufferSSN, mSession, Lengt); mSession += Lengt; } - decodeRLE(BufferSSN, MiVideoSSN); + decodeRLE(BufferSSN, screenSurface); free(BufferSSN); waitFrameSSN(); if (FrameSSN) - mixVideo(VGA, MiVideoSSN); + mixVideo(VGA, screenSurface); else - memcpy(VGA, MiVideoSSN, 64000); + memcpy(VGA, screenSurface, 64000); _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); _system->updateScreen(); FrameSSN++; @@ -548,13 +547,13 @@ int DrasculaEngine::playFrameSSN() { memcpy(BufferSSN, mSession, Lengt); mSession += Lengt; } - decodeOffset(BufferSSN, MiVideoSSN, Lengt); + decodeOffset(BufferSSN, screenSurface, Lengt); free(BufferSSN); waitFrameSSN(); if (FrameSSN) - mixVideo(VGA, MiVideoSSN); + mixVideo(VGA, screenSurface); else - memcpy(VGA, MiVideoSSN, 64000); + memcpy(VGA, screenSurface, 64000); _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); _system->updateScreen(); FrameSSN++; @@ -590,15 +589,17 @@ byte *DrasculaEngine::TryInMem() { void DrasculaEngine::decodeOffset(byte *BufferOFF, byte *MiVideoOFF, int length) { int x = 0; - unsigned char Reps; - int Offset; + int size; + int offset; - memset(MiVideoSSN, 0, 64000); + memset(screenSurface, 0, 64000); while (x < length) { - Offset = BufferOFF[x] + BufferOFF[x + 1] * 256; - Reps = BufferOFF[x + 2]; - memcpy(MiVideoOFF + Offset, &BufferOFF[x + 3], Reps); - x += 3 + Reps; + offset = BufferOFF[x] + BufferOFF[x + 1] * 256; + // FIXME: this writes beyond 64000, so the buffer has been initialized + // to 64256 bytes (like the original did) + size = BufferOFF[x + 2]; + memcpy(MiVideoOFF + offset, &BufferOFF[x + 3], size); + x += 3 + size; } } -- cgit v1.2.3 From 458c7185d92a9e5ac53663733043c8b73e964f4e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Sun, 8 Jun 2008 16:42:12 +0000 Subject: quitGame() -> endChapter() svn-id: r32620 --- engines/drascula/drascula.cpp | 8 ++++---- engines/drascula/drascula.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index b041bddbf6..c5e2b49106 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -201,10 +201,10 @@ int DrasculaEngine::go() { assignDefaultPalette(); if (!runCurrentChapter()) { - quitGame(); + endChapter(); break; } - quitGame(); + endChapter(); if (currentChapter == 6) break; @@ -214,7 +214,7 @@ int DrasculaEngine::go() { return 0; } -void DrasculaEngine::quitGame() { +void DrasculaEngine::endChapter() { stopSound(); clearRoom(); black(); @@ -632,7 +632,7 @@ void DrasculaEngine::updateEvents() { break; case Common::EVENT_QUIT: // TODO - quitGame(); + endChapter(); _system->quit(); break; default: diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 56ec856675..7168229957 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -235,7 +235,7 @@ public: void allocMemory(); void freeMemory(); - void quitGame(); + void endChapter(); void loadPic(int roomNum, byte *targetSurface, int colorCount = 1) { char rm[20]; -- cgit v1.2.3 From e62b1ed9d84bd66ceac829ec34fdec0c83731034 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 8 Jun 2008 21:58:20 +0000 Subject: Proper texts alignment. svn-id: r32621 --- tools/create_drascula/create_drascula.cpp | 249 +++++++++++++++++++----------- 1 file changed, 155 insertions(+), 94 deletions(-) diff --git a/tools/create_drascula/create_drascula.cpp b/tools/create_drascula/create_drascula.cpp index 14e50165d0..856405dbff 100644 --- a/tools/create_drascula/create_drascula.cpp +++ b/tools/create_drascula/create_drascula.cpp @@ -52,9 +52,12 @@ static void writeUint16BE(FILE *fp, uint16 value) { int main(int argc, char *argv[]) { FILE* outFile; int i, lang; - int len, pad; + int len, len1, pad; uint8 padBuf[DATAALIGNMENT]; + for (i = 0; i < DATAALIGNMENT; i++) + padBuf[i] = 0; + outFile = fopen("drascula.dat", "wb"); // Write header @@ -165,27 +168,29 @@ int main(int argc, char *argv[]) { writeUint16BE(outFile, roomActions[i].speechID); } - for (i = 0; i < DATAALIGNMENT; i++) - padBuf[i] = 0; - // langs writeUint16BE(outFile, NUM_LANGS); // Write _text writeUint16BE(outFile, NUM_TEXT); + for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXT; i++) { - len += strlen(_text[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_text[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXT; i++) { - writeUint16BE(outFile, strlen(_text[lang][i])); - fwrite(_text[lang][i], strlen(_text[lang][i]), 1, outFile); + len = strlen(_text[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + writeUint16BE(outFile, len + pad + 2); + fwrite(_text[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } } @@ -193,17 +198,21 @@ int main(int argc, char *argv[]) { // Write _textd writeUint16BE(outFile, NUM_TEXTD); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTD; i++) { - len += strlen(_textd[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_textd[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTD; i++) { - writeUint16BE(outFile, strlen(_textd[lang][i])); - fwrite(_textd[lang][i], strlen(_textd[lang][i]), 1, outFile); + len = strlen(_textd[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_textd[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -212,17 +221,21 @@ int main(int argc, char *argv[]) { // Write _textb writeUint16BE(outFile, NUM_TEXTB); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTB; i++) { - len += strlen(_textb[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_textb[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTB; i++) { - writeUint16BE(outFile, strlen(_textb[lang][i])); - fwrite(_textb[lang][i], strlen(_textb[lang][i]), 1, outFile); + len = strlen(_textb[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_textb[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -231,17 +244,21 @@ int main(int argc, char *argv[]) { // Write _textbj writeUint16BE(outFile, NUM_TEXTBJ); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTBJ; i++) { - len += strlen(_textbj[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_textbj[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTBJ; i++) { - writeUint16BE(outFile, strlen(_textbj[lang][i])); - fwrite(_textbj[lang][i], strlen(_textbj[lang][i]), 1, outFile); + len = strlen(_textbj[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_textbj[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -250,17 +267,21 @@ int main(int argc, char *argv[]) { // Write _texte writeUint16BE(outFile, NUM_TEXTE); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTE; i++) { - len += strlen(_texte[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_texte[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTE; i++) { - writeUint16BE(outFile, strlen(_texte[lang][i])); - fwrite(_texte[lang][i], strlen(_texte[lang][i]), 1, outFile); + len = strlen(_texte[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_texte[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -269,17 +290,21 @@ int main(int argc, char *argv[]) { // Write _texti writeUint16BE(outFile, NUM_TEXTI); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTI; i++) { - len += strlen(_texti[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_texti[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTI; i++) { - writeUint16BE(outFile, strlen(_texti[lang][i])); - fwrite(_texti[lang][i], strlen(_texti[lang][i]), 1, outFile); + len = strlen(_texti[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_texti[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -288,17 +313,21 @@ int main(int argc, char *argv[]) { // Write _textl writeUint16BE(outFile, NUM_TEXTL); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTL; i++) { - len += strlen(_textl[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_textl[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTL; i++) { - writeUint16BE(outFile, strlen(_textl[lang][i])); - fwrite(_textl[lang][i], strlen(_textl[lang][i]), 1, outFile); + len = strlen(_textl[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_textl[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -307,17 +336,21 @@ int main(int argc, char *argv[]) { // Write _textp writeUint16BE(outFile, NUM_TEXTP); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTP; i++) { - len += strlen(_textp[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_textp[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTP; i++) { - writeUint16BE(outFile, strlen(_textp[lang][i])); - fwrite(_textp[lang][i], strlen(_textp[lang][i]), 1, outFile); + len = strlen(_textp[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_textp[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -326,17 +359,21 @@ int main(int argc, char *argv[]) { // Write _textt writeUint16BE(outFile, NUM_TEXTT); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTT; i++) { - len += strlen(_textt[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_textt[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTT; i++) { - writeUint16BE(outFile, strlen(_textt[lang][i])); - fwrite(_textt[lang][i], strlen(_textt[lang][i]), 1, outFile); + len = strlen(_textt[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_textt[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -345,17 +382,21 @@ int main(int argc, char *argv[]) { // Write _textvb writeUint16BE(outFile, NUM_TEXTVB); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTVB; i++) { - len += strlen(_textvb[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_textvb[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTVB; i++) { - writeUint16BE(outFile, strlen(_textvb[lang][i])); - fwrite(_textvb[lang][i], strlen(_textvb[lang][i]), 1, outFile); + len = strlen(_textvb[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_textvb[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -364,17 +405,21 @@ int main(int argc, char *argv[]) { // Write _textsys writeUint16BE(outFile, NUM_TEXTSYS); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTSYS; i++) { - len += strlen(_textsys[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_textsys[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTSYS; i++) { - writeUint16BE(outFile, strlen(_textsys[lang][i])); - fwrite(_textsys[lang][i], strlen(_textsys[lang][i]), 1, outFile); + len = strlen(_textsys[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_textsys[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -383,17 +428,21 @@ int main(int argc, char *argv[]) { // Write _texthis writeUint16BE(outFile, NUM_TEXTHIS); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTHIS; i++) { - len += strlen(_texthis[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_texthis[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTHIS; i++) { - writeUint16BE(outFile, strlen(_texthis[lang][i])); - fwrite(_texthis[lang][i], strlen(_texthis[lang][i]), 1, outFile); + len = strlen(_texthis[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_texthis[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -402,17 +451,21 @@ int main(int argc, char *argv[]) { // Write _textverbs writeUint16BE(outFile, NUM_TEXTVERBS); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTVERBS; i++) { - len += strlen(_textverbs[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_textverbs[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTVERBS; i++) { - writeUint16BE(outFile, strlen(_textverbs[lang][i])); - fwrite(_textverbs[lang][i], strlen(_textverbs[lang][i]), 1, outFile); + len = strlen(_textverbs[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_textverbs[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -421,17 +474,21 @@ int main(int argc, char *argv[]) { // Write _textmisc writeUint16BE(outFile, NUM_TEXTMISC); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTMISC; i++) { - len += strlen(_textmisc[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_textmisc[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTMISC; i++) { - writeUint16BE(outFile, strlen(_textmisc[lang][i])); - fwrite(_textmisc[lang][i], strlen(_textmisc[lang][i]), 1, outFile); + len = strlen(_textmisc[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_textmisc[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } @@ -440,17 +497,21 @@ int main(int argc, char *argv[]) { // Write _textd1 writeUint16BE(outFile, NUM_TEXTD1); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 0; + len = 2; for (i = 0; i < NUM_TEXTD1; i++) { - len += strlen(_textd1[lang][i]) + 2; - pad = len % DATAALIGNMENT; - len += pad; + len1 = strlen(_textd1[lang][i]) + 1; + pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; + len += 2 + len1 + pad; } writeUint16BE(outFile, len); + writeUint16BE(outFile, 0); // padding for (i = 0; i < NUM_TEXTD1; i++) { - writeUint16BE(outFile, strlen(_textd1[lang][i])); - fwrite(_textd1[lang][i], strlen(_textd1[lang][i]), 1, outFile); + len = strlen(_textd1[lang][i]) + 1; + pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; + + writeUint16BE(outFile, len + pad + 2); + fwrite(_textd1[lang][i], len, 1, outFile); fwrite(padBuf, pad, 1, outFile); } -- cgit v1.2.3 From e20617966c9ba33e6383095e14888b552d1161e6 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 8 Jun 2008 21:59:12 +0000 Subject: Load all texts from drascula.dat svn-id: r32622 --- engines/drascula/drascula.cpp | 88 + engines/drascula/drascula.h | 34 +- engines/drascula/staticdata.h | 5336 ----------------------------------------- 3 files changed, 107 insertions(+), 5351 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index c5e2b49106..42663313d0 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -72,6 +72,21 @@ DrasculaEngine::~DrasculaEngine() { delete _rnd; free(_charMap); + freeTexts(_text); + freeTexts(_textd); + freeTexts(_textb); + freeTexts(_textbj); + freeTexts(_texte); + freeTexts(_texti); + freeTexts(_textl); + freeTexts(_textp); + freeTexts(_textt); + freeTexts(_textvb); + freeTexts(_textsys); + freeTexts(_texthis); + freeTexts(_textverbs); + freeTexts(_textmisc); + freeTexts(_textd1); } int DrasculaEngine::init() { @@ -103,6 +118,22 @@ int DrasculaEngine::init() { } _charMap = 0; + _text = 0; + _textd = 0; + _textb = 0; + _textbj = 0; + _texte = 0; + _texti = 0; + _textl = 0; + _textp = 0; + _textt = 0; + _textvb = 0; + _textsys = 0; + _texthis = 0; + _textverbs = 0; + _textmisc = 0; + _textd1 = 0; + if (!loadDrasculaDat()) return 1; @@ -851,7 +882,64 @@ bool DrasculaEngine::loadDrasculaDat() { _numLangs = in.readUint16BE(); + _text = loadTexts(in); + _textd = loadTexts(in); + _textb = loadTexts(in); + _textbj = loadTexts(in); + _texte = loadTexts(in); + _texti = loadTexts(in); + _textl = loadTexts(in); + _textp = loadTexts(in); + _textt = loadTexts(in); + _textvb = loadTexts(in); + _textsys = loadTexts(in); + _texthis = loadTexts(in); + _textverbs = loadTexts(in); + _textmisc = loadTexts(in); + _textd1 = loadTexts(in); + return true; } +char ***DrasculaEngine::loadTexts(Common::File &in) { + int numTexts = in.readUint16BE(); + char ***res; + int entryLen; + char *pos; + int len; + + res = (char ***)malloc(sizeof(char *) * _numLangs); + + for (int lang = 0; lang < _numLangs; lang++) { + entryLen = in.readUint16BE(); + + res[lang] = (char **)malloc(sizeof(char *) * numTexts); + + res[lang][0] = pos = (char *)malloc(entryLen); + + in.read(res[lang][0], entryLen); + + pos += 4; + + for (int i = 1; i < numTexts; i++) { + pos -= 2; + + len = READ_BE_UINT16(pos); + pos += 2 + len; + + res[lang][i] = pos; + } + } + + return res; +} + +void DrasculaEngine::freeTexts(char ***ptr) { + for (int lang = 0; lang < _numLangs; lang++) { + free(ptr[lang][0]); + free(ptr[lang]); + } + free(ptr); +} + } // End of namespace Drascula diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 7168229957..329b82bb2d 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -684,23 +684,27 @@ private: int _roomUpdatesSize; int _roomActionsSize; int _numLangs; + + char ***_text; + char ***_textd; + char ***_textb; + char ***_textbj; + char ***_texte; + char ***_texti; + char ***_textl; + char ***_textp; + char ***_textt; + char ***_textvb; + char ***_textsys; + char ***_texthis; + char ***_textverbs; + char ***_textmisc; + char ***_textd1; + + char ***loadTexts(Common::File &in); + void freeTexts(char ***ptr); }; -extern const char *_text[][501]; -extern const char *_textd[][84]; -extern const char *_textb[][15]; -extern const char *_textbj[][29]; -extern const char *_texte[][24]; -extern const char *_texti[][33]; -extern const char *_textl[][32]; -extern const char *_textp[][20]; -extern const char *_textt[][25]; -extern const char *_textvb[][63]; -extern const char *_textsys[][4]; -extern const char *_texthis[][5]; -extern const char *_textverbs[][6]; -extern const char *_textmisc[][3]; -extern const char *_textd1[][11]; extern const ItemLocation itemLocations[]; extern int frameX[20]; diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h index 3cf8f0f2c9..ee227b9265 100644 --- a/engines/drascula/staticdata.h +++ b/engines/drascula/staticdata.h @@ -585,5342 +585,6 @@ RoomTalkAction roomActions[] = { }; -const char *_text[][501] = { -{ - // 0 - "", - "THAT'S THE SECOND BIGGEST DOOR I'VE SEEN IN MY LIFE", - "NOT REALLY", - "THE CHURCH IS ALL BOARDED UP, IT MUST HAVE BEEN ABANDONED SEVERAL YEARS AGO", - "I HAVEN'T OPENED IT", - // 5 - "WHAT SHOULD I DO, SHOULD I PULL IT OFF?", - "HI THERE DOOR, I'M GOING TO MAKE YOU A DOOR-FRAME", - "IT'S TOO TOUGH FOR ME", - "THE WINDOW IS BOARDED UP", - "I CAN'T", - // 10 - "YES, THAT'S DONE", - "WHY?", - "HI WINDOW, ARE YOU DOING ANYTHING TONIGHT?", - "NOT WITHOUT PERMISSION FROM THE TOWN HALL", - "IF ONLY THIS WINDOW WASN'T BOARDED UP...", - // 15 - "YOO-HOO WINDOW!", - "HI THERE", - "LIKE MICROCHOF'S", - "I CAN'T REACH", - "IT'S ALRIGHT WHERE IT IS", - // 20 - "", - "IT'S A COFFIN IN THE SHAPE OF A CROSS", - "NO THANKS", - "HI DEAD MAN. NO, DON'T GET UP FOR MY SAKE", - "YES, JUST LIKE IN POLTERGEIST", - // 25 - "", - "", - "I'LL BE BACK IN FIFTEEN MINUTES", - "IT'S FORBIDDEN TO PUT UP POSTERS", - "IT'S UNCLE EVARISTO'S TOMB", - // 30 - "IT'S LOCKED", - "I'VE GOT ONE", - "YOO HOO, UNCLE EVARISTO!", - "THERE'S NO POWER", - "IT'S NOT WELL PARKED", - // 35 - "IT'S A DOOR", - "A DRAWER IN THE TABLE", - "A SUSPICIOUS WARDROBE", - "HI WARDROBE, HOW ARE YOU?", - "", - // 40 - "", - "IT'S AN ANCIENT CANDELABRUM", - "IT MUST HAVE BEEN HERE SINCE YULE BRINNER HAD HAIR ON HIS HEAD", - "NO, IT'S A RELIC", - "IT'S A NICE ALTARPIECE", - // 45 - "", - "HA, HA, HA", - "", - "NO", - "", - // 50 - "HA, HE, HI, HO, HU, GREAT!", - "", - "", - "", - "I CAN'T SEE ANYTHING IN PARTICULAR", - // 55 - "IT'S FERNAN, THE PLANT", - "IT'S ONE OF THE FENCE SPIKES", - "HEY! THERE'S A PACKET OF MATCHES UNDER HERE", - "LOOK! A PACKET OF KLEENEX, AND ONE'S STILL UNUSED", - "THERE ISN'T ANYTHING ELSE IN THE BUCKET", - // 60 - "IT'S A BLIND MAN WHO CAN'T SEE", - "", - "", - "", - "", - // 65 - "THAT'S A GREAT DEAL OF MONEY", - "", - "", - "", - "", - // 70 - "", - "", - "", - "", - "", - // 75 - "", - "", - "", - "", - "", - // 80 - "", - "", - "", - "", - "", - // 85 - "", - "", - "", - "", - "", - // 90 - "", - "", - "", - "", - "", - // 95 - "", - "", - "", - "", - "", - // 100 - "THERE IS NOTHING SPECIAL ABOUT IT", - "IT'S NOT UNUSUAL", - "HEY, WHAT'S UP MAN?", - "HI", - "NOTHING NEW?", - // 105 - "HOW IS THE FAMILY?", - "THAT IS JUST LIKE YOU!", - "BUT HOW DO I GET THAT?", - "MY RELIGION DOES NOT ALLOW ME TO", - "IT'D BE BETTER NOT", - // 110 - "YEAH, SURE MAN!", - "NO WAY", - "IMPOSSIBLE", - "THIS WILL NOT OPEN", - "I CAN'T DO IT BY MYSELF", - // 115 - "I COULD DO IT, BUT I JUST FEEL A LITTLE LAZY", - "I DO NOT SEE THE REASON", - "IT'S QUITE A NICE BRAIN", - "AND SO BRAIN, WHAT ARE YOU UP TONIGHT?", - "NO, IT MUST BE KEPT SOMEWHERE AWAY FROM THE MUTANT ACTION OF THE ATMOSPHERE", - // 120 - "IT IS VERY STIFF, JUST LIKE MY BOSS", - "A VERY SHARP STAKE", - "YOU FAITHFUL SHARP-POINTED STAKE, FROM THE MOST NOBLE TRANSILVANIAN OAK TREE", - "DAMN, I HAVE TO CUT MY NAILS!", - "B.J. IS IN THERE... SHE IS A REALLY HOT CHICK!", - // 125 - "IT IS FIRMLY LOCKED", - "\"SAFE AWAY LOCKS LTD.\"", - "IT IS THE TYPICAL SKELETON YOU FIND IN THE DUNGEONS OF ALL THE GAMES", - "IT IS COMMONLY USED TO TRANSFER ELECTRICITY TO THE MACHINES CONNECTED TO IT", - "IT IS HAND MADE BECAUSE THE JAPANESE MAKE THEM POCKET SIZE", - // 130 - "I HAVE ONLY ONCE SEEN IN MY LIFE ANOTHER THING AS UGLY AS THIS", - "FORGET IT. I AM NOT GOING TO TELL HIM ANYTHING IN CASE HE GETS MAD", - "HE SEEMS QUITE RATIONAL", - "IT IS A PICTURE OF PLATO WRITING HIS LOST DIALOGUE", - "I AM NOT ONE OF THOSE PEOPLE WHO TALKS TO POSTERS", - // 135 - "THAT'S A VERY CUTE DESK", - "IT IS A VAMPIRES HUNTER'S DIPLOMA OFFICIALLY APPROVED BY OXFORD UNIVERSITY", - "IT'S A DARK NIGHT WITH A FULL MOON", - "IT SEEMS LIKE THESE SCREWS ARE NOT TIGHTENED PROPERLY", - "DON'T LOOK NOW, BUT I THINK THAT A HIDDEN CAMERA IS FOCUSING ON ME", - // 140 - "THAT'S A VERY MODERN STAKE DETECTOR", - "NO. THE LABORATORY IS ON THE SECOND FLOOR", - "A NICE BEDSIDE TABLE", - "IT'S A LOT OF MONEY THAT CAN'T BE MISSING IN ANY VALUABLE ADVENTURE", - "IF I WERE A RICH MAN, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", - // 145 - "THOSE ARE STRANGE LEAVES. THEY MUST HAVE BROUGHT THEM FROM SOUTH AMERICA OR AROUND THERE", - "I DON'T THINK THEY WOULD ANSWER ME", - "THAT'S A BEAUTIFUL WOODEN CRUCIFIX. THE ICON DOESN'T REALLY SHOW THE FULL EXTENT OF IT'S BEAUTY", - "I ONLY PRAY BEFORE I GO TO BED", - "HEY, THIS SPIKE SEEMS A LITTLE BIT LOOSE!", - // 150 - "I HOPE YOU WON'T COMPLAIN ABOUT NOT GETTING ANY CLUES FROM ME", - "IT'S A QUITE CONVENTIONAL SPIKE", - "THEY ARE CUTE, THOUGH THEY ARE COVERED WITH A LITTLE BIT OF WAX", - "NO, THEY WON'T HEAR ME. HA,HA,HA THIS IS GREAT!", - "\"SLEEPING BEAUTY\" FROM TCHAIKOVSKY, OR CHOIFRUSKY, OR WHATEVER IT IS", - // 155 - "VERY TEMPTING", - "NO, I DO NOT PUT USED BUBBLE GUM IN MY MOUTH", - "THAT'S A VERY NICE SICKLE. I WONDER WHERE THE HAMMER IS", - "TOBACCO MANUFACTURERS WARN ABOUT HEALTH BEING SERIOUSLY DAMAGED BY SANITARY AUTHORITIES", - "AN ABSOLUTELY NORMAL CANDLE, INCLUDING WAX AND EVERYTHING", - // 160 - "THESE TWO SHINY COINS REALLY GLITTER!", - "THIS SHINY COIN REALLY GLITTERS!", - "WITH THIS I WILL BE IMMUNE AGAINST VAMPIRE BITES", - "NO, IT'S IS NOT THE RIGHT MOMENT YET", - "THERE IS A ONE THOUSAND BILL AND A COUPLE OF COINS", - // 165 - "IT SAYS \"PLEASE, DO NOT THROW FOOD TO THE PIANIST\"", - "OMELETTE, 1.00. FRIED FISH, 0.80, MAYONNAISE POTATOES, 1.10", - "BEST BURGERS ON THIS SIDE OF THE DANUBE, ONLY 325!", - "THAT'S A NICE SKULL WITH A VERY PENETRATING LOOK, HA, HA, HA, HA, THAT WAS GOOD!", - "HI SKULL, YOU REMIND ME OF UNCLE HAMLET", - // 170 - "I HAVE THE HABIT OF NOT TOUCHING THINGS THAT HAVE BEEN ALIVE", - "IT'S A BIN", - "IT'S A BET FOR TONIGHT'S GAME", - "I WONDER WHAT IS BEHIND THAT", - "HEY, THE CURTAIN WILL NOT MOVE!", - // 175 - "MAN, THIS CASTLE IS REALLY GLOOMY", - "I CAN'T, HE IS TOO FAR AWAY TO HEAR ME", - "IT'S A TYPICAL TRANSILVANIAN FOREST, WITH TREES", - "MAN YOU SAY REALLY STUPID THINGS, THIS ROOM IS TOO DARK!", - "GARCIA, CANDY STORE. SWEETS AND BUBBLE GUM", - // 180 - "A VERY NICE DOOR", - "IT'S CLOSED", - "A COMPLETELY SEALED BARREL", - "", - "AREN'T THESE BUGS REALLY CUTE?", - // 185 - "PSSST, PUSSYCAT... LITTLE CAT", - "THERE IS NO ANSWER", - "THE MOON IS A SATELLITE THAT TURNS AROUND THE EARTH WITH A REVOLUTION PERIOD OF 28 DAYS", - "HI, LOONY MOON", - "IT'S TOTALLY BOARDED UP WITH PLANKS", - // 190 - "IT'S IMPOSSIBLE. NOT EVEN THAT TOUGH GUY FROM TV COULD OPEN THIS", - "HEY! THE SHADOW OF THAT CYPRESS LOOKS PROLONGED TO ME!", - "YOU, BARTENDER...!!", - "I WOULD LIKE TO HAVE A ROOM PLEASE", - "DO YOU KNOW WHERE I CAN FIND THE MAN CALLED DRASCULA?", - // 195 - "YES, SO WHAT?", - "SO?", - "IS...THAT RIGHT?", - "GOOD QUESTION. LET ME TELL YOU MY STORY. LOOK...", - "IT WILL TAKE JUST FIVE MINUTES", - // 200 - "I'M JOHN HACKER AND I REPRESENT A BRITISH PROPERTY COMPANY", - "AS FAR AS I KNOW, COUNT DRASCULA WANTS TO BUY SOME PIECES OF LAND IN GIBRALTAR AND MY COMPANY SENT ME HERE TO NEGOTIATE THE SALE", - "I THINK I'M GOING BACK TO MY MUM'S TOMORROW, FIRST THING IN THE MORNING", - "BEAUTIFUL NIGHT, HUH?", - "NO, NOTHING", - // 205 - "YOU...PIANIST...!!!!", - "BEAUTIFUL NIGHT", - "AND IT'S NOT EVEN COLD OR ANYTHING, BY THE WAY, CANT YOU PLAY A DIFFERENT SONG?", - "ALL RIGHT, I'LL JUST LET YOU GO ON PLAYING", - "WELL THEN", - // 210 - "HI BOSS, HOW ARE YOU?", - "AND HOW IS THE FAMILY?", - "THIS IS QUITE GROOVY, HUH?", - "I'D BETTER NOT SAY ANYTHING", - "THERE IS NO PLACE LIKE HOME. THERE IS NO...WHAT?, BUT YOU ARE NOT AUNTIE EMMA. AS A MATTER OF FACT, I DON'T HAVE AN AUNTIE EMMA!", - // 215 - "YOU CAN CALL ME ANYTHING YOU WANT, BUT IF YOU CALL ME JOHNNY, I'LL COME TO YOU LIKE A DOG", - "AREN'T I JUST A FUNNY GUY, HUH?. BY THE WAY, WHERE AM I?", - "YES", - "SHOOT...!", - "OH, SURE...OF COURSE!", - // 220 - "WELL, THANKS VERY MUCH FOR YOUR HELP. I WON'T BOTHER YOU ANYMORE IF YOU PLEASE TELL ME WHERE THE DOOR IS...", - "THE KNOCK MUST HAVE AFFECTED MY BRAIN...I CAN'T SEE A THING...", - "WELL...THAT DOESN'T MATTER. I ALWAYS CARRY A SPARE PAIR", - "WOW, WHAT A HOT CHICK!! I DIDN'T NOTICE!, BUT OF COURSE, I WASN'T WEARING MY GLASSES", - "HEY...", - // 225 - "AND ALL THIIIISSS???", - "DON'T WORRY B.J. HONEY, I'LL SAVE YOU FROM FALLING INTO HIS CLUTCHES...", - "YOU REALLY GOT ME MAD MAN...", - "AHHH A WEREWOLF!! DIE YOU DAMNED EVIL!", - "YES, WELL...", - // 230 - "YES, WELL... I THINK I'LL JUST GO ON MY WAY. EXCUSE ME", - "WHAT?", - "TO TELL YOU THE TRUTH...ON SECOND THOUGHTS...I DON'T REALLY THINK SO", - "AND SO TELL ME YOU ERUDITE PHILOSOPHER, IS THERE ANY RELATIONSHIP CAUSE-AND-EFFECT BETWEEN SILLY AND BILLY?", - "OK, OK, FORGET IT. I DON'T EVEN KNOW WHY I SAID ANYTHING ABOUT IT", - // 235 - "WHY ARE YOU PHILOSOPHIZING INSTEAD OF EATING PEOPLE?", - "HOW COME?", - "HEY, COULD YOU SAY ALL THAT STUFF ABOUT PRE-EVOLUTIONARY RELATIONSHIPS AGAIN?", - "YES, MAN. ALL THAT STUFF YOU TOLD ME ABOUT BEFORE. I DIDN'T UNDERSTAND IT, YOU KNOW", - "NO, I'D RATHER NOT SAY ANYTHING, IN CASE HE GETS ANGRY OR SOMETHING...", - // 240 - "HELLO?", - "YES, WHAT'S UP?", - "WELL, NOW THAT YOU MENTION IT, I'LL TELL YOU THAT...", - "", - "BY THE WAY, THIS IS NOT THE CASE, OF COURSE, BUT WHAT COULD HAPPEN IF A VAMPIRE GOT THE RECIPE BY ANY CHANCE?", - // 245 - "WELL ANYWAY. LISTEN, DOESN'T THIS LOOK LIKE A LOT OF CRAP TO END THE GAME WITH?. WELL, MAYBE NOT", - "IT'S EMPTY!", - "WHY DID YOU TAKE MY ONLY LOVE, B.J., AWAY FROM ME?. LIFE HAS NO MEANING FOR ME WITHOUT HER", - "HER BRAIN?\?!!", - "TO TELL YOU THE TRUTH, I THINK I HAVE HAD ENOUGH FUN WITH YOUR LITTLE MONSTER ALREADY", - // 250 - "OH PLEASE, HOLY VIRGIN, DON'T LET ANYTHING WORSE HAPPEN TO ME!!", - "YOU ARE NOT GOING TO GET YOUR WAY. I'M SURE SUPERMAN WILL COME AND RESCUE ME!", - "WHAT SORT OF A SHIT GAME IS THIS IN WHICH THE PROTAGONIST DIES!", - "HEY, WAIT A SECOND!, WHAT ABOUT MY LAST WISH?", - "HA. HA, I'M NOW IMMUNIZED AGAINST YOU DAMNED EVIL!. THIS CIGARETTE IS AN ANTI-VAMPIRE BREW THAT VON BRAUN GAVE TO ME", - // 255 - "YES SURE, BUT YOU'LL NEVER GET ME TO GIVE YOU THE RECIPE", - "APART FROM CREATING TORTURE, I CAN ALSO WITHSTAND IT.", - "OH, NO PLEASE! I'LL TALK, BUT PLEASE, DON'T DO THAT TO ME!", - "ALL RIGHT THEN. I TOLD YOU WHAT YOU WANTED TO KNOW. NOW SET B.J. AND ME FREE THEN LEAVE US ALONE!", - "WHAT ARE YOU DOING HERE B.J.?. WHERE IS DRASCULA?", - // 260 - "WHAT A MEAN GUY!. JUST BECAUSE HE BELONGS TO NOBILITY HE THINKS HE IS ENTITLED TO SLEEP WITH ANYBODY HE FEELS LIKE", - "DOWN WITH ARISTOCRATIC DESPOTISM!!", - "POOR PEOPLE OF THE WORLD FOR EVER..!!", - "AND I CAN SEE HE HAS CHAINED YOU UP WITH LOCKS AND ALL THAT STUFF, HUH?", - "WELL, ALL RIGHT. DO YOU HAVE A HAIR PIN OVER THERE?", - // 265 - "ALL RIGHT, OK, DON'T GET MAD. I'LL THINK OF SOMETHING", - "YOU...BARTENDER!!", - "HOW IS THE GAME GOING?", - "WHO?", - "CAN'T YOU SEE DRASCULA IS HERE?", - // 270 - "THEN, LET'S FINISH HIM OFF, RIGHT?", - "GIVE ME A SCOTCH ON THE ROCKS", - "NOTHING, I JUST FORGOT WHAT I WAS GOING TO SAY...", - "EITHER YOU GET ME A SCOTCH ON THE ROCKS OR I'LL PLAY THE PIANO UNTIL THE GAME IS OVER", - "WHEN IS THE MATCH GOING TO BE OVER?", - // 275 - "GOOD EVENING", - "AND SO IGOR, HOW ARE YOU FEELING...A LITTLE HUMPED...?. HA, HA, HA, THAT WAS FUNNY!", - "WHAT ARE YOU SUPPOSED TO BE DOING?", - "WELL, NO, I DONT UNDERSTAND TAXES", - "THEN WEAR GLASSES", - // 280 - "WHAT IS ALL THAT ABOUT THE SUPERNATURAL ORGY?", - "OK, OK, STOP IT. I THINK I GET THE PICTURE", - "COULDN'T YOU TELL ME WHERE DRASCULA IS?", - "OH...PLEASE...COME ON...!", - "WHY NOT?", - // 285 - "OH...DOES HE SLEEP AT NIGHT?", - "WELL, I HOPE YOU GET LUCKY", - "I HAVE TO TALK TO HIM...", - "YOUUU...SKELETONNNN..!!!", - "GOOD HEAVENS!, IT'S A DEAD MAN TALKING!", - // 290 - "HOW DID YOU END UP HERE", - "AND WHY WOULD DRASCULA WANT TO CREATE A MONSTER?", - "WHAT'S YOUR NAME, MY SKELETON FRIEND?", - "HEY, DON'T YOU WANT ANYTHING TO EAT?", - "I BET YOUR STOMACH IS PRETTY EMPTY...HA,HA,HA!", - // 295 - "I DON'T FEEL LIKE TALKING RIGHT NOW", - "I HOPE SOMEONE F...(WHISTLE) YOU...,AND YOUR F...(WHISTLE) SON OF (WHISTLE TWICE)", - "I REALLY LOVED HER. I KNOW SHE WASN'T MUCH OF A WONDER, BUT NOBODY'S PERFECT, RIGHT?", - "BESIDES. SHE HAD ONE OF THOSE GREAT BODIES THAT YOU NEVER FORGET...", - "I'LL NEVER BE THE SAME AGAIN. I WILL SHUT MYSELF AWAY IN A MONASTERY, AND WILL LET MY LIFE JUST FLOW...", - // 300 - "NOTHING WILL GET ME OUT OF THIS MYSTERY BECAUSE...", - "WHOSE?. WHOSE?", - "I WANT TO BECOME A PIRATE", - "I WANT TO BECOME A PROGRAMMER", - "TELL ME SOMETHING ABOUT PELAYO", - // 305 - "I'LL JUST GO ON PLAYING, AND FORGET I SAW YOU", - "WHOSE STUPID IDEA COULD THIS BE?", - "IT LOOKS LIKE MY GRANDMOTHER'S HANDBAG ", - "JESUS, AREN'T I JUST REALLY COOL MAN...!", - "THE MORE I SEE MYSELF, THE MORE I LOVE MYSELF", - // 310 - "HOW DO I LOCK MYSELF THEN?", - "I'LL HAVE TO OPEN ME FIRST, RIGHT?", - "I'M ALL RIGHT WHERE I AM", - "I GOT ME", - "HI, MYSELF!", - // 315 - "I'LL WEAR THEM WHEN THE RIGHT TIME COMES", - "I DON'T SEE ANYTHING SPECIAL ABOUT IT", - "IT'S ALL RIGHT WHERE IT IS", - "AND WHAT FOR?", - "I CAN'T", - // 320 - "HI, YOU!", - "IT'S UNCLE DESIDERIO'S PANTHEON!", - "YOUUU...UNCLE DESIDERIOOOO!!", - "NO, I DON'T WANT TO CUT MYSELF AGAIN", - "AHHH,,,EXCUS....", - // 325 - "JAMM. AHH...", - "YES...WOF, WOF", - "LOOK, THERE'S A PIECE OF BUBBLE GUM STUCK HERE", - "THIS IS THE MOBILE PHONE I GOT LAST CHRISTMAS", - "IT'S VERY HIGH!", - // 330 - "COME OUT TO THE BALCONY MY JULIET!!", - "YOU ARE THE LIGHT THAT ILLUMINATES MY WAY!", - "HEY, DOOR!, WHAT'S THE MATTER?", - "YOUUU, CIGARETTE VENDING MACHINE!", - "IT'S A CIGARETTE VENDING MACHINE", - // 335 - "I HAVE ANOTHER COIN INSIDE", - "NO, I JUST QUIT SMOKING AND DRINKING ALCOHOL", - "I WILL DEVOTE MYSELF TO WOMEN FROM NOW ON", - "THIS IS A TRICK! NOTHING CAME OUT!", - "AT LAST!", - // 340 - "IT'S JUST A TRUNK", - "HELLO TRUNK, YOUR NAME IS JUST LIKE MY COUSIN FRANK...", - "I'VE FOUND B.J.'S HANDBAG!", - "OH MY GOD! I HAVE NO REFLECTION! I'M A VAMPIRE!", - "OH...JESUS, IT'S JUST A DRAWING!", - // 345 - "LITTLE MIRROR, TELL ME, WHO IS THE MOST BEAUTIFUL IN THE WHOLE KINGDOM?", - "HE WON'T OPEN", - "ALL RIGHT. I GOT THE EAR-PLUGS IN", - "IT'S A VAMPIRE'S HUNTER DIPLOMA, OFFICIALLY APPROVED BY OXFORD UNIVERSITY", - "NOT YET. THERE ARE STILL SOME INGREDIENTS MISSING. IT'S NOT WORTH WAKING HIM UP", - // 350 - "BUT I DON'T HAVE MONEY", - "IT'S A BRITISH LAMP", - "HELP ME OUT HERE BARTENDER!!", - "A VAMPIRE CAME IN AND TOOK MY GIRLFRIEND AWAY!!", - "BUT, AREN'T YOU GOING TO HELP ME!!??", - // 355 - "DEAD?, WHAT DO YOU MEAN DEAD?", - "AAHH....", - "A VAMPIRE HAS KIDNAPPED THE GIRL IN ROOM 501", - "BUT YOU HAVE TO HELP ME OUT!", - "CAN'T YOU PLAY ONE FROM BLUR?", - // 360 - "HOW CAN YOU STAY HERE ALL DAY PLAYING THE SAME SONG ALL THE TIME?", - "AND HOW CAN YOU HEAR ME?", - "PLEASE, LEND ME THE EAR-PLUGS", - "COME ON, I'LL GIVE THEM BACK TO YOU RIGHT AWAY", - "COME ONNN...", - // 365 - "WELL GOODBYE, I HAVE TO KILL A VAMPIRE", - "", - "WHAT LANGUAGE ARE YOU SPEAKING?, TRANSILVANIAN?", - "WHAT ARE YOU TALKING ABOUT? WHO IS UNCLE DESIDERIO?", - "BUT, WHAT'S THE PROBLEM WITH DRASCULA?", - // 370 - "WHO IS THIS GUY NAMED VON BRAUN?", - "AND WHY DOESN'T HE DO IT?", - "WHERE CAN I FIND VON BRAUN?", - "WELL, THANKS AND GOODBYE. HOPE YOU SLEEP IT OFF JUST FINE", - "WE HAD BETTER CALL FIRST", - // 375 - "ARE YOU PROFESSOR BRAUN?", - "AND COULD YOU TELL ME WHERE I CA...?", - "I DON'T BELIEVE HE IS GANIMEDES THE DWARF", - "PROFESSOR!!", - "PLEASE HELP ME!. MY GIRLFRIEND'S LIFE DEPENDS ON YOU!!", - // 380 - "WELL, ALL RIGHT. I DON'T NEED YOUR HELP", - "ALL RIGHT. I'M LEAVING", - "DON'T DE AFRAID. WE WILL BEAT DRASCULA TOGETHER", - "THEN WHY DON'T YOU HELP ME?", - "I GOT THEM", - // 385 - "YES, I GOT THEM!!", - "ALL RIGHT", - "AHH....YES", - "I HAVE COME TO GET INTO THAT CABIN AGAIN", - "I AM READY TO FACE YOUR TEST", - // 390 - "ALL RIGHT OLD MAN. I CAME FOR MY MONEY", - "NO, NOTHING. I WAS JUST LEAVING", - "SORRY...", - "WOULD YOU LIKE THIS BOOK?. IT HAS SOME SCORES FROM TCHAIKOVSKY", - "HOW CAN I KILL A VAMPIRE?", - // 395 - "HAS ANYBODY TOLD YOU THAT SLEEPING IN A BAD POSITION IS NOT GOOD FOR YOU?", - "THAT'S WHAT MY MUM ALWAYS TELL ME", - "WHY DIDN'T DRASCULA KILL YOU?", - "AND WHAT WAS IT?", - "GREAT! YOU HAVE AN IMMUNIZING BREW", - // 400 - "SO?", - "ALL RIGHT", - "CAN YOU REPEAT WHAT I NEED FOR THAT BREW", - "WELL, I'LL RUSH OUT TO GET IT", - "HEY, WHAT HAPPENED WITH THE PIANIST?", - // 405 - "I HAVE ALL THE INGREDIENTS OF THAT BREW", - "JUST A QUESTION. WHAT IS ALL THAT ABOUT THE ALUCSARD ETEREUM?", - "YES, YES?...", - "AND WHERE IS THAT CAVERN?", - "WHAT HAPPENED? DIDN'T THEY HAVE TO GO TO COURT?", - // 410 - "...BUT... IF I MEET MORE VAMPIRES?", - "IT'S A VAMPIRE THAT WON'T LET ME COME THROUGH", - "HE LOOKS LIKE YODA, BUT A LITTLE TALLER", - "HEY YODA, IF YOU JUST LET ME GO ON MY WAY, I'LL GIVE YOU A PENNY", - "OK, OK, YOU GET MAD ABOUT NOTHING MAN", - // 415 - "HAS ANYBODY TOLD YOU THAT YOU LOOK LIKE YODA?", - "HI VAMPIRE, IT'S A BEAUTIFUL NIGHT, HUH?", - "ARE YOU A VAMPIRE OR AN OIL PAINTING?", - "I'D BETTER NOT SAY ANYTHING, IN CASE YOU GET MAD", - "IT'S LOCKED", - // 420 - "THE MAGPIE WOULD PECK OUT MY EYES IF I TRIED!", - "OH MY GOD. IT'S LOCKED...THAT'S SCARY, HUH?", - "THE HINGES ARE RUSTY", - "THERE IS ONLY ONE BAG OF FLOUR IN THERE", - "THAT TOOK AWAY THE RUST", - // 425 - "I FOUND A PINE STAKE", - "I'LL TAKE THIS LARGER ONE", - "WELL, I THINK I CAN GET RID OF THIS STUPID DISGUISE", - "\"PASSAGE TO TOWERS CLOSED FOR REPAIRS. PLEASE USE THE MAIN ENTRANCE. SORRY FOR THE INCONVENIENCE\"", - "...HE IS PALE, HE HAS FANGS AND WEARS A TOUPE\220 HE SURE IS DRASCULA!", - // 430 - "IT'S B.J.! ARE YOU ALL RIGHT B.J.?", - "YES, I KNOW SHE IS STUPID, BUT I'M SO LONELY", - "YOU DON'T HAVE A KEY AROUND THERE, DO YOU?", - "I BET YOU DON'T HAVE A LOCK PICK AROUND!", - "GIVE ME A HAIR PIN, I'M GOING TO PLAY MCGYVER HERE!", - // 435 - "DON'T GO ANYWHERE. I'LL BE RIGHT BACK", - "SHOOT! IT'S BROKEN!", - "OLEEEE! I EVEN SHAVED DUDE!", - "YES, DARLING?", - "HE HAS NOT ARRIVED YET", - // 440 - "THE PIANIST IS NOT HERE", - "A TRANSILVANIAN SCOTCH ON THE ROCKS", - "I DON'T HAVE A ROOM YET", - "IT LOOKS LIKE HE GOT STUCK IN THE BATH AND DECIDED TO RUN A BAR", - "HE WAS AS DRUNK AS A SAILOR", - // 445 - "THAT HAIR...IT REMINDS ME OF SOMEBODY", - "IT'S A RAW-BONED SKELETON", - "LOOK! THERE'S MIGUEL BOSE!", - "HE'S ASLEEP. IT'D BE A SHAME TO WAKE HIM UP", - "HE'S UGLIER THAN EMILIO DE PAZ", - // 450 - "A PINE WOOD COFFIN", - "HE IS GOING TO CUT ME IN LITTLE SLICES. JUST LIKE A SAUSAGE", - "I DON'T LIKE PENDULAE. I'D PREFER ARTICHOKES", - "I CAN'T MAKE IT. I'M HANDCUFFED", - "IT'S OBVIOUSLY A SECRET DOOR", - // 455 - "THEY IGNORE ME", - "COME ON..!", - "WHEN I READ THE SCRIPT IT WAS SUPPOSED TO MOVE, BUT THE BUDGET GOT CRAZY AND THEY COULDN'T AFFORD TO PAY THE GYM, SO I NEVER GOT STRONGER. END OF STORY", - "IT SEEMS A LITTLE LOOSE ON THE WALL", - "I DON'T THINK IT IS GOING TO HELP ME ANYWAY. IT'S TOO WET TO LIGHT", - // 460 - "TO THE WEST WING? NO WAY! NOBODY KNOWS WHAT YOU WILL FIND THERE!!", - "SHE'S GOT NICE TRANSILVANIAN FEATURES", - "", - "IT'S A SHAME THERE ISN'T A ROASTED LAMB IN THERE", - "LAST TIME I OPENED AN OVEN I BLEW UP THE HOUSE", - // 465 - "THAT'S THE TRANSILVANIAN FOOTBALL TEAMS BADGE", - "WHAT FOR? TO PUT IT ON MY HEAD??", - "I DON'T THINK THESE TOWERS ARE THE OPENING KIND", - "I DON'T WANT TO KNOW WHAT KIND OF FOOD IS IN THERE!", - "IT LOOKS IMPRESSIONIST TO ME...", - // 470 - "THE NIGHT IS FALLING OVER ALL OF US...THAT'S SCARY, ISN'T IT?", - "IT'S STUCK!", - "IT'S ELVIS THE KING. YOU DIDN'T IMAGINE THAT WOULD BE HERE, DID YOU!", - "NO, I ALREADY HAVE ONE AT HOME TO FEED", - "A SHELF WITH BOOKS AND SOME OTHER THINGS", - // 475 - "BUT WHO CAN I CALL AT THIS TIME?", - "\"HOW TO FILL IN TAX RETURN FORMS\". HOW INTERESTING!", - "I ALREADY HAVE ONE AT HOME. I THINK IT'S A WORLDWIDE BEST SELLER", - "A COMPLETELY NORMAL KEY", - "I THINK SHE IS NOT FROM AROUND HERE", - // 480 - "HEY, THEY'RE FANG-LIKE FRENCH FRIES! I LOVE IT!", - "I DON'T THINK THIS IS THE RIGHT TIME TO EAT THAT CRAP KNOWING THAT MY GIRLFRIEND HAS BEEN KIDNAPPED BY THE MOST EVIL PERSON EVER ON EARTH", - "I'M HAVING A GREAT TIME KILLING VAMPIRES WITH THIS THING!", - "LET'S SEE IF ANOTHER ONE COMES SOON!", - "NO, IT HAS TO BE WITH A DIRTY AND STINKY VAMPIRE, JUST LIKE THE ONE I KILLED BEFORE", - // 485 - "THIS IS THE ONE AND ONLY WIG THAT ELVIS USED WHEN HE WENT BALD", - "IT'S FLOUR, BUT DON'T ASK ME ANY COMMERCIAL NAMES", - "MAYBE ANOTHER TIME, OK?", - "THAT'S A GREAT AXE, IT'S A SHAME THERE IS NO VAMPIRE'S HEAD AROUND HERE, HUH?", - "NO. I REALLY AM A GOOD PERSON", - // 490 - "IT'S MARGARET'S THATCHERS DEODORANT...HA, HA, HA...!!", - "THAT'S A PRETTY CUTE CLOAK", - "", - "JUST LIKE ALL THE BRANCHES FROM ANY TREE IN THE WORLD, THERE IS NOTHING SPECIAL.", - "HEY, THAT'S AMAZING! A ROPE IN THIS TYPE OF ADVENTURE GAME!", - // 495 - "I WONDER WHAT WE COULD USE IT FOR...", - "A ROPE TIED TO A BRANCH OR THE OTHER WAY AROUND, HOWEVER YOU WANT TO PUT IT...", - "IT LOOKS LIKE THIS MAGPIE IS EVIL-MINDED", - "FORGET IT, I'M NOT SAYING ANYTHING IN CASE HE GETS MAD", - "SHE LOOKS DEAD, BUT SHE REALLY ISN'T, HUH?", - // 500 - "NO ANIMAL WAS HARMED DURING THE PRODUCTION OF THIS GAME", -}, -{ - // 0 - "", - "Es la segunda puerta mas grande que he visto en mi vida", - "Bueno, no", - "Esta sellada con tablones. La iglesia debe llevar abandonada varios a\244os", - "Si no la he abierto", - // 5 - "\250Que hago? \250La arranco?", - "Hola puerta. Te voy a hacer un marco.", - "Demasiado para mi.", - "una ventana sellada con tablones.", - "No puedo.", - // 10 - "Ya lo esta.", - "\250Y pa que?", - "Hola ventana. \250Tienes algo que hacer esta noche?", - "No sin el permiso de obras publicas", - "\255eh! esa ventana tiene solo un tablon...", - // 15 - "\255Eoooooo! \255Ventana!", - "Hola tu.", - "", - "No alcanzo.", - "Esta bien donde esta.", - // 20 - "", - "Es una tumba en forma de cruz.", - "No gracias.", - "Hola muerto. \250quieres gusanitos?", - "Si hombre. Como en Poltergueist.", - // 25 - "", - "", - "Vuelvo en quince minutos.", - "Prohibido pegar carteles.", - "", - // 30 - "Esta cerrado con llave.", - "Ya tengo uno.", - "", - "No contesta.", - "No, esta bien aparcado.", - // 35 - "Es una puerta.", - "Un cajon de la mesa.", - "Un sospechoso armario.", - "Hola armario. \250Que tal?", - "", - // 40 - "", - "Es un candelabro muy viejo.", - "Debe de llevar aqui desde que Mazinguer-z era un tornillo.", - "No. Es una reliquia.", - "Es un bonito retablo.", - // 45 - "", - "Ji, ji, ji.", - "", - "No.", - "", - // 50 - "Ja, ja, ja. \255que bueno!", - "", - "", - "", - "No veo nada en especial.", - // 55 - "Es Fernan, la planta.", - "Es una de las picas de la verja.", - "\255Eh! Aqui debajo hay una caja de cerillas.", - "\255Mira! un paquete de clinex. \255Y hay uno sin usar!", - "No hay nada mas en el cubo.", - // 60 - "Es un ciego que no ve.", - "", - "", - "", - "", - // 65 - "Es una cuantiosa cantidad de dinero.", - "", - "", - "", - "", - // 70 - "", - "", - "", - "", - "", - // 75 - "", - "", - "", - "", - "", - // 80 - "", - "", - "", - "", - "", - // 85 - "", - "", - "", - "", - "", - // 90 - "", - "", - "", - "", - "", - // 95 - "", - "", - "", - "", - "", - // 100 - "NO TIENE NADA DE ESPECIAL", - "NO ES NADA FUERA DE LO NORMAL", - "\250QUE PASA TU?", - "HOLA", - "\250NADA NUEVO?", - // 105 - "\250QUE TAL LA FAMILIA?", - "\255QUE COSAS TIENES!", - "\255PERO COMO VOY A COGER ESO!", - "MI RELIGION ME LO PROHIBE", - "MEJOR NO", - // 110 - "\255SI HOMBRE!", - "NI HABLAR DE ESO", - "IMPOSIBLE", - "ESTO NO SE ABRE", - "YO SOLO NO PUEDO", - // 115 - "SI QUISIERA PODRIA, PERO ES QUE ME DA PEREZA", - "NO LE VEO MOTIVO APARENTE", - "ES UN CEREBRO BASTANTE MAJO", - "Y BIEN, CEREBRO \250QUE PIENSAS HACER ESTA NOCHE?", - "NO, DEBE CONSERVARSE EN LUGAR CERRADO A LA ACCION MUTANTE DE LA ATMOSFERA", - // 120 - "ES UN HUESO, COMO MI JEFE", - "UNA ESTACA MUY AFILADA", - "FIEL ESTACA PUNTIAGUDAAA, NOBLE ROBLE TRANSILVAAANOO", - "\255VAYA, ME TENGO QUE CORTAR LAS U\245AS!", - "\255AHI DENTRO ESTA B.J., Y HAY QUE VER COMO ESTA LA TIA!", - // 125 - "ESTA CERRADA A CAL Y CANTO", - "\"CANDADOS CAL Y CANTO S.A.\"", - "ES EL TIPICO ESQUELETO QUE ESTA EN TODAS LAS MAZMORRAS DE TODOS LOS JUEGOS", - "SE SUELE USAR PARA COMUNICAR CORRIENTE ELECTRICA A LOS APARATOS A EL ENCHUFADOS", - "ES TOTALMENTE ARTESANAL, PORQUE LOS JAPONESES LOS HACEN DE BOLSILLO", - // 130 - "SOLO HE VISTO EN MI VIDA OTRA COSA TAN FEA", - "QUITA. NO LE DIGO NADA A VER SI SE VA A ENFADAR", - "PARECE BASTANTE RACIONAL", - "ES UNA FOTO DE PLATON ESCRIBIENDO SU DIALOGO PERDIDO", - "NO SOY DE LOS QUE HABLAN CON POSTERS", - // 135 - "UN ESCRITORIO MUY MONO", - "ES UN DIPLOMA DE CAZA-CAZA-VAMPIROS HOMOLOGADO POR LA UNIVERSIDAD DE OXFORD", - "ES NOCHE CERRADA CON LUNA LLENA", - "PARECE QUE ESTOS TORNILLOS NO ESTAN MUY ENROSCADOS", - "NO MIRES, PERO CREO QUE UNA CAMARA OCULTA ME ESTA ENFOCANDO", - // 140 - "UN DETECTOR DE ESTACAS MUY MODERNO", - "NO, EL LABORATORIO ESTA EN EL SEGUNDO PISO", - "UNA BONITA MESILLA DE NOCHE", - "ES UN MONTON DE DINERO QUE NO PUEDE FALTAR EN UNA AVENTURA QUE SE PRECIE", - "SI YO FUERA RICO, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", - // 145 - "SON UNAS EXTRA\245AS HOJAS. DEBEN DE HABERLAS TRAIDO DE SUDAMERICA, O POR AHI", - "NO CREO QUE ME CONTESTARAN", - "ES UN BONITO CRUCIFIJO DE MADERA. EL ICONO NO CAPTA TODA LA EXTENSION DE SU BELLEZA", - "YO SOLO REZO ANTES DE ACOSTARME", - "\255EH, PARECE QUE ESTA PICA ESTA UN POQUITO SUELTA!", - // 150 - "PARA QUE LUEGO TE QUEJES DE QUE NO DOY PISTAS", - "ES UNA PICA BASTANTE CONVENCIONAL", - "SON MONOS, AUNQUE TIENEN UN POCO DE MIERDECILLA", - "NO, NO ME OIRIAN. JI,JI,JI \255QUE BUENO!", - "\"LA BELLA DURMIENTE DEL BOSQUE\" DE CHAIKOSKY, O CHOIFRUSKY, O COMO SE DIGA", - // 155 - "MUY APETITOSO", - "NO, YO NO SOY DE ESOS QUE SE METEN EN LA BOCA CHICLES USADOS", - "UNA HOZ MUY MONA. ME PREGUNTO DONDE ESTARA EL MARTILLO", - "\"LOS FABRICANTES DE TABACO ADVIERTEN QUE LAS AUTORIDADES SANITARIAS PERJUDICAN SERIAMENTE LA SALUD\"", - "UNA VELA NORMAL Y CORRIENTE, CON CERA Y TODO", - // 160 - "\255HAY QUE VER COMO BRILLAN ESTAS DOS BRILLANTES MONEDAS!", - "\255HAY QUE VER COMO BRILLA ESTA BRILLANTE MONEDA!", - "CON ESTO SERE INMUNE A LAS MORDEDURAS DE LOS VAMPIROS", - "NO, TODAVIA NO ES EL MOMENTO", - "HAY UN BILLETE DE MIL Y UN PAR DE MONEDAS", - // 165 - "DICE \"SE RUEGA NO ECHAR COMIDA AL PIANISTA\"", - "TORTILLA, 200. PESCAITOS FRITOS, 150, PATATAS ALIOLI, 225", - "LAS MEJORES HAMBUERGUESAS A ESTE LADO DEL DANUBIO, POR SOLO 325", - "ES UNA BONITA CALAVERA, CON UNA MIRADA MUY PENETRANTE. \255JI, JI, JI, QUE BUENO!", - "HOLA CALAVERA, ME RECUERDAS AL TIO DE HAMLET", - // 170 - "TENGO POR COSTUMBRE NO TOCAR COSAS QUE HAYAN ESTADO VIVAS", - "ES UNA PAPELERA", - "ES UNA PORRA PARA EL PARTIDO DE ESTA NOCHE", - "ME PREGUNTO QUE HABRA DETRAS", - "\255EH, ESTA CORTINA NO SE MUEVE!", - // 175 - "HAY QUE VER, QUE TETRICO ES ESE CASTILLO, \250EH? ", - "NO PUEDO, ESTA DEMASIADO LEJOS PARA OIRME", - "ES UN TIPICO BOSQUE TRANSILVANO, CON ARBOLES ", - "\255PERO QUE TONTERIAS DICES, CON LO OSCURO QUE ESTA!", - "CONFITERIA GARCIA. PASTELES Y CHICLES.", - // 180 - "UNA PUERTA MUY BONITA", - "ESTA CERRADA", - "UN BARRIL COMPLETAMENTE CERRADO", - "", - "\255QUE BICHOS MAS MONOS!", - // 185 - "BSSST, BSSST, GATITO...", - "NO CONTESTA", - "LA LUNA ES UN SATELITE QUE GIRA ALREDEDOR DE LA TIERRA CON UN PERIODO DE REVOLUCION DE 28 DIAS", - "HOLA, LUNA LUNERA CASCABELERA ", - "ESTA TOTALMENTE TAPIADA CON TABLONES", - // 190 - "IMPOSIBLE. ESTO NO LO ABRE NI EL MAYORDOMO DE LA TELE", - "\255EH, PARECE QUE LA SOMBRA DE ESE CIPRES ES ALARGADA!", - "\255EOOO, TABERNEROOO!", - "QUISIERA UNA HABITACION ", - "\250SABE DONDE PUEDO ENCONTRAR A UN TAL CONDE DRASCULA?", - // 195 - "SI, \250QUE PASA? ", - "\250Y ESO?", - "\250DE... DE VERDAD?", - "BUENA PREGUNTA, LE VOY A CONTAR MI HISTORIA, MIRE...", - "SON SOLO CINCO MINUTOS", - // 200 - "ME LLAMO JOHN HACKER, Y SOY REPRESENTANTE DE UNA INMOBILIARIA BRITANICA", - "AL PARECER, EL CONDE DRASCULA QUIERE COMPRAR UNOS TERRENOS EN GIBRALTAR, Y ME HAN MANDADO A MI PARA NEGOCIAR LA VENTA", - "PERO ME PARECE A MI QUE MA\245ANA TEMPRANITO ME VUELVO CON MI MAMA", - "BONITA NOCHE \250VERDAD?", - "NO, NADA", - // 205 - "EOOOO, PIANISTA", - "BONITA NOCHE", - "Y ADEMAS NO HACE FRIO", - "PUES NADA, TE DEJO QUE SIGAS TOCANDO", - "PUES ESO", - // 210 - "HOLA JEFE, \250QUE TAL?", - "\250Y LA FAMILIA?", - "HAY AMBIENTE AQUI \250EH?", - "MEJOR NO DIGO NADA", - "SE ESTA MEJOR EN CASA QUE EN NINGUN SITIO... SE ESTA MEJOR EN... \250EH? PERO SI USTED NO ES LA TIA ENMA. ES MAS. \255SI YO NO TENGO NINGUNA TIA ENMA!", - // 215 - "SI, EL MIO TAMBIEN. USTED PUEDE LLAMARME COMO LE APETEZCA, AUNQUE SI ME LLAMA JOHNY, ACUDO COMO LOS PERROS", - "SI, QUE GOLPES TENGO \250VERDAD? POR CIERTO, \250DONDE ESTOY?", - "SI.", - "CACHIS... ", - "OH, SI. POR SUPUESTO", - // 220 - "PUES MUCHAS GRACIAS POR PRESTARME TU AYUDA. NO TE MOLESTO MAS. SI ME DICES DONDE ESTA LA PUERTA, POR FAVOR... ", - "PORQUE EL GOLPE ME HA DEBIDO AFECTAR AL CEREBRO Y NO VEO TRES EN UN BURRO ", - "BAH, NO IMPORTA. SIEMPRE LLEVO DE REPUESTO", - "\255GUAU, QUE TIA MAS BUENA! \255NO ME HABIA DADO CUENTA YO! CLARO, SIN LAS GAFAS", - "OYE... ", - // 225 - "\255\250 Y ESTOOOOOO?!", - "\255NO TE PREOCUPES B.J., AMOR MIO! TE SALVARE DE LAS GARRAS DE ESE ", - "ME HA TOCADO LAS NARICES, VAMOS.", - "\255AHHH, UN HOMBRE LOBO! \255MUERE MALDITO!", - "SI, ESTO...", - // 230 - "SI, ESTO... CREO QUE SEGUIRE MI CAMINO. CON PERMISO... ", - "\250QUE?", - "PUES LA VERDAD, PENSANDOLO BIEN... CREO QUE NO", - "DIME, OH ERUDITO FILOSOFO, \250EXISTE ALGUNA RELACION CAUSA-EFECTO ENTRE LA VELOCIDAD Y EL TOCINO?", - "VALE, VALE, DEJALO. DE TODAS FORMAS, NO SE POR QUE HE DICHO ESO.", - // 235 - "\250QUE HACES AQUI FILOSOFANDO, QUE NO TE ESTAS COMIENDO GENTE?", - "\250Y ESO?", - "OYE, PUEDES REPETIR ESO DE \"INCLINACIONES PRE-EVOLUTIVAS\"?", - "SI HOMBRE. ESE ROLLO QUE ME HAS SOLTADO ANTES. ES QUE NO ME HE ENTERADO MUY BIEN...", - "NO, MEJOR NO DIGO NADA, QUE COMO LE TOQUE LA VENA...", - // 240 - "\250SI, DIGA?", - "SI, \250QUE PASA? ", - "AH, PUES AHORA QUE SACA EL TEMA LE DIRE QUE...", - "", - "POR CIERTO, \250QUE PASARIA SI UN VAMPIRO SE HICIERA CIRCUNSTANCIALMENTE CON LA RECETA... ", - // 245 - "PUES NADA. OYE, \250A QUE ESTO PARECE UN PEGOTE PUESTO EN EL GUION PARA ACABAR PRONTO EL JUEGO? BUENO, A LO MEJOR NO", - "\255ESTA VACIO!", - "PORQUE ME ROBASTE MI AMOR, B.J. SIN ELLA LA VIDA PARA MI NO TIENE SENTIDO", - "\255\250SU CEREBRO?!", - "PUES NO ES POR NADA, PERO ME PARECE QUE ME HA CARGADO TU MONSTRUITO", - // 250 - "\255VIRGENCITA, QUE ME QUEDE COMO ESTOY!", - "\255NO TE SALDRAS CON LA TUYA. SEGURO QUE APARECE SUPERLOPEZ Y ME RESCATA!", - "VAYA UNA MIERDA DE JUEGO EN EL QUE MUERE EL PROTAGONISTA ", - "UN MOMENTO, \250QUE HAY DE MI ULTIMO DESEO?", - "\255JA, JA! AHORA ESTOY INMUNIZADO CONTRA TI MALDITO DEMONIO. ESTE CIGARRILLO ES UNA POCION ANTIVAMPIRICA QUE ME DIO VON BRAUN ", - // 255 - "SI, CLARO. PERO NUNCA CONSEGUIRAS QUE TE DIGA LA RECETA", - "PUEDO SOPORTAR LA TORTURA, ADEMAS DE CREARLA ", - "\255NO, POR FAVOR! \255HABLARE, PERO NO ME HAGA ESO!", - "BUENO. YA TE HE DICHO LO QUE QUERIAS SABER. AHORA LIBERANOS A B.J. Y A MI Y DEJANOS EN PAZ", - "\255B.J.! \250QUE HACES AQUI? \250DONDE ESTA DRASCULA?", - // 260 - "\255QUE DESALMADO! SOLO PORQUE PERTENECE A LA NOBLEZA SE CREE QUE TIENE EL DERECHO DE PERNADA CON CUALQUIERA QUE SE LE ANTOJE ", - "\255ABAJO LA ARISTOCRACIA CACIQUIL!", - "\255ARRIBA LOS POBRES DEL MUUNDOOO....", - "Y POR LO QUE VEO TE HA ENCADENADO CON CANDADO Y TODO", - "BUENO, VALE. \250NO TENDRAS UNA HORQUILLA?", - // 265 - "BUENO, BUENO. NO TE PONGAS ASI, YA SE ME OCURRIRA ALGO.", - "EH, TABERNERO", - "\250COMO VA EL PARTIDO?", - "\250QUIEN?", - "\250ES QUE NO VES QUE ESTA AQUI DRASCULA?", - // 270 - "PUES VAMOS A ACABAR CON EL \250NO?", - "PONME UN CUBATA...", - "NADA. SE ME HA OLVIDADO LO QUE TE IBA A DECIR", - "O\247ME\247PONES\247UN\247CUBATA\247O\247ME\247PONGO\247A\247TOCAR\247EL\247PIANO", - "\250CUANTO QUEDA PARA QUE ACABE EL PARTIDO?", - // 275 - "BUENAS NOCHES", - "\250Y QUE TAL ANDAS IGOR? \250JOROBAO? \255JI,JI,JI, QUE BUENO! ", - "\250QUE SE SUPONE QUE HACES?", - "PUES NO", - "PUES PONTE GAFAS", - // 280 - "\250QUE ES ESO DE LA ORGIA SOBRENATURAL?", - "VALE, VALE, NO SIGAS. YA ME HAGO UNA IDEA", - "\250NO PODRIAS DECIRME DONDE ESTA DRASCULA? ", - "ANDA, PORFAAA", - "\250POR QUE NO?", - // 285 - "AH, PERO \250DUERME POR LA NOCHE?", - "BUENO, PUES QUE SE DE BIEN LA RENTA", - "ES QUE TENGO QUE HABLAR CON EL", - "\255EOOO, ESQUELETOOO! ", - "\255CANASTOS! \255UN MUERTO QUE HABLA!", - // 290 - "CUENTAME, \250COMO HAS VENIDO A PARAR AQUI?", - "\250Y PARA QUE VA A QUERER DRASCULA CREAR UN MONSTRUO? ", - "\250CUAL ES TU NOMBRE, AMIGO ESQUELETO?", - "OYE, \250NO QUIERES QUE TE TRAIGA NADA DE COMER?", - "DEBES TENER EL ESTOMAGO VACIO. \255JI, JI, JI!", - // 295 - "LA VERDAD ES QUE NO ME APETECE HABLAR AHORA", - "\255LA MADRE QUE...(PITIDO) ESPERO QUE TE...(PITIDO) Y QUE TE...(PITIDO) DOS VECES!", - "YO LA QUERIA, DE VERDAD. VALE, DE ACUERDO QUE NO ERA UNA LUMBRERA, PERO NADIE ES PERFECTO \250NO? ", - "ADEMAS, TENIA UN CUERPAZO QUE PARA QUE QUEREMOS MAS", - "YA NO VOLVERE A SER EL MISMO. ME RECLUIRE EN UN MONASTERIO A DEJAR QUE MI VIDA SE ME ESCAPE POCO A POCO", - // 300 - "NADA PODRA YA SACARME DE ESTA MISERIA PORQUE...", - "\250DE QUIEN? \250DE QUIEN?", - "QUIERO SER PIRATA", - "QUIERO SER PROGRAMADOR ", - "CONTADME ALGO SOBRE PELAYO", - // 305 - "SEGUIRE JUGANDO Y OLVIDARE QUE OS HE VISTO ", - "\255A QUIEN SE LE HABRA OCURRIDO ESTA IDIOTEZ!", - "ES UN BOLSO COMO EL DE MI ABUELITA ", - "\255PERO QUE BUENO QUE ESTOY!", - "CUANTO MAS ME MIRO MAS ME GUSTO", - // 310 - "\250Y LUEGO COMO ME CIERRO?", - "TENDRE QUE ABRIRME PRIMERO \250NO?", - "ESTOY BIEN DONDE ESTOY", - "YA ME TENGO", - "HOLA YO", - // 315 - "ME LOS PONDRE CUANDO LA OCASION SEA OPORTUNA", - "NO VEO NADA EN ESPECIAL", - "ESTA BIEN DONDE ESTA", - "\250Y PA QUE?", - "NO PUEDO", - // 320 - "HOLA TU", - "ES EL PANTEON DEL TIO DESIDERIO", - "\255EOOOO, TIO DESIDERIOOOO!", - "NO. NO QUIERO CORTARME OTRA VEZ", - "\255EJEM,JEM...!", - // 325 - "\255YAMM, EMMM, JH!", - "\255SI, COF,COF!", - "ANDA, SI HAY UN CHICLE AQUI PEGADO", - "ES EL MOVILANI QUE ME REGALARON EN NAVIDAD", - "\255QUE ALTO ESTA!", - // 330 - "\255SAL AL BALCON JULIETA!", - "\255TU ERES LA LUZ QUE ILUMINA MI CAMINO!", - "EH,PUERTA \250QUE PASSA?", - "EOOO, MAQUINA DE TABACO DE TRANSILVANIAAA", - "ES UNA MAQUINA EXPENDEDORA DE TABACO", - // 335 - "TENGO OTRA MONEDA DENTRO", - "NO. HE DECIDIDO DEJAR EL TABACO Y EL ALCOHOL ", - "A PARTIR DE AHORA ME DEDICARE SOLO A LAS MUJERES ", - "\255ESTO ES UN TIMO! NO HA SALIDO NADA", - "\255POR FIN! ", - // 340 - "PUES ESO, UN BAUL", - "HOLA BAUL, TE LLAMAS COMO MI PRIMO QUE SE LLAMA RAUL.", - "HE ENCONTRADO EL BOLSO DE B.J.", - "DIOS MIO, NO ME REFLEJO \255SOY UN VAMPIRO!", - "...AH, NO. ES QUE ES UN DIBUJO", - // 345 - "ESPEJITO: \250QUIEN ES EL MAS BELLO DEL REINO?", - "NO ME QUIERE ABRIR", - "MUY BIEN. ME HE PUESTO LOS TAPONES", - "ES UN DIPLOMA DE CAZA-VAMPIROS HOMOLOGADO POR LA UNIVERSIDAD DE CAMBRIDGE", - "NO, AUN ME FALTAN INGREDIENTES, NO VALE LA PENA DESPERTARLE", - // 350 - "ES QUE NO TENGO DINERO", - "ES UNA LAMPARA BRITANICA", - "\255TABERNERO! \255AYUDEME!", - "HA APARECIDO UN VAMPIRO Y SE HA LLEVADO A MI NOVIA", - "\255\250PERO NO VA USTED A AYUDARME?!", - // 355 - "\250MUERTA? \250QUE ES LO QUE QUIERE DECIR?", - "\255EJEM!", - "\255UN VAMPIRO HA SECUESTRADO A LA CHICA DE LA 506!", - "\255TIENES QUE AYUDARME!", - "\250NO SABES TOCAR NINGUNA DE LOS INHUMANOS?", - // 360 - "\250COMO TE AGUANTAS, TODO EL DIA TOCANDO LO MISMO?", - "\250Y ENTONCES COMO ME OYES?", - "DEJAME LOS TAPONES", - "ANDA. SI TE LOS DEVUELVO ENSEGUIDA", - "VENGAAAA...", - // 365 - "ADIOS. TENGO QUE MATAR A UN VAMPIRO", - "", - "\250QUE HABLAS? \250EN TRANSILVANO?", - "\250QUIEN ES EL TIO DESIDERIO?", - "\250PERO QUE PASA CON ESE TAL DRASCULA?", - // 370 - "\250QUIEN ES ESE TAL VON BRAUN?", - "\250Y POR QUE NO LO HACE?", - "\250Y DONDE PUEDO ENCONTRAR A VON BRAUN?", - "PUES GRACIAS Y ADIOS, QUE LA DUERMAS BIEN", - "SERA MEJOR LLAMAR PRIMERO", - // 375 - "\250ES USTED EL PROFESOR VON BRAUN?", - "\250Y NO ME PODRIA DECIR DONDE PUEDO...?", - "NO ME CREO QUE SEA EL ENANO GANIMEDES", - "\255PROFESOR!", - "\255AYUDEME! \255LA VIDA DE MI AMADA DEPENDE DE USTED!", - // 380 - "ESTA BIEN, NO NECESITO SU AYUDA", - "DE ACUERDO. ME VOY", - "NO TENGA MIEDO. JUNTOS VENCEREMOS A DRASCULA", - "ENTONCES \250POR QUE NO ME AYUDA?", - "YO LAS TENGO", - // 385 - "\255SI LAS TENGO!", - "DE ACUERDO", - "...ER ...SI", - "VENGO A METERME EN ESA CABINA DE NUEVO", - "ESTOY PREPARADO PARA ENFRENTARME A SU PRUEBA", - // 390 - "ESTA BIEN, VEJETE. HE VENIDO A POR MI DINERO", - "NO, NADA. YA ME IBA", - "PERDONA", - "\250TE INTERESA ESTE LIBRO? TIENE PARTITURAS DE TCHAIKOWSKY", - "\250COMO PUEDO MATAR A UN VAMPIRO?", - // 395 - "\250NO TE HAN DICHO QUE ES MALO DORMIR EN MALA POSTURA?", - "PUES ES LO QUE SIEMPRE ME DICE A MI MI MADRE", - "\250POR QUE NO TE PUDO MATAR DRASCULA?", - "\250Y QUE FUE?", - "\255ESTUPENDO! \255TIENE USTED UNA POCION DE INMUNID...!", - // 400 - "\250ENTONCES?", - "MUY BIEN", - "\250ME PUEDE REPETIR LO QUE NECESITO PARA ESA POCION?", - "PUES PARTO RAUDO A BUSCARLO", - "OIGA, \250QUE HA PASADO CON EL PIANISTA?", - // 405 - "YA\247TENGO\247TODOS\247LOS\247INGREDIENTES\247DE\247ESA\247POCION", - "UNA PREGUNTA: \250QUE ES ESO DE ALUCSARD ETEREUM?", - "DIGA, DIGA... ", - "\250Y DONDE ESTA ESA GRUTA?", - "\250QUE PASA? \250NO TENIAIS JUZGADO?", - // 410 - "...PERO ...\250Y SI ME ENCUENTRO A MAS VAMPIROS?", - "ES UN VAMPIRO QUE NO ME DEJA PASAR", - "SE PARECE A YODA, PERO MAS ALTO ", - "EH, YODA. SI ME DEJAS PASAR TE DOY UN DURO", - "BUENO VALE, QUE NO SE TE PUEDE DECIR NADA", - // 415 - "HOLA VAMPIRO, BONITA NOCHE \250VERDAD?", - "\250TE HAN DICHO ALGUNA VEZ QUE TE PARECES A YODA?", - "\250ERES UN VAMPIRO O UNA PINTURA AL OLEO?", - "MEJOR NO TE DIGO NADA, NO TE VAYAS A ENFADAR", - "ESTA CERRADA CON LLAVE", - // 420 - "\255LA URRACA ME PODRIA SACAR UN OJO SI LO INTENTO!", - "\255ESTA CERRADA! \255DIOS MIO, QUE MIEDO!", - "LAS BISAGRAS ESTAN OXIDADAS", - "AQUI DENTRO SOLO HAY UN BOTE CON HARINA", - "ESO HA QUITADO EL OXIDO", - // 425 - "HE ENCONTRADO UNA ESTACA DE PINO", - "COGERE ESTE QUE ES MAS GORDO", - "BUENO, CREO QUE YA PUEDO DESHACERME DE ESTE ESTUPIDO DISFRAZ", - "\"PASADIZO A LOS TORREONES CERRADO POR OBRAS. POR FAVOR, UTILICEN ENTRADA PRINCIPAL. DISCULPEN LAS MOLESTIAS\"", - "...ES PALIDO, TIENE COLMILLOS, TIENE TUPE Y USA CAPA... \255SEGURO QUE ES DRASCULA!", - // 430 - "\255ES B.J.! B.J. \250ESTAS BIEN?", - "SI, YA LO SE QUE ES TONTA, PERO ES QUE ESTOY DE SOLO", - "NO TENDRAS UNA LLAVE POR AHI, \250VERDAD? ", - "\250A QUE NO TIENES UNA GANZUA?", - "DAME UNA HORQUILLA. VOY A HACER COMO MCGYVER", - // 435 - "NO TE MUEVAS QUE AHORA VUELVO", - "\255CACHIS! \255SE ME HA ROTO!", - "\255OLEEEE! \255Y ADEMAS ME HE AFEITADO, COLEGA!", - "\250SI, CARI\245O?", - "NO LLEGA", - // 440 - "EL PIANISTA NO ESTA", - "UN CUBATA TRANSILVANO", - "AUN NO TENGO HABITACION", - "PARECE QUE SE QUEDO ATASCADO EN LA BA\245ERA Y DECIDIO PONER UN BAR", - "ESTA COMO UNA CUBA DE CUBA", - // 445 - "ESE PELO... EL CASO ES QUE ME RECUERDA A ALGUIEN", - "ES UN ESQUELETO HUESUDO", - "\255MIRA! \255MIGUEL BOSE!", - "ESTA DURMIENDO. SERIA UNA PENA DESPERTARLE", - "ES MAS FEO QUE EMILIO DE PAZ ", - // 450 - "UN ATAUD DE MADERA DE PINO", - "ME VA A CORTAR EN RODAJITAS, COMO A UN SALCHICHON", - "NO ME GUSTAN LOS PENDULOS. PREFIERO LAS ALCACHOFAS", - "MIS MANOS ESTAN ESPOSADAS. NO VOY A PODER", - "SALTA A LA VISTA QUE ES UNA PUERTA SECRETA", - // 455 - "ME IGNORAN", - "\255ANDA YA!", - "EN EL GUION SE MOVIA, PERO EL JUEGO SE SALIO DE PRESUPUESTO Y NO PUDIERON PAGARME UN GIMNASIO PARA PONERME CACHAS, ASI QUE NADA", - "PARECE QUE ESTA UN POCO SUELTA DE LA PARED", - "NO CREO QUE ME VAYA A SERVIR DE NADA. ESTA DEMASIADO HUMEDA PARA ENCENDERLA", - // 460 - "\250AL ALA OESTE? \255NI LOCO! \255A SABER QUE HABRA ALLI!", - "TIENE BONITOS MOTIVOS TRANSILVANOS ", - "", - "QUE PENA QUE AHI DENTRO NO HAYA UN CORDERITO ASANDOSE ", - "LA ULTIMA VEZ QUE ABRI UN HORNO LA CASA SALTO POR LOS AIRES", - // 465 - "ES EL ESCUDO DEL EQUIPO DE FUTBOL DE TRANSILVANIA", - "\250Y PARA QUE? \250PARA PONERMELA EN LA CABEZA?", - "NO CREO QUE ESTOS CAJONES SEAN DE LOS QUE SE ABREN", - "\255NO QUIERO SABER LA COMIDA QUE HABRA AHI DENTRO!", - "ME DA LA IMPRESION DE QUE ES IMPRESIONISTA", - // 470 - "LA NOCHE SE APODERA DE TODOS... QUE MIEDO \250NO?", - "ESTA ATRANCADA", - "ES EL REY \250ES QUE NO TE LO HABIAS IMAGINADO?", - "NO, YA TENGO UNO EN MI CASA, AL QUE LE DOY DE COMER Y TODO", - "UNA ESTANTERIA CON LIBROS Y OTRAS COSAS ", - // 475 - "\250Y A QUIEN LLAMO A ESTAS HORAS?", - "\"COMO HACER LA DECLARACION DE LA RENTA\" \255QUE INTERESANTE!", - "YA TENGO UNO EN MI CASA. CREO QUE ES UN BEST-SELLER MUNDIAL ", - "UNA LLAVE COMPLETAMENTE NORMAL", - "ME PARECE A MI QUE ESTA NO ES DE AQUI", - // 480 - "\255EH, SON PATATAS FRITAS CON FORMA DE COLMILLO! ME ENCANTA", - "NO CREO QUE SEA EL MEJOR MOMENTO DE PONERSE A COMER CHUCHERIAS, CON MI NOVIA EN MANOS DEL SER MAS MALVADO QUE HA PARIDO MADRE", - "\255QUE BIEN ME LO ESTOY PASANDO CARGANDOME VAMPIROS CON ESTO!", - "A VER SI APARECE OTRO PRONTO", - "NO, TIENE QUE SER CON UN VAMPIRO SUCIO Y MALOLIENTE COMO EL QUE ME CARGUE ANTES", - // 485 - "ES LA AUTENTICA PELUCA QUE USO ELVIS CUANDO SE QUEDO CALVO", - "ES HARINA, PERO NO PUEDO DECIR MARCAS", - "QUIZA EN OTRO MOMENTO \250VALE?", - "ES UN HACHA MAGNIFICA, QUE PENA QUE NO HAYA POR AQUI CERCA NINGUNA CABEZA DE VAMPIRO", - "NO. EN EL FONDO SOY BUENA PERSONA", - // 490 - "ES EL DESODORANTE DE LA TACHER \255JI,JI,JI!", - "ES UNA CAPA BASTANTE MONA", - "", - "COMO TODAS LAS RAMAS DE TODOS LOS ARBOLES DE TODO EL MUNDO, O SEA, SIN NADA DE PARTICULAR", - "\255OH, INCREIBLE! \255UNA CUERDA EN UNA AVENTURA GRAFICA!", - // 495 - "ME PREGUNTO PARA QUE SERVIRA...", - "UNA CUERDA ATADA A UNA RAMA O UNA RAMA ATADA A UNA CUERDA, SEGUN SE MIRE", - "PARECE QUE ESTA URRACA TIENE MUY MALAS INTENCIONES", - "QUITA, YO NO LA DIGO NADA, A VER SI SE VA A ENFADAR", - "PARECE QUE ESTA MUERTA, PERO ES MENTIRA \250EH?", - // 500 - "NINGUN ANIMAL DA\245ADO EN LA PRODUCCION DE ESTE JUEGO", -}, -{ - // 0 - "", - "Das ist die zweitgroesste Tuer, die ich je gesehen habe !", - "Ok, stimmt nicht ganz....", - "Sie haben Bretter davorgenagelt. Die Kirche scheint seit Jahren leer zu stehen", - "Aber ich habe sie doch nicht aufgemacht!", - // 5 - "Soll ich sie aufbrechen ?", - "Hallo Tuer! Ich verpasse Dir jetzt mal einen Rahmen!", - "Zuviel fuer mich !", - "ein zugenageltes Fenster", - "Ich schaff\357es nicht!", - // 10 - "Schon geschafft!", - "Und wozu?", - "Hallo Fenster. Hast Du heute abend schon was vor?", - "Nicht ohne Genehmigung der Staedtischen Baubehoerde", - "hey! Das Fenster da hat nur EIN Brett...", - // 15 - "Heyhooo! Fenster!", - "Hallo Du", - "", - "Ich komme nicht dran!", - "Gut so ! ", - // 20 - "", - "Es ist ein Grabstein in Form eines Kreuzes.", - "Nein, danke", - "Hallo Toter. Willst Du ein paar Wuermchen?", - "Klar Mann ! Wie in Poltergeist.", - // 25 - "", - "", - "Bin in einer Viertelstunde zurueck!", - "Plakate ankleben verboten", - "", - // 30 - "Sie ist abgeschlossen.", - "Ich habe schon eins.", - "", - "Keine Reaktion !", - "Nein, da steht es gut !", - // 35 - "Es ist eine Tuer", - "Eine Schublade vom Tisch", - "Ein verdaechtiger Schrank", - "Hallo Schrank. Alles klar?", - "", - // 40 - "", - "Ein uralter Kerzenstaender", - "Der stammt wohl noch aus der Zeit als meine Ururururoma in den Kindergarten ging ", - "Nein, eine Reliquie aus vergangenen Zeiten", - "Es ist ein huebsches Altarbild", - // 45 - "", - "Hi,hi,hi", - "", - "Nein.", - "", - // 50 - "Ha,ha,ha! klasse!", - "", - "", - "", - "Ich sehe nichts besonderes", - // 55 - "Freddy, die Topfblume", - "Eine Spitze aus dem Jaegerzaun", - "Ej! Hier unten liegt eine Streichholzschachtel!", - "Guck mal! Eine Packung Tempos! Und eins sogar ungebraucht!", - "Sonst ist nichts mehr im Eimer", - // 60 - "Ein Blinder der nichts sieht", - "", - "", - "", - "", - // 65 - "Ein Wahnsinnsbatzen Geld.", - "", - "", - "", - "", - // 70 - "", - "", - "", - "", - "", - // 75 - "", - "", - "", - "", - "", - // 80 - "", - "", - "", - "", - "", - // 85 - "", - "", - "", - "", - "", - // 90 - "", - "", - "", - "", - "", - // 95 - "", - "", - "", - "", - "", - // 100 - "SIEHT NICHT UNGEWoeHNLICH AUS", - "SIEHT NICHT AUSSERGEWoeHNLICH AUS", - "EJ DU, WAS IST LOS?", - "HALLO", - "NICHTS NEUES?", - // 105 - "WIE GEHTS DER FAMILIE?", - "WAS DU FueR SACHEN HAST !", - "ABER WIE SOLLTE ICH DAS AUFHEBEN ?", - "MEINE RELIGION VERBIETET MIR DAS", - "BESSER NICHT", - // 110 - "KLAR MANN!", - "DU SPINNST WOHL !", - "UNMoeGLICH", - "GEHT NICHT AUF !", - "ALLEINE SCHAFFE ICH DAS NICHT", - // 115 - "WENN ICH WOLLTE, KoeNNTE ICH, ABER ICH HABE KEINE LUST", - "ICH WueSSTE NICHT WARUM", - "EIN SCHaeDEL, DER GUT DRAUF IST", - "UND? SCHON WAS VOR HEUTE ABEND, SCHaeDEL?", - "NEIN, ER MUSS AN EINEM KueHLEN ORT GELAGERT WERDEN, FERN DER ZERSToeRERISCHEN KRAFT DER ATMOSPHaeRE", - // 120 - "KNOCHENTROCKEN, WIE MEIN CHEF!", - "EIN SEHR SPITZER PFLOCK", - "GUTER SPITZER PFLOHOCK, HOLZ SO EDEL, TRANSSYLVAAANISCH!!!", - "OH VERDAMMT, ICH MUSS MIR DIE NaeGEL SCHNEIDEN !", - "DA DRINNEN LIEGT B.J., UND GUCK MAL WIE DIE TANTE AUSSIEHT !", - // 125 - "NIET UND NAGELFEST", - " \"NIET & NAGEL GmbH & Co. KG\"", - "DAS TYPISCHE SKELETT IM TYPISCHEN VERLIESS EINES TYPISCHEN SPIELS", - "WIRD NORMALERWEISE ZUR STROMVERSORGUNG ALLER EINGESToePSELTEN GERaeTE VERWENDET", - "TOTALES KUNSTHANDWERK, WEIL SIE DANK DEN JAPANERN KLEINE MINIATUREN SIND", - // 130 - "ES GIBT NUR EINS, WAS GENAUSO HaeSSLICH IST", - "HAU AB. ICH SAG IHM GAR NICHTS. MAL GUCKEN OB ER AUSFLIPPT", - "SCHEINT ZIEMLICH VERNueNFTIG ZU SEIN", - "EIN FOTO VON PLATON WIE ER SEINEN VERLORENEN DIALOG SCHREIBT", - "SEH ICH SO AUS ALS OB ICH MIT POSTERN REDE ? !", - // 135 - "EIN HueBSCHER SCHREIBTISCH", - "EIN VON DER UNIVERSITaeT ZU OXFORD AUSGESTELLTES VAMPIR-JaeGER-JaeGER-DIPLOM", - "VOLLMOND IN FINSTERSTER NACHT", - "DIESE SCHRAUBEN SCHEINEN ZIEMLICH FEST ZU SITZEN", - "GUCK JETZT NICHT HIN, ABER ICH GLAUBE HIER GIBT ES EINE VERSTECKTE KAMERA", - // 140 - "EIN ULTRAMODERNER PFLOCK-DETEKTOR", - "NEIN, DAS LABOR IST IM ZWEITEN STOCK", - "EIN HueBSCHES NACHTTISCHCHEN ", - "EIN BATZEN GELD DER BEI EINEM WIRKLICH GUTEN ABENTEUER NICHT FEHLEN DARF", - "WENN ICH REICH WaeRE, SCHUBIDUBISCHUBIDUBUDU ", - // 145 - "KOMISCHE BLaeTTER, DIE WERDEN SIE WOHL AUS SueDAMERIKA ODER SO MITGEBRACHT HABEN .", - "ICH GLAUBE NICHT, DASS SIE ANTWORTEN WERDEN", - "EIN SCHoeNES HOLZKRUZIFIX. DEM HELDEN SIND DIE AUSMASSE SEI-NER SCHoeNHEIT NICHT GANZ KLAR.", - "ICH BETE NUR VOR DEM ZU-BETT-GEHEN", - "EJ, ICH GLAUBE, DIE SPITZE HIER IST EIN BISSCHEN LOSE !", - // 150 - "UND NACHHER BESCHWERST DU DICH, ICH HaeTTE DIR KEINEN WINK GEGEBEN !", - "EINE STINKNORMALE ZAUNSPITZE", - "NIEDLICH, OBWOHL SIE EIN BISSCHEN VERDRECKT SIND", - "SIE WERDEN MICH NICHT HoeREN, HI,HI,HI, SUPERGUT !", - "DIE SCHoeNE SCHLAFENDE AUS DEM WALDE VON TSCHAIKOWSKY ODER TSCHESLOFSKY ODER WIE DER HEISST.", - // 155 - "SEHR APPETITLICH", - "NEIN, SEHE ICH SO AUS, ALS WueRDE ICH BENUTZTE KAUGUMMIS KAUEN ?", - "EINE NIEDLICHE SICHEL. ICH WueSSTE NUR GERNE WO DER HAMMER IST.", - "DER GESUNDHEITSMINISTER WARNT : RAUCHEN GEFaeHRDET IHRE GESUNDHEIT", - "EINE GANZ NORMALE KERZE, MIT WACHS UND ALLEM DRUM UND DRAN", - // 160 - "MAN MUSS ECHT MAL GESEHEN HABEN WIE DIESE 2 GLaeNZENDEN MueNZEN GLaeNZEN", - "MAN MUSS ECHT GESEHEN HABEN WIE DIESE GLaeNZENDE MueNZE GLaeNZT !", - "DAMIT WERDE ICH GEGEN VAMPIRBISSE IMMUN SEIN.", - "NEIN,ES IST NOCH NICHT SO WEIT", - "EIN TAUSENDER UND EIN BISSCHEN KLEINGELD", - // 165 - "DA STEHT\"DEN KLAVIERSPIELER BITTE NICHT MIT LEBENSMITTELN BEWERFEN", - "CURRYWURST 3.80. POMMES FRITES 2.30., FRIKADELLEN 1.50", - "DIE BESTEN HAMBURGER DIESSEITS DER DONAU FueR NUR 3.80 DM", - "EIN SCHoeNER TOTENKOPF MIT EINEM ZIEMLICH DURCHDRINGENDEN BLICK, HI, HI, SUPERGUT !", - "HALLO TOTENKOPF, DU ERINNERST MICH AN HAMLETS ONKEL !", - // 170 - "ICH HABE DIE ANGEWOHNHEIT, NICHTS ANZUFASSEN, WAS MAL LEBENDIG GEWESEN IST", - "EIN PAPIERKORB", - "SIE WETTEN, WIE DAS SPIEL HEUTE ABEND AUSGEHT", - "WAS SICH WOHL DAHINTER VERBERGEN MAG", - "EJ, DIESER VORHANG BEWEGT SICH NICHT !", - // 175 - "GANZ SCHoeN GRUSELIG, DAS SCHLOSS DA, WAS ?", - "ICH SCHAFFS NICHT, ER IST ZU WEIT WEG, UM MICH ZU HoeREN", - "EIN TYPISCH TRANSSYLVANISCHER WALD, MIT BaeUMEN UND SO", - "RED KEINEN BLoeDSINN, ES IST DOCH STOCKDUNKEL!", - "KONDITOREI MueLLER. GEBaeCK UND KAUGUMMIS", - // 180 - "EINE SEHR SCHoeNE TueR", - "GESCHLOSSEN", - "EINE TOTAL GESCHLOSSENE TONNE", - "", - "WAS FueR SueSSE VIECHER !", - // 185 - "PSSS,PSSS,PSSS,MIETZCHEN...", - "KEINE REAKTION", - "DER MOND IST EIN SATELLIT DER DIE ERDE IN EINER UMLAUFGESCHWINDIGKEIT VON 28 TAGEN UMKREIST.", - "HALLO MOND DU KREISRUNDES MONDGESICHT", - "TOTAL MIT BRETTERN ZUGENAGELT", - // 190 - "NICHTS ZU MACHEN. HIER KOMMT NOCH NICHT MAL ARNOLD S. MIT DER KREISSaeGE DURCH", - "SCHEINT SO, ALS HaeTTE DIE TANNE DA EINEN ueBERDIMENSIONALEN SCHATTEN !", - "HEHOO, WIRT !", - "SIND NOCH ZIMMER FREI ?", - "KoeNNEN SIE MIR SAGEN WO ICH EINEN GEWISSEN GRAF DRASCULA FINDE ?", - // 195 - "JA, WAS GIBTS ?", - "UND WIESO ?", - "WW...WIRKLICH ?", - "GUTE FRAGE, ICH WERDE IHNEN MAL MEINE STORY ERZaeHLEN, ALSO...", - "NUR FueNF MINUTEN !", - // 200 - "ICH HEISSE HEINZ HACKER UND BIN VERTRETER EINER NORDDEUTSCHEN IMMOBILIENFIRMA", - "SO WIES AUSSIEHT WILL GRAF DRASCULA EINIGE HEKTAR LAND AUF HELGOLAND KAUFEN UND ICH BIN HIER UM ueBER DIE PREISE ZU VERHANDELN", - "MMMMH, ICH GLAUBE DASS ICH MORGEN FRueH MIT MEINER MAMI ZURueCKKOMME", - "WAS FueR EINE NACHT, NICHT WAHR ?", - "NICHTS, SCHON GUT", - // 205 - "HEEHOOO, KLAVIERSPIELER", - "WAS FueR EINE NACHT", - "UND ES IST AUCH GAR NICHT SO KALT", - "NUN GUT, ICH LASS DICH JETZT MAL IN RUHE WEITERSPIELEN", - "GENAU", - // 210 - "HALLO CHEF, ALLES KLAR ?", - "UND DIE FAMILIE ?", - "HIER IST MaeCHTIG WAS LOS, WAS ?", - "ICH HALTE BESSER MEINEN MUND", - "ZU HAUSE IST ES IMMER NOCH AM SCHoeNSTEN...ZU HAUSE IST ES IMMER....Hae ? ABER SIE SIND DOCH NICHT TANTA ENMA. WO ICH DOCH GAR KEINE TANTE EMMA HABE !", - // 215 - "JA, MEINER AUCH. SIE KoeNNEN MICH NENNEN WIE SIE WOLLEN, ICH HoeRE SELBST AUF HEINZCHEN WIE AUF KOMMANDO.", - "JA, ICH HAB GANZ SCHoeNE BEULEN, WAS ? ueBRIGENS, WO BIN ICH ?", - "JA", - "VERDAMMT.....", - "JA, KLAR, SELBSTVERSTaeNDLICH !", - // 220 - "DANN ALSO VIELEN DANk FueR DEINE HILFE. ICH WERDE DICH NICHT WEITER BELaeSTIGEN. WENN DU MIR BITTE NOCH SAGEN WueRDEST, WO DIE TueR IST.... ", - "WEIL DIE BEULE WOHL MEIN GEHIRN ANGEGRIFFEN HAT UND ICH EINFACH ueBERHAUPT NICHTS SEHE", - "PAH, MACHT NICHTS. ICH HABE IMMER ERSATZ DABEI", - "WOW, WAS FueR EIN SCHARFES WEIB ! OHNE BRILLE HABE ICH DAS GAR NICHT BEMERKT !", - "EJ, DU....", - // 225 - "UND WAS IST DAAAAAS ? !", - "MACH DIR KEINE SORGEN, BJ, MEINE GELIEBTE !ICH WERDE DICH AUS SEINEN KLAUEN BEFREIEN", - "ACH KOMM, ER HAT MICH AUF DIE PALME GEBRACHT", - "UUAAA, EIN WERWOLF ! KREPIER, DU MONSTER !", - "JA, DAS.... ", - // 230 - "JA, DAS.... ICH GLAUB, ICH GEH DANN MAL WEITER, MIT VERLAUB...", - "WAS?", - "WENN ICHS MIR RECHT ueBERLEGE, UM EHRLICH ZU SEIN, ICH GLAUBE NEIN ", - "SAG MIR OH GEBILDETER PHILOSOPH, GIBT ES IRGENDEINEN KAUSALZUSAMMENHANG ZWISCHEN DER LICHTGESCHWINDIGKEIT und SCHINKENSPECK", - "OKAY,OKAY,VERGISS ES. ICH WEISS JEDENFALLS NICHT, WARUM ICH DAS GESAGT HABE", - // 235 - "WAS PHILOSOPHIERST DU HIER HERUM, WO DU DOCH MENSCHEN FRESSEN MueSSTEST!", - "HaeH", - "EJ, KANNST DU DAS MIT DEN PRaeHISTORISCHEN NEIGUNGEN NOCHMAL ERKLaeREN ?", - "JA, MANN. DER KRAM MIT DEM DU MIR EBEN GEKOMMEN BIST. ICH HAB DAS NaeMLICH NICHT GANZ KAPIERT....", - "ICH HALTE BESSER MEINEN MUND, WEIL SOBALD ER BLUT RIECHT...", - // 240 - "JA, BITTE ?", - "JA, WAS GIBTS ?", - "ACH, WO SIES GERADE ERWaeHNEN,....", - "", - "ueBRIGENS, WAS WueRDE EIGENTLICH PASSIEREN, WENN DAS REZEPT ZUFaeLLIG IN DIE HaeNDE EINES VAMPIRS GERATEN WueRDE...", - // 245 - "NA WAS SOLLS. HoeR MAL, KOMMT DIR DAS NICHT AUCH WIE EIN DaeMLICHER KLEINER TRICK VOR, UM DAS SPIEL SCHNELL ZU BEENDEN ? NAJA, VIELLEICHT AUCH NICHT", - "LEER !", - "WEIL DU MIR B.J., MEINE GELIEBTE, GERAUBT HAST. OHNE SIE HAT MEIN LEBEN KEINEN SINN.", - "SEIN GEHIRN ?", - "OCH, NUR SO! ICH GLAUBE DASS ICH GENUG VON DEM KLEINEN MONSTERCHEN HABE", - // 250 - "SueSSE KLEINE JUNGFRAU, ICH BLEIB SO WIE ICH BIN !", - "DAMIT KOMMST DU NICHT DURCH.. GLEICH KOMMT POPEYE UND HOLT MICH HIER RAUS !", - "WAS FueR EIN SCHEISS-SPIEL, BEI DEM DEM DER HELD STERBEN MUSS", - "HALT ! WAS IST MIT MEINEM LETZTEN WUNSCH ?", - "HAR,HAR ! JETZT BIN ICH IMMUN GEGEN DEIN VERFLUCHTES UNGEHEUER. DAS HIER IST EINE ANTI-VAMPIR-ZIGARETTE,DIE MIR VON BRAUN GEGEBEN HAT.", - // 255 - "JA, KLAR. ABER ICH WERDE DIR BESTIMMT NICHT DAS REZEPT VERRATEN", - "MIT FOLTER KOMM ICH GUT KLAR, ICH DENK MIR SOGAR WELCHE AUS", - "NEIN, BITTE NICHT ! ICH SAG ALLES, ABER TUN SIE MIR DAS NICHT AN !", - "O.K. ICH HAB DIR ALLES ERZaeHLT. JETZT HOL B.J. UND MICH ENDLICH HIER RAUS UND LASS UNS IN RUHE", - "B.J. !WAS MACHST DU HIER ?WO IST DRASCULA ?", - // 260 - "WAS FueR EIN MIESER TYP ! NUR WEIL ER BLAUES BLUT HAT, MueSSEN IHM NOCH LANGE NICHT ALLE JUNGFRAUEN DIESER ERDE ZU FueSSEN LIEGEN", - "NIEDER MIT DEM BONZEN-ADEL !", - "SOLIDARITaeT MIT ALLEN ARMEN DIESER WELT... !", - "UND WIES AUSSIEHT HAT ER DICH NACH ALLEN REGELN DER KUNST ANGEKETTET", - "O.K. DU HAST NICHT ZUFaeLLIG EINE HAARSPANGE ?", - // 265 - "NANANA. STELL DICH NICHT SO AN . MIR FaeLLT SCHON WAS EIN.", - "HE, WIRT", - "WER GEWINNT ?", - "WER ?", - "SIEHST DU DENN NICHT, DASS HIER DRASCULA IST ?", - // 270 - "NA, DANN LASS IHN UNS ALLE MACHEN, ODER ?", - "GIB MIR EINEN GIN-TONIC", - "SCHON GUT. ICH HAB VERGESSEN, WAS ICH DIR SAGEN WOLLTE", - "GIB\247MIR\247SOFORT\247EINEN\247GIN\247TONIC\247ODER\247ICH\247SPIEL\247KLAVIER", - "WIELANGE DAUERT DAS SPIEL NOCH ?", - // 275 - "GUTE NACHT", - "UND WIE KOMMST DU VORAN, IGOR ? SCHLEPPEND ? HI,HI,HI, KLASSE !", - "WAS SOLL DAS SEIN, WAS DU DA MACHST?", - "NEIN", - "DANN ZIEH DIE BRILLE AUF", - // 280 - "WAS SOLL DAS MIT DER ueBERNATueRLICHEN ORGIE ?", - "O.K. ES REICHT. ICH KANN ES MIR SCHON VORSTELLEN", - "KoeNNTEST DU MIR NICHT ZUFaeLLIG SAGEN, WO DRASCULA IST ?", - "ACH KOMM, BITTE, BITTE!", - "WARUM NICHT ?", - // 285 - "ACH :NACHTS SCHLaeFT ER ?", - "NA, HOFFENTLICH KLAPPT DAS MIT DER EINKOMMENSERKLaeRUNG", - "ICH MUSS NaeMLICH MIT IHM REDEN", - "HEYHOO, GERIPPE !", - "VERDAMMT ! EIN SPRECHENDER TOTER !", - // 290 - "ERaeHL MAL WIESO HAST DU HIER ANGEHALTEN ?", - "UND WOZU SOLLTE DRASCULA EIN MONSTER SCHAFFEN WOLLEN ?", - "WIE HEISST DU, LIEBES GERIPPE ?", - "EJ, SOLL ICH DIR NICHT VIELLEICHT WAS ZU ESSEN BRINGEN ?", - "DU HAST DOCH BESTIMMT EINEN LEEREN MAGEN, HI,HI,HI !", - // 295 - "ICH HABE GERADE EINFACH KEINEN BOCK, ZU REDEN", - "FI........(BIEP) DICH DOCH IN DEIN BEFI.......(BIEP) KNIE, DU ALTER WI......(BIEP) !", - "ICH HABE SIE WIRKLICH GELIEBT, NAJA, GUT, SIe WAR WIRKLICH NICHT DIE HELLSTE VON OSRAM, ABER NOBODY IS PERFECT, STIMMTS ?", - "HEY SIE HATTE EINE WAHNSINNSFIGUR, UND WAS WILLST DU MEHR", - "NICHTS WIRD MEHR WIE VORHER SEIN. ICH WERDE INS KLOSTER GEHEN UND ELENDIGLICH DAHINSIECHEN.", - // 300 - "HIER KANN MICH NICHTS UND NIEMAND MEHR RAUSHOLEN, WEIL...", - "VON WEM ? VON WEM ?", - "ICH MoeCHTE PIRAT WERDEN !", - "ICH MoeCHTE PROGRAMMIERER WERDEN !", - "ERZaeHL MIR ETWAS ueBER SIEGFRIED UND DIE NIBELUNGEN", - // 305 - "ICH HAB EUCH NIE GESEHEN UND SPIEL JETZT EINFACH WEITER", - "WER HAT SICH DENN DIESEN SCHWACHSINN EINFALLEN LASSEN ?", - "EINE HANDTASCHE, WIE SIE MEINE OMI HAT", - "OH MANN, WIE GUT ICH AUSSEHE ! ", - "ICH KoeNNTE MICH GLATT IN MICH VERLIEBEN !", - // 310 - "UND WIE SOLL ICH MICH ABSCHLIESSEN ?", - "ICH WERDE MICH WOHL ERSTMAL AUFSCHLIESSEN MueSSEN, WAS ?", - "HIER STEH ICH GUT", - "HAB MICH SCHON", - "HALLO ICH", - // 315 - "BEI PASSENDER GELEGENHEIT WERDE ICH SIE MIR MAL REINTUN", - "ICH SEHE NICHTS BESONDERES", - "GUT SO", - "UND WIESOOO ?", - "ICH KANN NICHT", - // 320 - "HALLO DU DA", - "DIE GRUFT VON ONKEL DESIDERIUS", - "HAAALLO, ONKEL DESIDEERIUUS !", - "NEIN, ICH WILL MICH NICHT SCHON WIEDER SCHNEIDEN", - "aeHEM,MMM... !", - // 325 - "MMMM, LECKER,UaeaeHH !", - "JA, HUST,HUST !", - "HEY, GUCK MAL, HIER KLEBT EIN KAUGUMMI", - "DAS SUPERHANDILY DAS ICH ZU WEIHNACHTEN BEKOMMEN HABE", - "GANZ SCHoeN HOCH", - // 330 - "TRITT AUF DEN BALKON, JULIA !", - "DU BIST DER STERN AN MEINEM FIRMAMENT !", - "EJ, TueR, WAS ISS LOSS ?", - "HEYHOO, TRANSSYLVANISCHES ZIGARRETTENAUTOMaeTCHEN !", - "EIN ZIGARRETTENSPENDERMASCHINCHEN", - // 335 - "ICH HAB DA NOCHNE MueNZE DRIN", - "NEIN, ICH RAUCHE UND TRINKE NICHT MEHR", - "VON JETZT AN WERDE ICH MICH NUR NOCH DEN FRAUEN WIDMEN", - "BETRUG ! ES IST GAR NICHTS RAUSGEKOMMEN !", - "ENDLICH !", - // 340 - "EINE TRUHE, WEITER NICHTS", - "HALLO TRUHE, DU HEISST WIE MEINE TANTE TRUDE", - "ICH HABE DIE TASCHE VON B.J. GEFUNDEN", - "MEIN GOTT, ICH SEH MICH NICHT IM SPIEGEL, ICH BIN EIN VAMPIR !", - "....ACH, NEE. ES IST NUR EIN GEMaeLDE", - // 345 - "SPIEGLEIN, SPIEGLEIN AN DER WAND, WER IST DER SCHoeNSTE Im GANZEN LAND ?", - "ER MACHT MIR NICHT AUF", - "GUT. ICH HABE DIE OHRENSToePSEL DRIN", - "EIN VON DER UNIVERSITaeT ZU CAMBRIDGE AUSGESTELLTES VAMPIR-JaeGER DIPLOM.", - "NEIN, MIR FEHLEN NOCH EINIGE ZUTATEN, ES LOHNT SICH NICHT, IHN ZU WECKEN !", - // 350 - "ICH HABE NaeMLICH KEIN GELD", - "EINE NORDDEUTSCHE LAMPE", - "WIRT! HELFEN SIE MIR !", - "DA STAND PLoeTZLICH EIN VAMPIR UND HAT MEINE FREUNDIN MITGENOMMEN.", - "ABER WOLLEN SIE MIR DENN NICHT HELFEN ?", - // 355 - "TOT? WAS WOLLEN SIE DAMIT SAGEN ?", - "aeHEM !", - "EIN VAMPIR HAT DAS MaeDEL VON 506 ENTFueHRT !", - "DU MUSST MIR HELFEN !", - "KANNST DU KEIN BEERDIGUNGSLIED SPIELEN ?", - // 360 - "WIE HaeLST DU DAS BLOSS AUS : JEDEN TAG DIE GLEICHEN LIEDER", - "AHA, UND WIE HoeRST DU MICH DANN ?", - "GIB MIR DIE OHRENSToePSEL", - "ACH KOMM, ICH GEB SIE DIR AUCH SOFORT WIEDER", - "ACH KOOOOMMM !", - // 365 - "AUF WIEDERSEHEN. ICH MUSS EINEN VAMPIR ToeTEN", - "", - "REDEST DU AUF TRANSSYLVANISCH ODER WAS ?", - "WER IST ONKEL DESIDERIUS ?", - "WAS SOLL LOS SEIN MIT DIESEM GRAF DRASCULA ?", - // 370 - "WER IST DIESER VON BRAUN ?", - "UND WARUM MACHT ER ES NICHT ?", - " UND WO KANN ICH VON BRAUN FINDEN ?", - "ALSO DANKE UND AUF WIEDERSEHEN, SCHLAF SCHoeN", - "WIR SOLLTeN BESSER VORHER KLINGELN", - // 375 - "SIND SIE PROFESSOR VON BRAUN ?", - "UND SIE KoeNNTEN MIR NICHT VERRATEN, WO..... ?", - "ICH NEHM IHM NICHT AB, DASS ER HELGE SCHNEIDER IST", - "PROFESSOR!", - "HELFEN SIE MIR !ES GEHT UM DAS LEBEN MEINER GELIEBTEN !", - // 380 - "SCHON GUT, ICH BRAUCHE IHRE HILFE NICHT", - "OK. ICH GEHE !", - "KEINE ANGST. GEMEINSAM BESIEGEN WIR DRASCULA", - "UND WARUM HELFEN SIE MIR DANN NICHT ?", - "ICH HABE SIE", - // 385 - "ABER ICH HABE SIE DOCH !", - "EINVERSTANDEN", - "...aeHM,...JA", - "ICH GEHE DIREKT NOCHMAL INS AQUARIUM", - "ICH BIN SO WEIT, MICH IHREM TEST ZU STELLEN", - // 390 - "SCHON GUT, ALTERCHEN. ZAHLTAG !", - "SCHON GUT. ICH WOLLTE SOWIESO GERADE GEHEN", - "TSCHULDIGE", - "WIE FINDEST DU DIESES BUCH? KLAVIERSTueCKE VON TSCHAIKOWSKY", - "WIE BRINGT MAN EINEN VAMPIR UM ?", - // 395 - "HAT MAN DIR NICHT GESAGT WIE MAN SICH BETTET SO LIEGT MAN ?", - "GENAU DAS SAGT MEINE MUTTER IMMER ZU MIR", - "WARUM KONNTE DICH DRASCULA NICHT ERLEDIGEN ?", - "UND WAS DANN ?", - "SUPER ! DA HABEN SIE EIN IMMUNITaeTSMISCH.... !", - // 400 - "ALSO ?", - "SEHR GUT", - "KoeNNEN SIE NOCHMAL WIEDERHOLEN WAS ICH FueR DIESE MISCHUNG BRAUCHE ?", - "DANN SATTEL ICH MAL DIE HueHNER UND BESORG ES", - "ENTSCHULDIGUNG, WO IST DER KLAVIERSPIELER ?", - // 405 - "ICH\247HAB\247SCHON\247ALLE\247ZUTATEN\247FueR\247DIE\247MISCHUNG", - "EINE FRAGE : WAS SOLL DAS HEISSEN : REIPERK ALUCSARD?", - "SAGEN SIE SCHON...", - "UND WO SOLL DIESE GROTTE SEIN ?", - "WAS IST ? GABS BEI EUCH KEINE HEXENPROZESSE ?", - // 410 - "...ABER WENN ICH NOCH MEHR VAMPIREN BEGEGNE ?", - "EIN VAMPIR, DER MICH NICHT DURCHLaeSST", - "ER SIEHT WIE AUS WIE JODA, NUR VIEL GRoeSSER", - "EJ, JODA. WENN DU MICH DURCHLaeSST, GEB ICH DIR ne mark", - "NA GUT, DIR KANN MAL WOHL NICHTS ERZaeHLEN", - // 415 - "HALLO, VAMPIR, WAS FueR EINE NACHT, WAS ?", - "HAT MAN DIR SCHON MAL GESAGT, DASS DU AUSSIEHST WIE JODA ?", - "BIST DU EIN VAMPIR ODER EIN oeLGEMaeLDE ?", - "ICH HALT BESSER MEINEN MUND, SONST REGST DU DICH NOCH AUF", - "ABGESCHLOSSEN", - // 420 - "DIE ELSTER KoeNNTE MIR EIN AUGE RAUSREISSEN, WENN ICHS VERSUCHE !", - "ZU !MEIN GOTT, WIE UNHEIMLICH !", - "DIE SCHARNIERE SIND ZUGEROSTET", - "HIER IST NUR EIN PaeCKCHEN MEHL", - "DAS HAT DEN ROST ENTFERNT", - // 425 - "ICH HABE EINEN PFLOCK AUS FICHTENHOLZ GEFUNDEN", - "ICH NEHM DAS HIER, DAS IST SCHoeN DICK !", - "NA, ICH GLAUBE ICH KANN MICH JETZT MAL AUS DIESER DaeMLICHEN VERKLEIDUNG SCHaeLEN", - "EINGaeNGE ZU DEN SEITENFLueGELN WEGEN BAUARBEITEN GESPERRT. BENUTZEN SIE BITTE DEN HAUPTEINGANG", - "...ER IST BLASS, HAT KOMISCHE ZaeHNE, TRaeGT EIN TOUPET UND EINEN UMHANG...DAS MUSS DRASCULA SEIN !", - // 430 - " ES IST B.J. ! B.J. ALLES O.K ?", - "ICH WEISS SCHON DASS SIE DUMM IST, ABER ICH BIN SO EINSAM", - "DU HAST BESTIMMT KEINEN SCHLueSSEL, STIMMTS ?", - "ICH WETTE, DU HAST KEINEN DIETRICH", - "GIB MIR DIE HAARSPANGE. ICH MACHS WIE MCGYVER", - // 435 - "BEWEG DICH NICHT, ICH BIN SOFORT ZURueCK", - "VERDAMMT! ER IST MIR ABGEBROCHEN !", - "HEYJEYJEY !UND ICH HAB MICH AUCH RASIERT, ALTER !", - "JA, SCHATZ ?", - "ES REICHT NICHT", - // 440 - "DER KLAVIERSPIELER IST NICHT DA", - "EIN TRANSSYLVANISCHER GIN-TONIC", - "ICH HABE IMMER NOCH KEIN ZIMMER", - "ES SCHEINT DASS ER IN DER BADEWANNE HaeNGENGEBLIEBEN IST UND DANN EINE KNEIPE AUFGEMACHT HAT", - "ER IST VOLL WIE EIN RUSSE", - // 445 - "DIESES HAAR.... TJA,ES ERINNERT MICH AN JEMANDEN", - "ES IST EIN KNoeCHRIGES GERIPPE", - "GUCK MAL ! BRAD PITT!", - "ER SCHLaeFT. ES WaeRE WIRKLICH SCHADE, IHN ZU WECKEN", - "ER IST HaeSSLICHER ALS DIDI HALLERVORDEN", - // 450 - "EIN SARG AUS FICHTENHOLZ", - "ER WIRD MICH IN LECKERE KLEINE SCHEIBCHEN SCHNEIDEN", - "ICH STEH NICHT SO AUF PENDEL. ICH FIND OHRFEIGEN BESSER", - "ICH KANN NICHT. ICH HAB HANDSCHELLEN AN", - "DAS SIEHT DOCH JEDER, DASS DAS EINE GEHEIMTueR IST", - // 455 - "SIE IGNORIEREN MICH", - "ACH KOMM !", - "LAUT DREHBUCH BEWEGE ich mich, ABER das Spiel war so teuer, dass nichts mehr FueR EIN FITNESS-STUDIO ueBRIG war, also habe ich auch keinen strammen arsch.", - "SCHEINT SO, ALS OB ER EIN BISSCHEN LOSE AN DER WAND HaeNGT", - "ICH GLAUBE KAUM, DASS SIE MIR NueTZEN WIRD. SIE IST VIEL ZU FEUCHT, UM SIE ANZUZueNDEN", - // 460 - "ZUM WESTFLueGEL ?ICH BIN DOCH NICHT BLoeD !WER WEISS WAS MICH DA ERWARTET !", - "MIT HueBSCHEN TRANSSYLVANISCHEN MOTIVEN", - "", - "WIE SCHADE, DASS DAS DA KEIN LECKERER LAMMBRATEN DRIN IST.", - "ALS ICH BEIM LETZTEN MAL IN EINEN OFEN GEGUCKT HABE, IST DAS HAUS IN DIE LUFT GEFLOGEN", - // 465 - "DAS IST DAS WAPPEN DER TRANSSYLVANISCHEN FUSSBALLMANNSCHAFT", - "UND WOZU? SOLL ICH MIR DAS ANS KNIE BINDEN ?", - "DIESE SORTE SCHUBLADE LaeSST SICH NICHT oeFFNEN", - "ICH MoeCHTE ECHT NICHT WISSEN, WAS ES DA DRIN ZU ESSEN GIBT!", - "DAS WIRKT ZIEMLICH IMPRESSIONISTISCH AUF MICH", - // 470 - "DIE NACHT VERSCHLUCKT ALLES... WIE UNHEIMLICH, WAS?", - "SIE KLEMMT", - "DER KoeNIG HAST DU DIR DAS NICHT DENKEN KoeNNEN?", - "NEIN, ICH HAB SCHON EINEN ZU HAUSE, DEN ICH FueTTERE UND SO", - "EIN REGAL MIT BueCHERN UND ANDEREN SACHEN", - // 475 - "UND WEN SOLL ICH UM DIESE UHRZEIT NOCH ANRUFEN?", - "\"EINKOMMENSERKLaeRUNG LEICHT GEMACHT\" WIE INTERESSANT!", - "ICH HAB SCHON EINS ZU HAUSE.ICH GLAUBE DAS IST WELTWEIT EIN BESTSELLER", - "EIN TOTAL NORMALER SCHLueSSEL", - "ICH GLAUBE, DER GEHoeRT HIER NICHT HIN", - // 480 - "HEY, DIE FRITTEN SEHEN AUS WIE ECKZaeHNE! ICH BIN HIN UND WEG", - "das ist wohl echt nicht DER moment, RUMZUNASCHEN, WENN MEINE FREUNDIN IN DEN KLAUEN DER fiesesten ausgeburt der Welt ist.", - "WAS FueR EINE RIESENGAUDI DAS MACHT, DAMIT VAMPIRE FERTIGZUMACHEN!", - "MAL GUCKEN, OB NOCH EINER AUFTAUCHT", - "NEIN, ES MUSS MIT NOCH SO EINEM DRECKIGEN, STINKENDEN UND NERVIGEN VAMPIR WIE VORHIN SEIN", - // 485 - "DAS IST DIE ORIGINALPERueCKE VON ELIVS ALS ER SCHON EINE GLATZE HATTE", - "MEHL, ABER ICH KANN JETZT KEINE MARKEN NENNEN", - "VIELLEICHT EIN ANDERES MAL, OK?", - "EINE WUNDERSCHoeNE AXT. ZU SCHADE, DASS GERADE KEIN VAMPIRKOPF IN DER NaeHE IST", - "NEIN, IM GRUNDE BIN ICH EIN NETTER MENSCH", - // 490 - "DAS IST DAS DEO VON MAGGIE THATCHER, HIHIHI!", - "EIN ZIEMLICH HueBSCHER UMHANG", - "", - "WIE JEDER BELIEBIGE AST EINES BELIEBIGEN BAUMES AN JEDEM BELIEBIGEN ORT IN DER WELT, NICHTS BESONDERES ALSO", - "\"UNGLAUBLICH\" EIN SEIL IN EINEM VIDEOSPIEL!", - // 495 - "WOZU DAS WOHL NOCH GUT SEIN WIRD...", - "EIN SEIL AN EINEM AST ODER EIN AST AN EINEM SEIL, JE NACHDEM WIE MAN DAS SO BETRACHTET", - "ES SCHEINT, DAS DIESE ELSTER WAS ueBLES IM SCHILDE FueHRT", - "ZISCH AB, ICH SAG IHR NICHTS, MAL SEHEN OB SIE AUSFLIPPT", - "SIEHT SO AUS ALS WaeRE SIE TOT, ABER STIMMT NICHT,NE?", - // 500 - "FueR DIESES SPIEL WURDEN KEINE TIERE MISSHANDELT ODER GEToeTET", -}, -{ - // 0 - "", - "C'EST LA DEUXI\212ME PORTE PLUS GRANDE QUE J'AI VUE DANS MA VIE.", - "ENFIN, PAS AUTANT QUE \207A.", - "ELLE EST BOUCH\202E AVEC DES GROSSES PLANCHES. L'\202GLISE EST PEUT-\210TRE ABANDONN\202E DEPUIS QUELQUES ANN\202ES.", - "MAIS JE NE L'AI PAS OUVERTE.", - // 5 - "QU'EST-CE QUE JE FAIS? JE L'ARRACHE?", - "BONJOUR, PORTE. JE VAIS T'ENCADRER.", - "C'EST TROP POUR MOI.", - "UNE FEN\210TRE BOUCH\202E AUX GROSSES PLANCHES.", - "JE N'ARRIVE PAS.", - // 10 - "\200A Y EST.", - "ET POURQUOI?", - "SALUT, FEN\210TRE! AS-TU QUELQUE CHOSE \205 FAIRE CE SOIR?", - "PAS SANS LE PERMIS DE TRAVAUX PUBLIQUES.", - "H\202! CETTE FEN\210TRE A SEULEMENT UNE GROSSE PLANCHE...", - // 15 - "OH\202! OH\202!-FEN\210TRE!", - "BONJOUR, TOI.", - "", - "JE N'ARRIVE PAS.", - "C'EST BIEN O\227 ELLE EST.", - // 20 - "", - "C'EST UNE TOMBE EN FORME DE CROIX.", - "NON, MERCI.", - "BONJOUR, LE D\202FUNT: VEUX-TU DES VERMISSEAUX?", - "MAIS OUI. COMME EN POLTERGUEIST.", - // 25 - "", - "", - "JE REVIENS EN QUINZE MINUTES.", - "D\202FENSE D'AFFICHER.", - "", - // 30 - "C'EST FERM\202 \205 CL\202.", - "J'EN AI D\202J\205 UN.", - "", - "IL NE R\202POND PAS.", - "MAIS NON, C'EST BIEN GAR\202.", - // 35 - "C'EST UNE PORTE.", - "UN TIROIR DE LA TABLE.", - "UNE ARMOIRE SUSPECTE.", - "BONJOUR, L'ARMOIRE. \200A VA?", - "", - // 40 - "", - "C'EST UN CAND\202LABRE TR\212S VIEUX.", - "IL DOIT \210TRE L\205 D\212S QUE MAZINGUER-Z \202TAIT UNE VIS.", - "NON, C'EST UNE RELIQUE.", - "C'EST UN JOLI R\202TABLE.", - // 45 - "", - "HI! HI! HI!", - "", - "NON.", - "", - // 50 - "HA! HA! HA! -QUE C'EST BON!", - "", - "", - "", - "JE NE VOIS RIEN DE SP\202CIAL.", - // 55 - "C'EST FERNAN, LA PLANTE.", - "C'EST UNE DES PIQUES DE LA GRILLE.", - "H\202! L\205-DESSOUS IL Y A UNE BO\214TE D'ALLUMETTES.", - "REGARDE! UN PAQUET DE CLINEX. -ET IL Y A UN TOUT NEUF!", - "IL N'Y A RIEN DE PLUS DANS LE SEAU.", - // 60 - "C'EST UN AVEUGLE QUI VE VOIT PAS.", - "", - "", - "", - "", - // 65 - "C'EST UNE GROSSE SOMME D'ARGENT.", - "", - "", - "", - "", - // 70 - "", - "", - "", - "", - "", - // 75 - "", - "", - "", - "", - "", - // 80 - "", - "", - "", - "", - "", - // 85 - "", - "", - "", - "", - "", - // 90 - "", - "", - "", - "", - "", - // 95 - "", - "", - "", - "", - "", - // 100 - "ELLE N'A RIEN DE SP\220CIAL", - "CELA N'A RIEN D'EXTRAORDINAIRE", - "QU'EST-CE QU'IL Y A?", - "BONJOUR!", - "RIEN DE NOUVEAU?", - // 105 - "LA FAMILLE, \200A VA?", - "-QUELLES CHOSES TU AS!", - "MAIS, COMME JE VAIS PRENDRE CELA!", - "MA RELIGION ME L'INTERDIT", - "CE N'EST PAS MIEUX", - // 110 - "BIEN S\352R, MON VIEUX!", - "ON NE PARLE PLUS DE CELA", - "IMPOSSIBLE", - "CELA NE S'OUVRE PAS", - "JE NE PEUX PAS TOUT SEUL", - // 115 - "SI JE VOULAIS, J' ARRIVERAIS, MAIS \200A ME DONNE DE LA PARESSE", - "JE N'Y VOIT PAS UNE RAISON APPARENTE", - "C'EST UN CERVEAU ASSEZ BIEN", - "ET BIEN CERVEAU, QUE PENSES-TU FAIRE CE SOIR?", - "NON, ON DOIT LE GARDER DANS UN ENDROIT \267 L'ABRI DES MUTATIONS DE L'ATMOSPH\324RE", - // 120 - "C'EST UN DUR, COMME MON CHEF", - "C'EST UN PIEU TR\324S AIGUIS\220", - "FID\324LE PIEU POINTUUU, NOBLE CH\322NE TRANSYLVAAAN", - "TIENS! JE DOIS COUPER MES ONGLES!", - "B.J. EST L\267-DEDANS. ET QUELLE EST MIGNONE CETTE NANA!", - // 125 - "ELLE EST FERM\220E TR\324S SOLIDEMENT", - "\"CADENAS SOLIDES S.A.\"", - "C'EST LE TYPIQUE SQUELETTE QU'ON TROUVE DANS LES GE\342LES DE TOUS LES JEUX", - "ON L' EMPLOIE NORMALEMENT POUR INDUIR DU COURANT \220LECTRIQUE AUX APPAREILS QU'Y SONT RACCORD\220S", - "C'EST ABSOLUMENT ARTISANAL, CAR LES JAPONAIS LES FONT MAINTENANT DE POCHE", - // 130 - "J'AI SEULEMENT VU DANS MA VIE UNE CHOSE SI MOCHE", - "LAISSE. JE NE LUI DIS RIEN POUR S'IL SE F\266CHE", - "IL SEMBLE ASSEZ RATIONNEL", - "C'EST UNE PHOTO DE PLATON EN TRAIN D'\220CRIRE SON DIALOGUE PERDU", - "JE NE SUIS PAS DE CEUX QUI PARLENT AUX POSTERS", - // 135 - "UN BUREAU ASSEZ MIGNON", - "C'EST UN DIPL\342ME DE CHASSE-CHASSE-VAMPIRES HOMOLOGU\220 PAR L'UNIVERSIT\220 D'OXFORD", - "C'EST UNE NUIT NOIRE AU PLEINE LUNE", - "IL PARA\327T QUE CES VIS NE SONT PAS TR\324S ENFONC\220ES", - "N'Y REGARDES PAS, MAIS JE CROIS QU'UNE CAM\220RA OCCULTE ME VISE", - // 140 - "UN D\220TECTEUR DE PIEUX ASSEZ MODERNE", - "NON, LE LABORATOIRE EST AU DEUXI\324ME \220TAGE", - "UNE JOLIE TABLE DE NUIT", - "C'EST UN TAS D'ARGENT QUI NE PEUT PAS MANQUER DANS UNE AVENTURE DIGNE DE TEL NOM", - "SI J'\220TAIS RICHE. DUBIDOUDUBIDOUDUBIDOUDUBIDOU", - // 145 - "CE SONT DES FEUILLES BIZARRES. ON A D\352 LES AMENER DE L'AM\220RIQUE DU SUD OU PAR L\267", - "JE NE PENSE PAS QU'ILS VONT ME R\220PONDRE", - "C'EST UN JOLI CRUCIFIX EN BOIS. L'IC\342NE N'ARRIVE PAS \267 SAISIR TOUT LA SPLENDEUR DE SA BEAUT\220", - "JE PRIE SEULEMENT AVANT DE ME COUCHER", - "H\220!, IL PARA\327T QUE CETTE PIQUE S'EST UN PETIT PEU D\220CROCH\220E", - // 150 - "TU NE POURRAS TE PLAIGNER APR\324S DU PEU DE PISTES QUE JE TE DONNE", - "C'EST UNE PIQUE ASSEZ CONVENTIONNELLE", - "ILS SONT MIGNONS, MAIS UN PEU SALES", - "NON, NON, ILS NE ME \220COUTERAIENT PAS. HI, HI, HI -QUE C'EST BON!", - "\"LA BELLE DORMANTE DU BOIS\" DE TCHA\330KOVSKI, OU TCHA\330FROSKI, OU N'IMPORTE COMMENT DIT-ON ", - // 155 - "TR\324S APP\220TISSANT", - "JE NE SUIS PAS DE CEUX QUI SUCCENT DES CHEWING-GUMS D\220J\267 M\266CH\220S", - "UNE FAUCILLE TR\324S MIGNONE. jE ME DEMANDE O\353 SERA LE MARTEAU?", - "\"LES FABRICANTS DE TABAC AVERTISSENT QUE LES AUTORIT\220S SANITAIRES SONT S\220RIEUSEMENT NUISIBLES POUR LA SANT\220 \"", - "UNE BOUGIE COURANTE ET NORMALE ET AVEC DE LA CIRE M\322ME", - // 160 - "IL FAUT VOIR COMME ELLES LUISENT CES DEUX RUTILANTES MONNAIES!", - "IL FAUT VOIR COMME ELLE LUIT CETTE RUTILANTE MONNAIE!", - "AVEC \200A JE SERAI IMMUNIS\220 CONTRE LES MORSURES DES VAMPIRES", - "NON, CE N'EST PAS ENCORE LE MOMENT", - "IL Y A UN BILLET DE MILLE ET DEUX SOUS", - // 165 - "ON DIT\"VOUS \322TES PRI\220S DE NE PAS DONNER \267 MANGER AU PIANISTE\"", - "L'OMELETTE, 200. DES PETITS POISSONS FRITS, 150, DES POMMES A\330OLI, 225", - "LES MEILLEURES HAMBURGERS DE CE C\342T\220 DU DANUBE, SEULEMENT 325", - "C'EST UNE JOLIE T\322TE DE MORT AU REGARD TR\324S PER\200ANT -HI, HI, HI, QUE C'EST BON!", - "BONJOUR T\322TE DE MORT, TU ME RAPPELLES L'ONCLE HAMLET", - // 170 - "J'AI LA HABITUDE DE NE PAS TOUCHER AUX CHOSES QUI ONT V\220CU AUTREFOIS", - "C'EST UNE POUBELLE", - "C'EST UNE MASSUE POUR LE MATCH DE CE SOIR", - "JE ME DEMANDE CE QU'IL AURA DERRI\324RE", - "H\220, CE RIDEAU NE BOUGE PAS!", - // 175 - "TIENS, QUEL CH\266TEAU SI SOMBRE, H\220? ", - "JE NE PEUX PAS, IL EST TROP LOIN POUR M'ENTENDRE", - "C'EST UNE TYPIQUE FOR\322T TRANSYLVANE, AVEC DES ARBRES", - "MAIS TU NE DIS QUE DES B\322TISES, C'EST UN LIEU OBSCUR!", - "CONFISERIE GARCIA, G\266TEAUX ET CHEWING-GUMS.", - // 180 - "UNE PORTE TR\324S JOLIE", - "ELLE EST FERM\220E", - "UN TONNEAU COMPL\324TEMENT FERM\220", - "", - "QUELLES BESTIOLES SI MIGNONES!", - // 185 - "BSSST, BSSST, PETIT CHAT...", - "IL NE R\220POND PAS", - "LA LUNE EST UN SATELLITE TOURNANT AUTOUR DE LA TERRE AVEC UNE P\220RIODE DE ROTATION DE 28 JOURS", - "SALUT, LUNE!, LUN\220E ET \220TOURDIE ", - "ELLE EST COMPL\324TEMENT BOUCH\220E AVEC DES GROSSES PLANCHES", - // 190 - "C'EST IMPOSSIBLE, CECI NE L'OUVRE PAS NI LE MAJORDOME DE LA T\220L\220", - "H\220, IL PARA\327T QUE L'OMBRE DE CE CYPR\324S-LA EST ALLONG\220E", - "OH\220! H\342TELIEEER!", - "JE VOUDRAIS UNE CHAMBRE", - "SAVEZ-VOUS O\353 EST QUE JE PEUX TROUVER UN TEL COMTE DRASCULA?", - // 195 - "OUI, QU'EST-CE QU'IL Y A? ", - "ET \200A?", - "EN... EN V\220RIT\220?", - "UNE BONNE QUESTION, JE VAIS VOUS RACONTER MON HISTOIRE, TIENS...", - "JE N'AI QUE POUR CINQ MINUTES", - // 200 - "JE M'APPELLE JOHN HACKER ET SUIS LE REPR\220SENTANT D'UNE INMOBILI\324RE BRITANNIQUE", - "IL PARA\327T QUE LE COMTE DRASCULA VEUT ACHETER DES TERRAINS \267 GIBRALTAR ET ON M'A ENVOY\220 POUR N\220GOCIER L'AFFAIRE", - "MAIS JE PENSE QUE DEMAIN DE BONNE HEURE JE RETOURNE AVEC MA MAMAN", - "UNE BELLE NUIT, N'EST-CE PAS?", - "NON, RIEN", - // 205 - "OH\220! PIANISTE!", - "UNE BELLE NUIT", - "ET EN PLUS, IL NE FAIT PAS FROID", - "EH BIEN, RIEN. CONTINUE \267 JOUER", - "C'EST \200A", - // 210 - "BONJOUR CHEF, \200A VA?", - "ET LA FAMILLE?", - "IL Y A DE L'AMBIANCE ICI, H\220?", - "TANT MIEUX SI JE NE DIS RIEN", - "ON EST MIEUX CHEZ-SOI QU'AILLEURS... ON EST MIEUX DANS... H\220? MAIS VOUS N'\322TES PAS TANTE EMMA. MIEUX ENCORE. -SI JE N'AI PAS AUCUNE TANTE EMMA!", - // 215 - "OUI, LE MIEN AUSSI. VOUS POUVEZ M'APPELLER COMME VOUS VOULEZ, MAIS SI VOUS M'APPELLEZ JOHNY, JE VIENS COMME LES CHIENS", - "OUI, QUELS COUPS QUE J'AI, N'EST-CE PAS? EN FAIT, O\353 SUIS-JE?", - "OUI", - "A\330E!, A\330E!...", - "OH, OUI! BIEN S\352R", - // 220 - "EH BIEN! MERCI BEAUCOUP POUR TON AIDE. JE NE TE D\220RANGE PLUS SI TU ME DIS O\353 SE TROUVE LA PORTE, S'IL TE PLA\327T...", - "CAR LE COUP A D\352 ME TOUCHER LA CERVELLE ET JE N'Y VOIS GOUTTE", - "BAH!, \200A FAIT RIEN. J'AI TOUJOURS UNE DE R\220CHANGE", - "OUAH, QUELLE BELLE FEMME! -JE NE M'AVAIS PAS RENDU COMPTE! BIEN S\352R, SANS LES LUNETTES...", - "\220COUTE...", - // 225 - "ET \200AAAAAA?!", - "NE T'EN FAIS PAS B. J., MON AMOUR! JE VAIS TE SAUVER DES GRIFFES DE CELUI-L\267 ", - "IL ME CASSE LE NEZ, TIENS!", - "AHHH, UN HOMME-LOUP! MEURS MAUDIT!", - "OUI, C'EST CELA...", - // 230 - "OUI, C'EST CELA... JE CROIS QUE JE VAIS SUIVRE MON CHEMIN. PARDON.. ", - "QUOI?", - "EH BIEN, EN V\220RIT\220, BIEN PENS\220... JE NE CROIS PAS", - "DIS -MOI, OH! \220RUDITE PHILOSOPHE! Y A-T-IL UNE R\220LATION CAUSE-EFFET ENTRE LA VITESSE ET LE LARD?", - "\200A VA, \200A VA, ABANDONNE. EN TOUT CAS, JE NE SAIS PAS POURQUOI JE L'AI DIT.", - // 235 - "QU'EST-CE QUE TU FAIS ICI EN TRAIN DE PHILOSOPHER AU LIEU DE MANGER DU MONDE?", - "QU'EST-CE QUE C'EST QUE \200A?", - "\220COUTE, PEX-TU R\220P\220TER CETTE PHRASE DES \"INCLINATIONS PR\220-\220VOLUTIVES\"?", - "BIEN S\352R, MON VIEUX. CETTE HISTOITE QUE TU M'AS LACH\220E AVANT. CE QUE JE N'AI PAS BIEN COMPRIS...", - "NON, LE MIEUX SERA DE NE RIEN DIRE. CAR SI JE LE TOUCHE LA VEINE.....", - // 240 - "OUI, QUE SE PASSE-T-IL?", - "OUI, QU'EST-CE QU'IL Y A? ", - "EH BIEN, MAINTENANT QU'IL ABORDE LE SUJET JE LUI DIRAI QUE...", - "", - "EN FAIT, QU'ARRIVERAIT-IL SI UN VAMPIRE SE POURVOYAIT DE LA FORMULE PAR HASARD... ", - // 245 - "EH BIEN, RIEN. \220COUTE, CECI NE TE SEMBLE PAS UN RAVAUDAGE QU'ON A MIS EN SC\324NE POUR EN FINIR T\342T AVEC LE JEU? BON, PEUT-\322TRE PAS", - "C'EST VIDE!", - "POURQUOI TU M'AS VOL\220 MON AMOUR. B.J. SI ELLE N'EST PAS L\267, LA VIE N'AS PAS DE SENS POUR MOI", - "SON CERVEAU?!", - "CE N'EST POUR RIEN, MAIS JE CROIS QUE TON PETIT MONSTRE M'A F\266CH\220", - // 250 - "MA VIERGE, QUE JE RESTE TEL QUE JE SUIS!", - "TU N'AURAS PAS LE DERNIER MOT. C'EST S\352R QUE MAINTENANT APPARA\327T SUPER-LOPEZ ET ME LIB\324RE!", - "QUELLE MERDE DE JEU DONT MEURT LE PROTAGONISTE!", - "UN INSTANT, QU'Y A-T-IL DE MON DERNIER D\220SIR?", - "HA! HA! MAINTENANT JE SUIS IMMUNIS\220 CONTRE TOI, D\220MON MAUDIT. CETTE CIGARETTE EST UNE POTION ANTI-VAMPIRES QUI M'A DONN\220 VON BRAUN ", - // 255 - "OUI, C'EST S\352R, MAIS TU N'OBTIENDRAS JAMAIS DE MOI LA FORMULE", - "JE PEUX SUPPORTER LA TORTURE, ET ENCORE LA CR\220ER ", - "NON, S'IL VOUS PLA\327T, JE PARLERAI, MAIS NE ME FAITES PAS \200A!", - "EH BIEN. JE T'AI D\220J\267 DIT CE QUE TU VOULAIS SAVOIR. MAINTENANT D\220LIVRE-NOUS, B.J. ET MOI, ET FICHEZ-NOUS LA PAIX", - "B.J.! QU'EST-CE QUE TU FAIS L\267? DRASCULA, O\353 EST-IL?", - // 260 - "QU'IL EST M\220CHANT! C'EST SEULEMENT PAR-CE QU'IL APPARTIENT \267 LA NOBLESSE QU'IL CROIT POUVOIR EXERCER LE DROIT DE GAMBADE AVEC N'IMPORTE QUI", - "\267 BAS L'ARISTOCRATIE ARBITRAIRE!", - "DEBOUT LES PAUVRES DU MOOONDE....!", - "ET D'APR\324S CE QUE JE VOIS ON T'A ENCHA\327N\220 AVEC CADENAS ET TOUT", - "BON, \200A VA. N'AURAS-TU PAS UNE \220PINGLE?", - // 265 - "BON, BON, NE T'EN FAIS PAS COMME \200A. JE PENSERAI \267 QUELQUE CHOSE.", - "H\220! TAVERNIER!", - "COMMENT VA LE MATCH?", - "QUI EST-CE?", - "NE VOIS-TU PAS QUE DRASCULA EST ICI?", - // 270 - "ALORS, ON VA FINIR AVEC LUI, NON?", - "SERS -MOI UN COUP...", - "RIEN. J'AI OUBLI\220 CE QUE J'ALLAIS TE DIRE", - "OU\207BIEN\207TU\207ME\207SERS\207UN\207COUP\207OU\207JE\207ME\207METS\207\267\207JOUER\207DU\207PIANO", - "COMBIEN IL RESTE POUR QUE LE MATCH FINISSE?", - // 275 - "BON SOIR", - "COMME VAS-TU, IGOR? BOSSU? -HI! HI! HI! QUE C'EST BON! ", - "QU'EST-CE QU'ON SUPPOSE QUE TU FAIS?", - "EH BIEN, NON!", - "ALORS, METS-TOI DES LUNETTES", - // 280 - "QU'EST QUE C'EST QU'UNE ORGIE SURNATURELLE?", - "\200A VA, \200A VA, ARR\322TE-TOI. JE ME FAIS D\220J\267 UNE ID\220E", - "NE POURRAIS-TU PAS ME DIRE O\353 SE TROUVE DRASCULA? ", - "ALLONS, S'IL TE PLA\327T", - "POURQUOI PAS?", - // 285 - "AH! MAIS IL DORME PENDANT LA NUIT?", - "EH BIEN! QUE LA RENTE SE DONNE BIEN", - "CE QUE JE DOIS LUI PARLER", - "OH\220! SQUELEEETTE! ", - "SAPRISTI! -UN SQUELETTE QUI PARLE!", - // 290 - "RACONTE-MOI, COMMENT EST-TU VENU JUSQU'ICI?", - "ET POUR QUELLE RAISON VOUDRAIT DRASCULA CR\220ER UN MONSTRE? ", - "COMMENT T'APPELLES-TU, AMI SQUELETTE?", - "\220COUTE, VEUX-TU QUE JE T'APPORTE QUELQUE CHOSE \267 MANGER?", - "TU DOIS AVOIR L'ESTOMAC VIDE. -HI! HI! HI!", - // 295 - "VRAIMENT JE N'AI PAS ENVIE DE PARLER MAINTENANT", - "MON DIEU! (SIFFLEMENT) J'ESP\324RE QUE...(SIFFLEMENT) ET QUE...(SIFFLEMENT) DEUX FOIS!", - "J'AI L'AIM\220E VRAIMENT. \200A VA, JE SUIS D'ACCORD, IL N'\220TAIT PAS UN G\220NIE, MAIS PERSONNE EST PARFAIT, N'EST-CE PAS? ", - "DE PLUS, ELLE AVAIT UNE FIGURE \220POUSTOUFLANTE ", - "JE NE SERAI PLUS LE M\322ME. JE VAIS M'ENFERMER DANS UN MONAST\324RE POUR VOIR FUIR MA VIE LENTEMENT", - // 300 - "RIEN NE POURRA M'EN SORTIR D\220J\267 DE CETTE MIS\324RE PARCE QUE...", - "DE QUI? DE QUI?", - "JE VEUX \322TRE UN PIRATE", - "JE VEUX \322TRE PROGRAMMEUR", - "RACONTEZ-MOI QUELQUE CHOSE SUR PELAYO", - // 305 - "JE CONTINUERAI \267 JOUER ET J'OUBLIERAI QUE VOUS AI VU ", - "QUI AURA PENS\220 \267 CETTE B\322TISE?", - "C'EST UN SAC COMME CELUI DE MA GRANDE-M\324RE", - "MAIS QUE JE SUIS BEAU!", - "PLUS JE ME REGARDE PLUS JE ME PLAIS", - // 310 - "ET APR\324S COMMENT JE ME FERME?", - "IL FAUDRA QUE M'OUVRE D'ABORD, NON?", - "JE SUIS BIEN O\353 JE SUIS", - "JE M'AI D\220J\267", - "SALUT, MOI!", - // 315 - "JE VAIS ME LES METTRE \267 TEMPS", - "JE NE VOIS RIEN DE SP\220CIAL", - "C'EST BIEN O\353 IL EST", - "ET POURQUOI FAIRE?", - "JE NE PEUX PAS", - // 320 - "SALUT, TOI!", - "C'EST LE PANTH\220ON DE L'ONCLE D\220SIR\220", - "OH\220! ONCLE D\220SIR\220\220\220\220!", - "NON, JE NE VEUX PAS ME COUPER ENCORE UNE FOIS", - "HEM! HEM!...!", - // 325 - "YAMM, HEMMM, JH!", - "OUI, COF,COF!", - "TIENS, IL Y A ICI UN CHEWING-GUM COLL\220", - "C'EST LE MOVILANI, LE CADEAU QUI M'ONT DONN\220 POUR NO\323L", - "QUE C'EST HAUT!", - // 330 - "SORS DANS LE BALCON JULIETTE!", - "TU EST LA LUMI\324RE QUI \220CLAIRE MON CHEMIN!", - "H\220, PORTE! QU'EST-CE QU'IL Y A?", - "OH\220! MACHINE \267 TABAC DE TRANSYLVANIIIE", - "C'EST UNE MACHINE \267 D\220BIT DE TABAC", - // 335 - "J'AI UNE AUTRE MONNAIE L\267 -DEDANS", - "NON, J'AI D\220CID\220 ABANDONNER LE TABAC ET L'ALCOOL", - "D\324S MAINTENANT JE VAIS ME CONSACRER SEULEMENT AUX FEMMES", - "C'EST UN VOL! RIEN EST SORTI!", - "ENFIN! ", - // 340 - "C'EST \200A, UN BAHUT", - "SALUT, BAHUT! TU T'APPELLES COMME MON COUSIN, QUI S'APPELLE RAUL", - "J'AI TROUV\220 LE SAC DE B.J..", - "MON DIEU! JE N'Y ME VOIS PAS -SUIS UN VAMPIRE!", - "...AH, NON! CE N'EST QU'UN DESSIN!", - // 345 - "PETIT MIROIR: \"C'EST QUI LE PLUS BEAU DU ROYAUME?\"", - "IL NE VEUT PAS M'OUVRIR", - "TR\324S BIEN. J'AI MIS LES TAMPONS", - "C'EST UN DIPL\342ME DE CHASSE-VAMPIRES HOMOLOGU\220 PAR L'UNIVERSIT\220 DE CAMBRIDGE", - "NON, IL ME FAUT ENCORE D'INGR\220DIENTS, PAS LA PEINE DE LUI REVEILLER", - // 350 - "C'EST QUE JE SUIS FAUCH\220", - "C'EST UNE LAMPE BRITANNIQUE", - "TAVERNIER! -AIDEZ-MOI!", - "UN VAMPIRE EST APPARU ET IL A ENLEV\220 MA FIANC\220E", - "MAIS, N'ALLEZ VOUS PAS M'AIDER?!", - // 355 - "MORTE? QUE VOULEZ-VOUS DIRE?", - "HEM!", - "UN VAMPIRE A S\220QUESTR\220E LA FILLE DE LA 506!", - "IL FAUT QUE TU M'AIDES!", - "TU NE SAIS PAS JOUER AUCUNE PI\324CE DES INHUMAINS?", - // 360 - "COMMENT TU TE SUPPORTES TOUT LE JOUR EN JOUANT LA M\322ME CHOSE?", - "ET ALORS, POURQUOI TU M'\220COUTES?", - "PR\322TE-MOI LES TAMPONS", - "ALLONS! JE VAIS TE LES REDONNER TOUT DE SUITE", - "ALLOOONSSS...", - // 365 - "AU REVOIR. JE DOIS TUER UN VAMPIRE", - "", - "EN QUOI TU PARLES! EN TRANSYLVAN?", - "C'EST QUI L'ONCLE D\220SIR\220?", - "MAIS QU'EST-CE QU'IL Y A AVEC CE DRASCULA-L\267?", - // 370 - "QUI EST-CE CE VON BRAUN-L\267?", - "ET POURQUOI IL NE LE FAIT PAS?", - "ET O\353 PEUX-JE TROUVER VON BRAUN?", - "EH BIEN, MERCI ET AU REVOIR. QUE TU LA DORMES BIEN", - "IL VAUDRA MIEUX SONNER D'ABORD", - // 375 - "LE PROFESSEUR VON BRAUN, C'EST VOUS?", - "ET NE POUVEZ-VOUS PAS M'INDIQUER O\353 JE PEUX...?", - "JE NE CROIS PAS QU'IL SOIT LE NAIN GANYM\324DE", - "PROFESSEUR!", - "AIDEZ-MOI! -LA VIE DE MA BIEN AIM\220E DEPENDE DE VOUS!", - // 380 - "\200A VA, JE N'AI PAS BESOIN DE VOTRE AIDE", - "D'ACCORD. JE M'EN VAIS", - "N'AIES PAS PEUR. NOUS ALLONS VAINCRE DRASCULA ENSEMBLE", - "ALORS, POURQUOI NE M'AIDEZ VOUS PAS?", - "JE LES AI", - // 385 - "OUI, JE LES AI!", - "D'ACCORD", - "...ER ...OUI", - "JE VIENS POUR RENTRER DANS CETTE CABINE", - "SUIS PR\322T \267 CONFRONTER VOTRE \220PREUVE", - // 390 - "\200A VA, VIEUX RIDICULE. JE SUIS VENU CHERCHER MON ARGENT", - "NON, RIEN. JE M'EN ALLAIS D\220J\267", - "PARDONNE-MOI", - "CE LIVRE T'INT\220RESSE? AVEZ-VOUS DES PARTITIONS DE TCHA\330KOVSKY?", - "COMMENT PEUX-JE TUER UN VAMPIRE?", - // 395 - "ON NE T'A JAMAIS DIT QUE C'EST MAUVAIS DORMIR DANS UNE MAUVAISE POSTURE?", - "EH BIEN, C'EST \200A QUE MA M\324RE ME DIT TOUJOURS", - "POURQUOI DRASCULA N'A PU JAMAIS TE TUER?", - "ET QU'EST-CE QUE S'EST PASS\220?", - "C'EST SUPER! -AVEZ-VOUS UNE POTION D'IMMUNIT...!", - // 400 - "ALORS?", - "TR\324S BIEN", - "POUVEZ-VOUS ME R\220P\220TER CE DONT J'AI BESOIN POUR CETTE POTION?", - "EH BIEN! JE PARS RAPIDE LE CHERCHER", - "\220COUTEZ, QU'EST-CE QUE C'EST PASSE\220 AVEC LE PIANISTE?", - // 405 - "J'AI\207D\220J\267\207TOUS\207LES\207INGR\220DIENTS\207DE\207CETTE\207POTION", - "UNE QUESTION: QU'EST.CE QUE C'EST CELA D' ALUCSARD ETEREUM?", - "PARLEZ, PARLEZ... ", - "ET C'EST O\353 CETTE GROTTE?", - "QU'EST-CE QU'IL Y A? N'AVIEZ VOUS PAS UN TRIBUNAL?", - // 410 - "...MAIS ...ET SI JE TROUVE ENCORE DES VAMPIRES?", - "C'EST UN VAMPIRE QUI M'EMP\322CHE L'ENTR\220E", - "IL RESSEMBLE \267 YODA, MAIS C'EST UN PEU PLUS GRAND", - "H\220, YODA! SI TU ME LAISSES PASSER JE TE DONNE UNE MONNAIE", - "BON, \200A VA. ON NE PEUT RIEN TE DIRE", - // 415 - "H\220, VAMPIRE! BELLE NUIT, N'EST-CE PAS?", - "ON T'A D\220J\267 DIT QUE TU RESSEMBLES \267 YODA?", - "ES-TU UN VAMPIRE OU UNE PEINTURE \267 L'HUILE?", - "IL VAUX MIEUX NE RIEN TE DIRE, POUR SI TU TE F\266CHES", - "C'EST FERM\220E \267 CL\220", - // 420 - "LA PIE POURRAIT M'ARRACHER UN OEIL SI J'EN ESSAIE!", - "C'EST FERM\220E! -MON DIEU, QUELLE PEUR!", - "LES GONDS SONT OXYD\220S", - "L\267-DEDANS IL Y A SEULEMENT UN POT AVEC DE LA FARINE", - "CECI A ENLEV\220 L'OXYDE", - // 425 - "J'AI TROUV\220 UN PIEU DE PIN", - "JE PRENDRAI CELUI-CI QUI EST PLUS GROS", - "BON, JE CROIS QUE JE PEUX ME D\220BARRASSER MAINTENANT DE CE STUPIDE D\220GUISSEMENT", - "LE PASSAGE AUX DONJONS EST FERM\220 \267 CAUSE DES TRAVAUX. VOUS \322TES PRI\220S D'UTILISER L'ENTR\220E PRINCIPALE. EXCUSEZ LES ENNUIES", - "...IL EST P\266LE. AVEC DE GROSSES DENTS. IL A UN TOUPET ET UTILISE UNE CAPE... -C'EST S\352REMENT DRASCULA!", - // 430 - "C'EST B.J.! B.J. TU EST BIEN?", - "OUI, JE SAIS QU'ELLE EST B\322TE, MAIS JE SUIS SEUL", - "N'AURAS-TU PAS UNE CL\220 PAR L\267, N'EST-CE PAS?", - "N'AURAS-TU PAS UN ROSSIGNOL, PAR HASARD?", - "DONNE-MOI UNE \220PINGLE. JE VAIS FAIRE COMME MCGYVER", - // 435 - "NE BOUGES PAS, JE REVIENS TOUT DE SUITE", - "ZUT! -S'EST CASS\220E!", - "OL\220\220\220! ET EN PLUS JE ME SUIS RAS\220, COLL\324GUE!", - "OUI, MON AMOUR?", - "IL N'ARRIVE PAS", - // 440 - "LE PIANISTE N'EST PAS L\267", - "UN COKTAIL TRANSYLVAN", - "JE N'AI PAS UNE CHAMBRE", - "SELON PARA\327T, IL EST REST\220 COINC\220 DANS LA BAIGNOIRE ET D\220CIDA ALORS D'OUVRIR UN BAR ", - "IL EST SO\352L COME UNE CUVE DE CUBA", - // 445 - "CE CHEVEU... LE CAS CE QU'IL ME RAPPELLE QUELQU'UN", - "C'EST UN SQUELETTE OSSEUX", - "REGARDE! MIGUEL BOS\220!", - "IL DORME. CE SERAIT DOMMAGE LE R\220VEILLER", - "IL EST PLUS MOCHE QU'\220MILE DE PAZ", - // 450 - "UN CERCUEIL EN BOIS DE PIN", - "IL VA ME COUPER EN PETITES TRANCHES, COMME UN SAUCISSON", - "JE N'AIME PAS LES PENDULES. JE PR\220F\324RE LES ARTICHAUTS", - "MES MAINS SONT EMMENOTT\220ES. JE N'ARRIVERAI PAS", - "IL SAUTE AUX YEUX QUE C'EST UNE PORTE SECR\324TE", - // 455 - "ILS M'IGNORENT", - "C'EST BIEN!", - "DANS LE SCRIPT IL BOUGEAIT, MAIS LE JEU A SURPASS\220 LE BUDGET ET ON N'A PAS PU ME PAYER UN GYMNASE POUR ME METTRE EN FORME. DONC, POINT DU TOUT", - "ELLE PARA\327T UN PEU D\220TACH\220E DU MUR", - "JE NE CROIS PAS POUVOIR M'EN SERVIR. ELLE TROP HUMIDE POUR L'ALLUMER", - // 460 - "\267 L'AILE OUEST? -M\322ME PAS EN FOU ACHEV\220! -VA SAVOIR QU'AURAIT-IL L\267-BASI!", - "IL Y A DE JOLIS MOTIFS TRANSYLVANS", - "", - "QUEL DOMMAGE NE PAS AVOIR TROUV\220 L\267-DEDANS UN PETIT AGNEAU EN TRAIN DE SE R\342TIR!", - "LA DERNI\324RE FOIS QUE J'AI OUVERT UN FOURNEAU LA MAISON A VOL\220 EN \220CLATS", - // 465 - "C'EST L'ENSEIGNE DE L'\220QUIPE DE FOOT-BALL DE LA TRANSYLVANIE", - "ET POURQUOI FAIRE? POUR ME LA METTRE \267 LA T\322TE?", - "JE NE CROIS PAS QUE CES TIROIRS SOIENT DE CEUX QUI S'OUVRENT", - "JE NE VEUX PAS SAVOIR LA NOURRITURE QU'IL Y AURA L\267-DEDANS!", - "J'AI L'IMPRESSION QUE C'EST DE L'IMPRESSIONNISME", - // 470 - "LA NUIT S'EMPARE DE NOUS TOUS... QUELLE PEUR, N'EST-CE PAS?", - "ELLE EST BOUCH\220E", - "C'EST LE ROI. NE L'AVAIT-TU PAS IMAGIN\220?", - "NON, J'EN AI D\220J\267 UN CHEZ MOI ET JE LUI DONNE \267 MANGER EN PLUS", - "UN PLACARD AVEC DES LIVRES ET D'AUTRES CHOSES", - // 475 - "ET QUI J'APPELLE \267 CES HEURES-L\267?", - "\"COMMENT FAIRE LA D\220CLARATION D'IMP\342TS\" COMME C'EST INT\220RESSANT!", - "J'AI D\324J\267 UN CHEZ MOI. JE CROIS QUE C'EST UN BEST-SELLER MONDIAL", - "UNE CL\220 COMPL\324TEMENT NORMALE", - "IL ME SEMBLE QUE CELLE-CI N'EST PAS D'ICI", - // 480 - "H\220! CE SONT DES FRITES SOUS FORME DE DENT CANINE! \200A ME PLA\327T", - "JE NE CROIS PAS QU'IL SOIT LE MEILLEUR MOMENT POUR MANGER DES GOURMANDISES, AVEC MA FIANC\220E AUX MAINS DE L'\322TRE LE PLUS MAUVAIS QU'UNE M\324RE A PU ACCOUCH\220", - "COMME JE SUIS BIEN EN TUANT DES VAMPIRES AVEC CELA!", - "VOYONS SI APPARA\327T T\342T UN AUTRE", - "NON, IL FAUT QU'IL SOIT AVEC UN SALE ET PUANT VAMPIRE, COMME CELUI QUI J'AI TU\220 AVANT", - // 485 - "C'EST L'AUTHENTIQUE PERRUQUE QU'ELVIS AVAIT UTILIS\220E QUAND IL EST DEVENU CHAUVE", - "C'EST DE LA FARINE, MAIS JE NE PEUX PAS DIRE DES MARQUES", - "PEUT-\322TRE DANS UN AUTRE MOMENT, D'ACCORD?", - "C'EST UNE HACHE MAGNIFIQUE, DOMMAGE DE NE PAS POUVOIR SE PAYER AUCUNE T\322TE DE VAMPIRE PAR L\267", - "NON. JE SUIS UNE BONNE PERSONNE AU FOND", - // 490 - "C'EST LE D\220ODORANT DE LA THACHER-HI!HI!HI!", - "C'EST UNE CAPE ASSEZ MIGNONE", - "", - "TOUT COMME LES BRANCHES DE TOUS LES ARBRES DU MONDE, C'EST-\267-DIRE SANS RIEN DE PARTICULIER", - "OH! C'EST INCROYABLE! -UNE CORDE DANS UNE AVENTURE DESSIN\220E!", - // 495 - "JE ME DEMANDE \267 QUOI SERVIRA-T-ELLE...?", - "UNE CORDE ATTACH\220E \267 UNE BRANCE OU UNE BRANCHE ACROCH\220E \267 UNE CORDE, \200A D\220PEND DU POINT DE VUE", - "IL PARA\327T QUE CETTE PIE \267 DE TR\324S MAUVAISES INTENTIONS", - "TAIS-TOI! JE NE LA DIS RIEN, POUR SI ELLE SE F\266CHE", - "ELLE SEMBLE MORTE, MAIS C'EST UNE MENSONGE", - // 500 - "IL N'Y A AUCUN ANIMAL ABiM\220 DANS LA PRODUCTION DE CE JEU", -}, -{ - // 0 - "", - "\220 la seconda porta pi\243 grande che ho vista nella mia vita", - "Forse.., no", - "\202 chiusa con tabelle. La chiesa deve essere abbandonata da tanti anni fa.", - "Ma se non la ho aperta", - // 5 - "Che faccio? La tolgo?", - "Ciao porta. Vado a farti una cornice", - "Troppo per me", - "una finestra chiusa con tabelle", - "Non ce la faccio", - // 10 - "Eccolo", - "E per che?", - "Ciao finestra. Hai qualcosa da fare stasera?", - "No senza il permesso del Ministero dei Lavori Pubblici", - "-eh! quella finestra ha soltanto una tabella..", - // 15 - "-Eooooo! -Finestra!", - "Tu, ciao", - "", - "Non ce la faccio", - "Va bene dov'\202 ", - // 20 - "", - "\220 una tomba in forma di croce", - "Non grazie", - "Ciao morto. Vuoi delle patatine a forma di vermi?", - "Si. Come in Poltergueist.", - // 25 - "", - "", - "Torno in quindici minuti", - "Vietato affigere manifesti", - "", - // 30 - "\220 chiuso con la chiave", - "Ne ho gi\240 uno.", - "", - "Non risponde.", - "No, \202 ben parcheggiato.", - // 35 - "\220 una porta.", - "Un casseto del tavolino.", - "Un sospettoso armadio.", - "Ciao armadio. Come va?.", - "", - // 40 - "", - "\220 un candelabro molto vecchio.", - "Deve essere qu\241 da che Mazinguer-Z era una vite.", - "No.\220 una reliquia.", - "\220 una bella pala.", - // 45 - "", - "Hi, hi, hi", - "", - "No.", - "", - // 50 - "Ha,ha,ha . - che buono!", - "", - "", - "", - "Non vedo niente di speciale.", - // 55 - "Ferdinan, la pianta.", - "\220 una degli spunzoni della cancellata.", - "-Eh! Qu\241 sotto c'\202 una scatola di cerini", - "-Guarda! un pacco di fazzoletti. -E c'\202 ne uno senza utilizzare!.", - "Non c'\202 niente di pi\243 nel secchio.", - // 60 - "\220 un cieco che non vede", - "", - "", - "", - "", - // 65 - "\220 una abbondante quantit\240 di soldi", - "", - "", - "", - "", - // 70 - "", - "", - "", - "", - "", - // 75 - "", - "", - "", - "", - "", - // 80 - "", - "", - "", - "", - "", - // 85 - "", - "", - "", - "", - "", - // 90 - "", - "", - "", - "", - "", - // 95 - "", - "", - "", - "", - "", - // 100 - "NON HA NULLA DI SPECIALE", - "NON \324 MICA SPECIALE", - "TU! CHE C'\324 ?", - "CIAO", - "NIENTE NUOVO?", - // 105 - "-COME VA LA FAMIGLIA?", - "- MA CHE STAI A DIRE?", - "-MA COME VADO A PRENDERE QUELLA COSA!", - "\324 VIETATO DALLA MIA RELIGIONE", - "MEGLIO DI NO", - // 110 - "-COME NO!", - "NEANCHE PARLARNE", - "IMPOSSIBILE", - "QUESTO NON SI APRE", - "IO SOLO NON CE LA FACCIO", - // 115 - "SE VORREI POTREI, MA MI FA PIGRIZIA", - "NON TROVO UNA BUONA RAGIONE", - "\324 UN CERVELLO ABBASTANZA CARINO", - "ALLORA, CERVELLO, CHE NE PENSI DI FARE STASERA?", - "NO, DEVE CONSERVARSI IN UN POSTO CHIUSO ALLA AZIONE MUTANTE DELLA ATMOSFERA", - // 120 - "\324 COS\336 DURO, COME IL MIO CAPO", - "UNA TALEA MOLTO AFFILATA", - "FEDELE TALEA AFFILATAAA, NOBILE ROVERE TRANSILVANOOO", - "-INSOMMA, DEVO TAGLIARMI LE UNGHIE!", - "-LA, DENTRO, C'\324 B.J,E MAMMA MIA, CHE FIGA!", - // 125 - "\324 CHIUSA SOTTO LUCCHETTO E CATENACCIO", - "\"LUCCHETTO E CATENACCIO S.A\"", - "\324 IL TIPICO SCHELETRO CHE C'\324 IN TUTTE LE CARCERE DI TUTTI I VIDEO-GIOCHI", - "SI UTILIZA PER DARE ELETRICIT\267 AGLI APARATTI COLLEGATI A LUI", - "\324 TOTALMEN11TE ARTIGIANO, PERCHE I GIAPONESSI LI FANNO TASCABILI", - // 130 - "NELLA MIA VITA, HO VISTO SOLTANTO UNA VOLTA UNA COSA COS\336 BRUTTA", - "SMETILLA. NON DICO NULLA PER SE SI ARRABBIA", - "SEMBRA ABBASTANZA RAZIONALE", - "\324 UNA FOTO DI PLATONE SCRIVENDO IL SUO DISCORSO PERSO", - "NON SONO DI QUELLI CHE PARLANO CON POSTERS", - // 135 - "UNA SCRIVANIA MOLTO CARINA", - "\324 UN DIPLOMA DI CACCIA-CACCIA-VAMPIRI OMOLOGATO DALLA UNIVERSIT\267 DI OXFORD", - "\324 NOTTE BUIA CON LUNA PIENA", - "SEMBRA CHE QUESTE VITI NON SONO MOLTO AVVITATE", - "NON GUARDARE, MA CREDO CHE UNA TELECAMERA NASCOSTA MI ST\267 REGISTRANDO", - // 140 - "UN DETETTORE DI TALEE MOLTO MODERNO", - "NO, IL LABORATORIO SI TROVA NEL SECONDO PIANO", - "UN BEL TAVOLINO", - "\324 UN SACCO DI SOLDI CHE NON PUO MANCARE IN UNA AVVENTURA CHE SIA COS\336 IMPORTANTE", - "IF I WERE A RICHMAN, DUBIDUBIDUBIDUBIDUBIDUBIDUBIDU", - // 145 - "SONO DELLE STRANE FOGLIE. DEVONO AVERLE PORTATE DALLA SUDAMERICA", - "NON CREDO CHE SIA RISPOSTO", - "\324 UN BEL CROCIFISSO DI LEGNO. LA ICONA NON RIFLESSA TUTTA LA SUA BELLEZA", - "IO SOLO PREGO PRIMA DI ANDARMENE AL LETTO", - "-EH, SEMBRA CHE QUESTO SPUNZONE \324 UN PO ALLENTATO!", - // 150 - "E POI TI LAMENTI PERCHE NON TI DO SUGGERIMENTI", - "\324 UNO SPUNZONI ABBASTANZA CONVENZIONALE", - "SONO CARINI, SEBBENE HANNO PARECHIO POLVERE", - "NO, NON MI SENTIRANO; HI,HI,HI -CHE BUONO!", - "\"LA BELLA ADDORMENTATA DEL BOSCO\" DI CIAIKOSKY, O CIOIFRUSKY, O COME SI DICA", - // 155 - "MOLTO APPETITOSA", - "NO, IO NON SONO DI QUELLI CHE SI METTONO IN BOCCA GOMME USATE", - "UNA FALCE MOLTO CARINA. MI DOMANDO DOVE CI SAR\265 IL MARTELLO", - "\"I FABBRICANTI DI TABACCO AVVERTONO CHE IL TABACCO NUOCE GRAVEMENTE LA SALUTE\"", - "UNA CANDELA NORMALE, ANZI CON CERA", - // 160 - "MAMMA MIA COME BRILLANO QUESTE DUE BRILLANTI MONETE", - "MAMMA MIA COME BRILLA QUESTA BRILLANTE MONETA", - "CON QUESTO SAR\220 IMMUNE AI MORSI DEI VAMPIRI", - "NO, ANCORA NON \220 IL MOMENTO", - "C'E UN BIGLIETTO DI DIECIMILA E UN PAIO DI MONETE", - // 165 - "DICE \"SI PREGA DI NON BUTTARE CIBO AL PIANISTA\"", - "OMELETTA, 3.000 .PESCI FRITI, 2.000,PATATINE, 2.500", - "LE MIGLIORI HAMBURGUER A QUESTA PARTE DEL DANUBIO, SOLTANTO PER 4.000", - "UN BEL TESCHIO, CON UNO SGUARDO MOLTO PENETRANTE. HI,HI,HI, CHE BUONO!", - "CIAO TESCHIO, MI RICORDI AL ZIO DI HAMLET", - // 170 - "HO L'ABITUDINE DI NON TOCCARE COSE CHE SIANO STATE VIVE", - "UN CESTINO", - "UN TOTOCALCIO PER LA PARTITA DI STASERA", - "MI DOMANDO CHE CI SAR\265 DIETRO", - "-EH, QUESTA TENDE NON SI MUOVE!", - // 175 - "MADONNA, CHE TETRO \220 QUESTO CASTELLO.", - "NON CE LA FACCIO, \220 TROPPO LONTANO PER SENTIRMI", - "UN TIPICO BOSCO TRANSILVANO, CON GLI ALBERI", - "-MA CHE SCIOCHEZZE DICI, \220 MOLTO BUIO", - "PASTICCERIA ROSSI. DOLCI E GOMME", - // 180 - "UNA PORTA MOLTO BELLA", - "\220 CHIUSA", - "UN FUSTO COMPLETAMENTE CHIUSO", - "", - "CHE ANIMALETTI COS\326 BELLI!", - // 185 - "BSSSSSS,BSSSS, GATINO..", - "NON RISPONDE", - "LA LUNA \220 UN SATELLITE CHE GIRA INTORNO LA TERRA CON UN PERIODO DI RIVOLUZIONE DI 28 GIORNI", - "CIAO, LUNA LUNETTA", - "\220 TOTALMENTE CHIUSA CON TABELLE", - // 190 - "IMPOSSIBILE. QUESTO, NON LO APRE N\220 HOUDINI", - ".EH, SEMBRA CHE L'OMBRA DEL CIPRESSE \220 ALUNGATA", - "-EOOO, BARISTA", - "VORREI UNA CAMERA", - "SA DOVE POSSO TROVARE A UNO CHE SI FA CHIAMARE CONDE DRASCULA", - // 195 - "SI, PER CHE?", - "COME MAI?", - "DA.....DAVVERO?", - "BUONA DOMANDA, GLI RACONTER\220 LA MIA STORIA, SENTA..", - "SONO SOLTANTO CINQUE MINUTI", - // 200 - "MI CHIAMO JOHN HACKER, E SONO RAPPRESENTANTE DI UNA IMMOBILIARIE BRITANICA", - "MI HANNO DETTO CHE IL CONDE DRASCULA VUOLE COMPRARE DEI TERRENI A GIBRALTAR, E SONO QU\326 PER NEGOZIARE LA VENDITA", - "MA CREDO IO CHE DOMANI PRESTO TORNO CON LA MAMMA", - "BELLA NOTTE, VERO?", - "NO, NIENTE", - // 205 - "EOOOO, PIANISTA", - "BELLA NOTTE", - "ANZI, NON FA FREDDO", - "ALLORA... TI LASCIO CONTINUARE A SUONARE", - "VA BENE", - // 210 - "CIAO CAPO, COME VA?", - "E LA FAMIGLIA?", - "C'\220 GENTE QU\326, EH?", - "MEGLIO NON DICO NULLA", - "SI ST\265 MEGLIO A CASA CHE A NESSUN POSTO... -EH? MA SE LEI NON \220 LA ZIA EMMA. ANZI. SE IO NON HO NESSUNA ZIA EMMA.", - // 215 - "SI, IL MIO ANCHE. LEI PUO CHIAMARMI COME GLI PARA, MA SE MI CHIAMA JOHNY, VENGO SUBITO COME I CANI", - "SI, CHE SPIRITOSO SONO, VERO? MAA.. DOVE MI TROVO?", - "SI.", - "MANAGIA..", - "OH, SI. COME NO", - // 220 - "ALLORA GRAZIE MILE PER DARMI IL TUO AIUTO. NON TI DISTURBO PI\351 . SE MI DICI DOV'\220 LA PORTA, PER FAVORE...", - "PERCHE LA BOTTA HA DOVUTO DAGNARMI IL CERVELLO E NON VEDO UNA MADONNA", - "NON FA NIENTE. SEMPRE NE PORTO ALTRI IN PI\351 ", - "-UFFA, CHE FIGA!- NON MI ERA ACCORTO, CERTO, SENZA GLI OCCHIALI", - "SENTI..", - // 225 - "COME MAI...?!", - "NON TI PREOCUPARE B.J., AMORE MIO! TI LIBERER\220 DA QUEL TIZIO", - "MI HA FATTO ARRABBIARE", - ".AHHH, IL LUPO- MANNARO! -MUORE MALDITO!", - "BENE, CREDO...", - // 230 - "BENE, CREDO CHE PROSSIGUER\220 LA MIA STRADA. PERMESSOO..", - "-COME?", - "LA VERIT\267, PENSANDOCI MEGLIO, CREDO DI NO", - "DIMI, OH ERUDITO FILOSOFO, C'\324 QUALCUNA RELAZIONE CAUSA-EFETTO TRA LA VELOCIT\267 E LA PANCETA?", - "VA BENE, SMETTILA. COMUNQUE NON SO PERCHE HO DETTO QUESTO", - // 235 - "COSA FAI QU\336 FILOSOFANDO, CHE NON STAI MANGIANDO GENTE?", - "COME MAI?", - "SENTI, PUOI RIPETERE QUELLO DI \"INCLINAZIONI PRE-EVOLUTIVE\"?", - "SI SI, QUELLA STORIA CHE MI HAI RACCONTATO PRIMA. PERCHE NON HO CAPITO MOLTO BENE.", - "NO, MEGLIO NON DICO NULLA, NON VOGLIO METTERE IL COLTELLO NELLA PIAGA...", - // 240 - "SI, MI DICA?", - "SI, CHE SUCCEDE?", - "AH, ADESSO CHE CITA IL SOGGETTO GLI DIR\343 CHE...", - "", - "AH.., COSA SUCCEDEREBBE SE UN VAMPIRO PRENDEREBBE LA RICETA..", - // 245 - "NIENTE. SENTI, QUESTO SEMBRA UN POSTICCIO MESSO SUL COPIONE PER FINIRE PRESTO IL VIDEO-GIOCO?. BENE, FORSE, NO", - "\324 VUOTO!", - "PERCHE HAI RUBATO IL MIO AMORE, B.J., SENZA LEI LA MIA VITA NON HA SENSO", - "-IL SUO CERVELLO?!", - "NO NIENTE, MA CREDO CHE ALLA FINE IL TUO PICCOLINO MOSTRO MI HA FATTO ARRABBIARE", - // 250 - "SANTA MADONNA AIUTAMI!", - "NON TE LA CAVEREI. SICURO CHE APPARISCE SUPERMAN E MI LIBERA!", - "CHE SCHIFFO DI VIDEO-GIOCO NEL CUI MUORE IL PROTAGONISTA", - "UN ATTIMO, COSA SUCCEDE COL MIO ULTIMO DESIDERIO?", - "-HA,HA! ORA SONO IMMUNIZZATO CONTRO TE, MALEDETTO DEMONIO. QUESTA SIGARETTA \324 UNA POZIONE ANTI-VAMPIRI CHE MI HA DATTO VON BRAUN", - // 255 - "SI CERTO. MA NON RIUSCIRAI MAI A FARMI DIRTI LA RICETA", - "POSSO SOPPORTARE LA TORTURA, ANZI CREARLA", - "-NO, PER FAVORE!- PARLER\220, MA NON FARMI QUESTO!", - "BENE, TI HO GI\267 DETTO QUELLO CHE VOLEVI SAPERE. ORA LIBERA B.J. E ME, E LASCIACI PERDERE", - "-B.J-.! COSA FAI QU\336? DOV'\324 DRASCULA?", - // 260 - "CHE PERVERSO! SOLTANTO PERCH'\324 NOBILE PENSA CHE HA IL DIRITTO SU TUTTI QUANTI", - "ABASSO LA ARISTOCRAZIA!", - "FORZA I POVERI DEL MONDOOO...", - "E QUELLO CHE VEDO \324 CHE TI HA INCATENATO ANZI CON LUCCHETTO", - "O.K., NON AVRAI UNA FONCINA?", - // 265 - "BENE BENE, NON PRENDERTELA COS\336, CI PENSER\220 IO", - "EH, BARISTA", - "COME VA LA PARTITA?", - "CHI?", - "MA NON VEDI CHE DRASCULA \324 QU\336?", - // 270 - "ANDIAMO A UCCIDERLO", - "SERVIMI UN DRINK..", - "NIENTE. HO DIMENTICATO COSA VOLEVO DIRTI", - "O\247MI\247SERVI\247UN\247DRINK\247O\247MI\247METTO\247A\247SUONARE\247IL\247PIANOFORTE", - "QUANTO MANCA PER LA FINE DELLA PARTITA?", - // 275 - "BUONA SERA", - "COME VA IGOR? VAI CON LA GOBBA? -HI,HI,HI,CHE BUONO!", - "CHE STAI FACENDO?", - "NO", - "ALLORA METTITI GLI OCCHIALI", - // 280 - "COSA \324 QUELLA DELLA ORGIA SOPRANNATURALE?", - "VA BENE, NON COTINUARE, MI FACCIO IDEA", - "NON POTREI DIRMI DOV'\324 DRASCULA?", - "DAIII, PER FAVORE", - "PER CHE NO?", - // 285 - "AH, MA DORME DI NOTTE?", - "BENE, ALLORA IN BOCCA IL LUPO CON I REDDITI", - "DEVO PROPRIO PARLARE CON LUI", - "EOOOO, SCHELETROOO!", - "OH DIO! UN MORTO CHE PARLA!", - // 290 - "RACCONTAMI. COME MAI SEI VENUTO QU\336?", - "E PER CHE DRASCULA VUOLE CREARE UN MOSTRO?", - "COME TI CHIAMI, AMICO SCHELETRO?", - "SENTI, NON VUOI QUALCOSA DA MANGIARE?", - "DEVI AVERE LO STOMACO VUOTO .- HI,HI,HI!", - // 295 - "LA VERIT\267 \324 CHE NON MI VA DI PARLARE ADESSO", - "VANFFAN ( BIP ) FIGLIO DI .......( BIIP ).. VAI A FARE....( BIIIP )", - "IO LA AMAVO DAVVERO. O.K., SONO D'ACCCORDO CHE NON ERA MOLTO INTELLIGENTE, MA NESSUNO \324 PERFETTO, NO?", - "ANZI, AVEVA UN CORPO DA PAURA", - "ORMAI NON SAR\343 PI\353 QUELLO DI PRIMA .MI RICHIUDER\343 IN UN MONASTERO, E LASCIER\343 LA MIA VITA PERDERE", - // 300 - "NIENTE POTR\267 FARMI USCIRE DI QUESTA MISERIA PERCHE...", - "DI CHI? DI CHI?", - "VOGLIO ESSERE PIRATA", - "VOGLIO ESSERE PROGRAMMATORE", - "RACCONTAMI QUALCOSA SU GARIBALDI", - // 305 - "CONTINUER\343 A GIOCARE E DIMENTICHER\343 CHE VI HO VISTI", - "MA CHI AVR\267 PENSATO QUESTA SCIOCHEZZA!", - "\324 UNA BORSA COME QUELLA DI MIA NONNA", - "MA CHE FIGO SONO!", - "PI\353 MI VEDO PI\353 MI PIACCIO", - // 310 - "E POI COME MI CHIUDO?", - "PRIMA DEVO APRIRMI, VERO?", - "ST\343 BENE DOVE SONO", - "MI HO GI\267 PRESSO", - "CIAO IO", - // 315 - "ME GLI INDOSSER\343 QUANDO SIA LA OCCASIONE OPORTUNA", - "NON VEDO NIENTE DI SPECIALE", - "\324 BENE DOV'\324", - "E PER CHE?", - "NON CE LA FACCIO", - // 320 - "CIAO TU", - "\324 IL SEPOLCRO DELLO ZIO PEPPINO", - "EOOOO, ZIO PEPPINOOOO!", - "NO.NON VOGLIO TAGLIARMI UN' ALTRA VOLTA", - "-EHEM,EHEM..!", - // 325 - "GNAMM, EMMM,!", - "-SI, COF, COF!", - "GUARDA, C'\324 UNA GOMMA QU\336 ATTACATA", - "\324 IL TELEFONINO CHE MI HANNO REGALATO A NATALE", - "COM'\324 ALTO", - // 330 - "ESCI AL BALCONE GIULIETTA!", - "TU SEI LA LUCE CHE ILLUMINA LA MIA VITA!", - "EH, PORTA, CHE C'\324?", - "EOOOO, SPENDITRICE DI TABACCO DI TRANSILVANIAAA", - "\324 UNA SPENDITRICE DI TABACCO", - // 335 - "HO UN'ALTRA MONETA DENTRO", - "NO. HO DECISSO SMETTERE DI FUMARE E DI BERE", - "DA OGGI SAR\343 SOLTANTO PER LE DONNE", - "QUESTO \324 UNA TRUFFA! NON \324 USCITO NULLA", - "ALLA FINE!", - // 340 - "CHE TI HO DETTO?, UN BAULE", - "CIAO BAULE, TI CHIAMI COME MIO CUGINO CHE SI CHIAMA RAUL..E", - "HO TROVATO LA BORSA DI B.J.", - "MIO DIO, NON MI RIFLETTO, SONO UN VAMPIRO!", - "...AH, NO, \324 UN DISEGNO", - // 345 - "SPECCHIO DELLE MIE BRAME: CHI \220 ILPI\351 BELLO DEL REAME?", - "NON VUOLE APRIRMI", - "MOLTO BENE. MI HO MESSO I TAPPI", - "\324 UN DIPLOMA DI CACCIA-VAMPIRI OMOLOGATO DALLA UNVERSIT\267 DI CAMBRIDGE", - "NO. MANCANO ANCORA GLI INGREDIENTI, NON MERITA LA PENA CHE SIA SVEGLIATO", - // 350 - "NON HO SOLDI", - "\324 UNA LAMPADA BRITANICA", - "BARISTA! AIUTAMI!", - "HA COMPARITO UN VAMPIRO ED HA PRESSO LA MIA FIDANZATA", - "MA NON MI AIUTER\267", - // 355 - "MORTA? CHE VUOLE DIRE?", - "- EHEM!", - "UN VAMPIRO HA SEQUESTRATO LA RAGAZZA DELLA 506!", - "DEVI AIUTARMI!", - "NON SAI SUONARE NESSUNA DI \"ELIO E LE STORIE TESSE\"", - // 360 - "COME TI SOPPORTI, SUONANDO SEMPRE LO STESSO?", - "ALLORA COME MI SENTI?", - "PRESTAMI I TAPPI", - "DAI, TE LI RESTITUISCO SUBITO", - "DAIIII...", - // 365 - "CIAO. DEVO UCCIDERE UN VAMPIRO", - "", - "COSA DICI? IN TRANSILVANO?", - "CHI \324 LO ZIO PEPPINO?", - "MA CHE SUCCEDE CON DRASCULA?", - // 370 - "CHI \324 VON BRAUN?", - "E PER CHE NON LO FA?", - "E DOVE POSSO TROVARE VON BRAUN?", - "GRAZIE E CIAO, SOGNI D'ORO", - "SAR\267 MEGLIO BUSSARE PRIMA", - // 375 - "\324 LEI IL PROFESSORE VON BRAUN?", - "E MI POTREBBE DIRE DOVE POSSO ...?", - "NON CREDO SIA IL NANNO GANIMEDI", - "-PROFESSORE!", - "AIUTAMI! LA VITA DEL MIO AMORE DIPENDE DI LEI!", - // 380 - "VA BENE, NON HO BISOGNO DEL SUO AIUTO", - "O.K. ME NE VADO", - "NON AVERE PAURA. INSIEME VINCEREMO DRASCULA", - "ALLORA PER CHE NON MI AIUTA?", - "IO CE LE HO", - // 385 - "SI CE LE HO", - "D'ACCORDO", - "...EHH...SI", - "VENGO A RIENTRARE A QUESTA CABINA", - "SONO PRONTO PER FARE LA PROVA", - // 390 - "VA BENE, VECCHIETO. SONO VENUTO PER IL MIO SOLDI", - "NO, NIENTE. ME NE GI\267 ANDAVO", - "SCUSA", - "TI \324 INTERESANTE QUESTO LIBRO? HA PARTITURE DI TCIAKOWSKY", - "COME POSSO UCCIDERE UN VAMPIRO?", - // 395 - "NON TI HANNO DETTO CHE NON \324 BUONO DORMIRE IN CATTIVA POSIZIONE?", - "\324 QUELLO CHE SEMPRE DICE MIA MADRE", - "PER CHE DRASCULA NON FU RIUSCITO A UCCIDERTI?", - "E COSA FU?", - "BENISSIMO! HA LEI LA POZIONE DI IMMUNIT\267...!", - // 400 - "ALLORA", - "MOLTO BENE", - "MI PUO RIPETERE COSA BISOGNO PER QUELLA POZIONE?", - "VADO VIA VELOCE A TROVARLO", - "SENTA, COSA \324 SUCCESO CON IL PIANISTA?", - // 405 - "HO GI\267 TUTTI GLI INGREDIENTI DI QUESTA POZIONE", - "UNA DOMANDA: COSA \324 QUELLA DI ALUCSARD ETEREUM?", - "DICA, DICA..", - "E DOV'\324 QUELLA GROTTA?", - "CHE C'\324? NON AVETE TRIBUNALE?", - // 410 - "...MA ...E SE TROVO PI\353 VAMPIRI?", - "\324 UN VAMPIRO CHE NON MI FA PASSARE", - "SI ASSOMIGLIA A YODA, MA PI\353 ALTO", - "EH, YODA. SE MI FAI PASSARE TI DAR\343 CENTO LIRE", - "BENE, O.K., NON POSSO DIRTI NULLA", - // 415 - "CIAO VAMPIRO, BELLA NOTTE, VERO?", - "TI HANNO DETTO QUALCHE VOLTA CHE TI ASSOMIGLII A YODA?", - "SEI UN VAMPIRO O UN DIPINTO ALL'OLEO?", - "MEGLIO NON DIRTI NIENTE, PERCHE POI TI ARRABBII", - "\324 CHIUSA CON LA CHIAVE", - // 420 - "SE PROVO, LA GAZZA MI POTREI CAVARE UN OCCHIO", - "\324 CHIUSA! DIO MIO, CHE PAURA!", - "LE CERNIERE SONO OSSIDATE", - "LA DENTRO C'\324 SOLTANTO UN BARATOLO DI FARINA", - "QUESTO HA TOLTO L'OSSIDO", - // 425 - "HO TROVATO UNA TALEA DI LEGNO DI PINO", - "PRENDER\343 QUESTO CH'\220 PI\353 GROSSO", - "BENE, CREDO DI POTERE TOGLIERMI QUESTO STUPIDO COSTUME", - "\"CORRIDOIO AI TORRIONI CHIUSO PER LAVORI IN CORSO. PER FAVORE, PER LA PORTA PRINCIPALE. SCUSATE PER IL DISTURBO\"", - "..\324 PALLIDO, HA DENTI CANINI, HA CIUFFO E UTILIZA MANTELLO...- SICURO CH'\324 DRASCULA!", - // 430 - "B.J., B.J., STAI BENE?", - "SI, SO CH'\324 SCEMA MA MI SENTO SOLISSIMO", - "NON AVRAI UNA CHIAVE PER CASO, VERO?", - "- E SICURO CHE NON HAI UN GRIMALDELLO?", - "DAMI UNA FONCINA. VADO A FARE COME MCGYVER", - // 435 - "NON MUOVERTI, TORNO SUBITO", - "- MANAGIA!- SI \324 ROTTA!", - "OLE, ANCHE MI HO FATTO LA BARBA!", - "SI, CARO?", - "NON ARRIVA", - // 440 - "IL PIANISTA NON C'\324", - "UN DRINK TRANSILVANO", - "ANCORA NON HO CAMERA", - "SEMBRA CHE FU RISUCCHIATO NELLO SCARICO DELLA VASCA E HA DECISO APRIRE UN BAR", - "\324 UBRIACO PERSO", - // 445 - "QUESTI CAPELLI.... CREDO CHE MI FANNO RICORDARE A QUALCUNO", - "\324 UNO SCHELETRO OSSUTO", - "GUARDA! MIGUEL BOSE!", - "\324 ADDORMENTATO. SAREBBE UN PECCATO SVEGLIARGLI", - "\324 PI\353 BRUTTO CHE BEGNINI", - // 450 - "UN FERETRO DI LEGNO DI PINO", - "MI TAGLIER\267 A FETTINI, COME UN SALSICCIOTTO", - "NON MI PIACCIONO I PENDOLI. PREFERISCO LE CARCIOFE", - "LE MIE MANI SONO LEGATE. NON CE LA FAR\343", - "\324 OVVIO CH'\324 UNA PORTA SEGRETA", - // 455 - "MI IGNORANO", - "-DAIII!", - "NEL PRIMO COPIONE SI MUOVEVA, MA IL VIDEO-GIOCO \220 USCITO DAL BUDGET E NON HANNO POTUTO PAGARMI UNA PALESTRA E NON SONO GONFFIATO", - "SEMBRA CH'\324 UN P\343 ALLENTATA DAL MURO", - "NON CREDO CHE MI SIA UTILE. \324 TROPPO UMIDA PER ACCENDERLA.", - // 460 - "AL LATO OVEST? -N\324 PAZZO, CHI SA CHE CI SAR\267 LI!", - "HA DEI BELLI DISEGNI TRANSILVANI", - "", - "CHE PENA CHE NON CI SIA DENTRO UN AGNELLINO ARRROSTANDOSI", - "LA ULTIMA VOLTA CHE APRII UN FORNO, LA CASA SALT\220 PER ARIA", - // 465 - "LO SCUDO DELLA SCUADRA DI CALCIO DI TRANSILVANIA", - "E PER CHE? PER INDOSARLA SULLA TESTA?", - "NON CREDO CHE I CASSETI SIANO DI QUELLI CHE SI APPRONO", - "NON VOGLIO SAPERE IL CIBO CHE CI SAR\267 LA DENTRO!", - "HO L'IMPRESSIONE CH'\324 IMPRESSIONISTA", - // 470 - "LA NOTTE SI IMPADRONA DI TUTTI QUANTI... CHE PAURA?", - "\324 OSTACOLATA", - "\324 IL RE, NON LO AVEVI IMAGINATO?", - "NO, NE UNO A CASA, ANZI GLI DO DA MANGIARE", - "UNA SCAFFALATURA CON LIBRI ED ALTRE COSE", - // 475 - "E A CHI CHIAMO A QUESTE ORE?", - "\"COME FARE LA DECLARAZIONE DI REDDITI\"- CHE INTERESSANTE!", - "NE HO UNO A CASA, CREDO CH'\324 UN BEST-SELLER MONDIALE", - "UNA CHIAVE COMPLETAMENTE NORMALE", - "MI SA QHE QUESTA NON \220 DI QU\336", - // 480 - "EH, SONO PATATINE FRITE A FORMA DI DENTI CANINI ! MI AFASCINA", - "NON CREDO CHE SIA IL MOMENTO MIGLIORE PER METTERSI A MANGIARE DOLCI, L'ESSERE PI\353 CATTIVO DEL MONDO ha nelle sue mani la mia fidanzzata", - "COME MI ST\343 DIVERTENDO UCCIDENDO VAMPIRI CON QUESTO!", - "VEDIAMO SE APPARISCE UN ALTRO PRESTO", - "NO, DEVE ESSERE CON UN VAMPIRO SPORCO E SCHIFFOSO COME QUELLO DI PRIMA", - // 485 - "\324 L'AUTENTICA PARRUCA CHE UTILIZZ\343 ELVIS QUANDO DIVENT\343 PELATO", - "\220 FARINA MA NON POSSO DIRE MARCHE", - "FORSE IN UN ALTRO MOMENTO. OK?", - "\220 UNA ASCIA BUONISSIMA, CHE PENA CHE NON CI SIA QU\336 VICINO NESSUNA TESTA DI VAMPIRO", - "NO. NEL FONDO SONO UNA BRAVISSIMA PERSONA", - // 490 - "\324 IL DEODORANTE DELLA TACHER -HI,HI,HI!", - "\324 UN MANTELLO ABBASTANZA CARINO", - "", - "COME TUTTI I RAMI DI TUTTI GLI ALBERI DEL MONDO, CIO\324 MICA SPEZIALE", - "OH, INCREDIBILE!- UNA CORDA IN UNA AVVENTURA GRAFICA!", - // 495 - "MI DOMANDO A CHE SERVE...", - "UNA CORDA LEGATA A UNA BRANCA, O UNA BRANCA LEGATA A UNA CORDA, DIPENDE COME SI GUARDI", - "SEMBRA CHE QUESTA GAZZA HA CATIVE INTENZIONI", - "DAI.., NON LA DICO NULLA CHE POI SI ARRABBIA", - "SEMBRA ESSERE MORTA, MA NON \220 VERO - EH?", - // 500 - "NESSUN ANIMALE \220 STATO MALTRATO DURANTE LE RIPRESE DI QUESTO VIDEO-GIOCO", -}, -}; - -const char *_textd[][84] = { -{ - // 0 - "", - "HEY IGOR, HOW IS EVERYTHING GOING?", - "IT'S ALWAYS THE SAME STORY EVERYTIME THERE'S A GOOD GAME ON THE SATELLITE! ANYWAY, WE'LL GO WATCH IT IN THE BAR, AS USUAL", - "IGOR LISTEN CAREFULLY MAN, WE ARE GOING TO START WITH PHASE NUMBER ONE OF MY PLAN TO CONQUER THE WORLD", - "FIRST WE'LL CAPTURE SOME LIGHTNING THEN WE'LL DEMAGNETIZE IT WITH OUR INDIFIBULATOR. THE ELECTRICITY WILL FLOW THROUGH TO MY MONSTER AND HE WILL LIVE!", - // 5 - "IF EVERYTHING WORKS OUT ALL RIGHT, THIS WILL BE THE BEGINNING OF A GREAT ARMY THAT WILL CONQUER THE WORLD FOR ME. HA, HA", - "THE MONSTERS WILL DESTROY ALL THE ARMY'S WEAPONS IN THE WORLD, MEANWHILE, WE'LL BE SAFE IN THE PIECES OF LAND I PLAN TO BUY IN GIBRALTAR", - "WE'LL SET UP A COUP. GOVERNMENTS ALL OVER THE WORLD WILL BE UNCOVERED AND THEIR COUNTRIES WILL SURRENDER TO ME!", - "I'LL BECOME THE FIRST BAD GUY IN HISTORY TO MAKE IT ! HA, HA!", - "I'M NOT TALKING TO YOU, IDIOT! I'M JUST GIVING YOU THE PLOT. ALL RIGHT, EVERYTHING READY?", - // 10 - "THE TIME HAS COME! TURN ON THE ALKALINE BATTERIES' SWITCH", - "DAMN IT! WHAT WENT WRONG?", - "ARE YOU SURE YOU CHECKED IT ALL AND THERE WAS NOTHING MISSING? LATELY YOU'VE BEEN MESSING AROUND WITH THAT STUFF ABOUT TAXES AND I DON'T KNOW MAN...", - "YOU STUPID THING! YOU FORGOT TO CONNECT THE INDIFIBULATOR. THE SCREWS HAVE MAGNETIZED AND HIS BRAIN HAS PROBABLY BURNT", - "YOU ARE DEAD, YOU ARE DEAD...WAIT TILL I GET YOU!", - // 15 - "SHUT UP! I'LL GET ANOTHER BRAIN TOMORROW AND THEN WE WILL REPEAT THE EXPERIMENT", - "THIS TIME I'LL GET A WOMAN'S BRAIN. SHINY AND NOT USED YET...HA, HA, HA, GOOD ONE!", - "SO WHAT? I'M THE BAD GUY, RIGHT? SO I CAN BE AS FULL OF MACHISMO AS I WANT, ALL RIGHT? AND IF YOU SAY ANOTHER THING I'LL TURN YOUR HUMP BACK TO FRONT!", - "HA, HA, HA. YOU FELL FOR IT!! NOW YOU ARE GOING TO PAY FOR DARING TO FIGHT ME! IGOR, TAKE HIM TO THE PENDULUM OF DEATH!", - "AND SO, TELL ME, YOU STUPID HUMAN. HOW COME YOU WANT TO DESTROY ME?", - // 20 - "THAT'S BEAUTIFUL!. IF IT WASN'T BECAUSE IT MAKES ME LAUGH, I WOULD CRY", - "I PLAN TO USE YOUR GIRLFRIEND'S BRAIN, TO HELP ME CONQUER THE WORLD", - "YES, SURE! I'LL TAKE IT FROM HER AND GIVE IT TO MY FRUSKYNSTEIN. THE WORLD WILL BE MINE WITH IT, HA, HA", - "WHAT!? YOU'RE DEAD, MAN! I'M GOING TO...YOU REALLY GOT ME ANGRY MAN...COME ON, PREPARE TO DIE!", - "HA, HA, HA. NOT EVEN IN YOUR WILDEST DREAMS!", - // 25 - "YES, ISN'T IT? HA, HA", - "ALL RIGHT, ALL RIGHT. BUT DO IT QUICKLY, OK?", - "PUT THAT CIGARETTE OUT NOW! I CAN'T STAND YOU ANYMORE!", - "SO, DOES THAT BREW HAVE IMMUNISATING EFFECTS FOR VAMPIRES??", - "WELL, WE'LL SEE ABOUT THAT", - // 30 - "OK, LET'S SEE. IGOR, BRING ME THE CD \"SCRATCHING YOUR NAILS ALL OVER THE BLACKBOARD\"", - "NO WAY. THE GIRL STAYS WITH ME. YOU'RE STAYING THERE UNTIL THE PENDULUM CUTS YOU INTO THIN SLICES. HA, HA, HA", - "MAN I'M SO BAD... COME ON IGOR, LET'S MAKE THE BREW AND CONQUER THE WORLD", - "WHATS HAPPENED NOW?", - "YES, WHAT?...OH, DAMNED, THE GAME!", - // 35 - "I FORGOT ABOUT THAT. GET THE GIRL AND LET'S GO AND WATCH IT. WE CAN CONQUER THE WORLD LATER", - "THANKS MAN, I WAS THIRSTY", - "OH, THE CRUCIFIX!!...THE CRUCIFIX...!", - "I DIDN'T NOTICE THAT BEAUTIFUL CRUCIFIX!", - "LEAVE ME ALONE!, I'M WATCHING THE GAME", - // 40 - "", - "", - "", - "", - "", - // 45 - "", - "", - "", - "", - "", - // 50 - "", - "", - "", - "", - "", - // 55 - "", - "HI BLIND MAN. HOW IT'S GOING?", - "HOW DO YOU KNOW I'M A FOREIGNER?", - "YOU LOOK BLIND. BECAUSE YOU'RE WEARING DARK GLASSES LIKE STEVIE WONDER", - "LOOK, I'M SORRY, I DIDN'T KNOW YOU COULD SEE", - // 60 - "BUT YOU JUST TOLD ME YOU WEREN'T BLIND", - "BUT IF YOU CAN'T SEE", - "OOOOKAY. SORRY. IN THAT CASE, HI THERE SIGHTLESS PERSON", - "I'M JOHN HACKER. YOU MUST BE ONE OF THOSE CHARACTERS WHO WILL HELP ME OUT IN EXCHANGE FOR AN OBJECT. AREN'T YOU? EH? AREN'T YOU?", - "UUUUM, EXCUSE ME FOR ASKING BLIN... SIGHTLESS PERSON! BUT WHAT SORT OF JOB IS THAT, TO GIVE SICKLES IN EXCHANGE FOR MONEY WHILE YOU PLAY THE ACCORDION?", - // 65 - "AH YES, I SUPPOSE THAT'S TRUE. GOODBYE SIGHTLESS PERSON... BLIND MAN", - "HERE IS THE LARGE AMOUNT OF MONEY YOU ASKED ME FOR", - "I HOPE SO", - "HI THERE FOREIGNER", - "AND HOW DO YOU KNOW I'M BLIND?", - // 70 - "AND I'M NOT KIDDING YOU BUT YOURS LOOK LIKE WOODY ALLEN'S", - "NO, I CAN'T SEE", - "AND I'M NOT", - "OH OF COURSE. JUST BECAUSE I CAN'T SEE, YOU ACCUSE ME OF BEING BLIND", - "HI THERE FOREIGNER! WHAT ARE YOU DOING IN TRANSILVANIA?", - // 75 - "THAT'S RIGHT, FOREIGNER. IN EXCHANGE FOR A LARGE SUM OF MONEY I'LL GIVE YOU A SICKLE YOU NEVER KNOW WHEN YOU MIGHT NEED IT", - "SHHHH, I'M A SICKLES TRADER, THAT'S WHY I HAVE TO HIDE", - "BECAUSE YOU TOLD ME BEFORE, DIDN'T YOU?", - "THANKS FOREIGNER. HERE'S THE SICKLE IN EXCHANGE. YOU'LL FIND IT REALLY USEFUL LATER ON, HONESTLY.", - "", - // 80 - "", - "", - "NOTHING, NOTHING AT ALL", - "BLA, BLA, BLA." -}, -{ - // 0 - "", - "\250COMO VA TODO, IGOR?", - "\255SIEMPRE QUE HAY UN BUEN PARTIDO EN LA PARABOLICA PASA LO MISMO! EN FIN, IREMOS A VERLO AL BAR COMO DE COSTUMBRE", - "AHORA IGOR, ATIENDE. VAMOS A REALIZAR LA FASE 1 DE MI PLAN PARA CONQUISTAR EL MUNDO", - "PRIMERO CAPTAREMOS UNO DE LOS RAYOS DE LA TORMENTA Y LO DESMAGNETIZAREMOS CON NUESTRO INDIFIBULADOR. LA ELECTRICIDAD PASARA A MI MONSTRUO \255Y LE DARA VIDA! ", - // 5 - "SI TODO SALE BIEN ESTE NO SERA MAS QUE EL PRIMERO DE UN INMENSO EJERCITO QUE CONQUISTARA EL MUNDO PARA MI, JA, JA, JA", - "LOS MONSTRUOS DESTRUIRAN TODAS LAS ARMAS DE TODOS LOS EJERCITOS DEL MUNDO, MIENTRAS NOSOTROS NOS REFUGIAMOS EN UNOS TERRENOS QUE HE COMPRADO EN GIBRALTAR", - "ENTONCES, DAREMOS UN GOLPE DE ESTADO, LOS GOBIERNOS DEL MUNDO NO TENDRAN CON QUE PROTEGERSE, Y PONDRAN SUS PAISES A MIS PIES", - "\255SERE EL PRIMER MALO EN LA HISTORIA QUE LO CONSIGA! \255JUA, JUA, JUA!", - "\255A TI NADA, IDIOTA! ESTOY EXPONIENDO LA TRAMA. BIEN \250ESTA TODO LISTO?", - // 10 - "\255LLEGO EL MOMENTO, ENTONCES! \255DALE AL INTERRUPTOR DE LAS PILAS ALCALINAS! ", - "\255MALDITA SEA! \250QUE ES LO QUE HA PODIDO FALLAR?", - "\250SEGURO QUE LO REVISASTE BIEN Y NO FALTABA NADA? ULTIMAMENTE ESTAS CON ESO DE LA RENTA QUE NO VES UN PIJO A DOS METROS", - "\255IDIOTA, NO HABIAS CONECTADO EL INDIFIBULADOR! LOS TORNILLOS SE HABRAN MAGNETIZADO Y SE LE HABRA QUEMADO EL CEREBRO", - "ESTAS MUERTO, ESTAS MUERTO, COMO TE COJA...", - // 15 - "\255A CALLAR! MA\245ANA IRE A POR OTRO CEREBRO Y REPETIREMOS EL EXPERIMENTO ", - "NO. ESTA VEZ TRAERE UNO DE MUJER, PARA QUE ESTE NUEVECITO Y SIN ESTRENAR. JA, JA, JA, QUE MALISIMA DE CHISTA", - "\250Y QUE? YO SOY EL MALO Y SOY TODO LO MACHISTA QUE QUIERA \250ENTENDIDO? Y COMO ME VUELVAS A RECHISTAR TE TRAGAS LA CHEPA ", - "JA, JA, JA. OTRO QUE HA CAIDO. AHORA VAS A PAGAR TU OSADIA DE QUERER ACABAR CONMIGO. \255IGOR, AL PENDULO DE LA MUERTE!", - "DIME, HUMANO ESTUPIDO, \250COMO ES QUE TE HA DADO POR QUERER DESTRUIRME? ", - // 20 - "\255QUE BONITO!, ME PONDRIA A LLORAR SI NO FUERA PORQUE ME HACE GRACIA", - "A TU NOVIA LA NECESITO PARA QUE ME AYUDE CON SU CEREBRO A CONQUISTAR EL MUNDO", - "\255SI, JA! SE LO QUITARE Y SE LO PONDRE A MI FRUSKYNSTEIN, Y CON EL DOMINARE EL MUNDO, JA, JA, JA", - "\255\250QUE?! \255ESTAS MUERTO, ESTAS MUERTO! TE VOY A... ME HAS TOCADO LAS NARICES, VAMOS. \255PREPARATE A SER MATADO!", - "JA, JA, JA. QUE TE CREES TU ESO", - // 25 - "SI, \250VERDAD? JA, JA, JA ", - "AH, ESTA BIEN, PUEDES FUMARTE EL ULTIMO CIGARRILLO, PERO DEPRISITA", - "APAGA YA ESE CIGARRILLO, ME TIENES HARTO YA", - "Y DIME, \250ESA POCION TIENE EL EFECTO CONTRARIO?", - "ESO YA LO VEREMOS...", - // 30 - "BUENO, A VER SI ES VERDAD. IGOR, TRAE EL COMPACT DISC DE U\245AS ARRASCANDO UNA PIZARRA", - "ESO NI SO\245ARLO. LA CHICA SE QUEDA CONMIGO, Y TU TE QUEDAS AHI HASTA QUE EL PENDULO TE CORTE EL RODAJITAS. JA, JA, JA", - "PERO QUE MALO QUE SOY, VAMOS IGOR, VAMOS A PREPARAR LA POCION Y CONQUISTAR EL MUNDO", - "\250QUE PASA AHORA?", - "SI, \250QUE PASA?... \255ANDA, EL PARTIDO!", - // 35 - "SE ME HABIA OLVIDADO. COGE A LA CHICA Y VAMONOS A VERLE. YA CONQUISTARE EL MUNDO DESPUES", - "GRACIAS MACHO, TENIA SED", - "\255ArgH! \255ESE CRUCIFIJO! \255ESE CRUCIFIJO!...", - "QUE BONITO ES ESE CRUCIFIJO, NO ME HABIA YO FIJADO", - "DEJAME, QUE ESTOY VIENDO EL FUTBOL", - // 40 - "", - "", - "", - "", - "", - // 45 - "", - "", - "", - "", - "", - // 50 - "", - "", - "", - "", - "", - // 55 - "", - "Hola ciego. \250Que tal?", - "\250Como sabes que soy extranjero?", - "Pareces un ciego. Tienes gafas como serafin zubiri, hablas mirando al frente como Stevie Wonder...", - "Bueno, perdona. No sabia que vieses.", - // 60 - "\250Pero no me acabas de decir que no eres ciego?", - "\255Pero si no ves!", - "Vaaaale. Perdona. En ese caso: Hola invidente.", - "Soy John Hacker, y estoy jugando al Drascula. Tu debes ser el tipico personaje que me ayudara a cambio de un objeto. \250A que si? \250Eh? \250A que si?", - "Em... Perdona que te pregunte cieg..\255Invidente!. Pero... \250Que clase de profesion es la tuya, de dar hoces a cambio de dinero, mientras tocas el acordeon?", - // 65 - "Ah, si. Es verdad. Adios invidente...(ciego)", - "Ahi tienes la cuantiosa cantidad de dinero que me pediste.", - "Mas te vale.", - "Hola extranjero.", - "Y tu... \250Como sabes que soy ciego?", - // 70 - "Y tu hablas como el hijo de Bill Cosby y no me meto contigo.", - "No, si no veo.", - "Y no lo soy.", - "\255Oh, claro! Como no veo se me tacha de ciego \250no?", - "\255Hola Extranjero! y \250que haces en Transilvania?", - // 75 - "Correcto extranjero. A cambio de una cuantiosa suma de dinero, te dare una hoz, para cuando te haga falta.", - "Shhhhhh. Soy traficante de hoces, tengo que disimular.", - "Porque me lo has dicho antes \250no?", - "Gracias extranjero. Aqui tienes tu hoz a cambio. Un objeto que te sera muy util algo mas adelante... de verdad.", - "", - // 80 - "", - "", - "No, nada", - "\244a, \244a, \244a. que bueno, que bueno." -}, -{ - // 0 - "", - "WIE GEHTS, WIE STEHTS, IGOR ?", - "IMMER WENN auf kabel EIN GUTES SPIEL KOMMT, PASSIERT DAS GLEICHE. NAJA, DANN GUCKEN WIR ES UNS EBEN WIE IMMER IN DER KNEIPE AN", - "JETZT PASS AUF, IGOR. WIR WERDEN JETZT PHASE 1 MEINES WELTEROBERUNGSPLANS STARTEN.", - "Pah, einige GEWITTERBLITZE, die wir MIT dem VIBROXATOR ENTMAGNETISIEREN. und der strom wird meinem MONSTERCHEN leben einhauchen.", - // 5 - "WENN ALLES KLAPPT WIRD ER DER ERSTE SOLDAT EINER RIESIGEN ARMEE SEIN, DIE DIE WELT FueR MICH EROBERN WIRD, HARHARHAR", - "DIE MONSTER WERDEN ALLE WAFFEN IN DER GANZEN WELT VERNICHTEN WaeHREND WIR UNS AUF UNSERE LaeNDEREIEN ZURueCKZIEHEN, DIE ICH UNS AUF HELGOLAND GEKAUFT HABE.", - "DANN WERDEN WIR EINEN STAATSSTREICH MACHEN UND DIE REGIERUNGEN DIESER WELT WERDEN AUFGEBEN UND SICH MIR ZU FueSSEN WERFEN", - "ICH WERDE DER ERSTE BoeSE IN DER GESCHICHTE SEIN, DER DAS SCHAFFT, HUAHUAHUA !", - "GAR NICHTS, IDIOT ! ICH ERZaeHLE DIE HANDLUNG .O.K . IST ALLES FERTIG ?", - // 10 - "ES IST ALSO SOWEIT !DRueCK AUF DEN SCHALTER MIT DEN ALKALI-BATTERIEN !", - "VERFLIXT NOCHMAL ! WAS IST DA SCHIEFGELAUFEN ?", - "BIST DU SICHER, DASS DU ALLES GECHECKT HAST ? SEIT NEUESTEM DENKST DU NUR NOCH AN DEINE EINKOMMENSERKLaeRUNG UND KRIEGST NICHTS MEHR MIT", - "DU IDIOT !DU HAST DEN VIBROXITOR NICHT EINGESCHALTET !JETZT SIND DIE SCHRAUBEN MAGNETISIERT UND IHM WIRD WOHL DAS GEHIRN VERBRANNT SEIN", - "DU BIST EIN TOTER MANN, NA WARTE, WENN ICH DICH KRIEGE...", - // 15 - "HALT DIE KLAPPE !MORGEN HOLE ICH EIN NEUES HIRN UND WIR WIEDERHOLEN DAS EXPERIMENT", - "NEIN, DIESMAL BESORG ICH EIN FRAUENHIRN, DASS NOCH GANZ FRISCH UND UNBENUTZT IST, HAR,HAR,HAR, SUPERJOKE !", - "NA UND ? ICH BIN DER BoeSE UND DER SUPER-MACHO ODER WAS ? UND WENN DU MIR NOCHMAL WIDERSPRICHST KANNST DU DEINEN BUCKEL SCHLUCKEN", - "HARHARHAR,SCHON WIEDER EINER. DU WARST SO DREIST, MICH UMBRINGEN ZU WOLLEN. DAS WIRST DU JETZT BueSSEN. IGOR! ZUM TODESPENDEL MIT IHM !", - "SAG MAL DU DUMMES MENSCHLEIN, WIESO WOLLTEST DU MICH ZERSToeREN ?", - // 20 - "ACH WIE SueSS !ICH KoeNNTE GLATT ANFANGEN ZU HEULEN, WENN ES NICHT SO LUSTIG WaeRE", - "DEINE FREUNDIN BRAUCHE ICH NOCH, DAMIT SIE MIR MIT IHREM HIRN DABEI HILFT, DIE WELT ZU EROBERN", - "JA, HA !ICH WERDE ES RAUSREISSEN UND ES FRUNKSFENSTEIN GEBEN UND DANN WERDE ICH DIE WELT EROBERN,HARHARHAR", - "WAS ? !DU BIST EIN TOTER MANN! ICH WERDE DICH... DU HAST MICH VERaePPELT,GANZ KLAR . MACH DEIN TESTAMENT!", - "HARHARHAR, GLAUB DU DAS MAL ", - // 25 - "JA, WIRKLICH ? HARHARHAR", - "JA, SCHON GUT, RAUCH DIR NOCH EINE LETZTE ZIGARETTE, ABER RUCKZUCK", - "MACH MAL DIE ZIGARETTE AUS. MIR IST SCHON SCHLECHT", - "UND SAG MAL, DIESE MISCHUNG HAT DIE GEGENWIRKUNG ?", - "DAS WERDEN WIR JA MAL SEHEN...", - // 30 - "NA, MAL GUCKEN OB DAS STIMMT, IGOR., BRING MAL DIE CD MIT DEN DEM SOUND VON kratzenden FINGERNaeGELN AUF EINER SCHULTAFEL", - "NICHT IM TRAUM. DAS MaeDCHEN BLEIBT BEI MIR UND DU BLEIBST WO DU BIST, BIS DICH DAS PENDEL IN LECKERE SCHEIBCHEN SCHNEIDET, HARHAR", - "WIE BoeSE ICH DOCH BIN. KOMM IGOR, WIR BEREITEN DIE MISCHUNG ZU UND EROBERN DANN DIE WELT", - "WAS IST DENN JETZT WIEDER LOS ?", - "JA, WAS IST LOS ?...VERDAMMT, DAS SPIEL !", - // 35 - "DAS HAB ICH GLATT VERGESSEN. NIMM DAS MaeDCHEN UND LASS UNS DAS SPIEL ANGUCKEN GEHEN . DIE WELT EROBERN WIR DANACH.", - "DANKE, ALTER, ICH HATTE DURST", - "ARGHH! DAS KRUZIFIX DA ! DAS KRUZIFIX !", - "WIE SCHoeN DAS KRUZIFIX DA IST, HAB ICH GAR NICHT BEMERKT", - "LASS MICH, ICH GUCK DOCH GERADE FUSSBALL", - // 40 - "", - "", - "", - "", - "", - // 45 - "", - "", - "", - "", - "", - // 50 - "", - "", - "", - "", - "", - // 55 - "", - "Hallo Blinder. Wie gehts?", - "Woher weisst Du, dass ich nicht von hier bin ?", - "Du siehst wie ein Blinder aus . Du guckst beim Sprechen immer gerade aus, und dann diese Stevie-Wonder-Brille....", - "O.k,entschuldige. Ich dachte, du kannst nichts sehen", - // 60 - "Aber hast Du mir nicht gerade gesagt, dass Du NICHT blind bist?", - "Ich denke, Du siehst nichts ?", - "Okaaay,okaay! Tut mir leid. Also wenn das so ist: Sehkranker ", - "Ich bin Heinz Hacker und spiele Drascula . Du bist bestimmt derjenige, der mir hilft und dafuer irgendwas haben will. Stimmts? Hae? Hab ich recht!?", - "aeh....Entschuldige die Frage, Blind-Sehkranker!Aber...Was hast Du fuer einen komischen Beruf, dass Du Sicheln verkaufst und dabei Akkordeon spielst!", - // 65 - "Ach, klar, stimmt. Auf Wiedersehen Sehkranker...(Blinder)", - "Hier hast Du den Wahnsinnsbatzen Geld, um den Du mich gebeten hast", - "Das ist auch besser so!", - "Hallo Fremder!", - "Und Du...Woher willst Du wissen, dass ich blind bin?", - // 70 - "Und Du bist der Sohn von Bill Cosby und ich werde mich nicht mit Dir anlegen", - "Nein, ich seh doch nichts!", - "Und ich bin es nicht", - "Na super! Nur weil ich nichts sehe bin ich direkt ein Blinder, oder was?", - "Hallo Fremder! Und was machst Du in Transylvanien?", - // 75 - "Richtig, Fremder. Gegen einen Wahnsinnsbatzen Geld bekommst Du von mir eine Sichel damit Du eine hast, wenn Du eine brauchst.", - "Psssssst. Ich bin Sichel-Dealer, ich muss unentdeckt bleiben ", - "Warum hast Du mir das nicht vorher gesagt ?", - "Danke, Fremder. Hier hast du dafuer Deine Sichel. Sie wird Dir nachher noch nuetzlich sein...glaub mir !", - "", - // 80 - "", - "", - "No, nada", - "bla, bla, bla." -}, -{ - // 0 - "", - "COMMENT VA TOUT, IGOR?", - "C'EST TOUJOURS LA M\322ME CHOSE QUAND IL Y A UN BON MATCH \267 LA PARABOLIQUE! ENFIN, ALLONS LE VOIR AU BAR, COMME D'HABITUDE", - "MAINTENANT, COUTE IGOR. NOUS ALLONS RALISER LA PHASE 1 DE MON PLAN POUR CONQURIR LE MONDE", - "D'ABORD, ON SAISIRA L'UNE DES FOUDRES DE L'ORAGE ET ON LA DMAGNTISERAIT AVEC l'INDIFUBULATEUR. LA COURANTE PASSERA DANS MON MONSTRE ET LUI DONNERA LA VIE!", - // 5 - "SI TOUT VA BIEN CELUI-L\267 NE SERA QUE LE PREMIER D'UNE IMMENSE ARME QUE CONQURRA LE MONDE POUR MOI, HA! HA! HA! ", - "LES MONSTRES VONT ANANTIR TOUTES LES ARMES DE TOUTES LES ARMES DU MONDE, TANDIS QUE NOUS NOUS RFUGIONS DANS LES TERRAINS QUE J'AI ACHET \267 GIBRALTAR", - "ALORS, ON DONNERA UN COUP D'TAT. LES GOUVERNEMENTS DU MONDE N'AURONT PAS DE PROTECTION ET SES PAYS SERONT \267 MES PIEDS", - "JE SERAI LE PREMIER MALIN DE L'HISTOIRE \267 Y AVOIR RUSSI! -HOUA! HOUA! HOUA!", - "POUR TOI RIEN, IDIOT! JE PRSENTE LA TRAME. BIEN, TOUT EST PR\322T? ", - // 10 - "LE MOMENT EST ARRIV\220, ALORS! -APPUIE DONC SUR L'INTERRUPTEUR DES BATTERIES ALCALINES! ", - "H\220LAS! QU'EST-CE QUE N'A PAS MARCH\220?", - "C'EST S\352R QUE TU L'AS BIEN R\220VIS\220 ET IL NE MANQUAIT RIEN? DERNI\324REMENT AVEC CETTE HISTOIRE DE LA RENTE TU N'Y VOIS GOUTTE", - "IDIOT! TU N'AVAIS PAS CONNECT\220 L'INFIBULATEUR! LES VIS SE SERONT MAGN\220TIS\220ES ET SA CERVELLE AURA BR\352L\220E", - "TU ES MORT, TU ES MORT, SI JE T'ATTRAPE...", - // 15 - "TAIS-TOI! DEMAIN J'AURAI UNE AUTRE CERVELLE ET ON FERA L'ESSAI \267 NOUVEAU", - "NON, CETTE FOIS J'APPORTERAI UNE DE FEMME POUR QU'ELLE SOIT TOUTE NEUVE ET DE PREMI\324RE MAIN. HA! HA! HA! QUE MALIN DE XISTE", - "ET QUOI? JE SUIS LE MALIN ET TOUT LE SEXISTE QUE JE D\220SIRE, C'EST ENTENDU? SI TU ME R\220PLIQUES ENCORE JE TE FAIS ENGLOUTIR TA BOSSE", - "HA! HA! HA!. UN AUTRE QUI S'EST LAISS\220 PRENDRE. MAINTENANT TU PAIERAS CHER TON AUDACE DE VOULOIR EN FINIR AVEC MOI. -IGOR, AU PENDULE DE LA MORT!", - "DIS-MOI, HUMAIN STUPIDE, POURQUOI TU AS PENS\220 ME D\220TRUIRE? ", - // 20 - "QUE C'EST BEAU! JE SANGLOTERAIS SI CE N'ETAIT PAS DR\342LE", - "J'AI BESOIN DE TA FIANC\220E POUR QU'ELLE M'AIDE \267 CONQU\220RIR LE MONDE AVEC SA CERVELLE", - "OUI, HA! JE LA LUI ARRACHERAI ET L'INSTALLERAI SUR MON FRUSKYNSTEIN, ET AVEC LUI JE VAIS MA\327TRISER LE MONDE, HA! HA! HA!", - "QUOI?! -TU ES MORT, TU ES MORT! JE VAIS TE... TU M'AS CASS\220 LE NEZ, ALLONS, -APPR\322TE-TOI \267 \322TRE TU\220!", - "HA! HA! HA! C'EST-CE QUE TU CROIS", - // 25 - "OUI, N'EST-CE PAS? HA! HA! HA!", - "AH, C'EST BIEN! TU PEUX FUMER LA DERNI\324RE CIGARETTE, MAIS D\220P\322CHE-TOI!", - "\220TEINS D\220J\267 CETTE CIGARETTE, J'EN A RAS LE BOL!", - "ET DIS-MOIS, CETTE POTION, A-T-ELLE L'EFFET CONTRAIRE?", - "ON VERRA \200A...", - // 30 - "EH BIEN, ON VERRA SI C'EST VRAI. IGOR, APPORTE LE COMPACT DISC D'ONGLES GRATTANT UN TABLEAU", - "N'Y PENSES PAS. LA FILLE RESTE AVEC MOI, ET TOI TU RESTERAS L\267 JUSQU'\267 QUE LA PENDULE TE COUPE EN PETITES TRANCHES. HA! HA! HA!", - "MAIS QUE JE SUIS MALIN. ON Y VA, IGOR, ALLONS PR\220PARER LA POTION ET CONQU\220RIR LE MONDE", - "QU'Y A-T-IL MAINTENANT?", - "OUI, QU'Y A-T-IL?... -TIENS, LE MATCH!", - // 35 - "JE L'AVAIS OUBLI\220. PRENDS LA FILLE ET ALLONS LE VOIR. J'IRAI CONQU\220RIR LE MONDE PLUS TARD", - "MERCI MON VIEUX, J'AVAIS SOIF", - "ArgH! CE CRUCIFIX! -CE CRUCIFIX!...", - "C'EST BEAU CE CRUCIFIX, JE NE M'AVAIS PAS RENDU COMPTE", - "FICHE-MOI LA PAIX! JE REGARDE LE FOOT-BALL", - // 40 - "", - "", - "", - "", - "", - // 45 - "", - "", - "", - "", - "", - // 50 - "", - "", - "", - "", - "", - // 55 - "", - "BONJOUR, L'AVEUGLE. A VA?", - "POURQUOI TU SAIS QUE JE SUIS UN TRANGER?", - "TU PARAT UN AVEUGLE. TU AS DES LUNETTES COMME SERAFIN ZUBIRI ET TU PARLES EN REGARDANT DEVANT TOI, COMME STEVIE WONDER...", - "BON, EXCUSE-MOI. JE NE SAVAIS PAS QUE TU PUISSES VOIR.", - // 60 - "MAIS, TU NE VIENS PAS DE ME DIRE QUE TU N'EST PAS AVEUGLE?", - "MAIS TU NE VOIS PAS!", - "A VA, A VA.... PARDONNE-MOI. DANS CE CAS-L: BONJOUR AVEUGLE.", - "JE SUIS JOHN HACQUER ET JE JOUE AU DRASCULA. TU ES SREMENT LE TYPIQUE PERSONNAGE QUI VA M'AIDER EN TROC D'UN OBJET. D'ACCORD? H? D'ACCORD?", - "EUH... AVEUGLE, UNE QUESTION! MAIS... QUEL GENRE DE MTIER C'EST LE TIEN? CELUI D'CHANGER DE FAUCILLES CONTRE DE L'ARGENT EN JOUANT DE L'ACCORDON?", - // 65 - "AH, OUI! C'EST VRAI. AU REVOIR AVEUGLE...", - "VOIL LA GROSSE SOMME D'ARGENT QUE TU M'AS DEMANDE.", - "IL TE VAUX MIEUX.", - "BONJOUR, TRANGER!", - "ET TOI... COMMENT TU SAIS QUE JE SUIS UN AVEUGLE?", - // 70 - "ET TOI TU PARLES COMME LE FILS DE BILL COSBY ET MOI, JE NE T'EMBTE PAS.", - "NON, SI JE NE VOIS PAS.", - "ET MOI, JE NE LE SUIS PAS.", - "OH, BIEN SR! COMME JE NE VOIS PAS ON ME TCHE D'AVEUGLE, N'EST-CE PAS", - "BONJOUR, TRANGER! ET QU'EST-CE QUE TU FAIS EN TRANSYLVANIE?", - // 75 - "C'EST CORRECT, TRANGER. POUR UNE GROSSE SOMME D'ARGENT, JE TE DONNERAI UNE FAUCILLE, POUR QUAND TU EN AURAS BESOIN.", - "CHUT! JE SUIS UN TRAFICANT DE FAUCILLES, JE DOIS ME CACHER.", - "PARCE QUE TU ME L'AS DIT AVANT, N'EST-CE PAS?", - "MERCI TRANGER. VOIL TA FAUCILLE EN CHANGE. UNE CHOSE QUI SERA TRS PRATIQUE POUR TOI, PLUS TARD... VRAIMENT.", - "", - // 80 - "", - "", - "No, nada", - "bla, bla, bla." -}, -{ - // 0 - "", - "COME VA, IGOR?", - "-SEMPRE CHE C' UNA BUONA PARTITA SUCCEDE LO STESSO! BENE, ANDREMO A GUARDARLA AL BAR, COME SEMPRE", - "ADESSO IGOR, ASCOLTA. ANDIAMO A REALIZZARE LA FASE 1 DEL MIO PROGETTO PER CONQUISTARE IL MONDO", - "ATTRARREMO UN FULMINo DELLA TEMPESTA E LO DISMAGNETIZZAREMO CON L'INDIFIBULATORE. LA ELETTRICIT\265 ANDR\265 AL MIO MOSTRO E, GLI DAR\265 VITA!", - // 5 - "SE TUTTO VA BENE QUESTO SAR\265 SOLTANTO IL PRIMO DI UN'IMMENSO ESERCITO CHE CONQUISTAR\265 IL MONDO PER ME, HA,HA,HA", - "I MOSTRI DISTRUGGERANNO TUTTE LE ARME DI TUTTI GLI ESERCITI DEL MONDO, MENTRE NOI CI RIFURGIAREMO nei miei terreni A GIBRALTAR", - "POI, FAREMO UN GOLPE, E I GOVERNI DEL MONDO NON AVRANNO PER DIFENDERSI, E AVR\220 LE LORO NAZIONI SOTTO I MIEI PIEDI", - "SAR\220 IL PRIMO CATTIVO DELLA STORIA CHE RIESCA!", - "A TE NIENTE, SCIOCCO! ST\220 SPORRENDO LA TRAMA. BENE, TUTTO A POSTO?", - // 10 - "-\220 IL MOMENTO! -PREMI L'INTERRUTTORE DELLE BATTERIE ALCALINE!", - "- PORCA MISERIA! -CHE COSA NON \220 ANDATA BENE?", - "SEI SICURO DI AVERLO CONTROLLATO BENE? E NO MANCABA NIENTE? ULTIMAMENTE PER I REDDITI NON VEDI UNA MADONNA", - "IMBECILE!, NON HAI CONETTATO L'INDIFIBULATORE! LE VITI SARANO MAGNETIZZATE E ADESSO AVR\265 IL CERVELLO BRUCIATO", - "SEI MORTO, SEI MORTO, COME TI PRENDA..", - // 15 - "STAI ZITTO! DOMANI CERCHER\220 UN ALTRO CERVELLO E RIPETEREMO L'ESPERIMENTO", - "NO. QUESTA VOLTA NE PORTER\220 UNO DI DONNA, COS\326 SAR\265 NUOVISSIMO, MAI UTILIZZATO. HA, HA HA, CHE BARZELLETA FALLITA", - "E? SONO IL CATTIVO DELLA STORIA, E SONO MASCHILISTA SE VOGLIO, CAPITO? E NON LAMENTARTI UNA ALTRA VOLTA PERCHE MANGERAI LA TUA GOBBA", - "HA,HA,HA. UN ALTRO PRESSO. ADESSO PAGHERAI MOLTO CARO QUESTA OFFESA, LA TUA INTENZIONE DI FINIRE CON ME. -IGOR, AL PENDOLO DELLA MORTE!", - "DIMI, STUPIDO UMANO, COME MAI HAI PENSATO A DISTRUGGERMI?", - // 20 - "-CHE BELLO!, MI METTEREI A PIANGERE SE NON FOSSE PERCHE MI FA RIDERE", - "HO BISOGNO DELLA TUA RAGAZZA, IL SUO CERVELLO MI AIUTER\265 A CONQUISTARE IL MONDO", - "-SI, HA ! VADO A TOGLIARSILO PER METTEGLIELO AL MIO FRUSKYNSTEIN, E CON LUI DOMINER\220 IL MONDO, HA,HA,HA", - "CHE?! - SEI MORTO, SEI MORTO! TI VADO A...MI HAI FATTO ARRABBIARE. SEI PRONTO PER MORIRE?", - "HA,HA,HA. TU CREDI?", - // 25 - "SI, VERO? HA,HA,HA", - "VA BENE, PUOI FUMARE LA ULTIMA SIGARETTA, MA SBRIGATI", - "SONO STUFFO, BUTTA GI\265 LA SIGARETTA!", - "E DIMI, QUELLA POZIONE HA L'EFFETTO INVERSO?", - "QUELLO SI VEDR\265 ..", - // 30 - "BENE, SAR\265 VERO?. IGOR, DAMI IL COMPACT DISC DI UNGHIE GRAFFIANDO UNA LAVAGNA", - "NEANCHE SOGNARLO. LA RAGAZZA RIMANE CON ME, E TU RIMANI LI FINO CHE IL PENDOLO TI TAGLII IN FETTE. HA,HA,HA", - "MA COME SONO CATTIVO, ANDIAMO IGOR, ANDIAMO A FARE LA POZIONE, ANDIAMO A CONQUISTARE IL MONDO", - "ADESSO CHE SUCCEDE?", - "SI, CHE C'E?....LA PARTITA!", - // 35 - "L'AVEVO DIMENTICATA. PRENDI LA RAGAZZA E ANDIAMO A GUARDARE IL CALCIO. CONQUISTER\220 IL MONDO DOPO", - "GRAZIE AMICO, AVEVO SETE", - "-ARGH! -QUEL CROCIFISSO! -QUEL CROCIFISSO!...", - "QUE BELLO \220 QUEL CROCIFISSO, NON MI ERO ACCORTO", - "LASCIAMI, ST\220 GUARDANDO LA PARTITA", - // 40 - "", - "", - "", - "", - "", - // 45 - "", - "", - "", - "", - "", - // 50 - "", - "", - "", - "", - "", - // 55 - "", - "Ciao cieco. Come va?.", - "Come sai che sono straniero.", - "Sembri un cieco. Hai gli occhiali come il cieco di Sorrento, parli guardando all'infinito come Stevie Wonder..", - "Bene, scusa. Non sapevo che non vedessi", - // 60 - "Ma non mi hai appena detto che non sei cieco?.", - "- Ma se non vedi!.", - "Beeeene. Scusa. Allora: Ciao : non vedente", - "Sono John Hacker, st giocando al Drascula. Tu devi proprio essere il tipico personaggio che mi aiuter in cambio di un oggeto. Vero...?", - "Ma... Scusa ciec..- non vedente! .Ma.. . che tipo di mestiere il tuo, di dare falci per soldi, mentre suoni la fisarmonica?.", - // 65 - "Ah, si. \324 vero. Ciao non vedente....(cieco)", - "Ecco la abbondante quantit di soldi che mi avevi chiesto.", - "Mi raccomando", - "Ciao straniero.", - "E tu... Come sai che sono cieco?", - // 70 - "E tu parli come il figlio di Bill Cosby e non ti offendo.", - "No, se non vedo.", - "E non lo sono.", - "-Oh, certo!. Come non vedo mi chiamano cieco, no?.", - "-Ciao Straniero! e cosa fai in Transilvania?", - // 75 - "Corretto straniero. Per una abbondante quantit di soldi, ti dar in cambio una falce, per quando ne avrai bisogno.", - "Shhhhhh. Sono trafficante di falci, devo proprio dissimulare.", - "Perche mi lo hai detto prima, no?", - "Grazie straniero. Ecco la tua falce. Un oggeto che ti sar molto utile pi avanti...... davvero.", - "", - // 80 - "", - "", - "No, nada", - "bla, bla, bla." -}, -}; - -const char *_textb[][15] = { -{ - // 0 - "", - "I'M HERE, DRINKING", - "THEY ARE ALL DEAD, THANKS. HIC...!", - "YES, SURE...", - "SHE IS ATTRACTED TO UNCLE DESIDERIO", - // 5 - "EVEN BETTER, UNCLE DESIDERIO'S DEAD BODY", - "MY UNCLE. HE WENT TO THE CASTLE AND NEVER CAME BACK", - "WELL, HE CAME BACK JUST A LITTLE. IF ONLY VON BRAUN HADN'T SCREWED THINGS UP MY UNCLE WOULD BE DRINKING WITH US NOW", - "NOTHING...", - "WELL, YES! THAT MEAN MAN HAS TERRIFIED US ALL", - // 10 - "FROM TIME TO TIME HE COMES DOWN TO THE VILLAGE AND TAKES SOMEONE WITH HIM.", - "A LITTLE WHILE AFTER WE FOUND A FEW BODY PARTS. I THINK HE IS DEALING IN ORGANS OR SOMETHING LIKE THAT", - "THE ONLY PERSON IN THE VILLAGE WHO KNOWS HOW TO GET TO DRASCULA IS A CULTIVATED PERSON", - "HE LIVES IN A LOG-CABIN OUT OF TOWN, EVER SINCE DRASCULA BEAT HIM UP", - "HE IS THE ONLY ONE WHO COULD HELP US WITH DRASCULA, AND HE DOESN'T WANT TO HEAR ABOUT IT. HOW DO YOU LIKE THAT?", -}, -{ - // 0 - "", - "AQUI, BEBIENDO", - "MUERTOS TODOS. GRACIAS. BURRP ", - "SI, NO VEAS... ", - "ESTA POR EL TIO DESIDERIO", - // 5 - "Y ESTA OTRA, POR EL CADAVER DEL TIO DESIDERIO", - "MI TIO. FUE AL CASTILLO Y NO VOLVIO", - "BUENO, VOLVIO PERO POCO. SI EL VON BRAUN NO HUBIESE METIDO LA PATA MI TIO ESTARIA AQUI BEBIENDO", - "NADA... ", - "\255BUENO, SI! ESE DESALMADO NOS TIENE ATEMORIZADOS A TODOS", - // 10 - "DE VEZ EN CUANDO BAJA AL PUEBLO Y SE LLEVA A ALGUIEN", - "POCO DESPUES SOLO ENCONTRAMOS UNOS POCOS RESTOS. CREO QUE ESTA TRAFICANDO CON ORGANOS, O ALGO ASI", - "EL UNICO DEL PUEBLO QUE SSABE COMO ACABAR CON DRASCULA TIENE ESTUDIOS", - "DESDE QUE LE DERROTO DRASCULA SE HA APARTADO A UNA CABA\245A EN LAS AFUERAS DEL PUEBLO", - "ES EL UNICO QUE PODRIA AYUDARNOS A ACABAR CON DRASCULA, Y NO QUIERE SABER NADA DE NOSOTROS. \250QUE TE PARECE A TI?", -}, -{ - // 0 - "", - "HIER, BEI EINEM GUTEN TROPFEN", - "ALLE TOT. VIELEN DANK. RueLPS !", - "YO, STIMMT...", - "DIE HIER IST FueR ONKEL DESIDERIUS", - // 5 - "UND DIESE HIER FueR DIE LEICHE VON ONKEL DESIDERIUS", - "MEIN ONKEL. ER GING ZUM SCHLOSS UND KAM NICHT ZURueCK", - "NAJA, ER KAM NUR IN RESTEN ZURueCK. WENN VON BRAUN SICH NICHT VERTAN HaeTTE, WueRDE ER JETZT MIT UNS EINEN HEBEN", - "NICHTS...", - "JA STIMMT! DIESER SCHURKE JAGT UNS ALLEN EINE RIESENANGST EIN", - // 10 - "AB UND ZU GEHT ER RUNTER INS DORF UND HOLT SICH JEMANDEN", - "KURZ DANACH HABEN WIR NUR NOCH RESTE GEFUNDEN, ICH GLAUBE ER HANDELT MIT ORGANEN ODER SO", - "DER EINZIGE, DER MIT DRASCULA FERTIGWERDEN KANN, WAR AN DER UNI ", - "SEITDEM DRASCULA IHN BESIEGT HAT, LEBT ER IN EINER EINSAMEN HueTTE AUSSERHALB DES DORFES", - " ER IST DER EINZIGE, DER DRASCULA ERLEDIGEN KoeNNTE UND WILL NICHTS VON UNS WISSEN. WAS HaeLST DU DAVON ?", -}, -{ - // 0 - "", - "ICI, EN BUVANT", - "TOUS MORTS. MERCI. BOURRP", - "OUI, VRAIMENT...", - "CELLE-CI POUR L'ONCLE DSIR", - // 5 - "ET CELLE-L\267 POUR LE CADAVRE D'ONCLE DSIR", - "MON ONCLE EST ALL AU CH\266TEAU ET N'EST PAS ENCORE REVENU", - "BON, IL EST REVENU MAIS POUR PEU DE TEMPS. SI VON BRAUN N'AURAIT FAIT UN IMPAIR, MON ONCLE DSIR SERAIT ICI EN BUVANT", - "RIEN... ", - "EH OUI! CE MALIN NOUS A INTIMIDS \267 TOUS", - // 10 - "DE FOIS IL DESCEND SUR LE VILLAGE ET ENLEVE QUELQU'UN", - "UN PEU PLUS TARD ON NE TROUVE QUE QUELQUES RESTES. JE PENSE QU'IL FAIT DU TRAFIQUE D'ORGANES, OU QUELQUE CHOSE PAREILLE", - "LE SEUL DU VILLAGE QUI SAIT COMMENT FINIR AVEC DRASCULA IL A DES \220TUDES", - "DEPUIS QUE DRASCULA L'A VAINCU, IL S'EST RETIR\220 DANS UNE CABANE, EN DEHORS DU VILLAGE", - "C'EST LE SEUL QUI POURRAIT NOUS AIDER \267 FINIR AVEC DRASCULA ET LUI NE VEUX RIEN SAVOIR DE NOUS. QU'EN PENSES-TUI?", -}, -{ - // 0 - "", - "QU\326, BEVENDO", - "MORTI TUTTI. GRAZIE. BURRP", - "SII, CERTO, SICURO..", - "QUESTA PER IL ZIO PEPPINO", - // 5 - "E QUEST'ALTRA, PER IL CADAVERE DEL ZIO PEPPINO", - "MIO ZIO. FU ANDATO AL CASTELLO, E NON MAI TORNATO", - "EEEHH, TORN\220, MA PER POCO TEMPO. SE IL VON BRAUN NON AVESSE SBAGLIATO, MIO ZIO SAREBBE QU\326 BEVENDO", - "NIENTE..", - "EEH,SI! QUEL MALVAGIO CI HA INTIMORATI", - // 10 - "A VOLTE SCENDE AL PAESE E QUANDO SE NE VA SI PORTA QUALCUNO", - "UN P\220 DOPO SOLTANTO TROVIAMO QUALQUE RESTO. CREDO CHE TRAFFICA ORGANI O QUALCOSA DEL GENERE", - "L'UNICO DEL PAESE CHE SA COME FINIRE CON DRASCULA \220 UNO CHE HA STUDIATO", - "DA CHE FU SCONFFIGIATO DA DRASCULA SI \220 ALLONTANATO A UNA CAPANNA FUORI DEL PAESE", - "L'UNICO CHE POTREBBE AIUTARCI A VINCERE DRASCULA, E NON VUOLE SAPERE NIENTE DI NOI. COSA PENSI?", -}, -}; - -const char *_textbj[][29] = { -{ - // 0 - "", - "ARE YOU ALL RIGHT? HEY, COME ON, WAKE UP! CAN YOU HEAR ME? ARE YOU DEAD?", - "NO, MY NAME IS BILLIE JEAN, BUT YOU CAN CALL ME B.J. IT'S SHORTER", - "HA, HA...! THAT WAS A GOOD ONE!", - "WELL, JOHNNY. YOU SEE, I WAS HERE JUST READY TO GO TO BED WHEN I HEARD THIS LOUD NOISE DOWN THE CORRIDOR", - // 5 - "I DIDN'T PAY ATTENTION AT FIRST, BUT AFTER ABOUT TWO HOURS OR SO I COULDN'T SLEEP AND WENT OUT FOR A WALK", - "AS I OPENED THE DOOR I WAS SHOCKED TO FIND YOU THERE, LYING ON THE FLOOR. I THOUGHT YOU WERE DEAD, I SWEAR... HA, HA, SILLY BILLY", - "I WAS GOING TO GIVE YOU THE KISS OF LIFE BUT IT WASN'T NECESSARY BECAUSE YOU STARTED TO TALK", - "YOU SAID SOMETHING ABOUT A SCARECROW. I WAS VERY SCARED, YOU KNOW. IT'S A REAL SHOCK WHEN A DEAD PERSON STARTS TALKING?", - "ISN'T THAT RIGHT? WELL, THEN I MANAGED TO BRING YOU TO MY ROOM THE BEST WAY I COULD. I PUT YOU IN MY BED... AND THAT'S ALL... HA, HA, HA...", - // 10 - "OH, NO...! IT WASN'T THE HIT, HA, HA. I JUST STEPPED ON YOUR GLASSES BY ACCIDENT", - "YOU REALLY LOOK GOOD WITH THOSE GLASSES. I KNOW HE'S NOT FERNANDO LANCHA, BUT I FIND HIM ATTRACTIVE...", - "YES, YES, I DO... COME ON, HOLD ME AND KISS ME TIGHT", - "OH JOHNNY, HONEY, THANK GOD YOU'RE HERE... THAT DAMNED DRASCULA TIED ME UP TO THE BED AND HE'S GONE DOWNSTAIRS TO WATCH THE FOOTBALL GAME", - "YES, IT'S TRUE. PLEASE, SET ME FREE", - // 15 - "NO, I'M SORRY. I USED THEM ALL IN THE TOWER WHEN I WAS TRYING TO ESCAPE WHILE YOU LET ME DOWN", - "JOHNNY, IS THAT YOU? OH, GOD, GREAT! I KNEW YOU'D COME!", - "YOU DON'T KNOW HOW MUCH THAT EVIL DRASCULA HAS MADE ME SUFFER", - "FIRSTLY HE BROUGHT ME FLYING OVER HERE AND THEN PUT ME IN THIS DISGUSTING ROOM WITHOUT A MIRROR OR ANYTHING", - "I'M TELLING YOU! AND THE WORST PART IS THAT HE DIDN'T EVEN APOLOGIZE, NOT EVEN ONCE", - // 20 - "JOHNNY HONEY, WHERE ARE YOU?", - "I'M READY TO LEAVE DEAR", - "WAIT, I'M GOING TO TAKE A LOOK... NO DARLING, I'M SORRY", - "THERE YOU GO...", - "\"DEAR JOHNNY\"", - // 25 - "I'LL NEVER FORGET YOU BUT I'VE REALIZED THAT THIS JUST COULDN'T WORK OUT RIGHT. TO BE HONEST, I'LL TELL YOU THAT THERE IS ANOTHER MAN. HE'S TALLER, STRONGER", - "AND HE HAS ALSO RESCUED ME FROM DRASCULA. HE HAS ASKED ME TO MARRY HIM, AND I HAVE ACCEPTED", - "BYE JOHNNY. PLEASE DON'T TRY TO FIND SOME KIND OF EXPLANATION. YOU KNOW LOVE IS BLIND AND HAS IT'S OWN WAYS", - "I HOPE THERE WON'T BE HARD FEELINGS BETWEEN US. REMEMBER THAT I STILL LOVE YOU, BUT ONLY AS A FRIEND", -}, -{ - // 0 - "", - "\250ESTA USTED BIEN? OIGA, DESPIERTE. \250ME OYE? \250ESTA USTED MUERTO?", - "NO, MI NOMBRE ES BILLIE JEAN, PERO PUEDES LLAMARME B.J. ES MAS CORTO", - "\255JI, JI! \255QUE BUENO!", - "PUES VERAS JOHNY, YO ESTABA AQUI, DISPUESTA A ACOSTARME, CUANDO OI UN FUERTE GOLPE EN EL PASILLO", - // 5 - "AL PRINCIPIO NO LE DI MUCHA IMPORTANCIA, PERO A LAS DOS HORAS MAS O MENOS DESCUBRI QUE NO PODIA DORMIR Y DECIDI SALIR A DAR UN PASEO", - "Y CUAL NO SERIA MI SORPRESA CUANDO ABRI LA PUERTA Y TE ENCONTRE AHI, EN EL SUELO TIRADO. TE LO JURO QUE PENSE QUE HABIAS MUERTO, JE, JE, TONTA DE MI", - "TE FUI A HACER EL BOCA A BOCA, PERO NO FUE NECESARIO PORQUE EMPEZASTE A HABLAR", - "DECIAS NO SE QUE DE UN ESPANTAPAJAROS. YO ME LLEVE UN SUSTO MUY GORDO, PORQUE CUANDO UN MUERTO SE PONE A HABLAR ES UNA IMPRESION MUY FUERTE, \250NO CREES?", - "\250VERDAD QUE SI? BUENO, PUES COMO PUDE, CARGUE CONTIGO Y TE TRAJE A MI HABITACION. TE PUSE SOBRE LA CAMA... Y ESO ES TODO. JI, JI,JI", - // 10 - "OH, NO HA SIDO EL GOLPE, JI, JI. ES QUE SIN QUERER PISE TUS GAFAS", - "\255HAY QUE VER QUE BIEN LE SIENTAN LAS GAFAS! YA SE QUE NO ES FERNANDO LANCHA, PERO TIENE UN NO SE QUE QUE QUE SE YO", - "SI, SI, QUIERO... VAMOS, ABRAZAME FUERTE, BESAME MUCHO...", - "OH JOHNY, CARI\245O, MENOS MAL QUE HAS VENIDO. ESE DESALMADO DE DRASCULA ME HA ATADO A LA CAMA Y LUEGO SE HA IDO ABAJO A VER EL PARTIDO", - "SI, ES VERDAD. LIBERAME ", - // 15 - "NO, LO SIENTO. GASTE TODAS EN LA MAZMORRA INTENTANDO LIBERARME MIENTRAS TU ME DEJABAS TIRADA", - "JOHNY \250ERES TU? \255QUE ALEGRIA! \255SABIA QUE VENDRIAS!", - "NO SABES CUANTO ME HA HECHO SUFRIR ESE DESALMADO DE DRASCULA", - "PRIMERO ME TRAJO VOLANDO HASTA AQUI Y LUEGO ME ENCERRO EN ESTE CUARTUCHO, SIN ESPEJO NI NADA", - "COMO LO OYES. Y LO PEOR ES QUE NO PIDIO PERDON NI UNA SOLA VEZ", - // 20 - "JOHNY, QUERIDO. \250DONDE ESTAS?", - "ESTOY LISTA PARA QUE ME SAQUES DE AQUI", - "ESPERA QUE VOY A MIRAR... NO CARI\245O, LO SIENTO", - "TOMA...", - "\"QUERIDO JOHNY:", - // 25 - "NUNCA PODRE OLVIDARTE, PERO ME HE DADO CUENTA DE QUE LO NUESTRO NO FUNCIONARIA. VOY A SER SINCERA CONTIGO: HAY OTRO HOMBRE; MAS ALTO, MAS FUERTE...", - "Y ADEMAS ME HA RESCATADO DE LAS MANOS DE DRASCULA. ME HA PEDIDO EN MATRIMONIO, Y YO HE ACEPTADO", - "ADIOS, JOHNY. NO INTENTES DARLE UNA EXPLICACION, PORQUE EL AMOR ES CIEGO Y NO ATIENDE A RAZONES", - "ESPERO QUE NO ME GUARDES RENCOR, Y RECUERDA QUE TE SIGO QUERIENDO, AUNQUE SOLO COMO AMIGO\"", -}, -{ - // 0 - "", - "HALLO, ALLES KLAR ?HEY, WACHEN SIE AUF. HoeREN SIE MICH ? SIND SIE TOT ?", - "NEIN, ICH HEISSE BILLIE JEAN., ABER DU KANNST MICH B.J. NENNEN, DAS IST KueRZER", - "HI,HI! SUPERGUT !", - "JA STELL DIR VOR, HEINZ, ICH WOLLTE MICH HIER GERADE HINLEGEN, ALS ICH EINEN LAUTEN KNALL IM FLUR HoeRTE", - // 5 - "ANFANGS HAB ICH NICHT SO DRAUF GEACHTET, ABER NACHDEM ICH 2 STUNDEN LANG NICHT SCHLAFEN KONNTE, GING ICH RUNTER, UM SPAZIERENZUGEHEN", - "ICH WAR NATueRLICH BAFF, ALS ICH DICH VOR der tuer LIEGEN SAH. ICH HABE ECHT GEDACHT,DASS DU TOT BIST, HEHE, WIE bloed", - "ICH WOLLTE GERADE MUND-ZU-MUND BEATMUNG MACHEN, ABER DANN FINGST DU JA AN ZU REDEN", - "DU FASELTEST WAS VON NER VOGELSCHEUCHE UND ICH Hatte ganz schoen schiss,WEIL sprechende tote schon echt UNHEIMLICH sind?", - "NICHT WAHR ?NAJA,ICH HABE DICH DANN AUFGEHOBEN UND IN MEIN ZIMMER GETRAGEN UND AUF MEIN BETT GELEGT.... WEITER NICHTS. HI,HI,HI", - // 10 - "ACH NEIN, ES WAR NICHT DIE BEULE, HIHI, ICH BIN VERSEHENTLICH AUF DEINE BRILLE GETRETEN ", - "MAN MUSS SICH ECHT MAL ANGUCKEN, WIE GUT IHM DIE BRILLE STEHT. ER IST ZWAR NICHT DER MARTINI-MANN, ABER ER HAT WAS WEISS ICH WAS", - "JA, JA, ICH WILL. KOMM NIMM MICH UND KueSS MICH...", - "OH HEINZ, LIEBLING, GUT DASS DU DA BIST. DIESER WueSTLING VON DRASCULA HAT MICH ANS BETT GEFESSELT UND IST DANN RUNTER UM SICH DAS SPIEL ANZUSEHEN", - "JA, WIRKLICH. BEFREIE MICH", - // 15 - "NEIN, TUT MIR LEID. ICH HAB ALLE BEIM VERSUCH, AUS DEM VERLIES AUSZUBRECHEN, AUFGEBRAUCHT", - "HEINZ, BIST DU ES ? WIE TOLL ! ICH WUSSTE, DASS DU KOMMEN WueRDEST !", - "DU AHNST JA NICHT, WIE SEHR ICH WEGEN DIESEM UNGEHEUER VON DRASCULA GELITTEN HABE", - "ZUERST IST ER MIT MIR HIERHER GEFLOGEN UND DANN HAT ER MICH IN DIESES LOCH GESPERRT, OHNE SPIEGEL UND GAR NICHTS", - "WIE ICHS GESAGT HABE. DAS SCHLIMMSTE IST,DASS ER SICH KEIN EINZIGES MAL ENTSCHULDIGT HAT.", - // 20 - "HEINZ, GELIEBTER, WO BIST DU ?", - "ICH BIN BEREIT, VON DIR GERETTET ZU WERDEN", - "WARTE, ICH GUCK MAL...NEIN, SCHATZ, TUT MIR LEID", - "HIER NIMM...", - "LIEBER HEINZ !", - // 25 - "ICH WERDE DICH NIE VERGESSEN, aber das mit uns funktioniert nicht.ICH gebs zu : ES GIBT EINEN ANDERN. GRoeSSER,STaeRKER...", - "UND AUSSERDEM HAT ER MICH AUS DRASCULAS KLAUEN BEFREIT UND UM MEINE HAND ANGEHALTEN,UND ICH HABE JA GESAGT", - "LEB WOHL,HEINZ. VERSUCH NICHT EINE ERKLaeRUNG ZU FINDEN, DENN DIE LIEBE IST BLIND UND KENNT KEINE VERNUNFT", - "DU BIST MIR HOFFENTLICH NICHT BoeSE. DENK IMMER DARAN DASS ICH DICH IMMER NOCH LIEBE, WENN AUCH NUR ALS FREUND", -}, -{ - // 0 - "", - "VOUS ALLEZ BIEN? ALLEZ, REVEILLEZ-VOUS! VOUS M'ENTENDEZ? VOUS \322TES MORT?", - "NON, MON NOM EST BILLIE JEAN, MAIS TU PEUX M'APPELLER B.J., C'EST PLUS COURT", - "HI! HI! -C'EST BON!", - "EN VRIT JOHNY, J'TAIS L\267, PR\322TE \267 ME COUCHER, ET J'AI ENTENDU UN FORT COUP DANS LE COULOIR", - // 5 - "AU DBUT JE N'Y AI PAS DONN D'IMPORTANCE, MAIS APR\324S JE ME SUIS RENDUE COMPTE QUE NE POUVAIS PAS M'ENDORMIR ET SUIS SORTIE FAIRE UNE PROMENADE", - "ET \267 MON GRAN TONNEMENT, QUAND J'AI OUVERT LA PORTE, JE T'AI TROUV L\267, PAR TERRE. J'TAIS SUR LE POINT DE PENSER QUE TU AVAIS MORT, HE!, QUE JE SUIS B\322TE!", - "J'ALLAIS TE FAIRE LE BOUCHE-\267-BOUCHE MAIS IL N'A T PAS NCESSAIRE PUISQUE TU AS COMMENC \267 PARLER", - "TU DISAIS \267 SAVOIR QUOI D'UN POUVANTAIL. CELA M'A FAIT UNE GRANDE PEUR, PARCE QUE QUAND UN MORT SE MET \267 PARLER L'IMPRESSION EST TR\324S FORTE, NE CROIS-TU PAS?", - "C'EST VRAI, NON? ENFIN. JE ME SUIS DBROUILLE POUR TE PRENDRE SUR MOI, T'EMMENER DANS MA CHAMBRE ET T'INSTALLER SUR LE LIT... ET VOIL\267 TOUT. HI! HI! HI!", - // 10 - "HO! CE N'EST PAS \267 CAUSE DU COUP, HI! HI! CE QUE J'AI MARCHE SUR TES LUNETTES PAR ACCIDENT", - "\220VIDEMMENT LES LUNETTES LUI FONT DU BIEN! JE SAIS BIEN QUIL N'EST PAS FERNANDO LANCHA, MAIS IL A UN AIR QU'ALLEZ DONC SAVOIR", - "OUI, OUI, JE VEUX... VAS-Y, EMBRASSE-MOI FORT, EMBRASSE-MOI BEAUCOUP...", - "OH,JOHNY!, MON AMOUR! HEUREUSEMENT QUE TU ES VENU. CE M\220CHANT DRASCULA M'A ATTACH\220 AU LIT ET APR\324S IL EST PARTI EN BAS VOIR LE MATCH", - "OUI, C'EST VRAI, LIB\324RE-MOI", - // 15 - "NON, SUIS D\220SOL\220E. JE LES AI TOUTES UTILIS\220ES, DANS LE CACHOT, EN T\266CHANT DE ME LIB\220RER ALORS QUE TOI TU M'ABANDONNAIS", - "JOHNY, C'EST TOI? -QUELLE JOIE! -JE SAVAIS QUE TU VIENDRAIS!", - "TU NE PEUX PAS SAVOIR COMBIEN M'A FAIT SOUFFRIR CE M\220CHANT DRASCULA", - "D'ABORD IL M'EMMEN\220 EN VOLANT JUSQU'ICI ET APR\324S IL M'ENFERM\220E DANS CE TAUDIS, SANS MIROIR NI RIEN D'AUTRE", - "COMME TU L'ENTENDS. ET LE PIRE C'EST QUIL NE M'A PAS DEMAND\220 PARDON N'UNE SEULE FOIS ", - // 20 - "JOHNY, MON CH\220RI, O\353 EST-CE QUE TU ES?", - "JE SUIS PR\322TE POUR QUE TU M'EN SORTES D'ICI", - "ATTEND, JE VAIS REGARDER... NON CH\220RI, JE REGRETTE", - "TIENS...", - "\"CHER JOHNY", - // 25 - "JAMAIS JE T'OUBLIERAI, MAIS JE ME SUIS APER\200UE QUE NOTRE AFFAIRE NE POUVAIT PAS MARCHER. JE VAIS \322TRE SINC\324RE AVEC TOI: IL Y A UN AUTRE HOMME, PLUS GRAND...", - "ET ENCORE IL M'A LIB\220R\220 DES MAINS DE DRASCULA. IL M'A DEMAND\220 EN MARIAGE, ET MOI J'AI ACCEPT\220", - "AU REVOIR, JOHNY. N'Y CHERCHES PAS UNE EXPLICATION, L'AMOUR EST AVEUGLE ET N'\220COUTE PAS DES RAISONS", - "J'ESP\324RE QUE TU SERAS SANS RANCUNE, ET N'OUBLIES PAS QUE JE T'AIME ENCORE, MAIS EN AMI SEULEMENT\"", -}, -{ - // 0 - "", - "ST\265 BENE? SENTA, PUO SENTIRMI? SI \220 MORTO?", - "NO, IL MIO NOME BILLIE JEAN, MA PUOI CHIAMARMI B.J. PI \351 BREVE", - "HI,HI!- CHE BUONO!", - "NON SO JOHNY, ERO QU\326, STAVO PER ADDORMENTARMI, QUANDO HO SENTITO UN FORTE RUMORE NEL CORRIDOIO", - // 5 - "PRIMA NON GLI HO DATTO IMPORTANZA, MA DUE ORE DOPO HO SCOPERTO CHE NON RIUSCIVO A ADDORMENTARMI E SONO uscita A FARE QUATTRO PASSI", - "E FIGURATI LA SORPRESA QUANDO HO APERTO LA PORTA E TI HO TROVATO PER TERRA. TI GIURO, HO PENSATO CH'ERI MORTO..., MA COME SONO SCIOCCA", - "VOLEVO FARTI IL BOCCA A BOCCA, MA NON C'ERA BISOGNO PERCHE SUBITO HAI COMINCIATO A PARLARE", - "HAI DETTO NON SO CHE DI UN SPAVENTAPASSERI. CHE COLPO.....!, PERCHE QUANDO UN MORTO SI METTE A PARLARE FA UN COLPO GRANDISSIMO!", - "VERO DI SI? NON SO COME SONO RIUSCITA, TI HO TRASPORTATO ALLA MIA CAMERA, TI HO MESSO SUL MIO LETTO E.... NIENTE PI\351 .", - // 10 - "NO, NON \220 STATA LA BOTTA, HI, HI. \220 PERCHE ... HO PESTATO I TUOI OCCHIALI", - "MAMMA MIA MA COM'\220 BELLO CON GLI OCCHIALI! SO CHE NON \220 FERNANDO LANCHA, MA HA QUALCOSA CHE MI PIACE MOLTISSIMO", - "SI,SI, VOGLIO... ABBRACIAMI FORTE, BACIAMI MOLTO..", - "OH JOHNY, CARO, MENO MALE CHE SEI VENUTO. QUEL MALVAGIO, DRASCULA, MI HA LEGATO AL LETTO E POI SE NE \220 ANDATO A GUARDARE LA PARTITA", - "SI, \220 VERO, LIBERAMI", - // 15 - "NO, MI DISPIACE. HO UTILIZZATO TUTTE IN CARCERE PROBANDO LIBERARMI QUANDO TU MI AVEVI LASCIATA", - "JOHNY, SEI TU? - BENISSIMO. LO SAPEVO ", - "NON TI FIGURI QUANTO MI HA FATTO SOFFRIRE DRASCULA", - "PRIMA MI HA PORTATO VOLANDO FINO QUA E POI MI HA RICHIUSA IN QUESTA CAMERACCIA CHE NON HA N\220 UNO SPECCHIO", - "COME HAI SENTITO. E LO PEGLIORE: N\220 UNA VOLTA SI \220 SCUSATO", - // 20 - "JOHNY, CARO. DOVE SEI?", - "SONO PRONTA, FAMI USCIRE DA QU\326 ", - "ASPETTA, VADO A GUARDARE... NO CARO, MI DISPIACE", - "PRENDI..", - "\"CARO JOHNY:", - // 25 - "MAI POTR\220 DIMENTICARTI, MA NON SAREMO MAI FELICI INSIEME. SAR\220 SINCERA CON TE : C'\220 NE UN ALTRO; PI\351 ALTO, PI\351 FORTE..", - "ANZI MI HA LIBERATO DA DRASCULA. MI HA CHIESTO LA MANO E HO DETTO DI SI", - "ADIO JOHNY. NON CERCARE UNA SPIEGAZIONE, PERCHE L'AMORE \220 CIECO.", - "SPERO NON MI ODII, E RICORDA CHE ANCORA TI VOGLIO BENE, SEBBENE SOLO COME UN AMICO\"", -}, -}; - - -const char *_texte[][24] = { -{ - // 0 - "", - "YOU... HEY YOU!", - "DON'T GIVE ME THAT CRAP ABOUT A DEAD BODY OK?", - "I'M ALIVE. IT'S JUST THAT I'M STARVING", - "WELL, YOU SEE. I WAS THE DRUNKARD OF THE VILLAGE, JUST KEEPING UP WITH THE FAMILY TRADITION, YOU KNOW? ONE NIGHT DRASCULA KIDNAPPED ME TO TAKE MY ORGANS AWAY", - // 5 - "SINCE ALCOHOL STILL KEEPS ME QUITE YOUNG, I'M HERE LIKE A SCRAP YARD. EVERYTIME HE NEEDS SOMETHING FOR THE MONSTER HE IS MAKING, HE COMES AND TAKES IT FROM ME", - "IT HURT AT FIRST, BUT I DON'T CARE ANYMORE", - "I DON'T KNOW. I GUESS IT'S HIS GRADUATE PROJECT", - "I'M DESIDERIO, AND I CAN HELP YOU WITH ANYTHING YOU NEED", - "THE TRUTH IS THAT I DON'T REALLY FEEL LIKE IT, BUT THANKS VERY MUCH ANYWAY SIR", - // 10 - "TAKE IT, IT'S YOURS", - "WHY DO ALL ADVENTURE GAMES END WITH A SUNRISE OR A SUNSET?", - "DO ALL THESE NAMES BELONG TO THE CREATORS OF THE GAME?", - "AREN'T THEY ASHAMED TO BE SEEN BY EVERYBODY?", - "JESUS, THAT EMILIO DE PAZ IS EVERYWHERE!!", - // 15 - "REALLY?", - "YES", - "WELL, DON'T MAKE A FUSS ABOUT IT", - "HEY WEREWOLF, BY THE WAY...", - "DIDN'T YOU FALL OFF A WINDOW AND GET BADLY HURT", - // 20 - "AT LEAST IT WASN'T ALWAYS THE SAME ONES...", - "HE'S BEEN OUT FOUR TIMES ALREADY", - "I'D LIKE TO BE A MODEL", - "ALL RIGHT, AND WHAT ARE YOU GOING TO DO?", -}, -{ - // 0 - "", - "EO, USTED", - "\255QUE MUERTO NI OCHO CUARTOS!", - "ESTOY VIVO, LO QUE PASA ES QUE YO PASO HAMBRE, \250SABE USTED? ", - "PUES VERA, SE\245OR. YO ERA EL BORRACHO DEL PUEBLO, DIGNO SUCESOR DE UNA FAMILIA DE ILUSTRES BORRACHUZOS, Y UNA NOCHE DRASCULA ME SECUESTRO PARA ROBARME LOS ORGANOS", - // 5 - "RESULTA QUE COMO ME CONSERVO EN ALCOHOL, ME TIENE AQUI EN PLAN DESSGUACE. CADA VEZ QUE NECESITA ALGO PARA EL MONSTRUO QUE ESTA CREANDO VIENE Y ME LO COGE", - "AL PRINCIPIO ME DOLIA, NO CREA, PERO YA ME DA IGUAL", - "NO SE, SERA SU PROYECTO DE FIN DE CARRERA", - "MI NOMBRE ES DESIDERIO, PARA SERVIRLE A USTED", - "PUES LA VERDAD ES QUE NO TENGO MUCHA GANA, PERO MUCHAS GRACIAS DE TODAS MANERAS, SE\245OR", - // 10 - "SI, TU MISMO", - "\250POR QUE TODOS LOS JUEGOS DE AVENTURAS TERMINAN CON UN AMANECER O UNA PUESTA DE SOL? ", - "\250Y TODOS ESTOS NOMBRES SON DE LOS QUE HAN HECHO EL JUEGO?", - "\250Y NO LES DA VERG\232ENZA SALIR Y QUE LOS VEA TODO EL MUNDO?", - "JOLIN, NO HACE MAS QUE SALIR \"EMILIO DE PAZ\" ", - // 15 - "\250DE VERDAD?", - "SI", - "PUES NO ES PARA TANTO", - "POR CIERTO HOMBRE LOBO...", - "... \250NO CAISTE POR UNA VENTANA Y TE HICISTE POLVO?", - // 20 - "SI AL MENOS NO FUESEN SIEMPRE LOS MISMOS", - "ESE YA HA SALIDO CUATRO VECES", - "ME GUSTARIA SER MODELO", - "YA, \250Y TU QUE VAS A HACER?", -}, -{ - // 0 - "", - "EJ, SIE DAA", - "DU BIST WOHL BESOFFEN ODER WAS ? !", - "ICH BIN LEBENDIG, ABER ICH HABE HUNGER, WISSEN SIE ?", - "TJA,ICH WAR DER DORFSaeUFER, STOLZER abkomme EINER DORFSaeUFERsippe UND EINES NACHTS holte mich DRASCULA, UM MIR DIE ORGANE ZU KLAUEN", - // 5 - "WEIL ICH MICH IN ALKOHOL gut HALTE BIN ICH SEIN ERSATZTEILLAGER. IMMER WENN ER WAS FueR SEIN MONSTERCHEN BRAUCHT, BEDIENT ER SICH BEI MIR", - "AM ANFANG TAT DAS HoeLLISCH WEH, ABER JETZT MERK ICH SCHON NICHTS MEHR", - "KEINE AHNUNG, ES WIRD WOHL SEINE DIPLOMARBEIT SEIN", - "ICH HEISSE DESIDERIUS UND STEHE ZU IHREN DIENSTEN", - "NAJA, EIGENTLICH HABE ICH KEINE GROSSE LUST ABER VIELEN DANK JEDENFALLS, MEIN HERR", - // 10 - "JA,NUR ZU", - "WARUM HoeREN ALLE SPIELE MIT SONNENAUFGANG ODER SONNENUNTERGANG AUF ?", - "UND SIE HABEN DIE NAMEN VON DEN MACHERN DIESES SPIELS BENUTZT ?", - "UND SIE SCHaeMEN SICH NICHT SICH ALLER WELT ZU OFFENBAREN ?", - "SCHEIBENKLEISTER. SCHON WIEDER DER PROGRAMMIERER", - // 15 - "WIRKLICH ?", - "JA", - "SO SCHLIMM IST ES AUCH WIEDER NICHT", - "APROPOS WERWOLF....", - "....BIST DU NICHT AUS EINEM FENSTER GEFALLEN UND ZU STAUB GEWORDEN ?", - // 20 - "WENN ES WENIGSTENS NICHT IMMER DIESELBEN WaeREN", - "DER IST SCHON 4 MAL AUFGETAUCHT", - "ICH WaeRE GERN FOTOMODELL", - "KLAR, UND WAS WILLST DU SPaeTER MAL MACHEN ?", -}, -{ - // 0 - "", - "OH\220! VOUS!", - "QUEL MORT NI QUELLE HISTOIRE!", - "JE SUIS VIVANT. C'EST QUE J'AI FAIM, VOUS SAVEZ? ", - "J'TAIS L'IVROGNE DU VILLAGE, LE DIGNE REPRSENTANT D'UN FAMILLE D'ILLUSTRES SO\352LARDS, ET DRASCULA M'A SQUESTR UNE NUIT POUR ME VOLER LES ORGANES", - // 5 - "COMME JE ME CONSERVE EN ALCOOL, IL ME TIENS ICI EN PLAN DBALLAGE. \267 CHAQUE FOIS QU'IL A BESOIN DE QUELQUE CHOSE POUR SON MONSTRE, IL LE PRENDRE", - "AU DBUT A ME FAISAIT MAL, MAIS JE M'EN FICHE DJ\267", - "JE NE SAIS PAS, MAIS CE SERA SON PROJET FIN D'TUDES", - "MON NOM EST DSIR, POUR VOUS SERVIR", - "VRAIMENT JE N'AI PAS UNE ENVIE FOLLE, MAIS MERCI QUAND M\322ME, MONSIEUR", - // 10 - "OUI, TOI M\322ME", - "POURQUOI TOUS LES JEUX D'AVENTURES FINISSENT AVEC UNE AUBE OU UN COUCHER DU SOLEIL? ", - "ET VOIL\267 LES NOMS DE TOUS QUI ON FAIT LE JEU?", - "ET N'ONT-ILS PAS LA HONTE DE SE MONTRER ET QUE TOUT LE MONDE LES VOIT?", - "AH ZUT! IL NE FAIT QUE SORTIR \"EMILIO DE PAZ\" ", - // 15 - "C'EST VRAI", - "OUI", - "EH BIEN, IL NE FAUT PAS EXAG\220RER", - "EN FAIT HOMME-LOUP...", - "...N'EST-TU PAS TOMB\220 D'UNE FEN\322TRE EN TE BR\220SILLANT?", - // 20 - "SI DU MOINS N'\220TAIENT PAS TOUJOURS LES M\322MES...", - "CELUI-L\267 EST D\220J\267 SORTI QUATRE FOIS", - "J'AIMERAIS \322TRE MANNEQUIN", - "PARFAITEMENT. ET TOI, QUE VAS-TU FAIRE?", -}, -{ - // 0 - "", - "EO, LEI", - "MA CHE DICI!", - "SONO VIVO, MA HO SEMPRE MOLTA FAME, SA LEI?", - "IO ERO IL BEONE DEL PAESE, DEGNO SUCCESSORE DI UNA FAMIGLIA DI ILLUSTRI BEONI, E UNA NOTTE DRASCULA MI SEQUESTR\220 PER RUBARMI GLI ORGANI", - // 5 - "mi utilizza COME UNO SCASSO, OGNI VOLTA CHE HA BISOGNO DI QUALCOSA PER IL MOSTRO CHE ST\265 CREANDO VIENE QUA E MI LO toglia", - "AL INIZIO MI FACEVA MALE, MA ORA NON FA NIENTE", - "NON SO, SAR\265 LA SUA TESINA DI FINE DI LAUREA", - "IL MIO NOME PEPPINO, PER SERVIRGLI", - "LA VERIT\265 CHE NON HO MOLTA VOGLIA, COMUNQUE GRAZIE MILE, SIGNORE", - // 10 - "SI, PROPRIO TU", - "PER CHE TUTTI I VIDEO-GIOCHI D' AVVENTURE FINISCONO CON UN'ALBEGGIARE O UN TRAMONTO?", - "E TUTTI QUESTI NOMI SONO DI CHI HANNO FATTO IL GIOCO?", - "E NON SI VERGOGNANO DI USCIRE ED ESSERE VISTI DA TUTTI QUANTI?", - "UFFA, SOLTANTO ESCI \"EMILIO DE PAZ\"", - // 15 - "DAVVERO?", - "SI", - "NON \220 PER METTERSI COS\326 ", - "CERTO LUPO-MANNARO..", - "... MA NON SEI CADUTO DA UNA FINESTRA E TI HAI FATTO MALE?", - // 20 - "SE PER UNA VOLTA NON FOSSENO SEMPRE GLI STESSI", - "QUELLO \220 GIA USCITO QUATRO VOLTE", - "MI PIACEREBBE ESSERE TOP MODEL", - "SI, E TU, COSA VAI A FARE?", -}, -}; - - -const char *_texti[][33] = { -{ - // 0 - "", - "MASTER, THIS IS NOT WORKING", - "I AM POSITIVE, MASTER", - "I'M SORRY MASTER", - "ARE YOU GOING TO BRING ANOTHER CRAZY SCIENTIST HERE? THE LABORATORY IS ALREADY FULL UP, AND BESIDES, THEY'RE ALL OUT OF DATE", - // 5 - "HUSH MASTER, THE FEMINISTS MIGHT HEAR YOU", - "DAMN IT!", - "I DIDN'T EXPECT YOU SO SOON, MASTER", - "QUITE BAD MASTER. THERE ARE SOME PROBLEMS WITH THE SATELLITE, I JUST CAN'T RECEIVE ANYTHING. THERE MUST BE SOME INTERFERENCE FROM THE STORM", - "WHAT DO I KNOW, MASTER?", - // 10 - "YES, MY MASTER", - "MASTER", - "DO YOU KNOW WHAT TIME IS IT?", - "WHAT? OH, THAT SCARED ME!. YOU ARE THE \"NIGHT-CLEANING GUY\", RIGHT?", - "I'M IGOR, THE VALET. YOU CAN START WITH THE BALL ROOM. THERE'S BEEN A SUPER NATURAL ORGY IN THERE YESTERDAY AND IT LOOKS LIKE SHIT", - // 15 - "IF YOU NEED ANYTHING, JUST BUY IT", - "IT'S THE TAX RETURN APPLICATION FORM, CAN'T YOU SEE?", - "NEITHER DO I. THE NUMBERS ARE VERY SMALL AND I CAN'T SEE MUCH AT THIS DISTANCE.", - "NO WAY! THEY MAKE ME LOOK UGLY", - "OH, WELL. IT'S JUST LIKE A CRAZY PARTY THAT THE MASTER ORGANIZES WITH HIS FRIENDS EACH TIME SOME IDIOT COMES ALONG TRYING TO KILL HIM", - // 20 - "THEY TAKE HIS EYES OUT. THEN, POUR IN SOME LEMON JUICE SO THAT IT ITCHES TO DEATH, AND THEN...", - "NO", - "WHAT DO YOU MEAN WHY NOT? DO YOU KNOW WHAT TIME IT IS?", - "YES, IT'S WINTER", - "SEE YOU LATER", - // 25 - "DON'T EVEN THINK ABOUT IT!", - "WELL, THAT'S ENOUGH FOR TODAY. I'M GOING TO HAVE SUPPER", - "MAN, I ALWAYS FORGET TO LOCK IT, RIGHT?", - "THE HELL WITH IT!", - "WHAT? OH, YOU SCARED ME MASTER, I THOUGHT YOU WERE ASLEEP", - // 30 - "OH, BY THE WAY, I TOOK THE LIVING-ROOM KEYS SO THAT YOU CAN WATCH THE EARLY MORNING CARTOONS WITHOUT WAKING ME UP", - "YOU'VE GOT ANOTHER COLD MASTER? DAMN IT! I TOLD YOU TO GET SOME HEATING IN HERE...", - "ALL RIGHT, JUST TAKE YOUR ASPIRIN AND GO TO BED TO SWEAT FOR A WHILE. GOOD NIGHT", -}, -{ - // 0 - "", - "MAESTRO, CREO QUE ESTO NO RULA", - "ESTOY SEGURISIMO, MAESTRO...", - "LO SIENTO, MAESTRO", - "\250VA A TRAER OTRO DE CIENTIFICO LOCO? LE ADVIERTO QUE TENEMOS EL LABORATORIO LLENO Y ESTAN TODOS CADUCADOS", - // 5 - "CALLE, MAESTRO, QUE COMO LE OIGAN LAS FEMINISTAS", - "HAY QUE JOROBARSE", - "\255MAESTRO! \255NO LE ESPERABA TAN PRONTO!", - "MAL MAESTRO, DEBE HABER PROBLEMAS CON EL SATELITE Y NO CONSIGO SINTONIZAR LA IMAGEN. ADEMAS LA TORMENTA PRODUCE INTERFERENCIAS", - "\250Y A MI QUE ME CUENTA, MAESTRO?", - // 10 - "SI, MAESTRO", - "MAESTRO", - "\250SABE LA HORA QUE ES?", - "\250EH? \255AH, QUE SUSTO ME HAS DADO! TU ERES EL DE \"LIMPIEZA NOCTURNA\"\250NO?", - "YO SOY IGOR, EL MAYORDOMO. PUEDES EMPEZAR POR EL SALON DE BAILE. AYER HUBO ORGIA SOBRENATURAL Y ESTA HECHO UNA MIERDA", - // 15 - "SI NECESITAS ALGO, LO COMPRAS", - "LA DECLARACION DE LA RENTA \250ES QUE NO LO VES?", - "PUES YO TAMPOCO, PORQUE ENTRE QUE LOS NUMEROS SON MUY CHICOS, Y YO QUE NO VEO BIEN DE LEJOS...", - "\255NI HABLAR! ME HACEN PARECER FEO", - "BAH, ES UN FESTORRO QUE SE MONTA EL MAESTRO CON SUS COLEGAS CADA VEZ QUE LLEGA ALGUN IMBECIL QUERIENDO ACABAR CON EL", - // 20 - "PRIMERO LE SACAN LOS OJOS; LUEGO LE ECHAN ZUMO DE LIMON PARA QUE LE ESCUEZA; DESPUES...", - "NO", - "\250COMO QUE POR QUE NO? \250TU HAS VISTO LA HORA QUE ES?", - "EN INVIERNO, SI", - "HASTA LUEGO", - // 25 - "\255NI SE TE OCURRA!", - "BUENO, POR HOY YA VALE. ME VOY A CENAR", - "\255Y QUE SIEMPRE SE ME OLVIDA CERRAR CON LLAVE!", - "\255HAY QUE JOROBARSE!", - "\250EH? \255AH! QUE SUSTO ME HA DADO, MAESTRO. CREIA QUE ESTABA DURMIENDO", - // 30 - "AH, POR CIERTO, TOME LAS LLAVES DE LA SALA DE ESTAR Y ASI NO ME MOLESTA MA\245ANA TEMPRANO SI QUIERE VER LOS DIBUJOS", - "\250QUE, YA SE HA RESFRIADO OTRA VEZ, MAESTRO? HAY QUE JOROBARSE. SI SE LO TENGO DICHO, QUE PONGA CALEFACCION... ", - "BUENO, TOMESE UNA PASTILLA DE ACIDOACETIL SALICILICO Y HALA, A SUDAR. BUENAS NOCHES", -}, -{ - // 0 - "", - "MEISTER, ICH GLAUBE, DAS KLAPPT NICHT", - "ICH BIN ABSOLUT SICHER, MEISTER....", - "TUT MIR LEID, MEISTER", - "NOCH SO EINEN VERRueCKTEN WISSENSCHAFTLER ? ABER DAS LABOR IST DOCH VOLL MIT IHNEN UND ALLE SIND ueBER DEM VERFALLSDATUM", - // 5 - "SEIEN SIE STILL MEISTER. WENN DAS DIE FEMINISTINNEN HoeREN", - "GRueNSPAN UND ENTENDRECK", - "MEISTER! ICH HABE SIE NOCH GAR NICHT ERWARTET !", - "SCHLECHT, MEISTER. ES GIBT WOHL PROBLEME MIT DER SCHueSSEL UND ICH BEKOMME DAS BILD EINFACH NICHT KLAR. UND DANN DAS GEWITTER !", - "UND WIESO ERZaeHLEN SIE MIR DAS, MEISTER ?", - // 10 - "JA, MEISTER", - "MEISTER", - "WISSEN SIE, WIEVIEL UHR ES IST ?", - "Hae ?OH, DU HAST MICH GANZ SCHoeN ERSCHRECKT. BIST DU VON \"BLITZ UND BLANK BEI MONDESSCHEIN\"", - "ICH BIN IGOR, DER HAUSVERWALTER.DU KANNST MIT DEM WOHNZIMMER ANFANGEN. GESTERN HATTEN WIR EINE ueBERNATueRLICHE ORGIE UND ES SIEHT AUS WIE im SAUSTALL", - // 15 - "KAUF ALLES WAS DU BRAUCHST !", - "DIE STEUERERKLaeRUNG.SIEHST DU DAS NICHT ?", - "ICH AUCH NICHT, WEIL DIE ZAHLEN SCHON MAL SEHR KLEIN SIND UND ICH DOCH kurzsichtig bin....", - "VON WEGEN ! SIE MACHEN MICH HaeSSLICH", - "PAH, DAS IST EINE RIESENFETE DIE DER MEISTER JEDESMAL DANN ABZIEHT, WENN IRGENDSOEIN IDIOT KOMMT, DER IHN ERLEDIGEN WILL", - // 20 - " ZUERST REISSEN SIE IHM DIE AUGEN AUS DANACH GIESSEN SIE ZITRONENSAFT DRueBER DAMIT ES SCHoeN BRENNT UND DANN...", - "NEIN", - "WIE WARUM NICHT ? WEISST DU WIEVIEL UHR ES IST ?", - "im WINTER JA", - "TSCHueSS", - // 25 - "WAG ES BLOOOSS NICHT !", - "GUT, FueR HEUTE REICHTS, DAS ABENDESSEN RUFT", - "IMMER VERGESSE ICH ZUZUSCHLIESSEN !", - "VERDAMMTER MIST NOCHMAL !", - "HaeH ?AH !SIE HABEN MICH GANZ SCHoeN ERSCHRECKT, MEISTER. ICH DACHTE SIE SCHLAFEN", - // 30 - "ACH,ueBRIGENS, ICH HABE DIE WOHNZIMMERSCHLueSSEL GENOMMEN. SO NERVEN SIE MICH MORGEN FRueH NICHT MIT IHREN ZEICHENTRICKSERIEN", - "ACH, SIE HABEN SICH SCHON WIEDER ERKaeLTET, MEISTER ? ICH HAB JA IMMER SCHON GESAGT, SIE SOLLEN DIE HEIZUNG ANMACHEN...", - "NAJA, SCHLUCKEN SIE EINE SALICILACETYLSaeURE-TABLETTE UND AB INS BETT ZUM SCHWITZEN. GUTE NACHT", -}, -{ - // 0 - "", - "MA\327TRE, JE CROIS QUE \200A NE ROULE PAS", - "J'EN SUIS TR\324S S\352R, MA\327TRE...", - "JE LE REGRETTE, MA\327TRE", - "IL APPORTERA UN AUTRE DE SCIENTIFIQUE FOU? JE VOUS PRVIENS QUE LE LABORATOIRE EN EST PLEIN ET TOUS SONT PRIMS", - // 5 - "TAISEZ-VOUS, MA\327TRE, SI LES FMINISTES VOUS COUTENT...", - "CE QU'IL FAUT SUPPORTER!", - "MA\327TRE! -JE NE VOUS ATTENDAIT PAS SI T\342T!", - "A VA MAL MA\327TRE. IL DOIT AVOIR DES PROBL\324MES AVEC LE SATELLITE ET JE NE RUSSIT PAS \267 SINTONISER L'IMAGE. ET ENCORE L'ORAGE PRODUIT DES INTERFRENCES.", - "CANCANS QUE TOUT CELA, MA\327TRE!", - // 10 - "OUI, MA\327TRE", - "MA\327TRE", - "QUELLE HEURE IL EST?", - "H\220? -AH! TU M'AS FAIT PEUR! TU EST CELUI DU \"NETTOYAGE DE NUIT\", NON?", - "JE SUIS IGOR, LE MAJORDOME. TU PEUX COMMENCER PAR LE SALON DE BAL. HIER IL Y A EU UNE ORGIE SURNATURELLE ET C'EST UNE SALOPERIE", - // 15 - "SI TU AS BESOIN DE QUELQUE CHOSE, ACHETE-EN!", - "LA D\220CLARATION D'IMP\342TS, NE LE VOIS-TU PAS?", - "EH BIEN, MOI NON PLUS, CAR \267 CAUSE DE SI PETITS NUM\220ROS ET MA DIFFICULT\220 POUR BIEN VOIR DE LOIN...", - "ON N'EN PARLE PLUS! ILS ME FONT PARA\327TRE LAID", - "BAH! C'EST UNE BELLE F\322TE QUE LE MA\327TRE ORGANISE AVEC SES COLL\324GUES \267 CHAQUE FOIS QU'UN IMB\220CILE ARRIVE ET VEUT FINIR AVEC LUI", - // 20 - "D'ABORD ON LUI ARRACHE LES YEUX; APR\324S, ON LUI VERSE DE JUS DE CITRON POUR QUE \200A LUI CUISE; APR\324S...", - "NON", - "POURQUOI PAS? TU AS VU L'HEURE QU'IL EST?", - "EN HIVER, OUI", - "AU REVOIR", - // 25 - "N'Y PENSES M\322ME PAS!", - "BON, \200A VA POUR AUJOURD'HUI. JE VAIS D\327NER", - "J'OUBLIE TOUJOURS FERMER \267 CL\220, H\220LAS!", - "QUEL ENNUI!", - "H\220? -VOUS M'AVEZ FAIT PEUR, MA\327TRE. JE PENSAIS QUE VOUS DORMIEZ", - // 30 - "H\220, MA\327TRE! PRENEZ LES CL\220S DE LA SALLE DE S\220JOUR, AINSI DONC SI VOUS VOULEZ VOIR LES DESSINS ANIM\220S DEMAIN DE BONNE HEURE NE ME D\220RANGEREZ PAS", - "QUOI? VOUS VOUS \322TES ENRHUM\220 ENCORE UNE FOIS, MA\327TRE? QUELLE CONTRARI\220T\220! JE VOUS AI D\220J\267 DIT D'Y METTRE LE CHAUFFAGE... ", - "BON, AVALEZ UN COMPRIM\220 D'ACIDEAC\220TYL SALICYLIQUE ET ALLEZ TRANSPIRER! BONNE NUIT!", -}, -{ - // 0 - "", - "MAESTRO, CREDO CHE QUESTO NON VA", - "SICURISSIMO, MAESTRO", - "SCUSI, MAESTRO", - "VA A PORTARE UN ALTRO SCIENTIFICO PAZZO? GLI AVVERTO CHE IL LABORATORIO PIENO E NE ABBIAMO TUTTI SCADUTI", - // 5 - "ZITTO, MAESTRO, FIGURASI SE LE SENTONO LE FEMMINISTE", - "ACCIDENTI!", - "-MAESTRO! NON LE ASPETTAVO COS\326 PRESTO!", - "MALE MAESTRO, DEVONO CI ESSERE PROBLEMI CON IL SATELLITE E NON RIESCO A SINTONIZZARE L'IMMAGINE. ANZI LA TEMPESTA CAUSA INTERFERENZE", - "CHE NE SO, MAESTRO", - // 10 - "SI, MAESTROl", - "MAESTRO", - "SA CHE ORE SONO?", - "EH? -AH, CHE COLPO! TU SEI QUELLO DI \"PULIZIA NOTTURNA\" NO?", - "IO SONO IGOR, IL MAGGIORDOMO. PUOI COMINCIARE NEL SALOTTO DI BALLO, IERI C'ERA ORGIA SOPRANATURALE ED \220 PIENO DI MERDA", - // 15 - "SE HAI BISOGNO DI QUALCOSA, COMPRALA", - "LA DECLARAZIONE DI REDDITI, NON VEDI?", - "NEANCH'IO, I NUMERI SONO PICCOLISSIMI E ANZI, IO NON VEDO BENE DA LONTANO", - "NEANCHE PARLARNE, MI FANNO SEMBRARE BRUTTO", - "\220 UNA FESTA CHE FA IL MAESTRO PER I SUOI AMICI OGNI VOLTA CHE ARRIVA QUALCHE IMBECILE CHE VUOLE FINIRE CON LUI", - // 20 - "PRIMA, GLI TOGLIANO GLI OCCHI; POI GLI VERSANO SUCCO DI LIMONE, DOPO IL BRUCIORE.......", - "NO", - "COME CHE PER CHE NO? MA TU HAI VISTO CHE ORE SONO?", - "IN INVERNO, SI", - "ARRIVEDERCI", - // 25 - "N\324 PENSARCI", - "BENE, BASTA PER OGGI. VADO A CENARE", - "E CHE SEMPRE DIMENTICO CHIUDERE CON LA CHIAVE", - "ACCIDENTI!", - "EH? -AH! CHE COLPO, MAESTRO, PENSAVO STAVA DURMENDO", - // 30 - "ORA MI RICORDO, PRENDA LE CHIAVI DEL SOGGIORNO, COS\326 DOMANI MATTINA NON MI DISTURBA SE VUOLE GUARDARE I CARTONI ANIMATI", - "HA PRESSO FREDDO UN'ALTRA VOLTA, MAESTRO? SEMPRE GLI DICO CHE METTA IL RISCALDAMENTO", - "PRENDA UNA ASPIRINA ED A SUDARE. BUONA NOTTE", -}, -}; - - -const char *_textl[][32] = { -{ - // 0 - "", - "ARE YOU GOING TO LET YOURSELF BE GUIDED BY PRIMITIVE INSTINCTS JUST BECAUSE WE BELONG TO DIFFERENT RACES AND THE SOCIAL SITUATION IS TELLING US TO DO SO?", - "AREN'T WE TIED BY SENSE? WHICH IS OUR MOST POWERFUL WEAPON AS WELL AS OUR MOST PRECIOUS GIFT?", - "OH, IF WE ALL LET OUR THOUGHTS GUIDE OUR WAY IN LIFE WITHOUT LEAVING SOME ROOM FOR FEELINGS WHICH LET OUR PRE-EVOLUTIVE INSTINCTS COME OUT!", - "ANSWER ME, EPHEMERAL CREATURE. WOULDN'T WE ALL BE HAPPIER WITHOUT THOSE EMOTIONAL BINDINGS?", - // 5 - "YOU ARE NOT GETTING THROUGH", - "THIS IS A VERY CLEAR EXAMPLE, YOU SEE?: YOU WANT TO GET THROUGH AND GO AHEAD WITH YOUR ADVENTURE, AND I WON'T LET YOU DO THAT", - "WILL THIS BE A CONTROVERSIAL POINT BETWEEN US AFTER WE HAVE ONLY JUST MET?", - "WELL THEN", - "WELL, THAT DEPENDS ON WHAT WE HAVE A RELATIONSHIP FOR. SOME AUTHORS DEFEND...", - // 10 - "YUCK! HUNTING AS A WAY TO SURVIVE IS AN INCOMPREHENSIBLE ARCHAIC THING FOR A SUPERIOR BEING LIKE ME. BESIDES, I'VE BECOME A VEGETARIAN", - "IT JUST SO HAPPENS THAT I WAS ACTUALLY EATING A GUY AND I STARTED TO THINK ABOUT THE ABOVE MENTIONED THOUGHT", - "IT TOOK ME A LONG TIME TO QUIT OLD HABITS BUT AT LEAST MY IRASCIBLE SOUL SWALLOWED UP THE CONCUPISCIBLE ONE, AND EVER SINCE, I'VE NEVER EATEN MEAT AGAIN", - "NOT EVEN THE PLEASURE OF SUCKING ON THE BONE, THE TASTE OF THE SKIN AND THAT SWEET TASTE OF MARROW...THAT JUST TAKES YOU TO HEAVENLY PLACES", - "IT DOESN'T REALLY GET TO ME AT ALL", - // 15 - "WHAT?", - "I DON'T KNOW WHAT YOU'RE TALKING ABOUT, YOU EPHEMERAL CREATURE", - "I'M NOT INTERESTED", - "I DON'T KNOW ABOUT THE OTHER GAMES, BUT WE COULD USE THIS BEAUTIFUL SCREEN", - "", - // 20 - "I'D CARE...", - "NO. IT'S JUST THE SON, THE FATHER, THE GRANDFATHER AND A FRIEND, WHO ARE CALLED LIKE THAT", - "BUT, IT IS GOING TO LOOK LIKE THE GAME WAS MADE BY FIVE PEOPLE", - "THESE ARE PROMISING GUYS", - "THAT'S A GOOD ONE! A GOOD ONE!", - // 25 - "PLEASE, CALL ME CONSTANTINO", - "IT WASN'T ME MAN. IT WAS \"EL COYOTE\", MY TWIN", - "JESUS, THESE ARE REALLY LONG CREDIT TITLES", - "I STOPPED COUNTING A LONG TIME AGO", - "WHAT WILL BECOME OF YOU NOW, DESIDERIO?", - // 30 - "BUT, YOU SHOULD LOSE SOME WEIGHT", - "I'LL JUST RETIRE TO THE TIBET AND THINK ABOUT THE MEANING OF LIFE", -}, -{ - // 0 - "", - "UN MOMENTO. \250SOLO PORQUE PERTENECEMOS A RAZAS DISTINTAS Y LA SOCIEDAD DICE QUE SEREMOS ENEMIGOS VAMOS A DEJARNOS LLEVAR POR NUESTROS MAS PRIMITIVOS INSTINTOS?", - "\250ACASO NO NOS UNE LA RAZON, ELARMA MAS PODEROSA Y, A LA VEZ, EL DON MAS PRECIADO QUE TENEMOS?", - "\255AH, SI EL ENTENDIMIENTO GUIARA NUESTROS PASOS POR LA VIDA SIN DEJAR SITIO A LOS SENTIMIENTOS, QUE AFLORAN NUESTRAS INCLINACIONES PRE-EVOLUTIVAS!", - "\250NO CREES QUE SERIAMOS MAS DICHOSOS SIN ESAS ATADURAS EMOCIONALES? CONTESTA EFIMERA CRIATURA", - // 5 - "NO PASAS", - "\250VES? ESTE ES UN CLARO EJEMPLO: TU QUIERES PASAR Y CONTINUAR TU AVENTURA Y YO NO PUEDO PERMITIRLO", - "\250HA DE SER ESE MOTIVO SUFICIENTE DE CONFLICTO ENTRE NOSOTROS, QUE NO NOS CONOCEMOS DE NADA?", - "PUES ESO", - "BUENO, ESO DEPENDE DE LO QUE ENTENDAMOS POR RELACION. ALGUNOS AUTORES DEFIENDEN...", - // 10 - "AGGG. LA CAZA COMO MEDIO DE SUBSISTENCIA ES UNA ACTIVIDAD ARCAICA INCOMPATIBLE CON UNA NATURALEZA SUPERIOR COMO LA MIA. Y ADEMAS ME HE VUELTO VEGETARIANO", - "RESULTA QUE ESTABA COMIENDOME A UN TIO Y ME PUSE A REFLEXIONAR. LLEGUE A LA CONCLUSION ANTES MECIONADA", - "ME COSTO MUCHO DEJAR LOS HABITOS DESDE TANTO TIEMPO ADQUIRIDOS, PERO POR FIN MI ALMA IRASCIBLE VENCIO A LA CONCUPISCIBLE Y NO HE VUELTO A PROBAR LA CARNE", - "NI SIQUIERA EL PLACER QUE SUPONE UN HUESO, CON EL JUGO DE LA PIEL ENTRE SUS POROS Y ESE SABOR QUE TE TRANSPORTA A LUGARES REMOTOS PARADISIACOS...", - "NI SIQUIERA ME AFECTA. PARA NADA, DE VERDAD", - // 15 - "\250EL QUE?", - "NO SE DE QUE ME HABLAS, EFIMERA CRIATURA", - "NO ME INTERESA", - "LOS DEMAS JUEGOS, NO SE, PERO ESTE PARA APROVECHAR ESTA PANTALLA TAN BONITA", - "", - // 20 - "A MI SI ME DARIA", - "NO, ES QUE SON EL ABUELO, EL PADRE, EL HIJO, Y UN AMIGO QUE SE LLAMA ASI", - "NO, PERO ES QUE SI NO VA A PARECER QUE HAN HECHO EL JUEGO ENTRE CINCO", - "ESTOS CHICOS PROMETEN", - "\255ESE ES BUENO, ESE ES BUENO!", - // 25 - "LLAMAME CONSTANTINO", - "NO ERA YO, HOMBRE. ERA MI DOBLE, EL COYOTE", - "VAYA, QUE CREDITOS MAS LARGOS", - "YO YA PERDI LA CUENTA", - "BUENO DESIDERIO, \250Y QUE VA A SER DE TI AHORA?", - // 30 - "PERO TENDRIAS QUE ADELGAZAR", - "ME RETIRARE AL TIBEL A REFLEXIONAR SOBRE EL SENTIDO DE LA VIDA", -}, -{ - // 0 - "", - "MOMENT mal. NUR WEIL WIR UNTERSCHIEDLICHER HERKUNFT SIND UNd eigentlich feinde sein muessten mueSSEN WIR UNS DOCH Nicht wie die primaten auffuehren!", - "VERBINDET UNS ETWA NICHT DIE VERNUNFT, GEFaeHRLICHSTE WAFFE UND ZUGLEICH GRoeSSTE GABE, DIE WIR HABEN ?", - "AH, WENN NUR DAS GEGENSEITIGE VERSTaeNDNIS die gefuehle besiegen koennte,DIE DIE WURZEL UNSERER PRaeHISTORISCHEN NEIGUNGEN SIND!", - "GLAUBST DU NICHT, DASS WIR OHNE DIESE GEFueHLSFESSELN GLueCKLICHER WaeREN ? ANTWORTE, DU EINTAGSFLIEGE", - // 5 - "DU KOMMST NICHT DURCH", - "SIEHST DU ? DU WILLST HIER DURCH UND MIT DEM ABENTEUER WEITERMACHEN UND ICH KANN DAS NICHT ZULASSEN", - "MUSS DENN DIE TATSACHE, DASS WIR UNS NICHT KENNEN, ANLASS ZUM STREIT SEIN?", - "GENAU", - "NAJA. KOMMT DARAUF AN, WAS WIR UNTER BEZIEHUNG VERSTEHEN. EINIGE VERTRETEN JA DEN STANDPUNKT, DASS....", - // 10 - "ARRGH.nur zu jagen, um zu ueberleben ist mir zu primitiv.UND AUSSERDEM BIN ICH SEIT KURZEM VEGETARIER", - "ES GING LOS,ALS ICH MIR GERADE EINEN TYPEN EINVERLEIBTE UND ANFING NACHZUDENKEN UND ZUM EBENERWaeHNTEN SCHLUSS KAM", - "ES war hart, DIE ALTEN laster ABZULEGEN, ABER seit MEINE FLEISCHESLUST MEINEn JaeHZORN besiegt hat HABE ICH KEIN FLEISCH MEHR GEGESSEN:", - "NICHT MAL DIE GAUMENFREUDE EINES KNOCHENS, MIT DEM SAFT DER HAUT IN DEN POREN UND DIESEm GESCHMACK DER DICH INS REICH DER SINNE ENTFueHRT...", - "ES MACHT MIR ueBERHAUPT NICHTS AUS, WIRKLICH", - // 15 - "WAS JETZT ?", - "ICH WEISS NICHT, WOVON DU REDEST, DU EINTAGSFLIEGE", - "DAS INTERESSIERT MICH NICHT", - "ANDERE SPIELE, ACH ICH WEISS NICHT, ABER DAS HIER HAT SO EINE NETTE GRAFIK", - "", - // 20 - "ICH HaeTTE SCHON LUST..", - "NEIN, SO HEISSEN DER OPA, DER VATER, DER SOHN UND EIN FREUND.", - "NEIN, ABER WENN NICHT, SIEHT ES SO AUS ALS WaeRE DAS SPIEL VON FueNF LEUTEN GEMACHT WORDEN", - "DIESE JUNGS SIND VIELVERSPRECHEND !", - "DER IST GUT, SUPERKLASSE !", - // 25 - "NENN MICH KONSTANTIN", - "MANN, DAS WAR NICHT ICH, SONDERN MEIN DOUBLE, DER KOYOTE", - "WOW, WAS FueR EINE LANGE DANKESLISTE", - "ICH HAB SCHON DEN ueBERBLICK VERLOREN", - "O.K. DESIDERIO, UND WAS WIRD JETZT AUS DIR WERDEN ?", - // 30 - "ABER DANN MueSSTEST DU ABNEHMEN", - "ICH WERDE NACH TIBET AUSWANDERN UND ueBER DEN SINN DES LEBENS NACHDENKEN", -}, -{ - // 0 - "", - "c'est parce qu'on APPARTIENT \267 DES RACES DIFF\220RENTES ET QUE LA SOCI\220T\220 NOUS CONFRONTE, QUE NOUS ALLONS AGIR PAR NOS PLUS M\220PRISABLES INSTINCTS?", - "NE SOMMES-NOUS PAR HASARD ACCROCHS PAR LA RAISON, L'ARME LA PLUS PUISSANTE, ET AUSSI LE DON LE PLUS PRCIEUX QUE NOUS AVONS?", - "AH!, SI LA RAISON GUIDAIT NOS PAS DANS LA VIE SANS Y ENTRA\327NER LES SENTIMENTS, QUI FONT JAILLIR NOS INCLINAISONS PR-VOLUTIVES!", - "NE CROIS-TU PAS QUE NOUS SERIONS PLUS HEREUX SANS CES ATTACHEMENTS-L\267? RPONDS-MOI, CRATURE PHM\324RE ", - // 5 - "TU NE PASSES PAS", - "TU VOIS? C'EST UN EXEMPLE CLAIR: TOI, TU VEUX PASSER ET POURSUIVRE TON AVENTURE ET MOI, JE NE PEUX PAS LE TOLRER", - "CELA DOIT \322TRE UNE RAISON SUFFISANTE DE CONFLIT ENTRE NOUS DEUX, QUI NE NOUS CONNAISSONS DE RIEN?", - "C'EST CELA", - "EH BIEN, CELA DPEND DE CE QU'ON ENTEND PAR RLATION. D'APR\324S QUELQUES AUTEURS...", - // 10 - "LA CHASSE COMME MOYEN DE SUBSISTANCE EST UNE ACTIVIT\220 ARCHA\330QUE, INCOMPATIBLE AVEC ma NATURE SUP\220RIEURE . ET DE PLUS JE SUIS DEVENU V\220G\220TARIEN", - "IL S'EN SUIT QU'EN TRAIN DE D\220VORER UN TYPE, JE ME SUIS MIS \267 R\220FL\220CHIR. ALORS, SUIS ARRIV\220 \267 LA CONCLUSION MENTIONN\220 CI-DESSUS", - "ABANDONNER CES HABITUDES M'EST REVENU CHER, MAIS \267 LA FIN MON \266ME IRASCIBLE a vancue MON \266ME CONCUPISCIBLE, ET D\324S LORS JE N'AI GO\352T\220 \267 LA VIANDE", - "M\322ME PAS LE PLAISIR DE CROQUER UN OS, AVEC LE SUC DE LA PEAU ENTRE SES PORES ET sa SAVEUR QUI TE TRANSPORTE VERS DES LIEUX TR\324S LONTAINS, PARADISIAQUES...", - "CECI NE M'AFFECTE PAS M\322ME, ABSOLUMENT PAS, C'EST VRAI", - // 15 - "QUOI?", - "JE NE SAIS PAS DE QUOI TU M'EN PARLES, CR\220ATURE \220PH\220M\324RE", - "CELA NE ME REGARDE PAS", - "LES AUTRES JEUX, JE NE SAIS PAS; MAIS CELUI-CI OUI, POUR EN PROFITER DE CET \220CRAN SI JOLI", - "", - // 20 - "MOI, JE NE M'EN FICHERAI PAS", - "NON, C'EST QU'ILS SONT LE GRAND-P\324RE, LE P\324RE, LE FILS, ET UN AMI QUI S'APPELLE COMME \200A", - "NON, MAIS SI NON, IL VA PARA\327TRE QU'ON A FAIT LE JEU ENTRE CINQ", - "CES GAR\200ONS ONT DU FUTUR", - "CELUI-L\267 EST BON! CELUI-L\267 EST BON!", - // 25 - "APPELLE-MOI CONSTANTIN", - "CE N'\220TAIT PAS MOI, MON VIEUX. C'\220TAIT MON DOUBLE, LE COYOTE", - "TIENS! QUELS CR\220DITS SI LONGS", - "J'AI D\220J\267 PERDU LES COMPTES", - "EH BIEN, D\220SID\324RE, QUE T'ARRIVERA-T-IL MAINTENANT?", - // 30 - "MAIS TU DEVRAIS MAIGRIR", - "JE VAIS ME RETIRER AU TIBEL POUR Y R\220FL\220CHIR SUR LE SENS DE LA VIE", -}, -{ - // 0 - "", - "UN ATTIMO. PERCHE SIAMO DI DIVERSE RAZZE E LA SOCIET\265 DICA CHE SIAMO NEMICI, ANDIAMO A LASCIARCI DOMINARE PER I PI\351 PRIMITIVI ISTINTI?", - "MA NON SIAMO UNITI DALLA RAGIONE, DALLA ARMA PI\351 PODEROSA E ANCHE PER IL DONO PI\351 PREZIOSO CHE ABBIAMO?", - "SE IL GIUDIZIO GUIDASSE I NOSTRI PASSI NELLA VITA SENZA LASCIARE POSTO AI SENTIMENTI, CHE MOSTRANO LE NOSTRE INCLINAZIONI PRE-EVOLUTIVI!", - "NON CREDI CHE SAREMMO PI\351 BEATI SENZA QUESTO LEGAME EMOZIONALE? RISPONDE EFFIMERA CREATURA", - // 5 - "NON PASSI", - "VEDI? QUESTO UN CHIARO ESEMPIO: TU VUOI PASSARE E PROSEGUIRE LA TUA AVVENTURA ED IO NON POSSO PERMETTERLO", - "MA DEVE ESSERE CAUSA DI CONFRONTO QUANDO ANCORA NON CI CONOSCIAMO?", - "CHE TI HO DETTO?", - "BOH, DIPENDE DI CHE CAPIAMO COME RELAZIONE. CI SONO AUTORI CHE DIFENDONO...", - // 10 - "LA CACCIA COME FORMA DI SUSSISTENZA \220 UNA ATTIVIT\265 ARCAICA, INCOMPATIBILE CON UNA NATURA SUPERIORE COM'\220 LA MIA: ADESSO SONO VEGETARIANO", - "TEMPO FA, STAVO MANGIANDO UN TIZIO QUANDO MI SONO MESSO A RIFLETTERE. FU QUANDO LA CONCLUSIONE DI PRIMA ARRIV\220 ", - "FU DIFFICILE LASCIARE LE MIE VECCHIE ABITUDINI, MA LA MIA ANIMA IRASCIBILE HA VINTO LA CONCUPISCIBILE E NON MANGIO PI\351 DELLA CARNE", - "NEPPURE IL PIACERE CHE FA UN OSSO, COL SUCCO DELLA PELLE E QUEL SAPORE CHE TI PORTA A POSTI LONTANI E PARADISIACI...", - "NEMMENO MI TOCCA DA VICINO, DAVVERO", - // 15 - "CHE COSA?", - "NON SO SU CHE MI PARLI, EFFIMERA CREATURA", - "NON MI INTERESA", - "GLI ALTRI VIDEO-GIOCHI, NON SO, MA QUESTO \220 PER APPROFITTARE QUESTO BELLO SCHERMO", - "", - // 20 - "IO SI ME VERGOGNAREI", - "NO, SONO IL NONNO, IL PADRE, IL FIGLIO, E UN AMICO CHE SI CHIAMA COS\326 ", - "NO, MA SE NON \220 COS\326, SEMBRAR\265 CHE HANNO FATTO IL VIDEO-GIOCO IN CINQUE", - "BRAVI RAGAZZI", - "-QUELLO \220 BUONO, QUELLO \220 BUONO!", - // 25 - "CHIAMAMI COSTANTINO", - "NON ERO IO, DAI,. ERA IL MIO CONTROFIGURA, IL COYOTE", - "INSOMMA, MOLTI TITOLI DI CODA", - "IO NON SO GI\265 QUANTI", - "ALLORA PEPPINO, CHE VAI FARE ADESSO?", - // 30 - "MA DOVRESTI DIMAGRIRE", - "MI APPARTER\220 AL TIBET A RIFLETTERE SUL SENSO DELLA VITA", -}, -}; - -const char *_textp[][20] = { -{ - // 0 - "", - "HI", - "YES SIR. IT'S BEAUTIFUL", - "NO, NO. HE WON'T DO IT", - "ALL RIGHT THEN", - // 5 - "REALLY?", - "SO?", - "I'M SORRY. THE PIANIST TRADE UNION DOESN'T ALLOW ME TO SAVE GIRLS FROM VAMPIRES' CLUTCHES", - "IF SHE HAD BEEN KIDNAPPED BY THE WEREWOLF...", - "I CAN ONLY PLAY THIS SONG", - // 10 - "I'M A CONSERVATOIRE PIANIST AND THE BARTENDER WON'T BUY MORE SCORES FOR ME", - "OH GOD, I REALLY LOVE CLASSICAL MUSIC!", - "IT'S BECAUSE I'M WEARING EAR-PLUGS", - "IT'S BECAUSE I CAN LIP-READ", - "NOOO", - // 15 - "NO! I'M NOT TAKING THIS ANY LONGER!", - "NO WAYYYYY!", - "WHAT? OF COURSE I'M INTERESTED", - "THANK GOD! I CAN PLAY A DIFFERENT SONG NOW!", - "I GUESS YOU CAN KEEP MY EAR-PLUGS", -}, -{ - // 0 - "", - "HOLA", - "BONITA. SI SE\245OR", - "NO QUE NO LO HACE", - "PUES VALE", - // 5 - "\250SI?", - "\250Y?", - "LO SIENTO. EL SINDICATO DE PIANISTAS NO ME PERMITE RESCATAR CHICAS DE LAS GARRAS DE LOS VAMPIROS", - "SI LA HUBIERA RAPTADO UN HOMBRE LOBO...", - "NO PUEDO TOCAR MAS QUE ESTA CANCION", - // 10 - "ES QUE SOY PIANISTA DE CONSERVATORIO Y EL TABERNERO NO COMPRA MAS PARTITURAS", - "\255CON LO QUE A MI ME GUSTA LA MUSICA CLASICA!", - "PORQUE LLEVO TAPONES EN LOS OIDOS", - "PORQUE LEO LOS LABIOS", - "NOOO", - // 15 - "\255QUE NO! \255QUE NO ME AGUANTO!", - "\255QUE NOOOOOO!", - "\250QUE? CLARO QUE ME INTERESA", - "AHORA PODRE TOCAR OTRA CANCION \255QUE ALIVIO!", - "SUPONGO QUE TE PUEDES QUEDAR CON MIS TAPONES", -}, -{ - // 0 - "", - "HALLO", - "JAWOLL, SEHR SCHoeN", - "NEIN, ER TUT ES EINFACH NICHT", - "NA GUT, OK.", - // 5 - "JA ?", - "UND ?", - "TUT MIR LEID. DIE KLAVIERSPIELERGEWERKSCHAFT ERLAUBT ES MIR NICHT, MaeDCHEN AUS DEN KLAUEN VON VAMPIREN ZU BEFREIEN", - "WENN SIE WERWOLF ENTFueHRT HaeTTE.....", - "ICH KANN NUR DIESES EINE LIED", - // 10 - "ICH HABE AM KONSERVATORIUM KLAVIER GESPIELT UND DER WIRT WILL MEINE PARTITueDEN NICHT KAUFEN", - "WO MIR DOCH KLASSISCHE MUSIK SO GUT GEFaeLLT !", - "WEIL ICH OHRENSToePSEL IN DEN OHREN HABE", - "WEIL ICH VON DEN LIPPEN LESEN KANN", - "NEEEIN", - // 15 - "NEEIEN! ICH KANN MICH NICHT BEHERRSCHEN !", - "NEIN,NEIN,UND NOCHMAL NEIN !", - "WIE BITTE ? KLAR BIN ICH INTERESSIERT", - "ENDLICH KANN ICH WAS ANDERES SPIELEN,WELCH ERLEICHTERUNG !", - "ICH GLAUBE, DU KANNST MEINE OHRENSToePSEL BEHALTEN", -}, -{ - // 0 - "", - "BONJOUR!", - "JOLIE, OUI M'SIEUR", - "NON, QU'ELLE NE LE FAIT PAS", - "D'ACCORD, A VA", - // 5 - "OUI?", - "ET QUOI?", - "SUIS DSOL. LE SYNDICAT DE PIANISTES NE ME PERMET PAS DE LIBRER LES FILLES DES GRIFFES DE VAMPIRES", - "SI ELLE AVAIT T RAPTE PAR UN HOMME-LOUP...", - "JE NE PEUX PAS JOUER DAVANTAGE CETTE CHANSON", - // 10 - "JE SUIS LE PIANISTE DU CONSERVATOIRE ET LE TAVERNIER N'ACH\324TE PAS MES PARTITIONS", - "ET MOI QUI AIME BEAUCOUP LA MUSIQUE CLASSIQUE!", - "PARCE QUE J'AI DES TAMPONS \267 L'OU\330E", - "PARCE QUE JE LIS LES LEVRES", - "NOOON!", - // 15 - "QUE NON! QUE JE NE PEUX PAS ME RETENIR DAVANTAGE!", - "QUE NOOOOOON!", - "QUOI? BIEN S\352R QUE \200A M'INT\220RESSE", - "MAINTENANT JE POURRAI JOUER UNE AUTRE CHANSON -QUEL SOULAGEMENT!", - "TU PEUX GARDER MES TAMPONS, JE SUPPOSE", -}, -{ - // 0 - "", - "CIAO", - "BELLA, MOLTO BELLA", - "NO, CHE NON LO FA", - "VA BENE", - // 5 - "-SI?", - "E?", - "MI DISPIACE. IL SINDACATODI PIANISTI NON MI DA PERMESSO PER LIBERARE RAGAZZE DALLE MANI DI VAMPIRI", - "SE LA AVESSE SEQUESTRATA IL LUPO-MANNARO...", - "SOLTANTO POSSO SUONARE QUESTA CANZONE", - // 10 - "\324 PERCHE SONO PIANISTA DI CONSERVATORIO E IL TABERNERO NON COMPRA PI\353 PARTITURE", - "PECCATO.....MI PIACE MOLTISSIMO LA MUSICA CLASSICA!", - "PERCHE MI HO MESSO TAPPI NEGLI ORECCHII", - "PERCHE SO LEGGERE LE LABRA", - "NOOO", - // 15 - "NO!, NON MI SOPPOROTO!", - "HO DETTO DI NOOO!", - "COSA? SI, SI MI INTERESA, COME NO", - "ADESSSO POTR\343 SUONARE UN'ALTRA CANZONE, GRAZIE!!", - "CREDO CHE I MIEI TAPPI ADESSO SONO TUOI", -}, -}; - - -const char *_textt[][25] = { -{ - // 0 - "", - "WHAT HAPPENED? WHAT'S THE MATTER?", - "OK. ROOM 512. UPSTAIRS. THE KEY IS UNDER THE DOOR", - "COUNT DRASCULA!!?", - "NO, NOTHING. THAT GUY JUST HAS A BAD REPUTATION AROUND HERE", - // 5 - "WELL, THERE ARE ALL KINDS OF STORIES GOING AROUND ABOUT HIM, SOME SAY HE IS A VAMPIRE WHO KIDNAPS PEOPLE TO SUCK THEIR BLOOD", - "HOWEVER, SOME OTHERS SAY THAT HE IS JUST AN ORGAN-DEALER AND THAT IS THE REASON WHY THERE ARE BODY PARTS ALL OVER THE PLACE", - "BUT OF COURSE, THOSE ARE JUST RUMORS. HE'S PROBABLY BOTH THINGS. BY THE WAY, WHY DO YOU WANT TO MEET HIM?", - "FORGET IT. I'M REALLY BUSY...", - "WELL, OK. BUT JUST BECAUSE I WANT TO DO IT, NOT BECAUSE YOU TOLD ME TO", - // 10 - "THEY'RE WINNING", - "LEAVE ME ALONE, ALL RIGHT?", - "OF COURSE. I'M NOT BLIND", - "THE TRADITION IN THIS VILLAGE IS TO FORGET ALL HARD FEELINGS WHENEVER THERE IS A GAME, TO CHEER UP THE LOCAL TEAM", - "AND PLEASE, SHUT UP FOR GOD'S SAKE. I CAN'T HEAR ANYTHING!", - // 15 - "COME ON, LEAVE ME ALONE AND DON'T BOTHER ME ANYMORE", - "IT HAS JUST STARTED! SHUT UP!", - "OK, OK, I THOUGHT SOMETHING WAS GOING ON", - "IT DOESN'T MATTER, ANYWAY. SHE IS PROBABLY DEAD BY NOW", - "HE JUST STARTED PLAYING CLASSICAL MUSIC, AND I COULDN'T STAND IT", - // 20 - "SINCE I'M PAYING HIM FOR PLAYING WHATEVER I WISH, I JUST FIRED HIM", - "AND THEN, HE GOT FRESH WITH ME. JESUS!, HE LOOKED SO NICE AND INNOCENT...WHAT A HYPOCRITE!", - "BY THE WAY, BE CAREFUL BECAUSE I JUST WAXED THE FLOOR", - "SHUT UP! WE'RE WATCHING THE GAME!", - "OH, COME ON! TAKE IT!", -}, -{ - // 0 - "", - "\250QUE PASA, QUE PASA?", - "DE ACUERDO. HABITACION 512. SUBIENDO POR LAS ESCALERAS. LA LLAVE ESTA EN LA PUERTA", - "\255\250 EL CONDE DRASCULA ?!", - "NO, NADA. ESE TIPO TIENE MALA FAMA POR AQUI", - // 5 - "BUENO, CORREN VARIOS RUMORES SOBRE EL. ALGUNOS DICEN QUE ES UN VAMPIRO Y VA SECUESTRANDO GENTE PARA CHUPARLES LA SANGRE", - "CLARO, QUE OTROS OPINAN QUE SOLO ES UN TRAFICANTE DE ORGANOS, Y POR ESO APARECE GENTE DESCUARTIZADA POR LOS ALREDEDORES", - "POR SUPUESTO SON SOLO RUMORES. LO MAS PROBABLE ES QUE SEA LAS DOS COSAS. POR CIERTO, \250PARA QUE QUIERE USTED VER A ESE TIPO?", - "NO DEJELO, QUE ES QUE TENGO MUCHO QUE HACER...", - "BUENO VALE, PERO PORQUE QUIERO YO, NO PORQUE LO DIGAS TU", - // 10 - "VAN GANANDO", - "DEJAME EN PAZ, \250VALE?", - "PUES CLARO, NO SOY CIEGO", - "ES TRADICION EN EL PUEBLO QUE CUANDO HAY PARTIDO SE OLVIDAN RENCORES PARA ANIMAR A LA SELECCION", - "Y CALLATE YA DE UNA VEZ, QUE NO ME DEJAS OIR", - // 15 - "ANDA, DEJAME EN PAZ Y NO MOLESTES", - "\255ACABA DE EMPEZAR! \255Y CALLATE!", - "AH, BUENO. CREIA QUE PASABA ALGO", - "NO, SI ES IGUAL. A ESTAS HORAS YA ESTARA MUERTA", - "ES QUE SE PUSO A TOCAR MUSICA CLASICA Y YO NO LA AGUANTO", - // 20 - "Y COMO YO LE PAGO PARA QUE TOQUE LO QUE YO QUIERO, PUES LE HE ECHADO", - "Y ENCIMA SE ME PUSO CHULO... \255Y PARECIA UNA MOSQUITA MUERTA!", - "...POR CIERTO, TENGA CUIDADO. EL SUELO ESTA RECIEN ENCERADO", - "\255SILENCIO! \255ESTAMOS VIENDO EL PARTIDO!", - "\255VENGA, ANDA! TOMA.", -}, -{ - // 0 - "", - "WAS ZUM TEUFEL IST LOS ?", - "O.K. ZIMMER 512. DIE TREPPE HOCH. DIE SCHLueSSEL STECKEN SCHON", - " GRAF DRASCULA ? !", - "NEIN, DER TYP HAT HIER EINEN SCHLECHTEN RUF", - // 5 - "NAJA, ES GIBT MEHRERE GERueCHTE ueBER IHN. EINIGE BEHAUPTEN, DASS ER LEUTE ENTFueHRT UND IHNEN DAS BLUT AUSSAUGT", - "KLAR, ANDERE GLAUBEN, DASS ER EIN ORGANHaeNDLER IST UND DESHALB TAUCHEN ueBERALL AM WALDRAND ZERSTueCKELTE LEICHEN AUF", - "NATueRLICH SIND DAS ALLES NUR GERueCHTE. HoeCHSTWAHRSCHEINLICH STIMMEN SIE ABER. ACH, UND WAS WOLLEN SIE VON IHM ?", - "NEIN, VERGESSEN SIES. ICH HABE NaeMLICH ZU TUN...", - "O.K. ABER WEIL ICH DAS WILL UND NICHT WEIL DU DAS SAGST", - // 10 - "SIE GEWINNEN", - "LASS MICH IN RUHE, OK ?", - "KLAR, ICH BIN DOCH NICHT BLIND", - "ES IST EIN ALTER BRAUCH IM DORF, DASS MAN BEI EINEM SPIEL ALTE ZWISTE VERGISST, UM DIE MANNSCHAFT ANZUFEUERN", - "UND HALT ENDLICH DEINEN MUND, ICH WILL ZUHoeREN", - // 15 - "MANN, LASS MICH IN RUHE UND NERV MICH NICHT", - "ES FaeNGT GERADE AN ! STILL JETZT !", - "ACH SO, ICH DACHTE ES IST IRGENDWAS LOS", - "NEIN, IST DOCH EGAL. JETZT WIRD SIE EH SCHON TOT SEIN", - "ER HAT KLASSIK GESPIELT UND ICH HALTE DAS NICHT AUS", - // 20 - "UND WEIL ICH ES BIN, DER IHN DAFueR BEZAHLT, DASS ER SPIELT, WAS ICH WILL, HABE ICH IHN ENTLASSEN", - "UND DANN KAM ER MIR AUCH NOCH SCHRaeG... UND WAS FueR EINE PAPPNASE ER DOCH IST !", - "...ACH JA, UND PASSEN SIE AUF. DER BODEN IST FRISCH GEBOHNERT", - "RUHE !WIR GUCKEN GERADE DAS SPIEL !", - "LOS, HAU REIN, GIBS IHM", -}, -{ - // 0 - "", - "QU'EST-CE QU'IL Y A, QU'Y A-T-IL?", - "D'ACCORD. CHAMBRE 512. PAR LES ESCALIERS. LA CL EST SUR LA PORTE", - "LE COMTE DRASCULA?!", - "NON, RIEN, CE TYPE A UNE MAUVAISE R\220PUTATION PAR ICI", - // 5 - "EH BIEN, IL Y A DES RUMEURS QUI COURENT SUR LUI. CERTAINS DISENT QUE C'EST UN VAMPIRE ET QU'IL ENLEVE DU MONDE POUR SUCER LEUR SANG ", - "MAIS D'AUTRES PENSENT QU'IL EST SEULEMENT UN TRAFICANT D'ORGANES, ET C'EST POUR CELA QUE DES PERSONNES DPECES SONT APPARUES DANS LES ALENTOURS", - "CERTAINEMENT IL NE S'AGIT QUE DES BRUITS QUI COURENT. S\352REMENT IL AURA LES DEUX MTIERS. MAIS, POURQUOI VOULEZ-VOUS VOIR CE TYPE?", - "OH, NON! OUBLIEZ CELA, J'AI BEAUCOUP \267 FAIRE.", - "BON, A VA. MAIS PARCE QUE JE VEUX ET NON PARCE QUE TU LE DIS", - // 10 - "ILS GAGNENT", - "FICHE-MOI LA PAIX, D'ACCORD?", - "C'EST S\352R, JE NE SUIS PAS UN AVUGLE", - "SELON LA TRADITION DU VILLAGE, QUAND IL Y A UN MATCH ON OUBLIE LES RANCUNES, POUR ALLER ENCOURAGER LA S\220LECTION", - "ET FERME-LA D'UNE FOIS!, JE NE PEUX PAS ENTENDRE", - // 15 - "ALLEZ, VA-T'-EN ET NE D\220RANGES PAS!", - "\200A VIENT DE COMMENCER! -ET TAIS-TOI!", - "AH, BON! JE PENSAIS QU'IL SE PASSAIT QUELQUE CHOSE", - "NON, C'EST \220GAL. \267 CES HEURES-CI ELLE SERA D\220J\267 MORTE", - "LE FAIT EST QU'ELLE A COMMENC\220 JOUER DE LA MUSIQUE CLASSIQUE ET QUE JE NE SUPPORTE PAS CELA", - // 20 - "ET MAINTENANT QUE JE LUI AI MIS DEHORS, COMMENT JE LUI PAIE POUR QU'IL JOUE CE QUE JE VEUX", - "ET ENCORE IL S'EST MONTR\220 ARROGANT... -ET DIRE QU'IL PARAISSAIT UNE SAINTE-NITOUCHE!", - "...FAITES ATTENTION, ON VIENT DE CIRER LE PARQUET", - "SILENCE! ON VOIT LE MATCH!", - "OH L\267 L\267! TIENS!", -}, -{ - // 0 - "", - "CHE SUCCEDE, CHE SUCCEDE?", - "D'ACCORDO. CAMERA 512. DEVE SALIRE LE SCALE. LA CHIAVE \324 NELLA PORTA", - "IL CONDE DRASCULA?", - "NO, NIENTE. QUEL TIZIO HA MALA REPUTAZIONE QU\336", - // 5 - "SE DICONO MOLTE COSE SU LUI. COME CH'\324 UN VAMPIRO E SEQUESTRA GENTE PER BERE LA SUA SANGUE", - "ALTRI DICONO CHE SOLO \324 UN TRAFFICANTE DI ORGANI, PER QUELLO TROVIAMO GENTE SQUARTATA FUORI LE MURA", - "SONO SOLTANTO CHIACCHIERE. FORSE SIA LE DUE COSE. MA, PERCHE VUOLE TROVARE QUEL TIZIO?", - "NO, HO MOLTO DA FARE..", - "VA BENE, MA PERCHE VOGLIO IO, NON PERCHE L'ABBIA DETTO TU", - // 10 - "ADESSO VINCONO", - "LASCIAMI IN PACE, O.K.?", - "CERTO, NON SONO CIECO", - "C'\324 LA TRADIZIONE NEL PAESE DI DIMENTICARE I RANCORI QUANDO C'\324 PARTITA DI CALCIO; PER ANIMARE LA SELEZIONE", - "TI HO DETTO DI STARE ZITTO, NON RIESCO A SENTIRE", - // 15 - "LASCIAMI IN PACE E NON MI DISTURBARE", - "\324 APPENA COMINCIATO, ZITTO!", - "AH, BENE. HO PENSATO CHE SUCCEDEVA QUALCOSA", - "NO, NON FA NIENTE. ADESSO SICURO CH'\324 GI\267 MORTA", - "SI \324 MESSO A SUONARE MUSICA CLASSICA ED IO LA ODIO", - // 20 - "\324 COME FACCIO PER SENTIRE QUELLO CHE VOGLIO SE L'HO LICENZIATO", - "E ORA SI METTE BULLO...-E SEMBRAVA PROPRIO SCEMO!", - "...SENTA! FACCIA ATTENZIONE. IL PAVIMENTO \324 APPENA INCERATO", - "ZITTO! - STIAMO GUARDANDO LA PARTITA!", - "DAI! PRENDI", -}, -}; - - -const char *_textvb[][63] = { -{ - // 0 - "", - "WHO THE HELL IS CALLING AT THIS TIME?", - "OH, ..OH, NO, NO....I'M...GANIMEDES THE DWARF. PROFESSOR VON BRAUN DOESN'T LIVE HERE ANYMORE", - "NO, I DON'T KNOW WHERE HE LIVES !!", - "GET OUT!!", - // 5 - "IT'S TOO LATE NOW, YOU IDIOT!! IT ALWAYS IS", - "I COULDN'T AGREE MORE", - "ME, SCARED?", - "LISTEN HERE, DUDE. YOU'RE TALKING TO THE ONLY PERSON WHO KNOWS THE SECRET OF HOW TO FIGHT AGAINST THE VAMPIRES", - "YOU NEED TO HAVE SPECIAL SKILLS TO FIGHT AGAINST A VAMPIRE. NOT EVERYBODY CAN DO IT", - // 10 - "YOU DON'T HAVE THEM", - "I'M SURE YOU WOULDN'T BET ALL YOUR MONEY ON IT, HUH?", - "WELL, ALL RIGHT, COME ON IN", - "IF YOU REALLY MEAN TO FACE DRASCULA, YOU'VE GOT TO BE ABLE TO STAND ALL TYPES OF CREAKING AND VAMPIRE-LIKE NOISES", - "IS THAT CLEAR?", - // 15 - "OK, WAIT A MINUTE", - "STAND IN THE CENTER OF THE ROOM, PLEASE", - "NOW WHERE DID I PUT THE RECORD CALLED \"NAILS SCRATCHING THE BLACKBOARD\"?", - "ALL RIGHT. LET'S GET TO IT", - "YOU ARE USELESS. YOU SEE...?, JUST LIKE THE REST!!", - // 20 - "JUST GIVE ME THE MONEY, YOU LOST SO GET OUT OF HERE", - "AND DON'T COME BACK UNTIL YOU ARE ABSOLUTELY READY", - "WHAT DO YOU WANT NOW?", - "I HAVE TO ADMIT IT. YOU REALLY HAVE WHAT IT TAKES TO FIGHT AGAINST THE VAMPIRES", - "HEY, TAKE YOUR MONEY. I'LL ADMIT IT. I MAKE A MISTAKE...", - // 25 - "LEAVE ME ALONE NOW, I WANT TO GET SOME SLEEP", - "WHENEVER YOU ARE READY TO FIGHT AGAINST THE VAMPIRES, JUST COME BACK AND I'LL HELP YOU OUT", - "OH, THAT'S EASY. TAKE THIS CRUCIFIX JUST USING IT'S LIGHT IS ENOUGH TO DESTROY A VAMPIRE", - "YOU HAVE TO BE EXTRA CAREFUL WITH DRASCULA, HIS FRISISNOTIC POWERS HAVE MADE OF HIM THE MOST POWERFUL VAMPIRE", - "YOU'D BE LOST IF IT WASN'T FOR THIS...", - // 30 - "...BREW!", - "YEAH, YOU'RE RIGHT! I MIGHT HAVE SOME PROBLEMS WITH MY BACK IN THE FUTURE IF I KEEP ON SLEEPING THIS WAY", - "I UNDERSTAND HE WAS A BETTER OPPONENT THAN ME, BUT YOU HAVE TO ADMIT THAT THE DISCOVERY I MADE ABOUT ANTI-VAMPIRE TECHNIQUES WAS WHAT ACTUALLY PROTECTED ME", - "I'VE FOUND THIS IMMUNIZING BREW THAT KEEPS YOU SAFE FROM ANY VAMPIRES' BITE OR AGAINST HIS FRISISNOTIC POWERS", - "NO, NO, EXCUSE ME. I HAD IT ONCE BUT IT'S VERY DANGEROUS TO HAVE A BREW OF THAT TYPE. CAN YOU IMAGINE WHAT COULD HAPPEN IF A VAMPIRE GOT IT?", - // 35 - "HE'D BE IMMUNIZED AGAINST GARLIC, AND THE SUNSLIGHT... SO I HAD TO GET RID OF WHAT I DIDN'T USE BY THE SCIENTIFIC METHOD OF THROWING IT IN THE LAVATORY", - "DON'T WORRY, I REMEMBER EXACTLY HOW TO MAKE THAT BREW", - "I NEED GARLIC, BUT I ALREADY HAVE THAT. HOWEVER YOU'LL HAVE TO GET ME SOME WAX, BUBBLE GUM AND CIGARETTE PAPER OR PERHAPS A NAPKIN OR SOMETHING ALIKE", - "OH...AND OF COURSE THE MOST IMPORTANT INGREDIENT. LEAVES FROM A VERY STRANGE PLANT CALLED FERNAN", - "IT'S A CLIMBING PLANT WHOSE LEAVES HAVE MAGIC POWERS IF THEY'RE CUT WITH A GOLDEN SICKLE", - // 40 - "SO AS SOON AS YOU HAVE THESE FIVE THINGS, JUST COME HERE AND I'LL MAKE THE BREW", - "YOU'LL BE READY THEN TO FIGHT AGAINST DRASCULA", - "REMEMBER: WAX, NICOTINE, A PIECE OF BUBBLE GUM, PAPER AND SOME FERNAN'S LEAVES CUT WITH A GOLDEN SICKLE", - "I TOLD YOU! IT WAS BECAUSE OF THE BREW!", - "OH, ALL RIGHT. I'M GOING TO MAKE MYSELF ...THE BREW. JUST A MOMENT, OK?", - // 45 - "IT'S A PROTECTING SPELL AGAINST VAMPIRES", - "I PUT IT THERE IN ORDER TO PRETEND THE ARTIST DIDN'T FORGET TO DRAW THE WINDOW YOU CAN SEE FROM OUTSIDE", - "ALL RIGHT, THE FIRST THING YOU MUST KNOW IS THE WAY TO DRASCULA'S CASTLE", - "THERE IS A CAVERN THAT GETS YOU STRAIGHT FROM THE CASTLE. IGOR, THE CRAZY SERVANT', TAKES IT TO GET TO THE VILLAGE EACH MORNING", - "BE CAREFUL THOUGH, THERE IS A VAMPIRE ALWAYS WATCHING OVER IT. YOU'LL HAVE TO GET RID OF HIM", - // 50 - "THERE IS AN OLD WELL RIGHT BY THE CEMETERY CHURCH", - "IT WAS USED A LONG TIME AGO FOR WITCHCRAFT TRIALS", - "THEY THREW THE WITCHES IN THE WELL. IF THEY DROWNED THEY WERE REAL WITCHES. IF THEY DIDN'T, THEY WEREN'T", - "WE THREW ONE ONCE AND SHE DIDN'T DROWN, I GUESS SHE WASN'T A WITCH", - "ANYWAY. THERE IS YOUR BREW. HOWEVER, I ONLY GOT TO MAKE ENOUGH FOR ONE PERSON", - // 55 - "YOU'D BETTER SMOKE IT RIGHT BEFORE YOU FIGHT AGAINST DRASCULA", - "COME ON, RUN!", - "OH, JUST EXCUSES...!", - "ARE YOU JOHN HACKER? I'M DOCTOR VON BRAUN", - "LISTEN TO ME, THIS IS VERY IMPORTANT. IT'S ABOUT THE BREW", - // 60 - "SHUT UP AND LET ME TALK. I JUST FOUND THIS BOOK ABOUT ANTI-VAMPIRE BREWS WARNING AGAINST MIXING THE CIGARETTE WITH ANY ALCOHOLIC DRINK", - "ALCOHOL REACTS WHEN MIXED WITH BREW, SO THAT IT CANCELS OUT IT'S EFFECTS IN A FEW SECONDS", - "I'M SORRY, BUT I HAVE TO HANG UP RIGHT NOW. THE POLICE ARE LOOKING FOR ME, THEY THINK I'M A DRUG PUSHER. IDIOTS!. ANYWAY, BYE AND GOOD LUCK SAVING THE WORLD!", -}, -{ - // 0 - "", - "\250QUIEN DIABLOS LLAMA A ESTAS HORAS?", - "EH... NO, NO. YO SOY EL ENANO GANIMEDES... EL PROFESOR VON BRAUN YA... YA NO VIVE AQUI", - "\255NO, NO SE DONDE ESTA!", - "\255QUE TE VAYAS! ", - // 5 - "IMBECIL. YA ES DEMASIADO TARDE, SIEMPRE LO ES", - "ESTOY TOTALMENTE DE ACUERDO", - "\250YO MIEDO?", - "ENTERATE CHAVAL: ESTAS HABLANDO CON EL UNICO QUE CONOCE EL SECRETO PARA ENFRENTARSE A LOS VAMPIROS", - "NO TODO EL MUNDO ES CAPAZ DE LUCHAR CON UN VAMPIRO. HAY QUE TENER UNAS CUALIDADES ESPECIALES", - // 10 - "NO LAS TIENES", - "\250TE APUESTAS TODO TU DINERO A QUE NO?", - "ESTA BIEN. PASA", - "SI DE VERDAD ERES CAPAZ DE ENFRENTARTE A DRASCULA, DEBER PODER SOPORTAR TODOS LOS RUIDOS CHIRRIANTES Y VAMPIRICOS", - "\250QUEDA CLARO?", - // 15 - "DE ACUERDO. ESPERA UN MOMENTO", - "POR FAVOR, PONTE EN EL CENTRO DE LA HABITACION", - "VEAMOS. \250DONDE HE PUESTO EL DISCO ESTE DE \"U\245AS ARRASCANDO UNA PIZARRA\"?", - "MUY BIEN. VAMOS ALLA", - "\250VES? ERES UN INUTIL, COMO TODOS LOS DEMAS", - // 20 - "AHORA DAME EL DINERO QUE HAS PERDIDO Y VETE DE AQUI", - "Y NO VUELVAS HASTA QUE NO ESTES PREPARADO DEL TODO", - "\250Y QUE ES LO QUE QUIERES TU AHORA?", - "HE DE RECONOCERLO... TIENES APTITUDES PARA LUCHAR CON LOS VAMPIROS", - "POR CIERTO, TOMA TU DINERO. SE CUANDO ME HE EQUIVOCADO", - // 25 - "AHORA VETE, QUE QUIERO DORMIR UN POCO", - "CUANDO ESTES DISPUESTO A ENFRENTARTE A ALGUN VAMPIRO, VUELVE Y TE AYUDARE EN LO QUE PUEDA", - "OH, ESO ES FACIL. LA LUZ DEL SOL O UN CRUCIFIJO Y LE HACES POLVO", - "CON EL QUE DEBES PONER ESPECIAL CUIDADO ES CON DRASCULA. SUS PODERES FRISISHNOSTICOS LE HACEN EL MAS PODEROSO DE LOS VAMPIROS", - "ESTARIAS PERDIDO A NO SER POR LA...", - // 30 - "...\255POCION!", - "OH, CLARO. TIENES RAZON, SI SIGO DURMIENDO ASI A LO MEJOR TENGO PROBLEMAS DE COLUMNA CUANDO SEA VIEJO", - "BUENO, ADMITO QUE RESULTO MEJOR ADVERSARIO QUE YO, PERO MI PRINCIPAL HALLAZGO EN EL ESTUDIO DE TECNICAS ANTI-VAMPIROS FUE LO QUE ME CUBRIO LAS ESPALDAS", - "DESCUBRI UNA POCION DE INMUNIDAD. TE HACE INVULNERABLE ANTE CUALQUIER MORDEDURA DE VAMPIRO, O A SUS PODERES FRSISSHNOTICOS", - "NO, PERDONA LA TUVE EN SU DIA, PERO UNA POCION DE ESAS CARACTERISTICAS ES PELIGROSA. IMAGINATE SI CAYERA EN MANOS DE UN VAMPIRO", - // 35 - "LE HARIA INMUNE A LOS AJOS, A LA LUZ DEL SOL... ASI QUE TUVE QUE DESHACERME DE LO QUE NO USE POR EL CIENTIFICO METODO DE TIRARLO A LA TAZA DEL WATER", - "TRANQUILO, ME ACUERDO PERFECTAMENTE DE COMO PREPARAR ESA POCION ", - "NECESITO AJOS, QUE DE ESO YA TENGO, PERO ME TENDRAS QUE CONSEGUIR ALGO DE CERA, NICOTINA, UN CHICLE, Y UN PAPEL DE FUMAR, O UNA SERVILLETA, O ALGO PARECIDO", - "\255AH! Y POR SUPUESTO, EL INGREDIENTE PRINCIPAL: UNAS HOJAS DE UNA EXTRA\245A PLANTA LLAMADA FERNAN", - "SE TRATA DE UNA PLANTA ENREDADERA CUYAS HOJAS PROPORCIONAN PODERES MAGICOS SI SE CORTAN CON UNA HOZ DE ORO", - // 40 - "PUES YA SABES, EN CUANTO TENGAS ESAS CINCO COSAS ME LAS TRAES Y TE PREPARARE LA POCION", - "DESPUES ESTARAS LISTO PARA LUCHAR CON DRASCULA", - "RECUERDA: CERA, NICOTINA, UN CHICLE, UN PAPEL Y UNAS HOJAS DE FERNAN, LA PLANTA, CORTADAS CON UNA HOZ DE ORO", - "\255YA TE LO HE DICHO! FUE TODO GRACIAS A LA POCION", - "AH, MUY BIEN. VOY ENTONCES A PREPARARME EL PO... LA POCION. SOLO TARDO UN MOMENTO", - // 45 - "ES UN SORTILEGIO DE PROTECCION CONTRA VAMPIROS", - "LO PUSE PARA DISIMULAR QUE EL DIBUJANTE SE OLVIDO DE PONER LA VENTANA QUE SE VE DESDE FUERA", - "BUENO, LO PRIMERO QUE DEBES SABER ES COMO SE VA AL CASTILLO DRASCULA", - "HAY UNA GRUTA QUE LLEVA DIRECTAMENTE AL CASTILLO Y QUE ESE LOCO FAN DE ELVIS, IGOR, USA PARA BAJAR AL PUEBLO POR LAS MA\245ANAS", - "PERO TEN CUIDADO, SIEMPRE ESTA PROTEGIDA POR UN VAMPIRO. TENDRAS QUE LIBRARTE DE EL", - // 50 - "HAY UN VIEJO POZO AL LADO DE LA CAPILLA DEL CEMENTERIO", - "SE USABA ANTIGUAMENTE PARA JUZGAR CASOS DE BRUJERIA", - "SE TIRABA A LAS BRUJAS AL POZO. SI SE HUNDIAN ERAN BRUJAS. SI NO, NO", - "UNA VEZ TIRAMOS A UNA Y NO SE HUNDIO, ASI QUE NO SERIA BRUJA", - "A LO QUE VAMOS: TOMA TU POCION, PERO SOLO ME HA DADO PARA UNO", - // 55 - "LO MEJOR ES QUE TE LO FUMES JUSTO ANTES DE ENFRENTARTE A DRASCULA", - "CORRE", - "\255EXCUSAS!", - "\250JOHN HACKER? SOY EL DOCTOR VON BRAUN", - "ESCUCHEME, ES MUY IMPORTANTE. ES SOBRE LA POCION", - // 60 - "ME HE ENCONTRADO UN LIBRO SOBRE POCIONES Y DICE QUE NO DEBE USTED BEBER ALCOHOL UNA VEZ SE HAYA FUMADO LA POCION", - "EL ALCOHOL INGERIDO REACCIONA CON LAS SUSTANCIAS DE LA POCION Y ANULA SUS EFECTOS EN DECIMAS DE SEGUNDO", - "TENGO QUE COLGAR. LA POLICIA ME BUSCA. DICEN QUE TRAFICO CON DROGAS \255IGNORANTES! BUENO, ADIOS Y SUERTE SALVANDO AL MUNDO", -}, -{ - // 0 - "", - "WER ZUM TEUFEL KLINGELT UM DIESE UHRZEIT ?", - "aeH......NEIN, NEIN. ICH BIN HELGE SCHNEIDER...HERR PROFESSOR VON BRAUN ...aeH...WOHNT HIER NICHT MEHR", - "NEIN, ICH WEISS NICHT WO ER IST !", - "NUN GEH SCHON !", - // 5 - "TROTTEL. ES IST SCHON ZU SPaeT, WIE IMMER", - "ICH BIN ABSOLUT EINVERSTANDEN", - "ICH UND DIE HOSEN VOLL ?", - "DAMIT DAS KLAR IST, KURZER : DU SPRICHST GERADE MIT DEM EINZIGEN DER DAS GEHEIMREZEPT GEGEN VAMPIRE HAT", - "NICHT JEDER KANN GEGEN EINEN VAMPIR ANTRETEN.MAN MUSS EIN PAAR GANZ BESONDERE EIGENSCHAFTEN BESITZEN", - // 10 - "DU HAST SIE NICHT", - "WETTEN NICHT ? 100.000 MARK, DASS NICHT !", - "SCHON GUT, KOMM REIN", - "WENN DU DICH DRACULA WIRKLICH STELLEN WILLST WIRST DU ALLE DIESE VAMPIRTYPISCHEN SAUG-UND QUIETSCHGERaeUSCHE ERTRAGEN MueSSEN", - "IST DAS KLAR ?", - // 15 - "O.K. WARTE MAL EINEN MOMENT", - "STELL DICH BITTE MAL IN DIE MITTE DES ZIMMERS", - "GUCKEN WIR MAL. WO IST DIESE PLATTE MIT\"FINGERNaeGEL KRATZEN AN DER TAFEL ENTLANG\" ?", - "SEHR GUT, GEHEN WIR DA HIN", - "SIEHST DU, DU BIST GENAUSO UNFaeHIG WIE ALLE ANDEREN !", - // 20 - "JETZT GIB MIR DAS GELD,UM DAS WIR GEWETTET HABEN UND KOMM HER", - "UND KOMM ERST DANN WIEDER, WENN DU 100%IG VORBEREITET BIST", - "UND WAS WILLST DU JETZT ?", - "ICH MUSS ZUGEBEN, DASS DU DAS NoeTIGE TALENT ZUR VAMPIRJAGD HAST", - "ueBRIGENS, HIER IST DEIN GELD. ICH HABE MICH GEIRRT", - // 25 - "UND JETZT GEH, ICH MoeCHTE MICH HINLEGEN", - "KOMM ZURueCK,WENN DU SO WEIT BIST, DICH EINEM VAMPIR GEGENueBERZUSTELLEN UND ICH WERDE DIR HELFEN", - "ACH, DAS IST GANZ EINFACH. EIN SONNENSTRAHL ODER EIN KRUZIFIX UND ER WIRD ZU STAUB", - "AM MEISTEN AUFPASSEN MUSST DU BEI DRASCULA..WEGEN SEINEN TRANSHYPNITISCHEN FaeHIGKEITEN IST ER DER GEFaeHRLICHSTE UNTER DEN VAMPIREN", - "DU WaeRST VERLOREN, ES SEI DENN DU HaeTTEST...", - // 30 - "....DIE MISCHUNG! ", - "JA, STIMMT, DU HAST RECHT. WENN ICH WEITERHIN SO LIEGE WERDE ICH IM HOHEN ALTER WOHL RueCKENPROBLEME HABEN", - "NAJA, ICH GEBE ZU DASS ER der bessere von uns war, ABER DIE WICHTIGSTE ERKENNTNIS IN MEINEM ANTI-VAMPIR-STUDIUM WAR, MIR EINEN BODYGUARD ZUZULEGEN", - "ICH HABE EINE IMMUNITaeTSMISCHUNG GEFUNDEN. MIT DER KANN DIR KEIN EINZIGER VAMPIRBISS ETWAS ANHABEN, UND AUCH NICHT SEINE TRANSHYPNISIE.", - "NEIN, TUT MIR LEID, ICH HATTE SIE damals, ABER EINE MISCHUNG DIESER KONSISTENZ IST SEHR GEFaeHRLICH, UND STELL DIR MAL VOR, ES GERaeT IN VAMPIRHaeNDE", - // 35 - "DAS WueRDE IHN IMMUN GEGEN KNOBLAUCH UND SONNENLICHT GEMACHT HABEN, DIE RESTE, DIE ICH NICHT MEHR FueR WISSENSCHAFTLICHE ZWECKE BRAUCHTE, landeten im klo", - "NUR DIE RUHE, ICH HABE DAS REZEPT KOMPLETT IM KOPF ", - "ICH BRAUCHE KNOBLAUCH,AH, HAB ICH SCHON, ABER DANN MUSST DU NOCH WACHS BESORGEN, NIKOTIN, KAUGUMMI UND EIN BLaeTTCHEN ODER EINE SERVIETTE ODER SO WAS", - "ACH KLAR ! UND DIE WICHTIGSTE ZUTAT : EIN PAAR BLaeTTER EINER SELTSAMEN PFLANZE DIE FREDDY HEISST", - "ES HANDELT SICH UM EINE TOPFBLUME DEREN BLaeTTER ZAUBERKRaeFTE HABEN, WENN MAN SIE MIT EINER GOLDSICHEL ABSCHNEIDET", - // 40 - "ALSO, DU WEISST SCHON, SOBALD DU MIR DIESE FueNF ZUTATEN GEBRACHT HAST, BEREITE ICH DIR DIE MISCHUNG ZU", - "DANACH BIST DU FueR DEN KAMPF GEGEN DRASCULA GERueSTET", - "DENK DRAN : WACHS, NIKOTIN, EIN KAUGUMMI, EIN BLaeTTCHEN UND EIN PAAR BLaeTTER VON FREDDY, MIT EINER GOLDSICHEL ABGESCHNITTEN", - "HAB ICH DIR DOCH SCHON GESAGT ! NUR DANK DER MISCHUNG", - "OK. ALLES KLAR. ICH FANG DANN MAL AN EINEN ZU BAUEN...aeH VORZUBEREITEN. DAUERT AUCH NICHT LANGE", - // 45 - "DAS IST EINE ZAUBERFORMEL, DIE VOR VAMPIREN SCHueTZT", - "DAS WAR ICH, DAMIT MAN NICHT MERKT, DASS DER ZEICHNER VERGESSEN HAT DAS FENSTER VON VORHIN ZU ZEICHNEN", - "ALSO, ZUERST MUSST DU WISSEN WIE MAN ZUM SCHLOSS VON DRASCULA KOMMT.", - "ES GIBT EINE GROTTE, DIE DIREKT ZUM SCHLOSS FueHRT, UND DURCH DIE IGOR, DIESER BEKLOPPTE ELVIS-FAN MORGENS IMMER ZUM DORF RUNTER GEHT", - "ABER PASS AUF, SIE WIRD PERMANENT VON EINEM VAMPIR BEWACHT, DEN DU ERSTMAL LOSWERDEN MUSST", - // 50 - "ES GIBT DA EINEN ALTEN BRUNNEN BEI DER FRIEDHOFSKAPELLE", - "FRueHER WURDE ER FueR HEXENPROZESSE BENUTZT", - "MAN WARF DIE HEXEN IN DEN BRUNNEN. WENN SIE UNTERGINGEN WAREN SIE HEXEN, WENN NICHT, DANN NICHT", - "EINMAL WARFEN WIR EINE RUNTER, DIE NICHT UNTERGING, ALSO WAR SIE KEINE HEXE", - "WENN WIR LOSGEHEN, NIMMST DU DEINE MISCHUNG, ABER WIR HABEN NUR FueR EINE PERSON", - // 55 - "AM BESTEN RAUCHST DU IHN DIR KURZ BEVOR DU DRACULA GEGENueBERSTEHST", - "LAUF !", - "BILLIGE AUSREDEN !", - "HEINZ HACKER ? ICH BIN DOKTOR VON BRAUN", - "HoeREN SIE ZU, ES IST SEHR WICHTIG. ES GEHT UM DIE MISCHUNG", - // 60 - "ICH HABE EIN BUCH ueBER MISCHUNGEN GEFUNDEN UND DA STEHT DASS MAN KEINEN ALKOHOL TRINKEN DARF, SOBALD MAN DIE MISCHUNG GERAUCHT HAT", - "DER ALKOHOL REAGIERT IM MAGEN MIT DEN SUBSTANZEN DER MISCHUNG UND VERNICHTET IHRE WIRKUNG BINNEN WENIGER MILLISEKUNDEN", - "ICH MUSS AUFLEGEN. DIE POLIZEI IST HINTER MIR HER. DIE IDIOTEN HALTEN MICH FueR EINEN DROGEN-DEALER !ALSO, TSCHueSS UND VIEL GLueCK !", -}, -{ - // 0 - "", - "QUI DIABLE APPELLE \267 CETTE HEURE-CI?", - "H... NON, NON. JE SUIS LE NAIN GANYM\324DE... LE PROFESSEUR VON BRAUN... N'HABITE DJ\267 L\267", - "NON, JE NE SAIS PAS O\353 IL EST!", - "VA-T'-EN!", - // 5 - "IMBCIL! C'EST DJ\267 TROP TARD! C'EST TOUJOURS TROP TARD!", - "JE SUIS TOUT-\267-FAIT CONFORME", - "MOI PEUR?", - "RENSEIGNE-TOI, MON GARS: TU PARLES AVEC LE SEUL QUI CONNA\327T LE SECRET POUR CONFRONTER LES VAMPIRES", - "TOUT LE MONDE N'EST PAS CAPABLE DE LUTTER AVEC UN VAMPIRE. IL FAUT DES QUALITS SPCIALES", - // 10 - "TU NE LES A PAS", - "EST-CE QUE TU PARIE TOUT L'ARGENT QUE TU AS \267 QUE C'EST NON?", - "\200A VA, ENTRE", - "SI EN V\220RIT\220 TU TE SENS CAPABLE DE CONFRONTER DRASCULA, IL FAUDRA QUE TU SUPPORTES TOUS LES BRUITS GRIN\200ANTS ET SU\200ANTS", - "C'EST CLAIR?", - // 15 - "D'ACCORD. ATTENDS UN INSTANT", - "METS-TOI AU MILIEU DE LA CHAMBRE, S'IL TE PLA\327T", - "VOYONS! O\353 EST-CE QUE J'AI MIS LE DISQUE \"ONGLES GRATTANT UN TABLEAU\"?", - "TR\324S BIEN. ON Y VA", - "TU VOIS? TU ES UN INCAPABLE, COMME TOUS LES AUTRES", - // 20 - "MAINTENANT DONNE-MOI L'ARGENT QUE TU AS PERDU ET VA-T'-EN", - "ET N'Y REVIENS \267 MOINS QUE TU SOIS COMPL\324TEMENT EN FORME", - "ET QUE VEUX-TU MAINTENANT?", - "JE DOIS LE RECONNA\327TRE... TU AS DES APTITUDES POUR LUTTER CONTRE LES VAMPIRES", - "EN FAIT, TIENS TON ARGENT. JE SAIS RECONNA\327TRE MES ERREURS", - // 25 - "MAINTENANT VA-T'-EN, JE VEUX DORMIR UN PEU ", - "QUAND TU SOIS PR\322T \267 TE CONFRONTER AVEC UN VAMPIRE, REVIENS ET TU POURRAS COMPTER SUR MOI", - "OH! C'EST FACIL. AVEC LA LUMI\324RE DU SOLEIL OU UN CRUCIFIX TU LE R\220DUIT EN CENDRES", - "MAIS TU DOIS FAIRE SP\220CIALE ATTENTION AVEC DRASCULA. GR\266CE \267 SES POUVOIRS FRISYSHNOSTIQUES C'EST LE PLUS PUISSANT DES VAMPIRES", - "JE SERAIS PERDU SI CE N'EST PAS POUR LA...", - // 30 - "...POTION!", - "OH, BIEN S\352R. TU AS RAISON, SI JE CONTINUE \267 DORMIR COMME \200\265, J'AURAI DES PROBL\324MES DE COLONNE DANS MA VIEILLESSE", - "bon, J'ACCEPTE QU'IL A \220T\220 MEILLEURE ADVERSAIRE QUE MOI, MAIS JE ME SUIS GARD\220 LE DOS GR\266CE \267 MA BONNE TROUVAILLE DANS L'\220TUDE DE TECHNIQUES ANTI-VAMPIRES", - "J'AI D\220COUVERT UNE POTION IMMUNOLOGIQUE QUI TE FAIT INVULN\220RABLE CONTRE N'IMPORTE QUELLE MORSURE DE VAMPIRE OU SES POUVOIRS FRSYSSHNOTIQUES", - "NON, EXCUSES-MOI. JE L'AI EUE, MAIS UNE POTION DE CES CARACT\220RISTIQUES EST DANGEREUSE. IMAGINE TOI SI ELLE TOMBAIT DANS LES MAINS D'UN VAMPIRE", - // 35 - "IL DEVIENDRAIT IMMUNIS\220 AUX AILS, \267 LA LUMI\324RE DU SOLEIL. DONC, J'AI D\352 M'EN D\220BARRASSER DES EXC\220DENTS PAR LA SCIENTIFIQUE M\220THODE DE LES JETER AUX \220GOUTS", - "RESTE TRANQUILLE, JE ME SOUVIENS PARFAITEMENT DE LA PR\220PARATION DE CETTE POTION", - "il me faut D'AIL, MAIS J'EN AI D\220J\267. IL FAUDRA UN PEU DE CIRE, DE LA NICOTINE, UN CHEWING-GUM ET UN PAPIER \267 CIGARETTES, OU QUELQUE CHOSE PAREILLE", - "AH! ET CERTAINEMENT, L'INGR\220DIANT PRINCIPAL: LES FEUILLES D'UNE \220TRANGE PLANTE APPEL\220E FERNAN", - "IL S'AGIT D'UNE PLANTE GRIMPANTE DONT LES FEUILLES FOURNISSENT DES POUVOIRS MAGIQUES SI ON LES COUPE AVEC UNE FAUCILLE EN OR", - // 40 - "TU LE SAIS D\220J\267. D\324S QUE TU AURAS CES CINQ TRUCS APPORTE-LES-MOI ET JE TE PR\220PARERAI LA POTION", - "APR\324S TU SERAS PR\322T POUR LUTTER CONTRE DRASCULA", - "RAPPELLE-TOI: DE LA CIRE, DE LA NICOTINE, UN CHEWING-GUM, UN PAPIER ET LES FEUILLES DE FERNAN, LA PLANTE, COUP\220ES AVEC UNE FAUCILLE EN OR", - "JE TE L'AI D\220J\267 DIT! TOUT A \220T\220 GR\266CE \267 LA POTION", - "AH! TR\324S BIEN! ALORS, JE VAIS ME PR\220PARER LE PO... LA POTION. JE N'AI QUE POUR UN MOMENT", - // 45 - "C'EST UN SORTIL\324GE DE PROTECTION CONTRE-VAMPIRES", - "JE L'AI MIS POUR DISSIMULER, LE DESSINATEUR AYANT OUBLI\220 D'Y METTRE LA FEN\322TRE QU'ON VOIT DU DEHORS", - "EH BIEN, CE QUE TU DOIS SAVOIR D'ABORD C'EST LA FA\200ON D'ALLER AU CH\266TEAU DE DRASCULA", - "IL Y A UNE GROTTE QUI M\324NE DIRECTEMENT AU CH\266TEAU ET QU'IGOR, CE FOU FAN D'ELVIS, EN UTILISE POUR SE RENDRE AU VILLAGE LE MATIN", - "MAIS FAIT ATTENTION, ELLE TOUJOURS GARD\220E PAR UN VAMPIRE. TU DEVRAS T'EN D\220BARRASSER", - // 50 - "IL Y A UN VIEUX PUITS \267 C\342T\220 DE LA CHAPELLE DU CIMETI\324RE", - "ON L'UTILISAIT JADIS POUR JUGER DES AFFAIRES DE SORCELLERIE", - "ON JETAIT LES SORCI\324RES AU PUITS. SI ELLES COULAIENT, ON \220TAIT S\352R; AUTREMENT, PAS", - "UNE FOIS ON A JET\220 UNE ET ELLE N'AS PAS COUL\220, DONC ELLE NE SERAIT PAS UNE SORCI\324RE", - "MAINTENANT GARDE \267 LA QUESTION QUI NOUS INT\220RESSE: TIENS TA POTION, MAIS ON NE M'A PAS DONN\220 QUE POUR UN SEULEMENT.", - // 55 - "IL VAUDRA MIEUX QUE TU LA FUMES JUSTE AVANT DE CONFRONTER DRASCULA", - "COURS!", - "DES EXCUSES!", - "JHON HACKER? SUIS LE DOCTEUR VON BRAUN", - "\220COUTEZ-MOI. C'EST TR\324S IMPORTANT. C'EST SUR LA POTION", - // 60 - "DANS UN LIVRE QUE J'AI TROUV\220 SUR LES POTIONS, IL DIT QUE VOUS NE DEVEZ PAS BOIR DE L'ALCOOL APR\324S AVOIR FUM\220 LA POTION ", - "L'ALCOOL AVAL\220 R\220AGIT AVEC LES INGR\220DIENTS DE LA POTION ET ANNULE SES EFFETS EN DIXI\324MES DE SECONDE", - "JE DOIS RACCROCHER. SUIS CHERCH\220 PAR LA POLICE. ILS DISENT QUE JE TRAFIQUE EN DROGUES -IGNORANTS! AU REVOIR ET BONNE CHANCE EN SAUVANT LE MONDE", -}, -{ - // 0 - "", - "MA CHI BUSSA A QUESTE ORE?", - "EH...NO,NO. IO SONO IL NANNO GANIMEDI....IL PROFESSORE VON BRAUN NON ABITA QU\336 PI\353", - "NO, NON SO DOV'\324!", - "HO DETTO VIA!", - // 5 - "IMBECILE. ORMAI TROPPO TARDE, SEMRE TARDE", - "SONO COMPLETAMENTE D'ACCORDO", - "IO, PAURA?", - "ASCOLTA BENE RAGAZZO: STAI PARLANDO CON L'UNICA PERSONA CHE CONOSCE IL SEGRETO PER VINCERE AI VAMPIRI", - "NON TUTTI QUANTI POSSONO LOTTARE CON UN VAMPIRO. SI DEVONO AVERE DELLE CARATTERISTICHE SPEZIALI", - // 10 - "NO CE LE HAI", - "SICURO CHE NON SCOMMETI TUTTO IL TUO SOLDI!", - "VA BENE . AVANTI", - "SE DAVVERO SEI PRONTO PER LOTTARE CONTRO DRASCULA, DEVI POTERE SOPPORTARE TUTTI I RUMORI STRIDENTI E VAMPIRICI", - "TUTTO CHIARO?", - // 15 - "D'ACCORDO. ASPETTA UN ATTIMO", - "PER FAVORE, METTETI NEL CENTRO DELLA CAMERA", - "DOV'\324 HO MESSO IL COMPACT DISC DI \"UNGHIE GRAFFIANDO UNA LAVAGNA\"", - "MOLTO BENE, ANDIAMO", - "VEDI? SEI UN INUTILE, COME TUTTI GLI ALTRI", - // 20 - "ORA DAMI IL SOLDI CHE HAI PERSO, E VIA", - "E NON TORNARE FINO CHE NON SIA COMPLETAMENTE PRONTO", - "E COSA VUOI TU ADESSO?", - "DEVO AMMETTERLO... HAI LA STOFFA DI LOTTATORE PER VINCERE DRASCULA", - "EH..! PRENDI IL TUO SOLDI. SO QUANDO HO SBAGLIATO", - // 25 - "ADESSO VATENE, VOGLIO DORMIRE UN P\343", - "QUANDO SIA DISPOSTO A UCCIDERE QUALCHE VAMPIRO, TORNA E TI AIUTER\343 ", - "QUELLO \324 FACILE. LA LUCE DEL SOLE O UN CROCIFISSO, E L'HAI SCHISCCIATO", - "CON CHI DEVI FARE MOLTA ATTENZIONE \324 CON DRASCULA. I SUOI POTERI FRISISHNOSTICI GLI FANNO IL PI\353 FORTE DEI VAMPIRI", - "NON POTREI FARE NULLA SE NON FOSSE PER LA .....", - // 30 - "...POZIONE!", - "CERTO. HAI RAGIONE, SE CONTINUO DORMENDO COS\336 FORSE AVR\343 PROBLEMI DI SCHIENA QUANDO SIA VECCHIO", - "BENE, \324 VERO CHE FU MEGLIO LOTTATORE DI ME, MA IL MIO STUDIO SU TECNICHE ANTI-VAMPIRI GLI AIUT\343 MOLTISSIMO", - "HO SCOPERTO UNA POZIONE DI IMMUNUT\267 . TI FA INVULNERABILE AI MORSI DI VAMPIRI, O AI SUOI POTERI FRISISHNOTICI", - "NO, SCUSA, CE L'EBBI MOLTO TEMPO FA, MA UNA POZIONE COM'ERA LA MIA \324 PERICOLOSA. FIGURATI SE LA AVESSE UN VAMPIRO", - // 35 - "GLI FAREBBE IMMUNE AGLI AGLII, ALLA LUCE DEL SOLE.... PER QUELLO L'HO SCARICATA NEL CESO", - "TRANQUILLO, MI RICORDO BENISSIMO DI COME RIFARLA", - "BISOGNO AGLII, CHE NE HO QU\326, DOVRAI PORTARMI UN P\220 DI CERA, NICOTINA, UNA GOMMA, E UNA CARTINA O UN TOVAGLIOLO, O QUALCOSA DEL GENERE", - "-AH! E COME NO, L'INGREDIENTE PRINCIPALE: DELLE FOGLIE DI UNA STRANA PIANTA CHIAMATA FERDINAN", - "\324 UNA PIANTA CONVOLVOLO, LE SUE FOGLIE PROPORZIONANO POTERI MAGICI SE SONO TAGLIATE DA UNA FALCE D'ORO", - // 40 - "ALLORA, PORTAMI QUESTE CINQUE COSE E FAR\343 PER TE LA POZIONE", - "DOPO SAREI PRONTO PER UCCIDERE DRASCULA", - "RICORDA: CERA, NICOTINA, UNA GOMMA, UNA CARTINA E FOGLIE DI FERDINAN, LA PIANTA, TAGLIATE DA UNA FALCE D'ORO", - "TI L'HO GI\267 DETTO! FU TUTTO GRAZIE ALLA POZIONE", - "AH, MOLTO BENE. DUNQUE VADO A FARE LA CAN......LA POZIONE. SAR\267 UN ATTIMINO", - // 45 - "\324 SOLTANTO UN SORTILEGIO DI PROTEZIONE CONTRO VAMPIRI", - "L'HO MESSO PER DISSIMULARE CHE IL DISEGNATORE HA DIMENTICATO METTERE LA FINESTRA CHE SI VEDE DA FUORI", - "BENE, PRIMA DEVI SAPERE COME ARRIVARE AL CASTELLO DRASCULA", - "C'\324 UNAGROTTA CHE VA AL CASTELLO E CHE UTILIZZA QUEL MATTO FAN DI ELVIS, IGOR, PER SCENDERE AL PAESE TUTTE LA MATTINE", - "MA FA ATTENZIONE, SEMPRE \220 PROTETTA DA UN VAMPIRO. DOVRAI LIBERARTI DI LUI", - // 50 - "C'\220 UN VECCHIO POZZO ACCANTO ALLA CAPELLA DEL CIMITERO", - "SI UTILIZZAVA MOLTO TEMPO FA PER GIUDICARE CASI DI STREGONERIA", - "SI BUTTAVANO DENTRO ALLE STREGE. SE SI AFFONDAVANO ERANO STREGHE. SE NO, NO", - "UNA VOLTA BUTTAMMO UNA E GALLEGGI\220, DUNQUE NON SAREBBE UNA STREGA", - "ORA BEVE LA POZIONE. PECCATO CI SIA SOLTANTO PER UNO", - // 55 - "SAR\265 MEGLIO FUMARLO PROPRIO PRIMA DELLA LOTTA CONTRO DRASCULA", - "CORRI1", - "SCUSE!", - "JOHN HACKER? SONO IL DOTTORE VON BRAUN", - "SENTA, \220 MOLTO IMPORTANTE, \220 SULLA POZIONE", - // 60 - "HO TROVATO UN LIBRO SU POZIONI E DICE CHE NON SI DEVE BERE ALCOL DOPO AVERE FUMATO LA POZIONE", - "L'ALCOL BEVUTO FA REAZIONE CON LE SOSTANZE DELLA POZIONE E ANNULLA I SUOI EFFETTI IN DECIME DI SECONDO", - "DEVO RIATTACARE. LA POLIZIA MI CERCA. DICONO CHE TRAFFICO DROGHE -IGNORANTI! BENE, ALLORA ADIO E IN BOCA IL LUPO", -}, -}; - - -const char *_textsys[][4] = { -{ - "PRESS 'DEL' AGAIN TO RESTART", - "PRESS 'ESC' AGAIN TO EXIT", - "SPEECH ONLY", - "TEXT AND SPEECH", -}, -{ - "PULSA DE NUEVO SUPR PARA EMPEZAR", - "PULSA DE NUEVO ESC PARA SALIR", - "SOLO VOCES", - "VOZ Y TEXTO", -}, -{ - "BETaeTIGEN SIE ERNEUT entf UM ANZUFANGEN", - "BETaeTIGEN SIE ERNEUT ESC UM ZU BEENDEN", - "NUR STIMMEN", - "STIMME UND TEXT", -}, -{ - "APPUYEZ \267 NOUVEAU SUR SUPR POUR COMMENCER", - "APPUYEZ \267 NOUVEAU SUR ESC POUR SORTIR", - "SEULEMENT DES VOIX", - "VOIX ET TEXT", -}, -{ - "PREMI DI NUOVO SUPR PER COMINZIARE", - "PRMI DI NUOVO ESC PER USCIRE", - "SOLO SUONI", - "SUONI E TESTO", -}, -}; - - -const char *_texthis[][5] = { -{ - "", - "A long time ago, it seems that Drascula killed Von Braun's wife, and then, as he intended to face the count, Von Braun started to research all he could find on vampires.", - "When he thought he was ready, he went up to the castle and had a very violent encounter with Drascula.", - "Nobody knows exactly what happened there. Although Von Braun lost, Drascula could not kill him.", - "Von Braun felt humiliated by his defeat, he run away from the castle and has never dared to face Drascula again.", -}, -{ - "", - "", - "", - "", - "" -}, -{ - "", - "", - "", - "", - "" -}, -{ - "", - "", - "", - "", - "" -}, -{ - "", - "", - "", - "", - "" -}, -}; - - -const char *_textd1[][11] = { -{ - // 68 - "44472225500022227555544444664447222550002222755554444466", - "444722255000222275555444446655033336666664464402256555005504450005446", - // 70 - "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", - "550330227556444744446660004446655544444722255000222275555444446644444", - "55033022755644455550444744400044504447222550002222755554444466000", - "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", - "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", - // 75 - "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", - "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", - "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444", - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" -}, -{ - // 68 - "4447222550002222755554444466", - "55033336666664464402256555005504450005446", - // 70 - "550333226220044644550044755665500440006655556666655044744656550446470046", - "74444666000444665554444444", - "5555044474440004450000", - "4444722744446664464404446554440055655022227500544446044444446", - "4447222550002222755444446666055522275550005550022200222000222666", - // 75 - "4444777444455550022220555044444446666622526644475533223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", - "5555000444555033022755644446666005204402266222003332222774440446665555005550335544444", - "5666500444555033022755555000444444444444444444444444444444", - "00222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" -}, -{ - // 68 - "44472225500022227555544444664447222550002222755554444466", - "444722255000222275555444446655033336666664464402256555005504450005446", - // 70 - "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", - "550330227556444744446660004446655544444722255000222275555444446644444", - "55033022755644455550444744400044504447222550002222755554444466000", - "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", - "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", - // 75 - "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", - "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", - "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444", - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" -}, -{ - // 68 - "44472225500022227555544444664447222550002222755554444466", - "444722255000222275555444446655033336666664464402256555005504450005446", - // 70 - "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", - "550330227556444744446660004446655544444722255000222275555444446644444", - "55033022755644455550444744400044504447222550002222755554444466000", - "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", - "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", - // 75 - "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", - "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", - "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444", - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" -}, -{ - // 68 - "44472225500022227555544444664447222550002222755554444466", - "444722255000222275555444446655033336666664464402256555005504450005446", - // 70 - "4447222550002222755554444466550333226220044644550044755665500440006655556666655044744656550446470046", - "550330227556444744446660004446655544444722255000222275555444446644444", - "55033022755644455550444744400044504447222550002222755554444466000", - "55033022755644444447227444466644444722255000222275555444446664404446554440055655022227500544446044444446", - "55033022755644444472244472225500022227555544444662550002222755444446666055522275550005550022200222000222666", - // 75 - "44447774444555500222205550444444466666225266444755444722255000222275555444446633223220044022203336227555770550444660557220553302224477777550550550222635533000662220002275572227025555", - "5555500004445550330244472225500022227555544444662755644446666005204402266222003332222774440446665555005550335544444", - "56665004444447222550002222755554444466555033022755555000444444444444444444444444444444", - "004447222550002222755554444466222000220555002220550444446666662220000557550033344477222522665444466663337446055504446550550550222633003330000666622044422755722270255566667555655007222777" -}, - -}; - - -const char *_textverbs[][6] = { -{ - "look", - "take", - "open", - "close", - "talk", - "push", -}, -{ - "mirar", - "coger", - "abrir", - "cerrar", - "hablar", - "mover", -}, -{ - "Schau", - "Nimm", - "oeFFNE", - "Schliesse", - "Rede", - "Druecke", -}, -{ - "regardez", - "ramassez", - "ouvrez", - "fermez", - "parlez", - "poussez", -}, -{ - "esamina", - "prendi", - "apri", - "chiudi", - "parla", - "premi", -}, -}; - - -const char *_textmisc[][3] = { -{ - "HUNCHBACKED", - "Transilvania, 1993 d.c.", - "GOOOOOOOAAAAAAAL!", -}, -{ - "jorobado", - "Transilvania, 1993 d.c. (despues de cenar)", - "GOOOOOOOOOOOOOOOL", -}, -{ - "HUNCHBACKED", - "Transilvania, 1993 d.c.", - "GOOOOOOOAAAAAAAL!", -}, -{ - "HUNCHBACKED", - "Transilvania, 1993 d.c.", - "GOOOOOOOAAAAAAAL!", -}, -{ - "HUNCHBACKED", - "Transilvania, 1993 d.c.", - "GOOOOOOOAAAAAAAL!", -}, -}; - } // End of namespace Drascula #endif /* STATICDATA_H */ -- cgit v1.2.3 From 5c44c48dd03f19748c41ab86e7f59c87b4ddd899 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 8 Jun 2008 22:11:18 +0000 Subject: Restore apostrophe hack. svn-id: r32623 --- engines/drascula/graphics.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index a9f754d0f2..3b3448843e 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -270,13 +270,13 @@ void DrasculaEngine::print_abc_opc(const char *said, int screenX, int screenY, i signY = 40; } - int c = toupper(said[h]); + byte c = toupper(said[h]); // WORKAROUND: Even original did not process it correctly // Fixes apostrophe rendering if (_lang != kSpanish) if (c == '\'') - c = '\244'; + c = (byte)'\244'; for (int i = 0; i < _charMapSize; i++) { if (c == _charMap[i].inChar) { -- cgit v1.2.3 From d218badb6b2398d39d314cacae1882187372e32b Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 9 Jun 2008 02:36:34 +0000 Subject: Ignore superfluous --enable/--disable flags for existing engines svn-id: r32624 --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index f91819b7f1..eb808114ad 100755 --- a/configure +++ b/configure @@ -381,7 +381,7 @@ engine_enable() { fi if test "$opt" = "static" -o "$opt" = "dynamic" -o "$opt" = "yes" ; then - if test "`get_engine_name ${engine}`" != "" -a "`get_engine_build ${engine}`" != "$opt" ; then + if test "`get_engine_name ${engine}`" != "" ; then eval _engine_${engine}_build=$opt else option_error @@ -400,7 +400,7 @@ engine_disable() { fi engine=`echo $1 | sed 's/-/_/g'` - if test "`get_engine_name ${engine}`" != "" -a "`get_engine_build $engine`" != "no" ; then + if test "`get_engine_name ${engine}`" != "" ; then eval _engine_${engine}_build=no else option_error -- cgit v1.2.3 From 5937fde1c72cf2382e85e674b6fc0bdcf10d8f92 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 9 Jun 2008 03:09:44 +0000 Subject: Use mktemp when available svn-id: r32625 --- configure | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configure b/configure index eb808114ad..2901d93480 100755 --- a/configure +++ b/configure @@ -125,9 +125,12 @@ _prefix=/usr/local _srcdir=`dirname $0` -# TODO: We should really use mktemp(1) to determine a random tmp file name. -# However, that tool might not be available everywhere. -TMPO=${_srcdir}/scummvm-conf +# Determine a tmp file name, using mktemp(1) when available. +if type mktemp > /dev/null 2>&1 ; then + TMPO=`mktemp` +else + TMPO=${_srcdir}/scummvm-conf +fi TMPC=${TMPO}.cpp TMPLOG=${_srcdir}/config.log -- cgit v1.2.3 From 3308e6558bb984d480b3c52a8bca468368c1c6a6 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 9 Jun 2008 03:20:53 +0000 Subject: Added some missing $EXEEXT which would make some tests to fail svn-id: r32626 --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 2901d93480..9c26ce70cb 100755 --- a/configure +++ b/configure @@ -221,7 +221,7 @@ if test -n "$_host"; then # In cross-compiling mode, we cannot run the result eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp else - eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && eval "./tmp_cxx_compiler 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp + eval "$1 $CXXFLAGS $LDFLAGS -o tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp" 2> /dev/null && eval "./tmp_cxx_compiler$EXEEXT 2> /dev/null" && rm -f tmp_cxx_compiler$EXEEXT tmp_cxx_compiler.cpp fi } @@ -1214,7 +1214,7 @@ int main(int argc, char **argv) } EOF _need_memalign=yes - cc_check && $TMPO && _need_memalign=no + cc_check && $TMPO$EXEEXT && _need_memalign=no ;; esac echo "$_need_memalign" @@ -1523,7 +1523,7 @@ EOF # don't execute while cross compiling cc_check $LDFLAGS $CXXFLAGS $MPEG2_CFLAGS $MPEG2_LIBS -lmpeg2 && _mpeg2=yes else - cc_check $LDFLAGS $CXXFLAGS $MPEG2_CFLAGS $MPEG2_LIBS -lmpeg2 && $TMPO && _mpeg2=yes + cc_check $LDFLAGS $CXXFLAGS $MPEG2_CFLAGS $MPEG2_LIBS -lmpeg2 && $TMPO$EXEEXT && _mpeg2=yes fi fi if test "$_mpeg2" = yes ; then -- cgit v1.2.3 From 280a7c4c229c14984f97a8e27b1a681b4c2476bb Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Mon, 9 Jun 2008 03:59:16 +0000 Subject: Show warnings when a plugin couldn't be loaded svn-id: r32627 --- backends/plugins/dynamic-plugin.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backends/plugins/dynamic-plugin.h b/backends/plugins/dynamic-plugin.h index 4771f1c086..ec051c4ed7 100644 --- a/backends/plugins/dynamic-plugin.h +++ b/backends/plugins/dynamic-plugin.h @@ -46,6 +46,7 @@ public: return false; } if (verFunc() != PLUGIN_VERSION) { + warning("Plugin uses a different API version (you have: '%d', needed is: '%d')", verFunc(), PLUGIN_VERSION); unloadPlugin(); return false; } @@ -58,6 +59,7 @@ public: } _type = (PluginType)typeFunc(); if (_type >= PLUGIN_TYPE_MAX) { + warning("Plugin type unknown: %d", _type); unloadPlugin(); return false; } @@ -69,6 +71,7 @@ public: return false; } if (typeVerFunc() != pluginTypeVersions[_type]) { + warning("Plugin uses a different type API version (you have: '%d', needed is: '%d')", typeVerFunc(), pluginTypeVersions[_type]); unloadPlugin(); return false; } @@ -83,6 +86,7 @@ public: // Get the plugin object _pluginObject = getObject(); if (!_pluginObject) { + warning("Couldn't get the plugin object"); unloadPlugin(); return false; } -- cgit v1.2.3 From a353776f2fd2d8627812d674d80ccb5910c48006 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 9 Jun 2008 10:11:42 +0000 Subject: - drascula.dat is now read completely - Removed the rest of the game static data (staticdata.h) - Some naming convention fixes (added underscore to some shared variables) - Renamed objeto -> object svn-id: r32628 --- engines/drascula/actors.cpp | 2 +- engines/drascula/drascula.cpp | 118 +++++---- engines/drascula/drascula.h | 20 +- engines/drascula/interface.cpp | 20 +- engines/drascula/objects.cpp | 15 +- engines/drascula/rooms.cpp | 85 +++--- engines/drascula/staticdata.h | 590 ----------------------------------------- 7 files changed, 136 insertions(+), 714 deletions(-) delete mode 100644 engines/drascula/staticdata.h diff --git a/engines/drascula/actors.cpp b/engines/drascula/actors.cpp index d831104fac..10ce415c2c 100644 --- a/engines/drascula/actors.cpp +++ b/engines/drascula/actors.cpp @@ -236,7 +236,7 @@ void DrasculaEngine::moveCharacters() { factor_red[curY + curHeight], frontSurface, screenSurface); } } else if (characterMoved == 1) { - curPos[0] = frameX[num_frame]; + curPos[0] = _frameX[num_frame]; curPos[1] = frame_y + DIF_MASK_HARE; curPos[2] = curX; curPos[3] = curY; diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 42663313d0..c300066f4f 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -269,7 +269,7 @@ bool DrasculaEngine::runCurrentChapter() { int soc = 0; for (n = 0; n < 6; n++) { soc = soc + CHARACTER_WIDTH; - frameX[n] = soc; + _frameX[n] = soc; } } @@ -755,6 +755,7 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ bool DrasculaEngine::loadDrasculaDat() { Common::File in; + int i; in.open("drascula.dat"); @@ -792,92 +793,105 @@ bool DrasculaEngine::loadDrasculaDat() { _charMapSize = in.readUint16BE(); _charMap = (CharInfo *)malloc(sizeof(CharInfo) * _charMapSize); - - for (int i = 0; i < _charMapSize; i++) { + for (i = 0; i < _charMapSize; i++) { _charMap[i].inChar = in.readByte(); _charMap[i].mappedChar = in.readUint16BE(); _charMap[i].charType = in.readByte(); } _itemLocationsSize = in.readUint16BE(); - for (int i = 0; i < _itemLocationsSize; i++) { - in.readUint16BE(); - in.readUint16BE(); + _itemLocations = (ItemLocation *)malloc(sizeof(ItemLocation) * _itemLocationsSize); + for (i = 0; i < _itemLocationsSize; i++) { + _itemLocations[i].x = in.readUint16BE(); + _itemLocations[i].y = in.readUint16BE(); } - _xPolSize = in.readUint16BE(); - for (int i = 0; i < _xPolSize; i++) { - in.readUint16BE(); - in.readUint16BE(); + _polXSize = in.readUint16BE(); + _polX = (int *)malloc(sizeof(int) * _polXSize); + _polY = (int *)malloc(sizeof(int) * _polXSize); + for (i = 0; i < _polXSize; i++) { + _polX[i] = in.readUint16BE(); + _polY[i] = in.readUint16BE(); } _verbBarXSize = in.readUint16BE(); - for (int i = 0; i < _verbBarXSize; i++) { - in.readUint16BE(); + _verbBarX = (int *)malloc(sizeof(int) * _verbBarXSize); + for (i = 0; i < _verbBarXSize; i++) { + _verbBarX[i] = in.readUint16BE(); } _x1dMenuSize = in.readUint16BE(); - for (int i = 0; i < _x1dMenuSize; i++) { - in.readUint16BE(); - in.readUint16BE(); + _x1d_menu = (int *)malloc(sizeof(int) * _x1dMenuSize); + _y1d_menu = (int *)malloc(sizeof(int) * _x1dMenuSize); + for (i = 0; i < _x1dMenuSize; i++) { + _x1d_menu[i] = in.readUint16BE(); + _y1d_menu[i] = in.readUint16BE(); } _frameXSize = in.readUint16BE(); - for (int i = 0; i < _frameXSize; i++) { - in.readUint16BE(); + _frameX = (int *)malloc(sizeof(int) * _frameXSize); + for (i = 0; i < _frameXSize; i++) { + _frameX[i] = in.readUint16BE(); } _candleXSize = in.readUint16BE(); - for (int i = 0; i < _candleXSize; i++) { - in.readUint16BE(); - in.readUint16BE(); + _candleX = (int *)malloc(sizeof(int) * _candleXSize); + _candleY = (int *)malloc(sizeof(int) * _candleXSize); + for (i = 0; i < _candleXSize; i++) { + _candleX[i] = in.readUint16BE(); + _candleY[i] = in.readUint16BE(); } _pianistXSize = in.readUint16BE(); - for (int i = 0; i < _pianistXSize; i++) { - in.readUint16BE(); + _pianistX = (int *)malloc(sizeof(int) * _pianistXSize); + for (i = 0; i < _pianistXSize; i++) { + _pianistX[i] = in.readUint16BE(); } _drunkXSize = in.readUint16BE(); - for (int i = 0; i < _drunkXSize; i++) { - in.readUint16BE(); + _drunkX = (int *)malloc(sizeof(int) * _drunkXSize); + for (i = 0; i < _drunkXSize; i++) { + _drunkX[i] = in.readUint16BE(); } _roomPreUpdatesSize = in.readUint16BE(); - for (int i = 0; i < _roomPreUpdatesSize; i++) { - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); + _roomPreUpdates = (RoomUpdate *)malloc(sizeof(RoomUpdate) * _roomPreUpdatesSize); + for (i = 0; i < _roomPreUpdatesSize; i++) { + _roomPreUpdates[i].roomNum = in.readUint16BE(); + _roomPreUpdates[i].flag = in.readUint16BE(); + _roomPreUpdates[i].flagValue = in.readUint16BE(); + _roomPreUpdates[i].sourceX = in.readUint16BE(); + _roomPreUpdates[i].sourceY = in.readUint16BE(); + _roomPreUpdates[i].destX = in.readUint16BE(); + _roomPreUpdates[i].destY = in.readUint16BE(); + _roomPreUpdates[i].width = in.readUint16BE(); + _roomPreUpdates[i].height = in.readUint16BE(); + _roomPreUpdates[i].type = in.readUint16BE(); } _roomUpdatesSize = in.readUint16BE(); - for (int i = 0; i < _roomUpdatesSize; i++) { - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); + _roomUpdates = (RoomUpdate *)malloc(sizeof(RoomUpdate) * _roomUpdatesSize); + for (i = 0; i < _roomUpdatesSize; i++) { + _roomUpdates[i].roomNum = in.readUint16BE(); + _roomUpdates[i].flag = in.readUint16BE(); + _roomUpdates[i].flagValue = in.readUint16BE(); + _roomUpdates[i].sourceX = in.readUint16BE(); + _roomUpdates[i].sourceY = in.readUint16BE(); + _roomUpdates[i].destX = in.readUint16BE(); + _roomUpdates[i].destY = in.readUint16BE(); + _roomUpdates[i].width = in.readUint16BE(); + _roomUpdates[i].height = in.readUint16BE(); + _roomUpdates[i].type = in.readUint16BE(); } _roomActionsSize = in.readUint16BE(); - for (int i = 0; i < _roomActionsSize; i++) { - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); - in.readUint16BE(); + _roomActions = (RoomTalkAction *)malloc(sizeof(RoomTalkAction) * _roomActionsSize); + for (i = 0; i < _roomActionsSize; i++) { + _roomActions[i].room = in.readUint16BE(); + _roomActions[i].chapter = in.readUint16BE(); + _roomActions[i].action = in.readUint16BE(); + _roomActions[i].objectID = in.readUint16BE(); + _roomActions[i].speechID = in.readUint16BE(); } _numLangs = in.readUint16BE(); diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 329b82bb2d..f462480ffc 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -391,7 +391,7 @@ public: void delay(int ms); bool confirmExit(); void screenSaver(); - void chooseObject(int objeto); + void chooseObject(int object); void addObject(int); int removeObject(int osj); void playFLI(const char *filefli, int vel); @@ -673,7 +673,7 @@ private: int _charMapSize; int _itemLocationsSize; - int _xPolSize; + int _polXSize; int _verbBarXSize; int _x1dMenuSize; int _frameXSize; @@ -700,18 +700,20 @@ private: char ***_textverbs; char ***_textmisc; char ***_textd1; + ItemLocation *_itemLocations; + int *_polX, *_polY; + int *_verbBarX; + int *_x1d_menu, *_y1d_menu; + int *_frameX; + int *_candleX, *_candleY; + int *_pianistX, *_drunkX; + RoomUpdate *_roomPreUpdates, *_roomUpdates; + RoomTalkAction *_roomActions; char ***loadTexts(Common::File &in); void freeTexts(char ***ptr); }; - -extern const ItemLocation itemLocations[]; -extern int frameX[20]; -extern const int x_pol[44], y_pol[44]; -extern const int verbBarX[]; -extern const int x1d_menu[], y1d_menu[]; - } // End of namespace Drascula #endif /* DRASCULA_H */ diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp index 41e7d4eba8..daf3e69a54 100644 --- a/engines/drascula/interface.cpp +++ b/engines/drascula/interface.cpp @@ -29,7 +29,7 @@ namespace Drascula { void DrasculaEngine::selectVerbFromBar() { for (int n = 0; n < 7; n++) { - if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1] && n > 0) { + if (mouseX > _verbBarX[n] && mouseX < _verbBarX[n + 1] && n > 0) { selectVerb(n); return; } @@ -82,7 +82,7 @@ bool DrasculaEngine::confirmExit() { void DrasculaEngine::showMenu() { int h, n, x; char textIcon[13]; - + byte *srcSurface = (currentChapter == 6) ? tableSurface : frontSurface; x = whichObject(); strcpy(textIcon, iconName[x]); @@ -90,28 +90,24 @@ void DrasculaEngine::showMenu() { h = inventoryObjects[n]; if (h != 0) { - if (currentChapter == 6) - copyBackground(x_pol[n], y_pol[n], itemLocations[n].x, itemLocations[n].y, - OBJWIDTH, OBJHEIGHT, tableSurface, screenSurface); - else - copyBackground(x_pol[n], y_pol[n], itemLocations[n].x, itemLocations[n].y, - OBJWIDTH, OBJHEIGHT, frontSurface, screenSurface); + copyBackground(_polX[n], _polY[n], _itemLocations[n].x, _itemLocations[n].y, + OBJWIDTH, OBJHEIGHT, srcSurface, screenSurface); } - copyRect(x1d_menu[h], y1d_menu[h], itemLocations[n].x, itemLocations[n].y, + copyRect(_x1d_menu[h], _y1d_menu[h], _itemLocations[n].x, _itemLocations[n].y, OBJWIDTH, OBJHEIGHT, backSurface, screenSurface); } if (x < 7) - print_abc(textIcon, itemLocations[x].x - 2, itemLocations[x].y - 7); + print_abc(textIcon, _itemLocations[x].x - 2, _itemLocations[x].y - 7); } void DrasculaEngine::clearMenu() { int n, verbActivated = 1; for (n = 0; n < 7; n++) { - if (mouseX > verbBarX[n] && mouseX < verbBarX[n + 1]) + if (mouseX > _verbBarX[n] && mouseX < _verbBarX[n + 1]) verbActivated = 0; - copyRect(OBJWIDTH * n, OBJHEIGHT * verbActivated, verbBarX[n], 2, + copyRect(OBJWIDTH * n, OBJHEIGHT * verbActivated, _verbBarX[n], 2, OBJWIDTH, OBJHEIGHT, backSurface, screenSurface); verbActivated = 1; } diff --git a/engines/drascula/objects.cpp b/engines/drascula/objects.cpp index 87dfb22c48..01967d975d 100644 --- a/engines/drascula/objects.cpp +++ b/engines/drascula/objects.cpp @@ -27,7 +27,7 @@ namespace Drascula { -void DrasculaEngine::pickObject(int objeto) { +void DrasculaEngine::pickObject(int object) { if (currentChapter == 6) loadPic("iconsp.alg", backSurface); else if (currentChapter == 4) @@ -36,14 +36,14 @@ void DrasculaEngine::pickObject(int objeto) { loadPic("icons3.alg", backSurface); else loadPic("icons.alg", backSurface); - chooseObject(objeto); + chooseObject(object); if (currentChapter == 2) loadPic(menuBackground, backSurface); else loadPic(99, backSurface); } -void DrasculaEngine::chooseObject(int objeto) { +void DrasculaEngine::chooseObject(int object) { if (currentChapter == 5) { if (takeObject == 1 && menuScreen == 0 && pickedObject != 16) addObject(pickedObject); @@ -51,9 +51,9 @@ void DrasculaEngine::chooseObject(int objeto) { if (takeObject == 1 && menuScreen == 0) addObject(pickedObject); } - copyBackground(x1d_menu[objeto], y1d_menu[objeto], 0, 0, OBJWIDTH,OBJHEIGHT, backSurface, drawSurface3); + copyBackground(_x1d_menu[object], _y1d_menu[object], 0, 0, OBJWIDTH,OBJHEIGHT, backSurface, drawSurface3); takeObject = 1; - pickedObject = objeto; + pickedObject = object; } int DrasculaEngine::removeObject(int obj) { @@ -214,8 +214,9 @@ int DrasculaEngine::whichObject() { int n = 0; for (n = 1; n < 43; n++) { - if (mouseX > itemLocations[n].x && mouseY > itemLocations[n].y - && mouseX < itemLocations[n].x + OBJWIDTH && mouseY < itemLocations[n].y + OBJHEIGHT) + if (mouseX > _itemLocations[n].x && mouseY > _itemLocations[n].y && + mouseX < _itemLocations[n].x + OBJWIDTH && + mouseY < _itemLocations[n].y + OBJHEIGHT) break; } diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 48b5446296..c19eff3b0b 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -26,7 +26,6 @@ #include "common/array.h" #include "drascula/drascula.h" -#include "drascula/staticdata.h" namespace Drascula { @@ -121,16 +120,16 @@ void DrasculaEngine::setupRoomsTable() { bool DrasculaEngine::roomParse(int rN, int fl) { bool seen = false; - for (int i = 0; i < ARRAYSIZE(roomActions); i++) { - if (roomActions[i].room == rN) { + for (int i = 0; i < ARRAYSIZE(_roomActions); i++) { + if (_roomActions[i].room == rN) { seen = true; - if (roomActions[i].chapter == currentChapter || - roomActions[i].chapter == -1) { - if (roomActions[i].action == pickedObject || - roomActions[i].action == kVerbDefault) { - if (roomActions[i].objectID == fl || - roomActions[i].objectID == -1) { - talk(roomActions[i].speechID); + if (_roomActions[i].chapter == currentChapter || + _roomActions[i].chapter == -1) { + if (_roomActions[i].action == pickedObject || + _roomActions[i].action == kVerbDefault) { + if (_roomActions[i].objectID == fl || + _roomActions[i].objectID == -1) { + talk(_roomActions[i].speechID); hasAnswer = 1; return true; } @@ -1014,19 +1013,19 @@ bool DrasculaEngine::room_102(int fl) { void DrasculaEngine::updateRefresh() { // Check generic updaters - for (int i = 0; i < ARRAYSIZE(roomUpdates); i++) { - if (roomUpdates[i].roomNum == roomNumber) { - if (roomUpdates[i].flag < 0 || - flags[roomUpdates[i].flag] == roomUpdates[i].flagValue) { - if (roomUpdates[i].type == 0) { - copyBackground(roomUpdates[i].sourceX, roomUpdates[i].sourceY, - roomUpdates[i].destX, roomUpdates[i].destY, - roomUpdates[i].width, roomUpdates[i].height, + for (int i = 0; i < ARRAYSIZE(_roomUpdates); i++) { + if (_roomUpdates[i].roomNum == roomNumber) { + if (_roomUpdates[i].flag < 0 || + flags[_roomUpdates[i].flag] == _roomUpdates[i].flagValue) { + if (_roomUpdates[i].type == 0) { + copyBackground(_roomUpdates[i].sourceX, _roomUpdates[i].sourceY, + _roomUpdates[i].destX, _roomUpdates[i].destY, + _roomUpdates[i].width, _roomUpdates[i].height, drawSurface3, screenSurface); } else { - copyRect(roomUpdates[i].sourceX, roomUpdates[i].sourceY, - roomUpdates[i].destX, roomUpdates[i].destY, - roomUpdates[i].width, roomUpdates[i].height, + copyRect(_roomUpdates[i].sourceX, _roomUpdates[i].sourceY, + _roomUpdates[i].destX, _roomUpdates[i].destY, + _roomUpdates[i].width, _roomUpdates[i].height, drawSurface3, screenSurface); } } @@ -1052,19 +1051,19 @@ void DrasculaEngine::updateRefresh() { void DrasculaEngine::updateRefresh_pre() { // Check generic preupdaters - for (int i = 0; i < ARRAYSIZE(roomPreUpdates); i++) { - if (roomPreUpdates[i].roomNum == roomNumber) { - if (roomPreUpdates[i].flag < 0 || - flags[roomPreUpdates[i].flag] == roomPreUpdates[i].flagValue) { - if (roomPreUpdates[i].type == 0) { - copyBackground(roomPreUpdates[i].sourceX, roomPreUpdates[i].sourceY, - roomPreUpdates[i].destX, roomPreUpdates[i].destY, - roomPreUpdates[i].width, roomPreUpdates[i].height, + for (int i = 0; i < ARRAYSIZE(_roomPreUpdates); i++) { + if (_roomPreUpdates[i].roomNum == roomNumber) { + if (_roomPreUpdates[i].flag < 0 || + flags[_roomPreUpdates[i].flag] == _roomPreUpdates[i].flagValue) { + if (_roomPreUpdates[i].type == 0) { + copyBackground(_roomPreUpdates[i].sourceX, _roomPreUpdates[i].sourceY, + _roomPreUpdates[i].destX, _roomPreUpdates[i].destY, + _roomPreUpdates[i].width, _roomPreUpdates[i].height, drawSurface3, screenSurface); } else { - copyRect(roomPreUpdates[i].sourceX, roomPreUpdates[i].sourceY, - roomPreUpdates[i].destX, roomPreUpdates[i].destY, - roomPreUpdates[i].width, roomPreUpdates[i].height, + copyRect(_roomPreUpdates[i].sourceX, _roomPreUpdates[i].sourceY, + _roomPreUpdates[i].destX, _roomPreUpdates[i].destY, + _roomPreUpdates[i].width, _roomPreUpdates[i].height, drawSurface3, screenSurface); } } @@ -1209,22 +1208,22 @@ void DrasculaEngine::update_13() { void DrasculaEngine::update_14_pre() { int difference; - copyBackground(123, candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); - copyBackground(candleX[actorFrames[kFrameCandles]], 146, 311, 80, 4, 8, drawSurface3, screenSurface); + copyBackground(123, _candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(_candleX[actorFrames[kFrameCandles]], 146, 311, 80, 4, 8, drawSurface3, screenSurface); if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); if (curX > 101 && curX < 155) copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface); if (flags[11] == 0) - copyBackground(pianistX[actorFrames[kFramePianist]], 157, 245, 130, 29, 42, drawSurface3, screenSurface); + copyBackground(_pianistX[actorFrames[kFramePianist]], 157, 245, 130, 29, 42, drawSurface3, screenSurface); else if (flags[5] == 0) copyBackground(145, 139, 228, 112, 47, 60, extraSurface, screenSurface); else copyBackground(165, 140, 229, 117, 43, 59, drawSurface3, screenSurface); if (flags[12] == 1) - copyBackground(drunkX[actorFrames[kFrameDrunk]], 82, 170, 50, 40, 53, drawSurface3, screenSurface); + copyBackground(_drunkX[actorFrames[kFrameDrunk]], 82, 170, 50, 40, 53, drawSurface3, screenSurface); difference = getTime() - savedTime; if (difference > 6) { if (flags[12] == 1) { @@ -1355,7 +1354,7 @@ void DrasculaEngine::update_60_pre() { if (flags[5] == 0) placeDrascula(); - copyBackground(123, candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(123, _candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); if (flag_tv == 1) copyBackground(114, 158, 8, 30, 8, 23, drawSurface3, screenSurface); @@ -1382,8 +1381,8 @@ void DrasculaEngine::update_60() { void DrasculaEngine::update_62_pre() { int difference; - copyBackground(123, candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); - copyBackground(candleX[actorFrames[kFrameCandles]], 146, 311, 80, 4, 8, drawSurface3, screenSurface); + copyBackground(123, _candleY[actorFrames[kFrameCandles]], 142, 14, 39, 13, drawSurface3, screenSurface); + copyBackground(_candleX[actorFrames[kFrameCandles]], 146, 311, 80, 4, 8, drawSurface3, screenSurface); if (blinking == 5) copyBackground(1, 149, 127, 52, 9, 5, drawSurface3, screenSurface); @@ -1392,14 +1391,14 @@ void DrasculaEngine::update_62_pre() { copyBackground(31, 138, 178, 51, 18, 16, drawSurface3, screenSurface); if (flags[11] == 0) - copyBackground(pianistX[actorFrames[kFramePianist]], 157, 245, 130, 29, 42, drawSurface3, screenSurface); + copyBackground(_pianistX[actorFrames[kFramePianist]], 157, 245, 130, 29, 42, drawSurface3, screenSurface); else if (flags[5] == 0) copyBackground(145, 139, 228, 112, 47, 60, extraSurface, screenSurface); else copyBackground(165, 140, 229, 117, 43, 59, drawSurface3, screenSurface); if (flags[12] == 1) - copyBackground(drunkX[actorFrames[kFrameDrunk]], 82, 170, 50, 40, 53, drawSurface3, screenSurface); + copyBackground(_drunkX[actorFrames[kFrameDrunk]], 82, 170, 50, 40, 53, drawSurface3, screenSurface); difference = getTime() - savedTime; if (difference > 6) { @@ -1428,7 +1427,7 @@ void DrasculaEngine::update_62() { if (curY + curHeight < 89) { copyRect(205, 1, 180, 9, 82, 80, drawSurface3, screenSurface); - copyBackground(drunkX[actorFrames[kFrameDrunk]], 82, 170, 50, 40, 53, drawSurface3, screenSurface); + copyBackground(_drunkX[actorFrames[kFrameDrunk]], 82, 170, 50, 40, 53, drawSurface3, screenSurface); } } @@ -1774,7 +1773,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { soc = 0; for (l = 0; l < 6; l++) { soc += curWidth; - frameX[l] = soc; + _frameX[l] = soc; } } diff --git a/engines/drascula/staticdata.h b/engines/drascula/staticdata.h deleted file mode 100644 index ee227b9265..0000000000 --- a/engines/drascula/staticdata.h +++ /dev/null @@ -1,590 +0,0 @@ -/* ScummVM - Graphic Adventure Engine - * - * ScummVM is the legal property of its developers, whose names - * are too numerous to list here. Please refer to the COPYRIGHT - * file distributed with this source distribution. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$ - * - */ - -#ifndef STATICDATA_H -#define STATICDATA_H - -#include "drascula/drascula.h" - -namespace Drascula { - -const ItemLocation itemLocations[] = { - { 0, 0 }, // empty - { 5, 10 }, { 50, 10 }, { 95, 10 }, // 1-3 - { 140, 10 }, { 185, 10 }, { 230, 10 }, // 4-6 - { 275, 10 }, { 5, 40 }, { 50, 40 }, // 7-9 - { 95, 40 }, { 140, 40 }, { 185, 40 }, // 10-12 - { 230, 40 }, { 275, 40 }, { 5, 70 }, // 13-15 - { 50, 70 }, { 95, 70 }, { 140, 70 }, // 16-18 - { 185, 70 }, { 230, 70 }, { 275, 70 }, // 19-21 - { 5, 100 }, { 50, 100 }, { 95, 100 }, // 22-24 - { 140, 100 }, { 185, 100 }, { 230, 100 }, // 25-27 - { 275, 100 }, { 5, 130 }, { 50, 130 }, // 28-30 - { 95, 130 }, { 140, 130 }, { 185, 130 }, // 31-33 - { 230, 130 }, { 275, 130 }, { 5, 160 }, // 34-36 - { 50, 160 }, { 95, 160 }, { 140, 160 }, // 37-39 - { 185, 160 }, { 230, 160 }, { 275, 160 }, // 40-42 - { 275, 160 } // 43 -}; - -const int x_pol[44] = {0, 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, - 1, 42, 83, 124, 165, 206, 247, 83, 1, 206, - 247, 83, 165, 1, 206, 42, 124, 83, 1, 247, - 83, 165, 1, 206, 42, 124, 83, 1, 247, 42, - 1, 165, 206}; -const int y_pol[44] = {0, 1, 1, 1, 1, 1, 1, 1, 27, 27, 1, - 27, 27, 27, 27, 27, 27, 27, 1, 1, 27, - 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, - 1, 1, 1, 1, 1, 27, 27, 27, 27, 27, - 27, 1, 1}; -const int verbBarX[] = {6, 51, 96, 141, 186, 232, 276, 321}; -const int x1d_menu[] = {280, 40, 80, 120, 160, 200, 240, 0, 40, 80, 120, - 160, 200, 240, 0, 40, 80, 120, 160, 200, 240, 0, - 40, 80, 120, 160, 200, 240, 0}; -const int y1d_menu[] = {0, 0, 0, 0, 0, 0, 0, 25, 25, 25, 25, 25, 25, 25, - 50, 50, 50, 50, 50, 50, 50, 75, 75, 75, 75, 75, 75, 75, 100}; -int frameX[20] = {43, 87, 130, 173, 216, 259}; -int candleX[] = {14, 19, 24}; -int candleY[] = {158, 172, 186}; -int pianistX[] = {1, 91, 61, 31, 91, 31, 1, 61, 31}; -int drunkX[] = {1, 42, 83, 124, 165, 206, 247, 1}; - -const RoomUpdate roomPreUpdates[] = { - // room flag val x1 y1 x2 y2 width height type - { 3, 3, 1, 258, 110, 85, 44, 23, 53, 0 }, - //------------------------------------------------------------------------------- - { 5, 8, 0, 256, 152, 208, 67, 27, 40, 0 }, - //------------------------------------------------------------------------------- - { 6, 0, 0, 3, 103, 185, 69, 23, 76, 0 }, - { 6, 1, 0, 97, 117, 34, 148, 36, 31, 0 }, - { 6, 2, 0, 28, 100, 219, 72, 64, 97, 0 }, - //------------------------------------------------------------------------------- - { 7, 35, 0, 1, 72, 158, 162, 19, 12, 0 }, - //------------------------------------------------------------------------------- - { 12, 16, 0, 1, 131, 106, 117, 55, 68, 0 }, - //------------------------------------------------------------------------------- - { 17, 15, 1, 1, 135, 108, 65, 44, 63, 0 }, - //------------------------------------------------------------------------------- - { 21, 0, 1, 2, 171, 84, 126, 17, 26, 0 }, - { 21, 10, 1, 20, 163, 257, 149, 14, 34, 0 }, - //------------------------------------------------------------------------------- - { 22, 24, 1, 2, 187, 107, 106, 62, 12, 0 }, - { 22, 27, 0, 32, 181, 203, 88, 13, 5, 0 }, - { 22, 26, 0, 2, 133, 137, 83, 29, 53, 0 }, - { 22, 26, 1, 65, 174, 109, 145, 55, 25, 0 }, - //------------------------------------------------------------------------------- - { 24, 1, 1, 1, 163, 225, 124, 12, 36, 0 }, - { 24, 2, 1, 14, 153, 30, 107, 23, 46, 0 }, - //------------------------------------------------------------------------------- - { 26, 2, 1, 1, 130, 87, 44, 50, 69, 0 }, - { 26, 12, 1, 52, 177, 272, 103, 27, 22, 0 }, - { 26, 18, 0, 80, 133, 199, 95, 50, 66, 0 }, - //------------------------------------------------------------------------------- - { 27, 5, 1, 1, 175, 59, 109, 17, 24, 1 }, - { 27, 6, 1, 19, 177, 161, 103, 18, 22, 1 }, - //------------------------------------------------------------------------------- - { 29, 4, 1, 12, 113, 247, 49, 41, 84, 0 }, - //------------------------------------------------------------------------------- - { 30, 4, 1, 1, 148, 148, 66, 35, 51, 0 }, - { 30, 16, 1, 37, 173, 109, 84, 20, 26, 0 }, - //------------------------------------------------------------------------------- - { 31, 13, 1, 1, 163, 116, 41, 61, 36, 0 }, - { 31, 5, 1, 1, 78, 245, 63, 30, 84, 0 }, - //------------------------------------------------------------------------------- - { 34, 7, 1, 99, 127, 73, 41, 79, 72, 0 }, - { 34, 8, 1, 36, 129, 153, 41, 62, 65, 0 }, - //------------------------------------------------------------------------------- - { 35, 14, 1, 1, 86, 246, 65, 68, 87, 0 }, - { 35, 17, 1, 70, 150, 118, 52, 40, 23, 0 }, - //------------------------------------------------------------------------------- - { 49, 6, 0, 2, 136, 176, 81, 49, 62, 0 }, - //------------------------------------------------------------------------------- - { 53, 1, 0, 2, 113, 205, 50, 38, 86, 1 }, - { 53, 2, 0, 41, 159, 27, 117, 25, 40, 0 }, - { 53, 9, 1, 67, 184, 56, 93, 32, 15, 0 }, - //------------------------------------------------------------------------------- - { 54, 5, 1, 168, 156, 187, 111, 7, 11, 0 }, - { 54, 12, 1, 16, 156, 190, 64, 18, 24, 0 }, - //------------------------------------------------------------------------------- - { 56, 10, 0, 2, 126, 42, 67, 57, 67, 0 }, - { 56, 11, 1, 60, 160, 128, 97, 103, 38, 0 }, - //------------------------------------------------------------------------------- - { 58, 0, 0, 1, 156, 143, 120, 120, 43, 0 }, - { 58, 1, 2, 252, 171, 173, 116, 25, 28, 1 }, - //------------------------------------------------------------------------------- - { 59, 4, 0, 1, 146, 65, 106, 83, 40, 1 } -}; - -const RoomUpdate roomUpdates[] = { - // room flag val x1 y1 x2 y2 width height type - { 5, -1, -1, 114, 130, 211, 87, 109, 69, 1 }, - { 15, -1, -1, 1, 154, 83, 122, 131, 44, 1 }, - { 17, -1, -1, 48, 135, 78, 139, 80, 30, 1 }, - { 18, 24, 1, 177, 1, 69, 29, 142, 130, 1 }, - { 18, -1, -1, 105, 132, 109, 108, 196, 65, 1 }, - { 20, -1, -1, 1, 137, 106, 121, 213, 61, 1 }, - { 27, -1, -1, 38, 177, 103, 171, 21, 22, 1 }, - { 27, -1, -1, 60, 162, 228, 156, 18, 37, 1 }, - { 29, -1, -1, 1, 180, 150, 126, 10, 17, 1 }, - { 31, -1, -1, 63, 190, 223, 157, 17, 9, 1 }, - { 34, -1, -1, 5, 171, 234, 126, 29, 23, 1 }, - { 35, -1, -1, 1, 174, 54, 152, 195, 25, 1 }, - { 50, -1, -1, 4, 153, 118, 95, 67, 44, 1 }, - { 57, -1, -1, 7, 113, 166, 61, 62, 82, 1 }, - { 61, -1, -1, 1, 154, 83, 122, 131, 44, 1 }, - { 63, -1, -1, 1, 154, 83, 122, 131, 44, 1 }, -}; - -// Note: default action needs to be LAST for each group -// of actions with the same number -RoomTalkAction roomActions[] = { - //room num action object speech - { 0, 1, kVerbLook, -1, 54 }, - { 0, 1, kVerbMove, -1, 19 }, - { 0, 1, kVerbPick, -1, 11 }, - { 0, 1, kVerbOpen, -1, 9 }, - { 0, 1, kVerbClose, -1, 9 }, - { 0, 1, kVerbTalk, -1, 16 }, - { 0, 1, kVerbDefault, -1, 11 }, - // ---------------------------------- - { 0, 2, kVerbMove, -1, 19 }, - { 0, 2, kVerbOpen, -1, 9 }, - { 0, 2, kVerbClose, -1, 9 }, - { 0, 2, kVerbTalk, -1, 16 }, - // ---------------------------------- - { 0, 3, kVerbLook, -1, 316 }, - { 0, 3, kVerbMove, -1, 317 }, - { 0, 3, kVerbPick, -1, 318 }, - { 0, 3, kVerbOpen, -1, 319 }, - { 0, 3, kVerbClose, -1, 319 }, - { 0, 3, kVerbTalk, -1, 320 }, - { 0, 3, kVerbDefault, -1, 318 }, - // ---------------------------------- - { 0, 4, kVerbMove, -1, 19 }, - { 0, 4, kVerbOpen, -1, 9 }, - { 0, 4, kVerbClose, -1, 9 }, - { 0, 4, kVerbTalk, -1, 16 }, - // ---------------------------------- - { 0, 5, kVerbOpen, -1, 9 }, - { 0, 5, kVerbClose, -1, 9 }, - { 0, 5, kVerbTalk, -1, 16 }, - // ---------------------------------- - { 0, 6, kVerbMove, -1, 19 }, - { 0, 6, kVerbOpen, -1, 9 }, - { 0, 6, kVerbClose, -1, 9 }, - { 0, 6, kVerbTalk, -1, 16 }, - // ================================== - { 1, -1, kVerbPick, 118, 5 }, - { 1, -1, kVerbOpen, 118, 3 }, - { 1, -1, kVerbClose, 118, 4 }, - { 1, -1, kVerbTalk, 118, 6 }, - // ---------------------------------- - { 1, -1, kVerbLook, 119, 8 }, - { 1, -1, kVerbMove, 119, 13 }, - { 1, -1, kVerbClose, 119, 10 }, - { 1, -1, kVerbTalk, 119, 12 }, - // ---------------------------------- - { 1, -1, kVerbMove, 120, 13 }, - { 1, -1, kVerbOpen, 120, 18 }, - { 1, -1, kVerbTalk, 120, 15 }, - // ================================== - { 3, -1, kVerbLook, 129, 21 }, - { 3, -1, kVerbPick, 129, 5 }, - { 3, -1, kVerbMove, 129, 24 }, - { 3, -1, kVerbOpen, 129, 22 }, - { 3, -1, kVerbClose, 129, 10 }, - // ---------------------------------- - { 3, -1, kVerbLook, 131, 27 }, - { 3, -1, kVerbPick, 131, 5 }, - { 3, -1, kVerbMove, 131, 24 }, - { 3, -1, kVerbOpen, 131, 22 }, - { 3, -1, kVerbClose, 131, 10 }, - { 3, -1, kVerbTalk, 131, 23 }, - // ---------------------------------- - { 3, -1, kVerbLook, 132, 28 }, - { 3, -1, kVerbPick, 132, 5 }, - { 3, -1, kVerbMove, 132, 24 }, - { 3, -1, kVerbOpen, 132, 22 }, - { 3, -1, kVerbClose, 132, 10 }, - { 3, -1, kVerbTalk, 132, 23 }, - // ---------------------------------- - { 3, -1, kVerbLook, 133, 321 }, - { 3, -1, kVerbPick, 133, 31 }, - { 3, -1, kVerbMove, 133, 34 }, - { 3, -1, kVerbOpen, 133, 30 }, - { 3, -1, kVerbClose, 133, 10 }, - // ---------------------------------- - { 3, -1, kVerbLook, 166, 55 }, - { 3, -1, kVerbPick, 166, 7 }, - // ---------------------------------- - { 3, -1, kVerbLook, 211, 184 }, - // ================================== - { 4, -1, kVerbLook, 189, 182 }, - // ---------------------------------- - { 4, -1, kVerbLook, 207, 175 }, - { 4, -1, kVerbTalk, 207, 176 }, - // ---------------------------------- - { 4, -1, kVerbLook, 208, 177 }, - // ---------------------------------- - { 4, -1, kVerbLook, 209, 179 }, - // ---------------------------------- - { 4, -1, kVerbLook, 210, 180 }, - { 4, -1, kVerbOpen, 210, 181 }, - // ================================== - { 5, -1, kVerbMove, 136, 13 }, - { 5, -1, kVerbOpen, 136, 18 }, - { 5, -1, kVerbTalk, 136, 15 }, - // ---------------------------------- - { 5, -1, kVerbLook, 212, 187 }, - { 5, -1, kVerbTalk, 212, 188 }, - // ---------------------------------- - { 5, -1, kVerbLook, 213, 189 }, - { 5, -1, kVerbOpen, 213, 190 }, - // ================================== - { 6, -1, kVerbPick, 144, 43 }, - // ---------------------------------- - { 6, -1, kVerbLook, 138, 35 }, - { 6, -1, kVerbTalk, 138, 6 }, - // ---------------------------------- - { 6, -1, kVerbLook, 143, 37 }, - { 6, -1, kVerbPick, 143, 7 }, - { 6, -1, kVerbMove, 143, 7 }, - { 6, -1, kVerbTalk, 143, 38 }, - // ---------------------------------- - { 6, -1, kVerbLook, 139, 36 }, - // ---------------------------------- - { 6, -1, kVerbLook, 140, 147 }, - // ================================== - { 7, -1, kVerbLook, 164, 35 }, - // ---------------------------------- - { 7, -1, kVerbLook, 169, 44 }, - // ================================== - { 9, -1, kVerbLook, 150, 35 }, - { 9, -1, kVerbTalk, 150, 6 }, - // ---------------------------------- - { 9, -1, kVerbLook, 51, 60 }, - // ================================== - { 12, -1, kVerbLook, 154, 329 }, - { 12, -1, kVerbTalk, 154, 330 }, - // ---------------------------------- - { 12, -1, kVerbMove, 155, 48 }, - { 12, -1, kVerbTalk, 155, 331 }, - // ---------------------------------- - { 12, -1, kVerbLook, 156, 35 }, - { 12, -1, kVerbMove, 156, 48 }, - { 12, -1, kVerbTalk, 156, 50 }, - // ================================== - { 14, -1, kVerbLook, 200, 165 }, - // ---------------------------------- - { 14, -1, kVerbLook, 201, 166 }, - // ---------------------------------- - { 14, -1, kVerbLook, 202, 167 }, - // ---------------------------------- - { 14, -1, kVerbLook, 203, 168 }, - { 14, -1, kVerbPick, 203, 170 }, - { 14, -1, kVerbMove, 203, 170 }, - { 14, -1, kVerbTalk, 203, 169 }, - // ---------------------------------- - { 14, -1, kVerbLook, 204, 171 }, - // ================================== - { 15, -1, kVerbTalk, 188, 333 }, - { 15, -1, kVerbLook, 188, 334 }, - // ---------------------------------- - { 15, -1, kVerbLook, 205, 172 }, - // ---------------------------------- - { 15, -1, kVerbLook, 206, 173 }, - { 15, -1, kVerbMove, 206, 174 }, - { 15, -1, kVerbOpen, 206, 174 }, - // ================================== - { 16, -1, kVerbTalk, 163, 6 }, - // ---------------------------------- - { 16, -1, kVerbLook, 183, 340 }, - // ---------------------------------- - { 16, -1, kVerbLook, 185, 37 }, - { 16, -1, kVerbPick, 185, 7 }, - { 16, -1, kVerbMove, 185, 7 }, - { 16, -1, kVerbTalk, 185, 38 }, - // ---------------------------------- - { 16, -1, kVerbTalk, 187, 345 }, - // ================================== - { 18, -1, kVerbLook, 181, 348 }, - // ---------------------------------- - { 18, -1, kVerbLook, 182, 154 }, - // ================================== - { 19, -1, kVerbLook, 214, 191 }, - // ================================== - { 22, -1, kVerbPick, 140, 7 }, - // ---------------------------------- - { 22, -1, kVerbLook, 52, 497 }, - { 22, -1, kVerbTalk, 52, 498 }, - // ================================== - { 24, -1, kVerbLook, 151, 461 }, - // ================================== - { 26, -1, kVerbOpen, 167, 467 }, - // ---------------------------------- - { 26, -1, kVerbLook, 164, 470 }, - { 26, -1, kVerbOpen, 164, 471 }, - // ---------------------------------- - { 26, -1, kVerbLook, 163, 472 }, - { 26, -1, kVerbPick, 163, 473 }, - // ---------------------------------- - { 26, -1, kVerbLook, 165, 474 }, - // ---------------------------------- - { 26, -1, kVerbLook, 168, 476 }, - { 26, -1, kVerbPick, 168, 477 }, - // ================================== - { 27, -1, kVerbLook, 175, 429 }, - // ================================== - { 29, -1, kVerbLook, 152, 463 }, - { 29, -1, kVerbOpen, 152, 464 }, - // ---------------------------------- - { 29, -1, kVerbLook, 153, 465 }, - // ---------------------------------- - { 29, -1, kVerbPick, 154, 466 }, - // ---------------------------------- - { 29, -1, kVerbOpen, 156, 467 }, - // ================================== - { 30, -1, kVerbOpen, 157, 468 }, - // ---------------------------------- - { 30, -1, kVerbLook, 158, 469 }, - // ================================== - { 31, -1, kVerbLook, 161, 470 }, - { 31, -1, kVerbOpen, 161, 471 }, - // ================================== - { 34, -1, kVerbLook, 146, 458 }, - { 34, -1, kVerbPick, 146, 459 }, - // ================================== - { 44, -1, kVerbLook, 172, 428 }, - // ================================== - { 49, -1, kVerbLook, 51, 132 }, - // ---------------------------------- - { 49, -1, kVerbLook, 200, 133 }, - { 49, -1, kVerbTalk, 200, 134 }, - // ---------------------------------- - { 49, -1, kVerbLook, 201, 135 }, - // ---------------------------------- - { 49, -1, kVerbLook, 203, 137 }, - // ================================== - { 53, -1, kVerbLook, 121, 128 }, - // ---------------------------------- - { 53, -1, kVerbLook, 209, 129 }, - // ---------------------------------- - { 53, -1, kVerbLook, 52, 447 }, - { 53, -1, kVerbTalk, 52, 131 }, - // ================================== - { 54, -1, kVerbLook, 53, 127 }, - // ---------------------------------- - { 54, -1, kVerbOpen, 119, 125 }, - { 54, -1, kVerbLook, 119, 126 }, - // ================================== - { 55, -1, kVerbLook, 122, 138 }, - // ---------------------------------- - { 55, -1, kVerbLook, 204, 139 }, - // ---------------------------------- - { 55, -1, kVerbLook, 205, 140 }, - // ================================== - { 56, -1, kVerbLook, 124, 450 }, - // ---------------------------------- - { 56, -1, kVerbOpen, 207, 141 }, - // ---------------------------------- - { 56, -1, kVerbLook, 208, 142 }, - // ================================== - { 58, -1, kVerbLook, 104, 454 }, - // ================================== - { 60, -1, kVerbLook, 112, 440 }, - // ---------------------------------- - { 60, -1, kVerbTalk, 115, 455 }, - // ---------------------------------- - { 60, -1, kVerbTalk, 56, 455 }, - // ---------------------------------- - { 60, -1, kVerbLook, 114, 167 }, - // ---------------------------------- - { 60, -1, kVerbLook, 113, 168 }, - { 60, -1, kVerbPick, 113, 170 }, - { 60, -1, kVerbMove, 113, 170 }, - { 60, -1, kVerbTalk, 113, 169 }, - // ================================== - { 61, -1, kVerbLook, 116, 172 }, - // ---------------------------------- - { 61, -1, kVerbLook, 117, 173 }, - // ---------------------------------- - { 61, -1, kVerbMove, 117, 174 }, - { 61, -1, kVerbOpen, 117, 174 }, - { 62, -1, kVerbLook, 100, 168 }, - { 62, -1, kVerbTalk, 100, 169 }, - { 62, -1, kVerbPick, 100, 170 }, - // ---------------------------------- - { 62, -1, kVerbLook, 101, 171 }, - // ---------------------------------- - { 62, -1, kVerbLook, 102, 167 }, - // ---------------------------------- - { 62, -1, kVerbLook, 103, 166 }, - // ================================== - { 63, -1, kVerbLook, 110, 172 }, - // ---------------------------------- - { 63, -1, kVerbLook, 109, 173 }, - { 63, -1, kVerbMove, 109, 174 }, - // ---------------------------------- - { 63, -1, kVerbLook, 108, 334 }, - { 63, -1, kVerbTalk, 108, 333 }, - // ================================== - { 102, -1, kVerbLook, 100, 452 }, - { 102, -1, kVerbLook, 101, 123 }, - { 102, -1, kVerbPick, -1, 453 }, - { 102, -1, kVerbOpen, -1, 453 }, - // ================================== - // Pseudoroom. checkAction() menuScreen == 1 - { 200, 1, kVerbLook, 28, 328 }, - // ---------------------------------- - { 200, 2, kVerbLook, 28, 328 }, - { 200, 2, kVerbLook, 7, 143 }, - { 200, 2, kVerbLook, 8, 145 }, - { 200, 2, kVerbLook, 9, 147 }, - { 200, 2, kVerbLook, 10, 151 }, - { 200, 2, kVerbLook, 11, 152 }, - { 200, 2, kVerbLook, 12, 154 }, - { 200, 2, kVerbLook, 13, 155 }, - { 200, 2, kVerbLook, 14, 157 }, - { 200, 2, kVerbLook, 15, 58 }, - { 200, 2, kVerbLook, 16, 158 }, - { 200, 2, kVerbLook, 17, 159 }, - { 200, 2, kVerbLook, 18, 160 }, - { 200, 2, kVerbLook, 19, 161 }, - { 200, 2, kVerbLook, 23, 152 }, - { 200, 2, kVerbTalk, 7, 144 }, - { 200, 2, kVerbTalk, 8, 146 }, - { 200, 2, kVerbTalk, 9, 148 }, - { 200, 2, kVerbTalk, 11, 153 }, - // ---------------------------------- - { 200, 3, kVerbLook, 22, 307 }, - { 200, 3, kVerbLook, 28, 328 }, - { 200, 3, kVerbLook, 7, 143 }, - { 200, 3, kVerbLook, 8, 145 }, - { 200, 3, kVerbLook, 9, 147 }, - { 200, 3, kVerbLook, 10, 151 }, - { 200, 3, kVerbLook, 11, 152 }, - { 200, 3, kVerbLook, 12, 154 }, - { 200, 3, kVerbLook, 13, 155 }, - { 200, 3, kVerbLook, 14, 157 }, - { 200, 3, kVerbLook, 15, 58 }, - { 200, 3, kVerbLook, 16, 158 }, - { 200, 3, kVerbLook, 17, 159 }, - { 200, 3, kVerbLook, 18, 160 }, - { 200, 3, kVerbLook, 19, 161 }, - { 200, 3, kVerbLook, 20, 162 }, - { 200, 3, kVerbLook, 23, 152 }, - { 200, 3, kVerbTalk, 7, 144 }, - { 200, 3, kVerbTalk, 8, 146 }, - { 200, 3, kVerbTalk, 9, 148 }, - { 200, 3, kVerbTalk, 11, 153 }, - // ---------------------------------- - { 200, 4, kVerbLook, 7, 478 }, - { 200, 4, kVerbLook, 8, 480 }, - { 200, 4, kVerbLook, 10, 485 }, - { 200, 4, kVerbLook, 11, 488 }, - { 200, 4, kVerbLook, 12, 486 }, - { 200, 4, kVerbLook, 13, 490 }, - { 200, 4, kVerbLook, 14, 122 }, - { 200, 4, kVerbLook, 15, 117 }, - { 200, 4, kVerbLook, 16, 491 }, - { 200, 4, kVerbLook, 17, 478 }, - { 200, 4, kVerbLook, 18, 493 }, - { 200, 4, kVerbLook, 20, 162 }, - { 200, 4, kVerbLook, 21, 496 }, - { 200, 4, kVerbLook, 22, 161 }, - { 200, 4, kVerbLook, 28, 328 }, - { 200, 4, kVerbTalk, 15, 118 }, - { 200, 4, kVerbOpen, 15, 119 }, - { 200, 4, 14, 19, 484 }, - { 200, 4, 19, 14, 484 }, - // ---------------------------------- - { 200, 5, kVerbLook, 7, 478 }, - { 200, 5, kVerbLook, 8, 120 }, - { 200, 5, kVerbLook, 11, 488 }, - { 200, 5, kVerbLook, 13, 490 }, - { 200, 5, kVerbLook, 14, 121 }, - { 200, 5, kVerbLook, 15, 117 }, - { 200, 5, kVerbLook, 17, 478 }, - { 200, 5, kVerbLook, 20, 162 }, - { 200, 5, kVerbLook, 28, 328 }, - { 200, 5, kVerbTalk, 15, 118 }, - { 200, 5, kVerbOpen, 15, 119 }, - // ---------------------------------- - { 200, 6, kVerbLook, 20, 123 }, - { 200, 6, kVerbLook, 21, 441 }, - { 200, 6, kVerbLook, 28, 328 }, - // ================================== - // Pseudoroom. checkAction() menuScreen != 1 - { 201, 1, kVerbLook, 50, 308 }, - { 201, 1, kVerbOpen, 50, 310 }, - { 201, 1, kVerbClose, 50, 311 }, - { 201, 1, kVerbMove, 50, 312 }, - { 201, 1, kVerbPick, 50, 313 }, - { 201, 1, kVerbTalk, 50, 314 }, - // ---------------------------------- - { 201, 2, kVerbLook, 50, 308 }, - { 201, 2, kVerbOpen, 50, 310 }, - { 201, 2, kVerbClose, 50, 311 }, - { 201, 2, kVerbMove, 50, 312 }, - { 201, 2, kVerbPick, 50, 313 }, - { 201, 2, kVerbTalk, 50, 314 }, - { 201, 2, 13, 50, 156 }, - { 201, 2, 20, 50, 163 }, - // ---------------------------------- - { 201, 3, kVerbLook, 50, 309 }, - { 201, 3, kVerbOpen, 50, 310 }, - { 201, 3, kVerbClose, 50, 311 }, - { 201, 3, kVerbMove, 50, 312 }, - { 201, 3, kVerbPick, 50, 313 }, - { 201, 3, kVerbTalk, 50, 314 }, - // ---------------------------------- - { 201, 4, kVerbLook, 50, 309 }, - { 201, 4, kVerbOpen, 50, 310 }, - { 201, 4, kVerbClose, 50, 311 }, - { 201, 4, kVerbMove, 50, 312 }, - { 201, 4, kVerbPick, 50, 313 }, - { 201, 4, kVerbTalk, 50, 314 }, - { 201, 4, 9, 50, 484 }, - { 201, 4, 20, 50, 487 }, - // ---------------------------------- - { 201, 5, kVerbLook, 50, 309 }, // Originally these are with - { 201, 5, kVerbOpen, 50, 310 }, // completely wrong voices - { 201, 5, kVerbClose, 50, 311 }, - { 201, 5, kVerbMove, 50, 312 }, - { 201, 5, kVerbPick, 50, 313 }, - { 201, 5, kVerbTalk, 50, 314 }, - { 201, 5, 20, 50, 487 }, - // ---------------------------------- - { 201, 6, kVerbOpen, 50, 310 }, - { 201, 6, kVerbClose, 50, 311 }, - { 201, 6, kVerbMove, 50, 312 }, - { 201, 6, kVerbPick, 50, 313 }, - { 201, 6, kVerbTalk, 50, 314 }, - -}; - -} // End of namespace Drascula - -#endif /* STATICDATA_H */ -- cgit v1.2.3 From 3daf09c9229a66f9b625941f9d63a5e1403cf4c8 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 9 Jun 2008 10:13:44 +0000 Subject: Updated the MSVC project files of the drascula engine (removed staticdata.h) svn-id: r32629 --- dists/msvc7/drascula.vcproj | 3 --- dists/msvc71/drascula.vcproj | 3 --- dists/msvc8/drascula.vcproj | 4 ---- dists/msvc9/drascula.vcproj | 4 ---- 4 files changed, 14 deletions(-) diff --git a/dists/msvc7/drascula.vcproj b/dists/msvc7/drascula.vcproj index af0b63c76c..2d23296dbc 100644 --- a/dists/msvc7/drascula.vcproj +++ b/dists/msvc7/drascula.vcproj @@ -135,9 +135,6 @@ - - diff --git a/dists/msvc71/drascula.vcproj b/dists/msvc71/drascula.vcproj index e08abd9b35..9160a02bbf 100644 --- a/dists/msvc71/drascula.vcproj +++ b/dists/msvc71/drascula.vcproj @@ -149,9 +149,6 @@ - - diff --git a/dists/msvc8/drascula.vcproj b/dists/msvc8/drascula.vcproj index 1d4d99aa08..0867377f31 100644 --- a/dists/msvc8/drascula.vcproj +++ b/dists/msvc8/drascula.vcproj @@ -212,10 +212,6 @@ RelativePath="..\..\engines\drascula\sound.cpp" > - - diff --git a/dists/msvc9/drascula.vcproj b/dists/msvc9/drascula.vcproj index ab26dd8d37..45a75cb7a2 100644 --- a/dists/msvc9/drascula.vcproj +++ b/dists/msvc9/drascula.vcproj @@ -213,10 +213,6 @@ RelativePath="..\..\engines\drascula\sound.cpp" > - - -- cgit v1.2.3 From 756c7a76f7b2d5bf00780c699a3824b8ea480b8a Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 9 Jun 2008 10:22:11 +0000 Subject: Moved the MSVC solution files to /dists, added two MSVC project conversion tools (MSVC8 <-> MSVC9) and added project files for MSVC8 as well svn-id: r32630 --- tools/create_drascula/create_drascula.sln | 20 --- tools/create_drascula/create_drascula.vcproj | 190 -------------------- .../dists/msvc8/create_drascula.sln | 20 +++ .../dists/msvc8/create_drascula.vcproj | 191 ++++++++++++++++++++ tools/create_drascula/dists/msvc8_to_msvc9.bat | 32 ++++ .../dists/msvc9/create_drascula.sln | 20 +++ .../dists/msvc9/create_drascula.vcproj | 192 +++++++++++++++++++++ tools/create_drascula/dists/msvc9_to_msvc8.bat | 33 ++++ 8 files changed, 488 insertions(+), 210 deletions(-) delete mode 100644 tools/create_drascula/create_drascula.sln delete mode 100644 tools/create_drascula/create_drascula.vcproj create mode 100644 tools/create_drascula/dists/msvc8/create_drascula.sln create mode 100644 tools/create_drascula/dists/msvc8/create_drascula.vcproj create mode 100644 tools/create_drascula/dists/msvc8_to_msvc9.bat create mode 100644 tools/create_drascula/dists/msvc9/create_drascula.sln create mode 100644 tools/create_drascula/dists/msvc9/create_drascula.vcproj create mode 100644 tools/create_drascula/dists/msvc9_to_msvc8.bat diff --git a/tools/create_drascula/create_drascula.sln b/tools/create_drascula/create_drascula.sln deleted file mode 100644 index 4a39bdbe42..0000000000 --- a/tools/create_drascula/create_drascula.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "create_drascula", "create_drascula.vcproj", "{5F280130-349D-11DD-AE16-0800200C9A66}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5F280130-349D-11DD-AE16-0800200C9A66}.Debug|Win32.ActiveCfg = Debug|Win32 - {5F280130-349D-11DD-AE16-0800200C9A66}.Debug|Win32.Build.0 = Debug|Win32 - {5F280130-349D-11DD-AE16-0800200C9A66}.Release|Win32.ActiveCfg = Release|Win32 - {5F280130-349D-11DD-AE16-0800200C9A66}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/tools/create_drascula/create_drascula.vcproj b/tools/create_drascula/create_drascula.vcproj deleted file mode 100644 index 2532f8fd66..0000000000 --- a/tools/create_drascula/create_drascula.vcproj +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tools/create_drascula/dists/msvc8/create_drascula.sln b/tools/create_drascula/dists/msvc8/create_drascula.sln new file mode 100644 index 0000000000..dc7428bb80 --- /dev/null +++ b/tools/create_drascula/dists/msvc8/create_drascula.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "create_drascula", "create_drascula.vcproj", "{5F280130-349D-11DD-AE16-0800200C9A66}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5F280130-349D-11DD-AE16-0800200C9A66}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F280130-349D-11DD-AE16-0800200C9A66}.Debug|Win32.Build.0 = Debug|Win32 + {5F280130-349D-11DD-AE16-0800200C9A66}.Release|Win32.ActiveCfg = Release|Win32 + {5F280130-349D-11DD-AE16-0800200C9A66}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tools/create_drascula/dists/msvc8/create_drascula.vcproj b/tools/create_drascula/dists/msvc8/create_drascula.vcproj new file mode 100644 index 0000000000..3b26261a76 --- /dev/null +++ b/tools/create_drascula/dists/msvc8/create_drascula.vcproj @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/create_drascula/dists/msvc8_to_msvc9.bat b/tools/create_drascula/dists/msvc8_to_msvc9.bat new file mode 100644 index 0000000000..54820b34d0 --- /dev/null +++ b/tools/create_drascula/dists/msvc8_to_msvc9.bat @@ -0,0 +1,32 @@ +@echo off +rem This batch file is used to convert MSVC8 (Visual Studio 2005) project files to MSVC9 (Visual Studio 2008) ones +rem You need the Windows version of GNU rpl +rem Get it here: +rem http://gnuwin32.sourceforge.net/packages/rpl.htm +rem Place rpl.exe from the bin folder inside the archive in the folder where +rem this batch file resides + +if not exist rpl.exe goto no_rpl + +echo Creating MSVC9 project files from the MSVC8 ones +copy /y msvc8\*.vcproj msvc9\ +copy /y msvc8\*.sln msvc9\ +rpl -e -q "Version=\"8.00\"" "Version=\"9.00\"" msvc9\*.vcproj +rpl -e -q "Version=\"8,00\"" "Version=\"9,00\"" msvc9\*.vcproj +rpl -e -q "Keyword=\"Win32Proj\"" "Keyword=\"Win32Proj\"\n\tTargetFrameworkVersion=\"131072\"" msvc9\*.vcproj +rpl -e -q "EntryPointSymbol=\"WinMainCRTStartup\"" "EntryPointSymbol=\"WinMainCRTStartup\"\n\t\t\t\tRandomizedBaseAddress=\"1\"\n\t\t\t\tDataExecutionPrevention=\"0\"" msvc9\*.vcproj +rpl -e -q "Format Version 9.00" "Format Version 10.00" msvc9\*.sln +rpl -e -q "Format Version 9,00" "Format Version 10,00" msvc9\*.sln +rpl -e -q "# Visual C++ Express 2005" "# Visual C++ Express 2008" msvc9\*.sln +rpl -e -q "# Visual Studio 2005" "# Visual Studio 2008" msvc9\*.sln +goto the_end + +:no_rpl +echo You need the Windows version of GNU rpl +echo Get it here: +echo http://gnuwin32.sourceforge.net/packages/rpl.htm +echo Place rpl.exe from the bin folder inside the archive in the folder where +echo this batch file resides + +:the_end +pause diff --git a/tools/create_drascula/dists/msvc9/create_drascula.sln b/tools/create_drascula/dists/msvc9/create_drascula.sln new file mode 100644 index 0000000000..4a39bdbe42 --- /dev/null +++ b/tools/create_drascula/dists/msvc9/create_drascula.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "create_drascula", "create_drascula.vcproj", "{5F280130-349D-11DD-AE16-0800200C9A66}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5F280130-349D-11DD-AE16-0800200C9A66}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F280130-349D-11DD-AE16-0800200C9A66}.Debug|Win32.Build.0 = Debug|Win32 + {5F280130-349D-11DD-AE16-0800200C9A66}.Release|Win32.ActiveCfg = Release|Win32 + {5F280130-349D-11DD-AE16-0800200C9A66}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tools/create_drascula/dists/msvc9/create_drascula.vcproj b/tools/create_drascula/dists/msvc9/create_drascula.vcproj new file mode 100644 index 0000000000..f30d6a114b --- /dev/null +++ b/tools/create_drascula/dists/msvc9/create_drascula.vcproj @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/create_drascula/dists/msvc9_to_msvc8.bat b/tools/create_drascula/dists/msvc9_to_msvc8.bat new file mode 100644 index 0000000000..c87a524f77 --- /dev/null +++ b/tools/create_drascula/dists/msvc9_to_msvc8.bat @@ -0,0 +1,33 @@ +@echo off +rem This batch file is used to convert MSVC9 (Visual Studio 2008) project files to MSVC8 (Visual Studio 2005) ones +rem You need the Windows version of GNU rpl +rem Get it here: +rem http://gnuwin32.sourceforge.net/packages/rpl.htm +rem Place rpl.exe from the bin folder inside the archive in the folder where +rem this batch file resides + +if not exist rpl.exe goto no_rpl + +echo Creating MSVC8 project files from the MSVC9 ones +copy /y msvc9\*.vcproj msvc8\ +copy /y msvc9\*.sln msvc8\ +rpl -e -q "Version=\"9.00\"" "Version=\"8.00\"" msvc8\*.vcproj +rpl -e -q "Version=\"9,00\"" "Version=\"8,00\"" msvc8\*.vcproj +rpl -e -q "\tTargetFrameworkVersion=\"131072\"\n" "" msvc8\*.vcproj +rpl -e -q "\t\t\t\tRandomizedBaseAddress=\"1\"\n" "" msvc8\*.vcproj +rpl -e -q "\t\t\t\tDataExecutionPrevention=\"0\"\n" "" msvc8\*.vcproj +rpl -e -q "Format Version 10.00" "Format Version 9.00" msvc8\*.sln +rpl -e -q "Format Version 10,00" "Format Version 9,00" msvc8\*.sln +rpl -e -q "# Visual C++ Express 2008" "# Visual C++ Express 2005" msvc8\*.sln +rpl -e -q "# Visual Studio 2008" "# Visual Studio 2005" msvc8\*.sln +goto the_end + +:no_rpl +echo You need the Windows version of GNU rpl +echo Get it here: +echo http://gnuwin32.sourceforge.net/packages/rpl.htm +echo Place rpl.exe from the bin folder inside the archive in the folder where +echo this batch file resides + +:the_end +pause -- cgit v1.2.3 From c9b2382e7a2163f812fda48a059d57fd40d93d4e Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 9 Jun 2008 11:49:32 +0000 Subject: Initial version of drascula.dat svn-id: r32631 --- dists/engine-data/drascula.dat | Bin 0 -> 213757 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 dists/engine-data/drascula.dat diff --git a/dists/engine-data/drascula.dat b/dists/engine-data/drascula.dat new file mode 100644 index 0000000000..59b629eece Binary files /dev/null and b/dists/engine-data/drascula.dat differ -- cgit v1.2.3 From 62248a0011dcf8bf1c94ea8e945bb3b306778e32 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Mon, 9 Jun 2008 12:23:56 +0000 Subject: Add drascula.dat. svn-id: r32632 --- Makefile.common | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile.common b/Makefile.common index 5a443644f2..c2704f2219 100644 --- a/Makefile.common +++ b/Makefile.common @@ -182,6 +182,9 @@ DIST_FILES_THEMES:=$(addprefix $(srcdir)/gui/themes/,modern.ini modern.zip class # Engine data files DIST_FILES_ENGINEDATA= +ifdef ENABLE_DRASCULA +DIST_FILES_ENGINEDATA+=drascula.dat +endif ifdef ENABLE_IGOR DIST_FILES_ENGINEDATA+=igor.tbl endif -- cgit v1.2.3 From 32edf673a4685224062a3eef9e4756180bb94803 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 9 Jun 2008 14:21:32 +0000 Subject: Slight code revamp to create_drascula.cpp by sev (drascula.dat remains unchanged) svn-id: r32633 --- tools/create_drascula/create_drascula.cpp | 60 +++++++++++++++---------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/tools/create_drascula/create_drascula.cpp b/tools/create_drascula/create_drascula.cpp index 856405dbff..cedce4070f 100644 --- a/tools/create_drascula/create_drascula.cpp +++ b/tools/create_drascula/create_drascula.cpp @@ -175,7 +175,7 @@ int main(int argc, char *argv[]) { writeUint16BE(outFile, NUM_TEXT); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXT; i++) { len1 = strlen(_text[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -184,7 +184,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXT; i++) { len = strlen(_text[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -198,7 +198,7 @@ int main(int argc, char *argv[]) { // Write _textd writeUint16BE(outFile, NUM_TEXTD); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTD; i++) { len1 = strlen(_textd[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -206,7 +206,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTD; i++) { len = strlen(_textd[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -221,7 +221,7 @@ int main(int argc, char *argv[]) { // Write _textb writeUint16BE(outFile, NUM_TEXTB); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTB; i++) { len1 = strlen(_textb[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -229,7 +229,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTB; i++) { len = strlen(_textb[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -244,7 +244,7 @@ int main(int argc, char *argv[]) { // Write _textbj writeUint16BE(outFile, NUM_TEXTBJ); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTBJ; i++) { len1 = strlen(_textbj[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -252,7 +252,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTBJ; i++) { len = strlen(_textbj[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -267,7 +267,7 @@ int main(int argc, char *argv[]) { // Write _texte writeUint16BE(outFile, NUM_TEXTE); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTE; i++) { len1 = strlen(_texte[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -275,7 +275,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTE; i++) { len = strlen(_texte[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -290,7 +290,7 @@ int main(int argc, char *argv[]) { // Write _texti writeUint16BE(outFile, NUM_TEXTI); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTI; i++) { len1 = strlen(_texti[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -298,7 +298,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTI; i++) { len = strlen(_texti[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -313,7 +313,7 @@ int main(int argc, char *argv[]) { // Write _textl writeUint16BE(outFile, NUM_TEXTL); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTL; i++) { len1 = strlen(_textl[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -321,7 +321,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTL; i++) { len = strlen(_textl[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -336,7 +336,7 @@ int main(int argc, char *argv[]) { // Write _textp writeUint16BE(outFile, NUM_TEXTP); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTP; i++) { len1 = strlen(_textp[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -344,7 +344,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTP; i++) { len = strlen(_textp[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -359,7 +359,7 @@ int main(int argc, char *argv[]) { // Write _textt writeUint16BE(outFile, NUM_TEXTT); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTT; i++) { len1 = strlen(_textt[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -367,7 +367,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTT; i++) { len = strlen(_textt[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -382,7 +382,7 @@ int main(int argc, char *argv[]) { // Write _textvb writeUint16BE(outFile, NUM_TEXTVB); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTVB; i++) { len1 = strlen(_textvb[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -390,7 +390,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTVB; i++) { len = strlen(_textvb[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -405,7 +405,7 @@ int main(int argc, char *argv[]) { // Write _textsys writeUint16BE(outFile, NUM_TEXTSYS); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTSYS; i++) { len1 = strlen(_textsys[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -413,7 +413,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTSYS; i++) { len = strlen(_textsys[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -428,7 +428,7 @@ int main(int argc, char *argv[]) { // Write _texthis writeUint16BE(outFile, NUM_TEXTHIS); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTHIS; i++) { len1 = strlen(_texthis[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -436,7 +436,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTHIS; i++) { len = strlen(_texthis[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -451,7 +451,7 @@ int main(int argc, char *argv[]) { // Write _textverbs writeUint16BE(outFile, NUM_TEXTVERBS); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTVERBS; i++) { len1 = strlen(_textverbs[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -459,7 +459,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTVERBS; i++) { len = strlen(_textverbs[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -474,7 +474,7 @@ int main(int argc, char *argv[]) { // Write _textmisc writeUint16BE(outFile, NUM_TEXTMISC); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTMISC; i++) { len1 = strlen(_textmisc[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -482,7 +482,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTMISC; i++) { len = strlen(_textmisc[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; @@ -497,7 +497,7 @@ int main(int argc, char *argv[]) { // Write _textd1 writeUint16BE(outFile, NUM_TEXTD1); for (lang = 0; lang < NUM_LANGS; lang++) { - len = 2; + len = DATAALIGNMENT - 2; for (i = 0; i < NUM_TEXTD1; i++) { len1 = strlen(_textd1[lang][i]) + 1; pad = DATAALIGNMENT - (len1 + 2) % DATAALIGNMENT; @@ -505,7 +505,7 @@ int main(int argc, char *argv[]) { } writeUint16BE(outFile, len); - writeUint16BE(outFile, 0); // padding + fwrite(padBuf, DATAALIGNMENT - 2, 1, outFile); // padding for (i = 0; i < NUM_TEXTD1; i++) { len = strlen(_textd1[lang][i]) + 1; pad = DATAALIGNMENT - (len + 2) % DATAALIGNMENT; -- cgit v1.2.3 From 9e9c38c68939f59b6e577a8225e38235f5ae2f45 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 9 Jun 2008 14:23:04 +0000 Subject: Bugfix to read the first array element correctly by sev svn-id: r32634 --- engines/drascula/drascula.cpp | 3 ++- engines/drascula/drascula.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index c300066f4f..32ece3cd8a 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -930,10 +930,11 @@ char ***DrasculaEngine::loadTexts(Common::File &in) { res[lang] = (char **)malloc(sizeof(char *) * numTexts); res[lang][0] = pos = (char *)malloc(entryLen); + res[lang][0] = pos + DATAALIGNMENT; in.read(res[lang][0], entryLen); - pos += 4; + pos += DATAALIGNMENT; for (int i = 1; i < numTexts; i++) { pos -= 2; diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index f462480ffc..54d6784ec5 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -48,6 +48,7 @@ namespace Drascula { // Do not update this yet. The file is not loaded fully #define DRASCULA_DAT_VER 1 +#define DATAALIGNMENT 4 enum DrasculaGameFeatures { GF_PACKED = (1 << 0) -- cgit v1.2.3 From 661e507772f4f5aadb9fe35468cc105e4232a8bc Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 9 Jun 2008 14:36:58 +0000 Subject: Properly initialize and destroy the different arrays read from drascula.dat. Also, fixed a crash that occurred from the last commit svn-id: r32635 --- engines/drascula/drascula.cpp | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 32ece3cd8a..65a8c4d2f3 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -72,6 +72,20 @@ DrasculaEngine::~DrasculaEngine() { delete _rnd; free(_charMap); + free(_itemLocations); + free(_polX); + free(_polY); + free(_verbBarX); + free(_x1d_menu); + free(_y1d_menu); + free(_frameX); + free(_candleX); + free(_candleY); + free(_pianistX); + free(_drunkX); + free(_roomPreUpdates); + free(_roomUpdates); + free(_roomActions); freeTexts(_text); freeTexts(_textd); freeTexts(_textb); @@ -118,6 +132,20 @@ int DrasculaEngine::init() { } _charMap = 0; + _itemLocations = 0; + _polX = 0; + _polY = 0; + _verbBarX = 0; + _x1d_menu = 0; + _y1d_menu = 0; + _frameX = 0; + _candleX = 0; + _candleY = 0; + _pianistX = 0; + _drunkX = 0; + _roomPreUpdates = 0; + _roomUpdates = 0; + _roomActions = 0; _text = 0; _textd = 0; _textb = 0; @@ -930,7 +958,7 @@ char ***DrasculaEngine::loadTexts(Common::File &in) { res[lang] = (char **)malloc(sizeof(char *) * numTexts); res[lang][0] = pos = (char *)malloc(entryLen); - res[lang][0] = pos + DATAALIGNMENT; + res[lang][0] = pos = pos + DATAALIGNMENT; in.read(res[lang][0], entryLen); -- cgit v1.2.3 From 50c62c7eac52dbb8beb6e3381a1312be45c43835 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 9 Jun 2008 14:45:45 +0000 Subject: Properly initialize and free memory for texts svn-id: r32636 --- engines/drascula/drascula.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 65a8c4d2f3..0085383ac1 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -957,8 +957,8 @@ char ***DrasculaEngine::loadTexts(Common::File &in) { res[lang] = (char **)malloc(sizeof(char *) * numTexts); - res[lang][0] = pos = (char *)malloc(entryLen); - res[lang][0] = pos = pos + DATAALIGNMENT; + pos = (char *)malloc(entryLen); + res[lang][0] = pos + DATAALIGNMENT; in.read(res[lang][0], entryLen); @@ -979,7 +979,7 @@ char ***DrasculaEngine::loadTexts(Common::File &in) { void DrasculaEngine::freeTexts(char ***ptr) { for (int lang = 0; lang < _numLangs; lang++) { - free(ptr[lang][0]); + free(ptr[lang][0] - DATAALIGNMENT); free(ptr[lang]); } free(ptr); -- cgit v1.2.3 From 339874f6c0934e16ac78c9b79a94b765668409af Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Mon, 9 Jun 2008 17:50:52 +0000 Subject: Fixed warnings. (Mainly, GCC 4.3 doesn't want you to use "char" as an array index. Probably because it's undefined whether or not it's signed.) svn-id: r32637 --- engines/cine/gfx.cpp | 8 ++++---- engines/cine/texte.cpp | 2 +- engines/m4/converse.cpp | 2 +- engines/m4/converse.h | 2 +- engines/m4/font.cpp | 2 +- engines/parallaction/font.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/engines/cine/gfx.cpp b/engines/cine/gfx.cpp index aa457fe4f9..47446f2410 100644 --- a/engines/cine/gfx.cpp +++ b/engines/cine/gfx.cpp @@ -335,8 +335,8 @@ int FWRenderer::drawChar(char character, int x, int y) { if (character == ' ') { x += 5; - } else if ((width = fontParamTable[character].characterWidth)) { - idx = fontParamTable[character].characterIdx; + } else if ((width = fontParamTable[(unsigned char)character].characterWidth)) { + idx = fontParamTable[(unsigned char)character].characterIdx; drawSpriteRaw(textTable[idx][0], textTable[idx][1], 16, 8, _backBuffer, x, y); x += width + 1; } @@ -936,8 +936,8 @@ int OSRenderer::drawChar(char character, int x, int y) { if (character == ' ') { x += 5; - } else if ((width = fontParamTable[character].characterWidth)) { - idx = fontParamTable[character].characterIdx; + } else if ((width = fontParamTable[(unsigned char)character].characterWidth)) { + idx = fontParamTable[(unsigned char)character].characterIdx; drawSpriteRaw2(textTable[idx][0], 0, 16, 8, _backBuffer, x, y); x += width + 1; } diff --git a/engines/cine/texte.cpp b/engines/cine/texte.cpp index 91a209074d..9b4b83f420 100644 --- a/engines/cine/texte.cpp +++ b/engines/cine/texte.cpp @@ -635,7 +635,7 @@ int fitLine(const char *str, int maxWidth, int &words, int &width) { bkpWidth = width; bkpLen = i + 1; } else { - charWidth = fontParamTable[str[i]].characterWidth + 1; + charWidth = fontParamTable[(unsigned char)str[i]].characterWidth + 1; width += charWidth; } 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/parallaction/font.cpp b/engines/parallaction/font.cpp index bc67acf644..91848b30a4 100644 --- a/engines/parallaction/font.cpp +++ b/engines/parallaction/font.cpp @@ -96,7 +96,7 @@ public: return (uint16)_height; } - uint16 drawChar(char c) { + uint16 drawChar(unsigned char c) { assert(c < _numGlyphs); byte *src = _data + _offsets[c]; -- cgit v1.2.3 From a9c93a4be9340fb3b2f667771dac3b64ffa87bff Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 9 Jun 2008 18:02:09 +0000 Subject: Fixed regression from commit #32636, leading to a crash svn-id: r32638 --- engines/drascula/drascula.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 0085383ac1..e9a613b2c2 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -958,7 +958,7 @@ char ***DrasculaEngine::loadTexts(Common::File &in) { res[lang] = (char **)malloc(sizeof(char *) * numTexts); pos = (char *)malloc(entryLen); - res[lang][0] = pos + DATAALIGNMENT; + res[lang][0] = pos; in.read(res[lang][0], entryLen); -- cgit v1.2.3 From aac3270de1b5aa504353cbc4d9b3b743721c455d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Mon, 9 Jun 2008 18:03:11 +0000 Subject: endianess fixes svn-id: r32639 --- engines/drascula/graphics.cpp | 59 +++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 22 deletions(-) diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index 3b3448843e..d30f0eeca1 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -115,7 +115,12 @@ void DrasculaEngine::loadPic(const char *NamePcc, byte *targetSurface, int color } } - _arj.read(cPal, 768); + for (int i = 0; i < 256; i++) { + cPal[i * 3 + 0] = _arj.readByte(); + cPal[i * 3 + 1] = _arj.readByte(); + cPal[i * 3 + 2] = _arj.readByte(); + } + _arj.close(); setRGB((byte *)cPal, colorCount); @@ -125,7 +130,13 @@ void DrasculaEngine::showFrame(bool firstFrame) { int dataSize = _arj.readSint32LE(); byte *pcxData = (byte *)malloc(dataSize); _arj.read(pcxData, dataSize); - _arj.read(cPal, 768); + + for (int i = 0; i < 256; i++) { + cPal[i * 3 + 0] = _arj.readByte(); + cPal[i * 3 + 1] = _arj.readByte(); + cPal[i * 3 + 2] = _arj.readByte(); + } + byte *prevFrame = (byte *)malloc(64000); memcpy(prevFrame, VGA, 64000); @@ -487,11 +498,11 @@ void DrasculaEngine::playFLI(const char *filefli, int vel) { int DrasculaEngine::playFrameSSN() { int Exit = 0; - uint32 Lengt; + uint32 length; byte *BufferSSN; if (!UsingMem) - _arj.read(&CHUNK, 1); + CHUNK = _arj.readByte(); else { memcpy(&CHUNK, mSession, 1); mSession += 1; @@ -499,9 +510,13 @@ int DrasculaEngine::playFrameSSN() { switch (CHUNK) { case kFrameSetPal: - if (!UsingMem) - _arj.read(dacSSN, 768); - else { + if (!UsingMem) { + for (int i = 0; i < 256; i++) { + dacSSN[i * 3 + 0] = _arj.readByte(); + dacSSN[i * 3 + 1] = _arj.readByte(); + dacSSN[i * 3 + 2] = _arj.readByte(); + } + } else { memcpy(dacSSN, mSession, 768); mSession += 768; } @@ -513,20 +528,20 @@ int DrasculaEngine::playFrameSSN() { case kFrameInit: if (!UsingMem) { CMP = _arj.readByte(); - Lengt = _arj.readUint32LE(); + length = _arj.readUint32LE(); } else { memcpy(&CMP, mSession, 1); mSession += 1; - Lengt = READ_LE_UINT32(mSession); + length = READ_LE_UINT32(mSession); mSession += 4; } if (CMP == kFrameCmpRle) { - BufferSSN = (byte *)malloc(Lengt); + BufferSSN = (byte *)malloc(length); if (!UsingMem) { - _arj.read(BufferSSN, Lengt); + _arj.read(BufferSSN, length); } else { - memcpy(BufferSSN, mSession, Lengt); - mSession += Lengt; + memcpy(BufferSSN, mSession, length); + mSession += length; } decodeRLE(BufferSSN, screenSurface); free(BufferSSN); @@ -540,14 +555,14 @@ int DrasculaEngine::playFrameSSN() { FrameSSN++; } else { if (CMP == kFrameCmpOff) { - BufferSSN = (byte *)malloc(Lengt); + BufferSSN = (byte *)malloc(length); if (!UsingMem) { - _arj.read(BufferSSN, Lengt); + _arj.read(BufferSSN, length); } else { - memcpy(BufferSSN, mSession, Lengt); - mSession += Lengt; + memcpy(BufferSSN, mSession, length); + mSession += length; } - decodeOffset(BufferSSN, screenSurface, Lengt); + decodeOffset(BufferSSN, screenSurface, length); free(BufferSSN); waitFrameSSN(); if (FrameSSN) @@ -572,15 +587,15 @@ int DrasculaEngine::playFrameSSN() { } byte *DrasculaEngine::TryInMem() { - int Lengt; + int length; _arj.seek(0, SEEK_END); - Lengt = _arj.pos(); + length = _arj.pos(); _arj.seek(0, SEEK_SET); - memPtr = (byte *)malloc(Lengt); + memPtr = (byte *)malloc(length); if (memPtr == NULL) return NULL; - _arj.read(memPtr, Lengt); + _arj.read(memPtr, length); UsingMem = 1; _arj.close(); -- cgit v1.2.3 From 930ba6d02dcec38c065f5a8da56cdd74db8e5862 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 10 Jun 2008 18:54:32 +0000 Subject: drawSurface1 -> bgSurface svn-id: r32644 --- engines/drascula/animation.cpp | 144 ++++++++++++++++++++--------------------- engines/drascula/drascula.cpp | 8 +-- engines/drascula/drascula.h | 2 +- engines/drascula/graphics.cpp | 18 +++--- engines/drascula/interface.cpp | 2 +- engines/drascula/rooms.cpp | 28 ++++---- engines/drascula/saveload.cpp | 6 +- engines/drascula/talk.cpp | 56 ++++++++-------- 8 files changed, 132 insertions(+), 132 deletions(-) diff --git a/engines/drascula/animation.cpp b/engines/drascula/animation.cpp index 66f903e3e3..feb6cb93ca 100644 --- a/engines/drascula/animation.cpp +++ b/engines/drascula/animation.cpp @@ -44,7 +44,7 @@ void DrasculaEngine::updateAnim2(int y, int px, int py, int width, int height, i for (int n = 0; n < count; n++) { x++; - copyBackground(px, py, px, py, width, height, drawSurface1, screenSurface); + copyBackground(px, py, px, py, width, height, bgSurface, screenSurface); copyRect(x, y, px, py, width, height, src, screenSurface); updateScreen(px, py, px, py, width, height, screenSurface); x = x + width; @@ -121,7 +121,7 @@ void DrasculaEngine::animation_1_1() { clearRoom(); loadPic(96, frontSurface, COMPLETE_PAL); - loadPic(103, drawSurface1, HALF_PAL); + loadPic(103, bgSurface, HALF_PAL); loadPic(104, drawSurface3); loadPic("aux104.alg", drawSurface2); @@ -134,7 +134,7 @@ void DrasculaEngine::animation_1_1() { for (l2 = 0; l2 < 3; l2++) for (l = 0; l < 7; l++) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); copyBackground(interf_x[l], interf_y[l], 156, 45, 63, 31, drawSurface2, screenSurface); updateScreen(); if (getScan() == Common::KEYCODE_ESCAPE) { @@ -153,7 +153,7 @@ void DrasculaEngine::animation_1_1() { for (l = 0; l < 180; l++) { copyBackground(0, 0, 320 - l, 0, l, 200, drawSurface3, screenSurface); - copyBackground(l, 0, 0, 0, 320 - l, 200, drawSurface1, screenSurface); + copyBackground(l, 0, 0, 0, 320 - l, 200, bgSurface, screenSurface); pixelPos[0] = interf_x[l2]; pixelPos[1] = interf_y[l2]; @@ -175,7 +175,7 @@ void DrasculaEngine::animation_1_1() { } if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); + copyBackground(0, 0, 0, 0, 320, 200, screenSurface, bgSurface); talk_dr_grande(1); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -183,7 +183,7 @@ void DrasculaEngine::animation_1_1() { clearRoom(); - loadPic(100, drawSurface1, HALF_PAL); + loadPic(100, bgSurface, HALF_PAL); loadPic("auxigor.alg", frontSurface); loadPic("auxdr.alg", backSurface); trackDrascula = 0; @@ -193,14 +193,14 @@ void DrasculaEngine::animation_1_1() { igorX = 66; igorY = 97; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); placeIgor(); placeDrascula(); updateScreen(); talk_igor(8, kIgorDch); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); placeIgor(); placeDrascula(); updateScreen(); @@ -253,7 +253,7 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; clearRoom(); - loadPic(100, drawSurface1, HALF_PAL); + loadPic(100, bgSurface, HALF_PAL); MusicFadeout(); stopMusic(); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) @@ -297,13 +297,13 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; trackDrascula = 3; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); placeIgor(); placeDrascula(); updateScreen(); pause(1); trackDrascula = 0; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); placeIgor(); placeDrascula(); updateScreen(); @@ -311,13 +311,13 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; trackDrascula = 3; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); placeIgor(); placeDrascula(); updateScreen(); pause(1); trackDrascula = 1; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); placeIgor(); placeDrascula(); updateScreen(); @@ -329,13 +329,13 @@ void DrasculaEngine::animation_1_1() { if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; trackDrascula = 3; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); placeIgor(); placeDrascula(); updateScreen(); pause(1); trackDrascula = 0; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); placeIgor(); placeDrascula(); updateScreen(); @@ -450,7 +450,7 @@ void DrasculaEngine::animation_2_1() { break; clearRoom(); - loadPic(16, drawSurface1, HALF_PAL); + loadPic(16, bgSurface, HALF_PAL); if ((term_int == 1) || (getScan() == Common::KEYCODE_ESCAPE)) break; loadPic("auxbj.alg", drawSurface3); @@ -676,14 +676,14 @@ void DrasculaEngine::animation_1_2() { void DrasculaEngine::animation_2_2() { trackProtagonist = 0; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); moveCharacters(); updateRefresh(); updateScreen(); loadPic("an2_1.alg", frontSurface); loadPic("an2_2.alg", extraSurface); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); copyBackground(1, 1, 201, 87, 50, 52, frontSurface, screenSurface); updateScreen(); @@ -697,7 +697,7 @@ void DrasculaEngine::animation_2_2() { updateAnim(55, 201, 87, 50, 52, 6, extraSurface); updateAnim(109, 201, 87, 50, 52, 2, extraSurface); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); finishSound(); @@ -724,7 +724,7 @@ void DrasculaEngine::animation_4_2() { pause(8); clearRoom(); - loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind + loadPic("ciego1.alg", bgSurface, HALF_PAL); // ciego = blind loadPic("ciego2.alg", drawSurface3); loadPic("ciego3.alg", extraSurface); loadPic("ciego4.alg", backSurface); @@ -733,7 +733,7 @@ void DrasculaEngine::animation_4_2() { if (_lang == kSpanish) textSurface = frontSurface; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); pause(10); @@ -757,13 +757,13 @@ void DrasculaEngine::animation_4_2() { talk_blind(7); talk_hacker(63); talk_blind(8); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); _system->delayMillis(1000); talk_hacker(64); talk_blind(9); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); pause(14); @@ -771,7 +771,7 @@ void DrasculaEngine::animation_4_2() { clearRoom(); playMusic(roomMusic); - loadPic(9, drawSurface1, HALF_PAL); + loadPic(9, bgSurface, HALF_PAL); loadPic("aux9.alg", drawSurface3); loadPic(96, frontSurface); loadPic(97, extraSurface); @@ -818,7 +818,7 @@ void DrasculaEngine::animation_14_2() { loadPic("an14_2.alg", backSurface); for (int n = -160; n <= 0; n = n + 5 + l) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); moveCharacters(); moveVonBraun(); @@ -831,7 +831,7 @@ void DrasculaEngine::animation_14_2() { flags[24] = 1; - memcpy(drawSurface1, screenSurface, 64000); + memcpy(bgSurface, screenSurface, 64000); playSound(7); hiccup(15); @@ -867,12 +867,12 @@ void DrasculaEngine::animation_16_2() { if (_lang != kSpanish) color_abc(kColorDarkGreen); - loadPic("his1.alg", drawSurface1, HALF_PAL); + loadPic("his1.alg", bgSurface, HALF_PAL); if (_lang == kSpanish) black(); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); if (_lang != kSpanish) centerText(_texthis[_lang][1], 180, 180); @@ -901,8 +901,8 @@ void DrasculaEngine::animation_16_2() { goto asco; clearRoom(); - loadPic("his2.alg", drawSurface1, HALF_PAL); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + loadPic("his2.alg", bgSurface, HALF_PAL); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); if (_lang != kSpanish) centerText(_texthis[_lang][2], 180, 180); @@ -927,8 +927,8 @@ void DrasculaEngine::animation_16_2() { goto asco; clearRoom(); - loadPic("his3.alg", drawSurface1, HALF_PAL); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + loadPic("his3.alg", bgSurface, HALF_PAL); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); if (_lang != kSpanish) centerText(_texthis[_lang][3], 180, 180); @@ -950,7 +950,7 @@ void DrasculaEngine::animation_16_2() { fadeToBlack(1); clearRoom(); - loadPic("his4_1.alg", drawSurface1, HALF_PAL); + loadPic("his4_1.alg", bgSurface, HALF_PAL); loadPic("his4_2.alg", drawSurface3); copyBackground(0, 0, 0, 0, 320, 200, drawSurface3, screenSurface); @@ -974,7 +974,7 @@ void DrasculaEngine::animation_16_2() { for (int l = 1; l < 200; l++) { copyBackground(0, 0, 0, l, 320, 200 - l, drawSurface3, screenSurface); - copyBackground(0, 200 - l, 0, 0, 320, l, drawSurface1, screenSurface); + copyBackground(0, 200 - l, 0, 0, 320, l, bgSurface, screenSurface); updateScreen(); key = getScan(); if (key != 0) @@ -987,7 +987,7 @@ void DrasculaEngine::animation_16_2() { asco: loadPic(roomDisk, drawSurface3); - loadPic(roomNumber, drawSurface1, HALF_PAL); + loadPic(roomNumber, bgSurface, HALF_PAL); black(); updateRoom(); updateScreen(); @@ -1107,7 +1107,7 @@ void DrasculaEngine::animation_23_joined() { loadPic("an23.alg", backSurface); for (int n = 0; n < 34; n++) { - copyRect(p_x, p_y, p_x, p_y, 36, 74, drawSurface1, screenSurface); + copyRect(p_x, p_y, p_x, p_y, 36, 74, bgSurface, screenSurface); copyRect(x[n], y[n], p_x, p_y, 36, 74, backSurface, screenSurface); updateRefresh(); updateScreen(p_x, p_y, p_x, p_y, 36, 74, screenSurface); @@ -1127,7 +1127,7 @@ void DrasculaEngine::animation_23_joined2() { loadPic("an23_2.alg", backSurface); for (int n = 0; n < 14; n++) { - copyRect(p_x, p_y, p_x, p_y, 33, 71, drawSurface1, screenSurface); + copyRect(p_x, p_y, p_x, p_y, 33, 71, bgSurface, screenSurface); copyRect(x[n], y[n], p_x, p_y, 33, 71, backSurface, screenSurface); updateRefresh(); updateScreen(p_x,p_y, p_x,p_y, 33,71, screenSurface); @@ -1141,14 +1141,14 @@ void DrasculaEngine::animation_25_2() { int cabinPos[6] = { 150, 6, 69, 0, 158, 161 }; loadPic("an14_2.alg", backSurface); - loadPic(18, drawSurface1); + loadPic(18, bgSurface); flags[24] = 0; playSound(6); for (int n = 0; n >= -160; n = n - 8) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); moveCharacters(); @@ -1289,7 +1289,7 @@ void DrasculaEngine::animation_35_2() { updateAnim(1, 70, 90, 46, 80, 6, frontSurface); updateAnim(82, 70, 90, 46, 80, 2, frontSurface); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); @@ -1392,7 +1392,7 @@ void DrasculaEngine::animation_6_3() { for (frame = 0; frame < 6; frame++) { pause(3); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); copyRect(yoda_x[frame], yoda_y[frame], px, py, 78, 90, frontSurface, screenSurface); updateScreen(px, py, px, py, 78, 90, screenSurface); } @@ -1409,7 +1409,7 @@ void DrasculaEngine::animation_ray() { loadPic("anr_1.alg", frontSurface, HALF_PAL); loadPic("anr_2.alg", extraSurface); loadPic("anr_3.alg", backSurface); - loadPic("anr_4.alg", drawSurface1); + loadPic("anr_4.alg", bgSurface); loadPic("anr_5.alg", drawSurface3); updateScreen(0, 0, 0, 0, 320, 200, frontSurface); @@ -1422,7 +1422,7 @@ void DrasculaEngine::animation_ray() { pause(3); updateScreen(0, 0, 0, 0, 320, 200, backSurface); pause(3); - updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); + updateScreen(0, 0, 0, 0, 320, 200, bgSurface); pause(3); updateScreen(0, 0, 0, 0, 320, 200, backSurface); pause(3); @@ -1560,7 +1560,7 @@ void DrasculaEngine::animation_5_5(){ for (frame = 0; frame < 9; frame++) { pause(3); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); copyRect(boneX[frame], boneY[frame], pixelX, pixelY, 97, 64, backSurface, screenSurface); updateScreen(pixelX, pixelY, pixelX,pixelY, 97,64, screenSurface); } @@ -1570,7 +1570,7 @@ void DrasculaEngine::animation_5_5(){ for (frame = 0; frame < 9; frame++) { pause(3); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); copyRect(boneX[frame], boneY[frame], pixelX, pixelY, 97, 64, frontSurface, screenSurface); updateScreen(pixelX, pixelY, pixelX,pixelY, 97, 64, screenSurface); } @@ -1585,11 +1585,11 @@ void DrasculaEngine::animation_5_5(){ updateScreen(); - loadPic(101, drawSurface1, HALF_PAL); + loadPic(101, bgSurface, HALF_PAL); loadPic("3an5_3.alg", backSurface); loadPic("3an5_4.alg", extraSurface); - updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); + updateScreen(0, 0, 0, 0, 320, 200, bgSurface); pause(9); for (frame = 0; frame < 5; frame++) { pause(3); @@ -1601,7 +1601,7 @@ void DrasculaEngine::animation_5_5(){ copyBackground(flyX[frame], 1, 174, 79, 61, 109, extraSurface, screenSurface); updateScreen(174, 79, 174, 79, 61, 109, screenSurface); } - updateScreen(0, 0, 0, 0, 320, 200, drawSurface1); + updateScreen(0, 0, 0, 0, 320, 200, bgSurface); playSound(1); finishSound(); @@ -1611,7 +1611,7 @@ void DrasculaEngine::animation_5_5(){ clearRoom(); - loadPic(49, drawSurface1, HALF_PAL); + loadPic(49, bgSurface, HALF_PAL); } void DrasculaEngine::animation_6_5() { @@ -1931,7 +1931,7 @@ void DrasculaEngine::animation_5_6() { animate("man.bin", 14); for (int n = -125; n <= 0; n = n + 2) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); pos_pen[3] = n; copyRectClip(pos_pen, drawSurface3, screenSurface); @@ -1994,7 +1994,7 @@ void DrasculaEngine::animation_9_6() { // Also check animation_2_1(), where the same hack was used // by the original roomNumber = -1; - loadPic("nota2.alg", drawSurface1, HALF_PAL); + loadPic("nota2.alg", bgSurface, HALF_PAL); black(); trackProtagonist = 1; curX -= 21; @@ -2008,7 +2008,7 @@ void DrasculaEngine::animation_9_6() { updateScreen(); playMusic(9); clearRoom(); - loadPic("nota.alg", drawSurface1, COMPLETE_PAL); + loadPic("nota.alg", bgSurface, COMPLETE_PAL); color_abc(kColorWhite); talk_solo(_textbj[_lang][24], "bj24.als"); talk_solo(_textbj[_lang][25], "bj25.als"); @@ -2018,7 +2018,7 @@ void DrasculaEngine::animation_9_6() { trackProtagonist = 3; clearRoom(); loadPic(96, frontSurface, COMPLETE_PAL); - loadPic("nota2.alg", drawSurface1, HALF_PAL); + loadPic("nota2.alg", bgSurface, HALF_PAL); talk(296); talk(297); talk(298); @@ -2026,11 +2026,11 @@ void DrasculaEngine::animation_9_6() { talk(299); talk(300); updateRoom(); - copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); + copyBackground(0, 0, 0, 0, 320, 200, screenSurface, bgSurface); updateScreen(); color_abc(kColorLightGreen); talk_solo(_textmisc[_lang][2], "s15.als"); - loadPic("nota2.alg", drawSurface1); + loadPic("nota2.alg", bgSurface); trackProtagonist = 0; updateRoom(); updateScreen(); @@ -2052,7 +2052,7 @@ void DrasculaEngine::animation_9_6() { void DrasculaEngine::animation_10_6() { playSound(14); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); copyBackground(164, 85, 155, 48, 113, 114, drawSurface3, screenSurface); updateScreen(); @@ -2097,7 +2097,7 @@ void DrasculaEngine::animation_18_6() { } void DrasculaEngine::animation_19_6() { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); copyBackground(140, 23, 161, 69, 35, 80, drawSurface3, screenSurface); updateRefresh_pre(); @@ -2381,9 +2381,9 @@ void DrasculaEngine::animation_7_2() { loadPic("an7_3.alg", frontSurface); if (flags[3] == 1) - copyBackground(258, 110, 85, 44, 23, 53, drawSurface3, drawSurface1); + copyBackground(258, 110, 85, 44, 23, 53, drawSurface3, bgSurface); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); @@ -2416,7 +2416,7 @@ void DrasculaEngine::animation_7_2() { updateAnim2(75, 80, 64, 51, 73, 6, backSurface); updateAnim2(1, 80, 64, 51, 73, 6, extraSurface); - copyBackground(80, 64, 80, 64, 51, 73, drawSurface1, screenSurface); + copyBackground(80, 64, 80, 64, 51, 73, bgSurface, screenSurface); copyRect(1, 75, 80, 64, 51, 73, extraSurface, screenSurface); updateScreen(80, 64, 80, 64, 51, 73, screenSurface); @@ -2475,13 +2475,13 @@ void DrasculaEngine::animation_6_2() { textSurface = frontSurface; clearRoom(); - loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind + loadPic("ciego1.alg", bgSurface, HALF_PAL); // ciego = blind loadPic("ciego2.alg", drawSurface3); loadPic("ciego3.alg", extraSurface); loadPic("ciego4.alg", backSurface); loadPic("ciego5.alg", frontSurface); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); pause(1); @@ -2493,7 +2493,7 @@ void DrasculaEngine::animation_6_2() { pause(4); talk_hacker(67); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); pause(10); @@ -2501,7 +2501,7 @@ void DrasculaEngine::animation_6_2() { clearRoom(); playMusic(roomMusic); - loadPic(9, drawSurface1, HALF_PAL); + loadPic(9, bgSurface, HALF_PAL); loadPic("aux9.alg", drawSurface3); loadPic(96, frontSurface); loadPic(97, extraSurface); @@ -2523,7 +2523,7 @@ void DrasculaEngine::animation_33_2() { pause(8); clearRoom(); - loadPic("ciego1.alg", drawSurface1, HALF_PAL); // ciego = blind + loadPic("ciego1.alg", bgSurface, HALF_PAL); // ciego = blind loadPic("ciego2.alg", drawSurface3); loadPic("ciego3.alg", extraSurface); loadPic("ciego4.alg", backSurface); @@ -2532,7 +2532,7 @@ void DrasculaEngine::animation_33_2() { if (_lang == kSpanish) textSurface = frontSurface; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); pause(10); @@ -2545,7 +2545,7 @@ void DrasculaEngine::animation_33_2() { talk_blind(10); talk_hacker(65); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); pause(14); @@ -2553,7 +2553,7 @@ void DrasculaEngine::animation_33_2() { clearRoom(); playMusic(roomMusic); - loadPic(9, drawSurface1, HALF_PAL); + loadPic(9, bgSurface, HALF_PAL); loadPic("aux9.alg", drawSurface3); loadPic(96, frontSurface); loadPic(97, extraSurface); @@ -2656,10 +2656,10 @@ void DrasculaEngine::animation_6_4() { roomNumber = 26; clearRoom(); - loadPic(26, drawSurface1, HALF_PAL); + loadPic(26, bgSurface, HALF_PAL); loadPic("aux26.alg", drawSurface3); loadPic("auxigor.alg", frontSurface); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); update_26_pre(); igorX = 104; igorY = 71; @@ -2671,7 +2671,7 @@ void DrasculaEngine::animation_6_4() { clearRoom(); loadPic(96, frontSurface); loadPic(roomDisk, drawSurface3); - loadPic(roomNumber, drawSurface1, HALF_PAL); + loadPic(roomNumber, bgSurface, HALF_PAL); withoutVerb(); updateRoom(); } @@ -2701,7 +2701,7 @@ void DrasculaEngine::activatePendulum() { flags[1] = 2; hare_se_ve = 0; roomNumber = 102; - loadPic(102, drawSurface1, HALF_PAL); + loadPic(102, bgSurface, HALF_PAL); loadPic("an_p1.alg", drawSurface3); loadPic("an_p2.alg", extraSurface); loadPic("an_p3.alg", frontSurface); diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index e9a613b2c2..dd5f0968ff 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -226,7 +226,7 @@ int DrasculaEngine::go() { loadPic(96, frontSurface, COMPLETE_PAL); loadPic("pts.alg", drawSurface2); } else if (currentChapter == 3) { - loadPic("aux13.alg", drawSurface1, COMPLETE_PAL); + loadPic("aux13.alg", bgSurface, COMPLETE_PAL); loadPic(96, frontSurface); loadPic(97, extraSurface); loadPic(99, backSurface); @@ -529,7 +529,7 @@ bool DrasculaEngine::runCurrentChapter() { if (!confirmExit()) return false; } else if (currentChapter == 6 && key == Common::KEYCODE_0 && roomNumber == 61) { - loadPic("alcbar.alg", drawSurface1, 255); + loadPic("alcbar.alg", bgSurface, 255); } if (leftMouseButton != 0 || rightMouseButton != 0 || key != 0) @@ -753,7 +753,7 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ do { counter--; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); if (currentChapter == 3) updateScreen(0, 0, 0, y, 320, 200, screenSurface); else @@ -777,7 +777,7 @@ void DrasculaEngine::hipo_sin_nadie(int counter){ } } while (counter > 0); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); } diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 54d6784ec5..8fff8bd5c2 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -278,7 +278,7 @@ public: // Graphics buffers/pointers byte *VGA; - byte *drawSurface1; + byte *bgSurface; byte *backSurface; byte *drawSurface3; byte *drawSurface2; diff --git a/engines/drascula/graphics.cpp b/engines/drascula/graphics.cpp index d30f0eeca1..64591a856e 100644 --- a/engines/drascula/graphics.cpp +++ b/engines/drascula/graphics.cpp @@ -37,8 +37,8 @@ void DrasculaEngine::allocMemory() { assert(frontSurface); backSurface = (byte *)malloc(64000); assert(backSurface); - drawSurface1 = (byte *)malloc(64000); - assert(drawSurface1); + bgSurface = (byte *)malloc(64000); + assert(bgSurface); drawSurface2 = (byte *)malloc(64000); assert(drawSurface2); drawSurface3 = (byte *)malloc(64000); @@ -51,7 +51,7 @@ void DrasculaEngine::allocMemory() { void DrasculaEngine::freeMemory() { free(screenSurface); - free(drawSurface1); + free(bgSurface); free(backSurface); free(drawSurface2); free(tableSurface); @@ -61,7 +61,7 @@ void DrasculaEngine::freeMemory() { } void DrasculaEngine::moveCursor() { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); moveCharacters(); @@ -388,7 +388,7 @@ void DrasculaEngine::screenSaver() { clearRoom(); - loadPic("sv.alg", drawSurface1, HALF_PAL); + loadPic("sv.alg", bgSurface, HALF_PAL); // inicio_ghost(); copia = (byte *)malloc(64000); @@ -407,9 +407,9 @@ void DrasculaEngine::screenSaver() { yr = mouseY; for (;;) { - // efecto(drawSurface1); + // efecto(bgSurface); - memcpy(copia, drawSurface1, 64000); + memcpy(copia, bgSurface, 64000); coeff += 0.1f; coeff2 = coeff; @@ -451,7 +451,7 @@ void DrasculaEngine::screenSaver() { y1_ = checkWrapY(y1_); off2 = 320 * y1_ + x1_; - VGA[320 * i + j] = ghost[drawSurface1[off2] + (copia[off1] << 8)]; + VGA[320 * i + j] = ghost[bgSurface[off2] + (copia[off1] << 8)]; } } _system->copyRectToScreen((const byte *)VGA, 320, 0, 0, 320, 200); @@ -473,7 +473,7 @@ void DrasculaEngine::screenSaver() { free(copia); free(ghost); - loadPic(roomNumber, drawSurface1, HALF_PAL); + loadPic(roomNumber, bgSurface, HALF_PAL); } void DrasculaEngine::playFLI(const char *filefli, int vel) { diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp index daf3e69a54..c81d617cde 100644 --- a/engines/drascula/interface.cpp +++ b/engines/drascula/interface.cpp @@ -120,7 +120,7 @@ void DrasculaEngine::enterName() { strcpy(select2, " "); for (;;) { select2[v] = '-'; - copyBackground(115, 14, 115, 14, 176, 9, drawSurface1, screenSurface); + copyBackground(115, 14, 115, 14, 176, 9, bgSurface, screenSurface); print_abc(select2, 117, 15); updateScreen(); key = getScan(); diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index c19eff3b0b..475b6c4b49 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -195,7 +195,7 @@ bool DrasculaEngine::room_3(int fl) { talk(149); talk(150); } else if (pickedObject == kVerbPick && fl == 165) { - copyBackground(0, 0, 0,0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0,0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); copyRect(44, 1, curX, curY, 41, 70, drawSurface2, screenSurface); updateRefresh(); @@ -252,7 +252,7 @@ bool DrasculaEngine::room_6(int fl) { else if (pickedObject == kVerbClose && fl == 138) closeDoor(0, 1); else if (pickedObject == kVerbOpen && fl == 143 && flags[2] == 0) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); copyRect(228, 102, curX + 5, curY - 1, 47, 73, drawSurface3, screenSurface); updateScreen(); @@ -263,7 +263,7 @@ bool DrasculaEngine::room_6(int fl) { updateScreen(); finishSound(); } else if (pickedObject == kVerbClose && fl == 143 && flags[2] == 1) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); flags[2] = 0; updateRefresh_pre(); copyRect(228, 102, curX + 5, curY - 1, 47, 73, drawSurface3, screenSurface); @@ -274,7 +274,7 @@ bool DrasculaEngine::room_6(int fl) { updateScreen(); finishSound(); } else if (pickedObject == kVerbOpen && fl == 139 && flags[1] == 0) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); copyRect(267, 1, curX - 14, curY - 2, 52, 73, drawSurface3, screenSurface); updateScreen(); @@ -287,7 +287,7 @@ bool DrasculaEngine::room_6(int fl) { updateScreen(); finishSound(); } else if (pickedObject == kVerbPick && fl == 140) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); copyRect(267, 1, curX - 14, curY - 2, 52, 73, drawSurface3, screenSurface); updateScreen(); @@ -407,7 +407,7 @@ bool DrasculaEngine::room_15(int fl) { talk_sync(_text[_lang][46], "46.als", "4442444244244"); trackProtagonist = 1; } else if (pickedObject == 18 && fl == 188 && flags[26] == 0) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); copyRect(133, 135, curX + 6, curY, 39, 63, drawSurface3, screenSurface); updateScreen(); playSound(8); @@ -497,7 +497,7 @@ bool DrasculaEngine::room_18(int fl) { else if (pickedObject == kVerbTalk && fl == 55 && flags[36] == 1) talk(109); else if (pickedObject == kVerbPick && fl == 182) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); copyRect(44, 1, curX, curY, 41, 70, drawSurface2, screenSurface); updateRefresh(); @@ -519,7 +519,7 @@ bool DrasculaEngine::room_18(int fl) { trackProtagonist = 3; updateRoom(); updateScreen(); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); copyRect(1, 1, curX - 1, curY + 3, 42, 67, drawSurface2, screenSurface); updateRefresh(); @@ -922,11 +922,11 @@ bool DrasculaEngine::room_59(int fl) { hare_se_ve = 0; updateRoom(); copyRect(101, 34, curX - 4, curY - 1, 37, 70, drawSurface3, screenSurface); - copyBackground(0, 0, 0, 0, 320, 200, screenSurface, drawSurface1); + copyBackground(0, 0, 0, 0, 320, 200, screenSurface, bgSurface); updateScreen(); hare_se_ve = 1; clearRoom(); - loadPic("tlef0.alg", drawSurface1, COMPLETE_PAL); + loadPic("tlef0.alg", bgSurface, COMPLETE_PAL); loadPic("tlef1.alg", drawSurface3); loadPic("tlef2.alg", frontSurface); loadPic("tlef3.alg", backSurface); @@ -950,7 +950,7 @@ bool DrasculaEngine::room_59(int fl) { loadPic("aux59.alg", drawSurface3); loadPic(96, frontSurface, COMPLETE_PAL); loadPic(99, backSurface); - loadPic(59, drawSurface1, HALF_PAL); + loadPic(59, bgSurface, HALF_PAL); trackProtagonist = 3; talk(245); withoutVerb(); @@ -1343,7 +1343,7 @@ void DrasculaEngine::update_58() { void DrasculaEngine::update_59_pre() { if (flags[9] == 1) { - copyBackground(65, 103, 65, 103, 49, 38, drawSurface1, screenSurface); + copyBackground(65, 103, 65, 103, 49, 38, bgSurface, screenSurface); copyRect(1, 105, 65, 103, 49, 38, drawSurface3, screenSurface); } } @@ -1710,7 +1710,7 @@ void DrasculaEngine::enterRoom(int roomIndex) { } loadPic(roomDisk, drawSurface3); - loadPic(roomNumber, drawSurface1, HALF_PAL); + loadPic(roomNumber, bgSurface, HALF_PAL); copyBackground(0, 171, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); @@ -1974,7 +1974,7 @@ bool DrasculaEngine::exitRoom(int l) { } void DrasculaEngine::updateRoom() { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); if (currentChapter == 3) { if (flags[0] == 0) diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp index 9e5b0aa74d..008784f209 100644 --- a/engines/drascula/saveload.cpp +++ b/engines/drascula/saveload.cpp @@ -53,7 +53,7 @@ bool DrasculaEngine::saveLoadScreen() { sav->readLine(names[n], 23); delete sav; - loadPic("savescr.alg", drawSurface1, HALF_PAL); + loadPic("savescr.alg", bgSurface, HALF_PAL); color_abc(kColorLightGreen); @@ -61,7 +61,7 @@ bool DrasculaEngine::saveLoadScreen() { for (;;) { y = 27; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); for (n = 0; n < NUM_SAVES; n++) { print_abc(names[n], 116, y); y = y + 9; @@ -154,7 +154,7 @@ bool DrasculaEngine::saveLoadScreen() { } clearRoom(); - loadPic(roomNumber, drawSurface1, HALF_PAL); + loadPic(roomNumber, bgSurface, HALF_PAL); selectionMade = 0; return true; diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 6aa09b2505..4d3187a0fd 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -70,18 +70,18 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { do { if (talkerType == kIgorDch || talkerType == kIgorFront) { face = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); } else if (talkerType == kIgorSeated || talkerType == kIgorWig) { face = _rnd->getRandomNumber(3); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); } if (talkerType == kIgorDch) { placeIgor(); placeDrascula(); - copyBackground(igorX + 17, igorY, igorX + 17, igorY, 37, 24, drawSurface1, screenSurface); + copyBackground(igorX + 17, igorY, igorX + 17, igorY, 37, 24, bgSurface, screenSurface); copyRect(x_talk0[face], 148, igorX + 17, igorY, 25, 24, frontSurface, screenSurface); updateRefresh(); if (withVoices == 0) @@ -94,7 +94,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { if (currentChapter == 1) placeDrascula(); if (currentChapter == 1 || currentChapter == 6) - copyBackground(igorX, igorY, igorX, igorY, 29, 25, drawSurface1, screenSurface); + copyBackground(igorX, igorY, igorX, igorY, 29, 25, bgSurface, screenSurface); copyRect(x_talk1[face], 173, igorX, igorY, 29, 25, frontSurface, screenSurface); updateRefresh(); if (withVoices == 0) @@ -127,7 +127,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) { } if (talkerType == kIgorDch || (talkerType == kIgorFront && currentChapter == 1)) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); placeIgor(); placeDrascula(); } @@ -152,7 +152,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) { do { face = _rnd->getRandomNumber(7); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); @@ -161,7 +161,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) { if (currentChapter == 6) moveCharacters(); - copyBackground(drasculaX, drasculaY, drasculaX, drasculaY, 38 + offset, 31, drawSurface1, screenSurface); + copyBackground(drasculaX, drasculaY, drasculaX, drasculaY, 38 + offset, 31, bgSurface, screenSurface); if (currentChapter == 6) copyRect(x_talk[face], offset2, drasculaX + offset, drasculaY, 38, 31, drawSurface2, screenSurface); else @@ -179,7 +179,7 @@ void DrasculaEngine::talk_drascula(int index, int talkerType) { } while (!isTalkFinished(&length)); if (talkerType == 0) - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); if (talkerType == 1 && currentChapter == 6) updateRoom(); @@ -204,7 +204,7 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { talkInit(filename); if (currentChapter == 6) - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); do { if (withVoices == 0) { @@ -219,7 +219,7 @@ void DrasculaEngine::talk_solo(const char *said, const char *filename) { } while (!isTalkFinished(&length)); if (currentChapter == 6) { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); } } @@ -260,7 +260,7 @@ void DrasculaEngine::talk_bartender(int index, int talkerType) { face = _rnd->getRandomNumber(5); } - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); @@ -299,12 +299,12 @@ void DrasculaEngine::talk_bj(int index) { if (currentChapter != 5) { face = _rnd->getRandomNumber(4); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); copyBackground(bjX + 2, bjY - 1, bjX + 2, bjY - 1, 27, 40, - drawSurface1, screenSurface); + bgSurface, screenSurface); copyRect(x_talk[face], 99, bjX + 2, bjY - 1, 27, 40, drawSurface3, screenSurface); @@ -375,7 +375,7 @@ void DrasculaEngine::talk(const char *said, const char *filename) { do { face = _rnd->getRandomNumber(5); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); if (currentChapter == 2) @@ -510,12 +510,12 @@ void DrasculaEngine::talk_vonBraun(int index) { talkInit(filename); - copyBackground(vonBraunX + 5, 64, OBJWIDTH + 1, 0, 25, 27, drawSurface1, drawSurface3); + copyBackground(vonBraunX + 5, 64, OBJWIDTH + 1, 0, 25, 27, bgSurface, drawSurface3); do { if (trackVonBraun == 1) { face = _rnd->getRandomNumber(5); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); moveCharacters(); moveVonBraun(); @@ -580,13 +580,13 @@ void DrasculaEngine::talk_blind(int index) { color_abc(kColorBrown); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); talkInit(filename); do { - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); pos_blind[5] = 149; char c = toupper(syncChar[p]); @@ -623,7 +623,7 @@ void DrasculaEngine::talk_hacker(int index) { const char *said = _textd[_lang][index]; int length = strlen(said); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); color_abc(kColorYellow); @@ -683,7 +683,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename, int talker else face = _rnd->getRandomNumber(4); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); if (talkerType == 0) @@ -706,7 +706,7 @@ void DrasculaEngine::talk_pen(const char *said, const char *filename, int talker } while (!isTalkFinished(&length)); flags[1] = 0; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); updateScreen(); } @@ -726,11 +726,11 @@ void DrasculaEngine::talk_bj_bed(int index) { do { face = _rnd->getRandomNumber(4); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); - copyBackground(65, 103, 65, 103, 49, 38, drawSurface1, screenSurface); + copyBackground(65, 103, 65, 103, 49, 38, bgSurface, screenSurface); copyRect(x_talk[face], 105, 65, 103, 49, 38, drawSurface3, screenSurface); moveCharacters(); updateRefresh(); @@ -771,7 +771,7 @@ void DrasculaEngine::talk_htel(int index) { else faceBuffer = (char *)backSurface; - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); copyBackground(x_talk[face], 1, 45, 24, 92, 108, (byte *)faceBuffer, screenSurface); @@ -782,7 +782,7 @@ void DrasculaEngine::talk_htel(int index) { pause(3); } while (!isTalkFinished(&length)); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateScreen(); } @@ -808,7 +808,7 @@ void DrasculaEngine::talk_sync(const char *said, const char *filename, const cha strncpy(buf, &syncChar[p], 1); face = atoi(buf); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); if (currentChapter == 2) @@ -918,7 +918,7 @@ void DrasculaEngine::talk_dr_grande(int index) { do { face = _rnd->getRandomNumber(3); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); copyBackground(interf_x[l] + 24, interf_y[l], 0, 45, 39, 31, drawSurface2, screenSurface); copyBackground(x_talk[face], 1, 171, 68, 45, 48, drawSurface2, screenSurface); l++; @@ -946,7 +946,7 @@ void DrasculaEngine::talk_generic(const char* said, const char* filename, int* f do { face = _rnd->getRandomNumber(faceCount - 1); - copyBackground(0, 0, 0, 0, 320, 200, drawSurface1, screenSurface); + copyBackground(0, 0, 0, 0, 320, 200, bgSurface, screenSurface); updateRefresh_pre(); copyBackground(faces[face], coords[0], coords[1], coords[2], coords[3], coords[4], surface, screenSurface); -- cgit v1.2.3 From c51b11e86269acddd77acf903cdc3fc60dc2205f Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 10 Jun 2008 18:56:59 +0000 Subject: verbo -> verb svn-id: r32645 --- engines/drascula/interface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/drascula/interface.cpp b/engines/drascula/interface.cpp index c81d617cde..6e86788007 100644 --- a/engines/drascula/interface.cpp +++ b/engines/drascula/interface.cpp @@ -39,7 +39,7 @@ void DrasculaEngine::selectVerbFromBar() { withoutVerb(); } -void DrasculaEngine::selectVerb(int verbo) { +void DrasculaEngine::selectVerb(int verb) { int c = (menuScreen == 1) ? 0 : 171; if (currentChapter == 5) { @@ -50,10 +50,10 @@ void DrasculaEngine::selectVerb(int verbo) { addObject(pickedObject); } - copyBackground(OBJWIDTH * verbo, c, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); + copyBackground(OBJWIDTH * verb, c, 0, 0, OBJWIDTH, OBJHEIGHT, backSurface, drawSurface3); takeObject = 1; - pickedObject = verbo; + pickedObject = verb; } bool DrasculaEngine::confirmExit() { -- cgit v1.2.3 From 3823a23b70ccb7346563e2d46ae3c12acb786712 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Tue, 10 Jun 2008 19:08:53 +0000 Subject: Objectified the Delphine decompression routine (i.e. delphineUnpack). svn-id: r32646 --- engines/cine/part.cpp | 6 ++- engines/cine/unpack.cpp | 101 +++++++++++++++++++++++------------------------- engines/cine/unpack.h | 20 +++++++++- 3 files changed, 72 insertions(+), 55 deletions(-) diff --git a/engines/cine/part.cpp b/engines/cine/part.cpp index 0ce8dfdb21..535bf841d5 100644 --- a/engines/cine/part.cpp +++ b/engines/cine/part.cpp @@ -127,7 +127,8 @@ void CineEngine::readVolCnf() { uint8 *buf = new uint8[unpackedSize]; f.read(buf, packedSize); if (packedSize != unpackedSize) { - if (!delphineUnpack(buf, buf, packedSize)) { + CineUnpacker cineUnpacker; + if (!cineUnpacker.unpack(buf, buf, packedSize)) { error("Error while unpacking 'vol.cnf' data"); } } @@ -224,7 +225,8 @@ byte *readBundleFile(int16 foundFileIdx) { if (partBuffer[foundFileIdx].unpackedSize != partBuffer[foundFileIdx].packedSize) { byte *unpackBuffer = (byte *)malloc(partBuffer[foundFileIdx].packedSize); readFromPart(foundFileIdx, unpackBuffer); - delphineUnpack(dataPtr, unpackBuffer, partBuffer[foundFileIdx].packedSize); + CineUnpacker cineUnpacker; + cineUnpacker.unpack(dataPtr, unpackBuffer, partBuffer[foundFileIdx].packedSize); free(unpackBuffer); } else { readFromPart(foundFileIdx, dataPtr); diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp index 4409af4b07..ef761e87f1 100644 --- a/engines/cine/unpack.cpp +++ b/engines/cine/unpack.cpp @@ -30,94 +30,91 @@ namespace Cine { -struct UnpackCtx { - int size, datasize; - uint32 crc; - uint32 chk; - byte *dst; - const byte *src; -}; +uint32 CineUnpacker::readSource() { + uint32 value = READ_BE_UINT32(_src); + _src -= 4; + return value; +} -static int rcr(UnpackCtx *uc, int CF) { - int rCF = (uc->chk & 1); - uc->chk >>= 1; +int CineUnpacker::rcr(int CF) { + int rCF = (_chk & 1); + _chk >>= 1; if (CF) { - uc->chk |= 0x80000000; + _chk |= 0x80000000; } return rCF; } -static int nextChunk(UnpackCtx *uc) { - int CF = rcr(uc, 0); - if (uc->chk == 0) { - uc->chk = READ_BE_UINT32(uc->src); uc->src -= 4; - uc->crc ^= uc->chk; - CF = rcr(uc, 1); +int CineUnpacker::nextChunk() { + int CF = rcr(0); + if (_chk == 0) { + _chk = readSource(); + _crc ^= _chk; + CF = rcr(1); } return CF; } -static uint16 getCode(UnpackCtx *uc, byte numChunks) { +uint16 CineUnpacker::getCode(byte numChunks) { uint16 c = 0; while (numChunks--) { c <<= 1; - if (nextChunk(uc)) { + if (nextChunk()) { c |= 1; } } return c; } -static void unpackHelper1(UnpackCtx *uc, byte numChunks, byte addCount) { - uint16 count = getCode(uc, numChunks) + addCount + 1; - uc->datasize -= count; +void CineUnpacker::unpackHelper1(byte numChunks, byte addCount) { + uint16 count = getCode(numChunks) + addCount + 1; + _datasize -= count; while (count--) { - *uc->dst = (byte)getCode(uc, 8); - --uc->dst; + *_dst = (byte)getCode(8); + --_dst; } } -static void unpackHelper2(UnpackCtx *uc, byte numChunks) { - uint16 i = getCode(uc, numChunks); - uint16 count = uc->size + 1; - uc->datasize -= count; +void CineUnpacker::unpackHelper2(byte numChunks) { + uint16 i = getCode(numChunks); + uint16 count = _size + 1; + _datasize -= count; while (count--) { - *uc->dst = *(uc->dst + i); - --uc->dst; + *_dst = *(_dst + i); + --_dst; } } -bool delphineUnpack(byte *dst, const byte *src, int len) { - UnpackCtx uc; - uc.src = src + len - 4; - uc.datasize = READ_BE_UINT32(uc.src); uc.src -= 4; - uc.dst = dst + uc.datasize - 1; - uc.size = 0; - uc.crc = READ_BE_UINT32(uc.src); uc.src -= 4; - uc.chk = READ_BE_UINT32(uc.src); uc.src -= 4; - uc.crc ^= uc.chk; +bool CineUnpacker::unpack(byte *dst, const byte *src, int srcLen) { + _src = src + srcLen - 4; + _datasize = readSource(); + _dst = dst + _datasize - 1; + _size = 0; + _crc = readSource(); + _chk = readSource(); + _crc ^= _chk; do { - if (!nextChunk(&uc)) { - uc.size = 1; - if (!nextChunk(&uc)) { - unpackHelper1(&uc, 3, 0); + if (!nextChunk()) { + _size = 1; + if (!nextChunk()) { + unpackHelper1(3, 0); } else { - unpackHelper2(&uc, 8); + unpackHelper2(8); } } else { - uint16 c = getCode(&uc, 2); + uint16 c = getCode(2); if (c == 3) { - unpackHelper1(&uc, 8, 8); + unpackHelper1(8, 8); } else if (c < 2) { - uc.size = c + 2; - unpackHelper2(&uc, c + 9); + _size = c + 2; + unpackHelper2(c + 9); } else { - uc.size = getCode(&uc, 8); - unpackHelper2(&uc, 12); + _size = getCode(8); + unpackHelper2(12); } } - } while (uc.datasize > 0 && uc.src >= src - 4); - return uc.crc == 0; + } while (_datasize > 0 && _src >= src - 4); + return _crc == 0; } } // End of namespace Cine diff --git a/engines/cine/unpack.h b/engines/cine/unpack.h index 5f57a3531b..9433fafa58 100644 --- a/engines/cine/unpack.h +++ b/engines/cine/unpack.h @@ -31,7 +31,25 @@ namespace Cine { -bool delphineUnpack(byte *dst, const byte *src, int len); +class CineUnpacker { +public: + /** Returns true if unpacking was successful, otherwise false. */ + bool unpack(byte *dst, const byte *src, int srcLen); +private: + /** Reads a single big endian 32-bit integer from the source and goes backwards 4 bytes. */ + uint32 readSource(); + int rcr(int CF); + int nextChunk(); + uint16 getCode(byte numChunks); + void unpackHelper1(byte numChunks, byte addCount); + void unpackHelper2(byte numChunks); +private: + int _size, _datasize; + uint32 _crc; + uint32 _chk; + byte *_dst; + const byte *_src; +}; } // End of namespace Cine -- cgit v1.2.3 From e03bd801d6606b17b792356aece75cf5d2d3eb8c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 10 Jun 2008 20:19:44 +0000 Subject: Fixed character walking in room 14 (the bar, right after BJ is kidnapped). This should fix the issues with the pianist in bug report #1979989 - "DRASCULA : Lip sync error when talking to pianist" svn-id: r32648 --- engines/drascula/drascula.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index dd5f0968ff..3419096b65 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -429,12 +429,21 @@ bool DrasculaEngine::runCurrentChapter() { } if (currentChapter == 2) { - if (roomNumber == 3 && (curX == 279) && (curY + curHeight == 101)) + // NOTE: the checks for room number 14 below are a hack used in the original + // game, and move the character to a place where his feet are not drawn above + // the pianist's head. Originally, walkToObject was not updated properly, which + // lead to an incorrect setting of the protagonist's tracking flag (above). This + // made the character start walking off screen, as his actual position was + // different than the displayed one + if (roomNumber == 3 && (curX == 279) && (curY + curHeight == 101)) { animation_1_2(); - else if (roomNumber == 14 && (curX == 214) && (curY + curHeight == 121)) + } else if (roomNumber == 14 && (curX == 214) && (curY + curHeight == 121)) { + walkToObject = 1; gotoObject(190, 130); - else if (roomNumber == 14 && (curX == 246) && (curY + curHeight == 112)) + } else if (roomNumber == 14 && (curX == 246) && (curY + curHeight == 112)) { + walkToObject = 1; gotoObject(190, 130); + } } moveCursor(); -- cgit v1.2.3 From fdf3f36bc6e22d1934e97852c7709ff39867ba5f Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Tue, 10 Jun 2008 20:57:22 +0000 Subject: Properly renamed some of the functions in the Delphine unpacker after understanding what they really do. svn-id: r32649 --- engines/cine/unpack.cpp | 28 +++++++++++++--------------- engines/cine/unpack.h | 8 ++++---- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp index ef761e87f1..85841631af 100644 --- a/engines/cine/unpack.cpp +++ b/engines/cine/unpack.cpp @@ -45,7 +45,7 @@ int CineUnpacker::rcr(int CF) { return rCF; } -int CineUnpacker::nextChunk() { +int CineUnpacker::nextBit() { int CF = rcr(0); if (_chk == 0) { _chk = readSource(); @@ -55,28 +55,26 @@ int CineUnpacker::nextChunk() { return CF; } -uint16 CineUnpacker::getCode(byte numChunks) { +uint16 CineUnpacker::getBits(byte numBits) { uint16 c = 0; - while (numChunks--) { + while (numBits--) { c <<= 1; - if (nextChunk()) { - c |= 1; - } + c |= nextBit(); } return c; } -void CineUnpacker::unpackHelper1(byte numChunks, byte addCount) { - uint16 count = getCode(numChunks) + addCount + 1; +void CineUnpacker::unpackHelper1(byte numBits, byte addCount) { + uint16 count = getBits(numBits) + addCount + 1; _datasize -= count; while (count--) { - *_dst = (byte)getCode(8); + *_dst = (byte)getBits(8); --_dst; } } -void CineUnpacker::unpackHelper2(byte numChunks) { - uint16 i = getCode(numChunks); +void CineUnpacker::unpackHelper2(byte numBits) { + uint16 i = getBits(numBits); uint16 count = _size + 1; _datasize -= count; while (count--) { @@ -94,22 +92,22 @@ bool CineUnpacker::unpack(byte *dst, const byte *src, int srcLen) { _chk = readSource(); _crc ^= _chk; do { - if (!nextChunk()) { + if (!nextBit()) { _size = 1; - if (!nextChunk()) { + if (!nextBit()) { unpackHelper1(3, 0); } else { unpackHelper2(8); } } else { - uint16 c = getCode(2); + uint16 c = getBits(2); if (c == 3) { unpackHelper1(8, 8); } else if (c < 2) { _size = c + 2; unpackHelper2(c + 9); } else { - _size = getCode(8); + _size = getBits(8); unpackHelper2(12); } } diff --git a/engines/cine/unpack.h b/engines/cine/unpack.h index 9433fafa58..bd658e51e6 100644 --- a/engines/cine/unpack.h +++ b/engines/cine/unpack.h @@ -39,10 +39,10 @@ private: /** Reads a single big endian 32-bit integer from the source and goes backwards 4 bytes. */ uint32 readSource(); int rcr(int CF); - int nextChunk(); - uint16 getCode(byte numChunks); - void unpackHelper1(byte numChunks, byte addCount); - void unpackHelper2(byte numChunks); + int nextBit(); + uint16 getBits(byte numBits); + void unpackHelper1(byte numBits, byte addCount); + void unpackHelper2(byte numBits); private: int _size, _datasize; uint32 _crc; -- cgit v1.2.3 From 985903a071cbf494ef5421f4e3718f101e7e5bcf Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 10 Jun 2008 21:06:39 +0000 Subject: Use the array sizes loaded from drascula.dat, instead of ARRAYSIZE svn-id: r32650 --- engines/drascula/rooms.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 475b6c4b49..6c4fb82b13 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -120,7 +120,7 @@ void DrasculaEngine::setupRoomsTable() { bool DrasculaEngine::roomParse(int rN, int fl) { bool seen = false; - for (int i = 0; i < ARRAYSIZE(_roomActions); i++) { + for (int i = 0; i < _roomActionsSize; i++) { if (_roomActions[i].room == rN) { seen = true; if (_roomActions[i].chapter == currentChapter || @@ -1013,7 +1013,7 @@ bool DrasculaEngine::room_102(int fl) { void DrasculaEngine::updateRefresh() { // Check generic updaters - for (int i = 0; i < ARRAYSIZE(_roomUpdates); i++) { + for (int i = 0; i < _roomUpdatesSize; i++) { if (_roomUpdates[i].roomNum == roomNumber) { if (_roomUpdates[i].flag < 0 || flags[_roomUpdates[i].flag] == _roomUpdates[i].flagValue) { @@ -1051,7 +1051,7 @@ void DrasculaEngine::updateRefresh() { void DrasculaEngine::updateRefresh_pre() { // Check generic preupdaters - for (int i = 0; i < ARRAYSIZE(_roomPreUpdates); i++) { + for (int i = 0; i < _roomPreUpdatesSize; i++) { if (_roomPreUpdates[i].roomNum == roomNumber) { if (_roomPreUpdates[i].flag < 0 || flags[_roomPreUpdates[i].flag] == _roomPreUpdates[i].flagValue) { -- cgit v1.2.3 From bdfdf0e7b355092aff80fe952ba4d1712a4293fe Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 10 Jun 2008 21:07:11 +0000 Subject: The static arrays in drascula.dat contain signed integers as well svn-id: r32651 --- engines/drascula/drascula.cpp | 76 +++++++++++++++++++++---------------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/engines/drascula/drascula.cpp b/engines/drascula/drascula.cpp index 3419096b65..1cbe2ae0e1 100644 --- a/engines/drascula/drascula.cpp +++ b/engines/drascula/drascula.cpp @@ -832,103 +832,103 @@ bool DrasculaEngine::loadDrasculaDat() { _charMap = (CharInfo *)malloc(sizeof(CharInfo) * _charMapSize); for (i = 0; i < _charMapSize; i++) { _charMap[i].inChar = in.readByte(); - _charMap[i].mappedChar = in.readUint16BE(); + _charMap[i].mappedChar = in.readSint16BE(); _charMap[i].charType = in.readByte(); } _itemLocationsSize = in.readUint16BE(); _itemLocations = (ItemLocation *)malloc(sizeof(ItemLocation) * _itemLocationsSize); for (i = 0; i < _itemLocationsSize; i++) { - _itemLocations[i].x = in.readUint16BE(); - _itemLocations[i].y = in.readUint16BE(); + _itemLocations[i].x = in.readSint16BE(); + _itemLocations[i].y = in.readSint16BE(); } _polXSize = in.readUint16BE(); _polX = (int *)malloc(sizeof(int) * _polXSize); _polY = (int *)malloc(sizeof(int) * _polXSize); for (i = 0; i < _polXSize; i++) { - _polX[i] = in.readUint16BE(); - _polY[i] = in.readUint16BE(); + _polX[i] = in.readSint16BE(); + _polY[i] = in.readSint16BE(); } _verbBarXSize = in.readUint16BE(); _verbBarX = (int *)malloc(sizeof(int) * _verbBarXSize); for (i = 0; i < _verbBarXSize; i++) { - _verbBarX[i] = in.readUint16BE(); + _verbBarX[i] = in.readSint16BE(); } _x1dMenuSize = in.readUint16BE(); _x1d_menu = (int *)malloc(sizeof(int) * _x1dMenuSize); _y1d_menu = (int *)malloc(sizeof(int) * _x1dMenuSize); for (i = 0; i < _x1dMenuSize; i++) { - _x1d_menu[i] = in.readUint16BE(); - _y1d_menu[i] = in.readUint16BE(); + _x1d_menu[i] = in.readSint16BE(); + _y1d_menu[i] = in.readSint16BE(); } _frameXSize = in.readUint16BE(); _frameX = (int *)malloc(sizeof(int) * _frameXSize); for (i = 0; i < _frameXSize; i++) { - _frameX[i] = in.readUint16BE(); + _frameX[i] = in.readSint16BE(); } _candleXSize = in.readUint16BE(); _candleX = (int *)malloc(sizeof(int) * _candleXSize); _candleY = (int *)malloc(sizeof(int) * _candleXSize); for (i = 0; i < _candleXSize; i++) { - _candleX[i] = in.readUint16BE(); - _candleY[i] = in.readUint16BE(); + _candleX[i] = in.readSint16BE(); + _candleY[i] = in.readSint16BE(); } _pianistXSize = in.readUint16BE(); _pianistX = (int *)malloc(sizeof(int) * _pianistXSize); for (i = 0; i < _pianistXSize; i++) { - _pianistX[i] = in.readUint16BE(); + _pianistX[i] = in.readSint16BE(); } _drunkXSize = in.readUint16BE(); _drunkX = (int *)malloc(sizeof(int) * _drunkXSize); for (i = 0; i < _drunkXSize; i++) { - _drunkX[i] = in.readUint16BE(); + _drunkX[i] = in.readSint16BE(); } _roomPreUpdatesSize = in.readUint16BE(); _roomPreUpdates = (RoomUpdate *)malloc(sizeof(RoomUpdate) * _roomPreUpdatesSize); for (i = 0; i < _roomPreUpdatesSize; i++) { - _roomPreUpdates[i].roomNum = in.readUint16BE(); - _roomPreUpdates[i].flag = in.readUint16BE(); - _roomPreUpdates[i].flagValue = in.readUint16BE(); - _roomPreUpdates[i].sourceX = in.readUint16BE(); - _roomPreUpdates[i].sourceY = in.readUint16BE(); - _roomPreUpdates[i].destX = in.readUint16BE(); - _roomPreUpdates[i].destY = in.readUint16BE(); - _roomPreUpdates[i].width = in.readUint16BE(); - _roomPreUpdates[i].height = in.readUint16BE(); - _roomPreUpdates[i].type = in.readUint16BE(); + _roomPreUpdates[i].roomNum = in.readSint16BE(); + _roomPreUpdates[i].flag = in.readSint16BE(); + _roomPreUpdates[i].flagValue = in.readSint16BE(); + _roomPreUpdates[i].sourceX = in.readSint16BE(); + _roomPreUpdates[i].sourceY = in.readSint16BE(); + _roomPreUpdates[i].destX = in.readSint16BE(); + _roomPreUpdates[i].destY = in.readSint16BE(); + _roomPreUpdates[i].width = in.readSint16BE(); + _roomPreUpdates[i].height = in.readSint16BE(); + _roomPreUpdates[i].type = in.readSint16BE(); } _roomUpdatesSize = in.readUint16BE(); _roomUpdates = (RoomUpdate *)malloc(sizeof(RoomUpdate) * _roomUpdatesSize); for (i = 0; i < _roomUpdatesSize; i++) { - _roomUpdates[i].roomNum = in.readUint16BE(); - _roomUpdates[i].flag = in.readUint16BE(); - _roomUpdates[i].flagValue = in.readUint16BE(); - _roomUpdates[i].sourceX = in.readUint16BE(); - _roomUpdates[i].sourceY = in.readUint16BE(); - _roomUpdates[i].destX = in.readUint16BE(); - _roomUpdates[i].destY = in.readUint16BE(); - _roomUpdates[i].width = in.readUint16BE(); - _roomUpdates[i].height = in.readUint16BE(); - _roomUpdates[i].type = in.readUint16BE(); + _roomUpdates[i].roomNum = in.readSint16BE(); + _roomUpdates[i].flag = in.readSint16BE(); + _roomUpdates[i].flagValue = in.readSint16BE(); + _roomUpdates[i].sourceX = in.readSint16BE(); + _roomUpdates[i].sourceY = in.readSint16BE(); + _roomUpdates[i].destX = in.readSint16BE(); + _roomUpdates[i].destY = in.readSint16BE(); + _roomUpdates[i].width = in.readSint16BE(); + _roomUpdates[i].height = in.readSint16BE(); + _roomUpdates[i].type = in.readSint16BE(); } _roomActionsSize = in.readUint16BE(); _roomActions = (RoomTalkAction *)malloc(sizeof(RoomTalkAction) * _roomActionsSize); for (i = 0; i < _roomActionsSize; i++) { - _roomActions[i].room = in.readUint16BE(); - _roomActions[i].chapter = in.readUint16BE(); - _roomActions[i].action = in.readUint16BE(); - _roomActions[i].objectID = in.readUint16BE(); - _roomActions[i].speechID = in.readUint16BE(); + _roomActions[i].room = in.readSint16BE(); + _roomActions[i].chapter = in.readSint16BE(); + _roomActions[i].action = in.readSint16BE(); + _roomActions[i].objectID = in.readSint16BE(); + _roomActions[i].speechID = in.readSint16BE(); } _numLangs = in.readUint16BE(); -- cgit v1.2.3 From 7453cf8b0b297b8a8e5b0dec13405ccc924abf8b Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 10 Jun 2008 21:14:38 +0000 Subject: Write signed values as signed (the actual contents of drascula.dat remain unchanged) svn-id: r32652 --- tools/create_drascula/create_drascula.cpp | 80 ++++++++++++++++--------------- tools/create_drascula/create_drascula.h | 1 + 2 files changed, 43 insertions(+), 38 deletions(-) diff --git a/tools/create_drascula/create_drascula.cpp b/tools/create_drascula/create_drascula.cpp index cedce4070f..fd3e7872d7 100644 --- a/tools/create_drascula/create_drascula.cpp +++ b/tools/create_drascula/create_drascula.cpp @@ -49,6 +49,10 @@ static void writeUint16BE(FILE *fp, uint16 value) { writeByte(fp, (uint8)(value & 0xFF)); } +void writeSint16BE(FILE *fp, int16 value) { + writeUint16BE(fp, (uint16)value); +} + int main(int argc, char *argv[]) { FILE* outFile; int i, lang; @@ -69,103 +73,103 @@ int main(int argc, char *argv[]) { writeUint16BE(outFile, ARRAYSIZE(charMap)); for (i = 0; i < ARRAYSIZE(charMap); i++) { writeByte(outFile, charMap[i].inChar); - writeUint16BE(outFile, charMap[i].mappedChar); + writeSint16BE(outFile, charMap[i].mappedChar); writeByte(outFile, charMap[i].charType); } // Write item locations writeUint16BE(outFile, ARRAYSIZE(itemLocations)); for (i = 0; i < ARRAYSIZE(itemLocations); i++) { - writeUint16BE(outFile, itemLocations[i].x); - writeUint16BE(outFile, itemLocations[i].y); + writeSint16BE(outFile, itemLocations[i].x); + writeSint16BE(outFile, itemLocations[i].y); } // Write x_pol and y_pol writeUint16BE(outFile, ARRAYSIZE(x_pol)); for (i = 0; i < ARRAYSIZE(x_pol); i++) { - writeUint16BE(outFile, x_pol[i]); - writeUint16BE(outFile, y_pol[i]); + writeSint16BE(outFile, x_pol[i]); + writeSint16BE(outFile, y_pol[i]); } // Write verbBarX writeUint16BE(outFile, ARRAYSIZE(verbBarX)); for (i = 0; i < ARRAYSIZE(verbBarX); i++) { - writeUint16BE(outFile, verbBarX[i]); + writeSint16BE(outFile, verbBarX[i]); } // Write x1d_menu and y1d_menu writeUint16BE(outFile, ARRAYSIZE(x1d_menu)); for (i = 0; i < ARRAYSIZE(x1d_menu); i++) { - writeUint16BE(outFile, x1d_menu[i]); - writeUint16BE(outFile, y1d_menu[i]); + writeSint16BE(outFile, x1d_menu[i]); + writeSint16BE(outFile, y1d_menu[i]); } // Write frameX writeUint16BE(outFile, ARRAYSIZE(frameX)); for (i = 0; i < ARRAYSIZE(frameX); i++) { - writeUint16BE(outFile, frameX[i]); + writeSint16BE(outFile, frameX[i]); } // Write candleX and candleY writeUint16BE(outFile, ARRAYSIZE(candleX)); for (i = 0; i < ARRAYSIZE(candleX); i++) { - writeUint16BE(outFile, candleX[i]); - writeUint16BE(outFile, candleY[i]); + writeSint16BE(outFile, candleX[i]); + writeSint16BE(outFile, candleY[i]); } // Write pianistX writeUint16BE(outFile, ARRAYSIZE(pianistX)); for (i = 0; i < ARRAYSIZE(pianistX); i++) { - writeUint16BE(outFile, pianistX[i]); + writeSint16BE(outFile, pianistX[i]); } // Write drunkX writeUint16BE(outFile, ARRAYSIZE(drunkX)); for (i = 0; i < ARRAYSIZE(drunkX); i++) { - writeUint16BE(outFile, drunkX[i]); + writeSint16BE(outFile, drunkX[i]); } // Write preupdates writeUint16BE(outFile, ARRAYSIZE(roomPreUpdates)); for (i = 0; i < ARRAYSIZE(roomPreUpdates); i++) { - writeUint16BE(outFile, roomPreUpdates[i].roomNum); - writeUint16BE(outFile, roomPreUpdates[i].flag); - writeUint16BE(outFile, roomPreUpdates[i].flagValue); - writeUint16BE(outFile, roomPreUpdates[i].sourceX); - writeUint16BE(outFile, roomPreUpdates[i].sourceY); - writeUint16BE(outFile, roomPreUpdates[i].destX); - writeUint16BE(outFile, roomPreUpdates[i].destY); - writeUint16BE(outFile, roomPreUpdates[i].width); - writeUint16BE(outFile, roomPreUpdates[i].height); - writeUint16BE(outFile, roomPreUpdates[i].type); + writeSint16BE(outFile, roomPreUpdates[i].roomNum); + writeSint16BE(outFile, roomPreUpdates[i].flag); + writeSint16BE(outFile, roomPreUpdates[i].flagValue); + writeSint16BE(outFile, roomPreUpdates[i].sourceX); + writeSint16BE(outFile, roomPreUpdates[i].sourceY); + writeSint16BE(outFile, roomPreUpdates[i].destX); + writeSint16BE(outFile, roomPreUpdates[i].destY); + writeSint16BE(outFile, roomPreUpdates[i].width); + writeSint16BE(outFile, roomPreUpdates[i].height); + writeSint16BE(outFile, roomPreUpdates[i].type); } // Write updates writeUint16BE(outFile, ARRAYSIZE(roomUpdates)); for (i = 0; i < ARRAYSIZE(roomUpdates); i++) { - writeUint16BE(outFile, roomUpdates[i].roomNum); - writeUint16BE(outFile, roomUpdates[i].flag); - writeUint16BE(outFile, roomUpdates[i].flagValue); - writeUint16BE(outFile, roomUpdates[i].sourceX); - writeUint16BE(outFile, roomUpdates[i].sourceY); - writeUint16BE(outFile, roomUpdates[i].destX); - writeUint16BE(outFile, roomUpdates[i].destY); - writeUint16BE(outFile, roomUpdates[i].width); - writeUint16BE(outFile, roomUpdates[i].height); - writeUint16BE(outFile, roomUpdates[i].type); + writeSint16BE(outFile, roomUpdates[i].roomNum); + writeSint16BE(outFile, roomUpdates[i].flag); + writeSint16BE(outFile, roomUpdates[i].flagValue); + writeSint16BE(outFile, roomUpdates[i].sourceX); + writeSint16BE(outFile, roomUpdates[i].sourceY); + writeSint16BE(outFile, roomUpdates[i].destX); + writeSint16BE(outFile, roomUpdates[i].destY); + writeSint16BE(outFile, roomUpdates[i].width); + writeSint16BE(outFile, roomUpdates[i].height); + writeSint16BE(outFile, roomUpdates[i].type); } // Write room actions writeUint16BE(outFile, ARRAYSIZE(roomActions)); for (i = 0; i < ARRAYSIZE(roomActions); i++) { - writeUint16BE(outFile, roomActions[i].room); - writeUint16BE(outFile, roomActions[i].chapter); - writeUint16BE(outFile, roomActions[i].action); - writeUint16BE(outFile, roomActions[i].objectID); - writeUint16BE(outFile, roomActions[i].speechID); + writeSint16BE(outFile, roomActions[i].room); + writeSint16BE(outFile, roomActions[i].chapter); + writeSint16BE(outFile, roomActions[i].action); + writeSint16BE(outFile, roomActions[i].objectID); + writeSint16BE(outFile, roomActions[i].speechID); } // langs diff --git a/tools/create_drascula/create_drascula.h b/tools/create_drascula/create_drascula.h index 0c6a5774df..ed81651e86 100644 --- a/tools/create_drascula/create_drascula.h +++ b/tools/create_drascula/create_drascula.h @@ -49,6 +49,7 @@ typedef unsigned char uint8; typedef unsigned short uint16; +typedef signed short int16; enum Verbs { kVerbDefault = -1, -- cgit v1.2.3 From 420d29932b31457eb840e19979abea35bc96770c Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Tue, 10 Jun 2008 21:34:26 +0000 Subject: unpackerHelper2(numBits) -> copyRelocatesBytes(offset, numBytes) and some revising of the unpacking routine. svn-id: r32653 --- engines/cine/unpack.cpp | 30 +++++++++++++++--------------- engines/cine/unpack.h | 4 ++-- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp index 85841631af..01cbe5476c 100644 --- a/engines/cine/unpack.cpp +++ b/engines/cine/unpack.cpp @@ -73,12 +73,10 @@ void CineUnpacker::unpackHelper1(byte numBits, byte addCount) { } } -void CineUnpacker::unpackHelper2(byte numBits) { - uint16 i = getBits(numBits); - uint16 count = _size + 1; - _datasize -= count; - while (count--) { - *_dst = *(_dst + i); +void CineUnpacker::copyRelocatedBytes(uint16 offset, uint16 numBytes) { + _datasize -= numBytes; + while (numBytes--) { + *_dst = *(_dst + offset); --_dst; } } @@ -87,28 +85,30 @@ bool CineUnpacker::unpack(byte *dst, const byte *src, int srcLen) { _src = src + srcLen - 4; _datasize = readSource(); _dst = dst + _datasize - 1; - _size = 0; _crc = readSource(); _chk = readSource(); _crc ^= _chk; do { if (!nextBit()) { - _size = 1; if (!nextBit()) { unpackHelper1(3, 0); } else { - unpackHelper2(8); + uint16 numBytes = 2; + uint16 offset = getBits(8); + copyRelocatedBytes(offset, numBytes); } } else { uint16 c = getBits(2); if (c == 3) { unpackHelper1(8, 8); - } else if (c < 2) { - _size = c + 2; - unpackHelper2(c + 9); - } else { - _size = getBits(8); - unpackHelper2(12); + } else if (c < 2) { // c == 0 || c == 1 + uint16 numBytes = c + 3; + uint16 offset = getBits(c + 9); + copyRelocatedBytes(offset, numBytes); + } else { // c == 2 + uint16 numBytes = getBits(8) + 1; + uint16 offset = getBits(12); + copyRelocatedBytes(offset, numBytes); } } } while (_datasize > 0 && _src >= src - 4); diff --git a/engines/cine/unpack.h b/engines/cine/unpack.h index bd658e51e6..39a7aca8e5 100644 --- a/engines/cine/unpack.h +++ b/engines/cine/unpack.h @@ -42,9 +42,9 @@ private: int nextBit(); uint16 getBits(byte numBits); void unpackHelper1(byte numBits, byte addCount); - void unpackHelper2(byte numBits); + void copyRelocatedBytes(uint16 offset, uint16 numBytes); private: - int _size, _datasize; + int _datasize; uint32 _crc; uint32 _chk; byte *_dst; -- cgit v1.2.3 From 8b560107121542fa90e9ce928a9e4a1ca2899c1a Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 10 Jun 2008 21:40:53 +0000 Subject: Removed unneeded #include svn-id: r32654 --- common/system.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/common/system.cpp b/common/system.cpp index 015f246b7a..327b7246e2 100644 --- a/common/system.cpp +++ b/common/system.cpp @@ -128,9 +128,7 @@ void OSystem::clearScreen() { * TODO: Remove these gradually and move the getFilesystemFactory() implementations * to the respective backends. Then turn it into a pure virtual method of OSystem. */ -#if defined(__DS__) - #include "backends/fs/ds/ds-fs-factory.h" -#elif defined(PALMOS_MODE) +#if defined(PALMOS_MODE) #include "backends/fs/palmos/palmos-fs-factory.h" #elif defined(__PLAYSTATION2__) #include "backends/fs/ps2/ps2-fs-factory.h" -- cgit v1.2.3 From 009e26f813ca1eeb8f8c973b0d3f3e1ce66f26fd Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Tue, 10 Jun 2008 21:44:59 +0000 Subject: Changed unpackHelper1(numBits, addCount) to unpackBytes(numBytes). svn-id: r32655 --- engines/cine/unpack.cpp | 13 +++++++------ engines/cine/unpack.h | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp index 01cbe5476c..7afeeb1509 100644 --- a/engines/cine/unpack.cpp +++ b/engines/cine/unpack.cpp @@ -64,10 +64,9 @@ uint16 CineUnpacker::getBits(byte numBits) { return c; } -void CineUnpacker::unpackHelper1(byte numBits, byte addCount) { - uint16 count = getBits(numBits) + addCount + 1; - _datasize -= count; - while (count--) { +void CineUnpacker::unpackBytes(uint16 numBytes) { + _datasize -= numBytes; + while (numBytes--) { *_dst = (byte)getBits(8); --_dst; } @@ -91,7 +90,8 @@ bool CineUnpacker::unpack(byte *dst, const byte *src, int srcLen) { do { if (!nextBit()) { if (!nextBit()) { - unpackHelper1(3, 0); + uint16 numBytes = getBits(3) + 1; + unpackBytes(numBytes); } else { uint16 numBytes = 2; uint16 offset = getBits(8); @@ -100,7 +100,8 @@ bool CineUnpacker::unpack(byte *dst, const byte *src, int srcLen) { } else { uint16 c = getBits(2); if (c == 3) { - unpackHelper1(8, 8); + uint16 numBytes = getBits(8) + 9; + unpackBytes(numBytes); } else if (c < 2) { // c == 0 || c == 1 uint16 numBytes = c + 3; uint16 offset = getBits(c + 9); diff --git a/engines/cine/unpack.h b/engines/cine/unpack.h index 39a7aca8e5..c401c8679b 100644 --- a/engines/cine/unpack.h +++ b/engines/cine/unpack.h @@ -41,7 +41,7 @@ private: int rcr(int CF); int nextBit(); uint16 getBits(byte numBits); - void unpackHelper1(byte numBits, byte addCount); + void unpackBytes(uint16 numBytes); void copyRelocatedBytes(uint16 offset, uint16 numBytes); private: int _datasize; -- cgit v1.2.3 From 52747ff694c0f5110c33e7f970f4f8c13742a60d Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 10 Jun 2008 21:50:07 +0000 Subject: Re-enabled default Hash template svn-id: r32656 --- common/hash-str.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/common/hash-str.h b/common/hash-str.h index 5575735f1d..f64b62daed 100644 --- a/common/hash-str.h +++ b/common/hash-str.h @@ -57,11 +57,12 @@ struct IgnoreCase_Hash { -typedef HashMap StringMap; - - -#if 0 // Specalization of the Hash functor for String objects. +// We do case sensitve hashing here, because that is what +// the default EqualTo is compatible with. If one wants to use +// case insensitve hashing, then only because one wants to use +// IgnoreCase_EqualTo, and then one has to specify a custom +// hash anyway. template <> struct Hash { uint operator()(const String& s) const { @@ -75,7 +76,10 @@ struct Hash { return hashit(s); } }; -#endif + +// String map -- by default case insensitive +typedef HashMap StringMap; + } // End of namespace Common -- cgit v1.2.3 From b652c201148424a875d12bb73a252bcbacb593d3 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 10 Jun 2008 22:14:47 +0000 Subject: Fixed regression in the pendulum room, preventing the player from selecting John's hands (new version of drascula.dat needed) svn-id: r32657 --- engines/drascula/drascula.h | 3 +-- engines/drascula/rooms.cpp | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/engines/drascula/drascula.h b/engines/drascula/drascula.h index 8fff8bd5c2..ce67cc2c0e 100644 --- a/engines/drascula/drascula.h +++ b/engines/drascula/drascula.h @@ -46,8 +46,7 @@ namespace Drascula { -// Do not update this yet. The file is not loaded fully -#define DRASCULA_DAT_VER 1 +#define DRASCULA_DAT_VER 2 #define DATAALIGNMENT 4 enum DrasculaGameFeatures { diff --git a/engines/drascula/rooms.cpp b/engines/drascula/rooms.cpp index 6c4fb82b13..6fe28bdbdc 100644 --- a/engines/drascula/rooms.cpp +++ b/engines/drascula/rooms.cpp @@ -1005,6 +1005,8 @@ bool DrasculaEngine::room_102(int fl) { pickObject(20); else if (pickedObject == 20 && fl == 100) animation_6_6(); + else if (pickedObject == kVerbPick || pickedObject == kVerbOpen) + talk(453); else hasAnswer = 0; -- cgit v1.2.3 From d7007361f71bdad2b498a5b32a62435c002bec9c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 10 Jun 2008 22:15:47 +0000 Subject: New version of create_drascula, fixing the problem in the pendulum room svn-id: r32658 --- tools/create_drascula/create_drascula.cpp | 2 +- tools/create_drascula/staticdata.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/create_drascula/create_drascula.cpp b/tools/create_drascula/create_drascula.cpp index fd3e7872d7..2676376e42 100644 --- a/tools/create_drascula/create_drascula.cpp +++ b/tools/create_drascula/create_drascula.cpp @@ -38,7 +38,7 @@ #include "create_drascula.h" #include "staticdata.h" -#define DRASCULA_DAT_VER 1 // 1 byte +#define DRASCULA_DAT_VER 2 // 1 byte static void writeByte(FILE *fp, uint8 b) { fwrite(&b, 1, 1, fp); diff --git a/tools/create_drascula/staticdata.h b/tools/create_drascula/staticdata.h index 06ca11b419..4778c530e4 100644 --- a/tools/create_drascula/staticdata.h +++ b/tools/create_drascula/staticdata.h @@ -505,8 +505,6 @@ RoomTalkAction roomActions[] = { // ================================== { 102, -1, kVerbLook, 100, 452 }, { 102, -1, kVerbLook, 101, 123 }, - { 102, -1, kVerbPick, -1, 453 }, - { 102, -1, kVerbOpen, -1, 453 }, // ================================== // Pseudoroom. checkAction() menuScreen == 1 { 200, 1, kVerbLook, 28, 328 }, -- cgit v1.2.3 From 235504e60000f3c74c262b9b54fcb4cc9ff6f126 Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 10 Jun 2008 22:16:10 +0000 Subject: New version of drascula.dat, fixing the problem in the pendulum room svn-id: r32659 --- dists/engine-data/drascula.dat | Bin 213757 -> 213737 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/dists/engine-data/drascula.dat b/dists/engine-data/drascula.dat index 59b629eece..321e63c277 100644 Binary files a/dists/engine-data/drascula.dat and b/dists/engine-data/drascula.dat differ -- cgit v1.2.3 From efc4fd7ae0f106f2cfe9d9109b3331604f97be9c Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Tue, 10 Jun 2008 22:37:55 +0000 Subject: A little Delphine unpacker documentation addition and variable renaming. svn-id: r32660 --- engines/cine/unpack.cpp | 28 ++++++++++++++-------------- engines/cine/unpack.h | 10 ++++++++-- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp index 7afeeb1509..8e775c3632 100644 --- a/engines/cine/unpack.cpp +++ b/engines/cine/unpack.cpp @@ -36,23 +36,23 @@ uint32 CineUnpacker::readSource() { return value; } -int CineUnpacker::rcr(int CF) { - int rCF = (_chk & 1); - _chk >>= 1; - if (CF) { - _chk |= 0x80000000; +int CineUnpacker::rcr(int inputCarry) { + int outputCarry = (_chunk32b & 1); + _chunk32b >>= 1; + if (inputCarry) { + _chunk32b |= 0x80000000; } - return rCF; + return outputCarry; } int CineUnpacker::nextBit() { - int CF = rcr(0); - if (_chk == 0) { - _chk = readSource(); - _crc ^= _chk; - CF = rcr(1); + int carry = rcr(0); + if (_chunk32b == 0) { + _chunk32b = readSource(); + _crc ^= _chunk32b; + carry = rcr(1); } - return CF; + return carry; } uint16 CineUnpacker::getBits(byte numBits) { @@ -85,8 +85,8 @@ bool CineUnpacker::unpack(byte *dst, const byte *src, int srcLen) { _datasize = readSource(); _dst = dst + _datasize - 1; _crc = readSource(); - _chk = readSource(); - _crc ^= _chk; + _chunk32b = readSource(); + _crc ^= _chunk32b; do { if (!nextBit()) { if (!nextBit()) { diff --git a/engines/cine/unpack.h b/engines/cine/unpack.h index c401c8679b..894d59d0b4 100644 --- a/engines/cine/unpack.h +++ b/engines/cine/unpack.h @@ -38,7 +38,13 @@ public: private: /** Reads a single big endian 32-bit integer from the source and goes backwards 4 bytes. */ uint32 readSource(); - int rcr(int CF); + + /** + * Shifts the current internal 32-bit chunk to the right by one. + * Puts input carry into internal chunk's topmost (i.e. leftmost) bit. + * Returns the least significant bit that was shifted out. + */ + int rcr(int inputCarry); int nextBit(); uint16 getBits(byte numBits); void unpackBytes(uint16 numBytes); @@ -46,7 +52,7 @@ private: private: int _datasize; uint32 _crc; - uint32 _chk; + uint32 _chunk32b; //!< The current internal 32-bit chunk byte *_dst; const byte *_src; }; -- cgit v1.2.3 From 6fa6a2fbca658aae9296ee872489543f46074b5d Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Tue, 10 Jun 2008 22:41:41 +0000 Subject: Pressing enter when entering the name of a save game should save that game svn-id: r32661 --- engines/drascula/saveload.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/engines/drascula/saveload.cpp b/engines/drascula/saveload.cpp index 008784f209..de82899462 100644 --- a/engines/drascula/saveload.cpp +++ b/engines/drascula/saveload.cpp @@ -122,6 +122,21 @@ bool DrasculaEngine::saveLoadScreen() { print_abc(names[n2], 116, y); y = y + 9; } + + if (selectionMade == 1) { + snprintf(file, 50, "%s%02d", _targetName.c_str(), n + 1); + saveGame(file); + Common::OutSaveFile *tsav; + if (!(tsav = _saveFileMan->openForSaving(fileEpa))) { + error("Can't open %s file", fileEpa); + } + for (n = 0; n < NUM_SAVES; n++) { + tsav->writeString(names[n]); + tsav->writeString("\n"); + } + tsav->finalize(); + delete tsav; + } } if (mouseX > 125 && mouseY > 123 && mouseX < 199 && mouseY < 149 && selectionMade == 1) { -- cgit v1.2.3 From 41ee9025ca1b88bdb5410dd87dfe8c90aadb8731 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Tue, 10 Jun 2008 23:13:28 +0000 Subject: Small cleanup (mainly removed useless variables and defines) svn-id: r32662 --- configure | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 9c26ce70cb..99da4e0478 100755 --- a/configure +++ b/configure @@ -162,7 +162,7 @@ add_line_to_config_mk() { '"$1" } -# Add a line of data to h.mk. +# Add a line of data to config.h. add_line_to_config_h() { _config_h_data="$_config_h_data"' '"$1" @@ -582,7 +582,7 @@ Usage: $0 [OPTIONS]... Configuration: -h, --help display this help and exit - --backend=BACKEND backend to build (sdl, x11, morphos, dc, gp32, gp2x, iphone, null) [sdl] + --backend=BACKEND backend to build (sdl, x11, morphos, dc, gp2x, iphone, null) [sdl] Installation directories: --prefix=DIR use this prefix for installing ScummVM [/usr/local] @@ -1092,7 +1092,7 @@ if test -n "$_host"; then ;; arm-linux|arm*-linux-gnueabi|arm-*-linux|*-angstrom-linux) echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes" - DEFINES="$DEFINES -DUNIX -DUSE_ARM_SOUND_ASM -DUSE_ARM_SMUSH_ASM" + DEFINES="$DEFINES -DUNIX -DUSE_ARM_SMUSH_ASM" #not true for all ARM systems, but the interesting ones are all LE. Most (if not all) BE arm devices don't have a screen _endian=little _need_memalign=yes @@ -1107,7 +1107,7 @@ if test -n "$_host"; then ;; gp2x) echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes" - DEFINES="$DEFINES -DUNIX -DGP2X -DUSE_ARM_SOUND_ASM -DUSE_ARM_SMUSH_ASM" + DEFINES="$DEFINES -DUNIX -DGP2X -DUSE_ARM_SMUSH_ASM" _endian=little _need_memalign=yes type_1_byte='char' @@ -1116,7 +1116,6 @@ if test -n "$_host"; then add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' _backend="gp2x" - _mak_hq_scalers='DISABLE_HQ_SCALERS = 1' _build_hq_scalers="no" ;; ppc-amigaos) @@ -1154,7 +1153,7 @@ if test -n "$_host"; then ;; iphone) echo "Cross-compiling to $_host, forcing endianness, alignment and type sizes" - DEFINES="$DEFINES -DIPHONE -DUNIX -DUSE_ARM_SOUND_ASM -DUSE_ARM_SMUSH_ASM" + DEFINES="$DEFINES -DIPHONE -DUNIX -DUSE_ARM_SMUSH_ASM" _endian=little _need_memalign=yes type_1_byte='char' @@ -1163,7 +1162,6 @@ if test -n "$_host"; then add_line_to_config_mk 'USE_ARM_SOUND_ASM = 1' add_line_to_config_mk 'USE_ARM_SMUSH_ASM = 1' _backend="iphone" - _mak_hq_scalers='DISABLE_HQ_SCALERS = 1' _build_hq_scalers="no" ;; *) -- cgit v1.2.3 From fefad792495e0fbd45d120a83b19090e3b7a0cf3 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 11 Jun 2008 06:00:56 +0000 Subject: No need to specify CaseSensitiveString_Hash explicitly anymore svn-id: r32663 --- common/advancedDetector.cpp | 8 ++++---- common/file.cpp | 2 +- engines/agi/detection.cpp | 2 +- engines/cine/cine.h | 2 +- graphics/fontman.h | 2 +- gui/eval.h | 6 +++--- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/common/advancedDetector.cpp b/common/advancedDetector.cpp index 8999a60942..4387bd199e 100644 --- a/common/advancedDetector.cpp +++ b/common/advancedDetector.cpp @@ -268,7 +268,10 @@ PluginError AdvancedMetaEngine::createInstance(OSystem *syst, Engine **engine) c return kNoError; } -static void reportUnknown(StringMap &filesMD5, HashMap &filesSize) { +typedef HashMap StringSet; +typedef HashMap IntMap; + +static void reportUnknown(StringMap &filesMD5, IntMap &filesSize) { // TODO: This message should be cleaned up / made more specific. // For example, we should specify at least which engine triggered this. // @@ -285,11 +288,8 @@ static void reportUnknown(StringMap &filesMD5, HashMap StringSet; StringSet filesList; - typedef StringMap StringMap; - typedef HashMap IntMap; StringMap filesMD5; IntMap filesSize; IntMap allFiles; diff --git a/common/file.cpp b/common/file.cpp index 4a7aed0e3d..386777e2c5 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -136,7 +136,7 @@ namespace Common { -typedef HashMap StringIntMap; +typedef HashMap StringIntMap; // The following two objects could be turned into static members of class // File. However, then we would be forced to #include hashmap in file.h diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index f526c51a27..cd6942f9c0 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -2148,7 +2148,7 @@ bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const Common: } const Common::ADGameDescription *AgiMetaEngine::fallbackDetect(const FSList *fslist) const { - typedef Common::HashMap IntMap; + typedef Common::HashMap IntMap; IntMap allFiles; bool matchedUsingFilenames = false; bool matchedUsingWag = false; diff --git a/engines/cine/cine.h b/engines/cine/cine.h index 7ce5231446..710840c17e 100644 --- a/engines/cine/cine.h +++ b/engines/cine/cine.h @@ -64,7 +64,7 @@ enum CineGameFeatures { struct CINEGameDescription; -typedef Common::HashMap StringPtrHashMap; +typedef Common::HashMap StringPtrHashMap; class CineEngine : public Engine { diff --git a/graphics/fontman.h b/graphics/fontman.h index eeefab77ec..7121c314cd 100644 --- a/graphics/fontman.h +++ b/graphics/fontman.h @@ -84,7 +84,7 @@ private: friend class Common::Singleton; FontManager(); - Common::HashMap _fontMap; + Common::HashMap _fontMap; }; diff --git a/gui/eval.h b/gui/eval.h index 245ab1230b..47c8313903 100644 --- a/gui/eval.h +++ b/gui/eval.h @@ -68,9 +68,9 @@ public: char *lastToken() { return _token; } - typedef HashMap VariablesMap; - typedef HashMap AliasesMap; - typedef HashMap StringsMap; + typedef HashMap VariablesMap; + typedef HashMap AliasesMap; + typedef HashMap StringsMap; private: enum TokenTypes { -- cgit v1.2.3 From 42427f9a4ec2ec768d355729bbdd77f52ddb37b9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 11 Jun 2008 06:22:02 +0000 Subject: Modified mass detector to not re-add already configured games (that is, if there is an existing entry with identical path, gameid, platform, language, then do not add a new one) svn-id: r32664 --- gui/launcher.cpp | 18 +++++++++--------- gui/massadd.cpp | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++--- gui/massadd.h | 10 ++++++++++ 3 files changed, 73 insertions(+), 12 deletions(-) diff --git a/gui/launcher.cpp b/gui/launcher.cpp index 92867562ad..2c1212b84a 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -572,8 +572,16 @@ void LauncherDialog::updateListing() { // Retrieve a list of all games defined in the config file _domains.clear(); const ConfigManager::DomainMap &domains = ConfMan.getGameDomains(); - ConfigManager::DomainMap::const_iterator iter = domains.begin(); + ConfigManager::DomainMap::const_iterator iter; for (iter = domains.begin(); iter != domains.end(); ++iter) { +#ifdef __DS__ + // DS port uses an extra section called 'ds'. This prevents the section from being + // detected as a game. + if (iter->_key == "ds") { + continue; + } +#endif + String gameid(iter->_value.get("gameid")); String description(iter->_value.get("description")); @@ -585,14 +593,6 @@ void LauncherDialog::updateListing() { description = g.description(); } -#ifdef __DS__ - // DS port uses an extra section called 'ds'. This prevents the section from being - // detected as a game. - if (gameid == "ds") { - continue; - } -#endif - if (description.empty()) description = "Unknown (target " + iter->_key + ", gameid " + gameid + ")"; diff --git a/gui/massadd.cpp b/gui/massadd.cpp index b39b51f1fb..687d367516 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -24,6 +24,7 @@ #include "engines/metaengine.h" #include "common/events.h" +#include "common/config-manager.h" #include "gui/launcher.h" // For addGameToConf() #include "gui/massadd.h" @@ -87,6 +88,29 @@ MassAddDialog::MassAddDialog(const FilesystemNode &startDir) new ButtonWidget(this, "massadddialog_cancel", "Cancel", kCancelCmd, Common::ASCII_ESCAPE); + // Build a map from all configured game paths to the targets using them + const Common::ConfigManager::DomainMap &domains = ConfMan.getGameDomains(); + Common::ConfigManager::DomainMap::const_iterator iter; + for (iter = domains.begin(); iter != domains.end(); ++iter) { + +#ifdef __DS__ + // DS port uses an extra section called 'ds'. This prevents the section from being + // detected as a game. + if (iter->_key == "ds") { + continue; + } +#endif + + Common::String path(iter->_value.get("path")); + // Remove trailing slash, so that "/foo" and "/foo/" match. + // This works around a bug in the POSIX FS code (and others?) + // where paths are not normalized (so FSNodes refering to identical + // FS objects may return different values in path()). + while (path != "/" && path.lastChar() == '/') + path.deleteLastChar(); + if (!path.empty()) + _pathToTargets[path].push_back(iter->_key); + } } @@ -136,9 +160,36 @@ void MassAddDialog::handleTickle() { // that either means the directory contains multiple games, or the detector // could not fully determine which game variant it was seeing. In either // case, let the user choose which entries he wants to keep. + // + // However, we only add games which are not already in the config file. for (GameList::const_iterator cand = candidates.begin(); cand != candidates.end(); ++cand) { GameDescriptor result = *cand; - result["path"] = dir.getPath(); + Common::String path = dir.getPath(); + + // Remove trailing slashes + while (path != "/" && path.lastChar() == '/') + path.deleteLastChar(); + + // Check for existing config entries for this path/gameid/lang/platform combination + if (_pathToTargets.contains(path)) { + bool duplicate = false; + const Common::StringList &targets = _pathToTargets[path]; + for (Common::StringList::const_iterator iter = targets.begin(); iter != targets.end(); ++iter) { + // If the gameid, platform and language match -> skip it + Common::ConfigManager::Domain *dom = ConfMan.getDomain(*iter); + assert(dom); + + if ((*dom)["gameid"] == result["gameid"] && + (*dom)["platform"] == result["platform"] && + (*dom)["language"] == result["language"]) { + duplicate = true; + break; + } + } + if (duplicate) + break; // Skip duplicates + } + result["path"] = path; _games.push_back(result); } @@ -164,14 +215,14 @@ void MassAddDialog::handleTickle() { snprintf(buf, sizeof(buf), "Scan complete!"); _dirProgressText->setLabel(buf); - snprintf(buf, sizeof(buf), "Discovered %d games.", _games.size()); + snprintf(buf, sizeof(buf), "Discovered %d new games.", _games.size()); _gameProgressText->setLabel(buf); } else { snprintf(buf, sizeof(buf), "Scanned %d directories ...", _dirsScanned); _dirProgressText->setLabel(buf); - snprintf(buf, sizeof(buf), "Discovered %d games ...", _games.size()); + snprintf(buf, sizeof(buf), "Discovered %d new games ...", _games.size()); _gameProgressText->setLabel(buf); } diff --git a/gui/massadd.h b/gui/massadd.h index 29d24ca9a5..e0eff75c64 100644 --- a/gui/massadd.h +++ b/gui/massadd.h @@ -27,7 +27,10 @@ #include "gui/dialog.h" #include "common/fs.h" +#include "common/hashmap.h" #include "common/stack.h" +#include "common/str.h" +#include "common/hash-str.h" namespace GUI { @@ -45,6 +48,13 @@ private: Common::Stack _scanStack; GameList _games; + /** + * Map each path occuring in the config file to the target(s) using that path. + * Used to detect whether a potential new target is already present in the + * config manager. + */ + Common::HashMap _pathToTargets; + int _dirsScanned; Widget *_okButton; -- cgit v1.2.3 From 7186c3bd1bbb1fa9719ed363380ce961f09f133c Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Wed, 11 Jun 2008 11:06:07 +0000 Subject: Documented CineUnpacker class. svn-id: r32665 --- engines/cine/unpack.cpp | 35 +++++++++++++++++++++++------------ engines/cine/unpack.h | 29 ++++++++++++++++++++++++----- 2 files changed, 47 insertions(+), 17 deletions(-) diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp index 8e775c3632..364331e439 100644 --- a/engines/cine/unpack.cpp +++ b/engines/cine/unpack.cpp @@ -47,10 +47,12 @@ int CineUnpacker::rcr(int inputCarry) { int CineUnpacker::nextBit() { int carry = rcr(0); + // Normally if the chunk becomes zero then the carry is one as + // the end of chunk marker is always the last to be shifted out. if (_chunk32b == 0) { _chunk32b = readSource(); _crc ^= _chunk32b; - carry = rcr(1); + carry = rcr(1); // Put the end of chunk marker in the most significant bit } return carry; } @@ -64,7 +66,7 @@ uint16 CineUnpacker::getBits(byte numBits) { return c; } -void CineUnpacker::unpackBytes(uint16 numBytes) { +void CineUnpacker::unpackRawBytes(uint16 numBytes) { _datasize -= numBytes; while (numBytes--) { *_dst = (byte)getBits(8); @@ -82,31 +84,40 @@ void CineUnpacker::copyRelocatedBytes(uint16 offset, uint16 numBytes) { bool CineUnpacker::unpack(byte *dst, const byte *src, int srcLen) { _src = src + srcLen - 4; - _datasize = readSource(); + _datasize = readSource(); // Unpacked length in bytes _dst = dst + _datasize - 1; _crc = readSource(); _chunk32b = readSource(); _crc ^= _chunk32b; do { - if (!nextBit()) { - if (!nextBit()) { + /* + Bits => Action: + 0 0 => unpackRawBytes(3 bits + 1) i.e. unpackRawBytes(1..9) + 1 1 1 => unpackRawBytes(8 bits + 9) i.e. unpackRawBytes(9..264) + 0 1 => copyRelocatedBytes(8 bits, 2) i.e. copyRelocatedBytes(0..255, 2) + 1 0 0 => copyRelocatedBytes(9 bits, 3) i.e. copyRelocatedBytes(0..511, 3) + 1 0 1 => copyRelocatedBytes(10 bits, 4) i.e. copyRelocatedBytes(0..1023, 4) + 1 1 0 => copyRelocatedBytes(12 bits, 8 bits + 1) i.e. copyRelocatedBytes(0..4095, 1..256) + */ + if (!nextBit()) { // 0... + if (!nextBit()) { // 0 0 uint16 numBytes = getBits(3) + 1; - unpackBytes(numBytes); - } else { + unpackRawBytes(numBytes); + } else { // 0 1 uint16 numBytes = 2; uint16 offset = getBits(8); copyRelocatedBytes(offset, numBytes); } - } else { + } else { // 1... uint16 c = getBits(2); - if (c == 3) { + if (c == 3) { // 1 1 1 uint16 numBytes = getBits(8) + 9; - unpackBytes(numBytes); - } else if (c < 2) { // c == 0 || c == 1 + unpackRawBytes(numBytes); + } else if (c < 2) { // 1 0 x uint16 numBytes = c + 3; uint16 offset = getBits(c + 9); copyRelocatedBytes(offset, numBytes); - } else { // c == 2 + } else { // 1 1 0 uint16 numBytes = getBits(8) + 1; uint16 offset = getBits(12); copyRelocatedBytes(offset, numBytes); diff --git a/engines/cine/unpack.h b/engines/cine/unpack.h index 894d59d0b4..f0a7ee3804 100644 --- a/engines/cine/unpack.h +++ b/engines/cine/unpack.h @@ -31,6 +31,12 @@ namespace Cine { +/** + * A LZ77 style decompressor for Delphine's data files + * used in at least Future Wars and Operation Stealth. + * @note Works backwards in the source and destination buffers. + * @note Can work with source and destination in the same buffer if there's space. + */ class CineUnpacker { public: /** Returns true if unpacking was successful, otherwise false. */ @@ -47,14 +53,27 @@ private: int rcr(int inputCarry); int nextBit(); uint16 getBits(byte numBits); - void unpackBytes(uint16 numBytes); + + /** + * Copy raw bytes from the input stream and write them to the destination stream. + * This is used when no adequately long match is found in the sliding window. + * @param numBytes Amount of bytes to copy from the input stream + */ + void unpackRawBytes(uint16 numBytes); + + /** + * Copy bytes from the sliding window in the destination buffer. + * This is used when a match of two bytes or longer is found. + * @param offset Offset in the sliding window + * @param numBytes Amount of bytes to copy + */ void copyRelocatedBytes(uint16 offset, uint16 numBytes); private: - int _datasize; - uint32 _crc; + int _datasize; //!< Bytes left to write into the unpacked data stream + uint32 _crc; //!< Error-detecting code uint32 _chunk32b; //!< The current internal 32-bit chunk - byte *_dst; - const byte *_src; + byte *_dst; //!< Destination buffer pointer + const byte *_src; //!< Source buffer pointer }; } // End of namespace Cine -- cgit v1.2.3 From 33fd755a0ebab6d3ca4e877b15c4d3d7d25877f9 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 11 Jun 2008 11:29:34 +0000 Subject: use kMaxChannelVolume instead of hardcoding 255 svn-id: r32666 --- sound/mixer.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/mixer.h b/sound/mixer.h index d46a933d97..26ae0898fd 100644 --- a/sound/mixer.h +++ b/sound/mixer.h @@ -147,7 +147,7 @@ public: SoundType type, SoundHandle *handle, void *sound, uint32 size, uint rate, byte flags, - int id = -1, byte volume = 255, int8 balance = 0, + int id = -1, byte volume = kMaxChannelVolume, int8 balance = 0, uint32 loopStart = 0, uint32 loopEnd = 0); /** @@ -174,7 +174,7 @@ public: SoundType type, SoundHandle *handle, AudioStream *input, - int id = -1, byte volume = 255, int8 balance = 0, + int id = -1, byte volume = kMaxChannelVolume, int8 balance = 0, bool autofreeStream = true, bool permanent = false, bool reverseStereo = false); @@ -258,7 +258,7 @@ public: * Set the channel volume for the given handle. * * @param handle the sound to affect - * @param volume the new channel volume (0 - 255) + * @param volume the new channel volume (0 - kMaxChannelVolume) */ void setChannelVolume(SoundHandle handle, byte volume); @@ -290,7 +290,7 @@ public: * Set the volume for the given sound type. * * @param type the sound type - * @param volume the new global volume, 0-kMaxMixerVolume + * @param volume the new global volume, 0 - kMaxMixerVolume */ void setVolumeForSoundType(SoundType type, int volume); @@ -298,7 +298,7 @@ public: * Query the global volume. * * @param type the sound type - * @return the global music volume, 0-kMaxMixerVolume + * @return the global music volume, 0 - kMaxMixerVolume */ int getVolumeForSoundType(SoundType type) const; -- cgit v1.2.3 From 555ddf9f9540bd1d62e0b2affbff4b62c284d9d1 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Thu, 12 Jun 2008 11:01:08 +0000 Subject: Updated script dumper to show opcode offset. svn-id: r32668 --- engines/made/script.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/engines/made/script.cpp b/engines/made/script.cpp index 4bda35dcc3..6f4ff7ace3 100644 --- a/engines/made/script.cpp +++ b/engines/made/script.cpp @@ -363,8 +363,7 @@ void ScriptInterpreter::cmd_set() { void ScriptInterpreter::cmd_print() { // TODO: This opcode was used for printing debug messages - Object *obj = _vm->_dat->getObject(_stack.top()); - const char *text = obj->getString(); + const char *text = _vm->_dat->getObjectString(_stack.top()); debug(4, "%s", text); _stack.setTop(0); } @@ -672,7 +671,7 @@ void ScriptInterpreter::dumpScript(int16 objectIndex, int *opcodeStats, int *ext debug(1, "Dumping code for object %04X", objectIndex); Object *obj = _vm->_dat->getObject(objectIndex); - byte *code = obj->getData(), *codeEnd = code + obj->getSize(); + byte *code = obj->getData(), *codeStart = code, *codeEnd = code + obj->getSize(); while (code < codeEnd) { byte opcode = *code++; @@ -684,6 +683,8 @@ void ScriptInterpreter::dumpScript(int16 objectIndex, int *opcodeStats, int *ext int16 value; char tempStr[32]; opcodeStats[opcode - 1]++; + snprintf(tempStr, 32, "[%04X] ", (uint16)(code - codeStart - 1)); + codeLine += tempStr; codeLine += desc; for (; *sig != '\0'; sig++) { codeLine += " "; -- cgit v1.2.3 From fb31c62ad82c26b17ec8f95c33f532eca1deba62 Mon Sep 17 00:00:00 2001 From: Benjamin Haisch Date: Thu, 12 Jun 2008 11:09:04 +0000 Subject: - Added support for Rodney's Fun Screen - Added audio cd playback (still kinda broken though) - Renamed getObjectPropertyPtr to findObjectProperty svn-id: r32669 --- engines/made/database.cpp | 9 +++++---- engines/made/database.h | 6 +++--- engines/made/detection.cpp | 17 +++++++++++++++++ engines/made/made.cpp | 13 ++++++++++--- engines/made/made.h | 15 ++++++++------- engines/made/screen.h | 1 + engines/made/scriptfuncs.cpp | 22 +++++++++++++--------- 7 files changed, 57 insertions(+), 26 deletions(-) diff --git a/engines/made/database.cpp b/engines/made/database.cpp index 4616b63252..edf608f02a 100644 --- a/engines/made/database.cpp +++ b/engines/made/database.cpp @@ -301,7 +301,7 @@ int16 GameDatabase::getObjectProperty(int16 objectIndex, int16 propertyId) { return 0; int16 propertyFlag; - int16 *property = getObjectPropertyPtr(objectIndex, propertyId, propertyFlag); + int16 *property = findObjectProperty(objectIndex, propertyId, propertyFlag); if (property) { return (int16)READ_LE_UINT16(property); @@ -317,7 +317,7 @@ int16 GameDatabase::setObjectProperty(int16 objectIndex, int16 propertyId, int16 return 0; int16 propertyFlag; - int16 *property = getObjectPropertyPtr(objectIndex, propertyId, propertyFlag); + int16 *property = findObjectProperty(objectIndex, propertyId, propertyFlag); if (property) { if (propertyFlag == 1) { @@ -430,7 +430,7 @@ int16 GameDatabaseV2::loadgame(const char *filename, int16 version) { return result; } -int16 *GameDatabaseV2::getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag) { +int16 *GameDatabaseV2::findObjectProperty(int16 objectIndex, int16 propertyId, int16 &propertyFlag) { Object *obj = getObject(objectIndex); int16 *prop = (int16*)obj->getData(); @@ -489,6 +489,7 @@ int16 *GameDatabaseV2::getObjectPropertyPtr(int16 objectIndex, int16 propertyId, } + debug(1, "findObjectProperty(%04X, %04) Property not found", objectIndex, propertyId); return NULL; } @@ -597,7 +598,7 @@ int16 GameDatabaseV3::loadgame(const char *filename, int16 version) { return result; } -int16 *GameDatabaseV3::getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag) { +int16 *GameDatabaseV3::findObjectProperty(int16 objectIndex, int16 propertyId, int16 &propertyFlag) { Object *obj = getObject(objectIndex); int16 *prop = (int16*)obj->getData(); diff --git a/engines/made/database.h b/engines/made/database.h index 476439c1e2..466d1a8f69 100644 --- a/engines/made/database.h +++ b/engines/made/database.h @@ -133,7 +133,7 @@ public: const char *getObjectString(int16 index); void setObjectString(int16 index, const char *str); - virtual int16 *getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag) = 0; + virtual int16 *findObjectProperty(int16 objectIndex, int16 propertyId, int16 &propertyFlag) = 0; virtual const char *getString(uint16 offset) = 0; virtual bool getSavegameDescription(const char *filename, Common::String &description) = 0; virtual int16 savegame(const char *filename, const char *description, int16 version) = 0; @@ -157,7 +157,7 @@ class GameDatabaseV2 : public GameDatabase { public: GameDatabaseV2(MadeEngine *vm); ~GameDatabaseV2(); - int16 *getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag); + int16 *findObjectProperty(int16 objectIndex, int16 propertyId, int16 &propertyFlag); const char *getString(uint16 offset); bool getSavegameDescription(const char *filename, Common::String &description); int16 savegame(const char *filename, const char *description, int16 version); @@ -170,7 +170,7 @@ protected: class GameDatabaseV3 : public GameDatabase { public: GameDatabaseV3(MadeEngine *vm); - int16 *getObjectPropertyPtr(int16 objectIndex, int16 propertyId, int16 &propertyFlag); + int16 *findObjectProperty(int16 objectIndex, int16 propertyId, int16 &propertyFlag); const char *getString(uint16 offset); bool getSavegameDescription(const char *filename, Common::String &description); int16 savegame(const char *filename, const char *description, int16 version); diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp index 7d30873866..dc7dbdee87 100644 --- a/engines/made/detection.cpp +++ b/engines/made/detection.cpp @@ -65,6 +65,7 @@ static const PlainGameDescriptor madeGames[] = { {"manhole", "The Manhole"}, {"rtz", "Return to Zork"}, {"lgop2", "Leather Goddesses of Phobos 2"}, + {"rodney", "Rodney's Fun Screen"}, {0, 0} }; @@ -276,6 +277,22 @@ static const MadeGameDescription gameDescriptions[] = { 0, }, + { + // Rodney's Fun Screen + { + "rodney", + "", + AD_ENTRY1("rodneys.dat", "a79887dbaa47689facd7c6f09258ba5a"), + Common::EN_ANY, + Common::kPlatformPC, + Common::ADGF_NO_FLAGS + }, + GID_RODNEY, + 0, + GF_FLOPPY, + 0, + }, + { AD_TABLE_END_MARKER, 0, 0, 0, 0 } }; diff --git a/engines/made/made.cpp b/engines/made/made.cpp index 09a9a85ec6..59ec487c37 100644 --- a/engines/made/made.cpp +++ b/engines/made/made.cpp @@ -35,6 +35,7 @@ #include "base/plugins.h" #include "base/version.h" +#include "sound/audiocd.h" #include "sound/mixer.h" #include "made/made.h" @@ -87,7 +88,7 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng _res = new ProjectReader(); _screen = new Screen(this); - if (getGameID() == GID_LGOP2 || getGameID() == GID_MANHOLE) { + if (getGameID() == GID_LGOP2 || getGameID() == GID_MANHOLE || getGameID() == GID_RODNEY) { _dat = new GameDatabaseV2(this); } else if (getGameID() == GID_RTZ) { _dat = new GameDatabaseV3(this); @@ -119,7 +120,7 @@ MadeEngine::MadeEngine(OSystem *syst, const MadeGameDescription *gameDesc) : Eng // Set default sound frequency // Return to Zork sets it itself via a script funtion - if (getGameID() == GID_MANHOLE) { + if (getGameID() == GID_MANHOLE || getGameID() == GID_RODNEY) { _soundRate = 11025; } else { _soundRate = 8000; @@ -238,6 +239,8 @@ void MadeEngine::handleEvents() { } } + + AudioCD.updateCD(); } @@ -245,7 +248,7 @@ int MadeEngine::go() { for (int i = 0; i < ARRAYSIZE(_timers); i++) _timers[i] = -1; - + if (getGameID() == GID_RTZ) { _engineVersion = 3; if (getFeatures() & GF_DEMO) { @@ -271,6 +274,10 @@ int MadeEngine::go() { _engineVersion = 2; _dat->open("lgop2.dat"); _res->open("lgop2.prj"); + } else if (getGameID() == GID_RODNEY) { + _engineVersion = 2; + _dat->open("rodneys.dat"); + _res->open("rodneys.prj"); } else { error ("Unknown MADE game"); } diff --git a/engines/made/made.h b/engines/made/made.h index f7e3354c4d..461941e5cf 100644 --- a/engines/made/made.h +++ b/engines/made/made.h @@ -48,16 +48,17 @@ namespace Made { enum MadeGameID { - GID_RTZ = 0, - GID_MANHOLE = 1, - GID_LGOP2 = 2 + GID_RTZ = 0, + GID_MANHOLE = 1, + GID_LGOP2 = 2, + GID_RODNEY = 3 }; enum MadeGameFeatures { - GF_DEMO = 1 << 0, - GF_CD = 1 << 1, - GF_CD_COMPRESSED = 1 << 2, - GF_FLOPPY = 1 << 3 + GF_DEMO = 1 << 0, + GF_CD = 1 << 1, + GF_CD_COMPRESSED = 1 << 2, + GF_FLOPPY = 1 << 3 }; const uint32 kTimerResolution = 40; diff --git a/engines/made/screen.h b/engines/made/screen.h index 92f3512954..5d55085e5c 100644 --- a/engines/made/screen.h +++ b/engines/made/screen.h @@ -95,6 +95,7 @@ public: void setRGBPalette(byte *palRGB, int start = 0, int count = 256); bool isPaletteLocked() { return _paletteLock; } void setPaletteLock(bool lock) { _paletteLock = lock; } + bool isScreenLocked() { return _screenLock; } void setScreenLock(bool lock) { _screenLock = lock; } void setVisualEffectNum(int visualEffectNum) { _visualEffectNum = visualEffectNum; } diff --git a/engines/made/scriptfuncs.cpp b/engines/made/scriptfuncs.cpp index 8e06c2e8bf..932447a1eb 100644 --- a/engines/made/scriptfuncs.cpp +++ b/engines/made/scriptfuncs.cpp @@ -26,8 +26,8 @@ #include "common/endian.h" #include "common/util.h" #include "common/events.h" - #include "graphics/cursorman.h" +#include "sound/audiocd.h" #include "made/made.h" #include "made/resource.h" @@ -94,7 +94,7 @@ void ScriptFunctions::setupExternalsTable() { External(sfSetSpriteGround); External(sfLoadResText); - if (_vm->getGameID() == GID_MANHOLE || _vm->getGameID() == GID_LGOP2) { + if (_vm->getGameID() == GID_MANHOLE || _vm->getGameID() == GID_LGOP2 || _vm->getGameID() == GID_RODNEY) { External(sfAddScreenMask); External(sfSetSpriteMask); } else if (_vm->getGameID() == GID_RTZ) { @@ -183,6 +183,8 @@ int16 ScriptFunctions::sfDrawPicture(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfClearScreen(int16 argc, int16 *argv) { + if (_vm->_screen->isScreenLocked()) + return 0; if (_vm->_autoStopSound) { _vm->_mixer->stopHandle(_audioStreamHandle); _vm->_autoStopSound = false; @@ -548,25 +550,27 @@ int16 ScriptFunctions::sfPlayVoice(int16 argc, int16 *argv) { } int16 ScriptFunctions::sfPlayCd(int16 argc, int16 *argv) { - // This one is called loads of times, so it has been commented out to reduce spam - //warning("Unimplemented opcode: sfPlayCd"); + AudioCD.play(argv[0], -1, 0, 0); return 0; } int16 ScriptFunctions::sfStopCd(int16 argc, int16 *argv) { - warning("Unimplemented opcode: sfStopCd"); - return 0; + if (AudioCD.isPlaying()) { + AudioCD.stop(); + return 1; + } else { + return 0; + } } int16 ScriptFunctions::sfGetCdStatus(int16 argc, int16 *argv) { - // This one is called loads of times, so it has been commented out to reduce spam - //warning("Unimplemented opcode: sfGetCdStatus"); - return 0; + return AudioCD.isPlaying() ? 1 : 0; } int16 ScriptFunctions::sfGetCdTime(int16 argc, int16 *argv) { // This one is called loads of times, so it has been commented out to reduce spam //warning("Unimplemented opcode: sfGetCdTime"); + // TODO return 0; } -- cgit v1.2.3 From 46681407ab8788461546af1bda99b9c3c7859ffa Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Thu, 12 Jun 2008 18:33:34 +0000 Subject: Fixing compilation svn-id: r32676 --- engines/made/database.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engines/made/database.cpp b/engines/made/database.cpp index edf608f02a..55e0e90732 100644 --- a/engines/made/database.cpp +++ b/engines/made/database.cpp @@ -489,7 +489,7 @@ int16 *GameDatabaseV2::findObjectProperty(int16 objectIndex, int16 propertyId, i } - debug(1, "findObjectProperty(%04X, %04) Property not found", objectIndex, propertyId); + debug(1, "findObjectProperty(%04X, %04X) Property not found", objectIndex, propertyId); return NULL; } -- cgit v1.2.3 From d7d9348243ea203c88a5798c2cbbc70c0ee93ba4 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Fri, 13 Jun 2008 05:57:07 +0000 Subject: Made CineUnpacker::unpack more robust & secure. It shouldn't crash now with any input (Before making reading or writing operations they are checked to be in bounds). Also updated some comments and added some error message(s). svn-id: r32687 --- engines/cine/part.cpp | 6 ++++-- engines/cine/unpack.cpp | 37 ++++++++++++++++++++++++++++--------- engines/cine/unpack.h | 16 +++++++++++----- 3 files changed, 43 insertions(+), 16 deletions(-) diff --git a/engines/cine/part.cpp b/engines/cine/part.cpp index 535bf841d5..b39f1eff7d 100644 --- a/engines/cine/part.cpp +++ b/engines/cine/part.cpp @@ -128,7 +128,7 @@ void CineEngine::readVolCnf() { f.read(buf, packedSize); if (packedSize != unpackedSize) { CineUnpacker cineUnpacker; - if (!cineUnpacker.unpack(buf, buf, packedSize)) { + if (!cineUnpacker.unpack(buf, packedSize, buf, unpackedSize)) { error("Error while unpacking 'vol.cnf' data"); } } @@ -226,7 +226,9 @@ byte *readBundleFile(int16 foundFileIdx) { byte *unpackBuffer = (byte *)malloc(partBuffer[foundFileIdx].packedSize); readFromPart(foundFileIdx, unpackBuffer); CineUnpacker cineUnpacker; - cineUnpacker.unpack(dataPtr, unpackBuffer, partBuffer[foundFileIdx].packedSize); + if (!cineUnpacker.unpack(unpackBuffer, partBuffer[foundFileIdx].packedSize, dataPtr, partBuffer[foundFileIdx].unpackedSize)) { + warning("Error unpacking '%s' from bundle file '%s'", partBuffer[foundFileIdx].partName, currentPartName); + } free(unpackBuffer); } else { readFromPart(foundFileIdx, dataPtr); diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp index 364331e439..a27387a1e3 100644 --- a/engines/cine/unpack.cpp +++ b/engines/cine/unpack.cpp @@ -31,6 +31,10 @@ namespace Cine { uint32 CineUnpacker::readSource() { + if (_src < _srcBegin || _src + 4 > _srcEnd) { + _error = true; + return 0; // The source pointer is out of bounds, returning a default value + } uint32 value = READ_BE_UINT32(_src); _src -= 4; return value; @@ -67,7 +71,10 @@ uint16 CineUnpacker::getBits(byte numBits) { } void CineUnpacker::unpackRawBytes(uint16 numBytes) { - _datasize -= numBytes; + if (_dst >= _dstEnd || _dst - numBytes + 1 < _dstBegin) { + _error = true; + return; // Destination pointer is out of bounds for this operation + } while (numBytes--) { *_dst = (byte)getBits(8); --_dst; @@ -75,21 +82,33 @@ void CineUnpacker::unpackRawBytes(uint16 numBytes) { } void CineUnpacker::copyRelocatedBytes(uint16 offset, uint16 numBytes) { - _datasize -= numBytes; + if (_dst + offset >= _dstEnd || _dst - numBytes + 1 < _dstBegin) { + _error = true; + return; // Destination pointer is out of bounds for this operation + } while (numBytes--) { *_dst = *(_dst + offset); --_dst; } } -bool CineUnpacker::unpack(byte *dst, const byte *src, int srcLen) { - _src = src + srcLen - 4; - _datasize = readSource(); // Unpacked length in bytes - _dst = dst + _datasize - 1; +bool CineUnpacker::unpack(const byte *src, uint srcLen, byte *dst, uint dstLen) { + // Initialize variables used for detecting errors during unpacking + _error = false; + _srcBegin = src; + _srcEnd = src + srcLen; + _dstBegin = dst; + _dstEnd = dst + dstLen; + + // Initialize other variables + _src = _srcBegin + srcLen - 4; + uint32 unpackedLength = readSource(); // Unpacked length in bytes + _dst = _dstBegin + unpackedLength - 1; _crc = readSource(); _chunk32b = readSource(); _crc ^= _chunk32b; - do { + + while (_dst >= _dstBegin && !_error) { /* Bits => Action: 0 0 => unpackRawBytes(3 bits + 1) i.e. unpackRawBytes(1..9) @@ -123,8 +142,8 @@ bool CineUnpacker::unpack(byte *dst, const byte *src, int srcLen) { copyRelocatedBytes(offset, numBytes); } } - } while (_datasize > 0 && _src >= src - 4); - return _crc == 0; + } + return !_error && (_crc == 0); } } // End of namespace Cine diff --git a/engines/cine/unpack.h b/engines/cine/unpack.h index f0a7ee3804..5bb7bfc8f9 100644 --- a/engines/cine/unpack.h +++ b/engines/cine/unpack.h @@ -40,7 +40,7 @@ namespace Cine { class CineUnpacker { public: /** Returns true if unpacking was successful, otherwise false. */ - bool unpack(byte *dst, const byte *src, int srcLen); + bool unpack(const byte *src, uint srcLen, byte *dst, uint dstLen); private: /** Reads a single big endian 32-bit integer from the source and goes backwards 4 bytes. */ uint32 readSource(); @@ -69,11 +69,17 @@ private: */ void copyRelocatedBytes(uint16 offset, uint16 numBytes); private: - int _datasize; //!< Bytes left to write into the unpacked data stream - uint32 _crc; //!< Error-detecting code + uint32 _crc; //!< Error-detecting code (This should be zero after successful unpacking) uint32 _chunk32b; //!< The current internal 32-bit chunk - byte *_dst; //!< Destination buffer pointer - const byte *_src; //!< Source buffer pointer + byte *_dst; //!< Pointer to the current position in the destination buffer + const byte *_src; //!< Pointer to the current position in the source buffer + + // These are used for detecting errors (e.g. out of bounds issues) during unpacking + bool _error; //!< Did an error occur during unpacking? + const byte *_srcBegin; //!< Source buffer's beginning + const byte *_srcEnd; //!< Source buffer's end + byte *_dstBegin; //!< Destination buffer's beginning + byte *_dstEnd; //!< Destination buffer's end }; } // End of namespace Cine -- cgit v1.2.3 From 1a6841c92f78e18e489cb8bdca7caf6d7ddfa974 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Fri, 13 Jun 2008 08:28:14 +0000 Subject: More documentation for CineUnpacker-class (Practically done documenting now). Also changed parameter and return value types to a more uniform style (uint16 -> uint, int -> uint where applicable etc). svn-id: r32688 --- engines/cine/unpack.cpp | 18 +++++++++--------- engines/cine/unpack.h | 48 +++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 48 insertions(+), 18 deletions(-) diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp index a27387a1e3..6c14b1980b 100644 --- a/engines/cine/unpack.cpp +++ b/engines/cine/unpack.cpp @@ -40,8 +40,8 @@ uint32 CineUnpacker::readSource() { return value; } -int CineUnpacker::rcr(int inputCarry) { - int outputCarry = (_chunk32b & 1); +uint CineUnpacker::rcr(bool inputCarry) { + uint outputCarry = (_chunk32b & 1); _chunk32b >>= 1; if (inputCarry) { _chunk32b |= 0x80000000; @@ -49,20 +49,20 @@ int CineUnpacker::rcr(int inputCarry) { return outputCarry; } -int CineUnpacker::nextBit() { - int carry = rcr(0); +uint CineUnpacker::nextBit() { + uint carry = rcr(false); // Normally if the chunk becomes zero then the carry is one as // the end of chunk marker is always the last to be shifted out. if (_chunk32b == 0) { _chunk32b = readSource(); _crc ^= _chunk32b; - carry = rcr(1); // Put the end of chunk marker in the most significant bit + carry = rcr(true); // Put the end of chunk marker in the most significant bit } return carry; } -uint16 CineUnpacker::getBits(byte numBits) { - uint16 c = 0; +uint CineUnpacker::getBits(uint numBits) { + uint c = 0; while (numBits--) { c <<= 1; c |= nextBit(); @@ -70,7 +70,7 @@ uint16 CineUnpacker::getBits(byte numBits) { return c; } -void CineUnpacker::unpackRawBytes(uint16 numBytes) { +void CineUnpacker::unpackRawBytes(uint numBytes) { if (_dst >= _dstEnd || _dst - numBytes + 1 < _dstBegin) { _error = true; return; // Destination pointer is out of bounds for this operation @@ -81,7 +81,7 @@ void CineUnpacker::unpackRawBytes(uint16 numBytes) { } } -void CineUnpacker::copyRelocatedBytes(uint16 offset, uint16 numBytes) { +void CineUnpacker::copyRelocatedBytes(uint offset, uint numBytes) { if (_dst + offset >= _dstEnd || _dst - numBytes + 1 < _dstBegin) { _error = true; return; // Destination pointer is out of bounds for this operation diff --git a/engines/cine/unpack.h b/engines/cine/unpack.h index 5bb7bfc8f9..e16cb594a9 100644 --- a/engines/cine/unpack.h +++ b/engines/cine/unpack.h @@ -39,38 +39,68 @@ namespace Cine { */ class CineUnpacker { public: - /** Returns true if unpacking was successful, otherwise false. */ + /** + * Unpacks packed data from the source buffer to the destination buffer. + * @warning Do NOT call this on data that is not packed. + * @note Source and destination buffer pointers can be the same as long as there's space for the unpacked data. + * @param src Pointer to the source buffer. + * @param srcLen Length of the source buffer. + * @param dst Pointer to the destination buffer. + * @param dstLen Length of the destination buffer. + * @return True if no errors were detected in the source data and unpacking was successful, otherwise false. + */ bool unpack(const byte *src, uint srcLen, byte *dst, uint dstLen); private: - /** Reads a single big endian 32-bit integer from the source and goes backwards 4 bytes. */ + /** + * Reads an unsigned big endian 32-bit integer from the source stream and goes backwards 4 bytes. + * @return If the operation is valid, an unsigned big endian 32-bit integer read from the source stream. + * @return If the operation is invalid, zero. + * @note Sets internal error state if the read operation would be out of source bounds. + */ uint32 readSource(); /** * Shifts the current internal 32-bit chunk to the right by one. * Puts input carry into internal chunk's topmost (i.e. leftmost) bit. - * Returns the least significant bit that was shifted out. + * @return The least significant bit that was shifted out from the chunk. + */ + uint rcr(bool inputCarry); + + /** + * Get the next bit from the source stream. + * @note Changes the bit position in the source stream. + * @return The next bit from the source stream. + */ + uint nextBit(); + + /** + * Get bits from the source stream. + * @note Changes the bit position in the source stream. + * @param numBits Number of bits to read from the source stream. + * @return Integer value consisting of the bits read from the source stream (In range [0, (2 ** numBits) - 1]). + * @return Later the bit was read from the source, the less significant it is in the return value. */ - int rcr(int inputCarry); - int nextBit(); - uint16 getBits(byte numBits); + uint getBits(uint numBits); /** * Copy raw bytes from the input stream and write them to the destination stream. * This is used when no adequately long match is found in the sliding window. + * @note Sets internal error state if the operation would be out of bounds. * @param numBytes Amount of bytes to copy from the input stream */ - void unpackRawBytes(uint16 numBytes); + void unpackRawBytes(uint numBytes); /** * Copy bytes from the sliding window in the destination buffer. * This is used when a match of two bytes or longer is found. + * @note Sets internal error state if the operation would be out of bounds. * @param offset Offset in the sliding window * @param numBytes Amount of bytes to copy */ - void copyRelocatedBytes(uint16 offset, uint16 numBytes); + void copyRelocatedBytes(uint offset, uint numBytes); private: uint32 _crc; //!< Error-detecting code (This should be zero after successful unpacking) - uint32 _chunk32b; //!< The current internal 32-bit chunk + uint32 _chunk32b; //!< The current internal 32-bit chunk of source data byte *_dst; //!< Pointer to the current position in the destination buffer const byte *_src; //!< Pointer to the current position in the source buffer -- cgit v1.2.3 From 2b94f217449374289444f6d37ed0e676a6e80098 Mon Sep 17 00:00:00 2001 From: Kari Salminen Date: Fri, 13 Jun 2008 08:37:03 +0000 Subject: Small cleanup (uint16 -> uint where still applicable). svn-id: r32689 --- engines/cine/unpack.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/engines/cine/unpack.cpp b/engines/cine/unpack.cpp index 6c14b1980b..dcd3181242 100644 --- a/engines/cine/unpack.cpp +++ b/engines/cine/unpack.cpp @@ -120,25 +120,25 @@ bool CineUnpacker::unpack(const byte *src, uint srcLen, byte *dst, uint dstLen) */ if (!nextBit()) { // 0... if (!nextBit()) { // 0 0 - uint16 numBytes = getBits(3) + 1; + uint numBytes = getBits(3) + 1; unpackRawBytes(numBytes); } else { // 0 1 - uint16 numBytes = 2; - uint16 offset = getBits(8); + uint numBytes = 2; + uint offset = getBits(8); copyRelocatedBytes(offset, numBytes); } } else { // 1... - uint16 c = getBits(2); + uint c = getBits(2); if (c == 3) { // 1 1 1 - uint16 numBytes = getBits(8) + 9; + uint numBytes = getBits(8) + 9; unpackRawBytes(numBytes); } else if (c < 2) { // 1 0 x - uint16 numBytes = c + 3; - uint16 offset = getBits(c + 9); + uint numBytes = c + 3; + uint offset = getBits(c + 9); copyRelocatedBytes(offset, numBytes); } else { // 1 1 0 - uint16 numBytes = getBits(8) + 1; - uint16 offset = getBits(12); + uint numBytes = getBits(8) + 1; + uint offset = getBits(12); copyRelocatedBytes(offset, numBytes); } } -- cgit v1.2.3 From 177993b14530e8c4af6d46be62a11b02719accb9 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Fri, 13 Jun 2008 14:30:47 +0000 Subject: Renamed MIDI plugins to Music plugins svn-id: r32693 --- backends/midi/alsa.cpp | 14 +++---- backends/midi/camd.cpp | 12 +++--- backends/midi/coreaudio.cpp | 12 +++--- backends/midi/coremidi.cpp | 12 +++--- backends/midi/dmedia.cpp | 12 +++--- backends/midi/quicktime.cpp | 12 +++--- backends/midi/seq.cpp | 12 +++--- backends/midi/timidity.cpp | 12 +++--- backends/midi/windows.cpp | 12 +++--- backends/midi/ypa1.cpp | 12 +++--- backends/midi/zodiac.cpp | 12 +++--- base/plugins.cpp | 14 +++---- base/plugins.h | 4 +- dists/msvc7/scummvm.vcproj | 2 +- dists/msvc71/scummvm.vcproj | 2 +- dists/msvc8/scummvm.vcproj | 2 +- dists/msvc9/scummvm.vcproj | 2 +- sound/midiplugin.h | 93 ------------------------------------------ sound/musicplugin.h | 93 ++++++++++++++++++++++++++++++++++++++++++ sound/null.cpp | 12 +++--- sound/softsynth/adlib.cpp | 12 +++--- sound/softsynth/fluidsynth.cpp | 12 +++--- sound/softsynth/mt32.cpp | 12 +++--- sound/softsynth/ym2612.cpp | 12 +++--- 24 files changed, 203 insertions(+), 203 deletions(-) delete mode 100644 sound/midiplugin.h create mode 100644 sound/musicplugin.h diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp index 6b0e424d68..2b564de294 100644 --- a/backends/midi/alsa.cpp +++ b/backends/midi/alsa.cpp @@ -28,7 +28,7 @@ #include "common/config-manager.h" #include "common/util.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #include @@ -241,7 +241,7 @@ void MidiDriver_ALSA::send_event(int do_flush) { // Plugin interface -class AlsaMidiPlugin : public MidiPluginObject { +class AlsaMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "ALSA"; @@ -271,7 +271,7 @@ static int check_permission(snd_seq_port_info_t *pinfo) return 0; } -Common::StringList AlsaMidiPlugin::getDevices() const { +Common::StringList AlsaMusicPlugin::getDevices() const { Common::StringList devices; snd_seq_t *seq; @@ -302,7 +302,7 @@ Common::StringList AlsaMidiPlugin::getDevices() const { return devices; } -PluginError AlsaMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError AlsaMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_ALSA(); return kNoError; @@ -311,16 +311,16 @@ PluginError AlsaMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mid MidiDriver *MidiDriver_ALSA_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - AlsaMidiPlugin p; + AlsaMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(ALSA) - //REGISTER_PLUGIN_DYNAMIC(ALSA, PLUGIN_TYPE_MIDI, AlsaMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(ALSA, PLUGIN_TYPE_MUSIC, AlsaMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(ALSA, PLUGIN_TYPE_MIDI, AlsaMidiPlugin); + REGISTER_PLUGIN_STATIC(ALSA, PLUGIN_TYPE_MUSIC, AlsaMusicPlugin); //#endif #endif diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp index 6aa79eb260..67600c004a 100644 --- a/backends/midi/camd.cpp +++ b/backends/midi/camd.cpp @@ -28,7 +28,7 @@ #include "common/endian.h" #include "common/util.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #include @@ -166,7 +166,7 @@ void MidiDriver_CAMD::closeAll() { // Plugin interface -class CamdMidiPlugin : public MidiPluginObject { +class CamdMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "CAMD"; @@ -185,7 +185,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError CamdMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError CamdMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_CAMD(); return kNoError; @@ -194,16 +194,16 @@ PluginError CamdMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mid MidiDriver *MidiDriver_CAMD_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - CamdMidiPlugin p; + CamdMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(CAMD) - //REGISTER_PLUGIN_DYNAMIC(CAMD, PLUGIN_TYPE_MIDI, CamdMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(CAMD, PLUGIN_TYPE_MUSIC, CamdMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(CAMD, PLUGIN_TYPE_MIDI, CamdMidiPlugin); + REGISTER_PLUGIN_STATIC(CAMD, PLUGIN_TYPE_MUSIC, CamdMusicPlugin); //#endif #endif diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp index d7ab93a90a..62df5a70b4 100644 --- a/backends/midi/coreaudio.cpp +++ b/backends/midi/coreaudio.cpp @@ -37,7 +37,7 @@ #include "common/config-manager.h" #include "common/util.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #include @@ -207,7 +207,7 @@ void MidiDriver_CORE::sysEx(const byte *msg, uint16 length) { // Plugin interface -class CoreAudioMidiPlugin : public MidiPluginObject { +class CoreAudioMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "CoreAudio"; @@ -224,7 +224,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError CoreAudioMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError CoreAudioMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_CORE(); return kNoError; @@ -233,16 +233,16 @@ PluginError CoreAudioMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver MidiDriver *MidiDriver_CORE_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - CoreAudioMidiPlugin p; + CoreAudioMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(COREAUDIO) - //REGISTER_PLUGIN_DYNAMIC(COREAUDIO, PLUGIN_TYPE_MIDI, CoreAudioMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(COREAUDIO, PLUGIN_TYPE_MUSIC, CoreAudioMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(COREAUDIO, PLUGIN_TYPE_MIDI, CoreAudioMidiPlugin); + REGISTER_PLUGIN_STATIC(COREAUDIO, PLUGIN_TYPE_MUSIC, CoreAudioMusicPlugin); //#endif #endif // MACOSX diff --git a/backends/midi/coremidi.cpp b/backends/midi/coremidi.cpp index efbdaad4e4..613534d5b1 100644 --- a/backends/midi/coremidi.cpp +++ b/backends/midi/coremidi.cpp @@ -26,7 +26,7 @@ #include "common/config-manager.h" #include "common/util.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #include @@ -179,7 +179,7 @@ void MidiDriver_CoreMIDI::sysEx(const byte *msg, uint16 length) { // Plugin interface -class CoreMIDIMidiPlugin : public MidiPluginObject { +class CoreMIDIMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "CoreMIDI"; @@ -196,7 +196,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError CoreMIDIMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError CoreMIDIMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_CoreMIDI(); return kNoError; @@ -205,16 +205,16 @@ PluginError CoreMIDIMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver * MidiDriver *MidiDriver_CoreMIDI_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - CoreMIDIMidiPlugin p; + CoreMIDIMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(COREMIDI) - //REGISTER_PLUGIN_DYNAMIC(COREMIDI, PLUGIN_TYPE_MIDI, CoreMIDIMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(COREMIDI, PLUGIN_TYPE_MUSIC, CoreMIDIMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(COREMIDI, PLUGIN_TYPE_MIDI, CoreMIDIMidiPlugin); + REGISTER_PLUGIN_STATIC(COREMIDI, PLUGIN_TYPE_MUSIC, CoreMIDIMusicPlugin); //#endif #endif // MACOSX diff --git a/backends/midi/dmedia.cpp b/backends/midi/dmedia.cpp index 885081e3e0..257f9ba07c 100644 --- a/backends/midi/dmedia.cpp +++ b/backends/midi/dmedia.cpp @@ -31,7 +31,7 @@ #include "common/scummsys.h" #include "common/util.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #include @@ -178,7 +178,7 @@ void MidiDriver_DMEDIA::sysEx (const byte *msg, uint16 length) { // Plugin interface -class DMediaMidiPlugin : public MidiPluginObject { +class DMediaMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "DMedia"; @@ -195,7 +195,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError DMediaMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError DMediaMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_DMEDIA(); return kNoError; @@ -204,16 +204,16 @@ PluginError DMediaMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **m MidiDriver *MidiDriver_DMEDIA_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - DMediaMidiPlugin p; + DMediaMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(DMEDIA) - //REGISTER_PLUGIN_DYNAMIC(DMEDIA, PLUGIN_TYPE_MIDI, DMediaMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(DMEDIA, PLUGIN_TYPE_MUSIC, DMediaMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(DMEDIA, PLUGIN_TYPE_MIDI, DMediaMidiPlugin); + REGISTER_PLUGIN_STATIC(DMEDIA, PLUGIN_TYPE_MUSIC, DMediaMusicPlugin); //#endif #endif diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp index 63905212e6..1443f895a6 100644 --- a/backends/midi/quicktime.cpp +++ b/backends/midi/quicktime.cpp @@ -38,7 +38,7 @@ #include "common/endian.h" #include "common/util.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #if defined(MACOSX) @@ -265,7 +265,7 @@ void MidiDriver_QT::dispose() // Plugin interface -class QuickTimeMidiPlugin : public MidiPluginObject { +class QuickTimeMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "QuickTime"; @@ -282,7 +282,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError QuickTimeMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError QuickTimeMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_QT(); return kNoError; @@ -291,16 +291,16 @@ PluginError QuickTimeMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver MidiDriver *MidiDriver_QT_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - QuickTimeMidiPlugin p; + QuickTimeMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(QUICKTIME) - //REGISTER_PLUGIN_DYNAMIC(QUICKTIME, PLUGIN_TYPE_MIDI, QuickTimeMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(QUICKTIME, PLUGIN_TYPE_MUSIC, QuickTimeMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(QUICKTIME, PLUGIN_TYPE_MIDI, QuickTimeMidiPlugin); + REGISTER_PLUGIN_STATIC(QUICKTIME, PLUGIN_TYPE_MUSIC, QuickTimeMusicPlugin); //#endif #endif // MACOSX || macintosh diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp index 07dfc25142..fc7ebb060b 100644 --- a/backends/midi/seq.cpp +++ b/backends/midi/seq.cpp @@ -31,7 +31,7 @@ #if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__) #include "common/util.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #include @@ -173,7 +173,7 @@ void MidiDriver_SEQ::sysEx (const byte *msg, uint16 length) { // Plugin interface -class SeqMidiPlugin : public MidiPluginObject { +class SeqMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "SEQ"; @@ -190,7 +190,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError SeqMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError SeqMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_SEQ(); return kNoError; @@ -199,16 +199,16 @@ PluginError SeqMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **midi MidiDriver *MidiDriver_SEQ_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - SeqMidiPlugin p; + SeqMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(SEQ) - //REGISTER_PLUGIN_DYNAMIC(SEQ, PLUGIN_TYPE_MIDI, SeqMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(SEQ, PLUGIN_TYPE_MUSIC, SeqMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(SEQ, PLUGIN_TYPE_MIDI, SeqMidiPlugin); + REGISTER_PLUGIN_STATIC(SEQ, PLUGIN_TYPE_MUSIC, SeqMusicPlugin); //#endif #endif diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp index 842fb358bf..40b684e664 100644 --- a/backends/midi/timidity.cpp +++ b/backends/midi/timidity.cpp @@ -37,7 +37,7 @@ #if defined (UNIX) #include "common/util.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #include @@ -514,7 +514,7 @@ void MidiDriver_TIMIDITY::sysEx(const byte *msg, uint16 length) { // Plugin interface -class TimidityMidiPlugin : public MidiPluginObject { +class TimidityMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "TiMidity"; @@ -531,7 +531,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError TimidityMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError TimidityMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_TIMIDITY(); return kNoError; @@ -540,16 +540,16 @@ PluginError TimidityMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver * MidiDriver *MidiDriver_TIMIDITY_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - TimidityMidiPlugin p; + TimidityMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(TIMIDITY) - //REGISTER_PLUGIN_DYNAMIC(TIMIDITY, PLUGIN_TYPE_MIDI, TimidityMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(TIMIDITY, PLUGIN_TYPE_MUSIC, TimidityMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(TIMIDITY, PLUGIN_TYPE_MIDI, TimidityMidiPlugin); + REGISTER_PLUGIN_STATIC(TIMIDITY, PLUGIN_TYPE_MUSIC, TimidityMusicPlugin); //#endif #endif // defined (UNIX) diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp index 083f0eaf96..8393082fea 100644 --- a/backends/midi/windows.cpp +++ b/backends/midi/windows.cpp @@ -28,7 +28,7 @@ // winnt.h defines ARRAYSIZE, but we want our own one... #undef ARRAYSIZE -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #include @@ -147,7 +147,7 @@ void MidiDriver_WIN::check_error(MMRESULT result) { // Plugin interface -class WindowsMidiPlugin : public MidiPluginObject { +class WindowsMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "Windows MIDI"; @@ -164,7 +164,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError WindowsMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError WindowsMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_WIN(); return kNoError; @@ -173,16 +173,16 @@ PluginError WindowsMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver ** MidiDriver *MidiDriver_WIN_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - WindowsMidiPlugin p; + WindowsMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(WINDOWS) - //REGISTER_PLUGIN_DYNAMIC(WINDOWS, PLUGIN_TYPE_MIDI, WindowsMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(WINDOWS, PLUGIN_TYPE_MUSIC, WindowsMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(WINDOWS, PLUGIN_TYPE_MIDI, WindowsMidiPlugin); + REGISTER_PLUGIN_STATIC(WINDOWS, PLUGIN_TYPE_MUSIC, WindowsMusicPlugin); //#endif #endif diff --git a/backends/midi/ypa1.cpp b/backends/midi/ypa1.cpp index 37d90d45b0..d2fc6a8c91 100644 --- a/backends/midi/ypa1.cpp +++ b/backends/midi/ypa1.cpp @@ -23,7 +23,7 @@ */ #include "common/util.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #include "Pa1Lib.h" @@ -106,7 +106,7 @@ void MidiDriver_YamahaPa1::send(uint32 b) { // Plugin interface -class YamahaPa1MidiPlugin : public MidiPluginObject { +class YamahaPa1MusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "Yamaha Pa1"; @@ -123,7 +123,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError YamahaPa1MidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError YamahaPa1MusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_YamahaPa1(); return kNoError; @@ -132,14 +132,14 @@ PluginError YamahaPa1MidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver MidiDriver *MidiDriver_YamahaPa1_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - YamahaPa1MidiPlugin p; + YamahaPa1MusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(YPA1) - //REGISTER_PLUGIN_DYNAMIC(YPA1, PLUGIN_TYPE_MIDI, YamahaPa1MidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(YPA1, PLUGIN_TYPE_MUSIC, YamahaPa1MusicPlugin); //#else - REGISTER_PLUGIN_STATIC(YPA1, PLUGIN_TYPE_MIDI, YamahaPa1MidiPlugin); + REGISTER_PLUGIN_STATIC(YPA1, PLUGIN_TYPE_MUSIC, YamahaPa1MusicPlugin); //#endif diff --git a/backends/midi/zodiac.cpp b/backends/midi/zodiac.cpp index f27c042de8..b210b0cfc3 100644 --- a/backends/midi/zodiac.cpp +++ b/backends/midi/zodiac.cpp @@ -23,7 +23,7 @@ */ #include "common/util.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #ifndef DISABLE_TAPWAVE @@ -124,7 +124,7 @@ void MidiDriver_Zodiac::sysEx(const byte *msg, uint16 length) { // Plugin interface -class ZodiacMidiPlugin : public MidiPluginObject { +class ZodiacMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "Tapwave Zodiac"; @@ -141,7 +141,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError ZodiacMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError ZodiacMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_Zodiac(); return kNoError; @@ -150,16 +150,16 @@ PluginError ZodiacMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **m MidiDriver *MidiDriver_Zodiac_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - ZodiacMidiPlugin p; + ZodiacMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(ZODIAC) - //REGISTER_PLUGIN_DYNAMIC(ZODIAC, PLUGIN_TYPE_MIDI, ZodiacMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(ZODIAC, PLUGIN_TYPE_MUSIC, ZodiacMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(ZODIAC, PLUGIN_TYPE_MIDI, ZodiacMidiPlugin); + REGISTER_PLUGIN_STATIC(ZODIAC, PLUGIN_TYPE_MUSIC, ZodiacMusicPlugin); //#endif #endif diff --git a/base/plugins.cpp b/base/plugins.cpp index 7c365c7eb6..dcd394495f 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -35,7 +35,7 @@ int pluginTypeVersions[PLUGIN_TYPE_MAX] = { PLUGIN_TYPE_ENGINE_VERSION, - PLUGIN_TYPE_MIDI_VERSION, + PLUGIN_TYPE_MUSIC_VERSION, }; @@ -144,7 +144,7 @@ public: LINK_PLUGIN(TOUCHE) #endif - // MIDI plugins + // Music plugins // TODO: Use defines to disable or enable each MIDI driver as a // static/dynamic plugin, like it's done for the engines LINK_PLUGIN(NULL) @@ -393,12 +393,12 @@ const EnginePlugin::List &EngineManager::getPlugins() const { } -// MIDI plugins +// Music plugins -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" -DECLARE_SINGLETON(MidiManager); +DECLARE_SINGLETON(MusicManager); -const MidiPlugin::List &MidiManager::getPlugins() const { - return (const MidiPlugin::List &)PluginManager::instance().getPlugins(PLUGIN_TYPE_MIDI); +const MusicPlugin::List &MusicManager::getPlugins() const { + return (const MusicPlugin::List &)PluginManager::instance().getPlugins(PLUGIN_TYPE_MUSIC); } diff --git a/base/plugins.h b/base/plugins.h index aef95a6650..9d3ce97c3b 100644 --- a/base/plugins.h +++ b/base/plugins.h @@ -62,7 +62,7 @@ enum PluginType { PLUGIN_TYPE_ENGINE = 0, - PLUGIN_TYPE_MIDI, + PLUGIN_TYPE_MUSIC, /* PLUGIN_TYPE_SCALER, */ // TODO: Add graphics scaler plugins PLUGIN_TYPE_MAX @@ -71,7 +71,7 @@ enum PluginType { // TODO: Make the engine API version depend on ScummVM's version // because of the backlinking (posibly from the SVN revision) #define PLUGIN_TYPE_ENGINE_VERSION 1 -#define PLUGIN_TYPE_MIDI_VERSION 1 +#define PLUGIN_TYPE_MUSIC_VERSION 1 extern int pluginTypeVersions[PLUGIN_TYPE_MAX]; diff --git a/dists/msvc7/scummvm.vcproj b/dists/msvc7/scummvm.vcproj index 89cb1ff697..5efde22725 100644 --- a/dists/msvc7/scummvm.vcproj +++ b/dists/msvc7/scummvm.vcproj @@ -396,7 +396,7 @@ RelativePath="..\..\sound\midiparser_xmidi.cpp"> + RelativePath="..\..\sound\musicplugin.h"> diff --git a/dists/msvc71/scummvm.vcproj b/dists/msvc71/scummvm.vcproj index 08102bd9b2..16f56e3004 100644 --- a/dists/msvc71/scummvm.vcproj +++ b/dists/msvc71/scummvm.vcproj @@ -410,7 +410,7 @@ RelativePath="..\..\sound\midiparser_xmidi.cpp"> + RelativePath="..\..\sound\musicplugin.h"> diff --git a/dists/msvc8/scummvm.vcproj b/dists/msvc8/scummvm.vcproj index 3dcaf09f83..bee416b549 100644 --- a/dists/msvc8/scummvm.vcproj +++ b/dists/msvc8/scummvm.vcproj @@ -565,7 +565,7 @@ > MidiPlugin; - -/** - * Singleton class which manages all MIDI plugins. - */ -class MidiManager : public Common::Singleton { -private: - friend class Common::Singleton; - -public: - const MidiPlugin::List &getPlugins() const; -}; - -/** Convenience shortcut for accessing the MIDI manager. */ -#define MidiMan MidiManager::instance() - -#endif diff --git a/sound/musicplugin.h b/sound/musicplugin.h new file mode 100644 index 0000000000..316ee1fbf3 --- /dev/null +++ b/sound/musicplugin.h @@ -0,0 +1,93 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + */ + +#ifndef SOUND_MUSICPLUGIN_H +#define SOUND_MUSICPLUGIN_H + +#include "base/plugins.h" +#include "sound/mididrv.h" + +/** + * A MusicPluginObject is essentially a factory for MidiDriver instances with + * the added ability of listing the available devices and their capabilities. + */ +class MusicPluginObject : public PluginObject { +public: + virtual ~MusicPluginObject() {} + + /** + * Returns a unique string identifier which will be used to save the + * selected MIDI driver to the config file. + */ + virtual const char *getId() const = 0; + + /** + * Returns the type kind of music supported by this driver, as specified + * by the MidiDriverFlags enum. + */ + virtual int getCapabilities() const = 0; + + /** + * Returns a list of the available devices. The empty string means the + * default device. + */ + virtual Common::StringList getDevices() const { + Common::StringList dev; + dev.push_back(""); + return dev; + } + + /** + * Tries to instantiate a MIDI Driver instance based on the settings of + * the currently active ConfMan target. That is, the MusicPluginObject + * should query the ConfMan singleton for the device name, port, etc. + * + * @param mixer Pointer to the global Mixer object + * @param mididriver Pointer to a pointer which the MusicPluginObject sets + * to the newly create MidiDriver, or 0 in case of an error + * @return a PluginError describing the error which occurred, or kNoError + */ + virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const = 0; +}; + + +// Music plugins + +typedef PluginSubclass MusicPlugin; + +/** + * Singleton class which manages all Music plugins. + */ +class MusicManager : public Common::Singleton { +private: + friend class Common::Singleton; + +public: + const MusicPlugin::List &getPlugins() const; +}; + +/** Convenience shortcut for accessing the Music manager. */ +#define MusicMan MusicManager::instance() + +#endif diff --git a/sound/null.cpp b/sound/null.cpp index 9bb3a76344..763299d5a3 100644 --- a/sound/null.cpp +++ b/sound/null.cpp @@ -22,7 +22,7 @@ * $Id$ */ -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" /* NULL driver */ @@ -35,7 +35,7 @@ public: // Plugin interface -class NullMidiPlugin : public MidiPluginObject { +class NullMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "No music"; @@ -52,7 +52,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError NullMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError NullMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_NULL(); return kNoError; @@ -61,7 +61,7 @@ PluginError NullMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mid MidiDriver *MidiDriver_NULL_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - NullMidiPlugin p; + NullMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; @@ -74,7 +74,7 @@ MidiDriver *MidiDriver_ADLIB_create(Audio::Mixer *mixer) { #endif //#if PLUGIN_ENABLED_DYNAMIC(NULL) - //REGISTER_PLUGIN_DYNAMIC(NULL, PLUGIN_TYPE_MIDI, NullMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(NULL, PLUGIN_TYPE_MUSIC, NullMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(NULL, PLUGIN_TYPE_MIDI, NullMidiPlugin); + REGISTER_PLUGIN_STATIC(NULL, PLUGIN_TYPE_MUSIC, NullMusicPlugin); //#endif diff --git a/sound/softsynth/adlib.cpp b/sound/softsynth/adlib.cpp index 3936843f52..beedaf5c3b 100644 --- a/sound/softsynth/adlib.cpp +++ b/sound/softsynth/adlib.cpp @@ -25,7 +25,7 @@ #include "sound/softsynth/emumidi.h" #include "common/util.h" #include "sound/fmopl.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #ifdef DEBUG_ADLIB static int tick; @@ -1518,7 +1518,7 @@ void MidiDriver_ADLIB::adlib_note_on(int chan, byte note, int mod) { // Plugin interface -class AdlibMidiPlugin : public MidiPluginObject { +class AdlibMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "AdLib Emulator"; @@ -1535,7 +1535,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError AdlibMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError AdlibMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_ADLIB(mixer); return kNoError; @@ -1544,14 +1544,14 @@ PluginError AdlibMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mi MidiDriver *MidiDriver_ADLIB_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - AdlibMidiPlugin p; + AdlibMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(ADLIB) - //REGISTER_PLUGIN_DYNAMIC(ADLIB, PLUGIN_TYPE_MIDI, AdlibMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(ADLIB, PLUGIN_TYPE_MUSIC, AdlibMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(ADLIB, PLUGIN_TYPE_MIDI, AdlibMidiPlugin); + REGISTER_PLUGIN_STATIC(ADLIB, PLUGIN_TYPE_MUSIC, AdlibMusicPlugin); //#endif diff --git a/sound/softsynth/fluidsynth.cpp b/sound/softsynth/fluidsynth.cpp index ae89a8df8a..f2dcb2de7a 100644 --- a/sound/softsynth/fluidsynth.cpp +++ b/sound/softsynth/fluidsynth.cpp @@ -27,7 +27,7 @@ #ifdef USE_FLUIDSYNTH #include "common/config-manager.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #include "sound/softsynth/emumidi.h" @@ -219,7 +219,7 @@ void MidiDriver_FluidSynth::generateSamples(int16 *data, int len) { // Plugin interface -class FluidSynthMidiPlugin : public MidiPluginObject { +class FluidSynthMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "FluidSynth"; @@ -236,7 +236,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError FluidSynthMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError FluidSynthMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_FluidSynth(mixer); return kNoError; @@ -245,16 +245,16 @@ PluginError FluidSynthMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver MidiDriver *MidiDriver_FluidSynth_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - FluidSynthMidiPlugin p; + FluidSynthMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(FLUIDSYNTH) - //REGISTER_PLUGIN_DYNAMIC(FLUIDSYNTH, PLUGIN_TYPE_MIDI, FluidSynthMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(FLUIDSYNTH, PLUGIN_TYPE_MUSIC, FluidSynthMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(FLUIDSYNTH, PLUGIN_TYPE_MIDI, FluidSynthMidiPlugin); + REGISTER_PLUGIN_STATIC(FLUIDSYNTH, PLUGIN_TYPE_MUSIC, FluidSynthMusicPlugin); //#endif #endif diff --git a/sound/softsynth/mt32.cpp b/sound/softsynth/mt32.cpp index 2c9c4f24be..112fbb4bfe 100644 --- a/sound/softsynth/mt32.cpp +++ b/sound/softsynth/mt32.cpp @@ -29,7 +29,7 @@ #include "sound/softsynth/mt32/mt32emu.h" #include "sound/softsynth/emumidi.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" #include "sound/mpu401.h" #include "common/config-manager.h" @@ -483,7 +483,7 @@ void MidiDriver_ThreadedMT32::onTimer() { // Plugin interface -class MT32MidiPlugin : public MidiPluginObject { +class MT32MusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "MT-32 Emulator"; @@ -500,7 +500,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError MT32MidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError MT32MusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_MT32(mixer); return kNoError; @@ -513,16 +513,16 @@ MidiDriver *MidiDriver_MT32_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - MT32MidiPlugin p; + MT32MusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(MT32) - //REGISTER_PLUGIN_DYNAMIC(MT32, PLUGIN_TYPE_MIDI, MT32MidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(MT32, PLUGIN_TYPE_MUSIC, MT32MusicPlugin); //#else - REGISTER_PLUGIN_STATIC(MT32, PLUGIN_TYPE_MIDI, MT32MidiPlugin); + REGISTER_PLUGIN_STATIC(MT32, PLUGIN_TYPE_MUSIC, MT32MusicPlugin); //#endif #endif diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp index 3fcc2c3fc4..186300e1fe 100644 --- a/sound/softsynth/ym2612.cpp +++ b/sound/softsynth/ym2612.cpp @@ -26,7 +26,7 @@ #include "sound/softsynth/ym2612.h" #include "common/util.h" -#include "sound/midiplugin.h" +#include "sound/musicplugin.h" //////////////////////////////////////// // @@ -755,7 +755,7 @@ void MidiDriver_YM2612::removeLookupTables() { // Plugin interface -class TownsMidiPlugin : public MidiPluginObject { +class TownsMusicPlugin : public MusicPluginObject { public: virtual const char *getName() const { return "FM Towns Emulator"; @@ -772,7 +772,7 @@ public: virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError TownsMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +PluginError TownsMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_YM2612(mixer); return kNoError; @@ -781,14 +781,14 @@ PluginError TownsMidiPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mi MidiDriver *MidiDriver_YM2612_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - TownsMidiPlugin p; + TownsMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(TOWNS) - //REGISTER_PLUGIN_DYNAMIC(TOWNS, PLUGIN_TYPE_MIDI, TownsMidiPlugin); + //REGISTER_PLUGIN_DYNAMIC(TOWNS, PLUGIN_TYPE_MUSIC, TownsMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(TOWNS, PLUGIN_TYPE_MIDI, TownsMidiPlugin); + REGISTER_PLUGIN_STATIC(TOWNS, PLUGIN_TYPE_MUSIC, TownsMusicPlugin); //#endif -- cgit v1.2.3 From 8eac3569462c71fdcb7d4d23684a8d5ee34dc8b8 Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Fri, 13 Jun 2008 16:04:43 +0000 Subject: Added initial interface to list music devices and their types svn-id: r32695 --- backends/midi/alsa.cpp | 20 ++++++-------- backends/midi/camd.cpp | 21 ++++++++------- backends/midi/coreaudio.cpp | 19 ++++++++----- backends/midi/coremidi.cpp | 19 ++++++++----- backends/midi/dmedia.cpp | 19 ++++++++----- backends/midi/quicktime.cpp | 19 ++++++++----- backends/midi/seq.cpp | 19 ++++++++----- backends/midi/timidity.cpp | 17 +++++++----- backends/midi/windows.cpp | 19 ++++++++----- backends/midi/ypa1.cpp | 19 ++++++++----- backends/midi/zodiac.cpp | 19 ++++++++----- sound/module.mk | 1 + sound/musicplugin.cpp | 48 +++++++++++++++++++++++++++++++++ sound/musicplugin.h | 60 +++++++++++++++++++++++++++++++++--------- sound/null.cpp | 18 ++++++++----- sound/softsynth/adlib.cpp | 27 ++++++++++--------- sound/softsynth/fluidsynth.cpp | 17 +++++++----- sound/softsynth/mt32.cpp | 27 ++++++++++--------- sound/softsynth/ym2612.cpp | 27 ++++++++++--------- 19 files changed, 288 insertions(+), 147 deletions(-) create mode 100644 sound/musicplugin.cpp diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp index 2b564de294..f997b142df 100644 --- a/backends/midi/alsa.cpp +++ b/backends/midi/alsa.cpp @@ -243,21 +243,16 @@ void MidiDriver_ALSA::send_event(int do_flush) { class AlsaMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "ALSA"; } - virtual const char *getId() const { + const char *getId() const { return "alsa"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - virtual Common::StringList getDevices() const; - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; #define perm_ok(pinfo,bits) ((snd_seq_port_info_get_capability(pinfo) & (bits)) == (bits)) @@ -271,8 +266,8 @@ static int check_permission(snd_seq_port_info_t *pinfo) return 0; } -Common::StringList AlsaMusicPlugin::getDevices() const { - Common::StringList devices; +MusicDevices AlsaMusicPlugin::getDevices() const { + MusicDevices devices; snd_seq_t *seq; if (snd_seq_open(&seq, "default", SND_SEQ_OPEN_DUPLEX, 0) < 0) @@ -292,7 +287,8 @@ Common::StringList AlsaMusicPlugin::getDevices() const { while (!found_valid_port && snd_seq_query_next_port(seq, pinfo) >= 0) { if (check_permission(pinfo)) { found_valid_port = true; - devices.push_back(snd_seq_client_info_get_name(cinfo)); + // TODO: Return a different music type depending on the configuration + devices.push_back(MusicDevice(this, snd_seq_client_info_get_name(cinfo), MT_GM)); //snd_seq_client_info_get_client(cinfo) : snd_seq_port_info_get_port(pinfo) } } diff --git a/backends/midi/camd.cpp b/backends/midi/camd.cpp index 67600c004a..d6d5819a6e 100644 --- a/backends/midi/camd.cpp +++ b/backends/midi/camd.cpp @@ -168,23 +168,26 @@ void MidiDriver_CAMD::closeAll() { class CamdMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "CAMD"; } - virtual const char *getId() const { + const char *getId() const { return "camd"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - //virtual Common::StringList getDevices() const; - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; +MusicDevices CamdMusicPlugin::getDevices() const { + MusicDevices devices; + // TODO: Return a different music type depending on the configuration + // TODO: List the available devices + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + PluginError CamdMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_CAMD(); diff --git a/backends/midi/coreaudio.cpp b/backends/midi/coreaudio.cpp index 62df5a70b4..bf35fb90ba 100644 --- a/backends/midi/coreaudio.cpp +++ b/backends/midi/coreaudio.cpp @@ -209,21 +209,26 @@ void MidiDriver_CORE::sysEx(const byte *msg, uint16 length) { class CoreAudioMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "CoreAudio"; } - virtual const char *getId() const { + const char *getId() const { return "core"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; +MusicDevices CoreAudioMusicPlugin::getDevices() const { + MusicDevices devices; + // TODO: Return a different music type depending on the configuration + // TODO: List the available devices + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + PluginError CoreAudioMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_CORE(); diff --git a/backends/midi/coremidi.cpp b/backends/midi/coremidi.cpp index 613534d5b1..da82249792 100644 --- a/backends/midi/coremidi.cpp +++ b/backends/midi/coremidi.cpp @@ -181,21 +181,26 @@ void MidiDriver_CoreMIDI::sysEx(const byte *msg, uint16 length) { class CoreMIDIMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "CoreMIDI"; } - virtual const char *getId() const { + const char *getId() const { return "coremidi"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; +MusicDevices CoreMIDIMusicPlugin::getDevices() const { + MusicDevices devices; + // TODO: Return a different music type depending on the configuration + // TODO: List the available devices + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + PluginError CoreMIDIMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_CoreMIDI(); diff --git a/backends/midi/dmedia.cpp b/backends/midi/dmedia.cpp index 257f9ba07c..b4bd426ca4 100644 --- a/backends/midi/dmedia.cpp +++ b/backends/midi/dmedia.cpp @@ -180,21 +180,26 @@ void MidiDriver_DMEDIA::sysEx (const byte *msg, uint16 length) { class DMediaMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "DMedia"; } - virtual const char *getId() const { + const char *getId() const { return "dmedia"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; +MusicDevices DMediaMusicPlugin::getDevices() const { + MusicDevices devices; + // TODO: Return a different music type depending on the configuration + // TODO: List the available devices + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + PluginError DMediaMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_DMEDIA(); diff --git a/backends/midi/quicktime.cpp b/backends/midi/quicktime.cpp index 1443f895a6..568adf022b 100644 --- a/backends/midi/quicktime.cpp +++ b/backends/midi/quicktime.cpp @@ -267,21 +267,26 @@ void MidiDriver_QT::dispose() class QuickTimeMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "QuickTime"; } - virtual const char *getId() const { + const char *getId() const { return "qt"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; +MusicDevices QuickTimeMusicPlugin::getDevices() const { + MusicDevices devices; + // TODO: Return a different music type depending on the configuration + // TODO: List the available devices + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + PluginError QuickTimeMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_QT(); diff --git a/backends/midi/seq.cpp b/backends/midi/seq.cpp index fc7ebb060b..57a5a1ea32 100644 --- a/backends/midi/seq.cpp +++ b/backends/midi/seq.cpp @@ -175,21 +175,26 @@ void MidiDriver_SEQ::sysEx (const byte *msg, uint16 length) { class SeqMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "SEQ"; } - virtual const char *getId() const { + const char *getId() const { return "seq"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; +MusicDevices SeqMusicPlugin::getDevices() const { + MusicDevices devices; + // TODO: Return a different music type depending on the configuration + // TODO: List the available devices + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + PluginError SeqMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_SEQ(); diff --git a/backends/midi/timidity.cpp b/backends/midi/timidity.cpp index 40b684e664..b262fed88c 100644 --- a/backends/midi/timidity.cpp +++ b/backends/midi/timidity.cpp @@ -516,21 +516,24 @@ void MidiDriver_TIMIDITY::sysEx(const byte *msg, uint16 length) { class TimidityMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "TiMidity"; } - virtual const char *getId() const { + const char *getId() const { return "timidity"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; +MusicDevices TimidityMusicPlugin::getDevices() const { + MusicDevices devices; + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + PluginError TimidityMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_TIMIDITY(); diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp index 8393082fea..c564c124fe 100644 --- a/backends/midi/windows.cpp +++ b/backends/midi/windows.cpp @@ -149,21 +149,26 @@ void MidiDriver_WIN::check_error(MMRESULT result) { class WindowsMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "Windows MIDI"; } - virtual const char *getId() const { + const char *getId() const { return "windows"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; +MusicDevices WindowsMusicPlugin::getDevices() const { + MusicDevices devices; + // TODO: Return a different music type depending on the configuration + // TODO: List the available devices + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + PluginError WindowsMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_WIN(); diff --git a/backends/midi/ypa1.cpp b/backends/midi/ypa1.cpp index d2fc6a8c91..88f9c3de8f 100644 --- a/backends/midi/ypa1.cpp +++ b/backends/midi/ypa1.cpp @@ -108,21 +108,26 @@ void MidiDriver_YamahaPa1::send(uint32 b) { class YamahaPa1MusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "Yamaha Pa1"; } - virtual const char *getId() const { + const char *getId() const { return "ypa1"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; +MusicDevices YamahaPa1MusicPlugin::getDevices() const { + MusicDevices devices; + // TODO: Return a different music type depending on the configuration + // TODO: List the available devices + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + PluginError YamahaPa1MusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_YamahaPa1(); diff --git a/backends/midi/zodiac.cpp b/backends/midi/zodiac.cpp index b210b0cfc3..456e4df43a 100644 --- a/backends/midi/zodiac.cpp +++ b/backends/midi/zodiac.cpp @@ -126,21 +126,26 @@ void MidiDriver_Zodiac::sysEx(const byte *msg, uint16 length) { class ZodiacMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "Tapwave Zodiac"; } - virtual const char *getId() const { + const char *getId() const { return "zodiac"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; +MusicDevices ZodiacMusicPlugin::getDevices() const { + MusicDevices devices; + // TODO: Return a different music type depending on the configuration + // TODO: List the available devices + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + PluginError ZodiacMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_Zodiac(); diff --git a/sound/module.mk b/sound/module.mk index 2f3dc1f987..d99013e7d0 100644 --- a/sound/module.mk +++ b/sound/module.mk @@ -15,6 +15,7 @@ MODULE_OBJS := \ mixer.o \ mp3.o \ mpu401.o \ + musicplugin.o \ null.o \ voc.o \ vorbis.o \ diff --git a/sound/musicplugin.cpp b/sound/musicplugin.cpp new file mode 100644 index 0000000000..b4754230da --- /dev/null +++ b/sound/musicplugin.cpp @@ -0,0 +1,48 @@ +/* ScummVM - Graphic Adventure Engine + * + * ScummVM is the legal property of its developers, whose names + * are too numerous to list here. Please refer to the COPYRIGHT + * file distributed with this source distribution. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + * + */ + +#include "sound/musicplugin.h" + +MusicDevice::MusicDevice(MusicPluginObject const *musicPlugin, Common::String name, MusicType mt) : + _musicDriverName(musicPlugin->getName()), _musicDriverId(musicPlugin->getId()), + _name(name), _type(mt) { +} + +Common::String MusicDevice::getCompleteName() { + Common::String name; + + if (_name.empty()) { + // Default device, just show the driver name + name = _musicDriverName; + } else { + // Show both device and driver names + name = _name; + name += " ["; + name += _musicDriverName; + name += "]"; + } + + return name; +} diff --git a/sound/musicplugin.h b/sound/musicplugin.h index 316ee1fbf3..bdbd07ad31 100644 --- a/sound/musicplugin.h +++ b/sound/musicplugin.h @@ -28,6 +28,51 @@ #include "base/plugins.h" #include "sound/mididrv.h" +/** + * Music types that music drivers can implement and engines can rely on. + */ +enum MusicType { + MT_PCSPK = 1, // PC Speaker + MT_PCJR = 2, // PCjr + MT_ADLIB = 3, // AdLib + MT_TOWNS = 4, // FM-TOWNS + MT_GM = 5, // General MIDI + MT_MT32 = 6, // MT-32 + MT_GS = 7 // Roland GS +}; + +class MusicPluginObject; + +/** + * Description of a Music device. Used to list the devices a Music driver + * can manage and their capabilities. + * A device with an empty name means the default device. + */ +class MusicDevice { +public: + MusicDevice(MusicPluginObject const *musicPlugin, Common::String name, MusicType mt); + + Common::String &getName() { return _name; } + Common::String &getMusicDriverName() { return _musicDriverName; } + Common::String &getMusicDriverId() { return _musicDriverId; } + MusicType getMusicType() { return _type; } + + /** + * Returns a user readable string that contains the name of the current + * device name (if it isn't the default one) and the name of the driver. + */ + Common::String getCompleteName(); + +private: + Common::String _name; + Common::String _musicDriverName; + Common::String _musicDriverId; + MusicType _type; +}; + +/** List of music devices. */ +typedef Common::List MusicDevices; + /** * A MusicPluginObject is essentially a factory for MidiDriver instances with * the added ability of listing the available devices and their capabilities. @@ -43,20 +88,9 @@ public: virtual const char *getId() const = 0; /** - * Returns the type kind of music supported by this driver, as specified - * by the MidiDriverFlags enum. - */ - virtual int getCapabilities() const = 0; - - /** - * Returns a list of the available devices. The empty string means the - * default device. + * Returns a list of the available devices. */ - virtual Common::StringList getDevices() const { - Common::StringList dev; - dev.push_back(""); - return dev; - } + virtual MusicDevices getDevices() const = 0; /** * Tries to instantiate a MIDI Driver instance based on the settings of diff --git a/sound/null.cpp b/sound/null.cpp index 763299d5a3..7559a6d816 100644 --- a/sound/null.cpp +++ b/sound/null.cpp @@ -37,19 +37,16 @@ public: class NullMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "No music"; } - virtual const char *getId() const { + const char *getId() const { return "null"; } - virtual int getCapabilities() const { - return MDT_MIDI | MDT_PCSPK | MDT_ADLIB | MDT_TOWNS; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; PluginError NullMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { @@ -58,6 +55,13 @@ PluginError NullMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mi return kNoError; } +MusicDevices NullMusicPlugin::getDevices() const { + MusicDevices devices; + // TODO: return a different music type? + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + MidiDriver *MidiDriver_NULL_create(Audio::Mixer *mixer) { MidiDriver *mididriver; diff --git a/sound/softsynth/adlib.cpp b/sound/softsynth/adlib.cpp index beedaf5c3b..3898956e15 100644 --- a/sound/softsynth/adlib.cpp +++ b/sound/softsynth/adlib.cpp @@ -1518,24 +1518,27 @@ void MidiDriver_ADLIB::adlib_note_on(int chan, byte note, int mod) { // Plugin interface -class AdlibMusicPlugin : public MusicPluginObject { +class AdlibEmuMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "AdLib Emulator"; } - virtual const char *getId() const { + const char *getId() const { return "adlib"; } - virtual int getCapabilities() const { - return MDT_ADLIB; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError AdlibMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +MusicDevices AdlibEmuMusicPlugin::getDevices() const { + MusicDevices devices; + devices.push_back(MusicDevice(this, "", MT_ADLIB)); + return devices; +} + +PluginError AdlibEmuMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_ADLIB(mixer); return kNoError; @@ -1544,14 +1547,14 @@ PluginError AdlibMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **m MidiDriver *MidiDriver_ADLIB_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - AdlibMusicPlugin p; + AdlibEmuMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(ADLIB) - //REGISTER_PLUGIN_DYNAMIC(ADLIB, PLUGIN_TYPE_MUSIC, AdlibMusicPlugin); + //REGISTER_PLUGIN_DYNAMIC(ADLIB, PLUGIN_TYPE_MUSIC, AdlibEmuMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(ADLIB, PLUGIN_TYPE_MUSIC, AdlibMusicPlugin); + REGISTER_PLUGIN_STATIC(ADLIB, PLUGIN_TYPE_MUSIC, AdlibEmuMusicPlugin); //#endif diff --git a/sound/softsynth/fluidsynth.cpp b/sound/softsynth/fluidsynth.cpp index f2dcb2de7a..eff9f4123c 100644 --- a/sound/softsynth/fluidsynth.cpp +++ b/sound/softsynth/fluidsynth.cpp @@ -221,21 +221,24 @@ void MidiDriver_FluidSynth::generateSamples(int16 *data, int len) { class FluidSynthMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "FluidSynth"; } - virtual const char *getId() const { + const char *getId() const { return "fluidsynth"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; +MusicDevices FluidSynthMusicPlugin::getDevices() const { + MusicDevices devices; + devices.push_back(MusicDevice(this, "", MT_GM)); + return devices; +} + PluginError FluidSynthMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_FluidSynth(mixer); diff --git a/sound/softsynth/mt32.cpp b/sound/softsynth/mt32.cpp index 112fbb4bfe..053df544b1 100644 --- a/sound/softsynth/mt32.cpp +++ b/sound/softsynth/mt32.cpp @@ -483,24 +483,27 @@ void MidiDriver_ThreadedMT32::onTimer() { // Plugin interface -class MT32MusicPlugin : public MusicPluginObject { +class MT32EmuMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "MT-32 Emulator"; } - virtual const char *getId() const { + const char *getId() const { return "mt32"; } - virtual int getCapabilities() const { - return MDT_MIDI; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError MT32MusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +MusicDevices MT32EmuMusicPlugin::getDevices() const { + MusicDevices devices; + devices.push_back(MusicDevice(this, "", MT_MT32)); + return devices; +} + +PluginError MT32EmuMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_MT32(mixer); return kNoError; @@ -513,16 +516,16 @@ MidiDriver *MidiDriver_MT32_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - MT32MusicPlugin p; + MT32EmuMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(MT32) - //REGISTER_PLUGIN_DYNAMIC(MT32, PLUGIN_TYPE_MUSIC, MT32MusicPlugin); + //REGISTER_PLUGIN_DYNAMIC(MT32, PLUGIN_TYPE_MUSIC, MT32EmuMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(MT32, PLUGIN_TYPE_MUSIC, MT32MusicPlugin); + REGISTER_PLUGIN_STATIC(MT32, PLUGIN_TYPE_MUSIC, MT32EmuMusicPlugin); //#endif #endif diff --git a/sound/softsynth/ym2612.cpp b/sound/softsynth/ym2612.cpp index 186300e1fe..2a08bf631e 100644 --- a/sound/softsynth/ym2612.cpp +++ b/sound/softsynth/ym2612.cpp @@ -755,24 +755,27 @@ void MidiDriver_YM2612::removeLookupTables() { // Plugin interface -class TownsMusicPlugin : public MusicPluginObject { +class TownsEmuMusicPlugin : public MusicPluginObject { public: - virtual const char *getName() const { + const char *getName() const { return "FM Towns Emulator"; } - virtual const char *getId() const { + const char *getId() const { return "towns"; } - virtual int getCapabilities() const { - return MDT_TOWNS; - } - - virtual PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; + MusicDevices getDevices() const; + PluginError createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const; }; -PluginError TownsMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { +MusicDevices TownsEmuMusicPlugin::getDevices() const { + MusicDevices devices; + devices.push_back(MusicDevice(this, "", MT_TOWNS)); + return devices; +} + +PluginError TownsEmuMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **mididriver) const { *mididriver = new MidiDriver_YM2612(mixer); return kNoError; @@ -781,14 +784,14 @@ PluginError TownsMusicPlugin::createInstance(Audio::Mixer *mixer, MidiDriver **m MidiDriver *MidiDriver_YM2612_create(Audio::Mixer *mixer) { MidiDriver *mididriver; - TownsMusicPlugin p; + TownsEmuMusicPlugin p; p.createInstance(mixer, &mididriver); return mididriver; } //#if PLUGIN_ENABLED_DYNAMIC(TOWNS) - //REGISTER_PLUGIN_DYNAMIC(TOWNS, PLUGIN_TYPE_MUSIC, TownsMusicPlugin); + //REGISTER_PLUGIN_DYNAMIC(TOWNS, PLUGIN_TYPE_MUSIC, TownsEmuMusicPlugin); //#else - REGISTER_PLUGIN_STATIC(TOWNS, PLUGIN_TYPE_MUSIC, TownsMusicPlugin); + REGISTER_PLUGIN_STATIC(TOWNS, PLUGIN_TYPE_MUSIC, TownsEmuMusicPlugin); //#endif -- cgit v1.2.3 From 256036d4afacbf2b8c7b46ae62e216b2638c92bf Mon Sep 17 00:00:00 2001 From: Jordi Vilalta Prat Date: Sat, 14 Jun 2008 04:52:10 +0000 Subject: Fixed ALSA's invalid port error message svn-id: r32698 --- backends/midi/alsa.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backends/midi/alsa.cpp b/backends/midi/alsa.cpp index f997b142df..2a252b9323 100644 --- a/backends/midi/alsa.cpp +++ b/backends/midi/alsa.cpp @@ -79,7 +79,7 @@ MidiDriver_ALSA::MidiDriver_ALSA() } int MidiDriver_ALSA::open() { - char *var; + const char *var; if (_isOpen) return MERR_ALREADY_OPEN; @@ -87,7 +87,8 @@ int MidiDriver_ALSA::open() { if (!(var = getenv("SCUMMVM_PORT"))) { // use config option if no var specified - if (parse_addr(ConfMan.get("alsa_port").c_str(), &seq_client, &seq_port) < 0) { + var = ConfMan.get("alsa_port").c_str(); + if (parse_addr(var, &seq_client, &seq_port) < 0) { error("Invalid port %s", var); return -1; } -- cgit v1.2.3 From 2e3077b3cbdc256f2c534e2b2435c3ea2367ab79 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 14 Jun 2008 11:17:16 +0000 Subject: Disable drawObject type 0x41, which is currently causing frequent crashes. svn-id: r32699 --- base/plugins.cpp | 3 +++ configure | 1 + engines/engines.mk | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/base/plugins.cpp b/base/plugins.cpp index dcd394495f..216c6ef1af 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -140,6 +140,9 @@ public: #if PLUGIN_ENABLED_STATIC(SWORD2) LINK_PLUGIN(SWORD2) #endif + #if PLUGIN_ENABLED_STATIC(TINSEL) + LINK_PLUGIN(TINSEL) + #endif #if PLUGIN_ENABLED_STATIC(TOUCHE) LINK_PLUGIN(TOUCHE) #endif diff --git a/configure b/configure index 99da4e0478..232a2fc1ba 100755 --- a/configure +++ b/configure @@ -100,6 +100,7 @@ add_engine saga "SAGA" yes add_engine sky "Beneath a Steel Sky" yes add_engine sword1 "Broken Sword 1" yes add_engine sword2 "Broken Sword 2" yes +add_engine tinsel "Tinsel" yes add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes _endian=unknown diff --git a/engines/engines.mk b/engines/engines.mk index cfb8e69f3e..4dba913173 100644 --- a/engines/engines.mk +++ b/engines/engines.mk @@ -97,6 +97,11 @@ DEFINES += -DENABLE_SWORD2=$(ENABLE_SWORD2) MODULES += engines/sword2 endif +ifdef ENABLE_TINSEL +DEFINES += -DENABLE_TINSEL=$(ENABLE_TINSEL) +MODULES += engines/tinsel +endif + ifdef ENABLE_TOUCHE DEFINES += -DENABLE_TOUCHE=$(ENABLE_TOUCHE) MODULES += engines/touche -- cgit v1.2.3 From 91d3ea31359950b59ee46af8355cc0f5790257e5 Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sat, 14 Jun 2008 11:23:29 +0000 Subject: Revert last commit. svn-id: r32700 --- base/plugins.cpp | 3 --- configure | 1 - engines/engines.mk | 5 ----- 3 files changed, 9 deletions(-) diff --git a/base/plugins.cpp b/base/plugins.cpp index 216c6ef1af..dcd394495f 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -140,9 +140,6 @@ public: #if PLUGIN_ENABLED_STATIC(SWORD2) LINK_PLUGIN(SWORD2) #endif - #if PLUGIN_ENABLED_STATIC(TINSEL) - LINK_PLUGIN(TINSEL) - #endif #if PLUGIN_ENABLED_STATIC(TOUCHE) LINK_PLUGIN(TOUCHE) #endif diff --git a/configure b/configure index 232a2fc1ba..99da4e0478 100755 --- a/configure +++ b/configure @@ -100,7 +100,6 @@ add_engine saga "SAGA" yes add_engine sky "Beneath a Steel Sky" yes add_engine sword1 "Broken Sword 1" yes add_engine sword2 "Broken Sword 2" yes -add_engine tinsel "Tinsel" yes add_engine touche "Touche: The Adventures of the Fifth Musketeer" yes _endian=unknown diff --git a/engines/engines.mk b/engines/engines.mk index 4dba913173..cfb8e69f3e 100644 --- a/engines/engines.mk +++ b/engines/engines.mk @@ -97,11 +97,6 @@ DEFINES += -DENABLE_SWORD2=$(ENABLE_SWORD2) MODULES += engines/sword2 endif -ifdef ENABLE_TINSEL -DEFINES += -DENABLE_TINSEL=$(ENABLE_TINSEL) -MODULES += engines/tinsel -endif - ifdef ENABLE_TOUCHE DEFINES += -DENABLE_TOUCHE=$(ENABLE_TOUCHE) MODULES += engines/touche -- cgit v1.2.3